"use strict";
/*
 * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
 * This devtool is neither made for production nor for readable output files.
 * It uses "eval()" calls to create a separate source file in the browser devtools.
 * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
 * or disable the default devtool with "devtool: false".
 * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
 */
(self["webpackChunk_JUPYTERLAB_CORE_OUTPUT"] = self["webpackChunk_JUPYTERLAB_CORE_OUTPUT"] || []).push([["vendors-node_modules_jupyterlab_application_lib_index_js"],{

/***/ "../node_modules/@jupyterlab/application/lib/connectionlost.js":
/*!*********************************************************************!*\
  !*** ../node_modules/@jupyterlab/application/lib/connectionlost.js ***!
  \*********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   ConnectionLost: () => (/* binding */ ConnectionLost)\n/* harmony export */ });\n/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/apputils */ \"webpack/sharing/consume/default/@jupyterlab/apputils/@jupyterlab/apputils\");\n/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyterlab/translation */ \"webpack/sharing/consume/default/@jupyterlab/translation/@jupyterlab/translation\");\n/* harmony import */ var _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_translation__WEBPACK_IMPORTED_MODULE_1__);\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n\n/**\n * A default connection lost handler, which brings up an error dialog.\n */\nconst ConnectionLost = async function (manager, err, translator) {\n    translator = translator || _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_1__.nullTranslator;\n    const trans = translator.load('jupyterlab');\n    const title = trans.__('Server Connection Error');\n    const networkMsg = trans.__('A connection to the Jupyter server could not be established.\\n' +\n        'JupyterLab will continue trying to reconnect.\\n' +\n        'Check your network connection or Jupyter server configuration.\\n');\n    return (0,_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.showErrorMessage)(title, { message: networkMsg });\n};\n//# sourceMappingURL=connectionlost.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/application/lib/connectionlost.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/application/lib/frontend.js":
/*!***************************************************************!*\
  !*** ../node_modules/@jupyterlab/application/lib/frontend.js ***!
  \***************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   JupyterFrontEnd: () => (/* binding */ JupyterFrontEnd),\n/* harmony export */   JupyterFrontEndContextMenu: () => (/* binding */ JupyterFrontEndContextMenu)\n/* harmony export */ });\n/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/apputils */ \"webpack/sharing/consume/default/@jupyterlab/apputils/@jupyterlab/apputils\");\n/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _jupyterlab_docregistry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyterlab/docregistry */ \"webpack/sharing/consume/default/@jupyterlab/docregistry/@jupyterlab/docregistry\");\n/* harmony import */ var _jupyterlab_docregistry__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_docregistry__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _jupyterlab_services__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @jupyterlab/services */ \"webpack/sharing/consume/default/@jupyterlab/services/@jupyterlab/services\");\n/* harmony import */ var _jupyterlab_services__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_services__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @jupyterlab/ui-components */ \"webpack/sharing/consume/default/@jupyterlab/ui-components/@jupyterlab/ui-components\");\n/* harmony import */ var _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _lumino_application__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @lumino/application */ \"webpack/sharing/consume/default/@lumino/application/@lumino/application\");\n/* harmony import */ var _lumino_application__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_lumino_application__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @lumino/coreutils */ \"webpack/sharing/consume/default/@lumino/coreutils/@lumino/coreutils\");\n/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_lumino_coreutils__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @lumino/signaling */ \"webpack/sharing/consume/default/@lumino/signaling/@lumino/signaling\");\n/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_lumino_signaling__WEBPACK_IMPORTED_MODULE_6__);\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n\n\n\n\n\n\n/**\n * The base Jupyter front-end application class.\n *\n * @typeparam `T` - The `shell` type. Defaults to `JupyterFrontEnd.IShell`.\n *\n * @typeparam `U` - The type for supported format names. Defaults to `string`.\n *\n * #### Notes\n * This type is useful as a generic application against which front-end plugins\n * can be authored. It inherits from the Lumino `Application`.\n */\nclass JupyterFrontEnd extends _lumino_application__WEBPACK_IMPORTED_MODULE_4__.Application {\n    /**\n     * Construct a new JupyterFrontEnd object.\n     */\n    constructor(options) {\n        super(options);\n        this._formatChanged = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_6__.Signal(this);\n        // render context menu/submenus with inline svg icon tweaks\n        this.contextMenu = new _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_3__.ContextMenuSvg({\n            commands: this.commands,\n            renderer: options.contextMenuRenderer,\n            groupByTarget: false,\n            sortBySelector: false\n        });\n        // The default restored promise if one does not exist in the options.\n        const restored = new Promise(resolve => {\n            requestAnimationFrame(() => {\n                resolve();\n            });\n        });\n        this.commandLinker =\n            options.commandLinker || new _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.CommandLinker({ commands: this.commands });\n        this.docRegistry = options.docRegistry || new _jupyterlab_docregistry__WEBPACK_IMPORTED_MODULE_1__.DocumentRegistry();\n        this.restored =\n            options.restored ||\n                this.started.then(() => restored).catch(() => restored);\n        this.serviceManager = options.serviceManager || new _jupyterlab_services__WEBPACK_IMPORTED_MODULE_2__.ServiceManager();\n    }\n    /**\n     * The application form factor, e.g., `desktop` or `mobile`.\n     */\n    get format() {\n        return this._format;\n    }\n    set format(format) {\n        if (this._format !== format) {\n            this._format = format;\n            document.body.dataset['format'] = format;\n            this._formatChanged.emit(format);\n        }\n    }\n    /**\n     * A signal that emits when the application form factor changes.\n     */\n    get formatChanged() {\n        return this._formatChanged;\n    }\n    /**\n     * Walks up the DOM hierarchy of the target of the active `contextmenu`\n     * event, testing each HTMLElement ancestor for a user-supplied function. This can\n     * be used to find an HTMLElement on which to operate, given a context menu click.\n     *\n     * @param fn - a function that takes an `HTMLElement` and returns a\n     *   boolean for whether it is the element the requester is seeking.\n     *\n     * @returns an HTMLElement or undefined, if none is found.\n     */\n    contextMenuHitTest(fn) {\n        if (!this._contextMenuEvent ||\n            !(this._contextMenuEvent.target instanceof Node)) {\n            return undefined;\n        }\n        let node = this._contextMenuEvent.target;\n        do {\n            if (node instanceof HTMLElement && fn(node)) {\n                return node;\n            }\n            node = node.parentNode;\n        } while (node && node.parentNode && node !== node.parentNode);\n        return undefined;\n        // TODO: we should be able to use .composedPath() to simplify this function\n        // down to something like the below, but it seems like composedPath is\n        // sometimes returning an empty list.\n        /*\n        if (this._contextMenuEvent) {\n          this._contextMenuEvent\n            .composedPath()\n            .filter(x => x instanceof HTMLElement)\n            .find(test);\n        }\n        return undefined;\n        */\n    }\n    /**\n     * A method invoked on a document `'contextmenu'` event.\n     */\n    evtContextMenu(event) {\n        this._contextMenuEvent = event;\n        if (event.shiftKey ||\n            Private.suppressContextMenu(event.target)) {\n            return;\n        }\n        const opened = this.contextMenu.open(event);\n        if (opened) {\n            const items = this.contextMenu.menu.items;\n            // If only the context menu information will be shown,\n            // with no real commands, close the context menu and\n            // allow the native one to open.\n            if (items.length === 1 &&\n                items[0].command === JupyterFrontEndContextMenu.contextMenu) {\n                this.contextMenu.menu.close();\n                return;\n            }\n            // Stop propagation and allow the application context menu to show.\n            event.preventDefault();\n            event.stopPropagation();\n        }\n    }\n}\n/**\n * The namespace for `JupyterFrontEnd` class statics.\n */\n(function (JupyterFrontEnd) {\n    /**\n     * Is JupyterLab in document mode?\n     *\n     * @param path - Full URL of JupyterLab\n     * @param paths - The current IPaths object hydrated from PageConfig.\n     */\n    function inDocMode(path, paths) {\n        const docPattern = new RegExp(`^${paths.urls.doc}`);\n        const match = path.match(docPattern);\n        if (match) {\n            return true;\n        }\n        else {\n            return false;\n        }\n    }\n    JupyterFrontEnd.inDocMode = inDocMode;\n    /**\n     * The application paths dictionary token.\n     */\n    JupyterFrontEnd.IPaths = new _lumino_coreutils__WEBPACK_IMPORTED_MODULE_5__.Token('@jupyterlab/application:IPaths', `A service providing information about various\n  URLs and server paths for the current application. Use this service if you want to\n  assemble URLs to use the JupyterLab REST API.`);\n    /**\n     * The application tree resolver token.\n     *\n     * #### Notes\n     * Not all Jupyter front-end applications will have a tree resolver\n     * implemented on the client-side. This token should not be required as a\n     * dependency if it is possible to make it an optional dependency.\n     */\n    JupyterFrontEnd.ITreeResolver = new _lumino_coreutils__WEBPACK_IMPORTED_MODULE_5__.Token('@jupyterlab/application:ITreeResolver', 'A service to resolve the tree path.');\n})(JupyterFrontEnd || (JupyterFrontEnd = {}));\n/**\n * A namespace for module-private functionality.\n */\nvar Private;\n(function (Private) {\n    /**\n     * Returns whether the element is itself, or a child of, an element with the `jp-suppress-context-menu` data attribute.\n     */\n    function suppressContextMenu(element) {\n        return element.closest('[data-jp-suppress-context-menu]') !== null;\n    }\n    Private.suppressContextMenu = suppressContextMenu;\n})(Private || (Private = {}));\n/**\n * A namespace for the context menu override.\n */\nvar JupyterFrontEndContextMenu;\n(function (JupyterFrontEndContextMenu) {\n    /**\n     * An id for a private context-menu-info ersatz command.\n     */\n    JupyterFrontEndContextMenu.contextMenu = '__internal:context-menu-info';\n})(JupyterFrontEndContextMenu || (JupyterFrontEndContextMenu = {}));\n//# sourceMappingURL=frontend.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/application/lib/frontend.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/application/lib/index.js":
/*!************************************************************!*\
  !*** ../node_modules/@jupyterlab/application/lib/index.js ***!
  \************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   ConnectionLost: () => (/* reexport safe */ _connectionlost__WEBPACK_IMPORTED_MODULE_0__.ConnectionLost),\n/* harmony export */   IConnectionLost: () => (/* reexport safe */ _tokens__WEBPACK_IMPORTED_MODULE_8__.IConnectionLost),\n/* harmony export */   ILabShell: () => (/* reexport safe */ _shell__WEBPACK_IMPORTED_MODULE_6__.ILabShell),\n/* harmony export */   ILabStatus: () => (/* reexport safe */ _tokens__WEBPACK_IMPORTED_MODULE_8__.ILabStatus),\n/* harmony export */   ILayoutRestorer: () => (/* reexport safe */ _layoutrestorer__WEBPACK_IMPORTED_MODULE_3__.ILayoutRestorer),\n/* harmony export */   IMimeDocumentTracker: () => (/* reexport safe */ _mimerenderers__WEBPACK_IMPORTED_MODULE_4__.IMimeDocumentTracker),\n/* harmony export */   IRouter: () => (/* reexport safe */ _tokens__WEBPACK_IMPORTED_MODULE_8__.IRouter),\n/* harmony export */   ITreePathUpdater: () => (/* reexport safe */ _treepathupdater__WEBPACK_IMPORTED_MODULE_9__.ITreePathUpdater),\n/* harmony export */   JupyterFrontEnd: () => (/* reexport safe */ _frontend__WEBPACK_IMPORTED_MODULE_1__.JupyterFrontEnd),\n/* harmony export */   JupyterFrontEndContextMenu: () => (/* reexport safe */ _frontend__WEBPACK_IMPORTED_MODULE_1__.JupyterFrontEndContextMenu),\n/* harmony export */   JupyterLab: () => (/* reexport safe */ _lab__WEBPACK_IMPORTED_MODULE_2__.JupyterLab),\n/* harmony export */   LabShell: () => (/* reexport safe */ _shell__WEBPACK_IMPORTED_MODULE_6__.LabShell),\n/* harmony export */   LabStatus: () => (/* reexport safe */ _status__WEBPACK_IMPORTED_MODULE_7__.LabStatus),\n/* harmony export */   LayoutRestorer: () => (/* reexport safe */ _layoutrestorer__WEBPACK_IMPORTED_MODULE_3__.LayoutRestorer),\n/* harmony export */   Router: () => (/* reexport safe */ _router__WEBPACK_IMPORTED_MODULE_5__.Router),\n/* harmony export */   addSemanticCommand: () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_10__.addSemanticCommand),\n/* harmony export */   createRendermimePlugin: () => (/* reexport safe */ _mimerenderers__WEBPACK_IMPORTED_MODULE_4__.createRendermimePlugin),\n/* harmony export */   createRendermimePlugins: () => (/* reexport safe */ _mimerenderers__WEBPACK_IMPORTED_MODULE_4__.createRendermimePlugins),\n/* harmony export */   createSemanticCommand: () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_10__.createSemanticCommand)\n/* harmony export */ });\n/* harmony import */ var _connectionlost__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./connectionlost */ \"../node_modules/@jupyterlab/application/lib/connectionlost.js\");\n/* harmony import */ var _frontend__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./frontend */ \"../node_modules/@jupyterlab/application/lib/frontend.js\");\n/* harmony import */ var _lab__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lab */ \"../node_modules/@jupyterlab/application/lib/lab.js\");\n/* harmony import */ var _layoutrestorer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./layoutrestorer */ \"../node_modules/@jupyterlab/application/lib/layoutrestorer.js\");\n/* harmony import */ var _mimerenderers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./mimerenderers */ \"../node_modules/@jupyterlab/application/lib/mimerenderers.js\");\n/* harmony import */ var _router__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./router */ \"../node_modules/@jupyterlab/application/lib/router.js\");\n/* harmony import */ var _shell__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./shell */ \"../node_modules/@jupyterlab/application/lib/shell.js\");\n/* harmony import */ var _status__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./status */ \"../node_modules/@jupyterlab/application/lib/status.js\");\n/* harmony import */ var _tokens__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./tokens */ \"../node_modules/@jupyterlab/application/lib/tokens.js\");\n/* harmony import */ var _treepathupdater__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./treepathupdater */ \"../node_modules/@jupyterlab/application/lib/treepathupdater.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utils */ \"../node_modules/@jupyterlab/application/lib/utils.js\");\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/**\n * @packageDocumentation\n * @module application\n */\n\n\n\n\n\n\n\n\n\n\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/application/lib/index.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/application/lib/lab.js":
/*!**********************************************************!*\
  !*** ../node_modules/@jupyterlab/application/lib/lab.js ***!
  \**********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   JupyterLab: () => (/* binding */ JupyterLab)\n/* harmony export */ });\n/* harmony import */ var _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/coreutils */ \"webpack/sharing/consume/default/@jupyterlab/coreutils/@jupyterlab/coreutils\");\n/* harmony import */ var _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _jupyterlab_docregistry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyterlab/docregistry */ \"webpack/sharing/consume/default/@jupyterlab/docregistry/@jupyterlab/docregistry\");\n/* harmony import */ var _jupyterlab_docregistry__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_docregistry__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _jupyterlab_services__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @jupyterlab/services */ \"webpack/sharing/consume/default/@jupyterlab/services/@jupyterlab/services\");\n/* harmony import */ var _jupyterlab_services__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_services__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @lumino/coreutils */ \"webpack/sharing/consume/default/@lumino/coreutils/@lumino/coreutils\");\n/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_lumino_coreutils__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _frontend__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./frontend */ \"../node_modules/@jupyterlab/application/lib/frontend.js\");\n/* harmony import */ var _mimerenderers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./mimerenderers */ \"../node_modules/@jupyterlab/application/lib/mimerenderers.js\");\n/* harmony import */ var _shell__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./shell */ \"../node_modules/@jupyterlab/application/lib/shell.js\");\n/* harmony import */ var _status__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./status */ \"../node_modules/@jupyterlab/application/lib/status.js\");\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n\n\n\n\n\n\n\n/**\n * JupyterLab is the main application class. It is instantiated once and shared.\n */\nclass JupyterLab extends _frontend__WEBPACK_IMPORTED_MODULE_4__.JupyterFrontEnd {\n    /**\n     * Construct a new JupyterLab object.\n     */\n    constructor(options = { shell: new _shell__WEBPACK_IMPORTED_MODULE_5__.LabShell() }) {\n        super({\n            ...options,\n            shell: options.shell || new _shell__WEBPACK_IMPORTED_MODULE_5__.LabShell(),\n            serviceManager: options.serviceManager ||\n                new _jupyterlab_services__WEBPACK_IMPORTED_MODULE_2__.ServiceManager({\n                    standby: () => {\n                        return !this._info.isConnected || 'when-hidden';\n                    }\n                })\n        });\n        /**\n         * The name of the JupyterLab application.\n         */\n        this.name = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__.PageConfig.getOption('appName') || 'JupyterLab';\n        /**\n         * A namespace/prefix plugins may use to denote their provenance.\n         */\n        this.namespace = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__.PageConfig.getOption('appNamespace') || this.name;\n        /**\n         * A list of all errors encountered when registering plugins.\n         */\n        this.registerPluginErrors = [];\n        /**\n         * The application busy and dirty status signals and flags.\n         */\n        this.status = new _status__WEBPACK_IMPORTED_MODULE_6__.LabStatus(this);\n        /**\n         * The version of the JupyterLab application.\n         */\n        this.version = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__.PageConfig.getOption('appVersion') || 'unknown';\n        this._info = JupyterLab.defaultInfo;\n        this._allPluginsActivated = new _lumino_coreutils__WEBPACK_IMPORTED_MODULE_3__.PromiseDelegate();\n        // Create an IInfo dictionary from the options to override the defaults.\n        const info = Object.keys(JupyterLab.defaultInfo).reduce((acc, val) => {\n            if (val in options) {\n                acc[val] = JSON.parse(JSON.stringify(options[val]));\n            }\n            return acc;\n        }, {});\n        // Populate application info.\n        this._info = { ...JupyterLab.defaultInfo, ...info };\n        this.restored = this.shell.restored\n            .then(async () => {\n            const activated = [];\n            const deferred = this.activateDeferredPlugins().catch(error => {\n                console.error('Error when activating deferred plugins\\n:', error);\n            });\n            activated.push(deferred);\n            if (this._info.deferred) {\n                const customizedDeferred = Promise.all(this._info.deferred.matches.map(pluginID => this.activatePlugin(pluginID))).catch(error => {\n                    console.error('Error when activating customized list of deferred plugins:\\n', error);\n                });\n                activated.push(customizedDeferred);\n            }\n            Promise.all(activated)\n                .then(() => {\n                this._allPluginsActivated.resolve();\n            })\n                .catch(() => undefined);\n        })\n            .catch(() => undefined);\n        // Populate application paths override the defaults if necessary.\n        const defaultURLs = JupyterLab.defaultPaths.urls;\n        const defaultDirs = JupyterLab.defaultPaths.directories;\n        const optionURLs = (options.paths && options.paths.urls) || {};\n        const optionDirs = (options.paths && options.paths.directories) || {};\n        this._paths = {\n            urls: Object.keys(defaultURLs).reduce((acc, key) => {\n                if (key in optionURLs) {\n                    const value = optionURLs[key];\n                    acc[key] = value;\n                }\n                else {\n                    acc[key] = defaultURLs[key];\n                }\n                return acc;\n            }, {}),\n            directories: Object.keys(JupyterLab.defaultPaths.directories).reduce((acc, key) => {\n                if (key in optionDirs) {\n                    const value = optionDirs[key];\n                    acc[key] = value;\n                }\n                else {\n                    acc[key] = defaultDirs[key];\n                }\n                return acc;\n            }, {})\n        };\n        if (this._info.devMode) {\n            this.shell.addClass('jp-mod-devMode');\n        }\n        // Add initial model factory.\n        this.docRegistry.addModelFactory(new _jupyterlab_docregistry__WEBPACK_IMPORTED_MODULE_1__.Base64ModelFactory());\n        if (options.mimeExtensions) {\n            for (const plugin of (0,_mimerenderers__WEBPACK_IMPORTED_MODULE_7__.createRendermimePlugins)(options.mimeExtensions)) {\n                this.registerPlugin(plugin);\n            }\n        }\n    }\n    /**\n     * The JupyterLab application information dictionary.\n     */\n    get info() {\n        return this._info;\n    }\n    /**\n     * The JupyterLab application paths dictionary.\n     */\n    get paths() {\n        return this._paths;\n    }\n    /**\n     * Promise that resolves when all the plugins are activated, including the deferred.\n     */\n    get allPluginsActivated() {\n        return this._allPluginsActivated.promise;\n    }\n    /**\n     * Register plugins from a plugin module.\n     *\n     * @param mod - The plugin module to register.\n     */\n    registerPluginModule(mod) {\n        let data = mod.default;\n        // Handle commonjs exports.\n        if (!mod.hasOwnProperty('__esModule')) {\n            data = mod;\n        }\n        if (!Array.isArray(data)) {\n            data = [data];\n        }\n        data.forEach(item => {\n            try {\n                this.registerPlugin(item);\n            }\n            catch (error) {\n                this.registerPluginErrors.push(error);\n            }\n        });\n    }\n    /**\n     * Register the plugins from multiple plugin modules.\n     *\n     * @param mods - The plugin modules to register.\n     */\n    registerPluginModules(mods) {\n        mods.forEach(mod => {\n            this.registerPluginModule(mod);\n        });\n    }\n    /**\n     * Override keydown handling to prevent command shortcuts from preventing user input.\n     *\n     * This introduces a slight delay to the command invocation, but no delay to user input.\n     */\n    evtKeydown(keyDownEvent) {\n        const permissionToExecute = new _lumino_coreutils__WEBPACK_IMPORTED_MODULE_3__.PromiseDelegate();\n        // Hold the execution of any keybinding until we know if this event would cause text insertion\n        this.commands.holdKeyBindingExecution(keyDownEvent, permissionToExecute.promise);\n        // Process the key immediately to invoke the prevent default handlers as needed\n        this.commands.processKeydownEvent(keyDownEvent);\n        // If we do not know the target, we cannot check if input would be inserted\n        // as there is no target to attach the `beforeinput` event listener; in that\n        // case we just permit execution immediately (this may happen for programmatic\n        // uses of keydown)\n        const target = keyDownEvent.target;\n        if (!target) {\n            return permissionToExecute.resolve(true);\n        }\n        let onBeforeInput = null;\n        let onBeforeKeyUp = null;\n        const disconnectListeners = () => {\n            if (onBeforeInput) {\n                target.removeEventListener('beforeinput', onBeforeInput);\n            }\n            if (onBeforeKeyUp) {\n                target.removeEventListener('keyup', onBeforeKeyUp);\n            }\n        };\n        // Permit the execution conditionally, depending on whether the event would lead to text insertion\n        const causesInputPromise = Promise.race([\n            new Promise(resolve => {\n                onBeforeInput = (inputEvent) => {\n                    switch (inputEvent.inputType) {\n                        case 'historyUndo':\n                        case 'historyRedo': {\n                            if (inputEvent.target instanceof Element &&\n                                inputEvent.target.closest('[data-jp-undoer]')) {\n                                // Allow to use custom undo/redo bindings on `jpUndoer`s\n                                inputEvent.preventDefault();\n                                disconnectListeners();\n                                return resolve(false);\n                            }\n                            break;\n                        }\n                        case 'insertLineBreak': {\n                            if (inputEvent.target instanceof Element &&\n                                inputEvent.target.closest('.jp-Cell')) {\n                                // Allow to override the default action of Shift + Enter on cells as this is used for cell execution\n                                inputEvent.preventDefault();\n                                disconnectListeners();\n                                return resolve(false);\n                            }\n                            break;\n                        }\n                    }\n                    disconnectListeners();\n                    return resolve(true);\n                };\n                target.addEventListener('beforeinput', onBeforeInput, { once: true });\n            }),\n            new Promise(resolve => {\n                onBeforeKeyUp = (keyUpEvent) => {\n                    if (keyUpEvent.code === keyDownEvent.code) {\n                        disconnectListeners();\n                        return resolve(false);\n                    }\n                };\n                target.addEventListener('keyup', onBeforeKeyUp, { once: true });\n            }),\n            new Promise(resolve => {\n                setTimeout(() => {\n                    disconnectListeners();\n                    return resolve(false);\n                }, Private.INPUT_GUARD_TIMEOUT);\n            })\n        ]);\n        causesInputPromise\n            .then(willCauseInput => {\n            permissionToExecute.resolve(!willCauseInput);\n        })\n            .catch(console.warn);\n    }\n}\n/**\n * The namespace for `JupyterLab` class statics.\n */\n(function (JupyterLab) {\n    /**\n     * The layout restorer token.\n     */\n    JupyterLab.IInfo = new _lumino_coreutils__WEBPACK_IMPORTED_MODULE_3__.Token('@jupyterlab/application:IInfo', 'A service providing metadata about the current application, including disabled extensions and whether dev mode is enabled.');\n    /**\n     * The default JupyterLab application info.\n     */\n    JupyterLab.defaultInfo = {\n        devMode: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__.PageConfig.getOption('devMode').toLowerCase() === 'true',\n        deferred: { patterns: [], matches: [] },\n        disabled: { patterns: [], matches: [] },\n        mimeExtensions: [],\n        availablePlugins: [],\n        filesCached: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__.PageConfig.getOption('cacheFiles').toLowerCase() === 'true',\n        isConnected: true\n    };\n    /**\n     * The default JupyterLab application paths.\n     */\n    JupyterLab.defaultPaths = {\n        urls: {\n            base: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__.PageConfig.getOption('baseUrl'),\n            notFound: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__.PageConfig.getOption('notFoundUrl'),\n            app: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__.PageConfig.getOption('appUrl'),\n            doc: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__.PageConfig.getOption('docUrl'),\n            static: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__.PageConfig.getOption('staticUrl'),\n            settings: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__.PageConfig.getOption('settingsUrl'),\n            themes: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__.PageConfig.getOption('themesUrl'),\n            translations: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__.PageConfig.getOption('translationsApiUrl'),\n            hubHost: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__.PageConfig.getOption('hubHost') || undefined,\n            hubPrefix: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__.PageConfig.getOption('hubPrefix') || undefined,\n            hubUser: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__.PageConfig.getOption('hubUser') || undefined,\n            hubServerName: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__.PageConfig.getOption('hubServerName') || undefined\n        },\n        directories: {\n            appSettings: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__.PageConfig.getOption('appSettingsDir'),\n            schemas: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__.PageConfig.getOption('schemasDir'),\n            static: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__.PageConfig.getOption('staticDir'),\n            templates: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__.PageConfig.getOption('templatesDir'),\n            themes: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__.PageConfig.getOption('themesDir'),\n            userSettings: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__.PageConfig.getOption('userSettingsDir'),\n            serverRoot: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__.PageConfig.getOption('serverRoot'),\n            workspaces: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__.PageConfig.getOption('workspacesDir')\n        }\n    };\n})(JupyterLab || (JupyterLab = {}));\n/**\n * A namespace for module-private functionality.\n */\nvar Private;\n(function (Private) {\n    /**\n     * The delay for invoking a command introduced by user input guard.\n     * Decreasing this value may lead to commands incorrectly triggering\n     * on user input. Increasing this value will lead to longer delay for\n     * command invocation. Note that user input is never delayed.\n     *\n     * The value represents the number in milliseconds.\n     */\n    Private.INPUT_GUARD_TIMEOUT = 10;\n})(Private || (Private = {}));\n//# sourceMappingURL=lab.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/application/lib/lab.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/application/lib/router.js":
/*!*************************************************************!*\
  !*** ../node_modules/@jupyterlab/application/lib/router.js ***!
  \*************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   Router: () => (/* binding */ Router)\n/* harmony export */ });\n/* harmony import */ var _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/coreutils */ \"webpack/sharing/consume/default/@jupyterlab/coreutils/@jupyterlab/coreutils\");\n/* harmony import */ var _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @lumino/coreutils */ \"webpack/sharing/consume/default/@lumino/coreutils/@lumino/coreutils\");\n/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_lumino_coreutils__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _lumino_disposable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @lumino/disposable */ \"webpack/sharing/consume/default/@lumino/disposable/@lumino/disposable\");\n/* harmony import */ var _lumino_disposable__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_lumino_disposable__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @lumino/signaling */ \"webpack/sharing/consume/default/@lumino/signaling/@lumino/signaling\");\n/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_lumino_signaling__WEBPACK_IMPORTED_MODULE_3__);\n/* -----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|----------------------------------------------------------------------------*/\n\n\n\n\n/**\n * A static class that routes URLs within the application.\n */\nclass Router {\n    /**\n     * Create a URL router.\n     */\n    constructor(options) {\n        /**\n         * If a matching rule's command resolves with the `stop` token during routing,\n         * no further matches will execute.\n         */\n        this.stop = new _lumino_coreutils__WEBPACK_IMPORTED_MODULE_1__.Token('@jupyterlab/application:Router#stop');\n        this._routed = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_3__.Signal(this);\n        this._rules = new Map();\n        this.base = options.base;\n        this.commands = options.commands;\n    }\n    /**\n     * Returns the parsed current URL of the application.\n     */\n    get current() {\n        var _a, _b;\n        const { base } = this;\n        const parsed = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__.URLExt.parse(window.location.href);\n        const { search, hash } = parsed;\n        const path = (_b = (_a = parsed.pathname) === null || _a === void 0 ? void 0 : _a.replace(base, '/')) !== null && _b !== void 0 ? _b : '';\n        const request = path + search + hash;\n        return { hash, path, request, search };\n    }\n    /**\n     * A signal emitted when the router routes a route.\n     */\n    get routed() {\n        return this._routed;\n    }\n    /**\n     * Navigate to a new path within the application.\n     *\n     * @param path - The new path or empty string if redirecting to root.\n     *\n     * @param options - The navigation options.\n     */\n    navigate(path, options = {}) {\n        const { base } = this;\n        const { history } = window;\n        const { hard } = options;\n        const old = document.location.href;\n        const url = path && path.indexOf(base) === 0 ? path : _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__.URLExt.join(base, path);\n        if (url === old) {\n            return hard ? this.reload() : undefined;\n        }\n        history.pushState({}, '', url);\n        if (hard) {\n            return this.reload();\n        }\n        if (!options.skipRouting) {\n            // Because a `route()` call may still be in the stack after having received\n            // a `stop` token, wait for the next stack frame before calling `route()`.\n            requestAnimationFrame(() => {\n                void this.route();\n            });\n        }\n    }\n    /**\n     * Register to route a path pattern to a command.\n     *\n     * @param options - The route registration options.\n     *\n     * @returns A disposable that removes the registered rule from the router.\n     */\n    register(options) {\n        var _a;\n        const { command, pattern } = options;\n        const rank = (_a = options.rank) !== null && _a !== void 0 ? _a : 100;\n        const rules = this._rules;\n        rules.set(pattern, { command, rank });\n        return new _lumino_disposable__WEBPACK_IMPORTED_MODULE_2__.DisposableDelegate(() => {\n            rules.delete(pattern);\n        });\n    }\n    /**\n     * Cause a hard reload of the document.\n     */\n    reload() {\n        window.location.reload();\n    }\n    /**\n     * Route a specific path to an action.\n     *\n     * #### Notes\n     * If a pattern is matched, its command will be invoked with arguments that\n     * match the `IRouter.ILocation` interface.\n     */\n    route() {\n        const { commands, current, stop } = this;\n        const { request } = current;\n        const routed = this._routed;\n        const rules = this._rules;\n        const matches = [];\n        // Collect all rules that match the URL.\n        rules.forEach((rule, pattern) => {\n            if (request === null || request === void 0 ? void 0 : request.match(pattern)) {\n                matches.push(rule);\n            }\n        });\n        // Order the matching rules by rank and enqueue them.\n        const queue = matches.sort((a, b) => b.rank - a.rank);\n        const done = new _lumino_coreutils__WEBPACK_IMPORTED_MODULE_1__.PromiseDelegate();\n        // Process each enqueued command sequentially and short-circuit if a promise\n        // resolves with the `stop` token.\n        const next = async () => {\n            if (!queue.length) {\n                routed.emit(current);\n                done.resolve(undefined);\n                return;\n            }\n            const { command } = queue.pop();\n            try {\n                const request = this.current.request;\n                const result = await commands.execute(command, current);\n                if (result === stop) {\n                    queue.length = 0;\n                    console.debug(`Routing ${request} was short-circuited by ${command}`);\n                }\n            }\n            catch (reason) {\n                console.warn(`Routing ${request} to ${command} failed`, reason);\n            }\n            void next();\n        };\n        void next();\n        return done.promise;\n    }\n}\n//# sourceMappingURL=router.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/application/lib/router.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/application/lib/shell.js":
/*!************************************************************!*\
  !*** ../node_modules/@jupyterlab/application/lib/shell.js ***!
  \************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   ILabShell: () => (/* binding */ ILabShell),\n/* harmony export */   LabShell: () => (/* binding */ LabShell)\n/* harmony export */ });\n/* harmony import */ var _jupyterlab_docregistry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/docregistry */ \"webpack/sharing/consume/default/@jupyterlab/docregistry/@jupyterlab/docregistry\");\n/* harmony import */ var _jupyterlab_docregistry__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_docregistry__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyterlab/translation */ \"webpack/sharing/consume/default/@jupyterlab/translation/@jupyterlab/translation\");\n/* harmony import */ var _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_translation__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @jupyterlab/ui-components */ \"webpack/sharing/consume/default/@jupyterlab/ui-components/@jupyterlab/ui-components\");\n/* harmony import */ var _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @lumino/algorithm */ \"webpack/sharing/consume/default/@lumino/algorithm/@lumino/algorithm\");\n/* harmony import */ var _lumino_algorithm__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @lumino/coreutils */ \"webpack/sharing/consume/default/@lumino/coreutils/@lumino/coreutils\");\n/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_lumino_coreutils__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _lumino_messaging__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @lumino/messaging */ \"webpack/sharing/consume/default/@lumino/messaging/@lumino/messaging\");\n/* harmony import */ var _lumino_messaging__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_lumino_messaging__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _lumino_polling__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @lumino/polling */ \"webpack/sharing/consume/default/@lumino/polling/@lumino/polling\");\n/* harmony import */ var _lumino_polling__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_lumino_polling__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @lumino/signaling */ \"webpack/sharing/consume/default/@lumino/signaling/@lumino/signaling\");\n/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_lumino_signaling__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _lumino_widgets__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @lumino/widgets */ \"webpack/sharing/consume/default/@lumino/widgets/@lumino/widgets\");\n/* harmony import */ var _lumino_widgets__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_lumino_widgets__WEBPACK_IMPORTED_MODULE_8__);\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n\n\n\n\n\n\n\n\n/**\n * The class name added to AppShell instances.\n */\nconst APPLICATION_SHELL_CLASS = 'jp-LabShell';\n/**\n * The class name added to side bar instances.\n */\nconst SIDEBAR_CLASS = 'jp-SideBar';\n/**\n * The class name added to the current widget's title.\n */\nconst CURRENT_CLASS = 'jp-mod-current';\n/**\n * The class name added to the active widget's title.\n */\nconst ACTIVE_CLASS = 'jp-mod-active';\n/**\n * The default rank of items added to a sidebar.\n */\nconst DEFAULT_RANK = 900;\nconst ACTIVITY_CLASS = 'jp-Activity';\n/**\n * The JupyterLab application shell token.\n */\nconst ILabShell = new _lumino_coreutils__WEBPACK_IMPORTED_MODULE_4__.Token('@jupyterlab/application:ILabShell', 'A service for interacting with the JupyterLab shell. The top-level ``application`` object also has a reference to the shell, but it has a restricted interface in order to be agnostic to different shell implementations on the application. Use this to get more detailed information about currently active widgets and layout state.');\n/**\n * The application shell for JupyterLab.\n */\nclass LabShell extends _lumino_widgets__WEBPACK_IMPORTED_MODULE_8__.Widget {\n    /**\n     * Construct a new application shell.\n     */\n    constructor(options) {\n        super();\n        /**\n         * A message hook for child add/remove messages on the main area dock panel.\n         */\n        this._dockChildHook = (handler, msg) => {\n            switch (msg.type) {\n                case 'child-added':\n                    msg.child.addClass(ACTIVITY_CLASS);\n                    this._tracker.add(msg.child);\n                    break;\n                case 'child-removed':\n                    msg.child.removeClass(ACTIVITY_CLASS);\n                    this._tracker.remove(msg.child);\n                    break;\n                default:\n                    break;\n            }\n            return true;\n        };\n        this._activeChanged = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_7__.Signal(this);\n        this._cachedLayout = null;\n        this._currentChanged = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_7__.Signal(this);\n        this._currentPath = '';\n        this._currentPathChanged = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_7__.Signal(this);\n        this._modeChanged = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_7__.Signal(this);\n        this._isRestored = false;\n        this._layoutModified = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_7__.Signal(this);\n        this._layoutDebouncer = new _lumino_polling__WEBPACK_IMPORTED_MODULE_6__.Debouncer(() => {\n            this._layoutModified.emit(undefined);\n        }, 0);\n        this._restored = new _lumino_coreutils__WEBPACK_IMPORTED_MODULE_4__.PromiseDelegate();\n        this._tracker = new _lumino_widgets__WEBPACK_IMPORTED_MODULE_8__.FocusTracker();\n        this._topHandlerHiddenByUser = false;\n        this._idTypeMap = new Map();\n        this._mainOptionsCache = new Map();\n        this._sideOptionsCache = new Map();\n        this._delayedWidget = new Array();\n        this.addClass(APPLICATION_SHELL_CLASS);\n        this.id = 'main';\n        if ((options === null || options === void 0 ? void 0 : options.waitForRestore) === false) {\n            this._userLayout = { 'multiple-document': {}, 'single-document': {} };\n        }\n        // Skip Links\n        const skipLinkWidget = (this._skipLinkWidget = new Private.SkipLinkWidget(this));\n        this._skipLinkWidget.show();\n        //  Wrap the skip widget to customize its position and size\n        const skipLinkWrapper = new _lumino_widgets__WEBPACK_IMPORTED_MODULE_8__.Panel();\n        skipLinkWrapper.addClass('jp-skiplink-wrapper');\n        skipLinkWrapper.addWidget(skipLinkWidget);\n        const headerPanel = (this._headerPanel = new _lumino_widgets__WEBPACK_IMPORTED_MODULE_8__.BoxPanel());\n        const menuHandler = (this._menuHandler = new Private.PanelHandler());\n        menuHandler.panel.node.setAttribute('role', 'navigation');\n        const topHandler = (this._topHandler = new Private.PanelHandler());\n        topHandler.panel.node.setAttribute('role', 'banner');\n        const bottomPanel = (this._bottomPanel = new _lumino_widgets__WEBPACK_IMPORTED_MODULE_8__.BoxPanel());\n        bottomPanel.node.setAttribute('role', 'contentinfo');\n        const hboxPanel = new _lumino_widgets__WEBPACK_IMPORTED_MODULE_8__.BoxPanel();\n        const vsplitPanel = (this._vsplitPanel =\n            new Private.RestorableSplitPanel());\n        const dockPanel = (this._dockPanel = new _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.DockPanelSvg({\n            hiddenMode: _lumino_widgets__WEBPACK_IMPORTED_MODULE_8__.Widget.HiddenMode.Display\n        }));\n        _lumino_messaging__WEBPACK_IMPORTED_MODULE_5__.MessageLoop.installMessageHook(dockPanel, this._dockChildHook);\n        const hsplitPanel = (this._hsplitPanel =\n            new Private.RestorableSplitPanel());\n        const downPanel = (this._downPanel = new _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.TabPanelSvg({\n            tabsMovable: true\n        }));\n        const leftHandler = (this._leftHandler = new Private.SideBarHandler());\n        const rightHandler = (this._rightHandler = new Private.SideBarHandler());\n        const rootLayout = new _lumino_widgets__WEBPACK_IMPORTED_MODULE_8__.BoxLayout();\n        headerPanel.id = 'jp-header-panel';\n        menuHandler.panel.id = 'jp-menu-panel';\n        topHandler.panel.id = 'jp-top-panel';\n        bottomPanel.id = 'jp-bottom-panel';\n        hboxPanel.id = 'jp-main-content-panel';\n        vsplitPanel.id = 'jp-main-vsplit-panel';\n        dockPanel.id = 'jp-main-dock-panel';\n        hsplitPanel.id = 'jp-main-split-panel';\n        downPanel.id = 'jp-down-stack';\n        leftHandler.sideBar.addClass(SIDEBAR_CLASS);\n        leftHandler.sideBar.addClass('jp-mod-left');\n        leftHandler.sideBar.node.setAttribute('role', 'complementary');\n        leftHandler.stackedPanel.id = 'jp-left-stack';\n        rightHandler.sideBar.addClass(SIDEBAR_CLASS);\n        rightHandler.sideBar.addClass('jp-mod-right');\n        rightHandler.sideBar.node.setAttribute('role', 'complementary');\n        rightHandler.stackedPanel.id = 'jp-right-stack';\n        dockPanel.node.setAttribute('role', 'main');\n        hboxPanel.spacing = 0;\n        vsplitPanel.spacing = 1;\n        dockPanel.spacing = 5;\n        hsplitPanel.spacing = 1;\n        headerPanel.direction = 'top-to-bottom';\n        vsplitPanel.orientation = 'vertical';\n        hboxPanel.direction = 'left-to-right';\n        hsplitPanel.orientation = 'horizontal';\n        bottomPanel.direction = 'bottom-to-top';\n        _lumino_widgets__WEBPACK_IMPORTED_MODULE_8__.SplitPanel.setStretch(leftHandler.stackedPanel, 0);\n        _lumino_widgets__WEBPACK_IMPORTED_MODULE_8__.SplitPanel.setStretch(downPanel, 0);\n        _lumino_widgets__WEBPACK_IMPORTED_MODULE_8__.SplitPanel.setStretch(dockPanel, 1);\n        _lumino_widgets__WEBPACK_IMPORTED_MODULE_8__.SplitPanel.setStretch(rightHandler.stackedPanel, 0);\n        _lumino_widgets__WEBPACK_IMPORTED_MODULE_8__.BoxPanel.setStretch(leftHandler.sideBar, 0);\n        _lumino_widgets__WEBPACK_IMPORTED_MODULE_8__.BoxPanel.setStretch(hsplitPanel, 1);\n        _lumino_widgets__WEBPACK_IMPORTED_MODULE_8__.BoxPanel.setStretch(rightHandler.sideBar, 0);\n        _lumino_widgets__WEBPACK_IMPORTED_MODULE_8__.SplitPanel.setStretch(vsplitPanel, 1);\n        hsplitPanel.addWidget(leftHandler.stackedPanel);\n        hsplitPanel.addWidget(dockPanel);\n        hsplitPanel.addWidget(rightHandler.stackedPanel);\n        vsplitPanel.addWidget(hsplitPanel);\n        vsplitPanel.addWidget(downPanel);\n        hboxPanel.addWidget(leftHandler.sideBar);\n        hboxPanel.addWidget(vsplitPanel);\n        hboxPanel.addWidget(rightHandler.sideBar);\n        rootLayout.direction = 'top-to-bottom';\n        rootLayout.spacing = 0; // TODO make this configurable?\n        // Use relative sizing to set the width of the side panels.\n        // This will still respect the min-size of children widget in the stacked\n        // panel. The default sizes will be overwritten during layout restoration.\n        vsplitPanel.setRelativeSizes([3, 1]);\n        hsplitPanel.setRelativeSizes([1, 2.5, 1]);\n        _lumino_widgets__WEBPACK_IMPORTED_MODULE_8__.BoxLayout.setStretch(headerPanel, 0);\n        _lumino_widgets__WEBPACK_IMPORTED_MODULE_8__.BoxLayout.setStretch(menuHandler.panel, 0);\n        _lumino_widgets__WEBPACK_IMPORTED_MODULE_8__.BoxLayout.setStretch(topHandler.panel, 0);\n        _lumino_widgets__WEBPACK_IMPORTED_MODULE_8__.BoxLayout.setStretch(hboxPanel, 1);\n        _lumino_widgets__WEBPACK_IMPORTED_MODULE_8__.BoxLayout.setStretch(bottomPanel, 0);\n        rootLayout.addWidget(skipLinkWrapper);\n        rootLayout.addWidget(headerPanel);\n        rootLayout.addWidget(topHandler.panel);\n        rootLayout.addWidget(hboxPanel);\n        rootLayout.addWidget(bottomPanel);\n        // initially hiding header and bottom panel when no elements inside,\n        this._headerPanel.hide();\n        this._bottomPanel.hide();\n        this._downPanel.hide();\n        this.layout = rootLayout;\n        // Connect change listeners.\n        this._tracker.currentChanged.connect(this._onCurrentChanged, this);\n        this._tracker.activeChanged.connect(this._onActiveChanged, this);\n        // Connect main layout change listener.\n        this._dockPanel.layoutModified.connect(this._onLayoutModified, this);\n        // Connect vsplit layout change listener\n        this._vsplitPanel.updated.connect(this._onLayoutModified, this);\n        // Connect down panel change listeners\n        this._downPanel.currentChanged.connect(this._onLayoutModified, this);\n        this._downPanel.tabBar.tabMoved.connect(this._onTabPanelChanged, this);\n        this._downPanel.stackedPanel.widgetRemoved.connect(this._onTabPanelChanged, this);\n        // Catch current changed events on the side handlers.\n        this._leftHandler.updated.connect(this._onLayoutModified, this);\n        this._rightHandler.updated.connect(this._onLayoutModified, this);\n        // Catch update events on the horizontal split panel\n        this._hsplitPanel.updated.connect(this._onLayoutModified, this);\n        // Setup single-document-mode title bar\n        const titleHandler = (this._titleHandler = new Private.TitleHandler(this));\n        this.add(titleHandler, 'top', { rank: 100 });\n        if (this._dockPanel.mode === 'multiple-document') {\n            this._topHandler.addWidget(this._menuHandler.panel, 100);\n            titleHandler.hide();\n        }\n        else {\n            rootLayout.insertWidget(3, this._menuHandler.panel);\n        }\n        this.translator = _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_1__.nullTranslator;\n        // Wire up signals to update the title panel of the simple interface mode to\n        // follow the title of this.currentWidget\n        this.currentChanged.connect((sender, args) => {\n            let newValue = args.newValue;\n            let oldValue = args.oldValue;\n            // Stop watching the title of the previously current widget\n            if (oldValue) {\n                oldValue.title.changed.disconnect(this._updateTitlePanelTitle, this);\n                if (oldValue instanceof _jupyterlab_docregistry__WEBPACK_IMPORTED_MODULE_0__.DocumentWidget) {\n                    oldValue.context.pathChanged.disconnect(this._updateCurrentPath, this);\n                }\n            }\n            // Start watching the title of the new current widget\n            if (newValue) {\n                newValue.title.changed.connect(this._updateTitlePanelTitle, this);\n                this._updateTitlePanelTitle();\n                if (newValue instanceof _jupyterlab_docregistry__WEBPACK_IMPORTED_MODULE_0__.DocumentWidget) {\n                    newValue.context.pathChanged.connect(this._updateCurrentPath, this);\n                }\n            }\n            this._updateCurrentPath();\n        });\n    }\n    /**\n     * A signal emitted when main area's active focus changes.\n     */\n    get activeChanged() {\n        return this._activeChanged;\n    }\n    /**\n     * The active widget in the shell's main area.\n     */\n    get activeWidget() {\n        return this._tracker.activeWidget;\n    }\n    /**\n     * Whether the add buttons for each main area tab bar are enabled.\n     */\n    get addButtonEnabled() {\n        return this._dockPanel.addButtonEnabled;\n    }\n    set addButtonEnabled(value) {\n        this._dockPanel.addButtonEnabled = value;\n    }\n    /**\n     * A signal emitted when the add button on a main area tab bar is clicked.\n     */\n    get addRequested() {\n        return this._dockPanel.addRequested;\n    }\n    /**\n     * A signal emitted when main area's current focus changes.\n     */\n    get currentChanged() {\n        return this._currentChanged;\n    }\n    /**\n     * Current document path.\n     */\n    // FIXME deprecation `undefined` is to ensure backward compatibility in 4.x\n    get currentPath() {\n        return this._currentPath;\n    }\n    /**\n     * A signal emitted when the path of the current document changes.\n     *\n     * This also fires when the current document itself changes.\n     */\n    get currentPathChanged() {\n        return this._currentPathChanged;\n    }\n    /**\n     * The current widget in the shell's main area.\n     */\n    get currentWidget() {\n        return this._tracker.currentWidget;\n    }\n    /**\n     * A signal emitted when the main area's layout is modified.\n     */\n    get layoutModified() {\n        return this._layoutModified;\n    }\n    /**\n     * Whether the left area is collapsed.\n     */\n    get leftCollapsed() {\n        return !this._leftHandler.sideBar.currentTitle;\n    }\n    /**\n     * Whether the left area is collapsed.\n     */\n    get rightCollapsed() {\n        return !this._rightHandler.sideBar.currentTitle;\n    }\n    /**\n     * Whether JupyterLab is in presentation mode with the\n     * `jp-mod-presentationMode` CSS class.\n     */\n    get presentationMode() {\n        return this.hasClass('jp-mod-presentationMode');\n    }\n    set presentationMode(value) {\n        this.toggleClass('jp-mod-presentationMode', value);\n    }\n    /**\n     * The main dock area's user interface mode.\n     */\n    get mode() {\n        return this._dockPanel.mode;\n    }\n    set mode(mode) {\n        const dock = this._dockPanel;\n        if (mode === dock.mode) {\n            return;\n        }\n        const applicationCurrentWidget = this.currentWidget;\n        if (mode === 'single-document') {\n            // Cache the current multi-document layout before changing the mode.\n            this._cachedLayout = dock.saveLayout();\n            dock.mode = mode;\n            // In case the active widget in the dock panel is *not* the active widget\n            // of the application, defer to the application.\n            if (this.currentWidget) {\n                dock.activateWidget(this.currentWidget);\n            }\n            // Adjust menu and title\n            this.layout.insertWidget(3, this._menuHandler.panel);\n            this._titleHandler.show();\n            this._updateTitlePanelTitle();\n            if (this._topHandlerHiddenByUser) {\n                this._topHandler.panel.hide();\n            }\n        }\n        else {\n            // Cache a reference to every widget currently in the dock panel before\n            // changing its mode.\n            const widgets = Array.from(dock.widgets());\n            dock.mode = mode;\n            // Restore cached layout if possible.\n            if (this._cachedLayout) {\n                // Remove any disposed widgets in the cached layout and restore.\n                Private.normalizeAreaConfig(dock, this._cachedLayout.main);\n                dock.restoreLayout(this._cachedLayout);\n                this._cachedLayout = null;\n            }\n            // If layout restoration has been deferred, restore layout now.\n            if (this._layoutRestorer.isDeferred) {\n                this._layoutRestorer\n                    .restoreDeferred()\n                    .then(mainArea => {\n                    if (mainArea) {\n                        const { currentWidget, dock } = mainArea;\n                        if (dock) {\n                            this._dockPanel.restoreLayout(dock);\n                        }\n                        if (currentWidget) {\n                            this.activateById(currentWidget.id);\n                        }\n                    }\n                })\n                    .catch(reason => {\n                    console.error('Failed to restore the deferred layout.');\n                    console.error(reason);\n                });\n            }\n            // Add any widgets created during single document mode, which have\n            // subsequently been removed from the dock panel after the multiple document\n            // layout has been restored. If the widget has add options cached for\n            // the widget (i.e., if it has been placed with respect to another widget),\n            // then take that into account.\n            widgets.forEach(widget => {\n                if (!widget.parent) {\n                    this._addToMainArea(widget, {\n                        ...this._mainOptionsCache.get(widget),\n                        activate: false\n                    });\n                }\n            });\n            this._mainOptionsCache.clear();\n            // In case the active widget in the dock panel is *not* the active widget\n            // of the application, defer to the application.\n            if (applicationCurrentWidget) {\n                dock.activateWidget(applicationCurrentWidget);\n            }\n            // Adjust menu and title\n            this.add(this._menuHandler.panel, 'top', { rank: 100 });\n            this._titleHandler.hide();\n        }\n        // Set the mode data attribute on the applications shell node.\n        this.node.dataset.shellMode = mode;\n        this._downPanel.fit();\n        // Emit the mode changed signal\n        this._modeChanged.emit(mode);\n    }\n    /**\n     * A signal emitted when the shell/dock panel change modes (single/multiple document).\n     */\n    get modeChanged() {\n        return this._modeChanged;\n    }\n    /**\n     * Promise that resolves when state is first restored, returning layout\n     * description.\n     */\n    get restored() {\n        return this._restored.promise;\n    }\n    get translator() {\n        var _a;\n        return (_a = this._translator) !== null && _a !== void 0 ? _a : _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_1__.nullTranslator;\n    }\n    set translator(value) {\n        if (value !== this._translator) {\n            this._translator = value;\n            // Set translator for tab bars\n            _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.TabBarSvg.translator = value;\n            const trans = value.load('jupyterlab');\n            this._menuHandler.panel.node.setAttribute('aria-label', trans.__('main menu'));\n            this._leftHandler.sideBar.node.setAttribute('aria-label', trans.__('main sidebar'));\n            this._leftHandler.sideBar.contentNode.setAttribute('aria-label', trans.__('main sidebar'));\n            this._rightHandler.sideBar.node.setAttribute('aria-label', trans.__('alternate sidebar'));\n            this._rightHandler.sideBar.contentNode.setAttribute('aria-label', trans.__('alternate sidebar'));\n        }\n    }\n    /**\n     * User customized shell layout.\n     */\n    get userLayout() {\n        return _lumino_coreutils__WEBPACK_IMPORTED_MODULE_4__.JSONExt.deepCopy(this._userLayout);\n    }\n    /**\n     * Activate a widget in its area.\n     */\n    activateById(id) {\n        if (this._leftHandler.has(id)) {\n            this._leftHandler.activate(id);\n            return;\n        }\n        if (this._rightHandler.has(id)) {\n            this._rightHandler.activate(id);\n            return;\n        }\n        const tabIndex = this._downPanel.tabBar.titles.findIndex(title => title.owner.id === id);\n        if (tabIndex >= 0) {\n            this._downPanel.currentIndex = tabIndex;\n            return;\n        }\n        const dock = this._dockPanel;\n        const widget = (0,_lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__.find)(dock.widgets(), value => value.id === id);\n        if (widget) {\n            dock.activateWidget(widget);\n        }\n    }\n    /**\n     * Activate widget in specified area.\n     *\n     * ### Notes\n     * The alpha version of this method only supports activating the \"main\" area.\n     *\n     * @alpha\n     * @param area Name of area to activate\n     */\n    activateArea(area = 'main') {\n        switch (area) {\n            case 'main':\n                {\n                    const current = this._currentTabBar();\n                    if (!current) {\n                        return;\n                    }\n                    if (current.currentTitle) {\n                        current.currentTitle.owner.activate();\n                    }\n                }\n                return;\n            case 'left':\n            case 'right':\n            case 'header':\n            case 'top':\n            case 'menu':\n            case 'bottom':\n                console.debug(`Area: ${area} activation not yet implemented`);\n                break;\n            default:\n                throw new Error(`Invalid area: ${area}`);\n        }\n    }\n    /**\n     * Activate the next Tab in the active TabBar.\n     */\n    activateNextTab() {\n        const current = this._currentTabBar();\n        if (!current) {\n            return;\n        }\n        const ci = current.currentIndex;\n        if (ci === -1) {\n            return;\n        }\n        if (ci < current.titles.length - 1) {\n            current.currentIndex += 1;\n            if (current.currentTitle) {\n                current.currentTitle.owner.activate();\n            }\n            return;\n        }\n        if (ci === current.titles.length - 1) {\n            const nextBar = this._adjacentBar('next');\n            if (nextBar) {\n                nextBar.currentIndex = 0;\n                if (nextBar.currentTitle) {\n                    nextBar.currentTitle.owner.activate();\n                }\n            }\n        }\n    }\n    /**\n     * Activate the previous Tab in the active TabBar.\n     */\n    activatePreviousTab() {\n        const current = this._currentTabBar();\n        if (!current) {\n            return;\n        }\n        const ci = current.currentIndex;\n        if (ci === -1) {\n            return;\n        }\n        if (ci > 0) {\n            current.currentIndex -= 1;\n            if (current.currentTitle) {\n                current.currentTitle.owner.activate();\n            }\n            return;\n        }\n        if (ci === 0) {\n            const prevBar = this._adjacentBar('previous');\n            if (prevBar) {\n                const len = prevBar.titles.length;\n                prevBar.currentIndex = len - 1;\n                if (prevBar.currentTitle) {\n                    prevBar.currentTitle.owner.activate();\n                }\n            }\n        }\n    }\n    /**\n     * Activate the next TabBar.\n     */\n    activateNextTabBar() {\n        const nextBar = this._adjacentBar('next');\n        if (nextBar) {\n            if (nextBar.currentTitle) {\n                nextBar.currentTitle.owner.activate();\n            }\n        }\n    }\n    /**\n     * Activate the next TabBar.\n     */\n    activatePreviousTabBar() {\n        const nextBar = this._adjacentBar('previous');\n        if (nextBar) {\n            if (nextBar.currentTitle) {\n                nextBar.currentTitle.owner.activate();\n            }\n        }\n    }\n    /**\n     * Add a widget to the JupyterLab shell\n     *\n     * @param widget Widget\n     * @param area Area\n     * @param options Options\n     */\n    add(widget, area = 'main', options) {\n        var _a;\n        if (!this._userLayout) {\n            this._delayedWidget.push({ widget, area, options });\n            return;\n        }\n        let userPosition;\n        if ((options === null || options === void 0 ? void 0 : options.type) && this._userLayout[this.mode][options.type]) {\n            userPosition = this._userLayout[this.mode][options.type];\n            this._idTypeMap.set(widget.id, options.type);\n        }\n        else {\n            userPosition = this._userLayout[this.mode][widget.id];\n        }\n        if (options === null || options === void 0 ? void 0 : options.type) {\n            this._idTypeMap.set(widget.id, options.type);\n            widget.disposed.connect(() => {\n                this._idTypeMap.delete(widget.id);\n            });\n        }\n        area = (_a = userPosition === null || userPosition === void 0 ? void 0 : userPosition.area) !== null && _a !== void 0 ? _a : area;\n        options =\n            options || (userPosition === null || userPosition === void 0 ? void 0 : userPosition.options)\n                ? {\n                    ...options,\n                    ...userPosition === null || userPosition === void 0 ? void 0 : userPosition.options\n                }\n                : undefined;\n        switch (area || 'main') {\n            case 'bottom':\n                return this._addToBottomArea(widget, options);\n            case 'down':\n                return this._addToDownArea(widget, options);\n            case 'header':\n                return this._addToHeaderArea(widget, options);\n            case 'left':\n                return this._addToLeftArea(widget, options);\n            case 'main':\n                return this._addToMainArea(widget, options);\n            case 'menu':\n                return this._addToMenuArea(widget, options);\n            case 'right':\n                return this._addToRightArea(widget, options);\n            case 'top':\n                return this._addToTopArea(widget, options);\n            default:\n                throw new Error(`Invalid area: ${area}`);\n        }\n    }\n    /**\n     * Move a widget type to a new area.\n     *\n     * The type is determined from the `widget.id` and fallback to `widget.id`.\n     *\n     * #### Notes\n     * If `mode` is undefined, both mode are updated.\n     * The new layout is now persisted.\n     *\n     * @param widget Widget to move\n     * @param area New area\n     * @param mode Mode to change\n     * @returns The new user layout\n     */\n    move(widget, area, mode) {\n        var _a;\n        const type = (_a = this._idTypeMap.get(widget.id)) !== null && _a !== void 0 ? _a : widget.id;\n        for (const m of ['single-document', 'multiple-document'].filter(c => !mode || c === mode)) {\n            this._userLayout[m][type] = {\n                ...this._userLayout[m][type],\n                area\n            };\n        }\n        this.add(widget, area);\n        return this._userLayout;\n    }\n    /**\n     * Collapse the left area.\n     */\n    collapseLeft() {\n        this._leftHandler.collapse();\n        this._onLayoutModified();\n    }\n    /**\n     * Collapse the right area.\n     */\n    collapseRight() {\n        this._rightHandler.collapse();\n        this._onLayoutModified();\n    }\n    /**\n     * Dispose the shell.\n     */\n    dispose() {\n        if (this.isDisposed) {\n            return;\n        }\n        this._layoutDebouncer.dispose();\n        super.dispose();\n    }\n    /**\n     * Expand the left area.\n     *\n     * #### Notes\n     * This will open the most recently used tab,\n     * or the first tab if there is no most recently used.\n     */\n    expandLeft() {\n        this._leftHandler.expand();\n        this._onLayoutModified();\n    }\n    /**\n     * Expand the right area.\n     *\n     * #### Notes\n     * This will open the most recently used tab,\n     * or the first tab if there is no most recently used.\n     */\n    expandRight() {\n        this._rightHandler.expand();\n        this._onLayoutModified();\n    }\n    /**\n     * Close all widgets in the main and down area.\n     */\n    closeAll() {\n        // Make a copy of all the widget in the dock panel (using `Array.from()`)\n        // before removing them because removing them while iterating through them\n        // modifies the underlying data of the iterator.\n        Array.from(this._dockPanel.widgets()).forEach(widget => widget.close());\n        this._downPanel.stackedPanel.widgets.forEach(widget => widget.close());\n    }\n    /**\n     * Whether an side tab bar is visible or not.\n     *\n     * @param side Sidebar of interest\n     * @returns Side tab bar visibility\n     */\n    isSideTabBarVisible(side) {\n        switch (side) {\n            case 'left':\n                return this._leftHandler.isVisible;\n            case 'right':\n                return this._rightHandler.isVisible;\n        }\n    }\n    /**\n     * Whether the top bar in simple mode is visible or not.\n     *\n     * @returns Top bar visibility\n     */\n    isTopInSimpleModeVisible() {\n        return !this._topHandlerHiddenByUser;\n    }\n    /**\n     * True if the given area is empty.\n     */\n    isEmpty(area) {\n        switch (area) {\n            case 'bottom':\n                return this._bottomPanel.widgets.length === 0;\n            case 'down':\n                return this._downPanel.stackedPanel.widgets.length === 0;\n            case 'header':\n                return this._headerPanel.widgets.length === 0;\n            case 'left':\n                return this._leftHandler.stackedPanel.widgets.length === 0;\n            case 'main':\n                return this._dockPanel.isEmpty;\n            case 'menu':\n                return this._menuHandler.panel.widgets.length === 0;\n            case 'right':\n                return this._rightHandler.stackedPanel.widgets.length === 0;\n            case 'top':\n                return this._topHandler.panel.widgets.length === 0;\n            default:\n                return true;\n        }\n    }\n    /**\n     * Restore the layout state and configuration for the application shell.\n     *\n     * #### Notes\n     * This should only be called once.\n     */\n    async restoreLayout(mode, layoutRestorer, configuration = {}) {\n        var _a, _b, _c, _d;\n        // Set the configuration and add widgets added before the shell was ready.\n        this._userLayout = {\n            'single-document': (_a = configuration['single-document']) !== null && _a !== void 0 ? _a : {},\n            'multiple-document': (_b = configuration['multiple-document']) !== null && _b !== void 0 ? _b : {}\n        };\n        this._delayedWidget.forEach(({ widget, area, options }) => {\n            this.add(widget, area, options);\n        });\n        this._delayedWidget.length = 0;\n        this._layoutRestorer = layoutRestorer;\n        // Get the layout from the restorer\n        const layout = await layoutRestorer.fetch();\n        // Reset the layout\n        const { mainArea, downArea, leftArea, rightArea, topArea, relativeSizes } = layout;\n        // Rehydrate the main area.\n        if (mainArea) {\n            const { currentWidget, dock } = mainArea;\n            if (dock && mode === 'multiple-document') {\n                this._dockPanel.restoreLayout(dock);\n            }\n            if (mode) {\n                this.mode = mode;\n            }\n            if (currentWidget) {\n                this.activateById(currentWidget.id);\n            }\n        }\n        else {\n            // This is needed when loading in an empty workspace in single doc mode\n            if (mode) {\n                this.mode = mode;\n            }\n        }\n        if ((topArea === null || topArea === void 0 ? void 0 : topArea.simpleVisibility) !== undefined) {\n            this._topHandlerHiddenByUser = !topArea.simpleVisibility;\n            if (this.mode === 'single-document') {\n                this._topHandler.panel.setHidden(this._topHandlerHiddenByUser);\n            }\n        }\n        // Rehydrate the down area\n        if (downArea) {\n            const { currentWidget, widgets, size } = downArea;\n            const widgetIds = (_c = widgets === null || widgets === void 0 ? void 0 : widgets.map(widget => widget.id)) !== null && _c !== void 0 ? _c : [];\n            // Remove absent widgets\n            this._downPanel.tabBar.titles\n                .filter(title => !widgetIds.includes(title.owner.id))\n                .map(title => title.owner.close());\n            // Add new widgets\n            const titleIds = this._downPanel.tabBar.titles.map(title => title.owner.id);\n            widgets === null || widgets === void 0 ? void 0 : widgets.filter(widget => !titleIds.includes(widget.id)).map(widget => this._downPanel.addWidget(widget));\n            // Reorder tabs\n            while (!_lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__.ArrayExt.shallowEqual(widgetIds, this._downPanel.tabBar.titles.map(title => title.owner.id))) {\n                this._downPanel.tabBar.titles.forEach((title, index) => {\n                    const position = widgetIds.findIndex(id => title.owner.id == id);\n                    if (position >= 0 && position != index) {\n                        this._downPanel.tabBar.insertTab(position, title);\n                    }\n                });\n            }\n            if (currentWidget) {\n                const index = this._downPanel.stackedPanel.widgets.findIndex(widget => widget.id === currentWidget.id);\n                if (index) {\n                    this._downPanel.currentIndex = index;\n                    (_d = this._downPanel.currentWidget) === null || _d === void 0 ? void 0 : _d.activate();\n                }\n            }\n            if (size && size > 0.0) {\n                this._vsplitPanel.setRelativeSizes([1.0 - size, size]);\n            }\n            else {\n                // Close all tabs and hide the panel\n                this._downPanel.stackedPanel.widgets.forEach(widget => widget.close());\n                this._downPanel.hide();\n            }\n        }\n        // Rehydrate the left area.\n        if (leftArea) {\n            this._leftHandler.rehydrate(leftArea);\n        }\n        else {\n            if (mode === 'single-document') {\n                this.collapseLeft();\n            }\n        }\n        // Rehydrate the right area.\n        if (rightArea) {\n            this._rightHandler.rehydrate(rightArea);\n        }\n        else {\n            if (mode === 'single-document') {\n                this.collapseRight();\n            }\n        }\n        // Restore the relative sizes.\n        if (relativeSizes) {\n            this._hsplitPanel.setRelativeSizes(relativeSizes);\n        }\n        if (!this._isRestored) {\n            // Make sure all messages in the queue are finished before notifying\n            // any extensions that are waiting for the promise that guarantees the\n            // application state has been restored.\n            _lumino_messaging__WEBPACK_IMPORTED_MODULE_5__.MessageLoop.flush();\n            this._restored.resolve(layout);\n        }\n    }\n    /**\n     * Save the dehydrated state of the application shell.\n     */\n    saveLayout() {\n        // If the application is in single document mode, use the cached layout if\n        // available. Otherwise, default to querying the dock panel for layout.\n        const layout = {\n            mainArea: {\n                currentWidget: this._tracker.currentWidget,\n                dock: this.mode === 'single-document'\n                    ? this._cachedLayout || this._dockPanel.saveLayout()\n                    : this._dockPanel.saveLayout()\n            },\n            downArea: {\n                currentWidget: this._downPanel.currentWidget,\n                widgets: Array.from(this._downPanel.stackedPanel.widgets),\n                size: this._vsplitPanel.relativeSizes()[1]\n            },\n            leftArea: this._leftHandler.dehydrate(),\n            rightArea: this._rightHandler.dehydrate(),\n            topArea: { simpleVisibility: !this._topHandlerHiddenByUser },\n            relativeSizes: this._hsplitPanel.relativeSizes()\n        };\n        return layout;\n    }\n    /**\n     * Toggle top header visibility in simple mode\n     *\n     * Note: Does nothing in multi-document mode\n     */\n    toggleTopInSimpleModeVisibility() {\n        if (this.mode === 'single-document') {\n            if (this._topHandler.panel.isVisible) {\n                this._topHandlerHiddenByUser = true;\n                this._topHandler.panel.hide();\n            }\n            else {\n                this._topHandlerHiddenByUser = false;\n                this._topHandler.panel.show();\n                this._updateTitlePanelTitle();\n            }\n            this._onLayoutModified();\n        }\n    }\n    /**\n     * Toggle side tab bar visibility\n     *\n     * @param side Sidebar of interest\n     */\n    toggleSideTabBarVisibility(side) {\n        if (side === 'right') {\n            if (this._rightHandler.isVisible) {\n                this._rightHandler.hide();\n            }\n            else {\n                this._rightHandler.show();\n            }\n        }\n        else {\n            if (this._leftHandler.isVisible) {\n                this._leftHandler.hide();\n            }\n            else {\n                this._leftHandler.show();\n            }\n        }\n    }\n    /**\n     * Update the shell configuration.\n     *\n     * @param config Shell configuration\n     */\n    updateConfig(config) {\n        if (config.hiddenMode) {\n            switch (config.hiddenMode) {\n                case 'display':\n                    this._dockPanel.hiddenMode = _lumino_widgets__WEBPACK_IMPORTED_MODULE_8__.Widget.HiddenMode.Display;\n                    break;\n                case 'scale':\n                    this._dockPanel.hiddenMode = _lumino_widgets__WEBPACK_IMPORTED_MODULE_8__.Widget.HiddenMode.Scale;\n                    break;\n                case 'contentVisibility':\n                    this._dockPanel.hiddenMode = _lumino_widgets__WEBPACK_IMPORTED_MODULE_8__.Widget.HiddenMode.ContentVisibility;\n                    break;\n            }\n        }\n    }\n    /**\n     * Returns the widgets for an application area.\n     */\n    widgets(area) {\n        switch (area !== null && area !== void 0 ? area : 'main') {\n            case 'main':\n                return this._dockPanel.widgets();\n            case 'left':\n                return (0,_lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__.map)(this._leftHandler.sideBar.titles, t => t.owner);\n            case 'right':\n                return (0,_lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__.map)(this._rightHandler.sideBar.titles, t => t.owner);\n            case 'header':\n                return this._headerPanel.children();\n            case 'top':\n                return this._topHandler.panel.children();\n            case 'menu':\n                return this._menuHandler.panel.children();\n            case 'bottom':\n                return this._bottomPanel.children();\n            default:\n                throw new Error(`Invalid area: ${area}`);\n        }\n    }\n    /**\n     * Handle `after-attach` messages for the application shell.\n     */\n    onAfterAttach(msg) {\n        this.node.dataset.shellMode = this.mode;\n    }\n    /**\n     * Update the title panel title based on the title of the current widget.\n     */\n    _updateTitlePanelTitle() {\n        let current = this.currentWidget;\n        const inputElement = this._titleHandler.inputElement;\n        inputElement.value = current ? current.title.label : '';\n        inputElement.title = current ? current.title.caption : '';\n    }\n    /**\n     * The path of the current widget changed, fire the _currentPathChanged signal.\n     */\n    _updateCurrentPath() {\n        let current = this.currentWidget;\n        let newValue = '';\n        if (current && current instanceof _jupyterlab_docregistry__WEBPACK_IMPORTED_MODULE_0__.DocumentWidget) {\n            newValue = current.context.path;\n        }\n        this._currentPathChanged.emit({\n            newValue: newValue,\n            oldValue: this._currentPath\n        });\n        this._currentPath = newValue;\n    }\n    /**\n     * Add a widget to the left content area.\n     *\n     * #### Notes\n     * Widgets must have a unique `id` property, which will be used as the DOM id.\n     */\n    _addToLeftArea(widget, options) {\n        if (!widget.id) {\n            console.error('Widgets added to app shell must have unique id property.');\n            return;\n        }\n        options = options || this._sideOptionsCache.get(widget) || {};\n        this._sideOptionsCache.set(widget, options);\n        const rank = 'rank' in options ? options.rank : DEFAULT_RANK;\n        this._leftHandler.addWidget(widget, rank);\n        this._onLayoutModified();\n    }\n    /**\n     * Add a widget to the main content area.\n     *\n     * #### Notes\n     * Widgets must have a unique `id` property, which will be used as the DOM id.\n     * All widgets added to the main area should be disposed after removal\n     * (disposal before removal will remove the widget automatically).\n     *\n     * In the options, `ref` defaults to `null`, `mode` defaults to `'tab-after'`,\n     * and `activate` defaults to `true`.\n     */\n    _addToMainArea(widget, options) {\n        if (!widget.id) {\n            console.error('Widgets added to app shell must have unique id property.');\n            return;\n        }\n        options = options || {};\n        const dock = this._dockPanel;\n        const mode = options.mode || 'tab-after';\n        let ref = this.currentWidget;\n        if (options.ref) {\n            ref = (0,_lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__.find)(dock.widgets(), value => value.id === options.ref) || null;\n        }\n        const { title } = widget;\n        // Add widget ID to tab so that we can get a handle on the tab's widget\n        // (for context menu support)\n        title.dataset = { ...title.dataset, id: widget.id };\n        if (title.icon instanceof _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.LabIcon) {\n            // bind an appropriate style to the icon\n            title.icon = title.icon.bindprops({\n                stylesheet: 'mainAreaTab'\n            });\n        }\n        else if (typeof title.icon === 'string' || !title.icon) {\n            // add some classes to help with displaying css background imgs\n            title.iconClass = (0,_jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.classes)(title.iconClass, 'jp-Icon');\n        }\n        dock.addWidget(widget, { mode, ref });\n        // The dock panel doesn't account for placement information while\n        // in single document mode, so upon rehydrating any widgets that were\n        // added will not be in the correct place. Cache the placement information\n        // here so that we can later rehydrate correctly.\n        if (dock.mode === 'single-document') {\n            this._mainOptionsCache.set(widget, options);\n        }\n        if (options.activate !== false) {\n            dock.activateWidget(widget);\n        }\n    }\n    /**\n     * Add a widget to the right content area.\n     *\n     * #### Notes\n     * Widgets must have a unique `id` property, which will be used as the DOM id.\n     */\n    _addToRightArea(widget, options) {\n        if (!widget.id) {\n            console.error('Widgets added to app shell must have unique id property.');\n            return;\n        }\n        options = options || this._sideOptionsCache.get(widget) || {};\n        const rank = 'rank' in options ? options.rank : DEFAULT_RANK;\n        this._sideOptionsCache.set(widget, options);\n        this._rightHandler.addWidget(widget, rank);\n        this._onLayoutModified();\n    }\n    /**\n     * Add a widget to the top content area.\n     *\n     * #### Notes\n     * Widgets must have a unique `id` property, which will be used as the DOM id.\n     */\n    _addToTopArea(widget, options) {\n        var _a;\n        if (!widget.id) {\n            console.error('Widgets added to app shell must have unique id property.');\n            return;\n        }\n        options = options || {};\n        const rank = (_a = options.rank) !== null && _a !== void 0 ? _a : DEFAULT_RANK;\n        this._topHandler.addWidget(widget, rank);\n        this._onLayoutModified();\n        if (this._topHandler.panel.isHidden) {\n            this._topHandler.panel.show();\n        }\n    }\n    /**\n     * Add a widget to the title content area.\n     *\n     * #### Notes\n     * Widgets must have a unique `id` property, which will be used as the DOM id.\n     */\n    _addToMenuArea(widget, options) {\n        var _a;\n        if (!widget.id) {\n            console.error('Widgets added to app shell must have unique id property.');\n            return;\n        }\n        options = options || {};\n        const rank = (_a = options.rank) !== null && _a !== void 0 ? _a : DEFAULT_RANK;\n        this._menuHandler.addWidget(widget, rank);\n        this._onLayoutModified();\n        if (this._menuHandler.panel.isHidden) {\n            this._menuHandler.panel.show();\n        }\n    }\n    /**\n     * Add a widget to the header content area.\n     *\n     * #### Notes\n     * Widgets must have a unique `id` property, which will be used as the DOM id.\n     */\n    _addToHeaderArea(widget, options) {\n        if (!widget.id) {\n            console.error('Widgets added to app shell must have unique id property.');\n            return;\n        }\n        // Temporary: widgets are added to the panel in order of insertion.\n        this._headerPanel.addWidget(widget);\n        this._onLayoutModified();\n        if (this._headerPanel.isHidden) {\n            this._headerPanel.show();\n        }\n    }\n    /**\n     * Add a widget to the bottom content area.\n     *\n     * #### Notes\n     * Widgets must have a unique `id` property, which will be used as the DOM id.\n     */\n    _addToBottomArea(widget, options) {\n        if (!widget.id) {\n            console.error('Widgets added to app shell must have unique id property.');\n            return;\n        }\n        // Temporary: widgets are added to the panel in order of insertion.\n        this._bottomPanel.addWidget(widget);\n        this._onLayoutModified();\n        if (this._bottomPanel.isHidden) {\n            this._bottomPanel.show();\n        }\n    }\n    _addToDownArea(widget, options) {\n        if (!widget.id) {\n            console.error('Widgets added to app shell must have unique id property.');\n            return;\n        }\n        options = options || {};\n        const { title } = widget;\n        // Add widget ID to tab so that we can get a handle on the tab's widget\n        // (for context menu support)\n        title.dataset = { ...title.dataset, id: widget.id };\n        if (title.icon instanceof _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.LabIcon) {\n            // bind an appropriate style to the icon\n            title.icon = title.icon.bindprops({\n                stylesheet: 'mainAreaTab'\n            });\n        }\n        else if (typeof title.icon === 'string' || !title.icon) {\n            // add some classes to help with displaying css background imgs\n            title.iconClass = (0,_jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.classes)(title.iconClass, 'jp-Icon');\n        }\n        this._downPanel.addWidget(widget);\n        this._onLayoutModified();\n        if (this._downPanel.isHidden) {\n            this._downPanel.show();\n        }\n    }\n    /*\n     * Return the tab bar adjacent to the current TabBar or `null`.\n     */\n    _adjacentBar(direction) {\n        const current = this._currentTabBar();\n        if (!current) {\n            return null;\n        }\n        const bars = Array.from(this._dockPanel.tabBars());\n        const len = bars.length;\n        const index = bars.indexOf(current);\n        if (direction === 'previous') {\n            return index > 0 ? bars[index - 1] : index === 0 ? bars[len - 1] : null;\n        }\n        // Otherwise, direction is 'next'.\n        return index < len - 1\n            ? bars[index + 1]\n            : index === len - 1\n                ? bars[0]\n                : null;\n    }\n    /*\n     * Return the TabBar that has the currently active Widget or null.\n     */\n    _currentTabBar() {\n        const current = this._tracker.currentWidget;\n        if (!current) {\n            return null;\n        }\n        const title = current.title;\n        const bars = this._dockPanel.tabBars();\n        return (0,_lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__.find)(bars, bar => bar.titles.indexOf(title) > -1) || null;\n    }\n    /**\n     * Handle a change to the dock area active widget.\n     */\n    _onActiveChanged(sender, args) {\n        if (args.newValue) {\n            args.newValue.title.className += ` ${ACTIVE_CLASS}`;\n        }\n        if (args.oldValue) {\n            args.oldValue.title.className = args.oldValue.title.className.replace(ACTIVE_CLASS, '');\n        }\n        this._activeChanged.emit(args);\n    }\n    /**\n     * Handle a change to the dock area current widget.\n     */\n    _onCurrentChanged(sender, args) {\n        if (args.newValue) {\n            args.newValue.title.className += ` ${CURRENT_CLASS}`;\n        }\n        if (args.oldValue) {\n            args.oldValue.title.className = args.oldValue.title.className.replace(CURRENT_CLASS, '');\n        }\n        this._currentChanged.emit(args);\n        this._onLayoutModified();\n    }\n    /**\n     * Handle a change on the down panel widgets\n     */\n    _onTabPanelChanged() {\n        if (this._downPanel.stackedPanel.widgets.length === 0) {\n            this._downPanel.hide();\n        }\n        this._onLayoutModified();\n    }\n    /**\n     * Handle a change to the layout.\n     */\n    _onLayoutModified() {\n        void this._layoutDebouncer.invoke();\n    }\n}\nvar Private;\n(function (Private) {\n    /**\n     * A less-than comparison function for side bar rank items.\n     */\n    function itemCmp(first, second) {\n        return first.rank - second.rank;\n    }\n    Private.itemCmp = itemCmp;\n    /**\n     * Removes widgets that have been disposed from an area config, mutates area.\n     */\n    function normalizeAreaConfig(parent, area) {\n        if (!area) {\n            return;\n        }\n        if (area.type === 'tab-area') {\n            area.widgets = area.widgets.filter(widget => !widget.isDisposed && widget.parent === parent);\n            return;\n        }\n        area.children.forEach(child => {\n            normalizeAreaConfig(parent, child);\n        });\n    }\n    Private.normalizeAreaConfig = normalizeAreaConfig;\n    /**\n     * A class which manages a panel and sorts its widgets by rank.\n     */\n    class PanelHandler {\n        constructor() {\n            /**\n             * A message hook for child add/remove messages on the main area dock panel.\n             */\n            this._panelChildHook = (handler, msg) => {\n                switch (msg.type) {\n                    case 'child-added':\n                        {\n                            const widget = msg.child;\n                            // If we already know about this widget, we're done\n                            if (this._items.find(v => v.widget === widget)) {\n                                break;\n                            }\n                            // Otherwise, add to the end by default\n                            const rank = this._items[this._items.length - 1].rank;\n                            this._items.push({ widget, rank });\n                        }\n                        break;\n                    case 'child-removed':\n                        {\n                            const widget = msg.child;\n                            _lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__.ArrayExt.removeFirstWhere(this._items, v => v.widget === widget);\n                        }\n                        break;\n                    default:\n                        break;\n                }\n                return true;\n            };\n            this._items = new Array();\n            this._panel = new _lumino_widgets__WEBPACK_IMPORTED_MODULE_8__.Panel();\n            _lumino_messaging__WEBPACK_IMPORTED_MODULE_5__.MessageLoop.installMessageHook(this._panel, this._panelChildHook);\n        }\n        /**\n         * Get the panel managed by the handler.\n         */\n        get panel() {\n            return this._panel;\n        }\n        /**\n         * Add a widget to the panel.\n         *\n         * If the widget is already added, it will be moved.\n         */\n        addWidget(widget, rank) {\n            widget.parent = null;\n            const item = { widget, rank };\n            const index = _lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__.ArrayExt.upperBound(this._items, item, Private.itemCmp);\n            _lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__.ArrayExt.insert(this._items, index, item);\n            this._panel.insertWidget(index, widget);\n        }\n    }\n    Private.PanelHandler = PanelHandler;\n    /**\n     * A class which manages a side bar and related stacked panel.\n     */\n    class SideBarHandler {\n        /**\n         * Construct a new side bar handler.\n         */\n        constructor() {\n            this._isHiddenByUser = false;\n            this._items = new Array();\n            this._updated = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_7__.Signal(this);\n            this._sideBar = new _lumino_widgets__WEBPACK_IMPORTED_MODULE_8__.TabBar({\n                insertBehavior: 'none',\n                removeBehavior: 'none',\n                allowDeselect: true,\n                orientation: 'vertical'\n            });\n            this._stackedPanel = new _lumino_widgets__WEBPACK_IMPORTED_MODULE_8__.StackedPanel();\n            this._sideBar.hide();\n            this._stackedPanel.hide();\n            this._lastCurrent = null;\n            this._sideBar.currentChanged.connect(this._onCurrentChanged, this);\n            this._sideBar.tabActivateRequested.connect(this._onTabActivateRequested, this);\n            this._stackedPanel.widgetRemoved.connect(this._onWidgetRemoved, this);\n        }\n        /**\n         * Whether the side bar is visible\n         */\n        get isVisible() {\n            return this._sideBar.isVisible;\n        }\n        /**\n         * Get the tab bar managed by the handler.\n         */\n        get sideBar() {\n            return this._sideBar;\n        }\n        /**\n         * Get the stacked panel managed by the handler\n         */\n        get stackedPanel() {\n            return this._stackedPanel;\n        }\n        /**\n         * Signal fires when the stack panel or the sidebar changes\n         */\n        get updated() {\n            return this._updated;\n        }\n        /**\n         * Handles a movement to the handles of a widget\n         */\n        _onHandleMoved() {\n            return this._refreshVisibility();\n        }\n        /**\n         * Handles changes to the expansion status of a widget\n         */\n        _onExpansionToggle(sender, index) {\n            return this._refreshVisibility();\n        }\n        /**\n         * Expand the sidebar.\n         *\n         * #### Notes\n         * This will open the most recently used tab, or the first tab\n         * if there is no most recently used.\n         */\n        expand() {\n            const previous = this._lastCurrent || (this._items.length > 0 && this._items[0].widget);\n            if (previous) {\n                this.activate(previous.id);\n            }\n        }\n        /**\n         * Activate a widget residing in the side bar by ID.\n         *\n         * @param id - The widget's unique ID.\n         */\n        activate(id) {\n            const widget = this._findWidgetByID(id);\n            if (widget) {\n                this._sideBar.currentTitle = widget.title;\n                widget.activate();\n            }\n        }\n        /**\n         * Test whether the sidebar has the given widget by id.\n         */\n        has(id) {\n            return this._findWidgetByID(id) !== null;\n        }\n        /**\n         * Collapse the sidebar so no items are expanded.\n         */\n        collapse() {\n            this._sideBar.currentTitle = null;\n        }\n        /**\n         * Add a widget and its title to the stacked panel and side bar.\n         *\n         * If the widget is already added, it will be moved.\n         */\n        addWidget(widget, rank) {\n            var _a, _b, _c, _d;\n            widget.parent = null;\n            widget.hide();\n            const item = { widget, rank };\n            const index = this._findInsertIndex(item);\n            _lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__.ArrayExt.insert(this._items, index, item);\n            this._stackedPanel.insertWidget(index, widget);\n            const title = this._sideBar.insertTab(index, widget.title);\n            // Store the parent id in the title dataset\n            // in order to dispatch click events to the right widget.\n            title.dataset = { id: widget.id };\n            if (title.icon instanceof _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.LabIcon) {\n                // bind an appropriate style to the icon\n                title.icon = title.icon.bindprops({\n                    stylesheet: 'sideBar'\n                });\n            }\n            else if (typeof title.icon === 'string' && title.icon != '') {\n                // add some classes to help with displaying css background imgs\n                title.iconClass = (0,_jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.classes)(title.iconClass, 'jp-Icon', 'jp-Icon-20');\n            }\n            else if (!title.icon && !title.label) {\n                // add a fallback icon if there is no title label nor icon\n                title.icon = _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.tabIcon.bindprops({\n                    stylesheet: 'sideBar'\n                });\n            }\n            // @ts-expect-error sometimes widget is an Accordion Panel\n            (_b = (_a = widget.content) === null || _a === void 0 ? void 0 : _a.expansionToggled) === null || _b === void 0 ? void 0 : _b.connect(this._onExpansionToggle, this);\n            // @ts-expect-error sometimes widget is a SidePanel\n            (_d = (_c = widget.content) === null || _c === void 0 ? void 0 : _c.handleMoved) === null || _d === void 0 ? void 0 : _d.connect(this._onHandleMoved, this);\n            this._refreshVisibility();\n        }\n        /**\n         * Dehydrate the side bar data.\n         */\n        dehydrate() {\n            const collapsed = this._sideBar.currentTitle === null;\n            const widgets = Array.from(this._stackedPanel.widgets);\n            const currentWidget = widgets[this._sideBar.currentIndex];\n            const widgetStates = {};\n            this._stackedPanel.widgets.forEach((w) => {\n                if (w.id && w.content instanceof _lumino_widgets__WEBPACK_IMPORTED_MODULE_8__.SplitPanel) {\n                    widgetStates[w.id] = {\n                        sizes: w.content.relativeSizes(),\n                        expansionStates: w.content.widgets.map(wi => wi.isVisible)\n                    };\n                }\n            });\n            return {\n                collapsed,\n                currentWidget,\n                visible: !this._isHiddenByUser,\n                widgets,\n                widgetStates\n            };\n        }\n        /**\n         * Rehydrate the side bar.\n         */\n        rehydrate(data) {\n            if (data.currentWidget) {\n                this.activate(data.currentWidget.id);\n            }\n            if (data.collapsed) {\n                this.collapse();\n            }\n            if (!data.visible) {\n                this.hide();\n            }\n            if (data.widgetStates) {\n                this._stackedPanel.widgets.forEach((w) => {\n                    var _a;\n                    if (w.id && w.content instanceof _lumino_widgets__WEBPACK_IMPORTED_MODULE_8__.SplitPanel) {\n                        const state = (_a = data.widgetStates[w.id]) !== null && _a !== void 0 ? _a : {};\n                        w.content.widgets.forEach((wi, widx) => {\n                            var _a;\n                            const expansion = ((_a = state.expansionStates) !== null && _a !== void 0 ? _a : [])[widx];\n                            if (typeof expansion === 'boolean' &&\n                                w.content instanceof _lumino_widgets__WEBPACK_IMPORTED_MODULE_8__.AccordionPanel) {\n                                expansion ? w.content.expand(widx) : w.content.collapse(widx);\n                            }\n                        });\n                        if (state.sizes) {\n                            w.content.setRelativeSizes(state.sizes);\n                        }\n                    }\n                });\n            }\n        }\n        /**\n         * Hide the side bar even if it contains widgets\n         */\n        hide() {\n            this._isHiddenByUser = true;\n            this._refreshVisibility();\n        }\n        /**\n         * Show the side bar if it contains widgets\n         */\n        show() {\n            this._isHiddenByUser = false;\n            this._refreshVisibility();\n        }\n        /**\n         * Find the insertion index for a rank item.\n         */\n        _findInsertIndex(item) {\n            return _lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__.ArrayExt.upperBound(this._items, item, Private.itemCmp);\n        }\n        /**\n         * Find the index of the item with the given widget, or `-1`.\n         */\n        _findWidgetIndex(widget) {\n            return _lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__.ArrayExt.findFirstIndex(this._items, i => i.widget === widget);\n        }\n        /**\n         * Find the widget which owns the given title, or `null`.\n         */\n        _findWidgetByTitle(title) {\n            const item = (0,_lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__.find)(this._items, value => value.widget.title === title);\n            return item ? item.widget : null;\n        }\n        /**\n         * Find the widget with the given id, or `null`.\n         */\n        _findWidgetByID(id) {\n            const item = (0,_lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__.find)(this._items, value => value.widget.id === id);\n            return item ? item.widget : null;\n        }\n        /**\n         * Refresh the visibility of the side bar and stacked panel.\n         */\n        _refreshVisibility() {\n            this._stackedPanel.setHidden(this._sideBar.currentTitle === null);\n            this._sideBar.setHidden(this._isHiddenByUser || this._sideBar.titles.length === 0);\n            this._updated.emit();\n        }\n        /**\n         * Handle the `currentChanged` signal from the sidebar.\n         */\n        _onCurrentChanged(sender, args) {\n            const oldWidget = args.previousTitle\n                ? this._findWidgetByTitle(args.previousTitle)\n                : null;\n            const newWidget = args.currentTitle\n                ? this._findWidgetByTitle(args.currentTitle)\n                : null;\n            if (oldWidget) {\n                oldWidget.hide();\n            }\n            if (newWidget) {\n                newWidget.show();\n            }\n            this._lastCurrent = newWidget || oldWidget;\n            this._refreshVisibility();\n        }\n        /**\n         * Handle a `tabActivateRequest` signal from the sidebar.\n         */\n        _onTabActivateRequested(sender, args) {\n            args.title.owner.activate();\n        }\n        /*\n         * Handle the `widgetRemoved` signal from the stacked panel.\n         */\n        _onWidgetRemoved(sender, widget) {\n            if (widget === this._lastCurrent) {\n                this._lastCurrent = null;\n            }\n            _lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__.ArrayExt.removeAt(this._items, this._findWidgetIndex(widget));\n            this._sideBar.removeTab(widget.title);\n            this._refreshVisibility();\n        }\n    }\n    Private.SideBarHandler = SideBarHandler;\n    class SkipLinkWidget extends _lumino_widgets__WEBPACK_IMPORTED_MODULE_8__.Widget {\n        /**\n         * Construct a new skipLink widget.\n         */\n        constructor(shell) {\n            super();\n            this.addClass('jp-skiplink');\n            this.id = 'jp-skiplink';\n            this._shell = shell;\n            this._createSkipLink('Skip to main panel', 'main');\n        }\n        handleEvent(event) {\n            var _a, _b;\n            switch (event.type) {\n                case 'click':\n                    if (event.target instanceof HTMLElement) {\n                        this._shell.activateArea((_b = (_a = event.target) === null || _a === void 0 ? void 0 : _a.dataset) === null || _b === void 0 ? void 0 : _b.targetarea);\n                    }\n                    break;\n            }\n        }\n        /**\n         * Handle `after-attach` messages for the widget.\n         */\n        onAfterAttach(msg) {\n            super.onAfterAttach(msg);\n            this.node.addEventListener('click', this);\n        }\n        /**\n         * A message handler invoked on a `'before-detach'`\n         * message\n         */\n        onBeforeDetach(msg) {\n            this.node.removeEventListener('click', this);\n            super.onBeforeDetach(msg);\n        }\n        _createSkipLink(skipLinkText, area) {\n            const skipLink = document.createElement('a');\n            skipLink.href = '#';\n            skipLink.tabIndex = 0;\n            skipLink.text = skipLinkText;\n            skipLink.className = 'skip-link';\n            skipLink.dataset['targetarea'] = area;\n            this.node.appendChild(skipLink);\n        }\n    }\n    Private.SkipLinkWidget = SkipLinkWidget;\n    class TitleHandler extends _lumino_widgets__WEBPACK_IMPORTED_MODULE_8__.Widget {\n        /**\n         * Construct a new title handler.\n         */\n        constructor(shell) {\n            super();\n            this._selected = false;\n            const inputElement = document.createElement('input');\n            inputElement.type = 'text';\n            this.node.appendChild(inputElement);\n            this._shell = shell;\n            this.id = 'jp-title-panel-title';\n        }\n        /**\n         * Handle `after-attach` messages for the widget.\n         */\n        onAfterAttach(msg) {\n            super.onAfterAttach(msg);\n            this.inputElement.addEventListener('keyup', this);\n            this.inputElement.addEventListener('click', this);\n            this.inputElement.addEventListener('blur', this);\n        }\n        /**\n         * Handle `before-detach` messages for the widget.\n         */\n        onBeforeDetach(msg) {\n            super.onBeforeDetach(msg);\n            this.inputElement.removeEventListener('keyup', this);\n            this.inputElement.removeEventListener('click', this);\n            this.inputElement.removeEventListener('blur', this);\n        }\n        handleEvent(event) {\n            switch (event.type) {\n                case 'keyup':\n                    void this._evtKeyUp(event);\n                    break;\n                case 'click':\n                    this._evtClick(event);\n                    break;\n                case 'blur':\n                    this._selected = false;\n                    break;\n            }\n        }\n        /**\n         * Handle `keyup` events on the handler.\n         */\n        async _evtKeyUp(event) {\n            if (event.key == 'Enter') {\n                const widget = this._shell.currentWidget;\n                if (widget == null) {\n                    return;\n                }\n                const oldName = widget.title.label;\n                const inputElement = this.inputElement;\n                const newName = inputElement.value;\n                inputElement.blur();\n                if (newName !== oldName) {\n                    widget.title.label = newName;\n                }\n                else {\n                    inputElement.value = oldName;\n                }\n            }\n        }\n        /**\n         * Handle `click` events on the handler.\n         */\n        _evtClick(event) {\n            // only handle primary button clicks\n            if (event.button !== 0 || this._selected) {\n                return;\n            }\n            const inputElement = this.inputElement;\n            event.preventDefault();\n            event.stopPropagation();\n            this._selected = true;\n            const selectEnd = inputElement.value.indexOf('.');\n            if (selectEnd === -1) {\n                inputElement.select();\n            }\n            else {\n                inputElement.setSelectionRange(0, selectEnd);\n            }\n        }\n        /**\n         * The input element containing the parent widget's title.\n         */\n        get inputElement() {\n            return this.node.children[0];\n        }\n    }\n    Private.TitleHandler = TitleHandler;\n    class RestorableSplitPanel extends _lumino_widgets__WEBPACK_IMPORTED_MODULE_8__.SplitPanel {\n        constructor(options = {}) {\n            super(options);\n            this.updated = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_7__.Signal(this);\n        }\n        /**\n         * Emit 'updated' signal on 'update' requests.\n         */\n        onUpdateRequest(msg) {\n            super.onUpdateRequest(msg);\n            this.updated.emit();\n        }\n    }\n    Private.RestorableSplitPanel = RestorableSplitPanel;\n})(Private || (Private = {}));\n//# sourceMappingURL=shell.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/application/lib/shell.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/application/lib/tokens.js":
/*!*************************************************************!*\
  !*** ../node_modules/@jupyterlab/application/lib/tokens.js ***!
  \*************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   IConnectionLost: () => (/* binding */ IConnectionLost),\n/* harmony export */   ILabStatus: () => (/* binding */ ILabStatus),\n/* harmony export */   IRouter: () => (/* binding */ IRouter)\n/* harmony export */ });\n/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @lumino/coreutils */ \"webpack/sharing/consume/default/@lumino/coreutils/@lumino/coreutils\");\n/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_lumino_coreutils__WEBPACK_IMPORTED_MODULE_0__);\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n/**\n * A token for which a plugin can provide to respond to connection failures\n * to the application server.\n */\nconst IConnectionLost = new _lumino_coreutils__WEBPACK_IMPORTED_MODULE_0__.Token('@jupyterlab/application:IConnectionLost', `A service for invoking the dialog shown\n  when JupyterLab has lost its connection to the server. Use this if, for some reason,\n  you want to bring up the \"connection lost\" dialog under new circumstances.`);\n/**\n * The application status token.\n */\nconst ILabStatus = new _lumino_coreutils__WEBPACK_IMPORTED_MODULE_0__.Token('@jupyterlab/application:ILabStatus', `A service for interacting with the application busy/dirty\n  status. Use this if you want to set the application \"busy\" favicon, or to set\n  the application \"dirty\" status, which asks the user for confirmation before leaving the application page.`);\n/**\n * The URL Router token.\n */\nconst IRouter = new _lumino_coreutils__WEBPACK_IMPORTED_MODULE_0__.Token('@jupyterlab/application:IRouter', 'The URL router used by the application. Use this to add custom URL-routing for your extension (e.g., to invoke a command if the user navigates to a sub-path).');\n//# sourceMappingURL=tokens.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/application/lib/tokens.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/application/lib/treepathupdater.js":
/*!**********************************************************************!*\
  !*** ../node_modules/@jupyterlab/application/lib/treepathupdater.js ***!
  \**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   ITreePathUpdater: () => (/* binding */ ITreePathUpdater)\n/* harmony export */ });\n/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @lumino/coreutils */ \"webpack/sharing/consume/default/@lumino/coreutils/@lumino/coreutils\");\n/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_lumino_coreutils__WEBPACK_IMPORTED_MODULE_0__);\n/* -----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|----------------------------------------------------------------------------*/\n\n/**\n * The tree path updater token.\n */\nconst ITreePathUpdater = new _lumino_coreutils__WEBPACK_IMPORTED_MODULE_0__.Token('@jupyterlab/application:ITreePathUpdater', 'A service to update the tree path.');\n//# sourceMappingURL=treepathupdater.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/application/lib/treepathupdater.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/application/lib/utils.js":
/*!************************************************************!*\
  !*** ../node_modules/@jupyterlab/application/lib/utils.js ***!
  \************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   addSemanticCommand: () => (/* binding */ addSemanticCommand),\n/* harmony export */   createSemanticCommand: () => (/* binding */ createSemanticCommand)\n/* harmony export */ });\n/* harmony import */ var _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/translation */ \"webpack/sharing/consume/default/@jupyterlab/translation/@jupyterlab/translation\");\n/* harmony import */ var _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_translation__WEBPACK_IMPORTED_MODULE_0__);\n/*\n * Copyright (c) Jupyter Development Team.\n * Distributed under the terms of the Modified BSD License.\n */\n\n/**\n * Add a semantic commands to the application and take care\n * of setting up the command changed signal.\n *\n * @param options Semantic command options\n */\nfunction addSemanticCommand(options) {\n    const { id, commands, shell, semanticCommands, default: defaultValues, overrides, trans } = options;\n    commands.addCommand(id, {\n        ...createSemanticCommand({ commands, shell }, semanticCommands, defaultValues !== null && defaultValues !== void 0 ? defaultValues : {}, trans !== null && trans !== void 0 ? trans : _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_0__.nullTranslator.load('jupyterlab')),\n        ...overrides\n    });\n    const commandList = Array.isArray(semanticCommands)\n        ? semanticCommands\n        : [semanticCommands];\n    const onCommandChanged = (commands, args) => {\n        if (args.id) {\n            if (args.id === id && args.type === 'removed') {\n                commands.commandChanged.disconnect(onCommandChanged);\n            }\n            else {\n                const commandIds = commandList.reduce((agg, cmd) => agg.concat(cmd.ids), []);\n                if (commandIds.includes(args.id)) {\n                    switch (args.type) {\n                        case 'changed':\n                        case 'many-changed':\n                            commands.notifyCommandChanged(id);\n                            break;\n                        case 'removed':\n                            for (const cmd of commandList) {\n                                cmd.remove(args.id);\n                            }\n                            break;\n                    }\n                }\n            }\n        }\n    };\n    commands.commandChanged.connect(onCommandChanged);\n}\n/**\n * Create the command options from the given semantic commands list\n * and the given default values.\n *\n * @param app Jupyter Application\n * @param semanticCommands Single semantic command  or a list of commands\n * @param defaultValues Default values\n * @param trans Translation bundle\n * @returns Command options\n *\n * @deprecated Please use {@link addSemanticCommand}. This function will\n * be removed of the public API in JupyterLab 5.\n */\nfunction createSemanticCommand(app, semanticCommands, defaultValues, trans) {\n    const { commands, shell } = app;\n    const commandList = Array.isArray(semanticCommands)\n        ? semanticCommands\n        : [semanticCommands];\n    return {\n        label: concatenateTexts('label'),\n        caption: concatenateTexts('caption'),\n        isEnabled: () => {\n            var _a;\n            const isEnabled = reduceAttribute('isEnabled');\n            return ((isEnabled.length > 0 &&\n                !isEnabled.some(enabled => enabled === false)) ||\n                ((_a = defaultValues.isEnabled) !== null && _a !== void 0 ? _a : false));\n        },\n        isToggled: () => {\n            var _a;\n            const isToggled = reduceAttribute('isToggled');\n            return (isToggled.some(enabled => enabled === true) ||\n                ((_a = defaultValues.isToggled) !== null && _a !== void 0 ? _a : false));\n        },\n        isVisible: () => {\n            var _a;\n            const isVisible = reduceAttribute('isVisible');\n            return ((isVisible.length > 0 &&\n                !isVisible.some(visible => visible === false)) ||\n                ((_a = defaultValues.isVisible) !== null && _a !== void 0 ? _a : true));\n        },\n        execute: async () => {\n            const widget = shell.currentWidget;\n            const commandIds = commandList.map(cmd => widget !== null ? cmd.getActiveCommandId(widget) : null);\n            const toExecute = commandIds.filter(commandId => commandId !== null && commands.isEnabled(commandId));\n            let result = null;\n            if (toExecute.length > 0) {\n                for (const commandId of toExecute) {\n                    result = await commands.execute(commandId);\n                    if (typeof result === 'boolean' && result === false) {\n                        // If a command returns a boolean, assume it is the execution success status\n                        // So break if it is false.\n                        break;\n                    }\n                }\n            }\n            else if (defaultValues.execute) {\n                result = await commands.execute(defaultValues.execute);\n            }\n            return result;\n        }\n    };\n    function reduceAttribute(attribute) {\n        const widget = shell.currentWidget;\n        const commandIds = commandList.map(cmd => widget !== null ? cmd.getActiveCommandId(widget) : null);\n        const attributes = commandIds\n            .filter(commandId => commandId !== null)\n            .map(commandId => commands[attribute](commandId));\n        return attributes;\n    }\n    function concatenateTexts(attribute) {\n        return () => {\n            var _a;\n            const texts = reduceAttribute(attribute).map((text, textIndex) => attribute == 'caption' && textIndex > 0\n                ? text.toLocaleLowerCase()\n                : text);\n            switch (texts.length) {\n                case 0:\n                    return (_a = defaultValues[attribute]) !== null && _a !== void 0 ? _a : '';\n                case 1:\n                    return texts[0];\n                default: {\n                    const hasEllipsis = texts.some(l => /…$/.test(l));\n                    const main = texts\n                        .slice(undefined, -1)\n                        .map(l => l.replace(/…$/, ''))\n                        .join(', ');\n                    const end = texts.slice(-1)[0].replace(/…$/, '') + (hasEllipsis ? '…' : '');\n                    return trans.__('%1 and %2', main, end);\n                }\n            }\n        };\n    }\n}\n//# sourceMappingURL=utils.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/application/lib/utils.js?");

/***/ })

}]);