/*
 * 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([["packages_application_lib_index_js"],{

/***/ "../packages/application/lib/app.js":
/*!******************************************!*\
  !*** ../packages/application/lib/app.js ***!
  \******************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"RetroApp\": () => (/* binding */ RetroApp)\n/* harmony export */ });\n/* harmony import */ var _jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/application */ \"webpack/sharing/consume/default/@jupyterlab/application/@jupyterlab/application\");\n/* harmony import */ var _jupyterlab_application__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _jupyterlab_application_lib_mimerenderers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @jupyterlab/application/lib/mimerenderers */ \"../node_modules/@jupyterlab/application/lib/mimerenderers.js\");\n/* harmony import */ var _jupyterlab_application_lib_status__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @jupyterlab/application/lib/status */ \"../node_modules/@jupyterlab/application/lib/status.js\");\n/* harmony import */ var _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyterlab/coreutils */ \"webpack/sharing/consume/default/@jupyterlab/coreutils/@jupyterlab/coreutils\");\n/* harmony import */ var _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _lumino_polling__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @lumino/polling */ \"webpack/sharing/consume/default/@lumino/polling/@lumino/polling\");\n/* harmony import */ var _lumino_polling__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_lumino_polling__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _shell__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./shell */ \"../packages/application/lib/shell.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 * App is the main application class. It is instantiated once and shared.\n */\nclass RetroApp extends _jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__.JupyterFrontEnd {\n    /**\n     * Construct a new RetroApp object.\n     *\n     * @param options The instantiation options for an application.\n     */\n    constructor(options = { shell: new _shell__WEBPACK_IMPORTED_MODULE_3__.RetroShell() }) {\n        var _a, _b;\n        super(Object.assign(Object.assign({}, options), { shell: (_a = options.shell) !== null && _a !== void 0 ? _a : new _shell__WEBPACK_IMPORTED_MODULE_3__.RetroShell() }));\n        /**\n         * The name of the application.\n         */\n        this.name = 'RetroLab';\n        /**\n         * A namespace/prefix plugins may use to denote their provenance.\n         */\n        this.namespace = this.name;\n        /**\n         * The application busy and dirty status signals and flags.\n         */\n        this.status = new _jupyterlab_application_lib_status__WEBPACK_IMPORTED_MODULE_4__.LabStatus(this);\n        /**\n         * The version of the application.\n         */\n        this.version = (_b = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__.PageConfig.getOption('appVersion')) !== null && _b !== void 0 ? _b : 'unknown';\n        this._formatter = new _lumino_polling__WEBPACK_IMPORTED_MODULE_2__.Throttler(() => {\n            Private.setFormat(this);\n        }, 250);\n        if (options.mimeExtensions) {\n            for (const plugin of (0,_jupyterlab_application_lib_mimerenderers__WEBPACK_IMPORTED_MODULE_5__.createRendermimePlugins)(options.mimeExtensions)) {\n                this.registerPlugin(plugin);\n            }\n        }\n        void this._formatter.invoke();\n    }\n    /**\n     * The JupyterLab application paths dictionary.\n     */\n    get paths() {\n        return {\n            urls: {\n                base: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__.PageConfig.getOption('baseUrl'),\n                notFound: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__.PageConfig.getOption('notFoundUrl'),\n                app: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__.PageConfig.getOption('appUrl'),\n                static: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__.PageConfig.getOption('staticUrl'),\n                settings: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__.PageConfig.getOption('settingsUrl'),\n                themes: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__.PageConfig.getOption('themesUrl'),\n                doc: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__.PageConfig.getOption('docUrl'),\n                translations: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__.PageConfig.getOption('translationsApiUrl'),\n                hubHost: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__.PageConfig.getOption('hubHost') || undefined,\n                hubPrefix: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__.PageConfig.getOption('hubPrefix') || undefined,\n                hubUser: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__.PageConfig.getOption('hubUser') || undefined,\n                hubServerName: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__.PageConfig.getOption('hubServerName') || undefined\n            },\n            directories: {\n                appSettings: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__.PageConfig.getOption('appSettingsDir'),\n                schemas: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__.PageConfig.getOption('schemasDir'),\n                static: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__.PageConfig.getOption('staticDir'),\n                templates: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__.PageConfig.getOption('templatesDir'),\n                themes: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__.PageConfig.getOption('themesDir'),\n                userSettings: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__.PageConfig.getOption('userSettingsDir'),\n                serverRoot: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__.PageConfig.getOption('serverRoot'),\n                workspaces: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__.PageConfig.getOption('workspacesDir')\n            }\n        };\n    }\n    /**\n     * Handle the DOM events for the application.\n     *\n     * @param event - The DOM event sent to the application.\n     */\n    handleEvent(event) {\n        super.handleEvent(event);\n        if (event.type === 'resize') {\n            void this._formatter.invoke();\n        }\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 (!Object.prototype.hasOwnProperty.call(mod, '__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                console.error(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/**\n * A namespace for module-private functionality.\n */\nvar Private;\n(function (Private) {\n    /**\n     * Media query for mobile devices.\n     */\n    const MOBILE_QUERY = 'only screen and (max-width: 760px)';\n    /**\n     * Sets the `format` of a Jupyter front-end application.\n     *\n     * @param app The front-end application whose format is set.\n     */\n    function setFormat(app) {\n        app.format = window.matchMedia(MOBILE_QUERY).matches ? 'mobile' : 'desktop';\n    }\n    Private.setFormat = setFormat;\n})(Private || (Private = {}));\n\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../packages/application/lib/app.js?");

/***/ }),

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

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"RetroApp\": () => (/* reexport safe */ _app__WEBPACK_IMPORTED_MODULE_0__.RetroApp),\n/* harmony export */   \"IRetroShell\": () => (/* reexport safe */ _shell__WEBPACK_IMPORTED_MODULE_1__.IRetroShell),\n/* harmony export */   \"RetroShell\": () => (/* reexport safe */ _shell__WEBPACK_IMPORTED_MODULE_1__.RetroShell)\n/* harmony export */ });\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./app */ \"../packages/application/lib/app.js\");\n/* harmony import */ var _shell__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./shell */ \"../packages/application/lib/shell.js\");\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n\n\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../packages/application/lib/index.js?");

/***/ }),

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

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"IRetroShell\": () => (/* binding */ IRetroShell),\n/* harmony export */   \"RetroShell\": () => (/* binding */ RetroShell)\n/* harmony export */ });\n/* harmony import */ var _lumino_algorithm__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @lumino/algorithm */ \"webpack/sharing/consume/default/@lumino/algorithm/@lumino/algorithm\");\n/* harmony import */ var _lumino_algorithm__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_lumino_algorithm__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_messaging__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @lumino/messaging */ \"webpack/sharing/consume/default/@lumino/messaging/@lumino/messaging\");\n/* harmony import */ var _lumino_messaging__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_lumino_messaging__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/* harmony import */ var _lumino_widgets__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @lumino/widgets */ \"webpack/sharing/consume/default/@lumino/widgets/@lumino/widgets\");\n/* harmony import */ var _lumino_widgets__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_lumino_widgets__WEBPACK_IMPORTED_MODULE_4__);\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n\n\n\n\n/**\n * The RetroLab application shell token.\n */\nconst IRetroShell = new _lumino_coreutils__WEBPACK_IMPORTED_MODULE_1__.Token('@retrolab/application:IRetroShell');\n/**\n * The default rank for ranked panels.\n */\nconst DEFAULT_RANK = 900;\n/**\n * The application shell.\n */\nclass RetroShell extends _lumino_widgets__WEBPACK_IMPORTED_MODULE_4__.Widget {\n    constructor() {\n        super();\n        this._currentChanged = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_3__.Signal(this);\n        this.id = 'main';\n        const rootLayout = new _lumino_widgets__WEBPACK_IMPORTED_MODULE_4__.BoxLayout();\n        this._topHandler = new Private.PanelHandler();\n        this._menuHandler = new Private.PanelHandler();\n        this._main = new _lumino_widgets__WEBPACK_IMPORTED_MODULE_4__.Panel();\n        this._topHandler.panel.id = 'top-panel';\n        this._menuHandler.panel.id = 'menu-panel';\n        this._main.id = 'main-panel';\n        // create wrappers around the top and menu areas\n        const topWrapper = (this._topWrapper = new _lumino_widgets__WEBPACK_IMPORTED_MODULE_4__.Panel());\n        topWrapper.id = 'top-panel-wrapper';\n        topWrapper.addWidget(this._topHandler.panel);\n        const menuWrapper = (this._menuWrapper = new _lumino_widgets__WEBPACK_IMPORTED_MODULE_4__.Panel());\n        menuWrapper.id = 'menu-panel-wrapper';\n        menuWrapper.addWidget(this._menuHandler.panel);\n        _lumino_widgets__WEBPACK_IMPORTED_MODULE_4__.BoxLayout.setStretch(topWrapper, 0);\n        _lumino_widgets__WEBPACK_IMPORTED_MODULE_4__.BoxLayout.setStretch(menuWrapper, 0);\n        _lumino_widgets__WEBPACK_IMPORTED_MODULE_4__.BoxLayout.setStretch(this._main, 1);\n        this._spacer = new _lumino_widgets__WEBPACK_IMPORTED_MODULE_4__.Widget();\n        this._spacer.id = 'spacer-widget';\n        rootLayout.spacing = 0;\n        rootLayout.addWidget(topWrapper);\n        rootLayout.addWidget(menuWrapper);\n        rootLayout.addWidget(this._spacer);\n        rootLayout.addWidget(this._main);\n        this.layout = rootLayout;\n    }\n    /**\n     * A signal emitted when the current widget changes.\n     */\n    get currentChanged() {\n        return this._currentChanged;\n    }\n    /**\n     * The current widget in the shell's main area.\n     */\n    get currentWidget() {\n        var _a;\n        return (_a = this._main.widgets[0]) !== null && _a !== void 0 ? _a : null;\n    }\n    /**\n     * Get the top area wrapper panel\n     */\n    get top() {\n        return this._topWrapper;\n    }\n    /**\n     * Get the menu area wrapper panel\n     */\n    get menu() {\n        return this._menuWrapper;\n    }\n    /**\n     * Activate a widget in its area.\n     */\n    activateById(id) {\n        const widget = (0,_lumino_algorithm__WEBPACK_IMPORTED_MODULE_0__.find)(this.widgets('main'), w => w.id === id);\n        if (widget) {\n            widget.activate();\n        }\n    }\n    /**\n     * Add a widget to the application shell.\n     *\n     * @param widget - The widget being added.\n     *\n     * @param area - Optional region in the shell into which the widget should\n     * be added.\n     *\n     * @param options - Optional open options.\n     *\n     */\n    add(widget, area, options) {\n        var _a;\n        const rank = (_a = options === null || options === void 0 ? void 0 : options.rank) !== null && _a !== void 0 ? _a : DEFAULT_RANK;\n        if (area === 'top') {\n            return this._topHandler.addWidget(widget, rank);\n        }\n        if (area === 'menu') {\n            return this._menuHandler.addWidget(widget, rank);\n        }\n        if (area === 'main' || area === undefined) {\n            if (this._main.widgets.length > 0) {\n                // do not add the widget if there is already one\n                return;\n            }\n            this._main.addWidget(widget);\n            this._main.update();\n            this._currentChanged.emit(void 0);\n        }\n    }\n    /**\n     * Collapse the top area and the spacer to make the view more compact.\n     */\n    collapseTop() {\n        this._topWrapper.setHidden(true);\n        this._spacer.setHidden(true);\n    }\n    /**\n     * Expand the top area to show the header and the spacer.\n     */\n    expandTop() {\n        this._topWrapper.setHidden(false);\n        this._spacer.setHidden(false);\n    }\n    /**\n     * Return the list of widgets for the given area.\n     *\n     * @param area The area\n     */\n    widgets(area) {\n        switch (area !== null && area !== void 0 ? area : 'main') {\n            case 'top':\n                return (0,_lumino_algorithm__WEBPACK_IMPORTED_MODULE_0__.iter)(this._topHandler.panel.widgets);\n            case 'menu':\n                return (0,_lumino_algorithm__WEBPACK_IMPORTED_MODULE_0__.iter)(this._menuHandler.panel.widgets);\n            case 'main':\n                return (0,_lumino_algorithm__WEBPACK_IMPORTED_MODULE_0__.iter)(this._main.widgets);\n            default:\n                throw new Error(`Invalid area: ${area}`);\n        }\n    }\n}\n/**\n * A namespace for private module data.\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     * 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_0__.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_4__.Panel();\n            _lumino_messaging__WEBPACK_IMPORTED_MODULE_2__.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_0__.ArrayExt.upperBound(this._items, item, Private.itemCmp);\n            _lumino_algorithm__WEBPACK_IMPORTED_MODULE_0__.ArrayExt.insert(this._items, index, item);\n            this._panel.insertWidget(index, widget);\n        }\n    }\n    Private.PanelHandler = PanelHandler;\n})(Private || (Private = {}));\n\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../packages/application/lib/shell.js?");

/***/ })

}]);