"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_markedparser-extension_lib_index_js"],{

/***/ "../node_modules/@jupyterlab/markedparser-extension/lib/index.js":
/*!***********************************************************************!*\
  !*** ../node_modules/@jupyterlab/markedparser-extension/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 */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _jupyterlab_codemirror__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/codemirror */ \"webpack/sharing/consume/default/@jupyterlab/codemirror/@jupyterlab/codemirror\");\n/* harmony import */ var _jupyterlab_codemirror__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_codemirror__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _jupyterlab_rendermime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyterlab/rendermime */ \"webpack/sharing/consume/default/@jupyterlab/rendermime/@jupyterlab/rendermime\");\n/* harmony import */ var _jupyterlab_rendermime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_rendermime__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var marked__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! marked */ \"webpack/sharing/consume/default/marked/marked\");\n/* harmony import */ var marked__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(marked__WEBPACK_IMPORTED_MODULE_2__);\n/* -----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|----------------------------------------------------------------------------*/\n/**\n * @packageDocumentation\n * @module markedparser-extension\n */\n\n\n\n/**\n * The markdown parser plugin.\n */\nconst plugin = {\n    id: '@jupyterlab/markedparser-extension:plugin',\n    description: 'Provides the Markdown parser.',\n    autoStart: true,\n    provides: _jupyterlab_rendermime__WEBPACK_IMPORTED_MODULE_1__.IMarkdownParser,\n    requires: [_jupyterlab_codemirror__WEBPACK_IMPORTED_MODULE_0__.IEditorLanguageRegistry],\n    activate: (app, languages) => {\n        Private.initializeMarked(languages);\n        return {\n            render: (content) => new Promise((resolve, reject) => {\n                (0,marked__WEBPACK_IMPORTED_MODULE_2__.marked)(content, (err, content) => {\n                    if (err) {\n                        reject(err);\n                    }\n                    else {\n                        resolve(content);\n                    }\n                });\n            })\n        };\n    }\n};\n/**\n * Export the plugin as default.\n */\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (plugin);\nvar Private;\n(function (Private) {\n    let markedInitialized = false;\n    function initializeMarked(languages) {\n        if (markedInitialized) {\n            return;\n        }\n        else {\n            markedInitialized = true;\n        }\n        marked__WEBPACK_IMPORTED_MODULE_2__.marked.setOptions({\n            gfm: true,\n            sanitize: false,\n            // breaks: true; We can't use GFM breaks as it causes problems with tables\n            langPrefix: `language-`,\n            highlight: (code, lang, callback) => {\n                const cb = (err, code) => {\n                    if (callback) {\n                        callback(err, code);\n                    }\n                    return code;\n                };\n                if (!lang) {\n                    // no language, no highlight\n                    return cb(null, code);\n                }\n                const el = document.createElement('div');\n                try {\n                    languages\n                        .highlight(code, languages.findBest(lang), el)\n                        .then(() => {\n                        return cb(null, el.innerHTML);\n                    })\n                        .catch(reason => {\n                        return cb(reason, code);\n                    });\n                }\n                catch (err) {\n                    console.error(`Failed to highlight ${lang} code`, err);\n                    return cb(err, code);\n                }\n            }\n        });\n    }\n    Private.initializeMarked = initializeMarked;\n})(Private || (Private = {}));\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/markedparser-extension/lib/index.js?");

/***/ })

}]);