@galaxyproject/jupyterlite 0.0.21 → 0.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/static/dist/_output/config-utils.js +1 -1
- package/static/dist/_output/extensions/jl-galaxy/extension.js +1 -1
- package/static/dist/_output/jupyter-lite.json +1 -1
- package/static/dist/_output/pypi/gxy-0.0.0-py3-none-any.whl +0 -0
- package/static/dist/_output/pypi/pyparsing-3.3.0-py3-none-any.whl +0 -0
- package/static/dist/_output/pypi/pyparsing-3.2.5-py3-none-any.whl +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see extension.js.LICENSE.txt */
|
|
2
|
-
var __webpack_modules__={121:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Text=void 0,function(e){e.jsIndexToCharIndex=function(e,t){return e},e.charIndexToJsIndex=function(e,t){return e},e.camelCase=function(e,t=!1){return e.replace(/^(\w)|[\s-_:]+(\w)/g,function(e,n,i){return i?i.toUpperCase():t?n.toUpperCase():n.toLowerCase()})},e.titleCase=function(e){return(e||"").toLowerCase().split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}}(n||(t.Text=n={}))},139:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ServiceManager=void 0;const i=n(6903),s=n(4816),r=n(7375),o=n(1091),a=n(4272),l=n(6807),c=n(3892),d=n(1089),u=n(6923),h=n(5399),p=n(7569),m=n(8430),f=n(362);t.ServiceManager=class{constructor(e={}){var t,n;this._isDisposed=!1,this._connectionFailure=new i.Signal(this),this._isReady=!1;const g=e.defaultDrive,v=null!==(t=e.serverSettings)&&void 0!==t?t:d.ServerConnection.makeSettings(),_={defaultDrive:g,serverSettings:v,standby:null!==(n=e.standby)&&void 0!==n?n:"when-hidden"};this.serverSettings=v,this.contents=e.contents||new r.ContentsManager(_),this.events=e.events||new o.EventManager(_),this.kernels=e.kernels||new a.KernelManager(_),this.sessions=e.sessions||new u.SessionManager({..._,kernelManager:this.kernels}),this.settings=e.settings||new h.SettingManager(_),this.terminals=e.terminals||new p.TerminalManager(_),this.builder=e.builder||new s.BuildManager(_),this.workspaces=e.workspaces||new f.WorkspaceManager(_),this.nbconvert=e.nbconvert||new c.NbConvertManager(_),this.kernelspecs=e.kernelspecs||new l.KernelSpecManager(_),this.user=e.user||new m.UserManager(_),this.kernelspecs.connectionFailure.connect(this._onConnectionFailure,this),this.sessions.connectionFailure.connect(this._onConnectionFailure,this),this.terminals.connectionFailure.connect(this._onConnectionFailure,this);const b=[this.sessions.ready,this.kernelspecs.ready];this.terminals.isAvailable()&&b.push(this.terminals.ready),this._readyPromise=Promise.all(b).then(()=>{this._isReady=!0})}get connectionFailure(){return this._connectionFailure}get isDisposed(){return this._isDisposed}dispose(){this.isDisposed||(this._isDisposed=!0,i.Signal.clearData(this),this.contents.dispose(),this.events.dispose(),this.sessions.dispose(),this.terminals.dispose())}get isReady(){return this._isReady}get ready(){return this._readyPromise}_onConnectionFailure(e,t){this._connectionFailure.emit(t)}}},321:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.KernelSpecAPIClient=void 0,t.getSpecs=a;const i=n(1089),s=n(9237),r=n(6376),o="api/kernelspecs";async function a(e=i.ServerConnection.makeSettings()){const t=r.URLExt.join(e.baseUrl,o),n=await i.ServerConnection.makeRequest(t,{},e);if(200!==n.status)throw await i.ServerConnection.ResponseError.create(n);const a=await n.json();return(0,s.validateSpecModels)(a)}t.KernelSpecAPIClient=class{constructor(e={}){var t;this.serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:i.ServerConnection.makeSettings()}async get(){return a(this.serverSettings)}}},362:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceManager=void 0;const i=n(6376),s=n(9531),r=n(1089);class o extends s.DataConnector{constructor(e={}){var t;super(),this.serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:r.ServerConnection.makeSettings()}async fetch(e){const{serverSettings:t}=this,{baseUrl:n,appUrl:i}=t,{makeRequest:s,ResponseError:o}=r.ServerConnection,l=n+i,c=a.url(l,e),d=await s(c,{},t);if(200!==d.status)throw await o.create(d);return d.json()}async list(){const{serverSettings:e}=this,{baseUrl:t,appUrl:n}=e,{makeRequest:i,ResponseError:s}=r.ServerConnection,o=t+n,l=a.url(o,""),c=await i(l,{},e);if(200!==c.status)throw await s.create(c);return(await c.json()).workspaces}async remove(e){const{serverSettings:t}=this,{baseUrl:n,appUrl:i}=t,{makeRequest:s,ResponseError:o}=r.ServerConnection,l=n+i,c=a.url(l,e),d=await s(c,{method:"DELETE"},t);if(204!==d.status)throw await o.create(d)}async save(e,t){const{serverSettings:n}=this,{baseUrl:i,appUrl:s}=n,{makeRequest:o,ResponseError:l}=r.ServerConnection,c=i+s,d=a.url(c,e),u={body:JSON.stringify(t),method:"PUT"},h=await o(d,u,n);if(204!==h.status)throw await l.create(h)}}var a;t.WorkspaceManager=o,function(e){e.url=function(e,t){const n=i.URLExt.join(e,"api/workspaces"),s=i.URLExt.join(n,t);if(!s.startsWith(n))throw new Error("Can only be used for workspaces requests");return s}}(a||(a={}))},608:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,s)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),s=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),s(n(5412),t),s(n(9851),t),s(n(2304),t),s(n(7375),t),s(n(1091),t),s(n(4272),t),s(n(6807),t),s(n(139),t),s(n(1089),t),s(n(6923),t),s(n(5399),t),s(n(7569),t),s(n(856),t),s(n(8430),t),s(n(362),t),s(n(3892),t)},637:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SessionAPIClient=t.SESSION_SERVICE_URL=void 0,t.listRunning=o,t.getSessionUrl=a,t.shutdownSession=l,t.getSessionModel=c,t.startSession=d,t.updateSession=u;const i=n(1089),s=n(6376),r=n(1521);async function o(e=i.ServerConnection.makeSettings()){const n=s.URLExt.join(e.baseUrl,t.SESSION_SERVICE_URL),o=await i.ServerConnection.makeRequest(n,{},e);if(200!==o.status)throw await i.ServerConnection.ResponseError.create(o);const a=await o.json();if(!Array.isArray(a))throw new Error("Invalid Session list");return a.forEach(e=>{(0,r.updateLegacySessionModel)(e),(0,r.validateModel)(e)}),a}function a(e,n){const i=s.URLExt.join(e,t.SESSION_SERVICE_URL),r=s.URLExt.join(i,n);if(!r.startsWith(i))throw new Error("Can only be used for services requests");return r}async function l(e,t=i.ServerConnection.makeSettings()){var n;const s=a(t.baseUrl,e),r=await i.ServerConnection.makeRequest(s,{method:"DELETE"},t);if(404===r.status){const t=null!==(n=(await r.json()).message)&&void 0!==n?n:`The session "${e}"" does not exist on the server`;console.warn(t)}else{if(410===r.status)throw new i.ServerConnection.ResponseError(r,"The kernel was deleted but the session was not");if(204!==r.status)throw await i.ServerConnection.ResponseError.create(r)}}async function c(e,t=i.ServerConnection.makeSettings()){const n=a(t.baseUrl,e),s=await i.ServerConnection.makeRequest(n,{},t);if(200!==s.status)throw await i.ServerConnection.ResponseError.create(s);const o=await s.json();return(0,r.updateLegacySessionModel)(o),(0,r.validateModel)(o),o}async function d(e,n=i.ServerConnection.makeSettings()){const o=s.URLExt.join(n.baseUrl,t.SESSION_SERVICE_URL),a={method:"POST",body:JSON.stringify(e)},l=await i.ServerConnection.makeRequest(o,a,n);if(201!==l.status)throw await i.ServerConnection.ResponseError.create(l);const c=await l.json();return(0,r.updateLegacySessionModel)(c),(0,r.validateModel)(c),c}async function u(e,t=i.ServerConnection.makeSettings()){const n=a(t.baseUrl,e.id),s={method:"PATCH",body:JSON.stringify(e)},o=await i.ServerConnection.makeRequest(n,s,t);if(200!==o.status)throw await i.ServerConnection.ResponseError.create(o);const l=await o.json();return(0,r.updateLegacySessionModel)(l),(0,r.validateModel)(l),l}t.SESSION_SERVICE_URL="api/sessions",t.SessionAPIClient=class{constructor(e){var t;this.serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:i.ServerConnection.makeSettings()}async listRunning(){return o(this.serverSettings)}async getModel(e){return c(e,this.serverSettings)}async startNew(e){return d(e,this.serverSettings)}async shutdown(e){return l(e,this.serverSettings)}async update(e){return u(e,this.serverSettings)}}},785:(e,t,n)=>{n.r(t),n.d(t,{DisposableDelegate:()=>s,DisposableSet:()=>o,ObservableDisposableDelegate:()=>r,ObservableDisposableSet:()=>a});var i=n(6903);class s{constructor(e){this._fn=e}get isDisposed(){return!this._fn}dispose(){if(!this._fn)return;let e=this._fn;this._fn=null,e()}}class r extends s{constructor(){super(...arguments),this._disposed=new i.Signal(this)}get disposed(){return this._disposed}dispose(){this.isDisposed||(super.dispose(),this._disposed.emit(void 0),i.Signal.clearData(this))}}class o{constructor(){this._isDisposed=!1,this._items=new Set}get isDisposed(){return this._isDisposed}dispose(){this._isDisposed||(this._isDisposed=!0,this._items.forEach(e=>{e.dispose()}),this._items.clear())}contains(e){return this._items.has(e)}add(e){this._items.add(e)}remove(e){this._items.delete(e)}clear(){this._items.clear()}}!function(e){e.from=function(t){let n=new e;for(const e of t)n.add(e);return n}}(o||(o={}));class a extends o{constructor(){super(...arguments),this._disposed=new i.Signal(this)}get disposed(){return this._disposed}dispose(){this.isDisposed||(super.dispose(),this._disposed.emit(void 0),i.Signal.clearData(this))}}!function(e){e.from=function(t){let n=new e;for(const e of t)n.add(e);return n}}(a||(a={}))},856:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.IWorkspaceManager=t.IUserManager=t.ITerminalManager=t.IServiceManager=t.ISettingManager=t.ISessionManager=t.IServerSettings=t.INbConvertManager=t.IKernelSpecManager=t.IKernelManager=t.IEventManager=t.IDefaultDrive=t.IDefaultContentProvider=t.IContentsManager=t.IConfigSectionManager=t.IConnectionStatus=void 0;const i=n(5899);t.IConnectionStatus=new i.Token("@jupyterlab/application:IConnectionStatus","A service providing the application connection status."),t.IConfigSectionManager=new i.Token("@jupyterlab/services:IConfigSectionManager","A service providing the config section manager."),t.IContentsManager=new i.Token("@jupyterlab/services:IContentsManager","The contents manager token."),t.IDefaultContentProvider=new i.Token("@jupyterlab/services:IDefaultContentProvider","The default content provider for the contents manager."),t.IDefaultDrive=new i.Token("@jupyterlab/services:IDefaultDrive","The default drive for the contents manager."),t.IEventManager=new i.Token("@jupyterlab/services:IEventManager","The event manager token."),t.IKernelManager=new i.Token("@jupyterlab/services:IKernelManager","The kernel manager token."),t.IKernelSpecManager=new i.Token("@jupyterlab/services:IKernelSpecManager","The kernel spec manager token."),t.INbConvertManager=new i.Token("@jupyterlab/services:INbConvertManager","The nbconvert manager token."),t.IServerSettings=new i.Token("@jupyterlab/services:IServerSettings","The server settings for the application."),t.ISessionManager=new i.Token("@jupyterlab/services:ISessionManager","The session manager token."),t.ISettingManager=new i.Token("@jupyterlab/services:ISettingManager","The setting manager token."),t.IServiceManager=new i.Token("@jupyterlab/services:IServiceManager","The service manager for the application."),t.ITerminalManager=new i.Token("@jupyterlab/services:ITerminalManager","The terminal manager token."),t.IUserManager=new i.Token("@jupyterlab/services:IUserManager","The user manager token."),t.IWorkspaceManager=new i.Token("@jupyterlab/services:IWorkspaceManager","The workspace manager token.")},961:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UserManager=void 0;const i=n(5899),s=n(8534),r=n(6903),o=n(5412),a=n(4320),l="@jupyterlab/services:UserManager#user";class c extends o.BaseManager{constructor(e={}){var t,n;super(e),this._isReady=!1,this._userChanged=new r.Signal(this),this._connectionFailure=new r.Signal(this),this._userApiClient=null!==(t=e.userApiClient)&&void 0!==t?t:new a.UserAPIClient({serverSettings:this.serverSettings}),this._ready=this.requestUser().then(()=>{this.isDisposed||(this._isReady=!0)}).catch(e=>new Promise(()=>{})),this._pollUser=new s.Poll({auto:!1,factory:()=>this.requestUser(),frequency:{interval:61e3,backoff:!0,max:3e5},name:l,standby:null!==(n=e.standby)&&void 0!==n?n:"when-hidden"}),this.ready.then(()=>{this._pollUser.start()})}get isReady(){return this._isReady}get ready(){return this._ready}get identity(){return this._identity}get permissions(){return this._permissions}get userChanged(){return this._userChanged}get connectionFailure(){return this._connectionFailure}dispose(){this._pollUser.dispose(),super.dispose()}async refreshUser(){await this._pollUser.refresh(),await this._pollUser.tick}async requestUser(){if(this.isDisposed)return;const e={identity:this._identity,permissions:this._permissions},t=await this._userApiClient.get(),n=t.identity,{localStorage:s}=window,r=s.getItem(l);if(r&&(!n.initials||!n.color)){const e=JSON.parse(r);n.initials=n.initials||e.initials||n.name.substring(0,1),n.color=n.color||e.color||d.getRandomColor()}i.JSONExt.deepEqual(t,e)||(this._identity=n,this._permissions=t.permissions,s.setItem(l,JSON.stringify(n)),this._userChanged.emit(t))}}var d;t.UserManager=c,function(e){const t=["var(--jp-collaborator-color1)","var(--jp-collaborator-color2)","var(--jp-collaborator-color3)","var(--jp-collaborator-color4)","var(--jp-collaborator-color5)","var(--jp-collaborator-color6)","var(--jp-collaborator-color7)"];e.getRandomColor=()=>t[Math.floor(Math.random()*t.length)]}(d||(d={}))},1089:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ServerConnection=void 0;const i=n(6376),s=n(3962);let r;var o,a;r="undefined"==typeof window?n(4396):WebSocket,function(e){e.makeSettings=function(e){return a.makeSettings(e)},e.makeRequest=function(e,t,n){return a.handleRequest(e,t,n)};class t extends Error{static async create(e){try{const n=await e.json(),{message:i,traceback:s}=n;return s&&console.error(s),new t(e,null!=i?i:t._defaultMessage(e),null!=s?s:"")}catch(n){return console.debug(n),new t(e)}}constructor(e,n=t._defaultMessage(e),i=""){super(n),this.response=e,this.traceback=i}static _defaultMessage(e){return`Invalid response: ${e.status} ${e.statusText}`}}e.ResponseError=t;class n extends TypeError{constructor(e){super(e.message),this.stack=e.stack}}e.NetworkError=n}(o||(t.ServerConnection=o={})),function(e){e.makeSettings=function(e={}){var t;const n=i.PageConfig.getBaseUrl(),o=i.PageConfig.getWsUrl(),a=i.URLExt.normalize(e.baseUrl)||n;let l=e.wsUrl;l||a!==n||(l=o),l||0!==a.indexOf("http")||(l="ws"+a.slice(4)),l=null!=l?l:o;const c=i.PageConfig.getOption("appendToken").toLowerCase();let d;return d=""===c?"undefined"==typeof window||"undefined"!=typeof process&&void 0!==(null===(t=null===process||void 0===process?void 0:process.env)||void 0===t?void 0:t.JEST_WORKER_ID)||i.URLExt.getHostName(n)!==i.URLExt.getHostName(l):"true"===c,{init:{cache:"no-store",credentials:"same-origin"},fetch,Headers,Request,WebSocket:r,token:i.PageConfig.getToken(),appUrl:i.PageConfig.getOption("appUrl"),appendToken:d,serializer:{serialize:s.serialize,deserialize:s.deserialize},...e,baseUrl:a,wsUrl:l}},e.handleRequest=function(e,t,n){var i;if(0!==e.indexOf(n.baseUrl))throw new Error("Can only be used for notebook server requests");"no-store"===(null!==(i=t.cache)&&void 0!==i?i:n.init.cache)&&(e+=(/\?/.test(e)?"&":"?")+(new Date).getTime());const s=new n.Request(e,{...n.init,...t});let r=!1;if(n.token&&(r=!0,s.headers.append("Authorization",`token ${n.token}`)),"undefined"!=typeof document){const e=function(){let e="";try{e=document.cookie}catch(e){return}const t=e.match("\\b_xsrf=([^;]*)\\b");return null==t?void 0:t[1]}();void 0!==e&&(r=!0,s.headers.append("X-XSRFToken",e))}return!s.headers.has("Content-Type")&&r&&s.headers.set("Content-Type","application/json"),n.fetch.call(null,s).catch(e=>{throw new o.NetworkError(e)})}}(a||(a={}))},1091:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EventManager=void 0;const i=n(6376),s=n(8534),r=n(6903),o=n(1089),a="api/events";t.EventManager=class{constructor(e={}){var t,n;this._socket=null,this.serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:o.ServerConnection.makeSettings(),this._poll=new s.Poll({factory:()=>this._subscribe(),standby:null!==(n=e.standby)&&void 0!==n?n:"when-hidden"}),this._stream=new r.Stream(this),this._poll.start()}get isDisposed(){return this._poll.isDisposed}get stream(){return this._stream}dispose(){if(this.isDisposed)return;this._poll.dispose();const e=this._socket;e&&(this._socket=null,e.onopen=()=>{},e.onerror=()=>{},e.onmessage=()=>{},e.onclose=()=>{},e.close()),r.Signal.clearData(this),this._stream.stop()}async emit(e){const{serverSettings:t}=this,{baseUrl:n}=t,{makeRequest:s,ResponseError:r}=o.ServerConnection,l=i.URLExt.join(n,a),c={body:JSON.stringify(e),method:"POST"},d=await s(l,c,t);if(204!==d.status)throw new r(d)}_subscribe(){return new Promise((e,t)=>{if(this.isDisposed)return;const{appendToken:n,token:s,WebSocket:r,wsUrl:o}=this.serverSettings;let l=i.URLExt.join(o,a,"subscribe");n&&""!==s&&(l+=`?token=${encodeURIComponent(s)}`);const c=this._socket=new r(l),d=this._stream;c.onclose=()=>t(new Error("EventManager socket closed")),c.onmessage=e=>e.data&&d.emit(JSON.parse(e.data))})}}},1160:(e,t,n)=>{var i=n(2063),s=n(3992),r=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,o=/[\n\r\t]/g,a=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,l=/:\d+$/,c=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,d=/^[a-zA-Z]:/;function u(e){return(e||"").toString().replace(r,"")}var h=[["#","hash"],["?","query"],function(e,t){return f(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],p={hash:1,query:1};function m(e){var t,i=("undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}).location||{},s={},r=typeof(e=e||i);if("blob:"===e.protocol)s=new v(unescape(e.pathname),{});else if("string"===r)for(t in s=new v(e,{}),p)delete s[t];else if("object"===r){for(t in e)t in p||(s[t]=e[t]);void 0===s.slashes&&(s.slashes=a.test(e.href))}return s}function f(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function g(e,t){e=(e=u(e)).replace(o,""),t=t||{};var n,i=c.exec(e),s=i[1]?i[1].toLowerCase():"",r=!!i[2],a=!!i[3],l=0;return r?a?(n=i[2]+i[3]+i[4],l=i[2].length+i[3].length):(n=i[2]+i[4],l=i[2].length):a?(n=i[3]+i[4],l=i[3].length):n=i[4],"file:"===s?l>=2&&(n=n.slice(2)):f(s)?n=i[4]:s?r&&(n=n.slice(2)):l>=2&&f(t.protocol)&&(n=i[4]),{protocol:s,slashes:r||f(s),slashesCount:l,rest:n}}function v(e,t,n){if(e=(e=u(e)).replace(o,""),!(this instanceof v))return new v(e,t,n);var r,a,l,c,p,_,b=h.slice(),y=typeof t,w=this,x=0;for("object"!==y&&"string"!==y&&(n=t,t=null),n&&"function"!=typeof n&&(n=s.parse),r=!(a=g(e||"",t=m(t))).protocol&&!a.slashes,w.slashes=a.slashes||r&&t.slashes,w.protocol=a.protocol||t.protocol||"",e=a.rest,("file:"===a.protocol&&(2!==a.slashesCount||d.test(e))||!a.slashes&&(a.protocol||a.slashesCount<2||!f(w.protocol)))&&(b[3]=[/(.*)/,"pathname"]);x<b.length;x++)"function"!=typeof(c=b[x])?(l=c[0],_=c[1],l!=l?w[_]=e:"string"==typeof l?~(p="@"===l?e.lastIndexOf(l):e.indexOf(l))&&("number"==typeof c[2]?(w[_]=e.slice(0,p),e=e.slice(p+c[2])):(w[_]=e.slice(p),e=e.slice(0,p))):(p=l.exec(e))&&(w[_]=p[1],e=e.slice(0,p.index)),w[_]=w[_]||r&&c[3]&&t[_]||"",c[4]&&(w[_]=w[_].toLowerCase())):e=c(e,w);n&&(w.query=n(w.query)),r&&t.slashes&&"/"!==w.pathname.charAt(0)&&(""!==w.pathname||""!==t.pathname)&&(w.pathname=function(e,t){if(""===e)return t;for(var n=(t||"/").split("/").slice(0,-1).concat(e.split("/")),i=n.length,s=n[i-1],r=!1,o=0;i--;)"."===n[i]?n.splice(i,1):".."===n[i]?(n.splice(i,1),o++):o&&(0===i&&(r=!0),n.splice(i,1),o--);return r&&n.unshift(""),"."!==s&&".."!==s||n.push(""),n.join("/")}(w.pathname,t.pathname)),"/"!==w.pathname.charAt(0)&&f(w.protocol)&&(w.pathname="/"+w.pathname),i(w.port,w.protocol)||(w.host=w.hostname,w.port=""),w.username=w.password="",w.auth&&(~(p=w.auth.indexOf(":"))?(w.username=w.auth.slice(0,p),w.username=encodeURIComponent(decodeURIComponent(w.username)),w.password=w.auth.slice(p+1),w.password=encodeURIComponent(decodeURIComponent(w.password))):w.username=encodeURIComponent(decodeURIComponent(w.auth)),w.auth=w.password?w.username+":"+w.password:w.username),w.origin="file:"!==w.protocol&&f(w.protocol)&&w.host?w.protocol+"//"+w.host:"null",w.href=w.toString()}v.prototype={set:function(e,t,n){var r=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(n||s.parse)(t)),r[e]=t;break;case"port":r[e]=t,i(t,r.protocol)?t&&(r.host=r.hostname+":"+t):(r.host=r.hostname,r[e]="");break;case"hostname":r[e]=t,r.port&&(t+=":"+r.port),r.host=t;break;case"host":r[e]=t,l.test(t)?(t=t.split(":"),r.port=t.pop(),r.hostname=t.join(":")):(r.hostname=t,r.port="");break;case"protocol":r.protocol=t.toLowerCase(),r.slashes=!n;break;case"pathname":case"hash":if(t){var o="pathname"===e?"/":"#";r[e]=t.charAt(0)!==o?o+t:t}else r[e]=t;break;case"username":case"password":r[e]=encodeURIComponent(t);break;case"auth":var a=t.indexOf(":");~a?(r.username=t.slice(0,a),r.username=encodeURIComponent(decodeURIComponent(r.username)),r.password=t.slice(a+1),r.password=encodeURIComponent(decodeURIComponent(r.password))):r.username=encodeURIComponent(decodeURIComponent(t))}for(var c=0;c<h.length;c++){var d=h[c];d[4]&&(r[d[1]]=r[d[1]].toLowerCase())}return r.auth=r.password?r.username+":"+r.password:r.username,r.origin="file:"!==r.protocol&&f(r.protocol)&&r.host?r.protocol+"//"+r.host:"null",r.href=r.toString(),r},toString:function(e){e&&"function"==typeof e||(e=s.stringify);var t,n=this,i=n.host,r=n.protocol;r&&":"!==r.charAt(r.length-1)&&(r+=":");var o=r+(n.protocol&&n.slashes||f(n.protocol)?"//":"");return n.username?(o+=n.username,n.password&&(o+=":"+n.password),o+="@"):n.password?(o+=":"+n.password,o+="@"):"file:"!==n.protocol&&f(n.protocol)&&!i&&"/"!==n.pathname&&(o+="@"),(":"===i[i.length-1]||l.test(n.hostname)&&!n.port)&&(i+=":"),o+=i+n.pathname,(t="object"==typeof n.query?e(n.query):n.query)&&(o+="?"!==t.charAt(0)?"?"+t:t),n.hash&&(o+=n.hash),o}},v.extractProtocol=g,v.location=m,v.trimLeft=u,v.qs=s,e.exports=v},1229:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},1326:(e,t,n)=>{var i=n(6379);i.TypeStyle,n(2451);var s=n(4798);s.extend,s.classes,s.media;var r=new i.TypeStyle({autoGenerateTag:!0});r.setStylesTarget,r.cssRaw,r.cssRule,r.forceRenderStyles,r.fontFace,r.getStyles,r.keyframes,r.reinit,t.iF=r.style,r.stylesheet},1480:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateProperty=function(e,t,n,i=[]){if(!e.hasOwnProperty(t))throw Error(`Missing property '${t}'`);const s=e[t];if(void 0!==n){let e=!0;switch(n){case"array":e=Array.isArray(s);break;case"object":e=void 0!==s;break;default:e=typeof s===n}if(!e)throw new Error(`Property '${t}' is not of type '${n}'`);if(i.length>0){let e=!0;switch(n){case"string":case"number":case"boolean":e=i.includes(s);break;default:e=i.findIndex(e=>e===s)>=0}if(!e)throw new Error(`Property '${t}' is not one of the valid values ${JSON.stringify(i)}`)}}}},1483:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},1521:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateModel=r,t.updateLegacySessionModel=function(e){void 0===e.path&&void 0!==e.notebook&&(e.path=e.notebook.path,e.type="notebook",e.name="")},t.validateModels=function(e){if(!Array.isArray(e))throw new Error("Invalid session list");e.forEach(e=>r(e))};const i=n(8872),s=n(1480);function r(e){(0,s.validateProperty)(e,"id","string"),(0,s.validateProperty)(e,"type","string"),(0,s.validateProperty)(e,"name","string"),(0,s.validateProperty)(e,"path","string"),(0,s.validateProperty)(e,"kernel","object"),(0,i.validateModel)(e.kernel)}},1628:(e,t,n)=>{n.r(t),n.d(t,{AttachedProperty:()=>i});class i{constructor(e){this._pid=s.nextPID(),this.name=e.name,this._create=e.create,this._coerce=e.coerce||null,this._compare=e.compare||null,this._changed=e.changed||null}get(e){let t,n=s.ensureMap(e);return t=this._pid in n?n[this._pid]:n[this._pid]=this._createValue(e),t}set(e,t){let n,i=s.ensureMap(e);n=this._pid in i?i[this._pid]:i[this._pid]=this._createValue(e);let r=this._coerceValue(e,t);this._maybeNotify(e,n,i[this._pid]=r)}coerce(e){let t,n=s.ensureMap(e);t=this._pid in n?n[this._pid]:n[this._pid]=this._createValue(e);let i=this._coerceValue(e,t);this._maybeNotify(e,t,n[this._pid]=i)}_createValue(e){return(0,this._create)(e)}_coerceValue(e,t){let n=this._coerce;return n?n(e,t):t}_compareValue(e,t){let n=this._compare;return n?n(e,t):e===t}_maybeNotify(e,t,n){let i=this._changed;i&&!this._compareValue(t,n)&&i(e,t,n)}}var s;!function(e){e.clearData=function(e){s.ownerData.delete(e)}}(i||(i={})),function(e){e.ownerData=new WeakMap,e.nextPID=(()=>{let e=0;return()=>`pid-${`${Math.random()}`.slice(2)}-${e++}`})(),e.ensureMap=function(t){let n=e.ownerData.get(t);return n||(n=Object.create(null),e.ownerData.set(t,n),n)}}(s||(s={}))},2063:e=>{e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},2100:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalConnection=void 0;const i=n(6376),s=n(5899),r=n(6903),o=n(608),a=n(4903);class l{constructor(e){var t,n;this._createSocket=()=>{this._errorIfDisposed(),this._clearSocket(),this._updateConnectionStatus("connecting");const e=this._name,t=this.serverSettings;let n=i.URLExt.join(t.wsUrl,"terminals","websocket",encodeURIComponent(e));const s=t.token;t.appendToken&&""!==s&&(n+=`?token=${encodeURIComponent(s)}`),this._ws=new t.WebSocket(n),this._ws.onmessage=this._onWSMessage,this._ws.onclose=this._onWSClose,this._ws.onerror=this._onWSClose},this._onWSMessage=e=>{if(this._isDisposed)return;const t=JSON.parse(e.data);"disconnect"===t[0]&&this.dispose(),"connecting"!==this._connectionStatus?this._messageReceived.emit({type:t[0],content:t.slice(1)}):"setup"===t[0]&&this._updateConnectionStatus("connected")},this._onWSClose=e=>{console.warn(`Terminal websocket closed: ${e.code}`),this.isDisposed||this._reconnect()},this._connectionStatus="connecting",this._connectionStatusChanged=new r.Signal(this),this._isDisposed=!1,this._disposed=new r.Signal(this),this._messageReceived=new r.Signal(this),this._reconnectTimeout=null,this._ws=null,this._noOp=()=>{},this._reconnectLimit=7,this._reconnectAttempt=0,this._pendingMessages=[],this._name=e.model.name,this.serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:o.ServerConnection.makeSettings(),this._terminalAPIClient=null!==(n=e.terminalAPIClient)&&void 0!==n?n:new a.TerminalAPIClient({serverSettings:this.serverSettings}),this._createSocket()}get disposed(){return this._disposed}get messageReceived(){return this._messageReceived}get name(){return this._name}get model(){return{name:this._name}}get isDisposed(){return this._isDisposed}dispose(){this._isDisposed||(this._isDisposed=!0,this._disposed.emit(),this._updateConnectionStatus("disconnected"),this._clearSocket(),r.Signal.clearData(this))}send(e){this._sendMessage(e)}_sendMessage(e,t=!0){if(!this._isDisposed&&e.content)if("connected"===this.connectionStatus&&this._ws){const t=[e.type,...e.content];this._ws.send(JSON.stringify(t))}else{if(!t)throw new Error(`Could not send message: ${JSON.stringify(e)}`);this._pendingMessages.push(e)}}_sendPending(){for(;"connected"===this.connectionStatus&&this._pendingMessages.length>0;)this._sendMessage(this._pendingMessages[0],!1),this._pendingMessages.shift()}reconnect(){this._errorIfDisposed();const e=new s.PromiseDelegate,t=(n,i)=>{"connected"===i?(e.resolve(),this.connectionStatusChanged.disconnect(t,this)):"disconnected"===i&&(e.reject(new Error("Terminal connection disconnected")),this.connectionStatusChanged.disconnect(t,this))};return this.connectionStatusChanged.connect(t,this),this._reconnectAttempt=0,this._reconnect(),e.promise}_reconnect(){if(this._errorIfDisposed(),clearTimeout(this._reconnectTimeout),this._reconnectAttempt<this._reconnectLimit){this._updateConnectionStatus("connecting");const e=c.getRandomIntInclusive(0,1e3*(Math.pow(2,this._reconnectAttempt)-1));console.error(`Connection lost, reconnecting in ${Math.floor(e/1e3)} seconds.`),this._reconnectTimeout=setTimeout(this._createSocket,e),this._reconnectAttempt+=1}else this._updateConnectionStatus("disconnected");this._clearSocket()}_clearSocket(){null!==this._ws&&(this._ws.onopen=this._noOp,this._ws.onclose=this._noOp,this._ws.onerror=this._noOp,this._ws.onmessage=this._noOp,this._ws.close(),this._ws=null)}async shutdown(){await this._terminalAPIClient.shutdown(this.name),this.dispose()}clone(){return new l({model:this.model,serverSettings:this.serverSettings,terminalAPIClient:this._terminalAPIClient})}_updateConnectionStatus(e){this._connectionStatus!==e&&(this._connectionStatus=e,"connecting"!==e&&(this._reconnectAttempt=0,clearTimeout(this._reconnectTimeout)),"connected"===e&&this._sendPending(),this._connectionStatusChanged.emit(e))}_errorIfDisposed(){if(this.isDisposed)throw new Error("Terminal connection is disposed")}get connectionStatusChanged(){return this._connectionStatusChanged}get connectionStatus(){return this._connectionStatus}}var c;t.TerminalConnection=l,function(e){e.getRandomIntInclusive=function(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e}}(c||(c={}))},2279:function(__unused_webpack_module,exports,__webpack_require__){var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.PageConfig=void 0;const coreutils_1=__webpack_require__(5899),minimist_1=__importDefault(__webpack_require__(9031)),url_1=__webpack_require__(7881);var PageConfig;(function(PageConfig){function getOption(name){if(configData)return configData[name]||getBodyData(name);configData=Object.create(null);let found=!1;if("undefined"!=typeof document&&document){const e=document.getElementById("jupyter-config-data");e&&(configData=JSON.parse(e.textContent||""),found=!0)}if(!found&&"undefined"!=typeof process&&process.argv)try{const cli=(0,minimist_1.default)(process.argv.slice(2)),path=__webpack_require__(7975);let fullPath="";"jupyter-config-data"in cli?fullPath=path.resolve(cli["jupyter-config-data"]):"JUPYTER_CONFIG_DATA"in process.env&&(fullPath=path.resolve(process.env.JUPYTER_CONFIG_DATA)),fullPath&&(configData=eval("require")(fullPath))}catch(e){console.error(e)}if(coreutils_1.JSONExt.isObject(configData))for(const e in configData)"string"!=typeof configData[e]&&(configData[e]=JSON.stringify(configData[e]));else configData=Object.create(null);return configData[name]||getBodyData(name)}function setOption(e,t){const n=getOption(e);return configData[e]=t,n}function getBaseUrl(){return url_1.URLExt.normalize(getOption("baseUrl")||"/")}function getTreeUrl(){return url_1.URLExt.join(getBaseUrl(),getOption("treeUrl"))}function getShareUrl(){return url_1.URLExt.normalize(getOption("shareUrl")||getBaseUrl())}function getTreeShareUrl(){return url_1.URLExt.normalize(url_1.URLExt.join(getShareUrl(),getOption("treeUrl")))}function getUrl(e){var t,n,i,s;let r=e.toShare?getShareUrl():getBaseUrl();const o=null!==(t=e.mode)&&void 0!==t?t:getOption("mode"),a=null!==(n=e.workspace)&&void 0!==n?n:getOption("workspace"),l="single-document"===o?"doc":"lab";r=url_1.URLExt.join(r,l),a!==PageConfig.defaultWorkspace&&(r=url_1.URLExt.join(r,"workspaces",encodeURIComponent(null!==(i=getOption("workspace"))&&void 0!==i?i:PageConfig.defaultWorkspace)));const c=null!==(s=e.treePath)&&void 0!==s?s:getOption("treePath");return c&&(r=url_1.URLExt.join(r,"tree",url_1.URLExt.encodeParts(c))),r}function getWsUrl(e){let t=getOption("wsUrl");if(!t){if(0!==(e=e?url_1.URLExt.normalize(e):getBaseUrl()).indexOf("http"))return"";t="ws"+e.slice(4)}return url_1.URLExt.normalize(t)}function getNBConvertURL({path:e,format:t,download:n}){const i=url_1.URLExt.encodeParts(e),s=url_1.URLExt.join(getBaseUrl(),"nbconvert",t,i);return n?s+"?download=true":s}function getToken(){return getOption("token")||getBodyData("jupyterApiToken")}function getNotebookVersion(){const e=getOption("notebookVersion");return""===e?[0,0,0]:JSON.parse(e)}PageConfig.getOption=getOption,PageConfig.setOption=setOption,PageConfig.getBaseUrl=getBaseUrl,PageConfig.getTreeUrl=getTreeUrl,PageConfig.getShareUrl=getShareUrl,PageConfig.getTreeShareUrl=getTreeShareUrl,PageConfig.getUrl=getUrl,PageConfig.defaultWorkspace="default",PageConfig.getWsUrl=getWsUrl,PageConfig.getNBConvertURL=getNBConvertURL,PageConfig.getToken=getToken,PageConfig.getNotebookVersion=getNotebookVersion;let configData=null,Extension;function getBodyData(e){if("undefined"==typeof document||!document.body)return"";const t=document.body.dataset[e];return void 0===t?"":decodeURIComponent(t)}!function(e){function t(e){try{const t=getOption(e);if(t)return JSON.parse(t)}catch(t){console.warn(`Unable to parse ${e}.`,t)}return[]}e.deferred=t("deferredExtensions"),e.disabled=t("disabledExtensions"),e.isDeferred=function(t){const n=t.indexOf(":");let i="";return-1!==n&&(i=t.slice(0,n)),e.deferred.some(e=>e===t||i&&e===i)},e.isDisabled=function(t){const n=t.indexOf(":");let i="";return-1!==n&&(i=t.slice(0,n)),e.disabled.some(e=>e===t||i&&e===i)}}(Extension=PageConfig.Extension||(PageConfig.Extension={}))})(PageConfig||(exports.PageConfig=PageConfig={}))},2304:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectionStatus=void 0,t.ConnectionStatus=class{constructor(){this.isConnected=!0}}},2343:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},2451:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},2551:(e,t,n)=>{var i=n(6540),s=n(9982);function r(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=new Set,a={};function l(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(a[e]=t,e=0;e<t.length;e++)o.add(t[e])}var d=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),u=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},m={};function f(e,t,n,i,s,r,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=i,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=r,this.removeEmptyString=o}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){g[e]=new f(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];g[t]=new f(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){g[e]=new f(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){g[e]=new f(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){g[e]=new f(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){g[e]=new f(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){g[e]=new f(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){g[e]=new f(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){g[e]=new f(e,5,!1,e.toLowerCase(),null,!1,!1)});var v=/[\-:]([a-z])/g;function _(e){return e[1].toUpperCase()}function b(e,t,n,i){var s=g.hasOwnProperty(t)?g[t]:null;(null!==s?0!==s.type:i||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,i){if(null==t||function(e,t,n,i){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!i&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,i))return!0;if(i)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,s,i)&&(n=null),i||null===s?function(e){return!!u.call(m,e)||!u.call(p,e)&&(h.test(e)?m[e]=!0:(p[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=null===n?3!==s.type&&"":n:(t=s.attributeName,i=s.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(s=s.type)||4===s&&!0===n?"":""+n,i?e.setAttributeNS(i,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(v,_);g[t]=new f(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(v,_);g[t]=new f(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(v,_);g[t]=new f(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){g[e]=new f(e,1,!1,e.toLowerCase(),null,!1,!1)}),g.xlinkHref=new f("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){g[e]=new f(e,1,!1,e.toLowerCase(),null,!0,!0)});var y=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for("react.element"),x=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),E=Symbol.for("react.provider"),M=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),A=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var D=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var T=Symbol.iterator;function R(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=T&&e[T]||e["@@iterator"])?e:null}var j,z=Object.assign;function N(e){if(void 0===j)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);j=t&&t[1]||""}return"\n"+j+e}var B=!1;function F(e,t){if(!e||B)return"";B=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var i=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){i=e}e.call(t.prototype)}else{try{throw Error()}catch(e){i=e}e()}}catch(t){if(t&&i&&"string"==typeof t.stack){for(var s=t.stack.split("\n"),r=i.stack.split("\n"),o=s.length-1,a=r.length-1;1<=o&&0<=a&&s[o]!==r[a];)a--;for(;1<=o&&0<=a;o--,a--)if(s[o]!==r[a]){if(1!==o||1!==a)do{if(o--,0>--a||s[o]!==r[a]){var l="\n"+s[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=o&&0<=a);break}}}finally{B=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?N(e):""}function U(e){switch(e.tag){case 5:return N(e.type);case 16:return N("Lazy");case 13:return N("Suspense");case 19:return N("SuspenseList");case 0:case 2:case 15:return F(e.type,!1);case 11:return F(e.type.render,!1);case 1:return F(e.type,!0);default:return""}}function H(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case S:return"Fragment";case x:return"Portal";case k:return"Profiler";case C:return"StrictMode";case I:return"Suspense";case L:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case M:return(e.displayName||"Context")+".Consumer";case E:return(e._context.displayName||"Context")+".Provider";case P:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case O:return null!==(t=e.displayName||null)?t:H(e.type)||"Memo";case A:t=e._payload,e=e._init;try{return H(e(t))}catch(e){}}return null}function W(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return H(t);case 8:return t===C?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function $(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function q(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function V(e){e._valueTracker||(e._valueTracker=function(e){var t=q(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var s=n.get,r=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(e){i=""+e,r.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(e){i=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function K(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),i="";return e&&(i=q(e)?e.checked?"true":"false":e.value),(e=i)!==n&&(t.setValue(e),!0)}function J(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function G(e,t){var n=t.checked;return z({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Y(e,t){var n=null==t.defaultValue?"":t.defaultValue,i=null!=t.checked?t.checked:t.defaultChecked;n=$(null!=t.value?t.value:n),e._wrapperState={initialChecked:i,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function X(e,t){null!=(t=t.checked)&&b(e,"checked",t,!1)}function Q(e,t){X(e,t);var n=$(t.value),i=t.type;if(null!=n)"number"===i?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===i||"reset"===i)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,$(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Z(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!("submit"!==i&&"reset"!==i||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&J(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,i){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&i&&(e[n].defaultSelected=!0)}else{for(n=""+$(n),t=null,s=0;s<e.length;s++){if(e[s].value===n)return e[s].selected=!0,void(i&&(e[s].defaultSelected=!0));null!==t||e[s].disabled||(t=e[s])}null!==t&&(t.selected=!0)}}function ie(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(r(91));return z({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function se(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(r(92));if(te(n)){if(1<n.length)throw Error(r(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:$(n)}}function re(e,t){var n=$(t.value),i=$(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=i&&(e.defaultValue=""+i)}function oe(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function ae(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function le(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?ae(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ce,de,ue=(de=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ce=ce||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ce.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,i){MSApp.execUnsafeLocalFunction(function(){return de(e,t)})}:de);function he(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var pe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},me=["Webkit","ms","Moz","O"];function fe(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||pe.hasOwnProperty(e)&&pe[e]?(""+t).trim():t+"px"}function ge(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var i=0===n.indexOf("--"),s=fe(n,t[n],i);"float"===n&&(n="cssFloat"),i?e.setProperty(n,s):e[n]=s}}Object.keys(pe).forEach(function(e){me.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pe[t]=pe[e]})});var ve=z({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function _e(e,t){if(t){if(ve[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(r(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(r(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(r(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(r(62))}}function be(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ye=null;function we(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var xe=null,Se=null,Ce=null;function ke(e){if(e=bs(e)){if("function"!=typeof xe)throw Error(r(280));var t=e.stateNode;t&&(t=ws(t),xe(e.stateNode,e.type,t))}}function Ee(e){Se?Ce?Ce.push(e):Ce=[e]:Se=e}function Me(){if(Se){var e=Se,t=Ce;if(Ce=Se=null,ke(e),t)for(e=0;e<t.length;e++)ke(t[e])}}function Pe(e,t){return e(t)}function Ie(){}var Le=!1;function Oe(e,t,n){if(Le)return e(t,n);Le=!0;try{return Pe(e,t,n)}finally{Le=!1,(null!==Se||null!==Ce)&&(Ie(),Me())}}function Ae(e,t){var n=e.stateNode;if(null===n)return null;var i=ws(n);if(null===i)return null;n=i[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(i=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!i;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(r(231,t,typeof n));return n}var De=!1;if(d)try{var Te={};Object.defineProperty(Te,"passive",{get:function(){De=!0}}),window.addEventListener("test",Te,Te),window.removeEventListener("test",Te,Te)}catch(de){De=!1}function Re(e,t,n,i,s,r,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this.onError(e)}}var je=!1,ze=null,Ne=!1,Be=null,Fe={onError:function(e){je=!0,ze=e}};function Ue(e,t,n,i,s,r,o,a,l){je=!1,ze=null,Re.apply(Fe,arguments)}function He(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function We(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function $e(e){if(He(e)!==e)throw Error(r(188))}function qe(e){return e=function(e){var t=e.alternate;if(!t){if(null===(t=He(e)))throw Error(r(188));return t!==e?null:e}for(var n=e,i=t;;){var s=n.return;if(null===s)break;var o=s.alternate;if(null===o){if(null!==(i=s.return)){n=i;continue}break}if(s.child===o.child){for(o=s.child;o;){if(o===n)return $e(s),e;if(o===i)return $e(s),t;o=o.sibling}throw Error(r(188))}if(n.return!==i.return)n=s,i=o;else{for(var a=!1,l=s.child;l;){if(l===n){a=!0,n=s,i=o;break}if(l===i){a=!0,i=s,n=o;break}l=l.sibling}if(!a){for(l=o.child;l;){if(l===n){a=!0,n=o,i=s;break}if(l===i){a=!0,i=o,n=s;break}l=l.sibling}if(!a)throw Error(r(189))}}if(n.alternate!==i)throw Error(r(190))}if(3!==n.tag)throw Error(r(188));return n.stateNode.current===n?e:t}(e),null!==e?Ve(e):null}function Ve(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Ve(e);if(null!==t)return t;e=e.sibling}return null}var Ke=s.unstable_scheduleCallback,Je=s.unstable_cancelCallback,Ge=s.unstable_shouldYield,Ye=s.unstable_requestPaint,Xe=s.unstable_now,Qe=s.unstable_getCurrentPriorityLevel,Ze=s.unstable_ImmediatePriority,et=s.unstable_UserBlockingPriority,tt=s.unstable_NormalPriority,nt=s.unstable_LowPriority,it=s.unstable_IdlePriority,st=null,rt=null,ot=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(at(e)/lt|0)|0},at=Math.log,lt=Math.LN2,ct=64,dt=4194304;function ut(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ht(e,t){var n=e.pendingLanes;if(0===n)return 0;var i=0,s=e.suspendedLanes,r=e.pingedLanes,o=268435455&n;if(0!==o){var a=o&~s;0!==a?i=ut(a):0!==(r&=o)&&(i=ut(r))}else 0!==(o=n&~s)?i=ut(o):0!==r&&(i=ut(r));if(0===i)return 0;if(0!==t&&t!==i&&0===(t&s)&&((s=i&-i)>=(r=t&-t)||16===s&&4194240&r))return t;if(4&i&&(i|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=i;0<t;)s=1<<(n=31-ot(t)),i|=e[n],t&=~s;return i}function pt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function mt(e){return 0!=(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function ft(){var e=ct;return!(4194240&(ct<<=1))&&(ct=64),e}function gt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function vt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-ot(t)]=n}function _t(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var i=31-ot(n),s=1<<i;s&t|e[i]&t&&(e[i]|=t),n&=~s}}var bt=0;function yt(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var wt,xt,St,Ct,kt,Et=!1,Mt=[],Pt=null,It=null,Lt=null,Ot=new Map,At=new Map,Dt=[],Tt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Rt(e,t){switch(e){case"focusin":case"focusout":Pt=null;break;case"dragenter":case"dragleave":It=null;break;case"mouseover":case"mouseout":Lt=null;break;case"pointerover":case"pointerout":Ot.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":At.delete(t.pointerId)}}function jt(e,t,n,i,s,r){return null===e||e.nativeEvent!==r?(e={blockedOn:t,domEventName:n,eventSystemFlags:i,nativeEvent:r,targetContainers:[s]},null!==t&&null!==(t=bs(t))&&xt(t),e):(e.eventSystemFlags|=i,t=e.targetContainers,null!==s&&-1===t.indexOf(s)&&t.push(s),e)}function zt(e){var t=_s(e.target);if(null!==t){var n=He(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=We(n)))return e.blockedOn=t,void kt(e.priority,function(){St(n)})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Nt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Gt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=bs(n))&&xt(t),e.blockedOn=n,!1;var i=new(n=e.nativeEvent).constructor(n.type,n);ye=i,n.target.dispatchEvent(i),ye=null,t.shift()}return!0}function Bt(e,t,n){Nt(e)&&n.delete(t)}function Ft(){Et=!1,null!==Pt&&Nt(Pt)&&(Pt=null),null!==It&&Nt(It)&&(It=null),null!==Lt&&Nt(Lt)&&(Lt=null),Ot.forEach(Bt),At.forEach(Bt)}function Ut(e,t){e.blockedOn===t&&(e.blockedOn=null,Et||(Et=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,Ft)))}function Ht(e){function t(t){return Ut(t,e)}if(0<Mt.length){Ut(Mt[0],e);for(var n=1;n<Mt.length;n++){var i=Mt[n];i.blockedOn===e&&(i.blockedOn=null)}}for(null!==Pt&&Ut(Pt,e),null!==It&&Ut(It,e),null!==Lt&&Ut(Lt,e),Ot.forEach(t),At.forEach(t),n=0;n<Dt.length;n++)(i=Dt[n]).blockedOn===e&&(i.blockedOn=null);for(;0<Dt.length&&null===(n=Dt[0]).blockedOn;)zt(n),null===n.blockedOn&&Dt.shift()}var Wt=y.ReactCurrentBatchConfig,$t=!0;function qt(e,t,n,i){var s=bt,r=Wt.transition;Wt.transition=null;try{bt=1,Kt(e,t,n,i)}finally{bt=s,Wt.transition=r}}function Vt(e,t,n,i){var s=bt,r=Wt.transition;Wt.transition=null;try{bt=4,Kt(e,t,n,i)}finally{bt=s,Wt.transition=r}}function Kt(e,t,n,i){if($t){var s=Gt(e,t,n,i);if(null===s)$i(e,t,i,Jt,n),Rt(e,i);else if(function(e,t,n,i,s){switch(t){case"focusin":return Pt=jt(Pt,e,t,n,i,s),!0;case"dragenter":return It=jt(It,e,t,n,i,s),!0;case"mouseover":return Lt=jt(Lt,e,t,n,i,s),!0;case"pointerover":var r=s.pointerId;return Ot.set(r,jt(Ot.get(r)||null,e,t,n,i,s)),!0;case"gotpointercapture":return r=s.pointerId,At.set(r,jt(At.get(r)||null,e,t,n,i,s)),!0}return!1}(s,e,t,n,i))i.stopPropagation();else if(Rt(e,i),4&t&&-1<Tt.indexOf(e)){for(;null!==s;){var r=bs(s);if(null!==r&&wt(r),null===(r=Gt(e,t,n,i))&&$i(e,t,i,Jt,n),r===s)break;s=r}null!==s&&i.stopPropagation()}else $i(e,t,i,null,n)}}var Jt=null;function Gt(e,t,n,i){if(Jt=null,null!==(e=_s(e=we(i))))if(null===(t=He(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=We(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Jt=e,null}function Yt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Qe()){case Ze:return 1;case et:return 4;case tt:case nt:return 16;case it:return 536870912;default:return 16}default:return 16}}var Xt=null,Qt=null,Zt=null;function en(){if(Zt)return Zt;var e,t,n=Qt,i=n.length,s="value"in Xt?Xt.value:Xt.textContent,r=s.length;for(e=0;e<i&&n[e]===s[e];e++);var o=i-e;for(t=1;t<=o&&n[i-t]===s[r-t];t++);return Zt=s.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function sn(){return!1}function rn(e){function t(t,n,i,s,r){for(var o in this._reactName=t,this._targetInst=i,this.type=n,this.nativeEvent=s,this.target=r,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(s):s[o]);return this.isDefaultPrevented=(null!=s.defaultPrevented?s.defaultPrevented:!1===s.returnValue)?nn:sn,this.isPropagationStopped=sn,this}return z(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var on,an,ln,cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},dn=rn(cn),un=z({},cn,{view:0,detail:0}),hn=rn(un),pn=z({},un,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:kn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ln&&(ln&&"mousemove"===e.type?(on=e.screenX-ln.screenX,an=e.screenY-ln.screenY):an=on=0,ln=e),on)},movementY:function(e){return"movementY"in e?e.movementY:an}}),mn=rn(pn),fn=rn(z({},pn,{dataTransfer:0})),gn=rn(z({},un,{relatedTarget:0})),vn=rn(z({},cn,{animationName:0,elapsedTime:0,pseudoElement:0})),_n=z({},cn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),bn=rn(_n),yn=rn(z({},cn,{data:0})),wn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Sn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Sn[e])&&!!t[e]}function kn(){return Cn}var En=z({},un,{key:function(e){if(e.key){var t=wn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?xn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:kn,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Mn=rn(En),Pn=rn(z({},pn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),In=rn(z({},un,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:kn})),Ln=rn(z({},cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),On=z({},pn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),An=rn(On),Dn=[9,13,27,32],Tn=d&&"CompositionEvent"in window,Rn=null;d&&"documentMode"in document&&(Rn=document.documentMode);var jn=d&&"TextEvent"in window&&!Rn,zn=d&&(!Tn||Rn&&8<Rn&&11>=Rn),Nn=String.fromCharCode(32),Bn=!1;function Fn(e,t){switch(e){case"keyup":return-1!==Dn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Un(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Hn=!1,Wn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function $n(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Wn[e.type]:"textarea"===t}function qn(e,t,n,i){Ee(i),0<(t=Vi(t,"onChange")).length&&(n=new dn("onChange","change",null,n,i),e.push({event:n,listeners:t}))}var Vn=null,Kn=null;function Jn(e){Ni(e,0)}function Gn(e){if(K(ys(e)))return e}function Yn(e,t){if("change"===e)return t}var Xn=!1;if(d){var Qn;if(d){var Zn="oninput"in document;if(!Zn){var ei=document.createElement("div");ei.setAttribute("oninput","return;"),Zn="function"==typeof ei.oninput}Qn=Zn}else Qn=!1;Xn=Qn&&(!document.documentMode||9<document.documentMode)}function ti(){Vn&&(Vn.detachEvent("onpropertychange",ni),Kn=Vn=null)}function ni(e){if("value"===e.propertyName&&Gn(Kn)){var t=[];qn(t,Kn,e,we(e)),Oe(Jn,t)}}function ii(e,t,n){"focusin"===e?(ti(),Kn=n,(Vn=t).attachEvent("onpropertychange",ni)):"focusout"===e&&ti()}function si(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Gn(Kn)}function ri(e,t){if("click"===e)return Gn(t)}function oi(e,t){if("input"===e||"change"===e)return Gn(t)}var ai="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function li(e,t){if(ai(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++){var s=n[i];if(!u.call(t,s)||!ai(e[s],t[s]))return!1}return!0}function ci(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function di(e,t){var n,i=ci(e);for(e=0;i;){if(3===i.nodeType){if(n=e+i.textContent.length,e<=t&&n>=t)return{node:i,offset:t-e};e=n}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=ci(i)}}function ui(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?ui(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function hi(){for(var e=window,t=J();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=J((e=t.contentWindow).document)}return t}function pi(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function mi(e){var t=hi(),n=e.focusedElem,i=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ui(n.ownerDocument.documentElement,n)){if(null!==i&&pi(n))if(t=i.start,void 0===(e=i.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var s=n.textContent.length,r=Math.min(i.start,s);i=void 0===i.end?r:Math.min(i.end,s),!e.extend&&r>i&&(s=i,i=r,r=s),s=di(n,r);var o=di(n,i);s&&o&&(1!==e.rangeCount||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&((t=t.createRange()).setStart(s.node,s.offset),e.removeAllRanges(),r>i?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var fi=d&&"documentMode"in document&&11>=document.documentMode,gi=null,vi=null,_i=null,bi=!1;function yi(e,t,n){var i=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;bi||null==gi||gi!==J(i)||(i="selectionStart"in(i=gi)&&pi(i)?{start:i.selectionStart,end:i.selectionEnd}:{anchorNode:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset},_i&&li(_i,i)||(_i=i,0<(i=Vi(vi,"onSelect")).length&&(t=new dn("onSelect","select",null,t,n),e.push({event:t,listeners:i}),t.target=gi)))}function wi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var xi={animationend:wi("Animation","AnimationEnd"),animationiteration:wi("Animation","AnimationIteration"),animationstart:wi("Animation","AnimationStart"),transitionend:wi("Transition","TransitionEnd")},Si={},Ci={};function ki(e){if(Si[e])return Si[e];if(!xi[e])return e;var t,n=xi[e];for(t in n)if(n.hasOwnProperty(t)&&t in Ci)return Si[e]=n[t];return e}d&&(Ci=document.createElement("div").style,"AnimationEvent"in window||(delete xi.animationend.animation,delete xi.animationiteration.animation,delete xi.animationstart.animation),"TransitionEvent"in window||delete xi.transitionend.transition);var Ei=ki("animationend"),Mi=ki("animationiteration"),Pi=ki("animationstart"),Ii=ki("transitionend"),Li=new Map,Oi="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ai(e,t){Li.set(e,t),l(t,[e])}for(var Di=0;Di<Oi.length;Di++){var Ti=Oi[Di];Ai(Ti.toLowerCase(),"on"+(Ti[0].toUpperCase()+Ti.slice(1)))}Ai(Ei,"onAnimationEnd"),Ai(Mi,"onAnimationIteration"),Ai(Pi,"onAnimationStart"),Ai("dblclick","onDoubleClick"),Ai("focusin","onFocus"),Ai("focusout","onBlur"),Ai(Ii,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ri="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),ji=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ri));function zi(e,t,n){var i=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,i,s,o,a,l,c){if(Ue.apply(this,arguments),je){if(!je)throw Error(r(198));var d=ze;je=!1,ze=null,Ne||(Ne=!0,Be=d)}}(i,t,void 0,e),e.currentTarget=null}function Ni(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var i=e[n],s=i.event;i=i.listeners;e:{var r=void 0;if(t)for(var o=i.length-1;0<=o;o--){var a=i[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==r&&s.isPropagationStopped())break e;zi(s,a,c),r=l}else for(o=0;o<i.length;o++){if(l=(a=i[o]).instance,c=a.currentTarget,a=a.listener,l!==r&&s.isPropagationStopped())break e;zi(s,a,c),r=l}}}if(Ne)throw e=Be,Ne=!1,Be=null,e}function Bi(e,t){var n=t[fs];void 0===n&&(n=t[fs]=new Set);var i=e+"__bubble";n.has(i)||(Wi(t,e,2,!1),n.add(i))}function Fi(e,t,n){var i=0;t&&(i|=4),Wi(n,e,i,t)}var Ui="_reactListening"+Math.random().toString(36).slice(2);function Hi(e){if(!e[Ui]){e[Ui]=!0,o.forEach(function(t){"selectionchange"!==t&&(ji.has(t)||Fi(t,!1,e),Fi(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Ui]||(t[Ui]=!0,Fi("selectionchange",!1,t))}}function Wi(e,t,n,i){switch(Yt(t)){case 1:var s=qt;break;case 4:s=Vt;break;default:s=Kt}n=s.bind(null,t,n,e),s=void 0,!De||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(s=!0),i?void 0!==s?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):void 0!==s?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function $i(e,t,n,i,s){var r=i;if(!(1&t||2&t||null===i))e:for(;;){if(null===i)return;var o=i.tag;if(3===o||4===o){var a=i.stateNode.containerInfo;if(a===s||8===a.nodeType&&a.parentNode===s)break;if(4===o)for(o=i.return;null!==o;){var l=o.tag;if((3===l||4===l)&&((l=o.stateNode.containerInfo)===s||8===l.nodeType&&l.parentNode===s))return;o=o.return}for(;null!==a;){if(null===(o=_s(a)))return;if(5===(l=o.tag)||6===l){i=r=o;continue e}a=a.parentNode}}i=i.return}Oe(function(){var i=r,s=we(n),o=[];e:{var a=Li.get(e);if(void 0!==a){var l=dn,c=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":l=Mn;break;case"focusin":c="focus",l=gn;break;case"focusout":c="blur",l=gn;break;case"beforeblur":case"afterblur":l=gn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=mn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=fn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=In;break;case Ei:case Mi:case Pi:l=vn;break;case Ii:l=Ln;break;case"scroll":l=hn;break;case"wheel":l=An;break;case"copy":case"cut":case"paste":l=bn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Pn}var d=!!(4&t),u=!d&&"scroll"===e,h=d?null!==a?a+"Capture":null:a;d=[];for(var p,m=i;null!==m;){var f=(p=m).stateNode;if(5===p.tag&&null!==f&&(p=f,null!==h&&null!=(f=Ae(m,h))&&d.push(qi(m,f,p))),u)break;m=m.return}0<d.length&&(a=new l(a,c,null,n,s),o.push({event:a,listeners:d}))}}if(!(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(a="mouseover"===e||"pointerover"===e)||n===ye||!(c=n.relatedTarget||n.fromElement)||!_s(c)&&!c[ms])&&(l||a)&&(a=s.window===s?s:(a=s.ownerDocument)?a.defaultView||a.parentWindow:window,l?(l=i,null!==(c=(c=n.relatedTarget||n.toElement)?_s(c):null)&&(c!==(u=He(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=i),l!==c)){if(d=mn,f="onMouseLeave",h="onMouseEnter",m="mouse","pointerout"!==e&&"pointerover"!==e||(d=Pn,f="onPointerLeave",h="onPointerEnter",m="pointer"),u=null==l?a:ys(l),p=null==c?a:ys(c),(a=new d(f,m+"leave",l,n,s)).target=u,a.relatedTarget=p,f=null,_s(s)===i&&((d=new d(h,m+"enter",c,n,s)).target=p,d.relatedTarget=u,f=d),u=f,l&&c)e:{for(h=c,m=0,p=d=l;p;p=Ki(p))m++;for(p=0,f=h;f;f=Ki(f))p++;for(;0<m-p;)d=Ki(d),m--;for(;0<p-m;)h=Ki(h),p--;for(;m--;){if(d===h||null!==h&&d===h.alternate)break e;d=Ki(d),h=Ki(h)}d=null}else d=null;null!==l&&Ji(o,a,l,d,!1),null!==c&&null!==u&&Ji(o,u,c,d,!0)}if("select"===(l=(a=i?ys(i):window).nodeName&&a.nodeName.toLowerCase())||"input"===l&&"file"===a.type)var g=Yn;else if($n(a))if(Xn)g=oi;else{g=si;var v=ii}else(l=a.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===a.type||"radio"===a.type)&&(g=ri);switch(g&&(g=g(e,i))?qn(o,g,n,s):(v&&v(e,a,i),"focusout"===e&&(v=a._wrapperState)&&v.controlled&&"number"===a.type&&ee(a,"number",a.value)),v=i?ys(i):window,e){case"focusin":($n(v)||"true"===v.contentEditable)&&(gi=v,vi=i,_i=null);break;case"focusout":_i=vi=gi=null;break;case"mousedown":bi=!0;break;case"contextmenu":case"mouseup":case"dragend":bi=!1,yi(o,n,s);break;case"selectionchange":if(fi)break;case"keydown":case"keyup":yi(o,n,s)}var _;if(Tn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Hn?Fn(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(zn&&"ko"!==n.locale&&(Hn||"onCompositionStart"!==b?"onCompositionEnd"===b&&Hn&&(_=en()):(Qt="value"in(Xt=s)?Xt.value:Xt.textContent,Hn=!0)),0<(v=Vi(i,b)).length&&(b=new yn(b,e,null,n,s),o.push({event:b,listeners:v}),(_||null!==(_=Un(n)))&&(b.data=_))),(_=jn?function(e,t){switch(e){case"compositionend":return Un(t);case"keypress":return 32!==t.which?null:(Bn=!0,Nn);case"textInput":return(e=t.data)===Nn&&Bn?null:e;default:return null}}(e,n):function(e,t){if(Hn)return"compositionend"===e||!Tn&&Fn(e,t)?(e=en(),Zt=Qt=Xt=null,Hn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return zn&&"ko"!==t.locale?null:t.data}}(e,n))&&0<(i=Vi(i,"onBeforeInput")).length&&(s=new yn("onBeforeInput","beforeinput",null,n,s),o.push({event:s,listeners:i}),s.data=_)}Ni(o,t)})}function qi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Vi(e,t){for(var n=t+"Capture",i=[];null!==e;){var s=e,r=s.stateNode;5===s.tag&&null!==r&&(s=r,null!=(r=Ae(e,n))&&i.unshift(qi(e,r,s)),null!=(r=Ae(e,t))&&i.push(qi(e,r,s))),e=e.return}return i}function Ki(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Ji(e,t,n,i,s){for(var r=t._reactName,o=[];null!==n&&n!==i;){var a=n,l=a.alternate,c=a.stateNode;if(null!==l&&l===i)break;5===a.tag&&null!==c&&(a=c,s?null!=(l=Ae(n,r))&&o.unshift(qi(n,l,a)):s||null!=(l=Ae(n,r))&&o.push(qi(n,l,a))),n=n.return}0!==o.length&&e.push({event:t,listeners:o})}var Gi=/\r\n?/g,Yi=/\u0000|\uFFFD/g;function Xi(e){return("string"==typeof e?e:""+e).replace(Gi,"\n").replace(Yi,"")}function Qi(e,t,n){if(t=Xi(t),Xi(e)!==t&&n)throw Error(r(425))}function Zi(){}var es=null,ts=null;function ns(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var is="function"==typeof setTimeout?setTimeout:void 0,ss="function"==typeof clearTimeout?clearTimeout:void 0,rs="function"==typeof Promise?Promise:void 0,os="function"==typeof queueMicrotask?queueMicrotask:void 0!==rs?function(e){return rs.resolve(null).then(e).catch(as)}:is;function as(e){setTimeout(function(){throw e})}function ls(e,t){var n=t,i=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&8===s.nodeType)if("/$"===(n=s.data)){if(0===i)return e.removeChild(s),void Ht(t);i--}else"$"!==n&&"$?"!==n&&"$!"!==n||i++;n=s}while(n);Ht(t)}function cs(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function ds(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var us=Math.random().toString(36).slice(2),hs="__reactFiber$"+us,ps="__reactProps$"+us,ms="__reactContainer$"+us,fs="__reactEvents$"+us,gs="__reactListeners$"+us,vs="__reactHandles$"+us;function _s(e){var t=e[hs];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ms]||n[hs]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ds(e);null!==e;){if(n=e[hs])return n;e=ds(e)}return t}n=(e=n).parentNode}return null}function bs(e){return!(e=e[hs]||e[ms])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function ys(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(r(33))}function ws(e){return e[ps]||null}var xs=[],Ss=-1;function Cs(e){return{current:e}}function ks(e){0>Ss||(e.current=xs[Ss],xs[Ss]=null,Ss--)}function Es(e,t){Ss++,xs[Ss]=e.current,e.current=t}var Ms={},Ps=Cs(Ms),Is=Cs(!1),Ls=Ms;function Os(e,t){var n=e.type.contextTypes;if(!n)return Ms;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var s,r={};for(s in n)r[s]=t[s];return i&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=r),r}function As(e){return null!=e.childContextTypes}function Ds(){ks(Is),ks(Ps)}function Ts(e,t,n){if(Ps.current!==Ms)throw Error(r(168));Es(Ps,t),Es(Is,n)}function Rs(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,"function"!=typeof i.getChildContext)return n;for(var s in i=i.getChildContext())if(!(s in t))throw Error(r(108,W(e)||"Unknown",s));return z({},n,i)}function js(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ms,Ls=Ps.current,Es(Ps,e),Es(Is,Is.current),!0}function zs(e,t,n){var i=e.stateNode;if(!i)throw Error(r(169));n?(e=Rs(e,t,Ls),i.__reactInternalMemoizedMergedChildContext=e,ks(Is),ks(Ps),Es(Ps,e)):ks(Is),Es(Is,n)}var Ns=null,Bs=!1,Fs=!1;function Us(e){null===Ns?Ns=[e]:Ns.push(e)}function Hs(){if(!Fs&&null!==Ns){Fs=!0;var e=0,t=bt;try{var n=Ns;for(bt=1;e<n.length;e++){var i=n[e];do{i=i(!0)}while(null!==i)}Ns=null,Bs=!1}catch(t){throw null!==Ns&&(Ns=Ns.slice(e+1)),Ke(Ze,Hs),t}finally{bt=t,Fs=!1}}return null}var Ws=[],$s=0,qs=null,Vs=0,Ks=[],Js=0,Gs=null,Ys=1,Xs="";function Qs(e,t){Ws[$s++]=Vs,Ws[$s++]=qs,qs=e,Vs=t}function Zs(e,t,n){Ks[Js++]=Ys,Ks[Js++]=Xs,Ks[Js++]=Gs,Gs=e;var i=Ys;e=Xs;var s=32-ot(i)-1;i&=~(1<<s),n+=1;var r=32-ot(t)+s;if(30<r){var o=s-s%5;r=(i&(1<<o)-1).toString(32),i>>=o,s-=o,Ys=1<<32-ot(t)+s|n<<s|i,Xs=r+e}else Ys=1<<r|n<<s|i,Xs=e}function er(e){null!==e.return&&(Qs(e,1),Zs(e,1,0))}function tr(e){for(;e===qs;)qs=Ws[--$s],Ws[$s]=null,Vs=Ws[--$s],Ws[$s]=null;for(;e===Gs;)Gs=Ks[--Js],Ks[Js]=null,Xs=Ks[--Js],Ks[Js]=null,Ys=Ks[--Js],Ks[Js]=null}var nr=null,ir=null,sr=!1,rr=null;function or(e,t){var n=Oc(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function ar(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,nr=e,ir=cs(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,nr=e,ir=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Gs?{id:Ys,overflow:Xs}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Oc(18,null,null,0)).stateNode=t,n.return=e,e.child=n,nr=e,ir=null,!0);default:return!1}}function lr(e){return!(!(1&e.mode)||128&e.flags)}function cr(e){if(sr){var t=ir;if(t){var n=t;if(!ar(e,t)){if(lr(e))throw Error(r(418));t=cs(n.nextSibling);var i=nr;t&&ar(e,t)?or(i,n):(e.flags=-4097&e.flags|2,sr=!1,nr=e)}}else{if(lr(e))throw Error(r(418));e.flags=-4097&e.flags|2,sr=!1,nr=e}}}function dr(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;nr=e}function ur(e){if(e!==nr)return!1;if(!sr)return dr(e),sr=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ns(e.type,e.memoizedProps)),t&&(t=ir)){if(lr(e))throw hr(),Error(r(418));for(;t;)or(e,t),t=cs(t.nextSibling)}if(dr(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(r(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){ir=cs(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}ir=null}}else ir=nr?cs(e.stateNode.nextSibling):null;return!0}function hr(){for(var e=ir;e;)e=cs(e.nextSibling)}function pr(){ir=nr=null,sr=!1}function mr(e){null===rr?rr=[e]:rr.push(e)}var fr=y.ReactCurrentBatchConfig;function gr(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(r(309));var i=n.stateNode}if(!i)throw Error(r(147,e));var s=i,o=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=s.refs;null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}if("string"!=typeof e)throw Error(r(284));if(!n._owner)throw Error(r(290,e))}return e}function vr(e,t){throw e=Object.prototype.toString.call(t),Error(r(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function _r(e){return(0,e._init)(e._payload)}function br(e){function t(t,n){if(e){var i=t.deletions;null===i?(t.deletions=[n],t.flags|=16):i.push(n)}}function n(n,i){if(!e)return null;for(;null!==i;)t(n,i),i=i.sibling;return null}function i(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function s(e,t){return(e=Dc(e,t)).index=0,e.sibling=null,e}function o(t,n,i){return t.index=i,e?null!==(i=t.alternate)?(i=i.index)<n?(t.flags|=2,n):i:(t.flags|=2,n):(t.flags|=1048576,n)}function a(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,i){return null===t||6!==t.tag?((t=zc(n,e.mode,i)).return=e,t):((t=s(t,n)).return=e,t)}function c(e,t,n,i){var r=n.type;return r===S?u(e,t,n.props.children,i,n.key):null!==t&&(t.elementType===r||"object"==typeof r&&null!==r&&r.$$typeof===A&&_r(r)===t.type)?((i=s(t,n.props)).ref=gr(e,t,n),i.return=e,i):((i=Tc(n.type,n.key,n.props,null,e.mode,i)).ref=gr(e,t,n),i.return=e,i)}function d(e,t,n,i){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Nc(n,e.mode,i)).return=e,t):((t=s(t,n.children||[])).return=e,t)}function u(e,t,n,i,r){return null===t||7!==t.tag?((t=Rc(n,e.mode,i,r)).return=e,t):((t=s(t,n)).return=e,t)}function h(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=zc(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case w:return(n=Tc(t.type,t.key,t.props,null,e.mode,n)).ref=gr(e,null,t),n.return=e,n;case x:return(t=Nc(t,e.mode,n)).return=e,t;case A:return h(e,(0,t._init)(t._payload),n)}if(te(t)||R(t))return(t=Rc(t,e.mode,n,null)).return=e,t;vr(e,t)}return null}function p(e,t,n,i){var s=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==s?null:l(e,t,""+n,i);if("object"==typeof n&&null!==n){switch(n.$$typeof){case w:return n.key===s?c(e,t,n,i):null;case x:return n.key===s?d(e,t,n,i):null;case A:return p(e,t,(s=n._init)(n._payload),i)}if(te(n)||R(n))return null!==s?null:u(e,t,n,i,null);vr(e,n)}return null}function m(e,t,n,i,s){if("string"==typeof i&&""!==i||"number"==typeof i)return l(t,e=e.get(n)||null,""+i,s);if("object"==typeof i&&null!==i){switch(i.$$typeof){case w:return c(t,e=e.get(null===i.key?n:i.key)||null,i,s);case x:return d(t,e=e.get(null===i.key?n:i.key)||null,i,s);case A:return m(e,t,n,(0,i._init)(i._payload),s)}if(te(i)||R(i))return u(t,e=e.get(n)||null,i,s,null);vr(t,i)}return null}function f(s,r,a,l){for(var c=null,d=null,u=r,f=r=0,g=null;null!==u&&f<a.length;f++){u.index>f?(g=u,u=null):g=u.sibling;var v=p(s,u,a[f],l);if(null===v){null===u&&(u=g);break}e&&u&&null===v.alternate&&t(s,u),r=o(v,r,f),null===d?c=v:d.sibling=v,d=v,u=g}if(f===a.length)return n(s,u),sr&&Qs(s,f),c;if(null===u){for(;f<a.length;f++)null!==(u=h(s,a[f],l))&&(r=o(u,r,f),null===d?c=u:d.sibling=u,d=u);return sr&&Qs(s,f),c}for(u=i(s,u);f<a.length;f++)null!==(g=m(u,s,f,a[f],l))&&(e&&null!==g.alternate&&u.delete(null===g.key?f:g.key),r=o(g,r,f),null===d?c=g:d.sibling=g,d=g);return e&&u.forEach(function(e){return t(s,e)}),sr&&Qs(s,f),c}function g(s,a,l,c){var d=R(l);if("function"!=typeof d)throw Error(r(150));if(null==(l=d.call(l)))throw Error(r(151));for(var u=d=null,f=a,g=a=0,v=null,_=l.next();null!==f&&!_.done;g++,_=l.next()){f.index>g?(v=f,f=null):v=f.sibling;var b=p(s,f,_.value,c);if(null===b){null===f&&(f=v);break}e&&f&&null===b.alternate&&t(s,f),a=o(b,a,g),null===u?d=b:u.sibling=b,u=b,f=v}if(_.done)return n(s,f),sr&&Qs(s,g),d;if(null===f){for(;!_.done;g++,_=l.next())null!==(_=h(s,_.value,c))&&(a=o(_,a,g),null===u?d=_:u.sibling=_,u=_);return sr&&Qs(s,g),d}for(f=i(s,f);!_.done;g++,_=l.next())null!==(_=m(f,s,g,_.value,c))&&(e&&null!==_.alternate&&f.delete(null===_.key?g:_.key),a=o(_,a,g),null===u?d=_:u.sibling=_,u=_);return e&&f.forEach(function(e){return t(s,e)}),sr&&Qs(s,g),d}return function e(i,r,o,l){if("object"==typeof o&&null!==o&&o.type===S&&null===o.key&&(o=o.props.children),"object"==typeof o&&null!==o){switch(o.$$typeof){case w:e:{for(var c=o.key,d=r;null!==d;){if(d.key===c){if((c=o.type)===S){if(7===d.tag){n(i,d.sibling),(r=s(d,o.props.children)).return=i,i=r;break e}}else if(d.elementType===c||"object"==typeof c&&null!==c&&c.$$typeof===A&&_r(c)===d.type){n(i,d.sibling),(r=s(d,o.props)).ref=gr(i,d,o),r.return=i,i=r;break e}n(i,d);break}t(i,d),d=d.sibling}o.type===S?((r=Rc(o.props.children,i.mode,l,o.key)).return=i,i=r):((l=Tc(o.type,o.key,o.props,null,i.mode,l)).ref=gr(i,r,o),l.return=i,i=l)}return a(i);case x:e:{for(d=o.key;null!==r;){if(r.key===d){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(i,r.sibling),(r=s(r,o.children||[])).return=i,i=r;break e}n(i,r);break}t(i,r),r=r.sibling}(r=Nc(o,i.mode,l)).return=i,i=r}return a(i);case A:return e(i,r,(d=o._init)(o._payload),l)}if(te(o))return f(i,r,o,l);if(R(o))return g(i,r,o,l);vr(i,o)}return"string"==typeof o&&""!==o||"number"==typeof o?(o=""+o,null!==r&&6===r.tag?(n(i,r.sibling),(r=s(r,o)).return=i,i=r):(n(i,r),(r=zc(o,i.mode,l)).return=i,i=r),a(i)):n(i,r)}}var yr=br(!0),wr=br(!1),xr=Cs(null),Sr=null,Cr=null,kr=null;function Er(){kr=Cr=Sr=null}function Mr(e){var t=xr.current;ks(xr),e._currentValue=t}function Pr(e,t,n){for(;null!==e;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==i&&(i.childLanes|=t)):null!==i&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===n)break;e=e.return}}function Ir(e,t){Sr=e,kr=Cr=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(ba=!0),e.firstContext=null)}function Lr(e){var t=e._currentValue;if(kr!==e)if(e={context:e,memoizedValue:t,next:null},null===Cr){if(null===Sr)throw Error(r(308));Cr=e,Sr.dependencies={lanes:0,firstContext:e}}else Cr=Cr.next=e;return t}var Or=null;function Ar(e){null===Or?Or=[e]:Or.push(e)}function Dr(e,t,n,i){var s=t.interleaved;return null===s?(n.next=n,Ar(t)):(n.next=s.next,s.next=n),t.interleaved=n,Tr(e,i)}function Tr(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Rr=!1;function jr(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function zr(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Nr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Br(e,t,n){var i=e.updateQueue;if(null===i)return null;if(i=i.shared,2&Pl){var s=i.pending;return null===s?t.next=t:(t.next=s.next,s.next=t),i.pending=t,Tr(e,n)}return null===(s=i.interleaved)?(t.next=t,Ar(i)):(t.next=s.next,s.next=t),i.interleaved=t,Tr(e,n)}function Fr(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var i=t.lanes;n|=i&=e.pendingLanes,t.lanes=n,_t(e,n)}}function Ur(e,t){var n=e.updateQueue,i=e.alternate;if(null!==i&&n===(i=i.updateQueue)){var s=null,r=null;if(null!==(n=n.firstBaseUpdate)){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===r?s=r=o:r=r.next=o,n=n.next}while(null!==n);null===r?s=r=t:r=r.next=t}else s=r=t;return n={baseState:i.baseState,firstBaseUpdate:s,lastBaseUpdate:r,shared:i.shared,effects:i.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Hr(e,t,n,i){var s=e.updateQueue;Rr=!1;var r=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(null!==a){s.shared.pending=null;var l=a,c=l.next;l.next=null,null===o?r=c:o.next=c,o=l;var d=e.alternate;null!==d&&(a=(d=d.updateQueue).lastBaseUpdate)!==o&&(null===a?d.firstBaseUpdate=c:a.next=c,d.lastBaseUpdate=l)}if(null!==r){var u=s.baseState;for(o=0,d=c=l=null,a=r;;){var h=a.lane,p=a.eventTime;if((i&h)===h){null!==d&&(d=d.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var m=e,f=a;switch(h=t,p=n,f.tag){case 1:if("function"==typeof(m=f.payload)){u=m.call(p,u,h);break e}u=m;break e;case 3:m.flags=-65537&m.flags|128;case 0:if(null==(h="function"==typeof(m=f.payload)?m.call(p,u,h):m))break e;u=z({},u,h);break e;case 2:Rr=!0}}null!==a.callback&&0!==a.lane&&(e.flags|=64,null===(h=s.effects)?s.effects=[a]:h.push(a))}else p={eventTime:p,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===d?(c=d=p,l=u):d=d.next=p,o|=h;if(null===(a=a.next)){if(null===(a=s.shared.pending))break;a=(h=a).next,h.next=null,s.lastBaseUpdate=h,s.shared.pending=null}}if(null===d&&(l=u),s.baseState=l,s.firstBaseUpdate=c,s.lastBaseUpdate=d,null!==(t=s.shared.interleaved)){s=t;do{o|=s.lane,s=s.next}while(s!==t)}else null===r&&(s.shared.lanes=0);jl|=o,e.lanes=o,e.memoizedState=u}}function Wr(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var i=e[t],s=i.callback;if(null!==s){if(i.callback=null,i=n,"function"!=typeof s)throw Error(r(191,s));s.call(i)}}}var $r={},qr=Cs($r),Vr=Cs($r),Kr=Cs($r);function Jr(e){if(e===$r)throw Error(r(174));return e}function Gr(e,t){switch(Es(Kr,t),Es(Vr,e),Es(qr,$r),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:le(null,"");break;default:t=le(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}ks(qr),Es(qr,t)}function Yr(){ks(qr),ks(Vr),ks(Kr)}function Xr(e){Jr(Kr.current);var t=Jr(qr.current),n=le(t,e.type);t!==n&&(Es(Vr,e),Es(qr,n))}function Qr(e){Vr.current===e&&(ks(qr),ks(Vr))}var Zr=Cs(0);function eo(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var to=[];function no(){for(var e=0;e<to.length;e++)to[e]._workInProgressVersionPrimary=null;to.length=0}var io=y.ReactCurrentDispatcher,so=y.ReactCurrentBatchConfig,ro=0,oo=null,ao=null,lo=null,co=!1,uo=!1,ho=0,po=0;function mo(){throw Error(r(321))}function fo(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ai(e[n],t[n]))return!1;return!0}function go(e,t,n,i,s,o){if(ro=o,oo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,io.current=null===e||null===e.memoizedState?Zo:ea,e=n(i,s),uo){o=0;do{if(uo=!1,ho=0,25<=o)throw Error(r(301));o+=1,lo=ao=null,t.updateQueue=null,io.current=ta,e=n(i,s)}while(uo)}if(io.current=Qo,t=null!==ao&&null!==ao.next,ro=0,lo=ao=oo=null,co=!1,t)throw Error(r(300));return e}function vo(){var e=0!==ho;return ho=0,e}function _o(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===lo?oo.memoizedState=lo=e:lo=lo.next=e,lo}function bo(){if(null===ao){var e=oo.alternate;e=null!==e?e.memoizedState:null}else e=ao.next;var t=null===lo?oo.memoizedState:lo.next;if(null!==t)lo=t,ao=e;else{if(null===e)throw Error(r(310));e={memoizedState:(ao=e).memoizedState,baseState:ao.baseState,baseQueue:ao.baseQueue,queue:ao.queue,next:null},null===lo?oo.memoizedState=lo=e:lo=lo.next=e}return lo}function yo(e,t){return"function"==typeof t?t(e):t}function wo(e){var t=bo(),n=t.queue;if(null===n)throw Error(r(311));n.lastRenderedReducer=e;var i=ao,s=i.baseQueue,o=n.pending;if(null!==o){if(null!==s){var a=s.next;s.next=o.next,o.next=a}i.baseQueue=s=o,n.pending=null}if(null!==s){o=s.next,i=i.baseState;var l=a=null,c=null,d=o;do{var u=d.lane;if((ro&u)===u)null!==c&&(c=c.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),i=d.hasEagerState?d.eagerState:e(i,d.action);else{var h={lane:u,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};null===c?(l=c=h,a=i):c=c.next=h,oo.lanes|=u,jl|=u}d=d.next}while(null!==d&&d!==o);null===c?a=i:c.next=l,ai(i,t.memoizedState)||(ba=!0),t.memoizedState=i,t.baseState=a,t.baseQueue=c,n.lastRenderedState=i}if(null!==(e=n.interleaved)){s=e;do{o=s.lane,oo.lanes|=o,jl|=o,s=s.next}while(s!==e)}else null===s&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function xo(e){var t=bo(),n=t.queue;if(null===n)throw Error(r(311));n.lastRenderedReducer=e;var i=n.dispatch,s=n.pending,o=t.memoizedState;if(null!==s){n.pending=null;var a=s=s.next;do{o=e(o,a.action),a=a.next}while(a!==s);ai(o,t.memoizedState)||(ba=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,i]}function So(){}function Co(e,t){var n=oo,i=bo(),s=t(),o=!ai(i.memoizedState,s);if(o&&(i.memoizedState=s,ba=!0),i=i.queue,jo(Mo.bind(null,n,i,e),[e]),i.getSnapshot!==t||o||null!==lo&&1&lo.memoizedState.tag){if(n.flags|=2048,Oo(9,Eo.bind(null,n,i,s,t),void 0,null),null===Il)throw Error(r(349));30&ro||ko(n,t,s)}return s}function ko(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=oo.updateQueue)?(t={lastEffect:null,stores:null},oo.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Eo(e,t,n,i){t.value=n,t.getSnapshot=i,Po(t)&&Io(e)}function Mo(e,t,n){return n(function(){Po(t)&&Io(e)})}function Po(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ai(e,n)}catch(e){return!0}}function Io(e){var t=Tr(e,1);null!==t&&nc(t,e,1,-1)}function Lo(e){var t=_o();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:yo,lastRenderedState:e},t.queue=e,e=e.dispatch=Jo.bind(null,oo,e),[t.memoizedState,e]}function Oo(e,t,n,i){return e={tag:e,create:t,destroy:n,deps:i,next:null},null===(t=oo.updateQueue)?(t={lastEffect:null,stores:null},oo.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(i=n.next,n.next=e,e.next=i,t.lastEffect=e),e}function Ao(){return bo().memoizedState}function Do(e,t,n,i){var s=_o();oo.flags|=e,s.memoizedState=Oo(1|t,n,void 0,void 0===i?null:i)}function To(e,t,n,i){var s=bo();i=void 0===i?null:i;var r=void 0;if(null!==ao){var o=ao.memoizedState;if(r=o.destroy,null!==i&&fo(i,o.deps))return void(s.memoizedState=Oo(t,n,r,i))}oo.flags|=e,s.memoizedState=Oo(1|t,n,r,i)}function Ro(e,t){return Do(8390656,8,e,t)}function jo(e,t){return To(2048,8,e,t)}function zo(e,t){return To(4,2,e,t)}function No(e,t){return To(4,4,e,t)}function Bo(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Fo(e,t,n){return n=null!=n?n.concat([e]):null,To(4,4,Bo.bind(null,t,e),n)}function Uo(){}function Ho(e,t){var n=bo();t=void 0===t?null:t;var i=n.memoizedState;return null!==i&&null!==t&&fo(t,i[1])?i[0]:(n.memoizedState=[e,t],e)}function Wo(e,t){var n=bo();t=void 0===t?null:t;var i=n.memoizedState;return null!==i&&null!==t&&fo(t,i[1])?i[0]:(e=e(),n.memoizedState=[e,t],e)}function $o(e,t,n){return 21&ro?(ai(n,t)||(n=ft(),oo.lanes|=n,jl|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ba=!0),e.memoizedState=n)}function qo(e,t){var n=bt;bt=0!==n&&4>n?n:4,e(!0);var i=so.transition;so.transition={};try{e(!1),t()}finally{bt=n,so.transition=i}}function Vo(){return bo().memoizedState}function Ko(e,t,n){var i=tc(e);n={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null},Go(e)?Yo(t,n):null!==(n=Dr(e,t,n,i))&&(nc(n,e,i,ec()),Xo(n,t,i))}function Jo(e,t,n){var i=tc(e),s={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(Go(e))Yo(t,s);else{var r=e.alternate;if(0===e.lanes&&(null===r||0===r.lanes)&&null!==(r=t.lastRenderedReducer))try{var o=t.lastRenderedState,a=r(o,n);if(s.hasEagerState=!0,s.eagerState=a,ai(a,o)){var l=t.interleaved;return null===l?(s.next=s,Ar(t)):(s.next=l.next,l.next=s),void(t.interleaved=s)}}catch(e){}null!==(n=Dr(e,t,s,i))&&(nc(n,e,i,s=ec()),Xo(n,t,i))}}function Go(e){var t=e.alternate;return e===oo||null!==t&&t===oo}function Yo(e,t){uo=co=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Xo(e,t,n){if(4194240&n){var i=t.lanes;n|=i&=e.pendingLanes,t.lanes=n,_t(e,n)}}var Qo={readContext:Lr,useCallback:mo,useContext:mo,useEffect:mo,useImperativeHandle:mo,useInsertionEffect:mo,useLayoutEffect:mo,useMemo:mo,useReducer:mo,useRef:mo,useState:mo,useDebugValue:mo,useDeferredValue:mo,useTransition:mo,useMutableSource:mo,useSyncExternalStore:mo,useId:mo,unstable_isNewReconciler:!1},Zo={readContext:Lr,useCallback:function(e,t){return _o().memoizedState=[e,void 0===t?null:t],e},useContext:Lr,useEffect:Ro,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Do(4194308,4,Bo.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Do(4194308,4,e,t)},useInsertionEffect:function(e,t){return Do(4,2,e,t)},useMemo:function(e,t){var n=_o();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var i=_o();return t=void 0!==n?n(t):t,i.memoizedState=i.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},i.queue=e,e=e.dispatch=Ko.bind(null,oo,e),[i.memoizedState,e]},useRef:function(e){return e={current:e},_o().memoizedState=e},useState:Lo,useDebugValue:Uo,useDeferredValue:function(e){return _o().memoizedState=e},useTransition:function(){var e=Lo(!1),t=e[0];return e=qo.bind(null,e[1]),_o().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=oo,s=_o();if(sr){if(void 0===n)throw Error(r(407));n=n()}else{if(n=t(),null===Il)throw Error(r(349));30&ro||ko(i,t,n)}s.memoizedState=n;var o={value:n,getSnapshot:t};return s.queue=o,Ro(Mo.bind(null,i,o,e),[e]),i.flags|=2048,Oo(9,Eo.bind(null,i,o,n,t),void 0,null),n},useId:function(){var e=_o(),t=Il.identifierPrefix;if(sr){var n=Xs;t=":"+t+"R"+(n=(Ys&~(1<<32-ot(Ys)-1)).toString(32)+n),0<(n=ho++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=po++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ea={readContext:Lr,useCallback:Ho,useContext:Lr,useEffect:jo,useImperativeHandle:Fo,useInsertionEffect:zo,useLayoutEffect:No,useMemo:Wo,useReducer:wo,useRef:Ao,useState:function(){return wo(yo)},useDebugValue:Uo,useDeferredValue:function(e){return $o(bo(),ao.memoizedState,e)},useTransition:function(){return[wo(yo)[0],bo().memoizedState]},useMutableSource:So,useSyncExternalStore:Co,useId:Vo,unstable_isNewReconciler:!1},ta={readContext:Lr,useCallback:Ho,useContext:Lr,useEffect:jo,useImperativeHandle:Fo,useInsertionEffect:zo,useLayoutEffect:No,useMemo:Wo,useReducer:xo,useRef:Ao,useState:function(){return xo(yo)},useDebugValue:Uo,useDeferredValue:function(e){var t=bo();return null===ao?t.memoizedState=e:$o(t,ao.memoizedState,e)},useTransition:function(){return[xo(yo)[0],bo().memoizedState]},useMutableSource:So,useSyncExternalStore:Co,useId:Vo,unstable_isNewReconciler:!1};function na(e,t){if(e&&e.defaultProps){for(var n in t=z({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function ia(e,t,n,i){n=null==(n=n(i,t=e.memoizedState))?t:z({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var sa={isMounted:function(e){return!!(e=e._reactInternals)&&He(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var i=ec(),s=tc(e),r=Nr(i,s);r.payload=t,null!=n&&(r.callback=n),null!==(t=Br(e,r,s))&&(nc(t,e,s,i),Fr(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var i=ec(),s=tc(e),r=Nr(i,s);r.tag=1,r.payload=t,null!=n&&(r.callback=n),null!==(t=Br(e,r,s))&&(nc(t,e,s,i),Fr(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ec(),i=tc(e),s=Nr(n,i);s.tag=2,null!=t&&(s.callback=t),null!==(t=Br(e,s,i))&&(nc(t,e,i,n),Fr(t,e,i))}};function ra(e,t,n,i,s,r,o){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(i,r,o):!(t.prototype&&t.prototype.isPureReactComponent&&li(n,i)&&li(s,r))}function oa(e,t,n){var i=!1,s=Ms,r=t.contextType;return"object"==typeof r&&null!==r?r=Lr(r):(s=As(t)?Ls:Ps.current,r=(i=null!=(i=t.contextTypes))?Os(e,s):Ms),t=new t(n,r),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=sa,e.stateNode=t,t._reactInternals=e,i&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=r),t}function aa(e,t,n,i){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,i),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,i),t.state!==e&&sa.enqueueReplaceState(t,t.state,null)}function la(e,t,n,i){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},jr(e);var r=t.contextType;"object"==typeof r&&null!==r?s.context=Lr(r):(r=As(t)?Ls:Ps.current,s.context=Os(e,r)),s.state=e.memoizedState,"function"==typeof(r=t.getDerivedStateFromProps)&&(ia(e,t,r,n),s.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof s.getSnapshotBeforeUpdate||"function"!=typeof s.UNSAFE_componentWillMount&&"function"!=typeof s.componentWillMount||(t=s.state,"function"==typeof s.componentWillMount&&s.componentWillMount(),"function"==typeof s.UNSAFE_componentWillMount&&s.UNSAFE_componentWillMount(),t!==s.state&&sa.enqueueReplaceState(s,s.state,null),Hr(e,n,s,i),s.state=e.memoizedState),"function"==typeof s.componentDidMount&&(e.flags|=4194308)}function ca(e,t){try{var n="",i=t;do{n+=U(i),i=i.return}while(i);var s=n}catch(e){s="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:s,digest:null}}function da(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function ua(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}var ha="function"==typeof WeakMap?WeakMap:Map;function pa(e,t,n){(n=Nr(-1,n)).tag=3,n.payload={element:null};var i=t.value;return n.callback=function(){$l||($l=!0,ql=i),ua(0,t)},n}function ma(e,t,n){(n=Nr(-1,n)).tag=3;var i=e.type.getDerivedStateFromError;if("function"==typeof i){var s=t.value;n.payload=function(){return i(s)},n.callback=function(){ua(0,t)}}var r=e.stateNode;return null!==r&&"function"==typeof r.componentDidCatch&&(n.callback=function(){ua(0,t),"function"!=typeof i&&(null===Vl?Vl=new Set([this]):Vl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function fa(e,t,n){var i=e.pingCache;if(null===i){i=e.pingCache=new ha;var s=new Set;i.set(t,s)}else void 0===(s=i.get(t))&&(s=new Set,i.set(t,s));s.has(n)||(s.add(n),e=kc.bind(null,e,t,n),t.then(e,e))}function ga(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function va(e,t,n,i,s){return 1&e.mode?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Nr(-1,1)).tag=2,Br(n,t,1))),n.lanes|=1),e)}var _a=y.ReactCurrentOwner,ba=!1;function ya(e,t,n,i){t.child=null===e?wr(t,null,n,i):yr(t,e.child,n,i)}function wa(e,t,n,i,s){n=n.render;var r=t.ref;return Ir(t,s),i=go(e,t,n,i,r,s),n=vo(),null===e||ba?(sr&&n&&er(t),t.flags|=1,ya(e,t,i,s),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,$a(e,t,s))}function xa(e,t,n,i,s){if(null===e){var r=n.type;return"function"!=typeof r||Ac(r)||void 0!==r.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Tc(n.type,null,i,t,t.mode,s)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=r,Sa(e,t,r,i,s))}if(r=e.child,0===(e.lanes&s)){var o=r.memoizedProps;if((n=null!==(n=n.compare)?n:li)(o,i)&&e.ref===t.ref)return $a(e,t,s)}return t.flags|=1,(e=Dc(r,i)).ref=t.ref,e.return=t,t.child=e}function Sa(e,t,n,i,s){if(null!==e){var r=e.memoizedProps;if(li(r,i)&&e.ref===t.ref){if(ba=!1,t.pendingProps=i=r,0===(e.lanes&s))return t.lanes=e.lanes,$a(e,t,s);131072&e.flags&&(ba=!0)}}return Ea(e,t,n,i,s)}function Ca(e,t,n){var i=t.pendingProps,s=i.children,r=null!==e?e.memoizedState:null;if("hidden"===i.mode)if(1&t.mode){if(!(1073741824&n))return e=null!==r?r.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Es(Dl,Al),Al|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=null!==r?r.baseLanes:n,Es(Dl,Al),Al|=i}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Es(Dl,Al),Al|=n;else null!==r?(i=r.baseLanes|n,t.memoizedState=null):i=n,Es(Dl,Al),Al|=i;return ya(e,t,s,n),t.child}function ka(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ea(e,t,n,i,s){var r=As(n)?Ls:Ps.current;return r=Os(t,r),Ir(t,s),n=go(e,t,n,i,r,s),i=vo(),null===e||ba?(sr&&i&&er(t),t.flags|=1,ya(e,t,n,s),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,$a(e,t,s))}function Ma(e,t,n,i,s){if(As(n)){var r=!0;js(t)}else r=!1;if(Ir(t,s),null===t.stateNode)Wa(e,t),oa(t,n,i),la(t,n,i,s),i=!0;else if(null===e){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,c=n.contextType;c="object"==typeof c&&null!==c?Lr(c):Os(t,c=As(n)?Ls:Ps.current);var d=n.getDerivedStateFromProps,u="function"==typeof d||"function"==typeof o.getSnapshotBeforeUpdate;u||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(a!==i||l!==c)&&aa(t,o,i,c),Rr=!1;var h=t.memoizedState;o.state=h,Hr(t,i,o,s),l=t.memoizedState,a!==i||h!==l||Is.current||Rr?("function"==typeof d&&(ia(t,n,d,i),l=t.memoizedState),(a=Rr||ra(t,n,a,i,h,l,c))?(u||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||("function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"==typeof o.componentDidMount&&(t.flags|=4194308)):("function"==typeof o.componentDidMount&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=l),o.props=i,o.state=l,o.context=c,i=a):("function"==typeof o.componentDidMount&&(t.flags|=4194308),i=!1)}else{o=t.stateNode,zr(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:na(t.type,a),o.props=c,u=t.pendingProps,h=o.context,l="object"==typeof(l=n.contextType)&&null!==l?Lr(l):Os(t,l=As(n)?Ls:Ps.current);var p=n.getDerivedStateFromProps;(d="function"==typeof p||"function"==typeof o.getSnapshotBeforeUpdate)||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(a!==u||h!==l)&&aa(t,o,i,l),Rr=!1,h=t.memoizedState,o.state=h,Hr(t,i,o,s);var m=t.memoizedState;a!==u||h!==m||Is.current||Rr?("function"==typeof p&&(ia(t,n,p,i),m=t.memoizedState),(c=Rr||ra(t,n,c,i,h,m,l)||!1)?(d||"function"!=typeof o.UNSAFE_componentWillUpdate&&"function"!=typeof o.componentWillUpdate||("function"==typeof o.componentWillUpdate&&o.componentWillUpdate(i,m,l),"function"==typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(i,m,l)),"function"==typeof o.componentDidUpdate&&(t.flags|=4),"function"==typeof o.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof o.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=m),o.props=i,o.state=m,o.context=l,i=c):("function"!=typeof o.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),i=!1)}return Pa(e,t,n,i,r,s)}function Pa(e,t,n,i,s,r){ka(e,t);var o=!!(128&t.flags);if(!i&&!o)return s&&zs(t,n,!1),$a(e,t,r);i=t.stateNode,_a.current=t;var a=o&&"function"!=typeof n.getDerivedStateFromError?null:i.render();return t.flags|=1,null!==e&&o?(t.child=yr(t,e.child,null,r),t.child=yr(t,null,a,r)):ya(e,t,a,r),t.memoizedState=i.state,s&&zs(t,n,!0),t.child}function Ia(e){var t=e.stateNode;t.pendingContext?Ts(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Ts(0,t.context,!1),Gr(e,t.containerInfo)}function La(e,t,n,i,s){return pr(),mr(s),t.flags|=256,ya(e,t,n,i),t.child}var Oa,Aa,Da,Ta,Ra={dehydrated:null,treeContext:null,retryLane:0};function ja(e){return{baseLanes:e,cachePool:null,transitions:null}}function za(e,t,n){var i,s=t.pendingProps,o=Zr.current,a=!1,l=!!(128&t.flags);if((i=l)||(i=(null===e||null!==e.memoizedState)&&!!(2&o)),i?(a=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(o|=1),Es(Zr,1&o),null===e)return cr(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=s.children,e=s.fallback,a?(s=t.mode,a=t.child,l={mode:"hidden",children:l},1&s||null===a?a=jc(l,s,0,null):(a.childLanes=0,a.pendingProps=l),e=Rc(e,s,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=ja(n),t.memoizedState=Ra,e):Na(t,l));if(null!==(o=e.memoizedState)&&null!==(i=o.dehydrated))return function(e,t,n,i,s,o,a){if(n)return 256&t.flags?(t.flags&=-257,Ba(e,t,a,i=da(Error(r(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(o=i.fallback,s=t.mode,i=jc({mode:"visible",children:i.children},s,0,null),(o=Rc(o,s,a,null)).flags|=2,i.return=t,o.return=t,i.sibling=o,t.child=i,1&t.mode&&yr(t,e.child,null,a),t.child.memoizedState=ja(a),t.memoizedState=Ra,o);if(!(1&t.mode))return Ba(e,t,a,null);if("$!"===s.data){if(i=s.nextSibling&&s.nextSibling.dataset)var l=i.dgst;return i=l,Ba(e,t,a,i=da(o=Error(r(419)),i,void 0))}if(l=0!==(a&e.childLanes),ba||l){if(null!==(i=Il)){switch(a&-a){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}0!==(s=0!==(s&(i.suspendedLanes|a))?0:s)&&s!==o.retryLane&&(o.retryLane=s,Tr(e,s),nc(i,e,s,-1))}return fc(),Ba(e,t,a,i=da(Error(r(421))))}return"$?"===s.data?(t.flags|=128,t.child=e.child,t=Mc.bind(null,e),s._reactRetry=t,null):(e=o.treeContext,ir=cs(s.nextSibling),nr=t,sr=!0,rr=null,null!==e&&(Ks[Js++]=Ys,Ks[Js++]=Xs,Ks[Js++]=Gs,Ys=e.id,Xs=e.overflow,Gs=t),(t=Na(t,i.children)).flags|=4096,t)}(e,t,l,s,i,o,n);if(a){a=s.fallback,l=t.mode,i=(o=e.child).sibling;var c={mode:"hidden",children:s.children};return 1&l||t.child===o?(s=Dc(o,c)).subtreeFlags=14680064&o.subtreeFlags:((s=t.child).childLanes=0,s.pendingProps=c,t.deletions=null),null!==i?a=Dc(i,a):(a=Rc(a,l,n,null)).flags|=2,a.return=t,s.return=t,s.sibling=a,t.child=s,s=a,a=t.child,l=null===(l=e.child.memoizedState)?ja(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},a.memoizedState=l,a.childLanes=e.childLanes&~n,t.memoizedState=Ra,s}return e=(a=e.child).sibling,s=Dc(a,{mode:"visible",children:s.children}),!(1&t.mode)&&(s.lanes=n),s.return=t,s.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=s,t.memoizedState=null,s}function Na(e,t){return(t=jc({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Ba(e,t,n,i){return null!==i&&mr(i),yr(t,e.child,null,n),(e=Na(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Fa(e,t,n){e.lanes|=t;var i=e.alternate;null!==i&&(i.lanes|=t),Pr(e.return,t,n)}function Ua(e,t,n,i,s){var r=e.memoizedState;null===r?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:s}:(r.isBackwards=t,r.rendering=null,r.renderingStartTime=0,r.last=i,r.tail=n,r.tailMode=s)}function Ha(e,t,n){var i=t.pendingProps,s=i.revealOrder,r=i.tail;if(ya(e,t,i.children,n),2&(i=Zr.current))i=1&i|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Fa(e,n,t);else if(19===e.tag)Fa(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}i&=1}if(Es(Zr,i),1&t.mode)switch(s){case"forwards":for(n=t.child,s=null;null!==n;)null!==(e=n.alternate)&&null===eo(e)&&(s=n),n=n.sibling;null===(n=s)?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Ua(t,!1,s,n,r);break;case"backwards":for(n=null,s=t.child,t.child=null;null!==s;){if(null!==(e=s.alternate)&&null===eo(e)){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Ua(t,!0,n,null,r);break;case"together":Ua(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function Wa(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function $a(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),jl|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(r(153));if(null!==t.child){for(n=Dc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Dc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function qa(e,t){if(!sr)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var i=null;null!==n;)null!==n.alternate&&(i=n),n=n.sibling;null===i?t||null===e.tail?e.tail=null:e.tail.sibling=null:i.sibling=null}}function Va(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,i=0;if(t)for(var s=e.child;null!==s;)n|=s.lanes|s.childLanes,i|=14680064&s.subtreeFlags,i|=14680064&s.flags,s.return=e,s=s.sibling;else for(s=e.child;null!==s;)n|=s.lanes|s.childLanes,i|=s.subtreeFlags,i|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=i,e.childLanes=n,t}function Ka(e,t,n){var i=t.pendingProps;switch(tr(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Va(t),null;case 1:case 17:return As(t.type)&&Ds(),Va(t),null;case 3:return i=t.stateNode,Yr(),ks(Is),ks(Ps),no(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),null!==e&&null!==e.child||(ur(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==rr&&(oc(rr),rr=null))),Aa(e,t),Va(t),null;case 5:Qr(t);var s=Jr(Kr.current);if(n=t.type,null!==e&&null!=t.stateNode)Da(e,t,n,i,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(null===t.stateNode)throw Error(r(166));return Va(t),null}if(e=Jr(qr.current),ur(t)){i=t.stateNode,n=t.type;var o=t.memoizedProps;switch(i[hs]=t,i[ps]=o,e=!!(1&t.mode),n){case"dialog":Bi("cancel",i),Bi("close",i);break;case"iframe":case"object":case"embed":Bi("load",i);break;case"video":case"audio":for(s=0;s<Ri.length;s++)Bi(Ri[s],i);break;case"source":Bi("error",i);break;case"img":case"image":case"link":Bi("error",i),Bi("load",i);break;case"details":Bi("toggle",i);break;case"input":Y(i,o),Bi("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!o.multiple},Bi("invalid",i);break;case"textarea":se(i,o),Bi("invalid",i)}for(var l in _e(n,o),s=null,o)if(o.hasOwnProperty(l)){var c=o[l];"children"===l?"string"==typeof c?i.textContent!==c&&(!0!==o.suppressHydrationWarning&&Qi(i.textContent,c,e),s=["children",c]):"number"==typeof c&&i.textContent!==""+c&&(!0!==o.suppressHydrationWarning&&Qi(i.textContent,c,e),s=["children",""+c]):a.hasOwnProperty(l)&&null!=c&&"onScroll"===l&&Bi("scroll",i)}switch(n){case"input":V(i),Z(i,o,!0);break;case"textarea":V(i),oe(i);break;case"select":case"option":break;default:"function"==typeof o.onClick&&(i.onclick=Zi)}i=s,t.updateQueue=i,null!==i&&(t.flags|=4)}else{l=9===s.nodeType?s:s.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=ae(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof i.is?e=l.createElement(n,{is:i.is}):(e=l.createElement(n),"select"===n&&(l=e,i.multiple?l.multiple=!0:i.size&&(l.size=i.size))):e=l.createElementNS(e,n),e[hs]=t,e[ps]=i,Oa(e,t,!1,!1),t.stateNode=e;e:{switch(l=be(n,i),n){case"dialog":Bi("cancel",e),Bi("close",e),s=i;break;case"iframe":case"object":case"embed":Bi("load",e),s=i;break;case"video":case"audio":for(s=0;s<Ri.length;s++)Bi(Ri[s],e);s=i;break;case"source":Bi("error",e),s=i;break;case"img":case"image":case"link":Bi("error",e),Bi("load",e),s=i;break;case"details":Bi("toggle",e),s=i;break;case"input":Y(e,i),s=G(e,i),Bi("invalid",e);break;case"option":default:s=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},s=z({},i,{value:void 0}),Bi("invalid",e);break;case"textarea":se(e,i),s=ie(e,i),Bi("invalid",e)}for(o in _e(n,s),c=s)if(c.hasOwnProperty(o)){var d=c[o];"style"===o?ge(e,d):"dangerouslySetInnerHTML"===o?null!=(d=d?d.__html:void 0)&&ue(e,d):"children"===o?"string"==typeof d?("textarea"!==n||""!==d)&&he(e,d):"number"==typeof d&&he(e,""+d):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(a.hasOwnProperty(o)?null!=d&&"onScroll"===o&&Bi("scroll",e):null!=d&&b(e,o,d,l))}switch(n){case"input":V(e),Z(e,i,!1);break;case"textarea":V(e),oe(e);break;case"option":null!=i.value&&e.setAttribute("value",""+$(i.value));break;case"select":e.multiple=!!i.multiple,null!=(o=i.value)?ne(e,!!i.multiple,o,!1):null!=i.defaultValue&&ne(e,!!i.multiple,i.defaultValue,!0);break;default:"function"==typeof s.onClick&&(e.onclick=Zi)}switch(n){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}}i&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Va(t),null;case 6:if(e&&null!=t.stateNode)Ta(e,t,e.memoizedProps,i);else{if("string"!=typeof i&&null===t.stateNode)throw Error(r(166));if(n=Jr(Kr.current),Jr(qr.current),ur(t)){if(i=t.stateNode,n=t.memoizedProps,i[hs]=t,(o=i.nodeValue!==n)&&null!==(e=nr))switch(e.tag){case 3:Qi(i.nodeValue,n,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Qi(i.nodeValue,n,!!(1&e.mode))}o&&(t.flags|=4)}else(i=(9===n.nodeType?n:n.ownerDocument).createTextNode(i))[hs]=t,t.stateNode=i}return Va(t),null;case 13:if(ks(Zr),i=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(sr&&null!==ir&&1&t.mode&&!(128&t.flags))hr(),pr(),t.flags|=98560,o=!1;else if(o=ur(t),null!==i&&null!==i.dehydrated){if(null===e){if(!o)throw Error(r(318));if(!(o=null!==(o=t.memoizedState)?o.dehydrated:null))throw Error(r(317));o[hs]=t}else pr(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Va(t),o=!1}else null!==rr&&(oc(rr),rr=null),o=!0;if(!o)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=n,t):((i=null!==i)!=(null!==e&&null!==e.memoizedState)&&i&&(t.child.flags|=8192,1&t.mode&&(null===e||1&Zr.current?0===Tl&&(Tl=3):fc())),null!==t.updateQueue&&(t.flags|=4),Va(t),null);case 4:return Yr(),Aa(e,t),null===e&&Hi(t.stateNode.containerInfo),Va(t),null;case 10:return Mr(t.type._context),Va(t),null;case 19:if(ks(Zr),null===(o=t.memoizedState))return Va(t),null;if(i=!!(128&t.flags),null===(l=o.rendering))if(i)qa(o,!1);else{if(0!==Tl||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(l=eo(e))){for(t.flags|=128,qa(o,!1),null!==(i=l.updateQueue)&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=n,n=t.child;null!==n;)e=i,(o=n).flags&=14680066,null===(l=o.alternate)?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=l.childLanes,o.lanes=l.lanes,o.child=l.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=l.memoizedProps,o.memoizedState=l.memoizedState,o.updateQueue=l.updateQueue,o.type=l.type,e=l.dependencies,o.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Es(Zr,1&Zr.current|2),t.child}e=e.sibling}null!==o.tail&&Xe()>Hl&&(t.flags|=128,i=!0,qa(o,!1),t.lanes=4194304)}else{if(!i)if(null!==(e=eo(l))){if(t.flags|=128,i=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),qa(o,!0),null===o.tail&&"hidden"===o.tailMode&&!l.alternate&&!sr)return Va(t),null}else 2*Xe()-o.renderingStartTime>Hl&&1073741824!==n&&(t.flags|=128,i=!0,qa(o,!1),t.lanes=4194304);o.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=o.last)?n.sibling=l:t.child=l,o.last=l)}return null!==o.tail?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Xe(),t.sibling=null,n=Zr.current,Es(Zr,i?1&n|2:1&n),t):(Va(t),null);case 22:case 23:return uc(),i=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==i&&(t.flags|=8192),i&&1&t.mode?!!(1073741824&Al)&&(Va(t),6&t.subtreeFlags&&(t.flags|=8192)):Va(t),null;case 24:case 25:return null}throw Error(r(156,t.tag))}function Ja(e,t){switch(tr(t),t.tag){case 1:return As(t.type)&&Ds(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Yr(),ks(Is),ks(Ps),no(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Qr(t),null;case 13:if(ks(Zr),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(r(340));pr()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return ks(Zr),null;case 4:return Yr(),null;case 10:return Mr(t.type._context),null;case 22:case 23:return uc(),null;default:return null}}Oa=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Aa=function(){},Da=function(e,t,n,i){var s=e.memoizedProps;if(s!==i){e=t.stateNode,Jr(qr.current);var r,o=null;switch(n){case"input":s=G(e,s),i=G(e,i),o=[];break;case"select":s=z({},s,{value:void 0}),i=z({},i,{value:void 0}),o=[];break;case"textarea":s=ie(e,s),i=ie(e,i),o=[];break;default:"function"!=typeof s.onClick&&"function"==typeof i.onClick&&(e.onclick=Zi)}for(d in _e(n,i),n=null,s)if(!i.hasOwnProperty(d)&&s.hasOwnProperty(d)&&null!=s[d])if("style"===d){var l=s[d];for(r in l)l.hasOwnProperty(r)&&(n||(n={}),n[r]="")}else"dangerouslySetInnerHTML"!==d&&"children"!==d&&"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&"autoFocus"!==d&&(a.hasOwnProperty(d)?o||(o=[]):(o=o||[]).push(d,null));for(d in i){var c=i[d];if(l=null!=s?s[d]:void 0,i.hasOwnProperty(d)&&c!==l&&(null!=c||null!=l))if("style"===d)if(l){for(r in l)!l.hasOwnProperty(r)||c&&c.hasOwnProperty(r)||(n||(n={}),n[r]="");for(r in c)c.hasOwnProperty(r)&&l[r]!==c[r]&&(n||(n={}),n[r]=c[r])}else n||(o||(o=[]),o.push(d,n)),n=c;else"dangerouslySetInnerHTML"===d?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(o=o||[]).push(d,c)):"children"===d?"string"!=typeof c&&"number"!=typeof c||(o=o||[]).push(d,""+c):"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&(a.hasOwnProperty(d)?(null!=c&&"onScroll"===d&&Bi("scroll",e),o||l===c||(o=[])):(o=o||[]).push(d,c))}n&&(o=o||[]).push("style",n);var d=o;(t.updateQueue=d)&&(t.flags|=4)}},Ta=function(e,t,n,i){n!==i&&(t.flags|=4)};var Ga=!1,Ya=!1,Xa="function"==typeof WeakSet?WeakSet:Set,Qa=null;function Za(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){Cc(e,t,n)}else n.current=null}function el(e,t,n){try{n()}catch(n){Cc(e,t,n)}}var tl=!1;function nl(e,t,n){var i=t.updateQueue;if(null!==(i=null!==i?i.lastEffect:null)){var s=i=i.next;do{if((s.tag&e)===e){var r=s.destroy;s.destroy=void 0,void 0!==r&&el(t,n,r)}s=s.next}while(s!==i)}}function il(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var i=n.create;n.destroy=i()}n=n.next}while(n!==t)}}function sl(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function rl(e){var t=e.alternate;null!==t&&(e.alternate=null,rl(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(t=e.stateNode)&&(delete t[hs],delete t[ps],delete t[fs],delete t[gs],delete t[vs]),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ol(e){return 5===e.tag||3===e.tag||4===e.tag}function al(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||ol(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function ll(e,t,n){var i=e.tag;if(5===i||6===i)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Zi));else if(4!==i&&null!==(e=e.child))for(ll(e,t,n),e=e.sibling;null!==e;)ll(e,t,n),e=e.sibling}function cl(e,t,n){var i=e.tag;if(5===i||6===i)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==i&&null!==(e=e.child))for(cl(e,t,n),e=e.sibling;null!==e;)cl(e,t,n),e=e.sibling}var dl=null,ul=!1;function hl(e,t,n){for(n=n.child;null!==n;)pl(e,t,n),n=n.sibling}function pl(e,t,n){if(rt&&"function"==typeof rt.onCommitFiberUnmount)try{rt.onCommitFiberUnmount(st,n)}catch(e){}switch(n.tag){case 5:Ya||Za(n,t);case 6:var i=dl,s=ul;dl=null,hl(e,t,n),ul=s,null!==(dl=i)&&(ul?(e=dl,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):dl.removeChild(n.stateNode));break;case 18:null!==dl&&(ul?(e=dl,n=n.stateNode,8===e.nodeType?ls(e.parentNode,n):1===e.nodeType&&ls(e,n),Ht(e)):ls(dl,n.stateNode));break;case 4:i=dl,s=ul,dl=n.stateNode.containerInfo,ul=!0,hl(e,t,n),dl=i,ul=s;break;case 0:case 11:case 14:case 15:if(!Ya&&null!==(i=n.updateQueue)&&null!==(i=i.lastEffect)){s=i=i.next;do{var r=s,o=r.destroy;r=r.tag,void 0!==o&&(2&r||4&r)&&el(n,t,o),s=s.next}while(s!==i)}hl(e,t,n);break;case 1:if(!Ya&&(Za(n,t),"function"==typeof(i=n.stateNode).componentWillUnmount))try{i.props=n.memoizedProps,i.state=n.memoizedState,i.componentWillUnmount()}catch(e){Cc(n,t,e)}hl(e,t,n);break;case 21:hl(e,t,n);break;case 22:1&n.mode?(Ya=(i=Ya)||null!==n.memoizedState,hl(e,t,n),Ya=i):hl(e,t,n);break;default:hl(e,t,n)}}function ml(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Xa),t.forEach(function(t){var i=Pc.bind(null,e,t);n.has(t)||(n.add(t),t.then(i,i))})}}function fl(e,t){var n=t.deletions;if(null!==n)for(var i=0;i<n.length;i++){var s=n[i];try{var o=e,a=t,l=a;e:for(;null!==l;){switch(l.tag){case 5:dl=l.stateNode,ul=!1;break e;case 3:case 4:dl=l.stateNode.containerInfo,ul=!0;break e}l=l.return}if(null===dl)throw Error(r(160));pl(o,a,s),dl=null,ul=!1;var c=s.alternate;null!==c&&(c.return=null),s.return=null}catch(e){Cc(s,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)gl(t,e),t=t.sibling}function gl(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(fl(t,e),vl(e),4&i){try{nl(3,e,e.return),il(3,e)}catch(t){Cc(e,e.return,t)}try{nl(5,e,e.return)}catch(t){Cc(e,e.return,t)}}break;case 1:fl(t,e),vl(e),512&i&&null!==n&&Za(n,n.return);break;case 5:if(fl(t,e),vl(e),512&i&&null!==n&&Za(n,n.return),32&e.flags){var s=e.stateNode;try{he(s,"")}catch(t){Cc(e,e.return,t)}}if(4&i&&null!=(s=e.stateNode)){var o=e.memoizedProps,a=null!==n?n.memoizedProps:o,l=e.type,c=e.updateQueue;if(e.updateQueue=null,null!==c)try{"input"===l&&"radio"===o.type&&null!=o.name&&X(s,o),be(l,a);var d=be(l,o);for(a=0;a<c.length;a+=2){var u=c[a],h=c[a+1];"style"===u?ge(s,h):"dangerouslySetInnerHTML"===u?ue(s,h):"children"===u?he(s,h):b(s,u,h,d)}switch(l){case"input":Q(s,o);break;case"textarea":re(s,o);break;case"select":var p=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var m=o.value;null!=m?ne(s,!!o.multiple,m,!1):p!==!!o.multiple&&(null!=o.defaultValue?ne(s,!!o.multiple,o.defaultValue,!0):ne(s,!!o.multiple,o.multiple?[]:"",!1))}s[ps]=o}catch(t){Cc(e,e.return,t)}}break;case 6:if(fl(t,e),vl(e),4&i){if(null===e.stateNode)throw Error(r(162));s=e.stateNode,o=e.memoizedProps;try{s.nodeValue=o}catch(t){Cc(e,e.return,t)}}break;case 3:if(fl(t,e),vl(e),4&i&&null!==n&&n.memoizedState.isDehydrated)try{Ht(t.containerInfo)}catch(t){Cc(e,e.return,t)}break;case 4:default:fl(t,e),vl(e);break;case 13:fl(t,e),vl(e),8192&(s=e.child).flags&&(o=null!==s.memoizedState,s.stateNode.isHidden=o,!o||null!==s.alternate&&null!==s.alternate.memoizedState||(Ul=Xe())),4&i&&ml(e);break;case 22:if(u=null!==n&&null!==n.memoizedState,1&e.mode?(Ya=(d=Ya)||u,fl(t,e),Ya=d):fl(t,e),vl(e),8192&i){if(d=null!==e.memoizedState,(e.stateNode.isHidden=d)&&!u&&1&e.mode)for(Qa=e,u=e.child;null!==u;){for(h=Qa=u;null!==Qa;){switch(m=(p=Qa).child,p.tag){case 0:case 11:case 14:case 15:nl(4,p,p.return);break;case 1:Za(p,p.return);var f=p.stateNode;if("function"==typeof f.componentWillUnmount){i=p,n=p.return;try{t=i,f.props=t.memoizedProps,f.state=t.memoizedState,f.componentWillUnmount()}catch(e){Cc(i,n,e)}}break;case 5:Za(p,p.return);break;case 22:if(null!==p.memoizedState){wl(h);continue}}null!==m?(m.return=p,Qa=m):wl(h)}u=u.sibling}e:for(u=null,h=e;;){if(5===h.tag){if(null===u){u=h;try{s=h.stateNode,d?"function"==typeof(o=s.style).setProperty?o.setProperty("display","none","important"):o.display="none":(l=h.stateNode,a=null!=(c=h.memoizedProps.style)&&c.hasOwnProperty("display")?c.display:null,l.style.display=fe("display",a))}catch(t){Cc(e,e.return,t)}}}else if(6===h.tag){if(null===u)try{h.stateNode.nodeValue=d?"":h.memoizedProps}catch(t){Cc(e,e.return,t)}}else if((22!==h.tag&&23!==h.tag||null===h.memoizedState||h===e)&&null!==h.child){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;null===h.sibling;){if(null===h.return||h.return===e)break e;u===h&&(u=null),h=h.return}u===h&&(u=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:fl(t,e),vl(e),4&i&&ml(e);case 21:}}function vl(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(ol(n)){var i=n;break e}n=n.return}throw Error(r(160))}switch(i.tag){case 5:var s=i.stateNode;32&i.flags&&(he(s,""),i.flags&=-33),cl(e,al(e),s);break;case 3:case 4:var o=i.stateNode.containerInfo;ll(e,al(e),o);break;default:throw Error(r(161))}}catch(t){Cc(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function _l(e,t,n){Qa=e,bl(e,t,n)}function bl(e,t,n){for(var i=!!(1&e.mode);null!==Qa;){var s=Qa,r=s.child;if(22===s.tag&&i){var o=null!==s.memoizedState||Ga;if(!o){var a=s.alternate,l=null!==a&&null!==a.memoizedState||Ya;a=Ga;var c=Ya;if(Ga=o,(Ya=l)&&!c)for(Qa=s;null!==Qa;)l=(o=Qa).child,22===o.tag&&null!==o.memoizedState?xl(s):null!==l?(l.return=o,Qa=l):xl(s);for(;null!==r;)Qa=r,bl(r,t,n),r=r.sibling;Qa=s,Ga=a,Ya=c}yl(e)}else 8772&s.subtreeFlags&&null!==r?(r.return=s,Qa=r):yl(e)}}function yl(e){for(;null!==Qa;){var t=Qa;if(8772&t.flags){var n=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:Ya||il(5,t);break;case 1:var i=t.stateNode;if(4&t.flags&&!Ya)if(null===n)i.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:na(t.type,n.memoizedProps);i.componentDidUpdate(s,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;null!==o&&Wr(t,o,i);break;case 3:var a=t.updateQueue;if(null!==a){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Wr(t,a,n)}break;case 5:var l=t.stateNode;if(null===n&&4&t.flags){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var d=t.alternate;if(null!==d){var u=d.memoizedState;if(null!==u){var h=u.dehydrated;null!==h&&Ht(h)}}}break;default:throw Error(r(163))}Ya||512&t.flags&&sl(t)}catch(e){Cc(t,t.return,e)}}if(t===e){Qa=null;break}if(null!==(n=t.sibling)){n.return=t.return,Qa=n;break}Qa=t.return}}function wl(e){for(;null!==Qa;){var t=Qa;if(t===e){Qa=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Qa=n;break}Qa=t.return}}function xl(e){for(;null!==Qa;){var t=Qa;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{il(4,t)}catch(e){Cc(t,n,e)}break;case 1:var i=t.stateNode;if("function"==typeof i.componentDidMount){var s=t.return;try{i.componentDidMount()}catch(e){Cc(t,s,e)}}var r=t.return;try{sl(t)}catch(e){Cc(t,r,e)}break;case 5:var o=t.return;try{sl(t)}catch(e){Cc(t,o,e)}}}catch(e){Cc(t,t.return,e)}if(t===e){Qa=null;break}var a=t.sibling;if(null!==a){a.return=t.return,Qa=a;break}Qa=t.return}}var Sl,Cl=Math.ceil,kl=y.ReactCurrentDispatcher,El=y.ReactCurrentOwner,Ml=y.ReactCurrentBatchConfig,Pl=0,Il=null,Ll=null,Ol=0,Al=0,Dl=Cs(0),Tl=0,Rl=null,jl=0,zl=0,Nl=0,Bl=null,Fl=null,Ul=0,Hl=1/0,Wl=null,$l=!1,ql=null,Vl=null,Kl=!1,Jl=null,Gl=0,Yl=0,Xl=null,Ql=-1,Zl=0;function ec(){return 6&Pl?Xe():-1!==Ql?Ql:Ql=Xe()}function tc(e){return 1&e.mode?2&Pl&&0!==Ol?Ol&-Ol:null!==fr.transition?(0===Zl&&(Zl=ft()),Zl):0!==(e=bt)?e:e=void 0===(e=window.event)?16:Yt(e.type):1}function nc(e,t,n,i){if(50<Yl)throw Yl=0,Xl=null,Error(r(185));vt(e,n,i),2&Pl&&e===Il||(e===Il&&(!(2&Pl)&&(zl|=n),4===Tl&&ac(e,Ol)),ic(e,i),1===n&&0===Pl&&!(1&t.mode)&&(Hl=Xe()+500,Bs&&Hs()))}function ic(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,i=e.pingedLanes,s=e.expirationTimes,r=e.pendingLanes;0<r;){var o=31-ot(r),a=1<<o,l=s[o];-1===l?0!==(a&n)&&0===(a&i)||(s[o]=pt(a,t)):l<=t&&(e.expiredLanes|=a),r&=~a}}(e,t);var i=ht(e,e===Il?Ol:0);if(0===i)null!==n&&Je(n),e.callbackNode=null,e.callbackPriority=0;else if(t=i&-i,e.callbackPriority!==t){if(null!=n&&Je(n),1===t)0===e.tag?function(e){Bs=!0,Us(e)}(lc.bind(null,e)):Us(lc.bind(null,e)),os(function(){!(6&Pl)&&Hs()}),n=null;else{switch(yt(i)){case 1:n=Ze;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=it}n=Ic(n,sc.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function sc(e,t){if(Ql=-1,Zl=0,6&Pl)throw Error(r(327));var n=e.callbackNode;if(xc()&&e.callbackNode!==n)return null;var i=ht(e,e===Il?Ol:0);if(0===i)return null;if(30&i||0!==(i&e.expiredLanes)||t)t=gc(e,i);else{t=i;var s=Pl;Pl|=2;var o=mc();for(Il===e&&Ol===t||(Wl=null,Hl=Xe()+500,hc(e,t));;)try{_c();break}catch(t){pc(e,t)}Er(),kl.current=o,Pl=s,null!==Ll?t=0:(Il=null,Ol=0,t=Tl)}if(0!==t){if(2===t&&0!==(s=mt(e))&&(i=s,t=rc(e,s)),1===t)throw n=Rl,hc(e,0),ac(e,i),ic(e,Xe()),n;if(6===t)ac(e,i);else{if(s=e.current.alternate,!(30&i||function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var i=0;i<n.length;i++){var s=n[i],r=s.getSnapshot;s=s.value;try{if(!ai(r(),s))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(s)||(t=gc(e,i),2===t&&(o=mt(e),0!==o&&(i=o,t=rc(e,o))),1!==t)))throw n=Rl,hc(e,0),ac(e,i),ic(e,Xe()),n;switch(e.finishedWork=s,e.finishedLanes=i,t){case 0:case 1:throw Error(r(345));case 2:case 5:wc(e,Fl,Wl);break;case 3:if(ac(e,i),(130023424&i)===i&&10<(t=Ul+500-Xe())){if(0!==ht(e,0))break;if(((s=e.suspendedLanes)&i)!==i){ec(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=is(wc.bind(null,e,Fl,Wl),t);break}wc(e,Fl,Wl);break;case 4:if(ac(e,i),(4194240&i)===i)break;for(t=e.eventTimes,s=-1;0<i;){var a=31-ot(i);o=1<<a,(a=t[a])>s&&(s=a),i&=~o}if(i=s,10<(i=(120>(i=Xe()-i)?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Cl(i/1960))-i)){e.timeoutHandle=is(wc.bind(null,e,Fl,Wl),i);break}wc(e,Fl,Wl);break;default:throw Error(r(329))}}}return ic(e,Xe()),e.callbackNode===n?sc.bind(null,e):null}function rc(e,t){var n=Bl;return e.current.memoizedState.isDehydrated&&(hc(e,t).flags|=256),2!==(e=gc(e,t))&&(t=Fl,Fl=n,null!==t&&oc(t)),e}function oc(e){null===Fl?Fl=e:Fl.push.apply(Fl,e)}function ac(e,t){for(t&=~Nl,t&=~zl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-ot(t),i=1<<n;e[n]=-1,t&=~i}}function lc(e){if(6&Pl)throw Error(r(327));xc();var t=ht(e,0);if(!(1&t))return ic(e,Xe()),null;var n=gc(e,t);if(0!==e.tag&&2===n){var i=mt(e);0!==i&&(t=i,n=rc(e,i))}if(1===n)throw n=Rl,hc(e,0),ac(e,t),ic(e,Xe()),n;if(6===n)throw Error(r(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,wc(e,Fl,Wl),ic(e,Xe()),null}function cc(e,t){var n=Pl;Pl|=1;try{return e(t)}finally{0===(Pl=n)&&(Hl=Xe()+500,Bs&&Hs())}}function dc(e){null!==Jl&&0===Jl.tag&&!(6&Pl)&&xc();var t=Pl;Pl|=1;var n=Ml.transition,i=bt;try{if(Ml.transition=null,bt=1,e)return e()}finally{bt=i,Ml.transition=n,!(6&(Pl=t))&&Hs()}}function uc(){Al=Dl.current,ks(Dl)}function hc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ss(n)),null!==Ll)for(n=Ll.return;null!==n;){var i=n;switch(tr(i),i.tag){case 1:null!=(i=i.type.childContextTypes)&&Ds();break;case 3:Yr(),ks(Is),ks(Ps),no();break;case 5:Qr(i);break;case 4:Yr();break;case 13:case 19:ks(Zr);break;case 10:Mr(i.type._context);break;case 22:case 23:uc()}n=n.return}if(Il=e,Ll=e=Dc(e.current,null),Ol=Al=t,Tl=0,Rl=null,Nl=zl=jl=0,Fl=Bl=null,null!==Or){for(t=0;t<Or.length;t++)if(null!==(i=(n=Or[t]).interleaved)){n.interleaved=null;var s=i.next,r=n.pending;if(null!==r){var o=r.next;r.next=s,i.next=o}n.pending=i}Or=null}return e}function pc(e,t){for(;;){var n=Ll;try{if(Er(),io.current=Qo,co){for(var i=oo.memoizedState;null!==i;){var s=i.queue;null!==s&&(s.pending=null),i=i.next}co=!1}if(ro=0,lo=ao=oo=null,uo=!1,ho=0,El.current=null,null===n||null===n.return){Tl=1,Rl=t,Ll=null;break}e:{var o=e,a=n.return,l=n,c=t;if(t=Ol,l.flags|=32768,null!==c&&"object"==typeof c&&"function"==typeof c.then){var d=c,u=l,h=u.tag;if(!(1&u.mode||0!==h&&11!==h&&15!==h)){var p=u.alternate;p?(u.updateQueue=p.updateQueue,u.memoizedState=p.memoizedState,u.lanes=p.lanes):(u.updateQueue=null,u.memoizedState=null)}var m=ga(a);if(null!==m){m.flags&=-257,va(m,a,l,0,t),1&m.mode&&fa(o,d,t),c=d;var f=(t=m).updateQueue;if(null===f){var g=new Set;g.add(c),t.updateQueue=g}else f.add(c);break e}if(!(1&t)){fa(o,d,t),fc();break e}c=Error(r(426))}else if(sr&&1&l.mode){var v=ga(a);if(null!==v){!(65536&v.flags)&&(v.flags|=256),va(v,a,l,0,t),mr(ca(c,l));break e}}o=c=ca(c,l),4!==Tl&&(Tl=2),null===Bl?Bl=[o]:Bl.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t,Ur(o,pa(0,c,t));break e;case 1:l=c;var _=o.type,b=o.stateNode;if(!(128&o.flags||"function"!=typeof _.getDerivedStateFromError&&(null===b||"function"!=typeof b.componentDidCatch||null!==Vl&&Vl.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t,Ur(o,ma(o,l,t));break e}}o=o.return}while(null!==o)}yc(n)}catch(e){t=e,Ll===n&&null!==n&&(Ll=n=n.return);continue}break}}function mc(){var e=kl.current;return kl.current=Qo,null===e?Qo:e}function fc(){0!==Tl&&3!==Tl&&2!==Tl||(Tl=4),null===Il||!(268435455&jl)&&!(268435455&zl)||ac(Il,Ol)}function gc(e,t){var n=Pl;Pl|=2;var i=mc();for(Il===e&&Ol===t||(Wl=null,hc(e,t));;)try{vc();break}catch(t){pc(e,t)}if(Er(),Pl=n,kl.current=i,null!==Ll)throw Error(r(261));return Il=null,Ol=0,Tl}function vc(){for(;null!==Ll;)bc(Ll)}function _c(){for(;null!==Ll&&!Ge();)bc(Ll)}function bc(e){var t=Sl(e.alternate,e,Al);e.memoizedProps=e.pendingProps,null===t?yc(e):Ll=t,El.current=null}function yc(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=Ja(n,t)))return n.flags&=32767,void(Ll=n);if(null===e)return Tl=6,void(Ll=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=Ka(n,t,Al)))return void(Ll=n);if(null!==(t=t.sibling))return void(Ll=t);Ll=t=e}while(null!==t);0===Tl&&(Tl=5)}function wc(e,t,n){var i=bt,s=Ml.transition;try{Ml.transition=null,bt=1,function(e,t,n,i){do{xc()}while(null!==Jl);if(6&Pl)throw Error(r(327));n=e.finishedWork;var s=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(r(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var i=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-ot(n),r=1<<s;t[s]=0,i[s]=-1,e[s]=-1,n&=~r}}(e,o),e===Il&&(Ll=Il=null,Ol=0),!(2064&n.subtreeFlags)&&!(2064&n.flags)||Kl||(Kl=!0,Ic(tt,function(){return xc(),null})),o=!!(15990&n.flags),15990&n.subtreeFlags||o){o=Ml.transition,Ml.transition=null;var a=bt;bt=1;var l=Pl;Pl|=4,El.current=null,function(e,t){if(es=$t,pi(e=hi())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var i=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(i&&0!==i.rangeCount){n=i.anchorNode;var s=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{n.nodeType,o.nodeType}catch(e){n=null;break e}var a=0,l=-1,c=-1,d=0,u=0,h=e,p=null;t:for(;;){for(var m;h!==n||0!==s&&3!==h.nodeType||(l=a+s),h!==o||0!==i&&3!==h.nodeType||(c=a+i),3===h.nodeType&&(a+=h.nodeValue.length),null!==(m=h.firstChild);)p=h,h=m;for(;;){if(h===e)break t;if(p===n&&++d===s&&(l=a),p===o&&++u===i&&(c=a),null!==(m=h.nextSibling))break;p=(h=p).parentNode}h=m}n=-1===l||-1===c?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(ts={focusedElem:e,selectionRange:n},$t=!1,Qa=t;null!==Qa;)if(e=(t=Qa).child,1028&t.subtreeFlags&&null!==e)e.return=t,Qa=e;else for(;null!==Qa;){t=Qa;try{var f=t.alternate;if(1024&t.flags)switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==f){var g=f.memoizedProps,v=f.memoizedState,_=t.stateNode,b=_.getSnapshotBeforeUpdate(t.elementType===t.type?g:na(t.type,g),v);_.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var y=t.stateNode.containerInfo;1===y.nodeType?y.textContent="":9===y.nodeType&&y.documentElement&&y.removeChild(y.documentElement);break;default:throw Error(r(163))}}catch(e){Cc(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Qa=e;break}Qa=t.return}f=tl,tl=!1}(e,n),gl(n,e),mi(ts),$t=!!es,ts=es=null,e.current=n,_l(n,e,s),Ye(),Pl=l,bt=a,Ml.transition=o}else e.current=n;if(Kl&&(Kl=!1,Jl=e,Gl=s),0===(o=e.pendingLanes)&&(Vl=null),function(e){if(rt&&"function"==typeof rt.onCommitFiberRoot)try{rt.onCommitFiberRoot(st,e,void 0,!(128&~e.current.flags))}catch(e){}}(n.stateNode),ic(e,Xe()),null!==t)for(i=e.onRecoverableError,n=0;n<t.length;n++)i((s=t[n]).value,{componentStack:s.stack,digest:s.digest});if($l)throw $l=!1,e=ql,ql=null,e;!!(1&Gl)&&0!==e.tag&&xc(),1&(o=e.pendingLanes)?e===Xl?Yl++:(Yl=0,Xl=e):Yl=0,Hs()}(e,t,n,i)}finally{Ml.transition=s,bt=i}return null}function xc(){if(null!==Jl){var e=yt(Gl),t=Ml.transition,n=bt;try{if(Ml.transition=null,bt=16>e?16:e,null===Jl)var i=!1;else{if(e=Jl,Jl=null,Gl=0,6&Pl)throw Error(r(331));var s=Pl;for(Pl|=4,Qa=e.current;null!==Qa;){var o=Qa,a=o.child;if(16&Qa.flags){var l=o.deletions;if(null!==l){for(var c=0;c<l.length;c++){var d=l[c];for(Qa=d;null!==Qa;){var u=Qa;switch(u.tag){case 0:case 11:case 15:nl(8,u,o)}var h=u.child;if(null!==h)h.return=u,Qa=h;else for(;null!==Qa;){var p=(u=Qa).sibling,m=u.return;if(rl(u),u===d){Qa=null;break}if(null!==p){p.return=m,Qa=p;break}Qa=m}}}var f=o.alternate;if(null!==f){var g=f.child;if(null!==g){f.child=null;do{var v=g.sibling;g.sibling=null,g=v}while(null!==g)}}Qa=o}}if(2064&o.subtreeFlags&&null!==a)a.return=o,Qa=a;else e:for(;null!==Qa;){if(2048&(o=Qa).flags)switch(o.tag){case 0:case 11:case 15:nl(9,o,o.return)}var _=o.sibling;if(null!==_){_.return=o.return,Qa=_;break e}Qa=o.return}}var b=e.current;for(Qa=b;null!==Qa;){var y=(a=Qa).child;if(2064&a.subtreeFlags&&null!==y)y.return=a,Qa=y;else e:for(a=b;null!==Qa;){if(2048&(l=Qa).flags)try{switch(l.tag){case 0:case 11:case 15:il(9,l)}}catch(e){Cc(l,l.return,e)}if(l===a){Qa=null;break e}var w=l.sibling;if(null!==w){w.return=l.return,Qa=w;break e}Qa=l.return}}if(Pl=s,Hs(),rt&&"function"==typeof rt.onPostCommitFiberRoot)try{rt.onPostCommitFiberRoot(st,e)}catch(e){}i=!0}return i}finally{bt=n,Ml.transition=t}}return!1}function Sc(e,t,n){e=Br(e,t=pa(0,t=ca(n,t),1),1),t=ec(),null!==e&&(vt(e,1,t),ic(e,t))}function Cc(e,t,n){if(3===e.tag)Sc(e,e,n);else for(;null!==t;){if(3===t.tag){Sc(t,e,n);break}if(1===t.tag){var i=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof i.componentDidCatch&&(null===Vl||!Vl.has(i))){t=Br(t,e=ma(t,e=ca(n,e),1),1),e=ec(),null!==t&&(vt(t,1,e),ic(t,e));break}}t=t.return}}function kc(e,t,n){var i=e.pingCache;null!==i&&i.delete(t),t=ec(),e.pingedLanes|=e.suspendedLanes&n,Il===e&&(Ol&n)===n&&(4===Tl||3===Tl&&(130023424&Ol)===Ol&&500>Xe()-Ul?hc(e,0):Nl|=n),ic(e,t)}function Ec(e,t){0===t&&(1&e.mode?(t=dt,!(130023424&(dt<<=1))&&(dt=4194304)):t=1);var n=ec();null!==(e=Tr(e,t))&&(vt(e,t,n),ic(e,n))}function Mc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Ec(e,n)}function Pc(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,s=e.memoizedState;null!==s&&(n=s.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(r(314))}null!==i&&i.delete(t),Ec(e,n)}function Ic(e,t){return Ke(e,t)}function Lc(e,t,n,i){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Oc(e,t,n,i){return new Lc(e,t,n,i)}function Ac(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Dc(e,t){var n=e.alternate;return null===n?((n=Oc(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Tc(e,t,n,i,s,o){var a=2;if(i=e,"function"==typeof e)Ac(e)&&(a=1);else if("string"==typeof e)a=5;else e:switch(e){case S:return Rc(n.children,s,o,t);case C:a=8,s|=8;break;case k:return(e=Oc(12,n,t,2|s)).elementType=k,e.lanes=o,e;case I:return(e=Oc(13,n,t,s)).elementType=I,e.lanes=o,e;case L:return(e=Oc(19,n,t,s)).elementType=L,e.lanes=o,e;case D:return jc(n,s,o,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case E:a=10;break e;case M:a=9;break e;case P:a=11;break e;case O:a=14;break e;case A:a=16,i=null;break e}throw Error(r(130,null==e?e:typeof e,""))}return(t=Oc(a,n,t,s)).elementType=e,t.type=i,t.lanes=o,t}function Rc(e,t,n,i){return(e=Oc(7,e,i,t)).lanes=n,e}function jc(e,t,n,i){return(e=Oc(22,e,i,t)).elementType=D,e.lanes=n,e.stateNode={isHidden:!1},e}function zc(e,t,n){return(e=Oc(6,e,null,t)).lanes=n,e}function Nc(e,t,n){return(t=Oc(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Bc(e,t,n,i,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=gt(0),this.expirationTimes=gt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gt(0),this.identifierPrefix=i,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Fc(e,t,n,i,s,r,o,a,l){return e=new Bc(e,t,n,a,l),1===t?(t=1,!0===r&&(t|=8)):t=0,r=Oc(3,null,null,t),e.current=r,r.stateNode=e,r.memoizedState={element:i,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},jr(r),e}function Uc(e){if(!e)return Ms;e:{if(He(e=e._reactInternals)!==e||1!==e.tag)throw Error(r(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(As(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(r(171))}if(1===e.tag){var n=e.type;if(As(n))return Rs(e,n,t)}return t}function Hc(e,t,n,i,s,r,o,a,l){return(e=Fc(n,i,!0,e,0,r,0,a,l)).context=Uc(null),n=e.current,(r=Nr(i=ec(),s=tc(n))).callback=null!=t?t:null,Br(n,r,s),e.current.lanes=s,vt(e,s,i),ic(e,i),e}function Wc(e,t,n,i){var s=t.current,r=ec(),o=tc(s);return n=Uc(n),null===t.context?t.context=n:t.pendingContext=n,(t=Nr(r,o)).payload={element:e},null!==(i=void 0===i?null:i)&&(t.callback=i),null!==(e=Br(s,t,o))&&(nc(e,s,o,r),Fr(e,s,o)),o}function $c(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function qc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Vc(e,t){qc(e,t),(e=e.alternate)&&qc(e,t)}Sl=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Is.current)ba=!0;else{if(0===(e.lanes&n)&&!(128&t.flags))return ba=!1,function(e,t,n){switch(t.tag){case 3:Ia(t),pr();break;case 5:Xr(t);break;case 1:As(t.type)&&js(t);break;case 4:Gr(t,t.stateNode.containerInfo);break;case 10:var i=t.type._context,s=t.memoizedProps.value;Es(xr,i._currentValue),i._currentValue=s;break;case 13:if(null!==(i=t.memoizedState))return null!==i.dehydrated?(Es(Zr,1&Zr.current),t.flags|=128,null):0!==(n&t.child.childLanes)?za(e,t,n):(Es(Zr,1&Zr.current),null!==(e=$a(e,t,n))?e.sibling:null);Es(Zr,1&Zr.current);break;case 19:if(i=0!==(n&t.childLanes),128&e.flags){if(i)return Ha(e,t,n);t.flags|=128}if(null!==(s=t.memoizedState)&&(s.rendering=null,s.tail=null,s.lastEffect=null),Es(Zr,Zr.current),i)break;return null;case 22:case 23:return t.lanes=0,Ca(e,t,n)}return $a(e,t,n)}(e,t,n);ba=!!(131072&e.flags)}else ba=!1,sr&&1048576&t.flags&&Zs(t,Vs,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;Wa(e,t),e=t.pendingProps;var s=Os(t,Ps.current);Ir(t,n),s=go(null,t,i,e,s,n);var o=vo();return t.flags|=1,"object"==typeof s&&null!==s&&"function"==typeof s.render&&void 0===s.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,As(i)?(o=!0,js(t)):o=!1,t.memoizedState=null!==s.state&&void 0!==s.state?s.state:null,jr(t),s.updater=sa,t.stateNode=s,s._reactInternals=t,la(t,i,e,n),t=Pa(null,t,i,!0,o,n)):(t.tag=0,sr&&o&&er(t),ya(null,t,s,n),t=t.child),t;case 16:i=t.elementType;e:{switch(Wa(e,t),e=t.pendingProps,i=(s=i._init)(i._payload),t.type=i,s=t.tag=function(e){if("function"==typeof e)return Ac(e)?1:0;if(null!=e){if((e=e.$$typeof)===P)return 11;if(e===O)return 14}return 2}(i),e=na(i,e),s){case 0:t=Ea(null,t,i,e,n);break e;case 1:t=Ma(null,t,i,e,n);break e;case 11:t=wa(null,t,i,e,n);break e;case 14:t=xa(null,t,i,na(i.type,e),n);break e}throw Error(r(306,i,""))}return t;case 0:return i=t.type,s=t.pendingProps,Ea(e,t,i,s=t.elementType===i?s:na(i,s),n);case 1:return i=t.type,s=t.pendingProps,Ma(e,t,i,s=t.elementType===i?s:na(i,s),n);case 3:e:{if(Ia(t),null===e)throw Error(r(387));i=t.pendingProps,s=(o=t.memoizedState).element,zr(e,t),Hr(t,i,null,n);var a=t.memoizedState;if(i=a.element,o.isDehydrated){if(o={element:i,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,256&t.flags){t=La(e,t,i,n,s=ca(Error(r(423)),t));break e}if(i!==s){t=La(e,t,i,n,s=ca(Error(r(424)),t));break e}for(ir=cs(t.stateNode.containerInfo.firstChild),nr=t,sr=!0,rr=null,n=wr(t,null,i,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(pr(),i===s){t=$a(e,t,n);break e}ya(e,t,i,n)}t=t.child}return t;case 5:return Xr(t),null===e&&cr(t),i=t.type,s=t.pendingProps,o=null!==e?e.memoizedProps:null,a=s.children,ns(i,s)?a=null:null!==o&&ns(i,o)&&(t.flags|=32),ka(e,t),ya(e,t,a,n),t.child;case 6:return null===e&&cr(t),null;case 13:return za(e,t,n);case 4:return Gr(t,t.stateNode.containerInfo),i=t.pendingProps,null===e?t.child=yr(t,null,i,n):ya(e,t,i,n),t.child;case 11:return i=t.type,s=t.pendingProps,wa(e,t,i,s=t.elementType===i?s:na(i,s),n);case 7:return ya(e,t,t.pendingProps,n),t.child;case 8:case 12:return ya(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(i=t.type._context,s=t.pendingProps,o=t.memoizedProps,a=s.value,Es(xr,i._currentValue),i._currentValue=a,null!==o)if(ai(o.value,a)){if(o.children===s.children&&!Is.current){t=$a(e,t,n);break e}}else for(null!==(o=t.child)&&(o.return=t);null!==o;){var l=o.dependencies;if(null!==l){a=o.child;for(var c=l.firstContext;null!==c;){if(c.context===i){if(1===o.tag){(c=Nr(-1,n&-n)).tag=2;var d=o.updateQueue;if(null!==d){var u=(d=d.shared).pending;null===u?c.next=c:(c.next=u.next,u.next=c),d.pending=c}}o.lanes|=n,null!==(c=o.alternate)&&(c.lanes|=n),Pr(o.return,n,t),l.lanes|=n;break}c=c.next}}else if(10===o.tag)a=o.type===t.type?null:o.child;else if(18===o.tag){if(null===(a=o.return))throw Error(r(341));a.lanes|=n,null!==(l=a.alternate)&&(l.lanes|=n),Pr(a,n,t),a=o.sibling}else a=o.child;if(null!==a)a.return=o;else for(a=o;null!==a;){if(a===t){a=null;break}if(null!==(o=a.sibling)){o.return=a.return,a=o;break}a=a.return}o=a}ya(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,i=t.pendingProps.children,Ir(t,n),i=i(s=Lr(s)),t.flags|=1,ya(e,t,i,n),t.child;case 14:return s=na(i=t.type,t.pendingProps),xa(e,t,i,s=na(i.type,s),n);case 15:return Sa(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:na(i,s),Wa(e,t),t.tag=1,As(i)?(e=!0,js(t)):e=!1,Ir(t,n),oa(t,i,s),la(t,i,s,n),Pa(null,t,i,!0,e,n);case 19:return Ha(e,t,n);case 22:return Ca(e,t,n)}throw Error(r(156,t.tag))};var Kc="function"==typeof reportError?reportError:function(e){console.error(e)};function Jc(e){this._internalRoot=e}function Gc(e){this._internalRoot=e}function Yc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Xc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Qc(){}function Zc(e,t,n,i,s){var r=n._reactRootContainer;if(r){var o=r;if("function"==typeof s){var a=s;s=function(){var e=$c(o);a.call(e)}}Wc(t,o,e,s)}else o=function(e,t,n,i,s){if(s){if("function"==typeof i){var r=i;i=function(){var e=$c(o);r.call(e)}}var o=Hc(t,i,e,0,null,!1,0,"",Qc);return e._reactRootContainer=o,e[ms]=o.current,Hi(8===e.nodeType?e.parentNode:e),dc(),o}for(;s=e.lastChild;)e.removeChild(s);if("function"==typeof i){var a=i;i=function(){var e=$c(l);a.call(e)}}var l=Fc(e,0,!1,null,0,!1,0,"",Qc);return e._reactRootContainer=l,e[ms]=l.current,Hi(8===e.nodeType?e.parentNode:e),dc(function(){Wc(t,l,n,i)}),l}(n,t,e,s,i);return $c(o)}Gc.prototype.render=Jc.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(r(409));Wc(e,t,null,null)},Gc.prototype.unmount=Jc.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;dc(function(){Wc(null,e,null,null)}),t[ms]=null}},Gc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ct();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Dt.length&&0!==t&&t<Dt[n].priority;n++);Dt.splice(n,0,e),0===n&&zt(e)}},wt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ut(t.pendingLanes);0!==n&&(_t(t,1|n),ic(t,Xe()),!(6&Pl)&&(Hl=Xe()+500,Hs()))}break;case 13:dc(function(){var t=Tr(e,1);if(null!==t){var n=ec();nc(t,e,1,n)}}),Vc(e,1)}},xt=function(e){if(13===e.tag){var t=Tr(e,134217728);null!==t&&nc(t,e,134217728,ec()),Vc(e,134217728)}},St=function(e){if(13===e.tag){var t=tc(e),n=Tr(e,t);null!==n&&nc(n,e,t,ec()),Vc(e,t)}},Ct=function(){return bt},kt=function(e,t){var n=bt;try{return bt=e,t()}finally{bt=n}},xe=function(e,t,n){switch(t){case"input":if(Q(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var s=ws(i);if(!s)throw Error(r(90));K(i),Q(i,s)}}}break;case"textarea":re(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Pe=cc,Ie=dc;var ed={usingClientEntryPoint:!1,Events:[bs,ys,ws,Ee,Me,cc]},td={findFiberByHostInstance:_s,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},nd={bundleType:td.bundleType,version:td.version,rendererPackageName:td.rendererPackageName,rendererConfig:td.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:y.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=qe(e))?null:e.stateNode},findFiberByHostInstance:td.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var id=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!id.isDisabled&&id.supportsFiber)try{st=id.inject(nd),rt=id}catch(de){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ed,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Yc(t))throw Error(r(200));return function(e,t,n){var i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:x,key:null==i?null:""+i,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Yc(e))throw Error(r(299));var n=!1,i="",s=Kc;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(i=t.identifierPrefix),void 0!==t.onRecoverableError&&(s=t.onRecoverableError)),t=Fc(e,1,!1,null,0,n,0,i,s),e[ms]=t.current,Hi(8===e.nodeType?e.parentNode:e),new Jc(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(r(188));throw e=Object.keys(e).join(","),Error(r(268,e))}return null===(e=qe(t))?null:e.stateNode},t.flushSync=function(e){return dc(e)},t.hydrate=function(e,t,n){if(!Xc(t))throw Error(r(200));return Zc(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Yc(e))throw Error(r(405));var i=null!=n&&n.hydratedSources||null,s=!1,o="",a=Kc;if(null!=n&&(!0===n.unstable_strictMode&&(s=!0),void 0!==n.identifierPrefix&&(o=n.identifierPrefix),void 0!==n.onRecoverableError&&(a=n.onRecoverableError)),t=Hc(t,null,e,1,null!=n?n:null,s,0,o,a),e[ms]=t.current,Hi(e),i)for(e=0;e<i.length;e++)s=(s=(n=i[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new Gc(t)},t.render=function(e,t,n){if(!Xc(t))throw Error(r(200));return Zc(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Xc(e))throw Error(r(40));return!!e._reactRootContainer&&(dc(function(){Zc(null,null,e,!1,function(){e._reactRootContainer=null,e[ms]=null})}),!0)},t.unstable_batchedUpdates=cc,t.unstable_renderSubtreeIntoContainer=function(e,t,n,i){if(!Xc(n))throw Error(r(200));if(null==e||void 0===e._reactInternals)throw Error(r(38));return Zc(e,t,n,!1,i)},t.version="18.3.1-next-f1338f8080-20240426"},2570:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,s)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return s(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CommHandler=t.CommsOverSubshells=void 0;const o=n(5899),a=n(785),l=r(n(9798));var c;!function(e){e.Disabled="disabled",e.PerComm="perComm",e.PerCommTarget="perCommTarget"}(c||(t.CommsOverSubshells=c={}));class d extends a.DisposableDelegate{constructor(e,t,n,i,s){super(i),this._subshellStarted=new o.PromiseDelegate,this._subshellId=null,this._target="",this._id="",this._id=t,this._target=e,this._kernel=n,this._kernel.statusChanged.connect(()=>{"restarting"===this._kernel.status&&this._cleanSubshells()}),this.commsOverSubshells=null!=s?s:c.PerCommTarget}get commId(){return this._id}get targetName(){return this._target}get subshellId(){return this._subshellId}get subshellStarted(){return this._subshellStarted.promise}get commsOverSubshells(){return this._commsOverSubshells}set commsOverSubshells(e){this._commsOverSubshells=e,this._commsOverSubshells===c.Disabled?this._maybeCloseSubshell():this._maybeStartSubshell()}get onClose(){return this._onClose}set onClose(e){this._onClose=e}get onMsg(){return this._onMsg}set onMsg(e){this._onMsg=e}open(e,t,n=[]){if(this.isDisposed||this._kernel.isDisposed)throw new Error("Cannot open");const i=l.createMessage({msgType:"comm_open",channel:"shell",username:this._kernel.username,session:this._kernel.clientId,subshellId:this._subshellId||this._kernel.subshellId,content:{comm_id:this._id,target_name:this._target,data:null!=e?e:{}},metadata:t,buffers:n});return this._kernel.sendShellMessage(i,!1,!0)}send(e,t,n=[],i=!0){if(this.isDisposed||this._kernel.isDisposed)throw new Error("Cannot send");const s=l.createMessage({msgType:"comm_msg",channel:"shell",username:this._kernel.username,session:this._kernel.clientId,subshellId:this._subshellId||this._kernel.subshellId,content:{comm_id:this._id,data:e},metadata:t,buffers:n});return this._kernel.sendShellMessage(s,!1,i)}close(e,t,n=[]){if(this.isDisposed||this._kernel.isDisposed)throw new Error("Cannot close");const i=l.createMessage({msgType:"comm_close",channel:"shell",username:this._kernel.username,session:this._kernel.clientId,subshellId:this._subshellId||this._kernel.subshellId,content:{comm_id:this._id,data:null!=e?e:{}},metadata:t,buffers:n}),s=this._kernel.sendShellMessage(i,!1,!0),r=this._onClose;return r&&r(l.createMessage({msgType:"comm_close",channel:"iopub",username:this._kernel.username,session:this._kernel.clientId,subshellId:this._subshellId||this._kernel.subshellId,content:{comm_id:this._id,data:null!=e?e:{}},metadata:t,buffers:n})),this.dispose(),s}dispose(){this._maybeCloseSubshell(),super.dispose()}_cleanSubshells(){const e=this._kernel.id;d._commTargetSubShellsId.hasOwnProperty(e)&&delete d._commTargetSubShellsId[e]}async _maybeStartSubshell(){if(await this._kernel.info,!this._kernel.supportsSubshells)return;if(this._commsOverSubshells===c.PerComm){const e=await this._kernel.requestCreateSubshell({}).done;return this._subshellId=e.content.subshell_id,void this._subshellStarted.resolve()}const e=this._kernel.id;d._commTargetSubShellsId.hasOwnProperty(e)||(d._commTargetSubShellsId[e]={});const t=d._commTargetSubShellsId[e];t[this._target]?(this._subshellId=await t[this._target],this._subshellStarted.resolve()):(t[this._target]=this._kernel.requestCreateSubshell({}).done.then(e=>(this._subshellId=e.content.subshell_id,this._subshellId)),await t[this._target],this._subshellStarted.resolve())}_maybeCloseSubshell(){this._commsOverSubshells===c.PerComm?(this._subshellId&&"dead"!==this._kernel.status&&this._kernel.requestDeleteSubshell({subshell_id:this._subshellId},!0),this._subshellId=null):this._subshellId=null}}t.CommHandler=d,d._commTargetSubShellsId={}},2827:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},2877:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.IStateDB=void 0;const i=n(5899);t.IStateDB=new i.Token("@jupyterlab/coreutils:IStateDB",'A service for the JupyterLab state database.\n Use this if you want to store data that will persist across page loads.\n See "state database" for more information.')},3106:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},3342:(e,t,n)=>{!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(2551)},3892:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NbConvertManager=void 0;const i=n(6376),s=n(1089),r=n(5899);t.NbConvertManager=class{constructor(e={}){var t;this._exportFormats=null,this.serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:s.ServerConnection.makeSettings()}async fetchExportFormats(){this._requestingFormats=new r.PromiseDelegate,this._exportFormats=null;const e=this.serverSettings.baseUrl,t=i.URLExt.join(e,"api/nbconvert"),{serverSettings:n}=this,o=await s.ServerConnection.makeRequest(t,{},n);if(200!==o.status)throw await s.ServerConnection.ResponseError.create(o);const a=await o.json(),l={};return Object.keys(a).forEach(function(e){const t=a[e].output_mimetype;l[e]={output_mimetype:t}}),this._exportFormats=l,this._requestingFormats.resolve(l),l}async getExportFormats(e=!0){return this._requestingFormats?this._requestingFormats.promise:e||!this._exportFormats?await this.fetchExportFormats():this._exportFormats}async exportAs(e){const{format:t,path:n}=e,{download:s=!1}=e.exporterOptions||{},r=this.serverSettings.baseUrl,o=i.URLExt.encodeParts(n);let a=i.URLExt.join(r,"nbconvert",t,o);s&&(a+="?download=true"),null===window||void 0===window||window.open(a,"_blank","noopener")}}},3962:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,s)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return s(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.serialize=function(e,t=""){return t===o.supportedKernelWebSocketProtocols.v1KernelWebsocketJupyterOrg?a.serializeV1KernelWebsocketJupyterOrg(e):a.serializeDefault(e)},t.deserialize=function(e,t=""){return t===o.supportedKernelWebSocketProtocols.v1KernelWebsocketJupyterOrg?a.deserializeV1KernelWebsocketJupyterOrg(e):a.deserializeDefault(e)};const o=r(n(9798));var a;!function(e){e.deserializeV1KernelWebsocketJupyterOrg=function(e){let t;const n=new DataView(e),i=Number(n.getBigUint64(0,!0));let s=[];for(let e=0;e<i;e++)s.push(Number(n.getBigUint64(8*(e+1),!0)));const r=new TextDecoder("utf8"),o=r.decode(e.slice(s[0],s[1])),a=JSON.parse(r.decode(e.slice(s[1],s[2]))),l=JSON.parse(r.decode(e.slice(s[2],s[3]))),c=JSON.parse(r.decode(e.slice(s[3],s[4]))),d=JSON.parse(r.decode(e.slice(s[4],s[5])));let u=[];for(let t=5;t<s.length-1;t++)u.push(new DataView(e.slice(s[t],s[t+1])));return t={channel:o,header:a,parent_header:l,metadata:c,content:d,buffers:u},t},e.serializeV1KernelWebsocketJupyterOrg=function(e){const t=JSON.stringify(e.header),n=null==e.parent_header?"{}":JSON.stringify(e.parent_header),i=JSON.stringify(e.metadata),s=JSON.stringify(e.content),r=void 0!==e.buffers?e.buffers:[],o=5+r.length+1;let a=[];a.push(8*(1+o)),a.push(e.channel.length+a[a.length-1]);const l=new TextEncoder,c=l.encode(e.channel),d=l.encode(t),u=l.encode(n),h=l.encode(i),p=l.encode(s),m=new Uint8Array(c.length+d.length+u.length+h.length+p.length);m.set(c),m.set(d,c.length),m.set(u,c.length+d.length),m.set(h,c.length+d.length+u.length),m.set(p,c.length+d.length+u.length+h.length);for(let e of[d.length,u.length,h.length,p.length])a.push(e+a[a.length-1]);let f=0;for(let e of r){let t=e.byteLength;a.push(t+a[a.length-1]),f+=t}const g=new Uint8Array(8*(1+o)+m.byteLength+f),v=new ArrayBuffer(8),_=new DataView(v);_.setBigUint64(0,BigInt(o),!0),g.set(new Uint8Array(v),0);for(let e=0;e<a.length;e++)_.setBigUint64(0,BigInt(a[e]),!0),g.set(new Uint8Array(v),8*(e+1));g.set(m,a[0]);for(let e=0;e<r.length;e++){const t=r[e];g.set(new Uint8Array(ArrayBuffer.isView(t)?t.buffer:t),a[5+e])}return g.buffer},e.deserializeDefault=function(e){let t;return t="string"==typeof e?JSON.parse(e):function(e){const t=new DataView(e),n=t.getUint32(0),i=[];if(n<2)throw new Error("Invalid incoming Kernel Message");for(let e=1;e<=n;e++)i.push(t.getUint32(4*e));const s=new Uint8Array(e.slice(i[0],i[1])),r=JSON.parse(new TextDecoder("utf8").decode(s));r.buffers=[];for(let t=1;t<n;t++){const n=i[t],s=i[t+1]||e.byteLength;r.buffers.push(new DataView(e.slice(n,s)))}return r}(e),t},e.serializeDefault=function(e){var t;let n;return n=(null===(t=e.buffers)||void 0===t?void 0:t.length)?function(e){const t=[],n=[],i=new TextEncoder;let s=[];void 0!==e.buffers&&(s=e.buffers,delete e.buffers);const r=i.encode(JSON.stringify(e));n.push(r.buffer);for(let e=0;e<s.length;e++){const t=s[e];n.push(ArrayBuffer.isView(t)?t.buffer:t)}const o=n.length;t.push(4*(o+1));for(let e=0;e+1<n.length;e++)t.push(t[t.length-1]+n[e].byteLength);const a=new Uint8Array(t[t.length-1]+n[n.length-1].byteLength),l=new DataView(a.buffer);l.setUint32(0,o);for(let e=0;e<t.length;e++)l.setUint32(4*(e+1),t[e]);for(let e=0;e<n.length;e++)a.set(new Uint8Array(n[e]),t[e]);return a.buffer}(e):JSON.stringify(e),n}}(a||(a={}))},3992:(e,t)=>{var n=Object.prototype.hasOwnProperty;function i(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function s(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var i,r,o=[];for(r in"string"!=typeof t&&(t="?"),e)if(n.call(e,r)){if((i=e[r])||null!=i&&!isNaN(i)||(i=""),r=s(r),i=s(i),null===r||null===i)continue;o.push(r+"="+i)}return o.length?t+o.join("&"):""},t.parse=function(e){for(var t,n=/([^=?#&]+)=?([^&]*)/g,s={};t=n.exec(e);){var r=i(t[1]),o=i(t[2]);null===r||null===o||r in s||(s[r]=o)}return s}},4056:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DataConnector=void 0,t.DataConnector=class{async list(e){throw new Error("DataConnector#list method has not been implemented.")}async remove(e){throw new Error("DataConnector#remove method has not been implemented.")}async save(e,t){throw new Error("DataConnector#save method has not been implemented.")}}},4272:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,s)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return s(t,e),t},o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.CommsOverSubshells=t.KernelConnection=t.KernelAPI=t.KernelMessage=t.Kernel=void 0;const a=n(2570);Object.defineProperty(t,"CommsOverSubshells",{enumerable:!0,get:function(){return a.CommsOverSubshells}});const l=r(n(2343));t.Kernel=l;const c=r(n(9798));t.KernelMessage=c;const d=r(n(8662));t.KernelAPI=d;const u=n(5089);Object.defineProperty(t,"KernelConnection",{enumerable:!0,get:function(){return u.KernelConnection}}),o(n(7275),t)},4320:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UserAPIClient=void 0;const i=n(1089),s=n(6376);t.UserAPIClient=class{constructor(e={}){var t;this.serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:i.ServerConnection.makeSettings()}async get(){const{baseUrl:e}=this.serverSettings,{makeRequest:t,ResponseError:n}=i.ServerConnection,r=s.URLExt.join(e,"api/me"),o=await t(r,{},this.serverSettings);if(200!==o.status)throw await n.create(o);return await o.json()}}},4396:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=WebSocket},4477:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LruCache=void 0,t.LruCache=class{constructor(e={}){this._map=new Map,this._maxSize=(null==e?void 0:e.maxSize)||128}get size(){return this._map.size}clear(){this._map.clear()}get(e){const t=this._map.get(e)||null;return null!=t&&(this._map.delete(e),this._map.set(e,t)),t}set(e,t){this._map.size>=this._maxSize&&this._map.delete(this._map.keys().next().value),this._map.set(e,t)}}},4591:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.convertToStyles=function e(t){var n={};for(var i in t){var s=t[i];if("$nest"===i){var r=s;for(var o in r){var a=r[o];n[o]=e(a)}}else"$debugName"===i?n.$displayName=s:n[i]=s}return n},t.convertToKeyframes=function(e){var t={};for(var n in e)"$debugName"!==n&&(t[n]=e[n]);return e.$debugName&&(t.$displayName=e.$debugName),t}},4798:(e,t)=>{function n(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var i={},s=0,r=e;s<r.length;s++){var o=r[s];if(null!=o&&!1!==o)for(var a in o){var l=o[a];(l||0===l)&&("$nest"===a&&l?i[a]=i.$nest?n(i.$nest,l):l:-1!==a.indexOf("&")||0===a.indexOf("@media")?i[a]=i[a]?n(i[a],l):l:i[a]=l)}}return i}Object.defineProperty(t,"__esModule",{value:!0}),t.raf="undefined"==typeof requestAnimationFrame?function(e){return setTimeout(e)}:"undefined"==typeof window?requestAnimationFrame:requestAnimationFrame.bind(window),t.classes=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.map(function(e){return e&&"object"==typeof e?Object.keys(e).map(function(t){return!!e[t]&&t}):[e]}).reduce(function(e,t){return e.concat(t)},[]).filter(function(e){return!!e}).join(" ")},t.extend=n,t.media=function(e){for(var t,s=[],r=1;r<arguments.length;r++)s[r-1]=arguments[r];var o=[];return e.type&&o.push(e.type),e.orientation&&o.push("(orientation: "+e.orientation+")"),e.minWidth&&o.push("(min-width: "+i(e.minWidth)+")"),e.maxWidth&&o.push("(max-width: "+i(e.maxWidth)+")"),e.minHeight&&o.push("(min-height: "+i(e.minHeight)+")"),e.maxHeight&&o.push("(max-height: "+i(e.maxHeight)+")"),e.prefersColorScheme&&o.push("(prefers-color-scheme: "+e.prefersColorScheme+")"),{$nest:(t={},t["@media "+o.join(" and ")]=n.apply(void 0,s),t)}};var i=function(e){return"string"==typeof e?e:e+"px"}},4816:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BuildManager=void 0;const i=n(6376),s=n(1089);t.BuildManager=class{constructor(e={}){var t;this.serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:s.ServerConnection.makeSettings()}get isAvailable(){return"true"===i.PageConfig.getOption("buildAvailable").toLowerCase()}get shouldCheck(){return"true"===i.PageConfig.getOption("buildCheck").toLowerCase()}getStatus(){const{_url:e,serverSettings:t}=this;return s.ServerConnection.makeRequest(e,{},t).then(e=>{if(200!==e.status)throw new s.ServerConnection.ResponseError(e);return e.json()}).then(e=>{if("string"!=typeof e.status)throw new Error("Invalid data");if("string"!=typeof e.message)throw new Error("Invalid data");return e})}build(){const{_url:e,serverSettings:t}=this;return s.ServerConnection.makeRequest(e,{method:"POST"},t).then(e=>{if(400===e.status)throw new s.ServerConnection.ResponseError(e,"Build aborted");if(200!==e.status){const t=`Build failed with ${e.status}.\n\n If you are experiencing the build failure after installing an extension (or trying to include previously installed extension after updating JupyterLab) please check the extension repository for new installation instructions as many extensions migrated to the prebuilt extensions system which no longer requires rebuilding JupyterLab (but uses a different installation procedure, typically involving a package manager such as 'pip' or 'conda').\n\n If you specifically intended to install a source extension, please run 'jupyter lab build' on the server for full output.`;throw new s.ServerConnection.ResponseError(e,t)}})}cancel(){const{_url:e,serverSettings:t}=this;return s.ServerConnection.makeRequest(e,{method:"DELETE"},t).then(e=>{if(204!==e.status)throw new s.ServerConnection.ResponseError(e)})}get _url(){const{baseUrl:e,appUrl:t}=this.serverSettings;return i.URLExt.join(e,t,"api/build")}}},4903:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalAPIClient=t.TERMINAL_SERVICE_URL=void 0,t.isAvailable=r,t.startNew=o,t.listRunning=a,t.shutdownTerminal=l;const i=n(6376),s=n(1089);function r(){return"true"===String(i.PageConfig.getOption("terminalsAvailable")).toLowerCase()}async function o(e=s.ServerConnection.makeSettings(),n,r){c.errorIfNotAvailable();const o=i.URLExt.join(e.baseUrl,t.TERMINAL_SERVICE_URL),a={method:"POST",body:JSON.stringify({name:n,cwd:r})},l=await s.ServerConnection.makeRequest(o,a,e);if(200!==l.status)throw await s.ServerConnection.ResponseError.create(l);return await l.json()}async function a(e=s.ServerConnection.makeSettings()){c.errorIfNotAvailable();const n=i.URLExt.join(e.baseUrl,t.TERMINAL_SERVICE_URL),r=await s.ServerConnection.makeRequest(n,{},e);if(200!==r.status)throw await s.ServerConnection.ResponseError.create(r);const o=await r.json();if(!Array.isArray(o))throw new Error("Invalid terminal list");return o}async function l(e,n=s.ServerConnection.makeSettings()){var r;c.errorIfNotAvailable();const o=i.URLExt.join(n.baseUrl,t.TERMINAL_SERVICE_URL),a=i.URLExt.join(o,e);if(!a.startsWith(o))throw new Error("Can only be used for terminal requests");const l=await s.ServerConnection.makeRequest(a,{method:"DELETE"},n);if(404===l.status){const t=null!==(r=(await l.json()).message)&&void 0!==r?r:`The terminal session "${e}"" does not exist on the server`;console.warn(t)}else if(204!==l.status)throw await s.ServerConnection.ResponseError.create(l)}var c;t.TERMINAL_SERVICE_URL="api/terminals",t.TerminalAPIClient=class{constructor(e={}){var t;this.serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:s.ServerConnection.makeSettings()}get isAvailable(){return r()}async startNew(e={}){const{name:t,cwd:n}=e;return o(this.serverSettings,t,n)}async listRunning(){return a(this.serverSettings)}async shutdown(e){return l(e,this.serverSettings)}},function(e){e.errorIfNotAvailable=function(){if(!r())throw new Error("Terminals Unavailable")}}(c||(c={}))},5013:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ActivityMonitor=void 0;const i=n(6903);t.ActivityMonitor=class{constructor(e){this._timer=-1,this._timeout=-1,this._isDisposed=!1,this._activityStopped=new i.Signal(this),e.signal.connect(this._onSignalFired,this),this._timeout=e.timeout||1e3}get activityStopped(){return this._activityStopped}get timeout(){return this._timeout}set timeout(e){this._timeout=e}get isDisposed(){return this._isDisposed}dispose(){this._isDisposed||(this._isDisposed=!0,i.Signal.clearData(this))}_onSignalFired(e,t){clearTimeout(this._timer),this._sender=e,this._args=t,this._timer=setTimeout(()=>{this._activityStopped.emit({sender:this._sender,args:this._args})},this._timeout)}}},5089:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,s)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return s(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.KernelConnection=void 0;const o=n(6376),a=n(5899),l=n(6903),c=n(608),d=n(2570),u=r(n(9798)),h=n(6073),p=r(n(8872)),m=n(8662),f=n(321),g=n(6376),v="_RESTARTING_";class _{constructor(e){var t,n,i,s,r,d,h,g;this._createSocket=(e=!0)=>{this._errorIfDisposed(),this._clearSocket(),this._updateConnectionStatus("connecting");const t=this.serverSettings,n=o.URLExt.join(t.wsUrl,m.KERNEL_SERVICE_URL,encodeURIComponent(this._id)),i=n.replace(/^((?:\w+:)?\/\/)(?:[^@\/]+@)/,"$1");console.debug(`Starting WebSocket: ${i}`);let s=o.URLExt.join(n,"channels?session_id="+encodeURIComponent(this._clientId));const r=t.token;t.appendToken&&""!==r&&(s+=`&token=${encodeURIComponent(r)}`);const a=e?this._supportedProtocols:[];this._ws=new t.WebSocket(s,a),this._ws.binaryType="arraybuffer";let l=!1;const d=async e=>{var t,n;if(!this._isDisposed){this._reason="",this._model=void 0;try{const t=await this._kernelAPIClient.getModel(this._id);this._model=t,"dead"===(null==t?void 0:t.execution_state)?this._updateStatus("dead"):this._onWSClose(e)}catch(i){if(i instanceof c.ServerConnection.NetworkError||503===(null===(t=i.response)||void 0===t?void 0:t.status)||424===(null===(n=i.response)||void 0===n?void 0:n.status)){const t=1e3*b.getRandomIntInclusive(10,30);setTimeout(d,t,e)}else this._reason="Kernel died unexpectedly",this._updateStatus("dead")}}},u=async e=>{l||(l=!0,await d(e))};this._ws.onmessage=this._onWSMessage,this._ws.onopen=this._onWSOpen,this._ws.onclose=u,this._ws.onerror=u},this._onWSOpen=e=>{if(""!==this._ws.protocol&&!this._supportedProtocols.includes(this._ws.protocol))throw console.log("Server selected unknown kernel wire protocol:",this._ws.protocol),this._updateStatus("dead"),new Error(`Unknown kernel wire protocol: ${this._ws.protocol}`);this._selectedProtocol=this._ws.protocol,this._ws.onclose=this._onWSClose,this._ws.onerror=this._onWSClose,this._updateConnectionStatus("connected")},this._onWSMessage=e=>{let t;try{t=this.serverSettings.serializer.deserialize(e.data,this._ws.protocol),p.validateMessage(t)}catch(e){throw e.message=`Kernel message validation error: ${e.message}`,e}this._kernelSession=t.header.session,this._msgChain=this._msgChain.then(()=>this._handleMessage(t)).catch(e=>{e.message.startsWith("Canceled future for ")&&console.error(e)}),this._anyMessage.emit({msg:t,direction:"recv"})},this._onWSClose=e=>{this.isDisposed||this._reconnect()},this._id="",this._name="",this._status="unknown",this._connectionStatus="connecting",this._kernelSession="",this._isDisposed=!1,this._ws=null,this._username="",this._reconnectLimit=7,this._reconnectAttempt=0,this._reconnectTimeout=null,this._supportedProtocols=Object.values(u.supportedKernelWebSocketProtocols),this._selectedProtocol="",this._commsOverSubshells=c.CommsOverSubshells.PerCommTarget,this._futures=new Map,this._comms=new Map,this._targetRegistry=Object.create(null),this._info=new a.PromiseDelegate,this._pendingMessages=[],this._statusChanged=new l.Signal(this),this._connectionStatusChanged=new l.Signal(this),this._disposed=new l.Signal(this),this._iopubMessage=new l.Signal(this),this._anyMessage=new l.Signal(this),this._pendingInput=new l.Signal(this),this._unhandledMessage=new l.Signal(this),this._displayIdToParentIds=new Map,this._msgIdToDisplayIds=new Map,this._msgChain=Promise.resolve(),this._hasPendingInput=!1,this._reason="",this._noOp=()=>{},this._supportsSubshells=!1,this._name=e.model.name,this._id=e.model.id,this.serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:c.ServerConnection.makeSettings(),this._kernelAPIClient=null!==(n=e.kernelAPIClient)&&void 0!==n?n:new m.KernelAPIClient({serverSettings:this.serverSettings}),this._kernelSpecAPIClient=null!==(i=e.kernelSpecAPIClient)&&void 0!==i?i:new f.KernelSpecAPIClient({serverSettings:this.serverSettings}),this._clientId=null!==(s=e.clientId)&&void 0!==s?s:a.UUID.uuid4(),this._username=null!==(r=e.username)&&void 0!==r?r:"",this.handleComms=null===(d=e.handleComms)||void 0===d||d,this._commsOverSubshells=null!==(h=e.commsOverSubshells)&&void 0!==h?h:c.CommsOverSubshells.PerCommTarget,this._subshellId=null!==(g=e.subshellId)&&void 0!==g?g:null,this._createSocket()}get disposed(){return this._disposed}get commsOverSubshells(){return this._commsOverSubshells}set commsOverSubshells(e){this._commsOverSubshells=e;for(const[t,n]of this._comms)n.commsOverSubshells=e}get statusChanged(){return this._statusChanged}get connectionStatusChanged(){return this._connectionStatusChanged}get iopubMessage(){return this._iopubMessage}get unhandledMessage(){return this._unhandledMessage}get model(){return this._model||{id:this.id,name:this.name,reason:this._reason}}get anyMessage(){return this._anyMessage}get pendingInput(){return this._pendingInput}get id(){return this._id}get name(){return this._name}get username(){return this._username}get clientId(){return this._clientId}get subshellId(){return this._subshellId}set subshellId(e){this._subshellId=e}get status(){return this._status}get connectionStatus(){return this._connectionStatus}get isDisposed(){return this._isDisposed}get info(){return this._info.promise}get spec(){return this._specPromise||(this._specPromise=this._kernelSpecAPIClient.get().then(e=>e.kernelspecs[this._name])),this._specPromise}get supportsSubshells(){return this._supportsSubshells}clone(e={}){return new _({model:this.model,username:this.username,serverSettings:this.serverSettings,handleComms:!1,kernelAPIClient:this._kernelAPIClient,commsOverSubshells:c.CommsOverSubshells.Disabled,...e})}dispose(){if(this.isDisposed)return;const e=()=>{this._isDisposed=!0,this._disposed.emit(),this._updateConnectionStatus("disconnected"),this._clearKernelState(),this._pendingMessages=[],this._clearSocket(),l.Signal.clearData(this)};null!==this._subshellId?this.requestDeleteSubshell({subshell_id:this._subshellId},!0).onReply=t=>{e()}:e()}sendShellMessage(e,t=!1,n=!0){return this._sendKernelShellControl(h.KernelShellFutureHandler,e,t,n)}sendControlMessage(e,t=!1,n=!0){return this._sendKernelShellControl(h.KernelControlFutureHandler,e,t,n)}_sendKernelShellControl(e,t,n=!1,i=!0){this._sendMessage(t),this._anyMessage.emit({msg:t,direction:"send"});const s=new e(()=>{const e=t.header.msg_id;this._futures.delete(e);const n=this._msgIdToDisplayIds.get(e);n&&(n.forEach(t=>{const n=this._displayIdToParentIds.get(t);if(n){const i=n.indexOf(e);if(-1===i)return;1===n.length?this._displayIdToParentIds.delete(t):(n.splice(i,1),this._displayIdToParentIds.set(t,n))}}),this._msgIdToDisplayIds.delete(e))},t,n,i,this);return this._futures.set(t.header.msg_id,s),s}_sendMessage(e,t=!0){if("dead"===this.status)throw new Error("Kernel is dead");if((""===this._kernelSession||this._kernelSession===v)&&u.isInfoRequestMsg(e)){if("connected"===this.connectionStatus)return void this._ws.send(this.serverSettings.serializer.serialize(e,this._ws.protocol));throw new Error("Could not send message: status is not connected")}if(t&&this._pendingMessages.length>0)this._pendingMessages.push(e);else if("connected"===this.connectionStatus&&this._kernelSession!==v)this._ws.send(this.serverSettings.serializer.serialize(e,this._ws.protocol));else{if(!t)throw new Error("Could not send message");this._pendingMessages.push(e)}}async interrupt(){if(this.hasPendingInput=!1,"dead"===this.status)throw new Error("Kernel is dead");return this._kernelAPIClient.interrupt(this.id)}async restart(){if("dead"===this.status)throw new Error("Kernel is dead");this._updateStatus("restarting"),this._clearKernelState(),this._kernelSession=v,await this._kernelAPIClient.restart(this.id),await this.reconnect(),this.hasPendingInput=!1}reconnect(){this._errorIfDisposed();const e=new a.PromiseDelegate,t=(n,i)=>{"connected"===i?(e.resolve(),this.connectionStatusChanged.disconnect(t,this)):"disconnected"===i&&(e.reject(new Error("Kernel connection disconnected")),this.connectionStatusChanged.disconnect(t,this))};return this.connectionStatusChanged.connect(t,this),this._reconnectAttempt=0,this._reconnect(),e.promise}async shutdown(){"dead"!==this.status&&await this._kernelAPIClient.shutdown(this.id),this.handleShutdown()}handleShutdown(){this._updateStatus("dead"),this.dispose()}async requestKernelInfo(){const e=u.createMessage({msgType:"kernel_info_request",channel:"shell",username:this._username,session:this._clientId,subshellId:this._subshellId,content:{}});let t;try{t=await b.handleShellMessage(this,e)}catch(e){if(this.isDisposed)return;throw e}if(this._errorIfDisposed(),!t)return;if(void 0===t.content.status&&(t.content.status="ok"),"ok"!==t.content.status)return this._info.reject("Kernel info reply errored"),t;this._info.resolve(t.content),this._kernelSession=t.header.session;const n=t.content.supported_features;return this._supportsSubshells=void 0!==n&&n.includes("kernel subshells"),t}requestComplete(e){const t=u.createMessage({msgType:"complete_request",channel:"shell",username:this._username,session:this._clientId,subshellId:this._subshellId,content:e});return b.handleShellMessage(this,t)}requestInspect(e){const t=u.createMessage({msgType:"inspect_request",channel:"shell",username:this._username,session:this._clientId,subshellId:this._subshellId,content:e});return b.handleShellMessage(this,t)}requestHistory(e){const t=u.createMessage({msgType:"history_request",channel:"shell",username:this._username,session:this._clientId,subshellId:this._subshellId,content:e});return b.handleShellMessage(this,t)}requestExecute(e,t=!0,n){const i=u.createMessage({msgType:"execute_request",channel:"shell",username:this._username,session:this._clientId,subshellId:this._subshellId,content:{silent:!1,store_history:!0,user_expressions:{},allow_stdin:!0,stop_on_error:!1,...e},metadata:n});return this.sendShellMessage(i,!0,t)}requestDebug(e,t=!0){const n=u.createMessage({msgType:"debug_request",channel:"control",username:this._username,session:this._clientId,content:e});return this.sendControlMessage(n,!0,t)}requestCreateSubshell(e,t=!0){if(!this.supportsSubshells)throw new Error("Kernel subshells are not supported");const n=u.createMessage({msgType:"create_subshell_request",channel:"control",username:this._username,session:this._clientId,content:e});return this.sendControlMessage(n,!0,t)}requestDeleteSubshell(e,t=!0){if(!this.supportsSubshells)throw new Error("Kernel subshells are not supported");const n=u.createMessage({msgType:"delete_subshell_request",channel:"control",username:this._username,session:this._clientId,content:e});return this.sendControlMessage(n,!0,t)}requestListSubshell(e,t=!0){if(!this.supportsSubshells)throw new Error("Kernel subshells are not supported");const n=u.createMessage({msgType:"list_subshell_request",channel:"control",username:this._username,session:this._clientId,content:e});return this.sendControlMessage(n,!0,t)}requestIsComplete(e){const t=u.createMessage({msgType:"is_complete_request",channel:"shell",username:this._username,session:this._clientId,subshellId:this._subshellId,content:e});return b.handleShellMessage(this,t)}requestCommInfo(e){const t=u.createMessage({msgType:"comm_info_request",channel:"shell",username:this._username,session:this._clientId,subshellId:this._subshellId,content:e});return b.handleShellMessage(this,t)}sendInputReply(e,t){const n=u.createMessage({msgType:"input_reply",channel:"stdin",username:this._username,session:this._clientId,content:e});n.parent_header=t,this._sendMessage(n),this._anyMessage.emit({msg:n,direction:"send"}),this.hasPendingInput=!1}createComm(e,t=a.UUID.uuid4()){if(!this.handleComms)throw new Error("Comms are disabled on this kernel connection");if(this._comms.has(t))throw new Error("Comm is already created");const n=new d.CommHandler(e,t,this,()=>{this._unregisterComm(t)},this._commsOverSubshells);return this._comms.set(t,n),n}hasComm(e){return this._comms.has(e)}registerCommTarget(e,t){this.handleComms&&(this._targetRegistry[e]=t)}removeCommTarget(e,t){this.handleComms&&(this.isDisposed||this._targetRegistry[e]!==t||delete this._targetRegistry[e])}registerMessageHook(e,t){var n;const i=null===(n=this._futures)||void 0===n?void 0:n.get(e);i&&i.registerMessageHook(t)}removeMessageHook(e,t){var n;const i=null===(n=this._futures)||void 0===n?void 0:n.get(e);i&&i.removeMessageHook(t)}removeInputGuard(){this.hasPendingInput=!1}async _handleDisplayId(e,t){var n,i;const s=t.parent_header.msg_id;let r=this._displayIdToParentIds.get(e);if(r){const e={header:a.JSONExt.deepCopy(t.header),parent_header:a.JSONExt.deepCopy(t.parent_header),metadata:a.JSONExt.deepCopy(t.metadata),content:a.JSONExt.deepCopy(t.content),channel:t.channel,buffers:t.buffers?t.buffers.slice():[]};e.header.msg_type="update_display_data",await Promise.all(r.map(async t=>{const n=this._futures&&this._futures.get(t);n&&await n.handleMsg(e)}))}if("update_display_data"===t.header.msg_type)return!0;r=null!==(n=this._displayIdToParentIds.get(e))&&void 0!==n?n:[],-1===r.indexOf(s)&&r.push(s),this._displayIdToParentIds.set(e,r);const o=null!==(i=this._msgIdToDisplayIds.get(s))&&void 0!==i?i:[];return-1===o.indexOf(s)&&o.push(s),this._msgIdToDisplayIds.set(s,o),!1}_clearSocket(){null!==this._ws&&(this._ws.onopen=this._noOp,this._ws.onclose=this._noOp,this._ws.onerror=this._noOp,this._ws.onmessage=this._noOp,this._ws.close(),this._ws=null)}_updateStatus(e){this._status!==e&&"dead"!==this._status&&(this._status=e,b.logKernelStatus(this),this._statusChanged.emit(e),"dead"===e&&this.dispose())}_sendPending(){for(;"connected"===this.connectionStatus&&this._kernelSession!==v&&this._pendingMessages.length>0;)this._sendMessage(this._pendingMessages[0],!1),this._pendingMessages.shift()}_clearKernelState(){this._kernelSession="",this._pendingMessages=[],this._futures.forEach(e=>{e.dispose()}),this._comms.forEach(e=>{e.dispose()}),this._msgChain=Promise.resolve(),this._futures=new Map,this._comms=new Map,this._displayIdToParentIds.clear(),this._msgIdToDisplayIds.clear()}_assertCurrentMessage(e){if(this._errorIfDisposed(),e.header.session!==this._kernelSession)throw new Error(`Canceling handling of old message: ${e.header.msg_type}`)}async _handleCommOpen(e){this._assertCurrentMessage(e);const t=e.content,n=new d.CommHandler(t.target_name,t.comm_id,this,()=>{this._unregisterComm(t.comm_id)},this.commsOverSubshells);this._comms.set(t.comm_id,n);try{const i=await b.loadObject(t.target_name,t.target_module,this._targetRegistry);await i(n,e)}catch(e){throw n.close(),console.error("Exception opening new comm"),e}}async _handleCommClose(e){this._assertCurrentMessage(e);const t=e.content,n=this._comms.get(t.comm_id);if(!n)return void console.error("Comm not found for comm id "+t.comm_id);this._unregisterComm(n.commId);const i=n.onClose;i&&await i(e),n.dispose()}async _handleCommMsg(e){this._assertCurrentMessage(e);const t=e.content,n=this._comms.get(t.comm_id);if(!n)return;const i=n.onMsg;i&&await i(e)}_unregisterComm(e){this._comms.delete(e)}_updateConnectionStatus(e){if(this._connectionStatus!==e){if(this._connectionStatus=e,"connecting"!==e&&(this._reconnectAttempt=0,clearTimeout(this._reconnectTimeout)),"dead"!==this.status)if("connected"===e){let e=this._kernelSession===v,t=this.requestKernelInfo(),n=!1,i=()=>{n||(n=!0,e&&this._kernelSession===v&&(this._kernelSession=""),clearTimeout(s),this._pendingMessages.length>0&&this._sendPending())};t.then(i);let s=setTimeout(i,3e3)}else this._updateStatus("unknown");this._connectionStatusChanged.emit(e)}}async _handleMessage(e){var t,n;let i=!1;if(e.parent_header&&"iopub"===e.channel&&(u.isDisplayDataMsg(e)||u.isUpdateDisplayDataMsg(e)||u.isExecuteResultMsg(e))){const n=(null!==(t=e.content.transient)&&void 0!==t?t:{}).display_id;n&&(i=await this._handleDisplayId(n,e),this._assertCurrentMessage(e))}if(!i&&e.parent_header){const t=e.parent_header,i=null===(n=this._futures)||void 0===n?void 0:n.get(t.msg_id);if(i)await i.handleMsg(e),this._assertCurrentMessage(e);else{const n=t.session===this.clientId;"iopub"!==e.channel&&n&&this._unhandledMessage.emit(e)}}if("iopub"===e.channel){switch(e.header.msg_type){case"status":{const t=g.PageConfig.getOption("untracked_message_types");if(JSON.parse(t||"[]").includes(e.parent_header.msg_type))break;const n=e.content.execution_state;"restarting"===n&&Promise.resolve().then(async()=>{this._updateStatus("autorestarting"),this._clearKernelState(),await this.reconnect()}),this._updateStatus(n);break}case"comm_open":this.handleComms&&await this._handleCommOpen(e);break;case"comm_msg":this.handleComms&&await this._handleCommMsg(e);break;case"comm_close":this.handleComms&&await this._handleCommClose(e)}this.isDisposed||(this._assertCurrentMessage(e),this._iopubMessage.emit(e))}}_reconnect(){if(this._errorIfDisposed(),clearTimeout(this._reconnectTimeout),this._reconnectAttempt<this._reconnectLimit){this._updateConnectionStatus("connecting");const e=b.getRandomIntInclusive(0,1e3*(Math.pow(2,this._reconnectAttempt)-1));console.warn(`Connection lost, reconnecting in ${Math.floor(e/1e3)} seconds.`);const t=""!==this._selectedProtocol;this._reconnectTimeout=setTimeout(this._createSocket,e,t),this._reconnectAttempt+=1}else this._updateConnectionStatus("disconnected");this._clearSocket()}_errorIfDisposed(){if(this.isDisposed)throw new Error("Kernel connection is disposed")}get hasPendingInput(){return this._hasPendingInput}set hasPendingInput(e){this._hasPendingInput=e,this._pendingInput.emit(e)}}var b;t.KernelConnection=_,function(e){e.logKernelStatus=function(e){switch(e.status){case"idle":case"busy":case"unknown":return;default:console.debug(`Kernel: ${e.status} (${e.id})`)}},e.handleShellMessage=async function(e,t){return e.sendShellMessage(t,!0).done},e.loadObject=function(e,t,n){return new Promise((i,s)=>{if(t){if("undefined"==typeof requirejs)throw new Error("requirejs not found");requirejs([t],n=>{void 0===n[e]?s(new Error(`Object '${e}' not found in module '${t}'`)):i(n[e])},s)}else(null==n?void 0:n[e])?i(n[e]):s(new Error(`Object '${e}' not found in registry`))})},e.getRandomIntInclusive=function(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e}}(b||(b={}))},5287:(e,t)=>{var n=Symbol.for("react.element"),i=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.iterator,m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},f=Object.assign,g={};function v(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}function _(){}function b(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},_.prototype=v.prototype;var y=b.prototype=new _;y.constructor=b,f(y,v.prototype),y.isPureReactComponent=!0;var w=Array.isArray,x=Object.prototype.hasOwnProperty,S={current:null},C={key:!0,ref:!0,__self:!0,__source:!0};function k(e,t,i){var s,r={},o=null,a=null;if(null!=t)for(s in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(o=""+t.key),t)x.call(t,s)&&!C.hasOwnProperty(s)&&(r[s]=t[s]);var l=arguments.length-2;if(1===l)r.children=i;else if(1<l){for(var c=Array(l),d=0;d<l;d++)c[d]=arguments[d+2];r.children=c}if(e&&e.defaultProps)for(s in l=e.defaultProps)void 0===r[s]&&(r[s]=l[s]);return{$$typeof:n,type:e,key:o,ref:a,props:r,_owner:S.current}}function E(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var M=/\/+/g;function P(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function I(e,t,s,r,o){var a=typeof e;"undefined"!==a&&"boolean"!==a||(e=null);var l=!1;if(null===e)l=!0;else switch(a){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case n:case i:l=!0}}if(l)return o=o(l=e),e=""===r?"."+P(l,0):r,w(o)?(s="",null!=e&&(s=e.replace(M,"$&/")+"/"),I(o,t,s,"",function(e){return e})):null!=o&&(E(o)&&(o=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(o,s+(!o.key||l&&l.key===o.key?"":(""+o.key).replace(M,"$&/")+"/")+e)),t.push(o)),1;if(l=0,r=""===r?".":r+":",w(e))for(var c=0;c<e.length;c++){var d=r+P(a=e[c],c);l+=I(a,t,s,d,o)}else if(d=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=p&&e[p]||e["@@iterator"])?e:null}(e),"function"==typeof d)for(e=d.call(e),c=0;!(a=e.next()).done;)l+=I(a=a.value,t,s,d=r+P(a,c++),o);else if("object"===a)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function L(e,t,n){if(null==e)return e;var i=[],s=0;return I(e,i,"","",function(e){return t.call(n,e,s++)}),i}function O(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var A={current:null},D={transition:null},T={ReactCurrentDispatcher:A,ReactCurrentBatchConfig:D,ReactCurrentOwner:S};function R(){throw Error("act(...) is not supported in production builds of React.")}t.Children={map:L,forEach:function(e,t,n){L(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return L(e,function(){t++}),t},toArray:function(e){return L(e,function(e){return e})||[]},only:function(e){if(!E(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=v,t.Fragment=s,t.Profiler=o,t.PureComponent=b,t.StrictMode=r,t.Suspense=d,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=T,t.act=R,t.cloneElement=function(e,t,i){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var s=f({},e.props),r=e.key,o=e.ref,a=e._owner;if(null!=t){if(void 0!==t.ref&&(o=t.ref,a=S.current),void 0!==t.key&&(r=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)x.call(t,c)&&!C.hasOwnProperty(c)&&(s[c]=void 0===t[c]&&void 0!==l?l[c]:t[c])}var c=arguments.length-2;if(1===c)s.children=i;else if(1<c){l=Array(c);for(var d=0;d<c;d++)l[d]=arguments[d+2];s.children=l}return{$$typeof:n,type:e.type,key:r,ref:o,props:s,_owner:a}},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},t.createElement=k,t.createFactory=function(e){var t=k.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=E,t.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:O}},t.memo=function(e,t){return{$$typeof:u,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=D.transition;D.transition={};try{e()}finally{D.transition=t}},t.unstable_act=R,t.useCallback=function(e,t){return A.current.useCallback(e,t)},t.useContext=function(e){return A.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return A.current.useDeferredValue(e)},t.useEffect=function(e,t){return A.current.useEffect(e,t)},t.useId=function(){return A.current.useId()},t.useImperativeHandle=function(e,t,n){return A.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return A.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return A.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return A.current.useMemo(e,t)},t.useReducer=function(e,t,n){return A.current.useReducer(e,t,n)},t.useRef=function(e){return A.current.useRef(e)},t.useState=function(e){return A.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return A.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return A.current.useTransition()},t.version="18.3.1"},5310:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RestorablePool=void 0;const i=n(5899),s=n(1628),r=n(6903);var o;t.RestorablePool=class{constructor(e){this._added=new r.Signal(this),this._current=null,this._currentChanged=new r.Signal(this),this._hasRestored=!1,this._isDisposed=!1,this._objects=new Set,this._restore=null,this._restored=new i.PromiseDelegate,this._updated=new r.Signal(this),this.namespace=e.namespace}get added(){return this._added}get current(){return this._current}set current(e){this._current!==e&&null!==e&&this._objects.has(e)&&(this._current=e,this._currentChanged.emit(this._current))}get currentChanged(){return this._currentChanged}get isDisposed(){return this._isDisposed}get restored(){return this._restored.promise}get size(){return this._objects.size}get updated(){return this._updated}async add(e){var t,n;if(e.isDisposed){const t="A disposed object cannot be added.";throw console.warn(t,e),new Error(t)}if(this._objects.has(e)){const t="This object already exists in the pool.";throw console.warn(t,e),new Error(t)}if(this._objects.add(e),e.disposed.connect(this._onInstanceDisposed,this),!o.injectedProperty.get(e)){if(this._restore){const{connector:i}=this._restore,s=this._restore.name(e);if(s){const r=`${this.namespace}:${s}`,a=null===(n=(t=this._restore).args)||void 0===n?void 0:n.call(t,e);o.nameProperty.set(e,r),await i.save(r,{data:a})}}this._added.emit(e)}}dispose(){this.isDisposed||(this._current=null,this._isDisposed=!0,this._objects.clear(),r.Signal.clearData(this))}find(e){const t=this._objects.values();for(const n of t)if(e(n))return n}forEach(e){this._objects.forEach(e)}filter(e){const t=[];return this.forEach(n=>{e(n)&&t.push(n)}),t}inject(e){return o.injectedProperty.set(e,!0),this.add(e)}has(e){return this._objects.has(e)}async restore(e){if(this._hasRestored)throw new Error("This pool has already been restored.");this._hasRestored=!0;const{command:t,connector:n,registry:i,when:s}=e,r=this.namespace,o=s?[n.list(r)].concat(s):[n.list(r)];this._restore=e;const[a]=await Promise.all(o),l=await Promise.all(a.ids.map(async(e,s)=>{const r=a.values[s],o=r&&r.data;return void 0===o?n.remove(e):i.execute(t,o).catch(()=>n.remove(e))}));return this._restored.resolve(),l}async save(e){var t,n;const i=o.injectedProperty.get(e);if(!this._restore||!this.has(e)||i)return;const{connector:s}=this._restore,r=this._restore.name(e),a=o.nameProperty.get(e),l=r?`${this.namespace}:${r}`:"";if(a&&a!==l&&await s.remove(a),o.nameProperty.set(e,l),l){const i=null===(n=(t=this._restore).args)||void 0===n?void 0:n.call(t,e);await s.save(l,{data:i})}a!==l&&this._updated.emit(e)}_onInstanceDisposed(e){if(this._objects.delete(e),e===this._current&&(this._current=null,this._currentChanged.emit(this._current)),o.injectedProperty.get(e))return;if(!this._restore)return;const{connector:t}=this._restore,n=o.nameProperty.get(e);n&&t.remove(n)}},function(e){e.injectedProperty=new s.AttachedProperty({name:"injected",create:()=>!1}),e.nameProperty=new s.AttachedProperty({name:"name",create:()=>""})}(o||(o={}))},5338:(e,t,n)=>{var i=n(3342);t.H=i.createRoot,i.hydrateRoot},5399:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingManager=void 0;const i=n(6376),s=n(9531),r=n(1089);class o extends s.DataConnector{constructor(e={}){var t;super(),this.serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:r.ServerConnection.makeSettings()}async fetch(e){if(!e)throw new Error("Plugin `id` parameter is required for settings fetch.");const{serverSettings:t}=this,{baseUrl:n,appUrl:i}=t,{makeRequest:s,ResponseError:o}=r.ServerConnection,l=n+i,c=a.url(l,e),d=await s(c,{},t);if(200!==d.status)throw await o.create(d);return d.json()}async list(e){var t,n,i,s;const{serverSettings:o}=this,{baseUrl:l,appUrl:c}=o,{makeRequest:d,ResponseError:u}=r.ServerConnection,h=l+c,p=a.url(h,"","ids"===e),m=await d(p,{},o);if(200!==m.status)throw new u(m);const f=await m.json(),g=null!==(n=null===(t=null==f?void 0:f.settings)||void 0===t?void 0:t.map(e=>e.id))&&void 0!==n?n:[];let v=[];return e||(v=null!==(s=null===(i=null==f?void 0:f.settings)||void 0===i?void 0:i.map(e=>(e.data={composite:{},user:{}},e)))&&void 0!==s?s:[]),{ids:g,values:v}}async save(e,t){const{serverSettings:n}=this,{baseUrl:i,appUrl:s}=n,{makeRequest:o,ResponseError:l}=r.ServerConnection,c=i+s,d=a.url(c,e),u={body:JSON.stringify({raw:t}),method:"PUT"},h=await o(d,u,n);if(204!==h.status)throw new l(h)}}var a;t.SettingManager=o,function(e){e.url=function(e,t,n){const s=n?i.URLExt.objectToQueryString({ids_only:!0}):"",r=i.URLExt.join(e,"api/settings"),o=i.URLExt.join(r,t);if(!o.startsWith(r))throw new Error("Can only be used for workspaces requests");return`${o}${s}`}}(a||(a={}))},5412:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BaseManager=void 0;const i=n(6903),s=n(1089);t.BaseManager=class{constructor(e){var t;this._isDisposed=!1,this._disposed=new i.Signal(this),this.serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:s.ServerConnection.makeSettings()}get disposed(){return this._disposed}get isDisposed(){return this._isDisposed}get isActive(){return!0}dispose(){this.isDisposed||(this._isDisposed=!0,this._disposed.emit(void 0),i.Signal.clearData(this))}}},5899:function(e,t,n){!function(e,t){e.JSONExt=void 0,function(e){function t(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e}function n(e){return Array.isArray(e)}function i(e,s){if(e===s)return!0;if(t(e)||t(s))return!1;let r=n(e),o=n(s);return r===o&&(r&&o?function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0,s=e.length;n<s;++n)if(!i(e[n],t[n]))return!1;return!0}(e,s):function(e,t){if(e===t)return!0;for(let n in e)if(void 0!==e[n]&&!(n in t))return!1;for(let n in t)if(void 0!==t[n]&&!(n in e))return!1;for(let n in e){let s=e[n],r=t[n];if(void 0!==s||void 0!==r){if(void 0===s||void 0===r)return!1;if(!i(s,r))return!1}}return!0}(e,s))}function s(e){return t(e)?e:n(e)?function(e){let t=new Array(e.length);for(let n=0,i=e.length;n<i;++n)t[n]=s(e[n]);return t}(e):function(e){let t={};for(let n in e){let i=e[n];void 0!==i&&(t[n]=s(i))}return t}(e)}e.emptyObject=Object.freeze({}),e.emptyArray=Object.freeze([]),e.isPrimitive=t,e.isArray=n,e.isObject=function(e){return!t(e)&&!n(e)},e.deepEqual=i,e.deepCopy=s}(e.JSONExt||(e.JSONExt={}));var n;!function(e){class n{constructor(e){var t,n,i,s;this._activated=!1,this._promise=null,this._service=null,this.id=e.id,this.description=null!==(t=e.description)&&void 0!==t?t:"",this.activate=e.activate,this.deactivate=null!==(n=e.deactivate)&&void 0!==n?n:null,this.provides=null!==(i=e.provides)&&void 0!==i?i:null,this.autoStart=null!==(s=e.autoStart)&&void 0!==s&&s,this.requires=e.requires?e.requires.slice():[],this.optional=e.optional?e.optional.slice():[]}get activated(){return this._activated}set activated(e){this._activated=e}get service(){return this._service}set service(e){this._service=e}get promise(){return this._promise}set promise(e){this._promise=e}}e.createPluginData=function(e){return new n(e)},e.ensureNoCycle=function(e,t,n){const i=[...e.requires,...e.optional],s=i=>{if(i===e.provides)return!0;const o=n.get(i);if(!o)return!1;const a=t.get(o),l=[...a.requires,...a.optional];return 0!==l.length&&(r.push(o),!!l.some(s)||(r.pop(),!1))};if(!e.provides||0===i.length)return;const r=[e.id];if(i.some(s))throw new ReferenceError(`Cycle detected: ${r.join(" -> ")}.`)},e.findDependents=function(e,n,i){const s=new Array,r=e=>{const t=n.get(e),r=[...t.requires,...t.optional];s.push(...r.reduce((t,n)=>{const s=i.get(n);return s&&t.push([e,s]),t},[]))};for(const e of n.keys())r(e);const o=s.filter(t=>t[1]===e);let a=0;for(;o.length>a;){const e=o.length,t=new Set(o.map(e=>e[0]));for(const e of t)s.filter(t=>t[1]===e).forEach(e=>{o.includes(e)||o.push(e)});a=e}const l=t.topologicSort(o),c=l.findIndex(t=>t===e);return-1===c?[e]:l.slice(0,c+1)},e.collectStartupPlugins=function(e,t){const n=new Set;for(const t of e.keys())!0===e.get(t).autoStart&&n.add(t);if(t.startPlugins)for(const e of t.startPlugins)n.add(e);if(t.ignorePlugins)for(const e of t.ignorePlugins)n.delete(e);return Array.from(n)}}(n||(n={}));function i(e){let t=0;for(let n=0,i=e.length;n<i;++n)n%4==0&&(t=4294967295*Math.random()>>>0),e[n]=255&t,t>>>=8}e.Random=void 0,(e.Random||(e.Random={})).getRandomValues=(()=>{const e="undefined"!=typeof window&&(window.crypto||window.msCrypto)||null;return e&&"function"==typeof e.getRandomValues?function(t){return e.getRandomValues(t)}:i})(),e.UUID=void 0,(e.UUID||(e.UUID={})).uuid4=function(e){const t=new Uint8Array(16),n=new Array(256);for(let e=0;e<16;++e)n[e]="0"+e.toString(16);for(let e=16;e<256;++e)n[e]=e.toString(16);return function(){return e(t),t[6]=64|15&t[6],t[8]=128|63&t[8],n[t[0]]+n[t[1]]+n[t[2]]+n[t[3]]+"-"+n[t[4]]+n[t[5]]+"-"+n[t[6]]+n[t[7]]+"-"+n[t[8]]+n[t[9]]+"-"+n[t[10]]+n[t[11]]+n[t[12]]+n[t[13]]+n[t[14]]+n[t[15]]}}(e.Random.getRandomValues),e.MimeData=class{constructor(){this._types=[],this._values=[]}types(){return this._types.slice()}hasData(e){return-1!==this._types.indexOf(e)}getData(e){let t=this._types.indexOf(e);return-1!==t?this._values[t]:void 0}setData(e,t){this.clearData(e),this._types.push(e),this._values.push(t)}clearData(e){let t=this._types.indexOf(e);-1!==t&&(this._types.splice(t,1),this._values.splice(t,1))}clear(){this._types.length=0,this._values.length=0}},e.PluginRegistry=class{constructor(e={}){this._application=null,this._validatePlugin=()=>!0,this._plugins=new Map,this._services=new Map,e.validatePlugin&&(console.info("Plugins may be rejected by the custom validation plugin method."),this._validatePlugin=e.validatePlugin)}get application(){return this._application}set application(e){if(null!==this._application)throw Error("PluginRegistry.application is already set. It cannot be overridden.");this._application=e}get deferredPlugins(){return Array.from(this._plugins).filter(([e,t])=>"defer"===t.autoStart).map(([e,t])=>e)}getPluginDescription(e){var t,n;return null!==(n=null===(t=this._plugins.get(e))||void 0===t?void 0:t.description)&&void 0!==n?n:""}hasPlugin(e){return this._plugins.has(e)}isPluginActivated(e){var t,n;return null!==(n=null===(t=this._plugins.get(e))||void 0===t?void 0:t.activated)&&void 0!==n&&n}listPlugins(){return Array.from(this._plugins.keys())}registerPlugin(e){if(this._plugins.has(e.id))throw new TypeError(`Plugin '${e.id}' is already registered.`);if(!this._validatePlugin(e))throw new Error(`Plugin '${e.id}' is not valid.`);const t=n.createPluginData(e);n.ensureNoCycle(t,this._plugins,this._services),t.provides&&this._services.set(t.provides,t.id),this._plugins.set(t.id,t)}registerPlugins(e){for(const t of e)this.registerPlugin(t)}deregisterPlugin(e,t){const n=this._plugins.get(e);if(n){if(n.activated&&!t)throw new Error(`Plugin '${e}' is still active.`);this._plugins.delete(e)}}async activatePlugin(e){const t=this._plugins.get(e);if(!t)throw new ReferenceError(`Plugin '${e}' is not registered.`);if(t.activated)return;if(t.promise)return t.promise;const n=t.requires.map(e=>this.resolveRequiredService(e)),i=t.optional.map(e=>this.resolveOptionalService(e));return t.promise=Promise.all([...n,...i]).then(e=>t.activate.apply(void 0,[this.application,...e])).then(e=>{t.service=e,t.activated=!0,t.promise=null}).catch(e=>{throw t.promise=null,e}),t.promise}async activatePlugins(e,t={}){switch(e){case"defer":{const e=this.deferredPlugins.filter(e=>this._plugins.get(e).autoStart).map(e=>this.activatePlugin(e));await Promise.all(e);break}case"startUp":{const e=n.collectStartupPlugins(this._plugins,t).map(async e=>{try{return await this.activatePlugin(e)}catch(t){console.error(`Plugin '${e}' failed to activate.`,t)}});await Promise.all(e);break}}}async deactivatePlugin(e){const t=this._plugins.get(e);if(!t)throw new ReferenceError(`Plugin '${e}' is not registered.`);if(!t.activated)return[];if(!t.deactivate)throw new TypeError(`Plugin '${e}'#deactivate() method missing`);const i=n.findDependents(e,this._plugins,this._services),s=i.map(e=>this._plugins.get(e));for(const t of s)if(!t.deactivate)throw new TypeError(`Plugin ${t.id}#deactivate() method missing (depends on ${e})`);for(const e of s){const t=[...e.requires,...e.optional].map(e=>{const t=this._services.get(e);return t?this._plugins.get(t).service:null});await e.deactivate(this.application,...t),e.service=null,e.activated=!1}return i.pop(),i}async resolveRequiredService(e){const t=this._services.get(e);if(!t)throw new TypeError(`No provider for: ${e.name}.`);const n=this._plugins.get(t);return n.activated||await this.activatePlugin(t),n.service}async resolveOptionalService(e){const t=this._services.get(e);if(!t)return null;const n=this._plugins.get(t);if(!n.activated)try{await this.activatePlugin(t)}catch(e){return console.error(e),null}return n.service}},e.PromiseDelegate=class{constructor(){this.promise=new Promise((e,t)=>{this._resolve=e,this._reject=t})}resolve(e){(0,this._resolve)(e)}reject(e){(0,this._reject)(e)}},e.Token=class{constructor(e,t){this.name=e,this.description=null!=t?t:"",this._tokenStructuralPropertyT=null}}}(t,n(6588))},6073:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,s)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return s(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.KernelShellFutureHandler=t.KernelControlFutureHandler=t.KernelFutureHandler=void 0;const o=n(5899),a=n(785),l=r(n(9798));class c extends a.DisposableDelegate{constructor(e,t,n,i,s){super(e),this._status=0,this._stdin=d.noOp,this._iopub=d.noOp,this._reply=d.noOp,this._done=new o.PromiseDelegate,this._hooks=new d.HookList,this._disposeOnDone=!0,this._msg=t,n||this._setFlag(d.KernelFutureFlag.GotReply),this._disposeOnDone=i,this._kernel=s}get msg(){return this._msg}get done(){return this._done.promise}get onReply(){return this._reply}set onReply(e){this._reply=e}get onIOPub(){return this._iopub}set onIOPub(e){this._iopub=e}get onStdin(){return this._stdin}set onStdin(e){this._stdin=e}registerMessageHook(e){if(this.isDisposed)throw new Error("Kernel future is disposed");this._hooks.add(e)}removeMessageHook(e){this.isDisposed||this._hooks.remove(e)}sendInputReply(e,t){this._kernel.sendInputReply(e,t)}dispose(){this._stdin=d.noOp,this._iopub=d.noOp,this._reply=d.noOp,this._hooks=null,this._testFlag(d.KernelFutureFlag.IsDone)||(this._done.promise.catch(()=>{}),this._done.reject(new Error(`Canceled future for ${this.msg.header.msg_type} message before replies were done`))),super.dispose()}async handleMsg(e){switch(e.channel){case"control":case"shell":e.channel===this.msg.channel&&e.parent_header.msg_id===this.msg.header.msg_id&&await this._handleReply(e);break;case"stdin":await this._handleStdin(e);break;case"iopub":await this._handleIOPub(e)}}async _handleReply(e){const t=this._reply;t&&await t(e),this._replyMsg=e,this._setFlag(d.KernelFutureFlag.GotReply),this._testFlag(d.KernelFutureFlag.GotIdle)&&this._handleDone()}async _handleStdin(e){this._kernel.hasPendingInput=!0;const t=this._stdin;t&&await t(e)}async _handleIOPub(e){const t=await this._hooks.process(e),n=this._iopub;t&&n&&await n(e),l.isStatusMsg(e)&&"idle"===e.content.execution_state&&(this._setFlag(d.KernelFutureFlag.GotIdle),this._testFlag(d.KernelFutureFlag.GotReply)&&this._handleDone())}_handleDone(){this._testFlag(d.KernelFutureFlag.IsDone)||(this._setFlag(d.KernelFutureFlag.IsDone),this._done.resolve(this._replyMsg),this._disposeOnDone&&this.dispose())}_testFlag(e){return 0!==(this._status&e)}_setFlag(e){this._status|=e}}var d;t.KernelFutureHandler=c,t.KernelControlFutureHandler=class extends c{},t.KernelShellFutureHandler=class extends c{},function(e){e.noOp=()=>{};const t="function"==typeof requestAnimationFrame?requestAnimationFrame:setImmediate;let n;e.HookList=class{constructor(){this._hooks=[]}add(e){this.remove(e),this._hooks.push(e)}remove(e){const t=this._hooks.indexOf(e);t>=0&&(this._hooks[t]=null,this._scheduleCompact())}async process(e){await this._processing;const t=new o.PromiseDelegate;let n;this._processing=t.promise;for(let i=this._hooks.length-1;i>=0;i--){const s=this._hooks[i];if(null!==s){try{n=await s(e)}catch(e){n=!0,console.error(e)}if(!1===n)return t.resolve(void 0),!1}}return t.resolve(void 0),!0}_scheduleCompact(){this._compactScheduled||(this._compactScheduled=!0,t(()=>{this._processing=this._processing.then(()=>{this._compactScheduled=!1,this._compact()})}))}_compact(){let e=0;for(let t=0,n=this._hooks.length;t<n;t++){const n=this._hooks[t];null===this._hooks[t]?e++:this._hooks[t-e]=n}this._hooks.length-=e}},function(e){e[e.GotReply=1]="GotReply",e[e.GotIdle=2]="GotIdle",e[e.IsDone=4]="IsDone",e[e.DisposeOnDone=8]="DisposeOnDone"}(n=e.KernelFutureFlag||(e.KernelFutureFlag={}))}(d||(d={}))},6224:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.KernelSpecManager=void 0;const i=n(5899),s=n(8534),r=n(6903),o=n(5412),a=n(321);class l extends o.BaseManager{constructor(e={}){var t,n;super(e),this._isReady=!1,this._connectionFailure=new r.Signal(this),this._specs=null,this._specsChanged=new r.Signal(this),this._kernelSpecAPIClient=null!==(t=e.kernelSpecAPIClient)&&void 0!==t?t:new a.KernelSpecAPIClient({serverSettings:this.serverSettings}),this._ready=Promise.all([this.requestSpecs()]).then(e=>{}).catch(e=>{}).then(()=>{this.isDisposed||(this._isReady=!0)}),this._pollSpecs=new s.Poll({auto:!1,factory:()=>this.requestSpecs(),frequency:{interval:61e3,backoff:!0,max:3e5},name:"@jupyterlab/services:KernelSpecManager#specs",standby:null!==(n=e.standby)&&void 0!==n?n:"when-hidden"}),this.ready.then(()=>{this._pollSpecs.start()})}get isReady(){return this._isReady}get ready(){return this._ready}get specs(){return this._specs}get specsChanged(){return this._specsChanged}get connectionFailure(){return this._connectionFailure}dispose(){this._pollSpecs.dispose(),super.dispose()}async refreshSpecs(){await this._pollSpecs.refresh(),await this._pollSpecs.tick}async requestSpecs(){const e=await this._kernelSpecAPIClient.get();this.isDisposed||i.JSONExt.deepEqual(e,this._specs)||(this._specs=e,this._specsChanged.emit(e))}}t.KernelSpecManager=l},6376:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,s)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),s=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),s(n(5013),t),s(n(3106),t),s(n(4477),t),s(n(7484),t),s(n(2279),t),s(n(7169),t),s(n(7058),t),s(n(121),t),s(n(9659),t),s(n(7881),t),s(n(8378),t)},6379:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var i=n(8510),s=n(4591),r=n(4798),o=function(){return i.create()},a=function(){function e(e){var t=this,n=e.autoGenerateTag;this.cssRaw=function(e){e&&(t._raw+=e||"",t._pendingRawChange=!0,t._styleUpdated())},this.cssRule=function(e){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=s.convertToStyles(r.extend.apply(void 0,n));t._freeStyle.registerRule(e,o),t._styleUpdated()},this.forceRenderStyles=function(){var e=t._getTag();e&&(e.textContent=t.getStyles())},this.fontFace=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];for(var i=t._freeStyle,s=0,r=e;s<r.length;s++){var o=r[s];i.registerRule("@font-face",o)}t._styleUpdated()},this.getStyles=function(){return(t._raw||"")+t._freeStyle.getStyles()},this.keyframes=function(e){var n=s.convertToKeyframes(e),i=t._freeStyle.registerKeyframes(n);return t._styleUpdated(),i},this.reinit=function(){var e=o();t._freeStyle=e,t._lastFreeStyleChangeId=e.changeId,t._raw="",t._pendingRawChange=!1;var n=t._getTag();n&&(n.textContent="")},this.setStylesTarget=function(e){t._tag&&(t._tag.textContent=""),t._tag=e,t.forceRenderStyles()},this.stylesheet=function(e){for(var n={},i=0,s=Object.getOwnPropertyNames(e);i<s.length;i++){var r=s[i],o=e[r];o&&(o.$debugName=r,n[r]=t.style(o))}return n};var i=o();this._autoGenerateTag=n,this._freeStyle=i,this._lastFreeStyleChangeId=i.changeId,this._pending=0,this._pendingRawChange=!1,this._raw="",this._tag=void 0,this.style=this.style.bind(this)}return e.prototype._afterAllSync=function(e){var t=this;this._pending++;var n=this._pending;r.raf(function(){n===t._pending&&e()})},e.prototype._getTag=function(){if(this._tag)return this._tag;if(this._autoGenerateTag){var e="undefined"==typeof window?{textContent:""}:document.createElement("style");return"undefined"!=typeof document&&document.head.appendChild(e),this._tag=e,e}},e.prototype._styleUpdated=function(){var e=this,t=this._freeStyle.changeId,n=this._lastFreeStyleChangeId;(this._pendingRawChange||t!==n)&&(this._lastFreeStyleChangeId=t,this._pendingRawChange=!1,this._afterAllSync(function(){return e.forceRenderStyles()}))},e.prototype.style=function(){var e=this._freeStyle.registerStyle(s.convertToStyles(r.extend.apply(void 0,arguments)));return this._styleUpdated(),e},e}();t.TypeStyle=a},6540:(e,t,n)=>{e.exports=n(5287)},6588:(e,t,n)=>{var i,s,r;function*o(...e){for(const t of e)yield*t}function*a(){}function*l(e,t=0){for(const n of e)yield[t++,n]}function*c(e,t){let n=0;for(const i of e)t(i,n++)&&(yield i)}function d(e,t){let n=0;for(const i of e)if(t(i,n++))return i}function u(e,t){let n=0;for(const i of e)if(t(i,n++))return n-1;return-1}function h(e,t){let n;for(const i of e)void 0!==n?t(i,n)<0&&(n=i):n=i;return n}function p(e,t){let n;for(const i of e)void 0!==n?t(i,n)>0&&(n=i):n=i;return n}function m(e,t){let n,i,s=!0;for(const r of e)s?(n=r,i=r,s=!1):t(r,n)<0?n=r:t(r,i)>0&&(i=r);return s?void 0:[n,i]}function f(e){return Array.from(e)}function g(e){const t={};for(const[n,i]of e)t[n]=i;return t}function v(e,t){let n=0;for(const i of e)if(!1===t(i,n++))return}function _(e,t){let n=0;for(const i of e)if(!1===t(i,n++))return!1;return!0}function b(e,t){let n=0;for(const i of e)if(t(i,n++))return!0;return!1}function*y(e,t){let n=0;for(const i of e)yield t(i,n++)}function*w(e,t,n){void 0===t?(t=e,e=0,n=1):void 0===n&&(n=1);const i=s.rangeLength(e,t,n);for(let t=0;t<i;t++)yield e+n*t}function x(e,t,n){const i=e[Symbol.iterator]();let s=0,r=i.next();if(r.done&&void 0===n)throw new TypeError("Reduce of empty iterable with no initial value.");if(r.done)return n;let o,a,l=i.next();if(l.done&&void 0===n)return r.value;if(l.done)return t(n,r.value,s++);for(o=t(void 0===n?r.value:t(n,r.value,s++),l.value,s++);!(a=i.next()).done;)o=t(o,a.value,s++);return o}function*S(e,t){for(;0<t--;)yield e}function*C(e){yield e}function*k(e){if("function"==typeof e.retro)yield*e.retro();else for(let t=e.length-1;t>-1;t--)yield e[t]}function E(e){let t=[],n=new Set,i=new Map;for(const t of e)s(t);for(const[e]of i)r(e);return t;function s(e){let[t,n]=e,s=i.get(n);s?s.push(t):i.set(n,[t])}function r(e){if(n.has(e))return;n.add(e);let s=i.get(e);if(s)for(const e of s)r(e);t.push(e)}}function*M(e,t){let n=0;for(const i of e)0===n++%t&&(yield i)}function*P(e,t){if(t<1)return;const n=e[Symbol.iterator]();let i;for(;0<t--&&!(i=n.next()).done;)yield i.value}function*I(...e){const t=e.map(e=>e[Symbol.iterator]());let n=t.map(e=>e.next());for(;_(n,e=>!e.done);n=t.map(e=>e.next()))yield n.map(e=>e.value)}n.r(t),n.d(t,{ArrayExt:()=>i,StringExt:()=>r,chain:()=>o,each:()=>v,empty:()=>a,enumerate:()=>l,every:()=>_,filter:()=>c,find:()=>d,findIndex:()=>u,map:()=>y,max:()=>p,min:()=>h,minmax:()=>m,once:()=>C,range:()=>w,reduce:()=>x,repeat:()=>S,retro:()=>k,some:()=>b,stride:()=>M,take:()=>P,toArray:()=>f,toObject:()=>g,topologicSort:()=>E,zip:()=>I}),function(e){function t(e,t,n=0,i=-1){let s,r=e.length;if(0===r)return-1;n=n<0?Math.max(0,n+r):Math.min(n,r-1),s=(i=i<0?Math.max(0,i+r):Math.min(i,r-1))<n?i+1+(r-n):i-n+1;for(let i=0;i<s;++i){let s=(n+i)%r;if(e[s]===t)return s}return-1}function n(e,t,n=-1,i=0){let s,r=e.length;if(0===r)return-1;s=(n=n<0?Math.max(0,n+r):Math.min(n,r-1))<(i=i<0?Math.max(0,i+r):Math.min(i,r-1))?n+1+(r-i):n-i+1;for(let i=0;i<s;++i){let s=(n-i+r)%r;if(e[s]===t)return s}return-1}function i(e,t,n=0,i=-1){let s,r=e.length;if(0===r)return-1;n=n<0?Math.max(0,n+r):Math.min(n,r-1),s=(i=i<0?Math.max(0,i+r):Math.min(i,r-1))<n?i+1+(r-n):i-n+1;for(let i=0;i<s;++i){let s=(n+i)%r;if(t(e[s],s))return s}return-1}function s(e,t,n=-1,i=0){let s,r=e.length;if(0===r)return-1;s=(n=n<0?Math.max(0,n+r):Math.min(n,r-1))<(i=i<0?Math.max(0,i+r):Math.min(i,r-1))?n+1+(r-i):n-i+1;for(let i=0;i<s;++i){let s=(n-i+r)%r;if(t(e[s],s))return s}return-1}function r(e,t=0,n=-1){let i=e.length;if(!(i<=1))for(t=t<0?Math.max(0,t+i):Math.min(t,i-1),n=n<0?Math.max(0,n+i):Math.min(n,i-1);t<n;){let i=e[t],s=e[n];e[t++]=s,e[n--]=i}}function o(e,t){let n=e.length;if(t<0&&(t+=n),t<0||t>=n)return;let i=e[t];for(let i=t+1;i<n;++i)e[i-1]=e[i];return e.length=n-1,i}e.firstIndexOf=t,e.lastIndexOf=n,e.findFirstIndex=i,e.findLastIndex=s,e.findFirstValue=function(e,t,n=0,s=-1){let r=i(e,t,n,s);return-1!==r?e[r]:void 0},e.findLastValue=function(e,t,n=-1,i=0){let r=s(e,t,n,i);return-1!==r?e[r]:void 0},e.lowerBound=function(e,t,n,i=0,s=-1){let r=e.length;if(0===r)return 0;let o=i=i<0?Math.max(0,i+r):Math.min(i,r-1),a=(s=s<0?Math.max(0,s+r):Math.min(s,r-1))-i+1;for(;a>0;){let i=a>>1,s=o+i;n(e[s],t)<0?(o=s+1,a-=i+1):a=i}return o},e.upperBound=function(e,t,n,i=0,s=-1){let r=e.length;if(0===r)return 0;let o=i=i<0?Math.max(0,i+r):Math.min(i,r-1),a=(s=s<0?Math.max(0,s+r):Math.min(s,r-1))-i+1;for(;a>0;){let i=a>>1,s=o+i;n(e[s],t)>0?a=i:(o=s+1,a-=i+1)}return o},e.shallowEqual=function(e,t,n){if(e===t)return!0;if(e.length!==t.length)return!1;for(let i=0,s=e.length;i<s;++i)if(n?!n(e[i],t[i]):e[i]!==t[i])return!1;return!0},e.slice=function(e,t={}){let{start:n,stop:i,step:s}=t;if(void 0===s&&(s=1),0===s)throw new Error("Slice `step` cannot be zero.");let r,o=e.length;void 0===n?n=s<0?o-1:0:n<0?n=Math.max(n+o,s<0?-1:0):n>=o&&(n=s<0?o-1:o),void 0===i?i=s<0?-1:o:i<0?i=Math.max(i+o,s<0?-1:0):i>=o&&(i=s<0?o-1:o),r=s<0&&i>=n||s>0&&n>=i?0:s<0?Math.floor((i-n+1)/s+1):Math.floor((i-n-1)/s+1);let a=[];for(let t=0;t<r;++t)a[t]=e[n+t*s];return a},e.move=function(e,t,n){let i=e.length;if(i<=1)return;if((t=t<0?Math.max(0,t+i):Math.min(t,i-1))===(n=n<0?Math.max(0,n+i):Math.min(n,i-1)))return;let s=e[t],r=t<n?1:-1;for(let i=t;i!==n;i+=r)e[i]=e[i+r];e[n]=s},e.reverse=r,e.rotate=function(e,t,n=0,i=-1){let s=e.length;if(s<=1)return;if((n=n<0?Math.max(0,n+s):Math.min(n,s-1))>=(i=i<0?Math.max(0,i+s):Math.min(i,s-1)))return;let o=i-n+1;if(t>0?t%=o:t<0&&(t=(t%o+o)%o),0===t)return;let a=n+t;r(e,n,a-1),r(e,a,i),r(e,n,i)},e.fill=function(e,t,n=0,i=-1){let s,r=e.length;if(0!==r){n=n<0?Math.max(0,n+r):Math.min(n,r-1),s=(i=i<0?Math.max(0,i+r):Math.min(i,r-1))<n?i+1+(r-n):i-n+1;for(let i=0;i<s;++i)e[(n+i)%r]=t}},e.insert=function(e,t,n){let i=e.length;t=t<0?Math.max(0,t+i):Math.min(t,i);for(let n=i;n>t;--n)e[n]=e[n-1];e[t]=n},e.removeAt=o,e.removeFirstOf=function(e,n,i=0,s=-1){let r=t(e,n,i,s);return-1!==r&&o(e,r),r},e.removeLastOf=function(e,t,i=-1,s=0){let r=n(e,t,i,s);return-1!==r&&o(e,r),r},e.removeAllOf=function(e,t,n=0,i=-1){let s=e.length;if(0===s)return 0;n=n<0?Math.max(0,n+s):Math.min(n,s-1),i=i<0?Math.max(0,i+s):Math.min(i,s-1);let r=0;for(let o=0;o<s;++o)n<=i&&o>=n&&o<=i&&e[o]===t||i<n&&(o<=i||o>=n)&&e[o]===t?r++:r>0&&(e[o-r]=e[o]);return r>0&&(e.length=s-r),r},e.removeFirstWhere=function(e,t,n=0,s=-1){let r,a=i(e,t,n,s);return-1!==a&&(r=o(e,a)),{index:a,value:r}},e.removeLastWhere=function(e,t,n=-1,i=0){let r,a=s(e,t,n,i);return-1!==a&&(r=o(e,a)),{index:a,value:r}},e.removeAllWhere=function(e,t,n=0,i=-1){let s=e.length;if(0===s)return 0;n=n<0?Math.max(0,n+s):Math.min(n,s-1),i=i<0?Math.max(0,i+s):Math.min(i,s-1);let r=0;for(let o=0;o<s;++o)n<=i&&o>=n&&o<=i&&t(e[o],o)||i<n&&(o<=i||o>=n)&&t(e[o],o)?r++:r>0&&(e[o-r]=e[o]);return r>0&&(e.length=s-r),r}}(i||(i={})),function(e){e.rangeLength=function(e,t,n){return 0===n?1/0:e>t&&n>0||e<t&&n<0?0:Math.ceil((t-e)/n)}}(s||(s={})),function(e){function t(e,t,n=0){let i=new Array(t.length);for(let s=0,r=n,o=t.length;s<o;++s,++r){if(r=e.indexOf(t[s],r),-1===r)return null;i[s]=r}return i}e.findIndices=t,e.matchSumOfSquares=function(e,n,i=0){let s=t(e,n,i);if(!s)return null;let r=0;for(let e=0,t=s.length;e<t;++e){let t=s[e]-i;r+=t*t}return{score:r,indices:s}},e.matchSumOfDeltas=function(e,n,i=0){let s=t(e,n,i);if(!s)return null;let r=0,o=i-1;for(let e=0,t=s.length;e<t;++e){let t=s[e];r+=t-o-1,o=t}return{score:r,indices:s}},e.highlight=function(e,t,n){let i=[],s=0,r=0,o=t.length;for(;s<o;){let a=t[s],l=t[s];for(;++s<o&&t[s]===l+1;)l++;r<a&&i.push(e.slice(r,a)),a<l+1&&i.push(n(e.slice(a,l+1))),r=l+1}return r<e.length&&i.push(e.slice(r)),i},e.cmp=function(e,t){return e<t?-1:e>t?1:0}}(r||(r={}))},6807:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,s)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return s(t,e),t},o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.KernelSpecAPI=t.KernelSpec=void 0;const a=r(n(1229));t.KernelSpec=a;const l=r(n(321));t.KernelSpecAPI=l,o(n(6224),t)},6810:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalManager=void 0;const i=n(8534),s=n(6903),r=n(608),o=n(5412),a=n(4903),l=n(2100);class c extends o.BaseManager{constructor(e={}){var t,n;if(super(e),this._isReady=!1,this._names=[],this._terminalConnections=new Set,this._runningChanged=new s.Signal(this),this._connectionFailure=new s.Signal(this),this._terminalAPIClient=null!==(t=e.terminalAPIClient)&&void 0!==t?t:new a.TerminalAPIClient({serverSettings:this.serverSettings}),!this.isAvailable())return this._ready=Promise.reject("Terminals unavailable"),void this._ready.catch(e=>{});const r=this._pollModels=new i.Poll({auto:!1,factory:()=>this.requestRunning(),frequency:{interval:1e4,backoff:!0,max:3e5},name:"@jupyterlab/services:TerminalManager#models",standby:null!==(n=e.standby)&&void 0!==n?n:"when-hidden"});this._ready=(async()=>{await r.start(),await r.tick,this._isReady=!0})()}get isReady(){return this._isReady}get ready(){return this._ready}get runningChanged(){return this._runningChanged}get connectionFailure(){return this._connectionFailure}dispose(){var e;this.isDisposed||(this._names.length=0,this._terminalConnections.forEach(e=>e.dispose()),null===(e=this._pollModels)||void 0===e||e.dispose(),super.dispose())}isAvailable(){return this._terminalAPIClient.isAvailable}connectTo(e){const t=new l.TerminalConnection({...e,serverSettings:this.serverSettings,terminalAPIClient:this._terminalAPIClient});return this._onStarted(t),this._names.includes(e.model.name)||this.refreshRunning().catch(()=>{}),t}running(){return this._models[Symbol.iterator]()}async refreshRunning(){this._pollModels&&(await this._pollModels.refresh(),await this._pollModels.tick)}async startNew(e={}){const{name:t,cwd:n}=e,i=await this._terminalAPIClient.startNew({name:t,cwd:n});return await this.refreshRunning(),this.connectTo({model:i})}async shutdown(e){await this._terminalAPIClient.shutdown(e),await this.refreshRunning()}async shutdownAll(){await this.refreshRunning(),await Promise.all(this._names.map(e=>this._terminalAPIClient.shutdown(e))),await this.refreshRunning()}async requestRunning(){var e,t;let n;try{n=await this._terminalAPIClient.listRunning()}catch(n){throw(n instanceof r.ServerConnection.NetworkError||503===(null===(e=n.response)||void 0===e?void 0:e.status)||424===(null===(t=n.response)||void 0===t?void 0:t.status))&&this._connectionFailure.emit(n),n}if(this.isDisposed)return;const i=n.map(({name:e})=>e).sort();i!==this._names&&(this._names=i,this._terminalConnections.forEach(e=>{i.includes(e.name)||e.dispose()}),this._runningChanged.emit(this._models))}_onStarted(e){this._terminalConnections.add(e),e.disposed.connect(this._onDisposed,this)}_onDisposed(e){this._terminalConnections.delete(e),this.refreshRunning().catch(()=>{})}get _models(){return this._names.map(e=>({name:e}))}}t.TerminalManager=c,function(e){e.NoopManager=class extends e{constructor(){super(...arguments),this._readyPromise=new Promise(()=>{})}get isActive(){return!1}get parentReady(){return super.ready}get ready(){return this.parentReady.then(()=>this._readyPromise)}async startNew(e){return Promise.reject(new Error("Not implemented in no-op Terminal Manager"))}connectTo(e){throw Error("Not implemented in no-op Terminal Manager")}async shutdown(e){return Promise.reject(new Error("Not implemented in no-op Terminal Manager"))}async requestRunning(){return Promise.resolve()}}}(c||(t.TerminalManager=c={}))},6830:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SessionConnection=void 0;const i=n(6903),s=n(608),r=n(5899),o=n(637);t.SessionConnection=class{constructor(e){var t,n,a,l,c;this._id="",this._path="",this._name="",this._type="",this._kernel=null,this._isDisposed=!1,this._disposed=new i.Signal(this),this._kernelChanged=new i.Signal(this),this._statusChanged=new i.Signal(this),this._connectionStatusChanged=new i.Signal(this),this._pendingInput=new i.Signal(this),this._iopubMessage=new i.Signal(this),this._unhandledMessage=new i.Signal(this),this._anyMessage=new i.Signal(this),this._propertyChanged=new i.Signal(this),this._id=e.model.id,this._name=e.model.name,this._path=e.model.path,this._type=e.model.type,this._username=null!==(t=e.username)&&void 0!==t?t:"",this._clientId=null!==(n=e.clientId)&&void 0!==n?n:r.UUID.uuid4(),this._connectToKernel=e.connectToKernel,this._kernelConnectionOptions=null!==(a=e.kernelConnectionOptions)&&void 0!==a?a:{},this.serverSettings=null!==(l=e.serverSettings)&&void 0!==l?l:s.ServerConnection.makeSettings(),this._sessionAPIClient=null!==(c=e.sessionAPIClient)&&void 0!==c?c:new o.SessionAPIClient({serverSettings:this.serverSettings}),this.setupKernel(e.model.kernel)}get disposed(){return this._disposed}get kernelChanged(){return this._kernelChanged}get statusChanged(){return this._statusChanged}get connectionStatusChanged(){return this._connectionStatusChanged}get pendingInput(){return this._pendingInput}get iopubMessage(){return this._iopubMessage}get unhandledMessage(){return this._unhandledMessage}get anyMessage(){return this._anyMessage}get propertyChanged(){return this._propertyChanged}get id(){return this._id}get kernel(){return this._kernel}get path(){return this._path}get type(){return this._type}get name(){return this._name}get model(){return{id:this.id,kernel:this.kernel&&{id:this.kernel.id,name:this.kernel.name},path:this._path,type:this._type,name:this._name}}get isDisposed(){return this._isDisposed}update(e){const t=this.model;if(this._path=e.path,this._name=e.name,this._type=e.type,null===this._kernel&&null!==e.kernel||null!==this._kernel&&null===e.kernel||null!==this._kernel&&null!==e.kernel&&this._kernel.id!==e.kernel.id){null!==this._kernel&&this._kernel.dispose();const t=this._kernel||null;this.setupKernel(e.kernel);const n=this._kernel||null;this._kernelChanged.emit({name:"kernel",oldValue:t,newValue:n})}this._handleModelChange(t)}dispose(){if(!this.isDisposed){if(this._isDisposed=!0,this._disposed.emit(),this._kernel){this._kernel.dispose();const e=this._kernel;this._kernel=null;const t=this._kernel;this._kernelChanged.emit({name:"kernel",oldValue:e,newValue:t})}i.Signal.clearData(this)}}async setPath(e){if(this.isDisposed)throw new Error("Session is disposed");await this._patch({path:e})}async setName(e){if(this.isDisposed)throw new Error("Session is disposed");await this._patch({name:e})}async setType(e){if(this.isDisposed)throw new Error("Session is disposed");await this._patch({type:e})}async changeKernel(e){if(this.isDisposed)throw new Error("Session is disposed");return await this._patch({kernel:e}),this.kernel}async shutdown(){if(this.isDisposed)throw new Error("Session is disposed");await this._sessionAPIClient.shutdown(this.id),this.dispose()}setupKernel(e){if(null===e)return void(this._kernel=null);const t=this._connectToKernel({...this._kernelConnectionOptions,model:e,username:this._username,clientId:this._clientId,serverSettings:this.serverSettings});this._kernel=t,t.statusChanged.connect(this.onKernelStatus,this),t.connectionStatusChanged.connect(this.onKernelConnectionStatus,this),t.pendingInput.connect(this.onPendingInput,this),t.unhandledMessage.connect(this.onUnhandledMessage,this),t.iopubMessage.connect(this.onIOPubMessage,this),t.anyMessage.connect(this.onAnyMessage,this)}onKernelStatus(e,t){this._statusChanged.emit(t)}onKernelConnectionStatus(e,t){this._connectionStatusChanged.emit(t)}onPendingInput(e,t){this._pendingInput.emit(t)}onIOPubMessage(e,t){this._iopubMessage.emit(t)}onUnhandledMessage(e,t){this._unhandledMessage.emit(t)}onAnyMessage(e,t){this._anyMessage.emit(t)}async _patch(e){const t=await this._sessionAPIClient.update({...e,id:this._id});return this.update(t),t}_handleModelChange(e){e.name!==this._name&&this._propertyChanged.emit("name"),e.type!==this._type&&this._propertyChanged.emit("type"),e.path!==this._path&&this._propertyChanged.emit("path")}}},6903:(e,t,n)=>{n.r(t),n.d(t,{Signal:()=>o,Stream:()=>a});var i,s=n(6588),r=n(5899);class o{constructor(e){this.sender=e}connect(e,t){return i.connect(this,e,t)}disconnect(e,t){return i.disconnect(this,e,t)}emit(e){i.emit(this,e)}}!function(e){e.disconnectBetween=function(e,t){i.disconnectBetween(e,t)},e.disconnectSender=function(e){i.disconnectSender(e)},e.disconnectReceiver=function(e){i.disconnectReceiver(e)},e.disconnectAll=function(e){i.disconnectAll(e)},e.clearData=function(e){i.disconnectAll(e)},e.getExceptionHandler=function(){return i.exceptionHandler},e.setExceptionHandler=function(e){let t=i.exceptionHandler;return i.exceptionHandler=e,t}}(o||(o={}));class a extends o{constructor(){super(...arguments),this._pending=new r.PromiseDelegate}async*[Symbol.asyncIterator](){let e=this._pending;for(;;)try{const{args:t,next:n}=await e.promise;e=n,yield t}catch(e){return}}emit(e){const t=this._pending,n=this._pending=new r.PromiseDelegate;t.resolve({args:e,next:n}),super.emit(e)}stop(){this._pending.promise.catch(()=>{}),this._pending.reject("stop"),this._pending=new r.PromiseDelegate}}!function(e){function t(e){let t=i.get(e);if(t&&0!==t.length){for(const e of t){if(!e.signal)continue;let t=e.thisArg||e.slot;e.signal=null,d(r.get(t))}d(t)}}function n(e){let t=r.get(e);if(t&&0!==t.length){for(const e of t){if(!e.signal)continue;let t=e.signal.sender;e.signal=null,d(i.get(t))}d(t)}}e.exceptionHandler=e=>{console.error(e)},e.connect=function(e,t,n){n=n||void 0;let s=i.get(e.sender);if(s||(s=[],i.set(e.sender,s)),l(s,e,t,n))return!1;let o=n||t,a=r.get(o);a||(a=[],r.set(o,a));let c={signal:e,slot:t,thisArg:n};return s.push(c),a.push(c),!0},e.disconnect=function(e,t,n){n=n||void 0;let s=i.get(e.sender);if(!s||0===s.length)return!1;let o=l(s,e,t,n);if(!o)return!1;let a=n||t,c=r.get(a);return o.signal=null,d(s),d(c),!0},e.disconnectBetween=function(e,t){let n=i.get(e);if(!n||0===n.length)return;let s=r.get(t);if(s&&0!==s.length){for(const t of s)t.signal&&t.signal.sender===e&&(t.signal=null);d(n),d(s)}},e.disconnectSender=t,e.disconnectReceiver=n,e.disconnectAll=function(e){t(e),n(e)},e.emit=function(e,t){let n=i.get(e.sender);if(n&&0!==n.length)for(let i=0,s=n.length;i<s;++i){let s=n[i];s.signal===e&&c(s,t)}};const i=new WeakMap,r=new WeakMap,o=new Set,a="function"==typeof requestAnimationFrame?requestAnimationFrame:setImmediate;function l(e,t,n,i){return(0,s.find)(e,e=>e.signal===t&&e.slot===n&&e.thisArg===i)}function c(t,n){let{signal:i,slot:s,thisArg:r}=t;try{s.call(r,i.sender,n)}catch(t){e.exceptionHandler(t)}}function d(e){0===o.size&&a(u),o.add(e)}function u(){o.forEach(h),o.clear()}function h(e){s.ArrayExt.removeAllWhere(e,p)}function p(e){return null===e.signal}}(i||(i={}))},6923:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,s)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return s(t,e),t},o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.SessionAPI=t.Session=void 0;const a=r(n(2827));t.Session=a;const l=r(n(637));t.SessionAPI=l,o(n(7740),t)},7058:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.signalToPromise=function(e,t){const n=new i.PromiseDelegate;function s(){e.disconnect(r)}function r(e,t){s(),n.resolve([e,t])}return e.connect(r),(null!=t?t:0)>0&&setTimeout(()=>{s(),n.reject(`Signal not emitted within ${t} ms.`)},t),n.promise};const i=n(5899)},7169:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PathExt=void 0;const i=n(7975);var s;!function(e){function t(e){return 0===e.indexOf("/")&&(e=e.slice(1)),e}e.join=function(...e){const n=i.posix.join(...e);return"."===n?"":t(n)},e.joinWithLeadingSlash=function(...e){const t=i.posix.join(...e);return"."===t?"":t},e.basename=function(e,t){return i.posix.basename(e,t)},e.dirname=function(e){const n=t(i.posix.dirname(e));return"."===n?"":n},e.extname=function(e){return i.posix.extname(e)},e.normalize=function(e){return""===e?"":t(i.posix.normalize(e))},e.resolve=function(...e){return t(i.posix.resolve(...e))},e.relative=function(e,n){return t(i.posix.relative(e,n))},e.normalizeExtension=function(e){return e.length>0&&0!==e.indexOf(".")&&(e=`.${e}`),e},e.removeSlash=t}(s||(t.PathExt=s={}))},7275:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.KernelManager=void 0;const i=n(8534),s=n(6903),r=n(608),o=n(5412),a=n(8662),l=n(5089),c=n(321);class d extends o.BaseManager{constructor(e={}){var t,n,o;super(e),this._commsOverSubshells=r.CommsOverSubshells.PerCommTarget,this._isReady=!1,this._kernelConnections=new Set,this._models=new Map,this._runningChanged=new s.Signal(this),this._connectionFailure=new s.Signal(this),this._kernelAPIClient=null!==(t=e.kernelAPIClient)&&void 0!==t?t:new a.KernelAPIClient({serverSettings:this.serverSettings}),this._kernelSpecAPIClient=null!==(n=e.kernelSpecAPIClient)&&void 0!==n?n:new c.KernelSpecAPIClient({serverSettings:this.serverSettings}),this._pollModels=new i.Poll({auto:!1,factory:()=>this.requestRunning(),frequency:{interval:1e4,backoff:!0,max:3e5},name:"@jupyterlab/services:KernelManager#models",standby:null!==(o=e.standby)&&void 0!==o?o:"when-hidden"}),this._ready=(async()=>{await this._pollModels.start(),await this._pollModels.tick,this._isReady=!0})()}get isReady(){return this._isReady}get ready(){return this._ready}get runningChanged(){return this._runningChanged}get connectionFailure(){return this._connectionFailure}dispose(){this.isDisposed||(this._models.clear(),this._kernelConnections.forEach(e=>e.dispose()),this._pollModels.dispose(),super.dispose())}connectTo(e){var t;const{id:n}=e.model;let i=null===(t=e.handleComms)||void 0===t||t;if(void 0===e.handleComms)for(const e of this._kernelConnections)if(e.id===n&&e.handleComms){i=!1;break}e.commsOverSubshells=this._commsOverSubshells;const s=new l.KernelConnection({handleComms:i,...e,serverSettings:this.serverSettings,kernelAPIClient:this._kernelAPIClient,kernelSpecAPIClient:this._kernelSpecAPIClient});return this._onStarted(s),this._models.has(n)||this.refreshRunning().catch(()=>{}),s}running(){return this._models.values()}get runningCount(){return this._models.size}get commsOverSubshells(){return this._commsOverSubshells}set commsOverSubshells(e){this._commsOverSubshells=e;for(const t of this._kernelConnections)t.commsOverSubshells=e}async refreshRunning(){await this._pollModels.refresh(),await this._pollModels.tick}async startNew(e={},t={}){const n=await this._kernelAPIClient.startNew(e);return this.connectTo({...t,model:n})}async shutdown(e){await this._kernelAPIClient.shutdown(e),await this.refreshRunning()}async shutdownAll(){await this.refreshRunning(),await Promise.all([...this._models.keys()].map(e=>this._kernelAPIClient.shutdown(e))),await this.refreshRunning()}async findById(e){return this._models.has(e)||await this.refreshRunning(),this._models.get(e)}async requestRunning(){var e,t;let n;try{n=await this._kernelAPIClient.listRunning()}catch(n){throw(n instanceof r.ServerConnection.NetworkError||503===(null===(e=n.response)||void 0===e?void 0:e.status)||424===(null===(t=n.response)||void 0===t?void 0:t.status))&&this._connectionFailure.emit(n),n}this.isDisposed||this._models.size===n.length&&n.every(e=>{const t=this._models.get(e.id);return!!t&&t.connections===e.connections&&t.execution_state===e.execution_state&&t.last_activity===e.last_activity&&t.name===e.name&&t.reason===e.reason&&t.traceback===e.traceback})||(this._models=new Map(n.map(e=>[e.id,e])),this._kernelConnections.forEach(e=>{this._models.has(e.id)||e.handleShutdown()}),this._runningChanged.emit(n))}_onStarted(e){this._kernelConnections.add(e),e.statusChanged.connect(this._onStatusChanged,this),e.disposed.connect(this._onDisposed,this)}_onDisposed(e){this._kernelConnections.delete(e),this.refreshRunning().catch(()=>{})}_onStatusChanged(e,t){"dead"===t&&this.refreshRunning().catch(()=>{})}}t.KernelManager=d,function(e){e.NoopManager=class extends e{constructor(){super(...arguments),this._readyPromise=new Promise(()=>{})}get isActive(){return!1}get parentReady(){return super.ready}async startNew(e={},t={}){return Promise.reject(new Error("Not implemented in no-op Kernel Manager"))}connectTo(e){throw new Error("Not implemented in no-op Kernel Manager")}async shutdown(e){return Promise.reject(new Error("Not implemented in no-op Kernel Manager"))}get ready(){return this.parentReady.then(()=>this._readyPromise)}async requestRunning(){return Promise.resolve()}}}(d||(t.KernelManager=d={}))},7375:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,s)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return s(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.RestContentProvider=t.ContentProviderRegistry=t.Drive=t.ContentsManager=t.Contents=void 0;const o=n(6376),a=n(785),l=n(6903),c=n(608),d=r(n(7821));var u,h;!function(e){e.validateContentsModel=function(e){d.validateContentsModel(e)},e.validateCheckpointModel=function(e){d.validateCheckpointModel(e)}}(u||(t.Contents=u={})),t.ContentsManager=class{constructor(e={}){var t,n;this._isDisposed=!1,this._additionalDrives=new Map,this._fileChanged=new l.Signal(this);const i=this.serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:c.ServerConnection.makeSettings();this._defaultDrive=null!==(n=e.defaultDrive)&&void 0!==n?n:new p({serverSettings:i}),this._defaultDrive.fileChanged.connect(this._onFileChanged,this)}get defaultDrive(){return this._defaultDrive}get fileChanged(){return this._fileChanged}get isDisposed(){return this._isDisposed}dispose(){this.isDisposed||(this._isDisposed=!0,l.Signal.clearData(this))}addDrive(e){this._additionalDrives.set(e.name,e),e.fileChanged.connect(this._onFileChanged,this)}getSharedModelFactory(e,t){var n,i;const[s]=this._driveForPath(e),r=null===(n=s.contentProviderRegistry)||void 0===n?void 0:n.getProvider(null==t?void 0:t.contentProviderId);return(null==r?void 0:r.sharedModelFactory)?r.sharedModelFactory:null!==(i=s.sharedModelFactory)&&void 0!==i?i:null}localPath(e){const t=e.split("/"),n=t[0].split(":");return 1!==n.length&&this._additionalDrives.has(n[0])?o.PathExt.join(n.slice(1).join(":"),...t.slice(1)):o.PathExt.removeSlash(e)}normalize(e){const t=e.split(":");return 1===t.length?o.PathExt.normalize(e):`${t[0]}:${o.PathExt.normalize(t.slice(1).join(":"))}`}resolvePath(e,t){const n=this.driveName(e),i=this.localPath(e),s=o.PathExt.resolve("/",i,t);return n?`${n}:${s}`:s}driveName(e){const t=e.split("/")[0].split(":");return 1===t.length?"":this._additionalDrives.has(t[0])?t[0]:""}get(e,t){const[n,i]=this._driveForPath(e);return n.get(i,t).then(e=>{const t=[];if("directory"===e.type&&e.content){for(const i of e.content)t.push({...i,path:this._toGlobalPath(n,i.path)});return{...e,path:this._toGlobalPath(n,i),content:t,serverPath:e.path}}return{...e,path:this._toGlobalPath(n,i),serverPath:e.path}})}getDownloadUrl(e){const[t,n]=this._driveForPath(e);return t.getDownloadUrl(n)}newUntitled(e={}){if(e.path){const t=this.normalize(e.path),[n,i]=this._driveForPath(t);return n.newUntitled({...e,path:i}).then(e=>({...e,path:o.PathExt.join(t,e.name),serverPath:e.path}))}return this._defaultDrive.newUntitled(e)}delete(e){const[t,n]=this._driveForPath(e);return t.delete(n)}rename(e,t){const[n,i]=this._driveForPath(e),[s,r]=this._driveForPath(t);if(n!==s)throw Error("ContentsManager: renaming files must occur within a Drive");return n.rename(i,r).then(e=>({...e,path:this._toGlobalPath(n,r),serverPath:e.path}))}save(e,t={}){const n=this.normalize(e),[i,s]=this._driveForPath(e);return i.save(s,{...t,path:s}).then(e=>({...e,path:n,serverPath:e.path}))}copy(e,t){const[n,i]=this._driveForPath(e),[s,r]=this._driveForPath(t);if(n===s)return n.copy(i,r).then(e=>({...e,path:this._toGlobalPath(n,e.path),serverPath:e.path}));throw Error("Copying files between drives is not currently implemented")}createCheckpoint(e){const[t,n]=this._driveForPath(e);return t.createCheckpoint(n)}listCheckpoints(e){const[t,n]=this._driveForPath(e);return t.listCheckpoints(n)}restoreCheckpoint(e,t){const[n,i]=this._driveForPath(e);return n.restoreCheckpoint(i,t)}deleteCheckpoint(e,t){const[n,i]=this._driveForPath(e);return n.deleteCheckpoint(i,t)}_toGlobalPath(e,t){return e===this._defaultDrive?o.PathExt.removeSlash(t):`${e.name}:${o.PathExt.removeSlash(t)}`}_driveForPath(e){const t=this.driveName(e),n=this.localPath(e);return t?[this._additionalDrives.get(t),n]:[this._defaultDrive,n]}_onFileChanged(e,t){var n,i;if(e===this._defaultDrive)this._fileChanged.emit(t);else{let s=null,r=null;(null===(n=t.newValue)||void 0===n?void 0:n.path)&&(s={...t.newValue,path:this._toGlobalPath(e,t.newValue.path)}),(null===(i=t.oldValue)||void 0===i?void 0:i.path)&&(r={...t.oldValue,path:this._toGlobalPath(e,t.oldValue.path)}),this._fileChanged.emit({type:t.type,newValue:s,oldValue:r})}}};class p{constructor(e={}){var t,n,i;this._isDisposed=!1,this._fileChanged=new l.Signal(this),this.name=null!==(t=e.name)&&void 0!==t?t:"Default",this._apiEndpoint=null!==(n=e.apiEndpoint)&&void 0!==n?n:"api/contents",this.serverSettings=null!==(i=e.serverSettings)&&void 0!==i?i:c.ServerConnection.makeSettings(),this._restContentProvider=new f({...e,apiEndpoint:this._apiEndpoint,serverSettings:this.serverSettings}),e.defaultContentProvider?this.contentProviderRegistry=new m({defaultProvider:e.defaultContentProvider}):this.contentProviderRegistry=new m,this.contentProviderRegistry.fileChanged.connect((e,t)=>{this._fileChanged.emit(t)})}get fileChanged(){return this._fileChanged}get isDisposed(){return this._isDisposed}dispose(){this.isDisposed||(this._isDisposed=!0,l.Signal.clearData(this))}async get(e,t){const n=this.contentProviderRegistry.getProvider(null==t?void 0:t.contentProviderId);return n?n.get(e,t):await this._restContentProvider.get(e,t)}getDownloadUrl(e){const t=this.serverSettings.baseUrl;let n=o.URLExt.join(t,"files",o.URLExt.encodeParts(e)),i="";try{i=document.cookie}catch(e){}const s=i.match("\\b_xsrf=([^;]*)\\b");if(s){const e=new URL(n);e.searchParams.append("_xsrf",s[1]),n=e.toString()}return Promise.resolve(n)}async newUntitled(e={}){var t;let n="{}";e&&(e.ext&&(e.ext=h.normalizeExtension(e.ext)),n=JSON.stringify(e));const i=this.serverSettings,s=this._getUrl(null!==(t=e.path)&&void 0!==t?t:""),r={method:"POST",body:n},o=await c.ServerConnection.makeRequest(s,r,i);if(201!==o.status)throw await c.ServerConnection.ResponseError.create(o);const a=await o.json();return d.validateContentsModel(a),this._fileChanged.emit({type:"new",oldValue:null,newValue:a}),a}async delete(e){const t=this._getUrl(e),n=this.serverSettings,i=await c.ServerConnection.makeRequest(t,{method:"DELETE"},n);if(204!==i.status)throw await c.ServerConnection.ResponseError.create(i);this._fileChanged.emit({type:"delete",oldValue:{path:e},newValue:null})}async rename(e,t){const n=this.serverSettings,i=this._getUrl(e),s={method:"PATCH",body:JSON.stringify({path:t})},r=await c.ServerConnection.makeRequest(i,s,n);if(200!==r.status)throw await c.ServerConnection.ResponseError.create(r);const o=await r.json();return d.validateContentsModel(o),this._fileChanged.emit({type:"rename",oldValue:{path:e},newValue:o}),o}async save(e,t={}){const n=this.contentProviderRegistry.getProvider(null==t?void 0:t.contentProviderId);let i;return i=n?await n.save(e,t):await this._restContentProvider.save(e,t),this._fileChanged.emit({type:"save",oldValue:null,newValue:i}),i}async copy(e,t){const n=this.serverSettings,i=this._getUrl(t),s={method:"POST",body:JSON.stringify({copy_from:e})},r=await c.ServerConnection.makeRequest(i,s,n);if(201!==r.status)throw await c.ServerConnection.ResponseError.create(r);const o=await r.json();return d.validateContentsModel(o),this._fileChanged.emit({type:"new",oldValue:null,newValue:o}),o}async createCheckpoint(e){const t=this._getUrl(e,"checkpoints"),n=await c.ServerConnection.makeRequest(t,{method:"POST"},this.serverSettings);if(201!==n.status)throw await c.ServerConnection.ResponseError.create(n);const i=await n.json();return d.validateCheckpointModel(i),i}async listCheckpoints(e){const t=this._getUrl(e,"checkpoints"),n=await c.ServerConnection.makeRequest(t,{},this.serverSettings);if(200!==n.status)throw await c.ServerConnection.ResponseError.create(n);const i=await n.json();if(!Array.isArray(i))throw new Error("Invalid Checkpoint list");for(let e=0;e<i.length;e++)d.validateCheckpointModel(i[e]);return i}async restoreCheckpoint(e,t){const n=this._getUrl(e,"checkpoints",t),i=await c.ServerConnection.makeRequest(n,{method:"POST"},this.serverSettings);if(204!==i.status)throw await c.ServerConnection.ResponseError.create(i)}async deleteCheckpoint(e,t){const n=this._getUrl(e,"checkpoints",t),i=await c.ServerConnection.makeRequest(n,{method:"DELETE"},this.serverSettings);if(204!==i.status)throw await c.ServerConnection.ResponseError.create(i)}_getUrl(...e){const t=e.map(e=>o.URLExt.encodeParts(e)),n=this.serverSettings.baseUrl;return o.URLExt.join(n,this._apiEndpoint,...t)}}t.Drive=p,function(e){e.normalizeExtension=function(e){return e.length>0&&0!==e.indexOf(".")&&(e=`.${e}`),e}}(h||(h={}));class m{constructor(e){this._providers=new Map,this._fileChanged=new l.Signal(this),(null==e?void 0:e.defaultProvider)&&this.register("default",e.defaultProvider)}register(e,t){if(this._providers.has(e))throw Error(`Provider with ${e} identifier was already registered on this drive`);this._providers.set(e,t);const n=(e,t)=>{this._fileChanged.emit(t)};return t.fileChanged&&t.fileChanged.connect(n),new a.DisposableDelegate(()=>{t.fileChanged&&t.fileChanged.disconnect(n),this._providers.has(e)&&this._providers.delete(e)})}getProvider(e){if(!e)return null;const t=this._providers.get(e);if(!t)throw Error(`Provider ${e} is not registered`);return t}get fileChanged(){return this._fileChanged}}t.ContentProviderRegistry=m;class f{constructor(e){this._options=e}async get(e,t){let n=this._getUrl(e);if(t){"notebook"===t.type&&delete t.format;const e=t.content?"1":"0",i=t.hash?"1":"0",s={...t,content:e,hash:i};n+=o.URLExt.objectToQueryString(s)}const i=this._options.serverSettings,s=await c.ServerConnection.makeRequest(n,{},i);if(200!==s.status)throw await c.ServerConnection.ResponseError.create(s);const r=await s.json();return d.validateContentsModel(r),r}async save(e,t={}){const n=this._options.serverSettings,i=this._getUrl(e),s={method:"PUT",body:new File([JSON.stringify(t)],"data.json",{type:"application/json"})},r=await c.ServerConnection.makeRequest(i,s,n);if(200!==r.status&&201!==r.status)throw await c.ServerConnection.ResponseError.create(r);const o=await r.json();return d.validateContentsModel(o),o}_getUrl(...e){const t=e.map(e=>o.URLExt.encodeParts(e)),n=this._options.serverSettings.baseUrl;return o.URLExt.join(n,this._options.apiEndpoint,...t)}}t.RestContentProvider=f},7463:(e,t)=>{function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var i=n-1>>>1,s=e[i];if(!(0<r(s,t)))break e;e[i]=t,e[n]=s,n=i}}function i(e){return 0===e.length?null:e[0]}function s(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var i=0,s=e.length,o=s>>>1;i<o;){var a=2*(i+1)-1,l=e[a],c=a+1,d=e[c];if(0>r(l,n))c<s&&0>r(d,l)?(e[i]=d,e[c]=n,i=c):(e[i]=l,e[a]=n,i=a);else{if(!(c<s&&0>r(d,n)))break e;e[i]=d,e[c]=n,i=c}}}return t}function r(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var o=performance;t.unstable_now=function(){return o.now()}}else{var a=Date,l=a.now();t.unstable_now=function(){return a.now()-l}}var c=[],d=[],u=1,h=null,p=3,m=!1,f=!1,g=!1,v="function"==typeof setTimeout?setTimeout:null,_="function"==typeof clearTimeout?clearTimeout:null,b="undefined"!=typeof setImmediate?setImmediate:null;function y(e){for(var t=i(d);null!==t;){if(null===t.callback)s(d);else{if(!(t.startTime<=e))break;s(d),t.sortIndex=t.expirationTime,n(c,t)}t=i(d)}}function w(e){if(g=!1,y(e),!f)if(null!==i(c))f=!0,D(x);else{var t=i(d);null!==t&&T(w,t.startTime-e)}}function x(e,n){f=!1,g&&(g=!1,_(E),E=-1),m=!0;var r=p;try{for(y(n),h=i(c);null!==h&&(!(h.expirationTime>n)||e&&!I());){var o=h.callback;if("function"==typeof o){h.callback=null,p=h.priorityLevel;var a=o(h.expirationTime<=n);n=t.unstable_now(),"function"==typeof a?h.callback=a:h===i(c)&&s(c),y(n)}else s(c);h=i(c)}if(null!==h)var l=!0;else{var u=i(d);null!==u&&T(w,u.startTime-n),l=!1}return l}finally{h=null,p=r,m=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var S,C=!1,k=null,E=-1,M=5,P=-1;function I(){return!(t.unstable_now()-P<M)}function L(){if(null!==k){var e=t.unstable_now();P=e;var n=!0;try{n=k(!0,e)}finally{n?S():(C=!1,k=null)}}else C=!1}if("function"==typeof b)S=function(){b(L)};else if("undefined"!=typeof MessageChannel){var O=new MessageChannel,A=O.port2;O.port1.onmessage=L,S=function(){A.postMessage(null)}}else S=function(){v(L,0)};function D(e){k=e,C||(C=!0,S())}function T(e,n){E=v(function(){e(t.unstable_now())},n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){f||m||(f=!0,D(x))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return i(c)},t.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var n=p;p=t;try{return e()}finally{p=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=p;p=e;try{return t()}finally{p=n}},t.unstable_scheduleCallback=function(e,s,r){var o=t.unstable_now();switch(r="object"==typeof r&&null!==r&&"number"==typeof(r=r.delay)&&0<r?o+r:o,e){case 1:var a=-1;break;case 2:a=250;break;case 5:a=1073741823;break;case 4:a=1e4;break;default:a=5e3}return e={id:u++,callback:s,priorityLevel:e,startTime:r,expirationTime:a=r+a,sortIndex:-1},r>o?(e.sortIndex=r,n(d,e),null===i(c)&&e===i(d)&&(g?(_(E),E=-1):g=!0,T(w,r-o))):(e.sortIndex=a,n(c,e),f||m||(f=!0,D(x))),e},t.unstable_shouldYield=I,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},7484:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.MarkdownCodeBlocks=void 0,function(e){e.CODE_BLOCK_MARKER="```";const t=[".markdown",".mdown",".mkdn",".md",".mkd",".mdwn",".mdtxt",".mdtext",".text",".txt",".Rmd"];class n{constructor(e){this.startLine=e,this.code="",this.endLine=-1}}e.MarkdownCodeBlock=n,e.isMarkdown=function(e){return t.indexOf(e)>-1},e.findMarkdownCodeBlocks=function(t){if(!t||""===t)return[];const i=t.split("\n"),s=[];let r=null;for(let t=0;t<i.length;t++){const o=i[t],a=0===o.indexOf(e.CODE_BLOCK_MARKER),l=null!=r;if(a||l)if(l)r&&(a?(r.endLine=t-1,s.push(r),r=null):r.code+=o+"\n");else{r=new n(t);const i=o.indexOf(e.CODE_BLOCK_MARKER),a=o.lastIndexOf(e.CODE_BLOCK_MARKER);i!==a&&(r.code=o.substring(i+e.CODE_BLOCK_MARKER.length,a),r.endLine=t,s.push(r),r=null)}}return s}}(n||(t.MarkdownCodeBlocks=n={}))},7569:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,s)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return s(t,e),t},o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalAPI=t.Terminal=void 0;const a=r(n(8917));t.Terminal=a;const l=r(n(4903));t.TerminalAPI=l,o(n(6810),t)},7740:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SessionManager=void 0;const i=n(8534),s=n(6903),r=n(1089),o=n(5412),a=n(6830),l=n(637);class c extends o.BaseManager{constructor(e){var t,n;super(e),this._isReady=!1,this._sessionConnections=new Set,this._models=new Map,this._runningChanged=new s.Signal(this),this._connectionFailure=new s.Signal(this),this._connectToKernel=e=>this._kernelManager.connectTo(e),this._kernelManager=e.kernelManager,this._sessionAPIClient=null!==(t=e.sessionAPIClient)&&void 0!==t?t:new l.SessionAPIClient({serverSettings:e.serverSettings}),this._pollModels=new i.Poll({auto:!1,factory:()=>this.requestRunning(),frequency:{interval:1e4,backoff:!0,max:3e5},name:"@jupyterlab/services:SessionManager#models",standby:null!==(n=e.standby)&&void 0!==n?n:"when-hidden"}),this._ready=(async()=>{await this._pollModels.start(),await this._pollModels.tick,this._kernelManager.isActive&&await this._kernelManager.ready,this._isReady=!0})()}get isReady(){return this._isReady}get ready(){return this._ready}get runningChanged(){return this._runningChanged}get connectionFailure(){return this._connectionFailure}dispose(){this.isDisposed||(this._models.clear(),this._sessionConnections.forEach(e=>e.dispose()),this._pollModels.dispose(),super.dispose())}connectTo(e){const t=new a.SessionConnection({...e,connectToKernel:this._connectToKernel,serverSettings:this.serverSettings,sessionAPIClient:this._sessionAPIClient});return this._onStarted(t),this._models.has(e.model.id)||this.refreshRunning().catch(()=>{}),t}running(){return this._models.values()}async refreshRunning(){await this._pollModels.refresh(),await this._pollModels.tick}async startNew(e,t={}){const n=await this._sessionAPIClient.startNew(e);return await this.refreshRunning(),this.connectTo({...t,model:n})}async shutdown(e){await this._sessionAPIClient.shutdown(e),await this.refreshRunning()}async shutdownAll(){await this.refreshRunning(),await Promise.all([...this._models.keys()].map(e=>this._sessionAPIClient.shutdown(e))),await this.refreshRunning()}async stopIfNeeded(e){try{const t=(await this._sessionAPIClient.listRunning()).filter(t=>t.path===e);if(1===t.length){const e=t[0].id;await this.shutdown(e)}}catch(e){}}async findById(e){return this._models.has(e)||await this.refreshRunning(),this._models.get(e)}async findByPath(e){for(const t of this._models.values())if(t.path===e)return t;await this.refreshRunning();for(const t of this._models.values())if(t.path===e)return t}async requestRunning(){var e,t;let n;try{n=await this._sessionAPIClient.listRunning()}catch(n){throw(n instanceof r.ServerConnection.NetworkError||503===(null===(e=n.response)||void 0===e?void 0:e.status)||424===(null===(t=n.response)||void 0===t?void 0:t.status))&&this._connectionFailure.emit(n),n}this.isDisposed||this._models.size===n.length&&n.every(e=>{var t,n,i,s;const r=this._models.get(e.id);return!!r&&(null===(t=r.kernel)||void 0===t?void 0:t.id)===(null===(n=e.kernel)||void 0===n?void 0:n.id)&&(null===(i=r.kernel)||void 0===i?void 0:i.name)===(null===(s=e.kernel)||void 0===s?void 0:s.name)&&r.name===e.name&&r.path===e.path&&r.type===e.type})||(this._models=new Map(n.map(e=>[e.id,e])),this._sessionConnections.forEach(e=>{this._models.has(e.id)?e.update(this._models.get(e.id)):e.dispose()}),this._runningChanged.emit(n))}_onStarted(e){this._sessionConnections.add(e),e.disposed.connect(this._onDisposed,this),e.propertyChanged.connect(this._onChanged,this),e.kernelChanged.connect(this._onChanged,this)}_onDisposed(e){this._sessionConnections.delete(e),this.refreshRunning().catch(()=>{})}_onChanged(){this.refreshRunning().catch(()=>{})}}t.SessionManager=c,function(e){e.NoopManager=class extends e{constructor(){super(...arguments),this._readyPromise=new Promise(()=>{})}get isActive(){return!1}get parentReady(){return super.ready}async startNew(e,t={}){return Promise.reject(new Error("Not implemented in no-op Session Manager"))}connectTo(e){throw Error("Not implemented in no-op Session Manager")}get ready(){return this.parentReady.then(()=>this._readyPromise)}async shutdown(e){return Promise.reject(new Error("Not implemented in no-op Session Manager"))}async requestRunning(){return Promise.resolve()}}}(c||(t.SessionManager=c={}))},7821:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateContentsModel=function(e){(0,i.validateProperty)(e,"name","string"),(0,i.validateProperty)(e,"path","string"),(0,i.validateProperty)(e,"type","string"),(0,i.validateProperty)(e,"created","string"),(0,i.validateProperty)(e,"last_modified","string"),(0,i.validateProperty)(e,"mimetype","object"),(0,i.validateProperty)(e,"content","object"),(0,i.validateProperty)(e,"format","object")},t.validateCheckpointModel=function(e){(0,i.validateProperty)(e,"id","string"),(0,i.validateProperty)(e,"last_modified","string")};const i=n(1480)},7881:function(e,t,n){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.URLExt=void 0;const s=n(7975),r=i(n(1160));var o;!function(e){function t(e){if("undefined"!=typeof document&&document){const t=document.createElement("a");return t.href=e,t}return(0,r.default)(e)}function n(...e){let t=(0,r.default)(e[0],{});const n=""===t.protocol&&t.slashes;n&&(t=(0,r.default)(e[0],"https:"+e[0]));const i=`${n?"":t.protocol}${t.slashes?"//":""}${t.auth}${t.auth?"@":""}${t.host}`,o=s.posix.join(`${i&&"/"!==t.pathname[0]?"/":""}${t.pathname}`,...e.slice(1));return`${i}${"."===o?"":o}`}e.parse=t,e.getHostName=function(e){return(0,r.default)(e).hostname},e.normalize=function(e){return e&&t(e).toString()},e.join=n,e.encodeParts=function(e){return n(...e.split("/").map(encodeURIComponent))},e.objectToQueryString=function(e){const t=Object.keys(e).filter(e=>e.length>0);return t.length?"?"+t.map(t=>{const n=encodeURIComponent(String(e[t]));return t+(n?"="+n:"")}).join("&"):""},e.queryStringToObject=function(e){return e.replace(/^\?/,"").split("&").reduce((e,t)=>{const[n,i]=t.split("=");return n.length>0&&(e[n]=decodeURIComponent(i||"")),e},{})},e.isLocal=function(e,n=!1){const{protocol:i}=t(e);return(!i||0!==e.toLowerCase().indexOf(i))&&(n?0!==e.indexOf("//"):0!==e.indexOf("/"))}}(o||(t.URLExt=o={}))},7975:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,i="",s=0,r=-1,o=0,a=0;a<=e.length;++a){if(a<e.length)n=e.charCodeAt(a);else{if(47===n)break;n=47}if(47===n){if(r===a-1||1===o);else if(r!==a-1&&2===o){if(i.length<2||2!==s||46!==i.charCodeAt(i.length-1)||46!==i.charCodeAt(i.length-2))if(i.length>2){var l=i.lastIndexOf("/");if(l!==i.length-1){-1===l?(i="",s=0):s=(i=i.slice(0,l)).length-1-i.lastIndexOf("/"),r=a,o=0;continue}}else if(2===i.length||1===i.length){i="",s=0,r=a,o=0;continue}t&&(i.length>0?i+="/..":i="..",s=2)}else i.length>0?i+="/"+e.slice(r+1,a):i=e.slice(r+1,a),s=a-r-1;r=a,o=0}else 46===n&&-1!==o?++o:o=-1}return i}var i={resolve:function(){for(var e,i="",s=!1,r=arguments.length-1;r>=-1&&!s;r--){var o;r>=0?o=arguments[r]:(void 0===e&&(e=process.cwd()),o=e),t(o),0!==o.length&&(i=o+"/"+i,s=47===o.charCodeAt(0))}return i=n(i,!s),s?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(e){if(t(e),0===e.length)return".";var i=47===e.charCodeAt(0),s=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!i)).length||i||(e="."),e.length>0&&s&&(e+="/"),i?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n<arguments.length;++n){var s=arguments[n];t(s),s.length>0&&(void 0===e?e=s:e+="/"+s)}return void 0===e?".":i.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=i.resolve(e))===(n=i.resolve(n)))return"";for(var s=1;s<e.length&&47===e.charCodeAt(s);++s);for(var r=e.length,o=r-s,a=1;a<n.length&&47===n.charCodeAt(a);++a);for(var l=n.length-a,c=o<l?o:l,d=-1,u=0;u<=c;++u){if(u===c){if(l>c){if(47===n.charCodeAt(a+u))return n.slice(a+u+1);if(0===u)return n.slice(a+u)}else o>c&&(47===e.charCodeAt(s+u)?d=u:0===u&&(d=0));break}var h=e.charCodeAt(s+u);if(h!==n.charCodeAt(a+u))break;47===h&&(d=u)}var p="";for(u=s+d+1;u<=r;++u)u!==r&&47!==e.charCodeAt(u)||(0===p.length?p+="..":p+="/..");return p.length>0?p+n.slice(a+d):(a+=d,47===n.charCodeAt(a)&&++a,n.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),i=47===n,s=-1,r=!0,o=e.length-1;o>=1;--o)if(47===(n=e.charCodeAt(o))){if(!r){s=o;break}}else r=!1;return-1===s?i?"/":".":i&&1===s?"//":e.slice(0,s)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var i,s=0,r=-1,o=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var a=n.length-1,l=-1;for(i=e.length-1;i>=0;--i){var c=e.charCodeAt(i);if(47===c){if(!o){s=i+1;break}}else-1===l&&(o=!1,l=i+1),a>=0&&(c===n.charCodeAt(a)?-1===--a&&(r=i):(a=-1,r=l))}return s===r?r=l:-1===r&&(r=e.length),e.slice(s,r)}for(i=e.length-1;i>=0;--i)if(47===e.charCodeAt(i)){if(!o){s=i+1;break}}else-1===r&&(o=!1,r=i+1);return-1===r?"":e.slice(s,r)},extname:function(e){t(e);for(var n=-1,i=0,s=-1,r=!0,o=0,a=e.length-1;a>=0;--a){var l=e.charCodeAt(a);if(47!==l)-1===s&&(r=!1,s=a+1),46===l?-1===n?n=a:1!==o&&(o=1):-1!==n&&(o=-1);else if(!r){i=a+1;break}}return-1===n||-1===s||0===o||1===o&&n===s-1&&n===i+1?"":e.slice(n,s)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,i=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+i:n+"/"+i:i}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var i,s=e.charCodeAt(0),r=47===s;r?(n.root="/",i=1):i=0;for(var o=-1,a=0,l=-1,c=!0,d=e.length-1,u=0;d>=i;--d)if(47!==(s=e.charCodeAt(d)))-1===l&&(c=!1,l=d+1),46===s?-1===o?o=d:1!==u&&(u=1):-1!==o&&(u=-1);else if(!c){a=d+1;break}return-1===o||-1===l||0===u||1===u&&o===l-1&&o===a+1?-1!==l&&(n.base=n.name=0===a&&r?e.slice(1,l):e.slice(a,l)):(0===a&&r?(n.name=e.slice(1,o),n.base=e.slice(1,l)):(n.name=e.slice(a,o),n.base=e.slice(a,l)),n.ext=e.slice(o,l)),a>0?n.dir=e.slice(0,a-1):r&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i,e.exports=i},8031:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},8378:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.JupyterPluginRegistry=void 0;const i=n(5899);class s extends i.PluginRegistry{constructor(e){var t;super(e),this._pluginData=new Map,this._expectedActivationTime=null!==(t=null==e?void 0:e.expectedActivationTime)&&void 0!==t?t:5e3}registerPlugin(e){return this._pluginData.set(e.id,e),super.registerPlugin(e)}async activatePlugin(e){const t=performance.now();let n=setTimeout(()=>{console.warn(`Plugin ${e} is taking too long to activate.`)},this._expectedActivationTime);try{const i=await super.activatePlugin(e);clearTimeout(n);const s=performance.now()-t;if(s>=this._expectedActivationTime){const t=this._getDependentCount(e);console.warn(`Plugin ${e} (with ${t} dependants) took ${s.toFixed(2)}ms to activate.`)}return i}catch(t){throw clearTimeout(n),console.error(`Error activating plugin: ${e}`,t),t}}_getDependentCount(e){var t;const n=this._pluginData.get(e);if(!(null==n?void 0:n.provides))return 0;const i=n.provides.name;let s=0;for(const[n,r]of this._pluginData.entries())n!==e&&(null===(t=r.requires)||void 0===t?void 0:t.filter(e=>!!e).some(e=>e.name===i))&&s++;return s}}t.JupyterPluginRegistry=s},8430:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,s)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return s(t,e),t},o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.UserAPI=t.User=void 0;const a=r(n(1483));t.User=a;const l=r(n(4320));t.UserAPI=l,o(n(961),t)},8510:(e,t,n)=>{n.r(t),n.d(t,{Cache:()=>f,FreeStyle:()=>y,Rule:()=>_,Selector:()=>g,Style:()=>v,create:()=>w});let i=0;const s=Object.create(null),r=["animation-iteration-count","border-image-outset","border-image-slice","border-image-width","box-flex","box-flex-group","box-ordinal-group","column-count","columns","counter-increment","counter-reset","flex","flex-grow","flex-positive","flex-shrink","flex-negative","flex-order","font-weight","grid-area","grid-column","grid-column-end","grid-column-span","grid-column-start","grid-row","grid-row-end","grid-row-span","grid-row-start","line-clamp","line-height","opacity","order","orphans","tab-size","widows","z-index","zoom","fill-opacity","flood-opacity","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","stroke-opacity","stroke-width"];for(const e of r)for(const t of["-webkit-","-ms-","-moz-","-o-",""])s[t+e]=!0;function o(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`).replace(/^ms-/,"-ms-")}function a(e,t){return t&&"number"==typeof t&&!s[e]?`${e}:${t}px`:`${e}:${t}`}function l(e){return e.sort((e,t)=>e[0]>t[0]?1:-1)}function c(e){return e.map(([e,t])=>Array.isArray(t)?t.map(t=>a(e,t)).join(";"):a(e,t)).join(";")}function d(e,t){return-1===e.indexOf("&")?`${t} ${e}`:e.replace(/&/g,t)}function u(e,t,n,i,s){const{style:r,nested:a,isUnique:h}=function(e,t){const n=[],i=[];for(const t of Object.keys(e)){const s=t.trim(),r=e[t];36!==s.charCodeAt(0)&&null!=r&&("object"!=typeof r||Array.isArray(r)?n.push([o(s),r]):i.push([s,r]))}return{style:c(l(n)),nested:t?i:l(i),isUnique:!!e.$unique}}(t,""!==e);let p=r;if(64===e.charCodeAt(0)){const t={selector:e,styles:[],rules:[],style:s?"":r};n.push(t),r&&s&&t.styles.push({selector:s,style:r,isUnique:h});for(const[e,n]of a)p+=e+u(e,n,t.rules,t.styles,s)}else{const t=s?d(e,s):e;r&&i.push({selector:t,style:r,isUnique:h});for(const[e,s]of a)p+=e+u(e,s,n,i,t)}return p}function h(e,t,n,s,r,o){for(const{selector:n,style:a,isUnique:l}of s){const s=o?d(n,r):n,c=l?`u\0${(++i).toString(36)}`:`s\0${t}\0${a}`,u=new v(a,c);u.add(new g(s,`k\0${t}\0${s}`)),e.add(u)}for(const{selector:i,style:s,rules:a,styles:l}of n){const n=new _(i,s,`r\0${t}\0${i}\0${s}`);h(n,t,a,l,r,o),e.add(n)}}function p(e){let t="";for(let n=0;n<e.length;n++)t+=e[n];return t}const m={add:()=>{},change:()=>{},remove:()=>{}};class f{constructor(e=m){this.changes=e,this.sheet=[],this.changeId=0,this._keys=[],this._children=Object.create(null),this._counters=Object.create(null)}add(e){const t=this._counters[e.id]||0,n=this._children[e.id]||e.clone();if(this._counters[e.id]=t+1,0===t)this._children[n.id]=n,this._keys.push(n.id),this.sheet.push(n.getStyles()),this.changeId++,this.changes.add(n,this._keys.length-1);else if(n instanceof f&&e instanceof f){const t=this._keys.indexOf(e.id),i=n.changeId;n.merge(e),n.changeId!==i&&(this.sheet.splice(t,1,n.getStyles()),this.changeId++,this.changes.change(n,t,t))}}remove(e){const t=this._counters[e.id];if(t){this._counters[e.id]=t-1;const n=this._children[e.id],i=this._keys.indexOf(n.id);if(1===t)delete this._counters[e.id],delete this._children[e.id],this._keys.splice(i,1),this.sheet.splice(i,1),this.changeId++,this.changes.remove(n,i);else if(n instanceof f&&e instanceof f){const t=n.changeId;n.unmerge(e),n.changeId!==t&&(this.sheet.splice(i,1,n.getStyles()),this.changeId++,this.changes.change(n,i,i))}}}values(){return this._keys.map(e=>this._children[e])}merge(e){for(const t of e.values())this.add(t);return this}unmerge(e){for(const t of e.values())this.remove(t);return this}clone(){return(new f).merge(this)}}class g{constructor(e,t){this.selector=e,this.id=t}getStyles(){return this.selector}clone(){return this}}class v extends f{constructor(e,t){super(),this.style=e,this.id=t}getStyles(){return`${this.sheet.join(",")}{${this.style}}`}clone(){return new v(this.style,this.id).merge(this)}}class _ extends f{constructor(e,t,n){super(),this.rule=e,this.style=t,this.id=n}getStyles(){return`${this.rule}{${this.style}${p(this.sheet)}}`}clone(){return new _(this.rule,this.style,this.id).merge(this)}}function b(e,t){return`f${function(e){let t=5381,n=e.length;for(;n--;)t=33*t^e.charCodeAt(n);return(t>>>0).toString(36)}(e)}`}class y extends f{constructor(e,t){super(t),this.id=e}registerStyle(e){const t=[],n=[],i=u("&",e,t,n),s=b(i);return h(this,i,t,n,`.${s}`,!0),s}registerKeyframes(e){return this.registerHashRule("@keyframes",e)}registerHashRule(e,t){const n=[],i=[],s=u("",t,n,i),r=b(s),o=new _(`${e} ${r}`,"",`h\0${s}\0${e}`);return h(o,s,n,i,"",!1),this.add(o),r}registerRule(e,t){const n=[],i=[];h(this,u(e,t,n,i),n,i,"",!1)}registerCss(e){return this.registerRule("",e)}getStyles(){return p(this.sheet)}clone(){return new y(this.id,this.changes).merge(this)}}function w(e){return new y(`f${(++i).toString(36)}`,e)}},8534:(e,t,n)=>{n.r(t),n.d(t,{Debouncer:()=>l,Poll:()=>o,RateLimiter:()=>a,Throttler:()=>c});var i,s=n(5899),r=n(6903);class o{constructor(e){var t;this._disposed=new r.Signal(this),this._lingered=0,this._tick=new s.PromiseDelegate,this._ticked=new r.Signal(this),this._factory=e.factory,this._linger=null!==(t=e.linger)&&void 0!==t?t:i.DEFAULT_LINGER,this._standby=e.standby||i.DEFAULT_STANDBY,this._state={...i.DEFAULT_STATE,timestamp:(new Date).getTime()};const n=e.frequency||{},o=Math.max(n.interval||0,n.max||0,i.DEFAULT_FREQUENCY.max);this.frequency={...i.DEFAULT_FREQUENCY,...n,max:o},this.name=e.name||i.DEFAULT_NAME,"auto"in e&&!e.auto||setTimeout(()=>this.start())}get disposed(){return this._disposed}get frequency(){return this._frequency}set frequency(e){if(this.isDisposed||s.JSONExt.deepEqual(e,this.frequency||{}))return;let{backoff:t,interval:n,max:i}=e;if(n=Math.round(n),i=Math.round(i),"number"==typeof t&&t<1)throw new Error("Poll backoff growth factor must be at least 1");if((n<0||n>i)&&n!==o.NEVER)throw new Error("Poll interval must be between 0 and max");if(i>o.MAX_INTERVAL&&i!==o.NEVER)throw new Error(`Max interval must be less than ${o.MAX_INTERVAL}`);this._frequency={backoff:t,interval:n,max:i}}get isDisposed(){return"disposed"===this.state.phase}get standby(){return this._standby}set standby(e){this.isDisposed||this.standby===e||(this._standby=e)}get state(){return this._state}get tick(){return this._tick.promise}get ticked(){return this._ticked}async*[Symbol.asyncIterator](){for(;!this.isDisposed;)yield this.state,await this.tick.catch(()=>{})}dispose(){this.isDisposed||(this._state={...i.DISPOSED_STATE,timestamp:(new Date).getTime()},this._tick.promise.catch(e=>{}),this._tick.reject(new Error(`Poll (${this.name}) is disposed.`)),this._disposed.emit(void 0),r.Signal.clearData(this))}refresh(){return this.schedule({cancel:({phase:e})=>"refreshed"===e,interval:o.IMMEDIATE,phase:"refreshed"})}async schedule(e={}){if(this.isDisposed)return;if(e.cancel&&e.cancel(this.state))return;const t=this._tick,n=new s.PromiseDelegate,i={interval:this.frequency.interval,payload:null,phase:"standby",timestamp:(new Date).getTime(),...e};this._state=i,this._tick=n,clearTimeout(this._timeout),this._ticked.emit(this.state),t.resolve(this),await t.promise,i.interval!==o.NEVER?this._timeout=setTimeout(()=>{this.isDisposed||this.tick!==n.promise||this._execute()},i.interval):this._timeout=void 0}start(){return this.schedule({cancel:({phase:e})=>"constructed"!==e&&"standby"!==e&&"stopped"!==e,interval:o.IMMEDIATE,phase:"started"})}stop(){return this.schedule({cancel:({phase:e})=>"stopped"===e,interval:o.NEVER,phase:"stopped"})}get hidden(){return i.hidden}_execute(){let e="function"==typeof this.standby?this.standby():this.standby;if("never"===e?e=!1:"when-hidden"===e&&(this.hidden?e=++this._lingered>this._linger:(this._lingered=0,e=!1)),e)return void this.schedule();const t=this.tick;this._factory(this.state).then(e=>{this.isDisposed||this.tick!==t||this.schedule({payload:e,phase:"rejected"===this.state.phase?"reconnected":"resolved"})}).catch(e=>{this.isDisposed||this.tick!==t||this.schedule({interval:i.sleep(this.frequency,this.state),payload:e,phase:"rejected"})})}}!function(e){e.IMMEDIATE=0,e.MAX_INTERVAL=2147483647,e.NEVER=1/0}(o||(o={})),function(e){e.DEFAULT_BACKOFF=3,e.DEFAULT_FREQUENCY={backoff:!0,interval:1e3,max:3e4},e.DEFAULT_LINGER=1,e.DEFAULT_NAME="unknown",e.DEFAULT_STANDBY="when-hidden",e.DEFAULT_STATE={interval:o.NEVER,payload:null,phase:"constructed",timestamp:new Date(0).getTime()},e.DISPOSED_STATE={interval:o.NEVER,payload:null,phase:"disposed",timestamp:new Date(0).getTime()},e.sleep=function(t,n){const{backoff:i,interval:s,max:r}=t;if(s===o.NEVER)return s;const a=!0===i?e.DEFAULT_BACKOFF:!1===i?1:i,l=function(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e}(s,n.interval*a);return Math.min(r,l)},e.hidden="undefined"!=typeof document&&(document.addEventListener("visibilitychange",()=>{e.hidden="hidden"===document.visibilityState}),document.addEventListener("pagehide",()=>{e.hidden="hidden"===document.visibilityState}),"hidden"===document.visibilityState)}(i||(i={}));class a{constructor(e,t=500){this.args=void 0,this.payload=null,this.limit=t,this.poll=new o({auto:!1,factory:async()=>{const{args:t}=this;return this.args=void 0,e(...t)},frequency:{backoff:!1,interval:o.NEVER,max:o.NEVER},standby:"never"}),this.payload=new s.PromiseDelegate,this.poll.ticked.connect((e,t)=>{const{payload:n}=this;return"resolved"===t.phase?(this.payload=new s.PromiseDelegate,void n.resolve(t.payload)):"rejected"===t.phase||"stopped"===t.phase?(this.payload=new s.PromiseDelegate,n.promise.catch(e=>{}),void n.reject(t.payload)):void 0},this)}get isDisposed(){return null===this.payload}dispose(){this.isDisposed||(this.args=void 0,this.payload=null,this.poll.dispose())}async stop(){return this.poll.stop()}}class l extends a{invoke(...e){return this.args=e,this.poll.schedule({interval:this.limit,phase:"invoked"}),this.payload.promise}}class c extends a{constructor(e,t){super(e,"number"==typeof t?t:t&&t.limit),this._trailing=!1,"number"!=typeof t&&t&&"trailing"===t.edge&&(this._trailing=!0),this._interval=this._trailing?this.limit:o.IMMEDIATE}invoke(...e){const t="invoked"!==this.poll.state.phase;return(t||this._trailing)&&(this.args=e),t&&this.poll.schedule({interval:this._interval,phase:"invoked"}),this.payload.promise}}},8662:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.KernelAPIClient=t.KERNEL_SERVICE_URL=void 0,t.listRunning=o,t.startNew=a,t.restartKernel=l,t.interruptKernel=c,t.shutdownKernel=d,t.getKernelModel=u;const i=n(1089),s=n(6376),r=n(8872);async function o(e=i.ServerConnection.makeSettings()){const n=s.URLExt.join(e.baseUrl,t.KERNEL_SERVICE_URL),o=await i.ServerConnection.makeRequest(n,{},e);if(200!==o.status)throw await i.ServerConnection.ResponseError.create(o);const a=await o.json();return(0,r.validateModels)(a),a}async function a(e={},n=i.ServerConnection.makeSettings()){const o=s.URLExt.join(n.baseUrl,t.KERNEL_SERVICE_URL),a={method:"POST",body:JSON.stringify(e)},l=await i.ServerConnection.makeRequest(o,a,n);if(201!==l.status)throw await i.ServerConnection.ResponseError.create(l);const c=await l.json();return(0,r.validateModel)(c),c}async function l(e,n=i.ServerConnection.makeSettings()){const o=s.URLExt.join(n.baseUrl,t.KERNEL_SERVICE_URL,encodeURIComponent(e),"restart"),a=await i.ServerConnection.makeRequest(o,{method:"POST"},n);if(200!==a.status)throw await i.ServerConnection.ResponseError.create(a);const l=await a.json();(0,r.validateModel)(l)}async function c(e,n=i.ServerConnection.makeSettings()){const r=s.URLExt.join(n.baseUrl,t.KERNEL_SERVICE_URL,encodeURIComponent(e),"interrupt"),o=await i.ServerConnection.makeRequest(r,{method:"POST"},n);if(204!==o.status)throw await i.ServerConnection.ResponseError.create(o)}async function d(e,n=i.ServerConnection.makeSettings()){const r=s.URLExt.join(n.baseUrl,t.KERNEL_SERVICE_URL,encodeURIComponent(e)),o=await i.ServerConnection.makeRequest(r,{method:"DELETE"},n);if(404===o.status){const t=`The kernel "${e}" does not exist on the server`;console.warn(t)}else if(204!==o.status)throw await i.ServerConnection.ResponseError.create(o)}async function u(e,n=i.ServerConnection.makeSettings()){const o=s.URLExt.join(n.baseUrl,t.KERNEL_SERVICE_URL,encodeURIComponent(e)),a=await i.ServerConnection.makeRequest(o,{},n);if(404===a.status)return;if(200!==a.status)throw await i.ServerConnection.ResponseError.create(a);const l=await a.json();return(0,r.validateModel)(l),l}t.KERNEL_SERVICE_URL="api/kernels",t.KernelAPIClient=class{constructor(e={}){var t;this.serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:i.ServerConnection.makeSettings()}async listRunning(){return o(this.serverSettings)}async getModel(e){return u(e,this.serverSettings)}async startNew(e={}){return a(e,this.serverSettings)}async restart(e){return l(e,this.serverSettings)}async interrupt(e){return c(e,this.serverSettings)}async shutdown(e){return d(e,this.serverSettings)}}},8872:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateMessage=function(e){(0,i.validateProperty)(e,"metadata","object"),(0,i.validateProperty)(e,"content","object"),(0,i.validateProperty)(e,"channel","string"),function(e){for(let t=0;t<s.length;t++)(0,i.validateProperty)(e,s[t],"string")}(e.header),"iopub"===e.channel&&function(e){if("iopub"===e.channel){const t=r[e.header.msg_type];if(void 0===t)return;const n=Object.keys(t),s=e.content;for(let e=0;e<n.length;e++){let r=t[n[e]];Array.isArray(r)||(r=[r]),(0,i.validateProperty)(s,n[e],...r)}}}(e)},t.validateModel=o,t.validateModels=function(e){if(!Array.isArray(e))throw new Error("Invalid kernel list");e.forEach(e=>o(e))};const i=n(1480),s=["username","version","session","msg_id","msg_type"],r={stream:{name:"string",text:"string"},display_data:{data:"object",metadata:"object"},execute_input:{code:"string",execution_count:"number"},execute_result:{execution_count:"number",data:"object",metadata:"object"},error:{ename:"string",evalue:"string",traceback:"object"},status:{execution_state:["string",["starting","idle","busy","restarting","dead"]]},clear_output:{wait:"boolean"},comm_open:{comm_id:"string",target_name:"string",data:"object"},comm_msg:{comm_id:"string",data:"object"},comm_close:{comm_id:"string"},shutdown_reply:{restart:"boolean"}};function o(e){(0,i.validateProperty)(e,"name","string"),(0,i.validateProperty)(e,"id","string")}},8917:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isAvailable=void 0;const i=n(4903);Object.defineProperty(t,"isAvailable",{enumerable:!0,get:function(){return i.isAvailable}})},9031:e=>{function t(e){return"number"==typeof e||!!/^0x[0-9a-f]+$/i.test(e)||/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e)}function n(e,t){return"constructor"===t&&"function"==typeof e[t]||"__proto__"===t}e.exports=function(e,i){i||(i={});var s={bools:{},strings:{},unknownFn:null};"function"==typeof i.unknown&&(s.unknownFn=i.unknown),"boolean"==typeof i.boolean&&i.boolean?s.allBools=!0:[].concat(i.boolean).filter(Boolean).forEach(function(e){s.bools[e]=!0});var r={};function o(e){return r[e].some(function(e){return s.bools[e]})}Object.keys(i.alias||{}).forEach(function(e){r[e]=[].concat(i.alias[e]),r[e].forEach(function(t){r[t]=[e].concat(r[e].filter(function(e){return t!==e}))})}),[].concat(i.string).filter(Boolean).forEach(function(e){s.strings[e]=!0,r[e]&&[].concat(r[e]).forEach(function(e){s.strings[e]=!0})});var a=i.default||{},l={_:[]};function c(e,t,i){for(var r=e,o=0;o<t.length-1;o++){var a=t[o];if(n(r,a))return;void 0===r[a]&&(r[a]={}),r[a]!==Object.prototype&&r[a]!==Number.prototype&&r[a]!==String.prototype||(r[a]={}),r[a]===Array.prototype&&(r[a]=[]),r=r[a]}var l=t[t.length-1];n(r,l)||(r!==Object.prototype&&r!==Number.prototype&&r!==String.prototype||(r={}),r===Array.prototype&&(r=[]),void 0===r[l]||s.bools[l]||"boolean"==typeof r[l]?r[l]=i:Array.isArray(r[l])?r[l].push(i):r[l]=[r[l],i])}function d(e,n,i){if(!i||!s.unknownFn||function(e,t){return s.allBools&&/^--[^=]+$/.test(t)||s.strings[e]||s.bools[e]||r[e]}(e,i)||!1!==s.unknownFn(i)){var o=!s.strings[e]&&t(n)?Number(n):n;c(l,e.split("."),o),(r[e]||[]).forEach(function(e){c(l,e.split("."),o)})}}Object.keys(s.bools).forEach(function(e){d(e,void 0!==a[e]&&a[e])});var u=[];-1!==e.indexOf("--")&&(u=e.slice(e.indexOf("--")+1),e=e.slice(0,e.indexOf("--")));for(var h=0;h<e.length;h++){var p,m,f=e[h];if(/^--.+=/.test(f)){var g=f.match(/^--([^=]+)=([\s\S]*)$/);p=g[1];var v=g[2];s.bools[p]&&(v="false"!==v),d(p,v,f)}else if(/^--no-.+/.test(f))d(p=f.match(/^--no-(.+)/)[1],!1,f);else if(/^--.+/.test(f))p=f.match(/^--(.+)/)[1],void 0===(m=e[h+1])||/^(-|--)[^-]/.test(m)||s.bools[p]||s.allBools||r[p]&&o(p)?/^(true|false)$/.test(m)?(d(p,"true"===m,f),h+=1):d(p,!s.strings[p]||"",f):(d(p,m,f),h+=1);else if(/^-[^-]+/.test(f)){for(var _=f.slice(1,-1).split(""),b=!1,y=0;y<_.length;y++)if("-"!==(m=f.slice(y+2))){if(/[A-Za-z]/.test(_[y])&&"="===m[0]){d(_[y],m.slice(1),f),b=!0;break}if(/[A-Za-z]/.test(_[y])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(m)){d(_[y],m,f),b=!0;break}if(_[y+1]&&_[y+1].match(/\W/)){d(_[y],f.slice(y+2),f),b=!0;break}d(_[y],!s.strings[_[y]]||"",f)}else d(_[y],m,f);p=f.slice(-1)[0],b||"-"===p||(!e[h+1]||/^(-|--)[^-]/.test(e[h+1])||s.bools[p]||r[p]&&o(p)?e[h+1]&&/^(true|false)$/.test(e[h+1])?(d(p,"true"===e[h+1],f),h+=1):d(p,!s.strings[p]||"",f):(d(p,e[h+1],f),h+=1))}else if(s.unknownFn&&!1===s.unknownFn(f)||l._.push(s.strings._||!t(f)?f:Number(f)),i.stopEarly){l._.push.apply(l._,e.slice(h+1));break}}return Object.keys(a).forEach(function(e){var t,n,i;t=l,n=e.split("."),i=t,n.slice(0,-1).forEach(function(e){i=i[e]||{}}),n[n.length-1]in i||(c(l,e.split("."),a[e]),(r[e]||[]).forEach(function(t){c(l,t.split("."),a[e])}))}),i["--"]?l["--"]=u.slice():u.forEach(function(e){l._.push(e)}),l}},9237:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateSpecModel=s,t.validateSpecModels=function(e){if(!e.hasOwnProperty("kernelspecs"))throw new Error("No kernelspecs found");let t=Object.keys(e.kernelspecs);const n=Object.create(null);let i=e.default;for(let i=0;i<t.length;i++){const r=e.kernelspecs[t[i]];try{n[t[i]]=s(r)}catch(e){console.warn(`Removing errant kernel spec: ${t[i]}`)}}if(t=Object.keys(n),!t.length)throw new Error("No valid kernelspecs found");return i&&"string"==typeof i&&i in n||(i=t[0],console.warn(`Default kernel not found, using '${t[0]}'`)),{default:i,kernelspecs:n}};const i=n(1480);function s(e){const t=e.spec;if(!t)throw new Error("Invalid kernel spec");(0,i.validateProperty)(e,"name","string"),(0,i.validateProperty)(e,"resources","object"),(0,i.validateProperty)(t,"language","string"),(0,i.validateProperty)(t,"display_name","string"),(0,i.validateProperty)(t,"argv","array");let n=null;t.hasOwnProperty("metadata")&&((0,i.validateProperty)(t,"metadata","object"),n=t.metadata);let s=null;return t.hasOwnProperty("env")&&((0,i.validateProperty)(t,"env","object"),s=t.env),{name:e.name,resources:e.resources,language:t.language,display_name:t.display_name,argv:t.argv,metadata:n,env:s}}},9531:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,s)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),s=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),s(n(4056),t),s(n(8031),t),s(n(5310),t),s(n(9864),t),s(n(2877),t)},9659:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Time=void 0;const n=[{name:"years",milliseconds:31536e6},{name:"months",milliseconds:2592e6},{name:"days",milliseconds:864e5},{name:"hours",milliseconds:36e5},{name:"minutes",milliseconds:6e4},{name:"seconds",milliseconds:1e3}];var i;!function(e){e.formatHuman=function(e,t="long"){const i=document.documentElement.lang||"en",s=new Intl.RelativeTimeFormat(i,{numeric:"auto",style:t}),r=new Date(e).getTime()-Date.now();for(let e of n){const t=Math.ceil(r/e.milliseconds);if(0!==t)return s.format(t,e.name)}return s.format(0,"seconds")},e.format=function(e){const t=document.documentElement.lang||"en";return new Intl.DateTimeFormat(t,{dateStyle:"short",timeStyle:"short"}).format(new Date(e))}}(i||(t.Time=i={}))},9798:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.supportedKernelWebSocketProtocols=void 0,t.createMessage=function(e){var t,n,s,r,o,a;return{buffers:null!==(t=e.buffers)&&void 0!==t?t:[],channel:e.channel,content:e.content,header:{date:(new Date).toISOString(),msg_id:null!==(n=e.msgId)&&void 0!==n?n:i.UUID.uuid4(),msg_type:e.msgType,session:e.session,username:null!==(s=e.username)&&void 0!==s?s:"",subshell_id:null!==(r=e.subshellId)&&void 0!==r?r:null,version:"5.2"},metadata:null!==(o=e.metadata)&&void 0!==o?o:{},parent_header:null!==(a=e.parentHeader)&&void 0!==a?a:{}}},t.isStreamMsg=function(e){return"stream"===e.header.msg_type},t.isDisplayDataMsg=function(e){return"display_data"===e.header.msg_type},t.isUpdateDisplayDataMsg=function(e){return"update_display_data"===e.header.msg_type},t.isExecuteInputMsg=function(e){return"execute_input"===e.header.msg_type},t.isExecuteResultMsg=function(e){return"execute_result"===e.header.msg_type},t.isErrorMsg=function(e){return"error"===e.header.msg_type},t.isStatusMsg=function(e){return"status"===e.header.msg_type},t.isClearOutputMsg=function(e){return"clear_output"===e.header.msg_type},t.isDebugEventMsg=function(e){return"debug_event"===e.header.msg_type},t.isCommOpenMsg=function(e){return"comm_open"===e.header.msg_type},t.isCommCloseMsg=function(e){return"comm_close"===e.header.msg_type},t.isCommMsgMsg=function(e){return"comm_msg"===e.header.msg_type},t.isInfoRequestMsg=function(e){return"kernel_info_request"===e.header.msg_type},t.isExecuteReplyMsg=function(e){return"execute_reply"===e.header.msg_type},t.isDebugRequestMsg=function(e){return"debug_request"===e.header.msg_type},t.isDebugReplyMsg=function(e){return"debug_reply"===e.header.msg_type},t.isInputRequestMsg=function(e){return"input_request"===e.header.msg_type},t.isInputReplyMsg=function(e){return"input_reply"===e.header.msg_type};const i=n(5899);var s;!function(e){e.v1KernelWebsocketJupyterOrg="v1.kernel.websocket.jupyter.org"}(s||(t.supportedKernelWebSocketProtocols=s={}))},9851:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigWithDefaults=t.ConfigSection=t.ConfigSectionManager=void 0;const i=n(6376),s=n(608);var r;t.ConfigSectionManager=class{constructor(e){var t;this.serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:s.ServerConnection.makeSettings()}async create(e){const t=new o({...e,serverSettings:this.serverSettings});return await t.load(),t}},function(e){let t;e.create=async function(e){if(!t){const t=new o(e);return await t.load(),t}return await t.create(e)},e._setConfigSectionManager=function(e){if(t)throw new Error("ConfigSectionManager already set. If you would like to create a config section, use the `IConfigSectionManager` token in a plugin.");t=e}}(r||(t.ConfigSection=r={}));class o{constructor(e){var t;this.serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:s.ServerConnection.makeSettings(),this._name=e.name}get data(){return this._data}async load(){const e=await s.ServerConnection.makeRequest(this._url,{},this.serverSettings);if(200!==e.status)throw await s.ServerConnection.ResponseError.create(e);this._data=await e.json()}async update(e){this._data={...this._data,...e};const t={method:"PATCH",body:JSON.stringify(e)},n=await s.ServerConnection.makeRequest(this._url,t,this.serverSettings);if(200!==n.status)throw await s.ServerConnection.ResponseError.create(n);return this._data=await n.json(),this._data}get _url(){return i.URLExt.join(this.serverSettings.baseUrl,"api/config",encodeURIComponent(this._name))}}t.ConfigWithDefaults=class{constructor(e){var t,n;this._className="",this._section=e.section,this._defaults=null!==(t=e.defaults)&&void 0!==t?t:{},this._className=null!==(n=e.className)&&void 0!==n?n:""}get(e){const t=this._classData();return e in t?t[e]:this._defaults[e]}set(e,t){const n={};if(n[e]=t,this._className){const e={};return e[this._className]=n,this._section.update(e)}return this._section.update(n)}_classData(){const e=this._section.data;return this._className&&this._className in e?e[this._className]:e}}},9864:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StateDB=void 0;const i=n(6903);class s{constructor(e={}){this._changed=new i.Signal(this);const{connector:t,transform:n}=e;this._connector=t||new s.Connector,this._ready=n?n.then(e=>{const{contents:t,type:n}=e;switch(n){case"cancel":default:return;case"clear":return this._clear();case"merge":return this._merge(t||{});case"overwrite":return this._overwrite(t||{})}}):Promise.resolve(void 0)}get changed(){return this._changed}async clear(){await this._ready,await this._clear()}async fetch(e){return await this._ready,this._fetch(e)}async list(e){return await this._ready,this._list(e)}async remove(e){await this._ready,await this._remove(e),this._changed.emit({id:e,type:"remove"})}async save(e,t){await this._ready,await this._save(e,t),this._changed.emit({id:e,type:"save"})}async toJSON(){await this._ready;const{ids:e,values:t}=await this._list();return t.reduce((t,n,i)=>(t[e[i]]=n,t),{})}async _clear(){await Promise.all((await this._list()).ids.map(e=>this._remove(e)))}async _fetch(e){const t=await this._connector.fetch(e);if(t)return JSON.parse(t).v}async _list(e=""){const{ids:t,values:n}=await this._connector.list(e);return{ids:t,values:n.map(e=>JSON.parse(e).v)}}async _merge(e){await Promise.all(Object.keys(e).map(t=>e[t]&&this._save(t,e[t])))}async _overwrite(e){await this._clear(),await this._merge(e)}async _remove(e){return this._connector.remove(e)}async _save(e,t){return this._connector.save(e,JSON.stringify({v:t}))}}t.StateDB=s,function(e){e.Connector=class{constructor(){this._storage={}}async fetch(e){return this._storage[e]}async list(e=""){return Object.keys(this._storage).reduce((t,n)=>(""!==e&&e!==n.split(":")[0]||(t.ids.push(n),t.values.push(this._storage[n])),t),{ids:[],values:[]})}async remove(e){delete this._storage[e]}async save(e,t){this._storage[e]=t}}}(s||(t.StateDB=s={}))},9982:(e,t,n)=>{e.exports=n(7463)}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(n.exports,n,n.exports,__webpack_require__),n.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={},common_utils_namespaceObject={};__webpack_require__.r(common_utils_namespaceObject),__webpack_require__.d(common_utils_namespaceObject,{hasBrowserEnv:()=>hasBrowserEnv,hasStandardBrowserEnv:()=>hasStandardBrowserEnv,hasStandardBrowserWebWorkerEnv:()=>hasStandardBrowserWebWorkerEnv,navigator:()=>_navigator,origin:()=>origin});var index_es6=__webpack_require__(6588),dist=__webpack_require__(5899),ClipboardExt,ElementExt,Platform,Selector,Private,index_es6_Private,MessageLoop;!function(e){e.copyText=function(e){const t=document.body,n=i=>{i.preventDefault(),i.stopPropagation(),i.clipboardData.setData("text",e),t.removeEventListener("copy",n,!0)};t.addEventListener("copy",n,!0),document.execCommand("copy")}}(ClipboardExt||(ClipboardExt={})),function(e){e.boxSizing=function(e){let t=window.getComputedStyle(e),n=parseFloat(t.borderTopWidth)||0,i=parseFloat(t.borderLeftWidth)||0,s=parseFloat(t.borderRightWidth)||0,r=parseFloat(t.borderBottomWidth)||0,o=parseFloat(t.paddingTop)||0,a=parseFloat(t.paddingLeft)||0,l=parseFloat(t.paddingRight)||0,c=parseFloat(t.paddingBottom)||0;return{borderTop:n,borderLeft:i,borderRight:s,borderBottom:r,paddingTop:o,paddingLeft:a,paddingRight:l,paddingBottom:c,horizontalSum:i+a+l+s,verticalSum:n+o+c+r}},e.sizeLimits=function(e){let t=window.getComputedStyle(e),n=parseFloat(t.minWidth)||0,i=parseFloat(t.minHeight)||0,s=parseFloat(t.maxWidth)||1/0,r=parseFloat(t.maxHeight)||1/0;return s=Math.max(n,s),r=Math.max(i,r),{minWidth:n,minHeight:i,maxWidth:s,maxHeight:r}},e.hitTest=function(e,t,n){let i=e.getBoundingClientRect();return t>=i.left&&t<i.right&&n>=i.top&&n<i.bottom},e.scrollIntoViewIfNeeded=function(e,t){let n=e.getBoundingClientRect(),i=t.getBoundingClientRect();i.top<=n.top&&i.bottom>=n.bottom||(i.top<n.top&&i.height<=n.height||i.bottom>n.bottom&&i.height>=n.height?e.scrollTop-=n.top-i.top:(i.top<n.top&&i.height>n.height||i.bottom>n.bottom&&i.height<n.height)&&(e.scrollTop-=n.bottom-i.bottom))}}(ElementExt||(ElementExt={})),function(e){e.IS_MAC=!!navigator.platform.match(/Mac/i),e.IS_WIN=!!navigator.platform.match(/Win/i),e.IS_IE=/Trident/.test(navigator.userAgent),e.IS_EDGE=/Edge/.test(navigator.userAgent),e.accelKey=function(t){return e.IS_MAC?t.metaKey:t.ctrlKey}}(Platform||(Platform={})),function(e){e.calculateSpecificity=function(e){if(e in Private.specificityCache)return Private.specificityCache[e];let t=Private.calculateSingle(e);return Private.specificityCache[e]=t},e.isValid=function(e){if(e in Private.validityCache)return Private.validityCache[e];let t=!0;try{Private.testElem.querySelector(e)}catch(e){t=!1}return Private.validityCache[e]=t},e.matches=function(e,t){return Private.protoMatchFunc.call(e,t)}}(Selector||(Selector={})),function(e){e.specificityCache=Object.create(null),e.validityCache=Object.create(null),e.testElem=document.createElement("div"),e.protoMatchFunc=(()=>{let e=Element.prototype;return e.matches||e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector||function(e){let t=this,n=t.ownerDocument?t.ownerDocument.querySelectorAll(e):[];return-1!==Array.prototype.indexOf.call(n,t)}})(),e.calculateSingle=function(e){let c=0,d=0,u=0;function h(t){let n=e.match(t);return null!==n&&(e=e.slice(n[0].length),!0)}for(e=(e=e.split(",",1)[0]).replace(l," $1 ");e.length>0;)if(h(t))c++;else if(h(n))d++;else if(h(i))d++;else if(h(r))u++;else if(h(o))d++;else if(h(s))u++;else if(!h(a))return 0;return c=Math.min(c,255),d=Math.min(d,255),u=Math.min(u,255),c<<16|d<<8|u};const t=/^#[^\s\+>~#\.\[:]+/,n=/^\.[^\s\+>~#\.\[:]+/,i=/^\[[^\]]+\]/,s=/^[^\s\+>~#\.\[:]+/,r=/^(::[^\s\+>~#\.\[:]+|:first-line|:first-letter|:before|:after)/,o=/^:[^\s\+>~#\.\[:]+/,a=/^[\s\+>~\*]+/,l=/:not\(([^\)]+)\)/g}(Private||(Private={}));class LinkedList{constructor(){this._first=null,this._last=null,this._size=0}get isEmpty(){return 0===this._size}get size(){return this._size}get length(){return this._size}get first(){return this._first?this._first.value:void 0}get last(){return this._last?this._last.value:void 0}get firstNode(){return this._first}get lastNode(){return this._last}*[Symbol.iterator](){let e=this._first;for(;e;)yield e.value,e=e.next}*retro(){let e=this._last;for(;e;)yield e.value,e=e.prev}*nodes(){let e=this._first;for(;e;)yield e,e=e.next}*retroNodes(){let e=this._last;for(;e;)yield e,e=e.prev}assign(e){this.clear();for(const t of e)this.addLast(t)}push(e){this.addLast(e)}pop(){return this.removeLast()}shift(e){this.addFirst(e)}unshift(){return this.removeFirst()}addFirst(e){let t=new index_es6_Private.LinkedListNode(this,e);return this._first?(t.next=this._first,this._first.prev=t,this._first=t):(this._first=t,this._last=t),this._size++,t}addLast(e){let t=new index_es6_Private.LinkedListNode(this,e);return this._last?(t.prev=this._last,this._last.next=t,this._last=t):(this._first=t,this._last=t),this._size++,t}insertBefore(e,t){if(!t||t===this._first)return this.addFirst(e);if(!(t instanceof index_es6_Private.LinkedListNode)||t.list!==this)throw new Error("Reference node is not owned by the list.");let n=new index_es6_Private.LinkedListNode(this,e),i=t,s=i.prev;return n.next=i,n.prev=s,i.prev=n,s.next=n,this._size++,n}insertAfter(e,t){if(!t||t===this._last)return this.addLast(e);if(!(t instanceof index_es6_Private.LinkedListNode)||t.list!==this)throw new Error("Reference node is not owned by the list.");let n=new index_es6_Private.LinkedListNode(this,e),i=t,s=i.next;return n.next=s,n.prev=i,i.next=n,s.prev=n,this._size++,n}removeFirst(){let e=this._first;if(e)return e===this._last?(this._first=null,this._last=null):(this._first=e.next,this._first.prev=null),e.list=null,e.next=null,e.prev=null,this._size--,e.value}removeLast(){let e=this._last;if(e)return e===this._first?(this._first=null,this._last=null):(this._last=e.prev,this._last.next=null),e.list=null,e.next=null,e.prev=null,this._size--,e.value}removeNode(e){if(!(e instanceof index_es6_Private.LinkedListNode)||e.list!==this)throw new Error("Node is not owned by the list.");let t=e;t===this._first&&t===this._last?(this._first=null,this._last=null):t===this._first?(this._first=t.next,this._first.prev=null):t===this._last?(this._last=t.prev,this._last.next=null):(t.next.prev=t.prev,t.prev.next=t.next),t.list=null,t.next=null,t.prev=null,this._size--}clear(){let e=this._first;for(;e;){let t=e.next;e.list=null,e.prev=null,e.next=null,e=t}this._first=null,this._last=null,this._size=0}}!function(e){e.from=function(t){let n=new e;return n.assign(t),n}}(LinkedList||(LinkedList={})),(index_es6_Private||(index_es6_Private={})).LinkedListNode=class{constructor(e,t){this.list=null,this.next=null,this.prev=null,this.list=e,this.value=t}};class Message{constructor(e){this.type=e}get isConflatable(){return!1}conflate(e){return!1}}class ConflatableMessage extends Message{get isConflatable(){return!0}conflate(e){return!0}}!function(e){let t=null;const n=(i=Promise.resolve(),e=>{let t=!1;return i.then(()=>!t&&e()),()=>{t=!0}});var i;function s(e,t){let n=o.get(e);if(!n||0===n.length)return void d(e,t);let i=(0,index_es6.every)((0,index_es6.retro)(n),n=>!n||function(e,t,n){let i=!0;try{i="function"==typeof e?e(t,n):e.messageHook(t,n)}catch(e){l(e)}return i}(n,e,t));i&&d(e,t)}e.sendMessage=s,e.postMessage=function(e,t){t.isConflatable&&(0,index_es6.some)(r,n=>n.handler===e&&!!n.msg&&n.msg.type===t.type&&!!n.msg.isConflatable&&n.msg.conflate(t))||u(e,t)},e.installMessageHook=function(e,t){let n=o.get(e);n&&-1!==n.indexOf(t)||(n?n.push(t):o.set(e,[t]))},e.removeMessageHook=function(e,t){let n=o.get(e);if(!n)return;let i=n.indexOf(t);-1!==i&&(n[i]=null,p(n))},e.clearData=function(e){let t=o.get(e);t&&t.length>0&&(index_es6.ArrayExt.fill(t,null),p(t));for(const t of r)t.handler===e&&(t.handler=null,t.msg=null)},e.flush=function(){c||null===t||(t(),t=null,c=!0,h(),c=!1)},e.getExceptionHandler=function(){return l},e.setExceptionHandler=function(e){let t=l;return l=e,t};const r=new LinkedList,o=new WeakMap,a=new Set;let l=e=>{console.error(e)},c=!1;function d(e,t){try{e.processMessage(t)}catch(e){l(e)}}function u(e,i){r.addLast({handler:e,msg:i}),null===t&&(t=n(h))}function h(){if(t=null,r.isEmpty)return;let e={handler:null,msg:null};for(r.addLast(e);;){let t=r.removeFirst();if(t===e)return;t.handler&&t.msg&&s(t.handler,t.msg)}}function p(e){0===a.size&&n(m),a.add(e)}function m(){a.forEach(f),a.clear()}function f(e){index_es6.ArrayExt.removeAllWhere(e,g)}function g(e){return null===e}}(MessageLoop||(MessageLoop={}));var dist_index_es6=__webpack_require__(1628),signaling_dist_index_es6=__webpack_require__(6903),disposable_dist_index_es6=__webpack_require__(785),dist_index_es6_Private;class Drag{constructor(e){this._onScrollFrame=()=>{if(!this._scrollTarget)return;let{element:e,edge:t,distance:n}=this._scrollTarget,i=dist_index_es6_Private.SCROLL_EDGE_SIZE-n,s=Math.pow(i/dist_index_es6_Private.SCROLL_EDGE_SIZE,2),r=Math.max(1,Math.round(s*dist_index_es6_Private.SCROLL_EDGE_SIZE));switch(t){case"top":e.scrollTop-=r;break;case"left":e.scrollLeft-=r;break;case"right":e.scrollLeft+=r;break;case"bottom":e.scrollTop+=r}requestAnimationFrame(this._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=e.document||document,this.mimeData=e.mimeData,this.dragImage=e.dragImage||null,this.proposedAction=e.proposedAction||"copy",this.supportedActions=e.supportedActions||"all",this.source=e.source||null}dispose(){if(!this._disposed){if(this._disposed=!0,this._currentTarget){let e=new PointerEvent("pointerup",{bubbles:!0,cancelable:!0,clientX:-1,clientY:-1});dist_index_es6_Private.dispatchDragLeave(this,this._currentTarget,null,e)}this._finalize("none")}}get isDisposed(){return this._disposed}start(e,t){if(this._disposed)return Promise.resolve("none");if(this._promise)return this._promise;this._addListeners(),this._attachDragImage(e,t),this._promise=new Promise(e=>{this._resolve=e});let n=new PointerEvent("pointermove",{bubbles:!0,cancelable:!0,clientX:e,clientY:t});return document.dispatchEvent(n),this._promise}handleEvent(e){switch(e.type){case"pointermove":this._evtPointerMove(e);break;case"pointerup":this._evtPointerUp(e);break;case"keydown":this._evtKeyDown(e);break;default:e.preventDefault(),e.stopPropagation()}}moveDragImage(e,t){this.dragImage&&(this.dragImage.style.transform=`translate(${e}px, ${t}px)`)}_evtPointerMove(e){e.preventDefault(),e.stopPropagation(),this._updateCurrentTarget(e),this._updateDragScroll(e),this.moveDragImage(e.clientX,e.clientY)}_evtPointerUp(e){if(e.preventDefault(),e.stopPropagation(),0!==e.button)return;if(this._updateCurrentTarget(e),!this._currentTarget)return void this._finalize("none");if("none"===this._dropAction)return dist_index_es6_Private.dispatchDragLeave(this,this._currentTarget,null,e),void this._finalize("none");let t=dist_index_es6_Private.dispatchDrop(this,this._currentTarget,e);this._finalize(t)}_evtKeyDown(e){e.preventDefault(),e.stopPropagation(),27===e.keyCode&&this.dispose()}_addListeners(){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)}_removeListeners(){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)}_updateDragScroll(e){let t=dist_index_es6_Private.findScrollTarget(e);(this._scrollTarget||t)&&(this._scrollTarget||setTimeout(this._onScrollFrame,500),this._scrollTarget=t)}_updateCurrentTarget(e){let t=this._currentTarget,n=this._currentTarget,i=this._currentElement,s=dist_index_es6_Private.findElementBehindBackdrop(e,this.document);this._currentElement=s,s!==i&&s!==n&&dist_index_es6_Private.dispatchDragExit(this,n,s,e),s!==i&&s!==n&&(n=dist_index_es6_Private.dispatchDragEnter(this,s,n,e)),n!==t&&(this._currentTarget=n,dist_index_es6_Private.dispatchDragLeave(this,t,n,e));let r=dist_index_es6_Private.dispatchDragOver(this,n,e);this._setDropAction(r)}_attachDragImage(e,t){if(!this.dragImage)return;this.dragImage.classList.add("lm-mod-drag-image");let n=this.dragImage.style;n.pointerEvents="none",n.position="fixed",n.transform=`translate(${e}px, ${t}px)`,(this.document instanceof Document?this.document.body:this.document.firstElementChild).appendChild(this.dragImage)}_detachDragImage(){if(!this.dragImage)return;let e=this.dragImage.parentNode;e&&e.removeChild(this.dragImage)}_setDropAction(e){if(e=dist_index_es6_Private.validateAction(e,this.supportedActions),!this._override||this._dropAction!==e)switch(e){case"none":this._dropAction=e,this._override=Drag.overrideCursor("no-drop",this.document);break;case"copy":this._dropAction=e,this._override=Drag.overrideCursor("copy",this.document);break;case"link":this._dropAction=e,this._override=Drag.overrideCursor("alias",this.document);break;case"move":this._dropAction=e,this._override=Drag.overrideCursor("move",this.document)}}_finalize(e){let t=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,t&&t(e)}}function getKeyboardLayout(){return keyboard_dist_index_es6_Private.keyboardLayout}function setKeyboardLayout(e){keyboard_dist_index_es6_Private.keyboardLayout=e}!function(e){class t extends DragEvent{constructor(e,t){super(t.type,{bubbles:!0,cancelable:!0,altKey:e.altKey,button:e.button,clientX:e.clientX,clientY:e.clientY,ctrlKey:e.ctrlKey,detail:0,metaKey:e.metaKey,relatedTarget:t.related,screenX:e.screenX,screenY:e.screenY,shiftKey:e.shiftKey,view:window});const{drag:n}=t;this.dropAction="none",this.mimeData=n.mimeData,this.proposedAction=n.proposedAction,this.supportedActions=n.supportedActions,this.source=n.source}}e.Event=t,e.overrideCursor=function(e,t=document){return dist_index_es6_Private.overrideCursor(e,t)}}(Drag||(Drag={})),function(e){function t(t,s=document){if(t){if(n&&t==n.event)return n.element;e.cursorBackdrop.style.zIndex="-1000";const i=s.elementFromPoint(t.clientX,t.clientY);return e.cursorBackdrop.style.zIndex="",n={event:t,element:i},i}{const t=e.cursorBackdrop.style.transform;if(i&&t===i.transform)return i.element;const n=e.cursorBackdrop.getBoundingClientRect();e.cursorBackdrop.style.zIndex="-1000";const r=s.elementFromPoint(n.left+n.width/2,n.top+n.height/2);return e.cursorBackdrop.style.zIndex="",i={transform:t,element:r},r}}e.SCROLL_EDGE_SIZE=20,e.validateAction=function(e,t){return s[e]&r[t]?e:"none"},e.findElementBehindBackdrop=t;let n=null,i=null;e.findScrollTarget=function(n){let i=n.clientX,s=n.clientY,r=t(n);for(;r;r=r.parentElement){if(!r.hasAttribute("data-lm-dragscroll"))continue;let t=0,n=0;r===document.body&&(t=window.pageXOffset,n=window.pageYOffset);let o=r.getBoundingClientRect(),a=o.top+n,l=o.left+t,c=l+o.width,d=a+o.height;if(i<l||i>=c||s<a||s>=d)continue;let u,h=i-l+1,p=s-a+1,m=c-i,f=d-s,g=Math.min(h,p,m,f);if(g>e.SCROLL_EDGE_SIZE)continue;switch(g){case f:u="bottom";break;case p:u="top";break;case m:u="right";break;case h:u="left";break;default:throw"unreachable"}let v,_=r.scrollWidth-r.clientWidth,b=r.scrollHeight-r.clientHeight;switch(u){case"top":v=b>0&&r.scrollTop>0;break;case"left":v=_>0&&r.scrollLeft>0;break;case"right":v=_>0&&r.scrollLeft<_;break;case"bottom":v=b>0&&r.scrollTop<b;break;default:throw"unreachable"}if(v)return{element:r,edge:u,distance:g}}return null},e.dispatchDragEnter=function(e,t,n,i){if(!t)return null;let s=new Drag.Event(i,{drag:e,related:n,type:"lm-dragenter"});if(!t.dispatchEvent(s))return t;const r=e.document instanceof Document?e.document.body:e.document.firstElementChild;return t===r?n:(s=new Drag.Event(i,{drag:e,related:n,type:"lm-dragenter"}),r.dispatchEvent(s),r)},e.dispatchDragExit=function(e,t,n,i){if(!t)return;let s=new Drag.Event(i,{drag:e,related:n,type:"lm-dragexit"});t.dispatchEvent(s)},e.dispatchDragLeave=function(e,t,n,i){if(!t)return;let s=new Drag.Event(i,{drag:e,related:n,type:"lm-dragleave"});t.dispatchEvent(s)},e.dispatchDragOver=function(e,t,n){if(!t)return"none";let i=new Drag.Event(n,{drag:e,related:null,type:"lm-dragover"});return t.dispatchEvent(i)?"none":i.dropAction},e.dispatchDrop=function(e,t,n){if(!t)return"none";let i=new Drag.Event(n,{drag:e,related:null,type:"lm-drop"});return t.dispatchEvent(i)?"none":i.dropAction};const s={none:0,copy:1,link:2,move:4},r={none:s.none,copy:s.copy,link:s.link,move:s.move,"copy-link":s.copy|s.link,"copy-move":s.copy|s.move,"link-move":s.link|s.move,all:s.copy|s.link|s.move};function o(t){e.cursorBackdrop&&(e.cursorBackdrop.style.transform=`translate(${t.clientX}px, ${t.clientY}px)`)}function a(n){if(!e.cursorBackdrop)return;let i=t();if(!i)return;const s=i.closest("[data-lm-dragscroll]");s&&(s.scrollTop+=e.cursorBackdrop.scrollTop-c,s.scrollLeft+=e.cursorBackdrop.scrollLeft-c,l())}function l(){e.cursorBackdrop.scrollTop=c,e.cursorBackdrop.scrollLeft=c}e.overrideCursor=function(t,n=document){let i=++d;const s=n instanceof Document?n.body:n.firstElementChild;return e.cursorBackdrop.isConnected||(e.cursorBackdrop.style.transform="scale(0)",s.appendChild(e.cursorBackdrop),l(),document.addEventListener("pointermove",o,{capture:!0,passive:!0}),e.cursorBackdrop.addEventListener("scroll",a,{capture:!0,passive:!0})),e.cursorBackdrop.style.cursor=t,new disposable_dist_index_es6.DisposableDelegate(()=>{i===d&&e.cursorBackdrop.isConnected&&(document.removeEventListener("pointermove",o,!0),e.cursorBackdrop.removeEventListener("scroll",a,!0),s.removeChild(e.cursorBackdrop))})};const c=500;let d=0;e.cursorBackdrop=function(){const e=document.createElement("div");return e.classList.add("lm-cursor-backdrop"),e}()}(dist_index_es6_Private||(dist_index_es6_Private={}));class KeycodeLayout{constructor(e,t,n=[]){this.name=e,this._codes=t,this._keys=KeycodeLayout.extractKeys(t),this._modifierKeys=KeycodeLayout.convertToKeySet(n)}keys(){return Object.keys(this._keys)}isValidKey(e){return e in this._keys}isModifierKey(e){return e in this._modifierKeys}keyForKeydownEvent(e){return this._codes[e.keyCode]||""}}!function(e){e.extractKeys=function(e){let t=Object.create(null);for(let n in e)t[e[n]]=!0;return t},e.convertToKeySet=function(e){let t=Object(null);for(let n=0,i=e.length;n<i;++n)t[e[n]]=!0;return t}}(KeycodeLayout||(KeycodeLayout={}));const EN_US=new KeycodeLayout("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"]);var keyboard_dist_index_es6_Private,commands_dist_index_es6_Private,VirtualDOM,virtualdom_dist_index_es6_Private,BoxEngine,Private$j,Private$i,Utils;(keyboard_dist_index_es6_Private||(keyboard_dist_index_es6_Private={})).keyboardLayout=EN_US;class CommandRegistry{constructor(){this._timerID=0,this._timerModifierID=0,this._replaying=!1,this._keystrokes=[],this._keydownEvents=[],this._keyBindings=[],this._exactKeyMatch=null,this._commands=new Map,this._commandChanged=new signaling_dist_index_es6.Signal(this),this._commandExecuted=new signaling_dist_index_es6.Signal(this),this._keyBindingChanged=new signaling_dist_index_es6.Signal(this),this._holdKeyBindingPromises=new Map}get commandChanged(){return this._commandChanged}get commandExecuted(){return this._commandExecuted}get keyBindingChanged(){return this._keyBindingChanged}get keyBindings(){return this._keyBindings}listCommands(){return Array.from(this._commands.keys())}hasCommand(e){return this._commands.has(e)}addCommand(e,t){if(this._commands.has(e))throw new Error(`Command '${e}' already registered.`);return this._commands.set(e,commands_dist_index_es6_Private.createCommand(t)),this._commandChanged.emit({id:e,type:"added"}),new disposable_dist_index_es6.DisposableDelegate(()=>{this._commands.delete(e),this._commandChanged.emit({id:e,type:"removed"})})}notifyCommandChanged(e){if(void 0!==e&&!this._commands.has(e))throw new Error(`Command '${e}' is not registered.`);this._commandChanged.emit({id:e,type:e?"changed":"many-changed"})}describedBy(e,t=dist.JSONExt.emptyObject){var n;let i=this._commands.get(e);return Promise.resolve(null!==(n=null==i?void 0:i.describedBy.call(void 0,t))&&void 0!==n?n:{args:null})}label(e,t=dist.JSONExt.emptyObject){var n;let i=this._commands.get(e);return null!==(n=null==i?void 0:i.label.call(void 0,t))&&void 0!==n?n:""}mnemonic(e,t=dist.JSONExt.emptyObject){let n=this._commands.get(e);return n?n.mnemonic.call(void 0,t):-1}icon(e,t=dist.JSONExt.emptyObject){var n;return null===(n=this._commands.get(e))||void 0===n?void 0:n.icon.call(void 0,t)}iconClass(e,t=dist.JSONExt.emptyObject){let n=this._commands.get(e);return n?n.iconClass.call(void 0,t):""}iconLabel(e,t=dist.JSONExt.emptyObject){let n=this._commands.get(e);return n?n.iconLabel.call(void 0,t):""}caption(e,t=dist.JSONExt.emptyObject){let n=this._commands.get(e);return n?n.caption.call(void 0,t):""}usage(e,t=dist.JSONExt.emptyObject){let n=this._commands.get(e);return n?n.usage.call(void 0,t):""}className(e,t=dist.JSONExt.emptyObject){let n=this._commands.get(e);return n?n.className.call(void 0,t):""}dataset(e,t=dist.JSONExt.emptyObject){let n=this._commands.get(e);return n?n.dataset.call(void 0,t):{}}isEnabled(e,t=dist.JSONExt.emptyObject){let n=this._commands.get(e);return!!n&&n.isEnabled.call(void 0,t)}isToggled(e,t=dist.JSONExt.emptyObject){let n=this._commands.get(e);return!!n&&n.isToggled.call(void 0,t)}isToggleable(e,t=dist.JSONExt.emptyObject){let n=this._commands.get(e);return!!n&&n.isToggleable}isVisible(e,t=dist.JSONExt.emptyObject){let n=this._commands.get(e);return!!n&&n.isVisible.call(void 0,t)}execute(e,t=dist.JSONExt.emptyObject){let n,i=this._commands.get(e);if(!i)return Promise.reject(new Error(`Command '${e}' not registered.`));try{n=i.execute.call(void 0,t)}catch(e){n=Promise.reject(e)}let s=Promise.resolve(n);return this._commandExecuted.emit({id:e,args:t,result:s}),s}addKeyBinding(e){let t=commands_dist_index_es6_Private.createKeyBinding(e);return this._keyBindings.push(t),this._keyBindingChanged.emit({binding:t,type:"added"}),new disposable_dist_index_es6.DisposableDelegate(()=>{index_es6.ArrayExt.removeFirstOf(this._keyBindings,t),this._keyBindingChanged.emit({binding:t,type:"removed"})})}processKeydownEvent(e){if(e.defaultPrevented||this._replaying)return;const t=CommandRegistry.keystrokeForKeydownEvent(e);if(!t)return this._replayKeydownEvents(),void this._clearPendingState();if(CommandRegistry.isModifierKeyPressed(e)){let{exact:n}=commands_dist_index_es6_Private.matchKeyBinding(this._keyBindings,[t],e);return void(n?(e.preventDefault(),e.stopPropagation(),this._startModifierTimer(n)):this._clearModifierTimer())}this._keystrokes.push(t);const{exact:n,partial:i}=commands_dist_index_es6_Private.matchKeyBinding(this._keyBindings,this._keystrokes,e),s=0!==i.length;return n||s?(((null==n?void 0:n.preventDefault)||i.some(e=>e.preventDefault))&&(e.preventDefault(),e.stopPropagation()),this._keydownEvents.push(e),n&&!s?(this._executeKeyBinding(n),void this._clearPendingState()):(n&&(this._exactKeyMatch=n),void this._startTimer())):(this._replayKeydownEvents(),void this._clearPendingState())}holdKeyBindingExecution(e,t){this._holdKeyBindingPromises.set(e,t)}processKeyupEvent(e){this._clearModifierTimer()}_startModifierTimer(e){this._clearModifierTimer(),this._timerModifierID=window.setTimeout(()=>{this._executeKeyBinding(e)},commands_dist_index_es6_Private.modifierkeyTimeOut)}_clearModifierTimer(){0!==this._timerModifierID&&(clearTimeout(this._timerModifierID),this._timerModifierID=0)}_startTimer(){this._clearTimer(),this._timerID=window.setTimeout(()=>{this._onPendingTimeout()},commands_dist_index_es6_Private.CHORD_TIMEOUT)}_clearTimer(){0!==this._timerID&&(clearTimeout(this._timerID),this._timerID=0)}_replayKeydownEvents(){0!==this._keydownEvents.length&&(this._replaying=!0,this._keydownEvents.forEach(commands_dist_index_es6_Private.replayKeyEvent),this._replaying=!1)}async _executeKeyBinding(e){if(0!==this._holdKeyBindingPromises.size){const e=[...this._keydownEvents],t=(await Promise.race([Promise.all(e.map(async e=>{var t;return null!==(t=this._holdKeyBindingPromises.get(e))&&void 0!==t?t:Promise.resolve(!0)})),new Promise(e=>{setTimeout(()=>e([!1]),commands_dist_index_es6_Private.KEYBINDING_HOLD_TIMEOUT)})])).every(Boolean);if(this._holdKeyBindingPromises.clear(),!t)return}let{command:t,args:n}=e,i={_luminoEvent:{type:"keybinding",keys:e.keys},...n};if(!this.hasCommand(t)||!this.isEnabled(t,i)){let n=this.hasCommand(t)?"enabled":"registered",i=`Cannot execute key binding '${e.keys.join(", ")}':`,s=`command '${t}' is not ${n}.`;return void console.warn(`${i} ${s}`)}await this.execute(t,i)}_clearPendingState(){this._clearTimer(),this._clearModifierTimer(),this._exactKeyMatch=null,this._keystrokes.length=0,this._keydownEvents.length=0}_onPendingTimeout(){this._timerID=0,this._exactKeyMatch?this._executeKeyBinding(this._exactKeyMatch):this._replayKeydownEvents(),this._clearPendingState()}}!function(e){function t(e){let t="",n=!1,i=!1,s=!1,r=!1;for(let o of e.split(/\s+/))"Accel"===o?Platform.IS_MAC?i=!0:s=!0:"Alt"===o?n=!0:"Cmd"===o?i=!0:"Ctrl"===o?s=!0:"Shift"===o?r=!0:o.length>0&&(t=o);return{cmd:i,ctrl:s,alt:n,shift:r,key:t}}function n(e){let n="",i=t(e);return i.ctrl&&(n+="Ctrl "),i.alt&&(n+="Alt "),i.shift&&(n+="Shift "),i.cmd&&Platform.IS_MAC&&(n+="Cmd "),i.key?n+i.key:n.trim()}e.parseKeystroke=t,e.normalizeKeystroke=n,e.normalizeKeys=function(e){let t;return t=Platform.IS_WIN?e.winKeys||e.keys:Platform.IS_MAC?e.macKeys||e.keys:e.linuxKeys||e.keys,t.map(n)},e.formatKeystroke=function(e){return"string"==typeof e?n(e):e.map(n).join(", ");function n(e){let n=[],i=Platform.IS_MAC?" ":"+",s=t(e);return s.ctrl&&n.push("Ctrl"),s.alt&&n.push("Alt"),s.shift&&n.push("Shift"),Platform.IS_MAC&&s.cmd&&n.push("Cmd"),n.push(s.key),n.map(commands_dist_index_es6_Private.formatKey).join(i)}},e.isModifierKeyPressed=function(e){let t=getKeyboardLayout(),n=t.keyForKeydownEvent(e);return t.isModifierKey(n)},e.keystrokeForKeydownEvent=function(e){let t=getKeyboardLayout(),n=t.keyForKeydownEvent(e),i=[];return e.ctrlKey&&i.push("Ctrl"),e.altKey&&i.push("Alt"),e.shiftKey&&i.push("Shift"),e.metaKey&&Platform.IS_MAC&&i.push("Cmd"),t.isModifierKey(n)||i.push(n),i.join(" ")}}(CommandRegistry||(CommandRegistry={})),function(e){e.CHORD_TIMEOUT=1e3,e.KEYBINDING_HOLD_TIMEOUT=1e3,e.modifierkeyTimeOut=500,e.createCommand=function(e){return{execute:e.execute,describedBy:c("function"==typeof e.describedBy?e.describedBy:{args:null,...e.describedBy},()=>({args:null})),label:c(e.label,i),mnemonic:c(e.mnemonic,s),icon:c(e.icon,l),iconClass:c(e.iconClass,i),iconLabel:c(e.iconLabel,i),caption:c(e.caption,i),usage:c(e.usage,i),className:c(e.className,i),dataset:c(e.dataset,a),isEnabled:e.isEnabled||r,isToggled:e.isToggled||o,isToggleable:e.isToggleable||!!e.isToggled,isVisible:e.isVisible||r}},e.createKeyBinding=function(e){var t;return{keys:CommandRegistry.normalizeKeys(e),selector:d(e),command:e.command,args:e.args||dist.JSONExt.emptyObject,preventDefault:null===(t=e.preventDefault)||void 0===t||t}},e.matchKeyBinding=function(e,t,n){let i=null,s=[],r=1/0,o=0;for(let a=0,l=e.length;a<l;++a){let l=e[a],c=u(l.keys,t);if(0===c)continue;if(2===c){-1!==h(l.selector,n)&&s.push(l);continue}let d=h(l.selector,n);if(-1===d||d>r)continue;let p=Selector.calculateSpecificity(l.selector);(!i||d<r||p>=o)&&(i=l,r=d,o=p)}return{exact:i,partial:s}},e.replayKeyEvent=function(e){e.target.dispatchEvent(function(e){let t=document.createEvent("Event"),n=e.bubbles||!0,i=e.cancelable||!0;return t.initEvent(e.type||"keydown",n,i),t.key=e.key||"",t.keyCode=e.keyCode||0,t.which=e.keyCode||0,t.ctrlKey=e.ctrlKey||!1,t.altKey=e.altKey||!1,t.shiftKey=e.shiftKey||!1,t.metaKey=e.metaKey||!1,t.view=e.view||window,t}(e))},e.formatKey=function(e){return Platform.IS_MAC?t.hasOwnProperty(e)?t[e]:e:n.hasOwnProperty(e)?n[e]:e};const t={Backspace:"⌫",Tab:"⇥",Enter:"⏎",Shift:"⇧",Ctrl:"⌃",Alt:"⌥",Escape:"⎋",PageUp:"⇞",PageDown:"⇟",End:"↘",Home:"↖",ArrowLeft:"←",ArrowUp:"↑",ArrowRight:"→",ArrowDown:"↓",Delete:"⌦",Cmd:"⌘"},n={Escape:"Esc",PageUp:"Page Up",PageDown:"Page Down",ArrowLeft:"Left",ArrowUp:"Up",ArrowRight:"Right",ArrowDown:"Down",Delete:"Del"},i=()=>"",s=()=>-1,r=()=>!0,o=()=>!1,a=()=>({}),l=()=>{};function c(e,t){return void 0===e?t:"function"==typeof e?e:()=>e}function d(e){if(-1!==e.selector.indexOf(","))throw new Error(`Selector cannot contain commas: ${e.selector}`);if(!Selector.isValid(e.selector))throw new Error(`Invalid selector: ${e.selector}`);return e.selector}function u(e,t){if(e.length<t.length)return 0;for(let n=0,i=t.length;n<i;++n)if(e[n]!==t[n])return 0;return e.length>t.length?2:1}function h(e,t){let n=t.target,i=t.currentTarget;for(let t=0;null!==n;n=n.parentElement,++t){if(n.hasAttribute("data-lm-suppress-shortcuts"))return-1;if(Selector.matches(n,e))return t;if(n===i)return-1}return-1}}(commands_dist_index_es6_Private||(commands_dist_index_es6_Private={}));class VirtualText{constructor(e){this.type="text",this.content=e}}class VirtualElement{constructor(e,t,n,i){this.type="element",this.tag=e,this.attrs=t,this.children=n,this.renderer=i}}class VirtualElementPass extends VirtualElement{constructor(e,t,n){super(e,t,[],n||void 0)}}function h(e){let t,n={},i=[];for(let e=1,r=arguments.length;e<r;++e){let r=arguments[e];"string"==typeof r?i.push(new VirtualText(r)):r instanceof VirtualText||r instanceof VirtualElement?i.push(r):r instanceof Array?s(i,r):1!==e&&2!==e||!r||"object"!=typeof r||("render"in r?t=r:n=r)}return new VirtualElement(e,n,i,t);function s(e,t){for(let n of t)"string"==typeof n?e.push(new VirtualText(n)):(n instanceof VirtualText||n instanceof VirtualElement)&&e.push(n)}}function hpass(e){let t={},n=null;if(2===arguments.length){const e=arguments[1];"render"in e?n=e:t=e}else if(3===arguments.length)t=arguments[1],n=arguments[2];else if(arguments.length>3)throw new Error("hpass() should be called with 1, 2, or 3 arguments");return new VirtualElementPass(e,t,n)}!function(e){e.a=e.bind(void 0,"a"),e.abbr=e.bind(void 0,"abbr"),e.address=e.bind(void 0,"address"),e.area=e.bind(void 0,"area"),e.article=e.bind(void 0,"article"),e.aside=e.bind(void 0,"aside"),e.audio=e.bind(void 0,"audio"),e.b=e.bind(void 0,"b"),e.bdi=e.bind(void 0,"bdi"),e.bdo=e.bind(void 0,"bdo"),e.blockquote=e.bind(void 0,"blockquote"),e.br=e.bind(void 0,"br"),e.button=e.bind(void 0,"button"),e.canvas=e.bind(void 0,"canvas"),e.caption=e.bind(void 0,"caption"),e.cite=e.bind(void 0,"cite"),e.code=e.bind(void 0,"code"),e.col=e.bind(void 0,"col"),e.colgroup=e.bind(void 0,"colgroup"),e.data=e.bind(void 0,"data"),e.datalist=e.bind(void 0,"datalist"),e.dd=e.bind(void 0,"dd"),e.del=e.bind(void 0,"del"),e.dfn=e.bind(void 0,"dfn"),e.div=e.bind(void 0,"div"),e.dl=e.bind(void 0,"dl"),e.dt=e.bind(void 0,"dt"),e.em=e.bind(void 0,"em"),e.embed=e.bind(void 0,"embed"),e.fieldset=e.bind(void 0,"fieldset"),e.figcaption=e.bind(void 0,"figcaption"),e.figure=e.bind(void 0,"figure"),e.footer=e.bind(void 0,"footer"),e.form=e.bind(void 0,"form"),e.h1=e.bind(void 0,"h1"),e.h2=e.bind(void 0,"h2"),e.h3=e.bind(void 0,"h3"),e.h4=e.bind(void 0,"h4"),e.h5=e.bind(void 0,"h5"),e.h6=e.bind(void 0,"h6"),e.header=e.bind(void 0,"header"),e.hr=e.bind(void 0,"hr"),e.i=e.bind(void 0,"i"),e.iframe=e.bind(void 0,"iframe"),e.img=e.bind(void 0,"img"),e.input=e.bind(void 0,"input"),e.ins=e.bind(void 0,"ins"),e.kbd=e.bind(void 0,"kbd"),e.label=e.bind(void 0,"label"),e.legend=e.bind(void 0,"legend"),e.li=e.bind(void 0,"li"),e.main=e.bind(void 0,"main"),e.map=e.bind(void 0,"map"),e.mark=e.bind(void 0,"mark"),e.meter=e.bind(void 0,"meter"),e.nav=e.bind(void 0,"nav"),e.noscript=e.bind(void 0,"noscript"),e.object=e.bind(void 0,"object"),e.ol=e.bind(void 0,"ol"),e.optgroup=e.bind(void 0,"optgroup"),e.option=e.bind(void 0,"option"),e.output=e.bind(void 0,"output"),e.p=e.bind(void 0,"p"),e.param=e.bind(void 0,"param"),e.pre=e.bind(void 0,"pre"),e.progress=e.bind(void 0,"progress"),e.q=e.bind(void 0,"q"),e.rp=e.bind(void 0,"rp"),e.rt=e.bind(void 0,"rt"),e.ruby=e.bind(void 0,"ruby"),e.s=e.bind(void 0,"s"),e.samp=e.bind(void 0,"samp"),e.section=e.bind(void 0,"section"),e.select=e.bind(void 0,"select"),e.small=e.bind(void 0,"small"),e.source=e.bind(void 0,"source"),e.span=e.bind(void 0,"span"),e.strong=e.bind(void 0,"strong"),e.sub=e.bind(void 0,"sub"),e.summary=e.bind(void 0,"summary"),e.sup=e.bind(void 0,"sup"),e.table=e.bind(void 0,"table"),e.tbody=e.bind(void 0,"tbody"),e.td=e.bind(void 0,"td"),e.textarea=e.bind(void 0,"textarea"),e.tfoot=e.bind(void 0,"tfoot"),e.th=e.bind(void 0,"th"),e.thead=e.bind(void 0,"thead"),e.time=e.bind(void 0,"time"),e.title=e.bind(void 0,"title"),e.tr=e.bind(void 0,"tr"),e.track=e.bind(void 0,"track"),e.u=e.bind(void 0,"u"),e.ul=e.bind(void 0,"ul"),e.var_=e.bind(void 0,"var"),e.video=e.bind(void 0,"video"),e.wbr=e.bind(void 0,"wbr")}(h||(h={})),function(e){e.realize=function(e){return virtualdom_dist_index_es6_Private.createDOMNode(e)},e.render=function(e,t){let n=virtualdom_dist_index_es6_Private.hostMap.get(t)||[],i=virtualdom_dist_index_es6_Private.asContentArray(e);virtualdom_dist_index_es6_Private.hostMap.set(t,i),virtualdom_dist_index_es6_Private.updateContent(t,n,i)}}(VirtualDOM||(VirtualDOM={})),function(e){function t(e){let n=arguments[1]||null;const s=arguments[2]||null;if(n)n.insertBefore(t(e),s);else{if("text"===e.type)return document.createTextNode(e.content);if(n=document.createElement(e.tag),function(e,t){for(let n in t)n in i||("on"===n.substr(0,2)?e[n]=t[n]:e.setAttribute(n,t[n]));void 0!==t.className&&e.setAttribute("class",t.className),void 0!==t.htmlFor&&e.setAttribute("for",t.htmlFor),t.dataset&&function(e,t){for(let n in t)e.setAttribute(`data-${n}`,t[n])}(e,t.dataset),t.style&&function(e,t){let n,i=e.style;for(n in t)i[n]=t[n]}(e,t.style)}(n,e.attrs),e.renderer)return e.renderer.render(n,{attrs:e.attrs,children:e.children}),n;for(let i=0,s=e.children.length;i<s;++i)t(e.children[i],n)}return n}function n(e,t,i,s){for(let r=t.length-1;r>=i;--r){const i=t[r],o=s?e.lastChild:e.childNodes[r];"text"===i.type||(i.renderer&&i.renderer.unrender?i.renderer.unrender(o,{attrs:i.attrs,children:i.children}):n(o,i.children,0,!1)),s&&e.removeChild(o)}}e.hostMap=new WeakMap,e.asContentArray=function(e){return e?e instanceof Array?e:[e]:[]},e.createDOMNode=t,e.updateContent=function e(i,r,o){if(r===o)return;let a=function(e,t){let n=e.firstChild,i=Object.create(null);for(let e of t)"element"===e.type&&e.attrs.key&&(i[e.attrs.key]={vNode:e,element:n}),n=n.nextSibling;return i}(i,r),l=r.slice(),c=i.firstChild,d=o.length;for(let n=0;n<d;++n){if(n>=l.length){t(o[n],i);continue}let r=l[n],d=o[n];if(r===d){c=c.nextSibling;continue}if("text"===r.type&&"text"===d.type){c.textContent!==d.content&&(c.textContent=d.content),c=c.nextSibling;continue}if("text"===r.type||"text"===d.type){index_es6.ArrayExt.insert(l,n,d),t(d,i,c);continue}if(!r.renderer!=!d.renderer){index_es6.ArrayExt.insert(l,n,d),t(d,i,c);continue}let u=d.attrs.key;if(u&&u in a){let e=a[u];e.vNode!==r&&(index_es6.ArrayExt.move(l,l.indexOf(e.vNode,n+1),n),i.insertBefore(e.element,c),r=e.vNode,c=e.element)}if(r===d){c=c.nextSibling;continue}let h=r.attrs.key;h&&h!==u?(index_es6.ArrayExt.insert(l,n,d),t(d,i,c)):r.tag===d.tag?(s(c,r.attrs,d.attrs),d.renderer?d.renderer.render(c,{attrs:d.attrs,children:d.children}):e(c,r.children,d.children),c=c.nextSibling):(index_es6.ArrayExt.insert(l,n,d),t(d,i,c))}n(i,l,d,!0)};const i={key:!0,className:!0,htmlFor:!0,dataset:!0,style:!0};function s(e,t,n){if(t===n)return;let s;for(s in t)s in i||s in n||("on"===s.substr(0,2)?e[s]=null:e.removeAttribute(s));for(s in n)s in i||t[s]===n[s]||("on"===s.substr(0,2)?e[s]=n[s]:e.setAttribute(s,n[s]));t.className!==n.className&&(void 0!==n.className?e.setAttribute("class",n.className):e.removeAttribute("class")),t.htmlFor!==n.htmlFor&&(void 0!==n.htmlFor?e.setAttribute("for",n.htmlFor):e.removeAttribute("for")),t.dataset!==n.dataset&&function(e,t,n){for(let i in t)i in n||e.removeAttribute(`data-${i}`);for(let i in n)t[i]!==n[i]&&e.setAttribute(`data-${i}`,n[i])}(e,t.dataset||{},n.dataset||{}),t.style!==n.style&&function(e,t,n){let i,s=e.style;for(i in t)i in n||(s[i]="");for(i in n)t[i]!==n[i]&&(s[i]=n[i])}(e,t.style||{},n.style||{})}}(virtualdom_dist_index_es6_Private||(virtualdom_dist_index_es6_Private={}));class BoxSizer{constructor(){this.sizeHint=0,this.minSize=0,this.maxSize=1/0,this.stretch=1,this.size=0,this.done=!1}}!function(e){e.calc=function(e,t){let n=e.length;if(0===n)return t;let i=0,s=0,r=0,o=0,a=0;for(let t=0;t<n;++t){let n=e[t],l=n.minSize,c=n.maxSize,d=n.sizeHint;n.done=!1,n.size=Math.max(l,Math.min(d,c)),r+=n.size,i+=l,s+=c,n.stretch>0&&(o+=n.stretch,a++)}if(t===r)return 0;if(t<=i){for(let t=0;t<n;++t){let n=e[t];n.size=n.minSize}return t-i}if(t>=s){for(let t=0;t<n;++t){let n=e[t];n.size=n.maxSize}return t-s}let l=.01,c=n;if(t<r){let i=r-t;for(;a>0&&i>l;){let t=i,s=o;for(let r=0;r<n;++r){let n=e[r];if(n.done||0===n.stretch)continue;let l=n.stretch*t/s;n.size-l<=n.minSize?(i-=n.size-n.minSize,o-=n.stretch,n.size=n.minSize,n.done=!0,c--,a--):(i-=l,n.size-=l)}}for(;c>0&&i>l;){let t=i/c;for(let s=0;s<n;++s){let n=e[s];n.done||(n.size-t<=n.minSize?(i-=n.size-n.minSize,n.size=n.minSize,n.done=!0,c--):(i-=t,n.size-=t))}}}else{let i=t-r;for(;a>0&&i>l;){let t=i,s=o;for(let r=0;r<n;++r){let n=e[r];if(n.done||0===n.stretch)continue;let l=n.stretch*t/s;n.size+l>=n.maxSize?(i-=n.maxSize-n.size,o-=n.stretch,n.size=n.maxSize,n.done=!0,c--,a--):(i-=l,n.size+=l)}}for(;c>0&&i>l;){let t=i/c;for(let s=0;s<n;++s){let n=e[s];n.done||(n.size+t>=n.maxSize?(i-=n.maxSize-n.size,n.size=n.maxSize,n.done=!0,c--):(i-=t,n.size+=t))}}}return 0},e.adjust=function(e,t,n){0!==e.length&&0!==n&&(n>0?function(e,t,n){let i=0;for(let n=0;n<=t;++n){let t=e[n];i+=t.maxSize-t.size}let s=0;for(let n=t+1,i=e.length;n<i;++n){let t=e[n];s+=t.size-t.minSize}let r=n=Math.min(n,i,s);for(let n=t;n>=0&&r>0;--n){let t=e[n],i=t.maxSize-t.size;i>=r?(t.sizeHint=t.size+r,r=0):(t.sizeHint=t.size+i,r-=i)}let o=n;for(let n=t+1,i=e.length;n<i&&o>0;++n){let t=e[n],i=t.size-t.minSize;i>=o?(t.sizeHint=t.size-o,o=0):(t.sizeHint=t.size-i,o-=i)}}(e,t,n):function(e,t,n){let i=0;for(let n=t+1,s=e.length;n<s;++n){let t=e[n];i+=t.maxSize-t.size}let s=0;for(let n=0;n<=t;++n){let t=e[n];s+=t.size-t.minSize}let r=n=Math.min(n,i,s);for(let n=t+1,i=e.length;n<i&&r>0;++n){let t=e[n],i=t.maxSize-t.size;i>=r?(t.sizeHint=t.size+r,r=0):(t.sizeHint=t.size+i,r-=i)}let o=n;for(let n=t;n>=0&&o>0;--n){let t=e[n],i=t.size-t.minSize;i>=o?(t.sizeHint=t.size-o,o=0):(t.sizeHint=t.size-i,o-=i)}}(e,t,-n))}}(BoxEngine||(BoxEngine={}));class Title{constructor(e){this._label="",this._caption="",this._mnemonic=-1,this._icon=void 0,this._iconClass="",this._iconLabel="",this._className="",this._closable=!1,this._changed=new signaling_dist_index_es6.Signal(this),this._isDisposed=!1,this.owner=e.owner,void 0!==e.label&&(this._label=e.label),void 0!==e.mnemonic&&(this._mnemonic=e.mnemonic),void 0!==e.icon&&(this._icon=e.icon),void 0!==e.iconClass&&(this._iconClass=e.iconClass),void 0!==e.iconLabel&&(this._iconLabel=e.iconLabel),void 0!==e.caption&&(this._caption=e.caption),void 0!==e.className&&(this._className=e.className),void 0!==e.closable&&(this._closable=e.closable),this._dataset=e.dataset||{}}get changed(){return this._changed}get label(){return this._label}set label(e){this._label!==e&&(this._label=e,this._changed.emit(void 0))}get mnemonic(){return this._mnemonic}set mnemonic(e){this._mnemonic!==e&&(this._mnemonic=e,this._changed.emit(void 0))}get icon(){return this._icon}set icon(e){this._icon!==e&&(this._icon=e,this._changed.emit(void 0))}get iconClass(){return this._iconClass}set iconClass(e){this._iconClass!==e&&(this._iconClass=e,this._changed.emit(void 0))}get iconLabel(){return this._iconLabel}set iconLabel(e){this._iconLabel!==e&&(this._iconLabel=e,this._changed.emit(void 0))}get caption(){return this._caption}set caption(e){this._caption!==e&&(this._caption=e,this._changed.emit(void 0))}get className(){return this._className}set className(e){this._className!==e&&(this._className=e,this._changed.emit(void 0))}get closable(){return this._closable}set closable(e){this._closable!==e&&(this._closable=e,this._changed.emit(void 0))}get dataset(){return this._dataset}set dataset(e){this._dataset!==e&&(this._dataset=e,this._changed.emit(void 0))}get isDisposed(){return this._isDisposed}dispose(){this.isDisposed||(this._isDisposed=!0,signaling_dist_index_es6.Signal.clearData(this))}}class Widget{constructor(e={}){this._flags=0,this._layout=null,this._parent=null,this._disposed=new signaling_dist_index_es6.Signal(this),this._hiddenMode=Widget.HiddenMode.Display,this.node=Private$j.createNode(e),this.addClass("lm-Widget")}dispose(){this.isDisposed||(this.setFlag(Widget.Flag.IsDisposed),this._disposed.emit(void 0),this.parent?this.parent=null:this.isAttached&&Widget.detach(this),this._layout&&(this._layout.dispose(),this._layout=null),this.title.dispose(),signaling_dist_index_es6.Signal.clearData(this),MessageLoop.clearData(this),dist_index_es6.AttachedProperty.clearData(this))}get disposed(){return this._disposed}get isDisposed(){return this.testFlag(Widget.Flag.IsDisposed)}get isAttached(){return this.testFlag(Widget.Flag.IsAttached)}get isHidden(){return this.testFlag(Widget.Flag.IsHidden)}get isVisible(){let e=this;do{if(e.isHidden||!e.isAttached)return!1;e=e.parent}while(null!=e);return!0}get title(){return Private$j.titleProperty.get(this)}get id(){return this.node.id}set id(e){this.node.id=e}get dataset(){return this.node.dataset}get hiddenMode(){return this._hiddenMode}set hiddenMode(e){this._hiddenMode!==e&&(this.isHidden&&this._toggleHidden(!1),e==Widget.HiddenMode.Scale?this.node.style.willChange="transform":this.node.style.willChange="auto",this._hiddenMode=e,this.isHidden&&this._toggleHidden(!0))}get parent(){return this._parent}set parent(e){if(this._parent!==e){if(e&&this.contains(e))throw new Error("Invalid parent widget.");if(this._parent&&!this._parent.isDisposed){let e=new Widget.ChildMessage("child-removed",this);MessageLoop.sendMessage(this._parent,e)}if(this._parent=e,this._parent&&!this._parent.isDisposed){let e=new Widget.ChildMessage("child-added",this);MessageLoop.sendMessage(this._parent,e)}this.isDisposed||MessageLoop.sendMessage(this,Widget.Msg.ParentChanged)}}get layout(){return this._layout}set layout(e){if(this._layout!==e){if(this.testFlag(Widget.Flag.DisallowLayout))throw new Error("Cannot set widget layout.");if(this._layout)throw new Error("Cannot change widget layout.");if(e.parent)throw new Error("Cannot change layout parent.");this._layout=e,e.parent=this}}*children(){this._layout&&(yield*this._layout)}contains(e){for(let t=e;t;t=t._parent)if(t===this)return!0;return!1}hasClass(e){return this.node.classList.contains(e)}addClass(e){this.node.classList.add(e)}removeClass(e){this.node.classList.remove(e)}toggleClass(e,t){return!0===t?(this.node.classList.add(e),!0):!1===t?(this.node.classList.remove(e),!1):this.node.classList.toggle(e)}update(){MessageLoop.postMessage(this,Widget.Msg.UpdateRequest)}fit(){MessageLoop.postMessage(this,Widget.Msg.FitRequest)}activate(){MessageLoop.postMessage(this,Widget.Msg.ActivateRequest)}close(){MessageLoop.sendMessage(this,Widget.Msg.CloseRequest)}show(){if(this.testFlag(Widget.Flag.IsHidden)&&(!this.isAttached||this.parent&&!this.parent.isVisible||MessageLoop.sendMessage(this,Widget.Msg.BeforeShow),this.clearFlag(Widget.Flag.IsHidden),this._toggleHidden(!1),!this.isAttached||this.parent&&!this.parent.isVisible||MessageLoop.sendMessage(this,Widget.Msg.AfterShow),this.parent)){let e=new Widget.ChildMessage("child-shown",this);MessageLoop.sendMessage(this.parent,e)}}hide(){if(!this.testFlag(Widget.Flag.IsHidden)&&(!this.isAttached||this.parent&&!this.parent.isVisible||MessageLoop.sendMessage(this,Widget.Msg.BeforeHide),this.setFlag(Widget.Flag.IsHidden),this._toggleHidden(!0),!this.isAttached||this.parent&&!this.parent.isVisible||MessageLoop.sendMessage(this,Widget.Msg.AfterHide),this.parent)){let e=new Widget.ChildMessage("child-hidden",this);MessageLoop.sendMessage(this.parent,e)}}setHidden(e){e?this.hide():this.show()}testFlag(e){return 0!==(this._flags&e)}setFlag(e){this._flags|=e}clearFlag(e){this._flags&=~e}processMessage(e){switch(e.type){case"resize":this.notifyLayout(e),this.onResize(e);break;case"update-request":this.notifyLayout(e),this.onUpdateRequest(e);break;case"fit-request":this.notifyLayout(e),this.onFitRequest(e);break;case"before-show":this.notifyLayout(e),this.onBeforeShow(e);break;case"after-show":this.setFlag(Widget.Flag.IsVisible),this.notifyLayout(e),this.onAfterShow(e);break;case"before-hide":this.notifyLayout(e),this.onBeforeHide(e);break;case"after-hide":this.clearFlag(Widget.Flag.IsVisible),this.notifyLayout(e),this.onAfterHide(e);break;case"before-attach":this.notifyLayout(e),this.onBeforeAttach(e);break;case"after-attach":this.isHidden||this.parent&&!this.parent.isVisible||this.setFlag(Widget.Flag.IsVisible),this.setFlag(Widget.Flag.IsAttached),this.notifyLayout(e),this.onAfterAttach(e);break;case"before-detach":this.notifyLayout(e),this.onBeforeDetach(e);break;case"after-detach":this.clearFlag(Widget.Flag.IsVisible),this.clearFlag(Widget.Flag.IsAttached),this.notifyLayout(e),this.onAfterDetach(e);break;case"activate-request":this.notifyLayout(e),this.onActivateRequest(e);break;case"close-request":this.notifyLayout(e),this.onCloseRequest(e);break;case"child-added":this.notifyLayout(e),this.onChildAdded(e);break;case"child-removed":this.notifyLayout(e),this.onChildRemoved(e);break;default:this.notifyLayout(e)}}notifyLayout(e){this._layout&&this._layout.processParentMessage(e)}onCloseRequest(e){this.parent?this.parent=null:this.isAttached&&Widget.detach(this)}onResize(e){}onUpdateRequest(e){}onFitRequest(e){}onActivateRequest(e){}onBeforeShow(e){}onAfterShow(e){}onBeforeHide(e){}onAfterHide(e){}onBeforeAttach(e){}onAfterAttach(e){}onBeforeDetach(e){}onAfterDetach(e){}onChildAdded(e){}onChildRemoved(e){}_toggleHidden(e){if(e)switch(this._hiddenMode){case Widget.HiddenMode.Display:this.addClass("lm-mod-hidden");break;case Widget.HiddenMode.Scale:this.node.style.transform="scale(0)",this.node.setAttribute("aria-hidden","true");break;case Widget.HiddenMode.ContentVisibility:this.node.style.contentVisibility="hidden",this.node.style.zIndex="-1"}else switch(this._hiddenMode){case Widget.HiddenMode.Display:this.removeClass("lm-mod-hidden");break;case Widget.HiddenMode.Scale:this.node.style.transform="",this.node.removeAttribute("aria-hidden");break;case Widget.HiddenMode.ContentVisibility:this.node.style.contentVisibility="",this.node.style.zIndex=""}}}!function(e){var t,n,i;(t=e.HiddenMode||(e.HiddenMode={}))[t.Display=0]="Display",t[t.Scale=1]="Scale",t[t.ContentVisibility=2]="ContentVisibility",(n=e.Flag||(e.Flag={}))[n.IsDisposed=1]="IsDisposed",n[n.IsAttached=2]="IsAttached",n[n.IsHidden=4]="IsHidden",n[n.IsVisible=8]="IsVisible",n[n.DisallowLayout=16]="DisallowLayout",(i=e.Msg||(e.Msg={})).BeforeShow=new Message("before-show"),i.AfterShow=new Message("after-show"),i.BeforeHide=new Message("before-hide"),i.AfterHide=new Message("after-hide"),i.BeforeAttach=new Message("before-attach"),i.AfterAttach=new Message("after-attach"),i.BeforeDetach=new Message("before-detach"),i.AfterDetach=new Message("after-detach"),i.ParentChanged=new Message("parent-changed"),i.UpdateRequest=new ConflatableMessage("update-request"),i.FitRequest=new ConflatableMessage("fit-request"),i.ActivateRequest=new ConflatableMessage("activate-request"),i.CloseRequest=new ConflatableMessage("close-request"),e.ChildMessage=class extends Message{constructor(e,t){super(e),this.child=t}};class s extends Message{constructor(e,t){super("resize"),this.width=e,this.height=t}}e.ResizeMessage=s,function(e){e.UnknownSize=new e(-1,-1)}(s=e.ResizeMessage||(e.ResizeMessage={})),e.attach=function(t,n,i=null){if(t.parent)throw new Error("Cannot attach a child widget.");if(t.isAttached||t.node.isConnected)throw new Error("Widget is already attached.");if(!n.isConnected)throw new Error("Host is not attached.");MessageLoop.sendMessage(t,e.Msg.BeforeAttach),n.insertBefore(t.node,i),MessageLoop.sendMessage(t,e.Msg.AfterAttach)},e.detach=function(t){if(t.parent)throw new Error("Cannot detach a child widget.");if(!t.isAttached||!t.node.isConnected)throw new Error("Widget is not attached.");MessageLoop.sendMessage(t,e.Msg.BeforeDetach),t.node.parentNode.removeChild(t.node),MessageLoop.sendMessage(t,e.Msg.AfterDetach)}}(Widget||(Widget={})),function(e){e.titleProperty=new dist_index_es6.AttachedProperty({name:"title",create:e=>new Title({owner:e})}),e.createNode=function(e){return e.node||document.createElement(e.tag||"div")}}(Private$j||(Private$j={}));class Layout{constructor(e={}){this._disposed=!1,this._parent=null,this._fitPolicy=e.fitPolicy||"set-min-size"}dispose(){this._parent=null,this._disposed=!0,signaling_dist_index_es6.Signal.clearData(this),dist_index_es6.AttachedProperty.clearData(this)}get isDisposed(){return this._disposed}get parent(){return this._parent}set parent(e){if(this._parent!==e){if(this._parent)throw new Error("Cannot change parent widget.");if(e.layout!==this)throw new Error("Invalid parent widget.");this._parent=e,this.init()}}get fitPolicy(){return this._fitPolicy}set fitPolicy(e){if(this._fitPolicy!==e&&(this._fitPolicy=e,this._parent)){let e=this._parent.node.style;e.minWidth="",e.minHeight="",e.maxWidth="",e.maxHeight="",this._parent.fit()}}processParentMessage(e){switch(e.type){case"resize":this.onResize(e);break;case"update-request":this.onUpdateRequest(e);break;case"fit-request":this.onFitRequest(e);break;case"before-show":this.onBeforeShow(e);break;case"after-show":this.onAfterShow(e);break;case"before-hide":this.onBeforeHide(e);break;case"after-hide":this.onAfterHide(e);break;case"before-attach":this.onBeforeAttach(e);break;case"after-attach":this.onAfterAttach(e);break;case"before-detach":this.onBeforeDetach(e);break;case"after-detach":this.onAfterDetach(e);break;case"child-removed":this.onChildRemoved(e);break;case"child-shown":this.onChildShown(e);break;case"child-hidden":this.onChildHidden(e)}}init(){for(const e of this)e.parent=this.parent}onResize(e){for(const e of this)MessageLoop.sendMessage(e,Widget.ResizeMessage.UnknownSize)}onUpdateRequest(e){for(const e of this)MessageLoop.sendMessage(e,Widget.ResizeMessage.UnknownSize)}onBeforeAttach(e){for(const t of this)MessageLoop.sendMessage(t,e)}onAfterAttach(e){for(const t of this)MessageLoop.sendMessage(t,e)}onBeforeDetach(e){for(const t of this)MessageLoop.sendMessage(t,e)}onAfterDetach(e){for(const t of this)MessageLoop.sendMessage(t,e)}onBeforeShow(e){for(const t of this)t.isHidden||MessageLoop.sendMessage(t,e)}onAfterShow(e){for(const t of this)t.isHidden||MessageLoop.sendMessage(t,e)}onBeforeHide(e){for(const t of this)t.isHidden||MessageLoop.sendMessage(t,e)}onAfterHide(e){for(const t of this)t.isHidden||MessageLoop.sendMessage(t,e)}onChildRemoved(e){this.removeWidget(e.child)}onFitRequest(e){}onChildShown(e){}onChildHidden(e){}}!function(e){e.getHorizontalAlignment=function(e){return Private$i.horizontalAlignmentProperty.get(e)},e.setHorizontalAlignment=function(e,t){Private$i.horizontalAlignmentProperty.set(e,t)},e.getVerticalAlignment=function(e){return Private$i.verticalAlignmentProperty.get(e)},e.setVerticalAlignment=function(e,t){Private$i.verticalAlignmentProperty.set(e,t)}}(Layout||(Layout={}));class LayoutItem{constructor(e){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=e,this.widget.node.style.position="absolute",this.widget.node.style.contain="strict"}dispose(){if(this._disposed)return;this._disposed=!0;let e=this.widget.node.style;e.position="",e.top="",e.left="",e.width="",e.height="",e.contain=""}get minWidth(){return this._minWidth}get minHeight(){return this._minHeight}get maxWidth(){return this._maxWidth}get maxHeight(){return this._maxHeight}get isDisposed(){return this._disposed}get isHidden(){return this.widget.isHidden}get isVisible(){return this.widget.isVisible}get isAttached(){return this.widget.isAttached}fit(){let e=ElementExt.sizeLimits(this.widget.node);this._minWidth=e.minWidth,this._minHeight=e.minHeight,this._maxWidth=e.maxWidth,this._maxHeight=e.maxHeight}update(e,t,n,i){let s=Math.max(this._minWidth,Math.min(n,this._maxWidth)),r=Math.max(this._minHeight,Math.min(i,this._maxHeight));if(s<n)switch(Layout.getHorizontalAlignment(this.widget)){case"left":break;case"center":e+=(n-s)/2;break;case"right":e+=n-s;break;default:throw"unreachable"}if(r<i)switch(Layout.getVerticalAlignment(this.widget)){case"top":break;case"center":t+=(i-r)/2;break;case"bottom":t+=i-r;break;default:throw"unreachable"}let o=!1,a=this.widget.node.style;if(this._top!==t&&(this._top=t,a.top=`${t}px`),this._left!==e&&(this._left=e,a.left=`${e}px`),this._width!==s&&(o=!0,this._width=s,a.width=`${s}px`),this._height!==r&&(o=!0,this._height=r,a.height=`${r}px`),o){let e=new Widget.ResizeMessage(s,r);MessageLoop.sendMessage(this.widget,e)}}}!function(e){function t(e){e.parent&&e.parent.layout&&e.parent.update()}e.horizontalAlignmentProperty=new dist_index_es6.AttachedProperty({name:"horizontalAlignment",create:()=>"center",changed:t}),e.verticalAlignmentProperty=new dist_index_es6.AttachedProperty({name:"verticalAlignment",create:()=>"top",changed:t})}(Private$i||(Private$i={}));class PanelLayout extends Layout{constructor(){super(...arguments),this._widgets=[]}dispose(){for(;this._widgets.length>0;)this._widgets.pop().dispose();super.dispose()}get widgets(){return this._widgets}*[Symbol.iterator](){yield*this._widgets}addWidget(e){this.insertWidget(this._widgets.length,e)}insertWidget(e,t){t.parent=this.parent;let n=this._widgets.indexOf(t),i=Math.max(0,Math.min(e,this._widgets.length));if(-1===n)return index_es6.ArrayExt.insert(this._widgets,i,t),void(this.parent&&this.attachWidget(i,t));i===this._widgets.length&&i--,n!==i&&(index_es6.ArrayExt.move(this._widgets,n,i),this.parent&&this.moveWidget(n,i,t))}removeWidget(e){this.removeWidgetAt(this._widgets.indexOf(e))}removeWidgetAt(e){let t=index_es6.ArrayExt.removeAt(this._widgets,e);t&&this.parent&&this.detachWidget(e,t)}init(){super.init();let e=0;for(const t of this)this.attachWidget(e++,t)}attachWidget(e,t){let n=this.parent.node.children[e];this.parent.isAttached&&MessageLoop.sendMessage(t,Widget.Msg.BeforeAttach),this.parent.node.insertBefore(t.node,n),this.parent.isAttached&&MessageLoop.sendMessage(t,Widget.Msg.AfterAttach)}moveWidget(e,t,n){this.parent.isAttached&&MessageLoop.sendMessage(n,Widget.Msg.BeforeDetach),this.parent.node.removeChild(n.node),this.parent.isAttached&&MessageLoop.sendMessage(n,Widget.Msg.AfterDetach);let i=this.parent.node.children[t];this.parent.isAttached&&MessageLoop.sendMessage(n,Widget.Msg.BeforeAttach),this.parent.node.insertBefore(n.node,i),this.parent.isAttached&&MessageLoop.sendMessage(n,Widget.Msg.AfterAttach)}detachWidget(e,t){this.parent.isAttached&&MessageLoop.sendMessage(t,Widget.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.isAttached&&MessageLoop.sendMessage(t,Widget.Msg.AfterDetach)}}!function(e){e.clampDimension=function(e){return Math.max(0,Math.floor(e))}}(Utils||(Utils={}));var Utils$1=Utils,Private$h,Private$g,Private$f,Private$e,Private$d,Private$c,Private$b,Private$a,Private$9,Private$8;class SplitLayout extends PanelLayout{constructor(e){super(),this.widgetOffset=0,this._fixed=0,this._spacing=4,this._dirty=!1,this._hasNormedSizes=!1,this._sizers=[],this._items=[],this._handles=[],this._box=null,this._alignment="start",this._orientation="horizontal",this.renderer=e.renderer,void 0!==e.orientation&&(this._orientation=e.orientation),void 0!==e.alignment&&(this._alignment=e.alignment),void 0!==e.spacing&&(this._spacing=Utils.clampDimension(e.spacing))}dispose(){for(const e of this._items)e.dispose();this._box=null,this._items.length=0,this._sizers.length=0,this._handles.length=0,super.dispose()}get orientation(){return this._orientation}set orientation(e){this._orientation!==e&&(this._orientation=e,this.parent&&(this.parent.dataset.orientation=e,this.parent.fit()))}get alignment(){return this._alignment}set alignment(e){this._alignment!==e&&(this._alignment=e,this.parent&&(this.parent.dataset.alignment=e,this.parent.update()))}get spacing(){return this._spacing}set spacing(e){e=Utils.clampDimension(e),this._spacing!==e&&(this._spacing=e,this.parent&&this.parent.fit())}get handles(){return this._handles}absoluteSizes(){return this._sizers.map(e=>e.size)}relativeSizes(){return Private$h.normalize(this._sizers.map(e=>e.size))}setRelativeSizes(e,t=!0){let n=this._sizers.length,i=e.slice(0,n);for(;i.length<n;)i.push(0);let s=Private$h.normalize(i);for(let e=0;e<n;++e){let t=this._sizers[e];t.sizeHint=s[e],t.size=s[e]}this._hasNormedSizes=!0,t&&this.parent&&this.parent.update()}moveHandle(e,t){let n,i=this._handles[e];if(i&&!i.classList.contains("lm-mod-hidden")&&(n="horizontal"===this._orientation?t-i.offsetLeft:t-i.offsetTop,0!==n)){for(let e of this._sizers)e.size>0&&(e.sizeHint=e.size);BoxEngine.adjust(this._sizers,e,n),this.parent&&this.parent.update()}}init(){this.parent.dataset.orientation=this.orientation,this.parent.dataset.alignment=this.alignment,super.init()}attachWidget(e,t){let n=new LayoutItem(t),i=Private$h.createHandle(this.renderer),s=Private$h.averageSize(this._sizers),r=Private$h.createSizer(s);index_es6.ArrayExt.insert(this._items,e,n),index_es6.ArrayExt.insert(this._sizers,e,r),index_es6.ArrayExt.insert(this._handles,e,i),this.parent.isAttached&&MessageLoop.sendMessage(t,Widget.Msg.BeforeAttach),this.parent.node.appendChild(t.node),this.parent.node.appendChild(i),this.parent.isAttached&&MessageLoop.sendMessage(t,Widget.Msg.AfterAttach),this.parent.fit()}moveWidget(e,t,n){index_es6.ArrayExt.move(this._items,e,t),index_es6.ArrayExt.move(this._sizers,e,t),index_es6.ArrayExt.move(this._handles,e,t),this.parent.fit()}detachWidget(e,t){let n=index_es6.ArrayExt.removeAt(this._items,e),i=index_es6.ArrayExt.removeAt(this._handles,e);index_es6.ArrayExt.removeAt(this._sizers,e),this.parent.isAttached&&MessageLoop.sendMessage(t,Widget.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.node.removeChild(i),this.parent.isAttached&&MessageLoop.sendMessage(t,Widget.Msg.AfterDetach),n.dispose(),this.parent.fit()}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}updateItemPosition(e,t,n,i,s,r,o){const a=this._items[e];if(a.isHidden)return;let l=this._handles[e].style;t?(n+=this.widgetOffset,a.update(n,i,o,s),n+=o,l.top=`${i}px`,l.left=`${n}px`,l.width=`${this._spacing}px`,l.height=`${s}px`):(i+=this.widgetOffset,a.update(n,i,r,o),i+=o,l.top=`${i}px`,l.left=`${n}px`,l.width=`${r}px`,l.height=`${this._spacing}px`)}_fit(){let e=0,t=-1;for(let n=0,i=this._items.length;n<i;++n)this._items[n].isHidden?this._handles[n].classList.add("lm-mod-hidden"):(this._handles[n].classList.remove("lm-mod-hidden"),t=n,e++);-1!==t&&this._handles[t].classList.add("lm-mod-hidden"),this._fixed=this._spacing*Math.max(0,e-1)+this.widgetOffset*this._items.length;let n="horizontal"===this._orientation,i=n?this._fixed:0,s=n?0:this._fixed;for(let e=0,t=this._items.length;e<t;++e){let t=this._items[e],r=this._sizers[e];r.size>0&&(r.sizeHint=r.size),t.isHidden?(r.minSize=0,r.maxSize=0):(t.fit(),r.stretch=SplitLayout.getStretch(t.widget),n?(r.minSize=t.minWidth,r.maxSize=t.maxWidth,i+=t.minWidth,s=Math.max(s,t.minHeight)):(r.minSize=t.minHeight,r.maxSize=t.maxHeight,s+=t.minHeight,i=Math.max(i,t.minWidth)))}let r=this._box=ElementExt.boxSizing(this.parent.node);i+=r.horizontalSum,s+=r.verticalSum;let o=this.parent.node.style;o.minWidth=`${i}px`,o.minHeight=`${s}px`,this._dirty=!0,this.parent.parent&&MessageLoop.sendMessage(this.parent.parent,Widget.Msg.FitRequest),this._dirty&&MessageLoop.sendMessage(this.parent,Widget.Msg.UpdateRequest)}_update(e,t){this._dirty=!1;let n=0;for(let e=0,t=this._items.length;e<t;++e)n+=+!this._items[e].isHidden;if(0===n&&0===this.widgetOffset)return;e<0&&(e=this.parent.node.offsetWidth),t<0&&(t=this.parent.node.offsetHeight),this._box||(this._box=ElementExt.boxSizing(this.parent.node));let i=this._box.paddingTop,s=this._box.paddingLeft,r=e-this._box.horizontalSum,o=t-this._box.verticalSum,a=0,l=0,c="horizontal"===this._orientation;if(n>0){let e;if(e=c?Math.max(0,r-this._fixed):Math.max(0,o-this._fixed),this._hasNormedSizes){for(let t of this._sizers)t.sizeHint*=e;this._hasNormedSizes=!1}let t=BoxEngine.calc(this._sizers,e);if(t>0)switch(this._alignment){case"start":break;case"center":a=0,l=t/2;break;case"end":a=0,l=t;break;case"justify":a=t/n,l=0;break;default:throw"unreachable"}}for(let e=0,t=this._items.length;e<t;++e){const t=this._items[e].isHidden?0:this._sizers[e].size+a;this.updateItemPosition(e,c,c?s+l:s,c?i:i+l,o,r,t);const n=this.widgetOffset+(this._handles[e].classList.contains("lm-mod-hidden")?0:this._spacing);c?s+=t+n:i+=t+n}}}!function(e){e.getStretch=function(e){return Private$h.stretchProperty.get(e)},e.setStretch=function(e,t){Private$h.stretchProperty.set(e,t)}}(SplitLayout||(SplitLayout={})),function(e){e.stretchProperty=new dist_index_es6.AttachedProperty({name:"stretch",create:()=>0,coerce:(e,t)=>Math.max(0,Math.floor(t)),changed:function(e){e.parent&&e.parent.layout instanceof SplitLayout&&e.parent.fit()}}),e.createSizer=function(e){let t=new BoxSizer;return t.sizeHint=Math.floor(e),t},e.createHandle=function(e){let t=e.createHandle();return t.style.position="absolute",t.style.contain="style",t},e.averageSize=function(e){return e.reduce((e,t)=>e+t.size,0)/e.length||0},e.normalize=function(e){let t=e.length;if(0===t)return[];let n=e.reduce((e,t)=>e+Math.abs(t),0);return 0===n?e.map(e=>1/t):e.map(e=>e/n)}}(Private$h||(Private$h={}));class AccordionLayout extends SplitLayout{constructor(e){super({...e,orientation:e.orientation||"vertical"}),this._titles=[],this.titleSpace=e.titleSpace||22}get titleSpace(){return this.widgetOffset}set titleSpace(e){e=Utils$1.clampDimension(e),this.widgetOffset!==e&&(this.widgetOffset=e,this.parent&&this.parent.fit())}get titles(){return this._titles}dispose(){this.isDisposed||(this._titles.length=0,super.dispose())}updateTitle(e,t){const n=this._titles[e],i=n.classList.contains("lm-mod-expanded"),s=Private$g.createTitle(this.renderer,t.title,i);this._titles[e]=s,this.parent.node.replaceChild(s,n)}insertWidget(e,t){t.id||(t.id=`id-${dist.UUID.uuid4()}`),super.insertWidget(e,t)}attachWidget(e,t){const n=Private$g.createTitle(this.renderer,t.title);index_es6.ArrayExt.insert(this._titles,e,n),this.parent.node.appendChild(n),t.node.setAttribute("role","region"),t.node.setAttribute("aria-labelledby",n.id),super.attachWidget(e,t)}moveWidget(e,t,n){index_es6.ArrayExt.move(this._titles,e,t),super.moveWidget(e,t,n)}detachWidget(e,t){const n=index_es6.ArrayExt.removeAt(this._titles,e);this.parent.node.removeChild(n),super.detachWidget(e,t)}updateItemPosition(e,t,n,i,s,r,o){const a=this._titles[e].style;a.top=`${i}px`,a.left=`${n}px`,a.height=`${this.widgetOffset}px`,a.width=t?`${s}px`:`${r}px`,super.updateItemPosition(e,t,n,i,s,r,o)}}(Private$g||(Private$g={})).createTitle=function(e,t,n=!0){const i=e.createSectionTitle(t);return i.style.position="absolute",i.style.contain="strict",i.setAttribute("aria-label",`${t.label} Section`),i.setAttribute("aria-expanded",n?"true":"false"),i.setAttribute("aria-controls",t.owner.id),n&&i.classList.add("lm-mod-expanded"),i};class Panel extends Widget{constructor(e={}){super(),this.addClass("lm-Panel"),this.layout=Private$f.createLayout(e)}get widgets(){return this.layout.widgets}addWidget(e){this.layout.addWidget(e)}insertWidget(e,t){this.layout.insertWidget(e,t)}}(Private$f||(Private$f={})).createLayout=function(e){return e.layout||new PanelLayout};class SplitPanel extends Panel{constructor(e={}){super({layout:Private$e.createLayout(e)}),this._handleMoved=new signaling_dist_index_es6.Signal(this),this._pressData=null,this.addClass("lm-SplitPanel")}dispose(){this._releaseMouse(),super.dispose()}get orientation(){return this.layout.orientation}set orientation(e){this.layout.orientation=e}get alignment(){return this.layout.alignment}set alignment(e){this.layout.alignment=e}get spacing(){return this.layout.spacing}set spacing(e){this.layout.spacing=e}get renderer(){return this.layout.renderer}get handleMoved(){return this._handleMoved}get handles(){return this.layout.handles}relativeSizes(){return this.layout.relativeSizes()}setRelativeSizes(e,t=!0){this.layout.setRelativeSizes(e,t)}handleEvent(e){switch(e.type){case"pointerdown":this._evtPointerDown(e);break;case"pointermove":this._evtPointerMove(e);break;case"pointerup":this._evtPointerUp(e);break;case"keydown":this._evtKeyDown(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}}onBeforeAttach(e){this.node.addEventListener("pointerdown",this)}onAfterDetach(e){this.node.removeEventListener("pointerdown",this),this._releaseMouse()}onChildAdded(e){e.child.addClass("lm-SplitPanel-child"),this._releaseMouse()}onChildRemoved(e){e.child.removeClass("lm-SplitPanel-child"),this._releaseMouse()}_evtKeyDown(e){this._pressData&&(e.preventDefault(),e.stopPropagation()),27===e.keyCode&&this._releaseMouse()}_evtPointerDown(e){if(0!==e.button)return;let t,n=this.layout,i=index_es6.ArrayExt.findFirstIndex(n.handles,t=>t.contains(e.target));if(-1===i)return;e.preventDefault(),e.stopPropagation(),document.addEventListener("pointerup",this,!0),document.addEventListener("pointermove",this,!0),document.addEventListener("keydown",this,!0),document.addEventListener("contextmenu",this,!0);let s=n.handles[i],r=s.getBoundingClientRect();t="horizontal"===n.orientation?e.clientX-r.left:e.clientY-r.top;let o=window.getComputedStyle(s),a=Drag.overrideCursor(o.cursor);this._pressData={index:i,delta:t,override:a}}_evtPointerMove(e){let t;e.preventDefault(),e.stopPropagation();let n=this.layout,i=this.node.getBoundingClientRect();t="horizontal"===n.orientation?e.clientX-i.left-this._pressData.delta:e.clientY-i.top-this._pressData.delta,n.moveHandle(this._pressData.index,t)}_evtPointerUp(e){0===e.button&&(e.preventDefault(),e.stopPropagation(),this._releaseMouse())}_releaseMouse(){this._pressData&&(this._pressData.override.dispose(),this._pressData=null,this._handleMoved.emit(),document.removeEventListener("keydown",this,!0),document.removeEventListener("pointerup",this,!0),document.removeEventListener("pointermove",this,!0),document.removeEventListener("contextmenu",this,!0))}}!function(e){class t{createHandle(){let e=document.createElement("div");return e.className="lm-SplitPanel-handle",e}}e.Renderer=t,e.defaultRenderer=new t,e.getStretch=function(e){return SplitLayout.getStretch(e)},e.setStretch=function(e,t){SplitLayout.setStretch(e,t)}}(SplitPanel||(SplitPanel={})),(Private$e||(Private$e={})).createLayout=function(e){return e.layout||new SplitLayout({renderer:e.renderer||SplitPanel.defaultRenderer,orientation:e.orientation,alignment:e.alignment,spacing:e.spacing})};class AccordionPanel extends SplitPanel{constructor(e={}){super({...e,layout:Private$d.createLayout(e)}),this._widgetSizesCache=new WeakMap,this._expansionToggled=new signaling_dist_index_es6.Signal(this),this.addClass("lm-AccordionPanel")}get renderer(){return this.layout.renderer}get titleSpace(){return this.layout.titleSpace}set titleSpace(e){this.layout.titleSpace=e}get titles(){return this.layout.titles}get expansionToggled(){return this._expansionToggled}addWidget(e){super.addWidget(e),e.title.changed.connect(this._onTitleChanged,this)}collapse(e){const t=this.layout.widgets[e];t&&!t.isHidden&&this._toggleExpansion(e)}expand(e){const t=this.layout.widgets[e];t&&t.isHidden&&this._toggleExpansion(e)}insertWidget(e,t){super.insertWidget(e,t),t.title.changed.connect(this._onTitleChanged,this)}handleEvent(e){switch(super.handleEvent(e),e.type){case"click":this._evtClick(e);break;case"keydown":this._eventKeyDown(e)}}onBeforeAttach(e){this.node.addEventListener("click",this),this.node.addEventListener("keydown",this),super.onBeforeAttach(e)}onAfterDetach(e){super.onAfterDetach(e),this.node.removeEventListener("click",this),this.node.removeEventListener("keydown",this)}_onTitleChanged(e){const t=index_es6.ArrayExt.findFirstIndex(this.widgets,t=>t.contains(e.owner));t>=0&&(this.layout.updateTitle(t,e.owner),this.update())}_computeWidgetSize(e){const t=this.layout,n=t.widgets[e];if(!n)return;const i=n.isHidden,s=t.absoluteSizes(),r=(i?-1:1)*this.spacing,o=s.reduce((e,t)=>e+t);let a=[...s];if(i){const t=this._widgetSizesCache.get(n);if(!t)return;a[e]+=t;const i=a.map(e=>e-t>0).lastIndexOf(!0);-1===i?a.forEach((n,i)=>{i!==e&&(a[i]-=s[i]/o*(t-r))}):a[i]-=t-r}else{const t=s[e];this._widgetSizesCache.set(n,t),a[e]=0;const i=a.map(e=>e>0).lastIndexOf(!0);if(-1===i)return;a[i]=s[i]+t+r}return a.map(e=>e/(o+r))}_evtClick(e){const t=e.target;if(t){const n=index_es6.ArrayExt.findFirstIndex(this.titles,e=>e.contains(t));n>=0&&(e.preventDefault(),e.stopPropagation(),this._toggleExpansion(n))}}_eventKeyDown(e){if(e.defaultPrevented)return;const t=e.target;let n=!1;if(t){const i=index_es6.ArrayExt.findFirstIndex(this.titles,e=>e.contains(t));if(i>=0){const s=e.keyCode.toString();if(e.key.match(/Space|Enter/)||s.match(/13|32/))t.click(),n=!0;else if("horizontal"===this.orientation?e.key.match(/ArrowLeft|ArrowRight/)||s.match(/37|39/):e.key.match(/ArrowUp|ArrowDown/)||s.match(/38|40/)){const t=e.key.match(/ArrowLeft|ArrowUp/)||s.match(/37|38/)?-1:1,r=this.titles.length,o=(i+r+t)%r;this.titles[o].focus(),n=!0}else"End"===e.key||"35"===s?(this.titles[this.titles.length-1].focus(),n=!0):"Home"!==e.key&&"36"!==s||(this.titles[0].focus(),n=!0)}n&&e.preventDefault()}}_toggleExpansion(e){const t=this.titles[e],n=this.layout.widgets[e],i=this._computeWidgetSize(e);i&&this.setRelativeSizes(i,!1),n.isHidden?(t.classList.add("lm-mod-expanded"),t.setAttribute("aria-expanded","true"),n.show()):(t.classList.remove("lm-mod-expanded"),t.setAttribute("aria-expanded","false"),n.hide()),this._expansionToggled.emit(e)}}!function(e){class t extends SplitPanel.Renderer{constructor(){super(),this.titleClassName="lm-AccordionPanel-title",this._titleID=0,this._titleKeys=new WeakMap,this._uuid=++t._nInstance}createCollapseIcon(e){return document.createElement("span")}createSectionTitle(e){const t=document.createElement("h3");t.setAttribute("tabindex","0"),t.id=this.createTitleKey(e),t.className=this.titleClassName;for(const n in e.dataset)t.dataset[n]=e.dataset[n];t.appendChild(this.createCollapseIcon(e)).className="lm-AccordionPanel-titleCollapser";const n=t.appendChild(document.createElement("span"));return n.className="lm-AccordionPanel-titleLabel",n.textContent=e.label,n.title=e.caption||e.label,t}createTitleKey(e){let t=this._titleKeys.get(e);return void 0===t&&(t=`title-key-${this._uuid}-${this._titleID++}`,this._titleKeys.set(e,t)),t}}t._nInstance=0,e.Renderer=t,e.defaultRenderer=new t}(AccordionPanel||(AccordionPanel={})),(Private$d||(Private$d={})).createLayout=function(e){return e.layout||new AccordionLayout({renderer:e.renderer||AccordionPanel.defaultRenderer,orientation:e.orientation,alignment:e.alignment,spacing:e.spacing,titleSpace:e.titleSpace})};class BoxLayout extends PanelLayout{constructor(e={}){super(),this._fixed=0,this._spacing=4,this._dirty=!1,this._sizers=[],this._items=[],this._box=null,this._alignment="start",this._direction="top-to-bottom",void 0!==e.direction&&(this._direction=e.direction),void 0!==e.alignment&&(this._alignment=e.alignment),void 0!==e.spacing&&(this._spacing=Utils$1.clampDimension(e.spacing))}dispose(){for(const e of this._items)e.dispose();this._box=null,this._items.length=0,this._sizers.length=0,super.dispose()}get direction(){return this._direction}set direction(e){this._direction!==e&&(this._direction=e,this.parent&&(this.parent.dataset.direction=e,this.parent.fit()))}get alignment(){return this._alignment}set alignment(e){this._alignment!==e&&(this._alignment=e,this.parent&&(this.parent.dataset.alignment=e,this.parent.update()))}get spacing(){return this._spacing}set spacing(e){e=Utils$1.clampDimension(e),this._spacing!==e&&(this._spacing=e,this.parent&&this.parent.fit())}init(){this.parent.dataset.direction=this.direction,this.parent.dataset.alignment=this.alignment,super.init()}attachWidget(e,t){index_es6.ArrayExt.insert(this._items,e,new LayoutItem(t)),index_es6.ArrayExt.insert(this._sizers,e,new BoxSizer),this.parent.isAttached&&MessageLoop.sendMessage(t,Widget.Msg.BeforeAttach),this.parent.node.appendChild(t.node),this.parent.isAttached&&MessageLoop.sendMessage(t,Widget.Msg.AfterAttach),this.parent.fit()}moveWidget(e,t,n){index_es6.ArrayExt.move(this._items,e,t),index_es6.ArrayExt.move(this._sizers,e,t),this.parent.update()}detachWidget(e,t){let n=index_es6.ArrayExt.removeAt(this._items,e);index_es6.ArrayExt.removeAt(this._sizers,e),this.parent.isAttached&&MessageLoop.sendMessage(t,Widget.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.isAttached&&MessageLoop.sendMessage(t,Widget.Msg.AfterDetach),n.dispose(),this.parent.fit()}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}_fit(){let e=0;for(let t=0,n=this._items.length;t<n;++t)e+=+!this._items[t].isHidden;this._fixed=this._spacing*Math.max(0,e-1);let t=Private$c.isHorizontal(this._direction),n=t?this._fixed:0,i=t?0:this._fixed;for(let e=0,s=this._items.length;e<s;++e){let s=this._items[e],r=this._sizers[e];s.isHidden?(r.minSize=0,r.maxSize=0):(s.fit(),r.sizeHint=BoxLayout.getSizeBasis(s.widget),r.stretch=BoxLayout.getStretch(s.widget),t?(r.minSize=s.minWidth,r.maxSize=s.maxWidth,n+=s.minWidth,i=Math.max(i,s.minHeight)):(r.minSize=s.minHeight,r.maxSize=s.maxHeight,i+=s.minHeight,n=Math.max(n,s.minWidth)))}let s=this._box=ElementExt.boxSizing(this.parent.node);n+=s.horizontalSum,i+=s.verticalSum;let r=this.parent.node.style;r.minWidth=`${n}px`,r.minHeight=`${i}px`,this._dirty=!0,this.parent.parent&&MessageLoop.sendMessage(this.parent.parent,Widget.Msg.FitRequest),this._dirty&&MessageLoop.sendMessage(this.parent,Widget.Msg.UpdateRequest)}_update(e,t){this._dirty=!1;let n=0;for(let e=0,t=this._items.length;e<t;++e)n+=+!this._items[e].isHidden;if(0===n)return;e<0&&(e=this.parent.node.offsetWidth),t<0&&(t=this.parent.node.offsetHeight),this._box||(this._box=ElementExt.boxSizing(this.parent.node));let i,s=this._box.paddingTop,r=this._box.paddingLeft,o=e-this._box.horizontalSum,a=t-this._box.verticalSum;switch(this._direction){case"left-to-right":i=BoxEngine.calc(this._sizers,Math.max(0,o-this._fixed));break;case"top-to-bottom":i=BoxEngine.calc(this._sizers,Math.max(0,a-this._fixed));break;case"right-to-left":i=BoxEngine.calc(this._sizers,Math.max(0,o-this._fixed)),r+=o;break;case"bottom-to-top":i=BoxEngine.calc(this._sizers,Math.max(0,a-this._fixed)),s+=a;break;default:throw"unreachable"}let l=0,c=0;if(i>0)switch(this._alignment){case"start":break;case"center":l=0,c=i/2;break;case"end":l=0,c=i;break;case"justify":l=i/n,c=0;break;default:throw"unreachable"}for(let e=0,t=this._items.length;e<t;++e){let t=this._items[e];if(t.isHidden)continue;let n=this._sizers[e].size;switch(this._direction){case"left-to-right":t.update(r+c,s,n+l,a),r+=n+l+this._spacing;break;case"top-to-bottom":t.update(r,s+c,o,n+l),s+=n+l+this._spacing;break;case"right-to-left":t.update(r-c-n-l,s,n+l,a),r-=n+l+this._spacing;break;case"bottom-to-top":t.update(r,s-c-n-l,o,n+l),s-=n+l+this._spacing;break;default:throw"unreachable"}}}}!function(e){e.getStretch=function(e){return Private$c.stretchProperty.get(e)},e.setStretch=function(e,t){Private$c.stretchProperty.set(e,t)},e.getSizeBasis=function(e){return Private$c.sizeBasisProperty.get(e)},e.setSizeBasis=function(e,t){Private$c.sizeBasisProperty.set(e,t)}}(BoxLayout||(BoxLayout={})),function(e){function t(e){e.parent&&e.parent.layout instanceof BoxLayout&&e.parent.fit()}e.stretchProperty=new dist_index_es6.AttachedProperty({name:"stretch",create:()=>0,coerce:(e,t)=>Math.max(0,Math.floor(t)),changed:t}),e.sizeBasisProperty=new dist_index_es6.AttachedProperty({name:"sizeBasis",create:()=>0,coerce:(e,t)=>Math.max(0,Math.floor(t)),changed:t}),e.isHorizontal=function(e){return"left-to-right"===e||"right-to-left"===e},e.clampSpacing=function(e){return Math.max(0,Math.floor(e))}}(Private$c||(Private$c={}));class BoxPanel extends Panel{constructor(e={}){super({layout:Private$b.createLayout(e)}),this.addClass("lm-BoxPanel")}get direction(){return this.layout.direction}set direction(e){this.layout.direction=e}get alignment(){return this.layout.alignment}set alignment(e){this.layout.alignment=e}get spacing(){return this.layout.spacing}set spacing(e){this.layout.spacing=e}onChildAdded(e){e.child.addClass("lm-BoxPanel-child")}onChildRemoved(e){e.child.removeClass("lm-BoxPanel-child")}}!function(e){e.getStretch=function(e){return BoxLayout.getStretch(e)},e.setStretch=function(e,t){BoxLayout.setStretch(e,t)},e.getSizeBasis=function(e){return BoxLayout.getSizeBasis(e)},e.setSizeBasis=function(e,t){BoxLayout.setSizeBasis(e,t)}}(BoxPanel||(BoxPanel={})),(Private$b||(Private$b={})).createLayout=function(e){return e.layout||new BoxLayout(e)};class CommandPalette extends Widget{constructor(e){super({node:Private$a.createNode()}),this._activeIndex=-1,this._items=[],this._results=null,this.addClass("lm-CommandPalette"),this.setFlag(Widget.Flag.DisallowLayout),this.commands=e.commands,this.renderer=e.renderer||CommandPalette.defaultRenderer,this.commands.commandChanged.connect(this._onGenericChange,this),this.commands.keyBindingChanged.connect(this._onGenericChange,this)}dispose(){this._items.length=0,this._results=null,super.dispose()}get searchNode(){return this.node.getElementsByClassName("lm-CommandPalette-search")[0]}get inputNode(){return this.node.getElementsByClassName("lm-CommandPalette-input")[0]}get contentNode(){return this.node.getElementsByClassName("lm-CommandPalette-content")[0]}get items(){return this._items}addItem(e){let t=Private$a.createItem(this.commands,e);return this._items.push(t),this.refresh(),t}addItems(e){const t=e.map(e=>Private$a.createItem(this.commands,e));return t.forEach(e=>this._items.push(e)),this.refresh(),t}removeItem(e){this.removeItemAt(this._items.indexOf(e))}removeItemAt(e){index_es6.ArrayExt.removeAt(this._items,e)&&this.refresh()}clearItems(){0!==this._items.length&&(this._items.length=0,this.refresh())}refresh(){this._results=null,""!==this.inputNode.value?this.node.getElementsByClassName("lm-close-icon")[0].style.display="inherit":this.node.getElementsByClassName("lm-close-icon")[0].style.display="none",this.update()}handleEvent(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()}}onBeforeAttach(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)}onAfterDetach(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)}onAfterShow(e){this.update(),super.onAfterShow(e)}onActivateRequest(e){if(this.isAttached){let e=this.inputNode;e.focus(),e.select()}}onUpdateRequest(e){if(!this.isVisible)return void VirtualDOM.render(null,this.contentNode);let t=this.inputNode.value,n=this.contentNode,i=this._results;if(i||(i=this._results=Private$a.search(this._items,t),this._activeIndex=t?index_es6.ArrayExt.findFirstIndex(i,Private$a.canActivate):-1),!t&&0===i.length)return void VirtualDOM.render(null,n);if(t&&0===i.length){let e=this.renderer.renderEmptyMessage({query:t});return void VirtualDOM.render(e,n)}let s=this.renderer,r=this._activeIndex,o=new Array(i.length);for(let e=0,t=i.length;e<t;++e){let t=i[e];if("header"===t.type){let n=t.indices,i=t.category;o[e]=s.renderHeader({category:i,indices:n})}else{let n=t.item,i=t.indices,a=e===r;o[e]=s.renderItem({item:n,indices:i,active:a})}}if(VirtualDOM.render(o,n),r<0||r>=i.length)n.scrollTop=0;else{let e=n.children[r];ElementExt.scrollIntoViewIfNeeded(n,e)}}_evtClick(e){if(0!==e.button)return;if(e.target.classList.contains("lm-close-icon"))return this.inputNode.value="",void this.refresh();let t=index_es6.ArrayExt.findFirstIndex(this.contentNode.children,t=>t.contains(e.target));-1!==t&&(e.preventDefault(),e.stopPropagation(),this._execute(t))}_evtKeyDown(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()}}_activateNextItem(){if(!this._results||0===this._results.length)return;let e=this._activeIndex,t=this._results.length,n=e<t-1?e+1:0,i=0===n?t-1:n-1;this._activeIndex=index_es6.ArrayExt.findFirstIndex(this._results,Private$a.canActivate,n,i),this.update()}_activatePreviousItem(){if(!this._results||0===this._results.length)return;let e=this._activeIndex,t=this._results.length,n=e<=0?t-1:e-1,i=n===t-1?0:n+1;this._activeIndex=index_es6.ArrayExt.findLastIndex(this._results,Private$a.canActivate,n,i),this.update()}_execute(e){if(!this._results)return;let t=this._results[e];if(t){if("header"===t.type){let e=this.inputNode;return e.value=`${t.category.toLowerCase()} `,e.focus(),void this.refresh()}t.item.isEnabled&&(this.commands.execute(t.item.command,t.item.args),this.inputNode.value="",this.refresh())}}_toggleFocused(){let e=document.activeElement===this.inputNode;this.toggleClass("lm-mod-focused",e)}_onGenericChange(){this.refresh()}}!function(e){class t{renderHeader(e){let t=this.formatHeader(e);return h.li({className:"lm-CommandPalette-header"},t)}renderItem(e){let t=this.createItemClass(e),n=this.createItemDataset(e);return e.item.isToggleable?h.li({className:t,dataset:n,role:"menuitemcheckbox","aria-checked":`${e.item.isToggled}`},this.renderItemIcon(e),this.renderItemContent(e),this.renderItemShortcut(e)):h.li({className:t,dataset:n,role:"menuitem"},this.renderItemIcon(e),this.renderItemContent(e),this.renderItemShortcut(e))}renderEmptyMessage(e){let t=this.formatEmptyMessage(e);return h.li({className:"lm-CommandPalette-emptyMessage"},t)}renderItemIcon(e){let t=this.createIconClass(e);return h.div({className:t},e.item.icon,e.item.iconLabel)}renderItemContent(e){return h.div({className:"lm-CommandPalette-itemContent"},this.renderItemLabel(e),this.renderItemCaption(e))}renderItemLabel(e){let t=this.formatItemLabel(e);return h.div({className:"lm-CommandPalette-itemLabel"},t)}renderItemCaption(e){let t=this.formatItemCaption(e);return h.div({className:"lm-CommandPalette-itemCaption"},t)}renderItemShortcut(e){let t=this.formatItemShortcut(e);return h.div({className:"lm-CommandPalette-itemShortcut"},t)}createItemClass(e){let t="lm-CommandPalette-item";e.item.isEnabled||(t+=" lm-mod-disabled"),e.item.isToggled&&(t+=" lm-mod-toggled"),e.active&&(t+=" lm-mod-active");let n=e.item.className;return n&&(t+=` ${n}`),t}createItemDataset(e){return{...e.item.dataset,command:e.item.command}}createIconClass(e){let t="lm-CommandPalette-itemIcon",n=e.item.iconClass;return n?`${t} ${n}`:t}formatHeader(e){return e.indices&&0!==e.indices.length?index_es6.StringExt.highlight(e.category,e.indices,h.mark):e.category}formatEmptyMessage(e){return`No commands found that match '${e.query}'`}formatItemShortcut(e){let t=e.item.keyBinding;return t?CommandRegistry.formatKeystroke(t.keys):null}formatItemLabel(e){return e.indices&&0!==e.indices.length?index_es6.StringExt.highlight(e.item.label,e.indices,h.mark):e.item.label}formatItemCaption(e){return e.item.caption}}e.Renderer=t,e.defaultRenderer=new t}(CommandPalette||(CommandPalette={})),function(e){function t(e,t){let n=e.category.toLowerCase(),i=`${n} ${e.label.toLowerCase()}`,s=1/0,r=null,o=/\b\w/g;for(;;){let e=o.exec(i);if(!e)break;let n=index_es6.StringExt.matchSumOfDeltas(i,t,e.index);if(!n)break;n.score<=s&&(s=n.score,r=n.indices)}if(!r||s===1/0)return null;let a=n.length+1,l=index_es6.ArrayExt.lowerBound(r,a,(e,t)=>e-t),c=r.slice(0,l),d=r.slice(l);for(let e=0,t=d.length;e<t;++e)d[e]-=a;return 0===c.length?{matchType:0,categoryIndices:null,labelIndices:d,score:s,item:e}:0===d.length?{matchType:1,categoryIndices:c,labelIndices:null,score:s,item:e}:{matchType:2,categoryIndices:c,labelIndices:d,score:s,item:e}}function n(e,t){let n=e.matchType-t.matchType;if(0!==n)return n;let i=e.score-t.score;if(0!==i)return i;let s=0,r=0;switch(e.matchType){case 0:s=e.labelIndices[0],r=t.labelIndices[0];break;case 1:case 2:s=e.categoryIndices[0],r=t.categoryIndices[0]}if(s!==r)return s-r;let o=e.item.category.localeCompare(t.item.category);if(0!==o)return o;let a=e.item.rank,l=t.item.rank;return a!==l?a<l?-1:1:e.item.label.localeCompare(t.item.label)}e.createNode=function(){let e=document.createElement("div"),t=document.createElement("div"),n=document.createElement("div"),i=document.createElement("input"),s=document.createElement("ul"),r=document.createElement("button");return t.className="lm-CommandPalette-search",n.className="lm-CommandPalette-wrapper",i.className="lm-CommandPalette-input",r.className="lm-close-icon",s.className="lm-CommandPalette-content",s.setAttribute("role","menu"),i.spellcheck=!1,n.appendChild(i),n.appendChild(r),t.appendChild(n),e.appendChild(t),e.appendChild(s),e},e.createItem=function(e,t){return new i(e,t)},e.search=function(e,i){let s=function(e,n){n=n.replace(/\s+/g,"").toLowerCase();let i=[];for(let s=0,r=e.length;s<r;++s){let r=e[s];if(!r.isVisible)continue;if(!n){i.push({matchType:3,categoryIndices:null,labelIndices:null,score:0,item:r});continue}let o=t(r,n);o&&(r.isEnabled||(o.score+=1e3),i.push(o))}return i}(e,i);return s.sort(n),function(e){let t=[];for(let n=0,i=e.length;n<i;++n){let{item:i,categoryIndices:s,labelIndices:r}=e[n],o=i.category;0!==n&&o===e[n-1].item.category||t.push({type:"header",category:o,indices:s}),t.push({type:"item",item:i,indices:r})}return t}(s)},e.canActivate=function(e){return"item"===e.type&&e.item.isEnabled};class i{constructor(e,t){this._commands=e,this.category=t.category.trim().replace(/\s+/g," "),this.command=t.command,this.args=t.args||dist.JSONExt.emptyObject,this.rank=void 0!==t.rank?t.rank:1/0}get label(){return this._commands.label(this.command,this.args)}get icon(){return this._commands.icon(this.command,this.args)}get iconClass(){return this._commands.iconClass(this.command,this.args)}get iconLabel(){return this._commands.iconLabel(this.command,this.args)}get caption(){return this._commands.caption(this.command,this.args)}get className(){return this._commands.className(this.command,this.args)}get dataset(){return this._commands.dataset(this.command,this.args)}get isEnabled(){return this._commands.isEnabled(this.command,this.args)}get isToggled(){return this._commands.isToggled(this.command,this.args)}get isToggleable(){return this._commands.isToggleable(this.command,this.args)}get isVisible(){return this._commands.isVisible(this.command,this.args)}get keyBinding(){let{command:e,args:t}=this;return index_es6.ArrayExt.findLastValue(this._commands.keyBindings,n=>n.command===e&&dist.JSONExt.deepEqual(n.args,t))||null}}}(Private$a||(Private$a={}));class Menu extends Widget{constructor(e){super({node:Private$9.createNode()}),this._childIndex=-1,this._activeIndex=-1,this._openTimerID=0,this._closeTimerID=0,this._items=[],this._childMenu=null,this._parentMenu=null,this._aboutToClose=new signaling_dist_index_es6.Signal(this),this._menuRequested=new signaling_dist_index_es6.Signal(this),this.addClass("lm-Menu"),this.setFlag(Widget.Flag.DisallowLayout),this.commands=e.commands,this.renderer=e.renderer||Menu.defaultRenderer}dispose(){this.close(),this._items.length=0,super.dispose()}get aboutToClose(){return this._aboutToClose}get menuRequested(){return this._menuRequested}get parentMenu(){return this._parentMenu}get childMenu(){return this._childMenu}get rootMenu(){let e=this;for(;e._parentMenu;)e=e._parentMenu;return e}get leafMenu(){let e=this;for(;e._childMenu;)e=e._childMenu;return e}get contentNode(){return this.node.getElementsByClassName("lm-Menu-content")[0]}get activeItem(){return this._items[this._activeIndex]||null}set activeItem(e){this.activeIndex=e?this._items.indexOf(e):-1}get activeIndex(){return this._activeIndex}set activeIndex(e){(e<0||e>=this._items.length)&&(e=-1),-1===e||Private$9.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())}get items(){return this._items}activateNextItem(){let e=this._items.length,t=this._activeIndex,n=t<e-1?t+1:0,i=0===n?e-1:n-1;this.activeIndex=index_es6.ArrayExt.findFirstIndex(this._items,Private$9.canActivate,n,i)}activatePreviousItem(){let e=this._items.length,t=this._activeIndex,n=t<=0?e-1:t-1,i=n===e-1?0:n+1;this.activeIndex=index_es6.ArrayExt.findLastIndex(this._items,Private$9.canActivate,n,i)}triggerActiveItem(){if(!this.isAttached)return;let e=this.activeItem;if(!e)return;if(this._cancelOpenTimer(),this._cancelCloseTimer(),"submenu"===e.type)return void this._openChildMenu(!0);this.rootMenu.close();let{command:t,args:n}=e;this.commands.isEnabled(t,n)?this.commands.execute(t,n):console.log(`Command '${t}' is disabled.`)}addItem(e){return this.insertItem(this._items.length,e)}insertItem(e,t){this.isAttached&&this.close(),this.activeIndex=-1;let n=Math.max(0,Math.min(e,this._items.length)),i=Private$9.createItem(this,t);return index_es6.ArrayExt.insert(this._items,n,i),this.update(),i}removeItem(e){this.removeItemAt(this._items.indexOf(e))}removeItemAt(e){this.isAttached&&this.close(),this.activeIndex=-1,index_es6.ArrayExt.removeAt(this._items,e)&&this.update()}clearItems(){this.isAttached&&this.close(),this.activeIndex=-1,0!==this._items.length&&(this._items.length=0,this.update())}open(e,t,n={}){var i,s,r;if(this.isAttached)return;let o=n.forceX||!1,a=n.forceY||!1;const l=null!==(i=n.host)&&void 0!==i?i:null,c=null!==(s=n.ref)&&void 0!==s?s:null,d=null!==(r=n.horizontalAlignment)&&void 0!==r?r:"rtl"===document.documentElement.dir?"right":"left";Private$9.openRootMenu(this,e,t,o,a,d,l,c),this.activate()}handleEvent(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()}}onBeforeAttach(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,!0)}onAfterDetach(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)}onActivateRequest(e){this.isAttached&&this.node.focus()}onUpdateRequest(e){let t=this._items,n=this.renderer,i=this._activeIndex,s=Private$9.computeCollapsed(t),r=new Array(t.length);for(let e=0,o=t.length;e<o;++e){let o=t[e],a=e===i,l=s[e];r[e]=n.renderItem({item:o,active:a,collapsed:l,onfocus:()=>{this.activeIndex=e}})}VirtualDOM.render(r,this.contentNode)}onCloseRequest(e){this._cancelOpenTimer(),this._cancelCloseTimer(),this.activeIndex=-1;let t=this._childMenu;t&&(this._childIndex=-1,this._childMenu=null,t._parentMenu=null,t.close());let n=this._parentMenu;n&&(this._parentMenu=null,n._childIndex=-1,n._childMenu=null,n.activate()),this.isAttached&&this._aboutToClose.emit(void 0),super.onCloseRequest(e)}_evtKeyDown(e){e.preventDefault(),e.stopPropagation();let t=e.keyCode;if(13===t)return void this.triggerActiveItem();if(27===t)return void this.close();if(37===t)return void(this._parentMenu?this.close():this._menuRequested.emit("previous"));if(38===t)return void this.activatePreviousItem();if(39===t){let e=this.activeItem;return void(e&&"submenu"===e.type?this.triggerActiveItem():this.rootMenu._menuRequested.emit("next"))}if(40===t)return void this.activateNextItem();let n=getKeyboardLayout().keyForKeydownEvent(e);if(!n)return;let i=this._activeIndex+1,s=Private$9.findMnemonic(this._items,n,i);-1===s.index||s.multiple?-1!==s.index?this.activeIndex=s.index:-1!==s.auto&&(this.activeIndex=s.auto):(this.activeIndex=s.index,this.triggerActiveItem())}_evtMouseUp(e){0===e.button&&(e.preventDefault(),e.stopPropagation(),this.triggerActiveItem())}_evtMouseMove(e){let t=index_es6.ArrayExt.findFirstIndex(this.contentNode.children,t=>ElementExt.hitTest(t,e.clientX,e.clientY));if(t===this._activeIndex)return;if(this.activeIndex=t,t=this.activeIndex,t===this._childIndex)return this._cancelOpenTimer(),void this._cancelCloseTimer();-1!==this._childIndex&&this._startCloseTimer(),this._cancelOpenTimer();let n=this.activeItem;n&&"submenu"===n.type&&n.submenu&&this._startOpenTimer()}_evtMouseEnter(e){for(let e=this._parentMenu;e;e=e._parentMenu)e._cancelOpenTimer(),e._cancelCloseTimer(),e.activeIndex=e._childIndex}_evtMouseLeave(e){if(this._cancelOpenTimer(),!this._childMenu)return void(this.activeIndex=-1);let{clientX:t,clientY:n}=e;ElementExt.hitTest(this._childMenu.node,t,n)?this._cancelCloseTimer():(this.activeIndex=-1,this._startCloseTimer())}_evtMouseDown(e){this._parentMenu||(Private$9.hitTestMenus(this,e.clientX,e.clientY)?(e.preventDefault(),e.stopPropagation()):this.close())}_openChildMenu(e=!1){let t=this.activeItem;if(!t||"submenu"!==t.type||!t.submenu)return void this._closeChildMenu();let n=t.submenu;if(n===this._childMenu)return;Menu.saveWindowData(),this._closeChildMenu(),this._childMenu=n,this._childIndex=this._activeIndex,n._parentMenu=this,MessageLoop.sendMessage(this,Widget.Msg.UpdateRequest);let i=this.contentNode.children[this._activeIndex];Private$9.openSubmenu(n,i),e&&(n.activeIndex=-1,n.activateNextItem()),n.activate()}_closeChildMenu(){this._childMenu&&this._childMenu.close()}_startOpenTimer(){0===this._openTimerID&&(this._openTimerID=window.setTimeout(()=>{this._openTimerID=0,this._openChildMenu()},Private$9.TIMER_DELAY))}_startCloseTimer(){0===this._closeTimerID&&(this._closeTimerID=window.setTimeout(()=>{this._closeTimerID=0,this._closeChildMenu()},Private$9.TIMER_DELAY))}_cancelOpenTimer(){0!==this._openTimerID&&(clearTimeout(this._openTimerID),this._openTimerID=0)}_cancelCloseTimer(){0!==this._closeTimerID&&(clearTimeout(this._closeTimerID),this._closeTimerID=0)}static saveWindowData(){Private$9.saveWindowData()}}!function(e){class t{renderItem(e){let t=this.createItemClass(e),n=this.createItemDataset(e),i=this.createItemARIA(e);return h.li({className:t,dataset:n,tabindex:"0",onfocus:e.onfocus,...i},this.renderIcon(e),this.renderLabel(e),this.renderShortcut(e),this.renderSubmenu(e))}renderIcon(e){let t=this.createIconClass(e);return h.div({className:t},e.item.icon,e.item.iconLabel)}renderLabel(e){let t=this.formatLabel(e);return h.div({className:"lm-Menu-itemLabel"},t)}renderShortcut(e){let t=this.formatShortcut(e);return h.div({className:"lm-Menu-itemShortcut"},t)}renderSubmenu(e){return h.div({className:"lm-Menu-itemSubmenuIcon"})}createItemClass(e){let t="lm-Menu-item";e.item.isEnabled||(t+=" lm-mod-disabled"),e.item.isToggled&&(t+=" lm-mod-toggled"),e.item.isVisible||(t+=" lm-mod-hidden"),e.active&&(t+=" lm-mod-active"),e.collapsed&&(t+=" lm-mod-collapsed");let n=e.item.className;return n&&(t+=` ${n}`),t}createItemDataset(e){let t,{type:n,command:i,dataset:s}=e.item;return t="command"===n?{...s,type:n,command:i}:{...s,type:n},t}createIconClass(e){let t="lm-Menu-itemIcon",n=e.item.iconClass;return n?`${t} ${n}`:t}createItemARIA(e){let t={};switch(e.item.type){case"separator":t.role="presentation";break;case"submenu":t["aria-haspopup"]="true",e.item.isEnabled||(t["aria-disabled"]="true");break;default:e.item.isEnabled||(t["aria-disabled"]="true"),e.item.isToggled?(t.role="menuitemcheckbox",t["aria-checked"]="true"):t.role="menuitem"}return t}formatLabel(e){let{label:t,mnemonic:n}=e.item;if(n<0||n>=t.length)return t;let i=t.slice(0,n),s=t.slice(n+1),r=t[n];return[i,h.span({className:"lm-Menu-itemMnemonic"},r),s]}formatShortcut(e){let t=e.item.keyBinding;return t?CommandRegistry.formatKeystroke(t.keys):null}}e.Renderer=t,e.defaultRenderer=new t}(Menu||(Menu={})),function(e){e.TIMER_DELAY=300,e.SUBMENU_OVERLAP=3;let t=null,n=0;function i(){return n>0?(n--,t):r()}function s(e){return"separator"!==e.type&&e.isEnabled&&e.isVisible}function r(){return{pageXOffset:window.pageXOffset,pageYOffset:window.pageYOffset,clientWidth:document.documentElement.clientWidth,clientHeight:document.documentElement.clientHeight}}e.saveWindowData=function(){t=r(),n++},e.createNode=function(){let e=document.createElement("div"),t=document.createElement("ul");return t.className="lm-Menu-content",e.appendChild(t),t.setAttribute("role","menu"),e.tabIndex=0,e},e.canActivate=s,e.createItem=function(e,t){return new o(e.commands,t)},e.hitTestMenus=function(e,t,n){for(let i=e;i;i=i.childMenu)if(ElementExt.hitTest(i.node,t,n))return!0;return!1},e.computeCollapsed=function(e){let t=new Array(e.length);index_es6.ArrayExt.fill(t,!1);let n=0,i=e.length;for(;n<i;++n){let i=e[n];if(i.isVisible){if("separator"!==i.type)break;t[n]=!0}}let s=i-1;for(;s>=0;--s){let n=e[s];if(n.isVisible){if("separator"!==n.type)break;t[s]=!0}}let r=!1;for(;++n<s;){let i=e[n];i.isVisible&&("separator"!==i.type?r=!1:r?t[n]=!0:r=!0)}return t},e.openRootMenu=function(e,t,n,s,r,o,a,l){const c=i();let d=c.pageXOffset,u=c.pageYOffset,h=c.clientWidth,p=c.clientHeight;MessageLoop.sendMessage(e,Widget.Msg.UpdateRequest);let m=p-(r?n:0),f=e.node,g=f.style;g.opacity="0",g.maxHeight=`${m}px`,Widget.attach(e,a||document.body,l);let{width:v,height:_}=f.getBoundingClientRect();"right"===o&&(t-=v),!s&&t+v>d+h&&(t=d+h-v),!r&&n+_>u+p&&(n>u+p?n=u+p-_:n-=_),g.transform=`translate(${Math.max(0,t)}px, ${Math.max(0,n)}px`,g.opacity="1"},e.openSubmenu=function(t,n){const s=i();let r=s.pageXOffset,o=s.pageYOffset,a=s.clientWidth,l=s.clientHeight;MessageLoop.sendMessage(t,Widget.Msg.UpdateRequest);let c=l,d=t.node,u=d.style;u.opacity="0",u.maxHeight=`${c}px`,Widget.attach(t,document.body);let{width:h,height:p}=d.getBoundingClientRect(),m=ElementExt.boxSizing(t.node),f=n.getBoundingClientRect(),g=f.right-e.SUBMENU_OVERLAP;g+h>r+a&&(g=f.left+e.SUBMENU_OVERLAP-h);let v=f.top-m.borderTop-m.paddingTop;v+p>o+l&&(v=f.bottom+m.borderBottom+m.paddingBottom-p),u.transform=`translate(${Math.max(0,g)}px, ${Math.max(0,v)}px`,u.opacity="1"},e.findMnemonic=function(e,t,n){let i=-1,r=-1,o=!1,a=t.toUpperCase();for(let t=0,l=e.length;t<l;++t){let c=(t+n)%l,d=e[c];if(!s(d))continue;let u=d.label;if(0===u.length)continue;let h=d.mnemonic;h>=0&&h<u.length?u[h].toUpperCase()===a&&(-1===i?i=c:o=!0):-1===r&&u[0].toUpperCase()===a&&(r=c)}return{index:i,multiple:o,auto:r}};class o{constructor(e,t){this._commands=e,this.type=t.type||"command",this.command=t.command||"",this.args=t.args||dist.JSONExt.emptyObject,this.submenu=t.submenu||null}get label(){return"command"===this.type?this._commands.label(this.command,this.args):"submenu"===this.type&&this.submenu?this.submenu.title.label:""}get mnemonic(){return"command"===this.type?this._commands.mnemonic(this.command,this.args):"submenu"===this.type&&this.submenu?this.submenu.title.mnemonic:-1}get icon(){return"command"===this.type?this._commands.icon(this.command,this.args):"submenu"===this.type&&this.submenu?this.submenu.title.icon:void 0}get iconClass(){return"command"===this.type?this._commands.iconClass(this.command,this.args):"submenu"===this.type&&this.submenu?this.submenu.title.iconClass:""}get iconLabel(){return"command"===this.type?this._commands.iconLabel(this.command,this.args):"submenu"===this.type&&this.submenu?this.submenu.title.iconLabel:""}get caption(){return"command"===this.type?this._commands.caption(this.command,this.args):"submenu"===this.type&&this.submenu?this.submenu.title.caption:""}get className(){return"command"===this.type?this._commands.className(this.command,this.args):"submenu"===this.type&&this.submenu?this.submenu.title.className:""}get dataset(){return"command"===this.type?this._commands.dataset(this.command,this.args):"submenu"===this.type&&this.submenu?this.submenu.title.dataset:{}}get isEnabled(){return"command"===this.type?this._commands.isEnabled(this.command,this.args):"submenu"!==this.type||null!==this.submenu}get isToggled(){return"command"===this.type&&this._commands.isToggled(this.command,this.args)}get isVisible(){return"command"===this.type?this._commands.isVisible(this.command,this.args):"submenu"!==this.type||null!==this.submenu}get keyBinding(){if("command"===this.type){let{command:e,args:t}=this;return index_es6.ArrayExt.findLastValue(this._commands.keyBindings,n=>n.command===e&&dist.JSONExt.deepEqual(n.args,t))||null}return null}}}(Private$9||(Private$9={}));class ContextMenu{constructor(e){this._groupByTarget=!0,this._idTick=0,this._items=[],this._sortBySelector=!0;const{groupByTarget:t,sortBySelector:n,...i}=e;this.menu=new Menu(i),this._groupByTarget=!1!==t,this._sortBySelector=!1!==n}addItem(e){let t=Private$8.createItem(e,this._idTick++);return this._items.push(t),new DisposableDelegate(()=>{ArrayExt.removeFirstOf(this._items,t)})}open(e){if(Menu.saveWindowData(),this.menu.clearItems(),0===this._items.length)return!1;let t=Private$8.matchItems(this._items,e,this._groupByTarget,this._sortBySelector);if(!t||0===t.length)return!1;for(const e of t)this.menu.addItem(e);return this.menu.open(e.clientX,e.clientY),!0}}!function(e){function t(e,t){let n=e.rank,i=t.rank;return n!==i?n<i?-1:1:e.id-t.id}function n(e,n){let i=Selector.calculateSpecificity(e.selector),s=Selector.calculateSpecificity(n.selector);return i!==s?s-i:t(e,n)}e.createItem=function(e,t){let n=function(e){if(-1!==e.indexOf(","))throw new Error(`Selector cannot contain commas: ${e}`);if(!Selector.isValid(e))throw new Error(`Invalid selector: ${e}`);return e}(e.selector),i=void 0!==e.rank?e.rank:1/0;return{...e,selector:n,rank:i,id:t}},e.matchItems=function(e,i,s,r){let o=i.target;if(!o)return null;let a=i.currentTarget;if(!a)return null;if(!a.contains(o)&&(o=document.elementFromPoint(i.clientX,i.clientY),!o||!a.contains(o)))return null;let l=[],c=e.slice();for(;null!==o;){let e=[];for(let t=0,n=c.length;t<n;++t){let n=c[t];n&&Selector.matches(o,n.selector)&&(e.push(n),c[t]=null)}if(0!==e.length&&(s&&e.sort(r?n:t),l.push(...e)),o===a)break;o=o.parentElement}return s||l.sort(r?n:t),l}}(Private$8||(Private$8={}));const ARROW_KEYS=["ArrowLeft","ArrowUp","ArrowRight","ArrowDown","Home","End"];class TabBar extends Widget{constructor(e={}){super({node:Private$7.createNode()}),this._currentIndex=-1,this._titles=[],this._titlesEditable=!1,this._previousTitle=null,this._dragData=null,this._addButtonEnabled=!1,this._tabMoved=new signaling_dist_index_es6.Signal(this),this._currentChanged=new signaling_dist_index_es6.Signal(this),this._addRequested=new signaling_dist_index_es6.Signal(this),this._tabCloseRequested=new signaling_dist_index_es6.Signal(this),this._tabDetachRequested=new signaling_dist_index_es6.Signal(this),this._tabActivateRequested=new signaling_dist_index_es6.Signal(this),this.addClass("lm-TabBar"),this.contentNode.setAttribute("role","tablist"),this.setFlag(Widget.Flag.DisallowLayout),this._document=e.document||document,this.tabsMovable=e.tabsMovable||!1,this.titlesEditable=e.titlesEditable||!1,this.allowDeselect=e.allowDeselect||!1,this.addButtonEnabled=e.addButtonEnabled||!1,this.insertBehavior=e.insertBehavior||"select-tab-if-needed",this.name=e.name||"",this.orientation=e.orientation||"horizontal",this.removeBehavior=e.removeBehavior||"select-tab-after",this.renderer=e.renderer||TabBar.defaultRenderer}dispose(){this._releaseMouse(),this._titles.length=0,this._previousTitle=null,super.dispose()}get currentChanged(){return this._currentChanged}get tabMoved(){return this._tabMoved}get tabActivateRequested(){return this._tabActivateRequested}get addRequested(){return this._addRequested}get tabCloseRequested(){return this._tabCloseRequested}get tabDetachRequested(){return this._tabDetachRequested}get document(){return this._document}get titlesEditable(){return this._titlesEditable}set titlesEditable(e){this._titlesEditable=e}get currentTitle(){return this._titles[this._currentIndex]||null}set currentTitle(e){this.currentIndex=e?this._titles.indexOf(e):-1}get currentIndex(){return this._currentIndex}set currentIndex(e){if((e<0||e>=this._titles.length)&&(e=-1),this._currentIndex===e)return;let t=this._currentIndex,n=this._titles[t]||null,i=e,s=this._titles[i]||null;this._currentIndex=i,this._previousTitle=n,this.update(),this._currentChanged.emit({previousIndex:t,previousTitle:n,currentIndex:i,currentTitle:s})}get name(){return this._name}set name(e){this._name=e,e?this.contentNode.setAttribute("aria-label",e):this.contentNode.removeAttribute("aria-label")}get orientation(){return this._orientation}set orientation(e){this._orientation!==e&&(this._releaseMouse(),this._orientation=e,this.dataset.orientation=e,this.contentNode.setAttribute("aria-orientation",e))}get addButtonEnabled(){return this._addButtonEnabled}set addButtonEnabled(e){this._addButtonEnabled!==e&&(this._addButtonEnabled=e,e?this.addButtonNode.classList.remove("lm-mod-hidden"):this.addButtonNode.classList.add("lm-mod-hidden"))}get titles(){return this._titles}get contentNode(){return this.node.getElementsByClassName("lm-TabBar-content")[0]}get addButtonNode(){return this.node.getElementsByClassName("lm-TabBar-addButton")[0]}addTab(e){return this.insertTab(this._titles.length,e)}insertTab(e,t){this._releaseMouse();let n=Private$7.asTitle(t),i=this._titles.indexOf(n),s=Math.max(0,Math.min(e,this._titles.length));return-1===i?(index_es6.ArrayExt.insert(this._titles,s,n),n.changed.connect(this._onTitleChanged,this),this.update(),this._adjustCurrentForInsert(s,n),n):(s===this._titles.length&&s--,i===s||(index_es6.ArrayExt.move(this._titles,i,s),this.update(),this._adjustCurrentForMove(i,s)),n)}removeTab(e){this.removeTabAt(this._titles.indexOf(e))}removeTabAt(e){this._releaseMouse();let t=index_es6.ArrayExt.removeAt(this._titles,e);t&&(t.changed.disconnect(this._onTitleChanged,this),t===this._previousTitle&&(this._previousTitle=null),this.update(),this._adjustCurrentForRemove(e,t))}clearTabs(){if(0===this._titles.length)return;this._releaseMouse();for(let e of this._titles)e.changed.disconnect(this._onTitleChanged,this);let e=this.currentIndex,t=this.currentTitle;this._currentIndex=-1,this._previousTitle=null,this._titles.length=0,this.update(),-1!==e&&this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:-1,currentTitle:null})}releaseMouse(){this._releaseMouse()}handleEvent(e){switch(e.type){case"pointerdown":this._evtPointerDown(e);break;case"pointermove":this._evtPointerMove(e);break;case"pointerup":this._evtPointerUp(e);break;case"dblclick":this._evtDblClick(e);break;case"keydown":e.eventPhase===Event.CAPTURING_PHASE?this._evtKeyDownCapturing(e):this._evtKeyDown(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}}onBeforeAttach(e){this.node.addEventListener("pointerdown",this),this.node.addEventListener("dblclick",this),this.node.addEventListener("keydown",this)}onAfterDetach(e){this.node.removeEventListener("pointerdown",this),this.node.removeEventListener("dblclick",this),this.node.removeEventListener("keydown",this),this._releaseMouse()}onUpdateRequest(e){var t;let n=this._titles,i=this.renderer,s=this.currentTitle,r=new Array(n.length);const o=null!==(t=this._getCurrentTabindex())&&void 0!==t?t:this._currentIndex>-1?this._currentIndex:0;for(let e=0,t=n.length;e<t;++e){let a=n[e],l=a===s,c=l?t:t-e-1,d=o===e?0:-1;r[e]=i.renderTab({title:a,current:l,zIndex:c,tabIndex:d})}VirtualDOM.render(r,this.contentNode)}_getCurrentTabindex(){let e=null;const t=this.contentNode.querySelector('li[tabindex="0"]');return t?e=[...this.contentNode.children].indexOf(t):this._addButtonEnabled&&"0"===this.addButtonNode.getAttribute("tabindex")&&(e=-1),e}_evtDblClick(e){if(!this.titlesEditable)return;let t=this.contentNode.children,n=index_es6.ArrayExt.findFirstIndex(t,t=>ElementExt.hitTest(t,e.clientX,e.clientY));if(-1===n)return;let i=this.titles[n],s=t[n].querySelector(".lm-TabBar-tabLabel");if(s&&s.contains(e.target)){let e=i.label||"",t=s.innerHTML;s.innerHTML="";let n=document.createElement("input");n.classList.add("lm-TabBar-tabInput"),n.value=e,s.appendChild(n);let r=()=>{n.removeEventListener("blur",r),s.innerHTML=t,this.node.addEventListener("keydown",this)};n.addEventListener("dblclick",e=>e.stopPropagation()),n.addEventListener("blur",r),n.addEventListener("keydown",e=>{"Enter"===e.key?(""!==n.value&&(i.label=i.caption=n.value),r()):"Escape"===e.key&&r()}),this.node.removeEventListener("keydown",this),n.select(),n.focus(),s.children.length>0&&s.children[0].focus()}}_evtKeyDownCapturing(e){e.eventPhase===Event.CAPTURING_PHASE&&(e.preventDefault(),e.stopPropagation(),"Escape"===e.key&&this._releaseMouse())}_evtKeyDown(e){var t,n,i;if("Tab"!==e.key&&e.eventPhase!==Event.CAPTURING_PHASE)if("Enter"===e.key||"Spacebar"===e.key||" "===e.key){const t=document.activeElement;if(this.addButtonEnabled&&this.addButtonNode.contains(t))e.preventDefault(),e.stopPropagation(),this._addRequested.emit();else{const n=index_es6.ArrayExt.findFirstIndex(this.contentNode.children,e=>e.contains(t));n>=0&&(e.preventDefault(),e.stopPropagation(),this.currentIndex=n)}}else if(ARROW_KEYS.includes(e.key)){const s=[...this.contentNode.children];if(this.addButtonEnabled&&s.push(this.addButtonNode),s.length<=1)return;e.preventDefault(),e.stopPropagation();let r,o=s.indexOf(document.activeElement);-1===o&&(o=this._currentIndex),"ArrowRight"===e.key&&"horizontal"===this._orientation||"ArrowDown"===e.key&&"vertical"===this._orientation?r=null!==(t=s[o+1])&&void 0!==t?t:s[0]:"ArrowLeft"===e.key&&"horizontal"===this._orientation||"ArrowUp"===e.key&&"vertical"===this._orientation?r=null!==(n=s[o-1])&&void 0!==n?n:s[s.length-1]:"Home"===e.key?r=s[0]:"End"===e.key&&(r=s[s.length-1]),r&&(null===(i=s[o])||void 0===i||i.setAttribute("tabindex","-1"),null==r||r.setAttribute("tabindex","0"),r.focus())}}_evtPointerDown(e){if(0!==e.button&&1!==e.button)return;if(this._dragData)return;if(e.target.classList.contains("lm-TabBar-tabInput"))return;let t=this.addButtonEnabled&&this.addButtonNode.contains(e.target),n=this.contentNode.children,i=index_es6.ArrayExt.findFirstIndex(n,t=>ElementExt.hitTest(t,e.clientX,e.clientY));if(-1===i&&!t)return;if(e.preventDefault(),e.stopPropagation(),this._dragData={tab:n[i],index:i,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("pointerup",this,!0),1===e.button||t)return;let s=n[i].querySelector(this.renderer.closeIconSelector);s&&s.contains(e.target)||(this.tabsMovable&&(this.document.addEventListener("pointermove",this,!0),this.document.addEventListener("keydown",this,!0),this.document.addEventListener("contextmenu",this,!0)),this.allowDeselect&&this.currentIndex===i?this.currentIndex=-1:this.currentIndex=i,-1!==this.currentIndex&&this._tabActivateRequested.emit({index:this.currentIndex,title:this.currentTitle}))}_evtPointerMove(e){let t=this._dragData;if(!t)return;e.preventDefault(),e.stopPropagation();let n=this.contentNode.children;if(t.dragActive||Private$7.dragExceeded(t,e)){if(!t.dragActive){let e=t.tab.getBoundingClientRect();"horizontal"===this._orientation?(t.tabPos=t.tab.offsetLeft,t.tabSize=e.width,t.tabPressPos=t.pressX-e.left):(t.tabPos=t.tab.offsetTop,t.tabSize=e.height,t.tabPressPos=t.pressY-e.top),t.tabPressOffset={x:t.pressX-e.left,y:t.pressY-e.top},t.tabLayout=Private$7.snapTabLayout(n,this._orientation),t.contentRect=this.contentNode.getBoundingClientRect(),t.override=Drag.overrideCursor("default"),t.tab.classList.add("lm-mod-dragging"),this.addClass("lm-mod-dragging"),t.dragActive=!0}if(!t.detachRequested&&Private$7.detachExceeded(t,e)){t.detachRequested=!0;let i=t.index,s=e.clientX,r=e.clientY,o=n[i],a=this._titles[i];if(this._tabDetachRequested.emit({index:i,title:a,tab:o,clientX:s,clientY:r,offset:t.tabPressOffset}),t.dragAborted)return}Private$7.layoutTabs(n,t,e,this._orientation)}}_evtPointerUp(e){if(0!==e.button&&1!==e.button)return;const t=this._dragData;if(!t)return;if(e.preventDefault(),e.stopPropagation(),this.document.removeEventListener("pointermove",this,!0),this.document.removeEventListener("pointerup",this,!0),this.document.removeEventListener("keydown",this,!0),this.document.removeEventListener("contextmenu",this,!0),!t.dragActive){if(this._dragData=null,this.addButtonEnabled&&this.addButtonNode.contains(e.target))return void this._addRequested.emit(void 0);let n=this.contentNode.children,i=index_es6.ArrayExt.findFirstIndex(n,t=>ElementExt.hitTest(t,e.clientX,e.clientY));if(i!==t.index)return;let s=this._titles[i];if(!s.closable)return;if(1===e.button)return void this._tabCloseRequested.emit({index:i,title:s});let r=n[i].querySelector(this.renderer.closeIconSelector);return r&&r.contains(e.target)?void this._tabCloseRequested.emit({index:i,title:s}):void 0}if(0!==e.button)return;Private$7.finalizeTabPosition(t,this._orientation),t.tab.classList.remove("lm-mod-dragging");let n=Private$7.parseTransitionDuration(t.tab);setTimeout(()=>{if(t.dragAborted)return;this._dragData=null,Private$7.resetTabPositions(this.contentNode.children,this._orientation),t.override.dispose(),this.removeClass("lm-mod-dragging");let e=t.index,n=t.targetIndex;-1!==n&&e!==n&&(index_es6.ArrayExt.move(this._titles,e,n),this._adjustCurrentForMove(e,n),this._tabMoved.emit({fromIndex:e,toIndex:n,title:this._titles[n]}),MessageLoop.sendMessage(this,Widget.Msg.UpdateRequest))},n)}_releaseMouse(){let e=this._dragData;e&&(this._dragData=null,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&&(Private$7.resetTabPositions(this.contentNode.children,this._orientation),e.override.dispose(),e.tab.classList.remove("lm-mod-dragging"),this.removeClass("lm-mod-dragging")))}_adjustCurrentForInsert(e,t){let n=this.currentTitle,i=this._currentIndex,s=this.insertBehavior;if("select-tab"===s||"select-tab-if-needed"===s&&-1===i)return this._currentIndex=e,this._previousTitle=n,void this._currentChanged.emit({previousIndex:i,previousTitle:n,currentIndex:e,currentTitle:t});i>=e&&this._currentIndex++}_adjustCurrentForMove(e,t){this._currentIndex===e?this._currentIndex=t:this._currentIndex<e&&this._currentIndex>=t?this._currentIndex++:this._currentIndex>e&&this._currentIndex<=t&&this._currentIndex--}_adjustCurrentForRemove(e,t){let n=this._currentIndex,i=this.removeBehavior;if(n===e){if(0===this._titles.length)return this._currentIndex=-1,void this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:-1,currentTitle:null});if("select-tab-after"===i)return this._currentIndex=Math.min(e,this._titles.length-1),void this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:this._currentIndex,currentTitle:this.currentTitle});if("select-tab-before"===i)return this._currentIndex=Math.max(0,e-1),void this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:this._currentIndex,currentTitle:this.currentTitle});if("select-previous-tab"===i)return this._previousTitle?(this._currentIndex=this._titles.indexOf(this._previousTitle),this._previousTitle=null):this._currentIndex=Math.min(e,this._titles.length-1),void this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:this._currentIndex,currentTitle:this.currentTitle});this._currentIndex=-1,this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:-1,currentTitle:null})}else n>e&&this._currentIndex--}_onTitleChanged(e){this.update()}}var Private$7,Private$6,Private$5,Private$4,Private$3,Private$2,Private$1,widgets_dist_index_es6_Private;!function(e){class t{constructor(){this.closeIconSelector=".lm-TabBar-tabCloseIcon",this._tabID=0,this._tabKeys=new WeakMap,this._uuid=++t._nInstance}renderTab(e){let t=e.title.caption,n=this.createTabKey(e),i=n,s=this.createTabStyle(e),r=this.createTabClass(e),o=this.createTabDataset(e),a=this.createTabARIA(e);return e.title.closable?h.li({id:i,key:n,className:r,title:t,style:s,dataset:o,...a},this.renderIcon(e),this.renderLabel(e),this.renderCloseIcon(e)):h.li({id:i,key:n,className:r,title:t,style:s,dataset:o,...a},this.renderIcon(e),this.renderLabel(e))}renderIcon(e){const{title:t}=e;let n=this.createIconClass(e);return h.div({className:n},t.icon,t.iconLabel)}renderLabel(e){return h.div({className:"lm-TabBar-tabLabel"},e.title.label)}renderCloseIcon(e){return h.div({className:"lm-TabBar-tabCloseIcon"})}createTabKey(e){let t=this._tabKeys.get(e.title);return void 0===t&&(t=`tab-key-${this._uuid}-${this._tabID++}`,this._tabKeys.set(e.title,t)),t}createTabStyle(e){return{zIndex:`${e.zIndex}`}}createTabClass(e){let t="lm-TabBar-tab";return e.title.className&&(t+=` ${e.title.className}`),e.title.closable&&(t+=" lm-mod-closable"),e.current&&(t+=" lm-mod-current"),t}createTabDataset(e){return e.title.dataset}createTabARIA(e){var t;return{role:"tab","aria-selected":e.current.toString(),tabindex:`${null!==(t=e.tabIndex)&&void 0!==t?t:"-1"}`}}createIconClass(e){let t="lm-TabBar-tabIcon",n=e.title.iconClass;return n?`${t} ${n}`:t}}t._nInstance=0,e.Renderer=t,e.defaultRenderer=new t,e.addButtonSelector=".lm-TabBar-addButton"}(TabBar||(TabBar={})),function(e){e.DRAG_THRESHOLD=5,e.DETACH_THRESHOLD=20,e.createNode=function(){let e=document.createElement("div"),t=document.createElement("ul");t.setAttribute("role","tablist"),t.className="lm-TabBar-content",e.appendChild(t);let n=document.createElement("div");return n.className="lm-TabBar-addButton lm-mod-hidden",n.setAttribute("tabindex","-1"),n.setAttribute("role","button"),e.appendChild(n),e},e.asTitle=function(e){return e instanceof Title?e:new Title(e)},e.parseTransitionDuration=function(e){let t=window.getComputedStyle(e);return 1e3*(parseFloat(t.transitionDuration)||0)},e.snapTabLayout=function(e,t){let n=new Array(e.length);for(let i=0,s=e.length;i<s;++i){let s=e[i],r=window.getComputedStyle(s);n[i]="horizontal"===t?{pos:s.offsetLeft,size:s.offsetWidth,margin:parseFloat(r.marginLeft)||0}:{pos:s.offsetTop,size:s.offsetHeight,margin:parseFloat(r.marginTop)||0}}return n},e.dragExceeded=function(t,n){let i=Math.abs(n.clientX-t.pressX),s=Math.abs(n.clientY-t.pressY);return i>=e.DRAG_THRESHOLD||s>=e.DRAG_THRESHOLD},e.detachExceeded=function(t,n){let i=t.contentRect;return n.clientX<i.left-e.DETACH_THRESHOLD||n.clientX>=i.right+e.DETACH_THRESHOLD||n.clientY<i.top-e.DETACH_THRESHOLD||n.clientY>=i.bottom+e.DETACH_THRESHOLD},e.layoutTabs=function(e,t,n,i){let s,r,o,a;"horizontal"===i?(s=t.pressX,r=n.clientX-t.contentRect.left,o=n.clientX,a=t.contentRect.width):(s=t.pressY,r=n.clientY-t.contentRect.top,o=n.clientY,a=t.contentRect.height);let l=t.index,c=r-t.tabPressPos,d=c+t.tabSize;for(let n=0,r=e.length;n<r;++n){let r,u=t.tabLayout[n],h=u.pos+(u.size>>1);if(n<t.index&&c<h)r=`${t.tabSize+t.tabLayout[n+1].margin}px`,l=Math.min(l,n);else if(n>t.index&&d>h)r=-t.tabSize-u.margin+"px",l=Math.max(l,n);else if(n===t.index){let e=o-s,n=a-(t.tabPos+t.tabSize);r=`${Math.max(-t.tabPos,Math.min(e,n))}px`}else r="";"horizontal"===i?e[n].style.left=r:e[n].style.top=r}t.targetIndex=l},e.finalizeTabPosition=function(e,t){let n,i;if(n="horizontal"===t?e.contentRect.width:e.contentRect.height,e.targetIndex===e.index)i=0;else if(e.targetIndex>e.index){let t=e.tabLayout[e.targetIndex];i=t.pos+t.size-e.tabSize-e.tabPos}else i=e.tabLayout[e.targetIndex].pos-e.tabPos;let s=n-(e.tabPos+e.tabSize),r=Math.max(-e.tabPos,Math.min(i,s));"horizontal"===t?e.tab.style.left=`${r}px`:e.tab.style.top=`${r}px`},e.resetTabPositions=function(e,t){for(const n of e)"horizontal"===t?n.style.left="":n.style.top=""}}(Private$7||(Private$7={}));class DockLayout extends Layout{constructor(e){super(),this._spacing=4,this._dirty=!1,this._root=null,this._box=null,this._items=new Map,this.renderer=e.renderer,void 0!==e.spacing&&(this._spacing=Utils$1.clampDimension(e.spacing)),this._document=e.document||document,this._hiddenMode=void 0!==e.hiddenMode?e.hiddenMode:Widget.HiddenMode.Display}dispose(){let e=this[Symbol.iterator]();this._items.forEach(e=>{e.dispose()}),this._box=null,this._root=null,this._items.clear();for(const t of e)t.dispose();super.dispose()}get hiddenMode(){return this._hiddenMode}set hiddenMode(e){if(this._hiddenMode!==e){this._hiddenMode=e;for(const e of this.tabBars())if(e.titles.length>1)for(const t of e.titles)t.owner.hiddenMode=this._hiddenMode}}get spacing(){return this._spacing}set spacing(e){e=Utils$1.clampDimension(e),this._spacing!==e&&(this._spacing=e,this.parent&&this.parent.fit())}get isEmpty(){return null===this._root}[Symbol.iterator](){return this._root?this._root.iterAllWidgets():(0,index_es6.empty)()}widgets(){return this._root?this._root.iterUserWidgets():(0,index_es6.empty)()}selectedWidgets(){return this._root?this._root.iterSelectedWidgets():(0,index_es6.empty)()}tabBars(){return this._root?this._root.iterTabBars():(0,index_es6.empty)()}handles(){return this._root?this._root.iterHandles():(0,index_es6.empty)()}moveHandle(e,t,n){let i=e.classList.contains("lm-mod-hidden");if(!this._root||i)return;let s,r=this._root.findSplitNode(e);r&&(s="horizontal"===r.node.orientation?t-e.offsetLeft:n-e.offsetTop,0!==s&&(r.node.holdSizes(),BoxEngine.adjust(r.node.sizers,r.index,s),this.parent&&this.parent.update()))}saveLayout(){return this._root?(this._root.holdAllSizes(),{main:this._root.createConfig()}):{main:null}}restoreLayout(e){let t,n=new Set;t=e.main?Private$6.normalizeAreaConfig(e.main,n):null;let i=this.widgets(),s=this.tabBars(),r=this.handles();this._root=null;for(const e of i)n.has(e)||(e.parent=null);for(const e of s)e.dispose();for(const e of r)e.parentNode&&e.parentNode.removeChild(e);for(const e of n)e.parent=this.parent;this._root=t?Private$6.realizeAreaConfig(t,{createTabBar:e=>this._createTabBar(),createHandle:()=>this._createHandle()},this._document):null,this.parent&&(n.forEach(e=>{this.attachWidget(e)}),this.parent.fit())}addWidget(e,t={}){let n=t.ref||null,i=t.mode||"tab-after",s=null;if(this._root&&n&&(s=this._root.findTabNode(n)),n&&!s)throw new Error("Reference widget is not in the layout.");switch(e.parent=this.parent,i){case"tab-after":this._insertTab(e,n,s,!0);break;case"tab-before":this._insertTab(e,n,s,!1);break;case"split-top":this._insertSplit(e,n,s,"vertical",!1);break;case"split-left":this._insertSplit(e,n,s,"horizontal",!1);break;case"split-right":this._insertSplit(e,n,s,"horizontal",!0);break;case"split-bottom":this._insertSplit(e,n,s,"vertical",!0);break;case"merge-top":this._insertSplit(e,n,s,"vertical",!1,!0);break;case"merge-left":this._insertSplit(e,n,s,"horizontal",!1,!0);break;case"merge-right":this._insertSplit(e,n,s,"horizontal",!0,!0);break;case"merge-bottom":this._insertSplit(e,n,s,"vertical",!0,!0)}this.parent&&(this.attachWidget(e),this.parent.fit())}removeWidget(e){this._removeWidget(e),this.parent&&(this.detachWidget(e),this.parent.fit())}hitTestTabAreas(e,t){if(!this._root||!this.parent||!this.parent.isVisible)return null;this._box||(this._box=ElementExt.boxSizing(this.parent.node));let n=this.parent.node.getBoundingClientRect(),i=e-n.left-this._box.borderLeft,s=t-n.top-this._box.borderTop,r=this._root.hitTestTabNodes(i,s);if(!r)return null;let{tabBar:o,top:a,left:l,width:c,height:d}=r,u=this._box.borderLeft+this._box.borderRight,h=this._box.borderTop+this._box.borderBottom;return{tabBar:o,x:i,y:s,top:a,left:l,right:n.width-u-(l+c),bottom:n.height-h-(a+d),width:c,height:d}}init(){super.init();for(const e of this)this.attachWidget(e);for(const e of this.handles())this.parent.node.appendChild(e);this.parent.fit()}attachWidget(e){this.parent.node!==e.node.parentNode&&(this._items.set(e,new LayoutItem(e)),this.parent.isAttached&&MessageLoop.sendMessage(e,Widget.Msg.BeforeAttach),this.parent.node.appendChild(e.node),this.parent.isAttached&&MessageLoop.sendMessage(e,Widget.Msg.AfterAttach))}detachWidget(e){if(this.parent.node!==e.node.parentNode)return;this.parent.isAttached&&MessageLoop.sendMessage(e,Widget.Msg.BeforeDetach),this.parent.node.removeChild(e.node),this.parent.isAttached&&MessageLoop.sendMessage(e,Widget.Msg.AfterDetach);let t=this._items.get(e);t&&(this._items.delete(e),t.dispose())}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}_removeWidget(e){if(!this._root)return;let t=this._root.findTabNode(e);if(!t)return;if(Private$6.removeAria(e),t.tabBar.titles.length>1)return t.tabBar.removeTab(e.title),void(this._hiddenMode===Widget.HiddenMode.Scale&&1==t.tabBar.titles.length&&(t.tabBar.titles[0].owner.hiddenMode=Widget.HiddenMode.Display));if(t.tabBar.dispose(),this._root===t)return void(this._root=null);this._root.holdAllSizes();let n=t.parent;t.parent=null;let i=index_es6.ArrayExt.removeFirstOf(n.children,t),s=index_es6.ArrayExt.removeAt(n.handles,i);if(index_es6.ArrayExt.removeAt(n.sizers,i),s.parentNode&&s.parentNode.removeChild(s),n.children.length>1)return void n.syncHandles();let r=n.parent;n.parent=null;let o=n.children[0],a=n.handles[0];if(n.children.length=0,n.handles.length=0,n.sizers.length=0,a.parentNode&&a.parentNode.removeChild(a),this._root===n)return o.parent=null,void(this._root=o);let l=r,c=l.children.indexOf(n);if(o instanceof Private$6.TabLayoutNode)return o.parent=l,void(l.children[c]=o);let d=index_es6.ArrayExt.removeAt(l.handles,c);index_es6.ArrayExt.removeAt(l.children,c),index_es6.ArrayExt.removeAt(l.sizers,c),d.parentNode&&d.parentNode.removeChild(d);for(let e=0,t=o.children.length;e<t;++e){let t=o.children[e],n=o.handles[e],i=o.sizers[e];index_es6.ArrayExt.insert(l.children,c+e,t),index_es6.ArrayExt.insert(l.handles,c+e,n),index_es6.ArrayExt.insert(l.sizers,c+e,i),t.parent=l}o.children.length=0,o.handles.length=0,o.sizers.length=0,o.parent=null,l.syncHandles()}_createTabNode(e){let t=new Private$6.TabLayoutNode(this._createTabBar());return t.tabBar.addTab(e.title),Private$6.addAria(e,t.tabBar),t}_insertTab(e,t,n,i){if(e===t)return;if(!this._root){let t=new Private$6.TabLayoutNode(this._createTabBar());return t.tabBar.addTab(e.title),this._root=t,void Private$6.addAria(e,t.tabBar)}let s;n||(n=this._root.findFirstTabNode()),-1===n.tabBar.titles.indexOf(e.title)&&(this._removeWidget(e),e.hide()),s=t?n.tabBar.titles.indexOf(t.title):n.tabBar.currentIndex,this._hiddenMode===Widget.HiddenMode.Scale?0===n.tabBar.titles.length?e.hiddenMode=Widget.HiddenMode.Display:1==n.tabBar.titles.length?n.tabBar.titles[0].owner.hiddenMode=Widget.HiddenMode.Scale:e.hiddenMode=Widget.HiddenMode.Scale:e.hiddenMode=this._hiddenMode,n.tabBar.insertTab(s+(i?1:0),e.title),Private$6.addAria(e,n.tabBar)}_insertSplit(e,t,n,i,s,r=!1){if(e===t&&n&&1===n.tabBar.titles.length)return;if(this._removeWidget(e),!this._root)return void(this._root=this._createTabNode(e));if(!n||!n.parent){let t=this._splitRoot(i),r=s?t.children.length:0;t.normalizeSizes();let o=Private$6.createSizer(n?1:Private$6.GOLDEN_RATIO),a=this._createTabNode(e);return index_es6.ArrayExt.insert(t.children,r,a),index_es6.ArrayExt.insert(t.sizers,r,o),index_es6.ArrayExt.insert(t.handles,r,this._createHandle()),a.parent=t,t.normalizeSizes(),void t.syncHandles()}let o=n.parent;if(o.orientation===i){let t=o.children.indexOf(n);if(r){let n=t+(s?1:-1),i=o.children[n];if(i instanceof Private$6.TabLayoutNode)return this._insertTab(e,null,i,!0),void++i.tabBar.currentIndex}o.normalizeSizes();let i=o.sizers[t].sizeHint/=2,a=t+(s?1:0),l=this._createTabNode(e);return index_es6.ArrayExt.insert(o.children,a,l),index_es6.ArrayExt.insert(o.sizers,a,Private$6.createSizer(i)),index_es6.ArrayExt.insert(o.handles,a,this._createHandle()),l.parent=o,void o.syncHandles()}let a=index_es6.ArrayExt.removeFirstOf(o.children,n),l=new Private$6.SplitLayoutNode(i);l.normalized=!0,l.children.push(n),l.sizers.push(Private$6.createSizer(.5)),l.handles.push(this._createHandle()),n.parent=l;let c=s?1:0,d=this._createTabNode(e);index_es6.ArrayExt.insert(l.children,c,d),index_es6.ArrayExt.insert(l.sizers,c,Private$6.createSizer(.5)),index_es6.ArrayExt.insert(l.handles,c,this._createHandle()),d.parent=l,l.syncHandles(),index_es6.ArrayExt.insert(o.children,a,l),l.parent=o}_splitRoot(e){let t=this._root;if(t instanceof Private$6.SplitLayoutNode&&t.orientation===e)return t;let n=this._root=new Private$6.SplitLayoutNode(e);return t&&(n.children.push(t),n.sizers.push(Private$6.createSizer(0)),n.handles.push(this._createHandle()),t.parent=n),n}_fit(){let e=0,t=0;if(this._root){let n=this._root.fit(this._spacing,this._items);e=n.minWidth,t=n.minHeight}let n=this._box=ElementExt.boxSizing(this.parent.node);e+=n.horizontalSum,t+=n.verticalSum;let i=this.parent.node.style;i.minWidth=`${e}px`,i.minHeight=`${t}px`,this._dirty=!0,this.parent.parent&&MessageLoop.sendMessage(this.parent.parent,Widget.Msg.FitRequest),this._dirty&&MessageLoop.sendMessage(this.parent,Widget.Msg.UpdateRequest)}_update(e,t){if(this._dirty=!1,!this._root)return;e<0&&(e=this.parent.node.offsetWidth),t<0&&(t=this.parent.node.offsetHeight),this._box||(this._box=ElementExt.boxSizing(this.parent.node));let n=this._box.paddingTop,i=this._box.paddingLeft,s=e-this._box.horizontalSum,r=t-this._box.verticalSum;this._root.update(n,i,s,r,this._spacing,this._items)}_createTabBar(){let e=this.renderer.createTabBar(this._document);return e.orientation="horizontal",this.parent&&this.attachWidget(e),e}_createHandle(){let e=this.renderer.createHandle(),t=e.style;return t.position="absolute",t.contain="strict",t.top="0",t.left="0",t.width="0",t.height="0",this.parent&&this.parent.node.appendChild(e),e}}!function(e){function t(e){let t=new BoxSizer;return t.sizeHint=e,t.size=e,t}e.GOLDEN_RATIO=.618,e.createSizer=t,e.normalizeAreaConfig=function e(t,n){let i;return i="tab-area"===t.type?function(e,t){if(0===e.widgets.length)return null;let n=[];for(const i of e.widgets)t.has(i)||(t.add(i),n.push(i));if(0===n.length)return null;let i=e.currentIndex;return-1!==i&&(i<0||i>=n.length)&&(i=0),{type:"tab-area",widgets:n,currentIndex:i}}(t,n):function(t,n){let i=t.orientation,s=[],r=[];for(let o=0,a=t.children.length;o<a;++o){let a=e(t.children[o],n);a&&("tab-area"===a.type||a.orientation!==i?(s.push(a),r.push(Math.abs(t.sizes[o]||0))):(s.push(...a.children),r.push(...a.sizes)))}return 0===s.length?null:1===s.length?s[0]:{type:"split-area",orientation:i,children:s,sizes:r}}(t,n),i},e.realizeAreaConfig=function s(r,o,a){let l;return l="tab-area"===r.type?function(t,i,s){let r=i.createTabBar(s);for(const n of t.widgets)n.hide(),r.addTab(n.title),e.addAria(n,r);return r.currentIndex=t.currentIndex,new n(r)}(r,o,a):function(e,n,r){let o=new i(e.orientation);return e.children.forEach((i,a)=>{let l=s(i,n,r),c=t(e.sizes[a]),d=n.createHandle();o.children.push(l),o.handles.push(d),o.sizers.push(c),l.parent=o}),o.syncHandles(),o.normalizeSizes(),o}(r,o,a),l};class n{constructor(e){this.parent=null,this._top=0,this._left=0,this._width=0,this._height=0;let t=new BoxSizer,n=new BoxSizer;t.stretch=0,n.stretch=1,this.tabBar=e,this.sizers=[t,n]}get top(){return this._top}get left(){return this._left}get width(){return this._width}get height(){return this._height}*iterAllWidgets(){yield this.tabBar,yield*this.iterUserWidgets()}*iterUserWidgets(){for(const e of this.tabBar.titles)yield e.owner}*iterSelectedWidgets(){let e=this.tabBar.currentTitle;e&&(yield e.owner)}*iterTabBars(){yield this.tabBar}*iterHandles(){}findTabNode(e){return-1!==this.tabBar.titles.indexOf(e.title)?this:null}findSplitNode(e){return null}findFirstTabNode(){return this}hitTestTabNodes(e,t){return e<this._left||e>=this._left+this._width||t<this._top||t>=this._top+this._height?null:this}createConfig(){return{type:"tab-area",widgets:this.tabBar.titles.map(e=>e.owner),currentIndex:this.tabBar.currentIndex}}holdAllSizes(){}fit(e,t){let n=0,i=0,s=t.get(this.tabBar),r=this.tabBar.currentTitle,o=r?t.get(r.owner):void 0,[a,l]=this.sizers;return s&&s.fit(),o&&o.fit(),s&&!s.isHidden?(n=Math.max(n,s.minWidth),i+=s.minHeight,a.minSize=s.minHeight,a.maxSize=s.maxHeight):(a.minSize=0,a.maxSize=0),o&&!o.isHidden?(n=Math.max(n,o.minWidth),i+=o.minHeight,l.minSize=o.minHeight,l.maxSize=1/0):(l.minSize=0,l.maxSize=1/0),{minWidth:n,minHeight:i,maxWidth:1/0,maxHeight:1/0}}update(e,t,n,i,s,r){this._top=t,this._left=e,this._width=n,this._height=i;let o=r.get(this.tabBar),a=this.tabBar.currentTitle,l=a?r.get(a.owner):void 0;if(BoxEngine.calc(this.sizers,i),o&&!o.isHidden){let i=this.sizers[0].size;o.update(e,t,n,i),t+=i}if(l&&!l.isHidden){let i=this.sizers[1].size;l.update(e,t,n,i)}}}e.TabLayoutNode=n;class i{constructor(e){this.parent=null,this.normalized=!1,this.children=[],this.sizers=[],this.handles=[],this.orientation=e}*iterAllWidgets(){for(const e of this.children)yield*e.iterAllWidgets()}*iterUserWidgets(){for(const e of this.children)yield*e.iterUserWidgets()}*iterSelectedWidgets(){for(const e of this.children)yield*e.iterSelectedWidgets()}*iterTabBars(){for(const e of this.children)yield*e.iterTabBars()}*iterHandles(){yield*this.handles;for(const e of this.children)yield*e.iterHandles()}findTabNode(e){for(let t=0,n=this.children.length;t<n;++t){let n=this.children[t].findTabNode(e);if(n)return n}return null}findSplitNode(e){let t=this.handles.indexOf(e);if(-1!==t)return{index:t,node:this};for(let t=0,n=this.children.length;t<n;++t){let n=this.children[t].findSplitNode(e);if(n)return n}return null}findFirstTabNode(){return 0===this.children.length?null:this.children[0].findFirstTabNode()}hitTestTabNodes(e,t){for(let n=0,i=this.children.length;n<i;++n){let i=this.children[n].hitTestTabNodes(e,t);if(i)return i}return null}createConfig(){let e=this.orientation,t=this.createNormalizedSizes();return{type:"split-area",orientation:e,children:this.children.map(e=>e.createConfig()),sizes:t}}syncHandles(){this.handles.forEach((e,t)=>{e.setAttribute("data-orientation",this.orientation),t===this.handles.length-1?e.classList.add("lm-mod-hidden"):e.classList.remove("lm-mod-hidden")})}holdSizes(){for(const e of this.sizers)e.sizeHint=e.size}holdAllSizes(){for(const e of this.children)e.holdAllSizes();this.holdSizes()}normalizeSizes(){let e=this.sizers.length;if(0===e)return;this.holdSizes();let t=this.sizers.reduce((e,t)=>e+t.sizeHint,0);if(0===t)for(const t of this.sizers)t.size=t.sizeHint=1/e;else for(const e of this.sizers)e.size=e.sizeHint/=t;this.normalized=!0}createNormalizedSizes(){let e=this.sizers.length;if(0===e)return[];let t=this.sizers.map(e=>e.size),n=t.reduce((e,t)=>e+t,0);if(0===n)for(let n=t.length-1;n>-1;n--)t[n]=1/e;else for(let e=t.length-1;e>-1;e--)t[e]/=n;return t}fit(e,t){let n="horizontal"===this.orientation,i=Math.max(0,this.children.length-1)*e,s=n?i:0,r=n?0:i;for(let i=0,o=this.children.length;i<o;++i){let o=this.children[i].fit(e,t);n?(r=Math.max(r,o.minHeight),s+=o.minWidth,this.sizers[i].minSize=o.minWidth):(s=Math.max(s,o.minWidth),r+=o.minHeight,this.sizers[i].minSize=o.minHeight)}return{minWidth:s,minHeight:r,maxWidth:1/0,maxHeight:1/0}}update(e,t,n,i,s,r){let o="horizontal"===this.orientation,a=Math.max(0,this.children.length-1)*s,l=Math.max(0,(o?n:i)-a);if(this.normalized){for(const e of this.sizers)e.sizeHint*=l;this.normalized=!1}BoxEngine.calc(this.sizers,l);for(let a=0,l=this.children.length;a<l;++a){let l=this.children[a],c=this.sizers[a].size,d=this.handles[a].style;o?(l.update(e,t,c,i,s,r),e+=c,d.top=`${t}px`,d.left=`${e}px`,d.width=`${s}px`,d.height=`${i}px`,e+=s):(l.update(e,t,n,c,s,r),t+=c,d.top=`${t}px`,d.left=`${e}px`,d.width=`${n}px`,d.height=`${s}px`,t+=s)}}}e.SplitLayoutNode=i,e.addAria=function(e,t){e.node.setAttribute("role","tabpanel");let n=t.renderer;if(n instanceof TabBar.Renderer){let t=n.createTabKey({title:e.title,current:!1,zIndex:0});e.node.setAttribute("aria-labelledby",t)}},e.removeAria=function(e){e.node.removeAttribute("role"),e.node.removeAttribute("aria-labelledby")}}(Private$6||(Private$6={}));class DockPanel extends Widget{constructor(e={}){super(),this._drag=null,this._tabsMovable=!0,this._tabsConstrained=!1,this._addButtonEnabled=!1,this._pressData=null,this._layoutModified=new signaling_dist_index_es6.Signal(this),this._addRequested=new signaling_dist_index_es6.Signal(this),this.addClass("lm-DockPanel"),this._document=e.document||document,this._mode=e.mode||"multiple-document",this._renderer=e.renderer||DockPanel.defaultRenderer,this._edges=e.edges||Private$5.DEFAULT_EDGES,void 0!==e.tabsMovable&&(this._tabsMovable=e.tabsMovable),void 0!==e.tabsConstrained&&(this._tabsConstrained=e.tabsConstrained),void 0!==e.addButtonEnabled&&(this._addButtonEnabled=e.addButtonEnabled),this.dataset.mode=this._mode;let t={createTabBar:()=>this._createTabBar(),createHandle:()=>this._createHandle()};this.layout=new DockLayout({document:this._document,renderer:t,spacing:e.spacing,hiddenMode:e.hiddenMode}),this.overlay=e.overlay||new DockPanel.Overlay,this.node.appendChild(this.overlay.node)}dispose(){this._releaseMouse(),this.overlay.hide(0),this._drag&&this._drag.dispose(),super.dispose()}get hiddenMode(){return this.layout.hiddenMode}set hiddenMode(e){this.layout.hiddenMode=e}get layoutModified(){return this._layoutModified}get addRequested(){return this._addRequested}get renderer(){return this.layout.renderer}get spacing(){return this.layout.spacing}set spacing(e){this.layout.spacing=e}get mode(){return this._mode}set mode(e){if(this._mode===e)return;this._mode=e,this.dataset.mode=e;let t=this.layout;switch(e){case"multiple-document":for(const e of t.tabBars())e.show();break;case"single-document":t.restoreLayout(Private$5.createSingleDocumentConfig(this));break;default:throw"unreachable"}MessageLoop.postMessage(this,Private$5.LayoutModified)}get tabsMovable(){return this._tabsMovable}set tabsMovable(e){this._tabsMovable=e;for(const t of this.tabBars())t.tabsMovable=e}get tabsConstrained(){return this._tabsConstrained}set tabsConstrained(e){this._tabsConstrained=e}get addButtonEnabled(){return this._addButtonEnabled}set addButtonEnabled(e){this._addButtonEnabled=e;for(const t of this.tabBars())t.addButtonEnabled=e}get isEmpty(){return this.layout.isEmpty}*widgets(){yield*this.layout.widgets()}*selectedWidgets(){yield*this.layout.selectedWidgets()}*tabBars(){yield*this.layout.tabBars()}*handles(){yield*this.layout.handles()}selectWidget(e){let t=(0,index_es6.find)(this.tabBars(),t=>-1!==t.titles.indexOf(e.title));if(!t)throw new Error("Widget is not contained in the dock panel.");t.currentTitle=e.title}activateWidget(e){this.selectWidget(e),e.activate()}saveLayout(){return this.layout.saveLayout()}restoreLayout(e){this._mode="multiple-document",this.layout.restoreLayout(e),(Platform.IS_EDGE||Platform.IS_IE)&&MessageLoop.flush(),MessageLoop.postMessage(this,Private$5.LayoutModified)}addWidget(e,t={}){"single-document"===this._mode?this.layout.addWidget(e):this.layout.addWidget(e,t),MessageLoop.postMessage(this,Private$5.LayoutModified)}processMessage(e){"layout-modified"===e.type?this._layoutModified.emit(void 0):super.processMessage(e)}handleEvent(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"pointerdown":this._evtPointerDown(e);break;case"pointermove":this._evtPointerMove(e);break;case"pointerup":this._evtPointerUp(e);break;case"keydown":this._evtKeyDown(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}}onBeforeAttach(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("pointerdown",this)}onAfterDetach(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("pointerdown",this),this._releaseMouse()}onChildAdded(e){Private$5.isGeneratedTabBarProperty.get(e.child)||e.child.addClass("lm-DockPanel-widget")}onChildRemoved(e){Private$5.isGeneratedTabBarProperty.get(e.child)||(e.child.removeClass("lm-DockPanel-widget"),MessageLoop.postMessage(this,Private$5.LayoutModified))}_evtDragEnter(e){e.mimeData.hasData("application/vnd.lumino.widget-factory")&&(e.preventDefault(),e.stopPropagation())}_evtDragLeave(e){e.preventDefault(),this._tabsConstrained&&e.source!==this||(e.stopPropagation(),this.overlay.hide(1))}_evtDragOver(e){e.preventDefault(),this._tabsConstrained&&e.source!==this||"invalid"===this._showOverlay(e.clientX,e.clientY)?e.dropAction="none":(e.stopPropagation(),e.dropAction=e.proposedAction)}_evtDrop(e){if(e.preventDefault(),this.overlay.hide(0),"none"===e.proposedAction)return void(e.dropAction="none");let{clientX:t,clientY:n}=e,{zone:i,target:s}=Private$5.findDropTarget(this,t,n,this._edges);if(this._tabsConstrained&&e.source!==this||"invalid"===i)return void(e.dropAction="none");let r=e.mimeData.getData("application/vnd.lumino.widget-factory");if("function"!=typeof r)return void(e.dropAction="none");let o=r();if(!(o instanceof Widget))return void(e.dropAction="none");if(o.contains(this))return void(e.dropAction="none");let a=s?Private$5.getDropRef(s.tabBar):null;switch(i){case"root-all":this.addWidget(o);break;case"root-top":this.addWidget(o,{mode:"split-top"});break;case"root-left":this.addWidget(o,{mode:"split-left"});break;case"root-right":this.addWidget(o,{mode:"split-right"});break;case"root-bottom":this.addWidget(o,{mode:"split-bottom"});break;case"widget-all":case"widget-tab":this.addWidget(o,{mode:"tab-after",ref:a});break;case"widget-top":this.addWidget(o,{mode:"split-top",ref:a});break;case"widget-left":this.addWidget(o,{mode:"split-left",ref:a});break;case"widget-right":this.addWidget(o,{mode:"split-right",ref:a});break;case"widget-bottom":this.addWidget(o,{mode:"split-bottom",ref:a});break;default:throw"unreachable"}e.dropAction=e.proposedAction,e.stopPropagation(),this.activateWidget(o)}_evtKeyDown(e){e.preventDefault(),e.stopPropagation(),27===e.keyCode&&(this._releaseMouse(),MessageLoop.postMessage(this,Private$5.LayoutModified))}_evtPointerDown(e){if(0!==e.button)return;let t=this.layout,n=e.target,i=(0,index_es6.find)(t.handles(),e=>e.contains(n));if(!i)return;e.preventDefault(),e.stopPropagation(),this._document.addEventListener("keydown",this,!0),this._document.addEventListener("pointerup",this,!0),this._document.addEventListener("pointermove",this,!0),this._document.addEventListener("contextmenu",this,!0);let s=i.getBoundingClientRect(),r=e.clientX-s.left,o=e.clientY-s.top,a=window.getComputedStyle(i),l=Drag.overrideCursor(a.cursor,this._document);this._pressData={handle:i,deltaX:r,deltaY:o,override:l}}_evtPointerMove(e){if(!this._pressData)return;e.preventDefault(),e.stopPropagation();let t=this.node.getBoundingClientRect(),n=e.clientX-t.left-this._pressData.deltaX,i=e.clientY-t.top-this._pressData.deltaY;this.layout.moveHandle(this._pressData.handle,n,i)}_evtPointerUp(e){0===e.button&&(e.preventDefault(),e.stopPropagation(),this._releaseMouse(),MessageLoop.postMessage(this,Private$5.LayoutModified))}_releaseMouse(){this._pressData&&(this._pressData.override.dispose(),this._pressData=null,this._document.removeEventListener("keydown",this,!0),this._document.removeEventListener("pointerup",this,!0),this._document.removeEventListener("pointermove",this,!0),this._document.removeEventListener("contextmenu",this,!0))}_showOverlay(e,t){let n,i,s,r,{zone:o,target:a}=Private$5.findDropTarget(this,e,t,this._edges);if("invalid"===o)return this.overlay.hide(100),o;let l=ElementExt.boxSizing(this.node),c=this.node.getBoundingClientRect();switch(o){case"root-all":n=l.paddingTop,i=l.paddingLeft,s=l.paddingRight,r=l.paddingBottom;break;case"root-top":n=l.paddingTop,i=l.paddingLeft,s=l.paddingRight,r=c.height*Private$5.GOLDEN_RATIO;break;case"root-left":n=l.paddingTop,i=l.paddingLeft,s=c.width*Private$5.GOLDEN_RATIO,r=l.paddingBottom;break;case"root-right":n=l.paddingTop,i=c.width*Private$5.GOLDEN_RATIO,s=l.paddingRight,r=l.paddingBottom;break;case"root-bottom":n=c.height*Private$5.GOLDEN_RATIO,i=l.paddingLeft,s=l.paddingRight,r=l.paddingBottom;break;case"widget-all":n=a.top,i=a.left,s=a.right,r=a.bottom;break;case"widget-top":n=a.top,i=a.left,s=a.right,r=a.bottom+a.height/2;break;case"widget-left":n=a.top,i=a.left,s=a.right+a.width/2,r=a.bottom;break;case"widget-right":n=a.top,i=a.left+a.width/2,s=a.right,r=a.bottom;break;case"widget-bottom":n=a.top+a.height/2,i=a.left,s=a.right,r=a.bottom;break;case"widget-tab":{const e=a.tabBar.node.getBoundingClientRect().height;n=a.top,i=a.left,s=a.right,r=a.bottom+a.height-e;break}default:throw"unreachable"}return this.overlay.show({top:n,left:i,right:s,bottom:r}),o}_createTabBar(){let e=this._renderer.createTabBar(this._document);return Private$5.isGeneratedTabBarProperty.set(e,!0),"single-document"===this._mode&&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}_createHandle(){return this._renderer.createHandle()}_onTabMoved(){MessageLoop.postMessage(this,Private$5.LayoutModified)}_onCurrentChanged(e,t){let{previousTitle:n,currentTitle:i}=t;n&&n.owner.hide(),i&&i.owner.show(),(Platform.IS_EDGE||Platform.IS_IE)&&MessageLoop.flush(),MessageLoop.postMessage(this,Private$5.LayoutModified)}_onTabAddRequested(e){this._addRequested.emit(e)}_onTabActivateRequested(e,t){t.title.owner.activate()}_onTabCloseRequested(e,t){t.title.owner.close()}_onTabDetachRequested(e,t){if(this._drag)return;e.releaseMouse();let{title:n,tab:i,clientX:s,clientY:r,offset:o}=t,a=new dist.MimeData;a.setData("application/vnd.lumino.widget-factory",()=>n.owner);let l=i.cloneNode(!0);o&&(l.style.top=`-${o.y}px`,l.style.left=`-${o.x}px`),this._drag=new Drag({document:this._document,mimeData:a,dragImage:l,proposedAction:"move",supportedActions:"move",source:this}),i.classList.add("lm-mod-hidden"),this._drag.start(s,r).then(()=>{this._drag=null,i.classList.remove("lm-mod-hidden")})}}!function(e){e.Overlay=class{constructor(){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.style.position="absolute",this.node.style.contain="strict"}show(e){let t=this.node.style;t.top=`${e.top}px`,t.left=`${e.left}px`,t.right=`${e.right}px`,t.bottom=`${e.bottom}px`,clearTimeout(this._timer),this._timer=-1,this._hidden&&(this._hidden=!1,this.node.classList.remove("lm-mod-hidden"))}hide(e){if(!this._hidden)return e<=0?(clearTimeout(this._timer),this._timer=-1,this._hidden=!0,void this.node.classList.add("lm-mod-hidden")):void(-1===this._timer&&(this._timer=window.setTimeout(()=>{this._timer=-1,this._hidden=!0,this.node.classList.add("lm-mod-hidden")},e)))}};class t{createTabBar(e){let t=new TabBar({document:e});return t.addClass("lm-DockPanel-tabBar"),t}createHandle(){let e=document.createElement("div");return e.className="lm-DockPanel-handle",e}}e.Renderer=t,e.defaultRenderer=new t}(DockPanel||(DockPanel={})),function(e){e.GOLDEN_RATIO=.618,e.DEFAULT_EDGES={top:12,right:40,bottom:40,left:40},e.LayoutModified=new ConflatableMessage("layout-modified"),e.isGeneratedTabBarProperty=new dist_index_es6.AttachedProperty({name:"isGeneratedTabBar",create:()=>!1}),e.createSingleDocumentConfig=function(e){if(e.isEmpty)return{main:null};let t=Array.from(e.widgets()),n=e.selectedWidgets().next().value,i=n?t.indexOf(n):-1;return{main:{type:"tab-area",widgets:t,currentIndex:i}}},e.findDropTarget=function(e,t,n,i){if(!ElementExt.hitTest(e.node,t,n))return{zone:"invalid",target:null};let s=e.layout;if(s.isEmpty)return{zone:"root-all",target:null};if("multiple-document"===e.mode){let s=e.node.getBoundingClientRect(),r=t-s.left+1,o=n-s.top+1,a=s.right-t,l=s.bottom-n;switch(Math.min(o,a,l,r)){case o:if(o<i.top)return{zone:"root-top",target:null};break;case a:if(a<i.right)return{zone:"root-right",target:null};break;case l:if(l<i.bottom)return{zone:"root-bottom",target:null};break;case r:if(r<i.left)return{zone:"root-left",target:null};break;default:throw"unreachable"}}let r=s.hitTestTabAreas(t,n);if(!r)return{zone:"invalid",target:null};if("single-document"===e.mode)return{zone:"widget-all",target:r};let o=r.x-r.left+1,a=r.y-r.top+1,l=r.left+r.width-r.x,c=r.top+r.height-r.y;if(a<r.tabBar.node.getBoundingClientRect().height)return{zone:"widget-tab",target:r};let d,u=Math.round(r.width/3),h=Math.round(r.height/3);if(o>u&&l>u&&a>h&&c>h)return{zone:"widget-all",target:r};switch(o/=u,a/=h,l/=u,c/=h,Math.min(o,a,l,c)){case o:d="widget-left";break;case a:d="widget-top";break;case l:d="widget-right";break;case c:d="widget-bottom";break;default:throw"unreachable"}return{zone:d,target:r}},e.getDropRef=function(e){return 0===e.titles.length?null:e.currentTitle?e.currentTitle.owner:e.titles[e.titles.length-1].owner}}(Private$5||(Private$5={}));class FocusTracker{constructor(){this._counter=0,this._widgets=[],this._activeWidget=null,this._currentWidget=null,this._numbers=new Map,this._nodes=new Map,this._activeChanged=new signaling_dist_index_es6.Signal(this),this._currentChanged=new signaling_dist_index_es6.Signal(this)}dispose(){if(!(this._counter<0)){this._counter=-1,signaling_dist_index_es6.Signal.clearData(this);for(const e of this._widgets)e.node.removeEventListener("focus",this,!0),e.node.removeEventListener("blur",this,!0);this._activeWidget=null,this._currentWidget=null,this._nodes.clear(),this._numbers.clear(),this._widgets.length=0}}get currentChanged(){return this._currentChanged}get activeChanged(){return this._activeChanged}get isDisposed(){return this._counter<0}get currentWidget(){return this._currentWidget}get activeWidget(){return this._activeWidget}get widgets(){return this._widgets}focusNumber(e){let t=this._numbers.get(e);return void 0===t?-1:t}has(e){return this._numbers.has(e)}add(e){if(this._numbers.has(e))return;let t=e.node.contains(document.activeElement),n=t?this._counter++:-1;this._widgets.push(e),this._numbers.set(e,n),this._nodes.set(e.node,e),e.node.addEventListener("focus",this,!0),e.node.addEventListener("blur",this,!0),e.disposed.connect(this._onWidgetDisposed,this),t&&this._setWidgets(e,e)}remove(e){if(!this._numbers.has(e))return;if(e.disposed.disconnect(this._onWidgetDisposed,this),e.node.removeEventListener("focus",this,!0),e.node.removeEventListener("blur",this,!0),index_es6.ArrayExt.removeFirstOf(this._widgets,e),this._nodes.delete(e.node),this._numbers.delete(e),this._currentWidget!==e)return;let t=this._widgets.filter(e=>-1!==this._numbers.get(e)),n=(0,index_es6.max)(t,(e,t)=>this._numbers.get(e)-this._numbers.get(t))||null;this._setWidgets(n,null)}handleEvent(e){switch(e.type){case"focus":this._evtFocus(e);break;case"blur":this._evtBlur(e)}}_setWidgets(e,t){let n=this._currentWidget;this._currentWidget=e;let i=this._activeWidget;this._activeWidget=t,n!==e&&this._currentChanged.emit({oldValue:n,newValue:e}),i!==t&&this._activeChanged.emit({oldValue:i,newValue:t})}_evtFocus(e){let t=this._nodes.get(e.currentTarget);t!==this._currentWidget&&this._numbers.set(t,this._counter++),this._setWidgets(t,t)}_evtBlur(e){let t=this._nodes.get(e.currentTarget),n=e.relatedTarget;n&&(t.node.contains(n)||(0,index_es6.find)(this._widgets,e=>e.node.contains(n)))||this._setWidgets(this._currentWidget,null)}_onWidgetDisposed(e){this.remove(e)}}class GridLayout extends Layout{constructor(e={}){super(e),this._dirty=!1,this._rowSpacing=4,this._columnSpacing=4,this._items=[],this._rowStarts=[],this._columnStarts=[],this._rowSizers=[new BoxSizer],this._columnSizers=[new BoxSizer],this._box=null,void 0!==e.rowCount&&Private$4.reallocSizers(this._rowSizers,e.rowCount),void 0!==e.columnCount&&Private$4.reallocSizers(this._columnSizers,e.columnCount),void 0!==e.rowSpacing&&(this._rowSpacing=Private$4.clampValue(e.rowSpacing)),void 0!==e.columnSpacing&&(this._columnSpacing=Private$4.clampValue(e.columnSpacing))}dispose(){for(const e of this._items){let t=e.widget;e.dispose(),t.dispose()}this._box=null,this._items.length=0,this._rowStarts.length=0,this._rowSizers.length=0,this._columnStarts.length=0,this._columnSizers.length=0,super.dispose()}get rowCount(){return this._rowSizers.length}set rowCount(e){e!==this.rowCount&&(Private$4.reallocSizers(this._rowSizers,e),this.parent&&this.parent.fit())}get columnCount(){return this._columnSizers.length}set columnCount(e){e!==this.columnCount&&(Private$4.reallocSizers(this._columnSizers,e),this.parent&&this.parent.fit())}get rowSpacing(){return this._rowSpacing}set rowSpacing(e){e=Private$4.clampValue(e),this._rowSpacing!==e&&(this._rowSpacing=e,this.parent&&this.parent.fit())}get columnSpacing(){return this._columnSpacing}set columnSpacing(e){e=Private$4.clampValue(e),this._columnSpacing!==e&&(this._columnSpacing=e,this.parent&&this.parent.fit())}rowStretch(e){let t=this._rowSizers[e];return t?t.stretch:-1}setRowStretch(e,t){let n=this._rowSizers[e];n&&(t=Private$4.clampValue(t),n.stretch!==t&&(n.stretch=t,this.parent&&this.parent.update()))}columnStretch(e){let t=this._columnSizers[e];return t?t.stretch:-1}setColumnStretch(e,t){let n=this._columnSizers[e];n&&(t=Private$4.clampValue(t),n.stretch!==t&&(n.stretch=t,this.parent&&this.parent.update()))}*[Symbol.iterator](){for(const e of this._items)yield e.widget}addWidget(e){-1===index_es6.ArrayExt.findFirstIndex(this._items,t=>t.widget===e)&&(this._items.push(new LayoutItem(e)),this.parent&&this.attachWidget(e))}removeWidget(e){let t=index_es6.ArrayExt.findFirstIndex(this._items,t=>t.widget===e);if(-1===t)return;let n=index_es6.ArrayExt.removeAt(this._items,t);this.parent&&this.detachWidget(e),n.dispose()}init(){super.init();for(const e of this)this.attachWidget(e)}attachWidget(e){this.parent.isAttached&&MessageLoop.sendMessage(e,Widget.Msg.BeforeAttach),this.parent.node.appendChild(e.node),this.parent.isAttached&&MessageLoop.sendMessage(e,Widget.Msg.AfterAttach),this.parent.fit()}detachWidget(e){this.parent.isAttached&&MessageLoop.sendMessage(e,Widget.Msg.BeforeDetach),this.parent.node.removeChild(e.node),this.parent.isAttached&&MessageLoop.sendMessage(e,Widget.Msg.AfterDetach),this.parent.fit()}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}_fit(){for(let e=0,t=this.rowCount;e<t;++e)this._rowSizers[e].minSize=0;for(let e=0,t=this.columnCount;e<t;++e)this._columnSizers[e].minSize=0;let e=this._items.filter(e=>!e.isHidden);for(let t=0,n=e.length;t<n;++t)e[t].fit();let t=this.rowCount-1,n=this.columnCount-1;e.sort(Private$4.rowSpanCmp);for(let n=0,i=e.length;n<i;++n){let i=e[n],s=GridLayout.getCellConfig(i.widget),r=Math.min(s.row,t),o=Math.min(s.row+s.rowSpan-1,t);Private$4.distributeMin(this._rowSizers,r,o,i.minHeight)}e.sort(Private$4.columnSpanCmp);for(let t=0,i=e.length;t<i;++t){let i=e[t],s=GridLayout.getCellConfig(i.widget),r=Math.min(s.column,n),o=Math.min(s.column+s.columnSpan-1,n);Private$4.distributeMin(this._columnSizers,r,o,i.minWidth)}if("set-no-constraint"===this.fitPolicy)return void MessageLoop.sendMessage(this.parent,Widget.Msg.UpdateRequest);let i=t*this._rowSpacing,s=n*this._columnSpacing;for(let e=0,t=this.rowCount;e<t;++e)i+=this._rowSizers[e].minSize;for(let e=0,t=this.columnCount;e<t;++e)s+=this._columnSizers[e].minSize;let r=this._box=ElementExt.boxSizing(this.parent.node);s+=r.horizontalSum,i+=r.verticalSum;let o=this.parent.node.style;o.minWidth=`${s}px`,o.minHeight=`${i}px`,this._dirty=!0,this.parent.parent&&MessageLoop.sendMessage(this.parent.parent,Widget.Msg.FitRequest),this._dirty&&MessageLoop.sendMessage(this.parent,Widget.Msg.UpdateRequest)}_update(e,t){this._dirty=!1,e<0&&(e=this.parent.node.offsetWidth),t<0&&(t=this.parent.node.offsetHeight),this._box||(this._box=ElementExt.boxSizing(this.parent.node));let n=this._box.paddingTop,i=this._box.paddingLeft,s=e-this._box.horizontalSum,r=t-this._box.verticalSum,o=this.rowCount-1,a=this.columnCount-1,l=o*this._rowSpacing,c=a*this._columnSpacing;BoxEngine.calc(this._rowSizers,Math.max(0,r-l)),BoxEngine.calc(this._columnSizers,Math.max(0,s-c));for(let e=0,t=n,i=this.rowCount;e<i;++e)this._rowStarts[e]=t,t+=this._rowSizers[e].size+this._rowSpacing;for(let e=0,t=i,n=this.columnCount;e<n;++e)this._columnStarts[e]=t,t+=this._columnSizers[e].size+this._columnSpacing;for(let e=0,t=this._items.length;e<t;++e){let t=this._items[e];if(t.isHidden)continue;let n=GridLayout.getCellConfig(t.widget),i=Math.min(n.row,o),s=Math.min(n.column,a),r=Math.min(n.row+n.rowSpan-1,o),l=Math.min(n.column+n.columnSpan-1,a),c=this._columnStarts[s],d=this._rowStarts[i],u=this._columnStarts[l]+this._columnSizers[l].size-c,h=this._rowStarts[r]+this._rowSizers[r].size-d;t.update(c,d,u,h)}}}!function(e){e.getCellConfig=function(e){return Private$4.cellConfigProperty.get(e)},e.setCellConfig=function(e,t){Private$4.cellConfigProperty.set(e,Private$4.normalizeConfig(t))}}(GridLayout||(GridLayout={})),function(e){e.cellConfigProperty=new dist_index_es6.AttachedProperty({name:"cellConfig",create:()=>({row:0,column:0,rowSpan:1,columnSpan:1}),changed:function(e){e.parent&&e.parent.layout instanceof GridLayout&&e.parent.fit()}}),e.normalizeConfig=function(e){return{row:Math.max(0,Math.floor(e.row||0)),column:Math.max(0,Math.floor(e.column||0)),rowSpan:Math.max(1,Math.floor(e.rowSpan||0)),columnSpan:Math.max(1,Math.floor(e.columnSpan||0))}},e.clampValue=function(e){return Math.max(0,Math.floor(e))},e.rowSpanCmp=function(t,n){let i=e.cellConfigProperty.get(t.widget),s=e.cellConfigProperty.get(n.widget);return i.rowSpan-s.rowSpan},e.columnSpanCmp=function(t,n){let i=e.cellConfigProperty.get(t.widget),s=e.cellConfigProperty.get(n.widget);return i.columnSpan-s.columnSpan},e.reallocSizers=function(e,t){for(t=Math.max(1,Math.floor(t));e.length<t;)e.push(new BoxSizer);e.length>t&&(e.length=t)},e.distributeMin=function(e,t,n,i){if(n<t)return;if(t===n){let n=e[t];return void(n.minSize=Math.max(n.minSize,i))}let s=0;for(let i=t;i<=n;++i)s+=e[i].minSize;if(s>=i)return;let r=(i-s)/(n-t+1);for(let i=t;i<=n;++i)e[i].minSize+=r}}(Private$4||(Private$4={}));class MenuBar extends Widget{constructor(e={}){super({node:Private$3.createNode()}),this._activeIndex=-1,this._tabFocusIndex=0,this._menus=[],this._childMenu=null,this._overflowMenu=null,this._menuItemSizes=[],this._overflowIndex=-1,this.addClass("lm-MenuBar"),this.setFlag(Widget.Flag.DisallowLayout),this.renderer=e.renderer||MenuBar.defaultRenderer,this._forceItemsPosition=e.forceItemsPosition||{forceX:!0,forceY:!0},this._overflowMenuOptions=e.overflowMenuOptions||{isVisible:!0}}dispose(){this._closeChildMenu(),this._menus.length=0,super.dispose()}get childMenu(){return this._childMenu}get overflowIndex(){return this._overflowIndex}get overflowMenu(){return this._overflowMenu}get contentNode(){return this.node.getElementsByClassName("lm-MenuBar-content")[0]}get activeMenu(){return this._menus[this._activeIndex]||null}set activeMenu(e){this.activeIndex=e?this._menus.indexOf(e):-1}get activeIndex(){return this._activeIndex}set activeIndex(e){(e<0||e>=this._menus.length)&&(e=-1),e>-1&&0===this._menus[e].items.length&&(e=-1),this._activeIndex!==e&&(this._activeIndex=e,this.update())}get menus(){return this._menus}openActiveMenu(){-1!==this._activeIndex&&(this._openChildMenu(),this._childMenu&&(this._childMenu.activeIndex=-1,this._childMenu.activateNextItem()))}addMenu(e,t=!0){this.insertMenu(this._menus.length,e,t)}insertMenu(e,t,n=!0){this._closeChildMenu();let i=this._menus.indexOf(t),s=Math.max(0,Math.min(e,this._menus.length));if(-1===i)return index_es6.ArrayExt.insert(this._menus,s,t),t.addClass("lm-MenuBar-menu"),t.aboutToClose.connect(this._onMenuAboutToClose,this),t.menuRequested.connect(this._onMenuMenuRequested,this),t.title.changed.connect(this._onTitleChanged,this),void(n&&this.update());s===this._menus.length&&s--,i!==s&&(index_es6.ArrayExt.move(this._menus,i,s),n&&this.update())}removeMenu(e,t=!0){this.removeMenuAt(this._menus.indexOf(e),t)}removeMenuAt(e,t=!0){this._closeChildMenu();let n=index_es6.ArrayExt.removeAt(this._menus,e);n&&(n.aboutToClose.disconnect(this._onMenuAboutToClose,this),n.menuRequested.disconnect(this._onMenuMenuRequested,this),n.title.changed.disconnect(this._onTitleChanged,this),n.removeClass("lm-MenuBar-menu"),t&&this.update())}clearMenus(){if(0!==this._menus.length){this._closeChildMenu();for(let e of this._menus)e.aboutToClose.disconnect(this._onMenuAboutToClose,this),e.menuRequested.disconnect(this._onMenuMenuRequested,this),e.title.changed.disconnect(this._onTitleChanged,this),e.removeClass("lm-MenuBar-menu");this._menus.length=0,this.update()}}handleEvent(e){switch(e.type){case"keydown":this._evtKeyDown(e);break;case"mousedown":this._evtMouseDown(e);break;case"mousemove":case"mouseleave":this._evtMouseMove(e);break;case"focusout":this._evtFocusOut(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}}onBeforeAttach(e){this.node.addEventListener("keydown",this),this.node.addEventListener("mousedown",this),this.node.addEventListener("mousemove",this),this.node.addEventListener("mouseleave",this),this.node.addEventListener("focusout",this),this.node.addEventListener("contextmenu",this)}onAfterDetach(e){this.node.removeEventListener("keydown",this),this.node.removeEventListener("mousedown",this),this.node.removeEventListener("mousemove",this),this.node.removeEventListener("mouseleave",this),this.node.removeEventListener("focusout",this),this.node.removeEventListener("contextmenu",this),this._closeChildMenu()}onActivateRequest(e){this.isAttached&&this._focusItemAt(0)}onResize(e){this.update(),super.onResize(e)}onUpdateRequest(e){var t;let n=this._menus,i=this.renderer,s=this._activeIndex,r=this._tabFocusIndex>=0&&this._tabFocusIndex<n.length?this._tabFocusIndex:0,o=this._overflowIndex>-1?this._overflowIndex:n.length,a=0,l=!1;o=null!==this._overflowMenu?o-1:o;let c=new Array(o);for(let e=0;e<o;++e)c[e]=i.renderItem({title:n[e].title,active:e===s,tabbable:e===r,disabled:0===n[e].items.length,onfocus:()=>{this._tabFocusIndex=e,this.activeIndex=e}}),a+=this._menuItemSizes[e],n[e].title.label===this._overflowMenuOptions.title&&(l=!0,o--);if(this._overflowMenuOptions.isVisible)if(this._overflowIndex>-1&&!l){if(null===this._overflowMenu){const e=null!==(t=this._overflowMenuOptions.title)&&void 0!==t?t:"...";this._overflowMenu=new Menu({commands:new CommandRegistry}),this._overflowMenu.title.label=e,this._overflowMenu.title.mnemonic=0,this.addMenu(this._overflowMenu,!1)}for(let e=n.length-2;e>=o;e--){const t=this.menus[e];t.title.mnemonic=0,this._overflowMenu.insertItem(0,{type:"submenu",submenu:t}),this.removeMenu(t,!1)}c[o]=i.renderItem({title:this._overflowMenu.title,active:o===s&&0!==n[o].items.length,tabbable:o===r,disabled:0===n[o].items.length,onfocus:()=>{this._tabFocusIndex=o,this.activeIndex=o}}),o++}else if(null!==this._overflowMenu){let e=this._overflowMenu.items,t=this.node.offsetWidth,s=this._overflowMenu.items.length;for(let l=0;l<s;++l){let s=n.length-1-l;if(t-a>this._menuItemSizes[s]){let t=e[0].submenu;this._overflowMenu.removeItemAt(0),this.insertMenu(o,t,!1),c[o]=i.renderItem({title:t.title,active:!1,tabbable:o===r,disabled:0===n[o].items.length,onfocus:()=>{this._tabFocusIndex=o,this.activeIndex=o}}),o++}}0===this._overflowMenu.items.length&&(this.removeMenu(this._overflowMenu,!1),c.pop(),this._overflowMenu=null,this._overflowIndex=-1)}VirtualDOM.render(c,this.contentNode),this._updateOverflowIndex()}_updateOverflowIndex(){if(!this._overflowMenuOptions.isVisible)return;const e=this.contentNode.childNodes;let t=this.node.offsetWidth,n=0,i=-1,s=e.length;if(0==this._menuItemSizes.length)for(let r=0;r<s;r++){let s=e[r];n+=s.offsetWidth,this._menuItemSizes.push(s.offsetWidth),n>t&&-1===i&&(i=r)}else for(let e=0;e<this._menuItemSizes.length;e++)if(n+=this._menuItemSizes[e],n>t){i=e;break}this._overflowIndex=i}_evtKeyDown(e){let t=e.keyCode;if(9===t)return void(this.activeIndex=-1);if(e.preventDefault(),e.stopPropagation(),13===t||32===t||38===t||40===t){if(this.activeIndex=this._tabFocusIndex,this.activeIndex!==this._tabFocusIndex)return;return void this.openActiveMenu()}if(27===t)return this._closeChildMenu(),void this._focusItemAt(this.activeIndex);if(37===t||39===t){let e=37===t?-1:1,n=this._tabFocusIndex+e,i=this._menus.length;for(let t=0;t<i;t++){let s=(i+n+e*t)%i;if(this._menus[s].items.length)return void this._focusItemAt(s)}return}let n=getKeyboardLayout().keyForKeydownEvent(e);if(!n)return;let i=this._activeIndex+1,s=Private$3.findMnemonic(this._menus,n,i);-1===s.index||s.multiple?-1!==s.index?(this.activeIndex=s.index,this._focusItemAt(this.activeIndex)):-1!==s.auto&&(this.activeIndex=s.auto,this._focusItemAt(this.activeIndex)):(this.activeIndex=s.index,this.openActiveMenu())}_evtMouseDown(e){if(!ElementExt.hitTest(this.node,e.clientX,e.clientY))return;e.stopPropagation(),e.stopImmediatePropagation();let t=index_es6.ArrayExt.findFirstIndex(this.contentNode.children,t=>ElementExt.hitTest(t,e.clientX,e.clientY));if(-1!==t){if(0===e.button)if(this._childMenu)this._closeChildMenu(),this.activeIndex=t;else{e.preventDefault();const n=this._positionForMenu(t);Menu.saveWindowData(),this.activeIndex=t,this._openChildMenu(n)}}else this._closeChildMenu()}_evtMouseMove(e){let t=index_es6.ArrayExt.findFirstIndex(this.contentNode.children,t=>ElementExt.hitTest(t,e.clientX,e.clientY));if(t===this._activeIndex)return;if(-1===t&&this._childMenu)return;const n=t>=0&&this._childMenu?this._positionForMenu(t):null;Menu.saveWindowData(),this.activeIndex=t,n&&this._openChildMenu(n)}_positionForMenu(e){let t=this.contentNode.children[e],{left:n,bottom:i}=t.getBoundingClientRect();return{top:i,left:n}}_evtFocusOut(e){this._childMenu||this.node.contains(e.relatedTarget)||(this.activeIndex=-1)}_focusItemAt(e){const t=this.contentNode.childNodes[e];t&&t.focus()}_openChildMenu(e={}){let t=this.activeMenu;if(!t)return void this._closeChildMenu();let n=this._childMenu;if(n===t)return;this._childMenu=t,n?n.close():document.addEventListener("mousedown",this,!0),this._tabFocusIndex=this.activeIndex,MessageLoop.sendMessage(this,Widget.Msg.UpdateRequest);let{left:i,top:s}=e;void 0!==i&&void 0!==s||({left:i,top:s}=this._positionForMenu(this._activeIndex)),n||this.addClass("lm-mod-active"),t.items.length>0&&t.open(i,s,this._forceItemsPosition)}_closeChildMenu(){if(!this._childMenu)return;this.removeClass("lm-mod-active"),document.removeEventListener("mousedown",this,!0);let e=this._childMenu;this._childMenu=null,e.close(),this.activeIndex=-1}_onMenuAboutToClose(e){e===this._childMenu&&(this.removeClass("lm-mod-active"),document.removeEventListener("mousedown",this,!0),this._childMenu=null,this.activeIndex=-1)}_onMenuMenuRequested(e,t){if(e!==this._childMenu)return;let n=this._activeIndex,i=this._menus.length;switch(t){case"next":this.activeIndex=n===i-1?0:n+1;break;case"previous":this.activeIndex=0===n?i-1:n-1}this.openActiveMenu()}_onTitleChanged(){this.update()}}!function(e){class t{renderItem(e){let t=this.createItemClass(e),n=this.createItemDataset(e),i=this.createItemARIA(e);return h.li({className:t,dataset:n,...e.disabled?{}:{tabindex:e.tabbable?"0":"-1"},onfocus:e.onfocus,...i},this.renderIcon(e),this.renderLabel(e))}renderIcon(e){let t=this.createIconClass(e);return h.div({className:t},e.title.icon,e.title.iconLabel)}renderLabel(e){let t=this.formatLabel(e);return h.div({className:"lm-MenuBar-itemLabel"},t)}createItemClass(e){let t="lm-MenuBar-item";return e.title.className&&(t+=` ${e.title.className}`),e.active&&!e.disabled&&(t+=" lm-mod-active"),t}createItemDataset(e){return e.title.dataset}createItemARIA(e){return{role:"menuitem","aria-haspopup":"true","aria-disabled":e.disabled?"true":"false"}}createIconClass(e){let t="lm-MenuBar-itemIcon",n=e.title.iconClass;return n?`${t} ${n}`:t}formatLabel(e){let{label:t,mnemonic:n}=e.title;if(n<0||n>=t.length)return t;let i=t.slice(0,n),s=t.slice(n+1),r=t[n];return[i,h.span({className:"lm-MenuBar-itemMnemonic"},r),s]}}e.Renderer=t,e.defaultRenderer=new t}(MenuBar||(MenuBar={})),function(e){e.createNode=function(){let e=document.createElement("div"),t=document.createElement("ul");return t.className="lm-MenuBar-content",e.appendChild(t),t.setAttribute("role","menubar"),e},e.findMnemonic=function(e,t,n){let i=-1,s=-1,r=!1,o=t.toUpperCase();for(let t=0,a=e.length;t<a;++t){let l=(t+n)%a,c=e[l].title;if(0===c.label.length)continue;let d=c.mnemonic;d>=0&&d<c.label.length?c.label[d].toUpperCase()===o&&(-1===i?i=l:r=!0):-1===s&&c.label[0].toUpperCase()===o&&(s=l)}return{index:i,multiple:r,auto:s}}}(Private$3||(Private$3={}));class ScrollBar extends Widget{constructor(e={}){super({node:Private$2.createNode()}),this._onRepeat=()=>{if(this._repeatTimer=-1,!this._pressData)return;let e=this._pressData.part;if("thumb"===e)return;this._repeatTimer=window.setTimeout(this._onRepeat,20);let t=this._pressData.mouseX,n=this._pressData.mouseY;if("decrement"!==e)if("increment"!==e){if("track"===e){if(!ElementExt.hitTest(this.trackNode,t,n))return;let e=this.thumbNode;if(ElementExt.hitTest(e,t,n))return;let i,s=e.getBoundingClientRect();return i="horizontal"===this._orientation?t<s.left?"decrement":"increment":n<s.top?"decrement":"increment",void this._pageRequested.emit(i)}}else{if(!ElementExt.hitTest(this.incrementNode,t,n))return;this._stepRequested.emit("increment")}else{if(!ElementExt.hitTest(this.decrementNode,t,n))return;this._stepRequested.emit("decrement")}},this._value=0,this._page=10,this._maximum=100,this._repeatTimer=-1,this._pressData=null,this._thumbMoved=new signaling_dist_index_es6.Signal(this),this._stepRequested=new signaling_dist_index_es6.Signal(this),this._pageRequested=new signaling_dist_index_es6.Signal(this),this.addClass("lm-ScrollBar"),this.setFlag(Widget.Flag.DisallowLayout),this._orientation=e.orientation||"vertical",this.dataset.orientation=this._orientation,void 0!==e.maximum&&(this._maximum=Math.max(0,e.maximum)),void 0!==e.page&&(this._page=Math.max(0,e.page)),void 0!==e.value&&(this._value=Math.max(0,Math.min(e.value,this._maximum)))}get thumbMoved(){return this._thumbMoved}get stepRequested(){return this._stepRequested}get pageRequested(){return this._pageRequested}get orientation(){return this._orientation}set orientation(e){this._orientation!==e&&(this._releaseMouse(),this._orientation=e,this.dataset.orientation=e,this.update())}get value(){return this._value}set value(e){e=Math.max(0,Math.min(e,this._maximum)),this._value!==e&&(this._value=e,this.update())}get page(){return this._page}set page(e){e=Math.max(0,e),this._page!==e&&(this._page=e,this.update())}get maximum(){return this._maximum}set maximum(e){e=Math.max(0,e),this._maximum!==e&&(this._maximum=e,this._value=Math.min(this._value,e),this.update())}get decrementNode(){return this.node.getElementsByClassName("lm-ScrollBar-button")[0]}get incrementNode(){return this.node.getElementsByClassName("lm-ScrollBar-button")[1]}get trackNode(){return this.node.getElementsByClassName("lm-ScrollBar-track")[0]}get thumbNode(){return this.node.getElementsByClassName("lm-ScrollBar-thumb")[0]}handleEvent(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()}}onBeforeAttach(e){this.node.addEventListener("mousedown",this),this.update()}onAfterDetach(e){this.node.removeEventListener("mousedown",this),this._releaseMouse()}onUpdateRequest(e){let t=100*this._value/this._maximum,n=100*this._page/(this._page+this._maximum);t=Math.max(0,Math.min(t,100)),n=Math.max(0,Math.min(n,100));let i=this.thumbNode.style;"horizontal"===this._orientation?(i.top="",i.height="",i.left=`${t}%`,i.width=`${n}%`,i.transform=`translate(${-t}%, 0%)`):(i.left="",i.width="",i.top=`${t}%`,i.height=`${n}%`,i.transform=`translate(0%, ${-t}%)`)}_evtKeyDown(e){if(e.preventDefault(),e.stopPropagation(),27!==e.keyCode)return;let t=this._pressData?this._pressData.value:-1;this._releaseMouse(),-1!==t&&this._moveThumb(t)}_evtMouseDown(e){if(0!==e.button)return;if(this.activate(),this._pressData)return;let t=Private$2.findPart(this,e.target);if(!t)return;e.preventDefault(),e.stopPropagation();let n=Drag.overrideCursor("default");if(this._pressData={part:t,override:n,delta:-1,value:-1,mouseX:e.clientX,mouseY:e.clientY},document.addEventListener("mousemove",this,!0),document.addEventListener("mouseup",this,!0),document.addEventListener("keydown",this,!0),document.addEventListener("contextmenu",this,!0),"thumb"===t){let t=this.thumbNode,n=t.getBoundingClientRect();return"horizontal"===this._orientation?this._pressData.delta=e.clientX-n.left:this._pressData.delta=e.clientY-n.top,t.classList.add("lm-mod-active"),void(this._pressData.value=this._value)}if("track"===t){let t,n=this.thumbNode.getBoundingClientRect();return t="horizontal"===this._orientation?e.clientX<n.left?"decrement":"increment":e.clientY<n.top?"decrement":"increment",this._repeatTimer=window.setTimeout(this._onRepeat,350),void this._pageRequested.emit(t)}return"decrement"===t?(this.decrementNode.classList.add("lm-mod-active"),this._repeatTimer=window.setTimeout(this._onRepeat,350),void this._stepRequested.emit("decrement")):"increment"===t?(this.incrementNode.classList.add("lm-mod-active"),this._repeatTimer=window.setTimeout(this._onRepeat,350),void this._stepRequested.emit("increment")):void 0}_evtMouseMove(e){if(!this._pressData)return;if(e.preventDefault(),e.stopPropagation(),this._pressData.mouseX=e.clientX,this._pressData.mouseY=e.clientY,"thumb"!==this._pressData.part)return;let t,n,i=this.thumbNode.getBoundingClientRect(),s=this.trackNode.getBoundingClientRect();"horizontal"===this._orientation?(t=e.clientX-s.left-this._pressData.delta,n=s.width-i.width):(t=e.clientY-s.top-this._pressData.delta,n=s.height-i.height);let r=0===n?0:t*this._maximum/n;this._moveThumb(r)}_evtMouseUp(e){0===e.button&&(e.preventDefault(),e.stopPropagation(),this._releaseMouse())}_releaseMouse(){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"))}_moveThumb(e){e=Math.max(0,Math.min(e,this._maximum)),this._value!==e&&(this._value=e,this.update(),this._thumbMoved.emit(e))}}!function(e){e.createNode=function(){let e=document.createElement("div"),t=document.createElement("div"),n=document.createElement("div"),i=document.createElement("div"),s=document.createElement("div");return t.className="lm-ScrollBar-button",n.className="lm-ScrollBar-button",t.dataset.action="decrement",n.dataset.action="increment",i.className="lm-ScrollBar-track",s.className="lm-ScrollBar-thumb",i.appendChild(s),e.appendChild(t),e.appendChild(i),e.appendChild(n),e},e.findPart=function(e,t){return e.thumbNode.contains(t)?"thumb":e.trackNode.contains(t)?"track":e.decrementNode.contains(t)?"decrement":e.incrementNode.contains(t)?"increment":null}}(Private$2||(Private$2={}));class SingletonLayout extends Layout{constructor(){super(...arguments),this._widget=null}dispose(){if(this._widget){let e=this._widget;this._widget=null,e.dispose()}super.dispose()}get widget(){return this._widget}set widget(e){e&&(e.parent=this.parent),this._widget!==e&&(this._widget&&this._widget.dispose(),this._widget=e,this.parent&&e&&this.attachWidget(e))}*[Symbol.iterator](){this._widget&&(yield this._widget)}removeWidget(e){this._widget===e&&(this._widget=null,this.parent&&this.detachWidget(e))}init(){super.init();for(const e of this)this.attachWidget(e)}attachWidget(e){this.parent.isAttached&&MessageLoop.sendMessage(e,Widget.Msg.BeforeAttach),this.parent.node.appendChild(e.node),this.parent.isAttached&&MessageLoop.sendMessage(e,Widget.Msg.AfterAttach)}detachWidget(e){this.parent.isAttached&&MessageLoop.sendMessage(e,Widget.Msg.BeforeDetach),this.parent.node.removeChild(e.node),this.parent.isAttached&&MessageLoop.sendMessage(e,Widget.Msg.AfterDetach)}}class StackedLayout extends PanelLayout{constructor(e={}){super(e),this._dirty=!1,this._items=[],this._box=null,this._hiddenMode=void 0!==e.hiddenMode?e.hiddenMode:Widget.HiddenMode.Display}get hiddenMode(){return this._hiddenMode}set hiddenMode(e){this._hiddenMode!==e&&(this._hiddenMode=e,this.widgets.length>1&&this.widgets.forEach(e=>{e.hiddenMode=this._hiddenMode}))}dispose(){for(const e of this._items)e.dispose();this._box=null,this._items.length=0,super.dispose()}attachWidget(e,t){this._hiddenMode===Widget.HiddenMode.Scale&&this._items.length>0?(1===this._items.length&&(this.widgets[0].hiddenMode=Widget.HiddenMode.Scale),t.hiddenMode=Widget.HiddenMode.Scale):t.hiddenMode=Widget.HiddenMode.Display,index_es6.ArrayExt.insert(this._items,e,new LayoutItem(t)),this.parent.isAttached&&MessageLoop.sendMessage(t,Widget.Msg.BeforeAttach),this.parent.node.appendChild(t.node),this.parent.isAttached&&MessageLoop.sendMessage(t,Widget.Msg.AfterAttach),this.parent.fit()}moveWidget(e,t,n){index_es6.ArrayExt.move(this._items,e,t),this.parent.update()}detachWidget(e,t){let n=index_es6.ArrayExt.removeAt(this._items,e);this.parent.isAttached&&MessageLoop.sendMessage(t,Widget.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.isAttached&&MessageLoop.sendMessage(t,Widget.Msg.AfterDetach),n.widget.node.style.zIndex="",this._hiddenMode===Widget.HiddenMode.Scale&&(t.hiddenMode=Widget.HiddenMode.Display,1===this._items.length&&(this._items[0].widget.hiddenMode=Widget.HiddenMode.Display)),n.dispose(),this.parent.fit()}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}_fit(){let e=0,t=0;for(let n=0,i=this._items.length;n<i;++n){let i=this._items[n];i.isHidden||(i.fit(),e=Math.max(e,i.minWidth),t=Math.max(t,i.minHeight))}let n=this._box=ElementExt.boxSizing(this.parent.node);e+=n.horizontalSum,t+=n.verticalSum;let i=this.parent.node.style;i.minWidth=`${e}px`,i.minHeight=`${t}px`,this._dirty=!0,this.parent.parent&&MessageLoop.sendMessage(this.parent.parent,Widget.Msg.FitRequest),this._dirty&&MessageLoop.sendMessage(this.parent,Widget.Msg.UpdateRequest)}_update(e,t){this._dirty=!1;let n=0;for(let e=0,t=this._items.length;e<t;++e)n+=+!this._items[e].isHidden;if(0===n)return;e<0&&(e=this.parent.node.offsetWidth),t<0&&(t=this.parent.node.offsetHeight),this._box||(this._box=ElementExt.boxSizing(this.parent.node));let i=this._box.paddingTop,s=this._box.paddingLeft,r=e-this._box.horizontalSum,o=t-this._box.verticalSum;for(let e=0,t=this._items.length;e<t;++e){let t=this._items[e];t.isHidden||(t.widget.node.style.zIndex=`${e}`,t.update(s,i,r,o))}}}class StackedPanel extends Panel{constructor(e={}){super({layout:Private$1.createLayout(e)}),this._widgetRemoved=new signaling_dist_index_es6.Signal(this),this.addClass("lm-StackedPanel")}get hiddenMode(){return this.layout.hiddenMode}set hiddenMode(e){this.layout.hiddenMode=e}get widgetRemoved(){return this._widgetRemoved}onChildAdded(e){e.child.addClass("lm-StackedPanel-child")}onChildRemoved(e){e.child.removeClass("lm-StackedPanel-child"),this._widgetRemoved.emit(e.child)}}(Private$1||(Private$1={})).createLayout=function(e){return e.layout||new StackedLayout};class TabPanel extends Widget{constructor(e={}){super(),this._currentChanged=new signaling_dist_index_es6.Signal(this),this._addRequested=new signaling_dist_index_es6.Signal(this),this.addClass("lm-TabPanel"),this.tabBar=new TabBar(e),this.tabBar.addClass("lm-TabPanel-tabBar"),this.stackedPanel=new StackedPanel,this.stackedPanel.addClass("lm-TabPanel-stackedPanel"),this.tabBar.tabMoved.connect(this._onTabMoved,this),this.tabBar.currentChanged.connect(this._onCurrentChanged,this),this.tabBar.tabCloseRequested.connect(this._onTabCloseRequested,this),this.tabBar.tabActivateRequested.connect(this._onTabActivateRequested,this),this.tabBar.addRequested.connect(this._onTabAddRequested,this),this.stackedPanel.widgetRemoved.connect(this._onWidgetRemoved,this),this._tabPlacement=e.tabPlacement||"top";let t=widgets_dist_index_es6_Private.directionFromPlacement(this._tabPlacement),n=widgets_dist_index_es6_Private.orientationFromPlacement(this._tabPlacement);this.tabBar.orientation=n,this.tabBar.dataset.placement=this._tabPlacement;let i=new BoxLayout({direction:t,spacing:0});BoxLayout.setStretch(this.tabBar,0),BoxLayout.setStretch(this.stackedPanel,1),i.addWidget(this.tabBar),i.addWidget(this.stackedPanel),this.layout=i}get currentChanged(){return this._currentChanged}get currentIndex(){return this.tabBar.currentIndex}set currentIndex(e){this.tabBar.currentIndex=e}get currentWidget(){let e=this.tabBar.currentTitle;return e?e.owner:null}set currentWidget(e){this.tabBar.currentTitle=e?e.title:null}get tabsMovable(){return this.tabBar.tabsMovable}set tabsMovable(e){this.tabBar.tabsMovable=e}get addButtonEnabled(){return this.tabBar.addButtonEnabled}set addButtonEnabled(e){this.tabBar.addButtonEnabled=e}get tabPlacement(){return this._tabPlacement}set tabPlacement(e){if(this._tabPlacement===e)return;this._tabPlacement=e;let t=widgets_dist_index_es6_Private.directionFromPlacement(e),n=widgets_dist_index_es6_Private.orientationFromPlacement(e);this.tabBar.orientation=n,this.tabBar.dataset.placement=e,this.layout.direction=t}get addRequested(){return this._addRequested}get widgets(){return this.stackedPanel.widgets}addWidget(e){this.insertWidget(this.widgets.length,e)}insertWidget(e,t){t!==this.currentWidget&&t.hide(),this.stackedPanel.insertWidget(e,t),this.tabBar.insertTab(e,t.title),t.node.setAttribute("role","tabpanel");let n=this.tabBar.renderer;if(n instanceof TabBar.Renderer){let e=n.createTabKey({title:t.title,current:!1,zIndex:0});t.node.setAttribute("aria-labelledby",e)}}_onCurrentChanged(e,t){let{previousIndex:n,previousTitle:i,currentIndex:s,currentTitle:r}=t,o=i?i.owner:null,a=r?r.owner:null;o&&o.hide(),a&&a.show(),this._currentChanged.emit({previousIndex:n,previousWidget:o,currentIndex:s,currentWidget:a}),(Platform.IS_EDGE||Platform.IS_IE)&&MessageLoop.flush()}_onTabAddRequested(e,t){this._addRequested.emit(e)}_onTabActivateRequested(e,t){t.title.owner.activate()}_onTabCloseRequested(e,t){t.title.owner.close()}_onTabMoved(e,t){this.stackedPanel.insertWidget(t.toIndex,t.title.owner)}_onWidgetRemoved(e,t){t.node.removeAttribute("role"),t.node.removeAttribute("aria-labelledby"),this.tabBar.removeTab(t.title)}}!function(e){e.orientationFromPlacement=function(e){return t[e]},e.directionFromPlacement=function(e){return n[e]};const t={top:"horizontal",left:"vertical",right:"vertical",bottom:"horizontal"},n={top:"top-to-bottom",left:"left-to-right",right:"right-to-left",bottom:"bottom-to-top"}}(widgets_dist_index_es6_Private||(widgets_dist_index_es6_Private={}));var lib=__webpack_require__(9531),coreutils_lib=__webpack_require__(6376),services_lib=__webpack_require__(608);const TRANSLATIONS_SETTINGS_URL="api/translations";async function requestTranslationsAPI(e="",t="",n={},i=void 0){const s=null!=i?i:services_lib.ServerConnection.makeSettings();e=e||`${s.appUrl}/${TRANSLATIONS_SETTINGS_URL}`;const r=coreutils_lib.URLExt.join(s.baseUrl,e),o=coreutils_lib.URLExt.join(r,t);if(!o.startsWith(r))throw new Error("Can only be used for translations requests");let a;try{a=await services_lib.ServerConnection.makeRequest(o,n,s)}catch(e){throw new services_lib.ServerConnection.NetworkError(e)}let l=await a.text();if(l.length>0)try{l=JSON.parse(l)}catch(e){console.error("Not a JSON response body.",a)}if(!a.ok)throw new services_lib.ServerConnection.ResponseError(a,l.message||l);return l}const tokens_DEFAULT_LANGUAGE_CODE="en",ITranslatorConnector=new dist.Token("@jupyterlab/translation:ITranslatorConnector","A service to connect to the server translation endpoint.");class tokens_TranslatorConnector extends lib.DataConnector{constructor(e="",t){super(),this._translationsUrl=e,this._serverSettings=t}async fetch(e){var t;return requestTranslationsAPI(this._translationsUrl,null!==(t=null==e?void 0:e.language)&&void 0!==t?t:"",{},this._serverSettings)}}const ITranslator=new dist.Token("@jupyterlab/translation:ITranslator","A service to translate strings.");function utils_normalizeDomain(e){return e.replace("-","_")}class gettext_Gettext{constructor(e){e=e||{},this._defaults={domain:"messages",locale:document.documentElement.getAttribute("lang")||tokens_DEFAULT_LANGUAGE_CODE,pluralFunc:function(e){return{nplurals:2,plural:1!=e?1:0}},contextDelimiter:String.fromCharCode(4),stringsPrefix:""},this._locale=(e.locale||this._defaults.locale).replace("_","-"),this._domain=utils_normalizeDomain(e.domain||this._defaults.domain),this._contextDelimiter=e.contextDelimiter||this._defaults.contextDelimiter,this._stringsPrefix=e.stringsPrefix||this._defaults.stringsPrefix,this._pluralFuncs={},this._dictionary={},this._pluralForms={},e.messages&&(this._dictionary[this._domain]={},this._dictionary[this._domain][this._locale]=e.messages),e.pluralForms&&(this._pluralForms[this._locale]=e.pluralForms)}setContextDelimiter(e){this._contextDelimiter=e}getContextDelimiter(){return this._contextDelimiter}setLocale(e){this._locale=e.replace("_","-")}getLocale(){return this._locale}setDomain(e){this._domain=utils_normalizeDomain(e)}getDomain(){return this._domain}setStringsPrefix(e){this._stringsPrefix=e}getStringsPrefix(){return this._stringsPrefix}static strfmt(e,...t){return e.replace(/%%/g,"%% ").replace(/%(\d+)/g,function(e,n){return t[n-1]}).replace(/%% /g,"%")}loadJSON(e,t){if(!e[""]||!e[""].language||!e[""].pluralForms)throw new Error(`Wrong jsonData, it must have an empty key ("") with "language" and "pluralForms" information: ${e}`);t=utils_normalizeDomain(t);let n=e[""],i=JSON.parse(JSON.stringify(e));delete i[""],this.setMessages(t||this._defaults.domain,n.language,i,n.pluralForms)}__(e,...t){return this.gettext(e,...t)}_n(e,t,n,...i){return this.ngettext(e,t,n,...i)}_p(e,t,...n){return this.pgettext(e,t,...n)}_np(e,t,n,i,...s){return this.npgettext(e,t,n,i,...s)}gettext(e,...t){return this.dcnpgettext("","",e,"",0,...t)}ngettext(e,t,n,...i){return this.dcnpgettext("","",e,t,n,...i)}pgettext(e,t,...n){return this.dcnpgettext("",e,t,"",0,...n)}npgettext(e,t,n,i,...s){return this.dcnpgettext("",e,t,n,i,...s)}dcnpgettext(e,t,n,i,s,...r){let o;e=utils_normalizeDomain(e)||this._domain;let a=t?t+this._contextDelimiter+n:n,l={pluralForm:!1},c=!1,d=this._locale,u=this.expandLocale(this._locale);for(let t in u)if(d=u[t],c=this._dictionary[e]&&this._dictionary[e][d]&&this._dictionary[e][d][a],c=i?c&&this._dictionary[e][d][a].length>1:c&&1==this._dictionary[e][d][a].length,c){l.locale=d;break}if(c?o=this._dictionary[e][d][a]:(o=[n],l.pluralFunc=this._defaults.pluralFunc),!i)return this.t(o,s,l,...r);l.pluralForm=!0;let h=c?o:[n,i];return this.t(h,s,l,...r)}expandLocale(e){let t=[e],n=e.lastIndexOf("-");for(;n>0;)e=e.slice(0,n),t.push(e),n=e.lastIndexOf("-");return t}getPluralFunc(e){if(!new RegExp("^\\s*nplurals\\s*=\\s*[0-9]+\\s*;\\s*plural\\s*=\\s*(?:\\s|[-\\?\\|&=!<>+*/%:;n0-9_()])+").test(e))throw new Error(gettext_Gettext.strfmt('The plural form "%1" is not valid',e));return new Function("n","let plural, nplurals; "+e+" return { nplurals: nplurals, plural: (plural === true ? 1 : (plural ? plural : 0)) };")}removeContext(e){return-1!==e.indexOf(this._contextDelimiter)?e.split(this._contextDelimiter)[1]:e}t(e,t,n,...i){if(!n.pluralForm)return this._stringsPrefix+gettext_Gettext.strfmt(this.removeContext(e[0]),...i);let s;return n.pluralFunc?s=n.pluralFunc(t):(this._pluralFuncs[n.locale||""]||(this._pluralFuncs[n.locale||""]=this.getPluralFunc(this._pluralForms[n.locale||""])),s=this._pluralFuncs[n.locale||""](t)),(void 0===!s.plural||s.plural>s.nplurals||e.length<=s.plural)&&(s.plural=0),this._stringsPrefix+gettext_Gettext.strfmt(this.removeContext(e[s.plural]),...[t].concat(i))}setMessages(e,t,n,i){e=utils_normalizeDomain(e),i&&(this._pluralForms[t]=i),this._dictionary[e]||(this._dictionary[e]={}),this._dictionary[e][t]=n}}class NullTranslator{constructor(e){this.languageCode=tokens_DEFAULT_LANGUAGE_CODE,this._languageBundle=e}load(e){return this._languageBundle}}class NullLanguageBundle{__(e,...t){return this.gettext(e,...t)}_n(e,t,n,...i){return this.ngettext(e,t,n,...i)}_p(e,t,...n){return this.pgettext(e,t,...n)}_np(e,t,n,i,...s){return this.npgettext(e,t,n,i,...s)}gettext(e,...t){return gettext_Gettext.strfmt(e,...t)}ngettext(e,t,n,...i){return gettext_Gettext.strfmt(1==n?e:t,...[n].concat(i))}pgettext(e,t,...n){return gettext_Gettext.strfmt(t,...n)}npgettext(e,t,n,i,...s){return this.ngettext(t,n,i,...s)}dcnpgettext(e,t,n,i,s,...r){return this.ngettext(n,i,s,...r)}}const nullTranslator=new NullTranslator(new NullLanguageBundle);class TranslationManager{constructor(e="",t,n,i){this._domainData={},this._translationBundles={},this._connector=null!=i?i:new TranslatorConnector(e,n),this._stringsPrefix=t||"",this._englishBundle=new Gettext({stringsPrefix:this._stringsPrefix}),this._currentLocale=DEFAULT_LANGUAGE_CODE}get languageCode(){return this._currentLocale}async fetch(e){var t,n,i,s;let r;if(this._languageData=await this._connector.fetch({language:e}),this._languageData&&"default"===e)try{for(const e of Object.values(null!==(t=this._languageData.data)&&void 0!==t?t:{})){r=e[""].language;break}}catch(e){}this._currentLocale=("default"!==e?e:null!=r?r:DEFAULT_LANGUAGE_CODE).replace("_","-"),this._domainData=null!==(i=null===(n=this._languageData)||void 0===n?void 0:n.data)&&void 0!==i?i:{};const o=null===(s=this._languageData)||void 0===s?void 0:s.message;o&&this._currentLocale!==DEFAULT_LANGUAGE_CODE&&console.warn(o)}load(e){if(this._domainData){if(this._currentLocale==DEFAULT_LANGUAGE_CODE)return this._englishBundle;if(!((e=normalizeDomain(e))in this._translationBundles)){let t=new Gettext({domain:e,locale:this._currentLocale,stringsPrefix:this._stringsPrefix});if(e in this._domainData){const n=this._domainData[e][""],i={...this._domainData[e],"":{...n,pluralForms:n.plural_forms}};t.loadJSON(i,e)}this._translationBundles[e]=t}return this._translationBundles[e]}return this._englishBundle}}var react=__webpack_require__(6540),client=__webpack_require__(5338);class ReactWidget extends Widget{constructor(){super(),this._rootDOM=null}static create(e){return new class extends ReactWidget{render(){return e}}}onUpdateRequest(e){this.renderPromise=this.renderDOM()}onAfterAttach(e){MessageLoop.sendMessage(this,Widget.Msg.UpdateRequest)}onBeforeDetach(e){null!==this._rootDOM&&(this._rootDOM.unmount(),this._rootDOM=null)}renderDOM(){return new Promise(e=>{const t=this.render();null===this._rootDOM&&(this._rootDOM=(0,client.H)(this.node)),Array.isArray(t)||t?(this._rootDOM.render(t),requestIdleCallback(()=>e())):(this._rootDOM.unmount(),this._rootDOM=null,requestIdleCallback(()=>e()))})}}class VDomRenderer extends ReactWidget{constructor(e){super(),this._modelChanged=new signaling_dist_index_es6.Signal(this),this.model=null!=e?e:null}get modelChanged(){return this._modelChanged}set model(e){this._model!==e&&(this._model&&this._model.stateChanged.disconnect(this.update,this),this._model=e,e&&e.stateChanged.connect(this.update,this),this.update(),this._modelChanged.emit(void 0))}get model(){return this._model}dispose(){this.isDisposed||(this._model=null,super.dispose())}}class UseSignal extends react.Component{constructor(e){super(e),this.slot=(e,t)=>{this.props.shouldUpdate&&!this.props.shouldUpdate(e,t)||this.setState({value:[e,t]})},this.state={value:[this.props.initialSender,this.props.initialArgs]}}componentDidMount(){this.props.signal.connect(this.slot)}componentWillUnmount(){this.props.signal.disconnect(this.slot)}render(){return this.props.children(...this.state.value)}}class VDomModel{constructor(){this.stateChanged=new Signal(this),this._isDisposed=!1}get isDisposed(){return this._isDisposed}dispose(){this.isDisposed||(this._isDisposed=!0,Signal.clearData(this))}}function _classes(e){return e.map(e=>e&&"object"==typeof e?Object.keys(e).map(t=>!!e[t]&&t):"string"==typeof e?e.split(/\s+/):[]).reduce((e,t)=>e.concat(t),[]).filter(e=>!!e)}function classes(...e){return _classes(e).join(" ")}function classesDedupe(...e){return[...new Set(_classes(e))].join(" ")}function getReactAttrs(e,{ignore:t=[]}={}){return e.getAttributeNames().reduce((n,i)=>("style"===i||t.includes(i)||(i.startsWith("data")||i.startsWith("aria")?n[i]=e.getAttribute(i):n[coreutils_lib.Text.camelCase(i)]=e.getAttribute(i)),n),{})}function isTreeItemElement(e){return e instanceof HTMLElement&&"treeitem"===e.getAttribute("role")}function getTreeItemElement(e){let t=e;for(;t&&!isTreeItemElement(t);)t=t.parentElement;return isTreeItemElement(t)?t:null}function Button(e){const{minimal:t,small:n,children:i,...s}=e;return react.createElement("button",{...s,className:classes(e.className,t?"jp-mod-minimal":"",n?"jp-mod-small":"","jp-Button")},i)}const bad_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path\n class="jp-icon0"\n fill="#000"\n d="M24 20.188l-8.315-8.209 8.2-8.282-3.697-3.697-8.212 8.318-8.31-8.203-3.666 3.666 8.321 8.24-8.206 8.313 3.666 3.666 8.237-8.318 8.285 8.203z"\n />\n</svg>\n',blank_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path\n fill="#000"\n fill-opacity="0.0"\n d="M24 20.188l-8.315-8.209 8.2-8.282-3.697-3.697-8.212 8.318-8.31-8.203-3.666 3.666 8.321 8.24-8.206 8.313 3.666 3.666 8.237-8.318 8.285 8.203z"\n />\n</svg>\n',refresh_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 18 18">\n <path fill="#616161" d="M9 13.5c-2.49 0-4.5-2.01-4.5-4.5S6.51 4.5 9 4.5c1.24 0 2.36.52 3.17 1.33L10 8h5V3l-1.76 1.76A6 6 0 0 0 9 3C5.69 3 3.01 5.69 3.01 9S5.69 15 9 15a5.98 5.98 0 0 0 5.9-5h-1.52c-.46 2-2.24 3.5-4.38 3.5" class="jp-icon3"/>\n</svg>\n';var typestyle_lib=__webpack_require__(1326),LabIconStyle,labicon_Private;!function(e){const t={breadCrumb:{container:{$nest:{"&:first-child svg":{bottom:"1px",marginLeft:"0px",position:"relative"},"&:hover":{backgroundColor:"var(--jp-layout-color2)"},".jp-mod-dropTarget&":{backgroundColor:"var(--jp-brand-color2)",opacity:.7}}},element:{borderRadius:"var(--jp-border-radius)",cursor:"pointer",margin:"0px 2px",padding:"0px 2px",height:"16px",width:"16px",verticalAlign:"middle"}},commandPaletteHeader:{container:{height:"14px",margin:"0 14px 0 auto"},element:{height:"14px",width:"14px"},options:{elementPosition:"center"}},commandPaletteItem:{element:{height:"16px",width:"16px"},options:{elementPosition:"center"}},launcherCard:{container:{height:"52px",width:"52px"},element:{height:"52px",width:"52px"},options:{elementPosition:"center"}},launcherSection:{container:{boxSizing:"border-box",marginRight:"12px",height:"32px",width:"32px"},element:{height:"32px",width:"32px"},options:{elementPosition:"center"}},listing:{container:{flex:"0 0 20px",marginRight:"4px",position:"relative"},element:{height:"16px",width:"16px"},options:{elementPosition:"center"}},listingHeaderItem:{container:{display:"inline",height:"16px",width:"16px"},element:{height:"auto",margin:"-2px 0 0 0",width:"20px"},options:{elementPosition:"center"}},mainAreaTab:{container:{$nest:{".lm-DockPanel-tabBar &":{marginRight:"4px"}}},element:{$nest:{".lm-DockPanel-tabBar &":{height:"14px",width:"14px"}}},options:{elementPosition:"center"}},menuItem:{container:{display:"inline-block",verticalAlign:"middle"},element:{height:"16px",width:"16px"},options:{elementPosition:"center"}},runningItem:{container:{margin:"0px 4px 0px 4px"},element:{height:"16px",width:"16px"},options:{elementPosition:"center"}},select:{container:{pointerEvents:"none"},element:{position:"absolute",height:"auto",width:"16px"}},settingsEditor:{container:{display:"flex",flex:"0 0 20px",margin:"0 3px 0 0",position:"relative",height:"20px",width:"20px"},element:{height:"16px",width:"16px"},options:{elementPosition:"center"}},sideBar:{element:{height:"auto",width:"20px"},options:{elementPosition:"center"}},splash:{container:{animation:"0.3s fade-in linear forwards",height:"100%",width:"100%",zIndex:1},element:{width:"100px"},options:{elementPosition:"center"}},statusBar:{element:{left:"0px",top:"0px",height:"18px",width:"20px",position:"relative"}},toolbarButton:{container:{display:"inline-block",verticalAlign:"middle"},element:{height:"16px",width:"16px"},options:{elementPosition:"center"}}};function n(e){return{container:{alignItems:"center",display:"flex"},element:{display:"block",...e}}}const i={center:n({margin:"0 auto",width:"100%"}),top:n({margin:"0 0 auto 0"}),right:n({margin:"0 0 0 auto"}),bottom:n({margin:"auto 0 0 0"}),left:n({margin:"0 auto 0 0"}),"top right":n({margin:"0 0 auto auto"}),"bottom right":n({margin:"auto 0 0 auto"}),"bottom left":n({margin:"auto auto 0 0"}),"top left":n({margin:"0 auto 0 auto"})};function s(e){return{element:{height:e,width:e}}}const r={small:s("14px"),normal:s("16px"),large:s("20px"),xlarge:s("24px")};const o=new Map;e.styleClass=function(e){if(!e||0===Object.keys(e).length)return"";let{elementPosition:n,elementSize:s,stylesheet:a,...l}=e;const c={...n&&{elementPosition:n},...s&&{elementSize:s}},d="string"==typeof a&&0===Object.keys(l).length,u=d?[a,n,s].join(","):"";if(d&&o.has(u))return o.get(u);const h=function(e){return e?(Array.isArray(e)||(e=[e]),e.map(e=>"string"==typeof e?t[e]:e)):[]}(a);h.push({element:l,options:c});const p=function(e){var t;return(0,typestyle_lib.iF)({...e.container,$nest:{...null===(t=e.container)||void 0===t?void 0:t.$nest,svg:e.element}})}(function(e){const t=Object.assign({},...e.map(e=>e.options));return t.elementPosition&&e.unshift(i[t.elementPosition]),t.elementSize&&e.unshift(r[t.elementSize]),function(e){return{container:Object.assign({},...e.map(e=>e.container)),element:Object.assign({},...e.map(e=>e.element))}}(e)}(h));return d&&o.set(u,p),p}}(LabIconStyle||(LabIconStyle={}));class LabIcon{static remove(e){for(;e.firstChild;)e.firstChild.remove();return e.className="",e}static resolve({icon:e}){if(e instanceof LabIcon)return e;if("string"==typeof e){return LabIcon._instances.get(e)||(LabIcon._debug&&console.warn(`Lookup failed for icon, creating loading icon. icon: ${e}`),new LabIcon({name:e,svgstr:refresh_namespaceObject,_loading:!0}))}return new LabIcon(e)}static resolveElement({icon:e,iconClass:t,fallback:n,...i}){return labicon_Private.isResolvable(e)?LabIcon.resolve({icon:e}).element(i):!t&&n?n.element(i):(i.className=classes(t,i.className),labicon_Private.blankElement(i))}static resolveReact({icon:e,iconClass:t,fallback:n,...i}){if(!labicon_Private.isResolvable(e))return!t&&n?react.createElement(n.react,{...i}):(i.className=classes(t,i.className),react.createElement(labicon_Private.blankReact,{...i}));const s=LabIcon.resolve({icon:e});return react.createElement(s.react,{...i})}static resolveSvg({name:e,svgstr:t}){const n=(new DOMParser).parseFromString(labicon_Private.svgstrShim(t),"image/svg+xml"),i=n.querySelector("parsererror");if(i){const n=`SVG HTML was malformed for LabIcon instance.\nname: ${e}, svgstr: ${t}`;return LabIcon._debug?(console.error(n),i):(console.warn(n),null)}return n.documentElement}static toggleDebug(e){LabIcon._debug=null!=e?e:!LabIcon._debug}constructor({name:e,svgstr:t,render:n,unrender:i,_loading:s=!1}){if(this._props={},this._svgReplaced=new signaling_dist_index_es6.Signal(this),this._svgElement=void 0,this._svgInnerHTML=void 0,this._svgReactAttrs=void 0,!e||!t)return console.error(`When defining a new LabIcon, name and svgstr must both be non-empty strings. name: ${e}, svgstr: ${t}`),badIcon;if(this._loading=s,LabIcon._instances.has(e)){const n=LabIcon._instances.get(e);return this._loading?(n.svgstr=t,this._loading=!1,n):(LabIcon._debug&&console.warn(`Redefining previously loaded icon svgstr. name: ${e}, svgstrOld: ${n.svgstr}, svgstr: ${t}`),n.svgstr=t,n)}this.name=e,this.react=this._initReact(e),this.svgstr=t,this._initRender({render:n,unrender:i}),LabIcon._instances.set(this.name,this)}bindprops(e){const t=Object.create(this);return t._props=e,t.react=t._initReact(t.name+"_bind"),t}element(e={}){var t;let{className:n,container:i,label:s,title:r,tag:o="div",...a}={...this._props,...e};const l=null==i?void 0:i.firstChild;if((null===(t=null==l?void 0:l.dataset)||void 0===t?void 0:t.iconId)===this._uuid)return l;if(!this.svgElement)return document.createElement("div");if(i)for(;i.firstChild;)i.firstChild.remove();else o&&(i=document.createElement(o));const c=this.svgElement.cloneNode(!0);return i?(null!=s&&(i.textContent=s),labicon_Private.initContainer({container:i,className:n,styleProps:a,title:r}),i.appendChild(c),i):(s&&console.warn(),c)}render(e,t){var n;let i=null===(n=null==t?void 0:t.children)||void 0===n?void 0:n[0];"string"!=typeof i&&(i=void 0),this.element({container:e,label:i,...null==t?void 0:t.props})}get svgElement(){return void 0===this._svgElement&&(this._svgElement=this._initSvg({uuid:this._uuid})),this._svgElement}get svgInnerHTML(){return void 0===this._svgInnerHTML&&(null===this.svgElement?this._svgInnerHTML=null:this._svgInnerHTML=this.svgElement.innerHTML),this._svgInnerHTML}get svgReactAttrs(){return void 0===this._svgReactAttrs&&(null===this.svgElement?this._svgReactAttrs=null:this._svgReactAttrs=getReactAttrs(this.svgElement,{ignore:["data-icon-id"]})),this._svgReactAttrs}get svgstr(){return this._svgstr}set svgstr(e){this._svgstr=e;const t=dist.UUID.uuid4(),n=this._uuid;this._uuid=t,this._svgElement=void 0,this._svgInnerHTML=void 0,this._svgReactAttrs=void 0,document.querySelectorAll(`[data-icon-id="${n}"]`).forEach(e=>{this.svgElement&&e.replaceWith(this.svgElement.cloneNode(!0))}),this._svgReplaced.emit()}_initReact(e){const t=react.forwardRef((e={},t)=>{const{className:n,container:i,label:s,title:r,slot:o,tag:a="div",...l}={...this._props,...e},[,c]=react.useState(this._uuid);react.useEffect(()=>{const e=()=>{c(this._uuid)};return this._svgReplaced.connect(e),()=>{this._svgReplaced.disconnect(e)}});const d=null!=a?a:react.Fragment;if(!this.svgInnerHTML||!this.svgReactAttrs)return react.createElement(react.Fragment,null);const u={...this.svgReactAttrs};a||Object.assign(u,{className:n||l?classes(n,LabIconStyle.styleClass(l)):void 0,title:r,slot:o});const h=react.createElement("svg",{...u,...this.svgReactAttrs,dangerouslySetInnerHTML:{__html:this.svgInnerHTML},ref:t});if(i)return labicon_Private.initContainer({container:i,className:n,styleProps:l,title:r}),react.createElement(react.Fragment,null,h,s);{let e={};return d!==react.Fragment&&(e={className:n||l?classes(n,LabIconStyle.styleClass(l)):void 0,title:r,slot:o}),react.createElement(d,{...e},h,s)}});return t.displayName=`LabIcon_${e}`,t}_initRender({render:e,unrender:t}){e?(this.render=e,t&&(this.unrender=t)):t&&console.warn("In _initRender, ignoring unrender arg since render is undefined")}_initSvg({title:e,uuid:t}={}){const n=LabIcon.resolveSvg(this);return n?("parsererror"!==n.tagName&&(n.dataset.icon=this.name,t&&(n.dataset.iconId=t),e?labicon_Private.setTitleSvg(n,e):n.setAttribute("aria-hidden","true")),n):n}}LabIcon._debug=!1,LabIcon._instances=new Map,function(e){function t({container:e,className:t,styleProps:n,title:i}){null!=i&&(e.title=i);const s=LabIconStyle.styleClass(n);if(null!=t){const n=classes(t,s);return e.className=n,n}return s?(e.classList.add(s),s):""}e.blankElement=function({className:t="",container:n,label:i,title:s,tag:r="div",slot:o,...a}){if((null==n?void 0:n.className)===t)return n;if(n)for(;n.firstChild;)n.firstChild.remove();else n=document.createElement(null!=r?r:"div");return null!=i&&(n.textContent=i),e.initContainer({container:n,className:t,styleProps:a,title:s}),n},e.blankReact=react.forwardRef(({className:e="",container:n,label:i,title:s,tag:r="div",...o},a)=>{const l=null!=r?r:"div";return n?(t({container:n,className:e,styleProps:o,title:s}),react.createElement(react.Fragment,null)):react.createElement(l,{className:classes(e,LabIconStyle.styleClass(o))},a&&blankIcon.react({ref:a}),i)}),e.blankReact.displayName="BlankReact",e.initContainer=t,e.isResolvable=function(e){return!(!e||!("string"==typeof e||e.name&&e.svgstr))},e.setTitleSvg=function(e,t){const n=e.getElementsByTagName("title");if(n.length)n[0].textContent=t;else{const n=document.createElement("title");n.textContent=t,e.appendChild(n)}},e.svgstrShim=function(e,t=!0){const[,n,i]=decodeURIComponent(e).replace(/>\s*\n\s*</g,"><").replace(/\s*\n\s*/g," ").match(t?/^(?:data:.*?(;base64)?,)?(.*)/:/(?:(base64).*)?(<svg.*)/);return n?atob(i):i};class n{constructor(e,t){this._icon=e,this._rendererOptions=t}render(e,t){}}e.Renderer=n,e.ElementRenderer=class extends n{render(e,t){var n,i;let s=null===(n=null==t?void 0:t.children)||void 0===n?void 0:n[0];"string"!=typeof s&&(s=void 0),this._icon.element({container:e,label:s,...null===(i=this._rendererOptions)||void 0===i?void 0:i.props,...null==t?void 0:t.props})}},e.ReactRenderer=class extends n{constructor(){super(...arguments),this._rootDOM=null}render(e,t){var n,i;let s=null===(n=null==t?void 0:t.children)||void 0===n?void 0:n[0];"string"!=typeof s&&(s=void 0);const r=this._icon;null!==this._rootDOM&&this._rootDOM.unmount(),this._rootDOM=(0,client.H)(e),this._rootDOM.render(react.createElement(r.react,{container:e,label:s,...null===(i=this._rendererOptions)||void 0===i?void 0:i.props,...null==t?void 0:t.props}))}unrender(e){null!==this._rootDOM&&(this._rootDOM.unmount(),this._rootDOM=null)}}}(labicon_Private||(labicon_Private={}));const badIcon=new LabIcon({name:"ui-components:bad",svgstr:bad_namespaceObject}),blankIcon=new LabIcon({name:"ui-components:blank",svgstr:blank_namespaceObject}),add_above_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="none" viewBox="0 0 14 14">\n <g clip-path="url(#addabovea)">\n <path fill="#616161" stroke="#616161" stroke-width=".7" d="M4.75 4.93h1.875v1.876c0 .206.169.375.375.375a.376.376 0 0 0 .375-.375V4.93H9.25a.376.376 0 0 0 .375-.375.376.376 0 0 0-.375-.375H7.375V2.306A.376.376 0 0 0 7 1.93a.376.376 0 0 0-.375.375V4.18H4.75a.376.376 0 0 0-.375.375c0 .206.169.375.375.375Z" class="jp-icon3"/>\n </g>\n <path fill="#616161" fill-rule="evenodd" d="M11.5 9.5v2h-9v-2zM12 8a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1z" class="jp-icon3" clip-rule="evenodd"/>\n <defs>\n <clipPath id="addabovea">\n <path fill="#fff" d="M10 1.556H4v6h6z" class="jp-icon3"/>\n </clipPath>\n </defs>\n</svg>\n',add_below_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="none" viewBox="0 0 14 14">\n <g clip-path="url(#addbelowa)">\n <path fill="#616161" stroke="#616161" stroke-width=".7" d="M9.25 10.07H7.375V8.193A.376.376 0 0 0 7 7.82a.376.376 0 0 0-.375.375v1.875H4.75a.376.376 0 0 0-.375.375c0 .207.169.375.375.375h1.875v1.875c0 .207.169.375.375.375a.376.376 0 0 0 .375-.375V10.82H9.25a.376.376 0 0 0 .375-.375.376.376 0 0 0-.375-.375Z" class="jp-icon3"/>\n </g>\n <path fill="#616161" fill-rule="evenodd" d="M2.5 5.5v-2h9v2zM2 7a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1z" class="jp-icon3" clip-rule="evenodd"/>\n <defs>\n <clipPath id="addbelowa">\n <path fill="#fff" d="M4 13.444h6v-6H4z" class="jp-icon3"/>\n </clipPath>\n </defs>\n</svg>\n',add_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z" class="jp-icon3"/>\n</svg>\n',audio_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\r\n <path class="jp-icon3 jp-icon-selectable" fill="#616161" d="M13,4V20a1,1,0,0,1-2,0V4a1,1,0,0,1,2,0ZM8,5A1,1,0,0,0,7,6V18a1,1,0,0,0,2,0V6A1,1,0,0,0,8,5ZM4,7A1,1,0,0,0,3,8v8a1,1,0,0,0,2,0V8A1,1,0,0,0,4,7ZM16,5a1,1,0,0,0-1,1V18a1,1,0,0,0,2,0V6A1,1,0,0,0,16,5Zm4,2a1,1,0,0,0-1,1v8a1,1,0,0,0,2,0V8A1,1,0,0,0,20,7Z"/>\r\n</svg>\r\n',bell_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" version="1.1" viewBox="0 0 16 16">\n <path fill="#333" d="M8 .29c-1.4 0-2.7.73-3.6 1.8-1.2 1.5-1.4 3.4-1.5 5.2-.18 2.2-.44 4-2.3 5.3l.28 1.3h5c.026.66.32 1.1.71 1.5.84.61 2 .61 2.8 0 .52-.4.6-1 .71-1.5h5l.28-1.3c-1.9-.97-2.2-3.3-2.3-5.3-.13-1.8-.26-3.7-1.5-5.2-.85-1-2.2-1.8-3.6-1.8zm0 1.4c.88 0 1.9.55 2.5 1.3.88 1.1 1.1 2.7 1.2 4.4.13 1.7.23 3.6 1.3 5.2H3c1.1-1.6 1.2-3.4 1.3-5.2.13-1.7.3-3.3 1.2-4.4.59-.72 1.6-1.3 2.5-1.3m-.74 12h1.5c-.001.28.015.79-.74.79-.73.002-.72-.53-.74-.79z" class="jp-icon2 jp-icon-selectable"/>\n</svg>\n',breakpoint_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16">\n <g fill="var(--jp-error-color1, #d32f2f)">\n <circle cx="10" cy="7" r="6" />\n </g>\n</svg>\n',bug_dot_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">\n <g fill="#616161" class="jp-icon3 jp-icon-selectable">\n <path fill-rule="evenodd" d="M17.19 8H20v2h-2.09c.05.33.09.66.09 1v1h2v2h-2v.027a4.5 4.5 0 0 0-3.545 6.447A5.997 5.997 0 0 1 6.81 18H4v-2h2.09c-.05-.33-.09-.66-.09-1v-1H4v-2h2v-1c0-.34.04-.67.09-1H4V8h2.81c.45-.78 1.07-1.45 1.81-1.96L7 4.41 8.41 3l2.18 2.17c.45-.11.92-.17 1.41-.17s.96.06 1.42.17L15.59 3 17 4.41l-1.63 1.63c.75.51 1.37 1.18 1.82 1.96M10 16h4v-2h-4zm0-4h4v-2h-4z" clip-rule="evenodd"/>\n <path d="M22 18.5a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0"/>\n </g>\n</svg>\n',bug_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M20 8h-2.81a6 6 0 0 0-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5s-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20zm-6 8h-4v-2h4zm0-4h-4v-2h4z" class="jp-icon3 jp-icon-selectable"/>\n</svg>\n',build_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M14.9 17.45c1.35 0 2.45-1.1 2.45-2.45s-1.1-2.45-2.45-2.45c-1.36 0-2.45 1.1-2.45 2.45s1.09 2.45 2.45 2.45m5.2-1.77 1.48 1.16c.13.11.17.29.08.45l-1.4 2.42a.35.35 0 0 1-.43.15l-1.74-.7c-.36.28-.76.51-1.18.69l-.27 1.85c-.02.17-.17.3-.34.3h-2.8c-.18 0-.32-.13-.35-.3l-.26-1.85c-.43-.18-.82-.41-1.18-.69l-1.75.7c-.15.06-.34 0-.42-.15l-1.4-2.42a.35.35 0 0 1 .08-.45l1.48-1.16-.05-.68.05-.69-1.48-1.15a.35.35 0 0 1-.08-.45l1.4-2.42c.08-.16.27-.22.42-.16l1.75.71c.36-.28.75-.52 1.18-.69l.26-1.86c.03-.16.17-.29.35-.29h2.8c.17 0 .32.13.34.29l.27 1.86c.42.17.82.41 1.18.69l1.74-.71c.17-.06.34 0 .43.16l1.4 2.42c.09.15.05.34-.08.45l-1.48 1.15.05.69zM7.33 7.445A1.566 1.566 0 0 0 7.904 5.3a1.575 1.575 0 1 0-.574 2.145m2.327-2.65 1.21.157c.096.025.173.12.171.236v1.8a.214.214 0 0 1-.183.223l-1.195.17-.42.75.43 1.126c.037.106 0 .22-.096.275l-1.559.9a.23.23 0 0 1-.294-.05l-.734-.95-.878-.001-.762.96c-.058.08-.173.1-.275.043l-1.56-.901a.23.23 0 0 1-.101-.276l.452-1.116-.246-.366-.194-.396-1.192-.166a.23.23 0 0 1-.189-.226V5.186c.002-.117.077-.206.175-.217l1.204-.175.446-.766-.456-1.11a.23.23 0 0 1 .104-.28l1.56-.9a.225.225 0 0 1 .285.054l.76.936.86.01.745-.949a.214.214 0 0 1 .284-.048l1.56.9a.24.24 0 0 1 .118.267l-.47 1.126.246.366z" class="jp-icon3"/>\n</svg>\n',caret_down_empty_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 18 18">\n <path fill="#616161" d="M5.2 5.9 9 9.7l3.8-3.8L14 7.1l-4.9 5-4.9-5z" class="jp-icon3" shape-rendering="geometricPrecision"/>\n</svg>\n',caret_down_empty_thin_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 20 20">\n <path fill="#616161" d="M9.9 13.6 3.6 7.4l.8-.8 5.5 5.6 5.5-5.5.7.7z" class="jp-icon3" shape-rendering="geometricPrecision"/>\n</svg>\n',caret_down_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 18 18">\n <path fill="#616161" d="M5.2 7.5 9 11.2l3.8-3.8H5.2z" class="jp-icon3" shape-rendering="geometricPrecision"/>\n</svg>\n',caret_left_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 18 18">\n <path fill="#616161" d="M10.8 12.8 7.1 9l3.8-3.8v7.6z" class="jp-icon3" shape-rendering="geometricPrecision"/>\n</svg>\n',caret_right_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 18 18">\n <path fill="#616161" d="M7.2 5.2 10.9 9l-3.8 3.8V5.2z" class="jp-icon3" shape-rendering="geometricPrecision"/>\n</svg>\n',caret_up_empty_thin_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 20 20">\n <path fill="#616161" d="M15.4 13.3 9.9 7.7l-5.5 5.5-.8-.7 6.3-6.2 6.2 6.3z" class="jp-icon3" shape-rendering="geometricPrecision"/>\n</svg>\n',caret_up_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 18 18">\n <path fill="#616161" d="M5.2 10.5 9 6.8l3.8 3.8H5.2z" class="jp-icon3" shape-rendering="geometricPrecision"/>\n</svg>\n',case_sensitive_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 20 20">\n <path fill="#414141" d="M2 2h16v16H2z" class="jp-icon2"/>\n <path fill="#FFF" d="M7.6 8h.9l3.5 8h-1.1l-.9-2H6l-.9 2H4zM8 9.1 6.4 13h3.2zm8.6.7c-.2.1-.4.1-.7.1-.2 0-.4-.1-.6-.2-.1-.1-.2-.4-.2-.7-.3.3-.6.5-.9.7-.3.1-.7.2-1.1.2-.3 0-.5 0-.7-.1l-.6-.3c-.2-.1-.3-.3-.4-.5s-.1-.4-.1-.7.1-.6.2-.8.3-.4.4-.5c.1 0 .3-.1.6-.2.2-.1.5-.1.7-.2.3-.1.5-.1.7-.1s.4-.1.6-.1.3-.1.4-.2.2-.2.2-.4c0-1-1.1-1-1.3-1-.4 0-1.4 0-1.4 1.2h-.9c0-.4.1-.7.2-1 .1-.2.3-.4.5-.6s.5-.3.8-.3c.3-.1.6-.1.9-.1s.5 0 .8.1c.3 0 .5.1.7.2s.4.3.5.5.1.4.1.8V9c0 .1.1.2.3.2h.3zm-1.4-2.9c-1.2.6-3.1.2-3.1 1.4 0 1.4 3.1 1 3.1-.5z" class="jp-icon-accent2"/>\n</svg>\n',check_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" class="jp-icon3 jp-icon-selectable"/>\n</svg>\n',circle_empty_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8" class="jp-icon3"/>\n</svg>\n',circle_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 18 18">\n <circle cx="9" cy="9" r="8" fill="#616161" class="jp-icon3"/>\n</svg>\n',cleaning_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path fill="#616161" d="M16 11h-1V3c0-1.1-.9-2-2-2h-2c-1.1 0-2 .9-2 2v8H8c-2.76 0-5 2.24-5 5v7h18v-7c0-2.76-2.24-5-5-5m3 10h-2v-3c0-.55-.45-1-1-1s-1 .45-1 1v3h-2v-3c0-.55-.45-1-1-1s-1 .45-1 1v3H9v-3c0-.55-.45-1-1-1s-1 .45-1 1v3H5v-5c0-1.65 1.35-3 3-3h8c1.65 0 3 1.35 3 3z" class="jp-icon3"/>\n</svg>\n',clear_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <mask id="cleara">\n <path fill="#fff" d="M0 0h24v24H0z"/>\n <circle cx="12" cy="12" r="8" fill="#000"/>\n </mask>\n <g fill="#616161" class="jp-icon3">\n <path d="M4.929 6.343 6.343 4.93l12.728 12.728-1.414 1.414z"/>\n <circle cx="12" cy="12" r="10" mask="url(#cleara)"/>\n </g>\n</svg>\n',close_all_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <g fill="#616161" class="jp-icon3">\n <path d="M16.48 17.248A7.5 7.5 0 0 0 6.32 7.706a7 7 0 1 1 10.16 9.542"/>\n <path d="M19.16 14.248A7.5 7.5 0 0 0 9 4.706a7 7 0 1 1 10.16 9.542M16 15a7 7 0 1 1-14 0 7 7 0 0 1 14 0m-4.209-4L13 12.209 10.209 15 13 17.791 11.791 19 9 16.209 6.209 19 5 17.791 7.791 15 5 12.209 6.209 11 9 13.791z"/>\n </g>\n</svg>\n',close_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <circle cx="12" cy="12" r="11" fill="none" class="jp-icon-none jp-icon-selectable-inverse jp-icon3-hover"/>\n <path fill="#616161" d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" class="jp-icon3 jp-icon-selectable jp-icon-accent2-hover"/>\n <circle cx="12" cy="12" r="7" fill="none" class="jp-icon-none jp-icon-busy"/>\n</svg>\n',code_check_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" viewBox="0 0 24 24">\n <path fill="#616161" d="M6.59 3.41 2 8l4.59 4.6L8 11.18 4.82 8 8 4.82zm5.82 0L11 4.82 14.18 8 11 11.18l1.41 1.42L17 8zm9.18 8.18-8.09 8.09L9.83 16l-1.41 1.41 5.08 5.09L23 13z" class="jp-icon3 jp-icon-selectable" shape-rendering="geometricPrecision"/>\n</svg>\n',code_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 28 28">\n <path fill="#616161" d="M11.4 18.6 6.8 14l4.6-4.6L10 8l-6 6 6 6zm5.2 0 4.6-4.6-4.6-4.6L18 8l6 6-6 6z" class="jp-icon3"/>\n</svg>\n',collapse_all_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <g fill="#616161" class="jp-icon3">\n <path d="M8 2h12c1 0 2 1 2 2v12c0 1 0 2-2 2V4H6c0-2 1-2 2-2"/>\n <path d="M18 8c0-1-1-2-2-2H4C3 6 2 7 2 8v12c0 1 1 2 2 2h12c1 0 2-1 2-2zm-2 0v12H4V8z"/>\n <path d="M6 13v2h8v-2z"/>\n </g>\n</svg>\n',collapse_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 8.5 10.5">\n <g fill="#BDBDBD" class="jp-icon-output">\n <path d="M.019 0h8.458v1.064H.019zM0 9.52h8.491v1.059H0zm4.776-6.608H3.72V1.323h1.056z"/>\n <path d="m4.244 5.243-1.06-1.167-1.06-1.167h4.24l-1.06 1.167zm.528 4.014H3.716V7.665h1.056z"/>\n <path d="M4.242 5.332 5.302 6.5l1.06 1.167h-4.24L3.182 6.5z"/>\n </g>\n</svg>\n',console_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 200 200">\n <path fill="#0288D1" d="M20 19.8h160v159.9H20z" class="jp-console-icon-background-color jp-icon-selectable"/>\n <path fill="#fff" d="M105 127.3h40v12.8h-40zM51.1 77 74 99.9l-23.3 23.3 10.5 10.5 23.3-23.3L95 99.9 84.5 89.4 61.6 66.5z" class="jp-console-icon-color jp-icon-selectable-inverse"/>\n</svg>\n',copy_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 18 18">\n <path fill="#616161" d="M11.9 1H3.2c-.8 0-1.5.7-1.5 1.5v10.2h1.5V2.5h8.7zm2.2 2.9h-8c-.8 0-1.5.7-1.5 1.5v10.2c0 .8.7 1.5 1.5 1.5h8c.8 0 1.5-.7 1.5-1.5V5.4c-.1-.8-.7-1.5-1.5-1.5m0 11.6h-8V5.4h8z" class="jp-icon3"/>\n</svg>\n',copyright_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path fill="#616161" d="M11.88 9.14c1.28.06 1.61 1.15 1.63 1.66h1.79c-.08-1.98-1.49-3.19-3.45-3.19C9.64 7.61 8 9 8 12.14c0 1.94.93 4.24 3.84 4.24 2.22 0 3.41-1.65 3.44-2.95h-1.79c-.03.59-.45 1.38-1.63 1.44-1.31-.04-1.86-1.06-1.86-2.73 0-2.89 1.28-2.98 1.88-3M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8" class="jp-icon3"/>\n</svg>\n',cut_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M9.64 7.64c.23-.5.36-1.05.36-1.64 0-2.21-1.79-4-4-4S2 3.79 2 6s1.79 4 4 4c.59 0 1.14-.13 1.64-.36L10 12l-2.36 2.36C7.14 14.13 6.59 14 6 14c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4c0-.59-.13-1.14-.36-1.64L12 14l7 7h3v-1zM6 8c-1.1 0-2-.89-2-2s.9-2 2-2 2 .89 2 2-.9 2-2 2m0 12c-1.1 0-2-.89-2-2s.9-2 2-2 2 .89 2 2-.9 2-2 2m6-7.5c-.28 0-.5-.22-.5-.5s.22-.5.5-.5.5.22.5.5-.22.5-.5.5M19 3l-6 6 2 2 7-7V3z" class="jp-icon3"/>\n</svg>\n',delete_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24">\n <path fill="#626262" d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z" class="jp-icon3"/>\n</svg>\n',dock_bottom_namespaceObject='<svg width="16" version="1.1" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg">\n <path class="jp-icon3" d="m19.8 19.8v-17.6h-17.6v17.6zm-15.408-2.2v-3.8027h13.208v3.8027zm13.208-5.5301h-13.218v-7.6699h13.218z" fill="#616161"/>\n</svg>\n',dock_left_namespaceObject='<svg width="16" version="1.1" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg">\n <path class="jp-icon3" d="m2.2 19.8h17.6v-17.6h-17.6zm2.2-15.408h3.8027v13.208h-3.8027zm5.5301 13.208v-13.218h7.6699v13.218z" fill="#616161"/>\n</svg>\n',dock_right_namespaceObject='<svg width="16" version="1.1" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg">\n <path class="jp-icon3" d="m19.8 2.2h-17.6v17.6h17.6zm-2.2 15.408h-3.8027v-13.208h3.8027zm-5.5301-13.208v13.218h-7.6699v-13.218z" fill="#616161"/>\n</svg>\n',dock_top_namespaceObject='<svg width="16" version="1.1" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg">\n <path class="jp-icon3" d="m2.2 2.2v17.6h17.6v-17.6zm15.408 2.2v3.8027h-13.208v-3.8027zm-13.208 5.5301h13.218v7.6699h-13.218z" fill="#616161"/>\n</svg>\n',dots_namespaceObject='<?xml version="1.0" encoding="UTF-8"?>\n<svg width="16" version="1.1" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\n <g class="jp-icon3" transform="rotate(90,12,12)" fill="#616161">\n <circle cx="5" cy="12" r="2"/>\n <circle cx="12" cy="12" r="2"/>\n <circle cx="19" cy="12" r="2"/>\n </g>\n</svg>\n',download_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M19 9h-4V3H9v6H5l7 7zM5 18v2h14v-2z" class="jp-icon3"/>\n</svg>\n',duplicate_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="none" viewBox="0 0 14 14">\n <path fill="#616161" fill-rule="evenodd" d="M2.8.875h6.096c.305 0 .554.264.554.587s-.25.587-.554.587H3.354c-.305 0-.554.264-.554.587V9.68c0 .322-.25.587-.554.587s-.554-.264-.554-.587V2.049c0-.646.498-1.174 1.108-1.174M5.367 11.9V4.55h5.716v7.35zM4.142 4.142c0-.451.365-.817.816-.817h6.534c.45 0 .816.366.816.817v8.166a.817.817 0 0 1-.816.817H4.958a.817.817 0 0 1-.816-.817z" class="jp-icon3" clip-rule="evenodd"/>\n <path fill="#616161" stroke="#616161" stroke-width=".5" d="M9.436 8.265H8.364v1.071a.215.215 0 0 1-.214.215.215.215 0 0 1-.214-.215v-1.07H6.864a.215.215 0 0 1-.214-.215c0-.118.096-.215.214-.215h1.072v-1.07a.214.214 0 1 1 .428-.001v1.072h1.072c.118 0 .214.096.214.214a.215.215 0 0 1-.214.214Z" class="jp-icon3"/>\n</svg>\n',edit_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04a.996.996 0 0 0 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" class="jp-icon3"/>\n</svg>\n',ellipses_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <g fill="#616161" class="jp-icon3">\n <circle cx="5" cy="12" r="2"/>\n <circle cx="12" cy="12" r="2"/>\n <circle cx="19" cy="12" r="2"/>\n </g>\n</svg>\n',error_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <g fill="#616161" class="jp-icon3">\n <circle cx="12" cy="19" r="2"/>\n <path d="M10 3h4v12h-4z"/>\n </g>\n</svg>\n',exceptions_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <g fill="#616161" class="jp-icon3">\n <path d="m12.039.5-.753 1.506L.5 23.576l23.082-.001zm.001 4.017 8.528 17.05-17.055.001z"/>\n <path d="M11 8h2v10h-2zm0 11h2v2h-2z"/>\n </g>\n</svg>\n',expand_all_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <g fill="#616161" class="jp-icon3">\n <path d="M8 2h12c1 0 2 1 2 2v12c0 1 0 2-2 2V4H6c0-2 1-2 2-2"/>\n <path d="M18 8c0-1-1-2-2-2H4C3 6 2 7 2 8v12c0 1 1 2 2 2h12c1 0 2-1 2-2zm-2 0v12H4V8z"/>\n <path d="M11 10H9v3H6v2h3v3h2v-3h3v-2h-3z"/>\n </g>\n</svg>\n',expand_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 8.5 10.5">\n <g fill="#BDBDBD" class="jp-icon-output">\n <path d="M.019 0h8.458v1.064H.019zM0 9.521h8.491v1.059H0zm3.712-5.822h1.056v1.589H3.712z"/>\n <path d="m4.244 1.368 1.06 1.167 1.06 1.167h-4.24l1.06-1.167zm-.532 3.92h1.056V6.88H3.712z"/>\n <path d="m4.242 9.213-1.06-1.167-1.06-1.167h4.24l-1.06 1.167z"/>\n </g>\n</svg>\n',extension_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M20.5 11H19V7c0-1.1-.9-2-2-2h-4V3.5a2.5 2.5 0 0 0-5 0V5H4c-1.1 0-1.99.9-1.99 2v3.8H3.5c1.49 0 2.7 1.21 2.7 2.7s-1.21 2.7-2.7 2.7H2V20c0 1.1.9 2 2 2h3.8v-1.5c0-1.49 1.21-2.7 2.7-2.7s2.7 1.21 2.7 2.7V22H17c1.1 0 2-.9 2-2v-4h1.5a2.5 2.5 0 0 0 0-5" class="jp-icon3"/>\n</svg>\n',fast_forward_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path fill="#616161" d="m4 18 8.5-6L4 6zm9-12v12l8.5-6z" class="jp-icon3"/>\n</svg>\n',file_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 22 22">\n <path fill="#616161" d="m19.3 8.2-5.5-5.5c-.3-.3-.7-.5-1.2-.5H3.9c-.8.1-1.6.9-1.6 1.8v14.1c0 .9.7 1.6 1.6 1.6h14.2c.9 0 1.6-.7 1.6-1.6V9.4c.1-.5-.1-.9-.4-1.2m-5.8-3.3 3.4 3.6h-3.4zm3.9 12.7H4.7c-.1 0-.2 0-.2-.2V4.7c0-.2.1-.3.2-.3h7.2v4.4s0 .8.3 1.1 1.1.3 1.1.3h4.3v7.2s-.1.2-.2.2" class="jp-icon3 jp-icon-selectable"/>\n</svg>\n',file_upload_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z" class="jp-icon3"/>\n</svg>\n',filter_dot_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#FFF" d="M14 12v7.88c.04.3-.06.62-.29.83a.996.996 0 0 1-1.41 0l-2.01-2.01a.99.99 0 0 1-.29-.83V12h-.03L4.21 4.62a1 1 0 0 1 .17-1.4c.19-.14.4-.22.62-.22h14c.22 0 .43.08.62.22a1 1 0 0 1 .17 1.4L14.03 12z" class="jp-icon3"/>\n <circle cx="18" cy="17" r="3" fill="#FFF" class="jp-icon-dot"/>\n</svg>\n',filter_list_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" class="jp-icon3"/>\n</svg>\n',filter_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#FFF" d="M14 12v7.88c.04.3-.06.62-.29.83a.996.996 0 0 1-1.41 0l-2.01-2.01a.99.99 0 0 1-.29-.83V12h-.03L4.21 4.62a1 1 0 0 1 .17-1.4c.19-.14.4-.22.62-.22h14c.22 0 .43.08.62.22a1 1 0 0 1 .17 1.4L14.03 12z" class="jp-icon3"/>\n</svg>\n',folder_favorite_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="#000" viewBox="0 0 24 24">\n <path fill="#616161" d="M20 6h-8l-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2m-2.06 11L15 15.28 12.06 17l.78-3.33-2.59-2.24 3.41-.29L15 8l1.34 3.14 3.41.29-2.59 2.24z" class="jp-icon3 jp-icon-selectable"/>\n</svg>\n',folder_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z" class="jp-icon3 jp-icon-selectable"/>\n</svg>\n',history_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M13.5 8H12v5l4.28 2.54.72-1.21-3.5-2.08zM13 3a9 9 0 0 0-9 9H1l3.96 4.03L9 12H6a7 7 0 0 1 7-7 7 7 0 0 1 7 7 7 7 0 0 1-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42A8.9 8.9 0 0 0 13 21a9 9 0 0 0 9-9 9 9 0 0 0-9-9" class="jp-icon3"/>\n</svg>\n',home_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="#000" viewBox="0 0 24 24">\n <path fill="#616161" d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z" class="jp-icon3 jp-icon-selectable"/>\n</svg>\n',html5_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 512 512">\n <path fill="#000" d="M108.4 0h23v22.8h21.2V0h23v69h-23V46h-21v23h-23.2M206 23h-20.3V0h63.7v23H229v46h-23m53.5-69h24.1l14.8 24.3L313.2 0h24.1v69h-23V34.8l-16.1 24.8-16.1-24.8V69h-22.6m89.2-69h23v46.2h32.6V69h-55.6" class="jp-icon0 jp-icon-selectable"/>\n <path fill="#e44d26" d="m107.6 471-33-370.4h362.8l-33 370.2L255.7 512" class="jp-icon-selectable"/>\n <path fill="#f16529" d="M256 480.5V131h148.3L376 447" class="jp-icon-selectable"/>\n <path fill="#ebebeb" d="M142 176.3h114v45.4h-64.2l4.2 46.5h60v45.3H154.4m2 22.8H202l3.2 36.3 50.8 13.6v47.4l-93.2-26" class="jp-icon-selectable-inverse"/>\n <path fill="#fff" d="M369.6 176.3H255.8v45.4h109.6m-4.1 46.5H255.8v45.4h56l-5.3 59-50.7 13.6v47.2l93-25.8" class="jp-icon-selectable-inverse"/>\n</svg>\n',image_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 22 22">\n <path fill="#FFF" d="M2.2 2.2h17.5v17.5H2.2z" class="jp-icon-brand4 jp-icon-selectable-inverse"/>\n <path fill="#3F51B5" d="M2.2 2.2v17.5h17.5l.1-17.5zm12.1 2.2c1.2 0 2.2 1 2.2 2.2s-1 2.2-2.2 2.2-2.2-1-2.2-2.2 1-2.2 2.2-2.2M4.4 17.6l3.3-8.8 3.3 6.6 2.2-3.2 4.4 5.4z" class="jp-icon-brand0 jp-icon-selectable"/>\n</svg>\n',info_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 50.978 50.978">\n <g fill="#616161" class="jp-icon3">\n <path d="M43.52 7.458C38.711 2.648 32.307 0 25.489 0 18.67 0 12.266 2.648 7.458 7.458c-9.943 9.941-9.943 26.119 0 36.062 4.809 4.809 11.212 7.456 18.031 7.458h.002c6.816 0 13.221-2.648 18.029-7.458 4.809-4.809 7.457-11.212 7.457-18.03 0-6.82-2.649-13.224-7.457-18.032m-1.414 34.647c-4.432 4.431-10.332 6.872-16.615 6.872h-.002c-6.285-.001-12.187-2.441-16.617-6.872-9.162-9.163-9.162-24.071 0-33.233C13.303 4.44 19.204 2 25.489 2c6.284 0 12.186 2.44 16.617 6.872 4.431 4.431 6.871 10.332 6.871 16.617 0 6.283-2.441 12.186-6.871 16.616"/>\n <path d="M23.578 32.218q-.034-2.602.496-3.972t2.272-3.253q.702-.805 1.367-1.575.939-1.13 1.436-2.175.496-1.061.495-2.5 0-1.643-.779-2.979-.848-1.319-2.806-1.369-2.703.085-3.55 1.832a5.3 5.3 0 0 0-.607 1.814 11.3 11.3 0 0 0-.207 2.174h-2.937q-.136-3.312 1.493-5.719 1.593-2.459 5.378-2.527 3.24.034 5.141 1.758 1.918 1.74 1.95 4.811 0 1.712-.41 2.911a7.6 7.6 0 0 1-1.268 2.243 22 22 0 0 1-1.73 2.002 34 34 0 0 0-1.987 2.346 5.2 5.2 0 0 0-.565 1.199q-.24 1.438-.171 2.979zm0 6.002v-3.484h3.076v3.484z"/>\n </g>\n</svg>\n',inspector_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m-5 14H4v-4h11zm0-5H4V9h11zm5 5h-4V9h4z" class="jp-inspector-icon-color jp-icon-selectable"/>\n</svg>\n',json_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 22 22">\n <g fill="#F9A825" class="jp-json-icon-color jp-icon-selectable">\n <path d="M20.2 11.8c-1.6 0-1.7.5-1.7 1 0 .4.1.9.1 1.3.1.5.1.9.1 1.3 0 1.7-1.4 2.3-3.5 2.3h-.9v-1.9h.5c1.1 0 1.4 0 1.4-.8 0-.3 0-.6-.1-1 0-.4-.1-.8-.1-1.2 0-1.3 0-1.8 1.3-2-1.3-.2-1.3-.7-1.3-2 0-.4.1-.8.1-1.2.1-.4.1-.7.1-1 0-.8-.4-.7-1.4-.8h-.5V4.1h.9c2.2 0 3.5.7 3.5 2.3 0 .4-.1.9-.1 1.3-.1.5-.1.9-.1 1.3 0 .5.2 1 1.7 1zM1.8 10.1c1.6 0 1.7-.5 1.7-1 0-.4-.1-.9-.1-1.3-.1-.5-.1-.9-.1-1.3 0-1.6 1.4-2.3 3.5-2.3h.9v1.9h-.5c-1 0-1.4 0-1.4.8 0 .3 0 .6.1 1 0 .2.1.6.1 1 0 1.3 0 1.8-1.3 2C6 11.2 6 11.7 6 13c0 .4-.1.8-.1 1.2-.1.3-.1.7-.1 1 0 .8.3.8 1.4.8h.5v1.9h-.9c-2.1 0-3.5-.6-3.5-2.3 0-.4.1-.9.1-1.3.1-.5.1-.9.1-1.3 0-.5-.2-1-1.7-1z"/>\n <circle cx="11" cy="13.8" r="2.1"/>\n <circle cx="11" cy="8.2" r="2.1"/>\n </g>\n</svg>\n',julia_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 325 300">\n <path fill="#cb3c33" d="M150.898 225c0 41.422-33.578 75-75 75s-75-33.578-75-75 33.579-75 75-75 75 33.578 75 75" class="jp-brand0 jp-icon-selectable"/>\n <path fill="#389826" d="M237.5 75c0 41.422-33.578 75-75 75s-75-33.578-75-75 33.578-75 75-75 75 33.578 75 75" class="jp-brand0 jp-icon-selectable"/>\n <path fill="#9558b2" d="M324.102 225c0 41.422-33.579 75-75 75s-75-33.578-75-75 33.578-75 75-75 75 33.578 75 75" class="jp-brand0 jp-icon-selectable"/>\n</svg>\n',jupyter_favicon_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="152" height="165" version="1.1" viewBox="0 0 152 165">\n <path fill="#F37726" d="M76.021 140.163c-32.64 0-61.145-11.927-75.942-29.58 5.51 15.84 15.781 29.567 29.39 39.278a80.17 80.17 0 0 0 46.57 14.929 80.17 80.17 0 0 0 46.57-14.929c13.61-9.711 23.88-23.437 29.391-39.278-14.833 17.653-43.338 29.58-75.979 29.58m-.005-114.832c32.64 0 61.146 11.927 75.943 29.58a80.9 80.9 0 0 0-29.391-39.278A80.16 80.16 0 0 0 75.998.705a80.16 80.16 0 0 0-46.57 14.928A80.9 80.9 0 0 0 .038 54.912c14.832-17.617 43.338-29.58 75.978-29.58" class="jp-jupyter-icon-color"/>\n</svg>\n',jupyter_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="39" height="51" viewBox="0 0 39 51">\n <path fill="#F37726" d="M20.005 38.114c-7.85 0-14.706-2.876-18.265-7.134a19.5 19.5 0 0 0 7.069 9.473 19.24 19.24 0 0 0 11.2 3.6c4.013 0 7.927-1.258 11.2-3.6a19.5 19.5 0 0 0 7.069-9.473c-3.567 4.258-10.423 7.134-18.273 7.134m-.002-27.694c7.85 0 14.706 2.876 18.265 7.133a19.5 19.5 0 0 0-7.069-9.473A19.24 19.24 0 0 0 20 4.48a19.24 19.24 0 0 0-11.2 3.6 19.5 19.5 0 0 0-7.069 9.473c3.567-4.248 10.423-7.134 18.273-7.134" class="jp-jupyter-icon-color"/>\n <path fill="#616161" d="M37.194 3.154a3 3 0 0 1-.426 1.672 2.96 2.96 0 0 1-1.275 1.153 2.93 2.93 0 0 1-3.238-.505 3 3 0 0 1-.776-3.21c.2-.553.558-1.033 1.029-1.38a2.93 2.93 0 0 1 3.733.209c.576.532.919 1.274.953 2.061M9.228 46.393a3.77 3.77 0 0 1-.536 2.11 3.73 3.73 0 0 1-1.608 1.452 3.69 3.69 0 0 1-4.082-.638 3.75 3.75 0 0 1-1.097-1.875 3.8 3.8 0 0 1 .122-2.173 3.74 3.74 0 0 1 1.299-1.739 3.696 3.696 0 0 1 4.704.268 3.76 3.76 0 0 1 1.198 2.595M2.635 9.456a2.17 2.17 0 0 1-1.227-.318 2.2 2.2 0 0 1-.845-.951A2.22 2.22 0 0 1 .935 5.77a2.16 2.16 0 0 1 2.356-.577c.405.15.757.418 1.011.77a2.21 2.21 0 0 1-.156 2.783 2.17 2.17 0 0 1-1.511.71" class="jp-icon3"/>\n</svg>\n',jupyterlab_wordmark_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="200" viewBox="0 0 1860.8 475">\n <path fill="#4E4E4E" d="M53.324 293.087c0 48.7-3.7 64.7-13.6 76.4-10.8 10-25 15.5-39.7 15.5l3.7 29c22.8.3 44.8-7.9 61.9-23.1 17.8-18.5 24-44.1 24-83.3v-184.3h-36.4v170.1zm271.42-22.179c0 21 0 39.5 1.7 55.4h-31.8l-2.1-33.3h-.8c-6.7 11.6-16.4 21.3-28 27.9s-24.8 10-38.2 9.8c-31.4 0-69-17.7-69-89v-118.8h36.4v112.7c0 38.7 11.6 64.7 44.6 64.7 10.3-.2 20.4-3.5 28.9-9.4s15.1-14.3 18.9-23.9c2.2-6.1 3.3-12.5 3.3-18.9v-125h36.4v147.8zm68.512-81.525c0-26-.8-47-1.7-66.7h32.7l1.7 34.8h.8c7.1-12.5 17.5-22.8 30.1-29.7 12.5-7 26.7-10.3 41-9.8 48.3 0 84.7 41.7 84.7 103.3 0 73.1-43.7 109.2-91 109.2-12.1.5-24.2-2.2-35-7.8s-19.9-13.9-26.6-24.2h-.8v110.5h-36v-220zm36 54.2c.1 5.1.6 10.1 1.7 15.1 3 12.3 9.9 23.3 19.8 31.1s22.1 12.1 34.7 12.1c38.5 0 60.7-31.9 60.7-78.5 0-40.7-21.1-75.6-59.5-75.6-12.9.4-25.3 5.1-35.3 13.4-9.9 8.3-16.9 19.7-19.6 32.4-1.5 4.9-2.3 10-2.5 15.1zm217.572-120.485 43.7 120.1c4.5 13.4 9.5 29.4 12.8 41.7h.8c3.7-12.2 7.9-27.7 12.8-42.4l39.7-119.2h38.5l-54.4 144.8c-26 69.7-43.7 105.4-68.6 127.2-12.5 11.7-27.9 20-44.6 23.9l-9.1-31.1c11.7-3.9 22.5-10.1 31.8-18.1 13.2-11.1 23.7-25.2 30.6-41.2 1.5-2.8 2.5-5.7 2.9-8.8-.3-3.3-1.2-6.6-2.5-9.7l-73.8-187.1h39.7zM890.649 64.65v58.3h52v28.2h-52v109.5c0 25 7 39.5 27.3 39.5 7.1.1 14.2-.7 21.1-2.5l1.7 27.7c-10.3 3.7-21.3 5.4-32.2 5-7.3.4-14.6-.7-21.3-3.4-6.8-2.7-12.9-6.8-17.9-12.1-10.3-10.9-14.1-29-14.1-52.9v-110.8h-31v-28.2h31v-48.7zm119.111 166.711c.8 50 32.2 70.6 68.6 70.6 19 .6 37.9-3 55.3-10.5l6.2 26.4c-20.9 8.9-43.5 13.1-66.2 12.6-61.5 0-98.3-41.2-98.3-102.5 0-61.4 35.5-109.6 93.7-109.6 65.2 0 82.7 58.3 82.7 95.7-.1 5.8-.5 11.5-1.2 17.2h-140.8zm106.6-26.4c.4-23.5-9.5-60.1-50.4-60.1-36.8 0-52.8 34.4-55.7 60.1zm88.317-18.505c0-23.9-.4-44.5-1.7-63.4h31.8l1.2 39.9h1.7c9.1-27.3 31-44.5 55.3-44.5 3.5-.1 7 .4 10.3 1.2v34.8c-4.1-.9-8.2-1.3-12.4-1.2-25.6 0-43.7 19.7-48.7 47.4-1 5.7-1.6 11.5-1.7 17.2v108.3h-36v-139.7z" class="jp-icon2"/>\n <path fill="#F37726" d="M1352.3 326.2h37V28h-37zm252.5 0c-2.5-13.9-3.4-31.1-3.4-48.7v-76c0-40.7-15.1-83.1-77.3-83.1-25.6 0-50 7.1-66.8 18.1l8.4 24.4c14.3-9.2 34-15.1 53-15.1 41.6 0 46.2 30.2 46.2 47v4.2c-78.6-.4-122.3 26.5-122.3 75.6 0 29.4 21 58.4 62.2 58.4 29 0 50.9-14.3 62.2-30.2h1.3l2.9 25.6h33.6zm-39.1-68.5c0 3.8-.8 8-2.1 11.8-5.9 17.2-22.7 34-49.2 34-18.9 0-34.9-11.3-34.9-35.3 0-39.5 45.8-46.6 86.2-45.8zm132.8 68.5 1.7-33.6h1.3c15.1 26.9 38.7 38.2 68.1 38.2 45.4 0 91.2-36.1 91.2-108.8.4-61.7-35.3-103.7-85.7-103.7-32.8 0-56.3 14.7-69.3 37.4h-.8V28h-36.6v245.7c0 18.1-.8 38.6-1.7 52.5zm6.3-118c0-5.9 1.3-10.9 2.1-15.1 7.6-28.1 31.1-45.4 56.3-45.4 39.5 0 60.5 34.9 60.5 75.6 0 46.6-23.1 78.1-61.8 78.1-26.9 0-48.3-17.6-55.5-43.3-.8-4.2-1.7-8.8-1.7-13.4v-36.5z" class="jp-jupyter-icon-color"/>\n</svg>\n',kernel_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M15 9H9v6h6zm-2 4h-2v-2h2zm8-2V9h-2V7c0-1.1-.9-2-2-2h-2V3h-2v2h-2V3H9v2H7c-1.1 0-2 .9-2 2v2H3v2h2v2H3v2h2v2c0 1.1.9 2 2 2h2v2h2v-2h2v2h2v-2h2c1.1 0 2-.9 2-2v-2h2v-2h-2v-2zm-4 6H7V7h10z" class="jp-icon2"/>\n</svg>\n',keyboard_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M20 5H4c-1.1 0-1.99.9-1.99 2L2 17c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m-9 3h2v2h-2zm0 3h2v2h-2zM8 8h2v2H8zm0 3h2v2H8zm-1 2H5v-2h2zm0-3H5V8h2zm9 7H8v-2h8zm0-4h-2v-2h2zm0-3h-2V8h2zm3 3h-2v-2h2zm0-3h-2V8h2z" class="jp-icon3 jp-icon-selectable"/>\n</svg>\n',launch_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="32" viewBox="0 0 32 32">\n <g fill="#616161" class="jp-icon3 jp-icon-selectable">\n <path d="M26 28H6a2.003 2.003 0 0 1-2-2V6a2.003 2.003 0 0 1 2-2h10v2H6v20h20V16h2v10a2.003 2.003 0 0 1-2 2"/>\n <path d="M20 2v2h6.586L18 12.586 19.414 14 28 5.414V12h2V2z"/>\n </g>\n</svg>\n',launcher_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M19 19H5V5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z" class="jp-icon3 jp-icon-selectable"/>\n</svg>\n',line_form_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#fff" d="M5.88 4.12 13.76 12l-7.88 7.88L8 22l10-10L8 2z"/>\n</svg>\n',link_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5" class="jp-icon3"/>\n</svg>\n',list_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M19 5v14H5V5zm1.1-2H3.9c-.5 0-.9.4-.9.9v16.2c0 .4.4.9.9.9h16.2c.4 0 .9-.5.9-.9V3.9c0-.5-.5-.9-.9-.9M11 7h6v2h-6zm0 4h6v2h-6zm0 4h6v2h-6zM7 7h2v2H7zm0 4h2v2H7zm0 4h2v2H7z" class="jp-icon2 jp-icon-selectable"/>\n</svg>\n',lock_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 23">\n <path fill="#333" d="M12 17a2 2 0 0 0 2-2 2 2 0 0 0-2-2 2 2 0 0 0-2 2 2 2 0 0 0 2 2m6-9a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V10a2 2 0 0 1 2-2h1V6a5 5 0 0 1 5-5 5 5 0 0 1 5 5v2zm-6-5a3 3 0 0 0-3 3v2h6V6a3 3 0 0 0-3-3" class="jp-icon4"/>\n</svg>\n',markdown_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 22 22">\n <path fill="#7B1FA2" d="M5 14.9h12l-6.1 6zm9.4-6.8c0-1.3-.1-2.9-.1-4.5-.4 1.4-.9 2.9-1.3 4.3l-1.3 4.3h-2L8.5 7.9c-.4-1.3-.7-2.9-1-4.3-.1 1.6-.1 3.2-.2 4.6L7 12.4H4.8l.7-11h3.3L10 5c.4 1.2.7 2.7 1 3.9.3-1.2.7-2.6 1-3.9l1.2-3.7h3.3l.6 11h-2.4z" class="jp-icon-contrast0 jp-icon-selectable"/>\n</svg>\n',mermaid_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" version="1.1" viewBox="0 0 491 675">\n <path fill="#ff3670" d="M85 92c-46 0-85 37-85 85v321c0 46 37 85 85 85h321c46 0 85-37 85-85V177c0-46-37-85-85-85zm-2 111c72-3.1 139 41 162 109 25-67 91-112 162-109 2.4 57-25 111-72 144-24 16-39 44-39 74v51H192v-51c.08-29-15-57-39-74-47-32-75-86-72-144z" class="jp-icon-contrast2 jp-icon-selectable"/>\n</svg>\n',move_down_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="none" viewBox="0 0 14 14">\n <path fill="#616161" d="M12.471 7.529a.748.748 0 0 0-1.057-1.058L7.75 10.127V1.75a.75.75 0 0 0-1.5 0v8.378l-3.653-3.66a.753.753 0 1 0-1.065 1.064l4.76 4.76a1 1 0 0 0 1.415 0z" class="jp-icon3"/>\n</svg>\n',move_up_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="none" viewBox="0 0 14 14">\n <path fill="#616161" d="M1.529 6.471a.748.748 0 0 0 1.057 1.058L6.25 3.873v8.377a.75.75 0 0 0 1.5 0V3.873l3.653 3.659a.753.753 0 1 0 1.065-1.064l-4.76-4.76a1 1 0 0 0-1.415 0z" class="jp-icon3"/>\n</svg>\n',new_folder_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M20 6h-8l-2-2H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2m-1 8h-3v3h-2v-3h-3v-2h3V9h2v3h3z" class="jp-icon3"/>\n</svg>\n',not_trusted_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" fill="none" viewBox="0 0 25 25">\n <path stroke="#333" stroke-width="2" d="M4.86 14.44c-1.034-2.67-.996-5.382-.61-7.24 1.232-.267 2.83-.797 4.351-1.355a92 92 0 0 0 4.387-1.75 68 68 0 0 0 4.23 1.748c1.532.57 3.182 1.11 4.536 1.37.382 1.859.417 4.564-.615 7.228-1.109 2.862-3.472 5.743-8.139 7.494-4.667-1.75-7.03-4.632-8.14-7.494Zm11.824-5.12-7.368 7.365m7.368-.001L9.316 9.319" class="jp-icon2"/>\n</svg>\n',notebook_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 22 22">\n <g fill="#EF6C00" class="jp-notebook-icon-color jp-icon-selectable">\n <path d="M18.7 3.3v15.4H3.3V3.3zm1.5-1.5H1.8v18.3h18.3z"/>\n <path d="m16.5 16.5-5.4-4.3-5.6 4.3v-11h11z"/>\n </g>\n</svg>\n',numbering_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 28 28">\n <path fill="#616161" d="M4 19h2v.5H5v1h1v.5H4v1h3v-4H4zm1-9h1V6H4v1h1zm-1 3h1.8L4 15.1v.9h3v-1H5.2L7 12.9V12H4zm5-6v2h14V7zm0 14h14v-2H9zm0-6h14v-2H9z" class="jp-icon3"/>\n</svg>\n',offline_bolt_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M12 2.02c-5.51 0-9.98 4.47-9.98 9.98s4.47 9.98 9.98 9.98 9.98-4.47 9.98-9.98S17.51 2.02 12 2.02M11.48 20v-6.26H8L13 4v6.26h3.35z" class="jp-icon3"/>\n</svg>\n',open_kernel_source_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path fill="#616161" d="M5 2h10l5 5v13a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-6h1v2l4-3-4-3v2H3V4a2 2 0 0 1 2-2m7 16h4v-2h-4zm0-4h6v-2h-6zm0-4h6V8h-6zm-2 4a1 1 0 1 0 0-2 1 1 0 0 0 0 2m-7-2v2H1v-2z" class="jp-icon3"/>\n</svg>\n',palette_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <g fill="#616161" class="jp-icon3">\n <path d="M18 13v7H4V6h5.02c.05-.71.22-1.38.48-2H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-5zm1.3-4.11c.44-.7.7-1.51.7-2.39C20 4.01 17.99 2 15.5 2S11 4.01 11 6.5s2.01 4.5 4.49 4.5c.88 0 1.7-.26 2.39-.7L21 13.42 22.42 12zM15.5 9a2.5 2.5 0 0 1 0-5 2.5 2.5 0 0 1 0 5"/>\n <path fill-rule="evenodd" d="M4 6h5.019a6.5 6.5 0 0 0 3.015 6H9v2h7v-1.019c.57-.043 1.12-.16 1.64-.341L18 13v7H4zm4 2H6v2h2zm-2 4h2v2H6zm2 4H6v2h2zm1 0h7v2H9z" clip-rule="evenodd"/>\n </g>\n</svg>\n',paste_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path fill="#616161" d="M19 2h-4.18C14.4.84 13.3 0 12 0S9.6.84 9.18 2H5c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1m7 18H5V4h2v3h10V4h2z" class="jp-icon3"/>\n</svg>\n',pause_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path fill="#616161" d="M7 6h4v12H7Zm6 0h4v12h-4z" class="jp-icon3"/>\n</svg>\n',pdf_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 22 22">\n <path fill="#FF2A2A" d="m17.933 13.667 3.987 3.987-1.117 1.117-2.51-2.51-1.066 1.067 2.36 2.36-1.117 1.117-2.36-2.36-2.43 2.429-1.477-1.478zm-6.163-3.93-3.496 3.496.53.53q.905.906 1.83.932.929.031 1.784-.825.852-.852.822-1.773t-.94-1.83zm-.36-2.594 1.557 1.558q1.305 1.305 1.754 2.13.456.825.468 1.727.015.79-.296 1.493-.31.702-.951 1.343-.649.648-1.355.963-.702.31-1.493.295-.905-.015-1.738-.472-.829-.46-2.118-1.75L5.68 12.874zm-5.76-5.76L8.1 3.835Q9.195 4.93 9.291 6q.103 1.07-.795 1.968-.901.902-1.976.802-1.067-.1-2.16-1.193l-.975-.975L1.397 8.59-.08 7.113Zm.406 2.548-1.6 1.6.817.818q.43.43.871.457.445.023.829-.361t.357-.825-.457-.871z" class="jp-icon-selectable"/>\n</svg>\n',python_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="-10 -10 131.161 132.389">\n <path fill="#306998" d="M54.919 0c-4.584.022-8.961.413-12.813 1.095C30.76 3.099 28.7 7.295 28.7 15.032v10.219h26.813v3.406H18.638c-7.793 0-14.616 4.684-16.75 13.594-2.462 10.213-2.571 16.586 0 27.25 1.905 7.938 6.457 13.594 14.25 13.594h9.218v-12.25c0-8.85 7.657-16.657 16.75-16.657h26.782c7.454 0 13.406-6.138 13.406-13.625v-25.53c0-7.267-6.13-12.726-13.406-13.938C64.282.328 59.502-.02 54.918 0m-14.5 8.22c2.77 0 5.031 2.298 5.031 5.125 0 2.816-2.262 5.093-5.031 5.093-2.78 0-5.031-2.277-5.031-5.093 0-2.827 2.251-5.125 5.03-5.125" class="jp-icon-selectable"/>\n <path fill="#ffd43b" d="M85.638 28.657v11.906c0 9.231-7.826 17-16.75 17H42.106c-7.336 0-13.406 6.279-13.406 13.625V96.72c0 7.266 6.319 11.54 13.406 13.625 8.488 2.495 16.627 2.946 26.782 0 6.75-1.955 13.406-5.888 13.406-13.625V86.5H55.513v-3.405H95.7c7.793 0 10.696-5.436 13.406-13.594 2.8-8.399 2.68-16.476 0-27.25-1.925-7.758-5.604-13.594-13.406-13.594zM70.575 93.313c2.78 0 5.031 2.278 5.031 5.094 0 2.827-2.251 5.125-5.031 5.125-2.77 0-5.031-2.298-5.031-5.125 0-2.816 2.261-5.094 5.031-5.094" class="jp-icon-selectable"/>\n</svg>\n',r_kernel_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid" width="16" height="16" viewBox="0 0 724 561">\n <path class="jp-icon-selectable" d="M361.453,485.937 C162.329,485.937 0.906,377.828 0.906,244.469 C0.906,111.109 162.329,3.000 361.453,3.000 C560.578,3.000 722.000,111.109 722.000,244.469 C722.000,377.828 560.578,485.937 361.453,485.937 ZM416.641,97.406 C265.289,97.406 142.594,171.314 142.594,262.484 C142.594,353.654 265.289,427.562 416.641,427.562 C567.992,427.562 679.687,377.033 679.687,262.484 C679.687,147.971 567.992,97.406 416.641,97.406 Z" fill="rgb(179,179,179)" fill-rule="evenodd"/>\n <path class="jp-icon-selectable" d="M550.000,377.000 C550.000,377.000 571.822,383.585 584.500,390.000 C588.899,392.226 596.510,396.668 602.000,402.500 C607.378,408.212 610.000,414.000 610.000,414.000 L696.000,559.000 L557.000,559.062 L492.000,437.000 C492.000,437.000 478.690,414.131 470.500,407.500 C463.668,401.969 460.755,400.000 454.000,400.000 C449.298,400.000 420.974,400.000 420.974,400.000 L421.000,558.974 L298.000,559.026 L298.000,152.938 L545.000,152.938 C545.000,152.938 657.500,154.967 657.500,262.000 C657.500,369.033 550.000,377.000 550.000,377.000 ZM496.500,241.024 L422.037,240.976 L422.000,310.026 L496.500,310.002 C496.500,310.002 531.000,309.895 531.000,274.877 C531.000,239.155 496.500,241.024 496.500,241.024 Z" fill="rgb(52,101,176)" fill-rule="evenodd"/>\n</svg>\n',filetype_react_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="150 150 541.9 295.3">\n <g fill="#61DAFB" class="jp-icon-brand2 jp-icon-selectable">\n <path d="M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9V78c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6V78.5c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3m-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9m-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9m32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1M421.2 430c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32m-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24q7.05 12 14.4 23.4M420.7 163c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32m-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9m-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6s22.9-35.6 58.3-50.6c8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2M310 490c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7m237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1m38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6M320.8 78.4"/>\n <circle cx="420.9" cy="296.5" r="45.7"/>\n </g>\n</svg>\n',redo_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="24" viewBox="0 0 24 24">\n <path fill="#616161" d="M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8 8 0 0 1 7.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7z" class="jp-icon3"/>\n</svg>\n',regex_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 20 20">\n <path fill="#414141" d="M2 2h16v16H2z" class="jp-icon2"/>\n <g fill="#FFF" class="jp-icon-accent2">\n <circle cx="5.5" cy="14.5" r="1.5"/>\n <path d="M12 4h1v8h-1z"/>\n <path d="m8.786 9.567 6.928-4 .5.866-6.928 4z"/>\n <path d="m8.786 6.433.5-.866 6.928 4-.5.866z"/>\n </g>\n</svg>\n',run_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path fill="#616161" d="M8 5v14l11-7z" class="jp-icon3"/>\n</svg>\n',running_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 512 512">\n <path fill="#616161" d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8m96 328c0 8.8-7.2 16-16 16H176c-8.8 0-16-7.2-16-16V176c0-8.8 7.2-16 16-16h160c8.8 0 16 7.2 16 16z" class="jp-icon3"/>\n</svg>\n',save_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path fill="#616161" d="M17 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" class="jp-icon3"/>\n</svg>\n',search_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 18 18">\n <path fill="#616161" d="M12.1 10.9h-.7l-.2-.2c.8-.9 1.3-2.2 1.3-3.5 0-3-2.4-5.4-5.4-5.4S1.8 4.2 1.8 7.1s2.4 5.4 5.4 5.4c1.3 0 2.5-.5 3.5-1.3l.2.2v.7l4.1 4.1 1.2-1.2zm-5 0c-2.1 0-3.7-1.7-3.7-3.7s1.7-3.7 3.7-3.7 3.7 1.7 3.7 3.7-1.6 3.7-3.7 3.7" class="jp-icon3"/>\n</svg>\n',selected_breakpoint_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16">\n <circle cx="10" cy="7" r="6" fill="var(--jp-warn-color1, #f57c00)" />\n <circle cx="10" cy="7" r="4" stroke="var(--jp-layout-color0, #fff)" stroke-width="1.3" />\n</svg>\n',settings_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M19.43 12.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65A.49.49 0 0 0 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.23-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.23.09.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64zM12 15.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5" class="jp-icon3 jp-icon-selectable"/>\n</svg>\n',share_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M18 2c-1.645 0-3 1.355-3 3 0 .191.022.377.057.559L7.922 9.72A2.97 2.97 0 0 0 6 9c-1.645 0-3 1.355-3 3s1.355 3 3 3c.732 0 1.399-.278 1.922-.72l7.135 4.16A3 3 0 0 0 15 19c0 1.645 1.355 3 3 3s3-1.355 3-3-1.355-3-3-3a2.97 2.97 0 0 0-1.922.723l-7.135-4.164C8.978 12.377 9 12.19 9 12s-.022-.377-.057-.559l7.135-4.162C16.601 7.722 17.268 8 18 8c1.645 0 3-1.355 3-3s-1.355-3-3-3m0 2c.564 0 1 .436 1 1s-.436 1-1 1-1-.436-1-1 .436-1 1-1M6 11c.564 0 1 .436 1 1s-.436 1-1 1-1-.436-1-1 .436-1 1-1m12 7c.564 0 1 .436 1 1s-.436 1-1 1-1-.436-1-1 .436-1 1-1" class="jp-icon3"/>\n</svg>\n',spreadsheet_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 22 22">\n <path fill="#4CAF50" d="M2.2 2.2v17.6h17.6V2.2zm15.4 7.7h-5.5V4.4h5.5zM9.9 4.4v5.5H4.4V4.4zm-5.5 7.7h5.5v5.5H4.4zm7.7 5.5v-5.5h5.5v5.5z" class="jp-icon-contrast1 jp-icon-selectable"/>\n</svg>\n',step_into_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">\n <path fill="#616161" d="M8 9.532h.542l3.905-3.905-1.061-1.06-2.637 2.61V1H7.251v6.177l-2.637-2.61-1.061 1.06 3.905 3.905zm1.956 3.481a2 2 0 1 1-4 0 2 2 0 0 1 4 0" class="jp-icon3"/>\n</svg>\n',step_out_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">\n <path fill="#616161" d="M8 1h-.542L3.553 4.905l1.061 1.06 2.637-2.61v6.177h1.498V3.355l2.637 2.61 1.061-1.06L8.542 1zm1.956 12.013a2 2 0 1 1-4 0 2 2 0 0 1 4 0" class="jp-icon3"/>\n</svg>\n',step_over_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">\n <path fill="#616161" d="M14.25 5.75v-4h-1.5v2.542c-1.145-1.359-2.911-2.209-4.84-2.209-3.177 0-5.92 2.307-6.16 5.398l-.02.269h1.5l.022-.226c.212-2.195 2.202-3.94 4.656-3.94 1.736 0 3.244.875 4.05 2.166h-2.83v1.5h4.163l.962-.975V5.75zM8 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4" class="jp-icon3"/>\n</svg>\n',stop_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path fill="#616161" d="M6 6h12v12H6z" class="jp-icon3"/>\n</svg>\n',tab_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16H3V5h10v4h8z" class="jp-icon3"/>\n</svg>\n',table_rows_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path fill="#616161" d="M21 8H3V4h18zm0 2H3v4h18zm0 6H3v4h18z" class="jp-icon3"/>\n</svg>\n',tag_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 43 28">\n <path fill="#616161" d="M28.833 12.334 33 16.501l4.166-4.167zM16.21 21.61c-.523.52-1.366.52-1.885 0l-7.342-6.885c-.41-.386-.9-1.115-.935-1.677-.095-1.52-.028-4.429.018-5.971A1.093 1.093 0 0 1 7.118 6.03c1.97-.046 6.146-.095 6.534.293l8.085 7.315c.519.52.048 1.833-.475 2.356zM9.775 8.265a1.126 1.126 0 1 0-1.593 1.592 1.126 1.126 0 0 0 1.593-1.592" class="jp-icon3"/>\n</svg>\n',terminal_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#333" d="M2 2h20v20H2z" class="jp-terminal-icon-background-color jp-icon-selectable"/>\n <path fill="#fff" d="M9.01 14.762q0-.246-.077-.434a.9.9 0 0 0-.234-.351 1.6 1.6 0 0 0-.422-.288 5 5 0 0 0-.627-.263q-.592-.211-1.078-.446a3.5 3.5 0 0 1-.832-.544 2.2 2.2 0 0 1-.528-.721 2.4 2.4 0 0 1-.187-.985q0-.498.17-.908a2.1 2.1 0 0 1 .48-.72q.31-.306.75-.493.44-.188.979-.24V7.11h.937v1.272q.527.07.95.287.421.217.714.568.3.345.457.82.165.47.164 1.055H8.998q0-.709-.323-1.072-.322-.37-.873-.37-.299 0-.521.083a.9.9 0 0 0-.358.223.9.9 0 0 0-.21.334q-.066.194-.065.421 0 .23.064.41a.9.9 0 0 0 .229.329q.165.152.428.293.263.134.656.275.591.223 1.072.463.48.235.82.55.346.312.528.727.187.41.187.973 0 .515-.17.932-.17.41-.486.709t-.762.48a3.7 3.7 0 0 1-.996.229v1.148h-.931V17.1a4 4 0 0 1-.967-.217 2.6 2.6 0 0 1-.832-.504 2.4 2.4 0 0 1-.574-.826q-.217-.505-.217-1.207h1.635q0 .421.123.709.123.281.316.45.2.165.451.235.252.07.516.07.627 0 .949-.292a.98.98 0 0 0 .322-.756m8.36 3.51h-5.343V17h5.344z" class="jp-terminal-icon-color jp-icon-selectable-inverse"/>\n</svg>\n',text_editor_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M15 15H3v2h12zm0-8H3v2h12zM3 13h18v-2H3zm0 8h18v-2H3zM3 3v2h18V3z" class="jp-text-editor-icon-color jp-icon-selectable"/>\n</svg>\n',toc_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path fill="#616161" d="M7 5h14v2H7zm0 8v-2h14v2zM4 4.5A1.5 1.5 0 0 1 5.5 6 1.5 1.5 0 0 1 4 7.5 1.5 1.5 0 0 1 2.5 6 1.5 1.5 0 0 1 4 4.5m0 6A1.5 1.5 0 0 1 5.5 12 1.5 1.5 0 0 1 4 13.5 1.5 1.5 0 0 1 2.5 12 1.5 1.5 0 0 1 4 10.5M7 19v-2h14v2zm-3-2.5A1.5 1.5 0 0 1 5.5 18 1.5 1.5 0 0 1 4 19.5 1.5 1.5 0 0 1 2.5 18 1.5 1.5 0 0 1 4 16.5" class="jp-icon3 jp-icon-selectable"/>\n</svg>\n',tree_view_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path fill="#616161" d="M22 11V3h-7v3H9V3H2v8h7V8h2v10h4v3h7v-8h-7v3h-2V8h2v3z" class="jp-icon3"/>\n</svg>\n',trusted_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" fill="none" viewBox="0 0 24 25">\n <path stroke="#333" stroke-width="2" d="M3.86 14.44c-1.034-2.67-.996-5.382-.61-7.24 1.232-.267 2.83-.797 4.351-1.355a92 92 0 0 0 4.387-1.75 68 68 0 0 0 4.23 1.748c1.532.57 3.182 1.11 4.536 1.37.382 1.859.417 4.564-.615 7.228-1.109 2.862-3.472 5.743-8.139 7.494-4.667-1.75-7.03-4.632-8.14-7.494Z" class="jp-icon2"/>\n <path fill="#333" stroke="#333" d="m10.86 14.733-2.133-1.866-.727.63L10.86 16 16 10.5l-.721-.632z" class="jp-icon2"/>\n</svg>\n',undo_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8" class="jp-icon3"/>\n</svg>\n',user_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M16 7a4 4 0 1 1-8 0 4 4 0 0 1 8 0m-4 7a7 7 0 0 0-7 7h14a7 7 0 0 0-7-7" class="jp-icon3"/>\n</svg>\n',users_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" version="1.1" viewBox="0 0 36 24">\n <g fill="#616161" class="jp-icon3" transform="translate(-3.628 .1)scale(1.7327)">\n <path d="M18.279 5.265c-1.58 0-2.964.85-3.718 2.115a6.7 6.7 0 0 1 2.81 2.21h5.23a4.32 4.32 0 0 0-4.322-4.325m2.186-2.875a2.19 2.19 0 0 1-2.188 2.188 2.19 2.19 0 0 1-2.189-2.189A2.19 2.19 0 0 1 18.277.201a2.19 2.19 0 0 1 2.188 2.188M5.385 6.633a3.02 3.02 0 0 0-3.02 3.02h4.22a6.7 6.7 0 0 1 1.44-1.467 3.02 3.02 0 0 0-2.64-1.553m1.53-2.01a1.53 1.53 0 0 1-1.529 1.53 1.53 1.53 0 0 1-1.53-1.53 1.53 1.53 0 0 1 1.53-1.53 1.53 1.53 0 0 1 1.53 1.53m-.781 8.912a5.865 5.865 0 0 1 11.73 0z"/>\n <circle cx="12" cy="3.768" r="2.969"/>\n </g>\n</svg>\n',variable_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16">\n <path fill="#007ACC" fill-rule="evenodd" d="m1.5 4-.5.5v8l.5.5H4v-1H2V5h2V4zm13 9 .5-.5v-8l-.5-.5H12v1h2v7h-2v1zM8.797 5l-4.5 2L4 7.457v2.5l.243.429 2.5 1.5.46.028 4.5-2L12 9.457v-2.5l-.243-.429-2.5-1.5zM5 8.34v1.334l1.5.9V9.24zm2.5.942v1.406L11 9.131V7.726zm2.918-2.391-1.452-.872-3.384 1.504 1.452.871z" clip-rule="evenodd"/>\n</svg>\n',vega_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 22 22">\n <g fill="#212121" class="jp-icon1 jp-icon-selectable">\n <path d="m10.6 5.4 2.2-3.2H2.2v7.3l4-6.6z"/>\n <path d="m15.8 2.2-4.4 6.6L7 6.3l-4.8 8v5.5h17.6V2.2zm-7 15.4H5.5v-4.4h3.3zm4.4 0H9.8V9.8h3.4zm4.4 0h-3.4V6.5h3.4z"/>\n </g>\n</svg>\n',video_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path class="jp-icon3 jp-icon-selectable" fill="#616161" d="M18 3v2h-2V3H8v2H6V3H4v18h2v-2h2v2h8v-2h2v2h2V3h-2zM8 17H6v-2h2v2zm0-4H6v-2h2v2zm0-4H6V7h2v2zm10 8h-2v-2h2v2zm0-4h-2v-2h2v2zm0-4h-2V7h2v2z"/>\n <path d="M0 0h24v24H0z" fill="none"/>\n</svg>\n',view_breakpoint_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path fill="#616161" d="M5 2h10l5 5v13a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-6h1v2l4-3-4-3v2H3V4a2 2 0 0 1 2-2m7 16h4v-2h-4zm0-4h6v-2h-6zm0-4h6V8h-6zm-2 4a1 1 0 1 0 0-2 1 1 0 0 0 0 2m-7-2v2H1v-2z" class="jp-icon3"/>\n</svg>\n',word_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 20 20">\n <path fill="#414141" d="M2 2h16v16H2z" class="jp-icon2"/>\n <path fill="#fff" d="M4.57 8.8q.068-1.89 2.42-1.89 1.16 0 1.68.42.567.41.567 1.16v3.47q0 .462.514.462.103 0 .2-.023v.714q-.399.103-.651.103-.452 0-.693-.22-.231-.2-.284-.662-.956.872-2 .872-.903 0-1.47-.472-.525-.472-.525-1.26 0-.262.045-.472.057-.22.116-.378.068-.168.231-.304l.262-.242q.116-.091.368-.168.262-.091.4-.126.135-.045.471-.103t.504-.08l.567-.08q.556-.068.777-.22.22-.153.22-.442v-.252q0-.43-.357-.662-.336-.23-.976-.23-.662 0-.998.261-.336.252-.399.798zm1.89 3.68q.788 0 1.26-.41.504-.42.504-.903v-1.05q-.284.136-.861.231l-.987.158q-.42.068-.766.326-.336.252-.336.704t.304.704.861.252zm3.97-7.88h.945v3.15q.651-.976 1.89-.976 1.16 0 1.89.84.682.84.682 2.31t-.704 2.42q-.704.882-1.89.882-1.26 0-1.89-1.02v.766h-.85zm2.62 3.04q-.746 0-1.16.64-.452.63-.452 1.68t.452 1.68 1.16.63q.777 0 1.26-.63.494-.64.494-1.68 0-1.05-.472-1.68-.462-.64-1.26-.64zm-9.89 8.2 13.6.008c.007 0 0-2.6 0-2.6 0-.008-1.15 0-1.15 0-.007 0-.008 1.5-.008 1.5l-11.3-.001-.006-1.5c0-.008-1.17.001-1.17.001z" class="jp-icon-accent2"/>\n</svg>\n',yaml_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 22 22">\n <g fill="#D81B60" class="jp-icon-contrast2 jp-icon-selectable">\n <path d="M7.2 18.6v-5.4L3 5.6h3.3l1.4 3.1c.3.9.6 1.6 1 2.5.3-.8.6-1.6 1-2.5l1.4-3.1h3.4l-4.4 7.6v5.5z"/>\n <circle cx="17.6" cy="16.5" r="2.1"/>\n <circle cx="17.6" cy="11" r="2.1"/>\n </g>\n</svg>\n',addAboveIcon=new LabIcon({name:"ui-components:add-above",svgstr:add_above_namespaceObject}),addBelowIcon=new LabIcon({name:"ui-components:add-below",svgstr:add_below_namespaceObject}),addIcon=new LabIcon({name:"ui-components:add",svgstr:add_namespaceObject}),audioIcon=new LabIcon({name:"ui-components:audio",svgstr:audio_namespaceObject}),bellIcon=new LabIcon({name:"ui-components:bell",svgstr:bell_namespaceObject}),breakpointIcon=new LabIcon({name:"ui-components:breakpoint",svgstr:breakpoint_namespaceObject}),bugDotIcon=new LabIcon({name:"ui-components:bug-dot",svgstr:bug_dot_namespaceObject}),bugIcon=new LabIcon({name:"ui-components:bug",svgstr:bug_namespaceObject}),buildIcon=new LabIcon({name:"ui-components:build",svgstr:build_namespaceObject}),caretDownEmptyIcon=new LabIcon({name:"ui-components:caret-down-empty",svgstr:caret_down_empty_namespaceObject}),caretDownEmptyThinIcon=new LabIcon({name:"ui-components:caret-down-empty-thin",svgstr:caret_down_empty_thin_namespaceObject}),caretDownIcon=new LabIcon({name:"ui-components:caret-down",svgstr:caret_down_namespaceObject}),caretLeftIcon=new LabIcon({name:"ui-components:caret-left",svgstr:caret_left_namespaceObject}),caretRightIcon=new LabIcon({name:"ui-components:caret-right",svgstr:caret_right_namespaceObject}),caretUpEmptyThinIcon=new LabIcon({name:"ui-components:caret-up-empty-thin",svgstr:caret_up_empty_thin_namespaceObject}),caretUpIcon=new LabIcon({name:"ui-components:caret-up",svgstr:caret_up_namespaceObject}),caseSensitiveIcon=new LabIcon({name:"ui-components:case-sensitive",svgstr:case_sensitive_namespaceObject}),checkIcon=new LabIcon({name:"ui-components:check",svgstr:check_namespaceObject}),circleEmptyIcon=new LabIcon({name:"ui-components:circle-empty",svgstr:circle_empty_namespaceObject}),circleIcon=new LabIcon({name:"ui-components:circle",svgstr:circle_namespaceObject}),cleaningIcon=new LabIcon({name:"ui-components:cleaning",svgstr:cleaning_namespaceObject}),clearIcon=new LabIcon({name:"ui-components:clear",svgstr:clear_namespaceObject}),closeAllIcon=new LabIcon({name:"ui-components:close-all",svgstr:close_all_namespaceObject}),closeIcon=new LabIcon({name:"ui-components:close",svgstr:close_namespaceObject}),codeCheckIcon=new LabIcon({name:"ui-components:code-check",svgstr:code_check_namespaceObject}),codeIcon=new LabIcon({name:"ui-components:code",svgstr:code_namespaceObject}),collapseAllIcon=new LabIcon({name:"ui-components:collapse-all",svgstr:collapse_all_namespaceObject}),collapseIcon=new LabIcon({name:"ui-components:collapse",svgstr:collapse_namespaceObject}),consoleIcon=new LabIcon({name:"ui-components:console",svgstr:console_namespaceObject}),copyIcon=new LabIcon({name:"ui-components:copy",svgstr:copy_namespaceObject}),copyrightIcon=new LabIcon({name:"ui-components:copyright",svgstr:copyright_namespaceObject}),cutIcon=new LabIcon({name:"ui-components:cut",svgstr:cut_namespaceObject}),deleteIcon=new LabIcon({name:"ui-components:delete",svgstr:delete_namespaceObject}),dockBottomIcon=new LabIcon({name:"ui-components:dock-bottom",svgstr:dock_bottom_namespaceObject}),dockLeftIcon=new LabIcon({name:"ui-components:dock-left",svgstr:dock_left_namespaceObject}),dockRightIcon=new LabIcon({name:"ui-components:dock-right",svgstr:dock_right_namespaceObject}),dockTopIcon=new LabIcon({name:"ui-components:dock-top",svgstr:dock_top_namespaceObject}),dotsIcon=new LabIcon({name:"ui-components:dots",svgstr:dots_namespaceObject}),downloadIcon=new LabIcon({name:"ui-components:download",svgstr:download_namespaceObject}),duplicateIcon=new LabIcon({name:"ui-components:duplicate",svgstr:duplicate_namespaceObject}),editIcon=new LabIcon({name:"ui-components:edit",svgstr:edit_namespaceObject}),ellipsesIcon=new LabIcon({name:"ui-components:ellipses",svgstr:ellipses_namespaceObject}),errorIcon=new LabIcon({name:"ui-components:error",svgstr:error_namespaceObject}),exceptionsIcon=new LabIcon({name:"ui-components:exceptions",svgstr:exceptions_namespaceObject}),expandAllIcon=new LabIcon({name:"ui-components:expand-all",svgstr:expand_all_namespaceObject}),expandIcon=new LabIcon({name:"ui-components:expand",svgstr:expand_namespaceObject}),extensionIcon=new LabIcon({name:"ui-components:extension",svgstr:extension_namespaceObject}),fastForwardIcon=new LabIcon({name:"ui-components:fast-forward",svgstr:fast_forward_namespaceObject}),fileIcon=new LabIcon({name:"ui-components:file",svgstr:file_namespaceObject}),fileUploadIcon=new LabIcon({name:"ui-components:file-upload",svgstr:file_upload_namespaceObject}),filterDotIcon=new LabIcon({name:"ui-components:filter-dot",svgstr:filter_dot_namespaceObject}),filterIcon=new LabIcon({name:"ui-components:filter",svgstr:filter_namespaceObject}),filterListIcon=new LabIcon({name:"ui-components:filter-list",svgstr:filter_list_namespaceObject}),folderFavoriteIcon=new LabIcon({name:"ui-components:folder-favorite",svgstr:folder_favorite_namespaceObject}),folderIcon=new LabIcon({name:"ui-components:folder",svgstr:folder_namespaceObject}),historyIcon=new LabIcon({name:"ui-components:history",svgstr:history_namespaceObject}),homeIcon=new LabIcon({name:"ui-components:home",svgstr:home_namespaceObject}),html5Icon=new LabIcon({name:"ui-components:html5",svgstr:html5_namespaceObject}),imageIcon=new LabIcon({name:"ui-components:image",svgstr:image_namespaceObject}),infoIcon=new LabIcon({name:"ui-components:info",svgstr:info_namespaceObject}),inspectorIcon=new LabIcon({name:"ui-components:inspector",svgstr:inspector_namespaceObject}),jsonIcon=new LabIcon({name:"ui-components:json",svgstr:json_namespaceObject}),juliaIcon=new LabIcon({name:"ui-components:julia",svgstr:julia_namespaceObject}),jupyterFaviconIcon=new LabIcon({name:"ui-components:jupyter-favicon",svgstr:jupyter_favicon_namespaceObject}),jupyterIcon=new LabIcon({name:"ui-components:jupyter",svgstr:jupyter_namespaceObject}),jupyterlabWordmarkIcon=new LabIcon({name:"ui-components:jupyterlab-wordmark",svgstr:jupyterlab_wordmark_namespaceObject}),kernelIcon=new LabIcon({name:"ui-components:kernel",svgstr:kernel_namespaceObject}),keyboardIcon=new LabIcon({name:"ui-components:keyboard",svgstr:keyboard_namespaceObject}),launchIcon=new LabIcon({name:"ui-components:launch",svgstr:launch_namespaceObject}),launcherIcon=new LabIcon({name:"ui-components:launcher",svgstr:launcher_namespaceObject}),lineFormIcon=new LabIcon({name:"ui-components:line-form",svgstr:line_form_namespaceObject}),linkIcon=new LabIcon({name:"ui-components:link",svgstr:link_namespaceObject}),listIcon=new LabIcon({name:"ui-components:list",svgstr:list_namespaceObject}),lockIcon=new LabIcon({name:"ui-components:lock",svgstr:lock_namespaceObject}),markdownIcon=new LabIcon({name:"ui-components:markdown",svgstr:markdown_namespaceObject}),mermaidIcon=new LabIcon({name:"ui-components:mermaid",svgstr:mermaid_namespaceObject}),moveDownIcon=new LabIcon({name:"ui-components:move-down",svgstr:move_down_namespaceObject}),moveUpIcon=new LabIcon({name:"ui-components:move-up",svgstr:move_up_namespaceObject}),newFolderIcon=new LabIcon({name:"ui-components:new-folder",svgstr:new_folder_namespaceObject}),notTrustedIcon=new LabIcon({name:"ui-components:not-trusted",svgstr:not_trusted_namespaceObject}),notebookIcon=new LabIcon({name:"ui-components:notebook",svgstr:notebook_namespaceObject}),numberingIcon=new LabIcon({name:"ui-components:numbering",svgstr:numbering_namespaceObject}),offlineBoltIcon=new LabIcon({name:"ui-components:offline-bolt",svgstr:offline_bolt_namespaceObject}),openKernelSourceIcon=new LabIcon({name:"ui-components:open-kernel-source",svgstr:open_kernel_source_namespaceObject}),paletteIcon=new LabIcon({name:"ui-components:palette",svgstr:palette_namespaceObject}),pasteIcon=new LabIcon({name:"ui-components:paste",svgstr:paste_namespaceObject}),pauseIcon=new LabIcon({name:"ui-components:pause",svgstr:pause_namespaceObject}),pdfIcon=new LabIcon({name:"ui-components:pdf",svgstr:pdf_namespaceObject}),pythonIcon=new LabIcon({name:"ui-components:python",svgstr:python_namespaceObject}),rKernelIcon=new LabIcon({name:"ui-components:r-kernel",svgstr:r_kernel_namespaceObject}),reactIcon=new LabIcon({name:"ui-components:react",svgstr:filetype_react_namespaceObject}),redoIcon=new LabIcon({name:"ui-components:redo",svgstr:redo_namespaceObject}),refreshIcon=new LabIcon({name:"ui-components:refresh",svgstr:refresh_namespaceObject}),regexIcon=new LabIcon({name:"ui-components:regex",svgstr:regex_namespaceObject}),runIcon=new LabIcon({name:"ui-components:run",svgstr:run_namespaceObject}),runningIcon=new LabIcon({name:"ui-components:running",svgstr:running_namespaceObject}),saveIcon=new LabIcon({name:"ui-components:save",svgstr:save_namespaceObject}),searchIcon=new LabIcon({name:"ui-components:search",svgstr:search_namespaceObject}),selectedBreakpointIcon=new LabIcon({name:"ui-components:selected-breakpoint",svgstr:selected_breakpoint_namespaceObject}),settingsIcon=new LabIcon({name:"ui-components:settings",svgstr:settings_namespaceObject}),shareIcon=new LabIcon({name:"ui-components:share",svgstr:share_namespaceObject}),spreadsheetIcon=new LabIcon({name:"ui-components:spreadsheet",svgstr:spreadsheet_namespaceObject}),stepIntoIcon=new LabIcon({name:"ui-components:step-into",svgstr:step_into_namespaceObject}),stepOutIcon=new LabIcon({name:"ui-components:step-out",svgstr:step_out_namespaceObject}),stepOverIcon=new LabIcon({name:"ui-components:step-over",svgstr:step_over_namespaceObject}),stopIcon=new LabIcon({name:"ui-components:stop",svgstr:stop_namespaceObject}),tabIcon=new LabIcon({name:"ui-components:tab",svgstr:tab_namespaceObject}),tableRowsIcon=new LabIcon({name:"ui-components:table-rows",svgstr:table_rows_namespaceObject}),tagIcon=new LabIcon({name:"ui-components:tag",svgstr:tag_namespaceObject}),terminalIcon=new LabIcon({name:"ui-components:terminal",svgstr:terminal_namespaceObject}),textEditorIcon=new LabIcon({name:"ui-components:text-editor",svgstr:text_editor_namespaceObject}),tocIcon=new LabIcon({name:"ui-components:toc",svgstr:toc_namespaceObject}),treeViewIcon=new LabIcon({name:"ui-components:tree-view",svgstr:tree_view_namespaceObject}),trustedIcon=new LabIcon({name:"ui-components:trusted",svgstr:trusted_namespaceObject}),undoIcon=new LabIcon({name:"ui-components:undo",svgstr:undo_namespaceObject}),userIcon=new LabIcon({name:"ui-components:user",svgstr:user_namespaceObject}),usersIcon=new LabIcon({name:"ui-components:users",svgstr:users_namespaceObject}),variableIcon=new LabIcon({name:"ui-components:variable",svgstr:variable_namespaceObject}),vegaIcon=new LabIcon({name:"ui-components:vega",svgstr:vega_namespaceObject}),videoIcon=new LabIcon({name:"ui-components:video",svgstr:video_namespaceObject}),viewBreakpointIcon=new LabIcon({name:"ui-components:view-breakpoint",svgstr:view_breakpoint_namespaceObject}),wordIcon=new LabIcon({name:"ui-components:word",svgstr:word_namespaceObject}),yamlIcon=new LabIcon({name:"ui-components:yaml",svgstr:yaml_namespaceObject});var Styling,styling_Private,dialog_Private;!function(e){function t(e,t,i=""){if(e.localName===t&&e.classList.add("jp-mod-styled"),"select"===e.localName){const t=e.hasAttribute("multiple");n(e,t)}const s=e.getElementsByTagName(t);for(let e=0;e<s.length;e++){const r=s[e];if(r.classList.add("jp-mod-styled"),i&&r.classList.add(i),"select"===t){const e=r.hasAttribute("multiple");n(r,e)}}}function n(e,t){const n=document.createElement("div");return n.classList.add("jp-select-wrapper"),e.addEventListener("focus",styling_Private.onFocus),e.addEventListener("blur",styling_Private.onFocus),e.classList.add("jp-mod-styled"),e.parentElement&&e.parentElement.replaceChild(n,e),n.appendChild(e),t?n.classList.add("multiple"):n.appendChild(caretDownEmptyIcon.element({tag:"span",stylesheet:"select",right:"8px",top:"5px",width:"18px"})),n}e.styleNode=function(e,n=""){t(e,"select",n),t(e,"textarea",n),t(e,"input",n),t(e,"button",n)},e.styleNodeByTag=t,e.wrapSelect=n}(Styling||(Styling={})),(styling_Private||(styling_Private={})).onFocus=function(e){const t=e.target.parentElement;t&&("focus"===e.type?t.classList.add("jp-mod-focused"):t.classList.remove("jp-mod-focused"))};class WidgetTracker{constructor(e){this._currentChanged=new signaling_dist_index_es6.Signal(this),this._deferred=null,this._isDisposed=!1,this._widgetAdded=new signaling_dist_index_es6.Signal(this),this._widgetUpdated=new signaling_dist_index_es6.Signal(this);const t=this._focusTracker=new FocusTracker,n=this._pool=new lib.RestorablePool(e);this.namespace=e.namespace,t.currentChanged.connect((e,t)=>{t.newValue!==this.currentWidget&&(n.current=t.newValue)},this),n.added.connect((e,t)=>{this._widgetAdded.emit(t)},this),n.currentChanged.connect((e,i)=>{null===i&&t.currentWidget?n.current=t.currentWidget:(this.onCurrentChanged(i),this._currentChanged.emit(i))},this),n.updated.connect((e,t)=>{this._widgetUpdated.emit(t)},this)}get currentChanged(){return this._currentChanged}get currentWidget(){return this._pool.current||null}get restored(){return this._deferred?Promise.resolve():this._pool.restored}get size(){return this._pool.size}get widgetAdded(){return this._widgetAdded}get widgetUpdated(){return this._widgetUpdated}async add(e){this._focusTracker.add(e),await this._pool.add(e),this._focusTracker.activeWidget||(this._pool.current=e)}get isDisposed(){return this._isDisposed}dispose(){this.isDisposed||(this._isDisposed=!0,this._pool.dispose(),this._focusTracker.dispose(),signaling_dist_index_es6.Signal.clearData(this))}find(e){return this._pool.find(e)}forEach(e){return this._pool.forEach(e)}filter(e){return this._pool.filter(e)}inject(e){return this._pool.inject(e)}has(e){return this._pool.has(e)}async restore(e){const t=this._deferred;return t?(this._deferred=null,this._pool.restore(t)):e?this._pool.restore(e):void console.warn("No options provided to restore the tracker.")}defer(e){this._deferred=e}async save(e){return this._pool.save(e)}onCurrentChanged(e){}}function showDialog(e={}){return new Dialog(e).launch()}function showErrorMessage(e,t,n){const i=Dialog.translator.load("jupyterlab");n=null!=n?n:[Dialog.cancelButton({label:i.__("Close")})],console.warn("Showing error:",t);const s="string"==typeof t?t:t.message,r=e+"----"+s,o=dialog_Private.errorMessagePromiseCache.get(r);if(o)return o;{const t=showDialog({title:e,body:s,buttons:n}).then(()=>{dialog_Private.errorMessagePromiseCache.delete(r)},e=>{throw dialog_Private.errorMessagePromiseCache.delete(r),e});return dialog_Private.errorMessagePromiseCache.set(r,t),t}}class Dialog extends Widget{constructor(e={}){const t=document.createElement("dialog");t.ariaModal="true",super({node:t}),this._hasValidationErrors=!1,this._ready=new dist.PromiseDelegate,this._focusNodeSelector="",this.addClass("jp-Dialog"),this.addClass("jp-ThemedContainer");const n=dialog_Private.handleOptions(e),i=n.renderer;if(this._host=n.host,this._defaultButton=n.defaultButton,this._buttons=n.buttons,this._hasClose=n.hasClose,this._buttonNodes=this._buttons.map(e=>i.createButtonNode(e)),this._checkboxNode=null,this._lastMouseDownInDialog=!1,n.checkbox){const{label:e="",caption:t="",checked:s=!1,className:r=""}=n.checkbox;this._checkboxNode=i.createCheckboxNode({label:e,caption:null!=t?t:e,checked:s,className:r})}const s=this.layout=new PanelLayout,r=new Panel;r.addClass("jp-Dialog-content"),"string"==typeof e.body&&(r.addClass("jp-Dialog-content-small"),t.ariaLabel=[n.title,e.body].join(" ")),s.addWidget(r),this._body=n.body;const o=i.createHeader(n.title,()=>this.reject(),e),a=i.createBody(n.body),l=i.createFooter(this._buttonNodes,this._checkboxNode);r.addWidget(o),r.addWidget(a),r.addWidget(l),this._bodyWidget=a,this._primary=this._buttonNodes[this._defaultButton],this._focusNodeSelector=e.focusNodeSelector,Dialog.tracker.add(this)}get ready(){return this._ready.promise}dispose(){const e=this._promise;e&&(this._promise=null,e.reject(void 0),index_es6.ArrayExt.removeFirstOf(dialog_Private.launchQueue,e.promise)),super.dispose()}launch(){if(this._promise)return this._promise.promise;const e=this._promise=new dist.PromiseDelegate,t=Promise.all(dialog_Private.launchQueue);return dialog_Private.launchQueue.push(this._promise.promise),t.then(()=>this._promise?(Widget.attach(this,this._host),e.promise):Promise.resolve({button:Dialog.cancelButton(),isChecked:null,value:null}))}resolve(e){this._promise&&(void 0===e&&(e=this._defaultButton),this._resolve(this._buttons[e]))}reject(){this._promise&&this._resolve(Dialog.cancelButton())}handleEvent(e){switch(e.type){case"keydown":this._evtKeydown(e);break;case"mousedown":this._evtMouseDown(e);break;case"click":this._evtClick(e);break;case"input":this._evtInput(e);break;case"focus":this._evtFocus(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}}onAfterAttach(e){const t=this.node;t.addEventListener("keydown",this,!0),t.addEventListener("contextmenu",this,!0),t.addEventListener("click",this,!0),document.addEventListener("mousedown",this,!0),document.addEventListener("focus",this,!0),document.addEventListener("input",this,!0),this._first=dialog_Private.findFirstFocusable(this.node),this._original=document.activeElement;const n=()=>{var e;if(this._focusNodeSelector){const e=this.node.querySelector(".jp-Dialog-body"),t=null==e?void 0:e.querySelector(this._focusNodeSelector);t&&(this._primary=t)}null===(e=this._primary)||void 0===e||e.focus(),this._ready.resolve()};this._bodyWidget instanceof ReactWidget&&void 0!==this._bodyWidget.renderPromise?this._bodyWidget.renderPromise.then(()=>{n()}).catch(()=>{console.error("Error while loading Dialog's body")}):n()}onAfterDetach(e){const t=this.node;t.removeEventListener("keydown",this,!0),t.removeEventListener("contextmenu",this,!0),t.removeEventListener("click",this,!0),document.removeEventListener("focus",this,!0),document.removeEventListener("mousedown",this,!0),document.removeEventListener("input",this,!0),this._original.focus()}onCloseRequest(e){this._promise&&this.reject(),super.onCloseRequest(e)}_evtInput(e){this._hasValidationErrors=!!this.node.querySelector(":invalid");for(let e=0;e<this._buttons.length;e++)this._buttons[e].accept&&(this._buttonNodes[e].disabled=this._hasValidationErrors)}_evtClick(e){if(!this.node.getElementsByClassName("jp-Dialog-content")[0].contains(e.target))return e.stopPropagation(),e.preventDefault(),void(this._hasClose&&!this._lastMouseDownInDialog&&this.reject());for(const t of this._buttonNodes)if(t.contains(e.target)){const e=this._buttonNodes.indexOf(t);this.resolve(e)}}_evtKeydown(e){switch(e.keyCode){case 27:e.stopPropagation(),e.preventDefault(),this._hasClose&&this.reject();break;case 37:{const t=document.activeElement;if(t instanceof HTMLButtonElement){let n=this._buttonNodes.indexOf(t)-1;n<0&&(n=this._buttonNodes.length-1);const i=this._buttonNodes[n];e.stopPropagation(),e.preventDefault(),i.focus()}break}case 39:{const t=document.activeElement;if(t instanceof HTMLButtonElement){let n=this._buttonNodes.indexOf(t)+1;n==this._buttons.length&&(n=0);const i=this._buttonNodes[n];e.stopPropagation(),e.preventDefault(),i.focus()}break}case 9:{const t=this._buttonNodes[this._buttons.length-1];document.activeElement!==t||e.shiftKey||(e.stopPropagation(),e.preventDefault(),this._first.focus());break}case 13:{e.stopPropagation(),e.preventDefault();const t=document.activeElement;if(t instanceof HTMLButtonElement){const e=this._buttonNodes.indexOf(t);-1!==e&&this.resolve(e)}else if(!(t instanceof HTMLTextAreaElement)){const e=this._defaultButton;this.resolve(e)}break}}}_evtFocus(e){var t;const n=e.target;this.node.contains(n)||(e.stopPropagation(),null===(t=this._buttonNodes[this._defaultButton])||void 0===t||t.focus())}_evtMouseDown(e){const t=this.node.getElementsByClassName("jp-Dialog-content")[0],n=e.target;this._lastMouseDownInDialog=t.contains(n)}_resolve(e){var t,n,i;if(this._hasValidationErrors&&e.accept)return;const s=this._promise;if(!s)return void this.dispose();this._promise=null,index_es6.ArrayExt.removeFirstOf(dialog_Private.launchQueue,s.promise);const r=this._body;let o=null;e.accept&&r instanceof Widget&&"function"==typeof r.getValue&&(o=r.getValue()),this.dispose(),s.resolve({button:e,isChecked:null!==(i=null===(n=null===(t=this._checkboxNode)||void 0===t?void 0:t.querySelector("input"))||void 0===n?void 0:n.checked)&&void 0!==i?i:null,value:o})}}!function(e){function t(t){t.accept=!1!==t.accept;const n=e.translator.load("jupyterlab"),i=t.accept?n.__("Ok"):n.__("Cancel");return{ariaLabel:t.ariaLabel||t.label||i,label:t.label||i,iconClass:t.iconClass||"",iconLabel:t.iconLabel||"",caption:t.caption||"",className:t.className||"",accept:t.accept,actions:t.actions||[],displayType:t.displayType||"default"}}e.translator=nullTranslator,e.createButton=t,e.cancelButton=function(e={}){return e.accept=!1,t(e)},e.okButton=function(e={}){return e.accept=!0,t(e)},e.warnButton=function(e={}){return e.displayType="warn",t(e)},e.flush=function(){e.tracker.forEach(e=>{e.dispose()})};class n{createHeader(t,n=()=>{},i={}){let s;const r=e=>{0===e.button&&(e.preventDefault(),n())},o=e=>{const{key:t}=e;"Enter"!==t&&" "!==t||n()};if("string"==typeof t){const n=e.translator.load("jupyterlab");s=ReactWidget.create(react.createElement(react.Fragment,null,t,i.hasClose&&react.createElement(Button,{className:"jp-Dialog-close-button",onMouseDown:r,onKeyDown:o,title:n.__("Cancel"),minimal:!0},react.createElement(LabIcon.resolveReact,{icon:closeIcon,tag:"span"}))))}else s=ReactWidget.create(t);return s.addClass("jp-Dialog-header"),Styling.styleNode(s.node),s}createBody(e){const t=e=>{void 0!==e.renderPromise?e.renderPromise.then(()=>{Styling.styleNode(e.node)}).catch(()=>{console.error("Error while loading Dialog's body")}):Styling.styleNode(e.node)};let n;return"string"==typeof e?(n=new Widget({node:document.createElement("span")}),n.node.textContent=e):e instanceof Widget?(n=e,n instanceof ReactWidget?t(n):Styling.styleNode(n.node)):(n=ReactWidget.create(e),MessageLoop.sendMessage(n,Widget.Msg.UpdateRequest),t(n)),n.addClass("jp-Dialog-body"),n}createFooter(e,t){const n=new Widget;n.addClass("jp-Dialog-footer"),t&&(n.node.appendChild(t),n.node.insertAdjacentHTML("beforeend",'<div class="jp-Dialog-spacer"></div>'));const i=document.createElement("div");i.classList.add("jp-Dialog-footerButtons");for(const t of e)i.appendChild(t);return n.node.appendChild(i),Styling.styleNode(n.node),n}createButtonNode(e){const t=document.createElement("button");return t.className=this.createItemClass(e),t.appendChild(this.renderIcon(e)),t.appendChild(this.renderLabel(e)),t}createCheckboxNode(e){const t=document.createElement("label");t.className="jp-Dialog-checkbox",e.className&&t.classList.add(e.className),t.title=e.caption,t.textContent=e.label;const n=document.createElement("input");return n.type="checkbox",n.checked=!!e.checked,t.insertAdjacentElement("afterbegin",n),t}createItemClass(e){let t="jp-Dialog-button";e.accept?t+=" jp-mod-accept":t+=" jp-mod-reject","warn"===e.displayType&&(t+=" jp-mod-warn");const n=e.className;return n&&(t+=` ${n}`),t}renderIcon(e){const t=document.createElement("div");return t.className=this.createIconClass(e),t.appendChild(document.createTextNode(e.iconLabel)),t}createIconClass(e){const t="jp-Dialog-buttonIcon",n=e.iconClass;return n?`${t} ${n}`:t}renderLabel(e){const t=document.createElement("div");return t.className="jp-Dialog-buttonLabel",t.title=e.caption,t.ariaLabel=e.ariaLabel,t.appendChild(document.createTextNode(e.label)),t}}e.Renderer=n,e.defaultRenderer=new n,e.tracker=new WidgetTracker({namespace:"@jupyterlab/apputils:Dialog"})}(Dialog||(Dialog={})),function(e){e.launchQueue=[],e.errorMessagePromiseCache=new Map,e.handleOptions=function(e={}){var t,n,i,s,r,o,a,l,c;const d=null!==(t=e.buttons)&&void 0!==t?t:[Dialog.cancelButton(),Dialog.okButton()];return{title:null!==(n=e.title)&&void 0!==n?n:"",body:null!==(i=e.body)&&void 0!==i?i:"",host:null!==(s=e.host)&&void 0!==s?s:document.body,checkbox:null!==(r=e.checkbox)&&void 0!==r?r:null,buttons:d,defaultButton:null!==(o=e.defaultButton)&&void 0!==o?o:d.length-1,renderer:null!==(a=e.renderer)&&void 0!==a?a:Dialog.defaultRenderer,focusNodeSelector:null!==(l=e.focusNodeSelector)&&void 0!==l?l:"",hasClose:null===(c=e.hasClose)||void 0===c||c}},e.findFirstFocusable=function(e){const t=["input","select","a[href]","textarea","button","[tabindex]"].join(",");return e.querySelectorAll(t)[0]}}(dialog_Private||(dialog_Private={}));const INPUT_DIALOG_CLASS="jp-Input-Dialog",INPUT_BOOLEAN_DIALOG_CLASS="jp-Input-Boolean-Dialog";var InputDialog;!function(e){e.getBoolean=function(e){return showDialog({...e,body:new InputBooleanDialog(e),buttons:[Dialog.cancelButton({label:e.cancelLabel}),Dialog.okButton({label:e.okLabel})],focusNodeSelector:"input"})},e.getNumber=function(e){return showDialog({...e,body:new InputNumberDialog(e),buttons:[Dialog.cancelButton({label:e.cancelLabel}),Dialog.okButton({label:e.okLabel})],focusNodeSelector:"input"})},e.getItem=function(e){return showDialog({...e,body:new InputItemsDialog(e),buttons:[Dialog.cancelButton({label:e.cancelLabel}),Dialog.okButton({label:e.okLabel})],focusNodeSelector:e.editable?"input":"select"})},e.getMultipleItems=function(e){return showDialog({...e,body:new InputMultipleItemsDialog(e),buttons:[Dialog.cancelButton({label:e.cancelLabel}),Dialog.okButton({label:e.okLabel})]})},e.getText=function(e){return showDialog({...e,body:new InputTextDialog(e),buttons:[Dialog.cancelButton({label:e.cancelLabel}),Dialog.okButton({label:e.okLabel})],focusNodeSelector:"input"})},e.getPassword=function(e){return showDialog({...e,body:new InputPasswordDialog(e),buttons:[Dialog.cancelButton({label:e.cancelLabel}),Dialog.okButton({label:e.okLabel})],focusNodeSelector:"input"})}}(InputDialog||(InputDialog={}));class InputDialogBase extends Widget{constructor(e){if(super(),this.addClass(INPUT_DIALOG_CLASS),this._input=document.createElement("input"),this._input.classList.add("jp-mod-styled"),this._input.id="jp-dialog-input-id",void 0!==e.label){const t=document.createElement("label");t.textContent=e.label,t.htmlFor=this._input.id,this.node.appendChild(t)}const t=document.createElement("div");if(t.className="jp-InputDialog-inputWrapper",e.prefix){const n=document.createElement("span");n.className="jp-InputDialog-inputPrefix",n.textContent=e.prefix,n.ariaHidden="true",t.appendChild(n)}if(t.appendChild(this._input),e.suffix){const n=document.createElement("span");n.className="jp-InputDialog-inputSuffix",n.textContent=e.suffix,n.ariaHidden="true",t.appendChild(n)}this.node.appendChild(t)}}class InputBooleanDialog extends InputDialogBase{constructor(e){super(e),this.addClass(INPUT_BOOLEAN_DIALOG_CLASS),this._input.type="checkbox",this._input.checked=!!e.value}getValue(){return this._input.checked}}class InputNumberDialog extends InputDialogBase{constructor(e){super(e),this._input.type="number",this._input.value=e.value?e.value.toString():"0"}getValue(){return this._input.value?Number(this._input.value):Number.NaN}}class InputDialogTextBase extends InputDialogBase{constructor(e){super(e),this._input.value=e.text?e.text:"",e.placeholder&&(this._input.placeholder=e.placeholder),e.pattern&&(this._input.pattern=e.pattern),e.required&&(this._input.required=e.required)}getValue(){return this._input.value}}class InputTextDialog extends InputDialogTextBase{constructor(e){var t;super(e),this._input.type="text",this._initialSelectionRange=Math.min(this._input.value.length,Math.max(0,null!==(t=e.selectionRange)&&void 0!==t?t:this._input.value.length))}onAfterAttach(e){super.onAfterAttach(e),this._initialSelectionRange>0&&this._input.value&&this._input.setSelectionRange(0,this._initialSelectionRange)}}class InputPasswordDialog extends InputDialogTextBase{constructor(e){super(e),this._input.type="password"}onAfterAttach(e){super.onAfterAttach(e),this._input.value&&this._input.select()}}class InputItemsDialog extends InputDialogBase{constructor(e){super(e),this._editable=e.editable||!1;let t,n=e.current||0;if("number"==typeof n&&(t=Math.max(0,Math.min(n,e.items.length-1)),n=""),this._list=document.createElement("select"),e.items.forEach((e,i)=>{const s=document.createElement("option");i===t&&(s.selected=!0,n=e),s.value=e,s.textContent=e,this._list.appendChild(s)}),e.editable){const t=document.createElement("datalist");t.id="input-dialog-items",t.appendChild(this._list),this._input.type="list",this._input.value=n,this._input.setAttribute("list",t.id),e.placeholder&&(this._input.placeholder=e.placeholder),this.node.appendChild(t)}else this._input.parentElement.replaceChild(this._list,this._input)}getValue(){return this._editable?this._input.value:this._list.value}}class InputMultipleItemsDialog extends InputDialogBase{constructor(e){super(e);let t=e.defaults||[];this._list=document.createElement("select"),this._list.setAttribute("multiple",""),e.items.forEach(e=>{const t=document.createElement("option");t.value=e,t.textContent=e,this._list.appendChild(t)}),this._input.remove(),this.node.appendChild(this._list);const n=this._list.options;for(let e=0;e<n.length;e++){const i=n[e];t.includes(i.value)?i.selected=!0:i.selected=!1}}getValue(){let e=[];for(let t of this._list.options)t.selected&&!t.classList.contains("hidden")&&e.push(t.value||t.text);return e}}function bind(e,t){return function(){return e.apply(t,arguments)}}const{toString:utils_toString}=Object.prototype,{getPrototypeOf}=Object,{iterator,toStringTag}=Symbol,kindOf=(cache=Object.create(null),e=>{const t=utils_toString.call(e);return cache[t]||(cache[t]=t.slice(8,-1).toLowerCase())});var cache;const kindOfTest=e=>(e=e.toLowerCase(),t=>kindOf(t)===e),typeOfTest=e=>t=>typeof t===e,{isArray}=Array,isUndefined=typeOfTest("undefined");function isBuffer(e){return null!==e&&!isUndefined(e)&&null!==e.constructor&&!isUndefined(e.constructor)&&isFunction(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const isArrayBuffer=kindOfTest("ArrayBuffer");function isArrayBufferView(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&isArrayBuffer(e.buffer),t}const isString=typeOfTest("string"),isFunction=typeOfTest("function"),isNumber=typeOfTest("number"),isObject=e=>null!==e&&"object"==typeof e,isBoolean=e=>!0===e||!1===e,isPlainObject=e=>{if("object"!==kindOf(e))return!1;const t=getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||toStringTag in e||iterator in e)},isEmptyObject=e=>{if(!isObject(e)||isBuffer(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isDate=kindOfTest("Date"),isFile=kindOfTest("File"),isBlob=kindOfTest("Blob"),isFileList=kindOfTest("FileList"),isStream=e=>isObject(e)&&isFunction(e.pipe),isFormData=e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||isFunction(e.append)&&("formdata"===(t=kindOf(e))||"object"===t&&isFunction(e.toString)&&"[object FormData]"===e.toString()))},isURLSearchParams=kindOfTest("URLSearchParams"),[isReadableStream,isRequest,isResponse,isHeaders]=["ReadableStream","Request","Response","Headers"].map(kindOfTest),trim=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function forEach(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let i,s;if("object"!=typeof e&&(e=[e]),isArray(e))for(i=0,s=e.length;i<s;i++)t.call(null,e[i],i,e);else{if(isBuffer(e))return;const s=n?Object.getOwnPropertyNames(e):Object.keys(e),r=s.length;let o;for(i=0;i<r;i++)o=s[i],t.call(null,e[o],o,e)}}function findKey(e,t){if(isBuffer(e))return null;t=t.toLowerCase();const n=Object.keys(e);let i,s=n.length;for(;s-- >0;)if(i=n[s],t===i.toLowerCase())return i;return null}const _global="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:__webpack_require__.g,isContextDefined=e=>!isUndefined(e)&&e!==_global;function merge(){const{caseless:e,skipUndefined:t}=isContextDefined(this)&&this||{},n={},i=(i,s)=>{const r=e&&findKey(n,s)||s;isPlainObject(n[r])&&isPlainObject(i)?n[r]=merge(n[r],i):isPlainObject(i)?n[r]=merge({},i):isArray(i)?n[r]=i.slice():t&&isUndefined(i)||(n[r]=i)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&forEach(arguments[e],i);return n}const extend=(e,t,n,{allOwnKeys:i}={})=>(forEach(t,(t,i)=>{n&&isFunction(t)?e[i]=bind(t,n):e[i]=t},{allOwnKeys:i}),e),stripBOM=e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits=(e,t,n,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject=(e,t,n,i)=>{let s,r,o;const a={};if(t=t||{},null==e)return t;do{for(s=Object.getOwnPropertyNames(e),r=s.length;r-- >0;)o=s[r],i&&!i(o,e,t)||a[o]||(t[o]=e[o],a[o]=!0);e=!1!==n&&getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},endsWith=(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const i=e.indexOf(t,n);return-1!==i&&i===n},toArray=e=>{if(!e)return null;if(isArray(e))return e;let t=e.length;if(!isNumber(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},isTypedArray=(TypedArray="undefined"!=typeof Uint8Array&&getPrototypeOf(Uint8Array),e=>TypedArray&&e instanceof TypedArray);var TypedArray;const forEachEntry=(e,t)=>{const n=(e&&e[iterator]).call(e);let i;for(;(i=n.next())&&!i.done;){const n=i.value;t.call(e,n[0],n[1])}},matchAll=(e,t)=>{let n;const i=[];for(;null!==(n=e.exec(t));)i.push(n);return i},isHTMLForm=kindOfTest("HTMLFormElement"),toCamelCase=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),utils_hasOwnProperty=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),isRegExp=kindOfTest("RegExp"),reduceDescriptors=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),i={};forEach(n,(n,s)=>{let r;!1!==(r=t(n,s,e))&&(i[s]=r||n)}),Object.defineProperties(e,i)},freezeMethods=e=>{reduceDescriptors(e,(t,n)=>{if(isFunction(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const i=e[n];isFunction(i)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet=(e,t)=>{const n={},i=e=>{e.forEach(e=>{n[e]=!0})};return isArray(e)?i(e):i(String(e).split(t)),n},noop=()=>{},toFiniteNumber=(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t;function isSpecCompliantForm(e){return!!(e&&isFunction(e.append)&&"FormData"===e[toStringTag]&&e[iterator])}const toJSONObject=e=>{const t=new Array(10),n=(e,i)=>{if(isObject(e)){if(t.indexOf(e)>=0)return;if(isBuffer(e))return e;if(!("toJSON"in e)){t[i]=e;const s=isArray(e)?[]:{};return forEach(e,(e,t)=>{const r=n(e,i+1);!isUndefined(r)&&(s[t]=r)}),t[i]=void 0,s}}return e};return n(e,0)},isAsyncFn=kindOfTest("AsyncFunction"),isThenable=e=>e&&(isObject(e)||isFunction(e))&&isFunction(e.then)&&isFunction(e.catch),_setImmediate=(setImmediateSupported="function"==typeof setImmediate,postMessageSupported=isFunction(_global.postMessage),setImmediateSupported?setImmediate:postMessageSupported?(token=`axios@${Math.random()}`,callbacks=[],_global.addEventListener("message",({source:e,data:t})=>{e===_global&&t===token&&callbacks.length&&callbacks.shift()()},!1),e=>{callbacks.push(e),_global.postMessage(token,"*")}):e=>setTimeout(e));var setImmediateSupported,postMessageSupported,token,callbacks;const asap="undefined"!=typeof queueMicrotask?queueMicrotask.bind(_global):"undefined"!=typeof process&&process.nextTick||_setImmediate,isIterable=e=>null!=e&&isFunction(e[iterator]),utils={isArray,isArrayBuffer,isBuffer,isFormData,isArrayBufferView,isString,isNumber,isBoolean,isObject,isPlainObject,isEmptyObject,isReadableStream,isRequest,isResponse,isHeaders,isUndefined,isDate,isFile,isBlob,isRegExp,isFunction,isStream,isURLSearchParams,isTypedArray,isFileList,forEach,merge,extend,trim,stripBOM,inherits,toFlatObject,kindOf,kindOfTest,endsWith,toArray,forEachEntry,matchAll,isHTMLForm,hasOwnProperty:utils_hasOwnProperty,hasOwnProp:utils_hasOwnProperty,reduceDescriptors,freezeMethods,toObjectSet,toCamelCase,noop,toFiniteNumber,findKey,global:_global,isContextDefined,isSpecCompliantForm,toJSONObject,isAsyncFn,isThenable,setImmediate:_setImmediate,asap,isIterable};function AxiosError(e,t,n,i,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),i&&(this.request=i),s&&(this.response=s,this.status=s.status?s.status:null)}utils.inherits(AxiosError,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:utils.toJSONObject(this.config),code:this.code,status:this.status}}});const AxiosError_prototype=AxiosError.prototype,descriptors={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{descriptors[e]={value:e}}),Object.defineProperties(AxiosError,descriptors),Object.defineProperty(AxiosError_prototype,"isAxiosError",{value:!0}),AxiosError.from=(e,t,n,i,s,r)=>{const o=Object.create(AxiosError_prototype);utils.toFlatObject(e,o,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e);const a=e&&e.message?e.message:"Error",l=null==t&&e?e.code:t;return AxiosError.call(o,a,l,n,i,s),e&&null==o.cause&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",r&&Object.assign(o,r),o};const core_AxiosError=AxiosError,helpers_null=null;function isVisitable(e){return utils.isPlainObject(e)||utils.isArray(e)}function removeBrackets(e){return utils.endsWith(e,"[]")?e.slice(0,-2):e}function renderKey(e,t,n){return e?e.concat(t).map(function(e,t){return e=removeBrackets(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}function isFlatArray(e){return utils.isArray(e)&&!e.some(isVisitable)}const predicates=utils.toFlatObject(utils,{},null,function(e){return/^is[A-Z]/.test(e)});function toFormData(e,t,n){if(!utils.isObject(e))throw new TypeError("target must be an object");t=t||new(helpers_null||FormData);const i=(n=utils.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!utils.isUndefined(t[e])})).metaTokens,s=n.visitor||c,r=n.dots,o=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&utils.isSpecCompliantForm(t);if(!utils.isFunction(s))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(utils.isDate(e))return e.toISOString();if(utils.isBoolean(e))return e.toString();if(!a&&utils.isBlob(e))throw new core_AxiosError("Blob is not supported. Use a Buffer instead.");return utils.isArrayBuffer(e)||utils.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,s){let a=e;if(e&&!s&&"object"==typeof e)if(utils.endsWith(n,"{}"))n=i?n:n.slice(0,-2),e=JSON.stringify(e);else if(utils.isArray(e)&&isFlatArray(e)||(utils.isFileList(e)||utils.endsWith(n,"[]"))&&(a=utils.toArray(e)))return n=removeBrackets(n),a.forEach(function(e,i){!utils.isUndefined(e)&&null!==e&&t.append(!0===o?renderKey([n],i,r):null===o?n:n+"[]",l(e))}),!1;return!!isVisitable(e)||(t.append(renderKey(s,n,r),l(e)),!1)}const d=[],u=Object.assign(predicates,{defaultVisitor:c,convertValue:l,isVisitable});if(!utils.isObject(e))throw new TypeError("data must be an object");return function e(n,i){if(!utils.isUndefined(n)){if(-1!==d.indexOf(n))throw Error("Circular reference detected in "+i.join("."));d.push(n),utils.forEach(n,function(n,r){!0===(!(utils.isUndefined(n)||null===n)&&s.call(t,n,utils.isString(r)?r.trim():r,i,u))&&e(n,i?i.concat(r):[r])}),d.pop()}}(e),t}const helpers_toFormData=toFormData;function encode(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function AxiosURLSearchParams(e,t){this._pairs=[],e&&helpers_toFormData(e,this,t)}const AxiosURLSearchParams_prototype=AxiosURLSearchParams.prototype;AxiosURLSearchParams_prototype.append=function(e,t){this._pairs.push([e,t])},AxiosURLSearchParams_prototype.toString=function(e){const t=e?function(t){return e.call(this,t,encode)}:encode;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};const helpers_AxiosURLSearchParams=AxiosURLSearchParams;function buildURL_encode(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function buildURL(e,t,n){if(!t)return e;const i=n&&n.encode||buildURL_encode;utils.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let r;if(r=s?s(t,n):utils.isURLSearchParams(t)?t.toString():new helpers_AxiosURLSearchParams(t,n).toString(i),r){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e}class InterceptorManager{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){utils.forEach(this.handlers,function(t){null!==t&&e(t)})}}const core_InterceptorManager=InterceptorManager,defaults_transitional={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},classes_URLSearchParams="undefined"!=typeof URLSearchParams?URLSearchParams:helpers_AxiosURLSearchParams,classes_FormData="undefined"!=typeof FormData?FormData:null,classes_Blob="undefined"!=typeof Blob?Blob:null,browser={isBrowser:!0,classes:{URLSearchParams:classes_URLSearchParams,FormData:classes_FormData,Blob:classes_Blob},protocols:["http","https","file","blob","url","data"]},hasBrowserEnv="undefined"!=typeof window&&"undefined"!=typeof document,_navigator="object"==typeof navigator&&navigator||void 0,hasStandardBrowserEnv=hasBrowserEnv&&(!_navigator||["ReactNative","NativeScript","NS"].indexOf(_navigator.product)<0),hasStandardBrowserWebWorkerEnv="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,origin=hasBrowserEnv&&window.location.href||"http://localhost",platform={...common_utils_namespaceObject,...browser};function toURLEncodedForm(e,t){return helpers_toFormData(e,new platform.classes.URLSearchParams,{visitor:function(e,t,n,i){return platform.isNode&&utils.isBuffer(e)?(this.append(t,e.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function parsePropPath(e){return utils.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}function arrayToObject(e){const t={},n=Object.keys(e);let i;const s=n.length;let r;for(i=0;i<s;i++)r=n[i],t[r]=e[r];return t}function formDataToJSON(e){function t(e,n,i,s){let r=e[s++];if("__proto__"===r)return!0;const o=Number.isFinite(+r),a=s>=e.length;return r=!r&&utils.isArray(i)?i.length:r,a?(utils.hasOwnProp(i,r)?i[r]=[i[r],n]:i[r]=n,!o):(i[r]&&utils.isObject(i[r])||(i[r]=[]),t(e,n,i[r],s)&&utils.isArray(i[r])&&(i[r]=arrayToObject(i[r])),!o)}if(utils.isFormData(e)&&utils.isFunction(e.entries)){const n={};return utils.forEachEntry(e,(e,i)=>{t(parsePropPath(e),i,n,0)}),n}return null}const helpers_formDataToJSON=formDataToJSON;function stringifySafely(e,t,n){if(utils.isString(e))try{return(t||JSON.parse)(e),utils.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}const defaults={transitional:defaults_transitional,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",i=n.indexOf("application/json")>-1,s=utils.isObject(e);if(s&&utils.isHTMLForm(e)&&(e=new FormData(e)),utils.isFormData(e))return i?JSON.stringify(helpers_formDataToJSON(e)):e;if(utils.isArrayBuffer(e)||utils.isBuffer(e)||utils.isStream(e)||utils.isFile(e)||utils.isBlob(e)||utils.isReadableStream(e))return e;if(utils.isArrayBufferView(e))return e.buffer;if(utils.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let r;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return toURLEncodedForm(e,this.formSerializer).toString();if((r=utils.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return helpers_toFormData(r?{"files[]":e}:e,t&&new t,this.formSerializer)}}return s||i?(t.setContentType("application/json",!1),stringifySafely(e)):e}],transformResponse:[function(e){const t=this.transitional||defaults.transitional,n=t&&t.forcedJSONParsing,i="json"===this.responseType;if(utils.isResponse(e)||utils.isReadableStream(e))return e;if(e&&utils.isString(e)&&(n&&!this.responseType||i)){const n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n){if("SyntaxError"===e.name)throw core_AxiosError.from(e,core_AxiosError.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform.classes.FormData,Blob:platform.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};utils.forEach(["delete","get","head","post","put","patch"],e=>{defaults.headers[e]={}});const lib_defaults=defaults,ignoreDuplicateOf=utils.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),parseHeaders=e=>{const t={};let n,i,s;return e&&e.split("\n").forEach(function(e){s=e.indexOf(":"),n=e.substring(0,s).trim().toLowerCase(),i=e.substring(s+1).trim(),!n||t[n]&&ignoreDuplicateOf[n]||("set-cookie"===n?t[n]?t[n].push(i):t[n]=[i]:t[n]=t[n]?t[n]+", "+i:i)}),t},$internals=Symbol("internals");function normalizeHeader(e){return e&&String(e).trim().toLowerCase()}function normalizeValue(e){return!1===e||null==e?e:utils.isArray(e)?e.map(normalizeValue):String(e)}function parseTokens(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(e);)t[i[1]]=i[2];return t}const isValidHeaderName=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function matchHeaderValue(e,t,n,i,s){return utils.isFunction(i)?i.call(this,t,n):(s&&(t=n),utils.isString(t)?utils.isString(i)?-1!==t.indexOf(i):utils.isRegExp(i)?i.test(t):void 0:void 0)}function formatHeader(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function buildAccessors(e,t){const n=utils.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(e,i+n,{value:function(e,n,s){return this[i].call(this,t,e,n,s)},configurable:!0})})}class AxiosHeaders{constructor(e){e&&this.set(e)}set(e,t,n){const i=this;function s(e,t,n){const s=normalizeHeader(t);if(!s)throw new Error("header name must be a non-empty string");const r=utils.findKey(i,s);(!r||void 0===i[r]||!0===n||void 0===n&&!1!==i[r])&&(i[r||t]=normalizeValue(e))}const r=(e,t)=>utils.forEach(e,(e,n)=>s(e,n,t));if(utils.isPlainObject(e)||e instanceof this.constructor)r(e,t);else if(utils.isString(e)&&(e=e.trim())&&!isValidHeaderName(e))r(parseHeaders(e),t);else if(utils.isObject(e)&&utils.isIterable(e)){let n,i,s={};for(const t of e){if(!utils.isArray(t))throw TypeError("Object iterator must return a key-value pair");s[i=t[0]]=(n=s[i])?utils.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}r(s,t)}else null!=e&&s(t,e,n);return this}get(e,t){if(e=normalizeHeader(e)){const n=utils.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return parseTokens(e);if(utils.isFunction(t))return t.call(this,e,n);if(utils.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=normalizeHeader(e)){const n=utils.findKey(this,e);return!(!n||void 0===this[n]||t&&!matchHeaderValue(this,this[n],n,t))}return!1}delete(e,t){const n=this;let i=!1;function s(e){if(e=normalizeHeader(e)){const s=utils.findKey(n,e);!s||t&&!matchHeaderValue(n,n[s],s,t)||(delete n[s],i=!0)}}return utils.isArray(e)?e.forEach(s):s(e),i}clear(e){const t=Object.keys(this);let n=t.length,i=!1;for(;n--;){const s=t[n];e&&!matchHeaderValue(this,this[s],s,e,!0)||(delete this[s],i=!0)}return i}normalize(e){const t=this,n={};return utils.forEach(this,(i,s)=>{const r=utils.findKey(n,s);if(r)return t[r]=normalizeValue(i),void delete t[s];const o=e?formatHeader(s):String(s).trim();o!==s&&delete t[s],t[o]=normalizeValue(i),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return utils.forEach(this,(n,i)=>{null!=n&&!1!==n&&(t[i]=e&&utils.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[$internals]=this[$internals]={accessors:{}}).accessors,n=this.prototype;function i(e){const i=normalizeHeader(e);t[i]||(buildAccessors(n,e),t[i]=!0)}return utils.isArray(e)?e.forEach(i):i(e),this}}AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),utils.reduceDescriptors(AxiosHeaders.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),utils.freezeMethods(AxiosHeaders);const core_AxiosHeaders=AxiosHeaders;function transformData(e,t){const n=this||lib_defaults,i=t||n,s=core_AxiosHeaders.from(i.headers);let r=i.data;return utils.forEach(e,function(e){r=e.call(n,r,s.normalize(),t?t.status:void 0)}),s.normalize(),r}function isCancel(e){return!(!e||!e.__CANCEL__)}function CanceledError(e,t,n){core_AxiosError.call(this,null==e?"canceled":e,core_AxiosError.ERR_CANCELED,t,n),this.name="CanceledError"}utils.inherits(CanceledError,core_AxiosError,{__CANCEL__:!0});const cancel_CanceledError=CanceledError;function settle(e,t,n){const i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(new core_AxiosError("Request failed with status code "+n.status,[core_AxiosError.ERR_BAD_REQUEST,core_AxiosError.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}function parseProtocol(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function speedometer(e,t){e=e||10;const n=new Array(e),i=new Array(e);let s,r=0,o=0;return t=void 0!==t?t:1e3,function(a){const l=Date.now(),c=i[o];s||(s=l),n[r]=a,i[r]=l;let d=o,u=0;for(;d!==r;)u+=n[d++],d%=e;if(r=(r+1)%e,r===o&&(o=(o+1)%e),l-s<t)return;const h=c&&l-c;return h?Math.round(1e3*u/h):void 0}}const helpers_speedometer=speedometer;function throttle(e,t){let n,i,s=0,r=1e3/t;const o=(t,r=Date.now())=>{s=r,n=null,i&&(clearTimeout(i),i=null),e(...t)};return[(...e)=>{const t=Date.now(),a=t-s;a>=r?o(e,t):(n=e,i||(i=setTimeout(()=>{i=null,o(n)},r-a)))},()=>n&&o(n)]}const helpers_throttle=throttle,progressEventReducer=(e,t,n=3)=>{let i=0;const s=helpers_speedometer(50,250);return helpers_throttle(n=>{const r=n.loaded,o=n.lengthComputable?n.total:void 0,a=r-i,l=s(a);i=r,e({loaded:r,total:o,progress:o?r/o:void 0,bytes:a,rate:l||void 0,estimated:l&&o&&r<=o?(o-r)/l:void 0,event:n,lengthComputable:null!=o,[t?"download":"upload"]:!0})},n)},progressEventDecorator=(e,t)=>{const n=null!=e;return[i=>t[0]({lengthComputable:n,total:e,loaded:i}),t[1]]},asyncDecorator=e=>(...t)=>utils.asap(()=>e(...t)),isURLSameOrigin=platform.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,platform.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(platform.origin),platform.navigator&&/(msie|trident)/i.test(platform.navigator.userAgent)):()=>!0,cookies=platform.hasStandardBrowserEnv?{write(e,t,n,i,s,r,o){if("undefined"==typeof document)return;const a=[`${e}=${encodeURIComponent(t)}`];utils.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),utils.isString(i)&&a.push(`path=${i}`),utils.isString(s)&&a.push(`domain=${s}`),!0===r&&a.push("secure"),utils.isString(o)&&a.push(`SameSite=${o}`),document.cookie=a.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function isAbsoluteURL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function combineURLs(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function buildFullPath(e,t,n){let i=!isAbsoluteURL(t);return e&&(i||0==n)?combineURLs(e,t):t}const headersToObject=e=>e instanceof core_AxiosHeaders?{...e}:e;function mergeConfig(e,t){t=t||{};const n={};function i(e,t,n,i){return utils.isPlainObject(e)&&utils.isPlainObject(t)?utils.merge.call({caseless:i},e,t):utils.isPlainObject(t)?utils.merge({},t):utils.isArray(t)?t.slice():t}function s(e,t,n,s){return utils.isUndefined(t)?utils.isUndefined(e)?void 0:i(void 0,e,0,s):i(e,t,0,s)}function r(e,t){if(!utils.isUndefined(t))return i(void 0,t)}function o(e,t){return utils.isUndefined(t)?utils.isUndefined(e)?void 0:i(void 0,e):i(void 0,t)}function a(n,s,r){return r in t?i(n,s):r in e?i(void 0,n):void 0}const l={url:r,method:r,data:r,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(e,t,n)=>s(headersToObject(e),headersToObject(t),0,!0)};return utils.forEach(Object.keys({...e,...t}),function(i){const r=l[i]||s,o=r(e[i],t[i],i);utils.isUndefined(o)&&r!==a||(n[i]=o)}),n}const resolveConfig=e=>{const t=mergeConfig({},e);let{data:n,withXSRFToken:i,xsrfHeaderName:s,xsrfCookieName:r,headers:o,auth:a}=t;if(t.headers=o=core_AxiosHeaders.from(o),t.url=buildURL(buildFullPath(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),utils.isFormData(n))if(platform.hasStandardBrowserEnv||platform.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(utils.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&o.set(e,n)})}if(platform.hasStandardBrowserEnv&&(i&&utils.isFunction(i)&&(i=i(t)),i||!1!==i&&isURLSameOrigin(t.url))){const e=s&&r&&cookies.read(r);e&&o.set(s,e)}return t},isXHRAdapterSupported="undefined"!=typeof XMLHttpRequest,xhr=isXHRAdapterSupported&&function(e){return new Promise(function(t,n){const i=resolveConfig(e);let s=i.data;const r=core_AxiosHeaders.from(i.headers).normalize();let o,a,l,c,d,{responseType:u,onUploadProgress:h,onDownloadProgress:p}=i;function m(){c&&c(),d&&d(),i.cancelToken&&i.cancelToken.unsubscribe(o),i.signal&&i.signal.removeEventListener("abort",o)}let f=new XMLHttpRequest;function g(){if(!f)return;const i=core_AxiosHeaders.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders());settle(function(e){t(e),m()},function(e){n(e),m()},{data:u&&"text"!==u&&"json"!==u?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:i,config:e,request:f}),f=null}f.open(i.method.toUpperCase(),i.url,!0),f.timeout=i.timeout,"onloadend"in f?f.onloadend=g:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(g)},f.onabort=function(){f&&(n(new core_AxiosError("Request aborted",core_AxiosError.ECONNABORTED,e,f)),f=null)},f.onerror=function(t){const i=t&&t.message?t.message:"Network Error",s=new core_AxiosError(i,core_AxiosError.ERR_NETWORK,e,f);s.event=t||null,n(s),f=null},f.ontimeout=function(){let t=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const s=i.transitional||defaults_transitional;i.timeoutErrorMessage&&(t=i.timeoutErrorMessage),n(new core_AxiosError(t,s.clarifyTimeoutError?core_AxiosError.ETIMEDOUT:core_AxiosError.ECONNABORTED,e,f)),f=null},void 0===s&&r.setContentType(null),"setRequestHeader"in f&&utils.forEach(r.toJSON(),function(e,t){f.setRequestHeader(t,e)}),utils.isUndefined(i.withCredentials)||(f.withCredentials=!!i.withCredentials),u&&"json"!==u&&(f.responseType=i.responseType),p&&([l,d]=progressEventReducer(p,!0),f.addEventListener("progress",l)),h&&f.upload&&([a,c]=progressEventReducer(h),f.upload.addEventListener("progress",a),f.upload.addEventListener("loadend",c)),(i.cancelToken||i.signal)&&(o=t=>{f&&(n(!t||t.type?new cancel_CanceledError(null,e,f):t),f.abort(),f=null)},i.cancelToken&&i.cancelToken.subscribe(o),i.signal&&(i.signal.aborted?o():i.signal.addEventListener("abort",o)));const v=parseProtocol(i.url);v&&-1===platform.protocols.indexOf(v)?n(new core_AxiosError("Unsupported protocol "+v+":",core_AxiosError.ERR_BAD_REQUEST,e)):f.send(s||null)})},composeSignals=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,i=new AbortController;const s=function(e){if(!n){n=!0,o();const t=e instanceof Error?e:this.reason;i.abort(t instanceof core_AxiosError?t:new cancel_CanceledError(t instanceof Error?t.message:t))}};let r=t&&setTimeout(()=>{r=null,s(new core_AxiosError(`timeout ${t} of ms exceeded`,core_AxiosError.ETIMEDOUT))},t);const o=()=>{e&&(r&&clearTimeout(r),r=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(s):e.removeEventListener("abort",s)}),e=null)};e.forEach(e=>e.addEventListener("abort",s));const{signal:a}=i;return a.unsubscribe=()=>utils.asap(o),a}},helpers_composeSignals=composeSignals,streamChunk=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let i,s=0;for(;s<n;)i=s+t,yield e.slice(s,i),s=i},readBytes=async function*(e,t){for await(const n of readStream(e))yield*streamChunk(n,t)},readStream=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},trackStream=(e,t,n,i)=>{const s=readBytes(e,t);let r,o=0,a=e=>{r||(r=!0,i&&i(e))};return new ReadableStream({async pull(e){try{const{done:t,value:i}=await s.next();if(t)return a(),void e.close();let r=i.byteLength;if(n){let e=o+=r;n(e)}e.enqueue(new Uint8Array(i))}catch(e){throw a(e),e}},cancel:e=>(a(e),s.return())},{highWaterMark:2})},DEFAULT_CHUNK_SIZE=65536,{isFunction:fetch_isFunction}=utils,globalFetchAPI=(({Request:e,Response:t})=>({Request:e,Response:t}))(utils.global),{ReadableStream:fetch_ReadableStream,TextEncoder:extension_TextEncoder}=utils.global,test=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},factory=e=>{e=utils.merge.call({skipUndefined:!0},globalFetchAPI,e);const{fetch:t,Request:n,Response:i}=e,s=t?fetch_isFunction(t):"function"==typeof fetch,r=fetch_isFunction(n),o=fetch_isFunction(i);if(!s)return!1;const a=s&&fetch_isFunction(fetch_ReadableStream),l=s&&("function"==typeof extension_TextEncoder?(c=new extension_TextEncoder,e=>c.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer()));var c;const d=r&&a&&test(()=>{let e=!1;const t=new n(platform.origin,{body:new fetch_ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),u=o&&a&&test(()=>utils.isReadableStream(new i("").body)),h={stream:u&&(e=>e.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!h[e]&&(h[e]=(t,n)=>{let i=t&&t[e];if(i)return i.call(t);throw new core_AxiosError(`Response type '${e}' is not supported`,core_AxiosError.ERR_NOT_SUPPORT,n)})});return async e=>{let{url:s,method:o,data:a,signal:c,cancelToken:p,timeout:m,onDownloadProgress:f,onUploadProgress:g,responseType:v,headers:_,withCredentials:b="same-origin",fetchOptions:y}=resolveConfig(e),w=t||fetch;v=v?(v+"").toLowerCase():"text";let x=helpers_composeSignals([c,p&&p.toAbortSignal()],m),S=null;const C=x&&x.unsubscribe&&(()=>{x.unsubscribe()});let k;try{if(g&&d&&"get"!==o&&"head"!==o&&0!==(k=await(async(e,t)=>{const i=utils.toFiniteNumber(e.getContentLength());return null==i?(async e=>{if(null==e)return 0;if(utils.isBlob(e))return e.size;if(utils.isSpecCompliantForm(e)){const t=new n(platform.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return utils.isArrayBufferView(e)||utils.isArrayBuffer(e)?e.byteLength:(utils.isURLSearchParams(e)&&(e+=""),utils.isString(e)?(await l(e)).byteLength:void 0)})(t):i})(_,a))){let e,t=new n(s,{method:"POST",body:a,duplex:"half"});if(utils.isFormData(a)&&(e=t.headers.get("content-type"))&&_.setContentType(e),t.body){const[e,n]=progressEventDecorator(k,progressEventReducer(asyncDecorator(g)));a=trackStream(t.body,DEFAULT_CHUNK_SIZE,e,n)}}utils.isString(b)||(b=b?"include":"omit");const t=r&&"credentials"in n.prototype,c={...y,signal:x,method:o.toUpperCase(),headers:_.normalize().toJSON(),body:a,duplex:"half",credentials:t?b:void 0};S=r&&new n(s,c);let p=await(r?w(S,y):w(s,c));const m=u&&("stream"===v||"response"===v);if(u&&(f||m&&C)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=p[t]});const t=utils.toFiniteNumber(p.headers.get("content-length")),[n,s]=f&&progressEventDecorator(t,progressEventReducer(asyncDecorator(f),!0))||[];p=new i(trackStream(p.body,DEFAULT_CHUNK_SIZE,n,()=>{s&&s(),C&&C()}),e)}v=v||"text";let E=await h[utils.findKey(h,v)||"text"](p,e);return!m&&C&&C(),await new Promise((t,n)=>{settle(t,n,{data:E,headers:core_AxiosHeaders.from(p.headers),status:p.status,statusText:p.statusText,config:e,request:S})})}catch(t){if(C&&C(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new core_AxiosError("Network Error",core_AxiosError.ERR_NETWORK,e,S),{cause:t.cause||t});throw core_AxiosError.from(t,t&&t.code,e,S)}}},seedCache=new Map,getFetch=e=>{let t=e&&e.env||{};const{fetch:n,Request:i,Response:s}=t,r=[i,s,n];let o,a,l=r.length,c=seedCache;for(;l--;)o=r[l],a=c.get(o),void 0===a&&c.set(o,a=l?new Map:factory(t)),c=a;return a},adapter=getFetch(),adapters_fetch=null,knownAdapters={http:helpers_null,xhr,fetch:{get:getFetch}};utils.forEach(knownAdapters,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const renderReason=e=>`- ${e}`,isResolvedHandle=e=>utils.isFunction(e)||null===e||!1===e;function getAdapter(e,t){e=utils.isArray(e)?e:[e];const{length:n}=e;let i,s;const r={};for(let o=0;o<n;o++){let n;if(i=e[o],s=i,!isResolvedHandle(i)&&(s=knownAdapters[(n=String(i)).toLowerCase()],void 0===s))throw new core_AxiosError(`Unknown adapter '${n}'`);if(s&&(utils.isFunction(s)||(s=s.get(t))))break;r[n||"#"+o]=s}if(!s){const e=Object.entries(r).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=n?e.length>1?"since :\n"+e.map(renderReason).join("\n"):" "+renderReason(e[0]):"as no adapter specified";throw new core_AxiosError("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return s}const adapters={getAdapter,adapters:knownAdapters};function throwIfCancellationRequested(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new cancel_CanceledError(null,e)}function dispatchRequest(e){return throwIfCancellationRequested(e),e.headers=core_AxiosHeaders.from(e.headers),e.data=transformData.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),adapters.getAdapter(e.adapter||lib_defaults.adapter,e)(e).then(function(t){return throwIfCancellationRequested(e),t.data=transformData.call(e,e.transformResponse,t),t.headers=core_AxiosHeaders.from(t.headers),t},function(t){return isCancel(t)||(throwIfCancellationRequested(e),t&&t.response&&(t.response.data=transformData.call(e,e.transformResponse,t.response),t.response.headers=core_AxiosHeaders.from(t.response.headers))),Promise.reject(t)})}const VERSION="1.13.2",validators={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{validators[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const deprecatedWarnings={};function assertOptions(e,t,n){if("object"!=typeof e)throw new core_AxiosError("options must be an object",core_AxiosError.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let s=i.length;for(;s-- >0;){const r=i[s],o=t[r];if(o){const t=e[r],n=void 0===t||o(t,r,e);if(!0!==n)throw new core_AxiosError("option "+r+" must be "+n,core_AxiosError.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new core_AxiosError("Unknown option "+r,core_AxiosError.ERR_BAD_OPTION)}}validators.transitional=function(e,t,n){function i(e,t){return"[Axios v"+VERSION+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,s,r)=>{if(!1===e)throw new core_AxiosError(i(s," has been removed"+(t?" in "+t:"")),core_AxiosError.ERR_DEPRECATED);return t&&!deprecatedWarnings[s]&&(deprecatedWarnings[s]=!0,console.warn(i(s," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,s,r)}},validators.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const validator={assertOptions,validators},Axios_validators=validator.validators;class Axios{constructor(e){this.defaults=e||{},this.interceptors={request:new core_InterceptorManager,response:new core_InterceptorManager}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=mergeConfig(this.defaults,t);const{transitional:n,paramsSerializer:i,headers:s}=t;void 0!==n&&validator.assertOptions(n,{silentJSONParsing:Axios_validators.transitional(Axios_validators.boolean),forcedJSONParsing:Axios_validators.transitional(Axios_validators.boolean),clarifyTimeoutError:Axios_validators.transitional(Axios_validators.boolean)},!1),null!=i&&(utils.isFunction(i)?t.paramsSerializer={serialize:i}:validator.assertOptions(i,{encode:Axios_validators.function,serialize:Axios_validators.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),validator.assertOptions(t,{baseUrl:Axios_validators.spelling("baseURL"),withXsrfToken:Axios_validators.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let r=s&&utils.merge(s.common,s[t.method]);s&&utils.forEach(["delete","get","head","post","put","patch","common"],e=>{delete s[e]}),t.headers=core_AxiosHeaders.concat(r,s);const o=[];let a=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,o.unshift(e.fulfilled,e.rejected))});const l=[];let c;this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let d,u=0;if(!a){const e=[dispatchRequest.bind(this),void 0];for(e.unshift(...o),e.push(...l),d=e.length,c=Promise.resolve(t);u<d;)c=c.then(e[u++],e[u++]);return c}d=o.length;let h=t;for(;u<d;){const e=o[u++],t=o[u++];try{h=e(h)}catch(e){t.call(this,e);break}}try{c=dispatchRequest.call(this,h)}catch(e){return Promise.reject(e)}for(u=0,d=l.length;u<d;)c=c.then(l[u++],l[u++]);return c}getUri(e){return buildURL(buildFullPath((e=mergeConfig(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}utils.forEach(["delete","get","head","options"],function(e){Axios.prototype[e]=function(t,n){return this.request(mergeConfig(n||{},{method:e,url:t,data:(n||{}).data}))}}),utils.forEach(["post","put","patch"],function(e){function t(t){return function(n,i,s){return this.request(mergeConfig(s||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}Axios.prototype[e]=t(),Axios.prototype[e+"Form"]=t(!0)});const core_Axios=Axios;class CancelToken{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const i=new Promise(e=>{n.subscribe(e),t=e}).then(e);return i.cancel=function(){n.unsubscribe(t)},i},e(function(e,i,s){n.reason||(n.reason=new cancel_CanceledError(e,i,s),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new CancelToken(function(t){e=t}),cancel:e}}}const cancel_CancelToken=CancelToken;function spread(e){return function(t){return e.apply(null,t)}}function isAxiosError(e){return utils.isObject(e)&&!0===e.isAxiosError}const HttpStatusCode={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(HttpStatusCode).forEach(([e,t])=>{HttpStatusCode[t]=e});const helpers_HttpStatusCode=HttpStatusCode;function createInstance(e){const t=new core_Axios(e),n=bind(core_Axios.prototype.request,t);return utils.extend(n,core_Axios.prototype,t,{allOwnKeys:!0}),utils.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return createInstance(mergeConfig(e,t))},n}const axios=createInstance(lib_defaults);axios.Axios=core_Axios,axios.CanceledError=cancel_CanceledError,axios.CancelToken=cancel_CancelToken,axios.isCancel=isCancel,axios.VERSION=VERSION,axios.toFormData=helpers_toFormData,axios.AxiosError=core_AxiosError,axios.Cancel=axios.CanceledError,axios.all=function(e){return Promise.all(e)},axios.spread=spread,axios.isAxiosError=isAxiosError,axios.mergeConfig=mergeConfig,axios.AxiosHeaders=core_AxiosHeaders,axios.formToJSON=e=>helpers_formDataToJSON(utils.isHTMLForm(e)?new FormData(e):e),axios.getAdapter=adapters.getAdapter,axios.HttpStatusCode=helpers_HttpStatusCode,axios.default=axios;const lib_axios=axios,template_namespaceObject=JSON.parse('{"metadata":{"kernelspec":{"name":"python","display_name":"Python (Pyodide)","language":"python"},"language_info":{"codemirror_mode":{"name":"python","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.8"},"jupyter-lite":{"jupyter-config-data":{},"jupyter-lite-schema-version":0}},"nbformat_minor":5,"nbformat":4,"cells":[{"id":"dea14a34-4803-44da-ae14-88b2c87a6f12","cell_type":"markdown","source":"# Welcome to JupyterLite on Galaxy\\n\\nThis notebook runs entirely in your browser using WebAssembly-powered Python (via Pyodide), seamlessly integrated with your Galaxy history.\\n\\nYou can `import gxy` and:\\n\\n- Open and edit notebooks linked to Galaxy datasets\\n- Download data using e.g. `filename = await gxy.get(1)`\\n- Upload results using e.g. `await gxy.put(filename)`\\n- Make API requests using e.g. `await gxy.api(\\"/api/version\\")`\\n\\nNo setup, no dependencies — just Python in the browser with full access to your Galaxy environment.","metadata":{}}]}'),EXTENSION="ipynb";function getPayload(e,t,n){return{auto_decompress:!0,files:[],history_id:t,targets:[{destination:{type:"hdas"},elements:[{dbkey:"?",ext:EXTENSION,name:`${e}`,paste_content:n,src:"pasted"}]}]}}function getTimestamp(){const e=new Date,t=e=>e.toString().padStart(2,"0");return"jl-"+e.getFullYear().toString()+t(e.getMonth()+1)+t(e.getDate())+"-"+t(e.getHours())+t(e.getMinutes())+t(e.getSeconds())}const extension_plugin={id:"jl-galaxy:plugin",autoStart:!0,activate:async e=>{console.log("Activating jl-galaxy...",e),e.restored.then(async()=>{const t=new URLSearchParams(window.location.search),n=t.get("dataset_id"),i=t.get("history_id"),s=getTimestamp(),r=t.get("root")||"/";let o=null;if(n){const e=`${r}api/datasets/${n}/display`;console.log("📥 Loading notebook from:",e);try{const t=await fetch(e);if(!t.ok)throw new Error(`Failed to fetch notebook: ${t.statusText}`);o=await t.json()}catch(e){console.error("❌ Could not load dataset details:",e)}}else o=template_namespaceObject,console.log("✅ Dataset identifer not available, loading default notebook");await e.commands.execute("filebrowser:hide-main");try{await e.serviceManager.contents.save(s,{type:"notebook",format:"json",content:o}),await e.commands.execute("docmanager:open",{path:s,factory:"Notebook"}),console.log("✅ Notebook opened:",s)}catch(e){console.error("❌ Could not load dataset notebook:",e)}try{e.commands.commandExecuted.connect(async(t,n)=>{"docmanager:open"===n.id?n.result.then(async e=>{var t,n;const i=null===(t=null==e?void 0:e.content)||void 0===t?void 0:t.model,s=null==e?void 0:e.context;if(s&&(null==i?void 0:i.toJSON)&&(null===(n=s.path)||void 0===n?void 0:n.startsWith("Untitled"))){const e=getTimestamp();await s.rename(e),console.log(`✅ Renamed new notebook to: ${e}`)}}):"docmanager:save"===n.id&&n.result.then(async()=>{var t;const n=e.shell.currentWidget,s=null===(t=null==n?void 0:n.content)||void 0===t?void 0:t.model,o=null==n?void 0:n.context;if(o&&(null==s?void 0:s.toJSON)){let e=(o.path||"").split("/").pop()||getTimestamp();const t=await InputDialog.getText({title:"💾 Save to Galaxy?",label:"Provide a name to save to source history:",text:e});if(t.button.accept&&t.value){e=t.value;const n=JSON.stringify(s.toJSON(),null,2);if(i){const t=getPayload(e,i,n);lib_axios.post(`${r}api/tools/fetch`,t).then(()=>{console.log(`✅ Notebook "${e}" saved to history`)}).catch(t=>{console.error(`❌ Could not save "${e}" to history:`,t)})}else console.error("❌ Could not load history identifier.")}else console.log("🚫 Export to Galaxy canceled by user")}})})}catch(e){console.error("❌ Failed to attach commands")}})}},extension=[extension_plugin];export{extension as default};
|
|
2
|
+
var __webpack_modules__={121:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Text=void 0,function(e){e.jsIndexToCharIndex=function(e,t){return e},e.charIndexToJsIndex=function(e,t){return e},e.camelCase=function(e,t=!1){return e.replace(/^(\w)|[\s-_:]+(\w)/g,function(e,n,i){return i?i.toUpperCase():t?n.toUpperCase():n.toLowerCase()})},e.titleCase=function(e){return(e||"").toLowerCase().split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}}(n||(t.Text=n={}))},139:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ServiceManager=void 0;const i=n(6903),s=n(4816),r=n(7375),o=n(1091),a=n(4272),l=n(6807),c=n(3892),d=n(1089),u=n(6923),h=n(5399),p=n(7569),m=n(8430),f=n(362);t.ServiceManager=class{constructor(e={}){var t,n;this._isDisposed=!1,this._connectionFailure=new i.Signal(this),this._isReady=!1;const g=e.defaultDrive,v=null!==(t=e.serverSettings)&&void 0!==t?t:d.ServerConnection.makeSettings(),_={defaultDrive:g,serverSettings:v,standby:null!==(n=e.standby)&&void 0!==n?n:"when-hidden"};this.serverSettings=v,this.contents=e.contents||new r.ContentsManager(_),this.events=e.events||new o.EventManager(_),this.kernels=e.kernels||new a.KernelManager(_),this.sessions=e.sessions||new u.SessionManager({..._,kernelManager:this.kernels}),this.settings=e.settings||new h.SettingManager(_),this.terminals=e.terminals||new p.TerminalManager(_),this.builder=e.builder||new s.BuildManager(_),this.workspaces=e.workspaces||new f.WorkspaceManager(_),this.nbconvert=e.nbconvert||new c.NbConvertManager(_),this.kernelspecs=e.kernelspecs||new l.KernelSpecManager(_),this.user=e.user||new m.UserManager(_),this.kernelspecs.connectionFailure.connect(this._onConnectionFailure,this),this.sessions.connectionFailure.connect(this._onConnectionFailure,this),this.terminals.connectionFailure.connect(this._onConnectionFailure,this);const b=[this.sessions.ready,this.kernelspecs.ready];this.terminals.isAvailable()&&b.push(this.terminals.ready),this._readyPromise=Promise.all(b).then(()=>{this._isReady=!0})}get connectionFailure(){return this._connectionFailure}get isDisposed(){return this._isDisposed}dispose(){this.isDisposed||(this._isDisposed=!0,i.Signal.clearData(this),this.contents.dispose(),this.events.dispose(),this.sessions.dispose(),this.terminals.dispose())}get isReady(){return this._isReady}get ready(){return this._readyPromise}_onConnectionFailure(e,t){this._connectionFailure.emit(t)}}},321:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.KernelSpecAPIClient=void 0,t.getSpecs=a;const i=n(1089),s=n(9237),r=n(6376),o="api/kernelspecs";async function a(e=i.ServerConnection.makeSettings()){const t=r.URLExt.join(e.baseUrl,o),n=await i.ServerConnection.makeRequest(t,{},e);if(200!==n.status)throw await i.ServerConnection.ResponseError.create(n);const a=await n.json();return(0,s.validateSpecModels)(a)}t.KernelSpecAPIClient=class{constructor(e={}){var t;this.serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:i.ServerConnection.makeSettings()}async get(){return a(this.serverSettings)}}},362:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceManager=void 0;const i=n(6376),s=n(9531),r=n(1089);class o extends s.DataConnector{constructor(e={}){var t;super(),this.serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:r.ServerConnection.makeSettings()}async fetch(e){const{serverSettings:t}=this,{baseUrl:n,appUrl:i}=t,{makeRequest:s,ResponseError:o}=r.ServerConnection,l=n+i,c=a.url(l,e),d=await s(c,{},t);if(200!==d.status)throw await o.create(d);return d.json()}async list(){const{serverSettings:e}=this,{baseUrl:t,appUrl:n}=e,{makeRequest:i,ResponseError:s}=r.ServerConnection,o=t+n,l=a.url(o,""),c=await i(l,{},e);if(200!==c.status)throw await s.create(c);return(await c.json()).workspaces}async remove(e){const{serverSettings:t}=this,{baseUrl:n,appUrl:i}=t,{makeRequest:s,ResponseError:o}=r.ServerConnection,l=n+i,c=a.url(l,e),d=await s(c,{method:"DELETE"},t);if(204!==d.status)throw await o.create(d)}async save(e,t){const{serverSettings:n}=this,{baseUrl:i,appUrl:s}=n,{makeRequest:o,ResponseError:l}=r.ServerConnection,c=i+s,d=a.url(c,e),u={body:JSON.stringify(t),method:"PUT"},h=await o(d,u,n);if(204!==h.status)throw await l.create(h)}}var a;t.WorkspaceManager=o,function(e){e.url=function(e,t){const n=i.URLExt.join(e,"api/workspaces"),s=i.URLExt.join(n,t);if(!s.startsWith(n))throw new Error("Can only be used for workspaces requests");return s}}(a||(a={}))},608:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,s)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),s=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),s(n(5412),t),s(n(9851),t),s(n(2304),t),s(n(7375),t),s(n(1091),t),s(n(4272),t),s(n(6807),t),s(n(139),t),s(n(1089),t),s(n(6923),t),s(n(5399),t),s(n(7569),t),s(n(856),t),s(n(8430),t),s(n(362),t),s(n(3892),t)},637:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SessionAPIClient=t.SESSION_SERVICE_URL=void 0,t.listRunning=o,t.getSessionUrl=a,t.shutdownSession=l,t.getSessionModel=c,t.startSession=d,t.updateSession=u;const i=n(1089),s=n(6376),r=n(1521);async function o(e=i.ServerConnection.makeSettings()){const n=s.URLExt.join(e.baseUrl,t.SESSION_SERVICE_URL),o=await i.ServerConnection.makeRequest(n,{},e);if(200!==o.status)throw await i.ServerConnection.ResponseError.create(o);const a=await o.json();if(!Array.isArray(a))throw new Error("Invalid Session list");return a.forEach(e=>{(0,r.updateLegacySessionModel)(e),(0,r.validateModel)(e)}),a}function a(e,n){const i=s.URLExt.join(e,t.SESSION_SERVICE_URL),r=s.URLExt.join(i,n);if(!r.startsWith(i))throw new Error("Can only be used for services requests");return r}async function l(e,t=i.ServerConnection.makeSettings()){var n;const s=a(t.baseUrl,e),r=await i.ServerConnection.makeRequest(s,{method:"DELETE"},t);if(404===r.status){const t=null!==(n=(await r.json()).message)&&void 0!==n?n:`The session "${e}"" does not exist on the server`;console.warn(t)}else{if(410===r.status)throw new i.ServerConnection.ResponseError(r,"The kernel was deleted but the session was not");if(204!==r.status)throw await i.ServerConnection.ResponseError.create(r)}}async function c(e,t=i.ServerConnection.makeSettings()){const n=a(t.baseUrl,e),s=await i.ServerConnection.makeRequest(n,{},t);if(200!==s.status)throw await i.ServerConnection.ResponseError.create(s);const o=await s.json();return(0,r.updateLegacySessionModel)(o),(0,r.validateModel)(o),o}async function d(e,n=i.ServerConnection.makeSettings()){const o=s.URLExt.join(n.baseUrl,t.SESSION_SERVICE_URL),a={method:"POST",body:JSON.stringify(e)},l=await i.ServerConnection.makeRequest(o,a,n);if(201!==l.status)throw await i.ServerConnection.ResponseError.create(l);const c=await l.json();return(0,r.updateLegacySessionModel)(c),(0,r.validateModel)(c),c}async function u(e,t=i.ServerConnection.makeSettings()){const n=a(t.baseUrl,e.id),s={method:"PATCH",body:JSON.stringify(e)},o=await i.ServerConnection.makeRequest(n,s,t);if(200!==o.status)throw await i.ServerConnection.ResponseError.create(o);const l=await o.json();return(0,r.updateLegacySessionModel)(l),(0,r.validateModel)(l),l}t.SESSION_SERVICE_URL="api/sessions",t.SessionAPIClient=class{constructor(e){var t;this.serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:i.ServerConnection.makeSettings()}async listRunning(){return o(this.serverSettings)}async getModel(e){return c(e,this.serverSettings)}async startNew(e){return d(e,this.serverSettings)}async shutdown(e){return l(e,this.serverSettings)}async update(e){return u(e,this.serverSettings)}}},785:(e,t,n)=>{n.r(t),n.d(t,{DisposableDelegate:()=>s,DisposableSet:()=>o,ObservableDisposableDelegate:()=>r,ObservableDisposableSet:()=>a});var i=n(6903);class s{constructor(e){this._fn=e}get isDisposed(){return!this._fn}dispose(){if(!this._fn)return;let e=this._fn;this._fn=null,e()}}class r extends s{constructor(){super(...arguments),this._disposed=new i.Signal(this)}get disposed(){return this._disposed}dispose(){this.isDisposed||(super.dispose(),this._disposed.emit(void 0),i.Signal.clearData(this))}}class o{constructor(){this._isDisposed=!1,this._items=new Set}get isDisposed(){return this._isDisposed}dispose(){this._isDisposed||(this._isDisposed=!0,this._items.forEach(e=>{e.dispose()}),this._items.clear())}contains(e){return this._items.has(e)}add(e){this._items.add(e)}remove(e){this._items.delete(e)}clear(){this._items.clear()}}!function(e){e.from=function(t){let n=new e;for(const e of t)n.add(e);return n}}(o||(o={}));class a extends o{constructor(){super(...arguments),this._disposed=new i.Signal(this)}get disposed(){return this._disposed}dispose(){this.isDisposed||(super.dispose(),this._disposed.emit(void 0),i.Signal.clearData(this))}}!function(e){e.from=function(t){let n=new e;for(const e of t)n.add(e);return n}}(a||(a={}))},856:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.IWorkspaceManager=t.IUserManager=t.ITerminalManager=t.IServiceManager=t.ISettingManager=t.ISessionManager=t.IServerSettings=t.INbConvertManager=t.IKernelSpecManager=t.IKernelManager=t.IEventManager=t.IDefaultDrive=t.IDefaultContentProvider=t.IContentsManager=t.IConfigSectionManager=t.IConnectionStatus=void 0;const i=n(5899);t.IConnectionStatus=new i.Token("@jupyterlab/application:IConnectionStatus","A service providing the application connection status."),t.IConfigSectionManager=new i.Token("@jupyterlab/services:IConfigSectionManager","A service providing the config section manager."),t.IContentsManager=new i.Token("@jupyterlab/services:IContentsManager","The contents manager token."),t.IDefaultContentProvider=new i.Token("@jupyterlab/services:IDefaultContentProvider","The default content provider for the contents manager."),t.IDefaultDrive=new i.Token("@jupyterlab/services:IDefaultDrive","The default drive for the contents manager."),t.IEventManager=new i.Token("@jupyterlab/services:IEventManager","The event manager token."),t.IKernelManager=new i.Token("@jupyterlab/services:IKernelManager","The kernel manager token."),t.IKernelSpecManager=new i.Token("@jupyterlab/services:IKernelSpecManager","The kernel spec manager token."),t.INbConvertManager=new i.Token("@jupyterlab/services:INbConvertManager","The nbconvert manager token."),t.IServerSettings=new i.Token("@jupyterlab/services:IServerSettings","The server settings for the application."),t.ISessionManager=new i.Token("@jupyterlab/services:ISessionManager","The session manager token."),t.ISettingManager=new i.Token("@jupyterlab/services:ISettingManager","The setting manager token."),t.IServiceManager=new i.Token("@jupyterlab/services:IServiceManager","The service manager for the application."),t.ITerminalManager=new i.Token("@jupyterlab/services:ITerminalManager","The terminal manager token."),t.IUserManager=new i.Token("@jupyterlab/services:IUserManager","The user manager token."),t.IWorkspaceManager=new i.Token("@jupyterlab/services:IWorkspaceManager","The workspace manager token.")},961:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UserManager=void 0;const i=n(5899),s=n(8534),r=n(6903),o=n(5412),a=n(4320),l="@jupyterlab/services:UserManager#user";class c extends o.BaseManager{constructor(e={}){var t,n;super(e),this._isReady=!1,this._userChanged=new r.Signal(this),this._connectionFailure=new r.Signal(this),this._userApiClient=null!==(t=e.userApiClient)&&void 0!==t?t:new a.UserAPIClient({serverSettings:this.serverSettings}),this._ready=this.requestUser().then(()=>{this.isDisposed||(this._isReady=!0)}).catch(e=>new Promise(()=>{})),this._pollUser=new s.Poll({auto:!1,factory:()=>this.requestUser(),frequency:{interval:61e3,backoff:!0,max:3e5},name:l,standby:null!==(n=e.standby)&&void 0!==n?n:"when-hidden"}),this.ready.then(()=>{this._pollUser.start()})}get isReady(){return this._isReady}get ready(){return this._ready}get identity(){return this._identity}get permissions(){return this._permissions}get userChanged(){return this._userChanged}get connectionFailure(){return this._connectionFailure}dispose(){this._pollUser.dispose(),super.dispose()}async refreshUser(){await this._pollUser.refresh(),await this._pollUser.tick}async requestUser(){if(this.isDisposed)return;const e={identity:this._identity,permissions:this._permissions},t=await this._userApiClient.get(),n=t.identity,{localStorage:s}=window,r=s.getItem(l);if(r&&(!n.initials||!n.color)){const e=JSON.parse(r);n.initials=n.initials||e.initials||n.name.substring(0,1),n.color=n.color||e.color||d.getRandomColor()}i.JSONExt.deepEqual(t,e)||(this._identity=n,this._permissions=t.permissions,s.setItem(l,JSON.stringify(n)),this._userChanged.emit(t))}}var d;t.UserManager=c,function(e){const t=["var(--jp-collaborator-color1)","var(--jp-collaborator-color2)","var(--jp-collaborator-color3)","var(--jp-collaborator-color4)","var(--jp-collaborator-color5)","var(--jp-collaborator-color6)","var(--jp-collaborator-color7)"];e.getRandomColor=()=>t[Math.floor(Math.random()*t.length)]}(d||(d={}))},1089:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ServerConnection=void 0;const i=n(6376),s=n(3962);let r;var o,a;r="undefined"==typeof window?n(4396):WebSocket,function(e){e.makeSettings=function(e){return a.makeSettings(e)},e.makeRequest=function(e,t,n){return a.handleRequest(e,t,n)};class t extends Error{static async create(e){try{const n=await e.json(),{message:i,traceback:s}=n;return s&&console.error(s),new t(e,null!=i?i:t._defaultMessage(e),null!=s?s:"")}catch(n){return console.debug(n),new t(e)}}constructor(e,n=t._defaultMessage(e),i=""){super(n),this.response=e,this.traceback=i}static _defaultMessage(e){return`Invalid response: ${e.status} ${e.statusText}`}}e.ResponseError=t;class n extends TypeError{constructor(e){super(e.message),this.stack=e.stack}}e.NetworkError=n}(o||(t.ServerConnection=o={})),function(e){e.makeSettings=function(e={}){var t;const n=i.PageConfig.getBaseUrl(),o=i.PageConfig.getWsUrl(),a=i.URLExt.normalize(e.baseUrl)||n;let l=e.wsUrl;l||a!==n||(l=o),l||0!==a.indexOf("http")||(l="ws"+a.slice(4)),l=null!=l?l:o;const c=i.PageConfig.getOption("appendToken").toLowerCase();let d;return d=""===c?"undefined"==typeof window||"undefined"!=typeof process&&void 0!==(null===(t=null===process||void 0===process?void 0:process.env)||void 0===t?void 0:t.JEST_WORKER_ID)||i.URLExt.getHostName(n)!==i.URLExt.getHostName(l):"true"===c,{init:{cache:"no-store",credentials:"same-origin"},fetch,Headers,Request,WebSocket:r,token:i.PageConfig.getToken(),appUrl:i.PageConfig.getOption("appUrl"),appendToken:d,serializer:{serialize:s.serialize,deserialize:s.deserialize},...e,baseUrl:a,wsUrl:l}},e.handleRequest=function(e,t,n){var i;if(0!==e.indexOf(n.baseUrl))throw new Error("Can only be used for notebook server requests");"no-store"===(null!==(i=t.cache)&&void 0!==i?i:n.init.cache)&&(e+=(/\?/.test(e)?"&":"?")+(new Date).getTime());const s=new n.Request(e,{...n.init,...t});let r=!1;if(n.token&&(r=!0,s.headers.append("Authorization",`token ${n.token}`)),"undefined"!=typeof document){const e=function(){let e="";try{e=document.cookie}catch(e){return}const t=e.match("\\b_xsrf=([^;]*)\\b");return null==t?void 0:t[1]}();void 0!==e&&(r=!0,s.headers.append("X-XSRFToken",e))}return!s.headers.has("Content-Type")&&r&&s.headers.set("Content-Type","application/json"),n.fetch.call(null,s).catch(e=>{throw new o.NetworkError(e)})}}(a||(a={}))},1091:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EventManager=void 0;const i=n(6376),s=n(8534),r=n(6903),o=n(1089),a="api/events";t.EventManager=class{constructor(e={}){var t,n;this._socket=null,this.serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:o.ServerConnection.makeSettings(),this._poll=new s.Poll({factory:()=>this._subscribe(),standby:null!==(n=e.standby)&&void 0!==n?n:"when-hidden"}),this._stream=new r.Stream(this),this._poll.start()}get isDisposed(){return this._poll.isDisposed}get stream(){return this._stream}dispose(){if(this.isDisposed)return;this._poll.dispose();const e=this._socket;e&&(this._socket=null,e.onopen=()=>{},e.onerror=()=>{},e.onmessage=()=>{},e.onclose=()=>{},e.close()),r.Signal.clearData(this),this._stream.stop()}async emit(e){const{serverSettings:t}=this,{baseUrl:n}=t,{makeRequest:s,ResponseError:r}=o.ServerConnection,l=i.URLExt.join(n,a),c={body:JSON.stringify(e),method:"POST"},d=await s(l,c,t);if(204!==d.status)throw new r(d)}_subscribe(){return new Promise((e,t)=>{if(this.isDisposed)return;const{appendToken:n,token:s,WebSocket:r,wsUrl:o}=this.serverSettings;let l=i.URLExt.join(o,a,"subscribe");n&&""!==s&&(l+=`?token=${encodeURIComponent(s)}`);const c=this._socket=new r(l),d=this._stream;c.onclose=()=>t(new Error("EventManager socket closed")),c.onmessage=e=>e.data&&d.emit(JSON.parse(e.data))})}}},1160:(e,t,n)=>{var i=n(2063),s=n(3992),r=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,o=/[\n\r\t]/g,a=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,l=/:\d+$/,c=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,d=/^[a-zA-Z]:/;function u(e){return(e||"").toString().replace(r,"")}var h=[["#","hash"],["?","query"],function(e,t){return f(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],p={hash:1,query:1};function m(e){var t,i=("undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}).location||{},s={},r=typeof(e=e||i);if("blob:"===e.protocol)s=new v(unescape(e.pathname),{});else if("string"===r)for(t in s=new v(e,{}),p)delete s[t];else if("object"===r){for(t in e)t in p||(s[t]=e[t]);void 0===s.slashes&&(s.slashes=a.test(e.href))}return s}function f(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function g(e,t){e=(e=u(e)).replace(o,""),t=t||{};var n,i=c.exec(e),s=i[1]?i[1].toLowerCase():"",r=!!i[2],a=!!i[3],l=0;return r?a?(n=i[2]+i[3]+i[4],l=i[2].length+i[3].length):(n=i[2]+i[4],l=i[2].length):a?(n=i[3]+i[4],l=i[3].length):n=i[4],"file:"===s?l>=2&&(n=n.slice(2)):f(s)?n=i[4]:s?r&&(n=n.slice(2)):l>=2&&f(t.protocol)&&(n=i[4]),{protocol:s,slashes:r||f(s),slashesCount:l,rest:n}}function v(e,t,n){if(e=(e=u(e)).replace(o,""),!(this instanceof v))return new v(e,t,n);var r,a,l,c,p,_,b=h.slice(),y=typeof t,w=this,x=0;for("object"!==y&&"string"!==y&&(n=t,t=null),n&&"function"!=typeof n&&(n=s.parse),r=!(a=g(e||"",t=m(t))).protocol&&!a.slashes,w.slashes=a.slashes||r&&t.slashes,w.protocol=a.protocol||t.protocol||"",e=a.rest,("file:"===a.protocol&&(2!==a.slashesCount||d.test(e))||!a.slashes&&(a.protocol||a.slashesCount<2||!f(w.protocol)))&&(b[3]=[/(.*)/,"pathname"]);x<b.length;x++)"function"!=typeof(c=b[x])?(l=c[0],_=c[1],l!=l?w[_]=e:"string"==typeof l?~(p="@"===l?e.lastIndexOf(l):e.indexOf(l))&&("number"==typeof c[2]?(w[_]=e.slice(0,p),e=e.slice(p+c[2])):(w[_]=e.slice(p),e=e.slice(0,p))):(p=l.exec(e))&&(w[_]=p[1],e=e.slice(0,p.index)),w[_]=w[_]||r&&c[3]&&t[_]||"",c[4]&&(w[_]=w[_].toLowerCase())):e=c(e,w);n&&(w.query=n(w.query)),r&&t.slashes&&"/"!==w.pathname.charAt(0)&&(""!==w.pathname||""!==t.pathname)&&(w.pathname=function(e,t){if(""===e)return t;for(var n=(t||"/").split("/").slice(0,-1).concat(e.split("/")),i=n.length,s=n[i-1],r=!1,o=0;i--;)"."===n[i]?n.splice(i,1):".."===n[i]?(n.splice(i,1),o++):o&&(0===i&&(r=!0),n.splice(i,1),o--);return r&&n.unshift(""),"."!==s&&".."!==s||n.push(""),n.join("/")}(w.pathname,t.pathname)),"/"!==w.pathname.charAt(0)&&f(w.protocol)&&(w.pathname="/"+w.pathname),i(w.port,w.protocol)||(w.host=w.hostname,w.port=""),w.username=w.password="",w.auth&&(~(p=w.auth.indexOf(":"))?(w.username=w.auth.slice(0,p),w.username=encodeURIComponent(decodeURIComponent(w.username)),w.password=w.auth.slice(p+1),w.password=encodeURIComponent(decodeURIComponent(w.password))):w.username=encodeURIComponent(decodeURIComponent(w.auth)),w.auth=w.password?w.username+":"+w.password:w.username),w.origin="file:"!==w.protocol&&f(w.protocol)&&w.host?w.protocol+"//"+w.host:"null",w.href=w.toString()}v.prototype={set:function(e,t,n){var r=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(n||s.parse)(t)),r[e]=t;break;case"port":r[e]=t,i(t,r.protocol)?t&&(r.host=r.hostname+":"+t):(r.host=r.hostname,r[e]="");break;case"hostname":r[e]=t,r.port&&(t+=":"+r.port),r.host=t;break;case"host":r[e]=t,l.test(t)?(t=t.split(":"),r.port=t.pop(),r.hostname=t.join(":")):(r.hostname=t,r.port="");break;case"protocol":r.protocol=t.toLowerCase(),r.slashes=!n;break;case"pathname":case"hash":if(t){var o="pathname"===e?"/":"#";r[e]=t.charAt(0)!==o?o+t:t}else r[e]=t;break;case"username":case"password":r[e]=encodeURIComponent(t);break;case"auth":var a=t.indexOf(":");~a?(r.username=t.slice(0,a),r.username=encodeURIComponent(decodeURIComponent(r.username)),r.password=t.slice(a+1),r.password=encodeURIComponent(decodeURIComponent(r.password))):r.username=encodeURIComponent(decodeURIComponent(t))}for(var c=0;c<h.length;c++){var d=h[c];d[4]&&(r[d[1]]=r[d[1]].toLowerCase())}return r.auth=r.password?r.username+":"+r.password:r.username,r.origin="file:"!==r.protocol&&f(r.protocol)&&r.host?r.protocol+"//"+r.host:"null",r.href=r.toString(),r},toString:function(e){e&&"function"==typeof e||(e=s.stringify);var t,n=this,i=n.host,r=n.protocol;r&&":"!==r.charAt(r.length-1)&&(r+=":");var o=r+(n.protocol&&n.slashes||f(n.protocol)?"//":"");return n.username?(o+=n.username,n.password&&(o+=":"+n.password),o+="@"):n.password?(o+=":"+n.password,o+="@"):"file:"!==n.protocol&&f(n.protocol)&&!i&&"/"!==n.pathname&&(o+="@"),(":"===i[i.length-1]||l.test(n.hostname)&&!n.port)&&(i+=":"),o+=i+n.pathname,(t="object"==typeof n.query?e(n.query):n.query)&&(o+="?"!==t.charAt(0)?"?"+t:t),n.hash&&(o+=n.hash),o}},v.extractProtocol=g,v.location=m,v.trimLeft=u,v.qs=s,e.exports=v},1229:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},1326:(e,t,n)=>{var i=n(6379);i.TypeStyle,n(2451);var s=n(4798);s.extend,s.classes,s.media;var r=new i.TypeStyle({autoGenerateTag:!0});r.setStylesTarget,r.cssRaw,r.cssRule,r.forceRenderStyles,r.fontFace,r.getStyles,r.keyframes,r.reinit,t.iF=r.style,r.stylesheet},1480:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateProperty=function(e,t,n,i=[]){if(!e.hasOwnProperty(t))throw Error(`Missing property '${t}'`);const s=e[t];if(void 0!==n){let e=!0;switch(n){case"array":e=Array.isArray(s);break;case"object":e=void 0!==s;break;default:e=typeof s===n}if(!e)throw new Error(`Property '${t}' is not of type '${n}'`);if(i.length>0){let e=!0;switch(n){case"string":case"number":case"boolean":e=i.includes(s);break;default:e=i.findIndex(e=>e===s)>=0}if(!e)throw new Error(`Property '${t}' is not one of the valid values ${JSON.stringify(i)}`)}}}},1483:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},1521:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateModel=r,t.updateLegacySessionModel=function(e){void 0===e.path&&void 0!==e.notebook&&(e.path=e.notebook.path,e.type="notebook",e.name="")},t.validateModels=function(e){if(!Array.isArray(e))throw new Error("Invalid session list");e.forEach(e=>r(e))};const i=n(8872),s=n(1480);function r(e){(0,s.validateProperty)(e,"id","string"),(0,s.validateProperty)(e,"type","string"),(0,s.validateProperty)(e,"name","string"),(0,s.validateProperty)(e,"path","string"),(0,s.validateProperty)(e,"kernel","object"),(0,i.validateModel)(e.kernel)}},1628:(e,t,n)=>{n.r(t),n.d(t,{AttachedProperty:()=>i});class i{constructor(e){this._pid=s.nextPID(),this.name=e.name,this._create=e.create,this._coerce=e.coerce||null,this._compare=e.compare||null,this._changed=e.changed||null}get(e){let t,n=s.ensureMap(e);return t=this._pid in n?n[this._pid]:n[this._pid]=this._createValue(e),t}set(e,t){let n,i=s.ensureMap(e);n=this._pid in i?i[this._pid]:i[this._pid]=this._createValue(e);let r=this._coerceValue(e,t);this._maybeNotify(e,n,i[this._pid]=r)}coerce(e){let t,n=s.ensureMap(e);t=this._pid in n?n[this._pid]:n[this._pid]=this._createValue(e);let i=this._coerceValue(e,t);this._maybeNotify(e,t,n[this._pid]=i)}_createValue(e){return(0,this._create)(e)}_coerceValue(e,t){let n=this._coerce;return n?n(e,t):t}_compareValue(e,t){let n=this._compare;return n?n(e,t):e===t}_maybeNotify(e,t,n){let i=this._changed;i&&!this._compareValue(t,n)&&i(e,t,n)}}var s;!function(e){e.clearData=function(e){s.ownerData.delete(e)}}(i||(i={})),function(e){e.ownerData=new WeakMap,e.nextPID=(()=>{let e=0;return()=>`pid-${`${Math.random()}`.slice(2)}-${e++}`})(),e.ensureMap=function(t){let n=e.ownerData.get(t);return n||(n=Object.create(null),e.ownerData.set(t,n),n)}}(s||(s={}))},2063:e=>{e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},2100:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalConnection=void 0;const i=n(6376),s=n(5899),r=n(6903),o=n(608),a=n(4903);class l{constructor(e){var t,n;this._createSocket=()=>{this._errorIfDisposed(),this._clearSocket(),this._updateConnectionStatus("connecting");const e=this._name,t=this.serverSettings;let n=i.URLExt.join(t.wsUrl,"terminals","websocket",encodeURIComponent(e));const s=t.token;t.appendToken&&""!==s&&(n+=`?token=${encodeURIComponent(s)}`),this._ws=new t.WebSocket(n),this._ws.onmessage=this._onWSMessage,this._ws.onclose=this._onWSClose,this._ws.onerror=this._onWSClose},this._onWSMessage=e=>{if(this._isDisposed)return;const t=JSON.parse(e.data);"disconnect"===t[0]&&this.dispose(),"connecting"!==this._connectionStatus?this._messageReceived.emit({type:t[0],content:t.slice(1)}):"setup"===t[0]&&this._updateConnectionStatus("connected")},this._onWSClose=e=>{console.warn(`Terminal websocket closed: ${e.code}`),this.isDisposed||this._reconnect()},this._connectionStatus="connecting",this._connectionStatusChanged=new r.Signal(this),this._isDisposed=!1,this._disposed=new r.Signal(this),this._messageReceived=new r.Signal(this),this._reconnectTimeout=null,this._ws=null,this._noOp=()=>{},this._reconnectLimit=7,this._reconnectAttempt=0,this._pendingMessages=[],this._name=e.model.name,this.serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:o.ServerConnection.makeSettings(),this._terminalAPIClient=null!==(n=e.terminalAPIClient)&&void 0!==n?n:new a.TerminalAPIClient({serverSettings:this.serverSettings}),this._createSocket()}get disposed(){return this._disposed}get messageReceived(){return this._messageReceived}get name(){return this._name}get model(){return{name:this._name}}get isDisposed(){return this._isDisposed}dispose(){this._isDisposed||(this._isDisposed=!0,this._disposed.emit(),this._updateConnectionStatus("disconnected"),this._clearSocket(),r.Signal.clearData(this))}send(e){this._sendMessage(e)}_sendMessage(e,t=!0){if(!this._isDisposed&&e.content)if("connected"===this.connectionStatus&&this._ws){const t=[e.type,...e.content];this._ws.send(JSON.stringify(t))}else{if(!t)throw new Error(`Could not send message: ${JSON.stringify(e)}`);this._pendingMessages.push(e)}}_sendPending(){for(;"connected"===this.connectionStatus&&this._pendingMessages.length>0;)this._sendMessage(this._pendingMessages[0],!1),this._pendingMessages.shift()}reconnect(){this._errorIfDisposed();const e=new s.PromiseDelegate,t=(n,i)=>{"connected"===i?(e.resolve(),this.connectionStatusChanged.disconnect(t,this)):"disconnected"===i&&(e.reject(new Error("Terminal connection disconnected")),this.connectionStatusChanged.disconnect(t,this))};return this.connectionStatusChanged.connect(t,this),this._reconnectAttempt=0,this._reconnect(),e.promise}_reconnect(){if(this._errorIfDisposed(),clearTimeout(this._reconnectTimeout),this._reconnectAttempt<this._reconnectLimit){this._updateConnectionStatus("connecting");const e=c.getRandomIntInclusive(0,1e3*(Math.pow(2,this._reconnectAttempt)-1));console.error(`Connection lost, reconnecting in ${Math.floor(e/1e3)} seconds.`),this._reconnectTimeout=setTimeout(this._createSocket,e),this._reconnectAttempt+=1}else this._updateConnectionStatus("disconnected");this._clearSocket()}_clearSocket(){null!==this._ws&&(this._ws.onopen=this._noOp,this._ws.onclose=this._noOp,this._ws.onerror=this._noOp,this._ws.onmessage=this._noOp,this._ws.close(),this._ws=null)}async shutdown(){await this._terminalAPIClient.shutdown(this.name),this.dispose()}clone(){return new l({model:this.model,serverSettings:this.serverSettings,terminalAPIClient:this._terminalAPIClient})}_updateConnectionStatus(e){this._connectionStatus!==e&&(this._connectionStatus=e,"connecting"!==e&&(this._reconnectAttempt=0,clearTimeout(this._reconnectTimeout)),"connected"===e&&this._sendPending(),this._connectionStatusChanged.emit(e))}_errorIfDisposed(){if(this.isDisposed)throw new Error("Terminal connection is disposed")}get connectionStatusChanged(){return this._connectionStatusChanged}get connectionStatus(){return this._connectionStatus}}var c;t.TerminalConnection=l,function(e){e.getRandomIntInclusive=function(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e}}(c||(c={}))},2279:function(__unused_webpack_module,exports,__webpack_require__){var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.PageConfig=void 0;const coreutils_1=__webpack_require__(5899),minimist_1=__importDefault(__webpack_require__(9031)),url_1=__webpack_require__(7881);var PageConfig;(function(PageConfig){function getOption(name){if(configData)return configData[name]||getBodyData(name);configData=Object.create(null);let found=!1;if("undefined"!=typeof document&&document){const e=document.getElementById("jupyter-config-data");e&&(configData=JSON.parse(e.textContent||""),found=!0)}if(!found&&"undefined"!=typeof process&&process.argv)try{const cli=(0,minimist_1.default)(process.argv.slice(2)),path=__webpack_require__(7975);let fullPath="";"jupyter-config-data"in cli?fullPath=path.resolve(cli["jupyter-config-data"]):"JUPYTER_CONFIG_DATA"in process.env&&(fullPath=path.resolve(process.env.JUPYTER_CONFIG_DATA)),fullPath&&(configData=eval("require")(fullPath))}catch(e){console.error(e)}if(coreutils_1.JSONExt.isObject(configData))for(const e in configData)"string"!=typeof configData[e]&&(configData[e]=JSON.stringify(configData[e]));else configData=Object.create(null);return configData[name]||getBodyData(name)}function setOption(e,t){const n=getOption(e);return configData[e]=t,n}function getBaseUrl(){return url_1.URLExt.normalize(getOption("baseUrl")||"/")}function getTreeUrl(){return url_1.URLExt.join(getBaseUrl(),getOption("treeUrl"))}function getShareUrl(){return url_1.URLExt.normalize(getOption("shareUrl")||getBaseUrl())}function getTreeShareUrl(){return url_1.URLExt.normalize(url_1.URLExt.join(getShareUrl(),getOption("treeUrl")))}function getUrl(e){var t,n,i,s;let r=e.toShare?getShareUrl():getBaseUrl();const o=null!==(t=e.mode)&&void 0!==t?t:getOption("mode"),a=null!==(n=e.workspace)&&void 0!==n?n:getOption("workspace"),l="single-document"===o?"doc":"lab";r=url_1.URLExt.join(r,l),a!==PageConfig.defaultWorkspace&&(r=url_1.URLExt.join(r,"workspaces",encodeURIComponent(null!==(i=getOption("workspace"))&&void 0!==i?i:PageConfig.defaultWorkspace)));const c=null!==(s=e.treePath)&&void 0!==s?s:getOption("treePath");return c&&(r=url_1.URLExt.join(r,"tree",url_1.URLExt.encodeParts(c))),r}function getWsUrl(e){let t=getOption("wsUrl");if(!t){if(0!==(e=e?url_1.URLExt.normalize(e):getBaseUrl()).indexOf("http"))return"";t="ws"+e.slice(4)}return url_1.URLExt.normalize(t)}function getNBConvertURL({path:e,format:t,download:n}){const i=url_1.URLExt.encodeParts(e),s=url_1.URLExt.join(getBaseUrl(),"nbconvert",t,i);return n?s+"?download=true":s}function getToken(){return getOption("token")||getBodyData("jupyterApiToken")}function getNotebookVersion(){const e=getOption("notebookVersion");return""===e?[0,0,0]:JSON.parse(e)}PageConfig.getOption=getOption,PageConfig.setOption=setOption,PageConfig.getBaseUrl=getBaseUrl,PageConfig.getTreeUrl=getTreeUrl,PageConfig.getShareUrl=getShareUrl,PageConfig.getTreeShareUrl=getTreeShareUrl,PageConfig.getUrl=getUrl,PageConfig.defaultWorkspace="default",PageConfig.getWsUrl=getWsUrl,PageConfig.getNBConvertURL=getNBConvertURL,PageConfig.getToken=getToken,PageConfig.getNotebookVersion=getNotebookVersion;let configData=null,Extension;function getBodyData(e){if("undefined"==typeof document||!document.body)return"";const t=document.body.dataset[e];return void 0===t?"":decodeURIComponent(t)}!function(e){function t(e){try{const t=getOption(e);if(t)return JSON.parse(t)}catch(t){console.warn(`Unable to parse ${e}.`,t)}return[]}e.deferred=t("deferredExtensions"),e.disabled=t("disabledExtensions"),e.isDeferred=function(t){const n=t.indexOf(":");let i="";return-1!==n&&(i=t.slice(0,n)),e.deferred.some(e=>e===t||i&&e===i)},e.isDisabled=function(t){const n=t.indexOf(":");let i="";return-1!==n&&(i=t.slice(0,n)),e.disabled.some(e=>e===t||i&&e===i)}}(Extension=PageConfig.Extension||(PageConfig.Extension={}))})(PageConfig||(exports.PageConfig=PageConfig={}))},2304:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectionStatus=void 0,t.ConnectionStatus=class{constructor(){this.isConnected=!0}}},2343:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},2451:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},2551:(e,t,n)=>{var i=n(6540),s=n(9982);function r(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=new Set,a={};function l(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(a[e]=t,e=0;e<t.length;e++)o.add(t[e])}var d=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),u=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},m={};function f(e,t,n,i,s,r,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=i,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=r,this.removeEmptyString=o}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){g[e]=new f(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];g[t]=new f(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){g[e]=new f(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){g[e]=new f(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){g[e]=new f(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){g[e]=new f(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){g[e]=new f(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){g[e]=new f(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){g[e]=new f(e,5,!1,e.toLowerCase(),null,!1,!1)});var v=/[\-:]([a-z])/g;function _(e){return e[1].toUpperCase()}function b(e,t,n,i){var s=g.hasOwnProperty(t)?g[t]:null;(null!==s?0!==s.type:i||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,i){if(null==t||function(e,t,n,i){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!i&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,i))return!0;if(i)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,s,i)&&(n=null),i||null===s?function(e){return!!u.call(m,e)||!u.call(p,e)&&(h.test(e)?m[e]=!0:(p[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=null===n?3!==s.type&&"":n:(t=s.attributeName,i=s.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(s=s.type)||4===s&&!0===n?"":""+n,i?e.setAttributeNS(i,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(v,_);g[t]=new f(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(v,_);g[t]=new f(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(v,_);g[t]=new f(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){g[e]=new f(e,1,!1,e.toLowerCase(),null,!1,!1)}),g.xlinkHref=new f("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){g[e]=new f(e,1,!1,e.toLowerCase(),null,!0,!0)});var y=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for("react.element"),x=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),E=Symbol.for("react.provider"),M=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),A=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var D=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var T=Symbol.iterator;function R(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=T&&e[T]||e["@@iterator"])?e:null}var j,z=Object.assign;function N(e){if(void 0===j)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);j=t&&t[1]||""}return"\n"+j+e}var B=!1;function F(e,t){if(!e||B)return"";B=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var i=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){i=e}e.call(t.prototype)}else{try{throw Error()}catch(e){i=e}e()}}catch(t){if(t&&i&&"string"==typeof t.stack){for(var s=t.stack.split("\n"),r=i.stack.split("\n"),o=s.length-1,a=r.length-1;1<=o&&0<=a&&s[o]!==r[a];)a--;for(;1<=o&&0<=a;o--,a--)if(s[o]!==r[a]){if(1!==o||1!==a)do{if(o--,0>--a||s[o]!==r[a]){var l="\n"+s[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=o&&0<=a);break}}}finally{B=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?N(e):""}function U(e){switch(e.tag){case 5:return N(e.type);case 16:return N("Lazy");case 13:return N("Suspense");case 19:return N("SuspenseList");case 0:case 2:case 15:return F(e.type,!1);case 11:return F(e.type.render,!1);case 1:return F(e.type,!0);default:return""}}function H(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case S:return"Fragment";case x:return"Portal";case k:return"Profiler";case C:return"StrictMode";case I:return"Suspense";case L:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case M:return(e.displayName||"Context")+".Consumer";case E:return(e._context.displayName||"Context")+".Provider";case P:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case O:return null!==(t=e.displayName||null)?t:H(e.type)||"Memo";case A:t=e._payload,e=e._init;try{return H(e(t))}catch(e){}}return null}function W(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return H(t);case 8:return t===C?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function $(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function q(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function V(e){e._valueTracker||(e._valueTracker=function(e){var t=q(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var s=n.get,r=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(e){i=""+e,r.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(e){i=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function K(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),i="";return e&&(i=q(e)?e.checked?"true":"false":e.value),(e=i)!==n&&(t.setValue(e),!0)}function J(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function G(e,t){var n=t.checked;return z({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Y(e,t){var n=null==t.defaultValue?"":t.defaultValue,i=null!=t.checked?t.checked:t.defaultChecked;n=$(null!=t.value?t.value:n),e._wrapperState={initialChecked:i,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function X(e,t){null!=(t=t.checked)&&b(e,"checked",t,!1)}function Q(e,t){X(e,t);var n=$(t.value),i=t.type;if(null!=n)"number"===i?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===i||"reset"===i)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,$(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Z(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!("submit"!==i&&"reset"!==i||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&J(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,i){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&i&&(e[n].defaultSelected=!0)}else{for(n=""+$(n),t=null,s=0;s<e.length;s++){if(e[s].value===n)return e[s].selected=!0,void(i&&(e[s].defaultSelected=!0));null!==t||e[s].disabled||(t=e[s])}null!==t&&(t.selected=!0)}}function ie(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(r(91));return z({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function se(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(r(92));if(te(n)){if(1<n.length)throw Error(r(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:$(n)}}function re(e,t){var n=$(t.value),i=$(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=i&&(e.defaultValue=""+i)}function oe(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function ae(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function le(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?ae(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ce,de,ue=(de=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ce=ce||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ce.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,i){MSApp.execUnsafeLocalFunction(function(){return de(e,t)})}:de);function he(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var pe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},me=["Webkit","ms","Moz","O"];function fe(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||pe.hasOwnProperty(e)&&pe[e]?(""+t).trim():t+"px"}function ge(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var i=0===n.indexOf("--"),s=fe(n,t[n],i);"float"===n&&(n="cssFloat"),i?e.setProperty(n,s):e[n]=s}}Object.keys(pe).forEach(function(e){me.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pe[t]=pe[e]})});var ve=z({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function _e(e,t){if(t){if(ve[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(r(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(r(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(r(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(r(62))}}function be(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ye=null;function we(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var xe=null,Se=null,Ce=null;function ke(e){if(e=bs(e)){if("function"!=typeof xe)throw Error(r(280));var t=e.stateNode;t&&(t=ws(t),xe(e.stateNode,e.type,t))}}function Ee(e){Se?Ce?Ce.push(e):Ce=[e]:Se=e}function Me(){if(Se){var e=Se,t=Ce;if(Ce=Se=null,ke(e),t)for(e=0;e<t.length;e++)ke(t[e])}}function Pe(e,t){return e(t)}function Ie(){}var Le=!1;function Oe(e,t,n){if(Le)return e(t,n);Le=!0;try{return Pe(e,t,n)}finally{Le=!1,(null!==Se||null!==Ce)&&(Ie(),Me())}}function Ae(e,t){var n=e.stateNode;if(null===n)return null;var i=ws(n);if(null===i)return null;n=i[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(i=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!i;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(r(231,t,typeof n));return n}var De=!1;if(d)try{var Te={};Object.defineProperty(Te,"passive",{get:function(){De=!0}}),window.addEventListener("test",Te,Te),window.removeEventListener("test",Te,Te)}catch(de){De=!1}function Re(e,t,n,i,s,r,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this.onError(e)}}var je=!1,ze=null,Ne=!1,Be=null,Fe={onError:function(e){je=!0,ze=e}};function Ue(e,t,n,i,s,r,o,a,l){je=!1,ze=null,Re.apply(Fe,arguments)}function He(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function We(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function $e(e){if(He(e)!==e)throw Error(r(188))}function qe(e){return e=function(e){var t=e.alternate;if(!t){if(null===(t=He(e)))throw Error(r(188));return t!==e?null:e}for(var n=e,i=t;;){var s=n.return;if(null===s)break;var o=s.alternate;if(null===o){if(null!==(i=s.return)){n=i;continue}break}if(s.child===o.child){for(o=s.child;o;){if(o===n)return $e(s),e;if(o===i)return $e(s),t;o=o.sibling}throw Error(r(188))}if(n.return!==i.return)n=s,i=o;else{for(var a=!1,l=s.child;l;){if(l===n){a=!0,n=s,i=o;break}if(l===i){a=!0,i=s,n=o;break}l=l.sibling}if(!a){for(l=o.child;l;){if(l===n){a=!0,n=o,i=s;break}if(l===i){a=!0,i=o,n=s;break}l=l.sibling}if(!a)throw Error(r(189))}}if(n.alternate!==i)throw Error(r(190))}if(3!==n.tag)throw Error(r(188));return n.stateNode.current===n?e:t}(e),null!==e?Ve(e):null}function Ve(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Ve(e);if(null!==t)return t;e=e.sibling}return null}var Ke=s.unstable_scheduleCallback,Je=s.unstable_cancelCallback,Ge=s.unstable_shouldYield,Ye=s.unstable_requestPaint,Xe=s.unstable_now,Qe=s.unstable_getCurrentPriorityLevel,Ze=s.unstable_ImmediatePriority,et=s.unstable_UserBlockingPriority,tt=s.unstable_NormalPriority,nt=s.unstable_LowPriority,it=s.unstable_IdlePriority,st=null,rt=null,ot=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(at(e)/lt|0)|0},at=Math.log,lt=Math.LN2,ct=64,dt=4194304;function ut(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ht(e,t){var n=e.pendingLanes;if(0===n)return 0;var i=0,s=e.suspendedLanes,r=e.pingedLanes,o=268435455&n;if(0!==o){var a=o&~s;0!==a?i=ut(a):0!==(r&=o)&&(i=ut(r))}else 0!==(o=n&~s)?i=ut(o):0!==r&&(i=ut(r));if(0===i)return 0;if(0!==t&&t!==i&&0===(t&s)&&((s=i&-i)>=(r=t&-t)||16===s&&4194240&r))return t;if(4&i&&(i|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=i;0<t;)s=1<<(n=31-ot(t)),i|=e[n],t&=~s;return i}function pt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function mt(e){return 0!=(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function ft(){var e=ct;return!(4194240&(ct<<=1))&&(ct=64),e}function gt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function vt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-ot(t)]=n}function _t(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var i=31-ot(n),s=1<<i;s&t|e[i]&t&&(e[i]|=t),n&=~s}}var bt=0;function yt(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var wt,xt,St,Ct,kt,Et=!1,Mt=[],Pt=null,It=null,Lt=null,Ot=new Map,At=new Map,Dt=[],Tt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Rt(e,t){switch(e){case"focusin":case"focusout":Pt=null;break;case"dragenter":case"dragleave":It=null;break;case"mouseover":case"mouseout":Lt=null;break;case"pointerover":case"pointerout":Ot.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":At.delete(t.pointerId)}}function jt(e,t,n,i,s,r){return null===e||e.nativeEvent!==r?(e={blockedOn:t,domEventName:n,eventSystemFlags:i,nativeEvent:r,targetContainers:[s]},null!==t&&null!==(t=bs(t))&&xt(t),e):(e.eventSystemFlags|=i,t=e.targetContainers,null!==s&&-1===t.indexOf(s)&&t.push(s),e)}function zt(e){var t=_s(e.target);if(null!==t){var n=He(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=We(n)))return e.blockedOn=t,void kt(e.priority,function(){St(n)})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Nt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Gt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=bs(n))&&xt(t),e.blockedOn=n,!1;var i=new(n=e.nativeEvent).constructor(n.type,n);ye=i,n.target.dispatchEvent(i),ye=null,t.shift()}return!0}function Bt(e,t,n){Nt(e)&&n.delete(t)}function Ft(){Et=!1,null!==Pt&&Nt(Pt)&&(Pt=null),null!==It&&Nt(It)&&(It=null),null!==Lt&&Nt(Lt)&&(Lt=null),Ot.forEach(Bt),At.forEach(Bt)}function Ut(e,t){e.blockedOn===t&&(e.blockedOn=null,Et||(Et=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,Ft)))}function Ht(e){function t(t){return Ut(t,e)}if(0<Mt.length){Ut(Mt[0],e);for(var n=1;n<Mt.length;n++){var i=Mt[n];i.blockedOn===e&&(i.blockedOn=null)}}for(null!==Pt&&Ut(Pt,e),null!==It&&Ut(It,e),null!==Lt&&Ut(Lt,e),Ot.forEach(t),At.forEach(t),n=0;n<Dt.length;n++)(i=Dt[n]).blockedOn===e&&(i.blockedOn=null);for(;0<Dt.length&&null===(n=Dt[0]).blockedOn;)zt(n),null===n.blockedOn&&Dt.shift()}var Wt=y.ReactCurrentBatchConfig,$t=!0;function qt(e,t,n,i){var s=bt,r=Wt.transition;Wt.transition=null;try{bt=1,Kt(e,t,n,i)}finally{bt=s,Wt.transition=r}}function Vt(e,t,n,i){var s=bt,r=Wt.transition;Wt.transition=null;try{bt=4,Kt(e,t,n,i)}finally{bt=s,Wt.transition=r}}function Kt(e,t,n,i){if($t){var s=Gt(e,t,n,i);if(null===s)$i(e,t,i,Jt,n),Rt(e,i);else if(function(e,t,n,i,s){switch(t){case"focusin":return Pt=jt(Pt,e,t,n,i,s),!0;case"dragenter":return It=jt(It,e,t,n,i,s),!0;case"mouseover":return Lt=jt(Lt,e,t,n,i,s),!0;case"pointerover":var r=s.pointerId;return Ot.set(r,jt(Ot.get(r)||null,e,t,n,i,s)),!0;case"gotpointercapture":return r=s.pointerId,At.set(r,jt(At.get(r)||null,e,t,n,i,s)),!0}return!1}(s,e,t,n,i))i.stopPropagation();else if(Rt(e,i),4&t&&-1<Tt.indexOf(e)){for(;null!==s;){var r=bs(s);if(null!==r&&wt(r),null===(r=Gt(e,t,n,i))&&$i(e,t,i,Jt,n),r===s)break;s=r}null!==s&&i.stopPropagation()}else $i(e,t,i,null,n)}}var Jt=null;function Gt(e,t,n,i){if(Jt=null,null!==(e=_s(e=we(i))))if(null===(t=He(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=We(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Jt=e,null}function Yt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Qe()){case Ze:return 1;case et:return 4;case tt:case nt:return 16;case it:return 536870912;default:return 16}default:return 16}}var Xt=null,Qt=null,Zt=null;function en(){if(Zt)return Zt;var e,t,n=Qt,i=n.length,s="value"in Xt?Xt.value:Xt.textContent,r=s.length;for(e=0;e<i&&n[e]===s[e];e++);var o=i-e;for(t=1;t<=o&&n[i-t]===s[r-t];t++);return Zt=s.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function sn(){return!1}function rn(e){function t(t,n,i,s,r){for(var o in this._reactName=t,this._targetInst=i,this.type=n,this.nativeEvent=s,this.target=r,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(s):s[o]);return this.isDefaultPrevented=(null!=s.defaultPrevented?s.defaultPrevented:!1===s.returnValue)?nn:sn,this.isPropagationStopped=sn,this}return z(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var on,an,ln,cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},dn=rn(cn),un=z({},cn,{view:0,detail:0}),hn=rn(un),pn=z({},un,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:kn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ln&&(ln&&"mousemove"===e.type?(on=e.screenX-ln.screenX,an=e.screenY-ln.screenY):an=on=0,ln=e),on)},movementY:function(e){return"movementY"in e?e.movementY:an}}),mn=rn(pn),fn=rn(z({},pn,{dataTransfer:0})),gn=rn(z({},un,{relatedTarget:0})),vn=rn(z({},cn,{animationName:0,elapsedTime:0,pseudoElement:0})),_n=z({},cn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),bn=rn(_n),yn=rn(z({},cn,{data:0})),wn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Sn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Sn[e])&&!!t[e]}function kn(){return Cn}var En=z({},un,{key:function(e){if(e.key){var t=wn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?xn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:kn,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Mn=rn(En),Pn=rn(z({},pn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),In=rn(z({},un,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:kn})),Ln=rn(z({},cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),On=z({},pn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),An=rn(On),Dn=[9,13,27,32],Tn=d&&"CompositionEvent"in window,Rn=null;d&&"documentMode"in document&&(Rn=document.documentMode);var jn=d&&"TextEvent"in window&&!Rn,zn=d&&(!Tn||Rn&&8<Rn&&11>=Rn),Nn=String.fromCharCode(32),Bn=!1;function Fn(e,t){switch(e){case"keyup":return-1!==Dn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Un(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Hn=!1,Wn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function $n(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Wn[e.type]:"textarea"===t}function qn(e,t,n,i){Ee(i),0<(t=Vi(t,"onChange")).length&&(n=new dn("onChange","change",null,n,i),e.push({event:n,listeners:t}))}var Vn=null,Kn=null;function Jn(e){Ni(e,0)}function Gn(e){if(K(ys(e)))return e}function Yn(e,t){if("change"===e)return t}var Xn=!1;if(d){var Qn;if(d){var Zn="oninput"in document;if(!Zn){var ei=document.createElement("div");ei.setAttribute("oninput","return;"),Zn="function"==typeof ei.oninput}Qn=Zn}else Qn=!1;Xn=Qn&&(!document.documentMode||9<document.documentMode)}function ti(){Vn&&(Vn.detachEvent("onpropertychange",ni),Kn=Vn=null)}function ni(e){if("value"===e.propertyName&&Gn(Kn)){var t=[];qn(t,Kn,e,we(e)),Oe(Jn,t)}}function ii(e,t,n){"focusin"===e?(ti(),Kn=n,(Vn=t).attachEvent("onpropertychange",ni)):"focusout"===e&&ti()}function si(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Gn(Kn)}function ri(e,t){if("click"===e)return Gn(t)}function oi(e,t){if("input"===e||"change"===e)return Gn(t)}var ai="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function li(e,t){if(ai(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++){var s=n[i];if(!u.call(t,s)||!ai(e[s],t[s]))return!1}return!0}function ci(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function di(e,t){var n,i=ci(e);for(e=0;i;){if(3===i.nodeType){if(n=e+i.textContent.length,e<=t&&n>=t)return{node:i,offset:t-e};e=n}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=ci(i)}}function ui(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?ui(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function hi(){for(var e=window,t=J();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=J((e=t.contentWindow).document)}return t}function pi(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function mi(e){var t=hi(),n=e.focusedElem,i=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ui(n.ownerDocument.documentElement,n)){if(null!==i&&pi(n))if(t=i.start,void 0===(e=i.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var s=n.textContent.length,r=Math.min(i.start,s);i=void 0===i.end?r:Math.min(i.end,s),!e.extend&&r>i&&(s=i,i=r,r=s),s=di(n,r);var o=di(n,i);s&&o&&(1!==e.rangeCount||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&((t=t.createRange()).setStart(s.node,s.offset),e.removeAllRanges(),r>i?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var fi=d&&"documentMode"in document&&11>=document.documentMode,gi=null,vi=null,_i=null,bi=!1;function yi(e,t,n){var i=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;bi||null==gi||gi!==J(i)||(i="selectionStart"in(i=gi)&&pi(i)?{start:i.selectionStart,end:i.selectionEnd}:{anchorNode:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset},_i&&li(_i,i)||(_i=i,0<(i=Vi(vi,"onSelect")).length&&(t=new dn("onSelect","select",null,t,n),e.push({event:t,listeners:i}),t.target=gi)))}function wi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var xi={animationend:wi("Animation","AnimationEnd"),animationiteration:wi("Animation","AnimationIteration"),animationstart:wi("Animation","AnimationStart"),transitionend:wi("Transition","TransitionEnd")},Si={},Ci={};function ki(e){if(Si[e])return Si[e];if(!xi[e])return e;var t,n=xi[e];for(t in n)if(n.hasOwnProperty(t)&&t in Ci)return Si[e]=n[t];return e}d&&(Ci=document.createElement("div").style,"AnimationEvent"in window||(delete xi.animationend.animation,delete xi.animationiteration.animation,delete xi.animationstart.animation),"TransitionEvent"in window||delete xi.transitionend.transition);var Ei=ki("animationend"),Mi=ki("animationiteration"),Pi=ki("animationstart"),Ii=ki("transitionend"),Li=new Map,Oi="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ai(e,t){Li.set(e,t),l(t,[e])}for(var Di=0;Di<Oi.length;Di++){var Ti=Oi[Di];Ai(Ti.toLowerCase(),"on"+(Ti[0].toUpperCase()+Ti.slice(1)))}Ai(Ei,"onAnimationEnd"),Ai(Mi,"onAnimationIteration"),Ai(Pi,"onAnimationStart"),Ai("dblclick","onDoubleClick"),Ai("focusin","onFocus"),Ai("focusout","onBlur"),Ai(Ii,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ri="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),ji=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ri));function zi(e,t,n){var i=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,i,s,o,a,l,c){if(Ue.apply(this,arguments),je){if(!je)throw Error(r(198));var d=ze;je=!1,ze=null,Ne||(Ne=!0,Be=d)}}(i,t,void 0,e),e.currentTarget=null}function Ni(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var i=e[n],s=i.event;i=i.listeners;e:{var r=void 0;if(t)for(var o=i.length-1;0<=o;o--){var a=i[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==r&&s.isPropagationStopped())break e;zi(s,a,c),r=l}else for(o=0;o<i.length;o++){if(l=(a=i[o]).instance,c=a.currentTarget,a=a.listener,l!==r&&s.isPropagationStopped())break e;zi(s,a,c),r=l}}}if(Ne)throw e=Be,Ne=!1,Be=null,e}function Bi(e,t){var n=t[fs];void 0===n&&(n=t[fs]=new Set);var i=e+"__bubble";n.has(i)||(Wi(t,e,2,!1),n.add(i))}function Fi(e,t,n){var i=0;t&&(i|=4),Wi(n,e,i,t)}var Ui="_reactListening"+Math.random().toString(36).slice(2);function Hi(e){if(!e[Ui]){e[Ui]=!0,o.forEach(function(t){"selectionchange"!==t&&(ji.has(t)||Fi(t,!1,e),Fi(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Ui]||(t[Ui]=!0,Fi("selectionchange",!1,t))}}function Wi(e,t,n,i){switch(Yt(t)){case 1:var s=qt;break;case 4:s=Vt;break;default:s=Kt}n=s.bind(null,t,n,e),s=void 0,!De||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(s=!0),i?void 0!==s?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):void 0!==s?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function $i(e,t,n,i,s){var r=i;if(!(1&t||2&t||null===i))e:for(;;){if(null===i)return;var o=i.tag;if(3===o||4===o){var a=i.stateNode.containerInfo;if(a===s||8===a.nodeType&&a.parentNode===s)break;if(4===o)for(o=i.return;null!==o;){var l=o.tag;if((3===l||4===l)&&((l=o.stateNode.containerInfo)===s||8===l.nodeType&&l.parentNode===s))return;o=o.return}for(;null!==a;){if(null===(o=_s(a)))return;if(5===(l=o.tag)||6===l){i=r=o;continue e}a=a.parentNode}}i=i.return}Oe(function(){var i=r,s=we(n),o=[];e:{var a=Li.get(e);if(void 0!==a){var l=dn,c=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":l=Mn;break;case"focusin":c="focus",l=gn;break;case"focusout":c="blur",l=gn;break;case"beforeblur":case"afterblur":l=gn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=mn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=fn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=In;break;case Ei:case Mi:case Pi:l=vn;break;case Ii:l=Ln;break;case"scroll":l=hn;break;case"wheel":l=An;break;case"copy":case"cut":case"paste":l=bn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Pn}var d=!!(4&t),u=!d&&"scroll"===e,h=d?null!==a?a+"Capture":null:a;d=[];for(var p,m=i;null!==m;){var f=(p=m).stateNode;if(5===p.tag&&null!==f&&(p=f,null!==h&&null!=(f=Ae(m,h))&&d.push(qi(m,f,p))),u)break;m=m.return}0<d.length&&(a=new l(a,c,null,n,s),o.push({event:a,listeners:d}))}}if(!(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(a="mouseover"===e||"pointerover"===e)||n===ye||!(c=n.relatedTarget||n.fromElement)||!_s(c)&&!c[ms])&&(l||a)&&(a=s.window===s?s:(a=s.ownerDocument)?a.defaultView||a.parentWindow:window,l?(l=i,null!==(c=(c=n.relatedTarget||n.toElement)?_s(c):null)&&(c!==(u=He(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=i),l!==c)){if(d=mn,f="onMouseLeave",h="onMouseEnter",m="mouse","pointerout"!==e&&"pointerover"!==e||(d=Pn,f="onPointerLeave",h="onPointerEnter",m="pointer"),u=null==l?a:ys(l),p=null==c?a:ys(c),(a=new d(f,m+"leave",l,n,s)).target=u,a.relatedTarget=p,f=null,_s(s)===i&&((d=new d(h,m+"enter",c,n,s)).target=p,d.relatedTarget=u,f=d),u=f,l&&c)e:{for(h=c,m=0,p=d=l;p;p=Ki(p))m++;for(p=0,f=h;f;f=Ki(f))p++;for(;0<m-p;)d=Ki(d),m--;for(;0<p-m;)h=Ki(h),p--;for(;m--;){if(d===h||null!==h&&d===h.alternate)break e;d=Ki(d),h=Ki(h)}d=null}else d=null;null!==l&&Ji(o,a,l,d,!1),null!==c&&null!==u&&Ji(o,u,c,d,!0)}if("select"===(l=(a=i?ys(i):window).nodeName&&a.nodeName.toLowerCase())||"input"===l&&"file"===a.type)var g=Yn;else if($n(a))if(Xn)g=oi;else{g=si;var v=ii}else(l=a.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===a.type||"radio"===a.type)&&(g=ri);switch(g&&(g=g(e,i))?qn(o,g,n,s):(v&&v(e,a,i),"focusout"===e&&(v=a._wrapperState)&&v.controlled&&"number"===a.type&&ee(a,"number",a.value)),v=i?ys(i):window,e){case"focusin":($n(v)||"true"===v.contentEditable)&&(gi=v,vi=i,_i=null);break;case"focusout":_i=vi=gi=null;break;case"mousedown":bi=!0;break;case"contextmenu":case"mouseup":case"dragend":bi=!1,yi(o,n,s);break;case"selectionchange":if(fi)break;case"keydown":case"keyup":yi(o,n,s)}var _;if(Tn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Hn?Fn(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(zn&&"ko"!==n.locale&&(Hn||"onCompositionStart"!==b?"onCompositionEnd"===b&&Hn&&(_=en()):(Qt="value"in(Xt=s)?Xt.value:Xt.textContent,Hn=!0)),0<(v=Vi(i,b)).length&&(b=new yn(b,e,null,n,s),o.push({event:b,listeners:v}),(_||null!==(_=Un(n)))&&(b.data=_))),(_=jn?function(e,t){switch(e){case"compositionend":return Un(t);case"keypress":return 32!==t.which?null:(Bn=!0,Nn);case"textInput":return(e=t.data)===Nn&&Bn?null:e;default:return null}}(e,n):function(e,t){if(Hn)return"compositionend"===e||!Tn&&Fn(e,t)?(e=en(),Zt=Qt=Xt=null,Hn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return zn&&"ko"!==t.locale?null:t.data}}(e,n))&&0<(i=Vi(i,"onBeforeInput")).length&&(s=new yn("onBeforeInput","beforeinput",null,n,s),o.push({event:s,listeners:i}),s.data=_)}Ni(o,t)})}function qi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Vi(e,t){for(var n=t+"Capture",i=[];null!==e;){var s=e,r=s.stateNode;5===s.tag&&null!==r&&(s=r,null!=(r=Ae(e,n))&&i.unshift(qi(e,r,s)),null!=(r=Ae(e,t))&&i.push(qi(e,r,s))),e=e.return}return i}function Ki(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Ji(e,t,n,i,s){for(var r=t._reactName,o=[];null!==n&&n!==i;){var a=n,l=a.alternate,c=a.stateNode;if(null!==l&&l===i)break;5===a.tag&&null!==c&&(a=c,s?null!=(l=Ae(n,r))&&o.unshift(qi(n,l,a)):s||null!=(l=Ae(n,r))&&o.push(qi(n,l,a))),n=n.return}0!==o.length&&e.push({event:t,listeners:o})}var Gi=/\r\n?/g,Yi=/\u0000|\uFFFD/g;function Xi(e){return("string"==typeof e?e:""+e).replace(Gi,"\n").replace(Yi,"")}function Qi(e,t,n){if(t=Xi(t),Xi(e)!==t&&n)throw Error(r(425))}function Zi(){}var es=null,ts=null;function ns(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var is="function"==typeof setTimeout?setTimeout:void 0,ss="function"==typeof clearTimeout?clearTimeout:void 0,rs="function"==typeof Promise?Promise:void 0,os="function"==typeof queueMicrotask?queueMicrotask:void 0!==rs?function(e){return rs.resolve(null).then(e).catch(as)}:is;function as(e){setTimeout(function(){throw e})}function ls(e,t){var n=t,i=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&8===s.nodeType)if("/$"===(n=s.data)){if(0===i)return e.removeChild(s),void Ht(t);i--}else"$"!==n&&"$?"!==n&&"$!"!==n||i++;n=s}while(n);Ht(t)}function cs(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function ds(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var us=Math.random().toString(36).slice(2),hs="__reactFiber$"+us,ps="__reactProps$"+us,ms="__reactContainer$"+us,fs="__reactEvents$"+us,gs="__reactListeners$"+us,vs="__reactHandles$"+us;function _s(e){var t=e[hs];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ms]||n[hs]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ds(e);null!==e;){if(n=e[hs])return n;e=ds(e)}return t}n=(e=n).parentNode}return null}function bs(e){return!(e=e[hs]||e[ms])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function ys(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(r(33))}function ws(e){return e[ps]||null}var xs=[],Ss=-1;function Cs(e){return{current:e}}function ks(e){0>Ss||(e.current=xs[Ss],xs[Ss]=null,Ss--)}function Es(e,t){Ss++,xs[Ss]=e.current,e.current=t}var Ms={},Ps=Cs(Ms),Is=Cs(!1),Ls=Ms;function Os(e,t){var n=e.type.contextTypes;if(!n)return Ms;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var s,r={};for(s in n)r[s]=t[s];return i&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=r),r}function As(e){return null!=e.childContextTypes}function Ds(){ks(Is),ks(Ps)}function Ts(e,t,n){if(Ps.current!==Ms)throw Error(r(168));Es(Ps,t),Es(Is,n)}function Rs(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,"function"!=typeof i.getChildContext)return n;for(var s in i=i.getChildContext())if(!(s in t))throw Error(r(108,W(e)||"Unknown",s));return z({},n,i)}function js(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ms,Ls=Ps.current,Es(Ps,e),Es(Is,Is.current),!0}function zs(e,t,n){var i=e.stateNode;if(!i)throw Error(r(169));n?(e=Rs(e,t,Ls),i.__reactInternalMemoizedMergedChildContext=e,ks(Is),ks(Ps),Es(Ps,e)):ks(Is),Es(Is,n)}var Ns=null,Bs=!1,Fs=!1;function Us(e){null===Ns?Ns=[e]:Ns.push(e)}function Hs(){if(!Fs&&null!==Ns){Fs=!0;var e=0,t=bt;try{var n=Ns;for(bt=1;e<n.length;e++){var i=n[e];do{i=i(!0)}while(null!==i)}Ns=null,Bs=!1}catch(t){throw null!==Ns&&(Ns=Ns.slice(e+1)),Ke(Ze,Hs),t}finally{bt=t,Fs=!1}}return null}var Ws=[],$s=0,qs=null,Vs=0,Ks=[],Js=0,Gs=null,Ys=1,Xs="";function Qs(e,t){Ws[$s++]=Vs,Ws[$s++]=qs,qs=e,Vs=t}function Zs(e,t,n){Ks[Js++]=Ys,Ks[Js++]=Xs,Ks[Js++]=Gs,Gs=e;var i=Ys;e=Xs;var s=32-ot(i)-1;i&=~(1<<s),n+=1;var r=32-ot(t)+s;if(30<r){var o=s-s%5;r=(i&(1<<o)-1).toString(32),i>>=o,s-=o,Ys=1<<32-ot(t)+s|n<<s|i,Xs=r+e}else Ys=1<<r|n<<s|i,Xs=e}function er(e){null!==e.return&&(Qs(e,1),Zs(e,1,0))}function tr(e){for(;e===qs;)qs=Ws[--$s],Ws[$s]=null,Vs=Ws[--$s],Ws[$s]=null;for(;e===Gs;)Gs=Ks[--Js],Ks[Js]=null,Xs=Ks[--Js],Ks[Js]=null,Ys=Ks[--Js],Ks[Js]=null}var nr=null,ir=null,sr=!1,rr=null;function or(e,t){var n=Oc(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function ar(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,nr=e,ir=cs(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,nr=e,ir=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Gs?{id:Ys,overflow:Xs}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Oc(18,null,null,0)).stateNode=t,n.return=e,e.child=n,nr=e,ir=null,!0);default:return!1}}function lr(e){return!(!(1&e.mode)||128&e.flags)}function cr(e){if(sr){var t=ir;if(t){var n=t;if(!ar(e,t)){if(lr(e))throw Error(r(418));t=cs(n.nextSibling);var i=nr;t&&ar(e,t)?or(i,n):(e.flags=-4097&e.flags|2,sr=!1,nr=e)}}else{if(lr(e))throw Error(r(418));e.flags=-4097&e.flags|2,sr=!1,nr=e}}}function dr(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;nr=e}function ur(e){if(e!==nr)return!1;if(!sr)return dr(e),sr=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ns(e.type,e.memoizedProps)),t&&(t=ir)){if(lr(e))throw hr(),Error(r(418));for(;t;)or(e,t),t=cs(t.nextSibling)}if(dr(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(r(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){ir=cs(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}ir=null}}else ir=nr?cs(e.stateNode.nextSibling):null;return!0}function hr(){for(var e=ir;e;)e=cs(e.nextSibling)}function pr(){ir=nr=null,sr=!1}function mr(e){null===rr?rr=[e]:rr.push(e)}var fr=y.ReactCurrentBatchConfig;function gr(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(r(309));var i=n.stateNode}if(!i)throw Error(r(147,e));var s=i,o=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=s.refs;null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}if("string"!=typeof e)throw Error(r(284));if(!n._owner)throw Error(r(290,e))}return e}function vr(e,t){throw e=Object.prototype.toString.call(t),Error(r(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function _r(e){return(0,e._init)(e._payload)}function br(e){function t(t,n){if(e){var i=t.deletions;null===i?(t.deletions=[n],t.flags|=16):i.push(n)}}function n(n,i){if(!e)return null;for(;null!==i;)t(n,i),i=i.sibling;return null}function i(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function s(e,t){return(e=Dc(e,t)).index=0,e.sibling=null,e}function o(t,n,i){return t.index=i,e?null!==(i=t.alternate)?(i=i.index)<n?(t.flags|=2,n):i:(t.flags|=2,n):(t.flags|=1048576,n)}function a(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,i){return null===t||6!==t.tag?((t=zc(n,e.mode,i)).return=e,t):((t=s(t,n)).return=e,t)}function c(e,t,n,i){var r=n.type;return r===S?u(e,t,n.props.children,i,n.key):null!==t&&(t.elementType===r||"object"==typeof r&&null!==r&&r.$$typeof===A&&_r(r)===t.type)?((i=s(t,n.props)).ref=gr(e,t,n),i.return=e,i):((i=Tc(n.type,n.key,n.props,null,e.mode,i)).ref=gr(e,t,n),i.return=e,i)}function d(e,t,n,i){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Nc(n,e.mode,i)).return=e,t):((t=s(t,n.children||[])).return=e,t)}function u(e,t,n,i,r){return null===t||7!==t.tag?((t=Rc(n,e.mode,i,r)).return=e,t):((t=s(t,n)).return=e,t)}function h(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=zc(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case w:return(n=Tc(t.type,t.key,t.props,null,e.mode,n)).ref=gr(e,null,t),n.return=e,n;case x:return(t=Nc(t,e.mode,n)).return=e,t;case A:return h(e,(0,t._init)(t._payload),n)}if(te(t)||R(t))return(t=Rc(t,e.mode,n,null)).return=e,t;vr(e,t)}return null}function p(e,t,n,i){var s=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==s?null:l(e,t,""+n,i);if("object"==typeof n&&null!==n){switch(n.$$typeof){case w:return n.key===s?c(e,t,n,i):null;case x:return n.key===s?d(e,t,n,i):null;case A:return p(e,t,(s=n._init)(n._payload),i)}if(te(n)||R(n))return null!==s?null:u(e,t,n,i,null);vr(e,n)}return null}function m(e,t,n,i,s){if("string"==typeof i&&""!==i||"number"==typeof i)return l(t,e=e.get(n)||null,""+i,s);if("object"==typeof i&&null!==i){switch(i.$$typeof){case w:return c(t,e=e.get(null===i.key?n:i.key)||null,i,s);case x:return d(t,e=e.get(null===i.key?n:i.key)||null,i,s);case A:return m(e,t,n,(0,i._init)(i._payload),s)}if(te(i)||R(i))return u(t,e=e.get(n)||null,i,s,null);vr(t,i)}return null}function f(s,r,a,l){for(var c=null,d=null,u=r,f=r=0,g=null;null!==u&&f<a.length;f++){u.index>f?(g=u,u=null):g=u.sibling;var v=p(s,u,a[f],l);if(null===v){null===u&&(u=g);break}e&&u&&null===v.alternate&&t(s,u),r=o(v,r,f),null===d?c=v:d.sibling=v,d=v,u=g}if(f===a.length)return n(s,u),sr&&Qs(s,f),c;if(null===u){for(;f<a.length;f++)null!==(u=h(s,a[f],l))&&(r=o(u,r,f),null===d?c=u:d.sibling=u,d=u);return sr&&Qs(s,f),c}for(u=i(s,u);f<a.length;f++)null!==(g=m(u,s,f,a[f],l))&&(e&&null!==g.alternate&&u.delete(null===g.key?f:g.key),r=o(g,r,f),null===d?c=g:d.sibling=g,d=g);return e&&u.forEach(function(e){return t(s,e)}),sr&&Qs(s,f),c}function g(s,a,l,c){var d=R(l);if("function"!=typeof d)throw Error(r(150));if(null==(l=d.call(l)))throw Error(r(151));for(var u=d=null,f=a,g=a=0,v=null,_=l.next();null!==f&&!_.done;g++,_=l.next()){f.index>g?(v=f,f=null):v=f.sibling;var b=p(s,f,_.value,c);if(null===b){null===f&&(f=v);break}e&&f&&null===b.alternate&&t(s,f),a=o(b,a,g),null===u?d=b:u.sibling=b,u=b,f=v}if(_.done)return n(s,f),sr&&Qs(s,g),d;if(null===f){for(;!_.done;g++,_=l.next())null!==(_=h(s,_.value,c))&&(a=o(_,a,g),null===u?d=_:u.sibling=_,u=_);return sr&&Qs(s,g),d}for(f=i(s,f);!_.done;g++,_=l.next())null!==(_=m(f,s,g,_.value,c))&&(e&&null!==_.alternate&&f.delete(null===_.key?g:_.key),a=o(_,a,g),null===u?d=_:u.sibling=_,u=_);return e&&f.forEach(function(e){return t(s,e)}),sr&&Qs(s,g),d}return function e(i,r,o,l){if("object"==typeof o&&null!==o&&o.type===S&&null===o.key&&(o=o.props.children),"object"==typeof o&&null!==o){switch(o.$$typeof){case w:e:{for(var c=o.key,d=r;null!==d;){if(d.key===c){if((c=o.type)===S){if(7===d.tag){n(i,d.sibling),(r=s(d,o.props.children)).return=i,i=r;break e}}else if(d.elementType===c||"object"==typeof c&&null!==c&&c.$$typeof===A&&_r(c)===d.type){n(i,d.sibling),(r=s(d,o.props)).ref=gr(i,d,o),r.return=i,i=r;break e}n(i,d);break}t(i,d),d=d.sibling}o.type===S?((r=Rc(o.props.children,i.mode,l,o.key)).return=i,i=r):((l=Tc(o.type,o.key,o.props,null,i.mode,l)).ref=gr(i,r,o),l.return=i,i=l)}return a(i);case x:e:{for(d=o.key;null!==r;){if(r.key===d){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(i,r.sibling),(r=s(r,o.children||[])).return=i,i=r;break e}n(i,r);break}t(i,r),r=r.sibling}(r=Nc(o,i.mode,l)).return=i,i=r}return a(i);case A:return e(i,r,(d=o._init)(o._payload),l)}if(te(o))return f(i,r,o,l);if(R(o))return g(i,r,o,l);vr(i,o)}return"string"==typeof o&&""!==o||"number"==typeof o?(o=""+o,null!==r&&6===r.tag?(n(i,r.sibling),(r=s(r,o)).return=i,i=r):(n(i,r),(r=zc(o,i.mode,l)).return=i,i=r),a(i)):n(i,r)}}var yr=br(!0),wr=br(!1),xr=Cs(null),Sr=null,Cr=null,kr=null;function Er(){kr=Cr=Sr=null}function Mr(e){var t=xr.current;ks(xr),e._currentValue=t}function Pr(e,t,n){for(;null!==e;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==i&&(i.childLanes|=t)):null!==i&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===n)break;e=e.return}}function Ir(e,t){Sr=e,kr=Cr=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(ba=!0),e.firstContext=null)}function Lr(e){var t=e._currentValue;if(kr!==e)if(e={context:e,memoizedValue:t,next:null},null===Cr){if(null===Sr)throw Error(r(308));Cr=e,Sr.dependencies={lanes:0,firstContext:e}}else Cr=Cr.next=e;return t}var Or=null;function Ar(e){null===Or?Or=[e]:Or.push(e)}function Dr(e,t,n,i){var s=t.interleaved;return null===s?(n.next=n,Ar(t)):(n.next=s.next,s.next=n),t.interleaved=n,Tr(e,i)}function Tr(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Rr=!1;function jr(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function zr(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Nr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Br(e,t,n){var i=e.updateQueue;if(null===i)return null;if(i=i.shared,2&Pl){var s=i.pending;return null===s?t.next=t:(t.next=s.next,s.next=t),i.pending=t,Tr(e,n)}return null===(s=i.interleaved)?(t.next=t,Ar(i)):(t.next=s.next,s.next=t),i.interleaved=t,Tr(e,n)}function Fr(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var i=t.lanes;n|=i&=e.pendingLanes,t.lanes=n,_t(e,n)}}function Ur(e,t){var n=e.updateQueue,i=e.alternate;if(null!==i&&n===(i=i.updateQueue)){var s=null,r=null;if(null!==(n=n.firstBaseUpdate)){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===r?s=r=o:r=r.next=o,n=n.next}while(null!==n);null===r?s=r=t:r=r.next=t}else s=r=t;return n={baseState:i.baseState,firstBaseUpdate:s,lastBaseUpdate:r,shared:i.shared,effects:i.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Hr(e,t,n,i){var s=e.updateQueue;Rr=!1;var r=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(null!==a){s.shared.pending=null;var l=a,c=l.next;l.next=null,null===o?r=c:o.next=c,o=l;var d=e.alternate;null!==d&&(a=(d=d.updateQueue).lastBaseUpdate)!==o&&(null===a?d.firstBaseUpdate=c:a.next=c,d.lastBaseUpdate=l)}if(null!==r){var u=s.baseState;for(o=0,d=c=l=null,a=r;;){var h=a.lane,p=a.eventTime;if((i&h)===h){null!==d&&(d=d.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var m=e,f=a;switch(h=t,p=n,f.tag){case 1:if("function"==typeof(m=f.payload)){u=m.call(p,u,h);break e}u=m;break e;case 3:m.flags=-65537&m.flags|128;case 0:if(null==(h="function"==typeof(m=f.payload)?m.call(p,u,h):m))break e;u=z({},u,h);break e;case 2:Rr=!0}}null!==a.callback&&0!==a.lane&&(e.flags|=64,null===(h=s.effects)?s.effects=[a]:h.push(a))}else p={eventTime:p,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===d?(c=d=p,l=u):d=d.next=p,o|=h;if(null===(a=a.next)){if(null===(a=s.shared.pending))break;a=(h=a).next,h.next=null,s.lastBaseUpdate=h,s.shared.pending=null}}if(null===d&&(l=u),s.baseState=l,s.firstBaseUpdate=c,s.lastBaseUpdate=d,null!==(t=s.shared.interleaved)){s=t;do{o|=s.lane,s=s.next}while(s!==t)}else null===r&&(s.shared.lanes=0);jl|=o,e.lanes=o,e.memoizedState=u}}function Wr(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var i=e[t],s=i.callback;if(null!==s){if(i.callback=null,i=n,"function"!=typeof s)throw Error(r(191,s));s.call(i)}}}var $r={},qr=Cs($r),Vr=Cs($r),Kr=Cs($r);function Jr(e){if(e===$r)throw Error(r(174));return e}function Gr(e,t){switch(Es(Kr,t),Es(Vr,e),Es(qr,$r),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:le(null,"");break;default:t=le(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}ks(qr),Es(qr,t)}function Yr(){ks(qr),ks(Vr),ks(Kr)}function Xr(e){Jr(Kr.current);var t=Jr(qr.current),n=le(t,e.type);t!==n&&(Es(Vr,e),Es(qr,n))}function Qr(e){Vr.current===e&&(ks(qr),ks(Vr))}var Zr=Cs(0);function eo(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var to=[];function no(){for(var e=0;e<to.length;e++)to[e]._workInProgressVersionPrimary=null;to.length=0}var io=y.ReactCurrentDispatcher,so=y.ReactCurrentBatchConfig,ro=0,oo=null,ao=null,lo=null,co=!1,uo=!1,ho=0,po=0;function mo(){throw Error(r(321))}function fo(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ai(e[n],t[n]))return!1;return!0}function go(e,t,n,i,s,o){if(ro=o,oo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,io.current=null===e||null===e.memoizedState?Zo:ea,e=n(i,s),uo){o=0;do{if(uo=!1,ho=0,25<=o)throw Error(r(301));o+=1,lo=ao=null,t.updateQueue=null,io.current=ta,e=n(i,s)}while(uo)}if(io.current=Qo,t=null!==ao&&null!==ao.next,ro=0,lo=ao=oo=null,co=!1,t)throw Error(r(300));return e}function vo(){var e=0!==ho;return ho=0,e}function _o(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===lo?oo.memoizedState=lo=e:lo=lo.next=e,lo}function bo(){if(null===ao){var e=oo.alternate;e=null!==e?e.memoizedState:null}else e=ao.next;var t=null===lo?oo.memoizedState:lo.next;if(null!==t)lo=t,ao=e;else{if(null===e)throw Error(r(310));e={memoizedState:(ao=e).memoizedState,baseState:ao.baseState,baseQueue:ao.baseQueue,queue:ao.queue,next:null},null===lo?oo.memoizedState=lo=e:lo=lo.next=e}return lo}function yo(e,t){return"function"==typeof t?t(e):t}function wo(e){var t=bo(),n=t.queue;if(null===n)throw Error(r(311));n.lastRenderedReducer=e;var i=ao,s=i.baseQueue,o=n.pending;if(null!==o){if(null!==s){var a=s.next;s.next=o.next,o.next=a}i.baseQueue=s=o,n.pending=null}if(null!==s){o=s.next,i=i.baseState;var l=a=null,c=null,d=o;do{var u=d.lane;if((ro&u)===u)null!==c&&(c=c.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),i=d.hasEagerState?d.eagerState:e(i,d.action);else{var h={lane:u,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};null===c?(l=c=h,a=i):c=c.next=h,oo.lanes|=u,jl|=u}d=d.next}while(null!==d&&d!==o);null===c?a=i:c.next=l,ai(i,t.memoizedState)||(ba=!0),t.memoizedState=i,t.baseState=a,t.baseQueue=c,n.lastRenderedState=i}if(null!==(e=n.interleaved)){s=e;do{o=s.lane,oo.lanes|=o,jl|=o,s=s.next}while(s!==e)}else null===s&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function xo(e){var t=bo(),n=t.queue;if(null===n)throw Error(r(311));n.lastRenderedReducer=e;var i=n.dispatch,s=n.pending,o=t.memoizedState;if(null!==s){n.pending=null;var a=s=s.next;do{o=e(o,a.action),a=a.next}while(a!==s);ai(o,t.memoizedState)||(ba=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,i]}function So(){}function Co(e,t){var n=oo,i=bo(),s=t(),o=!ai(i.memoizedState,s);if(o&&(i.memoizedState=s,ba=!0),i=i.queue,jo(Mo.bind(null,n,i,e),[e]),i.getSnapshot!==t||o||null!==lo&&1&lo.memoizedState.tag){if(n.flags|=2048,Oo(9,Eo.bind(null,n,i,s,t),void 0,null),null===Il)throw Error(r(349));30&ro||ko(n,t,s)}return s}function ko(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=oo.updateQueue)?(t={lastEffect:null,stores:null},oo.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Eo(e,t,n,i){t.value=n,t.getSnapshot=i,Po(t)&&Io(e)}function Mo(e,t,n){return n(function(){Po(t)&&Io(e)})}function Po(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ai(e,n)}catch(e){return!0}}function Io(e){var t=Tr(e,1);null!==t&&nc(t,e,1,-1)}function Lo(e){var t=_o();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:yo,lastRenderedState:e},t.queue=e,e=e.dispatch=Jo.bind(null,oo,e),[t.memoizedState,e]}function Oo(e,t,n,i){return e={tag:e,create:t,destroy:n,deps:i,next:null},null===(t=oo.updateQueue)?(t={lastEffect:null,stores:null},oo.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(i=n.next,n.next=e,e.next=i,t.lastEffect=e),e}function Ao(){return bo().memoizedState}function Do(e,t,n,i){var s=_o();oo.flags|=e,s.memoizedState=Oo(1|t,n,void 0,void 0===i?null:i)}function To(e,t,n,i){var s=bo();i=void 0===i?null:i;var r=void 0;if(null!==ao){var o=ao.memoizedState;if(r=o.destroy,null!==i&&fo(i,o.deps))return void(s.memoizedState=Oo(t,n,r,i))}oo.flags|=e,s.memoizedState=Oo(1|t,n,r,i)}function Ro(e,t){return Do(8390656,8,e,t)}function jo(e,t){return To(2048,8,e,t)}function zo(e,t){return To(4,2,e,t)}function No(e,t){return To(4,4,e,t)}function Bo(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Fo(e,t,n){return n=null!=n?n.concat([e]):null,To(4,4,Bo.bind(null,t,e),n)}function Uo(){}function Ho(e,t){var n=bo();t=void 0===t?null:t;var i=n.memoizedState;return null!==i&&null!==t&&fo(t,i[1])?i[0]:(n.memoizedState=[e,t],e)}function Wo(e,t){var n=bo();t=void 0===t?null:t;var i=n.memoizedState;return null!==i&&null!==t&&fo(t,i[1])?i[0]:(e=e(),n.memoizedState=[e,t],e)}function $o(e,t,n){return 21&ro?(ai(n,t)||(n=ft(),oo.lanes|=n,jl|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ba=!0),e.memoizedState=n)}function qo(e,t){var n=bt;bt=0!==n&&4>n?n:4,e(!0);var i=so.transition;so.transition={};try{e(!1),t()}finally{bt=n,so.transition=i}}function Vo(){return bo().memoizedState}function Ko(e,t,n){var i=tc(e);n={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null},Go(e)?Yo(t,n):null!==(n=Dr(e,t,n,i))&&(nc(n,e,i,ec()),Xo(n,t,i))}function Jo(e,t,n){var i=tc(e),s={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(Go(e))Yo(t,s);else{var r=e.alternate;if(0===e.lanes&&(null===r||0===r.lanes)&&null!==(r=t.lastRenderedReducer))try{var o=t.lastRenderedState,a=r(o,n);if(s.hasEagerState=!0,s.eagerState=a,ai(a,o)){var l=t.interleaved;return null===l?(s.next=s,Ar(t)):(s.next=l.next,l.next=s),void(t.interleaved=s)}}catch(e){}null!==(n=Dr(e,t,s,i))&&(nc(n,e,i,s=ec()),Xo(n,t,i))}}function Go(e){var t=e.alternate;return e===oo||null!==t&&t===oo}function Yo(e,t){uo=co=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Xo(e,t,n){if(4194240&n){var i=t.lanes;n|=i&=e.pendingLanes,t.lanes=n,_t(e,n)}}var Qo={readContext:Lr,useCallback:mo,useContext:mo,useEffect:mo,useImperativeHandle:mo,useInsertionEffect:mo,useLayoutEffect:mo,useMemo:mo,useReducer:mo,useRef:mo,useState:mo,useDebugValue:mo,useDeferredValue:mo,useTransition:mo,useMutableSource:mo,useSyncExternalStore:mo,useId:mo,unstable_isNewReconciler:!1},Zo={readContext:Lr,useCallback:function(e,t){return _o().memoizedState=[e,void 0===t?null:t],e},useContext:Lr,useEffect:Ro,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Do(4194308,4,Bo.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Do(4194308,4,e,t)},useInsertionEffect:function(e,t){return Do(4,2,e,t)},useMemo:function(e,t){var n=_o();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var i=_o();return t=void 0!==n?n(t):t,i.memoizedState=i.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},i.queue=e,e=e.dispatch=Ko.bind(null,oo,e),[i.memoizedState,e]},useRef:function(e){return e={current:e},_o().memoizedState=e},useState:Lo,useDebugValue:Uo,useDeferredValue:function(e){return _o().memoizedState=e},useTransition:function(){var e=Lo(!1),t=e[0];return e=qo.bind(null,e[1]),_o().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=oo,s=_o();if(sr){if(void 0===n)throw Error(r(407));n=n()}else{if(n=t(),null===Il)throw Error(r(349));30&ro||ko(i,t,n)}s.memoizedState=n;var o={value:n,getSnapshot:t};return s.queue=o,Ro(Mo.bind(null,i,o,e),[e]),i.flags|=2048,Oo(9,Eo.bind(null,i,o,n,t),void 0,null),n},useId:function(){var e=_o(),t=Il.identifierPrefix;if(sr){var n=Xs;t=":"+t+"R"+(n=(Ys&~(1<<32-ot(Ys)-1)).toString(32)+n),0<(n=ho++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=po++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ea={readContext:Lr,useCallback:Ho,useContext:Lr,useEffect:jo,useImperativeHandle:Fo,useInsertionEffect:zo,useLayoutEffect:No,useMemo:Wo,useReducer:wo,useRef:Ao,useState:function(){return wo(yo)},useDebugValue:Uo,useDeferredValue:function(e){return $o(bo(),ao.memoizedState,e)},useTransition:function(){return[wo(yo)[0],bo().memoizedState]},useMutableSource:So,useSyncExternalStore:Co,useId:Vo,unstable_isNewReconciler:!1},ta={readContext:Lr,useCallback:Ho,useContext:Lr,useEffect:jo,useImperativeHandle:Fo,useInsertionEffect:zo,useLayoutEffect:No,useMemo:Wo,useReducer:xo,useRef:Ao,useState:function(){return xo(yo)},useDebugValue:Uo,useDeferredValue:function(e){var t=bo();return null===ao?t.memoizedState=e:$o(t,ao.memoizedState,e)},useTransition:function(){return[xo(yo)[0],bo().memoizedState]},useMutableSource:So,useSyncExternalStore:Co,useId:Vo,unstable_isNewReconciler:!1};function na(e,t){if(e&&e.defaultProps){for(var n in t=z({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function ia(e,t,n,i){n=null==(n=n(i,t=e.memoizedState))?t:z({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var sa={isMounted:function(e){return!!(e=e._reactInternals)&&He(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var i=ec(),s=tc(e),r=Nr(i,s);r.payload=t,null!=n&&(r.callback=n),null!==(t=Br(e,r,s))&&(nc(t,e,s,i),Fr(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var i=ec(),s=tc(e),r=Nr(i,s);r.tag=1,r.payload=t,null!=n&&(r.callback=n),null!==(t=Br(e,r,s))&&(nc(t,e,s,i),Fr(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ec(),i=tc(e),s=Nr(n,i);s.tag=2,null!=t&&(s.callback=t),null!==(t=Br(e,s,i))&&(nc(t,e,i,n),Fr(t,e,i))}};function ra(e,t,n,i,s,r,o){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(i,r,o):!(t.prototype&&t.prototype.isPureReactComponent&&li(n,i)&&li(s,r))}function oa(e,t,n){var i=!1,s=Ms,r=t.contextType;return"object"==typeof r&&null!==r?r=Lr(r):(s=As(t)?Ls:Ps.current,r=(i=null!=(i=t.contextTypes))?Os(e,s):Ms),t=new t(n,r),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=sa,e.stateNode=t,t._reactInternals=e,i&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=r),t}function aa(e,t,n,i){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,i),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,i),t.state!==e&&sa.enqueueReplaceState(t,t.state,null)}function la(e,t,n,i){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},jr(e);var r=t.contextType;"object"==typeof r&&null!==r?s.context=Lr(r):(r=As(t)?Ls:Ps.current,s.context=Os(e,r)),s.state=e.memoizedState,"function"==typeof(r=t.getDerivedStateFromProps)&&(ia(e,t,r,n),s.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof s.getSnapshotBeforeUpdate||"function"!=typeof s.UNSAFE_componentWillMount&&"function"!=typeof s.componentWillMount||(t=s.state,"function"==typeof s.componentWillMount&&s.componentWillMount(),"function"==typeof s.UNSAFE_componentWillMount&&s.UNSAFE_componentWillMount(),t!==s.state&&sa.enqueueReplaceState(s,s.state,null),Hr(e,n,s,i),s.state=e.memoizedState),"function"==typeof s.componentDidMount&&(e.flags|=4194308)}function ca(e,t){try{var n="",i=t;do{n+=U(i),i=i.return}while(i);var s=n}catch(e){s="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:s,digest:null}}function da(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function ua(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}var ha="function"==typeof WeakMap?WeakMap:Map;function pa(e,t,n){(n=Nr(-1,n)).tag=3,n.payload={element:null};var i=t.value;return n.callback=function(){$l||($l=!0,ql=i),ua(0,t)},n}function ma(e,t,n){(n=Nr(-1,n)).tag=3;var i=e.type.getDerivedStateFromError;if("function"==typeof i){var s=t.value;n.payload=function(){return i(s)},n.callback=function(){ua(0,t)}}var r=e.stateNode;return null!==r&&"function"==typeof r.componentDidCatch&&(n.callback=function(){ua(0,t),"function"!=typeof i&&(null===Vl?Vl=new Set([this]):Vl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function fa(e,t,n){var i=e.pingCache;if(null===i){i=e.pingCache=new ha;var s=new Set;i.set(t,s)}else void 0===(s=i.get(t))&&(s=new Set,i.set(t,s));s.has(n)||(s.add(n),e=kc.bind(null,e,t,n),t.then(e,e))}function ga(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function va(e,t,n,i,s){return 1&e.mode?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Nr(-1,1)).tag=2,Br(n,t,1))),n.lanes|=1),e)}var _a=y.ReactCurrentOwner,ba=!1;function ya(e,t,n,i){t.child=null===e?wr(t,null,n,i):yr(t,e.child,n,i)}function wa(e,t,n,i,s){n=n.render;var r=t.ref;return Ir(t,s),i=go(e,t,n,i,r,s),n=vo(),null===e||ba?(sr&&n&&er(t),t.flags|=1,ya(e,t,i,s),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,$a(e,t,s))}function xa(e,t,n,i,s){if(null===e){var r=n.type;return"function"!=typeof r||Ac(r)||void 0!==r.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Tc(n.type,null,i,t,t.mode,s)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=r,Sa(e,t,r,i,s))}if(r=e.child,0===(e.lanes&s)){var o=r.memoizedProps;if((n=null!==(n=n.compare)?n:li)(o,i)&&e.ref===t.ref)return $a(e,t,s)}return t.flags|=1,(e=Dc(r,i)).ref=t.ref,e.return=t,t.child=e}function Sa(e,t,n,i,s){if(null!==e){var r=e.memoizedProps;if(li(r,i)&&e.ref===t.ref){if(ba=!1,t.pendingProps=i=r,0===(e.lanes&s))return t.lanes=e.lanes,$a(e,t,s);131072&e.flags&&(ba=!0)}}return Ea(e,t,n,i,s)}function Ca(e,t,n){var i=t.pendingProps,s=i.children,r=null!==e?e.memoizedState:null;if("hidden"===i.mode)if(1&t.mode){if(!(1073741824&n))return e=null!==r?r.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Es(Dl,Al),Al|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=null!==r?r.baseLanes:n,Es(Dl,Al),Al|=i}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Es(Dl,Al),Al|=n;else null!==r?(i=r.baseLanes|n,t.memoizedState=null):i=n,Es(Dl,Al),Al|=i;return ya(e,t,s,n),t.child}function ka(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ea(e,t,n,i,s){var r=As(n)?Ls:Ps.current;return r=Os(t,r),Ir(t,s),n=go(e,t,n,i,r,s),i=vo(),null===e||ba?(sr&&i&&er(t),t.flags|=1,ya(e,t,n,s),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,$a(e,t,s))}function Ma(e,t,n,i,s){if(As(n)){var r=!0;js(t)}else r=!1;if(Ir(t,s),null===t.stateNode)Wa(e,t),oa(t,n,i),la(t,n,i,s),i=!0;else if(null===e){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,c=n.contextType;c="object"==typeof c&&null!==c?Lr(c):Os(t,c=As(n)?Ls:Ps.current);var d=n.getDerivedStateFromProps,u="function"==typeof d||"function"==typeof o.getSnapshotBeforeUpdate;u||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(a!==i||l!==c)&&aa(t,o,i,c),Rr=!1;var h=t.memoizedState;o.state=h,Hr(t,i,o,s),l=t.memoizedState,a!==i||h!==l||Is.current||Rr?("function"==typeof d&&(ia(t,n,d,i),l=t.memoizedState),(a=Rr||ra(t,n,a,i,h,l,c))?(u||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||("function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"==typeof o.componentDidMount&&(t.flags|=4194308)):("function"==typeof o.componentDidMount&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=l),o.props=i,o.state=l,o.context=c,i=a):("function"==typeof o.componentDidMount&&(t.flags|=4194308),i=!1)}else{o=t.stateNode,zr(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:na(t.type,a),o.props=c,u=t.pendingProps,h=o.context,l="object"==typeof(l=n.contextType)&&null!==l?Lr(l):Os(t,l=As(n)?Ls:Ps.current);var p=n.getDerivedStateFromProps;(d="function"==typeof p||"function"==typeof o.getSnapshotBeforeUpdate)||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(a!==u||h!==l)&&aa(t,o,i,l),Rr=!1,h=t.memoizedState,o.state=h,Hr(t,i,o,s);var m=t.memoizedState;a!==u||h!==m||Is.current||Rr?("function"==typeof p&&(ia(t,n,p,i),m=t.memoizedState),(c=Rr||ra(t,n,c,i,h,m,l)||!1)?(d||"function"!=typeof o.UNSAFE_componentWillUpdate&&"function"!=typeof o.componentWillUpdate||("function"==typeof o.componentWillUpdate&&o.componentWillUpdate(i,m,l),"function"==typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(i,m,l)),"function"==typeof o.componentDidUpdate&&(t.flags|=4),"function"==typeof o.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof o.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=m),o.props=i,o.state=m,o.context=l,i=c):("function"!=typeof o.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),i=!1)}return Pa(e,t,n,i,r,s)}function Pa(e,t,n,i,s,r){ka(e,t);var o=!!(128&t.flags);if(!i&&!o)return s&&zs(t,n,!1),$a(e,t,r);i=t.stateNode,_a.current=t;var a=o&&"function"!=typeof n.getDerivedStateFromError?null:i.render();return t.flags|=1,null!==e&&o?(t.child=yr(t,e.child,null,r),t.child=yr(t,null,a,r)):ya(e,t,a,r),t.memoizedState=i.state,s&&zs(t,n,!0),t.child}function Ia(e){var t=e.stateNode;t.pendingContext?Ts(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Ts(0,t.context,!1),Gr(e,t.containerInfo)}function La(e,t,n,i,s){return pr(),mr(s),t.flags|=256,ya(e,t,n,i),t.child}var Oa,Aa,Da,Ta,Ra={dehydrated:null,treeContext:null,retryLane:0};function ja(e){return{baseLanes:e,cachePool:null,transitions:null}}function za(e,t,n){var i,s=t.pendingProps,o=Zr.current,a=!1,l=!!(128&t.flags);if((i=l)||(i=(null===e||null!==e.memoizedState)&&!!(2&o)),i?(a=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(o|=1),Es(Zr,1&o),null===e)return cr(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=s.children,e=s.fallback,a?(s=t.mode,a=t.child,l={mode:"hidden",children:l},1&s||null===a?a=jc(l,s,0,null):(a.childLanes=0,a.pendingProps=l),e=Rc(e,s,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=ja(n),t.memoizedState=Ra,e):Na(t,l));if(null!==(o=e.memoizedState)&&null!==(i=o.dehydrated))return function(e,t,n,i,s,o,a){if(n)return 256&t.flags?(t.flags&=-257,Ba(e,t,a,i=da(Error(r(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(o=i.fallback,s=t.mode,i=jc({mode:"visible",children:i.children},s,0,null),(o=Rc(o,s,a,null)).flags|=2,i.return=t,o.return=t,i.sibling=o,t.child=i,1&t.mode&&yr(t,e.child,null,a),t.child.memoizedState=ja(a),t.memoizedState=Ra,o);if(!(1&t.mode))return Ba(e,t,a,null);if("$!"===s.data){if(i=s.nextSibling&&s.nextSibling.dataset)var l=i.dgst;return i=l,Ba(e,t,a,i=da(o=Error(r(419)),i,void 0))}if(l=0!==(a&e.childLanes),ba||l){if(null!==(i=Il)){switch(a&-a){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}0!==(s=0!==(s&(i.suspendedLanes|a))?0:s)&&s!==o.retryLane&&(o.retryLane=s,Tr(e,s),nc(i,e,s,-1))}return fc(),Ba(e,t,a,i=da(Error(r(421))))}return"$?"===s.data?(t.flags|=128,t.child=e.child,t=Mc.bind(null,e),s._reactRetry=t,null):(e=o.treeContext,ir=cs(s.nextSibling),nr=t,sr=!0,rr=null,null!==e&&(Ks[Js++]=Ys,Ks[Js++]=Xs,Ks[Js++]=Gs,Ys=e.id,Xs=e.overflow,Gs=t),(t=Na(t,i.children)).flags|=4096,t)}(e,t,l,s,i,o,n);if(a){a=s.fallback,l=t.mode,i=(o=e.child).sibling;var c={mode:"hidden",children:s.children};return 1&l||t.child===o?(s=Dc(o,c)).subtreeFlags=14680064&o.subtreeFlags:((s=t.child).childLanes=0,s.pendingProps=c,t.deletions=null),null!==i?a=Dc(i,a):(a=Rc(a,l,n,null)).flags|=2,a.return=t,s.return=t,s.sibling=a,t.child=s,s=a,a=t.child,l=null===(l=e.child.memoizedState)?ja(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},a.memoizedState=l,a.childLanes=e.childLanes&~n,t.memoizedState=Ra,s}return e=(a=e.child).sibling,s=Dc(a,{mode:"visible",children:s.children}),!(1&t.mode)&&(s.lanes=n),s.return=t,s.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=s,t.memoizedState=null,s}function Na(e,t){return(t=jc({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Ba(e,t,n,i){return null!==i&&mr(i),yr(t,e.child,null,n),(e=Na(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Fa(e,t,n){e.lanes|=t;var i=e.alternate;null!==i&&(i.lanes|=t),Pr(e.return,t,n)}function Ua(e,t,n,i,s){var r=e.memoizedState;null===r?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:s}:(r.isBackwards=t,r.rendering=null,r.renderingStartTime=0,r.last=i,r.tail=n,r.tailMode=s)}function Ha(e,t,n){var i=t.pendingProps,s=i.revealOrder,r=i.tail;if(ya(e,t,i.children,n),2&(i=Zr.current))i=1&i|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Fa(e,n,t);else if(19===e.tag)Fa(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}i&=1}if(Es(Zr,i),1&t.mode)switch(s){case"forwards":for(n=t.child,s=null;null!==n;)null!==(e=n.alternate)&&null===eo(e)&&(s=n),n=n.sibling;null===(n=s)?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Ua(t,!1,s,n,r);break;case"backwards":for(n=null,s=t.child,t.child=null;null!==s;){if(null!==(e=s.alternate)&&null===eo(e)){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Ua(t,!0,n,null,r);break;case"together":Ua(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function Wa(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function $a(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),jl|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(r(153));if(null!==t.child){for(n=Dc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Dc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function qa(e,t){if(!sr)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var i=null;null!==n;)null!==n.alternate&&(i=n),n=n.sibling;null===i?t||null===e.tail?e.tail=null:e.tail.sibling=null:i.sibling=null}}function Va(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,i=0;if(t)for(var s=e.child;null!==s;)n|=s.lanes|s.childLanes,i|=14680064&s.subtreeFlags,i|=14680064&s.flags,s.return=e,s=s.sibling;else for(s=e.child;null!==s;)n|=s.lanes|s.childLanes,i|=s.subtreeFlags,i|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=i,e.childLanes=n,t}function Ka(e,t,n){var i=t.pendingProps;switch(tr(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Va(t),null;case 1:case 17:return As(t.type)&&Ds(),Va(t),null;case 3:return i=t.stateNode,Yr(),ks(Is),ks(Ps),no(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),null!==e&&null!==e.child||(ur(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==rr&&(oc(rr),rr=null))),Aa(e,t),Va(t),null;case 5:Qr(t);var s=Jr(Kr.current);if(n=t.type,null!==e&&null!=t.stateNode)Da(e,t,n,i,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(null===t.stateNode)throw Error(r(166));return Va(t),null}if(e=Jr(qr.current),ur(t)){i=t.stateNode,n=t.type;var o=t.memoizedProps;switch(i[hs]=t,i[ps]=o,e=!!(1&t.mode),n){case"dialog":Bi("cancel",i),Bi("close",i);break;case"iframe":case"object":case"embed":Bi("load",i);break;case"video":case"audio":for(s=0;s<Ri.length;s++)Bi(Ri[s],i);break;case"source":Bi("error",i);break;case"img":case"image":case"link":Bi("error",i),Bi("load",i);break;case"details":Bi("toggle",i);break;case"input":Y(i,o),Bi("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!o.multiple},Bi("invalid",i);break;case"textarea":se(i,o),Bi("invalid",i)}for(var l in _e(n,o),s=null,o)if(o.hasOwnProperty(l)){var c=o[l];"children"===l?"string"==typeof c?i.textContent!==c&&(!0!==o.suppressHydrationWarning&&Qi(i.textContent,c,e),s=["children",c]):"number"==typeof c&&i.textContent!==""+c&&(!0!==o.suppressHydrationWarning&&Qi(i.textContent,c,e),s=["children",""+c]):a.hasOwnProperty(l)&&null!=c&&"onScroll"===l&&Bi("scroll",i)}switch(n){case"input":V(i),Z(i,o,!0);break;case"textarea":V(i),oe(i);break;case"select":case"option":break;default:"function"==typeof o.onClick&&(i.onclick=Zi)}i=s,t.updateQueue=i,null!==i&&(t.flags|=4)}else{l=9===s.nodeType?s:s.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=ae(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof i.is?e=l.createElement(n,{is:i.is}):(e=l.createElement(n),"select"===n&&(l=e,i.multiple?l.multiple=!0:i.size&&(l.size=i.size))):e=l.createElementNS(e,n),e[hs]=t,e[ps]=i,Oa(e,t,!1,!1),t.stateNode=e;e:{switch(l=be(n,i),n){case"dialog":Bi("cancel",e),Bi("close",e),s=i;break;case"iframe":case"object":case"embed":Bi("load",e),s=i;break;case"video":case"audio":for(s=0;s<Ri.length;s++)Bi(Ri[s],e);s=i;break;case"source":Bi("error",e),s=i;break;case"img":case"image":case"link":Bi("error",e),Bi("load",e),s=i;break;case"details":Bi("toggle",e),s=i;break;case"input":Y(e,i),s=G(e,i),Bi("invalid",e);break;case"option":default:s=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},s=z({},i,{value:void 0}),Bi("invalid",e);break;case"textarea":se(e,i),s=ie(e,i),Bi("invalid",e)}for(o in _e(n,s),c=s)if(c.hasOwnProperty(o)){var d=c[o];"style"===o?ge(e,d):"dangerouslySetInnerHTML"===o?null!=(d=d?d.__html:void 0)&&ue(e,d):"children"===o?"string"==typeof d?("textarea"!==n||""!==d)&&he(e,d):"number"==typeof d&&he(e,""+d):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(a.hasOwnProperty(o)?null!=d&&"onScroll"===o&&Bi("scroll",e):null!=d&&b(e,o,d,l))}switch(n){case"input":V(e),Z(e,i,!1);break;case"textarea":V(e),oe(e);break;case"option":null!=i.value&&e.setAttribute("value",""+$(i.value));break;case"select":e.multiple=!!i.multiple,null!=(o=i.value)?ne(e,!!i.multiple,o,!1):null!=i.defaultValue&&ne(e,!!i.multiple,i.defaultValue,!0);break;default:"function"==typeof s.onClick&&(e.onclick=Zi)}switch(n){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}}i&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Va(t),null;case 6:if(e&&null!=t.stateNode)Ta(e,t,e.memoizedProps,i);else{if("string"!=typeof i&&null===t.stateNode)throw Error(r(166));if(n=Jr(Kr.current),Jr(qr.current),ur(t)){if(i=t.stateNode,n=t.memoizedProps,i[hs]=t,(o=i.nodeValue!==n)&&null!==(e=nr))switch(e.tag){case 3:Qi(i.nodeValue,n,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Qi(i.nodeValue,n,!!(1&e.mode))}o&&(t.flags|=4)}else(i=(9===n.nodeType?n:n.ownerDocument).createTextNode(i))[hs]=t,t.stateNode=i}return Va(t),null;case 13:if(ks(Zr),i=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(sr&&null!==ir&&1&t.mode&&!(128&t.flags))hr(),pr(),t.flags|=98560,o=!1;else if(o=ur(t),null!==i&&null!==i.dehydrated){if(null===e){if(!o)throw Error(r(318));if(!(o=null!==(o=t.memoizedState)?o.dehydrated:null))throw Error(r(317));o[hs]=t}else pr(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Va(t),o=!1}else null!==rr&&(oc(rr),rr=null),o=!0;if(!o)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=n,t):((i=null!==i)!=(null!==e&&null!==e.memoizedState)&&i&&(t.child.flags|=8192,1&t.mode&&(null===e||1&Zr.current?0===Tl&&(Tl=3):fc())),null!==t.updateQueue&&(t.flags|=4),Va(t),null);case 4:return Yr(),Aa(e,t),null===e&&Hi(t.stateNode.containerInfo),Va(t),null;case 10:return Mr(t.type._context),Va(t),null;case 19:if(ks(Zr),null===(o=t.memoizedState))return Va(t),null;if(i=!!(128&t.flags),null===(l=o.rendering))if(i)qa(o,!1);else{if(0!==Tl||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(l=eo(e))){for(t.flags|=128,qa(o,!1),null!==(i=l.updateQueue)&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=n,n=t.child;null!==n;)e=i,(o=n).flags&=14680066,null===(l=o.alternate)?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=l.childLanes,o.lanes=l.lanes,o.child=l.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=l.memoizedProps,o.memoizedState=l.memoizedState,o.updateQueue=l.updateQueue,o.type=l.type,e=l.dependencies,o.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Es(Zr,1&Zr.current|2),t.child}e=e.sibling}null!==o.tail&&Xe()>Hl&&(t.flags|=128,i=!0,qa(o,!1),t.lanes=4194304)}else{if(!i)if(null!==(e=eo(l))){if(t.flags|=128,i=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),qa(o,!0),null===o.tail&&"hidden"===o.tailMode&&!l.alternate&&!sr)return Va(t),null}else 2*Xe()-o.renderingStartTime>Hl&&1073741824!==n&&(t.flags|=128,i=!0,qa(o,!1),t.lanes=4194304);o.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=o.last)?n.sibling=l:t.child=l,o.last=l)}return null!==o.tail?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Xe(),t.sibling=null,n=Zr.current,Es(Zr,i?1&n|2:1&n),t):(Va(t),null);case 22:case 23:return uc(),i=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==i&&(t.flags|=8192),i&&1&t.mode?!!(1073741824&Al)&&(Va(t),6&t.subtreeFlags&&(t.flags|=8192)):Va(t),null;case 24:case 25:return null}throw Error(r(156,t.tag))}function Ja(e,t){switch(tr(t),t.tag){case 1:return As(t.type)&&Ds(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Yr(),ks(Is),ks(Ps),no(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Qr(t),null;case 13:if(ks(Zr),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(r(340));pr()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return ks(Zr),null;case 4:return Yr(),null;case 10:return Mr(t.type._context),null;case 22:case 23:return uc(),null;default:return null}}Oa=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Aa=function(){},Da=function(e,t,n,i){var s=e.memoizedProps;if(s!==i){e=t.stateNode,Jr(qr.current);var r,o=null;switch(n){case"input":s=G(e,s),i=G(e,i),o=[];break;case"select":s=z({},s,{value:void 0}),i=z({},i,{value:void 0}),o=[];break;case"textarea":s=ie(e,s),i=ie(e,i),o=[];break;default:"function"!=typeof s.onClick&&"function"==typeof i.onClick&&(e.onclick=Zi)}for(d in _e(n,i),n=null,s)if(!i.hasOwnProperty(d)&&s.hasOwnProperty(d)&&null!=s[d])if("style"===d){var l=s[d];for(r in l)l.hasOwnProperty(r)&&(n||(n={}),n[r]="")}else"dangerouslySetInnerHTML"!==d&&"children"!==d&&"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&"autoFocus"!==d&&(a.hasOwnProperty(d)?o||(o=[]):(o=o||[]).push(d,null));for(d in i){var c=i[d];if(l=null!=s?s[d]:void 0,i.hasOwnProperty(d)&&c!==l&&(null!=c||null!=l))if("style"===d)if(l){for(r in l)!l.hasOwnProperty(r)||c&&c.hasOwnProperty(r)||(n||(n={}),n[r]="");for(r in c)c.hasOwnProperty(r)&&l[r]!==c[r]&&(n||(n={}),n[r]=c[r])}else n||(o||(o=[]),o.push(d,n)),n=c;else"dangerouslySetInnerHTML"===d?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(o=o||[]).push(d,c)):"children"===d?"string"!=typeof c&&"number"!=typeof c||(o=o||[]).push(d,""+c):"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&(a.hasOwnProperty(d)?(null!=c&&"onScroll"===d&&Bi("scroll",e),o||l===c||(o=[])):(o=o||[]).push(d,c))}n&&(o=o||[]).push("style",n);var d=o;(t.updateQueue=d)&&(t.flags|=4)}},Ta=function(e,t,n,i){n!==i&&(t.flags|=4)};var Ga=!1,Ya=!1,Xa="function"==typeof WeakSet?WeakSet:Set,Qa=null;function Za(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){Cc(e,t,n)}else n.current=null}function el(e,t,n){try{n()}catch(n){Cc(e,t,n)}}var tl=!1;function nl(e,t,n){var i=t.updateQueue;if(null!==(i=null!==i?i.lastEffect:null)){var s=i=i.next;do{if((s.tag&e)===e){var r=s.destroy;s.destroy=void 0,void 0!==r&&el(t,n,r)}s=s.next}while(s!==i)}}function il(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var i=n.create;n.destroy=i()}n=n.next}while(n!==t)}}function sl(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function rl(e){var t=e.alternate;null!==t&&(e.alternate=null,rl(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(t=e.stateNode)&&(delete t[hs],delete t[ps],delete t[fs],delete t[gs],delete t[vs]),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ol(e){return 5===e.tag||3===e.tag||4===e.tag}function al(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||ol(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function ll(e,t,n){var i=e.tag;if(5===i||6===i)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Zi));else if(4!==i&&null!==(e=e.child))for(ll(e,t,n),e=e.sibling;null!==e;)ll(e,t,n),e=e.sibling}function cl(e,t,n){var i=e.tag;if(5===i||6===i)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==i&&null!==(e=e.child))for(cl(e,t,n),e=e.sibling;null!==e;)cl(e,t,n),e=e.sibling}var dl=null,ul=!1;function hl(e,t,n){for(n=n.child;null!==n;)pl(e,t,n),n=n.sibling}function pl(e,t,n){if(rt&&"function"==typeof rt.onCommitFiberUnmount)try{rt.onCommitFiberUnmount(st,n)}catch(e){}switch(n.tag){case 5:Ya||Za(n,t);case 6:var i=dl,s=ul;dl=null,hl(e,t,n),ul=s,null!==(dl=i)&&(ul?(e=dl,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):dl.removeChild(n.stateNode));break;case 18:null!==dl&&(ul?(e=dl,n=n.stateNode,8===e.nodeType?ls(e.parentNode,n):1===e.nodeType&&ls(e,n),Ht(e)):ls(dl,n.stateNode));break;case 4:i=dl,s=ul,dl=n.stateNode.containerInfo,ul=!0,hl(e,t,n),dl=i,ul=s;break;case 0:case 11:case 14:case 15:if(!Ya&&null!==(i=n.updateQueue)&&null!==(i=i.lastEffect)){s=i=i.next;do{var r=s,o=r.destroy;r=r.tag,void 0!==o&&(2&r||4&r)&&el(n,t,o),s=s.next}while(s!==i)}hl(e,t,n);break;case 1:if(!Ya&&(Za(n,t),"function"==typeof(i=n.stateNode).componentWillUnmount))try{i.props=n.memoizedProps,i.state=n.memoizedState,i.componentWillUnmount()}catch(e){Cc(n,t,e)}hl(e,t,n);break;case 21:hl(e,t,n);break;case 22:1&n.mode?(Ya=(i=Ya)||null!==n.memoizedState,hl(e,t,n),Ya=i):hl(e,t,n);break;default:hl(e,t,n)}}function ml(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Xa),t.forEach(function(t){var i=Pc.bind(null,e,t);n.has(t)||(n.add(t),t.then(i,i))})}}function fl(e,t){var n=t.deletions;if(null!==n)for(var i=0;i<n.length;i++){var s=n[i];try{var o=e,a=t,l=a;e:for(;null!==l;){switch(l.tag){case 5:dl=l.stateNode,ul=!1;break e;case 3:case 4:dl=l.stateNode.containerInfo,ul=!0;break e}l=l.return}if(null===dl)throw Error(r(160));pl(o,a,s),dl=null,ul=!1;var c=s.alternate;null!==c&&(c.return=null),s.return=null}catch(e){Cc(s,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)gl(t,e),t=t.sibling}function gl(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(fl(t,e),vl(e),4&i){try{nl(3,e,e.return),il(3,e)}catch(t){Cc(e,e.return,t)}try{nl(5,e,e.return)}catch(t){Cc(e,e.return,t)}}break;case 1:fl(t,e),vl(e),512&i&&null!==n&&Za(n,n.return);break;case 5:if(fl(t,e),vl(e),512&i&&null!==n&&Za(n,n.return),32&e.flags){var s=e.stateNode;try{he(s,"")}catch(t){Cc(e,e.return,t)}}if(4&i&&null!=(s=e.stateNode)){var o=e.memoizedProps,a=null!==n?n.memoizedProps:o,l=e.type,c=e.updateQueue;if(e.updateQueue=null,null!==c)try{"input"===l&&"radio"===o.type&&null!=o.name&&X(s,o),be(l,a);var d=be(l,o);for(a=0;a<c.length;a+=2){var u=c[a],h=c[a+1];"style"===u?ge(s,h):"dangerouslySetInnerHTML"===u?ue(s,h):"children"===u?he(s,h):b(s,u,h,d)}switch(l){case"input":Q(s,o);break;case"textarea":re(s,o);break;case"select":var p=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var m=o.value;null!=m?ne(s,!!o.multiple,m,!1):p!==!!o.multiple&&(null!=o.defaultValue?ne(s,!!o.multiple,o.defaultValue,!0):ne(s,!!o.multiple,o.multiple?[]:"",!1))}s[ps]=o}catch(t){Cc(e,e.return,t)}}break;case 6:if(fl(t,e),vl(e),4&i){if(null===e.stateNode)throw Error(r(162));s=e.stateNode,o=e.memoizedProps;try{s.nodeValue=o}catch(t){Cc(e,e.return,t)}}break;case 3:if(fl(t,e),vl(e),4&i&&null!==n&&n.memoizedState.isDehydrated)try{Ht(t.containerInfo)}catch(t){Cc(e,e.return,t)}break;case 4:default:fl(t,e),vl(e);break;case 13:fl(t,e),vl(e),8192&(s=e.child).flags&&(o=null!==s.memoizedState,s.stateNode.isHidden=o,!o||null!==s.alternate&&null!==s.alternate.memoizedState||(Ul=Xe())),4&i&&ml(e);break;case 22:if(u=null!==n&&null!==n.memoizedState,1&e.mode?(Ya=(d=Ya)||u,fl(t,e),Ya=d):fl(t,e),vl(e),8192&i){if(d=null!==e.memoizedState,(e.stateNode.isHidden=d)&&!u&&1&e.mode)for(Qa=e,u=e.child;null!==u;){for(h=Qa=u;null!==Qa;){switch(m=(p=Qa).child,p.tag){case 0:case 11:case 14:case 15:nl(4,p,p.return);break;case 1:Za(p,p.return);var f=p.stateNode;if("function"==typeof f.componentWillUnmount){i=p,n=p.return;try{t=i,f.props=t.memoizedProps,f.state=t.memoizedState,f.componentWillUnmount()}catch(e){Cc(i,n,e)}}break;case 5:Za(p,p.return);break;case 22:if(null!==p.memoizedState){wl(h);continue}}null!==m?(m.return=p,Qa=m):wl(h)}u=u.sibling}e:for(u=null,h=e;;){if(5===h.tag){if(null===u){u=h;try{s=h.stateNode,d?"function"==typeof(o=s.style).setProperty?o.setProperty("display","none","important"):o.display="none":(l=h.stateNode,a=null!=(c=h.memoizedProps.style)&&c.hasOwnProperty("display")?c.display:null,l.style.display=fe("display",a))}catch(t){Cc(e,e.return,t)}}}else if(6===h.tag){if(null===u)try{h.stateNode.nodeValue=d?"":h.memoizedProps}catch(t){Cc(e,e.return,t)}}else if((22!==h.tag&&23!==h.tag||null===h.memoizedState||h===e)&&null!==h.child){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;null===h.sibling;){if(null===h.return||h.return===e)break e;u===h&&(u=null),h=h.return}u===h&&(u=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:fl(t,e),vl(e),4&i&&ml(e);case 21:}}function vl(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(ol(n)){var i=n;break e}n=n.return}throw Error(r(160))}switch(i.tag){case 5:var s=i.stateNode;32&i.flags&&(he(s,""),i.flags&=-33),cl(e,al(e),s);break;case 3:case 4:var o=i.stateNode.containerInfo;ll(e,al(e),o);break;default:throw Error(r(161))}}catch(t){Cc(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function _l(e,t,n){Qa=e,bl(e,t,n)}function bl(e,t,n){for(var i=!!(1&e.mode);null!==Qa;){var s=Qa,r=s.child;if(22===s.tag&&i){var o=null!==s.memoizedState||Ga;if(!o){var a=s.alternate,l=null!==a&&null!==a.memoizedState||Ya;a=Ga;var c=Ya;if(Ga=o,(Ya=l)&&!c)for(Qa=s;null!==Qa;)l=(o=Qa).child,22===o.tag&&null!==o.memoizedState?xl(s):null!==l?(l.return=o,Qa=l):xl(s);for(;null!==r;)Qa=r,bl(r,t,n),r=r.sibling;Qa=s,Ga=a,Ya=c}yl(e)}else 8772&s.subtreeFlags&&null!==r?(r.return=s,Qa=r):yl(e)}}function yl(e){for(;null!==Qa;){var t=Qa;if(8772&t.flags){var n=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:Ya||il(5,t);break;case 1:var i=t.stateNode;if(4&t.flags&&!Ya)if(null===n)i.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:na(t.type,n.memoizedProps);i.componentDidUpdate(s,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;null!==o&&Wr(t,o,i);break;case 3:var a=t.updateQueue;if(null!==a){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Wr(t,a,n)}break;case 5:var l=t.stateNode;if(null===n&&4&t.flags){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var d=t.alternate;if(null!==d){var u=d.memoizedState;if(null!==u){var h=u.dehydrated;null!==h&&Ht(h)}}}break;default:throw Error(r(163))}Ya||512&t.flags&&sl(t)}catch(e){Cc(t,t.return,e)}}if(t===e){Qa=null;break}if(null!==(n=t.sibling)){n.return=t.return,Qa=n;break}Qa=t.return}}function wl(e){for(;null!==Qa;){var t=Qa;if(t===e){Qa=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Qa=n;break}Qa=t.return}}function xl(e){for(;null!==Qa;){var t=Qa;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{il(4,t)}catch(e){Cc(t,n,e)}break;case 1:var i=t.stateNode;if("function"==typeof i.componentDidMount){var s=t.return;try{i.componentDidMount()}catch(e){Cc(t,s,e)}}var r=t.return;try{sl(t)}catch(e){Cc(t,r,e)}break;case 5:var o=t.return;try{sl(t)}catch(e){Cc(t,o,e)}}}catch(e){Cc(t,t.return,e)}if(t===e){Qa=null;break}var a=t.sibling;if(null!==a){a.return=t.return,Qa=a;break}Qa=t.return}}var Sl,Cl=Math.ceil,kl=y.ReactCurrentDispatcher,El=y.ReactCurrentOwner,Ml=y.ReactCurrentBatchConfig,Pl=0,Il=null,Ll=null,Ol=0,Al=0,Dl=Cs(0),Tl=0,Rl=null,jl=0,zl=0,Nl=0,Bl=null,Fl=null,Ul=0,Hl=1/0,Wl=null,$l=!1,ql=null,Vl=null,Kl=!1,Jl=null,Gl=0,Yl=0,Xl=null,Ql=-1,Zl=0;function ec(){return 6&Pl?Xe():-1!==Ql?Ql:Ql=Xe()}function tc(e){return 1&e.mode?2&Pl&&0!==Ol?Ol&-Ol:null!==fr.transition?(0===Zl&&(Zl=ft()),Zl):0!==(e=bt)?e:e=void 0===(e=window.event)?16:Yt(e.type):1}function nc(e,t,n,i){if(50<Yl)throw Yl=0,Xl=null,Error(r(185));vt(e,n,i),2&Pl&&e===Il||(e===Il&&(!(2&Pl)&&(zl|=n),4===Tl&&ac(e,Ol)),ic(e,i),1===n&&0===Pl&&!(1&t.mode)&&(Hl=Xe()+500,Bs&&Hs()))}function ic(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,i=e.pingedLanes,s=e.expirationTimes,r=e.pendingLanes;0<r;){var o=31-ot(r),a=1<<o,l=s[o];-1===l?0!==(a&n)&&0===(a&i)||(s[o]=pt(a,t)):l<=t&&(e.expiredLanes|=a),r&=~a}}(e,t);var i=ht(e,e===Il?Ol:0);if(0===i)null!==n&&Je(n),e.callbackNode=null,e.callbackPriority=0;else if(t=i&-i,e.callbackPriority!==t){if(null!=n&&Je(n),1===t)0===e.tag?function(e){Bs=!0,Us(e)}(lc.bind(null,e)):Us(lc.bind(null,e)),os(function(){!(6&Pl)&&Hs()}),n=null;else{switch(yt(i)){case 1:n=Ze;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=it}n=Ic(n,sc.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function sc(e,t){if(Ql=-1,Zl=0,6&Pl)throw Error(r(327));var n=e.callbackNode;if(xc()&&e.callbackNode!==n)return null;var i=ht(e,e===Il?Ol:0);if(0===i)return null;if(30&i||0!==(i&e.expiredLanes)||t)t=gc(e,i);else{t=i;var s=Pl;Pl|=2;var o=mc();for(Il===e&&Ol===t||(Wl=null,Hl=Xe()+500,hc(e,t));;)try{_c();break}catch(t){pc(e,t)}Er(),kl.current=o,Pl=s,null!==Ll?t=0:(Il=null,Ol=0,t=Tl)}if(0!==t){if(2===t&&0!==(s=mt(e))&&(i=s,t=rc(e,s)),1===t)throw n=Rl,hc(e,0),ac(e,i),ic(e,Xe()),n;if(6===t)ac(e,i);else{if(s=e.current.alternate,!(30&i||function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var i=0;i<n.length;i++){var s=n[i],r=s.getSnapshot;s=s.value;try{if(!ai(r(),s))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(s)||(t=gc(e,i),2===t&&(o=mt(e),0!==o&&(i=o,t=rc(e,o))),1!==t)))throw n=Rl,hc(e,0),ac(e,i),ic(e,Xe()),n;switch(e.finishedWork=s,e.finishedLanes=i,t){case 0:case 1:throw Error(r(345));case 2:case 5:wc(e,Fl,Wl);break;case 3:if(ac(e,i),(130023424&i)===i&&10<(t=Ul+500-Xe())){if(0!==ht(e,0))break;if(((s=e.suspendedLanes)&i)!==i){ec(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=is(wc.bind(null,e,Fl,Wl),t);break}wc(e,Fl,Wl);break;case 4:if(ac(e,i),(4194240&i)===i)break;for(t=e.eventTimes,s=-1;0<i;){var a=31-ot(i);o=1<<a,(a=t[a])>s&&(s=a),i&=~o}if(i=s,10<(i=(120>(i=Xe()-i)?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Cl(i/1960))-i)){e.timeoutHandle=is(wc.bind(null,e,Fl,Wl),i);break}wc(e,Fl,Wl);break;default:throw Error(r(329))}}}return ic(e,Xe()),e.callbackNode===n?sc.bind(null,e):null}function rc(e,t){var n=Bl;return e.current.memoizedState.isDehydrated&&(hc(e,t).flags|=256),2!==(e=gc(e,t))&&(t=Fl,Fl=n,null!==t&&oc(t)),e}function oc(e){null===Fl?Fl=e:Fl.push.apply(Fl,e)}function ac(e,t){for(t&=~Nl,t&=~zl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-ot(t),i=1<<n;e[n]=-1,t&=~i}}function lc(e){if(6&Pl)throw Error(r(327));xc();var t=ht(e,0);if(!(1&t))return ic(e,Xe()),null;var n=gc(e,t);if(0!==e.tag&&2===n){var i=mt(e);0!==i&&(t=i,n=rc(e,i))}if(1===n)throw n=Rl,hc(e,0),ac(e,t),ic(e,Xe()),n;if(6===n)throw Error(r(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,wc(e,Fl,Wl),ic(e,Xe()),null}function cc(e,t){var n=Pl;Pl|=1;try{return e(t)}finally{0===(Pl=n)&&(Hl=Xe()+500,Bs&&Hs())}}function dc(e){null!==Jl&&0===Jl.tag&&!(6&Pl)&&xc();var t=Pl;Pl|=1;var n=Ml.transition,i=bt;try{if(Ml.transition=null,bt=1,e)return e()}finally{bt=i,Ml.transition=n,!(6&(Pl=t))&&Hs()}}function uc(){Al=Dl.current,ks(Dl)}function hc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ss(n)),null!==Ll)for(n=Ll.return;null!==n;){var i=n;switch(tr(i),i.tag){case 1:null!=(i=i.type.childContextTypes)&&Ds();break;case 3:Yr(),ks(Is),ks(Ps),no();break;case 5:Qr(i);break;case 4:Yr();break;case 13:case 19:ks(Zr);break;case 10:Mr(i.type._context);break;case 22:case 23:uc()}n=n.return}if(Il=e,Ll=e=Dc(e.current,null),Ol=Al=t,Tl=0,Rl=null,Nl=zl=jl=0,Fl=Bl=null,null!==Or){for(t=0;t<Or.length;t++)if(null!==(i=(n=Or[t]).interleaved)){n.interleaved=null;var s=i.next,r=n.pending;if(null!==r){var o=r.next;r.next=s,i.next=o}n.pending=i}Or=null}return e}function pc(e,t){for(;;){var n=Ll;try{if(Er(),io.current=Qo,co){for(var i=oo.memoizedState;null!==i;){var s=i.queue;null!==s&&(s.pending=null),i=i.next}co=!1}if(ro=0,lo=ao=oo=null,uo=!1,ho=0,El.current=null,null===n||null===n.return){Tl=1,Rl=t,Ll=null;break}e:{var o=e,a=n.return,l=n,c=t;if(t=Ol,l.flags|=32768,null!==c&&"object"==typeof c&&"function"==typeof c.then){var d=c,u=l,h=u.tag;if(!(1&u.mode||0!==h&&11!==h&&15!==h)){var p=u.alternate;p?(u.updateQueue=p.updateQueue,u.memoizedState=p.memoizedState,u.lanes=p.lanes):(u.updateQueue=null,u.memoizedState=null)}var m=ga(a);if(null!==m){m.flags&=-257,va(m,a,l,0,t),1&m.mode&&fa(o,d,t),c=d;var f=(t=m).updateQueue;if(null===f){var g=new Set;g.add(c),t.updateQueue=g}else f.add(c);break e}if(!(1&t)){fa(o,d,t),fc();break e}c=Error(r(426))}else if(sr&&1&l.mode){var v=ga(a);if(null!==v){!(65536&v.flags)&&(v.flags|=256),va(v,a,l,0,t),mr(ca(c,l));break e}}o=c=ca(c,l),4!==Tl&&(Tl=2),null===Bl?Bl=[o]:Bl.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t,Ur(o,pa(0,c,t));break e;case 1:l=c;var _=o.type,b=o.stateNode;if(!(128&o.flags||"function"!=typeof _.getDerivedStateFromError&&(null===b||"function"!=typeof b.componentDidCatch||null!==Vl&&Vl.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t,Ur(o,ma(o,l,t));break e}}o=o.return}while(null!==o)}yc(n)}catch(e){t=e,Ll===n&&null!==n&&(Ll=n=n.return);continue}break}}function mc(){var e=kl.current;return kl.current=Qo,null===e?Qo:e}function fc(){0!==Tl&&3!==Tl&&2!==Tl||(Tl=4),null===Il||!(268435455&jl)&&!(268435455&zl)||ac(Il,Ol)}function gc(e,t){var n=Pl;Pl|=2;var i=mc();for(Il===e&&Ol===t||(Wl=null,hc(e,t));;)try{vc();break}catch(t){pc(e,t)}if(Er(),Pl=n,kl.current=i,null!==Ll)throw Error(r(261));return Il=null,Ol=0,Tl}function vc(){for(;null!==Ll;)bc(Ll)}function _c(){for(;null!==Ll&&!Ge();)bc(Ll)}function bc(e){var t=Sl(e.alternate,e,Al);e.memoizedProps=e.pendingProps,null===t?yc(e):Ll=t,El.current=null}function yc(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=Ja(n,t)))return n.flags&=32767,void(Ll=n);if(null===e)return Tl=6,void(Ll=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=Ka(n,t,Al)))return void(Ll=n);if(null!==(t=t.sibling))return void(Ll=t);Ll=t=e}while(null!==t);0===Tl&&(Tl=5)}function wc(e,t,n){var i=bt,s=Ml.transition;try{Ml.transition=null,bt=1,function(e,t,n,i){do{xc()}while(null!==Jl);if(6&Pl)throw Error(r(327));n=e.finishedWork;var s=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(r(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var i=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-ot(n),r=1<<s;t[s]=0,i[s]=-1,e[s]=-1,n&=~r}}(e,o),e===Il&&(Ll=Il=null,Ol=0),!(2064&n.subtreeFlags)&&!(2064&n.flags)||Kl||(Kl=!0,Ic(tt,function(){return xc(),null})),o=!!(15990&n.flags),15990&n.subtreeFlags||o){o=Ml.transition,Ml.transition=null;var a=bt;bt=1;var l=Pl;Pl|=4,El.current=null,function(e,t){if(es=$t,pi(e=hi())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var i=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(i&&0!==i.rangeCount){n=i.anchorNode;var s=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{n.nodeType,o.nodeType}catch(e){n=null;break e}var a=0,l=-1,c=-1,d=0,u=0,h=e,p=null;t:for(;;){for(var m;h!==n||0!==s&&3!==h.nodeType||(l=a+s),h!==o||0!==i&&3!==h.nodeType||(c=a+i),3===h.nodeType&&(a+=h.nodeValue.length),null!==(m=h.firstChild);)p=h,h=m;for(;;){if(h===e)break t;if(p===n&&++d===s&&(l=a),p===o&&++u===i&&(c=a),null!==(m=h.nextSibling))break;p=(h=p).parentNode}h=m}n=-1===l||-1===c?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(ts={focusedElem:e,selectionRange:n},$t=!1,Qa=t;null!==Qa;)if(e=(t=Qa).child,1028&t.subtreeFlags&&null!==e)e.return=t,Qa=e;else for(;null!==Qa;){t=Qa;try{var f=t.alternate;if(1024&t.flags)switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==f){var g=f.memoizedProps,v=f.memoizedState,_=t.stateNode,b=_.getSnapshotBeforeUpdate(t.elementType===t.type?g:na(t.type,g),v);_.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var y=t.stateNode.containerInfo;1===y.nodeType?y.textContent="":9===y.nodeType&&y.documentElement&&y.removeChild(y.documentElement);break;default:throw Error(r(163))}}catch(e){Cc(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Qa=e;break}Qa=t.return}f=tl,tl=!1}(e,n),gl(n,e),mi(ts),$t=!!es,ts=es=null,e.current=n,_l(n,e,s),Ye(),Pl=l,bt=a,Ml.transition=o}else e.current=n;if(Kl&&(Kl=!1,Jl=e,Gl=s),0===(o=e.pendingLanes)&&(Vl=null),function(e){if(rt&&"function"==typeof rt.onCommitFiberRoot)try{rt.onCommitFiberRoot(st,e,void 0,!(128&~e.current.flags))}catch(e){}}(n.stateNode),ic(e,Xe()),null!==t)for(i=e.onRecoverableError,n=0;n<t.length;n++)i((s=t[n]).value,{componentStack:s.stack,digest:s.digest});if($l)throw $l=!1,e=ql,ql=null,e;!!(1&Gl)&&0!==e.tag&&xc(),1&(o=e.pendingLanes)?e===Xl?Yl++:(Yl=0,Xl=e):Yl=0,Hs()}(e,t,n,i)}finally{Ml.transition=s,bt=i}return null}function xc(){if(null!==Jl){var e=yt(Gl),t=Ml.transition,n=bt;try{if(Ml.transition=null,bt=16>e?16:e,null===Jl)var i=!1;else{if(e=Jl,Jl=null,Gl=0,6&Pl)throw Error(r(331));var s=Pl;for(Pl|=4,Qa=e.current;null!==Qa;){var o=Qa,a=o.child;if(16&Qa.flags){var l=o.deletions;if(null!==l){for(var c=0;c<l.length;c++){var d=l[c];for(Qa=d;null!==Qa;){var u=Qa;switch(u.tag){case 0:case 11:case 15:nl(8,u,o)}var h=u.child;if(null!==h)h.return=u,Qa=h;else for(;null!==Qa;){var p=(u=Qa).sibling,m=u.return;if(rl(u),u===d){Qa=null;break}if(null!==p){p.return=m,Qa=p;break}Qa=m}}}var f=o.alternate;if(null!==f){var g=f.child;if(null!==g){f.child=null;do{var v=g.sibling;g.sibling=null,g=v}while(null!==g)}}Qa=o}}if(2064&o.subtreeFlags&&null!==a)a.return=o,Qa=a;else e:for(;null!==Qa;){if(2048&(o=Qa).flags)switch(o.tag){case 0:case 11:case 15:nl(9,o,o.return)}var _=o.sibling;if(null!==_){_.return=o.return,Qa=_;break e}Qa=o.return}}var b=e.current;for(Qa=b;null!==Qa;){var y=(a=Qa).child;if(2064&a.subtreeFlags&&null!==y)y.return=a,Qa=y;else e:for(a=b;null!==Qa;){if(2048&(l=Qa).flags)try{switch(l.tag){case 0:case 11:case 15:il(9,l)}}catch(e){Cc(l,l.return,e)}if(l===a){Qa=null;break e}var w=l.sibling;if(null!==w){w.return=l.return,Qa=w;break e}Qa=l.return}}if(Pl=s,Hs(),rt&&"function"==typeof rt.onPostCommitFiberRoot)try{rt.onPostCommitFiberRoot(st,e)}catch(e){}i=!0}return i}finally{bt=n,Ml.transition=t}}return!1}function Sc(e,t,n){e=Br(e,t=pa(0,t=ca(n,t),1),1),t=ec(),null!==e&&(vt(e,1,t),ic(e,t))}function Cc(e,t,n){if(3===e.tag)Sc(e,e,n);else for(;null!==t;){if(3===t.tag){Sc(t,e,n);break}if(1===t.tag){var i=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof i.componentDidCatch&&(null===Vl||!Vl.has(i))){t=Br(t,e=ma(t,e=ca(n,e),1),1),e=ec(),null!==t&&(vt(t,1,e),ic(t,e));break}}t=t.return}}function kc(e,t,n){var i=e.pingCache;null!==i&&i.delete(t),t=ec(),e.pingedLanes|=e.suspendedLanes&n,Il===e&&(Ol&n)===n&&(4===Tl||3===Tl&&(130023424&Ol)===Ol&&500>Xe()-Ul?hc(e,0):Nl|=n),ic(e,t)}function Ec(e,t){0===t&&(1&e.mode?(t=dt,!(130023424&(dt<<=1))&&(dt=4194304)):t=1);var n=ec();null!==(e=Tr(e,t))&&(vt(e,t,n),ic(e,n))}function Mc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Ec(e,n)}function Pc(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,s=e.memoizedState;null!==s&&(n=s.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(r(314))}null!==i&&i.delete(t),Ec(e,n)}function Ic(e,t){return Ke(e,t)}function Lc(e,t,n,i){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Oc(e,t,n,i){return new Lc(e,t,n,i)}function Ac(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Dc(e,t){var n=e.alternate;return null===n?((n=Oc(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Tc(e,t,n,i,s,o){var a=2;if(i=e,"function"==typeof e)Ac(e)&&(a=1);else if("string"==typeof e)a=5;else e:switch(e){case S:return Rc(n.children,s,o,t);case C:a=8,s|=8;break;case k:return(e=Oc(12,n,t,2|s)).elementType=k,e.lanes=o,e;case I:return(e=Oc(13,n,t,s)).elementType=I,e.lanes=o,e;case L:return(e=Oc(19,n,t,s)).elementType=L,e.lanes=o,e;case D:return jc(n,s,o,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case E:a=10;break e;case M:a=9;break e;case P:a=11;break e;case O:a=14;break e;case A:a=16,i=null;break e}throw Error(r(130,null==e?e:typeof e,""))}return(t=Oc(a,n,t,s)).elementType=e,t.type=i,t.lanes=o,t}function Rc(e,t,n,i){return(e=Oc(7,e,i,t)).lanes=n,e}function jc(e,t,n,i){return(e=Oc(22,e,i,t)).elementType=D,e.lanes=n,e.stateNode={isHidden:!1},e}function zc(e,t,n){return(e=Oc(6,e,null,t)).lanes=n,e}function Nc(e,t,n){return(t=Oc(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Bc(e,t,n,i,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=gt(0),this.expirationTimes=gt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gt(0),this.identifierPrefix=i,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Fc(e,t,n,i,s,r,o,a,l){return e=new Bc(e,t,n,a,l),1===t?(t=1,!0===r&&(t|=8)):t=0,r=Oc(3,null,null,t),e.current=r,r.stateNode=e,r.memoizedState={element:i,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},jr(r),e}function Uc(e){if(!e)return Ms;e:{if(He(e=e._reactInternals)!==e||1!==e.tag)throw Error(r(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(As(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(r(171))}if(1===e.tag){var n=e.type;if(As(n))return Rs(e,n,t)}return t}function Hc(e,t,n,i,s,r,o,a,l){return(e=Fc(n,i,!0,e,0,r,0,a,l)).context=Uc(null),n=e.current,(r=Nr(i=ec(),s=tc(n))).callback=null!=t?t:null,Br(n,r,s),e.current.lanes=s,vt(e,s,i),ic(e,i),e}function Wc(e,t,n,i){var s=t.current,r=ec(),o=tc(s);return n=Uc(n),null===t.context?t.context=n:t.pendingContext=n,(t=Nr(r,o)).payload={element:e},null!==(i=void 0===i?null:i)&&(t.callback=i),null!==(e=Br(s,t,o))&&(nc(e,s,o,r),Fr(e,s,o)),o}function $c(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function qc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Vc(e,t){qc(e,t),(e=e.alternate)&&qc(e,t)}Sl=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Is.current)ba=!0;else{if(0===(e.lanes&n)&&!(128&t.flags))return ba=!1,function(e,t,n){switch(t.tag){case 3:Ia(t),pr();break;case 5:Xr(t);break;case 1:As(t.type)&&js(t);break;case 4:Gr(t,t.stateNode.containerInfo);break;case 10:var i=t.type._context,s=t.memoizedProps.value;Es(xr,i._currentValue),i._currentValue=s;break;case 13:if(null!==(i=t.memoizedState))return null!==i.dehydrated?(Es(Zr,1&Zr.current),t.flags|=128,null):0!==(n&t.child.childLanes)?za(e,t,n):(Es(Zr,1&Zr.current),null!==(e=$a(e,t,n))?e.sibling:null);Es(Zr,1&Zr.current);break;case 19:if(i=0!==(n&t.childLanes),128&e.flags){if(i)return Ha(e,t,n);t.flags|=128}if(null!==(s=t.memoizedState)&&(s.rendering=null,s.tail=null,s.lastEffect=null),Es(Zr,Zr.current),i)break;return null;case 22:case 23:return t.lanes=0,Ca(e,t,n)}return $a(e,t,n)}(e,t,n);ba=!!(131072&e.flags)}else ba=!1,sr&&1048576&t.flags&&Zs(t,Vs,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;Wa(e,t),e=t.pendingProps;var s=Os(t,Ps.current);Ir(t,n),s=go(null,t,i,e,s,n);var o=vo();return t.flags|=1,"object"==typeof s&&null!==s&&"function"==typeof s.render&&void 0===s.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,As(i)?(o=!0,js(t)):o=!1,t.memoizedState=null!==s.state&&void 0!==s.state?s.state:null,jr(t),s.updater=sa,t.stateNode=s,s._reactInternals=t,la(t,i,e,n),t=Pa(null,t,i,!0,o,n)):(t.tag=0,sr&&o&&er(t),ya(null,t,s,n),t=t.child),t;case 16:i=t.elementType;e:{switch(Wa(e,t),e=t.pendingProps,i=(s=i._init)(i._payload),t.type=i,s=t.tag=function(e){if("function"==typeof e)return Ac(e)?1:0;if(null!=e){if((e=e.$$typeof)===P)return 11;if(e===O)return 14}return 2}(i),e=na(i,e),s){case 0:t=Ea(null,t,i,e,n);break e;case 1:t=Ma(null,t,i,e,n);break e;case 11:t=wa(null,t,i,e,n);break e;case 14:t=xa(null,t,i,na(i.type,e),n);break e}throw Error(r(306,i,""))}return t;case 0:return i=t.type,s=t.pendingProps,Ea(e,t,i,s=t.elementType===i?s:na(i,s),n);case 1:return i=t.type,s=t.pendingProps,Ma(e,t,i,s=t.elementType===i?s:na(i,s),n);case 3:e:{if(Ia(t),null===e)throw Error(r(387));i=t.pendingProps,s=(o=t.memoizedState).element,zr(e,t),Hr(t,i,null,n);var a=t.memoizedState;if(i=a.element,o.isDehydrated){if(o={element:i,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,256&t.flags){t=La(e,t,i,n,s=ca(Error(r(423)),t));break e}if(i!==s){t=La(e,t,i,n,s=ca(Error(r(424)),t));break e}for(ir=cs(t.stateNode.containerInfo.firstChild),nr=t,sr=!0,rr=null,n=wr(t,null,i,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(pr(),i===s){t=$a(e,t,n);break e}ya(e,t,i,n)}t=t.child}return t;case 5:return Xr(t),null===e&&cr(t),i=t.type,s=t.pendingProps,o=null!==e?e.memoizedProps:null,a=s.children,ns(i,s)?a=null:null!==o&&ns(i,o)&&(t.flags|=32),ka(e,t),ya(e,t,a,n),t.child;case 6:return null===e&&cr(t),null;case 13:return za(e,t,n);case 4:return Gr(t,t.stateNode.containerInfo),i=t.pendingProps,null===e?t.child=yr(t,null,i,n):ya(e,t,i,n),t.child;case 11:return i=t.type,s=t.pendingProps,wa(e,t,i,s=t.elementType===i?s:na(i,s),n);case 7:return ya(e,t,t.pendingProps,n),t.child;case 8:case 12:return ya(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(i=t.type._context,s=t.pendingProps,o=t.memoizedProps,a=s.value,Es(xr,i._currentValue),i._currentValue=a,null!==o)if(ai(o.value,a)){if(o.children===s.children&&!Is.current){t=$a(e,t,n);break e}}else for(null!==(o=t.child)&&(o.return=t);null!==o;){var l=o.dependencies;if(null!==l){a=o.child;for(var c=l.firstContext;null!==c;){if(c.context===i){if(1===o.tag){(c=Nr(-1,n&-n)).tag=2;var d=o.updateQueue;if(null!==d){var u=(d=d.shared).pending;null===u?c.next=c:(c.next=u.next,u.next=c),d.pending=c}}o.lanes|=n,null!==(c=o.alternate)&&(c.lanes|=n),Pr(o.return,n,t),l.lanes|=n;break}c=c.next}}else if(10===o.tag)a=o.type===t.type?null:o.child;else if(18===o.tag){if(null===(a=o.return))throw Error(r(341));a.lanes|=n,null!==(l=a.alternate)&&(l.lanes|=n),Pr(a,n,t),a=o.sibling}else a=o.child;if(null!==a)a.return=o;else for(a=o;null!==a;){if(a===t){a=null;break}if(null!==(o=a.sibling)){o.return=a.return,a=o;break}a=a.return}o=a}ya(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,i=t.pendingProps.children,Ir(t,n),i=i(s=Lr(s)),t.flags|=1,ya(e,t,i,n),t.child;case 14:return s=na(i=t.type,t.pendingProps),xa(e,t,i,s=na(i.type,s),n);case 15:return Sa(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:na(i,s),Wa(e,t),t.tag=1,As(i)?(e=!0,js(t)):e=!1,Ir(t,n),oa(t,i,s),la(t,i,s,n),Pa(null,t,i,!0,e,n);case 19:return Ha(e,t,n);case 22:return Ca(e,t,n)}throw Error(r(156,t.tag))};var Kc="function"==typeof reportError?reportError:function(e){console.error(e)};function Jc(e){this._internalRoot=e}function Gc(e){this._internalRoot=e}function Yc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Xc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Qc(){}function Zc(e,t,n,i,s){var r=n._reactRootContainer;if(r){var o=r;if("function"==typeof s){var a=s;s=function(){var e=$c(o);a.call(e)}}Wc(t,o,e,s)}else o=function(e,t,n,i,s){if(s){if("function"==typeof i){var r=i;i=function(){var e=$c(o);r.call(e)}}var o=Hc(t,i,e,0,null,!1,0,"",Qc);return e._reactRootContainer=o,e[ms]=o.current,Hi(8===e.nodeType?e.parentNode:e),dc(),o}for(;s=e.lastChild;)e.removeChild(s);if("function"==typeof i){var a=i;i=function(){var e=$c(l);a.call(e)}}var l=Fc(e,0,!1,null,0,!1,0,"",Qc);return e._reactRootContainer=l,e[ms]=l.current,Hi(8===e.nodeType?e.parentNode:e),dc(function(){Wc(t,l,n,i)}),l}(n,t,e,s,i);return $c(o)}Gc.prototype.render=Jc.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(r(409));Wc(e,t,null,null)},Gc.prototype.unmount=Jc.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;dc(function(){Wc(null,e,null,null)}),t[ms]=null}},Gc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ct();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Dt.length&&0!==t&&t<Dt[n].priority;n++);Dt.splice(n,0,e),0===n&&zt(e)}},wt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ut(t.pendingLanes);0!==n&&(_t(t,1|n),ic(t,Xe()),!(6&Pl)&&(Hl=Xe()+500,Hs()))}break;case 13:dc(function(){var t=Tr(e,1);if(null!==t){var n=ec();nc(t,e,1,n)}}),Vc(e,1)}},xt=function(e){if(13===e.tag){var t=Tr(e,134217728);null!==t&&nc(t,e,134217728,ec()),Vc(e,134217728)}},St=function(e){if(13===e.tag){var t=tc(e),n=Tr(e,t);null!==n&&nc(n,e,t,ec()),Vc(e,t)}},Ct=function(){return bt},kt=function(e,t){var n=bt;try{return bt=e,t()}finally{bt=n}},xe=function(e,t,n){switch(t){case"input":if(Q(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var s=ws(i);if(!s)throw Error(r(90));K(i),Q(i,s)}}}break;case"textarea":re(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Pe=cc,Ie=dc;var ed={usingClientEntryPoint:!1,Events:[bs,ys,ws,Ee,Me,cc]},td={findFiberByHostInstance:_s,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},nd={bundleType:td.bundleType,version:td.version,rendererPackageName:td.rendererPackageName,rendererConfig:td.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:y.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=qe(e))?null:e.stateNode},findFiberByHostInstance:td.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var id=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!id.isDisabled&&id.supportsFiber)try{st=id.inject(nd),rt=id}catch(de){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ed,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Yc(t))throw Error(r(200));return function(e,t,n){var i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:x,key:null==i?null:""+i,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Yc(e))throw Error(r(299));var n=!1,i="",s=Kc;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(i=t.identifierPrefix),void 0!==t.onRecoverableError&&(s=t.onRecoverableError)),t=Fc(e,1,!1,null,0,n,0,i,s),e[ms]=t.current,Hi(8===e.nodeType?e.parentNode:e),new Jc(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(r(188));throw e=Object.keys(e).join(","),Error(r(268,e))}return null===(e=qe(t))?null:e.stateNode},t.flushSync=function(e){return dc(e)},t.hydrate=function(e,t,n){if(!Xc(t))throw Error(r(200));return Zc(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Yc(e))throw Error(r(405));var i=null!=n&&n.hydratedSources||null,s=!1,o="",a=Kc;if(null!=n&&(!0===n.unstable_strictMode&&(s=!0),void 0!==n.identifierPrefix&&(o=n.identifierPrefix),void 0!==n.onRecoverableError&&(a=n.onRecoverableError)),t=Hc(t,null,e,1,null!=n?n:null,s,0,o,a),e[ms]=t.current,Hi(e),i)for(e=0;e<i.length;e++)s=(s=(n=i[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new Gc(t)},t.render=function(e,t,n){if(!Xc(t))throw Error(r(200));return Zc(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Xc(e))throw Error(r(40));return!!e._reactRootContainer&&(dc(function(){Zc(null,null,e,!1,function(){e._reactRootContainer=null,e[ms]=null})}),!0)},t.unstable_batchedUpdates=cc,t.unstable_renderSubtreeIntoContainer=function(e,t,n,i){if(!Xc(n))throw Error(r(200));if(null==e||void 0===e._reactInternals)throw Error(r(38));return Zc(e,t,n,!1,i)},t.version="18.3.1-next-f1338f8080-20240426"},2570:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,s)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return s(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CommHandler=t.CommsOverSubshells=void 0;const o=n(5899),a=n(785),l=r(n(9798));var c;!function(e){e.Disabled="disabled",e.PerComm="perComm",e.PerCommTarget="perCommTarget"}(c||(t.CommsOverSubshells=c={}));class d extends a.DisposableDelegate{constructor(e,t,n,i,s){super(i),this._subshellStarted=new o.PromiseDelegate,this._subshellId=null,this._target="",this._id="",this._id=t,this._target=e,this._kernel=n,this._kernel.statusChanged.connect(()=>{"restarting"===this._kernel.status&&this._cleanSubshells()}),this.commsOverSubshells=null!=s?s:c.PerCommTarget}get commId(){return this._id}get targetName(){return this._target}get subshellId(){return this._subshellId}get subshellStarted(){return this._subshellStarted.promise}get commsOverSubshells(){return this._commsOverSubshells}set commsOverSubshells(e){this._commsOverSubshells=e,this._commsOverSubshells===c.Disabled?this._maybeCloseSubshell():this._maybeStartSubshell()}get onClose(){return this._onClose}set onClose(e){this._onClose=e}get onMsg(){return this._onMsg}set onMsg(e){this._onMsg=e}open(e,t,n=[]){if(this.isDisposed||this._kernel.isDisposed)throw new Error("Cannot open");const i=l.createMessage({msgType:"comm_open",channel:"shell",username:this._kernel.username,session:this._kernel.clientId,subshellId:this._subshellId||this._kernel.subshellId,content:{comm_id:this._id,target_name:this._target,data:null!=e?e:{}},metadata:t,buffers:n});return this._kernel.sendShellMessage(i,!1,!0)}send(e,t,n=[],i=!0){if(this.isDisposed||this._kernel.isDisposed)throw new Error("Cannot send");const s=l.createMessage({msgType:"comm_msg",channel:"shell",username:this._kernel.username,session:this._kernel.clientId,subshellId:this._subshellId||this._kernel.subshellId,content:{comm_id:this._id,data:e},metadata:t,buffers:n});return this._kernel.sendShellMessage(s,!1,i)}close(e,t,n=[]){if(this.isDisposed||this._kernel.isDisposed)throw new Error("Cannot close");const i=l.createMessage({msgType:"comm_close",channel:"shell",username:this._kernel.username,session:this._kernel.clientId,subshellId:this._subshellId||this._kernel.subshellId,content:{comm_id:this._id,data:null!=e?e:{}},metadata:t,buffers:n}),s=this._kernel.sendShellMessage(i,!1,!0),r=this._onClose;return r&&r(l.createMessage({msgType:"comm_close",channel:"iopub",username:this._kernel.username,session:this._kernel.clientId,subshellId:this._subshellId||this._kernel.subshellId,content:{comm_id:this._id,data:null!=e?e:{}},metadata:t,buffers:n})),this.dispose(),s}dispose(){this._maybeCloseSubshell(),super.dispose()}_cleanSubshells(){const e=this._kernel.id;d._commTargetSubShellsId.hasOwnProperty(e)&&delete d._commTargetSubShellsId[e]}async _maybeStartSubshell(){if(await this._kernel.info,!this._kernel.supportsSubshells)return;if(this._commsOverSubshells===c.PerComm){const e=await this._kernel.requestCreateSubshell({}).done;return this._subshellId=e.content.subshell_id,void this._subshellStarted.resolve()}const e=this._kernel.id;d._commTargetSubShellsId.hasOwnProperty(e)||(d._commTargetSubShellsId[e]={});const t=d._commTargetSubShellsId[e];t[this._target]?(this._subshellId=await t[this._target],this._subshellStarted.resolve()):(t[this._target]=this._kernel.requestCreateSubshell({}).done.then(e=>(this._subshellId=e.content.subshell_id,this._subshellId)),await t[this._target],this._subshellStarted.resolve())}_maybeCloseSubshell(){this._commsOverSubshells===c.PerComm?(this._subshellId&&"dead"!==this._kernel.status&&this._kernel.requestDeleteSubshell({subshell_id:this._subshellId},!0),this._subshellId=null):this._subshellId=null}}t.CommHandler=d,d._commTargetSubShellsId={}},2827:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},2877:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.IStateDB=void 0;const i=n(5899);t.IStateDB=new i.Token("@jupyterlab/coreutils:IStateDB",'A service for the JupyterLab state database.\n Use this if you want to store data that will persist across page loads.\n See "state database" for more information.')},3106:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},3342:(e,t,n)=>{!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(2551)},3892:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NbConvertManager=void 0;const i=n(6376),s=n(1089),r=n(5899);t.NbConvertManager=class{constructor(e={}){var t;this._exportFormats=null,this.serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:s.ServerConnection.makeSettings()}async fetchExportFormats(){this._requestingFormats=new r.PromiseDelegate,this._exportFormats=null;const e=this.serverSettings.baseUrl,t=i.URLExt.join(e,"api/nbconvert"),{serverSettings:n}=this,o=await s.ServerConnection.makeRequest(t,{},n);if(200!==o.status)throw await s.ServerConnection.ResponseError.create(o);const a=await o.json(),l={};return Object.keys(a).forEach(function(e){const t=a[e].output_mimetype;l[e]={output_mimetype:t}}),this._exportFormats=l,this._requestingFormats.resolve(l),l}async getExportFormats(e=!0){return this._requestingFormats?this._requestingFormats.promise:e||!this._exportFormats?await this.fetchExportFormats():this._exportFormats}async exportAs(e){const{format:t,path:n}=e,{download:s=!1}=e.exporterOptions||{},r=this.serverSettings.baseUrl,o=i.URLExt.encodeParts(n);let a=i.URLExt.join(r,"nbconvert",t,o);s&&(a+="?download=true"),null===window||void 0===window||window.open(a,"_blank","noopener")}}},3962:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,s)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return s(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.serialize=function(e,t=""){return t===o.supportedKernelWebSocketProtocols.v1KernelWebsocketJupyterOrg?a.serializeV1KernelWebsocketJupyterOrg(e):a.serializeDefault(e)},t.deserialize=function(e,t=""){return t===o.supportedKernelWebSocketProtocols.v1KernelWebsocketJupyterOrg?a.deserializeV1KernelWebsocketJupyterOrg(e):a.deserializeDefault(e)};const o=r(n(9798));var a;!function(e){e.deserializeV1KernelWebsocketJupyterOrg=function(e){let t;const n=new DataView(e),i=Number(n.getBigUint64(0,!0));let s=[];for(let e=0;e<i;e++)s.push(Number(n.getBigUint64(8*(e+1),!0)));const r=new TextDecoder("utf8"),o=r.decode(e.slice(s[0],s[1])),a=JSON.parse(r.decode(e.slice(s[1],s[2]))),l=JSON.parse(r.decode(e.slice(s[2],s[3]))),c=JSON.parse(r.decode(e.slice(s[3],s[4]))),d=JSON.parse(r.decode(e.slice(s[4],s[5])));let u=[];for(let t=5;t<s.length-1;t++)u.push(new DataView(e.slice(s[t],s[t+1])));return t={channel:o,header:a,parent_header:l,metadata:c,content:d,buffers:u},t},e.serializeV1KernelWebsocketJupyterOrg=function(e){const t=JSON.stringify(e.header),n=null==e.parent_header?"{}":JSON.stringify(e.parent_header),i=JSON.stringify(e.metadata),s=JSON.stringify(e.content),r=void 0!==e.buffers?e.buffers:[],o=5+r.length+1;let a=[];a.push(8*(1+o)),a.push(e.channel.length+a[a.length-1]);const l=new TextEncoder,c=l.encode(e.channel),d=l.encode(t),u=l.encode(n),h=l.encode(i),p=l.encode(s),m=new Uint8Array(c.length+d.length+u.length+h.length+p.length);m.set(c),m.set(d,c.length),m.set(u,c.length+d.length),m.set(h,c.length+d.length+u.length),m.set(p,c.length+d.length+u.length+h.length);for(let e of[d.length,u.length,h.length,p.length])a.push(e+a[a.length-1]);let f=0;for(let e of r){let t=e.byteLength;a.push(t+a[a.length-1]),f+=t}const g=new Uint8Array(8*(1+o)+m.byteLength+f),v=new ArrayBuffer(8),_=new DataView(v);_.setBigUint64(0,BigInt(o),!0),g.set(new Uint8Array(v),0);for(let e=0;e<a.length;e++)_.setBigUint64(0,BigInt(a[e]),!0),g.set(new Uint8Array(v),8*(e+1));g.set(m,a[0]);for(let e=0;e<r.length;e++){const t=r[e];g.set(new Uint8Array(ArrayBuffer.isView(t)?t.buffer:t),a[5+e])}return g.buffer},e.deserializeDefault=function(e){let t;return t="string"==typeof e?JSON.parse(e):function(e){const t=new DataView(e),n=t.getUint32(0),i=[];if(n<2)throw new Error("Invalid incoming Kernel Message");for(let e=1;e<=n;e++)i.push(t.getUint32(4*e));const s=new Uint8Array(e.slice(i[0],i[1])),r=JSON.parse(new TextDecoder("utf8").decode(s));r.buffers=[];for(let t=1;t<n;t++){const n=i[t],s=i[t+1]||e.byteLength;r.buffers.push(new DataView(e.slice(n,s)))}return r}(e),t},e.serializeDefault=function(e){var t;let n;return n=(null===(t=e.buffers)||void 0===t?void 0:t.length)?function(e){const t=[],n=[],i=new TextEncoder;let s=[];void 0!==e.buffers&&(s=e.buffers,delete e.buffers);const r=i.encode(JSON.stringify(e));n.push(r.buffer);for(let e=0;e<s.length;e++){const t=s[e];n.push(ArrayBuffer.isView(t)?t.buffer:t)}const o=n.length;t.push(4*(o+1));for(let e=0;e+1<n.length;e++)t.push(t[t.length-1]+n[e].byteLength);const a=new Uint8Array(t[t.length-1]+n[n.length-1].byteLength),l=new DataView(a.buffer);l.setUint32(0,o);for(let e=0;e<t.length;e++)l.setUint32(4*(e+1),t[e]);for(let e=0;e<n.length;e++)a.set(new Uint8Array(n[e]),t[e]);return a.buffer}(e):JSON.stringify(e),n}}(a||(a={}))},3992:(e,t)=>{var n=Object.prototype.hasOwnProperty;function i(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function s(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var i,r,o=[];for(r in"string"!=typeof t&&(t="?"),e)if(n.call(e,r)){if((i=e[r])||null!=i&&!isNaN(i)||(i=""),r=s(r),i=s(i),null===r||null===i)continue;o.push(r+"="+i)}return o.length?t+o.join("&"):""},t.parse=function(e){for(var t,n=/([^=?#&]+)=?([^&]*)/g,s={};t=n.exec(e);){var r=i(t[1]),o=i(t[2]);null===r||null===o||r in s||(s[r]=o)}return s}},4056:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DataConnector=void 0,t.DataConnector=class{async list(e){throw new Error("DataConnector#list method has not been implemented.")}async remove(e){throw new Error("DataConnector#remove method has not been implemented.")}async save(e,t){throw new Error("DataConnector#save method has not been implemented.")}}},4272:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,s)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return s(t,e),t},o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.CommsOverSubshells=t.KernelConnection=t.KernelAPI=t.KernelMessage=t.Kernel=void 0;const a=n(2570);Object.defineProperty(t,"CommsOverSubshells",{enumerable:!0,get:function(){return a.CommsOverSubshells}});const l=r(n(2343));t.Kernel=l;const c=r(n(9798));t.KernelMessage=c;const d=r(n(8662));t.KernelAPI=d;const u=n(5089);Object.defineProperty(t,"KernelConnection",{enumerable:!0,get:function(){return u.KernelConnection}}),o(n(7275),t)},4320:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UserAPIClient=void 0;const i=n(1089),s=n(6376);t.UserAPIClient=class{constructor(e={}){var t;this.serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:i.ServerConnection.makeSettings()}async get(){const{baseUrl:e}=this.serverSettings,{makeRequest:t,ResponseError:n}=i.ServerConnection,r=s.URLExt.join(e,"api/me"),o=await t(r,{},this.serverSettings);if(200!==o.status)throw await n.create(o);return await o.json()}}},4396:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=WebSocket},4477:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LruCache=void 0,t.LruCache=class{constructor(e={}){this._map=new Map,this._maxSize=(null==e?void 0:e.maxSize)||128}get size(){return this._map.size}clear(){this._map.clear()}get(e){const t=this._map.get(e)||null;return null!=t&&(this._map.delete(e),this._map.set(e,t)),t}set(e,t){this._map.size>=this._maxSize&&this._map.delete(this._map.keys().next().value),this._map.set(e,t)}}},4591:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.convertToStyles=function e(t){var n={};for(var i in t){var s=t[i];if("$nest"===i){var r=s;for(var o in r){var a=r[o];n[o]=e(a)}}else"$debugName"===i?n.$displayName=s:n[i]=s}return n},t.convertToKeyframes=function(e){var t={};for(var n in e)"$debugName"!==n&&(t[n]=e[n]);return e.$debugName&&(t.$displayName=e.$debugName),t}},4798:(e,t)=>{function n(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var i={},s=0,r=e;s<r.length;s++){var o=r[s];if(null!=o&&!1!==o)for(var a in o){var l=o[a];(l||0===l)&&("$nest"===a&&l?i[a]=i.$nest?n(i.$nest,l):l:-1!==a.indexOf("&")||0===a.indexOf("@media")?i[a]=i[a]?n(i[a],l):l:i[a]=l)}}return i}Object.defineProperty(t,"__esModule",{value:!0}),t.raf="undefined"==typeof requestAnimationFrame?function(e){return setTimeout(e)}:"undefined"==typeof window?requestAnimationFrame:requestAnimationFrame.bind(window),t.classes=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.map(function(e){return e&&"object"==typeof e?Object.keys(e).map(function(t){return!!e[t]&&t}):[e]}).reduce(function(e,t){return e.concat(t)},[]).filter(function(e){return!!e}).join(" ")},t.extend=n,t.media=function(e){for(var t,s=[],r=1;r<arguments.length;r++)s[r-1]=arguments[r];var o=[];return e.type&&o.push(e.type),e.orientation&&o.push("(orientation: "+e.orientation+")"),e.minWidth&&o.push("(min-width: "+i(e.minWidth)+")"),e.maxWidth&&o.push("(max-width: "+i(e.maxWidth)+")"),e.minHeight&&o.push("(min-height: "+i(e.minHeight)+")"),e.maxHeight&&o.push("(max-height: "+i(e.maxHeight)+")"),e.prefersColorScheme&&o.push("(prefers-color-scheme: "+e.prefersColorScheme+")"),{$nest:(t={},t["@media "+o.join(" and ")]=n.apply(void 0,s),t)}};var i=function(e){return"string"==typeof e?e:e+"px"}},4816:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BuildManager=void 0;const i=n(6376),s=n(1089);t.BuildManager=class{constructor(e={}){var t;this.serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:s.ServerConnection.makeSettings()}get isAvailable(){return"true"===i.PageConfig.getOption("buildAvailable").toLowerCase()}get shouldCheck(){return"true"===i.PageConfig.getOption("buildCheck").toLowerCase()}getStatus(){const{_url:e,serverSettings:t}=this;return s.ServerConnection.makeRequest(e,{},t).then(e=>{if(200!==e.status)throw new s.ServerConnection.ResponseError(e);return e.json()}).then(e=>{if("string"!=typeof e.status)throw new Error("Invalid data");if("string"!=typeof e.message)throw new Error("Invalid data");return e})}build(){const{_url:e,serverSettings:t}=this;return s.ServerConnection.makeRequest(e,{method:"POST"},t).then(e=>{if(400===e.status)throw new s.ServerConnection.ResponseError(e,"Build aborted");if(200!==e.status){const t=`Build failed with ${e.status}.\n\n If you are experiencing the build failure after installing an extension (or trying to include previously installed extension after updating JupyterLab) please check the extension repository for new installation instructions as many extensions migrated to the prebuilt extensions system which no longer requires rebuilding JupyterLab (but uses a different installation procedure, typically involving a package manager such as 'pip' or 'conda').\n\n If you specifically intended to install a source extension, please run 'jupyter lab build' on the server for full output.`;throw new s.ServerConnection.ResponseError(e,t)}})}cancel(){const{_url:e,serverSettings:t}=this;return s.ServerConnection.makeRequest(e,{method:"DELETE"},t).then(e=>{if(204!==e.status)throw new s.ServerConnection.ResponseError(e)})}get _url(){const{baseUrl:e,appUrl:t}=this.serverSettings;return i.URLExt.join(e,t,"api/build")}}},4903:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalAPIClient=t.TERMINAL_SERVICE_URL=void 0,t.isAvailable=r,t.startNew=o,t.listRunning=a,t.shutdownTerminal=l;const i=n(6376),s=n(1089);function r(){return"true"===String(i.PageConfig.getOption("terminalsAvailable")).toLowerCase()}async function o(e=s.ServerConnection.makeSettings(),n,r){c.errorIfNotAvailable();const o=i.URLExt.join(e.baseUrl,t.TERMINAL_SERVICE_URL),a={method:"POST",body:JSON.stringify({name:n,cwd:r})},l=await s.ServerConnection.makeRequest(o,a,e);if(200!==l.status)throw await s.ServerConnection.ResponseError.create(l);return await l.json()}async function a(e=s.ServerConnection.makeSettings()){c.errorIfNotAvailable();const n=i.URLExt.join(e.baseUrl,t.TERMINAL_SERVICE_URL),r=await s.ServerConnection.makeRequest(n,{},e);if(200!==r.status)throw await s.ServerConnection.ResponseError.create(r);const o=await r.json();if(!Array.isArray(o))throw new Error("Invalid terminal list");return o}async function l(e,n=s.ServerConnection.makeSettings()){var r;c.errorIfNotAvailable();const o=i.URLExt.join(n.baseUrl,t.TERMINAL_SERVICE_URL),a=i.URLExt.join(o,e);if(!a.startsWith(o))throw new Error("Can only be used for terminal requests");const l=await s.ServerConnection.makeRequest(a,{method:"DELETE"},n);if(404===l.status){const t=null!==(r=(await l.json()).message)&&void 0!==r?r:`The terminal session "${e}"" does not exist on the server`;console.warn(t)}else if(204!==l.status)throw await s.ServerConnection.ResponseError.create(l)}var c;t.TERMINAL_SERVICE_URL="api/terminals",t.TerminalAPIClient=class{constructor(e={}){var t;this.serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:s.ServerConnection.makeSettings()}get isAvailable(){return r()}async startNew(e={}){const{name:t,cwd:n}=e;return o(this.serverSettings,t,n)}async listRunning(){return a(this.serverSettings)}async shutdown(e){return l(e,this.serverSettings)}},function(e){e.errorIfNotAvailable=function(){if(!r())throw new Error("Terminals Unavailable")}}(c||(c={}))},5013:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ActivityMonitor=void 0;const i=n(6903);t.ActivityMonitor=class{constructor(e){this._timer=-1,this._timeout=-1,this._isDisposed=!1,this._activityStopped=new i.Signal(this),e.signal.connect(this._onSignalFired,this),this._timeout=e.timeout||1e3}get activityStopped(){return this._activityStopped}get timeout(){return this._timeout}set timeout(e){this._timeout=e}get isDisposed(){return this._isDisposed}dispose(){this._isDisposed||(this._isDisposed=!0,i.Signal.clearData(this))}_onSignalFired(e,t){clearTimeout(this._timer),this._sender=e,this._args=t,this._timer=setTimeout(()=>{this._activityStopped.emit({sender:this._sender,args:this._args})},this._timeout)}}},5089:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,s)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return s(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.KernelConnection=void 0;const o=n(6376),a=n(5899),l=n(6903),c=n(608),d=n(2570),u=r(n(9798)),h=n(6073),p=r(n(8872)),m=n(8662),f=n(321),g=n(6376),v="_RESTARTING_";class _{constructor(e){var t,n,i,s,r,d,h,g;this._createSocket=(e=!0)=>{this._errorIfDisposed(),this._clearSocket(),this._updateConnectionStatus("connecting");const t=this.serverSettings,n=o.URLExt.join(t.wsUrl,m.KERNEL_SERVICE_URL,encodeURIComponent(this._id)),i=n.replace(/^((?:\w+:)?\/\/)(?:[^@\/]+@)/,"$1");console.debug(`Starting WebSocket: ${i}`);let s=o.URLExt.join(n,"channels?session_id="+encodeURIComponent(this._clientId));const r=t.token;t.appendToken&&""!==r&&(s+=`&token=${encodeURIComponent(r)}`);const a=e?this._supportedProtocols:[];this._ws=new t.WebSocket(s,a),this._ws.binaryType="arraybuffer";let l=!1;const d=async e=>{var t,n;if(!this._isDisposed){this._reason="",this._model=void 0;try{const t=await this._kernelAPIClient.getModel(this._id);this._model=t,"dead"===(null==t?void 0:t.execution_state)?this._updateStatus("dead"):this._onWSClose(e)}catch(i){if(i instanceof c.ServerConnection.NetworkError||503===(null===(t=i.response)||void 0===t?void 0:t.status)||424===(null===(n=i.response)||void 0===n?void 0:n.status)){const t=1e3*b.getRandomIntInclusive(10,30);setTimeout(d,t,e)}else this._reason="Kernel died unexpectedly",this._updateStatus("dead")}}},u=async e=>{l||(l=!0,await d(e))};this._ws.onmessage=this._onWSMessage,this._ws.onopen=this._onWSOpen,this._ws.onclose=u,this._ws.onerror=u},this._onWSOpen=e=>{if(""!==this._ws.protocol&&!this._supportedProtocols.includes(this._ws.protocol))throw console.log("Server selected unknown kernel wire protocol:",this._ws.protocol),this._updateStatus("dead"),new Error(`Unknown kernel wire protocol: ${this._ws.protocol}`);this._selectedProtocol=this._ws.protocol,this._ws.onclose=this._onWSClose,this._ws.onerror=this._onWSClose,this._updateConnectionStatus("connected")},this._onWSMessage=e=>{let t;try{t=this.serverSettings.serializer.deserialize(e.data,this._ws.protocol),p.validateMessage(t)}catch(e){throw e.message=`Kernel message validation error: ${e.message}`,e}this._kernelSession=t.header.session,this._msgChain=this._msgChain.then(()=>this._handleMessage(t)).catch(e=>{e.message.startsWith("Canceled future for ")&&console.error(e)}),this._anyMessage.emit({msg:t,direction:"recv"})},this._onWSClose=e=>{this.isDisposed||this._reconnect()},this._id="",this._name="",this._status="unknown",this._connectionStatus="connecting",this._kernelSession="",this._isDisposed=!1,this._ws=null,this._username="",this._reconnectLimit=7,this._reconnectAttempt=0,this._reconnectTimeout=null,this._supportedProtocols=Object.values(u.supportedKernelWebSocketProtocols),this._selectedProtocol="",this._commsOverSubshells=c.CommsOverSubshells.PerCommTarget,this._futures=new Map,this._comms=new Map,this._targetRegistry=Object.create(null),this._info=new a.PromiseDelegate,this._pendingMessages=[],this._statusChanged=new l.Signal(this),this._connectionStatusChanged=new l.Signal(this),this._disposed=new l.Signal(this),this._iopubMessage=new l.Signal(this),this._anyMessage=new l.Signal(this),this._pendingInput=new l.Signal(this),this._unhandledMessage=new l.Signal(this),this._displayIdToParentIds=new Map,this._msgIdToDisplayIds=new Map,this._msgChain=Promise.resolve(),this._hasPendingInput=!1,this._reason="",this._noOp=()=>{},this._supportsSubshells=!1,this._name=e.model.name,this._id=e.model.id,this.serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:c.ServerConnection.makeSettings(),this._kernelAPIClient=null!==(n=e.kernelAPIClient)&&void 0!==n?n:new m.KernelAPIClient({serverSettings:this.serverSettings}),this._kernelSpecAPIClient=null!==(i=e.kernelSpecAPIClient)&&void 0!==i?i:new f.KernelSpecAPIClient({serverSettings:this.serverSettings}),this._clientId=null!==(s=e.clientId)&&void 0!==s?s:a.UUID.uuid4(),this._username=null!==(r=e.username)&&void 0!==r?r:"",this.handleComms=null===(d=e.handleComms)||void 0===d||d,this._commsOverSubshells=null!==(h=e.commsOverSubshells)&&void 0!==h?h:c.CommsOverSubshells.PerCommTarget,this._subshellId=null!==(g=e.subshellId)&&void 0!==g?g:null,this._createSocket()}get disposed(){return this._disposed}get commsOverSubshells(){return this._commsOverSubshells}set commsOverSubshells(e){this._commsOverSubshells=e;for(const[t,n]of this._comms)n.commsOverSubshells=e}get statusChanged(){return this._statusChanged}get connectionStatusChanged(){return this._connectionStatusChanged}get iopubMessage(){return this._iopubMessage}get unhandledMessage(){return this._unhandledMessage}get model(){return this._model||{id:this.id,name:this.name,reason:this._reason}}get anyMessage(){return this._anyMessage}get pendingInput(){return this._pendingInput}get id(){return this._id}get name(){return this._name}get username(){return this._username}get clientId(){return this._clientId}get subshellId(){return this._subshellId}set subshellId(e){this._subshellId=e}get status(){return this._status}get connectionStatus(){return this._connectionStatus}get isDisposed(){return this._isDisposed}get info(){return this._info.promise}get spec(){return this._specPromise||(this._specPromise=this._kernelSpecAPIClient.get().then(e=>e.kernelspecs[this._name])),this._specPromise}get supportsSubshells(){return this._supportsSubshells}clone(e={}){return new _({model:this.model,username:this.username,serverSettings:this.serverSettings,handleComms:!1,kernelAPIClient:this._kernelAPIClient,commsOverSubshells:c.CommsOverSubshells.Disabled,...e})}dispose(){if(this.isDisposed)return;const e=()=>{this._isDisposed=!0,this._disposed.emit(),this._updateConnectionStatus("disconnected"),this._clearKernelState(),this._pendingMessages=[],this._clearSocket(),l.Signal.clearData(this)};null!==this._subshellId?this.requestDeleteSubshell({subshell_id:this._subshellId},!0).onReply=t=>{e()}:e()}sendShellMessage(e,t=!1,n=!0){return this._sendKernelShellControl(h.KernelShellFutureHandler,e,t,n)}sendControlMessage(e,t=!1,n=!0){return this._sendKernelShellControl(h.KernelControlFutureHandler,e,t,n)}_sendKernelShellControl(e,t,n=!1,i=!0){this._sendMessage(t),this._anyMessage.emit({msg:t,direction:"send"});const s=new e(()=>{const e=t.header.msg_id;this._futures.delete(e);const n=this._msgIdToDisplayIds.get(e);n&&(n.forEach(t=>{const n=this._displayIdToParentIds.get(t);if(n){const i=n.indexOf(e);if(-1===i)return;1===n.length?this._displayIdToParentIds.delete(t):(n.splice(i,1),this._displayIdToParentIds.set(t,n))}}),this._msgIdToDisplayIds.delete(e))},t,n,i,this);return this._futures.set(t.header.msg_id,s),s}_sendMessage(e,t=!0){if("dead"===this.status)throw new Error("Kernel is dead");if((""===this._kernelSession||this._kernelSession===v)&&u.isInfoRequestMsg(e)){if("connected"===this.connectionStatus)return void this._ws.send(this.serverSettings.serializer.serialize(e,this._ws.protocol));throw new Error("Could not send message: status is not connected")}if(t&&this._pendingMessages.length>0)this._pendingMessages.push(e);else if("connected"===this.connectionStatus&&this._kernelSession!==v)this._ws.send(this.serverSettings.serializer.serialize(e,this._ws.protocol));else{if(!t)throw new Error("Could not send message");this._pendingMessages.push(e)}}async interrupt(){if(this.hasPendingInput=!1,"dead"===this.status)throw new Error("Kernel is dead");return this._kernelAPIClient.interrupt(this.id)}async restart(){if("dead"===this.status)throw new Error("Kernel is dead");this._updateStatus("restarting"),this._clearKernelState(),this._kernelSession=v,await this._kernelAPIClient.restart(this.id),await this.reconnect(),this.hasPendingInput=!1}reconnect(){this._errorIfDisposed();const e=new a.PromiseDelegate,t=(n,i)=>{"connected"===i?(e.resolve(),this.connectionStatusChanged.disconnect(t,this)):"disconnected"===i&&(e.reject(new Error("Kernel connection disconnected")),this.connectionStatusChanged.disconnect(t,this))};return this.connectionStatusChanged.connect(t,this),this._reconnectAttempt=0,this._reconnect(),e.promise}async shutdown(){"dead"!==this.status&&await this._kernelAPIClient.shutdown(this.id),this.handleShutdown()}handleShutdown(){this._updateStatus("dead"),this.dispose()}async requestKernelInfo(){const e=u.createMessage({msgType:"kernel_info_request",channel:"shell",username:this._username,session:this._clientId,subshellId:this._subshellId,content:{}});let t;try{t=await b.handleShellMessage(this,e)}catch(e){if(this.isDisposed)return;throw e}if(this._errorIfDisposed(),!t)return;if(void 0===t.content.status&&(t.content.status="ok"),"ok"!==t.content.status)return this._info.reject("Kernel info reply errored"),t;this._info.resolve(t.content),this._kernelSession=t.header.session;const n=t.content.supported_features;return this._supportsSubshells=void 0!==n&&n.includes("kernel subshells"),t}requestComplete(e){const t=u.createMessage({msgType:"complete_request",channel:"shell",username:this._username,session:this._clientId,subshellId:this._subshellId,content:e});return b.handleShellMessage(this,t)}requestInspect(e){const t=u.createMessage({msgType:"inspect_request",channel:"shell",username:this._username,session:this._clientId,subshellId:this._subshellId,content:e});return b.handleShellMessage(this,t)}requestHistory(e){const t=u.createMessage({msgType:"history_request",channel:"shell",username:this._username,session:this._clientId,subshellId:this._subshellId,content:e});return b.handleShellMessage(this,t)}requestExecute(e,t=!0,n){const i=u.createMessage({msgType:"execute_request",channel:"shell",username:this._username,session:this._clientId,subshellId:this._subshellId,content:{silent:!1,store_history:!0,user_expressions:{},allow_stdin:!0,stop_on_error:!1,...e},metadata:n});return this.sendShellMessage(i,!0,t)}requestDebug(e,t=!0){const n=u.createMessage({msgType:"debug_request",channel:"control",username:this._username,session:this._clientId,content:e});return this.sendControlMessage(n,!0,t)}requestCreateSubshell(e,t=!0){if(!this.supportsSubshells)throw new Error("Kernel subshells are not supported");const n=u.createMessage({msgType:"create_subshell_request",channel:"control",username:this._username,session:this._clientId,content:e});return this.sendControlMessage(n,!0,t)}requestDeleteSubshell(e,t=!0){if(!this.supportsSubshells)throw new Error("Kernel subshells are not supported");const n=u.createMessage({msgType:"delete_subshell_request",channel:"control",username:this._username,session:this._clientId,content:e});return this.sendControlMessage(n,!0,t)}requestListSubshell(e,t=!0){if(!this.supportsSubshells)throw new Error("Kernel subshells are not supported");const n=u.createMessage({msgType:"list_subshell_request",channel:"control",username:this._username,session:this._clientId,content:e});return this.sendControlMessage(n,!0,t)}requestIsComplete(e){const t=u.createMessage({msgType:"is_complete_request",channel:"shell",username:this._username,session:this._clientId,subshellId:this._subshellId,content:e});return b.handleShellMessage(this,t)}requestCommInfo(e){const t=u.createMessage({msgType:"comm_info_request",channel:"shell",username:this._username,session:this._clientId,subshellId:this._subshellId,content:e});return b.handleShellMessage(this,t)}sendInputReply(e,t){const n=u.createMessage({msgType:"input_reply",channel:"stdin",username:this._username,session:this._clientId,content:e});n.parent_header=t,this._sendMessage(n),this._anyMessage.emit({msg:n,direction:"send"}),this.hasPendingInput=!1}createComm(e,t=a.UUID.uuid4()){if(!this.handleComms)throw new Error("Comms are disabled on this kernel connection");if(this._comms.has(t))throw new Error("Comm is already created");const n=new d.CommHandler(e,t,this,()=>{this._unregisterComm(t)},this._commsOverSubshells);return this._comms.set(t,n),n}hasComm(e){return this._comms.has(e)}registerCommTarget(e,t){this.handleComms&&(this._targetRegistry[e]=t)}removeCommTarget(e,t){this.handleComms&&(this.isDisposed||this._targetRegistry[e]!==t||delete this._targetRegistry[e])}registerMessageHook(e,t){var n;const i=null===(n=this._futures)||void 0===n?void 0:n.get(e);i&&i.registerMessageHook(t)}removeMessageHook(e,t){var n;const i=null===(n=this._futures)||void 0===n?void 0:n.get(e);i&&i.removeMessageHook(t)}removeInputGuard(){this.hasPendingInput=!1}async _handleDisplayId(e,t){var n,i;const s=t.parent_header.msg_id;let r=this._displayIdToParentIds.get(e);if(r){const e={header:a.JSONExt.deepCopy(t.header),parent_header:a.JSONExt.deepCopy(t.parent_header),metadata:a.JSONExt.deepCopy(t.metadata),content:a.JSONExt.deepCopy(t.content),channel:t.channel,buffers:t.buffers?t.buffers.slice():[]};e.header.msg_type="update_display_data",await Promise.all(r.map(async t=>{const n=this._futures&&this._futures.get(t);n&&await n.handleMsg(e)}))}if("update_display_data"===t.header.msg_type)return!0;r=null!==(n=this._displayIdToParentIds.get(e))&&void 0!==n?n:[],-1===r.indexOf(s)&&r.push(s),this._displayIdToParentIds.set(e,r);const o=null!==(i=this._msgIdToDisplayIds.get(s))&&void 0!==i?i:[];return-1===o.indexOf(s)&&o.push(s),this._msgIdToDisplayIds.set(s,o),!1}_clearSocket(){null!==this._ws&&(this._ws.onopen=this._noOp,this._ws.onclose=this._noOp,this._ws.onerror=this._noOp,this._ws.onmessage=this._noOp,this._ws.close(),this._ws=null)}_updateStatus(e){this._status!==e&&"dead"!==this._status&&(this._status=e,b.logKernelStatus(this),this._statusChanged.emit(e),"dead"===e&&this.dispose())}_sendPending(){for(;"connected"===this.connectionStatus&&this._kernelSession!==v&&this._pendingMessages.length>0;)this._sendMessage(this._pendingMessages[0],!1),this._pendingMessages.shift()}_clearKernelState(){this._kernelSession="",this._pendingMessages=[],this._futures.forEach(e=>{e.dispose()}),this._comms.forEach(e=>{e.dispose()}),this._msgChain=Promise.resolve(),this._futures=new Map,this._comms=new Map,this._displayIdToParentIds.clear(),this._msgIdToDisplayIds.clear()}_assertCurrentMessage(e){if(this._errorIfDisposed(),e.header.session!==this._kernelSession)throw new Error(`Canceling handling of old message: ${e.header.msg_type}`)}async _handleCommOpen(e){this._assertCurrentMessage(e);const t=e.content,n=new d.CommHandler(t.target_name,t.comm_id,this,()=>{this._unregisterComm(t.comm_id)},this.commsOverSubshells);this._comms.set(t.comm_id,n);try{const i=await b.loadObject(t.target_name,t.target_module,this._targetRegistry);await i(n,e)}catch(e){throw n.close(),console.error("Exception opening new comm"),e}}async _handleCommClose(e){this._assertCurrentMessage(e);const t=e.content,n=this._comms.get(t.comm_id);if(!n)return void console.error("Comm not found for comm id "+t.comm_id);this._unregisterComm(n.commId);const i=n.onClose;i&&await i(e),n.dispose()}async _handleCommMsg(e){this._assertCurrentMessage(e);const t=e.content,n=this._comms.get(t.comm_id);if(!n)return;const i=n.onMsg;i&&await i(e)}_unregisterComm(e){this._comms.delete(e)}_updateConnectionStatus(e){if(this._connectionStatus!==e){if(this._connectionStatus=e,"connecting"!==e&&(this._reconnectAttempt=0,clearTimeout(this._reconnectTimeout)),"dead"!==this.status)if("connected"===e){let e=this._kernelSession===v,t=this.requestKernelInfo(),n=!1,i=()=>{n||(n=!0,e&&this._kernelSession===v&&(this._kernelSession=""),clearTimeout(s),this._pendingMessages.length>0&&this._sendPending())};t.then(i);let s=setTimeout(i,3e3)}else this._updateStatus("unknown");this._connectionStatusChanged.emit(e)}}async _handleMessage(e){var t,n;let i=!1;if(e.parent_header&&"iopub"===e.channel&&(u.isDisplayDataMsg(e)||u.isUpdateDisplayDataMsg(e)||u.isExecuteResultMsg(e))){const n=(null!==(t=e.content.transient)&&void 0!==t?t:{}).display_id;n&&(i=await this._handleDisplayId(n,e),this._assertCurrentMessage(e))}if(!i&&e.parent_header){const t=e.parent_header,i=null===(n=this._futures)||void 0===n?void 0:n.get(t.msg_id);if(i)await i.handleMsg(e),this._assertCurrentMessage(e);else{const n=t.session===this.clientId;"iopub"!==e.channel&&n&&this._unhandledMessage.emit(e)}}if("iopub"===e.channel){switch(e.header.msg_type){case"status":{const t=g.PageConfig.getOption("untracked_message_types");if(JSON.parse(t||"[]").includes(e.parent_header.msg_type))break;const n=e.content.execution_state;"restarting"===n&&Promise.resolve().then(async()=>{this._updateStatus("autorestarting"),this._clearKernelState(),await this.reconnect()}),this._updateStatus(n);break}case"comm_open":this.handleComms&&await this._handleCommOpen(e);break;case"comm_msg":this.handleComms&&await this._handleCommMsg(e);break;case"comm_close":this.handleComms&&await this._handleCommClose(e)}this.isDisposed||(this._assertCurrentMessage(e),this._iopubMessage.emit(e))}}_reconnect(){if(this._errorIfDisposed(),clearTimeout(this._reconnectTimeout),this._reconnectAttempt<this._reconnectLimit){this._updateConnectionStatus("connecting");const e=b.getRandomIntInclusive(0,1e3*(Math.pow(2,this._reconnectAttempt)-1));console.warn(`Connection lost, reconnecting in ${Math.floor(e/1e3)} seconds.`);const t=""!==this._selectedProtocol;this._reconnectTimeout=setTimeout(this._createSocket,e,t),this._reconnectAttempt+=1}else this._updateConnectionStatus("disconnected");this._clearSocket()}_errorIfDisposed(){if(this.isDisposed)throw new Error("Kernel connection is disposed")}get hasPendingInput(){return this._hasPendingInput}set hasPendingInput(e){this._hasPendingInput=e,this._pendingInput.emit(e)}}var b;t.KernelConnection=_,function(e){e.logKernelStatus=function(e){switch(e.status){case"idle":case"busy":case"unknown":return;default:console.debug(`Kernel: ${e.status} (${e.id})`)}},e.handleShellMessage=async function(e,t){return e.sendShellMessage(t,!0).done},e.loadObject=function(e,t,n){return new Promise((i,s)=>{if(t){if("undefined"==typeof requirejs)throw new Error("requirejs not found");requirejs([t],n=>{void 0===n[e]?s(new Error(`Object '${e}' not found in module '${t}'`)):i(n[e])},s)}else(null==n?void 0:n[e])?i(n[e]):s(new Error(`Object '${e}' not found in registry`))})},e.getRandomIntInclusive=function(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e}}(b||(b={}))},5287:(e,t)=>{var n=Symbol.for("react.element"),i=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.iterator,m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},f=Object.assign,g={};function v(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}function _(){}function b(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},_.prototype=v.prototype;var y=b.prototype=new _;y.constructor=b,f(y,v.prototype),y.isPureReactComponent=!0;var w=Array.isArray,x=Object.prototype.hasOwnProperty,S={current:null},C={key:!0,ref:!0,__self:!0,__source:!0};function k(e,t,i){var s,r={},o=null,a=null;if(null!=t)for(s in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(o=""+t.key),t)x.call(t,s)&&!C.hasOwnProperty(s)&&(r[s]=t[s]);var l=arguments.length-2;if(1===l)r.children=i;else if(1<l){for(var c=Array(l),d=0;d<l;d++)c[d]=arguments[d+2];r.children=c}if(e&&e.defaultProps)for(s in l=e.defaultProps)void 0===r[s]&&(r[s]=l[s]);return{$$typeof:n,type:e,key:o,ref:a,props:r,_owner:S.current}}function E(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var M=/\/+/g;function P(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function I(e,t,s,r,o){var a=typeof e;"undefined"!==a&&"boolean"!==a||(e=null);var l=!1;if(null===e)l=!0;else switch(a){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case n:case i:l=!0}}if(l)return o=o(l=e),e=""===r?"."+P(l,0):r,w(o)?(s="",null!=e&&(s=e.replace(M,"$&/")+"/"),I(o,t,s,"",function(e){return e})):null!=o&&(E(o)&&(o=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(o,s+(!o.key||l&&l.key===o.key?"":(""+o.key).replace(M,"$&/")+"/")+e)),t.push(o)),1;if(l=0,r=""===r?".":r+":",w(e))for(var c=0;c<e.length;c++){var d=r+P(a=e[c],c);l+=I(a,t,s,d,o)}else if(d=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=p&&e[p]||e["@@iterator"])?e:null}(e),"function"==typeof d)for(e=d.call(e),c=0;!(a=e.next()).done;)l+=I(a=a.value,t,s,d=r+P(a,c++),o);else if("object"===a)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function L(e,t,n){if(null==e)return e;var i=[],s=0;return I(e,i,"","",function(e){return t.call(n,e,s++)}),i}function O(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var A={current:null},D={transition:null},T={ReactCurrentDispatcher:A,ReactCurrentBatchConfig:D,ReactCurrentOwner:S};function R(){throw Error("act(...) is not supported in production builds of React.")}t.Children={map:L,forEach:function(e,t,n){L(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return L(e,function(){t++}),t},toArray:function(e){return L(e,function(e){return e})||[]},only:function(e){if(!E(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=v,t.Fragment=s,t.Profiler=o,t.PureComponent=b,t.StrictMode=r,t.Suspense=d,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=T,t.act=R,t.cloneElement=function(e,t,i){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var s=f({},e.props),r=e.key,o=e.ref,a=e._owner;if(null!=t){if(void 0!==t.ref&&(o=t.ref,a=S.current),void 0!==t.key&&(r=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)x.call(t,c)&&!C.hasOwnProperty(c)&&(s[c]=void 0===t[c]&&void 0!==l?l[c]:t[c])}var c=arguments.length-2;if(1===c)s.children=i;else if(1<c){l=Array(c);for(var d=0;d<c;d++)l[d]=arguments[d+2];s.children=l}return{$$typeof:n,type:e.type,key:r,ref:o,props:s,_owner:a}},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},t.createElement=k,t.createFactory=function(e){var t=k.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=E,t.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:O}},t.memo=function(e,t){return{$$typeof:u,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=D.transition;D.transition={};try{e()}finally{D.transition=t}},t.unstable_act=R,t.useCallback=function(e,t){return A.current.useCallback(e,t)},t.useContext=function(e){return A.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return A.current.useDeferredValue(e)},t.useEffect=function(e,t){return A.current.useEffect(e,t)},t.useId=function(){return A.current.useId()},t.useImperativeHandle=function(e,t,n){return A.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return A.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return A.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return A.current.useMemo(e,t)},t.useReducer=function(e,t,n){return A.current.useReducer(e,t,n)},t.useRef=function(e){return A.current.useRef(e)},t.useState=function(e){return A.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return A.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return A.current.useTransition()},t.version="18.3.1"},5310:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RestorablePool=void 0;const i=n(5899),s=n(1628),r=n(6903);var o;t.RestorablePool=class{constructor(e){this._added=new r.Signal(this),this._current=null,this._currentChanged=new r.Signal(this),this._hasRestored=!1,this._isDisposed=!1,this._objects=new Set,this._restore=null,this._restored=new i.PromiseDelegate,this._updated=new r.Signal(this),this.namespace=e.namespace}get added(){return this._added}get current(){return this._current}set current(e){this._current!==e&&null!==e&&this._objects.has(e)&&(this._current=e,this._currentChanged.emit(this._current))}get currentChanged(){return this._currentChanged}get isDisposed(){return this._isDisposed}get restored(){return this._restored.promise}get size(){return this._objects.size}get updated(){return this._updated}async add(e){var t,n;if(e.isDisposed){const t="A disposed object cannot be added.";throw console.warn(t,e),new Error(t)}if(this._objects.has(e)){const t="This object already exists in the pool.";throw console.warn(t,e),new Error(t)}if(this._objects.add(e),e.disposed.connect(this._onInstanceDisposed,this),!o.injectedProperty.get(e)){if(this._restore){const{connector:i}=this._restore,s=this._restore.name(e);if(s){const r=`${this.namespace}:${s}`,a=null===(n=(t=this._restore).args)||void 0===n?void 0:n.call(t,e);o.nameProperty.set(e,r),await i.save(r,{data:a})}}this._added.emit(e)}}dispose(){this.isDisposed||(this._current=null,this._isDisposed=!0,this._objects.clear(),r.Signal.clearData(this))}find(e){const t=this._objects.values();for(const n of t)if(e(n))return n}forEach(e){this._objects.forEach(e)}filter(e){const t=[];return this.forEach(n=>{e(n)&&t.push(n)}),t}inject(e){return o.injectedProperty.set(e,!0),this.add(e)}has(e){return this._objects.has(e)}async restore(e){if(this._hasRestored)throw new Error("This pool has already been restored.");this._hasRestored=!0;const{command:t,connector:n,registry:i,when:s}=e,r=this.namespace,o=s?[n.list(r)].concat(s):[n.list(r)];this._restore=e;const[a]=await Promise.all(o),l=await Promise.all(a.ids.map(async(e,s)=>{const r=a.values[s],o=r&&r.data;return void 0===o?n.remove(e):i.execute(t,o).catch(()=>n.remove(e))}));return this._restored.resolve(),l}async save(e){var t,n;const i=o.injectedProperty.get(e);if(!this._restore||!this.has(e)||i)return;const{connector:s}=this._restore,r=this._restore.name(e),a=o.nameProperty.get(e),l=r?`${this.namespace}:${r}`:"";if(a&&a!==l&&await s.remove(a),o.nameProperty.set(e,l),l){const i=null===(n=(t=this._restore).args)||void 0===n?void 0:n.call(t,e);await s.save(l,{data:i})}a!==l&&this._updated.emit(e)}_onInstanceDisposed(e){if(this._objects.delete(e),e===this._current&&(this._current=null,this._currentChanged.emit(this._current)),o.injectedProperty.get(e))return;if(!this._restore)return;const{connector:t}=this._restore,n=o.nameProperty.get(e);n&&t.remove(n)}},function(e){e.injectedProperty=new s.AttachedProperty({name:"injected",create:()=>!1}),e.nameProperty=new s.AttachedProperty({name:"name",create:()=>""})}(o||(o={}))},5338:(e,t,n)=>{var i=n(3342);t.H=i.createRoot,i.hydrateRoot},5399:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SettingManager=void 0;const i=n(6376),s=n(9531),r=n(1089);class o extends s.DataConnector{constructor(e={}){var t;super(),this.serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:r.ServerConnection.makeSettings()}async fetch(e){if(!e)throw new Error("Plugin `id` parameter is required for settings fetch.");const{serverSettings:t}=this,{baseUrl:n,appUrl:i}=t,{makeRequest:s,ResponseError:o}=r.ServerConnection,l=n+i,c=a.url(l,e),d=await s(c,{},t);if(200!==d.status)throw await o.create(d);return d.json()}async list(e){var t,n,i,s;const{serverSettings:o}=this,{baseUrl:l,appUrl:c}=o,{makeRequest:d,ResponseError:u}=r.ServerConnection,h=l+c,p=a.url(h,"","ids"===e),m=await d(p,{},o);if(200!==m.status)throw new u(m);const f=await m.json(),g=null!==(n=null===(t=null==f?void 0:f.settings)||void 0===t?void 0:t.map(e=>e.id))&&void 0!==n?n:[];let v=[];return e||(v=null!==(s=null===(i=null==f?void 0:f.settings)||void 0===i?void 0:i.map(e=>(e.data={composite:{},user:{}},e)))&&void 0!==s?s:[]),{ids:g,values:v}}async save(e,t){const{serverSettings:n}=this,{baseUrl:i,appUrl:s}=n,{makeRequest:o,ResponseError:l}=r.ServerConnection,c=i+s,d=a.url(c,e),u={body:JSON.stringify({raw:t}),method:"PUT"},h=await o(d,u,n);if(204!==h.status)throw new l(h)}}var a;t.SettingManager=o,function(e){e.url=function(e,t,n){const s=n?i.URLExt.objectToQueryString({ids_only:!0}):"",r=i.URLExt.join(e,"api/settings"),o=i.URLExt.join(r,t);if(!o.startsWith(r))throw new Error("Can only be used for workspaces requests");return`${o}${s}`}}(a||(a={}))},5412:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BaseManager=void 0;const i=n(6903),s=n(1089);t.BaseManager=class{constructor(e){var t;this._isDisposed=!1,this._disposed=new i.Signal(this),this.serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:s.ServerConnection.makeSettings()}get disposed(){return this._disposed}get isDisposed(){return this._isDisposed}get isActive(){return!0}dispose(){this.isDisposed||(this._isDisposed=!0,this._disposed.emit(void 0),i.Signal.clearData(this))}}},5899:function(e,t,n){!function(e,t){e.JSONExt=void 0,function(e){function t(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e}function n(e){return Array.isArray(e)}function i(e,s){if(e===s)return!0;if(t(e)||t(s))return!1;let r=n(e),o=n(s);return r===o&&(r&&o?function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0,s=e.length;n<s;++n)if(!i(e[n],t[n]))return!1;return!0}(e,s):function(e,t){if(e===t)return!0;for(let n in e)if(void 0!==e[n]&&!(n in t))return!1;for(let n in t)if(void 0!==t[n]&&!(n in e))return!1;for(let n in e){let s=e[n],r=t[n];if(void 0!==s||void 0!==r){if(void 0===s||void 0===r)return!1;if(!i(s,r))return!1}}return!0}(e,s))}function s(e){return t(e)?e:n(e)?function(e){let t=new Array(e.length);for(let n=0,i=e.length;n<i;++n)t[n]=s(e[n]);return t}(e):function(e){let t={};for(let n in e){let i=e[n];void 0!==i&&(t[n]=s(i))}return t}(e)}e.emptyObject=Object.freeze({}),e.emptyArray=Object.freeze([]),e.isPrimitive=t,e.isArray=n,e.isObject=function(e){return!t(e)&&!n(e)},e.deepEqual=i,e.deepCopy=s}(e.JSONExt||(e.JSONExt={}));var n;!function(e){class n{constructor(e){var t,n,i,s;this._activated=!1,this._promise=null,this._service=null,this.id=e.id,this.description=null!==(t=e.description)&&void 0!==t?t:"",this.activate=e.activate,this.deactivate=null!==(n=e.deactivate)&&void 0!==n?n:null,this.provides=null!==(i=e.provides)&&void 0!==i?i:null,this.autoStart=null!==(s=e.autoStart)&&void 0!==s&&s,this.requires=e.requires?e.requires.slice():[],this.optional=e.optional?e.optional.slice():[]}get activated(){return this._activated}set activated(e){this._activated=e}get service(){return this._service}set service(e){this._service=e}get promise(){return this._promise}set promise(e){this._promise=e}}e.createPluginData=function(e){return new n(e)},e.ensureNoCycle=function(e,t,n){const i=[...e.requires,...e.optional],s=i=>{if(i===e.provides)return!0;const o=n.get(i);if(!o)return!1;const a=t.get(o),l=[...a.requires,...a.optional];return 0!==l.length&&(r.push(o),!!l.some(s)||(r.pop(),!1))};if(!e.provides||0===i.length)return;const r=[e.id];if(i.some(s))throw new ReferenceError(`Cycle detected: ${r.join(" -> ")}.`)},e.findDependents=function(e,n,i){const s=new Array,r=e=>{const t=n.get(e),r=[...t.requires,...t.optional];s.push(...r.reduce((t,n)=>{const s=i.get(n);return s&&t.push([e,s]),t},[]))};for(const e of n.keys())r(e);const o=s.filter(t=>t[1]===e);let a=0;for(;o.length>a;){const e=o.length,t=new Set(o.map(e=>e[0]));for(const e of t)s.filter(t=>t[1]===e).forEach(e=>{o.includes(e)||o.push(e)});a=e}const l=t.topologicSort(o),c=l.findIndex(t=>t===e);return-1===c?[e]:l.slice(0,c+1)},e.collectStartupPlugins=function(e,t){const n=new Set;for(const t of e.keys())!0===e.get(t).autoStart&&n.add(t);if(t.startPlugins)for(const e of t.startPlugins)n.add(e);if(t.ignorePlugins)for(const e of t.ignorePlugins)n.delete(e);return Array.from(n)}}(n||(n={}));function i(e){let t=0;for(let n=0,i=e.length;n<i;++n)n%4==0&&(t=4294967295*Math.random()>>>0),e[n]=255&t,t>>>=8}e.Random=void 0,(e.Random||(e.Random={})).getRandomValues=(()=>{const e="undefined"!=typeof window&&(window.crypto||window.msCrypto)||null;return e&&"function"==typeof e.getRandomValues?function(t){return e.getRandomValues(t)}:i})(),e.UUID=void 0,(e.UUID||(e.UUID={})).uuid4=function(e){const t=new Uint8Array(16),n=new Array(256);for(let e=0;e<16;++e)n[e]="0"+e.toString(16);for(let e=16;e<256;++e)n[e]=e.toString(16);return function(){return e(t),t[6]=64|15&t[6],t[8]=128|63&t[8],n[t[0]]+n[t[1]]+n[t[2]]+n[t[3]]+"-"+n[t[4]]+n[t[5]]+"-"+n[t[6]]+n[t[7]]+"-"+n[t[8]]+n[t[9]]+"-"+n[t[10]]+n[t[11]]+n[t[12]]+n[t[13]]+n[t[14]]+n[t[15]]}}(e.Random.getRandomValues),e.MimeData=class{constructor(){this._types=[],this._values=[]}types(){return this._types.slice()}hasData(e){return-1!==this._types.indexOf(e)}getData(e){let t=this._types.indexOf(e);return-1!==t?this._values[t]:void 0}setData(e,t){this.clearData(e),this._types.push(e),this._values.push(t)}clearData(e){let t=this._types.indexOf(e);-1!==t&&(this._types.splice(t,1),this._values.splice(t,1))}clear(){this._types.length=0,this._values.length=0}},e.PluginRegistry=class{constructor(e={}){this._application=null,this._validatePlugin=()=>!0,this._plugins=new Map,this._services=new Map,e.validatePlugin&&(console.info("Plugins may be rejected by the custom validation plugin method."),this._validatePlugin=e.validatePlugin)}get application(){return this._application}set application(e){if(null!==this._application)throw Error("PluginRegistry.application is already set. It cannot be overridden.");this._application=e}get deferredPlugins(){return Array.from(this._plugins).filter(([e,t])=>"defer"===t.autoStart).map(([e,t])=>e)}getPluginDescription(e){var t,n;return null!==(n=null===(t=this._plugins.get(e))||void 0===t?void 0:t.description)&&void 0!==n?n:""}hasPlugin(e){return this._plugins.has(e)}isPluginActivated(e){var t,n;return null!==(n=null===(t=this._plugins.get(e))||void 0===t?void 0:t.activated)&&void 0!==n&&n}listPlugins(){return Array.from(this._plugins.keys())}registerPlugin(e){if(this._plugins.has(e.id))throw new TypeError(`Plugin '${e.id}' is already registered.`);if(!this._validatePlugin(e))throw new Error(`Plugin '${e.id}' is not valid.`);const t=n.createPluginData(e);n.ensureNoCycle(t,this._plugins,this._services),t.provides&&this._services.set(t.provides,t.id),this._plugins.set(t.id,t)}registerPlugins(e){for(const t of e)this.registerPlugin(t)}deregisterPlugin(e,t){const n=this._plugins.get(e);if(n){if(n.activated&&!t)throw new Error(`Plugin '${e}' is still active.`);this._plugins.delete(e)}}async activatePlugin(e){const t=this._plugins.get(e);if(!t)throw new ReferenceError(`Plugin '${e}' is not registered.`);if(t.activated)return;if(t.promise)return t.promise;const n=t.requires.map(e=>this.resolveRequiredService(e)),i=t.optional.map(e=>this.resolveOptionalService(e));return t.promise=Promise.all([...n,...i]).then(e=>t.activate.apply(void 0,[this.application,...e])).then(e=>{t.service=e,t.activated=!0,t.promise=null}).catch(e=>{throw t.promise=null,e}),t.promise}async activatePlugins(e,t={}){switch(e){case"defer":{const e=this.deferredPlugins.filter(e=>this._plugins.get(e).autoStart).map(e=>this.activatePlugin(e));await Promise.all(e);break}case"startUp":{const e=n.collectStartupPlugins(this._plugins,t).map(async e=>{try{return await this.activatePlugin(e)}catch(t){console.error(`Plugin '${e}' failed to activate.`,t)}});await Promise.all(e);break}}}async deactivatePlugin(e){const t=this._plugins.get(e);if(!t)throw new ReferenceError(`Plugin '${e}' is not registered.`);if(!t.activated)return[];if(!t.deactivate)throw new TypeError(`Plugin '${e}'#deactivate() method missing`);const i=n.findDependents(e,this._plugins,this._services),s=i.map(e=>this._plugins.get(e));for(const t of s)if(!t.deactivate)throw new TypeError(`Plugin ${t.id}#deactivate() method missing (depends on ${e})`);for(const e of s){const t=[...e.requires,...e.optional].map(e=>{const t=this._services.get(e);return t?this._plugins.get(t).service:null});await e.deactivate(this.application,...t),e.service=null,e.activated=!1}return i.pop(),i}async resolveRequiredService(e){const t=this._services.get(e);if(!t)throw new TypeError(`No provider for: ${e.name}.`);const n=this._plugins.get(t);return n.activated||await this.activatePlugin(t),n.service}async resolveOptionalService(e){const t=this._services.get(e);if(!t)return null;const n=this._plugins.get(t);if(!n.activated)try{await this.activatePlugin(t)}catch(e){return console.error(e),null}return n.service}},e.PromiseDelegate=class{constructor(){this.promise=new Promise((e,t)=>{this._resolve=e,this._reject=t})}resolve(e){(0,this._resolve)(e)}reject(e){(0,this._reject)(e)}},e.Token=class{constructor(e,t){this.name=e,this.description=null!=t?t:"",this._tokenStructuralPropertyT=null}}}(t,n(6588))},6073:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,s)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return s(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.KernelShellFutureHandler=t.KernelControlFutureHandler=t.KernelFutureHandler=void 0;const o=n(5899),a=n(785),l=r(n(9798));class c extends a.DisposableDelegate{constructor(e,t,n,i,s){super(e),this._status=0,this._stdin=d.noOp,this._iopub=d.noOp,this._reply=d.noOp,this._done=new o.PromiseDelegate,this._hooks=new d.HookList,this._disposeOnDone=!0,this._msg=t,n||this._setFlag(d.KernelFutureFlag.GotReply),this._disposeOnDone=i,this._kernel=s}get msg(){return this._msg}get done(){return this._done.promise}get onReply(){return this._reply}set onReply(e){this._reply=e}get onIOPub(){return this._iopub}set onIOPub(e){this._iopub=e}get onStdin(){return this._stdin}set onStdin(e){this._stdin=e}registerMessageHook(e){if(this.isDisposed)throw new Error("Kernel future is disposed");this._hooks.add(e)}removeMessageHook(e){this.isDisposed||this._hooks.remove(e)}sendInputReply(e,t){this._kernel.sendInputReply(e,t)}dispose(){this._stdin=d.noOp,this._iopub=d.noOp,this._reply=d.noOp,this._hooks=null,this._testFlag(d.KernelFutureFlag.IsDone)||(this._done.promise.catch(()=>{}),this._done.reject(new Error(`Canceled future for ${this.msg.header.msg_type} message before replies were done`))),super.dispose()}async handleMsg(e){switch(e.channel){case"control":case"shell":e.channel===this.msg.channel&&e.parent_header.msg_id===this.msg.header.msg_id&&await this._handleReply(e);break;case"stdin":await this._handleStdin(e);break;case"iopub":await this._handleIOPub(e)}}async _handleReply(e){const t=this._reply;t&&await t(e),this._replyMsg=e,this._setFlag(d.KernelFutureFlag.GotReply),this._testFlag(d.KernelFutureFlag.GotIdle)&&this._handleDone()}async _handleStdin(e){this._kernel.hasPendingInput=!0;const t=this._stdin;t&&await t(e)}async _handleIOPub(e){const t=await this._hooks.process(e),n=this._iopub;t&&n&&await n(e),l.isStatusMsg(e)&&"idle"===e.content.execution_state&&(this._setFlag(d.KernelFutureFlag.GotIdle),this._testFlag(d.KernelFutureFlag.GotReply)&&this._handleDone())}_handleDone(){this._testFlag(d.KernelFutureFlag.IsDone)||(this._setFlag(d.KernelFutureFlag.IsDone),this._done.resolve(this._replyMsg),this._disposeOnDone&&this.dispose())}_testFlag(e){return 0!==(this._status&e)}_setFlag(e){this._status|=e}}var d;t.KernelFutureHandler=c,t.KernelControlFutureHandler=class extends c{},t.KernelShellFutureHandler=class extends c{},function(e){e.noOp=()=>{};const t="function"==typeof requestAnimationFrame?requestAnimationFrame:setImmediate;let n;e.HookList=class{constructor(){this._hooks=[]}add(e){this.remove(e),this._hooks.push(e)}remove(e){const t=this._hooks.indexOf(e);t>=0&&(this._hooks[t]=null,this._scheduleCompact())}async process(e){await this._processing;const t=new o.PromiseDelegate;let n;this._processing=t.promise;for(let i=this._hooks.length-1;i>=0;i--){const s=this._hooks[i];if(null!==s){try{n=await s(e)}catch(e){n=!0,console.error(e)}if(!1===n)return t.resolve(void 0),!1}}return t.resolve(void 0),!0}_scheduleCompact(){this._compactScheduled||(this._compactScheduled=!0,t(()=>{this._processing=this._processing.then(()=>{this._compactScheduled=!1,this._compact()})}))}_compact(){let e=0;for(let t=0,n=this._hooks.length;t<n;t++){const n=this._hooks[t];null===this._hooks[t]?e++:this._hooks[t-e]=n}this._hooks.length-=e}},function(e){e[e.GotReply=1]="GotReply",e[e.GotIdle=2]="GotIdle",e[e.IsDone=4]="IsDone",e[e.DisposeOnDone=8]="DisposeOnDone"}(n=e.KernelFutureFlag||(e.KernelFutureFlag={}))}(d||(d={}))},6224:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.KernelSpecManager=void 0;const i=n(5899),s=n(8534),r=n(6903),o=n(5412),a=n(321);class l extends o.BaseManager{constructor(e={}){var t,n;super(e),this._isReady=!1,this._connectionFailure=new r.Signal(this),this._specs=null,this._specsChanged=new r.Signal(this),this._kernelSpecAPIClient=null!==(t=e.kernelSpecAPIClient)&&void 0!==t?t:new a.KernelSpecAPIClient({serverSettings:this.serverSettings}),this._ready=Promise.all([this.requestSpecs()]).then(e=>{}).catch(e=>{}).then(()=>{this.isDisposed||(this._isReady=!0)}),this._pollSpecs=new s.Poll({auto:!1,factory:()=>this.requestSpecs(),frequency:{interval:61e3,backoff:!0,max:3e5},name:"@jupyterlab/services:KernelSpecManager#specs",standby:null!==(n=e.standby)&&void 0!==n?n:"when-hidden"}),this.ready.then(()=>{this._pollSpecs.start()})}get isReady(){return this._isReady}get ready(){return this._ready}get specs(){return this._specs}get specsChanged(){return this._specsChanged}get connectionFailure(){return this._connectionFailure}dispose(){this._pollSpecs.dispose(),super.dispose()}async refreshSpecs(){await this._pollSpecs.refresh(),await this._pollSpecs.tick}async requestSpecs(){const e=await this._kernelSpecAPIClient.get();this.isDisposed||i.JSONExt.deepEqual(e,this._specs)||(this._specs=e,this._specsChanged.emit(e))}}t.KernelSpecManager=l},6376:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,s)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),s=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),s(n(5013),t),s(n(3106),t),s(n(4477),t),s(n(7484),t),s(n(2279),t),s(n(7169),t),s(n(7058),t),s(n(121),t),s(n(9659),t),s(n(7881),t),s(n(8378),t)},6379:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var i=n(8510),s=n(4591),r=n(4798),o=function(){return i.create()},a=function(){function e(e){var t=this,n=e.autoGenerateTag;this.cssRaw=function(e){e&&(t._raw+=e||"",t._pendingRawChange=!0,t._styleUpdated())},this.cssRule=function(e){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=s.convertToStyles(r.extend.apply(void 0,n));t._freeStyle.registerRule(e,o),t._styleUpdated()},this.forceRenderStyles=function(){var e=t._getTag();e&&(e.textContent=t.getStyles())},this.fontFace=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];for(var i=t._freeStyle,s=0,r=e;s<r.length;s++){var o=r[s];i.registerRule("@font-face",o)}t._styleUpdated()},this.getStyles=function(){return(t._raw||"")+t._freeStyle.getStyles()},this.keyframes=function(e){var n=s.convertToKeyframes(e),i=t._freeStyle.registerKeyframes(n);return t._styleUpdated(),i},this.reinit=function(){var e=o();t._freeStyle=e,t._lastFreeStyleChangeId=e.changeId,t._raw="",t._pendingRawChange=!1;var n=t._getTag();n&&(n.textContent="")},this.setStylesTarget=function(e){t._tag&&(t._tag.textContent=""),t._tag=e,t.forceRenderStyles()},this.stylesheet=function(e){for(var n={},i=0,s=Object.getOwnPropertyNames(e);i<s.length;i++){var r=s[i],o=e[r];o&&(o.$debugName=r,n[r]=t.style(o))}return n};var i=o();this._autoGenerateTag=n,this._freeStyle=i,this._lastFreeStyleChangeId=i.changeId,this._pending=0,this._pendingRawChange=!1,this._raw="",this._tag=void 0,this.style=this.style.bind(this)}return e.prototype._afterAllSync=function(e){var t=this;this._pending++;var n=this._pending;r.raf(function(){n===t._pending&&e()})},e.prototype._getTag=function(){if(this._tag)return this._tag;if(this._autoGenerateTag){var e="undefined"==typeof window?{textContent:""}:document.createElement("style");return"undefined"!=typeof document&&document.head.appendChild(e),this._tag=e,e}},e.prototype._styleUpdated=function(){var e=this,t=this._freeStyle.changeId,n=this._lastFreeStyleChangeId;(this._pendingRawChange||t!==n)&&(this._lastFreeStyleChangeId=t,this._pendingRawChange=!1,this._afterAllSync(function(){return e.forceRenderStyles()}))},e.prototype.style=function(){var e=this._freeStyle.registerStyle(s.convertToStyles(r.extend.apply(void 0,arguments)));return this._styleUpdated(),e},e}();t.TypeStyle=a},6540:(e,t,n)=>{e.exports=n(5287)},6588:(e,t,n)=>{var i,s,r;function*o(...e){for(const t of e)yield*t}function*a(){}function*l(e,t=0){for(const n of e)yield[t++,n]}function*c(e,t){let n=0;for(const i of e)t(i,n++)&&(yield i)}function d(e,t){let n=0;for(const i of e)if(t(i,n++))return i}function u(e,t){let n=0;for(const i of e)if(t(i,n++))return n-1;return-1}function h(e,t){let n;for(const i of e)void 0!==n?t(i,n)<0&&(n=i):n=i;return n}function p(e,t){let n;for(const i of e)void 0!==n?t(i,n)>0&&(n=i):n=i;return n}function m(e,t){let n,i,s=!0;for(const r of e)s?(n=r,i=r,s=!1):t(r,n)<0?n=r:t(r,i)>0&&(i=r);return s?void 0:[n,i]}function f(e){return Array.from(e)}function g(e){const t={};for(const[n,i]of e)t[n]=i;return t}function v(e,t){let n=0;for(const i of e)if(!1===t(i,n++))return}function _(e,t){let n=0;for(const i of e)if(!1===t(i,n++))return!1;return!0}function b(e,t){let n=0;for(const i of e)if(t(i,n++))return!0;return!1}function*y(e,t){let n=0;for(const i of e)yield t(i,n++)}function*w(e,t,n){void 0===t?(t=e,e=0,n=1):void 0===n&&(n=1);const i=s.rangeLength(e,t,n);for(let t=0;t<i;t++)yield e+n*t}function x(e,t,n){const i=e[Symbol.iterator]();let s=0,r=i.next();if(r.done&&void 0===n)throw new TypeError("Reduce of empty iterable with no initial value.");if(r.done)return n;let o,a,l=i.next();if(l.done&&void 0===n)return r.value;if(l.done)return t(n,r.value,s++);for(o=t(void 0===n?r.value:t(n,r.value,s++),l.value,s++);!(a=i.next()).done;)o=t(o,a.value,s++);return o}function*S(e,t){for(;0<t--;)yield e}function*C(e){yield e}function*k(e){if("function"==typeof e.retro)yield*e.retro();else for(let t=e.length-1;t>-1;t--)yield e[t]}function E(e){let t=[],n=new Set,i=new Map;for(const t of e)s(t);for(const[e]of i)r(e);return t;function s(e){let[t,n]=e,s=i.get(n);s?s.push(t):i.set(n,[t])}function r(e){if(n.has(e))return;n.add(e);let s=i.get(e);if(s)for(const e of s)r(e);t.push(e)}}function*M(e,t){let n=0;for(const i of e)0===n++%t&&(yield i)}function*P(e,t){if(t<1)return;const n=e[Symbol.iterator]();let i;for(;0<t--&&!(i=n.next()).done;)yield i.value}function*I(...e){const t=e.map(e=>e[Symbol.iterator]());let n=t.map(e=>e.next());for(;_(n,e=>!e.done);n=t.map(e=>e.next()))yield n.map(e=>e.value)}n.r(t),n.d(t,{ArrayExt:()=>i,StringExt:()=>r,chain:()=>o,each:()=>v,empty:()=>a,enumerate:()=>l,every:()=>_,filter:()=>c,find:()=>d,findIndex:()=>u,map:()=>y,max:()=>p,min:()=>h,minmax:()=>m,once:()=>C,range:()=>w,reduce:()=>x,repeat:()=>S,retro:()=>k,some:()=>b,stride:()=>M,take:()=>P,toArray:()=>f,toObject:()=>g,topologicSort:()=>E,zip:()=>I}),function(e){function t(e,t,n=0,i=-1){let s,r=e.length;if(0===r)return-1;n=n<0?Math.max(0,n+r):Math.min(n,r-1),s=(i=i<0?Math.max(0,i+r):Math.min(i,r-1))<n?i+1+(r-n):i-n+1;for(let i=0;i<s;++i){let s=(n+i)%r;if(e[s]===t)return s}return-1}function n(e,t,n=-1,i=0){let s,r=e.length;if(0===r)return-1;s=(n=n<0?Math.max(0,n+r):Math.min(n,r-1))<(i=i<0?Math.max(0,i+r):Math.min(i,r-1))?n+1+(r-i):n-i+1;for(let i=0;i<s;++i){let s=(n-i+r)%r;if(e[s]===t)return s}return-1}function i(e,t,n=0,i=-1){let s,r=e.length;if(0===r)return-1;n=n<0?Math.max(0,n+r):Math.min(n,r-1),s=(i=i<0?Math.max(0,i+r):Math.min(i,r-1))<n?i+1+(r-n):i-n+1;for(let i=0;i<s;++i){let s=(n+i)%r;if(t(e[s],s))return s}return-1}function s(e,t,n=-1,i=0){let s,r=e.length;if(0===r)return-1;s=(n=n<0?Math.max(0,n+r):Math.min(n,r-1))<(i=i<0?Math.max(0,i+r):Math.min(i,r-1))?n+1+(r-i):n-i+1;for(let i=0;i<s;++i){let s=(n-i+r)%r;if(t(e[s],s))return s}return-1}function r(e,t=0,n=-1){let i=e.length;if(!(i<=1))for(t=t<0?Math.max(0,t+i):Math.min(t,i-1),n=n<0?Math.max(0,n+i):Math.min(n,i-1);t<n;){let i=e[t],s=e[n];e[t++]=s,e[n--]=i}}function o(e,t){let n=e.length;if(t<0&&(t+=n),t<0||t>=n)return;let i=e[t];for(let i=t+1;i<n;++i)e[i-1]=e[i];return e.length=n-1,i}e.firstIndexOf=t,e.lastIndexOf=n,e.findFirstIndex=i,e.findLastIndex=s,e.findFirstValue=function(e,t,n=0,s=-1){let r=i(e,t,n,s);return-1!==r?e[r]:void 0},e.findLastValue=function(e,t,n=-1,i=0){let r=s(e,t,n,i);return-1!==r?e[r]:void 0},e.lowerBound=function(e,t,n,i=0,s=-1){let r=e.length;if(0===r)return 0;let o=i=i<0?Math.max(0,i+r):Math.min(i,r-1),a=(s=s<0?Math.max(0,s+r):Math.min(s,r-1))-i+1;for(;a>0;){let i=a>>1,s=o+i;n(e[s],t)<0?(o=s+1,a-=i+1):a=i}return o},e.upperBound=function(e,t,n,i=0,s=-1){let r=e.length;if(0===r)return 0;let o=i=i<0?Math.max(0,i+r):Math.min(i,r-1),a=(s=s<0?Math.max(0,s+r):Math.min(s,r-1))-i+1;for(;a>0;){let i=a>>1,s=o+i;n(e[s],t)>0?a=i:(o=s+1,a-=i+1)}return o},e.shallowEqual=function(e,t,n){if(e===t)return!0;if(e.length!==t.length)return!1;for(let i=0,s=e.length;i<s;++i)if(n?!n(e[i],t[i]):e[i]!==t[i])return!1;return!0},e.slice=function(e,t={}){let{start:n,stop:i,step:s}=t;if(void 0===s&&(s=1),0===s)throw new Error("Slice `step` cannot be zero.");let r,o=e.length;void 0===n?n=s<0?o-1:0:n<0?n=Math.max(n+o,s<0?-1:0):n>=o&&(n=s<0?o-1:o),void 0===i?i=s<0?-1:o:i<0?i=Math.max(i+o,s<0?-1:0):i>=o&&(i=s<0?o-1:o),r=s<0&&i>=n||s>0&&n>=i?0:s<0?Math.floor((i-n+1)/s+1):Math.floor((i-n-1)/s+1);let a=[];for(let t=0;t<r;++t)a[t]=e[n+t*s];return a},e.move=function(e,t,n){let i=e.length;if(i<=1)return;if((t=t<0?Math.max(0,t+i):Math.min(t,i-1))===(n=n<0?Math.max(0,n+i):Math.min(n,i-1)))return;let s=e[t],r=t<n?1:-1;for(let i=t;i!==n;i+=r)e[i]=e[i+r];e[n]=s},e.reverse=r,e.rotate=function(e,t,n=0,i=-1){let s=e.length;if(s<=1)return;if((n=n<0?Math.max(0,n+s):Math.min(n,s-1))>=(i=i<0?Math.max(0,i+s):Math.min(i,s-1)))return;let o=i-n+1;if(t>0?t%=o:t<0&&(t=(t%o+o)%o),0===t)return;let a=n+t;r(e,n,a-1),r(e,a,i),r(e,n,i)},e.fill=function(e,t,n=0,i=-1){let s,r=e.length;if(0!==r){n=n<0?Math.max(0,n+r):Math.min(n,r-1),s=(i=i<0?Math.max(0,i+r):Math.min(i,r-1))<n?i+1+(r-n):i-n+1;for(let i=0;i<s;++i)e[(n+i)%r]=t}},e.insert=function(e,t,n){let i=e.length;t=t<0?Math.max(0,t+i):Math.min(t,i);for(let n=i;n>t;--n)e[n]=e[n-1];e[t]=n},e.removeAt=o,e.removeFirstOf=function(e,n,i=0,s=-1){let r=t(e,n,i,s);return-1!==r&&o(e,r),r},e.removeLastOf=function(e,t,i=-1,s=0){let r=n(e,t,i,s);return-1!==r&&o(e,r),r},e.removeAllOf=function(e,t,n=0,i=-1){let s=e.length;if(0===s)return 0;n=n<0?Math.max(0,n+s):Math.min(n,s-1),i=i<0?Math.max(0,i+s):Math.min(i,s-1);let r=0;for(let o=0;o<s;++o)n<=i&&o>=n&&o<=i&&e[o]===t||i<n&&(o<=i||o>=n)&&e[o]===t?r++:r>0&&(e[o-r]=e[o]);return r>0&&(e.length=s-r),r},e.removeFirstWhere=function(e,t,n=0,s=-1){let r,a=i(e,t,n,s);return-1!==a&&(r=o(e,a)),{index:a,value:r}},e.removeLastWhere=function(e,t,n=-1,i=0){let r,a=s(e,t,n,i);return-1!==a&&(r=o(e,a)),{index:a,value:r}},e.removeAllWhere=function(e,t,n=0,i=-1){let s=e.length;if(0===s)return 0;n=n<0?Math.max(0,n+s):Math.min(n,s-1),i=i<0?Math.max(0,i+s):Math.min(i,s-1);let r=0;for(let o=0;o<s;++o)n<=i&&o>=n&&o<=i&&t(e[o],o)||i<n&&(o<=i||o>=n)&&t(e[o],o)?r++:r>0&&(e[o-r]=e[o]);return r>0&&(e.length=s-r),r}}(i||(i={})),function(e){e.rangeLength=function(e,t,n){return 0===n?1/0:e>t&&n>0||e<t&&n<0?0:Math.ceil((t-e)/n)}}(s||(s={})),function(e){function t(e,t,n=0){let i=new Array(t.length);for(let s=0,r=n,o=t.length;s<o;++s,++r){if(r=e.indexOf(t[s],r),-1===r)return null;i[s]=r}return i}e.findIndices=t,e.matchSumOfSquares=function(e,n,i=0){let s=t(e,n,i);if(!s)return null;let r=0;for(let e=0,t=s.length;e<t;++e){let t=s[e]-i;r+=t*t}return{score:r,indices:s}},e.matchSumOfDeltas=function(e,n,i=0){let s=t(e,n,i);if(!s)return null;let r=0,o=i-1;for(let e=0,t=s.length;e<t;++e){let t=s[e];r+=t-o-1,o=t}return{score:r,indices:s}},e.highlight=function(e,t,n){let i=[],s=0,r=0,o=t.length;for(;s<o;){let a=t[s],l=t[s];for(;++s<o&&t[s]===l+1;)l++;r<a&&i.push(e.slice(r,a)),a<l+1&&i.push(n(e.slice(a,l+1))),r=l+1}return r<e.length&&i.push(e.slice(r)),i},e.cmp=function(e,t){return e<t?-1:e>t?1:0}}(r||(r={}))},6807:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,s)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return s(t,e),t},o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.KernelSpecAPI=t.KernelSpec=void 0;const a=r(n(1229));t.KernelSpec=a;const l=r(n(321));t.KernelSpecAPI=l,o(n(6224),t)},6810:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalManager=void 0;const i=n(8534),s=n(6903),r=n(608),o=n(5412),a=n(4903),l=n(2100);class c extends o.BaseManager{constructor(e={}){var t,n;if(super(e),this._isReady=!1,this._names=[],this._terminalConnections=new Set,this._runningChanged=new s.Signal(this),this._connectionFailure=new s.Signal(this),this._terminalAPIClient=null!==(t=e.terminalAPIClient)&&void 0!==t?t:new a.TerminalAPIClient({serverSettings:this.serverSettings}),!this.isAvailable())return this._ready=Promise.reject("Terminals unavailable"),void this._ready.catch(e=>{});const r=this._pollModels=new i.Poll({auto:!1,factory:()=>this.requestRunning(),frequency:{interval:1e4,backoff:!0,max:3e5},name:"@jupyterlab/services:TerminalManager#models",standby:null!==(n=e.standby)&&void 0!==n?n:"when-hidden"});this._ready=(async()=>{await r.start(),await r.tick,this._isReady=!0})()}get isReady(){return this._isReady}get ready(){return this._ready}get runningChanged(){return this._runningChanged}get connectionFailure(){return this._connectionFailure}dispose(){var e;this.isDisposed||(this._names.length=0,this._terminalConnections.forEach(e=>e.dispose()),null===(e=this._pollModels)||void 0===e||e.dispose(),super.dispose())}isAvailable(){return this._terminalAPIClient.isAvailable}connectTo(e){const t=new l.TerminalConnection({...e,serverSettings:this.serverSettings,terminalAPIClient:this._terminalAPIClient});return this._onStarted(t),this._names.includes(e.model.name)||this.refreshRunning().catch(()=>{}),t}running(){return this._models[Symbol.iterator]()}async refreshRunning(){this._pollModels&&(await this._pollModels.refresh(),await this._pollModels.tick)}async startNew(e={}){const{name:t,cwd:n}=e,i=await this._terminalAPIClient.startNew({name:t,cwd:n});return await this.refreshRunning(),this.connectTo({model:i})}async shutdown(e){await this._terminalAPIClient.shutdown(e),await this.refreshRunning()}async shutdownAll(){await this.refreshRunning(),await Promise.all(this._names.map(e=>this._terminalAPIClient.shutdown(e))),await this.refreshRunning()}async requestRunning(){var e,t;let n;try{n=await this._terminalAPIClient.listRunning()}catch(n){throw(n instanceof r.ServerConnection.NetworkError||503===(null===(e=n.response)||void 0===e?void 0:e.status)||424===(null===(t=n.response)||void 0===t?void 0:t.status))&&this._connectionFailure.emit(n),n}if(this.isDisposed)return;const i=n.map(({name:e})=>e).sort();i!==this._names&&(this._names=i,this._terminalConnections.forEach(e=>{i.includes(e.name)||e.dispose()}),this._runningChanged.emit(this._models))}_onStarted(e){this._terminalConnections.add(e),e.disposed.connect(this._onDisposed,this)}_onDisposed(e){this._terminalConnections.delete(e),this.refreshRunning().catch(()=>{})}get _models(){return this._names.map(e=>({name:e}))}}t.TerminalManager=c,function(e){e.NoopManager=class extends e{constructor(){super(...arguments),this._readyPromise=new Promise(()=>{})}get isActive(){return!1}get parentReady(){return super.ready}get ready(){return this.parentReady.then(()=>this._readyPromise)}async startNew(e){return Promise.reject(new Error("Not implemented in no-op Terminal Manager"))}connectTo(e){throw Error("Not implemented in no-op Terminal Manager")}async shutdown(e){return Promise.reject(new Error("Not implemented in no-op Terminal Manager"))}async requestRunning(){return Promise.resolve()}}}(c||(t.TerminalManager=c={}))},6830:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SessionConnection=void 0;const i=n(6903),s=n(608),r=n(5899),o=n(637);t.SessionConnection=class{constructor(e){var t,n,a,l,c;this._id="",this._path="",this._name="",this._type="",this._kernel=null,this._isDisposed=!1,this._disposed=new i.Signal(this),this._kernelChanged=new i.Signal(this),this._statusChanged=new i.Signal(this),this._connectionStatusChanged=new i.Signal(this),this._pendingInput=new i.Signal(this),this._iopubMessage=new i.Signal(this),this._unhandledMessage=new i.Signal(this),this._anyMessage=new i.Signal(this),this._propertyChanged=new i.Signal(this),this._id=e.model.id,this._name=e.model.name,this._path=e.model.path,this._type=e.model.type,this._username=null!==(t=e.username)&&void 0!==t?t:"",this._clientId=null!==(n=e.clientId)&&void 0!==n?n:r.UUID.uuid4(),this._connectToKernel=e.connectToKernel,this._kernelConnectionOptions=null!==(a=e.kernelConnectionOptions)&&void 0!==a?a:{},this.serverSettings=null!==(l=e.serverSettings)&&void 0!==l?l:s.ServerConnection.makeSettings(),this._sessionAPIClient=null!==(c=e.sessionAPIClient)&&void 0!==c?c:new o.SessionAPIClient({serverSettings:this.serverSettings}),this.setupKernel(e.model.kernel)}get disposed(){return this._disposed}get kernelChanged(){return this._kernelChanged}get statusChanged(){return this._statusChanged}get connectionStatusChanged(){return this._connectionStatusChanged}get pendingInput(){return this._pendingInput}get iopubMessage(){return this._iopubMessage}get unhandledMessage(){return this._unhandledMessage}get anyMessage(){return this._anyMessage}get propertyChanged(){return this._propertyChanged}get id(){return this._id}get kernel(){return this._kernel}get path(){return this._path}get type(){return this._type}get name(){return this._name}get model(){return{id:this.id,kernel:this.kernel&&{id:this.kernel.id,name:this.kernel.name},path:this._path,type:this._type,name:this._name}}get isDisposed(){return this._isDisposed}update(e){const t=this.model;if(this._path=e.path,this._name=e.name,this._type=e.type,null===this._kernel&&null!==e.kernel||null!==this._kernel&&null===e.kernel||null!==this._kernel&&null!==e.kernel&&this._kernel.id!==e.kernel.id){null!==this._kernel&&this._kernel.dispose();const t=this._kernel||null;this.setupKernel(e.kernel);const n=this._kernel||null;this._kernelChanged.emit({name:"kernel",oldValue:t,newValue:n})}this._handleModelChange(t)}dispose(){if(!this.isDisposed){if(this._isDisposed=!0,this._disposed.emit(),this._kernel){this._kernel.dispose();const e=this._kernel;this._kernel=null;const t=this._kernel;this._kernelChanged.emit({name:"kernel",oldValue:e,newValue:t})}i.Signal.clearData(this)}}async setPath(e){if(this.isDisposed)throw new Error("Session is disposed");await this._patch({path:e})}async setName(e){if(this.isDisposed)throw new Error("Session is disposed");await this._patch({name:e})}async setType(e){if(this.isDisposed)throw new Error("Session is disposed");await this._patch({type:e})}async changeKernel(e){if(this.isDisposed)throw new Error("Session is disposed");return await this._patch({kernel:e}),this.kernel}async shutdown(){if(this.isDisposed)throw new Error("Session is disposed");await this._sessionAPIClient.shutdown(this.id),this.dispose()}setupKernel(e){if(null===e)return void(this._kernel=null);const t=this._connectToKernel({...this._kernelConnectionOptions,model:e,username:this._username,clientId:this._clientId,serverSettings:this.serverSettings});this._kernel=t,t.statusChanged.connect(this.onKernelStatus,this),t.connectionStatusChanged.connect(this.onKernelConnectionStatus,this),t.pendingInput.connect(this.onPendingInput,this),t.unhandledMessage.connect(this.onUnhandledMessage,this),t.iopubMessage.connect(this.onIOPubMessage,this),t.anyMessage.connect(this.onAnyMessage,this)}onKernelStatus(e,t){this._statusChanged.emit(t)}onKernelConnectionStatus(e,t){this._connectionStatusChanged.emit(t)}onPendingInput(e,t){this._pendingInput.emit(t)}onIOPubMessage(e,t){this._iopubMessage.emit(t)}onUnhandledMessage(e,t){this._unhandledMessage.emit(t)}onAnyMessage(e,t){this._anyMessage.emit(t)}async _patch(e){const t=await this._sessionAPIClient.update({...e,id:this._id});return this.update(t),t}_handleModelChange(e){e.name!==this._name&&this._propertyChanged.emit("name"),e.type!==this._type&&this._propertyChanged.emit("type"),e.path!==this._path&&this._propertyChanged.emit("path")}}},6903:(e,t,n)=>{n.r(t),n.d(t,{Signal:()=>o,Stream:()=>a});var i,s=n(6588),r=n(5899);class o{constructor(e){this.sender=e}connect(e,t){return i.connect(this,e,t)}disconnect(e,t){return i.disconnect(this,e,t)}emit(e){i.emit(this,e)}}!function(e){e.disconnectBetween=function(e,t){i.disconnectBetween(e,t)},e.disconnectSender=function(e){i.disconnectSender(e)},e.disconnectReceiver=function(e){i.disconnectReceiver(e)},e.disconnectAll=function(e){i.disconnectAll(e)},e.clearData=function(e){i.disconnectAll(e)},e.getExceptionHandler=function(){return i.exceptionHandler},e.setExceptionHandler=function(e){let t=i.exceptionHandler;return i.exceptionHandler=e,t}}(o||(o={}));class a extends o{constructor(){super(...arguments),this._pending=new r.PromiseDelegate}async*[Symbol.asyncIterator](){let e=this._pending;for(;;)try{const{args:t,next:n}=await e.promise;e=n,yield t}catch(e){return}}emit(e){const t=this._pending,n=this._pending=new r.PromiseDelegate;t.resolve({args:e,next:n}),super.emit(e)}stop(){this._pending.promise.catch(()=>{}),this._pending.reject("stop"),this._pending=new r.PromiseDelegate}}!function(e){function t(e){let t=i.get(e);if(t&&0!==t.length){for(const e of t){if(!e.signal)continue;let t=e.thisArg||e.slot;e.signal=null,d(r.get(t))}d(t)}}function n(e){let t=r.get(e);if(t&&0!==t.length){for(const e of t){if(!e.signal)continue;let t=e.signal.sender;e.signal=null,d(i.get(t))}d(t)}}e.exceptionHandler=e=>{console.error(e)},e.connect=function(e,t,n){n=n||void 0;let s=i.get(e.sender);if(s||(s=[],i.set(e.sender,s)),l(s,e,t,n))return!1;let o=n||t,a=r.get(o);a||(a=[],r.set(o,a));let c={signal:e,slot:t,thisArg:n};return s.push(c),a.push(c),!0},e.disconnect=function(e,t,n){n=n||void 0;let s=i.get(e.sender);if(!s||0===s.length)return!1;let o=l(s,e,t,n);if(!o)return!1;let a=n||t,c=r.get(a);return o.signal=null,d(s),d(c),!0},e.disconnectBetween=function(e,t){let n=i.get(e);if(!n||0===n.length)return;let s=r.get(t);if(s&&0!==s.length){for(const t of s)t.signal&&t.signal.sender===e&&(t.signal=null);d(n),d(s)}},e.disconnectSender=t,e.disconnectReceiver=n,e.disconnectAll=function(e){t(e),n(e)},e.emit=function(e,t){let n=i.get(e.sender);if(n&&0!==n.length)for(let i=0,s=n.length;i<s;++i){let s=n[i];s.signal===e&&c(s,t)}};const i=new WeakMap,r=new WeakMap,o=new Set,a="function"==typeof requestAnimationFrame?requestAnimationFrame:setImmediate;function l(e,t,n,i){return(0,s.find)(e,e=>e.signal===t&&e.slot===n&&e.thisArg===i)}function c(t,n){let{signal:i,slot:s,thisArg:r}=t;try{s.call(r,i.sender,n)}catch(t){e.exceptionHandler(t)}}function d(e){0===o.size&&a(u),o.add(e)}function u(){o.forEach(h),o.clear()}function h(e){s.ArrayExt.removeAllWhere(e,p)}function p(e){return null===e.signal}}(i||(i={}))},6923:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,s)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return s(t,e),t},o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.SessionAPI=t.Session=void 0;const a=r(n(2827));t.Session=a;const l=r(n(637));t.SessionAPI=l,o(n(7740),t)},7058:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.signalToPromise=function(e,t){const n=new i.PromiseDelegate;function s(){e.disconnect(r)}function r(e,t){s(),n.resolve([e,t])}return e.connect(r),(null!=t?t:0)>0&&setTimeout(()=>{s(),n.reject(`Signal not emitted within ${t} ms.`)},t),n.promise};const i=n(5899)},7169:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PathExt=void 0;const i=n(7975);var s;!function(e){function t(e){return 0===e.indexOf("/")&&(e=e.slice(1)),e}e.join=function(...e){const n=i.posix.join(...e);return"."===n?"":t(n)},e.joinWithLeadingSlash=function(...e){const t=i.posix.join(...e);return"."===t?"":t},e.basename=function(e,t){return i.posix.basename(e,t)},e.dirname=function(e){const n=t(i.posix.dirname(e));return"."===n?"":n},e.extname=function(e){return i.posix.extname(e)},e.normalize=function(e){return""===e?"":t(i.posix.normalize(e))},e.resolve=function(...e){return t(i.posix.resolve(...e))},e.relative=function(e,n){return t(i.posix.relative(e,n))},e.normalizeExtension=function(e){return e.length>0&&0!==e.indexOf(".")&&(e=`.${e}`),e},e.removeSlash=t}(s||(t.PathExt=s={}))},7275:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.KernelManager=void 0;const i=n(8534),s=n(6903),r=n(608),o=n(5412),a=n(8662),l=n(5089),c=n(321);class d extends o.BaseManager{constructor(e={}){var t,n,o;super(e),this._commsOverSubshells=r.CommsOverSubshells.PerCommTarget,this._isReady=!1,this._kernelConnections=new Set,this._models=new Map,this._runningChanged=new s.Signal(this),this._connectionFailure=new s.Signal(this),this._kernelAPIClient=null!==(t=e.kernelAPIClient)&&void 0!==t?t:new a.KernelAPIClient({serverSettings:this.serverSettings}),this._kernelSpecAPIClient=null!==(n=e.kernelSpecAPIClient)&&void 0!==n?n:new c.KernelSpecAPIClient({serverSettings:this.serverSettings}),this._pollModels=new i.Poll({auto:!1,factory:()=>this.requestRunning(),frequency:{interval:1e4,backoff:!0,max:3e5},name:"@jupyterlab/services:KernelManager#models",standby:null!==(o=e.standby)&&void 0!==o?o:"when-hidden"}),this._ready=(async()=>{await this._pollModels.start(),await this._pollModels.tick,this._isReady=!0})()}get isReady(){return this._isReady}get ready(){return this._ready}get runningChanged(){return this._runningChanged}get connectionFailure(){return this._connectionFailure}dispose(){this.isDisposed||(this._models.clear(),this._kernelConnections.forEach(e=>e.dispose()),this._pollModels.dispose(),super.dispose())}connectTo(e){var t;const{id:n}=e.model;let i=null===(t=e.handleComms)||void 0===t||t;if(void 0===e.handleComms)for(const e of this._kernelConnections)if(e.id===n&&e.handleComms){i=!1;break}e.commsOverSubshells=this._commsOverSubshells;const s=new l.KernelConnection({handleComms:i,...e,serverSettings:this.serverSettings,kernelAPIClient:this._kernelAPIClient,kernelSpecAPIClient:this._kernelSpecAPIClient});return this._onStarted(s),this._models.has(n)||this.refreshRunning().catch(()=>{}),s}running(){return this._models.values()}get runningCount(){return this._models.size}get commsOverSubshells(){return this._commsOverSubshells}set commsOverSubshells(e){this._commsOverSubshells=e;for(const t of this._kernelConnections)t.commsOverSubshells=e}async refreshRunning(){await this._pollModels.refresh(),await this._pollModels.tick}async startNew(e={},t={}){const n=await this._kernelAPIClient.startNew(e);return this.connectTo({...t,model:n})}async shutdown(e){await this._kernelAPIClient.shutdown(e),await this.refreshRunning()}async shutdownAll(){await this.refreshRunning(),await Promise.all([...this._models.keys()].map(e=>this._kernelAPIClient.shutdown(e))),await this.refreshRunning()}async findById(e){return this._models.has(e)||await this.refreshRunning(),this._models.get(e)}async requestRunning(){var e,t;let n;try{n=await this._kernelAPIClient.listRunning()}catch(n){throw(n instanceof r.ServerConnection.NetworkError||503===(null===(e=n.response)||void 0===e?void 0:e.status)||424===(null===(t=n.response)||void 0===t?void 0:t.status))&&this._connectionFailure.emit(n),n}this.isDisposed||this._models.size===n.length&&n.every(e=>{const t=this._models.get(e.id);return!!t&&t.connections===e.connections&&t.execution_state===e.execution_state&&t.last_activity===e.last_activity&&t.name===e.name&&t.reason===e.reason&&t.traceback===e.traceback})||(this._models=new Map(n.map(e=>[e.id,e])),this._kernelConnections.forEach(e=>{this._models.has(e.id)||e.handleShutdown()}),this._runningChanged.emit(n))}_onStarted(e){this._kernelConnections.add(e),e.statusChanged.connect(this._onStatusChanged,this),e.disposed.connect(this._onDisposed,this)}_onDisposed(e){this._kernelConnections.delete(e),this.refreshRunning().catch(()=>{})}_onStatusChanged(e,t){"dead"===t&&this.refreshRunning().catch(()=>{})}}t.KernelManager=d,function(e){e.NoopManager=class extends e{constructor(){super(...arguments),this._readyPromise=new Promise(()=>{})}get isActive(){return!1}get parentReady(){return super.ready}async startNew(e={},t={}){return Promise.reject(new Error("Not implemented in no-op Kernel Manager"))}connectTo(e){throw new Error("Not implemented in no-op Kernel Manager")}async shutdown(e){return Promise.reject(new Error("Not implemented in no-op Kernel Manager"))}get ready(){return this.parentReady.then(()=>this._readyPromise)}async requestRunning(){return Promise.resolve()}}}(d||(t.KernelManager=d={}))},7375:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,s)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return s(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.RestContentProvider=t.ContentProviderRegistry=t.Drive=t.ContentsManager=t.Contents=void 0;const o=n(6376),a=n(785),l=n(6903),c=n(608),d=r(n(7821));var u,h;!function(e){e.validateContentsModel=function(e){d.validateContentsModel(e)},e.validateCheckpointModel=function(e){d.validateCheckpointModel(e)}}(u||(t.Contents=u={})),t.ContentsManager=class{constructor(e={}){var t,n;this._isDisposed=!1,this._additionalDrives=new Map,this._fileChanged=new l.Signal(this);const i=this.serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:c.ServerConnection.makeSettings();this._defaultDrive=null!==(n=e.defaultDrive)&&void 0!==n?n:new p({serverSettings:i}),this._defaultDrive.fileChanged.connect(this._onFileChanged,this)}get defaultDrive(){return this._defaultDrive}get fileChanged(){return this._fileChanged}get isDisposed(){return this._isDisposed}dispose(){this.isDisposed||(this._isDisposed=!0,l.Signal.clearData(this))}addDrive(e){this._additionalDrives.set(e.name,e),e.fileChanged.connect(this._onFileChanged,this)}getSharedModelFactory(e,t){var n,i;const[s]=this._driveForPath(e),r=null===(n=s.contentProviderRegistry)||void 0===n?void 0:n.getProvider(null==t?void 0:t.contentProviderId);return(null==r?void 0:r.sharedModelFactory)?r.sharedModelFactory:null!==(i=s.sharedModelFactory)&&void 0!==i?i:null}localPath(e){const t=e.split("/"),n=t[0].split(":");return 1!==n.length&&this._additionalDrives.has(n[0])?o.PathExt.join(n.slice(1).join(":"),...t.slice(1)):o.PathExt.removeSlash(e)}normalize(e){const t=e.split(":");return 1===t.length?o.PathExt.normalize(e):`${t[0]}:${o.PathExt.normalize(t.slice(1).join(":"))}`}resolvePath(e,t){const n=this.driveName(e),i=this.localPath(e),s=o.PathExt.resolve("/",i,t);return n?`${n}:${s}`:s}driveName(e){const t=e.split("/")[0].split(":");return 1===t.length?"":this._additionalDrives.has(t[0])?t[0]:""}get(e,t){const[n,i]=this._driveForPath(e);return n.get(i,t).then(e=>{const t=[];if("directory"===e.type&&e.content){for(const i of e.content)t.push({...i,path:this._toGlobalPath(n,i.path)});return{...e,path:this._toGlobalPath(n,i),content:t,serverPath:e.path}}return{...e,path:this._toGlobalPath(n,i),serverPath:e.path}})}getDownloadUrl(e){const[t,n]=this._driveForPath(e);return t.getDownloadUrl(n)}newUntitled(e={}){if(e.path){const t=this.normalize(e.path),[n,i]=this._driveForPath(t);return n.newUntitled({...e,path:i}).then(e=>({...e,path:o.PathExt.join(t,e.name),serverPath:e.path}))}return this._defaultDrive.newUntitled(e)}delete(e){const[t,n]=this._driveForPath(e);return t.delete(n)}rename(e,t){const[n,i]=this._driveForPath(e),[s,r]=this._driveForPath(t);if(n!==s)throw Error("ContentsManager: renaming files must occur within a Drive");return n.rename(i,r).then(e=>({...e,path:this._toGlobalPath(n,r),serverPath:e.path}))}save(e,t={}){const n=this.normalize(e),[i,s]=this._driveForPath(e);return i.save(s,{...t,path:s}).then(e=>({...e,path:n,serverPath:e.path}))}copy(e,t){const[n,i]=this._driveForPath(e),[s,r]=this._driveForPath(t);if(n===s)return n.copy(i,r).then(e=>({...e,path:this._toGlobalPath(n,e.path),serverPath:e.path}));throw Error("Copying files between drives is not currently implemented")}createCheckpoint(e){const[t,n]=this._driveForPath(e);return t.createCheckpoint(n)}listCheckpoints(e){const[t,n]=this._driveForPath(e);return t.listCheckpoints(n)}restoreCheckpoint(e,t){const[n,i]=this._driveForPath(e);return n.restoreCheckpoint(i,t)}deleteCheckpoint(e,t){const[n,i]=this._driveForPath(e);return n.deleteCheckpoint(i,t)}_toGlobalPath(e,t){return e===this._defaultDrive?o.PathExt.removeSlash(t):`${e.name}:${o.PathExt.removeSlash(t)}`}_driveForPath(e){const t=this.driveName(e),n=this.localPath(e);return t?[this._additionalDrives.get(t),n]:[this._defaultDrive,n]}_onFileChanged(e,t){var n,i;if(e===this._defaultDrive)this._fileChanged.emit(t);else{let s=null,r=null;(null===(n=t.newValue)||void 0===n?void 0:n.path)&&(s={...t.newValue,path:this._toGlobalPath(e,t.newValue.path)}),(null===(i=t.oldValue)||void 0===i?void 0:i.path)&&(r={...t.oldValue,path:this._toGlobalPath(e,t.oldValue.path)}),this._fileChanged.emit({type:t.type,newValue:s,oldValue:r})}}};class p{constructor(e={}){var t,n,i;this._isDisposed=!1,this._fileChanged=new l.Signal(this),this.name=null!==(t=e.name)&&void 0!==t?t:"Default",this._apiEndpoint=null!==(n=e.apiEndpoint)&&void 0!==n?n:"api/contents",this.serverSettings=null!==(i=e.serverSettings)&&void 0!==i?i:c.ServerConnection.makeSettings(),this._restContentProvider=new f({...e,apiEndpoint:this._apiEndpoint,serverSettings:this.serverSettings}),e.defaultContentProvider?this.contentProviderRegistry=new m({defaultProvider:e.defaultContentProvider}):this.contentProviderRegistry=new m,this.contentProviderRegistry.fileChanged.connect((e,t)=>{this._fileChanged.emit(t)})}get fileChanged(){return this._fileChanged}get isDisposed(){return this._isDisposed}dispose(){this.isDisposed||(this._isDisposed=!0,l.Signal.clearData(this))}async get(e,t){const n=this.contentProviderRegistry.getProvider(null==t?void 0:t.contentProviderId);return n?n.get(e,t):await this._restContentProvider.get(e,t)}getDownloadUrl(e){const t=this.serverSettings.baseUrl;let n=o.URLExt.join(t,"files",o.URLExt.encodeParts(e)),i="";try{i=document.cookie}catch(e){}const s=i.match("\\b_xsrf=([^;]*)\\b");if(s){const e=new URL(n);e.searchParams.append("_xsrf",s[1]),n=e.toString()}return Promise.resolve(n)}async newUntitled(e={}){var t;let n="{}";e&&(e.ext&&(e.ext=h.normalizeExtension(e.ext)),n=JSON.stringify(e));const i=this.serverSettings,s=this._getUrl(null!==(t=e.path)&&void 0!==t?t:""),r={method:"POST",body:n},o=await c.ServerConnection.makeRequest(s,r,i);if(201!==o.status)throw await c.ServerConnection.ResponseError.create(o);const a=await o.json();return d.validateContentsModel(a),this._fileChanged.emit({type:"new",oldValue:null,newValue:a}),a}async delete(e){const t=this._getUrl(e),n=this.serverSettings,i=await c.ServerConnection.makeRequest(t,{method:"DELETE"},n);if(204!==i.status)throw await c.ServerConnection.ResponseError.create(i);this._fileChanged.emit({type:"delete",oldValue:{path:e},newValue:null})}async rename(e,t){const n=this.serverSettings,i=this._getUrl(e),s={method:"PATCH",body:JSON.stringify({path:t})},r=await c.ServerConnection.makeRequest(i,s,n);if(200!==r.status)throw await c.ServerConnection.ResponseError.create(r);const o=await r.json();return d.validateContentsModel(o),this._fileChanged.emit({type:"rename",oldValue:{path:e},newValue:o}),o}async save(e,t={}){const n=this.contentProviderRegistry.getProvider(null==t?void 0:t.contentProviderId);let i;return i=n?await n.save(e,t):await this._restContentProvider.save(e,t),this._fileChanged.emit({type:"save",oldValue:null,newValue:i}),i}async copy(e,t){const n=this.serverSettings,i=this._getUrl(t),s={method:"POST",body:JSON.stringify({copy_from:e})},r=await c.ServerConnection.makeRequest(i,s,n);if(201!==r.status)throw await c.ServerConnection.ResponseError.create(r);const o=await r.json();return d.validateContentsModel(o),this._fileChanged.emit({type:"new",oldValue:null,newValue:o}),o}async createCheckpoint(e){const t=this._getUrl(e,"checkpoints"),n=await c.ServerConnection.makeRequest(t,{method:"POST"},this.serverSettings);if(201!==n.status)throw await c.ServerConnection.ResponseError.create(n);const i=await n.json();return d.validateCheckpointModel(i),i}async listCheckpoints(e){const t=this._getUrl(e,"checkpoints"),n=await c.ServerConnection.makeRequest(t,{},this.serverSettings);if(200!==n.status)throw await c.ServerConnection.ResponseError.create(n);const i=await n.json();if(!Array.isArray(i))throw new Error("Invalid Checkpoint list");for(let e=0;e<i.length;e++)d.validateCheckpointModel(i[e]);return i}async restoreCheckpoint(e,t){const n=this._getUrl(e,"checkpoints",t),i=await c.ServerConnection.makeRequest(n,{method:"POST"},this.serverSettings);if(204!==i.status)throw await c.ServerConnection.ResponseError.create(i)}async deleteCheckpoint(e,t){const n=this._getUrl(e,"checkpoints",t),i=await c.ServerConnection.makeRequest(n,{method:"DELETE"},this.serverSettings);if(204!==i.status)throw await c.ServerConnection.ResponseError.create(i)}_getUrl(...e){const t=e.map(e=>o.URLExt.encodeParts(e)),n=this.serverSettings.baseUrl;return o.URLExt.join(n,this._apiEndpoint,...t)}}t.Drive=p,function(e){e.normalizeExtension=function(e){return e.length>0&&0!==e.indexOf(".")&&(e=`.${e}`),e}}(h||(h={}));class m{constructor(e){this._providers=new Map,this._fileChanged=new l.Signal(this),(null==e?void 0:e.defaultProvider)&&this.register("default",e.defaultProvider)}register(e,t){if(this._providers.has(e))throw Error(`Provider with ${e} identifier was already registered on this drive`);this._providers.set(e,t);const n=(e,t)=>{this._fileChanged.emit(t)};return t.fileChanged&&t.fileChanged.connect(n),new a.DisposableDelegate(()=>{t.fileChanged&&t.fileChanged.disconnect(n),this._providers.has(e)&&this._providers.delete(e)})}getProvider(e){if(!e)return null;const t=this._providers.get(e);if(!t)throw Error(`Provider ${e} is not registered`);return t}get fileChanged(){return this._fileChanged}}t.ContentProviderRegistry=m;class f{constructor(e){this._options=e}async get(e,t){let n=this._getUrl(e);if(t){"notebook"===t.type&&delete t.format;const e=t.content?"1":"0",i=t.hash?"1":"0",s={...t,content:e,hash:i};n+=o.URLExt.objectToQueryString(s)}const i=this._options.serverSettings,s=await c.ServerConnection.makeRequest(n,{},i);if(200!==s.status)throw await c.ServerConnection.ResponseError.create(s);const r=await s.json();return d.validateContentsModel(r),r}async save(e,t={}){const n=this._options.serverSettings,i=this._getUrl(e),s={method:"PUT",body:new File([JSON.stringify(t)],"data.json",{type:"application/json"})},r=await c.ServerConnection.makeRequest(i,s,n);if(200!==r.status&&201!==r.status)throw await c.ServerConnection.ResponseError.create(r);const o=await r.json();return d.validateContentsModel(o),o}_getUrl(...e){const t=e.map(e=>o.URLExt.encodeParts(e)),n=this._options.serverSettings.baseUrl;return o.URLExt.join(n,this._options.apiEndpoint,...t)}}t.RestContentProvider=f},7463:(e,t)=>{function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var i=n-1>>>1,s=e[i];if(!(0<r(s,t)))break e;e[i]=t,e[n]=s,n=i}}function i(e){return 0===e.length?null:e[0]}function s(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var i=0,s=e.length,o=s>>>1;i<o;){var a=2*(i+1)-1,l=e[a],c=a+1,d=e[c];if(0>r(l,n))c<s&&0>r(d,l)?(e[i]=d,e[c]=n,i=c):(e[i]=l,e[a]=n,i=a);else{if(!(c<s&&0>r(d,n)))break e;e[i]=d,e[c]=n,i=c}}}return t}function r(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var o=performance;t.unstable_now=function(){return o.now()}}else{var a=Date,l=a.now();t.unstable_now=function(){return a.now()-l}}var c=[],d=[],u=1,h=null,p=3,m=!1,f=!1,g=!1,v="function"==typeof setTimeout?setTimeout:null,_="function"==typeof clearTimeout?clearTimeout:null,b="undefined"!=typeof setImmediate?setImmediate:null;function y(e){for(var t=i(d);null!==t;){if(null===t.callback)s(d);else{if(!(t.startTime<=e))break;s(d),t.sortIndex=t.expirationTime,n(c,t)}t=i(d)}}function w(e){if(g=!1,y(e),!f)if(null!==i(c))f=!0,D(x);else{var t=i(d);null!==t&&T(w,t.startTime-e)}}function x(e,n){f=!1,g&&(g=!1,_(E),E=-1),m=!0;var r=p;try{for(y(n),h=i(c);null!==h&&(!(h.expirationTime>n)||e&&!I());){var o=h.callback;if("function"==typeof o){h.callback=null,p=h.priorityLevel;var a=o(h.expirationTime<=n);n=t.unstable_now(),"function"==typeof a?h.callback=a:h===i(c)&&s(c),y(n)}else s(c);h=i(c)}if(null!==h)var l=!0;else{var u=i(d);null!==u&&T(w,u.startTime-n),l=!1}return l}finally{h=null,p=r,m=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var S,C=!1,k=null,E=-1,M=5,P=-1;function I(){return!(t.unstable_now()-P<M)}function L(){if(null!==k){var e=t.unstable_now();P=e;var n=!0;try{n=k(!0,e)}finally{n?S():(C=!1,k=null)}}else C=!1}if("function"==typeof b)S=function(){b(L)};else if("undefined"!=typeof MessageChannel){var O=new MessageChannel,A=O.port2;O.port1.onmessage=L,S=function(){A.postMessage(null)}}else S=function(){v(L,0)};function D(e){k=e,C||(C=!0,S())}function T(e,n){E=v(function(){e(t.unstable_now())},n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){f||m||(f=!0,D(x))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return i(c)},t.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var n=p;p=t;try{return e()}finally{p=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=p;p=e;try{return t()}finally{p=n}},t.unstable_scheduleCallback=function(e,s,r){var o=t.unstable_now();switch(r="object"==typeof r&&null!==r&&"number"==typeof(r=r.delay)&&0<r?o+r:o,e){case 1:var a=-1;break;case 2:a=250;break;case 5:a=1073741823;break;case 4:a=1e4;break;default:a=5e3}return e={id:u++,callback:s,priorityLevel:e,startTime:r,expirationTime:a=r+a,sortIndex:-1},r>o?(e.sortIndex=r,n(d,e),null===i(c)&&e===i(d)&&(g?(_(E),E=-1):g=!0,T(w,r-o))):(e.sortIndex=a,n(c,e),f||m||(f=!0,D(x))),e},t.unstable_shouldYield=I,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},7484:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.MarkdownCodeBlocks=void 0,function(e){e.CODE_BLOCK_MARKER="```";const t=[".markdown",".mdown",".mkdn",".md",".mkd",".mdwn",".mdtxt",".mdtext",".text",".txt",".Rmd"];class n{constructor(e){this.startLine=e,this.code="",this.endLine=-1}}e.MarkdownCodeBlock=n,e.isMarkdown=function(e){return t.indexOf(e)>-1},e.findMarkdownCodeBlocks=function(t){if(!t||""===t)return[];const i=t.split("\n"),s=[];let r=null;for(let t=0;t<i.length;t++){const o=i[t],a=0===o.indexOf(e.CODE_BLOCK_MARKER),l=null!=r;if(a||l)if(l)r&&(a?(r.endLine=t-1,s.push(r),r=null):r.code+=o+"\n");else{r=new n(t);const i=o.indexOf(e.CODE_BLOCK_MARKER),a=o.lastIndexOf(e.CODE_BLOCK_MARKER);i!==a&&(r.code=o.substring(i+e.CODE_BLOCK_MARKER.length,a),r.endLine=t,s.push(r),r=null)}}return s}}(n||(t.MarkdownCodeBlocks=n={}))},7569:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,s)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return s(t,e),t},o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalAPI=t.Terminal=void 0;const a=r(n(8917));t.Terminal=a;const l=r(n(4903));t.TerminalAPI=l,o(n(6810),t)},7740:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SessionManager=void 0;const i=n(8534),s=n(6903),r=n(1089),o=n(5412),a=n(6830),l=n(637);class c extends o.BaseManager{constructor(e){var t,n;super(e),this._isReady=!1,this._sessionConnections=new Set,this._models=new Map,this._runningChanged=new s.Signal(this),this._connectionFailure=new s.Signal(this),this._connectToKernel=e=>this._kernelManager.connectTo(e),this._kernelManager=e.kernelManager,this._sessionAPIClient=null!==(t=e.sessionAPIClient)&&void 0!==t?t:new l.SessionAPIClient({serverSettings:e.serverSettings}),this._pollModels=new i.Poll({auto:!1,factory:()=>this.requestRunning(),frequency:{interval:1e4,backoff:!0,max:3e5},name:"@jupyterlab/services:SessionManager#models",standby:null!==(n=e.standby)&&void 0!==n?n:"when-hidden"}),this._ready=(async()=>{await this._pollModels.start(),await this._pollModels.tick,this._kernelManager.isActive&&await this._kernelManager.ready,this._isReady=!0})()}get isReady(){return this._isReady}get ready(){return this._ready}get runningChanged(){return this._runningChanged}get connectionFailure(){return this._connectionFailure}dispose(){this.isDisposed||(this._models.clear(),this._sessionConnections.forEach(e=>e.dispose()),this._pollModels.dispose(),super.dispose())}connectTo(e){const t=new a.SessionConnection({...e,connectToKernel:this._connectToKernel,serverSettings:this.serverSettings,sessionAPIClient:this._sessionAPIClient});return this._onStarted(t),this._models.has(e.model.id)||this.refreshRunning().catch(()=>{}),t}running(){return this._models.values()}async refreshRunning(){await this._pollModels.refresh(),await this._pollModels.tick}async startNew(e,t={}){const n=await this._sessionAPIClient.startNew(e);return await this.refreshRunning(),this.connectTo({...t,model:n})}async shutdown(e){await this._sessionAPIClient.shutdown(e),await this.refreshRunning()}async shutdownAll(){await this.refreshRunning(),await Promise.all([...this._models.keys()].map(e=>this._sessionAPIClient.shutdown(e))),await this.refreshRunning()}async stopIfNeeded(e){try{const t=(await this._sessionAPIClient.listRunning()).filter(t=>t.path===e);if(1===t.length){const e=t[0].id;await this.shutdown(e)}}catch(e){}}async findById(e){return this._models.has(e)||await this.refreshRunning(),this._models.get(e)}async findByPath(e){for(const t of this._models.values())if(t.path===e)return t;await this.refreshRunning();for(const t of this._models.values())if(t.path===e)return t}async requestRunning(){var e,t;let n;try{n=await this._sessionAPIClient.listRunning()}catch(n){throw(n instanceof r.ServerConnection.NetworkError||503===(null===(e=n.response)||void 0===e?void 0:e.status)||424===(null===(t=n.response)||void 0===t?void 0:t.status))&&this._connectionFailure.emit(n),n}this.isDisposed||this._models.size===n.length&&n.every(e=>{var t,n,i,s;const r=this._models.get(e.id);return!!r&&(null===(t=r.kernel)||void 0===t?void 0:t.id)===(null===(n=e.kernel)||void 0===n?void 0:n.id)&&(null===(i=r.kernel)||void 0===i?void 0:i.name)===(null===(s=e.kernel)||void 0===s?void 0:s.name)&&r.name===e.name&&r.path===e.path&&r.type===e.type})||(this._models=new Map(n.map(e=>[e.id,e])),this._sessionConnections.forEach(e=>{this._models.has(e.id)?e.update(this._models.get(e.id)):e.dispose()}),this._runningChanged.emit(n))}_onStarted(e){this._sessionConnections.add(e),e.disposed.connect(this._onDisposed,this),e.propertyChanged.connect(this._onChanged,this),e.kernelChanged.connect(this._onChanged,this)}_onDisposed(e){this._sessionConnections.delete(e),this.refreshRunning().catch(()=>{})}_onChanged(){this.refreshRunning().catch(()=>{})}}t.SessionManager=c,function(e){e.NoopManager=class extends e{constructor(){super(...arguments),this._readyPromise=new Promise(()=>{})}get isActive(){return!1}get parentReady(){return super.ready}async startNew(e,t={}){return Promise.reject(new Error("Not implemented in no-op Session Manager"))}connectTo(e){throw Error("Not implemented in no-op Session Manager")}get ready(){return this.parentReady.then(()=>this._readyPromise)}async shutdown(e){return Promise.reject(new Error("Not implemented in no-op Session Manager"))}async requestRunning(){return Promise.resolve()}}}(c||(t.SessionManager=c={}))},7821:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateContentsModel=function(e){(0,i.validateProperty)(e,"name","string"),(0,i.validateProperty)(e,"path","string"),(0,i.validateProperty)(e,"type","string"),(0,i.validateProperty)(e,"created","string"),(0,i.validateProperty)(e,"last_modified","string"),(0,i.validateProperty)(e,"mimetype","object"),(0,i.validateProperty)(e,"content","object"),(0,i.validateProperty)(e,"format","object")},t.validateCheckpointModel=function(e){(0,i.validateProperty)(e,"id","string"),(0,i.validateProperty)(e,"last_modified","string")};const i=n(1480)},7881:function(e,t,n){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.URLExt=void 0;const s=n(7975),r=i(n(1160));var o;!function(e){function t(e){if("undefined"!=typeof document&&document){const t=document.createElement("a");return t.href=e,t}return(0,r.default)(e)}function n(...e){let t=(0,r.default)(e[0],{});const n=""===t.protocol&&t.slashes;n&&(t=(0,r.default)(e[0],"https:"+e[0]));const i=`${n?"":t.protocol}${t.slashes?"//":""}${t.auth}${t.auth?"@":""}${t.host}`,o=s.posix.join(`${i&&"/"!==t.pathname[0]?"/":""}${t.pathname}`,...e.slice(1));return`${i}${"."===o?"":o}`}e.parse=t,e.getHostName=function(e){return(0,r.default)(e).hostname},e.normalize=function(e){return e&&t(e).toString()},e.join=n,e.encodeParts=function(e){return n(...e.split("/").map(encodeURIComponent))},e.objectToQueryString=function(e){const t=Object.keys(e).filter(e=>e.length>0);return t.length?"?"+t.map(t=>{const n=encodeURIComponent(String(e[t]));return t+(n?"="+n:"")}).join("&"):""},e.queryStringToObject=function(e){return e.replace(/^\?/,"").split("&").reduce((e,t)=>{const[n,i]=t.split("=");return n.length>0&&(e[n]=decodeURIComponent(i||"")),e},{})},e.isLocal=function(e,n=!1){const{protocol:i}=t(e);return(!i||0!==e.toLowerCase().indexOf(i))&&(n?0!==e.indexOf("//"):0!==e.indexOf("/"))}}(o||(t.URLExt=o={}))},7975:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,i="",s=0,r=-1,o=0,a=0;a<=e.length;++a){if(a<e.length)n=e.charCodeAt(a);else{if(47===n)break;n=47}if(47===n){if(r===a-1||1===o);else if(r!==a-1&&2===o){if(i.length<2||2!==s||46!==i.charCodeAt(i.length-1)||46!==i.charCodeAt(i.length-2))if(i.length>2){var l=i.lastIndexOf("/");if(l!==i.length-1){-1===l?(i="",s=0):s=(i=i.slice(0,l)).length-1-i.lastIndexOf("/"),r=a,o=0;continue}}else if(2===i.length||1===i.length){i="",s=0,r=a,o=0;continue}t&&(i.length>0?i+="/..":i="..",s=2)}else i.length>0?i+="/"+e.slice(r+1,a):i=e.slice(r+1,a),s=a-r-1;r=a,o=0}else 46===n&&-1!==o?++o:o=-1}return i}var i={resolve:function(){for(var e,i="",s=!1,r=arguments.length-1;r>=-1&&!s;r--){var o;r>=0?o=arguments[r]:(void 0===e&&(e=process.cwd()),o=e),t(o),0!==o.length&&(i=o+"/"+i,s=47===o.charCodeAt(0))}return i=n(i,!s),s?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(e){if(t(e),0===e.length)return".";var i=47===e.charCodeAt(0),s=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!i)).length||i||(e="."),e.length>0&&s&&(e+="/"),i?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n<arguments.length;++n){var s=arguments[n];t(s),s.length>0&&(void 0===e?e=s:e+="/"+s)}return void 0===e?".":i.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=i.resolve(e))===(n=i.resolve(n)))return"";for(var s=1;s<e.length&&47===e.charCodeAt(s);++s);for(var r=e.length,o=r-s,a=1;a<n.length&&47===n.charCodeAt(a);++a);for(var l=n.length-a,c=o<l?o:l,d=-1,u=0;u<=c;++u){if(u===c){if(l>c){if(47===n.charCodeAt(a+u))return n.slice(a+u+1);if(0===u)return n.slice(a+u)}else o>c&&(47===e.charCodeAt(s+u)?d=u:0===u&&(d=0));break}var h=e.charCodeAt(s+u);if(h!==n.charCodeAt(a+u))break;47===h&&(d=u)}var p="";for(u=s+d+1;u<=r;++u)u!==r&&47!==e.charCodeAt(u)||(0===p.length?p+="..":p+="/..");return p.length>0?p+n.slice(a+d):(a+=d,47===n.charCodeAt(a)&&++a,n.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),i=47===n,s=-1,r=!0,o=e.length-1;o>=1;--o)if(47===(n=e.charCodeAt(o))){if(!r){s=o;break}}else r=!1;return-1===s?i?"/":".":i&&1===s?"//":e.slice(0,s)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var i,s=0,r=-1,o=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var a=n.length-1,l=-1;for(i=e.length-1;i>=0;--i){var c=e.charCodeAt(i);if(47===c){if(!o){s=i+1;break}}else-1===l&&(o=!1,l=i+1),a>=0&&(c===n.charCodeAt(a)?-1===--a&&(r=i):(a=-1,r=l))}return s===r?r=l:-1===r&&(r=e.length),e.slice(s,r)}for(i=e.length-1;i>=0;--i)if(47===e.charCodeAt(i)){if(!o){s=i+1;break}}else-1===r&&(o=!1,r=i+1);return-1===r?"":e.slice(s,r)},extname:function(e){t(e);for(var n=-1,i=0,s=-1,r=!0,o=0,a=e.length-1;a>=0;--a){var l=e.charCodeAt(a);if(47!==l)-1===s&&(r=!1,s=a+1),46===l?-1===n?n=a:1!==o&&(o=1):-1!==n&&(o=-1);else if(!r){i=a+1;break}}return-1===n||-1===s||0===o||1===o&&n===s-1&&n===i+1?"":e.slice(n,s)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,i=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+i:n+"/"+i:i}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var i,s=e.charCodeAt(0),r=47===s;r?(n.root="/",i=1):i=0;for(var o=-1,a=0,l=-1,c=!0,d=e.length-1,u=0;d>=i;--d)if(47!==(s=e.charCodeAt(d)))-1===l&&(c=!1,l=d+1),46===s?-1===o?o=d:1!==u&&(u=1):-1!==o&&(u=-1);else if(!c){a=d+1;break}return-1===o||-1===l||0===u||1===u&&o===l-1&&o===a+1?-1!==l&&(n.base=n.name=0===a&&r?e.slice(1,l):e.slice(a,l)):(0===a&&r?(n.name=e.slice(1,o),n.base=e.slice(1,l)):(n.name=e.slice(a,o),n.base=e.slice(a,l)),n.ext=e.slice(o,l)),a>0?n.dir=e.slice(0,a-1):r&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i,e.exports=i},8031:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},8378:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.JupyterPluginRegistry=void 0;const i=n(5899);class s extends i.PluginRegistry{constructor(e){var t;super(e),this._pluginData=new Map,this._expectedActivationTime=null!==(t=null==e?void 0:e.expectedActivationTime)&&void 0!==t?t:5e3}registerPlugin(e){return this._pluginData.set(e.id,e),super.registerPlugin(e)}async activatePlugin(e){const t=performance.now();let n=setTimeout(()=>{console.warn(`Plugin ${e} is taking too long to activate.`)},this._expectedActivationTime);try{const i=await super.activatePlugin(e);clearTimeout(n);const s=performance.now()-t;if(s>=this._expectedActivationTime){const t=this._getDependentCount(e);console.warn(`Plugin ${e} (with ${t} dependants) took ${s.toFixed(2)}ms to activate.`)}return i}catch(t){throw clearTimeout(n),console.error(`Error activating plugin: ${e}`,t),t}}_getDependentCount(e){var t;const n=this._pluginData.get(e);if(!(null==n?void 0:n.provides))return 0;const i=n.provides.name;let s=0;for(const[n,r]of this._pluginData.entries())n!==e&&(null===(t=r.requires)||void 0===t?void 0:t.filter(e=>!!e).some(e=>e.name===i))&&s++;return s}}t.JupyterPluginRegistry=s},8430:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,s)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return s(t,e),t},o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.UserAPI=t.User=void 0;const a=r(n(1483));t.User=a;const l=r(n(4320));t.UserAPI=l,o(n(961),t)},8510:(e,t,n)=>{n.r(t),n.d(t,{Cache:()=>f,FreeStyle:()=>y,Rule:()=>_,Selector:()=>g,Style:()=>v,create:()=>w});let i=0;const s=Object.create(null),r=["animation-iteration-count","border-image-outset","border-image-slice","border-image-width","box-flex","box-flex-group","box-ordinal-group","column-count","columns","counter-increment","counter-reset","flex","flex-grow","flex-positive","flex-shrink","flex-negative","flex-order","font-weight","grid-area","grid-column","grid-column-end","grid-column-span","grid-column-start","grid-row","grid-row-end","grid-row-span","grid-row-start","line-clamp","line-height","opacity","order","orphans","tab-size","widows","z-index","zoom","fill-opacity","flood-opacity","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","stroke-opacity","stroke-width"];for(const e of r)for(const t of["-webkit-","-ms-","-moz-","-o-",""])s[t+e]=!0;function o(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`).replace(/^ms-/,"-ms-")}function a(e,t){return t&&"number"==typeof t&&!s[e]?`${e}:${t}px`:`${e}:${t}`}function l(e){return e.sort((e,t)=>e[0]>t[0]?1:-1)}function c(e){return e.map(([e,t])=>Array.isArray(t)?t.map(t=>a(e,t)).join(";"):a(e,t)).join(";")}function d(e,t){return-1===e.indexOf("&")?`${t} ${e}`:e.replace(/&/g,t)}function u(e,t,n,i,s){const{style:r,nested:a,isUnique:h}=function(e,t){const n=[],i=[];for(const t of Object.keys(e)){const s=t.trim(),r=e[t];36!==s.charCodeAt(0)&&null!=r&&("object"!=typeof r||Array.isArray(r)?n.push([o(s),r]):i.push([s,r]))}return{style:c(l(n)),nested:t?i:l(i),isUnique:!!e.$unique}}(t,""!==e);let p=r;if(64===e.charCodeAt(0)){const t={selector:e,styles:[],rules:[],style:s?"":r};n.push(t),r&&s&&t.styles.push({selector:s,style:r,isUnique:h});for(const[e,n]of a)p+=e+u(e,n,t.rules,t.styles,s)}else{const t=s?d(e,s):e;r&&i.push({selector:t,style:r,isUnique:h});for(const[e,s]of a)p+=e+u(e,s,n,i,t)}return p}function h(e,t,n,s,r,o){for(const{selector:n,style:a,isUnique:l}of s){const s=o?d(n,r):n,c=l?`u\0${(++i).toString(36)}`:`s\0${t}\0${a}`,u=new v(a,c);u.add(new g(s,`k\0${t}\0${s}`)),e.add(u)}for(const{selector:i,style:s,rules:a,styles:l}of n){const n=new _(i,s,`r\0${t}\0${i}\0${s}`);h(n,t,a,l,r,o),e.add(n)}}function p(e){let t="";for(let n=0;n<e.length;n++)t+=e[n];return t}const m={add:()=>{},change:()=>{},remove:()=>{}};class f{constructor(e=m){this.changes=e,this.sheet=[],this.changeId=0,this._keys=[],this._children=Object.create(null),this._counters=Object.create(null)}add(e){const t=this._counters[e.id]||0,n=this._children[e.id]||e.clone();if(this._counters[e.id]=t+1,0===t)this._children[n.id]=n,this._keys.push(n.id),this.sheet.push(n.getStyles()),this.changeId++,this.changes.add(n,this._keys.length-1);else if(n instanceof f&&e instanceof f){const t=this._keys.indexOf(e.id),i=n.changeId;n.merge(e),n.changeId!==i&&(this.sheet.splice(t,1,n.getStyles()),this.changeId++,this.changes.change(n,t,t))}}remove(e){const t=this._counters[e.id];if(t){this._counters[e.id]=t-1;const n=this._children[e.id],i=this._keys.indexOf(n.id);if(1===t)delete this._counters[e.id],delete this._children[e.id],this._keys.splice(i,1),this.sheet.splice(i,1),this.changeId++,this.changes.remove(n,i);else if(n instanceof f&&e instanceof f){const t=n.changeId;n.unmerge(e),n.changeId!==t&&(this.sheet.splice(i,1,n.getStyles()),this.changeId++,this.changes.change(n,i,i))}}}values(){return this._keys.map(e=>this._children[e])}merge(e){for(const t of e.values())this.add(t);return this}unmerge(e){for(const t of e.values())this.remove(t);return this}clone(){return(new f).merge(this)}}class g{constructor(e,t){this.selector=e,this.id=t}getStyles(){return this.selector}clone(){return this}}class v extends f{constructor(e,t){super(),this.style=e,this.id=t}getStyles(){return`${this.sheet.join(",")}{${this.style}}`}clone(){return new v(this.style,this.id).merge(this)}}class _ extends f{constructor(e,t,n){super(),this.rule=e,this.style=t,this.id=n}getStyles(){return`${this.rule}{${this.style}${p(this.sheet)}}`}clone(){return new _(this.rule,this.style,this.id).merge(this)}}function b(e,t){return`f${function(e){let t=5381,n=e.length;for(;n--;)t=33*t^e.charCodeAt(n);return(t>>>0).toString(36)}(e)}`}class y extends f{constructor(e,t){super(t),this.id=e}registerStyle(e){const t=[],n=[],i=u("&",e,t,n),s=b(i);return h(this,i,t,n,`.${s}`,!0),s}registerKeyframes(e){return this.registerHashRule("@keyframes",e)}registerHashRule(e,t){const n=[],i=[],s=u("",t,n,i),r=b(s),o=new _(`${e} ${r}`,"",`h\0${s}\0${e}`);return h(o,s,n,i,"",!1),this.add(o),r}registerRule(e,t){const n=[],i=[];h(this,u(e,t,n,i),n,i,"",!1)}registerCss(e){return this.registerRule("",e)}getStyles(){return p(this.sheet)}clone(){return new y(this.id,this.changes).merge(this)}}function w(e){return new y(`f${(++i).toString(36)}`,e)}},8534:(e,t,n)=>{n.r(t),n.d(t,{Debouncer:()=>l,Poll:()=>o,RateLimiter:()=>a,Throttler:()=>c});var i,s=n(5899),r=n(6903);class o{constructor(e){var t;this._disposed=new r.Signal(this),this._lingered=0,this._tick=new s.PromiseDelegate,this._ticked=new r.Signal(this),this._factory=e.factory,this._linger=null!==(t=e.linger)&&void 0!==t?t:i.DEFAULT_LINGER,this._standby=e.standby||i.DEFAULT_STANDBY,this._state={...i.DEFAULT_STATE,timestamp:(new Date).getTime()};const n=e.frequency||{},o=Math.max(n.interval||0,n.max||0,i.DEFAULT_FREQUENCY.max);this.frequency={...i.DEFAULT_FREQUENCY,...n,max:o},this.name=e.name||i.DEFAULT_NAME,"auto"in e&&!e.auto||setTimeout(()=>this.start())}get disposed(){return this._disposed}get frequency(){return this._frequency}set frequency(e){if(this.isDisposed||s.JSONExt.deepEqual(e,this.frequency||{}))return;let{backoff:t,interval:n,max:i}=e;if(n=Math.round(n),i=Math.round(i),"number"==typeof t&&t<1)throw new Error("Poll backoff growth factor must be at least 1");if((n<0||n>i)&&n!==o.NEVER)throw new Error("Poll interval must be between 0 and max");if(i>o.MAX_INTERVAL&&i!==o.NEVER)throw new Error(`Max interval must be less than ${o.MAX_INTERVAL}`);this._frequency={backoff:t,interval:n,max:i}}get isDisposed(){return"disposed"===this.state.phase}get standby(){return this._standby}set standby(e){this.isDisposed||this.standby===e||(this._standby=e)}get state(){return this._state}get tick(){return this._tick.promise}get ticked(){return this._ticked}async*[Symbol.asyncIterator](){for(;!this.isDisposed;)yield this.state,await this.tick.catch(()=>{})}dispose(){this.isDisposed||(this._state={...i.DISPOSED_STATE,timestamp:(new Date).getTime()},this._tick.promise.catch(e=>{}),this._tick.reject(new Error(`Poll (${this.name}) is disposed.`)),this._disposed.emit(void 0),r.Signal.clearData(this))}refresh(){return this.schedule({cancel:({phase:e})=>"refreshed"===e,interval:o.IMMEDIATE,phase:"refreshed"})}async schedule(e={}){if(this.isDisposed)return;if(e.cancel&&e.cancel(this.state))return;const t=this._tick,n=new s.PromiseDelegate,i={interval:this.frequency.interval,payload:null,phase:"standby",timestamp:(new Date).getTime(),...e};this._state=i,this._tick=n,clearTimeout(this._timeout),this._ticked.emit(this.state),t.resolve(this),await t.promise,i.interval!==o.NEVER?this._timeout=setTimeout(()=>{this.isDisposed||this.tick!==n.promise||this._execute()},i.interval):this._timeout=void 0}start(){return this.schedule({cancel:({phase:e})=>"constructed"!==e&&"standby"!==e&&"stopped"!==e,interval:o.IMMEDIATE,phase:"started"})}stop(){return this.schedule({cancel:({phase:e})=>"stopped"===e,interval:o.NEVER,phase:"stopped"})}get hidden(){return i.hidden}_execute(){let e="function"==typeof this.standby?this.standby():this.standby;if("never"===e?e=!1:"when-hidden"===e&&(this.hidden?e=++this._lingered>this._linger:(this._lingered=0,e=!1)),e)return void this.schedule();const t=this.tick;this._factory(this.state).then(e=>{this.isDisposed||this.tick!==t||this.schedule({payload:e,phase:"rejected"===this.state.phase?"reconnected":"resolved"})}).catch(e=>{this.isDisposed||this.tick!==t||this.schedule({interval:i.sleep(this.frequency,this.state),payload:e,phase:"rejected"})})}}!function(e){e.IMMEDIATE=0,e.MAX_INTERVAL=2147483647,e.NEVER=1/0}(o||(o={})),function(e){e.DEFAULT_BACKOFF=3,e.DEFAULT_FREQUENCY={backoff:!0,interval:1e3,max:3e4},e.DEFAULT_LINGER=1,e.DEFAULT_NAME="unknown",e.DEFAULT_STANDBY="when-hidden",e.DEFAULT_STATE={interval:o.NEVER,payload:null,phase:"constructed",timestamp:new Date(0).getTime()},e.DISPOSED_STATE={interval:o.NEVER,payload:null,phase:"disposed",timestamp:new Date(0).getTime()},e.sleep=function(t,n){const{backoff:i,interval:s,max:r}=t;if(s===o.NEVER)return s;const a=!0===i?e.DEFAULT_BACKOFF:!1===i?1:i,l=function(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e}(s,n.interval*a);return Math.min(r,l)},e.hidden="undefined"!=typeof document&&(document.addEventListener("visibilitychange",()=>{e.hidden="hidden"===document.visibilityState}),document.addEventListener("pagehide",()=>{e.hidden="hidden"===document.visibilityState}),"hidden"===document.visibilityState)}(i||(i={}));class a{constructor(e,t=500){this.args=void 0,this.payload=null,this.limit=t,this.poll=new o({auto:!1,factory:async()=>{const{args:t}=this;return this.args=void 0,e(...t)},frequency:{backoff:!1,interval:o.NEVER,max:o.NEVER},standby:"never"}),this.payload=new s.PromiseDelegate,this.poll.ticked.connect((e,t)=>{const{payload:n}=this;return"resolved"===t.phase?(this.payload=new s.PromiseDelegate,void n.resolve(t.payload)):"rejected"===t.phase||"stopped"===t.phase?(this.payload=new s.PromiseDelegate,n.promise.catch(e=>{}),void n.reject(t.payload)):void 0},this)}get isDisposed(){return null===this.payload}dispose(){this.isDisposed||(this.args=void 0,this.payload=null,this.poll.dispose())}async stop(){return this.poll.stop()}}class l extends a{invoke(...e){return this.args=e,this.poll.schedule({interval:this.limit,phase:"invoked"}),this.payload.promise}}class c extends a{constructor(e,t){super(e,"number"==typeof t?t:t&&t.limit),this._trailing=!1,"number"!=typeof t&&t&&"trailing"===t.edge&&(this._trailing=!0),this._interval=this._trailing?this.limit:o.IMMEDIATE}invoke(...e){const t="invoked"!==this.poll.state.phase;return(t||this._trailing)&&(this.args=e),t&&this.poll.schedule({interval:this._interval,phase:"invoked"}),this.payload.promise}}},8662:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.KernelAPIClient=t.KERNEL_SERVICE_URL=void 0,t.listRunning=o,t.startNew=a,t.restartKernel=l,t.interruptKernel=c,t.shutdownKernel=d,t.getKernelModel=u;const i=n(1089),s=n(6376),r=n(8872);async function o(e=i.ServerConnection.makeSettings()){const n=s.URLExt.join(e.baseUrl,t.KERNEL_SERVICE_URL),o=await i.ServerConnection.makeRequest(n,{},e);if(200!==o.status)throw await i.ServerConnection.ResponseError.create(o);const a=await o.json();return(0,r.validateModels)(a),a}async function a(e={},n=i.ServerConnection.makeSettings()){const o=s.URLExt.join(n.baseUrl,t.KERNEL_SERVICE_URL),a={method:"POST",body:JSON.stringify(e)},l=await i.ServerConnection.makeRequest(o,a,n);if(201!==l.status)throw await i.ServerConnection.ResponseError.create(l);const c=await l.json();return(0,r.validateModel)(c),c}async function l(e,n=i.ServerConnection.makeSettings()){const o=s.URLExt.join(n.baseUrl,t.KERNEL_SERVICE_URL,encodeURIComponent(e),"restart"),a=await i.ServerConnection.makeRequest(o,{method:"POST"},n);if(200!==a.status)throw await i.ServerConnection.ResponseError.create(a);const l=await a.json();(0,r.validateModel)(l)}async function c(e,n=i.ServerConnection.makeSettings()){const r=s.URLExt.join(n.baseUrl,t.KERNEL_SERVICE_URL,encodeURIComponent(e),"interrupt"),o=await i.ServerConnection.makeRequest(r,{method:"POST"},n);if(204!==o.status)throw await i.ServerConnection.ResponseError.create(o)}async function d(e,n=i.ServerConnection.makeSettings()){const r=s.URLExt.join(n.baseUrl,t.KERNEL_SERVICE_URL,encodeURIComponent(e)),o=await i.ServerConnection.makeRequest(r,{method:"DELETE"},n);if(404===o.status){const t=`The kernel "${e}" does not exist on the server`;console.warn(t)}else if(204!==o.status)throw await i.ServerConnection.ResponseError.create(o)}async function u(e,n=i.ServerConnection.makeSettings()){const o=s.URLExt.join(n.baseUrl,t.KERNEL_SERVICE_URL,encodeURIComponent(e)),a=await i.ServerConnection.makeRequest(o,{},n);if(404===a.status)return;if(200!==a.status)throw await i.ServerConnection.ResponseError.create(a);const l=await a.json();return(0,r.validateModel)(l),l}t.KERNEL_SERVICE_URL="api/kernels",t.KernelAPIClient=class{constructor(e={}){var t;this.serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:i.ServerConnection.makeSettings()}async listRunning(){return o(this.serverSettings)}async getModel(e){return u(e,this.serverSettings)}async startNew(e={}){return a(e,this.serverSettings)}async restart(e){return l(e,this.serverSettings)}async interrupt(e){return c(e,this.serverSettings)}async shutdown(e){return d(e,this.serverSettings)}}},8872:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateMessage=function(e){(0,i.validateProperty)(e,"metadata","object"),(0,i.validateProperty)(e,"content","object"),(0,i.validateProperty)(e,"channel","string"),function(e){for(let t=0;t<s.length;t++)(0,i.validateProperty)(e,s[t],"string")}(e.header),"iopub"===e.channel&&function(e){if("iopub"===e.channel){const t=r[e.header.msg_type];if(void 0===t)return;const n=Object.keys(t),s=e.content;for(let e=0;e<n.length;e++){let r=t[n[e]];Array.isArray(r)||(r=[r]),(0,i.validateProperty)(s,n[e],...r)}}}(e)},t.validateModel=o,t.validateModels=function(e){if(!Array.isArray(e))throw new Error("Invalid kernel list");e.forEach(e=>o(e))};const i=n(1480),s=["username","version","session","msg_id","msg_type"],r={stream:{name:"string",text:"string"},display_data:{data:"object",metadata:"object"},execute_input:{code:"string",execution_count:"number"},execute_result:{execution_count:"number",data:"object",metadata:"object"},error:{ename:"string",evalue:"string",traceback:"object"},status:{execution_state:["string",["starting","idle","busy","restarting","dead"]]},clear_output:{wait:"boolean"},comm_open:{comm_id:"string",target_name:"string",data:"object"},comm_msg:{comm_id:"string",data:"object"},comm_close:{comm_id:"string"},shutdown_reply:{restart:"boolean"}};function o(e){(0,i.validateProperty)(e,"name","string"),(0,i.validateProperty)(e,"id","string")}},8917:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isAvailable=void 0;const i=n(4903);Object.defineProperty(t,"isAvailable",{enumerable:!0,get:function(){return i.isAvailable}})},9031:e=>{function t(e){return"number"==typeof e||!!/^0x[0-9a-f]+$/i.test(e)||/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e)}function n(e,t){return"constructor"===t&&"function"==typeof e[t]||"__proto__"===t}e.exports=function(e,i){i||(i={});var s={bools:{},strings:{},unknownFn:null};"function"==typeof i.unknown&&(s.unknownFn=i.unknown),"boolean"==typeof i.boolean&&i.boolean?s.allBools=!0:[].concat(i.boolean).filter(Boolean).forEach(function(e){s.bools[e]=!0});var r={};function o(e){return r[e].some(function(e){return s.bools[e]})}Object.keys(i.alias||{}).forEach(function(e){r[e]=[].concat(i.alias[e]),r[e].forEach(function(t){r[t]=[e].concat(r[e].filter(function(e){return t!==e}))})}),[].concat(i.string).filter(Boolean).forEach(function(e){s.strings[e]=!0,r[e]&&[].concat(r[e]).forEach(function(e){s.strings[e]=!0})});var a=i.default||{},l={_:[]};function c(e,t,i){for(var r=e,o=0;o<t.length-1;o++){var a=t[o];if(n(r,a))return;void 0===r[a]&&(r[a]={}),r[a]!==Object.prototype&&r[a]!==Number.prototype&&r[a]!==String.prototype||(r[a]={}),r[a]===Array.prototype&&(r[a]=[]),r=r[a]}var l=t[t.length-1];n(r,l)||(r!==Object.prototype&&r!==Number.prototype&&r!==String.prototype||(r={}),r===Array.prototype&&(r=[]),void 0===r[l]||s.bools[l]||"boolean"==typeof r[l]?r[l]=i:Array.isArray(r[l])?r[l].push(i):r[l]=[r[l],i])}function d(e,n,i){if(!i||!s.unknownFn||function(e,t){return s.allBools&&/^--[^=]+$/.test(t)||s.strings[e]||s.bools[e]||r[e]}(e,i)||!1!==s.unknownFn(i)){var o=!s.strings[e]&&t(n)?Number(n):n;c(l,e.split("."),o),(r[e]||[]).forEach(function(e){c(l,e.split("."),o)})}}Object.keys(s.bools).forEach(function(e){d(e,void 0!==a[e]&&a[e])});var u=[];-1!==e.indexOf("--")&&(u=e.slice(e.indexOf("--")+1),e=e.slice(0,e.indexOf("--")));for(var h=0;h<e.length;h++){var p,m,f=e[h];if(/^--.+=/.test(f)){var g=f.match(/^--([^=]+)=([\s\S]*)$/);p=g[1];var v=g[2];s.bools[p]&&(v="false"!==v),d(p,v,f)}else if(/^--no-.+/.test(f))d(p=f.match(/^--no-(.+)/)[1],!1,f);else if(/^--.+/.test(f))p=f.match(/^--(.+)/)[1],void 0===(m=e[h+1])||/^(-|--)[^-]/.test(m)||s.bools[p]||s.allBools||r[p]&&o(p)?/^(true|false)$/.test(m)?(d(p,"true"===m,f),h+=1):d(p,!s.strings[p]||"",f):(d(p,m,f),h+=1);else if(/^-[^-]+/.test(f)){for(var _=f.slice(1,-1).split(""),b=!1,y=0;y<_.length;y++)if("-"!==(m=f.slice(y+2))){if(/[A-Za-z]/.test(_[y])&&"="===m[0]){d(_[y],m.slice(1),f),b=!0;break}if(/[A-Za-z]/.test(_[y])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(m)){d(_[y],m,f),b=!0;break}if(_[y+1]&&_[y+1].match(/\W/)){d(_[y],f.slice(y+2),f),b=!0;break}d(_[y],!s.strings[_[y]]||"",f)}else d(_[y],m,f);p=f.slice(-1)[0],b||"-"===p||(!e[h+1]||/^(-|--)[^-]/.test(e[h+1])||s.bools[p]||r[p]&&o(p)?e[h+1]&&/^(true|false)$/.test(e[h+1])?(d(p,"true"===e[h+1],f),h+=1):d(p,!s.strings[p]||"",f):(d(p,e[h+1],f),h+=1))}else if(s.unknownFn&&!1===s.unknownFn(f)||l._.push(s.strings._||!t(f)?f:Number(f)),i.stopEarly){l._.push.apply(l._,e.slice(h+1));break}}return Object.keys(a).forEach(function(e){var t,n,i;t=l,n=e.split("."),i=t,n.slice(0,-1).forEach(function(e){i=i[e]||{}}),n[n.length-1]in i||(c(l,e.split("."),a[e]),(r[e]||[]).forEach(function(t){c(l,t.split("."),a[e])}))}),i["--"]?l["--"]=u.slice():u.forEach(function(e){l._.push(e)}),l}},9237:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateSpecModel=s,t.validateSpecModels=function(e){if(!e.hasOwnProperty("kernelspecs"))throw new Error("No kernelspecs found");let t=Object.keys(e.kernelspecs);const n=Object.create(null);let i=e.default;for(let i=0;i<t.length;i++){const r=e.kernelspecs[t[i]];try{n[t[i]]=s(r)}catch(e){console.warn(`Removing errant kernel spec: ${t[i]}`)}}if(t=Object.keys(n),!t.length)throw new Error("No valid kernelspecs found");return i&&"string"==typeof i&&i in n||(i=t[0],console.warn(`Default kernel not found, using '${t[0]}'`)),{default:i,kernelspecs:n}};const i=n(1480);function s(e){const t=e.spec;if(!t)throw new Error("Invalid kernel spec");(0,i.validateProperty)(e,"name","string"),(0,i.validateProperty)(e,"resources","object"),(0,i.validateProperty)(t,"language","string"),(0,i.validateProperty)(t,"display_name","string"),(0,i.validateProperty)(t,"argv","array");let n=null;t.hasOwnProperty("metadata")&&((0,i.validateProperty)(t,"metadata","object"),n=t.metadata);let s=null;return t.hasOwnProperty("env")&&((0,i.validateProperty)(t,"env","object"),s=t.env),{name:e.name,resources:e.resources,language:t.language,display_name:t.display_name,argv:t.argv,metadata:n,env:s}}},9531:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,s)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),s=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),s(n(4056),t),s(n(8031),t),s(n(5310),t),s(n(9864),t),s(n(2877),t)},9659:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Time=void 0;const n=[{name:"years",milliseconds:31536e6},{name:"months",milliseconds:2592e6},{name:"days",milliseconds:864e5},{name:"hours",milliseconds:36e5},{name:"minutes",milliseconds:6e4},{name:"seconds",milliseconds:1e3}];var i;!function(e){e.formatHuman=function(e,t="long"){const i=document.documentElement.lang||"en",s=new Intl.RelativeTimeFormat(i,{numeric:"auto",style:t}),r=new Date(e).getTime()-Date.now();for(let e of n){const t=Math.ceil(r/e.milliseconds);if(0!==t)return s.format(t,e.name)}return s.format(0,"seconds")},e.format=function(e){const t=document.documentElement.lang||"en";return new Intl.DateTimeFormat(t,{dateStyle:"short",timeStyle:"short"}).format(new Date(e))}}(i||(t.Time=i={}))},9798:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.supportedKernelWebSocketProtocols=void 0,t.createMessage=function(e){var t,n,s,r,o,a;return{buffers:null!==(t=e.buffers)&&void 0!==t?t:[],channel:e.channel,content:e.content,header:{date:(new Date).toISOString(),msg_id:null!==(n=e.msgId)&&void 0!==n?n:i.UUID.uuid4(),msg_type:e.msgType,session:e.session,username:null!==(s=e.username)&&void 0!==s?s:"",subshell_id:null!==(r=e.subshellId)&&void 0!==r?r:null,version:"5.2"},metadata:null!==(o=e.metadata)&&void 0!==o?o:{},parent_header:null!==(a=e.parentHeader)&&void 0!==a?a:{}}},t.isStreamMsg=function(e){return"stream"===e.header.msg_type},t.isDisplayDataMsg=function(e){return"display_data"===e.header.msg_type},t.isUpdateDisplayDataMsg=function(e){return"update_display_data"===e.header.msg_type},t.isExecuteInputMsg=function(e){return"execute_input"===e.header.msg_type},t.isExecuteResultMsg=function(e){return"execute_result"===e.header.msg_type},t.isErrorMsg=function(e){return"error"===e.header.msg_type},t.isStatusMsg=function(e){return"status"===e.header.msg_type},t.isClearOutputMsg=function(e){return"clear_output"===e.header.msg_type},t.isDebugEventMsg=function(e){return"debug_event"===e.header.msg_type},t.isCommOpenMsg=function(e){return"comm_open"===e.header.msg_type},t.isCommCloseMsg=function(e){return"comm_close"===e.header.msg_type},t.isCommMsgMsg=function(e){return"comm_msg"===e.header.msg_type},t.isInfoRequestMsg=function(e){return"kernel_info_request"===e.header.msg_type},t.isExecuteReplyMsg=function(e){return"execute_reply"===e.header.msg_type},t.isDebugRequestMsg=function(e){return"debug_request"===e.header.msg_type},t.isDebugReplyMsg=function(e){return"debug_reply"===e.header.msg_type},t.isInputRequestMsg=function(e){return"input_request"===e.header.msg_type},t.isInputReplyMsg=function(e){return"input_reply"===e.header.msg_type};const i=n(5899);var s;!function(e){e.v1KernelWebsocketJupyterOrg="v1.kernel.websocket.jupyter.org"}(s||(t.supportedKernelWebSocketProtocols=s={}))},9851:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigWithDefaults=t.ConfigSection=t.ConfigSectionManager=void 0;const i=n(6376),s=n(608);var r;t.ConfigSectionManager=class{constructor(e){var t;this.serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:s.ServerConnection.makeSettings()}async create(e){const t=new o({...e,serverSettings:this.serverSettings});return await t.load(),t}},function(e){let t;e.create=async function(e){if(!t){const t=new o(e);return await t.load(),t}return await t.create(e)},e._setConfigSectionManager=function(e){if(t)throw new Error("ConfigSectionManager already set. If you would like to create a config section, use the `IConfigSectionManager` token in a plugin.");t=e}}(r||(t.ConfigSection=r={}));class o{constructor(e){var t;this.serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:s.ServerConnection.makeSettings(),this._name=e.name}get data(){return this._data}async load(){const e=await s.ServerConnection.makeRequest(this._url,{},this.serverSettings);if(200!==e.status)throw await s.ServerConnection.ResponseError.create(e);this._data=await e.json()}async update(e){this._data={...this._data,...e};const t={method:"PATCH",body:JSON.stringify(e)},n=await s.ServerConnection.makeRequest(this._url,t,this.serverSettings);if(200!==n.status)throw await s.ServerConnection.ResponseError.create(n);return this._data=await n.json(),this._data}get _url(){return i.URLExt.join(this.serverSettings.baseUrl,"api/config",encodeURIComponent(this._name))}}t.ConfigWithDefaults=class{constructor(e){var t,n;this._className="",this._section=e.section,this._defaults=null!==(t=e.defaults)&&void 0!==t?t:{},this._className=null!==(n=e.className)&&void 0!==n?n:""}get(e){const t=this._classData();return e in t?t[e]:this._defaults[e]}set(e,t){const n={};if(n[e]=t,this._className){const e={};return e[this._className]=n,this._section.update(e)}return this._section.update(n)}_classData(){const e=this._section.data;return this._className&&this._className in e?e[this._className]:e}}},9864:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StateDB=void 0;const i=n(6903);class s{constructor(e={}){this._changed=new i.Signal(this);const{connector:t,transform:n}=e;this._connector=t||new s.Connector,this._ready=n?n.then(e=>{const{contents:t,type:n}=e;switch(n){case"cancel":default:return;case"clear":return this._clear();case"merge":return this._merge(t||{});case"overwrite":return this._overwrite(t||{})}}):Promise.resolve(void 0)}get changed(){return this._changed}async clear(){await this._ready,await this._clear()}async fetch(e){return await this._ready,this._fetch(e)}async list(e){return await this._ready,this._list(e)}async remove(e){await this._ready,await this._remove(e),this._changed.emit({id:e,type:"remove"})}async save(e,t){await this._ready,await this._save(e,t),this._changed.emit({id:e,type:"save"})}async toJSON(){await this._ready;const{ids:e,values:t}=await this._list();return t.reduce((t,n,i)=>(t[e[i]]=n,t),{})}async _clear(){await Promise.all((await this._list()).ids.map(e=>this._remove(e)))}async _fetch(e){const t=await this._connector.fetch(e);if(t)return JSON.parse(t).v}async _list(e=""){const{ids:t,values:n}=await this._connector.list(e);return{ids:t,values:n.map(e=>JSON.parse(e).v)}}async _merge(e){await Promise.all(Object.keys(e).map(t=>e[t]&&this._save(t,e[t])))}async _overwrite(e){await this._clear(),await this._merge(e)}async _remove(e){return this._connector.remove(e)}async _save(e,t){return this._connector.save(e,JSON.stringify({v:t}))}}t.StateDB=s,function(e){e.Connector=class{constructor(){this._storage={}}async fetch(e){return this._storage[e]}async list(e=""){return Object.keys(this._storage).reduce((t,n)=>(""!==e&&e!==n.split(":")[0]||(t.ids.push(n),t.values.push(this._storage[n])),t),{ids:[],values:[]})}async remove(e){delete this._storage[e]}async save(e,t){this._storage[e]=t}}}(s||(t.StateDB=s={}))},9982:(e,t,n)=>{e.exports=n(7463)}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(n.exports,n,n.exports,__webpack_require__),n.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={},common_utils_namespaceObject={};__webpack_require__.r(common_utils_namespaceObject),__webpack_require__.d(common_utils_namespaceObject,{hasBrowserEnv:()=>hasBrowserEnv,hasStandardBrowserEnv:()=>hasStandardBrowserEnv,hasStandardBrowserWebWorkerEnv:()=>hasStandardBrowserWebWorkerEnv,navigator:()=>_navigator,origin:()=>origin});var index_es6=__webpack_require__(6588),dist=__webpack_require__(5899),ClipboardExt,ElementExt,Platform,Selector,Private,index_es6_Private,MessageLoop;!function(e){e.copyText=function(e){const t=document.body,n=i=>{i.preventDefault(),i.stopPropagation(),i.clipboardData.setData("text",e),t.removeEventListener("copy",n,!0)};t.addEventListener("copy",n,!0),document.execCommand("copy")}}(ClipboardExt||(ClipboardExt={})),function(e){e.boxSizing=function(e){let t=window.getComputedStyle(e),n=parseFloat(t.borderTopWidth)||0,i=parseFloat(t.borderLeftWidth)||0,s=parseFloat(t.borderRightWidth)||0,r=parseFloat(t.borderBottomWidth)||0,o=parseFloat(t.paddingTop)||0,a=parseFloat(t.paddingLeft)||0,l=parseFloat(t.paddingRight)||0,c=parseFloat(t.paddingBottom)||0;return{borderTop:n,borderLeft:i,borderRight:s,borderBottom:r,paddingTop:o,paddingLeft:a,paddingRight:l,paddingBottom:c,horizontalSum:i+a+l+s,verticalSum:n+o+c+r}},e.sizeLimits=function(e){let t=window.getComputedStyle(e),n=parseFloat(t.minWidth)||0,i=parseFloat(t.minHeight)||0,s=parseFloat(t.maxWidth)||1/0,r=parseFloat(t.maxHeight)||1/0;return s=Math.max(n,s),r=Math.max(i,r),{minWidth:n,minHeight:i,maxWidth:s,maxHeight:r}},e.hitTest=function(e,t,n){let i=e.getBoundingClientRect();return t>=i.left&&t<i.right&&n>=i.top&&n<i.bottom},e.scrollIntoViewIfNeeded=function(e,t){let n=e.getBoundingClientRect(),i=t.getBoundingClientRect();i.top<=n.top&&i.bottom>=n.bottom||(i.top<n.top&&i.height<=n.height||i.bottom>n.bottom&&i.height>=n.height?e.scrollTop-=n.top-i.top:(i.top<n.top&&i.height>n.height||i.bottom>n.bottom&&i.height<n.height)&&(e.scrollTop-=n.bottom-i.bottom))}}(ElementExt||(ElementExt={})),function(e){e.IS_MAC=!!navigator.platform.match(/Mac/i),e.IS_WIN=!!navigator.platform.match(/Win/i),e.IS_IE=/Trident/.test(navigator.userAgent),e.IS_EDGE=/Edge/.test(navigator.userAgent),e.accelKey=function(t){return e.IS_MAC?t.metaKey:t.ctrlKey}}(Platform||(Platform={})),function(e){e.calculateSpecificity=function(e){if(e in Private.specificityCache)return Private.specificityCache[e];let t=Private.calculateSingle(e);return Private.specificityCache[e]=t},e.isValid=function(e){if(e in Private.validityCache)return Private.validityCache[e];let t=!0;try{Private.testElem.querySelector(e)}catch(e){t=!1}return Private.validityCache[e]=t},e.matches=function(e,t){return Private.protoMatchFunc.call(e,t)}}(Selector||(Selector={})),function(e){e.specificityCache=Object.create(null),e.validityCache=Object.create(null),e.testElem=document.createElement("div"),e.protoMatchFunc=(()=>{let e=Element.prototype;return e.matches||e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector||function(e){let t=this,n=t.ownerDocument?t.ownerDocument.querySelectorAll(e):[];return-1!==Array.prototype.indexOf.call(n,t)}})(),e.calculateSingle=function(e){let c=0,d=0,u=0;function h(t){let n=e.match(t);return null!==n&&(e=e.slice(n[0].length),!0)}for(e=(e=e.split(",",1)[0]).replace(l," $1 ");e.length>0;)if(h(t))c++;else if(h(n))d++;else if(h(i))d++;else if(h(r))u++;else if(h(o))d++;else if(h(s))u++;else if(!h(a))return 0;return c=Math.min(c,255),d=Math.min(d,255),u=Math.min(u,255),c<<16|d<<8|u};const t=/^#[^\s\+>~#\.\[:]+/,n=/^\.[^\s\+>~#\.\[:]+/,i=/^\[[^\]]+\]/,s=/^[^\s\+>~#\.\[:]+/,r=/^(::[^\s\+>~#\.\[:]+|:first-line|:first-letter|:before|:after)/,o=/^:[^\s\+>~#\.\[:]+/,a=/^[\s\+>~\*]+/,l=/:not\(([^\)]+)\)/g}(Private||(Private={}));class LinkedList{constructor(){this._first=null,this._last=null,this._size=0}get isEmpty(){return 0===this._size}get size(){return this._size}get length(){return this._size}get first(){return this._first?this._first.value:void 0}get last(){return this._last?this._last.value:void 0}get firstNode(){return this._first}get lastNode(){return this._last}*[Symbol.iterator](){let e=this._first;for(;e;)yield e.value,e=e.next}*retro(){let e=this._last;for(;e;)yield e.value,e=e.prev}*nodes(){let e=this._first;for(;e;)yield e,e=e.next}*retroNodes(){let e=this._last;for(;e;)yield e,e=e.prev}assign(e){this.clear();for(const t of e)this.addLast(t)}push(e){this.addLast(e)}pop(){return this.removeLast()}shift(e){this.addFirst(e)}unshift(){return this.removeFirst()}addFirst(e){let t=new index_es6_Private.LinkedListNode(this,e);return this._first?(t.next=this._first,this._first.prev=t,this._first=t):(this._first=t,this._last=t),this._size++,t}addLast(e){let t=new index_es6_Private.LinkedListNode(this,e);return this._last?(t.prev=this._last,this._last.next=t,this._last=t):(this._first=t,this._last=t),this._size++,t}insertBefore(e,t){if(!t||t===this._first)return this.addFirst(e);if(!(t instanceof index_es6_Private.LinkedListNode)||t.list!==this)throw new Error("Reference node is not owned by the list.");let n=new index_es6_Private.LinkedListNode(this,e),i=t,s=i.prev;return n.next=i,n.prev=s,i.prev=n,s.next=n,this._size++,n}insertAfter(e,t){if(!t||t===this._last)return this.addLast(e);if(!(t instanceof index_es6_Private.LinkedListNode)||t.list!==this)throw new Error("Reference node is not owned by the list.");let n=new index_es6_Private.LinkedListNode(this,e),i=t,s=i.next;return n.next=s,n.prev=i,i.next=n,s.prev=n,this._size++,n}removeFirst(){let e=this._first;if(e)return e===this._last?(this._first=null,this._last=null):(this._first=e.next,this._first.prev=null),e.list=null,e.next=null,e.prev=null,this._size--,e.value}removeLast(){let e=this._last;if(e)return e===this._first?(this._first=null,this._last=null):(this._last=e.prev,this._last.next=null),e.list=null,e.next=null,e.prev=null,this._size--,e.value}removeNode(e){if(!(e instanceof index_es6_Private.LinkedListNode)||e.list!==this)throw new Error("Node is not owned by the list.");let t=e;t===this._first&&t===this._last?(this._first=null,this._last=null):t===this._first?(this._first=t.next,this._first.prev=null):t===this._last?(this._last=t.prev,this._last.next=null):(t.next.prev=t.prev,t.prev.next=t.next),t.list=null,t.next=null,t.prev=null,this._size--}clear(){let e=this._first;for(;e;){let t=e.next;e.list=null,e.prev=null,e.next=null,e=t}this._first=null,this._last=null,this._size=0}}!function(e){e.from=function(t){let n=new e;return n.assign(t),n}}(LinkedList||(LinkedList={})),(index_es6_Private||(index_es6_Private={})).LinkedListNode=class{constructor(e,t){this.list=null,this.next=null,this.prev=null,this.list=e,this.value=t}};class Message{constructor(e){this.type=e}get isConflatable(){return!1}conflate(e){return!1}}class ConflatableMessage extends Message{get isConflatable(){return!0}conflate(e){return!0}}!function(e){let t=null;const n=(i=Promise.resolve(),e=>{let t=!1;return i.then(()=>!t&&e()),()=>{t=!0}});var i;function s(e,t){let n=o.get(e);if(!n||0===n.length)return void d(e,t);let i=(0,index_es6.every)((0,index_es6.retro)(n),n=>!n||function(e,t,n){let i=!0;try{i="function"==typeof e?e(t,n):e.messageHook(t,n)}catch(e){l(e)}return i}(n,e,t));i&&d(e,t)}e.sendMessage=s,e.postMessage=function(e,t){t.isConflatable&&(0,index_es6.some)(r,n=>n.handler===e&&!!n.msg&&n.msg.type===t.type&&!!n.msg.isConflatable&&n.msg.conflate(t))||u(e,t)},e.installMessageHook=function(e,t){let n=o.get(e);n&&-1!==n.indexOf(t)||(n?n.push(t):o.set(e,[t]))},e.removeMessageHook=function(e,t){let n=o.get(e);if(!n)return;let i=n.indexOf(t);-1!==i&&(n[i]=null,p(n))},e.clearData=function(e){let t=o.get(e);t&&t.length>0&&(index_es6.ArrayExt.fill(t,null),p(t));for(const t of r)t.handler===e&&(t.handler=null,t.msg=null)},e.flush=function(){c||null===t||(t(),t=null,c=!0,h(),c=!1)},e.getExceptionHandler=function(){return l},e.setExceptionHandler=function(e){let t=l;return l=e,t};const r=new LinkedList,o=new WeakMap,a=new Set;let l=e=>{console.error(e)},c=!1;function d(e,t){try{e.processMessage(t)}catch(e){l(e)}}function u(e,i){r.addLast({handler:e,msg:i}),null===t&&(t=n(h))}function h(){if(t=null,r.isEmpty)return;let e={handler:null,msg:null};for(r.addLast(e);;){let t=r.removeFirst();if(t===e)return;t.handler&&t.msg&&s(t.handler,t.msg)}}function p(e){0===a.size&&n(m),a.add(e)}function m(){a.forEach(f),a.clear()}function f(e){index_es6.ArrayExt.removeAllWhere(e,g)}function g(e){return null===e}}(MessageLoop||(MessageLoop={}));var dist_index_es6=__webpack_require__(1628),signaling_dist_index_es6=__webpack_require__(6903),disposable_dist_index_es6=__webpack_require__(785),dist_index_es6_Private;class Drag{constructor(e){this._onScrollFrame=()=>{if(!this._scrollTarget)return;let{element:e,edge:t,distance:n}=this._scrollTarget,i=dist_index_es6_Private.SCROLL_EDGE_SIZE-n,s=Math.pow(i/dist_index_es6_Private.SCROLL_EDGE_SIZE,2),r=Math.max(1,Math.round(s*dist_index_es6_Private.SCROLL_EDGE_SIZE));switch(t){case"top":e.scrollTop-=r;break;case"left":e.scrollLeft-=r;break;case"right":e.scrollLeft+=r;break;case"bottom":e.scrollTop+=r}requestAnimationFrame(this._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=e.document||document,this.mimeData=e.mimeData,this.dragImage=e.dragImage||null,this.proposedAction=e.proposedAction||"copy",this.supportedActions=e.supportedActions||"all",this.source=e.source||null}dispose(){if(!this._disposed){if(this._disposed=!0,this._currentTarget){let e=new PointerEvent("pointerup",{bubbles:!0,cancelable:!0,clientX:-1,clientY:-1});dist_index_es6_Private.dispatchDragLeave(this,this._currentTarget,null,e)}this._finalize("none")}}get isDisposed(){return this._disposed}start(e,t){if(this._disposed)return Promise.resolve("none");if(this._promise)return this._promise;this._addListeners(),this._attachDragImage(e,t),this._promise=new Promise(e=>{this._resolve=e});let n=new PointerEvent("pointermove",{bubbles:!0,cancelable:!0,clientX:e,clientY:t});return document.dispatchEvent(n),this._promise}handleEvent(e){switch(e.type){case"pointermove":this._evtPointerMove(e);break;case"pointerup":this._evtPointerUp(e);break;case"keydown":this._evtKeyDown(e);break;default:e.preventDefault(),e.stopPropagation()}}moveDragImage(e,t){this.dragImage&&(this.dragImage.style.transform=`translate(${e}px, ${t}px)`)}_evtPointerMove(e){e.preventDefault(),e.stopPropagation(),this._updateCurrentTarget(e),this._updateDragScroll(e),this.moveDragImage(e.clientX,e.clientY)}_evtPointerUp(e){if(e.preventDefault(),e.stopPropagation(),0!==e.button)return;if(this._updateCurrentTarget(e),!this._currentTarget)return void this._finalize("none");if("none"===this._dropAction)return dist_index_es6_Private.dispatchDragLeave(this,this._currentTarget,null,e),void this._finalize("none");let t=dist_index_es6_Private.dispatchDrop(this,this._currentTarget,e);this._finalize(t)}_evtKeyDown(e){e.preventDefault(),e.stopPropagation(),27===e.keyCode&&this.dispose()}_addListeners(){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)}_removeListeners(){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)}_updateDragScroll(e){let t=dist_index_es6_Private.findScrollTarget(e);(this._scrollTarget||t)&&(this._scrollTarget||setTimeout(this._onScrollFrame,500),this._scrollTarget=t)}_updateCurrentTarget(e){let t=this._currentTarget,n=this._currentTarget,i=this._currentElement,s=dist_index_es6_Private.findElementBehindBackdrop(e,this.document);this._currentElement=s,s!==i&&s!==n&&dist_index_es6_Private.dispatchDragExit(this,n,s,e),s!==i&&s!==n&&(n=dist_index_es6_Private.dispatchDragEnter(this,s,n,e)),n!==t&&(this._currentTarget=n,dist_index_es6_Private.dispatchDragLeave(this,t,n,e));let r=dist_index_es6_Private.dispatchDragOver(this,n,e);this._setDropAction(r)}_attachDragImage(e,t){if(!this.dragImage)return;this.dragImage.classList.add("lm-mod-drag-image");let n=this.dragImage.style;n.pointerEvents="none",n.position="fixed",n.transform=`translate(${e}px, ${t}px)`,(this.document instanceof Document?this.document.body:this.document.firstElementChild).appendChild(this.dragImage)}_detachDragImage(){if(!this.dragImage)return;let e=this.dragImage.parentNode;e&&e.removeChild(this.dragImage)}_setDropAction(e){if(e=dist_index_es6_Private.validateAction(e,this.supportedActions),!this._override||this._dropAction!==e)switch(e){case"none":this._dropAction=e,this._override=Drag.overrideCursor("no-drop",this.document);break;case"copy":this._dropAction=e,this._override=Drag.overrideCursor("copy",this.document);break;case"link":this._dropAction=e,this._override=Drag.overrideCursor("alias",this.document);break;case"move":this._dropAction=e,this._override=Drag.overrideCursor("move",this.document)}}_finalize(e){let t=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,t&&t(e)}}function getKeyboardLayout(){return keyboard_dist_index_es6_Private.keyboardLayout}function setKeyboardLayout(e){keyboard_dist_index_es6_Private.keyboardLayout=e}!function(e){class t extends DragEvent{constructor(e,t){super(t.type,{bubbles:!0,cancelable:!0,altKey:e.altKey,button:e.button,clientX:e.clientX,clientY:e.clientY,ctrlKey:e.ctrlKey,detail:0,metaKey:e.metaKey,relatedTarget:t.related,screenX:e.screenX,screenY:e.screenY,shiftKey:e.shiftKey,view:window});const{drag:n}=t;this.dropAction="none",this.mimeData=n.mimeData,this.proposedAction=n.proposedAction,this.supportedActions=n.supportedActions,this.source=n.source}}e.Event=t,e.overrideCursor=function(e,t=document){return dist_index_es6_Private.overrideCursor(e,t)}}(Drag||(Drag={})),function(e){function t(t,s=document){if(t){if(n&&t==n.event)return n.element;e.cursorBackdrop.style.zIndex="-1000";const i=s.elementFromPoint(t.clientX,t.clientY);return e.cursorBackdrop.style.zIndex="",n={event:t,element:i},i}{const t=e.cursorBackdrop.style.transform;if(i&&t===i.transform)return i.element;const n=e.cursorBackdrop.getBoundingClientRect();e.cursorBackdrop.style.zIndex="-1000";const r=s.elementFromPoint(n.left+n.width/2,n.top+n.height/2);return e.cursorBackdrop.style.zIndex="",i={transform:t,element:r},r}}e.SCROLL_EDGE_SIZE=20,e.validateAction=function(e,t){return s[e]&r[t]?e:"none"},e.findElementBehindBackdrop=t;let n=null,i=null;e.findScrollTarget=function(n){let i=n.clientX,s=n.clientY,r=t(n);for(;r;r=r.parentElement){if(!r.hasAttribute("data-lm-dragscroll"))continue;let t=0,n=0;r===document.body&&(t=window.pageXOffset,n=window.pageYOffset);let o=r.getBoundingClientRect(),a=o.top+n,l=o.left+t,c=l+o.width,d=a+o.height;if(i<l||i>=c||s<a||s>=d)continue;let u,h=i-l+1,p=s-a+1,m=c-i,f=d-s,g=Math.min(h,p,m,f);if(g>e.SCROLL_EDGE_SIZE)continue;switch(g){case f:u="bottom";break;case p:u="top";break;case m:u="right";break;case h:u="left";break;default:throw"unreachable"}let v,_=r.scrollWidth-r.clientWidth,b=r.scrollHeight-r.clientHeight;switch(u){case"top":v=b>0&&r.scrollTop>0;break;case"left":v=_>0&&r.scrollLeft>0;break;case"right":v=_>0&&r.scrollLeft<_;break;case"bottom":v=b>0&&r.scrollTop<b;break;default:throw"unreachable"}if(v)return{element:r,edge:u,distance:g}}return null},e.dispatchDragEnter=function(e,t,n,i){if(!t)return null;let s=new Drag.Event(i,{drag:e,related:n,type:"lm-dragenter"});if(!t.dispatchEvent(s))return t;const r=e.document instanceof Document?e.document.body:e.document.firstElementChild;return t===r?n:(s=new Drag.Event(i,{drag:e,related:n,type:"lm-dragenter"}),r.dispatchEvent(s),r)},e.dispatchDragExit=function(e,t,n,i){if(!t)return;let s=new Drag.Event(i,{drag:e,related:n,type:"lm-dragexit"});t.dispatchEvent(s)},e.dispatchDragLeave=function(e,t,n,i){if(!t)return;let s=new Drag.Event(i,{drag:e,related:n,type:"lm-dragleave"});t.dispatchEvent(s)},e.dispatchDragOver=function(e,t,n){if(!t)return"none";let i=new Drag.Event(n,{drag:e,related:null,type:"lm-dragover"});return t.dispatchEvent(i)?"none":i.dropAction},e.dispatchDrop=function(e,t,n){if(!t)return"none";let i=new Drag.Event(n,{drag:e,related:null,type:"lm-drop"});return t.dispatchEvent(i)?"none":i.dropAction};const s={none:0,copy:1,link:2,move:4},r={none:s.none,copy:s.copy,link:s.link,move:s.move,"copy-link":s.copy|s.link,"copy-move":s.copy|s.move,"link-move":s.link|s.move,all:s.copy|s.link|s.move};function o(t){e.cursorBackdrop&&(e.cursorBackdrop.style.transform=`translate(${t.clientX}px, ${t.clientY}px)`)}function a(n){if(!e.cursorBackdrop)return;let i=t();if(!i)return;const s=i.closest("[data-lm-dragscroll]");s&&(s.scrollTop+=e.cursorBackdrop.scrollTop-c,s.scrollLeft+=e.cursorBackdrop.scrollLeft-c,l())}function l(){e.cursorBackdrop.scrollTop=c,e.cursorBackdrop.scrollLeft=c}e.overrideCursor=function(t,n=document){let i=++d;const s=n instanceof Document?n.body:n.firstElementChild;return e.cursorBackdrop.isConnected||(e.cursorBackdrop.style.transform="scale(0)",s.appendChild(e.cursorBackdrop),l(),document.addEventListener("pointermove",o,{capture:!0,passive:!0}),e.cursorBackdrop.addEventListener("scroll",a,{capture:!0,passive:!0})),e.cursorBackdrop.style.cursor=t,new disposable_dist_index_es6.DisposableDelegate(()=>{i===d&&e.cursorBackdrop.isConnected&&(document.removeEventListener("pointermove",o,!0),e.cursorBackdrop.removeEventListener("scroll",a,!0),s.removeChild(e.cursorBackdrop))})};const c=500;let d=0;e.cursorBackdrop=function(){const e=document.createElement("div");return e.classList.add("lm-cursor-backdrop"),e}()}(dist_index_es6_Private||(dist_index_es6_Private={}));class KeycodeLayout{constructor(e,t,n=[]){this.name=e,this._codes=t,this._keys=KeycodeLayout.extractKeys(t),this._modifierKeys=KeycodeLayout.convertToKeySet(n)}keys(){return Object.keys(this._keys)}isValidKey(e){return e in this._keys}isModifierKey(e){return e in this._modifierKeys}keyForKeydownEvent(e){return this._codes[e.keyCode]||""}}!function(e){e.extractKeys=function(e){let t=Object.create(null);for(let n in e)t[e[n]]=!0;return t},e.convertToKeySet=function(e){let t=Object(null);for(let n=0,i=e.length;n<i;++n)t[e[n]]=!0;return t}}(KeycodeLayout||(KeycodeLayout={}));const EN_US=new KeycodeLayout("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"]);var keyboard_dist_index_es6_Private,commands_dist_index_es6_Private,VirtualDOM,virtualdom_dist_index_es6_Private,BoxEngine,Private$j,Private$i,Utils;(keyboard_dist_index_es6_Private||(keyboard_dist_index_es6_Private={})).keyboardLayout=EN_US;class CommandRegistry{constructor(){this._timerID=0,this._timerModifierID=0,this._replaying=!1,this._keystrokes=[],this._keydownEvents=[],this._keyBindings=[],this._exactKeyMatch=null,this._commands=new Map,this._commandChanged=new signaling_dist_index_es6.Signal(this),this._commandExecuted=new signaling_dist_index_es6.Signal(this),this._keyBindingChanged=new signaling_dist_index_es6.Signal(this),this._holdKeyBindingPromises=new Map}get commandChanged(){return this._commandChanged}get commandExecuted(){return this._commandExecuted}get keyBindingChanged(){return this._keyBindingChanged}get keyBindings(){return this._keyBindings}listCommands(){return Array.from(this._commands.keys())}hasCommand(e){return this._commands.has(e)}addCommand(e,t){if(this._commands.has(e))throw new Error(`Command '${e}' already registered.`);return this._commands.set(e,commands_dist_index_es6_Private.createCommand(t)),this._commandChanged.emit({id:e,type:"added"}),new disposable_dist_index_es6.DisposableDelegate(()=>{this._commands.delete(e),this._commandChanged.emit({id:e,type:"removed"})})}notifyCommandChanged(e){if(void 0!==e&&!this._commands.has(e))throw new Error(`Command '${e}' is not registered.`);this._commandChanged.emit({id:e,type:e?"changed":"many-changed"})}describedBy(e,t=dist.JSONExt.emptyObject){var n;let i=this._commands.get(e);return Promise.resolve(null!==(n=null==i?void 0:i.describedBy.call(void 0,t))&&void 0!==n?n:{args:null})}label(e,t=dist.JSONExt.emptyObject){var n;let i=this._commands.get(e);return null!==(n=null==i?void 0:i.label.call(void 0,t))&&void 0!==n?n:""}mnemonic(e,t=dist.JSONExt.emptyObject){let n=this._commands.get(e);return n?n.mnemonic.call(void 0,t):-1}icon(e,t=dist.JSONExt.emptyObject){var n;return null===(n=this._commands.get(e))||void 0===n?void 0:n.icon.call(void 0,t)}iconClass(e,t=dist.JSONExt.emptyObject){let n=this._commands.get(e);return n?n.iconClass.call(void 0,t):""}iconLabel(e,t=dist.JSONExt.emptyObject){let n=this._commands.get(e);return n?n.iconLabel.call(void 0,t):""}caption(e,t=dist.JSONExt.emptyObject){let n=this._commands.get(e);return n?n.caption.call(void 0,t):""}usage(e,t=dist.JSONExt.emptyObject){let n=this._commands.get(e);return n?n.usage.call(void 0,t):""}className(e,t=dist.JSONExt.emptyObject){let n=this._commands.get(e);return n?n.className.call(void 0,t):""}dataset(e,t=dist.JSONExt.emptyObject){let n=this._commands.get(e);return n?n.dataset.call(void 0,t):{}}isEnabled(e,t=dist.JSONExt.emptyObject){let n=this._commands.get(e);return!!n&&n.isEnabled.call(void 0,t)}isToggled(e,t=dist.JSONExt.emptyObject){let n=this._commands.get(e);return!!n&&n.isToggled.call(void 0,t)}isToggleable(e,t=dist.JSONExt.emptyObject){let n=this._commands.get(e);return!!n&&n.isToggleable}isVisible(e,t=dist.JSONExt.emptyObject){let n=this._commands.get(e);return!!n&&n.isVisible.call(void 0,t)}execute(e,t=dist.JSONExt.emptyObject){let n,i=this._commands.get(e);if(!i)return Promise.reject(new Error(`Command '${e}' not registered.`));try{n=i.execute.call(void 0,t)}catch(e){n=Promise.reject(e)}let s=Promise.resolve(n);return this._commandExecuted.emit({id:e,args:t,result:s}),s}addKeyBinding(e){let t=commands_dist_index_es6_Private.createKeyBinding(e);return this._keyBindings.push(t),this._keyBindingChanged.emit({binding:t,type:"added"}),new disposable_dist_index_es6.DisposableDelegate(()=>{index_es6.ArrayExt.removeFirstOf(this._keyBindings,t),this._keyBindingChanged.emit({binding:t,type:"removed"})})}processKeydownEvent(e){if(e.defaultPrevented||this._replaying)return;const t=CommandRegistry.keystrokeForKeydownEvent(e);if(!t)return this._replayKeydownEvents(),void this._clearPendingState();if(CommandRegistry.isModifierKeyPressed(e)){let{exact:n}=commands_dist_index_es6_Private.matchKeyBinding(this._keyBindings,[t],e);return void(n?(e.preventDefault(),e.stopPropagation(),this._startModifierTimer(n)):this._clearModifierTimer())}this._keystrokes.push(t);const{exact:n,partial:i}=commands_dist_index_es6_Private.matchKeyBinding(this._keyBindings,this._keystrokes,e),s=0!==i.length;return n||s?(((null==n?void 0:n.preventDefault)||i.some(e=>e.preventDefault))&&(e.preventDefault(),e.stopPropagation()),this._keydownEvents.push(e),n&&!s?(this._executeKeyBinding(n),void this._clearPendingState()):(n&&(this._exactKeyMatch=n),void this._startTimer())):(this._replayKeydownEvents(),void this._clearPendingState())}holdKeyBindingExecution(e,t){this._holdKeyBindingPromises.set(e,t)}processKeyupEvent(e){this._clearModifierTimer()}_startModifierTimer(e){this._clearModifierTimer(),this._timerModifierID=window.setTimeout(()=>{this._executeKeyBinding(e)},commands_dist_index_es6_Private.modifierkeyTimeOut)}_clearModifierTimer(){0!==this._timerModifierID&&(clearTimeout(this._timerModifierID),this._timerModifierID=0)}_startTimer(){this._clearTimer(),this._timerID=window.setTimeout(()=>{this._onPendingTimeout()},commands_dist_index_es6_Private.CHORD_TIMEOUT)}_clearTimer(){0!==this._timerID&&(clearTimeout(this._timerID),this._timerID=0)}_replayKeydownEvents(){0!==this._keydownEvents.length&&(this._replaying=!0,this._keydownEvents.forEach(commands_dist_index_es6_Private.replayKeyEvent),this._replaying=!1)}async _executeKeyBinding(e){if(0!==this._holdKeyBindingPromises.size){const e=[...this._keydownEvents],t=(await Promise.race([Promise.all(e.map(async e=>{var t;return null!==(t=this._holdKeyBindingPromises.get(e))&&void 0!==t?t:Promise.resolve(!0)})),new Promise(e=>{setTimeout(()=>e([!1]),commands_dist_index_es6_Private.KEYBINDING_HOLD_TIMEOUT)})])).every(Boolean);if(this._holdKeyBindingPromises.clear(),!t)return}let{command:t,args:n}=e,i={_luminoEvent:{type:"keybinding",keys:e.keys},...n};if(!this.hasCommand(t)||!this.isEnabled(t,i)){let n=this.hasCommand(t)?"enabled":"registered",i=`Cannot execute key binding '${e.keys.join(", ")}':`,s=`command '${t}' is not ${n}.`;return void console.warn(`${i} ${s}`)}await this.execute(t,i)}_clearPendingState(){this._clearTimer(),this._clearModifierTimer(),this._exactKeyMatch=null,this._keystrokes.length=0,this._keydownEvents.length=0}_onPendingTimeout(){this._timerID=0,this._exactKeyMatch?this._executeKeyBinding(this._exactKeyMatch):this._replayKeydownEvents(),this._clearPendingState()}}!function(e){function t(e){let t="",n=!1,i=!1,s=!1,r=!1;for(let o of e.split(/\s+/))"Accel"===o?Platform.IS_MAC?i=!0:s=!0:"Alt"===o?n=!0:"Cmd"===o?i=!0:"Ctrl"===o?s=!0:"Shift"===o?r=!0:o.length>0&&(t=o);return{cmd:i,ctrl:s,alt:n,shift:r,key:t}}function n(e){let n="",i=t(e);return i.ctrl&&(n+="Ctrl "),i.alt&&(n+="Alt "),i.shift&&(n+="Shift "),i.cmd&&Platform.IS_MAC&&(n+="Cmd "),i.key?n+i.key:n.trim()}e.parseKeystroke=t,e.normalizeKeystroke=n,e.normalizeKeys=function(e){let t;return t=Platform.IS_WIN?e.winKeys||e.keys:Platform.IS_MAC?e.macKeys||e.keys:e.linuxKeys||e.keys,t.map(n)},e.formatKeystroke=function(e){return"string"==typeof e?n(e):e.map(n).join(", ");function n(e){let n=[],i=Platform.IS_MAC?" ":"+",s=t(e);return s.ctrl&&n.push("Ctrl"),s.alt&&n.push("Alt"),s.shift&&n.push("Shift"),Platform.IS_MAC&&s.cmd&&n.push("Cmd"),n.push(s.key),n.map(commands_dist_index_es6_Private.formatKey).join(i)}},e.isModifierKeyPressed=function(e){let t=getKeyboardLayout(),n=t.keyForKeydownEvent(e);return t.isModifierKey(n)},e.keystrokeForKeydownEvent=function(e){let t=getKeyboardLayout(),n=t.keyForKeydownEvent(e),i=[];return e.ctrlKey&&i.push("Ctrl"),e.altKey&&i.push("Alt"),e.shiftKey&&i.push("Shift"),e.metaKey&&Platform.IS_MAC&&i.push("Cmd"),t.isModifierKey(n)||i.push(n),i.join(" ")}}(CommandRegistry||(CommandRegistry={})),function(e){e.CHORD_TIMEOUT=1e3,e.KEYBINDING_HOLD_TIMEOUT=1e3,e.modifierkeyTimeOut=500,e.createCommand=function(e){return{execute:e.execute,describedBy:c("function"==typeof e.describedBy?e.describedBy:{args:null,...e.describedBy},()=>({args:null})),label:c(e.label,i),mnemonic:c(e.mnemonic,s),icon:c(e.icon,l),iconClass:c(e.iconClass,i),iconLabel:c(e.iconLabel,i),caption:c(e.caption,i),usage:c(e.usage,i),className:c(e.className,i),dataset:c(e.dataset,a),isEnabled:e.isEnabled||r,isToggled:e.isToggled||o,isToggleable:e.isToggleable||!!e.isToggled,isVisible:e.isVisible||r}},e.createKeyBinding=function(e){var t;return{keys:CommandRegistry.normalizeKeys(e),selector:d(e),command:e.command,args:e.args||dist.JSONExt.emptyObject,preventDefault:null===(t=e.preventDefault)||void 0===t||t}},e.matchKeyBinding=function(e,t,n){let i=null,s=[],r=1/0,o=0;for(let a=0,l=e.length;a<l;++a){let l=e[a],c=u(l.keys,t);if(0===c)continue;if(2===c){-1!==h(l.selector,n)&&s.push(l);continue}let d=h(l.selector,n);if(-1===d||d>r)continue;let p=Selector.calculateSpecificity(l.selector);(!i||d<r||p>=o)&&(i=l,r=d,o=p)}return{exact:i,partial:s}},e.replayKeyEvent=function(e){e.target.dispatchEvent(function(e){let t=document.createEvent("Event"),n=e.bubbles||!0,i=e.cancelable||!0;return t.initEvent(e.type||"keydown",n,i),t.key=e.key||"",t.keyCode=e.keyCode||0,t.which=e.keyCode||0,t.ctrlKey=e.ctrlKey||!1,t.altKey=e.altKey||!1,t.shiftKey=e.shiftKey||!1,t.metaKey=e.metaKey||!1,t.view=e.view||window,t}(e))},e.formatKey=function(e){return Platform.IS_MAC?t.hasOwnProperty(e)?t[e]:e:n.hasOwnProperty(e)?n[e]:e};const t={Backspace:"⌫",Tab:"⇥",Enter:"⏎",Shift:"⇧",Ctrl:"⌃",Alt:"⌥",Escape:"⎋",PageUp:"⇞",PageDown:"⇟",End:"↘",Home:"↖",ArrowLeft:"←",ArrowUp:"↑",ArrowRight:"→",ArrowDown:"↓",Delete:"⌦",Cmd:"⌘"},n={Escape:"Esc",PageUp:"Page Up",PageDown:"Page Down",ArrowLeft:"Left",ArrowUp:"Up",ArrowRight:"Right",ArrowDown:"Down",Delete:"Del"},i=()=>"",s=()=>-1,r=()=>!0,o=()=>!1,a=()=>({}),l=()=>{};function c(e,t){return void 0===e?t:"function"==typeof e?e:()=>e}function d(e){if(-1!==e.selector.indexOf(","))throw new Error(`Selector cannot contain commas: ${e.selector}`);if(!Selector.isValid(e.selector))throw new Error(`Invalid selector: ${e.selector}`);return e.selector}function u(e,t){if(e.length<t.length)return 0;for(let n=0,i=t.length;n<i;++n)if(e[n]!==t[n])return 0;return e.length>t.length?2:1}function h(e,t){let n=t.target,i=t.currentTarget;for(let t=0;null!==n;n=n.parentElement,++t){if(n.hasAttribute("data-lm-suppress-shortcuts"))return-1;if(Selector.matches(n,e))return t;if(n===i)return-1}return-1}}(commands_dist_index_es6_Private||(commands_dist_index_es6_Private={}));class VirtualText{constructor(e){this.type="text",this.content=e}}class VirtualElement{constructor(e,t,n,i){this.type="element",this.tag=e,this.attrs=t,this.children=n,this.renderer=i}}class VirtualElementPass extends VirtualElement{constructor(e,t,n){super(e,t,[],n||void 0)}}function h(e){let t,n={},i=[];for(let e=1,r=arguments.length;e<r;++e){let r=arguments[e];"string"==typeof r?i.push(new VirtualText(r)):r instanceof VirtualText||r instanceof VirtualElement?i.push(r):r instanceof Array?s(i,r):1!==e&&2!==e||!r||"object"!=typeof r||("render"in r?t=r:n=r)}return new VirtualElement(e,n,i,t);function s(e,t){for(let n of t)"string"==typeof n?e.push(new VirtualText(n)):(n instanceof VirtualText||n instanceof VirtualElement)&&e.push(n)}}function hpass(e){let t={},n=null;if(2===arguments.length){const e=arguments[1];"render"in e?n=e:t=e}else if(3===arguments.length)t=arguments[1],n=arguments[2];else if(arguments.length>3)throw new Error("hpass() should be called with 1, 2, or 3 arguments");return new VirtualElementPass(e,t,n)}!function(e){e.a=e.bind(void 0,"a"),e.abbr=e.bind(void 0,"abbr"),e.address=e.bind(void 0,"address"),e.area=e.bind(void 0,"area"),e.article=e.bind(void 0,"article"),e.aside=e.bind(void 0,"aside"),e.audio=e.bind(void 0,"audio"),e.b=e.bind(void 0,"b"),e.bdi=e.bind(void 0,"bdi"),e.bdo=e.bind(void 0,"bdo"),e.blockquote=e.bind(void 0,"blockquote"),e.br=e.bind(void 0,"br"),e.button=e.bind(void 0,"button"),e.canvas=e.bind(void 0,"canvas"),e.caption=e.bind(void 0,"caption"),e.cite=e.bind(void 0,"cite"),e.code=e.bind(void 0,"code"),e.col=e.bind(void 0,"col"),e.colgroup=e.bind(void 0,"colgroup"),e.data=e.bind(void 0,"data"),e.datalist=e.bind(void 0,"datalist"),e.dd=e.bind(void 0,"dd"),e.del=e.bind(void 0,"del"),e.dfn=e.bind(void 0,"dfn"),e.div=e.bind(void 0,"div"),e.dl=e.bind(void 0,"dl"),e.dt=e.bind(void 0,"dt"),e.em=e.bind(void 0,"em"),e.embed=e.bind(void 0,"embed"),e.fieldset=e.bind(void 0,"fieldset"),e.figcaption=e.bind(void 0,"figcaption"),e.figure=e.bind(void 0,"figure"),e.footer=e.bind(void 0,"footer"),e.form=e.bind(void 0,"form"),e.h1=e.bind(void 0,"h1"),e.h2=e.bind(void 0,"h2"),e.h3=e.bind(void 0,"h3"),e.h4=e.bind(void 0,"h4"),e.h5=e.bind(void 0,"h5"),e.h6=e.bind(void 0,"h6"),e.header=e.bind(void 0,"header"),e.hr=e.bind(void 0,"hr"),e.i=e.bind(void 0,"i"),e.iframe=e.bind(void 0,"iframe"),e.img=e.bind(void 0,"img"),e.input=e.bind(void 0,"input"),e.ins=e.bind(void 0,"ins"),e.kbd=e.bind(void 0,"kbd"),e.label=e.bind(void 0,"label"),e.legend=e.bind(void 0,"legend"),e.li=e.bind(void 0,"li"),e.main=e.bind(void 0,"main"),e.map=e.bind(void 0,"map"),e.mark=e.bind(void 0,"mark"),e.meter=e.bind(void 0,"meter"),e.nav=e.bind(void 0,"nav"),e.noscript=e.bind(void 0,"noscript"),e.object=e.bind(void 0,"object"),e.ol=e.bind(void 0,"ol"),e.optgroup=e.bind(void 0,"optgroup"),e.option=e.bind(void 0,"option"),e.output=e.bind(void 0,"output"),e.p=e.bind(void 0,"p"),e.param=e.bind(void 0,"param"),e.pre=e.bind(void 0,"pre"),e.progress=e.bind(void 0,"progress"),e.q=e.bind(void 0,"q"),e.rp=e.bind(void 0,"rp"),e.rt=e.bind(void 0,"rt"),e.ruby=e.bind(void 0,"ruby"),e.s=e.bind(void 0,"s"),e.samp=e.bind(void 0,"samp"),e.section=e.bind(void 0,"section"),e.select=e.bind(void 0,"select"),e.small=e.bind(void 0,"small"),e.source=e.bind(void 0,"source"),e.span=e.bind(void 0,"span"),e.strong=e.bind(void 0,"strong"),e.sub=e.bind(void 0,"sub"),e.summary=e.bind(void 0,"summary"),e.sup=e.bind(void 0,"sup"),e.table=e.bind(void 0,"table"),e.tbody=e.bind(void 0,"tbody"),e.td=e.bind(void 0,"td"),e.textarea=e.bind(void 0,"textarea"),e.tfoot=e.bind(void 0,"tfoot"),e.th=e.bind(void 0,"th"),e.thead=e.bind(void 0,"thead"),e.time=e.bind(void 0,"time"),e.title=e.bind(void 0,"title"),e.tr=e.bind(void 0,"tr"),e.track=e.bind(void 0,"track"),e.u=e.bind(void 0,"u"),e.ul=e.bind(void 0,"ul"),e.var_=e.bind(void 0,"var"),e.video=e.bind(void 0,"video"),e.wbr=e.bind(void 0,"wbr")}(h||(h={})),function(e){e.realize=function(e){return virtualdom_dist_index_es6_Private.createDOMNode(e)},e.render=function(e,t){let n=virtualdom_dist_index_es6_Private.hostMap.get(t)||[],i=virtualdom_dist_index_es6_Private.asContentArray(e);virtualdom_dist_index_es6_Private.hostMap.set(t,i),virtualdom_dist_index_es6_Private.updateContent(t,n,i)}}(VirtualDOM||(VirtualDOM={})),function(e){function t(e){let n=arguments[1]||null;const s=arguments[2]||null;if(n)n.insertBefore(t(e),s);else{if("text"===e.type)return document.createTextNode(e.content);if(n=document.createElement(e.tag),function(e,t){for(let n in t)n in i||("on"===n.substr(0,2)?e[n]=t[n]:e.setAttribute(n,t[n]));void 0!==t.className&&e.setAttribute("class",t.className),void 0!==t.htmlFor&&e.setAttribute("for",t.htmlFor),t.dataset&&function(e,t){for(let n in t)e.setAttribute(`data-${n}`,t[n])}(e,t.dataset),t.style&&function(e,t){let n,i=e.style;for(n in t)i[n]=t[n]}(e,t.style)}(n,e.attrs),e.renderer)return e.renderer.render(n,{attrs:e.attrs,children:e.children}),n;for(let i=0,s=e.children.length;i<s;++i)t(e.children[i],n)}return n}function n(e,t,i,s){for(let r=t.length-1;r>=i;--r){const i=t[r],o=s?e.lastChild:e.childNodes[r];"text"===i.type||(i.renderer&&i.renderer.unrender?i.renderer.unrender(o,{attrs:i.attrs,children:i.children}):n(o,i.children,0,!1)),s&&e.removeChild(o)}}e.hostMap=new WeakMap,e.asContentArray=function(e){return e?e instanceof Array?e:[e]:[]},e.createDOMNode=t,e.updateContent=function e(i,r,o){if(r===o)return;let a=function(e,t){let n=e.firstChild,i=Object.create(null);for(let e of t)"element"===e.type&&e.attrs.key&&(i[e.attrs.key]={vNode:e,element:n}),n=n.nextSibling;return i}(i,r),l=r.slice(),c=i.firstChild,d=o.length;for(let n=0;n<d;++n){if(n>=l.length){t(o[n],i);continue}let r=l[n],d=o[n];if(r===d){c=c.nextSibling;continue}if("text"===r.type&&"text"===d.type){c.textContent!==d.content&&(c.textContent=d.content),c=c.nextSibling;continue}if("text"===r.type||"text"===d.type){index_es6.ArrayExt.insert(l,n,d),t(d,i,c);continue}if(!r.renderer!=!d.renderer){index_es6.ArrayExt.insert(l,n,d),t(d,i,c);continue}let u=d.attrs.key;if(u&&u in a){let e=a[u];e.vNode!==r&&(index_es6.ArrayExt.move(l,l.indexOf(e.vNode,n+1),n),i.insertBefore(e.element,c),r=e.vNode,c=e.element)}if(r===d){c=c.nextSibling;continue}let h=r.attrs.key;h&&h!==u?(index_es6.ArrayExt.insert(l,n,d),t(d,i,c)):r.tag===d.tag?(s(c,r.attrs,d.attrs),d.renderer?d.renderer.render(c,{attrs:d.attrs,children:d.children}):e(c,r.children,d.children),c=c.nextSibling):(index_es6.ArrayExt.insert(l,n,d),t(d,i,c))}n(i,l,d,!0)};const i={key:!0,className:!0,htmlFor:!0,dataset:!0,style:!0};function s(e,t,n){if(t===n)return;let s;for(s in t)s in i||s in n||("on"===s.substr(0,2)?e[s]=null:e.removeAttribute(s));for(s in n)s in i||t[s]===n[s]||("on"===s.substr(0,2)?e[s]=n[s]:e.setAttribute(s,n[s]));t.className!==n.className&&(void 0!==n.className?e.setAttribute("class",n.className):e.removeAttribute("class")),t.htmlFor!==n.htmlFor&&(void 0!==n.htmlFor?e.setAttribute("for",n.htmlFor):e.removeAttribute("for")),t.dataset!==n.dataset&&function(e,t,n){for(let i in t)i in n||e.removeAttribute(`data-${i}`);for(let i in n)t[i]!==n[i]&&e.setAttribute(`data-${i}`,n[i])}(e,t.dataset||{},n.dataset||{}),t.style!==n.style&&function(e,t,n){let i,s=e.style;for(i in t)i in n||(s[i]="");for(i in n)t[i]!==n[i]&&(s[i]=n[i])}(e,t.style||{},n.style||{})}}(virtualdom_dist_index_es6_Private||(virtualdom_dist_index_es6_Private={}));class BoxSizer{constructor(){this.sizeHint=0,this.minSize=0,this.maxSize=1/0,this.stretch=1,this.size=0,this.done=!1}}!function(e){e.calc=function(e,t){let n=e.length;if(0===n)return t;let i=0,s=0,r=0,o=0,a=0;for(let t=0;t<n;++t){let n=e[t],l=n.minSize,c=n.maxSize,d=n.sizeHint;n.done=!1,n.size=Math.max(l,Math.min(d,c)),r+=n.size,i+=l,s+=c,n.stretch>0&&(o+=n.stretch,a++)}if(t===r)return 0;if(t<=i){for(let t=0;t<n;++t){let n=e[t];n.size=n.minSize}return t-i}if(t>=s){for(let t=0;t<n;++t){let n=e[t];n.size=n.maxSize}return t-s}let l=.01,c=n;if(t<r){let i=r-t;for(;a>0&&i>l;){let t=i,s=o;for(let r=0;r<n;++r){let n=e[r];if(n.done||0===n.stretch)continue;let l=n.stretch*t/s;n.size-l<=n.minSize?(i-=n.size-n.minSize,o-=n.stretch,n.size=n.minSize,n.done=!0,c--,a--):(i-=l,n.size-=l)}}for(;c>0&&i>l;){let t=i/c;for(let s=0;s<n;++s){let n=e[s];n.done||(n.size-t<=n.minSize?(i-=n.size-n.minSize,n.size=n.minSize,n.done=!0,c--):(i-=t,n.size-=t))}}}else{let i=t-r;for(;a>0&&i>l;){let t=i,s=o;for(let r=0;r<n;++r){let n=e[r];if(n.done||0===n.stretch)continue;let l=n.stretch*t/s;n.size+l>=n.maxSize?(i-=n.maxSize-n.size,o-=n.stretch,n.size=n.maxSize,n.done=!0,c--,a--):(i-=l,n.size+=l)}}for(;c>0&&i>l;){let t=i/c;for(let s=0;s<n;++s){let n=e[s];n.done||(n.size+t>=n.maxSize?(i-=n.maxSize-n.size,n.size=n.maxSize,n.done=!0,c--):(i-=t,n.size+=t))}}}return 0},e.adjust=function(e,t,n){0!==e.length&&0!==n&&(n>0?function(e,t,n){let i=0;for(let n=0;n<=t;++n){let t=e[n];i+=t.maxSize-t.size}let s=0;for(let n=t+1,i=e.length;n<i;++n){let t=e[n];s+=t.size-t.minSize}let r=n=Math.min(n,i,s);for(let n=t;n>=0&&r>0;--n){let t=e[n],i=t.maxSize-t.size;i>=r?(t.sizeHint=t.size+r,r=0):(t.sizeHint=t.size+i,r-=i)}let o=n;for(let n=t+1,i=e.length;n<i&&o>0;++n){let t=e[n],i=t.size-t.minSize;i>=o?(t.sizeHint=t.size-o,o=0):(t.sizeHint=t.size-i,o-=i)}}(e,t,n):function(e,t,n){let i=0;for(let n=t+1,s=e.length;n<s;++n){let t=e[n];i+=t.maxSize-t.size}let s=0;for(let n=0;n<=t;++n){let t=e[n];s+=t.size-t.minSize}let r=n=Math.min(n,i,s);for(let n=t+1,i=e.length;n<i&&r>0;++n){let t=e[n],i=t.maxSize-t.size;i>=r?(t.sizeHint=t.size+r,r=0):(t.sizeHint=t.size+i,r-=i)}let o=n;for(let n=t;n>=0&&o>0;--n){let t=e[n],i=t.size-t.minSize;i>=o?(t.sizeHint=t.size-o,o=0):(t.sizeHint=t.size-i,o-=i)}}(e,t,-n))}}(BoxEngine||(BoxEngine={}));class Title{constructor(e){this._label="",this._caption="",this._mnemonic=-1,this._icon=void 0,this._iconClass="",this._iconLabel="",this._className="",this._closable=!1,this._changed=new signaling_dist_index_es6.Signal(this),this._isDisposed=!1,this.owner=e.owner,void 0!==e.label&&(this._label=e.label),void 0!==e.mnemonic&&(this._mnemonic=e.mnemonic),void 0!==e.icon&&(this._icon=e.icon),void 0!==e.iconClass&&(this._iconClass=e.iconClass),void 0!==e.iconLabel&&(this._iconLabel=e.iconLabel),void 0!==e.caption&&(this._caption=e.caption),void 0!==e.className&&(this._className=e.className),void 0!==e.closable&&(this._closable=e.closable),this._dataset=e.dataset||{}}get changed(){return this._changed}get label(){return this._label}set label(e){this._label!==e&&(this._label=e,this._changed.emit(void 0))}get mnemonic(){return this._mnemonic}set mnemonic(e){this._mnemonic!==e&&(this._mnemonic=e,this._changed.emit(void 0))}get icon(){return this._icon}set icon(e){this._icon!==e&&(this._icon=e,this._changed.emit(void 0))}get iconClass(){return this._iconClass}set iconClass(e){this._iconClass!==e&&(this._iconClass=e,this._changed.emit(void 0))}get iconLabel(){return this._iconLabel}set iconLabel(e){this._iconLabel!==e&&(this._iconLabel=e,this._changed.emit(void 0))}get caption(){return this._caption}set caption(e){this._caption!==e&&(this._caption=e,this._changed.emit(void 0))}get className(){return this._className}set className(e){this._className!==e&&(this._className=e,this._changed.emit(void 0))}get closable(){return this._closable}set closable(e){this._closable!==e&&(this._closable=e,this._changed.emit(void 0))}get dataset(){return this._dataset}set dataset(e){this._dataset!==e&&(this._dataset=e,this._changed.emit(void 0))}get isDisposed(){return this._isDisposed}dispose(){this.isDisposed||(this._isDisposed=!0,signaling_dist_index_es6.Signal.clearData(this))}}class Widget{constructor(e={}){this._flags=0,this._layout=null,this._parent=null,this._disposed=new signaling_dist_index_es6.Signal(this),this._hiddenMode=Widget.HiddenMode.Display,this.node=Private$j.createNode(e),this.addClass("lm-Widget")}dispose(){this.isDisposed||(this.setFlag(Widget.Flag.IsDisposed),this._disposed.emit(void 0),this.parent?this.parent=null:this.isAttached&&Widget.detach(this),this._layout&&(this._layout.dispose(),this._layout=null),this.title.dispose(),signaling_dist_index_es6.Signal.clearData(this),MessageLoop.clearData(this),dist_index_es6.AttachedProperty.clearData(this))}get disposed(){return this._disposed}get isDisposed(){return this.testFlag(Widget.Flag.IsDisposed)}get isAttached(){return this.testFlag(Widget.Flag.IsAttached)}get isHidden(){return this.testFlag(Widget.Flag.IsHidden)}get isVisible(){let e=this;do{if(e.isHidden||!e.isAttached)return!1;e=e.parent}while(null!=e);return!0}get title(){return Private$j.titleProperty.get(this)}get id(){return this.node.id}set id(e){this.node.id=e}get dataset(){return this.node.dataset}get hiddenMode(){return this._hiddenMode}set hiddenMode(e){this._hiddenMode!==e&&(this.isHidden&&this._toggleHidden(!1),e==Widget.HiddenMode.Scale?this.node.style.willChange="transform":this.node.style.willChange="auto",this._hiddenMode=e,this.isHidden&&this._toggleHidden(!0))}get parent(){return this._parent}set parent(e){if(this._parent!==e){if(e&&this.contains(e))throw new Error("Invalid parent widget.");if(this._parent&&!this._parent.isDisposed){let e=new Widget.ChildMessage("child-removed",this);MessageLoop.sendMessage(this._parent,e)}if(this._parent=e,this._parent&&!this._parent.isDisposed){let e=new Widget.ChildMessage("child-added",this);MessageLoop.sendMessage(this._parent,e)}this.isDisposed||MessageLoop.sendMessage(this,Widget.Msg.ParentChanged)}}get layout(){return this._layout}set layout(e){if(this._layout!==e){if(this.testFlag(Widget.Flag.DisallowLayout))throw new Error("Cannot set widget layout.");if(this._layout)throw new Error("Cannot change widget layout.");if(e.parent)throw new Error("Cannot change layout parent.");this._layout=e,e.parent=this}}*children(){this._layout&&(yield*this._layout)}contains(e){for(let t=e;t;t=t._parent)if(t===this)return!0;return!1}hasClass(e){return this.node.classList.contains(e)}addClass(e){this.node.classList.add(e)}removeClass(e){this.node.classList.remove(e)}toggleClass(e,t){return!0===t?(this.node.classList.add(e),!0):!1===t?(this.node.classList.remove(e),!1):this.node.classList.toggle(e)}update(){MessageLoop.postMessage(this,Widget.Msg.UpdateRequest)}fit(){MessageLoop.postMessage(this,Widget.Msg.FitRequest)}activate(){MessageLoop.postMessage(this,Widget.Msg.ActivateRequest)}close(){MessageLoop.sendMessage(this,Widget.Msg.CloseRequest)}show(){if(this.testFlag(Widget.Flag.IsHidden)&&(!this.isAttached||this.parent&&!this.parent.isVisible||MessageLoop.sendMessage(this,Widget.Msg.BeforeShow),this.clearFlag(Widget.Flag.IsHidden),this._toggleHidden(!1),!this.isAttached||this.parent&&!this.parent.isVisible||MessageLoop.sendMessage(this,Widget.Msg.AfterShow),this.parent)){let e=new Widget.ChildMessage("child-shown",this);MessageLoop.sendMessage(this.parent,e)}}hide(){if(!this.testFlag(Widget.Flag.IsHidden)&&(!this.isAttached||this.parent&&!this.parent.isVisible||MessageLoop.sendMessage(this,Widget.Msg.BeforeHide),this.setFlag(Widget.Flag.IsHidden),this._toggleHidden(!0),!this.isAttached||this.parent&&!this.parent.isVisible||MessageLoop.sendMessage(this,Widget.Msg.AfterHide),this.parent)){let e=new Widget.ChildMessage("child-hidden",this);MessageLoop.sendMessage(this.parent,e)}}setHidden(e){e?this.hide():this.show()}testFlag(e){return 0!==(this._flags&e)}setFlag(e){this._flags|=e}clearFlag(e){this._flags&=~e}processMessage(e){switch(e.type){case"resize":this.notifyLayout(e),this.onResize(e);break;case"update-request":this.notifyLayout(e),this.onUpdateRequest(e);break;case"fit-request":this.notifyLayout(e),this.onFitRequest(e);break;case"before-show":this.notifyLayout(e),this.onBeforeShow(e);break;case"after-show":this.setFlag(Widget.Flag.IsVisible),this.notifyLayout(e),this.onAfterShow(e);break;case"before-hide":this.notifyLayout(e),this.onBeforeHide(e);break;case"after-hide":this.clearFlag(Widget.Flag.IsVisible),this.notifyLayout(e),this.onAfterHide(e);break;case"before-attach":this.notifyLayout(e),this.onBeforeAttach(e);break;case"after-attach":this.isHidden||this.parent&&!this.parent.isVisible||this.setFlag(Widget.Flag.IsVisible),this.setFlag(Widget.Flag.IsAttached),this.notifyLayout(e),this.onAfterAttach(e);break;case"before-detach":this.notifyLayout(e),this.onBeforeDetach(e);break;case"after-detach":this.clearFlag(Widget.Flag.IsVisible),this.clearFlag(Widget.Flag.IsAttached),this.notifyLayout(e),this.onAfterDetach(e);break;case"activate-request":this.notifyLayout(e),this.onActivateRequest(e);break;case"close-request":this.notifyLayout(e),this.onCloseRequest(e);break;case"child-added":this.notifyLayout(e),this.onChildAdded(e);break;case"child-removed":this.notifyLayout(e),this.onChildRemoved(e);break;default:this.notifyLayout(e)}}notifyLayout(e){this._layout&&this._layout.processParentMessage(e)}onCloseRequest(e){this.parent?this.parent=null:this.isAttached&&Widget.detach(this)}onResize(e){}onUpdateRequest(e){}onFitRequest(e){}onActivateRequest(e){}onBeforeShow(e){}onAfterShow(e){}onBeforeHide(e){}onAfterHide(e){}onBeforeAttach(e){}onAfterAttach(e){}onBeforeDetach(e){}onAfterDetach(e){}onChildAdded(e){}onChildRemoved(e){}_toggleHidden(e){if(e)switch(this._hiddenMode){case Widget.HiddenMode.Display:this.addClass("lm-mod-hidden");break;case Widget.HiddenMode.Scale:this.node.style.transform="scale(0)",this.node.setAttribute("aria-hidden","true");break;case Widget.HiddenMode.ContentVisibility:this.node.style.contentVisibility="hidden",this.node.style.zIndex="-1"}else switch(this._hiddenMode){case Widget.HiddenMode.Display:this.removeClass("lm-mod-hidden");break;case Widget.HiddenMode.Scale:this.node.style.transform="",this.node.removeAttribute("aria-hidden");break;case Widget.HiddenMode.ContentVisibility:this.node.style.contentVisibility="",this.node.style.zIndex=""}}}!function(e){var t,n,i;(t=e.HiddenMode||(e.HiddenMode={}))[t.Display=0]="Display",t[t.Scale=1]="Scale",t[t.ContentVisibility=2]="ContentVisibility",(n=e.Flag||(e.Flag={}))[n.IsDisposed=1]="IsDisposed",n[n.IsAttached=2]="IsAttached",n[n.IsHidden=4]="IsHidden",n[n.IsVisible=8]="IsVisible",n[n.DisallowLayout=16]="DisallowLayout",(i=e.Msg||(e.Msg={})).BeforeShow=new Message("before-show"),i.AfterShow=new Message("after-show"),i.BeforeHide=new Message("before-hide"),i.AfterHide=new Message("after-hide"),i.BeforeAttach=new Message("before-attach"),i.AfterAttach=new Message("after-attach"),i.BeforeDetach=new Message("before-detach"),i.AfterDetach=new Message("after-detach"),i.ParentChanged=new Message("parent-changed"),i.UpdateRequest=new ConflatableMessage("update-request"),i.FitRequest=new ConflatableMessage("fit-request"),i.ActivateRequest=new ConflatableMessage("activate-request"),i.CloseRequest=new ConflatableMessage("close-request"),e.ChildMessage=class extends Message{constructor(e,t){super(e),this.child=t}};class s extends Message{constructor(e,t){super("resize"),this.width=e,this.height=t}}e.ResizeMessage=s,function(e){e.UnknownSize=new e(-1,-1)}(s=e.ResizeMessage||(e.ResizeMessage={})),e.attach=function(t,n,i=null){if(t.parent)throw new Error("Cannot attach a child widget.");if(t.isAttached||t.node.isConnected)throw new Error("Widget is already attached.");if(!n.isConnected)throw new Error("Host is not attached.");MessageLoop.sendMessage(t,e.Msg.BeforeAttach),n.insertBefore(t.node,i),MessageLoop.sendMessage(t,e.Msg.AfterAttach)},e.detach=function(t){if(t.parent)throw new Error("Cannot detach a child widget.");if(!t.isAttached||!t.node.isConnected)throw new Error("Widget is not attached.");MessageLoop.sendMessage(t,e.Msg.BeforeDetach),t.node.parentNode.removeChild(t.node),MessageLoop.sendMessage(t,e.Msg.AfterDetach)}}(Widget||(Widget={})),function(e){e.titleProperty=new dist_index_es6.AttachedProperty({name:"title",create:e=>new Title({owner:e})}),e.createNode=function(e){return e.node||document.createElement(e.tag||"div")}}(Private$j||(Private$j={}));class Layout{constructor(e={}){this._disposed=!1,this._parent=null,this._fitPolicy=e.fitPolicy||"set-min-size"}dispose(){this._parent=null,this._disposed=!0,signaling_dist_index_es6.Signal.clearData(this),dist_index_es6.AttachedProperty.clearData(this)}get isDisposed(){return this._disposed}get parent(){return this._parent}set parent(e){if(this._parent!==e){if(this._parent)throw new Error("Cannot change parent widget.");if(e.layout!==this)throw new Error("Invalid parent widget.");this._parent=e,this.init()}}get fitPolicy(){return this._fitPolicy}set fitPolicy(e){if(this._fitPolicy!==e&&(this._fitPolicy=e,this._parent)){let e=this._parent.node.style;e.minWidth="",e.minHeight="",e.maxWidth="",e.maxHeight="",this._parent.fit()}}processParentMessage(e){switch(e.type){case"resize":this.onResize(e);break;case"update-request":this.onUpdateRequest(e);break;case"fit-request":this.onFitRequest(e);break;case"before-show":this.onBeforeShow(e);break;case"after-show":this.onAfterShow(e);break;case"before-hide":this.onBeforeHide(e);break;case"after-hide":this.onAfterHide(e);break;case"before-attach":this.onBeforeAttach(e);break;case"after-attach":this.onAfterAttach(e);break;case"before-detach":this.onBeforeDetach(e);break;case"after-detach":this.onAfterDetach(e);break;case"child-removed":this.onChildRemoved(e);break;case"child-shown":this.onChildShown(e);break;case"child-hidden":this.onChildHidden(e)}}init(){for(const e of this)e.parent=this.parent}onResize(e){for(const e of this)MessageLoop.sendMessage(e,Widget.ResizeMessage.UnknownSize)}onUpdateRequest(e){for(const e of this)MessageLoop.sendMessage(e,Widget.ResizeMessage.UnknownSize)}onBeforeAttach(e){for(const t of this)MessageLoop.sendMessage(t,e)}onAfterAttach(e){for(const t of this)MessageLoop.sendMessage(t,e)}onBeforeDetach(e){for(const t of this)MessageLoop.sendMessage(t,e)}onAfterDetach(e){for(const t of this)MessageLoop.sendMessage(t,e)}onBeforeShow(e){for(const t of this)t.isHidden||MessageLoop.sendMessage(t,e)}onAfterShow(e){for(const t of this)t.isHidden||MessageLoop.sendMessage(t,e)}onBeforeHide(e){for(const t of this)t.isHidden||MessageLoop.sendMessage(t,e)}onAfterHide(e){for(const t of this)t.isHidden||MessageLoop.sendMessage(t,e)}onChildRemoved(e){this.removeWidget(e.child)}onFitRequest(e){}onChildShown(e){}onChildHidden(e){}}!function(e){e.getHorizontalAlignment=function(e){return Private$i.horizontalAlignmentProperty.get(e)},e.setHorizontalAlignment=function(e,t){Private$i.horizontalAlignmentProperty.set(e,t)},e.getVerticalAlignment=function(e){return Private$i.verticalAlignmentProperty.get(e)},e.setVerticalAlignment=function(e,t){Private$i.verticalAlignmentProperty.set(e,t)}}(Layout||(Layout={}));class LayoutItem{constructor(e){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=e,this.widget.node.style.position="absolute",this.widget.node.style.contain="strict"}dispose(){if(this._disposed)return;this._disposed=!0;let e=this.widget.node.style;e.position="",e.top="",e.left="",e.width="",e.height="",e.contain=""}get minWidth(){return this._minWidth}get minHeight(){return this._minHeight}get maxWidth(){return this._maxWidth}get maxHeight(){return this._maxHeight}get isDisposed(){return this._disposed}get isHidden(){return this.widget.isHidden}get isVisible(){return this.widget.isVisible}get isAttached(){return this.widget.isAttached}fit(){let e=ElementExt.sizeLimits(this.widget.node);this._minWidth=e.minWidth,this._minHeight=e.minHeight,this._maxWidth=e.maxWidth,this._maxHeight=e.maxHeight}update(e,t,n,i){let s=Math.max(this._minWidth,Math.min(n,this._maxWidth)),r=Math.max(this._minHeight,Math.min(i,this._maxHeight));if(s<n)switch(Layout.getHorizontalAlignment(this.widget)){case"left":break;case"center":e+=(n-s)/2;break;case"right":e+=n-s;break;default:throw"unreachable"}if(r<i)switch(Layout.getVerticalAlignment(this.widget)){case"top":break;case"center":t+=(i-r)/2;break;case"bottom":t+=i-r;break;default:throw"unreachable"}let o=!1,a=this.widget.node.style;if(this._top!==t&&(this._top=t,a.top=`${t}px`),this._left!==e&&(this._left=e,a.left=`${e}px`),this._width!==s&&(o=!0,this._width=s,a.width=`${s}px`),this._height!==r&&(o=!0,this._height=r,a.height=`${r}px`),o){let e=new Widget.ResizeMessage(s,r);MessageLoop.sendMessage(this.widget,e)}}}!function(e){function t(e){e.parent&&e.parent.layout&&e.parent.update()}e.horizontalAlignmentProperty=new dist_index_es6.AttachedProperty({name:"horizontalAlignment",create:()=>"center",changed:t}),e.verticalAlignmentProperty=new dist_index_es6.AttachedProperty({name:"verticalAlignment",create:()=>"top",changed:t})}(Private$i||(Private$i={}));class PanelLayout extends Layout{constructor(){super(...arguments),this._widgets=[]}dispose(){for(;this._widgets.length>0;)this._widgets.pop().dispose();super.dispose()}get widgets(){return this._widgets}*[Symbol.iterator](){yield*this._widgets}addWidget(e){this.insertWidget(this._widgets.length,e)}insertWidget(e,t){t.parent=this.parent;let n=this._widgets.indexOf(t),i=Math.max(0,Math.min(e,this._widgets.length));if(-1===n)return index_es6.ArrayExt.insert(this._widgets,i,t),void(this.parent&&this.attachWidget(i,t));i===this._widgets.length&&i--,n!==i&&(index_es6.ArrayExt.move(this._widgets,n,i),this.parent&&this.moveWidget(n,i,t))}removeWidget(e){this.removeWidgetAt(this._widgets.indexOf(e))}removeWidgetAt(e){let t=index_es6.ArrayExt.removeAt(this._widgets,e);t&&this.parent&&this.detachWidget(e,t)}init(){super.init();let e=0;for(const t of this)this.attachWidget(e++,t)}attachWidget(e,t){let n=this.parent.node.children[e];this.parent.isAttached&&MessageLoop.sendMessage(t,Widget.Msg.BeforeAttach),this.parent.node.insertBefore(t.node,n),this.parent.isAttached&&MessageLoop.sendMessage(t,Widget.Msg.AfterAttach)}moveWidget(e,t,n){this.parent.isAttached&&MessageLoop.sendMessage(n,Widget.Msg.BeforeDetach),this.parent.node.removeChild(n.node),this.parent.isAttached&&MessageLoop.sendMessage(n,Widget.Msg.AfterDetach);let i=this.parent.node.children[t];this.parent.isAttached&&MessageLoop.sendMessage(n,Widget.Msg.BeforeAttach),this.parent.node.insertBefore(n.node,i),this.parent.isAttached&&MessageLoop.sendMessage(n,Widget.Msg.AfterAttach)}detachWidget(e,t){this.parent.isAttached&&MessageLoop.sendMessage(t,Widget.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.isAttached&&MessageLoop.sendMessage(t,Widget.Msg.AfterDetach)}}!function(e){e.clampDimension=function(e){return Math.max(0,Math.floor(e))}}(Utils||(Utils={}));var Utils$1=Utils,Private$h,Private$g,Private$f,Private$e,Private$d,Private$c,Private$b,Private$a,Private$9,Private$8;class SplitLayout extends PanelLayout{constructor(e){super(),this.widgetOffset=0,this._fixed=0,this._spacing=4,this._dirty=!1,this._hasNormedSizes=!1,this._sizers=[],this._items=[],this._handles=[],this._box=null,this._alignment="start",this._orientation="horizontal",this.renderer=e.renderer,void 0!==e.orientation&&(this._orientation=e.orientation),void 0!==e.alignment&&(this._alignment=e.alignment),void 0!==e.spacing&&(this._spacing=Utils.clampDimension(e.spacing))}dispose(){for(const e of this._items)e.dispose();this._box=null,this._items.length=0,this._sizers.length=0,this._handles.length=0,super.dispose()}get orientation(){return this._orientation}set orientation(e){this._orientation!==e&&(this._orientation=e,this.parent&&(this.parent.dataset.orientation=e,this.parent.fit()))}get alignment(){return this._alignment}set alignment(e){this._alignment!==e&&(this._alignment=e,this.parent&&(this.parent.dataset.alignment=e,this.parent.update()))}get spacing(){return this._spacing}set spacing(e){e=Utils.clampDimension(e),this._spacing!==e&&(this._spacing=e,this.parent&&this.parent.fit())}get handles(){return this._handles}absoluteSizes(){return this._sizers.map(e=>e.size)}relativeSizes(){return Private$h.normalize(this._sizers.map(e=>e.size))}setRelativeSizes(e,t=!0){let n=this._sizers.length,i=e.slice(0,n);for(;i.length<n;)i.push(0);let s=Private$h.normalize(i);for(let e=0;e<n;++e){let t=this._sizers[e];t.sizeHint=s[e],t.size=s[e]}this._hasNormedSizes=!0,t&&this.parent&&this.parent.update()}moveHandle(e,t){let n,i=this._handles[e];if(i&&!i.classList.contains("lm-mod-hidden")&&(n="horizontal"===this._orientation?t-i.offsetLeft:t-i.offsetTop,0!==n)){for(let e of this._sizers)e.size>0&&(e.sizeHint=e.size);BoxEngine.adjust(this._sizers,e,n),this.parent&&this.parent.update()}}init(){this.parent.dataset.orientation=this.orientation,this.parent.dataset.alignment=this.alignment,super.init()}attachWidget(e,t){let n=new LayoutItem(t),i=Private$h.createHandle(this.renderer),s=Private$h.averageSize(this._sizers),r=Private$h.createSizer(s);index_es6.ArrayExt.insert(this._items,e,n),index_es6.ArrayExt.insert(this._sizers,e,r),index_es6.ArrayExt.insert(this._handles,e,i),this.parent.isAttached&&MessageLoop.sendMessage(t,Widget.Msg.BeforeAttach),this.parent.node.appendChild(t.node),this.parent.node.appendChild(i),this.parent.isAttached&&MessageLoop.sendMessage(t,Widget.Msg.AfterAttach),this.parent.fit()}moveWidget(e,t,n){index_es6.ArrayExt.move(this._items,e,t),index_es6.ArrayExt.move(this._sizers,e,t),index_es6.ArrayExt.move(this._handles,e,t),this.parent.fit()}detachWidget(e,t){let n=index_es6.ArrayExt.removeAt(this._items,e),i=index_es6.ArrayExt.removeAt(this._handles,e);index_es6.ArrayExt.removeAt(this._sizers,e),this.parent.isAttached&&MessageLoop.sendMessage(t,Widget.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.node.removeChild(i),this.parent.isAttached&&MessageLoop.sendMessage(t,Widget.Msg.AfterDetach),n.dispose(),this.parent.fit()}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}updateItemPosition(e,t,n,i,s,r,o){const a=this._items[e];if(a.isHidden)return;let l=this._handles[e].style;t?(n+=this.widgetOffset,a.update(n,i,o,s),n+=o,l.top=`${i}px`,l.left=`${n}px`,l.width=`${this._spacing}px`,l.height=`${s}px`):(i+=this.widgetOffset,a.update(n,i,r,o),i+=o,l.top=`${i}px`,l.left=`${n}px`,l.width=`${r}px`,l.height=`${this._spacing}px`)}_fit(){let e=0,t=-1;for(let n=0,i=this._items.length;n<i;++n)this._items[n].isHidden?this._handles[n].classList.add("lm-mod-hidden"):(this._handles[n].classList.remove("lm-mod-hidden"),t=n,e++);-1!==t&&this._handles[t].classList.add("lm-mod-hidden"),this._fixed=this._spacing*Math.max(0,e-1)+this.widgetOffset*this._items.length;let n="horizontal"===this._orientation,i=n?this._fixed:0,s=n?0:this._fixed;for(let e=0,t=this._items.length;e<t;++e){let t=this._items[e],r=this._sizers[e];r.size>0&&(r.sizeHint=r.size),t.isHidden?(r.minSize=0,r.maxSize=0):(t.fit(),r.stretch=SplitLayout.getStretch(t.widget),n?(r.minSize=t.minWidth,r.maxSize=t.maxWidth,i+=t.minWidth,s=Math.max(s,t.minHeight)):(r.minSize=t.minHeight,r.maxSize=t.maxHeight,s+=t.minHeight,i=Math.max(i,t.minWidth)))}let r=this._box=ElementExt.boxSizing(this.parent.node);i+=r.horizontalSum,s+=r.verticalSum;let o=this.parent.node.style;o.minWidth=`${i}px`,o.minHeight=`${s}px`,this._dirty=!0,this.parent.parent&&MessageLoop.sendMessage(this.parent.parent,Widget.Msg.FitRequest),this._dirty&&MessageLoop.sendMessage(this.parent,Widget.Msg.UpdateRequest)}_update(e,t){this._dirty=!1;let n=0;for(let e=0,t=this._items.length;e<t;++e)n+=+!this._items[e].isHidden;if(0===n&&0===this.widgetOffset)return;e<0&&(e=this.parent.node.offsetWidth),t<0&&(t=this.parent.node.offsetHeight),this._box||(this._box=ElementExt.boxSizing(this.parent.node));let i=this._box.paddingTop,s=this._box.paddingLeft,r=e-this._box.horizontalSum,o=t-this._box.verticalSum,a=0,l=0,c="horizontal"===this._orientation;if(n>0){let e;if(e=c?Math.max(0,r-this._fixed):Math.max(0,o-this._fixed),this._hasNormedSizes){for(let t of this._sizers)t.sizeHint*=e;this._hasNormedSizes=!1}let t=BoxEngine.calc(this._sizers,e);if(t>0)switch(this._alignment){case"start":break;case"center":a=0,l=t/2;break;case"end":a=0,l=t;break;case"justify":a=t/n,l=0;break;default:throw"unreachable"}}for(let e=0,t=this._items.length;e<t;++e){const t=this._items[e].isHidden?0:this._sizers[e].size+a;this.updateItemPosition(e,c,c?s+l:s,c?i:i+l,o,r,t);const n=this.widgetOffset+(this._handles[e].classList.contains("lm-mod-hidden")?0:this._spacing);c?s+=t+n:i+=t+n}}}!function(e){e.getStretch=function(e){return Private$h.stretchProperty.get(e)},e.setStretch=function(e,t){Private$h.stretchProperty.set(e,t)}}(SplitLayout||(SplitLayout={})),function(e){e.stretchProperty=new dist_index_es6.AttachedProperty({name:"stretch",create:()=>0,coerce:(e,t)=>Math.max(0,Math.floor(t)),changed:function(e){e.parent&&e.parent.layout instanceof SplitLayout&&e.parent.fit()}}),e.createSizer=function(e){let t=new BoxSizer;return t.sizeHint=Math.floor(e),t},e.createHandle=function(e){let t=e.createHandle();return t.style.position="absolute",t.style.contain="style",t},e.averageSize=function(e){return e.reduce((e,t)=>e+t.size,0)/e.length||0},e.normalize=function(e){let t=e.length;if(0===t)return[];let n=e.reduce((e,t)=>e+Math.abs(t),0);return 0===n?e.map(e=>1/t):e.map(e=>e/n)}}(Private$h||(Private$h={}));class AccordionLayout extends SplitLayout{constructor(e){super({...e,orientation:e.orientation||"vertical"}),this._titles=[],this.titleSpace=e.titleSpace||22}get titleSpace(){return this.widgetOffset}set titleSpace(e){e=Utils$1.clampDimension(e),this.widgetOffset!==e&&(this.widgetOffset=e,this.parent&&this.parent.fit())}get titles(){return this._titles}dispose(){this.isDisposed||(this._titles.length=0,super.dispose())}updateTitle(e,t){const n=this._titles[e],i=n.classList.contains("lm-mod-expanded"),s=Private$g.createTitle(this.renderer,t.title,i);this._titles[e]=s,this.parent.node.replaceChild(s,n)}insertWidget(e,t){t.id||(t.id=`id-${dist.UUID.uuid4()}`),super.insertWidget(e,t)}attachWidget(e,t){const n=Private$g.createTitle(this.renderer,t.title);index_es6.ArrayExt.insert(this._titles,e,n),this.parent.node.appendChild(n),t.node.setAttribute("role","region"),t.node.setAttribute("aria-labelledby",n.id),super.attachWidget(e,t)}moveWidget(e,t,n){index_es6.ArrayExt.move(this._titles,e,t),super.moveWidget(e,t,n)}detachWidget(e,t){const n=index_es6.ArrayExt.removeAt(this._titles,e);this.parent.node.removeChild(n),super.detachWidget(e,t)}updateItemPosition(e,t,n,i,s,r,o){const a=this._titles[e].style;a.top=`${i}px`,a.left=`${n}px`,a.height=`${this.widgetOffset}px`,a.width=t?`${s}px`:`${r}px`,super.updateItemPosition(e,t,n,i,s,r,o)}}(Private$g||(Private$g={})).createTitle=function(e,t,n=!0){const i=e.createSectionTitle(t);return i.style.position="absolute",i.style.contain="strict",i.setAttribute("aria-label",`${t.label} Section`),i.setAttribute("aria-expanded",n?"true":"false"),i.setAttribute("aria-controls",t.owner.id),n&&i.classList.add("lm-mod-expanded"),i};class Panel extends Widget{constructor(e={}){super(),this.addClass("lm-Panel"),this.layout=Private$f.createLayout(e)}get widgets(){return this.layout.widgets}addWidget(e){this.layout.addWidget(e)}insertWidget(e,t){this.layout.insertWidget(e,t)}}(Private$f||(Private$f={})).createLayout=function(e){return e.layout||new PanelLayout};class SplitPanel extends Panel{constructor(e={}){super({layout:Private$e.createLayout(e)}),this._handleMoved=new signaling_dist_index_es6.Signal(this),this._pressData=null,this.addClass("lm-SplitPanel")}dispose(){this._releaseMouse(),super.dispose()}get orientation(){return this.layout.orientation}set orientation(e){this.layout.orientation=e}get alignment(){return this.layout.alignment}set alignment(e){this.layout.alignment=e}get spacing(){return this.layout.spacing}set spacing(e){this.layout.spacing=e}get renderer(){return this.layout.renderer}get handleMoved(){return this._handleMoved}get handles(){return this.layout.handles}relativeSizes(){return this.layout.relativeSizes()}setRelativeSizes(e,t=!0){this.layout.setRelativeSizes(e,t)}handleEvent(e){switch(e.type){case"pointerdown":this._evtPointerDown(e);break;case"pointermove":this._evtPointerMove(e);break;case"pointerup":this._evtPointerUp(e);break;case"keydown":this._evtKeyDown(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}}onBeforeAttach(e){this.node.addEventListener("pointerdown",this)}onAfterDetach(e){this.node.removeEventListener("pointerdown",this),this._releaseMouse()}onChildAdded(e){e.child.addClass("lm-SplitPanel-child"),this._releaseMouse()}onChildRemoved(e){e.child.removeClass("lm-SplitPanel-child"),this._releaseMouse()}_evtKeyDown(e){this._pressData&&(e.preventDefault(),e.stopPropagation()),27===e.keyCode&&this._releaseMouse()}_evtPointerDown(e){if(0!==e.button)return;let t,n=this.layout,i=index_es6.ArrayExt.findFirstIndex(n.handles,t=>t.contains(e.target));if(-1===i)return;e.preventDefault(),e.stopPropagation(),document.addEventListener("pointerup",this,!0),document.addEventListener("pointermove",this,!0),document.addEventListener("keydown",this,!0),document.addEventListener("contextmenu",this,!0);let s=n.handles[i],r=s.getBoundingClientRect();t="horizontal"===n.orientation?e.clientX-r.left:e.clientY-r.top;let o=window.getComputedStyle(s),a=Drag.overrideCursor(o.cursor);this._pressData={index:i,delta:t,override:a}}_evtPointerMove(e){let t;e.preventDefault(),e.stopPropagation();let n=this.layout,i=this.node.getBoundingClientRect();t="horizontal"===n.orientation?e.clientX-i.left-this._pressData.delta:e.clientY-i.top-this._pressData.delta,n.moveHandle(this._pressData.index,t)}_evtPointerUp(e){0===e.button&&(e.preventDefault(),e.stopPropagation(),this._releaseMouse())}_releaseMouse(){this._pressData&&(this._pressData.override.dispose(),this._pressData=null,this._handleMoved.emit(),document.removeEventListener("keydown",this,!0),document.removeEventListener("pointerup",this,!0),document.removeEventListener("pointermove",this,!0),document.removeEventListener("contextmenu",this,!0))}}!function(e){class t{createHandle(){let e=document.createElement("div");return e.className="lm-SplitPanel-handle",e}}e.Renderer=t,e.defaultRenderer=new t,e.getStretch=function(e){return SplitLayout.getStretch(e)},e.setStretch=function(e,t){SplitLayout.setStretch(e,t)}}(SplitPanel||(SplitPanel={})),(Private$e||(Private$e={})).createLayout=function(e){return e.layout||new SplitLayout({renderer:e.renderer||SplitPanel.defaultRenderer,orientation:e.orientation,alignment:e.alignment,spacing:e.spacing})};class AccordionPanel extends SplitPanel{constructor(e={}){super({...e,layout:Private$d.createLayout(e)}),this._widgetSizesCache=new WeakMap,this._expansionToggled=new signaling_dist_index_es6.Signal(this),this.addClass("lm-AccordionPanel")}get renderer(){return this.layout.renderer}get titleSpace(){return this.layout.titleSpace}set titleSpace(e){this.layout.titleSpace=e}get titles(){return this.layout.titles}get expansionToggled(){return this._expansionToggled}addWidget(e){super.addWidget(e),e.title.changed.connect(this._onTitleChanged,this)}collapse(e){const t=this.layout.widgets[e];t&&!t.isHidden&&this._toggleExpansion(e)}expand(e){const t=this.layout.widgets[e];t&&t.isHidden&&this._toggleExpansion(e)}insertWidget(e,t){super.insertWidget(e,t),t.title.changed.connect(this._onTitleChanged,this)}handleEvent(e){switch(super.handleEvent(e),e.type){case"click":this._evtClick(e);break;case"keydown":this._eventKeyDown(e)}}onBeforeAttach(e){this.node.addEventListener("click",this),this.node.addEventListener("keydown",this),super.onBeforeAttach(e)}onAfterDetach(e){super.onAfterDetach(e),this.node.removeEventListener("click",this),this.node.removeEventListener("keydown",this)}_onTitleChanged(e){const t=index_es6.ArrayExt.findFirstIndex(this.widgets,t=>t.contains(e.owner));t>=0&&(this.layout.updateTitle(t,e.owner),this.update())}_computeWidgetSize(e){const t=this.layout,n=t.widgets[e];if(!n)return;const i=n.isHidden,s=t.absoluteSizes(),r=(i?-1:1)*this.spacing,o=s.reduce((e,t)=>e+t);let a=[...s];if(i){const t=this._widgetSizesCache.get(n);if(!t)return;a[e]+=t;const i=a.map(e=>e-t>0).lastIndexOf(!0);-1===i?a.forEach((n,i)=>{i!==e&&(a[i]-=s[i]/o*(t-r))}):a[i]-=t-r}else{const t=s[e];this._widgetSizesCache.set(n,t),a[e]=0;const i=a.map(e=>e>0).lastIndexOf(!0);if(-1===i)return;a[i]=s[i]+t+r}return a.map(e=>e/(o+r))}_evtClick(e){const t=e.target;if(t){const n=index_es6.ArrayExt.findFirstIndex(this.titles,e=>e.contains(t));n>=0&&(e.preventDefault(),e.stopPropagation(),this._toggleExpansion(n))}}_eventKeyDown(e){if(e.defaultPrevented)return;const t=e.target;let n=!1;if(t){const i=index_es6.ArrayExt.findFirstIndex(this.titles,e=>e.contains(t));if(i>=0){const s=e.keyCode.toString();if(e.key.match(/Space|Enter/)||s.match(/13|32/))t.click(),n=!0;else if("horizontal"===this.orientation?e.key.match(/ArrowLeft|ArrowRight/)||s.match(/37|39/):e.key.match(/ArrowUp|ArrowDown/)||s.match(/38|40/)){const t=e.key.match(/ArrowLeft|ArrowUp/)||s.match(/37|38/)?-1:1,r=this.titles.length,o=(i+r+t)%r;this.titles[o].focus(),n=!0}else"End"===e.key||"35"===s?(this.titles[this.titles.length-1].focus(),n=!0):"Home"!==e.key&&"36"!==s||(this.titles[0].focus(),n=!0)}n&&e.preventDefault()}}_toggleExpansion(e){const t=this.titles[e],n=this.layout.widgets[e],i=this._computeWidgetSize(e);i&&this.setRelativeSizes(i,!1),n.isHidden?(t.classList.add("lm-mod-expanded"),t.setAttribute("aria-expanded","true"),n.show()):(t.classList.remove("lm-mod-expanded"),t.setAttribute("aria-expanded","false"),n.hide()),this._expansionToggled.emit(e)}}!function(e){class t extends SplitPanel.Renderer{constructor(){super(),this.titleClassName="lm-AccordionPanel-title",this._titleID=0,this._titleKeys=new WeakMap,this._uuid=++t._nInstance}createCollapseIcon(e){return document.createElement("span")}createSectionTitle(e){const t=document.createElement("h3");t.setAttribute("tabindex","0"),t.id=this.createTitleKey(e),t.className=this.titleClassName;for(const n in e.dataset)t.dataset[n]=e.dataset[n];t.appendChild(this.createCollapseIcon(e)).className="lm-AccordionPanel-titleCollapser";const n=t.appendChild(document.createElement("span"));return n.className="lm-AccordionPanel-titleLabel",n.textContent=e.label,n.title=e.caption||e.label,t}createTitleKey(e){let t=this._titleKeys.get(e);return void 0===t&&(t=`title-key-${this._uuid}-${this._titleID++}`,this._titleKeys.set(e,t)),t}}t._nInstance=0,e.Renderer=t,e.defaultRenderer=new t}(AccordionPanel||(AccordionPanel={})),(Private$d||(Private$d={})).createLayout=function(e){return e.layout||new AccordionLayout({renderer:e.renderer||AccordionPanel.defaultRenderer,orientation:e.orientation,alignment:e.alignment,spacing:e.spacing,titleSpace:e.titleSpace})};class BoxLayout extends PanelLayout{constructor(e={}){super(),this._fixed=0,this._spacing=4,this._dirty=!1,this._sizers=[],this._items=[],this._box=null,this._alignment="start",this._direction="top-to-bottom",void 0!==e.direction&&(this._direction=e.direction),void 0!==e.alignment&&(this._alignment=e.alignment),void 0!==e.spacing&&(this._spacing=Utils$1.clampDimension(e.spacing))}dispose(){for(const e of this._items)e.dispose();this._box=null,this._items.length=0,this._sizers.length=0,super.dispose()}get direction(){return this._direction}set direction(e){this._direction!==e&&(this._direction=e,this.parent&&(this.parent.dataset.direction=e,this.parent.fit()))}get alignment(){return this._alignment}set alignment(e){this._alignment!==e&&(this._alignment=e,this.parent&&(this.parent.dataset.alignment=e,this.parent.update()))}get spacing(){return this._spacing}set spacing(e){e=Utils$1.clampDimension(e),this._spacing!==e&&(this._spacing=e,this.parent&&this.parent.fit())}init(){this.parent.dataset.direction=this.direction,this.parent.dataset.alignment=this.alignment,super.init()}attachWidget(e,t){index_es6.ArrayExt.insert(this._items,e,new LayoutItem(t)),index_es6.ArrayExt.insert(this._sizers,e,new BoxSizer),this.parent.isAttached&&MessageLoop.sendMessage(t,Widget.Msg.BeforeAttach),this.parent.node.appendChild(t.node),this.parent.isAttached&&MessageLoop.sendMessage(t,Widget.Msg.AfterAttach),this.parent.fit()}moveWidget(e,t,n){index_es6.ArrayExt.move(this._items,e,t),index_es6.ArrayExt.move(this._sizers,e,t),this.parent.update()}detachWidget(e,t){let n=index_es6.ArrayExt.removeAt(this._items,e);index_es6.ArrayExt.removeAt(this._sizers,e),this.parent.isAttached&&MessageLoop.sendMessage(t,Widget.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.isAttached&&MessageLoop.sendMessage(t,Widget.Msg.AfterDetach),n.dispose(),this.parent.fit()}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}_fit(){let e=0;for(let t=0,n=this._items.length;t<n;++t)e+=+!this._items[t].isHidden;this._fixed=this._spacing*Math.max(0,e-1);let t=Private$c.isHorizontal(this._direction),n=t?this._fixed:0,i=t?0:this._fixed;for(let e=0,s=this._items.length;e<s;++e){let s=this._items[e],r=this._sizers[e];s.isHidden?(r.minSize=0,r.maxSize=0):(s.fit(),r.sizeHint=BoxLayout.getSizeBasis(s.widget),r.stretch=BoxLayout.getStretch(s.widget),t?(r.minSize=s.minWidth,r.maxSize=s.maxWidth,n+=s.minWidth,i=Math.max(i,s.minHeight)):(r.minSize=s.minHeight,r.maxSize=s.maxHeight,i+=s.minHeight,n=Math.max(n,s.minWidth)))}let s=this._box=ElementExt.boxSizing(this.parent.node);n+=s.horizontalSum,i+=s.verticalSum;let r=this.parent.node.style;r.minWidth=`${n}px`,r.minHeight=`${i}px`,this._dirty=!0,this.parent.parent&&MessageLoop.sendMessage(this.parent.parent,Widget.Msg.FitRequest),this._dirty&&MessageLoop.sendMessage(this.parent,Widget.Msg.UpdateRequest)}_update(e,t){this._dirty=!1;let n=0;for(let e=0,t=this._items.length;e<t;++e)n+=+!this._items[e].isHidden;if(0===n)return;e<0&&(e=this.parent.node.offsetWidth),t<0&&(t=this.parent.node.offsetHeight),this._box||(this._box=ElementExt.boxSizing(this.parent.node));let i,s=this._box.paddingTop,r=this._box.paddingLeft,o=e-this._box.horizontalSum,a=t-this._box.verticalSum;switch(this._direction){case"left-to-right":i=BoxEngine.calc(this._sizers,Math.max(0,o-this._fixed));break;case"top-to-bottom":i=BoxEngine.calc(this._sizers,Math.max(0,a-this._fixed));break;case"right-to-left":i=BoxEngine.calc(this._sizers,Math.max(0,o-this._fixed)),r+=o;break;case"bottom-to-top":i=BoxEngine.calc(this._sizers,Math.max(0,a-this._fixed)),s+=a;break;default:throw"unreachable"}let l=0,c=0;if(i>0)switch(this._alignment){case"start":break;case"center":l=0,c=i/2;break;case"end":l=0,c=i;break;case"justify":l=i/n,c=0;break;default:throw"unreachable"}for(let e=0,t=this._items.length;e<t;++e){let t=this._items[e];if(t.isHidden)continue;let n=this._sizers[e].size;switch(this._direction){case"left-to-right":t.update(r+c,s,n+l,a),r+=n+l+this._spacing;break;case"top-to-bottom":t.update(r,s+c,o,n+l),s+=n+l+this._spacing;break;case"right-to-left":t.update(r-c-n-l,s,n+l,a),r-=n+l+this._spacing;break;case"bottom-to-top":t.update(r,s-c-n-l,o,n+l),s-=n+l+this._spacing;break;default:throw"unreachable"}}}}!function(e){e.getStretch=function(e){return Private$c.stretchProperty.get(e)},e.setStretch=function(e,t){Private$c.stretchProperty.set(e,t)},e.getSizeBasis=function(e){return Private$c.sizeBasisProperty.get(e)},e.setSizeBasis=function(e,t){Private$c.sizeBasisProperty.set(e,t)}}(BoxLayout||(BoxLayout={})),function(e){function t(e){e.parent&&e.parent.layout instanceof BoxLayout&&e.parent.fit()}e.stretchProperty=new dist_index_es6.AttachedProperty({name:"stretch",create:()=>0,coerce:(e,t)=>Math.max(0,Math.floor(t)),changed:t}),e.sizeBasisProperty=new dist_index_es6.AttachedProperty({name:"sizeBasis",create:()=>0,coerce:(e,t)=>Math.max(0,Math.floor(t)),changed:t}),e.isHorizontal=function(e){return"left-to-right"===e||"right-to-left"===e},e.clampSpacing=function(e){return Math.max(0,Math.floor(e))}}(Private$c||(Private$c={}));class BoxPanel extends Panel{constructor(e={}){super({layout:Private$b.createLayout(e)}),this.addClass("lm-BoxPanel")}get direction(){return this.layout.direction}set direction(e){this.layout.direction=e}get alignment(){return this.layout.alignment}set alignment(e){this.layout.alignment=e}get spacing(){return this.layout.spacing}set spacing(e){this.layout.spacing=e}onChildAdded(e){e.child.addClass("lm-BoxPanel-child")}onChildRemoved(e){e.child.removeClass("lm-BoxPanel-child")}}!function(e){e.getStretch=function(e){return BoxLayout.getStretch(e)},e.setStretch=function(e,t){BoxLayout.setStretch(e,t)},e.getSizeBasis=function(e){return BoxLayout.getSizeBasis(e)},e.setSizeBasis=function(e,t){BoxLayout.setSizeBasis(e,t)}}(BoxPanel||(BoxPanel={})),(Private$b||(Private$b={})).createLayout=function(e){return e.layout||new BoxLayout(e)};class CommandPalette extends Widget{constructor(e){super({node:Private$a.createNode()}),this._activeIndex=-1,this._items=[],this._results=null,this.addClass("lm-CommandPalette"),this.setFlag(Widget.Flag.DisallowLayout),this.commands=e.commands,this.renderer=e.renderer||CommandPalette.defaultRenderer,this.commands.commandChanged.connect(this._onGenericChange,this),this.commands.keyBindingChanged.connect(this._onGenericChange,this)}dispose(){this._items.length=0,this._results=null,super.dispose()}get searchNode(){return this.node.getElementsByClassName("lm-CommandPalette-search")[0]}get inputNode(){return this.node.getElementsByClassName("lm-CommandPalette-input")[0]}get contentNode(){return this.node.getElementsByClassName("lm-CommandPalette-content")[0]}get items(){return this._items}addItem(e){let t=Private$a.createItem(this.commands,e);return this._items.push(t),this.refresh(),t}addItems(e){const t=e.map(e=>Private$a.createItem(this.commands,e));return t.forEach(e=>this._items.push(e)),this.refresh(),t}removeItem(e){this.removeItemAt(this._items.indexOf(e))}removeItemAt(e){index_es6.ArrayExt.removeAt(this._items,e)&&this.refresh()}clearItems(){0!==this._items.length&&(this._items.length=0,this.refresh())}refresh(){this._results=null,""!==this.inputNode.value?this.node.getElementsByClassName("lm-close-icon")[0].style.display="inherit":this.node.getElementsByClassName("lm-close-icon")[0].style.display="none",this.update()}handleEvent(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()}}onBeforeAttach(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)}onAfterDetach(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)}onAfterShow(e){this.update(),super.onAfterShow(e)}onActivateRequest(e){if(this.isAttached){let e=this.inputNode;e.focus(),e.select()}}onUpdateRequest(e){if(!this.isVisible)return void VirtualDOM.render(null,this.contentNode);let t=this.inputNode.value,n=this.contentNode,i=this._results;if(i||(i=this._results=Private$a.search(this._items,t),this._activeIndex=t?index_es6.ArrayExt.findFirstIndex(i,Private$a.canActivate):-1),!t&&0===i.length)return void VirtualDOM.render(null,n);if(t&&0===i.length){let e=this.renderer.renderEmptyMessage({query:t});return void VirtualDOM.render(e,n)}let s=this.renderer,r=this._activeIndex,o=new Array(i.length);for(let e=0,t=i.length;e<t;++e){let t=i[e];if("header"===t.type){let n=t.indices,i=t.category;o[e]=s.renderHeader({category:i,indices:n})}else{let n=t.item,i=t.indices,a=e===r;o[e]=s.renderItem({item:n,indices:i,active:a})}}if(VirtualDOM.render(o,n),r<0||r>=i.length)n.scrollTop=0;else{let e=n.children[r];ElementExt.scrollIntoViewIfNeeded(n,e)}}_evtClick(e){if(0!==e.button)return;if(e.target.classList.contains("lm-close-icon"))return this.inputNode.value="",void this.refresh();let t=index_es6.ArrayExt.findFirstIndex(this.contentNode.children,t=>t.contains(e.target));-1!==t&&(e.preventDefault(),e.stopPropagation(),this._execute(t))}_evtKeyDown(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()}}_activateNextItem(){if(!this._results||0===this._results.length)return;let e=this._activeIndex,t=this._results.length,n=e<t-1?e+1:0,i=0===n?t-1:n-1;this._activeIndex=index_es6.ArrayExt.findFirstIndex(this._results,Private$a.canActivate,n,i),this.update()}_activatePreviousItem(){if(!this._results||0===this._results.length)return;let e=this._activeIndex,t=this._results.length,n=e<=0?t-1:e-1,i=n===t-1?0:n+1;this._activeIndex=index_es6.ArrayExt.findLastIndex(this._results,Private$a.canActivate,n,i),this.update()}_execute(e){if(!this._results)return;let t=this._results[e];if(t){if("header"===t.type){let e=this.inputNode;return e.value=`${t.category.toLowerCase()} `,e.focus(),void this.refresh()}t.item.isEnabled&&(this.commands.execute(t.item.command,t.item.args),this.inputNode.value="",this.refresh())}}_toggleFocused(){let e=document.activeElement===this.inputNode;this.toggleClass("lm-mod-focused",e)}_onGenericChange(){this.refresh()}}!function(e){class t{renderHeader(e){let t=this.formatHeader(e);return h.li({className:"lm-CommandPalette-header"},t)}renderItem(e){let t=this.createItemClass(e),n=this.createItemDataset(e);return e.item.isToggleable?h.li({className:t,dataset:n,role:"menuitemcheckbox","aria-checked":`${e.item.isToggled}`},this.renderItemIcon(e),this.renderItemContent(e),this.renderItemShortcut(e)):h.li({className:t,dataset:n,role:"menuitem"},this.renderItemIcon(e),this.renderItemContent(e),this.renderItemShortcut(e))}renderEmptyMessage(e){let t=this.formatEmptyMessage(e);return h.li({className:"lm-CommandPalette-emptyMessage"},t)}renderItemIcon(e){let t=this.createIconClass(e);return h.div({className:t},e.item.icon,e.item.iconLabel)}renderItemContent(e){return h.div({className:"lm-CommandPalette-itemContent"},this.renderItemLabel(e),this.renderItemCaption(e))}renderItemLabel(e){let t=this.formatItemLabel(e);return h.div({className:"lm-CommandPalette-itemLabel"},t)}renderItemCaption(e){let t=this.formatItemCaption(e);return h.div({className:"lm-CommandPalette-itemCaption"},t)}renderItemShortcut(e){let t=this.formatItemShortcut(e);return h.div({className:"lm-CommandPalette-itemShortcut"},t)}createItemClass(e){let t="lm-CommandPalette-item";e.item.isEnabled||(t+=" lm-mod-disabled"),e.item.isToggled&&(t+=" lm-mod-toggled"),e.active&&(t+=" lm-mod-active");let n=e.item.className;return n&&(t+=` ${n}`),t}createItemDataset(e){return{...e.item.dataset,command:e.item.command}}createIconClass(e){let t="lm-CommandPalette-itemIcon",n=e.item.iconClass;return n?`${t} ${n}`:t}formatHeader(e){return e.indices&&0!==e.indices.length?index_es6.StringExt.highlight(e.category,e.indices,h.mark):e.category}formatEmptyMessage(e){return`No commands found that match '${e.query}'`}formatItemShortcut(e){let t=e.item.keyBinding;return t?CommandRegistry.formatKeystroke(t.keys):null}formatItemLabel(e){return e.indices&&0!==e.indices.length?index_es6.StringExt.highlight(e.item.label,e.indices,h.mark):e.item.label}formatItemCaption(e){return e.item.caption}}e.Renderer=t,e.defaultRenderer=new t}(CommandPalette||(CommandPalette={})),function(e){function t(e,t){let n=e.category.toLowerCase(),i=`${n} ${e.label.toLowerCase()}`,s=1/0,r=null,o=/\b\w/g;for(;;){let e=o.exec(i);if(!e)break;let n=index_es6.StringExt.matchSumOfDeltas(i,t,e.index);if(!n)break;n.score<=s&&(s=n.score,r=n.indices)}if(!r||s===1/0)return null;let a=n.length+1,l=index_es6.ArrayExt.lowerBound(r,a,(e,t)=>e-t),c=r.slice(0,l),d=r.slice(l);for(let e=0,t=d.length;e<t;++e)d[e]-=a;return 0===c.length?{matchType:0,categoryIndices:null,labelIndices:d,score:s,item:e}:0===d.length?{matchType:1,categoryIndices:c,labelIndices:null,score:s,item:e}:{matchType:2,categoryIndices:c,labelIndices:d,score:s,item:e}}function n(e,t){let n=e.matchType-t.matchType;if(0!==n)return n;let i=e.score-t.score;if(0!==i)return i;let s=0,r=0;switch(e.matchType){case 0:s=e.labelIndices[0],r=t.labelIndices[0];break;case 1:case 2:s=e.categoryIndices[0],r=t.categoryIndices[0]}if(s!==r)return s-r;let o=e.item.category.localeCompare(t.item.category);if(0!==o)return o;let a=e.item.rank,l=t.item.rank;return a!==l?a<l?-1:1:e.item.label.localeCompare(t.item.label)}e.createNode=function(){let e=document.createElement("div"),t=document.createElement("div"),n=document.createElement("div"),i=document.createElement("input"),s=document.createElement("ul"),r=document.createElement("button");return t.className="lm-CommandPalette-search",n.className="lm-CommandPalette-wrapper",i.className="lm-CommandPalette-input",r.className="lm-close-icon",s.className="lm-CommandPalette-content",s.setAttribute("role","menu"),i.spellcheck=!1,n.appendChild(i),n.appendChild(r),t.appendChild(n),e.appendChild(t),e.appendChild(s),e},e.createItem=function(e,t){return new i(e,t)},e.search=function(e,i){let s=function(e,n){n=n.replace(/\s+/g,"").toLowerCase();let i=[];for(let s=0,r=e.length;s<r;++s){let r=e[s];if(!r.isVisible)continue;if(!n){i.push({matchType:3,categoryIndices:null,labelIndices:null,score:0,item:r});continue}let o=t(r,n);o&&(r.isEnabled||(o.score+=1e3),i.push(o))}return i}(e,i);return s.sort(n),function(e){let t=[];for(let n=0,i=e.length;n<i;++n){let{item:i,categoryIndices:s,labelIndices:r}=e[n],o=i.category;0!==n&&o===e[n-1].item.category||t.push({type:"header",category:o,indices:s}),t.push({type:"item",item:i,indices:r})}return t}(s)},e.canActivate=function(e){return"item"===e.type&&e.item.isEnabled};class i{constructor(e,t){this._commands=e,this.category=t.category.trim().replace(/\s+/g," "),this.command=t.command,this.args=t.args||dist.JSONExt.emptyObject,this.rank=void 0!==t.rank?t.rank:1/0}get label(){return this._commands.label(this.command,this.args)}get icon(){return this._commands.icon(this.command,this.args)}get iconClass(){return this._commands.iconClass(this.command,this.args)}get iconLabel(){return this._commands.iconLabel(this.command,this.args)}get caption(){return this._commands.caption(this.command,this.args)}get className(){return this._commands.className(this.command,this.args)}get dataset(){return this._commands.dataset(this.command,this.args)}get isEnabled(){return this._commands.isEnabled(this.command,this.args)}get isToggled(){return this._commands.isToggled(this.command,this.args)}get isToggleable(){return this._commands.isToggleable(this.command,this.args)}get isVisible(){return this._commands.isVisible(this.command,this.args)}get keyBinding(){let{command:e,args:t}=this;return index_es6.ArrayExt.findLastValue(this._commands.keyBindings,n=>n.command===e&&dist.JSONExt.deepEqual(n.args,t))||null}}}(Private$a||(Private$a={}));class Menu extends Widget{constructor(e){super({node:Private$9.createNode()}),this._childIndex=-1,this._activeIndex=-1,this._openTimerID=0,this._closeTimerID=0,this._items=[],this._childMenu=null,this._parentMenu=null,this._aboutToClose=new signaling_dist_index_es6.Signal(this),this._menuRequested=new signaling_dist_index_es6.Signal(this),this.addClass("lm-Menu"),this.setFlag(Widget.Flag.DisallowLayout),this.commands=e.commands,this.renderer=e.renderer||Menu.defaultRenderer}dispose(){this.close(),this._items.length=0,super.dispose()}get aboutToClose(){return this._aboutToClose}get menuRequested(){return this._menuRequested}get parentMenu(){return this._parentMenu}get childMenu(){return this._childMenu}get rootMenu(){let e=this;for(;e._parentMenu;)e=e._parentMenu;return e}get leafMenu(){let e=this;for(;e._childMenu;)e=e._childMenu;return e}get contentNode(){return this.node.getElementsByClassName("lm-Menu-content")[0]}get activeItem(){return this._items[this._activeIndex]||null}set activeItem(e){this.activeIndex=e?this._items.indexOf(e):-1}get activeIndex(){return this._activeIndex}set activeIndex(e){(e<0||e>=this._items.length)&&(e=-1),-1===e||Private$9.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())}get items(){return this._items}activateNextItem(){let e=this._items.length,t=this._activeIndex,n=t<e-1?t+1:0,i=0===n?e-1:n-1;this.activeIndex=index_es6.ArrayExt.findFirstIndex(this._items,Private$9.canActivate,n,i)}activatePreviousItem(){let e=this._items.length,t=this._activeIndex,n=t<=0?e-1:t-1,i=n===e-1?0:n+1;this.activeIndex=index_es6.ArrayExt.findLastIndex(this._items,Private$9.canActivate,n,i)}triggerActiveItem(){if(!this.isAttached)return;let e=this.activeItem;if(!e)return;if(this._cancelOpenTimer(),this._cancelCloseTimer(),"submenu"===e.type)return void this._openChildMenu(!0);this.rootMenu.close();let{command:t,args:n}=e;this.commands.isEnabled(t,n)?this.commands.execute(t,n):console.log(`Command '${t}' is disabled.`)}addItem(e){return this.insertItem(this._items.length,e)}insertItem(e,t){this.isAttached&&this.close(),this.activeIndex=-1;let n=Math.max(0,Math.min(e,this._items.length)),i=Private$9.createItem(this,t);return index_es6.ArrayExt.insert(this._items,n,i),this.update(),i}removeItem(e){this.removeItemAt(this._items.indexOf(e))}removeItemAt(e){this.isAttached&&this.close(),this.activeIndex=-1,index_es6.ArrayExt.removeAt(this._items,e)&&this.update()}clearItems(){this.isAttached&&this.close(),this.activeIndex=-1,0!==this._items.length&&(this._items.length=0,this.update())}open(e,t,n={}){var i,s,r;if(this.isAttached)return;let o=n.forceX||!1,a=n.forceY||!1;const l=null!==(i=n.host)&&void 0!==i?i:null,c=null!==(s=n.ref)&&void 0!==s?s:null,d=null!==(r=n.horizontalAlignment)&&void 0!==r?r:"rtl"===document.documentElement.dir?"right":"left";Private$9.openRootMenu(this,e,t,o,a,d,l,c),this.activate()}handleEvent(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()}}onBeforeAttach(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,!0)}onAfterDetach(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)}onActivateRequest(e){this.isAttached&&this.node.focus()}onUpdateRequest(e){let t=this._items,n=this.renderer,i=this._activeIndex,s=Private$9.computeCollapsed(t),r=new Array(t.length);for(let e=0,o=t.length;e<o;++e){let o=t[e],a=e===i,l=s[e];r[e]=n.renderItem({item:o,active:a,collapsed:l,onfocus:()=>{this.activeIndex=e}})}VirtualDOM.render(r,this.contentNode)}onCloseRequest(e){this._cancelOpenTimer(),this._cancelCloseTimer(),this.activeIndex=-1;let t=this._childMenu;t&&(this._childIndex=-1,this._childMenu=null,t._parentMenu=null,t.close());let n=this._parentMenu;n&&(this._parentMenu=null,n._childIndex=-1,n._childMenu=null,n.activate()),this.isAttached&&this._aboutToClose.emit(void 0),super.onCloseRequest(e)}_evtKeyDown(e){e.preventDefault(),e.stopPropagation();let t=e.keyCode;if(13===t)return void this.triggerActiveItem();if(27===t)return void this.close();if(37===t)return void(this._parentMenu?this.close():this._menuRequested.emit("previous"));if(38===t)return void this.activatePreviousItem();if(39===t){let e=this.activeItem;return void(e&&"submenu"===e.type?this.triggerActiveItem():this.rootMenu._menuRequested.emit("next"))}if(40===t)return void this.activateNextItem();let n=getKeyboardLayout().keyForKeydownEvent(e);if(!n)return;let i=this._activeIndex+1,s=Private$9.findMnemonic(this._items,n,i);-1===s.index||s.multiple?-1!==s.index?this.activeIndex=s.index:-1!==s.auto&&(this.activeIndex=s.auto):(this.activeIndex=s.index,this.triggerActiveItem())}_evtMouseUp(e){0===e.button&&(e.preventDefault(),e.stopPropagation(),this.triggerActiveItem())}_evtMouseMove(e){let t=index_es6.ArrayExt.findFirstIndex(this.contentNode.children,t=>ElementExt.hitTest(t,e.clientX,e.clientY));if(t===this._activeIndex)return;if(this.activeIndex=t,t=this.activeIndex,t===this._childIndex)return this._cancelOpenTimer(),void this._cancelCloseTimer();-1!==this._childIndex&&this._startCloseTimer(),this._cancelOpenTimer();let n=this.activeItem;n&&"submenu"===n.type&&n.submenu&&this._startOpenTimer()}_evtMouseEnter(e){for(let e=this._parentMenu;e;e=e._parentMenu)e._cancelOpenTimer(),e._cancelCloseTimer(),e.activeIndex=e._childIndex}_evtMouseLeave(e){if(this._cancelOpenTimer(),!this._childMenu)return void(this.activeIndex=-1);let{clientX:t,clientY:n}=e;ElementExt.hitTest(this._childMenu.node,t,n)?this._cancelCloseTimer():(this.activeIndex=-1,this._startCloseTimer())}_evtMouseDown(e){this._parentMenu||(Private$9.hitTestMenus(this,e.clientX,e.clientY)?(e.preventDefault(),e.stopPropagation()):this.close())}_openChildMenu(e=!1){let t=this.activeItem;if(!t||"submenu"!==t.type||!t.submenu)return void this._closeChildMenu();let n=t.submenu;if(n===this._childMenu)return;Menu.saveWindowData(),this._closeChildMenu(),this._childMenu=n,this._childIndex=this._activeIndex,n._parentMenu=this,MessageLoop.sendMessage(this,Widget.Msg.UpdateRequest);let i=this.contentNode.children[this._activeIndex];Private$9.openSubmenu(n,i),e&&(n.activeIndex=-1,n.activateNextItem()),n.activate()}_closeChildMenu(){this._childMenu&&this._childMenu.close()}_startOpenTimer(){0===this._openTimerID&&(this._openTimerID=window.setTimeout(()=>{this._openTimerID=0,this._openChildMenu()},Private$9.TIMER_DELAY))}_startCloseTimer(){0===this._closeTimerID&&(this._closeTimerID=window.setTimeout(()=>{this._closeTimerID=0,this._closeChildMenu()},Private$9.TIMER_DELAY))}_cancelOpenTimer(){0!==this._openTimerID&&(clearTimeout(this._openTimerID),this._openTimerID=0)}_cancelCloseTimer(){0!==this._closeTimerID&&(clearTimeout(this._closeTimerID),this._closeTimerID=0)}static saveWindowData(){Private$9.saveWindowData()}}!function(e){class t{renderItem(e){let t=this.createItemClass(e),n=this.createItemDataset(e),i=this.createItemARIA(e);return h.li({className:t,dataset:n,tabindex:"0",onfocus:e.onfocus,...i},this.renderIcon(e),this.renderLabel(e),this.renderShortcut(e),this.renderSubmenu(e))}renderIcon(e){let t=this.createIconClass(e);return h.div({className:t},e.item.icon,e.item.iconLabel)}renderLabel(e){let t=this.formatLabel(e);return h.div({className:"lm-Menu-itemLabel"},t)}renderShortcut(e){let t=this.formatShortcut(e);return h.div({className:"lm-Menu-itemShortcut"},t)}renderSubmenu(e){return h.div({className:"lm-Menu-itemSubmenuIcon"})}createItemClass(e){let t="lm-Menu-item";e.item.isEnabled||(t+=" lm-mod-disabled"),e.item.isToggled&&(t+=" lm-mod-toggled"),e.item.isVisible||(t+=" lm-mod-hidden"),e.active&&(t+=" lm-mod-active"),e.collapsed&&(t+=" lm-mod-collapsed");let n=e.item.className;return n&&(t+=` ${n}`),t}createItemDataset(e){let t,{type:n,command:i,dataset:s}=e.item;return t="command"===n?{...s,type:n,command:i}:{...s,type:n},t}createIconClass(e){let t="lm-Menu-itemIcon",n=e.item.iconClass;return n?`${t} ${n}`:t}createItemARIA(e){let t={};switch(e.item.type){case"separator":t.role="presentation";break;case"submenu":t["aria-haspopup"]="true",e.item.isEnabled||(t["aria-disabled"]="true");break;default:e.item.isEnabled||(t["aria-disabled"]="true"),e.item.isToggled?(t.role="menuitemcheckbox",t["aria-checked"]="true"):t.role="menuitem"}return t}formatLabel(e){let{label:t,mnemonic:n}=e.item;if(n<0||n>=t.length)return t;let i=t.slice(0,n),s=t.slice(n+1),r=t[n];return[i,h.span({className:"lm-Menu-itemMnemonic"},r),s]}formatShortcut(e){let t=e.item.keyBinding;return t?CommandRegistry.formatKeystroke(t.keys):null}}e.Renderer=t,e.defaultRenderer=new t}(Menu||(Menu={})),function(e){e.TIMER_DELAY=300,e.SUBMENU_OVERLAP=3;let t=null,n=0;function i(){return n>0?(n--,t):r()}function s(e){return"separator"!==e.type&&e.isEnabled&&e.isVisible}function r(){return{pageXOffset:window.pageXOffset,pageYOffset:window.pageYOffset,clientWidth:document.documentElement.clientWidth,clientHeight:document.documentElement.clientHeight}}e.saveWindowData=function(){t=r(),n++},e.createNode=function(){let e=document.createElement("div"),t=document.createElement("ul");return t.className="lm-Menu-content",e.appendChild(t),t.setAttribute("role","menu"),e.tabIndex=0,e},e.canActivate=s,e.createItem=function(e,t){return new o(e.commands,t)},e.hitTestMenus=function(e,t,n){for(let i=e;i;i=i.childMenu)if(ElementExt.hitTest(i.node,t,n))return!0;return!1},e.computeCollapsed=function(e){let t=new Array(e.length);index_es6.ArrayExt.fill(t,!1);let n=0,i=e.length;for(;n<i;++n){let i=e[n];if(i.isVisible){if("separator"!==i.type)break;t[n]=!0}}let s=i-1;for(;s>=0;--s){let n=e[s];if(n.isVisible){if("separator"!==n.type)break;t[s]=!0}}let r=!1;for(;++n<s;){let i=e[n];i.isVisible&&("separator"!==i.type?r=!1:r?t[n]=!0:r=!0)}return t},e.openRootMenu=function(e,t,n,s,r,o,a,l){const c=i();let d=c.pageXOffset,u=c.pageYOffset,h=c.clientWidth,p=c.clientHeight;MessageLoop.sendMessage(e,Widget.Msg.UpdateRequest);let m=p-(r?n:0),f=e.node,g=f.style;g.opacity="0",g.maxHeight=`${m}px`,Widget.attach(e,a||document.body,l);let{width:v,height:_}=f.getBoundingClientRect();"right"===o&&(t-=v),!s&&t+v>d+h&&(t=d+h-v),!r&&n+_>u+p&&(n>u+p?n=u+p-_:n-=_),g.transform=`translate(${Math.max(0,t)}px, ${Math.max(0,n)}px`,g.opacity="1"},e.openSubmenu=function(t,n){const s=i();let r=s.pageXOffset,o=s.pageYOffset,a=s.clientWidth,l=s.clientHeight;MessageLoop.sendMessage(t,Widget.Msg.UpdateRequest);let c=l,d=t.node,u=d.style;u.opacity="0",u.maxHeight=`${c}px`,Widget.attach(t,document.body);let{width:h,height:p}=d.getBoundingClientRect(),m=ElementExt.boxSizing(t.node),f=n.getBoundingClientRect(),g=f.right-e.SUBMENU_OVERLAP;g+h>r+a&&(g=f.left+e.SUBMENU_OVERLAP-h);let v=f.top-m.borderTop-m.paddingTop;v+p>o+l&&(v=f.bottom+m.borderBottom+m.paddingBottom-p),u.transform=`translate(${Math.max(0,g)}px, ${Math.max(0,v)}px`,u.opacity="1"},e.findMnemonic=function(e,t,n){let i=-1,r=-1,o=!1,a=t.toUpperCase();for(let t=0,l=e.length;t<l;++t){let c=(t+n)%l,d=e[c];if(!s(d))continue;let u=d.label;if(0===u.length)continue;let h=d.mnemonic;h>=0&&h<u.length?u[h].toUpperCase()===a&&(-1===i?i=c:o=!0):-1===r&&u[0].toUpperCase()===a&&(r=c)}return{index:i,multiple:o,auto:r}};class o{constructor(e,t){this._commands=e,this.type=t.type||"command",this.command=t.command||"",this.args=t.args||dist.JSONExt.emptyObject,this.submenu=t.submenu||null}get label(){return"command"===this.type?this._commands.label(this.command,this.args):"submenu"===this.type&&this.submenu?this.submenu.title.label:""}get mnemonic(){return"command"===this.type?this._commands.mnemonic(this.command,this.args):"submenu"===this.type&&this.submenu?this.submenu.title.mnemonic:-1}get icon(){return"command"===this.type?this._commands.icon(this.command,this.args):"submenu"===this.type&&this.submenu?this.submenu.title.icon:void 0}get iconClass(){return"command"===this.type?this._commands.iconClass(this.command,this.args):"submenu"===this.type&&this.submenu?this.submenu.title.iconClass:""}get iconLabel(){return"command"===this.type?this._commands.iconLabel(this.command,this.args):"submenu"===this.type&&this.submenu?this.submenu.title.iconLabel:""}get caption(){return"command"===this.type?this._commands.caption(this.command,this.args):"submenu"===this.type&&this.submenu?this.submenu.title.caption:""}get className(){return"command"===this.type?this._commands.className(this.command,this.args):"submenu"===this.type&&this.submenu?this.submenu.title.className:""}get dataset(){return"command"===this.type?this._commands.dataset(this.command,this.args):"submenu"===this.type&&this.submenu?this.submenu.title.dataset:{}}get isEnabled(){return"command"===this.type?this._commands.isEnabled(this.command,this.args):"submenu"!==this.type||null!==this.submenu}get isToggled(){return"command"===this.type&&this._commands.isToggled(this.command,this.args)}get isVisible(){return"command"===this.type?this._commands.isVisible(this.command,this.args):"submenu"!==this.type||null!==this.submenu}get keyBinding(){if("command"===this.type){let{command:e,args:t}=this;return index_es6.ArrayExt.findLastValue(this._commands.keyBindings,n=>n.command===e&&dist.JSONExt.deepEqual(n.args,t))||null}return null}}}(Private$9||(Private$9={}));class ContextMenu{constructor(e){this._groupByTarget=!0,this._idTick=0,this._items=[],this._sortBySelector=!0;const{groupByTarget:t,sortBySelector:n,...i}=e;this.menu=new Menu(i),this._groupByTarget=!1!==t,this._sortBySelector=!1!==n}addItem(e){let t=Private$8.createItem(e,this._idTick++);return this._items.push(t),new DisposableDelegate(()=>{ArrayExt.removeFirstOf(this._items,t)})}open(e){if(Menu.saveWindowData(),this.menu.clearItems(),0===this._items.length)return!1;let t=Private$8.matchItems(this._items,e,this._groupByTarget,this._sortBySelector);if(!t||0===t.length)return!1;for(const e of t)this.menu.addItem(e);return this.menu.open(e.clientX,e.clientY),!0}}!function(e){function t(e,t){let n=e.rank,i=t.rank;return n!==i?n<i?-1:1:e.id-t.id}function n(e,n){let i=Selector.calculateSpecificity(e.selector),s=Selector.calculateSpecificity(n.selector);return i!==s?s-i:t(e,n)}e.createItem=function(e,t){let n=function(e){if(-1!==e.indexOf(","))throw new Error(`Selector cannot contain commas: ${e}`);if(!Selector.isValid(e))throw new Error(`Invalid selector: ${e}`);return e}(e.selector),i=void 0!==e.rank?e.rank:1/0;return{...e,selector:n,rank:i,id:t}},e.matchItems=function(e,i,s,r){let o=i.target;if(!o)return null;let a=i.currentTarget;if(!a)return null;if(!a.contains(o)&&(o=document.elementFromPoint(i.clientX,i.clientY),!o||!a.contains(o)))return null;let l=[],c=e.slice();for(;null!==o;){let e=[];for(let t=0,n=c.length;t<n;++t){let n=c[t];n&&Selector.matches(o,n.selector)&&(e.push(n),c[t]=null)}if(0!==e.length&&(s&&e.sort(r?n:t),l.push(...e)),o===a)break;o=o.parentElement}return s||l.sort(r?n:t),l}}(Private$8||(Private$8={}));const ARROW_KEYS=["ArrowLeft","ArrowUp","ArrowRight","ArrowDown","Home","End"];class TabBar extends Widget{constructor(e={}){super({node:Private$7.createNode()}),this._currentIndex=-1,this._titles=[],this._titlesEditable=!1,this._previousTitle=null,this._dragData=null,this._addButtonEnabled=!1,this._tabMoved=new signaling_dist_index_es6.Signal(this),this._currentChanged=new signaling_dist_index_es6.Signal(this),this._addRequested=new signaling_dist_index_es6.Signal(this),this._tabCloseRequested=new signaling_dist_index_es6.Signal(this),this._tabDetachRequested=new signaling_dist_index_es6.Signal(this),this._tabActivateRequested=new signaling_dist_index_es6.Signal(this),this.addClass("lm-TabBar"),this.contentNode.setAttribute("role","tablist"),this.setFlag(Widget.Flag.DisallowLayout),this._document=e.document||document,this.tabsMovable=e.tabsMovable||!1,this.titlesEditable=e.titlesEditable||!1,this.allowDeselect=e.allowDeselect||!1,this.addButtonEnabled=e.addButtonEnabled||!1,this.insertBehavior=e.insertBehavior||"select-tab-if-needed",this.name=e.name||"",this.orientation=e.orientation||"horizontal",this.removeBehavior=e.removeBehavior||"select-tab-after",this.renderer=e.renderer||TabBar.defaultRenderer}dispose(){this._releaseMouse(),this._titles.length=0,this._previousTitle=null,super.dispose()}get currentChanged(){return this._currentChanged}get tabMoved(){return this._tabMoved}get tabActivateRequested(){return this._tabActivateRequested}get addRequested(){return this._addRequested}get tabCloseRequested(){return this._tabCloseRequested}get tabDetachRequested(){return this._tabDetachRequested}get document(){return this._document}get titlesEditable(){return this._titlesEditable}set titlesEditable(e){this._titlesEditable=e}get currentTitle(){return this._titles[this._currentIndex]||null}set currentTitle(e){this.currentIndex=e?this._titles.indexOf(e):-1}get currentIndex(){return this._currentIndex}set currentIndex(e){if((e<0||e>=this._titles.length)&&(e=-1),this._currentIndex===e)return;let t=this._currentIndex,n=this._titles[t]||null,i=e,s=this._titles[i]||null;this._currentIndex=i,this._previousTitle=n,this.update(),this._currentChanged.emit({previousIndex:t,previousTitle:n,currentIndex:i,currentTitle:s})}get name(){return this._name}set name(e){this._name=e,e?this.contentNode.setAttribute("aria-label",e):this.contentNode.removeAttribute("aria-label")}get orientation(){return this._orientation}set orientation(e){this._orientation!==e&&(this._releaseMouse(),this._orientation=e,this.dataset.orientation=e,this.contentNode.setAttribute("aria-orientation",e))}get addButtonEnabled(){return this._addButtonEnabled}set addButtonEnabled(e){this._addButtonEnabled!==e&&(this._addButtonEnabled=e,e?this.addButtonNode.classList.remove("lm-mod-hidden"):this.addButtonNode.classList.add("lm-mod-hidden"))}get titles(){return this._titles}get contentNode(){return this.node.getElementsByClassName("lm-TabBar-content")[0]}get addButtonNode(){return this.node.getElementsByClassName("lm-TabBar-addButton")[0]}addTab(e){return this.insertTab(this._titles.length,e)}insertTab(e,t){this._releaseMouse();let n=Private$7.asTitle(t),i=this._titles.indexOf(n),s=Math.max(0,Math.min(e,this._titles.length));return-1===i?(index_es6.ArrayExt.insert(this._titles,s,n),n.changed.connect(this._onTitleChanged,this),this.update(),this._adjustCurrentForInsert(s,n),n):(s===this._titles.length&&s--,i===s||(index_es6.ArrayExt.move(this._titles,i,s),this.update(),this._adjustCurrentForMove(i,s)),n)}removeTab(e){this.removeTabAt(this._titles.indexOf(e))}removeTabAt(e){this._releaseMouse();let t=index_es6.ArrayExt.removeAt(this._titles,e);t&&(t.changed.disconnect(this._onTitleChanged,this),t===this._previousTitle&&(this._previousTitle=null),this.update(),this._adjustCurrentForRemove(e,t))}clearTabs(){if(0===this._titles.length)return;this._releaseMouse();for(let e of this._titles)e.changed.disconnect(this._onTitleChanged,this);let e=this.currentIndex,t=this.currentTitle;this._currentIndex=-1,this._previousTitle=null,this._titles.length=0,this.update(),-1!==e&&this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:-1,currentTitle:null})}releaseMouse(){this._releaseMouse()}handleEvent(e){switch(e.type){case"pointerdown":this._evtPointerDown(e);break;case"pointermove":this._evtPointerMove(e);break;case"pointerup":this._evtPointerUp(e);break;case"dblclick":this._evtDblClick(e);break;case"keydown":e.eventPhase===Event.CAPTURING_PHASE?this._evtKeyDownCapturing(e):this._evtKeyDown(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}}onBeforeAttach(e){this.node.addEventListener("pointerdown",this),this.node.addEventListener("dblclick",this),this.node.addEventListener("keydown",this)}onAfterDetach(e){this.node.removeEventListener("pointerdown",this),this.node.removeEventListener("dblclick",this),this.node.removeEventListener("keydown",this),this._releaseMouse()}onUpdateRequest(e){var t;let n=this._titles,i=this.renderer,s=this.currentTitle,r=new Array(n.length);const o=null!==(t=this._getCurrentTabindex())&&void 0!==t?t:this._currentIndex>-1?this._currentIndex:0;for(let e=0,t=n.length;e<t;++e){let a=n[e],l=a===s,c=l?t:t-e-1,d=o===e?0:-1;r[e]=i.renderTab({title:a,current:l,zIndex:c,tabIndex:d})}VirtualDOM.render(r,this.contentNode)}_getCurrentTabindex(){let e=null;const t=this.contentNode.querySelector('li[tabindex="0"]');return t?e=[...this.contentNode.children].indexOf(t):this._addButtonEnabled&&"0"===this.addButtonNode.getAttribute("tabindex")&&(e=-1),e}_evtDblClick(e){if(!this.titlesEditable)return;let t=this.contentNode.children,n=index_es6.ArrayExt.findFirstIndex(t,t=>ElementExt.hitTest(t,e.clientX,e.clientY));if(-1===n)return;let i=this.titles[n],s=t[n].querySelector(".lm-TabBar-tabLabel");if(s&&s.contains(e.target)){let e=i.label||"",t=s.innerHTML;s.innerHTML="";let n=document.createElement("input");n.classList.add("lm-TabBar-tabInput"),n.value=e,s.appendChild(n);let r=()=>{n.removeEventListener("blur",r),s.innerHTML=t,this.node.addEventListener("keydown",this)};n.addEventListener("dblclick",e=>e.stopPropagation()),n.addEventListener("blur",r),n.addEventListener("keydown",e=>{"Enter"===e.key?(""!==n.value&&(i.label=i.caption=n.value),r()):"Escape"===e.key&&r()}),this.node.removeEventListener("keydown",this),n.select(),n.focus(),s.children.length>0&&s.children[0].focus()}}_evtKeyDownCapturing(e){e.eventPhase===Event.CAPTURING_PHASE&&(e.preventDefault(),e.stopPropagation(),"Escape"===e.key&&this._releaseMouse())}_evtKeyDown(e){var t,n,i;if("Tab"!==e.key&&e.eventPhase!==Event.CAPTURING_PHASE)if("Enter"===e.key||"Spacebar"===e.key||" "===e.key){const t=document.activeElement;if(this.addButtonEnabled&&this.addButtonNode.contains(t))e.preventDefault(),e.stopPropagation(),this._addRequested.emit();else{const n=index_es6.ArrayExt.findFirstIndex(this.contentNode.children,e=>e.contains(t));n>=0&&(e.preventDefault(),e.stopPropagation(),this.currentIndex=n)}}else if(ARROW_KEYS.includes(e.key)){const s=[...this.contentNode.children];if(this.addButtonEnabled&&s.push(this.addButtonNode),s.length<=1)return;e.preventDefault(),e.stopPropagation();let r,o=s.indexOf(document.activeElement);-1===o&&(o=this._currentIndex),"ArrowRight"===e.key&&"horizontal"===this._orientation||"ArrowDown"===e.key&&"vertical"===this._orientation?r=null!==(t=s[o+1])&&void 0!==t?t:s[0]:"ArrowLeft"===e.key&&"horizontal"===this._orientation||"ArrowUp"===e.key&&"vertical"===this._orientation?r=null!==(n=s[o-1])&&void 0!==n?n:s[s.length-1]:"Home"===e.key?r=s[0]:"End"===e.key&&(r=s[s.length-1]),r&&(null===(i=s[o])||void 0===i||i.setAttribute("tabindex","-1"),null==r||r.setAttribute("tabindex","0"),r.focus())}}_evtPointerDown(e){if(0!==e.button&&1!==e.button)return;if(this._dragData)return;if(e.target.classList.contains("lm-TabBar-tabInput"))return;let t=this.addButtonEnabled&&this.addButtonNode.contains(e.target),n=this.contentNode.children,i=index_es6.ArrayExt.findFirstIndex(n,t=>ElementExt.hitTest(t,e.clientX,e.clientY));if(-1===i&&!t)return;if(e.preventDefault(),e.stopPropagation(),this._dragData={tab:n[i],index:i,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("pointerup",this,!0),1===e.button||t)return;let s=n[i].querySelector(this.renderer.closeIconSelector);s&&s.contains(e.target)||(this.tabsMovable&&(this.document.addEventListener("pointermove",this,!0),this.document.addEventListener("keydown",this,!0),this.document.addEventListener("contextmenu",this,!0)),this.allowDeselect&&this.currentIndex===i?this.currentIndex=-1:this.currentIndex=i,-1!==this.currentIndex&&this._tabActivateRequested.emit({index:this.currentIndex,title:this.currentTitle}))}_evtPointerMove(e){let t=this._dragData;if(!t)return;e.preventDefault(),e.stopPropagation();let n=this.contentNode.children;if(t.dragActive||Private$7.dragExceeded(t,e)){if(!t.dragActive){let e=t.tab.getBoundingClientRect();"horizontal"===this._orientation?(t.tabPos=t.tab.offsetLeft,t.tabSize=e.width,t.tabPressPos=t.pressX-e.left):(t.tabPos=t.tab.offsetTop,t.tabSize=e.height,t.tabPressPos=t.pressY-e.top),t.tabPressOffset={x:t.pressX-e.left,y:t.pressY-e.top},t.tabLayout=Private$7.snapTabLayout(n,this._orientation),t.contentRect=this.contentNode.getBoundingClientRect(),t.override=Drag.overrideCursor("default"),t.tab.classList.add("lm-mod-dragging"),this.addClass("lm-mod-dragging"),t.dragActive=!0}if(!t.detachRequested&&Private$7.detachExceeded(t,e)){t.detachRequested=!0;let i=t.index,s=e.clientX,r=e.clientY,o=n[i],a=this._titles[i];if(this._tabDetachRequested.emit({index:i,title:a,tab:o,clientX:s,clientY:r,offset:t.tabPressOffset}),t.dragAborted)return}Private$7.layoutTabs(n,t,e,this._orientation)}}_evtPointerUp(e){if(0!==e.button&&1!==e.button)return;const t=this._dragData;if(!t)return;if(e.preventDefault(),e.stopPropagation(),this.document.removeEventListener("pointermove",this,!0),this.document.removeEventListener("pointerup",this,!0),this.document.removeEventListener("keydown",this,!0),this.document.removeEventListener("contextmenu",this,!0),!t.dragActive){if(this._dragData=null,this.addButtonEnabled&&this.addButtonNode.contains(e.target))return void this._addRequested.emit(void 0);let n=this.contentNode.children,i=index_es6.ArrayExt.findFirstIndex(n,t=>ElementExt.hitTest(t,e.clientX,e.clientY));if(i!==t.index)return;let s=this._titles[i];if(!s.closable)return;if(1===e.button)return void this._tabCloseRequested.emit({index:i,title:s});let r=n[i].querySelector(this.renderer.closeIconSelector);return r&&r.contains(e.target)?void this._tabCloseRequested.emit({index:i,title:s}):void 0}if(0!==e.button)return;Private$7.finalizeTabPosition(t,this._orientation),t.tab.classList.remove("lm-mod-dragging");let n=Private$7.parseTransitionDuration(t.tab);setTimeout(()=>{if(t.dragAborted)return;this._dragData=null,Private$7.resetTabPositions(this.contentNode.children,this._orientation),t.override.dispose(),this.removeClass("lm-mod-dragging");let e=t.index,n=t.targetIndex;-1!==n&&e!==n&&(index_es6.ArrayExt.move(this._titles,e,n),this._adjustCurrentForMove(e,n),this._tabMoved.emit({fromIndex:e,toIndex:n,title:this._titles[n]}),MessageLoop.sendMessage(this,Widget.Msg.UpdateRequest))},n)}_releaseMouse(){let e=this._dragData;e&&(this._dragData=null,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&&(Private$7.resetTabPositions(this.contentNode.children,this._orientation),e.override.dispose(),e.tab.classList.remove("lm-mod-dragging"),this.removeClass("lm-mod-dragging")))}_adjustCurrentForInsert(e,t){let n=this.currentTitle,i=this._currentIndex,s=this.insertBehavior;if("select-tab"===s||"select-tab-if-needed"===s&&-1===i)return this._currentIndex=e,this._previousTitle=n,void this._currentChanged.emit({previousIndex:i,previousTitle:n,currentIndex:e,currentTitle:t});i>=e&&this._currentIndex++}_adjustCurrentForMove(e,t){this._currentIndex===e?this._currentIndex=t:this._currentIndex<e&&this._currentIndex>=t?this._currentIndex++:this._currentIndex>e&&this._currentIndex<=t&&this._currentIndex--}_adjustCurrentForRemove(e,t){let n=this._currentIndex,i=this.removeBehavior;if(n===e){if(0===this._titles.length)return this._currentIndex=-1,void this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:-1,currentTitle:null});if("select-tab-after"===i)return this._currentIndex=Math.min(e,this._titles.length-1),void this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:this._currentIndex,currentTitle:this.currentTitle});if("select-tab-before"===i)return this._currentIndex=Math.max(0,e-1),void this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:this._currentIndex,currentTitle:this.currentTitle});if("select-previous-tab"===i)return this._previousTitle?(this._currentIndex=this._titles.indexOf(this._previousTitle),this._previousTitle=null):this._currentIndex=Math.min(e,this._titles.length-1),void this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:this._currentIndex,currentTitle:this.currentTitle});this._currentIndex=-1,this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:-1,currentTitle:null})}else n>e&&this._currentIndex--}_onTitleChanged(e){this.update()}}var Private$7,Private$6,Private$5,Private$4,Private$3,Private$2,Private$1,widgets_dist_index_es6_Private;!function(e){class t{constructor(){this.closeIconSelector=".lm-TabBar-tabCloseIcon",this._tabID=0,this._tabKeys=new WeakMap,this._uuid=++t._nInstance}renderTab(e){let t=e.title.caption,n=this.createTabKey(e),i=n,s=this.createTabStyle(e),r=this.createTabClass(e),o=this.createTabDataset(e),a=this.createTabARIA(e);return e.title.closable?h.li({id:i,key:n,className:r,title:t,style:s,dataset:o,...a},this.renderIcon(e),this.renderLabel(e),this.renderCloseIcon(e)):h.li({id:i,key:n,className:r,title:t,style:s,dataset:o,...a},this.renderIcon(e),this.renderLabel(e))}renderIcon(e){const{title:t}=e;let n=this.createIconClass(e);return h.div({className:n},t.icon,t.iconLabel)}renderLabel(e){return h.div({className:"lm-TabBar-tabLabel"},e.title.label)}renderCloseIcon(e){return h.div({className:"lm-TabBar-tabCloseIcon"})}createTabKey(e){let t=this._tabKeys.get(e.title);return void 0===t&&(t=`tab-key-${this._uuid}-${this._tabID++}`,this._tabKeys.set(e.title,t)),t}createTabStyle(e){return{zIndex:`${e.zIndex}`}}createTabClass(e){let t="lm-TabBar-tab";return e.title.className&&(t+=` ${e.title.className}`),e.title.closable&&(t+=" lm-mod-closable"),e.current&&(t+=" lm-mod-current"),t}createTabDataset(e){return e.title.dataset}createTabARIA(e){var t;return{role:"tab","aria-selected":e.current.toString(),tabindex:`${null!==(t=e.tabIndex)&&void 0!==t?t:"-1"}`}}createIconClass(e){let t="lm-TabBar-tabIcon",n=e.title.iconClass;return n?`${t} ${n}`:t}}t._nInstance=0,e.Renderer=t,e.defaultRenderer=new t,e.addButtonSelector=".lm-TabBar-addButton"}(TabBar||(TabBar={})),function(e){e.DRAG_THRESHOLD=5,e.DETACH_THRESHOLD=20,e.createNode=function(){let e=document.createElement("div"),t=document.createElement("ul");t.setAttribute("role","tablist"),t.className="lm-TabBar-content",e.appendChild(t);let n=document.createElement("div");return n.className="lm-TabBar-addButton lm-mod-hidden",n.setAttribute("tabindex","-1"),n.setAttribute("role","button"),e.appendChild(n),e},e.asTitle=function(e){return e instanceof Title?e:new Title(e)},e.parseTransitionDuration=function(e){let t=window.getComputedStyle(e);return 1e3*(parseFloat(t.transitionDuration)||0)},e.snapTabLayout=function(e,t){let n=new Array(e.length);for(let i=0,s=e.length;i<s;++i){let s=e[i],r=window.getComputedStyle(s);n[i]="horizontal"===t?{pos:s.offsetLeft,size:s.offsetWidth,margin:parseFloat(r.marginLeft)||0}:{pos:s.offsetTop,size:s.offsetHeight,margin:parseFloat(r.marginTop)||0}}return n},e.dragExceeded=function(t,n){let i=Math.abs(n.clientX-t.pressX),s=Math.abs(n.clientY-t.pressY);return i>=e.DRAG_THRESHOLD||s>=e.DRAG_THRESHOLD},e.detachExceeded=function(t,n){let i=t.contentRect;return n.clientX<i.left-e.DETACH_THRESHOLD||n.clientX>=i.right+e.DETACH_THRESHOLD||n.clientY<i.top-e.DETACH_THRESHOLD||n.clientY>=i.bottom+e.DETACH_THRESHOLD},e.layoutTabs=function(e,t,n,i){let s,r,o,a;"horizontal"===i?(s=t.pressX,r=n.clientX-t.contentRect.left,o=n.clientX,a=t.contentRect.width):(s=t.pressY,r=n.clientY-t.contentRect.top,o=n.clientY,a=t.contentRect.height);let l=t.index,c=r-t.tabPressPos,d=c+t.tabSize;for(let n=0,r=e.length;n<r;++n){let r,u=t.tabLayout[n],h=u.pos+(u.size>>1);if(n<t.index&&c<h)r=`${t.tabSize+t.tabLayout[n+1].margin}px`,l=Math.min(l,n);else if(n>t.index&&d>h)r=-t.tabSize-u.margin+"px",l=Math.max(l,n);else if(n===t.index){let e=o-s,n=a-(t.tabPos+t.tabSize);r=`${Math.max(-t.tabPos,Math.min(e,n))}px`}else r="";"horizontal"===i?e[n].style.left=r:e[n].style.top=r}t.targetIndex=l},e.finalizeTabPosition=function(e,t){let n,i;if(n="horizontal"===t?e.contentRect.width:e.contentRect.height,e.targetIndex===e.index)i=0;else if(e.targetIndex>e.index){let t=e.tabLayout[e.targetIndex];i=t.pos+t.size-e.tabSize-e.tabPos}else i=e.tabLayout[e.targetIndex].pos-e.tabPos;let s=n-(e.tabPos+e.tabSize),r=Math.max(-e.tabPos,Math.min(i,s));"horizontal"===t?e.tab.style.left=`${r}px`:e.tab.style.top=`${r}px`},e.resetTabPositions=function(e,t){for(const n of e)"horizontal"===t?n.style.left="":n.style.top=""}}(Private$7||(Private$7={}));class DockLayout extends Layout{constructor(e){super(),this._spacing=4,this._dirty=!1,this._root=null,this._box=null,this._items=new Map,this.renderer=e.renderer,void 0!==e.spacing&&(this._spacing=Utils$1.clampDimension(e.spacing)),this._document=e.document||document,this._hiddenMode=void 0!==e.hiddenMode?e.hiddenMode:Widget.HiddenMode.Display}dispose(){let e=this[Symbol.iterator]();this._items.forEach(e=>{e.dispose()}),this._box=null,this._root=null,this._items.clear();for(const t of e)t.dispose();super.dispose()}get hiddenMode(){return this._hiddenMode}set hiddenMode(e){if(this._hiddenMode!==e){this._hiddenMode=e;for(const e of this.tabBars())if(e.titles.length>1)for(const t of e.titles)t.owner.hiddenMode=this._hiddenMode}}get spacing(){return this._spacing}set spacing(e){e=Utils$1.clampDimension(e),this._spacing!==e&&(this._spacing=e,this.parent&&this.parent.fit())}get isEmpty(){return null===this._root}[Symbol.iterator](){return this._root?this._root.iterAllWidgets():(0,index_es6.empty)()}widgets(){return this._root?this._root.iterUserWidgets():(0,index_es6.empty)()}selectedWidgets(){return this._root?this._root.iterSelectedWidgets():(0,index_es6.empty)()}tabBars(){return this._root?this._root.iterTabBars():(0,index_es6.empty)()}handles(){return this._root?this._root.iterHandles():(0,index_es6.empty)()}moveHandle(e,t,n){let i=e.classList.contains("lm-mod-hidden");if(!this._root||i)return;let s,r=this._root.findSplitNode(e);r&&(s="horizontal"===r.node.orientation?t-e.offsetLeft:n-e.offsetTop,0!==s&&(r.node.holdSizes(),BoxEngine.adjust(r.node.sizers,r.index,s),this.parent&&this.parent.update()))}saveLayout(){return this._root?(this._root.holdAllSizes(),{main:this._root.createConfig()}):{main:null}}restoreLayout(e){let t,n=new Set;t=e.main?Private$6.normalizeAreaConfig(e.main,n):null;let i=this.widgets(),s=this.tabBars(),r=this.handles();this._root=null;for(const e of i)n.has(e)||(e.parent=null);for(const e of s)e.dispose();for(const e of r)e.parentNode&&e.parentNode.removeChild(e);for(const e of n)e.parent=this.parent;this._root=t?Private$6.realizeAreaConfig(t,{createTabBar:e=>this._createTabBar(),createHandle:()=>this._createHandle()},this._document):null,this.parent&&(n.forEach(e=>{this.attachWidget(e)}),this.parent.fit())}addWidget(e,t={}){let n=t.ref||null,i=t.mode||"tab-after",s=null;if(this._root&&n&&(s=this._root.findTabNode(n)),n&&!s)throw new Error("Reference widget is not in the layout.");switch(e.parent=this.parent,i){case"tab-after":this._insertTab(e,n,s,!0);break;case"tab-before":this._insertTab(e,n,s,!1);break;case"split-top":this._insertSplit(e,n,s,"vertical",!1);break;case"split-left":this._insertSplit(e,n,s,"horizontal",!1);break;case"split-right":this._insertSplit(e,n,s,"horizontal",!0);break;case"split-bottom":this._insertSplit(e,n,s,"vertical",!0);break;case"merge-top":this._insertSplit(e,n,s,"vertical",!1,!0);break;case"merge-left":this._insertSplit(e,n,s,"horizontal",!1,!0);break;case"merge-right":this._insertSplit(e,n,s,"horizontal",!0,!0);break;case"merge-bottom":this._insertSplit(e,n,s,"vertical",!0,!0)}this.parent&&(this.attachWidget(e),this.parent.fit())}removeWidget(e){this._removeWidget(e),this.parent&&(this.detachWidget(e),this.parent.fit())}hitTestTabAreas(e,t){if(!this._root||!this.parent||!this.parent.isVisible)return null;this._box||(this._box=ElementExt.boxSizing(this.parent.node));let n=this.parent.node.getBoundingClientRect(),i=e-n.left-this._box.borderLeft,s=t-n.top-this._box.borderTop,r=this._root.hitTestTabNodes(i,s);if(!r)return null;let{tabBar:o,top:a,left:l,width:c,height:d}=r,u=this._box.borderLeft+this._box.borderRight,h=this._box.borderTop+this._box.borderBottom;return{tabBar:o,x:i,y:s,top:a,left:l,right:n.width-u-(l+c),bottom:n.height-h-(a+d),width:c,height:d}}init(){super.init();for(const e of this)this.attachWidget(e);for(const e of this.handles())this.parent.node.appendChild(e);this.parent.fit()}attachWidget(e){this.parent.node!==e.node.parentNode&&(this._items.set(e,new LayoutItem(e)),this.parent.isAttached&&MessageLoop.sendMessage(e,Widget.Msg.BeforeAttach),this.parent.node.appendChild(e.node),this.parent.isAttached&&MessageLoop.sendMessage(e,Widget.Msg.AfterAttach))}detachWidget(e){if(this.parent.node!==e.node.parentNode)return;this.parent.isAttached&&MessageLoop.sendMessage(e,Widget.Msg.BeforeDetach),this.parent.node.removeChild(e.node),this.parent.isAttached&&MessageLoop.sendMessage(e,Widget.Msg.AfterDetach);let t=this._items.get(e);t&&(this._items.delete(e),t.dispose())}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}_removeWidget(e){if(!this._root)return;let t=this._root.findTabNode(e);if(!t)return;if(Private$6.removeAria(e),t.tabBar.titles.length>1)return t.tabBar.removeTab(e.title),void(this._hiddenMode===Widget.HiddenMode.Scale&&1==t.tabBar.titles.length&&(t.tabBar.titles[0].owner.hiddenMode=Widget.HiddenMode.Display));if(t.tabBar.dispose(),this._root===t)return void(this._root=null);this._root.holdAllSizes();let n=t.parent;t.parent=null;let i=index_es6.ArrayExt.removeFirstOf(n.children,t),s=index_es6.ArrayExt.removeAt(n.handles,i);if(index_es6.ArrayExt.removeAt(n.sizers,i),s.parentNode&&s.parentNode.removeChild(s),n.children.length>1)return void n.syncHandles();let r=n.parent;n.parent=null;let o=n.children[0],a=n.handles[0];if(n.children.length=0,n.handles.length=0,n.sizers.length=0,a.parentNode&&a.parentNode.removeChild(a),this._root===n)return o.parent=null,void(this._root=o);let l=r,c=l.children.indexOf(n);if(o instanceof Private$6.TabLayoutNode)return o.parent=l,void(l.children[c]=o);let d=index_es6.ArrayExt.removeAt(l.handles,c);index_es6.ArrayExt.removeAt(l.children,c),index_es6.ArrayExt.removeAt(l.sizers,c),d.parentNode&&d.parentNode.removeChild(d);for(let e=0,t=o.children.length;e<t;++e){let t=o.children[e],n=o.handles[e],i=o.sizers[e];index_es6.ArrayExt.insert(l.children,c+e,t),index_es6.ArrayExt.insert(l.handles,c+e,n),index_es6.ArrayExt.insert(l.sizers,c+e,i),t.parent=l}o.children.length=0,o.handles.length=0,o.sizers.length=0,o.parent=null,l.syncHandles()}_createTabNode(e){let t=new Private$6.TabLayoutNode(this._createTabBar());return t.tabBar.addTab(e.title),Private$6.addAria(e,t.tabBar),t}_insertTab(e,t,n,i){if(e===t)return;if(!this._root){let t=new Private$6.TabLayoutNode(this._createTabBar());return t.tabBar.addTab(e.title),this._root=t,void Private$6.addAria(e,t.tabBar)}let s;n||(n=this._root.findFirstTabNode()),-1===n.tabBar.titles.indexOf(e.title)&&(this._removeWidget(e),e.hide()),s=t?n.tabBar.titles.indexOf(t.title):n.tabBar.currentIndex,this._hiddenMode===Widget.HiddenMode.Scale?0===n.tabBar.titles.length?e.hiddenMode=Widget.HiddenMode.Display:1==n.tabBar.titles.length?n.tabBar.titles[0].owner.hiddenMode=Widget.HiddenMode.Scale:e.hiddenMode=Widget.HiddenMode.Scale:e.hiddenMode=this._hiddenMode,n.tabBar.insertTab(s+(i?1:0),e.title),Private$6.addAria(e,n.tabBar)}_insertSplit(e,t,n,i,s,r=!1){if(e===t&&n&&1===n.tabBar.titles.length)return;if(this._removeWidget(e),!this._root)return void(this._root=this._createTabNode(e));if(!n||!n.parent){let t=this._splitRoot(i),r=s?t.children.length:0;t.normalizeSizes();let o=Private$6.createSizer(n?1:Private$6.GOLDEN_RATIO),a=this._createTabNode(e);return index_es6.ArrayExt.insert(t.children,r,a),index_es6.ArrayExt.insert(t.sizers,r,o),index_es6.ArrayExt.insert(t.handles,r,this._createHandle()),a.parent=t,t.normalizeSizes(),void t.syncHandles()}let o=n.parent;if(o.orientation===i){let t=o.children.indexOf(n);if(r){let n=t+(s?1:-1),i=o.children[n];if(i instanceof Private$6.TabLayoutNode)return this._insertTab(e,null,i,!0),void++i.tabBar.currentIndex}o.normalizeSizes();let i=o.sizers[t].sizeHint/=2,a=t+(s?1:0),l=this._createTabNode(e);return index_es6.ArrayExt.insert(o.children,a,l),index_es6.ArrayExt.insert(o.sizers,a,Private$6.createSizer(i)),index_es6.ArrayExt.insert(o.handles,a,this._createHandle()),l.parent=o,void o.syncHandles()}let a=index_es6.ArrayExt.removeFirstOf(o.children,n),l=new Private$6.SplitLayoutNode(i);l.normalized=!0,l.children.push(n),l.sizers.push(Private$6.createSizer(.5)),l.handles.push(this._createHandle()),n.parent=l;let c=s?1:0,d=this._createTabNode(e);index_es6.ArrayExt.insert(l.children,c,d),index_es6.ArrayExt.insert(l.sizers,c,Private$6.createSizer(.5)),index_es6.ArrayExt.insert(l.handles,c,this._createHandle()),d.parent=l,l.syncHandles(),index_es6.ArrayExt.insert(o.children,a,l),l.parent=o}_splitRoot(e){let t=this._root;if(t instanceof Private$6.SplitLayoutNode&&t.orientation===e)return t;let n=this._root=new Private$6.SplitLayoutNode(e);return t&&(n.children.push(t),n.sizers.push(Private$6.createSizer(0)),n.handles.push(this._createHandle()),t.parent=n),n}_fit(){let e=0,t=0;if(this._root){let n=this._root.fit(this._spacing,this._items);e=n.minWidth,t=n.minHeight}let n=this._box=ElementExt.boxSizing(this.parent.node);e+=n.horizontalSum,t+=n.verticalSum;let i=this.parent.node.style;i.minWidth=`${e}px`,i.minHeight=`${t}px`,this._dirty=!0,this.parent.parent&&MessageLoop.sendMessage(this.parent.parent,Widget.Msg.FitRequest),this._dirty&&MessageLoop.sendMessage(this.parent,Widget.Msg.UpdateRequest)}_update(e,t){if(this._dirty=!1,!this._root)return;e<0&&(e=this.parent.node.offsetWidth),t<0&&(t=this.parent.node.offsetHeight),this._box||(this._box=ElementExt.boxSizing(this.parent.node));let n=this._box.paddingTop,i=this._box.paddingLeft,s=e-this._box.horizontalSum,r=t-this._box.verticalSum;this._root.update(n,i,s,r,this._spacing,this._items)}_createTabBar(){let e=this.renderer.createTabBar(this._document);return e.orientation="horizontal",this.parent&&this.attachWidget(e),e}_createHandle(){let e=this.renderer.createHandle(),t=e.style;return t.position="absolute",t.contain="strict",t.top="0",t.left="0",t.width="0",t.height="0",this.parent&&this.parent.node.appendChild(e),e}}!function(e){function t(e){let t=new BoxSizer;return t.sizeHint=e,t.size=e,t}e.GOLDEN_RATIO=.618,e.createSizer=t,e.normalizeAreaConfig=function e(t,n){let i;return i="tab-area"===t.type?function(e,t){if(0===e.widgets.length)return null;let n=[];for(const i of e.widgets)t.has(i)||(t.add(i),n.push(i));if(0===n.length)return null;let i=e.currentIndex;return-1!==i&&(i<0||i>=n.length)&&(i=0),{type:"tab-area",widgets:n,currentIndex:i}}(t,n):function(t,n){let i=t.orientation,s=[],r=[];for(let o=0,a=t.children.length;o<a;++o){let a=e(t.children[o],n);a&&("tab-area"===a.type||a.orientation!==i?(s.push(a),r.push(Math.abs(t.sizes[o]||0))):(s.push(...a.children),r.push(...a.sizes)))}return 0===s.length?null:1===s.length?s[0]:{type:"split-area",orientation:i,children:s,sizes:r}}(t,n),i},e.realizeAreaConfig=function s(r,o,a){let l;return l="tab-area"===r.type?function(t,i,s){let r=i.createTabBar(s);for(const n of t.widgets)n.hide(),r.addTab(n.title),e.addAria(n,r);return r.currentIndex=t.currentIndex,new n(r)}(r,o,a):function(e,n,r){let o=new i(e.orientation);return e.children.forEach((i,a)=>{let l=s(i,n,r),c=t(e.sizes[a]),d=n.createHandle();o.children.push(l),o.handles.push(d),o.sizers.push(c),l.parent=o}),o.syncHandles(),o.normalizeSizes(),o}(r,o,a),l};class n{constructor(e){this.parent=null,this._top=0,this._left=0,this._width=0,this._height=0;let t=new BoxSizer,n=new BoxSizer;t.stretch=0,n.stretch=1,this.tabBar=e,this.sizers=[t,n]}get top(){return this._top}get left(){return this._left}get width(){return this._width}get height(){return this._height}*iterAllWidgets(){yield this.tabBar,yield*this.iterUserWidgets()}*iterUserWidgets(){for(const e of this.tabBar.titles)yield e.owner}*iterSelectedWidgets(){let e=this.tabBar.currentTitle;e&&(yield e.owner)}*iterTabBars(){yield this.tabBar}*iterHandles(){}findTabNode(e){return-1!==this.tabBar.titles.indexOf(e.title)?this:null}findSplitNode(e){return null}findFirstTabNode(){return this}hitTestTabNodes(e,t){return e<this._left||e>=this._left+this._width||t<this._top||t>=this._top+this._height?null:this}createConfig(){return{type:"tab-area",widgets:this.tabBar.titles.map(e=>e.owner),currentIndex:this.tabBar.currentIndex}}holdAllSizes(){}fit(e,t){let n=0,i=0,s=t.get(this.tabBar),r=this.tabBar.currentTitle,o=r?t.get(r.owner):void 0,[a,l]=this.sizers;return s&&s.fit(),o&&o.fit(),s&&!s.isHidden?(n=Math.max(n,s.minWidth),i+=s.minHeight,a.minSize=s.minHeight,a.maxSize=s.maxHeight):(a.minSize=0,a.maxSize=0),o&&!o.isHidden?(n=Math.max(n,o.minWidth),i+=o.minHeight,l.minSize=o.minHeight,l.maxSize=1/0):(l.minSize=0,l.maxSize=1/0),{minWidth:n,minHeight:i,maxWidth:1/0,maxHeight:1/0}}update(e,t,n,i,s,r){this._top=t,this._left=e,this._width=n,this._height=i;let o=r.get(this.tabBar),a=this.tabBar.currentTitle,l=a?r.get(a.owner):void 0;if(BoxEngine.calc(this.sizers,i),o&&!o.isHidden){let i=this.sizers[0].size;o.update(e,t,n,i),t+=i}if(l&&!l.isHidden){let i=this.sizers[1].size;l.update(e,t,n,i)}}}e.TabLayoutNode=n;class i{constructor(e){this.parent=null,this.normalized=!1,this.children=[],this.sizers=[],this.handles=[],this.orientation=e}*iterAllWidgets(){for(const e of this.children)yield*e.iterAllWidgets()}*iterUserWidgets(){for(const e of this.children)yield*e.iterUserWidgets()}*iterSelectedWidgets(){for(const e of this.children)yield*e.iterSelectedWidgets()}*iterTabBars(){for(const e of this.children)yield*e.iterTabBars()}*iterHandles(){yield*this.handles;for(const e of this.children)yield*e.iterHandles()}findTabNode(e){for(let t=0,n=this.children.length;t<n;++t){let n=this.children[t].findTabNode(e);if(n)return n}return null}findSplitNode(e){let t=this.handles.indexOf(e);if(-1!==t)return{index:t,node:this};for(let t=0,n=this.children.length;t<n;++t){let n=this.children[t].findSplitNode(e);if(n)return n}return null}findFirstTabNode(){return 0===this.children.length?null:this.children[0].findFirstTabNode()}hitTestTabNodes(e,t){for(let n=0,i=this.children.length;n<i;++n){let i=this.children[n].hitTestTabNodes(e,t);if(i)return i}return null}createConfig(){let e=this.orientation,t=this.createNormalizedSizes();return{type:"split-area",orientation:e,children:this.children.map(e=>e.createConfig()),sizes:t}}syncHandles(){this.handles.forEach((e,t)=>{e.setAttribute("data-orientation",this.orientation),t===this.handles.length-1?e.classList.add("lm-mod-hidden"):e.classList.remove("lm-mod-hidden")})}holdSizes(){for(const e of this.sizers)e.sizeHint=e.size}holdAllSizes(){for(const e of this.children)e.holdAllSizes();this.holdSizes()}normalizeSizes(){let e=this.sizers.length;if(0===e)return;this.holdSizes();let t=this.sizers.reduce((e,t)=>e+t.sizeHint,0);if(0===t)for(const t of this.sizers)t.size=t.sizeHint=1/e;else for(const e of this.sizers)e.size=e.sizeHint/=t;this.normalized=!0}createNormalizedSizes(){let e=this.sizers.length;if(0===e)return[];let t=this.sizers.map(e=>e.size),n=t.reduce((e,t)=>e+t,0);if(0===n)for(let n=t.length-1;n>-1;n--)t[n]=1/e;else for(let e=t.length-1;e>-1;e--)t[e]/=n;return t}fit(e,t){let n="horizontal"===this.orientation,i=Math.max(0,this.children.length-1)*e,s=n?i:0,r=n?0:i;for(let i=0,o=this.children.length;i<o;++i){let o=this.children[i].fit(e,t);n?(r=Math.max(r,o.minHeight),s+=o.minWidth,this.sizers[i].minSize=o.minWidth):(s=Math.max(s,o.minWidth),r+=o.minHeight,this.sizers[i].minSize=o.minHeight)}return{minWidth:s,minHeight:r,maxWidth:1/0,maxHeight:1/0}}update(e,t,n,i,s,r){let o="horizontal"===this.orientation,a=Math.max(0,this.children.length-1)*s,l=Math.max(0,(o?n:i)-a);if(this.normalized){for(const e of this.sizers)e.sizeHint*=l;this.normalized=!1}BoxEngine.calc(this.sizers,l);for(let a=0,l=this.children.length;a<l;++a){let l=this.children[a],c=this.sizers[a].size,d=this.handles[a].style;o?(l.update(e,t,c,i,s,r),e+=c,d.top=`${t}px`,d.left=`${e}px`,d.width=`${s}px`,d.height=`${i}px`,e+=s):(l.update(e,t,n,c,s,r),t+=c,d.top=`${t}px`,d.left=`${e}px`,d.width=`${n}px`,d.height=`${s}px`,t+=s)}}}e.SplitLayoutNode=i,e.addAria=function(e,t){e.node.setAttribute("role","tabpanel");let n=t.renderer;if(n instanceof TabBar.Renderer){let t=n.createTabKey({title:e.title,current:!1,zIndex:0});e.node.setAttribute("aria-labelledby",t)}},e.removeAria=function(e){e.node.removeAttribute("role"),e.node.removeAttribute("aria-labelledby")}}(Private$6||(Private$6={}));class DockPanel extends Widget{constructor(e={}){super(),this._drag=null,this._tabsMovable=!0,this._tabsConstrained=!1,this._addButtonEnabled=!1,this._pressData=null,this._layoutModified=new signaling_dist_index_es6.Signal(this),this._addRequested=new signaling_dist_index_es6.Signal(this),this.addClass("lm-DockPanel"),this._document=e.document||document,this._mode=e.mode||"multiple-document",this._renderer=e.renderer||DockPanel.defaultRenderer,this._edges=e.edges||Private$5.DEFAULT_EDGES,void 0!==e.tabsMovable&&(this._tabsMovable=e.tabsMovable),void 0!==e.tabsConstrained&&(this._tabsConstrained=e.tabsConstrained),void 0!==e.addButtonEnabled&&(this._addButtonEnabled=e.addButtonEnabled),this.dataset.mode=this._mode;let t={createTabBar:()=>this._createTabBar(),createHandle:()=>this._createHandle()};this.layout=new DockLayout({document:this._document,renderer:t,spacing:e.spacing,hiddenMode:e.hiddenMode}),this.overlay=e.overlay||new DockPanel.Overlay,this.node.appendChild(this.overlay.node)}dispose(){this._releaseMouse(),this.overlay.hide(0),this._drag&&this._drag.dispose(),super.dispose()}get hiddenMode(){return this.layout.hiddenMode}set hiddenMode(e){this.layout.hiddenMode=e}get layoutModified(){return this._layoutModified}get addRequested(){return this._addRequested}get renderer(){return this.layout.renderer}get spacing(){return this.layout.spacing}set spacing(e){this.layout.spacing=e}get mode(){return this._mode}set mode(e){if(this._mode===e)return;this._mode=e,this.dataset.mode=e;let t=this.layout;switch(e){case"multiple-document":for(const e of t.tabBars())e.show();break;case"single-document":t.restoreLayout(Private$5.createSingleDocumentConfig(this));break;default:throw"unreachable"}MessageLoop.postMessage(this,Private$5.LayoutModified)}get tabsMovable(){return this._tabsMovable}set tabsMovable(e){this._tabsMovable=e;for(const t of this.tabBars())t.tabsMovable=e}get tabsConstrained(){return this._tabsConstrained}set tabsConstrained(e){this._tabsConstrained=e}get addButtonEnabled(){return this._addButtonEnabled}set addButtonEnabled(e){this._addButtonEnabled=e;for(const t of this.tabBars())t.addButtonEnabled=e}get isEmpty(){return this.layout.isEmpty}*widgets(){yield*this.layout.widgets()}*selectedWidgets(){yield*this.layout.selectedWidgets()}*tabBars(){yield*this.layout.tabBars()}*handles(){yield*this.layout.handles()}selectWidget(e){let t=(0,index_es6.find)(this.tabBars(),t=>-1!==t.titles.indexOf(e.title));if(!t)throw new Error("Widget is not contained in the dock panel.");t.currentTitle=e.title}activateWidget(e){this.selectWidget(e),e.activate()}saveLayout(){return this.layout.saveLayout()}restoreLayout(e){this._mode="multiple-document",this.layout.restoreLayout(e),(Platform.IS_EDGE||Platform.IS_IE)&&MessageLoop.flush(),MessageLoop.postMessage(this,Private$5.LayoutModified)}addWidget(e,t={}){"single-document"===this._mode?this.layout.addWidget(e):this.layout.addWidget(e,t),MessageLoop.postMessage(this,Private$5.LayoutModified)}processMessage(e){"layout-modified"===e.type?this._layoutModified.emit(void 0):super.processMessage(e)}handleEvent(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"pointerdown":this._evtPointerDown(e);break;case"pointermove":this._evtPointerMove(e);break;case"pointerup":this._evtPointerUp(e);break;case"keydown":this._evtKeyDown(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}}onBeforeAttach(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("pointerdown",this)}onAfterDetach(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("pointerdown",this),this._releaseMouse()}onChildAdded(e){Private$5.isGeneratedTabBarProperty.get(e.child)||e.child.addClass("lm-DockPanel-widget")}onChildRemoved(e){Private$5.isGeneratedTabBarProperty.get(e.child)||(e.child.removeClass("lm-DockPanel-widget"),MessageLoop.postMessage(this,Private$5.LayoutModified))}_evtDragEnter(e){e.mimeData.hasData("application/vnd.lumino.widget-factory")&&(e.preventDefault(),e.stopPropagation())}_evtDragLeave(e){e.preventDefault(),this._tabsConstrained&&e.source!==this||(e.stopPropagation(),this.overlay.hide(1))}_evtDragOver(e){e.preventDefault(),this._tabsConstrained&&e.source!==this||"invalid"===this._showOverlay(e.clientX,e.clientY)?e.dropAction="none":(e.stopPropagation(),e.dropAction=e.proposedAction)}_evtDrop(e){if(e.preventDefault(),this.overlay.hide(0),"none"===e.proposedAction)return void(e.dropAction="none");let{clientX:t,clientY:n}=e,{zone:i,target:s}=Private$5.findDropTarget(this,t,n,this._edges);if(this._tabsConstrained&&e.source!==this||"invalid"===i)return void(e.dropAction="none");let r=e.mimeData.getData("application/vnd.lumino.widget-factory");if("function"!=typeof r)return void(e.dropAction="none");let o=r();if(!(o instanceof Widget))return void(e.dropAction="none");if(o.contains(this))return void(e.dropAction="none");let a=s?Private$5.getDropRef(s.tabBar):null;switch(i){case"root-all":this.addWidget(o);break;case"root-top":this.addWidget(o,{mode:"split-top"});break;case"root-left":this.addWidget(o,{mode:"split-left"});break;case"root-right":this.addWidget(o,{mode:"split-right"});break;case"root-bottom":this.addWidget(o,{mode:"split-bottom"});break;case"widget-all":case"widget-tab":this.addWidget(o,{mode:"tab-after",ref:a});break;case"widget-top":this.addWidget(o,{mode:"split-top",ref:a});break;case"widget-left":this.addWidget(o,{mode:"split-left",ref:a});break;case"widget-right":this.addWidget(o,{mode:"split-right",ref:a});break;case"widget-bottom":this.addWidget(o,{mode:"split-bottom",ref:a});break;default:throw"unreachable"}e.dropAction=e.proposedAction,e.stopPropagation(),this.activateWidget(o)}_evtKeyDown(e){e.preventDefault(),e.stopPropagation(),27===e.keyCode&&(this._releaseMouse(),MessageLoop.postMessage(this,Private$5.LayoutModified))}_evtPointerDown(e){if(0!==e.button)return;let t=this.layout,n=e.target,i=(0,index_es6.find)(t.handles(),e=>e.contains(n));if(!i)return;e.preventDefault(),e.stopPropagation(),this._document.addEventListener("keydown",this,!0),this._document.addEventListener("pointerup",this,!0),this._document.addEventListener("pointermove",this,!0),this._document.addEventListener("contextmenu",this,!0);let s=i.getBoundingClientRect(),r=e.clientX-s.left,o=e.clientY-s.top,a=window.getComputedStyle(i),l=Drag.overrideCursor(a.cursor,this._document);this._pressData={handle:i,deltaX:r,deltaY:o,override:l}}_evtPointerMove(e){if(!this._pressData)return;e.preventDefault(),e.stopPropagation();let t=this.node.getBoundingClientRect(),n=e.clientX-t.left-this._pressData.deltaX,i=e.clientY-t.top-this._pressData.deltaY;this.layout.moveHandle(this._pressData.handle,n,i)}_evtPointerUp(e){0===e.button&&(e.preventDefault(),e.stopPropagation(),this._releaseMouse(),MessageLoop.postMessage(this,Private$5.LayoutModified))}_releaseMouse(){this._pressData&&(this._pressData.override.dispose(),this._pressData=null,this._document.removeEventListener("keydown",this,!0),this._document.removeEventListener("pointerup",this,!0),this._document.removeEventListener("pointermove",this,!0),this._document.removeEventListener("contextmenu",this,!0))}_showOverlay(e,t){let n,i,s,r,{zone:o,target:a}=Private$5.findDropTarget(this,e,t,this._edges);if("invalid"===o)return this.overlay.hide(100),o;let l=ElementExt.boxSizing(this.node),c=this.node.getBoundingClientRect();switch(o){case"root-all":n=l.paddingTop,i=l.paddingLeft,s=l.paddingRight,r=l.paddingBottom;break;case"root-top":n=l.paddingTop,i=l.paddingLeft,s=l.paddingRight,r=c.height*Private$5.GOLDEN_RATIO;break;case"root-left":n=l.paddingTop,i=l.paddingLeft,s=c.width*Private$5.GOLDEN_RATIO,r=l.paddingBottom;break;case"root-right":n=l.paddingTop,i=c.width*Private$5.GOLDEN_RATIO,s=l.paddingRight,r=l.paddingBottom;break;case"root-bottom":n=c.height*Private$5.GOLDEN_RATIO,i=l.paddingLeft,s=l.paddingRight,r=l.paddingBottom;break;case"widget-all":n=a.top,i=a.left,s=a.right,r=a.bottom;break;case"widget-top":n=a.top,i=a.left,s=a.right,r=a.bottom+a.height/2;break;case"widget-left":n=a.top,i=a.left,s=a.right+a.width/2,r=a.bottom;break;case"widget-right":n=a.top,i=a.left+a.width/2,s=a.right,r=a.bottom;break;case"widget-bottom":n=a.top+a.height/2,i=a.left,s=a.right,r=a.bottom;break;case"widget-tab":{const e=a.tabBar.node.getBoundingClientRect().height;n=a.top,i=a.left,s=a.right,r=a.bottom+a.height-e;break}default:throw"unreachable"}return this.overlay.show({top:n,left:i,right:s,bottom:r}),o}_createTabBar(){let e=this._renderer.createTabBar(this._document);return Private$5.isGeneratedTabBarProperty.set(e,!0),"single-document"===this._mode&&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}_createHandle(){return this._renderer.createHandle()}_onTabMoved(){MessageLoop.postMessage(this,Private$5.LayoutModified)}_onCurrentChanged(e,t){let{previousTitle:n,currentTitle:i}=t;n&&n.owner.hide(),i&&i.owner.show(),(Platform.IS_EDGE||Platform.IS_IE)&&MessageLoop.flush(),MessageLoop.postMessage(this,Private$5.LayoutModified)}_onTabAddRequested(e){this._addRequested.emit(e)}_onTabActivateRequested(e,t){t.title.owner.activate()}_onTabCloseRequested(e,t){t.title.owner.close()}_onTabDetachRequested(e,t){if(this._drag)return;e.releaseMouse();let{title:n,tab:i,clientX:s,clientY:r,offset:o}=t,a=new dist.MimeData;a.setData("application/vnd.lumino.widget-factory",()=>n.owner);let l=i.cloneNode(!0);o&&(l.style.top=`-${o.y}px`,l.style.left=`-${o.x}px`),this._drag=new Drag({document:this._document,mimeData:a,dragImage:l,proposedAction:"move",supportedActions:"move",source:this}),i.classList.add("lm-mod-hidden"),this._drag.start(s,r).then(()=>{this._drag=null,i.classList.remove("lm-mod-hidden")})}}!function(e){e.Overlay=class{constructor(){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.style.position="absolute",this.node.style.contain="strict"}show(e){let t=this.node.style;t.top=`${e.top}px`,t.left=`${e.left}px`,t.right=`${e.right}px`,t.bottom=`${e.bottom}px`,clearTimeout(this._timer),this._timer=-1,this._hidden&&(this._hidden=!1,this.node.classList.remove("lm-mod-hidden"))}hide(e){if(!this._hidden)return e<=0?(clearTimeout(this._timer),this._timer=-1,this._hidden=!0,void this.node.classList.add("lm-mod-hidden")):void(-1===this._timer&&(this._timer=window.setTimeout(()=>{this._timer=-1,this._hidden=!0,this.node.classList.add("lm-mod-hidden")},e)))}};class t{createTabBar(e){let t=new TabBar({document:e});return t.addClass("lm-DockPanel-tabBar"),t}createHandle(){let e=document.createElement("div");return e.className="lm-DockPanel-handle",e}}e.Renderer=t,e.defaultRenderer=new t}(DockPanel||(DockPanel={})),function(e){e.GOLDEN_RATIO=.618,e.DEFAULT_EDGES={top:12,right:40,bottom:40,left:40},e.LayoutModified=new ConflatableMessage("layout-modified"),e.isGeneratedTabBarProperty=new dist_index_es6.AttachedProperty({name:"isGeneratedTabBar",create:()=>!1}),e.createSingleDocumentConfig=function(e){if(e.isEmpty)return{main:null};let t=Array.from(e.widgets()),n=e.selectedWidgets().next().value,i=n?t.indexOf(n):-1;return{main:{type:"tab-area",widgets:t,currentIndex:i}}},e.findDropTarget=function(e,t,n,i){if(!ElementExt.hitTest(e.node,t,n))return{zone:"invalid",target:null};let s=e.layout;if(s.isEmpty)return{zone:"root-all",target:null};if("multiple-document"===e.mode){let s=e.node.getBoundingClientRect(),r=t-s.left+1,o=n-s.top+1,a=s.right-t,l=s.bottom-n;switch(Math.min(o,a,l,r)){case o:if(o<i.top)return{zone:"root-top",target:null};break;case a:if(a<i.right)return{zone:"root-right",target:null};break;case l:if(l<i.bottom)return{zone:"root-bottom",target:null};break;case r:if(r<i.left)return{zone:"root-left",target:null};break;default:throw"unreachable"}}let r=s.hitTestTabAreas(t,n);if(!r)return{zone:"invalid",target:null};if("single-document"===e.mode)return{zone:"widget-all",target:r};let o=r.x-r.left+1,a=r.y-r.top+1,l=r.left+r.width-r.x,c=r.top+r.height-r.y;if(a<r.tabBar.node.getBoundingClientRect().height)return{zone:"widget-tab",target:r};let d,u=Math.round(r.width/3),h=Math.round(r.height/3);if(o>u&&l>u&&a>h&&c>h)return{zone:"widget-all",target:r};switch(o/=u,a/=h,l/=u,c/=h,Math.min(o,a,l,c)){case o:d="widget-left";break;case a:d="widget-top";break;case l:d="widget-right";break;case c:d="widget-bottom";break;default:throw"unreachable"}return{zone:d,target:r}},e.getDropRef=function(e){return 0===e.titles.length?null:e.currentTitle?e.currentTitle.owner:e.titles[e.titles.length-1].owner}}(Private$5||(Private$5={}));class FocusTracker{constructor(){this._counter=0,this._widgets=[],this._activeWidget=null,this._currentWidget=null,this._numbers=new Map,this._nodes=new Map,this._activeChanged=new signaling_dist_index_es6.Signal(this),this._currentChanged=new signaling_dist_index_es6.Signal(this)}dispose(){if(!(this._counter<0)){this._counter=-1,signaling_dist_index_es6.Signal.clearData(this);for(const e of this._widgets)e.node.removeEventListener("focus",this,!0),e.node.removeEventListener("blur",this,!0);this._activeWidget=null,this._currentWidget=null,this._nodes.clear(),this._numbers.clear(),this._widgets.length=0}}get currentChanged(){return this._currentChanged}get activeChanged(){return this._activeChanged}get isDisposed(){return this._counter<0}get currentWidget(){return this._currentWidget}get activeWidget(){return this._activeWidget}get widgets(){return this._widgets}focusNumber(e){let t=this._numbers.get(e);return void 0===t?-1:t}has(e){return this._numbers.has(e)}add(e){if(this._numbers.has(e))return;let t=e.node.contains(document.activeElement),n=t?this._counter++:-1;this._widgets.push(e),this._numbers.set(e,n),this._nodes.set(e.node,e),e.node.addEventListener("focus",this,!0),e.node.addEventListener("blur",this,!0),e.disposed.connect(this._onWidgetDisposed,this),t&&this._setWidgets(e,e)}remove(e){if(!this._numbers.has(e))return;if(e.disposed.disconnect(this._onWidgetDisposed,this),e.node.removeEventListener("focus",this,!0),e.node.removeEventListener("blur",this,!0),index_es6.ArrayExt.removeFirstOf(this._widgets,e),this._nodes.delete(e.node),this._numbers.delete(e),this._currentWidget!==e)return;let t=this._widgets.filter(e=>-1!==this._numbers.get(e)),n=(0,index_es6.max)(t,(e,t)=>this._numbers.get(e)-this._numbers.get(t))||null;this._setWidgets(n,null)}handleEvent(e){switch(e.type){case"focus":this._evtFocus(e);break;case"blur":this._evtBlur(e)}}_setWidgets(e,t){let n=this._currentWidget;this._currentWidget=e;let i=this._activeWidget;this._activeWidget=t,n!==e&&this._currentChanged.emit({oldValue:n,newValue:e}),i!==t&&this._activeChanged.emit({oldValue:i,newValue:t})}_evtFocus(e){let t=this._nodes.get(e.currentTarget);t!==this._currentWidget&&this._numbers.set(t,this._counter++),this._setWidgets(t,t)}_evtBlur(e){let t=this._nodes.get(e.currentTarget),n=e.relatedTarget;n&&(t.node.contains(n)||(0,index_es6.find)(this._widgets,e=>e.node.contains(n)))||this._setWidgets(this._currentWidget,null)}_onWidgetDisposed(e){this.remove(e)}}class GridLayout extends Layout{constructor(e={}){super(e),this._dirty=!1,this._rowSpacing=4,this._columnSpacing=4,this._items=[],this._rowStarts=[],this._columnStarts=[],this._rowSizers=[new BoxSizer],this._columnSizers=[new BoxSizer],this._box=null,void 0!==e.rowCount&&Private$4.reallocSizers(this._rowSizers,e.rowCount),void 0!==e.columnCount&&Private$4.reallocSizers(this._columnSizers,e.columnCount),void 0!==e.rowSpacing&&(this._rowSpacing=Private$4.clampValue(e.rowSpacing)),void 0!==e.columnSpacing&&(this._columnSpacing=Private$4.clampValue(e.columnSpacing))}dispose(){for(const e of this._items){let t=e.widget;e.dispose(),t.dispose()}this._box=null,this._items.length=0,this._rowStarts.length=0,this._rowSizers.length=0,this._columnStarts.length=0,this._columnSizers.length=0,super.dispose()}get rowCount(){return this._rowSizers.length}set rowCount(e){e!==this.rowCount&&(Private$4.reallocSizers(this._rowSizers,e),this.parent&&this.parent.fit())}get columnCount(){return this._columnSizers.length}set columnCount(e){e!==this.columnCount&&(Private$4.reallocSizers(this._columnSizers,e),this.parent&&this.parent.fit())}get rowSpacing(){return this._rowSpacing}set rowSpacing(e){e=Private$4.clampValue(e),this._rowSpacing!==e&&(this._rowSpacing=e,this.parent&&this.parent.fit())}get columnSpacing(){return this._columnSpacing}set columnSpacing(e){e=Private$4.clampValue(e),this._columnSpacing!==e&&(this._columnSpacing=e,this.parent&&this.parent.fit())}rowStretch(e){let t=this._rowSizers[e];return t?t.stretch:-1}setRowStretch(e,t){let n=this._rowSizers[e];n&&(t=Private$4.clampValue(t),n.stretch!==t&&(n.stretch=t,this.parent&&this.parent.update()))}columnStretch(e){let t=this._columnSizers[e];return t?t.stretch:-1}setColumnStretch(e,t){let n=this._columnSizers[e];n&&(t=Private$4.clampValue(t),n.stretch!==t&&(n.stretch=t,this.parent&&this.parent.update()))}*[Symbol.iterator](){for(const e of this._items)yield e.widget}addWidget(e){-1===index_es6.ArrayExt.findFirstIndex(this._items,t=>t.widget===e)&&(this._items.push(new LayoutItem(e)),this.parent&&this.attachWidget(e))}removeWidget(e){let t=index_es6.ArrayExt.findFirstIndex(this._items,t=>t.widget===e);if(-1===t)return;let n=index_es6.ArrayExt.removeAt(this._items,t);this.parent&&this.detachWidget(e),n.dispose()}init(){super.init();for(const e of this)this.attachWidget(e)}attachWidget(e){this.parent.isAttached&&MessageLoop.sendMessage(e,Widget.Msg.BeforeAttach),this.parent.node.appendChild(e.node),this.parent.isAttached&&MessageLoop.sendMessage(e,Widget.Msg.AfterAttach),this.parent.fit()}detachWidget(e){this.parent.isAttached&&MessageLoop.sendMessage(e,Widget.Msg.BeforeDetach),this.parent.node.removeChild(e.node),this.parent.isAttached&&MessageLoop.sendMessage(e,Widget.Msg.AfterDetach),this.parent.fit()}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}_fit(){for(let e=0,t=this.rowCount;e<t;++e)this._rowSizers[e].minSize=0;for(let e=0,t=this.columnCount;e<t;++e)this._columnSizers[e].minSize=0;let e=this._items.filter(e=>!e.isHidden);for(let t=0,n=e.length;t<n;++t)e[t].fit();let t=this.rowCount-1,n=this.columnCount-1;e.sort(Private$4.rowSpanCmp);for(let n=0,i=e.length;n<i;++n){let i=e[n],s=GridLayout.getCellConfig(i.widget),r=Math.min(s.row,t),o=Math.min(s.row+s.rowSpan-1,t);Private$4.distributeMin(this._rowSizers,r,o,i.minHeight)}e.sort(Private$4.columnSpanCmp);for(let t=0,i=e.length;t<i;++t){let i=e[t],s=GridLayout.getCellConfig(i.widget),r=Math.min(s.column,n),o=Math.min(s.column+s.columnSpan-1,n);Private$4.distributeMin(this._columnSizers,r,o,i.minWidth)}if("set-no-constraint"===this.fitPolicy)return void MessageLoop.sendMessage(this.parent,Widget.Msg.UpdateRequest);let i=t*this._rowSpacing,s=n*this._columnSpacing;for(let e=0,t=this.rowCount;e<t;++e)i+=this._rowSizers[e].minSize;for(let e=0,t=this.columnCount;e<t;++e)s+=this._columnSizers[e].minSize;let r=this._box=ElementExt.boxSizing(this.parent.node);s+=r.horizontalSum,i+=r.verticalSum;let o=this.parent.node.style;o.minWidth=`${s}px`,o.minHeight=`${i}px`,this._dirty=!0,this.parent.parent&&MessageLoop.sendMessage(this.parent.parent,Widget.Msg.FitRequest),this._dirty&&MessageLoop.sendMessage(this.parent,Widget.Msg.UpdateRequest)}_update(e,t){this._dirty=!1,e<0&&(e=this.parent.node.offsetWidth),t<0&&(t=this.parent.node.offsetHeight),this._box||(this._box=ElementExt.boxSizing(this.parent.node));let n=this._box.paddingTop,i=this._box.paddingLeft,s=e-this._box.horizontalSum,r=t-this._box.verticalSum,o=this.rowCount-1,a=this.columnCount-1,l=o*this._rowSpacing,c=a*this._columnSpacing;BoxEngine.calc(this._rowSizers,Math.max(0,r-l)),BoxEngine.calc(this._columnSizers,Math.max(0,s-c));for(let e=0,t=n,i=this.rowCount;e<i;++e)this._rowStarts[e]=t,t+=this._rowSizers[e].size+this._rowSpacing;for(let e=0,t=i,n=this.columnCount;e<n;++e)this._columnStarts[e]=t,t+=this._columnSizers[e].size+this._columnSpacing;for(let e=0,t=this._items.length;e<t;++e){let t=this._items[e];if(t.isHidden)continue;let n=GridLayout.getCellConfig(t.widget),i=Math.min(n.row,o),s=Math.min(n.column,a),r=Math.min(n.row+n.rowSpan-1,o),l=Math.min(n.column+n.columnSpan-1,a),c=this._columnStarts[s],d=this._rowStarts[i],u=this._columnStarts[l]+this._columnSizers[l].size-c,h=this._rowStarts[r]+this._rowSizers[r].size-d;t.update(c,d,u,h)}}}!function(e){e.getCellConfig=function(e){return Private$4.cellConfigProperty.get(e)},e.setCellConfig=function(e,t){Private$4.cellConfigProperty.set(e,Private$4.normalizeConfig(t))}}(GridLayout||(GridLayout={})),function(e){e.cellConfigProperty=new dist_index_es6.AttachedProperty({name:"cellConfig",create:()=>({row:0,column:0,rowSpan:1,columnSpan:1}),changed:function(e){e.parent&&e.parent.layout instanceof GridLayout&&e.parent.fit()}}),e.normalizeConfig=function(e){return{row:Math.max(0,Math.floor(e.row||0)),column:Math.max(0,Math.floor(e.column||0)),rowSpan:Math.max(1,Math.floor(e.rowSpan||0)),columnSpan:Math.max(1,Math.floor(e.columnSpan||0))}},e.clampValue=function(e){return Math.max(0,Math.floor(e))},e.rowSpanCmp=function(t,n){let i=e.cellConfigProperty.get(t.widget),s=e.cellConfigProperty.get(n.widget);return i.rowSpan-s.rowSpan},e.columnSpanCmp=function(t,n){let i=e.cellConfigProperty.get(t.widget),s=e.cellConfigProperty.get(n.widget);return i.columnSpan-s.columnSpan},e.reallocSizers=function(e,t){for(t=Math.max(1,Math.floor(t));e.length<t;)e.push(new BoxSizer);e.length>t&&(e.length=t)},e.distributeMin=function(e,t,n,i){if(n<t)return;if(t===n){let n=e[t];return void(n.minSize=Math.max(n.minSize,i))}let s=0;for(let i=t;i<=n;++i)s+=e[i].minSize;if(s>=i)return;let r=(i-s)/(n-t+1);for(let i=t;i<=n;++i)e[i].minSize+=r}}(Private$4||(Private$4={}));class MenuBar extends Widget{constructor(e={}){super({node:Private$3.createNode()}),this._activeIndex=-1,this._tabFocusIndex=0,this._menus=[],this._childMenu=null,this._overflowMenu=null,this._menuItemSizes=[],this._overflowIndex=-1,this.addClass("lm-MenuBar"),this.setFlag(Widget.Flag.DisallowLayout),this.renderer=e.renderer||MenuBar.defaultRenderer,this._forceItemsPosition=e.forceItemsPosition||{forceX:!0,forceY:!0},this._overflowMenuOptions=e.overflowMenuOptions||{isVisible:!0}}dispose(){this._closeChildMenu(),this._menus.length=0,super.dispose()}get childMenu(){return this._childMenu}get overflowIndex(){return this._overflowIndex}get overflowMenu(){return this._overflowMenu}get contentNode(){return this.node.getElementsByClassName("lm-MenuBar-content")[0]}get activeMenu(){return this._menus[this._activeIndex]||null}set activeMenu(e){this.activeIndex=e?this._menus.indexOf(e):-1}get activeIndex(){return this._activeIndex}set activeIndex(e){(e<0||e>=this._menus.length)&&(e=-1),e>-1&&0===this._menus[e].items.length&&(e=-1),this._activeIndex!==e&&(this._activeIndex=e,this.update())}get menus(){return this._menus}openActiveMenu(){-1!==this._activeIndex&&(this._openChildMenu(),this._childMenu&&(this._childMenu.activeIndex=-1,this._childMenu.activateNextItem()))}addMenu(e,t=!0){this.insertMenu(this._menus.length,e,t)}insertMenu(e,t,n=!0){this._closeChildMenu();let i=this._menus.indexOf(t),s=Math.max(0,Math.min(e,this._menus.length));if(-1===i)return index_es6.ArrayExt.insert(this._menus,s,t),t.addClass("lm-MenuBar-menu"),t.aboutToClose.connect(this._onMenuAboutToClose,this),t.menuRequested.connect(this._onMenuMenuRequested,this),t.title.changed.connect(this._onTitleChanged,this),void(n&&this.update());s===this._menus.length&&s--,i!==s&&(index_es6.ArrayExt.move(this._menus,i,s),n&&this.update())}removeMenu(e,t=!0){this.removeMenuAt(this._menus.indexOf(e),t)}removeMenuAt(e,t=!0){this._closeChildMenu();let n=index_es6.ArrayExt.removeAt(this._menus,e);n&&(n.aboutToClose.disconnect(this._onMenuAboutToClose,this),n.menuRequested.disconnect(this._onMenuMenuRequested,this),n.title.changed.disconnect(this._onTitleChanged,this),n.removeClass("lm-MenuBar-menu"),t&&this.update())}clearMenus(){if(0!==this._menus.length){this._closeChildMenu();for(let e of this._menus)e.aboutToClose.disconnect(this._onMenuAboutToClose,this),e.menuRequested.disconnect(this._onMenuMenuRequested,this),e.title.changed.disconnect(this._onTitleChanged,this),e.removeClass("lm-MenuBar-menu");this._menus.length=0,this.update()}}handleEvent(e){switch(e.type){case"keydown":this._evtKeyDown(e);break;case"mousedown":this._evtMouseDown(e);break;case"mousemove":case"mouseleave":this._evtMouseMove(e);break;case"focusout":this._evtFocusOut(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}}onBeforeAttach(e){this.node.addEventListener("keydown",this),this.node.addEventListener("mousedown",this),this.node.addEventListener("mousemove",this),this.node.addEventListener("mouseleave",this),this.node.addEventListener("focusout",this),this.node.addEventListener("contextmenu",this)}onAfterDetach(e){this.node.removeEventListener("keydown",this),this.node.removeEventListener("mousedown",this),this.node.removeEventListener("mousemove",this),this.node.removeEventListener("mouseleave",this),this.node.removeEventListener("focusout",this),this.node.removeEventListener("contextmenu",this),this._closeChildMenu()}onActivateRequest(e){this.isAttached&&this._focusItemAt(0)}onResize(e){this.update(),super.onResize(e)}onUpdateRequest(e){var t;let n=this._menus,i=this.renderer,s=this._activeIndex,r=this._tabFocusIndex>=0&&this._tabFocusIndex<n.length?this._tabFocusIndex:0,o=this._overflowIndex>-1?this._overflowIndex:n.length,a=0,l=!1;o=null!==this._overflowMenu?o-1:o;let c=new Array(o);for(let e=0;e<o;++e)c[e]=i.renderItem({title:n[e].title,active:e===s,tabbable:e===r,disabled:0===n[e].items.length,onfocus:()=>{this._tabFocusIndex=e,this.activeIndex=e}}),a+=this._menuItemSizes[e],n[e].title.label===this._overflowMenuOptions.title&&(l=!0,o--);if(this._overflowMenuOptions.isVisible)if(this._overflowIndex>-1&&!l){if(null===this._overflowMenu){const e=null!==(t=this._overflowMenuOptions.title)&&void 0!==t?t:"...";this._overflowMenu=new Menu({commands:new CommandRegistry}),this._overflowMenu.title.label=e,this._overflowMenu.title.mnemonic=0,this.addMenu(this._overflowMenu,!1)}for(let e=n.length-2;e>=o;e--){const t=this.menus[e];t.title.mnemonic=0,this._overflowMenu.insertItem(0,{type:"submenu",submenu:t}),this.removeMenu(t,!1)}c[o]=i.renderItem({title:this._overflowMenu.title,active:o===s&&0!==n[o].items.length,tabbable:o===r,disabled:0===n[o].items.length,onfocus:()=>{this._tabFocusIndex=o,this.activeIndex=o}}),o++}else if(null!==this._overflowMenu){let e=this._overflowMenu.items,t=this.node.offsetWidth,s=this._overflowMenu.items.length;for(let l=0;l<s;++l){let s=n.length-1-l;if(t-a>this._menuItemSizes[s]){let t=e[0].submenu;this._overflowMenu.removeItemAt(0),this.insertMenu(o,t,!1),c[o]=i.renderItem({title:t.title,active:!1,tabbable:o===r,disabled:0===n[o].items.length,onfocus:()=>{this._tabFocusIndex=o,this.activeIndex=o}}),o++}}0===this._overflowMenu.items.length&&(this.removeMenu(this._overflowMenu,!1),c.pop(),this._overflowMenu=null,this._overflowIndex=-1)}VirtualDOM.render(c,this.contentNode),this._updateOverflowIndex()}_updateOverflowIndex(){if(!this._overflowMenuOptions.isVisible)return;const e=this.contentNode.childNodes;let t=this.node.offsetWidth,n=0,i=-1,s=e.length;if(0==this._menuItemSizes.length)for(let r=0;r<s;r++){let s=e[r];n+=s.offsetWidth,this._menuItemSizes.push(s.offsetWidth),n>t&&-1===i&&(i=r)}else for(let e=0;e<this._menuItemSizes.length;e++)if(n+=this._menuItemSizes[e],n>t){i=e;break}this._overflowIndex=i}_evtKeyDown(e){let t=e.keyCode;if(9===t)return void(this.activeIndex=-1);if(e.preventDefault(),e.stopPropagation(),13===t||32===t||38===t||40===t){if(this.activeIndex=this._tabFocusIndex,this.activeIndex!==this._tabFocusIndex)return;return void this.openActiveMenu()}if(27===t)return this._closeChildMenu(),void this._focusItemAt(this.activeIndex);if(37===t||39===t){let e=37===t?-1:1,n=this._tabFocusIndex+e,i=this._menus.length;for(let t=0;t<i;t++){let s=(i+n+e*t)%i;if(this._menus[s].items.length)return void this._focusItemAt(s)}return}let n=getKeyboardLayout().keyForKeydownEvent(e);if(!n)return;let i=this._activeIndex+1,s=Private$3.findMnemonic(this._menus,n,i);-1===s.index||s.multiple?-1!==s.index?(this.activeIndex=s.index,this._focusItemAt(this.activeIndex)):-1!==s.auto&&(this.activeIndex=s.auto,this._focusItemAt(this.activeIndex)):(this.activeIndex=s.index,this.openActiveMenu())}_evtMouseDown(e){if(!ElementExt.hitTest(this.node,e.clientX,e.clientY))return;e.stopPropagation(),e.stopImmediatePropagation();let t=index_es6.ArrayExt.findFirstIndex(this.contentNode.children,t=>ElementExt.hitTest(t,e.clientX,e.clientY));if(-1!==t){if(0===e.button)if(this._childMenu)this._closeChildMenu(),this.activeIndex=t;else{e.preventDefault();const n=this._positionForMenu(t);Menu.saveWindowData(),this.activeIndex=t,this._openChildMenu(n)}}else this._closeChildMenu()}_evtMouseMove(e){let t=index_es6.ArrayExt.findFirstIndex(this.contentNode.children,t=>ElementExt.hitTest(t,e.clientX,e.clientY));if(t===this._activeIndex)return;if(-1===t&&this._childMenu)return;const n=t>=0&&this._childMenu?this._positionForMenu(t):null;Menu.saveWindowData(),this.activeIndex=t,n&&this._openChildMenu(n)}_positionForMenu(e){let t=this.contentNode.children[e],{left:n,bottom:i}=t.getBoundingClientRect();return{top:i,left:n}}_evtFocusOut(e){this._childMenu||this.node.contains(e.relatedTarget)||(this.activeIndex=-1)}_focusItemAt(e){const t=this.contentNode.childNodes[e];t&&t.focus()}_openChildMenu(e={}){let t=this.activeMenu;if(!t)return void this._closeChildMenu();let n=this._childMenu;if(n===t)return;this._childMenu=t,n?n.close():document.addEventListener("mousedown",this,!0),this._tabFocusIndex=this.activeIndex,MessageLoop.sendMessage(this,Widget.Msg.UpdateRequest);let{left:i,top:s}=e;void 0!==i&&void 0!==s||({left:i,top:s}=this._positionForMenu(this._activeIndex)),n||this.addClass("lm-mod-active"),t.items.length>0&&t.open(i,s,this._forceItemsPosition)}_closeChildMenu(){if(!this._childMenu)return;this.removeClass("lm-mod-active"),document.removeEventListener("mousedown",this,!0);let e=this._childMenu;this._childMenu=null,e.close(),this.activeIndex=-1}_onMenuAboutToClose(e){e===this._childMenu&&(this.removeClass("lm-mod-active"),document.removeEventListener("mousedown",this,!0),this._childMenu=null,this.activeIndex=-1)}_onMenuMenuRequested(e,t){if(e!==this._childMenu)return;let n=this._activeIndex,i=this._menus.length;switch(t){case"next":this.activeIndex=n===i-1?0:n+1;break;case"previous":this.activeIndex=0===n?i-1:n-1}this.openActiveMenu()}_onTitleChanged(){this.update()}}!function(e){class t{renderItem(e){let t=this.createItemClass(e),n=this.createItemDataset(e),i=this.createItemARIA(e);return h.li({className:t,dataset:n,...e.disabled?{}:{tabindex:e.tabbable?"0":"-1"},onfocus:e.onfocus,...i},this.renderIcon(e),this.renderLabel(e))}renderIcon(e){let t=this.createIconClass(e);return h.div({className:t},e.title.icon,e.title.iconLabel)}renderLabel(e){let t=this.formatLabel(e);return h.div({className:"lm-MenuBar-itemLabel"},t)}createItemClass(e){let t="lm-MenuBar-item";return e.title.className&&(t+=` ${e.title.className}`),e.active&&!e.disabled&&(t+=" lm-mod-active"),t}createItemDataset(e){return e.title.dataset}createItemARIA(e){return{role:"menuitem","aria-haspopup":"true","aria-disabled":e.disabled?"true":"false"}}createIconClass(e){let t="lm-MenuBar-itemIcon",n=e.title.iconClass;return n?`${t} ${n}`:t}formatLabel(e){let{label:t,mnemonic:n}=e.title;if(n<0||n>=t.length)return t;let i=t.slice(0,n),s=t.slice(n+1),r=t[n];return[i,h.span({className:"lm-MenuBar-itemMnemonic"},r),s]}}e.Renderer=t,e.defaultRenderer=new t}(MenuBar||(MenuBar={})),function(e){e.createNode=function(){let e=document.createElement("div"),t=document.createElement("ul");return t.className="lm-MenuBar-content",e.appendChild(t),t.setAttribute("role","menubar"),e},e.findMnemonic=function(e,t,n){let i=-1,s=-1,r=!1,o=t.toUpperCase();for(let t=0,a=e.length;t<a;++t){let l=(t+n)%a,c=e[l].title;if(0===c.label.length)continue;let d=c.mnemonic;d>=0&&d<c.label.length?c.label[d].toUpperCase()===o&&(-1===i?i=l:r=!0):-1===s&&c.label[0].toUpperCase()===o&&(s=l)}return{index:i,multiple:r,auto:s}}}(Private$3||(Private$3={}));class ScrollBar extends Widget{constructor(e={}){super({node:Private$2.createNode()}),this._onRepeat=()=>{if(this._repeatTimer=-1,!this._pressData)return;let e=this._pressData.part;if("thumb"===e)return;this._repeatTimer=window.setTimeout(this._onRepeat,20);let t=this._pressData.mouseX,n=this._pressData.mouseY;if("decrement"!==e)if("increment"!==e){if("track"===e){if(!ElementExt.hitTest(this.trackNode,t,n))return;let e=this.thumbNode;if(ElementExt.hitTest(e,t,n))return;let i,s=e.getBoundingClientRect();return i="horizontal"===this._orientation?t<s.left?"decrement":"increment":n<s.top?"decrement":"increment",void this._pageRequested.emit(i)}}else{if(!ElementExt.hitTest(this.incrementNode,t,n))return;this._stepRequested.emit("increment")}else{if(!ElementExt.hitTest(this.decrementNode,t,n))return;this._stepRequested.emit("decrement")}},this._value=0,this._page=10,this._maximum=100,this._repeatTimer=-1,this._pressData=null,this._thumbMoved=new signaling_dist_index_es6.Signal(this),this._stepRequested=new signaling_dist_index_es6.Signal(this),this._pageRequested=new signaling_dist_index_es6.Signal(this),this.addClass("lm-ScrollBar"),this.setFlag(Widget.Flag.DisallowLayout),this._orientation=e.orientation||"vertical",this.dataset.orientation=this._orientation,void 0!==e.maximum&&(this._maximum=Math.max(0,e.maximum)),void 0!==e.page&&(this._page=Math.max(0,e.page)),void 0!==e.value&&(this._value=Math.max(0,Math.min(e.value,this._maximum)))}get thumbMoved(){return this._thumbMoved}get stepRequested(){return this._stepRequested}get pageRequested(){return this._pageRequested}get orientation(){return this._orientation}set orientation(e){this._orientation!==e&&(this._releaseMouse(),this._orientation=e,this.dataset.orientation=e,this.update())}get value(){return this._value}set value(e){e=Math.max(0,Math.min(e,this._maximum)),this._value!==e&&(this._value=e,this.update())}get page(){return this._page}set page(e){e=Math.max(0,e),this._page!==e&&(this._page=e,this.update())}get maximum(){return this._maximum}set maximum(e){e=Math.max(0,e),this._maximum!==e&&(this._maximum=e,this._value=Math.min(this._value,e),this.update())}get decrementNode(){return this.node.getElementsByClassName("lm-ScrollBar-button")[0]}get incrementNode(){return this.node.getElementsByClassName("lm-ScrollBar-button")[1]}get trackNode(){return this.node.getElementsByClassName("lm-ScrollBar-track")[0]}get thumbNode(){return this.node.getElementsByClassName("lm-ScrollBar-thumb")[0]}handleEvent(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()}}onBeforeAttach(e){this.node.addEventListener("mousedown",this),this.update()}onAfterDetach(e){this.node.removeEventListener("mousedown",this),this._releaseMouse()}onUpdateRequest(e){let t=100*this._value/this._maximum,n=100*this._page/(this._page+this._maximum);t=Math.max(0,Math.min(t,100)),n=Math.max(0,Math.min(n,100));let i=this.thumbNode.style;"horizontal"===this._orientation?(i.top="",i.height="",i.left=`${t}%`,i.width=`${n}%`,i.transform=`translate(${-t}%, 0%)`):(i.left="",i.width="",i.top=`${t}%`,i.height=`${n}%`,i.transform=`translate(0%, ${-t}%)`)}_evtKeyDown(e){if(e.preventDefault(),e.stopPropagation(),27!==e.keyCode)return;let t=this._pressData?this._pressData.value:-1;this._releaseMouse(),-1!==t&&this._moveThumb(t)}_evtMouseDown(e){if(0!==e.button)return;if(this.activate(),this._pressData)return;let t=Private$2.findPart(this,e.target);if(!t)return;e.preventDefault(),e.stopPropagation();let n=Drag.overrideCursor("default");if(this._pressData={part:t,override:n,delta:-1,value:-1,mouseX:e.clientX,mouseY:e.clientY},document.addEventListener("mousemove",this,!0),document.addEventListener("mouseup",this,!0),document.addEventListener("keydown",this,!0),document.addEventListener("contextmenu",this,!0),"thumb"===t){let t=this.thumbNode,n=t.getBoundingClientRect();return"horizontal"===this._orientation?this._pressData.delta=e.clientX-n.left:this._pressData.delta=e.clientY-n.top,t.classList.add("lm-mod-active"),void(this._pressData.value=this._value)}if("track"===t){let t,n=this.thumbNode.getBoundingClientRect();return t="horizontal"===this._orientation?e.clientX<n.left?"decrement":"increment":e.clientY<n.top?"decrement":"increment",this._repeatTimer=window.setTimeout(this._onRepeat,350),void this._pageRequested.emit(t)}return"decrement"===t?(this.decrementNode.classList.add("lm-mod-active"),this._repeatTimer=window.setTimeout(this._onRepeat,350),void this._stepRequested.emit("decrement")):"increment"===t?(this.incrementNode.classList.add("lm-mod-active"),this._repeatTimer=window.setTimeout(this._onRepeat,350),void this._stepRequested.emit("increment")):void 0}_evtMouseMove(e){if(!this._pressData)return;if(e.preventDefault(),e.stopPropagation(),this._pressData.mouseX=e.clientX,this._pressData.mouseY=e.clientY,"thumb"!==this._pressData.part)return;let t,n,i=this.thumbNode.getBoundingClientRect(),s=this.trackNode.getBoundingClientRect();"horizontal"===this._orientation?(t=e.clientX-s.left-this._pressData.delta,n=s.width-i.width):(t=e.clientY-s.top-this._pressData.delta,n=s.height-i.height);let r=0===n?0:t*this._maximum/n;this._moveThumb(r)}_evtMouseUp(e){0===e.button&&(e.preventDefault(),e.stopPropagation(),this._releaseMouse())}_releaseMouse(){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"))}_moveThumb(e){e=Math.max(0,Math.min(e,this._maximum)),this._value!==e&&(this._value=e,this.update(),this._thumbMoved.emit(e))}}!function(e){e.createNode=function(){let e=document.createElement("div"),t=document.createElement("div"),n=document.createElement("div"),i=document.createElement("div"),s=document.createElement("div");return t.className="lm-ScrollBar-button",n.className="lm-ScrollBar-button",t.dataset.action="decrement",n.dataset.action="increment",i.className="lm-ScrollBar-track",s.className="lm-ScrollBar-thumb",i.appendChild(s),e.appendChild(t),e.appendChild(i),e.appendChild(n),e},e.findPart=function(e,t){return e.thumbNode.contains(t)?"thumb":e.trackNode.contains(t)?"track":e.decrementNode.contains(t)?"decrement":e.incrementNode.contains(t)?"increment":null}}(Private$2||(Private$2={}));class SingletonLayout extends Layout{constructor(){super(...arguments),this._widget=null}dispose(){if(this._widget){let e=this._widget;this._widget=null,e.dispose()}super.dispose()}get widget(){return this._widget}set widget(e){e&&(e.parent=this.parent),this._widget!==e&&(this._widget&&this._widget.dispose(),this._widget=e,this.parent&&e&&this.attachWidget(e))}*[Symbol.iterator](){this._widget&&(yield this._widget)}removeWidget(e){this._widget===e&&(this._widget=null,this.parent&&this.detachWidget(e))}init(){super.init();for(const e of this)this.attachWidget(e)}attachWidget(e){this.parent.isAttached&&MessageLoop.sendMessage(e,Widget.Msg.BeforeAttach),this.parent.node.appendChild(e.node),this.parent.isAttached&&MessageLoop.sendMessage(e,Widget.Msg.AfterAttach)}detachWidget(e){this.parent.isAttached&&MessageLoop.sendMessage(e,Widget.Msg.BeforeDetach),this.parent.node.removeChild(e.node),this.parent.isAttached&&MessageLoop.sendMessage(e,Widget.Msg.AfterDetach)}}class StackedLayout extends PanelLayout{constructor(e={}){super(e),this._dirty=!1,this._items=[],this._box=null,this._hiddenMode=void 0!==e.hiddenMode?e.hiddenMode:Widget.HiddenMode.Display}get hiddenMode(){return this._hiddenMode}set hiddenMode(e){this._hiddenMode!==e&&(this._hiddenMode=e,this.widgets.length>1&&this.widgets.forEach(e=>{e.hiddenMode=this._hiddenMode}))}dispose(){for(const e of this._items)e.dispose();this._box=null,this._items.length=0,super.dispose()}attachWidget(e,t){this._hiddenMode===Widget.HiddenMode.Scale&&this._items.length>0?(1===this._items.length&&(this.widgets[0].hiddenMode=Widget.HiddenMode.Scale),t.hiddenMode=Widget.HiddenMode.Scale):t.hiddenMode=Widget.HiddenMode.Display,index_es6.ArrayExt.insert(this._items,e,new LayoutItem(t)),this.parent.isAttached&&MessageLoop.sendMessage(t,Widget.Msg.BeforeAttach),this.parent.node.appendChild(t.node),this.parent.isAttached&&MessageLoop.sendMessage(t,Widget.Msg.AfterAttach),this.parent.fit()}moveWidget(e,t,n){index_es6.ArrayExt.move(this._items,e,t),this.parent.update()}detachWidget(e,t){let n=index_es6.ArrayExt.removeAt(this._items,e);this.parent.isAttached&&MessageLoop.sendMessage(t,Widget.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.isAttached&&MessageLoop.sendMessage(t,Widget.Msg.AfterDetach),n.widget.node.style.zIndex="",this._hiddenMode===Widget.HiddenMode.Scale&&(t.hiddenMode=Widget.HiddenMode.Display,1===this._items.length&&(this._items[0].widget.hiddenMode=Widget.HiddenMode.Display)),n.dispose(),this.parent.fit()}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}_fit(){let e=0,t=0;for(let n=0,i=this._items.length;n<i;++n){let i=this._items[n];i.isHidden||(i.fit(),e=Math.max(e,i.minWidth),t=Math.max(t,i.minHeight))}let n=this._box=ElementExt.boxSizing(this.parent.node);e+=n.horizontalSum,t+=n.verticalSum;let i=this.parent.node.style;i.minWidth=`${e}px`,i.minHeight=`${t}px`,this._dirty=!0,this.parent.parent&&MessageLoop.sendMessage(this.parent.parent,Widget.Msg.FitRequest),this._dirty&&MessageLoop.sendMessage(this.parent,Widget.Msg.UpdateRequest)}_update(e,t){this._dirty=!1;let n=0;for(let e=0,t=this._items.length;e<t;++e)n+=+!this._items[e].isHidden;if(0===n)return;e<0&&(e=this.parent.node.offsetWidth),t<0&&(t=this.parent.node.offsetHeight),this._box||(this._box=ElementExt.boxSizing(this.parent.node));let i=this._box.paddingTop,s=this._box.paddingLeft,r=e-this._box.horizontalSum,o=t-this._box.verticalSum;for(let e=0,t=this._items.length;e<t;++e){let t=this._items[e];t.isHidden||(t.widget.node.style.zIndex=`${e}`,t.update(s,i,r,o))}}}class StackedPanel extends Panel{constructor(e={}){super({layout:Private$1.createLayout(e)}),this._widgetRemoved=new signaling_dist_index_es6.Signal(this),this.addClass("lm-StackedPanel")}get hiddenMode(){return this.layout.hiddenMode}set hiddenMode(e){this.layout.hiddenMode=e}get widgetRemoved(){return this._widgetRemoved}onChildAdded(e){e.child.addClass("lm-StackedPanel-child")}onChildRemoved(e){e.child.removeClass("lm-StackedPanel-child"),this._widgetRemoved.emit(e.child)}}(Private$1||(Private$1={})).createLayout=function(e){return e.layout||new StackedLayout};class TabPanel extends Widget{constructor(e={}){super(),this._currentChanged=new signaling_dist_index_es6.Signal(this),this._addRequested=new signaling_dist_index_es6.Signal(this),this.addClass("lm-TabPanel"),this.tabBar=new TabBar(e),this.tabBar.addClass("lm-TabPanel-tabBar"),this.stackedPanel=new StackedPanel,this.stackedPanel.addClass("lm-TabPanel-stackedPanel"),this.tabBar.tabMoved.connect(this._onTabMoved,this),this.tabBar.currentChanged.connect(this._onCurrentChanged,this),this.tabBar.tabCloseRequested.connect(this._onTabCloseRequested,this),this.tabBar.tabActivateRequested.connect(this._onTabActivateRequested,this),this.tabBar.addRequested.connect(this._onTabAddRequested,this),this.stackedPanel.widgetRemoved.connect(this._onWidgetRemoved,this),this._tabPlacement=e.tabPlacement||"top";let t=widgets_dist_index_es6_Private.directionFromPlacement(this._tabPlacement),n=widgets_dist_index_es6_Private.orientationFromPlacement(this._tabPlacement);this.tabBar.orientation=n,this.tabBar.dataset.placement=this._tabPlacement;let i=new BoxLayout({direction:t,spacing:0});BoxLayout.setStretch(this.tabBar,0),BoxLayout.setStretch(this.stackedPanel,1),i.addWidget(this.tabBar),i.addWidget(this.stackedPanel),this.layout=i}get currentChanged(){return this._currentChanged}get currentIndex(){return this.tabBar.currentIndex}set currentIndex(e){this.tabBar.currentIndex=e}get currentWidget(){let e=this.tabBar.currentTitle;return e?e.owner:null}set currentWidget(e){this.tabBar.currentTitle=e?e.title:null}get tabsMovable(){return this.tabBar.tabsMovable}set tabsMovable(e){this.tabBar.tabsMovable=e}get addButtonEnabled(){return this.tabBar.addButtonEnabled}set addButtonEnabled(e){this.tabBar.addButtonEnabled=e}get tabPlacement(){return this._tabPlacement}set tabPlacement(e){if(this._tabPlacement===e)return;this._tabPlacement=e;let t=widgets_dist_index_es6_Private.directionFromPlacement(e),n=widgets_dist_index_es6_Private.orientationFromPlacement(e);this.tabBar.orientation=n,this.tabBar.dataset.placement=e,this.layout.direction=t}get addRequested(){return this._addRequested}get widgets(){return this.stackedPanel.widgets}addWidget(e){this.insertWidget(this.widgets.length,e)}insertWidget(e,t){t!==this.currentWidget&&t.hide(),this.stackedPanel.insertWidget(e,t),this.tabBar.insertTab(e,t.title),t.node.setAttribute("role","tabpanel");let n=this.tabBar.renderer;if(n instanceof TabBar.Renderer){let e=n.createTabKey({title:t.title,current:!1,zIndex:0});t.node.setAttribute("aria-labelledby",e)}}_onCurrentChanged(e,t){let{previousIndex:n,previousTitle:i,currentIndex:s,currentTitle:r}=t,o=i?i.owner:null,a=r?r.owner:null;o&&o.hide(),a&&a.show(),this._currentChanged.emit({previousIndex:n,previousWidget:o,currentIndex:s,currentWidget:a}),(Platform.IS_EDGE||Platform.IS_IE)&&MessageLoop.flush()}_onTabAddRequested(e,t){this._addRequested.emit(e)}_onTabActivateRequested(e,t){t.title.owner.activate()}_onTabCloseRequested(e,t){t.title.owner.close()}_onTabMoved(e,t){this.stackedPanel.insertWidget(t.toIndex,t.title.owner)}_onWidgetRemoved(e,t){t.node.removeAttribute("role"),t.node.removeAttribute("aria-labelledby"),this.tabBar.removeTab(t.title)}}!function(e){e.orientationFromPlacement=function(e){return t[e]},e.directionFromPlacement=function(e){return n[e]};const t={top:"horizontal",left:"vertical",right:"vertical",bottom:"horizontal"},n={top:"top-to-bottom",left:"left-to-right",right:"right-to-left",bottom:"bottom-to-top"}}(widgets_dist_index_es6_Private||(widgets_dist_index_es6_Private={}));var lib=__webpack_require__(9531),coreutils_lib=__webpack_require__(6376),services_lib=__webpack_require__(608);const TRANSLATIONS_SETTINGS_URL="api/translations";async function requestTranslationsAPI(e="",t="",n={},i=void 0){const s=null!=i?i:services_lib.ServerConnection.makeSettings();e=e||`${s.appUrl}/${TRANSLATIONS_SETTINGS_URL}`;const r=coreutils_lib.URLExt.join(s.baseUrl,e),o=coreutils_lib.URLExt.join(r,t);if(!o.startsWith(r))throw new Error("Can only be used for translations requests");let a;try{a=await services_lib.ServerConnection.makeRequest(o,n,s)}catch(e){throw new services_lib.ServerConnection.NetworkError(e)}let l=await a.text();if(l.length>0)try{l=JSON.parse(l)}catch(e){console.error("Not a JSON response body.",a)}if(!a.ok)throw new services_lib.ServerConnection.ResponseError(a,l.message||l);return l}const tokens_DEFAULT_LANGUAGE_CODE="en",ITranslatorConnector=new dist.Token("@jupyterlab/translation:ITranslatorConnector","A service to connect to the server translation endpoint.");class tokens_TranslatorConnector extends lib.DataConnector{constructor(e="",t){super(),this._translationsUrl=e,this._serverSettings=t}async fetch(e){var t;return requestTranslationsAPI(this._translationsUrl,null!==(t=null==e?void 0:e.language)&&void 0!==t?t:"",{},this._serverSettings)}}const ITranslator=new dist.Token("@jupyterlab/translation:ITranslator","A service to translate strings.");function utils_normalizeDomain(e){return e.replace("-","_")}class gettext_Gettext{constructor(e){e=e||{},this._defaults={domain:"messages",locale:document.documentElement.getAttribute("lang")||tokens_DEFAULT_LANGUAGE_CODE,pluralFunc:function(e){return{nplurals:2,plural:1!=e?1:0}},contextDelimiter:String.fromCharCode(4),stringsPrefix:""},this._locale=(e.locale||this._defaults.locale).replace("_","-"),this._domain=utils_normalizeDomain(e.domain||this._defaults.domain),this._contextDelimiter=e.contextDelimiter||this._defaults.contextDelimiter,this._stringsPrefix=e.stringsPrefix||this._defaults.stringsPrefix,this._pluralFuncs={},this._dictionary={},this._pluralForms={},e.messages&&(this._dictionary[this._domain]={},this._dictionary[this._domain][this._locale]=e.messages),e.pluralForms&&(this._pluralForms[this._locale]=e.pluralForms)}setContextDelimiter(e){this._contextDelimiter=e}getContextDelimiter(){return this._contextDelimiter}setLocale(e){this._locale=e.replace("_","-")}getLocale(){return this._locale}setDomain(e){this._domain=utils_normalizeDomain(e)}getDomain(){return this._domain}setStringsPrefix(e){this._stringsPrefix=e}getStringsPrefix(){return this._stringsPrefix}static strfmt(e,...t){return e.replace(/%%/g,"%% ").replace(/%(\d+)/g,function(e,n){return t[n-1]}).replace(/%% /g,"%")}loadJSON(e,t){if(!e[""]||!e[""].language||!e[""].pluralForms)throw new Error(`Wrong jsonData, it must have an empty key ("") with "language" and "pluralForms" information: ${e}`);t=utils_normalizeDomain(t);let n=e[""],i=JSON.parse(JSON.stringify(e));delete i[""],this.setMessages(t||this._defaults.domain,n.language,i,n.pluralForms)}__(e,...t){return this.gettext(e,...t)}_n(e,t,n,...i){return this.ngettext(e,t,n,...i)}_p(e,t,...n){return this.pgettext(e,t,...n)}_np(e,t,n,i,...s){return this.npgettext(e,t,n,i,...s)}gettext(e,...t){return this.dcnpgettext("","",e,"",0,...t)}ngettext(e,t,n,...i){return this.dcnpgettext("","",e,t,n,...i)}pgettext(e,t,...n){return this.dcnpgettext("",e,t,"",0,...n)}npgettext(e,t,n,i,...s){return this.dcnpgettext("",e,t,n,i,...s)}dcnpgettext(e,t,n,i,s,...r){let o;e=utils_normalizeDomain(e)||this._domain;let a=t?t+this._contextDelimiter+n:n,l={pluralForm:!1},c=!1,d=this._locale,u=this.expandLocale(this._locale);for(let t in u)if(d=u[t],c=this._dictionary[e]&&this._dictionary[e][d]&&this._dictionary[e][d][a],c=i?c&&this._dictionary[e][d][a].length>1:c&&1==this._dictionary[e][d][a].length,c){l.locale=d;break}if(c?o=this._dictionary[e][d][a]:(o=[n],l.pluralFunc=this._defaults.pluralFunc),!i)return this.t(o,s,l,...r);l.pluralForm=!0;let h=c?o:[n,i];return this.t(h,s,l,...r)}expandLocale(e){let t=[e],n=e.lastIndexOf("-");for(;n>0;)e=e.slice(0,n),t.push(e),n=e.lastIndexOf("-");return t}getPluralFunc(e){if(!new RegExp("^\\s*nplurals\\s*=\\s*[0-9]+\\s*;\\s*plural\\s*=\\s*(?:\\s|[-\\?\\|&=!<>+*/%:;n0-9_()])+").test(e))throw new Error(gettext_Gettext.strfmt('The plural form "%1" is not valid',e));return new Function("n","let plural, nplurals; "+e+" return { nplurals: nplurals, plural: (plural === true ? 1 : (plural ? plural : 0)) };")}removeContext(e){return-1!==e.indexOf(this._contextDelimiter)?e.split(this._contextDelimiter)[1]:e}t(e,t,n,...i){if(!n.pluralForm)return this._stringsPrefix+gettext_Gettext.strfmt(this.removeContext(e[0]),...i);let s;return n.pluralFunc?s=n.pluralFunc(t):(this._pluralFuncs[n.locale||""]||(this._pluralFuncs[n.locale||""]=this.getPluralFunc(this._pluralForms[n.locale||""])),s=this._pluralFuncs[n.locale||""](t)),(void 0===!s.plural||s.plural>s.nplurals||e.length<=s.plural)&&(s.plural=0),this._stringsPrefix+gettext_Gettext.strfmt(this.removeContext(e[s.plural]),...[t].concat(i))}setMessages(e,t,n,i){e=utils_normalizeDomain(e),i&&(this._pluralForms[t]=i),this._dictionary[e]||(this._dictionary[e]={}),this._dictionary[e][t]=n}}class NullTranslator{constructor(e){this.languageCode=tokens_DEFAULT_LANGUAGE_CODE,this._languageBundle=e}load(e){return this._languageBundle}}class NullLanguageBundle{__(e,...t){return this.gettext(e,...t)}_n(e,t,n,...i){return this.ngettext(e,t,n,...i)}_p(e,t,...n){return this.pgettext(e,t,...n)}_np(e,t,n,i,...s){return this.npgettext(e,t,n,i,...s)}gettext(e,...t){return gettext_Gettext.strfmt(e,...t)}ngettext(e,t,n,...i){return gettext_Gettext.strfmt(1==n?e:t,...[n].concat(i))}pgettext(e,t,...n){return gettext_Gettext.strfmt(t,...n)}npgettext(e,t,n,i,...s){return this.ngettext(t,n,i,...s)}dcnpgettext(e,t,n,i,s,...r){return this.ngettext(n,i,s,...r)}}const nullTranslator=new NullTranslator(new NullLanguageBundle);class TranslationManager{constructor(e="",t,n,i){this._domainData={},this._translationBundles={},this._connector=null!=i?i:new TranslatorConnector(e,n),this._stringsPrefix=t||"",this._englishBundle=new Gettext({stringsPrefix:this._stringsPrefix}),this._currentLocale=DEFAULT_LANGUAGE_CODE}get languageCode(){return this._currentLocale}async fetch(e){var t,n,i,s;let r;if(this._languageData=await this._connector.fetch({language:e}),this._languageData&&"default"===e)try{for(const e of Object.values(null!==(t=this._languageData.data)&&void 0!==t?t:{})){r=e[""].language;break}}catch(e){}this._currentLocale=("default"!==e?e:null!=r?r:DEFAULT_LANGUAGE_CODE).replace("_","-"),this._domainData=null!==(i=null===(n=this._languageData)||void 0===n?void 0:n.data)&&void 0!==i?i:{};const o=null===(s=this._languageData)||void 0===s?void 0:s.message;o&&this._currentLocale!==DEFAULT_LANGUAGE_CODE&&console.warn(o)}load(e){if(this._domainData){if(this._currentLocale==DEFAULT_LANGUAGE_CODE)return this._englishBundle;if(!((e=normalizeDomain(e))in this._translationBundles)){let t=new Gettext({domain:e,locale:this._currentLocale,stringsPrefix:this._stringsPrefix});if(e in this._domainData){const n=this._domainData[e][""],i={...this._domainData[e],"":{...n,pluralForms:n.plural_forms}};t.loadJSON(i,e)}this._translationBundles[e]=t}return this._translationBundles[e]}return this._englishBundle}}var react=__webpack_require__(6540),client=__webpack_require__(5338);class ReactWidget extends Widget{constructor(){super(),this._rootDOM=null}static create(e){return new class extends ReactWidget{render(){return e}}}onUpdateRequest(e){this.renderPromise=this.renderDOM()}onAfterAttach(e){MessageLoop.sendMessage(this,Widget.Msg.UpdateRequest)}onBeforeDetach(e){null!==this._rootDOM&&(this._rootDOM.unmount(),this._rootDOM=null)}renderDOM(){return new Promise(e=>{const t=this.render();null===this._rootDOM&&(this._rootDOM=(0,client.H)(this.node)),Array.isArray(t)||t?(this._rootDOM.render(t),requestIdleCallback(()=>e())):(this._rootDOM.unmount(),this._rootDOM=null,requestIdleCallback(()=>e()))})}}class VDomRenderer extends ReactWidget{constructor(e){super(),this._modelChanged=new signaling_dist_index_es6.Signal(this),this.model=null!=e?e:null}get modelChanged(){return this._modelChanged}set model(e){this._model!==e&&(this._model&&this._model.stateChanged.disconnect(this.update,this),this._model=e,e&&e.stateChanged.connect(this.update,this),this.update(),this._modelChanged.emit(void 0))}get model(){return this._model}dispose(){this.isDisposed||(this._model=null,super.dispose())}}class UseSignal extends react.Component{constructor(e){super(e),this.slot=(e,t)=>{this.props.shouldUpdate&&!this.props.shouldUpdate(e,t)||this.setState({value:[e,t]})},this.state={value:[this.props.initialSender,this.props.initialArgs]}}componentDidMount(){this.props.signal.connect(this.slot)}componentWillUnmount(){this.props.signal.disconnect(this.slot)}render(){return this.props.children(...this.state.value)}}class VDomModel{constructor(){this.stateChanged=new Signal(this),this._isDisposed=!1}get isDisposed(){return this._isDisposed}dispose(){this.isDisposed||(this._isDisposed=!0,Signal.clearData(this))}}function _classes(e){return e.map(e=>e&&"object"==typeof e?Object.keys(e).map(t=>!!e[t]&&t):"string"==typeof e?e.split(/\s+/):[]).reduce((e,t)=>e.concat(t),[]).filter(e=>!!e)}function classes(...e){return _classes(e).join(" ")}function classesDedupe(...e){return[...new Set(_classes(e))].join(" ")}function getReactAttrs(e,{ignore:t=[]}={}){return e.getAttributeNames().reduce((n,i)=>("style"===i||t.includes(i)||(i.startsWith("data")||i.startsWith("aria")?n[i]=e.getAttribute(i):n[coreutils_lib.Text.camelCase(i)]=e.getAttribute(i)),n),{})}function isTreeItemElement(e){return e instanceof HTMLElement&&"treeitem"===e.getAttribute("role")}function getTreeItemElement(e){let t=e;for(;t&&!isTreeItemElement(t);)t=t.parentElement;return isTreeItemElement(t)?t:null}function Button(e){const{minimal:t,small:n,children:i,...s}=e;return react.createElement("button",{...s,className:classes(e.className,t?"jp-mod-minimal":"",n?"jp-mod-small":"","jp-Button")},i)}const bad_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path\n class="jp-icon0"\n fill="#000"\n d="M24 20.188l-8.315-8.209 8.2-8.282-3.697-3.697-8.212 8.318-8.31-8.203-3.666 3.666 8.321 8.24-8.206 8.313 3.666 3.666 8.237-8.318 8.285 8.203z"\n />\n</svg>\n',blank_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path\n fill="#000"\n fill-opacity="0.0"\n d="M24 20.188l-8.315-8.209 8.2-8.282-3.697-3.697-8.212 8.318-8.31-8.203-3.666 3.666 8.321 8.24-8.206 8.313 3.666 3.666 8.237-8.318 8.285 8.203z"\n />\n</svg>\n',refresh_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 18 18">\n <path fill="#616161" d="M9 13.5c-2.49 0-4.5-2.01-4.5-4.5S6.51 4.5 9 4.5c1.24 0 2.36.52 3.17 1.33L10 8h5V3l-1.76 1.76A6 6 0 0 0 9 3C5.69 3 3.01 5.69 3.01 9S5.69 15 9 15a5.98 5.98 0 0 0 5.9-5h-1.52c-.46 2-2.24 3.5-4.38 3.5" class="jp-icon3"/>\n</svg>\n';var typestyle_lib=__webpack_require__(1326),LabIconStyle,labicon_Private;!function(e){const t={breadCrumb:{container:{$nest:{"&:first-child svg":{bottom:"1px",marginLeft:"0px",position:"relative"},"&:hover":{backgroundColor:"var(--jp-layout-color2)"},".jp-mod-dropTarget&":{backgroundColor:"var(--jp-brand-color2)",opacity:.7}}},element:{borderRadius:"var(--jp-border-radius)",cursor:"pointer",margin:"0px 2px",padding:"0px 2px",height:"16px",width:"16px",verticalAlign:"middle"}},commandPaletteHeader:{container:{height:"14px",margin:"0 14px 0 auto"},element:{height:"14px",width:"14px"},options:{elementPosition:"center"}},commandPaletteItem:{element:{height:"16px",width:"16px"},options:{elementPosition:"center"}},launcherCard:{container:{height:"52px",width:"52px"},element:{height:"52px",width:"52px"},options:{elementPosition:"center"}},launcherSection:{container:{boxSizing:"border-box",marginRight:"12px",height:"32px",width:"32px"},element:{height:"32px",width:"32px"},options:{elementPosition:"center"}},listing:{container:{flex:"0 0 20px",marginRight:"4px",position:"relative"},element:{height:"16px",width:"16px"},options:{elementPosition:"center"}},listingHeaderItem:{container:{display:"inline",height:"16px",width:"16px"},element:{height:"auto",margin:"-2px 0 0 0",width:"20px"},options:{elementPosition:"center"}},mainAreaTab:{container:{$nest:{".lm-DockPanel-tabBar &":{marginRight:"4px"}}},element:{$nest:{".lm-DockPanel-tabBar &":{height:"14px",width:"14px"}}},options:{elementPosition:"center"}},menuItem:{container:{display:"inline-block",verticalAlign:"middle"},element:{height:"16px",width:"16px"},options:{elementPosition:"center"}},runningItem:{container:{margin:"0px 4px 0px 4px"},element:{height:"16px",width:"16px"},options:{elementPosition:"center"}},select:{container:{pointerEvents:"none"},element:{position:"absolute",height:"auto",width:"16px"}},settingsEditor:{container:{display:"flex",flex:"0 0 20px",margin:"0 3px 0 0",position:"relative",height:"20px",width:"20px"},element:{height:"16px",width:"16px"},options:{elementPosition:"center"}},sideBar:{element:{height:"auto",width:"20px"},options:{elementPosition:"center"}},splash:{container:{animation:"0.3s fade-in linear forwards",height:"100%",width:"100%",zIndex:1},element:{width:"100px"},options:{elementPosition:"center"}},statusBar:{element:{left:"0px",top:"0px",height:"18px",width:"20px",position:"relative"}},toolbarButton:{container:{display:"inline-block",verticalAlign:"middle"},element:{height:"16px",width:"16px"},options:{elementPosition:"center"}}};function n(e){return{container:{alignItems:"center",display:"flex"},element:{display:"block",...e}}}const i={center:n({margin:"0 auto",width:"100%"}),top:n({margin:"0 0 auto 0"}),right:n({margin:"0 0 0 auto"}),bottom:n({margin:"auto 0 0 0"}),left:n({margin:"0 auto 0 0"}),"top right":n({margin:"0 0 auto auto"}),"bottom right":n({margin:"auto 0 0 auto"}),"bottom left":n({margin:"auto auto 0 0"}),"top left":n({margin:"0 auto 0 auto"})};function s(e){return{element:{height:e,width:e}}}const r={small:s("14px"),normal:s("16px"),large:s("20px"),xlarge:s("24px")};const o=new Map;e.styleClass=function(e){if(!e||0===Object.keys(e).length)return"";let{elementPosition:n,elementSize:s,stylesheet:a,...l}=e;const c={...n&&{elementPosition:n},...s&&{elementSize:s}},d="string"==typeof a&&0===Object.keys(l).length,u=d?[a,n,s].join(","):"";if(d&&o.has(u))return o.get(u);const h=function(e){return e?(Array.isArray(e)||(e=[e]),e.map(e=>"string"==typeof e?t[e]:e)):[]}(a);h.push({element:l,options:c});const p=function(e){var t;return(0,typestyle_lib.iF)({...e.container,$nest:{...null===(t=e.container)||void 0===t?void 0:t.$nest,svg:e.element}})}(function(e){const t=Object.assign({},...e.map(e=>e.options));return t.elementPosition&&e.unshift(i[t.elementPosition]),t.elementSize&&e.unshift(r[t.elementSize]),function(e){return{container:Object.assign({},...e.map(e=>e.container)),element:Object.assign({},...e.map(e=>e.element))}}(e)}(h));return d&&o.set(u,p),p}}(LabIconStyle||(LabIconStyle={}));class LabIcon{static remove(e){for(;e.firstChild;)e.firstChild.remove();return e.className="",e}static resolve({icon:e}){if(e instanceof LabIcon)return e;if("string"==typeof e){return LabIcon._instances.get(e)||(LabIcon._debug&&console.warn(`Lookup failed for icon, creating loading icon. icon: ${e}`),new LabIcon({name:e,svgstr:refresh_namespaceObject,_loading:!0}))}return new LabIcon(e)}static resolveElement({icon:e,iconClass:t,fallback:n,...i}){return labicon_Private.isResolvable(e)?LabIcon.resolve({icon:e}).element(i):!t&&n?n.element(i):(i.className=classes(t,i.className),labicon_Private.blankElement(i))}static resolveReact({icon:e,iconClass:t,fallback:n,...i}){if(!labicon_Private.isResolvable(e))return!t&&n?react.createElement(n.react,{...i}):(i.className=classes(t,i.className),react.createElement(labicon_Private.blankReact,{...i}));const s=LabIcon.resolve({icon:e});return react.createElement(s.react,{...i})}static resolveSvg({name:e,svgstr:t}){const n=(new DOMParser).parseFromString(labicon_Private.svgstrShim(t),"image/svg+xml"),i=n.querySelector("parsererror");if(i){const n=`SVG HTML was malformed for LabIcon instance.\nname: ${e}, svgstr: ${t}`;return LabIcon._debug?(console.error(n),i):(console.warn(n),null)}return n.documentElement}static toggleDebug(e){LabIcon._debug=null!=e?e:!LabIcon._debug}constructor({name:e,svgstr:t,render:n,unrender:i,_loading:s=!1}){if(this._props={},this._svgReplaced=new signaling_dist_index_es6.Signal(this),this._svgElement=void 0,this._svgInnerHTML=void 0,this._svgReactAttrs=void 0,!e||!t)return console.error(`When defining a new LabIcon, name and svgstr must both be non-empty strings. name: ${e}, svgstr: ${t}`),badIcon;if(this._loading=s,LabIcon._instances.has(e)){const n=LabIcon._instances.get(e);return this._loading?(n.svgstr=t,this._loading=!1,n):(LabIcon._debug&&console.warn(`Redefining previously loaded icon svgstr. name: ${e}, svgstrOld: ${n.svgstr}, svgstr: ${t}`),n.svgstr=t,n)}this.name=e,this.react=this._initReact(e),this.svgstr=t,this._initRender({render:n,unrender:i}),LabIcon._instances.set(this.name,this)}bindprops(e){const t=Object.create(this);return t._props=e,t.react=t._initReact(t.name+"_bind"),t}element(e={}){var t;let{className:n,container:i,label:s,title:r,tag:o="div",...a}={...this._props,...e};const l=null==i?void 0:i.firstChild;if((null===(t=null==l?void 0:l.dataset)||void 0===t?void 0:t.iconId)===this._uuid)return l;if(!this.svgElement)return document.createElement("div");if(i)for(;i.firstChild;)i.firstChild.remove();else o&&(i=document.createElement(o));const c=this.svgElement.cloneNode(!0);return i?(null!=s&&(i.textContent=s),labicon_Private.initContainer({container:i,className:n,styleProps:a,title:r}),i.appendChild(c),i):(s&&console.warn(),c)}render(e,t){var n;let i=null===(n=null==t?void 0:t.children)||void 0===n?void 0:n[0];"string"!=typeof i&&(i=void 0),this.element({container:e,label:i,...null==t?void 0:t.props})}get svgElement(){return void 0===this._svgElement&&(this._svgElement=this._initSvg({uuid:this._uuid})),this._svgElement}get svgInnerHTML(){return void 0===this._svgInnerHTML&&(null===this.svgElement?this._svgInnerHTML=null:this._svgInnerHTML=this.svgElement.innerHTML),this._svgInnerHTML}get svgReactAttrs(){return void 0===this._svgReactAttrs&&(null===this.svgElement?this._svgReactAttrs=null:this._svgReactAttrs=getReactAttrs(this.svgElement,{ignore:["data-icon-id"]})),this._svgReactAttrs}get svgstr(){return this._svgstr}set svgstr(e){this._svgstr=e;const t=dist.UUID.uuid4(),n=this._uuid;this._uuid=t,this._svgElement=void 0,this._svgInnerHTML=void 0,this._svgReactAttrs=void 0,document.querySelectorAll(`[data-icon-id="${n}"]`).forEach(e=>{this.svgElement&&e.replaceWith(this.svgElement.cloneNode(!0))}),this._svgReplaced.emit()}_initReact(e){const t=react.forwardRef((e={},t)=>{const{className:n,container:i,label:s,title:r,slot:o,tag:a="div",...l}={...this._props,...e},[,c]=react.useState(this._uuid);react.useEffect(()=>{const e=()=>{c(this._uuid)};return this._svgReplaced.connect(e),()=>{this._svgReplaced.disconnect(e)}});const d=null!=a?a:react.Fragment;if(!this.svgInnerHTML||!this.svgReactAttrs)return react.createElement(react.Fragment,null);const u={...this.svgReactAttrs};a||Object.assign(u,{className:n||l?classes(n,LabIconStyle.styleClass(l)):void 0,title:r,slot:o});const h=react.createElement("svg",{...u,...this.svgReactAttrs,dangerouslySetInnerHTML:{__html:this.svgInnerHTML},ref:t});if(i)return labicon_Private.initContainer({container:i,className:n,styleProps:l,title:r}),react.createElement(react.Fragment,null,h,s);{let e={};return d!==react.Fragment&&(e={className:n||l?classes(n,LabIconStyle.styleClass(l)):void 0,title:r,slot:o}),react.createElement(d,{...e},h,s)}});return t.displayName=`LabIcon_${e}`,t}_initRender({render:e,unrender:t}){e?(this.render=e,t&&(this.unrender=t)):t&&console.warn("In _initRender, ignoring unrender arg since render is undefined")}_initSvg({title:e,uuid:t}={}){const n=LabIcon.resolveSvg(this);return n?("parsererror"!==n.tagName&&(n.dataset.icon=this.name,t&&(n.dataset.iconId=t),e?labicon_Private.setTitleSvg(n,e):n.setAttribute("aria-hidden","true")),n):n}}LabIcon._debug=!1,LabIcon._instances=new Map,function(e){function t({container:e,className:t,styleProps:n,title:i}){null!=i&&(e.title=i);const s=LabIconStyle.styleClass(n);if(null!=t){const n=classes(t,s);return e.className=n,n}return s?(e.classList.add(s),s):""}e.blankElement=function({className:t="",container:n,label:i,title:s,tag:r="div",slot:o,...a}){if((null==n?void 0:n.className)===t)return n;if(n)for(;n.firstChild;)n.firstChild.remove();else n=document.createElement(null!=r?r:"div");return null!=i&&(n.textContent=i),e.initContainer({container:n,className:t,styleProps:a,title:s}),n},e.blankReact=react.forwardRef(({className:e="",container:n,label:i,title:s,tag:r="div",...o},a)=>{const l=null!=r?r:"div";return n?(t({container:n,className:e,styleProps:o,title:s}),react.createElement(react.Fragment,null)):react.createElement(l,{className:classes(e,LabIconStyle.styleClass(o))},a&&blankIcon.react({ref:a}),i)}),e.blankReact.displayName="BlankReact",e.initContainer=t,e.isResolvable=function(e){return!(!e||!("string"==typeof e||e.name&&e.svgstr))},e.setTitleSvg=function(e,t){const n=e.getElementsByTagName("title");if(n.length)n[0].textContent=t;else{const n=document.createElement("title");n.textContent=t,e.appendChild(n)}},e.svgstrShim=function(e,t=!0){const[,n,i]=decodeURIComponent(e).replace(/>\s*\n\s*</g,"><").replace(/\s*\n\s*/g," ").match(t?/^(?:data:.*?(;base64)?,)?(.*)/:/(?:(base64).*)?(<svg.*)/);return n?atob(i):i};class n{constructor(e,t){this._icon=e,this._rendererOptions=t}render(e,t){}}e.Renderer=n,e.ElementRenderer=class extends n{render(e,t){var n,i;let s=null===(n=null==t?void 0:t.children)||void 0===n?void 0:n[0];"string"!=typeof s&&(s=void 0),this._icon.element({container:e,label:s,...null===(i=this._rendererOptions)||void 0===i?void 0:i.props,...null==t?void 0:t.props})}},e.ReactRenderer=class extends n{constructor(){super(...arguments),this._rootDOM=null}render(e,t){var n,i;let s=null===(n=null==t?void 0:t.children)||void 0===n?void 0:n[0];"string"!=typeof s&&(s=void 0);const r=this._icon;null!==this._rootDOM&&this._rootDOM.unmount(),this._rootDOM=(0,client.H)(e),this._rootDOM.render(react.createElement(r.react,{container:e,label:s,...null===(i=this._rendererOptions)||void 0===i?void 0:i.props,...null==t?void 0:t.props}))}unrender(e){null!==this._rootDOM&&(this._rootDOM.unmount(),this._rootDOM=null)}}}(labicon_Private||(labicon_Private={}));const badIcon=new LabIcon({name:"ui-components:bad",svgstr:bad_namespaceObject}),blankIcon=new LabIcon({name:"ui-components:blank",svgstr:blank_namespaceObject}),add_above_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="none" viewBox="0 0 14 14">\n <g clip-path="url(#addabovea)">\n <path fill="#616161" stroke="#616161" stroke-width=".7" d="M4.75 4.93h1.875v1.876c0 .206.169.375.375.375a.376.376 0 0 0 .375-.375V4.93H9.25a.376.376 0 0 0 .375-.375.376.376 0 0 0-.375-.375H7.375V2.306A.376.376 0 0 0 7 1.93a.376.376 0 0 0-.375.375V4.18H4.75a.376.376 0 0 0-.375.375c0 .206.169.375.375.375Z" class="jp-icon3"/>\n </g>\n <path fill="#616161" fill-rule="evenodd" d="M11.5 9.5v2h-9v-2zM12 8a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1z" class="jp-icon3" clip-rule="evenodd"/>\n <defs>\n <clipPath id="addabovea">\n <path fill="#fff" d="M10 1.556H4v6h6z" class="jp-icon3"/>\n </clipPath>\n </defs>\n</svg>\n',add_below_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="none" viewBox="0 0 14 14">\n <g clip-path="url(#addbelowa)">\n <path fill="#616161" stroke="#616161" stroke-width=".7" d="M9.25 10.07H7.375V8.193A.376.376 0 0 0 7 7.82a.376.376 0 0 0-.375.375v1.875H4.75a.376.376 0 0 0-.375.375c0 .207.169.375.375.375h1.875v1.875c0 .207.169.375.375.375a.376.376 0 0 0 .375-.375V10.82H9.25a.376.376 0 0 0 .375-.375.376.376 0 0 0-.375-.375Z" class="jp-icon3"/>\n </g>\n <path fill="#616161" fill-rule="evenodd" d="M2.5 5.5v-2h9v2zM2 7a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1z" class="jp-icon3" clip-rule="evenodd"/>\n <defs>\n <clipPath id="addbelowa">\n <path fill="#fff" d="M4 13.444h6v-6H4z" class="jp-icon3"/>\n </clipPath>\n </defs>\n</svg>\n',add_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z" class="jp-icon3"/>\n</svg>\n',audio_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\r\n <path class="jp-icon3 jp-icon-selectable" fill="#616161" d="M13,4V20a1,1,0,0,1-2,0V4a1,1,0,0,1,2,0ZM8,5A1,1,0,0,0,7,6V18a1,1,0,0,0,2,0V6A1,1,0,0,0,8,5ZM4,7A1,1,0,0,0,3,8v8a1,1,0,0,0,2,0V8A1,1,0,0,0,4,7ZM16,5a1,1,0,0,0-1,1V18a1,1,0,0,0,2,0V6A1,1,0,0,0,16,5Zm4,2a1,1,0,0,0-1,1v8a1,1,0,0,0,2,0V8A1,1,0,0,0,20,7Z"/>\r\n</svg>\r\n',bell_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" version="1.1" viewBox="0 0 16 16">\n <path fill="#333" d="M8 .29c-1.4 0-2.7.73-3.6 1.8-1.2 1.5-1.4 3.4-1.5 5.2-.18 2.2-.44 4-2.3 5.3l.28 1.3h5c.026.66.32 1.1.71 1.5.84.61 2 .61 2.8 0 .52-.4.6-1 .71-1.5h5l.28-1.3c-1.9-.97-2.2-3.3-2.3-5.3-.13-1.8-.26-3.7-1.5-5.2-.85-1-2.2-1.8-3.6-1.8zm0 1.4c.88 0 1.9.55 2.5 1.3.88 1.1 1.1 2.7 1.2 4.4.13 1.7.23 3.6 1.3 5.2H3c1.1-1.6 1.2-3.4 1.3-5.2.13-1.7.3-3.3 1.2-4.4.59-.72 1.6-1.3 2.5-1.3m-.74 12h1.5c-.001.28.015.79-.74.79-.73.002-.72-.53-.74-.79z" class="jp-icon2 jp-icon-selectable"/>\n</svg>\n',breakpoint_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16">\n <g fill="var(--jp-error-color1, #d32f2f)">\n <circle cx="10" cy="7" r="6" />\n </g>\n</svg>\n',bug_dot_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">\n <g fill="#616161" class="jp-icon3 jp-icon-selectable">\n <path fill-rule="evenodd" d="M17.19 8H20v2h-2.09c.05.33.09.66.09 1v1h2v2h-2v.027a4.5 4.5 0 0 0-3.545 6.447A5.997 5.997 0 0 1 6.81 18H4v-2h2.09c-.05-.33-.09-.66-.09-1v-1H4v-2h2v-1c0-.34.04-.67.09-1H4V8h2.81c.45-.78 1.07-1.45 1.81-1.96L7 4.41 8.41 3l2.18 2.17c.45-.11.92-.17 1.41-.17s.96.06 1.42.17L15.59 3 17 4.41l-1.63 1.63c.75.51 1.37 1.18 1.82 1.96M10 16h4v-2h-4zm0-4h4v-2h-4z" clip-rule="evenodd"/>\n <path d="M22 18.5a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0"/>\n </g>\n</svg>\n',bug_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M20 8h-2.81a6 6 0 0 0-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5s-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20zm-6 8h-4v-2h4zm0-4h-4v-2h4z" class="jp-icon3 jp-icon-selectable"/>\n</svg>\n',build_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M14.9 17.45c1.35 0 2.45-1.1 2.45-2.45s-1.1-2.45-2.45-2.45c-1.36 0-2.45 1.1-2.45 2.45s1.09 2.45 2.45 2.45m5.2-1.77 1.48 1.16c.13.11.17.29.08.45l-1.4 2.42a.35.35 0 0 1-.43.15l-1.74-.7c-.36.28-.76.51-1.18.69l-.27 1.85c-.02.17-.17.3-.34.3h-2.8c-.18 0-.32-.13-.35-.3l-.26-1.85c-.43-.18-.82-.41-1.18-.69l-1.75.7c-.15.06-.34 0-.42-.15l-1.4-2.42a.35.35 0 0 1 .08-.45l1.48-1.16-.05-.68.05-.69-1.48-1.15a.35.35 0 0 1-.08-.45l1.4-2.42c.08-.16.27-.22.42-.16l1.75.71c.36-.28.75-.52 1.18-.69l.26-1.86c.03-.16.17-.29.35-.29h2.8c.17 0 .32.13.34.29l.27 1.86c.42.17.82.41 1.18.69l1.74-.71c.17-.06.34 0 .43.16l1.4 2.42c.09.15.05.34-.08.45l-1.48 1.15.05.69zM7.33 7.445A1.566 1.566 0 0 0 7.904 5.3a1.575 1.575 0 1 0-.574 2.145m2.327-2.65 1.21.157c.096.025.173.12.171.236v1.8a.214.214 0 0 1-.183.223l-1.195.17-.42.75.43 1.126c.037.106 0 .22-.096.275l-1.559.9a.23.23 0 0 1-.294-.05l-.734-.95-.878-.001-.762.96c-.058.08-.173.1-.275.043l-1.56-.901a.23.23 0 0 1-.101-.276l.452-1.116-.246-.366-.194-.396-1.192-.166a.23.23 0 0 1-.189-.226V5.186c.002-.117.077-.206.175-.217l1.204-.175.446-.766-.456-1.11a.23.23 0 0 1 .104-.28l1.56-.9a.225.225 0 0 1 .285.054l.76.936.86.01.745-.949a.214.214 0 0 1 .284-.048l1.56.9a.24.24 0 0 1 .118.267l-.47 1.126.246.366z" class="jp-icon3"/>\n</svg>\n',caret_down_empty_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 18 18">\n <path fill="#616161" d="M5.2 5.9 9 9.7l3.8-3.8L14 7.1l-4.9 5-4.9-5z" class="jp-icon3" shape-rendering="geometricPrecision"/>\n</svg>\n',caret_down_empty_thin_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 20 20">\n <path fill="#616161" d="M9.9 13.6 3.6 7.4l.8-.8 5.5 5.6 5.5-5.5.7.7z" class="jp-icon3" shape-rendering="geometricPrecision"/>\n</svg>\n',caret_down_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 18 18">\n <path fill="#616161" d="M5.2 7.5 9 11.2l3.8-3.8H5.2z" class="jp-icon3" shape-rendering="geometricPrecision"/>\n</svg>\n',caret_left_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 18 18">\n <path fill="#616161" d="M10.8 12.8 7.1 9l3.8-3.8v7.6z" class="jp-icon3" shape-rendering="geometricPrecision"/>\n</svg>\n',caret_right_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 18 18">\n <path fill="#616161" d="M7.2 5.2 10.9 9l-3.8 3.8V5.2z" class="jp-icon3" shape-rendering="geometricPrecision"/>\n</svg>\n',caret_up_empty_thin_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 20 20">\n <path fill="#616161" d="M15.4 13.3 9.9 7.7l-5.5 5.5-.8-.7 6.3-6.2 6.2 6.3z" class="jp-icon3" shape-rendering="geometricPrecision"/>\n</svg>\n',caret_up_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 18 18">\n <path fill="#616161" d="M5.2 10.5 9 6.8l3.8 3.8H5.2z" class="jp-icon3" shape-rendering="geometricPrecision"/>\n</svg>\n',case_sensitive_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 20 20">\n <path fill="#414141" d="M2 2h16v16H2z" class="jp-icon2"/>\n <path fill="#FFF" d="M7.6 8h.9l3.5 8h-1.1l-.9-2H6l-.9 2H4zM8 9.1 6.4 13h3.2zm8.6.7c-.2.1-.4.1-.7.1-.2 0-.4-.1-.6-.2-.1-.1-.2-.4-.2-.7-.3.3-.6.5-.9.7-.3.1-.7.2-1.1.2-.3 0-.5 0-.7-.1l-.6-.3c-.2-.1-.3-.3-.4-.5s-.1-.4-.1-.7.1-.6.2-.8.3-.4.4-.5c.1 0 .3-.1.6-.2.2-.1.5-.1.7-.2.3-.1.5-.1.7-.1s.4-.1.6-.1.3-.1.4-.2.2-.2.2-.4c0-1-1.1-1-1.3-1-.4 0-1.4 0-1.4 1.2h-.9c0-.4.1-.7.2-1 .1-.2.3-.4.5-.6s.5-.3.8-.3c.3-.1.6-.1.9-.1s.5 0 .8.1c.3 0 .5.1.7.2s.4.3.5.5.1.4.1.8V9c0 .1.1.2.3.2h.3zm-1.4-2.9c-1.2.6-3.1.2-3.1 1.4 0 1.4 3.1 1 3.1-.5z" class="jp-icon-accent2"/>\n</svg>\n',check_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" class="jp-icon3 jp-icon-selectable"/>\n</svg>\n',circle_empty_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8" class="jp-icon3"/>\n</svg>\n',circle_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 18 18">\n <circle cx="9" cy="9" r="8" fill="#616161" class="jp-icon3"/>\n</svg>\n',cleaning_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path fill="#616161" d="M16 11h-1V3c0-1.1-.9-2-2-2h-2c-1.1 0-2 .9-2 2v8H8c-2.76 0-5 2.24-5 5v7h18v-7c0-2.76-2.24-5-5-5m3 10h-2v-3c0-.55-.45-1-1-1s-1 .45-1 1v3h-2v-3c0-.55-.45-1-1-1s-1 .45-1 1v3H9v-3c0-.55-.45-1-1-1s-1 .45-1 1v3H5v-5c0-1.65 1.35-3 3-3h8c1.65 0 3 1.35 3 3z" class="jp-icon3"/>\n</svg>\n',clear_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <mask id="cleara">\n <path fill="#fff" d="M0 0h24v24H0z"/>\n <circle cx="12" cy="12" r="8" fill="#000"/>\n </mask>\n <g fill="#616161" class="jp-icon3">\n <path d="M4.929 6.343 6.343 4.93l12.728 12.728-1.414 1.414z"/>\n <circle cx="12" cy="12" r="10" mask="url(#cleara)"/>\n </g>\n</svg>\n',close_all_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <g fill="#616161" class="jp-icon3">\n <path d="M16.48 17.248A7.5 7.5 0 0 0 6.32 7.706a7 7 0 1 1 10.16 9.542"/>\n <path d="M19.16 14.248A7.5 7.5 0 0 0 9 4.706a7 7 0 1 1 10.16 9.542M16 15a7 7 0 1 1-14 0 7 7 0 0 1 14 0m-4.209-4L13 12.209 10.209 15 13 17.791 11.791 19 9 16.209 6.209 19 5 17.791 7.791 15 5 12.209 6.209 11 9 13.791z"/>\n </g>\n</svg>\n',close_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <circle cx="12" cy="12" r="11" fill="none" class="jp-icon-none jp-icon-selectable-inverse jp-icon3-hover"/>\n <path fill="#616161" d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" class="jp-icon3 jp-icon-selectable jp-icon-accent2-hover"/>\n <circle cx="12" cy="12" r="7" fill="none" class="jp-icon-none jp-icon-busy"/>\n</svg>\n',code_check_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" viewBox="0 0 24 24">\n <path fill="#616161" d="M6.59 3.41 2 8l4.59 4.6L8 11.18 4.82 8 8 4.82zm5.82 0L11 4.82 14.18 8 11 11.18l1.41 1.42L17 8zm9.18 8.18-8.09 8.09L9.83 16l-1.41 1.41 5.08 5.09L23 13z" class="jp-icon3 jp-icon-selectable" shape-rendering="geometricPrecision"/>\n</svg>\n',code_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 28 28">\n <path fill="#616161" d="M11.4 18.6 6.8 14l4.6-4.6L10 8l-6 6 6 6zm5.2 0 4.6-4.6-4.6-4.6L18 8l6 6-6 6z" class="jp-icon3"/>\n</svg>\n',collapse_all_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <g fill="#616161" class="jp-icon3">\n <path d="M8 2h12c1 0 2 1 2 2v12c0 1 0 2-2 2V4H6c0-2 1-2 2-2"/>\n <path d="M18 8c0-1-1-2-2-2H4C3 6 2 7 2 8v12c0 1 1 2 2 2h12c1 0 2-1 2-2zm-2 0v12H4V8z"/>\n <path d="M6 13v2h8v-2z"/>\n </g>\n</svg>\n',collapse_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 8.5 10.5">\n <g fill="#BDBDBD" class="jp-icon-output">\n <path d="M.019 0h8.458v1.064H.019zM0 9.52h8.491v1.059H0zm4.776-6.608H3.72V1.323h1.056z"/>\n <path d="m4.244 5.243-1.06-1.167-1.06-1.167h4.24l-1.06 1.167zm.528 4.014H3.716V7.665h1.056z"/>\n <path d="M4.242 5.332 5.302 6.5l1.06 1.167h-4.24L3.182 6.5z"/>\n </g>\n</svg>\n',console_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 200 200">\n <path fill="#0288D1" d="M20 19.8h160v159.9H20z" class="jp-console-icon-background-color jp-icon-selectable"/>\n <path fill="#fff" d="M105 127.3h40v12.8h-40zM51.1 77 74 99.9l-23.3 23.3 10.5 10.5 23.3-23.3L95 99.9 84.5 89.4 61.6 66.5z" class="jp-console-icon-color jp-icon-selectable-inverse"/>\n</svg>\n',copy_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 18 18">\n <path fill="#616161" d="M11.9 1H3.2c-.8 0-1.5.7-1.5 1.5v10.2h1.5V2.5h8.7zm2.2 2.9h-8c-.8 0-1.5.7-1.5 1.5v10.2c0 .8.7 1.5 1.5 1.5h8c.8 0 1.5-.7 1.5-1.5V5.4c-.1-.8-.7-1.5-1.5-1.5m0 11.6h-8V5.4h8z" class="jp-icon3"/>\n</svg>\n',copyright_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path fill="#616161" d="M11.88 9.14c1.28.06 1.61 1.15 1.63 1.66h1.79c-.08-1.98-1.49-3.19-3.45-3.19C9.64 7.61 8 9 8 12.14c0 1.94.93 4.24 3.84 4.24 2.22 0 3.41-1.65 3.44-2.95h-1.79c-.03.59-.45 1.38-1.63 1.44-1.31-.04-1.86-1.06-1.86-2.73 0-2.89 1.28-2.98 1.88-3M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8" class="jp-icon3"/>\n</svg>\n',cut_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M9.64 7.64c.23-.5.36-1.05.36-1.64 0-2.21-1.79-4-4-4S2 3.79 2 6s1.79 4 4 4c.59 0 1.14-.13 1.64-.36L10 12l-2.36 2.36C7.14 14.13 6.59 14 6 14c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4c0-.59-.13-1.14-.36-1.64L12 14l7 7h3v-1zM6 8c-1.1 0-2-.89-2-2s.9-2 2-2 2 .89 2 2-.9 2-2 2m0 12c-1.1 0-2-.89-2-2s.9-2 2-2 2 .89 2 2-.9 2-2 2m6-7.5c-.28 0-.5-.22-.5-.5s.22-.5.5-.5.5.22.5.5-.22.5-.5.5M19 3l-6 6 2 2 7-7V3z" class="jp-icon3"/>\n</svg>\n',delete_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24">\n <path fill="#626262" d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z" class="jp-icon3"/>\n</svg>\n',dock_bottom_namespaceObject='<svg width="16" version="1.1" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg">\n <path class="jp-icon3" d="m19.8 19.8v-17.6h-17.6v17.6zm-15.408-2.2v-3.8027h13.208v3.8027zm13.208-5.5301h-13.218v-7.6699h13.218z" fill="#616161"/>\n</svg>\n',dock_left_namespaceObject='<svg width="16" version="1.1" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg">\n <path class="jp-icon3" d="m2.2 19.8h17.6v-17.6h-17.6zm2.2-15.408h3.8027v13.208h-3.8027zm5.5301 13.208v-13.218h7.6699v13.218z" fill="#616161"/>\n</svg>\n',dock_right_namespaceObject='<svg width="16" version="1.1" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg">\n <path class="jp-icon3" d="m19.8 2.2h-17.6v17.6h17.6zm-2.2 15.408h-3.8027v-13.208h3.8027zm-5.5301-13.208v13.218h-7.6699v-13.218z" fill="#616161"/>\n</svg>\n',dock_top_namespaceObject='<svg width="16" version="1.1" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg">\n <path class="jp-icon3" d="m2.2 2.2v17.6h17.6v-17.6zm15.408 2.2v3.8027h-13.208v-3.8027zm-13.208 5.5301h13.218v7.6699h-13.218z" fill="#616161"/>\n</svg>\n',dots_namespaceObject='<?xml version="1.0" encoding="UTF-8"?>\n<svg width="16" version="1.1" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\n <g class="jp-icon3" transform="rotate(90,12,12)" fill="#616161">\n <circle cx="5" cy="12" r="2"/>\n <circle cx="12" cy="12" r="2"/>\n <circle cx="19" cy="12" r="2"/>\n </g>\n</svg>\n',download_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M19 9h-4V3H9v6H5l7 7zM5 18v2h14v-2z" class="jp-icon3"/>\n</svg>\n',duplicate_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="none" viewBox="0 0 14 14">\n <path fill="#616161" fill-rule="evenodd" d="M2.8.875h6.096c.305 0 .554.264.554.587s-.25.587-.554.587H3.354c-.305 0-.554.264-.554.587V9.68c0 .322-.25.587-.554.587s-.554-.264-.554-.587V2.049c0-.646.498-1.174 1.108-1.174M5.367 11.9V4.55h5.716v7.35zM4.142 4.142c0-.451.365-.817.816-.817h6.534c.45 0 .816.366.816.817v8.166a.817.817 0 0 1-.816.817H4.958a.817.817 0 0 1-.816-.817z" class="jp-icon3" clip-rule="evenodd"/>\n <path fill="#616161" stroke="#616161" stroke-width=".5" d="M9.436 8.265H8.364v1.071a.215.215 0 0 1-.214.215.215.215 0 0 1-.214-.215v-1.07H6.864a.215.215 0 0 1-.214-.215c0-.118.096-.215.214-.215h1.072v-1.07a.214.214 0 1 1 .428-.001v1.072h1.072c.118 0 .214.096.214.214a.215.215 0 0 1-.214.214Z" class="jp-icon3"/>\n</svg>\n',edit_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04a.996.996 0 0 0 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z" class="jp-icon3"/>\n</svg>\n',ellipses_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <g fill="#616161" class="jp-icon3">\n <circle cx="5" cy="12" r="2"/>\n <circle cx="12" cy="12" r="2"/>\n <circle cx="19" cy="12" r="2"/>\n </g>\n</svg>\n',error_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <g fill="#616161" class="jp-icon3">\n <circle cx="12" cy="19" r="2"/>\n <path d="M10 3h4v12h-4z"/>\n </g>\n</svg>\n',exceptions_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <g fill="#616161" class="jp-icon3">\n <path d="m12.039.5-.753 1.506L.5 23.576l23.082-.001zm.001 4.017 8.528 17.05-17.055.001z"/>\n <path d="M11 8h2v10h-2zm0 11h2v2h-2z"/>\n </g>\n</svg>\n',expand_all_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <g fill="#616161" class="jp-icon3">\n <path d="M8 2h12c1 0 2 1 2 2v12c0 1 0 2-2 2V4H6c0-2 1-2 2-2"/>\n <path d="M18 8c0-1-1-2-2-2H4C3 6 2 7 2 8v12c0 1 1 2 2 2h12c1 0 2-1 2-2zm-2 0v12H4V8z"/>\n <path d="M11 10H9v3H6v2h3v3h2v-3h3v-2h-3z"/>\n </g>\n</svg>\n',expand_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 8.5 10.5">\n <g fill="#BDBDBD" class="jp-icon-output">\n <path d="M.019 0h8.458v1.064H.019zM0 9.521h8.491v1.059H0zm3.712-5.822h1.056v1.589H3.712z"/>\n <path d="m4.244 1.368 1.06 1.167 1.06 1.167h-4.24l1.06-1.167zm-.532 3.92h1.056V6.88H3.712z"/>\n <path d="m4.242 9.213-1.06-1.167-1.06-1.167h4.24l-1.06 1.167z"/>\n </g>\n</svg>\n',extension_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M20.5 11H19V7c0-1.1-.9-2-2-2h-4V3.5a2.5 2.5 0 0 0-5 0V5H4c-1.1 0-1.99.9-1.99 2v3.8H3.5c1.49 0 2.7 1.21 2.7 2.7s-1.21 2.7-2.7 2.7H2V20c0 1.1.9 2 2 2h3.8v-1.5c0-1.49 1.21-2.7 2.7-2.7s2.7 1.21 2.7 2.7V22H17c1.1 0 2-.9 2-2v-4h1.5a2.5 2.5 0 0 0 0-5" class="jp-icon3"/>\n</svg>\n',fast_forward_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path fill="#616161" d="m4 18 8.5-6L4 6zm9-12v12l8.5-6z" class="jp-icon3"/>\n</svg>\n',file_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 22 22">\n <path fill="#616161" d="m19.3 8.2-5.5-5.5c-.3-.3-.7-.5-1.2-.5H3.9c-.8.1-1.6.9-1.6 1.8v14.1c0 .9.7 1.6 1.6 1.6h14.2c.9 0 1.6-.7 1.6-1.6V9.4c.1-.5-.1-.9-.4-1.2m-5.8-3.3 3.4 3.6h-3.4zm3.9 12.7H4.7c-.1 0-.2 0-.2-.2V4.7c0-.2.1-.3.2-.3h7.2v4.4s0 .8.3 1.1 1.1.3 1.1.3h4.3v7.2s-.1.2-.2.2" class="jp-icon3 jp-icon-selectable"/>\n</svg>\n',file_upload_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z" class="jp-icon3"/>\n</svg>\n',filter_dot_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#FFF" d="M14 12v7.88c.04.3-.06.62-.29.83a.996.996 0 0 1-1.41 0l-2.01-2.01a.99.99 0 0 1-.29-.83V12h-.03L4.21 4.62a1 1 0 0 1 .17-1.4c.19-.14.4-.22.62-.22h14c.22 0 .43.08.62.22a1 1 0 0 1 .17 1.4L14.03 12z" class="jp-icon3"/>\n <circle cx="18" cy="17" r="3" fill="#FFF" class="jp-icon-dot"/>\n</svg>\n',filter_list_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z" class="jp-icon3"/>\n</svg>\n',filter_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#FFF" d="M14 12v7.88c.04.3-.06.62-.29.83a.996.996 0 0 1-1.41 0l-2.01-2.01a.99.99 0 0 1-.29-.83V12h-.03L4.21 4.62a1 1 0 0 1 .17-1.4c.19-.14.4-.22.62-.22h14c.22 0 .43.08.62.22a1 1 0 0 1 .17 1.4L14.03 12z" class="jp-icon3"/>\n</svg>\n',folder_favorite_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="#000" viewBox="0 0 24 24">\n <path fill="#616161" d="M20 6h-8l-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2m-2.06 11L15 15.28 12.06 17l.78-3.33-2.59-2.24 3.41-.29L15 8l1.34 3.14 3.41.29-2.59 2.24z" class="jp-icon3 jp-icon-selectable"/>\n</svg>\n',folder_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z" class="jp-icon3 jp-icon-selectable"/>\n</svg>\n',history_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M13.5 8H12v5l4.28 2.54.72-1.21-3.5-2.08zM13 3a9 9 0 0 0-9 9H1l3.96 4.03L9 12H6a7 7 0 0 1 7-7 7 7 0 0 1 7 7 7 7 0 0 1-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42A8.9 8.9 0 0 0 13 21a9 9 0 0 0 9-9 9 9 0 0 0-9-9" class="jp-icon3"/>\n</svg>\n',home_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="#000" viewBox="0 0 24 24">\n <path fill="#616161" d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z" class="jp-icon3 jp-icon-selectable"/>\n</svg>\n',html5_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 512 512">\n <path fill="#000" d="M108.4 0h23v22.8h21.2V0h23v69h-23V46h-21v23h-23.2M206 23h-20.3V0h63.7v23H229v46h-23m53.5-69h24.1l14.8 24.3L313.2 0h24.1v69h-23V34.8l-16.1 24.8-16.1-24.8V69h-22.6m89.2-69h23v46.2h32.6V69h-55.6" class="jp-icon0 jp-icon-selectable"/>\n <path fill="#e44d26" d="m107.6 471-33-370.4h362.8l-33 370.2L255.7 512" class="jp-icon-selectable"/>\n <path fill="#f16529" d="M256 480.5V131h148.3L376 447" class="jp-icon-selectable"/>\n <path fill="#ebebeb" d="M142 176.3h114v45.4h-64.2l4.2 46.5h60v45.3H154.4m2 22.8H202l3.2 36.3 50.8 13.6v47.4l-93.2-26" class="jp-icon-selectable-inverse"/>\n <path fill="#fff" d="M369.6 176.3H255.8v45.4h109.6m-4.1 46.5H255.8v45.4h56l-5.3 59-50.7 13.6v47.2l93-25.8" class="jp-icon-selectable-inverse"/>\n</svg>\n',image_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 22 22">\n <path fill="#FFF" d="M2.2 2.2h17.5v17.5H2.2z" class="jp-icon-brand4 jp-icon-selectable-inverse"/>\n <path fill="#3F51B5" d="M2.2 2.2v17.5h17.5l.1-17.5zm12.1 2.2c1.2 0 2.2 1 2.2 2.2s-1 2.2-2.2 2.2-2.2-1-2.2-2.2 1-2.2 2.2-2.2M4.4 17.6l3.3-8.8 3.3 6.6 2.2-3.2 4.4 5.4z" class="jp-icon-brand0 jp-icon-selectable"/>\n</svg>\n',info_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 50.978 50.978">\n <g fill="#616161" class="jp-icon3">\n <path d="M43.52 7.458C38.711 2.648 32.307 0 25.489 0 18.67 0 12.266 2.648 7.458 7.458c-9.943 9.941-9.943 26.119 0 36.062 4.809 4.809 11.212 7.456 18.031 7.458h.002c6.816 0 13.221-2.648 18.029-7.458 4.809-4.809 7.457-11.212 7.457-18.03 0-6.82-2.649-13.224-7.457-18.032m-1.414 34.647c-4.432 4.431-10.332 6.872-16.615 6.872h-.002c-6.285-.001-12.187-2.441-16.617-6.872-9.162-9.163-9.162-24.071 0-33.233C13.303 4.44 19.204 2 25.489 2c6.284 0 12.186 2.44 16.617 6.872 4.431 4.431 6.871 10.332 6.871 16.617 0 6.283-2.441 12.186-6.871 16.616"/>\n <path d="M23.578 32.218q-.034-2.602.496-3.972t2.272-3.253q.702-.805 1.367-1.575.939-1.13 1.436-2.175.496-1.061.495-2.5 0-1.643-.779-2.979-.848-1.319-2.806-1.369-2.703.085-3.55 1.832a5.3 5.3 0 0 0-.607 1.814 11.3 11.3 0 0 0-.207 2.174h-2.937q-.136-3.312 1.493-5.719 1.593-2.459 5.378-2.527 3.24.034 5.141 1.758 1.918 1.74 1.95 4.811 0 1.712-.41 2.911a7.6 7.6 0 0 1-1.268 2.243 22 22 0 0 1-1.73 2.002 34 34 0 0 0-1.987 2.346 5.2 5.2 0 0 0-.565 1.199q-.24 1.438-.171 2.979zm0 6.002v-3.484h3.076v3.484z"/>\n </g>\n</svg>\n',inspector_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m-5 14H4v-4h11zm0-5H4V9h11zm5 5h-4V9h4z" class="jp-inspector-icon-color jp-icon-selectable"/>\n</svg>\n',json_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 22 22">\n <g fill="#F9A825" class="jp-json-icon-color jp-icon-selectable">\n <path d="M20.2 11.8c-1.6 0-1.7.5-1.7 1 0 .4.1.9.1 1.3.1.5.1.9.1 1.3 0 1.7-1.4 2.3-3.5 2.3h-.9v-1.9h.5c1.1 0 1.4 0 1.4-.8 0-.3 0-.6-.1-1 0-.4-.1-.8-.1-1.2 0-1.3 0-1.8 1.3-2-1.3-.2-1.3-.7-1.3-2 0-.4.1-.8.1-1.2.1-.4.1-.7.1-1 0-.8-.4-.7-1.4-.8h-.5V4.1h.9c2.2 0 3.5.7 3.5 2.3 0 .4-.1.9-.1 1.3-.1.5-.1.9-.1 1.3 0 .5.2 1 1.7 1zM1.8 10.1c1.6 0 1.7-.5 1.7-1 0-.4-.1-.9-.1-1.3-.1-.5-.1-.9-.1-1.3 0-1.6 1.4-2.3 3.5-2.3h.9v1.9h-.5c-1 0-1.4 0-1.4.8 0 .3 0 .6.1 1 0 .2.1.6.1 1 0 1.3 0 1.8-1.3 2C6 11.2 6 11.7 6 13c0 .4-.1.8-.1 1.2-.1.3-.1.7-.1 1 0 .8.3.8 1.4.8h.5v1.9h-.9c-2.1 0-3.5-.6-3.5-2.3 0-.4.1-.9.1-1.3.1-.5.1-.9.1-1.3 0-.5-.2-1-1.7-1z"/>\n <circle cx="11" cy="13.8" r="2.1"/>\n <circle cx="11" cy="8.2" r="2.1"/>\n </g>\n</svg>\n',julia_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 325 300">\n <path fill="#cb3c33" d="M150.898 225c0 41.422-33.578 75-75 75s-75-33.578-75-75 33.579-75 75-75 75 33.578 75 75" class="jp-brand0 jp-icon-selectable"/>\n <path fill="#389826" d="M237.5 75c0 41.422-33.578 75-75 75s-75-33.578-75-75 33.578-75 75-75 75 33.578 75 75" class="jp-brand0 jp-icon-selectable"/>\n <path fill="#9558b2" d="M324.102 225c0 41.422-33.579 75-75 75s-75-33.578-75-75 33.578-75 75-75 75 33.578 75 75" class="jp-brand0 jp-icon-selectable"/>\n</svg>\n',jupyter_favicon_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="152" height="165" version="1.1" viewBox="0 0 152 165">\n <path fill="#F37726" d="M76.021 140.163c-32.64 0-61.145-11.927-75.942-29.58 5.51 15.84 15.781 29.567 29.39 39.278a80.17 80.17 0 0 0 46.57 14.929 80.17 80.17 0 0 0 46.57-14.929c13.61-9.711 23.88-23.437 29.391-39.278-14.833 17.653-43.338 29.58-75.979 29.58m-.005-114.832c32.64 0 61.146 11.927 75.943 29.58a80.9 80.9 0 0 0-29.391-39.278A80.16 80.16 0 0 0 75.998.705a80.16 80.16 0 0 0-46.57 14.928A80.9 80.9 0 0 0 .038 54.912c14.832-17.617 43.338-29.58 75.978-29.58" class="jp-jupyter-icon-color"/>\n</svg>\n',jupyter_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="39" height="51" viewBox="0 0 39 51">\n <path fill="#F37726" d="M20.005 38.114c-7.85 0-14.706-2.876-18.265-7.134a19.5 19.5 0 0 0 7.069 9.473 19.24 19.24 0 0 0 11.2 3.6c4.013 0 7.927-1.258 11.2-3.6a19.5 19.5 0 0 0 7.069-9.473c-3.567 4.258-10.423 7.134-18.273 7.134m-.002-27.694c7.85 0 14.706 2.876 18.265 7.133a19.5 19.5 0 0 0-7.069-9.473A19.24 19.24 0 0 0 20 4.48a19.24 19.24 0 0 0-11.2 3.6 19.5 19.5 0 0 0-7.069 9.473c3.567-4.248 10.423-7.134 18.273-7.134" class="jp-jupyter-icon-color"/>\n <path fill="#616161" d="M37.194 3.154a3 3 0 0 1-.426 1.672 2.96 2.96 0 0 1-1.275 1.153 2.93 2.93 0 0 1-3.238-.505 3 3 0 0 1-.776-3.21c.2-.553.558-1.033 1.029-1.38a2.93 2.93 0 0 1 3.733.209c.576.532.919 1.274.953 2.061M9.228 46.393a3.77 3.77 0 0 1-.536 2.11 3.73 3.73 0 0 1-1.608 1.452 3.69 3.69 0 0 1-4.082-.638 3.75 3.75 0 0 1-1.097-1.875 3.8 3.8 0 0 1 .122-2.173 3.74 3.74 0 0 1 1.299-1.739 3.696 3.696 0 0 1 4.704.268 3.76 3.76 0 0 1 1.198 2.595M2.635 9.456a2.17 2.17 0 0 1-1.227-.318 2.2 2.2 0 0 1-.845-.951A2.22 2.22 0 0 1 .935 5.77a2.16 2.16 0 0 1 2.356-.577c.405.15.757.418 1.011.77a2.21 2.21 0 0 1-.156 2.783 2.17 2.17 0 0 1-1.511.71" class="jp-icon3"/>\n</svg>\n',jupyterlab_wordmark_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="200" viewBox="0 0 1860.8 475">\n <path fill="#4E4E4E" d="M53.324 293.087c0 48.7-3.7 64.7-13.6 76.4-10.8 10-25 15.5-39.7 15.5l3.7 29c22.8.3 44.8-7.9 61.9-23.1 17.8-18.5 24-44.1 24-83.3v-184.3h-36.4v170.1zm271.42-22.179c0 21 0 39.5 1.7 55.4h-31.8l-2.1-33.3h-.8c-6.7 11.6-16.4 21.3-28 27.9s-24.8 10-38.2 9.8c-31.4 0-69-17.7-69-89v-118.8h36.4v112.7c0 38.7 11.6 64.7 44.6 64.7 10.3-.2 20.4-3.5 28.9-9.4s15.1-14.3 18.9-23.9c2.2-6.1 3.3-12.5 3.3-18.9v-125h36.4v147.8zm68.512-81.525c0-26-.8-47-1.7-66.7h32.7l1.7 34.8h.8c7.1-12.5 17.5-22.8 30.1-29.7 12.5-7 26.7-10.3 41-9.8 48.3 0 84.7 41.7 84.7 103.3 0 73.1-43.7 109.2-91 109.2-12.1.5-24.2-2.2-35-7.8s-19.9-13.9-26.6-24.2h-.8v110.5h-36v-220zm36 54.2c.1 5.1.6 10.1 1.7 15.1 3 12.3 9.9 23.3 19.8 31.1s22.1 12.1 34.7 12.1c38.5 0 60.7-31.9 60.7-78.5 0-40.7-21.1-75.6-59.5-75.6-12.9.4-25.3 5.1-35.3 13.4-9.9 8.3-16.9 19.7-19.6 32.4-1.5 4.9-2.3 10-2.5 15.1zm217.572-120.485 43.7 120.1c4.5 13.4 9.5 29.4 12.8 41.7h.8c3.7-12.2 7.9-27.7 12.8-42.4l39.7-119.2h38.5l-54.4 144.8c-26 69.7-43.7 105.4-68.6 127.2-12.5 11.7-27.9 20-44.6 23.9l-9.1-31.1c11.7-3.9 22.5-10.1 31.8-18.1 13.2-11.1 23.7-25.2 30.6-41.2 1.5-2.8 2.5-5.7 2.9-8.8-.3-3.3-1.2-6.6-2.5-9.7l-73.8-187.1h39.7zM890.649 64.65v58.3h52v28.2h-52v109.5c0 25 7 39.5 27.3 39.5 7.1.1 14.2-.7 21.1-2.5l1.7 27.7c-10.3 3.7-21.3 5.4-32.2 5-7.3.4-14.6-.7-21.3-3.4-6.8-2.7-12.9-6.8-17.9-12.1-10.3-10.9-14.1-29-14.1-52.9v-110.8h-31v-28.2h31v-48.7zm119.111 166.711c.8 50 32.2 70.6 68.6 70.6 19 .6 37.9-3 55.3-10.5l6.2 26.4c-20.9 8.9-43.5 13.1-66.2 12.6-61.5 0-98.3-41.2-98.3-102.5 0-61.4 35.5-109.6 93.7-109.6 65.2 0 82.7 58.3 82.7 95.7-.1 5.8-.5 11.5-1.2 17.2h-140.8zm106.6-26.4c.4-23.5-9.5-60.1-50.4-60.1-36.8 0-52.8 34.4-55.7 60.1zm88.317-18.505c0-23.9-.4-44.5-1.7-63.4h31.8l1.2 39.9h1.7c9.1-27.3 31-44.5 55.3-44.5 3.5-.1 7 .4 10.3 1.2v34.8c-4.1-.9-8.2-1.3-12.4-1.2-25.6 0-43.7 19.7-48.7 47.4-1 5.7-1.6 11.5-1.7 17.2v108.3h-36v-139.7z" class="jp-icon2"/>\n <path fill="#F37726" d="M1352.3 326.2h37V28h-37zm252.5 0c-2.5-13.9-3.4-31.1-3.4-48.7v-76c0-40.7-15.1-83.1-77.3-83.1-25.6 0-50 7.1-66.8 18.1l8.4 24.4c14.3-9.2 34-15.1 53-15.1 41.6 0 46.2 30.2 46.2 47v4.2c-78.6-.4-122.3 26.5-122.3 75.6 0 29.4 21 58.4 62.2 58.4 29 0 50.9-14.3 62.2-30.2h1.3l2.9 25.6h33.6zm-39.1-68.5c0 3.8-.8 8-2.1 11.8-5.9 17.2-22.7 34-49.2 34-18.9 0-34.9-11.3-34.9-35.3 0-39.5 45.8-46.6 86.2-45.8zm132.8 68.5 1.7-33.6h1.3c15.1 26.9 38.7 38.2 68.1 38.2 45.4 0 91.2-36.1 91.2-108.8.4-61.7-35.3-103.7-85.7-103.7-32.8 0-56.3 14.7-69.3 37.4h-.8V28h-36.6v245.7c0 18.1-.8 38.6-1.7 52.5zm6.3-118c0-5.9 1.3-10.9 2.1-15.1 7.6-28.1 31.1-45.4 56.3-45.4 39.5 0 60.5 34.9 60.5 75.6 0 46.6-23.1 78.1-61.8 78.1-26.9 0-48.3-17.6-55.5-43.3-.8-4.2-1.7-8.8-1.7-13.4v-36.5z" class="jp-jupyter-icon-color"/>\n</svg>\n',kernel_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M15 9H9v6h6zm-2 4h-2v-2h2zm8-2V9h-2V7c0-1.1-.9-2-2-2h-2V3h-2v2h-2V3H9v2H7c-1.1 0-2 .9-2 2v2H3v2h2v2H3v2h2v2c0 1.1.9 2 2 2h2v2h2v-2h2v2h2v-2h2c1.1 0 2-.9 2-2v-2h2v-2h-2v-2zm-4 6H7V7h10z" class="jp-icon2"/>\n</svg>\n',keyboard_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M20 5H4c-1.1 0-1.99.9-1.99 2L2 17c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m-9 3h2v2h-2zm0 3h2v2h-2zM8 8h2v2H8zm0 3h2v2H8zm-1 2H5v-2h2zm0-3H5V8h2zm9 7H8v-2h8zm0-4h-2v-2h2zm0-3h-2V8h2zm3 3h-2v-2h2zm0-3h-2V8h2z" class="jp-icon3 jp-icon-selectable"/>\n</svg>\n',launch_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="32" viewBox="0 0 32 32">\n <g fill="#616161" class="jp-icon3 jp-icon-selectable">\n <path d="M26 28H6a2.003 2.003 0 0 1-2-2V6a2.003 2.003 0 0 1 2-2h10v2H6v20h20V16h2v10a2.003 2.003 0 0 1-2 2"/>\n <path d="M20 2v2h6.586L18 12.586 19.414 14 28 5.414V12h2V2z"/>\n </g>\n</svg>\n',launcher_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M19 19H5V5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z" class="jp-icon3 jp-icon-selectable"/>\n</svg>\n',line_form_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#fff" d="M5.88 4.12 13.76 12l-7.88 7.88L8 22l10-10L8 2z"/>\n</svg>\n',link_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5" class="jp-icon3"/>\n</svg>\n',list_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M19 5v14H5V5zm1.1-2H3.9c-.5 0-.9.4-.9.9v16.2c0 .4.4.9.9.9h16.2c.4 0 .9-.5.9-.9V3.9c0-.5-.5-.9-.9-.9M11 7h6v2h-6zm0 4h6v2h-6zm0 4h6v2h-6zM7 7h2v2H7zm0 4h2v2H7zm0 4h2v2H7z" class="jp-icon2 jp-icon-selectable"/>\n</svg>\n',lock_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 23">\n <path fill="#333" d="M12 17a2 2 0 0 0 2-2 2 2 0 0 0-2-2 2 2 0 0 0-2 2 2 2 0 0 0 2 2m6-9a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V10a2 2 0 0 1 2-2h1V6a5 5 0 0 1 5-5 5 5 0 0 1 5 5v2zm-6-5a3 3 0 0 0-3 3v2h6V6a3 3 0 0 0-3-3" class="jp-icon4"/>\n</svg>\n',markdown_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 22 22">\n <path fill="#7B1FA2" d="M5 14.9h12l-6.1 6zm9.4-6.8c0-1.3-.1-2.9-.1-4.5-.4 1.4-.9 2.9-1.3 4.3l-1.3 4.3h-2L8.5 7.9c-.4-1.3-.7-2.9-1-4.3-.1 1.6-.1 3.2-.2 4.6L7 12.4H4.8l.7-11h3.3L10 5c.4 1.2.7 2.7 1 3.9.3-1.2.7-2.6 1-3.9l1.2-3.7h3.3l.6 11h-2.4z" class="jp-icon-contrast0 jp-icon-selectable"/>\n</svg>\n',mermaid_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" version="1.1" viewBox="0 0 491 675">\n <path fill="#ff3670" d="M85 92c-46 0-85 37-85 85v321c0 46 37 85 85 85h321c46 0 85-37 85-85V177c0-46-37-85-85-85zm-2 111c72-3.1 139 41 162 109 25-67 91-112 162-109 2.4 57-25 111-72 144-24 16-39 44-39 74v51H192v-51c.08-29-15-57-39-74-47-32-75-86-72-144z" class="jp-icon-contrast2 jp-icon-selectable"/>\n</svg>\n',move_down_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="none" viewBox="0 0 14 14">\n <path fill="#616161" d="M12.471 7.529a.748.748 0 0 0-1.057-1.058L7.75 10.127V1.75a.75.75 0 0 0-1.5 0v8.378l-3.653-3.66a.753.753 0 1 0-1.065 1.064l4.76 4.76a1 1 0 0 0 1.415 0z" class="jp-icon3"/>\n</svg>\n',move_up_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="none" viewBox="0 0 14 14">\n <path fill="#616161" d="M1.529 6.471a.748.748 0 0 0 1.057 1.058L6.25 3.873v8.377a.75.75 0 0 0 1.5 0V3.873l3.653 3.659a.753.753 0 1 0 1.065-1.064l-4.76-4.76a1 1 0 0 0-1.415 0z" class="jp-icon3"/>\n</svg>\n',new_folder_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M20 6h-8l-2-2H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2m-1 8h-3v3h-2v-3h-3v-2h3V9h2v3h3z" class="jp-icon3"/>\n</svg>\n',not_trusted_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" fill="none" viewBox="0 0 25 25">\n <path stroke="#333" stroke-width="2" d="M4.86 14.44c-1.034-2.67-.996-5.382-.61-7.24 1.232-.267 2.83-.797 4.351-1.355a92 92 0 0 0 4.387-1.75 68 68 0 0 0 4.23 1.748c1.532.57 3.182 1.11 4.536 1.37.382 1.859.417 4.564-.615 7.228-1.109 2.862-3.472 5.743-8.139 7.494-4.667-1.75-7.03-4.632-8.14-7.494Zm11.824-5.12-7.368 7.365m7.368-.001L9.316 9.319" class="jp-icon2"/>\n</svg>\n',notebook_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 22 22">\n <g fill="#EF6C00" class="jp-notebook-icon-color jp-icon-selectable">\n <path d="M18.7 3.3v15.4H3.3V3.3zm1.5-1.5H1.8v18.3h18.3z"/>\n <path d="m16.5 16.5-5.4-4.3-5.6 4.3v-11h11z"/>\n </g>\n</svg>\n',numbering_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 28 28">\n <path fill="#616161" d="M4 19h2v.5H5v1h1v.5H4v1h3v-4H4zm1-9h1V6H4v1h1zm-1 3h1.8L4 15.1v.9h3v-1H5.2L7 12.9V12H4zm5-6v2h14V7zm0 14h14v-2H9zm0-6h14v-2H9z" class="jp-icon3"/>\n</svg>\n',offline_bolt_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M12 2.02c-5.51 0-9.98 4.47-9.98 9.98s4.47 9.98 9.98 9.98 9.98-4.47 9.98-9.98S17.51 2.02 12 2.02M11.48 20v-6.26H8L13 4v6.26h3.35z" class="jp-icon3"/>\n</svg>\n',open_kernel_source_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path fill="#616161" d="M5 2h10l5 5v13a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-6h1v2l4-3-4-3v2H3V4a2 2 0 0 1 2-2m7 16h4v-2h-4zm0-4h6v-2h-6zm0-4h6V8h-6zm-2 4a1 1 0 1 0 0-2 1 1 0 0 0 0 2m-7-2v2H1v-2z" class="jp-icon3"/>\n</svg>\n',palette_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <g fill="#616161" class="jp-icon3">\n <path d="M18 13v7H4V6h5.02c.05-.71.22-1.38.48-2H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-5zm1.3-4.11c.44-.7.7-1.51.7-2.39C20 4.01 17.99 2 15.5 2S11 4.01 11 6.5s2.01 4.5 4.49 4.5c.88 0 1.7-.26 2.39-.7L21 13.42 22.42 12zM15.5 9a2.5 2.5 0 0 1 0-5 2.5 2.5 0 0 1 0 5"/>\n <path fill-rule="evenodd" d="M4 6h5.019a6.5 6.5 0 0 0 3.015 6H9v2h7v-1.019c.57-.043 1.12-.16 1.64-.341L18 13v7H4zm4 2H6v2h2zm-2 4h2v2H6zm2 4H6v2h2zm1 0h7v2H9z" clip-rule="evenodd"/>\n </g>\n</svg>\n',paste_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path fill="#616161" d="M19 2h-4.18C14.4.84 13.3 0 12 0S9.6.84 9.18 2H5c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1m7 18H5V4h2v3h10V4h2z" class="jp-icon3"/>\n</svg>\n',pause_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path fill="#616161" d="M7 6h4v12H7Zm6 0h4v12h-4z" class="jp-icon3"/>\n</svg>\n',pdf_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 22 22">\n <path fill="#FF2A2A" d="m17.933 13.667 3.987 3.987-1.117 1.117-2.51-2.51-1.066 1.067 2.36 2.36-1.117 1.117-2.36-2.36-2.43 2.429-1.477-1.478zm-6.163-3.93-3.496 3.496.53.53q.905.906 1.83.932.929.031 1.784-.825.852-.852.822-1.773t-.94-1.83zm-.36-2.594 1.557 1.558q1.305 1.305 1.754 2.13.456.825.468 1.727.015.79-.296 1.493-.31.702-.951 1.343-.649.648-1.355.963-.702.31-1.493.295-.905-.015-1.738-.472-.829-.46-2.118-1.75L5.68 12.874zm-5.76-5.76L8.1 3.835Q9.195 4.93 9.291 6q.103 1.07-.795 1.968-.901.902-1.976.802-1.067-.1-2.16-1.193l-.975-.975L1.397 8.59-.08 7.113Zm.406 2.548-1.6 1.6.817.818q.43.43.871.457.445.023.829-.361t.357-.825-.457-.871z" class="jp-icon-selectable"/>\n</svg>\n',python_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="-10 -10 131.161 132.389">\n <path fill="#306998" d="M54.919 0c-4.584.022-8.961.413-12.813 1.095C30.76 3.099 28.7 7.295 28.7 15.032v10.219h26.813v3.406H18.638c-7.793 0-14.616 4.684-16.75 13.594-2.462 10.213-2.571 16.586 0 27.25 1.905 7.938 6.457 13.594 14.25 13.594h9.218v-12.25c0-8.85 7.657-16.657 16.75-16.657h26.782c7.454 0 13.406-6.138 13.406-13.625v-25.53c0-7.267-6.13-12.726-13.406-13.938C64.282.328 59.502-.02 54.918 0m-14.5 8.22c2.77 0 5.031 2.298 5.031 5.125 0 2.816-2.262 5.093-5.031 5.093-2.78 0-5.031-2.277-5.031-5.093 0-2.827 2.251-5.125 5.03-5.125" class="jp-icon-selectable"/>\n <path fill="#ffd43b" d="M85.638 28.657v11.906c0 9.231-7.826 17-16.75 17H42.106c-7.336 0-13.406 6.279-13.406 13.625V96.72c0 7.266 6.319 11.54 13.406 13.625 8.488 2.495 16.627 2.946 26.782 0 6.75-1.955 13.406-5.888 13.406-13.625V86.5H55.513v-3.405H95.7c7.793 0 10.696-5.436 13.406-13.594 2.8-8.399 2.68-16.476 0-27.25-1.925-7.758-5.604-13.594-13.406-13.594zM70.575 93.313c2.78 0 5.031 2.278 5.031 5.094 0 2.827-2.251 5.125-5.031 5.125-2.77 0-5.031-2.298-5.031-5.125 0-2.816 2.261-5.094 5.031-5.094" class="jp-icon-selectable"/>\n</svg>\n',r_kernel_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid" width="16" height="16" viewBox="0 0 724 561">\n <path class="jp-icon-selectable" d="M361.453,485.937 C162.329,485.937 0.906,377.828 0.906,244.469 C0.906,111.109 162.329,3.000 361.453,3.000 C560.578,3.000 722.000,111.109 722.000,244.469 C722.000,377.828 560.578,485.937 361.453,485.937 ZM416.641,97.406 C265.289,97.406 142.594,171.314 142.594,262.484 C142.594,353.654 265.289,427.562 416.641,427.562 C567.992,427.562 679.687,377.033 679.687,262.484 C679.687,147.971 567.992,97.406 416.641,97.406 Z" fill="rgb(179,179,179)" fill-rule="evenodd"/>\n <path class="jp-icon-selectable" d="M550.000,377.000 C550.000,377.000 571.822,383.585 584.500,390.000 C588.899,392.226 596.510,396.668 602.000,402.500 C607.378,408.212 610.000,414.000 610.000,414.000 L696.000,559.000 L557.000,559.062 L492.000,437.000 C492.000,437.000 478.690,414.131 470.500,407.500 C463.668,401.969 460.755,400.000 454.000,400.000 C449.298,400.000 420.974,400.000 420.974,400.000 L421.000,558.974 L298.000,559.026 L298.000,152.938 L545.000,152.938 C545.000,152.938 657.500,154.967 657.500,262.000 C657.500,369.033 550.000,377.000 550.000,377.000 ZM496.500,241.024 L422.037,240.976 L422.000,310.026 L496.500,310.002 C496.500,310.002 531.000,309.895 531.000,274.877 C531.000,239.155 496.500,241.024 496.500,241.024 Z" fill="rgb(52,101,176)" fill-rule="evenodd"/>\n</svg>\n',filetype_react_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="150 150 541.9 295.3">\n <g fill="#61DAFB" class="jp-icon-brand2 jp-icon-selectable">\n <path d="M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9V78c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6V78.5c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3m-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9m-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9m32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1M421.2 430c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32m-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24q7.05 12 14.4 23.4M420.7 163c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32m-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9m-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6s22.9-35.6 58.3-50.6c8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2M310 490c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7m237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1m38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6M320.8 78.4"/>\n <circle cx="420.9" cy="296.5" r="45.7"/>\n </g>\n</svg>\n',redo_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="24" viewBox="0 0 24 24">\n <path fill="#616161" d="M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8 8 0 0 1 7.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7z" class="jp-icon3"/>\n</svg>\n',regex_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 20 20">\n <path fill="#414141" d="M2 2h16v16H2z" class="jp-icon2"/>\n <g fill="#FFF" class="jp-icon-accent2">\n <circle cx="5.5" cy="14.5" r="1.5"/>\n <path d="M12 4h1v8h-1z"/>\n <path d="m8.786 9.567 6.928-4 .5.866-6.928 4z"/>\n <path d="m8.786 6.433.5-.866 6.928 4-.5.866z"/>\n </g>\n</svg>\n',run_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path fill="#616161" d="M8 5v14l11-7z" class="jp-icon3"/>\n</svg>\n',running_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 512 512">\n <path fill="#616161" d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8m96 328c0 8.8-7.2 16-16 16H176c-8.8 0-16-7.2-16-16V176c0-8.8 7.2-16 16-16h160c8.8 0 16 7.2 16 16z" class="jp-icon3"/>\n</svg>\n',save_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path fill="#616161" d="M17 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z" class="jp-icon3"/>\n</svg>\n',search_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 18 18">\n <path fill="#616161" d="M12.1 10.9h-.7l-.2-.2c.8-.9 1.3-2.2 1.3-3.5 0-3-2.4-5.4-5.4-5.4S1.8 4.2 1.8 7.1s2.4 5.4 5.4 5.4c1.3 0 2.5-.5 3.5-1.3l.2.2v.7l4.1 4.1 1.2-1.2zm-5 0c-2.1 0-3.7-1.7-3.7-3.7s1.7-3.7 3.7-3.7 3.7 1.7 3.7 3.7-1.6 3.7-3.7 3.7" class="jp-icon3"/>\n</svg>\n',selected_breakpoint_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16">\n <circle cx="10" cy="7" r="6" fill="var(--jp-warn-color1, #f57c00)" />\n <circle cx="10" cy="7" r="4" stroke="var(--jp-layout-color0, #fff)" stroke-width="1.3" />\n</svg>\n',settings_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M19.43 12.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65A.49.49 0 0 0 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.23-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.23.09.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64zM12 15.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5" class="jp-icon3 jp-icon-selectable"/>\n</svg>\n',share_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M18 2c-1.645 0-3 1.355-3 3 0 .191.022.377.057.559L7.922 9.72A2.97 2.97 0 0 0 6 9c-1.645 0-3 1.355-3 3s1.355 3 3 3c.732 0 1.399-.278 1.922-.72l7.135 4.16A3 3 0 0 0 15 19c0 1.645 1.355 3 3 3s3-1.355 3-3-1.355-3-3-3a2.97 2.97 0 0 0-1.922.723l-7.135-4.164C8.978 12.377 9 12.19 9 12s-.022-.377-.057-.559l7.135-4.162C16.601 7.722 17.268 8 18 8c1.645 0 3-1.355 3-3s-1.355-3-3-3m0 2c.564 0 1 .436 1 1s-.436 1-1 1-1-.436-1-1 .436-1 1-1M6 11c.564 0 1 .436 1 1s-.436 1-1 1-1-.436-1-1 .436-1 1-1m12 7c.564 0 1 .436 1 1s-.436 1-1 1-1-.436-1-1 .436-1 1-1" class="jp-icon3"/>\n</svg>\n',spreadsheet_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 22 22">\n <path fill="#4CAF50" d="M2.2 2.2v17.6h17.6V2.2zm15.4 7.7h-5.5V4.4h5.5zM9.9 4.4v5.5H4.4V4.4zm-5.5 7.7h5.5v5.5H4.4zm7.7 5.5v-5.5h5.5v5.5z" class="jp-icon-contrast1 jp-icon-selectable"/>\n</svg>\n',step_into_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">\n <path fill="#616161" d="M8 9.532h.542l3.905-3.905-1.061-1.06-2.637 2.61V1H7.251v6.177l-2.637-2.61-1.061 1.06 3.905 3.905zm1.956 3.481a2 2 0 1 1-4 0 2 2 0 0 1 4 0" class="jp-icon3"/>\n</svg>\n',step_out_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">\n <path fill="#616161" d="M8 1h-.542L3.553 4.905l1.061 1.06 2.637-2.61v6.177h1.498V3.355l2.637 2.61 1.061-1.06L8.542 1zm1.956 12.013a2 2 0 1 1-4 0 2 2 0 0 1 4 0" class="jp-icon3"/>\n</svg>\n',step_over_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">\n <path fill="#616161" d="M14.25 5.75v-4h-1.5v2.542c-1.145-1.359-2.911-2.209-4.84-2.209-3.177 0-5.92 2.307-6.16 5.398l-.02.269h1.5l.022-.226c.212-2.195 2.202-3.94 4.656-3.94 1.736 0 3.244.875 4.05 2.166h-2.83v1.5h4.163l.962-.975V5.75zM8 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4" class="jp-icon3"/>\n</svg>\n',stop_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path fill="#616161" d="M6 6h12v12H6z" class="jp-icon3"/>\n</svg>\n',tab_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16H3V5h10v4h8z" class="jp-icon3"/>\n</svg>\n',table_rows_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path fill="#616161" d="M21 8H3V4h18zm0 2H3v4h18zm0 6H3v4h18z" class="jp-icon3"/>\n</svg>\n',tag_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 43 28">\n <path fill="#616161" d="M28.833 12.334 33 16.501l4.166-4.167zM16.21 21.61c-.523.52-1.366.52-1.885 0l-7.342-6.885c-.41-.386-.9-1.115-.935-1.677-.095-1.52-.028-4.429.018-5.971A1.093 1.093 0 0 1 7.118 6.03c1.97-.046 6.146-.095 6.534.293l8.085 7.315c.519.52.048 1.833-.475 2.356zM9.775 8.265a1.126 1.126 0 1 0-1.593 1.592 1.126 1.126 0 0 0 1.593-1.592" class="jp-icon3"/>\n</svg>\n',terminal_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#333" d="M2 2h20v20H2z" class="jp-terminal-icon-background-color jp-icon-selectable"/>\n <path fill="#fff" d="M9.01 14.762q0-.246-.077-.434a.9.9 0 0 0-.234-.351 1.6 1.6 0 0 0-.422-.288 5 5 0 0 0-.627-.263q-.592-.211-1.078-.446a3.5 3.5 0 0 1-.832-.544 2.2 2.2 0 0 1-.528-.721 2.4 2.4 0 0 1-.187-.985q0-.498.17-.908a2.1 2.1 0 0 1 .48-.72q.31-.306.75-.493.44-.188.979-.24V7.11h.937v1.272q.527.07.95.287.421.217.714.568.3.345.457.82.165.47.164 1.055H8.998q0-.709-.323-1.072-.322-.37-.873-.37-.299 0-.521.083a.9.9 0 0 0-.358.223.9.9 0 0 0-.21.334q-.066.194-.065.421 0 .23.064.41a.9.9 0 0 0 .229.329q.165.152.428.293.263.134.656.275.591.223 1.072.463.48.235.82.55.346.312.528.727.187.41.187.973 0 .515-.17.932-.17.41-.486.709t-.762.48a3.7 3.7 0 0 1-.996.229v1.148h-.931V17.1a4 4 0 0 1-.967-.217 2.6 2.6 0 0 1-.832-.504 2.4 2.4 0 0 1-.574-.826q-.217-.505-.217-1.207h1.635q0 .421.123.709.123.281.316.45.2.165.451.235.252.07.516.07.627 0 .949-.292a.98.98 0 0 0 .322-.756m8.36 3.51h-5.343V17h5.344z" class="jp-terminal-icon-color jp-icon-selectable-inverse"/>\n</svg>\n',text_editor_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M15 15H3v2h12zm0-8H3v2h12zM3 13h18v-2H3zm0 8h18v-2H3zM3 3v2h18V3z" class="jp-text-editor-icon-color jp-icon-selectable"/>\n</svg>\n',toc_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path fill="#616161" d="M7 5h14v2H7zm0 8v-2h14v2zM4 4.5A1.5 1.5 0 0 1 5.5 6 1.5 1.5 0 0 1 4 7.5 1.5 1.5 0 0 1 2.5 6 1.5 1.5 0 0 1 4 4.5m0 6A1.5 1.5 0 0 1 5.5 12 1.5 1.5 0 0 1 4 13.5 1.5 1.5 0 0 1 2.5 12 1.5 1.5 0 0 1 4 10.5M7 19v-2h14v2zm-3-2.5A1.5 1.5 0 0 1 5.5 18 1.5 1.5 0 0 1 4 19.5 1.5 1.5 0 0 1 2.5 18 1.5 1.5 0 0 1 4 16.5" class="jp-icon3 jp-icon-selectable"/>\n</svg>\n',tree_view_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path fill="#616161" d="M22 11V3h-7v3H9V3H2v8h7V8h2v10h4v3h7v-8h-7v3h-2V8h2v3z" class="jp-icon3"/>\n</svg>\n',trusted_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" fill="none" viewBox="0 0 24 25">\n <path stroke="#333" stroke-width="2" d="M3.86 14.44c-1.034-2.67-.996-5.382-.61-7.24 1.232-.267 2.83-.797 4.351-1.355a92 92 0 0 0 4.387-1.75 68 68 0 0 0 4.23 1.748c1.532.57 3.182 1.11 4.536 1.37.382 1.859.417 4.564-.615 7.228-1.109 2.862-3.472 5.743-8.139 7.494-4.667-1.75-7.03-4.632-8.14-7.494Z" class="jp-icon2"/>\n <path fill="#333" stroke="#333" d="m10.86 14.733-2.133-1.866-.727.63L10.86 16 16 10.5l-.721-.632z" class="jp-icon2"/>\n</svg>\n',undo_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8" class="jp-icon3"/>\n</svg>\n',user_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path fill="#616161" d="M16 7a4 4 0 1 1-8 0 4 4 0 0 1 8 0m-4 7a7 7 0 0 0-7 7h14a7 7 0 0 0-7-7" class="jp-icon3"/>\n</svg>\n',users_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" version="1.1" viewBox="0 0 36 24">\n <g fill="#616161" class="jp-icon3" transform="translate(-3.628 .1)scale(1.7327)">\n <path d="M18.279 5.265c-1.58 0-2.964.85-3.718 2.115a6.7 6.7 0 0 1 2.81 2.21h5.23a4.32 4.32 0 0 0-4.322-4.325m2.186-2.875a2.19 2.19 0 0 1-2.188 2.188 2.19 2.19 0 0 1-2.189-2.189A2.19 2.19 0 0 1 18.277.201a2.19 2.19 0 0 1 2.188 2.188M5.385 6.633a3.02 3.02 0 0 0-3.02 3.02h4.22a6.7 6.7 0 0 1 1.44-1.467 3.02 3.02 0 0 0-2.64-1.553m1.53-2.01a1.53 1.53 0 0 1-1.529 1.53 1.53 1.53 0 0 1-1.53-1.53 1.53 1.53 0 0 1 1.53-1.53 1.53 1.53 0 0 1 1.53 1.53m-.781 8.912a5.865 5.865 0 0 1 11.73 0z"/>\n <circle cx="12" cy="3.768" r="2.969"/>\n </g>\n</svg>\n',variable_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16">\n <path fill="#007ACC" fill-rule="evenodd" d="m1.5 4-.5.5v8l.5.5H4v-1H2V5h2V4zm13 9 .5-.5v-8l-.5-.5H12v1h2v7h-2v1zM8.797 5l-4.5 2L4 7.457v2.5l.243.429 2.5 1.5.46.028 4.5-2L12 9.457v-2.5l-.243-.429-2.5-1.5zM5 8.34v1.334l1.5.9V9.24zm2.5.942v1.406L11 9.131V7.726zm2.918-2.391-1.452-.872-3.384 1.504 1.452.871z" clip-rule="evenodd"/>\n</svg>\n',vega_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 22 22">\n <g fill="#212121" class="jp-icon1 jp-icon-selectable">\n <path d="m10.6 5.4 2.2-3.2H2.2v7.3l4-6.6z"/>\n <path d="m15.8 2.2-4.4 6.6L7 6.3l-4.8 8v5.5h17.6V2.2zm-7 15.4H5.5v-4.4h3.3zm4.4 0H9.8V9.8h3.4zm4.4 0h-3.4V6.5h3.4z"/>\n </g>\n</svg>\n',video_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24">\n <path class="jp-icon3 jp-icon-selectable" fill="#616161" d="M18 3v2h-2V3H8v2H6V3H4v18h2v-2h2v2h8v-2h2v2h2V3h-2zM8 17H6v-2h2v2zm0-4H6v-2h2v2zm0-4H6V7h2v2zm10 8h-2v-2h2v2zm0-4h-2v-2h2v2zm0-4h-2V7h2v2z"/>\n <path d="M0 0h24v24H0z" fill="none"/>\n</svg>\n',view_breakpoint_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path fill="#616161" d="M5 2h10l5 5v13a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-6h1v2l4-3-4-3v2H3V4a2 2 0 0 1 2-2m7 16h4v-2h-4zm0-4h6v-2h-6zm0-4h6V8h-6zm-2 4a1 1 0 1 0 0-2 1 1 0 0 0 0 2m-7-2v2H1v-2z" class="jp-icon3"/>\n</svg>\n',word_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 20 20">\n <path fill="#414141" d="M2 2h16v16H2z" class="jp-icon2"/>\n <path fill="#fff" d="M4.57 8.8q.068-1.89 2.42-1.89 1.16 0 1.68.42.567.41.567 1.16v3.47q0 .462.514.462.103 0 .2-.023v.714q-.399.103-.651.103-.452 0-.693-.22-.231-.2-.284-.662-.956.872-2 .872-.903 0-1.47-.472-.525-.472-.525-1.26 0-.262.045-.472.057-.22.116-.378.068-.168.231-.304l.262-.242q.116-.091.368-.168.262-.091.4-.126.135-.045.471-.103t.504-.08l.567-.08q.556-.068.777-.22.22-.153.22-.442v-.252q0-.43-.357-.662-.336-.23-.976-.23-.662 0-.998.261-.336.252-.399.798zm1.89 3.68q.788 0 1.26-.41.504-.42.504-.903v-1.05q-.284.136-.861.231l-.987.158q-.42.068-.766.326-.336.252-.336.704t.304.704.861.252zm3.97-7.88h.945v3.15q.651-.976 1.89-.976 1.16 0 1.89.84.682.84.682 2.31t-.704 2.42q-.704.882-1.89.882-1.26 0-1.89-1.02v.766h-.85zm2.62 3.04q-.746 0-1.16.64-.452.63-.452 1.68t.452 1.68 1.16.63q.777 0 1.26-.63.494-.64.494-1.68 0-1.05-.472-1.68-.462-.64-1.26-.64zm-9.89 8.2 13.6.008c.007 0 0-2.6 0-2.6 0-.008-1.15 0-1.15 0-.007 0-.008 1.5-.008 1.5l-11.3-.001-.006-1.5c0-.008-1.17.001-1.17.001z" class="jp-icon-accent2"/>\n</svg>\n',yaml_namespaceObject='<svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 22 22">\n <g fill="#D81B60" class="jp-icon-contrast2 jp-icon-selectable">\n <path d="M7.2 18.6v-5.4L3 5.6h3.3l1.4 3.1c.3.9.6 1.6 1 2.5.3-.8.6-1.6 1-2.5l1.4-3.1h3.4l-4.4 7.6v5.5z"/>\n <circle cx="17.6" cy="16.5" r="2.1"/>\n <circle cx="17.6" cy="11" r="2.1"/>\n </g>\n</svg>\n',addAboveIcon=new LabIcon({name:"ui-components:add-above",svgstr:add_above_namespaceObject}),addBelowIcon=new LabIcon({name:"ui-components:add-below",svgstr:add_below_namespaceObject}),addIcon=new LabIcon({name:"ui-components:add",svgstr:add_namespaceObject}),audioIcon=new LabIcon({name:"ui-components:audio",svgstr:audio_namespaceObject}),bellIcon=new LabIcon({name:"ui-components:bell",svgstr:bell_namespaceObject}),breakpointIcon=new LabIcon({name:"ui-components:breakpoint",svgstr:breakpoint_namespaceObject}),bugDotIcon=new LabIcon({name:"ui-components:bug-dot",svgstr:bug_dot_namespaceObject}),bugIcon=new LabIcon({name:"ui-components:bug",svgstr:bug_namespaceObject}),buildIcon=new LabIcon({name:"ui-components:build",svgstr:build_namespaceObject}),caretDownEmptyIcon=new LabIcon({name:"ui-components:caret-down-empty",svgstr:caret_down_empty_namespaceObject}),caretDownEmptyThinIcon=new LabIcon({name:"ui-components:caret-down-empty-thin",svgstr:caret_down_empty_thin_namespaceObject}),caretDownIcon=new LabIcon({name:"ui-components:caret-down",svgstr:caret_down_namespaceObject}),caretLeftIcon=new LabIcon({name:"ui-components:caret-left",svgstr:caret_left_namespaceObject}),caretRightIcon=new LabIcon({name:"ui-components:caret-right",svgstr:caret_right_namespaceObject}),caretUpEmptyThinIcon=new LabIcon({name:"ui-components:caret-up-empty-thin",svgstr:caret_up_empty_thin_namespaceObject}),caretUpIcon=new LabIcon({name:"ui-components:caret-up",svgstr:caret_up_namespaceObject}),caseSensitiveIcon=new LabIcon({name:"ui-components:case-sensitive",svgstr:case_sensitive_namespaceObject}),checkIcon=new LabIcon({name:"ui-components:check",svgstr:check_namespaceObject}),circleEmptyIcon=new LabIcon({name:"ui-components:circle-empty",svgstr:circle_empty_namespaceObject}),circleIcon=new LabIcon({name:"ui-components:circle",svgstr:circle_namespaceObject}),cleaningIcon=new LabIcon({name:"ui-components:cleaning",svgstr:cleaning_namespaceObject}),clearIcon=new LabIcon({name:"ui-components:clear",svgstr:clear_namespaceObject}),closeAllIcon=new LabIcon({name:"ui-components:close-all",svgstr:close_all_namespaceObject}),closeIcon=new LabIcon({name:"ui-components:close",svgstr:close_namespaceObject}),codeCheckIcon=new LabIcon({name:"ui-components:code-check",svgstr:code_check_namespaceObject}),codeIcon=new LabIcon({name:"ui-components:code",svgstr:code_namespaceObject}),collapseAllIcon=new LabIcon({name:"ui-components:collapse-all",svgstr:collapse_all_namespaceObject}),collapseIcon=new LabIcon({name:"ui-components:collapse",svgstr:collapse_namespaceObject}),consoleIcon=new LabIcon({name:"ui-components:console",svgstr:console_namespaceObject}),copyIcon=new LabIcon({name:"ui-components:copy",svgstr:copy_namespaceObject}),copyrightIcon=new LabIcon({name:"ui-components:copyright",svgstr:copyright_namespaceObject}),cutIcon=new LabIcon({name:"ui-components:cut",svgstr:cut_namespaceObject}),deleteIcon=new LabIcon({name:"ui-components:delete",svgstr:delete_namespaceObject}),dockBottomIcon=new LabIcon({name:"ui-components:dock-bottom",svgstr:dock_bottom_namespaceObject}),dockLeftIcon=new LabIcon({name:"ui-components:dock-left",svgstr:dock_left_namespaceObject}),dockRightIcon=new LabIcon({name:"ui-components:dock-right",svgstr:dock_right_namespaceObject}),dockTopIcon=new LabIcon({name:"ui-components:dock-top",svgstr:dock_top_namespaceObject}),dotsIcon=new LabIcon({name:"ui-components:dots",svgstr:dots_namespaceObject}),downloadIcon=new LabIcon({name:"ui-components:download",svgstr:download_namespaceObject}),duplicateIcon=new LabIcon({name:"ui-components:duplicate",svgstr:duplicate_namespaceObject}),editIcon=new LabIcon({name:"ui-components:edit",svgstr:edit_namespaceObject}),ellipsesIcon=new LabIcon({name:"ui-components:ellipses",svgstr:ellipses_namespaceObject}),errorIcon=new LabIcon({name:"ui-components:error",svgstr:error_namespaceObject}),exceptionsIcon=new LabIcon({name:"ui-components:exceptions",svgstr:exceptions_namespaceObject}),expandAllIcon=new LabIcon({name:"ui-components:expand-all",svgstr:expand_all_namespaceObject}),expandIcon=new LabIcon({name:"ui-components:expand",svgstr:expand_namespaceObject}),extensionIcon=new LabIcon({name:"ui-components:extension",svgstr:extension_namespaceObject}),fastForwardIcon=new LabIcon({name:"ui-components:fast-forward",svgstr:fast_forward_namespaceObject}),fileIcon=new LabIcon({name:"ui-components:file",svgstr:file_namespaceObject}),fileUploadIcon=new LabIcon({name:"ui-components:file-upload",svgstr:file_upload_namespaceObject}),filterDotIcon=new LabIcon({name:"ui-components:filter-dot",svgstr:filter_dot_namespaceObject}),filterIcon=new LabIcon({name:"ui-components:filter",svgstr:filter_namespaceObject}),filterListIcon=new LabIcon({name:"ui-components:filter-list",svgstr:filter_list_namespaceObject}),folderFavoriteIcon=new LabIcon({name:"ui-components:folder-favorite",svgstr:folder_favorite_namespaceObject}),folderIcon=new LabIcon({name:"ui-components:folder",svgstr:folder_namespaceObject}),historyIcon=new LabIcon({name:"ui-components:history",svgstr:history_namespaceObject}),homeIcon=new LabIcon({name:"ui-components:home",svgstr:home_namespaceObject}),html5Icon=new LabIcon({name:"ui-components:html5",svgstr:html5_namespaceObject}),imageIcon=new LabIcon({name:"ui-components:image",svgstr:image_namespaceObject}),infoIcon=new LabIcon({name:"ui-components:info",svgstr:info_namespaceObject}),inspectorIcon=new LabIcon({name:"ui-components:inspector",svgstr:inspector_namespaceObject}),jsonIcon=new LabIcon({name:"ui-components:json",svgstr:json_namespaceObject}),juliaIcon=new LabIcon({name:"ui-components:julia",svgstr:julia_namespaceObject}),jupyterFaviconIcon=new LabIcon({name:"ui-components:jupyter-favicon",svgstr:jupyter_favicon_namespaceObject}),jupyterIcon=new LabIcon({name:"ui-components:jupyter",svgstr:jupyter_namespaceObject}),jupyterlabWordmarkIcon=new LabIcon({name:"ui-components:jupyterlab-wordmark",svgstr:jupyterlab_wordmark_namespaceObject}),kernelIcon=new LabIcon({name:"ui-components:kernel",svgstr:kernel_namespaceObject}),keyboardIcon=new LabIcon({name:"ui-components:keyboard",svgstr:keyboard_namespaceObject}),launchIcon=new LabIcon({name:"ui-components:launch",svgstr:launch_namespaceObject}),launcherIcon=new LabIcon({name:"ui-components:launcher",svgstr:launcher_namespaceObject}),lineFormIcon=new LabIcon({name:"ui-components:line-form",svgstr:line_form_namespaceObject}),linkIcon=new LabIcon({name:"ui-components:link",svgstr:link_namespaceObject}),listIcon=new LabIcon({name:"ui-components:list",svgstr:list_namespaceObject}),lockIcon=new LabIcon({name:"ui-components:lock",svgstr:lock_namespaceObject}),markdownIcon=new LabIcon({name:"ui-components:markdown",svgstr:markdown_namespaceObject}),mermaidIcon=new LabIcon({name:"ui-components:mermaid",svgstr:mermaid_namespaceObject}),moveDownIcon=new LabIcon({name:"ui-components:move-down",svgstr:move_down_namespaceObject}),moveUpIcon=new LabIcon({name:"ui-components:move-up",svgstr:move_up_namespaceObject}),newFolderIcon=new LabIcon({name:"ui-components:new-folder",svgstr:new_folder_namespaceObject}),notTrustedIcon=new LabIcon({name:"ui-components:not-trusted",svgstr:not_trusted_namespaceObject}),notebookIcon=new LabIcon({name:"ui-components:notebook",svgstr:notebook_namespaceObject}),numberingIcon=new LabIcon({name:"ui-components:numbering",svgstr:numbering_namespaceObject}),offlineBoltIcon=new LabIcon({name:"ui-components:offline-bolt",svgstr:offline_bolt_namespaceObject}),openKernelSourceIcon=new LabIcon({name:"ui-components:open-kernel-source",svgstr:open_kernel_source_namespaceObject}),paletteIcon=new LabIcon({name:"ui-components:palette",svgstr:palette_namespaceObject}),pasteIcon=new LabIcon({name:"ui-components:paste",svgstr:paste_namespaceObject}),pauseIcon=new LabIcon({name:"ui-components:pause",svgstr:pause_namespaceObject}),pdfIcon=new LabIcon({name:"ui-components:pdf",svgstr:pdf_namespaceObject}),pythonIcon=new LabIcon({name:"ui-components:python",svgstr:python_namespaceObject}),rKernelIcon=new LabIcon({name:"ui-components:r-kernel",svgstr:r_kernel_namespaceObject}),reactIcon=new LabIcon({name:"ui-components:react",svgstr:filetype_react_namespaceObject}),redoIcon=new LabIcon({name:"ui-components:redo",svgstr:redo_namespaceObject}),refreshIcon=new LabIcon({name:"ui-components:refresh",svgstr:refresh_namespaceObject}),regexIcon=new LabIcon({name:"ui-components:regex",svgstr:regex_namespaceObject}),runIcon=new LabIcon({name:"ui-components:run",svgstr:run_namespaceObject}),runningIcon=new LabIcon({name:"ui-components:running",svgstr:running_namespaceObject}),saveIcon=new LabIcon({name:"ui-components:save",svgstr:save_namespaceObject}),searchIcon=new LabIcon({name:"ui-components:search",svgstr:search_namespaceObject}),selectedBreakpointIcon=new LabIcon({name:"ui-components:selected-breakpoint",svgstr:selected_breakpoint_namespaceObject}),settingsIcon=new LabIcon({name:"ui-components:settings",svgstr:settings_namespaceObject}),shareIcon=new LabIcon({name:"ui-components:share",svgstr:share_namespaceObject}),spreadsheetIcon=new LabIcon({name:"ui-components:spreadsheet",svgstr:spreadsheet_namespaceObject}),stepIntoIcon=new LabIcon({name:"ui-components:step-into",svgstr:step_into_namespaceObject}),stepOutIcon=new LabIcon({name:"ui-components:step-out",svgstr:step_out_namespaceObject}),stepOverIcon=new LabIcon({name:"ui-components:step-over",svgstr:step_over_namespaceObject}),stopIcon=new LabIcon({name:"ui-components:stop",svgstr:stop_namespaceObject}),tabIcon=new LabIcon({name:"ui-components:tab",svgstr:tab_namespaceObject}),tableRowsIcon=new LabIcon({name:"ui-components:table-rows",svgstr:table_rows_namespaceObject}),tagIcon=new LabIcon({name:"ui-components:tag",svgstr:tag_namespaceObject}),terminalIcon=new LabIcon({name:"ui-components:terminal",svgstr:terminal_namespaceObject}),textEditorIcon=new LabIcon({name:"ui-components:text-editor",svgstr:text_editor_namespaceObject}),tocIcon=new LabIcon({name:"ui-components:toc",svgstr:toc_namespaceObject}),treeViewIcon=new LabIcon({name:"ui-components:tree-view",svgstr:tree_view_namespaceObject}),trustedIcon=new LabIcon({name:"ui-components:trusted",svgstr:trusted_namespaceObject}),undoIcon=new LabIcon({name:"ui-components:undo",svgstr:undo_namespaceObject}),userIcon=new LabIcon({name:"ui-components:user",svgstr:user_namespaceObject}),usersIcon=new LabIcon({name:"ui-components:users",svgstr:users_namespaceObject}),variableIcon=new LabIcon({name:"ui-components:variable",svgstr:variable_namespaceObject}),vegaIcon=new LabIcon({name:"ui-components:vega",svgstr:vega_namespaceObject}),videoIcon=new LabIcon({name:"ui-components:video",svgstr:video_namespaceObject}),viewBreakpointIcon=new LabIcon({name:"ui-components:view-breakpoint",svgstr:view_breakpoint_namespaceObject}),wordIcon=new LabIcon({name:"ui-components:word",svgstr:word_namespaceObject}),yamlIcon=new LabIcon({name:"ui-components:yaml",svgstr:yaml_namespaceObject});var Styling,styling_Private,dialog_Private;!function(e){function t(e,t,i=""){if(e.localName===t&&e.classList.add("jp-mod-styled"),"select"===e.localName){const t=e.hasAttribute("multiple");n(e,t)}const s=e.getElementsByTagName(t);for(let e=0;e<s.length;e++){const r=s[e];if(r.classList.add("jp-mod-styled"),i&&r.classList.add(i),"select"===t){const e=r.hasAttribute("multiple");n(r,e)}}}function n(e,t){const n=document.createElement("div");return n.classList.add("jp-select-wrapper"),e.addEventListener("focus",styling_Private.onFocus),e.addEventListener("blur",styling_Private.onFocus),e.classList.add("jp-mod-styled"),e.parentElement&&e.parentElement.replaceChild(n,e),n.appendChild(e),t?n.classList.add("multiple"):n.appendChild(caretDownEmptyIcon.element({tag:"span",stylesheet:"select",right:"8px",top:"5px",width:"18px"})),n}e.styleNode=function(e,n=""){t(e,"select",n),t(e,"textarea",n),t(e,"input",n),t(e,"button",n)},e.styleNodeByTag=t,e.wrapSelect=n}(Styling||(Styling={})),(styling_Private||(styling_Private={})).onFocus=function(e){const t=e.target.parentElement;t&&("focus"===e.type?t.classList.add("jp-mod-focused"):t.classList.remove("jp-mod-focused"))};class WidgetTracker{constructor(e){this._currentChanged=new signaling_dist_index_es6.Signal(this),this._deferred=null,this._isDisposed=!1,this._widgetAdded=new signaling_dist_index_es6.Signal(this),this._widgetUpdated=new signaling_dist_index_es6.Signal(this);const t=this._focusTracker=new FocusTracker,n=this._pool=new lib.RestorablePool(e);this.namespace=e.namespace,t.currentChanged.connect((e,t)=>{t.newValue!==this.currentWidget&&(n.current=t.newValue)},this),n.added.connect((e,t)=>{this._widgetAdded.emit(t)},this),n.currentChanged.connect((e,i)=>{null===i&&t.currentWidget?n.current=t.currentWidget:(this.onCurrentChanged(i),this._currentChanged.emit(i))},this),n.updated.connect((e,t)=>{this._widgetUpdated.emit(t)},this)}get currentChanged(){return this._currentChanged}get currentWidget(){return this._pool.current||null}get restored(){return this._deferred?Promise.resolve():this._pool.restored}get size(){return this._pool.size}get widgetAdded(){return this._widgetAdded}get widgetUpdated(){return this._widgetUpdated}async add(e){this._focusTracker.add(e),await this._pool.add(e),this._focusTracker.activeWidget||(this._pool.current=e)}get isDisposed(){return this._isDisposed}dispose(){this.isDisposed||(this._isDisposed=!0,this._pool.dispose(),this._focusTracker.dispose(),signaling_dist_index_es6.Signal.clearData(this))}find(e){return this._pool.find(e)}forEach(e){return this._pool.forEach(e)}filter(e){return this._pool.filter(e)}inject(e){return this._pool.inject(e)}has(e){return this._pool.has(e)}async restore(e){const t=this._deferred;return t?(this._deferred=null,this._pool.restore(t)):e?this._pool.restore(e):void console.warn("No options provided to restore the tracker.")}defer(e){this._deferred=e}async save(e){return this._pool.save(e)}onCurrentChanged(e){}}function showDialog(e={}){return new Dialog(e).launch()}function showErrorMessage(e,t,n){const i=Dialog.translator.load("jupyterlab");n=null!=n?n:[Dialog.cancelButton({label:i.__("Close")})],console.warn("Showing error:",t);const s="string"==typeof t?t:t.message,r=e+"----"+s,o=dialog_Private.errorMessagePromiseCache.get(r);if(o)return o;{const t=showDialog({title:e,body:s,buttons:n}).then(()=>{dialog_Private.errorMessagePromiseCache.delete(r)},e=>{throw dialog_Private.errorMessagePromiseCache.delete(r),e});return dialog_Private.errorMessagePromiseCache.set(r,t),t}}class Dialog extends Widget{constructor(e={}){const t=document.createElement("dialog");t.ariaModal="true",super({node:t}),this._hasValidationErrors=!1,this._ready=new dist.PromiseDelegate,this._focusNodeSelector="",this.addClass("jp-Dialog"),this.addClass("jp-ThemedContainer");const n=dialog_Private.handleOptions(e),i=n.renderer;if(this._host=n.host,this._defaultButton=n.defaultButton,this._buttons=n.buttons,this._hasClose=n.hasClose,this._buttonNodes=this._buttons.map(e=>i.createButtonNode(e)),this._checkboxNode=null,this._lastMouseDownInDialog=!1,n.checkbox){const{label:e="",caption:t="",checked:s=!1,className:r=""}=n.checkbox;this._checkboxNode=i.createCheckboxNode({label:e,caption:null!=t?t:e,checked:s,className:r})}const s=this.layout=new PanelLayout,r=new Panel;r.addClass("jp-Dialog-content"),"string"==typeof e.body&&(r.addClass("jp-Dialog-content-small"),t.ariaLabel=[n.title,e.body].join(" ")),s.addWidget(r),this._body=n.body;const o=i.createHeader(n.title,()=>this.reject(),e),a=i.createBody(n.body),l=i.createFooter(this._buttonNodes,this._checkboxNode);r.addWidget(o),r.addWidget(a),r.addWidget(l),this._bodyWidget=a,this._primary=this._buttonNodes[this._defaultButton],this._focusNodeSelector=e.focusNodeSelector,Dialog.tracker.add(this)}get ready(){return this._ready.promise}dispose(){const e=this._promise;e&&(this._promise=null,e.reject(void 0),index_es6.ArrayExt.removeFirstOf(dialog_Private.launchQueue,e.promise)),super.dispose()}launch(){if(this._promise)return this._promise.promise;const e=this._promise=new dist.PromiseDelegate,t=Promise.all(dialog_Private.launchQueue);return dialog_Private.launchQueue.push(this._promise.promise),t.then(()=>this._promise?(Widget.attach(this,this._host),e.promise):Promise.resolve({button:Dialog.cancelButton(),isChecked:null,value:null}))}resolve(e){this._promise&&(void 0===e&&(e=this._defaultButton),this._resolve(this._buttons[e]))}reject(){this._promise&&this._resolve(Dialog.cancelButton())}handleEvent(e){switch(e.type){case"keydown":this._evtKeydown(e);break;case"mousedown":this._evtMouseDown(e);break;case"click":this._evtClick(e);break;case"input":this._evtInput(e);break;case"focus":this._evtFocus(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}}onAfterAttach(e){const t=this.node;t.addEventListener("keydown",this,!0),t.addEventListener("contextmenu",this,!0),t.addEventListener("click",this,!0),document.addEventListener("mousedown",this,!0),document.addEventListener("focus",this,!0),document.addEventListener("input",this,!0),this._first=dialog_Private.findFirstFocusable(this.node),this._original=document.activeElement;const n=()=>{var e;if(this._focusNodeSelector){const e=this.node.querySelector(".jp-Dialog-body"),t=null==e?void 0:e.querySelector(this._focusNodeSelector);t&&(this._primary=t)}null===(e=this._primary)||void 0===e||e.focus(),this._ready.resolve()};this._bodyWidget instanceof ReactWidget&&void 0!==this._bodyWidget.renderPromise?this._bodyWidget.renderPromise.then(()=>{n()}).catch(()=>{console.error("Error while loading Dialog's body")}):n()}onAfterDetach(e){const t=this.node;t.removeEventListener("keydown",this,!0),t.removeEventListener("contextmenu",this,!0),t.removeEventListener("click",this,!0),document.removeEventListener("focus",this,!0),document.removeEventListener("mousedown",this,!0),document.removeEventListener("input",this,!0),this._original.focus()}onCloseRequest(e){this._promise&&this.reject(),super.onCloseRequest(e)}_evtInput(e){this._hasValidationErrors=!!this.node.querySelector(":invalid");for(let e=0;e<this._buttons.length;e++)this._buttons[e].accept&&(this._buttonNodes[e].disabled=this._hasValidationErrors)}_evtClick(e){if(!this.node.getElementsByClassName("jp-Dialog-content")[0].contains(e.target))return e.stopPropagation(),e.preventDefault(),void(this._hasClose&&!this._lastMouseDownInDialog&&this.reject());for(const t of this._buttonNodes)if(t.contains(e.target)){const e=this._buttonNodes.indexOf(t);this.resolve(e)}}_evtKeydown(e){switch(e.keyCode){case 27:e.stopPropagation(),e.preventDefault(),this._hasClose&&this.reject();break;case 37:{const t=document.activeElement;if(t instanceof HTMLButtonElement){let n=this._buttonNodes.indexOf(t)-1;n<0&&(n=this._buttonNodes.length-1);const i=this._buttonNodes[n];e.stopPropagation(),e.preventDefault(),i.focus()}break}case 39:{const t=document.activeElement;if(t instanceof HTMLButtonElement){let n=this._buttonNodes.indexOf(t)+1;n==this._buttons.length&&(n=0);const i=this._buttonNodes[n];e.stopPropagation(),e.preventDefault(),i.focus()}break}case 9:{const t=this._buttonNodes[this._buttons.length-1];document.activeElement!==t||e.shiftKey||(e.stopPropagation(),e.preventDefault(),this._first.focus());break}case 13:{e.stopPropagation(),e.preventDefault();const t=document.activeElement;if(t instanceof HTMLButtonElement){const e=this._buttonNodes.indexOf(t);-1!==e&&this.resolve(e)}else if(!(t instanceof HTMLTextAreaElement)){const e=this._defaultButton;this.resolve(e)}break}}}_evtFocus(e){var t;const n=e.target;this.node.contains(n)||(e.stopPropagation(),null===(t=this._buttonNodes[this._defaultButton])||void 0===t||t.focus())}_evtMouseDown(e){const t=this.node.getElementsByClassName("jp-Dialog-content")[0],n=e.target;this._lastMouseDownInDialog=t.contains(n)}_resolve(e){var t,n,i;if(this._hasValidationErrors&&e.accept)return;const s=this._promise;if(!s)return void this.dispose();this._promise=null,index_es6.ArrayExt.removeFirstOf(dialog_Private.launchQueue,s.promise);const r=this._body;let o=null;e.accept&&r instanceof Widget&&"function"==typeof r.getValue&&(o=r.getValue()),this.dispose(),s.resolve({button:e,isChecked:null!==(i=null===(n=null===(t=this._checkboxNode)||void 0===t?void 0:t.querySelector("input"))||void 0===n?void 0:n.checked)&&void 0!==i?i:null,value:o})}}!function(e){function t(t){t.accept=!1!==t.accept;const n=e.translator.load("jupyterlab"),i=t.accept?n.__("Ok"):n.__("Cancel");return{ariaLabel:t.ariaLabel||t.label||i,label:t.label||i,iconClass:t.iconClass||"",iconLabel:t.iconLabel||"",caption:t.caption||"",className:t.className||"",accept:t.accept,actions:t.actions||[],displayType:t.displayType||"default"}}e.translator=nullTranslator,e.createButton=t,e.cancelButton=function(e={}){return e.accept=!1,t(e)},e.okButton=function(e={}){return e.accept=!0,t(e)},e.warnButton=function(e={}){return e.displayType="warn",t(e)},e.flush=function(){e.tracker.forEach(e=>{e.dispose()})};class n{createHeader(t,n=()=>{},i={}){let s;const r=e=>{0===e.button&&(e.preventDefault(),n())},o=e=>{const{key:t}=e;"Enter"!==t&&" "!==t||n()};if("string"==typeof t){const n=e.translator.load("jupyterlab");s=ReactWidget.create(react.createElement(react.Fragment,null,t,i.hasClose&&react.createElement(Button,{className:"jp-Dialog-close-button",onMouseDown:r,onKeyDown:o,title:n.__("Cancel"),minimal:!0},react.createElement(LabIcon.resolveReact,{icon:closeIcon,tag:"span"}))))}else s=ReactWidget.create(t);return s.addClass("jp-Dialog-header"),Styling.styleNode(s.node),s}createBody(e){const t=e=>{void 0!==e.renderPromise?e.renderPromise.then(()=>{Styling.styleNode(e.node)}).catch(()=>{console.error("Error while loading Dialog's body")}):Styling.styleNode(e.node)};let n;return"string"==typeof e?(n=new Widget({node:document.createElement("span")}),n.node.textContent=e):e instanceof Widget?(n=e,n instanceof ReactWidget?t(n):Styling.styleNode(n.node)):(n=ReactWidget.create(e),MessageLoop.sendMessage(n,Widget.Msg.UpdateRequest),t(n)),n.addClass("jp-Dialog-body"),n}createFooter(e,t){const n=new Widget;n.addClass("jp-Dialog-footer"),t&&(n.node.appendChild(t),n.node.insertAdjacentHTML("beforeend",'<div class="jp-Dialog-spacer"></div>'));const i=document.createElement("div");i.classList.add("jp-Dialog-footerButtons");for(const t of e)i.appendChild(t);return n.node.appendChild(i),Styling.styleNode(n.node),n}createButtonNode(e){const t=document.createElement("button");return t.className=this.createItemClass(e),t.appendChild(this.renderIcon(e)),t.appendChild(this.renderLabel(e)),t}createCheckboxNode(e){const t=document.createElement("label");t.className="jp-Dialog-checkbox",e.className&&t.classList.add(e.className),t.title=e.caption,t.textContent=e.label;const n=document.createElement("input");return n.type="checkbox",n.checked=!!e.checked,t.insertAdjacentElement("afterbegin",n),t}createItemClass(e){let t="jp-Dialog-button";e.accept?t+=" jp-mod-accept":t+=" jp-mod-reject","warn"===e.displayType&&(t+=" jp-mod-warn");const n=e.className;return n&&(t+=` ${n}`),t}renderIcon(e){const t=document.createElement("div");return t.className=this.createIconClass(e),t.appendChild(document.createTextNode(e.iconLabel)),t}createIconClass(e){const t="jp-Dialog-buttonIcon",n=e.iconClass;return n?`${t} ${n}`:t}renderLabel(e){const t=document.createElement("div");return t.className="jp-Dialog-buttonLabel",t.title=e.caption,t.ariaLabel=e.ariaLabel,t.appendChild(document.createTextNode(e.label)),t}}e.Renderer=n,e.defaultRenderer=new n,e.tracker=new WidgetTracker({namespace:"@jupyterlab/apputils:Dialog"})}(Dialog||(Dialog={})),function(e){e.launchQueue=[],e.errorMessagePromiseCache=new Map,e.handleOptions=function(e={}){var t,n,i,s,r,o,a,l,c;const d=null!==(t=e.buttons)&&void 0!==t?t:[Dialog.cancelButton(),Dialog.okButton()];return{title:null!==(n=e.title)&&void 0!==n?n:"",body:null!==(i=e.body)&&void 0!==i?i:"",host:null!==(s=e.host)&&void 0!==s?s:document.body,checkbox:null!==(r=e.checkbox)&&void 0!==r?r:null,buttons:d,defaultButton:null!==(o=e.defaultButton)&&void 0!==o?o:d.length-1,renderer:null!==(a=e.renderer)&&void 0!==a?a:Dialog.defaultRenderer,focusNodeSelector:null!==(l=e.focusNodeSelector)&&void 0!==l?l:"",hasClose:null===(c=e.hasClose)||void 0===c||c}},e.findFirstFocusable=function(e){const t=["input","select","a[href]","textarea","button","[tabindex]"].join(",");return e.querySelectorAll(t)[0]}}(dialog_Private||(dialog_Private={}));const INPUT_DIALOG_CLASS="jp-Input-Dialog",INPUT_BOOLEAN_DIALOG_CLASS="jp-Input-Boolean-Dialog";var InputDialog;!function(e){e.getBoolean=function(e){return showDialog({...e,body:new InputBooleanDialog(e),buttons:[Dialog.cancelButton({label:e.cancelLabel}),Dialog.okButton({label:e.okLabel})],focusNodeSelector:"input"})},e.getNumber=function(e){return showDialog({...e,body:new InputNumberDialog(e),buttons:[Dialog.cancelButton({label:e.cancelLabel}),Dialog.okButton({label:e.okLabel})],focusNodeSelector:"input"})},e.getItem=function(e){return showDialog({...e,body:new InputItemsDialog(e),buttons:[Dialog.cancelButton({label:e.cancelLabel}),Dialog.okButton({label:e.okLabel})],focusNodeSelector:e.editable?"input":"select"})},e.getMultipleItems=function(e){return showDialog({...e,body:new InputMultipleItemsDialog(e),buttons:[Dialog.cancelButton({label:e.cancelLabel}),Dialog.okButton({label:e.okLabel})]})},e.getText=function(e){return showDialog({...e,body:new InputTextDialog(e),buttons:[Dialog.cancelButton({label:e.cancelLabel}),Dialog.okButton({label:e.okLabel})],focusNodeSelector:"input"})},e.getPassword=function(e){return showDialog({...e,body:new InputPasswordDialog(e),buttons:[Dialog.cancelButton({label:e.cancelLabel}),Dialog.okButton({label:e.okLabel})],focusNodeSelector:"input"})}}(InputDialog||(InputDialog={}));class InputDialogBase extends Widget{constructor(e){if(super(),this.addClass(INPUT_DIALOG_CLASS),this._input=document.createElement("input"),this._input.classList.add("jp-mod-styled"),this._input.id="jp-dialog-input-id",void 0!==e.label){const t=document.createElement("label");t.textContent=e.label,t.htmlFor=this._input.id,this.node.appendChild(t)}const t=document.createElement("div");if(t.className="jp-InputDialog-inputWrapper",e.prefix){const n=document.createElement("span");n.className="jp-InputDialog-inputPrefix",n.textContent=e.prefix,n.ariaHidden="true",t.appendChild(n)}if(t.appendChild(this._input),e.suffix){const n=document.createElement("span");n.className="jp-InputDialog-inputSuffix",n.textContent=e.suffix,n.ariaHidden="true",t.appendChild(n)}this.node.appendChild(t)}}class InputBooleanDialog extends InputDialogBase{constructor(e){super(e),this.addClass(INPUT_BOOLEAN_DIALOG_CLASS),this._input.type="checkbox",this._input.checked=!!e.value}getValue(){return this._input.checked}}class InputNumberDialog extends InputDialogBase{constructor(e){super(e),this._input.type="number",this._input.value=e.value?e.value.toString():"0"}getValue(){return this._input.value?Number(this._input.value):Number.NaN}}class InputDialogTextBase extends InputDialogBase{constructor(e){super(e),this._input.value=e.text?e.text:"",e.placeholder&&(this._input.placeholder=e.placeholder),e.pattern&&(this._input.pattern=e.pattern),e.required&&(this._input.required=e.required)}getValue(){return this._input.value}}class InputTextDialog extends InputDialogTextBase{constructor(e){var t;super(e),this._input.type="text",this._initialSelectionRange=Math.min(this._input.value.length,Math.max(0,null!==(t=e.selectionRange)&&void 0!==t?t:this._input.value.length))}onAfterAttach(e){super.onAfterAttach(e),this._initialSelectionRange>0&&this._input.value&&this._input.setSelectionRange(0,this._initialSelectionRange)}}class InputPasswordDialog extends InputDialogTextBase{constructor(e){super(e),this._input.type="password"}onAfterAttach(e){super.onAfterAttach(e),this._input.value&&this._input.select()}}class InputItemsDialog extends InputDialogBase{constructor(e){super(e),this._editable=e.editable||!1;let t,n=e.current||0;if("number"==typeof n&&(t=Math.max(0,Math.min(n,e.items.length-1)),n=""),this._list=document.createElement("select"),e.items.forEach((e,i)=>{const s=document.createElement("option");i===t&&(s.selected=!0,n=e),s.value=e,s.textContent=e,this._list.appendChild(s)}),e.editable){const t=document.createElement("datalist");t.id="input-dialog-items",t.appendChild(this._list),this._input.type="list",this._input.value=n,this._input.setAttribute("list",t.id),e.placeholder&&(this._input.placeholder=e.placeholder),this.node.appendChild(t)}else this._input.parentElement.replaceChild(this._list,this._input)}getValue(){return this._editable?this._input.value:this._list.value}}class InputMultipleItemsDialog extends InputDialogBase{constructor(e){super(e);let t=e.defaults||[];this._list=document.createElement("select"),this._list.setAttribute("multiple",""),e.items.forEach(e=>{const t=document.createElement("option");t.value=e,t.textContent=e,this._list.appendChild(t)}),this._input.remove(),this.node.appendChild(this._list);const n=this._list.options;for(let e=0;e<n.length;e++){const i=n[e];t.includes(i.value)?i.selected=!0:i.selected=!1}}getValue(){let e=[];for(let t of this._list.options)t.selected&&!t.classList.contains("hidden")&&e.push(t.value||t.text);return e}}function bind(e,t){return function(){return e.apply(t,arguments)}}const{toString:utils_toString}=Object.prototype,{getPrototypeOf}=Object,{iterator,toStringTag}=Symbol,kindOf=(cache=Object.create(null),e=>{const t=utils_toString.call(e);return cache[t]||(cache[t]=t.slice(8,-1).toLowerCase())});var cache;const kindOfTest=e=>(e=e.toLowerCase(),t=>kindOf(t)===e),typeOfTest=e=>t=>typeof t===e,{isArray}=Array,isUndefined=typeOfTest("undefined");function isBuffer(e){return null!==e&&!isUndefined(e)&&null!==e.constructor&&!isUndefined(e.constructor)&&isFunction(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const isArrayBuffer=kindOfTest("ArrayBuffer");function isArrayBufferView(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&isArrayBuffer(e.buffer),t}const isString=typeOfTest("string"),isFunction=typeOfTest("function"),isNumber=typeOfTest("number"),isObject=e=>null!==e&&"object"==typeof e,isBoolean=e=>!0===e||!1===e,isPlainObject=e=>{if("object"!==kindOf(e))return!1;const t=getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||toStringTag in e||iterator in e)},isEmptyObject=e=>{if(!isObject(e)||isBuffer(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isDate=kindOfTest("Date"),isFile=kindOfTest("File"),isBlob=kindOfTest("Blob"),isFileList=kindOfTest("FileList"),isStream=e=>isObject(e)&&isFunction(e.pipe),isFormData=e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||isFunction(e.append)&&("formdata"===(t=kindOf(e))||"object"===t&&isFunction(e.toString)&&"[object FormData]"===e.toString()))},isURLSearchParams=kindOfTest("URLSearchParams"),[isReadableStream,isRequest,isResponse,isHeaders]=["ReadableStream","Request","Response","Headers"].map(kindOfTest),trim=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function forEach(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let i,s;if("object"!=typeof e&&(e=[e]),isArray(e))for(i=0,s=e.length;i<s;i++)t.call(null,e[i],i,e);else{if(isBuffer(e))return;const s=n?Object.getOwnPropertyNames(e):Object.keys(e),r=s.length;let o;for(i=0;i<r;i++)o=s[i],t.call(null,e[o],o,e)}}function findKey(e,t){if(isBuffer(e))return null;t=t.toLowerCase();const n=Object.keys(e);let i,s=n.length;for(;s-- >0;)if(i=n[s],t===i.toLowerCase())return i;return null}const _global="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:__webpack_require__.g,isContextDefined=e=>!isUndefined(e)&&e!==_global;function merge(){const{caseless:e,skipUndefined:t}=isContextDefined(this)&&this||{},n={},i=(i,s)=>{const r=e&&findKey(n,s)||s;isPlainObject(n[r])&&isPlainObject(i)?n[r]=merge(n[r],i):isPlainObject(i)?n[r]=merge({},i):isArray(i)?n[r]=i.slice():t&&isUndefined(i)||(n[r]=i)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&forEach(arguments[e],i);return n}const extend=(e,t,n,{allOwnKeys:i}={})=>(forEach(t,(t,i)=>{n&&isFunction(t)?e[i]=bind(t,n):e[i]=t},{allOwnKeys:i}),e),stripBOM=e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits=(e,t,n,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject=(e,t,n,i)=>{let s,r,o;const a={};if(t=t||{},null==e)return t;do{for(s=Object.getOwnPropertyNames(e),r=s.length;r-- >0;)o=s[r],i&&!i(o,e,t)||a[o]||(t[o]=e[o],a[o]=!0);e=!1!==n&&getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},endsWith=(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const i=e.indexOf(t,n);return-1!==i&&i===n},toArray=e=>{if(!e)return null;if(isArray(e))return e;let t=e.length;if(!isNumber(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},isTypedArray=(TypedArray="undefined"!=typeof Uint8Array&&getPrototypeOf(Uint8Array),e=>TypedArray&&e instanceof TypedArray);var TypedArray;const forEachEntry=(e,t)=>{const n=(e&&e[iterator]).call(e);let i;for(;(i=n.next())&&!i.done;){const n=i.value;t.call(e,n[0],n[1])}},matchAll=(e,t)=>{let n;const i=[];for(;null!==(n=e.exec(t));)i.push(n);return i},isHTMLForm=kindOfTest("HTMLFormElement"),toCamelCase=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),utils_hasOwnProperty=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),isRegExp=kindOfTest("RegExp"),reduceDescriptors=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),i={};forEach(n,(n,s)=>{let r;!1!==(r=t(n,s,e))&&(i[s]=r||n)}),Object.defineProperties(e,i)},freezeMethods=e=>{reduceDescriptors(e,(t,n)=>{if(isFunction(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const i=e[n];isFunction(i)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet=(e,t)=>{const n={},i=e=>{e.forEach(e=>{n[e]=!0})};return isArray(e)?i(e):i(String(e).split(t)),n},noop=()=>{},toFiniteNumber=(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t;function isSpecCompliantForm(e){return!!(e&&isFunction(e.append)&&"FormData"===e[toStringTag]&&e[iterator])}const toJSONObject=e=>{const t=new Array(10),n=(e,i)=>{if(isObject(e)){if(t.indexOf(e)>=0)return;if(isBuffer(e))return e;if(!("toJSON"in e)){t[i]=e;const s=isArray(e)?[]:{};return forEach(e,(e,t)=>{const r=n(e,i+1);!isUndefined(r)&&(s[t]=r)}),t[i]=void 0,s}}return e};return n(e,0)},isAsyncFn=kindOfTest("AsyncFunction"),isThenable=e=>e&&(isObject(e)||isFunction(e))&&isFunction(e.then)&&isFunction(e.catch),_setImmediate=(setImmediateSupported="function"==typeof setImmediate,postMessageSupported=isFunction(_global.postMessage),setImmediateSupported?setImmediate:postMessageSupported?(token=`axios@${Math.random()}`,callbacks=[],_global.addEventListener("message",({source:e,data:t})=>{e===_global&&t===token&&callbacks.length&&callbacks.shift()()},!1),e=>{callbacks.push(e),_global.postMessage(token,"*")}):e=>setTimeout(e));var setImmediateSupported,postMessageSupported,token,callbacks;const asap="undefined"!=typeof queueMicrotask?queueMicrotask.bind(_global):"undefined"!=typeof process&&process.nextTick||_setImmediate,isIterable=e=>null!=e&&isFunction(e[iterator]),utils={isArray,isArrayBuffer,isBuffer,isFormData,isArrayBufferView,isString,isNumber,isBoolean,isObject,isPlainObject,isEmptyObject,isReadableStream,isRequest,isResponse,isHeaders,isUndefined,isDate,isFile,isBlob,isRegExp,isFunction,isStream,isURLSearchParams,isTypedArray,isFileList,forEach,merge,extend,trim,stripBOM,inherits,toFlatObject,kindOf,kindOfTest,endsWith,toArray,forEachEntry,matchAll,isHTMLForm,hasOwnProperty:utils_hasOwnProperty,hasOwnProp:utils_hasOwnProperty,reduceDescriptors,freezeMethods,toObjectSet,toCamelCase,noop,toFiniteNumber,findKey,global:_global,isContextDefined,isSpecCompliantForm,toJSONObject,isAsyncFn,isThenable,setImmediate:_setImmediate,asap,isIterable};function AxiosError(e,t,n,i,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),i&&(this.request=i),s&&(this.response=s,this.status=s.status?s.status:null)}utils.inherits(AxiosError,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:utils.toJSONObject(this.config),code:this.code,status:this.status}}});const AxiosError_prototype=AxiosError.prototype,descriptors={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{descriptors[e]={value:e}}),Object.defineProperties(AxiosError,descriptors),Object.defineProperty(AxiosError_prototype,"isAxiosError",{value:!0}),AxiosError.from=(e,t,n,i,s,r)=>{const o=Object.create(AxiosError_prototype);utils.toFlatObject(e,o,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e);const a=e&&e.message?e.message:"Error",l=null==t&&e?e.code:t;return AxiosError.call(o,a,l,n,i,s),e&&null==o.cause&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",r&&Object.assign(o,r),o};const core_AxiosError=AxiosError,helpers_null=null;function isVisitable(e){return utils.isPlainObject(e)||utils.isArray(e)}function removeBrackets(e){return utils.endsWith(e,"[]")?e.slice(0,-2):e}function renderKey(e,t,n){return e?e.concat(t).map(function(e,t){return e=removeBrackets(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}function isFlatArray(e){return utils.isArray(e)&&!e.some(isVisitable)}const predicates=utils.toFlatObject(utils,{},null,function(e){return/^is[A-Z]/.test(e)});function toFormData(e,t,n){if(!utils.isObject(e))throw new TypeError("target must be an object");t=t||new(helpers_null||FormData);const i=(n=utils.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!utils.isUndefined(t[e])})).metaTokens,s=n.visitor||c,r=n.dots,o=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&utils.isSpecCompliantForm(t);if(!utils.isFunction(s))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(utils.isDate(e))return e.toISOString();if(utils.isBoolean(e))return e.toString();if(!a&&utils.isBlob(e))throw new core_AxiosError("Blob is not supported. Use a Buffer instead.");return utils.isArrayBuffer(e)||utils.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,s){let a=e;if(e&&!s&&"object"==typeof e)if(utils.endsWith(n,"{}"))n=i?n:n.slice(0,-2),e=JSON.stringify(e);else if(utils.isArray(e)&&isFlatArray(e)||(utils.isFileList(e)||utils.endsWith(n,"[]"))&&(a=utils.toArray(e)))return n=removeBrackets(n),a.forEach(function(e,i){!utils.isUndefined(e)&&null!==e&&t.append(!0===o?renderKey([n],i,r):null===o?n:n+"[]",l(e))}),!1;return!!isVisitable(e)||(t.append(renderKey(s,n,r),l(e)),!1)}const d=[],u=Object.assign(predicates,{defaultVisitor:c,convertValue:l,isVisitable});if(!utils.isObject(e))throw new TypeError("data must be an object");return function e(n,i){if(!utils.isUndefined(n)){if(-1!==d.indexOf(n))throw Error("Circular reference detected in "+i.join("."));d.push(n),utils.forEach(n,function(n,r){!0===(!(utils.isUndefined(n)||null===n)&&s.call(t,n,utils.isString(r)?r.trim():r,i,u))&&e(n,i?i.concat(r):[r])}),d.pop()}}(e),t}const helpers_toFormData=toFormData;function encode(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function AxiosURLSearchParams(e,t){this._pairs=[],e&&helpers_toFormData(e,this,t)}const AxiosURLSearchParams_prototype=AxiosURLSearchParams.prototype;AxiosURLSearchParams_prototype.append=function(e,t){this._pairs.push([e,t])},AxiosURLSearchParams_prototype.toString=function(e){const t=e?function(t){return e.call(this,t,encode)}:encode;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};const helpers_AxiosURLSearchParams=AxiosURLSearchParams;function buildURL_encode(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function buildURL(e,t,n){if(!t)return e;const i=n&&n.encode||buildURL_encode;utils.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let r;if(r=s?s(t,n):utils.isURLSearchParams(t)?t.toString():new helpers_AxiosURLSearchParams(t,n).toString(i),r){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e}class InterceptorManager{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){utils.forEach(this.handlers,function(t){null!==t&&e(t)})}}const core_InterceptorManager=InterceptorManager,defaults_transitional={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},classes_URLSearchParams="undefined"!=typeof URLSearchParams?URLSearchParams:helpers_AxiosURLSearchParams,classes_FormData="undefined"!=typeof FormData?FormData:null,classes_Blob="undefined"!=typeof Blob?Blob:null,browser={isBrowser:!0,classes:{URLSearchParams:classes_URLSearchParams,FormData:classes_FormData,Blob:classes_Blob},protocols:["http","https","file","blob","url","data"]},hasBrowserEnv="undefined"!=typeof window&&"undefined"!=typeof document,_navigator="object"==typeof navigator&&navigator||void 0,hasStandardBrowserEnv=hasBrowserEnv&&(!_navigator||["ReactNative","NativeScript","NS"].indexOf(_navigator.product)<0),hasStandardBrowserWebWorkerEnv="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,origin=hasBrowserEnv&&window.location.href||"http://localhost",platform={...common_utils_namespaceObject,...browser};function toURLEncodedForm(e,t){return helpers_toFormData(e,new platform.classes.URLSearchParams,{visitor:function(e,t,n,i){return platform.isNode&&utils.isBuffer(e)?(this.append(t,e.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function parsePropPath(e){return utils.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}function arrayToObject(e){const t={},n=Object.keys(e);let i;const s=n.length;let r;for(i=0;i<s;i++)r=n[i],t[r]=e[r];return t}function formDataToJSON(e){function t(e,n,i,s){let r=e[s++];if("__proto__"===r)return!0;const o=Number.isFinite(+r),a=s>=e.length;return r=!r&&utils.isArray(i)?i.length:r,a?(utils.hasOwnProp(i,r)?i[r]=[i[r],n]:i[r]=n,!o):(i[r]&&utils.isObject(i[r])||(i[r]=[]),t(e,n,i[r],s)&&utils.isArray(i[r])&&(i[r]=arrayToObject(i[r])),!o)}if(utils.isFormData(e)&&utils.isFunction(e.entries)){const n={};return utils.forEachEntry(e,(e,i)=>{t(parsePropPath(e),i,n,0)}),n}return null}const helpers_formDataToJSON=formDataToJSON;function stringifySafely(e,t,n){if(utils.isString(e))try{return(t||JSON.parse)(e),utils.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}const defaults={transitional:defaults_transitional,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",i=n.indexOf("application/json")>-1,s=utils.isObject(e);if(s&&utils.isHTMLForm(e)&&(e=new FormData(e)),utils.isFormData(e))return i?JSON.stringify(helpers_formDataToJSON(e)):e;if(utils.isArrayBuffer(e)||utils.isBuffer(e)||utils.isStream(e)||utils.isFile(e)||utils.isBlob(e)||utils.isReadableStream(e))return e;if(utils.isArrayBufferView(e))return e.buffer;if(utils.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let r;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return toURLEncodedForm(e,this.formSerializer).toString();if((r=utils.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return helpers_toFormData(r?{"files[]":e}:e,t&&new t,this.formSerializer)}}return s||i?(t.setContentType("application/json",!1),stringifySafely(e)):e}],transformResponse:[function(e){const t=this.transitional||defaults.transitional,n=t&&t.forcedJSONParsing,i="json"===this.responseType;if(utils.isResponse(e)||utils.isReadableStream(e))return e;if(e&&utils.isString(e)&&(n&&!this.responseType||i)){const n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n){if("SyntaxError"===e.name)throw core_AxiosError.from(e,core_AxiosError.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform.classes.FormData,Blob:platform.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};utils.forEach(["delete","get","head","post","put","patch"],e=>{defaults.headers[e]={}});const lib_defaults=defaults,ignoreDuplicateOf=utils.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),parseHeaders=e=>{const t={};let n,i,s;return e&&e.split("\n").forEach(function(e){s=e.indexOf(":"),n=e.substring(0,s).trim().toLowerCase(),i=e.substring(s+1).trim(),!n||t[n]&&ignoreDuplicateOf[n]||("set-cookie"===n?t[n]?t[n].push(i):t[n]=[i]:t[n]=t[n]?t[n]+", "+i:i)}),t},$internals=Symbol("internals");function normalizeHeader(e){return e&&String(e).trim().toLowerCase()}function normalizeValue(e){return!1===e||null==e?e:utils.isArray(e)?e.map(normalizeValue):String(e)}function parseTokens(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(e);)t[i[1]]=i[2];return t}const isValidHeaderName=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function matchHeaderValue(e,t,n,i,s){return utils.isFunction(i)?i.call(this,t,n):(s&&(t=n),utils.isString(t)?utils.isString(i)?-1!==t.indexOf(i):utils.isRegExp(i)?i.test(t):void 0:void 0)}function formatHeader(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function buildAccessors(e,t){const n=utils.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(e,i+n,{value:function(e,n,s){return this[i].call(this,t,e,n,s)},configurable:!0})})}class AxiosHeaders{constructor(e){e&&this.set(e)}set(e,t,n){const i=this;function s(e,t,n){const s=normalizeHeader(t);if(!s)throw new Error("header name must be a non-empty string");const r=utils.findKey(i,s);(!r||void 0===i[r]||!0===n||void 0===n&&!1!==i[r])&&(i[r||t]=normalizeValue(e))}const r=(e,t)=>utils.forEach(e,(e,n)=>s(e,n,t));if(utils.isPlainObject(e)||e instanceof this.constructor)r(e,t);else if(utils.isString(e)&&(e=e.trim())&&!isValidHeaderName(e))r(parseHeaders(e),t);else if(utils.isObject(e)&&utils.isIterable(e)){let n,i,s={};for(const t of e){if(!utils.isArray(t))throw TypeError("Object iterator must return a key-value pair");s[i=t[0]]=(n=s[i])?utils.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}r(s,t)}else null!=e&&s(t,e,n);return this}get(e,t){if(e=normalizeHeader(e)){const n=utils.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return parseTokens(e);if(utils.isFunction(t))return t.call(this,e,n);if(utils.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=normalizeHeader(e)){const n=utils.findKey(this,e);return!(!n||void 0===this[n]||t&&!matchHeaderValue(this,this[n],n,t))}return!1}delete(e,t){const n=this;let i=!1;function s(e){if(e=normalizeHeader(e)){const s=utils.findKey(n,e);!s||t&&!matchHeaderValue(n,n[s],s,t)||(delete n[s],i=!0)}}return utils.isArray(e)?e.forEach(s):s(e),i}clear(e){const t=Object.keys(this);let n=t.length,i=!1;for(;n--;){const s=t[n];e&&!matchHeaderValue(this,this[s],s,e,!0)||(delete this[s],i=!0)}return i}normalize(e){const t=this,n={};return utils.forEach(this,(i,s)=>{const r=utils.findKey(n,s);if(r)return t[r]=normalizeValue(i),void delete t[s];const o=e?formatHeader(s):String(s).trim();o!==s&&delete t[s],t[o]=normalizeValue(i),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return utils.forEach(this,(n,i)=>{null!=n&&!1!==n&&(t[i]=e&&utils.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[$internals]=this[$internals]={accessors:{}}).accessors,n=this.prototype;function i(e){const i=normalizeHeader(e);t[i]||(buildAccessors(n,e),t[i]=!0)}return utils.isArray(e)?e.forEach(i):i(e),this}}AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),utils.reduceDescriptors(AxiosHeaders.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),utils.freezeMethods(AxiosHeaders);const core_AxiosHeaders=AxiosHeaders;function transformData(e,t){const n=this||lib_defaults,i=t||n,s=core_AxiosHeaders.from(i.headers);let r=i.data;return utils.forEach(e,function(e){r=e.call(n,r,s.normalize(),t?t.status:void 0)}),s.normalize(),r}function isCancel(e){return!(!e||!e.__CANCEL__)}function CanceledError(e,t,n){core_AxiosError.call(this,null==e?"canceled":e,core_AxiosError.ERR_CANCELED,t,n),this.name="CanceledError"}utils.inherits(CanceledError,core_AxiosError,{__CANCEL__:!0});const cancel_CanceledError=CanceledError;function settle(e,t,n){const i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(new core_AxiosError("Request failed with status code "+n.status,[core_AxiosError.ERR_BAD_REQUEST,core_AxiosError.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}function parseProtocol(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function speedometer(e,t){e=e||10;const n=new Array(e),i=new Array(e);let s,r=0,o=0;return t=void 0!==t?t:1e3,function(a){const l=Date.now(),c=i[o];s||(s=l),n[r]=a,i[r]=l;let d=o,u=0;for(;d!==r;)u+=n[d++],d%=e;if(r=(r+1)%e,r===o&&(o=(o+1)%e),l-s<t)return;const h=c&&l-c;return h?Math.round(1e3*u/h):void 0}}const helpers_speedometer=speedometer;function throttle(e,t){let n,i,s=0,r=1e3/t;const o=(t,r=Date.now())=>{s=r,n=null,i&&(clearTimeout(i),i=null),e(...t)};return[(...e)=>{const t=Date.now(),a=t-s;a>=r?o(e,t):(n=e,i||(i=setTimeout(()=>{i=null,o(n)},r-a)))},()=>n&&o(n)]}const helpers_throttle=throttle,progressEventReducer=(e,t,n=3)=>{let i=0;const s=helpers_speedometer(50,250);return helpers_throttle(n=>{const r=n.loaded,o=n.lengthComputable?n.total:void 0,a=r-i,l=s(a);i=r,e({loaded:r,total:o,progress:o?r/o:void 0,bytes:a,rate:l||void 0,estimated:l&&o&&r<=o?(o-r)/l:void 0,event:n,lengthComputable:null!=o,[t?"download":"upload"]:!0})},n)},progressEventDecorator=(e,t)=>{const n=null!=e;return[i=>t[0]({lengthComputable:n,total:e,loaded:i}),t[1]]},asyncDecorator=e=>(...t)=>utils.asap(()=>e(...t)),isURLSameOrigin=platform.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,platform.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(platform.origin),platform.navigator&&/(msie|trident)/i.test(platform.navigator.userAgent)):()=>!0,cookies=platform.hasStandardBrowserEnv?{write(e,t,n,i,s,r,o){if("undefined"==typeof document)return;const a=[`${e}=${encodeURIComponent(t)}`];utils.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),utils.isString(i)&&a.push(`path=${i}`),utils.isString(s)&&a.push(`domain=${s}`),!0===r&&a.push("secure"),utils.isString(o)&&a.push(`SameSite=${o}`),document.cookie=a.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function isAbsoluteURL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function combineURLs(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function buildFullPath(e,t,n){let i=!isAbsoluteURL(t);return e&&(i||0==n)?combineURLs(e,t):t}const headersToObject=e=>e instanceof core_AxiosHeaders?{...e}:e;function mergeConfig(e,t){t=t||{};const n={};function i(e,t,n,i){return utils.isPlainObject(e)&&utils.isPlainObject(t)?utils.merge.call({caseless:i},e,t):utils.isPlainObject(t)?utils.merge({},t):utils.isArray(t)?t.slice():t}function s(e,t,n,s){return utils.isUndefined(t)?utils.isUndefined(e)?void 0:i(void 0,e,0,s):i(e,t,0,s)}function r(e,t){if(!utils.isUndefined(t))return i(void 0,t)}function o(e,t){return utils.isUndefined(t)?utils.isUndefined(e)?void 0:i(void 0,e):i(void 0,t)}function a(n,s,r){return r in t?i(n,s):r in e?i(void 0,n):void 0}const l={url:r,method:r,data:r,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(e,t,n)=>s(headersToObject(e),headersToObject(t),0,!0)};return utils.forEach(Object.keys({...e,...t}),function(i){const r=l[i]||s,o=r(e[i],t[i],i);utils.isUndefined(o)&&r!==a||(n[i]=o)}),n}const resolveConfig=e=>{const t=mergeConfig({},e);let{data:n,withXSRFToken:i,xsrfHeaderName:s,xsrfCookieName:r,headers:o,auth:a}=t;if(t.headers=o=core_AxiosHeaders.from(o),t.url=buildURL(buildFullPath(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),utils.isFormData(n))if(platform.hasStandardBrowserEnv||platform.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(utils.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&o.set(e,n)})}if(platform.hasStandardBrowserEnv&&(i&&utils.isFunction(i)&&(i=i(t)),i||!1!==i&&isURLSameOrigin(t.url))){const e=s&&r&&cookies.read(r);e&&o.set(s,e)}return t},isXHRAdapterSupported="undefined"!=typeof XMLHttpRequest,xhr=isXHRAdapterSupported&&function(e){return new Promise(function(t,n){const i=resolveConfig(e);let s=i.data;const r=core_AxiosHeaders.from(i.headers).normalize();let o,a,l,c,d,{responseType:u,onUploadProgress:h,onDownloadProgress:p}=i;function m(){c&&c(),d&&d(),i.cancelToken&&i.cancelToken.unsubscribe(o),i.signal&&i.signal.removeEventListener("abort",o)}let f=new XMLHttpRequest;function g(){if(!f)return;const i=core_AxiosHeaders.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders());settle(function(e){t(e),m()},function(e){n(e),m()},{data:u&&"text"!==u&&"json"!==u?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:i,config:e,request:f}),f=null}f.open(i.method.toUpperCase(),i.url,!0),f.timeout=i.timeout,"onloadend"in f?f.onloadend=g:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(g)},f.onabort=function(){f&&(n(new core_AxiosError("Request aborted",core_AxiosError.ECONNABORTED,e,f)),f=null)},f.onerror=function(t){const i=t&&t.message?t.message:"Network Error",s=new core_AxiosError(i,core_AxiosError.ERR_NETWORK,e,f);s.event=t||null,n(s),f=null},f.ontimeout=function(){let t=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const s=i.transitional||defaults_transitional;i.timeoutErrorMessage&&(t=i.timeoutErrorMessage),n(new core_AxiosError(t,s.clarifyTimeoutError?core_AxiosError.ETIMEDOUT:core_AxiosError.ECONNABORTED,e,f)),f=null},void 0===s&&r.setContentType(null),"setRequestHeader"in f&&utils.forEach(r.toJSON(),function(e,t){f.setRequestHeader(t,e)}),utils.isUndefined(i.withCredentials)||(f.withCredentials=!!i.withCredentials),u&&"json"!==u&&(f.responseType=i.responseType),p&&([l,d]=progressEventReducer(p,!0),f.addEventListener("progress",l)),h&&f.upload&&([a,c]=progressEventReducer(h),f.upload.addEventListener("progress",a),f.upload.addEventListener("loadend",c)),(i.cancelToken||i.signal)&&(o=t=>{f&&(n(!t||t.type?new cancel_CanceledError(null,e,f):t),f.abort(),f=null)},i.cancelToken&&i.cancelToken.subscribe(o),i.signal&&(i.signal.aborted?o():i.signal.addEventListener("abort",o)));const v=parseProtocol(i.url);v&&-1===platform.protocols.indexOf(v)?n(new core_AxiosError("Unsupported protocol "+v+":",core_AxiosError.ERR_BAD_REQUEST,e)):f.send(s||null)})},composeSignals=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,i=new AbortController;const s=function(e){if(!n){n=!0,o();const t=e instanceof Error?e:this.reason;i.abort(t instanceof core_AxiosError?t:new cancel_CanceledError(t instanceof Error?t.message:t))}};let r=t&&setTimeout(()=>{r=null,s(new core_AxiosError(`timeout ${t} of ms exceeded`,core_AxiosError.ETIMEDOUT))},t);const o=()=>{e&&(r&&clearTimeout(r),r=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(s):e.removeEventListener("abort",s)}),e=null)};e.forEach(e=>e.addEventListener("abort",s));const{signal:a}=i;return a.unsubscribe=()=>utils.asap(o),a}},helpers_composeSignals=composeSignals,streamChunk=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let i,s=0;for(;s<n;)i=s+t,yield e.slice(s,i),s=i},readBytes=async function*(e,t){for await(const n of readStream(e))yield*streamChunk(n,t)},readStream=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},trackStream=(e,t,n,i)=>{const s=readBytes(e,t);let r,o=0,a=e=>{r||(r=!0,i&&i(e))};return new ReadableStream({async pull(e){try{const{done:t,value:i}=await s.next();if(t)return a(),void e.close();let r=i.byteLength;if(n){let e=o+=r;n(e)}e.enqueue(new Uint8Array(i))}catch(e){throw a(e),e}},cancel:e=>(a(e),s.return())},{highWaterMark:2})},DEFAULT_CHUNK_SIZE=65536,{isFunction:fetch_isFunction}=utils,globalFetchAPI=(({Request:e,Response:t})=>({Request:e,Response:t}))(utils.global),{ReadableStream:fetch_ReadableStream,TextEncoder:extension_TextEncoder}=utils.global,test=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},factory=e=>{e=utils.merge.call({skipUndefined:!0},globalFetchAPI,e);const{fetch:t,Request:n,Response:i}=e,s=t?fetch_isFunction(t):"function"==typeof fetch,r=fetch_isFunction(n),o=fetch_isFunction(i);if(!s)return!1;const a=s&&fetch_isFunction(fetch_ReadableStream),l=s&&("function"==typeof extension_TextEncoder?(c=new extension_TextEncoder,e=>c.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer()));var c;const d=r&&a&&test(()=>{let e=!1;const t=new n(platform.origin,{body:new fetch_ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),u=o&&a&&test(()=>utils.isReadableStream(new i("").body)),h={stream:u&&(e=>e.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!h[e]&&(h[e]=(t,n)=>{let i=t&&t[e];if(i)return i.call(t);throw new core_AxiosError(`Response type '${e}' is not supported`,core_AxiosError.ERR_NOT_SUPPORT,n)})});return async e=>{let{url:s,method:o,data:a,signal:c,cancelToken:p,timeout:m,onDownloadProgress:f,onUploadProgress:g,responseType:v,headers:_,withCredentials:b="same-origin",fetchOptions:y}=resolveConfig(e),w=t||fetch;v=v?(v+"").toLowerCase():"text";let x=helpers_composeSignals([c,p&&p.toAbortSignal()],m),S=null;const C=x&&x.unsubscribe&&(()=>{x.unsubscribe()});let k;try{if(g&&d&&"get"!==o&&"head"!==o&&0!==(k=await(async(e,t)=>{const i=utils.toFiniteNumber(e.getContentLength());return null==i?(async e=>{if(null==e)return 0;if(utils.isBlob(e))return e.size;if(utils.isSpecCompliantForm(e)){const t=new n(platform.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return utils.isArrayBufferView(e)||utils.isArrayBuffer(e)?e.byteLength:(utils.isURLSearchParams(e)&&(e+=""),utils.isString(e)?(await l(e)).byteLength:void 0)})(t):i})(_,a))){let e,t=new n(s,{method:"POST",body:a,duplex:"half"});if(utils.isFormData(a)&&(e=t.headers.get("content-type"))&&_.setContentType(e),t.body){const[e,n]=progressEventDecorator(k,progressEventReducer(asyncDecorator(g)));a=trackStream(t.body,DEFAULT_CHUNK_SIZE,e,n)}}utils.isString(b)||(b=b?"include":"omit");const t=r&&"credentials"in n.prototype,c={...y,signal:x,method:o.toUpperCase(),headers:_.normalize().toJSON(),body:a,duplex:"half",credentials:t?b:void 0};S=r&&new n(s,c);let p=await(r?w(S,y):w(s,c));const m=u&&("stream"===v||"response"===v);if(u&&(f||m&&C)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=p[t]});const t=utils.toFiniteNumber(p.headers.get("content-length")),[n,s]=f&&progressEventDecorator(t,progressEventReducer(asyncDecorator(f),!0))||[];p=new i(trackStream(p.body,DEFAULT_CHUNK_SIZE,n,()=>{s&&s(),C&&C()}),e)}v=v||"text";let E=await h[utils.findKey(h,v)||"text"](p,e);return!m&&C&&C(),await new Promise((t,n)=>{settle(t,n,{data:E,headers:core_AxiosHeaders.from(p.headers),status:p.status,statusText:p.statusText,config:e,request:S})})}catch(t){if(C&&C(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new core_AxiosError("Network Error",core_AxiosError.ERR_NETWORK,e,S),{cause:t.cause||t});throw core_AxiosError.from(t,t&&t.code,e,S)}}},seedCache=new Map,getFetch=e=>{let t=e&&e.env||{};const{fetch:n,Request:i,Response:s}=t,r=[i,s,n];let o,a,l=r.length,c=seedCache;for(;l--;)o=r[l],a=c.get(o),void 0===a&&c.set(o,a=l?new Map:factory(t)),c=a;return a},adapter=getFetch(),adapters_fetch=null,knownAdapters={http:helpers_null,xhr,fetch:{get:getFetch}};utils.forEach(knownAdapters,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const renderReason=e=>`- ${e}`,isResolvedHandle=e=>utils.isFunction(e)||null===e||!1===e;function getAdapter(e,t){e=utils.isArray(e)?e:[e];const{length:n}=e;let i,s;const r={};for(let o=0;o<n;o++){let n;if(i=e[o],s=i,!isResolvedHandle(i)&&(s=knownAdapters[(n=String(i)).toLowerCase()],void 0===s))throw new core_AxiosError(`Unknown adapter '${n}'`);if(s&&(utils.isFunction(s)||(s=s.get(t))))break;r[n||"#"+o]=s}if(!s){const e=Object.entries(r).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=n?e.length>1?"since :\n"+e.map(renderReason).join("\n"):" "+renderReason(e[0]):"as no adapter specified";throw new core_AxiosError("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return s}const adapters={getAdapter,adapters:knownAdapters};function throwIfCancellationRequested(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new cancel_CanceledError(null,e)}function dispatchRequest(e){return throwIfCancellationRequested(e),e.headers=core_AxiosHeaders.from(e.headers),e.data=transformData.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),adapters.getAdapter(e.adapter||lib_defaults.adapter,e)(e).then(function(t){return throwIfCancellationRequested(e),t.data=transformData.call(e,e.transformResponse,t),t.headers=core_AxiosHeaders.from(t.headers),t},function(t){return isCancel(t)||(throwIfCancellationRequested(e),t&&t.response&&(t.response.data=transformData.call(e,e.transformResponse,t.response),t.response.headers=core_AxiosHeaders.from(t.response.headers))),Promise.reject(t)})}const VERSION="1.13.2",validators={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{validators[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const deprecatedWarnings={};function assertOptions(e,t,n){if("object"!=typeof e)throw new core_AxiosError("options must be an object",core_AxiosError.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let s=i.length;for(;s-- >0;){const r=i[s],o=t[r];if(o){const t=e[r],n=void 0===t||o(t,r,e);if(!0!==n)throw new core_AxiosError("option "+r+" must be "+n,core_AxiosError.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new core_AxiosError("Unknown option "+r,core_AxiosError.ERR_BAD_OPTION)}}validators.transitional=function(e,t,n){function i(e,t){return"[Axios v"+VERSION+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,s,r)=>{if(!1===e)throw new core_AxiosError(i(s," has been removed"+(t?" in "+t:"")),core_AxiosError.ERR_DEPRECATED);return t&&!deprecatedWarnings[s]&&(deprecatedWarnings[s]=!0,console.warn(i(s," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,s,r)}},validators.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const validator={assertOptions,validators},Axios_validators=validator.validators;class Axios{constructor(e){this.defaults=e||{},this.interceptors={request:new core_InterceptorManager,response:new core_InterceptorManager}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=mergeConfig(this.defaults,t);const{transitional:n,paramsSerializer:i,headers:s}=t;void 0!==n&&validator.assertOptions(n,{silentJSONParsing:Axios_validators.transitional(Axios_validators.boolean),forcedJSONParsing:Axios_validators.transitional(Axios_validators.boolean),clarifyTimeoutError:Axios_validators.transitional(Axios_validators.boolean)},!1),null!=i&&(utils.isFunction(i)?t.paramsSerializer={serialize:i}:validator.assertOptions(i,{encode:Axios_validators.function,serialize:Axios_validators.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),validator.assertOptions(t,{baseUrl:Axios_validators.spelling("baseURL"),withXsrfToken:Axios_validators.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let r=s&&utils.merge(s.common,s[t.method]);s&&utils.forEach(["delete","get","head","post","put","patch","common"],e=>{delete s[e]}),t.headers=core_AxiosHeaders.concat(r,s);const o=[];let a=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,o.unshift(e.fulfilled,e.rejected))});const l=[];let c;this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let d,u=0;if(!a){const e=[dispatchRequest.bind(this),void 0];for(e.unshift(...o),e.push(...l),d=e.length,c=Promise.resolve(t);u<d;)c=c.then(e[u++],e[u++]);return c}d=o.length;let h=t;for(;u<d;){const e=o[u++],t=o[u++];try{h=e(h)}catch(e){t.call(this,e);break}}try{c=dispatchRequest.call(this,h)}catch(e){return Promise.reject(e)}for(u=0,d=l.length;u<d;)c=c.then(l[u++],l[u++]);return c}getUri(e){return buildURL(buildFullPath((e=mergeConfig(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}utils.forEach(["delete","get","head","options"],function(e){Axios.prototype[e]=function(t,n){return this.request(mergeConfig(n||{},{method:e,url:t,data:(n||{}).data}))}}),utils.forEach(["post","put","patch"],function(e){function t(t){return function(n,i,s){return this.request(mergeConfig(s||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}Axios.prototype[e]=t(),Axios.prototype[e+"Form"]=t(!0)});const core_Axios=Axios;class CancelToken{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const i=new Promise(e=>{n.subscribe(e),t=e}).then(e);return i.cancel=function(){n.unsubscribe(t)},i},e(function(e,i,s){n.reason||(n.reason=new cancel_CanceledError(e,i,s),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new CancelToken(function(t){e=t}),cancel:e}}}const cancel_CancelToken=CancelToken;function spread(e){return function(t){return e.apply(null,t)}}function isAxiosError(e){return utils.isObject(e)&&!0===e.isAxiosError}const HttpStatusCode={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(HttpStatusCode).forEach(([e,t])=>{HttpStatusCode[t]=e});const helpers_HttpStatusCode=HttpStatusCode;function createInstance(e){const t=new core_Axios(e),n=bind(core_Axios.prototype.request,t);return utils.extend(n,core_Axios.prototype,t,{allOwnKeys:!0}),utils.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return createInstance(mergeConfig(e,t))},n}const axios=createInstance(lib_defaults);axios.Axios=core_Axios,axios.CanceledError=cancel_CanceledError,axios.CancelToken=cancel_CancelToken,axios.isCancel=isCancel,axios.VERSION=VERSION,axios.toFormData=helpers_toFormData,axios.AxiosError=core_AxiosError,axios.Cancel=axios.CanceledError,axios.all=function(e){return Promise.all(e)},axios.spread=spread,axios.isAxiosError=isAxiosError,axios.mergeConfig=mergeConfig,axios.AxiosHeaders=core_AxiosHeaders,axios.formToJSON=e=>helpers_formDataToJSON(utils.isHTMLForm(e)?new FormData(e):e),axios.getAdapter=adapters.getAdapter,axios.HttpStatusCode=helpers_HttpStatusCode,axios.default=axios;const lib_axios=axios,template_namespaceObject=JSON.parse('{"metadata":{"kernelspec":{"name":"python","display_name":"Python (Pyodide)","language":"python"},"language_info":{"codemirror_mode":{"name":"python","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.8"},"jupyter-lite":{"jupyter-config-data":{},"jupyter-lite-schema-version":0}},"nbformat_minor":5,"nbformat":4,"cells":[{"id":"dea14a34-4803-44da-ae14-88b2c87a6f12","cell_type":"markdown","source":"# Welcome to JupyterLite on Galaxy\\n\\nThis notebook runs entirely in your browser using WebAssembly-powered Python (via Pyodide), seamlessly integrated with your Galaxy history.\\n\\nYou can `import gxy` and:\\n\\n- Open and edit notebooks linked to Galaxy datasets\\n- Download data using e.g. `filename = await gxy.get(1)`\\n- Upload results using e.g. `await gxy.put(filename)`\\n- Make API requests using e.g. `await gxy.api(\\"/api/version\\")`\\n\\nNo setup, no dependencies — just Python in the browser with full access to your Galaxy environment.","metadata":{}}]}'),EXTENSION_FILE="txt",EXTENSION_NOTEBOOK="ipynb";function getPayload(e,t,n,i){return{auto_decompress:!0,files:[],history_id:t,targets:[{destination:{type:"hdas"},elements:[{dbkey:"?",ext:i,name:`${e}`,paste_content:n,src:"pasted"}]}]}}function getTimestamp(){const e=new Date,t=e=>e.toString().padStart(2,"0");return"jl-"+e.getFullYear().toString()+t(e.getMonth()+1)+t(e.getDate())+"-"+t(e.getHours())+t(e.getMinutes())+t(e.getSeconds())}const extension_plugin={id:"jl-galaxy:plugin",autoStart:!0,activate:async e=>{console.log("Activating jl-galaxy...",e),e.restored.then(async()=>{const t=new URLSearchParams(window.location.search),n=t.get("dataset_id"),i=t.get("history_id"),s=getTimestamp(),r=t.get("root")||"/";let o=null;if(n){const e=`${r}api/datasets/${n}/display`;console.log("📥 Loading notebook from:",e);try{const t=await fetch(e);if(!t.ok)throw new Error(`Failed to fetch notebook: ${t.statusText}`);o=await t.json()}catch(e){console.error("❌ Could not load dataset details:",e)}}else o=template_namespaceObject,console.log("✅ Dataset identifer not available, loading default notebook");await e.commands.execute("filebrowser:hide-main");try{await e.serviceManager.contents.save(s,{type:"notebook",format:"json",content:o}),await e.commands.execute("docmanager:open",{path:s,factory:"Notebook"}),console.log("✅ Notebook opened:",s)}catch(e){console.error("❌ Could not load dataset notebook:",e)}try{e.commands.commandExecuted.connect(async(t,n)=>{"docmanager:open"===n.id?n.result.then(async e=>{var t;const n=null==e?void 0:e.context;if(n&&(null===(t=n.path)||void 0===t?void 0:t.startsWith("Untitled"))){const e=getTimestamp();await n.rename(e),console.log(`✅ Renamed new notebook to: ${e}`)}}):"docmanager:save"===n.id&&n.result.then(async()=>{const t=e.shell.currentWidget,n=null==t?void 0:t.context;if(n){let t=n.path||"",s=t.split("/").pop()||getTimestamp();const o=await InputDialog.getText({title:"💾 Save to Galaxy?",label:"Provide a name to save to source history:",text:s});if(o.button.accept&&o.value){s=o.value;const n=await e.serviceManager.contents.get(t,{content:!0}),a="string"==typeof n.content?n.content:JSON.stringify(n.content,null,2),l="notebook"===n.type?EXTENSION_NOTEBOOK:EXTENSION_FILE;if(a&&i){const e=getPayload(s,i,a,l);lib_axios.post(`${r}api/tools/fetch`,e).then(()=>{console.log(`✅ Notebook "${s}" saved to history`)}).catch(e=>{console.error(`❌ Could not save "${s}" to history:`,e)})}else console.error("❌ Could not load content or history identifier.")}else console.log("🚫 Export to Galaxy canceled by user")}})})}catch(e){console.error("❌ Failed to attach commands")}})}},extension=[extension_plugin];export{extension as default};
|