@hpcc-js/phosphor 2.20.2 → 2.20.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es6.js +2 -2
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +5 -5
- package/dist/index.min.js.map +1 -1
- package/package.json +5 -5
- package/src/__package__.ts +2 -2
- package/types/__package__.d.ts +2 -2
- package/types-3.4/__package__.d.ts +2 -2
package/dist/index.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@hpcc-js/common")):"function"==typeof define&&define.amd?define(["exports","@hpcc-js/common"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self)["@hpcc-js/phosphor"]={},t["@hpcc-js/common"])}(this,(function(t,e){"use strict";var n;function i(t){return"function"==typeof t.iter?t.iter():new r(t)}function o(t,e){for(var n,o=0,r=i(t);void 0!==(n=r.next());)if(!1===e(n,o++))return}!function(t){function e(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=-1);var o,r=t.length;if(0===r)return-1;n=n<0?Math.max(0,n+r):Math.min(n,r-1),o=(i=i<0?Math.max(0,i+r):Math.min(i,r-1))<n?i+1+(r-n):i-n+1;for(var s=0;s<o;++s){var a=(n+s)%r;if(t[a]===e)return a}return-1}function n(t,e,n,i){void 0===n&&(n=-1),void 0===i&&(i=0);var o,r=t.length;if(0===r)return-1;o=(n=n<0?Math.max(0,n+r):Math.min(n,r-1))<(i=i<0?Math.max(0,i+r):Math.min(i,r-1))?n+1+(r-i):n-i+1;for(var s=0;s<o;++s){var a=(n-s+r)%r;if(t[a]===e)return a}return-1}function i(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=-1);var o,r=t.length;if(0===r)return-1;n=n<0?Math.max(0,n+r):Math.min(n,r-1),o=(i=i<0?Math.max(0,i+r):Math.min(i,r-1))<n?i+1+(r-n):i-n+1;for(var s=0;s<o;++s){var a=(n+s)%r;if(e(t[a],a))return a}return-1}function o(t,e,n,i){void 0===n&&(n=-1),void 0===i&&(i=0);var o,r=t.length;if(0===r)return-1;o=(n=n<0?Math.max(0,n+r):Math.min(n,r-1))<(i=i<0?Math.max(0,i+r):Math.min(i,r-1))?n+1+(r-i):n-i+1;for(var s=0;s<o;++s){var a=(n-s+r)%r;if(e(t[a],a))return a}return-1}function r(t,e,n){void 0===e&&(e=0),void 0===n&&(n=-1);var i=t.length;if(!(i<=1))for(e=e<0?Math.max(0,e+i):Math.min(e,i-1),n=n<0?Math.max(0,n+i):Math.min(n,i-1);e<n;){var o=t[e],r=t[n];t[e++]=r,t[n--]=o}}function s(t,e){var n=t.length;if(e<0&&(e+=n),!(e<0||e>=n)){for(var i=t[e],o=e+1;o<n;++o)t[o-1]=t[o];return t.length=n-1,i}}t.firstIndexOf=e,t.lastIndexOf=n,t.findFirstIndex=i,t.findLastIndex=o,t.findFirstValue=function(t,e,n,o){void 0===n&&(n=0),void 0===o&&(o=-1);var r=i(t,e,n,o);return-1!==r?t[r]:void 0},t.findLastValue=function(t,e,n,i){void 0===n&&(n=-1),void 0===i&&(i=0);var r=o(t,e,n,i);return-1!==r?t[r]:void 0},t.lowerBound=function(t,e,n,i,o){void 0===i&&(i=0),void 0===o&&(o=-1);var r=t.length;if(0===r)return 0;for(var s=i=i<0?Math.max(0,i+r):Math.min(i,r-1),a=(o=o<0?Math.max(0,o+r):Math.min(o,r-1))-i+1;a>0;){var d=a>>1,c=s+d;n(t[c],e)<0?(s=c+1,a-=d+1):a=d}return s},t.upperBound=function(t,e,n,i,o){void 0===i&&(i=0),void 0===o&&(o=-1);var r=t.length;if(0===r)return 0;for(var s=i=i<0?Math.max(0,i+r):Math.min(i,r-1),a=(o=o<0?Math.max(0,o+r):Math.min(o,r-1))-i+1;a>0;){var d=a>>1,c=s+d;n(t[c],e)>0?a=d:(s=c+1,a-=d+1)}return s},t.shallowEqual=function(t,e,n){if(t===e)return!0;if(t.length!==e.length)return!1;for(var i=0,o=t.length;i<o;++i)if(n?!n(t[i],e[i]):t[i]!==e[i])return!1;return!0},t.slice=function(t,e){void 0===e&&(e={});var n=e.start,i=e.stop,o=e.step;if(void 0===o&&(o=1),0===o)throw new Error("Slice `step` cannot be zero.");var r,s=t.length;void 0===n?n=o<0?s-1:0:n<0?n=Math.max(n+s,o<0?-1:0):n>=s&&(n=o<0?s-1:s),void 0===i?i=o<0?-1:s:i<0?i=Math.max(i+s,o<0?-1:0):i>=s&&(i=o<0?s-1:s),r=o<0&&i>=n||o>0&&n>=i?0:o<0?Math.floor((i-n+1)/o+1):Math.floor((i-n-1)/o+1);for(var a=[],d=0;d<r;++d)a[d]=t[n+d*o];return a},t.move=function(t,e,n){var i=t.length;if(!(i<=1)&&(e=e<0?Math.max(0,e+i):Math.min(e,i-1))!==(n=n<0?Math.max(0,n+i):Math.min(n,i-1))){for(var o=t[e],r=e<n?1:-1,s=e;s!==n;s+=r)t[s]=t[s+r];t[n]=o}},t.reverse=r,t.rotate=function(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=-1);var o=t.length;if(!(o<=1||(n=n<0?Math.max(0,n+o):Math.min(n,o-1))>=(i=i<0?Math.max(0,i+o):Math.min(i,o-1)))){var s=i-n+1;if(e>0?e%=s:e<0&&(e=(e%s+s)%s),0!==e){var a=n+e;r(t,n,a-1),r(t,a,i),r(t,n,i)}}},t.fill=function(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=-1);var o=t.length;if(0!==o){var r;n=n<0?Math.max(0,n+o):Math.min(n,o-1),r=(i=i<0?Math.max(0,i+o):Math.min(i,o-1))<n?i+1+(o-n):i-n+1;for(var s=0;s<r;++s)t[(n+s)%o]=e}},t.insert=function(t,e,n){var i=t.length;e=e<0?Math.max(0,e+i):Math.min(e,i);for(var o=i;o>e;--o)t[o]=t[o-1];t[e]=n},t.removeAt=s,t.removeFirstOf=function(t,n,i,o){void 0===i&&(i=0),void 0===o&&(o=-1);var r=e(t,n,i,o);return-1!==r&&s(t,r),r},t.removeLastOf=function(t,e,i,o){void 0===i&&(i=-1),void 0===o&&(o=0);var r=n(t,e,i,o);return-1!==r&&s(t,r),r},t.removeAllOf=function(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=-1);var o=t.length;if(0===o)return 0;n=n<0?Math.max(0,n+o):Math.min(n,o-1),i=i<0?Math.max(0,i+o):Math.min(i,o-1);for(var r=0,s=0;s<o;++s)n<=i&&s>=n&&s<=i&&t[s]===e||i<n&&(s<=i||s>=n)&&t[s]===e?r++:r>0&&(t[s-r]=t[s]);return r>0&&(t.length=o-r),r},t.removeFirstWhere=function(t,e,n,o){var r;void 0===n&&(n=0),void 0===o&&(o=-1);var a=i(t,e,n,o);return-1!==a&&(r=s(t,a)),{index:a,value:r}},t.removeLastWhere=function(t,e,n,i){var r;void 0===n&&(n=-1),void 0===i&&(i=0);var a=o(t,e,n,i);return-1!==a&&(r=s(t,a)),{index:a,value:r}},t.removeAllWhere=function(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=-1);var o=t.length;if(0===o)return 0;n=n<0?Math.max(0,n+o):Math.min(n,o-1),i=i<0?Math.max(0,i+o):Math.min(i,o-1);for(var r=0,s=0;s<o;++s)n<=i&&s>=n&&s<=i&&e(t[s],s)||i<n&&(s<=i||s>=n)&&e(t[s],s)?r++:r>0&&(t[s-r]=t[s]);return r>0&&(t.length=o-r),r}}(n||(n={}));var r=function(){function t(t){this._index=0,this._source=t}return t.prototype.iter=function(){return this},t.prototype.clone=function(){var e=new t(this._source);return e._index=this._index,e},t.prototype.next=function(){if(!(this._index>=this._source.length))return this._source[this._index++]},t}();function s(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new a(i(t.map(i)))}var a=function(){function t(t){this._cloned=!1,this._source=t,this._active=void 0}return t.prototype.iter=function(){return this},t.prototype.clone=function(){var e=new t(this._source.clone());return e._active=this._active&&this._active.clone(),e._cloned=!0,this._cloned=!0,e},t.prototype.next=function(){if(void 0===this._active){var t=this._source.next();if(void 0===t)return;this._active=this._cloned?t.clone():t}var e=this._active.next();return void 0!==e?e:(this._active=void 0,this.next())},t}();function d(){return new c}var c=function(){function t(){}return t.prototype.iter=function(){return this},t.prototype.clone=function(){return new t},t.prototype.next=function(){},t}();var h=function(){function t(t,e){this._index=0,this._source=t,this._fn=e}return t.prototype.iter=function(){return this},t.prototype.clone=function(){var e=new t(this._source.clone(),this._fn);return e._index=this._index,e},t.prototype.next=function(){for(var t,e=this._fn,n=this._source;void 0!==(t=n.next());)if(e(t,this._index++))return t},t}();function l(t,e){for(var n,o=0,r=i(t);void 0!==(n=r.next());)if(e(n,o++))return n}function u(t,e){return new f(i(t),e)}var p,f=function(){function t(t,e){this._index=0,this._source=t,this._fn=e}return t.prototype.iter=function(){return this},t.prototype.clone=function(){var e=new t(this._source.clone(),this._fn);return e._index=this._index,e},t.prototype.next=function(){var t=this._source.next();if(void 0!==t)return this._fn.call(void 0,t,this._index++)},t}();function m(t,e,n){var o=0,r=i(t),s=r.next();if(void 0===s)return n;var a,d,c=r.next();if(void 0===c)return e(n,s,o++);for(a=e(e(n,s,o++),c,o++);void 0!==(d=r.next());)a=e(a,d,o++);return a}function g(t){return new v(t,1)}!function(t){t.rangeLength=function(t,e,n){return 0===n?1/0:t>e&&n>0||t<e&&n<0?0:Math.ceil((e-t)/n)}}(p||(p={}));var v=function(){function t(t,e){this._value=t,this._count=e}return t.prototype.iter=function(){return this},t.prototype.clone=function(){return new t(this._value,this._count)},t.prototype.next=function(){if(!(this._count<=0))return this._count--,this._value},t}();var y,b,_=function(){function t(t){this._source=t,this._index=t.length-1}return t.prototype.iter=function(){return this},t.prototype.clone=function(){var e=new t(this._source);return e._index=this._index,e},t.prototype.next=function(){if(!(this._index<0||this._index>=this._source.length))return this._source[this._index--]},t}();!function(t){function e(t,e,n){void 0===n&&(n=0);for(var i=new Array(e.length),o=0,r=n,s=e.length;o<s;++o,++r){if(-1===(r=t.indexOf(e[o],r)))return null;i[o]=r}return i}t.findIndices=e,t.matchSumOfSquares=function(t,n,i){void 0===i&&(i=0);var o=e(t,n,i);if(!o)return null;for(var r=0,s=0,a=o.length;s<a;++s){var d=o[s]-i;r+=d*d}return{score:r,indices:o}},t.matchSumOfDeltas=function(t,n,i){void 0===i&&(i=0);var o=e(t,n,i);if(!o)return null;for(var r=0,s=i-1,a=0,d=o.length;a<d;++a){var c=o[a];r+=c-s-1,s=c}return{score:r,indices:o}},t.highlight=function(t,e,n){for(var i=[],o=0,r=0,s=e.length;o<s;){for(var a=e[o],d=e[o];++o<s&&e[o]===d+1;)d++;r<a&&i.push(t.slice(r,a)),a<d+1&&i.push(n(t.slice(a,d+1))),r=d+1}return r<t.length&&i.push(t.slice(r)),i},t.cmp=function(t,e){return t<e?-1:t>e?1:0}}(y||(y={})),function(t){function e(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t}function n(t){return Array.isArray(t)}function i(t,o){if(t===o)return!0;if(e(t)||e(o))return!1;var r=n(t),s=n(o);return r===s&&(r&&s?function(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(var n=0,o=t.length;n<o;++n)if(!i(t[n],e[n]))return!1;return!0}(t,o):function(t,e){if(t===e)return!0;for(var n in t)if(void 0!==t[n]&&!(n in e))return!1;for(var n in e)if(void 0!==e[n]&&!(n in t))return!1;for(var n in t){var o=t[n],r=e[n];if(void 0!==o||void 0!==r){if(void 0===o||void 0===r)return!1;if(!i(o,r))return!1}}return!0}(t,o))}function o(t){return e(t)?t:n(t)?function(t){for(var e=new Array(t.length),n=0,i=t.length;n<i;++n)e[n]=o(t[n]);return e}(t):function(t){var e={};for(var n in t){var i=t[n];void 0!==i&&(e[n]=o(i))}return e}(t)}t.emptyObject=Object.freeze({}),t.emptyArray=Object.freeze([]),t.isPrimitive=e,t.isArray=n,t.isObject=function(t){return!e(t)&&!n(t)},t.deepEqual=i,t.deepCopy=o}(b||(b={}));var w,x,M=function(){function t(){this._types=[],this._values=[]}return t.prototype.types=function(){return this._types.slice()},t.prototype.hasData=function(t){return-1!==this._types.indexOf(t)},t.prototype.getData=function(t){var e=this._types.indexOf(t);return-1!==e?this._values[e]:void 0},t.prototype.setData=function(t,e){this.clearData(t),this._types.push(t),this._values.push(e)},t.prototype.clearData=function(t){var e=this._types.indexOf(t);-1!==e&&(this._types.splice(e,1),this._values.splice(e,1))},t.prototype.clear=function(){this._types.length=0,this._values.length=0},t}();function C(t){for(var e=0,n=0,i=t.length;n<i;++n)n%4==0&&(e=4294967295*Math.random()>>>0),t[n]=255&e,e>>>=8}!function(t){var e;t.getRandomValues=(e="undefined"!=typeof window&&(window.crypto||window.msCrypto)||null)&&"function"==typeof e.getRandomValues?function(t){return e.getRandomValues(t)}:C}(w||(w={})),function(t){t.uuid4=function(t){for(var e=new Uint8Array(16),n=new Array(256),i=0;i<16;++i)n[i]="0"+i.toString(16);for(i=16;i<256;++i)n[i]=i.toString(16);return function(){return t(e),e[6]=64|15&e[6],e[8]=128|63&e[8],n[e[0]]+n[e[1]]+n[e[2]]+n[e[3]]+"-"+n[e[4]]+n[e[5]]+"-"+n[e[6]]+n[e[7]]+"-"+n[e[8]]+n[e[9]]+"-"+n[e[10]]+n[e[11]]+n[e[12]]+n[e[13]]+n[e[14]]+n[e[15]]}}(w.getRandomValues)}(x||(x={}));var z,S=function(){function t(t){this._pid=z.nextPID(),this.name=t.name,this._create=t.create,this._coerce=t.coerce||null,this._compare=t.compare||null,this._changed=t.changed||null}return t.prototype.get=function(t){var e=z.ensureMap(t);return this._pid in e?e[this._pid]:e[this._pid]=this._createValue(t)},t.prototype.set=function(t,e){var n,i=z.ensureMap(t);n=this._pid in i?i[this._pid]:i[this._pid]=this._createValue(t);var o=this._coerceValue(t,e);this._maybeNotify(t,n,i[this._pid]=o)},t.prototype.coerce=function(t){var e,n=z.ensureMap(t);e=this._pid in n?n[this._pid]:n[this._pid]=this._createValue(t);var i=this._coerceValue(t,e);this._maybeNotify(t,e,n[this._pid]=i)},t.prototype._createValue=function(t){return(0,this._create)(t)},t.prototype._coerceValue=function(t,e){var n=this._coerce;return n?n(t,e):e},t.prototype._compareValue=function(t,e){var n=this._compare;return n?n(t,e):t===e},t.prototype._maybeNotify=function(t,e,n){var i=this._changed;i&&!this._compareValue(e,n)&&i(t,e,n)},t}();!function(t){t.clearData=function(t){z.ownerData.delete(t)}}(S||(S={})),function(t){var e;t.ownerData=new WeakMap,t.nextPID=(e=0,function(){return"pid-"+(""+Math.random()).slice(2)+"-"+e++}),t.ensureMap=function(e){var n=t.ownerData.get(e);return n||(n=Object.create(null),t.ownerData.set(e,n),n)}}(z||(z={}));var P,A=function(){function t(t){this._blockedCount=0,this.sender=t}return t.prototype.block=function(t){this._blockedCount++;try{t()}finally{this._blockedCount--}},t.prototype.connect=function(t,e){return P.connect(this,t,e)},t.prototype.disconnect=function(t,e){return P.disconnect(this,t,e)},t.prototype.emit=function(t){this._blockedCount||P.emit(this,t)},t}();!function(t){t.blockAll=function(t,e){var n=P.blockedProperty;n.set(t,n.get(t)+1);try{e()}finally{n.set(t,n.get(t)-1)}},t.disconnectBetween=function(t,e){P.disconnectBetween(t,e)},t.disconnectSender=function(t){P.disconnectSender(t)},t.disconnectReceiver=function(t){P.disconnectReceiver(t)},t.disconnectAll=function(t){P.disconnectAll(t)},t.clearData=function(t){P.disconnectAll(t)},t.getExceptionHandler=function(){return P.exceptionHandler},t.setExceptionHandler=function(t){var e=P.exceptionHandler;return P.exceptionHandler=t,e}}(A||(A={})),function(t){function e(t){var e=r.get(t);e&&0!==e.length&&(o(e,(function(t){if(t.signal){var e=t.thisArg||t.slot;t.signal=null,u(s.get(e))}})),u(e))}function i(t){var e=s.get(t);e&&0!==e.length&&(o(e,(function(t){if(t.signal){var e=t.signal.sender;t.signal=null,u(r.get(e))}})),u(e))}t.exceptionHandler=function(t){console.error(t)},t.connect=function(t,e,n){n=n||void 0;var i=r.get(t.sender);if(i||(i=[],r.set(t.sender,i)),c(i,t,e,n))return!1;var o=n||e,a=s.get(o);a||(a=[],s.set(o,a));var d={signal:t,slot:e,thisArg:n};return i.push(d),a.push(d),!0},t.disconnect=function(t,e,n){n=n||void 0;var i=r.get(t.sender);if(!i||0===i.length)return!1;var o=c(i,t,e,n);if(!o)return!1;var a=n||e,d=s.get(a);return o.signal=null,u(i),u(d),!0},t.disconnectBetween=function(t,e){var n=r.get(t);if(n&&0!==n.length){var i=s.get(e);i&&0!==i.length&&(o(i,(function(e){e.signal&&e.signal.sender===t&&(e.signal=null)})),u(n),u(i))}},t.disconnectSender=e,t.disconnectReceiver=i,t.disconnectAll=function(t){e(t),i(t)},t.emit=function(e,n){if(!(t.blockedProperty.get(e.sender)>0)){var i=r.get(e.sender);if(i&&0!==i.length)for(var o=0,s=i.length;o<s;++o){var a=i[o];a.signal===e&&h(a,n)}}};var r=new WeakMap,s=new WeakMap,a=new Set,d="function"==typeof requestAnimationFrame?requestAnimationFrame:setImmediate;function c(t,e,n,i){return l(t,(function(t){return t.signal===e&&t.slot===n&&t.thisArg===i}))}function h(e,n){var i=e.signal,o=e.slot,r=e.thisArg;try{o.call(r,i.sender,n)}catch(e){t.exceptionHandler(e)}}function u(t){0===a.size&&d(p),a.add(t)}function p(){a.forEach(f),a.clear()}function f(t){n.removeAllWhere(t,m)}function m(t){return null===t.signal}t.blockedProperty=new S({name:"blocked",create:function(){return 0}})}(P||(P={}));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@hpcc-js/common")):"function"==typeof define&&define.amd?define(["exports","@hpcc-js/common"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self)["@hpcc-js/phosphor"]={},t["@hpcc-js/common"])}(this,function(t,e){"use strict";var n;function i(t){return"function"==typeof t.iter?t.iter():new r(t)}function o(t,e){for(var n,o=0,r=i(t);void 0!==(n=r.next());)if(!1===e(n,o++))return}!function(t){function e(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=-1);var o,r=t.length;if(0===r)return-1;n=n<0?Math.max(0,n+r):Math.min(n,r-1),o=(i=i<0?Math.max(0,i+r):Math.min(i,r-1))<n?i+1+(r-n):i-n+1;for(var s=0;s<o;++s){var a=(n+s)%r;if(t[a]===e)return a}return-1}function n(t,e,n,i){void 0===n&&(n=-1),void 0===i&&(i=0);var o,r=t.length;if(0===r)return-1;o=(n=n<0?Math.max(0,n+r):Math.min(n,r-1))<(i=i<0?Math.max(0,i+r):Math.min(i,r-1))?n+1+(r-i):n-i+1;for(var s=0;s<o;++s){var a=(n-s+r)%r;if(t[a]===e)return a}return-1}function i(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=-1);var o,r=t.length;if(0===r)return-1;n=n<0?Math.max(0,n+r):Math.min(n,r-1),o=(i=i<0?Math.max(0,i+r):Math.min(i,r-1))<n?i+1+(r-n):i-n+1;for(var s=0;s<o;++s){var a=(n+s)%r;if(e(t[a],a))return a}return-1}function o(t,e,n,i){void 0===n&&(n=-1),void 0===i&&(i=0);var o,r=t.length;if(0===r)return-1;o=(n=n<0?Math.max(0,n+r):Math.min(n,r-1))<(i=i<0?Math.max(0,i+r):Math.min(i,r-1))?n+1+(r-i):n-i+1;for(var s=0;s<o;++s){var a=(n-s+r)%r;if(e(t[a],a))return a}return-1}function r(t,e,n){void 0===e&&(e=0),void 0===n&&(n=-1);var i=t.length;if(!(i<=1))for(e=e<0?Math.max(0,e+i):Math.min(e,i-1),n=n<0?Math.max(0,n+i):Math.min(n,i-1);e<n;){var o=t[e],r=t[n];t[e++]=r,t[n--]=o}}function s(t,e){var n=t.length;if(e<0&&(e+=n),!(e<0||e>=n)){for(var i=t[e],o=e+1;o<n;++o)t[o-1]=t[o];return t.length=n-1,i}}t.firstIndexOf=e,t.lastIndexOf=n,t.findFirstIndex=i,t.findLastIndex=o,t.findFirstValue=function(t,e,n,o){void 0===n&&(n=0),void 0===o&&(o=-1);var r=i(t,e,n,o);return-1!==r?t[r]:void 0},t.findLastValue=function(t,e,n,i){void 0===n&&(n=-1),void 0===i&&(i=0);var r=o(t,e,n,i);return-1!==r?t[r]:void 0},t.lowerBound=function(t,e,n,i,o){void 0===i&&(i=0),void 0===o&&(o=-1);var r=t.length;if(0===r)return 0;for(var s=i=i<0?Math.max(0,i+r):Math.min(i,r-1),a=(o=o<0?Math.max(0,o+r):Math.min(o,r-1))-i+1;a>0;){var d=a>>1,c=s+d;n(t[c],e)<0?(s=c+1,a-=d+1):a=d}return s},t.upperBound=function(t,e,n,i,o){void 0===i&&(i=0),void 0===o&&(o=-1);var r=t.length;if(0===r)return 0;for(var s=i=i<0?Math.max(0,i+r):Math.min(i,r-1),a=(o=o<0?Math.max(0,o+r):Math.min(o,r-1))-i+1;a>0;){var d=a>>1,c=s+d;n(t[c],e)>0?a=d:(s=c+1,a-=d+1)}return s},t.shallowEqual=function(t,e,n){if(t===e)return!0;if(t.length!==e.length)return!1;for(var i=0,o=t.length;i<o;++i)if(n?!n(t[i],e[i]):t[i]!==e[i])return!1;return!0},t.slice=function(t,e){void 0===e&&(e={});var n=e.start,i=e.stop,o=e.step;if(void 0===o&&(o=1),0===o)throw new Error("Slice `step` cannot be zero.");var r,s=t.length;void 0===n?n=o<0?s-1:0:n<0?n=Math.max(n+s,o<0?-1:0):n>=s&&(n=o<0?s-1:s),void 0===i?i=o<0?-1:s:i<0?i=Math.max(i+s,o<0?-1:0):i>=s&&(i=o<0?s-1:s),r=o<0&&i>=n||o>0&&n>=i?0:o<0?Math.floor((i-n+1)/o+1):Math.floor((i-n-1)/o+1);for(var a=[],d=0;d<r;++d)a[d]=t[n+d*o];return a},t.move=function(t,e,n){var i=t.length;if(!(i<=1)&&(e=e<0?Math.max(0,e+i):Math.min(e,i-1))!==(n=n<0?Math.max(0,n+i):Math.min(n,i-1))){for(var o=t[e],r=e<n?1:-1,s=e;s!==n;s+=r)t[s]=t[s+r];t[n]=o}},t.reverse=r,t.rotate=function(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=-1);var o=t.length;if(!(o<=1||(n=n<0?Math.max(0,n+o):Math.min(n,o-1))>=(i=i<0?Math.max(0,i+o):Math.min(i,o-1)))){var s=i-n+1;if(e>0?e%=s:e<0&&(e=(e%s+s)%s),0!==e){var a=n+e;r(t,n,a-1),r(t,a,i),r(t,n,i)}}},t.fill=function(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=-1);var o=t.length;if(0!==o){var r;n=n<0?Math.max(0,n+o):Math.min(n,o-1),r=(i=i<0?Math.max(0,i+o):Math.min(i,o-1))<n?i+1+(o-n):i-n+1;for(var s=0;s<r;++s)t[(n+s)%o]=e}},t.insert=function(t,e,n){var i=t.length;e=e<0?Math.max(0,e+i):Math.min(e,i);for(var o=i;o>e;--o)t[o]=t[o-1];t[e]=n},t.removeAt=s,t.removeFirstOf=function(t,n,i,o){void 0===i&&(i=0),void 0===o&&(o=-1);var r=e(t,n,i,o);return-1!==r&&s(t,r),r},t.removeLastOf=function(t,e,i,o){void 0===i&&(i=-1),void 0===o&&(o=0);var r=n(t,e,i,o);return-1!==r&&s(t,r),r},t.removeAllOf=function(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=-1);var o=t.length;if(0===o)return 0;n=n<0?Math.max(0,n+o):Math.min(n,o-1),i=i<0?Math.max(0,i+o):Math.min(i,o-1);for(var r=0,s=0;s<o;++s)n<=i&&s>=n&&s<=i&&t[s]===e||i<n&&(s<=i||s>=n)&&t[s]===e?r++:r>0&&(t[s-r]=t[s]);return r>0&&(t.length=o-r),r},t.removeFirstWhere=function(t,e,n,o){var r;void 0===n&&(n=0),void 0===o&&(o=-1);var a=i(t,e,n,o);return-1!==a&&(r=s(t,a)),{index:a,value:r}},t.removeLastWhere=function(t,e,n,i){var r;void 0===n&&(n=-1),void 0===i&&(i=0);var a=o(t,e,n,i);return-1!==a&&(r=s(t,a)),{index:a,value:r}},t.removeAllWhere=function(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=-1);var o=t.length;if(0===o)return 0;n=n<0?Math.max(0,n+o):Math.min(n,o-1),i=i<0?Math.max(0,i+o):Math.min(i,o-1);for(var r=0,s=0;s<o;++s)n<=i&&s>=n&&s<=i&&e(t[s],s)||i<n&&(s<=i||s>=n)&&e(t[s],s)?r++:r>0&&(t[s-r]=t[s]);return r>0&&(t.length=o-r),r}}(n||(n={}));var r=function(){function t(t){this._index=0,this._source=t}return t.prototype.iter=function(){return this},t.prototype.clone=function(){var e=new t(this._source);return e._index=this._index,e},t.prototype.next=function(){if(!(this._index>=this._source.length))return this._source[this._index++]},t}();function s(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new a(i(t.map(i)))}var a=function(){function t(t){this._cloned=!1,this._source=t,this._active=void 0}return t.prototype.iter=function(){return this},t.prototype.clone=function(){var e=new t(this._source.clone());return e._active=this._active&&this._active.clone(),e._cloned=!0,this._cloned=!0,e},t.prototype.next=function(){if(void 0===this._active){var t=this._source.next();if(void 0===t)return;this._active=this._cloned?t.clone():t}var e=this._active.next();return void 0!==e?e:(this._active=void 0,this.next())},t}();function d(){return new c}var c=function(){function t(){}return t.prototype.iter=function(){return this},t.prototype.clone=function(){return new t},t.prototype.next=function(){},t}();var h=function(){function t(t,e){this._index=0,this._source=t,this._fn=e}return t.prototype.iter=function(){return this},t.prototype.clone=function(){var e=new t(this._source.clone(),this._fn);return e._index=this._index,e},t.prototype.next=function(){for(var t,e=this._fn,n=this._source;void 0!==(t=n.next());)if(e(t,this._index++))return t},t}();function l(t,e){for(var n,o=0,r=i(t);void 0!==(n=r.next());)if(e(n,o++))return n}function u(t,e){return new f(i(t),e)}var p,f=function(){function t(t,e){this._index=0,this._source=t,this._fn=e}return t.prototype.iter=function(){return this},t.prototype.clone=function(){var e=new t(this._source.clone(),this._fn);return e._index=this._index,e},t.prototype.next=function(){var t=this._source.next();if(void 0!==t)return this._fn.call(void 0,t,this._index++)},t}();function m(t,e,n){var o=0,r=i(t),s=r.next();if(void 0===s)return n;var a,d,c=r.next();if(void 0===c)return e(n,s,o++);for(a=e(e(n,s,o++),c,o++);void 0!==(d=r.next());)a=e(a,d,o++);return a}function g(t){return new v(t,1)}!function(t){t.rangeLength=function(t,e,n){return 0===n?1/0:t>e&&n>0||t<e&&n<0?0:Math.ceil((e-t)/n)}}(p||(p={}));var v=function(){function t(t,e){this._value=t,this._count=e}return t.prototype.iter=function(){return this},t.prototype.clone=function(){return new t(this._value,this._count)},t.prototype.next=function(){if(!(this._count<=0))return this._count--,this._value},t}();var y,b,_=function(){function t(t){this._source=t,this._index=t.length-1}return t.prototype.iter=function(){return this},t.prototype.clone=function(){var e=new t(this._source);return e._index=this._index,e},t.prototype.next=function(){if(!(this._index<0||this._index>=this._source.length))return this._source[this._index--]},t}();!function(t){function e(t,e,n){void 0===n&&(n=0);for(var i=new Array(e.length),o=0,r=n,s=e.length;o<s;++o,++r){if(-1===(r=t.indexOf(e[o],r)))return null;i[o]=r}return i}t.findIndices=e,t.matchSumOfSquares=function(t,n,i){void 0===i&&(i=0);var o=e(t,n,i);if(!o)return null;for(var r=0,s=0,a=o.length;s<a;++s){var d=o[s]-i;r+=d*d}return{score:r,indices:o}},t.matchSumOfDeltas=function(t,n,i){void 0===i&&(i=0);var o=e(t,n,i);if(!o)return null;for(var r=0,s=i-1,a=0,d=o.length;a<d;++a){var c=o[a];r+=c-s-1,s=c}return{score:r,indices:o}},t.highlight=function(t,e,n){for(var i=[],o=0,r=0,s=e.length;o<s;){for(var a=e[o],d=e[o];++o<s&&e[o]===d+1;)d++;r<a&&i.push(t.slice(r,a)),a<d+1&&i.push(n(t.slice(a,d+1))),r=d+1}return r<t.length&&i.push(t.slice(r)),i},t.cmp=function(t,e){return t<e?-1:t>e?1:0}}(y||(y={})),function(t){function e(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t}function n(t){return Array.isArray(t)}function i(t,o){if(t===o)return!0;if(e(t)||e(o))return!1;var r=n(t),s=n(o);return r===s&&(r&&s?function(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(var n=0,o=t.length;n<o;++n)if(!i(t[n],e[n]))return!1;return!0}(t,o):function(t,e){if(t===e)return!0;for(var n in t)if(void 0!==t[n]&&!(n in e))return!1;for(var n in e)if(void 0!==e[n]&&!(n in t))return!1;for(var n in t){var o=t[n],r=e[n];if(void 0!==o||void 0!==r){if(void 0===o||void 0===r)return!1;if(!i(o,r))return!1}}return!0}(t,o))}function o(t){return e(t)?t:n(t)?function(t){for(var e=new Array(t.length),n=0,i=t.length;n<i;++n)e[n]=o(t[n]);return e}(t):function(t){var e={};for(var n in t){var i=t[n];void 0!==i&&(e[n]=o(i))}return e}(t)}t.emptyObject=Object.freeze({}),t.emptyArray=Object.freeze([]),t.isPrimitive=e,t.isArray=n,t.isObject=function(t){return!e(t)&&!n(t)},t.deepEqual=i,t.deepCopy=o}(b||(b={}));var w,x,M=function(){function t(){this._types=[],this._values=[]}return t.prototype.types=function(){return this._types.slice()},t.prototype.hasData=function(t){return-1!==this._types.indexOf(t)},t.prototype.getData=function(t){var e=this._types.indexOf(t);return-1!==e?this._values[e]:void 0},t.prototype.setData=function(t,e){this.clearData(t),this._types.push(t),this._values.push(e)},t.prototype.clearData=function(t){var e=this._types.indexOf(t);-1!==e&&(this._types.splice(e,1),this._values.splice(e,1))},t.prototype.clear=function(){this._types.length=0,this._values.length=0},t}();function C(t){for(var e=0,n=0,i=t.length;n<i;++n)n%4==0&&(e=4294967295*Math.random()>>>0),t[n]=255&e,e>>>=8}!function(t){var e;t.getRandomValues=(e="undefined"!=typeof window&&(window.crypto||window.msCrypto)||null)&&"function"==typeof e.getRandomValues?function(t){return e.getRandomValues(t)}:C}(w||(w={})),function(t){t.uuid4=function(t){for(var e=new Uint8Array(16),n=new Array(256),i=0;i<16;++i)n[i]="0"+i.toString(16);for(i=16;i<256;++i)n[i]=i.toString(16);return function(){return t(e),e[6]=64|15&e[6],e[8]=128|63&e[8],n[e[0]]+n[e[1]]+n[e[2]]+n[e[3]]+"-"+n[e[4]]+n[e[5]]+"-"+n[e[6]]+n[e[7]]+"-"+n[e[8]]+n[e[9]]+"-"+n[e[10]]+n[e[11]]+n[e[12]]+n[e[13]]+n[e[14]]+n[e[15]]}}(w.getRandomValues)}(x||(x={}));var z,S=function(){function t(t){this._pid=z.nextPID(),this.name=t.name,this._create=t.create,this._coerce=t.coerce||null,this._compare=t.compare||null,this._changed=t.changed||null}return t.prototype.get=function(t){var e=z.ensureMap(t);return this._pid in e?e[this._pid]:e[this._pid]=this._createValue(t)},t.prototype.set=function(t,e){var n,i=z.ensureMap(t);n=this._pid in i?i[this._pid]:i[this._pid]=this._createValue(t);var o=this._coerceValue(t,e);this._maybeNotify(t,n,i[this._pid]=o)},t.prototype.coerce=function(t){var e,n=z.ensureMap(t);e=this._pid in n?n[this._pid]:n[this._pid]=this._createValue(t);var i=this._coerceValue(t,e);this._maybeNotify(t,e,n[this._pid]=i)},t.prototype._createValue=function(t){return(0,this._create)(t)},t.prototype._coerceValue=function(t,e){var n=this._coerce;return n?n(t,e):e},t.prototype._compareValue=function(t,e){var n=this._compare;return n?n(t,e):t===e},t.prototype._maybeNotify=function(t,e,n){var i=this._changed;i&&!this._compareValue(e,n)&&i(t,e,n)},t}();!function(t){t.clearData=function(t){z.ownerData.delete(t)}}(S||(S={})),function(t){var e;t.ownerData=new WeakMap,t.nextPID=(e=0,function(){return"pid-"+(""+Math.random()).slice(2)+"-"+e++}),t.ensureMap=function(e){var n=t.ownerData.get(e);return n||(n=Object.create(null),t.ownerData.set(e,n),n)}}(z||(z={}));var P,A=function(){function t(t){this._blockedCount=0,this.sender=t}return t.prototype.block=function(t){this._blockedCount++;try{t()}finally{this._blockedCount--}},t.prototype.connect=function(t,e){return P.connect(this,t,e)},t.prototype.disconnect=function(t,e){return P.disconnect(this,t,e)},t.prototype.emit=function(t){this._blockedCount||P.emit(this,t)},t}();!function(t){t.blockAll=function(t,e){var n=P.blockedProperty;n.set(t,n.get(t)+1);try{e()}finally{n.set(t,n.get(t)-1)}},t.disconnectBetween=function(t,e){P.disconnectBetween(t,e)},t.disconnectSender=function(t){P.disconnectSender(t)},t.disconnectReceiver=function(t){P.disconnectReceiver(t)},t.disconnectAll=function(t){P.disconnectAll(t)},t.clearData=function(t){P.disconnectAll(t)},t.getExceptionHandler=function(){return P.exceptionHandler},t.setExceptionHandler=function(t){var e=P.exceptionHandler;return P.exceptionHandler=t,e}}(A||(A={})),function(t){function e(t){var e=r.get(t);e&&0!==e.length&&(o(e,function(t){if(t.signal){var e=t.thisArg||t.slot;t.signal=null,u(s.get(e))}}),u(e))}function i(t){var e=s.get(t);e&&0!==e.length&&(o(e,function(t){if(t.signal){var e=t.signal.sender;t.signal=null,u(r.get(e))}}),u(e))}t.exceptionHandler=function(t){console.error(t)},t.connect=function(t,e,n){n=n||void 0;var i=r.get(t.sender);if(i||(i=[],r.set(t.sender,i)),c(i,t,e,n))return!1;var o=n||e,a=s.get(o);a||(a=[],s.set(o,a));var d={signal:t,slot:e,thisArg:n};return i.push(d),a.push(d),!0},t.disconnect=function(t,e,n){n=n||void 0;var i=r.get(t.sender);if(!i||0===i.length)return!1;var o=c(i,t,e,n);if(!o)return!1;var a=n||e,d=s.get(a);return o.signal=null,u(i),u(d),!0},t.disconnectBetween=function(t,e){var n=r.get(t);if(n&&0!==n.length){var i=s.get(e);i&&0!==i.length&&(o(i,function(e){e.signal&&e.signal.sender===t&&(e.signal=null)}),u(n),u(i))}},t.disconnectSender=e,t.disconnectReceiver=i,t.disconnectAll=function(t){e(t),i(t)},t.emit=function(e,n){if(!(t.blockedProperty.get(e.sender)>0)){var i=r.get(e.sender);if(i&&0!==i.length)for(var o=0,s=i.length;o<s;++o){var a=i[o];a.signal===e&&h(a,n)}}};var r=new WeakMap,s=new WeakMap,a=new Set,d="function"==typeof requestAnimationFrame?requestAnimationFrame:setImmediate;function c(t,e,n,i){return l(t,function(t){return t.signal===e&&t.slot===n&&t.thisArg===i})}function h(e,n){var i=e.signal,o=e.slot,r=e.thisArg;try{o.call(r,i.sender,n)}catch(e){t.exceptionHandler(e)}}function u(t){0===a.size&&d(p),a.add(t)}function p(){a.forEach(f),a.clear()}function f(t){n.removeAllWhere(t,m)}function m(t){return null===t.signal}t.blockedProperty=new S({name:"blocked",create:function(){return 0}})}(P||(P={}));
|
|
2
2
|
/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation.
|
|
4
4
|
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
14
|
PERFORMANCE OF THIS SOFTWARE.
|
|
15
15
|
***************************************************************************** */
|
|
16
|
-
var I=function(t,e){return I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},I(t,e)};function T(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}I(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var L=function(){function t(t){this._fn=t}return Object.defineProperty(t.prototype,"isDisposed",{get:function(){return!this._fn},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){if(this._fn){var t=this._fn;this._fn=null,t()}},t}();!function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._disposed=new A(e),e}T(e,t),Object.defineProperty(e.prototype,"disposed",{get:function(){return this._disposed},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.isDisposed||(t.prototype.dispose.call(this),this._disposed.emit(void 0),A.clearData(this))}}(L);var E=function(){function t(){this._isDisposed=!1,this._items=new Set}return Object.defineProperty(t.prototype,"isDisposed",{get:function(){return this._isDisposed},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this._isDisposed||(this._isDisposed=!0,this._items.forEach(
|
|
16
|
+
var I=function(t,e){return I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},I(t,e)};function T(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}I(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var L=function(){function t(t){this._fn=t}return Object.defineProperty(t.prototype,"isDisposed",{get:function(){return!this._fn},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){if(this._fn){var t=this._fn;this._fn=null,t()}},t}();!function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._disposed=new A(e),e}T(e,t),Object.defineProperty(e.prototype,"disposed",{get:function(){return this._disposed},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.isDisposed||(t.prototype.dispose.call(this),this._disposed.emit(void 0),A.clearData(this))}}(L);var E=function(){function t(){this._isDisposed=!1,this._items=new Set}return Object.defineProperty(t.prototype,"isDisposed",{get:function(){return this._isDisposed},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this._isDisposed||(this._isDisposed=!0,this._items.forEach(function(t){t.dispose()}),this._items.clear())},t.prototype.contains=function(t){return this._items.has(t)},t.prototype.add=function(t){this._items.add(t)},t.prototype.remove=function(t){this._items.delete(t)},t.prototype.clear=function(){this._items.clear()},t}();!function(t){t.from=function(e){var n=new t;return o(e,function(t){n.add(t)}),n}}(E||(E={}));var k,B,D,O,R,N=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._disposed=new A(e),e}return T(e,t),Object.defineProperty(e.prototype,"disposed",{get:function(){return this._disposed},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.isDisposed||(t.prototype.dispose.call(this),this._disposed.emit(void 0),A.clearData(this))},e}(E);function j(){return H.keyboardLayout}!function(t){t.from=function(e){var n=new t;return o(e,function(t){n.add(t)}),n}}(N||(N={})),function(t){t.copyText=function(t){var e=document.body,n=function(i){i.preventDefault(),i.stopPropagation(),i.clipboardData.setData("text",t),e.removeEventListener("copy",n,!0)};e.addEventListener("copy",n,!0),document.execCommand("copy")}}(k||(k={})),function(t){t.boxSizing=function(t){var e=window.getComputedStyle(t),n=parseFloat(e.borderTopWidth)||0,i=parseFloat(e.borderLeftWidth)||0,o=parseFloat(e.borderRightWidth)||0,r=parseFloat(e.borderBottomWidth)||0,s=parseFloat(e.paddingTop)||0,a=parseFloat(e.paddingLeft)||0,d=parseFloat(e.paddingRight)||0,c=parseFloat(e.paddingBottom)||0;return{borderTop:n,borderLeft:i,borderRight:o,borderBottom:r,paddingTop:s,paddingLeft:a,paddingRight:d,paddingBottom:c,horizontalSum:i+a+d+o,verticalSum:n+s+c+r}},t.sizeLimits=function(t){var e=window.getComputedStyle(t),n=parseFloat(e.minWidth)||0,i=parseFloat(e.minHeight)||0,o=parseFloat(e.maxWidth)||1/0,r=parseFloat(e.maxHeight)||1/0;return{minWidth:n,minHeight:i,maxWidth:o=Math.max(n,o),maxHeight:r=Math.max(i,r)}},t.hitTest=function(t,e,n){var i=t.getBoundingClientRect();return e>=i.left&&e<i.right&&n>=i.top&&n<i.bottom},t.scrollIntoViewIfNeeded=function(t,e){var n=t.getBoundingClientRect(),i=e.getBoundingClientRect();i.top<=n.top&&i.bottom>=n.bottom||(i.top<n.top&&i.height<=n.height||i.bottom>n.bottom&&i.height>=n.height?t.scrollTop-=n.top-i.top:(i.top<n.top&&i.height>n.height||i.bottom>n.bottom&&i.height<n.height)&&(t.scrollTop-=n.bottom-i.bottom))}}(B||(B={})),function(t){t.IS_MAC=!!navigator.platform.match(/Mac/i),t.IS_WIN=!!navigator.platform.match(/Win/i),t.IS_IE=/Trident/.test(navigator.userAgent),t.IS_EDGE=/Edge/.test(navigator.userAgent),t.accelKey=function(e){return t.IS_MAC?e.metaKey:e.ctrlKey}}(D||(D={})),function(t){t.calculateSpecificity=function(t){if(t in R.specificityCache)return R.specificityCache[t];var e=R.calculateSingle(t);return R.specificityCache[t]=e},t.isValid=function(t){if(t in R.validityCache)return R.validityCache[t];var e=!0;try{R.testElem.querySelector(t)}catch(t){e=!1}return R.validityCache[t]=e},t.matches=function(t,e){return R.protoMatchFunc.call(t,e)}}(O||(O={})),function(t){var e;t.specificityCache=Object.create(null),t.validityCache=Object.create(null),t.testElem=document.createElement("div"),t.protoMatchFunc=(e=Element.prototype).matches||e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector||function(t){var e=this,n=e.ownerDocument?e.ownerDocument.querySelectorAll(t):[];return-1!==Array.prototype.indexOf.call(n,e)},t.calculateSingle=function(t){var e=0,h=0,l=0;function u(e){var n=t.match(e);return null!==n&&(t=t.slice(n[0].length),!0)}for(t=(t=t.split(",",1)[0]).replace(c," $1 ");t.length>0;)if(u(n))e++;else if(u(i))h++;else if(u(o))h++;else if(u(s))l++;else if(u(a))h++;else if(u(r))l++;else if(!u(d))return 0;return(e=Math.min(e,255))<<16|(h=Math.min(h,255))<<8|(l=Math.min(l,255))};var n=/^#[^\s\+>~#\.\[:]+/,i=/^\.[^\s\+>~#\.\[:]+/,o=/^\[[^\]]+\]/,r=/^[^\s\+>~#\.\[:]+/,s=/^(::[^\s\+>~#\.\[:]+|:first-line|:first-letter|:before|:after)/,a=/^:[^\s\+>~#\.\[:]+/,d=/^[\s\+>~\*]+/,c=/:not\(([^\)]+)\)/g}(R||(R={}));var W=function(){function t(e,n,i){void 0===i&&(i=[]),this.name=e,this._codes=n,this._keys=t.extractKeys(n),this._modifierKeys=t.convertToKeySet(i)}return t.prototype.keys=function(){return Object.keys(this._keys)},t.prototype.isValidKey=function(t){return t in this._keys},t.prototype.isModifierKey=function(t){return t in this._modifierKeys},t.prototype.keyForKeydownEvent=function(t){return this._codes[t.keyCode]||""},t}();!function(t){t.extractKeys=function(t){var e=Object.create(null);for(var n in t)e[t[n]]=!0;return e},t.convertToKeySet=function(t){for(var e=Object(null),n=0,i=t.length;n<i;++n)e[t[n]]=!0;return e}}(W||(W={}));var H,F=new W("en-us",{8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",27:"Escape",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"A",66:"B",67:"C",68:"D",69:"E",70:"F",71:"G",72:"H",73:"I",74:"J",75:"K",76:"L",77:"M",78:"N",79:"O",80:"P",81:"Q",82:"R",83:"S",84:"T",85:"U",86:"V",87:"W",88:"X",89:"Y",90:"Z",91:"Meta",93:"ContextMenu",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Meta"},["Shift","Ctrl","Alt","Meta"]);!function(t){t.keyboardLayout=F}(H||(H={}));
|
|
17
17
|
/*! *****************************************************************************
|
|
18
18
|
Copyright (c) Microsoft Corporation.
|
|
19
19
|
|
|
@@ -28,7 +28,7 @@ var I=function(t,e){return I=Object.setPrototypeOf||{__proto__:[]}instanceof Arr
|
|
|
28
28
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
29
29
|
PERFORMANCE OF THIS SOFTWARE.
|
|
30
30
|
***************************************************************************** */
|
|
31
|
-
var q,K=function(){return K=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},K.apply(this,arguments)};t.CommandRegistry=function(){function t(){this._timerID=0,this._replaying=!1,this._keystrokes=[],this._keydownEvents=[],this._keyBindings=[],this._exactKeyMatch=null,this._commands=Object.create(null),this._commandChanged=new A(this),this._commandExecuted=new A(this),this._keyBindingChanged=new A(this)}return Object.defineProperty(t.prototype,"commandChanged",{get:function(){return this._commandChanged},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"commandExecuted",{get:function(){return this._commandExecuted},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"keyBindingChanged",{get:function(){return this._keyBindingChanged},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"keyBindings",{get:function(){return this._keyBindings},enumerable:!0,configurable:!0}),t.prototype.listCommands=function(){return Object.keys(this._commands)},t.prototype.hasCommand=function(t){return t in this._commands},t.prototype.addCommand=function(t,e){var n=this;if(t in this._commands)throw new Error("Command '"+t+"' already registered.");return this._commands[t]=q.createCommand(e),this._commandChanged.emit({id:t,type:"added"}),new L((function(){delete n._commands[t],n._commandChanged.emit({id:t,type:"removed"})}))},t.prototype.notifyCommandChanged=function(t){if(void 0!==t&&!(t in this._commands))throw new Error("Command '"+t+"' is not registered.");this._commandChanged.emit({id:t,type:t?"changed":"many-changed"})},t.prototype.describedBy=function(t){var e=this._commands[t];return e&&e.describedBy||{args:null}},t.prototype.label=function(t,e){void 0===e&&(e=b.emptyObject);var n=this._commands[t];return n?n.label.call(void 0,e):""},t.prototype.mnemonic=function(t,e){void 0===e&&(e=b.emptyObject);var n=this._commands[t];return n?n.mnemonic.call(void 0,e):-1},t.prototype.icon=function(t,e){void 0===e&&(e=b.emptyObject);var n=this._commands[t];return n?n.icon.call(void 0,e):""},t.prototype.iconClass=function(t,e){void 0===e&&(e=b.emptyObject);var n=this._commands[t];return n?n.iconClass.call(void 0,e):""},t.prototype.iconLabel=function(t,e){void 0===e&&(e=b.emptyObject);var n=this._commands[t];return n?n.iconLabel.call(void 0,e):""},t.prototype.caption=function(t,e){void 0===e&&(e=b.emptyObject);var n=this._commands[t];return n?n.caption.call(void 0,e):""},t.prototype.usage=function(t,e){void 0===e&&(e=b.emptyObject);var n=this._commands[t];return n?n.usage.call(void 0,e):""},t.prototype.className=function(t,e){void 0===e&&(e=b.emptyObject);var n=this._commands[t];return n?n.className.call(void 0,e):""},t.prototype.dataset=function(t,e){void 0===e&&(e=b.emptyObject);var n=this._commands[t];return n?n.dataset.call(void 0,e):{}},t.prototype.isEnabled=function(t,e){void 0===e&&(e=b.emptyObject);var n=this._commands[t];return!!n&&n.isEnabled.call(void 0,e)},t.prototype.isToggled=function(t,e){void 0===e&&(e=b.emptyObject);var n=this._commands[t];return!!n&&n.isToggled.call(void 0,e)},t.prototype.isToggleable=function(t,e){var n=this._commands[t];return!!n&&n.isToggleable},t.prototype.isVisible=function(t,e){void 0===e&&(e=b.emptyObject);var n=this._commands[t];return!!n&&n.isVisible.call(void 0,e)},t.prototype.execute=function(t,e){void 0===e&&(e=b.emptyObject);var n,i=this._commands[t];if(!i)return Promise.reject(new Error("Command '"+t+"' not registered."));try{n=i.execute.call(void 0,e)}catch(t){n=Promise.reject(t)}var o=Promise.resolve(n);return this._commandExecuted.emit({id:t,args:e,result:o}),o},t.prototype.addKeyBinding=function(t){var e=this,i=q.createKeyBinding(t);return this._keyBindings.push(i),this._keyBindingChanged.emit({binding:i,type:"added"}),new L((function(){n.removeFirstOf(e._keyBindings,i),e._keyBindingChanged.emit({binding:i,type:"removed"})}))},t.prototype.processKeydownEvent=function(e){if(!this._replaying&&!t.isModifierKeyPressed(e)){var n=t.keystrokeForKeydownEvent(e);if(!n)return this._replayKeydownEvents(),void this._clearPendingState();this._keystrokes.push(n);var i=q.matchKeyBinding(this._keyBindings,this._keystrokes,e),o=i.exact,r=i.partial;if(!o&&!r)return this._replayKeydownEvents(),void this._clearPendingState();if(e.preventDefault(),e.stopPropagation(),o&&!r)return this._executeKeyBinding(o),void this._clearPendingState();o&&(this._exactKeyMatch=o),this._keydownEvents.push(e),this._startTimer()}},t.prototype._startTimer=function(){var t=this;this._clearTimer(),this._timerID=window.setTimeout((function(){t._onPendingTimeout()}),q.CHORD_TIMEOUT)},t.prototype._clearTimer=function(){0!==this._timerID&&(clearTimeout(this._timerID),this._timerID=0)},t.prototype._replayKeydownEvents=function(){0!==this._keydownEvents.length&&(this._replaying=!0,this._keydownEvents.forEach(q.replayKeyEvent),this._replaying=!1)},t.prototype._executeKeyBinding=function(t){var e=t.command,n=t.args;if(this.hasCommand(e)&&this.isEnabled(e,n))this.execute(e,n);else{var i=this.hasCommand(e)?"enabled":"registered",o="Cannot execute key binding '"+t.keys.join(", ")+"':",r="command '"+e+"' is not "+i+".";console.warn(o+" "+r)}},t.prototype._clearPendingState=function(){this._clearTimer(),this._exactKeyMatch=null,this._keystrokes.length=0,this._keydownEvents.length=0},t.prototype._onPendingTimeout=function(){this._timerID=0,this._exactKeyMatch?this._executeKeyBinding(this._exactKeyMatch):this._replayKeydownEvents(),this._clearPendingState()},t}(),function(t){function e(t){for(var e="",n=!1,i=!1,o=!1,r=!1,s=0,a=t.split(/\s+/);s<a.length;s++){var d=a[s];"Accel"===d?D.IS_MAC?i=!0:o=!0:"Alt"===d?n=!0:"Cmd"===d?i=!0:"Ctrl"===d?o=!0:"Shift"===d?r=!0:d.length>0&&(e=d)}return{cmd:i,ctrl:o,alt:n,shift:r,key:e}}function n(t){var n="",i=e(t);return i.ctrl&&(n+="Ctrl "),i.alt&&(n+="Alt "),i.shift&&(n+="Shift "),i.cmd&&D.IS_MAC&&(n+="Cmd "),n+i.key}t.parseKeystroke=e,t.normalizeKeystroke=n,t.normalizeKeys=function(t){return(D.IS_WIN?t.winKeys||t.keys:D.IS_MAC?t.macKeys||t.keys:t.linuxKeys||t.keys).map(n)},t.formatKeystroke=function(t){return"string"==typeof t?n(t):t.map(n).join(", ");function n(t){var n=[],i=D.IS_MAC?" ":"+",o=e(t);return o.ctrl&&n.push("Ctrl"),o.alt&&n.push("Alt"),o.shift&&n.push("Shift"),D.IS_MAC&&o.cmd&&n.push("Cmd"),n.push(o.key),n.map(q.formatKey).join(i)}},t.isModifierKeyPressed=function(t){var e=j(),n=e.keyForKeydownEvent(t);return e.isModifierKey(n)},t.keystrokeForKeydownEvent=function(t){var e=j(),n=e.keyForKeydownEvent(t);if(!n||e.isModifierKey(n))return"";var i=[];return t.ctrlKey&&i.push("Ctrl"),t.altKey&&i.push("Alt"),t.shiftKey&&i.push("Shift"),t.metaKey&&D.IS_MAC&&i.push("Cmd"),i.push(n),i.join(" ")}}(t.CommandRegistry||(t.CommandRegistry={})),function(e){e.CHORD_TIMEOUT=1e3,e.createCommand=function(t){var e,n;return t.icon&&"string"!=typeof t.icon?(n=h(t.iconClass,o),e=h(t.icon,c)):e=n=h(t.iconClass||t.icon,o),{execute:t.execute,describedBy:K({args:null},t.describedBy),label:h(t.label,o),mnemonic:h(t.mnemonic,r),icon:e,iconClass:n,iconLabel:h(t.iconLabel,o),caption:h(t.caption,o),usage:h(t.usage,o),className:h(t.className,o),dataset:h(t.dataset,d),isEnabled:t.isEnabled||s,isToggled:t.isToggled||a,isToggleable:t.isToggleable||!!t.isToggled,isVisible:t.isVisible||s}},e.createKeyBinding=function(e){return{keys:t.CommandRegistry.normalizeKeys(e),selector:l(e),command:e.command,args:e.args||b.emptyObject}},e.matchKeyBinding=function(t,e,n){for(var i=null,o=!1,r=1/0,s=0,a=0,d=t.length;a<d;++a){var c=t[a],h=u(c.keys,e);if(0!==h)if(2!==h){var l=p(c.selector,n);if(!(-1===l||l>r)){var f=O.calculateSpecificity(c.selector);(!i||l<r||f>=s)&&(i=c,r=l,s=f)}}else o||-1===p(c.selector,n)||(o=!0)}return{exact:i,partial:o}},e.replayKeyEvent=function(t){t.target.dispatchEvent(function(t){var e=document.createEvent("Event"),n=t.bubbles||!0,i=t.cancelable||!0;return e.initEvent(t.type||"keydown",n,i),e.key=t.key||"",e.keyCode=t.keyCode||0,e.which=t.keyCode||0,e.ctrlKey=t.ctrlKey||!1,e.altKey=t.altKey||!1,e.shiftKey=t.shiftKey||!1,e.metaKey=t.metaKey||!1,e.view=t.view||window,e}(t))},e.formatKey=function(t){return D.IS_MAC?n.hasOwnProperty(t)?n[t]:t:i.hasOwnProperty(t)?i[t]:t};var n={Backspace:"⌫",Tab:"⇥",Enter:"↩",Shift:"⇧",Ctrl:"⌃",Alt:"⌥",Escape:"⎋",PageUp:"⇞",PageDown:"⇟",End:"↘",Home:"↖",ArrowLeft:"←",ArrowUp:"↑",ArrowRight:"→",ArrowDown:"↓",Delete:"⌦",Cmd:"⌘"},i={Escape:"Esc",PageUp:"Page Up",PageDown:"Page Down",ArrowLeft:"Left",ArrowUp:"Up",ArrowRight:"Right",ArrowDown:"Down",Delete:"Del"},o=function(){return""},r=function(){return-1},s=function(){return!0},a=function(){return!1},d=function(){return{}},c=function(){};function h(t,e){return void 0===t?e:"function"==typeof t?t:function(){return t}}function l(t){if(-1!==t.selector.indexOf(","))throw new Error("Selector cannot contain commas: "+t.selector);if(!O.isValid(t.selector))throw new Error("Invalid selector: "+t.selector);return t.selector}function u(t,e){if(t.length<e.length)return 0;for(var n=0,i=e.length;n<i;++n)if(t[n]!==e[n])return 0;return t.length>e.length?2:1}function p(t,e){for(var n=e.target,i=e.currentTarget,o=0;null!==n;n=n.parentElement,++o){if(n.hasAttribute("data-lm-suppress-shortcuts"))return-1;if(n.hasAttribute("data-p-suppress-shortcuts"))return-1;if(O.matches(n,t))return o;if(n===i)return-1}return-1}}(q||(q={}));var V,U=function(){function t(t){this._root=new V.LeafNode,this.cmp=t}return Object.defineProperty(t.prototype,"isEmpty",{get:function(){return 0===this._root.size},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this._root.size},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"first",{get:function(){var t=V.firstLeaf(this._root);return t.size>0?t.items[0]:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"last",{get:function(){var t=V.lastLeaf(this._root);return t.size>0?t.items[t.size-1]:void 0},enumerable:!0,configurable:!0}),t.prototype.iter=function(){return V.iterItems(this._root)},t.prototype.retro=function(){return V.retroItems(this._root)},t.prototype.slice=function(t,e){return V.sliceItems(this._root,t,e)},t.prototype.retroSlice=function(t,e){return V.retroSliceItems(this._root,t,e)},t.prototype.at=function(t){return V.itemAt(this._root,t)},t.prototype.has=function(t,e){return V.hasItem(this._root,t,e)},t.prototype.indexOf=function(t,e){return V.indexOf(this._root,t,e)},t.prototype.get=function(t,e){return V.getItem(this._root,t,e)},t.prototype.assign=function(t){this.clear(),this.update(t)},t.prototype.insert=function(t){var e=V.insertItem(this._root,t,this.cmp);return this._root=V.maybeSplitRoot(this._root),e},t.prototype.update=function(t){var e=this;o(t,(function(t){e.insert(t)}))},t.prototype.delete=function(t,e){var n=V.deleteItem(this._root,t,e);return this._root=V.maybeExtractRoot(this._root),n},t.prototype.remove=function(t){var e=V.removeItem(this._root,t);return this._root=V.maybeExtractRoot(this._root),e},t.prototype.clear=function(){V.clear(this._root),this._root=new V.LeafNode},t}();!function(t){t.from=function(e,n){var i=new t(n);return i.assign(e),i}}(U||(U={})),function(t){var e=function(){function t(){this.items=[],this.sizes=[],this.children=[]}return Object.defineProperty(t.prototype,"type",{get:function(){return 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this.sizes[this.sizes.length-1]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.children.length},enumerable:!0,configurable:!0}),t}();t.BranchNode=e;var i=function(){function t(){this.next=null,this.prev=null,this.items=[]}return Object.defineProperty(t.prototype,"type",{get:function(){return 1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this.items.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.items.length},enumerable:!0,configurable:!0}),t}();function r(t){for(;0===t.type;)t=t.children[0];return t}function s(t){for(;0===t.type;)t=t.children[t.children.length-1];return t}function a(t){0===t.type?(o(t.children,a),t.children.length=0,t.sizes.length=0,t.items.length=0):(t.items.length=0,t.next=null,t.prev=null)}t.LeafNode=i,t.firstLeaf=r,t.lastLeaf=s,t.iterItems=function(t){var e=r(t);return new l(e,0,-1)},t.retroItems=function(t){var e=s(t);return new u(e,e.size-1,-1)},t.sliceItems=function(t,e,n){e=void 0===e?0:e<0?Math.max(0,e+t.size):Math.min(e,t.size),n=void 0===n?t.size:n<0?Math.max(0,n+t.size):Math.min(n,t.size);var i=Math.max(0,n-e);if(0===i)return d();for(;0===t.type;){var o=p(t.sizes,e);o>0&&(e-=t.sizes[o-1]),t=t.children[o]}return new l(t,e,i)},t.retroSliceItems=function(t,e,n){e=void 0===e?t.size-1:e<0?Math.max(-1,e+t.size):Math.min(e,t.size-1),n=void 0===n?-1:n<0?Math.max(-1,n+t.size):Math.min(n,t.size-1);var i=Math.max(0,e-n);if(0===i)return d();for(;0===t.type;){var o=p(t.sizes,e);o>0&&(e-=t.sizes[o-1]),t=t.children[o]}return new u(t,e,i)},t.itemAt=function(t,e){if(e<0&&(e+=t.size),!(e<0||e>=t.size)){for(;0===t.type;){var n=p(t.sizes,e);n>0&&(e-=t.sizes[n-1]),t=t.children[n]}return t.items[e]}},t.hasItem=function(t,e,n){for(;0===t.type;){var i=f(t.items,e,n);t=t.children[i]}return m(t.items,e,n)>=0},t.indexOf=function(t,e,n){for(var i=0;0===t.type;){var o=f(t.items,e,n);o>0&&(i+=t.sizes[o-1]),t=t.children[o]}var r=m(t.items,e,n);return r>=0?i+r:-i+r},t.getItem=function(t,e,n){for(;0===t.type;){var i=f(t.items,e,n);t=t.children[i]}var o=m(t.items,e,n);return o>=0?t.items[o]:void 0},t.insertItem=function t(e,i,o){if(1===e.type){var r,s=m(e.items,i,o);return s>=0?(r=e.items[s],e.items[s]=i):(r=void 0,n.insert(e.items,-s-1,i)),r}var a=f(e.items,i,o),d=e.children[a],h=d.size,l=t(d,i,o),u=d.size;if(e.items[a]=d.items[0],h===u)return l;if(d.width>c){var p=v(d);n.insert(e.children,a+1,p),n.insert(e.items,a+1,p.items[0])}return g(e,a),l},t.deleteItem=function t(e,i,o){if(1===e.type){var r=m(e.items,i,o);if(r<0)return;return n.removeAt(e.items,r)}var s=f(e.items,i,o),a=e.children[s],d=a.size,c=t(a,i,o);return d===a.size||(e.items[s]=a.items[0],a.width<h&&(s=y(e,s)),g(e,s)),c},t.removeItem=function t(e,i){if(i<0&&(i+=e.size),!(i<0||i>=e.size)){if(1===e.type)return n.removeAt(e.items,i);var o=p(e.sizes,i);o>0&&(i-=e.sizes[o]);var r=e.children[o],s=t(r,i);return e.items[o]=r.items[0],r.width<h&&(o=y(e,o)),g(e,o),s}},t.clear=a,t.maybeSplitRoot=function(t){if(t.width<=c)return t;var n=new e,i=v(t);return n.sizes[0]=t.size,n.sizes[1]=t.size+i.size,n.children[0]=t,n.children[1]=i,n.items[0]=t.items[0],n.items[1]=i.items[0],n},t.maybeExtractRoot=function(t){if(1===t.type)return t;if(t.children.length>1)return t;var e=t.children.pop();return a(t),e};var c=32,h=c>>1,l=function(){function t(t,e,n){this._node=t,this._index=e,this._count=n}return t.prototype.iter=function(){return this},t.prototype.clone=function(){return new t(this._node,this._index,this._count)},t.prototype.next=function(){if(null!==this._node&&0!==this._count)return this._index>=this._node.size?(this._node=this._node.next,this._index=0,this.next()):(this._count>0&&this._count--,this._node.items[this._index++])},t}(),u=function(){function t(t,e,n){this._node=t,this._index=e,this._count=n}return t.prototype.iter=function(){return this},t.prototype.clone=function(){return new t(this._node,this._index,this._count)},t.prototype.next=function(){if(null!==this._node&&0!==this._count)return this._index>=this._node.size&&(this._index=this._node.size-1),this._index<0?(this._node=this._node.prev,this._index=this._node?this._node.size-1:-1,this.next()):(this._count>0&&this._count--,this._node.items[this._index--])},t}();function p(t,e){for(var n=t.length,i=0;i<n;++i)if(t[i]>e)return i;return n-1}function f(t,e,n){for(var i=t.length,o=1;o<i;++o)if(n(t[o],e)>0)return o-1;return i-1}function m(t,e,n){for(var i=t.length,o=0;o<i;++o){var r=n(t[o],e);if(0===r)return o;if(r>0)return-o-1}return-i-1}function g(t,e){for(var n=t.sizes,i=t.children,o=e>0?n[e-1]:0,r=i.length;e<r;++e)o=n[e]=o+i[e].size;n.length=i.length}function v(t){if(1===t.type){for(var n=new i,o=t.items,r=n.items,s=h,a=o.length;s<a;++s)r.push(o[s]);return o.length=h,t.next&&(t.next.prev=n),n.next=t.next,n.prev=t,t.next=n,n}var d=new e,c=t.children,l=d.children;for(s=h,a=c.length;s<a;++s)l.push(c[s]);c.length=h;var u=t.items,p=d.items;for(s=h,a=u.length;s<a;++s)p.push(u[s]);return u.length=h,g(t,h),g(d,0),d}function y(t,e){var i,o,r,s,d,c,l=t.children[e],u=0===e?t.children[e+1]:t.children[e-1],p=0===e,f=1===l.type,m=u.width>h;if(f&&m&&p){var v=u;return(y=l).items.push(v.items.shift()),t.items[e+1]=v.items[0],e}if(f&&m&&!p){v=u;return(y=l).items.unshift(v.items.pop()),t.items[e]=y.items[0],e-1}if(f&&!m&&p){var y=l;return(i=(v=u).items).unshift.apply(i,y.items),n.removeAt(t.children,e),n.removeAt(t.items,e+1),y.prev&&(y.prev.next=v),v.prev=y.prev,a(y),e}if(f&&!m&&!p){y=l;return(o=(v=u).items).push.apply(o,y.items),n.removeAt(t.children,e),n.removeAt(t.items,e),y.next&&(y.next.prev=v),v.next=y.next,a(y),e-1}if(!f&&m&&p){v=u;return(y=l).children.push(v.children.shift()),y.items.push(v.items.shift()),t.items[e+1]=v.items[0],g(y,y.width-1),g(v,0),e}if(!f&&m&&!p){v=u;return(y=l).children.unshift(v.children.pop()),y.items.unshift(v.items.pop()),t.items[e]=y.items[0],g(y,0),g(v,v.width-1),e-1}if(!f&&!m&&p){y=l;return(r=(v=u).children).unshift.apply(r,y.children),(s=v.items).unshift.apply(s,y.items),n.removeAt(t.children,e),n.removeAt(t.items,e+1),g(v,0),y.children.length=0,a(y),e}if(!f&&!m&&!p){y=l;return(d=(v=u).children).push.apply(d,y.children),(c=v.items).push.apply(c,y.items),n.removeAt(t.children,e),n.removeAt(t.items,e),g(v,0),y.children.length=0,a(y),e-1}throw"unreachable"}}(V||(V={}));var Y,X=function(){function t(){this._first=null,this._last=null,this._size=0}return Object.defineProperty(t.prototype,"isEmpty",{get:function(){return 0===this._size},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"first",{get:function(){return this._first?this._first.value:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"last",{get:function(){return this._last?this._last.value:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"firstNode",{get:function(){return this._first},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lastNode",{get:function(){return this._last},enumerable:!0,configurable:!0}),t.prototype.iter=function(){return new t.ForwardValueIterator(this._first)},t.prototype.retro=function(){return new t.RetroValueIterator(this._last)},t.prototype.nodes=function(){return new t.ForwardNodeIterator(this._first)},t.prototype.retroNodes=function(){return new t.RetroNodeIterator(this._last)},t.prototype.assign=function(t){var e=this;this.clear(),o(t,(function(t){e.addLast(t)}))},t.prototype.push=function(t){this.addLast(t)},t.prototype.pop=function(){return this.removeLast()},t.prototype.shift=function(t){this.addFirst(t)},t.prototype.unshift=function(){return this.removeFirst()},t.prototype.addFirst=function(t){var e=new Y.LinkedListNode(this,t);return this._first?(e.next=this._first,this._first.prev=e,this._first=e):(this._first=e,this._last=e),this._size++,e},t.prototype.addLast=function(t){var e=new Y.LinkedListNode(this,t);return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._first=e,this._last=e),this._size++,e},t.prototype.insertBefore=function(t,e){if(!e||e===this._first)return this.addFirst(t);if(!(e instanceof Y.LinkedListNode)||e.list!==this)throw new Error("Reference node is not owned by the list.");var n=new Y.LinkedListNode(this,t),i=e,o=i.prev;return n.next=i,n.prev=o,i.prev=n,o.next=n,this._size++,n},t.prototype.insertAfter=function(t,e){if(!e||e===this._last)return this.addLast(t);if(!(e instanceof Y.LinkedListNode)||e.list!==this)throw new Error("Reference node is not owned by the list.");var n=new Y.LinkedListNode(this,t),i=e,o=i.next;return n.next=o,n.prev=i,i.next=n,o.prev=n,this._size++,n},t.prototype.removeFirst=function(){var t=this._first;if(t)return t===this._last?(this._first=null,this._last=null):(this._first=t.next,this._first.prev=null),t.list=null,t.next=null,t.prev=null,this._size--,t.value},t.prototype.removeLast=function(){var t=this._last;if(t)return t===this._first?(this._first=null,this._last=null):(this._last=t.prev,this._last.next=null),t.list=null,t.next=null,t.prev=null,this._size--,t.value},t.prototype.removeNode=function(t){if(!(t instanceof Y.LinkedListNode)||t.list!==this)throw new Error("Node is not owned by the list.");var e=t;e===this._first&&e===this._last?(this._first=null,this._last=null):e===this._first?(this._first=e.next,this._first.prev=null):e===this._last?(this._last=e.prev,this._last.next=null):(e.next.prev=e.prev,e.prev.next=e.next),e.list=null,e.next=null,e.prev=null,this._size--},t.prototype.clear=function(){for(var t=this._first;t;){var e=t.next;t.list=null,t.prev=null,t.next=null,t=e}this._first=null,this._last=null,this._size=0},t}();!function(t){t.from=function(e){var n=new t;return n.assign(e),n};var e=function(){function t(t){this._node=t}return t.prototype.iter=function(){return this},t.prototype.clone=function(){return new t(this._node)},t.prototype.next=function(){if(this._node){var t=this._node;return this._node=t.next,t.value}},t}();t.ForwardValueIterator=e;var n=function(){function t(t){this._node=t}return t.prototype.iter=function(){return this},t.prototype.clone=function(){return new t(this._node)},t.prototype.next=function(){if(this._node){var t=this._node;return this._node=t.prev,t.value}},t}();t.RetroValueIterator=n;var i=function(){function t(t){this._node=t}return t.prototype.iter=function(){return this},t.prototype.clone=function(){return new t(this._node)},t.prototype.next=function(){if(this._node){var t=this._node;return this._node=t.next,t}},t}();t.ForwardNodeIterator=i;var o=function(){function t(t){this._node=t}return t.prototype.iter=function(){return this},t.prototype.clone=function(){return new t(this._node)},t.prototype.next=function(){if(this._node){var t=this._node;return this._node=t.prev,t}},t}();t.RetroNodeIterator=o}(X||(X={})),function(t){var e=function(t,e){this.list=null,this.next=null,this.prev=null,this.list=t,this.value=e};t.LinkedListNode=e}(Y||(Y={}));
|
|
31
|
+
var q,K=function(){return K=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},K.apply(this,arguments)};t.CommandRegistry=function(){function t(){this._timerID=0,this._replaying=!1,this._keystrokes=[],this._keydownEvents=[],this._keyBindings=[],this._exactKeyMatch=null,this._commands=Object.create(null),this._commandChanged=new A(this),this._commandExecuted=new A(this),this._keyBindingChanged=new A(this)}return Object.defineProperty(t.prototype,"commandChanged",{get:function(){return this._commandChanged},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"commandExecuted",{get:function(){return this._commandExecuted},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"keyBindingChanged",{get:function(){return this._keyBindingChanged},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"keyBindings",{get:function(){return this._keyBindings},enumerable:!0,configurable:!0}),t.prototype.listCommands=function(){return Object.keys(this._commands)},t.prototype.hasCommand=function(t){return t in this._commands},t.prototype.addCommand=function(t,e){var n=this;if(t in this._commands)throw new Error("Command '"+t+"' already registered.");return this._commands[t]=q.createCommand(e),this._commandChanged.emit({id:t,type:"added"}),new L(function(){delete n._commands[t],n._commandChanged.emit({id:t,type:"removed"})})},t.prototype.notifyCommandChanged=function(t){if(void 0!==t&&!(t in this._commands))throw new Error("Command '"+t+"' is not registered.");this._commandChanged.emit({id:t,type:t?"changed":"many-changed"})},t.prototype.describedBy=function(t){var e=this._commands[t];return e&&e.describedBy||{args:null}},t.prototype.label=function(t,e){void 0===e&&(e=b.emptyObject);var n=this._commands[t];return n?n.label.call(void 0,e):""},t.prototype.mnemonic=function(t,e){void 0===e&&(e=b.emptyObject);var n=this._commands[t];return n?n.mnemonic.call(void 0,e):-1},t.prototype.icon=function(t,e){void 0===e&&(e=b.emptyObject);var n=this._commands[t];return n?n.icon.call(void 0,e):""},t.prototype.iconClass=function(t,e){void 0===e&&(e=b.emptyObject);var n=this._commands[t];return n?n.iconClass.call(void 0,e):""},t.prototype.iconLabel=function(t,e){void 0===e&&(e=b.emptyObject);var n=this._commands[t];return n?n.iconLabel.call(void 0,e):""},t.prototype.caption=function(t,e){void 0===e&&(e=b.emptyObject);var n=this._commands[t];return n?n.caption.call(void 0,e):""},t.prototype.usage=function(t,e){void 0===e&&(e=b.emptyObject);var n=this._commands[t];return n?n.usage.call(void 0,e):""},t.prototype.className=function(t,e){void 0===e&&(e=b.emptyObject);var n=this._commands[t];return n?n.className.call(void 0,e):""},t.prototype.dataset=function(t,e){void 0===e&&(e=b.emptyObject);var n=this._commands[t];return n?n.dataset.call(void 0,e):{}},t.prototype.isEnabled=function(t,e){void 0===e&&(e=b.emptyObject);var n=this._commands[t];return!!n&&n.isEnabled.call(void 0,e)},t.prototype.isToggled=function(t,e){void 0===e&&(e=b.emptyObject);var n=this._commands[t];return!!n&&n.isToggled.call(void 0,e)},t.prototype.isToggleable=function(t,e){var n=this._commands[t];return!!n&&n.isToggleable},t.prototype.isVisible=function(t,e){void 0===e&&(e=b.emptyObject);var n=this._commands[t];return!!n&&n.isVisible.call(void 0,e)},t.prototype.execute=function(t,e){void 0===e&&(e=b.emptyObject);var n,i=this._commands[t];if(!i)return Promise.reject(new Error("Command '"+t+"' not registered."));try{n=i.execute.call(void 0,e)}catch(t){n=Promise.reject(t)}var o=Promise.resolve(n);return this._commandExecuted.emit({id:t,args:e,result:o}),o},t.prototype.addKeyBinding=function(t){var e=this,i=q.createKeyBinding(t);return this._keyBindings.push(i),this._keyBindingChanged.emit({binding:i,type:"added"}),new L(function(){n.removeFirstOf(e._keyBindings,i),e._keyBindingChanged.emit({binding:i,type:"removed"})})},t.prototype.processKeydownEvent=function(e){if(!this._replaying&&!t.isModifierKeyPressed(e)){var n=t.keystrokeForKeydownEvent(e);if(!n)return this._replayKeydownEvents(),void this._clearPendingState();this._keystrokes.push(n);var i=q.matchKeyBinding(this._keyBindings,this._keystrokes,e),o=i.exact,r=i.partial;if(!o&&!r)return this._replayKeydownEvents(),void this._clearPendingState();if(e.preventDefault(),e.stopPropagation(),o&&!r)return this._executeKeyBinding(o),void this._clearPendingState();o&&(this._exactKeyMatch=o),this._keydownEvents.push(e),this._startTimer()}},t.prototype._startTimer=function(){var t=this;this._clearTimer(),this._timerID=window.setTimeout(function(){t._onPendingTimeout()},q.CHORD_TIMEOUT)},t.prototype._clearTimer=function(){0!==this._timerID&&(clearTimeout(this._timerID),this._timerID=0)},t.prototype._replayKeydownEvents=function(){0!==this._keydownEvents.length&&(this._replaying=!0,this._keydownEvents.forEach(q.replayKeyEvent),this._replaying=!1)},t.prototype._executeKeyBinding=function(t){var e=t.command,n=t.args;if(this.hasCommand(e)&&this.isEnabled(e,n))this.execute(e,n);else{var i=this.hasCommand(e)?"enabled":"registered",o="Cannot execute key binding '"+t.keys.join(", ")+"':",r="command '"+e+"' is not "+i+".";console.warn(o+" "+r)}},t.prototype._clearPendingState=function(){this._clearTimer(),this._exactKeyMatch=null,this._keystrokes.length=0,this._keydownEvents.length=0},t.prototype._onPendingTimeout=function(){this._timerID=0,this._exactKeyMatch?this._executeKeyBinding(this._exactKeyMatch):this._replayKeydownEvents(),this._clearPendingState()},t}(),function(t){function e(t){for(var e="",n=!1,i=!1,o=!1,r=!1,s=0,a=t.split(/\s+/);s<a.length;s++){var d=a[s];"Accel"===d?D.IS_MAC?i=!0:o=!0:"Alt"===d?n=!0:"Cmd"===d?i=!0:"Ctrl"===d?o=!0:"Shift"===d?r=!0:d.length>0&&(e=d)}return{cmd:i,ctrl:o,alt:n,shift:r,key:e}}function n(t){var n="",i=e(t);return i.ctrl&&(n+="Ctrl "),i.alt&&(n+="Alt "),i.shift&&(n+="Shift "),i.cmd&&D.IS_MAC&&(n+="Cmd "),n+i.key}t.parseKeystroke=e,t.normalizeKeystroke=n,t.normalizeKeys=function(t){return(D.IS_WIN?t.winKeys||t.keys:D.IS_MAC?t.macKeys||t.keys:t.linuxKeys||t.keys).map(n)},t.formatKeystroke=function(t){return"string"==typeof t?n(t):t.map(n).join(", ");function n(t){var n=[],i=D.IS_MAC?" ":"+",o=e(t);return o.ctrl&&n.push("Ctrl"),o.alt&&n.push("Alt"),o.shift&&n.push("Shift"),D.IS_MAC&&o.cmd&&n.push("Cmd"),n.push(o.key),n.map(q.formatKey).join(i)}},t.isModifierKeyPressed=function(t){var e=j(),n=e.keyForKeydownEvent(t);return e.isModifierKey(n)},t.keystrokeForKeydownEvent=function(t){var e=j(),n=e.keyForKeydownEvent(t);if(!n||e.isModifierKey(n))return"";var i=[];return t.ctrlKey&&i.push("Ctrl"),t.altKey&&i.push("Alt"),t.shiftKey&&i.push("Shift"),t.metaKey&&D.IS_MAC&&i.push("Cmd"),i.push(n),i.join(" ")}}(t.CommandRegistry||(t.CommandRegistry={})),function(e){e.CHORD_TIMEOUT=1e3,e.createCommand=function(t){var e,n;return t.icon&&"string"!=typeof t.icon?(n=h(t.iconClass,o),e=h(t.icon,c)):e=n=h(t.iconClass||t.icon,o),{execute:t.execute,describedBy:K({args:null},t.describedBy),label:h(t.label,o),mnemonic:h(t.mnemonic,r),icon:e,iconClass:n,iconLabel:h(t.iconLabel,o),caption:h(t.caption,o),usage:h(t.usage,o),className:h(t.className,o),dataset:h(t.dataset,d),isEnabled:t.isEnabled||s,isToggled:t.isToggled||a,isToggleable:t.isToggleable||!!t.isToggled,isVisible:t.isVisible||s}},e.createKeyBinding=function(e){return{keys:t.CommandRegistry.normalizeKeys(e),selector:l(e),command:e.command,args:e.args||b.emptyObject}},e.matchKeyBinding=function(t,e,n){for(var i=null,o=!1,r=1/0,s=0,a=0,d=t.length;a<d;++a){var c=t[a],h=u(c.keys,e);if(0!==h)if(2!==h){var l=p(c.selector,n);if(!(-1===l||l>r)){var f=O.calculateSpecificity(c.selector);(!i||l<r||f>=s)&&(i=c,r=l,s=f)}}else o||-1===p(c.selector,n)||(o=!0)}return{exact:i,partial:o}},e.replayKeyEvent=function(t){t.target.dispatchEvent(function(t){var e=document.createEvent("Event"),n=t.bubbles||!0,i=t.cancelable||!0;return e.initEvent(t.type||"keydown",n,i),e.key=t.key||"",e.keyCode=t.keyCode||0,e.which=t.keyCode||0,e.ctrlKey=t.ctrlKey||!1,e.altKey=t.altKey||!1,e.shiftKey=t.shiftKey||!1,e.metaKey=t.metaKey||!1,e.view=t.view||window,e}(t))},e.formatKey=function(t){return D.IS_MAC?n.hasOwnProperty(t)?n[t]:t:i.hasOwnProperty(t)?i[t]:t};var n={Backspace:"⌫",Tab:"⇥",Enter:"↩",Shift:"⇧",Ctrl:"⌃",Alt:"⌥",Escape:"⎋",PageUp:"⇞",PageDown:"⇟",End:"↘",Home:"↖",ArrowLeft:"←",ArrowUp:"↑",ArrowRight:"→",ArrowDown:"↓",Delete:"⌦",Cmd:"⌘"},i={Escape:"Esc",PageUp:"Page Up",PageDown:"Page Down",ArrowLeft:"Left",ArrowUp:"Up",ArrowRight:"Right",ArrowDown:"Down",Delete:"Del"},o=function(){return""},r=function(){return-1},s=function(){return!0},a=function(){return!1},d=function(){return{}},c=function(){};function h(t,e){return void 0===t?e:"function"==typeof t?t:function(){return t}}function l(t){if(-1!==t.selector.indexOf(","))throw new Error("Selector cannot contain commas: "+t.selector);if(!O.isValid(t.selector))throw new Error("Invalid selector: "+t.selector);return t.selector}function u(t,e){if(t.length<e.length)return 0;for(var n=0,i=e.length;n<i;++n)if(t[n]!==e[n])return 0;return t.length>e.length?2:1}function p(t,e){for(var n=e.target,i=e.currentTarget,o=0;null!==n;n=n.parentElement,++o){if(n.hasAttribute("data-lm-suppress-shortcuts"))return-1;if(n.hasAttribute("data-p-suppress-shortcuts"))return-1;if(O.matches(n,t))return o;if(n===i)return-1}return-1}}(q||(q={}));var V,U=function(){function t(t){this._root=new V.LeafNode,this.cmp=t}return Object.defineProperty(t.prototype,"isEmpty",{get:function(){return 0===this._root.size},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this._root.size},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"first",{get:function(){var t=V.firstLeaf(this._root);return t.size>0?t.items[0]:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"last",{get:function(){var t=V.lastLeaf(this._root);return t.size>0?t.items[t.size-1]:void 0},enumerable:!0,configurable:!0}),t.prototype.iter=function(){return V.iterItems(this._root)},t.prototype.retro=function(){return V.retroItems(this._root)},t.prototype.slice=function(t,e){return V.sliceItems(this._root,t,e)},t.prototype.retroSlice=function(t,e){return V.retroSliceItems(this._root,t,e)},t.prototype.at=function(t){return V.itemAt(this._root,t)},t.prototype.has=function(t,e){return V.hasItem(this._root,t,e)},t.prototype.indexOf=function(t,e){return V.indexOf(this._root,t,e)},t.prototype.get=function(t,e){return V.getItem(this._root,t,e)},t.prototype.assign=function(t){this.clear(),this.update(t)},t.prototype.insert=function(t){var e=V.insertItem(this._root,t,this.cmp);return this._root=V.maybeSplitRoot(this._root),e},t.prototype.update=function(t){var e=this;o(t,function(t){e.insert(t)})},t.prototype.delete=function(t,e){var n=V.deleteItem(this._root,t,e);return this._root=V.maybeExtractRoot(this._root),n},t.prototype.remove=function(t){var e=V.removeItem(this._root,t);return this._root=V.maybeExtractRoot(this._root),e},t.prototype.clear=function(){V.clear(this._root),this._root=new V.LeafNode},t}();!function(t){t.from=function(e,n){var i=new t(n);return i.assign(e),i}}(U||(U={})),function(t){var e=function(){function t(){this.items=[],this.sizes=[],this.children=[]}return Object.defineProperty(t.prototype,"type",{get:function(){return 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this.sizes[this.sizes.length-1]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.children.length},enumerable:!0,configurable:!0}),t}();t.BranchNode=e;var i=function(){function t(){this.next=null,this.prev=null,this.items=[]}return Object.defineProperty(t.prototype,"type",{get:function(){return 1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this.items.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.items.length},enumerable:!0,configurable:!0}),t}();function r(t){for(;0===t.type;)t=t.children[0];return t}function s(t){for(;0===t.type;)t=t.children[t.children.length-1];return t}function a(t){0===t.type?(o(t.children,a),t.children.length=0,t.sizes.length=0,t.items.length=0):(t.items.length=0,t.next=null,t.prev=null)}t.LeafNode=i,t.firstLeaf=r,t.lastLeaf=s,t.iterItems=function(t){var e=r(t);return new l(e,0,-1)},t.retroItems=function(t){var e=s(t);return new u(e,e.size-1,-1)},t.sliceItems=function(t,e,n){e=void 0===e?0:e<0?Math.max(0,e+t.size):Math.min(e,t.size),n=void 0===n?t.size:n<0?Math.max(0,n+t.size):Math.min(n,t.size);var i=Math.max(0,n-e);if(0===i)return d();for(;0===t.type;){var o=p(t.sizes,e);o>0&&(e-=t.sizes[o-1]),t=t.children[o]}return new l(t,e,i)},t.retroSliceItems=function(t,e,n){e=void 0===e?t.size-1:e<0?Math.max(-1,e+t.size):Math.min(e,t.size-1),n=void 0===n?-1:n<0?Math.max(-1,n+t.size):Math.min(n,t.size-1);var i=Math.max(0,e-n);if(0===i)return d();for(;0===t.type;){var o=p(t.sizes,e);o>0&&(e-=t.sizes[o-1]),t=t.children[o]}return new u(t,e,i)},t.itemAt=function(t,e){if(e<0&&(e+=t.size),!(e<0||e>=t.size)){for(;0===t.type;){var n=p(t.sizes,e);n>0&&(e-=t.sizes[n-1]),t=t.children[n]}return t.items[e]}},t.hasItem=function(t,e,n){for(;0===t.type;){var i=f(t.items,e,n);t=t.children[i]}return m(t.items,e,n)>=0},t.indexOf=function(t,e,n){for(var i=0;0===t.type;){var o=f(t.items,e,n);o>0&&(i+=t.sizes[o-1]),t=t.children[o]}var r=m(t.items,e,n);return r>=0?i+r:-i+r},t.getItem=function(t,e,n){for(;0===t.type;){var i=f(t.items,e,n);t=t.children[i]}var o=m(t.items,e,n);return o>=0?t.items[o]:void 0},t.insertItem=function t(e,i,o){if(1===e.type){var r,s=m(e.items,i,o);return s>=0?(r=e.items[s],e.items[s]=i):(r=void 0,n.insert(e.items,-s-1,i)),r}var a=f(e.items,i,o),d=e.children[a],h=d.size,l=t(d,i,o),u=d.size;if(e.items[a]=d.items[0],h===u)return l;if(d.width>c){var p=v(d);n.insert(e.children,a+1,p),n.insert(e.items,a+1,p.items[0])}return g(e,a),l},t.deleteItem=function t(e,i,o){if(1===e.type){var r=m(e.items,i,o);if(r<0)return;return n.removeAt(e.items,r)}var s=f(e.items,i,o),a=e.children[s],d=a.size,c=t(a,i,o);return d===a.size||(e.items[s]=a.items[0],a.width<h&&(s=y(e,s)),g(e,s)),c},t.removeItem=function t(e,i){if(i<0&&(i+=e.size),!(i<0||i>=e.size)){if(1===e.type)return n.removeAt(e.items,i);var o=p(e.sizes,i);o>0&&(i-=e.sizes[o]);var r=e.children[o],s=t(r,i);return e.items[o]=r.items[0],r.width<h&&(o=y(e,o)),g(e,o),s}},t.clear=a,t.maybeSplitRoot=function(t){if(t.width<=c)return t;var n=new e,i=v(t);return n.sizes[0]=t.size,n.sizes[1]=t.size+i.size,n.children[0]=t,n.children[1]=i,n.items[0]=t.items[0],n.items[1]=i.items[0],n},t.maybeExtractRoot=function(t){if(1===t.type)return t;if(t.children.length>1)return t;var e=t.children.pop();return a(t),e};var c=32,h=c>>1,l=function(){function t(t,e,n){this._node=t,this._index=e,this._count=n}return t.prototype.iter=function(){return this},t.prototype.clone=function(){return new t(this._node,this._index,this._count)},t.prototype.next=function(){if(null!==this._node&&0!==this._count)return this._index>=this._node.size?(this._node=this._node.next,this._index=0,this.next()):(this._count>0&&this._count--,this._node.items[this._index++])},t}(),u=function(){function t(t,e,n){this._node=t,this._index=e,this._count=n}return t.prototype.iter=function(){return this},t.prototype.clone=function(){return new t(this._node,this._index,this._count)},t.prototype.next=function(){if(null!==this._node&&0!==this._count)return this._index>=this._node.size&&(this._index=this._node.size-1),this._index<0?(this._node=this._node.prev,this._index=this._node?this._node.size-1:-1,this.next()):(this._count>0&&this._count--,this._node.items[this._index--])},t}();function p(t,e){for(var n=t.length,i=0;i<n;++i)if(t[i]>e)return i;return n-1}function f(t,e,n){for(var i=t.length,o=1;o<i;++o)if(n(t[o],e)>0)return o-1;return i-1}function m(t,e,n){for(var i=t.length,o=0;o<i;++o){var r=n(t[o],e);if(0===r)return o;if(r>0)return-o-1}return-i-1}function g(t,e){for(var n=t.sizes,i=t.children,o=e>0?n[e-1]:0,r=i.length;e<r;++e)o=n[e]=o+i[e].size;n.length=i.length}function v(t){if(1===t.type){for(var n=new i,o=t.items,r=n.items,s=h,a=o.length;s<a;++s)r.push(o[s]);return o.length=h,t.next&&(t.next.prev=n),n.next=t.next,n.prev=t,t.next=n,n}var d=new e,c=t.children,l=d.children;for(s=h,a=c.length;s<a;++s)l.push(c[s]);c.length=h;var u=t.items,p=d.items;for(s=h,a=u.length;s<a;++s)p.push(u[s]);return u.length=h,g(t,h),g(d,0),d}function y(t,e){var i,o,r,s,d,c,l=t.children[e],u=0===e?t.children[e+1]:t.children[e-1],p=0===e,f=1===l.type,m=u.width>h;if(f&&m&&p){var v=u;return(y=l).items.push(v.items.shift()),t.items[e+1]=v.items[0],e}if(f&&m&&!p){v=u;return(y=l).items.unshift(v.items.pop()),t.items[e]=y.items[0],e-1}if(f&&!m&&p){var y=l;return(i=(v=u).items).unshift.apply(i,y.items),n.removeAt(t.children,e),n.removeAt(t.items,e+1),y.prev&&(y.prev.next=v),v.prev=y.prev,a(y),e}if(f&&!m&&!p){y=l;return(o=(v=u).items).push.apply(o,y.items),n.removeAt(t.children,e),n.removeAt(t.items,e),y.next&&(y.next.prev=v),v.next=y.next,a(y),e-1}if(!f&&m&&p){v=u;return(y=l).children.push(v.children.shift()),y.items.push(v.items.shift()),t.items[e+1]=v.items[0],g(y,y.width-1),g(v,0),e}if(!f&&m&&!p){v=u;return(y=l).children.unshift(v.children.pop()),y.items.unshift(v.items.pop()),t.items[e]=y.items[0],g(y,0),g(v,v.width-1),e-1}if(!f&&!m&&p){y=l;return(r=(v=u).children).unshift.apply(r,y.children),(s=v.items).unshift.apply(s,y.items),n.removeAt(t.children,e),n.removeAt(t.items,e+1),g(v,0),y.children.length=0,a(y),e}if(!f&&!m&&!p){y=l;return(d=(v=u).children).push.apply(d,y.children),(c=v.items).push.apply(c,y.items),n.removeAt(t.children,e),n.removeAt(t.items,e),g(v,0),y.children.length=0,a(y),e-1}throw"unreachable"}}(V||(V={}));var Y,X=function(){function t(){this._first=null,this._last=null,this._size=0}return Object.defineProperty(t.prototype,"isEmpty",{get:function(){return 0===this._size},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"first",{get:function(){return this._first?this._first.value:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"last",{get:function(){return this._last?this._last.value:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"firstNode",{get:function(){return this._first},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lastNode",{get:function(){return this._last},enumerable:!0,configurable:!0}),t.prototype.iter=function(){return new t.ForwardValueIterator(this._first)},t.prototype.retro=function(){return new t.RetroValueIterator(this._last)},t.prototype.nodes=function(){return new t.ForwardNodeIterator(this._first)},t.prototype.retroNodes=function(){return new t.RetroNodeIterator(this._last)},t.prototype.assign=function(t){var e=this;this.clear(),o(t,function(t){e.addLast(t)})},t.prototype.push=function(t){this.addLast(t)},t.prototype.pop=function(){return this.removeLast()},t.prototype.shift=function(t){this.addFirst(t)},t.prototype.unshift=function(){return this.removeFirst()},t.prototype.addFirst=function(t){var e=new Y.LinkedListNode(this,t);return this._first?(e.next=this._first,this._first.prev=e,this._first=e):(this._first=e,this._last=e),this._size++,e},t.prototype.addLast=function(t){var e=new Y.LinkedListNode(this,t);return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._first=e,this._last=e),this._size++,e},t.prototype.insertBefore=function(t,e){if(!e||e===this._first)return this.addFirst(t);if(!(e instanceof Y.LinkedListNode)||e.list!==this)throw new Error("Reference node is not owned by the list.");var n=new Y.LinkedListNode(this,t),i=e,o=i.prev;return n.next=i,n.prev=o,i.prev=n,o.next=n,this._size++,n},t.prototype.insertAfter=function(t,e){if(!e||e===this._last)return this.addLast(t);if(!(e instanceof Y.LinkedListNode)||e.list!==this)throw new Error("Reference node is not owned by the list.");var n=new Y.LinkedListNode(this,t),i=e,o=i.next;return n.next=o,n.prev=i,i.next=n,o.prev=n,this._size++,n},t.prototype.removeFirst=function(){var t=this._first;if(t)return t===this._last?(this._first=null,this._last=null):(this._first=t.next,this._first.prev=null),t.list=null,t.next=null,t.prev=null,this._size--,t.value},t.prototype.removeLast=function(){var t=this._last;if(t)return t===this._first?(this._first=null,this._last=null):(this._last=t.prev,this._last.next=null),t.list=null,t.next=null,t.prev=null,this._size--,t.value},t.prototype.removeNode=function(t){if(!(t instanceof Y.LinkedListNode)||t.list!==this)throw new Error("Node is not owned by the list.");var e=t;e===this._first&&e===this._last?(this._first=null,this._last=null):e===this._first?(this._first=e.next,this._first.prev=null):e===this._last?(this._last=e.prev,this._last.next=null):(e.next.prev=e.prev,e.prev.next=e.next),e.list=null,e.next=null,e.prev=null,this._size--},t.prototype.clear=function(){for(var t=this._first;t;){var e=t.next;t.list=null,t.prev=null,t.next=null,t=e}this._first=null,this._last=null,this._size=0},t}();!function(t){t.from=function(e){var n=new t;return n.assign(e),n};var e=function(){function t(t){this._node=t}return t.prototype.iter=function(){return this},t.prototype.clone=function(){return new t(this._node)},t.prototype.next=function(){if(this._node){var t=this._node;return this._node=t.next,t.value}},t}();t.ForwardValueIterator=e;var n=function(){function t(t){this._node=t}return t.prototype.iter=function(){return this},t.prototype.clone=function(){return new t(this._node)},t.prototype.next=function(){if(this._node){var t=this._node;return this._node=t.prev,t.value}},t}();t.RetroValueIterator=n;var i=function(){function t(t){this._node=t}return t.prototype.iter=function(){return this},t.prototype.clone=function(){return new t(this._node)},t.prototype.next=function(){if(this._node){var t=this._node;return this._node=t.next,t}},t}();t.ForwardNodeIterator=i;var o=function(){function t(t){this._node=t}return t.prototype.iter=function(){return this},t.prototype.clone=function(){return new t(this._node)},t.prototype.next=function(){if(this._node){var t=this._node;return this._node=t.prev,t}},t}();t.RetroNodeIterator=o}(X||(X={})),function(t){var e=function(t,e){this.list=null,this.next=null,this.prev=null,this.list=t,this.value=e};t.LinkedListNode=e}(Y||(Y={}));
|
|
32
32
|
/*! *****************************************************************************
|
|
33
33
|
Copyright (c) Microsoft Corporation.
|
|
34
34
|
|
|
@@ -43,7 +43,7 @@ var q,K=function(){return K=Object.assign||function(t){for(var e,n=1,i=arguments
|
|
|
43
43
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
44
44
|
PERFORMANCE OF THIS SOFTWARE.
|
|
45
45
|
***************************************************************************** */
|
|
46
|
-
var G=function(t,e){return G=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},G(t,e)};var Z,J=function(){function t(t){this.type=t}return Object.defineProperty(t.prototype,"isConflatable",{get:function(){return!1},enumerable:!0,configurable:!0}),t.prototype.conflate=function(t){return!1},t}(),Q=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}G(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),Object.defineProperty(e.prototype,"isConflatable",{get:function(){return!0},enumerable:!0,configurable:!0}),e.prototype.conflate=function(t){return!0},e}(J);!function(t){function e(t,e){var n=s.get(t);if(n&&0!==n.length){var o,r=function(t,e){for(var n,o=0,r=i(t);void 0!==(n=r.next());)if(!e(n,o++))return!1;return!0}("function"==typeof(o=n).retro?o.retro():new _(o),(function(n){return!n||function(t,e,n){var i=!0;try{i="function"==typeof t?t(e,n):t.messageHook(e,n)}catch(t){d(t)}return i}(n,t,e)}));r&&p(t,e)}else p(t,e)}t.sendMessage=e,t.postMessage=function(t,e){e.isConflatable&&function(t,e){for(var n,o=0,r=i(t);void 0!==(n=r.next());)if(e(n,o++))return!0;return!1}(r,(function(n){return n.handler===t&&(!!n.msg&&(n.msg.type===e.type&&(!!n.msg.isConflatable&&n.msg.conflate(e))))}))||f(t,e)},t.installMessageHook=function(t,e){var n=s.get(t);n&&-1!==n.indexOf(e)||(n?n.push(e):s.set(t,[e]))},t.removeMessageHook=function(t,e){var n=s.get(t);if(n){var i=n.indexOf(e);-1!==i&&(n[i]=null,g(n))}},t.clearData=function(t){var e=s.get(t);e&&e.length>0&&(n.fill(e,null),g(e)),o(r,(function(e){e.handler===t&&(e.handler=null,e.msg=null)}))},t.flush=function(){h||0===c||(u(c),h=!0,m(),h=!1)},t.getExceptionHandler=function(){return d},t.setExceptionHandler=function(t){var e=d;return d=t,e};var r=new X,s=new WeakMap,a=new Set,d=function(t){console.error(t)},c=0,h=!1,l="function"==typeof requestAnimationFrame?requestAnimationFrame:setImmediate,u="function"==typeof cancelAnimationFrame?cancelAnimationFrame:clearImmediate;function p(t,e){try{t.processMessage(e)}catch(t){d(t)}}function f(t,e){r.addLast({handler:t,msg:e}),0===c&&(c=l(m))}function m(){if(c=0,!r.isEmpty){var t={handler:null,msg:null};for(r.addLast(t);;){var n=r.removeFirst();if(n===t)return;n.handler&&n.msg&&e(n.handler,n.msg)}}}function g(t){0===a.size&&l(v),a.add(t)}function v(){a.forEach(y),a.clear()}function y(t){n.removeAllWhere(t,b)}function b(t){return null===t}}(Z||(Z={}));var $,tt=function(){function t(t){var e=this;this._onScrollFrame=function(){if(e._scrollTarget){var t=e._scrollTarget,n=t.element,i=t.edge,o=t.distance,r=$.SCROLL_EDGE_SIZE-o,s=Math.pow(r/$.SCROLL_EDGE_SIZE,2),a=Math.max(1,Math.round(s*$.SCROLL_EDGE_SIZE));switch(i){case"top":n.scrollTop-=a;break;case"left":n.scrollLeft-=a;break;case"right":n.scrollLeft+=a;break;case"bottom":n.scrollTop+=a}requestAnimationFrame(e._onScrollFrame)}},this._disposed=!1,this._dropAction="none",this._override=null,this._currentTarget=null,this._currentElement=null,this._promise=null,this._scrollTarget=null,this._resolve=null,this.document=t.document||document,this.mimeData=t.mimeData,this.dragImage=t.dragImage||null,this.proposedAction=t.proposedAction||"copy",this.supportedActions=t.supportedActions||"all",this.source=t.source||null}return t.prototype.dispose=function(){if(!this._disposed){if(this._disposed=!0,this._currentTarget){var t=$.createMouseEvent("pointerup",-1,-1);$.dispatchDragLeave(this,this._currentTarget,null,t)}this._finalize("none")}},Object.defineProperty(t.prototype,"isDisposed",{get:function(){return this._disposed},enumerable:!0,configurable:!0}),t.prototype.start=function(t,e){var n=this;if(this._disposed)return Promise.resolve("none");if(this._promise)return this._promise;this._addListeners(),this._attachDragImage(t,e),this._promise=new Promise((function(t,e){n._resolve=t}));var i=$.createMouseEvent("pointermove",t,e);return document.dispatchEvent(i),this._promise},t.prototype.handleEvent=function(t){switch(t.type){case"mousemove":case"pointermove":this._evtMouseMove(t);break;case"mouseup":case"pointerup":this._evtMouseUp(t);break;case"keydown":this._evtKeyDown(t);break;default:t.preventDefault(),t.stopPropagation()}},t.prototype.moveDragImage=function(t,e){if(this.dragImage){var n=this.dragImage.style;n.top=e+"px",n.left=t+"px"}},t.prototype._evtMouseMove=function(t){t.preventDefault(),t.stopPropagation(),this._updateCurrentTarget(t),this._updateDragScroll(t),this.moveDragImage(t.clientX,t.clientY)},t.prototype._evtMouseUp=function(t){if(t.preventDefault(),t.stopPropagation(),0===t.button)if(this._updateCurrentTarget(t),this._currentTarget){if("none"===this._dropAction)return $.dispatchDragLeave(this,this._currentTarget,null,t),void this._finalize("none");var e=$.dispatchDrop(this,this._currentTarget,t);this._finalize(e)}else this._finalize("none")},t.prototype._evtKeyDown=function(t){t.preventDefault(),t.stopPropagation(),27===t.keyCode&&this.dispose()},t.prototype._addListeners=function(){document.addEventListener("mousedown",this,!0),document.addEventListener("mousemove",this,!0),document.addEventListener("mouseup",this,!0),document.addEventListener("mouseenter",this,!0),document.addEventListener("mouseleave",this,!0),document.addEventListener("mouseover",this,!0),document.addEventListener("mouseout",this,!0),document.addEventListener("pointerdown",this,!0),document.addEventListener("pointermove",this,!0),document.addEventListener("pointerup",this,!0),document.addEventListener("pointerenter",this,!0),document.addEventListener("pointerleave",this,!0),document.addEventListener("pointerover",this,!0),document.addEventListener("pointerout",this,!0),document.addEventListener("keydown",this,!0),document.addEventListener("keyup",this,!0),document.addEventListener("keypress",this,!0),document.addEventListener("contextmenu",this,!0)},t.prototype._removeListeners=function(){document.removeEventListener("mousedown",this,!0),document.removeEventListener("mousemove",this,!0),document.removeEventListener("mouseup",this,!0),document.removeEventListener("mouseenter",this,!0),document.removeEventListener("mouseleave",this,!0),document.removeEventListener("mouseover",this,!0),document.removeEventListener("mouseout",this,!0),document.removeEventListener("pointerdown",this,!0),document.removeEventListener("pointermove",this,!0),document.removeEventListener("pointerup",this,!0),document.removeEventListener("pointerenter",this,!0),document.removeEventListener("pointerleave",this,!0),document.removeEventListener("pointerover",this,!0),document.removeEventListener("pointerout",this,!0),document.removeEventListener("keydown",this,!0),document.removeEventListener("keyup",this,!0),document.removeEventListener("keypress",this,!0),document.removeEventListener("contextmenu",this,!0)},t.prototype._updateDragScroll=function(t){var e=$.findScrollTarget(t);(this._scrollTarget||e)&&(this._scrollTarget||setTimeout(this._onScrollFrame,500),this._scrollTarget=e)},t.prototype._updateCurrentTarget=function(t){var e=this._currentTarget,n=this._currentTarget,i=this._currentElement,o=this.document.elementFromPoint(t.clientX,t.clientY);this._currentElement=o,o!==i&&o!==n&&$.dispatchDragExit(this,n,o,t),o!==i&&o!==n&&(n=$.dispatchDragEnter(this,o,n,t)),n!==e&&(this._currentTarget=n,$.dispatchDragLeave(this,e,n,t));var r=$.dispatchDragOver(this,n,t);this._setDropAction(r)},t.prototype._attachDragImage=function(t,e){if(this.dragImage){this.dragImage.classList.add("lm-mod-drag-image"),this.dragImage.classList.add("p-mod-drag-image");var n=this.dragImage.style;n.pointerEvents="none",n.position="fixed",n.top=e+"px",n.left=t+"px",(this.document instanceof Document?this.document.body:this.document.firstElementChild).appendChild(this.dragImage)}},t.prototype._detachDragImage=function(){if(this.dragImage){var t=this.dragImage.parentNode;t&&t.removeChild(this.dragImage)}},t.prototype._setDropAction=function(e){if(e=$.validateAction(e,this.supportedActions),!this._override||this._dropAction!==e)switch(e){case"none":this._dropAction=e,this._override=t.overrideCursor("no-drop",this.document);break;case"copy":this._dropAction=e,this._override=t.overrideCursor("copy",this.document);break;case"link":this._dropAction=e,this._override=t.overrideCursor("alias",this.document);break;case"move":this._dropAction=e,this._override=t.overrideCursor("move",this.document)}},t.prototype._finalize=function(t){var e=this._resolve;this._removeListeners(),this._detachDragImage(),this._override&&(this._override.dispose(),this._override=null),this.mimeData.clear(),this._disposed=!0,this._dropAction="none",this._currentTarget=null,this._currentElement=null,this._scrollTarget=null,this._promise=null,this._resolve=null,e&&e(t)},t}();!function(t){t.overrideCursor=function(t,n){void 0===n&&(n=document);var i=++e,o=n instanceof Document?n.body:n.firstElementChild;return o.style.cursor=t,o.classList.add("lm-mod-override-cursor"),o.classList.add("p-mod-override-cursor"),new L((function(){i===e&&(o.style.cursor="",o.classList.remove("lm-mod-override-cursor"),o.classList.remove("p-mod-override-cursor"))}))};var e=0}(tt||(tt={})),function(t){t.SCROLL_EDGE_SIZE=20,t.validateAction=function(t,i){return e[t]&n[i]?t:"none"},t.createMouseEvent=function(t,e,n){var i=document.createEvent("MouseEvent");return i.initMouseEvent(t,!0,!0,window,0,0,0,e,n,!1,!1,!1,!1,0,null),i},t.findScrollTarget=function(e){for(var n=e.clientX,i=e.clientY,o=document.elementFromPoint(n,i);o;o=o.parentElement){var r=o.hasAttribute("data-lm-dragscroll");if(r=r||o.hasAttribute("data-p-dragscroll")){var s=0,a=0;o===document.body&&(s=window.pageXOffset,a=window.pageYOffset);var d=o.getBoundingClientRect(),c=d.top+a,h=d.left+s,l=h+d.width,u=c+d.height;if(!(n<h||n>=l||i<c||i>=u)){var p=n-h+1,f=i-c+1,m=l-n,g=u-i,v=Math.min(p,f,m,g);if(!(v>t.SCROLL_EDGE_SIZE)){var y=void 0;switch(v){case g:y="bottom";break;case f:y="top";break;case m:y="right";break;case p:y="left";break;default:throw"unreachable"}var b=o.scrollWidth-o.clientWidth,_=o.scrollHeight-o.clientHeight,w=void 0;switch(y){case"top":w=_>0&&o.scrollTop>0;break;case"left":w=b>0&&o.scrollLeft>0;break;case"right":w=b>0&&o.scrollLeft<b;break;case"bottom":w=_>0&&o.scrollTop<_;break;default:throw"unreachable"}if(w)return{element:o,edge:y,distance:v}}}}}return null},t.dispatchDragEnter=function(t,e,n,o){if(!e)return null;var r=i("lm-dragenter",t,o,n),s=!e.dispatchEvent(r);if(s)return e;if(r=i("p-dragenter",t,o,n),s=!e.dispatchEvent(r))return e;var a=t.document instanceof Document?t.document.body:t.document.firstElementChild;return e===a?n:(r=i("lm-dragenter",t,o,n),a.dispatchEvent(r),r=i("p-dragenter",t,o,n),a.dispatchEvent(r),a)},t.dispatchDragExit=function(t,e,n,o){if(e){var r=i("lm-dragexit",t,o,n);e.dispatchEvent(r),r=i("p-dragexit",t,o,n),e.dispatchEvent(r)}},t.dispatchDragLeave=function(t,e,n,o){if(e){var r=i("lm-dragleave",t,o,n);e.dispatchEvent(r),r=i("p-dragleave",t,o,n),e.dispatchEvent(r)}},t.dispatchDragOver=function(t,e,n){if(!e)return"none";var o=i("lm-dragover",t,n,null),r=!e.dispatchEvent(o);return r?o.dropAction:(o=i("p-dragover",t,n,null),(r=!e.dispatchEvent(o))?o.dropAction:"none")},t.dispatchDrop=function(t,e,n){if(!e)return"none";var o=i("lm-drop",t,n,null),r=!e.dispatchEvent(o);return r?o.dropAction:(o=i("p-drop",t,n,null),(r=!e.dispatchEvent(o))?o.dropAction:"none")};var e={none:0,copy:1,link:2,move:4},n={none:e.none,copy:e.copy,link:e.link,move:e.move,"copy-link":e.copy|e.link,"copy-move":e.copy|e.move,"link-move":e.link|e.move,all:e.copy|e.link|e.move};function i(t,e,n,i){var o=document.createEvent("MouseEvent");return o.initMouseEvent(t,!0,!0,window,0,n.screenX,n.screenY,n.clientX,n.clientY,n.ctrlKey,n.altKey,n.shiftKey,n.metaKey,n.button,i),o.dropAction="none",o.mimeData=e.mimeData,o.proposedAction=e.proposedAction,o.supportedActions=e.supportedActions,o.source=e.source,o}}($||($={}));
|
|
46
|
+
var G=function(t,e){return G=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},G(t,e)};var Z,J=function(){function t(t){this.type=t}return Object.defineProperty(t.prototype,"isConflatable",{get:function(){return!1},enumerable:!0,configurable:!0}),t.prototype.conflate=function(t){return!1},t}(),Q=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}G(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),Object.defineProperty(e.prototype,"isConflatable",{get:function(){return!0},enumerable:!0,configurable:!0}),e.prototype.conflate=function(t){return!0},e}(J);!function(t){function e(t,e){var n=s.get(t);if(n&&0!==n.length){var o,r=function(t,e){for(var n,o=0,r=i(t);void 0!==(n=r.next());)if(!e(n,o++))return!1;return!0}("function"==typeof(o=n).retro?o.retro():new _(o),function(n){return!n||function(t,e,n){var i=!0;try{i="function"==typeof t?t(e,n):t.messageHook(e,n)}catch(t){d(t)}return i}(n,t,e)});r&&p(t,e)}else p(t,e)}t.sendMessage=e,t.postMessage=function(t,e){e.isConflatable&&function(t,e){for(var n,o=0,r=i(t);void 0!==(n=r.next());)if(e(n,o++))return!0;return!1}(r,function(n){return n.handler===t&&(!!n.msg&&(n.msg.type===e.type&&(!!n.msg.isConflatable&&n.msg.conflate(e))))})||f(t,e)},t.installMessageHook=function(t,e){var n=s.get(t);n&&-1!==n.indexOf(e)||(n?n.push(e):s.set(t,[e]))},t.removeMessageHook=function(t,e){var n=s.get(t);if(n){var i=n.indexOf(e);-1!==i&&(n[i]=null,g(n))}},t.clearData=function(t){var e=s.get(t);e&&e.length>0&&(n.fill(e,null),g(e)),o(r,function(e){e.handler===t&&(e.handler=null,e.msg=null)})},t.flush=function(){h||0===c||(u(c),h=!0,m(),h=!1)},t.getExceptionHandler=function(){return d},t.setExceptionHandler=function(t){var e=d;return d=t,e};var r=new X,s=new WeakMap,a=new Set,d=function(t){console.error(t)},c=0,h=!1,l="function"==typeof requestAnimationFrame?requestAnimationFrame:setImmediate,u="function"==typeof cancelAnimationFrame?cancelAnimationFrame:clearImmediate;function p(t,e){try{t.processMessage(e)}catch(t){d(t)}}function f(t,e){r.addLast({handler:t,msg:e}),0===c&&(c=l(m))}function m(){if(c=0,!r.isEmpty){var t={handler:null,msg:null};for(r.addLast(t);;){var n=r.removeFirst();if(n===t)return;n.handler&&n.msg&&e(n.handler,n.msg)}}}function g(t){0===a.size&&l(v),a.add(t)}function v(){a.forEach(y),a.clear()}function y(t){n.removeAllWhere(t,b)}function b(t){return null===t}}(Z||(Z={}));var $,tt=function(){function t(t){var e=this;this._onScrollFrame=function(){if(e._scrollTarget){var t=e._scrollTarget,n=t.element,i=t.edge,o=t.distance,r=$.SCROLL_EDGE_SIZE-o,s=Math.pow(r/$.SCROLL_EDGE_SIZE,2),a=Math.max(1,Math.round(s*$.SCROLL_EDGE_SIZE));switch(i){case"top":n.scrollTop-=a;break;case"left":n.scrollLeft-=a;break;case"right":n.scrollLeft+=a;break;case"bottom":n.scrollTop+=a}requestAnimationFrame(e._onScrollFrame)}},this._disposed=!1,this._dropAction="none",this._override=null,this._currentTarget=null,this._currentElement=null,this._promise=null,this._scrollTarget=null,this._resolve=null,this.document=t.document||document,this.mimeData=t.mimeData,this.dragImage=t.dragImage||null,this.proposedAction=t.proposedAction||"copy",this.supportedActions=t.supportedActions||"all",this.source=t.source||null}return t.prototype.dispose=function(){if(!this._disposed){if(this._disposed=!0,this._currentTarget){var t=$.createMouseEvent("pointerup",-1,-1);$.dispatchDragLeave(this,this._currentTarget,null,t)}this._finalize("none")}},Object.defineProperty(t.prototype,"isDisposed",{get:function(){return this._disposed},enumerable:!0,configurable:!0}),t.prototype.start=function(t,e){var n=this;if(this._disposed)return Promise.resolve("none");if(this._promise)return this._promise;this._addListeners(),this._attachDragImage(t,e),this._promise=new Promise(function(t,e){n._resolve=t});var i=$.createMouseEvent("pointermove",t,e);return document.dispatchEvent(i),this._promise},t.prototype.handleEvent=function(t){switch(t.type){case"mousemove":case"pointermove":this._evtMouseMove(t);break;case"mouseup":case"pointerup":this._evtMouseUp(t);break;case"keydown":this._evtKeyDown(t);break;default:t.preventDefault(),t.stopPropagation()}},t.prototype.moveDragImage=function(t,e){if(this.dragImage){var n=this.dragImage.style;n.top=e+"px",n.left=t+"px"}},t.prototype._evtMouseMove=function(t){t.preventDefault(),t.stopPropagation(),this._updateCurrentTarget(t),this._updateDragScroll(t),this.moveDragImage(t.clientX,t.clientY)},t.prototype._evtMouseUp=function(t){if(t.preventDefault(),t.stopPropagation(),0===t.button)if(this._updateCurrentTarget(t),this._currentTarget){if("none"===this._dropAction)return $.dispatchDragLeave(this,this._currentTarget,null,t),void this._finalize("none");var e=$.dispatchDrop(this,this._currentTarget,t);this._finalize(e)}else this._finalize("none")},t.prototype._evtKeyDown=function(t){t.preventDefault(),t.stopPropagation(),27===t.keyCode&&this.dispose()},t.prototype._addListeners=function(){document.addEventListener("mousedown",this,!0),document.addEventListener("mousemove",this,!0),document.addEventListener("mouseup",this,!0),document.addEventListener("mouseenter",this,!0),document.addEventListener("mouseleave",this,!0),document.addEventListener("mouseover",this,!0),document.addEventListener("mouseout",this,!0),document.addEventListener("pointerdown",this,!0),document.addEventListener("pointermove",this,!0),document.addEventListener("pointerup",this,!0),document.addEventListener("pointerenter",this,!0),document.addEventListener("pointerleave",this,!0),document.addEventListener("pointerover",this,!0),document.addEventListener("pointerout",this,!0),document.addEventListener("keydown",this,!0),document.addEventListener("keyup",this,!0),document.addEventListener("keypress",this,!0),document.addEventListener("contextmenu",this,!0)},t.prototype._removeListeners=function(){document.removeEventListener("mousedown",this,!0),document.removeEventListener("mousemove",this,!0),document.removeEventListener("mouseup",this,!0),document.removeEventListener("mouseenter",this,!0),document.removeEventListener("mouseleave",this,!0),document.removeEventListener("mouseover",this,!0),document.removeEventListener("mouseout",this,!0),document.removeEventListener("pointerdown",this,!0),document.removeEventListener("pointermove",this,!0),document.removeEventListener("pointerup",this,!0),document.removeEventListener("pointerenter",this,!0),document.removeEventListener("pointerleave",this,!0),document.removeEventListener("pointerover",this,!0),document.removeEventListener("pointerout",this,!0),document.removeEventListener("keydown",this,!0),document.removeEventListener("keyup",this,!0),document.removeEventListener("keypress",this,!0),document.removeEventListener("contextmenu",this,!0)},t.prototype._updateDragScroll=function(t){var e=$.findScrollTarget(t);(this._scrollTarget||e)&&(this._scrollTarget||setTimeout(this._onScrollFrame,500),this._scrollTarget=e)},t.prototype._updateCurrentTarget=function(t){var e=this._currentTarget,n=this._currentTarget,i=this._currentElement,o=this.document.elementFromPoint(t.clientX,t.clientY);this._currentElement=o,o!==i&&o!==n&&$.dispatchDragExit(this,n,o,t),o!==i&&o!==n&&(n=$.dispatchDragEnter(this,o,n,t)),n!==e&&(this._currentTarget=n,$.dispatchDragLeave(this,e,n,t));var r=$.dispatchDragOver(this,n,t);this._setDropAction(r)},t.prototype._attachDragImage=function(t,e){if(this.dragImage){this.dragImage.classList.add("lm-mod-drag-image"),this.dragImage.classList.add("p-mod-drag-image");var n=this.dragImage.style;n.pointerEvents="none",n.position="fixed",n.top=e+"px",n.left=t+"px",(this.document instanceof Document?this.document.body:this.document.firstElementChild).appendChild(this.dragImage)}},t.prototype._detachDragImage=function(){if(this.dragImage){var t=this.dragImage.parentNode;t&&t.removeChild(this.dragImage)}},t.prototype._setDropAction=function(e){if(e=$.validateAction(e,this.supportedActions),!this._override||this._dropAction!==e)switch(e){case"none":this._dropAction=e,this._override=t.overrideCursor("no-drop",this.document);break;case"copy":this._dropAction=e,this._override=t.overrideCursor("copy",this.document);break;case"link":this._dropAction=e,this._override=t.overrideCursor("alias",this.document);break;case"move":this._dropAction=e,this._override=t.overrideCursor("move",this.document)}},t.prototype._finalize=function(t){var e=this._resolve;this._removeListeners(),this._detachDragImage(),this._override&&(this._override.dispose(),this._override=null),this.mimeData.clear(),this._disposed=!0,this._dropAction="none",this._currentTarget=null,this._currentElement=null,this._scrollTarget=null,this._promise=null,this._resolve=null,e&&e(t)},t}();!function(t){t.overrideCursor=function(t,n){void 0===n&&(n=document);var i=++e,o=n instanceof Document?n.body:n.firstElementChild;return o.style.cursor=t,o.classList.add("lm-mod-override-cursor"),o.classList.add("p-mod-override-cursor"),new L(function(){i===e&&(o.style.cursor="",o.classList.remove("lm-mod-override-cursor"),o.classList.remove("p-mod-override-cursor"))})};var e=0}(tt||(tt={})),function(t){t.SCROLL_EDGE_SIZE=20,t.validateAction=function(t,i){return e[t]&n[i]?t:"none"},t.createMouseEvent=function(t,e,n){var i=document.createEvent("MouseEvent");return i.initMouseEvent(t,!0,!0,window,0,0,0,e,n,!1,!1,!1,!1,0,null),i},t.findScrollTarget=function(e){for(var n=e.clientX,i=e.clientY,o=document.elementFromPoint(n,i);o;o=o.parentElement){var r=o.hasAttribute("data-lm-dragscroll");if(r=r||o.hasAttribute("data-p-dragscroll")){var s=0,a=0;o===document.body&&(s=window.pageXOffset,a=window.pageYOffset);var d=o.getBoundingClientRect(),c=d.top+a,h=d.left+s,l=h+d.width,u=c+d.height;if(!(n<h||n>=l||i<c||i>=u)){var p=n-h+1,f=i-c+1,m=l-n,g=u-i,v=Math.min(p,f,m,g);if(!(v>t.SCROLL_EDGE_SIZE)){var y=void 0;switch(v){case g:y="bottom";break;case f:y="top";break;case m:y="right";break;case p:y="left";break;default:throw"unreachable"}var b=o.scrollWidth-o.clientWidth,_=o.scrollHeight-o.clientHeight,w=void 0;switch(y){case"top":w=_>0&&o.scrollTop>0;break;case"left":w=b>0&&o.scrollLeft>0;break;case"right":w=b>0&&o.scrollLeft<b;break;case"bottom":w=_>0&&o.scrollTop<_;break;default:throw"unreachable"}if(w)return{element:o,edge:y,distance:v}}}}}return null},t.dispatchDragEnter=function(t,e,n,o){if(!e)return null;var r=i("lm-dragenter",t,o,n),s=!e.dispatchEvent(r);if(s)return e;if(r=i("p-dragenter",t,o,n),s=!e.dispatchEvent(r))return e;var a=t.document instanceof Document?t.document.body:t.document.firstElementChild;return e===a?n:(r=i("lm-dragenter",t,o,n),a.dispatchEvent(r),r=i("p-dragenter",t,o,n),a.dispatchEvent(r),a)},t.dispatchDragExit=function(t,e,n,o){if(e){var r=i("lm-dragexit",t,o,n);e.dispatchEvent(r),r=i("p-dragexit",t,o,n),e.dispatchEvent(r)}},t.dispatchDragLeave=function(t,e,n,o){if(e){var r=i("lm-dragleave",t,o,n);e.dispatchEvent(r),r=i("p-dragleave",t,o,n),e.dispatchEvent(r)}},t.dispatchDragOver=function(t,e,n){if(!e)return"none";var o=i("lm-dragover",t,n,null),r=!e.dispatchEvent(o);return r?o.dropAction:(o=i("p-dragover",t,n,null),(r=!e.dispatchEvent(o))?o.dropAction:"none")},t.dispatchDrop=function(t,e,n){if(!e)return"none";var o=i("lm-drop",t,n,null),r=!e.dispatchEvent(o);return r?o.dropAction:(o=i("p-drop",t,n,null),(r=!e.dispatchEvent(o))?o.dropAction:"none")};var e={none:0,copy:1,link:2,move:4},n={none:e.none,copy:e.copy,link:e.link,move:e.move,"copy-link":e.copy|e.link,"copy-move":e.copy|e.move,"link-move":e.link|e.move,all:e.copy|e.link|e.move};function i(t,e,n,i){var o=document.createEvent("MouseEvent");return o.initMouseEvent(t,!0,!0,window,0,n.screenX,n.screenY,n.clientX,n.clientY,n.ctrlKey,n.altKey,n.shiftKey,n.metaKey,n.button,i),o.dropAction="none",o.mimeData=e.mimeData,o.proposedAction=e.proposedAction,o.supportedActions=e.supportedActions,o.source=e.source,o}}($||($={}));
|
|
47
47
|
/*! *****************************************************************************
|
|
48
48
|
Copyright (c) Microsoft Corporation.
|
|
49
49
|
|
|
@@ -73,5 +73,5 @@ var et=function(t,e){return et=Object.setPrototypeOf||{__proto__:[]}instanceof A
|
|
|
73
73
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
74
74
|
PERFORMANCE OF THIS SOFTWARE.
|
|
75
75
|
***************************************************************************** */
|
|
76
|
-
var at=function(t,e){return at=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},at(t,e)};function dt(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}at(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var ct=function(){return ct=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},ct.apply(this,arguments)};var ht,lt=function(){this.sizeHint=0,this.minSize=0,this.maxSize=1/0,this.stretch=1,this.size=0,this.done=!1};!function(t){t.calc=function(t,e){var n=t.length;if(0===n)return e;for(var i=0,o=0,r=0,s=0,a=0,d=0;d<n;++d){var c=(y=t[d]).minSize,h=y.maxSize,l=y.sizeHint;y.done=!1,y.size=Math.max(c,Math.min(l,h)),r+=y.size,i+=c,o+=h,y.stretch>0&&(s+=y.stretch,a++)}if(e===r)return 0;if(e<=i){for(d=0;d<n;++d){(y=t[d]).size=y.minSize}return e-i}if(e>=o){for(d=0;d<n;++d){(y=t[d]).size=y.maxSize}return e-o}var u=.01,p=n;if(e<r){for(var f=r-e;a>0&&f>u;){var m=f,g=s;for(d=0;d<n;++d){if(!(y=t[d]).done&&0!==y.stretch){var v=y.stretch*m/g;y.size-v<=y.minSize?(f-=y.size-y.minSize,s-=y.stretch,y.size=y.minSize,y.done=!0,p--,a--):(f-=v,y.size-=v)}}}for(;p>0&&f>u;)for(v=f/p,d=0;d<n;++d){(y=t[d]).done||(y.size-v<=y.minSize?(f-=y.size-y.minSize,y.size=y.minSize,y.done=!0,p--):(f-=v,y.size-=v))}}else{for(f=e-r;a>0&&f>u;)for(m=f,g=s,d=0;d<n;++d){if(!(y=t[d]).done&&0!==y.stretch){v=y.stretch*m/g;y.size+v>=y.maxSize?(f-=y.maxSize-y.size,s-=y.stretch,y.size=y.maxSize,y.done=!0,p--,a--):(f-=v,y.size+=v)}}for(;p>0&&f>u;)for(v=f/p,d=0;d<n;++d){var y;(y=t[d]).done||(y.size+v>=y.maxSize?(f-=y.maxSize-y.size,y.size=y.maxSize,y.done=!0,p--):(f-=v,y.size+=v))}}return 0},t.adjust=function(t,e,n){0!==t.length&&0!==n&&(n>0?function(t,e,n){for(var i=0,o=0;o<=e;++o){i+=(c=t[o]).maxSize-c.size}for(var r=0,s=(o=e+1,t.length);o<s;++o){r+=(c=t[o]).size-c.minSize}var a=n=Math.min(n,i,r);for(o=e;o>=0&&a>0;--o){(h=(c=t[o]).maxSize-c.size)>=a?(c.sizeHint=c.size+a,a=0):(c.sizeHint=c.size+h,a-=h)}var d=n;for(o=e+1,s=t.length;o<s&&d>0;++o){var c,h;(h=(c=t[o]).size-c.minSize)>=d?(c.sizeHint=c.size-d,d=0):(c.sizeHint=c.size-h,d-=h)}}(t,e,n):function(t,e,n){for(var i=0,o=e+1,r=t.length;o<r;++o){i+=(c=t[o]).maxSize-c.size}var s=0;for(o=0;o<=e;++o){s+=(c=t[o]).size-c.minSize}var a=n=Math.min(n,i,s);for(o=e+1,r=t.length;o<r&&a>0;++o){(h=(c=t[o]).maxSize-c.size)>=a?(c.sizeHint=c.size+a,a=0):(c.sizeHint=c.size+h,a-=h)}var d=n;for(o=e;o>=0&&d>0;--o){var c,h;(h=(c=t[o]).size-c.minSize)>=d?(c.sizeHint=c.size-d,d=0):(c.sizeHint=c.size-h,d-=h)}}(t,e,-n))}}(ht||(ht={}));var ut,pt=function(){function t(t){this._label="",this._caption="",this._mnemonic=-1,this._iconClass="",this._iconLabel="",this._className="",this._closable=!1,this._changed=new A(this),this._isDisposed=!1,this.owner=t.owner,void 0!==t.label&&(this._label=t.label),void 0!==t.mnemonic&&(this._mnemonic=t.mnemonic),void 0!==t.icon?"string"==typeof t.icon?(this._icon=null,this._iconClass=t.icon):this._icon=t.icon:this._icon=null,void 0!==t.iconClass&&(this._iconClass=t.iconClass),void 0!==t.iconLabel&&(this._iconLabel=t.iconLabel),void 0!==t.iconRenderer&&(this._icon=t.iconRenderer),void 0!==t.caption&&(this._caption=t.caption),void 0!==t.className&&(this._className=t.className),void 0!==t.closable&&(this._closable=t.closable),this._dataset=t.dataset||{}}return Object.defineProperty(t.prototype,"changed",{get:function(){return this._changed},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"label",{get:function(){return this._label},set:function(t){this._label!==t&&(this._label=t,this._changed.emit(void 0))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"mnemonic",{get:function(){return this._mnemonic},set:function(t){this._mnemonic!==t&&(this._mnemonic=t,this._changed.emit(void 0))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"icon",{get:function(){return null===this._icon?this.iconClass:this._icon},set:function(t){if("string"==typeof t)this._icon=null,this.iconClass=t;else{if(this._icon===t)return;this._icon=t,this._changed.emit(void 0)}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"iconClass",{get:function(){return this._iconClass},set:function(t){this._iconClass!==t&&(this._iconClass=t,this._changed.emit(void 0))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"iconLabel",{get:function(){return this._iconLabel},set:function(t){this._iconLabel!==t&&(this._iconLabel=t,this._changed.emit(void 0))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"iconRenderer",{get:function(){return this._icon||void 0},set:function(t){this.icon=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"caption",{get:function(){return this._caption},set:function(t){this._caption!==t&&(this._caption=t,this._changed.emit(void 0))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"className",{get:function(){return this._className},set:function(t){this._className!==t&&(this._className=t,this._changed.emit(void 0))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"closable",{get:function(){return this._closable},set:function(t){this._closable!==t&&(this._closable=t,this._changed.emit(void 0))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dataset",{get:function(){return this._dataset},set:function(t){this._dataset!==t&&(this._dataset=t,this._changed.emit(void 0))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isDisposed",{get:function(){return this._isDisposed},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this.isDisposed||(this._isDisposed=!0,A.clearData(this))},t}(),ft=function(){function t(e){void 0===e&&(e={}),this._flags=0,this._layout=null,this._parent=null,this._disposed=new A(this),this._hiddenMode=t.HiddenMode.Display,this.node=ut.createNode(e),this.addClass("lm-Widget"),this.addClass("p-Widget")}return t.prototype.dispose=function(){this.isDisposed||(this.setFlag(t.Flag.IsDisposed),this._disposed.emit(void 0),this.parent?this.parent=null:this.isAttached&&t.detach(this),this._layout&&(this._layout.dispose(),this._layout=null),this.title.dispose(),A.clearData(this),Z.clearData(this),S.clearData(this))},Object.defineProperty(t.prototype,"disposed",{get:function(){return this._disposed},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isDisposed",{get:function(){return this.testFlag(t.Flag.IsDisposed)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isAttached",{get:function(){return this.testFlag(t.Flag.IsAttached)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isHidden",{get:function(){return this.testFlag(t.Flag.IsHidden)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isVisible",{get:function(){return this.testFlag(t.Flag.IsVisible)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return ut.titleProperty.get(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"id",{get:function(){return this.node.id},set:function(t){this.node.id=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dataset",{get:function(){return this.node.dataset},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hiddenMode",{get:function(){return this._hiddenMode},set:function(e){this._hiddenMode!==e&&(this.isHidden&&this._toggleHidden(!1),e==t.HiddenMode.Scale?this.node.style.willChange="transform":this.node.style.willChange="auto",this._hiddenMode=e,this.isHidden&&this._toggleHidden(!0))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this._parent},set:function(e){if(this._parent!==e){if(e&&this.contains(e))throw new Error("Invalid parent widget.");if(this._parent&&!this._parent.isDisposed){var n=new t.ChildMessage("child-removed",this);Z.sendMessage(this._parent,n)}if(this._parent=e,this._parent&&!this._parent.isDisposed){n=new t.ChildMessage("child-added",this);Z.sendMessage(this._parent,n)}this.isDisposed||Z.sendMessage(this,t.Msg.ParentChanged)}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"layout",{get:function(){return this._layout},set:function(e){if(this._layout!==e){if(this.testFlag(t.Flag.DisallowLayout))throw new Error("Cannot set widget layout.");if(this._layout)throw new Error("Cannot change widget layout.");if(e.parent)throw new Error("Cannot change layout parent.");this._layout=e,e.parent=this}},enumerable:!0,configurable:!0}),t.prototype.children=function(){return this._layout?this._layout.iter():d()},t.prototype.contains=function(t){for(var e=t;e;e=e._parent)if(e===this)return!0;return!1},t.prototype.hasClass=function(t){return this.node.classList.contains(t)},t.prototype.addClass=function(t){this.node.classList.add(t)},t.prototype.removeClass=function(t){this.node.classList.remove(t)},t.prototype.toggleClass=function(t,e){return!0===e?(this.node.classList.add(t),!0):!1===e?(this.node.classList.remove(t),!1):this.node.classList.toggle(t)},t.prototype.update=function(){Z.postMessage(this,t.Msg.UpdateRequest)},t.prototype.fit=function(){Z.postMessage(this,t.Msg.FitRequest)},t.prototype.activate=function(){Z.postMessage(this,t.Msg.ActivateRequest)},t.prototype.close=function(){Z.sendMessage(this,t.Msg.CloseRequest)},t.prototype.show=function(){if(this.testFlag(t.Flag.IsHidden)&&(!this.isAttached||this.parent&&!this.parent.isVisible||Z.sendMessage(this,t.Msg.BeforeShow),this.clearFlag(t.Flag.IsHidden),this.node.removeAttribute("aria-hidden"),this._toggleHidden(!1),!this.isAttached||this.parent&&!this.parent.isVisible||Z.sendMessage(this,t.Msg.AfterShow),this.parent)){var e=new t.ChildMessage("child-shown",this);Z.sendMessage(this.parent,e)}},t.prototype.hide=function(){if(!this.testFlag(t.Flag.IsHidden)&&(!this.isAttached||this.parent&&!this.parent.isVisible||Z.sendMessage(this,t.Msg.BeforeHide),this.setFlag(t.Flag.IsHidden),this.node.setAttribute("aria-hidden","true"),this._toggleHidden(!0),!this.isAttached||this.parent&&!this.parent.isVisible||Z.sendMessage(this,t.Msg.AfterHide),this.parent)){var e=new t.ChildMessage("child-hidden",this);Z.sendMessage(this.parent,e)}},t.prototype.setHidden=function(t){t?this.hide():this.show()},t.prototype.testFlag=function(t){return!!(this._flags&t)},t.prototype.setFlag=function(t){this._flags|=t},t.prototype.clearFlag=function(t){this._flags&=~t},t.prototype.processMessage=function(e){switch(e.type){case"resize":this.notifyLayout(e),this.onResize(e);break;case"update-request":this.notifyLayout(e),this.onUpdateRequest(e);break;case"fit-request":this.notifyLayout(e),this.onFitRequest(e);break;case"before-show":this.notifyLayout(e),this.onBeforeShow(e);break;case"after-show":this.setFlag(t.Flag.IsVisible),this.notifyLayout(e),this.onAfterShow(e);break;case"before-hide":this.notifyLayout(e),this.onBeforeHide(e);break;case"after-hide":this.clearFlag(t.Flag.IsVisible),this.notifyLayout(e),this.onAfterHide(e);break;case"before-attach":this.notifyLayout(e),this.onBeforeAttach(e);break;case"after-attach":this.isHidden||this.parent&&!this.parent.isVisible||this.setFlag(t.Flag.IsVisible),this.setFlag(t.Flag.IsAttached),this.notifyLayout(e),this.onAfterAttach(e);break;case"before-detach":this.notifyLayout(e),this.onBeforeDetach(e);break;case"after-detach":this.clearFlag(t.Flag.IsVisible),this.clearFlag(t.Flag.IsAttached),this.notifyLayout(e),this.onAfterDetach(e);break;case"activate-request":this.notifyLayout(e),this.onActivateRequest(e);break;case"close-request":this.notifyLayout(e),this.onCloseRequest(e);break;case"child-added":this.notifyLayout(e),this.onChildAdded(e);break;case"child-removed":this.notifyLayout(e),this.onChildRemoved(e);break;default:this.notifyLayout(e)}},t.prototype.notifyLayout=function(t){this._layout&&this._layout.processParentMessage(t)},t.prototype.onCloseRequest=function(e){this.parent?this.parent=null:this.isAttached&&t.detach(this)},t.prototype.onResize=function(t){},t.prototype.onUpdateRequest=function(t){},t.prototype.onFitRequest=function(t){},t.prototype.onActivateRequest=function(t){},t.prototype.onBeforeShow=function(t){},t.prototype.onAfterShow=function(t){},t.prototype.onBeforeHide=function(t){},t.prototype.onAfterHide=function(t){},t.prototype.onBeforeAttach=function(t){},t.prototype.onAfterAttach=function(t){},t.prototype.onBeforeDetach=function(t){},t.prototype.onAfterDetach=function(t){},t.prototype.onChildAdded=function(t){},t.prototype.onChildRemoved=function(t){},t.prototype._toggleHidden=function(e){if(e)switch(this._hiddenMode){case t.HiddenMode.Display:this.addClass("lm-mod-hidden"),this.addClass("p-mod-hidden");break;case t.HiddenMode.Scale:this.node.style.transform="scale(0)";break;case t.HiddenMode.ContentVisibility:this.node.style.contentVisibility="hidden",this.node.style.zIndex="-1"}else switch(this._hiddenMode){case t.HiddenMode.Display:this.removeClass("lm-mod-hidden"),this.removeClass("p-mod-hidden");break;case t.HiddenMode.Scale:this.node.style.transform="";break;case t.HiddenMode.ContentVisibility:this.node.style.contentVisibility="",this.node.style.zIndex=""}},t}();!function(t){var e,n,i;(e=t.HiddenMode||(t.HiddenMode={}))[e.Display=0]="Display",e[e.Scale=1]="Scale",e[e.ContentVisibility=2]="ContentVisibility",(n=t.Flag||(t.Flag={}))[n.IsDisposed=1]="IsDisposed",n[n.IsAttached=2]="IsAttached",n[n.IsHidden=4]="IsHidden",n[n.IsVisible=8]="IsVisible",n[n.DisallowLayout=16]="DisallowLayout",(i=t.Msg||(t.Msg={})).BeforeShow=new J("before-show"),i.AfterShow=new J("after-show"),i.BeforeHide=new J("before-hide"),i.AfterHide=new J("after-hide"),i.BeforeAttach=new J("before-attach"),i.AfterAttach=new J("after-attach"),i.BeforeDetach=new J("before-detach"),i.AfterDetach=new J("after-detach"),i.ParentChanged=new J("parent-changed"),i.UpdateRequest=new Q("update-request"),i.FitRequest=new Q("fit-request"),i.ActivateRequest=new Q("activate-request"),i.CloseRequest=new Q("close-request");var o=function(t){function e(e,n){var i=t.call(this,e)||this;return i.child=n,i}return dt(e,t),e}(J);t.ChildMessage=o;var r=function(t){function e(e,n){var i=t.call(this,"resize")||this;return i.width=e,i.height=n,i}return dt(e,t),e}(J);t.ResizeMessage=r,function(t){t.UnknownSize=new t(-1,-1)}(r=t.ResizeMessage||(t.ResizeMessage={})),t.attach=function(e,n,i){if(void 0===i&&(i=null),e.parent)throw new Error("Cannot attach a child widget.");if(e.isAttached||e.node.isConnected)throw new Error("Widget is already attached.");if(!n.isConnected)throw new Error("Host is not attached.");Z.sendMessage(e,t.Msg.BeforeAttach),n.insertBefore(e.node,i),Z.sendMessage(e,t.Msg.AfterAttach)},t.detach=function(e){if(e.parent)throw new Error("Cannot detach a child widget.");if(!e.isAttached||!e.node.isConnected)throw new Error("Widget is not attached.");Z.sendMessage(e,t.Msg.BeforeDetach),e.node.parentNode.removeChild(e.node),Z.sendMessage(e,t.Msg.AfterDetach)}}(ft||(ft={})),function(t){t.titleProperty=new S({name:"title",create:function(t){return new pt({owner:t})}}),t.createNode=function(t){return t.node||document.createElement(t.tag||"div")}}(ut||(ut={}));var mt=function(){function t(t){void 0===t&&(t={}),this._disposed=!1,this._parent=null,this._fitPolicy=t.fitPolicy||"set-min-size"}return t.prototype.dispose=function(){this._parent=null,this._disposed=!0,A.clearData(this),S.clearData(this)},Object.defineProperty(t.prototype,"isDisposed",{get:function(){return this._disposed},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this._parent},set:function(t){if(this._parent!==t){if(this._parent)throw new Error("Cannot change parent widget.");if(t.layout!==this)throw new Error("Invalid parent widget.");this._parent=t,this.init()}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fitPolicy",{get:function(){return this._fitPolicy},set:function(t){if(this._fitPolicy!==t&&(this._fitPolicy=t,this._parent)){var e=this._parent.node.style;e.minWidth="",e.minHeight="",e.maxWidth="",e.maxHeight="",this._parent.fit()}},enumerable:!0,configurable:!0}),t.prototype.processParentMessage=function(t){switch(t.type){case"resize":this.onResize(t);break;case"update-request":this.onUpdateRequest(t);break;case"fit-request":this.onFitRequest(t);break;case"before-show":this.onBeforeShow(t);break;case"after-show":this.onAfterShow(t);break;case"before-hide":this.onBeforeHide(t);break;case"after-hide":this.onAfterHide(t);break;case"before-attach":this.onBeforeAttach(t);break;case"after-attach":this.onAfterAttach(t);break;case"before-detach":this.onBeforeDetach(t);break;case"after-detach":this.onAfterDetach(t);break;case"child-removed":this.onChildRemoved(t);break;case"child-shown":this.onChildShown(t);break;case"child-hidden":this.onChildHidden(t)}},t.prototype.init=function(){var t=this;o(this,(function(e){e.parent=t.parent}))},t.prototype.onResize=function(t){o(this,(function(t){Z.sendMessage(t,ft.ResizeMessage.UnknownSize)}))},t.prototype.onUpdateRequest=function(t){o(this,(function(t){Z.sendMessage(t,ft.ResizeMessage.UnknownSize)}))},t.prototype.onBeforeAttach=function(t){o(this,(function(e){Z.sendMessage(e,t)}))},t.prototype.onAfterAttach=function(t){o(this,(function(e){Z.sendMessage(e,t)}))},t.prototype.onBeforeDetach=function(t){o(this,(function(e){Z.sendMessage(e,t)}))},t.prototype.onAfterDetach=function(t){o(this,(function(e){Z.sendMessage(e,t)}))},t.prototype.onBeforeShow=function(t){o(this,(function(e){e.isHidden||Z.sendMessage(e,t)}))},t.prototype.onAfterShow=function(t){o(this,(function(e){e.isHidden||Z.sendMessage(e,t)}))},t.prototype.onBeforeHide=function(t){o(this,(function(e){e.isHidden||Z.sendMessage(e,t)}))},t.prototype.onAfterHide=function(t){o(this,(function(e){e.isHidden||Z.sendMessage(e,t)}))},t.prototype.onChildRemoved=function(t){this.removeWidget(t.child)},t.prototype.onFitRequest=function(t){},t.prototype.onChildShown=function(t){},t.prototype.onChildHidden=function(t){},t}();!function(t){t.getHorizontalAlignment=function(t){return gt.horizontalAlignmentProperty.get(t)},t.setHorizontalAlignment=function(t,e){gt.horizontalAlignmentProperty.set(t,e)},t.getVerticalAlignment=function(t){return gt.verticalAlignmentProperty.get(t)},t.setVerticalAlignment=function(t,e){gt.verticalAlignmentProperty.set(t,e)}}(mt||(mt={}));var gt,vt=function(){function t(t){this._top=NaN,this._left=NaN,this._width=NaN,this._height=NaN,this._minWidth=0,this._minHeight=0,this._maxWidth=1/0,this._maxHeight=1/0,this._disposed=!1,this.widget=t,this.widget.node.style.position="absolute"}return t.prototype.dispose=function(){if(!this._disposed){this._disposed=!0;var t=this.widget.node.style;t.position="",t.top="",t.left="",t.width="",t.height=""}},Object.defineProperty(t.prototype,"minWidth",{get:function(){return this._minWidth},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"minHeight",{get:function(){return this._minHeight},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxWidth",{get:function(){return this._maxWidth},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxHeight",{get:function(){return this._maxHeight},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isDisposed",{get:function(){return this._disposed},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isHidden",{get:function(){return this.widget.isHidden},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isVisible",{get:function(){return this.widget.isVisible},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isAttached",{get:function(){return this.widget.isAttached},enumerable:!0,configurable:!0}),t.prototype.fit=function(){var t=B.sizeLimits(this.widget.node);this._minWidth=t.minWidth,this._minHeight=t.minHeight,this._maxWidth=t.maxWidth,this._maxHeight=t.maxHeight},t.prototype.update=function(t,e,n,i){var o=Math.max(this._minWidth,Math.min(n,this._maxWidth)),r=Math.max(this._minHeight,Math.min(i,this._maxHeight));if(o<n)switch(mt.getHorizontalAlignment(this.widget)){case"left":break;case"center":t+=(n-o)/2;break;case"right":t+=n-o;break;default:throw"unreachable"}if(r<i)switch(mt.getVerticalAlignment(this.widget)){case"top":break;case"center":e+=(i-r)/2;break;case"bottom":e+=i-r;break;default:throw"unreachable"}var s=!1,a=this.widget.node.style;if(this._top!==e&&(this._top=e,a.top=e+"px"),this._left!==t&&(this._left=t,a.left=t+"px"),this._width!==o&&(s=!0,this._width=o,a.width=o+"px"),this._height!==r&&(s=!0,this._height=r,a.height=r+"px"),s){var d=new ft.ResizeMessage(o,r);Z.sendMessage(this.widget,d)}},t}();!function(t){function e(t){t.parent&&t.parent.layout&&t.parent.update()}t.horizontalAlignmentProperty=new S({name:"horizontalAlignment",create:function(){return"center"},changed:e}),t.verticalAlignmentProperty=new S({name:"verticalAlignment",create:function(){return"top"},changed:e})}(gt||(gt={}));var yt,bt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._widgets=[],e}return dt(e,t),e.prototype.dispose=function(){for(;this._widgets.length>0;)this._widgets.pop().dispose();t.prototype.dispose.call(this)},Object.defineProperty(e.prototype,"widgets",{get:function(){return this._widgets},enumerable:!0,configurable:!0}),e.prototype.iter=function(){return i(this._widgets)},e.prototype.addWidget=function(t){this.insertWidget(this._widgets.length,t)},e.prototype.insertWidget=function(t,e){e.parent=this.parent;var i=this._widgets.indexOf(e),o=Math.max(0,Math.min(t,this._widgets.length));if(-1===i)return n.insert(this._widgets,o,e),void(this.parent&&this.attachWidget(o,e));o===this._widgets.length&&o--,i!==o&&(n.move(this._widgets,i,o),this.parent&&this.moveWidget(i,o,e))},e.prototype.removeWidget=function(t){this.removeWidgetAt(this._widgets.indexOf(t))},e.prototype.removeWidgetAt=function(t){var e=n.removeAt(this._widgets,t);e&&this.parent&&this.detachWidget(t,e)},e.prototype.init=function(){var e=this;t.prototype.init.call(this),o(this,(function(t,n){e.attachWidget(n,t)}))},e.prototype.attachWidget=function(t,e){var n=this.parent.node.children[t];this.parent.isAttached&&Z.sendMessage(e,ft.Msg.BeforeAttach),this.parent.node.insertBefore(e.node,n),this.parent.isAttached&&Z.sendMessage(e,ft.Msg.AfterAttach)},e.prototype.moveWidget=function(t,e,n){this.parent.isAttached&&Z.sendMessage(n,ft.Msg.BeforeDetach),this.parent.node.removeChild(n.node),this.parent.isAttached&&Z.sendMessage(n,ft.Msg.AfterDetach);var i=this.parent.node.children[e];this.parent.isAttached&&Z.sendMessage(n,ft.Msg.BeforeAttach),this.parent.node.insertBefore(n.node,i),this.parent.isAttached&&Z.sendMessage(n,ft.Msg.AfterAttach)},e.prototype.detachWidget=function(t,e){this.parent.isAttached&&Z.sendMessage(e,ft.Msg.BeforeDetach),this.parent.node.removeChild(e.node),this.parent.isAttached&&Z.sendMessage(e,ft.Msg.AfterDetach)},e}(mt);!function(t){t.clampDimension=function(t){return Math.max(0,Math.floor(t))}}(yt||(yt={}));var _t,wt=yt,xt=function(t){function e(e){var n=t.call(this)||this;return n.widgetOffset=0,n._fixed=0,n._spacing=4,n._dirty=!1,n._hasNormedSizes=!1,n._sizers=[],n._items=[],n._handles=[],n._box=null,n._alignment="start",n._orientation="horizontal",n.renderer=e.renderer,void 0!==e.orientation&&(n._orientation=e.orientation),void 0!==e.alignment&&(n._alignment=e.alignment),void 0!==e.spacing&&(n._spacing=yt.clampDimension(e.spacing)),n}return dt(e,t),e.prototype.dispose=function(){o(this._items,(function(t){t.dispose()})),this._box=null,this._items.length=0,this._sizers.length=0,this._handles.length=0,t.prototype.dispose.call(this)},Object.defineProperty(e.prototype,"orientation",{get:function(){return this._orientation},set:function(t){this._orientation!==t&&(this._orientation=t,this.parent&&(this.parent.dataset.orientation=t,this.parent.fit()))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"alignment",{get:function(){return this._alignment},set:function(t){this._alignment!==t&&(this._alignment=t,this.parent&&(this.parent.dataset.alignment=t,this.parent.update()))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"spacing",{get:function(){return this._spacing},set:function(t){t=yt.clampDimension(t),this._spacing!==t&&(this._spacing=t,this.parent&&this.parent.fit())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"handles",{get:function(){return this._handles},enumerable:!0,configurable:!0}),e.prototype.absoluteSizes=function(){return this._sizers.map((function(t){return t.size}))},e.prototype.relativeSizes=function(){return _t.normalize(this._sizers.map((function(t){return t.size})))},e.prototype.setRelativeSizes=function(t,e){void 0===e&&(e=!0);for(var n=this._sizers.length,i=t.slice(0,n);i.length<n;)i.push(0);for(var o=_t.normalize(i),r=0;r<n;++r){var s=this._sizers[r];s.sizeHint=o[r],s.size=o[r]}this._hasNormedSizes=!0,e&&this.parent&&this.parent.update()},e.prototype.moveHandle=function(t,e){var n,i=this._handles[t];if(i&&!i.classList.contains("lm-mod-hidden")&&0!==(n="horizontal"===this._orientation?e-i.offsetLeft:e-i.offsetTop)){for(var o=0,r=this._sizers;o<r.length;o++){var s=r[o];s.size>0&&(s.sizeHint=s.size)}ht.adjust(this._sizers,t,n),this.parent&&this.parent.update()}},e.prototype.init=function(){this.parent.dataset.orientation=this.orientation,this.parent.dataset.alignment=this.alignment,t.prototype.init.call(this)},e.prototype.attachWidget=function(t,e){var i=new vt(e),o=_t.createHandle(this.renderer),r=_t.averageSize(this._sizers),s=_t.createSizer(r);n.insert(this._items,t,i),n.insert(this._sizers,t,s),n.insert(this._handles,t,o),this.parent.isAttached&&Z.sendMessage(e,ft.Msg.BeforeAttach),this.parent.node.appendChild(e.node),this.parent.node.appendChild(o),this.parent.isAttached&&Z.sendMessage(e,ft.Msg.AfterAttach),this.parent.fit()},e.prototype.moveWidget=function(t,e,i){n.move(this._items,t,e),n.move(this._sizers,t,e),n.move(this._handles,t,e),this.parent.fit()},e.prototype.detachWidget=function(t,e){var i=n.removeAt(this._items,t),o=n.removeAt(this._handles,t);n.removeAt(this._sizers,t),this.parent.isAttached&&Z.sendMessage(e,ft.Msg.BeforeDetach),this.parent.node.removeChild(e.node),this.parent.node.removeChild(o),this.parent.isAttached&&Z.sendMessage(e,ft.Msg.AfterDetach),i.dispose(),this.parent.fit()},e.prototype.onBeforeShow=function(e){t.prototype.onBeforeShow.call(this,e),this.parent.update()},e.prototype.onBeforeAttach=function(e){t.prototype.onBeforeAttach.call(this,e),this.parent.fit()},e.prototype.onChildShown=function(t){this.parent.fit()},e.prototype.onChildHidden=function(t){this.parent.fit()},e.prototype.onResize=function(t){this.parent.isVisible&&this._update(t.width,t.height)},e.prototype.onUpdateRequest=function(t){this.parent.isVisible&&this._update(-1,-1)},e.prototype.onFitRequest=function(t){this.parent.isAttached&&this._fit()},e.prototype.updateItemPosition=function(t,e,n,i,o,r,s){var a=this._items[t];if(!a.isHidden){var d=this._handles[t].style;e?(n+=this.widgetOffset,a.update(n,i,s,o),n+=s,d.top=i+"px",d.left=n+"px",d.width=this._spacing+"px",d.height=o+"px"):(i+=this.widgetOffset,a.update(n,i,r,s),i+=s,d.top=i+"px",d.left=n+"px",d.width=r+"px",d.height=this._spacing+"px")}},e.prototype._fit=function(){for(var t=0,n=-1,i=0,o=this._items.length;i<o;++i)this._items[i].isHidden?(this._handles[i].classList.add("lm-mod-hidden"),this._handles[i].classList.add("p-mod-hidden")):(this._handles[i].classList.remove("lm-mod-hidden"),this._handles[i].classList.remove("p-mod-hidden"),n=i,t++);-1!==n&&(this._handles[n].classList.add("lm-mod-hidden"),this._handles[n].classList.add("p-mod-hidden")),this._fixed=this._spacing*Math.max(0,t-1)+this.widgetOffset*this._items.length;var r="horizontal"===this._orientation,s=r?this._fixed:0,a=r?0:this._fixed;for(i=0,o=this._items.length;i<o;++i){var d=this._items[i],c=this._sizers[i];c.size>0&&(c.sizeHint=c.size),d.isHidden?(c.minSize=0,c.maxSize=0):(d.fit(),c.stretch=e.getStretch(d.widget),r?(c.minSize=d.minWidth,c.maxSize=d.maxWidth,s+=d.minWidth,a=Math.max(a,d.minHeight)):(c.minSize=d.minHeight,c.maxSize=d.maxHeight,a+=d.minHeight,s=Math.max(s,d.minWidth)))}var h=this._box=B.boxSizing(this.parent.node);s+=h.horizontalSum,a+=h.verticalSum;var l=this.parent.node.style;l.minWidth=s+"px",l.minHeight=a+"px",this._dirty=!0,this.parent.parent&&Z.sendMessage(this.parent.parent,ft.Msg.FitRequest),this._dirty&&Z.sendMessage(this.parent,ft.Msg.UpdateRequest)},e.prototype._update=function(t,e){this._dirty=!1;for(var n=0,i=0,o=this._items.length;i<o;++i)n+=+!this._items[i].isHidden;if(0!==n||0!==this.widgetOffset){t<0&&(t=this.parent.node.offsetWidth),e<0&&(e=this.parent.node.offsetHeight),this._box||(this._box=B.boxSizing(this.parent.node));var r=this._box.paddingTop,s=this._box.paddingLeft,a=t-this._box.horizontalSum,d=e-this._box.verticalSum,c=0,h=0,l="horizontal"===this._orientation;if(n>0){var u=void 0;if(u=l?Math.max(0,a-this._fixed):Math.max(0,d-this._fixed),this._hasNormedSizes){for(var p=0,f=this._sizers;p<f.length;p++){f[p].sizeHint*=u}this._hasNormedSizes=!1}var m=ht.calc(this._sizers,u);if(m>0)switch(this._alignment){case"start":break;case"center":c=0,h=m/2;break;case"end":c=0,h=m;break;case"justify":c=m/n,h=0;break;default:throw"unreachable"}}for(i=0,o=this._items.length;i<o;++i){var g=this._items[i].isHidden?0:this._sizers[i].size+c;this.updateItemPosition(i,l,l?s+h:s,l?r:r+h,d,a,g);var v=this.widgetOffset+(this._handles[i].classList.contains("lm-mod-hidden")?0:this._spacing);l?s+=g+v:r+=g+v}}},e}(bt);!function(t){t.getStretch=function(t){return _t.stretchProperty.get(t)},t.setStretch=function(t,e){_t.stretchProperty.set(t,e)}}(xt||(xt={})),function(t){t.stretchProperty=new S({name:"stretch",create:function(){return 0},coerce:function(t,e){return Math.max(0,Math.floor(e))},changed:function(t){t.parent&&t.parent.layout instanceof xt&&t.parent.fit()}}),t.createSizer=function(t){var e=new lt;return e.sizeHint=Math.floor(t),e},t.createHandle=function(t){var e=t.createHandle();return e.style.position="absolute",e},t.averageSize=function(t){return t.reduce((function(t,e){return t+e.size}),0)/t.length||0},t.normalize=function(t){var e=t.length;if(0===e)return[];var n=t.reduce((function(t,e){return t+Math.abs(e)}),0);return 0===n?t.map((function(t){return 1/e})):t.map((function(t){return t/n}))}}(_t||(_t={}));var Mt,Ct=function(t){function e(e){var n=t.call(this,ct(ct({},e),{orientation:e.orientation||"vertical"}))||this;return n._titles=[],n.titleSpace=e.titleSpace||22,n}return dt(e,t),Object.defineProperty(e.prototype,"titleSpace",{get:function(){return this.widgetOffset},set:function(t){t=wt.clampDimension(t),this.widgetOffset!==t&&(this.widgetOffset=t,this.parent&&this.parent.fit())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"titles",{get:function(){return this._titles},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.isDisposed||(this._titles.length=0,t.prototype.dispose.call(this))},e.prototype.updateTitle=function(t,e){var n=this._titles[t],i=n.classList.contains("lm-mod-expanded"),o=Mt.createTitle(this.renderer,e.title,i);this._titles[t]=o,this.parent.node.replaceChild(o,n)},e.prototype.attachWidget=function(e,i){var o=Mt.createTitle(this.renderer,i.title);n.insert(this._titles,e,o),this.parent.node.appendChild(o),i.node.setAttribute("role","region"),i.node.setAttribute("aria-labelledby",o.id),t.prototype.attachWidget.call(this,e,i)},e.prototype.moveWidget=function(e,i,o){n.move(this._titles,e,i),t.prototype.moveWidget.call(this,e,i,o)},e.prototype.detachWidget=function(e,i){var o=n.removeAt(this._titles,e);this.parent.node.removeChild(o),t.prototype.detachWidget.call(this,e,i)},e.prototype.updateItemPosition=function(e,n,i,o,r,s,a){var d=this._titles[e].style;d.top=o+"px",d.left=i+"px",d.height=this.widgetOffset+"px",d.width=n?r+"px":s+"px",t.prototype.updateItemPosition.call(this,e,n,i,o,r,s,a)},e}(xt);!function(t){t.createTitle=function(t,e,n){void 0===n&&(n=!0);var i=t.createSectionTitle(e);return i.style.position="absolute",i.setAttribute("aria-label",e.label+" Section"),i.setAttribute("aria-expanded",n?"true":"false"),i.setAttribute("aria-controls",e.owner.id),n&&i.classList.add("lm-mod-expanded"),i}}(Mt||(Mt={}));var zt,St=function(t){function e(e){void 0===e&&(e={});var n=t.call(this)||this;return n.addClass("lm-Panel"),n.addClass("p-Panel"),n.layout=zt.createLayout(e),n}return dt(e,t),Object.defineProperty(e.prototype,"widgets",{get:function(){return this.layout.widgets},enumerable:!0,configurable:!0}),e.prototype.addWidget=function(t){this.layout.addWidget(t)},e.prototype.insertWidget=function(t,e){this.layout.insertWidget(t,e)},e}(ft);!function(t){t.createLayout=function(t){return t.layout||new bt}}(zt||(zt={}));var Pt,At=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,{layout:Pt.createLayout(e)})||this;return n._handleMoved=new A(n),n._pressData=null,n.addClass("lm-SplitPanel"),n.addClass("p-SplitPanel"),n}return dt(e,t),e.prototype.dispose=function(){this._releaseMouse(),t.prototype.dispose.call(this)},Object.defineProperty(e.prototype,"orientation",{get:function(){return this.layout.orientation},set:function(t){this.layout.orientation=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"alignment",{get:function(){return this.layout.alignment},set:function(t){this.layout.alignment=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"spacing",{get:function(){return this.layout.spacing},set:function(t){this.layout.spacing=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"renderer",{get:function(){return this.layout.renderer},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"handleMoved",{get:function(){return this._handleMoved},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"handles",{get:function(){return this.layout.handles},enumerable:!0,configurable:!0}),e.prototype.relativeSizes=function(){return this.layout.relativeSizes()},e.prototype.setRelativeSizes=function(t,e){void 0===e&&(e=!0),this.layout.setRelativeSizes(t,e)},e.prototype.handleEvent=function(t){switch(t.type){case"mousedown":case"pointerdown":this._evtMouseDown(t);break;case"mousemove":case"pointermove":this._evtMouseMove(t);break;case"mouseup":case"pointerup":this._evtMouseUp(t);break;case"keydown":this._evtKeyDown(t);break;case"contextmenu":t.preventDefault(),t.stopPropagation()}},e.prototype.onBeforeAttach=function(t){this.node.addEventListener("mousedown",this),this.node.addEventListener("pointerdown",this)},e.prototype.onAfterDetach=function(t){this.node.removeEventListener("mousedown",this),this.node.removeEventListener("pointerdown",this),this._releaseMouse()},e.prototype.onChildAdded=function(t){t.child.addClass("lm-SplitPanel-child"),t.child.addClass("p-SplitPanel-child"),this._releaseMouse()},e.prototype.onChildRemoved=function(t){t.child.removeClass("lm-SplitPanel-child"),t.child.removeClass("p-SplitPanel-child"),this._releaseMouse()},e.prototype._evtKeyDown=function(t){this._pressData&&(t.preventDefault(),t.stopPropagation()),27===t.keyCode&&this._releaseMouse()},e.prototype._evtMouseDown=function(t){if(0===t.button){var e=this.layout,i=n.findFirstIndex(e.handles,(function(e){return e.contains(t.target)}));if(-1!==i){var o;t.preventDefault(),t.stopPropagation(),document.addEventListener("mouseup",this,!0),document.addEventListener("mousemove",this,!0),document.addEventListener("pointerup",this,!0),document.addEventListener("pointermove",this,!0),document.addEventListener("keydown",this,!0),document.addEventListener("contextmenu",this,!0);var r=e.handles[i],s=r.getBoundingClientRect();o="horizontal"===e.orientation?t.clientX-s.left:t.clientY-s.top;var a=window.getComputedStyle(r),d=tt.overrideCursor(a.cursor);this._pressData={index:i,delta:o,override:d}}}},e.prototype._evtMouseMove=function(t){var e;t.preventDefault(),t.stopPropagation();var n=this.layout,i=this.node.getBoundingClientRect();e="horizontal"===n.orientation?t.clientX-i.left-this._pressData.delta:t.clientY-i.top-this._pressData.delta,n.moveHandle(this._pressData.index,e)},e.prototype._evtMouseUp=function(t){0===t.button&&(t.preventDefault(),t.stopPropagation(),this._releaseMouse())},e.prototype._releaseMouse=function(){this._pressData&&(this._pressData.override.dispose(),this._pressData=null,this._handleMoved.emit(),document.removeEventListener("mouseup",this,!0),document.removeEventListener("mousemove",this,!0),document.removeEventListener("keydown",this,!0),document.removeEventListener("pointerup",this,!0),document.removeEventListener("pointermove",this,!0),document.removeEventListener("contextmenu",this,!0))},e}(St);!function(t){var e=function(){function t(){}return t.prototype.createHandle=function(){var t=document.createElement("div");return t.className="lm-SplitPanel-handle",t.classList.add("p-SplitPanel-handle"),t},t}();t.Renderer=e,t.defaultRenderer=new e,t.getStretch=function(t){return xt.getStretch(t)},t.setStretch=function(t,e){xt.setStretch(t,e)}}(At||(At={})),function(t){t.createLayout=function(t){return t.layout||new xt({renderer:t.renderer||At.defaultRenderer,orientation:t.orientation,alignment:t.alignment,spacing:t.spacing})}}(Pt||(Pt={}));var It,Tt=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,ct(ct({},e),{layout:It.createLayout(e)}))||this;return n._widgetSizesCache=new WeakMap,n.addClass("lm-AccordionPanel"),n}return dt(e,t),Object.defineProperty(e.prototype,"renderer",{get:function(){return this.layout.renderer},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"titleSpace",{get:function(){return this.layout.titleSpace},set:function(t){this.layout.titleSpace=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"titles",{get:function(){return this.layout.titles},enumerable:!0,configurable:!0}),e.prototype.addWidget=function(e){t.prototype.addWidget.call(this,e),e.title.changed.connect(this._onTitleChanged,this)},e.prototype.collapse=function(t){var e=this.layout.widgets[t];e&&!e.isHidden&&this._toggleExpansion(t)},e.prototype.expand=function(t){var e=this.layout.widgets[t];e&&e.isHidden&&this._toggleExpansion(t)},e.prototype.insertWidget=function(e,n){t.prototype.insertWidget.call(this,e,n),n.title.changed.connect(this._onTitleChanged,this)},e.prototype.handleEvent=function(e){switch(t.prototype.handleEvent.call(this,e),e.type){case"click":this._evtClick(e);break;case"keydown":this._eventKeyDown(e)}},e.prototype.onBeforeAttach=function(e){this.node.addEventListener("click",this),this.node.addEventListener("keydown",this),t.prototype.onBeforeAttach.call(this,e)},e.prototype.onAfterDetach=function(e){t.prototype.onAfterDetach.call(this,e),this.node.removeEventListener("click",this),this.node.removeEventListener("keydown",this)},e.prototype._onTitleChanged=function(t){var e=n.findFirstIndex(this.widgets,(function(e){return e.contains(t.owner)}));e>=0&&(this.layout.updateTitle(e,t.owner),this.update())},e.prototype._computeWidgetSize=function(t){var e=this.layout,n=e.widgets[t];if(n){var i=n.isHidden,o=e.absoluteSizes(),r=(i?-1:1)*this.spacing,s=o.reduce((function(t,e){return t+e})),a=function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var i=Array(t),o=0;for(e=0;e<n;e++)for(var r=arguments[e],s=0,a=r.length;s<a;s++,o++)i[o]=r[s];return i}(o);if(i){var d=this._widgetSizesCache.get(n);if(!d)return;a[t]+=d,-1===(c=a.map((function(t){return t-d>0})).lastIndexOf(!0))?a.forEach((function(e,n){n!==t&&(a[n]-=o[n]/s*(d-r))})):a[c]-=d-r}else{var c,h=o[t];if(this._widgetSizesCache.set(n,h),a[t]=0,-1===(c=a.map((function(t){return t>0})).lastIndexOf(!0)))return;a[c]=o[c]+h+r}return a.map((function(t){return t/(s+r)}))}},e.prototype._evtClick=function(t){var e=t.target;if(e){var i=n.findFirstIndex(this.titles,(function(t){return t.contains(e)}));i>=0&&(t.preventDefault(),t.stopPropagation(),this._toggleExpansion(i))}},e.prototype._eventKeyDown=function(t){if(!t.defaultPrevented){var e=t.target,i=!1;if(e){var o=n.findFirstIndex(this.titles,(function(t){return t.contains(e)}));if(o>=0){var r=t.keyCode.toString();if(t.key.match(/Space|Enter/)||r.match(/13|32/))e.click(),i=!0;else if("horizontal"===this.orientation?t.key.match(/ArrowLeft|ArrowRight/)||r.match(/37|39/):t.key.match(/ArrowUp|ArrowDown/)||r.match(/38|40/)){var s=t.key.match(/ArrowLeft|ArrowUp/)||r.match(/37|38/)?-1:1,a=this.titles.length,d=(o+a+s)%a;this.titles[d].focus(),i=!0}else"End"===t.key||"35"===r?(this.titles[this.titles.length-1].focus(),i=!0):"Home"!==t.key&&"36"!==r||(this.titles[0].focus(),i=!0)}i&&t.preventDefault()}}},e.prototype._toggleExpansion=function(t){var e=this.titles[t],n=this.layout.widgets[t],i=this._computeWidgetSize(t);i&&this.setRelativeSizes(i,!1),n.isHidden?(e.classList.add("lm-mod-expanded"),e.setAttribute("aria-expanded","true"),n.show()):(e.classList.remove("lm-mod-expanded"),e.setAttribute("aria-expanded","false"),n.hide())},e}(At);!function(t){var e=function(t){function e(){var n=t.call(this)||this;return n.titleClassName="lm-AccordionPanel-title",n._titleID=0,n._titleKeys=new WeakMap,n._uuid=++e._nInstance,n}return dt(e,t),e.prototype.createCollapseIcon=function(t){return document.createElement("span")},e.prototype.createSectionTitle=function(t){var e=document.createElement("h3");for(var n in e.setAttribute("role","button"),e.setAttribute("tabindex","0"),e.id=this.createTitleKey(t),e.className=this.titleClassName,t.dataset)e.dataset[n]=t.dataset[n];e.appendChild(this.createCollapseIcon(t)).className="lm-AccordionPanel-titleCollapser";var i=e.appendChild(document.createElement("span"));return i.className="lm-AccordionPanel-titleLabel",i.textContent=t.label,i.title=t.caption||t.label,e},e.prototype.createTitleKey=function(t){var e=this._titleKeys.get(t);return void 0===e&&(e="title-key-"+this._uuid+"-"+this._titleID++,this._titleKeys.set(t,e)),e},e._nInstance=0,e}(At.Renderer);t.Renderer=e,t.defaultRenderer=new e}(Tt||(Tt={})),function(t){t.createLayout=function(t){return t.layout||new Ct({renderer:t.renderer||Tt.defaultRenderer,orientation:t.orientation,alignment:t.alignment,spacing:t.spacing,titleSpace:t.titleSpace})}}(It||(It={}));var Lt,Et=function(t){function e(e){void 0===e&&(e={});var n=t.call(this)||this;return n._fixed=0,n._spacing=4,n._dirty=!1,n._sizers=[],n._items=[],n._box=null,n._alignment="start",n._direction="top-to-bottom",void 0!==e.direction&&(n._direction=e.direction),void 0!==e.alignment&&(n._alignment=e.alignment),void 0!==e.spacing&&(n._spacing=wt.clampDimension(e.spacing)),n}return dt(e,t),e.prototype.dispose=function(){o(this._items,(function(t){t.dispose()})),this._box=null,this._items.length=0,this._sizers.length=0,t.prototype.dispose.call(this)},Object.defineProperty(e.prototype,"direction",{get:function(){return this._direction},set:function(t){this._direction!==t&&(this._direction=t,this.parent&&(this.parent.dataset.direction=t,this.parent.fit()))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"alignment",{get:function(){return this._alignment},set:function(t){this._alignment!==t&&(this._alignment=t,this.parent&&(this.parent.dataset.alignment=t,this.parent.update()))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"spacing",{get:function(){return this._spacing},set:function(t){t=wt.clampDimension(t),this._spacing!==t&&(this._spacing=t,this.parent&&this.parent.fit())},enumerable:!0,configurable:!0}),e.prototype.init=function(){this.parent.dataset.direction=this.direction,this.parent.dataset.alignment=this.alignment,t.prototype.init.call(this)},e.prototype.attachWidget=function(t,e){n.insert(this._items,t,new vt(e)),n.insert(this._sizers,t,new lt),this.parent.isAttached&&Z.sendMessage(e,ft.Msg.BeforeAttach),this.parent.node.appendChild(e.node),this.parent.isAttached&&Z.sendMessage(e,ft.Msg.AfterAttach),this.parent.fit()},e.prototype.moveWidget=function(t,e,i){n.move(this._items,t,e),n.move(this._sizers,t,e),this.parent.update()},e.prototype.detachWidget=function(t,e){var i=n.removeAt(this._items,t);n.removeAt(this._sizers,t),this.parent.isAttached&&Z.sendMessage(e,ft.Msg.BeforeDetach),this.parent.node.removeChild(e.node),this.parent.isAttached&&Z.sendMessage(e,ft.Msg.AfterDetach),i.dispose(),this.parent.fit()},e.prototype.onBeforeShow=function(e){t.prototype.onBeforeShow.call(this,e),this.parent.update()},e.prototype.onBeforeAttach=function(e){t.prototype.onBeforeAttach.call(this,e),this.parent.fit()},e.prototype.onChildShown=function(t){this.parent.fit()},e.prototype.onChildHidden=function(t){this.parent.fit()},e.prototype.onResize=function(t){this.parent.isVisible&&this._update(t.width,t.height)},e.prototype.onUpdateRequest=function(t){this.parent.isVisible&&this._update(-1,-1)},e.prototype.onFitRequest=function(t){this.parent.isAttached&&this._fit()},e.prototype._fit=function(){for(var t=0,n=0,i=this._items.length;n<i;++n)t+=+!this._items[n].isHidden;this._fixed=this._spacing*Math.max(0,t-1);var o=Lt.isHorizontal(this._direction),r=o?this._fixed:0,s=o?0:this._fixed;for(n=0,i=this._items.length;n<i;++n){var a=this._items[n],d=this._sizers[n];a.isHidden?(d.minSize=0,d.maxSize=0):(a.fit(),d.sizeHint=e.getSizeBasis(a.widget),d.stretch=e.getStretch(a.widget),o?(d.minSize=a.minWidth,d.maxSize=a.maxWidth,r+=a.minWidth,s=Math.max(s,a.minHeight)):(d.minSize=a.minHeight,d.maxSize=a.maxHeight,s+=a.minHeight,r=Math.max(r,a.minWidth)))}var c=this._box=B.boxSizing(this.parent.node);r+=c.horizontalSum,s+=c.verticalSum;var h=this.parent.node.style;h.minWidth=r+"px",h.minHeight=s+"px",this._dirty=!0,this.parent.parent&&Z.sendMessage(this.parent.parent,ft.Msg.FitRequest),this._dirty&&Z.sendMessage(this.parent,ft.Msg.UpdateRequest)},e.prototype._update=function(t,e){this._dirty=!1;for(var n=0,i=0,o=this._items.length;i<o;++i)n+=+!this._items[i].isHidden;if(0!==n){t<0&&(t=this.parent.node.offsetWidth),e<0&&(e=this.parent.node.offsetHeight),this._box||(this._box=B.boxSizing(this.parent.node));var r,s=this._box.paddingTop,a=this._box.paddingLeft,d=t-this._box.horizontalSum,c=e-this._box.verticalSum;switch(this._direction){case"left-to-right":r=ht.calc(this._sizers,Math.max(0,d-this._fixed));break;case"top-to-bottom":r=ht.calc(this._sizers,Math.max(0,c-this._fixed));break;case"right-to-left":r=ht.calc(this._sizers,Math.max(0,d-this._fixed)),a+=d;break;case"bottom-to-top":r=ht.calc(this._sizers,Math.max(0,c-this._fixed)),s+=c;break;default:throw"unreachable"}var h=0,l=0;if(r>0)switch(this._alignment){case"start":break;case"center":h=0,l=r/2;break;case"end":h=0,l=r;break;case"justify":h=r/n,l=0;break;default:throw"unreachable"}for(i=0,o=this._items.length;i<o;++i){var u=this._items[i];if(!u.isHidden){var p=this._sizers[i].size;switch(this._direction){case"left-to-right":u.update(a+l,s,p+h,c),a+=p+h+this._spacing;break;case"top-to-bottom":u.update(a,s+l,d,p+h),s+=p+h+this._spacing;break;case"right-to-left":u.update(a-l-p-h,s,p+h,c),a-=p+h+this._spacing;break;case"bottom-to-top":u.update(a,s-l-p-h,d,p+h),s-=p+h+this._spacing;break;default:throw"unreachable"}}}}},e}(bt);!function(t){t.getStretch=function(t){return Lt.stretchProperty.get(t)},t.setStretch=function(t,e){Lt.stretchProperty.set(t,e)},t.getSizeBasis=function(t){return Lt.sizeBasisProperty.get(t)},t.setSizeBasis=function(t,e){Lt.sizeBasisProperty.set(t,e)}}(Et||(Et={})),function(t){function e(t){t.parent&&t.parent.layout instanceof Et&&t.parent.fit()}t.stretchProperty=new S({name:"stretch",create:function(){return 0},coerce:function(t,e){return Math.max(0,Math.floor(e))},changed:e}),t.sizeBasisProperty=new S({name:"sizeBasis",create:function(){return 0},coerce:function(t,e){return Math.max(0,Math.floor(e))},changed:e}),t.isHorizontal=function(t){return"left-to-right"===t||"right-to-left"===t},t.clampSpacing=function(t){return Math.max(0,Math.floor(t))}}(Lt||(Lt={}));var kt,Bt,Dt,Ot,Rt=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,{layout:kt.createLayout(e)})||this;return n.addClass("lm-BoxPanel"),n.addClass("p-BoxPanel"),n}return dt(e,t),Object.defineProperty(e.prototype,"direction",{get:function(){return this.layout.direction},set:function(t){this.layout.direction=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"alignment",{get:function(){return this.layout.alignment},set:function(t){this.layout.alignment=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"spacing",{get:function(){return this.layout.spacing},set:function(t){this.layout.spacing=t},enumerable:!0,configurable:!0}),e.prototype.onChildAdded=function(t){t.child.addClass("lm-BoxPanel-child"),t.child.addClass("p-BoxPanel-child")},e.prototype.onChildRemoved=function(t){t.child.removeClass("lm-BoxPanel-child"),t.child.removeClass("p-BoxPanel-child")},e}(St);!function(t){t.getStretch=function(t){return Et.getStretch(t)},t.setStretch=function(t,e){Et.setStretch(t,e)},t.getSizeBasis=function(t){return Et.getSizeBasis(t)},t.setSizeBasis=function(t,e){Et.setSizeBasis(t,e)}}(Rt||(Rt={})),function(t){t.createLayout=function(t){return t.layout||new Et(t)}}(kt||(kt={})),t.CommandPalette=function(t){function e(n){var i=t.call(this,{node:Ot.createNode()})||this;return i._activeIndex=-1,i._items=[],i._results=null,i.addClass("lm-CommandPalette"),i.addClass("p-CommandPalette"),i.setFlag(ft.Flag.DisallowLayout),i.commands=n.commands,i.renderer=n.renderer||e.defaultRenderer,i.commands.commandChanged.connect(i._onGenericChange,i),i.commands.keyBindingChanged.connect(i._onGenericChange,i),i}return dt(e,t),e.prototype.dispose=function(){this._items.length=0,this._results=null,t.prototype.dispose.call(this)},Object.defineProperty(e.prototype,"searchNode",{get:function(){return this.node.getElementsByClassName("lm-CommandPalette-search")[0]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inputNode",{get:function(){return this.node.getElementsByClassName("lm-CommandPalette-input")[0]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contentNode",{get:function(){return this.node.getElementsByClassName("lm-CommandPalette-content")[0]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"items",{get:function(){return this._items},enumerable:!0,configurable:!0}),e.prototype.addItem=function(t){var e=Ot.createItem(this.commands,t);return this._items.push(e),this.refresh(),e},e.prototype.addItems=function(t){var e=this,n=t.map((function(t){return Ot.createItem(e.commands,t)}));return n.forEach((function(t){return e._items.push(t)})),this.refresh(),n},e.prototype.removeItem=function(t){this.removeItemAt(this._items.indexOf(t))},e.prototype.removeItemAt=function(t){n.removeAt(this._items,t)&&this.refresh()},e.prototype.clearItems=function(){0!==this._items.length&&(this._items.length=0,this.refresh())},e.prototype.refresh=function(){(this._results=null,""!==this.inputNode.value)?this.node.getElementsByClassName("lm-close-icon")[0].style.display="inherit":this.node.getElementsByClassName("lm-close-icon")[0].style.display="none";this.update()},e.prototype.handleEvent=function(t){switch(t.type){case"click":this._evtClick(t);break;case"keydown":this._evtKeyDown(t);break;case"input":this.refresh();break;case"focus":case"blur":this._toggleFocused()}},e.prototype.onBeforeAttach=function(t){this.node.addEventListener("click",this),this.node.addEventListener("keydown",this),this.node.addEventListener("input",this),this.node.addEventListener("focus",this,!0),this.node.addEventListener("blur",this,!0)},e.prototype.onAfterDetach=function(t){this.node.removeEventListener("click",this),this.node.removeEventListener("keydown",this),this.node.removeEventListener("input",this),this.node.removeEventListener("focus",this,!0),this.node.removeEventListener("blur",this,!0)},e.prototype.onActivateRequest=function(t){if(this.isAttached){var e=this.inputNode;e.focus(),e.select()}},e.prototype.onUpdateRequest=function(t){var e=this.inputNode.value,i=this.contentNode,o=this._results;if(o||(o=this._results=Ot.search(this._items,e),this._activeIndex=e?n.findFirstIndex(o,Ot.canActivate):-1),e||0!==o.length)if(e&&0===o.length){var r=this.renderer.renderEmptyMessage({query:e});nt.render(r,i)}else{for(var s=this.renderer,a=this._activeIndex,d=new Array(o.length),c=0,h=o.length;c<h;++c){var l=o[c];if("header"===l.type){var u=l.indices,p=l.category;d[c]=s.renderHeader({category:p,indices:u})}else{var f=l.item,m=(u=l.indices,c===a);d[c]=s.renderItem({item:f,indices:u,active:m})}}if(nt.render(d,i),a<0||a>=o.length)i.scrollTop=0;else{var g=i.children[a];B.scrollIntoViewIfNeeded(i,g)}}else nt.render(null,i)},e.prototype._evtClick=function(t){if(0===t.button){if(t.target.classList.contains("lm-close-icon"))return this.inputNode.value="",void this.refresh();var e=n.findFirstIndex(this.contentNode.children,(function(e){return e.contains(t.target)}));-1!==e&&(t.preventDefault(),t.stopPropagation(),this._execute(e))}},e.prototype._evtKeyDown=function(t){if(!(t.altKey||t.ctrlKey||t.metaKey||t.shiftKey))switch(t.keyCode){case 13:t.preventDefault(),t.stopPropagation(),this._execute(this._activeIndex);break;case 38:t.preventDefault(),t.stopPropagation(),this._activatePreviousItem();break;case 40:t.preventDefault(),t.stopPropagation(),this._activateNextItem()}},e.prototype._activateNextItem=function(){if(this._results&&0!==this._results.length){var t=this._activeIndex,e=this._results.length,i=t<e-1?t+1:0,o=0===i?e-1:i-1;this._activeIndex=n.findFirstIndex(this._results,Ot.canActivate,i,o),this.update()}},e.prototype._activatePreviousItem=function(){if(this._results&&0!==this._results.length){var t=this._activeIndex,e=this._results.length,i=t<=0?e-1:t-1,o=i===e-1?0:i+1;this._activeIndex=n.findLastIndex(this._results,Ot.canActivate,i,o),this.update()}},e.prototype._execute=function(t){if(this._results){var e=this._results[t];if(e){if("header"===e.type){var n=this.inputNode;return n.value=e.category.toLowerCase()+" ",n.focus(),void this.refresh()}e.item.isEnabled&&(this.commands.execute(e.item.command,e.item.args),this.inputNode.value="",this.refresh())}}},e.prototype._toggleFocused=function(){var t=document.activeElement===this.inputNode;this.toggleClass("lm-mod-focused",t),this.toggleClass("p-mod-focused",t)},e.prototype._onGenericChange=function(){this.refresh()},e}(ft),Bt=t.CommandPalette||(t.CommandPalette={}),Dt=function(){function e(){}return e.prototype.renderHeader=function(t){var e=this.formatHeader(t);return st.li({className:"lm-CommandPalette-header p-CommandPalette-header"},e)},e.prototype.renderItem=function(t){var e=this.createItemClass(t),n=this.createItemDataset(t);return t.item.isToggleable?st.li({className:e,dataset:n,role:"checkbox","aria-checked":""+t.item.isToggled},this.renderItemIcon(t),this.renderItemContent(t),this.renderItemShortcut(t)):st.li({className:e,dataset:n},this.renderItemIcon(t),this.renderItemContent(t),this.renderItemShortcut(t))},e.prototype.renderEmptyMessage=function(t){var e=this.formatEmptyMessage(t);return st.li({className:"lm-CommandPalette-emptyMessage p-CommandPalette-emptyMessage"},e)},e.prototype.renderItemIcon=function(t){var e=this.createIconClass(t);return"string"==typeof t.item.icon?st.div({className:e},t.item.iconLabel):st.div({className:e},t.item.icon,t.item.iconLabel)},e.prototype.renderItemContent=function(t){return st.div({className:"lm-CommandPalette-itemContent p-CommandPalette-itemContent"},this.renderItemLabel(t),this.renderItemCaption(t))},e.prototype.renderItemLabel=function(t){var e=this.formatItemLabel(t);return st.div({className:"lm-CommandPalette-itemLabel p-CommandPalette-itemLabel"},e)},e.prototype.renderItemCaption=function(t){var e=this.formatItemCaption(t);return st.div({className:"lm-CommandPalette-itemCaption p-CommandPalette-itemCaption"},e)},e.prototype.renderItemShortcut=function(t){var e=this.formatItemShortcut(t);return st.div({className:"lm-CommandPalette-itemShortcut p-CommandPalette-itemShortcut"},e)},e.prototype.createItemClass=function(t){var e="lm-CommandPalette-item";e+=" p-CommandPalette-item",t.item.isEnabled||(e+=" lm-mod-disabled",e+=" p-mod-disabled"),t.item.isToggled&&(e+=" lm-mod-toggled",e+=" p-mod-toggled"),t.active&&(e+=" lm-mod-active",e+=" p-mod-active");var n=t.item.className;return n&&(e+=" "+n),e},e.prototype.createItemDataset=function(t){return ct(ct({},t.item.dataset),{command:t.item.command})},e.prototype.createIconClass=function(t){var e="lm-CommandPalette-itemIcon";e+=" p-CommandPalette-itemIcon";var n=t.item.iconClass;return n?e+" "+n:e},e.prototype.formatHeader=function(t){return t.indices&&0!==t.indices.length?y.highlight(t.category,t.indices,st.mark):t.category},e.prototype.formatEmptyMessage=function(t){return"No commands found that match '"+t.query+"'"},e.prototype.formatItemShortcut=function(e){var n=e.item.keyBinding;return n?t.CommandRegistry.formatKeystroke(n.keys):null},e.prototype.formatItemLabel=function(t){return t.indices&&0!==t.indices.length?y.highlight(t.item.label,t.indices,st.mark):t.item.label},e.prototype.formatItemCaption=function(t){return t.item.caption},e}(),Bt.Renderer=Dt,Bt.defaultRenderer=new Dt,function(t){function e(t,e){for(var i=t.category.toLowerCase(),o=i+" "+t.label.toLowerCase(),r=1/0,s=null,a=/\b\w/g;;){var d=a.exec(o);if(!d)break;var c=y.matchSumOfDeltas(o,e,d.index);if(!c)break;c&&c.score<=r&&(r=c.score,s=c.indices)}if(!s||r===1/0)return null;for(var h=i.length+1,l=n.lowerBound(s,h,(function(t,e){return t-e})),u=s.slice(0,l),p=s.slice(l),f=0,m=p.length;f<m;++f)p[f]-=h;return 0===u.length?{matchType:0,categoryIndices:null,labelIndices:p,score:r,item:t}:0===p.length?{matchType:1,categoryIndices:u,labelIndices:null,score:r,item:t}:{matchType:2,categoryIndices:u,labelIndices:p,score:r,item:t}}function i(t,e){var n=t.matchType-e.matchType;if(0!==n)return n;var i=t.score-e.score;if(0!==i)return i;var o=0,r=0;switch(t.matchType){case 0:o=t.labelIndices[0],r=e.labelIndices[0];break;case 1:case 2:o=t.categoryIndices[0],r=e.categoryIndices[0]}if(o!==r)return o-r;var s=t.item.category.localeCompare(e.item.category);if(0!==s)return s;var a=t.item.rank,d=e.item.rank;return a!==d?a<d?-1:1:t.item.label.localeCompare(e.item.label)}t.createNode=function(){var t=document.createElement("div"),e=document.createElement("div"),n=document.createElement("div"),i=document.createElement("input"),o=document.createElement("ul"),r=document.createElement("button");return e.className="lm-CommandPalette-search",n.className="lm-CommandPalette-wrapper",i.className="lm-CommandPalette-input",r.className="lm-close-icon",o.className="lm-CommandPalette-content",e.classList.add("p-CommandPalette-search"),n.classList.add("p-CommandPalette-wrapper"),i.classList.add("p-CommandPalette-input"),o.classList.add("p-CommandPalette-content"),i.spellcheck=!1,n.appendChild(i),n.appendChild(r),e.appendChild(n),t.appendChild(e),t.appendChild(o),t},t.createItem=function(t,e){return new o(t,e)},t.search=function(t,o){var r=function(t,n){i=n,n=i.replace(/\s+/g,"").toLowerCase();var i;for(var o=[],r=0,s=t.length;r<s;++r){var a=t[r];if(a.isVisible)if(n){var d=e(a,n);d&&(a.isEnabled||(d.score+=1e3),o.push(d))}else o.push({matchType:3,categoryIndices:null,labelIndices:null,score:0,item:a})}return o}(t,o);return r.sort(i),function(t){var e=new Array(t.length);n.fill(e,!1);for(var i=[],o=0,r=t.length;o<r;++o)if(!e[o]){var s=t[o],a=s.item,d=s.categoryIndices,c=a.category;i.push({type:"header",category:c,indices:d});for(var h=o;h<r;++h)if(!e[h]){var l=t[h],u=l.item,p=l.labelIndices;u.category===c&&(i.push({type:"item",item:u,indices:p}),e[h]=!0)}}return i}(r)},t.canActivate=function(t){return"item"===t.type&&t.item.isEnabled};var o=function(){function t(t,e){this._commands=t,this.category=e.category.trim().replace(/\s+/g," "),this.command=e.command,this.args=e.args||b.emptyObject,this.rank=void 0!==e.rank?e.rank:1/0}return Object.defineProperty(t.prototype,"label",{get:function(){return this._commands.label(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"icon",{get:function(){return this._commands.icon(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"iconClass",{get:function(){return this._commands.iconClass(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"iconLabel",{get:function(){return this._commands.iconLabel(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"caption",{get:function(){return this._commands.caption(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"className",{get:function(){return this._commands.className(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dataset",{get:function(){return this._commands.dataset(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isEnabled",{get:function(){return this._commands.isEnabled(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isToggled",{get:function(){return this._commands.isToggled(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isToggleable",{get:function(){return this._commands.isToggleable(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isVisible",{get:function(){return this._commands.isVisible(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"keyBinding",{get:function(){var t=this.command,e=this.args;return n.findLastValue(this._commands.keyBindings,(function(n){return n.command===t&&b.deepEqual(n.args,e)}))||null},enumerable:!0,configurable:!0}),t}()}(Ot||(Ot={}));var Nt,jt=function(t){function e(n){var i=t.call(this,{node:Nt.createNode()})||this;return i._childIndex=-1,i._activeIndex=-1,i._openTimerID=0,i._closeTimerID=0,i._items=[],i._childMenu=null,i._parentMenu=null,i._aboutToClose=new A(i),i._menuRequested=new A(i),i.addClass("lm-Menu"),i.addClass("p-Menu"),i.setFlag(ft.Flag.DisallowLayout),i.commands=n.commands,i.renderer=n.renderer||e.defaultRenderer,i}return dt(e,t),e.prototype.dispose=function(){this.close(),this._items.length=0,t.prototype.dispose.call(this)},Object.defineProperty(e.prototype,"aboutToClose",{get:function(){return this._aboutToClose},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"menuRequested",{get:function(){return this._menuRequested},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parentMenu",{get:function(){return this._parentMenu},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"childMenu",{get:function(){return this._childMenu},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rootMenu",{get:function(){for(var t=this;t._parentMenu;)t=t._parentMenu;return t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"leafMenu",{get:function(){for(var t=this;t._childMenu;)t=t._childMenu;return t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contentNode",{get:function(){return this.node.getElementsByClassName("lm-Menu-content")[0]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activeItem",{get:function(){return this._items[this._activeIndex]||null},set:function(t){this.activeIndex=t?this._items.indexOf(t):-1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activeIndex",{get:function(){return this._activeIndex},set:function(t){(t<0||t>=this._items.length)&&(t=-1),-1===t||Nt.canActivate(this._items[t])||(t=-1),this._activeIndex!==t&&(this._activeIndex=t,this._activeIndex>=0&&this.contentNode.childNodes[this._activeIndex]&&this.contentNode.childNodes[this._activeIndex].focus(),this.update())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"items",{get:function(){return this._items},enumerable:!0,configurable:!0}),e.prototype.activateNextItem=function(){var t=this._items.length,e=this._activeIndex,i=e<t-1?e+1:0,o=0===i?t-1:i-1;this.activeIndex=n.findFirstIndex(this._items,Nt.canActivate,i,o)},e.prototype.activatePreviousItem=function(){var t=this._items.length,e=this._activeIndex,i=e<=0?t-1:e-1,o=i===t-1?0:i+1;this.activeIndex=n.findLastIndex(this._items,Nt.canActivate,i,o)},e.prototype.triggerActiveItem=function(){if(this.isAttached){var t=this.activeItem;if(t)if(this._cancelOpenTimer(),this._cancelCloseTimer(),"submenu"!==t.type){this.rootMenu.close();var e=t.command,n=t.args;this.commands.isEnabled(e,n)?this.commands.execute(e,n):console.log("Command '"+e+"' is disabled.")}else this._openChildMenu(!0)}},e.prototype.addItem=function(t){return this.insertItem(this._items.length,t)},e.prototype.insertItem=function(t,e){this.isAttached&&this.close(),this.activeIndex=-1;var i=Math.max(0,Math.min(t,this._items.length)),o=Nt.createItem(this,e);return n.insert(this._items,i,o),this.update(),o},e.prototype.removeItem=function(t){this.removeItemAt(this._items.indexOf(t))},e.prototype.removeItemAt=function(t){this.isAttached&&this.close(),this.activeIndex=-1,n.removeAt(this._items,t)&&this.update()},e.prototype.clearItems=function(){this.isAttached&&this.close(),this.activeIndex=-1,0!==this._items.length&&(this._items.length=0,this.update())},e.prototype.open=function(t,e,n){if(void 0===n&&(n={}),!this.isAttached){var i=n.forceX||!1,o=n.forceY||!1;Nt.openRootMenu(this,t,e,i,o),this.activate()}},e.prototype.handleEvent=function(t){switch(t.type){case"keydown":this._evtKeyDown(t);break;case"mouseup":this._evtMouseUp(t);break;case"mousemove":this._evtMouseMove(t);break;case"mouseenter":this._evtMouseEnter(t);break;case"mouseleave":this._evtMouseLeave(t);break;case"mousedown":this._evtMouseDown(t);break;case"contextmenu":t.preventDefault(),t.stopPropagation()}},e.prototype.onBeforeAttach=function(t){this.node.addEventListener("keydown",this),this.node.addEventListener("mouseup",this),this.node.addEventListener("mousemove",this),this.node.addEventListener("mouseenter",this),this.node.addEventListener("mouseleave",this),this.node.addEventListener("contextmenu",this),document.addEventListener("mousedown",this,!0)},e.prototype.onAfterDetach=function(t){this.node.removeEventListener("keydown",this),this.node.removeEventListener("mouseup",this),this.node.removeEventListener("mousemove",this),this.node.removeEventListener("mouseenter",this),this.node.removeEventListener("mouseleave",this),this.node.removeEventListener("contextmenu",this),document.removeEventListener("mousedown",this,!0)},e.prototype.onActivateRequest=function(t){this.isAttached&&this.node.focus()},e.prototype.onUpdateRequest=function(t){for(var e=this,n=this._items,i=this.renderer,o=this._activeIndex,r=Nt.computeCollapsed(n),s=new Array(n.length),a=function(t,a){var d=n[t],c=t===o,h=r[t];s[t]=i.renderItem({item:d,active:c,collapsed:h,onfocus:function(){e.activeIndex=t}})},d=0,c=n.length;d<c;++d)a(d);nt.render(s,this.contentNode)},e.prototype.onCloseRequest=function(e){this._cancelOpenTimer(),this._cancelCloseTimer(),this.activeIndex=-1;var n=this._childMenu;n&&(this._childIndex=-1,this._childMenu=null,n._parentMenu=null,n.close());var i=this._parentMenu;i&&(this._parentMenu=null,i._childIndex=-1,i._childMenu=null,i.activate()),this.isAttached&&this._aboutToClose.emit(void 0),t.prototype.onCloseRequest.call(this,e)},e.prototype._evtKeyDown=function(t){t.preventDefault(),t.stopPropagation();var e=t.keyCode;if(13!==e)if(27!==e)if(37!==e)if(38!==e)if(39!==e)if(40!==e){var n=j().keyForKeydownEvent(t);if(n){var i=this._activeIndex+1,o=Nt.findMnemonic(this._items,n,i);-1===o.index||o.multiple?-1!==o.index?this.activeIndex=o.index:-1!==o.auto&&(this.activeIndex=o.auto):(this.activeIndex=o.index,this.triggerActiveItem())}}else this.activateNextItem();else{var r=this.activeItem;r&&"submenu"===r.type?this.triggerActiveItem():this.rootMenu._menuRequested.emit("next")}else this.activatePreviousItem();else this._parentMenu?this.close():this._menuRequested.emit("previous");else this.close();else this.triggerActiveItem()},e.prototype._evtMouseUp=function(t){0===t.button&&(t.preventDefault(),t.stopPropagation(),this.triggerActiveItem())},e.prototype._evtMouseMove=function(t){var e=n.findFirstIndex(this.contentNode.children,(function(e){return B.hitTest(e,t.clientX,t.clientY)}));if(e!==this._activeIndex){if(this.activeIndex=e,(e=this.activeIndex)===this._childIndex)return this._cancelOpenTimer(),void this._cancelCloseTimer();-1!==this._childIndex&&this._startCloseTimer(),this._cancelOpenTimer();var i=this.activeItem;i&&"submenu"===i.type&&i.submenu&&this._startOpenTimer()}},e.prototype._evtMouseEnter=function(t){for(var e=this._parentMenu;e;e=e._parentMenu)e._cancelOpenTimer(),e._cancelCloseTimer(),e.activeIndex=e._childIndex},e.prototype._evtMouseLeave=function(t){if(this._cancelOpenTimer(),this._childMenu){var e=t.clientX,n=t.clientY;B.hitTest(this._childMenu.node,e,n)?this._cancelCloseTimer():(this.activeIndex=-1,this._startCloseTimer())}else this.activeIndex=-1},e.prototype._evtMouseDown=function(t){this._parentMenu||(Nt.hitTestMenus(this,t.clientX,t.clientY)?(t.preventDefault(),t.stopPropagation()):this.close())},e.prototype._openChildMenu=function(t){void 0===t&&(t=!1);var n=this.activeItem;if(n&&"submenu"===n.type&&n.submenu){var i=n.submenu;if(i!==this._childMenu){e.saveWindowData(),this._closeChildMenu(),this._childMenu=i,this._childIndex=this._activeIndex,i._parentMenu=this,Z.sendMessage(this,ft.Msg.UpdateRequest);var o=this.contentNode.children[this._activeIndex];Nt.openSubmenu(i,o),t&&(i.activeIndex=-1,i.activateNextItem()),i.activate()}}else this._closeChildMenu()},e.prototype._closeChildMenu=function(){this._childMenu&&this._childMenu.close()},e.prototype._startOpenTimer=function(){var t=this;0===this._openTimerID&&(this._openTimerID=window.setTimeout((function(){t._openTimerID=0,t._openChildMenu()}),Nt.TIMER_DELAY))},e.prototype._startCloseTimer=function(){var t=this;0===this._closeTimerID&&(this._closeTimerID=window.setTimeout((function(){t._closeTimerID=0,t._closeChildMenu()}),Nt.TIMER_DELAY))},e.prototype._cancelOpenTimer=function(){0!==this._openTimerID&&(clearTimeout(this._openTimerID),this._openTimerID=0)},e.prototype._cancelCloseTimer=function(){0!==this._closeTimerID&&(clearTimeout(this._closeTimerID),this._closeTimerID=0)},e.saveWindowData=function(){Nt.saveWindowData()},e}(ft);!function(e){var n=function(){function e(){}return e.prototype.renderItem=function(t){var e=this.createItemClass(t),n=this.createItemDataset(t),i=this.createItemARIA(t);return st.li(ct({className:e,dataset:n,tabindex:"0",onfocus:t.onfocus},i),this.renderIcon(t),this.renderLabel(t),this.renderShortcut(t),this.renderSubmenu(t))},e.prototype.renderIcon=function(t){var e=this.createIconClass(t);return"string"==typeof t.item.icon?st.div({className:e},t.item.iconLabel):st.div({className:e},t.item.icon,t.item.iconLabel)},e.prototype.renderLabel=function(t){var e=this.formatLabel(t);return st.div({className:"lm-Menu-itemLabel p-Menu-itemLabel"},e)},e.prototype.renderShortcut=function(t){var e=this.formatShortcut(t);return st.div({className:"lm-Menu-itemShortcut p-Menu-itemShortcut"},e)},e.prototype.renderSubmenu=function(t){return st.div({className:"lm-Menu-itemSubmenuIcon p-Menu-itemSubmenuIcon"})},e.prototype.createItemClass=function(t){var e="lm-Menu-item";e+=" p-Menu-item",t.item.isEnabled||(e+=" lm-mod-disabled",e+=" p-mod-disabled"),t.item.isToggled&&(e+=" lm-mod-toggled",e+=" p-mod-toggled"),t.item.isVisible||(e+=" lm-mod-hidden",e+=" p-mod-hidden"),t.active&&(e+=" lm-mod-active",e+=" p-mod-active"),t.collapsed&&(e+=" lm-mod-collapsed",e+=" p-mod-collapsed");var n=t.item.className;return n&&(e+=" "+n),e},e.prototype.createItemDataset=function(t){var e=t.item,n=e.type,i=e.command,o=e.dataset;return ct(ct({},o),"command"===n?{type:n,command:i}:{type:n})},e.prototype.createIconClass=function(t){var e="lm-Menu-itemIcon";e+=" p-Menu-itemIcon";var n=t.item.iconClass;return n?e+" "+n:e},e.prototype.createItemARIA=function(t){var e={};switch(t.item.type){case"separator":e.role="presentation";break;case"submenu":e["aria-haspopup"]="true",t.item.isEnabled||(e["aria-disabled"]="true");break;default:t.item.isEnabled||(e["aria-disabled"]="true"),e.role="menuitem"}return e},e.prototype.formatLabel=function(t){var e=t.item,n=e.label,i=e.mnemonic;if(i<0||i>=n.length)return n;var o=n.slice(0,i),r=n.slice(i+1),s=n[i];return[o,st.span({className:"lm-Menu-itemMnemonic p-Menu-itemMnemonic"},s),r]},e.prototype.formatShortcut=function(e){var n=e.item.keyBinding;return n?t.CommandRegistry.formatKeystroke(n.keys):null},e}();e.Renderer=n,e.defaultRenderer=new n}(jt||(jt={})),function(t){t.TIMER_DELAY=300,t.SUBMENU_OVERLAP=3;var e=null,i=0;function o(){return i>0?(i--,e):s()}function r(t){return"separator"!==t.type&&t.isEnabled&&t.isVisible}function s(){return{pageXOffset:window.pageXOffset,pageYOffset:window.pageYOffset,clientWidth:document.documentElement.clientWidth,clientHeight:document.documentElement.clientHeight}}t.saveWindowData=function(){e=s(),i++},t.createNode=function(){var t=document.createElement("div"),e=document.createElement("ul");return e.className="lm-Menu-content",e.classList.add("p-Menu-content"),t.appendChild(e),e.setAttribute("role","menu"),t.tabIndex=0,t},t.canActivate=r,t.createItem=function(t,e){return new a(t.commands,e)},t.hitTestMenus=function(t,e,n){for(var i=t;i;i=i.childMenu)if(B.hitTest(i.node,e,n))return!0;return!1},t.computeCollapsed=function(t){var e=new Array(t.length);n.fill(e,!1);for(var i=0,o=t.length;i<o;++i){if((a=t[i]).isVisible){if("separator"!==a.type)break;e[i]=!0}}for(var r=o-1;r>=0;--r){if((a=t[r]).isVisible){if("separator"!==a.type)break;e[r]=!0}}for(var s=!1;++i<r;){var a;(a=t[i]).isVisible&&("separator"!==a.type?s=!1:s?e[i]=!0:s=!0)}return e},t.openRootMenu=function(t,e,n,i,r){var s=o(),a=s.pageXOffset,d=s.pageYOffset,c=s.clientWidth,h=s.clientHeight;Z.sendMessage(t,ft.Msg.UpdateRequest);var l=h-(r?n:0),u=t.node,p=u.style;p.opacity="0",p.maxHeight=l+"px",ft.attach(t,document.body);var f=u.getBoundingClientRect(),m=f.width,g=f.height;!i&&e+m>a+c&&(e=a+c-m),!r&&n+g>d+h&&(n>d+h?n=d+h-g:n-=g),p.transform="translate("+Math.max(0,e)+"px, "+Math.max(0,n)+"px",p.opacity="1"},t.openSubmenu=function(e,n){var i=o(),r=i.pageXOffset,s=i.pageYOffset,a=i.clientWidth,d=i.clientHeight;Z.sendMessage(e,ft.Msg.UpdateRequest);var c=d,h=e.node,l=h.style;l.opacity="0",l.maxHeight=c+"px",ft.attach(e,document.body);var u=h.getBoundingClientRect(),p=u.width,f=u.height,m=B.boxSizing(e.node),g=n.getBoundingClientRect(),v=g.right-t.SUBMENU_OVERLAP;v+p>r+a&&(v=g.left+t.SUBMENU_OVERLAP-p);var y=g.top-m.borderTop-m.paddingTop;y+f>s+d&&(y=g.bottom+m.borderBottom+m.paddingBottom-f),l.transform="translate("+Math.max(0,v)+"px, "+Math.max(0,y)+"px",l.opacity="1"},t.findMnemonic=function(t,e,n){for(var i=-1,o=-1,s=!1,a=e.toUpperCase(),d=0,c=t.length;d<c;++d){var h=(d+n)%c,l=t[h];if(r(l)){var u=l.label;if(0!==u.length){var p=l.mnemonic;p>=0&&p<u.length?u[p].toUpperCase()===a&&(-1===i?i=h:s=!0):-1===o&&u[0].toUpperCase()===a&&(o=h)}}}return{index:i,multiple:s,auto:o}};var a=function(){function t(t,e){this._commands=t,this.type=e.type||"command",this.command=e.command||"",this.args=e.args||b.emptyObject,this.submenu=e.submenu||null}return Object.defineProperty(t.prototype,"label",{get:function(){return"command"===this.type?this._commands.label(this.command,this.args):"submenu"===this.type&&this.submenu?this.submenu.title.label:""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"mnemonic",{get:function(){return"command"===this.type?this._commands.mnemonic(this.command,this.args):"submenu"===this.type&&this.submenu?this.submenu.title.mnemonic:-1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"icon",{get:function(){return"command"===this.type?this._commands.icon(this.command,this.args):"submenu"===this.type&&this.submenu?this.submenu.title.icon:this.iconClass},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"iconClass",{get:function(){return"command"===this.type?this._commands.iconClass(this.command,this.args):"submenu"===this.type&&this.submenu?this.submenu.title.iconClass:""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"iconLabel",{get:function(){return"command"===this.type?this._commands.iconLabel(this.command,this.args):"submenu"===this.type&&this.submenu?this.submenu.title.iconLabel:""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"caption",{get:function(){return"command"===this.type?this._commands.caption(this.command,this.args):"submenu"===this.type&&this.submenu?this.submenu.title.caption:""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"className",{get:function(){return"command"===this.type?this._commands.className(this.command,this.args):"submenu"===this.type&&this.submenu?this.submenu.title.className:""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dataset",{get:function(){return"command"===this.type?this._commands.dataset(this.command,this.args):"submenu"===this.type&&this.submenu?this.submenu.title.dataset:{}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isEnabled",{get:function(){return"command"===this.type?this._commands.isEnabled(this.command,this.args):"submenu"!==this.type||null!==this.submenu},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isToggled",{get:function(){return"command"===this.type&&this._commands.isToggled(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isVisible",{get:function(){return"command"===this.type?this._commands.isVisible(this.command,this.args):"submenu"!==this.type||null!==this.submenu},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"keyBinding",{get:function(){if("command"===this.type){var t=this.command,e=this.args;return n.findLastValue(this._commands.keyBindings,(function(n){return n.command===t&&b.deepEqual(n.args,e)}))||null}return null},enumerable:!0,configurable:!0}),t}()}(Nt||(Nt={}));var Wt,Ht=function(){function t(t){this._groupByTarget=!0,this._idTick=0,this._items=[],this._sortBySelector=!0;var e=t.groupByTarget,n=t.sortBySelector,i=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(t);o<i.length;o++)e.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(t,i[o])&&(n[i[o]]=t[i[o]])}return n}(t,["groupByTarget","sortBySelector"]);this.menu=new jt(i),this._groupByTarget=!1!==e,this._sortBySelector=!1!==n}return t.prototype.addItem=function(t){var e=this,i=Wt.createItem(t,this._idTick++);return this._items.push(i),new L((function(){n.removeFirstOf(e._items,i)}))},t.prototype.open=function(t){var e=this;if(jt.saveWindowData(),this.menu.clearItems(),0===this._items.length)return!1;var n=Wt.matchItems(this._items,t,this._groupByTarget,this._sortBySelector);return!(!n||0===n.length)&&(o(n,(function(t){e.menu.addItem(t)})),this.menu.open(t.clientX,t.clientY),!0)},t}();!function(t){function e(t,e){var n=t.rank,i=e.rank;return n!==i?n<i?-1:1:t.id-e.id}function n(t,n){var i=O.calculateSpecificity(t.selector),o=O.calculateSpecificity(n.selector);return i!==o?o-i:e(t,n)}t.createItem=function(t,e){var n=function(t){if(-1!==t.indexOf(","))throw new Error("Selector cannot contain commas: "+t);if(!O.isValid(t))throw new Error("Invalid selector: "+t);return t}(t.selector),i=void 0!==t.rank?t.rank:1/0;return ct(ct({},t),{selector:n,rank:i,id:e})},t.matchItems=function(t,i,o,r){var s=i.target;if(!s)return null;var a=i.currentTarget;if(!a)return null;if(!(a.contains(s)||(s=document.elementFromPoint(i.clientX,i.clientY))&&a.contains(s)))return null;for(var d=[],c=t.slice();null!==s;){for(var h=[],l=0,u=c.length;l<u;++l){var p=c[l];p&&(O.matches(s,p.selector)&&(h.push(p),c[l]=null))}if(0!==h.length&&(o&&h.sort(r?n:e),d.push.apply(d,h)),s===a)break;s=s.parentElement}return o||d.sort(r?n:e),d}}(Wt||(Wt={}));var Ft,qt=function(t){function e(n){void 0===n&&(n={});var i=t.call(this,{node:Ft.createNode()})||this;return i._currentIndex=-1,i._titles=[],i._titlesEditable=!1,i._previousTitle=null,i._dragData=null,i._addButtonEnabled=!1,i._tabMoved=new A(i),i._currentChanged=new A(i),i._addRequested=new A(i),i._tabCloseRequested=new A(i),i._tabDetachRequested=new A(i),i._tabActivateRequested=new A(i),i.addClass("lm-TabBar"),i.addClass("p-TabBar"),i.contentNode.setAttribute("role","tablist"),i.setFlag(ft.Flag.DisallowLayout),i._document=n.document||document,i.tabsMovable=n.tabsMovable||!1,i.titlesEditable=n.titlesEditable||!1,i.allowDeselect=n.allowDeselect||!1,i.addButtonEnabled=n.addButtonEnabled||!1,i.insertBehavior=n.insertBehavior||"select-tab-if-needed",i.name=n.name||"",i.orientation=n.orientation||"horizontal",i.removeBehavior=n.removeBehavior||"select-tab-after",i.renderer=n.renderer||e.defaultRenderer,i}return dt(e,t),e.prototype.dispose=function(){this._releaseMouse(),this._titles.length=0,this._previousTitle=null,t.prototype.dispose.call(this)},Object.defineProperty(e.prototype,"currentChanged",{get:function(){return this._currentChanged},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tabMoved",{get:function(){return this._tabMoved},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tabActivateRequested",{get:function(){return this._tabActivateRequested},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"addRequested",{get:function(){return this._addRequested},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tabCloseRequested",{get:function(){return this._tabCloseRequested},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tabDetachRequested",{get:function(){return this._tabDetachRequested},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"document",{get:function(){return this._document},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"titlesEditable",{get:function(){return this._titlesEditable},set:function(t){this._titlesEditable=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentTitle",{get:function(){return this._titles[this._currentIndex]||null},set:function(t){this.currentIndex=t?this._titles.indexOf(t):-1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentIndex",{get:function(){return this._currentIndex},set:function(t){if((t<0||t>=this._titles.length)&&(t=-1),this._currentIndex!==t){var e=this._currentIndex,n=this._titles[e]||null,i=t,o=this._titles[i]||null;this._currentIndex=i,this._previousTitle=n,this.update(),this._currentChanged.emit({previousIndex:e,previousTitle:n,currentIndex:i,currentTitle:o})}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(t){this._name=t,t?this.contentNode.setAttribute("aria-label",t):this.contentNode.removeAttribute("aria-label")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"orientation",{get:function(){return this._orientation},set:function(t){this._orientation!==t&&(this._releaseMouse(),this._orientation=t,this.dataset.orientation=t,this.contentNode.setAttribute("aria-orientation",t))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"addButtonEnabled",{get:function(){return this._addButtonEnabled},set:function(t){this._addButtonEnabled!==t&&(this._addButtonEnabled=t,t?this.addButtonNode.classList.remove("lm-mod-hidden"):this.addButtonNode.classList.add("lm-mod-hidden"))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"titles",{get:function(){return this._titles},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contentNode",{get:function(){return this.node.getElementsByClassName("lm-TabBar-content")[0]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"addButtonNode",{get:function(){return this.node.getElementsByClassName("lm-TabBar-addButton")[0]},enumerable:!0,configurable:!0}),e.prototype.addTab=function(t){return this.insertTab(this._titles.length,t)},e.prototype.insertTab=function(t,e){this._releaseMouse();var i=Ft.asTitle(e),o=this._titles.indexOf(i),r=Math.max(0,Math.min(t,this._titles.length));return-1===o?(n.insert(this._titles,r,i),i.changed.connect(this._onTitleChanged,this),this.update(),this._adjustCurrentForInsert(r,i),i):(r===this._titles.length&&r--,o===r||(n.move(this._titles,o,r),this.update(),this._adjustCurrentForMove(o,r)),i)},e.prototype.removeTab=function(t){this.removeTabAt(this._titles.indexOf(t))},e.prototype.removeTabAt=function(t){this._releaseMouse();var e=n.removeAt(this._titles,t);e&&(e.changed.disconnect(this._onTitleChanged,this),e===this._previousTitle&&(this._previousTitle=null),this.update(),this._adjustCurrentForRemove(t,e))},e.prototype.clearTabs=function(){if(0!==this._titles.length){this._releaseMouse();for(var t=0,e=this._titles;t<e.length;t++){e[t].changed.disconnect(this._onTitleChanged,this)}var n=this.currentIndex,i=this.currentTitle;this._currentIndex=-1,this._previousTitle=null,this._titles.length=0,this.update(),-1!==n&&this._currentChanged.emit({previousIndex:n,previousTitle:i,currentIndex:-1,currentTitle:null})}},e.prototype.releaseMouse=function(){this._releaseMouse()},e.prototype.handleEvent=function(t){switch(t.type){case"mousedown":case"pointerdown":this._evtMouseDown(t);break;case"mousemove":case"pointermove":this._evtMouseMove(t);break;case"mouseup":case"pointerup":this._evtMouseUp(t);break;case"dblclick":this._evtDblClick(t);break;case"keydown":this._evtKeyDown(t);break;case"contextmenu":t.preventDefault(),t.stopPropagation()}},e.prototype.onBeforeAttach=function(t){this.node.addEventListener("mousedown",this),this.node.addEventListener("pointerdown",this),this.node.addEventListener("dblclick",this)},e.prototype.onAfterDetach=function(t){this.node.removeEventListener("mousedown",this),this.node.removeEventListener("pointerdown",this),this.node.removeEventListener("dblclick",this),this._releaseMouse()},e.prototype.onUpdateRequest=function(t){for(var e=this._titles,n=this.renderer,i=this.currentTitle,o=new Array(e.length),r=0,s=e.length;r<s;++r){var a=e[r],d=a===i,c=d?s:s-r-1;o[r]=n.renderTab({title:a,current:d,zIndex:c})}nt.render(o,this.contentNode)},e.prototype._evtDblClick=function(t){if(this.titlesEditable){var e=this.contentNode.children,i=n.findFirstIndex(e,(function(e){return B.hitTest(e,t.clientX,t.clientY)}));if(-1!==i){var o=this.titles[i],r=e[i].querySelector(".lm-TabBar-tabLabel");if(r&&r.contains(t.target)){var s=o.label||"",a=r.innerHTML;r.innerHTML="";var d=document.createElement("input");d.classList.add("lm-TabBar-tabInput"),d.value=s,r.appendChild(d);var c=function(){d.removeEventListener("blur",c),r.innerHTML=a};d.addEventListener("dblclick",(function(t){return t.stopPropagation()})),d.addEventListener("blur",c),d.addEventListener("keydown",(function(t){"Enter"===t.key?(""!==d.value&&(o.label=o.caption=d.value),c()):"Escape"===t.key&&c()})),d.select(),d.focus(),r.children.length>0&&r.children[0].focus()}}}},e.prototype._evtKeyDown=function(t){t.preventDefault(),t.stopPropagation(),27===t.keyCode&&this._releaseMouse()},e.prototype._evtMouseDown=function(t){if((0===t.button||1===t.button)&&!this._dragData){var e=this.addButtonEnabled&&this.addButtonNode.contains(t.target),i=this.contentNode.children,o=n.findFirstIndex(i,(function(e){return B.hitTest(e,t.clientX,t.clientY)}));if((-1!==o||e)&&(t.preventDefault(),t.stopPropagation(),this._dragData={tab:i[o],index:o,pressX:t.clientX,pressY:t.clientY,tabPos:-1,tabSize:-1,tabPressPos:-1,targetIndex:-1,tabLayout:null,contentRect:null,override:null,dragActive:!1,dragAborted:!1,detachRequested:!1},this.document.addEventListener("mouseup",this,!0),this.document.addEventListener("pointerup",this,!0),1!==t.button&&!e)){var r=i[o].querySelector(this.renderer.closeIconSelector);r&&r.contains(t.target)||(this.tabsMovable&&(this.document.addEventListener("mousemove",this,!0),this.document.addEventListener("pointermove",this,!0),this.document.addEventListener("keydown",this,!0),this.document.addEventListener("contextmenu",this,!0)),this.allowDeselect&&this.currentIndex===o?this.currentIndex=-1:this.currentIndex=o,-1!==this.currentIndex&&this._tabActivateRequested.emit({index:this.currentIndex,title:this.currentTitle}))}}},e.prototype._evtMouseMove=function(t){var e=this._dragData;if(e){t.preventDefault(),t.stopPropagation();var n=this.contentNode.children;if(e.dragActive||Ft.dragExceeded(e,t)){if(!e.dragActive){var i=e.tab.getBoundingClientRect();"horizontal"===this._orientation?(e.tabPos=e.tab.offsetLeft,e.tabSize=i.width,e.tabPressPos=e.pressX-i.left):(e.tabPos=e.tab.offsetTop,e.tabSize=i.height,e.tabPressPos=e.pressY-i.top),e.tabLayout=Ft.snapTabLayout(n,this._orientation),e.contentRect=this.contentNode.getBoundingClientRect(),e.override=tt.overrideCursor("default"),e.tab.classList.add("lm-mod-dragging"),this.addClass("lm-mod-dragging"),e.tab.classList.add("p-mod-dragging"),this.addClass("p-mod-dragging"),e.dragActive=!0}if(!e.detachRequested&&Ft.detachExceeded(e,t)){e.detachRequested=!0;var o=e.index,r=t.clientX,s=t.clientY,a=n[o],d=this._titles[o];if(this._tabDetachRequested.emit({index:o,title:d,tab:a,clientX:r,clientY:s}),e.dragAborted)return}Ft.layoutTabs(n,e,t,this._orientation)}}},e.prototype._evtMouseUp=function(t){var e=this;if(0===t.button||1===t.button){var i=this._dragData;if(i){if(t.preventDefault(),t.stopPropagation(),this.document.removeEventListener("mousemove",this,!0),this.document.removeEventListener("mouseup",this,!0),this.document.removeEventListener("pointermove",this,!0),this.document.removeEventListener("pointerup",this,!0),this.document.removeEventListener("keydown",this,!0),this.document.removeEventListener("contextmenu",this,!0),!i.dragActive){if(this._dragData=null,this.addButtonEnabled&&this.addButtonNode.contains(t.target))return void this._addRequested.emit(void 0);var o=this.contentNode.children,r=n.findFirstIndex(o,(function(e){return B.hitTest(e,t.clientX,t.clientY)}));if(r!==i.index)return;var s=this._titles[r];if(!s.closable)return;if(1===t.button)return void this._tabCloseRequested.emit({index:r,title:s});var a=o[r].querySelector(this.renderer.closeIconSelector);return a&&a.contains(t.target)?void this._tabCloseRequested.emit({index:r,title:s}):void 0}if(0===t.button){Ft.finalizeTabPosition(i,this._orientation),i.tab.classList.remove("lm-mod-dragging"),i.tab.classList.remove("p-mod-dragging");var d=Ft.parseTransitionDuration(i.tab);setTimeout((function(){if(!i.dragAborted){e._dragData=null,Ft.resetTabPositions(e.contentNode.children,e._orientation),i.override.dispose(),e.removeClass("lm-mod-dragging"),e.removeClass("p-mod-dragging");var t=i.index,o=i.targetIndex;-1!==o&&t!==o&&(n.move(e._titles,t,o),e._adjustCurrentForMove(t,o),e._tabMoved.emit({fromIndex:t,toIndex:o,title:e._titles[o]}),Z.sendMessage(e,ft.Msg.UpdateRequest))}}),d)}}}},e.prototype._releaseMouse=function(){var t=this._dragData;t&&(this._dragData=null,this.document.removeEventListener("mousemove",this,!0),this.document.removeEventListener("mouseup",this,!0),this.document.removeEventListener("pointermove",this,!0),this.document.removeEventListener("pointerup",this,!0),this.document.removeEventListener("keydown",this,!0),this.document.removeEventListener("contextmenu",this,!0),t.dragAborted=!0,t.dragActive&&(Ft.resetTabPositions(this.contentNode.children,this._orientation),t.override.dispose(),t.tab.classList.remove("lm-mod-dragging"),this.removeClass("lm-mod-dragging"),t.tab.classList.remove("p-mod-dragging"),this.removeClass("p-mod-dragging")))},e.prototype._adjustCurrentForInsert=function(t,e){var n=this.currentTitle,i=this._currentIndex,o=this.insertBehavior;if("select-tab"===o||"select-tab-if-needed"===o&&-1===i)return this._currentIndex=t,this._previousTitle=n,void this._currentChanged.emit({previousIndex:i,previousTitle:n,currentIndex:t,currentTitle:e});i>=t&&this._currentIndex++},e.prototype._adjustCurrentForMove=function(t,e){this._currentIndex===t?this._currentIndex=e:this._currentIndex<t&&this._currentIndex>=e?this._currentIndex++:this._currentIndex>t&&this._currentIndex<=e&&this._currentIndex--},e.prototype._adjustCurrentForRemove=function(t,e){var n=this._currentIndex,i=this.removeBehavior;if(n===t){if(0===this._titles.length)return this._currentIndex=-1,void this._currentChanged.emit({previousIndex:t,previousTitle:e,currentIndex:-1,currentTitle:null});if("select-tab-after"===i)return this._currentIndex=Math.min(t,this._titles.length-1),void this._currentChanged.emit({previousIndex:t,previousTitle:e,currentIndex:this._currentIndex,currentTitle:this.currentTitle});if("select-tab-before"===i)return this._currentIndex=Math.max(0,t-1),void this._currentChanged.emit({previousIndex:t,previousTitle:e,currentIndex:this._currentIndex,currentTitle:this.currentTitle});if("select-previous-tab"===i)return this._previousTitle?(this._currentIndex=this._titles.indexOf(this._previousTitle),this._previousTitle=null):this._currentIndex=Math.min(t,this._titles.length-1),void this._currentChanged.emit({previousIndex:t,previousTitle:e,currentIndex:this._currentIndex,currentTitle:this.currentTitle});this._currentIndex=-1,this._currentChanged.emit({previousIndex:t,previousTitle:e,currentIndex:-1,currentTitle:null})}else n>t&&this._currentIndex--},e.prototype._onTitleChanged=function(t){this.update()},e}(ft);!function(t){var e=function(){function t(){this.closeIconSelector=".lm-TabBar-tabCloseIcon",this._tabID=0,this._tabKeys=new WeakMap,this._uuid=++t._nInstance}return t.prototype.renderTab=function(t){var e=t.title.caption,n=this.createTabKey(t),i=n,o=this.createTabStyle(t),r=this.createTabClass(t),s=this.createTabDataset(t),a=this.createTabARIA(t);return t.title.closable?st.li(ct({id:i,key:n,className:r,title:e,style:o,dataset:s},a),this.renderIcon(t),this.renderLabel(t),this.renderCloseIcon(t)):st.li(ct({id:i,key:n,className:r,title:e,style:o,dataset:s},a),this.renderIcon(t),this.renderLabel(t))},t.prototype.renderIcon=function(t){var e=t.title,n=this.createIconClass(t);return"string"==typeof e.icon?st.div({className:n},e.iconLabel):st.div({className:n},e.icon,e.iconLabel)},t.prototype.renderLabel=function(t){return st.div({className:"lm-TabBar-tabLabel p-TabBar-tabLabel"},t.title.label)},t.prototype.renderCloseIcon=function(t){return st.div({className:"lm-TabBar-tabCloseIcon p-TabBar-tabCloseIcon"})},t.prototype.createTabKey=function(t){var e=this._tabKeys.get(t.title);return void 0===e&&(e="tab-key-"+this._uuid+"-"+this._tabID++,this._tabKeys.set(t.title,e)),e},t.prototype.createTabStyle=function(t){return{zIndex:""+t.zIndex}},t.prototype.createTabClass=function(t){var e="lm-TabBar-tab";return e+=" p-TabBar-tab",t.title.className&&(e+=" "+t.title.className),t.title.closable&&(e+=" lm-mod-closable",e+=" p-mod-closable"),t.current&&(e+=" lm-mod-current",e+=" p-mod-current"),e},t.prototype.createTabDataset=function(t){return t.title.dataset},t.prototype.createTabARIA=function(t){return{role:"tab","aria-selected":t.current.toString()}},t.prototype.createIconClass=function(t){var e="lm-TabBar-tabIcon";e+=" p-TabBar-tabIcon";var n=t.title.iconClass;return n?e+" "+n:e},t._nInstance=0,t}();t.Renderer=e,t.defaultRenderer=new e,t.addButtonSelector=".lm-TabBar-addButton"}(qt||(qt={})),function(t){t.DRAG_THRESHOLD=5,t.DETACH_THRESHOLD=20,t.createNode=function(){var t=document.createElement("div"),e=document.createElement("ul");e.setAttribute("role","tablist"),e.className="lm-TabBar-content",e.classList.add("p-TabBar-content"),t.appendChild(e);var n=document.createElement("div");return n.className="lm-TabBar-addButton lm-mod-hidden",t.appendChild(n),t},t.asTitle=function(t){return t instanceof pt?t:new pt(t)},t.parseTransitionDuration=function(t){var e=window.getComputedStyle(t);return 1e3*(parseFloat(e.transitionDuration)||0)},t.snapTabLayout=function(t,e){for(var n=new Array(t.length),i=0,o=t.length;i<o;++i){var r=t[i],s=window.getComputedStyle(r);n[i]="horizontal"===e?{pos:r.offsetLeft,size:r.offsetWidth,margin:parseFloat(s.marginLeft)||0}:{pos:r.offsetTop,size:r.offsetHeight,margin:parseFloat(s.marginTop)||0}}return n},t.dragExceeded=function(e,n){var i=Math.abs(n.clientX-e.pressX),o=Math.abs(n.clientY-e.pressY);return i>=t.DRAG_THRESHOLD||o>=t.DRAG_THRESHOLD},t.detachExceeded=function(e,n){var i=e.contentRect;return n.clientX<i.left-t.DETACH_THRESHOLD||n.clientX>=i.right+t.DETACH_THRESHOLD||n.clientY<i.top-t.DETACH_THRESHOLD||n.clientY>=i.bottom+t.DETACH_THRESHOLD},t.layoutTabs=function(t,e,n,i){var o,r,s,a;"horizontal"===i?(o=e.pressX,r=n.clientX-e.contentRect.left,s=n.clientX,a=e.contentRect.width):(o=e.pressY,r=n.clientY-e.contentRect.top,s=n.clientY,a=e.contentRect.height);for(var d=e.index,c=r-e.tabPressPos,h=c+e.tabSize,l=0,u=t.length;l<u;++l){var p=void 0,f=e.tabLayout[l],m=f.pos+(f.size>>1);if(l<e.index&&c<m)p=e.tabSize+e.tabLayout[l+1].margin+"px",d=Math.min(d,l);else if(l>e.index&&h>m)p=-e.tabSize-f.margin+"px",d=Math.max(d,l);else if(l===e.index){var g=s-o,v=a-(e.tabPos+e.tabSize);p=Math.max(-e.tabPos,Math.min(g,v))+"px"}else p="";"horizontal"===i?t[l].style.left=p:t[l].style.top=p}e.targetIndex=d},t.finalizeTabPosition=function(t,e){var n,i;if(n="horizontal"===e?t.contentRect.width:t.contentRect.height,t.targetIndex===t.index)i=0;else if(t.targetIndex>t.index){i=(o=t.tabLayout[t.targetIndex]).pos+o.size-t.tabSize-t.tabPos}else{var o;i=(o=t.tabLayout[t.targetIndex]).pos-t.tabPos}var r=n-(t.tabPos+t.tabSize),s=Math.max(-t.tabPos,Math.min(i,r));"horizontal"===e?t.tab.style.left=s+"px":t.tab.style.top=s+"px"},t.resetTabPositions=function(t,e){o(t,(function(t){"horizontal"===e?t.style.left="":t.style.top=""}))}}(Ft||(Ft={}));var Kt,Vt=function(t){function e(e){var n=t.call(this)||this;return n._spacing=4,n._dirty=!1,n._root=null,n._box=null,n._items=new Map,n.renderer=e.renderer,void 0!==e.spacing&&(n._spacing=wt.clampDimension(e.spacing)),n._document=e.document||document,n._hiddenMode=void 0!==e.hiddenMode?e.hiddenMode:ft.HiddenMode.Display,n}return dt(e,t),e.prototype.dispose=function(){var e=this.iter();this._items.forEach((function(t){t.dispose()})),this._box=null,this._root=null,this._items.clear(),o(e,(function(t){t.dispose()})),t.prototype.dispose.call(this)},Object.defineProperty(e.prototype,"hiddenMode",{get:function(){return this._hiddenMode},set:function(t){var e=this;this._hiddenMode!==t&&(this._hiddenMode=t,o(this.tabBars(),(function(t){t.titles.length>1&&t.titles.forEach((function(t){t.owner.hiddenMode=e._hiddenMode}))})))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"spacing",{get:function(){return this._spacing},set:function(t){t=wt.clampDimension(t),this._spacing!==t&&(this._spacing=t,this.parent&&this.parent.fit())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isEmpty",{get:function(){return null===this._root},enumerable:!0,configurable:!0}),e.prototype.iter=function(){return this._root?this._root.iterAllWidgets():d()},e.prototype.widgets=function(){return this._root?this._root.iterUserWidgets():d()},e.prototype.selectedWidgets=function(){return this._root?this._root.iterSelectedWidgets():d()},e.prototype.tabBars=function(){return this._root?this._root.iterTabBars():d()},e.prototype.handles=function(){return this._root?this._root.iterHandles():d()},e.prototype.moveHandle=function(t,e,n){var i=t.classList.contains("lm-mod-hidden");if(i=i||t.classList.contains("p-mod-hidden"),this._root&&!i){var o,r=this._root.findSplitNode(t);if(r)0!==(o="horizontal"===r.node.orientation?e-t.offsetLeft:n-t.offsetTop)&&(r.node.holdSizes(),ht.adjust(r.node.sizers,r.index,o),this.parent&&this.parent.update())}},e.prototype.saveLayout=function(){return this._root?(this._root.holdAllSizes(),{main:this._root.createConfig()}):{main:null}},e.prototype.restoreLayout=function(t){var e,n=this,i=new Set;e=t.main?Kt.normalizeAreaConfig(t.main,i):null;var r=this.widgets(),s=this.tabBars(),a=this.handles();this._root=null,o(r,(function(t){i.has(t)||(t.parent=null)})),o(s,(function(t){t.dispose()})),o(a,(function(t){t.parentNode&&t.parentNode.removeChild(t)})),i.forEach((function(t){t.parent=n.parent})),this._root=e?Kt.realizeAreaConfig(e,{createTabBar:function(t){return n._createTabBar()},createHandle:function(){return n._createHandle()}},this._document):null,this.parent&&(i.forEach((function(t){n.attachWidget(t)})),this.parent.fit())},e.prototype.addWidget=function(t,e){void 0===e&&(e={});var n=e.ref||null,i=e.mode||"tab-after",o=null;if(this._root&&n&&(o=this._root.findTabNode(n)),n&&!o)throw new Error("Reference widget is not in the layout.");switch(t.parent=this.parent,i){case"tab-after":this._insertTab(t,n,o,!0);break;case"tab-before":this._insertTab(t,n,o,!1);break;case"split-top":this._insertSplit(t,n,o,"vertical",!1);break;case"split-left":this._insertSplit(t,n,o,"horizontal",!1);break;case"split-right":this._insertSplit(t,n,o,"horizontal",!0);break;case"split-bottom":this._insertSplit(t,n,o,"vertical",!0)}this.parent&&(this.attachWidget(t),this.parent.fit())},e.prototype.removeWidget=function(t){this._removeWidget(t),this.parent&&(this.detachWidget(t),this.parent.fit())},e.prototype.hitTestTabAreas=function(t,e){if(!this._root||!this.parent||!this.parent.isVisible)return null;this._box||(this._box=B.boxSizing(this.parent.node));var n=this.parent.node.getBoundingClientRect(),i=t-n.left-this._box.borderLeft,o=e-n.top-this._box.borderTop,r=this._root.hitTestTabNodes(i,o);if(!r)return null;var s=r.tabBar,a=r.top,d=r.left,c=r.width,h=r.height,l=this._box.borderLeft+this._box.borderRight,u=this._box.borderTop+this._box.borderBottom;return{tabBar:s,x:i,y:o,top:a,left:d,right:n.width-l-(d+c),bottom:n.height-u-(a+h),width:c,height:h}},e.prototype.init=function(){var e=this;t.prototype.init.call(this),o(this,(function(t){e.attachWidget(t)})),o(this.handles(),(function(t){e.parent.node.appendChild(t)})),this.parent.fit()},e.prototype.attachWidget=function(t){this.parent.node!==t.node.parentNode&&(this._items.set(t,new vt(t)),this.parent.isAttached&&Z.sendMessage(t,ft.Msg.BeforeAttach),this.parent.node.appendChild(t.node),this.parent.isAttached&&Z.sendMessage(t,ft.Msg.AfterAttach))},e.prototype.detachWidget=function(t){if(this.parent.node===t.node.parentNode){this.parent.isAttached&&Z.sendMessage(t,ft.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.isAttached&&Z.sendMessage(t,ft.Msg.AfterDetach);var e=this._items.get(t);e&&(this._items.delete(t),e.dispose())}},e.prototype.onBeforeShow=function(e){t.prototype.onBeforeShow.call(this,e),this.parent.update()},e.prototype.onBeforeAttach=function(e){t.prototype.onBeforeAttach.call(this,e),this.parent.fit()},e.prototype.onChildShown=function(t){this.parent.fit()},e.prototype.onChildHidden=function(t){this.parent.fit()},e.prototype.onResize=function(t){this.parent.isVisible&&this._update(t.width,t.height)},e.prototype.onUpdateRequest=function(t){this.parent.isVisible&&this._update(-1,-1)},e.prototype.onFitRequest=function(t){this.parent.isAttached&&this._fit()},e.prototype._removeWidget=function(t){if(this._root){var e=this._root.findTabNode(t);if(e)if(Kt.removeAria(t),e.tabBar.titles.length>1)e.tabBar.removeTab(t.title),this._hiddenMode===ft.HiddenMode.Scale&&1==e.tabBar.titles.length&&(e.tabBar.titles[0].owner.hiddenMode=ft.HiddenMode.Display);else if(e.tabBar.dispose(),this._root!==e){this._root.holdAllSizes();var i=e.parent;e.parent=null;var o=n.removeFirstOf(i.children,e),r=n.removeAt(i.handles,o);if(n.removeAt(i.sizers,o),r.parentNode&&r.parentNode.removeChild(r),i.children.length>1)i.syncHandles();else{var s=i.parent;i.parent=null;var a=i.children[0],d=i.handles[0];if(i.children.length=0,i.handles.length=0,i.sizers.length=0,d.parentNode&&d.parentNode.removeChild(d),this._root===i)return a.parent=null,void(this._root=a);var c=s,h=c.children.indexOf(i);if(a instanceof Kt.TabLayoutNode)return a.parent=c,void(c.children[h]=a);var l=n.removeAt(c.handles,h);n.removeAt(c.children,h),n.removeAt(c.sizers,h),l.parentNode&&l.parentNode.removeChild(l);for(var u=0,p=a.children.length;u<p;++u){var f=a.children[u],m=a.handles[u],g=a.sizers[u];n.insert(c.children,h+u,f),n.insert(c.handles,h+u,m),n.insert(c.sizers,h+u,g),f.parent=c}a.children.length=0,a.handles.length=0,a.sizers.length=0,a.parent=null,c.syncHandles()}}else this._root=null}},e.prototype._insertTab=function(t,e,n,i){if(t!==e){if(!this._root){var o=new Kt.TabLayoutNode(this._createTabBar());return o.tabBar.addTab(t.title),this._root=o,void Kt.addAria(t,o.tabBar)}var r;if(n||(n=this._root.findFirstTabNode()),-1===n.tabBar.titles.indexOf(t.title)&&(this._removeWidget(t),t.hide()),r=e?n.tabBar.titles.indexOf(e.title):n.tabBar.currentIndex,this._hiddenMode===ft.HiddenMode.Scale)if(0===n.tabBar.titles.length)t.hiddenMode=ft.HiddenMode.Display;else if(1==n.tabBar.titles.length){n.tabBar.titles[0].owner.hiddenMode=ft.HiddenMode.Scale}else t.hiddenMode=ft.HiddenMode.Scale;else t.hiddenMode=this._hiddenMode;n.tabBar.insertTab(r+(i?1:0),t.title),Kt.addAria(t,n.tabBar)}},e.prototype._insertSplit=function(t,e,i,o,r){if(t!==e||!i||1!==i.tabBar.titles.length){this._removeWidget(t);var s=new Kt.TabLayoutNode(this._createTabBar());if(s.tabBar.addTab(t.title),Kt.addAria(t,s.tabBar),this._root){if(!i||!i.parent){var a=this._splitRoot(o),d=r?a.children.length:0;a.normalizeSizes();var c=Kt.createSizer(i?1:Kt.GOLDEN_RATIO);return n.insert(a.children,d,s),n.insert(a.sizers,d,c),n.insert(a.handles,d,this._createHandle()),s.parent=a,a.normalizeSizes(),void a.syncHandles()}var h=i.parent;if(h.orientation===o){var l=h.children.indexOf(i);h.normalizeSizes();var u=h.sizers[l].sizeHint/=2,p=l+(r?1:0);return n.insert(h.children,p,s),n.insert(h.sizers,p,Kt.createSizer(u)),n.insert(h.handles,p,this._createHandle()),s.parent=h,void h.syncHandles()}var f=n.removeFirstOf(h.children,i),m=new Kt.SplitLayoutNode(o);m.normalized=!0,m.children.push(i),m.sizers.push(Kt.createSizer(.5)),m.handles.push(this._createHandle()),i.parent=m;var g=r?1:0;n.insert(m.children,g,s),n.insert(m.sizers,g,Kt.createSizer(.5)),n.insert(m.handles,g,this._createHandle()),s.parent=m,m.syncHandles(),n.insert(h.children,f,m),m.parent=h}else this._root=s}},e.prototype._splitRoot=function(t){var e=this._root;if(e instanceof Kt.SplitLayoutNode&&e.orientation===t)return e;var n=this._root=new Kt.SplitLayoutNode(t);return e&&(n.children.push(e),n.sizers.push(Kt.createSizer(0)),n.handles.push(this._createHandle()),e.parent=n),n},e.prototype._fit=function(){var t=0,e=0;if(this._root){var n=this._root.fit(this._spacing,this._items);t=n.minWidth,e=n.minHeight}var i=this._box=B.boxSizing(this.parent.node);t+=i.horizontalSum,e+=i.verticalSum;var o=this.parent.node.style;o.minWidth=t+"px",o.minHeight=e+"px",this._dirty=!0,this.parent.parent&&Z.sendMessage(this.parent.parent,ft.Msg.FitRequest),this._dirty&&Z.sendMessage(this.parent,ft.Msg.UpdateRequest)},e.prototype._update=function(t,e){if(this._dirty=!1,this._root){t<0&&(t=this.parent.node.offsetWidth),e<0&&(e=this.parent.node.offsetHeight),this._box||(this._box=B.boxSizing(this.parent.node));var n=this._box.paddingTop,i=this._box.paddingLeft,o=t-this._box.horizontalSum,r=e-this._box.verticalSum;this._root.update(n,i,o,r,this._spacing,this._items)}},e.prototype._createTabBar=function(){var t=this.renderer.createTabBar(this._document);return t.orientation="horizontal",this.parent&&(t.parent=this.parent,this.attachWidget(t)),t},e.prototype._createHandle=function(){var t=this.renderer.createHandle(),e=t.style;return e.position="absolute",e.top="0",e.left="0",e.width="0",e.height="0",this.parent&&this.parent.node.appendChild(t),t},e}(mt);!function(t){function e(t){var e=new lt;return e.sizeHint=t,e.size=t,e}function n(t,e){var i;return i="tab-area"===t.type?function(t,e){if(0===t.widgets.length)return null;var n=[];if(o(t.widgets,(function(t){e.has(t)||(e.add(t),n.push(t))})),0===n.length)return null;var i=t.currentIndex;-1!==i&&(i<0||i>=n.length)&&(i=0);return{type:"tab-area",widgets:n,currentIndex:i}}(t,e):function(t,e){for(var i=t.orientation,o=[],r=[],s=0,a=t.children.length;s<a;++s){var d=n(t.children[s],e);d&&("tab-area"===d.type||d.orientation!==i?(o.push(d),r.push(Math.abs(t.sizes[s]||0))):(o.push.apply(o,d.children),r.push.apply(r,d.sizes)))}if(0===o.length)return null;if(1===o.length)return o[0];return{type:"split-area",orientation:i,children:o,sizes:r}}(t,e),i}function i(n,s,a){var d;return d="tab-area"===n.type?function(e,n,i){var s=n.createTabBar(i);return o(e.widgets,(function(e){e.hide(),s.addTab(e.title),t.addAria(e,s)})),s.currentIndex=e.currentIndex,new r(s)}(n,s,a):function(t,n,r){var s=new c(t.orientation);return o(t.children,(function(o,a){var d=i(o,n,r),c=e(t.sizes[a]),h=n.createHandle();s.children.push(d),s.handles.push(h),s.sizers.push(c),d.parent=s})),s.syncHandles(),s.normalizeSizes(),s}(n,s,a),d}t.GOLDEN_RATIO=.618,t.createSizer=e,t.normalizeAreaConfig=n,t.realizeAreaConfig=i;var r=function(){function t(t){this.parent=null,this._top=0,this._left=0,this._width=0,this._height=0;var e=new lt,n=new lt;e.stretch=0,n.stretch=1,this.tabBar=t,this.sizers=[e,n]}return Object.defineProperty(t.prototype,"top",{get:function(){return this._top},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){return this._left},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),t.prototype.iterAllWidgets=function(){return s(g(this.tabBar),this.iterUserWidgets())},t.prototype.iterUserWidgets=function(){return u(this.tabBar.titles,(function(t){return t.owner}))},t.prototype.iterSelectedWidgets=function(){var t=this.tabBar.currentTitle;return t?g(t.owner):d()},t.prototype.iterTabBars=function(){return g(this.tabBar)},t.prototype.iterHandles=function(){return d()},t.prototype.findTabNode=function(t){return-1!==this.tabBar.titles.indexOf(t.title)?this:null},t.prototype.findSplitNode=function(t){return null},t.prototype.findFirstTabNode=function(){return this},t.prototype.hitTestTabNodes=function(t,e){return t<this._left||t>=this._left+this._width||e<this._top||e>=this._top+this._height?null:this},t.prototype.createConfig=function(){return{type:"tab-area",widgets:this.tabBar.titles.map((function(t){return t.owner})),currentIndex:this.tabBar.currentIndex}},t.prototype.holdAllSizes=function(){},t.prototype.fit=function(t,e){var n=0,i=0,o=1/0,r=1/0,s=e.get(this.tabBar),a=this.tabBar.currentTitle,d=a?e.get(a.owner):void 0,c=this.sizers,h=c[0],l=c[1];return s&&s.fit(),d&&d.fit(),s&&!s.isHidden?(n=Math.max(n,s.minWidth),i+=s.minHeight,h.minSize=s.minHeight,h.maxSize=s.maxHeight):(h.minSize=0,h.maxSize=0),d&&!d.isHidden?(n=Math.max(n,d.minWidth),i+=d.minHeight,l.minSize=d.minHeight,l.maxSize=1/0):(l.minSize=0,l.maxSize=1/0),{minWidth:n,minHeight:i,maxWidth:o,maxHeight:r}},t.prototype.update=function(t,e,n,i,o,r){this._top=e,this._left=t,this._width=n,this._height=i;var s=r.get(this.tabBar),a=this.tabBar.currentTitle,d=a?r.get(a.owner):void 0;if(ht.calc(this.sizers,i),s&&!s.isHidden){var c=this.sizers[0].size;s.update(t,e,n,c),e+=c}if(d&&!d.isHidden){c=this.sizers[1].size;d.update(t,e,n,c)}},t}();t.TabLayoutNode=r;var c=function(){function t(t){this.parent=null,this.normalized=!1,this.children=[],this.sizers=[],this.handles=[],this.orientation=t}return t.prototype.iterAllWidgets=function(){var t=u(this.children,(function(t){return t.iterAllWidgets()}));return new a(t)},t.prototype.iterUserWidgets=function(){var t=u(this.children,(function(t){return t.iterUserWidgets()}));return new a(t)},t.prototype.iterSelectedWidgets=function(){var t=u(this.children,(function(t){return t.iterSelectedWidgets()}));return new a(t)},t.prototype.iterTabBars=function(){var t=u(this.children,(function(t){return t.iterTabBars()}));return new a(t)},t.prototype.iterHandles=function(){var t=u(this.children,(function(t){return t.iterHandles()}));return s(this.handles,new a(t))},t.prototype.findTabNode=function(t){for(var e=0,n=this.children.length;e<n;++e){var i=this.children[e].findTabNode(t);if(i)return i}return null},t.prototype.findSplitNode=function(t){var e=this.handles.indexOf(t);if(-1!==e)return{index:e,node:this};for(var n=0,i=this.children.length;n<i;++n){var o=this.children[n].findSplitNode(t);if(o)return o}return null},t.prototype.findFirstTabNode=function(){return 0===this.children.length?null:this.children[0].findFirstTabNode()},t.prototype.hitTestTabNodes=function(t,e){for(var n=0,i=this.children.length;n<i;++n){var o=this.children[n].hitTestTabNodes(t,e);if(o)return o}return null},t.prototype.createConfig=function(){var t=this.orientation,e=this.createNormalizedSizes();return{type:"split-area",orientation:t,children:this.children.map((function(t){return t.createConfig()})),sizes:e}},t.prototype.syncHandles=function(){var t=this;o(this.handles,(function(e,n){e.setAttribute("data-orientation",t.orientation),n===t.handles.length-1?(e.classList.add("lm-mod-hidden"),e.classList.add("p-mod-hidden")):(e.classList.remove("lm-mod-hidden"),e.classList.remove("p-mod-hidden"))}))},t.prototype.holdSizes=function(){o(this.sizers,(function(t){t.sizeHint=t.size}))},t.prototype.holdAllSizes=function(){o(this.children,(function(t){return t.holdAllSizes()})),this.holdSizes()},t.prototype.normalizeSizes=function(){var t=this.sizers.length;if(0!==t){this.holdSizes();var e=m(this.sizers,(function(t,e){return t+e.sizeHint}),0);o(this.sizers,0===e?function(e){e.size=e.sizeHint=1/t}:function(t){t.size=t.sizeHint/=e}),this.normalized=!0}},t.prototype.createNormalizedSizes=function(){var t=this.sizers.length;if(0===t)return[];var e=this.sizers.map((function(t){return t.size})),n=m(e,(function(t,e){return t+e}),0);return o(e,0===n?function(n,i){e[i]=1/t}:function(t,i){e[i]=t/n}),e},t.prototype.fit=function(t,e){for(var n="horizontal"===this.orientation,i=Math.max(0,this.children.length-1)*t,o=n?i:0,r=n?0:i,s=1/0,a=1/0,d=0,c=this.children.length;d<c;++d){var h=this.children[d].fit(t,e);n?(r=Math.max(r,h.minHeight),o+=h.minWidth,this.sizers[d].minSize=h.minWidth):(o=Math.max(o,h.minWidth),r+=h.minHeight,this.sizers[d].minSize=h.minHeight)}return{minWidth:o,minHeight:r,maxWidth:s,maxHeight:a}},t.prototype.update=function(t,e,n,i,r,s){var a="horizontal"===this.orientation,d=Math.max(0,this.children.length-1)*r,c=Math.max(0,(a?n:i)-d);this.normalized&&(o(this.sizers,(function(t){t.sizeHint*=c})),this.normalized=!1),ht.calc(this.sizers,c);for(var h=0,l=this.children.length;h<l;++h){var u=this.children[h],p=this.sizers[h].size,f=this.handles[h].style;a?(u.update(t,e,p,i,r,s),t+=p,f.top=e+"px",f.left=t+"px",f.width=r+"px",f.height=i+"px",t+=r):(u.update(t,e,n,p,r,s),e+=p,f.top=e+"px",f.left=t+"px",f.width=n+"px",f.height=r+"px",e+=r)}},t}();t.SplitLayoutNode=c,t.addAria=function(t,e){t.node.setAttribute("role","tabpanel");var n=e.renderer;if(n instanceof qt.Renderer){var i=n.createTabKey({title:t.title,current:!1,zIndex:0});t.node.setAttribute("aria-labelledby",i)}},t.removeAria=function(t){t.node.removeAttribute("role"),t.node.removeAttribute("aria-labelledby")}}(Kt||(Kt={}));var Ut,Yt=function(t){function e(n){void 0===n&&(n={});var i=t.call(this)||this;i._drag=null,i._tabsMovable=!0,i._tabsConstrained=!1,i._addButtonEnabled=!1,i._pressData=null,i._layoutModified=new A(i),i._addRequested=new A(i),i.addClass("lm-DockPanel"),i.addClass("p-DockPanel"),i._document=n.document||document,i._mode=n.mode||"multiple-document",i._renderer=n.renderer||e.defaultRenderer,i._edges=n.edges||Ut.DEFAULT_EDGES,void 0!==n.tabsMovable&&(i._tabsMovable=n.tabsMovable),void 0!==n.tabsConstrained&&(i._tabsConstrained=n.tabsConstrained),void 0!==n.addButtonEnabled&&(i._addButtonEnabled=n.addButtonEnabled),i.dataset.mode=i._mode;var o={createTabBar:function(){return i._createTabBar()},createHandle:function(){return i._createHandle()}};return i.layout=new Vt({document:i._document,renderer:o,spacing:n.spacing,hiddenMode:n.hiddenMode}),i.overlay=n.overlay||new e.Overlay,i.node.appendChild(i.overlay.node),i}return dt(e,t),e.prototype.dispose=function(){this._releaseMouse(),this.overlay.hide(0),this._drag&&this._drag.dispose(),t.prototype.dispose.call(this)},Object.defineProperty(e.prototype,"hiddenMode",{get:function(){return this.layout.hiddenMode},set:function(t){this.layout.hiddenMode=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"layoutModified",{get:function(){return this._layoutModified},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"addRequested",{get:function(){return this._addRequested},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"renderer",{get:function(){return this.layout.renderer},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"spacing",{get:function(){return this.layout.spacing},set:function(t){this.layout.spacing=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mode",{get:function(){return this._mode},set:function(t){if(this._mode!==t){this._mode=t,this.dataset.mode=t;var e=this.layout;switch(t){case"multiple-document":o(e.tabBars(),(function(t){t.show()}));break;case"single-document":e.restoreLayout(Ut.createSingleDocumentConfig(this));break;default:throw"unreachable"}Z.postMessage(this,Ut.LayoutModified)}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tabsMovable",{get:function(){return this._tabsMovable},set:function(t){this._tabsMovable=t,o(this.tabBars(),(function(e){e.tabsMovable=t}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tabsConstrained",{get:function(){return this._tabsConstrained},set:function(t){this._tabsConstrained=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"addButtonEnabled",{get:function(){return this._addButtonEnabled},set:function(t){this._addButtonEnabled=t,o(this.tabBars(),(function(e){e.addButtonEnabled=t}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isEmpty",{get:function(){return this.layout.isEmpty},enumerable:!0,configurable:!0}),e.prototype.widgets=function(){return this.layout.widgets()},e.prototype.selectedWidgets=function(){return this.layout.selectedWidgets()},e.prototype.tabBars=function(){return this.layout.tabBars()},e.prototype.handles=function(){return this.layout.handles()},e.prototype.selectWidget=function(t){var e=l(this.tabBars(),(function(e){return-1!==e.titles.indexOf(t.title)}));if(!e)throw new Error("Widget is not contained in the dock panel.");e.currentTitle=t.title},e.prototype.activateWidget=function(t){this.selectWidget(t),t.activate()},e.prototype.saveLayout=function(){return this.layout.saveLayout()},e.prototype.restoreLayout=function(t){this._mode="multiple-document",this.layout.restoreLayout(t),(D.IS_EDGE||D.IS_IE)&&Z.flush(),Z.postMessage(this,Ut.LayoutModified)},e.prototype.addWidget=function(t,e){void 0===e&&(e={}),"single-document"===this._mode?this.layout.addWidget(t):this.layout.addWidget(t,e),Z.postMessage(this,Ut.LayoutModified)},e.prototype.processMessage=function(e){"layout-modified"===e.type?this._layoutModified.emit(void 0):t.prototype.processMessage.call(this,e)},e.prototype.handleEvent=function(t){switch(t.type){case"lm-dragenter":this._evtDragEnter(t);break;case"lm-dragleave":this._evtDragLeave(t);break;case"lm-dragover":this._evtDragOver(t);break;case"lm-drop":this._evtDrop(t);break;case"mousedown":case"pointerdown":this._evtMouseDown(t);break;case"mousemove":case"pointermove":this._evtMouseMove(t);break;case"mouseup":case"pointerup":this._evtMouseUp(t);break;case"keydown":this._evtKeyDown(t);break;case"contextmenu":t.preventDefault(),t.stopPropagation()}},e.prototype.onBeforeAttach=function(t){this.node.addEventListener("lm-dragenter",this),this.node.addEventListener("lm-dragleave",this),this.node.addEventListener("lm-dragover",this),this.node.addEventListener("lm-drop",this),this.node.addEventListener("mousedown",this),this.node.addEventListener("pointerdown",this)},e.prototype.onAfterDetach=function(t){this.node.removeEventListener("lm-dragenter",this),this.node.removeEventListener("lm-dragleave",this),this.node.removeEventListener("lm-dragover",this),this.node.removeEventListener("lm-drop",this),this.node.removeEventListener("mousedown",this),this.node.removeEventListener("pointerdown",this),this._releaseMouse()},e.prototype.onChildAdded=function(t){Ut.isGeneratedTabBarProperty.get(t.child)||(t.child.addClass("lm-DockPanel-widget"),t.child.addClass("p-DockPanel-widget"))},e.prototype.onChildRemoved=function(t){Ut.isGeneratedTabBarProperty.get(t.child)||(t.child.removeClass("lm-DockPanel-widget"),t.child.removeClass("p-DockPanel-widget"),Z.postMessage(this,Ut.LayoutModified))},e.prototype._evtDragEnter=function(t){t.mimeData.hasData("application/vnd.lumino.widget-factory")&&(t.preventDefault(),t.stopPropagation())},e.prototype._evtDragLeave=function(t){t.preventDefault(),this._tabsConstrained&&t.source!==this||(t.stopPropagation(),this.overlay.hide(1))},e.prototype._evtDragOver=function(t){t.preventDefault(),this._tabsConstrained&&t.source!==this||"invalid"===this._showOverlay(t.clientX,t.clientY)?t.dropAction="none":(t.stopPropagation(),t.dropAction=t.proposedAction)},e.prototype._evtDrop=function(t){if(t.preventDefault(),this.overlay.hide(0),"none"!==t.proposedAction){var e=t.clientX,n=t.clientY,i=Ut.findDropTarget(this,e,n,this._edges),o=i.zone,r=i.target;if(this._tabsConstrained&&t.source!==this||"invalid"===o)t.dropAction="none";else{var s=t.mimeData.getData("application/vnd.lumino.widget-factory");if("function"==typeof s){var a=s();if(a instanceof ft)if(a.contains(this))t.dropAction="none";else{var d=r?Ut.getDropRef(r.tabBar):null;switch(o){case"root-all":this.addWidget(a);break;case"root-top":this.addWidget(a,{mode:"split-top"});break;case"root-left":this.addWidget(a,{mode:"split-left"});break;case"root-right":this.addWidget(a,{mode:"split-right"});break;case"root-bottom":this.addWidget(a,{mode:"split-bottom"});break;case"widget-all":case"widget-tab":this.addWidget(a,{mode:"tab-after",ref:d});break;case"widget-top":this.addWidget(a,{mode:"split-top",ref:d});break;case"widget-left":this.addWidget(a,{mode:"split-left",ref:d});break;case"widget-right":this.addWidget(a,{mode:"split-right",ref:d});break;case"widget-bottom":this.addWidget(a,{mode:"split-bottom",ref:d});break;default:throw"unreachable"}t.dropAction=t.proposedAction,t.stopPropagation(),this.activateWidget(a)}else t.dropAction="none"}else t.dropAction="none"}}else t.dropAction="none"},e.prototype._evtKeyDown=function(t){t.preventDefault(),t.stopPropagation(),27===t.keyCode&&(this._releaseMouse(),Z.postMessage(this,Ut.LayoutModified))},e.prototype._evtMouseDown=function(t){if(0===t.button){var e=this.layout,n=t.target,i=l(e.handles(),(function(t){return t.contains(n)}));if(i){t.preventDefault(),t.stopPropagation(),this._document.addEventListener("keydown",this,!0),this._document.addEventListener("mouseup",this,!0),this._document.addEventListener("mousemove",this,!0),this._document.addEventListener("pointerup",this,!0),this._document.addEventListener("pointermove",this,!0),this._document.addEventListener("contextmenu",this,!0);var o=i.getBoundingClientRect(),r=t.clientX-o.left,s=t.clientY-o.top,a=window.getComputedStyle(i),d=tt.overrideCursor(a.cursor,this._document);this._pressData={handle:i,deltaX:r,deltaY:s,override:d}}}},e.prototype._evtMouseMove=function(t){if(this._pressData){t.preventDefault(),t.stopPropagation();var e=this.node.getBoundingClientRect(),n=t.clientX-e.left-this._pressData.deltaX,i=t.clientY-e.top-this._pressData.deltaY;this.layout.moveHandle(this._pressData.handle,n,i)}},e.prototype._evtMouseUp=function(t){0===t.button&&(t.preventDefault(),t.stopPropagation(),this._releaseMouse(),Z.postMessage(this,Ut.LayoutModified))},e.prototype._releaseMouse=function(){this._pressData&&(this._pressData.override.dispose(),this._pressData=null,this._document.removeEventListener("keydown",this,!0),this._document.removeEventListener("mouseup",this,!0),this._document.removeEventListener("mousemove",this,!0),this._document.removeEventListener("pointerup",this,!0),this._document.removeEventListener("pointermove",this,!0),this._document.removeEventListener("contextmenu",this,!0))},e.prototype._showOverlay=function(t,e){var n,i,o,r,s=Ut.findDropTarget(this,t,e,this._edges),a=s.zone,d=s.target;if("invalid"===a)return this.overlay.hide(100),a;var c=B.boxSizing(this.node),h=this.node.getBoundingClientRect();switch(a){case"root-all":n=c.paddingTop,i=c.paddingLeft,o=c.paddingRight,r=c.paddingBottom;break;case"root-top":n=c.paddingTop,i=c.paddingLeft,o=c.paddingRight,r=h.height*Ut.GOLDEN_RATIO;break;case"root-left":n=c.paddingTop,i=c.paddingLeft,o=h.width*Ut.GOLDEN_RATIO,r=c.paddingBottom;break;case"root-right":n=c.paddingTop,i=h.width*Ut.GOLDEN_RATIO,o=c.paddingRight,r=c.paddingBottom;break;case"root-bottom":n=h.height*Ut.GOLDEN_RATIO,i=c.paddingLeft,o=c.paddingRight,r=c.paddingBottom;break;case"widget-all":n=d.top,i=d.left,o=d.right,r=d.bottom;break;case"widget-top":n=d.top,i=d.left,o=d.right,r=d.bottom+d.height/2;break;case"widget-left":n=d.top,i=d.left,o=d.right+d.width/2,r=d.bottom;break;case"widget-right":n=d.top,i=d.left+d.width/2,o=d.right,r=d.bottom;break;case"widget-bottom":n=d.top+d.height/2,i=d.left,o=d.right,r=d.bottom;break;case"widget-tab":var l=d.tabBar.node.getBoundingClientRect().height;n=d.top,i=d.left,o=d.right,r=d.bottom+d.height-l;break;default:throw"unreachable"}return this.overlay.show({top:n,left:i,right:o,bottom:r}),a},e.prototype._createTabBar=function(){var t=this._renderer.createTabBar(this._document);return Ut.isGeneratedTabBarProperty.set(t,!0),"single-document"===this._mode&&t.hide(),t.tabsMovable=this._tabsMovable,t.allowDeselect=!1,t.addButtonEnabled=this._addButtonEnabled,t.removeBehavior="select-previous-tab",t.insertBehavior="select-tab-if-needed",t.tabMoved.connect(this._onTabMoved,this),t.currentChanged.connect(this._onCurrentChanged,this),t.tabCloseRequested.connect(this._onTabCloseRequested,this),t.tabDetachRequested.connect(this._onTabDetachRequested,this),t.tabActivateRequested.connect(this._onTabActivateRequested,this),t.addRequested.connect(this._onTabAddRequested,this),t},e.prototype._createHandle=function(){return this._renderer.createHandle()},e.prototype._onTabMoved=function(){Z.postMessage(this,Ut.LayoutModified)},e.prototype._onCurrentChanged=function(t,e){var n=e.previousTitle,i=e.currentTitle;n&&n.owner.hide(),i&&i.owner.show(),(D.IS_EDGE||D.IS_IE)&&Z.flush(),Z.postMessage(this,Ut.LayoutModified)},e.prototype._onTabAddRequested=function(t){this._addRequested.emit(t)},e.prototype._onTabActivateRequested=function(t,e){e.title.owner.activate()},e.prototype._onTabCloseRequested=function(t,e){e.title.owner.close()},e.prototype._onTabDetachRequested=function(t,e){var n=this;if(!this._drag){t.releaseMouse();var i=e.title,o=e.tab,r=e.clientX,s=e.clientY,a=new M;a.setData("application/vnd.lumino.widget-factory",(function(){return i.owner}));var d=o.cloneNode(!0);this._drag=new tt({document:this._document,mimeData:a,dragImage:d,proposedAction:"move",supportedActions:"move",source:this}),o.classList.add("lm-mod-hidden"),o.classList.add("p-mod-hidden");this._drag.start(r,s).then((function(){n._drag=null,o.classList.remove("lm-mod-hidden"),o.classList.remove("p-mod-hidden")}))}},e}(ft);!function(t){var e=function(){function t(){this._timer=-1,this._hidden=!0,this.node=document.createElement("div"),this.node.classList.add("lm-DockPanel-overlay"),this.node.classList.add("lm-mod-hidden"),this.node.classList.add("p-DockPanel-overlay"),this.node.classList.add("p-mod-hidden"),this.node.style.position="absolute"}return t.prototype.show=function(t){var e=this.node.style;e.top=t.top+"px",e.left=t.left+"px",e.right=t.right+"px",e.bottom=t.bottom+"px",clearTimeout(this._timer),this._timer=-1,this._hidden&&(this._hidden=!1,this.node.classList.remove("lm-mod-hidden"),this.node.classList.remove("p-mod-hidden"))},t.prototype.hide=function(t){var e=this;if(!this._hidden)return t<=0?(clearTimeout(this._timer),this._timer=-1,this._hidden=!0,this.node.classList.add("lm-mod-hidden"),void this.node.classList.add("p-mod-hidden")):void(-1===this._timer&&(this._timer=window.setTimeout((function(){e._timer=-1,e._hidden=!0,e.node.classList.add("lm-mod-hidden"),e.node.classList.add("p-mod-hidden")}),t)))},t}();t.Overlay=e;var n=function(){function t(){}return t.prototype.createTabBar=function(t){var e=new qt({document:t});return e.addClass("lm-DockPanel-tabBar"),e.addClass("p-DockPanel-tabBar"),e},t.prototype.createHandle=function(){var t=document.createElement("div");return t.className="lm-DockPanel-handle",t.classList.add("p-DockPanel-handle"),t},t}();t.Renderer=n,t.defaultRenderer=new n}(Yt||(Yt={})),function(t){t.GOLDEN_RATIO=.618,t.DEFAULT_EDGES={top:12,right:40,bottom:40,left:40},t.LayoutModified=new Q("layout-modified"),t.isGeneratedTabBarProperty=new S({name:"isGeneratedTabBar",create:function(){return!1}}),t.createSingleDocumentConfig=function(t){if(t.isEmpty)return{main:null};var e=function(t){for(var e,n=0,o=[],r=i(t);void 0!==(e=r.next());)o[n++]=e;return o}(t.widgets()),n=t.selectedWidgets().next(),o=n?e.indexOf(n):-1;return{main:{type:"tab-area",widgets:e,currentIndex:o}}},t.findDropTarget=function(t,e,n,i){if(!B.hitTest(t.node,e,n))return{zone:"invalid",target:null};var o=t.layout;if(o.isEmpty)return{zone:"root-all",target:null};if("multiple-document"===t.mode){var r=t.node.getBoundingClientRect(),s=e-r.left+1,a=n-r.top+1,d=r.right-e,c=r.bottom-n;switch(Math.min(a,d,c,s)){case a:if(a<i.top)return{zone:"root-top",target:null};break;case d:if(d<i.right)return{zone:"root-right",target:null};break;case c:if(c<i.bottom)return{zone:"root-bottom",target:null};break;case s:if(s<i.left)return{zone:"root-left",target:null};break;default:throw"unreachable"}}var h=o.hitTestTabAreas(e,n);if(!h)return{zone:"invalid",target:null};if("single-document"===t.mode)return{zone:"widget-all",target:h};var l=h.x-h.left+1,u=h.y-h.top+1,p=h.left+h.width-h.x,f=h.top+h.height-h.y;if(u<h.tabBar.node.getBoundingClientRect().height)return{zone:"widget-tab",target:h};var m,g=Math.round(h.width/3),v=Math.round(h.height/3);if(l>g&&p>g&&u>v&&f>v)return{zone:"widget-all",target:h};switch(l/=g,u/=v,p/=g,f/=v,Math.min(l,u,p,f)){case l:m="widget-left";break;case u:m="widget-top";break;case p:m="widget-right";break;case f:m="widget-bottom";break;default:throw"unreachable"}return{zone:m,target:h}},t.getDropRef=function(t){return 0===t.titles.length?null:t.currentTitle?t.currentTitle.owner:t.titles[t.titles.length-1].owner}}(Ut||(Ut={})),function(){function t(){this._counter=0,this._widgets=[],this._activeWidget=null,this._currentWidget=null,this._numbers=new Map,this._nodes=new Map,this._activeChanged=new A(this),this._currentChanged=new A(this)}t.prototype.dispose=function(){var t=this;this._counter<0||(this._counter=-1,A.clearData(this),o(this._widgets,(function(e){e.node.removeEventListener("focus",t,!0),e.node.removeEventListener("blur",t,!0)})),this._activeWidget=null,this._currentWidget=null,this._nodes.clear(),this._numbers.clear(),this._widgets.length=0)},Object.defineProperty(t.prototype,"currentChanged",{get:function(){return this._currentChanged},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"activeChanged",{get:function(){return this._activeChanged},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isDisposed",{get:function(){return this._counter<0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentWidget",{get:function(){return this._currentWidget},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"activeWidget",{get:function(){return this._activeWidget},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"widgets",{get:function(){return this._widgets},enumerable:!0,configurable:!0}),t.prototype.focusNumber=function(t){var e=this._numbers.get(t);return void 0===e?-1:e},t.prototype.has=function(t){return this._numbers.has(t)},t.prototype.add=function(t){if(!this._numbers.has(t)){var e=t.node.contains(document.activeElement),n=e?this._counter++:-1;this._widgets.push(t),this._numbers.set(t,n),this._nodes.set(t.node,t),t.node.addEventListener("focus",this,!0),t.node.addEventListener("blur",this,!0),t.disposed.connect(this._onWidgetDisposed,this),e&&this._setWidgets(t,t)}},t.prototype.remove=function(t){var e=this;if(this._numbers.has(t)&&(t.disposed.disconnect(this._onWidgetDisposed,this),t.node.removeEventListener("focus",this,!0),t.node.removeEventListener("blur",this,!0),n.removeFirstOf(this._widgets,t),this._nodes.delete(t.node),this._numbers.delete(t),this._currentWidget===t)){var o,r,s=function(t,e){var n=i(t),o=n.next();if(void 0!==o){for(var r=o;void 0!==(o=n.next());)e(o,r)>0&&(r=o);return r}}((o=this._widgets,r=function(t){return-1!==e._numbers.get(t)},new h(i(o),r)),(function(t,n){return e._numbers.get(t)-e._numbers.get(n)}))||null;this._setWidgets(s,null)}},t.prototype.handleEvent=function(t){switch(t.type){case"focus":this._evtFocus(t);break;case"blur":this._evtBlur(t)}},t.prototype._setWidgets=function(t,e){var n=this._currentWidget;this._currentWidget=t;var i=this._activeWidget;this._activeWidget=e,n!==t&&this._currentChanged.emit({oldValue:n,newValue:t}),i!==e&&this._activeChanged.emit({oldValue:i,newValue:e})},t.prototype._evtFocus=function(t){var e=this._nodes.get(t.currentTarget);e!==this._currentWidget&&this._numbers.set(e,this._counter++),this._setWidgets(e,e)},t.prototype._evtBlur=function(t){var e=this._nodes.get(t.currentTarget),n=t.relatedTarget;n&&(e.node.contains(n)||l(this._widgets,(function(t){return t.node.contains(n)})))||this._setWidgets(this._currentWidget,null)},t.prototype._onWidgetDisposed=function(t){this.remove(t)}}();var Xt,Gt=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this;return n._dirty=!1,n._rowSpacing=4,n._columnSpacing=4,n._items=[],n._rowStarts=[],n._columnStarts=[],n._rowSizers=[new lt],n._columnSizers=[new lt],n._box=null,void 0!==e.rowCount&&Xt.reallocSizers(n._rowSizers,e.rowCount),void 0!==e.columnCount&&Xt.reallocSizers(n._columnSizers,e.columnCount),void 0!==e.rowSpacing&&(n._rowSpacing=Xt.clampValue(e.rowSpacing)),void 0!==e.columnSpacing&&(n._columnSpacing=Xt.clampValue(e.columnSpacing)),n}return dt(e,t),e.prototype.dispose=function(){o(this._items,(function(t){var e=t.widget;t.dispose(),e.dispose()})),this._box=null,this._items.length=0,this._rowStarts.length=0,this._rowSizers.length=0,this._columnStarts.length=0,this._columnSizers.length=0,t.prototype.dispose.call(this)},Object.defineProperty(e.prototype,"rowCount",{get:function(){return this._rowSizers.length},set:function(t){t!==this.rowCount&&(Xt.reallocSizers(this._rowSizers,t),this.parent&&this.parent.fit())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"columnCount",{get:function(){return this._columnSizers.length},set:function(t){t!==this.columnCount&&(Xt.reallocSizers(this._columnSizers,t),this.parent&&this.parent.fit())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rowSpacing",{get:function(){return this._rowSpacing},set:function(t){t=Xt.clampValue(t),this._rowSpacing!==t&&(this._rowSpacing=t,this.parent&&this.parent.fit())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"columnSpacing",{get:function(){return this._columnSpacing},set:function(t){t=Xt.clampValue(t),this._columnSpacing!==t&&(this._columnSpacing=t,this.parent&&this.parent.fit())},enumerable:!0,configurable:!0}),e.prototype.rowStretch=function(t){var e=this._rowSizers[t];return e?e.stretch:-1},e.prototype.setRowStretch=function(t,e){var n=this._rowSizers[t];n&&(e=Xt.clampValue(e),n.stretch!==e&&(n.stretch=e,this.parent&&this.parent.update()))},e.prototype.columnStretch=function(t){var e=this._columnSizers[t];return e?e.stretch:-1},e.prototype.setColumnStretch=function(t,e){var n=this._columnSizers[t];n&&(e=Xt.clampValue(e),n.stretch!==e&&(n.stretch=e,this.parent&&this.parent.update()))},e.prototype.iter=function(){return u(this._items,(function(t){return t.widget}))},e.prototype.addWidget=function(t){-1===n.findFirstIndex(this._items,(function(e){return e.widget===t}))&&(this._items.push(new vt(t)),this.parent&&this.attachWidget(t))},e.prototype.removeWidget=function(t){var e=n.findFirstIndex(this._items,(function(e){return e.widget===t}));if(-1!==e){var i=n.removeAt(this._items,e);this.parent&&this.detachWidget(t),i.dispose()}},e.prototype.init=function(){var e=this;t.prototype.init.call(this),o(this,(function(t){e.attachWidget(t)}))},e.prototype.attachWidget=function(t){this.parent.isAttached&&Z.sendMessage(t,ft.Msg.BeforeAttach),this.parent.node.appendChild(t.node),this.parent.isAttached&&Z.sendMessage(t,ft.Msg.AfterAttach),this.parent.fit()},e.prototype.detachWidget=function(t){this.parent.isAttached&&Z.sendMessage(t,ft.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.isAttached&&Z.sendMessage(t,ft.Msg.AfterDetach),this.parent.fit()},e.prototype.onBeforeShow=function(e){t.prototype.onBeforeShow.call(this,e),this.parent.update()},e.prototype.onBeforeAttach=function(e){t.prototype.onBeforeAttach.call(this,e),this.parent.fit()},e.prototype.onChildShown=function(t){this.parent.fit()},e.prototype.onChildHidden=function(t){this.parent.fit()},e.prototype.onResize=function(t){this.parent.isVisible&&this._update(t.width,t.height)},e.prototype.onUpdateRequest=function(t){this.parent.isVisible&&this._update(-1,-1)},e.prototype.onFitRequest=function(t){this.parent.isAttached&&this._fit()},e.prototype._fit=function(){for(var t=0,n=this.rowCount;t<n;++t)this._rowSizers[t].minSize=0;for(t=0,n=this.columnCount;t<n;++t)this._columnSizers[t].minSize=0;var i=this._items.filter((function(t){return!t.isHidden}));for(t=0,n=i.length;t<n;++t)i[t].fit();var o=this.rowCount-1,r=this.columnCount-1;i.sort(Xt.rowSpanCmp);for(t=0,n=i.length;t<n;++t){var s=i[t],a=e.getCellConfig(s.widget),d=Math.min(a.row,o),c=Math.min(a.row+a.rowSpan-1,o);Xt.distributeMin(this._rowSizers,d,c,s.minHeight)}i.sort(Xt.columnSpanCmp);for(t=0,n=i.length;t<n;++t){s=i[t],a=e.getCellConfig(s.widget);var h=Math.min(a.column,r),l=Math.min(a.column+a.columnSpan-1,r);Xt.distributeMin(this._columnSizers,h,l,s.minWidth)}if("set-no-constraint"!==this.fitPolicy){var u=o*this._rowSpacing,p=r*this._columnSpacing;for(t=0,n=this.rowCount;t<n;++t)u+=this._rowSizers[t].minSize;for(t=0,n=this.columnCount;t<n;++t)p+=this._columnSizers[t].minSize;var f=this._box=B.boxSizing(this.parent.node);p+=f.horizontalSum,u+=f.verticalSum;var m=this.parent.node.style;m.minWidth=p+"px",m.minHeight=u+"px",this._dirty=!0,this.parent.parent&&Z.sendMessage(this.parent.parent,ft.Msg.FitRequest),this._dirty&&Z.sendMessage(this.parent,ft.Msg.UpdateRequest)}else Z.sendMessage(this.parent,ft.Msg.UpdateRequest)},e.prototype._update=function(t,n){this._dirty=!1,t<0&&(t=this.parent.node.offsetWidth),n<0&&(n=this.parent.node.offsetHeight),this._box||(this._box=B.boxSizing(this.parent.node));var i=this._box.paddingTop,o=this._box.paddingLeft,r=t-this._box.horizontalSum,s=n-this._box.verticalSum,a=this.rowCount-1,d=this.columnCount-1,c=a*this._rowSpacing,h=d*this._columnSpacing;ht.calc(this._rowSizers,Math.max(0,s-c)),ht.calc(this._columnSizers,Math.max(0,r-h));for(var l=0,u=i,p=this.rowCount;l<p;++l)this._rowStarts[l]=u,u+=this._rowSizers[l].size+this._rowSpacing;for(l=0,u=o,p=this.columnCount;l<p;++l)this._columnStarts[l]=u,u+=this._columnSizers[l].size+this._columnSpacing;for(l=0,p=this._items.length;l<p;++l){var f=this._items[l];if(!f.isHidden){var m=e.getCellConfig(f.widget),g=Math.min(m.row,a),v=Math.min(m.column,d),y=Math.min(m.row+m.rowSpan-1,a),b=Math.min(m.column+m.columnSpan-1,d),_=this._columnStarts[v],w=this._rowStarts[g],x=this._columnStarts[b]+this._columnSizers[b].size-_,M=this._rowStarts[y]+this._rowSizers[y].size-w;f.update(_,w,x,M)}}},e}(mt);!function(t){t.getCellConfig=function(t){return Xt.cellConfigProperty.get(t)},t.setCellConfig=function(t,e){Xt.cellConfigProperty.set(t,Xt.normalizeConfig(e))}}(Gt||(Gt={})),function(t){t.cellConfigProperty=new S({name:"cellConfig",create:function(){return{row:0,column:0,rowSpan:1,columnSpan:1}},changed:function(t){t.parent&&t.parent.layout instanceof Gt&&t.parent.fit()}}),t.normalizeConfig=function(t){return{row:Math.max(0,Math.floor(t.row||0)),column:Math.max(0,Math.floor(t.column||0)),rowSpan:Math.max(1,Math.floor(t.rowSpan||0)),columnSpan:Math.max(1,Math.floor(t.columnSpan||0))}},t.clampValue=function(t){return Math.max(0,Math.floor(t))},t.rowSpanCmp=function(e,n){var i=t.cellConfigProperty.get(e.widget),o=t.cellConfigProperty.get(n.widget);return i.rowSpan-o.rowSpan},t.columnSpanCmp=function(e,n){var i=t.cellConfigProperty.get(e.widget),o=t.cellConfigProperty.get(n.widget);return i.columnSpan-o.columnSpan},t.reallocSizers=function(t,e){for(e=Math.max(1,Math.floor(e));t.length<e;)t.push(new lt);t.length>e&&(t.length=e)},t.distributeMin=function(t,e,n,i){if(!(n<e))if(e!==n){for(var o=0,r=e;r<=n;++r)o+=t[r].minSize;if(!(o>=i)){var s=(i-o)/(n-e+1);for(r=e;r<=n;++r)t[r].minSize+=s}}else{var a=t[e];a.minSize=Math.max(a.minSize,i)}}}(Xt||(Xt={}));var Zt,Jt,Qt=function(t){function e(n){void 0===n&&(n={});var i=t.call(this,{node:Zt.createNode()})||this;return i._activeIndex=-1,i._tabFocusIndex=0,i._menus=[],i._childMenu=null,i.addClass("lm-MenuBar"),i.addClass("p-MenuBar"),i.setFlag(ft.Flag.DisallowLayout),i.renderer=n.renderer||e.defaultRenderer,i._forceItemsPosition=n.forceItemsPosition||{forceX:!0,forceY:!0},i}return dt(e,t),e.prototype.dispose=function(){this._closeChildMenu(),this._menus.length=0,t.prototype.dispose.call(this)},Object.defineProperty(e.prototype,"childMenu",{get:function(){return this._childMenu},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contentNode",{get:function(){return this.node.getElementsByClassName("lm-MenuBar-content")[0]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activeMenu",{get:function(){return this._menus[this._activeIndex]||null},set:function(t){this.activeIndex=t?this._menus.indexOf(t):-1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activeIndex",{get:function(){return this._activeIndex},set:function(t){(t<0||t>=this._menus.length)&&(t=-1),this._activeIndex!==t&&(this._activeIndex=t,-1!==t&&(this._tabFocusIndex=t),this._activeIndex>=0&&this.contentNode.childNodes[this._activeIndex]&&this.contentNode.childNodes[this._activeIndex].focus(),this.update())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"menus",{get:function(){return this._menus},enumerable:!0,configurable:!0}),e.prototype.openActiveMenu=function(){-1!==this._activeIndex&&(this._openChildMenu(),this._childMenu&&(this._childMenu.activeIndex=-1,this._childMenu.activateNextItem()))},e.prototype.addMenu=function(t){this.insertMenu(this._menus.length,t)},e.prototype.insertMenu=function(t,e){this._closeChildMenu();var i=this._menus.indexOf(e),o=Math.max(0,Math.min(t,this._menus.length));if(-1===i)return n.insert(this._menus,o,e),e.addClass("lm-MenuBar-menu"),e.addClass("p-MenuBar-menu"),e.aboutToClose.connect(this._onMenuAboutToClose,this),e.menuRequested.connect(this._onMenuMenuRequested,this),e.title.changed.connect(this._onTitleChanged,this),void this.update();o===this._menus.length&&o--,i!==o&&(n.move(this._menus,i,o),this.update())},e.prototype.removeMenu=function(t){this.removeMenuAt(this._menus.indexOf(t))},e.prototype.removeMenuAt=function(t){this._closeChildMenu();var e=n.removeAt(this._menus,t);e&&(e.aboutToClose.disconnect(this._onMenuAboutToClose,this),e.menuRequested.disconnect(this._onMenuMenuRequested,this),e.title.changed.disconnect(this._onTitleChanged,this),e.removeClass("lm-MenuBar-menu"),e.removeClass("p-MenuBar-menu"),this.update())},e.prototype.clearMenus=function(){if(0!==this._menus.length){this._closeChildMenu();for(var t=0,e=this._menus;t<e.length;t++){var n=e[t];n.aboutToClose.disconnect(this._onMenuAboutToClose,this),n.menuRequested.disconnect(this._onMenuMenuRequested,this),n.title.changed.disconnect(this._onTitleChanged,this),n.removeClass("lm-MenuBar-menu"),n.removeClass("p-MenuBar-menu")}this._menus.length=0,this.update()}},e.prototype.handleEvent=function(t){switch(t.type){case"keydown":this._evtKeyDown(t);break;case"mousedown":this._evtMouseDown(t);break;case"mousemove":this._evtMouseMove(t);break;case"mouseleave":this._evtMouseLeave(t);break;case"contextmenu":t.preventDefault(),t.stopPropagation()}},e.prototype.onBeforeAttach=function(t){this.node.addEventListener("keydown",this),this.node.addEventListener("mousedown",this),this.node.addEventListener("mousemove",this),this.node.addEventListener("mouseleave",this),this.node.addEventListener("contextmenu",this)},e.prototype.onAfterDetach=function(t){this.node.removeEventListener("keydown",this),this.node.removeEventListener("mousedown",this),this.node.removeEventListener("mousemove",this),this.node.removeEventListener("mouseleave",this),this.node.removeEventListener("contextmenu",this),this._closeChildMenu()},e.prototype.onActivateRequest=function(t){this.isAttached&&(this.activeIndex=0)},e.prototype.onUpdateRequest=function(t){for(var e=this,n=this._menus,i=this.renderer,o=this._activeIndex,r=this._tabFocusIndex>=0&&this._tabFocusIndex<n.length?this._tabFocusIndex:0,s=new Array(n.length),a=function(t,a){var d=n[t].title,c=t===o;c&&0==n[t].items.length&&(c=!1),s[t]=i.renderItem({title:d,active:c,tabbable:t===r,onfocus:function(){e.activeIndex=t}})},d=0,c=n.length;d<c;++d)a(d);nt.render(s,this.contentNode)},e.prototype._evtKeyDown=function(t){var e=t.keyCode;if(9!==e)if(t.preventDefault(),t.stopPropagation(),13!==e&&32!==e&&38!==e&&40!==e){if(27===e)return this._closeChildMenu(),this.activeIndex=-1,void this.node.blur();if(37!==e)if(39!==e){var n=j().keyForKeydownEvent(t);if(n){var i=this._activeIndex+1,o=Zt.findMnemonic(this._menus,n,i);-1===o.index||o.multiple?-1!==o.index?this.activeIndex=o.index:-1!==o.auto&&(this.activeIndex=o.auto):(this.activeIndex=o.index,this.openActiveMenu())}}else{r=this._activeIndex,s=this._menus.length;this.activeIndex=r===s-1?0:r+1}else{var r=this._activeIndex,s=this._menus.length;this.activeIndex=0===r?s-1:r-1}}else this.openActiveMenu();else this.activeIndex=-1},e.prototype._evtMouseDown=function(t){if(B.hitTest(this.node,t.clientX,t.clientY)){t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation();var e=n.findFirstIndex(this.contentNode.children,(function(e){return B.hitTest(e,t.clientX,t.clientY)}));if(-1!==e){if(0===t.button)if(this._childMenu)this._closeChildMenu(),this.activeIndex=e;else{var i=this._positionForMenu(e);jt.saveWindowData(),this.activeIndex=e,this._openChildMenu(i)}}else this._closeChildMenu()}},e.prototype._evtMouseMove=function(t){var e=n.findFirstIndex(this.contentNode.children,(function(e){return B.hitTest(e,t.clientX,t.clientY)}));if(e!==this._activeIndex&&(-1!==e||!this._childMenu)){var i=this._positionForMenu(e);jt.saveWindowData(),this.activeIndex=e,this._childMenu&&this._openChildMenu(i)}},e.prototype._positionForMenu=function(t){var e=this.contentNode.children[t].getBoundingClientRect(),n=e.left;return{top:e.bottom,left:n}},e.prototype._evtMouseLeave=function(t){this._childMenu||(this.activeIndex=-1)},e.prototype._openChildMenu=function(t){var e;void 0===t&&(t={});var n=this.activeMenu;if(n){var i=this._childMenu;if(i!==n){this._childMenu=n,i?i.close():document.addEventListener("mousedown",this,!0),Z.sendMessage(this,ft.Msg.UpdateRequest);var o=t.left,r=t.top;void 0!==o&&void 0!==r||(o=(e=this._positionForMenu(this._activeIndex)).left,r=e.top),i||(this.addClass("lm-mod-active"),this.addClass("p-mod-active")),n.items.length>0&&n.open(o,r,this._forceItemsPosition)}}else this._closeChildMenu()},e.prototype._closeChildMenu=function(){if(this._childMenu){this.removeClass("lm-mod-active"),this.removeClass("p-mod-active"),document.removeEventListener("mousedown",this,!0);var t=this._childMenu;this._childMenu=null,t.close(),this.activeIndex=-1}},e.prototype._onMenuAboutToClose=function(t){t===this._childMenu&&(this.removeClass("lm-mod-active"),this.removeClass("p-mod-active"),document.removeEventListener("mousedown",this,!0),this._childMenu=null,this.activeIndex=-1)},e.prototype._onMenuMenuRequested=function(t,e){if(t===this._childMenu){var n=this._activeIndex,i=this._menus.length;switch(e){case"next":this.activeIndex=n===i-1?0:n+1;break;case"previous":this.activeIndex=0===n?i-1:n-1}this.openActiveMenu()}},e.prototype._onTitleChanged=function(){this.update()},e}(ft);!function(t){var e=function(){function t(){}return t.prototype.renderItem=function(t){var e=this.createItemClass(t),n=this.createItemDataset(t),i=this.createItemARIA(t);return st.li(ct({className:e,dataset:n,tabindex:t.tabbable?"0":"-1",onfocus:t.onfocus},i),this.renderIcon(t),this.renderLabel(t))},t.prototype.renderIcon=function(t){var e=this.createIconClass(t);return"string"==typeof t.title.icon?st.div({className:e},t.title.iconLabel):st.div({className:e},t.title.icon,t.title.iconLabel)},t.prototype.renderLabel=function(t){var e=this.formatLabel(t);return st.div({className:"lm-MenuBar-itemLabel p-MenuBar-itemLabel"},e)},t.prototype.createItemClass=function(t){var e="lm-MenuBar-item";return e+=" p-MenuBar-item",t.title.className&&(e+=" "+t.title.className),t.active&&(e+=" lm-mod-active",e+=" p-mod-active"),e},t.prototype.createItemDataset=function(t){return t.title.dataset},t.prototype.createItemARIA=function(t){return{role:"menuitem","aria-haspopup":"true"}},t.prototype.createIconClass=function(t){var e="lm-MenuBar-itemIcon";e+=" p-MenuBar-itemIcon";var n=t.title.iconClass;return n?e+" "+n:e},t.prototype.formatLabel=function(t){var e=t.title,n=e.label,i=e.mnemonic;if(i<0||i>=n.length)return n;var o=n.slice(0,i),r=n.slice(i+1),s=n[i];return[o,st.span({className:"lm-MenuBar-itemMnemonic p-MenuBar-itemMnemonic"},s),r]},t}();t.Renderer=e,t.defaultRenderer=new e}(Qt||(Qt={})),function(t){t.createNode=function(){var t=document.createElement("div"),e=document.createElement("ul");return e.className="lm-MenuBar-content",e.classList.add("p-MenuBar-content"),t.appendChild(e),e.setAttribute("role","menubar"),t},t.findMnemonic=function(t,e,n){for(var i=-1,o=-1,r=!1,s=e.toUpperCase(),a=0,d=t.length;a<d;++a){var c=(a+n)%d,h=t[c].title;if(0!==h.label.length){var l=h.mnemonic;l>=0&&l<h.label.length?h.label[l].toUpperCase()===s&&(-1===i?i=c:r=!0):-1===o&&h.label[0].toUpperCase()===s&&(o=c)}}return{index:i,multiple:r,auto:o}}}(Zt||(Zt={})),function(t){function e(e){void 0===e&&(e={});var n=t.call(this,{node:Jt.createNode()})||this;return n._onRepeat=function(){if(n._repeatTimer=-1,n._pressData){var t=n._pressData.part;if("thumb"!==t){n._repeatTimer=window.setTimeout(n._onRepeat,20);var e=n._pressData.mouseX,i=n._pressData.mouseY;if("decrement"!==t)if("increment"!==t){if("track"===t){if(!B.hitTest(n.trackNode,e,i))return;var o=n.thumbNode;if(B.hitTest(o,e,i))return;var r=o.getBoundingClientRect(),s=void 0;return s="horizontal"===n._orientation?e<r.left?"decrement":"increment":i<r.top?"decrement":"increment",void n._pageRequested.emit(s)}}else{if(!B.hitTest(n.incrementNode,e,i))return;n._stepRequested.emit("increment")}else{if(!B.hitTest(n.decrementNode,e,i))return;n._stepRequested.emit("decrement")}}}},n._value=0,n._page=10,n._maximum=100,n._repeatTimer=-1,n._pressData=null,n._thumbMoved=new A(n),n._stepRequested=new A(n),n._pageRequested=new A(n),n.addClass("lm-ScrollBar"),n.addClass("p-ScrollBar"),n.setFlag(ft.Flag.DisallowLayout),n._orientation=e.orientation||"vertical",n.dataset.orientation=n._orientation,void 0!==e.maximum&&(n._maximum=Math.max(0,e.maximum)),void 0!==e.page&&(n._page=Math.max(0,e.page)),void 0!==e.value&&(n._value=Math.max(0,Math.min(e.value,n._maximum))),n}dt(e,t),Object.defineProperty(e.prototype,"thumbMoved",{get:function(){return this._thumbMoved},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"stepRequested",{get:function(){return this._stepRequested},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pageRequested",{get:function(){return this._pageRequested},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"orientation",{get:function(){return this._orientation},set:function(t){this._orientation!==t&&(this._releaseMouse(),this._orientation=t,this.dataset.orientation=t,this.update())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(t){t=Math.max(0,Math.min(t,this._maximum)),this._value!==t&&(this._value=t,this.update())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"page",{get:function(){return this._page},set:function(t){t=Math.max(0,t),this._page!==t&&(this._page=t,this.update())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maximum",{get:function(){return this._maximum},set:function(t){t=Math.max(0,t),this._maximum!==t&&(this._maximum=t,this._value=Math.min(this._value,t),this.update())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"decrementNode",{get:function(){return this.node.getElementsByClassName("lm-ScrollBar-button")[0]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"incrementNode",{get:function(){return this.node.getElementsByClassName("lm-ScrollBar-button")[1]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"trackNode",{get:function(){return this.node.getElementsByClassName("lm-ScrollBar-track")[0]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"thumbNode",{get:function(){return this.node.getElementsByClassName("lm-ScrollBar-thumb")[0]},enumerable:!0,configurable:!0}),e.prototype.handleEvent=function(t){switch(t.type){case"mousedown":this._evtMouseDown(t);break;case"mousemove":this._evtMouseMove(t);break;case"mouseup":this._evtMouseUp(t);break;case"keydown":this._evtKeyDown(t);break;case"contextmenu":t.preventDefault(),t.stopPropagation()}},e.prototype.onBeforeAttach=function(t){this.node.addEventListener("mousedown",this),this.update()},e.prototype.onAfterDetach=function(t){this.node.removeEventListener("mousedown",this),this._releaseMouse()},e.prototype.onUpdateRequest=function(t){var e=100*this._value/this._maximum,n=100*this._page/(this._page+this._maximum);e=Math.max(0,Math.min(e,100)),n=Math.max(0,Math.min(n,100));var i=this.thumbNode.style;"horizontal"===this._orientation?(i.top="",i.height="",i.left=e+"%",i.width=n+"%",i.transform="translate("+-e+"%, 0%)"):(i.left="",i.width="",i.top=e+"%",i.height=n+"%",i.transform="translate(0%, "+-e+"%)")},e.prototype._evtKeyDown=function(t){if(t.preventDefault(),t.stopPropagation(),27===t.keyCode){var e=this._pressData?this._pressData.value:-1;this._releaseMouse(),-1!==e&&this._moveThumb(e)}},e.prototype._evtMouseDown=function(t){if(0===t.button&&(this.activate(),!this._pressData)){var e=Jt.findPart(this,t.target);if(e){t.preventDefault(),t.stopPropagation();var n=tt.overrideCursor("default");if(this._pressData={part:e,override:n,delta:-1,value:-1,mouseX:t.clientX,mouseY:t.clientY},document.addEventListener("mousemove",this,!0),document.addEventListener("mouseup",this,!0),document.addEventListener("keydown",this,!0),document.addEventListener("contextmenu",this,!0),"thumb"===e){var i=this.thumbNode,o=i.getBoundingClientRect();return"horizontal"===this._orientation?this._pressData.delta=t.clientX-o.left:this._pressData.delta=t.clientY-o.top,i.classList.add("lm-mod-active"),i.classList.add("p-mod-active"),void(this._pressData.value=this._value)}if("track"===e){o=this.thumbNode.getBoundingClientRect();var r=void 0;return r="horizontal"===this._orientation?t.clientX<o.left?"decrement":"increment":t.clientY<o.top?"decrement":"increment",this._repeatTimer=window.setTimeout(this._onRepeat,350),void this._pageRequested.emit(r)}return"decrement"===e?(this.decrementNode.classList.add("lm-mod-active"),this.decrementNode.classList.add("p-mod-active"),this._repeatTimer=window.setTimeout(this._onRepeat,350),void this._stepRequested.emit("decrement")):"increment"===e?(this.incrementNode.classList.add("lm-mod-active"),this.incrementNode.classList.add("p-mod-active"),this._repeatTimer=window.setTimeout(this._onRepeat,350),void this._stepRequested.emit("increment")):void 0}}},e.prototype._evtMouseMove=function(t){if(this._pressData&&(t.preventDefault(),t.stopPropagation(),this._pressData.mouseX=t.clientX,this._pressData.mouseY=t.clientY,"thumb"===this._pressData.part)){var e,n,i=this.thumbNode.getBoundingClientRect(),o=this.trackNode.getBoundingClientRect();"horizontal"===this._orientation?(e=t.clientX-o.left-this._pressData.delta,n=o.width-i.width):(e=t.clientY-o.top-this._pressData.delta,n=o.height-i.height);var r=0===n?0:e*this._maximum/n;this._moveThumb(r)}},e.prototype._evtMouseUp=function(t){0===t.button&&(t.preventDefault(),t.stopPropagation(),this._releaseMouse())},e.prototype._releaseMouse=function(){this._pressData&&(clearTimeout(this._repeatTimer),this._repeatTimer=-1,this._pressData.override.dispose(),this._pressData=null,document.removeEventListener("mousemove",this,!0),document.removeEventListener("mouseup",this,!0),document.removeEventListener("keydown",this,!0),document.removeEventListener("contextmenu",this,!0),this.thumbNode.classList.remove("lm-mod-active"),this.decrementNode.classList.remove("lm-mod-active"),this.incrementNode.classList.remove("lm-mod-active"),this.thumbNode.classList.remove("p-mod-active"),this.decrementNode.classList.remove("p-mod-active"),this.incrementNode.classList.remove("p-mod-active"))},e.prototype._moveThumb=function(t){t=Math.max(0,Math.min(t,this._maximum)),this._value!==t&&(this._value=t,this.update(),this._thumbMoved.emit(t))}}(ft),function(t){t.createNode=function(){var t=document.createElement("div"),e=document.createElement("div"),n=document.createElement("div"),i=document.createElement("div"),o=document.createElement("div");return e.className="lm-ScrollBar-button",n.className="lm-ScrollBar-button",e.dataset.action="decrement",n.dataset.action="increment",i.className="lm-ScrollBar-track",o.className="lm-ScrollBar-thumb",e.classList.add("p-ScrollBar-button"),n.classList.add("p-ScrollBar-button"),i.classList.add("p-ScrollBar-track"),o.classList.add("p-ScrollBar-thumb"),i.appendChild(o),t.appendChild(e),t.appendChild(i),t.appendChild(n),t},t.findPart=function(t,e){return t.thumbNode.contains(e)?"thumb":t.trackNode.contains(e)?"track":t.decrementNode.contains(e)?"decrement":t.incrementNode.contains(e)?"increment":null}}(Jt||(Jt={})),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._widget=null,e}dt(e,t),e.prototype.dispose=function(){if(this._widget){var e=this._widget;this._widget=null,e.dispose()}t.prototype.dispose.call(this)},Object.defineProperty(e.prototype,"widget",{get:function(){return this._widget},set:function(t){t&&(t.parent=this.parent),this._widget!==t&&(this._widget&&this._widget.dispose(),this._widget=t,this.parent&&t&&this.attachWidget(t))},enumerable:!0,configurable:!0}),e.prototype.iter=function(){return this._widget?g(this._widget):d()},e.prototype.removeWidget=function(t){this._widget===t&&(this._widget=null,this.parent&&this.detachWidget(t))},e.prototype.init=function(){var e=this;t.prototype.init.call(this),o(this,(function(t){e.attachWidget(t)}))},e.prototype.attachWidget=function(t){this.parent.isAttached&&Z.sendMessage(t,ft.Msg.BeforeAttach),this.parent.node.appendChild(t.node),this.parent.isAttached&&Z.sendMessage(t,ft.Msg.AfterAttach)},e.prototype.detachWidget=function(t){this.parent.isAttached&&Z.sendMessage(t,ft.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.isAttached&&Z.sendMessage(t,ft.Msg.AfterDetach)}}(mt);var $t,te=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this;return n._dirty=!1,n._items=[],n._box=null,n._hiddenMode=void 0!==e.hiddenMode?e.hiddenMode:ft.HiddenMode.Display,n}return dt(e,t),Object.defineProperty(e.prototype,"hiddenMode",{get:function(){return this._hiddenMode},set:function(t){var e=this;this._hiddenMode!==t&&(this._hiddenMode=t,this.widgets.length>1&&this.widgets.forEach((function(t){t.hiddenMode=e._hiddenMode})))},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){o(this._items,(function(t){t.dispose()})),this._box=null,this._items.length=0,t.prototype.dispose.call(this)},e.prototype.attachWidget=function(t,e){this._hiddenMode===ft.HiddenMode.Scale&&this._items.length>0?(1===this._items.length&&(this.widgets[0].hiddenMode=ft.HiddenMode.Scale),e.hiddenMode=ft.HiddenMode.Scale):e.hiddenMode=ft.HiddenMode.Display,n.insert(this._items,t,new vt(e)),this.parent.isAttached&&Z.sendMessage(e,ft.Msg.BeforeAttach),this.parent.node.appendChild(e.node),this.parent.isAttached&&Z.sendMessage(e,ft.Msg.AfterAttach),this.parent.fit()},e.prototype.moveWidget=function(t,e,i){n.move(this._items,t,e),this.parent.update()},e.prototype.detachWidget=function(t,e){var i=n.removeAt(this._items,t);this.parent.isAttached&&Z.sendMessage(e,ft.Msg.BeforeDetach),this.parent.node.removeChild(e.node),this.parent.isAttached&&Z.sendMessage(e,ft.Msg.AfterDetach),i.widget.node.style.zIndex="",this._hiddenMode===ft.HiddenMode.Scale&&(e.hiddenMode=ft.HiddenMode.Display,1===this._items.length&&(this._items[0].widget.hiddenMode=ft.HiddenMode.Display)),i.dispose(),this.parent.fit()},e.prototype.onBeforeShow=function(e){t.prototype.onBeforeShow.call(this,e),this.parent.update()},e.prototype.onBeforeAttach=function(e){t.prototype.onBeforeAttach.call(this,e),this.parent.fit()},e.prototype.onChildShown=function(t){this.parent.fit()},e.prototype.onChildHidden=function(t){this.parent.fit()},e.prototype.onResize=function(t){this.parent.isVisible&&this._update(t.width,t.height)},e.prototype.onUpdateRequest=function(t){this.parent.isVisible&&this._update(-1,-1)},e.prototype.onFitRequest=function(t){this.parent.isAttached&&this._fit()},e.prototype._fit=function(){for(var t=0,e=0,n=0,i=this._items.length;n<i;++n){var o=this._items[n];o.isHidden||(o.fit(),t=Math.max(t,o.minWidth),e=Math.max(e,o.minHeight))}var r=this._box=B.boxSizing(this.parent.node);t+=r.horizontalSum,e+=r.verticalSum;var s=this.parent.node.style;s.minWidth=t+"px",s.minHeight=e+"px",this._dirty=!0,this.parent.parent&&Z.sendMessage(this.parent.parent,ft.Msg.FitRequest),this._dirty&&Z.sendMessage(this.parent,ft.Msg.UpdateRequest)},e.prototype._update=function(t,e){this._dirty=!1;for(var n=0,i=0,o=this._items.length;i<o;++i)n+=+!this._items[i].isHidden;if(0!==n){t<0&&(t=this.parent.node.offsetWidth),e<0&&(e=this.parent.node.offsetHeight),this._box||(this._box=B.boxSizing(this.parent.node));var r=this._box.paddingTop,s=this._box.paddingLeft,a=t-this._box.horizontalSum,d=e-this._box.verticalSum;for(i=0,o=this._items.length;i<o;++i){var c=this._items[i];c.isHidden||(c.widget.node.style.zIndex=""+i,c.update(s,r,a,d))}}},e}(bt),ee=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,{layout:$t.createLayout(e)})||this;return n._widgetRemoved=new A(n),n.addClass("lm-StackedPanel"),n.addClass("p-StackedPanel"),n}return dt(e,t),Object.defineProperty(e.prototype,"hiddenMode",{get:function(){return this.layout.hiddenMode},set:function(t){this.layout.hiddenMode=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"widgetRemoved",{get:function(){return this._widgetRemoved},enumerable:!0,configurable:!0}),e.prototype.onChildAdded=function(t){t.child.addClass("lm-StackedPanel-child"),t.child.addClass("p-StackedPanel-child")},e.prototype.onChildRemoved=function(t){t.child.removeClass("lm-StackedPanel-child"),t.child.removeClass("p-StackedPanel-child"),this._widgetRemoved.emit(t.child)},e}(St);!function(t){t.createLayout=function(t){return t.layout||new te}}($t||($t={}));var ne,ie=function(t){function e(e){void 0===e&&(e={});var n=t.call(this)||this;n._currentChanged=new A(n),n._addRequested=new A(n),n.addClass("lm-TabPanel"),n.addClass("p-TabPanel"),n.tabBar=new qt(e),n.tabBar.addClass("lm-TabPanel-tabBar"),n.stackedPanel=new ee,n.stackedPanel.addClass("lm-TabPanel-stackedPanel"),n.tabBar.addClass("p-TabPanel-tabBar"),n.stackedPanel.addClass("p-TabPanel-stackedPanel"),n.tabBar.tabMoved.connect(n._onTabMoved,n),n.tabBar.currentChanged.connect(n._onCurrentChanged,n),n.tabBar.tabCloseRequested.connect(n._onTabCloseRequested,n),n.tabBar.tabActivateRequested.connect(n._onTabActivateRequested,n),n.tabBar.addRequested.connect(n._onTabAddRequested,n),n.stackedPanel.widgetRemoved.connect(n._onWidgetRemoved,n),n._tabPlacement=e.tabPlacement||"top";var i=ne.directionFromPlacement(n._tabPlacement),o=ne.orientationFromPlacement(n._tabPlacement);n.tabBar.orientation=o,n.tabBar.dataset.placement=n._tabPlacement;var r=new Et({direction:i,spacing:0});return Et.setStretch(n.tabBar,0),Et.setStretch(n.stackedPanel,1),r.addWidget(n.tabBar),r.addWidget(n.stackedPanel),n.layout=r,n}return dt(e,t),Object.defineProperty(e.prototype,"currentChanged",{get:function(){return this._currentChanged},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentIndex",{get:function(){return this.tabBar.currentIndex},set:function(t){this.tabBar.currentIndex=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentWidget",{get:function(){var t=this.tabBar.currentTitle;return t?t.owner:null},set:function(t){this.tabBar.currentTitle=t?t.title:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tabsMovable",{get:function(){return this.tabBar.tabsMovable},set:function(t){this.tabBar.tabsMovable=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"addButtonEnabled",{get:function(){return this.tabBar.addButtonEnabled},set:function(t){this.tabBar.addButtonEnabled=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tabPlacement",{get:function(){return this._tabPlacement},set:function(t){if(this._tabPlacement!==t){this._tabPlacement=t;var e=ne.directionFromPlacement(t),n=ne.orientationFromPlacement(t);this.tabBar.orientation=n,this.tabBar.dataset.placement=t,this.layout.direction=e}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"addRequested",{get:function(){return this._addRequested},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"widgets",{get:function(){return this.stackedPanel.widgets},enumerable:!0,configurable:!0}),e.prototype.addWidget=function(t){this.insertWidget(this.widgets.length,t)},e.prototype.insertWidget=function(t,e){e!==this.currentWidget&&e.hide(),this.stackedPanel.insertWidget(t,e),this.tabBar.insertTab(t,e.title),e.node.setAttribute("role","tabpanel");var n=this.tabBar.renderer;if(n instanceof qt.Renderer){var i=n.createTabKey({title:e.title,current:!1,zIndex:0});e.node.setAttribute("aria-labelledby",i)}},e.prototype._onCurrentChanged=function(t,e){var n=e.previousIndex,i=e.previousTitle,o=e.currentIndex,r=e.currentTitle,s=i?i.owner:null,a=r?r.owner:null;s&&s.hide(),a&&a.show(),this._currentChanged.emit({previousIndex:n,previousWidget:s,currentIndex:o,currentWidget:a}),(D.IS_EDGE||D.IS_IE)&&Z.flush()},e.prototype._onTabAddRequested=function(t,e){this._addRequested.emit(t)},e.prototype._onTabActivateRequested=function(t,e){e.title.owner.activate()},e.prototype._onTabCloseRequested=function(t,e){e.title.owner.close()},e.prototype._onTabMoved=function(t,e){this.stackedPanel.insertWidget(e.toIndex,e.title.owner)},e.prototype._onWidgetRemoved=function(t,e){e.node.removeAttribute("role"),e.node.removeAttribute("aria-labelledby"),this.tabBar.removeTab(e.title)},e}(ft);function oe(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}!function(t){t.orientationFromPlacement=function(t){return e[t]},t.directionFromPlacement=function(t){return n[t]};var e={top:"horizontal",left:"vertical",right:"vertical",bottom:"horizontal"},n={top:"top-to-bottom",left:"left-to-right",right:"right-to-left",bottom:"bottom-to-top"}}(ne||(ne={}));oe(".lm-Widget,.p-Widget{box-sizing:border-box;cursor:default;overflow:hidden;position:relative}.lm-Widget.lm-mod-hidden,.p-Widget.p-mod-hidden{display:none!important}");oe('.lm-CommandPalette,.p-CommandPalette{display:flex;flex-direction:column;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.lm-CommandPalette-search,.p-CommandPalette-search{flex:0 0 auto}.lm-CommandPalette-content,.p-CommandPalette-content{flex:1 1 auto;list-style-type:none;margin:0;min-height:0;overflow:auto;padding:0}.lm-CommandPalette-header,.p-CommandPalette-header{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.lm-CommandPalette-item,.p-CommandPalette-item{display:flex;flex-direction:row}.lm-CommandPalette-itemIcon,.p-CommandPalette-itemIcon{flex:0 0 auto}.lm-CommandPalette-itemContent,.p-CommandPalette-itemContent{flex:1 1 auto;overflow:hidden}.lm-CommandPalette-itemShortcut,.p-CommandPalette-itemShortcut{flex:0 0 auto}.lm-CommandPalette-itemLabel,.p-CommandPalette-itemLabel{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.lm-close-icon{background-color:transparent;border:1px solid transparent;bottom:0;cursor:pointer;display:none;margin:auto;outline:0;padding:7px 0;position:absolute;right:3%;top:0;vertical-align:middle;z-index:1}.lm-close-icon:after{color:#000;content:"X";cursor:pointer;display:block;font-size:12px;font-weight:400;height:15px;text-align:center;width:15px}');oe('.lm-DockPanel,.lm-DockPanel-widget,.p-DockPanel,.p-DockPanel-widget{z-index:0}.lm-DockPanel-tabBar,.p-DockPanel-tabBar{z-index:1}.lm-DockPanel-handle,.p-DockPanel-handle{z-index:2}.lm-DockPanel-handle.lm-mod-hidden,.p-DockPanel-handle.p-mod-hidden{display:none!important}.lm-DockPanel-handle:after,.p-DockPanel-handle:after{content:"";height:100%;left:0;position:absolute;top:0;width:100%}.lm-DockPanel-handle[data-orientation=horizontal],.p-DockPanel-handle[data-orientation=horizontal]{cursor:ew-resize}.lm-DockPanel-handle[data-orientation=vertical],.p-DockPanel-handle[data-orientation=vertical]{cursor:ns-resize}.lm-DockPanel-handle[data-orientation=horizontal]:after,.p-DockPanel-handle[data-orientation=horizontal]:after{left:50%;min-width:8px;transform:translateX(-50%)}.lm-DockPanel-handle[data-orientation=vertical]:after,.p-DockPanel-handle[data-orientation=vertical]:after{min-height:8px;top:50%;transform:translateY(-50%)}.lm-DockPanel-overlay,.p-DockPanel-overlay{box-sizing:border-box;pointer-events:none;z-index:3}.lm-DockPanel-overlay.lm-mod-hidden,.p-DockPanel-overlay.p-mod-hidden{display:none!important}');oe(".lm-Menu,.p-Menu{outline:none;overflow-x:hidden;overflow-y:auto;position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;z-index:10000}.lm-Menu-content,.p-Menu-content{display:table;list-style-type:none;margin:0;padding:0}.lm-Menu-item,.p-Menu-item{display:table-row}.lm-Menu-item.lm-mod-collapsed,.lm-Menu-item.lm-mod-hidden,.p-Menu-item.p-mod-collapsed,.p-Menu-item.p-mod-hidden{display:none!important}.lm-Menu-itemIcon,.lm-Menu-itemSubmenuIcon,.p-Menu-itemIcon,.p-Menu-itemSubmenuIcon{display:table-cell;text-align:center}.lm-Menu-itemLabel,.p-Menu-itemLabel{display:table-cell;text-align:left}.lm-Menu-itemShortcut,.p-Menu-itemShortcut{display:table-cell;text-align:right}");oe(".lm-MenuBar,.p-MenuBar{outline:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.lm-MenuBar-content,.p-MenuBar-content{display:flex;flex-direction:row;list-style-type:none;margin:0;padding:0}.lm-MenuBar-item,.p--MenuBar-item{box-sizing:border-box}.lm-MenuBar-itemIcon,.lm-MenuBar-itemLabel,.p-MenuBar-itemIcon,.p-MenuBar-itemLabel{display:inline-block}");oe(".lm-ScrollBar,.p-ScrollBar{display:flex;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.lm-ScrollBar[data-orientation=horizontal],.p-ScrollBar[data-orientation=horizontal]{flex-direction:row}.lm-ScrollBar[data-orientation=vertical],.p-ScrollBar[data-orientation=vertical]{flex-direction:column}.lm-ScrollBar-button,.p-ScrollBar-button{box-sizing:border-box;flex:0 0 auto}.lm-ScrollBar-track,.p-ScrollBar-track{box-sizing:border-box;flex:1 1 auto;overflow:hidden;position:relative}.lm-ScrollBar-thumb,.p-ScrollBar-thumb{box-sizing:border-box;position:absolute}");oe('.lm-SplitPanel-child,.p-SplitPanel-child{z-index:0}.lm-SplitPanel-handle,.p-SplitPanel-handle{z-index:1}.lm-SplitPanel-handle.lm-mod-hidden,.p-SplitPanel-handle.p-mod-hidden{display:none!important}.lm-SplitPanel-handle:after,.p-SplitPanel-handle:after{content:"";height:100%;left:0;position:absolute;top:0;width:100%}.lm-SplitPanel[data-orientation=horizontal]>.lm-SplitPanel-handle,.p-SplitPanel[data-orientation=horizontal]>.p-SplitPanel-handle{cursor:ew-resize}.lm-SplitPanel[data-orientation=vertical]>.lm-SplitPanel-handle,.p-SplitPanel[data-orientation=vertical]>.p-SplitPanel-handle{cursor:ns-resize}.lm-SplitPanel[data-orientation=horizontal]>.lm-SplitPanel-handle:after,.p-SplitPanel[data-orientation=horizontal]>.p-SplitPanel-handle:after{left:50%;min-width:8px;transform:translateX(-50%)}.lm-SplitPanel[data-orientation=vertical]>.lm-SplitPanel-handle:after,.p-SplitPanel[data-orientation=vertical]>.p-SplitPanel-handle:after{min-height:8px;top:50%;transform:translateY(-50%)}');oe(".lm-TabBar,.p-TabBar{display:flex;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.lm-TabBar[data-orientation=horizontal],.p-TabBar[data-orientation=horizontal]{align-items:flex-end;flex-direction:row}.lm-TabBar[data-orientation=vertical],.p-TabBar[data-orientation=vertical]{align-items:flex-end;flex-direction:column}.lm-TabBar-content,.p-TabBar-content{display:flex;flex:1 1 auto;list-style-type:none;margin:0;padding:0}.lm-TabBar[data-orientation=horizontal]>.lm-TabBar-content,.p-TabBar[data-orientation=horizontal]>.p-TabBar-content{flex-direction:row}.lm-TabBar[data-orientation=vertical]>.lm-TabBar-content,.p-TabBar[data-orientation=vertical]>.p-TabBar-content{flex-direction:column}.lm-TabBar-tab,.p-TabBar-tab{box-sizing:border-box;display:flex;flex-direction:row;overflow:hidden;touch-action:none}.lm-TabBar-tabCloseIcon,.lm-TabBar-tabIcon,.p-TabBar-tabCloseIcon,.p-TabBar-tabIcon{flex:0 0 auto}.lm-TabBar-tabLabel,.p-TabBar-tabLabel{flex:1 1 auto;overflow:hidden;white-space:nowrap}.lm-TabBar-tabInput{box-sizing:border-box;user-select:all;width:100%}.lm-TabBar-addButton.lm-mod-hidden,.lm-TabBar-tab.lm-mod-hidden,.p-TabBar-tab.p-mod-hidden{display:none!important}.lm-TabBar.lm-mod-dragging .lm-TabBar-tab,.p-TabBar.p-mod-dragging .p-TabBar-tab{position:relative}.lm-TabBar.lm-mod-dragging[data-orientation=horizontal] .lm-TabBar-tab,.p-TabBar.p-mod-dragging[data-orientation=horizontal] .p-TabBar-tab{left:0;transition:left .15s ease}.lm-TabBar.lm-mod-dragging[data-orientation=vertical] .lm-TabBar-tab,.p-TabBar.p-mod-dragging[data-orientation=vertical] .p-TabBar-tab{top:0;transition:top .15s ease}.lm-TabBar.lm-mod-dragging .lm-TabBar-tab.lm-mod-dragging,.p-TabBar.p-mod-dragging .p-TabBar-tab.p-mod-dragging{transition:none}.lm-TabBar-tabLabel .lm-TabBar-tabInput{background:inherit;box-sizing:border-box;user-select:all;width:100%}");oe(".lm-TabPanel-tabBar,.p-TabPanel-tabBar{z-index:1}.lm-TabPanel-stackedPanel,.p-TabPanel-stackedPanel{z-index:0}");var re=function(t,e){return re=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},re(t,e)};function se(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}re(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var ae=function(){return ae=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},ae.apply(this,arguments)};function de(t,e,n,i){return new(n||(n=Promise))((function(o,r){function s(t){try{d(i.next(t))}catch(t){r(t)}}function a(t){try{d(i.throw(t))}catch(t){r(t)}}function d(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}d((i=i.apply(t,e||[])).next())}))}function ce(t,e){var n,i,o,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(d){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(r=0)),r;)try{if(n=1,i&&(o=2&a[0]?i.return:a[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!(o=r.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=e.call(t,r)}catch(t){a=[6,t],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,d])}}}function he(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}"function"==typeof SuppressedError&&SuppressedError;he(".phosphor_WidgetAdapter{background:#fff;border-bottom:1px solid silver;border-left:1px solid silver;border-right:1px solid silver;min-height:64px;min-width:64px}.phosphor_WidgetAdapter.p-DockPanel-widget{border-top:none;box-shadow:0 -1px 0 rgba(0,0,0,.2),1px 1px 2px rgba(0,0,0,.2)}.phosphor_WidgetAdapter.p-SplitPanel-child{border:none}"),t.Msg=void 0,function(t){var e=function(t){function e(e,n){var i=t.call(this,n)||this;return i._wa=e,i}return se(e,t),Object.defineProperty(e.prototype,"wa",{get:function(){return this._wa},enumerable:!1,configurable:!0}),e.prototype.conflate=function(t){return this._wa=t.wa,!0},e}(Q);t.WAConflatableMessage=e;var n=function(t){function e(n){return t.call(this,n,e.type)||this}return se(e,t),e.type="wa-activate-request",e}(e);t.WAActivateRequest=n;var i=function(t){function e(n){return t.call(this,n,e.type)||this}return se(e,t),e.type="wa-layout-changed",e}(e);t.WALayoutChanged=i}(t.Msg||(t.Msg={}));var le=function(n){function i(t,i,o,r,s){void 0===o&&(o={}),void 0===r&&(r=!1),void 0===s&&(s={});var a=n.call(this)||this;return a.lparam={},a.padding=0,a._width=0,a._height=0,a._owner=t,a._element=e.select(a.node),a.addClass("phosphor_WidgetAdapter"),a.title.label="",a.title.closable=!!r,a.title.caption="Long description for: ".concat(name),a._ext=s,a._closable="boolean"==typeof r?{canClose:function(t,e){return r}}:r,i instanceof e.Widget?a._widget=i.target(a.node):a._widgetLayout=i,a.lparam=o,a}return se(i,n),Object.defineProperty(i.prototype,"widget",{get:function(){return this._widget},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"inputNode",{get:function(){return this.node.getElementsByTagName("input")[0]},enumerable:!1,configurable:!0}),i.prototype.resizeAndRender=function(){this._widget&&(e.select(this.node).style("padding",this.padding+"px").style("width",this._width+"px").style("height",this._height+"px").style("overflow-x",this._ext.overflowX).style("overflow-y",this._ext.overflowY),this._widget.resize({width:this._width-2*this.padding-2,height:this._height-2*this.padding-2}).lazyRender(),this._owner&&Z.postMessage(this._owner,new t.Msg.WALayoutChanged(this)))},i.prototype.onActivateRequest=function(e){n.prototype.onActivateRequest.call(this,e),this._widget&&this.resizeAndRender(),this._owner&&Z.postMessage(this._owner,new t.Msg.WAActivateRequest(this))},i.prototype.onResize=function(t){n.prototype.onResize.call(this,t),this.node&&null!==this.node.offsetParent&&t.width>=0&&t.height>=0?(this._width=t.width,this._height=t.height,this.resizeAndRender()):this._widgetLayout},i.prototype.onCloseRequest=function(t){this._closable.canClose(this._widget,this)&&this.dispose()},i}(ft),ue=function(t){function e(e){return t.apply(this,e)||this}return se(e,t),e.create=function(){return Object.create(e.prototype)},e.prototype.watchRendered=function(t,e){if(e)var n=this.map((function(t){return{wa:t,w:t.widget,rc:t.widget.renderCount()}})),i=setInterval((function(){(function(){for(var t=0,e=n;t<e.length;t++){var i=e[t];if(i.wa.isVisible&&i.rc>=i.w.renderCount())return!1}return!0})()&&(clearInterval(i),e(t))}),20)},e}(Array),pe=function(t){function e(){return t.call(this)||this}return se(e,t),e.prototype.createTabBar=function(){var e=t.prototype.createTabBar.call(this);return e.tabsMovable=this._owner.tabsMovable,e},e}(Yt.Renderer),fe=function(t){function e(e){void 0===e&&(e={});var n=this;return e.renderer=e.renderer||new pe,(n=t.call(this,e)||this)._renderer instanceof pe&&(n._renderer._owner=n),n._content=ue.create(),n._contentMap={},n}return se(e,t),e.prototype.appendContent=function(t){this._content.push(t),this._contentMap[t.widget.id()]=t},e.prototype.removeContent=function(t){var e=this._content.indexOf(t);e>=0&&this._content.splice(e,1),delete this._contentMap[t.widget.id()],t.dispose()},e.prototype.content=function(){return this._content},e.prototype.serializeWidget=function(t){if(t instanceof le)try{return{__id:t.widget.id()}}catch(t){return{exception:{message:t.message,stack:t.stack}}}return null},e.prototype.deserializeWidget=function(t){var e=this._contentMap[t.__id];return e||(e=new le(void 0,t)),e},e.prototype.serializeITabAreaConfig=function(t,e){var n=this;return ae(ae({},t),{widgets:t.widgets.map((function(t){return e?n.deserializeWidget(t):n.serializeWidget(t)}))})},e.prototype.serializeISplitAreaConfig=function(t,e){var n=this;return ae(ae({},t),{children:t.children.map((function(t){return n.serializeAreaConfig(t,e)}))})},e.prototype.serializeAreaConfig=function(t,e){if(t)switch(t.type){case"tab-area":return this.serializeITabAreaConfig(t,e);case"split-area":return this.serializeISplitAreaConfig(t,e)}},e.prototype.saveLayout=function(){return{main:this.serializeAreaConfig(t.prototype.saveLayout.call(this).main,!1)}},e.prototype.restoreLayout=function(e){return t.prototype.restoreLayout.call(this,{main:this.serializeAreaConfig(e.main,!0)})},e}(Yt);he('.p-DockPanel-overlay{background:hsla(0,0%,100%,.6);border:1px dashed #000;transition-duration:.15s;transition-property:top,left,right,bottom;transition-timing-function:ease}.p-TabBar{max-height:24px;min-height:24px}.p-TabBar-content{align-items:flex-end;min-height:0;min-width:0}.p-TabPanel-tabBar .p-TabBar-content{border-bottom:1px solid silver}.p-TabBar-tab{background:#e5e5e5;border:1px solid silver;border-bottom:none;flex:0 1 125px;font:12px Helvetica,Arial,sans-serif;line-height:20px;margin-left:-1px;max-height:20px;min-height:20px;min-width:35px;padding:0 10px}.p-TabBar-tab.p-mod-current{background:#fff}.p-TabBar-tab:hover:not(.p-mod-current){background:#f0f0f0}.p-TabBar-tab:first-child{margin-left:0}.p-TabBar-tab.p-mod-current{max-height:23px;min-height:23px;transform:translateY(1px)}.p-TabBar-tabCloseIcon,.p-TabBar-tabIcon,.p-TabBar-tabLabel{display:inline-block}.p-TabBar-tab.p-mod-closable>.p-TabBar-tabCloseIcon{margin-left:4px}.p-TabBar-tab.p-mod-closable>.p-TabBar-tabCloseIcon:before{content:"\\f00d";font-family:FontAwesome}.p-TabBar-tab.p-mod-drag-image{border:none;box-shadow:1px 1px 2px rgba(0,0,0,.3);max-height:23px;min-height:23px;min-width:125px;transform:translateX(-40%) translateY(-58%)}.p-Widget.p-TabBar.p-DockPanel-tabBar.hide{max-height:1px!important;min-height:1px!important}.p-Widget.p-TabBar.p-DockPanel-tabBar.hide .p-TabBar-tab.p-mod-current{display:none}');var me=function(n){function i(){var t=n.call(this)||this;return t._dock=new fe({mode:"multiple-document"}),t._layoutObj=null,t._lazyLayoutChanged=e.Utility.debounce((function(){return de(t,void 0,void 0,(function(){return ce(this,(function(t){return this.layoutChanged(),[2]}))}))}),1e3),t._tag="div",t._dock.id="p"+t.id(),Z.installMessageHook(t,t),t}return se(i,n),i.prototype.getWidgetAdapter=function(t){var e=null;return this._dock.content().some((function(n){return n.widget===t&&(e=n,!0)})),e},i.prototype.addWidget=function(t,e,n,i,o,r){void 0===n&&(n="split-right"),void 0===r&&(r=8);var s={mode:n,ref:this.getWidgetAdapter(i)},a=new le(this,t,{},o);return a.title.label=e,a.padding=r,this._dock.addWidget(a,s),this._dock.appendContent(a),this._dock.tabsMovable=!0,this},i.prototype.removeWidget=function(t){var e=this.getWidgetAdapter(t);return e&&(t.target(null),this._dock.removeContent(e)),this},i.prototype.isVisible=function(t){return this.getWidgetAdapter(t).isVisible},i.prototype.widgetAdapters=function(){return this._dock.content()},i.prototype.widgets=function(){return this._dock.content().map((function(t){return t.widget}))},i.prototype.layout=function(t){return arguments.length?(this._dock.restoreLayout(t),this):this._dock.saveLayout()},i.prototype.layoutObj=function(t){return this._layoutObj=t,this},i.prototype.enter=function(t,e){n.prototype.enter.call(this,t,e),this._pPlaceholder=e.append("div"),ft.attach(this._dock,this._pPlaceholder.node())},i.prototype.update=function(t,e){n.prototype.update.call(this,t,e),this._pPlaceholder.style("width",this.width()+"px").style("height",this.height()+"px").style("overflow","hidden"),e.select(".p-Widget").style("width",this._pPlaceholder.node().clientWidth+"px").style("height",this.height()+"px"),this.widgets().forEach((function(t){return t.render()}))},i.prototype.exit=function(t,e){var i=this;(function(t,e,n){if(n||2===arguments.length)for(var i,o=0,r=e.length;o<r;o++)!i&&o in e||(i||(i=Array.prototype.slice.call(e,0,o)),i[o]=e[o]);return t.concat(i||Array.prototype.slice.call(e))})([],this.widgets(),!0).forEach((function(t){return i.removeWidget(t)})),n.prototype.exit.call(this,t,e)},i.prototype.render=function(t){var i=this,o=this;return null!==this._layoutObj&&(this.layout(this._layoutObj),this.layoutObj(null)),n.prototype.render.call(this,(function(n){i._dock.content().watchRendered(i,t),i._dock.update(),setTimeout((function(){var t=i.element().selectAll(".p-Widget.p-TabBar.p-DockPanel-tabBar"),n=!1;t.each((function(){var t=e.select(this),i=t.node().childNodes[0].childNodes.length,r=o.hideSingleTabs()&&1===i;r!==t.classed("hide")&&(t.classed("hide",r),n=!0)})),n&&i._dock.fit()}),0)}))},i.prototype.refit=function(){this._dock.fit()},i.prototype.messageHook=function(t,e){return t===this&&this.processMessage(e),!0},i.prototype.processMessage=function(e){switch(e.type){case t.Msg.WAActivateRequest.type:var n=e.wa,i=n.widget;this._prevActive!==i&&(this._prevActive=i,this.childActivation(i,n));break;case t.Msg.WALayoutChanged.type:this._lazyLayoutChanged()}},i.prototype.active=function(){return this._prevActive},i.prototype.childActivation=function(t,e){},i.prototype.layoutChanged=function(){},i}(e.HTMLWidget);me.prototype._class+=" phosphor_DockPanel",me.prototype.publish("hideSingleTabs",!1,"boolean");var ge=function(t){function e(e){void 0===e&&(e="vertical");var n=t.call(this)||this;return n.content=ue.create(),n._split=new At({orientation:e}),n._tag="div",n._split.id="p"+n.id(),n}return se(e,t),e.prototype.getWidgetAdapter=function(t){var e=null;return this.content.some((function(n){return n.widget===t&&(e=n,!0)})),e},e.prototype.addWidget=function(t){var e=new le(this,t);return this._split.addWidget(e),this.content.push(e),this},e.prototype.relativeSizes=function(t){return arguments.length?(this._split.setRelativeSizes(t),this):this._split.relativeSizes()},e.prototype.enter=function(e,n){t.prototype.enter.call(this,e,n),ft.attach(this._split,e)},e.prototype.update=function(e,n){t.prototype.update.call(this,e,n),n.select(".p-Widget").style("width",this.width()+"px").style("height",this.height()+"px")},e.prototype.exit=function(e,n){t.prototype.exit.call(this,e,n)},e.prototype.render=function(e){var n=this;return t.prototype.render.call(this,(function(t){n.content.watchRendered(n,e),n._split.update()}))},e}(e.HTMLWidget);ge.prototype._class+=" phosphor_SplitPanel";var ve=function(t){function e(){var e=t.call(this)||this;return e._tab=new ie({tabPlacement:"top"}),e.content=ue.create(),e._tag="div",e._tab.id="p"+e.id(),e}return se(e,t),e.prototype.getWidget=function(t){if(t instanceof le)return t.widget},e.prototype.getWidgetAdapter=function(t){var e=null;return this.content.some((function(n){return n.widget===t&&(e=n,!0)})),e},e.prototype.addWidget=function(t,e,n){void 0===n&&(n={}),this._prevActive||(this._prevActive=t);var i=new le(this,t,void 0,void 0,n);return i.title.label=e,i.padding=8,this._tab.addWidget(i),this.content.push(i),this},e.prototype.removeWidget=function(t){var e=this.getWidgetAdapter(t);if(e){var n=this.content.indexOf(e);n>=0&&this.content.splice(n,1),t.target(null),e.dispose()}return this},e.prototype.enter=function(e,n){t.prototype.enter.call(this,e,n),ft.attach(this._tab,e)},e.prototype.update=function(e,n){t.prototype.update.call(this,e,n),n.select(".p-Widget").style("width",this.width()+"px").style("height",this.height()+"px")},e.prototype.exit=function(e,n){t.prototype.exit.call(this,e,n)},e.prototype.render=function(e){var n=this;return t.prototype.render.call(this,(function(t){n.content.watchRendered(n,e),n._tab.update()}))},e.prototype.messageHook=function(t,e){return t===this&&this.processMessage(e),!0},e.prototype.processMessage=function(t){if("wa-activate-request"===t.type){var e=t.wa.widget;this._prevActive!==e&&(this._prevActive=e,this.childActivation(e))}},e.prototype.childActivation=function(t){},e.prototype.active=function(t){return arguments.length?(this._tab.currentWidget=this.getWidgetAdapter(t),this):this.getWidget(this._tab.currentWidget)},e}(e.HTMLWidget);ve.prototype._class+=" phosphor_TabPanel",t.BUILD_VERSION="2.108.2",t.ContextMenu=Ht,t.DockPanel=me,t.PKG_NAME="@hpcc-js/phosphor",t.PKG_VERSION="2.20.2",t.SplitPanel=ge,t.TabPanel=ve,t.WidgetAdapter=le,t.WidgetAdapterArray=ue}));
|
|
76
|
+
var at=function(t,e){return at=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},at(t,e)};function dt(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}at(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var ct=function(){return ct=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},ct.apply(this,arguments)};var ht,lt=function(){this.sizeHint=0,this.minSize=0,this.maxSize=1/0,this.stretch=1,this.size=0,this.done=!1};!function(t){t.calc=function(t,e){var n=t.length;if(0===n)return e;for(var i=0,o=0,r=0,s=0,a=0,d=0;d<n;++d){var c=(y=t[d]).minSize,h=y.maxSize,l=y.sizeHint;y.done=!1,y.size=Math.max(c,Math.min(l,h)),r+=y.size,i+=c,o+=h,y.stretch>0&&(s+=y.stretch,a++)}if(e===r)return 0;if(e<=i){for(d=0;d<n;++d){(y=t[d]).size=y.minSize}return e-i}if(e>=o){for(d=0;d<n;++d){(y=t[d]).size=y.maxSize}return e-o}var u=.01,p=n;if(e<r){for(var f=r-e;a>0&&f>u;){var m=f,g=s;for(d=0;d<n;++d){if(!(y=t[d]).done&&0!==y.stretch){var v=y.stretch*m/g;y.size-v<=y.minSize?(f-=y.size-y.minSize,s-=y.stretch,y.size=y.minSize,y.done=!0,p--,a--):(f-=v,y.size-=v)}}}for(;p>0&&f>u;)for(v=f/p,d=0;d<n;++d){(y=t[d]).done||(y.size-v<=y.minSize?(f-=y.size-y.minSize,y.size=y.minSize,y.done=!0,p--):(f-=v,y.size-=v))}}else{for(f=e-r;a>0&&f>u;)for(m=f,g=s,d=0;d<n;++d){if(!(y=t[d]).done&&0!==y.stretch){v=y.stretch*m/g;y.size+v>=y.maxSize?(f-=y.maxSize-y.size,s-=y.stretch,y.size=y.maxSize,y.done=!0,p--,a--):(f-=v,y.size+=v)}}for(;p>0&&f>u;)for(v=f/p,d=0;d<n;++d){var y;(y=t[d]).done||(y.size+v>=y.maxSize?(f-=y.maxSize-y.size,y.size=y.maxSize,y.done=!0,p--):(f-=v,y.size+=v))}}return 0},t.adjust=function(t,e,n){0!==t.length&&0!==n&&(n>0?function(t,e,n){for(var i=0,o=0;o<=e;++o){i+=(c=t[o]).maxSize-c.size}for(var r=0,s=(o=e+1,t.length);o<s;++o){r+=(c=t[o]).size-c.minSize}var a=n=Math.min(n,i,r);for(o=e;o>=0&&a>0;--o){(h=(c=t[o]).maxSize-c.size)>=a?(c.sizeHint=c.size+a,a=0):(c.sizeHint=c.size+h,a-=h)}var d=n;for(o=e+1,s=t.length;o<s&&d>0;++o){var c,h;(h=(c=t[o]).size-c.minSize)>=d?(c.sizeHint=c.size-d,d=0):(c.sizeHint=c.size-h,d-=h)}}(t,e,n):function(t,e,n){for(var i=0,o=e+1,r=t.length;o<r;++o){i+=(c=t[o]).maxSize-c.size}var s=0;for(o=0;o<=e;++o){s+=(c=t[o]).size-c.minSize}var a=n=Math.min(n,i,s);for(o=e+1,r=t.length;o<r&&a>0;++o){(h=(c=t[o]).maxSize-c.size)>=a?(c.sizeHint=c.size+a,a=0):(c.sizeHint=c.size+h,a-=h)}var d=n;for(o=e;o>=0&&d>0;--o){var c,h;(h=(c=t[o]).size-c.minSize)>=d?(c.sizeHint=c.size-d,d=0):(c.sizeHint=c.size-h,d-=h)}}(t,e,-n))}}(ht||(ht={}));var ut,pt=function(){function t(t){this._label="",this._caption="",this._mnemonic=-1,this._iconClass="",this._iconLabel="",this._className="",this._closable=!1,this._changed=new A(this),this._isDisposed=!1,this.owner=t.owner,void 0!==t.label&&(this._label=t.label),void 0!==t.mnemonic&&(this._mnemonic=t.mnemonic),void 0!==t.icon?"string"==typeof t.icon?(this._icon=null,this._iconClass=t.icon):this._icon=t.icon:this._icon=null,void 0!==t.iconClass&&(this._iconClass=t.iconClass),void 0!==t.iconLabel&&(this._iconLabel=t.iconLabel),void 0!==t.iconRenderer&&(this._icon=t.iconRenderer),void 0!==t.caption&&(this._caption=t.caption),void 0!==t.className&&(this._className=t.className),void 0!==t.closable&&(this._closable=t.closable),this._dataset=t.dataset||{}}return Object.defineProperty(t.prototype,"changed",{get:function(){return this._changed},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"label",{get:function(){return this._label},set:function(t){this._label!==t&&(this._label=t,this._changed.emit(void 0))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"mnemonic",{get:function(){return this._mnemonic},set:function(t){this._mnemonic!==t&&(this._mnemonic=t,this._changed.emit(void 0))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"icon",{get:function(){return null===this._icon?this.iconClass:this._icon},set:function(t){if("string"==typeof t)this._icon=null,this.iconClass=t;else{if(this._icon===t)return;this._icon=t,this._changed.emit(void 0)}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"iconClass",{get:function(){return this._iconClass},set:function(t){this._iconClass!==t&&(this._iconClass=t,this._changed.emit(void 0))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"iconLabel",{get:function(){return this._iconLabel},set:function(t){this._iconLabel!==t&&(this._iconLabel=t,this._changed.emit(void 0))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"iconRenderer",{get:function(){return this._icon||void 0},set:function(t){this.icon=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"caption",{get:function(){return this._caption},set:function(t){this._caption!==t&&(this._caption=t,this._changed.emit(void 0))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"className",{get:function(){return this._className},set:function(t){this._className!==t&&(this._className=t,this._changed.emit(void 0))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"closable",{get:function(){return this._closable},set:function(t){this._closable!==t&&(this._closable=t,this._changed.emit(void 0))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dataset",{get:function(){return this._dataset},set:function(t){this._dataset!==t&&(this._dataset=t,this._changed.emit(void 0))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isDisposed",{get:function(){return this._isDisposed},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this.isDisposed||(this._isDisposed=!0,A.clearData(this))},t}(),ft=function(){function t(e){void 0===e&&(e={}),this._flags=0,this._layout=null,this._parent=null,this._disposed=new A(this),this._hiddenMode=t.HiddenMode.Display,this.node=ut.createNode(e),this.addClass("lm-Widget"),this.addClass("p-Widget")}return t.prototype.dispose=function(){this.isDisposed||(this.setFlag(t.Flag.IsDisposed),this._disposed.emit(void 0),this.parent?this.parent=null:this.isAttached&&t.detach(this),this._layout&&(this._layout.dispose(),this._layout=null),this.title.dispose(),A.clearData(this),Z.clearData(this),S.clearData(this))},Object.defineProperty(t.prototype,"disposed",{get:function(){return this._disposed},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isDisposed",{get:function(){return this.testFlag(t.Flag.IsDisposed)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isAttached",{get:function(){return this.testFlag(t.Flag.IsAttached)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isHidden",{get:function(){return this.testFlag(t.Flag.IsHidden)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isVisible",{get:function(){return this.testFlag(t.Flag.IsVisible)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return ut.titleProperty.get(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"id",{get:function(){return this.node.id},set:function(t){this.node.id=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dataset",{get:function(){return this.node.dataset},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hiddenMode",{get:function(){return this._hiddenMode},set:function(e){this._hiddenMode!==e&&(this.isHidden&&this._toggleHidden(!1),e==t.HiddenMode.Scale?this.node.style.willChange="transform":this.node.style.willChange="auto",this._hiddenMode=e,this.isHidden&&this._toggleHidden(!0))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this._parent},set:function(e){if(this._parent!==e){if(e&&this.contains(e))throw new Error("Invalid parent widget.");if(this._parent&&!this._parent.isDisposed){var n=new t.ChildMessage("child-removed",this);Z.sendMessage(this._parent,n)}if(this._parent=e,this._parent&&!this._parent.isDisposed){n=new t.ChildMessage("child-added",this);Z.sendMessage(this._parent,n)}this.isDisposed||Z.sendMessage(this,t.Msg.ParentChanged)}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"layout",{get:function(){return this._layout},set:function(e){if(this._layout!==e){if(this.testFlag(t.Flag.DisallowLayout))throw new Error("Cannot set widget layout.");if(this._layout)throw new Error("Cannot change widget layout.");if(e.parent)throw new Error("Cannot change layout parent.");this._layout=e,e.parent=this}},enumerable:!0,configurable:!0}),t.prototype.children=function(){return this._layout?this._layout.iter():d()},t.prototype.contains=function(t){for(var e=t;e;e=e._parent)if(e===this)return!0;return!1},t.prototype.hasClass=function(t){return this.node.classList.contains(t)},t.prototype.addClass=function(t){this.node.classList.add(t)},t.prototype.removeClass=function(t){this.node.classList.remove(t)},t.prototype.toggleClass=function(t,e){return!0===e?(this.node.classList.add(t),!0):!1===e?(this.node.classList.remove(t),!1):this.node.classList.toggle(t)},t.prototype.update=function(){Z.postMessage(this,t.Msg.UpdateRequest)},t.prototype.fit=function(){Z.postMessage(this,t.Msg.FitRequest)},t.prototype.activate=function(){Z.postMessage(this,t.Msg.ActivateRequest)},t.prototype.close=function(){Z.sendMessage(this,t.Msg.CloseRequest)},t.prototype.show=function(){if(this.testFlag(t.Flag.IsHidden)&&(!this.isAttached||this.parent&&!this.parent.isVisible||Z.sendMessage(this,t.Msg.BeforeShow),this.clearFlag(t.Flag.IsHidden),this.node.removeAttribute("aria-hidden"),this._toggleHidden(!1),!this.isAttached||this.parent&&!this.parent.isVisible||Z.sendMessage(this,t.Msg.AfterShow),this.parent)){var e=new t.ChildMessage("child-shown",this);Z.sendMessage(this.parent,e)}},t.prototype.hide=function(){if(!this.testFlag(t.Flag.IsHidden)&&(!this.isAttached||this.parent&&!this.parent.isVisible||Z.sendMessage(this,t.Msg.BeforeHide),this.setFlag(t.Flag.IsHidden),this.node.setAttribute("aria-hidden","true"),this._toggleHidden(!0),!this.isAttached||this.parent&&!this.parent.isVisible||Z.sendMessage(this,t.Msg.AfterHide),this.parent)){var e=new t.ChildMessage("child-hidden",this);Z.sendMessage(this.parent,e)}},t.prototype.setHidden=function(t){t?this.hide():this.show()},t.prototype.testFlag=function(t){return 0!==(this._flags&t)},t.prototype.setFlag=function(t){this._flags|=t},t.prototype.clearFlag=function(t){this._flags&=~t},t.prototype.processMessage=function(e){switch(e.type){case"resize":this.notifyLayout(e),this.onResize(e);break;case"update-request":this.notifyLayout(e),this.onUpdateRequest(e);break;case"fit-request":this.notifyLayout(e),this.onFitRequest(e);break;case"before-show":this.notifyLayout(e),this.onBeforeShow(e);break;case"after-show":this.setFlag(t.Flag.IsVisible),this.notifyLayout(e),this.onAfterShow(e);break;case"before-hide":this.notifyLayout(e),this.onBeforeHide(e);break;case"after-hide":this.clearFlag(t.Flag.IsVisible),this.notifyLayout(e),this.onAfterHide(e);break;case"before-attach":this.notifyLayout(e),this.onBeforeAttach(e);break;case"after-attach":this.isHidden||this.parent&&!this.parent.isVisible||this.setFlag(t.Flag.IsVisible),this.setFlag(t.Flag.IsAttached),this.notifyLayout(e),this.onAfterAttach(e);break;case"before-detach":this.notifyLayout(e),this.onBeforeDetach(e);break;case"after-detach":this.clearFlag(t.Flag.IsVisible),this.clearFlag(t.Flag.IsAttached),this.notifyLayout(e),this.onAfterDetach(e);break;case"activate-request":this.notifyLayout(e),this.onActivateRequest(e);break;case"close-request":this.notifyLayout(e),this.onCloseRequest(e);break;case"child-added":this.notifyLayout(e),this.onChildAdded(e);break;case"child-removed":this.notifyLayout(e),this.onChildRemoved(e);break;default:this.notifyLayout(e)}},t.prototype.notifyLayout=function(t){this._layout&&this._layout.processParentMessage(t)},t.prototype.onCloseRequest=function(e){this.parent?this.parent=null:this.isAttached&&t.detach(this)},t.prototype.onResize=function(t){},t.prototype.onUpdateRequest=function(t){},t.prototype.onFitRequest=function(t){},t.prototype.onActivateRequest=function(t){},t.prototype.onBeforeShow=function(t){},t.prototype.onAfterShow=function(t){},t.prototype.onBeforeHide=function(t){},t.prototype.onAfterHide=function(t){},t.prototype.onBeforeAttach=function(t){},t.prototype.onAfterAttach=function(t){},t.prototype.onBeforeDetach=function(t){},t.prototype.onAfterDetach=function(t){},t.prototype.onChildAdded=function(t){},t.prototype.onChildRemoved=function(t){},t.prototype._toggleHidden=function(e){if(e)switch(this._hiddenMode){case t.HiddenMode.Display:this.addClass("lm-mod-hidden"),this.addClass("p-mod-hidden");break;case t.HiddenMode.Scale:this.node.style.transform="scale(0)";break;case t.HiddenMode.ContentVisibility:this.node.style.contentVisibility="hidden",this.node.style.zIndex="-1"}else switch(this._hiddenMode){case t.HiddenMode.Display:this.removeClass("lm-mod-hidden"),this.removeClass("p-mod-hidden");break;case t.HiddenMode.Scale:this.node.style.transform="";break;case t.HiddenMode.ContentVisibility:this.node.style.contentVisibility="",this.node.style.zIndex=""}},t}();!function(t){var e,n,i;(e=t.HiddenMode||(t.HiddenMode={}))[e.Display=0]="Display",e[e.Scale=1]="Scale",e[e.ContentVisibility=2]="ContentVisibility",(n=t.Flag||(t.Flag={}))[n.IsDisposed=1]="IsDisposed",n[n.IsAttached=2]="IsAttached",n[n.IsHidden=4]="IsHidden",n[n.IsVisible=8]="IsVisible",n[n.DisallowLayout=16]="DisallowLayout",(i=t.Msg||(t.Msg={})).BeforeShow=new J("before-show"),i.AfterShow=new J("after-show"),i.BeforeHide=new J("before-hide"),i.AfterHide=new J("after-hide"),i.BeforeAttach=new J("before-attach"),i.AfterAttach=new J("after-attach"),i.BeforeDetach=new J("before-detach"),i.AfterDetach=new J("after-detach"),i.ParentChanged=new J("parent-changed"),i.UpdateRequest=new Q("update-request"),i.FitRequest=new Q("fit-request"),i.ActivateRequest=new Q("activate-request"),i.CloseRequest=new Q("close-request");var o=function(t){function e(e,n){var i=t.call(this,e)||this;return i.child=n,i}return dt(e,t),e}(J);t.ChildMessage=o;var r=function(t){function e(e,n){var i=t.call(this,"resize")||this;return i.width=e,i.height=n,i}return dt(e,t),e}(J);t.ResizeMessage=r,function(t){t.UnknownSize=new t(-1,-1)}(r=t.ResizeMessage||(t.ResizeMessage={})),t.attach=function(e,n,i){if(void 0===i&&(i=null),e.parent)throw new Error("Cannot attach a child widget.");if(e.isAttached||e.node.isConnected)throw new Error("Widget is already attached.");if(!n.isConnected)throw new Error("Host is not attached.");Z.sendMessage(e,t.Msg.BeforeAttach),n.insertBefore(e.node,i),Z.sendMessage(e,t.Msg.AfterAttach)},t.detach=function(e){if(e.parent)throw new Error("Cannot detach a child widget.");if(!e.isAttached||!e.node.isConnected)throw new Error("Widget is not attached.");Z.sendMessage(e,t.Msg.BeforeDetach),e.node.parentNode.removeChild(e.node),Z.sendMessage(e,t.Msg.AfterDetach)}}(ft||(ft={})),function(t){t.titleProperty=new S({name:"title",create:function(t){return new pt({owner:t})}}),t.createNode=function(t){return t.node||document.createElement(t.tag||"div")}}(ut||(ut={}));var mt=function(){function t(t){void 0===t&&(t={}),this._disposed=!1,this._parent=null,this._fitPolicy=t.fitPolicy||"set-min-size"}return t.prototype.dispose=function(){this._parent=null,this._disposed=!0,A.clearData(this),S.clearData(this)},Object.defineProperty(t.prototype,"isDisposed",{get:function(){return this._disposed},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this._parent},set:function(t){if(this._parent!==t){if(this._parent)throw new Error("Cannot change parent widget.");if(t.layout!==this)throw new Error("Invalid parent widget.");this._parent=t,this.init()}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fitPolicy",{get:function(){return this._fitPolicy},set:function(t){if(this._fitPolicy!==t&&(this._fitPolicy=t,this._parent)){var e=this._parent.node.style;e.minWidth="",e.minHeight="",e.maxWidth="",e.maxHeight="",this._parent.fit()}},enumerable:!0,configurable:!0}),t.prototype.processParentMessage=function(t){switch(t.type){case"resize":this.onResize(t);break;case"update-request":this.onUpdateRequest(t);break;case"fit-request":this.onFitRequest(t);break;case"before-show":this.onBeforeShow(t);break;case"after-show":this.onAfterShow(t);break;case"before-hide":this.onBeforeHide(t);break;case"after-hide":this.onAfterHide(t);break;case"before-attach":this.onBeforeAttach(t);break;case"after-attach":this.onAfterAttach(t);break;case"before-detach":this.onBeforeDetach(t);break;case"after-detach":this.onAfterDetach(t);break;case"child-removed":this.onChildRemoved(t);break;case"child-shown":this.onChildShown(t);break;case"child-hidden":this.onChildHidden(t)}},t.prototype.init=function(){var t=this;o(this,function(e){e.parent=t.parent})},t.prototype.onResize=function(t){o(this,function(t){Z.sendMessage(t,ft.ResizeMessage.UnknownSize)})},t.prototype.onUpdateRequest=function(t){o(this,function(t){Z.sendMessage(t,ft.ResizeMessage.UnknownSize)})},t.prototype.onBeforeAttach=function(t){o(this,function(e){Z.sendMessage(e,t)})},t.prototype.onAfterAttach=function(t){o(this,function(e){Z.sendMessage(e,t)})},t.prototype.onBeforeDetach=function(t){o(this,function(e){Z.sendMessage(e,t)})},t.prototype.onAfterDetach=function(t){o(this,function(e){Z.sendMessage(e,t)})},t.prototype.onBeforeShow=function(t){o(this,function(e){e.isHidden||Z.sendMessage(e,t)})},t.prototype.onAfterShow=function(t){o(this,function(e){e.isHidden||Z.sendMessage(e,t)})},t.prototype.onBeforeHide=function(t){o(this,function(e){e.isHidden||Z.sendMessage(e,t)})},t.prototype.onAfterHide=function(t){o(this,function(e){e.isHidden||Z.sendMessage(e,t)})},t.prototype.onChildRemoved=function(t){this.removeWidget(t.child)},t.prototype.onFitRequest=function(t){},t.prototype.onChildShown=function(t){},t.prototype.onChildHidden=function(t){},t}();!function(t){t.getHorizontalAlignment=function(t){return gt.horizontalAlignmentProperty.get(t)},t.setHorizontalAlignment=function(t,e){gt.horizontalAlignmentProperty.set(t,e)},t.getVerticalAlignment=function(t){return gt.verticalAlignmentProperty.get(t)},t.setVerticalAlignment=function(t,e){gt.verticalAlignmentProperty.set(t,e)}}(mt||(mt={}));var gt,vt=function(){function t(t){this._top=NaN,this._left=NaN,this._width=NaN,this._height=NaN,this._minWidth=0,this._minHeight=0,this._maxWidth=1/0,this._maxHeight=1/0,this._disposed=!1,this.widget=t,this.widget.node.style.position="absolute"}return t.prototype.dispose=function(){if(!this._disposed){this._disposed=!0;var t=this.widget.node.style;t.position="",t.top="",t.left="",t.width="",t.height=""}},Object.defineProperty(t.prototype,"minWidth",{get:function(){return this._minWidth},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"minHeight",{get:function(){return this._minHeight},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxWidth",{get:function(){return this._maxWidth},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxHeight",{get:function(){return this._maxHeight},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isDisposed",{get:function(){return this._disposed},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isHidden",{get:function(){return this.widget.isHidden},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isVisible",{get:function(){return this.widget.isVisible},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isAttached",{get:function(){return this.widget.isAttached},enumerable:!0,configurable:!0}),t.prototype.fit=function(){var t=B.sizeLimits(this.widget.node);this._minWidth=t.minWidth,this._minHeight=t.minHeight,this._maxWidth=t.maxWidth,this._maxHeight=t.maxHeight},t.prototype.update=function(t,e,n,i){var o=Math.max(this._minWidth,Math.min(n,this._maxWidth)),r=Math.max(this._minHeight,Math.min(i,this._maxHeight));if(o<n)switch(mt.getHorizontalAlignment(this.widget)){case"left":break;case"center":t+=(n-o)/2;break;case"right":t+=n-o;break;default:throw"unreachable"}if(r<i)switch(mt.getVerticalAlignment(this.widget)){case"top":break;case"center":e+=(i-r)/2;break;case"bottom":e+=i-r;break;default:throw"unreachable"}var s=!1,a=this.widget.node.style;if(this._top!==e&&(this._top=e,a.top=e+"px"),this._left!==t&&(this._left=t,a.left=t+"px"),this._width!==o&&(s=!0,this._width=o,a.width=o+"px"),this._height!==r&&(s=!0,this._height=r,a.height=r+"px"),s){var d=new ft.ResizeMessage(o,r);Z.sendMessage(this.widget,d)}},t}();!function(t){function e(t){t.parent&&t.parent.layout&&t.parent.update()}t.horizontalAlignmentProperty=new S({name:"horizontalAlignment",create:function(){return"center"},changed:e}),t.verticalAlignmentProperty=new S({name:"verticalAlignment",create:function(){return"top"},changed:e})}(gt||(gt={}));var yt,bt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._widgets=[],e}return dt(e,t),e.prototype.dispose=function(){for(;this._widgets.length>0;)this._widgets.pop().dispose();t.prototype.dispose.call(this)},Object.defineProperty(e.prototype,"widgets",{get:function(){return this._widgets},enumerable:!0,configurable:!0}),e.prototype.iter=function(){return i(this._widgets)},e.prototype.addWidget=function(t){this.insertWidget(this._widgets.length,t)},e.prototype.insertWidget=function(t,e){e.parent=this.parent;var i=this._widgets.indexOf(e),o=Math.max(0,Math.min(t,this._widgets.length));if(-1===i)return n.insert(this._widgets,o,e),void(this.parent&&this.attachWidget(o,e));o===this._widgets.length&&o--,i!==o&&(n.move(this._widgets,i,o),this.parent&&this.moveWidget(i,o,e))},e.prototype.removeWidget=function(t){this.removeWidgetAt(this._widgets.indexOf(t))},e.prototype.removeWidgetAt=function(t){var e=n.removeAt(this._widgets,t);e&&this.parent&&this.detachWidget(t,e)},e.prototype.init=function(){var e=this;t.prototype.init.call(this),o(this,function(t,n){e.attachWidget(n,t)})},e.prototype.attachWidget=function(t,e){var n=this.parent.node.children[t];this.parent.isAttached&&Z.sendMessage(e,ft.Msg.BeforeAttach),this.parent.node.insertBefore(e.node,n),this.parent.isAttached&&Z.sendMessage(e,ft.Msg.AfterAttach)},e.prototype.moveWidget=function(t,e,n){this.parent.isAttached&&Z.sendMessage(n,ft.Msg.BeforeDetach),this.parent.node.removeChild(n.node),this.parent.isAttached&&Z.sendMessage(n,ft.Msg.AfterDetach);var i=this.parent.node.children[e];this.parent.isAttached&&Z.sendMessage(n,ft.Msg.BeforeAttach),this.parent.node.insertBefore(n.node,i),this.parent.isAttached&&Z.sendMessage(n,ft.Msg.AfterAttach)},e.prototype.detachWidget=function(t,e){this.parent.isAttached&&Z.sendMessage(e,ft.Msg.BeforeDetach),this.parent.node.removeChild(e.node),this.parent.isAttached&&Z.sendMessage(e,ft.Msg.AfterDetach)},e}(mt);!function(t){t.clampDimension=function(t){return Math.max(0,Math.floor(t))}}(yt||(yt={}));var _t,wt=yt,xt=function(t){function e(e){var n=t.call(this)||this;return n.widgetOffset=0,n._fixed=0,n._spacing=4,n._dirty=!1,n._hasNormedSizes=!1,n._sizers=[],n._items=[],n._handles=[],n._box=null,n._alignment="start",n._orientation="horizontal",n.renderer=e.renderer,void 0!==e.orientation&&(n._orientation=e.orientation),void 0!==e.alignment&&(n._alignment=e.alignment),void 0!==e.spacing&&(n._spacing=yt.clampDimension(e.spacing)),n}return dt(e,t),e.prototype.dispose=function(){o(this._items,function(t){t.dispose()}),this._box=null,this._items.length=0,this._sizers.length=0,this._handles.length=0,t.prototype.dispose.call(this)},Object.defineProperty(e.prototype,"orientation",{get:function(){return this._orientation},set:function(t){this._orientation!==t&&(this._orientation=t,this.parent&&(this.parent.dataset.orientation=t,this.parent.fit()))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"alignment",{get:function(){return this._alignment},set:function(t){this._alignment!==t&&(this._alignment=t,this.parent&&(this.parent.dataset.alignment=t,this.parent.update()))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"spacing",{get:function(){return this._spacing},set:function(t){t=yt.clampDimension(t),this._spacing!==t&&(this._spacing=t,this.parent&&this.parent.fit())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"handles",{get:function(){return this._handles},enumerable:!0,configurable:!0}),e.prototype.absoluteSizes=function(){return this._sizers.map(function(t){return t.size})},e.prototype.relativeSizes=function(){return _t.normalize(this._sizers.map(function(t){return t.size}))},e.prototype.setRelativeSizes=function(t,e){void 0===e&&(e=!0);for(var n=this._sizers.length,i=t.slice(0,n);i.length<n;)i.push(0);for(var o=_t.normalize(i),r=0;r<n;++r){var s=this._sizers[r];s.sizeHint=o[r],s.size=o[r]}this._hasNormedSizes=!0,e&&this.parent&&this.parent.update()},e.prototype.moveHandle=function(t,e){var n,i=this._handles[t];if(i&&!i.classList.contains("lm-mod-hidden")&&0!==(n="horizontal"===this._orientation?e-i.offsetLeft:e-i.offsetTop)){for(var o=0,r=this._sizers;o<r.length;o++){var s=r[o];s.size>0&&(s.sizeHint=s.size)}ht.adjust(this._sizers,t,n),this.parent&&this.parent.update()}},e.prototype.init=function(){this.parent.dataset.orientation=this.orientation,this.parent.dataset.alignment=this.alignment,t.prototype.init.call(this)},e.prototype.attachWidget=function(t,e){var i=new vt(e),o=_t.createHandle(this.renderer),r=_t.averageSize(this._sizers),s=_t.createSizer(r);n.insert(this._items,t,i),n.insert(this._sizers,t,s),n.insert(this._handles,t,o),this.parent.isAttached&&Z.sendMessage(e,ft.Msg.BeforeAttach),this.parent.node.appendChild(e.node),this.parent.node.appendChild(o),this.parent.isAttached&&Z.sendMessage(e,ft.Msg.AfterAttach),this.parent.fit()},e.prototype.moveWidget=function(t,e,i){n.move(this._items,t,e),n.move(this._sizers,t,e),n.move(this._handles,t,e),this.parent.fit()},e.prototype.detachWidget=function(t,e){var i=n.removeAt(this._items,t),o=n.removeAt(this._handles,t);n.removeAt(this._sizers,t),this.parent.isAttached&&Z.sendMessage(e,ft.Msg.BeforeDetach),this.parent.node.removeChild(e.node),this.parent.node.removeChild(o),this.parent.isAttached&&Z.sendMessage(e,ft.Msg.AfterDetach),i.dispose(),this.parent.fit()},e.prototype.onBeforeShow=function(e){t.prototype.onBeforeShow.call(this,e),this.parent.update()},e.prototype.onBeforeAttach=function(e){t.prototype.onBeforeAttach.call(this,e),this.parent.fit()},e.prototype.onChildShown=function(t){this.parent.fit()},e.prototype.onChildHidden=function(t){this.parent.fit()},e.prototype.onResize=function(t){this.parent.isVisible&&this._update(t.width,t.height)},e.prototype.onUpdateRequest=function(t){this.parent.isVisible&&this._update(-1,-1)},e.prototype.onFitRequest=function(t){this.parent.isAttached&&this._fit()},e.prototype.updateItemPosition=function(t,e,n,i,o,r,s){var a=this._items[t];if(!a.isHidden){var d=this._handles[t].style;e?(n+=this.widgetOffset,a.update(n,i,s,o),n+=s,d.top=i+"px",d.left=n+"px",d.width=this._spacing+"px",d.height=o+"px"):(i+=this.widgetOffset,a.update(n,i,r,s),i+=s,d.top=i+"px",d.left=n+"px",d.width=r+"px",d.height=this._spacing+"px")}},e.prototype._fit=function(){for(var t=0,n=-1,i=0,o=this._items.length;i<o;++i)this._items[i].isHidden?(this._handles[i].classList.add("lm-mod-hidden"),this._handles[i].classList.add("p-mod-hidden")):(this._handles[i].classList.remove("lm-mod-hidden"),this._handles[i].classList.remove("p-mod-hidden"),n=i,t++);-1!==n&&(this._handles[n].classList.add("lm-mod-hidden"),this._handles[n].classList.add("p-mod-hidden")),this._fixed=this._spacing*Math.max(0,t-1)+this.widgetOffset*this._items.length;var r="horizontal"===this._orientation,s=r?this._fixed:0,a=r?0:this._fixed;for(i=0,o=this._items.length;i<o;++i){var d=this._items[i],c=this._sizers[i];c.size>0&&(c.sizeHint=c.size),d.isHidden?(c.minSize=0,c.maxSize=0):(d.fit(),c.stretch=e.getStretch(d.widget),r?(c.minSize=d.minWidth,c.maxSize=d.maxWidth,s+=d.minWidth,a=Math.max(a,d.minHeight)):(c.minSize=d.minHeight,c.maxSize=d.maxHeight,a+=d.minHeight,s=Math.max(s,d.minWidth)))}var h=this._box=B.boxSizing(this.parent.node);s+=h.horizontalSum,a+=h.verticalSum;var l=this.parent.node.style;l.minWidth=s+"px",l.minHeight=a+"px",this._dirty=!0,this.parent.parent&&Z.sendMessage(this.parent.parent,ft.Msg.FitRequest),this._dirty&&Z.sendMessage(this.parent,ft.Msg.UpdateRequest)},e.prototype._update=function(t,e){this._dirty=!1;for(var n=0,i=0,o=this._items.length;i<o;++i)n+=+!this._items[i].isHidden;if(0!==n||0!==this.widgetOffset){t<0&&(t=this.parent.node.offsetWidth),e<0&&(e=this.parent.node.offsetHeight),this._box||(this._box=B.boxSizing(this.parent.node));var r=this._box.paddingTop,s=this._box.paddingLeft,a=t-this._box.horizontalSum,d=e-this._box.verticalSum,c=0,h=0,l="horizontal"===this._orientation;if(n>0){var u=void 0;if(u=l?Math.max(0,a-this._fixed):Math.max(0,d-this._fixed),this._hasNormedSizes){for(var p=0,f=this._sizers;p<f.length;p++){f[p].sizeHint*=u}this._hasNormedSizes=!1}var m=ht.calc(this._sizers,u);if(m>0)switch(this._alignment){case"start":break;case"center":c=0,h=m/2;break;case"end":c=0,h=m;break;case"justify":c=m/n,h=0;break;default:throw"unreachable"}}for(i=0,o=this._items.length;i<o;++i){var g=this._items[i].isHidden?0:this._sizers[i].size+c;this.updateItemPosition(i,l,l?s+h:s,l?r:r+h,d,a,g);var v=this.widgetOffset+(this._handles[i].classList.contains("lm-mod-hidden")?0:this._spacing);l?s+=g+v:r+=g+v}}},e}(bt);!function(t){t.getStretch=function(t){return _t.stretchProperty.get(t)},t.setStretch=function(t,e){_t.stretchProperty.set(t,e)}}(xt||(xt={})),function(t){t.stretchProperty=new S({name:"stretch",create:function(){return 0},coerce:function(t,e){return Math.max(0,Math.floor(e))},changed:function(t){t.parent&&t.parent.layout instanceof xt&&t.parent.fit()}}),t.createSizer=function(t){var e=new lt;return e.sizeHint=Math.floor(t),e},t.createHandle=function(t){var e=t.createHandle();return e.style.position="absolute",e},t.averageSize=function(t){return t.reduce(function(t,e){return t+e.size},0)/t.length||0},t.normalize=function(t){var e=t.length;if(0===e)return[];var n=t.reduce(function(t,e){return t+Math.abs(e)},0);return 0===n?t.map(function(t){return 1/e}):t.map(function(t){return t/n})}}(_t||(_t={}));var Mt,Ct=function(t){function e(e){var n=t.call(this,ct(ct({},e),{orientation:e.orientation||"vertical"}))||this;return n._titles=[],n.titleSpace=e.titleSpace||22,n}return dt(e,t),Object.defineProperty(e.prototype,"titleSpace",{get:function(){return this.widgetOffset},set:function(t){t=wt.clampDimension(t),this.widgetOffset!==t&&(this.widgetOffset=t,this.parent&&this.parent.fit())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"titles",{get:function(){return this._titles},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.isDisposed||(this._titles.length=0,t.prototype.dispose.call(this))},e.prototype.updateTitle=function(t,e){var n=this._titles[t],i=n.classList.contains("lm-mod-expanded"),o=Mt.createTitle(this.renderer,e.title,i);this._titles[t]=o,this.parent.node.replaceChild(o,n)},e.prototype.attachWidget=function(e,i){var o=Mt.createTitle(this.renderer,i.title);n.insert(this._titles,e,o),this.parent.node.appendChild(o),i.node.setAttribute("role","region"),i.node.setAttribute("aria-labelledby",o.id),t.prototype.attachWidget.call(this,e,i)},e.prototype.moveWidget=function(e,i,o){n.move(this._titles,e,i),t.prototype.moveWidget.call(this,e,i,o)},e.prototype.detachWidget=function(e,i){var o=n.removeAt(this._titles,e);this.parent.node.removeChild(o),t.prototype.detachWidget.call(this,e,i)},e.prototype.updateItemPosition=function(e,n,i,o,r,s,a){var d=this._titles[e].style;d.top=o+"px",d.left=i+"px",d.height=this.widgetOffset+"px",d.width=n?r+"px":s+"px",t.prototype.updateItemPosition.call(this,e,n,i,o,r,s,a)},e}(xt);!function(t){t.createTitle=function(t,e,n){void 0===n&&(n=!0);var i=t.createSectionTitle(e);return i.style.position="absolute",i.setAttribute("aria-label",e.label+" Section"),i.setAttribute("aria-expanded",n?"true":"false"),i.setAttribute("aria-controls",e.owner.id),n&&i.classList.add("lm-mod-expanded"),i}}(Mt||(Mt={}));var zt,St=function(t){function e(e){void 0===e&&(e={});var n=t.call(this)||this;return n.addClass("lm-Panel"),n.addClass("p-Panel"),n.layout=zt.createLayout(e),n}return dt(e,t),Object.defineProperty(e.prototype,"widgets",{get:function(){return this.layout.widgets},enumerable:!0,configurable:!0}),e.prototype.addWidget=function(t){this.layout.addWidget(t)},e.prototype.insertWidget=function(t,e){this.layout.insertWidget(t,e)},e}(ft);!function(t){t.createLayout=function(t){return t.layout||new bt}}(zt||(zt={}));var Pt,At=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,{layout:Pt.createLayout(e)})||this;return n._handleMoved=new A(n),n._pressData=null,n.addClass("lm-SplitPanel"),n.addClass("p-SplitPanel"),n}return dt(e,t),e.prototype.dispose=function(){this._releaseMouse(),t.prototype.dispose.call(this)},Object.defineProperty(e.prototype,"orientation",{get:function(){return this.layout.orientation},set:function(t){this.layout.orientation=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"alignment",{get:function(){return this.layout.alignment},set:function(t){this.layout.alignment=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"spacing",{get:function(){return this.layout.spacing},set:function(t){this.layout.spacing=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"renderer",{get:function(){return this.layout.renderer},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"handleMoved",{get:function(){return this._handleMoved},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"handles",{get:function(){return this.layout.handles},enumerable:!0,configurable:!0}),e.prototype.relativeSizes=function(){return this.layout.relativeSizes()},e.prototype.setRelativeSizes=function(t,e){void 0===e&&(e=!0),this.layout.setRelativeSizes(t,e)},e.prototype.handleEvent=function(t){switch(t.type){case"mousedown":case"pointerdown":this._evtMouseDown(t);break;case"mousemove":case"pointermove":this._evtMouseMove(t);break;case"mouseup":case"pointerup":this._evtMouseUp(t);break;case"keydown":this._evtKeyDown(t);break;case"contextmenu":t.preventDefault(),t.stopPropagation()}},e.prototype.onBeforeAttach=function(t){this.node.addEventListener("mousedown",this),this.node.addEventListener("pointerdown",this)},e.prototype.onAfterDetach=function(t){this.node.removeEventListener("mousedown",this),this.node.removeEventListener("pointerdown",this),this._releaseMouse()},e.prototype.onChildAdded=function(t){t.child.addClass("lm-SplitPanel-child"),t.child.addClass("p-SplitPanel-child"),this._releaseMouse()},e.prototype.onChildRemoved=function(t){t.child.removeClass("lm-SplitPanel-child"),t.child.removeClass("p-SplitPanel-child"),this._releaseMouse()},e.prototype._evtKeyDown=function(t){this._pressData&&(t.preventDefault(),t.stopPropagation()),27===t.keyCode&&this._releaseMouse()},e.prototype._evtMouseDown=function(t){if(0===t.button){var e=this.layout,i=n.findFirstIndex(e.handles,function(e){return e.contains(t.target)});if(-1!==i){var o;t.preventDefault(),t.stopPropagation(),document.addEventListener("mouseup",this,!0),document.addEventListener("mousemove",this,!0),document.addEventListener("pointerup",this,!0),document.addEventListener("pointermove",this,!0),document.addEventListener("keydown",this,!0),document.addEventListener("contextmenu",this,!0);var r=e.handles[i],s=r.getBoundingClientRect();o="horizontal"===e.orientation?t.clientX-s.left:t.clientY-s.top;var a=window.getComputedStyle(r),d=tt.overrideCursor(a.cursor);this._pressData={index:i,delta:o,override:d}}}},e.prototype._evtMouseMove=function(t){var e;t.preventDefault(),t.stopPropagation();var n=this.layout,i=this.node.getBoundingClientRect();e="horizontal"===n.orientation?t.clientX-i.left-this._pressData.delta:t.clientY-i.top-this._pressData.delta,n.moveHandle(this._pressData.index,e)},e.prototype._evtMouseUp=function(t){0===t.button&&(t.preventDefault(),t.stopPropagation(),this._releaseMouse())},e.prototype._releaseMouse=function(){this._pressData&&(this._pressData.override.dispose(),this._pressData=null,this._handleMoved.emit(),document.removeEventListener("mouseup",this,!0),document.removeEventListener("mousemove",this,!0),document.removeEventListener("keydown",this,!0),document.removeEventListener("pointerup",this,!0),document.removeEventListener("pointermove",this,!0),document.removeEventListener("contextmenu",this,!0))},e}(St);!function(t){var e=function(){function t(){}return t.prototype.createHandle=function(){var t=document.createElement("div");return t.className="lm-SplitPanel-handle",t.classList.add("p-SplitPanel-handle"),t},t}();t.Renderer=e,t.defaultRenderer=new e,t.getStretch=function(t){return xt.getStretch(t)},t.setStretch=function(t,e){xt.setStretch(t,e)}}(At||(At={})),function(t){t.createLayout=function(t){return t.layout||new xt({renderer:t.renderer||At.defaultRenderer,orientation:t.orientation,alignment:t.alignment,spacing:t.spacing})}}(Pt||(Pt={}));var It,Tt=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,ct(ct({},e),{layout:It.createLayout(e)}))||this;return n._widgetSizesCache=new WeakMap,n.addClass("lm-AccordionPanel"),n}return dt(e,t),Object.defineProperty(e.prototype,"renderer",{get:function(){return this.layout.renderer},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"titleSpace",{get:function(){return this.layout.titleSpace},set:function(t){this.layout.titleSpace=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"titles",{get:function(){return this.layout.titles},enumerable:!0,configurable:!0}),e.prototype.addWidget=function(e){t.prototype.addWidget.call(this,e),e.title.changed.connect(this._onTitleChanged,this)},e.prototype.collapse=function(t){var e=this.layout.widgets[t];e&&!e.isHidden&&this._toggleExpansion(t)},e.prototype.expand=function(t){var e=this.layout.widgets[t];e&&e.isHidden&&this._toggleExpansion(t)},e.prototype.insertWidget=function(e,n){t.prototype.insertWidget.call(this,e,n),n.title.changed.connect(this._onTitleChanged,this)},e.prototype.handleEvent=function(e){switch(t.prototype.handleEvent.call(this,e),e.type){case"click":this._evtClick(e);break;case"keydown":this._eventKeyDown(e)}},e.prototype.onBeforeAttach=function(e){this.node.addEventListener("click",this),this.node.addEventListener("keydown",this),t.prototype.onBeforeAttach.call(this,e)},e.prototype.onAfterDetach=function(e){t.prototype.onAfterDetach.call(this,e),this.node.removeEventListener("click",this),this.node.removeEventListener("keydown",this)},e.prototype._onTitleChanged=function(t){var e=n.findFirstIndex(this.widgets,function(e){return e.contains(t.owner)});e>=0&&(this.layout.updateTitle(e,t.owner),this.update())},e.prototype._computeWidgetSize=function(t){var e=this.layout,n=e.widgets[t];if(n){var i=n.isHidden,o=e.absoluteSizes(),r=(i?-1:1)*this.spacing,s=o.reduce(function(t,e){return t+e}),a=function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var i=Array(t),o=0;for(e=0;e<n;e++)for(var r=arguments[e],s=0,a=r.length;s<a;s++,o++)i[o]=r[s];return i}(o);if(i){var d=this._widgetSizesCache.get(n);if(!d)return;a[t]+=d,-1===(c=a.map(function(t){return t-d>0}).lastIndexOf(!0))?a.forEach(function(e,n){n!==t&&(a[n]-=o[n]/s*(d-r))}):a[c]-=d-r}else{var c,h=o[t];if(this._widgetSizesCache.set(n,h),a[t]=0,-1===(c=a.map(function(t){return t>0}).lastIndexOf(!0)))return;a[c]=o[c]+h+r}return a.map(function(t){return t/(s+r)})}},e.prototype._evtClick=function(t){var e=t.target;if(e){var i=n.findFirstIndex(this.titles,function(t){return t.contains(e)});i>=0&&(t.preventDefault(),t.stopPropagation(),this._toggleExpansion(i))}},e.prototype._eventKeyDown=function(t){if(!t.defaultPrevented){var e=t.target,i=!1;if(e){var o=n.findFirstIndex(this.titles,function(t){return t.contains(e)});if(o>=0){var r=t.keyCode.toString();if(t.key.match(/Space|Enter/)||r.match(/13|32/))e.click(),i=!0;else if("horizontal"===this.orientation?t.key.match(/ArrowLeft|ArrowRight/)||r.match(/37|39/):t.key.match(/ArrowUp|ArrowDown/)||r.match(/38|40/)){var s=t.key.match(/ArrowLeft|ArrowUp/)||r.match(/37|38/)?-1:1,a=this.titles.length,d=(o+a+s)%a;this.titles[d].focus(),i=!0}else"End"===t.key||"35"===r?(this.titles[this.titles.length-1].focus(),i=!0):"Home"!==t.key&&"36"!==r||(this.titles[0].focus(),i=!0)}i&&t.preventDefault()}}},e.prototype._toggleExpansion=function(t){var e=this.titles[t],n=this.layout.widgets[t],i=this._computeWidgetSize(t);i&&this.setRelativeSizes(i,!1),n.isHidden?(e.classList.add("lm-mod-expanded"),e.setAttribute("aria-expanded","true"),n.show()):(e.classList.remove("lm-mod-expanded"),e.setAttribute("aria-expanded","false"),n.hide())},e}(At);!function(t){var e=function(t){function e(){var n=t.call(this)||this;return n.titleClassName="lm-AccordionPanel-title",n._titleID=0,n._titleKeys=new WeakMap,n._uuid=++e._nInstance,n}return dt(e,t),e.prototype.createCollapseIcon=function(t){return document.createElement("span")},e.prototype.createSectionTitle=function(t){var e=document.createElement("h3");for(var n in e.setAttribute("role","button"),e.setAttribute("tabindex","0"),e.id=this.createTitleKey(t),e.className=this.titleClassName,t.dataset)e.dataset[n]=t.dataset[n];e.appendChild(this.createCollapseIcon(t)).className="lm-AccordionPanel-titleCollapser";var i=e.appendChild(document.createElement("span"));return i.className="lm-AccordionPanel-titleLabel",i.textContent=t.label,i.title=t.caption||t.label,e},e.prototype.createTitleKey=function(t){var e=this._titleKeys.get(t);return void 0===e&&(e="title-key-"+this._uuid+"-"+this._titleID++,this._titleKeys.set(t,e)),e},e._nInstance=0,e}(At.Renderer);t.Renderer=e,t.defaultRenderer=new e}(Tt||(Tt={})),function(t){t.createLayout=function(t){return t.layout||new Ct({renderer:t.renderer||Tt.defaultRenderer,orientation:t.orientation,alignment:t.alignment,spacing:t.spacing,titleSpace:t.titleSpace})}}(It||(It={}));var Lt,Et=function(t){function e(e){void 0===e&&(e={});var n=t.call(this)||this;return n._fixed=0,n._spacing=4,n._dirty=!1,n._sizers=[],n._items=[],n._box=null,n._alignment="start",n._direction="top-to-bottom",void 0!==e.direction&&(n._direction=e.direction),void 0!==e.alignment&&(n._alignment=e.alignment),void 0!==e.spacing&&(n._spacing=wt.clampDimension(e.spacing)),n}return dt(e,t),e.prototype.dispose=function(){o(this._items,function(t){t.dispose()}),this._box=null,this._items.length=0,this._sizers.length=0,t.prototype.dispose.call(this)},Object.defineProperty(e.prototype,"direction",{get:function(){return this._direction},set:function(t){this._direction!==t&&(this._direction=t,this.parent&&(this.parent.dataset.direction=t,this.parent.fit()))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"alignment",{get:function(){return this._alignment},set:function(t){this._alignment!==t&&(this._alignment=t,this.parent&&(this.parent.dataset.alignment=t,this.parent.update()))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"spacing",{get:function(){return this._spacing},set:function(t){t=wt.clampDimension(t),this._spacing!==t&&(this._spacing=t,this.parent&&this.parent.fit())},enumerable:!0,configurable:!0}),e.prototype.init=function(){this.parent.dataset.direction=this.direction,this.parent.dataset.alignment=this.alignment,t.prototype.init.call(this)},e.prototype.attachWidget=function(t,e){n.insert(this._items,t,new vt(e)),n.insert(this._sizers,t,new lt),this.parent.isAttached&&Z.sendMessage(e,ft.Msg.BeforeAttach),this.parent.node.appendChild(e.node),this.parent.isAttached&&Z.sendMessage(e,ft.Msg.AfterAttach),this.parent.fit()},e.prototype.moveWidget=function(t,e,i){n.move(this._items,t,e),n.move(this._sizers,t,e),this.parent.update()},e.prototype.detachWidget=function(t,e){var i=n.removeAt(this._items,t);n.removeAt(this._sizers,t),this.parent.isAttached&&Z.sendMessage(e,ft.Msg.BeforeDetach),this.parent.node.removeChild(e.node),this.parent.isAttached&&Z.sendMessage(e,ft.Msg.AfterDetach),i.dispose(),this.parent.fit()},e.prototype.onBeforeShow=function(e){t.prototype.onBeforeShow.call(this,e),this.parent.update()},e.prototype.onBeforeAttach=function(e){t.prototype.onBeforeAttach.call(this,e),this.parent.fit()},e.prototype.onChildShown=function(t){this.parent.fit()},e.prototype.onChildHidden=function(t){this.parent.fit()},e.prototype.onResize=function(t){this.parent.isVisible&&this._update(t.width,t.height)},e.prototype.onUpdateRequest=function(t){this.parent.isVisible&&this._update(-1,-1)},e.prototype.onFitRequest=function(t){this.parent.isAttached&&this._fit()},e.prototype._fit=function(){for(var t=0,n=0,i=this._items.length;n<i;++n)t+=+!this._items[n].isHidden;this._fixed=this._spacing*Math.max(0,t-1);var o=Lt.isHorizontal(this._direction),r=o?this._fixed:0,s=o?0:this._fixed;for(n=0,i=this._items.length;n<i;++n){var a=this._items[n],d=this._sizers[n];a.isHidden?(d.minSize=0,d.maxSize=0):(a.fit(),d.sizeHint=e.getSizeBasis(a.widget),d.stretch=e.getStretch(a.widget),o?(d.minSize=a.minWidth,d.maxSize=a.maxWidth,r+=a.minWidth,s=Math.max(s,a.minHeight)):(d.minSize=a.minHeight,d.maxSize=a.maxHeight,s+=a.minHeight,r=Math.max(r,a.minWidth)))}var c=this._box=B.boxSizing(this.parent.node);r+=c.horizontalSum,s+=c.verticalSum;var h=this.parent.node.style;h.minWidth=r+"px",h.minHeight=s+"px",this._dirty=!0,this.parent.parent&&Z.sendMessage(this.parent.parent,ft.Msg.FitRequest),this._dirty&&Z.sendMessage(this.parent,ft.Msg.UpdateRequest)},e.prototype._update=function(t,e){this._dirty=!1;for(var n=0,i=0,o=this._items.length;i<o;++i)n+=+!this._items[i].isHidden;if(0!==n){t<0&&(t=this.parent.node.offsetWidth),e<0&&(e=this.parent.node.offsetHeight),this._box||(this._box=B.boxSizing(this.parent.node));var r,s=this._box.paddingTop,a=this._box.paddingLeft,d=t-this._box.horizontalSum,c=e-this._box.verticalSum;switch(this._direction){case"left-to-right":r=ht.calc(this._sizers,Math.max(0,d-this._fixed));break;case"top-to-bottom":r=ht.calc(this._sizers,Math.max(0,c-this._fixed));break;case"right-to-left":r=ht.calc(this._sizers,Math.max(0,d-this._fixed)),a+=d;break;case"bottom-to-top":r=ht.calc(this._sizers,Math.max(0,c-this._fixed)),s+=c;break;default:throw"unreachable"}var h=0,l=0;if(r>0)switch(this._alignment){case"start":break;case"center":h=0,l=r/2;break;case"end":h=0,l=r;break;case"justify":h=r/n,l=0;break;default:throw"unreachable"}for(i=0,o=this._items.length;i<o;++i){var u=this._items[i];if(!u.isHidden){var p=this._sizers[i].size;switch(this._direction){case"left-to-right":u.update(a+l,s,p+h,c),a+=p+h+this._spacing;break;case"top-to-bottom":u.update(a,s+l,d,p+h),s+=p+h+this._spacing;break;case"right-to-left":u.update(a-l-p-h,s,p+h,c),a-=p+h+this._spacing;break;case"bottom-to-top":u.update(a,s-l-p-h,d,p+h),s-=p+h+this._spacing;break;default:throw"unreachable"}}}}},e}(bt);!function(t){t.getStretch=function(t){return Lt.stretchProperty.get(t)},t.setStretch=function(t,e){Lt.stretchProperty.set(t,e)},t.getSizeBasis=function(t){return Lt.sizeBasisProperty.get(t)},t.setSizeBasis=function(t,e){Lt.sizeBasisProperty.set(t,e)}}(Et||(Et={})),function(t){function e(t){t.parent&&t.parent.layout instanceof Et&&t.parent.fit()}t.stretchProperty=new S({name:"stretch",create:function(){return 0},coerce:function(t,e){return Math.max(0,Math.floor(e))},changed:e}),t.sizeBasisProperty=new S({name:"sizeBasis",create:function(){return 0},coerce:function(t,e){return Math.max(0,Math.floor(e))},changed:e}),t.isHorizontal=function(t){return"left-to-right"===t||"right-to-left"===t},t.clampSpacing=function(t){return Math.max(0,Math.floor(t))}}(Lt||(Lt={}));var kt,Bt,Dt,Ot,Rt=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,{layout:kt.createLayout(e)})||this;return n.addClass("lm-BoxPanel"),n.addClass("p-BoxPanel"),n}return dt(e,t),Object.defineProperty(e.prototype,"direction",{get:function(){return this.layout.direction},set:function(t){this.layout.direction=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"alignment",{get:function(){return this.layout.alignment},set:function(t){this.layout.alignment=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"spacing",{get:function(){return this.layout.spacing},set:function(t){this.layout.spacing=t},enumerable:!0,configurable:!0}),e.prototype.onChildAdded=function(t){t.child.addClass("lm-BoxPanel-child"),t.child.addClass("p-BoxPanel-child")},e.prototype.onChildRemoved=function(t){t.child.removeClass("lm-BoxPanel-child"),t.child.removeClass("p-BoxPanel-child")},e}(St);!function(t){t.getStretch=function(t){return Et.getStretch(t)},t.setStretch=function(t,e){Et.setStretch(t,e)},t.getSizeBasis=function(t){return Et.getSizeBasis(t)},t.setSizeBasis=function(t,e){Et.setSizeBasis(t,e)}}(Rt||(Rt={})),function(t){t.createLayout=function(t){return t.layout||new Et(t)}}(kt||(kt={})),t.CommandPalette=function(t){function e(n){var i=t.call(this,{node:Ot.createNode()})||this;return i._activeIndex=-1,i._items=[],i._results=null,i.addClass("lm-CommandPalette"),i.addClass("p-CommandPalette"),i.setFlag(ft.Flag.DisallowLayout),i.commands=n.commands,i.renderer=n.renderer||e.defaultRenderer,i.commands.commandChanged.connect(i._onGenericChange,i),i.commands.keyBindingChanged.connect(i._onGenericChange,i),i}return dt(e,t),e.prototype.dispose=function(){this._items.length=0,this._results=null,t.prototype.dispose.call(this)},Object.defineProperty(e.prototype,"searchNode",{get:function(){return this.node.getElementsByClassName("lm-CommandPalette-search")[0]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inputNode",{get:function(){return this.node.getElementsByClassName("lm-CommandPalette-input")[0]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contentNode",{get:function(){return this.node.getElementsByClassName("lm-CommandPalette-content")[0]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"items",{get:function(){return this._items},enumerable:!0,configurable:!0}),e.prototype.addItem=function(t){var e=Ot.createItem(this.commands,t);return this._items.push(e),this.refresh(),e},e.prototype.addItems=function(t){var e=this,n=t.map(function(t){return Ot.createItem(e.commands,t)});return n.forEach(function(t){return e._items.push(t)}),this.refresh(),n},e.prototype.removeItem=function(t){this.removeItemAt(this._items.indexOf(t))},e.prototype.removeItemAt=function(t){n.removeAt(this._items,t)&&this.refresh()},e.prototype.clearItems=function(){0!==this._items.length&&(this._items.length=0,this.refresh())},e.prototype.refresh=function(){(this._results=null,""!==this.inputNode.value)?this.node.getElementsByClassName("lm-close-icon")[0].style.display="inherit":this.node.getElementsByClassName("lm-close-icon")[0].style.display="none";this.update()},e.prototype.handleEvent=function(t){switch(t.type){case"click":this._evtClick(t);break;case"keydown":this._evtKeyDown(t);break;case"input":this.refresh();break;case"focus":case"blur":this._toggleFocused()}},e.prototype.onBeforeAttach=function(t){this.node.addEventListener("click",this),this.node.addEventListener("keydown",this),this.node.addEventListener("input",this),this.node.addEventListener("focus",this,!0),this.node.addEventListener("blur",this,!0)},e.prototype.onAfterDetach=function(t){this.node.removeEventListener("click",this),this.node.removeEventListener("keydown",this),this.node.removeEventListener("input",this),this.node.removeEventListener("focus",this,!0),this.node.removeEventListener("blur",this,!0)},e.prototype.onActivateRequest=function(t){if(this.isAttached){var e=this.inputNode;e.focus(),e.select()}},e.prototype.onUpdateRequest=function(t){var e=this.inputNode.value,i=this.contentNode,o=this._results;if(o||(o=this._results=Ot.search(this._items,e),this._activeIndex=e?n.findFirstIndex(o,Ot.canActivate):-1),e||0!==o.length)if(e&&0===o.length){var r=this.renderer.renderEmptyMessage({query:e});nt.render(r,i)}else{for(var s=this.renderer,a=this._activeIndex,d=new Array(o.length),c=0,h=o.length;c<h;++c){var l=o[c];if("header"===l.type){var u=l.indices,p=l.category;d[c]=s.renderHeader({category:p,indices:u})}else{var f=l.item,m=(u=l.indices,c===a);d[c]=s.renderItem({item:f,indices:u,active:m})}}if(nt.render(d,i),a<0||a>=o.length)i.scrollTop=0;else{var g=i.children[a];B.scrollIntoViewIfNeeded(i,g)}}else nt.render(null,i)},e.prototype._evtClick=function(t){if(0===t.button){if(t.target.classList.contains("lm-close-icon"))return this.inputNode.value="",void this.refresh();var e=n.findFirstIndex(this.contentNode.children,function(e){return e.contains(t.target)});-1!==e&&(t.preventDefault(),t.stopPropagation(),this._execute(e))}},e.prototype._evtKeyDown=function(t){if(!(t.altKey||t.ctrlKey||t.metaKey||t.shiftKey))switch(t.keyCode){case 13:t.preventDefault(),t.stopPropagation(),this._execute(this._activeIndex);break;case 38:t.preventDefault(),t.stopPropagation(),this._activatePreviousItem();break;case 40:t.preventDefault(),t.stopPropagation(),this._activateNextItem()}},e.prototype._activateNextItem=function(){if(this._results&&0!==this._results.length){var t=this._activeIndex,e=this._results.length,i=t<e-1?t+1:0,o=0===i?e-1:i-1;this._activeIndex=n.findFirstIndex(this._results,Ot.canActivate,i,o),this.update()}},e.prototype._activatePreviousItem=function(){if(this._results&&0!==this._results.length){var t=this._activeIndex,e=this._results.length,i=t<=0?e-1:t-1,o=i===e-1?0:i+1;this._activeIndex=n.findLastIndex(this._results,Ot.canActivate,i,o),this.update()}},e.prototype._execute=function(t){if(this._results){var e=this._results[t];if(e){if("header"===e.type){var n=this.inputNode;return n.value=e.category.toLowerCase()+" ",n.focus(),void this.refresh()}e.item.isEnabled&&(this.commands.execute(e.item.command,e.item.args),this.inputNode.value="",this.refresh())}}},e.prototype._toggleFocused=function(){var t=document.activeElement===this.inputNode;this.toggleClass("lm-mod-focused",t),this.toggleClass("p-mod-focused",t)},e.prototype._onGenericChange=function(){this.refresh()},e}(ft),Bt=t.CommandPalette||(t.CommandPalette={}),Dt=function(){function e(){}return e.prototype.renderHeader=function(t){var e=this.formatHeader(t);return st.li({className:"lm-CommandPalette-header p-CommandPalette-header"},e)},e.prototype.renderItem=function(t){var e=this.createItemClass(t),n=this.createItemDataset(t);return t.item.isToggleable?st.li({className:e,dataset:n,role:"checkbox","aria-checked":""+t.item.isToggled},this.renderItemIcon(t),this.renderItemContent(t),this.renderItemShortcut(t)):st.li({className:e,dataset:n},this.renderItemIcon(t),this.renderItemContent(t),this.renderItemShortcut(t))},e.prototype.renderEmptyMessage=function(t){var e=this.formatEmptyMessage(t);return st.li({className:"lm-CommandPalette-emptyMessage p-CommandPalette-emptyMessage"},e)},e.prototype.renderItemIcon=function(t){var e=this.createIconClass(t);return"string"==typeof t.item.icon?st.div({className:e},t.item.iconLabel):st.div({className:e},t.item.icon,t.item.iconLabel)},e.prototype.renderItemContent=function(t){return st.div({className:"lm-CommandPalette-itemContent p-CommandPalette-itemContent"},this.renderItemLabel(t),this.renderItemCaption(t))},e.prototype.renderItemLabel=function(t){var e=this.formatItemLabel(t);return st.div({className:"lm-CommandPalette-itemLabel p-CommandPalette-itemLabel"},e)},e.prototype.renderItemCaption=function(t){var e=this.formatItemCaption(t);return st.div({className:"lm-CommandPalette-itemCaption p-CommandPalette-itemCaption"},e)},e.prototype.renderItemShortcut=function(t){var e=this.formatItemShortcut(t);return st.div({className:"lm-CommandPalette-itemShortcut p-CommandPalette-itemShortcut"},e)},e.prototype.createItemClass=function(t){var e="lm-CommandPalette-item";e+=" p-CommandPalette-item",t.item.isEnabled||(e+=" lm-mod-disabled",e+=" p-mod-disabled"),t.item.isToggled&&(e+=" lm-mod-toggled",e+=" p-mod-toggled"),t.active&&(e+=" lm-mod-active",e+=" p-mod-active");var n=t.item.className;return n&&(e+=" "+n),e},e.prototype.createItemDataset=function(t){return ct(ct({},t.item.dataset),{command:t.item.command})},e.prototype.createIconClass=function(t){var e="lm-CommandPalette-itemIcon";e+=" p-CommandPalette-itemIcon";var n=t.item.iconClass;return n?e+" "+n:e},e.prototype.formatHeader=function(t){return t.indices&&0!==t.indices.length?y.highlight(t.category,t.indices,st.mark):t.category},e.prototype.formatEmptyMessage=function(t){return"No commands found that match '"+t.query+"'"},e.prototype.formatItemShortcut=function(e){var n=e.item.keyBinding;return n?t.CommandRegistry.formatKeystroke(n.keys):null},e.prototype.formatItemLabel=function(t){return t.indices&&0!==t.indices.length?y.highlight(t.item.label,t.indices,st.mark):t.item.label},e.prototype.formatItemCaption=function(t){return t.item.caption},e}(),Bt.Renderer=Dt,Bt.defaultRenderer=new Dt,function(t){function e(t,e){for(var i=t.category.toLowerCase(),o=i+" "+t.label.toLowerCase(),r=1/0,s=null,a=/\b\w/g;;){var d=a.exec(o);if(!d)break;var c=y.matchSumOfDeltas(o,e,d.index);if(!c)break;c&&c.score<=r&&(r=c.score,s=c.indices)}if(!s||r===1/0)return null;for(var h=i.length+1,l=n.lowerBound(s,h,function(t,e){return t-e}),u=s.slice(0,l),p=s.slice(l),f=0,m=p.length;f<m;++f)p[f]-=h;return 0===u.length?{matchType:0,categoryIndices:null,labelIndices:p,score:r,item:t}:0===p.length?{matchType:1,categoryIndices:u,labelIndices:null,score:r,item:t}:{matchType:2,categoryIndices:u,labelIndices:p,score:r,item:t}}function i(t,e){var n=t.matchType-e.matchType;if(0!==n)return n;var i=t.score-e.score;if(0!==i)return i;var o=0,r=0;switch(t.matchType){case 0:o=t.labelIndices[0],r=e.labelIndices[0];break;case 1:case 2:o=t.categoryIndices[0],r=e.categoryIndices[0]}if(o!==r)return o-r;var s=t.item.category.localeCompare(e.item.category);if(0!==s)return s;var a=t.item.rank,d=e.item.rank;return a!==d?a<d?-1:1:t.item.label.localeCompare(e.item.label)}t.createNode=function(){var t=document.createElement("div"),e=document.createElement("div"),n=document.createElement("div"),i=document.createElement("input"),o=document.createElement("ul"),r=document.createElement("button");return e.className="lm-CommandPalette-search",n.className="lm-CommandPalette-wrapper",i.className="lm-CommandPalette-input",r.className="lm-close-icon",o.className="lm-CommandPalette-content",e.classList.add("p-CommandPalette-search"),n.classList.add("p-CommandPalette-wrapper"),i.classList.add("p-CommandPalette-input"),o.classList.add("p-CommandPalette-content"),i.spellcheck=!1,n.appendChild(i),n.appendChild(r),e.appendChild(n),t.appendChild(e),t.appendChild(o),t},t.createItem=function(t,e){return new o(t,e)},t.search=function(t,o){var r=function(t,n){i=n,n=i.replace(/\s+/g,"").toLowerCase();var i;for(var o=[],r=0,s=t.length;r<s;++r){var a=t[r];if(a.isVisible)if(n){var d=e(a,n);d&&(a.isEnabled||(d.score+=1e3),o.push(d))}else o.push({matchType:3,categoryIndices:null,labelIndices:null,score:0,item:a})}return o}(t,o);return r.sort(i),function(t){var e=new Array(t.length);n.fill(e,!1);for(var i=[],o=0,r=t.length;o<r;++o)if(!e[o]){var s=t[o],a=s.item,d=s.categoryIndices,c=a.category;i.push({type:"header",category:c,indices:d});for(var h=o;h<r;++h)if(!e[h]){var l=t[h],u=l.item,p=l.labelIndices;u.category===c&&(i.push({type:"item",item:u,indices:p}),e[h]=!0)}}return i}(r)},t.canActivate=function(t){return"item"===t.type&&t.item.isEnabled};var o=function(){function t(t,e){this._commands=t,this.category=e.category.trim().replace(/\s+/g," "),this.command=e.command,this.args=e.args||b.emptyObject,this.rank=void 0!==e.rank?e.rank:1/0}return Object.defineProperty(t.prototype,"label",{get:function(){return this._commands.label(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"icon",{get:function(){return this._commands.icon(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"iconClass",{get:function(){return this._commands.iconClass(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"iconLabel",{get:function(){return this._commands.iconLabel(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"caption",{get:function(){return this._commands.caption(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"className",{get:function(){return this._commands.className(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dataset",{get:function(){return this._commands.dataset(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isEnabled",{get:function(){return this._commands.isEnabled(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isToggled",{get:function(){return this._commands.isToggled(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isToggleable",{get:function(){return this._commands.isToggleable(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isVisible",{get:function(){return this._commands.isVisible(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"keyBinding",{get:function(){var t=this.command,e=this.args;return n.findLastValue(this._commands.keyBindings,function(n){return n.command===t&&b.deepEqual(n.args,e)})||null},enumerable:!0,configurable:!0}),t}()}(Ot||(Ot={}));var Nt,jt=function(t){function e(n){var i=t.call(this,{node:Nt.createNode()})||this;return i._childIndex=-1,i._activeIndex=-1,i._openTimerID=0,i._closeTimerID=0,i._items=[],i._childMenu=null,i._parentMenu=null,i._aboutToClose=new A(i),i._menuRequested=new A(i),i.addClass("lm-Menu"),i.addClass("p-Menu"),i.setFlag(ft.Flag.DisallowLayout),i.commands=n.commands,i.renderer=n.renderer||e.defaultRenderer,i}return dt(e,t),e.prototype.dispose=function(){this.close(),this._items.length=0,t.prototype.dispose.call(this)},Object.defineProperty(e.prototype,"aboutToClose",{get:function(){return this._aboutToClose},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"menuRequested",{get:function(){return this._menuRequested},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parentMenu",{get:function(){return this._parentMenu},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"childMenu",{get:function(){return this._childMenu},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rootMenu",{get:function(){for(var t=this;t._parentMenu;)t=t._parentMenu;return t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"leafMenu",{get:function(){for(var t=this;t._childMenu;)t=t._childMenu;return t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contentNode",{get:function(){return this.node.getElementsByClassName("lm-Menu-content")[0]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activeItem",{get:function(){return this._items[this._activeIndex]||null},set:function(t){this.activeIndex=t?this._items.indexOf(t):-1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activeIndex",{get:function(){return this._activeIndex},set:function(t){(t<0||t>=this._items.length)&&(t=-1),-1===t||Nt.canActivate(this._items[t])||(t=-1),this._activeIndex!==t&&(this._activeIndex=t,this._activeIndex>=0&&this.contentNode.childNodes[this._activeIndex]&&this.contentNode.childNodes[this._activeIndex].focus(),this.update())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"items",{get:function(){return this._items},enumerable:!0,configurable:!0}),e.prototype.activateNextItem=function(){var t=this._items.length,e=this._activeIndex,i=e<t-1?e+1:0,o=0===i?t-1:i-1;this.activeIndex=n.findFirstIndex(this._items,Nt.canActivate,i,o)},e.prototype.activatePreviousItem=function(){var t=this._items.length,e=this._activeIndex,i=e<=0?t-1:e-1,o=i===t-1?0:i+1;this.activeIndex=n.findLastIndex(this._items,Nt.canActivate,i,o)},e.prototype.triggerActiveItem=function(){if(this.isAttached){var t=this.activeItem;if(t)if(this._cancelOpenTimer(),this._cancelCloseTimer(),"submenu"!==t.type){this.rootMenu.close();var e=t.command,n=t.args;this.commands.isEnabled(e,n)?this.commands.execute(e,n):console.log("Command '"+e+"' is disabled.")}else this._openChildMenu(!0)}},e.prototype.addItem=function(t){return this.insertItem(this._items.length,t)},e.prototype.insertItem=function(t,e){this.isAttached&&this.close(),this.activeIndex=-1;var i=Math.max(0,Math.min(t,this._items.length)),o=Nt.createItem(this,e);return n.insert(this._items,i,o),this.update(),o},e.prototype.removeItem=function(t){this.removeItemAt(this._items.indexOf(t))},e.prototype.removeItemAt=function(t){this.isAttached&&this.close(),this.activeIndex=-1,n.removeAt(this._items,t)&&this.update()},e.prototype.clearItems=function(){this.isAttached&&this.close(),this.activeIndex=-1,0!==this._items.length&&(this._items.length=0,this.update())},e.prototype.open=function(t,e,n){if(void 0===n&&(n={}),!this.isAttached){var i=n.forceX||!1,o=n.forceY||!1;Nt.openRootMenu(this,t,e,i,o),this.activate()}},e.prototype.handleEvent=function(t){switch(t.type){case"keydown":this._evtKeyDown(t);break;case"mouseup":this._evtMouseUp(t);break;case"mousemove":this._evtMouseMove(t);break;case"mouseenter":this._evtMouseEnter(t);break;case"mouseleave":this._evtMouseLeave(t);break;case"mousedown":this._evtMouseDown(t);break;case"contextmenu":t.preventDefault(),t.stopPropagation()}},e.prototype.onBeforeAttach=function(t){this.node.addEventListener("keydown",this),this.node.addEventListener("mouseup",this),this.node.addEventListener("mousemove",this),this.node.addEventListener("mouseenter",this),this.node.addEventListener("mouseleave",this),this.node.addEventListener("contextmenu",this),document.addEventListener("mousedown",this,!0)},e.prototype.onAfterDetach=function(t){this.node.removeEventListener("keydown",this),this.node.removeEventListener("mouseup",this),this.node.removeEventListener("mousemove",this),this.node.removeEventListener("mouseenter",this),this.node.removeEventListener("mouseleave",this),this.node.removeEventListener("contextmenu",this),document.removeEventListener("mousedown",this,!0)},e.prototype.onActivateRequest=function(t){this.isAttached&&this.node.focus()},e.prototype.onUpdateRequest=function(t){for(var e=this,n=this._items,i=this.renderer,o=this._activeIndex,r=Nt.computeCollapsed(n),s=new Array(n.length),a=function(t,a){var d=n[t],c=t===o,h=r[t];s[t]=i.renderItem({item:d,active:c,collapsed:h,onfocus:function(){e.activeIndex=t}})},d=0,c=n.length;d<c;++d)a(d);nt.render(s,this.contentNode)},e.prototype.onCloseRequest=function(e){this._cancelOpenTimer(),this._cancelCloseTimer(),this.activeIndex=-1;var n=this._childMenu;n&&(this._childIndex=-1,this._childMenu=null,n._parentMenu=null,n.close());var i=this._parentMenu;i&&(this._parentMenu=null,i._childIndex=-1,i._childMenu=null,i.activate()),this.isAttached&&this._aboutToClose.emit(void 0),t.prototype.onCloseRequest.call(this,e)},e.prototype._evtKeyDown=function(t){t.preventDefault(),t.stopPropagation();var e=t.keyCode;if(13!==e)if(27!==e)if(37!==e)if(38!==e)if(39!==e)if(40!==e){var n=j().keyForKeydownEvent(t);if(n){var i=this._activeIndex+1,o=Nt.findMnemonic(this._items,n,i);-1===o.index||o.multiple?-1!==o.index?this.activeIndex=o.index:-1!==o.auto&&(this.activeIndex=o.auto):(this.activeIndex=o.index,this.triggerActiveItem())}}else this.activateNextItem();else{var r=this.activeItem;r&&"submenu"===r.type?this.triggerActiveItem():this.rootMenu._menuRequested.emit("next")}else this.activatePreviousItem();else this._parentMenu?this.close():this._menuRequested.emit("previous");else this.close();else this.triggerActiveItem()},e.prototype._evtMouseUp=function(t){0===t.button&&(t.preventDefault(),t.stopPropagation(),this.triggerActiveItem())},e.prototype._evtMouseMove=function(t){var e=n.findFirstIndex(this.contentNode.children,function(e){return B.hitTest(e,t.clientX,t.clientY)});if(e!==this._activeIndex){if(this.activeIndex=e,(e=this.activeIndex)===this._childIndex)return this._cancelOpenTimer(),void this._cancelCloseTimer();-1!==this._childIndex&&this._startCloseTimer(),this._cancelOpenTimer();var i=this.activeItem;i&&"submenu"===i.type&&i.submenu&&this._startOpenTimer()}},e.prototype._evtMouseEnter=function(t){for(var e=this._parentMenu;e;e=e._parentMenu)e._cancelOpenTimer(),e._cancelCloseTimer(),e.activeIndex=e._childIndex},e.prototype._evtMouseLeave=function(t){if(this._cancelOpenTimer(),this._childMenu){var e=t.clientX,n=t.clientY;B.hitTest(this._childMenu.node,e,n)?this._cancelCloseTimer():(this.activeIndex=-1,this._startCloseTimer())}else this.activeIndex=-1},e.prototype._evtMouseDown=function(t){this._parentMenu||(Nt.hitTestMenus(this,t.clientX,t.clientY)?(t.preventDefault(),t.stopPropagation()):this.close())},e.prototype._openChildMenu=function(t){void 0===t&&(t=!1);var n=this.activeItem;if(n&&"submenu"===n.type&&n.submenu){var i=n.submenu;if(i!==this._childMenu){e.saveWindowData(),this._closeChildMenu(),this._childMenu=i,this._childIndex=this._activeIndex,i._parentMenu=this,Z.sendMessage(this,ft.Msg.UpdateRequest);var o=this.contentNode.children[this._activeIndex];Nt.openSubmenu(i,o),t&&(i.activeIndex=-1,i.activateNextItem()),i.activate()}}else this._closeChildMenu()},e.prototype._closeChildMenu=function(){this._childMenu&&this._childMenu.close()},e.prototype._startOpenTimer=function(){var t=this;0===this._openTimerID&&(this._openTimerID=window.setTimeout(function(){t._openTimerID=0,t._openChildMenu()},Nt.TIMER_DELAY))},e.prototype._startCloseTimer=function(){var t=this;0===this._closeTimerID&&(this._closeTimerID=window.setTimeout(function(){t._closeTimerID=0,t._closeChildMenu()},Nt.TIMER_DELAY))},e.prototype._cancelOpenTimer=function(){0!==this._openTimerID&&(clearTimeout(this._openTimerID),this._openTimerID=0)},e.prototype._cancelCloseTimer=function(){0!==this._closeTimerID&&(clearTimeout(this._closeTimerID),this._closeTimerID=0)},e.saveWindowData=function(){Nt.saveWindowData()},e}(ft);!function(e){var n=function(){function e(){}return e.prototype.renderItem=function(t){var e=this.createItemClass(t),n=this.createItemDataset(t),i=this.createItemARIA(t);return st.li(ct({className:e,dataset:n,tabindex:"0",onfocus:t.onfocus},i),this.renderIcon(t),this.renderLabel(t),this.renderShortcut(t),this.renderSubmenu(t))},e.prototype.renderIcon=function(t){var e=this.createIconClass(t);return"string"==typeof t.item.icon?st.div({className:e},t.item.iconLabel):st.div({className:e},t.item.icon,t.item.iconLabel)},e.prototype.renderLabel=function(t){var e=this.formatLabel(t);return st.div({className:"lm-Menu-itemLabel p-Menu-itemLabel"},e)},e.prototype.renderShortcut=function(t){var e=this.formatShortcut(t);return st.div({className:"lm-Menu-itemShortcut p-Menu-itemShortcut"},e)},e.prototype.renderSubmenu=function(t){return st.div({className:"lm-Menu-itemSubmenuIcon p-Menu-itemSubmenuIcon"})},e.prototype.createItemClass=function(t){var e="lm-Menu-item";e+=" p-Menu-item",t.item.isEnabled||(e+=" lm-mod-disabled",e+=" p-mod-disabled"),t.item.isToggled&&(e+=" lm-mod-toggled",e+=" p-mod-toggled"),t.item.isVisible||(e+=" lm-mod-hidden",e+=" p-mod-hidden"),t.active&&(e+=" lm-mod-active",e+=" p-mod-active"),t.collapsed&&(e+=" lm-mod-collapsed",e+=" p-mod-collapsed");var n=t.item.className;return n&&(e+=" "+n),e},e.prototype.createItemDataset=function(t){var e=t.item,n=e.type,i=e.command,o=e.dataset;return ct(ct({},o),"command"===n?{type:n,command:i}:{type:n})},e.prototype.createIconClass=function(t){var e="lm-Menu-itemIcon";e+=" p-Menu-itemIcon";var n=t.item.iconClass;return n?e+" "+n:e},e.prototype.createItemARIA=function(t){var e={};switch(t.item.type){case"separator":e.role="presentation";break;case"submenu":e["aria-haspopup"]="true",t.item.isEnabled||(e["aria-disabled"]="true");break;default:t.item.isEnabled||(e["aria-disabled"]="true"),e.role="menuitem"}return e},e.prototype.formatLabel=function(t){var e=t.item,n=e.label,i=e.mnemonic;if(i<0||i>=n.length)return n;var o=n.slice(0,i),r=n.slice(i+1),s=n[i];return[o,st.span({className:"lm-Menu-itemMnemonic p-Menu-itemMnemonic"},s),r]},e.prototype.formatShortcut=function(e){var n=e.item.keyBinding;return n?t.CommandRegistry.formatKeystroke(n.keys):null},e}();e.Renderer=n,e.defaultRenderer=new n}(jt||(jt={})),function(t){t.TIMER_DELAY=300,t.SUBMENU_OVERLAP=3;var e=null,i=0;function o(){return i>0?(i--,e):s()}function r(t){return"separator"!==t.type&&t.isEnabled&&t.isVisible}function s(){return{pageXOffset:window.pageXOffset,pageYOffset:window.pageYOffset,clientWidth:document.documentElement.clientWidth,clientHeight:document.documentElement.clientHeight}}t.saveWindowData=function(){e=s(),i++},t.createNode=function(){var t=document.createElement("div"),e=document.createElement("ul");return e.className="lm-Menu-content",e.classList.add("p-Menu-content"),t.appendChild(e),e.setAttribute("role","menu"),t.tabIndex=0,t},t.canActivate=r,t.createItem=function(t,e){return new a(t.commands,e)},t.hitTestMenus=function(t,e,n){for(var i=t;i;i=i.childMenu)if(B.hitTest(i.node,e,n))return!0;return!1},t.computeCollapsed=function(t){var e=new Array(t.length);n.fill(e,!1);for(var i=0,o=t.length;i<o;++i){if((a=t[i]).isVisible){if("separator"!==a.type)break;e[i]=!0}}for(var r=o-1;r>=0;--r){if((a=t[r]).isVisible){if("separator"!==a.type)break;e[r]=!0}}for(var s=!1;++i<r;){var a;(a=t[i]).isVisible&&("separator"!==a.type?s=!1:s?e[i]=!0:s=!0)}return e},t.openRootMenu=function(t,e,n,i,r){var s=o(),a=s.pageXOffset,d=s.pageYOffset,c=s.clientWidth,h=s.clientHeight;Z.sendMessage(t,ft.Msg.UpdateRequest);var l=h-(r?n:0),u=t.node,p=u.style;p.opacity="0",p.maxHeight=l+"px",ft.attach(t,document.body);var f=u.getBoundingClientRect(),m=f.width,g=f.height;!i&&e+m>a+c&&(e=a+c-m),!r&&n+g>d+h&&(n>d+h?n=d+h-g:n-=g),p.transform="translate("+Math.max(0,e)+"px, "+Math.max(0,n)+"px",p.opacity="1"},t.openSubmenu=function(e,n){var i=o(),r=i.pageXOffset,s=i.pageYOffset,a=i.clientWidth,d=i.clientHeight;Z.sendMessage(e,ft.Msg.UpdateRequest);var c=d,h=e.node,l=h.style;l.opacity="0",l.maxHeight=c+"px",ft.attach(e,document.body);var u=h.getBoundingClientRect(),p=u.width,f=u.height,m=B.boxSizing(e.node),g=n.getBoundingClientRect(),v=g.right-t.SUBMENU_OVERLAP;v+p>r+a&&(v=g.left+t.SUBMENU_OVERLAP-p);var y=g.top-m.borderTop-m.paddingTop;y+f>s+d&&(y=g.bottom+m.borderBottom+m.paddingBottom-f),l.transform="translate("+Math.max(0,v)+"px, "+Math.max(0,y)+"px",l.opacity="1"},t.findMnemonic=function(t,e,n){for(var i=-1,o=-1,s=!1,a=e.toUpperCase(),d=0,c=t.length;d<c;++d){var h=(d+n)%c,l=t[h];if(r(l)){var u=l.label;if(0!==u.length){var p=l.mnemonic;p>=0&&p<u.length?u[p].toUpperCase()===a&&(-1===i?i=h:s=!0):-1===o&&u[0].toUpperCase()===a&&(o=h)}}}return{index:i,multiple:s,auto:o}};var a=function(){function t(t,e){this._commands=t,this.type=e.type||"command",this.command=e.command||"",this.args=e.args||b.emptyObject,this.submenu=e.submenu||null}return Object.defineProperty(t.prototype,"label",{get:function(){return"command"===this.type?this._commands.label(this.command,this.args):"submenu"===this.type&&this.submenu?this.submenu.title.label:""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"mnemonic",{get:function(){return"command"===this.type?this._commands.mnemonic(this.command,this.args):"submenu"===this.type&&this.submenu?this.submenu.title.mnemonic:-1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"icon",{get:function(){return"command"===this.type?this._commands.icon(this.command,this.args):"submenu"===this.type&&this.submenu?this.submenu.title.icon:this.iconClass},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"iconClass",{get:function(){return"command"===this.type?this._commands.iconClass(this.command,this.args):"submenu"===this.type&&this.submenu?this.submenu.title.iconClass:""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"iconLabel",{get:function(){return"command"===this.type?this._commands.iconLabel(this.command,this.args):"submenu"===this.type&&this.submenu?this.submenu.title.iconLabel:""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"caption",{get:function(){return"command"===this.type?this._commands.caption(this.command,this.args):"submenu"===this.type&&this.submenu?this.submenu.title.caption:""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"className",{get:function(){return"command"===this.type?this._commands.className(this.command,this.args):"submenu"===this.type&&this.submenu?this.submenu.title.className:""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dataset",{get:function(){return"command"===this.type?this._commands.dataset(this.command,this.args):"submenu"===this.type&&this.submenu?this.submenu.title.dataset:{}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isEnabled",{get:function(){return"command"===this.type?this._commands.isEnabled(this.command,this.args):"submenu"!==this.type||null!==this.submenu},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isToggled",{get:function(){return"command"===this.type&&this._commands.isToggled(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isVisible",{get:function(){return"command"===this.type?this._commands.isVisible(this.command,this.args):"submenu"!==this.type||null!==this.submenu},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"keyBinding",{get:function(){if("command"===this.type){var t=this.command,e=this.args;return n.findLastValue(this._commands.keyBindings,function(n){return n.command===t&&b.deepEqual(n.args,e)})||null}return null},enumerable:!0,configurable:!0}),t}()}(Nt||(Nt={}));var Wt,Ht=function(){function t(t){this._groupByTarget=!0,this._idTick=0,this._items=[],this._sortBySelector=!0;var e=t.groupByTarget,n=t.sortBySelector,i=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(t);o<i.length;o++)e.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(t,i[o])&&(n[i[o]]=t[i[o]])}return n}(t,["groupByTarget","sortBySelector"]);this.menu=new jt(i),this._groupByTarget=!1!==e,this._sortBySelector=!1!==n}return t.prototype.addItem=function(t){var e=this,i=Wt.createItem(t,this._idTick++);return this._items.push(i),new L(function(){n.removeFirstOf(e._items,i)})},t.prototype.open=function(t){var e=this;if(jt.saveWindowData(),this.menu.clearItems(),0===this._items.length)return!1;var n=Wt.matchItems(this._items,t,this._groupByTarget,this._sortBySelector);return!(!n||0===n.length)&&(o(n,function(t){e.menu.addItem(t)}),this.menu.open(t.clientX,t.clientY),!0)},t}();!function(t){function e(t,e){var n=t.rank,i=e.rank;return n!==i?n<i?-1:1:t.id-e.id}function n(t,n){var i=O.calculateSpecificity(t.selector),o=O.calculateSpecificity(n.selector);return i!==o?o-i:e(t,n)}t.createItem=function(t,e){var n=function(t){if(-1!==t.indexOf(","))throw new Error("Selector cannot contain commas: "+t);if(!O.isValid(t))throw new Error("Invalid selector: "+t);return t}(t.selector),i=void 0!==t.rank?t.rank:1/0;return ct(ct({},t),{selector:n,rank:i,id:e})},t.matchItems=function(t,i,o,r){var s=i.target;if(!s)return null;var a=i.currentTarget;if(!a)return null;if(!(a.contains(s)||(s=document.elementFromPoint(i.clientX,i.clientY))&&a.contains(s)))return null;for(var d=[],c=t.slice();null!==s;){for(var h=[],l=0,u=c.length;l<u;++l){var p=c[l];p&&(O.matches(s,p.selector)&&(h.push(p),c[l]=null))}if(0!==h.length&&(o&&h.sort(r?n:e),d.push.apply(d,h)),s===a)break;s=s.parentElement}return o||d.sort(r?n:e),d}}(Wt||(Wt={}));var Ft,qt=function(t){function e(n){void 0===n&&(n={});var i=t.call(this,{node:Ft.createNode()})||this;return i._currentIndex=-1,i._titles=[],i._titlesEditable=!1,i._previousTitle=null,i._dragData=null,i._addButtonEnabled=!1,i._tabMoved=new A(i),i._currentChanged=new A(i),i._addRequested=new A(i),i._tabCloseRequested=new A(i),i._tabDetachRequested=new A(i),i._tabActivateRequested=new A(i),i.addClass("lm-TabBar"),i.addClass("p-TabBar"),i.contentNode.setAttribute("role","tablist"),i.setFlag(ft.Flag.DisallowLayout),i._document=n.document||document,i.tabsMovable=n.tabsMovable||!1,i.titlesEditable=n.titlesEditable||!1,i.allowDeselect=n.allowDeselect||!1,i.addButtonEnabled=n.addButtonEnabled||!1,i.insertBehavior=n.insertBehavior||"select-tab-if-needed",i.name=n.name||"",i.orientation=n.orientation||"horizontal",i.removeBehavior=n.removeBehavior||"select-tab-after",i.renderer=n.renderer||e.defaultRenderer,i}return dt(e,t),e.prototype.dispose=function(){this._releaseMouse(),this._titles.length=0,this._previousTitle=null,t.prototype.dispose.call(this)},Object.defineProperty(e.prototype,"currentChanged",{get:function(){return this._currentChanged},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tabMoved",{get:function(){return this._tabMoved},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tabActivateRequested",{get:function(){return this._tabActivateRequested},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"addRequested",{get:function(){return this._addRequested},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tabCloseRequested",{get:function(){return this._tabCloseRequested},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tabDetachRequested",{get:function(){return this._tabDetachRequested},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"document",{get:function(){return this._document},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"titlesEditable",{get:function(){return this._titlesEditable},set:function(t){this._titlesEditable=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentTitle",{get:function(){return this._titles[this._currentIndex]||null},set:function(t){this.currentIndex=t?this._titles.indexOf(t):-1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentIndex",{get:function(){return this._currentIndex},set:function(t){if((t<0||t>=this._titles.length)&&(t=-1),this._currentIndex!==t){var e=this._currentIndex,n=this._titles[e]||null,i=t,o=this._titles[i]||null;this._currentIndex=i,this._previousTitle=n,this.update(),this._currentChanged.emit({previousIndex:e,previousTitle:n,currentIndex:i,currentTitle:o})}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(t){this._name=t,t?this.contentNode.setAttribute("aria-label",t):this.contentNode.removeAttribute("aria-label")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"orientation",{get:function(){return this._orientation},set:function(t){this._orientation!==t&&(this._releaseMouse(),this._orientation=t,this.dataset.orientation=t,this.contentNode.setAttribute("aria-orientation",t))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"addButtonEnabled",{get:function(){return this._addButtonEnabled},set:function(t){this._addButtonEnabled!==t&&(this._addButtonEnabled=t,t?this.addButtonNode.classList.remove("lm-mod-hidden"):this.addButtonNode.classList.add("lm-mod-hidden"))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"titles",{get:function(){return this._titles},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contentNode",{get:function(){return this.node.getElementsByClassName("lm-TabBar-content")[0]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"addButtonNode",{get:function(){return this.node.getElementsByClassName("lm-TabBar-addButton")[0]},enumerable:!0,configurable:!0}),e.prototype.addTab=function(t){return this.insertTab(this._titles.length,t)},e.prototype.insertTab=function(t,e){this._releaseMouse();var i=Ft.asTitle(e),o=this._titles.indexOf(i),r=Math.max(0,Math.min(t,this._titles.length));return-1===o?(n.insert(this._titles,r,i),i.changed.connect(this._onTitleChanged,this),this.update(),this._adjustCurrentForInsert(r,i),i):(r===this._titles.length&&r--,o===r||(n.move(this._titles,o,r),this.update(),this._adjustCurrentForMove(o,r)),i)},e.prototype.removeTab=function(t){this.removeTabAt(this._titles.indexOf(t))},e.prototype.removeTabAt=function(t){this._releaseMouse();var e=n.removeAt(this._titles,t);e&&(e.changed.disconnect(this._onTitleChanged,this),e===this._previousTitle&&(this._previousTitle=null),this.update(),this._adjustCurrentForRemove(t,e))},e.prototype.clearTabs=function(){if(0!==this._titles.length){this._releaseMouse();for(var t=0,e=this._titles;t<e.length;t++){e[t].changed.disconnect(this._onTitleChanged,this)}var n=this.currentIndex,i=this.currentTitle;this._currentIndex=-1,this._previousTitle=null,this._titles.length=0,this.update(),-1!==n&&this._currentChanged.emit({previousIndex:n,previousTitle:i,currentIndex:-1,currentTitle:null})}},e.prototype.releaseMouse=function(){this._releaseMouse()},e.prototype.handleEvent=function(t){switch(t.type){case"mousedown":case"pointerdown":this._evtMouseDown(t);break;case"mousemove":case"pointermove":this._evtMouseMove(t);break;case"mouseup":case"pointerup":this._evtMouseUp(t);break;case"dblclick":this._evtDblClick(t);break;case"keydown":this._evtKeyDown(t);break;case"contextmenu":t.preventDefault(),t.stopPropagation()}},e.prototype.onBeforeAttach=function(t){this.node.addEventListener("mousedown",this),this.node.addEventListener("pointerdown",this),this.node.addEventListener("dblclick",this)},e.prototype.onAfterDetach=function(t){this.node.removeEventListener("mousedown",this),this.node.removeEventListener("pointerdown",this),this.node.removeEventListener("dblclick",this),this._releaseMouse()},e.prototype.onUpdateRequest=function(t){for(var e=this._titles,n=this.renderer,i=this.currentTitle,o=new Array(e.length),r=0,s=e.length;r<s;++r){var a=e[r],d=a===i,c=d?s:s-r-1;o[r]=n.renderTab({title:a,current:d,zIndex:c})}nt.render(o,this.contentNode)},e.prototype._evtDblClick=function(t){if(this.titlesEditable){var e=this.contentNode.children,i=n.findFirstIndex(e,function(e){return B.hitTest(e,t.clientX,t.clientY)});if(-1!==i){var o=this.titles[i],r=e[i].querySelector(".lm-TabBar-tabLabel");if(r&&r.contains(t.target)){var s=o.label||"",a=r.innerHTML;r.innerHTML="";var d=document.createElement("input");d.classList.add("lm-TabBar-tabInput"),d.value=s,r.appendChild(d);var c=function(){d.removeEventListener("blur",c),r.innerHTML=a};d.addEventListener("dblclick",function(t){return t.stopPropagation()}),d.addEventListener("blur",c),d.addEventListener("keydown",function(t){"Enter"===t.key?(""!==d.value&&(o.label=o.caption=d.value),c()):"Escape"===t.key&&c()}),d.select(),d.focus(),r.children.length>0&&r.children[0].focus()}}}},e.prototype._evtKeyDown=function(t){t.preventDefault(),t.stopPropagation(),27===t.keyCode&&this._releaseMouse()},e.prototype._evtMouseDown=function(t){if((0===t.button||1===t.button)&&!this._dragData){var e=this.addButtonEnabled&&this.addButtonNode.contains(t.target),i=this.contentNode.children,o=n.findFirstIndex(i,function(e){return B.hitTest(e,t.clientX,t.clientY)});if((-1!==o||e)&&(t.preventDefault(),t.stopPropagation(),this._dragData={tab:i[o],index:o,pressX:t.clientX,pressY:t.clientY,tabPos:-1,tabSize:-1,tabPressPos:-1,targetIndex:-1,tabLayout:null,contentRect:null,override:null,dragActive:!1,dragAborted:!1,detachRequested:!1},this.document.addEventListener("mouseup",this,!0),this.document.addEventListener("pointerup",this,!0),1!==t.button&&!e)){var r=i[o].querySelector(this.renderer.closeIconSelector);r&&r.contains(t.target)||(this.tabsMovable&&(this.document.addEventListener("mousemove",this,!0),this.document.addEventListener("pointermove",this,!0),this.document.addEventListener("keydown",this,!0),this.document.addEventListener("contextmenu",this,!0)),this.allowDeselect&&this.currentIndex===o?this.currentIndex=-1:this.currentIndex=o,-1!==this.currentIndex&&this._tabActivateRequested.emit({index:this.currentIndex,title:this.currentTitle}))}}},e.prototype._evtMouseMove=function(t){var e=this._dragData;if(e){t.preventDefault(),t.stopPropagation();var n=this.contentNode.children;if(e.dragActive||Ft.dragExceeded(e,t)){if(!e.dragActive){var i=e.tab.getBoundingClientRect();"horizontal"===this._orientation?(e.tabPos=e.tab.offsetLeft,e.tabSize=i.width,e.tabPressPos=e.pressX-i.left):(e.tabPos=e.tab.offsetTop,e.tabSize=i.height,e.tabPressPos=e.pressY-i.top),e.tabLayout=Ft.snapTabLayout(n,this._orientation),e.contentRect=this.contentNode.getBoundingClientRect(),e.override=tt.overrideCursor("default"),e.tab.classList.add("lm-mod-dragging"),this.addClass("lm-mod-dragging"),e.tab.classList.add("p-mod-dragging"),this.addClass("p-mod-dragging"),e.dragActive=!0}if(!e.detachRequested&&Ft.detachExceeded(e,t)){e.detachRequested=!0;var o=e.index,r=t.clientX,s=t.clientY,a=n[o],d=this._titles[o];if(this._tabDetachRequested.emit({index:o,title:d,tab:a,clientX:r,clientY:s}),e.dragAborted)return}Ft.layoutTabs(n,e,t,this._orientation)}}},e.prototype._evtMouseUp=function(t){var e=this;if(0===t.button||1===t.button){var i=this._dragData;if(i){if(t.preventDefault(),t.stopPropagation(),this.document.removeEventListener("mousemove",this,!0),this.document.removeEventListener("mouseup",this,!0),this.document.removeEventListener("pointermove",this,!0),this.document.removeEventListener("pointerup",this,!0),this.document.removeEventListener("keydown",this,!0),this.document.removeEventListener("contextmenu",this,!0),!i.dragActive){if(this._dragData=null,this.addButtonEnabled&&this.addButtonNode.contains(t.target))return void this._addRequested.emit(void 0);var o=this.contentNode.children,r=n.findFirstIndex(o,function(e){return B.hitTest(e,t.clientX,t.clientY)});if(r!==i.index)return;var s=this._titles[r];if(!s.closable)return;if(1===t.button)return void this._tabCloseRequested.emit({index:r,title:s});var a=o[r].querySelector(this.renderer.closeIconSelector);return a&&a.contains(t.target)?void this._tabCloseRequested.emit({index:r,title:s}):void 0}if(0===t.button){Ft.finalizeTabPosition(i,this._orientation),i.tab.classList.remove("lm-mod-dragging"),i.tab.classList.remove("p-mod-dragging");var d=Ft.parseTransitionDuration(i.tab);setTimeout(function(){if(!i.dragAborted){e._dragData=null,Ft.resetTabPositions(e.contentNode.children,e._orientation),i.override.dispose(),e.removeClass("lm-mod-dragging"),e.removeClass("p-mod-dragging");var t=i.index,o=i.targetIndex;-1!==o&&t!==o&&(n.move(e._titles,t,o),e._adjustCurrentForMove(t,o),e._tabMoved.emit({fromIndex:t,toIndex:o,title:e._titles[o]}),Z.sendMessage(e,ft.Msg.UpdateRequest))}},d)}}}},e.prototype._releaseMouse=function(){var t=this._dragData;t&&(this._dragData=null,this.document.removeEventListener("mousemove",this,!0),this.document.removeEventListener("mouseup",this,!0),this.document.removeEventListener("pointermove",this,!0),this.document.removeEventListener("pointerup",this,!0),this.document.removeEventListener("keydown",this,!0),this.document.removeEventListener("contextmenu",this,!0),t.dragAborted=!0,t.dragActive&&(Ft.resetTabPositions(this.contentNode.children,this._orientation),t.override.dispose(),t.tab.classList.remove("lm-mod-dragging"),this.removeClass("lm-mod-dragging"),t.tab.classList.remove("p-mod-dragging"),this.removeClass("p-mod-dragging")))},e.prototype._adjustCurrentForInsert=function(t,e){var n=this.currentTitle,i=this._currentIndex,o=this.insertBehavior;if("select-tab"===o||"select-tab-if-needed"===o&&-1===i)return this._currentIndex=t,this._previousTitle=n,void this._currentChanged.emit({previousIndex:i,previousTitle:n,currentIndex:t,currentTitle:e});i>=t&&this._currentIndex++},e.prototype._adjustCurrentForMove=function(t,e){this._currentIndex===t?this._currentIndex=e:this._currentIndex<t&&this._currentIndex>=e?this._currentIndex++:this._currentIndex>t&&this._currentIndex<=e&&this._currentIndex--},e.prototype._adjustCurrentForRemove=function(t,e){var n=this._currentIndex,i=this.removeBehavior;if(n===t){if(0===this._titles.length)return this._currentIndex=-1,void this._currentChanged.emit({previousIndex:t,previousTitle:e,currentIndex:-1,currentTitle:null});if("select-tab-after"===i)return this._currentIndex=Math.min(t,this._titles.length-1),void this._currentChanged.emit({previousIndex:t,previousTitle:e,currentIndex:this._currentIndex,currentTitle:this.currentTitle});if("select-tab-before"===i)return this._currentIndex=Math.max(0,t-1),void this._currentChanged.emit({previousIndex:t,previousTitle:e,currentIndex:this._currentIndex,currentTitle:this.currentTitle});if("select-previous-tab"===i)return this._previousTitle?(this._currentIndex=this._titles.indexOf(this._previousTitle),this._previousTitle=null):this._currentIndex=Math.min(t,this._titles.length-1),void this._currentChanged.emit({previousIndex:t,previousTitle:e,currentIndex:this._currentIndex,currentTitle:this.currentTitle});this._currentIndex=-1,this._currentChanged.emit({previousIndex:t,previousTitle:e,currentIndex:-1,currentTitle:null})}else n>t&&this._currentIndex--},e.prototype._onTitleChanged=function(t){this.update()},e}(ft);!function(t){var e=function(){function t(){this.closeIconSelector=".lm-TabBar-tabCloseIcon",this._tabID=0,this._tabKeys=new WeakMap,this._uuid=++t._nInstance}return t.prototype.renderTab=function(t){var e=t.title.caption,n=this.createTabKey(t),i=n,o=this.createTabStyle(t),r=this.createTabClass(t),s=this.createTabDataset(t),a=this.createTabARIA(t);return t.title.closable?st.li(ct({id:i,key:n,className:r,title:e,style:o,dataset:s},a),this.renderIcon(t),this.renderLabel(t),this.renderCloseIcon(t)):st.li(ct({id:i,key:n,className:r,title:e,style:o,dataset:s},a),this.renderIcon(t),this.renderLabel(t))},t.prototype.renderIcon=function(t){var e=t.title,n=this.createIconClass(t);return"string"==typeof e.icon?st.div({className:n},e.iconLabel):st.div({className:n},e.icon,e.iconLabel)},t.prototype.renderLabel=function(t){return st.div({className:"lm-TabBar-tabLabel p-TabBar-tabLabel"},t.title.label)},t.prototype.renderCloseIcon=function(t){return st.div({className:"lm-TabBar-tabCloseIcon p-TabBar-tabCloseIcon"})},t.prototype.createTabKey=function(t){var e=this._tabKeys.get(t.title);return void 0===e&&(e="tab-key-"+this._uuid+"-"+this._tabID++,this._tabKeys.set(t.title,e)),e},t.prototype.createTabStyle=function(t){return{zIndex:""+t.zIndex}},t.prototype.createTabClass=function(t){var e="lm-TabBar-tab";return e+=" p-TabBar-tab",t.title.className&&(e+=" "+t.title.className),t.title.closable&&(e+=" lm-mod-closable",e+=" p-mod-closable"),t.current&&(e+=" lm-mod-current",e+=" p-mod-current"),e},t.prototype.createTabDataset=function(t){return t.title.dataset},t.prototype.createTabARIA=function(t){return{role:"tab","aria-selected":t.current.toString()}},t.prototype.createIconClass=function(t){var e="lm-TabBar-tabIcon";e+=" p-TabBar-tabIcon";var n=t.title.iconClass;return n?e+" "+n:e},t._nInstance=0,t}();t.Renderer=e,t.defaultRenderer=new e,t.addButtonSelector=".lm-TabBar-addButton"}(qt||(qt={})),function(t){t.DRAG_THRESHOLD=5,t.DETACH_THRESHOLD=20,t.createNode=function(){var t=document.createElement("div"),e=document.createElement("ul");e.setAttribute("role","tablist"),e.className="lm-TabBar-content",e.classList.add("p-TabBar-content"),t.appendChild(e);var n=document.createElement("div");return n.className="lm-TabBar-addButton lm-mod-hidden",t.appendChild(n),t},t.asTitle=function(t){return t instanceof pt?t:new pt(t)},t.parseTransitionDuration=function(t){var e=window.getComputedStyle(t);return 1e3*(parseFloat(e.transitionDuration)||0)},t.snapTabLayout=function(t,e){for(var n=new Array(t.length),i=0,o=t.length;i<o;++i){var r=t[i],s=window.getComputedStyle(r);n[i]="horizontal"===e?{pos:r.offsetLeft,size:r.offsetWidth,margin:parseFloat(s.marginLeft)||0}:{pos:r.offsetTop,size:r.offsetHeight,margin:parseFloat(s.marginTop)||0}}return n},t.dragExceeded=function(e,n){var i=Math.abs(n.clientX-e.pressX),o=Math.abs(n.clientY-e.pressY);return i>=t.DRAG_THRESHOLD||o>=t.DRAG_THRESHOLD},t.detachExceeded=function(e,n){var i=e.contentRect;return n.clientX<i.left-t.DETACH_THRESHOLD||n.clientX>=i.right+t.DETACH_THRESHOLD||n.clientY<i.top-t.DETACH_THRESHOLD||n.clientY>=i.bottom+t.DETACH_THRESHOLD},t.layoutTabs=function(t,e,n,i){var o,r,s,a;"horizontal"===i?(o=e.pressX,r=n.clientX-e.contentRect.left,s=n.clientX,a=e.contentRect.width):(o=e.pressY,r=n.clientY-e.contentRect.top,s=n.clientY,a=e.contentRect.height);for(var d=e.index,c=r-e.tabPressPos,h=c+e.tabSize,l=0,u=t.length;l<u;++l){var p=void 0,f=e.tabLayout[l],m=f.pos+(f.size>>1);if(l<e.index&&c<m)p=e.tabSize+e.tabLayout[l+1].margin+"px",d=Math.min(d,l);else if(l>e.index&&h>m)p=-e.tabSize-f.margin+"px",d=Math.max(d,l);else if(l===e.index){var g=s-o,v=a-(e.tabPos+e.tabSize);p=Math.max(-e.tabPos,Math.min(g,v))+"px"}else p="";"horizontal"===i?t[l].style.left=p:t[l].style.top=p}e.targetIndex=d},t.finalizeTabPosition=function(t,e){var n,i;if(n="horizontal"===e?t.contentRect.width:t.contentRect.height,t.targetIndex===t.index)i=0;else if(t.targetIndex>t.index){i=(o=t.tabLayout[t.targetIndex]).pos+o.size-t.tabSize-t.tabPos}else{var o;i=(o=t.tabLayout[t.targetIndex]).pos-t.tabPos}var r=n-(t.tabPos+t.tabSize),s=Math.max(-t.tabPos,Math.min(i,r));"horizontal"===e?t.tab.style.left=s+"px":t.tab.style.top=s+"px"},t.resetTabPositions=function(t,e){o(t,function(t){"horizontal"===e?t.style.left="":t.style.top=""})}}(Ft||(Ft={}));var Kt,Vt=function(t){function e(e){var n=t.call(this)||this;return n._spacing=4,n._dirty=!1,n._root=null,n._box=null,n._items=new Map,n.renderer=e.renderer,void 0!==e.spacing&&(n._spacing=wt.clampDimension(e.spacing)),n._document=e.document||document,n._hiddenMode=void 0!==e.hiddenMode?e.hiddenMode:ft.HiddenMode.Display,n}return dt(e,t),e.prototype.dispose=function(){var e=this.iter();this._items.forEach(function(t){t.dispose()}),this._box=null,this._root=null,this._items.clear(),o(e,function(t){t.dispose()}),t.prototype.dispose.call(this)},Object.defineProperty(e.prototype,"hiddenMode",{get:function(){return this._hiddenMode},set:function(t){var e=this;this._hiddenMode!==t&&(this._hiddenMode=t,o(this.tabBars(),function(t){t.titles.length>1&&t.titles.forEach(function(t){t.owner.hiddenMode=e._hiddenMode})}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"spacing",{get:function(){return this._spacing},set:function(t){t=wt.clampDimension(t),this._spacing!==t&&(this._spacing=t,this.parent&&this.parent.fit())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isEmpty",{get:function(){return null===this._root},enumerable:!0,configurable:!0}),e.prototype.iter=function(){return this._root?this._root.iterAllWidgets():d()},e.prototype.widgets=function(){return this._root?this._root.iterUserWidgets():d()},e.prototype.selectedWidgets=function(){return this._root?this._root.iterSelectedWidgets():d()},e.prototype.tabBars=function(){return this._root?this._root.iterTabBars():d()},e.prototype.handles=function(){return this._root?this._root.iterHandles():d()},e.prototype.moveHandle=function(t,e,n){var i=t.classList.contains("lm-mod-hidden");if(i=i||t.classList.contains("p-mod-hidden"),this._root&&!i){var o,r=this._root.findSplitNode(t);if(r)0!==(o="horizontal"===r.node.orientation?e-t.offsetLeft:n-t.offsetTop)&&(r.node.holdSizes(),ht.adjust(r.node.sizers,r.index,o),this.parent&&this.parent.update())}},e.prototype.saveLayout=function(){return this._root?(this._root.holdAllSizes(),{main:this._root.createConfig()}):{main:null}},e.prototype.restoreLayout=function(t){var e,n=this,i=new Set;e=t.main?Kt.normalizeAreaConfig(t.main,i):null;var r=this.widgets(),s=this.tabBars(),a=this.handles();this._root=null,o(r,function(t){i.has(t)||(t.parent=null)}),o(s,function(t){t.dispose()}),o(a,function(t){t.parentNode&&t.parentNode.removeChild(t)}),i.forEach(function(t){t.parent=n.parent}),this._root=e?Kt.realizeAreaConfig(e,{createTabBar:function(t){return n._createTabBar()},createHandle:function(){return n._createHandle()}},this._document):null,this.parent&&(i.forEach(function(t){n.attachWidget(t)}),this.parent.fit())},e.prototype.addWidget=function(t,e){void 0===e&&(e={});var n=e.ref||null,i=e.mode||"tab-after",o=null;if(this._root&&n&&(o=this._root.findTabNode(n)),n&&!o)throw new Error("Reference widget is not in the layout.");switch(t.parent=this.parent,i){case"tab-after":this._insertTab(t,n,o,!0);break;case"tab-before":this._insertTab(t,n,o,!1);break;case"split-top":this._insertSplit(t,n,o,"vertical",!1);break;case"split-left":this._insertSplit(t,n,o,"horizontal",!1);break;case"split-right":this._insertSplit(t,n,o,"horizontal",!0);break;case"split-bottom":this._insertSplit(t,n,o,"vertical",!0)}this.parent&&(this.attachWidget(t),this.parent.fit())},e.prototype.removeWidget=function(t){this._removeWidget(t),this.parent&&(this.detachWidget(t),this.parent.fit())},e.prototype.hitTestTabAreas=function(t,e){if(!this._root||!this.parent||!this.parent.isVisible)return null;this._box||(this._box=B.boxSizing(this.parent.node));var n=this.parent.node.getBoundingClientRect(),i=t-n.left-this._box.borderLeft,o=e-n.top-this._box.borderTop,r=this._root.hitTestTabNodes(i,o);if(!r)return null;var s=r.tabBar,a=r.top,d=r.left,c=r.width,h=r.height,l=this._box.borderLeft+this._box.borderRight,u=this._box.borderTop+this._box.borderBottom;return{tabBar:s,x:i,y:o,top:a,left:d,right:n.width-l-(d+c),bottom:n.height-u-(a+h),width:c,height:h}},e.prototype.init=function(){var e=this;t.prototype.init.call(this),o(this,function(t){e.attachWidget(t)}),o(this.handles(),function(t){e.parent.node.appendChild(t)}),this.parent.fit()},e.prototype.attachWidget=function(t){this.parent.node!==t.node.parentNode&&(this._items.set(t,new vt(t)),this.parent.isAttached&&Z.sendMessage(t,ft.Msg.BeforeAttach),this.parent.node.appendChild(t.node),this.parent.isAttached&&Z.sendMessage(t,ft.Msg.AfterAttach))},e.prototype.detachWidget=function(t){if(this.parent.node===t.node.parentNode){this.parent.isAttached&&Z.sendMessage(t,ft.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.isAttached&&Z.sendMessage(t,ft.Msg.AfterDetach);var e=this._items.get(t);e&&(this._items.delete(t),e.dispose())}},e.prototype.onBeforeShow=function(e){t.prototype.onBeforeShow.call(this,e),this.parent.update()},e.prototype.onBeforeAttach=function(e){t.prototype.onBeforeAttach.call(this,e),this.parent.fit()},e.prototype.onChildShown=function(t){this.parent.fit()},e.prototype.onChildHidden=function(t){this.parent.fit()},e.prototype.onResize=function(t){this.parent.isVisible&&this._update(t.width,t.height)},e.prototype.onUpdateRequest=function(t){this.parent.isVisible&&this._update(-1,-1)},e.prototype.onFitRequest=function(t){this.parent.isAttached&&this._fit()},e.prototype._removeWidget=function(t){if(this._root){var e=this._root.findTabNode(t);if(e)if(Kt.removeAria(t),e.tabBar.titles.length>1)e.tabBar.removeTab(t.title),this._hiddenMode===ft.HiddenMode.Scale&&1==e.tabBar.titles.length&&(e.tabBar.titles[0].owner.hiddenMode=ft.HiddenMode.Display);else if(e.tabBar.dispose(),this._root!==e){this._root.holdAllSizes();var i=e.parent;e.parent=null;var o=n.removeFirstOf(i.children,e),r=n.removeAt(i.handles,o);if(n.removeAt(i.sizers,o),r.parentNode&&r.parentNode.removeChild(r),i.children.length>1)i.syncHandles();else{var s=i.parent;i.parent=null;var a=i.children[0],d=i.handles[0];if(i.children.length=0,i.handles.length=0,i.sizers.length=0,d.parentNode&&d.parentNode.removeChild(d),this._root===i)return a.parent=null,void(this._root=a);var c=s,h=c.children.indexOf(i);if(a instanceof Kt.TabLayoutNode)return a.parent=c,void(c.children[h]=a);var l=n.removeAt(c.handles,h);n.removeAt(c.children,h),n.removeAt(c.sizers,h),l.parentNode&&l.parentNode.removeChild(l);for(var u=0,p=a.children.length;u<p;++u){var f=a.children[u],m=a.handles[u],g=a.sizers[u];n.insert(c.children,h+u,f),n.insert(c.handles,h+u,m),n.insert(c.sizers,h+u,g),f.parent=c}a.children.length=0,a.handles.length=0,a.sizers.length=0,a.parent=null,c.syncHandles()}}else this._root=null}},e.prototype._insertTab=function(t,e,n,i){if(t!==e){if(!this._root){var o=new Kt.TabLayoutNode(this._createTabBar());return o.tabBar.addTab(t.title),this._root=o,void Kt.addAria(t,o.tabBar)}var r;if(n||(n=this._root.findFirstTabNode()),-1===n.tabBar.titles.indexOf(t.title)&&(this._removeWidget(t),t.hide()),r=e?n.tabBar.titles.indexOf(e.title):n.tabBar.currentIndex,this._hiddenMode===ft.HiddenMode.Scale)if(0===n.tabBar.titles.length)t.hiddenMode=ft.HiddenMode.Display;else if(1==n.tabBar.titles.length){n.tabBar.titles[0].owner.hiddenMode=ft.HiddenMode.Scale}else t.hiddenMode=ft.HiddenMode.Scale;else t.hiddenMode=this._hiddenMode;n.tabBar.insertTab(r+(i?1:0),t.title),Kt.addAria(t,n.tabBar)}},e.prototype._insertSplit=function(t,e,i,o,r){if(t!==e||!i||1!==i.tabBar.titles.length){this._removeWidget(t);var s=new Kt.TabLayoutNode(this._createTabBar());if(s.tabBar.addTab(t.title),Kt.addAria(t,s.tabBar),this._root){if(!i||!i.parent){var a=this._splitRoot(o),d=r?a.children.length:0;a.normalizeSizes();var c=Kt.createSizer(i?1:Kt.GOLDEN_RATIO);return n.insert(a.children,d,s),n.insert(a.sizers,d,c),n.insert(a.handles,d,this._createHandle()),s.parent=a,a.normalizeSizes(),void a.syncHandles()}var h=i.parent;if(h.orientation===o){var l=h.children.indexOf(i);h.normalizeSizes();var u=h.sizers[l].sizeHint/=2,p=l+(r?1:0);return n.insert(h.children,p,s),n.insert(h.sizers,p,Kt.createSizer(u)),n.insert(h.handles,p,this._createHandle()),s.parent=h,void h.syncHandles()}var f=n.removeFirstOf(h.children,i),m=new Kt.SplitLayoutNode(o);m.normalized=!0,m.children.push(i),m.sizers.push(Kt.createSizer(.5)),m.handles.push(this._createHandle()),i.parent=m;var g=r?1:0;n.insert(m.children,g,s),n.insert(m.sizers,g,Kt.createSizer(.5)),n.insert(m.handles,g,this._createHandle()),s.parent=m,m.syncHandles(),n.insert(h.children,f,m),m.parent=h}else this._root=s}},e.prototype._splitRoot=function(t){var e=this._root;if(e instanceof Kt.SplitLayoutNode&&e.orientation===t)return e;var n=this._root=new Kt.SplitLayoutNode(t);return e&&(n.children.push(e),n.sizers.push(Kt.createSizer(0)),n.handles.push(this._createHandle()),e.parent=n),n},e.prototype._fit=function(){var t=0,e=0;if(this._root){var n=this._root.fit(this._spacing,this._items);t=n.minWidth,e=n.minHeight}var i=this._box=B.boxSizing(this.parent.node);t+=i.horizontalSum,e+=i.verticalSum;var o=this.parent.node.style;o.minWidth=t+"px",o.minHeight=e+"px",this._dirty=!0,this.parent.parent&&Z.sendMessage(this.parent.parent,ft.Msg.FitRequest),this._dirty&&Z.sendMessage(this.parent,ft.Msg.UpdateRequest)},e.prototype._update=function(t,e){if(this._dirty=!1,this._root){t<0&&(t=this.parent.node.offsetWidth),e<0&&(e=this.parent.node.offsetHeight),this._box||(this._box=B.boxSizing(this.parent.node));var n=this._box.paddingTop,i=this._box.paddingLeft,o=t-this._box.horizontalSum,r=e-this._box.verticalSum;this._root.update(n,i,o,r,this._spacing,this._items)}},e.prototype._createTabBar=function(){var t=this.renderer.createTabBar(this._document);return t.orientation="horizontal",this.parent&&(t.parent=this.parent,this.attachWidget(t)),t},e.prototype._createHandle=function(){var t=this.renderer.createHandle(),e=t.style;return e.position="absolute",e.top="0",e.left="0",e.width="0",e.height="0",this.parent&&this.parent.node.appendChild(t),t},e}(mt);!function(t){function e(t){var e=new lt;return e.sizeHint=t,e.size=t,e}function n(t,e){var i;return i="tab-area"===t.type?function(t,e){if(0===t.widgets.length)return null;var n=[];if(o(t.widgets,function(t){e.has(t)||(e.add(t),n.push(t))}),0===n.length)return null;var i=t.currentIndex;-1!==i&&(i<0||i>=n.length)&&(i=0);return{type:"tab-area",widgets:n,currentIndex:i}}(t,e):function(t,e){for(var i=t.orientation,o=[],r=[],s=0,a=t.children.length;s<a;++s){var d=n(t.children[s],e);d&&("tab-area"===d.type||d.orientation!==i?(o.push(d),r.push(Math.abs(t.sizes[s]||0))):(o.push.apply(o,d.children),r.push.apply(r,d.sizes)))}if(0===o.length)return null;if(1===o.length)return o[0];return{type:"split-area",orientation:i,children:o,sizes:r}}(t,e),i}function i(n,s,a){var d;return d="tab-area"===n.type?function(e,n,i){var s=n.createTabBar(i);return o(e.widgets,function(e){e.hide(),s.addTab(e.title),t.addAria(e,s)}),s.currentIndex=e.currentIndex,new r(s)}(n,s,a):function(t,n,r){var s=new c(t.orientation);return o(t.children,function(o,a){var d=i(o,n,r),c=e(t.sizes[a]),h=n.createHandle();s.children.push(d),s.handles.push(h),s.sizers.push(c),d.parent=s}),s.syncHandles(),s.normalizeSizes(),s}(n,s,a),d}t.GOLDEN_RATIO=.618,t.createSizer=e,t.normalizeAreaConfig=n,t.realizeAreaConfig=i;var r=function(){function t(t){this.parent=null,this._top=0,this._left=0,this._width=0,this._height=0;var e=new lt,n=new lt;e.stretch=0,n.stretch=1,this.tabBar=t,this.sizers=[e,n]}return Object.defineProperty(t.prototype,"top",{get:function(){return this._top},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){return this._left},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),t.prototype.iterAllWidgets=function(){return s(g(this.tabBar),this.iterUserWidgets())},t.prototype.iterUserWidgets=function(){return u(this.tabBar.titles,function(t){return t.owner})},t.prototype.iterSelectedWidgets=function(){var t=this.tabBar.currentTitle;return t?g(t.owner):d()},t.prototype.iterTabBars=function(){return g(this.tabBar)},t.prototype.iterHandles=function(){return d()},t.prototype.findTabNode=function(t){return-1!==this.tabBar.titles.indexOf(t.title)?this:null},t.prototype.findSplitNode=function(t){return null},t.prototype.findFirstTabNode=function(){return this},t.prototype.hitTestTabNodes=function(t,e){return t<this._left||t>=this._left+this._width||e<this._top||e>=this._top+this._height?null:this},t.prototype.createConfig=function(){return{type:"tab-area",widgets:this.tabBar.titles.map(function(t){return t.owner}),currentIndex:this.tabBar.currentIndex}},t.prototype.holdAllSizes=function(){},t.prototype.fit=function(t,e){var n=0,i=0,o=1/0,r=1/0,s=e.get(this.tabBar),a=this.tabBar.currentTitle,d=a?e.get(a.owner):void 0,c=this.sizers,h=c[0],l=c[1];return s&&s.fit(),d&&d.fit(),s&&!s.isHidden?(n=Math.max(n,s.minWidth),i+=s.minHeight,h.minSize=s.minHeight,h.maxSize=s.maxHeight):(h.minSize=0,h.maxSize=0),d&&!d.isHidden?(n=Math.max(n,d.minWidth),i+=d.minHeight,l.minSize=d.minHeight,l.maxSize=1/0):(l.minSize=0,l.maxSize=1/0),{minWidth:n,minHeight:i,maxWidth:o,maxHeight:r}},t.prototype.update=function(t,e,n,i,o,r){this._top=e,this._left=t,this._width=n,this._height=i;var s=r.get(this.tabBar),a=this.tabBar.currentTitle,d=a?r.get(a.owner):void 0;if(ht.calc(this.sizers,i),s&&!s.isHidden){var c=this.sizers[0].size;s.update(t,e,n,c),e+=c}if(d&&!d.isHidden){c=this.sizers[1].size;d.update(t,e,n,c)}},t}();t.TabLayoutNode=r;var c=function(){function t(t){this.parent=null,this.normalized=!1,this.children=[],this.sizers=[],this.handles=[],this.orientation=t}return t.prototype.iterAllWidgets=function(){var t=u(this.children,function(t){return t.iterAllWidgets()});return new a(t)},t.prototype.iterUserWidgets=function(){var t=u(this.children,function(t){return t.iterUserWidgets()});return new a(t)},t.prototype.iterSelectedWidgets=function(){var t=u(this.children,function(t){return t.iterSelectedWidgets()});return new a(t)},t.prototype.iterTabBars=function(){var t=u(this.children,function(t){return t.iterTabBars()});return new a(t)},t.prototype.iterHandles=function(){var t=u(this.children,function(t){return t.iterHandles()});return s(this.handles,new a(t))},t.prototype.findTabNode=function(t){for(var e=0,n=this.children.length;e<n;++e){var i=this.children[e].findTabNode(t);if(i)return i}return null},t.prototype.findSplitNode=function(t){var e=this.handles.indexOf(t);if(-1!==e)return{index:e,node:this};for(var n=0,i=this.children.length;n<i;++n){var o=this.children[n].findSplitNode(t);if(o)return o}return null},t.prototype.findFirstTabNode=function(){return 0===this.children.length?null:this.children[0].findFirstTabNode()},t.prototype.hitTestTabNodes=function(t,e){for(var n=0,i=this.children.length;n<i;++n){var o=this.children[n].hitTestTabNodes(t,e);if(o)return o}return null},t.prototype.createConfig=function(){var t=this.orientation,e=this.createNormalizedSizes();return{type:"split-area",orientation:t,children:this.children.map(function(t){return t.createConfig()}),sizes:e}},t.prototype.syncHandles=function(){var t=this;o(this.handles,function(e,n){e.setAttribute("data-orientation",t.orientation),n===t.handles.length-1?(e.classList.add("lm-mod-hidden"),e.classList.add("p-mod-hidden")):(e.classList.remove("lm-mod-hidden"),e.classList.remove("p-mod-hidden"))})},t.prototype.holdSizes=function(){o(this.sizers,function(t){t.sizeHint=t.size})},t.prototype.holdAllSizes=function(){o(this.children,function(t){return t.holdAllSizes()}),this.holdSizes()},t.prototype.normalizeSizes=function(){var t=this.sizers.length;if(0!==t){this.holdSizes();var e=m(this.sizers,function(t,e){return t+e.sizeHint},0);o(this.sizers,0===e?function(e){e.size=e.sizeHint=1/t}:function(t){t.size=t.sizeHint/=e}),this.normalized=!0}},t.prototype.createNormalizedSizes=function(){var t=this.sizers.length;if(0===t)return[];var e=this.sizers.map(function(t){return t.size}),n=m(e,function(t,e){return t+e},0);return o(e,0===n?function(n,i){e[i]=1/t}:function(t,i){e[i]=t/n}),e},t.prototype.fit=function(t,e){for(var n="horizontal"===this.orientation,i=Math.max(0,this.children.length-1)*t,o=n?i:0,r=n?0:i,s=1/0,a=1/0,d=0,c=this.children.length;d<c;++d){var h=this.children[d].fit(t,e);n?(r=Math.max(r,h.minHeight),o+=h.minWidth,this.sizers[d].minSize=h.minWidth):(o=Math.max(o,h.minWidth),r+=h.minHeight,this.sizers[d].minSize=h.minHeight)}return{minWidth:o,minHeight:r,maxWidth:s,maxHeight:a}},t.prototype.update=function(t,e,n,i,r,s){var a="horizontal"===this.orientation,d=Math.max(0,this.children.length-1)*r,c=Math.max(0,(a?n:i)-d);this.normalized&&(o(this.sizers,function(t){t.sizeHint*=c}),this.normalized=!1),ht.calc(this.sizers,c);for(var h=0,l=this.children.length;h<l;++h){var u=this.children[h],p=this.sizers[h].size,f=this.handles[h].style;a?(u.update(t,e,p,i,r,s),t+=p,f.top=e+"px",f.left=t+"px",f.width=r+"px",f.height=i+"px",t+=r):(u.update(t,e,n,p,r,s),e+=p,f.top=e+"px",f.left=t+"px",f.width=n+"px",f.height=r+"px",e+=r)}},t}();t.SplitLayoutNode=c,t.addAria=function(t,e){t.node.setAttribute("role","tabpanel");var n=e.renderer;if(n instanceof qt.Renderer){var i=n.createTabKey({title:t.title,current:!1,zIndex:0});t.node.setAttribute("aria-labelledby",i)}},t.removeAria=function(t){t.node.removeAttribute("role"),t.node.removeAttribute("aria-labelledby")}}(Kt||(Kt={}));var Ut,Yt=function(t){function e(n){void 0===n&&(n={});var i=t.call(this)||this;i._drag=null,i._tabsMovable=!0,i._tabsConstrained=!1,i._addButtonEnabled=!1,i._pressData=null,i._layoutModified=new A(i),i._addRequested=new A(i),i.addClass("lm-DockPanel"),i.addClass("p-DockPanel"),i._document=n.document||document,i._mode=n.mode||"multiple-document",i._renderer=n.renderer||e.defaultRenderer,i._edges=n.edges||Ut.DEFAULT_EDGES,void 0!==n.tabsMovable&&(i._tabsMovable=n.tabsMovable),void 0!==n.tabsConstrained&&(i._tabsConstrained=n.tabsConstrained),void 0!==n.addButtonEnabled&&(i._addButtonEnabled=n.addButtonEnabled),i.dataset.mode=i._mode;var o={createTabBar:function(){return i._createTabBar()},createHandle:function(){return i._createHandle()}};return i.layout=new Vt({document:i._document,renderer:o,spacing:n.spacing,hiddenMode:n.hiddenMode}),i.overlay=n.overlay||new e.Overlay,i.node.appendChild(i.overlay.node),i}return dt(e,t),e.prototype.dispose=function(){this._releaseMouse(),this.overlay.hide(0),this._drag&&this._drag.dispose(),t.prototype.dispose.call(this)},Object.defineProperty(e.prototype,"hiddenMode",{get:function(){return this.layout.hiddenMode},set:function(t){this.layout.hiddenMode=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"layoutModified",{get:function(){return this._layoutModified},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"addRequested",{get:function(){return this._addRequested},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"renderer",{get:function(){return this.layout.renderer},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"spacing",{get:function(){return this.layout.spacing},set:function(t){this.layout.spacing=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mode",{get:function(){return this._mode},set:function(t){if(this._mode!==t){this._mode=t,this.dataset.mode=t;var e=this.layout;switch(t){case"multiple-document":o(e.tabBars(),function(t){t.show()});break;case"single-document":e.restoreLayout(Ut.createSingleDocumentConfig(this));break;default:throw"unreachable"}Z.postMessage(this,Ut.LayoutModified)}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tabsMovable",{get:function(){return this._tabsMovable},set:function(t){this._tabsMovable=t,o(this.tabBars(),function(e){e.tabsMovable=t})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tabsConstrained",{get:function(){return this._tabsConstrained},set:function(t){this._tabsConstrained=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"addButtonEnabled",{get:function(){return this._addButtonEnabled},set:function(t){this._addButtonEnabled=t,o(this.tabBars(),function(e){e.addButtonEnabled=t})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isEmpty",{get:function(){return this.layout.isEmpty},enumerable:!0,configurable:!0}),e.prototype.widgets=function(){return this.layout.widgets()},e.prototype.selectedWidgets=function(){return this.layout.selectedWidgets()},e.prototype.tabBars=function(){return this.layout.tabBars()},e.prototype.handles=function(){return this.layout.handles()},e.prototype.selectWidget=function(t){var e=l(this.tabBars(),function(e){return-1!==e.titles.indexOf(t.title)});if(!e)throw new Error("Widget is not contained in the dock panel.");e.currentTitle=t.title},e.prototype.activateWidget=function(t){this.selectWidget(t),t.activate()},e.prototype.saveLayout=function(){return this.layout.saveLayout()},e.prototype.restoreLayout=function(t){this._mode="multiple-document",this.layout.restoreLayout(t),(D.IS_EDGE||D.IS_IE)&&Z.flush(),Z.postMessage(this,Ut.LayoutModified)},e.prototype.addWidget=function(t,e){void 0===e&&(e={}),"single-document"===this._mode?this.layout.addWidget(t):this.layout.addWidget(t,e),Z.postMessage(this,Ut.LayoutModified)},e.prototype.processMessage=function(e){"layout-modified"===e.type?this._layoutModified.emit(void 0):t.prototype.processMessage.call(this,e)},e.prototype.handleEvent=function(t){switch(t.type){case"lm-dragenter":this._evtDragEnter(t);break;case"lm-dragleave":this._evtDragLeave(t);break;case"lm-dragover":this._evtDragOver(t);break;case"lm-drop":this._evtDrop(t);break;case"mousedown":case"pointerdown":this._evtMouseDown(t);break;case"mousemove":case"pointermove":this._evtMouseMove(t);break;case"mouseup":case"pointerup":this._evtMouseUp(t);break;case"keydown":this._evtKeyDown(t);break;case"contextmenu":t.preventDefault(),t.stopPropagation()}},e.prototype.onBeforeAttach=function(t){this.node.addEventListener("lm-dragenter",this),this.node.addEventListener("lm-dragleave",this),this.node.addEventListener("lm-dragover",this),this.node.addEventListener("lm-drop",this),this.node.addEventListener("mousedown",this),this.node.addEventListener("pointerdown",this)},e.prototype.onAfterDetach=function(t){this.node.removeEventListener("lm-dragenter",this),this.node.removeEventListener("lm-dragleave",this),this.node.removeEventListener("lm-dragover",this),this.node.removeEventListener("lm-drop",this),this.node.removeEventListener("mousedown",this),this.node.removeEventListener("pointerdown",this),this._releaseMouse()},e.prototype.onChildAdded=function(t){Ut.isGeneratedTabBarProperty.get(t.child)||(t.child.addClass("lm-DockPanel-widget"),t.child.addClass("p-DockPanel-widget"))},e.prototype.onChildRemoved=function(t){Ut.isGeneratedTabBarProperty.get(t.child)||(t.child.removeClass("lm-DockPanel-widget"),t.child.removeClass("p-DockPanel-widget"),Z.postMessage(this,Ut.LayoutModified))},e.prototype._evtDragEnter=function(t){t.mimeData.hasData("application/vnd.lumino.widget-factory")&&(t.preventDefault(),t.stopPropagation())},e.prototype._evtDragLeave=function(t){t.preventDefault(),this._tabsConstrained&&t.source!==this||(t.stopPropagation(),this.overlay.hide(1))},e.prototype._evtDragOver=function(t){t.preventDefault(),this._tabsConstrained&&t.source!==this||"invalid"===this._showOverlay(t.clientX,t.clientY)?t.dropAction="none":(t.stopPropagation(),t.dropAction=t.proposedAction)},e.prototype._evtDrop=function(t){if(t.preventDefault(),this.overlay.hide(0),"none"!==t.proposedAction){var e=t.clientX,n=t.clientY,i=Ut.findDropTarget(this,e,n,this._edges),o=i.zone,r=i.target;if(this._tabsConstrained&&t.source!==this||"invalid"===o)t.dropAction="none";else{var s=t.mimeData.getData("application/vnd.lumino.widget-factory");if("function"==typeof s){var a=s();if(a instanceof ft)if(a.contains(this))t.dropAction="none";else{var d=r?Ut.getDropRef(r.tabBar):null;switch(o){case"root-all":this.addWidget(a);break;case"root-top":this.addWidget(a,{mode:"split-top"});break;case"root-left":this.addWidget(a,{mode:"split-left"});break;case"root-right":this.addWidget(a,{mode:"split-right"});break;case"root-bottom":this.addWidget(a,{mode:"split-bottom"});break;case"widget-all":case"widget-tab":this.addWidget(a,{mode:"tab-after",ref:d});break;case"widget-top":this.addWidget(a,{mode:"split-top",ref:d});break;case"widget-left":this.addWidget(a,{mode:"split-left",ref:d});break;case"widget-right":this.addWidget(a,{mode:"split-right",ref:d});break;case"widget-bottom":this.addWidget(a,{mode:"split-bottom",ref:d});break;default:throw"unreachable"}t.dropAction=t.proposedAction,t.stopPropagation(),this.activateWidget(a)}else t.dropAction="none"}else t.dropAction="none"}}else t.dropAction="none"},e.prototype._evtKeyDown=function(t){t.preventDefault(),t.stopPropagation(),27===t.keyCode&&(this._releaseMouse(),Z.postMessage(this,Ut.LayoutModified))},e.prototype._evtMouseDown=function(t){if(0===t.button){var e=this.layout,n=t.target,i=l(e.handles(),function(t){return t.contains(n)});if(i){t.preventDefault(),t.stopPropagation(),this._document.addEventListener("keydown",this,!0),this._document.addEventListener("mouseup",this,!0),this._document.addEventListener("mousemove",this,!0),this._document.addEventListener("pointerup",this,!0),this._document.addEventListener("pointermove",this,!0),this._document.addEventListener("contextmenu",this,!0);var o=i.getBoundingClientRect(),r=t.clientX-o.left,s=t.clientY-o.top,a=window.getComputedStyle(i),d=tt.overrideCursor(a.cursor,this._document);this._pressData={handle:i,deltaX:r,deltaY:s,override:d}}}},e.prototype._evtMouseMove=function(t){if(this._pressData){t.preventDefault(),t.stopPropagation();var e=this.node.getBoundingClientRect(),n=t.clientX-e.left-this._pressData.deltaX,i=t.clientY-e.top-this._pressData.deltaY;this.layout.moveHandle(this._pressData.handle,n,i)}},e.prototype._evtMouseUp=function(t){0===t.button&&(t.preventDefault(),t.stopPropagation(),this._releaseMouse(),Z.postMessage(this,Ut.LayoutModified))},e.prototype._releaseMouse=function(){this._pressData&&(this._pressData.override.dispose(),this._pressData=null,this._document.removeEventListener("keydown",this,!0),this._document.removeEventListener("mouseup",this,!0),this._document.removeEventListener("mousemove",this,!0),this._document.removeEventListener("pointerup",this,!0),this._document.removeEventListener("pointermove",this,!0),this._document.removeEventListener("contextmenu",this,!0))},e.prototype._showOverlay=function(t,e){var n,i,o,r,s=Ut.findDropTarget(this,t,e,this._edges),a=s.zone,d=s.target;if("invalid"===a)return this.overlay.hide(100),a;var c=B.boxSizing(this.node),h=this.node.getBoundingClientRect();switch(a){case"root-all":n=c.paddingTop,i=c.paddingLeft,o=c.paddingRight,r=c.paddingBottom;break;case"root-top":n=c.paddingTop,i=c.paddingLeft,o=c.paddingRight,r=h.height*Ut.GOLDEN_RATIO;break;case"root-left":n=c.paddingTop,i=c.paddingLeft,o=h.width*Ut.GOLDEN_RATIO,r=c.paddingBottom;break;case"root-right":n=c.paddingTop,i=h.width*Ut.GOLDEN_RATIO,o=c.paddingRight,r=c.paddingBottom;break;case"root-bottom":n=h.height*Ut.GOLDEN_RATIO,i=c.paddingLeft,o=c.paddingRight,r=c.paddingBottom;break;case"widget-all":n=d.top,i=d.left,o=d.right,r=d.bottom;break;case"widget-top":n=d.top,i=d.left,o=d.right,r=d.bottom+d.height/2;break;case"widget-left":n=d.top,i=d.left,o=d.right+d.width/2,r=d.bottom;break;case"widget-right":n=d.top,i=d.left+d.width/2,o=d.right,r=d.bottom;break;case"widget-bottom":n=d.top+d.height/2,i=d.left,o=d.right,r=d.bottom;break;case"widget-tab":var l=d.tabBar.node.getBoundingClientRect().height;n=d.top,i=d.left,o=d.right,r=d.bottom+d.height-l;break;default:throw"unreachable"}return this.overlay.show({top:n,left:i,right:o,bottom:r}),a},e.prototype._createTabBar=function(){var t=this._renderer.createTabBar(this._document);return Ut.isGeneratedTabBarProperty.set(t,!0),"single-document"===this._mode&&t.hide(),t.tabsMovable=this._tabsMovable,t.allowDeselect=!1,t.addButtonEnabled=this._addButtonEnabled,t.removeBehavior="select-previous-tab",t.insertBehavior="select-tab-if-needed",t.tabMoved.connect(this._onTabMoved,this),t.currentChanged.connect(this._onCurrentChanged,this),t.tabCloseRequested.connect(this._onTabCloseRequested,this),t.tabDetachRequested.connect(this._onTabDetachRequested,this),t.tabActivateRequested.connect(this._onTabActivateRequested,this),t.addRequested.connect(this._onTabAddRequested,this),t},e.prototype._createHandle=function(){return this._renderer.createHandle()},e.prototype._onTabMoved=function(){Z.postMessage(this,Ut.LayoutModified)},e.prototype._onCurrentChanged=function(t,e){var n=e.previousTitle,i=e.currentTitle;n&&n.owner.hide(),i&&i.owner.show(),(D.IS_EDGE||D.IS_IE)&&Z.flush(),Z.postMessage(this,Ut.LayoutModified)},e.prototype._onTabAddRequested=function(t){this._addRequested.emit(t)},e.prototype._onTabActivateRequested=function(t,e){e.title.owner.activate()},e.prototype._onTabCloseRequested=function(t,e){e.title.owner.close()},e.prototype._onTabDetachRequested=function(t,e){var n=this;if(!this._drag){t.releaseMouse();var i=e.title,o=e.tab,r=e.clientX,s=e.clientY,a=new M;a.setData("application/vnd.lumino.widget-factory",function(){return i.owner});var d=o.cloneNode(!0);this._drag=new tt({document:this._document,mimeData:a,dragImage:d,proposedAction:"move",supportedActions:"move",source:this}),o.classList.add("lm-mod-hidden"),o.classList.add("p-mod-hidden");this._drag.start(r,s).then(function(){n._drag=null,o.classList.remove("lm-mod-hidden"),o.classList.remove("p-mod-hidden")})}},e}(ft);!function(t){var e=function(){function t(){this._timer=-1,this._hidden=!0,this.node=document.createElement("div"),this.node.classList.add("lm-DockPanel-overlay"),this.node.classList.add("lm-mod-hidden"),this.node.classList.add("p-DockPanel-overlay"),this.node.classList.add("p-mod-hidden"),this.node.style.position="absolute"}return t.prototype.show=function(t){var e=this.node.style;e.top=t.top+"px",e.left=t.left+"px",e.right=t.right+"px",e.bottom=t.bottom+"px",clearTimeout(this._timer),this._timer=-1,this._hidden&&(this._hidden=!1,this.node.classList.remove("lm-mod-hidden"),this.node.classList.remove("p-mod-hidden"))},t.prototype.hide=function(t){var e=this;if(!this._hidden)return t<=0?(clearTimeout(this._timer),this._timer=-1,this._hidden=!0,this.node.classList.add("lm-mod-hidden"),void this.node.classList.add("p-mod-hidden")):void(-1===this._timer&&(this._timer=window.setTimeout(function(){e._timer=-1,e._hidden=!0,e.node.classList.add("lm-mod-hidden"),e.node.classList.add("p-mod-hidden")},t)))},t}();t.Overlay=e;var n=function(){function t(){}return t.prototype.createTabBar=function(t){var e=new qt({document:t});return e.addClass("lm-DockPanel-tabBar"),e.addClass("p-DockPanel-tabBar"),e},t.prototype.createHandle=function(){var t=document.createElement("div");return t.className="lm-DockPanel-handle",t.classList.add("p-DockPanel-handle"),t},t}();t.Renderer=n,t.defaultRenderer=new n}(Yt||(Yt={})),function(t){t.GOLDEN_RATIO=.618,t.DEFAULT_EDGES={top:12,right:40,bottom:40,left:40},t.LayoutModified=new Q("layout-modified"),t.isGeneratedTabBarProperty=new S({name:"isGeneratedTabBar",create:function(){return!1}}),t.createSingleDocumentConfig=function(t){if(t.isEmpty)return{main:null};var e=function(t){for(var e,n=0,o=[],r=i(t);void 0!==(e=r.next());)o[n++]=e;return o}(t.widgets()),n=t.selectedWidgets().next(),o=n?e.indexOf(n):-1;return{main:{type:"tab-area",widgets:e,currentIndex:o}}},t.findDropTarget=function(t,e,n,i){if(!B.hitTest(t.node,e,n))return{zone:"invalid",target:null};var o=t.layout;if(o.isEmpty)return{zone:"root-all",target:null};if("multiple-document"===t.mode){var r=t.node.getBoundingClientRect(),s=e-r.left+1,a=n-r.top+1,d=r.right-e,c=r.bottom-n;switch(Math.min(a,d,c,s)){case a:if(a<i.top)return{zone:"root-top",target:null};break;case d:if(d<i.right)return{zone:"root-right",target:null};break;case c:if(c<i.bottom)return{zone:"root-bottom",target:null};break;case s:if(s<i.left)return{zone:"root-left",target:null};break;default:throw"unreachable"}}var h=o.hitTestTabAreas(e,n);if(!h)return{zone:"invalid",target:null};if("single-document"===t.mode)return{zone:"widget-all",target:h};var l=h.x-h.left+1,u=h.y-h.top+1,p=h.left+h.width-h.x,f=h.top+h.height-h.y;if(u<h.tabBar.node.getBoundingClientRect().height)return{zone:"widget-tab",target:h};var m,g=Math.round(h.width/3),v=Math.round(h.height/3);if(l>g&&p>g&&u>v&&f>v)return{zone:"widget-all",target:h};switch(l/=g,u/=v,p/=g,f/=v,Math.min(l,u,p,f)){case l:m="widget-left";break;case u:m="widget-top";break;case p:m="widget-right";break;case f:m="widget-bottom";break;default:throw"unreachable"}return{zone:m,target:h}},t.getDropRef=function(t){return 0===t.titles.length?null:t.currentTitle?t.currentTitle.owner:t.titles[t.titles.length-1].owner}}(Ut||(Ut={})),function(){function t(){this._counter=0,this._widgets=[],this._activeWidget=null,this._currentWidget=null,this._numbers=new Map,this._nodes=new Map,this._activeChanged=new A(this),this._currentChanged=new A(this)}t.prototype.dispose=function(){var t=this;this._counter<0||(this._counter=-1,A.clearData(this),o(this._widgets,function(e){e.node.removeEventListener("focus",t,!0),e.node.removeEventListener("blur",t,!0)}),this._activeWidget=null,this._currentWidget=null,this._nodes.clear(),this._numbers.clear(),this._widgets.length=0)},Object.defineProperty(t.prototype,"currentChanged",{get:function(){return this._currentChanged},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"activeChanged",{get:function(){return this._activeChanged},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isDisposed",{get:function(){return this._counter<0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentWidget",{get:function(){return this._currentWidget},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"activeWidget",{get:function(){return this._activeWidget},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"widgets",{get:function(){return this._widgets},enumerable:!0,configurable:!0}),t.prototype.focusNumber=function(t){var e=this._numbers.get(t);return void 0===e?-1:e},t.prototype.has=function(t){return this._numbers.has(t)},t.prototype.add=function(t){if(!this._numbers.has(t)){var e=t.node.contains(document.activeElement),n=e?this._counter++:-1;this._widgets.push(t),this._numbers.set(t,n),this._nodes.set(t.node,t),t.node.addEventListener("focus",this,!0),t.node.addEventListener("blur",this,!0),t.disposed.connect(this._onWidgetDisposed,this),e&&this._setWidgets(t,t)}},t.prototype.remove=function(t){var e=this;if(this._numbers.has(t)&&(t.disposed.disconnect(this._onWidgetDisposed,this),t.node.removeEventListener("focus",this,!0),t.node.removeEventListener("blur",this,!0),n.removeFirstOf(this._widgets,t),this._nodes.delete(t.node),this._numbers.delete(t),this._currentWidget===t)){var o,r,s=function(t,e){var n=i(t),o=n.next();if(void 0!==o){for(var r=o;void 0!==(o=n.next());)e(o,r)>0&&(r=o);return r}}((o=this._widgets,r=function(t){return-1!==e._numbers.get(t)},new h(i(o),r)),function(t,n){return e._numbers.get(t)-e._numbers.get(n)})||null;this._setWidgets(s,null)}},t.prototype.handleEvent=function(t){switch(t.type){case"focus":this._evtFocus(t);break;case"blur":this._evtBlur(t)}},t.prototype._setWidgets=function(t,e){var n=this._currentWidget;this._currentWidget=t;var i=this._activeWidget;this._activeWidget=e,n!==t&&this._currentChanged.emit({oldValue:n,newValue:t}),i!==e&&this._activeChanged.emit({oldValue:i,newValue:e})},t.prototype._evtFocus=function(t){var e=this._nodes.get(t.currentTarget);e!==this._currentWidget&&this._numbers.set(e,this._counter++),this._setWidgets(e,e)},t.prototype._evtBlur=function(t){var e=this._nodes.get(t.currentTarget),n=t.relatedTarget;n&&(e.node.contains(n)||l(this._widgets,function(t){return t.node.contains(n)}))||this._setWidgets(this._currentWidget,null)},t.prototype._onWidgetDisposed=function(t){this.remove(t)}}();var Xt,Gt=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this;return n._dirty=!1,n._rowSpacing=4,n._columnSpacing=4,n._items=[],n._rowStarts=[],n._columnStarts=[],n._rowSizers=[new lt],n._columnSizers=[new lt],n._box=null,void 0!==e.rowCount&&Xt.reallocSizers(n._rowSizers,e.rowCount),void 0!==e.columnCount&&Xt.reallocSizers(n._columnSizers,e.columnCount),void 0!==e.rowSpacing&&(n._rowSpacing=Xt.clampValue(e.rowSpacing)),void 0!==e.columnSpacing&&(n._columnSpacing=Xt.clampValue(e.columnSpacing)),n}return dt(e,t),e.prototype.dispose=function(){o(this._items,function(t){var e=t.widget;t.dispose(),e.dispose()}),this._box=null,this._items.length=0,this._rowStarts.length=0,this._rowSizers.length=0,this._columnStarts.length=0,this._columnSizers.length=0,t.prototype.dispose.call(this)},Object.defineProperty(e.prototype,"rowCount",{get:function(){return this._rowSizers.length},set:function(t){t!==this.rowCount&&(Xt.reallocSizers(this._rowSizers,t),this.parent&&this.parent.fit())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"columnCount",{get:function(){return this._columnSizers.length},set:function(t){t!==this.columnCount&&(Xt.reallocSizers(this._columnSizers,t),this.parent&&this.parent.fit())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rowSpacing",{get:function(){return this._rowSpacing},set:function(t){t=Xt.clampValue(t),this._rowSpacing!==t&&(this._rowSpacing=t,this.parent&&this.parent.fit())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"columnSpacing",{get:function(){return this._columnSpacing},set:function(t){t=Xt.clampValue(t),this._columnSpacing!==t&&(this._columnSpacing=t,this.parent&&this.parent.fit())},enumerable:!0,configurable:!0}),e.prototype.rowStretch=function(t){var e=this._rowSizers[t];return e?e.stretch:-1},e.prototype.setRowStretch=function(t,e){var n=this._rowSizers[t];n&&(e=Xt.clampValue(e),n.stretch!==e&&(n.stretch=e,this.parent&&this.parent.update()))},e.prototype.columnStretch=function(t){var e=this._columnSizers[t];return e?e.stretch:-1},e.prototype.setColumnStretch=function(t,e){var n=this._columnSizers[t];n&&(e=Xt.clampValue(e),n.stretch!==e&&(n.stretch=e,this.parent&&this.parent.update()))},e.prototype.iter=function(){return u(this._items,function(t){return t.widget})},e.prototype.addWidget=function(t){-1===n.findFirstIndex(this._items,function(e){return e.widget===t})&&(this._items.push(new vt(t)),this.parent&&this.attachWidget(t))},e.prototype.removeWidget=function(t){var e=n.findFirstIndex(this._items,function(e){return e.widget===t});if(-1!==e){var i=n.removeAt(this._items,e);this.parent&&this.detachWidget(t),i.dispose()}},e.prototype.init=function(){var e=this;t.prototype.init.call(this),o(this,function(t){e.attachWidget(t)})},e.prototype.attachWidget=function(t){this.parent.isAttached&&Z.sendMessage(t,ft.Msg.BeforeAttach),this.parent.node.appendChild(t.node),this.parent.isAttached&&Z.sendMessage(t,ft.Msg.AfterAttach),this.parent.fit()},e.prototype.detachWidget=function(t){this.parent.isAttached&&Z.sendMessage(t,ft.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.isAttached&&Z.sendMessage(t,ft.Msg.AfterDetach),this.parent.fit()},e.prototype.onBeforeShow=function(e){t.prototype.onBeforeShow.call(this,e),this.parent.update()},e.prototype.onBeforeAttach=function(e){t.prototype.onBeforeAttach.call(this,e),this.parent.fit()},e.prototype.onChildShown=function(t){this.parent.fit()},e.prototype.onChildHidden=function(t){this.parent.fit()},e.prototype.onResize=function(t){this.parent.isVisible&&this._update(t.width,t.height)},e.prototype.onUpdateRequest=function(t){this.parent.isVisible&&this._update(-1,-1)},e.prototype.onFitRequest=function(t){this.parent.isAttached&&this._fit()},e.prototype._fit=function(){for(var t=0,n=this.rowCount;t<n;++t)this._rowSizers[t].minSize=0;for(t=0,n=this.columnCount;t<n;++t)this._columnSizers[t].minSize=0;var i=this._items.filter(function(t){return!t.isHidden});for(t=0,n=i.length;t<n;++t)i[t].fit();var o=this.rowCount-1,r=this.columnCount-1;i.sort(Xt.rowSpanCmp);for(t=0,n=i.length;t<n;++t){var s=i[t],a=e.getCellConfig(s.widget),d=Math.min(a.row,o),c=Math.min(a.row+a.rowSpan-1,o);Xt.distributeMin(this._rowSizers,d,c,s.minHeight)}i.sort(Xt.columnSpanCmp);for(t=0,n=i.length;t<n;++t){s=i[t],a=e.getCellConfig(s.widget);var h=Math.min(a.column,r),l=Math.min(a.column+a.columnSpan-1,r);Xt.distributeMin(this._columnSizers,h,l,s.minWidth)}if("set-no-constraint"!==this.fitPolicy){var u=o*this._rowSpacing,p=r*this._columnSpacing;for(t=0,n=this.rowCount;t<n;++t)u+=this._rowSizers[t].minSize;for(t=0,n=this.columnCount;t<n;++t)p+=this._columnSizers[t].minSize;var f=this._box=B.boxSizing(this.parent.node);p+=f.horizontalSum,u+=f.verticalSum;var m=this.parent.node.style;m.minWidth=p+"px",m.minHeight=u+"px",this._dirty=!0,this.parent.parent&&Z.sendMessage(this.parent.parent,ft.Msg.FitRequest),this._dirty&&Z.sendMessage(this.parent,ft.Msg.UpdateRequest)}else Z.sendMessage(this.parent,ft.Msg.UpdateRequest)},e.prototype._update=function(t,n){this._dirty=!1,t<0&&(t=this.parent.node.offsetWidth),n<0&&(n=this.parent.node.offsetHeight),this._box||(this._box=B.boxSizing(this.parent.node));var i=this._box.paddingTop,o=this._box.paddingLeft,r=t-this._box.horizontalSum,s=n-this._box.verticalSum,a=this.rowCount-1,d=this.columnCount-1,c=a*this._rowSpacing,h=d*this._columnSpacing;ht.calc(this._rowSizers,Math.max(0,s-c)),ht.calc(this._columnSizers,Math.max(0,r-h));for(var l=0,u=i,p=this.rowCount;l<p;++l)this._rowStarts[l]=u,u+=this._rowSizers[l].size+this._rowSpacing;for(l=0,u=o,p=this.columnCount;l<p;++l)this._columnStarts[l]=u,u+=this._columnSizers[l].size+this._columnSpacing;for(l=0,p=this._items.length;l<p;++l){var f=this._items[l];if(!f.isHidden){var m=e.getCellConfig(f.widget),g=Math.min(m.row,a),v=Math.min(m.column,d),y=Math.min(m.row+m.rowSpan-1,a),b=Math.min(m.column+m.columnSpan-1,d),_=this._columnStarts[v],w=this._rowStarts[g],x=this._columnStarts[b]+this._columnSizers[b].size-_,M=this._rowStarts[y]+this._rowSizers[y].size-w;f.update(_,w,x,M)}}},e}(mt);!function(t){t.getCellConfig=function(t){return Xt.cellConfigProperty.get(t)},t.setCellConfig=function(t,e){Xt.cellConfigProperty.set(t,Xt.normalizeConfig(e))}}(Gt||(Gt={})),function(t){t.cellConfigProperty=new S({name:"cellConfig",create:function(){return{row:0,column:0,rowSpan:1,columnSpan:1}},changed:function(t){t.parent&&t.parent.layout instanceof Gt&&t.parent.fit()}}),t.normalizeConfig=function(t){return{row:Math.max(0,Math.floor(t.row||0)),column:Math.max(0,Math.floor(t.column||0)),rowSpan:Math.max(1,Math.floor(t.rowSpan||0)),columnSpan:Math.max(1,Math.floor(t.columnSpan||0))}},t.clampValue=function(t){return Math.max(0,Math.floor(t))},t.rowSpanCmp=function(e,n){var i=t.cellConfigProperty.get(e.widget),o=t.cellConfigProperty.get(n.widget);return i.rowSpan-o.rowSpan},t.columnSpanCmp=function(e,n){var i=t.cellConfigProperty.get(e.widget),o=t.cellConfigProperty.get(n.widget);return i.columnSpan-o.columnSpan},t.reallocSizers=function(t,e){for(e=Math.max(1,Math.floor(e));t.length<e;)t.push(new lt);t.length>e&&(t.length=e)},t.distributeMin=function(t,e,n,i){if(!(n<e))if(e!==n){for(var o=0,r=e;r<=n;++r)o+=t[r].minSize;if(!(o>=i)){var s=(i-o)/(n-e+1);for(r=e;r<=n;++r)t[r].minSize+=s}}else{var a=t[e];a.minSize=Math.max(a.minSize,i)}}}(Xt||(Xt={}));var Zt,Jt,Qt=function(t){function e(n){void 0===n&&(n={});var i=t.call(this,{node:Zt.createNode()})||this;return i._activeIndex=-1,i._tabFocusIndex=0,i._menus=[],i._childMenu=null,i.addClass("lm-MenuBar"),i.addClass("p-MenuBar"),i.setFlag(ft.Flag.DisallowLayout),i.renderer=n.renderer||e.defaultRenderer,i._forceItemsPosition=n.forceItemsPosition||{forceX:!0,forceY:!0},i}return dt(e,t),e.prototype.dispose=function(){this._closeChildMenu(),this._menus.length=0,t.prototype.dispose.call(this)},Object.defineProperty(e.prototype,"childMenu",{get:function(){return this._childMenu},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contentNode",{get:function(){return this.node.getElementsByClassName("lm-MenuBar-content")[0]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activeMenu",{get:function(){return this._menus[this._activeIndex]||null},set:function(t){this.activeIndex=t?this._menus.indexOf(t):-1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activeIndex",{get:function(){return this._activeIndex},set:function(t){(t<0||t>=this._menus.length)&&(t=-1),this._activeIndex!==t&&(this._activeIndex=t,-1!==t&&(this._tabFocusIndex=t),this._activeIndex>=0&&this.contentNode.childNodes[this._activeIndex]&&this.contentNode.childNodes[this._activeIndex].focus(),this.update())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"menus",{get:function(){return this._menus},enumerable:!0,configurable:!0}),e.prototype.openActiveMenu=function(){-1!==this._activeIndex&&(this._openChildMenu(),this._childMenu&&(this._childMenu.activeIndex=-1,this._childMenu.activateNextItem()))},e.prototype.addMenu=function(t){this.insertMenu(this._menus.length,t)},e.prototype.insertMenu=function(t,e){this._closeChildMenu();var i=this._menus.indexOf(e),o=Math.max(0,Math.min(t,this._menus.length));if(-1===i)return n.insert(this._menus,o,e),e.addClass("lm-MenuBar-menu"),e.addClass("p-MenuBar-menu"),e.aboutToClose.connect(this._onMenuAboutToClose,this),e.menuRequested.connect(this._onMenuMenuRequested,this),e.title.changed.connect(this._onTitleChanged,this),void this.update();o===this._menus.length&&o--,i!==o&&(n.move(this._menus,i,o),this.update())},e.prototype.removeMenu=function(t){this.removeMenuAt(this._menus.indexOf(t))},e.prototype.removeMenuAt=function(t){this._closeChildMenu();var e=n.removeAt(this._menus,t);e&&(e.aboutToClose.disconnect(this._onMenuAboutToClose,this),e.menuRequested.disconnect(this._onMenuMenuRequested,this),e.title.changed.disconnect(this._onTitleChanged,this),e.removeClass("lm-MenuBar-menu"),e.removeClass("p-MenuBar-menu"),this.update())},e.prototype.clearMenus=function(){if(0!==this._menus.length){this._closeChildMenu();for(var t=0,e=this._menus;t<e.length;t++){var n=e[t];n.aboutToClose.disconnect(this._onMenuAboutToClose,this),n.menuRequested.disconnect(this._onMenuMenuRequested,this),n.title.changed.disconnect(this._onTitleChanged,this),n.removeClass("lm-MenuBar-menu"),n.removeClass("p-MenuBar-menu")}this._menus.length=0,this.update()}},e.prototype.handleEvent=function(t){switch(t.type){case"keydown":this._evtKeyDown(t);break;case"mousedown":this._evtMouseDown(t);break;case"mousemove":this._evtMouseMove(t);break;case"mouseleave":this._evtMouseLeave(t);break;case"contextmenu":t.preventDefault(),t.stopPropagation()}},e.prototype.onBeforeAttach=function(t){this.node.addEventListener("keydown",this),this.node.addEventListener("mousedown",this),this.node.addEventListener("mousemove",this),this.node.addEventListener("mouseleave",this),this.node.addEventListener("contextmenu",this)},e.prototype.onAfterDetach=function(t){this.node.removeEventListener("keydown",this),this.node.removeEventListener("mousedown",this),this.node.removeEventListener("mousemove",this),this.node.removeEventListener("mouseleave",this),this.node.removeEventListener("contextmenu",this),this._closeChildMenu()},e.prototype.onActivateRequest=function(t){this.isAttached&&(this.activeIndex=0)},e.prototype.onUpdateRequest=function(t){for(var e=this,n=this._menus,i=this.renderer,o=this._activeIndex,r=this._tabFocusIndex>=0&&this._tabFocusIndex<n.length?this._tabFocusIndex:0,s=new Array(n.length),a=function(t,a){var d=n[t].title,c=t===o;c&&0==n[t].items.length&&(c=!1),s[t]=i.renderItem({title:d,active:c,tabbable:t===r,onfocus:function(){e.activeIndex=t}})},d=0,c=n.length;d<c;++d)a(d);nt.render(s,this.contentNode)},e.prototype._evtKeyDown=function(t){var e=t.keyCode;if(9!==e)if(t.preventDefault(),t.stopPropagation(),13!==e&&32!==e&&38!==e&&40!==e){if(27===e)return this._closeChildMenu(),this.activeIndex=-1,void this.node.blur();if(37!==e)if(39!==e){var n=j().keyForKeydownEvent(t);if(n){var i=this._activeIndex+1,o=Zt.findMnemonic(this._menus,n,i);-1===o.index||o.multiple?-1!==o.index?this.activeIndex=o.index:-1!==o.auto&&(this.activeIndex=o.auto):(this.activeIndex=o.index,this.openActiveMenu())}}else{r=this._activeIndex,s=this._menus.length;this.activeIndex=r===s-1?0:r+1}else{var r=this._activeIndex,s=this._menus.length;this.activeIndex=0===r?s-1:r-1}}else this.openActiveMenu();else this.activeIndex=-1},e.prototype._evtMouseDown=function(t){if(B.hitTest(this.node,t.clientX,t.clientY)){t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation();var e=n.findFirstIndex(this.contentNode.children,function(e){return B.hitTest(e,t.clientX,t.clientY)});if(-1!==e){if(0===t.button)if(this._childMenu)this._closeChildMenu(),this.activeIndex=e;else{var i=this._positionForMenu(e);jt.saveWindowData(),this.activeIndex=e,this._openChildMenu(i)}}else this._closeChildMenu()}},e.prototype._evtMouseMove=function(t){var e=n.findFirstIndex(this.contentNode.children,function(e){return B.hitTest(e,t.clientX,t.clientY)});if(e!==this._activeIndex&&(-1!==e||!this._childMenu)){var i=this._positionForMenu(e);jt.saveWindowData(),this.activeIndex=e,this._childMenu&&this._openChildMenu(i)}},e.prototype._positionForMenu=function(t){var e=this.contentNode.children[t].getBoundingClientRect(),n=e.left;return{top:e.bottom,left:n}},e.prototype._evtMouseLeave=function(t){this._childMenu||(this.activeIndex=-1)},e.prototype._openChildMenu=function(t){var e;void 0===t&&(t={});var n=this.activeMenu;if(n){var i=this._childMenu;if(i!==n){this._childMenu=n,i?i.close():document.addEventListener("mousedown",this,!0),Z.sendMessage(this,ft.Msg.UpdateRequest);var o=t.left,r=t.top;void 0!==o&&void 0!==r||(o=(e=this._positionForMenu(this._activeIndex)).left,r=e.top),i||(this.addClass("lm-mod-active"),this.addClass("p-mod-active")),n.items.length>0&&n.open(o,r,this._forceItemsPosition)}}else this._closeChildMenu()},e.prototype._closeChildMenu=function(){if(this._childMenu){this.removeClass("lm-mod-active"),this.removeClass("p-mod-active"),document.removeEventListener("mousedown",this,!0);var t=this._childMenu;this._childMenu=null,t.close(),this.activeIndex=-1}},e.prototype._onMenuAboutToClose=function(t){t===this._childMenu&&(this.removeClass("lm-mod-active"),this.removeClass("p-mod-active"),document.removeEventListener("mousedown",this,!0),this._childMenu=null,this.activeIndex=-1)},e.prototype._onMenuMenuRequested=function(t,e){if(t===this._childMenu){var n=this._activeIndex,i=this._menus.length;switch(e){case"next":this.activeIndex=n===i-1?0:n+1;break;case"previous":this.activeIndex=0===n?i-1:n-1}this.openActiveMenu()}},e.prototype._onTitleChanged=function(){this.update()},e}(ft);!function(t){var e=function(){function t(){}return t.prototype.renderItem=function(t){var e=this.createItemClass(t),n=this.createItemDataset(t),i=this.createItemARIA(t);return st.li(ct({className:e,dataset:n,tabindex:t.tabbable?"0":"-1",onfocus:t.onfocus},i),this.renderIcon(t),this.renderLabel(t))},t.prototype.renderIcon=function(t){var e=this.createIconClass(t);return"string"==typeof t.title.icon?st.div({className:e},t.title.iconLabel):st.div({className:e},t.title.icon,t.title.iconLabel)},t.prototype.renderLabel=function(t){var e=this.formatLabel(t);return st.div({className:"lm-MenuBar-itemLabel p-MenuBar-itemLabel"},e)},t.prototype.createItemClass=function(t){var e="lm-MenuBar-item";return e+=" p-MenuBar-item",t.title.className&&(e+=" "+t.title.className),t.active&&(e+=" lm-mod-active",e+=" p-mod-active"),e},t.prototype.createItemDataset=function(t){return t.title.dataset},t.prototype.createItemARIA=function(t){return{role:"menuitem","aria-haspopup":"true"}},t.prototype.createIconClass=function(t){var e="lm-MenuBar-itemIcon";e+=" p-MenuBar-itemIcon";var n=t.title.iconClass;return n?e+" "+n:e},t.prototype.formatLabel=function(t){var e=t.title,n=e.label,i=e.mnemonic;if(i<0||i>=n.length)return n;var o=n.slice(0,i),r=n.slice(i+1),s=n[i];return[o,st.span({className:"lm-MenuBar-itemMnemonic p-MenuBar-itemMnemonic"},s),r]},t}();t.Renderer=e,t.defaultRenderer=new e}(Qt||(Qt={})),function(t){t.createNode=function(){var t=document.createElement("div"),e=document.createElement("ul");return e.className="lm-MenuBar-content",e.classList.add("p-MenuBar-content"),t.appendChild(e),e.setAttribute("role","menubar"),t},t.findMnemonic=function(t,e,n){for(var i=-1,o=-1,r=!1,s=e.toUpperCase(),a=0,d=t.length;a<d;++a){var c=(a+n)%d,h=t[c].title;if(0!==h.label.length){var l=h.mnemonic;l>=0&&l<h.label.length?h.label[l].toUpperCase()===s&&(-1===i?i=c:r=!0):-1===o&&h.label[0].toUpperCase()===s&&(o=c)}}return{index:i,multiple:r,auto:o}}}(Zt||(Zt={})),function(t){function e(e){void 0===e&&(e={});var n=t.call(this,{node:Jt.createNode()})||this;return n._onRepeat=function(){if(n._repeatTimer=-1,n._pressData){var t=n._pressData.part;if("thumb"!==t){n._repeatTimer=window.setTimeout(n._onRepeat,20);var e=n._pressData.mouseX,i=n._pressData.mouseY;if("decrement"!==t)if("increment"!==t){if("track"===t){if(!B.hitTest(n.trackNode,e,i))return;var o=n.thumbNode;if(B.hitTest(o,e,i))return;var r=o.getBoundingClientRect(),s=void 0;return s="horizontal"===n._orientation?e<r.left?"decrement":"increment":i<r.top?"decrement":"increment",void n._pageRequested.emit(s)}}else{if(!B.hitTest(n.incrementNode,e,i))return;n._stepRequested.emit("increment")}else{if(!B.hitTest(n.decrementNode,e,i))return;n._stepRequested.emit("decrement")}}}},n._value=0,n._page=10,n._maximum=100,n._repeatTimer=-1,n._pressData=null,n._thumbMoved=new A(n),n._stepRequested=new A(n),n._pageRequested=new A(n),n.addClass("lm-ScrollBar"),n.addClass("p-ScrollBar"),n.setFlag(ft.Flag.DisallowLayout),n._orientation=e.orientation||"vertical",n.dataset.orientation=n._orientation,void 0!==e.maximum&&(n._maximum=Math.max(0,e.maximum)),void 0!==e.page&&(n._page=Math.max(0,e.page)),void 0!==e.value&&(n._value=Math.max(0,Math.min(e.value,n._maximum))),n}dt(e,t),Object.defineProperty(e.prototype,"thumbMoved",{get:function(){return this._thumbMoved},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"stepRequested",{get:function(){return this._stepRequested},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pageRequested",{get:function(){return this._pageRequested},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"orientation",{get:function(){return this._orientation},set:function(t){this._orientation!==t&&(this._releaseMouse(),this._orientation=t,this.dataset.orientation=t,this.update())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(t){t=Math.max(0,Math.min(t,this._maximum)),this._value!==t&&(this._value=t,this.update())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"page",{get:function(){return this._page},set:function(t){t=Math.max(0,t),this._page!==t&&(this._page=t,this.update())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maximum",{get:function(){return this._maximum},set:function(t){t=Math.max(0,t),this._maximum!==t&&(this._maximum=t,this._value=Math.min(this._value,t),this.update())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"decrementNode",{get:function(){return this.node.getElementsByClassName("lm-ScrollBar-button")[0]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"incrementNode",{get:function(){return this.node.getElementsByClassName("lm-ScrollBar-button")[1]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"trackNode",{get:function(){return this.node.getElementsByClassName("lm-ScrollBar-track")[0]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"thumbNode",{get:function(){return this.node.getElementsByClassName("lm-ScrollBar-thumb")[0]},enumerable:!0,configurable:!0}),e.prototype.handleEvent=function(t){switch(t.type){case"mousedown":this._evtMouseDown(t);break;case"mousemove":this._evtMouseMove(t);break;case"mouseup":this._evtMouseUp(t);break;case"keydown":this._evtKeyDown(t);break;case"contextmenu":t.preventDefault(),t.stopPropagation()}},e.prototype.onBeforeAttach=function(t){this.node.addEventListener("mousedown",this),this.update()},e.prototype.onAfterDetach=function(t){this.node.removeEventListener("mousedown",this),this._releaseMouse()},e.prototype.onUpdateRequest=function(t){var e=100*this._value/this._maximum,n=100*this._page/(this._page+this._maximum);e=Math.max(0,Math.min(e,100)),n=Math.max(0,Math.min(n,100));var i=this.thumbNode.style;"horizontal"===this._orientation?(i.top="",i.height="",i.left=e+"%",i.width=n+"%",i.transform="translate("+-e+"%, 0%)"):(i.left="",i.width="",i.top=e+"%",i.height=n+"%",i.transform="translate(0%, "+-e+"%)")},e.prototype._evtKeyDown=function(t){if(t.preventDefault(),t.stopPropagation(),27===t.keyCode){var e=this._pressData?this._pressData.value:-1;this._releaseMouse(),-1!==e&&this._moveThumb(e)}},e.prototype._evtMouseDown=function(t){if(0===t.button&&(this.activate(),!this._pressData)){var e=Jt.findPart(this,t.target);if(e){t.preventDefault(),t.stopPropagation();var n=tt.overrideCursor("default");if(this._pressData={part:e,override:n,delta:-1,value:-1,mouseX:t.clientX,mouseY:t.clientY},document.addEventListener("mousemove",this,!0),document.addEventListener("mouseup",this,!0),document.addEventListener("keydown",this,!0),document.addEventListener("contextmenu",this,!0),"thumb"===e){var i=this.thumbNode,o=i.getBoundingClientRect();return"horizontal"===this._orientation?this._pressData.delta=t.clientX-o.left:this._pressData.delta=t.clientY-o.top,i.classList.add("lm-mod-active"),i.classList.add("p-mod-active"),void(this._pressData.value=this._value)}if("track"===e){o=this.thumbNode.getBoundingClientRect();var r=void 0;return r="horizontal"===this._orientation?t.clientX<o.left?"decrement":"increment":t.clientY<o.top?"decrement":"increment",this._repeatTimer=window.setTimeout(this._onRepeat,350),void this._pageRequested.emit(r)}return"decrement"===e?(this.decrementNode.classList.add("lm-mod-active"),this.decrementNode.classList.add("p-mod-active"),this._repeatTimer=window.setTimeout(this._onRepeat,350),void this._stepRequested.emit("decrement")):"increment"===e?(this.incrementNode.classList.add("lm-mod-active"),this.incrementNode.classList.add("p-mod-active"),this._repeatTimer=window.setTimeout(this._onRepeat,350),void this._stepRequested.emit("increment")):void 0}}},e.prototype._evtMouseMove=function(t){if(this._pressData&&(t.preventDefault(),t.stopPropagation(),this._pressData.mouseX=t.clientX,this._pressData.mouseY=t.clientY,"thumb"===this._pressData.part)){var e,n,i=this.thumbNode.getBoundingClientRect(),o=this.trackNode.getBoundingClientRect();"horizontal"===this._orientation?(e=t.clientX-o.left-this._pressData.delta,n=o.width-i.width):(e=t.clientY-o.top-this._pressData.delta,n=o.height-i.height);var r=0===n?0:e*this._maximum/n;this._moveThumb(r)}},e.prototype._evtMouseUp=function(t){0===t.button&&(t.preventDefault(),t.stopPropagation(),this._releaseMouse())},e.prototype._releaseMouse=function(){this._pressData&&(clearTimeout(this._repeatTimer),this._repeatTimer=-1,this._pressData.override.dispose(),this._pressData=null,document.removeEventListener("mousemove",this,!0),document.removeEventListener("mouseup",this,!0),document.removeEventListener("keydown",this,!0),document.removeEventListener("contextmenu",this,!0),this.thumbNode.classList.remove("lm-mod-active"),this.decrementNode.classList.remove("lm-mod-active"),this.incrementNode.classList.remove("lm-mod-active"),this.thumbNode.classList.remove("p-mod-active"),this.decrementNode.classList.remove("p-mod-active"),this.incrementNode.classList.remove("p-mod-active"))},e.prototype._moveThumb=function(t){t=Math.max(0,Math.min(t,this._maximum)),this._value!==t&&(this._value=t,this.update(),this._thumbMoved.emit(t))}}(ft),function(t){t.createNode=function(){var t=document.createElement("div"),e=document.createElement("div"),n=document.createElement("div"),i=document.createElement("div"),o=document.createElement("div");return e.className="lm-ScrollBar-button",n.className="lm-ScrollBar-button",e.dataset.action="decrement",n.dataset.action="increment",i.className="lm-ScrollBar-track",o.className="lm-ScrollBar-thumb",e.classList.add("p-ScrollBar-button"),n.classList.add("p-ScrollBar-button"),i.classList.add("p-ScrollBar-track"),o.classList.add("p-ScrollBar-thumb"),i.appendChild(o),t.appendChild(e),t.appendChild(i),t.appendChild(n),t},t.findPart=function(t,e){return t.thumbNode.contains(e)?"thumb":t.trackNode.contains(e)?"track":t.decrementNode.contains(e)?"decrement":t.incrementNode.contains(e)?"increment":null}}(Jt||(Jt={})),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._widget=null,e}dt(e,t),e.prototype.dispose=function(){if(this._widget){var e=this._widget;this._widget=null,e.dispose()}t.prototype.dispose.call(this)},Object.defineProperty(e.prototype,"widget",{get:function(){return this._widget},set:function(t){t&&(t.parent=this.parent),this._widget!==t&&(this._widget&&this._widget.dispose(),this._widget=t,this.parent&&t&&this.attachWidget(t))},enumerable:!0,configurable:!0}),e.prototype.iter=function(){return this._widget?g(this._widget):d()},e.prototype.removeWidget=function(t){this._widget===t&&(this._widget=null,this.parent&&this.detachWidget(t))},e.prototype.init=function(){var e=this;t.prototype.init.call(this),o(this,function(t){e.attachWidget(t)})},e.prototype.attachWidget=function(t){this.parent.isAttached&&Z.sendMessage(t,ft.Msg.BeforeAttach),this.parent.node.appendChild(t.node),this.parent.isAttached&&Z.sendMessage(t,ft.Msg.AfterAttach)},e.prototype.detachWidget=function(t){this.parent.isAttached&&Z.sendMessage(t,ft.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.isAttached&&Z.sendMessage(t,ft.Msg.AfterDetach)}}(mt);var $t,te=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this;return n._dirty=!1,n._items=[],n._box=null,n._hiddenMode=void 0!==e.hiddenMode?e.hiddenMode:ft.HiddenMode.Display,n}return dt(e,t),Object.defineProperty(e.prototype,"hiddenMode",{get:function(){return this._hiddenMode},set:function(t){var e=this;this._hiddenMode!==t&&(this._hiddenMode=t,this.widgets.length>1&&this.widgets.forEach(function(t){t.hiddenMode=e._hiddenMode}))},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){o(this._items,function(t){t.dispose()}),this._box=null,this._items.length=0,t.prototype.dispose.call(this)},e.prototype.attachWidget=function(t,e){this._hiddenMode===ft.HiddenMode.Scale&&this._items.length>0?(1===this._items.length&&(this.widgets[0].hiddenMode=ft.HiddenMode.Scale),e.hiddenMode=ft.HiddenMode.Scale):e.hiddenMode=ft.HiddenMode.Display,n.insert(this._items,t,new vt(e)),this.parent.isAttached&&Z.sendMessage(e,ft.Msg.BeforeAttach),this.parent.node.appendChild(e.node),this.parent.isAttached&&Z.sendMessage(e,ft.Msg.AfterAttach),this.parent.fit()},e.prototype.moveWidget=function(t,e,i){n.move(this._items,t,e),this.parent.update()},e.prototype.detachWidget=function(t,e){var i=n.removeAt(this._items,t);this.parent.isAttached&&Z.sendMessage(e,ft.Msg.BeforeDetach),this.parent.node.removeChild(e.node),this.parent.isAttached&&Z.sendMessage(e,ft.Msg.AfterDetach),i.widget.node.style.zIndex="",this._hiddenMode===ft.HiddenMode.Scale&&(e.hiddenMode=ft.HiddenMode.Display,1===this._items.length&&(this._items[0].widget.hiddenMode=ft.HiddenMode.Display)),i.dispose(),this.parent.fit()},e.prototype.onBeforeShow=function(e){t.prototype.onBeforeShow.call(this,e),this.parent.update()},e.prototype.onBeforeAttach=function(e){t.prototype.onBeforeAttach.call(this,e),this.parent.fit()},e.prototype.onChildShown=function(t){this.parent.fit()},e.prototype.onChildHidden=function(t){this.parent.fit()},e.prototype.onResize=function(t){this.parent.isVisible&&this._update(t.width,t.height)},e.prototype.onUpdateRequest=function(t){this.parent.isVisible&&this._update(-1,-1)},e.prototype.onFitRequest=function(t){this.parent.isAttached&&this._fit()},e.prototype._fit=function(){for(var t=0,e=0,n=0,i=this._items.length;n<i;++n){var o=this._items[n];o.isHidden||(o.fit(),t=Math.max(t,o.minWidth),e=Math.max(e,o.minHeight))}var r=this._box=B.boxSizing(this.parent.node);t+=r.horizontalSum,e+=r.verticalSum;var s=this.parent.node.style;s.minWidth=t+"px",s.minHeight=e+"px",this._dirty=!0,this.parent.parent&&Z.sendMessage(this.parent.parent,ft.Msg.FitRequest),this._dirty&&Z.sendMessage(this.parent,ft.Msg.UpdateRequest)},e.prototype._update=function(t,e){this._dirty=!1;for(var n=0,i=0,o=this._items.length;i<o;++i)n+=+!this._items[i].isHidden;if(0!==n){t<0&&(t=this.parent.node.offsetWidth),e<0&&(e=this.parent.node.offsetHeight),this._box||(this._box=B.boxSizing(this.parent.node));var r=this._box.paddingTop,s=this._box.paddingLeft,a=t-this._box.horizontalSum,d=e-this._box.verticalSum;for(i=0,o=this._items.length;i<o;++i){var c=this._items[i];c.isHidden||(c.widget.node.style.zIndex=""+i,c.update(s,r,a,d))}}},e}(bt),ee=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,{layout:$t.createLayout(e)})||this;return n._widgetRemoved=new A(n),n.addClass("lm-StackedPanel"),n.addClass("p-StackedPanel"),n}return dt(e,t),Object.defineProperty(e.prototype,"hiddenMode",{get:function(){return this.layout.hiddenMode},set:function(t){this.layout.hiddenMode=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"widgetRemoved",{get:function(){return this._widgetRemoved},enumerable:!0,configurable:!0}),e.prototype.onChildAdded=function(t){t.child.addClass("lm-StackedPanel-child"),t.child.addClass("p-StackedPanel-child")},e.prototype.onChildRemoved=function(t){t.child.removeClass("lm-StackedPanel-child"),t.child.removeClass("p-StackedPanel-child"),this._widgetRemoved.emit(t.child)},e}(St);!function(t){t.createLayout=function(t){return t.layout||new te}}($t||($t={}));var ne,ie=function(t){function e(e){void 0===e&&(e={});var n=t.call(this)||this;n._currentChanged=new A(n),n._addRequested=new A(n),n.addClass("lm-TabPanel"),n.addClass("p-TabPanel"),n.tabBar=new qt(e),n.tabBar.addClass("lm-TabPanel-tabBar"),n.stackedPanel=new ee,n.stackedPanel.addClass("lm-TabPanel-stackedPanel"),n.tabBar.addClass("p-TabPanel-tabBar"),n.stackedPanel.addClass("p-TabPanel-stackedPanel"),n.tabBar.tabMoved.connect(n._onTabMoved,n),n.tabBar.currentChanged.connect(n._onCurrentChanged,n),n.tabBar.tabCloseRequested.connect(n._onTabCloseRequested,n),n.tabBar.tabActivateRequested.connect(n._onTabActivateRequested,n),n.tabBar.addRequested.connect(n._onTabAddRequested,n),n.stackedPanel.widgetRemoved.connect(n._onWidgetRemoved,n),n._tabPlacement=e.tabPlacement||"top";var i=ne.directionFromPlacement(n._tabPlacement),o=ne.orientationFromPlacement(n._tabPlacement);n.tabBar.orientation=o,n.tabBar.dataset.placement=n._tabPlacement;var r=new Et({direction:i,spacing:0});return Et.setStretch(n.tabBar,0),Et.setStretch(n.stackedPanel,1),r.addWidget(n.tabBar),r.addWidget(n.stackedPanel),n.layout=r,n}return dt(e,t),Object.defineProperty(e.prototype,"currentChanged",{get:function(){return this._currentChanged},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentIndex",{get:function(){return this.tabBar.currentIndex},set:function(t){this.tabBar.currentIndex=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentWidget",{get:function(){var t=this.tabBar.currentTitle;return t?t.owner:null},set:function(t){this.tabBar.currentTitle=t?t.title:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tabsMovable",{get:function(){return this.tabBar.tabsMovable},set:function(t){this.tabBar.tabsMovable=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"addButtonEnabled",{get:function(){return this.tabBar.addButtonEnabled},set:function(t){this.tabBar.addButtonEnabled=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tabPlacement",{get:function(){return this._tabPlacement},set:function(t){if(this._tabPlacement!==t){this._tabPlacement=t;var e=ne.directionFromPlacement(t),n=ne.orientationFromPlacement(t);this.tabBar.orientation=n,this.tabBar.dataset.placement=t,this.layout.direction=e}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"addRequested",{get:function(){return this._addRequested},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"widgets",{get:function(){return this.stackedPanel.widgets},enumerable:!0,configurable:!0}),e.prototype.addWidget=function(t){this.insertWidget(this.widgets.length,t)},e.prototype.insertWidget=function(t,e){e!==this.currentWidget&&e.hide(),this.stackedPanel.insertWidget(t,e),this.tabBar.insertTab(t,e.title),e.node.setAttribute("role","tabpanel");var n=this.tabBar.renderer;if(n instanceof qt.Renderer){var i=n.createTabKey({title:e.title,current:!1,zIndex:0});e.node.setAttribute("aria-labelledby",i)}},e.prototype._onCurrentChanged=function(t,e){var n=e.previousIndex,i=e.previousTitle,o=e.currentIndex,r=e.currentTitle,s=i?i.owner:null,a=r?r.owner:null;s&&s.hide(),a&&a.show(),this._currentChanged.emit({previousIndex:n,previousWidget:s,currentIndex:o,currentWidget:a}),(D.IS_EDGE||D.IS_IE)&&Z.flush()},e.prototype._onTabAddRequested=function(t,e){this._addRequested.emit(t)},e.prototype._onTabActivateRequested=function(t,e){e.title.owner.activate()},e.prototype._onTabCloseRequested=function(t,e){e.title.owner.close()},e.prototype._onTabMoved=function(t,e){this.stackedPanel.insertWidget(e.toIndex,e.title.owner)},e.prototype._onWidgetRemoved=function(t,e){e.node.removeAttribute("role"),e.node.removeAttribute("aria-labelledby"),this.tabBar.removeTab(e.title)},e}(ft);function oe(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}!function(t){t.orientationFromPlacement=function(t){return e[t]},t.directionFromPlacement=function(t){return n[t]};var e={top:"horizontal",left:"vertical",right:"vertical",bottom:"horizontal"},n={top:"top-to-bottom",left:"left-to-right",right:"right-to-left",bottom:"bottom-to-top"}}(ne||(ne={}));oe(".lm-Widget,.p-Widget{box-sizing:border-box;cursor:default;overflow:hidden;position:relative}.lm-Widget.lm-mod-hidden,.p-Widget.p-mod-hidden{display:none!important}");oe('.lm-CommandPalette,.p-CommandPalette{display:flex;flex-direction:column;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.lm-CommandPalette-search,.p-CommandPalette-search{flex:0 0 auto}.lm-CommandPalette-content,.p-CommandPalette-content{flex:1 1 auto;list-style-type:none;margin:0;min-height:0;overflow:auto;padding:0}.lm-CommandPalette-header,.p-CommandPalette-header{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.lm-CommandPalette-item,.p-CommandPalette-item{display:flex;flex-direction:row}.lm-CommandPalette-itemIcon,.p-CommandPalette-itemIcon{flex:0 0 auto}.lm-CommandPalette-itemContent,.p-CommandPalette-itemContent{flex:1 1 auto;overflow:hidden}.lm-CommandPalette-itemShortcut,.p-CommandPalette-itemShortcut{flex:0 0 auto}.lm-CommandPalette-itemLabel,.p-CommandPalette-itemLabel{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.lm-close-icon{background-color:transparent;border:1px solid transparent;bottom:0;cursor:pointer;display:none;margin:auto;outline:0;padding:7px 0;position:absolute;right:3%;top:0;vertical-align:middle;z-index:1}.lm-close-icon:after{color:#000;content:"X";cursor:pointer;display:block;font-size:12px;font-weight:400;height:15px;text-align:center;width:15px}');oe('.lm-DockPanel,.lm-DockPanel-widget,.p-DockPanel,.p-DockPanel-widget{z-index:0}.lm-DockPanel-tabBar,.p-DockPanel-tabBar{z-index:1}.lm-DockPanel-handle,.p-DockPanel-handle{z-index:2}.lm-DockPanel-handle.lm-mod-hidden,.p-DockPanel-handle.p-mod-hidden{display:none!important}.lm-DockPanel-handle:after,.p-DockPanel-handle:after{content:"";height:100%;left:0;position:absolute;top:0;width:100%}.lm-DockPanel-handle[data-orientation=horizontal],.p-DockPanel-handle[data-orientation=horizontal]{cursor:ew-resize}.lm-DockPanel-handle[data-orientation=vertical],.p-DockPanel-handle[data-orientation=vertical]{cursor:ns-resize}.lm-DockPanel-handle[data-orientation=horizontal]:after,.p-DockPanel-handle[data-orientation=horizontal]:after{left:50%;min-width:8px;transform:translateX(-50%)}.lm-DockPanel-handle[data-orientation=vertical]:after,.p-DockPanel-handle[data-orientation=vertical]:after{min-height:8px;top:50%;transform:translateY(-50%)}.lm-DockPanel-overlay,.p-DockPanel-overlay{box-sizing:border-box;pointer-events:none;z-index:3}.lm-DockPanel-overlay.lm-mod-hidden,.p-DockPanel-overlay.p-mod-hidden{display:none!important}');oe(".lm-Menu,.p-Menu{outline:none;overflow-x:hidden;overflow-y:auto;position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;z-index:10000}.lm-Menu-content,.p-Menu-content{display:table;list-style-type:none;margin:0;padding:0}.lm-Menu-item,.p-Menu-item{display:table-row}.lm-Menu-item.lm-mod-collapsed,.lm-Menu-item.lm-mod-hidden,.p-Menu-item.p-mod-collapsed,.p-Menu-item.p-mod-hidden{display:none!important}.lm-Menu-itemIcon,.lm-Menu-itemSubmenuIcon,.p-Menu-itemIcon,.p-Menu-itemSubmenuIcon{display:table-cell;text-align:center}.lm-Menu-itemLabel,.p-Menu-itemLabel{display:table-cell;text-align:left}.lm-Menu-itemShortcut,.p-Menu-itemShortcut{display:table-cell;text-align:right}");oe(".lm-MenuBar,.p-MenuBar{outline:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.lm-MenuBar-content,.p-MenuBar-content{display:flex;flex-direction:row;list-style-type:none;margin:0;padding:0}.lm-MenuBar-item,.p--MenuBar-item{box-sizing:border-box}.lm-MenuBar-itemIcon,.lm-MenuBar-itemLabel,.p-MenuBar-itemIcon,.p-MenuBar-itemLabel{display:inline-block}");oe(".lm-ScrollBar,.p-ScrollBar{display:flex;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.lm-ScrollBar[data-orientation=horizontal],.p-ScrollBar[data-orientation=horizontal]{flex-direction:row}.lm-ScrollBar[data-orientation=vertical],.p-ScrollBar[data-orientation=vertical]{flex-direction:column}.lm-ScrollBar-button,.p-ScrollBar-button{box-sizing:border-box;flex:0 0 auto}.lm-ScrollBar-track,.p-ScrollBar-track{box-sizing:border-box;flex:1 1 auto;overflow:hidden;position:relative}.lm-ScrollBar-thumb,.p-ScrollBar-thumb{box-sizing:border-box;position:absolute}");oe('.lm-SplitPanel-child,.p-SplitPanel-child{z-index:0}.lm-SplitPanel-handle,.p-SplitPanel-handle{z-index:1}.lm-SplitPanel-handle.lm-mod-hidden,.p-SplitPanel-handle.p-mod-hidden{display:none!important}.lm-SplitPanel-handle:after,.p-SplitPanel-handle:after{content:"";height:100%;left:0;position:absolute;top:0;width:100%}.lm-SplitPanel[data-orientation=horizontal]>.lm-SplitPanel-handle,.p-SplitPanel[data-orientation=horizontal]>.p-SplitPanel-handle{cursor:ew-resize}.lm-SplitPanel[data-orientation=vertical]>.lm-SplitPanel-handle,.p-SplitPanel[data-orientation=vertical]>.p-SplitPanel-handle{cursor:ns-resize}.lm-SplitPanel[data-orientation=horizontal]>.lm-SplitPanel-handle:after,.p-SplitPanel[data-orientation=horizontal]>.p-SplitPanel-handle:after{left:50%;min-width:8px;transform:translateX(-50%)}.lm-SplitPanel[data-orientation=vertical]>.lm-SplitPanel-handle:after,.p-SplitPanel[data-orientation=vertical]>.p-SplitPanel-handle:after{min-height:8px;top:50%;transform:translateY(-50%)}');oe(".lm-TabBar,.p-TabBar{display:flex;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.lm-TabBar[data-orientation=horizontal],.p-TabBar[data-orientation=horizontal]{align-items:flex-end;flex-direction:row}.lm-TabBar[data-orientation=vertical],.p-TabBar[data-orientation=vertical]{align-items:flex-end;flex-direction:column}.lm-TabBar-content,.p-TabBar-content{display:flex;flex:1 1 auto;list-style-type:none;margin:0;padding:0}.lm-TabBar[data-orientation=horizontal]>.lm-TabBar-content,.p-TabBar[data-orientation=horizontal]>.p-TabBar-content{flex-direction:row}.lm-TabBar[data-orientation=vertical]>.lm-TabBar-content,.p-TabBar[data-orientation=vertical]>.p-TabBar-content{flex-direction:column}.lm-TabBar-tab,.p-TabBar-tab{box-sizing:border-box;display:flex;flex-direction:row;overflow:hidden;touch-action:none}.lm-TabBar-tabCloseIcon,.lm-TabBar-tabIcon,.p-TabBar-tabCloseIcon,.p-TabBar-tabIcon{flex:0 0 auto}.lm-TabBar-tabLabel,.p-TabBar-tabLabel{flex:1 1 auto;overflow:hidden;white-space:nowrap}.lm-TabBar-tabInput{box-sizing:border-box;user-select:all;width:100%}.lm-TabBar-addButton.lm-mod-hidden,.lm-TabBar-tab.lm-mod-hidden,.p-TabBar-tab.p-mod-hidden{display:none!important}.lm-TabBar.lm-mod-dragging .lm-TabBar-tab,.p-TabBar.p-mod-dragging .p-TabBar-tab{position:relative}.lm-TabBar.lm-mod-dragging[data-orientation=horizontal] .lm-TabBar-tab,.p-TabBar.p-mod-dragging[data-orientation=horizontal] .p-TabBar-tab{left:0;transition:left .15s ease}.lm-TabBar.lm-mod-dragging[data-orientation=vertical] .lm-TabBar-tab,.p-TabBar.p-mod-dragging[data-orientation=vertical] .p-TabBar-tab{top:0;transition:top .15s ease}.lm-TabBar.lm-mod-dragging .lm-TabBar-tab.lm-mod-dragging,.p-TabBar.p-mod-dragging .p-TabBar-tab.p-mod-dragging{transition:none}.lm-TabBar-tabLabel .lm-TabBar-tabInput{background:inherit;box-sizing:border-box;user-select:all;width:100%}");oe(".lm-TabPanel-tabBar,.p-TabPanel-tabBar{z-index:1}.lm-TabPanel-stackedPanel,.p-TabPanel-stackedPanel{z-index:0}");var re=function(t,e){return re=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},re(t,e)};function se(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}re(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var ae=function(){return ae=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},ae.apply(this,arguments)};function de(t,e,n,i){return new(n||(n=Promise))(function(o,r){function s(t){try{d(i.next(t))}catch(t){r(t)}}function a(t){try{d(i.throw(t))}catch(t){r(t)}}function d(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(s,a)}d((i=i.apply(t,e||[])).next())})}function ce(t,e){var n,i,o,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(d){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(r=0)),r;)try{if(n=1,i&&(o=2&a[0]?i.return:a[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!(o=r.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=e.call(t,r)}catch(t){a=[6,t],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,d])}}}function he(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}"function"==typeof SuppressedError&&SuppressedError;he(".phosphor_WidgetAdapter{background:#fff;border-bottom:1px solid silver;border-left:1px solid silver;border-right:1px solid silver;min-height:64px;min-width:64px}.phosphor_WidgetAdapter.p-DockPanel-widget{border-top:none;box-shadow:0 -1px 0 rgba(0,0,0,.2),1px 1px 2px rgba(0,0,0,.2)}.phosphor_WidgetAdapter.p-SplitPanel-child{border:none}"),t.Msg=void 0,function(t){var e=function(t){function e(e,n){var i=t.call(this,n)||this;return i._wa=e,i}return se(e,t),Object.defineProperty(e.prototype,"wa",{get:function(){return this._wa},enumerable:!1,configurable:!0}),e.prototype.conflate=function(t){return this._wa=t.wa,!0},e}(Q);t.WAConflatableMessage=e;var n=function(t){function e(n){return t.call(this,n,e.type)||this}return se(e,t),e.type="wa-activate-request",e}(e);t.WAActivateRequest=n;var i=function(t){function e(n){return t.call(this,n,e.type)||this}return se(e,t),e.type="wa-layout-changed",e}(e);t.WALayoutChanged=i}(t.Msg||(t.Msg={}));var le=function(n){function i(t,i,o,r,s){void 0===o&&(o={}),void 0===r&&(r=!1),void 0===s&&(s={});var a=n.call(this)||this;return a.lparam={},a.padding=0,a._width=0,a._height=0,a._owner=t,a._element=e.select(a.node),a.addClass("phosphor_WidgetAdapter"),a.title.label="",a.title.closable=!!r,a.title.caption="Long description for: ".concat(name),a._ext=s,a._closable="boolean"==typeof r?{canClose:function(t,e){return r}}:r,i instanceof e.Widget?a._widget=i.target(a.node):a._widgetLayout=i,a.lparam=o,a}return se(i,n),Object.defineProperty(i.prototype,"widget",{get:function(){return this._widget},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"inputNode",{get:function(){return this.node.getElementsByTagName("input")[0]},enumerable:!1,configurable:!0}),i.prototype.resizeAndRender=function(){this._widget&&(e.select(this.node).style("padding",this.padding+"px").style("width",this._width+"px").style("height",this._height+"px").style("overflow-x",this._ext.overflowX).style("overflow-y",this._ext.overflowY),this._widget.resize({width:this._width-2*this.padding-2,height:this._height-2*this.padding-2}).lazyRender(),this._owner&&Z.postMessage(this._owner,new t.Msg.WALayoutChanged(this)))},i.prototype.onActivateRequest=function(e){n.prototype.onActivateRequest.call(this,e),this._widget&&this.resizeAndRender(),this._owner&&Z.postMessage(this._owner,new t.Msg.WAActivateRequest(this))},i.prototype.onResize=function(t){n.prototype.onResize.call(this,t),this.node&&null!==this.node.offsetParent&&t.width>=0&&t.height>=0?(this._width=t.width,this._height=t.height,this.resizeAndRender()):this._widgetLayout},i.prototype.onCloseRequest=function(t){this._closable.canClose(this._widget,this)&&this.dispose()},i}(ft),ue=function(t){function e(e){return t.apply(this,e)||this}return se(e,t),e.create=function(){return Object.create(e.prototype)},e.prototype.watchRendered=function(t,e){if(e)var n=this.map(function(t){return{wa:t,w:t.widget,rc:t.widget.renderCount()}}),i=setInterval(function(){(function(){for(var t=0,e=n;t<e.length;t++){var i=e[t];if(i.wa.isVisible&&i.rc>=i.w.renderCount())return!1}return!0})()&&(clearInterval(i),e(t))},20)},e}(Array),pe=function(t){function e(){return t.call(this)||this}return se(e,t),e.prototype.createTabBar=function(){var e=t.prototype.createTabBar.call(this);return e.tabsMovable=this._owner.tabsMovable,e},e}(Yt.Renderer),fe=function(t){function e(e){void 0===e&&(e={});var n=this;return e.renderer=e.renderer||new pe,(n=t.call(this,e)||this)._renderer instanceof pe&&(n._renderer._owner=n),n._content=ue.create(),n._contentMap={},n}return se(e,t),e.prototype.appendContent=function(t){this._content.push(t),this._contentMap[t.widget.id()]=t},e.prototype.removeContent=function(t){var e=this._content.indexOf(t);e>=0&&this._content.splice(e,1),delete this._contentMap[t.widget.id()],t.dispose()},e.prototype.content=function(){return this._content},e.prototype.serializeWidget=function(t){if(t instanceof le)try{return{__id:t.widget.id()}}catch(t){return{exception:{message:t.message,stack:t.stack}}}return null},e.prototype.deserializeWidget=function(t){var e=this._contentMap[t.__id];return e||(e=new le(void 0,t)),e},e.prototype.serializeITabAreaConfig=function(t,e){var n=this;return ae(ae({},t),{widgets:t.widgets.map(function(t){return e?n.deserializeWidget(t):n.serializeWidget(t)})})},e.prototype.serializeISplitAreaConfig=function(t,e){var n=this;return ae(ae({},t),{children:t.children.map(function(t){return n.serializeAreaConfig(t,e)})})},e.prototype.serializeAreaConfig=function(t,e){if(t)switch(t.type){case"tab-area":return this.serializeITabAreaConfig(t,e);case"split-area":return this.serializeISplitAreaConfig(t,e)}},e.prototype.saveLayout=function(){return{main:this.serializeAreaConfig(t.prototype.saveLayout.call(this).main,!1)}},e.prototype.restoreLayout=function(e){return t.prototype.restoreLayout.call(this,{main:this.serializeAreaConfig(e.main,!0)})},e}(Yt);he('.p-DockPanel-overlay{background:hsla(0,0%,100%,.6);border:1px dashed #000;transition-duration:.15s;transition-property:top,left,right,bottom;transition-timing-function:ease}.p-TabBar{max-height:24px;min-height:24px}.p-TabBar-content{align-items:flex-end;min-height:0;min-width:0}.p-TabPanel-tabBar .p-TabBar-content{border-bottom:1px solid silver}.p-TabBar-tab{background:#e5e5e5;border:1px solid silver;border-bottom:none;flex:0 1 125px;font:12px Helvetica,Arial,sans-serif;line-height:20px;margin-left:-1px;max-height:20px;min-height:20px;min-width:35px;padding:0 10px}.p-TabBar-tab.p-mod-current{background:#fff}.p-TabBar-tab:hover:not(.p-mod-current){background:#f0f0f0}.p-TabBar-tab:first-child{margin-left:0}.p-TabBar-tab.p-mod-current{max-height:23px;min-height:23px;transform:translateY(1px)}.p-TabBar-tabCloseIcon,.p-TabBar-tabIcon,.p-TabBar-tabLabel{display:inline-block}.p-TabBar-tab.p-mod-closable>.p-TabBar-tabCloseIcon{margin-left:4px}.p-TabBar-tab.p-mod-closable>.p-TabBar-tabCloseIcon:before{content:"\\f00d";font-family:FontAwesome}.p-TabBar-tab.p-mod-drag-image{border:none;box-shadow:1px 1px 2px rgba(0,0,0,.3);max-height:23px;min-height:23px;min-width:125px;transform:translateX(-40%) translateY(-58%)}.p-Widget.p-TabBar.p-DockPanel-tabBar.hide{max-height:1px!important;min-height:1px!important}.p-Widget.p-TabBar.p-DockPanel-tabBar.hide .p-TabBar-tab.p-mod-current{display:none}');var me=function(n){function i(){var t=n.call(this)||this;return t._dock=new fe({mode:"multiple-document"}),t._layoutObj=null,t._lazyLayoutChanged=e.Utility.debounce(function(){return de(t,void 0,void 0,function(){return ce(this,function(t){return this.layoutChanged(),[2]})})},1e3),t._tag="div",t._dock.id="p"+t.id(),Z.installMessageHook(t,t),t}return se(i,n),i.prototype.getWidgetAdapter=function(t){var e=null;return this._dock.content().some(function(n){return n.widget===t&&(e=n,!0)}),e},i.prototype.addWidget=function(t,e,n,i,o,r){void 0===n&&(n="split-right"),void 0===r&&(r=8);var s={mode:n,ref:this.getWidgetAdapter(i)},a=new le(this,t,{},o);return a.title.label=e,a.padding=r,this._dock.addWidget(a,s),this._dock.appendContent(a),this._dock.tabsMovable=!0,this},i.prototype.removeWidget=function(t){var e=this.getWidgetAdapter(t);return e&&(t.target(null),this._dock.removeContent(e)),this},i.prototype.isVisible=function(t){return this.getWidgetAdapter(t).isVisible},i.prototype.widgetAdapters=function(){return this._dock.content()},i.prototype.widgets=function(){return this._dock.content().map(function(t){return t.widget})},i.prototype.layout=function(t){return arguments.length?(this._dock.restoreLayout(t),this):this._dock.saveLayout()},i.prototype.layoutObj=function(t){return this._layoutObj=t,this},i.prototype.enter=function(t,e){n.prototype.enter.call(this,t,e),this._pPlaceholder=e.append("div"),ft.attach(this._dock,this._pPlaceholder.node())},i.prototype.update=function(t,e){n.prototype.update.call(this,t,e),this._pPlaceholder.style("width",this.width()+"px").style("height",this.height()+"px").style("overflow","hidden"),e.select(".p-Widget").style("width",this._pPlaceholder.node().clientWidth+"px").style("height",this.height()+"px"),this.widgets().forEach(function(t){return t.render()})},i.prototype.exit=function(t,e){var i=this;(function(t,e,n){if(n||2===arguments.length)for(var i,o=0,r=e.length;o<r;o++)!i&&o in e||(i||(i=Array.prototype.slice.call(e,0,o)),i[o]=e[o]);return t.concat(i||Array.prototype.slice.call(e))})([],this.widgets(),!0).forEach(function(t){return i.removeWidget(t)}),n.prototype.exit.call(this,t,e)},i.prototype.render=function(t){var i=this,o=this;return null!==this._layoutObj&&(this.layout(this._layoutObj),this.layoutObj(null)),n.prototype.render.call(this,function(n){i._dock.content().watchRendered(i,t),i._dock.update(),setTimeout(function(){var t=i.element().selectAll(".p-Widget.p-TabBar.p-DockPanel-tabBar"),n=!1;t.each(function(){var t=e.select(this),i=t.node().childNodes[0].childNodes.length,r=o.hideSingleTabs()&&1===i;r!==t.classed("hide")&&(t.classed("hide",r),n=!0)}),n&&i._dock.fit()},0)})},i.prototype.refit=function(){this._dock.fit()},i.prototype.messageHook=function(t,e){return t===this&&this.processMessage(e),!0},i.prototype.processMessage=function(e){switch(e.type){case t.Msg.WAActivateRequest.type:var n=e.wa,i=n.widget;this._prevActive!==i&&(this._prevActive=i,this.childActivation(i,n));break;case t.Msg.WALayoutChanged.type:this._lazyLayoutChanged()}},i.prototype.active=function(){return this._prevActive},i.prototype.childActivation=function(t,e){},i.prototype.layoutChanged=function(){},i}(e.HTMLWidget);me.prototype._class+=" phosphor_DockPanel",me.prototype.publish("hideSingleTabs",!1,"boolean");var ge=function(t){function e(e){void 0===e&&(e="vertical");var n=t.call(this)||this;return n.content=ue.create(),n._split=new At({orientation:e}),n._tag="div",n._split.id="p"+n.id(),n}return se(e,t),e.prototype.getWidgetAdapter=function(t){var e=null;return this.content.some(function(n){return n.widget===t&&(e=n,!0)}),e},e.prototype.addWidget=function(t){var e=new le(this,t);return this._split.addWidget(e),this.content.push(e),this},e.prototype.relativeSizes=function(t){return arguments.length?(this._split.setRelativeSizes(t),this):this._split.relativeSizes()},e.prototype.enter=function(e,n){t.prototype.enter.call(this,e,n),ft.attach(this._split,e)},e.prototype.update=function(e,n){t.prototype.update.call(this,e,n),n.select(".p-Widget").style("width",this.width()+"px").style("height",this.height()+"px")},e.prototype.exit=function(e,n){t.prototype.exit.call(this,e,n)},e.prototype.render=function(e){var n=this;return t.prototype.render.call(this,function(t){n.content.watchRendered(n,e),n._split.update()})},e}(e.HTMLWidget);ge.prototype._class+=" phosphor_SplitPanel";var ve=function(t){function e(){var e=t.call(this)||this;return e._tab=new ie({tabPlacement:"top"}),e.content=ue.create(),e._tag="div",e._tab.id="p"+e.id(),e}return se(e,t),e.prototype.getWidget=function(t){if(t instanceof le)return t.widget},e.prototype.getWidgetAdapter=function(t){var e=null;return this.content.some(function(n){return n.widget===t&&(e=n,!0)}),e},e.prototype.addWidget=function(t,e,n){void 0===n&&(n={}),this._prevActive||(this._prevActive=t);var i=new le(this,t,void 0,void 0,n);return i.title.label=e,i.padding=8,this._tab.addWidget(i),this.content.push(i),this},e.prototype.removeWidget=function(t){var e=this.getWidgetAdapter(t);if(e){var n=this.content.indexOf(e);n>=0&&this.content.splice(n,1),t.target(null),e.dispose()}return this},e.prototype.enter=function(e,n){t.prototype.enter.call(this,e,n),ft.attach(this._tab,e)},e.prototype.update=function(e,n){t.prototype.update.call(this,e,n),n.select(".p-Widget").style("width",this.width()+"px").style("height",this.height()+"px")},e.prototype.exit=function(e,n){t.prototype.exit.call(this,e,n)},e.prototype.render=function(e){var n=this;return t.prototype.render.call(this,function(t){n.content.watchRendered(n,e),n._tab.update()})},e.prototype.messageHook=function(t,e){return t===this&&this.processMessage(e),!0},e.prototype.processMessage=function(t){if("wa-activate-request"===t.type){var e=t.wa.widget;this._prevActive!==e&&(this._prevActive=e,this.childActivation(e))}},e.prototype.childActivation=function(t){},e.prototype.active=function(t){return arguments.length?(this._tab.currentWidget=this.getWidgetAdapter(t),this):this.getWidget(this._tab.currentWidget)},e}(e.HTMLWidget);ve.prototype._class+=" phosphor_TabPanel",t.BUILD_VERSION="2.108.6",t.ContextMenu=Ht,t.DockPanel=me,t.PKG_NAME="@hpcc-js/phosphor",t.PKG_VERSION="2.20.3",t.SplitPanel=ge,t.TabPanel=ve,t.WidgetAdapter=le,t.WidgetAdapterArray=ue});
|
|
77
77
|
//# sourceMappingURL=index.min.js.map
|