1import{b as G,c as zn,f as Gt}from"/user-tutorials/build/_shared/chunk-OZE3FFNP.js";function le(n){var t;return typeof n.iter=="function"?t=n.iter():t=new An(n),t}function R(n,t){for(var e=0,i=le(n),r;(r=i.next())!==void 0;)if(t(r,e++)===!1)return}function $t(n){for(var t=0,e=[],i=le(n),r;(r=i.next())!==void 0;)e[t++]=r;return e}function vt(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return new De(le(n.map(le)))}function _e(){return new En}function Zt(n,t){return new Tn(le(n),t)}function Ne(n,t){for(var e=0,i=le(n),r;(r=i.next())!==void 0;)if(t(r,e++))return r}function Qt(n,t){var e=le(n),i=e.next();if(i!==void 0){for(var r=i;(i=e.next())!==void 0;)t(i,r)>0&&(r=i);return r}}function Ie(n,t){return new On(le(n),t)}function _t(n,t,e){var i=0,r=le(n),s=r.next();if(s===void 0&&e===void 0)throw new TypeError("Reduce of empty iterable with no initial value.");if(s===void 0)return e;var c=r.next();if(c===void 0&&e===void 0)return s;if(c===void 0)return t(e,s,i++);var d;e===void 0?d=t(s,c,i++):d=t(t(e,s,i++),c,i++);for(var m;(m=r.next())!==void 0;)d=t(d,m,i++);return d}function Ge(n){return new Bn(n,1)}var E,An,Qn,Jn,ei,ti,De,En,ni,Tn,On,ii,mt,Bn,ri,oi,He,ai,si,Fe=G(()=>{(function(n){function t(l,v,a,o){a===void 0&&(a=0),o===void 0&&(o=-1);var u=l.length;if(u===0)return-1;a<0?a=Math.max(0,a+u):a=Math.min(a,u-1),o<0?o=Math.max(0,o+u):o=Math.min(o,u-1);var w;o<a?w=o+1+(u-a):w=o-a+1;for(var h=0;h<w;++h){var I=(a+h)%u;if(l[I]===v)return I}return-1}n.firstIndexOf=t;function e(l,v,a,o){a===void 0&&(a=-1),o===void 0&&(o=0);var u=l.length;if(u===0)return-1;a<0?a=Math.max(0,a+u):a=Math.min(a,u-1),o<0?o=Math.max(0,o+u):o=Math.min(o,u-1);var w;a<o?w=a+1+(u-o):w=a-o+1;for(var h=0;h<w;++h){var I=(a-h+u)%u;if(l[I]===v)return I}return-1}n.lastIndexOf=e;function i(l,v,a,o){a===void 0&&(a=0),o===void 0&&(o=-1);var u=l.length;if(u===0)return-1;a<0?a=Math.max(0,a+u):a=Math.min(a,u-1),o<0?o=Math.max(0,o+u):o=Math.min(o,u-1);var w;o<a?w=o+1+(u-a):w=o-a+1;for(var h=0;h<w;++h){var I=(a+h)%u;if(v(l[I],I))return I}return-1}n.findFirstIndex=i;function r(l,v,a,o){a===void 0&&(a=-1),o===void 0&&(o=0);var u=l.length;if(u===0)return-1;a<0?a=Math.max(0,a+u):a=Math.min(a,u-1),o<0?o=Math.max(0,o+u):o=Math.min(o,u-1);var w;a<o?w=a+1+(u-o):w=a-o+1;for(var h=0;h<w;++h){var I=(a-h+u)%u;if(v(l[I],I))return I}return-1}n.findLastIndex=r;function s(l,v,a,o){a===void 0&&(a=0),o===void 0&&(o=-1);var u=i(l,v,a,o);return u!==-1?l[u]:void 0}n.findFirstValue=s;function c(l,v,a,o){a===void 0&&(a=-1),o===void 0&&(o=0);var u=r(l,v,a,o);return u!==-1?l[u]:void 0}n.findLastValue=c;function d(l,v,a,o,u){o===void 0&&(o=0),u===void 0&&(u=-1);var w=l.length;if(w===0)return 0;o<0?o=Math.max(0,o+w):o=Math.min(o,w-1),u<0?u=Math.max(0,u+w):u=Math.min(u,w-1);for(var h=o,I=u-o+1;I>0;){var z=I>>1,B=h+z;a(l[B],v)<0?(h=B+1,I-=z+1):I=z}return h}n.lowerBound=d;function m(l,v,a,o,u){o===void 0&&(o=0),u===void 0&&(u=-1);var w=l.length;if(w===0)return 0;o<0?o=Math.max(0,o+w):o=Math.min(o,w-1),u<0?u=Math.max(0,u+w):u=Math.min(u,w-1);for(var h=o,I=u-o+1;I>0;){var z=I>>1,B=h+z;a(l[B],v)>0?I=z:(h=B+1,I-=z+1)}return h}n.upperBound=m;function f(l,v,a){if(l===v)return!0;if(l.length!==v.length)return!1;for(var o=0,u=l.length;o<u;++o)if(a?!a(l[o],v[o]):l[o]!==v[o])return!1;return!0}n.shallowEqual=f;function y(l,v){v===void 0&&(v={});var a=v.start,o=v.stop,u=v.step;if(u===void 0&&(u=1),u===0)throw new Error("Slice `step` cannot be zero.");var w=l.length;a===void 0?a=u<0?w-1:0:a<0?a=Math.max(a+w,u<0?-1:0):a>=w&&(a=u<0?w-1:w),o===void 0?o=u<0?-1:w:o<0?o=Math.max(o+w,u<0?-1:0):o>=w&&(o=u<0?w-1:w);var h;u<0&&o>=a||u>0&&a>=o?h=0:u<0?h=Math.floor((o-a+1)/u+1):h=Math.floor((o-a-1)/u+1);for(var I=[],z=0;z<h;++z)I[z]=l[a+z*u];return I}
1n.slice=y;function x(l,v,a){var o=l.length;if(!(o<=1)&&(v<0?v=Math.max(0,v+o):v=Math.min(v,o-1),a<0?a=Math.max(0,a+o):a=Math.min(a,o-1),v!==a)){for(var u=l[v],w=v<a?1:-1,h=v;h!==a;h+=w)l[h]=l[h+w];l[a]=u}}n.move=x;function g(l,v,a){v===void 0&&(v=0),a===void 0&&(a=-1);var o=l.length;if(!(o<=1))for(v<0?v=Math.max(0,v+o):v=Math.min(v,o-1),a<0?a=Math.max(0,a+o):a=Math.min(a,o-1);v<a;){var u=l[v],w=l[a];l[v++]=w,l[a--]=u}}n.reverse=g;function _(l,v,a,o){a===void 0&&(a=0),o===void 0&&(o=-1);var u=l.length;if(!(u<=1)&&(a<0?a=Math.max(0,a+u):a=Math.min(a,u-1),o<0?o=Math.max(0,o+u):o=Math.min(o,u-1),!(a>=o))){var w=o-a+1;if(v>0?v=v%w:v<0&&(v=(v%w+w)%w),v!==0){var h=a+v;g(l,a,h-1),g(l,h,o),g(l,a,o)}}}n.rotate=_;function p(l,v,a,o){a===void 0&&(a=0),o===void 0&&(o=-1);var u=l.length;if(u!==0){a<0?a=Math.max(0,a+u):a=Math.min(a,u-1),o<0?o=Math.max(0,o+u):o=Math.min(o,u-1);var w;o<a?w=o+1+(u-a):w=o-a+1;for(var h=0;h<w;++h)l[(a+h)%u]=v}}n.fill=p;function b(l,v,a){var o=l.length;v<0?v=Math.max(0,v+o):v=Math.min(v,o);for(var u=o;u>v;--u)l[u]=l[u-1];l[v]=a}n.insert=b;function M(l,v){var a=l.length;if(v<0&&(v+=a),!(v<0||v>=a)){for(var o=l[v],u=v+1;u<a;++u)l[u-1]=l[u];return l.length=a-1,o}}n.removeAt=M;function L(l,v,a,o){a===void 0&&(a=0),o===void 0&&(o=-1);var u=t(l,v,a,o);return u!==-1&&M(l,u),u}n.removeFirstOf=L;function S(l,v,a,o){a===void 0&&(a=-1),o===void 0&&(o=0);var u=e(l,v,a,o);return u!==-1&&M(l,u),u}n.removeLastOf=S;function C(l,v,a,o){a===void 0&&(a=0),o===void 0&&(o=-1);var u=l.length;if(u===0)return 0;a<0?a=Math.max(0,a+u):a=Math.min(a,u-1),o<0?o=Math.max(0,o+u):o=Math.min(o,u-1);for(var w=0,h=0;h<u;++h)a<=o&&h>=a&&h<=o&&l[h]===v||o<a&&(h<=o||h>=a)&&l[h]===v?w++:w>0&&(l[h-w]=l[h]);return w>0&&(l.length=u-w),w}n.removeAllOf=C;function k(l,v,a,o){a===void 0&&(a=0),o===void 0&&(o=-1);var u,w=i(l,v,a,o);return w!==-1&&(u=M(l,w)),{index:w,value:u}}n.removeFirstWhere=k;function D(l,v,a,o){a===void 0&&(a=-1),o===void 0&&(o=0);var u,w=r(l,v,a,o);return w!==-1&&(u=M(l,w)),{index:w,value:u}}n.removeLastWhere=D;function A(l,v,a,o){a===void 0&&(a=0),o===void 0&&(o=-1);var u=l.length;if(u===0)return 0;a<0?a=Math.max(0,a+u):a=Math.min(a,u-1),o<0?o=Math.max(0,o+u):o=Math.min(o,u-1);for(var w=0,h=0;h<u;++h)a<=o&&h>=a&&h<=o&&v(l[h],h)||o<a&&(h<=o||h>=a)&&v(l[h],h)?w++:w>0&&(l[h-w]=l[h]);return w>0&&(l.length=u-w),w}n.removeAllWhere=A})(E||(E={}));An=function(){function n(t){this._index=0,this._source=t}return n.prototype.iter=function(){return this},n.prototype.clone=function(){var t=new n(this._source);return t._index=this._index,t},n.prototype.next=function(){if(!(this._index>=this._source.length))return this._source[this._index++]},n}(),Qn=function(){function n(t,e){e===void 0&&(e=Object.keys(t)),this._index=0,this._source=t,this._keys=e}return n.prototype.iter=function(){return this},n.prototype.clone=function(){var t=new n(this._source,this._keys);return t._index=this._index,t},n.prototype.next=function(){if(!(this._index>=this._keys.length)){var t=this._keys[this._index++];return t in this._source?t:this.next()}},n}(),Jn=function(){function n(t,e){e===void 0&&(e=Object.keys(t)),this._index=0,this._source=t,this._keys=e}return n.prototype.iter=function(){return this},n.prototype.clone=function(){var t=new n(this._source,this._keys);return t._index=this._index,t},n.prototype.next=function(){if(!(this._index>=this._keys.length)){var t=this._keys[this._index++];return t in this._source?this._source[t]:this.next()}},n}(),ei=function(){function n(t,e){e===void 0&&(e=Object.keys(t)),this._index=0,this._source=t,this._keys=e}return n.prototype.iter=function(){return this},n.prototype.clone=function(){var t=new n(this._source,this._keys);return t._index=this._index,t},n.prototype.next=function(){if(!(this._index>=this._keys.length)){var t=this._keys[this._index++];return t in this._source?[t,this._source[t]]:this.next()}},n}(),ti=function(){function n(t){this._fn=t}return n.prototype.iter=function(){return this},n.prototype.clone=function(){throw new Error("An `FnIterator` cannot be cloned.")},n.prototype.next=function(){return this._fn.call(void 0)},n}();De=function(){function n(t){this._cloned=!1,this._source=t,this._active=void 0}return n.prototype.iter=function(){return this},n.prototype.clone=function(){var t=new n(this._source.clone());return t._active=this._active&&this._active.clone(),t._cloned=!0,this._cloned=!0,t},n.prototype.next=function(){if(this._active===void 0){var t=this._source.next();if(t===void 0)return;this._active=this._cloned?t.clone():t}var e=this._active.next();return e!==void 0?e:(this._active=void 0,this.next())},n}();En=function(){function n(){}return n.prototype.iter=function(){return this},n.prototype.clone=function(){return new n},n.prototype.next=function(){},n}(),ni=function(){function n(t,e){this._source=t,this._index=e}return n.prototype.iter=function(){return this},n.prototype.clone=function(){return new n(this._source.clone(),this._index)},n.prototype.next=function(){var t=this._source.next();if(t!==void 0)return[this._index++,t]},n}();Tn=function(){function n(t,e){this._index=0,this._source=t,this._fn=e}return n.prototype.iter=function(){return this},n.prototype.clone=function(){var t=new n(this._source.clone(),this._fn);return t._index=this._index,t},n.prototype.next=function(){for(var t=this._fn,e=this._source,i;(i=e.next())!==void 0;)if(t(i,this._index++))return i},n}();On=function(){function n(t,e){this._index=0,this._source=t,this._fn=e}return n.prototype.iter=function(){return this},n.prototype.clone=function(){var t=new n(this._source.clone(),this._fn);return t._index=this._index,t},n.prototype.next=function(){var t=this._source.next();if(t!==void 0)return this._fn.call(void 0,t,this._index++)},n}(),ii=function(){function n(t,e,i){this._index=0,this._start=t,this._stop=e,this._step=i,this._length=mt.rangeLength(t,e,i)}return n.prototype.iter=function(){return this},n.prototype.clone=function(){var t=new n(this._start,this._stop,this._step);return t._index=this._index,t},n.prototype.next=function(){if(!(this._index>=this._length))return this._start+this._step*this._index++},n}();(function(n){function t(e,i,r){return r===0?1/0:e>i&&r>0||e<i&&r<0?0:Math.ceil((i-e)/r)}n.rangeLength=t})(mt||(mt={}));Bn=function(){function n(t,e){this._value=t,this._count=e}return n.prototype.iter=function(){return this},n.prototype.clone=function(){return new n(this._value,this._count)}
1,n.prototype.next=function(){if(!(this._count<=0))return this._count--,this._value},n}(),ri=function(){function n(t){this._source=t,this._index=t.length-1}return n.prototype.iter=function(){return this},n.prototype.clone=function(){var t=new n(this._source);return t._index=this._index,t},n.prototype.next=function(){if(!(this._index<0||this._index>=this._source.length))return this._source[this._index--]},n}(),oi=function(){function n(t,e){this._source=t,this._step=e}return n.prototype.iter=function(){return this},n.prototype.clone=function(){return new n(this._source.clone(),this._step)},n.prototype.next=function(){for(var t=this._source.next(),e=this._step-1;e>0;--e)this._source.next();return t},n}();(function(n){function t(c,d,m){m===void 0&&(m=0);for(var f=new Array(d.length),y=0,x=m,g=d.length;y<g;++y,++x){if(x=c.indexOf(d[y],x),x===-1)return null;f[y]=x}return f}n.findIndices=t;function e(c,d,m){m===void 0&&(m=0);var f=t(c,d,m);if(!f)return null;for(var y=0,x=0,g=f.length;x<g;++x){var _=f[x]-m;y+=_*_}return{score:y,indices:f}}n.matchSumOfSquares=e;function i(c,d,m){m===void 0&&(m=0);var f=t(c,d,m);if(!f)return null;for(var y=0,x=m-1,g=0,_=f.length;g<_;++g){var p=f[g];y+=p-x-1,x=p}return{score:y,indices:f}}n.matchSumOfDeltas=i;function r(c,d,m){for(var f=[],y=0,x=0,g=d.length;y<g;){for(var _=d[y],p=d[y];++y<g&&d[y]===p+1;)p++;x<_&&f.push(c.slice(x,_)),_<p+1&&f.push(m(c.slice(_,p+1))),x=p+1}return x<c.length&&f.push(c.slice(x)),f}n.highlight=r;function s(c,d){return c<d?-1:c>d?1:0}n.cmp=s})(He||(He={}));ai=function(){function n(t,e){this._source=t,this._count=e}return n.prototype.iter=function(){return this},n.prototype.clone=function(){return new n(this._source.clone(),this._count)},n.prototype.next=function(){if(!(this._count<=0)){var t=this._source.next();if(t!==void 0)return this._count--,t}},n}(),si=function(){function n(t){this._source=t}return n.prototype.iter=function(){return this},n.prototype.clone=function(){return new n(this._source.map(function(t){return t.clone()}))},n.prototype.next=function(){for(var t=new Array(this._source.length),e=0,i=this._source.length;e<i;++e){var r=this._source[e].next();if(r===void 0)return;t[e]=r}return t},n}()});var Jt,W,$,me,pe,gt=G(()=>{(function(n){function t(e){var i=document.body,r=function(s){s.preventDefault(),s.stopPropagation(),s.clipboardData.setData("text",e),i.removeEventListener("copy",r,!0)};i.addEventListener("copy",r,!0),document.execCommand("copy")}n.copyText=t})(Jt||(Jt={}));(function(n){function t(s){var c=window.getComputedStyle(s),d=parseFloat(c.borderTopWidth)||0,m=parseFloat(c.borderLeftWidth)||0,f=parseFloat(c.borderRightWidth)||0,y=parseFloat(c.borderBottomWidth)||0,x=parseFloat(c.paddingTop)||0,g=parseFloat(c.paddingLeft)||0,_=parseFloat(c.paddingRight)||0,p=parseFloat(c.paddingBottom)||0,b=m+g+_+f,M=d+x+p+y;return{borderTop:d,borderLeft:m,borderRight:f,borderBottom:y,paddingTop:x,paddingLeft:g,paddingRight:_,paddingBottom:p,horizontalSum:b,verticalSum:M}}n.boxSizing=t;function e(s){var c=window.getComputedStyle(s),d=parseFloat(c.minWidth)||0,m=parseFloat(c.minHeight)||0,f=parseFloat(c.maxWidth)||1/0,y=parseFloat(c.maxHeight)||1/0;return f=Math.max(d,f),y=Math.max(m,y),{minWidth:d,minHeight:m,maxWidth:f,maxHeight:y}}n.sizeLimits=e;function i(s,c,d){var m=s.getBoundingClientRect();return c>=m.left&&c<m.right&&d>=m.top&&d<m.bottom}n.hitTest=i;function r(s,c){var d=s.getBoundingClientRect(),m=c.getBoundingClientRect();if(!(m.top<=d.top&&m.bottom>=d.bottom)){if(m.top<d.top&&m.height<=d.height){s.scrollTop-=d.top-m.top;return}if(m.bottom>d.bottom&&m.height>=d.height){s.scrollTop-=d.top-m.top;return}if(m.top<d.top&&m.height>d.height){s.scrollTop-=d.bottom-m.bottom;return}if(m.bottom>d.bottom&&m.height<d.height){s.scrollTop-=d.bottom-m.bottom;return}}}n.scrollIntoViewIfNeeded=r})(W||(W={}));(function(n){n.IS_MAC=!!navigator.platform.match(/Mac/i),n.IS_WIN=!!navigator.platform.match(/Win/i),n.IS_IE=/Trident/.test(navigator.userAgent),n.IS_EDGE=/Edge/.test(navigator.userAgent);function t(e){return n.IS_MAC?e.metaKey:e.ctrlKey}n.accelKey=t})($||($={}));(function(n){function t(r){if(r in pe.specificityCache)return pe.specificityCache[r];var s=pe.calculateSingle(r);return pe.specificityCache[r]=s}n.calculateSpecificity=t;function e(r){if(r in pe.validityCache)return pe.validityCache[r];var s=!0;try{pe.testElem.querySelector(r)}catch{s=!1}return pe.validityCache[r]=s}n.isValid=e;function i(r,s){return pe.protoMatchFunc.call(r,s)}n.matches=i})(me||(me={}));(function(n){n.specificityCache=Object.create(null),n.validityCache=Object.create(null),n.testElem=document.createElement("div"),n.protoMatchFunc=function(){var y=Element.prototype;return y.matches||y.matchesSelector||y.mozMatchesSelector||y.msMatchesSelector||y.oMatchesSelector||y.webkitMatchesSelector||function(x){var g=this,_=g.ownerDocument?g.ownerDocument.querySelectorAll(x):[];return Array.prototype.indexOf.call(_,g)!==-1}}();function t(y){y=y.split(",",1)[0];var x=0,g=0,_=0;function p(b){var M=y.match(b);return M===null?!1:(y=y.slice(M[0].length),!0)}for(y=y.replace(f," $1 ");y.length>0;){if(p(e)){x++;continue}if(p(i)){g++;continue}if(p(r)){g++;continue}if(p(c)){_++;continue}if(p(d)){g++;continue}if(p(s)){_++;continue}if(!p(m))return 0}return x=Math.min(x,255),g=Math.min(g,255),_=Math.min(_,255),x<<16|g<<8|_}n.calculateSingle=t;var e=/^#[^\s\+>~#\.\[:]+/,i=/^\.[^\s\+>~#\.\[:]+/,r=/^\[[^\]]+\]/,s=/^[^\s\+>~#\.\[:]+/,c=/^(::[^\s\+>~#\.\[:]+|:first-line|:first-letter|:before|:after)/,d=/^:[^\s\+>~#\.\[:]+/,m=/^[\s\+>~\*]+/,f=/:not\(([^\)]+)\)/g})(pe||(pe={}))});function bt(n){var t;return typeof n.iter=="function"?t=n.iter():t=new Pn(n),t}function tn(n,t){for(var e=0,i=bt(n),r;(r=i.next())!==void 0;)if(t(r,e++)===!1)return}function nn(n,t){for(var e=0,i=bt(n),r;(r=i.next())!==void 0;)if(!t(r,e++))return!1;return!0}function rn(n,t){for(var e=0,i=bt(n),r;(r=i.next())!==void 0;)if(t(r,e++))return!0;return!1}function on(n){var t;return typeof n.retro=="function"?t=n.retro():t=new Rn(n),t}var $e,Pn,di,hi,fi,li,pi,mi,vi,_i,gi,yi,yt,bi,Rn,xi,en,wi,Mi,an=G(()=>{(function(n){function t(l,v,a,o){a===void 0&&(a=0),o===void 0&&(o=-1);var u=l.length;if(u===0)return-1;a<0?a=Math.max(0,a+u):a=Math.min(a,u-1),o<0?o=Math.max(0,o+u):o=Math.min(o,u-1);var w;o<a?w=o+1+(u-a):w=o-a+1;for(var h=0;h<w;++h){var I=(a+h)%u;if(l[I]===v)return I}return-1}n.firstIndexOf=t;function e(l,v,a,o){a===void 0&&(a=-1),o===void 0&&(o=0);var u=l.length;if(u===0)return-1;a<0?a=Math.max(0,a+u):a=Math.min(a,u-1),o<0?o=Math.max(0,o+u):o=Math.min(o,u-1);var w;a<o?w=a+1+(u-o):w=a-o+1;for(var h=0;h<w;++h){var I=(a-h+u)%u;if(l[I]===v)return I}return-1}n.lastIndexOf=e;function i(l,v,a,o){a===void 0&&(a=0),o===void 0&&(o=-1);var u=l.length;if(u===0)return-1;a<0?a=Math.max(0,a+u):a=Math.min(a,u-1),o<0?o=Math.max(0,o+u):o=Math.min(o,u-1);var w;o<a?w=o+1+(u-a):w=o-a+1;for(var h=0;h<w;++h){var I=(a+h)%u;if(v(l[I],I))return I}return-1}n.findFirstIndex=i;function r(l,v,a,o){a===void 0&&(a=-1),o===void 0&&(o=0);var u=l.length;if(u===0)return-1;a<0?a=Math.max(0,a+u):a=Math.min(a,u-1),o<0?o=Math.max(0,o+u):o=Math.min(o,u-1);var w;a<o?w=a+1+(u-o):w=a-o+1;for(var h=0;h<w;++h){var I=(a-h+u)%u;if(v(l[I],I))return I}return-1}n.findLastIndex=r;function s(l,v,a,o){a===void 0&&(a=0),o===void 0&&(o=-1);var u=i(l,v,a,o);return u!==-1?l[u]:void 0}n.findFirstValue=s;function c(l,v,a,o){a===void 0&&(a=-1),o===void 0&&(o=0);var u=r(l,v,a,o);return u!==-1?l[u]:void 0}n.findLastValue=c;function d(l,v,a,o,u){o===void 0&&(o=0),u===void 0&&(u=-1);var w=l.length;if(w===0)return 0;o<0?o=Math.max(0,o+w):o=Math.min(o,w-1),u<0?u=Math.max(0,u+w):u=Math.min(u,w-1);for(var h=o,I=u-o+1;I>0;){var z=I>>1,B=h+z;
1a(l[B],v)<0?(h=B+1,I-=z+1):I=z}return h}n.lowerBound=d;function m(l,v,a,o,u){o===void 0&&(o=0),u===void 0&&(u=-1);var w=l.length;if(w===0)return 0;o<0?o=Math.max(0,o+w):o=Math.min(o,w-1),u<0?u=Math.max(0,u+w):u=Math.min(u,w-1);for(var h=o,I=u-o+1;I>0;){var z=I>>1,B=h+z;a(l[B],v)>0?I=z:(h=B+1,I-=z+1)}return h}n.upperBound=m;function f(l,v,a){if(l===v)return!0;if(l.length!==v.length)return!1;for(var o=0,u=l.length;o<u;++o)if(a?!a(l[o],v[o]):l[o]!==v[o])return!1;return!0}n.shallowEqual=f;function y(l,v){v===void 0&&(v={});var a=v.start,o=v.stop,u=v.step;if(u===void 0&&(u=1),u===0)throw new Error("Slice `step` cannot be zero.");var w=l.length;a===void 0?a=u<0?w-1:0:a<0?a=Math.max(a+w,u<0?-1:0):a>=w&&(a=u<0?w-1:w),o===void 0?o=u<0?-1:w:o<0?o=Math.max(o+w,u<0?-1:0):o>=w&&(o=u<0?w-1:w);var h;u<0&&o>=a||u>0&&a>=o?h=0:u<0?h=Math.floor((o-a+1)/u+1):h=Math.floor((o-a-1)/u+1);for(var I=[],z=0;z<h;++z)I[z]=l[a+z*u];return I}n.slice=y;function x(l,v,a){var o=l.length;if(!(o<=1)&&(v<0?v=Math.max(0,v+o):v=Math.min(v,o-1),a<0?a=Math.max(0,a+o):a=Math.min(a,o-1),v!==a)){for(var u=l[v],w=v<a?1:-1,h=v;h!==a;h+=w)l[h]=l[h+w];l[a]=u}}n.move=x;function g(l,v,a){v===void 0&&(v=0),a===void 0&&(a=-1);var o=l.length;if(!(o<=1))for(v<0?v=Math.max(0,v+o):v=Math.min(v,o-1),a<0?a=Math.max(0,a+o):a=Math.min(a,o-1);v<a;){var u=l[v],w=l[a];l[v++]=w,l[a--]=u}}n.reverse=g;function _(l,v,a,o){a===void 0&&(a=0),o===void 0&&(o=-1);var u=l.length;if(!(u<=1)&&(a<0?a=Math.max(0,a+u):a=Math.min(a,u-1),o<0?o=Math.max(0,o+u):o=Math.min(o,u-1),!(a>=o))){var w=o-a+1;if(v>0?v=v%w:v<0&&(v=(v%w+w)%w),v!==0){var h=a+v;g(l,a,h-1),g(l,h,o),g(l,a,o)}}}n.rotate=_;function p(l,v,a,o){a===void 0&&(a=0),o===void 0&&(o=-1);var u=l.length;if(u!==0){a<0?a=Math.max(0,a+u):a=Math.min(a,u-1),o<0?o=Math.max(0,o+u):o=Math.min(o,u-1);var w;o<a?w=o+1+(u-a):w=o-a+1;for(var h=0;h<w;++h)l[(a+h)%u]=v}}n.fill=p;function b(l,v,a){var o=l.length;v<0?v=Math.max(0,v+o):v=Math.min(v,o);for(var u=o;u>v;--u)l[u]=l[u-1];l[v]=a}n.insert=b;function M(l,v){var a=l.length;if(v<0&&(v+=a),!(v<0||v>=a)){for(var o=l[v],u=v+1;u<a;++u)l[u-1]=l[u];return l.length=a-1,o}}n.removeAt=M;function L(l,v,a,o){a===void 0&&(a=0),o===void 0&&(o=-1);var u=t(l,v,a,o);return u!==-1&&M(l,u),u}n.removeFirstOf=L;function S(l,v,a,o){a===void 0&&(a=-1),o===void 0&&(o=0);var u=e(l,v,a,o);return u!==-1&&M(l,u),u}n.removeLastOf=S;function C(l,v,a,o){a===void 0&&(a=0),o===void 0&&(o=-1);var u=l.length;if(u===0)return 0;a<0?a=Math.max(0,a+u):a=Math.min(a,u-1),o<0?o=Math.max(0,o+u):o=Math.min(o,u-1);for(var w=0,h=0;h<u;++h)a<=o&&h>=a&&h<=o&&l[h]===v||o<a&&(h<=o||h>=a)&&l[h]===v?w++:w>0&&(l[h-w]=l[h]);return w>0&&(l.length=u-w),w}n.removeAllOf=C;function k(l,v,a,o){a===void 0&&(a=0),o===void 0&&(o=-1);var u,w=i(l,v,a,o);return w!==-1&&(u=M(l,w)),{index:w,value:u}}n.removeFirstWhere=k;function D(l,v,a,o){a===void 0&&(a=-1),o===void 0&&(o=0);var u,w=r(l,v,a,o);return w!==-1&&(u=M(l,w)),{index:w,value:u}}n.removeLastWhere=D;function A(l,v,a,o){a===void 0&&(a=0),o===void 0&&(o=-1);var u=l.length;if(u===0)return 0;a<0?a=Math.max(0,a+u):a=Math.min(a,u-1),o<0?o=Math.max(0,o+u):o=Math.min(o,u-1);for(var w=0,h=0;h<u;++h)a<=o&&h>=a&&h<=o&&v(l[h],h)||o<a&&(h<=o||h>=a)&&v(l[h],h)?w++:w>0&&(l[h-w]=l[h]);return w>0&&(l.length=u-w),w}n.removeAllWhere=A})($e||($e={}));Pn=function(){function n(t){this._index=0,this._source=t}return n.prototype.iter=function(){return this},n.prototype.clone=function(){var t=new n(this._source);return t._index=this._index,t},n.prototype.next=function(){if(!(this._index>=this._source.length))return this._source[this._index++]},n}(),di=function(){function n(t,e){e===void 0&&(e=Object.keys(t)),this._index=0,this._source=t,this._keys=e}return n.prototype.iter=function(){return this},n.prototype.clone=function(){var t=new n(this._source,this._keys);return t._index=this._index,t},n.prototype.next=function(){if(!(this._index>=this._keys.length)){var t=this._keys[this._index++];return t in this._source?t:this.next()}},n}(),hi=function(){function n(t,e){e===void 0&&(e=Object.keys(t)),this._index=0,this._source=t,this._keys=e}return n.prototype.iter=function(){return this},n.prototype.clone=function(){var t=new n(this._source,this._keys);return t._index=this._index,t},n.prototype.next=function(){if(!(this._index>=this._keys.length)){var t=this._keys[this._index++];return t in this._source?this._source[t]:this.next()}},n}(),fi=function(){function n(t,e){e===void 0&&(e=Object.keys(t)),this._index=0,this._source=t,this._keys=e}return n.prototype.iter=function(){return this},n.prototype.clone=function(){var t=new n(this._source,this._keys);return t._index=this._index,t},n.prototype.next=function(){if(!(this._index>=this._keys.length)){var t=this._keys[this._index++];return t in this._source?[t,this._source[t]]:this.next()}},n}(),li=function(){function n(t){this._fn=t}return n.prototype.iter=function(){return this},n.prototype.clone=function(){throw new Error("An `FnIterator` cannot be cloned.")},n.prototype.next=function(){return this._fn.call(void 0)},n}(),pi=function(){function n(t){this._cloned=!1,this._source=t,this._active=void 0}return n.prototype.iter=function(){return this},n.prototype.clone=function(){var t=new n(this._source.clone());return t._active=this._active&&this._active.clone(),t._cloned=!0,this._cloned=!0,t},n.prototype.next=function(){if(this._active===void 0){var t=this._source.next();if(t===void 0)return;this._active=this._cloned?t.clone():t}var e=this._active.next();return e!==void 0?e:(this._active=void 0,this.next())},n}(),mi=function(){function n(){}return n.prototype.iter=function(){return this},n.prototype.clone=function(){return new n},n.prototype.next=function(){},n}(),vi=function(){function n(t,e){this._source=t,this._index=e}return n.prototype.iter=function(){return this},n.prototype.clone=function(){return new n(this._source.clone(),this._index)},n.prototype.next=function(){var t=this._source.next();if(t!==void 0)return[this._index++,t]},n}(),_i=function(){function n(t,e){this._index=0,this._source=t,this._fn=e}return n.prototype.iter=function(){return this},n.prototype.clone=function(){var t=new n(this._source.clone(),this._fn);return t._index=this._index,t},n.prototype.next=function(){for(var t=this._fn,e=this._source,i;(i=e.next())!==void 0;)if(t(i,this._index++))return i},n}(),gi=function(){function n(t,e){this._index=0,this._source=t,this._fn=e}return n.prototype.iter=function(){return this},n.prototype.clone=function(){var t=new n(this._source.clone(),this._fn);return t._index=this._index,t},n.prototype.next=function(){var t=this._source.next();if(t!==void 0)return this._fn.call(void 0,t,this._index++)},n}(),yi=function(){function n(t,e,i){this._index=0,this._start=t,this._stop=e,this._step=i,this._length=yt.rangeLength(t,e,i)}return n.prototype.iter=function(){return this},n.prototype.clone=function(){var t=new n(this._start,this._stop,this._step);return t._index=this._index,t},n.prototype.next=function(){if(!(this._index>=this._length))return this._start+this._step*this._index++},n}();(function(n){function t(e,i,r){return r===0?1/0:e>i&&r>0||e<i&&r<0?0:Math.ceil((i-e)/r)}n.rangeLength=t})(yt||(yt={}));bi=function(){function n(t,e){this._value=t,this._count=e}return n.prototype.iter=function(){return this},n.prototype.clone=function(){return new n(this._value,this._count)}
1,n.prototype.next=function(){if(!(this._count<=0))return this._count--,this._value},n}();Rn=function(){function n(t){this._source=t,this._index=t.length-1}return n.prototype.iter=function(){return this},n.prototype.clone=function(){var t=new n(this._source);return t._index=this._index,t},n.prototype.next=function(){if(!(this._index<0||this._index>=this._source.length))return this._source[this._index--]},n}(),xi=function(){function n(t,e){this._source=t,this._step=e}return n.prototype.iter=function(){return this},n.prototype.clone=function(){return new n(this._source.clone(),this._step)},n.prototype.next=function(){for(var t=this._source.next(),e=this._step-1;e>0;--e)this._source.next();return t},n}();(function(n){function t(c,d,m){m===void 0&&(m=0);for(var f=new Array(d.length),y=0,x=m,g=d.length;y<g;++y,++x){if(x=c.indexOf(d[y],x),x===-1)return null;f[y]=x}return f}n.findIndices=t;function e(c,d,m){m===void 0&&(m=0);var f=t(c,d,m);if(!f)return null;for(var y=0,x=0,g=f.length;x<g;++x){var _=f[x]-m;y+=_*_}return{score:y,indices:f}}n.matchSumOfSquares=e;function i(c,d,m){m===void 0&&(m=0);var f=t(c,d,m);if(!f)return null;for(var y=0,x=m-1,g=0,_=f.length;g<_;++g){var p=f[g];y+=p-x-1,x=p}return{score:y,indices:f}}n.matchSumOfDeltas=i;function r(c,d,m){for(var f=[],y=0,x=0,g=d.length;y<g;){for(var _=d[y],p=d[y];++y<g&&d[y]===p+1;)p++;x<_&&f.push(c.slice(x,_)),_<p+1&&f.push(m(c.slice(_,p+1))),x=p+1}return x<c.length&&f.push(c.slice(x)),f}n.highlight=r;function s(c,d){return c<d?-1:c>d?1:0}n.cmp=s})(en||(en={}));wi=function(){function n(t,e){this._source=t,this._count=e}return n.prototype.iter=function(){return this},n.prototype.clone=function(){return new n(this._source.clone(),this._count)},n.prototype.next=function(){if(!(this._count<=0)){var t=this._source.next();if(t!==void 0)return this._count--,t}},n}(),Mi=function(){function n(t){this._source=t}return n.prototype.iter=function(){return this},n.prototype.clone=function(){return new n(this._source.map(function(t){return t.clone()}))},n.prototype.next=function(){for(var t=new Array(this._source.length),e=0,i=this._source.length;e<i;++e){var r=this._source[e].next();if(r===void 0)return;t[e]=r}return t},n}()});function Hn(n){var t;return typeof n.iter=="function"?t=n.iter():t=new Nn(n),t}function tt(n,t){for(var e=0,i=Hn(n),r;(r=i.next())!==void 0;)if(t(r,e++)===!1)return}function wt(){return new Fn}var ee,Nn,Ci,Si,Li,ki,Di,Fn,zi,Ai,Ei,Ti,xt,Oi,Bi,Pi,sn,Ri,Hi,un=G(()=>{(function(n){function t(l,v,a,o){a===void 0&&(a=0),o===void 0&&(o=-1);var u=l.length;if(u===0)return-1;a<0?a=Math.max(0,a+u):a=Math.min(a,u-1),o<0?o=Math.max(0,o+u):o=Math.min(o,u-1);var w;o<a?w=o+1+(u-a):w=o-a+1;for(var h=0;h<w;++h){var I=(a+h)%u;if(l[I]===v)return I}return-1}n.firstIndexOf=t;function e(l,v,a,o){a===void 0&&(a=-1),o===void 0&&(o=0);var u=l.length;if(u===0)return-1;a<0?a=Math.max(0,a+u):a=Math.min(a,u-1),o<0?o=Math.max(0,o+u):o=Math.min(o,u-1);var w;a<o?w=a+1+(u-o):w=a-o+1;for(var h=0;h<w;++h){var I=(a-h+u)%u;if(l[I]===v)return I}return-1}n.lastIndexOf=e;function i(l,v,a,o){a===void 0&&(a=0),o===void 0&&(o=-1);var u=l.length;if(u===0)return-1;a<0?a=Math.max(0,a+u):a=Math.min(a,u-1),o<0?o=Math.max(0,o+u):o=Math.min(o,u-1);var w;o<a?w=o+1+(u-a):w=o-a+1;for(var h=0;h<w;++h){var I=(a+h)%u;if(v(l[I],I))return I}return-1}n.findFirstIndex=i;function r(l,v,a,o){a===void 0&&(a=-1),o===void 0&&(o=0);var u=l.length;if(u===0)return-1;a<0?a=Math.max(0,a+u):a=Math.min(a,u-1),o<0?o=Math.max(0,o+u):o=Math.min(o,u-1);var w;a<o?w=a+1+(u-o):w=a-o+1;for(var h=0;h<w;++h){var I=(a-h+u)%u;if(v(l[I],I))return I}return-1}n.findLastIndex=r;function s(l,v,a,o){a===void 0&&(a=0),o===void 0&&(o=-1);var u=i(l,v,a,o);return u!==-1?l[u]:void 0}n.findFirstValue=s;function c(l,v,a,o){a===void 0&&(a=-1),o===void 0&&(o=0);var u=r(l,v,a,o);return u!==-1?l[u]:void 0}n.findLastValue=c;function d(l,v,a,o,u){o===void 0&&(o=0),u===void 0&&(u=-1);var w=l.length;if(w===0)return 0;o<0?o=Math.max(0,o+w):o=Math.min(o,w-1),u<0?u=Math.max(0,u+w):u=Math.min(u,w-1);for(var h=o,I=u-o+1;I>0;){var z=I>>1,B=h+z;a(l[B],v)<0?(h=B+1,I-=z+1):I=z}return h}n.lowerBound=d;function m(l,v,a,o,u){o===void 0&&(o=0),u===void 0&&(u=-1);var w=l.length;if(w===0)return 0;o<0?o=Math.max(0,o+w):o=Math.min(o,w-1),u<0?u=Math.max(0,u+w):u=Math.min(u,w-1);for(var h=o,I=u-o+1;I>0;){var z=I>>1,B=h+z;
1a(l[B],v)>0?I=z:(h=B+1,I-=z+1)}return h}n.upperBound=m;function f(l,v,a){if(l===v)return!0;if(l.length!==v.length)return!1;for(var o=0,u=l.length;o<u;++o)if(a?!a(l[o],v[o]):l[o]!==v[o])return!1;return!0}n.shallowEqual=f;function y(l,v){v===void 0&&(v={});var a=v.start,o=v.stop,u=v.step;if(u===void 0&&(u=1),u===0)throw new Error("Slice `step` cannot be zero.");var w=l.length;a===void 0?a=u<0?w-1:0:a<0?a=Math.max(a+w,u<0?-1:0):a>=w&&(a=u<0?w-1:w),o===void 0?o=u<0?-1:w:o<0?o=Math.max(o+w,u<0?-1:0):o>=w&&(o=u<0?w-1:w);var h;u<0&&o>=a||u>0&&a>=o?h=0:u<0?h=Math.floor((o-a+1)/u+1):h=Math.floor((o-a-1)/u+1);for(var I=[],z=0;z<h;++z)I[z]=l[a+z*u];return I}n.slice=y;function x(l,v,a){var o=l.length;if(!(o<=1)&&(v<0?v=Math.max(0,v+o):v=Math.min(v,o-1),a<0?a=Math.max(0,a+o):a=Math.min(a,o-1),v!==a)){for(var u=l[v],w=v<a?1:-1,h=v;h!==a;h+=w)l[h]=l[h+w];l[a]=u}}n.move=x;function g(l,v,a){v===void 0&&(v=0),a===void 0&&(a=-1);var o=l.length;if(!(o<=1))for(v<0?v=Math.max(0,v+o):v=Math.min(v,o-1),a<0?a=Math.max(0,a+o):a=Math.min(a,o-1);v<a;){var u=l[v],w=l[a];l[v++]=w,l[a--]=u}}n.reverse=g;function _(l,v,a,o){a===void 0&&(a=0),o===void 0&&(o=-1);var u=l.length;if(!(u<=1)&&(a<0?a=Math.max(0,a+u):a=Math.min(a,u-1),o<0?o=Math.max(0,o+u):o=Math.min(o,u-1),!(a>=o))){var w=o-a+1;if(v>0?v=v%w:v<0&&(v=(v%w+w)%w),v!==0){var h=a+v;g(l,a,h-1),g(l,h,o),g(l,a,o)}}}n.rotate=_;function p(l,v,a,o){a===void 0&&(a=0),o===void 0&&(o=-1);var u=l.length;if(u!==0){a<0?a=Math.max(0,a+u):a=Math.min(a,u-1),o<0?o=Math.max(0,o+u):o=Math.min(o,u-1);var w;o<a?w=o+1+(u-a):w=o-a+1;for(var h=0;h<w;++h)l[(a+h)%u]=v}}n.fill=p;function b(l,v,a){var o=l.length;v<0?v=Math.max(0,v+o):v=Math.min(v,o);for(var u=o;u>v;--u)l[u]=l[u-1];l[v]=a}n.insert=b;function M(l,v){var a=l.length;if(v<0&&(v+=a),!(v<0||v>=a)){for(var o=l[v],u=v+1;u<a;++u)l[u-1]=l[u];return l.length=a-1,o}}n.removeAt=M;function L(l,v,a,o){a===void 0&&(a=0),o===void 0&&(o=-1);var u=t(l,v,a,o);return u!==-1&&M(l,u),u}n.removeFirstOf=L;function S(l,v,a,o){a===void 0&&(a=-1),o===void 0&&(o=0);var u=e(l,v,a,o);return u!==-1&&M(l,u),u}n.removeLastOf=S;function C(l,v,a,o){a===void 0&&(a=0),o===void 0&&(o=-1);var u=l.length;if(u===0)return 0;a<0?a=Math.max(0,a+u):a=Math.min(a,u-1),o<0?o=Math.max(0,o+u):o=Math.min(o,u-1);for(var w=0,h=0;h<u;++h)a<=o&&h>=a&&h<=o&&l[h]===v||o<a&&(h<=o||h>=a)&&l[h]===v?w++:w>0&&(l[h-w]=l[h]);return w>0&&(l.length=u-w),w}n.removeAllOf=C;function k(l,v,a,o){a===void 0&&(a=0),o===void 0&&(o=-1);var u,w=i(l,v,a,o);return w!==-1&&(u=M(l,w)),{index:w,value:u}}n.removeFirstWhere=k;function D(l,v,a,o){a===void 0&&(a=-1),o===void 0&&(o=0);var u,w=r(l,v,a,o);return w!==-1&&(u=M(l,w)),{index:w,value:u}}n.removeLastWhere=D;function A(l,v,a,o){a===void 0&&(a=0),o===void 0&&(o=-1);var u=l.length;if(u===0)return 0;a<0?a=Math.max(0,a+u):a=Math.min(a,u-1),o<0?o=Math.max(0,o+u):o=Math.min(o,u-1);for(var w=0,h=0;h<u;++h)a<=o&&h>=a&&h<=o&&v(l[h],h)||o<a&&(h<=o||h>=a)&&v(l[h],h)?w++:w>0&&(l[h-w]=l[h]);return w>0&&(l.length=u-w),w}n.removeAllWhere=A})(ee||(ee={}));Nn=function(){function n(t){this._index=0,this._source=t}return n.prototype.iter=function(){return this},n.prototype.clone=function(){var t=new n(this._source);return t._index=this._index,t},n.prototype.next=function(){if(!(this._index>=this._source.length))return this._source[this._index++]},n}(),Ci=function(){function n(t,e){e===void 0&&(e=Object.keys(t)),this._index=0,this._source=t,this._keys=e}return n.prototype.iter=function(){return this},n.prototype.clone=function(){var t=new n(this._source,this._keys);return t._index=this._index,t},n.prototype.next=function(){if(!(this._index>=this._keys.length)){var t=this._keys[this._index++];return t in this._source?t:this.next()}},n}(),Si=function(){function n(t,e){e===void 0&&(e=Object.keys(t)),this._index=0,this._source=t,this._keys=e}return n.prototype.iter=function(){return this},n.prototype.clone=function(){var t=new n(this._source,this._keys);return t._index=this._index,t},n.prototype.next=function(){if(!(this._index>=this._keys.length)){var t=this._keys[this._index++];return t in this._source?this._source[t]:this.next()}},n}(),Li=function(){function n(t,e){e===void 0&&(e=Object.keys(t)),this._index=0,this._source=t,this._keys=e}return n.prototype.iter=function(){return this},n.prototype.clone=function(){var t=new n(this._source,this._keys);return t._index=this._index,t},n.prototype.next=function(){if(!(this._index>=this._keys.length)){var t=this._keys[this._index++];return t in this._source?[t,this._source[t]]:this.next()}},n}(),ki=function(){function n(t){this._fn=t}return n.prototype.iter=function(){return this},n.prototype.clone=function(){throw new Error("An `FnIterator` cannot be cloned.")},n.prototype.next=function(){return this._fn.call(void 0)},n}(),Di=function(){function n(t){this._cloned=!1,this._source=t,this._active=void 0}return n.prototype.iter=function(){return this},n.prototype.clone=function(){var t=new n(this._source.clone());return t._active=this._active&&this._active.clone(),t._cloned=!0,this._cloned=!0,t},n.prototype.next=function(){if(this._active===void 0){var t=this._source.next();if(t===void 0)return;this._active=this._cloned?t.clone():t}var e=this._active.next();return e!==void 0?e:(this._active=void 0,this.next())},n}();Fn=function(){function n(){}return n.prototype.iter=function(){return this},n.prototype.clone=function(){return new n},n.prototype.next=function(){},n}(),zi=function(){function n(t,e){this._source=t,this._index=e}return n.prototype.iter=function(){return this},n.prototype.clone=function(){return new n(this._source.clone(),this._index)},n.prototype.next=function(){var t=this._source.next();if(t!==void 0)return[this._index++,t]},n}(),Ai=function(){function n(t,e){this._index=0,this._source=t,this._fn=e}return n.prototype.iter=function(){return this},n.prototype.clone=function(){var t=new n(this._source.clone(),this._fn);return t._index=this._index,t},n.prototype.next=function(){for(var t=this._fn,e=this._source,i;(i=e.next())!==void 0;)if(t(i,this._index++))return i},n}(),Ei=function(){function n(t,e){this._index=0,this._source=t,this._fn=e}return n.prototype.iter=function(){return this},n.prototype.clone=function(){var t=new n(this._source.clone(),this._fn);return t._index=this._index,t},n.prototype.next=function(){var t=this._source.next();if(t!==void 0)return this._fn.call(void 0,t,this._index++)},n}(),Ti=function(){function n(t,e,i){this._index=0,this._start=t,this._stop=e,this._step=i,this._length=xt.rangeLength(t,e,i)}return n.prototype.iter=function(){return this},n.prototype.clone=function(){var t=new n(this._start,this._stop,this._step);return t._index=this._index,t},n.prototype.next=function(){if(!(this._index>=this._length))return this._start+this._step*this._index++},n}();(function(n){function t(e,i,r){return r===0?1/0:e>i&&r>0||e<i&&r<0?0:Math.ceil((i-e)/r)}n.rangeLength=t})(xt||(xt={}));Oi=function(){function n(t,e){this._value=t,this._count=e}return n.prototype.iter=function(){return this},n.prototype.clone=function(){return new n(this._value,this._count)}
1,n.prototype.next=function(){if(!(this._count<=0))return this._count--,this._value},n}(),Bi=function(){function n(t){this._source=t,this._index=t.length-1}return n.prototype.iter=function(){return this},n.prototype.clone=function(){var t=new n(this._source);return t._index=this._index,t},n.prototype.next=function(){if(!(this._index<0||this._index>=this._source.length))return this._source[this._index--]},n}(),Pi=function(){function n(t,e){this._source=t,this._step=e}return n.prototype.iter=function(){return this},n.prototype.clone=function(){return new n(this._source.clone(),this._step)},n.prototype.next=function(){for(var t=this._source.next(),e=this._step-1;e>0;--e)this._source.next();return t},n}();(function(n){function t(c,d,m){m===void 0&&(m=0);for(var f=new Array(d.length),y=0,x=m,g=d.length;y<g;++y,++x){if(x=c.indexOf(d[y],x),x===-1)return null;f[y]=x}return f}n.findIndices=t;function e(c,d,m){m===void 0&&(m=0);var f=t(c,d,m);if(!f)return null;for(var y=0,x=0,g=f.length;x<g;++x){var _=f[x]-m;y+=_*_}return{score:y,indices:f}}n.matchSumOfSquares=e;function i(c,d,m){m===void 0&&(m=0);var f=t(c,d,m);if(!f)return null;for(var y=0,x=m-1,g=0,_=f.length;g<_;++g){var p=f[g];y+=p-x-1,x=p}return{score:y,indices:f}}n.matchSumOfDeltas=i;function r(c,d,m){for(var f=[],y=0,x=0,g=d.length;y<g;){for(var _=d[y],p=d[y];++y<g&&d[y]===p+1;)p++;x<_&&f.push(c.slice(x,_)),_<p+1&&f.push(m(c.slice(_,p+1))),x=p+1}return x<c.length&&f.push(c.slice(x)),f}n.highlight=r;function s(c,d){return c<d?-1:c>d?1:0}n.cmp=s})(sn||(sn={}));Ri=function(){function n(t,e){this._source=t,this._count=e}return n.prototype.iter=function(){return this},n.prototype.clone=function(){return new n(this._source.clone(),this._count)},n.prototype.next=function(){if(!(this._count<=0)){var t=this._source.next();if(t!==void 0)return this._count--,t}},n}(),Hi=function(){function n(t){this._source=t}return n.prototype.iter=function(){return this},n.prototype.clone=function(){return new n(this._source.map(function(t){return t.clone()}))},n.prototype.next=function(){for(var t=new Array(this._source.length),e=0,i=this._source.length;e<i;++e){var r=this._source[e].next();if(r===void 0)return;t[e]=r}return t},n}()});var cn,U,nt,ge,dn=G(()=>{un();cn=function(){function n(t){this._root=new U.LeafNode,this.cmp=t}return Object.defineProperty(n.prototype,"isEmpty",{get:function(){return this._root.size===0},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"size",{get:function(){return this._root.size},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"first",{get:function(){var t=U.firstLeaf(this._root);return t.size>0?t.items[0]:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"last",{get:function(){var t=U.lastLeaf(this._root);return t.size>0?t.items[t.size-1]:void 0},enumerable:!0,configurable:!0}),n.prototype.iter=function(){return U.iterItems(this._root)},n.prototype.retro=function(){return U.retroItems(this._root)},n.prototype.slice=function(t,e){return U.sliceItems(this._root,t,e)},n.prototype.retroSlice=function(t,e){return U.retroSliceItems(this._root,t,e)},n.prototype.at=function(t){return U.itemAt(this._root,t)},n.prototype.has=function(t,e){return U.hasItem(this._root,t,e)},n.prototype.indexOf=function(t,e){return U.indexOf(this._root,t,e)},n.prototype.get=function(t,e){return U.getItem(this._root,t,e)},n.prototype.assign=function(t){this.clear(),this.update(t)},n.prototype.insert=function(t){var e=U.insertItem(this._root,t,this.cmp);return this._root=U.maybeSplitRoot(this._root),e},n.prototype.update=function(t){var e=this;tt(t,function(i){e.insert(i)})},n.prototype.delete=function(t,e){var i=U.deleteItem(this._root,t,e);return this._root=U.maybeExtractRoot(this._root),i},n.prototype.remove=function(t){var e=U.removeItem(this._root,t);return this._root=U.maybeExtractRoot(this._root),e},n.prototype.clear=function(){U.clear(this._root),this._root=new U.LeafNode},n}();(function(n){function t(e,i){var r=new n(i);return r.assign(e),r}n.from=t})(cn||(cn={}));(function(n){var t=function(){function h(){this.items=[],this.sizes=[],this.children=[]}return Object.defineProperty(h.prototype,"type",{get:function(){return 0},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"size",{get:function(){return this.sizes[this.sizes.length-1]},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"width",{get:function(){return this.children.length},enumerable:!0,configurable:!0}),h}();n.BranchNode=t;var e=function(){function h(){this.next=null,this.prev=null,this.items=[]}return Object.defineProperty(h.prototype,"type",{get:function(){return 1},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"size",{get:function(){return this.items.length},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"width",{get:function(){return this.items.length},enumerable:!0,configurable:!0}),h}();n.LeafNode=e;function i(h){for(;h.type===0;)h=h.children[0];return h}n.firstLeaf=i;function r(h){for(;h.type===0;)h=h.children[h.children.length-1];return h}n.lastLeaf=r;function s(h){var I=i(h);return new D(I,0,-1)}n.iterItems=s;function c(h){var I=r(h);return new A(I,I.size-1,-1)}n.retroItems=c;function d(h,I,z){I===void 0?I=0:I<0?I=Math.max(0,I+h.size):I=Math.min(I,h.size),z===void 0?z=h.size:z<0?z=Math.max(0,z+h.size):z=Math.min(z,h.size);var B=Math.max(0,z-I);if(B===0)return wt();for(;h.type===0;){var P=l(h.sizes,I);P>0&&(I-=h.sizes[P-1]),h=h.children[P]}return new D(h,I,B)}n.sliceItems=d;function m(h,I,z){I===void 0?I=h.size-1:I<0?I=Math.max(-1,I+h.size):I=Math.min(I,h.size-1),z===void 0?z=-1:z<0?z=Math.max(-1,z+h.size):z=Math.min(z,h.size-1);var B=Math.max(0,I-z);if(B===0)return wt();for(;h.type===0;){var P=l(h.sizes,I);P>0&&(I-=h.sizes[P-1]),h=h.children[P]}return new A(h,I,B)}n.retroSliceItems=m;function f(h,I){if(I<0&&(I+=h.size),!(I<0||I>=h.size)){for(;h.type===0;){var z=l(h.sizes,I);z>0&&(I-=h.sizes[z-1]),h=h.children[z]}return h.items[I]}}n.itemAt=f;function y(h,I,z){for(;h.type===0;){var B=v(h.items,I,z);h=h.children[B]}var P=a(h.items,I,z);return P>=0}n.hasItem=y;function x(h,I,z){for(var B=0;h.type===0;){var P=v(h.items,I,z);P>0&&(B+=h.sizes[P-1]),h=h.children[P]}var q=a(h.items,I,z);return q>=0?B+q:-B+q}n.indexOf=x;function g(h,I,z){for(;h.type===0;){var B=v(h.items,I,z);h=h.children[B]}var P=a(h.items,I,z);return P>=0?h.items[P]:void 0}n.getItem=g;function _(h,I,z){if(h.type===1){var B=a(h.items,I,z),P;return B>=0?(P=h.items[B],h.items[B]=I):(P=void 0,ee.insert(h.items,-B-1,I)),P}var q=v(h.items,I,z),Q=h.children[q],fe=Q.size,J=_(Q,I,z),ne=Q.size;if(h.items[q]=Q.items[0],fe===ne)return J;if(Q.width>C){var ue=u(Q);ee.insert(h.children,q+1,ue),ee.insert(h.items,q+1,ue.items[0])}return o(h,q),J}n.insertItem=_;function p(h,I,z){if(h.type===1){var B=a(h.items,I,z);return B<0?void 0:ee.removeAt(h.items,B)}var P=v(h.items,I,z),q=h.children[P],Q=q.size,fe=p(q,I,z),J=q.size;return Q===J||(h.items[P]=q.items[0],q.width<k&&(P=w(h,P)),o(h,P)),fe}n.deleteItem=p;function b(h,I){if(I<0&&(I+=h.size),!(I<0||I>=h.size)){if(h.type===1)return ee.removeAt(h.items,I);var z=l(h.sizes,I);z>0&&(I-=h.sizes[z]);var B=h.children[z],P=b(B,I);return h.items[z]=B.items[0],B.width<k&&(z=w(h,z)),o(h,z),P}}n.removeItem=b;function M(h){h.type===0?(tt(h.children,M),h.children.length=0,h.sizes.length=0,h.items.length=0):(h.items.length=0,h.next=null,h.prev=null)}n.clear=M;function L(h){if(h.width<=C)return h;var I=new t,z=u(h);return I.sizes[0]=h.size,I.sizes[1]=h.size+z.size,I.children[0]=h,I.children[1]=z,I.items[0]=h.items[0],I.items[1]=z.items[0],I}n.maybeSplitRoot=L;function S(h){if(h.type===1||h.children.length>1)return h;var I=h.children.pop();return M(h),I}n.maybeExtractRoot=S;var C=32,k=C>>1,D=function(){function h(I,z,B){this._node=I,this._index=z,this._count=B}return h.prototype.iter=function(){return this},h.prototype.clone=function(){return new h(this._node,this._index,this._count)}
1,h.prototype.next=function(){if(!(this._node===null||this._count===0))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++])},h}(),A=function(){function h(I,z,B){this._node=I,this._index=z,this._count=B}return h.prototype.iter=function(){return this},h.prototype.clone=function(){return new h(this._node,this._index,this._count)},h.prototype.next=function(){if(!(this._node===null||this._count===0))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--])},h}();function l(h,I){for(var z=h.length,B=0;B<z;++B)if(h[B]>I)return B;return z-1}function v(h,I,z){for(var B=h.length,P=1;P<B;++P)if(z(h[P],I)>0)return P-1;return B-1}function a(h,I,z){for(var B=h.length,P=0;P<B;++P){var q=z(h[P],I);if(q===0)return P;if(q>0)return-P-1}return-B-1}function o(h,I){for(var z=h.sizes,B=h.children,P=I>0?z[I-1]:0,q=B.length;I<q;++I)P=z[I]=P+B[I].size;z.length=B.length}function u(h){if(h.type===1){for(var I=new e,z=h.items,B=I.items,P=k,q=z.length;P<q;++P)B.push(z[P]);return z.length=k,h.next&&(h.next.prev=I),I.next=h.next,I.prev=h,h.next=I,I}for(var Q=new t,fe=h.children,J=Q.children,P=k,q=fe.length;P<q;++P)J.push(fe[P]);fe.length=k;for(var ne=h.items,ue=Q.items,P=k,q=ne.length;P<q;++P)ue.push(ne[P]);return ne.length=k,o(h,k),o(Q,0),Q}function w(h,I){var z,B,P,q,Q,fe,J=h.children[I],ne=I===0?h.children[I+1]:h.children[I-1],ue=I===0,we=J.type===1,Me=ne.width>k;if(we&&Me&&ue){var N=J,j=ne;return N.items.push(j.items.shift()),h.items[I+1]=j.items[0],I}if(we&&Me&&!ue){var N=J,j=ne;return N.items.unshift(j.items.pop()),h.items[I]=N.items[0],I-1}if(we&&!Me&&ue){var N=J,j=ne;return(z=j.items).unshift.apply(z,N.items),ee.removeAt(h.children,I),ee.removeAt(h.items,I+1),N.prev&&(N.prev.next=j),j.prev=N.prev,M(N),I}if(we&&!Me&&!ue){var N=J,j=ne;return(B=j.items).push.apply(B,N.items),ee.removeAt(h.children,I),ee.removeAt(h.items,I),N.next&&(N.next.prev=j),j.next=N.next,M(N),I-1}if(!we&&Me&&ue){var N=J,j=ne;return N.children.push(j.children.shift()),N.items.push(j.items.shift()),h.items[I+1]=j.items[0],o(N,N.width-1),o(j,0),I}if(!we&&Me&&!ue){var N=J,j=ne;return N.children.unshift(j.children.pop()),N.items.unshift(j.items.pop()),h.items[I]=N.items[0],o(N,0),o(j,j.width-1),I-1}if(!we&&!Me&&ue){var N=J,j=ne;return(P=j.children).unshift.apply(P,N.children),(q=j.items).unshift.apply(q,N.items),ee.removeAt(h.children,I),ee.removeAt(h.items,I+1),o(j,0),N.children.length=0,M(N),I}if(!we&&!Me&&!ue){var N=J,j=ne;return(Q=j.children).push.apply(Q,N.children),(fe=j.items).push.apply(fe,N.items),ee.removeAt(h.children,I),ee.removeAt(h.items,I),o(j,0),N.children.length=0,M(N),I-1}throw"unreachable"}})(U||(U={}));nt=function(){function n(){this._first=null,this._last=null,this._size=0}return Object.defineProperty(n.prototype,"isEmpty",{get:function(){return this._size===0},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"length",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"first",{get:function(){return this._first?this._first.value:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"last",{get:function(){return this._last?this._last.value:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"firstNode",{get:function(){return this._first},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"lastNode",{get:function(){return this._last},enumerable:!0,configurable:!0}),n.prototype.iter=function(){return new n.ForwardValueIterator(this._first)},n.prototype.retro=function(){return new n.RetroValueIterator(this._last)},n.prototype.nodes=function(){return new n.ForwardNodeIterator(this._first)},n.prototype.retroNodes=function(){return new n.RetroNodeIterator(this._last)},n.prototype.assign=function(t){var e=this;this.clear(),tt(t,function(i){e.addLast(i)})},n.prototype.push=function(t){this.addLast(t)},n.prototype.pop=function(){return this.removeLast()},n.prototype.shift=function(t){this.addFirst(t)},n.prototype.unshift=function(){return this.removeFirst()},n.prototype.addFirst=function(t){var e=new ge.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},n.prototype.addLast=function(t){var e=new ge.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},n.prototype.insertBefore=function(t,e){if(!e||e===this._first)return this.addFirst(t);if(!(e instanceof ge.LinkedListNode)||e.list!==this)throw new Error("Reference node is not owned by the list.");var i=new ge.LinkedListNode(this,t),r=e,s=r.prev;return i.next=r,i.prev=s,r.prev=i,s.next=i,this._size++,i},n.prototype.insertAfter=function(t,e){if(!e||e===this._last)return this.addLast(t);if(!(e instanceof ge.LinkedListNode)||e.list!==this)throw new Error("Reference node is not owned by the list.");var i=new ge.LinkedListNode(this,t),r=e,s=r.next;return i.next=s,i.prev=r,r.next=i,s.prev=i,this._size++,i},n.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},n.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},n.prototype.removeNode=function(t){if(!(t instanceof ge.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--},n.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},n}();(function(n){function t(c){var d=new n;return d.assign(c),d}n.from=t;var e=function(){function c(d){this._node=d}return c.prototype.iter=function(){return this},c.prototype.clone=function(){return new c(this._node)},c.prototype.next=function(){if(this._node){var d=this._node;return this._node=d.next,d.value}},c}();n.ForwardValueIterator=e;var i=function(){function c(d){this._node=d}return c.prototype.iter=function(){return this},c.prototype.clone=function(){return new c(this._node)},c.prototype.next=function(){if(this._node){var d=this._node;return this._node=d.prev,d.value}},c}();n.RetroValueIterator=i;var r=function(){function c(d){this._node=d}return c.prototype.iter=function(){return this},c.prototype.clone=function(){return new c(this._node)},c.prototype.next=function(){if(this._node){var d=this._node;return this._node=d.next,d}},c}();n.ForwardNodeIterator=r;var s=function(){function c(d){this._node=d}return c.prototype.iter=function(){return this},c.prototype.clone=function(){return new c(this._node)},c.prototype.next=function(){if(this._node){var d=this._node;return this._node=d.prev,d}},c}();n.RetroNodeIterator=s})(nt||(nt={}));(function(n){var t=function(){function e(i,r){this.list=null,this.next=null,this.prev=null,this.list=i,this.value=r}return e}();n.LinkedListNode=t})(ge||(ge={}))});function Wn(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Mt(n,t);function e(){this.constructor=n}
1n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var Mt,ce,We,T,hn=G(()=>{an();dn();Mt=function(n,t){return Mt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])},Mt(n,t)};ce=function(){function n(t){this.type=t}return Object.defineProperty(n.prototype,"isConflatable",{get:function(){return!1},enumerable:!0,configurable:!0}),n.prototype.conflate=function(t){return!1},n}(),We=function(n){Wn(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return Object.defineProperty(t.prototype,"isConflatable",{get:function(){return!0},enumerable:!0,configurable:!0}),t.prototype.conflate=function(e){return!0},t}(ce);(function(n){function t(a,o){var u=y.get(a);if(!u||u.length===0){S(a,o);return}var w=nn(on(u),function(h){return h?L(h,a,o):!0});w&&S(a,o)}n.sendMessage=t;function e(a,o){if(!o.isConflatable){C(a,o);return}var u=rn(f,function(w){return w.handler!==a||!w.msg||w.msg.type!==o.type||!w.msg.isConflatable?!1:w.msg.conflate(o)});u||C(a,o)}n.postMessage=e;function i(a,o){var u=y.get(a);u&&u.indexOf(o)!==-1||(u?u.push(o):y.set(a,[o]))}n.installMessageHook=i;function r(a,o){var u=y.get(a);if(u){var w=u.indexOf(o);w!==-1&&(u[w]=null,D(u))}}n.removeMessageHook=r;function s(a){var o=y.get(a);o&&o.length>0&&($e.fill(o,null),D(o)),tn(f,function(u){u.handler===a&&(u.handler=null,u.msg=null)})}n.clearData=s;function c(){p||_===0||(M(_),p=!0,k(),p=!1)}n.flush=c;function d(){return g}n.getExceptionHandler=d;function m(a){var o=g;return g=a,o}n.setExceptionHandler=m;var f=new nt,y=new WeakMap,x=new Set,g=function(a){console.error(a)},_=0,p=!1,b=function(){var a=typeof requestAnimationFrame=="function";return a?requestAnimationFrame:setImmediate}(),M=function(){var a=typeof cancelAnimationFrame=="function";return a?cancelAnimationFrame:clearImmediate}();function L(a,o,u){var w=!0;try{typeof a=="function"?w=a(o,u):w=a.messageHook(o,u)}catch(h){g(h)}return w}function S(a,o){try{a.processMessage(o)}catch(u){g(u)}}function C(a,o){f.addLast({handler:a,msg:o}),_===0&&(_=b(k))}function k(){if(_=0,!f.isEmpty){var a={handler:null,msg:null};for(f.addLast(a);;){var o=f.removeFirst();if(o===a)return;o.handler&&o.msg&&t(o.handler,o.msg)}}}function D(a){x.size===0&&b(A),x.add(a)}function A(){x.forEach(l),x.clear()}function l(a){$e.removeAllWhere(a,v)}function v(a){return a===null}})(T||(T={}))});var ie,ze,It=G(()=>{ie=function(){function n(t){this._pid=ze.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 n.prototype.get=function(t){var e,i=ze.ensureMap(t);return this._pid in i?e=i[this._pid]:e=i[this._pid]=this._createValue(t),e},n.prototype.set=function(t,e){var i,r=ze.ensureMap(t);this._pid in r?i=r[this._pid]:i=r[this._pid]=this._createValue(t);var s=this._coerceValue(t,e);this._maybeNotify(t,i,r[this._pid]=s)},n.prototype.coerce=function(t){var e,i=ze.ensureMap(t);this._pid in i?e=i[this._pid]:e=i[this._pid]=this._createValue(t);var r=this._coerceValue(t,e);this._maybeNotify(t,e,i[this._pid]=r)},n.prototype._createValue=function(t){var e=this._create;return e(t)},n.prototype._coerceValue=function(t,e){var i=this._coerce;return i?i(t,e):e},n.prototype._compareValue=function(t,e){var i=this._compare;return i?i(t,e):t===e},n.prototype._maybeNotify=function(t,e,i){var r=this._changed;r&&!this._compareValue(e,i)&&r(t,e,i)},n}();(function(n){function t(e){ze.ownerData.delete(e)}n.clearData=t})(ie||(ie={}));(function(n){n.ownerData=new WeakMap,n.nextPID=function(){var e=0;return function(){var i=Math.random(),r=(""+i).slice(2);return"pid-"+r+"-"+e++}}();function t(e){var i=n.ownerData.get(e);return i||(i=Object.create(null),n.ownerData.set(e,i),i)}n.ensureMap=t})(ze||(ze={}))});var H,ae,it=G(()=>{Fe();It();H=function(){function n(t){this._blockedCount=0,this.sender=t}return n.prototype.block=function(t){this._blockedCount++;try{t()}finally{this._blockedCount--}},n.prototype.connect=function(t,e){return ae.connect(this,t,e)},n.prototype.disconnect=function(t,e){return ae.disconnect(this,t,e)},n.prototype.emit=function(t){this._blockedCount||ae.emit(this,t)},n}();(function(n){function t(f,y){var x=ae.blockedProperty;x.set(f,x.get(f)+1);try{y()}finally{x.set(f,x.get(f)-1)}}n.blockAll=t;function e(f,y){ae.disconnectBetween(f,y)}n.disconnectBetween=e;function i(f){ae.disconnectSender(f)}n.disconnectSender=i;function r(f){ae.disconnectReceiver(f)}n.disconnectReceiver=r;function s(f){ae.disconnectAll(f)}n.disconnectAll=s;function c(f){ae.disconnectAll(f)}n.clearData=c;function d(){return ae.exceptionHandler}
1n.getExceptionHandler=d;function m(f){var y=ae.exceptionHandler;return ae.exceptionHandler=f,y}n.setExceptionHandler=m})(H||(H={}));(function(n){n.exceptionHandler=function(S){console.error(S)};function t(S,C,k){k=k||void 0;var D=m.get(S.sender);if(D||(D=[],m.set(S.sender,D)),g(D,S,C,k))return!1;var A=k||C,l=f.get(A);l||(l=[],f.set(A,l));var v={signal:S,slot:C,thisArg:k};return D.push(v),l.push(v),!0}n.connect=t;function e(S,C,k){k=k||void 0;var D=m.get(S.sender);if(!D||D.length===0)return!1;var A=g(D,S,C,k);if(!A)return!1;var l=k||C,v=f.get(l);return A.signal=null,p(D),p(v),!0}n.disconnect=e;function i(S,C){var k=m.get(S);if(!(!k||k.length===0)){var D=f.get(C);!D||D.length===0||(R(D,function(A){A.signal&&A.signal.sender===S&&(A.signal=null)}),p(k),p(D))}}n.disconnectBetween=i;function r(S){var C=m.get(S);!C||C.length===0||(R(C,function(k){if(k.signal){var D=k.thisArg||k.slot;k.signal=null,p(f.get(D))}}),p(C))}n.disconnectSender=r;function s(S){var C=f.get(S);!C||C.length===0||(R(C,function(k){if(k.signal){var D=k.signal.sender;k.signal=null,p(m.get(D))}}),p(C))}n.disconnectReceiver=s;function c(S){r(S),s(S)}n.disconnectAll=c;function d(S,C){if(!(n.blockedProperty.get(S.sender)>0)){var k=m.get(S.sender);if(!(!k||k.length===0))for(var D=0,A=k.length;D<A;++D){var l=k[D];l.signal===S&&_(l,C)}}}n.emit=d;var m=new WeakMap,f=new WeakMap,y=new Set,x=function(){var S=typeof requestAnimationFrame=="function";return S?requestAnimationFrame:setImmediate}();function g(S,C,k,D){return Ne(S,function(A){return A.signal===C&&A.slot===k&&A.thisArg===D})}
1function _(S,C){var k=S.signal,D=S.slot,A=S.thisArg;try{D.call(A,k.sender,C)}catch(l){n.exceptionHandler(l)}}function p(S){y.size===0&&x(b),y.add(S)}function b(){y.forEach(M),y.clear()}function M(S){E.removeAllWhere(S,L)}function L(S){return S.signal===null}n.blockedProperty=new ie({name:"blocked",create:function(){return 0}})})(ae||(ae={}))});function ln(n){var t;return typeof n.iter=="function"?t=n.iter():t=new jn(n),t}function Ae(n,t){for(var e=0,i=ln(n),r;(r=i.next())!==void 0;)if(t(r,e++)===!1)return}function pn(n,t){for(var e=0,i=ln(n),r;(r=i.next())!==void 0;)if(t(r,e++))return r}var rt,jn,Gi,$i,Zi,Qi,Ji,er,tr,nr,ir,rr,Ct,or,ar,sr,fn,ur,cr,St=G(()=>{(function(n){function t(l,v,a,o){a===void 0&&(a=0),o===void 0&&(o=-1);var u=l.length;if(u===0)return-1;a<0?a=Math.max(0,a+u):a=Math.min(a,u-1),o<0?o=Math.max(0,o+u):o=Math.min(o,u-1);var w;o<a?w=o+1+(u-a):w=o-a+1;for(var h=0;h<w;++h){var I=(a+h)%u;if(l[I]===v)return I}return-1}n.firstIndexOf=t;function e(l,v,a,o){a===void 0&&(a=-1),o===void 0&&(o=0);var u=l.length;if(u===0)return-1;a<0?a=Math.max(0,a+u):a=Math.min(a,u-1),o<0?o=Math.max(0,o+u):o=Math.min(o,u-1);var w;a<o?w=a+1+(u-o):w=a-o+1;for(var h=0;h<w;++h){var I=(a-h+u)%u;if(l[I]===v)return I}return-1}n.lastIndexOf=e;function i(l,v,a,o){a===void 0&&(a=0),o===void 0&&(o=-1);var u=l.length;if(u===0)return-1;a<0?a=Math.max(0,a+u):a=Math.min(a,u-1),o<0?o=Math.max(0,o+u):o=Math.min(o,u-1);var w;o<a?w=o+1+(u-a):w=o-a+1;for(var h=0;h<w;++h){var I=(a+h)%u;if(v(l[I],I))return I}return-1}n.findFirstIndex=i;function r(l,v,a,o){a===void 0&&(a=-1),o===void 0&&(o=0);var u=l.length;if(u===0)return-1;a<0?a=Math.max(0,a+u):a=Math.min(a,u-1),o<0?o=Math.max(0,o+u):o=Math.min(o,u-1);var w;a<o?w=a+1+(u-o):w=a-o+1;for(var h=0;h<w;++h){var I=(a-h+u)%u;if(v(l[I],I))return I}return-1}n.findLastIndex=r;function s(l,v,a,o){a===void 0&&(a=0),o===void 0&&(o=-1);var u=i(l,v,a,o);return u!==-1?l[u]:void 0}n.findFirstValue=s;function c(l,v,a,o){a===void 0&&(a=-1),o===void 0&&(o=0);var u=r(l,v,a,o);return u!==-1?l[u]:void 0}n.findLastValue=c;function d(l,v,a,o,u){o===void 0&&(o=0),u===void 0&&(u=-1);var w=l.length;if(w===0)return 0;o<0?o=Math.max(0,o+w):o=Math.min(o,w-1),u<0?u=Math.max(0,u+w):u=Math.min(u,w-1);for(var h=o,I=u-o+1;I>0;){var z=I>>1,B=h+z;a(l[B],v)<0?(h=B+1,I-=z+1):I=z}return h}n.lowerBound=d;function m(l,v,a,o,u){o===void 0&&(o=0),u===void 0&&(u=-1);var w=l.length;if(w===0)return 0;o<0?o=Math.max(0,o+w):o=Math.min(o,w-1),u<0?u=Math.max(0,u+w):u=Math.min(u,w-1);for(var h=o,I=u-o+1;I>0;){var z=I>>1,B=h+z;a(l[B],v)>0?I=z:(h=B+1,I-=z+1)}return h}n.upperBound=m;function f(l,v,a){if(l===v)return!0;if(l.length!==v.length)return!1;for(var o=0,u=l.length;o<u;++o)if(a?!a(l[o],v[o]):l[o]!==v[o])return!1;return!0}n.shallowEqual=f;function y(l,v){v===void 0&&(v={});var a=v.start,o=v.stop,u=v.step;if(u===void 0&&(u=1),u===0)throw new Error("Slice `step` cannot be zero.");var w=l.length;a===void 0?a=u<0?w-1:0:a<0?a=Math.max(a+w,u<0?-1:0):a>=w&&(a=u<0?w-1:w),o===void 0?o=u<0?-1:w:o<0?o=Math.max(o+w,u<0?-1:0):o>=w&&(o=u<0?w-1:w);var h;u<0&&o>=a||u>0&&a>=o?h=0:u<0?h=Math.floor((o-a+1)/u+1):h=Math.floor((o-a-1)/u+1);for(var I=[],z=0;z<h;++z)I[z]=l[a+z*u];return I}
1n.slice=y;function x(l,v,a){var o=l.length;if(!(o<=1)&&(v<0?v=Math.max(0,v+o):v=Math.min(v,o-1),a<0?a=Math.max(0,a+o):a=Math.min(a,o-1),v!==a)){for(var u=l[v],w=v<a?1:-1,h=v;h!==a;h+=w)l[h]=l[h+w];l[a]=u}}n.move=x;function g(l,v,a){v===void 0&&(v=0),a===void 0&&(a=-1);var o=l.length;if(!(o<=1))for(v<0?v=Math.max(0,v+o):v=Math.min(v,o-1),a<0?a=Math.max(0,a+o):a=Math.min(a,o-1);v<a;){var u=l[v],w=l[a];l[v++]=w,l[a--]=u}}n.reverse=g;function _(l,v,a,o){a===void 0&&(a=0),o===void 0&&(o=-1);var u=l.length;if(!(u<=1)&&(a<0?a=Math.max(0,a+u):a=Math.min(a,u-1),o<0?o=Math.max(0,o+u):o=Math.min(o,u-1),!(a>=o))){var w=o-a+1;if(v>0?v=v%w:v<0&&(v=(v%w+w)%w),v!==0){var h=a+v;g(l,a,h-1),g(l,h,o),g(l,a,o)}}}n.rotate=_;function p(l,v,a,o){a===void 0&&(a=0),o===void 0&&(o=-1);var u=l.length;if(u!==0){a<0?a=Math.max(0,a+u):a=Math.min(a,u-1),o<0?o=Math.max(0,o+u):o=Math.min(o,u-1);var w;o<a?w=o+1+(u-a):w=o-a+1;for(var h=0;h<w;++h)l[(a+h)%u]=v}}n.fill=p;function b(l,v,a){var o=l.length;v<0?v=Math.max(0,v+o):v=Math.min(v,o);for(var u=o;u>v;--u)l[u]=l[u-1];l[v]=a}n.insert=b;function M(l,v){var a=l.length;if(v<0&&(v+=a),!(v<0||v>=a)){for(var o=l[v],u=v+1;u<a;++u)l[u-1]=l[u];return l.length=a-1,o}}n.removeAt=M;function L(l,v,a,o){a===void 0&&(a=0),o===void 0&&(o=-1);var u=t(l,v,a,o);return u!==-1&&M(l,u),u}n.removeFirstOf=L;function S(l,v,a,o){a===void 0&&(a=-1),o===void 0&&(o=0);var u=e(l,v,a,o);return u!==-1&&M(l,u),u}n.removeLastOf=S;function C(l,v,a,o){a===void 0&&(a=0),o===void 0&&(o=-1);var u=l.length;if(u===0)return 0;a<0?a=Math.max(0,a+u):a=Math.min(a,u-1),o<0?o=Math.max(0,o+u):o=Math.min(o,u-1);for(var w=0,h=0;h<u;++h)a<=o&&h>=a&&h<=o&&l[h]===v||o<a&&(h<=o||h>=a)&&l[h]===v?w++:w>0&&(l[h-w]=l[h]);return w>0&&(l.length=u-w),w}n.removeAllOf=C;function k(l,v,a,o){a===void 0&&(a=0),o===void 0&&(o=-1);var u,w=i(l,v,a,o);return w!==-1&&(u=M(l,w)),{index:w,value:u}}n.removeFirstWhere=k;function D(l,v,a,o){a===void 0&&(a=-1),o===void 0&&(o=0);var u,w=r(l,v,a,o);return w!==-1&&(u=M(l,w)),{index:w,value:u}}n.removeLastWhere=D;function A(l,v,a,o){a===void 0&&(a=0),o===void 0&&(o=-1);var u=l.length;if(u===0)return 0;a<0?a=Math.max(0,a+u):a=Math.min(a,u-1),o<0?o=Math.max(0,o+u):o=Math.min(o,u-1);for(var w=0,h=0;h<u;++h)a<=o&&h>=a&&h<=o&&v(l[h],h)||o<a&&(h<=o||h>=a)&&v(l[h],h)?w++:w>0&&(l[h-w]=l[h]);return w>0&&(l.length=u-w),w}n.removeAllWhere=A})(rt||(rt={}));jn=function(){function n(t){this._index=0,this._source=t}return n.prototype.iter=function(){return this},n.prototype.clone=function(){var t=new n(this._source);return t._index=this._index,t},n.prototype.next=function(){if(!(this._index>=this._source.length))return this._source[this._index++]},n}(),Gi=function(){function n(t,e){e===void 0&&(e=Object.keys(t)),this._index=0,this._source=t,this._keys=e}return n.prototype.iter=function(){return this},n.prototype.clone=function(){var t=new n(this._source,this._keys);return t._index=this._index,t},n.prototype.next=function(){if(!(this._index>=this._keys.length)){var t=this._keys[this._index++];return t in this._source?t:this.next()}},n}(),$i=function(){function n(t,e){e===void 0&&(e=Object.keys(t)),this._index=0,this._source=t,this._keys=e}return n.prototype.iter=function(){return this},n.prototype.clone=function(){var t=new n(this._source,this._keys);return t._index=this._index,t},n.prototype.next=function(){if(!(this._index>=this._keys.length)){var t=this._keys[this._index++];return t in this._source?this._source[t]:this.next()}},n}(),Zi=function(){function n(t,e){e===void 0&&(e=Object.keys(t)),this._index=0,this._source=t,this._keys=e}return n.prototype.iter=function(){return this},n.prototype.clone=function(){var t=new n(this._source,this._keys);return t._index=this._index,t},n.prototype.next=function(){if(!(this._index>=this._keys.length)){var t=this._keys[this._index++];return t in this._source?[t,this._source[t]]:this.next()}},n}(),Qi=function(){function n(t){this._fn=t}return n.prototype.iter=function(){return this},n.prototype.clone=function(){throw new Error("An `FnIterator` cannot be cloned.")},n.prototype.next=function(){return this._fn.call(void 0)},n}(),Ji=function(){function n(t){this._cloned=!1,this._source=t,this._active=void 0}return n.prototype.iter=function(){return this},n.prototype.clone=function(){var t=new n(this._source.clone());return t._active=this._active&&this._active.clone(),t._cloned=!0,this._cloned=!0,t},n.prototype.next=function(){if(this._active===void 0){var t=this._source.next();if(t===void 0)return;this._active=this._cloned?t.clone():t}var e=this._active.next();return e!==void 0?e:(this._active=void 0,this.next())},n}(),er=function(){function n(){}return n.prototype.iter=function(){return this},n.prototype.clone=function(){return new n},n.prototype.next=function(){},n}(),tr=function(){function n(t,e){this._source=t,this._index=e}return n.prototype.iter=function(){return this},n.prototype.clone=function(){return new n(this._source.clone(),this._index)},n.prototype.next=function(){var t=this._source.next();if(t!==void 0)return[this._index++,t]},n}(),nr=function(){function n(t,e){this._index=0,this._source=t,this._fn=e}return n.prototype.iter=function(){return this},n.prototype.clone=function(){var t=new n(this._source.clone(),this._fn);return t._index=this._index,t},n.prototype.next=function(){for(var t=this._fn,e=this._source,i;(i=e.next())!==void 0;)if(t(i,this._index++))return i},n}();ir=function(){function n(t,e){this._index=0,this._source=t,this._fn=e}return n.prototype.iter=function(){return this},n.prototype.clone=function(){var t=new n(this._source.clone(),this._fn);return t._index=this._index,t},n.prototype.next=function(){var t=this._source.next();if(t!==void 0)return this._fn.call(void 0,t,this._index++)},n}(),rr=function(){function n(t,e,i){this._index=0,this._start=t,this._stop=e,this._step=i,this._length=Ct.rangeLength(t,e,i)}return n.prototype.iter=function(){return this},n.prototype.clone=function(){var t=new n(this._start,this._stop,this._step);return t._index=this._index,t},n.prototype.next=function(){if(!(this._index>=this._length))return this._start+this._step*this._index++},n}();(function(n){function t(e,i,r){return r===0?1/0:e>i&&r>0||e<i&&r<0?0:Math.ceil((i-e)/r)}n.rangeLength=t})(Ct||(Ct={}));or=function(){function n(t,e){this._value=t,this._count=e}return n.prototype.iter=function(){return this},n.prototype.clone=function(){return new n(this._value,this._count)}
1,n.prototype.next=function(){if(!(this._count<=0))return this._count--,this._value},n}(),ar=function(){function n(t){this._source=t,this._index=t.length-1}return n.prototype.iter=function(){return this},n.prototype.clone=function(){var t=new n(this._source);return t._index=this._index,t},n.prototype.next=function(){if(!(this._index<0||this._index>=this._source.length))return this._source[this._index--]},n}(),sr=function(){function n(t,e){this._source=t,this._step=e}return n.prototype.iter=function(){return this},n.prototype.clone=function(){return new n(this._source.clone(),this._step)},n.prototype.next=function(){for(var t=this._source.next(),e=this._step-1;e>0;--e)this._source.next();return t},n}();(function(n){function t(c,d,m){m===void 0&&(m=0);for(var f=new Array(d.length),y=0,x=m,g=d.length;y<g;++y,++x){if(x=c.indexOf(d[y],x),x===-1)return null;f[y]=x}return f}n.findIndices=t;function e(c,d,m){m===void 0&&(m=0);var f=t(c,d,m);if(!f)return null;for(var y=0,x=0,g=f.length;x<g;++x){var _=f[x]-m;y+=_*_}return{score:y,indices:f}}n.matchSumOfSquares=e;function i(c,d,m){m===void 0&&(m=0);var f=t(c,d,m);if(!f)return null;for(var y=0,x=m-1,g=0,_=f.length;g<_;++g){var p=f[g];y+=p-x-1,x=p}return{score:y,indices:f}}n.matchSumOfDeltas=i;function r(c,d,m){for(var f=[],y=0,x=0,g=d.length;y<g;){for(var _=d[y],p=d[y];++y<g&&d[y]===p+1;)p++;x<_&&f.push(c.slice(x,_)),_<p+1&&f.push(m(c.slice(_,p+1))),x=p+1}return x<c.length&&f.push(c.slice(x)),f}n.highlight=r;function s(c,d){return c<d?-1:c>d?1:0}n.cmp=s})(fn||(fn={}));ur=function(){function n(t,e){this._source=t,this._count=e}return n.prototype.iter=function(){return this},n.prototype.clone=function(){return new n(this._source.clone(),this._count)},n.prototype.next=function(){if(!(this._count<=0)){var t=this._source.next();if(t!==void 0)return this._count--,t}},n}(),cr=function(){function n(t){this._source=t}return n.prototype.iter=function(){return this},n.prototype.clone=function(){return new n(this._source.map(function(t){return t.clone()}))},n.prototype.next=function(){for(var t=new Array(this._source.length),e=0,i=this._source.length;e<i;++e){var r=this._source[e].next();if(r===void 0)return;t[e]=r}return t},n}()});var ot,Ee,mn=G(()=>{ot=function(){function n(t){this._pid=Ee.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 n.prototype.get=function(t){var e,i=Ee.ensureMap(t);return this._pid in i?e=i[this._pid]:e=i[this._pid]=this._createValue(t),e},n.prototype.set=function(t,e){var i,r=Ee.ensureMap(t);this._pid in r?i=r[this._pid]:i=r[this._pid]=this._createValue(t);var s=this._coerceValue(t,e);this._maybeNotify(t,i,r[this._pid]=s)},n.prototype.coerce=function(t){var e,i=Ee.ensureMap(t);this._pid in i?e=i[this._pid]:e=i[this._pid]=this._createValue(t);var r=this._coerceValue(t,e);this._maybeNotify(t,e,i[this._pid]=r)},n.prototype._createValue=function(t){var e=this._create;return e(t)},n.prototype._coerceValue=function(t,e){var i=this._coerce;return i?i(t,e):e},n.prototype._compareValue=function(t,e){var i=this._compare;return i?i(t,e):t===e},n.prototype._maybeNotify=function(t,e,i){var r=this._changed;r&&!this._compareValue(e,i)&&r(t,e,i)},n}();(function(n){function t(e){Ee.ownerData.delete(e)}n.clearData=t})(ot||(ot={}));(function(n){n.ownerData=new WeakMap,n.nextPID=function(){var e=0;return function(){var i=Math.random(),r=(""+i).slice(2);return"pid-"+r+"-"+e++}}();function t(e){var i=n.ownerData.get(e);return i||(i=Object.create(null),n.ownerData.set(e,i),i)}n.ensureMap=t})(Ee||(Ee={}))});var Te,se,vn=G(()=>{St();mn();Te=function(){function n(t){this._blockedCount=0,this.sender=t}return n.prototype.block=function(t){this._blockedCount++;try{t()}finally{this._blockedCount--}},n.prototype.connect=function(t,e){return se.connect(this,t,e)},n.prototype.disconnect=function(t,e){return se.disconnect(this,t,e)},n.prototype.emit=function(t){this._blockedCount||se.emit(this,t)},n}();(function(n){function t(f,y){var x=se.blockedProperty;x.set(f,x.get(f)+1);try{y()}finally{x.set(f,x.get(f)-1)}}n.blockAll=t;function e(f,y){se.disconnectBetween(f,y)}n.disconnectBetween=e;function i(f){se.disconnectSender(f)}n.disconnectSender=i;function r(f){se.disconnectReceiver(f)}n.disconnectReceiver=r;function s(f){se.disconnectAll(f)}n.disconnectAll=s;function c(f){se.disconnectAll(f)}n.clearData=c;function d(){return se.exceptionHandler}
1n.getExceptionHandler=d;function m(f){var y=se.exceptionHandler;return se.exceptionHandler=f,y}n.setExceptionHandler=m})(Te||(Te={}));(function(n){n.exceptionHandler=function(S){console.error(S)};function t(S,C,k){k=k||void 0;var D=m.get(S.sender);if(D||(D=[],m.set(S.sender,D)),g(D,S,C,k))return!1;var A=k||C,l=f.get(A);l||(l=[],f.set(A,l));var v={signal:S,slot:C,thisArg:k};return D.push(v),l.push(v),!0}n.connect=t;function e(S,C,k){k=k||void 0;var D=m.get(S.sender);if(!D||D.length===0)return!1;var A=g(D,S,C,k);if(!A)return!1;var l=k||C,v=f.get(l);return A.signal=null,p(D),p(v),!0}n.disconnect=e;function i(S,C){var k=m.get(S);if(!(!k||k.length===0)){var D=f.get(C);!D||D.length===0||(Ae(D,function(A){A.signal&&A.signal.sender===S&&(A.signal=null)}),p(k),p(D))}}n.disconnectBetween=i;function r(S){var C=m.get(S);!C||C.length===0||(Ae(C,function(k){if(k.signal){var D=k.thisArg||k.slot;k.signal=null,p(f.get(D))}}),p(C))}n.disconnectSender=r;function s(S){var C=f.get(S);!C||C.length===0||(Ae(C,function(k){if(k.signal){var D=k.signal.sender;k.signal=null,p(m.get(D))}}),p(C))}n.disconnectReceiver=s;function c(S){r(S),s(S)}n.disconnectAll=c;function d(S,C){if(!(n.blockedProperty.get(S.sender)>0)){var k=m.get(S.sender);if(!(!k||k.length===0))for(var D=0,A=k.length;D<A;++D){var l=k[D];l.signal===S&&_(l,C)}}}n.emit=d;var m=new WeakMap,f=new WeakMap,y=new Set,x=function(){var S=typeof requestAnimationFrame=="function";return S?requestAnimationFrame:setImmediate}();function g(S,C,k,D){return pn(S,function(A){return A.signal===C&&A.slot===k&&A.thisArg===D})}
1function _(S,C){var k=S.signal,D=S.slot,A=S.thisArg;try{D.call(A,k.sender,C)}catch(l){n.exceptionHandler(l)}}function p(S){y.size===0&&x(b),y.add(S)}function b(){y.forEach(M),y.clear()}function M(S){rt.removeAllWhere(S,L)}function L(S){return S.signal===null}n.blockedProperty=new ot({name:"blocked",create:function(){return 0}})})(se||(se={}))});function gn(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Lt(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var Lt,Dt,_r,kt,_n,yn=G(()=>{St();vn();Lt=function(n,t){return Lt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])},Lt(n,t)};Dt=function(){function n(t){this._fn=t}return Object.defineProperty(n.prototype,"isDisposed",{get:function(){return!this._fn},enumerable:!0,configurable:!0}),n.prototype.dispose=function(){if(this._fn){var t=this._fn;this._fn=null,t()}},n}(),_r=function(n){gn(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e._disposed=new Te(e),e}return Object.defineProperty(t.prototype,"disposed",{get:function(){return this._disposed},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this.isDisposed||(n.prototype.dispose.call(this),this._disposed.emit(void 0),Te.clearData(this))},t}(Dt),kt=function(){function n(){this._isDisposed=!1,this._items=new Set}return Object.defineProperty(n.prototype,"isDisposed",{get:function(){return this._isDisposed},enumerable:!0,configurable:!0}),n.prototype.dispose=function(){this._isDisposed||(this._isDisposed=!0,this._items.forEach(function(t){t.dispose()}),this._items.clear())},n.prototype.contains=function(t){return this._items.has(t)},n.prototype.add=function(t){this._items.add(t)},n.prototype.remove=function(t){this._items.delete(t)},n.prototype.clear=function(){this._items.clear()},n}();(function(n){function t(e){var i=new n;return Ae(e,function(r){i.add(r)}),i}n.from=t})(kt||(kt={}));_n=function(n){gn(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e._disposed=new Te(e),e}return Object.defineProperty(t.prototype,"disposed",{get:function(){return this._disposed},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this.isDisposed||(n.prototype.dispose.call(this),this._disposed.emit(void 0),Te.clearData(this))},t}(kt);(function(n){function t(e){var i=new n;return Ae(e,function(r){i.add(r)}),i}n.from=t})(_n||(_n={}))});var Ce,te,bn=G(()=>{yn();Ce=function(){function n(t){var e=this;this._onScrollFrame=function(){if(e._scrollTarget){var i=e._scrollTarget,r=i.element,s=i.edge,c=i.distance,d=te.SCROLL_EDGE_SIZE-c,m=Math.pow(d/te.SCROLL_EDGE_SIZE,2),f=Math.max(1,Math.round(m*te.SCROLL_EDGE_SIZE));switch(s){case"top":r.scrollTop-=f;break;case"left":r.scrollLeft-=f;break;case"right":r.scrollLeft+=f;break;case"bottom":r.scrollTop+=f;break}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 n.prototype.dispose=function(){if(!this._disposed){if(this._disposed=!0,this._currentTarget){var t=te.createMouseEvent("pointerup",-1,-1);te.dispatchDragLeave(this,this._currentTarget,null,t)}this._finalize("none")}},Object.defineProperty(n.prototype,"isDisposed",{get:function(){return this._disposed},enumerable:!0,configurable:!0}),n.prototype.start=function(t,e){var i=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(s,c){i._resolve=s});var r=te.createMouseEvent("pointermove",t,e);return document.dispatchEvent(r),this._promise},n.prototype.handleEvent=function(t){switch(t.type){case"mousemove":this._evtMouseMove(t);break;case"mouseup":this._evtMouseUp(t);break;case"pointermove":this._evtMouseMove(t);break;case"pointerup":this._evtMouseUp(t);break;case"keydown":this._evtKeyDown(t);break;default:t.preventDefault(),t.stopPropagation();break}},n.prototype.moveDragImage=function(t,e){if(this.dragImage){var i=this.dragImage.style;i.top=e+"px",i.left=t+"px"}},n.prototype._evtMouseMove=function(t){t.preventDefault(),t.stopPropagation(),this._updateCurrentTarget(t),this._updateDragScroll(t),this.moveDragImage(t.clientX,t.clientY)},n.prototype._evtMouseUp=function(t){if(t.preventDefault(),t.stopPropagation(),t.button===0){if(this._updateCurrentTarget(t),!this._currentTarget){this._finalize("none");return}if(this._dropAction==="none"){te.dispatchDragLeave(this,this._currentTarget,null,t),this._finalize("none");return}var e=te.dispatchDrop(this,this._currentTarget,t);this._finalize(e)}},n.prototype._evtKeyDown=function(t){t.preventDefault(),t.stopPropagation(),t.keyCode===27&&this.dispose()},n.prototype._addListeners=function(){document.addEventListener("mousedown",this,
1!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)},n.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)},n.prototype._updateDragScroll=function(t){var e=te.findScrollTarget(t);!this._scrollTarget&&!e||(this._scrollTarget||setTimeout(this._onScrollFrame,500),this._scrollTarget=e)},n.prototype._updateCurrentTarget=function(t){var e=this._currentTarget,i=this._currentTarget,r=this._currentElement,s=this.document.elementFromPoint(t.clientX,t.clientY);this._currentElement=s,s!==r&&s!==i&&te.dispatchDragExit(this,i,s,t),s!==r&&s!==i&&(i=te.dispatchDragEnter(this,s,i,t)),i!==e&&(this._currentTarget=i,te.dispatchDragLeave(this,e,i,t));var c=te.dispatchDragOver(this,i,t);this._setDropAction(c)},n.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 i=this.dragImage.style;i.pointerEvents="none",i.position="fixed",i.top=e+"px",i.left=t+"px";var r=this.document instanceof Document?this.document.body:this.document.firstElementChild;r.appendChild(this.dragImage)}},n.prototype._detachDragImage=function(){if(this.dragImage){var t=this.dragImage.parentNode;t&&t.removeChild(this.dragImage)}},n.prototype._setDropAction=function(t){if(t=te.validateAction(t,this.supportedActions),!(this._override&&this._dropAction===t))switch(t){case"none":this._dropAction=t,this._override=n.overrideCursor("no-drop",this.document);break;case"copy":this._dropAction=t,this._override=n.overrideCursor("copy",this.document);break;case"link":this._dropAction=t,this._override=n.overrideCursor("alias",this.document);break;case"move":this._dropAction=t,this._override=n.overrideCursor("move",this.document);break}},n.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)}
1,n}();(function(n){function t(i,r){r===void 0&&(r=document);var s=++e,c=r instanceof Document?r.body:r.firstElementChild;return c.style.cursor=i,c.classList.add("lm-mod-override-cursor"),c.classList.add("p-mod-override-cursor"),new Dt(function(){s===e&&(c.style.cursor="",c.classList.remove("lm-mod-override-cursor"),c.classList.remove("p-mod-override-cursor"))})}n.overrideCursor=t;var e=0})(Ce||(Ce={}));(function(n){n.SCROLL_EDGE_SIZE=20;function t(g,_){return f[g]&y[_]?g:"none"}n.validateAction=t;function e(g,_,p){var b=document.createEvent("MouseEvent");return b.initMouseEvent(g,!0,!0,window,0,0,0,_,p,!1,!1,!1,!1,0,null),b}n.createMouseEvent=e;function i(g){for(var _=g.clientX,p=g.clientY,b=document.elementFromPoint(_,p);b;b=b.parentElement){var M=b.hasAttribute("data-lm-dragscroll");if(M=M||b.hasAttribute("data-p-dragscroll"),!!M){var L=0,S=0;b===document.body&&(L=window.pageXOffset,S=window.pageYOffset);var C=b.getBoundingClientRect(),k=C.top+S,D=C.left+L,A=D+C.width,l=k+C.height;if(!(_<D||_>=A||p<k||p>=l)){var v=_-D+1,a=p-k+1,o=A-_,u=l-p,w=Math.min(v,a,o,u);if(!(w>n.SCROLL_EDGE_SIZE)){var h=void 0;switch(w){case u:h="bottom";break;case a:h="top";break;case o:h="right";break;case v:h="left";break;default:throw"unreachable"}var I=b.scrollWidth-b.clientWidth,z=b.scrollHeight-b.clientHeight,B=void 0;switch(h){case"top":B=z>0&&b.scrollTop>0;break;case"left":B=I>0&&b.scrollLeft>0;break;case"right":B=I>0&&b.scrollLeft<I;break;case"bottom":B=z>0&&b.scrollTop<z;break;default:throw"unreachable"}if(B)return{element:b,edge:h,distance:w}}}}}return null}n.findScrollTarget=i;function r(g,_,p,b){if(!_)return null;var M=x("lm-dragenter",g,b,p),L=!_.dispatchEvent(M);if(L||(M=x("p-dragenter",g,b,p),L=!_.dispatchEvent(M),L))return _;var S=g.document instanceof Document?g.document.body:g.document.firstElementChild;return _===S?p:(M=x("lm-dragenter",g,b,p),S.dispatchEvent(M),M=x("p-dragenter",g,b,p),S.dispatchEvent(M),S)}n.dispatchDragEnter=r;function s(g,_,p,b){if(_){var M=x("lm-dragexit",g,b,p);_.dispatchEvent(M),M=x("p-dragexit",g,b,p),_.dispatchEvent(M)}}n.dispatchDragExit=s;function c(g,_,p,b){if(_){var M=x("lm-dragleave",g,b,p);_.dispatchEvent(M),M=x("p-dragleave",g,b,p),_.dispatchEvent(M)}}n.dispatchDragLeave=c;function d(g,_,p){if(!_)return"none";var b=x("lm-dragover",g,p,null),M=!_.dispatchEvent(b);return M||(b=x("p-dragover",g,p,null),M=!_.dispatchEvent(b),M)?b.dropAction:"none"}n.dispatchDragOver=d;function m(g,_,p){if(!_)return"none";var b=x("lm-drop",g,p,null),M=!_.dispatchEvent(b);return M||(b=x("p-drop",g,p,null),M=!_.dispatchEvent(b),M)?b.dropAction:"none"}n.dispatchDrop=m;var f={none:0,copy:1,link:2,move:4},y={none:f.none,copy:f.copy,link:f.link,move:f.move,"copy-link":f.copy|f.link,"copy-move":f.copy|f.move,"link-move":f.link|f.move,all:f.copy|f.link|f.move};function x(g,_,p,b){var M=document.createEvent("MouseEvent");return M.initMouseEvent(g,!0,!0,window,0,p.screenX,p.screenY,p.clientX,p.clientY,p.ctrlKey,p.altKey,p.shiftKey,p.metaKey,p.button,b),M.dropAction="none",M.mimeData=_.mimeData,M.proposedAction=_.proposedAction,M.supportedActions=_.supportedActions,M.source=_.source,M}})(te||(te={}))});var zt=zn((at,xn)=>{(function(n,t){typeof at=="object"&&typeof xn<"u"?t(at):typeof define=="function"&&define.amd?define(["exports"],t):(n=typeof globalThis<"u"?globalThis:n||self,t(n.lumino_coreutils={}))})(at,function(n){"use strict";n.JSONExt=void 0,function(c){c.emptyObject=Object.freeze({}),c.emptyArray=Object.freeze([]);function d(M){return M===null||typeof M=="boolean"||typeof M=="number"||typeof M=="string"}c.isPrimitive=d;function m(M){return Array.isArray(M)}c.isArray=m;function f(M){return!d(M)&&!m(M)}c.isObject=f;function y(M,L){if(M===L)return!0;if(d(M)||d(L))return!1;var S=m(M),C=m(L);return S!==C?!1:S&&C?g(M,L):_(M,L)}c.deepEqual=y;function x(M){return d(M)?M:m(M)?p(M):b(M)}c.deepCopy=x;function g(M,L){if(M===L)return!0;if(M.length!==L.length)return!1;for(var S=0,C=M.length;S<C;++S)if(!y(M[S],L[S]))return!1;return!0}function _(M,L){if(M===L)return!0;for(var S in M)if(M[S]!==void 0&&!(S in L))return!1;for(var S in L)if(L[S]!==void 0&&!(S in M))return!1;for(var S in M){var C=M[S],k=L[S];if(!(C===void 0&&k===void 0)&&(C===void 0||k===void 0||!y(C,k)))return!1}return!0}function p(M){for(var L=new Array(M.length),S=0,C=M.length;S<C;++S)L[S]=x(M[S]);return L}function b(M){var L={};for(var S in M){var C=M[S];C!==void 0&&(L[S]=x(C))}return L}}(n.JSONExt||(n.JSONExt={}));var t=function(){function c(){this._types=[],this._values=[]}return c.prototype.types=function(){return this._types.slice()},c.prototype.hasData=function(d){return this._types.indexOf(d)!==-1},c.prototype.getData=function(d){var m=this._types.indexOf(d);return m!==-1?this._values[m]:void 0},c.prototype.setData=function(d,m){this.clearData(d),this._types.push(d),this._values.push(m)},c.prototype.clearData=function(d){var m=this._types.indexOf(d);m!==-1&&(this._types.splice(m,1),this._values.splice(m,1))},c.prototype.clear=function(){this._types.length=0,this._values.length=0},c}(),e=function(){function c(){var d=this;this.promise=new Promise(function(m,f){d._resolve=m,d._reject=f})}return c.prototype.resolve=function(d){var m=this._resolve;m(d)},c.prototype.reject=function(d){var m=this._reject;m(d)},c}(),i=function(){function c(d){this.name=d,this._tokenStructuralPropertyT=null}return c}();function r(c){for(var d=0,m=0,f=c.length;m<f;++m)m%4===0&&(d=Math.random()*4294967295>>>0),c[m]=d&255,d>>>=8}n.Random=void 0,function(c){c.getRandomValues=function(){var d=typeof window<"u"&&(window.crypto||window.msCrypto)||null;return d&&typeof d.getRandomValues=="function"?function(f){return d.getRandomValues(f)}:r}()}(n.Random||(n.Random={}));function s(c){for(var d=new Uint8Array(16),m=new Array(256),f=0;f<16;++f)m[f]="0"+f.toString(16);for(var f=16;f<256;++f)m[f]=f.toString(16);return function(){return c(d),d[6]=64|d[6]&15,d[8]=128|d[8]&63,m[d[0]]+m[d[1]]+m[d[2]]+m[d[3]]+"-"+m[d[4]]+m[d[5]]+"-"+m[d[6]]+m[d[7]]+"-"+m[d[8]]+m[d[9]]+"-"+m[d[10]]+m[d[11]]+m[d[12]]+m[d[13]]+m[d[14]]+m[d[15]]}}n.UUID=void 0,function(c){c.uuid4=s(n.Random.getRandomValues)}(n.UUID||(n.UUID={})),n.MimeData=t,n.PromiseDelegate=e,n.Token=i,Object.defineProperty(n,"__esModule",{value:!0})})});function Mn(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");At(n,t);function e(){this.constructor=n}
1n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var At,je,Mr,Et,wn,Tt=G(()=>{Fe();it();At=function(n,t){return At=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])},At(n,t)};je=function(){function n(t){this._fn=t}return Object.defineProperty(n.prototype,"isDisposed",{get:function(){return!this._fn},enumerable:!0,configurable:!0}),n.prototype.dispose=function(){if(this._fn){var t=this._fn;this._fn=null,t()}},n}(),Mr=function(n){Mn(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e._disposed=new H(e),e}return Object.defineProperty(t.prototype,"disposed",{get:function(){return this._disposed},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this.isDisposed||(n.prototype.dispose.call(this),this._disposed.emit(void 0),H.clearData(this))},t}(je),Et=function(){function n(){this._isDisposed=!1,this._items=new Set}return Object.defineProperty(n.prototype,"isDisposed",{get:function(){return this._isDisposed},enumerable:!0,configurable:!0}),n.prototype.dispose=function(){this._isDisposed||(this._isDisposed=!0,this._items.forEach(function(t){t.dispose()}),this._items.clear())},n.prototype.contains=function(t){return this._items.has(t)},n.prototype.add=function(t){this._items.add(t)},n.prototype.remove=function(t){this._items.delete(t)},n.prototype.clear=function(){this._items.clear()},n}();(function(n){function t(e){var i=new n;return R(e,function(r){i.add(r)}),i}n.from=t})(Et||(Et={}));wn=function(n){Mn(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e._disposed=new H(e),e}return Object.defineProperty(t.prototype,"disposed",{get:function(){return this._disposed},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this.isDisposed||(n.prototype.dispose.call(this),this._disposed.emit(void 0),H.clearData(this))},t}(Et);(function(n){function t(e){var i=new n;return R(e,function(r){i.add(r)}),i}n.from=t})(wn||(wn={}))});function qe(){return Bt.keyboardLayout}var Ot,qn,Bt,Pt=G(()=>{Ot=function(){function n(t,e,i){i===void 0&&(i=[]),this.name=t,this._codes=e,this._keys=n.extractKeys(e),this._modifierKeys=n.convertToKeySet(i)}return n.prototype.keys=function(){return Object.keys(this._keys)},n.prototype.isValidKey=function(t){return t in this._keys},n.prototype.isModifierKey=function(t){return t in this._modifierKeys},n.prototype.keyForKeydownEvent=function(t){return this._codes[t.keyCode]||""},n}();(function(n){function t(i){var r=Object.create(null);for(var s in i)r[i[s]]=!0;return r}n.extractKeys=t;function e(i){for(var r=Object(null),s=0,c=i.length;s<c;++s)r[i[s]]=!0;return r}n.convertToKeySet=e})(Ot||(Ot={}));qn=new Ot("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(n){n.keyboardLayout=qn})(Bt||(Bt={}))});var re,Rt,Ke,Se,In=G(()=>{Fe();re=Gt(zt());Tt();gt();Pt();it();Rt=function(){return Rt=Object.assign||function(t){for(var e,i=1,r=arguments.length;i<r;i++){e=arguments[i];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s])}return t},Rt.apply(this,arguments)},Ke=function(){function n(){this._timerID=0,this._replaying=!1,this._keystrokes=[],this._keydownEvents=[],this._keyBindings=[],this._exactKeyMatch=null,this._commands=Object.create(null),this._commandChanged=new H(this),this._commandExecuted=new H(this),this._keyBindingChanged=new H(this)}return Object.defineProperty(n.prototype,"commandChanged",{get:function(){return this._commandChanged},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"commandExecuted",{get:function(){return this._commandExecuted},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"keyBindingChanged",{get:function(){return this._keyBindingChanged},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"keyBindings",{get:function(){return this._keyBindings},enumerable:!0,configurable:!0}),n.prototype.listCommands=function(){return Object.keys(this._commands)},n.prototype.hasCommand=function(t){return t in this._commands},n.prototype.addCommand=function(t,e){var i=this;if(t in this._commands)throw new Error("Command '"+t+"' already registered.");return this._commands[t]=Se.createCommand(e),this._commandChanged.emit({id:t,type:"added"}),new je(function(){delete i._commands[t],i._commandChanged.emit({id:t,type:"removed"})})},n.prototype.notifyCommandChanged=function(t){if(t!==void 0&&!(t in this._commands))throw new Error("Command '"+t+"' is not registered.");this._commandChanged.emit({id:t,type:t?"changed":"many-changed"})},n.prototype.describedBy=function(t){var e=this._commands[t];return e?e.describedBy||{args:null}:{args:null}},n.prototype.label=function(t,e){e===void 0&&(e=re.JSONExt.emptyObject);var i=this._commands[t];return i?i.label.call(void 0,e):""},n.prototype.mnemonic=function(t,e){e===void 0&&(e=re.JSONExt.emptyObject);var i=this._commands[t];return i?i.mnemonic.call(void 0,e):-1},n.prototype.icon=function(t,e){e===void 0&&(e=re.JSONExt.emptyObject);var i=this._commands[t];return i?i.icon.call(void 0,e):""},n.prototype.iconClass=function(t,e){e===void 0&&(e=re.JSONExt.emptyObject);var i=this._commands[t];return i?i.iconClass.call(void 0,e):""},n.prototype.iconLabel=function(t,e){e===void 0&&(e=re.JSONExt.emptyObject);var i=this._commands[t];return i?i.iconLabel.call(void 0,e):""},n.prototype.caption=function(t,e){e===void 0&&(e=re.JSONExt.emptyObject);var i=this._commands[t];return i?i.caption.call(void 0,e):""},n.prototype.usage=function(t,e){e===void 0&&(e=re.JSONExt.emptyObject);var i=this._commands[t];return i?i.usage.call(void 0,e):""},n.prototype.className=function(t,e){e===void 0&&(e=re.JSONExt.emptyObject);var i=this._commands[t];return i?i.className.call(void 0,e):""},n.prototype.dataset=function(t,e){e===void 0&&(e=re.JSONExt.emptyObject);var i=this._commands[t];return i?i.dataset.call(void 0,e):{}},n.prototype.isEnabled=function(t,e){e===void 0&&(e=re.JSONExt.emptyObject);var i=this._commands[t];return i?i.isEnabled.call(void 0,e):!1},n.prototype.isToggled=function(t,e){e===void 0&&(e=re.JSONExt.emptyObject);var i=this._commands[t];return i?i.isToggled.call(void 0,e):!1},n.prototype.isToggleable=function(t,e){var i=this._commands[t];return i?i.isToggleable:!1},n.prototype.isVisible=function(t,e){e===void 0&&(e=re.JSONExt.emptyObject);var i=this._commands[t];return i?i.isVisible.call(void 0,e):!1},n.prototype.execute=function(t,e){e===void 0&&(e=re.JSONExt.emptyObject);var i=this._commands[t];if(!i)return Promise.reject(new Error("Command '"+t+"' not registered."));var r;try{r=i.execute.call(void 0,e)}catch(c){r=Promise.reject(c)}var s=Promise.resolve(r);return this._commandExecuted.emit({id:t,args:e,result:s}),s},n.prototype.addKeyBinding=function(t){var e=this,i=Se.createKeyBinding(t);return this._keyBindings.push(i),this._keyBindingChanged.emit({binding:i,type:"added"}),new je(function(){E.removeFirstOf(e._keyBindings,i),e._keyBindingChanged.emit({binding:i,type:"removed"})})},n.prototype.processKeydownEvent=function(t){if(!(this._replaying||n.isModifierKeyPressed(t))){var e=n.keystrokeForKeydownEvent(t);if(!e){this._replayKeydownEvents(),this._clearPendingState();return}this._keystrokes.push(e);var i=Se.matchKeyBinding(this._keyBindings,this._keystrokes,t),r=i.exact,s=i.partial;if(!r&&!s){this._replayKeydownEvents(),this._clearPendingState();return}if(t.preventDefault(),t.stopPropagation(),r&&!s){this._executeKeyBinding(r),this._clearPendingState();return}
1r&&(this._exactKeyMatch=r),this._keydownEvents.push(t),this._startTimer()}},n.prototype._startTimer=function(){var t=this;this._clearTimer(),this._timerID=window.setTimeout(function(){t._onPendingTimeout()},Se.CHORD_TIMEOUT)},n.prototype._clearTimer=function(){this._timerID!==0&&(clearTimeout(this._timerID),this._timerID=0)},n.prototype._replayKeydownEvents=function(){this._keydownEvents.length!==0&&(this._replaying=!0,this._keydownEvents.forEach(Se.replayKeyEvent),this._replaying=!1)},n.prototype._executeKeyBinding=function(t){var e=t.command,i=t.args;if(!this.hasCommand(e)||!this.isEnabled(e,i)){var r=this.hasCommand(e)?"enabled":"registered",s=t.keys.join(", "),c="Cannot execute key binding '"+s+"':",d="command '"+e+"' is not "+r+".";console.warn(c+" "+d);return}this.execute(e,i)},n.prototype._clearPendingState=function(){this._clearTimer(),this._exactKeyMatch=null,this._keystrokes.length=0,this._keydownEvents.length=0},n.prototype._onPendingTimeout=function(){this._timerID=0,this._exactKeyMatch?this._executeKeyBinding(this._exactKeyMatch):this._replayKeydownEvents(),this._clearPendingState()},n}();(function(n){function t(d){for(var m="",f=!1,y=!1,x=!1,g=!1,_=0,p=d.split(/\s+/);_<p.length;_++){var b=p[_];b==="Accel"?$.IS_MAC?y=!0:x=!0:b==="Alt"?f=!0:b==="Cmd"?y=!0:b==="Ctrl"?x=!0:b==="Shift"?g=!0:b.length>0&&(m=b)}return{cmd:y,ctrl:x,alt:f,shift:g,key:m}}n.parseKeystroke=t;function e(d){var m="",f=t(d);return f.ctrl&&(m+="Ctrl "),f.alt&&(m+="Alt "),f.shift&&(m+="Shift "),f.cmd&&$.IS_MAC&&(m+="Cmd "),m+f.key}n.normalizeKeystroke=e;function i(d){var m;return $.IS_WIN?m=d.winKeys||d.keys:$.IS_MAC?m=d.macKeys||d.keys:m=d.linuxKeys||d.keys,m.map(e)}n.normalizeKeys=i;function r(d){return typeof d=="string"?m(d):d.map(m).join(", ");function m(f){var y=[],x=$.IS_MAC?" ":"+",g=t(f);return g.ctrl&&y.push("Ctrl"),g.alt&&y.push("Alt"),g.shift&&y.push("Shift"),$.IS_MAC&&g.cmd&&y.push("Cmd"),y.push(g.key),y.map(Se.formatKey).join(x)}}n.formatKeystroke=r;function s(d){var m=qe(),f=m.keyForKeydownEvent(d);return m.isModifierKey(f)}n.isModifierKeyPressed=s;function c(d){var m=qe(),f=m.keyForKeydownEvent(d);if(!f||m.isModifierKey(f))return"";var y=[];return d.ctrlKey&&y.push("Ctrl"),d.altKey&&y.push("Alt"),d.shiftKey&&y.push("Shift"),d.metaKey&&$.IS_MAC&&y.push("Cmd"),y.push(f),y.join(" ")}n.keystrokeForKeydownEvent=c})(Ke||(Ke={}));(function(n){n.CHORD_TIMEOUT=1e3;function t(C){var k,D;return!C.icon||typeof C.icon=="string"?(D=p(C.iconClass||C.icon,m),k=D):(D=p(C.iconClass,m),k=p(C.icon,_)),{execute:C.execute,describedBy:Rt({args:null},C.describedBy),label:p(C.label,m),mnemonic:p(C.mnemonic,f),icon:k,iconClass:D,iconLabel:p(C.iconLabel,m),caption:p(C.caption,m),usage:p(C.usage,m),className:p(C.className,m),dataset:p(C.dataset,g),isEnabled:C.isEnabled||y,isToggled:C.isToggled||x,isToggleable:C.isToggleable||!!C.isToggled,isVisible:C.isVisible||y}}n.createCommand=t;function e(C){return{keys:Ke.normalizeKeys(C),selector:b(C),command:C.command,args:C.args||re.JSONExt.emptyObject}}n.createKeyBinding=e;function i(C,k,D){for(var A=null,l=!1,v=1/0,a=0,o=0,u=C.length;o<u;++o){var w=C[o],h=M(w.keys,k);if(h!==0){if(h===2){!l&&L(w.selector,D)!==-1&&(l=!0);continue}var I=L(w.selector,D);if(!(I===-1||I>v)){var z=me.calculateSpecificity(w.selector);(!A||I<v||z>=a)&&(A=w,v=I,a=z)}}}return{exact:A,partial:l}}n.matchKeyBinding=i;function r(C){C.target.dispatchEvent(S(C))}n.replayKeyEvent=r;function s(C){return $.IS_MAC?c.hasOwnProperty(C)?c[C]:C:d.hasOwnProperty(C)?d[C]:C}n.formatKey=s;var c={Backspace:"\u232B",Tab:"\u21E5",Enter:"\u21A9",Shift:"\u21E7",Ctrl:"\u2303",Alt:"\u2325",Escape:"\u238B",PageUp:"\u21DE",PageDown:"\u21DF",End:"\u2198",Home:"\u2196",ArrowLeft:"\u2190",ArrowUp:"\u2191",ArrowRight:"\u2192",ArrowDown:"\u2193",Delete:"\u2326",Cmd:"\u2318"},d={Escape:"Esc",PageUp:"Page Up",PageDown:"Page Down",ArrowLeft:"Left",ArrowUp:"Up",ArrowRight:"Right",ArrowDown:"Down",Delete:"Del"},m=function(){return""},f=function(){return-1},y=function(){return!0},x=function(){return!1},g=function(){return{}},_=function(){};function p(C,k){return C===void 0?k:typeof C=="function"?C:function(){return C}}function b(C){if(C.selector.indexOf(",")!==-1)throw new Error("Selector cannot contain commas: "+C.selector);if(!me.isValid(C.selector))throw new Error("Invalid selector: "+C.selector);return C.selector}function M(C,k){if(C.length<k.length)return 0;for(var D=0,A=k.length;D<A;++D)if(C[D]!==k[D])return 0;return C.length>k.length?2:1}function L(C,k){for(var D=k.target,A=k.currentTarget,l=0;D!==null;D=D.parentElement,++l){if(D.hasAttribute("data-lm-suppress-shortcuts")||D.hasAttribute("data-p-suppress-shortcuts"))return-1;if(me.matches(D,C))return l;if(D===A)return-1}return-1}function S(C){var k=document.createEvent("Event"),D=C.bubbles||!0,A=C.cancelable||!0;
1return k.initEvent(C.type||"keydown",D,A),k.key=C.key||"",k.keyCode=C.keyCode||0,k.which=C.keyCode||0,k.ctrlKey=C.ctrlKey||!1,k.altKey=C.altKey||!1,k.shiftKey=C.shiftKey||!1,k.metaKey=C.metaKey||!1,k.view=C.view||window,k}})(Se||(Se={}))});function Kn(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ht(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function F(n){for(var t={},e,i=[],r=1,s=arguments.length;r<s;++r){var c=arguments[r];typeof c=="string"?i.push(new st(c)):c instanceof st||c instanceof ut?i.push(c):c instanceof Array?d(i,c):(r===1||r===2)&&c&&typeof c=="object"&&("render"in c?e=c:t=c)}return new ut(n,t,i,e);function d(m,f){for(var y=0,x=f;y<x.length;y++){var g=x[y];typeof g=="string"?m.push(new st(g)):(g instanceof st||g instanceof ut)&&m.push(g)}}}var Ht,st,ut,Tr,ye,Oe,Cn=G(()=>{Fe();Ht=function(n,t){return Ht=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])},Ht(n,t)};st=function(){function n(t){this.type="text",this.content=t}return n}(),ut=function(){function n(t,e,i,r){this.type="element",this.tag=t,this.attrs=e,this.children=i,this.renderer=r}return n}(),Tr=function(n){Kn(t,n);function t(e,i,r){return n.call(this,e,i,[],r||void 0)||this}return t}(ut);(function(n){n.a=n.bind(void 0,"a"),n.abbr=n.bind(void 0,"abbr"),n.address=n.bind(void 0,"address"),n.area=n.bind(void 0,"area"),n.article=n.bind(void 0,"article"),n.aside=n.bind(void 0,"aside"),n.audio=n.bind(void 0,"audio"),n.b=n.bind(void 0,"b"),n.bdi=n.bind(void 0,"bdi"),n.bdo=n.bind(void 0,"bdo"),n.blockquote=n.bind(void 0,"blockquote"),n.br=n.bind(void 0,"br"),n.button=n.bind(void 0,"button"),n.canvas=n.bind(void 0,"canvas"),n.caption=n.bind(void 0,"caption"),n.cite=n.bind(void 0,"cite"),n.code=n.bind(void 0,"code"),n.col=n.bind(void 0,"col"),n.colgroup=n.bind(void 0,"colgroup"),n.data=n.bind(void 0,"data"),n.datalist=n.bind(void 0,"datalist"),n.dd=n.bind(void 0,"dd"),n.del=n.bind(void 0,"del"),n.dfn=n.bind(void 0,"dfn"),n.div=n.bind(void 0,"div"),n.dl=n.bind(void 0,"dl"),n.dt=n.bind(void 0,"dt"),n.em=n.bind(void 0,"em"),n.embed=n.bind(void 0,"embed"),n.fieldset=n.bind(void 0,"fieldset"),n.figcaption=n.bind(void 0,"figcaption"),n.figure=n.bind(void 0,"figure"),n.footer=n.bind(void 0,"footer"),n.form=n.bind(void 0,"form"),n.h1=n.bind(void 0,"h1"),n.h2=n.bind(void 0,"h2"),n.h3=n.bind(void 0,"h3"),n.h4=n.bind(void 0,"h4"),n.h5=n.bind(void 0,"h5"),n.h6=n.bind(void 0,"h6"),n.header=n.bind(void 0,"header"),n.hr=n.bind(void 0,"hr"),n.i=n.bind(void 0,"i"),n.iframe=n.bind(void 0,"iframe"),n.img=n.bind(void 0,"img"),n.input=n.bind(void 0,"input"),n.ins=n.bind(void 0,"ins"),n.kbd=n.bind(void 0,"kbd"),n.label=n.bind(void 0,"label"),n.legend=n.bind(void 0,"legend"),n.li=n.bind(void 0,"li"),n.main=n.bind(void 0,"main"),n.map=n.bind(void 0,"map"),n.mark=n.bind(void 0,"mark"),n.meter=n.bind(void 0,"meter"),n.nav=n.bind(void 0,"nav"),n.noscript=n.bind(void 0,"noscript"),n.object=n.bind(void 0,"object"),n.ol=n.bind(void 0,"ol"),n.optgroup=n.bind(void 0,"optgroup"),n.option=n.bind(void 0,"option"),n.output=n.bind(void 0,"output"),n.p=n.bind(void 0,"p"),n.param=n.bind(void 0,"param"),n.pre=n.bind(void 0,"pre"),n.progress=n.bind(void 0,"progress"),n.q=n.bind(void 0,"q"),n.rp=n.bind(void 0,"rp"),n.rt=n.bind(void 0,"rt"),n.ruby=n.bind(void 0,"ruby"),n.s=n.bind(void 0,"s"),n.samp=n.bind(void 0,"samp"),n.section=n.bind(void 0,"section"),n.select=n.bind(void 0,"select"),n.small=n.bind(void 0,"small"),n.source=n.bind(void 0,"source"),n.span=n.bind(void 0,"span"),n.strong=n.bind(void 0,"strong"),n.sub=n.bind(void 0,"sub"),n.summary=n.bind(void 0,"summary"),n.sup=n.bind(void 0,"sup"),n.table=n.bind(void 0,"table"),n.tbody=n.bind(void 0,"tbody"),n.td=n.bind(void 0,"td"),n.textarea=n.bind(void 0,"textarea"),n.tfoot=n.bind(void 0,"tfoot"),n.th=n.bind(void 0,"th"),n.thead=n.bind(void 0,"thead"),n.time=n.bind(void 0,"time"),n.title=n.bind(void 0,"title"),n.tr=n.bind(void 0,"tr"),n.track=n.bind(void 0,"track"),n.u=n.bind(void 0,"u"),n.ul=n.bind(void 0,"ul"),n.var_=n.bind(void 0,"var"),n.video=n.bind(void 0,"video"),n.wbr=n.bind(void 0,"wbr")})(F||(F={}));(function(n){function t(i){return Oe.createDOMNode(i)}n.realize=t;function e(i,r){var s=Oe.hostMap.get(r)||[],c=Oe.asContentArray(i);Oe.hostMap.set(r,c),Oe.updateContent(r,s,c)}n.render=e})(ye||(ye={}));(function(n){n.hostMap=new WeakMap;function t(_){return _?_ instanceof Array?_:[_]:[]}n.asContentArray=t;function e(_){var p=arguments[1]||null,b=arguments[2]||null;if(p)p.insertBefore(e(_),b);else{if(_.type==="text")return document.createTextNode(_.content);if(p=document.createElement(_.tag),c(p,_.attrs),_.renderer)return _.renderer.render(p,{attrs:_.attrs,children:_.children}),p;for(var M=0,L=_.children.length;M<L;++M)e(_.children[M],p)}return p}n.createDOMNode=e;function i(_,p,b){if(p!==b){for(var M=g(_,p),L=p.slice(),S=_.firstChild,C=b.length,k=0;k<C;++k){if(k>=L.length){e(b[k],_);continue}var D=L[k],A=b[k];
1if(D===A){S=S.nextSibling;continue}if(D.type==="text"&&A.type==="text"){S.textContent!==A.content&&(S.textContent=A.content),S=S.nextSibling;continue}if(D.type==="text"||A.type==="text"){E.insert(L,k,A),e(A,_,S);continue}if(!D.renderer!=!A.renderer){E.insert(L,k,A),e(A,_,S);continue}var l=A.attrs.key;if(l&&l in M){var v=M[l];v.vNode!==D&&(E.move(L,L.indexOf(v.vNode,k+1),k),_.insertBefore(v.element,S),D=v.vNode,S=v.element)}if(D===A){S=S.nextSibling;continue}var a=D.attrs.key;if(a&&a!==l){E.insert(L,k,A),e(A,_,S);continue}if(D.tag!==A.tag){E.insert(L,k,A),e(A,_,S);continue}d(S,D.attrs,A.attrs),A.renderer?A.renderer.render(S,{attrs:A.attrs,children:A.children}):i(S,D.children,A.children),S=S.nextSibling}r(_,L,C,!0)}}n.updateContent=i;function r(_,p,b,M){for(var L=p.length-1;L>=b;--L){var S=p[L],C=M?_.lastChild:_.childNodes[L];S.type==="text"||(S.renderer&&S.renderer.unrender?S.renderer.unrender(C,{attrs:S.attrs,children:S.children}):r(C,S.children,0,!1)),M&&_.removeChild(C)}}var s={key:!0,className:!0,htmlFor:!0,dataset:!0,style:!0};function c(_,p){for(var b in p)b in s||(b.substr(0,2)==="on"?_[b]=p[b]:_.setAttribute(b,p[b]));p.className!==void 0&&_.setAttribute("class",p.className),p.htmlFor!==void 0&&_.setAttribute("for",p.htmlFor),p.dataset&&m(_,p.dataset),p.style&&y(_,p.style)}function d(_,p,b){if(p!==b){var M;for(M in p)M in s||M in b||(M.substr(0,2)==="on"?_[M]=null:_.removeAttribute(M));for(M in b)M in s||p[M]===b[M]||(M.substr(0,2)==="on"?_[M]=b[M]:_.setAttribute(M,b[M]));p.className!==b.className&&(b.className!==void 0?_.setAttribute("class",b.className):_.removeAttribute("class")),p.htmlFor!==b.htmlFor&&(b.htmlFor!==void 0?_.setAttribute("for",b.htmlFor):_.removeAttribute("for")),p.dataset!==b.dataset&&f(_,p.dataset||{},b.dataset||{}),p.style!==b.style&&x(_,p.style||{},b.style||{})}}function m(_,p){for(var b in p)_.setAttribute("data-"+b,p[b])}function f(_,p,b){for(var M in p)M in b||_.removeAttribute("data-"+M);for(var L in b)p[L]!==b[L]&&_.setAttribute("data-"+L,b[L])}function y(_,p){var b=_.style,M;for(M in p)b[M]=p[M]}function x(_,p,b){var M=_.style,L;for(L in p)L in b||(M[L]="");for(L in b)p[L]!==b[L]&&(M[L]=b[L])}function g(_,p){for(var b=_.firstChild,M=Object.create(null),L=0,S=p;L<S.length;L++){var C=S[L];C.type==="element"&&C.attrs.key&&(M[C.attrs.key]={vNode:C,element:b}),b=b.nextSibling}return M}})(Oe||(Oe={}))});function K(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Nt(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function Vn(n,t){var e={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&t.indexOf(i)<0&&(e[i]=n[i]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(n);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(n,i[r])&&(e[i[r]]=n[i[r]]);return e}function Un(){for(var n=0,t=0,e=arguments.length;t<e;t++)n+=arguments[t].length;for(var i=Array(n),r=0,t=0;t<e;t++)for(var s=arguments[t],c=0,d=s.length;c<d;c++,r++)i[r]=s[c];return i}var Pe,Nt,Z,Le,de,Ft,O,ct,ke,et,Ve,pt,Ze,Qe,Re,xe,Yn,dt,Xt,Wt,Je,jt,qt,Kt,ve,Be,Sn,Vt,Ln,be,Ye,oe,Vr,ht,Xe,he,Xn,Y,kn,V,Ur,Ut,X,Dn,ft,Yr,lt,Xr,Gn,$n,Yt,Gr,Ue,Zn=G(()=>{Fe();gt();hn();It();it();bn();Pe=Gt(zt());In();Cn();Tt();Pt();Nt=function(n,t){return Nt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])},Nt(n,t)};Z=function(){return Z=Object.assign||function(t){for(var e,i=1,r=arguments.length;i<r;i++){e=arguments[i];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s])}return t},Z.apply(this,arguments)};Le=function(){function n(){this.sizeHint=0,this.minSize=0,this.maxSize=1/0,this.stretch=1,this.size=0,this.done=!1}return n}();(function(n){function t(s,c){var d=s.length;if(d===0)return c;for(var m=0,f=0,y=0,x=0,g=0,_=0;_<d;++_){var p=s[_],b=p.minSize,M=p.maxSize,L=p.sizeHint;p.done=!1,p.size=Math.max(b,Math.min(L,M)),y+=p.size,m+=b,f+=M,p.stretch>0&&(x+=p.stretch,g++)}if(c===y)return 0;if(c<=m){for(var _=0;_<d;++_){var p=s[_];p.size=p.minSize}return c-m}if(c>=f){for(var _=0;_<d;++_){var p=s[_];p.size=p.maxSize}return c-f}var S=.01,C=d;if(c<y){for(var k=y-c;g>0&&k>S;)for(var D=k,A=x,_=0;_<d;++_){var p=s[_];if(!(p.done||p.stretch===0)){var l=p.stretch*D/A;p.size-l<=p.minSize?(k-=p.size-p.minSize,x-=p.stretch,p.size=p.minSize,p.done=!0,C--,g--):(k-=l,p.size-=l)}}for(;C>0&&k>S;)for(var l=k/C,_=0;_<d;++_){var p=s[_];p.done||(p.size-l<=p.minSize?(k-=p.size-p.minSize,p.size=p.minSize,p.done=!0,C--):(k-=l,p.size-=l))}}else{for(var k=c-y;g>0&&k>S;)for(var D=k,A=x,_=0;_<d;++_){var p=s[_];if(!(p.done||p.stretch===0)){var l=p.stretch*D/A;p.size+l>=p.maxSize?(k-=p.maxSize-p.size,x-=p.stretch,p.size=p.maxSize,p.done=!0,C--,g--):(k-=l,p.size+=l)}}for(;C>0&&k>S;)for(var l=k/C,_=0;_<d;++_){var p=s[_];p.done||(p.size+l>=p.maxSize?(k-=p.maxSize-p.size,p.size=p.maxSize,p.done=!0,C--):(k-=l,p.size+=l))}}return 0}n.calc=t;function e(s,c,d){s.length===0||d===0||(d>0?i(s,c,d):r(s,c,-d))}n.adjust=e;function i(s,c,d){for(var m=0,f=0;f<=c;++f){var y=s[f];m+=y.maxSize-y.size}for(var x=0,f=c+1,g=s.length;f<g;++f){var y=s[f];x+=y.size-y.minSize}d=Math.min(d,m,x);for(var _=d,f=c;f>=0&&_>0;--f){var y=s[f],p=y.maxSize-y.size;p>=_?(y.sizeHint=y.size+_,_=0):(y.sizeHint=y.size+p,_-=p)}for(var b=d,f=c+1,g=s.length;f<g&&b>0;++f){var y=s[f],p=y.size-y.minSize;p>=b?(y.sizeHint=y.size-b,b=0):(y.sizeHint=y.size-p,b-=p)}}function r(s,c,d){for(var m=0,f=c+1,y=s.length;f<y;++f){var x=s[f];m+=x.maxSize-x.size}for(var g=0,f=0;f<=c;++f){var x=s[f];g+=x.size-x.minSize}d=Math.min(d,m,g);for(var _=d,f=c+1,y=s.length;f<y&&_>0;++f){var x=s[f],p=x.maxSize-x.size;p>=_?(x.sizeHint=x.size+_,_=0):(x.sizeHint=x.size+p,_-=p)}for(var b=d,f=c;f>=0&&b>0;--f){var x=s[f],p=x.size-x.minSize;p>=b?(x.sizeHint=x.size-b,b=0):(x.sizeHint=x.size-p,b-=p)}}})(de||(de={}));Ft=function(){function n(t){this._label="",this._caption="",this._mnemonic=-1,this._iconClass="",this._iconLabel="",this._className="",this._closable=!1,this._changed=new H(this),this._isDisposed=!1,this.owner=t.owner,t.label!==void 0&&(this._label=t.label),t.mnemonic!==void 0&&(this._mnemonic=t.mnemonic),t.icon!==void 0?typeof t.icon=="str
1ing"?(this._icon=null,this._iconClass=t.icon):this._icon=t.icon:this._icon=null,t.iconClass!==void 0&&(this._iconClass=t.iconClass),t.iconLabel!==void 0&&(this._iconLabel=t.iconLabel),t.iconRenderer!==void 0&&(this._icon=t.iconRenderer),t.caption!==void 0&&(this._caption=t.caption),t.className!==void 0&&(this._className=t.className),t.closable!==void 0&&(this._closable=t.closable),this._dataset=t.dataset||{}}return Object.defineProperty(n.prototype,"changed",{get:function(){return this._changed},enumerable:!0,configurable:!0}),Object.defineProperty(n.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(n.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(n.prototype,"icon",{get:function(){return this._icon===null?this.iconClass:this._icon},set:function(t){if(typeof t=="string")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(n.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(n.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(n.prototype,"iconRenderer",{get:function(){return this._icon||void 0},set:function(t){this.icon=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.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(n.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(n.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(n.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(n.prototype,"isDisposed",{get:function(){return this._isDisposed},enumerable:!0,configurable:!0}),n.prototype.dispose=function(){this.isDisposed||(this._isDisposed=!0,H.clearData(this))},n}(),O=function(){function n(t){t===void 0&&(t={}),this._flags=0,this._layout=null,this._parent=null,this._disposed=new H(this),this._hiddenMode=n.HiddenMode.Display,this.node=ct.createNode(t),this.addClass("lm-Widget"),this.addClass("p-Widget")}return n.prototype.dispose=function(){this.isDisposed||(this.setFlag(n.Flag.IsDisposed),this._disposed.emit(void 0),this.parent?this.parent=null:this.isAttached&&n.detach(this),this._layout&&(this._layout.dispose(),this._layout=null),this.title.dispose(),H.clearData(this),T.clearData(this),ie.clearData(this))},Object.defineProperty(n.prototype,"disposed",{get:function(){return this._disposed},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isDisposed",{get:function(){return this.testFlag(n.Flag.IsDisposed)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isAttached",{get:function(){return this.testFlag(n.Flag.IsAttached)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isHidden",{get:function(){return this.testFlag(n.Flag.IsHidden)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isVisible",{get:function(){return this.testFlag(n.Flag.IsVisible)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"title",{get:function(){return ct.titleProperty.get(this)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"id",{get:function(){return this.node.id},set:function(t){this.node.id=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"dataset",{get:function(){return this.node.dataset},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hiddenMode",{get:function(){return this._hiddenMode},set:function(t){this._hiddenMode!==t&&(this.isHidden&&this._toggleHidden(!1),t==n.HiddenMode.Scale?this.node.style.willChange="transform":this.node.style.willChange="auto",this._hiddenMode=t,this.isHidden&&this._toggleHidden(!0))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parent",{get:function(){return this._parent},set:function(t){if(this._parent!==t){if(t&&this.contains(t))throw new Error("Invalid parent widget.");if(this._parent&&!this._parent.isDisposed){var e=new n.ChildMessage("child-removed",this);T.sendMessage(this._parent,e)}if(this._parent=t,this._parent&&!this._parent.isDisposed){var e=new n.ChildMessage("child-added",this);T.sendMessage(this._parent,e)}this.isDisposed||T.sendMessage(this,n.Msg.ParentChanged)}},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"layout",{get:function(){return this._layout},set:function(t){if(this._layout!==t){if(this.testFlag(n.Flag.DisallowLayout))throw new Error("Cannot set widget layout.");if(this._layout)throw new Error("Cannot change widget layout.");if(t.parent)throw new Error("Cannot change layout parent.");this._layout=t,t.parent=this}},enumerable:!0,configurable:!0}),n.prototype.children=function(){return this._layout?this._layout.iter():_e()},n.prototype.contains=function(t){for(var e=t;e;e=e._parent)if(e===this)return!0;return!1},n.prototype.hasClass=function(t){return this.node.classList.contains(t)},n.prototype.addClass=function(t){this.node.classList.add(t)},n.prototype.removeClass=function(t){this.node.classList.remove(t)},n.prototype.toggleClass=function(t,e){return e===!0?(this.node.classList.add(t),!0):e===!1?(this.node.classList.remove(t),!1):this.node.classList.toggle(t)},n.prototype.update=function(){T.postMessage(this,n.Msg.UpdateRequest)},n.prototype.fit=function(){T.postMessage(this,n.Msg.FitRequest)},n.prototype.activate=function(){T.postMessage(this,n.Msg.ActivateRequest)},n.prototype.close=function(){T.sendMessage(this,n.Msg.CloseRequest)}
1,n.prototype.show=function(){if(this.testFlag(n.Flag.IsHidden)&&(this.isAttached&&(!this.parent||this.parent.isVisible)&&T.sendMessage(this,n.Msg.BeforeShow),this.clearFlag(n.Flag.IsHidden),this.node.removeAttribute("aria-hidden"),this._toggleHidden(!1),this.isAttached&&(!this.parent||this.parent.isVisible)&&T.sendMessage(this,n.Msg.AfterShow),this.parent)){var t=new n.ChildMessage("child-shown",this);T.sendMessage(this.parent,t)}},n.prototype.hide=function(){if(!this.testFlag(n.Flag.IsHidden)&&(this.isAttached&&(!this.parent||this.parent.isVisible)&&T.sendMessage(this,n.Msg.BeforeHide),this.setFlag(n.Flag.IsHidden),this.node.setAttribute("aria-hidden","true"),this._toggleHidden(!0),this.isAttached&&(!this.parent||this.parent.isVisible)&&T.sendMessage(this,n.Msg.AfterHide),this.parent)){var t=new n.ChildMessage("child-hidden",this);T.sendMessage(this.parent,t)}},n.prototype.setHidden=function(t){t?this.hide():this.show()},n.prototype.testFlag=function(t){return(this._flags&t)!==0},n.prototype.setFlag=function(t){this._flags|=t},n.prototype.clearFlag=function(t){this._flags&=~t},n.prototype.processMessage=function(t){switch(t.type){case"resize":this.notifyLayout(t),this.onResize(t);break;case"update-request":this.notifyLayout(t),this.onUpdateRequest(t);break;case"fit-request":this.notifyLayout(t),this.onFitRequest(t);break;case"before-show":this.notifyLayout(t),this.onBeforeShow(t);break;case"after-show":this.setFlag(n.Flag.IsVisible),this.notifyLayout(t),this.onAfterShow(t);break;case"before-hide":this.notifyLayout(t),this.onBeforeHide(t);break;case"after-hide":this.clearFlag(n.Flag.IsVisible),this.notifyLayout(t),this.onAfterHide(t);break;case"before-attach":this.notifyLayout(t),this.onBeforeAttach(t);break;case"after-attach":!this.isHidden&&(!this.parent||this.parent.isVisible)&&this.setFlag(n.Flag.IsVisible),this.setFlag(n.Flag.IsAttached),this.notifyLayout(t),this.onAfterAttach(t);break;case"before-detach":this.notifyLayout(t),this.onBeforeDetach(t);break;case"after-detach":this.clearFlag(n.Flag.IsVisible),this.clearFlag(n.Flag.IsAttached),this.notifyLayout(t),this.onAfterDetach(t);break;case"activate-request":this.notifyLayout(t),this.onActivateRequest(t);break;case"close-request":this.notifyLayout(t),this.onCloseRequest(t);break;case"child-added":this.notifyLayout(t),this.onChildAdded(t);break;case"child-removed":this.notifyLayout(t),this.onChildRemoved(t);break;default:this.notifyLayout(t);break}},n.prototype.notifyLayout=function(t){this._layout&&this._layout.processParentMessage(t)},n.prototype.onCloseRequest=function(t){this.parent?this.parent=null:this.isAttached&&n.detach(this)},n.prototype.onResize=function(t){},n.prototype.onUpdateRequest=function(t){},n.prototype.onFitRequest=function(t){},n.prototype.onActivateRequest=function(t){},n.prototype.onBeforeShow=function(t){},n.prototype.onAfterShow=function(t){},n.prototype.onBeforeHide=function(t){},n.prototype.onAfterHide=function(t){},n.prototype.onBeforeAttach=function(t){},n.prototype.onAfterAttach=function(t){},n.prototype.onBeforeDetach=function(t){},n.prototype.onAfterDetach=function(t){},n.prototype.onChildAdded=function(t){},n.prototype.onChildRemoved=function(t){},n.prototype._toggleHidden=function(t){if(t)switch(this._hiddenMode){case n.HiddenMode.Display:this.addClass("lm-mod-hidden"),this.addClass("p-mod-hidden");break;case n.HiddenMode.Scale:this.node.style.transform="scale(0)";break;case n.HiddenMode.ContentVisibility:this.node.style.contentVisibility="hidden",this.node.style.zIndex="-1";break}else switch(this._hiddenMode){case n.HiddenMode.Display:this.removeClass("lm-mod-hidden"),this.removeClass("p-mod-hidden");break;case n.HiddenMode.Scale:this.node.style.transform="";break;case n.HiddenMode.ContentVisibility:this.node.style.contentVisibility="",this.node.style.zIndex="";break}},n}();(function(n){(function(s){s[s.Display=0]="Display",s[s.Scale=1]="Scale",s[s.ContentVisibility=2]="ContentVisibility"})(n.HiddenMode||(n.HiddenMode={})),function(s){s[s.IsDisposed=1]="IsDisposed",s[s.IsAttached=2]="IsAttached",s[s.IsHidden=4]="IsHidden",s[s.IsVisible=8]="IsVisible",s[s.DisallowLayout=16]="DisallowLayout"}(n.Flag||(n.Flag={})),function(s){s.BeforeShow=new ce("before-show"),s.AfterShow=new ce("after-show"),s.BeforeHide=new ce("before-hide"),s.AfterHide=new ce("after-hide"),s.BeforeAttach=new ce("before-attach"),s.AfterAttach=new ce("after-attach"),s.BeforeDetach=new ce("before-detach"),s.AfterDetach=new ce("after-detach"),s.ParentChanged=new ce("parent-changed"),s.UpdateRequest=new We("update-request"),s.FitRequest=new We("fit-request"),s.ActivateRequest=new We("activate-request"),s.CloseRequest=new We("close-request")}(n.Msg||(n.Msg={}));var t=function(s){K(c,s);function c(d,m){var f=s.call(this,d)||this;return f.child=m,f}return c}(ce);n.ChildMessage=t;var e=function(s){K(c,s);function c(d,m){var f=s.call(this,"resize")||this;return f.width=d,f.height=m,f}return c}(ce);n.ResizeMessage=e,function(s){s.UnknownSize=new s(-1,-1)}(e=n.ResizeMessage||(n.ResizeMessage={}));function i(s,c,d){if(d===void 0&&(d=null),s.parent)throw new Error("Cannot attach a child widget.");if(s.isAttached||s.node.isConnected)throw new Error("Widget is already attached.");if(!c.isConnected)throw new Error("Host is not attached.");T.sendMessage(s,n.Msg.BeforeAttach),c.insertBefore(s.node,d),T.sendMessage(s,n.Msg.AfterAttach)}n.attach=i;function r(s){if(s.parent)throw new Error("Cannot detach a child widget.");if(!s.isAttached||!s.node.isConnected)throw new Error("Widget is not attached.");T.sendMessage(s,n.Msg.BeforeDetach),s.node.parentNode.removeChild(s.node),T.sendMessage(s,n.Msg.AfterDetach)}n.detach=r})(O||(O={}));(function(n){n.titleProperty=new ie({name:"title",create:function(e){return new Ft({owner:e})}});
1function t(e){return e.node||document.createElement(e.tag||"div")}n.createNode=t})(ct||(ct={}));ke=function(){function n(t){t===void 0&&(t={}),this._disposed=!1,this._parent=null,this._fitPolicy=t.fitPolicy||"set-min-size"}return n.prototype.dispose=function(){this._parent=null,this._disposed=!0,H.clearData(this),ie.clearData(this)},Object.defineProperty(n.prototype,"isDisposed",{get:function(){return this._disposed},enumerable:!0,configurable:!0}),Object.defineProperty(n.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(n.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}),n.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);break}},n.prototype.init=function(){var t=this;R(this,function(e){e.parent=t.parent})},n.prototype.onResize=function(t){R(this,function(e){T.sendMessage(e,O.ResizeMessage.UnknownSize)})},n.prototype.onUpdateRequest=function(t){R(this,function(e){T.sendMessage(e,O.ResizeMessage.UnknownSize)})},n.prototype.onBeforeAttach=function(t){R(this,function(e){T.sendMessage(e,t)})},n.prototype.onAfterAttach=function(t){R(this,function(e){T.sendMessage(e,t)})},n.prototype.onBeforeDetach=function(t){R(this,function(e){T.sendMessage(e,t)})},n.prototype.onAfterDetach=function(t){R(this,function(e){T.sendMessage(e,t)})},n.prototype.onBeforeShow=function(t){R(this,function(e){e.isHidden||T.sendMessage(e,t)})},n.prototype.onAfterShow=function(t){R(this,function(e){e.isHidden||T.sendMessage(e,t)})},n.prototype.onBeforeHide=function(t){R(this,function(e){e.isHidden||T.sendMessage(e,t)})},n.prototype.onAfterHide=function(t){R(this,function(e){e.isHidden||T.sendMessage(e,t)})},n.prototype.onChildRemoved=function(t){this.removeWidget(t.child)},n.prototype.onFitRequest=function(t){},n.prototype.onChildShown=function(t){},n.prototype.onChildHidden=function(t){},n}();(function(n){function t(s){return Ve.horizontalAlignmentProperty.get(s)}n.getHorizontalAlignment=t;function e(s,c){Ve.horizontalAlignmentProperty.set(s,c)}n.setHorizontalAlignment=e;function i(s){return Ve.verticalAlignmentProperty.get(s)}n.getVerticalAlignment=i;function r(s,c){Ve.verticalAlignmentProperty.set(s,c)}n.setVerticalAlignment=r})(ke||(ke={}));et=function(){function n(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 n.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(n.prototype,"minWidth",{get:function(){return this._minWidth},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"minHeight",{get:function(){return this._minHeight},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"maxWidth",{get:function(){return this._maxWidth},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"maxHeight",{get:function(){return this._maxHeight},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isDisposed",{get:function(){return this._disposed},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isHidden",{get:function(){return this.widget.isHidden},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isVisible",{get:function(){return this.widget.isVisible},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isAttached",{get:function(){return this.widget.isAttached},enumerable:!0,configurable:!0}),n.prototype.fit=function(){var t=W.sizeLimits(this.widget.node);this._minWidth=t.minWidth,this._minHeight=t.minHeight,this._maxWidth=t.maxWidth,this._maxHeight=t.maxHeight}
1,n.prototype.update=function(t,e,i,r){var s=Math.max(this._minWidth,Math.min(i,this._maxWidth)),c=Math.max(this._minHeight,Math.min(r,this._maxHeight));if(s<i)switch(ke.getHorizontalAlignment(this.widget)){case"left":break;case"center":t+=(i-s)/2;break;case"right":t+=i-s;break;default:throw"unreachable"}if(c<r)switch(ke.getVerticalAlignment(this.widget)){case"top":break;case"center":e+=(r-c)/2;break;case"bottom":e+=r-c;break;default:throw"unreachable"}var d=!1,m=this.widget.node.style;if(this._top!==e&&(this._top=e,m.top=e+"px"),this._left!==t&&(this._left=t,m.left=t+"px"),this._width!==s&&(d=!0,this._width=s,m.width=s+"px"),this._height!==c&&(d=!0,this._height=c,m.height=c+"px"),d){var f=new O.ResizeMessage(s,c);T.sendMessage(this.widget,f)}},n}();(function(n){n.horizontalAlignmentProperty=new ie({name:"horizontalAlignment",create:function(){return"center"},changed:t}),n.verticalAlignmentProperty=new ie({name:"verticalAlignment",create:function(){return"top"},changed:t});function t(e){e.parent&&e.parent.layout&&e.parent.update()}})(Ve||(Ve={}));pt=function(n){K(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e._widgets=[],e}return t.prototype.dispose=function(){for(;this._widgets.length>0;)this._widgets.pop().dispose();n.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"widgets",{get:function(){return this._widgets},enumerable:!0,configurable:!0}),t.prototype.iter=function(){return le(this._widgets)},t.prototype.addWidget=function(e){this.insertWidget(this._widgets.length,e)},t.prototype.insertWidget=function(e,i){i.parent=this.parent;var r=this._widgets.indexOf(i),s=Math.max(0,Math.min(e,this._widgets.length));if(r===-1){E.insert(this._widgets,s,i),this.parent&&this.attachWidget(s,i);return}s===this._widgets.length&&s--,r!==s&&(E.move(this._widgets,r,s),this.parent&&this.moveWidget(r,s,i))},t.prototype.removeWidget=function(e){this.removeWidgetAt(this._widgets.indexOf(e))},t.prototype.removeWidgetAt=function(e){var i=E.removeAt(this._widgets,e);i&&this.parent&&this.detachWidget(e,i)},t.prototype.init=function(){var e=this;n.prototype.init.call(this),R(this,function(i,r){e.attachWidget(r,i)})},t.prototype.attachWidget=function(e,i){var r=this.parent.node.children[e];this.parent.isAttached&&T.sendMessage(i,O.Msg.BeforeAttach),this.parent.node.insertBefore(i.node,r),this.parent.isAttached&&T.sendMessage(i,O.Msg.AfterAttach)},t.prototype.moveWidget=function(e,i,r){this.parent.isAttached&&T.sendMessage(r,O.Msg.BeforeDetach),this.parent.node.removeChild(r.node),this.parent.isAttached&&T.sendMessage(r,O.Msg.AfterDetach);var s=this.parent.node.children[i];this.parent.isAttached&&T.sendMessage(r,O.Msg.BeforeAttach),this.parent.node.insertBefore(r.node,s),this.parent.isAttached&&T.sendMessage(r,O.Msg.AfterAttach)},t.prototype.detachWidget=function(e,i){this.parent.isAttached&&T.sendMessage(i,O.Msg.BeforeDetach),this.parent.node.removeChild(i.node),this.parent.isAttached&&T.sendMessage(i,O.Msg.AfterDetach)},t}(ke);(function(n){function t(e){return Math.max(0,Math.floor(e))}n.clampDimension=t})(Ze||(Ze={}));Qe=Ze,Re=function(n){K(t,n);function t(e){var i=n.call(this)||this;return i.widgetOffset=0,i._fixed=0,i._spacing=4,i._dirty=!1,i._hasNormedSizes=!1,i._sizers=[],i._items=[],i._handles=[],i._box=null,i._alignment="start",i._orientation="horizontal",i.renderer=e.renderer,e.orientation!==void 0&&(i._orientation=e.orientation),e.alignment!==void 0&&(i._alignment=e.alignment),e.spacing!==void 0&&(i._spacing=Ze.clampDimension(e.spacing)),i}return t.prototype.dispose=function(){R(this._items,function(e){e.dispose()}),this._box=null,this._items.length=0,this._sizers.length=0,this._handles.length=0,n.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"orientation",{get:function(){return this._orientation},set:function(e){this._orientation!==e&&(this._orientation=e,this.parent&&(this.parent.dataset.orientation=e,this.parent.fit()))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"alignment",{get:function(){return this._alignment},set:function(e){this._alignment!==e&&(this._alignment=e,this.parent&&(this.parent.dataset.alignment=e,this.parent.update(
1)))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"spacing",{get:function(){return this._spacing},set:function(e){e=Ze.clampDimension(e),this._spacing!==e&&(this._spacing=e,this.parent&&this.parent.fit())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"handles",{get:function(){return this._handles},enumerable:!0,configurable:!0}),t.prototype.absoluteSizes=function(){return this._sizers.map(function(e){return e.size})},t.prototype.relativeSizes=function(){return xe.normalize(this._sizers.map(function(e){return e.size}))},t.prototype.setRelativeSizes=function(e,i){i===void 0&&(i=!0);for(var r=this._sizers.length,s=e.slice(0,r);s.length<r;)s.push(0);for(var c=xe.normalize(s),d=0;d<r;++d){var m=this._sizers[d];m.sizeHint=c[d],m.size=c[d]}this._hasNormedSizes=!0,i&&this.parent&&this.parent.update()},t.prototype.moveHandle=function(e,i){var r=this._handles[e];if(!(!r||r.classList.contains("lm-mod-hidden"))){var s;if(this._orientation==="horizontal"?s=i-r.offsetLeft:s=i-r.offsetTop,s!==0){for(var c=0,d=this._sizers;c<d.length;c++){var m=d[c];m.size>0&&(m.sizeHint=m.size)}de.adjust(this._sizers,e,s),this.parent&&this.parent.update()}}},t.prototype.init=function(){this.parent.dataset.orientation=this.orientation,this.parent.dataset.alignment=this.alignment,n.prototype.init.call(this)},t.prototype.attachWidget=function(e,i){var r=new et(i),s=xe.createHandle(this.renderer),c=xe.averageSize(this._sizers),d=xe.createSizer(c);E.insert(this._items,e,r),E.insert(this._sizers,e,d),E.insert(this._handles,e,s),this.parent.isAttached&&T.sendMessage(i,O.Msg.BeforeAttach),this.parent.node.appendChild(i.node),this.parent.node.appendChild(s),this.parent.isAttached&&T.sendMessage(i,O.Msg.AfterAttach),this.parent.fit()},t.prototype.moveWidget=function(e,i,r){E.move(this._items,e,i),E.move(this._sizers,e,i),E.move(this._handles,e,i),this.parent.fit()},t.prototype.detachWidget=function(e,i){var r=E.removeAt(this._items,e),s=E.removeAt(this._handles,e);E.removeAt(this._sizers,e),this.parent.isAttached&&T.sendMessage(i,O.Msg.BeforeDetach),this.parent.node.removeChild(i.node),this.parent.node.removeChild(s),this.parent.isAttached&&T.sendMessage(i,O.Msg.AfterDetach),r.dispose(),this.parent.fit()},t.prototype.onBeforeShow=function(e){n.prototype.onBeforeShow.call(this,e),this.parent.update()},t.prototype.onBeforeAttach=function(e){n.prototype.onBeforeAttach.call(this,e),this.parent.fit()},t.prototype.onChildShown=function(e){this.parent.fit()},t.prototype.onChildHidden=function(e){this.parent.fit()},t.prototype.onResize=function(e){this.parent.isVisible&&this._update(e.width,e.height)},t.prototype.onUpdateRequest=function(e){this.parent.isVisible&&this._update(-1,-1)},t.prototype.onFitRequest=function(e){this.parent.isAttached&&this._fit()},t.prototype.updateItemPosition=function(e,i,r,s,c,d,m){var f=this._items[e];if(!f.isHidden){var y=this._handles[e].style;i?(r+=this.widgetOffset,f.update(r,s,m,c),r+=m,y.top=s+"px",y.left=r+"px",y.width=this._spacing+"px",y.height=c+"px"):(s+=this.widgetOffset,f.update(r,s,d,m),s+=m,y.top=s+"px",y.left=r+"px",y.width=d+"px",y.height=this._spacing+"px")}},t.prototype._fit=function(){for(var e=0,i=-1,r=0,s=this._items.length;r<s;++r)this._items[r].isHidden?(this._handles[r].classList.add("lm-mod-hidden"),this._handles[r].classList.add("p-mod-hidden")):(this._handles[r].classList.remove("lm-mod-hidden"),this._handles[r].classList.remove("p-mod-hidden"),i=r,e++);i!==-1&&(this._handles[i].classList.add("lm-mod-hidden"),this._handles[i].classList.add("p-mod-hidden")),this._fixed=this._spacing*Math.max(0,e-1)+this.widgetOffset*this._items.length;for(var c=this._orientation==="horizontal",d=c?this._fixed:0,m=c?0:this._fixed,r=0,s=this._items.length;r<s;++r){var f=this._items[r],y=this._sizers[r];if(y.size>0&&(y.sizeHint=y.size),f.isHidden){y.minSize=0,y.maxSize=0;continue}f.fit(),y.stretch=t.getStretch(f.widget),c?(y.minSize=f.minWidth,y.maxSize=f.maxWidth,d+=f.minWidth,m=Math.max(m,f.minHeight)):(y.minSize=f.minHeight,y.maxSize=f.maxHeight,m+=f.minHeight,d=Math.max(d,f.minWidth))}var x=this._box=W.boxSizing(this.parent.node);d+=x.horizontalSum,m+=x.verticalSum;var g=this.parent.node.style;g.minWidth=d+"px",g.minHeight=m+"px",this._dirty=!0,this.parent.parent&&T.sendMessage(this.parent.parent,O.Msg.FitRequest),this._dirty&&T.sendMessage(this.parent,O.Msg.UpdateRequest)},t.prototype._update=function(e,i){this._dirty=!1;for(var r=0,s=0,c=this._items.length;s<c;++s)r+=+!this._items[s].isHidden;if(!(r===0&&this.widgetOffset===0)){e<0&&(e=this.parent.node.offsetWidth),i<0&&(i=this.parent.node.offsetHeight),this._box||(this._box=W.boxSizing(this.parent.node));var d=this._box.paddingTop,m=this._box.paddingLeft,f=e-this._box.horizontalSum,y=i-this._box.verticalSum,x=0,g=0,_=this._orientation==="horizontal";if(r>0){var p=void 0;if(_?p=Math.max(0,f-this._fixed):p=Math.max(0,y-this._fixed),this._hasNormedSizes){for(var b=0,M=this._sizers;b<M.length;b++){var L=M[b];L.sizeHint*=p}this._hasNormedSizes=!1}var S=de.calc(this._sizers,p);if(S>0)switch(this._alignment){case"start":break;case"center":x=0,g=S/2;break;case"end":x=0,g=S;break;case"justify":x=S/r,g=0;break;default:throw"unreachable"}}for(var s=0,c=this._items.length;s<c;++s){var C=this._items[s],k=C.isHidden?0:this._sizers[s].size+x;this.updateItemPosition(s,_,_?m+g:m,_?d:d+g,y,f,k);var D=this.widgetOffset+(this._handles[s].classList.contains("lm-mod-hidden")?0:this._spacing);_?m+=k+D:d+=k+D}}},t}(pt);(function(n){function t(i){return xe.stretchProperty.get(i)}n.getStretch=t;function e(i,r){xe.stretchProperty.set(i,r)}n.setStretch=e})(Re||(Re={}));(function(n){n.stretchProperty=new ie({name:"stretch",create:function(){return 0},coerce:function(c,d){return Math.max(0,Math.floor(d))},changed:s});function t(c){var d=new Le;return d.sizeHint=Math.floor(c),d}n.createSizer=t;function e(c){var d=c.createHandle();return d.style.position="absolute",d}n.createHandle=e;function i(c){return c.reduce(function(d,m){return d+m.size},0)/c.length||0}n.averageSize=i;function r(c){var d=c.length;if(d===0)return[];var m=c.reduce(function(f,y){return f+Math.abs(y)},0);return m===0?c.map(function(f){return 1/d}):c.map(function(f){return f/m})}n.normalize=r;function s(c){c.parent&&c.parent.layout instanceof Re&&c.parent.fit()}})(xe||(xe={}));Yn=function(n){K(t,n);function t(e){var i=n.call(this,Z(Z({},e),{orientation:e.orientation||"vertical"}))||this;return i._titles=[],i.titleSpace=e.titleSpace||22,i}return Object.defineProperty(t.prototype,"titleSpace",{get:function(){return this.widgetOffset},set:function(e){e=Qe.clampDimension(e),this.widgetOffset!==e&&(this.widgetOffset=e,this.parent&&this.parent.fit())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"titles",{get:function(){return this._titles},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this.isDisposed||(this._titles.length=0,n.prototype.dispose.call(this))},t.prototype.updateTitle=function(e,i){var r=this._titles[e],s=r.classList.contains("lm-mod-expanded"),c=dt.createTitle(this.renderer,i.title,s);this._titles[e]=c,this.parent.node.replaceChild(c,r)},t.prototype.attachWidget=function(e,i){var r=dt.createTitle(this.renderer,i.title);E.insert(this._titles,e,r),this.parent.node.appendChild(r),i.node.setAttribute("role","regi
1on"),i.node.setAttribute("aria-labelledby",r.id),n.prototype.attachWidget.call(this,e,i)},t.prototype.moveWidget=function(e,i,r){E.move(this._titles,e,i),n.prototype.moveWidget.call(this,e,i,r)},t.prototype.detachWidget=function(e,i){var r=E.removeAt(this._titles,e);this.parent.node.removeChild(r),n.prototype.detachWidget.call(this,e,i)},t.prototype.updateItemPosition=function(e,i,r,s,c,d,m){var f=this._titles[e].style;f.top=s+"px",f.left=r+"px",f.height=this.widgetOffset+"px",i?f.width=c+"px":f.width=d+"px",n.prototype.updateItemPosition.call(this,e,i,r,s,c,d,m)},t}(Re);(function(n){function t(e,i,r){r===void 0&&(r=!0);var s=e.createSectionTitle(i);return s.style.position="absolute",s.setAttribute("aria-label",i.label+" Section"),s.setAttribute("aria-expanded",r?"true":"false"),s.setAttribute("aria-controls",i.owner.id),r&&s.classList.add("lm-mod-expanded"),s}n.createTitle=t})(dt||(dt={}));Xt=function(n){K(t,n);function t(e){e===void 0&&(e={});var i=n.call(this)||this;return i.addClass("lm-Panel"),i.addClass("p-Panel"),i.layout=Wt.createLayout(e),i}return Object.defineProperty(t.prototype,"widgets",{get:function(){return this.layout.widgets},enumerable:!0,configurable:!0}),t.prototype.addWidget=function(e){this.layout.addWidget(e)},t.prototype.insertWidget=function(e,i){this.layout.insertWidget(e,i)},t}(O);(function(n){function t(e){return e.layout||new pt}n.createLayout=t})(Wt||(Wt={}));Je=function(n){K(t,n);function t(e){e===void 0&&(e={});var i=n.call(this,{layout:jt.createLayout(e)})||this;return i._handleMoved=new H(i),i._pressData=null,i.addClass("lm-SplitPanel"),i.addClass("p-SplitPanel"),i}return t.prototype.dispose=function(){this._releaseMouse(),n.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"orientation",{get:function(){return this.layout.orientation},set:function(e){this.layout.orientation=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"alignment",{get:function(){return this.layout.alignment},set:function(e){this.layout.alignment=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"spacing",{get:function(){return this.layout.spacing},set:function(e){this.layout.spacing=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"renderer",{get:function(){return this.layout.renderer},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"handleMoved",{get:function(){return this._handleMoved},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"handles",{get:function(){return this.layout.handles},enumerable:!0,configurable:!0}),t.prototype.relativeSizes=function(){return this.layout.relativeSizes()},t.prototype.setRelativeSizes=function(e,i){i===void 0&&(i=!0),this.layout.setRelativeSizes(e,i)},t.prototype.handleEvent=function(e){switch(e.type){case"mousedown":this._evtMouseDown(e);break;case"mousemove":this._evtMouseMove(e);break;case"mouseup":this._evtMouseUp(e);break;case"pointerdown":this._evtMouseDown(e);break;case"pointermove":this._evtMouseMove(e);break;case"pointerup":this._evtMouseUp(e);break;case"keydown":this._evtKeyDown(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation();break}},t.prototype.onBeforeAttach=function(e){this.node.addEventListener("mousedown",this),this.node.addEventListener("pointerdown",this)},t.prototype.onAfterDetach=function(e){this.node.removeEventListener("mousedown",this),this.node.removeEventListener("pointerdown",this),this._releaseMouse()},t.prototype.onChildAdded=function(e){e.child.addClass("lm-SplitPanel-child"),e.child.addClass("p-SplitPanel-child"),this._releaseMouse()},t.prototype.onChildRemoved=function(e){e.child.removeClass("lm-SplitPanel-child"),e.child.removeClass("p-SplitPanel-child"),this._releaseMouse()},t.prototype._evtKeyDown=function(e){this._pressData&&(e.preventDefault(),e.stopPropagation()),e.keyCode===27&&this._releaseMouse()},t.prototype._evtMouseDown=function(e){if(e.button===0){var i=this.layout,r=E.findFirstIndex(i.handles,function(y){return y.contains(e.target)});if(r!==-1){e.preventDefault(),e.stopPropagation(),document.addEventListener("mouseup",this,
1!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 s,c=i.handles[r],d=c.getBoundingClientRect();i.orientation==="horizontal"?s=e.clientX-d.left:s=e.clientY-d.top;var m=window.getComputedStyle(c),f=Ce.overrideCursor(m.cursor);this._pressData={index:r,delta:s,override:f}}}},t.prototype._evtMouseMove=function(e){e.preventDefault(),e.stopPropagation();var i,r=this.layout,s=this.node.getBoundingClientRect();r.orientation==="horizontal"?i=e.clientX-s.left-this._pressData.delta:i=e.clientY-s.top-this._pressData.delta,r.moveHandle(this._pressData.index,i)},t.prototype._evtMouseUp=function(e){e.button===0&&(e.preventDefault(),e.stopPropagation(),this._releaseMouse())},t.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))},t}(Xt);(function(n){var t=function(){function r(){}return r.prototype.createHandle=function(){var s=document.createElement("div");return s.className="lm-SplitPanel-handle",s.classList.add("p-SplitPanel-handle"),s},r}();n.Renderer=t,n.defaultRenderer=new t;function e(r){return Re.getStretch(r)}n.getStretch=e;function i(r,s){Re.setStretch(r,s)}n.setStretch=i})(Je||(Je={}));(function(n){function t(e){return e.layout||new Re({renderer:e.renderer||Je.defaultRenderer,orientation:e.orientation,alignment:e.alignment,spacing:e.spacing})}n.createLayout=t})(jt||(jt={}));qt=function(n){K(t,n);function t(e){e===void 0&&(e={});var i=n.call(this,Z(Z({},e),{layout:Kt.createLayout(e)}))||this;return i._widgetSizesCache=new WeakMap,i.addClass("lm-AccordionPanel"),i}return Object.defineProperty(t.prototype,"renderer",{get:function(){return this.layout.renderer},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"titleSpace",{get:function(){return this.layout.titleSpace},set:function(e){this.layout.titleSpace=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"titles",{get:function(){return this.layout.titles},enumerable:!0,configurable:!0}),t.prototype.addWidget=function(e){n.prototype.addWidget.call(this,e),e.title.changed.connect(this._onTitleChanged,this)},t.prototype.collapse=function(e){var i=this.layout.widgets[e];i&&!i.isHidden&&this._toggleExpansion(e)},t.prototype.expand=function(e){var i=this.layout.widgets[e];i&&i.isHidden&&this._toggleExpansion(e)},t.prototype.insertWidget=function(e,i){n.prototype.insertWidget.call(this,e,i),i.title.changed.connect(this._onTitleChanged,this)},t.prototype.handleEvent=function(e){switch(n.prototype.handleEvent.call(this,e),e.type){case"click":this._evtClick(e);break;case"keydown":this._eventKeyDown(e);break}},t.prototype.onBeforeAttach=function(e){this.node.addEventListener("click",this),this.node.addEventListener("keydown",this),n.prototype.onBeforeAttach.call(this,e)},t.prototype.onAfterDetach=function(e){n.prototype.onAfterDetach.call(this,e),this.node.removeEventListener("click",this),this.node.removeEventListener("keydown",this)}
1,t.prototype._onTitleChanged=function(e){var i=E.findFirstIndex(this.widgets,function(r){return r.contains(e.owner)});i>=0&&(this.layout.updateTitle(i,e.owner),this.update())},t.prototype._computeWidgetSize=function(e){var i=this.layout,r=i.widgets[e];if(r){var s=r.isHidden,c=i.absoluteSizes(),d=(s?-1:1)*this.spacing,m=c.reduce(function(_,p){return _+p}),f=Un(c);if(s){var g=this._widgetSizesCache.get(r);if(!g)return;f[e]+=g;var x=f.map(function(p){return p-g>0}).lastIndexOf(!0);x===-1?f.forEach(function(p,b){b!==e&&(f[b]-=c[b]/m*(g-d))}):f[x]-=g-d}else{var y=c[e];this._widgetSizesCache.set(r,y),f[e]=0;var x=f.map(function(_){return _>0}).lastIndexOf(!0);if(x===-1)return;f[x]=c[x]+y+d}return f.map(function(_){return _/(m+d)})}},t.prototype._evtClick=function(e){var i=e.target;if(i){var r=E.findFirstIndex(this.titles,function(s){return s.contains(i)});r>=0&&(e.preventDefault(),e.stopPropagation(),this._toggleExpansion(r))}},t.prototype._eventKeyDown=function(e){if(!e.defaultPrevented){var i=e.target,r=!1;if(i){var s=E.findFirstIndex(this.titles,function(y){return y.contains(i)});if(s>=0){var c=e.keyCode.toString();if(e.key.match(/Space|Enter/)||c.match(/13|32/))i.click(),r=!0;else if(this.orientation==="horizontal"?e.key.match(/ArrowLeft|ArrowRight/)||c.match(/37|39/):e.key.match(/ArrowUp|ArrowDown/)||c.match(/38|40/)){var d=e.key.match(/ArrowLeft|ArrowUp/)||c.match(/37|38/)?-1:1,m=this.titles.length,f=(s+m+d)%m;this.titles[f].focus(),r=!0}else e.key==="End"||c==="35"?(this.titles[this.titles.length-1].focus(),r=!0):(e.key==="Home"||c==="36")&&(this.titles[0].focus(),r=!0)}r&&e.preventDefault()}}},t.prototype._toggleExpansion=function(e){var i=this.titles[e],r=this.layout.widgets[e],s=this._computeWidgetSize(e);s&&this.setRelativeSizes(s,!1),r.isHidden?(i.classList.add("lm-mod-expanded"),i.setAttribute("aria-expanded","true"),r.show()):(i.classList.remove("lm-mod-expanded"),i.setAttribute("aria-expanded","false"),r.hide())},t}(Je);(function(n){var t=function(e){K(i,e);function i(){var r=e.call(this)||this;return r.titleClassName="lm-AccordionPanel-title",r._titleID=0,r._titleKeys=new WeakMap,r._uuid=++i._nInstance,r}return i.prototype.createCollapseIcon=function(r){return document.createElement("span")},i.prototype.createSectionTitle=function(r){var s=document.createElement("h3");s.setAttribute("role","button"),s.setAttribute("tabindex","0"),s.id=this.createTitleKey(r),s.className=this.titleClassName;for(var c in r.dataset)s.dataset[c]=r.dataset[c];var d=s.appendChild(this.createCollapseIcon(r));d.className="lm-AccordionPanel-titleCollapser";var m=s.appendChild(document.createElement("span"));return m.className="lm-AccordionPanel-titleLabel",m.textContent=r.label,m.title=r.caption||r.label,s},i.prototype.createTitleKey=function(r){var s=this._titleKeys.get(r);return s===void 0&&(s="title-key-"+this._uuid+"-"+this._titleID++,this._titleKeys.set(r,s)),s},i._nInstance=0,i}(Je.Renderer);n.Renderer=t,n.defaultRenderer=new t})(qt||(qt={}));(function(n){function t(e){return e.layout||new Yn({renderer:e.renderer||qt.defaultRenderer,orientation:e.orientation,alignment:e.alignment,spacing:e.spacing,titleSpace:e.titleSpace})}n.createLayout=t})(Kt||(Kt={}));ve=function(n){K(t,n);function t(e){e===void 0&&(e={});var i=n.call(this)||this;return i._fixed=0,i._spacing=4,i._dirty=!1,i._sizers=[],i._items=[],i._box=null,i._alignment="start",i._direction="top-to-bottom",e.direction!==void 0&&(i._direction=e.direction),e.alignment!==void 0&&(i._alignment=e.alignment),e.spacing!==void 0&&(i._spacing=Qe.clampDimension(e.spacing)),i}return t.prototype.dispose=function(){R(this._items,function(e){e.dispose()}),this._box=null,this._items.length=0,this._sizers.length=0,n.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"direction",{get:function(){return this._direction},set:function(e){this._direction!==e&&(this._direction=e,this.parent&&(this.parent.dataset.direction=e,this.parent.fit()))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"alignment",{get:function(){return this._alignment},set:function(e){this._alignment!==e&&(this._alignment=e,this.parent&&(this.parent.dataset.alignment=e,this.parent.update(
1)))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"spacing",{get:function(){return this._spacing},set:function(e){e=Qe.clampDimension(e),this._spacing!==e&&(this._spacing=e,this.parent&&this.parent.fit())},enumerable:!0,configurable:!0}),t.prototype.init=function(){this.parent.dataset.direction=this.direction,this.parent.dataset.alignment=this.alignment,n.prototype.init.call(this)},t.prototype.attachWidget=function(e,i){E.insert(this._items,e,new et(i)),E.insert(this._sizers,e,new Le),this.parent.isAttached&&T.sendMessage(i,O.Msg.BeforeAttach),this.parent.node.appendChild(i.node),this.parent.isAttached&&T.sendMessage(i,O.Msg.AfterAttach),this.parent.fit()},t.prototype.moveWidget=function(e,i,r){E.move(this._items,e,i),E.move(this._sizers,e,i),this.parent.update()},t.prototype.detachWidget=function(e,i){var r=E.removeAt(this._items,e);E.removeAt(this._sizers,e),this.parent.isAttached&&T.sendMessage(i,O.Msg.BeforeDetach),this.parent.node.removeChild(i.node),this.parent.isAttached&&T.sendMessage(i,O.Msg.AfterDetach),r.dispose(),this.parent.fit()},t.prototype.onBeforeShow=function(e){n.prototype.onBeforeShow.call(this,e),this.parent.update()},t.prototype.onBeforeAttach=function(e){n.prototype.onBeforeAttach.call(this,e),this.parent.fit()},t.prototype.onChildShown=function(e){this.parent.fit()},t.prototype.onChildHidden=function(e){this.parent.fit()},t.prototype.onResize=function(e){this.parent.isVisible&&this._update(e.width,e.height)},t.prototype.onUpdateRequest=function(e){this.parent.isVisible&&this._update(-1,-1)},t.prototype.onFitRequest=function(e){this.parent.isAttached&&this._fit()},t.prototype._fit=function(){for(var e=0,i=0,r=this._items.length;i<r;++i)e+=+!this._items[i].isHidden;this._fixed=this._spacing*Math.max(0,e-1);for(var s=Be.isHorizontal(this._direction),c=s?this._fixed:0,d=s?0:this._fixed,i=0,r=this._items.length;i<r;++i){var m=this._items[i],f=this._sizers[i];if(m.isHidden){f.minSize=0,f.maxSize=0;continue}m.fit(),f.sizeHint=t.getSizeBasis(m.widget),f.stretch=t.getStretch(m.widget),s?(f.minSize=m.minWidth,f.maxSize=m.maxWidth,c+=m.minWidth,d=Math.max(d,m.minHeight)):(f.minSize=m.minHeight,f.maxSize=m.maxHeight,d+=m.minHeight,c=Math.max(c,m.minWidth))}var y=this._box=W.boxSizing(this.parent.node);c+=y.horizontalSum,d+=y.verticalSum;var x=this.parent.node.style;x.minWidth=c+"px",x.minHeight=d+"px",this._dirty=!0,this.parent.parent&&T.sendMessage(this.parent.parent,O.Msg.FitRequest),this._dirty&&T.sendMessage(this.parent,O.Msg.UpdateRequest)},t.prototype._update=function(e,i){this._dirty=!1;for(var r=0,s=0,c=this._items.length;s<c;++s)r+=+!this._items[s].isHidden;if(r!==0){e<0&&(e=this.parent.node.offsetWidth),i<0&&(i=this.parent.node.offsetHeight),this._box||(this._box=W.boxSizing(this.parent.node));var d=this._box.paddingTop,m=this._box.paddingLeft,f=e-this._box.horizontalSum,y=i-this._box.verticalSum,x;switch(this._direction){case"left-to-right":x=de.calc(this._sizers,Math.max(0,f-this._fixed));break;case"top-to-bottom":x=de.calc(this._sizers,Math.max(0,y-this._fixed));break;case"right-to-left":x=de.calc(this._sizers,Math.max(0,f-this._fixed)),m+=f;break;case"bottom-to-top":x=de.calc(this._sizers,Math.max(0,y-this._fixed)),d+=y;break;default:throw"unreachable"}var g=0,_=0;if(x>0)switch(this._alignment){case"start":break;case"center":g=0,_=x/2;break;case"end":g=0,_=x;break;case"justify":g=x/r,_=0;break;default:throw"unreachable"}for(var s=0,c=this._items.length;s<c;++s){var p=this._items[s];if(!p.isHidden){var b=this._sizers[s].size;switch(this._direction){case"left-to-right":p.update(m+_,d,b+g,y),m+=b+g+this._spacing;break;case"top-to-bottom":p.update(m,d+_,f,b+g),d+=b+g+this._spacing;break;case"right-to-left":p.update(m-_-b-g,d,b+g,y),m-=b+g+this._spacing;break;case"bottom-to-top":p.update(m,d-_-b-g,f,b+g),d-=b+g+this._spacing;break;default:throw"unreachable"}}}}},t}(pt);(function(n){function t(s){return Be.stretchProperty.get(s)}n.getStretch=t;function e(s,c){Be.stretchProperty.set(s,c)}n.setStretch=e;function i(s){return Be.sizeBasisProperty.get(s)}n.getSizeBasis=i;function r(s,c){Be.sizeBasisProperty.set(s,c)}n.setSizeBasis=r})(ve||(ve={}));(function(n){n.stretchProperty=new ie({name:"stretch",create:function(){return 0},coerce:function(r,s){return Math.max(0,Math.floor(s))},changed:i}),n.sizeBasisProperty=new ie({name:"sizeBasis",create:function(){return 0},coerce:function(r,s){return Math.max(0,Math.floor(s))},changed:i});function t(r){return r==="left-to-right"||r==="right-to-left"}n.isHorizontal=t;function e(r){return Math.max(0,Math.floor(r))}n.clampSpacing=e;function i(r){r.parent&&r.parent.layout instanceof ve&&r.parent.fit()}})(Be||(Be={}));Sn=function(n){K(t,n);function t(e){e===void 0&&(e={});var i=n.call(this,{layout:Vt.createLayout(e)})||this;return i.addClass("lm-BoxPanel"),i.addClass("p-BoxPanel"),i}return Object.defineProperty(t.prototype,"direction",{get:function(){return this.layout.direction},set:function(e){this.layout.direction=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"alignment",{get:function(){return this.layout.alignment},set:function(e){this.layout.alignment=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"spacing",{get:function(){return this.layout.spacing},set:function(e){this.layout.spacing=e},enumerable:!0,configurable:!0}),t.prototype.onChildAdded=function(e){e.child.addClass("lm-BoxPanel-child"),e.child.addClass("p-BoxPanel-child")},t.prototype.onChildRemoved=function(e){e.child.removeClass("lm-BoxPanel-child"),e.child.removeClass("p-BoxPanel-child")},t}(Xt);(function(n){function t(s){return ve.getStretch(s)}n.getStretch=t;function e(s,c){ve.setStretch(s,c)}n.setStretch=e;function i(s){return ve.getSizeBasis(s)}n.getSizeBasis=i;function r(s,c){ve.setSizeBasis(s,c)}n.setSizeBasis=r})(Sn||(Sn={}));(function(n){function t(e){return e.layout||new ve(e)}n.createLayout=t})(Vt||(Vt={}));Ln=function(n){K(t,n);function t(e){var i=n.call(this,{node:be.createNode()})||this;return i._activeIndex=-1,i._items=[],i._results=null,i.addClass("lm-CommandPalette"),i.addClass("p-CommandPalette"),i.setFlag(O.Flag.DisallowLayout),i.commands=e.commands,i.renderer=e.renderer||t.defaultRenderer,i.commands.commandChanged.connect(i._onGenericChange,i),i.commands.keyBindingChanged.connect(i._onGenericChange,i),i}return t.prototype.dispose=function(){this._items.length=0,this._results=null,n.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"searchNode",{get:function(){return this.node.getElementsByClassName("lm-CommandPalette-search")[0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"inputNode",{get:function(){return this.node.getElementsByClassName("lm-CommandPalette-input")[0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"contentNode",{get:function(){return this.node.getElementsByClassName("lm-CommandPalette-content")[0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"items",{get:function(){return this._items},enumerable:!0,configurable:!0}),t.prototype.addItem=function(e){var i=be.createItem(this.commands,e);return this._items.push(i),this.refresh(),i},t.prototype.addItems=function(e){var i=this,r=e.map(function(s){return be.createItem(i.commands,s)});return r.forEach(function(s){return i._items.push(s)}),this.refresh(),r},t.prototype.removeItem=function(e){this.removeItemAt(this._items.indexOf(e))},t.prototype.removeItemAt=function(e){var i=E.removeAt(this._items,e);i&&this.refresh()},t.prototype.clearItems=function(){this._items.length!==0&&(this._items.length=0,this.refresh())},t.prototype.refresh=function(){if(this._results=null,this.inputNode.value!==""){var e=this.node.getElementsByClassName("lm-close-icon")[0];e.style.display="inherit"}else{var e=this.node.getElementsByClassName("lm-close-icon")[0];e.style.display="none"}this.update()},t.prototype.handleEvent=function(e){switch(e.type){case"click":this._evtClick(e);break;case"keydown":this._evtKeyDown(e);break;case"input":this.refresh();break;case"focus":case"blur":this._toggleFocused();break}},t.prototype.onBeforeAttach=function(e){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)},t.prototype.onAfterDetach=function(e){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)},t.prototype.onActivateRequest=function(e){if(this.isAttached){var i=this.inputNode;i.focus(),i.select()}},t.prototype.onUpdateRequest=function(e){var i=this.inputNode.value,r=this.contentNode,s=this._results;if(s||(s=this._results=be.search(this._items,i),this._activeIndex=i?E.findFirstIndex(s,be.canActivate):-1),!i&&s.length===0){ye.render(null,r);return}if(i&&s.length===0){var c=this.renderer.renderEmptyMessage({query:i});ye.render(c,r);return}for(var d=this.renderer,m=this._activeIndex,f=new Array(s.length),y=0,x=s.length;y<x;++y){var g=s[y];if(g.type==="header"){var _=g.indices,p=g.category;f[y]=d.renderHeader({category:p,indices:_})}else{var b=g.item,_=g.indices,M=y===m;f[y]=d.renderItem({item:b,indices:_,active:M})}}if(ye.render(f,r),m<0||m>=s.length)r.scrollTop=0;else{var L=r.children[m];W.scrollIntoViewIfNeeded(r,L)}},t.prototype._evtClick=function(e){if(e.button===0){if(e.target.classList.contains("lm-close-icon")){this.inputNode.value="",this.refresh();return}var i=E.findFirstIndex(this.contentNode.children,function(r){return r.contains(e.target)});i!==-1&&(e.preventDefault(),e.stopPropagation(),this._execute(i))}},t.prototype._evtKeyDown=function(e){if(!(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey))switch(e.keyCode){case 13:e.preventDefault(),e.stopPropagation(),this._execute(this._activeIndex);break;case 38:e.preventDefault(),e.stopPropagation(),this._activatePreviousItem();break;case 40:e.preventDefault(),e.stopPropagation(),this._activateNextItem();break}},t.prototype._activateNextItem=function(){if(!(!this._results||this._results.length===0)){var e=this._activeIndex,i=this._results.length,r=e<i-1?e+1:0,s=r===0?i-1:r-1;this._activeIndex=E.findFirstIndex(this._results,be.canActivate,r,s),this.update()}},t.prototype._activatePreviousItem=function(){if(!(!this._results||this._results.length===0)){var e=this._activeIndex,i=this._results.length,r=e<=0?i-1:e-1,s=r===i-1?0:r+1;this._activeIndex=E.findLastIndex(this._results,be.canActivate,r,s),this.update()}},t.prototype._execute=function(e){if(this._results){var i=this._results[e];if(i){if(i.type==="header"){var r=this.inputNode;
1r.value=i.category.toLowerCase()+" ",r.focus(),this.refresh();return}i.item.isEnabled&&(this.commands.execute(i.item.command,i.item.args),this.inputNode.value="",this.refresh())}}},t.prototype._toggleFocused=function(){var e=document.activeElement===this.inputNode;this.toggleClass("lm-mod-focused",e),this.toggleClass("p-mod-focused",e)},t.prototype._onGenericChange=function(){this.refresh()},t}(O);(function(n){var t=function(){function e(){}return e.prototype.renderHeader=function(i){var r=this.formatHeader(i);return F.li({className:"lm-CommandPalette-header p-CommandPalette-header"},r)},e.prototype.renderItem=function(i){var r=this.createItemClass(i),s=this.createItemDataset(i);return i.item.isToggleable?F.li({className:r,dataset:s,role:"checkbox","aria-checked":""+i.item.isToggled},this.renderItemIcon(i),this.renderItemContent(i),this.renderItemShortcut(i)):F.li({className:r,dataset:s},this.renderItemIcon(i),this.renderItemContent(i),this.renderItemShortcut(i))},e.prototype.renderEmptyMessage=function(i){var r=this.formatEmptyMessage(i);return F.li({className:"lm-CommandPalette-emptyMessage p-CommandPalette-emptyMessage"},r)},e.prototype.renderItemIcon=function(i){var r=this.createIconClass(i);return typeof i.item.icon=="string"?F.div({className:r},i.item.iconLabel):F.div({className:r},i.item.icon,i.item.iconLabel)},e.prototype.renderItemContent=function(i){return F.div({className:"lm-CommandPalette-itemContent p-CommandPalette-itemContent"},this.renderItemLabel(i),this.renderItemCaption(i))},e.prototype.renderItemLabel=function(i){var r=this.formatItemLabel(i);return F.div({className:"lm-CommandPalette-itemLabel p-CommandPalette-itemLabel"},r)},e.prototype.renderItemCaption=function(i){var r=this.formatItemCaption(i);return F.div({className:"lm-CommandPalette-itemCaption p-CommandPalette-itemCaption"},r)},e.prototype.renderItemShortcut=function(i){var r=this.formatItemShortcut(i);return F.div({className:"lm-CommandPalette-itemShortcut p-CommandPalette-itemShortcut"},r)},e.prototype.createItemClass=function(i){var r="lm-CommandPalette-item";r+=" p-CommandPalette-item",i.item.isEnabled||(r+=" lm-mod-disabled",r+=" p-mod-disabled"),i.item.isToggled&&(r+=" lm-mod-toggled",r+=" p-mod-toggled"),i.active&&(r+=" lm-mod-active",r+=" p-mod-active");var s=i.item.className;return s&&(r+=" "+s),r},e.prototype.createItemDataset=function(i){return Z(Z({},i.item.dataset),{command:i.item.command})},e.prototype.createIconClass=function(i){var r="lm-CommandPalette-itemIcon";r+=" p-CommandPalette-itemIcon";var s=i.item.iconClass;return s?r+" "+s:r},e.prototype.formatHeader=function(i){return!i.indices||i.indices.length===0?i.category:He.highlight(i.category,i.indices,F.mark)},e.prototype.formatEmptyMessage=function(i){return"No commands found that match '"+i.query+"'"},e.prototype.formatItemShortcut=function(i){var r=i.item.keyBinding;return r?Ke.formatKeystroke(r.keys):null},e.prototype.formatItemLabel=function(i){return!i.indices||i.indices.length===0?i.item.label:He.highlight(i.item.label,i.indices,F.mark)},e.prototype.formatItemCaption=function(i){return i.item.caption},e}();n.Renderer=t,n.defaultRenderer=new t})(Ln||(Ln={}));(function(n){function t(){var g=document.createElement("div"),_=document.createElement("div"),p=document.createElement("div"),b=document.createElement("input"),M=document.createElement("ul"),L=document.createElement("button");return _.className="lm-CommandPalette-search",p.className="lm-CommandPalette-wrapper",b.className="lm-CommandPalette-input",L.className="lm-close-icon",M.className="lm-CommandPalette-content",_.classList.add("p-CommandPalette-search"),p.classList.add("p-CommandPalette-wrapper"),b.classList.add("p-CommandPalette-input"),M.classList.add("p-CommandPalette-content"),b.spellcheck=!1,p.appendChild(b),p.appendChild(L),_.appendChild(p),g.appendChild(_),g.appendChild(M),g}n.createNode=t;function e(g,_){return new x(g,_)}n.createItem=e;function i(g,_){var p=d(g,_);return p.sort(f),y(p)}n.search=i;function r(g){return g.type==="item"&&g.item.isEnabled}n.canActivate=r;function s(g){return g.trim().replace(/\s+/g," ")}function c(g){return g.replace(/\s+/g,"").toLowerCase()}function d(g,_){_=c(_);for(var p=[],b=0,M=g.length;b<M;++b){var L=g[b];if(L.isVisible){if(!_){p.push({matchType:3,categoryIndices:null,labelIndices:null,
1score:0,item:L});continue}var S=m(L,_);S&&(L.isEnabled||(S.score+=1e3),p.push(S))}}return p}function m(g,_){for(var p=g.category.toLowerCase(),b=g.label.toLowerCase(),M=p+" "+b,L=1/0,S=null,C=/\b\w/g;;){var k=C.exec(M);if(!k)break;var D=He.matchSumOfDeltas(M,_,k.index);if(!D)break;D&&D.score<=L&&(L=D.score,S=D.indices)}if(!S||L===1/0)return null;for(var A=p.length+1,l=E.lowerBound(S,A,function(w,h){return w-h}),v=S.slice(0,l),a=S.slice(l),o=0,u=a.length;o<u;++o)a[o]-=A;return v.length===0?{matchType:0,categoryIndices:null,labelIndices:a,score:L,item:g}:a.length===0?{matchType:1,categoryIndices:v,labelIndices:null,score:L,item:g}:{matchType:2,categoryIndices:v,labelIndices:a,score:L,item:g}}function f(g,_){var p=g.matchType-_.matchType;if(p!==0)return p;var b=g.score-_.score;if(b!==0)return b;var M=0,L=0;switch(g.matchType){case 0:M=g.labelIndices[0],L=_.labelIndices[0];break;case 1:case 2:M=g.categoryIndices[0],L=_.categoryIndices[0];break}if(M!==L)return M-L;var S=g.item.category.localeCompare(_.item.category);if(S!==0)return S;var C=g.item.rank,k=_.item.rank;return C!==k?C<k?-1:1:g.item.label.localeCompare(_.item.label)}function y(g){var _=new Array(g.length);E.fill(_,!1);for(var p=[],b=0,M=g.length;b<M;++b)if(!_[b]){var L=g[b],S=L.item,C=L.categoryIndices,k=S.category;p.push({type:"header",category:k,indices:C});for(var D=b;D<M;++D)if(!_[D]){var A=g[D],l=A.item,v=A.labelIndices;l.category===k&&(p.push({type:"item",item:l,indices:v}),_[D]=!0)}}return p}var x=function(){function g(_,p){this._commands=_,this.category=s(p.category),this.command=p.command,this.args=p.args||Pe.JSONExt.emptyObject,this.rank=p.rank!==void 0?p.rank:1/0}return Object.defineProperty(g.prototype,"label",{get:function(){return this._commands.label(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(g.prototype,"icon",{get:function(){return this._commands.icon(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(g.prototype,"iconClass",{get:function(){return this._commands.iconClass(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(g.prototype,"iconLabel",{get:function(){return this._commands.iconLabel(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(g.prototype,"caption",{get:function(){return this._commands.caption(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(g.prototype,"className",{get:function(){return this._commands.className(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(g.prototype,"dataset",{get:function(){return this._commands.dataset(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(g.prototype,"isEnabled",{get:function(){return this._commands.isEnabled(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(g.prototype,"isToggled",{get:function(){return this._commands.isToggled(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(g.prototype,"isToggleable",{get:function(){return this._commands.isToggleable(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(g.prototype,"isVisible",{get:function(){return this._commands.isVisible(this.command,this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(g.prototype,"keyBinding",{get:function(){var _=this,p=_.command,b=_.args;return E.findLastValue(this._commands.keyBindings,function(M){return M.command===p&&Pe.JSONExt.deepEqual(M.args,b)})||null},enumerable:!0,configurable:!0}),g}()})(be||(be={}));Ye=function(n){K(t,n);function t(e){var i=n.call(this,{node:oe.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 H(i),i._menuRequested=new H(i),i.addClass("lm-Menu"),i.addClass("p-Menu"),i.setFlag(O.Flag.DisallowLayout),i.commands=e.commands,i.renderer=e.renderer||t.defaultRenderer,i}return t.prototype.dispose=function(){this.close(),this._items.length=0,n.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"aboutToClose",{get:function(){return this._aboutToClose},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"menuRequested",{get:function(){return this._menuRequested},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentMenu",{get:function(){return this._parentMenu},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"childMenu",{get:function(){return this._childMenu},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rootMenu",{get:function(){for(var e=this;e._parentMenu;)e=e._parentMenu;return e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"leafMenu",{get:function(){for(var e=this;e._childMenu;)e=e._childMenu;return e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"contentNode",{get:function(){return this.node.getElementsByClassName("lm-Menu-content")[0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"activeItem",{get:function(){return this._items[this._activeIndex]||null},set:function(e){this.activeIndex=e?this._items.indexOf(e):-1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"activeIndex",{get:function(){return this._activeIndex},set:function(e){(e<0||e>=this._items.length)&&(e=-1),e!==-1&&!oe.canActivate(this._items[e])&&(e=-1),this._activeIndex!==e&&(this._activeIndex=e,this._activeIndex>=0&&this.contentNode.childNodes[this._activeIndex]&&this.contentNode.childNodes[this._activeIndex].focus(),this.update())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"items",{get:function(){return this._items},enumerable:!0,configurable:!0}),t.prototype.activateNextItem=function(){var e=this._items.length,i=this._activeIndex,r=i<e-1?i+1:0,s=r===0?e-1:r-1;this.activeIndex=E.findFirstIndex(this._items,oe.canActivate,r,s)},t.prototype.activatePreviousItem=function(){var e=this._items.length,i=this._activeIndex,r=i<=0?e-1:i-1,s=r===e-1?0:r+1;this.activeIndex=E.findLastIndex(this._items,oe.canActivate,r,s)},t.prototype.triggerActiveItem=function(){if(this.isAttached){var e=this.activeItem;if(e){if(this._cancelOpenTimer(),this._cancelCloseTimer(),e.type==="submenu"){this._openChildMenu(!0);return}this.rootMenu.close();var i=e.command,r=e.args;this.commands.isEnabled(i,r)?this.commands.execute(i,r):console.log("Command '"+i+"' is disabled.")}}},t.prototype.addItem=function(e){return this.insertItem(this._items.length,e)},t.prototype.insertItem=function(e,i){this.isAttached&&this.close(),this.activeIndex=-1;var r=Math.max(0,Math.min(e,this._items.length)),s=oe.createItem(this,i);return E.insert(this._items,r,s),this.update(),s},t.prototype.removeItem=function(e){this.removeItemAt(this._items.indexOf(e))},t.prototype.removeItemAt=function(e){this.isAttached&&this.close(),this.activeIndex=-1;var i=E.removeAt(this._items,e);i&&this.update()},t.prototype.clearItems=function(){this.isAttached&&this.close(),this.activeIndex=-1,this._items.length!==0&&(this._items.length=0,this.update())},t.prototype.open=function(e,i,r){if(r===void 0&&(r={}),!this.isAttached){var s=r.forceX||!1,c=r.forceY||!1;oe.openRootMenu(this,e,i,s,c),this.activate()}},t.prototype.handleEvent=function(e){switch(e.type){case"keydown":this._evtKeyDown(e);break;case"mouseup":this._evtMouseUp(e);break;case"mousemove":this._evtMouseMove(e);break;case"mouseenter":this._evtMouseEnter(e);break;case"mouseleave":this._evtMouseLeave(e);break;case"mousedown":this._evtMouseDown(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation();break}},t.prototype.onBeforeAttach=function(e){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,
1!0)},t.prototype.onAfterDetach=function(e){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)},t.prototype.onActivateRequest=function(e){this.isAttached&&this.node.focus()},t.prototype.onUpdateRequest=function(e){for(var i=this,r=this._items,s=this.renderer,c=this._activeIndex,d=oe.computeCollapsed(r),m=new Array(r.length),f=function(g,_){var p=r[g],b=g===c,M=d[g];m[g]=s.renderItem({item:p,active:b,collapsed:M,onfocus:function(){i.activeIndex=g}})},y=0,x=r.length;y<x;++y)f(y);ye.render(m,this.contentNode)},t.prototype.onCloseRequest=function(e){this._cancelOpenTimer(),this._cancelCloseTimer(),this.activeIndex=-1;var i=this._childMenu;i&&(this._childIndex=-1,this._childMenu=null,i._parentMenu=null,i.close());var r=this._parentMenu;r&&(this._parentMenu=null,r._childIndex=-1,r._childMenu=null,r.activate()),this.isAttached&&this._aboutToClose.emit(void 0),n.prototype.onCloseRequest.call(this,e)},t.prototype._evtKeyDown=function(e){e.preventDefault(),e.stopPropagation();var i=e.keyCode;if(i===13){this.triggerActiveItem();return}if(i===27){this.close();return}if(i===37){this._parentMenu?this.close():this._menuRequested.emit("previous");return}if(i===38){this.activatePreviousItem();return}if(i===39){var r=this.activeItem;r&&r.type==="submenu"?this.triggerActiveItem():this.rootMenu._menuRequested.emit("next");return}if(i===40){this.activateNextItem();return}var s=qe().keyForKeydownEvent(e);if(s){var c=this._activeIndex+1,d=oe.findMnemonic(this._items,s,c);d.index!==-1&&!d.multiple?(this.activeIndex=d.index,this.triggerActiveItem()):d.index!==-1?this.activeIndex=d.index:d.auto!==-1&&(this.activeIndex=d.auto)}},t.prototype._evtMouseUp=function(e){e.button===0&&(e.preventDefault(),e.stopPropagation(),this.triggerActiveItem())},t.prototype._evtMouseMove=function(e){var i=E.findFirstIndex(this.contentNode.children,function(s){return W.hitTest(s,e.clientX,e.clientY)});if(i!==this._activeIndex){if(this.activeIndex=i,i=this.activeIndex,i===this._childIndex){this._cancelOpenTimer(),this._cancelCloseTimer();return}this._childIndex!==-1&&this._startCloseTimer(),this._cancelOpenTimer();var r=this.activeItem;!r||r.type!=="submenu"||!r.submenu||this._startOpenTimer()}},t.prototype._evtMouseEnter=function(e){for(var i=this._parentMenu;i;i=i._parentMenu)i._cancelOpenTimer(),i._cancelCloseTimer(),i.activeIndex=i._childIndex},t.prototype._evtMouseLeave=function(e){if(this._cancelOpenTimer(),!this._childMenu){this.activeIndex=-1;return}var i=e.clientX,r=e.clientY;if(W.hitTest(this._childMenu.node,i,r)){this._cancelCloseTimer();return}this.activeIndex=-1,this._startCloseTimer()},t.prototype._evtMouseDown=function(e){this._parentMenu||(oe.hitTestMenus(this,e.clientX,e.clientY)?(e.preventDefault(),e.stopPropagation()):this.close())},t.prototype._openChildMenu=function(e){e===void 0&&(e=!1);var i=this.activeItem;if(!i||i.type!=="submenu"||!i.submenu){this._closeChildMenu();return}var r=i.submenu;if(r!==this._childMenu){t.saveWindowData(),this._closeChildMenu(),this._childMenu=r,this._childIndex=this._activeIndex,r._parentMenu=this,T.sendMessage(this,O.Msg.UpdateRequest);var s=this.contentNode.children[this._activeIndex];oe.openSubmenu(r,s),e&&(r.activeIndex=-1,r.activateNextItem()),r.activate()}},t.prototype._closeChildMenu=function(){this._childMenu&&this._childMenu.close()},t.prototype._startOpenTimer=function(){var e=this;this._openTimerID===0&&(this._openTimerID=window.setTimeout(function(){e._openTimerID=0,e._openChildMenu()},oe.TIMER_DELAY))},t.prototype._startCloseTimer=function(){var e=this;this._closeTimerID===0&&(this._closeTimerID=window.setTimeout(function(){e._closeTimerID=0,e._closeChildMenu()},oe.TIMER_DELAY))},t.prototype._cancelOpenTimer=function(){this._openTimerID!==0&&(clearTimeout(this._openTimerID),this._openTimerID=0)},t.prototype._cancelCloseTimer=function(){this._closeTimerID!==0&&(clearTimeout(this._closeTimerID),this._closeTimerID=0)},t.saveWindowData=function(){oe.saveWindowData()},t}(O);(function(n){var t=function(){function e(){}return e.prototype.renderItem=function(i){var r=this.createItemClass(i),s=this.createItemDataset(i),c=this.createItemARIA(i);return F.li(Z({className:r,dataset:s,tabindex:"0",onfocus:i.onfocus},c),this.renderIcon(i),this.renderLabel(i),this.renderShortcut(i),this.renderSubmenu(i))},e.prototype.renderIcon=function(i){var r=this.createIconClass(i);
1return typeof i.item.icon=="string"?F.div({className:r},i.item.iconLabel):F.div({className:r},i.item.icon,i.item.iconLabel)},e.prototype.renderLabel=function(i){var r=this.formatLabel(i);return F.div({className:"lm-Menu-itemLabel p-Menu-itemLabel"},r)},e.prototype.renderShortcut=function(i){var r=this.formatShortcut(i);return F.div({className:"lm-Menu-itemShortcut p-Menu-itemShortcut"},r)},e.prototype.renderSubmenu=function(i){return F.div({className:"lm-Menu-itemSubmenuIcon p-Menu-itemSubmenuIcon"})},e.prototype.createItemClass=function(i){var r="lm-Menu-item";r+=" p-Menu-item",i.item.isEnabled||(r+=" lm-mod-disabled",r+=" p-mod-disabled"),i.item.isToggled&&(r+=" lm-mod-toggled",r+=" p-mod-toggled"),i.item.isVisible||(r+=" lm-mod-hidden",r+=" p-mod-hidden"),i.active&&(r+=" lm-mod-active",r+=" p-mod-active"),i.collapsed&&(r+=" lm-mod-collapsed",r+=" p-mod-collapsed");var s=i.item.className;return s&&(r+=" "+s),r},e.prototype.createItemDataset=function(i){var r,s=i.item,c=s.type,d=s.command,m=s.dataset;return c==="command"?r=Z(Z({},m),{type:c,command:d}):r=Z(Z({},m),{type:c}),r},e.prototype.createIconClass=function(i){var r="lm-Menu-itemIcon";r+=" p-Menu-itemIcon";var s=i.item.iconClass;return s?r+" "+s:r},e.prototype.createItemARIA=function(i){var r={};switch(i.item.type){case"separator":r.role="presentation";break;case"submenu":r["aria-haspopup"]="true",i.item.isEnabled||(r["aria-disabled"]="true");break;default:i.item.isEnabled||(r["aria-disabled"]="true"),r.role="menuitem"}return r},e.prototype.formatLabel=function(i){var r=i.item,s=r.label,c=r.mnemonic;if(c<0||c>=s.length)return s;var d=s.slice(0,c),m=s.slice(c+1),f=s[c],y=F.span({className:"lm-Menu-itemMnemonic p-Menu-itemMnemonic"},f);return[d,y,m]},e.prototype.formatShortcut=function(i){var r=i.item.keyBinding;return r?Ke.formatKeystroke(r.keys):null},e}();n.Renderer=t,n.defaultRenderer=new t})(Ye||(Ye={}));(function(n){n.TIMER_DELAY=300,n.SUBMENU_OVERLAP=3;var t=null,e=0;function i(){return e>0?(e--,t):y()}function r(){t=y(),e++}n.saveWindowData=r;function s(){var b=document.createElement("div"),M=document.createElement("ul");return M.className="lm-Menu-content",M.classList.add("p-Menu-content"),b.appendChild(M),M.setAttribute("role","menu"),b.tabIndex=0,b}n.createNode=s;function c(b){return b.type!=="separator"&&b.isEnabled&&b.isVisible}n.canActivate=c;function d(b,M){return new p(b.commands,M)}n.createItem=d;function m(b,M,L){for(var S=b;S;S=S.childMenu)if(W.hitTest(S.node,M,L))return!0;return!1}n.hitTestMenus=m;function f(b){var M=new Array(b.length);E.fill(M,!1);for(var L=0,S=b.length;L<S;++L){var C=b[L];if(C.isVisible){if(C.type!=="separator")break;M[L]=!0}}for(var k=S-1;k>=0;--k){var C=b[k];if(C.isVisible){if(C.type!=="separator")break;M[k]=!0}}for(var D=!1;++L<k;){var C=b[L];C.isVisible&&(C.type!=="separator"?D=!1:D?M[L]=!0:D=!0)}return M}n.computeCollapsed=f;function y(){return{pageXOffset:window.pageXOffset,pageYOffset:window.pageYOffset,clientWidth:document.documentElement.clientWidth,clientHeight:document.documentElement.clientHeight}}function x(b,M,L,S,C){var k=i(),D=k.pageXOffset,A=k.pageYOffset,l=k.clientWidth,v=k.clientHeight;T.sendMessage(b,O.Msg.UpdateRequest);var a=v-(C?L:0),o=b.node,u=o.style;u.opacity="0",u.maxHeight=a+"px",O.attach(b,document.body);var w=o.getBoundingClientRect(),h=w.width,I=w.height;!S&&M+h>D+l&&(M=D+l-h),!C&&L+I>A+v&&(L>A+v?L=A+v-I:L=L-I),u.transform="translate("+Math.max(0,M)+"px, "+Math.max(0,L)+"px",u.opacity="1"}n.openRootMenu=x;function g(b,M){var L=i(),S=L.pageXOffset,C=L.pageYOffset,k=L.clientWidth,D=L.clientHeight;T.sendMessage(b,O.Msg.UpdateRequest);var A=D,l=b.node,v=l.style;v.opacity="0",v.maxHeight=A+"px",O.attach(b,document.body);var a=l.getBoundingClientRect(),o=a.width,u=a.height,w=W.boxSizing(b.node),h=M.getBoundingClientRect(),I=h.right-n.SUBMENU_OVERLAP;I+o>S+k&&(I=h.left+n.SUBMENU_OVERLAP-o);var z=h.top-w.borderTop-w.paddingTop;z+u>C+D&&(z=h.bottom+w.borderBottom+w.paddingBottom-u),v.transform="translate("+Math.max(0,I)+"px, "+Math.max(0,z)+"px",v.opacity="1"}n.openSubmenu=g;function _(b,M,L){for(var S=-1,C=-1,k=!1,D=M.toUpperCase(),A=0,l=b.length;A<l;++A){var v=(A+L)%l,a=b[v];if(c(a)){var o=a.label;if(o.length!==0){var u=a.mnemonic;if(u>=0&&u<o.length){o[u].toUpperCase()===D&&(S===-1?S=v:k=!0);continue}C===-1&&o[0].toUpperCase()===D&&(C=v)}}}return{index:S,multiple:k,auto:C}}n.findMnemonic=_;var p=function(){function b(M,L){this._commands=M,this.type=L.type||"command",this.command=L.command||"",this.args=L.args||Pe.JSONExt.emptyObject,this.submenu=L.submenu||null}return Object.defineProperty(b.prototype,"label",{get:function(){return this.type==="command"?this._commands.label(this.command,this.args):this.type==="submenu"&&this.submenu?this.submenu.title.label:""},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"mnemonic",{get:function(){return this.type==="command"?this._commands.mnemonic(this.command,this.args):this.type==="submenu"&&this.submenu?this.submenu.title.mnemonic:-1},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"icon",{get:function(){return this.type==="command"?this._commands.icon(this.command,this.args):this.type==="submenu"&&this.submenu?this.submenu.title.icon:this.iconClass},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"iconClass",{get:function(){return this.type==="command"?this._commands.iconClass(this.command,this.args):this.type==="submenu"&&this.submenu?this.submenu.title.iconClass:""},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"iconLabel",{get:function(){return this.type==="command"?this._commands.iconLabel(this.command,this.args):this.type==="submenu"&&this.submenu?this.submenu.title.iconLabel:""},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"caption",{get:function(){return this.type==="command"?this._commands.caption(this.command,this.args):this.type==="submenu"&&this.submenu?this.submenu.title.caption:""},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"className",{get:function(){return this.type==="command"?this._commands.className(this.command,this.args):this.type==="submenu"&&this.submenu?this.submenu.title.className:""},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"dataset",{get:function(){return this.type==="command"?this._commands.dataset(this.command,this.args):this.type==="submenu"&&this.submenu?this.submenu.title.dataset:{}},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"isEnabled",{get:function(){return this.type==="command"?this._commands.isEnabled(this.command,this.args):this.type==="submenu"?this.submenu!==null:!0},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"isToggled",{get:function(){return this.type==="command"?this._commands.isToggled(this.command,this.args):!1},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"isVisible",{get:function(){return this.type==="command"?this._commands.isVisible(this.command,this.args):this.type==="submenu"?this.submenu!==null:!0},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"keyBinding",{get:function(){if(this.t
1ype==="command"){var M=this,L=M.command,S=M.args;return E.findLastValue(this._commands.keyBindings,function(C){return C.command===L&&Pe.JSONExt.deepEqual(C.args,S)})||null}return null},enumerable:!0,configurable:!0}),b}()})(oe||(oe={}));Vr=function(){function n(t){this._groupByTarget=!0,this._idTick=0,this._items=[],this._sortBySelector=!0;var e=t.groupByTarget,i=t.sortBySelector,r=Vn(t,["groupByTarget","sortBySelector"]);this.menu=new Ye(r),this._groupByTarget=e!==!1,this._sortBySelector=i!==!1}return n.prototype.addItem=function(t){var e=this,i=ht.createItem(t,this._idTick++);return this._items.push(i),new je(function(){E.removeFirstOf(e._items,i)})},n.prototype.open=function(t){var e=this;if(Ye.saveWindowData(),this.menu.clearItems(),this._items.length===0)return!1;var i=ht.matchItems(this._items,t,this._groupByTarget,this._sortBySelector);return!i||i.length===0?!1:(R(i,function(r){e.menu.addItem(r)}),this.menu.open(t.clientX,t.clientY),!0)},n}();(function(n){function t(c,d){var m=i(c.selector),f=c.rank!==void 0?c.rank:1/0;return Z(Z({},c),{selector:m,rank:f,id:d})}n.createItem=t;function e(c,d,m,f){var y=d.target;if(!y)return null;var x=d.currentTarget;if(!x||!x.contains(y)&&(y=document.elementFromPoint(d.clientX,d.clientY),!y||!x.contains(y)))return null;for(var g=[],_=c.slice();y!==null;){for(var p=[],b=0,M=_.length;b<M;++b){var L=_[b];L&&me.matches(y,L.selector)&&(p.push(L),_[b]=null)}if(p.length!==0&&(m&&p.sort(f?s:r),g.push.apply(g,p)),y===x)break;y=y.parentElement}return m||g.sort(f?s:r),g}n.matchItems=e;function i(c){if(c.indexOf(",")!==-1)throw new Error("Selector cannot contain commas: "+c);if(!me.isValid(c))throw new Error("Invalid selector: "+c);return c}function r(c,d){var m=c.rank,f=d.rank;return m!==f?m<f?-1:1:c.id-d.id}function s(c,d){var m=me.calculateSpecificity(c.selector),f=me.calculateSpecificity(d.selector);return m!==f?f-m:r(c,d)}})(ht||(ht={}));Xe=function(n){K(t,n);function t(e){e===void 0&&(e={});var i=n.call(this,{node:he.createNode()})||this;return i._currentIndex=-1,i._titles=[],i._titlesEditable=!1,i._previousTitle=null,i._dragData=null,i._addButtonEnabled=!1,i._tabMoved=new H(i),i._currentChanged=new H(i),i._addRequested=new H(i),i._tabCloseRequested=new H(i),i._tabDetachRequested=new H(i),i._tabActivateRequested=new H(i),i.addClass("lm-TabBar"),i.addClass("p-TabBar"),i.contentNode.setAttribute("role","tablist"),i.setFlag(O.Flag.DisallowLayout),i._document=e.document||document,i.tabsMovable=e.tabsMovable||!1,i.titlesEditable=e.titlesEditable||!1,i.allowDeselect=e.allowDeselect||!1,i.addButtonEnabled=e.addButtonEnabled||!1,i.insertBehavior=e.insertBehavior||"select-tab-if-needed",i.name=e.name||"",i.orientation=e.orientation||"horizontal",i.removeBehavior=e.removeBehavior||"select-tab-after",i.renderer=e.renderer||t.defaultRenderer,i}return t.prototype.dispose=function(){this._releaseMouse(),this._titles.length=0,this._previousTitle=null,n.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"currentChanged",{get:function(){return this._currentChanged},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tabMoved",{get:function(){return this._tabMoved},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tabActivateRequested",{get:function(){return this._tabActivateRequested},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"addRequested",{get:function(){return this._addRequested},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tabCloseRequested",{get:function(){return this._tabCloseRequested},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tabDetachRequested",{get:function(){return this._tabDetachRequested},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"document",{get:function(){return this._document},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"titlesEditable",{get:function(){return this._titlesEditable},set:function(e){this._titlesEditable=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentTitle",{get:function(){return this._titles[this._currentIndex]||null},set:function(e){this.currentIndex=e?this._titles.indexOf(e):-1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentIndex",{get:function(){return this._currentIndex},set:function(e){if((e<0||e>=this._titles.length)&&(e=-1),this._currentIndex!==e){var i=this._currentIndex,r=this._titles[i]||null,s=e,c=this._titles[s]||null;this._currentIndex=s,this._previousTitle=r,this.update(),this._currentChanged.emit({previousIndex:i,previousTitle:r,currentIndex:s,currentTitle:c})}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._name},set:function(e){this._name=e,e?this.contentNode.setAttribute("aria-label",e):this.contentNode.removeAttribute("aria-label")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"orientation",{get:function(){return this._orientation},set:function(e){this._orientation!==e&&(this._releaseMouse(),this._orientation=e,this.dataset.orientation=e,this.contentNode.setAttribute("aria-orientation",e))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"addButtonEnabled",{get:function(){return this._addButtonEnabled},set:function(e){this._addButtonEnabled!==e&&(this._addButtonEnabled=e,e?this.addButtonNode.classList.remove("lm-mod-hidden"):this.addButtonNode.classList.add("lm-mod-hidden"))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"titles",{get:function(){return this._titles},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"contentNode",{get:function(){return this.node.getElementsByClassName("lm-TabBar-content")[0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"addButtonNode",{get:function(){return this.node.getElementsByClassName("lm-TabBar-addButton")[0]},enumerable:!0,configurable:!0}),t.prototype.addTab=function(e){return this.insertTab(this._titles.length,e)},t.prototype.insertTab=function(e,i){this._releaseMouse();var r=he.asTitle(i),s=this._titles.indexOf(r),c=Math.max(0,Math.min(e,this._titles.length));return s===-1?(E.insert(this._titles,c,r),r.changed.connect(this._onTitleChanged,this),this.update(),this._adjustCurrentForInsert(c,r),r):(c===this._titles.length&&c--,s===c||(E.move(this._titles,s,c),this.update(),this._adjustCurrentForMove(s,c)),r)},t.prototype.removeTab=function(e){this.removeTabAt(this._titles.indexOf(e))},t.prototype.removeTabAt=function(e){this._releaseMouse();var i=E.removeAt(this._titles,e);i&&(i.changed.disconnect(this._onTitleChanged,this),i===this._previousTitle&&(this._previousTitle=null),this.update(),this._adjustCurrentForRemove(e,i))},t.prototype.clearTabs=function(){if(this._titles.length!==0){this._releaseMouse();for(var e=0,i=this._titles;e<i.length;e++){var r=i[e];r.changed.disconnect(this._onTitleChanged,this)}var s=this.currentIndex,c=this.currentTitle;this._currentIndex=-1,this._previousTitle=null,this._titles.length=0,this.update(),s!==-1&&this._currentChanged.emit({previousIndex:s,previousTitle:c,currentIndex:-1,
1currentTitle:null})}},t.prototype.releaseMouse=function(){this._releaseMouse()},t.prototype.handleEvent=function(e){switch(e.type){case"mousedown":this._evtMouseDown(e);break;case"mousemove":this._evtMouseMove(e);break;case"mouseup":this._evtMouseUp(e);break;case"pointerdown":this._evtMouseDown(e);break;case"pointermove":this._evtMouseMove(e);break;case"pointerup":this._evtMouseUp(e);break;case"dblclick":this._evtDblClick(e);break;case"keydown":this._evtKeyDown(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation();break}},t.prototype.onBeforeAttach=function(e){this.node.addEventListener("mousedown",this),this.node.addEventListener("pointerdown",this),this.node.addEventListener("dblclick",this)},t.prototype.onAfterDetach=function(e){this.node.removeEventListener("mousedown",this),this.node.removeEventListener("pointerdown",this),this.node.removeEventListener("dblclick",this),this._releaseMouse()},t.prototype.onUpdateRequest=function(e){for(var i=this._titles,r=this.renderer,s=this.currentTitle,c=new Array(i.length),d=0,m=i.length;d<m;++d){var f=i[d],y=f===s,x=y?m:m-d-1;c[d]=r.renderTab({title:f,current:y,zIndex:x})}ye.render(c,this.contentNode)},t.prototype._evtDblClick=function(e){if(this.titlesEditable){var i=this.contentNode.children,r=E.findFirstIndex(i,function(x){return W.hitTest(x,e.clientX,e.clientY)});if(r!==-1){var s=this.titles[r],c=i[r].querySelector(".lm-TabBar-tabLabel");if(c&&c.contains(e.target)){var d=s.label||"",m=c.innerHTML;c.innerHTML="";var f=document.createElement("input");f.classList.add("lm-TabBar-tabInput"),f.value=d,c.appendChild(f);var y=function(){f.removeEventListener("blur",y),c.innerHTML=m};f.addEventListener("dblclick",function(x){return x.stopPropagation()}),f.addEventListener("blur",y),f.addEventListener("keydown",function(x){x.key==="Enter"?(f.value!==""&&(s.label=s.caption=f.value),y()):x.key==="Escape"&&y()}),f.select(),f.focus(),c.children.length>0&&c.children[0].focus()}}}},t.prototype._evtKeyDown=function(e){e.preventDefault(),e.stopPropagation(),e.keyCode===27&&this._releaseMouse()},t.prototype._evtMouseDown=function(e){if(!(e.button!==0&&e.button!==1)&&!this._dragData){var i=this.addButtonEnabled&&this.addButtonNode.contains(e.target),r=this.contentNode.children,s=E.findFirstIndex(r,function(d){return W.hitTest(d,e.clientX,e.clientY)});if(!(s===-1&&!i)&&(e.preventDefault(),e.stopPropagation(),this._dragData={tab:r[s],index:s,pressX:e.clientX,pressY:e.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),!(e.button===1||i))){var c=r[s].querySelector(this.renderer.closeIconSelector);c&&c.contains(e.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===s?this.currentIndex=-1:this.currentIndex=s,this.currentIndex!==-1&&this._tabActivateRequested.emit({index:this.currentIndex,title:this.currentTitle}))}}},t.prototype._evtMouseMove=function(e){var i=this._dragData;if(i){e.preventDefault(),e.stopPropagation();var r=this.contentNode.children;if(!(!i.dragActive&&!he.dragExceeded(i,e))){if(!i.dragActive){var s=i.tab.getBoundingClientRect();this._orientation==="horizontal"?(i.tabPos=i.tab.offsetLeft,i.tabSize=s.width,i.tabPressPos=i.pressX-s.left):(i.tabPos=i.tab.offsetTop,i.tabSize=s.height,i.tabPressPos=i.pressY-s.top),i.tabLayout=he.snapTabLayout(r,this._orientation),i.contentRect=this.contentNode.getBoundingClientRect(),i.override=Ce.overrideCursor("default"),i.tab.classList.add("lm-mod-dragging"),this.addClass("lm-mod-dragging"),i.tab.classList.add("p-mod-dragging"),this.addClass("p-mod-dragging"),i.dragActive=!0}if(!i.detachRequested&&he.detachExceeded(i,e)){i.detachRequested=!0;var c=i.index,d=e.clientX,m=e.clientY,f=r[c],y=this._titles[c];if(this._tabDetachRequested.emit({index:c,title:y,tab:f,clientX:d,clientY:m}),i.dragAborted)return}he.layoutTabs(r,i,e,this._orientation)}}},t.prototype._evtMouseUp=function(e){var i=this;if(!(e.button!==0&&e.button!==1)){var r=this._dragData;if(r){if(e.preventDefault(),e.stopPropagation(),this.document.removeEventListener("mousemove",this,!0),this.document.removeEventListener("mouseup",this,
1!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),!r.dragActive){this._dragData=null;var s=this.addButtonEnabled&&this.addButtonNode.contains(e.target);if(s){this._addRequested.emit(void 0);return}var c=this.contentNode.children,d=E.findFirstIndex(c,function(x){return W.hitTest(x,e.clientX,e.clientY)});if(d!==r.index)return;var m=this._titles[d];if(!m.closable)return;if(e.button===1){this._tabCloseRequested.emit({index:d,title:m});return}var f=c[d].querySelector(this.renderer.closeIconSelector);if(f&&f.contains(e.target)){this._tabCloseRequested.emit({index:d,title:m});return}return}if(e.button===0){he.finalizeTabPosition(r,this._orientation),r.tab.classList.remove("lm-mod-dragging"),r.tab.classList.remove("p-mod-dragging");var y=he.parseTransitionDuration(r.tab);setTimeout(function(){if(!r.dragAborted){i._dragData=null,he.resetTabPositions(i.contentNode.children,i._orientation),r.override.dispose(),i.removeClass("lm-mod-dragging"),i.removeClass("p-mod-dragging");var x=r.index,g=r.targetIndex;g===-1||x===g||(E.move(i._titles,x,g),i._adjustCurrentForMove(x,g),i._tabMoved.emit({fromIndex:x,toIndex:g,title:i._titles[g]}),T.sendMessage(i,O.Msg.UpdateRequest))}},y)}}}},t.prototype._releaseMouse=function(){var e=this._dragData;e&&(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),e.dragAborted=!0,e.dragActive&&(he.resetTabPositions(this.contentNode.children,this._orientation),e.override.dispose(),e.tab.classList.remove("lm-mod-dragging"),this.removeClass("lm-mod-dragging"),e.tab.classList.remove("p-mod-dragging"),this.removeClass("p-mod-dragging")))},t.prototype._adjustCurrentForInsert=function(e,i){var r=this.currentTitle,s=this._currentIndex,c=this.insertBehavior;if(c==="select-tab"||c==="select-tab-if-needed"&&s===-1){this._currentIndex=e,this._previousTitle=r,this._currentChanged.emit({previousIndex:s,previousTitle:r,currentIndex:e,currentTitle:i});return}s>=e&&this._currentIndex++},t.prototype._adjustCurrentForMove=function(e,i){this._currentIndex===e?this._currentIndex=i:this._currentIndex<e&&this._currentIndex>=i?this._currentIndex++:this._currentIndex>e&&this._currentIndex<=i&&this._currentIndex--},t.prototype._adjustCurrentForRemove=function(e,i){var r=this._currentIndex,s=this.removeBehavior;if(r!==e){r>e&&this._currentIndex--;return}if(this._titles.length===0){this._currentIndex=-1,this._currentChanged.emit({previousIndex:e,previousTitle:i,currentIndex:-1,currentTitle:null});return}if(s==="select-tab-after"){this._currentIndex=Math.min(e,this._titles.length-1),this._currentChanged.emit({previousIndex:e,previousTitle:i,currentIndex:this._currentIndex,currentTitle:this.currentTitle});return}if(s==="select-tab-before"){this._currentIndex=Math.max(0,e-1),this._currentChanged.emit({previousIndex:e,previousTitle:i,currentIndex:this._currentIndex,currentTitle:this.currentTitle});return}if(s==="select-previous-tab"){this._previousTitle?(this._currentIndex=this._titles.indexOf(this._previousTitle),this._previousTitle=null):this._currentIndex=Math.min(e,this._titles.length-1),this._currentChanged.emit({previousIndex:e,previousTitle:i,currentIndex:this._currentIndex,currentTitle:this.currentTitle});return}this._currentIndex=-1,this._currentChanged.emit({previousIndex:e,previousTitle:i,currentIndex:-1,currentTitle:null})}
1,t.prototype._onTitleChanged=function(e){this.update()},t}(O);(function(n){var t=function(){function e(){this.closeIconSelector=".lm-TabBar-tabCloseIcon",this._tabID=0,this._tabKeys=new WeakMap,this._uuid=++e._nInstance}return e.prototype.renderTab=function(i){var r=i.title.caption,s=this.createTabKey(i),c=s,d=this.createTabStyle(i),m=this.createTabClass(i),f=this.createTabDataset(i),y=this.createTabARIA(i);return i.title.closable?F.li(Z({id:c,key:s,className:m,title:r,style:d,dataset:f},y),this.renderIcon(i),this.renderLabel(i),this.renderCloseIcon(i)):F.li(Z({id:c,key:s,className:m,title:r,style:d,dataset:f},y),this.renderIcon(i),this.renderLabel(i))},e.prototype.renderIcon=function(i){var r=i.title,s=this.createIconClass(i);return typeof r.icon=="string"?F.div({className:s},r.iconLabel):F.div({className:s},r.icon,r.iconLabel)},e.prototype.renderLabel=function(i){return F.div({className:"lm-TabBar-tabLabel p-TabBar-tabLabel"},i.title.label)},e.prototype.renderCloseIcon=function(i){return F.div({className:"lm-TabBar-tabCloseIcon p-TabBar-tabCloseIcon"})},e.prototype.createTabKey=function(i){var r=this._tabKeys.get(i.title);return r===void 0&&(r="tab-key-"+this._uuid+"-"+this._tabID++,this._tabKeys.set(i.title,r)),r},e.prototype.createTabStyle=function(i){return{zIndex:""+i.zIndex}},e.prototype.createTabClass=function(i){var r="lm-TabBar-tab";return r+=" p-TabBar-tab",i.title.className&&(r+=" "+i.title.className),i.title.closable&&(r+=" lm-mod-closable",r+=" p-mod-closable"),i.current&&(r+=" lm-mod-current",r+=" p-mod-current"),r},e.prototype.createTabDataset=function(i){return i.title.dataset},e.prototype.createTabARIA=function(i){return{role:"tab","aria-selected":i.current.toString()}},e.prototype.createIconClass=function(i){var r="lm-TabBar-tabIcon";r+=" p-TabBar-tabIcon";var s=i.title.iconClass;return s?r+" "+s:r},e._nInstance=0,e}();n.Renderer=t,n.defaultRenderer=new t,n.addButtonSelector=".lm-TabBar-addButton"})(Xe||(Xe={}));(function(n){n.DRAG_THRESHOLD=5,n.DETACH_THRESHOLD=20;function t(){var y=document.createElement("div"),x=document.createElement("ul");x.setAttribute("role","tablist"),x.className="lm-TabBar-content",x.classList.add("p-TabBar-content"),y.appendChild(x);var g=document.createElement("div");return g.className="lm-TabBar-addButton lm-mod-hidden",y.appendChild(g),y}n.createNode=t;function e(y){return y instanceof Ft?y:new Ft(y)}n.asTitle=e;function i(y){var x=window.getComputedStyle(y);return 1e3*(parseFloat(x.transitionDuration)||0)}n.parseTransitionDuration=i;function r(y,x){for(var g=new Array(y.length),_=0,p=y.length;_<p;++_){var b=y[_],M=window.getComputedStyle(b);x==="horizontal"?g[_]={pos:b.offsetLeft,size:b.offsetWidth,margin:parseFloat(M.marginLeft)||0}:g[_]={pos:b.offsetTop,size:b.offsetHeight,margin:parseFloat(M.marginTop)||0}}return g}n.snapTabLayout=r;function s(y,x){var g=Math.abs(x.clientX-y.pressX),_=Math.abs(x.clientY-y.pressY);return g>=n.DRAG_THRESHOLD||_>=n.DRAG_THRESHOLD}n.dragExceeded=s;function c(y,x){var g=y.contentRect;return x.clientX<g.left-n.DETACH_THRESHOLD||x.clientX>=g.right+n.DETACH_THRESHOLD||x.clientY<g.top-n.DETACH_THRESHOLD||x.clientY>=g.bottom+n.DETACH_THRESHOLD}n.detachExceeded=c;function d(y,x,g,_){var p,b,M,L;_==="horizontal"?(p=x.pressX,b=g.clientX-x.contentRect.left,M=g.clientX,L=x.contentRect.width):(p=x.pressY,b=g.clientY-x.contentRect.top,M=g.clientY,L=x.contentRect.height);for(var S=x.index,C=b-x.tabPressPos,k=C+x.tabSize,D=0,A=y.length;D<A;++D){var l=void 0,v=x.tabLayout[D],a=v.pos+(v.size>>1);if(D<x.index&&C<a)l=x.tabSize+x.tabLayout[D+1].margin+"px",S=Math.min(S,D);else if(D>x.index&&k>a)l=-x.tabSize-v.margin+"px",S=Math.max(S,D);else if(D===x.index){var o=M-p,u=L-(x.tabPos+x.tabSize);l=Math.max(-x.tabPos,Math.min(o,u))+"px"}else l="";_==="horizontal"?y[D].style.left=l:y[D].style.top=l}x.targetIndex=S}n.layoutTabs=d;function m(y,x){var g;x==="horizontal"?g=y.contentRect.width:g=y.contentRect.height;var _;if(y.targetIndex===y.index)_=0;else if(y.targetIndex>y.index){var p=y.tabLayout[y.targetIndex];_=p.pos+p.size-y.tabSize-y.tabPos}else{var p=y.tabLayout[y.targetIndex];_=p.pos-y.tabPos}var b=g-(y.tabPos+y.tabSize),M=Math.max(-y.tabPos,Math.min(_,b));x==="horizontal"?y.tab.style.left=M+"px":y.tab.style.top=M+"px"}n.finalizeTabPosition=m;function f(y,x){R(y,function(g){x==="horizontal"?g.style.left="":g.style.top=""})}n.resetTabPositions=f})(he||(he={}));Xn=function(n){K(t,n);function t(e){var i=n.call(this)||this;return i._spacing=4,i._dirty=!1,i._root=null,i._box=null,i._items=new Map,i.renderer=e.renderer,e.spacing!==void 0&&(i._spacing=Qe.clampDimension(e.spacing)),i._document=e.document||document,i._hiddenMode=e.hiddenMode!==void 0?e.hiddenMode:O.HiddenMode.Display,i}return t.prototype.dispose=function(){var e=this.iter();
1this._items.forEach(function(i){i.dispose()}),this._box=null,this._root=null,this._items.clear(),R(e,function(i){i.dispose()}),n.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"hiddenMode",{get:function(){return this._hiddenMode},set:function(e){var i=this;this._hiddenMode!==e&&(this._hiddenMode=e,R(this.tabBars(),function(r){r.titles.length>1&&r.titles.forEach(function(s){s.owner.hiddenMode=i._hiddenMode})}))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"spacing",{get:function(){return this._spacing},set:function(e){e=Qe.clampDimension(e),this._spacing!==e&&(this._spacing=e,this.parent&&this.parent.fit())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isEmpty",{get:function(){return this._root===null},enumerable:!0,configurable:!0}),t.prototype.iter=function(){return this._root?this._root.iterAllWidgets():_e()},t.prototype.widgets=function(){return this._root?this._root.iterUserWidgets():_e()},t.prototype.selectedWidgets=function(){return this._root?this._root.iterSelectedWidgets():_e()},t.prototype.tabBars=function(){return this._root?this._root.iterTabBars():_e()},t.prototype.handles=function(){return this._root?this._root.iterHandles():_e()},t.prototype.moveHandle=function(e,i,r){var s=e.classList.contains("lm-mod-hidden");if(s=s||e.classList.contains("p-mod-hidden"),!(!this._root||s)){var c=this._root.findSplitNode(e);if(c){var d;c.node.orientation==="horizontal"?d=i-e.offsetLeft:d=r-e.offsetTop,d!==0&&(c.node.holdSizes(),de.adjust(c.node.sizers,c.index,d),this.parent&&this.parent.update())}}},t.prototype.saveLayout=function(){return this._root?(this._root.holdAllSizes(),{main:this._root.createConfig()}):{main:null}},t.prototype.restoreLayout=function(e){var i=this,r=new Set,s;e.main?s=Y.normalizeAreaConfig(e.main,r):s=null;var c=this.widgets(),d=this.tabBars(),m=this.handles();this._root=null,R(c,function(f){r.has(f)||(f.parent=null)}),R(d,function(f){f.dispose()}),R(m,function(f){f.parentNode&&f.parentNode.removeChild(f)}),r.forEach(function(f){f.parent=i.parent}),s?this._root=Y.realizeAreaConfig(s,{createTabBar:function(f){return i._createTabBar()},createHandle:function(){return i._createHandle()}},this._document):this._root=null,this.parent&&(r.forEach(function(f){i.attachWidget(f)}),this.parent.fit())},t.prototype.addWidget=function(e,i){i===void 0&&(i={});var r=i.ref||null,s=i.mode||"tab-after",c=null;if(this._root&&r&&(c=this._root.findTabNode(r)),r&&!c)throw new Error("Reference widget is not in the layout.");switch(e.parent=this.parent,s){case"tab-after":this._insertTab(e,r,c,!0);break;case"tab-before":this._insertTab(e,r,c,!1);break;case"split-top":this._insertSplit(e,r,c,"vertical",!1);break;case"split-left":this._insertSplit(e,r,c,"horizontal",!1);break;case"split-right":this._insertSplit(e,r,c,"horizontal",!0);break;case"split-bottom":this._insertSplit(e,r,c,"vertical",!0);break}this.parent&&(this.attachWidget(e),this.parent.fit())},t.prototype.removeWidget=function(e){this._removeWidget(e),this.parent&&(this.detachWidget(e),this.parent.fit())},t.prototype.hitTestTabAreas=function(e,i){if(!this._root||!this.parent||!this.parent.isVisible)return null;this._box||(this._box=W.boxSizing(this.parent.node));var r=this.parent.node.getBoundingClientRect(),s=e-r.left-this._box.borderLeft,c=i-r.top-this._box.borderTop,d=this._root.hitTestTabNodes(s,c);if(!d)return null;var m=d.tabBar,f=d.top,y=d.left,x=d.width,g=d.height,_=this._box.borderLeft+this._box.borderRight,p=this._box.borderTop+this._box.borderBottom,b=r.width-_-(y+x),M=r.height-p-(f+g);return{tabBar:m,x:s,y:c,top:f,left:y,right:b,bottom:M,width:x,height:g}},t.prototype.init=function(){var e=this;n.prototype.init.call(this),R(this,function(i){e.attachWidget(i)}),R(this.handles(),function(i){e.parent.node.appendChild(i)}),this.parent.fit()},t.prototype.attachWidget=function(e){this.parent.node!==e.node.parentNode&&(this._items.set(e,new et(e)),this.parent.isAttached&&T.sendMessage(e,O.Msg.BeforeAttach),this.parent.node.appendChild(e.node),this.parent.isAttached&&T.sendMessage(e,O.Msg.AfterAttach))},t.prototype.detachWidget=function(e){if(this.parent.node===e.node.parentNode){this.parent.isAttached&&T.sendMessage(e,O.Msg.BeforeDetach),this.parent.node.removeChild(e.node),this.parent.isAttached&&T.sendMessage(e,O.Msg.AfterDetach);var i=this._items.get(e);i&&(this._items.delete(e),i.dispose())}},t.prototype.onBeforeShow=function(e){n.prototype.onBeforeShow.call(this,e),this.parent.update(
1)},t.prototype.onBeforeAttach=function(e){n.prototype.onBeforeAttach.call(this,e),this.parent.fit()},t.prototype.onChildShown=function(e){this.parent.fit()},t.prototype.onChildHidden=function(e){this.parent.fit()},t.prototype.onResize=function(e){this.parent.isVisible&&this._update(e.width,e.height)},t.prototype.onUpdateRequest=function(e){this.parent.isVisible&&this._update(-1,-1)},t.prototype.onFitRequest=function(e){this.parent.isAttached&&this._fit()},t.prototype._removeWidget=function(e){if(this._root){var i=this._root.findTabNode(e);if(i){if(Y.removeAria(e),i.tabBar.titles.length>1){if(i.tabBar.removeTab(e.title),this._hiddenMode===O.HiddenMode.Scale&&i.tabBar.titles.length==1){var r=i.tabBar.titles[0].owner;r.hiddenMode=O.HiddenMode.Display}return}if(i.tabBar.dispose(),this._root===i){this._root=null;return}this._root.holdAllSizes();var s=i.parent;i.parent=null;var c=E.removeFirstOf(s.children,i),d=E.removeAt(s.handles,c);if(E.removeAt(s.sizers,c),d.parentNode&&d.parentNode.removeChild(d),s.children.length>1){s.syncHandles();return}var m=s.parent;s.parent=null;var f=s.children[0],y=s.handles[0];if(s.children.length=0,s.handles.length=0,s.sizers.length=0,y.parentNode&&y.parentNode.removeChild(y),this._root===s){f.parent=null,this._root=f;return}var x=m,g=x.children.indexOf(s);if(f instanceof Y.TabLayoutNode){f.parent=x,x.children[g]=f;return}var _=E.removeAt(x.handles,g);E.removeAt(x.children,g),E.removeAt(x.sizers,g),_.parentNode&&_.parentNode.removeChild(_);for(var p=0,b=f.children.length;p<b;++p){var M=f.children[p],L=f.handles[p],S=f.sizers[p];E.insert(x.children,g+p,M),E.insert(x.handles,g+p,L),E.insert(x.sizers,g+p,S),M.parent=x}f.children.length=0,f.handles.length=0,f.sizers.length=0,f.parent=null,x.syncHandles()}}},t.prototype._insertTab=function(e,i,r,s){if(e!==i){if(!this._root){var c=new Y.TabLayoutNode(this._createTabBar());c.tabBar.addTab(e.title),this._root=c,Y.addAria(e,c.tabBar);return}r||(r=this._root.findFirstTabNode()),r.tabBar.titles.indexOf(e.title)===-1&&(this._removeWidget(e),e.hide());var d;if(i?d=r.tabBar.titles.indexOf(i.title):d=r.tabBar.currentIndex,this._hiddenMode===O.HiddenMode.Scale)if(r.tabBar.titles.length===0)e.hiddenMode=O.HiddenMode.Display;else if(r.tabBar.titles.length==1){var m=r.tabBar.titles[0].owner;m.hiddenMode=O.HiddenMode.Scale}else e.hiddenMode=O.HiddenMode.Scale;else e.hiddenMode=this._hiddenMode;r.tabBar.insertTab(d+(s?1:0),e.title),Y.addAria(e,r.tabBar)}},t.prototype._insertSplit=function(e,i,r,s,c){if(!(e===i&&r&&r.tabBar.titles.length===1)){this._removeWidget(e);var d=new Y.TabLayoutNode(this._createTabBar());if(d.tabBar.addTab(e.title),Y.addAria(e,d.tabBar),!this._root){this._root=d;return}if(!r||!r.parent){var m=this._splitRoot(s),f=c?m.children.length:0;m.normalizeSizes();var y=Y.createSizer(r?1:Y.GOLDEN_RATIO);E.insert(m.children,f,d),E.insert(m.sizers,f,y),E.insert(m.handles,f,this._createHandle()),d.parent=m,m.normalizeSizes(),m.syncHandles();return}var x=r.parent;if(x.orientation===s){var g=x.children.indexOf(r);x.normalizeSizes();var _=x.sizers[g].sizeHint/=2,p=g+(c?1:0);E.insert(x.children,p,d),E.insert(x.sizers,p,Y.createSizer(_)),E.insert(x.handles,p,this._createHandle()),d.parent=x,x.syncHandles();return}var b=E.removeFirstOf(x.children,r),M=new Y.SplitLayoutNode(s);M.normalized=!0,M.children.push(r),M.sizers.push(Y.createSizer(.5)),M.handles.push(this._createHandle()),r.parent=M;var L=c?1:0;E.insert(M.children,L,d),E.insert(M.sizers,L,Y.createSizer(.5)),E.insert(M.handles,L,this._createHandle()),d.parent=M,M.syncH
1andles(),E.insert(x.children,b,M),M.parent=x}},t.prototype._splitRoot=function(e){var i=this._root;if(i instanceof Y.SplitLayoutNode&&i.orientation===e)return i;var r=this._root=new Y.SplitLayoutNode(e);return i&&(r.children.push(i),r.sizers.push(Y.createSizer(0)),r.handles.push(this._createHandle()),i.parent=r),r},t.prototype._fit=function(){var e=0,i=0;if(this._root){var r=this._root.fit(this._spacing,this._items);e=r.minWidth,i=r.minHeight}var s=this._box=W.boxSizing(this.parent.node);e+=s.horizontalSum,i+=s.verticalSum;var c=this.parent.node.style;c.minWidth=e+"px",c.minHeight=i+"px",this._dirty=!0,this.parent.parent&&T.sendMessage(this.parent.parent,O.Msg.FitRequest),this._dirty&&T.sendMessage(this.parent,O.Msg.UpdateRequest)},t.prototype._update=function(e,i){if(this._dirty=!1,!!this._root){e<0&&(e=this.parent.node.offsetWidth),i<0&&(i=this.parent.node.offsetHeight),this._box||(this._box=W.boxSizing(this.parent.node));var r=this._box.paddingTop,s=this._box.paddingLeft,c=e-this._box.horizontalSum,d=i-this._box.verticalSum;this._root.update(r,s,c,d,this._spacing,this._items)}},t.prototype._createTabBar=function(){var e=this.renderer.createTabBar(this._document);return e.orientation="horizontal",this.parent&&(e.parent=this.parent,this.attachWidget(e)),e},t.prototype._createHandle=function(){var e=this.renderer.createHandle(),i=e.style;return i.position="absolute",i.top="0",i.left="0",i.width="0",i.height="0",this.parent&&this.parent.node.appendChild(e),e},t}(ke);(function(n){n.GOLDEN_RATIO=.618;function t(g){var _=new Le;return _.sizeHint=g,_.size=g,_}n.createSizer=t;function e(g,_){var p;return g.type==="tab-area"?p=m(g,_):p=f(g,_),p}n.normalizeAreaConfig=e;function i(g,_,p){var b;return g.type==="tab-area"?b=y(g,_,p):b=x(g,_,p),b}n.realizeAreaConfig=i;var r=function(){function g(_){this.parent=null,this._top=0,this._left=0,this._width=0,this._height=0;var p=new Le,b=new Le;p.stretch=0,b.stretch=1,this.tabBar=_,this.sizers=[p,b]}return Object.defineProperty(g.prototype,"top",{get:function(){return this._top},enumerable:!0,configurable:!0}),Object.defineProperty(g.prototype,"left",{get:function(){return this._left},enumerable:!0,configurable:!0}),Object.defineProperty(g.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(g.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),g.prototype.iterAllWidgets=function(){return vt(Ge(this.tabBar),this.iterUserWidgets())},g.prototype.iterUserWidgets=function(){return Ie(this.tabBar.titles,function(_){return _.owner})},g.prototype.iterSelectedWidgets=function(){var _=this.tabBar.currentTitle;return _?Ge(_.owner):_e()},g.prototype.iterTabBars=function(){return Ge(this.tabBar)},g.prototype.iterHandles=function(){return _e()},g.prototype.findTabNode=function(_){return this.tabBar.titles.indexOf(_.title)!==-1?this:null},g.prototype.findSplitNode=function(_){return null},g.prototype.findFirstTabNode=function(){return this},g.prototype.hitTestTabNodes=function(_,p){return _<this._left||_>=this._left+this._width||p<this._top||p>=this._top+this._height?null:this},g.prototype.createConfig=function(){var _=this.tabBar.titles.map(function(b){return b.owner}),p=this.tabBar.currentIndex;return{type:"tab-area",widgets:_,currentIndex:p}},g.prototype.holdAllSizes=function(){},g.prototype.fit=function(_,p){var b=0,M=0,L=1/0,S=1/0,C=p.get(this.tabBar),k=this.tabBar.currentTitle,D=k?p.get(k.owner):void 0,A=this.sizers,l=A[0],v=A[1];return C&&C.fit(),D&&D.fit(),C&&!C.isHidden?(b=Math.max(b,C.minWidth),M+=C.minHeight,l.minSize=C.minHeight,l.maxSize=C.maxHeight):(l.minSize=0,l.maxSize=0),D&&!D.isHidden?(b=Math.max(b,D.minWidth),M+=D.minHeight,v.minSize=D.minHeight,v.maxSize=1/0):(v.minSize=0,v.maxSize=1/0),{minWidth:b,minHeight:M,maxWidth:L,maxHeight:S}},g.prototype.update=function(_,p,b,M,L,S){this._top=p,this._left=_,this._width=b,this._height=M;var C=S.get(this.tabBar),k=this.tabBar.currentTitle,D=k?S.get(k.owner):void 0;if(de.calc(this.sizers,M),C&&!C.isHidden){var A=this.sizers[0].size;C.update(_,p,b,A),p+=A}if(D&&!D.isHidden){var A=this.sizers[1].size;D.update(_,p,b,A)}},g}();n.TabLayoutNode=r;var s=function(){function g(_){this.parent=null,this.normalized=!1,this.children=[],this.sizers=[],this.handles=[],this.orientation=_}return g.prototype.iterAllWidgets=function(){var _=Ie(this.children,function(p){return p.iterAllWidgets()});return new De(_)},g.prototype.iterUserWidgets=function(){var _=Ie(this.children,function(p){return p.iterUserWidgets()});return new De(_)},g.prototype.iterSelectedWidgets=function(){var _=Ie(this.children,function(p){return p.iterSelectedWidgets()});return new De(_)},g.prototype.iterTabBars=function(){var _=Ie(this.children,function(p){return p.iterTabBars()});return new De(_)},g.prototype.iterHandles=function(){var _=Ie(this.children,function(p){return p.iterHandles()});return vt(this.handles,new De(_))},g.prototype.findTabNode=function(_){for(var p=0,b=this.children.length;p<b;++p){var M=this.children[p].findTabNode(_);if(M)return M}return null},g.prototype.findSplitNode=function(_){var p=this.handles.indexOf(_);
1if(p!==-1)return{index:p,node:this};for(var b=0,M=this.children.length;b<M;++b){var L=this.children[b].findSplitNode(_);if(L)return L}return null},g.prototype.findFirstTabNode=function(){return this.children.length===0?null:this.children[0].findFirstTabNode()},g.prototype.hitTestTabNodes=function(_,p){for(var b=0,M=this.children.length;b<M;++b){var L=this.children[b].hitTestTabNodes(_,p);if(L)return L}return null},g.prototype.createConfig=function(){var _=this.orientation,p=this.createNormalizedSizes(),b=this.children.map(function(M){return M.createConfig()});return{type:"split-area",orientation:_,children:b,sizes:p}},g.prototype.syncHandles=function(){var _=this;R(this.handles,function(p,b){p.setAttribute("data-orientation",_.orientation),b===_.handles.length-1?(p.classList.add("lm-mod-hidden"),p.classList.add("p-mod-hidden")):(p.classList.remove("lm-mod-hidden"),p.classList.remove("p-mod-hidden"))})},g.prototype.holdSizes=function(){R(this.sizers,function(_){_.sizeHint=_.size})},g.prototype.holdAllSizes=function(){R(this.children,function(_){return _.holdAllSizes()}),this.holdSizes()},g.prototype.normalizeSizes=function(){var _=this.sizers.length;if(_!==0){this.holdSizes();var p=_t(this.sizers,function(b,M){return b+M.sizeHint},0);p===0?R(this.sizers,function(b){b.size=b.sizeHint=1/_}):R(this.sizers,function(b){b.size=b.sizeHint/=p}),this.normalized=!0}},g.prototype.createNormalizedSizes=function(){var _=this.sizers.length;if(_===0)return[];var p=this.sizers.map(function(M){return M.size}),b=_t(p,function(M,L){return M+L},0);return b===0?R(p,function(M,L){p[L]=1/_}):R(p,function(M,L){p[L]=M/b}),p},g.prototype.fit=function(_,p){for(var b=this.orientation==="horizontal",M=Math.max(0,this.children.length-1)*_,L=b?M:0,S=b?0:M,C=1/0,k=1/0,D=0,A=this.children.length;D<A;++D){var l=this.children[D].fit(_,p);b?(S=Math.max(S,l.minHeight),L+=l.minWidth,this.sizers[D].minSize=l.minWidth):(L=Math.max(L,l.minWidth),S+=l.minHeight,this.sizers[D].minSize=l.minHeight)}return{minWidth:L,minHeight:S,maxWidth:C,maxHeight:k}},g.prototype.update=function(_,p,b,M,L,S){var C=this.orientation==="horizontal",k=Math.max(0,this.children.length-1)*L,D=Math.max(0,(C?b:M)-k);this.normalized&&(R(this.sizers,function(u){u.sizeHint*=D}),this.normalized=!1),de.calc(this.sizers,D);for(var A=0,l=this.children.length;A<l;++A){var v=this.children[A],a=this.sizers[A].size,o=this.handles[A].style;C?(v.update(_,p,a,M,L,S),_+=a,o.top=p+"px",o.left=_+"px",o.width=L+"px",o.height=M+"px",_+=L):(v.update(_,p,b,a,L,S),p+=a,o.top=p+"px",o.left=_+"px",o.width=b+"px",o.height=L+"px",p+=L)}},g}();n.SplitLayoutNode=s;function c(g,_){g.node.setAttribute("role","tabpanel");var p=_.renderer;if(p instanceof Xe.Renderer){var b=p.createTabKey({title:g.title,current:!1,zIndex:0});g.node.setAttribute("aria-labelledby",b)}}n.addAria=c;function d(g){g.node.removeAttribute("role"),g.node.removeAttribute("aria-labelledby")}n.removeAria=d;function m(g,_){if(g.widgets.length===0)return null;var p=[];if(R(g.widgets,function(M){_.has(M)||(_.add(M),p.push(M))}),p.length===0)return null;var b=g.currentIndex;return b!==-1&&(b<0||b>=p.length)&&(b=0),{type:"tab-area",widgets:p,currentIndex:b}}function f(g,_){for(var p=g.orientation,b=[],M=[],L=0,S=g.children.length;L<S;++L){var C=e(g.children[L],_);C&&(C.type==="tab-area"||C.orientation!==p?(b.push(C),M.push(Math.abs(g.sizes[L]||0))):(b.push.apply(b,C.children),M.push.apply(M,C.sizes)))}return b.length===0?null:b.length===1?b[0]:{type:"split-area",orientation:p,children:b,sizes:M}}function y(g,_,p){var b=_.createTabBar(p);return R(g.widgets,function(M){M.hide(),b.addTab(M.title),n.addAria(M,b)}),b.currentIndex=g.currentIndex,new r(b)}function x(g,_,p){var b=new s(g.orientation);return R(g.children,function(M,L){var S=i(M,_,p),C=t(g.sizes[L]),k=_.createHandle();b.children.push(S),b.handles.push(k),b.sizers.push(C),S.parent=b}),b.syncHandles(),b.normalizeSizes(),b}})(Y||(Y={}));kn=function(n){K(t,n);function t(e){e===void 0&&(e={});var i=n.call(this)||this;i._drag=null,i._tabsMovable=!0,i._tabsConstrained=!1,i._addButtonEnabled=!1,i._pressData=null,i._layoutModified=new H(i),i._addRequested=new H(i),i.addClass("lm-DockPanel"),i.addClass("p-DockPanel"),i._document=e.document||document,i._mode=e.mode||"multiple-document",i._renderer=e.renderer||t.defaultRenderer,i._edges=e.edges||V.DEFAULT_EDGES,e.tabsMovable!==void 0&&(i._tabsMovable=e.tabsMovable),e.tabsConstrained!==void 0&&(i._tabsConstrained=e.tabsConstrained),e.addButtonEnabled!==void 0&&(i._addButtonEnabled=e.addButtonEnabled),i.dataset.mode=i._mode;var r={createTabBar:function(){return i._createTabBar()},createHandle:function(){return i._createHandle()}};return i.layout=new Xn({document:i._document,renderer:r,spacing:e.spacing,hiddenMode:e.hiddenMode}),i.overlay=e.overlay||new t.Overlay,i.node.appendChild(i.overlay.node),i}return t.prototype.dispose=function(){this._releaseMouse(),this.overlay.hide(0),this._drag&&this._drag.dispose(),n.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"hiddenMode",{get:function(){return this.layout.hiddenMode},set:function(e){this.layout.hiddenMode=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"layoutModified",{get:function(){return this._layoutModified},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"addRequested",{get:function(){return this._addRequested},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"renderer",{get:function(){return this.layout.renderer},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"spacing",{get:function(){return this.layout.spacing},set:function(e){this.layout.spacing=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"mode",{get:function(){return this._mode},set:function(e){if(this._mode!==e){this._mode=e,this.dataset.mode=e;var i=this.layout;switch(e){case"multiple-document":R(i.tabBars(),function(r){r.show()});break;case"single-document":i.restoreLayout(V.createSingleDocumentConfig(this));break;default:throw"unreachable"}T.postMessage(this,V.LayoutModified)}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tabsMovable",{get:function(){return this._tabsMovable},set:function(e){this._tabsMovable=e,R(this.tabBars(),function(i){i.tabsMovable=e})},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tabsConstrained",{get:function(){return this._tabsConstrained},set:function(e){this._tabsConstrained=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"addButtonEnabled",{get:function(){return this._addButtonEnabled},set:function(e){this._addButtonEnabled=e,R(this.tabBars(),function(i){i.addButtonEnabled=e})},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isEmpty",{get:function(){return this.layout.isEmpty},enumerable:!0,configurable:!0}),t.prototype.widgets=function(){return this.layout.widgets()},t.prototype.selectedWidgets=function(){return this.layout.selectedWidgets()},t.prototype.tabBars=function(){return this.layout.tabBars()},t.prototype.handles=function(){return this.layout.handles()},t.prototype.selectWidget=function(e){var i=Ne(this.tabBars(),function(r){return r.titles.indexOf(e.title)!==-1});if(!i)throw new Error("Widget is not contained in the dock panel.");i.currentTitle=e.title},t.prototype.activateWidget=function(e){this.selectWidget(e),e.activate()},t.prototype.saveLayout=function(){return this.layout.saveLayout()},t.prototype.restoreLayout=function(e){this._mode="multiple-document",this.layout.restoreLayout(e),($.IS_EDGE||$.IS_IE)&&T.flush(),T.postMessage(this,V.LayoutModified)},t.prototype.addWidget=function(e,i){i===void 0&&(i={}),this._mode==="single-document"?this.layout.addWidget(e):this.layout.addWidget(e,i),T.postMessage(this,V.LayoutModified)},t.prototype.processMessage=function(e){e.type==="layout-modified"?this._layoutModified.emit(void 0):n.prototype.processMessage.call(this,e)},t.prototype.handleEvent=function(e){switch(e.type){case"lm-dragenter":this._evtDragEnter(e);break;case"lm-dragleave":this._evtDragLeave(e);break;case"lm-dragover":this._evtDragOver(e);break;case"lm-drop":this._evtDrop(e);break;case"mousedown":this._evtMouseDown(e);break;case"mousemove":this._evtMouseMove(e);break;case"mouseup":this._evtMouseUp(e);break;case"pointerdown":this._evtMouseDown(e);break;case"pointermove":this._evtMouseMove(e);break;case"pointerup":this._evtMouseUp(e);break;case"keydown":this._evtKeyDown(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation();break}},t.prototype.onBeforeAttach=function(e){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)},t.prototype.onAfterDetach=function(e){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()},t.prototype.onChildAdded=function(e){V.isGeneratedTabBarProperty.get(e.child)||(e.child.addClass("lm-DockPanel-widget"),e.child.addClass("p-DockPanel-widget"))},t.prototype.onChildRemoved=function(e){V.isGeneratedTabBarProperty.get(e.child)||(e.child.removeClass("lm-DockPanel-widget"),e.child.removeClass("p-DockPanel-widget"),T.postMessage(this,V.LayoutModified))},t.prototype._evtDragEnter=function(e){e.mimeData.hasData("application/vnd.lumino.widget-factory")&&(e.preventDefault(),e.stopPropagation())},t.prototype._evtDragLeave=function(e){e.preventDefault(),!(this._tabsConstrained&&e.source!==this)&&(e.stopPropagation(),this.overlay.hide(1))},t.prototype._evtDragOver=function(e){e.preventDefault(),this._tabsConstrained&&e.source!==this||this._showOverlay(e.clientX,e.clientY)==="invalid"?e.dropAction="none":(e.stopPropagation(),e.dropAction=e.proposedAction)},t.prototype._evtDrop=function(e){if(e.preventDefault(),this.overlay.hide(0),e.proposedAction==="none"){e.dropAction="none";return}var i=e.clientX,r=e.clientY,s=V.findDropTarget(this,i,r,this._edges),c=s.zone,d=s.target;if(this._tabsConstrained&&e.source!==this||c==="invalid"){e.dropAction="none";return}var m=e.mimeData,f=m.getData("application/vnd.lumino.widget-factory");if(typeof f!="function"){e.dropAction="none";return}
1var y=f();if(!(y instanceof O)){e.dropAction="none";return}if(y.contains(this)){e.dropAction="none";return}var x=d?V.getDropRef(d.tabBar):null;switch(c){case"root-all":this.addWidget(y);break;case"root-top":this.addWidget(y,{mode:"split-top"});break;case"root-left":this.addWidget(y,{mode:"split-left"});break;case"root-right":this.addWidget(y,{mode:"split-right"});break;case"root-bottom":this.addWidget(y,{mode:"split-bottom"});break;case"widget-all":this.addWidget(y,{mode:"tab-after",ref:x});break;case"widget-top":this.addWidget(y,{mode:"split-top",ref:x});break;case"widget-left":this.addWidget(y,{mode:"split-left",ref:x});break;case"widget-right":this.addWidget(y,{mode:"split-right",ref:x});break;case"widget-bottom":this.addWidget(y,{mode:"split-bottom",ref:x});break;case"widget-tab":this.addWidget(y,{mode:"tab-after",ref:x});break;default:throw"unreachable"}e.dropAction=e.proposedAction,e.stopPropagation(),this.activateWidget(y)},t.prototype._evtKeyDown=function(e){e.preventDefault(),e.stopPropagation(),e.keyCode===27&&(this._releaseMouse(),T.postMessage(this,V.LayoutModified))},t.prototype._evtMouseDown=function(e){if(e.button===0){var i=this.layout,r=e.target,s=Ne(i.handles(),function(x){return x.contains(r)});if(s){e.preventDefault(),e.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 c=s.getBoundingClientRect(),d=e.clientX-c.left,m=e.clientY-c.top,f=window.getComputedStyle(s),y=Ce.overrideCursor(f.cursor,this._document);this._pressData={handle:s,deltaX:d,deltaY:m,override:y}}}},t.prototype._evtMouseMove=function(e){if(this._pressData){e.preventDefault(),e.stopPropagation();var i=this.node.getBoundingClientRect(),r=e.clientX-i.left-this._pressData.deltaX,s=e.clientY-i.top-this._pressData.deltaY,c=this.layout;c.moveHandle(this._pressData.handle,r,s)}},t.prototype._evtMouseUp=function(e){e.button===0&&(e.preventDefault(),e.stopPropagation(),this._releaseMouse(),T.postMessage(this,V.LayoutModified))},t.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))},t.prototype._showOverlay=function(e,i){var r=V.findDropTarget(this,e,i,this._edges),s=r.zone,c=r.target;if(s==="invalid")return this.overlay.hide(100),s;var d,m,f,y,x=W.boxSizing(this.node),g=this.node.getBoundingClientRect();switch(s){case"root-all":d=x.paddingTop,m=x.paddingLeft,f=x.paddingRight,y=x.paddingBottom;break;case"root-top":d=x.paddingTop,m=x.paddingLeft,f=x.paddingRight,y=g.height*V.GOLDEN_RATIO;break;case"root-left":d=x.paddingTop,m=x.paddingLeft,f=g.width*V.GOLDEN_RATIO,y=x.paddingBottom;break;case"root-right":d=x.paddingTop,m=g.width*V.GOLDEN_RATIO,f=x.paddingRight,y=x.paddingBottom;break;case"root-bottom":d=g.height*V.GOLDEN_RATIO,m=x.paddingLeft,f=x.paddingRight,y=x.paddingBottom;break;case"widget-all":d=c.top,m=c.left,f=c.right,y=c.bottom;break;case"widget-top":d=c.top,m=c.left,f=c.right,y=c.bottom+c.height/2;break;case"widget-left":d=c.top,m=c.left,f=c.right+c.width/2,y=c.bottom;break;case"widget-right":d=c.top,m=c.left+c.width/2,f=c.right,y=c.bottom;break;case"widget-bottom":d=c.top+c.height/2,m=c.left,f=c.right,y=c.bottom;break;case"widget-tab":var _=c.tabBar.node.getBoundingClientRect().height;d=c.top,m=c.left,f=c.right,y=c.bottom+c.height-_;break;default:throw"unreachable"}return this.overlay.show({top:d,left:m,right:f,bottom:y}),s},t.prototype._createTabBar=function(){var e=this._renderer.createTabBar(this._document);return V.isGeneratedTabBarProperty.set(e,!0),this._mode==="single-document"&&e.hide(),e.tabsMovable=this._tabsMovable,e.allowDeselect=!1,e.addButtonEnabled=this._addButtonEnabled,e.removeBehavior="select-previous-tab",e.insertBehavior="select-tab-if-needed",e.tabMoved.connect(this._onTabMoved,this),e.currentChanged.connect(this._onCurrentChanged,this),e.tabCloseRequested.connect(this._onTabCloseRequested,this),e.tabDetachRequested.connect(this._onTabDetachRequested,this),e.tabActivateRequested.connect(this._onTabActivateRequested,this),e.addRequested.connect(this._onTabAddRequested,this),e},t.prototype._createHandle=function(){return this._renderer.createHandle()},t.prototype._onTabMoved=function(){T.postMessage(this,V.LayoutModified)},t.prototype._onCurrentChanged=function(e,i){var r=i.previousTitle,s=i.currentTitle;r&&r.owner.hide(),s&&s.owner.show(),($.IS_EDGE||$.IS_IE)&&T.flush(),T.postMessage(this,V.LayoutModified)},t.prototype._onTabAddRequested=function(e){this._addRequested.emit(e)},t.prototype._onTabActivateRequested=function(e,i){i.title.owner.activate()},t.prototype._onTabCloseRequested=function(e,i){i.title.owner.close()},t.prototype._onTabDetachRequested=function(e,i){var r=this;if(!this._drag){e.releaseMouse();var s=i.title,c=i.tab,d=i.clientX,m=i.clientY,f=new Pe.MimeData,y=function(){return s.owner};f.setData("application/vnd.lumino.widget-factory",y);var x=c.cloneNode(!0);this._drag=new Ce({document:this._document,mimeData:f,dragImage:x,proposedAction:"move",supportedActions:"move",source:this}),c.classList.add("lm-mod-hidden"),c.classList.add("p-mod-hidden");var g=function(){r._drag=null,c.classList.remove("lm-mod-hidden"),c.classList.remove("p-mod-hidden")};this._drag.start(d,m).then(g)}},t}(O);(function(n){var t=function(){function i(){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 i.prototype.show=function(r){var s=this.node.style;s.top=r.top+"px",s.left=r.left+"px",s.right=r.right+"px",s.bottom=r.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"))},i.prototype.hide=function(r){var s=this;if(!this._hidden){if(r<=0){clearTimeout(this._timer),this._timer=-1,this._hidden=!0,this.node.classList.add("lm-mod-hidden"),this.node.classList.add("p-mod-hidden");return}this._timer===-1&&(this._timer=window.setTimeout(function(){s._timer=-1,s._hidden=!0,s.node.classList.add("lm-mod-hidden"),s.node.classList.add("p-mod-hidden")},r))}},i}();n.Overlay=t;var e=function(){function i(){}return i.prototype.createTabBar=function(r){var s=new Xe({document:r});return s.addClass("lm-DockPanel-tabBar"),s.addClass("p-DockPanel-tabBar"),s},i.prototype.createHandle=function(){var r=document.createElement("div");return r.className="lm-DockPanel-handle",r.classList.add("p-DockPanel-handle"),r},i}();n.Renderer=e,n.defaultRenderer=new e})(kn||(kn={}));(function(n){n.GOLDEN_RATIO=.618,n.DEFAULT_EDGES={top:12,right:40,bottom:40,left:40},n.LayoutModified=new We("layout-modified"),n.isGeneratedTabBarProperty=new ie({name:"isGeneratedTabBar",create:function(){return!1}});function t(r){if(r.isEmpty)return{main:null};
1var s=$t(r.widgets()),c=r.selectedWidgets().next(),d=c?s.indexOf(c):-1;return{main:{type:"tab-area",widgets:s,currentIndex:d}}}n.createSingleDocumentConfig=t;function e(r,s,c,d){if(!W.hitTest(r.node,s,c))return{zone:"invalid",target:null};var m=r.layout;if(m.isEmpty)return{zone:"root-all",target:null};if(r.mode==="multiple-document"){var f=r.node.getBoundingClientRect(),y=s-f.left+1,x=c-f.top+1,g=f.right-s,_=f.bottom-c,p=Math.min(x,g,_,y);switch(p){case x:if(x<d.top)return{zone:"root-top",target:null};break;case g:if(g<d.right)return{zone:"root-right",target:null};break;case _:if(_<d.bottom)return{zone:"root-bottom",target:null};break;case y:if(y<d.left)return{zone:"root-left",target:null};break;default:throw"unreachable"}}var b=m.hitTestTabAreas(s,c);if(!b)return{zone:"invalid",target:null};if(r.mode==="single-document")return{zone:"widget-all",target:b};var M=b.x-b.left+1,L=b.y-b.top+1,S=b.left+b.width-b.x,C=b.top+b.height-b.y,k=b.tabBar.node.getBoundingClientRect().height;if(L<k)return{zone:"widget-tab",target:b};var D=Math.round(b.width/3),A=Math.round(b.height/3);if(M>D&&S>D&&L>A&&C>A)return{zone:"widget-all",target:b};M/=D,L/=A,S/=D,C/=A;var l=Math.min(M,L,S,C),v;switch(l){case M:v="widget-left";break;case L:v="widget-top";break;case S:v="widget-right";break;case C:v="widget-bottom";break;default:throw"unreachable"}return{zone:v,target:b}}n.findDropTarget=e;function i(r){return r.titles.length===0?null:r.currentTitle?r.currentTitle.owner:r.titles[r.titles.length-1].owner}n.getDropRef=i})(V||(V={}));Ur=function(){function n(){this._counter=0,this._widgets=[],this._activeWidget=null,this._currentWidget=null,this._numbers=new Map,this._nodes=new Map,this._activeChanged=new H(this),this._currentChanged=new H(this)}return n.prototype.dispose=function(){var t=this;this._counter<0||(this._counter=-1,H.clearData(this),R(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(n.prototype,"currentChanged",{get:function(){return this._currentChanged},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"activeChanged",{get:function(){return this._activeChanged},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isDisposed",{get:function(){return this._counter<0},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"currentWidget",{get:function(){return this._currentWidget},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"activeWidget",{get:function(){return this._activeWidget},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"widgets",{get:function(){return this._widgets},enumerable:!0,configurable:!0}),n.prototype.focusNumber=function(t){var e=this._numbers.get(t);return e===void 0?-1:e},n.prototype.has=function(t){return this._numbers.has(t)},n.prototype.add=function(t){if(!this._numbers.has(t)){var e=t.node.contains(document.activeElement),i=e?this._counter++:-1;this._widgets.push(t),this._numbers.set(t,i),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)}},n.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),E.removeFirstOf(this._widgets,t),this._nodes.delete(t.node),this._numbers.delete(t),this._currentWidget===t)){var i=Zt(this._widgets,function(s){return e._numbers.get(s)!==-1}),r=Qt(i,function(s,c){var d=e._numbers.get(s),m=e._numbers.get(c);return d-m})||null;this._setWidgets(r,null)}},n.prototype.handleEvent=function(t){switch(t.type){case"focus":this._evtFocus(t);break;case"blur":this._evtBlur(t);break}},n.prototype._setWidgets=function(t,e){var i=this._currentWidget;this._currentWidget=t;var r=this._activeWidget;this._activeWidget=e,i!==t&&this._currentChanged.emit({oldValue:i,newValue:t}),r!==e&&this._activeChanged.emit({oldValue:r,newValue:e})},n.prototype._evtFocus=function(t){var e=this._nodes.get(t.currentTarget);e!==this._currentWidget&&this._numbers.set(e,this._counter++),this._setWi
1dgets(e,e)},n.prototype._evtBlur=function(t){var e=this._nodes.get(t.currentTarget),i=t.relatedTarget;if(!i){this._setWidgets(this._currentWidget,null);return}if(!e.node.contains(i)&&!Ne(this._widgets,function(r){return r.node.contains(i)})){this._setWidgets(this._currentWidget,null);return}},n.prototype._onWidgetDisposed=function(t){this.remove(t)},n}(),Ut=function(n){K(t,n);function t(e){e===void 0&&(e={});var i=n.call(this,e)||this;return i._dirty=!1,i._rowSpacing=4,i._columnSpacing=4,i._items=[],i._rowStarts=[],i._columnStarts=[],i._rowSizers=[new Le],i._columnSizers=[new Le],i._box=null,e.rowCount!==void 0&&X.reallocSizers(i._rowSizers,e.rowCount),e.columnCount!==void 0&&X.reallocSizers(i._columnSizers,e.columnCount),e.rowSpacing!==void 0&&(i._rowSpacing=X.clampValue(e.rowSpacing)),e.columnSpacing!==void 0&&(i._columnSpacing=X.clampValue(e.columnSpacing)),i}return t.prototype.dispose=function(){R(this._items,function(e){var i=e.widget;e.dispose(),i.dispose()}),this._box=null,this._items.length=0,this._rowStarts.length=0,this._rowSizers.length=0,this._columnStarts.length=0,this._columnSizers.length=0,n.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"rowCount",{get:function(){return this._rowSizers.length},set:function(e){e!==this.rowCount&&(X.reallocSizers(this._rowSizers,e),this.parent&&this.parent.fit())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"columnCount",{get:function(){return this._columnSizers.length},set:function(e){e!==this.columnCount&&(X.reallocSizers(this._columnSizers,e),this.parent&&this.parent.fit())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rowSpacing",{get:function(){return this._rowSpacing},set:function(e){e=X.clampValue(e),this._rowSpacing!==e&&(this._rowSpacing=e,this.parent&&this.parent.fit())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"columnSpacing",{get:function(){return this._columnSpacing},set:function(e){e=X.clampValue(e),this._columnSpacing!==e&&(this._columnSpacing=e,this.parent&&this.parent.fit())},enumerable:!0,configurable:!0}),t.prototype.rowStretch=function(e){var i=this._rowSizers[e];return i?i.stretch:-1},t.prototype.setRowStretch=function(e,i){var r=this._rowSizers[e];r&&(i=X.clampValue(i),r.stretch!==i&&(r.stretch=i,this.parent&&this.parent.update()))},t.prototype.columnStretch=function(e){var i=this._columnSizers[e];return i?i.stretch:-1},t.prototype.setColumnStretch=function(e,i){var r=this._columnSizers[e];r&&(i=X.clampValue(i),r.stretch!==i&&(r.stretch=i,this.parent&&this.parent.update()))},t.prototype.iter=function(){return Ie(this._items,function(e){return e.widget})},t.prototype.addWidget=function(e){var i=E.findFirstIndex(this._items,function(r){return r.widget===e});i===-1&&(this._items.push(new et(e)),this.parent&&this.attachWidget(e))},t.prototype.removeWidget=function(e){var i=E.findFirstIndex(this._items,function(s){return s.widget===e});if(i!==-1){var r=E.removeAt(this._items,i);this.parent&&this.detachWidget(e),r.dispose()}},t.prototype.init=function(){var e=this;n.prototype.init.call(this),R(this,function(i){e.attachWidget(i)})},t.prototype.attachWidget=function(e){this.parent.isAttached&&T.sendMessage(e,O.Msg.BeforeAttach),this.parent.node.appendChild(e.node),this.parent.isAttached&&T.sendMessage(e,O.Msg.AfterAttach),this.parent.fit()},t.prototype.detachWidget=function(e){this.parent.isAttached&&T.sendMessage(e,O.Msg.BeforeDetach),this.parent.node.removeChild(e.node),this.parent.isAttached&&T.sendMessage(e,O.Msg.AfterDetach),this.parent.fit()},t.prototype.onBeforeShow=function(e){n.prototype.onBeforeShow.call(this,e),this.parent.update()},t.prototype.onBeforeAttach=function(e){n.prototype.onBeforeAttach.call(this,e),this.parent.fit()},t.prototype.onChildShown=function(e){this.parent.fit()},t.prototype.onChildHidden=function(e){this.parent.fit()},t.prototype.onResize=function(e){this.parent.isVisible&&this._update(e.width,e.height)},t.prototype.onUpdateRequest=function(e){this.parent.isVisible&&this._update(-1,-1)},t.prototype.onFitRequest=function(e){this.parent.isAttached&&this._fit()},t.prototype._fit=function(){for(var e=0,i=this.rowCount;e<i;++e)this._rowSizers[e].minSize=0;for(var e=0,i=this.columnCount;e<i;++e)this._columnSizers[e].minSize=0;for(var r=this._items.filter(function(L){return!L.isHidden}),e=0,i=r.length;e<i;++e)r[e].fit();var s=this.rowCount-1,c=this.columnCount-1;r.sort(X.rowSpanCmp);for(var e=0,i=r.length;e<i;++e){var d=r[e],m=t.getCellConfig(d.widget),f=Math.min(m.row,s),y=Math.min(m.row+m.rowSpan-1,s);X.distributeMin(this._rowSizers,f,y,d.minHeight)}r.sort(X.columnSpanCmp);for(var e=0,i=r.length;e<i;++e){var d=r[e],m=t.getCellConfig(d.widget),x=Math.min(m.column,c),g=Math.min(m.column+m.columnSpan-1,c);X.distributeMin(this._columnSizers,x,g,d.minWidth)}if(this.fitPolicy==="set-no-constraint"){T.sendMessage(this.parent,O.Msg.UpdateRequest);return}for(var _=s*this._rowSpacing,p=c*this._columnSpacing,e=0,i=this.rowCount;e<i;++e)_+=this._rowSizers[e].minSize;for(var e=0,i=this.columnCount;e<i;++e)p+=this._columnSizers[e].minSize;var b=this._box=W.boxSizing(this.parent.node);p+=b.horizontalSum,_+=b.verticalSum;var M=this.parent.node.style;M.minWidth=p+"px",M.minHeight=_+"px",this._dirty=!0,this.parent.parent&&T.sendMessage(this.parent.parent,O.Msg.FitRequest),this._dirty&&T.sendMessage(this.parent,O.Msg.UpdateRequest)},t.prototype._update=function(e,i){this._dirty=!1,e<0&&(e=this.parent.node.offsetWidth),i<0&&(i=this.parent.node.offsetHeight),this._box||(this._box=W.boxSizing(this.parent.node));var r=this._box.paddingTop,s=this._box.paddingLeft,c=e-this._box.horizontalSum,d=i-this._box.verticalSum,m=this.rowCount-1,f=this.columnCount-1,y=m*this._rowSpacing,x=f*this._columnSpacing;de.calc(this._rowSizers,Math.max(0,d-y)),de.calc(this._columnSizers,Math.max(0,c-x));for(var g=0,_=r,p=this.rowCount;g<p;++g)this._rowStarts[g]=_,_+=this._rowSizers[g].size+this._rowSpacing;for(var g=0,_=s,p=this.columnCount;g<p;++g)this._columnStarts[g]=_,_+=this._columnSizers[g].size+this._columnSpacing;for(var g=0,p=this._items.length;g<p;++g){var b=this._items[g];if(!b.isHidden){var M=t.getCellConfig(b.widget),L=Math.min(M.row,m),S=Math.min(M.column,f),C=Math.min(M.row+M.rowSpan-1,m),k=Math.min(M.column+M.columnSpan-1,f),D=this._columnStarts[S],A=this._rowStarts[L],l=this._columnStarts[k]+this._columnSizers[k].size-D,v=this._rowStarts[C]+this._rowSizers[C].size-A;b.update(D,A,l,v)}}},t}(ke);(function(n){function t(i){return X.cellConfigProperty.get(i)}n.getCellConfig=t;function e(i,r){X.cellConfigProperty.set(i,X.normalizeConfig(r))}n.setCellConfig=e})(Ut||(Ut={}));(function(n){n.cellConfigProperty=new ie({name:"cellConfig",create:function(){return{row:0,column:0,rowSpan:1,columnSpan:1}},changed:d});function t(m){var f=Math.max(0,Math.floor(m.row||0)),y=Math.max(0,Math.floor(m.column||0)),x=Math.max(1,Math.floor(m.rowSpan||0)),g=Math.max(1,Math.floor(m.columnSpan||0));return{row:f,column:y,rowSpan:x,columnSpan:g}}n.normalizeConfig=t;function e(m){return Math.max(0,Math.floor(m))}n.clampValue=e;function i(m,f){var y=n.cellConfigProperty.get(m.widget),x=n.cellConfigProperty.get(f.widget);return y.rowSpan-x.rowSpan}n.rowSpanCmp=i;function r(m,f){var y=n.cellConfigProperty.get(m.widget),x=n.cellConfigProperty.get(f.widget);return y.columnSpan-x.columnSpan}n.columnSpanCmp=r;function s(m,f){for(f=Math.max(1,Math.floor(f));m.length<f;)m.push(new Le);m.length>f&&(m.length=f)}n.reallocSizers=s;function c(m,f,y,x){if(!(y<f)){if(f===y){var g=m[f];g.minSize=Math.max(g.minSize,x);return}for(var _=0,p=f;p<=y;++p)_+=m[p].minSize;if(!(_>=x))for(var b=(x-_)/(y-f+1),p=f;p<=y;++p)m[p].minSize+=b}}n.distributeMin=c;function d(m){m.parent&&m.parent.layout instanceof Ut&&m.parent.fit()}})(X||(X={}));Dn=function(n){K(t,n);function t(e){e===void 0&&(e={});var i=n.call(this,{node:ft.createNode()})||this;return i._activeIndex=-1,i._tabFocusIndex=0,i._menus=[],i._childMenu=null,i.addClass("lm-MenuBar"),i.addClass("p-MenuBar"),i.setFlag(O.Flag.DisallowLayout),i.renderer=e.renderer||t.defaultRenderer,i._forceItemsPosition=e.forceItemsPosition||{forceX:!0,forceY:!0},i}return t.prototype.dispose=function(){this._closeChildMenu(),this._menus.length=0,n.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"childMenu",{get:function(){return this._childMenu},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"contentNode",{get:function(){return this.node.getElementsByClassName("lm-MenuBar-content")[0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"activeMenu",{get:function(){return this._menus[this._activeIndex]||null},set:function(e){this.activeIndex=e?this._menus.indexOf(e):-1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"activeIndex",{get:function(){return this._activeIndex},set:function(e){(e<0||e>=this._menus.length)&&(e=-1),this._activeIndex!==e&&(this._activeIndex=e,e!==-1&&(this._tabFocusIndex=e),this._activeIndex>=0&&this.contentNode.childNodes[this._activeIndex]&&this.contentNode.childNodes[this._activeIndex].focus(),this.update())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"menus",{get:function(){return this._menus},enumerable:!0,configurable:!0}),t.prototype.openActiveMenu=function(){this._activeIndex!==-1&&(this._openChildMenu(),this._childMenu&&(this._childMenu.activeIndex=-1,this._childMenu.activateNextItem()))},t.prototype.addMenu=function(e){this.insertMenu(this._menus.length,e)},t.prototype.insertMenu=function(e,i){this._closeChildMenu();var r=this._menus.indexOf(i),s=Math.max(0,Math.min(e,this._menus.length));if(r===-1){E.insert(this._menus,s,i),i.addClass("lm-MenuBar-menu"),i.addClass("p-MenuBar-menu"),i.aboutToClose.connect(this._onMenuAboutToClose,this),i.menuRequested.connect(this._onMenuMenuRequested,this),i.title.changed.connect(this._onTitleChanged,this),this.update();return}
1s===this._menus.length&&s--,r!==s&&(E.move(this._menus,r,s),this.update())},t.prototype.removeMenu=function(e){this.removeMenuAt(this._menus.indexOf(e))},t.prototype.removeMenuAt=function(e){this._closeChildMenu();var i=E.removeAt(this._menus,e);i&&(i.aboutToClose.disconnect(this._onMenuAboutToClose,this),i.menuRequested.disconnect(this._onMenuMenuRequested,this),i.title.changed.disconnect(this._onTitleChanged,this),i.removeClass("lm-MenuBar-menu"),i.removeClass("p-MenuBar-menu"),this.update())},t.prototype.clearMenus=function(){if(this._menus.length!==0){this._closeChildMenu();for(var e=0,i=this._menus;e<i.length;e++){var r=i[e];r.aboutToClose.disconnect(this._onMenuAboutToClose,this),r.menuRequested.disconnect(this._onMenuMenuRequested,this),r.title.changed.disconnect(this._onTitleChanged,this),r.removeClass("lm-MenuBar-menu"),r.removeClass("p-MenuBar-menu")}this._menus.length=0,this.update()}},t.prototype.handleEvent=function(e){switch(e.type){case"keydown":this._evtKeyDown(e);break;case"mousedown":this._evtMouseDown(e);break;case"mousemove":this._evtMouseMove(e);break;case"mouseleave":this._evtMouseLeave(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation();break}},t.prototype.onBeforeAttach=function(e){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)},t.prototype.onAfterDetach=function(e){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()},t.prototype.onActivateRequest=function(e){this.isAttached&&(this.activeIndex=0)},t.prototype.onUpdateRequest=function(e){for(var i=this,r=this._menus,s=this.renderer,c=this._activeIndex,d=this._tabFocusIndex>=0&&this._tabFocusIndex<r.length?this._tabFocusIndex:0,m=new Array(r.length),f=function(g,_){var p=r[g].title,b=g===c;b&&r[g].items.length==0&&(b=!1),m[g]=s.renderItem({title:p,active:b,tabbable:g===d,onfocus:function(){i.activeIndex=g}})},y=0,x=r.length;y<x;++y)f(y);ye.render(m,this.contentNode)},t.prototype._evtKeyDown=function(e){var i=e.keyCode;if(i===9){this.activeIndex=-1;return}if(e.preventDefault(),e.stopPropagation(),i===13||i===32||i===38||i===40){this.openActiveMenu();return}if(i===27){this._closeChildMenu(),this.activeIndex=-1,this.node.blur();return}if(i===37){var r=this._activeIndex,s=this._menus.length;this.activeIndex=r===0?s-1:r-1;return}if(i===39){var r=this._activeIndex,s=this._menus.length;this.activeIndex=r===s-1?0:r+1;return}var c=qe().keyForKeydownEvent(e);if(c){var d=this._activeIndex+1,m=ft.findMnemonic(this._menus,c,d);m.index!==-1&&!m.multiple?(this.activeIndex=m.index,this.openActiveMenu()):m.index!==-1?this.activeIndex=m.index:m.auto!==-1&&(this.activeIndex=m.auto)}},t.prototype._evtMouseDown=function(e){if(W.hitTest(this.node,e.clientX,e.clientY)){e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation();var i=E.findFirstIndex(this.contentNode.children,function(s){return W.hitTest(s,e.clientX,e.clientY)});if(i===-1){this._closeChildMenu();return}if(e.button===0)if(this._childMenu)this._closeChildMenu(),this.activeIndex=i;else{var r=this._positionForMenu(i);Ye.saveWindowData(),this.activeIndex=i,this._openChildMenu(r)}}},t.prototype._evtMouseMove=function(e){var i=E.findFirstIndex(this.contentNode.children,function(s){return W.hitTest(s,e.clientX,e.clientY)});if(i!==this._activeIndex&&!(i===-1&&this._childMenu)){var r=this._positionForMenu(i);Ye.saveWindowData(),this.activeIndex=i,this._childMenu&&this._openChildMenu(r)}},t.prototype._positionForMenu=function(e){var i=this.contentNode.children[e],r=i.getBoundingClientRect(),s=r.left,c=r.bottom;return{top:c,left:s}},t.prototype._evtMouseLeave=function(e){this._childMenu||(this.activeIndex=-1)},t.prototype._openChildMenu=function(e){var i;e===void 0&&(e={});var r=this.activeMenu;if(!r){this._closeChildMenu();return}var s=this._childMenu;if(s!==r){this._childMenu=r,s?s.close():document.addEventListener("mousedown",this,
1!0),T.sendMessage(this,O.Msg.UpdateRequest);var c=e.left,d=e.top;(typeof c>"u"||typeof d>"u")&&(i=this._positionForMenu(this._activeIndex),c=i.left,d=i.top),s||(this.addClass("lm-mod-active"),this.addClass("p-mod-active")),r.items.length>0&&r.open(c,d,this._forceItemsPosition)}},t.prototype._closeChildMenu=function(){if(this._childMenu){this.removeClass("lm-mod-active"),this.removeClass("p-mod-active"),document.removeEventListener("mousedown",this,!0);var e=this._childMenu;this._childMenu=null,e.close(),this.activeIndex=-1}},t.prototype._onMenuAboutToClose=function(e){e===this._childMenu&&(this.removeClass("lm-mod-active"),this.removeClass("p-mod-active"),document.removeEventListener("mousedown",this,!0),this._childMenu=null,this.activeIndex=-1)},t.prototype._onMenuMenuRequested=function(e,i){if(e===this._childMenu){var r=this._activeIndex,s=this._menus.length;switch(i){case"next":this.activeIndex=r===s-1?0:r+1;break;case"previous":this.activeIndex=r===0?s-1:r-1;break}this.openActiveMenu()}},t.prototype._onTitleChanged=function(){this.update()},t}(O);(function(n){var t=function(){function e(){}return e.prototype.renderItem=function(i){var r=this.createItemClass(i),s=this.createItemDataset(i),c=this.createItemARIA(i);return F.li(Z({className:r,dataset:s,tabindex:i.tabbable?"0":"-1",onfocus:i.onfocus},c),this.renderIcon(i),this.renderLabel(i))},e.prototype.renderIcon=function(i){var r=this.createIconClass(i);return typeof i.title.icon=="string"?F.div({className:r},i.title.iconLabel):F.div({className:r},i.title.icon,i.title.iconLabel)},e.prototype.renderLabel=function(i){var r=this.formatLabel(i);return F.div({className:"lm-MenuBar-itemLabel p-MenuBar-itemLabel"},r)},e.prototype.createItemClass=function(i){var r="lm-MenuBar-item";return r+=" p-MenuBar-item",i.title.className&&(r+=" "+i.title.className),i.active&&(r+=" lm-mod-active",r+=" p-mod-active"),r},e.prototype.createItemDataset=function(i){return i.title.dataset},e.prototype.createItemARIA=function(i){return{role:"menuitem","aria-haspopup":"true"}},e.prototype.createIconClass=function(i){var r="lm-MenuBar-itemIcon";r+=" p-MenuBar-itemIcon";var s=i.title.iconClass;return s?r+" "+s:r},e.prototype.formatLabel=function(i){var r=i.title,s=r.label,c=r.mnemonic;if(c<0||c>=s.length)return s;var d=s.slice(0,c),m=s.slice(c+1),f=s[c],y=F.span({className:"lm-MenuBar-itemMnemonic p-MenuBar-itemMnemonic"},f);return[d,y,m]},e}();n.Renderer=t,n.defaultRenderer=new t})(Dn||(Dn={}));(function(n){function t(){var i=document.createElement("div"),r=document.createElement("ul");return r.className="lm-MenuBar-content",r.classList.add("p-MenuBar-content"),i.appendChild(r),r.setAttribute("role","menubar"),i}n.createNode=t;function e(i,r,s){for(var c=-1,d=-1,m=!1,f=r.toUpperCase(),y=0,x=i.length;y<x;++y){var g=(y+s)%x,_=i[g].title;if(_.label.length!==0){var p=_.mnemonic;if(p>=0&&p<_.label.length){_.label[p].toUpperCase()===f&&(c===-1?c=g:m=!0);continue}d===-1&&_.label[0].toUpperCase()===f&&(d=g)}}return{index:c,multiple:m,auto:d}}n.findMnemonic=e})(ft||(ft={}));Yr=function(n){K(t,n);function t(e){e===void 0&&(e={});var i=n.call(this,{node:lt.createNode()})||this;return i._onRepeat=function(){if(i._repeatTimer=-1,!!i._pressData){var r=i._pressData.part;if(r!=="thumb"){i._repeatTimer=window.setTimeout(i._onRepeat,20);var s=i._pressData.mouseX,c=i._pressData.mouseY;if(r==="decrement"){if(!W.hitTest(i.decrementNode,s,c))return;i._stepRequested.emit("decrement");return}if(r==="increment"){if(!W.hitTest(i.incrementNode,s,c))return;i._stepRequested.emit("increment");return}if(r==="track"){if(!W.hitTest(i.trackNode,s,c))return;var d=i.thumbNode;if(W.hitTest(d,s,c))return;var m=d.getBoundingClientRect(),f=void 0;i._orientation==="horizontal"?f=s<m.left?"decrement":"increment":f=c<m.top?"decrement":"increment",i._pageRequested.emit(f);return}}}},i._value=0,i._page=10,i._maximum=100,i._repeatTimer=-1,i._pressData=null,i._thumbMoved=new H(i),i._stepRequested=new H(i),i._pageRequested=new H(i),i.addClass("lm-ScrollBar"),i.addClass("p-ScrollBar"),i.setFlag(O.Flag.DisallowLayout),i._orientation=e.orientation||"vertical",i.dataset.orientation=i._orientation,e.maximum!==void 0&&(i._maximum=Math.max(0,e.maximum)),e.page!==void 0&&(i._page=Math.max(0,e.page)),e.value!==void 0&&(i._value=Math.max(0,Math.min(e.value,i._maximum))),i}return Object.defineProperty(t.prototype,"thumbMoved",{get:function(){return this._thumbMoved},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"stepRequested",{get:function(){return this._stepRequested},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pageRequested",{get:function(){return this._pageRequested},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"orientation",{get:function(){return this._orientation},set:function(e){this._orientation!==e&&(this._releaseMouse(),this._orientation=e,this.dataset.orientation=e,this.update())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(e){e=Math.max(0,Math.min(e,this._maximum)),this._value!==e&&(this._value=e,this.update())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"page",{get:function(){return this._page},set:function(e){e=Math.max(0,e),this._page!==e&&(this._page=e,this.update())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maximum",{get:function(){return this._maximum},set:function(e){e=Math.max(0,e),this._maximum!==e&&(this._maximum=e,this._value=Math.min(this._value,e),this.update())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"decrementNode",{get:function(){return this.node.getElementsByClassName("lm-ScrollBar-button")[0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"incrementNode",{get:function(){return this.node.getElementsByClassName("lm-ScrollBar-button")[1]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"trackNode",{get:function(){return this.node.getElementsByClassName("lm-ScrollBar-track")[0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"thumbNode",{get:function(){return this.node.getElementsByClassName("lm-ScrollBar-thumb")[0]},enumerable:!0,configurable:!0}),t.prototype.handleEvent=function(e){switch(e.type){case"mousedown":this._evtMouseDown(e);break;case"mousemove":this._evtMouseMove(e);break;case"mouseup":this._evtMouseUp(e);break;case"keydown":this._evtKeyDown(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation();break}},t.prototype.onBeforeAttach=function(e){this.node.addEventListener("mousedown",this),this.update()},t.prototype.onAfterDetach=function(e){this.node.removeEventListener("mousedown",this),this._releaseMouse()},t.prototype.onUpdateRequest=function(e){var i=this._value*100/this._maximum,r=this._page*100/(this._page+this._maximum);i=Math.max(0,Math.min(i,100)),r=Math.max(0,Math.min(r,100));var s=this.thumbNode.style;this._orientation==="horizontal"?(s.top="",s.height="",s.left=i+"%",s.width=r+"%",s.transform="translate("+-i+"%, 0%)"):(s.left="",s.width="",s.top=i+"%",s.height=r+"%",s.transform="translate(0%, "+-i+"%)")},t.prototype._evtKeyDown=function(e){if(e.preventDefault(),e.stopPropagation(),e.keyCode===27){var i=this._pressData?this._pressData.value:-1;this._releaseMouse(),i!==-1&&this._moveThumb(i)}},t.prototype._evtMouseDown=function(e){if(e.button===0&&(this.activate(),!this._pressData)){var i=lt.findPart(this,e.target);if(i){e.preventDefault(),e.stopPropagation();var r=Ce.overrideCursor("default");if(this._pressData={part:i,override:r,delta:-1,value:-1,mouseX:e.clientX,mouseY:e.clientY},document.addEventListener("mousemove",this,!0),document.addEventListener("mouseup",this,
1!0),document.addEventListener("keydown",this,!0),document.addEventListener("contextmenu",this,!0),i==="thumb"){var s=this.thumbNode,c=s.getBoundingClientRect();this._orientation==="horizontal"?this._pressData.delta=e.clientX-c.left:this._pressData.delta=e.clientY-c.top,s.classList.add("lm-mod-active"),s.classList.add("p-mod-active"),this._pressData.value=this._value;return}if(i==="track"){var c=this.thumbNode.getBoundingClientRect(),d=void 0;this._orientation==="horizontal"?d=e.clientX<c.left?"decrement":"increment":d=e.clientY<c.top?"decrement":"increment",this._repeatTimer=window.setTimeout(this._onRepeat,350),this._pageRequested.emit(d);return}if(i==="decrement"){this.decrementNode.classList.add("lm-mod-active"),this.decrementNode.classList.add("p-mod-active"),this._repeatTimer=window.setTimeout(this._onRepeat,350),this._stepRequested.emit("decrement");return}if(i==="increment"){this.incrementNode.classList.add("lm-mod-active"),this.incrementNode.classList.add("p-mod-active"),this._repeatTimer=window.setTimeout(this._onRepeat,350),this._stepRequested.emit("increment");return}}}},t.prototype._evtMouseMove=function(e){if(this._pressData&&(e.preventDefault(),e.stopPropagation(),this._pressData.mouseX=e.clientX,this._pressData.mouseY=e.clientY,this._pressData.part==="thumb")){var i=this.thumbNode.getBoundingClientRect(),r=this.trackNode.getBoundingClientRect(),s,c;this._orientation==="horizontal"?(s=e.clientX-r.left-this._pressData.delta,c=r.width-i.width):(s=e.clientY-r.top-this._pressData.delta,c=r.height-i.height);var d=c===0?0:s*this._maximum/c;this._moveThumb(d)}},t.prototype._evtMouseUp=function(e){e.button===0&&(e.preventDefault(),e.stopPropagation(),this._releaseMouse())},t.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"))},t.prototype._moveThumb=function(e){e=Math.max(0,Math.min(e,this._maximum)),this._value!==e&&(this._value=e,this.update(),this._thumbMoved.emit(e))},t}(O);(function(n){function t(){var i=document.createElement("div"),r=document.createElement("div"),s=document.createElement("div"),c=document.createElement("div"),d=document.createElement("div");return r.className="lm-ScrollBar-button",s.className="lm-ScrollBar-button",r.dataset.action="decrement",s.dataset.action="increment",c.className="lm-ScrollBar-track",d.className="lm-ScrollBar-thumb",r.classList.add("p-ScrollBar-button"),s.classList.add("p-ScrollBar-button"),c.classList.add("p-ScrollBar-track"),d.classList.add("p-ScrollBar-thumb"),c.appendChild(d),i.appendChild(r),i.appendChild(c),i.appendChild(s),i}n.createNode=t;function e(i,r){return i.thumbNode.contains(r)?"thumb":i.trackNode.contains(r)?"track":i.decrementNode.contains(r)?"decrement":i.incrementNode.contains(r)?"increment":null}n.findPart=e})(lt||(lt={}));Xr=function(n){K(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e._widget=null,e}return t.prototype.dispose=function(){if(this._widget){var e=this._widget;this._widget=null,e.dispose()}n.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"widget",{get:function(){return this._widget},set:function(e){e&&(e.parent=this.parent),this._widget!==e&&(this._widget&&this._widget.dispose(),this._widget=e,this.parent&&e&&this.attachWidget(e))},enumerable:!0,configurable:!0}),t.prototype.iter=function(){return this._widget?Ge(this._widget):_e()},t.prototype.removeWidget=function(e){this._widget===e&&(this._widget=null,this.parent&&this.detachWidget(e))},t.prototype.init=function(){var e=this;n.prototype.init.call(this),R(this,function(i){e.attachWidget(i)})},t.prototype.attachWidget=function(e){this.parent.isAttached&&T.sendMessage(e,O.Msg.BeforeAttach),this.parent.node.appendChild(e.node),this.parent.isAttached&&T.sendMessage(e,O.Msg.AfterAttach)},t.prototype.detachWidget=function(e){this.parent.isAttached&&T.sendMessage(e,O.Msg.BeforeDetach),this.parent.node.removeChild(e.node),this.parent.isAttached&&T.sendMessage(e,O.Msg.AfterDetach)},t}(ke),Gn=function(n){K(t,n);function t(e){e===void 0&&(e={});var i=n.call(this,e)||this;return i._dirty=!1,i._items=[],i._box=null,i._hiddenMode=e.hiddenMode!==void 0?e.hiddenMode:O.HiddenMode.Display,i}return Object.defineProperty(t.prototype,"hiddenMode",{get:function(){return this._hiddenMode},set:function(e){var i=this;this._hiddenMode!==e&&(this._hiddenMode=e,this.widgets.length>
11&&this.widgets.forEach(function(r){r.hiddenMode=i._hiddenMode}))},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){R(this._items,function(e){e.dispose()}),this._box=null,this._items.length=0,n.prototype.dispose.call(this)},t.prototype.attachWidget=function(e,i){this._hiddenMode===O.HiddenMode.Scale&&this._items.length>0?(this._items.length===1&&(this.widgets[0].hiddenMode=O.HiddenMode.Scale),i.hiddenMode=O.HiddenMode.Scale):i.hiddenMode=O.HiddenMode.Display,E.insert(this._items,e,new et(i)),this.parent.isAttached&&T.sendMessage(i,O.Msg.BeforeAttach),this.parent.node.appendChild(i.node),this.parent.isAttached&&T.sendMessage(i,O.Msg.AfterAttach),this.parent.fit()},t.prototype.moveWidget=function(e,i,r){E.move(this._items,e,i),this.parent.update()},t.prototype.detachWidget=function(e,i){var r=E.removeAt(this._items,e);this.parent.isAttached&&T.sendMessage(i,O.Msg.BeforeDetach),this.parent.node.removeChild(i.node),this.parent.isAttached&&T.sendMessage(i,O.Msg.AfterDetach),r.widget.node.style.zIndex="",this._hiddenMode===O.HiddenMode.Scale&&(i.hiddenMode=O.HiddenMode.Display,this._items.length===1&&(this._items[0].widget.hiddenMode=O.HiddenMode.Display)),r.dispose(),this.parent.fit()},t.prototype.onBeforeShow=function(e){n.prototype.onBeforeShow.call(this,e),this.parent.update()},t.prototype.onBeforeAttach=function(e){n.prototype.onBeforeAttach.call(this,e),this.parent.fit()},t.prototype.onChildShown=function(e){this.parent.fit()},t.prototype.onChildHidden=function(e){this.parent.fit()},t.prototype.onResize=function(e){this.parent.isVisible&&this._update(e.width,e.height)},t.prototype.onUpdateRequest=function(e){this.parent.isVisible&&this._update(-1,-1)},t.prototype.onFitRequest=function(e){this.parent.isAttached&&this._fit()},t.prototype._fit=function(){for(var e=0,i=0,r=0,s=this._items.length;r<s;++r){var c=this._items[r];c.isHidden||(c.fit(),e=Math.max(e,c.minWidth),i=Math.max(i,c.minHeight))}var d=this._box=W.boxSizing(this.parent.node);e+=d.horizontalSum,i+=d.verticalSum;var m=this.parent.node.style;m.minWidth=e+"px",m.minHeight=i+"px",this._dirty=!0,this.parent.parent&&T.sendMessage(this.parent.parent,O.Msg.FitRequest),this._dirty&&T.sendMessage(this.parent,O.Msg.UpdateRequest)},t.prototype._update=function(e,i){this._dirty=!1;for(var r=0,s=0,c=this._items.length;s<c;++s)r+=+!this._items[s].isHidden;if(r!==0){e<0&&(e=this.parent.node.offsetWidth),i<0&&(i=this.parent.node.offsetHeight),this._box||(this._box=W.boxSizing(this.parent.node));for(var d=this._box.paddingTop,m=this._box.paddingLeft,f=e-this._box.horizontalSum,y=i-this._box.verticalSum,s=0,c=this._items.length;s<c;++s){var x=this._items[s];x.isHidden||(x.widget.node.style.zIndex=""+s,x.update(m,d,f,y))}}},t}(pt),$n=function(n){K(t,n);function t(e){e===void 0&&(e={});var i=n.call(this,{layout:Yt.createLayout(e)})||this;return i._widgetRemoved=new H(i),i.addClass("lm-StackedPanel"),i.addClass("p-StackedPanel"),i}return Object.defineProperty(t.prototype,"hiddenMode",{get:function(){return this.layout.hiddenMode},set:function(e){this.layout.hiddenMode=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"widgetRemoved",{get:function(){return this._widgetRemoved},enumerable:!0,configurable:!0}),t.prototype.onChildAdded=function(e){e.child.addClass("lm-StackedPanel-child"),e.child.addClass("p-StackedPanel-child")},t.prototype.onChildRemoved=function(e){e.child.removeClass("lm-StackedPanel-child"),e.child.removeClass("p-StackedPanel-child"),this._widgetRemoved.emit(e.child)},t}(Xt);(function(n){function t(e){return e.layout||new Gn}n.createLayout=t})(Yt||(Yt={}));Gr=function(n){K(t,n);function t(e){e===void 0&&(e={});var i=n.call(this)||this;i._currentChanged=new H(i),i._addRequested=new H(i),i.addClass("lm-TabPanel"),i.addClass("p-TabPanel"),i.tabBar=new Xe(e),i.tabBar.addClass("lm-TabPanel-tabBar"),i.stackedPanel=new $n,i.stackedPanel.addClass("lm-TabPanel-stackedPanel"),i.tabBar.addClass("p-TabPanel-tabBar"),i.stackedPanel.addClass("p-TabPanel-stackedPanel"),i.tabBar.tabMoved.connect(i._onTabMoved,i),i.tabBar.currentChanged.connect(i._onCurrentChanged,i),i.tabBar.tabCloseRequested.connect(i._onTabCloseRequested,i),i.tabBar.tabActivateRequested.connect(i._onTabActivateRequested,i),i.tabBar.addRequested.connect(i._onTabAddRequested,i),i.stackedPanel.widgetRemoved.connect(i._onWidgetRemoved,i),i._tabPlacement=e.tabPlacement||"top";var r=Ue.directionFromPlacement(i._tabPlacement),s=Ue.orientationFromPlacement(i._tabPlacement);i.tabBar.orientation=s,i.tabBar.dataset.placement=i._tabPlacement;var c=new ve({direction:r,spacing:0});return ve.setStretch(i.tabBar,0),ve.setStretch(i.stackedPanel,1),c.addWidget(i.tabBar),c.addWidget(i.stackedPanel),i.layout=c,i}return Object.defineProperty(t.prototype,"currentChanged",{get:function(){return this._currentChanged},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentIndex",{get:function(){return this.tabBar.currentIndex},set:function(e){this.tabBar.currentIndex=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentWidget",{get:function(){var e=this.tabBar.currentTitle;return e?e.owner:null},set:function(e){this.tabBar.currentTitle=e?e.title:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tabsMovable",{get:function(){return this.tabBar.tabsMovable},set:function(e){this.tabBar.tabsMovable=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"addButtonEnabled",{get:function(){return this.tabBar.addButtonEnabled},set:function(e){this.tabBar.addButtonEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tabPlacement",{get:function(){return this._tabPlacement},set:function(e){if(this._tabPlacement!==e){this._tabPlacement=e;var i=Ue.directionFromPlacement(e),r=Ue.orientationFromPlacement(e);this.tabBar.orientation=r,this.tabBar.dataset.placement=e,this.layout.direction=i}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"addRequested",{get:function(){return this._addRequested},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"widgets",{get:function(){return this.stackedPanel.widgets},enumerable:!0,configurable:!0}),t.prototype.addWidget=function(e){this.insertWidget(this.widgets.length,e)},t.prototype.insertWidget=function(e,i){i!==this.currentWidget&&i.hide(),this.stackedPanel.insertWidget(e,i),this.tabBar.insertTab(e,i.title),i.node.setAttribute("role","tabpanel");var r=this.tabBar.renderer;if(r instanceof Xe.Renderer){var s=r.createTabKey({title:i.title,current:!1,zIndex:0});i.node.setAttribute("aria-labelledby",s)}},t.prototype._onCurrentChanged=function(e,i){var r=i.previousIndex,s=i.previousTitle,c=i.currentIndex,d=i.currentTitle,m=s?s.owner:null,f=d?d.owner:null;m&&m.hide(),f&&f.show(),this._currentChanged.emit({previousIndex:r,previousWidget:m,currentIndex:c,currentWidget:f}),($.IS_EDGE||$.IS_IE)&&T.flush()},t.prototype._onTabAddRequested=function(e,i){this._addRequested.emit(e)},t.prototype._onTabActivateRequested=function(e,i){i.title.owner.activate()},t.prototype._onTabCloseRequested=function(e,i){i.title.owner.close()},t.prototype._onTabMoved=function(e,i){this.stackedPanel.insertWidget(i.toIndex,i.title.owner)},t.prototype._onWidgetRemoved=function(e,i){i.node.removeAttribute("role"),i.node.removeAttribute("aria-labelledby"),this.tabBar.removeTab(i.title)},t}(O);(function(n){function t(s){return i[s]}n.orientationFromPlacement=t;function e(s){return r[s]}n.directionFromPlacement=e;var i={top:"horizontal",left:"vertical",right:"vertical",bottom:"horizontal"},r={top:"top-to-bottom",left:"left-to-right",right:"right-to-left",bottom:"bottom-to-top"}})(Ue||(Ue={}))});export{T as a,hn as b,O as c,pt as d,Xt as e,Xe as f,Zn as g}; 2/*! Bundled license information: 3 4@lumino/messaging/dist/index.es6.js: 5 (*! ***************************************************************************** 6 Copyright (c) Microsoft Corporation. 7 8 Permission to use, copy, modify, and/or distribute this software for any 9 purpose with or without fee is hereby granted. 10
11 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 12 REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 13 AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 14 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 15 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 16 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17 PERFORMANCE OF THIS SOFTWARE. 18 ***************************************************************************** *) 19 20@lumino/disposable/dist/index.es6.js: 21 (*! ***************************************************************************** 22 Copyright (c) Microsoft Corporation. 23 24 Permission to use, copy, modify, and/or distribute this software for any 25 purpose with or without fee is hereby granted. 26 27 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 28 REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 29 AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 30 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 31 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 32 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 33 PERFORMANCE OF THIS SOFTWARE. 34 ***************************************************************************** *) 35 36@lumino/disposable/dist/index.es6.js: 37 (*! ***************************************************************************** 38 Copyright (c) Microsoft Corporation. 39 40 Permission to use, copy, modify, and/or distribute this software for any 41 purpose with or without fee is hereby granted. 42 43 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 44 REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 45 AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 46 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 47 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 48 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 49 PERFORMANCE OF THIS SOFTWARE. 50 ***************************************************************************** *) 51 52@lumino/commands/dist/index.es6.js: 53 (*! ***************************************************************************** 54 Copyright (c) Microsoft Corporation. 55 56 Permission to use, copy, modify, and/or distribute this software for any 57 purpose with or without fee is hereby granted. 58 59 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 60 REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 61 AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 62 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 63 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 64 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 65 PERFORMANCE OF THIS SOFTWARE. 66 ***************************************************************************** *) 67 68@lumino/virtualdom/dist/index.es6.js: 69 (*! ***************************************************************************** 70 Copyright (c) Microsoft Corporation. 71 72 Permission to use, copy, modify, and/or distribute this software for any 73 purpose with or without fee is hereby granted. 74 75 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 76 REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 77 AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 78 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 79 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 80 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 81 PERFORMANCE OF THIS SOFTWARE. 82 ***************************************************************************** *) 83 84@lumino/widgets/dist/index.es6.js: 85 (*! ***************************************************************************** 86 Copyright (c) Microsoft Corporation. 87 88 Permission to use, copy, modify, and/or distribute this software for any 89 purpose with or without fee is hereby granted. 90
91 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 92 REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 93 AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 94 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 95 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 96 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 97 PERFORMANCE OF THIS SOFTWARE. 98 ***************************************************************************** *) 99*/
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.