/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 0); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var showdown__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); /* harmony import */ var showdown__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(showdown__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var showdown_ghost_footnotes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2); /* harmony import */ var showdown_ghost_footnotes__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(showdown_ghost_footnotes__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var showdown_toc__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3); /* harmony import */ var _css_jsNotebook_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4); /* harmony import */ var _css_jsNotebook_scss__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_css_jsNotebook_scss__WEBPACK_IMPORTED_MODULE_3__); /////////////////////////////////////////// // // // jsNotebook shared logic (0-install) // // // /////////////////////////////////////////// //0-install jsNotebook logic //Copyright (c) 2020 djulien //rev history: // 0.20.7 7/15/20 DJ reworked to use Showndown, webpack //catch more bugs debug("loading jsNotebook main logic, doc state:", document.readyState); //NOTE: need import() rather than import ... from syntax; see https://github.com/parcel-bundler/parcel/issues/2358 //"https://unpkg.com/showdown@1.9.1/dist/showdown.min.js"; //const footnotes = require("showdown-ghost-footnotes"); //"https://unpkg.com/showdown-ghost-footnotes@0.0.6/dist/showdown-ghost-footnotes.min.js"; //https://github.com/tivie/showdown-ghost-footnotes //const toc = require("showdown-toc"); //"https://unpkg.com/showdown-toc@1.0.1/dist/index.js"; //https://github.com/tivie/showdown-toc const VER = "0.20.7.D"; //load CSS here so caller doesn't see it: //import "./jsNotebook.css"; //import BkgImage from './rings.png'; //import "./index.html"; //kludge: copy parent HTML file to output const isHTML_re = /^\s*]*>/i; //const str = "abc ghi jkl mno"; //console.log(fixup(str, true)); ////////////////////////////////////////////////////////////////////////////// //// /// Viewer/editor (browser side) // const opts = { omitExtraWLInCodeBlocks: true, //omit trailing newlines in code blocks parseImgDimensions: true, //image dimensions; ex: ![foo](foo.jpg =100x80) // simplifiedAutoLink: true, //enable automatic linking to urls strikethrough: true, //strikethrough syntax. ~~strikethrough~~ tables: true, //tables. Example: | h1 | \n |:------| \n | 100 | tasklists: true, //GFM tasklists; ex: - [x] This simpleLineBreaks: true, //line breaks as
, without 2 spaces at line end backslashEscapesHTMLTags: true, //HTML tag escaping; ex: \
foo\
underline: true, //underline double/triple underscores; ex: __underlined word__. // completeHTMLDocument: true, //output complete , , tags metadata: true, //doc metadata at top of doc between ««« and »»» or --- and --- extensions: [showdown_ghost_footnotes__WEBPACK_IMPORTED_MODULE_1__, Object(showdown_toc__WEBPACK_IMPORTED_MODULE_2__["default"])({ toc: [] })], }; const converter = new showdown__WEBPACK_IMPORTED_MODULE_0__["Converter"](opts); converter.setFlavor('github'); //strike-thru, checklist, etc //can only use "await" inside async function: async function main() { //don't start until deferred script(s) load: console.log("ready state:", document.readyState); if (document.readyState != "complete") if ((document.readyState == "loading") || !document.documentElement.app) await wait4event("DOMContentLoaded"); debug("dom READY(fulfilled)"); const notes = document.getElementById("notes") || document.body; //can be named element or just body notes.isHTML = function() { return this.innerHTML.match(isHTML_re); }; ///^\s*]*>/i); }; notes.md2html = function(force) { if (!force && this.isHTML()) return; this.svtext = this.innerHTML; const html = fixup(converter.makeHtml(fixup(this.innerHTML, false)), true); //.replace(/\[toc\]/gi, "\n$&")) //, pathlib.basename(reqpath, pathlib.extname(reqpath))); // .replace(/\bp>\s*