/*
 * 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_running_lib_index_js-_e22a0"],{

/***/ "../node_modules/@jupyterlab/running/lib/index.js":
/*!********************************************************!*\
  !*** ../node_modules/@jupyterlab/running/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 */   \"IRunningSessionManagers\": () => (/* binding */ IRunningSessionManagers),\n/* harmony export */   \"RunningSessionManagers\": () => (/* binding */ RunningSessionManagers),\n/* harmony export */   \"RunningSessions\": () => (/* binding */ RunningSessions)\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/* 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_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 _lumino_disposable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @lumino/disposable */ \"webpack/sharing/consume/default/@lumino/disposable/@lumino/disposable\");\n/* harmony import */ var _lumino_disposable__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_lumino_disposable__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ \"webpack/sharing/consume/default/react/react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__);\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/**\n * @packageDocumentation\n * @module running\n */\n\n\n\n\n\n\n/**\n * The class name added to a running widget.\n */\nconst RUNNING_CLASS = 'jp-RunningSessions';\n/**\n * The class name added to a running widget header.\n */\nconst HEADER_CLASS = 'jp-RunningSessions-header';\n/**\n * The class name added to the running terminal sessions section.\n */\nconst SECTION_CLASS = 'jp-RunningSessions-section';\n/**\n * The class name added to the running sessions section header.\n */\nconst SECTION_HEADER_CLASS = 'jp-RunningSessions-sectionHeader';\n/**\n * The class name added to a section container.\n */\nconst CONTAINER_CLASS = 'jp-RunningSessions-sectionContainer';\n/**\n * The class name added to the running kernel sessions section list.\n */\nconst LIST_CLASS = 'jp-RunningSessions-sectionList';\n/**\n * The class name added to the running sessions items.\n */\nconst ITEM_CLASS = 'jp-RunningSessions-item';\n/**\n * The class name added to a running session item label.\n */\nconst ITEM_LABEL_CLASS = 'jp-RunningSessions-itemLabel';\n/**\n * The class name added to a running session item detail.\n */\nconst ITEM_DETAIL_CLASS = 'jp-RunningSessions-itemDetail';\n/**\n * The class name added to a running session item shutdown button.\n */\nconst SHUTDOWN_BUTTON_CLASS = 'jp-RunningSessions-itemShutdown';\n/**\n * The class name added to a running session item shutdown button.\n */\nconst SHUTDOWN_ALL_BUTTON_CLASS = 'jp-RunningSessions-shutdownAll';\n/* tslint:disable */\n/**\n * The running sessions token.\n */\nconst IRunningSessionManagers = new _lumino_coreutils__WEBPACK_IMPORTED_MODULE_3__.Token('@jupyterlab/running:IRunningSessionManagers');\nclass RunningSessionManagers {\n    constructor() {\n        this._managers = [];\n    }\n    /**\n     * Add a running item manager.\n     *\n     * @param manager - The running item manager.\n     *\n     */\n    add(manager) {\n        this._managers.push(manager);\n        return new _lumino_disposable__WEBPACK_IMPORTED_MODULE_4__.DisposableDelegate(() => {\n            const i = this._managers.indexOf(manager);\n            if (i > -1) {\n                this._managers.splice(i, 1);\n            }\n        });\n    }\n    /**\n     * Return an iterator of launcher items.\n     */\n    items() {\n        return this._managers;\n    }\n}\nfunction Item(props) {\n    var _a;\n    const { runningItem } = props;\n    const icon = runningItem.icon();\n    const detail = (_a = runningItem.detail) === null || _a === void 0 ? void 0 : _a.call(runningItem);\n    const translator = props.translator || _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_1__.nullTranslator;\n    const trans = translator.load('jupyterlab');\n    const shutdownLabel = props.shutdownLabel || trans.__('Shut Down');\n    const shutdownItemIcon = props.shutdownItemIcon || _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.closeIcon;\n    return (react__WEBPACK_IMPORTED_MODULE_5__.createElement(\"li\", { className: ITEM_CLASS },\n        react__WEBPACK_IMPORTED_MODULE_5__.createElement(icon.react, { tag: \"span\", stylesheet: \"runningItem\" }),\n        react__WEBPACK_IMPORTED_MODULE_5__.createElement(\"span\", { className: ITEM_LABEL_CLASS, title: runningItem.labelTitle ? runningItem.labelTitle() : '', onClick: () => runningItem.open() }, runningItem.label()),\n        detail && react__WEBPACK_IMPORTED_MODULE_5__.createElement(\"span\", { className: ITEM_DETAIL_CLASS }, detail),\n        react__WEBPACK_IMPORTED_MODULE_5__.createElement(_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.ToolbarButtonComponent, { className: SHUTDOWN_BUTTON_CLASS, icon: shutdownItemIcon, onClick: () => runningItem.shutdown(), tooltip: shutdownLabel })));\n}\nfunction ListView(props) {\n    return (react__WEBPACK_IMPORTED_MODULE_5__.createElement(\"ul\", { className: LIST_CLASS }, props.runningItems.map((item, i) => (react__WEBPACK_IMPORTED_MODULE_5__.createElement(Item, { key: i, runningItem: item, shutdownLabel: props.shutdownLabel, shutdownItemIcon: props.shutdownItemIcon, translator: props.translator })))));\n}\nfunction List(props) {\n    return (react__WEBPACK_IMPORTED_MODULE_5__.createElement(_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.UseSignal, { signal: props.manager.runningChanged }, () => (react__WEBPACK_IMPORTED_MODULE_5__.createElement(ListView, { runningItems: props.manager.running(), shutdownLabel: props.shutdownLabel, shutdownAllLabel: props.shutdownAllLabel, shutdownItemIcon: props.manager.shutdownItemIcon, translator: props.translator }))));\n}\n/**\n * The Section component contains the shared look and feel for an interactive\n * list of kernels and sessions.\n *\n * It is specialized for each based on its props.\n */\nfunction Section(props) {\n    const translator = props.translator || _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_1__.nullTranslator;\n    const trans = translator.load('jupyterlab');\n    const shutdownAllLabel = props.manager.shutdownAllLabel || trans.__('Shut Down All');\n    const shutdownTitle = `${shutdownAllLabel}?`;\n    const shutdownAllConfirmationText = props.manager.shutdownAllConfirmationText ||\n        `${shutdownAllLabel} ${props.manager.name}`;\n    function onShutdown() {\n        void (0,_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.showDialog)({\n            title: shutdownTitle,\n            body: shutdownAllConfirmationText,\n            buttons: [\n                _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Dialog.cancelButton({ label: trans.__('Cancel') }),\n                _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Dialog.warnButton({ label: shutdownAllLabel })\n            ]\n        }).then(result => {\n            if (result.button.accept) {\n                props.manager.shutdownAll();\n            }\n        });\n    }\n    return (react__WEBPACK_IMPORTED_MODULE_5__.createElement(\"div\", { className: SECTION_CLASS },\n        react__WEBPACK_IMPORTED_MODULE_5__.createElement(react__WEBPACK_IMPORTED_MODULE_5__.Fragment, null,\n            react__WEBPACK_IMPORTED_MODULE_5__.createElement(\"div\", { className: `${SECTION_HEADER_CLASS} jp-stack-panel-header` },\n                react__WEBPACK_IMPORTED_MODULE_5__.createElement(\"h2\", null, props.manager.name),\n                react__WEBPACK_IMPORTED_MODULE_5__.createElement(_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.UseSignal, { signal: props.manager.runningChanged }, () => {\n                    const disabled = props.manager.running().length === 0;\n                    return (react__WEBPACK_IMPORTED_MODULE_5__.createElement(\"button\", { className: `${SHUTDOWN_ALL_BUTTON_CLASS} jp-mod-styled ${disabled && 'jp-mod-disabled'}`, disabled: disabled, onClick: onShutdown }, shutdownAllLabel));\n                })),\n            react__WEBPACK_IMPORTED_MODULE_5__.createElement(\"div\", { className: CONTAINER_CLASS },\n                react__WEBPACK_IMPORTED_MODULE_5__.createElement(List, { manager: props.manager, shutdownLabel: props.manager.shutdownLabel, shutdownAllLabel: shutdownAllLabel, translator: props.translator })))));\n}\nfunction RunningSessionsComponent(props) {\n    const translator = props.translator || _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_1__.nullTranslator;\n    const trans = translator.load('jupyterlab');\n    return (react__WEBPACK_IMPORTED_MODULE_5__.createElement(react__WEBPACK_IMPORTED_MODULE_5__.Fragment, null,\n        react__WEBPACK_IMPORTED_MODULE_5__.createElement(\"div\", { className: HEADER_CLASS },\n            react__WEBPACK_IMPORTED_MODULE_5__.createElement(_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.ToolbarButtonComponent, { tooltip: trans.__('Refresh List'), icon: _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.refreshIcon, onClick: () => props.managers.items().forEach(manager => manager.refreshRunning()) })),\n        props.managers.items().map(manager => (react__WEBPACK_IMPORTED_MODULE_5__.createElement(Section, { key: manager.name, manager: manager, translator: props.translator })))));\n}\n/**\n * A class that exposes the running terminal and kernel sessions.\n */\nclass RunningSessions extends _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.ReactWidget {\n    /**\n     * Construct a new running widget.\n     */\n    constructor(managers, translator) {\n        super();\n        this.managers = managers;\n        this.translator = translator || _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_1__.nullTranslator;\n        // this can't be in the react element, because then it would be too nested\n        this.addClass(RUNNING_CLASS);\n    }\n    render() {\n        return (react__WEBPACK_IMPORTED_MODULE_5__.createElement(RunningSessionsComponent, { managers: this.managers, translator: this.translator }));\n    }\n}\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/running/lib/index.js?");

/***/ })

}]);