"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([["node_modules_jupyterlab_workspaces_lib_index_js-_dab70"],{

/***/ "../node_modules/@jupyterlab/workspaces/lib/index.js":
/*!***********************************************************!*\
  !*** ../node_modules/@jupyterlab/workspaces/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 */   IWorkspaceCommands: () => (/* reexport safe */ _tokens__WEBPACK_IMPORTED_MODULE_1__.IWorkspaceCommands),\n/* harmony export */   IWorkspacesModel: () => (/* reexport safe */ _tokens__WEBPACK_IMPORTED_MODULE_1__.IWorkspacesModel),\n/* harmony export */   WorkspacesModel: () => (/* reexport safe */ _model__WEBPACK_IMPORTED_MODULE_0__.WorkspacesModel)\n/* harmony export */ });\n/* harmony import */ var _model__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./model */ \"../node_modules/@jupyterlab/workspaces/lib/model.js\");\n/* harmony import */ var _tokens__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./tokens */ \"../node_modules/@jupyterlab/workspaces/lib/tokens.js\");\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/**\n * @packageDocumentation\n * @module workspaces\n */\n\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/workspaces/lib/index.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/workspaces/lib/model.js":
/*!***********************************************************!*\
  !*** ../node_modules/@jupyterlab/workspaces/lib/model.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 */   WorkspacesModel: () => (/* binding */ WorkspacesModel)\n/* harmony export */ });\n/* harmony import */ var _lumino_polling__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @lumino/polling */ \"webpack/sharing/consume/default/@lumino/polling/@lumino/polling\");\n/* harmony import */ var _lumino_polling__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_lumino_polling__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @lumino/signaling */ \"webpack/sharing/consume/default/@lumino/signaling/@lumino/signaling\");\n/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_lumino_signaling__WEBPACK_IMPORTED_MODULE_1__);\n/*\n * Copyright (c) Jupyter Development Team.\n * Distributed under the terms of the Modified BSD License.\n */\n\n\n/**\n * The default duration of the auto-refresh in ms\n */\nconst DEFAULT_REFRESH_INTERVAL = 10000;\n/**\n * An implementation of a workspaces model.\n */\nclass WorkspacesModel {\n    constructor(options) {\n        var _a;\n        this._refreshed = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_1__.Signal(this);\n        this._isDisposed = false;\n        this._workspaceData = {\n            ids: [],\n            values: []\n        };\n        this._manager = options.manager;\n        const refreshInterval = options.refreshInterval || DEFAULT_REFRESH_INTERVAL;\n        this._poll = new _lumino_polling__WEBPACK_IMPORTED_MODULE_0__.Poll({\n            auto: (_a = options.auto) !== null && _a !== void 0 ? _a : true,\n            name: '@jupyterlab/workspaces:Model',\n            factory: () => this._fetchList(),\n            frequency: {\n                interval: refreshInterval,\n                backoff: true,\n                max: 300 * 1000\n            },\n            standby: options.refreshStandby || 'when-hidden'\n        });\n    }\n    /**\n     * The list of available workspaces.\n     */\n    get workspaces() {\n        return this._workspaceData.values;\n    }\n    /**\n     * The list of workspace identifiers.\n     */\n    get identifiers() {\n        return this._workspaceData.ids;\n    }\n    /**\n     * Create an empty workspace.\n     */\n    async create(workspaceId) {\n        await this._manager.save(workspaceId, {\n            metadata: { id: workspaceId },\n            data: {}\n        });\n        await this.refresh();\n    }\n    /**\n     * A signal emitted when the workspaces list is refreshed.\n     */\n    get refreshed() {\n        return this._refreshed;\n    }\n    /**\n     * Force a refresh of the workspaces list.\n     */\n    async refresh() {\n        await this._poll.refresh();\n        await this._poll.tick;\n    }\n    /**\n     * Rename a workspace.\n     */\n    async rename(workspaceId, newName) {\n        const workspace = await this._manager.fetch(workspaceId);\n        workspace.metadata.id = newName;\n        await this._manager.save(newName, workspace);\n        await this._manager.remove(workspaceId);\n        await this.refresh();\n    }\n    /**\n     * Reset a workspace.\n     */\n    async reset(workspaceId) {\n        const workspace = await this._manager.fetch(workspaceId);\n        workspace.data = {};\n        await this._manager.save(workspaceId, workspace);\n        await this.refresh();\n    }\n    /**\n     * Remove a workspace.\n     */\n    async remove(workspaceId) {\n        await this._manager.remove(workspaceId);\n        await this.refresh();\n    }\n    /**\n     * Save workspace under a different name.\n     */\n    async saveAs(workspaceId, newName) {\n        const data = await this._manager.fetch(workspaceId);\n        data.metadata.id = newName;\n        await this._manager.save(newName, data);\n        await this.refresh();\n    }\n    /**\n     * Get whether the model is disposed.\n     */\n    get isDisposed() {\n        return this._isDisposed;\n    }\n    /**\n     * Dispose of the resources held by the model.\n     */\n    dispose() {\n        if (this.isDisposed) {\n            return;\n        }\n        this._isDisposed = true;\n        this._poll.dispose();\n        _lumino_signaling__WEBPACK_IMPORTED_MODULE_1__.Signal.clearData(this);\n    }\n    async _fetchList() {\n        this._workspaceData = await this._manager.list();\n        this._refreshed.emit(void 0);\n    }\n}\n//# sourceMappingURL=model.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/workspaces/lib/model.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/workspaces/lib/tokens.js":
/*!************************************************************!*\
  !*** ../node_modules/@jupyterlab/workspaces/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 */   IWorkspaceCommands: () => (/* binding */ IWorkspaceCommands),\n/* harmony export */   IWorkspacesModel: () => (/* binding */ IWorkspacesModel)\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 * The token that provides the identifiers of workspace commands for reuse.\n */\nconst IWorkspaceCommands = new _lumino_coreutils__WEBPACK_IMPORTED_MODULE_0__.Token('@jupyterlab/workspaces:IWorkspaceCommands', 'Provides identifiers of workspace commands.');\n/**\n * The token that provides the identifiers of workspace commands for reuse.\n */\nconst IWorkspacesModel = new _lumino_coreutils__WEBPACK_IMPORTED_MODULE_0__.Token('@jupyterlab/workspaces:IWorkspacesModel', 'Provides a model for available workspaces.');\n//# sourceMappingURL=tokens.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/workspaces/lib/tokens.js?");

/***/ })

}]);