diff --git a/prose/dist/prose.bundle.js b/prose/dist/prose.bundle.js index 0a7eef6..448defa 100644 --- a/prose/dist/prose.bundle.js +++ b/prose/dist/prose.bundle.js @@ -1,1147 +1,2 @@ -/******/ (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 = "./prose.js"); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ "./node_modules/crel/crel.es.js": -/*!**************************************!*\ - !*** ./node_modules/crel/crel.es.js ***! - \**************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction createCommonjsModule(fn, module) {\n return module = {\n exports: {}\n }, fn(module, module.exports), module.exports;\n}\n\nvar crel = createCommonjsModule(function (module, exports) {\n /* Copyright (C) 2012 Kory Nunn\r\n Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\r\n The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\r\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n \r\n NOTE:\r\n This code is formatted for run-speed and to assist compilers.\r\n This might make it harder to read at times, but the code's intention should be transparent. */\n // IIFE our function\n (function (exporter) {\n // Define our function and its properties\n // These strings are used multiple times, so this makes things smaller once compiled\n var func = 'function',\n isNodeString = 'isNode',\n // Helper functions used throughout the script\n isType = function isType(object, type) {\n return _typeof(object) === type;\n },\n // Recursively appends children to given element. As a text node if not already an element\n appendChild = function appendChild(element, child) {\n if (child !== null) {\n if (Array.isArray(child)) {\n // Support (deeply) nested child elements\n child.map(function (subChild) {\n return appendChild(element, subChild);\n });\n } else {\n if (!crel[isNodeString](child)) {\n child = document.createTextNode(child);\n }\n\n element.appendChild(child);\n }\n }\n }; //\n\n\n function crel(element, settings) {\n // Define all used variables / shortcuts here, to make things smaller once compiled\n var args = arguments,\n // Note: assigned to a variable to assist compilers.\n index = 1,\n key,\n attribute; // If first argument is an element, use it as is, otherwise treat it as a tagname\n\n element = crel.isElement(element) ? element : document.createElement(element); // Check if second argument is a settings object\n\n if (isType(settings, 'object') && !crel[isNodeString](settings) && !Array.isArray(settings)) {\n // Don't treat settings as a child\n index++; // Go through settings / attributes object, if it exists\n\n for (key in settings) {\n // Store the attribute into a variable, before we potentially modify the key\n attribute = settings[key]; // Get mapped key / function, if one exists\n\n key = crel.attrMap[key] || key; // Note: We want to prioritise mapping over properties\n\n if (isType(key, func)) {\n key(element, attribute);\n } else if (isType(attribute, func)) {\n // ex. onClick property\n element[key] = attribute;\n } else {\n // Set the element attribute\n element.setAttribute(key, attribute);\n }\n }\n } // Loop through all arguments, if any, and append them to our element if they're not `null`\n\n\n for (; index < args.length; index++) {\n appendChild(element, args[index]);\n }\n\n return element;\n } // Used for mapping attribute keys to supported versions in bad browsers, or to custom functionality\n\n\n crel.attrMap = {};\n\n crel.isElement = function (object) {\n return object instanceof Element;\n };\n\n crel[isNodeString] = function (node) {\n return node instanceof Node;\n }; // Expose proxy interface\n\n\n crel.proxy = new Proxy(crel, {\n get: function get(target, key) {\n !(key in crel) && (crel[key] = crel.bind(null, key));\n return crel[key];\n }\n }); // Export crel\n\n exporter(crel, func);\n })(function (product, func) {\n {\n // Export for Browserify / CommonJS format\n module.exports = product;\n }\n });\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (crel);\n\n//# sourceURL=webpack:///./node_modules/crel/crel.es.js?"); - -/***/ }), - -/***/ "./node_modules/entities/lib/maps/entities.json": -/*!******************************************************!*\ - !*** ./node_modules/entities/lib/maps/entities.json ***! - \******************************************************/ -/*! exports provided: Aacute, aacute, Abreve, abreve, ac, acd, acE, Acirc, acirc, acute, Acy, acy, AElig, aelig, af, Afr, afr, Agrave, agrave, alefsym, aleph, Alpha, alpha, Amacr, amacr, amalg, amp, AMP, andand, And, and, andd, andslope, andv, ang, ange, angle, angmsdaa, angmsdab, angmsdac, angmsdad, angmsdae, angmsdaf, angmsdag, angmsdah, angmsd, angrt, angrtvb, angrtvbd, angsph, angst, angzarr, Aogon, aogon, Aopf, aopf, apacir, ap, apE, ape, apid, apos, ApplyFunction, approx, approxeq, Aring, aring, Ascr, ascr, Assign, ast, asymp, asympeq, Atilde, atilde, Auml, auml, awconint, awint, backcong, backepsilon, backprime, backsim, backsimeq, Backslash, Barv, barvee, barwed, Barwed, barwedge, bbrk, bbrktbrk, bcong, Bcy, bcy, bdquo, becaus, because, Because, bemptyv, bepsi, bernou, Bernoullis, Beta, beta, beth, between, Bfr, bfr, bigcap, bigcirc, bigcup, bigodot, bigoplus, bigotimes, bigsqcup, bigstar, bigtriangledown, bigtriangleup, biguplus, bigvee, bigwedge, bkarow, blacklozenge, blacksquare, blacktriangle, blacktriangledown, blacktriangleleft, blacktriangleright, blank, blk12, blk14, blk34, block, bne, bnequiv, bNot, bnot, Bopf, bopf, bot, bottom, bowtie, boxbox, boxdl, boxdL, boxDl, boxDL, boxdr, boxdR, boxDr, boxDR, boxh, boxH, boxhd, boxHd, boxhD, boxHD, boxhu, boxHu, boxhU, boxHU, boxminus, boxplus, boxtimes, boxul, boxuL, boxUl, boxUL, boxur, boxuR, boxUr, boxUR, boxv, boxV, boxvh, boxvH, boxVh, boxVH, boxvl, boxvL, boxVl, boxVL, boxvr, boxvR, boxVr, boxVR, bprime, breve, Breve, brvbar, bscr, Bscr, bsemi, bsim, bsime, bsolb, bsol, bsolhsub, bull, bullet, bump, bumpE, bumpe, Bumpeq, bumpeq, Cacute, cacute, capand, capbrcup, capcap, cap, Cap, capcup, capdot, CapitalDifferentialD, caps, caret, caron, Cayleys, ccaps, Ccaron, ccaron, Ccedil, ccedil, Ccirc, ccirc, Cconint, ccups, ccupssm, Cdot, cdot, cedil, Cedilla, cemptyv, cent, centerdot, CenterDot, cfr, Cfr, CHcy, chcy, check, checkmark, Chi, chi, circ, circeq, circlearrowleft, circlearrowright, circledast, circledcirc, circleddash, CircleDot, circledR, circledS, CircleMinus, CirclePlus, CircleTimes, cir, cirE, cire, cirfnint, cirmid, cirscir, ClockwiseContourIntegral, CloseCurlyDoubleQuote, CloseCurlyQuote, clubs, clubsuit, colon, Colon, Colone, colone, coloneq, comma, commat, comp, compfn, complement, complexes, cong, congdot, Congruent, conint, Conint, ContourIntegral, copf, Copf, coprod, Coproduct, copy, COPY, copysr, CounterClockwiseContourIntegral, crarr, cross, Cross, Cscr, cscr, csub, csube, csup, csupe, ctdot, cudarrl, cudarrr, cuepr, cuesc, cularr, cularrp, cupbrcap, cupcap, CupCap, cup, Cup, cupcup, cupdot, cupor, cups, curarr, curarrm, curlyeqprec, curlyeqsucc, curlyvee, curlywedge, curren, curvearrowleft, curvearrowright, cuvee, cuwed, cwconint, cwint, cylcty, dagger, Dagger, daleth, darr, Darr, dArr, dash, Dashv, dashv, dbkarow, dblac, Dcaron, dcaron, Dcy, dcy, ddagger, ddarr, DD, dd, DDotrahd, ddotseq, deg, Del, Delta, delta, demptyv, dfisht, Dfr, dfr, dHar, dharl, dharr, DiacriticalAcute, DiacriticalDot, DiacriticalDoubleAcute, DiacriticalGrave, DiacriticalTilde, diam, diamond, Diamond, diamondsuit, diams, die, DifferentialD, digamma, disin, div, divide, divideontimes, divonx, DJcy, djcy, dlcorn, dlcrop, dollar, Dopf, dopf, Dot, dot, DotDot, doteq, doteqdot, DotEqual, dotminus, dotplus, dotsquare, doublebarwedge, DoubleContourIntegral, DoubleDot, DoubleDownArrow, DoubleLeftArrow, DoubleLeftRightArrow, DoubleLeftTee, DoubleLongLeftArrow, DoubleLongLeftRightArrow, DoubleLongRightArrow, DoubleRightArrow, DoubleRightTee, DoubleUpArrow, DoubleUpDownArrow, DoubleVerticalBar, DownArrowBar, downarrow, DownArrow, Downarrow, DownArrowUpArrow, DownBreve, downdownarrows, downharpoonleft, downharpoonright, DownLeftRightVector, DownLeftTeeVector, DownLeftVectorBar, DownLeftVector, DownRightTeeVector, DownRightVectorBar, DownRightVector, DownTeeArrow, DownTee, drbkarow, drcorn, drcrop, Dscr, dscr, DScy, dscy, dsol, Dstrok, dstrok, dtdot, dtri, dtrif, duarr, duhar, dwangle, DZcy, dzcy, dzigrarr, Eacute, eacute, easter, Ecaron, ecaron, Ecirc, ecirc, ecir, ecolon, Ecy, ecy, eDDot, Edot, edot, eDot, ee, efDot, Efr, efr, eg, Egrave, egrave, egs, egsdot, el, Element, elinters, ell, els, elsdot, Emacr, emacr, empty, emptyset, EmptySmallSquare, emptyv, EmptyVerySmallSquare, emsp13, emsp14, emsp, ENG, eng, ensp, Eogon, eogon, Eopf, eopf, epar, eparsl, eplus, epsi, Epsilon, epsilon, epsiv, eqcirc, eqcolon, eqsim, eqslantgtr, eqslantless, Equal, equals, EqualTilde, equest, Equilibrium, equiv, equivDD, eqvparsl, erarr, erDot, escr, Escr, esdot, Esim, esim, Eta, eta, ETH, eth, Euml, euml, euro, excl, exist, Exists, expectation, exponentiale, ExponentialE, fallingdotseq, Fcy, fcy, female, ffilig, fflig, ffllig, Ffr, ffr, filig, FilledSmallSquare, FilledVerySmallSquare, fjlig, flat, fllig, fltns, fnof, Fopf, fopf, forall, ForAll, fork, forkv, Fouriertrf, fpartint, frac12, frac13, frac14, frac15, frac16, frac18, frac23, frac25, frac34, frac35, frac38, frac45, frac56, frac58, frac78, frasl, frown, fscr, Fscr, gacute, Gamma, gamma, Gammad, gammad, gap, Gbreve, gbreve, Gcedil, Gcirc, gcirc, Gcy, gcy, Gdot, gdot, ge, gE, gEl, gel, geq, geqq, geqslant, gescc, ges, gesdot, gesdoto, gesdotol, gesl, gesles, Gfr, gfr, gg, Gg, ggg, gimel, GJcy, gjcy, gla, gl, glE, glj, gnap, gnapprox, gne, gnE, gneq, gneqq, gnsim, Gopf, gopf, grave, GreaterEqual, GreaterEqualLess, GreaterFullEqual, GreaterGreater, GreaterLess, GreaterSlantEqual, GreaterTilde, Gscr, gscr, gsim, gsime, gsiml, gtcc, gtcir, gt, GT, Gt, gtdot, gtlPar, gtquest, gtrapprox, gtrarr, gtrdot, gtreqless, gtreqqless, gtrless, gtrsim, gvertneqq, gvnE, Hacek, hairsp, half, hamilt, HARDcy, hardcy, harrcir, harr, hArr, harrw, Hat, hbar, Hcirc, hcirc, hearts, heartsuit, hellip, hercon, hfr, Hfr, HilbertSpace, hksearow, hkswarow, hoarr, homtht, hookleftarrow, hookrightarrow, hopf, Hopf, horbar, HorizontalLine, hscr, Hscr, hslash, Hstrok, hstrok, HumpDownHump, HumpEqual, hybull, hyphen, Iacute, iacute, ic, Icirc, icirc, Icy, icy, Idot, IEcy, iecy, iexcl, iff, ifr, Ifr, Igrave, igrave, ii, iiiint, iiint, iinfin, iiota, IJlig, ijlig, Imacr, imacr, image, ImaginaryI, imagline, imagpart, imath, Im, imof, imped, Implies, incare, in, infin, infintie, inodot, intcal, int, Int, integers, Integral, intercal, Intersection, intlarhk, intprod, InvisibleComma, InvisibleTimes, IOcy, iocy, Iogon, iogon, Iopf, iopf, Iota, iota, iprod, iquest, iscr, Iscr, isin, isindot, isinE, isins, isinsv, isinv, it, Itilde, itilde, Iukcy, iukcy, Iuml, iuml, Jcirc, jcirc, Jcy, jcy, Jfr, jfr, jmath, Jopf, jopf, Jscr, jscr, Jsercy, jsercy, Jukcy, jukcy, Kappa, kappa, kappav, Kcedil, kcedil, Kcy, kcy, Kfr, kfr, kgreen, KHcy, khcy, KJcy, kjcy, Kopf, kopf, Kscr, kscr, lAarr, Lacute, lacute, laemptyv, lagran, Lambda, lambda, lang, Lang, langd, langle, lap, Laplacetrf, laquo, larrb, larrbfs, larr, Larr, lArr, larrfs, larrhk, larrlp, larrpl, larrsim, larrtl, latail, lAtail, lat, late, lates, lbarr, lBarr, lbbrk, lbrace, lbrack, lbrke, lbrksld, lbrkslu, Lcaron, lcaron, Lcedil, lcedil, lceil, lcub, Lcy, lcy, ldca, ldquo, ldquor, ldrdhar, ldrushar, ldsh, le, lE, LeftAngleBracket, LeftArrowBar, leftarrow, LeftArrow, Leftarrow, LeftArrowRightArrow, leftarrowtail, LeftCeiling, LeftDoubleBracket, LeftDownTeeVector, LeftDownVectorBar, LeftDownVector, LeftFloor, leftharpoondown, leftharpoonup, leftleftarrows, leftrightarrow, LeftRightArrow, Leftrightarrow, leftrightarrows, leftrightharpoons, leftrightsquigarrow, LeftRightVector, LeftTeeArrow, LeftTee, LeftTeeVector, leftthreetimes, LeftTriangleBar, LeftTriangle, LeftTriangleEqual, LeftUpDownVector, LeftUpTeeVector, LeftUpVectorBar, LeftUpVector, LeftVectorBar, LeftVector, lEg, leg, leq, leqq, leqslant, lescc, les, lesdot, lesdoto, lesdotor, lesg, lesges, lessapprox, lessdot, lesseqgtr, lesseqqgtr, LessEqualGreater, LessFullEqual, LessGreater, lessgtr, LessLess, lesssim, LessSlantEqual, LessTilde, lfisht, lfloor, Lfr, lfr, lg, lgE, lHar, lhard, lharu, lharul, lhblk, LJcy, ljcy, llarr, ll, Ll, llcorner, Lleftarrow, llhard, lltri, Lmidot, lmidot, lmoustache, lmoust, lnap, lnapprox, lne, lnE, lneq, lneqq, lnsim, loang, loarr, lobrk, longleftarrow, LongLeftArrow, Longleftarrow, longleftrightarrow, LongLeftRightArrow, Longleftrightarrow, longmapsto, longrightarrow, LongRightArrow, Longrightarrow, looparrowleft, looparrowright, lopar, Lopf, lopf, loplus, lotimes, lowast, lowbar, LowerLeftArrow, LowerRightArrow, loz, lozenge, lozf, lpar, lparlt, lrarr, lrcorner, lrhar, lrhard, lrm, lrtri, lsaquo, lscr, Lscr, lsh, Lsh, lsim, lsime, lsimg, lsqb, lsquo, lsquor, Lstrok, lstrok, ltcc, ltcir, lt, LT, Lt, ltdot, lthree, ltimes, ltlarr, ltquest, ltri, ltrie, ltrif, ltrPar, lurdshar, luruhar, lvertneqq, lvnE, macr, male, malt, maltese, Map, map, mapsto, mapstodown, mapstoleft, mapstoup, marker, mcomma, Mcy, mcy, mdash, mDDot, measuredangle, MediumSpace, Mellintrf, Mfr, mfr, mho, micro, midast, midcir, mid, middot, minusb, minus, minusd, minusdu, MinusPlus, mlcp, mldr, mnplus, models, Mopf, mopf, mp, mscr, Mscr, mstpos, Mu, mu, multimap, mumap, nabla, Nacute, nacute, nang, nap, napE, napid, napos, napprox, natural, naturals, natur, nbsp, nbump, nbumpe, ncap, Ncaron, ncaron, Ncedil, ncedil, ncong, ncongdot, ncup, Ncy, ncy, ndash, nearhk, nearr, neArr, nearrow, ne, nedot, NegativeMediumSpace, NegativeThickSpace, NegativeThinSpace, NegativeVeryThinSpace, nequiv, nesear, nesim, NestedGreaterGreater, NestedLessLess, NewLine, nexist, nexists, Nfr, nfr, ngE, nge, ngeq, ngeqq, ngeqslant, nges, nGg, ngsim, nGt, ngt, ngtr, nGtv, nharr, nhArr, nhpar, ni, nis, nisd, niv, NJcy, njcy, nlarr, nlArr, nldr, nlE, nle, nleftarrow, nLeftarrow, nleftrightarrow, nLeftrightarrow, nleq, nleqq, nleqslant, nles, nless, nLl, nlsim, nLt, nlt, nltri, nltrie, nLtv, nmid, NoBreak, NonBreakingSpace, nopf, Nopf, Not, not, NotCongruent, NotCupCap, NotDoubleVerticalBar, NotElement, NotEqual, NotEqualTilde, NotExists, NotGreater, NotGreaterEqual, NotGreaterFullEqual, NotGreaterGreater, NotGreaterLess, NotGreaterSlantEqual, NotGreaterTilde, NotHumpDownHump, NotHumpEqual, notin, notindot, notinE, notinva, notinvb, notinvc, NotLeftTriangleBar, NotLeftTriangle, NotLeftTriangleEqual, NotLess, NotLessEqual, NotLessGreater, NotLessLess, NotLessSlantEqual, NotLessTilde, NotNestedGreaterGreater, NotNestedLessLess, notni, notniva, notnivb, notnivc, NotPrecedes, NotPrecedesEqual, NotPrecedesSlantEqual, NotReverseElement, NotRightTriangleBar, NotRightTriangle, NotRightTriangleEqual, NotSquareSubset, NotSquareSubsetEqual, NotSquareSuperset, NotSquareSupersetEqual, NotSubset, NotSubsetEqual, NotSucceeds, NotSucceedsEqual, NotSucceedsSlantEqual, NotSucceedsTilde, NotSuperset, NotSupersetEqual, NotTilde, NotTildeEqual, NotTildeFullEqual, NotTildeTilde, NotVerticalBar, nparallel, npar, nparsl, npart, npolint, npr, nprcue, nprec, npreceq, npre, nrarrc, nrarr, nrArr, nrarrw, nrightarrow, nRightarrow, nrtri, nrtrie, nsc, nsccue, nsce, Nscr, nscr, nshortmid, nshortparallel, nsim, nsime, nsimeq, nsmid, nspar, nsqsube, nsqsupe, nsub, nsubE, nsube, nsubset, nsubseteq, nsubseteqq, nsucc, nsucceq, nsup, nsupE, nsupe, nsupset, nsupseteq, nsupseteqq, ntgl, Ntilde, ntilde, ntlg, ntriangleleft, ntrianglelefteq, ntriangleright, ntrianglerighteq, Nu, nu, num, numero, numsp, nvap, nvdash, nvDash, nVdash, nVDash, nvge, nvgt, nvHarr, nvinfin, nvlArr, nvle, nvlt, nvltrie, nvrArr, nvrtrie, nvsim, nwarhk, nwarr, nwArr, nwarrow, nwnear, Oacute, oacute, oast, Ocirc, ocirc, ocir, Ocy, ocy, odash, Odblac, odblac, odiv, odot, odsold, OElig, oelig, ofcir, Ofr, ofr, ogon, Ograve, ograve, ogt, ohbar, ohm, oint, olarr, olcir, olcross, oline, olt, Omacr, omacr, Omega, omega, Omicron, omicron, omid, ominus, Oopf, oopf, opar, OpenCurlyDoubleQuote, OpenCurlyQuote, operp, oplus, orarr, Or, or, ord, order, orderof, ordf, ordm, origof, oror, orslope, orv, oS, Oscr, oscr, Oslash, oslash, osol, Otilde, otilde, otimesas, Otimes, otimes, Ouml, ouml, ovbar, OverBar, OverBrace, OverBracket, OverParenthesis, para, parallel, par, parsim, parsl, part, PartialD, Pcy, pcy, percnt, period, permil, perp, pertenk, Pfr, pfr, Phi, phi, phiv, phmmat, phone, Pi, pi, pitchfork, piv, planck, planckh, plankv, plusacir, plusb, pluscir, plus, plusdo, plusdu, pluse, PlusMinus, plusmn, plussim, plustwo, pm, Poincareplane, pointint, popf, Popf, pound, prap, Pr, pr, prcue, precapprox, prec, preccurlyeq, Precedes, PrecedesEqual, PrecedesSlantEqual, PrecedesTilde, preceq, precnapprox, precneqq, precnsim, pre, prE, precsim, prime, Prime, primes, prnap, prnE, prnsim, prod, Product, profalar, profline, profsurf, prop, Proportional, Proportion, propto, prsim, prurel, Pscr, pscr, Psi, psi, puncsp, Qfr, qfr, qint, qopf, Qopf, qprime, Qscr, qscr, quaternions, quatint, quest, questeq, quot, QUOT, rAarr, race, Racute, racute, radic, raemptyv, rang, Rang, rangd, range, rangle, raquo, rarrap, rarrb, rarrbfs, rarrc, rarr, Rarr, rArr, rarrfs, rarrhk, rarrlp, rarrpl, rarrsim, Rarrtl, rarrtl, rarrw, ratail, rAtail, ratio, rationals, rbarr, rBarr, RBarr, rbbrk, rbrace, rbrack, rbrke, rbrksld, rbrkslu, Rcaron, rcaron, Rcedil, rcedil, rceil, rcub, Rcy, rcy, rdca, rdldhar, rdquo, rdquor, rdsh, real, realine, realpart, reals, Re, rect, reg, REG, ReverseElement, ReverseEquilibrium, ReverseUpEquilibrium, rfisht, rfloor, rfr, Rfr, rHar, rhard, rharu, rharul, Rho, rho, rhov, RightAngleBracket, RightArrowBar, rightarrow, RightArrow, Rightarrow, RightArrowLeftArrow, rightarrowtail, RightCeiling, RightDoubleBracket, RightDownTeeVector, RightDownVectorBar, RightDownVector, RightFloor, rightharpoondown, rightharpoonup, rightleftarrows, rightleftharpoons, rightrightarrows, rightsquigarrow, RightTeeArrow, RightTee, RightTeeVector, rightthreetimes, RightTriangleBar, RightTriangle, RightTriangleEqual, RightUpDownVector, RightUpTeeVector, RightUpVectorBar, RightUpVector, RightVectorBar, RightVector, ring, risingdotseq, rlarr, rlhar, rlm, rmoustache, rmoust, rnmid, roang, roarr, robrk, ropar, ropf, Ropf, roplus, rotimes, RoundImplies, rpar, rpargt, rppolint, rrarr, Rrightarrow, rsaquo, rscr, Rscr, rsh, Rsh, rsqb, rsquo, rsquor, rthree, rtimes, rtri, rtrie, rtrif, rtriltri, RuleDelayed, ruluhar, rx, Sacute, sacute, sbquo, scap, Scaron, scaron, Sc, sc, sccue, sce, scE, Scedil, scedil, Scirc, scirc, scnap, scnE, scnsim, scpolint, scsim, Scy, scy, sdotb, sdot, sdote, searhk, searr, seArr, searrow, sect, semi, seswar, setminus, setmn, sext, Sfr, sfr, sfrown, sharp, SHCHcy, shchcy, SHcy, shcy, ShortDownArrow, ShortLeftArrow, shortmid, shortparallel, ShortRightArrow, ShortUpArrow, shy, Sigma, sigma, sigmaf, sigmav, sim, simdot, sime, simeq, simg, simgE, siml, simlE, simne, simplus, simrarr, slarr, SmallCircle, smallsetminus, smashp, smeparsl, smid, smile, smt, smte, smtes, SOFTcy, softcy, solbar, solb, sol, Sopf, sopf, spades, spadesuit, spar, sqcap, sqcaps, sqcup, sqcups, Sqrt, sqsub, sqsube, sqsubset, sqsubseteq, sqsup, sqsupe, sqsupset, sqsupseteq, square, Square, SquareIntersection, SquareSubset, SquareSubsetEqual, SquareSuperset, SquareSupersetEqual, SquareUnion, squarf, squ, squf, srarr, Sscr, sscr, ssetmn, ssmile, sstarf, Star, star, starf, straightepsilon, straightphi, strns, sub, Sub, subdot, subE, sube, subedot, submult, subnE, subne, subplus, subrarr, subset, Subset, subseteq, subseteqq, SubsetEqual, subsetneq, subsetneqq, subsim, subsub, subsup, succapprox, succ, succcurlyeq, Succeeds, SucceedsEqual, SucceedsSlantEqual, SucceedsTilde, succeq, succnapprox, succneqq, succnsim, succsim, SuchThat, sum, Sum, sung, sup1, sup2, sup3, sup, Sup, supdot, supdsub, supE, supe, supedot, Superset, SupersetEqual, suphsol, suphsub, suplarr, supmult, supnE, supne, supplus, supset, Supset, supseteq, supseteqq, supsetneq, supsetneqq, supsim, supsub, supsup, swarhk, swarr, swArr, swarrow, swnwar, szlig, Tab, target, Tau, tau, tbrk, Tcaron, tcaron, Tcedil, tcedil, Tcy, tcy, tdot, telrec, Tfr, tfr, there4, therefore, Therefore, Theta, theta, thetasym, thetav, thickapprox, thicksim, ThickSpace, ThinSpace, thinsp, thkap, thksim, THORN, thorn, tilde, Tilde, TildeEqual, TildeFullEqual, TildeTilde, timesbar, timesb, times, timesd, tint, toea, topbot, topcir, top, Topf, topf, topfork, tosa, tprime, trade, TRADE, triangle, triangledown, triangleleft, trianglelefteq, triangleq, triangleright, trianglerighteq, tridot, trie, triminus, TripleDot, triplus, trisb, tritime, trpezium, Tscr, tscr, TScy, tscy, TSHcy, tshcy, Tstrok, tstrok, twixt, twoheadleftarrow, twoheadrightarrow, Uacute, uacute, uarr, Uarr, uArr, Uarrocir, Ubrcy, ubrcy, Ubreve, ubreve, Ucirc, ucirc, Ucy, ucy, udarr, Udblac, udblac, udhar, ufisht, Ufr, ufr, Ugrave, ugrave, uHar, uharl, uharr, uhblk, ulcorn, ulcorner, ulcrop, ultri, Umacr, umacr, uml, UnderBar, UnderBrace, UnderBracket, UnderParenthesis, Union, UnionPlus, Uogon, uogon, Uopf, uopf, UpArrowBar, uparrow, UpArrow, Uparrow, UpArrowDownArrow, updownarrow, UpDownArrow, Updownarrow, UpEquilibrium, upharpoonleft, upharpoonright, uplus, UpperLeftArrow, UpperRightArrow, upsi, Upsi, upsih, Upsilon, upsilon, UpTeeArrow, UpTee, upuparrows, urcorn, urcorner, urcrop, Uring, uring, urtri, Uscr, uscr, utdot, Utilde, utilde, utri, utrif, uuarr, Uuml, uuml, uwangle, vangrt, varepsilon, varkappa, varnothing, varphi, varpi, varpropto, varr, vArr, varrho, varsigma, varsubsetneq, varsubsetneqq, varsupsetneq, varsupsetneqq, vartheta, vartriangleleft, vartriangleright, vBar, Vbar, vBarv, Vcy, vcy, vdash, vDash, Vdash, VDash, Vdashl, veebar, vee, Vee, veeeq, vellip, verbar, Verbar, vert, Vert, VerticalBar, VerticalLine, VerticalSeparator, VerticalTilde, VeryThinSpace, Vfr, vfr, vltri, vnsub, vnsup, Vopf, vopf, vprop, vrtri, Vscr, vscr, vsubnE, vsubne, vsupnE, vsupne, Vvdash, vzigzag, Wcirc, wcirc, wedbar, wedge, Wedge, wedgeq, weierp, Wfr, wfr, Wopf, wopf, wp, wr, wreath, Wscr, wscr, xcap, xcirc, xcup, xdtri, Xfr, xfr, xharr, xhArr, Xi, xi, xlarr, xlArr, xmap, xnis, xodot, Xopf, xopf, xoplus, xotime, xrarr, xrArr, Xscr, xscr, xsqcup, xuplus, xutri, xvee, xwedge, Yacute, yacute, YAcy, yacy, Ycirc, ycirc, Ycy, ycy, yen, Yfr, yfr, YIcy, yicy, Yopf, yopf, Yscr, yscr, YUcy, yucy, yuml, Yuml, Zacute, zacute, Zcaron, zcaron, Zcy, zcy, Zdot, zdot, zeetrf, ZeroWidthSpace, Zeta, zeta, zfr, Zfr, ZHcy, zhcy, zigrarr, zopf, Zopf, Zscr, zscr, zwj, zwnj, default */ -/***/ (function(module) { - -eval("module.exports = JSON.parse(\"{\\\"Aacute\\\":\\\"Á\\\",\\\"aacute\\\":\\\"á\\\",\\\"Abreve\\\":\\\"Ă\\\",\\\"abreve\\\":\\\"ă\\\",\\\"ac\\\":\\\"∾\\\",\\\"acd\\\":\\\"∿\\\",\\\"acE\\\":\\\"∾̳\\\",\\\"Acirc\\\":\\\"Â\\\",\\\"acirc\\\":\\\"â\\\",\\\"acute\\\":\\\"´\\\",\\\"Acy\\\":\\\"А\\\",\\\"acy\\\":\\\"а\\\",\\\"AElig\\\":\\\"Æ\\\",\\\"aelig\\\":\\\"æ\\\",\\\"af\\\":\\\"⁡\\\",\\\"Afr\\\":\\\"𝔄\\\",\\\"afr\\\":\\\"𝔞\\\",\\\"Agrave\\\":\\\"À\\\",\\\"agrave\\\":\\\"à\\\",\\\"alefsym\\\":\\\"ℵ\\\",\\\"aleph\\\":\\\"ℵ\\\",\\\"Alpha\\\":\\\"Α\\\",\\\"alpha\\\":\\\"α\\\",\\\"Amacr\\\":\\\"Ā\\\",\\\"amacr\\\":\\\"ā\\\",\\\"amalg\\\":\\\"⨿\\\",\\\"amp\\\":\\\"&\\\",\\\"AMP\\\":\\\"&\\\",\\\"andand\\\":\\\"⩕\\\",\\\"And\\\":\\\"⩓\\\",\\\"and\\\":\\\"∧\\\",\\\"andd\\\":\\\"⩜\\\",\\\"andslope\\\":\\\"⩘\\\",\\\"andv\\\":\\\"⩚\\\",\\\"ang\\\":\\\"∠\\\",\\\"ange\\\":\\\"⦤\\\",\\\"angle\\\":\\\"∠\\\",\\\"angmsdaa\\\":\\\"⦨\\\",\\\"angmsdab\\\":\\\"⦩\\\",\\\"angmsdac\\\":\\\"⦪\\\",\\\"angmsdad\\\":\\\"⦫\\\",\\\"angmsdae\\\":\\\"⦬\\\",\\\"angmsdaf\\\":\\\"⦭\\\",\\\"angmsdag\\\":\\\"⦮\\\",\\\"angmsdah\\\":\\\"⦯\\\",\\\"angmsd\\\":\\\"∡\\\",\\\"angrt\\\":\\\"∟\\\",\\\"angrtvb\\\":\\\"⊾\\\",\\\"angrtvbd\\\":\\\"⦝\\\",\\\"angsph\\\":\\\"∢\\\",\\\"angst\\\":\\\"Å\\\",\\\"angzarr\\\":\\\"⍼\\\",\\\"Aogon\\\":\\\"Ą\\\",\\\"aogon\\\":\\\"ą\\\",\\\"Aopf\\\":\\\"𝔸\\\",\\\"aopf\\\":\\\"𝕒\\\",\\\"apacir\\\":\\\"⩯\\\",\\\"ap\\\":\\\"≈\\\",\\\"apE\\\":\\\"⩰\\\",\\\"ape\\\":\\\"≊\\\",\\\"apid\\\":\\\"≋\\\",\\\"apos\\\":\\\"'\\\",\\\"ApplyFunction\\\":\\\"⁡\\\",\\\"approx\\\":\\\"≈\\\",\\\"approxeq\\\":\\\"≊\\\",\\\"Aring\\\":\\\"Å\\\",\\\"aring\\\":\\\"å\\\",\\\"Ascr\\\":\\\"𝒜\\\",\\\"ascr\\\":\\\"𝒶\\\",\\\"Assign\\\":\\\"≔\\\",\\\"ast\\\":\\\"*\\\",\\\"asymp\\\":\\\"≈\\\",\\\"asympeq\\\":\\\"≍\\\",\\\"Atilde\\\":\\\"Ã\\\",\\\"atilde\\\":\\\"ã\\\",\\\"Auml\\\":\\\"Ä\\\",\\\"auml\\\":\\\"ä\\\",\\\"awconint\\\":\\\"∳\\\",\\\"awint\\\":\\\"⨑\\\",\\\"backcong\\\":\\\"≌\\\",\\\"backepsilon\\\":\\\"϶\\\",\\\"backprime\\\":\\\"‵\\\",\\\"backsim\\\":\\\"∽\\\",\\\"backsimeq\\\":\\\"⋍\\\",\\\"Backslash\\\":\\\"∖\\\",\\\"Barv\\\":\\\"⫧\\\",\\\"barvee\\\":\\\"⊽\\\",\\\"barwed\\\":\\\"⌅\\\",\\\"Barwed\\\":\\\"⌆\\\",\\\"barwedge\\\":\\\"⌅\\\",\\\"bbrk\\\":\\\"⎵\\\",\\\"bbrktbrk\\\":\\\"⎶\\\",\\\"bcong\\\":\\\"≌\\\",\\\"Bcy\\\":\\\"Б\\\",\\\"bcy\\\":\\\"б\\\",\\\"bdquo\\\":\\\"„\\\",\\\"becaus\\\":\\\"∵\\\",\\\"because\\\":\\\"∵\\\",\\\"Because\\\":\\\"∵\\\",\\\"bemptyv\\\":\\\"⦰\\\",\\\"bepsi\\\":\\\"϶\\\",\\\"bernou\\\":\\\"ℬ\\\",\\\"Bernoullis\\\":\\\"ℬ\\\",\\\"Beta\\\":\\\"Β\\\",\\\"beta\\\":\\\"β\\\",\\\"beth\\\":\\\"ℶ\\\",\\\"between\\\":\\\"≬\\\",\\\"Bfr\\\":\\\"𝔅\\\",\\\"bfr\\\":\\\"𝔟\\\",\\\"bigcap\\\":\\\"⋂\\\",\\\"bigcirc\\\":\\\"◯\\\",\\\"bigcup\\\":\\\"⋃\\\",\\\"bigodot\\\":\\\"⨀\\\",\\\"bigoplus\\\":\\\"⨁\\\",\\\"bigotimes\\\":\\\"⨂\\\",\\\"bigsqcup\\\":\\\"⨆\\\",\\\"bigstar\\\":\\\"★\\\",\\\"bigtriangledown\\\":\\\"▽\\\",\\\"bigtriangleup\\\":\\\"△\\\",\\\"biguplus\\\":\\\"⨄\\\",\\\"bigvee\\\":\\\"⋁\\\",\\\"bigwedge\\\":\\\"⋀\\\",\\\"bkarow\\\":\\\"⤍\\\",\\\"blacklozenge\\\":\\\"⧫\\\",\\\"blacksquare\\\":\\\"▪\\\",\\\"blacktriangle\\\":\\\"▴\\\",\\\"blacktriangledown\\\":\\\"▾\\\",\\\"blacktriangleleft\\\":\\\"◂\\\",\\\"blacktriangleright\\\":\\\"▸\\\",\\\"blank\\\":\\\"␣\\\",\\\"blk12\\\":\\\"▒\\\",\\\"blk14\\\":\\\"░\\\",\\\"blk34\\\":\\\"▓\\\",\\\"block\\\":\\\"█\\\",\\\"bne\\\":\\\"=⃥\\\",\\\"bnequiv\\\":\\\"≡⃥\\\",\\\"bNot\\\":\\\"⫭\\\",\\\"bnot\\\":\\\"⌐\\\",\\\"Bopf\\\":\\\"𝔹\\\",\\\"bopf\\\":\\\"𝕓\\\",\\\"bot\\\":\\\"⊥\\\",\\\"bottom\\\":\\\"⊥\\\",\\\"bowtie\\\":\\\"⋈\\\",\\\"boxbox\\\":\\\"⧉\\\",\\\"boxdl\\\":\\\"┐\\\",\\\"boxdL\\\":\\\"╕\\\",\\\"boxDl\\\":\\\"╖\\\",\\\"boxDL\\\":\\\"╗\\\",\\\"boxdr\\\":\\\"┌\\\",\\\"boxdR\\\":\\\"╒\\\",\\\"boxDr\\\":\\\"╓\\\",\\\"boxDR\\\":\\\"╔\\\",\\\"boxh\\\":\\\"─\\\",\\\"boxH\\\":\\\"═\\\",\\\"boxhd\\\":\\\"┬\\\",\\\"boxHd\\\":\\\"╤\\\",\\\"boxhD\\\":\\\"╥\\\",\\\"boxHD\\\":\\\"╦\\\",\\\"boxhu\\\":\\\"┴\\\",\\\"boxHu\\\":\\\"╧\\\",\\\"boxhU\\\":\\\"╨\\\",\\\"boxHU\\\":\\\"╩\\\",\\\"boxminus\\\":\\\"⊟\\\",\\\"boxplus\\\":\\\"⊞\\\",\\\"boxtimes\\\":\\\"⊠\\\",\\\"boxul\\\":\\\"┘\\\",\\\"boxuL\\\":\\\"╛\\\",\\\"boxUl\\\":\\\"╜\\\",\\\"boxUL\\\":\\\"╝\\\",\\\"boxur\\\":\\\"└\\\",\\\"boxuR\\\":\\\"╘\\\",\\\"boxUr\\\":\\\"╙\\\",\\\"boxUR\\\":\\\"╚\\\",\\\"boxv\\\":\\\"│\\\",\\\"boxV\\\":\\\"║\\\",\\\"boxvh\\\":\\\"┼\\\",\\\"boxvH\\\":\\\"╪\\\",\\\"boxVh\\\":\\\"╫\\\",\\\"boxVH\\\":\\\"╬\\\",\\\"boxvl\\\":\\\"┤\\\",\\\"boxvL\\\":\\\"╡\\\",\\\"boxVl\\\":\\\"╢\\\",\\\"boxVL\\\":\\\"╣\\\",\\\"boxvr\\\":\\\"├\\\",\\\"boxvR\\\":\\\"╞\\\",\\\"boxVr\\\":\\\"╟\\\",\\\"boxVR\\\":\\\"╠\\\",\\\"bprime\\\":\\\"‵\\\",\\\"breve\\\":\\\"˘\\\",\\\"Breve\\\":\\\"˘\\\",\\\"brvbar\\\":\\\"¦\\\",\\\"bscr\\\":\\\"𝒷\\\",\\\"Bscr\\\":\\\"ℬ\\\",\\\"bsemi\\\":\\\"⁏\\\",\\\"bsim\\\":\\\"∽\\\",\\\"bsime\\\":\\\"⋍\\\",\\\"bsolb\\\":\\\"⧅\\\",\\\"bsol\\\":\\\"\\\\\\\\\\\",\\\"bsolhsub\\\":\\\"⟈\\\",\\\"bull\\\":\\\"•\\\",\\\"bullet\\\":\\\"•\\\",\\\"bump\\\":\\\"≎\\\",\\\"bumpE\\\":\\\"⪮\\\",\\\"bumpe\\\":\\\"≏\\\",\\\"Bumpeq\\\":\\\"≎\\\",\\\"bumpeq\\\":\\\"≏\\\",\\\"Cacute\\\":\\\"Ć\\\",\\\"cacute\\\":\\\"ć\\\",\\\"capand\\\":\\\"⩄\\\",\\\"capbrcup\\\":\\\"⩉\\\",\\\"capcap\\\":\\\"⩋\\\",\\\"cap\\\":\\\"∩\\\",\\\"Cap\\\":\\\"⋒\\\",\\\"capcup\\\":\\\"⩇\\\",\\\"capdot\\\":\\\"⩀\\\",\\\"CapitalDifferentialD\\\":\\\"ⅅ\\\",\\\"caps\\\":\\\"∩︀\\\",\\\"caret\\\":\\\"⁁\\\",\\\"caron\\\":\\\"ˇ\\\",\\\"Cayleys\\\":\\\"ℭ\\\",\\\"ccaps\\\":\\\"⩍\\\",\\\"Ccaron\\\":\\\"Č\\\",\\\"ccaron\\\":\\\"č\\\",\\\"Ccedil\\\":\\\"Ç\\\",\\\"ccedil\\\":\\\"ç\\\",\\\"Ccirc\\\":\\\"Ĉ\\\",\\\"ccirc\\\":\\\"ĉ\\\",\\\"Cconint\\\":\\\"∰\\\",\\\"ccups\\\":\\\"⩌\\\",\\\"ccupssm\\\":\\\"⩐\\\",\\\"Cdot\\\":\\\"Ċ\\\",\\\"cdot\\\":\\\"ċ\\\",\\\"cedil\\\":\\\"¸\\\",\\\"Cedilla\\\":\\\"¸\\\",\\\"cemptyv\\\":\\\"⦲\\\",\\\"cent\\\":\\\"¢\\\",\\\"centerdot\\\":\\\"·\\\",\\\"CenterDot\\\":\\\"·\\\",\\\"cfr\\\":\\\"𝔠\\\",\\\"Cfr\\\":\\\"ℭ\\\",\\\"CHcy\\\":\\\"Ч\\\",\\\"chcy\\\":\\\"ч\\\",\\\"check\\\":\\\"✓\\\",\\\"checkmark\\\":\\\"✓\\\",\\\"Chi\\\":\\\"Χ\\\",\\\"chi\\\":\\\"χ\\\",\\\"circ\\\":\\\"ˆ\\\",\\\"circeq\\\":\\\"≗\\\",\\\"circlearrowleft\\\":\\\"↺\\\",\\\"circlearrowright\\\":\\\"↻\\\",\\\"circledast\\\":\\\"⊛\\\",\\\"circledcirc\\\":\\\"⊚\\\",\\\"circleddash\\\":\\\"⊝\\\",\\\"CircleDot\\\":\\\"⊙\\\",\\\"circledR\\\":\\\"®\\\",\\\"circledS\\\":\\\"Ⓢ\\\",\\\"CircleMinus\\\":\\\"⊖\\\",\\\"CirclePlus\\\":\\\"⊕\\\",\\\"CircleTimes\\\":\\\"⊗\\\",\\\"cir\\\":\\\"○\\\",\\\"cirE\\\":\\\"⧃\\\",\\\"cire\\\":\\\"≗\\\",\\\"cirfnint\\\":\\\"⨐\\\",\\\"cirmid\\\":\\\"⫯\\\",\\\"cirscir\\\":\\\"⧂\\\",\\\"ClockwiseContourIntegral\\\":\\\"∲\\\",\\\"CloseCurlyDoubleQuote\\\":\\\"”\\\",\\\"CloseCurlyQuote\\\":\\\"’\\\",\\\"clubs\\\":\\\"♣\\\",\\\"clubsuit\\\":\\\"♣\\\",\\\"colon\\\":\\\":\\\",\\\"Colon\\\":\\\"∷\\\",\\\"Colone\\\":\\\"⩴\\\",\\\"colone\\\":\\\"≔\\\",\\\"coloneq\\\":\\\"≔\\\",\\\"comma\\\":\\\",\\\",\\\"commat\\\":\\\"@\\\",\\\"comp\\\":\\\"∁\\\",\\\"compfn\\\":\\\"∘\\\",\\\"complement\\\":\\\"∁\\\",\\\"complexes\\\":\\\"ℂ\\\",\\\"cong\\\":\\\"≅\\\",\\\"congdot\\\":\\\"⩭\\\",\\\"Congruent\\\":\\\"≡\\\",\\\"conint\\\":\\\"∮\\\",\\\"Conint\\\":\\\"∯\\\",\\\"ContourIntegral\\\":\\\"∮\\\",\\\"copf\\\":\\\"𝕔\\\",\\\"Copf\\\":\\\"ℂ\\\",\\\"coprod\\\":\\\"∐\\\",\\\"Coproduct\\\":\\\"∐\\\",\\\"copy\\\":\\\"©\\\",\\\"COPY\\\":\\\"©\\\",\\\"copysr\\\":\\\"℗\\\",\\\"CounterClockwiseContourIntegral\\\":\\\"∳\\\",\\\"crarr\\\":\\\"↵\\\",\\\"cross\\\":\\\"✗\\\",\\\"Cross\\\":\\\"⨯\\\",\\\"Cscr\\\":\\\"𝒞\\\",\\\"cscr\\\":\\\"𝒸\\\",\\\"csub\\\":\\\"⫏\\\",\\\"csube\\\":\\\"⫑\\\",\\\"csup\\\":\\\"⫐\\\",\\\"csupe\\\":\\\"⫒\\\",\\\"ctdot\\\":\\\"⋯\\\",\\\"cudarrl\\\":\\\"⤸\\\",\\\"cudarrr\\\":\\\"⤵\\\",\\\"cuepr\\\":\\\"⋞\\\",\\\"cuesc\\\":\\\"⋟\\\",\\\"cularr\\\":\\\"↶\\\",\\\"cularrp\\\":\\\"⤽\\\",\\\"cupbrcap\\\":\\\"⩈\\\",\\\"cupcap\\\":\\\"⩆\\\",\\\"CupCap\\\":\\\"≍\\\",\\\"cup\\\":\\\"∪\\\",\\\"Cup\\\":\\\"⋓\\\",\\\"cupcup\\\":\\\"⩊\\\",\\\"cupdot\\\":\\\"⊍\\\",\\\"cupor\\\":\\\"⩅\\\",\\\"cups\\\":\\\"∪︀\\\",\\\"curarr\\\":\\\"↷\\\",\\\"curarrm\\\":\\\"⤼\\\",\\\"curlyeqprec\\\":\\\"⋞\\\",\\\"curlyeqsucc\\\":\\\"⋟\\\",\\\"curlyvee\\\":\\\"⋎\\\",\\\"curlywedge\\\":\\\"⋏\\\",\\\"curren\\\":\\\"¤\\\",\\\"curvearrowleft\\\":\\\"↶\\\",\\\"curvearrowright\\\":\\\"↷\\\",\\\"cuvee\\\":\\\"⋎\\\",\\\"cuwed\\\":\\\"⋏\\\",\\\"cwconint\\\":\\\"∲\\\",\\\"cwint\\\":\\\"∱\\\",\\\"cylcty\\\":\\\"⌭\\\",\\\"dagger\\\":\\\"†\\\",\\\"Dagger\\\":\\\"‡\\\",\\\"daleth\\\":\\\"ℸ\\\",\\\"darr\\\":\\\"↓\\\",\\\"Darr\\\":\\\"↡\\\",\\\"dArr\\\":\\\"⇓\\\",\\\"dash\\\":\\\"‐\\\",\\\"Dashv\\\":\\\"⫤\\\",\\\"dashv\\\":\\\"⊣\\\",\\\"dbkarow\\\":\\\"⤏\\\",\\\"dblac\\\":\\\"˝\\\",\\\"Dcaron\\\":\\\"Ď\\\",\\\"dcaron\\\":\\\"ď\\\",\\\"Dcy\\\":\\\"Д\\\",\\\"dcy\\\":\\\"д\\\",\\\"ddagger\\\":\\\"‡\\\",\\\"ddarr\\\":\\\"⇊\\\",\\\"DD\\\":\\\"ⅅ\\\",\\\"dd\\\":\\\"ⅆ\\\",\\\"DDotrahd\\\":\\\"⤑\\\",\\\"ddotseq\\\":\\\"⩷\\\",\\\"deg\\\":\\\"°\\\",\\\"Del\\\":\\\"∇\\\",\\\"Delta\\\":\\\"Δ\\\",\\\"delta\\\":\\\"δ\\\",\\\"demptyv\\\":\\\"⦱\\\",\\\"dfisht\\\":\\\"⥿\\\",\\\"Dfr\\\":\\\"𝔇\\\",\\\"dfr\\\":\\\"𝔡\\\",\\\"dHar\\\":\\\"⥥\\\",\\\"dharl\\\":\\\"⇃\\\",\\\"dharr\\\":\\\"⇂\\\",\\\"DiacriticalAcute\\\":\\\"´\\\",\\\"DiacriticalDot\\\":\\\"˙\\\",\\\"DiacriticalDoubleAcute\\\":\\\"˝\\\",\\\"DiacriticalGrave\\\":\\\"`\\\",\\\"DiacriticalTilde\\\":\\\"˜\\\",\\\"diam\\\":\\\"⋄\\\",\\\"diamond\\\":\\\"⋄\\\",\\\"Diamond\\\":\\\"⋄\\\",\\\"diamondsuit\\\":\\\"♦\\\",\\\"diams\\\":\\\"♦\\\",\\\"die\\\":\\\"¨\\\",\\\"DifferentialD\\\":\\\"ⅆ\\\",\\\"digamma\\\":\\\"ϝ\\\",\\\"disin\\\":\\\"⋲\\\",\\\"div\\\":\\\"÷\\\",\\\"divide\\\":\\\"÷\\\",\\\"divideontimes\\\":\\\"⋇\\\",\\\"divonx\\\":\\\"⋇\\\",\\\"DJcy\\\":\\\"Ђ\\\",\\\"djcy\\\":\\\"ђ\\\",\\\"dlcorn\\\":\\\"⌞\\\",\\\"dlcrop\\\":\\\"⌍\\\",\\\"dollar\\\":\\\"$\\\",\\\"Dopf\\\":\\\"𝔻\\\",\\\"dopf\\\":\\\"𝕕\\\",\\\"Dot\\\":\\\"¨\\\",\\\"dot\\\":\\\"˙\\\",\\\"DotDot\\\":\\\"⃜\\\",\\\"doteq\\\":\\\"≐\\\",\\\"doteqdot\\\":\\\"≑\\\",\\\"DotEqual\\\":\\\"≐\\\",\\\"dotminus\\\":\\\"∸\\\",\\\"dotplus\\\":\\\"∔\\\",\\\"dotsquare\\\":\\\"⊡\\\",\\\"doublebarwedge\\\":\\\"⌆\\\",\\\"DoubleContourIntegral\\\":\\\"∯\\\",\\\"DoubleDot\\\":\\\"¨\\\",\\\"DoubleDownArrow\\\":\\\"⇓\\\",\\\"DoubleLeftArrow\\\":\\\"⇐\\\",\\\"DoubleLeftRightArrow\\\":\\\"⇔\\\",\\\"DoubleLeftTee\\\":\\\"⫤\\\",\\\"DoubleLongLeftArrow\\\":\\\"⟸\\\",\\\"DoubleLongLeftRightArrow\\\":\\\"⟺\\\",\\\"DoubleLongRightArrow\\\":\\\"⟹\\\",\\\"DoubleRightArrow\\\":\\\"⇒\\\",\\\"DoubleRightTee\\\":\\\"⊨\\\",\\\"DoubleUpArrow\\\":\\\"⇑\\\",\\\"DoubleUpDownArrow\\\":\\\"⇕\\\",\\\"DoubleVerticalBar\\\":\\\"∥\\\",\\\"DownArrowBar\\\":\\\"⤓\\\",\\\"downarrow\\\":\\\"↓\\\",\\\"DownArrow\\\":\\\"↓\\\",\\\"Downarrow\\\":\\\"⇓\\\",\\\"DownArrowUpArrow\\\":\\\"⇵\\\",\\\"DownBreve\\\":\\\"̑\\\",\\\"downdownarrows\\\":\\\"⇊\\\",\\\"downharpoonleft\\\":\\\"⇃\\\",\\\"downharpoonright\\\":\\\"⇂\\\",\\\"DownLeftRightVector\\\":\\\"⥐\\\",\\\"DownLeftTeeVector\\\":\\\"⥞\\\",\\\"DownLeftVectorBar\\\":\\\"⥖\\\",\\\"DownLeftVector\\\":\\\"↽\\\",\\\"DownRightTeeVector\\\":\\\"⥟\\\",\\\"DownRightVectorBar\\\":\\\"⥗\\\",\\\"DownRightVector\\\":\\\"⇁\\\",\\\"DownTeeArrow\\\":\\\"↧\\\",\\\"DownTee\\\":\\\"⊤\\\",\\\"drbkarow\\\":\\\"⤐\\\",\\\"drcorn\\\":\\\"⌟\\\",\\\"drcrop\\\":\\\"⌌\\\",\\\"Dscr\\\":\\\"𝒟\\\",\\\"dscr\\\":\\\"𝒹\\\",\\\"DScy\\\":\\\"Ѕ\\\",\\\"dscy\\\":\\\"ѕ\\\",\\\"dsol\\\":\\\"⧶\\\",\\\"Dstrok\\\":\\\"Đ\\\",\\\"dstrok\\\":\\\"đ\\\",\\\"dtdot\\\":\\\"⋱\\\",\\\"dtri\\\":\\\"▿\\\",\\\"dtrif\\\":\\\"▾\\\",\\\"duarr\\\":\\\"⇵\\\",\\\"duhar\\\":\\\"⥯\\\",\\\"dwangle\\\":\\\"⦦\\\",\\\"DZcy\\\":\\\"Џ\\\",\\\"dzcy\\\":\\\"џ\\\",\\\"dzigrarr\\\":\\\"⟿\\\",\\\"Eacute\\\":\\\"É\\\",\\\"eacute\\\":\\\"é\\\",\\\"easter\\\":\\\"⩮\\\",\\\"Ecaron\\\":\\\"Ě\\\",\\\"ecaron\\\":\\\"ě\\\",\\\"Ecirc\\\":\\\"Ê\\\",\\\"ecirc\\\":\\\"ê\\\",\\\"ecir\\\":\\\"≖\\\",\\\"ecolon\\\":\\\"≕\\\",\\\"Ecy\\\":\\\"Э\\\",\\\"ecy\\\":\\\"э\\\",\\\"eDDot\\\":\\\"⩷\\\",\\\"Edot\\\":\\\"Ė\\\",\\\"edot\\\":\\\"ė\\\",\\\"eDot\\\":\\\"≑\\\",\\\"ee\\\":\\\"ⅇ\\\",\\\"efDot\\\":\\\"≒\\\",\\\"Efr\\\":\\\"𝔈\\\",\\\"efr\\\":\\\"𝔢\\\",\\\"eg\\\":\\\"⪚\\\",\\\"Egrave\\\":\\\"È\\\",\\\"egrave\\\":\\\"è\\\",\\\"egs\\\":\\\"⪖\\\",\\\"egsdot\\\":\\\"⪘\\\",\\\"el\\\":\\\"⪙\\\",\\\"Element\\\":\\\"∈\\\",\\\"elinters\\\":\\\"⏧\\\",\\\"ell\\\":\\\"ℓ\\\",\\\"els\\\":\\\"⪕\\\",\\\"elsdot\\\":\\\"⪗\\\",\\\"Emacr\\\":\\\"Ē\\\",\\\"emacr\\\":\\\"ē\\\",\\\"empty\\\":\\\"∅\\\",\\\"emptyset\\\":\\\"∅\\\",\\\"EmptySmallSquare\\\":\\\"◻\\\",\\\"emptyv\\\":\\\"∅\\\",\\\"EmptyVerySmallSquare\\\":\\\"▫\\\",\\\"emsp13\\\":\\\" \\\",\\\"emsp14\\\":\\\" \\\",\\\"emsp\\\":\\\" \\\",\\\"ENG\\\":\\\"Ŋ\\\",\\\"eng\\\":\\\"ŋ\\\",\\\"ensp\\\":\\\" \\\",\\\"Eogon\\\":\\\"Ę\\\",\\\"eogon\\\":\\\"ę\\\",\\\"Eopf\\\":\\\"𝔼\\\",\\\"eopf\\\":\\\"𝕖\\\",\\\"epar\\\":\\\"⋕\\\",\\\"eparsl\\\":\\\"⧣\\\",\\\"eplus\\\":\\\"⩱\\\",\\\"epsi\\\":\\\"ε\\\",\\\"Epsilon\\\":\\\"Ε\\\",\\\"epsilon\\\":\\\"ε\\\",\\\"epsiv\\\":\\\"ϵ\\\",\\\"eqcirc\\\":\\\"≖\\\",\\\"eqcolon\\\":\\\"≕\\\",\\\"eqsim\\\":\\\"≂\\\",\\\"eqslantgtr\\\":\\\"⪖\\\",\\\"eqslantless\\\":\\\"⪕\\\",\\\"Equal\\\":\\\"⩵\\\",\\\"equals\\\":\\\"=\\\",\\\"EqualTilde\\\":\\\"≂\\\",\\\"equest\\\":\\\"≟\\\",\\\"Equilibrium\\\":\\\"⇌\\\",\\\"equiv\\\":\\\"≡\\\",\\\"equivDD\\\":\\\"⩸\\\",\\\"eqvparsl\\\":\\\"⧥\\\",\\\"erarr\\\":\\\"⥱\\\",\\\"erDot\\\":\\\"≓\\\",\\\"escr\\\":\\\"ℯ\\\",\\\"Escr\\\":\\\"ℰ\\\",\\\"esdot\\\":\\\"≐\\\",\\\"Esim\\\":\\\"⩳\\\",\\\"esim\\\":\\\"≂\\\",\\\"Eta\\\":\\\"Η\\\",\\\"eta\\\":\\\"η\\\",\\\"ETH\\\":\\\"Ð\\\",\\\"eth\\\":\\\"ð\\\",\\\"Euml\\\":\\\"Ë\\\",\\\"euml\\\":\\\"ë\\\",\\\"euro\\\":\\\"€\\\",\\\"excl\\\":\\\"!\\\",\\\"exist\\\":\\\"∃\\\",\\\"Exists\\\":\\\"∃\\\",\\\"expectation\\\":\\\"ℰ\\\",\\\"exponentiale\\\":\\\"ⅇ\\\",\\\"ExponentialE\\\":\\\"ⅇ\\\",\\\"fallingdotseq\\\":\\\"≒\\\",\\\"Fcy\\\":\\\"Ф\\\",\\\"fcy\\\":\\\"ф\\\",\\\"female\\\":\\\"♀\\\",\\\"ffilig\\\":\\\"ffi\\\",\\\"fflig\\\":\\\"ff\\\",\\\"ffllig\\\":\\\"ffl\\\",\\\"Ffr\\\":\\\"𝔉\\\",\\\"ffr\\\":\\\"𝔣\\\",\\\"filig\\\":\\\"fi\\\",\\\"FilledSmallSquare\\\":\\\"◼\\\",\\\"FilledVerySmallSquare\\\":\\\"▪\\\",\\\"fjlig\\\":\\\"fj\\\",\\\"flat\\\":\\\"♭\\\",\\\"fllig\\\":\\\"fl\\\",\\\"fltns\\\":\\\"▱\\\",\\\"fnof\\\":\\\"ƒ\\\",\\\"Fopf\\\":\\\"𝔽\\\",\\\"fopf\\\":\\\"𝕗\\\",\\\"forall\\\":\\\"∀\\\",\\\"ForAll\\\":\\\"∀\\\",\\\"fork\\\":\\\"⋔\\\",\\\"forkv\\\":\\\"⫙\\\",\\\"Fouriertrf\\\":\\\"ℱ\\\",\\\"fpartint\\\":\\\"⨍\\\",\\\"frac12\\\":\\\"½\\\",\\\"frac13\\\":\\\"⅓\\\",\\\"frac14\\\":\\\"¼\\\",\\\"frac15\\\":\\\"⅕\\\",\\\"frac16\\\":\\\"⅙\\\",\\\"frac18\\\":\\\"⅛\\\",\\\"frac23\\\":\\\"⅔\\\",\\\"frac25\\\":\\\"⅖\\\",\\\"frac34\\\":\\\"¾\\\",\\\"frac35\\\":\\\"⅗\\\",\\\"frac38\\\":\\\"⅜\\\",\\\"frac45\\\":\\\"⅘\\\",\\\"frac56\\\":\\\"⅚\\\",\\\"frac58\\\":\\\"⅝\\\",\\\"frac78\\\":\\\"⅞\\\",\\\"frasl\\\":\\\"⁄\\\",\\\"frown\\\":\\\"⌢\\\",\\\"fscr\\\":\\\"𝒻\\\",\\\"Fscr\\\":\\\"ℱ\\\",\\\"gacute\\\":\\\"ǵ\\\",\\\"Gamma\\\":\\\"Γ\\\",\\\"gamma\\\":\\\"γ\\\",\\\"Gammad\\\":\\\"Ϝ\\\",\\\"gammad\\\":\\\"ϝ\\\",\\\"gap\\\":\\\"⪆\\\",\\\"Gbreve\\\":\\\"Ğ\\\",\\\"gbreve\\\":\\\"ğ\\\",\\\"Gcedil\\\":\\\"Ģ\\\",\\\"Gcirc\\\":\\\"Ĝ\\\",\\\"gcirc\\\":\\\"ĝ\\\",\\\"Gcy\\\":\\\"Г\\\",\\\"gcy\\\":\\\"г\\\",\\\"Gdot\\\":\\\"Ġ\\\",\\\"gdot\\\":\\\"ġ\\\",\\\"ge\\\":\\\"≥\\\",\\\"gE\\\":\\\"≧\\\",\\\"gEl\\\":\\\"⪌\\\",\\\"gel\\\":\\\"⋛\\\",\\\"geq\\\":\\\"≥\\\",\\\"geqq\\\":\\\"≧\\\",\\\"geqslant\\\":\\\"⩾\\\",\\\"gescc\\\":\\\"⪩\\\",\\\"ges\\\":\\\"⩾\\\",\\\"gesdot\\\":\\\"⪀\\\",\\\"gesdoto\\\":\\\"⪂\\\",\\\"gesdotol\\\":\\\"⪄\\\",\\\"gesl\\\":\\\"⋛︀\\\",\\\"gesles\\\":\\\"⪔\\\",\\\"Gfr\\\":\\\"𝔊\\\",\\\"gfr\\\":\\\"𝔤\\\",\\\"gg\\\":\\\"≫\\\",\\\"Gg\\\":\\\"⋙\\\",\\\"ggg\\\":\\\"⋙\\\",\\\"gimel\\\":\\\"ℷ\\\",\\\"GJcy\\\":\\\"Ѓ\\\",\\\"gjcy\\\":\\\"ѓ\\\",\\\"gla\\\":\\\"⪥\\\",\\\"gl\\\":\\\"≷\\\",\\\"glE\\\":\\\"⪒\\\",\\\"glj\\\":\\\"⪤\\\",\\\"gnap\\\":\\\"⪊\\\",\\\"gnapprox\\\":\\\"⪊\\\",\\\"gne\\\":\\\"⪈\\\",\\\"gnE\\\":\\\"≩\\\",\\\"gneq\\\":\\\"⪈\\\",\\\"gneqq\\\":\\\"≩\\\",\\\"gnsim\\\":\\\"⋧\\\",\\\"Gopf\\\":\\\"𝔾\\\",\\\"gopf\\\":\\\"𝕘\\\",\\\"grave\\\":\\\"`\\\",\\\"GreaterEqual\\\":\\\"≥\\\",\\\"GreaterEqualLess\\\":\\\"⋛\\\",\\\"GreaterFullEqual\\\":\\\"≧\\\",\\\"GreaterGreater\\\":\\\"⪢\\\",\\\"GreaterLess\\\":\\\"≷\\\",\\\"GreaterSlantEqual\\\":\\\"⩾\\\",\\\"GreaterTilde\\\":\\\"≳\\\",\\\"Gscr\\\":\\\"𝒢\\\",\\\"gscr\\\":\\\"ℊ\\\",\\\"gsim\\\":\\\"≳\\\",\\\"gsime\\\":\\\"⪎\\\",\\\"gsiml\\\":\\\"⪐\\\",\\\"gtcc\\\":\\\"⪧\\\",\\\"gtcir\\\":\\\"⩺\\\",\\\"gt\\\":\\\">\\\",\\\"GT\\\":\\\">\\\",\\\"Gt\\\":\\\"≫\\\",\\\"gtdot\\\":\\\"⋗\\\",\\\"gtlPar\\\":\\\"⦕\\\",\\\"gtquest\\\":\\\"⩼\\\",\\\"gtrapprox\\\":\\\"⪆\\\",\\\"gtrarr\\\":\\\"⥸\\\",\\\"gtrdot\\\":\\\"⋗\\\",\\\"gtreqless\\\":\\\"⋛\\\",\\\"gtreqqless\\\":\\\"⪌\\\",\\\"gtrless\\\":\\\"≷\\\",\\\"gtrsim\\\":\\\"≳\\\",\\\"gvertneqq\\\":\\\"≩︀\\\",\\\"gvnE\\\":\\\"≩︀\\\",\\\"Hacek\\\":\\\"ˇ\\\",\\\"hairsp\\\":\\\" \\\",\\\"half\\\":\\\"½\\\",\\\"hamilt\\\":\\\"ℋ\\\",\\\"HARDcy\\\":\\\"Ъ\\\",\\\"hardcy\\\":\\\"ъ\\\",\\\"harrcir\\\":\\\"⥈\\\",\\\"harr\\\":\\\"↔\\\",\\\"hArr\\\":\\\"⇔\\\",\\\"harrw\\\":\\\"↭\\\",\\\"Hat\\\":\\\"^\\\",\\\"hbar\\\":\\\"ℏ\\\",\\\"Hcirc\\\":\\\"Ĥ\\\",\\\"hcirc\\\":\\\"ĥ\\\",\\\"hearts\\\":\\\"♥\\\",\\\"heartsuit\\\":\\\"♥\\\",\\\"hellip\\\":\\\"…\\\",\\\"hercon\\\":\\\"⊹\\\",\\\"hfr\\\":\\\"𝔥\\\",\\\"Hfr\\\":\\\"ℌ\\\",\\\"HilbertSpace\\\":\\\"ℋ\\\",\\\"hksearow\\\":\\\"⤥\\\",\\\"hkswarow\\\":\\\"⤦\\\",\\\"hoarr\\\":\\\"⇿\\\",\\\"homtht\\\":\\\"∻\\\",\\\"hookleftarrow\\\":\\\"↩\\\",\\\"hookrightarrow\\\":\\\"↪\\\",\\\"hopf\\\":\\\"𝕙\\\",\\\"Hopf\\\":\\\"ℍ\\\",\\\"horbar\\\":\\\"―\\\",\\\"HorizontalLine\\\":\\\"─\\\",\\\"hscr\\\":\\\"𝒽\\\",\\\"Hscr\\\":\\\"ℋ\\\",\\\"hslash\\\":\\\"ℏ\\\",\\\"Hstrok\\\":\\\"Ħ\\\",\\\"hstrok\\\":\\\"ħ\\\",\\\"HumpDownHump\\\":\\\"≎\\\",\\\"HumpEqual\\\":\\\"≏\\\",\\\"hybull\\\":\\\"⁃\\\",\\\"hyphen\\\":\\\"‐\\\",\\\"Iacute\\\":\\\"Í\\\",\\\"iacute\\\":\\\"í\\\",\\\"ic\\\":\\\"⁣\\\",\\\"Icirc\\\":\\\"Î\\\",\\\"icirc\\\":\\\"î\\\",\\\"Icy\\\":\\\"И\\\",\\\"icy\\\":\\\"и\\\",\\\"Idot\\\":\\\"İ\\\",\\\"IEcy\\\":\\\"Е\\\",\\\"iecy\\\":\\\"е\\\",\\\"iexcl\\\":\\\"¡\\\",\\\"iff\\\":\\\"⇔\\\",\\\"ifr\\\":\\\"𝔦\\\",\\\"Ifr\\\":\\\"ℑ\\\",\\\"Igrave\\\":\\\"Ì\\\",\\\"igrave\\\":\\\"ì\\\",\\\"ii\\\":\\\"ⅈ\\\",\\\"iiiint\\\":\\\"⨌\\\",\\\"iiint\\\":\\\"∭\\\",\\\"iinfin\\\":\\\"⧜\\\",\\\"iiota\\\":\\\"℩\\\",\\\"IJlig\\\":\\\"IJ\\\",\\\"ijlig\\\":\\\"ij\\\",\\\"Imacr\\\":\\\"Ī\\\",\\\"imacr\\\":\\\"ī\\\",\\\"image\\\":\\\"ℑ\\\",\\\"ImaginaryI\\\":\\\"ⅈ\\\",\\\"imagline\\\":\\\"ℐ\\\",\\\"imagpart\\\":\\\"ℑ\\\",\\\"imath\\\":\\\"ı\\\",\\\"Im\\\":\\\"ℑ\\\",\\\"imof\\\":\\\"⊷\\\",\\\"imped\\\":\\\"Ƶ\\\",\\\"Implies\\\":\\\"⇒\\\",\\\"incare\\\":\\\"℅\\\",\\\"in\\\":\\\"∈\\\",\\\"infin\\\":\\\"∞\\\",\\\"infintie\\\":\\\"⧝\\\",\\\"inodot\\\":\\\"ı\\\",\\\"intcal\\\":\\\"⊺\\\",\\\"int\\\":\\\"∫\\\",\\\"Int\\\":\\\"∬\\\",\\\"integers\\\":\\\"ℤ\\\",\\\"Integral\\\":\\\"∫\\\",\\\"intercal\\\":\\\"⊺\\\",\\\"Intersection\\\":\\\"⋂\\\",\\\"intlarhk\\\":\\\"⨗\\\",\\\"intprod\\\":\\\"⨼\\\",\\\"InvisibleComma\\\":\\\"⁣\\\",\\\"InvisibleTimes\\\":\\\"⁢\\\",\\\"IOcy\\\":\\\"Ё\\\",\\\"iocy\\\":\\\"ё\\\",\\\"Iogon\\\":\\\"Į\\\",\\\"iogon\\\":\\\"į\\\",\\\"Iopf\\\":\\\"𝕀\\\",\\\"iopf\\\":\\\"𝕚\\\",\\\"Iota\\\":\\\"Ι\\\",\\\"iota\\\":\\\"ι\\\",\\\"iprod\\\":\\\"⨼\\\",\\\"iquest\\\":\\\"¿\\\",\\\"iscr\\\":\\\"𝒾\\\",\\\"Iscr\\\":\\\"ℐ\\\",\\\"isin\\\":\\\"∈\\\",\\\"isindot\\\":\\\"⋵\\\",\\\"isinE\\\":\\\"⋹\\\",\\\"isins\\\":\\\"⋴\\\",\\\"isinsv\\\":\\\"⋳\\\",\\\"isinv\\\":\\\"∈\\\",\\\"it\\\":\\\"⁢\\\",\\\"Itilde\\\":\\\"Ĩ\\\",\\\"itilde\\\":\\\"ĩ\\\",\\\"Iukcy\\\":\\\"І\\\",\\\"iukcy\\\":\\\"і\\\",\\\"Iuml\\\":\\\"Ï\\\",\\\"iuml\\\":\\\"ï\\\",\\\"Jcirc\\\":\\\"Ĵ\\\",\\\"jcirc\\\":\\\"ĵ\\\",\\\"Jcy\\\":\\\"Й\\\",\\\"jcy\\\":\\\"й\\\",\\\"Jfr\\\":\\\"𝔍\\\",\\\"jfr\\\":\\\"𝔧\\\",\\\"jmath\\\":\\\"ȷ\\\",\\\"Jopf\\\":\\\"𝕁\\\",\\\"jopf\\\":\\\"𝕛\\\",\\\"Jscr\\\":\\\"𝒥\\\",\\\"jscr\\\":\\\"𝒿\\\",\\\"Jsercy\\\":\\\"Ј\\\",\\\"jsercy\\\":\\\"ј\\\",\\\"Jukcy\\\":\\\"Є\\\",\\\"jukcy\\\":\\\"є\\\",\\\"Kappa\\\":\\\"Κ\\\",\\\"kappa\\\":\\\"κ\\\",\\\"kappav\\\":\\\"ϰ\\\",\\\"Kcedil\\\":\\\"Ķ\\\",\\\"kcedil\\\":\\\"ķ\\\",\\\"Kcy\\\":\\\"К\\\",\\\"kcy\\\":\\\"к\\\",\\\"Kfr\\\":\\\"𝔎\\\",\\\"kfr\\\":\\\"𝔨\\\",\\\"kgreen\\\":\\\"ĸ\\\",\\\"KHcy\\\":\\\"Х\\\",\\\"khcy\\\":\\\"х\\\",\\\"KJcy\\\":\\\"Ќ\\\",\\\"kjcy\\\":\\\"ќ\\\",\\\"Kopf\\\":\\\"𝕂\\\",\\\"kopf\\\":\\\"𝕜\\\",\\\"Kscr\\\":\\\"𝒦\\\",\\\"kscr\\\":\\\"𝓀\\\",\\\"lAarr\\\":\\\"⇚\\\",\\\"Lacute\\\":\\\"Ĺ\\\",\\\"lacute\\\":\\\"ĺ\\\",\\\"laemptyv\\\":\\\"⦴\\\",\\\"lagran\\\":\\\"ℒ\\\",\\\"Lambda\\\":\\\"Λ\\\",\\\"lambda\\\":\\\"λ\\\",\\\"lang\\\":\\\"⟨\\\",\\\"Lang\\\":\\\"⟪\\\",\\\"langd\\\":\\\"⦑\\\",\\\"langle\\\":\\\"⟨\\\",\\\"lap\\\":\\\"⪅\\\",\\\"Laplacetrf\\\":\\\"ℒ\\\",\\\"laquo\\\":\\\"«\\\",\\\"larrb\\\":\\\"⇤\\\",\\\"larrbfs\\\":\\\"⤟\\\",\\\"larr\\\":\\\"←\\\",\\\"Larr\\\":\\\"↞\\\",\\\"lArr\\\":\\\"⇐\\\",\\\"larrfs\\\":\\\"⤝\\\",\\\"larrhk\\\":\\\"↩\\\",\\\"larrlp\\\":\\\"↫\\\",\\\"larrpl\\\":\\\"⤹\\\",\\\"larrsim\\\":\\\"⥳\\\",\\\"larrtl\\\":\\\"↢\\\",\\\"latail\\\":\\\"⤙\\\",\\\"lAtail\\\":\\\"⤛\\\",\\\"lat\\\":\\\"⪫\\\",\\\"late\\\":\\\"⪭\\\",\\\"lates\\\":\\\"⪭︀\\\",\\\"lbarr\\\":\\\"⤌\\\",\\\"lBarr\\\":\\\"⤎\\\",\\\"lbbrk\\\":\\\"❲\\\",\\\"lbrace\\\":\\\"{\\\",\\\"lbrack\\\":\\\"[\\\",\\\"lbrke\\\":\\\"⦋\\\",\\\"lbrksld\\\":\\\"⦏\\\",\\\"lbrkslu\\\":\\\"⦍\\\",\\\"Lcaron\\\":\\\"Ľ\\\",\\\"lcaron\\\":\\\"ľ\\\",\\\"Lcedil\\\":\\\"Ļ\\\",\\\"lcedil\\\":\\\"ļ\\\",\\\"lceil\\\":\\\"⌈\\\",\\\"lcub\\\":\\\"{\\\",\\\"Lcy\\\":\\\"Л\\\",\\\"lcy\\\":\\\"л\\\",\\\"ldca\\\":\\\"⤶\\\",\\\"ldquo\\\":\\\"“\\\",\\\"ldquor\\\":\\\"„\\\",\\\"ldrdhar\\\":\\\"⥧\\\",\\\"ldrushar\\\":\\\"⥋\\\",\\\"ldsh\\\":\\\"↲\\\",\\\"le\\\":\\\"≤\\\",\\\"lE\\\":\\\"≦\\\",\\\"LeftAngleBracket\\\":\\\"⟨\\\",\\\"LeftArrowBar\\\":\\\"⇤\\\",\\\"leftarrow\\\":\\\"←\\\",\\\"LeftArrow\\\":\\\"←\\\",\\\"Leftarrow\\\":\\\"⇐\\\",\\\"LeftArrowRightArrow\\\":\\\"⇆\\\",\\\"leftarrowtail\\\":\\\"↢\\\",\\\"LeftCeiling\\\":\\\"⌈\\\",\\\"LeftDoubleBracket\\\":\\\"⟦\\\",\\\"LeftDownTeeVector\\\":\\\"⥡\\\",\\\"LeftDownVectorBar\\\":\\\"⥙\\\",\\\"LeftDownVector\\\":\\\"⇃\\\",\\\"LeftFloor\\\":\\\"⌊\\\",\\\"leftharpoondown\\\":\\\"↽\\\",\\\"leftharpoonup\\\":\\\"↼\\\",\\\"leftleftarrows\\\":\\\"⇇\\\",\\\"leftrightarrow\\\":\\\"↔\\\",\\\"LeftRightArrow\\\":\\\"↔\\\",\\\"Leftrightarrow\\\":\\\"⇔\\\",\\\"leftrightarrows\\\":\\\"⇆\\\",\\\"leftrightharpoons\\\":\\\"⇋\\\",\\\"leftrightsquigarrow\\\":\\\"↭\\\",\\\"LeftRightVector\\\":\\\"⥎\\\",\\\"LeftTeeArrow\\\":\\\"↤\\\",\\\"LeftTee\\\":\\\"⊣\\\",\\\"LeftTeeVector\\\":\\\"⥚\\\",\\\"leftthreetimes\\\":\\\"⋋\\\",\\\"LeftTriangleBar\\\":\\\"⧏\\\",\\\"LeftTriangle\\\":\\\"⊲\\\",\\\"LeftTriangleEqual\\\":\\\"⊴\\\",\\\"LeftUpDownVector\\\":\\\"⥑\\\",\\\"LeftUpTeeVector\\\":\\\"⥠\\\",\\\"LeftUpVectorBar\\\":\\\"⥘\\\",\\\"LeftUpVector\\\":\\\"↿\\\",\\\"LeftVectorBar\\\":\\\"⥒\\\",\\\"LeftVector\\\":\\\"↼\\\",\\\"lEg\\\":\\\"⪋\\\",\\\"leg\\\":\\\"⋚\\\",\\\"leq\\\":\\\"≤\\\",\\\"leqq\\\":\\\"≦\\\",\\\"leqslant\\\":\\\"⩽\\\",\\\"lescc\\\":\\\"⪨\\\",\\\"les\\\":\\\"⩽\\\",\\\"lesdot\\\":\\\"⩿\\\",\\\"lesdoto\\\":\\\"⪁\\\",\\\"lesdotor\\\":\\\"⪃\\\",\\\"lesg\\\":\\\"⋚︀\\\",\\\"lesges\\\":\\\"⪓\\\",\\\"lessapprox\\\":\\\"⪅\\\",\\\"lessdot\\\":\\\"⋖\\\",\\\"lesseqgtr\\\":\\\"⋚\\\",\\\"lesseqqgtr\\\":\\\"⪋\\\",\\\"LessEqualGreater\\\":\\\"⋚\\\",\\\"LessFullEqual\\\":\\\"≦\\\",\\\"LessGreater\\\":\\\"≶\\\",\\\"lessgtr\\\":\\\"≶\\\",\\\"LessLess\\\":\\\"⪡\\\",\\\"lesssim\\\":\\\"≲\\\",\\\"LessSlantEqual\\\":\\\"⩽\\\",\\\"LessTilde\\\":\\\"≲\\\",\\\"lfisht\\\":\\\"⥼\\\",\\\"lfloor\\\":\\\"⌊\\\",\\\"Lfr\\\":\\\"𝔏\\\",\\\"lfr\\\":\\\"𝔩\\\",\\\"lg\\\":\\\"≶\\\",\\\"lgE\\\":\\\"⪑\\\",\\\"lHar\\\":\\\"⥢\\\",\\\"lhard\\\":\\\"↽\\\",\\\"lharu\\\":\\\"↼\\\",\\\"lharul\\\":\\\"⥪\\\",\\\"lhblk\\\":\\\"▄\\\",\\\"LJcy\\\":\\\"Љ\\\",\\\"ljcy\\\":\\\"љ\\\",\\\"llarr\\\":\\\"⇇\\\",\\\"ll\\\":\\\"≪\\\",\\\"Ll\\\":\\\"⋘\\\",\\\"llcorner\\\":\\\"⌞\\\",\\\"Lleftarrow\\\":\\\"⇚\\\",\\\"llhard\\\":\\\"⥫\\\",\\\"lltri\\\":\\\"◺\\\",\\\"Lmidot\\\":\\\"Ŀ\\\",\\\"lmidot\\\":\\\"ŀ\\\",\\\"lmoustache\\\":\\\"⎰\\\",\\\"lmoust\\\":\\\"⎰\\\",\\\"lnap\\\":\\\"⪉\\\",\\\"lnapprox\\\":\\\"⪉\\\",\\\"lne\\\":\\\"⪇\\\",\\\"lnE\\\":\\\"≨\\\",\\\"lneq\\\":\\\"⪇\\\",\\\"lneqq\\\":\\\"≨\\\",\\\"lnsim\\\":\\\"⋦\\\",\\\"loang\\\":\\\"⟬\\\",\\\"loarr\\\":\\\"⇽\\\",\\\"lobrk\\\":\\\"⟦\\\",\\\"longleftarrow\\\":\\\"⟵\\\",\\\"LongLeftArrow\\\":\\\"⟵\\\",\\\"Longleftarrow\\\":\\\"⟸\\\",\\\"longleftrightarrow\\\":\\\"⟷\\\",\\\"LongLeftRightArrow\\\":\\\"⟷\\\",\\\"Longleftrightarrow\\\":\\\"⟺\\\",\\\"longmapsto\\\":\\\"⟼\\\",\\\"longrightarrow\\\":\\\"⟶\\\",\\\"LongRightArrow\\\":\\\"⟶\\\",\\\"Longrightarrow\\\":\\\"⟹\\\",\\\"looparrowleft\\\":\\\"↫\\\",\\\"looparrowright\\\":\\\"↬\\\",\\\"lopar\\\":\\\"⦅\\\",\\\"Lopf\\\":\\\"𝕃\\\",\\\"lopf\\\":\\\"𝕝\\\",\\\"loplus\\\":\\\"⨭\\\",\\\"lotimes\\\":\\\"⨴\\\",\\\"lowast\\\":\\\"∗\\\",\\\"lowbar\\\":\\\"_\\\",\\\"LowerLeftArrow\\\":\\\"↙\\\",\\\"LowerRightArrow\\\":\\\"↘\\\",\\\"loz\\\":\\\"◊\\\",\\\"lozenge\\\":\\\"◊\\\",\\\"lozf\\\":\\\"⧫\\\",\\\"lpar\\\":\\\"(\\\",\\\"lparlt\\\":\\\"⦓\\\",\\\"lrarr\\\":\\\"⇆\\\",\\\"lrcorner\\\":\\\"⌟\\\",\\\"lrhar\\\":\\\"⇋\\\",\\\"lrhard\\\":\\\"⥭\\\",\\\"lrm\\\":\\\"‎\\\",\\\"lrtri\\\":\\\"⊿\\\",\\\"lsaquo\\\":\\\"‹\\\",\\\"lscr\\\":\\\"𝓁\\\",\\\"Lscr\\\":\\\"ℒ\\\",\\\"lsh\\\":\\\"↰\\\",\\\"Lsh\\\":\\\"↰\\\",\\\"lsim\\\":\\\"≲\\\",\\\"lsime\\\":\\\"⪍\\\",\\\"lsimg\\\":\\\"⪏\\\",\\\"lsqb\\\":\\\"[\\\",\\\"lsquo\\\":\\\"‘\\\",\\\"lsquor\\\":\\\"‚\\\",\\\"Lstrok\\\":\\\"Ł\\\",\\\"lstrok\\\":\\\"ł\\\",\\\"ltcc\\\":\\\"⪦\\\",\\\"ltcir\\\":\\\"⩹\\\",\\\"lt\\\":\\\"<\\\",\\\"LT\\\":\\\"<\\\",\\\"Lt\\\":\\\"≪\\\",\\\"ltdot\\\":\\\"⋖\\\",\\\"lthree\\\":\\\"⋋\\\",\\\"ltimes\\\":\\\"⋉\\\",\\\"ltlarr\\\":\\\"⥶\\\",\\\"ltquest\\\":\\\"⩻\\\",\\\"ltri\\\":\\\"◃\\\",\\\"ltrie\\\":\\\"⊴\\\",\\\"ltrif\\\":\\\"◂\\\",\\\"ltrPar\\\":\\\"⦖\\\",\\\"lurdshar\\\":\\\"⥊\\\",\\\"luruhar\\\":\\\"⥦\\\",\\\"lvertneqq\\\":\\\"≨︀\\\",\\\"lvnE\\\":\\\"≨︀\\\",\\\"macr\\\":\\\"¯\\\",\\\"male\\\":\\\"♂\\\",\\\"malt\\\":\\\"✠\\\",\\\"maltese\\\":\\\"✠\\\",\\\"Map\\\":\\\"⤅\\\",\\\"map\\\":\\\"↦\\\",\\\"mapsto\\\":\\\"↦\\\",\\\"mapstodown\\\":\\\"↧\\\",\\\"mapstoleft\\\":\\\"↤\\\",\\\"mapstoup\\\":\\\"↥\\\",\\\"marker\\\":\\\"▮\\\",\\\"mcomma\\\":\\\"⨩\\\",\\\"Mcy\\\":\\\"М\\\",\\\"mcy\\\":\\\"м\\\",\\\"mdash\\\":\\\"—\\\",\\\"mDDot\\\":\\\"∺\\\",\\\"measuredangle\\\":\\\"∡\\\",\\\"MediumSpace\\\":\\\" \\\",\\\"Mellintrf\\\":\\\"ℳ\\\",\\\"Mfr\\\":\\\"𝔐\\\",\\\"mfr\\\":\\\"𝔪\\\",\\\"mho\\\":\\\"℧\\\",\\\"micro\\\":\\\"µ\\\",\\\"midast\\\":\\\"*\\\",\\\"midcir\\\":\\\"⫰\\\",\\\"mid\\\":\\\"∣\\\",\\\"middot\\\":\\\"·\\\",\\\"minusb\\\":\\\"⊟\\\",\\\"minus\\\":\\\"−\\\",\\\"minusd\\\":\\\"∸\\\",\\\"minusdu\\\":\\\"⨪\\\",\\\"MinusPlus\\\":\\\"∓\\\",\\\"mlcp\\\":\\\"⫛\\\",\\\"mldr\\\":\\\"…\\\",\\\"mnplus\\\":\\\"∓\\\",\\\"models\\\":\\\"⊧\\\",\\\"Mopf\\\":\\\"𝕄\\\",\\\"mopf\\\":\\\"𝕞\\\",\\\"mp\\\":\\\"∓\\\",\\\"mscr\\\":\\\"𝓂\\\",\\\"Mscr\\\":\\\"ℳ\\\",\\\"mstpos\\\":\\\"∾\\\",\\\"Mu\\\":\\\"Μ\\\",\\\"mu\\\":\\\"μ\\\",\\\"multimap\\\":\\\"⊸\\\",\\\"mumap\\\":\\\"⊸\\\",\\\"nabla\\\":\\\"∇\\\",\\\"Nacute\\\":\\\"Ń\\\",\\\"nacute\\\":\\\"ń\\\",\\\"nang\\\":\\\"∠⃒\\\",\\\"nap\\\":\\\"≉\\\",\\\"napE\\\":\\\"⩰̸\\\",\\\"napid\\\":\\\"≋̸\\\",\\\"napos\\\":\\\"ʼn\\\",\\\"napprox\\\":\\\"≉\\\",\\\"natural\\\":\\\"♮\\\",\\\"naturals\\\":\\\"ℕ\\\",\\\"natur\\\":\\\"♮\\\",\\\"nbsp\\\":\\\" \\\",\\\"nbump\\\":\\\"≎̸\\\",\\\"nbumpe\\\":\\\"≏̸\\\",\\\"ncap\\\":\\\"⩃\\\",\\\"Ncaron\\\":\\\"Ň\\\",\\\"ncaron\\\":\\\"ň\\\",\\\"Ncedil\\\":\\\"Ņ\\\",\\\"ncedil\\\":\\\"ņ\\\",\\\"ncong\\\":\\\"≇\\\",\\\"ncongdot\\\":\\\"⩭̸\\\",\\\"ncup\\\":\\\"⩂\\\",\\\"Ncy\\\":\\\"Н\\\",\\\"ncy\\\":\\\"н\\\",\\\"ndash\\\":\\\"–\\\",\\\"nearhk\\\":\\\"⤤\\\",\\\"nearr\\\":\\\"↗\\\",\\\"neArr\\\":\\\"⇗\\\",\\\"nearrow\\\":\\\"↗\\\",\\\"ne\\\":\\\"≠\\\",\\\"nedot\\\":\\\"≐̸\\\",\\\"NegativeMediumSpace\\\":\\\"​\\\",\\\"NegativeThickSpace\\\":\\\"​\\\",\\\"NegativeThinSpace\\\":\\\"​\\\",\\\"NegativeVeryThinSpace\\\":\\\"​\\\",\\\"nequiv\\\":\\\"≢\\\",\\\"nesear\\\":\\\"⤨\\\",\\\"nesim\\\":\\\"≂̸\\\",\\\"NestedGreaterGreater\\\":\\\"≫\\\",\\\"NestedLessLess\\\":\\\"≪\\\",\\\"NewLine\\\":\\\"\\\\n\\\",\\\"nexist\\\":\\\"∄\\\",\\\"nexists\\\":\\\"∄\\\",\\\"Nfr\\\":\\\"𝔑\\\",\\\"nfr\\\":\\\"𝔫\\\",\\\"ngE\\\":\\\"≧̸\\\",\\\"nge\\\":\\\"≱\\\",\\\"ngeq\\\":\\\"≱\\\",\\\"ngeqq\\\":\\\"≧̸\\\",\\\"ngeqslant\\\":\\\"⩾̸\\\",\\\"nges\\\":\\\"⩾̸\\\",\\\"nGg\\\":\\\"⋙̸\\\",\\\"ngsim\\\":\\\"≵\\\",\\\"nGt\\\":\\\"≫⃒\\\",\\\"ngt\\\":\\\"≯\\\",\\\"ngtr\\\":\\\"≯\\\",\\\"nGtv\\\":\\\"≫̸\\\",\\\"nharr\\\":\\\"↮\\\",\\\"nhArr\\\":\\\"⇎\\\",\\\"nhpar\\\":\\\"⫲\\\",\\\"ni\\\":\\\"∋\\\",\\\"nis\\\":\\\"⋼\\\",\\\"nisd\\\":\\\"⋺\\\",\\\"niv\\\":\\\"∋\\\",\\\"NJcy\\\":\\\"Њ\\\",\\\"njcy\\\":\\\"њ\\\",\\\"nlarr\\\":\\\"↚\\\",\\\"nlArr\\\":\\\"⇍\\\",\\\"nldr\\\":\\\"‥\\\",\\\"nlE\\\":\\\"≦̸\\\",\\\"nle\\\":\\\"≰\\\",\\\"nleftarrow\\\":\\\"↚\\\",\\\"nLeftarrow\\\":\\\"⇍\\\",\\\"nleftrightarrow\\\":\\\"↮\\\",\\\"nLeftrightarrow\\\":\\\"⇎\\\",\\\"nleq\\\":\\\"≰\\\",\\\"nleqq\\\":\\\"≦̸\\\",\\\"nleqslant\\\":\\\"⩽̸\\\",\\\"nles\\\":\\\"⩽̸\\\",\\\"nless\\\":\\\"≮\\\",\\\"nLl\\\":\\\"⋘̸\\\",\\\"nlsim\\\":\\\"≴\\\",\\\"nLt\\\":\\\"≪⃒\\\",\\\"nlt\\\":\\\"≮\\\",\\\"nltri\\\":\\\"⋪\\\",\\\"nltrie\\\":\\\"⋬\\\",\\\"nLtv\\\":\\\"≪̸\\\",\\\"nmid\\\":\\\"∤\\\",\\\"NoBreak\\\":\\\"⁠\\\",\\\"NonBreakingSpace\\\":\\\" \\\",\\\"nopf\\\":\\\"𝕟\\\",\\\"Nopf\\\":\\\"ℕ\\\",\\\"Not\\\":\\\"⫬\\\",\\\"not\\\":\\\"¬\\\",\\\"NotCongruent\\\":\\\"≢\\\",\\\"NotCupCap\\\":\\\"≭\\\",\\\"NotDoubleVerticalBar\\\":\\\"∦\\\",\\\"NotElement\\\":\\\"∉\\\",\\\"NotEqual\\\":\\\"≠\\\",\\\"NotEqualTilde\\\":\\\"≂̸\\\",\\\"NotExists\\\":\\\"∄\\\",\\\"NotGreater\\\":\\\"≯\\\",\\\"NotGreaterEqual\\\":\\\"≱\\\",\\\"NotGreaterFullEqual\\\":\\\"≧̸\\\",\\\"NotGreaterGreater\\\":\\\"≫̸\\\",\\\"NotGreaterLess\\\":\\\"≹\\\",\\\"NotGreaterSlantEqual\\\":\\\"⩾̸\\\",\\\"NotGreaterTilde\\\":\\\"≵\\\",\\\"NotHumpDownHump\\\":\\\"≎̸\\\",\\\"NotHumpEqual\\\":\\\"≏̸\\\",\\\"notin\\\":\\\"∉\\\",\\\"notindot\\\":\\\"⋵̸\\\",\\\"notinE\\\":\\\"⋹̸\\\",\\\"notinva\\\":\\\"∉\\\",\\\"notinvb\\\":\\\"⋷\\\",\\\"notinvc\\\":\\\"⋶\\\",\\\"NotLeftTriangleBar\\\":\\\"⧏̸\\\",\\\"NotLeftTriangle\\\":\\\"⋪\\\",\\\"NotLeftTriangleEqual\\\":\\\"⋬\\\",\\\"NotLess\\\":\\\"≮\\\",\\\"NotLessEqual\\\":\\\"≰\\\",\\\"NotLessGreater\\\":\\\"≸\\\",\\\"NotLessLess\\\":\\\"≪̸\\\",\\\"NotLessSlantEqual\\\":\\\"⩽̸\\\",\\\"NotLessTilde\\\":\\\"≴\\\",\\\"NotNestedGreaterGreater\\\":\\\"⪢̸\\\",\\\"NotNestedLessLess\\\":\\\"⪡̸\\\",\\\"notni\\\":\\\"∌\\\",\\\"notniva\\\":\\\"∌\\\",\\\"notnivb\\\":\\\"⋾\\\",\\\"notnivc\\\":\\\"⋽\\\",\\\"NotPrecedes\\\":\\\"⊀\\\",\\\"NotPrecedesEqual\\\":\\\"⪯̸\\\",\\\"NotPrecedesSlantEqual\\\":\\\"⋠\\\",\\\"NotReverseElement\\\":\\\"∌\\\",\\\"NotRightTriangleBar\\\":\\\"⧐̸\\\",\\\"NotRightTriangle\\\":\\\"⋫\\\",\\\"NotRightTriangleEqual\\\":\\\"⋭\\\",\\\"NotSquareSubset\\\":\\\"⊏̸\\\",\\\"NotSquareSubsetEqual\\\":\\\"⋢\\\",\\\"NotSquareSuperset\\\":\\\"⊐̸\\\",\\\"NotSquareSupersetEqual\\\":\\\"⋣\\\",\\\"NotSubset\\\":\\\"⊂⃒\\\",\\\"NotSubsetEqual\\\":\\\"⊈\\\",\\\"NotSucceeds\\\":\\\"⊁\\\",\\\"NotSucceedsEqual\\\":\\\"⪰̸\\\",\\\"NotSucceedsSlantEqual\\\":\\\"⋡\\\",\\\"NotSucceedsTilde\\\":\\\"≿̸\\\",\\\"NotSuperset\\\":\\\"⊃⃒\\\",\\\"NotSupersetEqual\\\":\\\"⊉\\\",\\\"NotTilde\\\":\\\"≁\\\",\\\"NotTildeEqual\\\":\\\"≄\\\",\\\"NotTildeFullEqual\\\":\\\"≇\\\",\\\"NotTildeTilde\\\":\\\"≉\\\",\\\"NotVerticalBar\\\":\\\"∤\\\",\\\"nparallel\\\":\\\"∦\\\",\\\"npar\\\":\\\"∦\\\",\\\"nparsl\\\":\\\"⫽⃥\\\",\\\"npart\\\":\\\"∂̸\\\",\\\"npolint\\\":\\\"⨔\\\",\\\"npr\\\":\\\"⊀\\\",\\\"nprcue\\\":\\\"⋠\\\",\\\"nprec\\\":\\\"⊀\\\",\\\"npreceq\\\":\\\"⪯̸\\\",\\\"npre\\\":\\\"⪯̸\\\",\\\"nrarrc\\\":\\\"⤳̸\\\",\\\"nrarr\\\":\\\"↛\\\",\\\"nrArr\\\":\\\"⇏\\\",\\\"nrarrw\\\":\\\"↝̸\\\",\\\"nrightarrow\\\":\\\"↛\\\",\\\"nRightarrow\\\":\\\"⇏\\\",\\\"nrtri\\\":\\\"⋫\\\",\\\"nrtrie\\\":\\\"⋭\\\",\\\"nsc\\\":\\\"⊁\\\",\\\"nsccue\\\":\\\"⋡\\\",\\\"nsce\\\":\\\"⪰̸\\\",\\\"Nscr\\\":\\\"𝒩\\\",\\\"nscr\\\":\\\"𝓃\\\",\\\"nshortmid\\\":\\\"∤\\\",\\\"nshortparallel\\\":\\\"∦\\\",\\\"nsim\\\":\\\"≁\\\",\\\"nsime\\\":\\\"≄\\\",\\\"nsimeq\\\":\\\"≄\\\",\\\"nsmid\\\":\\\"∤\\\",\\\"nspar\\\":\\\"∦\\\",\\\"nsqsube\\\":\\\"⋢\\\",\\\"nsqsupe\\\":\\\"⋣\\\",\\\"nsub\\\":\\\"⊄\\\",\\\"nsubE\\\":\\\"⫅̸\\\",\\\"nsube\\\":\\\"⊈\\\",\\\"nsubset\\\":\\\"⊂⃒\\\",\\\"nsubseteq\\\":\\\"⊈\\\",\\\"nsubseteqq\\\":\\\"⫅̸\\\",\\\"nsucc\\\":\\\"⊁\\\",\\\"nsucceq\\\":\\\"⪰̸\\\",\\\"nsup\\\":\\\"⊅\\\",\\\"nsupE\\\":\\\"⫆̸\\\",\\\"nsupe\\\":\\\"⊉\\\",\\\"nsupset\\\":\\\"⊃⃒\\\",\\\"nsupseteq\\\":\\\"⊉\\\",\\\"nsupseteqq\\\":\\\"⫆̸\\\",\\\"ntgl\\\":\\\"≹\\\",\\\"Ntilde\\\":\\\"Ñ\\\",\\\"ntilde\\\":\\\"ñ\\\",\\\"ntlg\\\":\\\"≸\\\",\\\"ntriangleleft\\\":\\\"⋪\\\",\\\"ntrianglelefteq\\\":\\\"⋬\\\",\\\"ntriangleright\\\":\\\"⋫\\\",\\\"ntrianglerighteq\\\":\\\"⋭\\\",\\\"Nu\\\":\\\"Ν\\\",\\\"nu\\\":\\\"ν\\\",\\\"num\\\":\\\"#\\\",\\\"numero\\\":\\\"№\\\",\\\"numsp\\\":\\\" \\\",\\\"nvap\\\":\\\"≍⃒\\\",\\\"nvdash\\\":\\\"⊬\\\",\\\"nvDash\\\":\\\"⊭\\\",\\\"nVdash\\\":\\\"⊮\\\",\\\"nVDash\\\":\\\"⊯\\\",\\\"nvge\\\":\\\"≥⃒\\\",\\\"nvgt\\\":\\\">⃒\\\",\\\"nvHarr\\\":\\\"⤄\\\",\\\"nvinfin\\\":\\\"⧞\\\",\\\"nvlArr\\\":\\\"⤂\\\",\\\"nvle\\\":\\\"≤⃒\\\",\\\"nvlt\\\":\\\"<⃒\\\",\\\"nvltrie\\\":\\\"⊴⃒\\\",\\\"nvrArr\\\":\\\"⤃\\\",\\\"nvrtrie\\\":\\\"⊵⃒\\\",\\\"nvsim\\\":\\\"∼⃒\\\",\\\"nwarhk\\\":\\\"⤣\\\",\\\"nwarr\\\":\\\"↖\\\",\\\"nwArr\\\":\\\"⇖\\\",\\\"nwarrow\\\":\\\"↖\\\",\\\"nwnear\\\":\\\"⤧\\\",\\\"Oacute\\\":\\\"Ó\\\",\\\"oacute\\\":\\\"ó\\\",\\\"oast\\\":\\\"⊛\\\",\\\"Ocirc\\\":\\\"Ô\\\",\\\"ocirc\\\":\\\"ô\\\",\\\"ocir\\\":\\\"⊚\\\",\\\"Ocy\\\":\\\"О\\\",\\\"ocy\\\":\\\"о\\\",\\\"odash\\\":\\\"⊝\\\",\\\"Odblac\\\":\\\"Ő\\\",\\\"odblac\\\":\\\"ő\\\",\\\"odiv\\\":\\\"⨸\\\",\\\"odot\\\":\\\"⊙\\\",\\\"odsold\\\":\\\"⦼\\\",\\\"OElig\\\":\\\"Œ\\\",\\\"oelig\\\":\\\"œ\\\",\\\"ofcir\\\":\\\"⦿\\\",\\\"Ofr\\\":\\\"𝔒\\\",\\\"ofr\\\":\\\"𝔬\\\",\\\"ogon\\\":\\\"˛\\\",\\\"Ograve\\\":\\\"Ò\\\",\\\"ograve\\\":\\\"ò\\\",\\\"ogt\\\":\\\"⧁\\\",\\\"ohbar\\\":\\\"⦵\\\",\\\"ohm\\\":\\\"Ω\\\",\\\"oint\\\":\\\"∮\\\",\\\"olarr\\\":\\\"↺\\\",\\\"olcir\\\":\\\"⦾\\\",\\\"olcross\\\":\\\"⦻\\\",\\\"oline\\\":\\\"‾\\\",\\\"olt\\\":\\\"⧀\\\",\\\"Omacr\\\":\\\"Ō\\\",\\\"omacr\\\":\\\"ō\\\",\\\"Omega\\\":\\\"Ω\\\",\\\"omega\\\":\\\"ω\\\",\\\"Omicron\\\":\\\"Ο\\\",\\\"omicron\\\":\\\"ο\\\",\\\"omid\\\":\\\"⦶\\\",\\\"ominus\\\":\\\"⊖\\\",\\\"Oopf\\\":\\\"𝕆\\\",\\\"oopf\\\":\\\"𝕠\\\",\\\"opar\\\":\\\"⦷\\\",\\\"OpenCurlyDoubleQuote\\\":\\\"“\\\",\\\"OpenCurlyQuote\\\":\\\"‘\\\",\\\"operp\\\":\\\"⦹\\\",\\\"oplus\\\":\\\"⊕\\\",\\\"orarr\\\":\\\"↻\\\",\\\"Or\\\":\\\"⩔\\\",\\\"or\\\":\\\"∨\\\",\\\"ord\\\":\\\"⩝\\\",\\\"order\\\":\\\"ℴ\\\",\\\"orderof\\\":\\\"ℴ\\\",\\\"ordf\\\":\\\"ª\\\",\\\"ordm\\\":\\\"º\\\",\\\"origof\\\":\\\"⊶\\\",\\\"oror\\\":\\\"⩖\\\",\\\"orslope\\\":\\\"⩗\\\",\\\"orv\\\":\\\"⩛\\\",\\\"oS\\\":\\\"Ⓢ\\\",\\\"Oscr\\\":\\\"𝒪\\\",\\\"oscr\\\":\\\"ℴ\\\",\\\"Oslash\\\":\\\"Ø\\\",\\\"oslash\\\":\\\"ø\\\",\\\"osol\\\":\\\"⊘\\\",\\\"Otilde\\\":\\\"Õ\\\",\\\"otilde\\\":\\\"õ\\\",\\\"otimesas\\\":\\\"⨶\\\",\\\"Otimes\\\":\\\"⨷\\\",\\\"otimes\\\":\\\"⊗\\\",\\\"Ouml\\\":\\\"Ö\\\",\\\"ouml\\\":\\\"ö\\\",\\\"ovbar\\\":\\\"⌽\\\",\\\"OverBar\\\":\\\"‾\\\",\\\"OverBrace\\\":\\\"⏞\\\",\\\"OverBracket\\\":\\\"⎴\\\",\\\"OverParenthesis\\\":\\\"⏜\\\",\\\"para\\\":\\\"¶\\\",\\\"parallel\\\":\\\"∥\\\",\\\"par\\\":\\\"∥\\\",\\\"parsim\\\":\\\"⫳\\\",\\\"parsl\\\":\\\"⫽\\\",\\\"part\\\":\\\"∂\\\",\\\"PartialD\\\":\\\"∂\\\",\\\"Pcy\\\":\\\"П\\\",\\\"pcy\\\":\\\"п\\\",\\\"percnt\\\":\\\"%\\\",\\\"period\\\":\\\".\\\",\\\"permil\\\":\\\"‰\\\",\\\"perp\\\":\\\"⊥\\\",\\\"pertenk\\\":\\\"‱\\\",\\\"Pfr\\\":\\\"𝔓\\\",\\\"pfr\\\":\\\"𝔭\\\",\\\"Phi\\\":\\\"Φ\\\",\\\"phi\\\":\\\"φ\\\",\\\"phiv\\\":\\\"ϕ\\\",\\\"phmmat\\\":\\\"ℳ\\\",\\\"phone\\\":\\\"☎\\\",\\\"Pi\\\":\\\"Π\\\",\\\"pi\\\":\\\"π\\\",\\\"pitchfork\\\":\\\"⋔\\\",\\\"piv\\\":\\\"ϖ\\\",\\\"planck\\\":\\\"ℏ\\\",\\\"planckh\\\":\\\"ℎ\\\",\\\"plankv\\\":\\\"ℏ\\\",\\\"plusacir\\\":\\\"⨣\\\",\\\"plusb\\\":\\\"⊞\\\",\\\"pluscir\\\":\\\"⨢\\\",\\\"plus\\\":\\\"+\\\",\\\"plusdo\\\":\\\"∔\\\",\\\"plusdu\\\":\\\"⨥\\\",\\\"pluse\\\":\\\"⩲\\\",\\\"PlusMinus\\\":\\\"±\\\",\\\"plusmn\\\":\\\"±\\\",\\\"plussim\\\":\\\"⨦\\\",\\\"plustwo\\\":\\\"⨧\\\",\\\"pm\\\":\\\"±\\\",\\\"Poincareplane\\\":\\\"ℌ\\\",\\\"pointint\\\":\\\"⨕\\\",\\\"popf\\\":\\\"𝕡\\\",\\\"Popf\\\":\\\"ℙ\\\",\\\"pound\\\":\\\"£\\\",\\\"prap\\\":\\\"⪷\\\",\\\"Pr\\\":\\\"⪻\\\",\\\"pr\\\":\\\"≺\\\",\\\"prcue\\\":\\\"≼\\\",\\\"precapprox\\\":\\\"⪷\\\",\\\"prec\\\":\\\"≺\\\",\\\"preccurlyeq\\\":\\\"≼\\\",\\\"Precedes\\\":\\\"≺\\\",\\\"PrecedesEqual\\\":\\\"⪯\\\",\\\"PrecedesSlantEqual\\\":\\\"≼\\\",\\\"PrecedesTilde\\\":\\\"≾\\\",\\\"preceq\\\":\\\"⪯\\\",\\\"precnapprox\\\":\\\"⪹\\\",\\\"precneqq\\\":\\\"⪵\\\",\\\"precnsim\\\":\\\"⋨\\\",\\\"pre\\\":\\\"⪯\\\",\\\"prE\\\":\\\"⪳\\\",\\\"precsim\\\":\\\"≾\\\",\\\"prime\\\":\\\"′\\\",\\\"Prime\\\":\\\"″\\\",\\\"primes\\\":\\\"ℙ\\\",\\\"prnap\\\":\\\"⪹\\\",\\\"prnE\\\":\\\"⪵\\\",\\\"prnsim\\\":\\\"⋨\\\",\\\"prod\\\":\\\"∏\\\",\\\"Product\\\":\\\"∏\\\",\\\"profalar\\\":\\\"⌮\\\",\\\"profline\\\":\\\"⌒\\\",\\\"profsurf\\\":\\\"⌓\\\",\\\"prop\\\":\\\"∝\\\",\\\"Proportional\\\":\\\"∝\\\",\\\"Proportion\\\":\\\"∷\\\",\\\"propto\\\":\\\"∝\\\",\\\"prsim\\\":\\\"≾\\\",\\\"prurel\\\":\\\"⊰\\\",\\\"Pscr\\\":\\\"𝒫\\\",\\\"pscr\\\":\\\"𝓅\\\",\\\"Psi\\\":\\\"Ψ\\\",\\\"psi\\\":\\\"ψ\\\",\\\"puncsp\\\":\\\" \\\",\\\"Qfr\\\":\\\"𝔔\\\",\\\"qfr\\\":\\\"𝔮\\\",\\\"qint\\\":\\\"⨌\\\",\\\"qopf\\\":\\\"𝕢\\\",\\\"Qopf\\\":\\\"ℚ\\\",\\\"qprime\\\":\\\"⁗\\\",\\\"Qscr\\\":\\\"𝒬\\\",\\\"qscr\\\":\\\"𝓆\\\",\\\"quaternions\\\":\\\"ℍ\\\",\\\"quatint\\\":\\\"⨖\\\",\\\"quest\\\":\\\"?\\\",\\\"questeq\\\":\\\"≟\\\",\\\"quot\\\":\\\"\\\\\\\"\\\",\\\"QUOT\\\":\\\"\\\\\\\"\\\",\\\"rAarr\\\":\\\"⇛\\\",\\\"race\\\":\\\"∽̱\\\",\\\"Racute\\\":\\\"Ŕ\\\",\\\"racute\\\":\\\"ŕ\\\",\\\"radic\\\":\\\"√\\\",\\\"raemptyv\\\":\\\"⦳\\\",\\\"rang\\\":\\\"⟩\\\",\\\"Rang\\\":\\\"⟫\\\",\\\"rangd\\\":\\\"⦒\\\",\\\"range\\\":\\\"⦥\\\",\\\"rangle\\\":\\\"⟩\\\",\\\"raquo\\\":\\\"»\\\",\\\"rarrap\\\":\\\"⥵\\\",\\\"rarrb\\\":\\\"⇥\\\",\\\"rarrbfs\\\":\\\"⤠\\\",\\\"rarrc\\\":\\\"⤳\\\",\\\"rarr\\\":\\\"→\\\",\\\"Rarr\\\":\\\"↠\\\",\\\"rArr\\\":\\\"⇒\\\",\\\"rarrfs\\\":\\\"⤞\\\",\\\"rarrhk\\\":\\\"↪\\\",\\\"rarrlp\\\":\\\"↬\\\",\\\"rarrpl\\\":\\\"⥅\\\",\\\"rarrsim\\\":\\\"⥴\\\",\\\"Rarrtl\\\":\\\"⤖\\\",\\\"rarrtl\\\":\\\"↣\\\",\\\"rarrw\\\":\\\"↝\\\",\\\"ratail\\\":\\\"⤚\\\",\\\"rAtail\\\":\\\"⤜\\\",\\\"ratio\\\":\\\"∶\\\",\\\"rationals\\\":\\\"ℚ\\\",\\\"rbarr\\\":\\\"⤍\\\",\\\"rBarr\\\":\\\"⤏\\\",\\\"RBarr\\\":\\\"⤐\\\",\\\"rbbrk\\\":\\\"❳\\\",\\\"rbrace\\\":\\\"}\\\",\\\"rbrack\\\":\\\"]\\\",\\\"rbrke\\\":\\\"⦌\\\",\\\"rbrksld\\\":\\\"⦎\\\",\\\"rbrkslu\\\":\\\"⦐\\\",\\\"Rcaron\\\":\\\"Ř\\\",\\\"rcaron\\\":\\\"ř\\\",\\\"Rcedil\\\":\\\"Ŗ\\\",\\\"rcedil\\\":\\\"ŗ\\\",\\\"rceil\\\":\\\"⌉\\\",\\\"rcub\\\":\\\"}\\\",\\\"Rcy\\\":\\\"Р\\\",\\\"rcy\\\":\\\"р\\\",\\\"rdca\\\":\\\"⤷\\\",\\\"rdldhar\\\":\\\"⥩\\\",\\\"rdquo\\\":\\\"”\\\",\\\"rdquor\\\":\\\"”\\\",\\\"rdsh\\\":\\\"↳\\\",\\\"real\\\":\\\"ℜ\\\",\\\"realine\\\":\\\"ℛ\\\",\\\"realpart\\\":\\\"ℜ\\\",\\\"reals\\\":\\\"ℝ\\\",\\\"Re\\\":\\\"ℜ\\\",\\\"rect\\\":\\\"▭\\\",\\\"reg\\\":\\\"®\\\",\\\"REG\\\":\\\"®\\\",\\\"ReverseElement\\\":\\\"∋\\\",\\\"ReverseEquilibrium\\\":\\\"⇋\\\",\\\"ReverseUpEquilibrium\\\":\\\"⥯\\\",\\\"rfisht\\\":\\\"⥽\\\",\\\"rfloor\\\":\\\"⌋\\\",\\\"rfr\\\":\\\"𝔯\\\",\\\"Rfr\\\":\\\"ℜ\\\",\\\"rHar\\\":\\\"⥤\\\",\\\"rhard\\\":\\\"⇁\\\",\\\"rharu\\\":\\\"⇀\\\",\\\"rharul\\\":\\\"⥬\\\",\\\"Rho\\\":\\\"Ρ\\\",\\\"rho\\\":\\\"ρ\\\",\\\"rhov\\\":\\\"ϱ\\\",\\\"RightAngleBracket\\\":\\\"⟩\\\",\\\"RightArrowBar\\\":\\\"⇥\\\",\\\"rightarrow\\\":\\\"→\\\",\\\"RightArrow\\\":\\\"→\\\",\\\"Rightarrow\\\":\\\"⇒\\\",\\\"RightArrowLeftArrow\\\":\\\"⇄\\\",\\\"rightarrowtail\\\":\\\"↣\\\",\\\"RightCeiling\\\":\\\"⌉\\\",\\\"RightDoubleBracket\\\":\\\"⟧\\\",\\\"RightDownTeeVector\\\":\\\"⥝\\\",\\\"RightDownVectorBar\\\":\\\"⥕\\\",\\\"RightDownVector\\\":\\\"⇂\\\",\\\"RightFloor\\\":\\\"⌋\\\",\\\"rightharpoondown\\\":\\\"⇁\\\",\\\"rightharpoonup\\\":\\\"⇀\\\",\\\"rightleftarrows\\\":\\\"⇄\\\",\\\"rightleftharpoons\\\":\\\"⇌\\\",\\\"rightrightarrows\\\":\\\"⇉\\\",\\\"rightsquigarrow\\\":\\\"↝\\\",\\\"RightTeeArrow\\\":\\\"↦\\\",\\\"RightTee\\\":\\\"⊢\\\",\\\"RightTeeVector\\\":\\\"⥛\\\",\\\"rightthreetimes\\\":\\\"⋌\\\",\\\"RightTriangleBar\\\":\\\"⧐\\\",\\\"RightTriangle\\\":\\\"⊳\\\",\\\"RightTriangleEqual\\\":\\\"⊵\\\",\\\"RightUpDownVector\\\":\\\"⥏\\\",\\\"RightUpTeeVector\\\":\\\"⥜\\\",\\\"RightUpVectorBar\\\":\\\"⥔\\\",\\\"RightUpVector\\\":\\\"↾\\\",\\\"RightVectorBar\\\":\\\"⥓\\\",\\\"RightVector\\\":\\\"⇀\\\",\\\"ring\\\":\\\"˚\\\",\\\"risingdotseq\\\":\\\"≓\\\",\\\"rlarr\\\":\\\"⇄\\\",\\\"rlhar\\\":\\\"⇌\\\",\\\"rlm\\\":\\\"‏\\\",\\\"rmoustache\\\":\\\"⎱\\\",\\\"rmoust\\\":\\\"⎱\\\",\\\"rnmid\\\":\\\"⫮\\\",\\\"roang\\\":\\\"⟭\\\",\\\"roarr\\\":\\\"⇾\\\",\\\"robrk\\\":\\\"⟧\\\",\\\"ropar\\\":\\\"⦆\\\",\\\"ropf\\\":\\\"𝕣\\\",\\\"Ropf\\\":\\\"ℝ\\\",\\\"roplus\\\":\\\"⨮\\\",\\\"rotimes\\\":\\\"⨵\\\",\\\"RoundImplies\\\":\\\"⥰\\\",\\\"rpar\\\":\\\")\\\",\\\"rpargt\\\":\\\"⦔\\\",\\\"rppolint\\\":\\\"⨒\\\",\\\"rrarr\\\":\\\"⇉\\\",\\\"Rrightarrow\\\":\\\"⇛\\\",\\\"rsaquo\\\":\\\"›\\\",\\\"rscr\\\":\\\"𝓇\\\",\\\"Rscr\\\":\\\"ℛ\\\",\\\"rsh\\\":\\\"↱\\\",\\\"Rsh\\\":\\\"↱\\\",\\\"rsqb\\\":\\\"]\\\",\\\"rsquo\\\":\\\"’\\\",\\\"rsquor\\\":\\\"’\\\",\\\"rthree\\\":\\\"⋌\\\",\\\"rtimes\\\":\\\"⋊\\\",\\\"rtri\\\":\\\"▹\\\",\\\"rtrie\\\":\\\"⊵\\\",\\\"rtrif\\\":\\\"▸\\\",\\\"rtriltri\\\":\\\"⧎\\\",\\\"RuleDelayed\\\":\\\"⧴\\\",\\\"ruluhar\\\":\\\"⥨\\\",\\\"rx\\\":\\\"℞\\\",\\\"Sacute\\\":\\\"Ś\\\",\\\"sacute\\\":\\\"ś\\\",\\\"sbquo\\\":\\\"‚\\\",\\\"scap\\\":\\\"⪸\\\",\\\"Scaron\\\":\\\"Š\\\",\\\"scaron\\\":\\\"š\\\",\\\"Sc\\\":\\\"⪼\\\",\\\"sc\\\":\\\"≻\\\",\\\"sccue\\\":\\\"≽\\\",\\\"sce\\\":\\\"⪰\\\",\\\"scE\\\":\\\"⪴\\\",\\\"Scedil\\\":\\\"Ş\\\",\\\"scedil\\\":\\\"ş\\\",\\\"Scirc\\\":\\\"Ŝ\\\",\\\"scirc\\\":\\\"ŝ\\\",\\\"scnap\\\":\\\"⪺\\\",\\\"scnE\\\":\\\"⪶\\\",\\\"scnsim\\\":\\\"⋩\\\",\\\"scpolint\\\":\\\"⨓\\\",\\\"scsim\\\":\\\"≿\\\",\\\"Scy\\\":\\\"С\\\",\\\"scy\\\":\\\"с\\\",\\\"sdotb\\\":\\\"⊡\\\",\\\"sdot\\\":\\\"⋅\\\",\\\"sdote\\\":\\\"⩦\\\",\\\"searhk\\\":\\\"⤥\\\",\\\"searr\\\":\\\"↘\\\",\\\"seArr\\\":\\\"⇘\\\",\\\"searrow\\\":\\\"↘\\\",\\\"sect\\\":\\\"§\\\",\\\"semi\\\":\\\";\\\",\\\"seswar\\\":\\\"⤩\\\",\\\"setminus\\\":\\\"∖\\\",\\\"setmn\\\":\\\"∖\\\",\\\"sext\\\":\\\"✶\\\",\\\"Sfr\\\":\\\"𝔖\\\",\\\"sfr\\\":\\\"𝔰\\\",\\\"sfrown\\\":\\\"⌢\\\",\\\"sharp\\\":\\\"♯\\\",\\\"SHCHcy\\\":\\\"Щ\\\",\\\"shchcy\\\":\\\"щ\\\",\\\"SHcy\\\":\\\"Ш\\\",\\\"shcy\\\":\\\"ш\\\",\\\"ShortDownArrow\\\":\\\"↓\\\",\\\"ShortLeftArrow\\\":\\\"←\\\",\\\"shortmid\\\":\\\"∣\\\",\\\"shortparallel\\\":\\\"∥\\\",\\\"ShortRightArrow\\\":\\\"→\\\",\\\"ShortUpArrow\\\":\\\"↑\\\",\\\"shy\\\":\\\"­\\\",\\\"Sigma\\\":\\\"Σ\\\",\\\"sigma\\\":\\\"σ\\\",\\\"sigmaf\\\":\\\"ς\\\",\\\"sigmav\\\":\\\"ς\\\",\\\"sim\\\":\\\"∼\\\",\\\"simdot\\\":\\\"⩪\\\",\\\"sime\\\":\\\"≃\\\",\\\"simeq\\\":\\\"≃\\\",\\\"simg\\\":\\\"⪞\\\",\\\"simgE\\\":\\\"⪠\\\",\\\"siml\\\":\\\"⪝\\\",\\\"simlE\\\":\\\"⪟\\\",\\\"simne\\\":\\\"≆\\\",\\\"simplus\\\":\\\"⨤\\\",\\\"simrarr\\\":\\\"⥲\\\",\\\"slarr\\\":\\\"←\\\",\\\"SmallCircle\\\":\\\"∘\\\",\\\"smallsetminus\\\":\\\"∖\\\",\\\"smashp\\\":\\\"⨳\\\",\\\"smeparsl\\\":\\\"⧤\\\",\\\"smid\\\":\\\"∣\\\",\\\"smile\\\":\\\"⌣\\\",\\\"smt\\\":\\\"⪪\\\",\\\"smte\\\":\\\"⪬\\\",\\\"smtes\\\":\\\"⪬︀\\\",\\\"SOFTcy\\\":\\\"Ь\\\",\\\"softcy\\\":\\\"ь\\\",\\\"solbar\\\":\\\"⌿\\\",\\\"solb\\\":\\\"⧄\\\",\\\"sol\\\":\\\"/\\\",\\\"Sopf\\\":\\\"𝕊\\\",\\\"sopf\\\":\\\"𝕤\\\",\\\"spades\\\":\\\"♠\\\",\\\"spadesuit\\\":\\\"♠\\\",\\\"spar\\\":\\\"∥\\\",\\\"sqcap\\\":\\\"⊓\\\",\\\"sqcaps\\\":\\\"⊓︀\\\",\\\"sqcup\\\":\\\"⊔\\\",\\\"sqcups\\\":\\\"⊔︀\\\",\\\"Sqrt\\\":\\\"√\\\",\\\"sqsub\\\":\\\"⊏\\\",\\\"sqsube\\\":\\\"⊑\\\",\\\"sqsubset\\\":\\\"⊏\\\",\\\"sqsubseteq\\\":\\\"⊑\\\",\\\"sqsup\\\":\\\"⊐\\\",\\\"sqsupe\\\":\\\"⊒\\\",\\\"sqsupset\\\":\\\"⊐\\\",\\\"sqsupseteq\\\":\\\"⊒\\\",\\\"square\\\":\\\"□\\\",\\\"Square\\\":\\\"□\\\",\\\"SquareIntersection\\\":\\\"⊓\\\",\\\"SquareSubset\\\":\\\"⊏\\\",\\\"SquareSubsetEqual\\\":\\\"⊑\\\",\\\"SquareSuperset\\\":\\\"⊐\\\",\\\"SquareSupersetEqual\\\":\\\"⊒\\\",\\\"SquareUnion\\\":\\\"⊔\\\",\\\"squarf\\\":\\\"▪\\\",\\\"squ\\\":\\\"□\\\",\\\"squf\\\":\\\"▪\\\",\\\"srarr\\\":\\\"→\\\",\\\"Sscr\\\":\\\"𝒮\\\",\\\"sscr\\\":\\\"𝓈\\\",\\\"ssetmn\\\":\\\"∖\\\",\\\"ssmile\\\":\\\"⌣\\\",\\\"sstarf\\\":\\\"⋆\\\",\\\"Star\\\":\\\"⋆\\\",\\\"star\\\":\\\"☆\\\",\\\"starf\\\":\\\"★\\\",\\\"straightepsilon\\\":\\\"ϵ\\\",\\\"straightphi\\\":\\\"ϕ\\\",\\\"strns\\\":\\\"¯\\\",\\\"sub\\\":\\\"⊂\\\",\\\"Sub\\\":\\\"⋐\\\",\\\"subdot\\\":\\\"⪽\\\",\\\"subE\\\":\\\"⫅\\\",\\\"sube\\\":\\\"⊆\\\",\\\"subedot\\\":\\\"⫃\\\",\\\"submult\\\":\\\"⫁\\\",\\\"subnE\\\":\\\"⫋\\\",\\\"subne\\\":\\\"⊊\\\",\\\"subplus\\\":\\\"⪿\\\",\\\"subrarr\\\":\\\"⥹\\\",\\\"subset\\\":\\\"⊂\\\",\\\"Subset\\\":\\\"⋐\\\",\\\"subseteq\\\":\\\"⊆\\\",\\\"subseteqq\\\":\\\"⫅\\\",\\\"SubsetEqual\\\":\\\"⊆\\\",\\\"subsetneq\\\":\\\"⊊\\\",\\\"subsetneqq\\\":\\\"⫋\\\",\\\"subsim\\\":\\\"⫇\\\",\\\"subsub\\\":\\\"⫕\\\",\\\"subsup\\\":\\\"⫓\\\",\\\"succapprox\\\":\\\"⪸\\\",\\\"succ\\\":\\\"≻\\\",\\\"succcurlyeq\\\":\\\"≽\\\",\\\"Succeeds\\\":\\\"≻\\\",\\\"SucceedsEqual\\\":\\\"⪰\\\",\\\"SucceedsSlantEqual\\\":\\\"≽\\\",\\\"SucceedsTilde\\\":\\\"≿\\\",\\\"succeq\\\":\\\"⪰\\\",\\\"succnapprox\\\":\\\"⪺\\\",\\\"succneqq\\\":\\\"⪶\\\",\\\"succnsim\\\":\\\"⋩\\\",\\\"succsim\\\":\\\"≿\\\",\\\"SuchThat\\\":\\\"∋\\\",\\\"sum\\\":\\\"∑\\\",\\\"Sum\\\":\\\"∑\\\",\\\"sung\\\":\\\"♪\\\",\\\"sup1\\\":\\\"¹\\\",\\\"sup2\\\":\\\"²\\\",\\\"sup3\\\":\\\"³\\\",\\\"sup\\\":\\\"⊃\\\",\\\"Sup\\\":\\\"⋑\\\",\\\"supdot\\\":\\\"⪾\\\",\\\"supdsub\\\":\\\"⫘\\\",\\\"supE\\\":\\\"⫆\\\",\\\"supe\\\":\\\"⊇\\\",\\\"supedot\\\":\\\"⫄\\\",\\\"Superset\\\":\\\"⊃\\\",\\\"SupersetEqual\\\":\\\"⊇\\\",\\\"suphsol\\\":\\\"⟉\\\",\\\"suphsub\\\":\\\"⫗\\\",\\\"suplarr\\\":\\\"⥻\\\",\\\"supmult\\\":\\\"⫂\\\",\\\"supnE\\\":\\\"⫌\\\",\\\"supne\\\":\\\"⊋\\\",\\\"supplus\\\":\\\"⫀\\\",\\\"supset\\\":\\\"⊃\\\",\\\"Supset\\\":\\\"⋑\\\",\\\"supseteq\\\":\\\"⊇\\\",\\\"supseteqq\\\":\\\"⫆\\\",\\\"supsetneq\\\":\\\"⊋\\\",\\\"supsetneqq\\\":\\\"⫌\\\",\\\"supsim\\\":\\\"⫈\\\",\\\"supsub\\\":\\\"⫔\\\",\\\"supsup\\\":\\\"⫖\\\",\\\"swarhk\\\":\\\"⤦\\\",\\\"swarr\\\":\\\"↙\\\",\\\"swArr\\\":\\\"⇙\\\",\\\"swarrow\\\":\\\"↙\\\",\\\"swnwar\\\":\\\"⤪\\\",\\\"szlig\\\":\\\"ß\\\",\\\"Tab\\\":\\\"\\\\t\\\",\\\"target\\\":\\\"⌖\\\",\\\"Tau\\\":\\\"Τ\\\",\\\"tau\\\":\\\"τ\\\",\\\"tbrk\\\":\\\"⎴\\\",\\\"Tcaron\\\":\\\"Ť\\\",\\\"tcaron\\\":\\\"ť\\\",\\\"Tcedil\\\":\\\"Ţ\\\",\\\"tcedil\\\":\\\"ţ\\\",\\\"Tcy\\\":\\\"Т\\\",\\\"tcy\\\":\\\"т\\\",\\\"tdot\\\":\\\"⃛\\\",\\\"telrec\\\":\\\"⌕\\\",\\\"Tfr\\\":\\\"𝔗\\\",\\\"tfr\\\":\\\"𝔱\\\",\\\"there4\\\":\\\"∴\\\",\\\"therefore\\\":\\\"∴\\\",\\\"Therefore\\\":\\\"∴\\\",\\\"Theta\\\":\\\"Θ\\\",\\\"theta\\\":\\\"θ\\\",\\\"thetasym\\\":\\\"ϑ\\\",\\\"thetav\\\":\\\"ϑ\\\",\\\"thickapprox\\\":\\\"≈\\\",\\\"thicksim\\\":\\\"∼\\\",\\\"ThickSpace\\\":\\\"  \\\",\\\"ThinSpace\\\":\\\" \\\",\\\"thinsp\\\":\\\" \\\",\\\"thkap\\\":\\\"≈\\\",\\\"thksim\\\":\\\"∼\\\",\\\"THORN\\\":\\\"Þ\\\",\\\"thorn\\\":\\\"þ\\\",\\\"tilde\\\":\\\"˜\\\",\\\"Tilde\\\":\\\"∼\\\",\\\"TildeEqual\\\":\\\"≃\\\",\\\"TildeFullEqual\\\":\\\"≅\\\",\\\"TildeTilde\\\":\\\"≈\\\",\\\"timesbar\\\":\\\"⨱\\\",\\\"timesb\\\":\\\"⊠\\\",\\\"times\\\":\\\"×\\\",\\\"timesd\\\":\\\"⨰\\\",\\\"tint\\\":\\\"∭\\\",\\\"toea\\\":\\\"⤨\\\",\\\"topbot\\\":\\\"⌶\\\",\\\"topcir\\\":\\\"⫱\\\",\\\"top\\\":\\\"⊤\\\",\\\"Topf\\\":\\\"𝕋\\\",\\\"topf\\\":\\\"𝕥\\\",\\\"topfork\\\":\\\"⫚\\\",\\\"tosa\\\":\\\"⤩\\\",\\\"tprime\\\":\\\"‴\\\",\\\"trade\\\":\\\"™\\\",\\\"TRADE\\\":\\\"™\\\",\\\"triangle\\\":\\\"▵\\\",\\\"triangledown\\\":\\\"▿\\\",\\\"triangleleft\\\":\\\"◃\\\",\\\"trianglelefteq\\\":\\\"⊴\\\",\\\"triangleq\\\":\\\"≜\\\",\\\"triangleright\\\":\\\"▹\\\",\\\"trianglerighteq\\\":\\\"⊵\\\",\\\"tridot\\\":\\\"◬\\\",\\\"trie\\\":\\\"≜\\\",\\\"triminus\\\":\\\"⨺\\\",\\\"TripleDot\\\":\\\"⃛\\\",\\\"triplus\\\":\\\"⨹\\\",\\\"trisb\\\":\\\"⧍\\\",\\\"tritime\\\":\\\"⨻\\\",\\\"trpezium\\\":\\\"⏢\\\",\\\"Tscr\\\":\\\"𝒯\\\",\\\"tscr\\\":\\\"𝓉\\\",\\\"TScy\\\":\\\"Ц\\\",\\\"tscy\\\":\\\"ц\\\",\\\"TSHcy\\\":\\\"Ћ\\\",\\\"tshcy\\\":\\\"ћ\\\",\\\"Tstrok\\\":\\\"Ŧ\\\",\\\"tstrok\\\":\\\"ŧ\\\",\\\"twixt\\\":\\\"≬\\\",\\\"twoheadleftarrow\\\":\\\"↞\\\",\\\"twoheadrightarrow\\\":\\\"↠\\\",\\\"Uacute\\\":\\\"Ú\\\",\\\"uacute\\\":\\\"ú\\\",\\\"uarr\\\":\\\"↑\\\",\\\"Uarr\\\":\\\"↟\\\",\\\"uArr\\\":\\\"⇑\\\",\\\"Uarrocir\\\":\\\"⥉\\\",\\\"Ubrcy\\\":\\\"Ў\\\",\\\"ubrcy\\\":\\\"ў\\\",\\\"Ubreve\\\":\\\"Ŭ\\\",\\\"ubreve\\\":\\\"ŭ\\\",\\\"Ucirc\\\":\\\"Û\\\",\\\"ucirc\\\":\\\"û\\\",\\\"Ucy\\\":\\\"У\\\",\\\"ucy\\\":\\\"у\\\",\\\"udarr\\\":\\\"⇅\\\",\\\"Udblac\\\":\\\"Ű\\\",\\\"udblac\\\":\\\"ű\\\",\\\"udhar\\\":\\\"⥮\\\",\\\"ufisht\\\":\\\"⥾\\\",\\\"Ufr\\\":\\\"𝔘\\\",\\\"ufr\\\":\\\"𝔲\\\",\\\"Ugrave\\\":\\\"Ù\\\",\\\"ugrave\\\":\\\"ù\\\",\\\"uHar\\\":\\\"⥣\\\",\\\"uharl\\\":\\\"↿\\\",\\\"uharr\\\":\\\"↾\\\",\\\"uhblk\\\":\\\"▀\\\",\\\"ulcorn\\\":\\\"⌜\\\",\\\"ulcorner\\\":\\\"⌜\\\",\\\"ulcrop\\\":\\\"⌏\\\",\\\"ultri\\\":\\\"◸\\\",\\\"Umacr\\\":\\\"Ū\\\",\\\"umacr\\\":\\\"ū\\\",\\\"uml\\\":\\\"¨\\\",\\\"UnderBar\\\":\\\"_\\\",\\\"UnderBrace\\\":\\\"⏟\\\",\\\"UnderBracket\\\":\\\"⎵\\\",\\\"UnderParenthesis\\\":\\\"⏝\\\",\\\"Union\\\":\\\"⋃\\\",\\\"UnionPlus\\\":\\\"⊎\\\",\\\"Uogon\\\":\\\"Ų\\\",\\\"uogon\\\":\\\"ų\\\",\\\"Uopf\\\":\\\"𝕌\\\",\\\"uopf\\\":\\\"𝕦\\\",\\\"UpArrowBar\\\":\\\"⤒\\\",\\\"uparrow\\\":\\\"↑\\\",\\\"UpArrow\\\":\\\"↑\\\",\\\"Uparrow\\\":\\\"⇑\\\",\\\"UpArrowDownArrow\\\":\\\"⇅\\\",\\\"updownarrow\\\":\\\"↕\\\",\\\"UpDownArrow\\\":\\\"↕\\\",\\\"Updownarrow\\\":\\\"⇕\\\",\\\"UpEquilibrium\\\":\\\"⥮\\\",\\\"upharpoonleft\\\":\\\"↿\\\",\\\"upharpoonright\\\":\\\"↾\\\",\\\"uplus\\\":\\\"⊎\\\",\\\"UpperLeftArrow\\\":\\\"↖\\\",\\\"UpperRightArrow\\\":\\\"↗\\\",\\\"upsi\\\":\\\"υ\\\",\\\"Upsi\\\":\\\"ϒ\\\",\\\"upsih\\\":\\\"ϒ\\\",\\\"Upsilon\\\":\\\"Υ\\\",\\\"upsilon\\\":\\\"υ\\\",\\\"UpTeeArrow\\\":\\\"↥\\\",\\\"UpTee\\\":\\\"⊥\\\",\\\"upuparrows\\\":\\\"⇈\\\",\\\"urcorn\\\":\\\"⌝\\\",\\\"urcorner\\\":\\\"⌝\\\",\\\"urcrop\\\":\\\"⌎\\\",\\\"Uring\\\":\\\"Ů\\\",\\\"uring\\\":\\\"ů\\\",\\\"urtri\\\":\\\"◹\\\",\\\"Uscr\\\":\\\"𝒰\\\",\\\"uscr\\\":\\\"𝓊\\\",\\\"utdot\\\":\\\"⋰\\\",\\\"Utilde\\\":\\\"Ũ\\\",\\\"utilde\\\":\\\"ũ\\\",\\\"utri\\\":\\\"▵\\\",\\\"utrif\\\":\\\"▴\\\",\\\"uuarr\\\":\\\"⇈\\\",\\\"Uuml\\\":\\\"Ü\\\",\\\"uuml\\\":\\\"ü\\\",\\\"uwangle\\\":\\\"⦧\\\",\\\"vangrt\\\":\\\"⦜\\\",\\\"varepsilon\\\":\\\"ϵ\\\",\\\"varkappa\\\":\\\"ϰ\\\",\\\"varnothing\\\":\\\"∅\\\",\\\"varphi\\\":\\\"ϕ\\\",\\\"varpi\\\":\\\"ϖ\\\",\\\"varpropto\\\":\\\"∝\\\",\\\"varr\\\":\\\"↕\\\",\\\"vArr\\\":\\\"⇕\\\",\\\"varrho\\\":\\\"ϱ\\\",\\\"varsigma\\\":\\\"ς\\\",\\\"varsubsetneq\\\":\\\"⊊︀\\\",\\\"varsubsetneqq\\\":\\\"⫋︀\\\",\\\"varsupsetneq\\\":\\\"⊋︀\\\",\\\"varsupsetneqq\\\":\\\"⫌︀\\\",\\\"vartheta\\\":\\\"ϑ\\\",\\\"vartriangleleft\\\":\\\"⊲\\\",\\\"vartriangleright\\\":\\\"⊳\\\",\\\"vBar\\\":\\\"⫨\\\",\\\"Vbar\\\":\\\"⫫\\\",\\\"vBarv\\\":\\\"⫩\\\",\\\"Vcy\\\":\\\"В\\\",\\\"vcy\\\":\\\"в\\\",\\\"vdash\\\":\\\"⊢\\\",\\\"vDash\\\":\\\"⊨\\\",\\\"Vdash\\\":\\\"⊩\\\",\\\"VDash\\\":\\\"⊫\\\",\\\"Vdashl\\\":\\\"⫦\\\",\\\"veebar\\\":\\\"⊻\\\",\\\"vee\\\":\\\"∨\\\",\\\"Vee\\\":\\\"⋁\\\",\\\"veeeq\\\":\\\"≚\\\",\\\"vellip\\\":\\\"⋮\\\",\\\"verbar\\\":\\\"|\\\",\\\"Verbar\\\":\\\"‖\\\",\\\"vert\\\":\\\"|\\\",\\\"Vert\\\":\\\"‖\\\",\\\"VerticalBar\\\":\\\"∣\\\",\\\"VerticalLine\\\":\\\"|\\\",\\\"VerticalSeparator\\\":\\\"❘\\\",\\\"VerticalTilde\\\":\\\"≀\\\",\\\"VeryThinSpace\\\":\\\" \\\",\\\"Vfr\\\":\\\"𝔙\\\",\\\"vfr\\\":\\\"𝔳\\\",\\\"vltri\\\":\\\"⊲\\\",\\\"vnsub\\\":\\\"⊂⃒\\\",\\\"vnsup\\\":\\\"⊃⃒\\\",\\\"Vopf\\\":\\\"𝕍\\\",\\\"vopf\\\":\\\"𝕧\\\",\\\"vprop\\\":\\\"∝\\\",\\\"vrtri\\\":\\\"⊳\\\",\\\"Vscr\\\":\\\"𝒱\\\",\\\"vscr\\\":\\\"𝓋\\\",\\\"vsubnE\\\":\\\"⫋︀\\\",\\\"vsubne\\\":\\\"⊊︀\\\",\\\"vsupnE\\\":\\\"⫌︀\\\",\\\"vsupne\\\":\\\"⊋︀\\\",\\\"Vvdash\\\":\\\"⊪\\\",\\\"vzigzag\\\":\\\"⦚\\\",\\\"Wcirc\\\":\\\"Ŵ\\\",\\\"wcirc\\\":\\\"ŵ\\\",\\\"wedbar\\\":\\\"⩟\\\",\\\"wedge\\\":\\\"∧\\\",\\\"Wedge\\\":\\\"⋀\\\",\\\"wedgeq\\\":\\\"≙\\\",\\\"weierp\\\":\\\"℘\\\",\\\"Wfr\\\":\\\"𝔚\\\",\\\"wfr\\\":\\\"𝔴\\\",\\\"Wopf\\\":\\\"𝕎\\\",\\\"wopf\\\":\\\"𝕨\\\",\\\"wp\\\":\\\"℘\\\",\\\"wr\\\":\\\"≀\\\",\\\"wreath\\\":\\\"≀\\\",\\\"Wscr\\\":\\\"𝒲\\\",\\\"wscr\\\":\\\"𝓌\\\",\\\"xcap\\\":\\\"⋂\\\",\\\"xcirc\\\":\\\"◯\\\",\\\"xcup\\\":\\\"⋃\\\",\\\"xdtri\\\":\\\"▽\\\",\\\"Xfr\\\":\\\"𝔛\\\",\\\"xfr\\\":\\\"𝔵\\\",\\\"xharr\\\":\\\"⟷\\\",\\\"xhArr\\\":\\\"⟺\\\",\\\"Xi\\\":\\\"Ξ\\\",\\\"xi\\\":\\\"ξ\\\",\\\"xlarr\\\":\\\"⟵\\\",\\\"xlArr\\\":\\\"⟸\\\",\\\"xmap\\\":\\\"⟼\\\",\\\"xnis\\\":\\\"⋻\\\",\\\"xodot\\\":\\\"⨀\\\",\\\"Xopf\\\":\\\"𝕏\\\",\\\"xopf\\\":\\\"𝕩\\\",\\\"xoplus\\\":\\\"⨁\\\",\\\"xotime\\\":\\\"⨂\\\",\\\"xrarr\\\":\\\"⟶\\\",\\\"xrArr\\\":\\\"⟹\\\",\\\"Xscr\\\":\\\"𝒳\\\",\\\"xscr\\\":\\\"𝓍\\\",\\\"xsqcup\\\":\\\"⨆\\\",\\\"xuplus\\\":\\\"⨄\\\",\\\"xutri\\\":\\\"△\\\",\\\"xvee\\\":\\\"⋁\\\",\\\"xwedge\\\":\\\"⋀\\\",\\\"Yacute\\\":\\\"Ý\\\",\\\"yacute\\\":\\\"ý\\\",\\\"YAcy\\\":\\\"Я\\\",\\\"yacy\\\":\\\"я\\\",\\\"Ycirc\\\":\\\"Ŷ\\\",\\\"ycirc\\\":\\\"ŷ\\\",\\\"Ycy\\\":\\\"Ы\\\",\\\"ycy\\\":\\\"ы\\\",\\\"yen\\\":\\\"¥\\\",\\\"Yfr\\\":\\\"𝔜\\\",\\\"yfr\\\":\\\"𝔶\\\",\\\"YIcy\\\":\\\"Ї\\\",\\\"yicy\\\":\\\"ї\\\",\\\"Yopf\\\":\\\"𝕐\\\",\\\"yopf\\\":\\\"𝕪\\\",\\\"Yscr\\\":\\\"𝒴\\\",\\\"yscr\\\":\\\"𝓎\\\",\\\"YUcy\\\":\\\"Ю\\\",\\\"yucy\\\":\\\"ю\\\",\\\"yuml\\\":\\\"ÿ\\\",\\\"Yuml\\\":\\\"Ÿ\\\",\\\"Zacute\\\":\\\"Ź\\\",\\\"zacute\\\":\\\"ź\\\",\\\"Zcaron\\\":\\\"Ž\\\",\\\"zcaron\\\":\\\"ž\\\",\\\"Zcy\\\":\\\"З\\\",\\\"zcy\\\":\\\"з\\\",\\\"Zdot\\\":\\\"Ż\\\",\\\"zdot\\\":\\\"ż\\\",\\\"zeetrf\\\":\\\"ℨ\\\",\\\"ZeroWidthSpace\\\":\\\"​\\\",\\\"Zeta\\\":\\\"Ζ\\\",\\\"zeta\\\":\\\"ζ\\\",\\\"zfr\\\":\\\"𝔷\\\",\\\"Zfr\\\":\\\"ℨ\\\",\\\"ZHcy\\\":\\\"Ж\\\",\\\"zhcy\\\":\\\"ж\\\",\\\"zigrarr\\\":\\\"⇝\\\",\\\"zopf\\\":\\\"𝕫\\\",\\\"Zopf\\\":\\\"ℤ\\\",\\\"Zscr\\\":\\\"𝒵\\\",\\\"zscr\\\":\\\"𝓏\\\",\\\"zwj\\\":\\\"‍\\\",\\\"zwnj\\\":\\\"‌\\\"}\");\n\n//# sourceURL=webpack:///./node_modules/entities/lib/maps/entities.json?"); - -/***/ }), - -/***/ "./node_modules/linkify-it/index.js": -/*!******************************************!*\ - !*** ./node_modules/linkify-it/index.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval(" ////////////////////////////////////////////////////////////////////////////////\n// Helpers\n// Merge objects\n//\n\nfunction assign(obj\n/*from1, from2, from3, ...*/\n) {\n var sources = Array.prototype.slice.call(arguments, 1);\n sources.forEach(function (source) {\n if (!source) {\n return;\n }\n\n Object.keys(source).forEach(function (key) {\n obj[key] = source[key];\n });\n });\n return obj;\n}\n\nfunction _class(obj) {\n return Object.prototype.toString.call(obj);\n}\n\nfunction isString(obj) {\n return _class(obj) === '[object String]';\n}\n\nfunction isObject(obj) {\n return _class(obj) === '[object Object]';\n}\n\nfunction isRegExp(obj) {\n return _class(obj) === '[object RegExp]';\n}\n\nfunction isFunction(obj) {\n return _class(obj) === '[object Function]';\n}\n\nfunction escapeRE(str) {\n return str.replace(/[.?*+^$[\\]\\\\(){}|-]/g, '\\\\$&');\n} ////////////////////////////////////////////////////////////////////////////////\n\n\nvar defaultOptions = {\n fuzzyLink: true,\n fuzzyEmail: true,\n fuzzyIP: false\n};\n\nfunction isOptionsObj(obj) {\n return Object.keys(obj || {}).reduce(function (acc, k) {\n return acc || defaultOptions.hasOwnProperty(k);\n }, false);\n}\n\nvar defaultSchemas = {\n 'http:': {\n validate: function validate(text, pos, self) {\n var tail = text.slice(pos);\n\n if (!self.re.http) {\n // compile lazily, because \"host\"-containing variables can change on tlds update.\n self.re.http = new RegExp('^\\\\/\\\\/' + self.re.src_auth + self.re.src_host_port_strict + self.re.src_path, 'i');\n }\n\n if (self.re.http.test(tail)) {\n return tail.match(self.re.http)[0].length;\n }\n\n return 0;\n }\n },\n 'https:': 'http:',\n 'ftp:': 'http:',\n '//': {\n validate: function validate(text, pos, self) {\n var tail = text.slice(pos);\n\n if (!self.re.no_http) {\n // compile lazily, because \"host\"-containing variables can change on tlds update.\n self.re.no_http = new RegExp('^' + self.re.src_auth + // Don't allow single-level domains, because of false positives like '//test'\n // with code comments\n '(?:localhost|(?:(?:' + self.re.src_domain + ')\\\\.)+' + self.re.src_domain_root + ')' + self.re.src_port + self.re.src_host_terminator + self.re.src_path, 'i');\n }\n\n if (self.re.no_http.test(tail)) {\n // should not be `://` & `///`, that protects from errors in protocol name\n if (pos >= 3 && text[pos - 3] === ':') {\n return 0;\n }\n\n if (pos >= 3 && text[pos - 3] === '/') {\n return 0;\n }\n\n return tail.match(self.re.no_http)[0].length;\n }\n\n return 0;\n }\n },\n 'mailto:': {\n validate: function validate(text, pos, self) {\n var tail = text.slice(pos);\n\n if (!self.re.mailto) {\n self.re.mailto = new RegExp('^' + self.re.src_email_name + '@' + self.re.src_host_strict, 'i');\n }\n\n if (self.re.mailto.test(tail)) {\n return tail.match(self.re.mailto)[0].length;\n }\n\n return 0;\n }\n }\n};\n/*eslint-disable max-len*/\n// RE pattern for 2-character tlds (autogenerated by ./support/tlds_2char_gen.js)\n\nvar tlds_2ch_src_re = 'a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]'; // DON'T try to make PRs with changes. Extend TLDs with LinkifyIt.tlds() instead\n\nvar tlds_default = 'biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф'.split('|');\n/*eslint-enable max-len*/\n////////////////////////////////////////////////////////////////////////////////\n\nfunction resetScanCache(self) {\n self.__index__ = -1;\n self.__text_cache__ = '';\n}\n\nfunction createValidator(re) {\n return function (text, pos) {\n var tail = text.slice(pos);\n\n if (re.test(tail)) {\n return tail.match(re)[0].length;\n }\n\n return 0;\n };\n}\n\nfunction createNormalizer() {\n return function (match, self) {\n self.normalize(match);\n };\n} // Schemas compiler. Build regexps.\n//\n\n\nfunction compile(self) {\n // Load & clone RE patterns.\n var re = self.re = __webpack_require__(/*! ./lib/re */ \"./node_modules/linkify-it/lib/re.js\")(self.__opts__); // Define dynamic patterns\n\n\n var tlds = self.__tlds__.slice();\n\n self.onCompile();\n\n if (!self.__tlds_replaced__) {\n tlds.push(tlds_2ch_src_re);\n }\n\n tlds.push(re.src_xn);\n re.src_tlds = tlds.join('|');\n\n function untpl(tpl) {\n return tpl.replace('%TLDS%', re.src_tlds);\n }\n\n re.email_fuzzy = RegExp(untpl(re.tpl_email_fuzzy), 'i');\n re.link_fuzzy = RegExp(untpl(re.tpl_link_fuzzy), 'i');\n re.link_no_ip_fuzzy = RegExp(untpl(re.tpl_link_no_ip_fuzzy), 'i');\n re.host_fuzzy_test = RegExp(untpl(re.tpl_host_fuzzy_test), 'i'); //\n // Compile each schema\n //\n\n var aliases = [];\n self.__compiled__ = {}; // Reset compiled data\n\n function schemaError(name, val) {\n throw new Error('(LinkifyIt) Invalid schema \"' + name + '\": ' + val);\n }\n\n Object.keys(self.__schemas__).forEach(function (name) {\n var val = self.__schemas__[name]; // skip disabled methods\n\n if (val === null) {\n return;\n }\n\n var compiled = {\n validate: null,\n link: null\n };\n self.__compiled__[name] = compiled;\n\n if (isObject(val)) {\n if (isRegExp(val.validate)) {\n compiled.validate = createValidator(val.validate);\n } else if (isFunction(val.validate)) {\n compiled.validate = val.validate;\n } else {\n schemaError(name, val);\n }\n\n if (isFunction(val.normalize)) {\n compiled.normalize = val.normalize;\n } else if (!val.normalize) {\n compiled.normalize = createNormalizer();\n } else {\n schemaError(name, val);\n }\n\n return;\n }\n\n if (isString(val)) {\n aliases.push(name);\n return;\n }\n\n schemaError(name, val);\n }); //\n // Compile postponed aliases\n //\n\n aliases.forEach(function (alias) {\n if (!self.__compiled__[self.__schemas__[alias]]) {\n // Silently fail on missed schemas to avoid errons on disable.\n // schemaError(alias, self.__schemas__[alias]);\n return;\n }\n\n self.__compiled__[alias].validate = self.__compiled__[self.__schemas__[alias]].validate;\n self.__compiled__[alias].normalize = self.__compiled__[self.__schemas__[alias]].normalize;\n }); //\n // Fake record for guessed links\n //\n\n self.__compiled__[''] = {\n validate: null,\n normalize: createNormalizer()\n }; //\n // Build schema condition\n //\n\n var slist = Object.keys(self.__compiled__).filter(function (name) {\n // Filter disabled & fake schemas\n return name.length > 0 && self.__compiled__[name];\n }).map(escapeRE).join('|'); // (?!_) cause 1.5x slowdown\n\n self.re.schema_test = RegExp(\"(^|(?!_)(?:[><\\uFF5C]|\" + re.src_ZPCc + '))(' + slist + ')', 'i');\n self.re.schema_search = RegExp(\"(^|(?!_)(?:[><\\uFF5C]|\" + re.src_ZPCc + '))(' + slist + ')', 'ig');\n self.re.pretest = RegExp('(' + self.re.schema_test.source + ')|(' + self.re.host_fuzzy_test.source + ')|@', 'i'); //\n // Cleanup\n //\n\n resetScanCache(self);\n}\n/**\n * class Match\n *\n * Match result. Single element of array, returned by [[LinkifyIt#match]]\n **/\n\n\nfunction Match(self, shift) {\n var start = self.__index__,\n end = self.__last_index__,\n text = self.__text_cache__.slice(start, end);\n /**\n * Match#schema -> String\n *\n * Prefix (protocol) for matched string.\n **/\n\n\n this.schema = self.__schema__.toLowerCase();\n /**\n * Match#index -> Number\n *\n * First position of matched string.\n **/\n\n this.index = start + shift;\n /**\n * Match#lastIndex -> Number\n *\n * Next position after matched string.\n **/\n\n this.lastIndex = end + shift;\n /**\n * Match#raw -> String\n *\n * Matched string.\n **/\n\n this.raw = text;\n /**\n * Match#text -> String\n *\n * Notmalized text of matched string.\n **/\n\n this.text = text;\n /**\n * Match#url -> String\n *\n * Normalized url of matched string.\n **/\n\n this.url = text;\n}\n\nfunction createMatch(self, shift) {\n var match = new Match(self, shift);\n\n self.__compiled__[match.schema].normalize(match, self);\n\n return match;\n}\n/**\n * class LinkifyIt\n **/\n\n/**\n * new LinkifyIt(schemas, options)\n * - schemas (Object): Optional. Additional schemas to validate (prefix/validator)\n * - options (Object): { fuzzyLink|fuzzyEmail|fuzzyIP: true|false }\n *\n * Creates new linkifier instance with optional additional schemas.\n * Can be called without `new` keyword for convenience.\n *\n * By default understands:\n *\n * - `http(s)://...` , `ftp://...`, `mailto:...` & `//...` links\n * - \"fuzzy\" links and emails (example.com, foo@bar.com).\n *\n * `schemas` is an object, where each key/value describes protocol/rule:\n *\n * - __key__ - link prefix (usually, protocol name with `:` at the end, `skype:`\n * for example). `linkify-it` makes shure that prefix is not preceeded with\n * alphanumeric char and symbols. Only whitespaces and punctuation allowed.\n * - __value__ - rule to check tail after link prefix\n * - _String_ - just alias to existing rule\n * - _Object_\n * - _validate_ - validator function (should return matched length on success),\n * or `RegExp`.\n * - _normalize_ - optional function to normalize text & url of matched result\n * (for example, for @twitter mentions).\n *\n * `options`:\n *\n * - __fuzzyLink__ - recognige URL-s without `http(s):` prefix. Default `true`.\n * - __fuzzyIP__ - allow IPs in fuzzy links above. Can conflict with some texts\n * like version numbers. Default `false`.\n * - __fuzzyEmail__ - recognize emails without `mailto:` prefix.\n *\n **/\n\n\nfunction LinkifyIt(schemas, options) {\n if (!(this instanceof LinkifyIt)) {\n return new LinkifyIt(schemas, options);\n }\n\n if (!options) {\n if (isOptionsObj(schemas)) {\n options = schemas;\n schemas = {};\n }\n }\n\n this.__opts__ = assign({}, defaultOptions, options); // Cache last tested result. Used to skip repeating steps on next `match` call.\n\n this.__index__ = -1;\n this.__last_index__ = -1; // Next scan position\n\n this.__schema__ = '';\n this.__text_cache__ = '';\n this.__schemas__ = assign({}, defaultSchemas, schemas);\n this.__compiled__ = {};\n this.__tlds__ = tlds_default;\n this.__tlds_replaced__ = false;\n this.re = {};\n compile(this);\n}\n/** chainable\n * LinkifyIt#add(schema, definition)\n * - schema (String): rule name (fixed pattern prefix)\n * - definition (String|RegExp|Object): schema definition\n *\n * Add new rule definition. See constructor description for details.\n **/\n\n\nLinkifyIt.prototype.add = function add(schema, definition) {\n this.__schemas__[schema] = definition;\n compile(this);\n return this;\n};\n/** chainable\n * LinkifyIt#set(options)\n * - options (Object): { fuzzyLink|fuzzyEmail|fuzzyIP: true|false }\n *\n * Set recognition options for links without schema.\n **/\n\n\nLinkifyIt.prototype.set = function set(options) {\n this.__opts__ = assign(this.__opts__, options);\n return this;\n};\n/**\n * LinkifyIt#test(text) -> Boolean\n *\n * Searches linkifiable pattern and returns `true` on success or `false` on fail.\n **/\n\n\nLinkifyIt.prototype.test = function test(text) {\n // Reset scan cache\n this.__text_cache__ = text;\n this.__index__ = -1;\n\n if (!text.length) {\n return false;\n }\n\n var m, ml, me, len, shift, next, re, tld_pos, at_pos; // try to scan for link with schema - that's the most simple rule\n\n if (this.re.schema_test.test(text)) {\n re = this.re.schema_search;\n re.lastIndex = 0;\n\n while ((m = re.exec(text)) !== null) {\n len = this.testSchemaAt(text, m[2], re.lastIndex);\n\n if (len) {\n this.__schema__ = m[2];\n this.__index__ = m.index + m[1].length;\n this.__last_index__ = m.index + m[0].length + len;\n break;\n }\n }\n }\n\n if (this.__opts__.fuzzyLink && this.__compiled__['http:']) {\n // guess schemaless links\n tld_pos = text.search(this.re.host_fuzzy_test);\n\n if (tld_pos >= 0) {\n // if tld is located after found link - no need to check fuzzy pattern\n if (this.__index__ < 0 || tld_pos < this.__index__) {\n if ((ml = text.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) !== null) {\n shift = ml.index + ml[1].length;\n\n if (this.__index__ < 0 || shift < this.__index__) {\n this.__schema__ = '';\n this.__index__ = shift;\n this.__last_index__ = ml.index + ml[0].length;\n }\n }\n }\n }\n }\n\n if (this.__opts__.fuzzyEmail && this.__compiled__['mailto:']) {\n // guess schemaless emails\n at_pos = text.indexOf('@');\n\n if (at_pos >= 0) {\n // We can't skip this check, because this cases are possible:\n // 192.168.1.1@gmail.com, my.in@example.com\n if ((me = text.match(this.re.email_fuzzy)) !== null) {\n shift = me.index + me[1].length;\n next = me.index + me[0].length;\n\n if (this.__index__ < 0 || shift < this.__index__ || shift === this.__index__ && next > this.__last_index__) {\n this.__schema__ = 'mailto:';\n this.__index__ = shift;\n this.__last_index__ = next;\n }\n }\n }\n }\n\n return this.__index__ >= 0;\n};\n/**\n * LinkifyIt#pretest(text) -> Boolean\n *\n * Very quick check, that can give false positives. Returns true if link MAY BE\n * can exists. Can be used for speed optimization, when you need to check that\n * link NOT exists.\n **/\n\n\nLinkifyIt.prototype.pretest = function pretest(text) {\n return this.re.pretest.test(text);\n};\n/**\n * LinkifyIt#testSchemaAt(text, name, position) -> Number\n * - text (String): text to scan\n * - name (String): rule (schema) name\n * - position (Number): text offset to check from\n *\n * Similar to [[LinkifyIt#test]] but checks only specific protocol tail exactly\n * at given position. Returns length of found pattern (0 on fail).\n **/\n\n\nLinkifyIt.prototype.testSchemaAt = function testSchemaAt(text, schema, pos) {\n // If not supported schema check requested - terminate\n if (!this.__compiled__[schema.toLowerCase()]) {\n return 0;\n }\n\n return this.__compiled__[schema.toLowerCase()].validate(text, pos, this);\n};\n/**\n * LinkifyIt#match(text) -> Array|null\n *\n * Returns array of found link descriptions or `null` on fail. We strongly\n * recommend to use [[LinkifyIt#test]] first, for best speed.\n *\n * ##### Result match description\n *\n * - __schema__ - link schema, can be empty for fuzzy links, or `//` for\n * protocol-neutral links.\n * - __index__ - offset of matched text\n * - __lastIndex__ - index of next char after mathch end\n * - __raw__ - matched text\n * - __text__ - normalized text\n * - __url__ - link, generated from matched text\n **/\n\n\nLinkifyIt.prototype.match = function match(text) {\n var shift = 0,\n result = []; // Try to take previous element from cache, if .test() called before\n\n if (this.__index__ >= 0 && this.__text_cache__ === text) {\n result.push(createMatch(this, shift));\n shift = this.__last_index__;\n } // Cut head if cache was used\n\n\n var tail = shift ? text.slice(shift) : text; // Scan string until end reached\n\n while (this.test(tail)) {\n result.push(createMatch(this, shift));\n tail = tail.slice(this.__last_index__);\n shift += this.__last_index__;\n }\n\n if (result.length) {\n return result;\n }\n\n return null;\n};\n/** chainable\n * LinkifyIt#tlds(list [, keepOld]) -> this\n * - list (Array): list of tlds\n * - keepOld (Boolean): merge with current list if `true` (`false` by default)\n *\n * Load (or merge) new tlds list. Those are user for fuzzy links (without prefix)\n * to avoid false positives. By default this algorythm used:\n *\n * - hostname with any 2-letter root zones are ok.\n * - biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф\n * are ok.\n * - encoded (`xn--...`) root zones are ok.\n *\n * If list is replaced, then exact match for 2-chars root zones will be checked.\n **/\n\n\nLinkifyIt.prototype.tlds = function tlds(list, keepOld) {\n list = Array.isArray(list) ? list : [list];\n\n if (!keepOld) {\n this.__tlds__ = list.slice();\n this.__tlds_replaced__ = true;\n compile(this);\n return this;\n }\n\n this.__tlds__ = this.__tlds__.concat(list).sort().filter(function (el, idx, arr) {\n return el !== arr[idx - 1];\n }).reverse();\n compile(this);\n return this;\n};\n/**\n * LinkifyIt#normalize(match)\n *\n * Default normalizer (if schema does not define it's own).\n **/\n\n\nLinkifyIt.prototype.normalize = function normalize(match) {\n // Do minimal possible changes by default. Need to collect feedback prior\n // to move forward https://github.com/markdown-it/linkify-it/issues/1\n if (!match.schema) {\n match.url = 'http://' + match.url;\n }\n\n if (match.schema === 'mailto:' && !/^mailto:/i.test(match.url)) {\n match.url = 'mailto:' + match.url;\n }\n};\n/**\n * LinkifyIt#onCompile()\n *\n * Override to modify basic RegExp-s.\n **/\n\n\nLinkifyIt.prototype.onCompile = function onCompile() {};\n\nmodule.exports = LinkifyIt;\n\n//# sourceURL=webpack:///./node_modules/linkify-it/index.js?"); - -/***/ }), - -/***/ "./node_modules/linkify-it/lib/re.js": -/*!*******************************************!*\ - !*** ./node_modules/linkify-it/lib/re.js ***! - \*******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nmodule.exports = function (opts) {\n var re = {}; // Use direct extract instead of `regenerate` to reduse browserified size\n\n re.src_Any = __webpack_require__(/*! uc.micro/properties/Any/regex */ \"./node_modules/uc.micro/properties/Any/regex.js\").source;\n re.src_Cc = __webpack_require__(/*! uc.micro/categories/Cc/regex */ \"./node_modules/uc.micro/categories/Cc/regex.js\").source;\n re.src_Z = __webpack_require__(/*! uc.micro/categories/Z/regex */ \"./node_modules/uc.micro/categories/Z/regex.js\").source;\n re.src_P = __webpack_require__(/*! uc.micro/categories/P/regex */ \"./node_modules/uc.micro/categories/P/regex.js\").source; // \\p{\\Z\\P\\Cc\\CF} (white spaces + control + format + punctuation)\n\n re.src_ZPCc = [re.src_Z, re.src_P, re.src_Cc].join('|'); // \\p{\\Z\\Cc} (white spaces + control)\n\n re.src_ZCc = [re.src_Z, re.src_Cc].join('|'); // Experimental. List of chars, completely prohibited in links\n // because can separate it from other part of text\n\n var text_separators = \"[><\\uFF5C]\"; // All possible word characters (everything without punctuation, spaces & controls)\n // Defined via punctuation & spaces to save space\n // Should be something like \\p{\\L\\N\\S\\M} (\\w but without `_`)\n\n re.src_pseudo_letter = '(?:(?!' + text_separators + '|' + re.src_ZPCc + ')' + re.src_Any + ')'; // The same as abothe but without [0-9]\n // var src_pseudo_letter_non_d = '(?:(?![0-9]|' + src_ZPCc + ')' + src_Any + ')';\n ////////////////////////////////////////////////////////////////////////////////\n\n re.src_ip4 = '(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)'; // Prohibit any of \"@/[]()\" in user/pass to avoid wrong domain fetch.\n\n re.src_auth = '(?:(?:(?!' + re.src_ZCc + '|[@/\\\\[\\\\]()]).)+@)?';\n re.src_port = '(?::(?:6(?:[0-4]\\\\d{3}|5(?:[0-4]\\\\d{2}|5(?:[0-2]\\\\d|3[0-5])))|[1-5]?\\\\d{1,4}))?';\n re.src_host_terminator = '(?=$|' + text_separators + '|' + re.src_ZPCc + ')(?!-|_|:\\\\d|\\\\.-|\\\\.(?!$|' + re.src_ZPCc + '))';\n re.src_path = '(?:' + '[/?#]' + '(?:' + '(?!' + re.src_ZCc + '|' + text_separators + '|[()[\\\\]{}.,\"\\'?!\\\\-]).|' + '\\\\[(?:(?!' + re.src_ZCc + '|\\\\]).)*\\\\]|' + '\\\\((?:(?!' + re.src_ZCc + '|[)]).)*\\\\)|' + '\\\\{(?:(?!' + re.src_ZCc + '|[}]).)*\\\\}|' + '\\\\\"(?:(?!' + re.src_ZCc + '|[\"]).)+\\\\\"|' + \"\\\\'(?:(?!\" + re.src_ZCc + \"|[']).)+\\\\'|\" + \"\\\\'(?=\" + re.src_pseudo_letter + '|[-]).|' + // allow `I'm_king` if no pair found\n '\\\\.{2,4}[a-zA-Z0-9%/]|' + // github has ... in commit range links,\n // google has .... in links (issue #66)\n // Restrict to\n // - english\n // - percent-encoded\n // - parts of file path\n // until more examples found.\n '\\\\.(?!' + re.src_ZCc + '|[.]).|' + (opts && opts['---'] ? '\\\\-(?!--(?:[^-]|$))(?:-*)|' // `---` => long dash, terminate\n : '\\\\-+|') + '\\\\,(?!' + re.src_ZCc + ').|' + // allow `,,,` in paths\n '\\\\!(?!' + re.src_ZCc + '|[!]).|' + '\\\\?(?!' + re.src_ZCc + '|[?]).' + ')+' + '|\\\\/' + ')?'; // Allow anything in markdown spec, forbid quote (\") at the first position\n // because emails enclosed in quotes are far more common\n\n re.src_email_name = '[\\\\-;:&=\\\\+\\\\$,\\\\.a-zA-Z0-9_][\\\\-;:&=\\\\+\\\\$,\\\\\"\\\\.a-zA-Z0-9_]*';\n re.src_xn = 'xn--[a-z0-9\\\\-]{1,59}'; // More to read about domain names\n // http://serverfault.com/questions/638260/\n\n re.src_domain_root = // Allow letters & digits (http://test1)\n '(?:' + re.src_xn + '|' + re.src_pseudo_letter + '{1,63}' + ')';\n re.src_domain = '(?:' + re.src_xn + '|' + '(?:' + re.src_pseudo_letter + ')' + '|' + '(?:' + re.src_pseudo_letter + '(?:-|' + re.src_pseudo_letter + '){0,61}' + re.src_pseudo_letter + ')' + ')';\n re.src_host = '(?:' + // Don't need IP check, because digits are already allowed in normal domain names\n // src_ip4 +\n // '|' +\n '(?:(?:(?:' + re.src_domain + ')\\\\.)*' + re.src_domain\n /*_root*/\n + ')' + ')';\n re.tpl_host_fuzzy = '(?:' + re.src_ip4 + '|' + '(?:(?:(?:' + re.src_domain + ')\\\\.)+(?:%TLDS%))' + ')';\n re.tpl_host_no_ip_fuzzy = '(?:(?:(?:' + re.src_domain + ')\\\\.)+(?:%TLDS%))';\n re.src_host_strict = re.src_host + re.src_host_terminator;\n re.tpl_host_fuzzy_strict = re.tpl_host_fuzzy + re.src_host_terminator;\n re.src_host_port_strict = re.src_host + re.src_port + re.src_host_terminator;\n re.tpl_host_port_fuzzy_strict = re.tpl_host_fuzzy + re.src_port + re.src_host_terminator;\n re.tpl_host_port_no_ip_fuzzy_strict = re.tpl_host_no_ip_fuzzy + re.src_port + re.src_host_terminator; ////////////////////////////////////////////////////////////////////////////////\n // Main rules\n // Rude test fuzzy links by host, for quick deny\n\n re.tpl_host_fuzzy_test = 'localhost|www\\\\.|\\\\.\\\\d{1,3}\\\\.|(?:\\\\.(?:%TLDS%)(?:' + re.src_ZPCc + '|>|$))';\n re.tpl_email_fuzzy = '(^|' + text_separators + '|\"|\\\\(|' + re.src_ZCc + ')' + '(' + re.src_email_name + '@' + re.tpl_host_fuzzy_strict + ')';\n re.tpl_link_fuzzy = // Fuzzy link can't be prepended with .:/\\- and non punctuation.\n // but can start with > (markdown blockquote)\n \"(^|(?![.:/\\\\-_@])(?:[$+<=>^`|\\uFF5C]|\" + re.src_ZPCc + '))' + \"((?![$+<=>^`|\\uFF5C])\" + re.tpl_host_port_fuzzy_strict + re.src_path + ')';\n re.tpl_link_no_ip_fuzzy = // Fuzzy link can't be prepended with .:/\\- and non punctuation.\n // but can start with > (markdown blockquote)\n \"(^|(?![.:/\\\\-_@])(?:[$+<=>^`|\\uFF5C]|\" + re.src_ZPCc + '))' + \"((?![$+<=>^`|\\uFF5C])\" + re.tpl_host_port_no_ip_fuzzy_strict + re.src_path + ')';\n return re;\n};\n\n//# sourceURL=webpack:///./node_modules/linkify-it/lib/re.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/index.js": -/*!*******************************************!*\ - !*** ./node_modules/markdown-it/index.js ***! - \*******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nmodule.exports = __webpack_require__(/*! ./lib/ */ \"./node_modules/markdown-it/lib/index.js\");\n\n//# sourceURL=webpack:///./node_modules/markdown-it/index.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/common/entities.js": -/*!*********************************************************!*\ - !*** ./node_modules/markdown-it/lib/common/entities.js ***! - \*********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// HTML5 entities map: { name -> utf16string }\n//\n\n/*eslint quotes:0*/\n\nmodule.exports = __webpack_require__(/*! entities/lib/maps/entities.json */ \"./node_modules/entities/lib/maps/entities.json\");\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/common/entities.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/common/html_blocks.js": -/*!************************************************************!*\ - !*** ./node_modules/markdown-it/lib/common/html_blocks.js ***! - \************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// List of valid html blocks names, accorting to commonmark spec\n// http://jgm.github.io/CommonMark/spec.html#html-blocks\n\n\nmodule.exports = ['address', 'article', 'aside', 'base', 'basefont', 'blockquote', 'body', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dialog', 'dir', 'div', 'dl', 'dt', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hr', 'html', 'iframe', 'legend', 'li', 'link', 'main', 'menu', 'menuitem', 'meta', 'nav', 'noframes', 'ol', 'optgroup', 'option', 'p', 'param', 'section', 'source', 'summary', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul'];\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/common/html_blocks.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/common/html_re.js": -/*!********************************************************!*\ - !*** ./node_modules/markdown-it/lib/common/html_re.js ***! - \********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Regexps to match html elements\n\n\nvar attr_name = '[a-zA-Z_:][a-zA-Z0-9:._-]*';\nvar unquoted = '[^\"\\'=<>`\\\\x00-\\\\x20]+';\nvar single_quoted = \"'[^']*'\";\nvar double_quoted = '\"[^\"]*\"';\nvar attr_value = '(?:' + unquoted + '|' + single_quoted + '|' + double_quoted + ')';\nvar attribute = '(?:\\\\s+' + attr_name + '(?:\\\\s*=\\\\s*' + attr_value + ')?)';\nvar open_tag = '<[A-Za-z][A-Za-z0-9\\\\-]*' + attribute + '*\\\\s*\\\\/?>';\nvar close_tag = '<\\\\/[A-Za-z][A-Za-z0-9\\\\-]*\\\\s*>';\nvar comment = '|';\nvar processing = '<[?].*?[?]>';\nvar declaration = ']*>';\nvar cdata = '';\nvar HTML_TAG_RE = new RegExp('^(?:' + open_tag + '|' + close_tag + '|' + comment + '|' + processing + '|' + declaration + '|' + cdata + ')');\nvar HTML_OPEN_CLOSE_TAG_RE = new RegExp('^(?:' + open_tag + '|' + close_tag + ')');\nmodule.exports.HTML_TAG_RE = HTML_TAG_RE;\nmodule.exports.HTML_OPEN_CLOSE_TAG_RE = HTML_OPEN_CLOSE_TAG_RE;\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/common/html_re.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/common/utils.js": -/*!******************************************************!*\ - !*** ./node_modules/markdown-it/lib/common/utils.js ***! - \******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Utilities\n//\n\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _class(obj) {\n return Object.prototype.toString.call(obj);\n}\n\nfunction isString(obj) {\n return _class(obj) === '[object String]';\n}\n\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction has(object, key) {\n return _hasOwnProperty.call(object, key);\n} // Merge objects\n//\n\n\nfunction assign(obj\n/*from1, from2, from3, ...*/\n) {\n var sources = Array.prototype.slice.call(arguments, 1);\n sources.forEach(function (source) {\n if (!source) {\n return;\n }\n\n if (_typeof(source) !== 'object') {\n throw new TypeError(source + 'must be object');\n }\n\n Object.keys(source).forEach(function (key) {\n obj[key] = source[key];\n });\n });\n return obj;\n} // Remove element from array and put another array at those position.\n// Useful for some operations with tokens\n\n\nfunction arrayReplaceAt(src, pos, newElements) {\n return [].concat(src.slice(0, pos), newElements, src.slice(pos + 1));\n} ////////////////////////////////////////////////////////////////////////////////\n\n\nfunction isValidEntityCode(c) {\n /*eslint no-bitwise:0*/\n // broken sequence\n if (c >= 0xD800 && c <= 0xDFFF) {\n return false;\n } // never used\n\n\n if (c >= 0xFDD0 && c <= 0xFDEF) {\n return false;\n }\n\n if ((c & 0xFFFF) === 0xFFFF || (c & 0xFFFF) === 0xFFFE) {\n return false;\n } // control codes\n\n\n if (c >= 0x00 && c <= 0x08) {\n return false;\n }\n\n if (c === 0x0B) {\n return false;\n }\n\n if (c >= 0x0E && c <= 0x1F) {\n return false;\n }\n\n if (c >= 0x7F && c <= 0x9F) {\n return false;\n } // out of range\n\n\n if (c > 0x10FFFF) {\n return false;\n }\n\n return true;\n}\n\nfunction fromCodePoint(c) {\n /*eslint no-bitwise:0*/\n if (c > 0xffff) {\n c -= 0x10000;\n var surrogate1 = 0xd800 + (c >> 10),\n surrogate2 = 0xdc00 + (c & 0x3ff);\n return String.fromCharCode(surrogate1, surrogate2);\n }\n\n return String.fromCharCode(c);\n}\n\nvar UNESCAPE_MD_RE = /\\\\([!\"#$%&'()*+,\\-.\\/:;<=>?@[\\\\\\]^_`{|}~])/g;\nvar ENTITY_RE = /&([a-z#][a-z0-9]{1,31});/gi;\nvar UNESCAPE_ALL_RE = new RegExp(UNESCAPE_MD_RE.source + '|' + ENTITY_RE.source, 'gi');\nvar DIGITAL_ENTITY_TEST_RE = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i;\n\nvar entities = __webpack_require__(/*! ./entities */ \"./node_modules/markdown-it/lib/common/entities.js\");\n\nfunction replaceEntityPattern(match, name) {\n var code = 0;\n\n if (has(entities, name)) {\n return entities[name];\n }\n\n if (name.charCodeAt(0) === 0x23\n /* # */\n && DIGITAL_ENTITY_TEST_RE.test(name)) {\n code = name[1].toLowerCase() === 'x' ? parseInt(name.slice(2), 16) : parseInt(name.slice(1), 10);\n\n if (isValidEntityCode(code)) {\n return fromCodePoint(code);\n }\n }\n\n return match;\n}\n/*function replaceEntities(str) {\n if (str.indexOf('&') < 0) { return str; }\n\n return str.replace(ENTITY_RE, replaceEntityPattern);\n}*/\n\n\nfunction unescapeMd(str) {\n if (str.indexOf('\\\\') < 0) {\n return str;\n }\n\n return str.replace(UNESCAPE_MD_RE, '$1');\n}\n\nfunction unescapeAll(str) {\n if (str.indexOf('\\\\') < 0 && str.indexOf('&') < 0) {\n return str;\n }\n\n return str.replace(UNESCAPE_ALL_RE, function (match, escaped, entity) {\n if (escaped) {\n return escaped;\n }\n\n return replaceEntityPattern(match, entity);\n });\n} ////////////////////////////////////////////////////////////////////////////////\n\n\nvar HTML_ESCAPE_TEST_RE = /[&<>\"]/;\nvar HTML_ESCAPE_REPLACE_RE = /[&<>\"]/g;\nvar HTML_REPLACEMENTS = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"'\n};\n\nfunction replaceUnsafeChar(ch) {\n return HTML_REPLACEMENTS[ch];\n}\n\nfunction escapeHtml(str) {\n if (HTML_ESCAPE_TEST_RE.test(str)) {\n return str.replace(HTML_ESCAPE_REPLACE_RE, replaceUnsafeChar);\n }\n\n return str;\n} ////////////////////////////////////////////////////////////////////////////////\n\n\nvar REGEXP_ESCAPE_RE = /[.?*+^$[\\]\\\\(){}|-]/g;\n\nfunction escapeRE(str) {\n return str.replace(REGEXP_ESCAPE_RE, '\\\\$&');\n} ////////////////////////////////////////////////////////////////////////////////\n\n\nfunction isSpace(code) {\n switch (code) {\n case 0x09:\n case 0x20:\n return true;\n }\n\n return false;\n} // Zs (unicode class) || [\\t\\f\\v\\r\\n]\n\n\nfunction isWhiteSpace(code) {\n if (code >= 0x2000 && code <= 0x200A) {\n return true;\n }\n\n switch (code) {\n case 0x09: // \\t\n\n case 0x0A: // \\n\n\n case 0x0B: // \\v\n\n case 0x0C: // \\f\n\n case 0x0D: // \\r\n\n case 0x20:\n case 0xA0:\n case 0x1680:\n case 0x202F:\n case 0x205F:\n case 0x3000:\n return true;\n }\n\n return false;\n} ////////////////////////////////////////////////////////////////////////////////\n\n/*eslint-disable max-len*/\n\n\nvar UNICODE_PUNCT_RE = __webpack_require__(/*! uc.micro/categories/P/regex */ \"./node_modules/uc.micro/categories/P/regex.js\"); // Currently without astral characters support.\n\n\nfunction isPunctChar(ch) {\n return UNICODE_PUNCT_RE.test(ch);\n} // Markdown ASCII punctuation characters.\n//\n// !, \", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \\, ], ^, _, `, {, |, }, or ~\n// http://spec.commonmark.org/0.15/#ascii-punctuation-character\n//\n// Don't confuse with unicode punctuation !!! It lacks some chars in ascii range.\n//\n\n\nfunction isMdAsciiPunct(ch) {\n switch (ch) {\n case 0x21\n /* ! */\n :\n case 0x22\n /* \" */\n :\n case 0x23\n /* # */\n :\n case 0x24\n /* $ */\n :\n case 0x25\n /* % */\n :\n case 0x26\n /* & */\n :\n case 0x27\n /* ' */\n :\n case 0x28\n /* ( */\n :\n case 0x29\n /* ) */\n :\n case 0x2A\n /* * */\n :\n case 0x2B\n /* + */\n :\n case 0x2C\n /* , */\n :\n case 0x2D\n /* - */\n :\n case 0x2E\n /* . */\n :\n case 0x2F\n /* / */\n :\n case 0x3A\n /* : */\n :\n case 0x3B\n /* ; */\n :\n case 0x3C\n /* < */\n :\n case 0x3D\n /* = */\n :\n case 0x3E\n /* > */\n :\n case 0x3F\n /* ? */\n :\n case 0x40\n /* @ */\n :\n case 0x5B\n /* [ */\n :\n case 0x5C\n /* \\ */\n :\n case 0x5D\n /* ] */\n :\n case 0x5E\n /* ^ */\n :\n case 0x5F\n /* _ */\n :\n case 0x60\n /* ` */\n :\n case 0x7B\n /* { */\n :\n case 0x7C\n /* | */\n :\n case 0x7D\n /* } */\n :\n case 0x7E\n /* ~ */\n :\n return true;\n\n default:\n return false;\n }\n} // Hepler to unify [reference labels].\n//\n\n\nfunction normalizeReference(str) {\n // Trim and collapse whitespace\n //\n str = str.trim().replace(/\\s+/g, ' '); // In node v10 'ẞ'.toLowerCase() === 'Ṿ', which is presumed to be a bug\n // fixed in v12 (couldn't find any details).\n //\n // So treat this one as a special case\n // (remove this when node v10 is no longer supported).\n //\n\n if ('ẞ'.toLowerCase() === 'Ṿ') {\n str = str.replace(/ẞ/g, 'ß');\n } // .toLowerCase().toUpperCase() should get rid of all differences\n // between letter variants.\n //\n // Simple .toLowerCase() doesn't normalize 125 code points correctly,\n // and .toUpperCase doesn't normalize 6 of them (list of exceptions:\n // İ, ϴ, ẞ, Ω, K, Å - those are already uppercased, but have differently\n // uppercased versions).\n //\n // Here's an example showing how it happens. Lets take greek letter omega:\n // uppercase U+0398 (Θ), U+03f4 (ϴ) and lowercase U+03b8 (θ), U+03d1 (ϑ)\n //\n // Unicode entries:\n // 0398;GREEK CAPITAL LETTER THETA;Lu;0;L;;;;;N;;;;03B8;\n // 03B8;GREEK SMALL LETTER THETA;Ll;0;L;;;;;N;;;0398;;0398\n // 03D1;GREEK THETA SYMBOL;Ll;0;L; 03B8;;;;N;GREEK SMALL LETTER SCRIPT THETA;;0398;;0398\n // 03F4;GREEK CAPITAL THETA SYMBOL;Lu;0;L; 0398;;;;N;;;;03B8;\n //\n // Case-insensitive comparison should treat all of them as equivalent.\n //\n // But .toLowerCase() doesn't change ϑ (it's already lowercase),\n // and .toUpperCase() doesn't change ϴ (already uppercase).\n //\n // Applying first lower then upper case normalizes any character:\n // '\\u0398\\u03f4\\u03b8\\u03d1'.toLowerCase().toUpperCase() === '\\u0398\\u0398\\u0398\\u0398'\n //\n // Note: this is equivalent to unicode case folding; unicode normalization\n // is a different step that is not required here.\n //\n // Final result should be uppercased, because it's later stored in an object\n // (this avoid a conflict with Object.prototype members,\n // most notably, `__proto__`)\n //\n\n\n return str.toLowerCase().toUpperCase();\n} ////////////////////////////////////////////////////////////////////////////////\n// Re-export libraries commonly used in both markdown-it and its plugins,\n// so plugins won't have to depend on them explicitly, which reduces their\n// bundled size (e.g. a browser build).\n//\n\n\nexports.lib = {};\nexports.lib.mdurl = __webpack_require__(/*! mdurl */ \"./node_modules/mdurl/index.js\");\nexports.lib.ucmicro = __webpack_require__(/*! uc.micro */ \"./node_modules/uc.micro/index.js\");\nexports.assign = assign;\nexports.isString = isString;\nexports.has = has;\nexports.unescapeMd = unescapeMd;\nexports.unescapeAll = unescapeAll;\nexports.isValidEntityCode = isValidEntityCode;\nexports.fromCodePoint = fromCodePoint; // exports.replaceEntities = replaceEntities;\n\nexports.escapeHtml = escapeHtml;\nexports.arrayReplaceAt = arrayReplaceAt;\nexports.isSpace = isSpace;\nexports.isWhiteSpace = isWhiteSpace;\nexports.isMdAsciiPunct = isMdAsciiPunct;\nexports.isPunctChar = isPunctChar;\nexports.escapeRE = escapeRE;\nexports.normalizeReference = normalizeReference;\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/common/utils.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/helpers/index.js": -/*!*******************************************************!*\ - !*** ./node_modules/markdown-it/lib/helpers/index.js ***! - \*******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Just a shortcut for bulk export\n\n\nexports.parseLinkLabel = __webpack_require__(/*! ./parse_link_label */ \"./node_modules/markdown-it/lib/helpers/parse_link_label.js\");\nexports.parseLinkDestination = __webpack_require__(/*! ./parse_link_destination */ \"./node_modules/markdown-it/lib/helpers/parse_link_destination.js\");\nexports.parseLinkTitle = __webpack_require__(/*! ./parse_link_title */ \"./node_modules/markdown-it/lib/helpers/parse_link_title.js\");\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/helpers/index.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/helpers/parse_link_destination.js": -/*!************************************************************************!*\ - !*** ./node_modules/markdown-it/lib/helpers/parse_link_destination.js ***! - \************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Parse link destination\n//\n\n\nvar unescapeAll = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").unescapeAll;\n\nmodule.exports = function parseLinkDestination(str, pos, max) {\n var code,\n level,\n lines = 0,\n start = pos,\n result = {\n ok: false,\n pos: 0,\n lines: 0,\n str: ''\n };\n\n if (str.charCodeAt(pos) === 0x3C\n /* < */\n ) {\n pos++;\n\n while (pos < max) {\n code = str.charCodeAt(pos);\n\n if (code === 0x0A\n /* \\n */\n ) {\n return result;\n }\n\n if (code === 0x3E\n /* > */\n ) {\n result.pos = pos + 1;\n result.str = unescapeAll(str.slice(start + 1, pos));\n result.ok = true;\n return result;\n }\n\n if (code === 0x5C\n /* \\ */\n && pos + 1 < max) {\n pos += 2;\n continue;\n }\n\n pos++;\n } // no closing '>'\n\n\n return result;\n } // this should be ... } else { ... branch\n\n\n level = 0;\n\n while (pos < max) {\n code = str.charCodeAt(pos);\n\n if (code === 0x20) {\n break;\n } // ascii control characters\n\n\n if (code < 0x20 || code === 0x7F) {\n break;\n }\n\n if (code === 0x5C\n /* \\ */\n && pos + 1 < max) {\n pos += 2;\n continue;\n }\n\n if (code === 0x28\n /* ( */\n ) {\n level++;\n }\n\n if (code === 0x29\n /* ) */\n ) {\n if (level === 0) {\n break;\n }\n\n level--;\n }\n\n pos++;\n }\n\n if (start === pos) {\n return result;\n }\n\n if (level !== 0) {\n return result;\n }\n\n result.str = unescapeAll(str.slice(start, pos));\n result.lines = lines;\n result.pos = pos;\n result.ok = true;\n return result;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/helpers/parse_link_destination.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/helpers/parse_link_label.js": -/*!******************************************************************!*\ - !*** ./node_modules/markdown-it/lib/helpers/parse_link_label.js ***! - \******************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Parse link label\n//\n// this function assumes that first character (\"[\") already matches;\n// returns the end of the label\n//\n\n\nmodule.exports = function parseLinkLabel(state, start, disableNested) {\n var level,\n found,\n marker,\n prevPos,\n labelEnd = -1,\n max = state.posMax,\n oldPos = state.pos;\n state.pos = start + 1;\n level = 1;\n\n while (state.pos < max) {\n marker = state.src.charCodeAt(state.pos);\n\n if (marker === 0x5D\n /* ] */\n ) {\n level--;\n\n if (level === 0) {\n found = true;\n break;\n }\n }\n\n prevPos = state.pos;\n state.md.inline.skipToken(state);\n\n if (marker === 0x5B\n /* [ */\n ) {\n if (prevPos === state.pos - 1) {\n // increase level if we find text `[`, which is not a part of any token\n level++;\n } else if (disableNested) {\n state.pos = oldPos;\n return -1;\n }\n }\n }\n\n if (found) {\n labelEnd = state.pos;\n } // restore old state\n\n\n state.pos = oldPos;\n return labelEnd;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/helpers/parse_link_label.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/helpers/parse_link_title.js": -/*!******************************************************************!*\ - !*** ./node_modules/markdown-it/lib/helpers/parse_link_title.js ***! - \******************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Parse link title\n//\n\n\nvar unescapeAll = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").unescapeAll;\n\nmodule.exports = function parseLinkTitle(str, pos, max) {\n var code,\n marker,\n lines = 0,\n start = pos,\n result = {\n ok: false,\n pos: 0,\n lines: 0,\n str: ''\n };\n\n if (pos >= max) {\n return result;\n }\n\n marker = str.charCodeAt(pos);\n\n if (marker !== 0x22\n /* \" */\n && marker !== 0x27\n /* ' */\n && marker !== 0x28\n /* ( */\n ) {\n return result;\n }\n\n pos++; // if opening marker is \"(\", switch it to closing marker \")\"\n\n if (marker === 0x28) {\n marker = 0x29;\n }\n\n while (pos < max) {\n code = str.charCodeAt(pos);\n\n if (code === marker) {\n result.pos = pos + 1;\n result.lines = lines;\n result.str = unescapeAll(str.slice(start + 1, pos));\n result.ok = true;\n return result;\n } else if (code === 0x0A) {\n lines++;\n } else if (code === 0x5C\n /* \\ */\n && pos + 1 < max) {\n pos++;\n\n if (str.charCodeAt(pos) === 0x0A) {\n lines++;\n }\n }\n\n pos++;\n }\n\n return result;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/helpers/parse_link_title.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/index.js": -/*!***********************************************!*\ - !*** ./node_modules/markdown-it/lib/index.js ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Main parser class\n\n\nvar utils = __webpack_require__(/*! ./common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\");\n\nvar helpers = __webpack_require__(/*! ./helpers */ \"./node_modules/markdown-it/lib/helpers/index.js\");\n\nvar Renderer = __webpack_require__(/*! ./renderer */ \"./node_modules/markdown-it/lib/renderer.js\");\n\nvar ParserCore = __webpack_require__(/*! ./parser_core */ \"./node_modules/markdown-it/lib/parser_core.js\");\n\nvar ParserBlock = __webpack_require__(/*! ./parser_block */ \"./node_modules/markdown-it/lib/parser_block.js\");\n\nvar ParserInline = __webpack_require__(/*! ./parser_inline */ \"./node_modules/markdown-it/lib/parser_inline.js\");\n\nvar LinkifyIt = __webpack_require__(/*! linkify-it */ \"./node_modules/linkify-it/index.js\");\n\nvar mdurl = __webpack_require__(/*! mdurl */ \"./node_modules/mdurl/index.js\");\n\nvar punycode = __webpack_require__(/*! punycode */ \"./node_modules/node-libs-browser/node_modules/punycode/punycode.js\");\n\nvar config = {\n 'default': __webpack_require__(/*! ./presets/default */ \"./node_modules/markdown-it/lib/presets/default.js\"),\n zero: __webpack_require__(/*! ./presets/zero */ \"./node_modules/markdown-it/lib/presets/zero.js\"),\n commonmark: __webpack_require__(/*! ./presets/commonmark */ \"./node_modules/markdown-it/lib/presets/commonmark.js\")\n}; ////////////////////////////////////////////////////////////////////////////////\n//\n// This validator can prohibit more than really needed to prevent XSS. It's a\n// tradeoff to keep code simple and to be secure by default.\n//\n// If you need different setup - override validator method as you wish. Or\n// replace it with dummy function and use external sanitizer.\n//\n\nvar BAD_PROTO_RE = /^(vbscript|javascript|file|data):/;\nvar GOOD_DATA_RE = /^data:image\\/(gif|png|jpeg|webp);/;\n\nfunction validateLink(url) {\n // url should be normalized at this point, and existing entities are decoded\n var str = url.trim().toLowerCase();\n return BAD_PROTO_RE.test(str) ? GOOD_DATA_RE.test(str) ? true : false : true;\n} ////////////////////////////////////////////////////////////////////////////////\n\n\nvar RECODE_HOSTNAME_FOR = ['http:', 'https:', 'mailto:'];\n\nfunction normalizeLink(url) {\n var parsed = mdurl.parse(url, true);\n\n if (parsed.hostname) {\n // Encode hostnames in urls like:\n // `http://host/`, `https://host/`, `mailto:user@host`, `//host/`\n //\n // We don't encode unknown schemas, because it's likely that we encode\n // something we shouldn't (e.g. `skype:name` treated as `skype:host`)\n //\n if (!parsed.protocol || RECODE_HOSTNAME_FOR.indexOf(parsed.protocol) >= 0) {\n try {\n parsed.hostname = punycode.toASCII(parsed.hostname);\n } catch (er) {\n /**/\n }\n }\n }\n\n return mdurl.encode(mdurl.format(parsed));\n}\n\nfunction normalizeLinkText(url) {\n var parsed = mdurl.parse(url, true);\n\n if (parsed.hostname) {\n // Encode hostnames in urls like:\n // `http://host/`, `https://host/`, `mailto:user@host`, `//host/`\n //\n // We don't encode unknown schemas, because it's likely that we encode\n // something we shouldn't (e.g. `skype:name` treated as `skype:host`)\n //\n if (!parsed.protocol || RECODE_HOSTNAME_FOR.indexOf(parsed.protocol) >= 0) {\n try {\n parsed.hostname = punycode.toUnicode(parsed.hostname);\n } catch (er) {\n /**/\n }\n }\n }\n\n return mdurl.decode(mdurl.format(parsed));\n}\n/**\n * class MarkdownIt\n *\n * Main parser/renderer class.\n *\n * ##### Usage\n *\n * ```javascript\n * // node.js, \"classic\" way:\n * var MarkdownIt = require('markdown-it'),\n * md = new MarkdownIt();\n * var result = md.render('# markdown-it rulezz!');\n *\n * // node.js, the same, but with sugar:\n * var md = require('markdown-it')();\n * var result = md.render('# markdown-it rulezz!');\n *\n * // browser without AMD, added to \"window\" on script load\n * // Note, there are no dash.\n * var md = window.markdownit();\n * var result = md.render('# markdown-it rulezz!');\n * ```\n *\n * Single line rendering, without paragraph wrap:\n *\n * ```javascript\n * var md = require('markdown-it')();\n * var result = md.renderInline('__markdown-it__ rulezz!');\n * ```\n **/\n\n/**\n * new MarkdownIt([presetName, options])\n * - presetName (String): optional, `commonmark` / `zero`\n * - options (Object)\n *\n * Creates parser instanse with given config. Can be called without `new`.\n *\n * ##### presetName\n *\n * MarkdownIt provides named presets as a convenience to quickly\n * enable/disable active syntax rules and options for common use cases.\n *\n * - [\"commonmark\"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/commonmark.js) -\n * configures parser to strict [CommonMark](http://commonmark.org/) mode.\n * - [default](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/default.js) -\n * similar to GFM, used when no preset name given. Enables all available rules,\n * but still without html, typographer & autolinker.\n * - [\"zero\"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/zero.js) -\n * all rules disabled. Useful to quickly setup your config via `.enable()`.\n * For example, when you need only `bold` and `italic` markup and nothing else.\n *\n * ##### options:\n *\n * - __html__ - `false`. Set `true` to enable HTML tags in source. Be careful!\n * That's not safe! You may need external sanitizer to protect output from XSS.\n * It's better to extend features via plugins, instead of enabling HTML.\n * - __xhtmlOut__ - `false`. Set `true` to add '/' when closing single tags\n * (`
`). This is needed only for full CommonMark compatibility. In real\n * world you will need HTML output.\n * - __breaks__ - `false`. Set `true` to convert `\\n` in paragraphs into `
`.\n * - __langPrefix__ - `language-`. CSS language class prefix for fenced blocks.\n * Can be useful for external highlighters.\n * - __linkify__ - `false`. Set `true` to autoconvert URL-like text to links.\n * - __typographer__ - `false`. Set `true` to enable [some language-neutral\n * replacement](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/replacements.js) +\n * quotes beautification (smartquotes).\n * - __quotes__ - `“”‘’`, String or Array. Double + single quotes replacement\n * pairs, when typographer enabled and smartquotes on. For example, you can\n * use `'«»„“'` for Russian, `'„“‚‘'` for German, and\n * `['«\\xA0', '\\xA0»', '‹\\xA0', '\\xA0›']` for French (including nbsp).\n * - __highlight__ - `null`. Highlighter function for fenced code blocks.\n * Highlighter `function (str, lang)` should return escaped HTML. It can also\n * return empty string if the source was not changed and should be escaped\n * externaly. If result starts with `):\n *\n * ```javascript\n * var hljs = require('highlight.js') // https://highlightjs.org/\n *\n * // Actual default values\n * var md = require('markdown-it')({\n * highlight: function (str, lang) {\n * if (lang && hljs.getLanguage(lang)) {\n * try {\n * return '
' +\n *                hljs.highlight(lang, str, true).value +\n *                '
';\n * } catch (__) {}\n * }\n *\n * return '
' + md.utils.escapeHtml(str) + '
';\n * }\n * });\n * ```\n *\n **/\n\n\nfunction MarkdownIt(presetName, options) {\n if (!(this instanceof MarkdownIt)) {\n return new MarkdownIt(presetName, options);\n }\n\n if (!options) {\n if (!utils.isString(presetName)) {\n options = presetName || {};\n presetName = 'default';\n }\n }\n /**\n * MarkdownIt#inline -> ParserInline\n *\n * Instance of [[ParserInline]]. You may need it to add new rules when\n * writing plugins. For simple rules control use [[MarkdownIt.disable]] and\n * [[MarkdownIt.enable]].\n **/\n\n\n this.inline = new ParserInline();\n /**\n * MarkdownIt#block -> ParserBlock\n *\n * Instance of [[ParserBlock]]. You may need it to add new rules when\n * writing plugins. For simple rules control use [[MarkdownIt.disable]] and\n * [[MarkdownIt.enable]].\n **/\n\n this.block = new ParserBlock();\n /**\n * MarkdownIt#core -> Core\n *\n * Instance of [[Core]] chain executor. You may need it to add new rules when\n * writing plugins. For simple rules control use [[MarkdownIt.disable]] and\n * [[MarkdownIt.enable]].\n **/\n\n this.core = new ParserCore();\n /**\n * MarkdownIt#renderer -> Renderer\n *\n * Instance of [[Renderer]]. Use it to modify output look. Or to add rendering\n * rules for new token types, generated by plugins.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * function myToken(tokens, idx, options, env, self) {\n * //...\n * return result;\n * };\n *\n * md.renderer.rules['my_token'] = myToken\n * ```\n *\n * See [[Renderer]] docs and [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.js).\n **/\n\n this.renderer = new Renderer();\n /**\n * MarkdownIt#linkify -> LinkifyIt\n *\n * [linkify-it](https://github.com/markdown-it/linkify-it) instance.\n * Used by [linkify](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/linkify.js)\n * rule.\n **/\n\n this.linkify = new LinkifyIt();\n /**\n * MarkdownIt#validateLink(url) -> Boolean\n *\n * Link validation function. CommonMark allows too much in links. By default\n * we disable `javascript:`, `vbscript:`, `file:` schemas, and almost all `data:...` schemas\n * except some embedded image types.\n *\n * You can change this behaviour:\n *\n * ```javascript\n * var md = require('markdown-it')();\n * // enable everything\n * md.validateLink = function () { return true; }\n * ```\n **/\n\n this.validateLink = validateLink;\n /**\n * MarkdownIt#normalizeLink(url) -> String\n *\n * Function used to encode link url to a machine-readable format,\n * which includes url-encoding, punycode, etc.\n **/\n\n this.normalizeLink = normalizeLink;\n /**\n * MarkdownIt#normalizeLinkText(url) -> String\n *\n * Function used to decode link url to a human-readable format`\n **/\n\n this.normalizeLinkText = normalizeLinkText; // Expose utils & helpers for easy acces from plugins\n\n /**\n * MarkdownIt#utils -> utils\n *\n * Assorted utility functions, useful to write plugins. See details\n * [here](https://github.com/markdown-it/markdown-it/blob/master/lib/common/utils.js).\n **/\n\n this.utils = utils;\n /**\n * MarkdownIt#helpers -> helpers\n *\n * Link components parser functions, useful to write plugins. See details\n * [here](https://github.com/markdown-it/markdown-it/blob/master/lib/helpers).\n **/\n\n this.helpers = utils.assign({}, helpers);\n this.options = {};\n this.configure(presetName);\n\n if (options) {\n this.set(options);\n }\n}\n/** chainable\n * MarkdownIt.set(options)\n *\n * Set parser options (in the same format as in constructor). Probably, you\n * will never need it, but you can change options after constructor call.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')()\n * .set({ html: true, breaks: true })\n * .set({ typographer, true });\n * ```\n *\n * __Note:__ To achieve the best possible performance, don't modify a\n * `markdown-it` instance options on the fly. If you need multiple configurations\n * it's best to create multiple instances and initialize each with separate\n * config.\n **/\n\n\nMarkdownIt.prototype.set = function (options) {\n utils.assign(this.options, options);\n return this;\n};\n/** chainable, internal\n * MarkdownIt.configure(presets)\n *\n * Batch load of all options and compenent settings. This is internal method,\n * and you probably will not need it. But if you with - see available presets\n * and data structure [here](https://github.com/markdown-it/markdown-it/tree/master/lib/presets)\n *\n * We strongly recommend to use presets instead of direct config loads. That\n * will give better compatibility with next versions.\n **/\n\n\nMarkdownIt.prototype.configure = function (presets) {\n var self = this,\n presetName;\n\n if (utils.isString(presets)) {\n presetName = presets;\n presets = config[presetName];\n\n if (!presets) {\n throw new Error('Wrong `markdown-it` preset \"' + presetName + '\", check name');\n }\n }\n\n if (!presets) {\n throw new Error('Wrong `markdown-it` preset, can\\'t be empty');\n }\n\n if (presets.options) {\n self.set(presets.options);\n }\n\n if (presets.components) {\n Object.keys(presets.components).forEach(function (name) {\n if (presets.components[name].rules) {\n self[name].ruler.enableOnly(presets.components[name].rules);\n }\n\n if (presets.components[name].rules2) {\n self[name].ruler2.enableOnly(presets.components[name].rules2);\n }\n });\n }\n\n return this;\n};\n/** chainable\n * MarkdownIt.enable(list, ignoreInvalid)\n * - list (String|Array): rule name or list of rule names to enable\n * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.\n *\n * Enable list or rules. It will automatically find appropriate components,\n * containing rules with given names. If rule not found, and `ignoreInvalid`\n * not set - throws exception.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')()\n * .enable(['sub', 'sup'])\n * .disable('smartquotes');\n * ```\n **/\n\n\nMarkdownIt.prototype.enable = function (list, ignoreInvalid) {\n var result = [];\n\n if (!Array.isArray(list)) {\n list = [list];\n }\n\n ['core', 'block', 'inline'].forEach(function (chain) {\n result = result.concat(this[chain].ruler.enable(list, true));\n }, this);\n result = result.concat(this.inline.ruler2.enable(list, true));\n var missed = list.filter(function (name) {\n return result.indexOf(name) < 0;\n });\n\n if (missed.length && !ignoreInvalid) {\n throw new Error('MarkdownIt. Failed to enable unknown rule(s): ' + missed);\n }\n\n return this;\n};\n/** chainable\n * MarkdownIt.disable(list, ignoreInvalid)\n * - list (String|Array): rule name or list of rule names to disable.\n * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.\n *\n * The same as [[MarkdownIt.enable]], but turn specified rules off.\n **/\n\n\nMarkdownIt.prototype.disable = function (list, ignoreInvalid) {\n var result = [];\n\n if (!Array.isArray(list)) {\n list = [list];\n }\n\n ['core', 'block', 'inline'].forEach(function (chain) {\n result = result.concat(this[chain].ruler.disable(list, true));\n }, this);\n result = result.concat(this.inline.ruler2.disable(list, true));\n var missed = list.filter(function (name) {\n return result.indexOf(name) < 0;\n });\n\n if (missed.length && !ignoreInvalid) {\n throw new Error('MarkdownIt. Failed to disable unknown rule(s): ' + missed);\n }\n\n return this;\n};\n/** chainable\n * MarkdownIt.use(plugin, params)\n *\n * Load specified plugin with given params into current parser instance.\n * It's just a sugar to call `plugin(md, params)` with curring.\n *\n * ##### Example\n *\n * ```javascript\n * var iterator = require('markdown-it-for-inline');\n * var md = require('markdown-it')()\n * .use(iterator, 'foo_replace', 'text', function (tokens, idx) {\n * tokens[idx].content = tokens[idx].content.replace(/foo/g, 'bar');\n * });\n * ```\n **/\n\n\nMarkdownIt.prototype.use = function (plugin\n/*, params, ... */\n) {\n var args = [this].concat(Array.prototype.slice.call(arguments, 1));\n plugin.apply(plugin, args);\n return this;\n};\n/** internal\n * MarkdownIt.parse(src, env) -> Array\n * - src (String): source string\n * - env (Object): environment sandbox\n *\n * Parse input string and returns list of block tokens (special token type\n * \"inline\" will contain list of inline tokens). You should not call this\n * method directly, until you write custom renderer (for example, to produce\n * AST).\n *\n * `env` is used to pass data between \"distributed\" rules and return additional\n * metadata like reference info, needed for the renderer. It also can be used to\n * inject data in specific cases. Usually, you will be ok to pass `{}`,\n * and then pass updated object to renderer.\n **/\n\n\nMarkdownIt.prototype.parse = function (src, env) {\n if (typeof src !== 'string') {\n throw new Error('Input data should be a String');\n }\n\n var state = new this.core.State(src, this, env);\n this.core.process(state);\n return state.tokens;\n};\n/**\n * MarkdownIt.render(src [, env]) -> String\n * - src (String): source string\n * - env (Object): environment sandbox\n *\n * Render markdown string into html. It does all magic for you :).\n *\n * `env` can be used to inject additional metadata (`{}` by default).\n * But you will not need it with high probability. See also comment\n * in [[MarkdownIt.parse]].\n **/\n\n\nMarkdownIt.prototype.render = function (src, env) {\n env = env || {};\n return this.renderer.render(this.parse(src, env), this.options, env);\n};\n/** internal\n * MarkdownIt.parseInline(src, env) -> Array\n * - src (String): source string\n * - env (Object): environment sandbox\n *\n * The same as [[MarkdownIt.parse]] but skip all block rules. It returns the\n * block tokens list with the single `inline` element, containing parsed inline\n * tokens in `children` property. Also updates `env` object.\n **/\n\n\nMarkdownIt.prototype.parseInline = function (src, env) {\n var state = new this.core.State(src, this, env);\n state.inlineMode = true;\n this.core.process(state);\n return state.tokens;\n};\n/**\n * MarkdownIt.renderInline(src [, env]) -> String\n * - src (String): source string\n * - env (Object): environment sandbox\n *\n * Similar to [[MarkdownIt.render]] but for single paragraph content. Result\n * will NOT be wrapped into `

` tags.\n **/\n\n\nMarkdownIt.prototype.renderInline = function (src, env) {\n env = env || {};\n return this.renderer.render(this.parseInline(src, env), this.options, env);\n};\n\nmodule.exports = MarkdownIt;\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/index.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/parser_block.js": -/*!******************************************************!*\ - !*** ./node_modules/markdown-it/lib/parser_block.js ***! - \******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("/** internal\n * class ParserBlock\n *\n * Block-level tokenizer.\n **/\n\n\nvar Ruler = __webpack_require__(/*! ./ruler */ \"./node_modules/markdown-it/lib/ruler.js\");\n\nvar _rules = [// First 2 params - rule name & source. Secondary array - list of rules,\n// which can be terminated by this one.\n['table', __webpack_require__(/*! ./rules_block/table */ \"./node_modules/markdown-it/lib/rules_block/table.js\"), ['paragraph', 'reference']], ['code', __webpack_require__(/*! ./rules_block/code */ \"./node_modules/markdown-it/lib/rules_block/code.js\")], ['fence', __webpack_require__(/*! ./rules_block/fence */ \"./node_modules/markdown-it/lib/rules_block/fence.js\"), ['paragraph', 'reference', 'blockquote', 'list']], ['blockquote', __webpack_require__(/*! ./rules_block/blockquote */ \"./node_modules/markdown-it/lib/rules_block/blockquote.js\"), ['paragraph', 'reference', 'blockquote', 'list']], ['hr', __webpack_require__(/*! ./rules_block/hr */ \"./node_modules/markdown-it/lib/rules_block/hr.js\"), ['paragraph', 'reference', 'blockquote', 'list']], ['list', __webpack_require__(/*! ./rules_block/list */ \"./node_modules/markdown-it/lib/rules_block/list.js\"), ['paragraph', 'reference', 'blockquote']], ['reference', __webpack_require__(/*! ./rules_block/reference */ \"./node_modules/markdown-it/lib/rules_block/reference.js\")], ['heading', __webpack_require__(/*! ./rules_block/heading */ \"./node_modules/markdown-it/lib/rules_block/heading.js\"), ['paragraph', 'reference', 'blockquote']], ['lheading', __webpack_require__(/*! ./rules_block/lheading */ \"./node_modules/markdown-it/lib/rules_block/lheading.js\")], ['html_block', __webpack_require__(/*! ./rules_block/html_block */ \"./node_modules/markdown-it/lib/rules_block/html_block.js\"), ['paragraph', 'reference', 'blockquote']], ['paragraph', __webpack_require__(/*! ./rules_block/paragraph */ \"./node_modules/markdown-it/lib/rules_block/paragraph.js\")]];\n/**\n * new ParserBlock()\n **/\n\nfunction ParserBlock() {\n /**\n * ParserBlock#ruler -> Ruler\n *\n * [[Ruler]] instance. Keep configuration of block rules.\n **/\n this.ruler = new Ruler();\n\n for (var i = 0; i < _rules.length; i++) {\n this.ruler.push(_rules[i][0], _rules[i][1], {\n alt: (_rules[i][2] || []).slice()\n });\n }\n} // Generate tokens for input range\n//\n\n\nParserBlock.prototype.tokenize = function (state, startLine, endLine) {\n var ok,\n i,\n rules = this.ruler.getRules(''),\n len = rules.length,\n line = startLine,\n hasEmptyLines = false,\n maxNesting = state.md.options.maxNesting;\n\n while (line < endLine) {\n state.line = line = state.skipEmptyLines(line);\n\n if (line >= endLine) {\n break;\n } // Termination condition for nested calls.\n // Nested calls currently used for blockquotes & lists\n\n\n if (state.sCount[line] < state.blkIndent) {\n break;\n } // If nesting level exceeded - skip tail to the end. That's not ordinary\n // situation and we should not care about content.\n\n\n if (state.level >= maxNesting) {\n state.line = endLine;\n break;\n } // Try all possible rules.\n // On success, rule should:\n //\n // - update `state.line`\n // - update `state.tokens`\n // - return true\n\n\n for (i = 0; i < len; i++) {\n ok = rules[i](state, line, endLine, false);\n\n if (ok) {\n break;\n }\n } // set state.tight if we had an empty line before current tag\n // i.e. latest empty line should not count\n\n\n state.tight = !hasEmptyLines; // paragraph might \"eat\" one newline after it in nested lists\n\n if (state.isEmpty(state.line - 1)) {\n hasEmptyLines = true;\n }\n\n line = state.line;\n\n if (line < endLine && state.isEmpty(line)) {\n hasEmptyLines = true;\n line++;\n state.line = line;\n }\n }\n};\n/**\n * ParserBlock.parse(str, md, env, outTokens)\n *\n * Process input string and push block tokens into `outTokens`\n **/\n\n\nParserBlock.prototype.parse = function (src, md, env, outTokens) {\n var state;\n\n if (!src) {\n return;\n }\n\n state = new this.State(src, md, env, outTokens);\n this.tokenize(state, state.line, state.lineMax);\n};\n\nParserBlock.prototype.State = __webpack_require__(/*! ./rules_block/state_block */ \"./node_modules/markdown-it/lib/rules_block/state_block.js\");\nmodule.exports = ParserBlock;\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/parser_block.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/parser_core.js": -/*!*****************************************************!*\ - !*** ./node_modules/markdown-it/lib/parser_core.js ***! - \*****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("/** internal\n * class Core\n *\n * Top-level rules executor. Glues block/inline parsers and does intermediate\n * transformations.\n **/\n\n\nvar Ruler = __webpack_require__(/*! ./ruler */ \"./node_modules/markdown-it/lib/ruler.js\");\n\nvar _rules = [['normalize', __webpack_require__(/*! ./rules_core/normalize */ \"./node_modules/markdown-it/lib/rules_core/normalize.js\")], ['block', __webpack_require__(/*! ./rules_core/block */ \"./node_modules/markdown-it/lib/rules_core/block.js\")], ['inline', __webpack_require__(/*! ./rules_core/inline */ \"./node_modules/markdown-it/lib/rules_core/inline.js\")], ['linkify', __webpack_require__(/*! ./rules_core/linkify */ \"./node_modules/markdown-it/lib/rules_core/linkify.js\")], ['replacements', __webpack_require__(/*! ./rules_core/replacements */ \"./node_modules/markdown-it/lib/rules_core/replacements.js\")], ['smartquotes', __webpack_require__(/*! ./rules_core/smartquotes */ \"./node_modules/markdown-it/lib/rules_core/smartquotes.js\")]];\n/**\n * new Core()\n **/\n\nfunction Core() {\n /**\n * Core#ruler -> Ruler\n *\n * [[Ruler]] instance. Keep configuration of core rules.\n **/\n this.ruler = new Ruler();\n\n for (var i = 0; i < _rules.length; i++) {\n this.ruler.push(_rules[i][0], _rules[i][1]);\n }\n}\n/**\n * Core.process(state)\n *\n * Executes core chain rules.\n **/\n\n\nCore.prototype.process = function (state) {\n var i, l, rules;\n rules = this.ruler.getRules('');\n\n for (i = 0, l = rules.length; i < l; i++) {\n rules[i](state);\n }\n};\n\nCore.prototype.State = __webpack_require__(/*! ./rules_core/state_core */ \"./node_modules/markdown-it/lib/rules_core/state_core.js\");\nmodule.exports = Core;\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/parser_core.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/parser_inline.js": -/*!*******************************************************!*\ - !*** ./node_modules/markdown-it/lib/parser_inline.js ***! - \*******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("/** internal\n * class ParserInline\n *\n * Tokenizes paragraph content.\n **/\n\n\nvar Ruler = __webpack_require__(/*! ./ruler */ \"./node_modules/markdown-it/lib/ruler.js\"); ////////////////////////////////////////////////////////////////////////////////\n// Parser rules\n\n\nvar _rules = [['text', __webpack_require__(/*! ./rules_inline/text */ \"./node_modules/markdown-it/lib/rules_inline/text.js\")], ['newline', __webpack_require__(/*! ./rules_inline/newline */ \"./node_modules/markdown-it/lib/rules_inline/newline.js\")], ['escape', __webpack_require__(/*! ./rules_inline/escape */ \"./node_modules/markdown-it/lib/rules_inline/escape.js\")], ['backticks', __webpack_require__(/*! ./rules_inline/backticks */ \"./node_modules/markdown-it/lib/rules_inline/backticks.js\")], ['strikethrough', __webpack_require__(/*! ./rules_inline/strikethrough */ \"./node_modules/markdown-it/lib/rules_inline/strikethrough.js\").tokenize], ['emphasis', __webpack_require__(/*! ./rules_inline/emphasis */ \"./node_modules/markdown-it/lib/rules_inline/emphasis.js\").tokenize], ['link', __webpack_require__(/*! ./rules_inline/link */ \"./node_modules/markdown-it/lib/rules_inline/link.js\")], ['image', __webpack_require__(/*! ./rules_inline/image */ \"./node_modules/markdown-it/lib/rules_inline/image.js\")], ['autolink', __webpack_require__(/*! ./rules_inline/autolink */ \"./node_modules/markdown-it/lib/rules_inline/autolink.js\")], ['html_inline', __webpack_require__(/*! ./rules_inline/html_inline */ \"./node_modules/markdown-it/lib/rules_inline/html_inline.js\")], ['entity', __webpack_require__(/*! ./rules_inline/entity */ \"./node_modules/markdown-it/lib/rules_inline/entity.js\")]];\nvar _rules2 = [['balance_pairs', __webpack_require__(/*! ./rules_inline/balance_pairs */ \"./node_modules/markdown-it/lib/rules_inline/balance_pairs.js\")], ['strikethrough', __webpack_require__(/*! ./rules_inline/strikethrough */ \"./node_modules/markdown-it/lib/rules_inline/strikethrough.js\").postProcess], ['emphasis', __webpack_require__(/*! ./rules_inline/emphasis */ \"./node_modules/markdown-it/lib/rules_inline/emphasis.js\").postProcess], ['text_collapse', __webpack_require__(/*! ./rules_inline/text_collapse */ \"./node_modules/markdown-it/lib/rules_inline/text_collapse.js\")]];\n/**\n * new ParserInline()\n **/\n\nfunction ParserInline() {\n var i;\n /**\n * ParserInline#ruler -> Ruler\n *\n * [[Ruler]] instance. Keep configuration of inline rules.\n **/\n\n this.ruler = new Ruler();\n\n for (i = 0; i < _rules.length; i++) {\n this.ruler.push(_rules[i][0], _rules[i][1]);\n }\n /**\n * ParserInline#ruler2 -> Ruler\n *\n * [[Ruler]] instance. Second ruler used for post-processing\n * (e.g. in emphasis-like rules).\n **/\n\n\n this.ruler2 = new Ruler();\n\n for (i = 0; i < _rules2.length; i++) {\n this.ruler2.push(_rules2[i][0], _rules2[i][1]);\n }\n} // Skip single token by running all rules in validation mode;\n// returns `true` if any rule reported success\n//\n\n\nParserInline.prototype.skipToken = function (state) {\n var ok,\n i,\n pos = state.pos,\n rules = this.ruler.getRules(''),\n len = rules.length,\n maxNesting = state.md.options.maxNesting,\n cache = state.cache;\n\n if (typeof cache[pos] !== 'undefined') {\n state.pos = cache[pos];\n return;\n }\n\n if (state.level < maxNesting) {\n for (i = 0; i < len; i++) {\n // Increment state.level and decrement it later to limit recursion.\n // It's harmless to do here, because no tokens are created. But ideally,\n // we'd need a separate private state variable for this purpose.\n //\n state.level++;\n ok = rules[i](state, true);\n state.level--;\n\n if (ok) {\n break;\n }\n }\n } else {\n // Too much nesting, just skip until the end of the paragraph.\n //\n // NOTE: this will cause links to behave incorrectly in the following case,\n // when an amount of `[` is exactly equal to `maxNesting + 1`:\n //\n // [[[[[[[[[[[[[[[[[[[[[foo]()\n //\n // TODO: remove this workaround when CM standard will allow nested links\n // (we can replace it by preventing links from being parsed in\n // validation mode)\n //\n state.pos = state.posMax;\n }\n\n if (!ok) {\n state.pos++;\n }\n\n cache[pos] = state.pos;\n}; // Generate tokens for input range\n//\n\n\nParserInline.prototype.tokenize = function (state) {\n var ok,\n i,\n rules = this.ruler.getRules(''),\n len = rules.length,\n end = state.posMax,\n maxNesting = state.md.options.maxNesting;\n\n while (state.pos < end) {\n // Try all possible rules.\n // On success, rule should:\n //\n // - update `state.pos`\n // - update `state.tokens`\n // - return true\n if (state.level < maxNesting) {\n for (i = 0; i < len; i++) {\n ok = rules[i](state, false);\n\n if (ok) {\n break;\n }\n }\n }\n\n if (ok) {\n if (state.pos >= end) {\n break;\n }\n\n continue;\n }\n\n state.pending += state.src[state.pos++];\n }\n\n if (state.pending) {\n state.pushPending();\n }\n};\n/**\n * ParserInline.parse(str, md, env, outTokens)\n *\n * Process input string and push inline tokens into `outTokens`\n **/\n\n\nParserInline.prototype.parse = function (str, md, env, outTokens) {\n var i, rules, len;\n var state = new this.State(str, md, env, outTokens);\n this.tokenize(state);\n rules = this.ruler2.getRules('');\n len = rules.length;\n\n for (i = 0; i < len; i++) {\n rules[i](state);\n }\n};\n\nParserInline.prototype.State = __webpack_require__(/*! ./rules_inline/state_inline */ \"./node_modules/markdown-it/lib/rules_inline/state_inline.js\");\nmodule.exports = ParserInline;\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/parser_inline.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/presets/commonmark.js": -/*!************************************************************!*\ - !*** ./node_modules/markdown-it/lib/presets/commonmark.js ***! - \************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Commonmark default options\n\n\nmodule.exports = {\n options: {\n html: true,\n // Enable HTML tags in source\n xhtmlOut: true,\n // Use '/' to close single tags (
)\n breaks: false,\n // Convert '\\n' in paragraphs into
\n langPrefix: 'language-',\n // CSS language prefix for fenced blocks\n linkify: false,\n // autoconvert URL-like texts to links\n // Enable some language-neutral replacements + quotes beautification\n typographer: false,\n // Double + single quotes replacement pairs, when typographer enabled,\n // and smartquotes on. Could be either a String or an Array.\n //\n // For example, you can use '«»„“' for Russian, '„“‚‘' for German,\n // and ['«\\xA0', '\\xA0»', '‹\\xA0', '\\xA0›'] for French (including nbsp).\n quotes: \"\\u201C\\u201D\\u2018\\u2019\",\n\n /* “”‘’ */\n // Highlighter function. Should return escaped HTML,\n // or '' if the source string is not changed and should be escaped externaly.\n // If result starts with )\n breaks: false,\n // Convert '\\n' in paragraphs into
\n langPrefix: 'language-',\n // CSS language prefix for fenced blocks\n linkify: false,\n // autoconvert URL-like texts to links\n // Enable some language-neutral replacements + quotes beautification\n typographer: false,\n // Double + single quotes replacement pairs, when typographer enabled,\n // and smartquotes on. Could be either a String or an Array.\n //\n // For example, you can use '«»„“' for Russian, '„“‚‘' for German,\n // and ['«\\xA0', '\\xA0»', '‹\\xA0', '\\xA0›'] for French (including nbsp).\n quotes: \"\\u201C\\u201D\\u2018\\u2019\",\n\n /* “”‘’ */\n // Highlighter function. Should return escaped HTML,\n // or '' if the source string is not changed and should be escaped externaly.\n // If result starts with )\n breaks: false,\n // Convert '\\n' in paragraphs into
\n langPrefix: 'language-',\n // CSS language prefix for fenced blocks\n linkify: false,\n // autoconvert URL-like texts to links\n // Enable some language-neutral replacements + quotes beautification\n typographer: false,\n // Double + single quotes replacement pairs, when typographer enabled,\n // and smartquotes on. Could be either a String or an Array.\n //\n // For example, you can use '«»„“' for Russian, '„“‚‘' for German,\n // and ['«\\xA0', '\\xA0»', '‹\\xA0', '\\xA0›'] for French (including nbsp).\n quotes: \"\\u201C\\u201D\\u2018\\u2019\",\n\n /* “”‘’ */\n // Highlighter function. Should return escaped HTML,\n // or '' if the source string is not changed and should be escaped externaly.\n // If result starts with ' + escapeHtml(tokens[idx].content) + '';\n};\n\ndefault_rules.code_block = function (tokens, idx, options, env, slf) {\n var token = tokens[idx];\n return '' + escapeHtml(tokens[idx].content) + '\\n';\n};\n\ndefault_rules.fence = function (tokens, idx, options, env, slf) {\n var token = tokens[idx],\n info = token.info ? unescapeAll(token.info).trim() : '',\n langName = '',\n highlighted,\n i,\n tmpAttrs,\n tmpToken;\n\n if (info) {\n langName = info.split(/\\s+/g)[0];\n }\n\n if (options.highlight) {\n highlighted = options.highlight(token.content, langName) || escapeHtml(token.content);\n } else {\n highlighted = escapeHtml(token.content);\n }\n\n if (highlighted.indexOf('' + highlighted + '\\n';\n }\n\n return '

' + highlighted + '
\\n';\n};\n\ndefault_rules.image = function (tokens, idx, options, env, slf) {\n var token = tokens[idx]; // \"alt\" attr MUST be set, even if empty. Because it's mandatory and\n // should be placed on proper position for tests.\n //\n // Replace content with actual value\n\n token.attrs[token.attrIndex('alt')][1] = slf.renderInlineAsText(token.children, options, env);\n return slf.renderToken(tokens, idx, options);\n};\n\ndefault_rules.hardbreak = function (tokens, idx, options\n/*, env */\n) {\n return options.xhtmlOut ? '
\\n' : '
\\n';\n};\n\ndefault_rules.softbreak = function (tokens, idx, options\n/*, env */\n) {\n return options.breaks ? options.xhtmlOut ? '
\\n' : '
\\n' : '\\n';\n};\n\ndefault_rules.text = function (tokens, idx\n/*, options, env */\n) {\n return escapeHtml(tokens[idx].content);\n};\n\ndefault_rules.html_block = function (tokens, idx\n/*, options, env */\n) {\n return tokens[idx].content;\n};\n\ndefault_rules.html_inline = function (tokens, idx\n/*, options, env */\n) {\n return tokens[idx].content;\n};\n/**\n * new Renderer()\n *\n * Creates new [[Renderer]] instance and fill [[Renderer#rules]] with defaults.\n **/\n\n\nfunction Renderer() {\n /**\n * Renderer#rules -> Object\n *\n * Contains render rules for tokens. Can be updated and extended.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * md.renderer.rules.strong_open = function () { return ''; };\n * md.renderer.rules.strong_close = function () { return ''; };\n *\n * var result = md.renderInline(...);\n * ```\n *\n * Each rule is called as independent static function with fixed signature:\n *\n * ```javascript\n * function my_token_render(tokens, idx, options, env, renderer) {\n * // ...\n * return renderedHTML;\n * }\n * ```\n *\n * See [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.js)\n * for more details and examples.\n **/\n this.rules = assign({}, default_rules);\n}\n/**\n * Renderer.renderAttrs(token) -> String\n *\n * Render token attributes to string.\n **/\n\n\nRenderer.prototype.renderAttrs = function renderAttrs(token) {\n var i, l, result;\n\n if (!token.attrs) {\n return '';\n }\n\n result = '';\n\n for (i = 0, l = token.attrs.length; i < l; i++) {\n result += ' ' + escapeHtml(token.attrs[i][0]) + '=\"' + escapeHtml(token.attrs[i][1]) + '\"';\n }\n\n return result;\n};\n/**\n * Renderer.renderToken(tokens, idx, options) -> String\n * - tokens (Array): list of tokens\n * - idx (Numbed): token index to render\n * - options (Object): params of parser instance\n *\n * Default token renderer. Can be overriden by custom function\n * in [[Renderer#rules]].\n **/\n\n\nRenderer.prototype.renderToken = function renderToken(tokens, idx, options) {\n var nextToken,\n result = '',\n needLf = false,\n token = tokens[idx]; // Tight list paragraphs\n\n if (token.hidden) {\n return '';\n } // Insert a newline between hidden paragraph and subsequent opening\n // block-level tag.\n //\n // For example, here we should insert a newline before blockquote:\n // - a\n // >\n //\n\n\n if (token.block && token.nesting !== -1 && idx && tokens[idx - 1].hidden) {\n result += '\\n';\n } // Add token name, e.g. ``.\n //\n needLf = false;\n }\n }\n }\n }\n\n result += needLf ? '>\\n' : '>';\n return result;\n};\n/**\n * Renderer.renderInline(tokens, options, env) -> String\n * - tokens (Array): list on block tokens to renter\n * - options (Object): params of parser instance\n * - env (Object): additional data from parsed input (references, for example)\n *\n * The same as [[Renderer.render]], but for single token of `inline` type.\n **/\n\n\nRenderer.prototype.renderInline = function (tokens, options, env) {\n var type,\n result = '',\n rules = this.rules;\n\n for (var i = 0, len = tokens.length; i < len; i++) {\n type = tokens[i].type;\n\n if (typeof rules[type] !== 'undefined') {\n result += rules[type](tokens, i, options, env, this);\n } else {\n result += this.renderToken(tokens, i, options);\n }\n }\n\n return result;\n};\n/** internal\n * Renderer.renderInlineAsText(tokens, options, env) -> String\n * - tokens (Array): list on block tokens to renter\n * - options (Object): params of parser instance\n * - env (Object): additional data from parsed input (references, for example)\n *\n * Special kludge for image `alt` attributes to conform CommonMark spec.\n * Don't try to use it! Spec requires to show `alt` content with stripped markup,\n * instead of simple escaping.\n **/\n\n\nRenderer.prototype.renderInlineAsText = function (tokens, options, env) {\n var result = '';\n\n for (var i = 0, len = tokens.length; i < len; i++) {\n if (tokens[i].type === 'text') {\n result += tokens[i].content;\n } else if (tokens[i].type === 'image') {\n result += this.renderInlineAsText(tokens[i].children, options, env);\n }\n }\n\n return result;\n};\n/**\n * Renderer.render(tokens, options, env) -> String\n * - tokens (Array): list on block tokens to renter\n * - options (Object): params of parser instance\n * - env (Object): additional data from parsed input (references, for example)\n *\n * Takes token stream and generates HTML. Probably, you will never need to call\n * this method directly.\n **/\n\n\nRenderer.prototype.render = function (tokens, options, env) {\n var i,\n len,\n type,\n result = '',\n rules = this.rules;\n\n for (i = 0, len = tokens.length; i < len; i++) {\n type = tokens[i].type;\n\n if (type === 'inline') {\n result += this.renderInline(tokens[i].children, options, env);\n } else if (typeof rules[type] !== 'undefined') {\n result += rules[tokens[i].type](tokens, i, options, env, this);\n } else {\n result += this.renderToken(tokens, i, options, env);\n }\n }\n\n return result;\n};\n\nmodule.exports = Renderer;\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/renderer.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/ruler.js": -/*!***********************************************!*\ - !*** ./node_modules/markdown-it/lib/ruler.js ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("/**\n * class Ruler\n *\n * Helper class, used by [[MarkdownIt#core]], [[MarkdownIt#block]] and\n * [[MarkdownIt#inline]] to manage sequences of functions (rules):\n *\n * - keep rules in defined order\n * - assign the name to each rule\n * - enable/disable rules\n * - add/replace rules\n * - allow assign rules to additional named chains (in the same)\n * - cacheing lists of active rules\n *\n * You will not need use this class directly until write plugins. For simple\n * rules control use [[MarkdownIt.disable]], [[MarkdownIt.enable]] and\n * [[MarkdownIt.use]].\n **/\n\n/**\n * new Ruler()\n **/\n\nfunction Ruler() {\n // List of added rules. Each element is:\n //\n // {\n // name: XXX,\n // enabled: Boolean,\n // fn: Function(),\n // alt: [ name2, name3 ]\n // }\n //\n this.__rules__ = []; // Cached rule chains.\n //\n // First level - chain name, '' for default.\n // Second level - diginal anchor for fast filtering by charcodes.\n //\n\n this.__cache__ = null;\n} ////////////////////////////////////////////////////////////////////////////////\n// Helper methods, should not be used directly\n// Find rule index by name\n//\n\n\nRuler.prototype.__find__ = function (name) {\n for (var i = 0; i < this.__rules__.length; i++) {\n if (this.__rules__[i].name === name) {\n return i;\n }\n }\n\n return -1;\n}; // Build rules lookup cache\n//\n\n\nRuler.prototype.__compile__ = function () {\n var self = this;\n var chains = ['']; // collect unique names\n\n self.__rules__.forEach(function (rule) {\n if (!rule.enabled) {\n return;\n }\n\n rule.alt.forEach(function (altName) {\n if (chains.indexOf(altName) < 0) {\n chains.push(altName);\n }\n });\n });\n\n self.__cache__ = {};\n chains.forEach(function (chain) {\n self.__cache__[chain] = [];\n\n self.__rules__.forEach(function (rule) {\n if (!rule.enabled) {\n return;\n }\n\n if (chain && rule.alt.indexOf(chain) < 0) {\n return;\n }\n\n self.__cache__[chain].push(rule.fn);\n });\n });\n};\n/**\n * Ruler.at(name, fn [, options])\n * - name (String): rule name to replace.\n * - fn (Function): new rule function.\n * - options (Object): new rule options (not mandatory).\n *\n * Replace rule by name with new function & options. Throws error if name not\n * found.\n *\n * ##### Options:\n *\n * - __alt__ - array with names of \"alternate\" chains.\n *\n * ##### Example\n *\n * Replace existing typographer replacement rule with new one:\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * md.core.ruler.at('replacements', function replace(state) {\n * //...\n * });\n * ```\n **/\n\n\nRuler.prototype.at = function (name, fn, options) {\n var index = this.__find__(name);\n\n var opt = options || {};\n\n if (index === -1) {\n throw new Error('Parser rule not found: ' + name);\n }\n\n this.__rules__[index].fn = fn;\n this.__rules__[index].alt = opt.alt || [];\n this.__cache__ = null;\n};\n/**\n * Ruler.before(beforeName, ruleName, fn [, options])\n * - beforeName (String): new rule will be added before this one.\n * - ruleName (String): name of added rule.\n * - fn (Function): rule function.\n * - options (Object): rule options (not mandatory).\n *\n * Add new rule to chain before one with given name. See also\n * [[Ruler.after]], [[Ruler.push]].\n *\n * ##### Options:\n *\n * - __alt__ - array with names of \"alternate\" chains.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * md.block.ruler.before('paragraph', 'my_rule', function replace(state) {\n * //...\n * });\n * ```\n **/\n\n\nRuler.prototype.before = function (beforeName, ruleName, fn, options) {\n var index = this.__find__(beforeName);\n\n var opt = options || {};\n\n if (index === -1) {\n throw new Error('Parser rule not found: ' + beforeName);\n }\n\n this.__rules__.splice(index, 0, {\n name: ruleName,\n enabled: true,\n fn: fn,\n alt: opt.alt || []\n });\n\n this.__cache__ = null;\n};\n/**\n * Ruler.after(afterName, ruleName, fn [, options])\n * - afterName (String): new rule will be added after this one.\n * - ruleName (String): name of added rule.\n * - fn (Function): rule function.\n * - options (Object): rule options (not mandatory).\n *\n * Add new rule to chain after one with given name. See also\n * [[Ruler.before]], [[Ruler.push]].\n *\n * ##### Options:\n *\n * - __alt__ - array with names of \"alternate\" chains.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * md.inline.ruler.after('text', 'my_rule', function replace(state) {\n * //...\n * });\n * ```\n **/\n\n\nRuler.prototype.after = function (afterName, ruleName, fn, options) {\n var index = this.__find__(afterName);\n\n var opt = options || {};\n\n if (index === -1) {\n throw new Error('Parser rule not found: ' + afterName);\n }\n\n this.__rules__.splice(index + 1, 0, {\n name: ruleName,\n enabled: true,\n fn: fn,\n alt: opt.alt || []\n });\n\n this.__cache__ = null;\n};\n/**\n * Ruler.push(ruleName, fn [, options])\n * - ruleName (String): name of added rule.\n * - fn (Function): rule function.\n * - options (Object): rule options (not mandatory).\n *\n * Push new rule to the end of chain. See also\n * [[Ruler.before]], [[Ruler.after]].\n *\n * ##### Options:\n *\n * - __alt__ - array with names of \"alternate\" chains.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * md.core.ruler.push('my_rule', function replace(state) {\n * //...\n * });\n * ```\n **/\n\n\nRuler.prototype.push = function (ruleName, fn, options) {\n var opt = options || {};\n\n this.__rules__.push({\n name: ruleName,\n enabled: true,\n fn: fn,\n alt: opt.alt || []\n });\n\n this.__cache__ = null;\n};\n/**\n * Ruler.enable(list [, ignoreInvalid]) -> Array\n * - list (String|Array): list of rule names to enable.\n * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.\n *\n * Enable rules with given names. If any rule name not found - throw Error.\n * Errors can be disabled by second param.\n *\n * Returns list of found rule names (if no exception happened).\n *\n * See also [[Ruler.disable]], [[Ruler.enableOnly]].\n **/\n\n\nRuler.prototype.enable = function (list, ignoreInvalid) {\n if (!Array.isArray(list)) {\n list = [list];\n }\n\n var result = []; // Search by name and enable\n\n list.forEach(function (name) {\n var idx = this.__find__(name);\n\n if (idx < 0) {\n if (ignoreInvalid) {\n return;\n }\n\n throw new Error('Rules manager: invalid rule name ' + name);\n }\n\n this.__rules__[idx].enabled = true;\n result.push(name);\n }, this);\n this.__cache__ = null;\n return result;\n};\n/**\n * Ruler.enableOnly(list [, ignoreInvalid])\n * - list (String|Array): list of rule names to enable (whitelist).\n * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.\n *\n * Enable rules with given names, and disable everything else. If any rule name\n * not found - throw Error. Errors can be disabled by second param.\n *\n * See also [[Ruler.disable]], [[Ruler.enable]].\n **/\n\n\nRuler.prototype.enableOnly = function (list, ignoreInvalid) {\n if (!Array.isArray(list)) {\n list = [list];\n }\n\n this.__rules__.forEach(function (rule) {\n rule.enabled = false;\n });\n\n this.enable(list, ignoreInvalid);\n};\n/**\n * Ruler.disable(list [, ignoreInvalid]) -> Array\n * - list (String|Array): list of rule names to disable.\n * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.\n *\n * Disable rules with given names. If any rule name not found - throw Error.\n * Errors can be disabled by second param.\n *\n * Returns list of found rule names (if no exception happened).\n *\n * See also [[Ruler.enable]], [[Ruler.enableOnly]].\n **/\n\n\nRuler.prototype.disable = function (list, ignoreInvalid) {\n if (!Array.isArray(list)) {\n list = [list];\n }\n\n var result = []; // Search by name and disable\n\n list.forEach(function (name) {\n var idx = this.__find__(name);\n\n if (idx < 0) {\n if (ignoreInvalid) {\n return;\n }\n\n throw new Error('Rules manager: invalid rule name ' + name);\n }\n\n this.__rules__[idx].enabled = false;\n result.push(name);\n }, this);\n this.__cache__ = null;\n return result;\n};\n/**\n * Ruler.getRules(chainName) -> Array\n *\n * Return array of active functions (rules) for given chain name. It analyzes\n * rules configuration, compiles caches if not exists and returns result.\n *\n * Default chain name is `''` (empty string). It can't be skipped. That's\n * done intentionally, to keep signature monomorphic for high speed.\n **/\n\n\nRuler.prototype.getRules = function (chainName) {\n if (this.__cache__ === null) {\n this.__compile__();\n } // Chain can be empty, if rules disabled. But we still have to return Array.\n\n\n return this.__cache__[chainName] || [];\n};\n\nmodule.exports = Ruler;\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/ruler.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/rules_block/blockquote.js": -/*!****************************************************************!*\ - !*** ./node_modules/markdown-it/lib/rules_block/blockquote.js ***! - \****************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Block quotes\n\n\nvar isSpace = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isSpace;\n\nmodule.exports = function blockquote(state, startLine, endLine, silent) {\n var adjustTab,\n ch,\n i,\n initial,\n l,\n lastLineEmpty,\n lines,\n nextLine,\n offset,\n oldBMarks,\n oldBSCount,\n oldIndent,\n oldParentType,\n oldSCount,\n oldTShift,\n spaceAfterMarker,\n terminate,\n terminatorRules,\n token,\n wasOutdented,\n oldLineMax = state.lineMax,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine]; // if it's indented more than 3 spaces, it should be a code block\n\n if (state.sCount[startLine] - state.blkIndent >= 4) {\n return false;\n } // check the block quote marker\n\n\n if (state.src.charCodeAt(pos++) !== 0x3E\n /* > */\n ) {\n return false;\n } // we know that it's going to be a valid blockquote,\n // so no point trying to find the end of it in silent mode\n\n\n if (silent) {\n return true;\n } // skip spaces after \">\" and re-calculate offset\n\n\n initial = offset = state.sCount[startLine] + pos - (state.bMarks[startLine] + state.tShift[startLine]); // skip one optional space after '>'\n\n if (state.src.charCodeAt(pos) === 0x20\n /* space */\n ) {\n // ' > test '\n // ^ -- position start of line here:\n pos++;\n initial++;\n offset++;\n adjustTab = false;\n spaceAfterMarker = true;\n } else if (state.src.charCodeAt(pos) === 0x09\n /* tab */\n ) {\n spaceAfterMarker = true;\n\n if ((state.bsCount[startLine] + offset) % 4 === 3) {\n // ' >\\t test '\n // ^ -- position start of line here (tab has width===1)\n pos++;\n initial++;\n offset++;\n adjustTab = false;\n } else {\n // ' >\\t test '\n // ^ -- position start of line here + shift bsCount slightly\n // to make extra space appear\n adjustTab = true;\n }\n } else {\n spaceAfterMarker = false;\n }\n\n oldBMarks = [state.bMarks[startLine]];\n state.bMarks[startLine] = pos;\n\n while (pos < max) {\n ch = state.src.charCodeAt(pos);\n\n if (isSpace(ch)) {\n if (ch === 0x09) {\n offset += 4 - (offset + state.bsCount[startLine] + (adjustTab ? 1 : 0)) % 4;\n } else {\n offset++;\n }\n } else {\n break;\n }\n\n pos++;\n }\n\n oldBSCount = [state.bsCount[startLine]];\n state.bsCount[startLine] = state.sCount[startLine] + 1 + (spaceAfterMarker ? 1 : 0);\n lastLineEmpty = pos >= max;\n oldSCount = [state.sCount[startLine]];\n state.sCount[startLine] = offset - initial;\n oldTShift = [state.tShift[startLine]];\n state.tShift[startLine] = pos - state.bMarks[startLine];\n terminatorRules = state.md.block.ruler.getRules('blockquote');\n oldParentType = state.parentType;\n state.parentType = 'blockquote';\n wasOutdented = false; // Search the end of the block\n //\n // Block ends with either:\n // 1. an empty line outside:\n // ```\n // > test\n //\n // ```\n // 2. an empty line inside:\n // ```\n // >\n // test\n // ```\n // 3. another tag:\n // ```\n // > test\n // - - -\n // ```\n\n for (nextLine = startLine + 1; nextLine < endLine; nextLine++) {\n // check if it's outdented, i.e. it's inside list item and indented\n // less than said list item:\n //\n // ```\n // 1. anything\n // > current blockquote\n // 2. checking this line\n // ```\n if (state.sCount[nextLine] < state.blkIndent) wasOutdented = true;\n pos = state.bMarks[nextLine] + state.tShift[nextLine];\n max = state.eMarks[nextLine];\n\n if (pos >= max) {\n // Case 1: line is not inside the blockquote, and this line is empty.\n break;\n }\n\n if (state.src.charCodeAt(pos++) === 0x3E\n /* > */\n && !wasOutdented) {\n // This line is inside the blockquote.\n // skip spaces after \">\" and re-calculate offset\n initial = offset = state.sCount[nextLine] + pos - (state.bMarks[nextLine] + state.tShift[nextLine]); // skip one optional space after '>'\n\n if (state.src.charCodeAt(pos) === 0x20\n /* space */\n ) {\n // ' > test '\n // ^ -- position start of line here:\n pos++;\n initial++;\n offset++;\n adjustTab = false;\n spaceAfterMarker = true;\n } else if (state.src.charCodeAt(pos) === 0x09\n /* tab */\n ) {\n spaceAfterMarker = true;\n\n if ((state.bsCount[nextLine] + offset) % 4 === 3) {\n // ' >\\t test '\n // ^ -- position start of line here (tab has width===1)\n pos++;\n initial++;\n offset++;\n adjustTab = false;\n } else {\n // ' >\\t test '\n // ^ -- position start of line here + shift bsCount slightly\n // to make extra space appear\n adjustTab = true;\n }\n } else {\n spaceAfterMarker = false;\n }\n\n oldBMarks.push(state.bMarks[nextLine]);\n state.bMarks[nextLine] = pos;\n\n while (pos < max) {\n ch = state.src.charCodeAt(pos);\n\n if (isSpace(ch)) {\n if (ch === 0x09) {\n offset += 4 - (offset + state.bsCount[nextLine] + (adjustTab ? 1 : 0)) % 4;\n } else {\n offset++;\n }\n } else {\n break;\n }\n\n pos++;\n }\n\n lastLineEmpty = pos >= max;\n oldBSCount.push(state.bsCount[nextLine]);\n state.bsCount[nextLine] = state.sCount[nextLine] + 1 + (spaceAfterMarker ? 1 : 0);\n oldSCount.push(state.sCount[nextLine]);\n state.sCount[nextLine] = offset - initial;\n oldTShift.push(state.tShift[nextLine]);\n state.tShift[nextLine] = pos - state.bMarks[nextLine];\n continue;\n } // Case 2: line is not inside the blockquote, and the last line was empty.\n\n\n if (lastLineEmpty) {\n break;\n } // Case 3: another tag found.\n\n\n terminate = false;\n\n for (i = 0, l = terminatorRules.length; i < l; i++) {\n if (terminatorRules[i](state, nextLine, endLine, true)) {\n terminate = true;\n break;\n }\n }\n\n if (terminate) {\n // Quirk to enforce \"hard termination mode\" for paragraphs;\n // normally if you call `tokenize(state, startLine, nextLine)`,\n // paragraphs will look below nextLine for paragraph continuation,\n // but if blockquote is terminated by another tag, they shouldn't\n state.lineMax = nextLine;\n\n if (state.blkIndent !== 0) {\n // state.blkIndent was non-zero, we now set it to zero,\n // so we need to re-calculate all offsets to appear as\n // if indent wasn't changed\n oldBMarks.push(state.bMarks[nextLine]);\n oldBSCount.push(state.bsCount[nextLine]);\n oldTShift.push(state.tShift[nextLine]);\n oldSCount.push(state.sCount[nextLine]);\n state.sCount[nextLine] -= state.blkIndent;\n }\n\n break;\n }\n\n oldBMarks.push(state.bMarks[nextLine]);\n oldBSCount.push(state.bsCount[nextLine]);\n oldTShift.push(state.tShift[nextLine]);\n oldSCount.push(state.sCount[nextLine]); // A negative indentation means that this is a paragraph continuation\n //\n\n state.sCount[nextLine] = -1;\n }\n\n oldIndent = state.blkIndent;\n state.blkIndent = 0;\n token = state.push('blockquote_open', 'blockquote', 1);\n token.markup = '>';\n token.map = lines = [startLine, 0];\n state.md.block.tokenize(state, startLine, nextLine);\n token = state.push('blockquote_close', 'blockquote', -1);\n token.markup = '>';\n state.lineMax = oldLineMax;\n state.parentType = oldParentType;\n lines[1] = state.line; // Restore original tShift; this might not be necessary since the parser\n // has already been here, but just to make sure we can do that.\n\n for (i = 0; i < oldTShift.length; i++) {\n state.bMarks[i + startLine] = oldBMarks[i];\n state.tShift[i + startLine] = oldTShift[i];\n state.sCount[i + startLine] = oldSCount[i];\n state.bsCount[i + startLine] = oldBSCount[i];\n }\n\n state.blkIndent = oldIndent;\n return true;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_block/blockquote.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/rules_block/code.js": -/*!**********************************************************!*\ - !*** ./node_modules/markdown-it/lib/rules_block/code.js ***! - \**********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Code block (4 spaces padded)\n\n\nmodule.exports = function code(state, startLine, endLine\n/*, silent*/\n) {\n var nextLine, last, token;\n\n if (state.sCount[startLine] - state.blkIndent < 4) {\n return false;\n }\n\n last = nextLine = startLine + 1;\n\n while (nextLine < endLine) {\n if (state.isEmpty(nextLine)) {\n nextLine++;\n continue;\n }\n\n if (state.sCount[nextLine] - state.blkIndent >= 4) {\n nextLine++;\n last = nextLine;\n continue;\n }\n\n break;\n }\n\n state.line = last;\n token = state.push('code_block', 'code', 0);\n token.content = state.getLines(startLine, last, 4 + state.blkIndent, true);\n token.map = [startLine, state.line];\n return true;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_block/code.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/rules_block/fence.js": -/*!***********************************************************!*\ - !*** ./node_modules/markdown-it/lib/rules_block/fence.js ***! - \***********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// fences (``` lang, ~~~ lang)\n\n\nmodule.exports = function fence(state, startLine, endLine, silent) {\n var marker,\n len,\n params,\n nextLine,\n mem,\n token,\n markup,\n haveEndMarker = false,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine]; // if it's indented more than 3 spaces, it should be a code block\n\n if (state.sCount[startLine] - state.blkIndent >= 4) {\n return false;\n }\n\n if (pos + 3 > max) {\n return false;\n }\n\n marker = state.src.charCodeAt(pos);\n\n if (marker !== 0x7E\n /* ~ */\n && marker !== 0x60\n /* ` */\n ) {\n return false;\n } // scan marker length\n\n\n mem = pos;\n pos = state.skipChars(pos, marker);\n len = pos - mem;\n\n if (len < 3) {\n return false;\n }\n\n markup = state.src.slice(mem, pos);\n params = state.src.slice(pos, max);\n\n if (marker === 0x60\n /* ` */\n ) {\n if (params.indexOf(String.fromCharCode(marker)) >= 0) {\n return false;\n }\n } // Since start is found, we can report success here in validation mode\n\n\n if (silent) {\n return true;\n } // search end of block\n\n\n nextLine = startLine;\n\n for (;;) {\n nextLine++;\n\n if (nextLine >= endLine) {\n // unclosed block should be autoclosed by end of document.\n // also block seems to be autoclosed by end of parent\n break;\n }\n\n pos = mem = state.bMarks[nextLine] + state.tShift[nextLine];\n max = state.eMarks[nextLine];\n\n if (pos < max && state.sCount[nextLine] < state.blkIndent) {\n // non-empty line with negative indent should stop the list:\n // - ```\n // test\n break;\n }\n\n if (state.src.charCodeAt(pos) !== marker) {\n continue;\n }\n\n if (state.sCount[nextLine] - state.blkIndent >= 4) {\n // closing fence should be indented less than 4 spaces\n continue;\n }\n\n pos = state.skipChars(pos, marker); // closing code fence must be at least as long as the opening one\n\n if (pos - mem < len) {\n continue;\n } // make sure tail has spaces only\n\n\n pos = state.skipSpaces(pos);\n\n if (pos < max) {\n continue;\n }\n\n haveEndMarker = true; // found!\n\n break;\n } // If a fence has heading spaces, they should be removed from its inner block\n\n\n len = state.sCount[startLine];\n state.line = nextLine + (haveEndMarker ? 1 : 0);\n token = state.push('fence', 'code', 0);\n token.info = params;\n token.content = state.getLines(startLine + 1, nextLine, len, true);\n token.markup = markup;\n token.map = [startLine, state.line];\n return true;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_block/fence.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/rules_block/heading.js": -/*!*************************************************************!*\ - !*** ./node_modules/markdown-it/lib/rules_block/heading.js ***! - \*************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// heading (#, ##, ...)\n\n\nvar isSpace = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isSpace;\n\nmodule.exports = function heading(state, startLine, endLine, silent) {\n var ch,\n level,\n tmp,\n token,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine]; // if it's indented more than 3 spaces, it should be a code block\n\n if (state.sCount[startLine] - state.blkIndent >= 4) {\n return false;\n }\n\n ch = state.src.charCodeAt(pos);\n\n if (ch !== 0x23\n /* # */\n || pos >= max) {\n return false;\n } // count heading level\n\n\n level = 1;\n ch = state.src.charCodeAt(++pos);\n\n while (ch === 0x23\n /* # */\n && pos < max && level <= 6) {\n level++;\n ch = state.src.charCodeAt(++pos);\n }\n\n if (level > 6 || pos < max && !isSpace(ch)) {\n return false;\n }\n\n if (silent) {\n return true;\n } // Let's cut tails like ' ### ' from the end of string\n\n\n max = state.skipSpacesBack(max, pos);\n tmp = state.skipCharsBack(max, 0x23, pos); // #\n\n if (tmp > pos && isSpace(state.src.charCodeAt(tmp - 1))) {\n max = tmp;\n }\n\n state.line = startLine + 1;\n token = state.push('heading_open', 'h' + String(level), 1);\n token.markup = '########'.slice(0, level);\n token.map = [startLine, state.line];\n token = state.push('inline', '', 0);\n token.content = state.src.slice(pos, max).trim();\n token.map = [startLine, state.line];\n token.children = [];\n token = state.push('heading_close', 'h' + String(level), -1);\n token.markup = '########'.slice(0, level);\n return true;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_block/heading.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/rules_block/hr.js": -/*!********************************************************!*\ - !*** ./node_modules/markdown-it/lib/rules_block/hr.js ***! - \********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Horizontal rule\n\n\nvar isSpace = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isSpace;\n\nmodule.exports = function hr(state, startLine, endLine, silent) {\n var marker,\n cnt,\n ch,\n token,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine]; // if it's indented more than 3 spaces, it should be a code block\n\n if (state.sCount[startLine] - state.blkIndent >= 4) {\n return false;\n }\n\n marker = state.src.charCodeAt(pos++); // Check hr marker\n\n if (marker !== 0x2A\n /* * */\n && marker !== 0x2D\n /* - */\n && marker !== 0x5F\n /* _ */\n ) {\n return false;\n } // markers can be mixed with spaces, but there should be at least 3 of them\n\n\n cnt = 1;\n\n while (pos < max) {\n ch = state.src.charCodeAt(pos++);\n\n if (ch !== marker && !isSpace(ch)) {\n return false;\n }\n\n if (ch === marker) {\n cnt++;\n }\n }\n\n if (cnt < 3) {\n return false;\n }\n\n if (silent) {\n return true;\n }\n\n state.line = startLine + 1;\n token = state.push('hr', 'hr', 0);\n token.map = [startLine, state.line];\n token.markup = Array(cnt + 1).join(String.fromCharCode(marker));\n return true;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_block/hr.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/rules_block/html_block.js": -/*!****************************************************************!*\ - !*** ./node_modules/markdown-it/lib/rules_block/html_block.js ***! - \****************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// HTML block\n\n\nvar block_names = __webpack_require__(/*! ../common/html_blocks */ \"./node_modules/markdown-it/lib/common/html_blocks.js\");\n\nvar HTML_OPEN_CLOSE_TAG_RE = __webpack_require__(/*! ../common/html_re */ \"./node_modules/markdown-it/lib/common/html_re.js\").HTML_OPEN_CLOSE_TAG_RE; // An array of opening and corresponding closing sequences for html tags,\n// last argument defines whether it can terminate a paragraph or not\n//\n\n\nvar HTML_SEQUENCES = [[/^<(script|pre|style)(?=(\\s|>|$))/i, /<\\/(script|pre|style)>/i, true], [/^/, true], [/^<\\?/, /\\?>/, true], [/^/, true], [/^/, true], [new RegExp('^|$))', 'i'), /^$/, true], [new RegExp(HTML_OPEN_CLOSE_TAG_RE.source + '\\\\s*$'), /^$/, false]];\n\nmodule.exports = function html_block(state, startLine, endLine, silent) {\n var i,\n nextLine,\n token,\n lineText,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine]; // if it's indented more than 3 spaces, it should be a code block\n\n if (state.sCount[startLine] - state.blkIndent >= 4) {\n return false;\n }\n\n if (!state.md.options.html) {\n return false;\n }\n\n if (state.src.charCodeAt(pos) !== 0x3C\n /* < */\n ) {\n return false;\n }\n\n lineText = state.src.slice(pos, max);\n\n for (i = 0; i < HTML_SEQUENCES.length; i++) {\n if (HTML_SEQUENCES[i][0].test(lineText)) {\n break;\n }\n }\n\n if (i === HTML_SEQUENCES.length) {\n return false;\n }\n\n if (silent) {\n // true if this sequence can be a terminator, false otherwise\n return HTML_SEQUENCES[i][2];\n }\n\n nextLine = startLine + 1; // If we are here - we detected HTML block.\n // Let's roll down till block end.\n\n if (!HTML_SEQUENCES[i][1].test(lineText)) {\n for (; nextLine < endLine; nextLine++) {\n if (state.sCount[nextLine] < state.blkIndent) {\n break;\n }\n\n pos = state.bMarks[nextLine] + state.tShift[nextLine];\n max = state.eMarks[nextLine];\n lineText = state.src.slice(pos, max);\n\n if (HTML_SEQUENCES[i][1].test(lineText)) {\n if (lineText.length !== 0) {\n nextLine++;\n }\n\n break;\n }\n }\n }\n\n state.line = nextLine;\n token = state.push('html_block', '', 0);\n token.map = [startLine, nextLine];\n token.content = state.getLines(startLine, nextLine, state.blkIndent, true);\n return true;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_block/html_block.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/rules_block/lheading.js": -/*!**************************************************************!*\ - !*** ./node_modules/markdown-it/lib/rules_block/lheading.js ***! - \**************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// lheading (---, ===)\n\n\nmodule.exports = function lheading(state, startLine, endLine\n/*, silent*/\n) {\n var content,\n terminate,\n i,\n l,\n token,\n pos,\n max,\n level,\n marker,\n nextLine = startLine + 1,\n oldParentType,\n terminatorRules = state.md.block.ruler.getRules('paragraph'); // if it's indented more than 3 spaces, it should be a code block\n\n if (state.sCount[startLine] - state.blkIndent >= 4) {\n return false;\n }\n\n oldParentType = state.parentType;\n state.parentType = 'paragraph'; // use paragraph to match terminatorRules\n // jump line-by-line until empty one or EOF\n\n for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {\n // this would be a code block normally, but after paragraph\n // it's considered a lazy continuation regardless of what's there\n if (state.sCount[nextLine] - state.blkIndent > 3) {\n continue;\n } //\n // Check for underline in setext header\n //\n\n\n if (state.sCount[nextLine] >= state.blkIndent) {\n pos = state.bMarks[nextLine] + state.tShift[nextLine];\n max = state.eMarks[nextLine];\n\n if (pos < max) {\n marker = state.src.charCodeAt(pos);\n\n if (marker === 0x2D\n /* - */\n || marker === 0x3D\n /* = */\n ) {\n pos = state.skipChars(pos, marker);\n pos = state.skipSpaces(pos);\n\n if (pos >= max) {\n level = marker === 0x3D\n /* = */\n ? 1 : 2;\n break;\n }\n }\n }\n } // quirk for blockquotes, this line should already be checked by that rule\n\n\n if (state.sCount[nextLine] < 0) {\n continue;\n } // Some tags can terminate paragraph without empty line.\n\n\n terminate = false;\n\n for (i = 0, l = terminatorRules.length; i < l; i++) {\n if (terminatorRules[i](state, nextLine, endLine, true)) {\n terminate = true;\n break;\n }\n }\n\n if (terminate) {\n break;\n }\n }\n\n if (!level) {\n // Didn't find valid underline\n return false;\n }\n\n content = state.getLines(startLine, nextLine, state.blkIndent, false).trim();\n state.line = nextLine + 1;\n token = state.push('heading_open', 'h' + String(level), 1);\n token.markup = String.fromCharCode(marker);\n token.map = [startLine, state.line];\n token = state.push('inline', '', 0);\n token.content = content;\n token.map = [startLine, state.line - 1];\n token.children = [];\n token = state.push('heading_close', 'h' + String(level), -1);\n token.markup = String.fromCharCode(marker);\n state.parentType = oldParentType;\n return true;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_block/lheading.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/rules_block/list.js": -/*!**********************************************************!*\ - !*** ./node_modules/markdown-it/lib/rules_block/list.js ***! - \**********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Lists\n\n\nvar isSpace = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isSpace; // Search `[-+*][\\n ]`, returns next pos after marker on success\n// or -1 on fail.\n\n\nfunction skipBulletListMarker(state, startLine) {\n var marker, pos, max, ch;\n pos = state.bMarks[startLine] + state.tShift[startLine];\n max = state.eMarks[startLine];\n marker = state.src.charCodeAt(pos++); // Check bullet\n\n if (marker !== 0x2A\n /* * */\n && marker !== 0x2D\n /* - */\n && marker !== 0x2B\n /* + */\n ) {\n return -1;\n }\n\n if (pos < max) {\n ch = state.src.charCodeAt(pos);\n\n if (!isSpace(ch)) {\n // \" -test \" - is not a list item\n return -1;\n }\n }\n\n return pos;\n} // Search `\\d+[.)][\\n ]`, returns next pos after marker on success\n// or -1 on fail.\n\n\nfunction skipOrderedListMarker(state, startLine) {\n var ch,\n start = state.bMarks[startLine] + state.tShift[startLine],\n pos = start,\n max = state.eMarks[startLine]; // List marker should have at least 2 chars (digit + dot)\n\n if (pos + 1 >= max) {\n return -1;\n }\n\n ch = state.src.charCodeAt(pos++);\n\n if (ch < 0x30\n /* 0 */\n || ch > 0x39\n /* 9 */\n ) {\n return -1;\n }\n\n for (;;) {\n // EOL -> fail\n if (pos >= max) {\n return -1;\n }\n\n ch = state.src.charCodeAt(pos++);\n\n if (ch >= 0x30\n /* 0 */\n && ch <= 0x39\n /* 9 */\n ) {\n // List marker should have no more than 9 digits\n // (prevents integer overflow in browsers)\n if (pos - start >= 10) {\n return -1;\n }\n\n continue;\n } // found valid marker\n\n\n if (ch === 0x29\n /* ) */\n || ch === 0x2e\n /* . */\n ) {\n break;\n }\n\n return -1;\n }\n\n if (pos < max) {\n ch = state.src.charCodeAt(pos);\n\n if (!isSpace(ch)) {\n // \" 1.test \" - is not a list item\n return -1;\n }\n }\n\n return pos;\n}\n\nfunction markTightParagraphs(state, idx) {\n var i,\n l,\n level = state.level + 2;\n\n for (i = idx + 2, l = state.tokens.length - 2; i < l; i++) {\n if (state.tokens[i].level === level && state.tokens[i].type === 'paragraph_open') {\n state.tokens[i + 2].hidden = true;\n state.tokens[i].hidden = true;\n i += 2;\n }\n }\n}\n\nmodule.exports = function list(state, startLine, endLine, silent) {\n var ch,\n contentStart,\n i,\n indent,\n indentAfterMarker,\n initial,\n isOrdered,\n itemLines,\n l,\n listLines,\n listTokIdx,\n markerCharCode,\n markerValue,\n max,\n nextLine,\n offset,\n oldListIndent,\n oldParentType,\n oldSCount,\n oldTShift,\n oldTight,\n pos,\n posAfterMarker,\n prevEmptyEnd,\n start,\n terminate,\n terminatorRules,\n token,\n isTerminatingParagraph = false,\n tight = true; // if it's indented more than 3 spaces, it should be a code block\n\n if (state.sCount[startLine] - state.blkIndent >= 4) {\n return false;\n } // Special case:\n // - item 1\n // - item 2\n // - item 3\n // - item 4\n // - this one is a paragraph continuation\n\n\n if (state.listIndent >= 0 && state.sCount[startLine] - state.listIndent >= 4 && state.sCount[startLine] < state.blkIndent) {\n return false;\n } // limit conditions when list can interrupt\n // a paragraph (validation mode only)\n\n\n if (silent && state.parentType === 'paragraph') {\n // Next list item should still terminate previous list item;\n //\n // This code can fail if plugins use blkIndent as well as lists,\n // but I hope the spec gets fixed long before that happens.\n //\n if (state.tShift[startLine] >= state.blkIndent) {\n isTerminatingParagraph = true;\n }\n } // Detect list type and position after marker\n\n\n if ((posAfterMarker = skipOrderedListMarker(state, startLine)) >= 0) {\n isOrdered = true;\n start = state.bMarks[startLine] + state.tShift[startLine];\n markerValue = Number(state.src.substr(start, posAfterMarker - start - 1)); // If we're starting a new ordered list right after\n // a paragraph, it should start with 1.\n\n if (isTerminatingParagraph && markerValue !== 1) return false;\n } else if ((posAfterMarker = skipBulletListMarker(state, startLine)) >= 0) {\n isOrdered = false;\n } else {\n return false;\n } // If we're starting a new unordered list right after\n // a paragraph, first line should not be empty.\n\n\n if (isTerminatingParagraph) {\n if (state.skipSpaces(posAfterMarker) >= state.eMarks[startLine]) return false;\n } // We should terminate list on style change. Remember first one to compare.\n\n\n markerCharCode = state.src.charCodeAt(posAfterMarker - 1); // For validation mode we can terminate immediately\n\n if (silent) {\n return true;\n } // Start list\n\n\n listTokIdx = state.tokens.length;\n\n if (isOrdered) {\n token = state.push('ordered_list_open', 'ol', 1);\n\n if (markerValue !== 1) {\n token.attrs = [['start', markerValue]];\n }\n } else {\n token = state.push('bullet_list_open', 'ul', 1);\n }\n\n token.map = listLines = [startLine, 0];\n token.markup = String.fromCharCode(markerCharCode); //\n // Iterate list items\n //\n\n nextLine = startLine;\n prevEmptyEnd = false;\n terminatorRules = state.md.block.ruler.getRules('list');\n oldParentType = state.parentType;\n state.parentType = 'list';\n\n while (nextLine < endLine) {\n pos = posAfterMarker;\n max = state.eMarks[nextLine];\n initial = offset = state.sCount[nextLine] + posAfterMarker - (state.bMarks[startLine] + state.tShift[startLine]);\n\n while (pos < max) {\n ch = state.src.charCodeAt(pos);\n\n if (ch === 0x09) {\n offset += 4 - (offset + state.bsCount[nextLine]) % 4;\n } else if (ch === 0x20) {\n offset++;\n } else {\n break;\n }\n\n pos++;\n }\n\n contentStart = pos;\n\n if (contentStart >= max) {\n // trimming space in \"- \\n 3\" case, indent is 1 here\n indentAfterMarker = 1;\n } else {\n indentAfterMarker = offset - initial;\n } // If we have more than 4 spaces, the indent is 1\n // (the rest is just indented code block)\n\n\n if (indentAfterMarker > 4) {\n indentAfterMarker = 1;\n } // \" - test\"\n // ^^^^^ - calculating total length of this thing\n\n\n indent = initial + indentAfterMarker; // Run subparser & write tokens\n\n token = state.push('list_item_open', 'li', 1);\n token.markup = String.fromCharCode(markerCharCode);\n token.map = itemLines = [startLine, 0]; // change current state, then restore it after parser subcall\n\n oldTight = state.tight;\n oldTShift = state.tShift[startLine];\n oldSCount = state.sCount[startLine]; // - example list\n // ^ listIndent position will be here\n // ^ blkIndent position will be here\n //\n\n oldListIndent = state.listIndent;\n state.listIndent = state.blkIndent;\n state.blkIndent = indent;\n state.tight = true;\n state.tShift[startLine] = contentStart - state.bMarks[startLine];\n state.sCount[startLine] = offset;\n\n if (contentStart >= max && state.isEmpty(startLine + 1)) {\n // workaround for this case\n // (list item is empty, list terminates before \"foo\"):\n // ~~~~~~~~\n // -\n //\n // foo\n // ~~~~~~~~\n state.line = Math.min(state.line + 2, endLine);\n } else {\n state.md.block.tokenize(state, startLine, endLine, true);\n } // If any of list item is tight, mark list as tight\n\n\n if (!state.tight || prevEmptyEnd) {\n tight = false;\n } // Item become loose if finish with empty line,\n // but we should filter last element, because it means list finish\n\n\n prevEmptyEnd = state.line - startLine > 1 && state.isEmpty(state.line - 1);\n state.blkIndent = state.listIndent;\n state.listIndent = oldListIndent;\n state.tShift[startLine] = oldTShift;\n state.sCount[startLine] = oldSCount;\n state.tight = oldTight;\n token = state.push('list_item_close', 'li', -1);\n token.markup = String.fromCharCode(markerCharCode);\n nextLine = startLine = state.line;\n itemLines[1] = nextLine;\n contentStart = state.bMarks[startLine];\n\n if (nextLine >= endLine) {\n break;\n } //\n // Try to check if list is terminated or continued.\n //\n\n\n if (state.sCount[nextLine] < state.blkIndent) {\n break;\n } // if it's indented more than 3 spaces, it should be a code block\n\n\n if (state.sCount[startLine] - state.blkIndent >= 4) {\n break;\n } // fail if terminating block found\n\n\n terminate = false;\n\n for (i = 0, l = terminatorRules.length; i < l; i++) {\n if (terminatorRules[i](state, nextLine, endLine, true)) {\n terminate = true;\n break;\n }\n }\n\n if (terminate) {\n break;\n } // fail if list has another type\n\n\n if (isOrdered) {\n posAfterMarker = skipOrderedListMarker(state, nextLine);\n\n if (posAfterMarker < 0) {\n break;\n }\n } else {\n posAfterMarker = skipBulletListMarker(state, nextLine);\n\n if (posAfterMarker < 0) {\n break;\n }\n }\n\n if (markerCharCode !== state.src.charCodeAt(posAfterMarker - 1)) {\n break;\n }\n } // Finalize list\n\n\n if (isOrdered) {\n token = state.push('ordered_list_close', 'ol', -1);\n } else {\n token = state.push('bullet_list_close', 'ul', -1);\n }\n\n token.markup = String.fromCharCode(markerCharCode);\n listLines[1] = nextLine;\n state.line = nextLine;\n state.parentType = oldParentType; // mark paragraphs tight if needed\n\n if (tight) {\n markTightParagraphs(state, listTokIdx);\n }\n\n return true;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_block/list.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/rules_block/paragraph.js": -/*!***************************************************************!*\ - !*** ./node_modules/markdown-it/lib/rules_block/paragraph.js ***! - \***************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Paragraph\n\n\nmodule.exports = function paragraph(state, startLine\n/*, endLine*/\n) {\n var content,\n terminate,\n i,\n l,\n token,\n oldParentType,\n nextLine = startLine + 1,\n terminatorRules = state.md.block.ruler.getRules('paragraph'),\n endLine = state.lineMax;\n oldParentType = state.parentType;\n state.parentType = 'paragraph'; // jump line-by-line until empty one or EOF\n\n for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {\n // this would be a code block normally, but after paragraph\n // it's considered a lazy continuation regardless of what's there\n if (state.sCount[nextLine] - state.blkIndent > 3) {\n continue;\n } // quirk for blockquotes, this line should already be checked by that rule\n\n\n if (state.sCount[nextLine] < 0) {\n continue;\n } // Some tags can terminate paragraph without empty line.\n\n\n terminate = false;\n\n for (i = 0, l = terminatorRules.length; i < l; i++) {\n if (terminatorRules[i](state, nextLine, endLine, true)) {\n terminate = true;\n break;\n }\n }\n\n if (terminate) {\n break;\n }\n }\n\n content = state.getLines(startLine, nextLine, state.blkIndent, false).trim();\n state.line = nextLine;\n token = state.push('paragraph_open', 'p', 1);\n token.map = [startLine, state.line];\n token = state.push('inline', '', 0);\n token.content = content;\n token.map = [startLine, state.line];\n token.children = [];\n token = state.push('paragraph_close', 'p', -1);\n state.parentType = oldParentType;\n return true;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_block/paragraph.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/rules_block/reference.js": -/*!***************************************************************!*\ - !*** ./node_modules/markdown-it/lib/rules_block/reference.js ***! - \***************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar normalizeReference = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").normalizeReference;\n\nvar isSpace = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isSpace;\n\nmodule.exports = function reference(state, startLine, _endLine, silent) {\n var ch,\n destEndPos,\n destEndLineNo,\n endLine,\n href,\n i,\n l,\n label,\n labelEnd,\n oldParentType,\n res,\n start,\n str,\n terminate,\n terminatorRules,\n title,\n lines = 0,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine],\n nextLine = startLine + 1; // if it's indented more than 3 spaces, it should be a code block\n\n if (state.sCount[startLine] - state.blkIndent >= 4) {\n return false;\n }\n\n if (state.src.charCodeAt(pos) !== 0x5B\n /* [ */\n ) {\n return false;\n } // Simple check to quickly interrupt scan on [link](url) at the start of line.\n // Can be useful on practice: https://github.com/markdown-it/markdown-it/issues/54\n\n\n while (++pos < max) {\n if (state.src.charCodeAt(pos) === 0x5D\n /* ] */\n && state.src.charCodeAt(pos - 1) !== 0x5C\n /* \\ */\n ) {\n if (pos + 1 === max) {\n return false;\n }\n\n if (state.src.charCodeAt(pos + 1) !== 0x3A\n /* : */\n ) {\n return false;\n }\n\n break;\n }\n }\n\n endLine = state.lineMax; // jump line-by-line until empty one or EOF\n\n terminatorRules = state.md.block.ruler.getRules('reference');\n oldParentType = state.parentType;\n state.parentType = 'reference';\n\n for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {\n // this would be a code block normally, but after paragraph\n // it's considered a lazy continuation regardless of what's there\n if (state.sCount[nextLine] - state.blkIndent > 3) {\n continue;\n } // quirk for blockquotes, this line should already be checked by that rule\n\n\n if (state.sCount[nextLine] < 0) {\n continue;\n } // Some tags can terminate paragraph without empty line.\n\n\n terminate = false;\n\n for (i = 0, l = terminatorRules.length; i < l; i++) {\n if (terminatorRules[i](state, nextLine, endLine, true)) {\n terminate = true;\n break;\n }\n }\n\n if (terminate) {\n break;\n }\n }\n\n str = state.getLines(startLine, nextLine, state.blkIndent, false).trim();\n max = str.length;\n\n for (pos = 1; pos < max; pos++) {\n ch = str.charCodeAt(pos);\n\n if (ch === 0x5B\n /* [ */\n ) {\n return false;\n } else if (ch === 0x5D\n /* ] */\n ) {\n labelEnd = pos;\n break;\n } else if (ch === 0x0A\n /* \\n */\n ) {\n lines++;\n } else if (ch === 0x5C\n /* \\ */\n ) {\n pos++;\n\n if (pos < max && str.charCodeAt(pos) === 0x0A) {\n lines++;\n }\n }\n }\n\n if (labelEnd < 0 || str.charCodeAt(labelEnd + 1) !== 0x3A\n /* : */\n ) {\n return false;\n } // [label]: destination 'title'\n // ^^^ skip optional whitespace here\n\n\n for (pos = labelEnd + 2; pos < max; pos++) {\n ch = str.charCodeAt(pos);\n\n if (ch === 0x0A) {\n lines++;\n } else if (isSpace(ch)) {\n /*eslint no-empty:0*/\n } else {\n break;\n }\n } // [label]: destination 'title'\n // ^^^^^^^^^^^ parse this\n\n\n res = state.md.helpers.parseLinkDestination(str, pos, max);\n\n if (!res.ok) {\n return false;\n }\n\n href = state.md.normalizeLink(res.str);\n\n if (!state.md.validateLink(href)) {\n return false;\n }\n\n pos = res.pos;\n lines += res.lines; // save cursor state, we could require to rollback later\n\n destEndPos = pos;\n destEndLineNo = lines; // [label]: destination 'title'\n // ^^^ skipping those spaces\n\n start = pos;\n\n for (; pos < max; pos++) {\n ch = str.charCodeAt(pos);\n\n if (ch === 0x0A) {\n lines++;\n } else if (isSpace(ch)) {\n /*eslint no-empty:0*/\n } else {\n break;\n }\n } // [label]: destination 'title'\n // ^^^^^^^ parse this\n\n\n res = state.md.helpers.parseLinkTitle(str, pos, max);\n\n if (pos < max && start !== pos && res.ok) {\n title = res.str;\n pos = res.pos;\n lines += res.lines;\n } else {\n title = '';\n pos = destEndPos;\n lines = destEndLineNo;\n } // skip trailing spaces until the rest of the line\n\n\n while (pos < max) {\n ch = str.charCodeAt(pos);\n\n if (!isSpace(ch)) {\n break;\n }\n\n pos++;\n }\n\n if (pos < max && str.charCodeAt(pos) !== 0x0A) {\n if (title) {\n // garbage at the end of the line after title,\n // but it could still be a valid reference if we roll back\n title = '';\n pos = destEndPos;\n lines = destEndLineNo;\n\n while (pos < max) {\n ch = str.charCodeAt(pos);\n\n if (!isSpace(ch)) {\n break;\n }\n\n pos++;\n }\n }\n }\n\n if (pos < max && str.charCodeAt(pos) !== 0x0A) {\n // garbage at the end of the line\n return false;\n }\n\n label = normalizeReference(str.slice(1, labelEnd));\n\n if (!label) {\n // CommonMark 0.20 disallows empty labels\n return false;\n } // Reference can not terminate anything. This check is for safety only.\n\n /*istanbul ignore if*/\n\n\n if (silent) {\n return true;\n }\n\n if (typeof state.env.references === 'undefined') {\n state.env.references = {};\n }\n\n if (typeof state.env.references[label] === 'undefined') {\n state.env.references[label] = {\n title: title,\n href: href\n };\n }\n\n state.parentType = oldParentType;\n state.line = startLine + lines + 1;\n return true;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_block/reference.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/rules_block/state_block.js": -/*!*****************************************************************!*\ - !*** ./node_modules/markdown-it/lib/rules_block/state_block.js ***! - \*****************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Parser state class\n\n\nvar Token = __webpack_require__(/*! ../token */ \"./node_modules/markdown-it/lib/token.js\");\n\nvar isSpace = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isSpace;\n\nfunction StateBlock(src, md, env, tokens) {\n var ch, s, start, pos, len, indent, offset, indent_found;\n this.src = src; // link to parser instance\n\n this.md = md;\n this.env = env; //\n // Internal state vartiables\n //\n\n this.tokens = tokens;\n this.bMarks = []; // line begin offsets for fast jumps\n\n this.eMarks = []; // line end offsets for fast jumps\n\n this.tShift = []; // offsets of the first non-space characters (tabs not expanded)\n\n this.sCount = []; // indents for each line (tabs expanded)\n // An amount of virtual spaces (tabs expanded) between beginning\n // of each line (bMarks) and real beginning of that line.\n //\n // It exists only as a hack because blockquotes override bMarks\n // losing information in the process.\n //\n // It's used only when expanding tabs, you can think about it as\n // an initial tab length, e.g. bsCount=21 applied to string `\\t123`\n // means first tab should be expanded to 4-21%4 === 3 spaces.\n //\n\n this.bsCount = []; // block parser variables\n\n this.blkIndent = 0; // required block content indent (for example, if we are\n // inside a list, it would be positioned after list marker)\n\n this.line = 0; // line index in src\n\n this.lineMax = 0; // lines count\n\n this.tight = false; // loose/tight mode for lists\n\n this.ddIndent = -1; // indent of the current dd block (-1 if there isn't any)\n\n this.listIndent = -1; // indent of the current list block (-1 if there isn't any)\n // can be 'blockquote', 'list', 'root', 'paragraph' or 'reference'\n // used in lists to determine if they interrupt a paragraph\n\n this.parentType = 'root';\n this.level = 0; // renderer\n\n this.result = ''; // Create caches\n // Generate markers.\n\n s = this.src;\n indent_found = false;\n\n for (start = pos = indent = offset = 0, len = s.length; pos < len; pos++) {\n ch = s.charCodeAt(pos);\n\n if (!indent_found) {\n if (isSpace(ch)) {\n indent++;\n\n if (ch === 0x09) {\n offset += 4 - offset % 4;\n } else {\n offset++;\n }\n\n continue;\n } else {\n indent_found = true;\n }\n }\n\n if (ch === 0x0A || pos === len - 1) {\n if (ch !== 0x0A) {\n pos++;\n }\n\n this.bMarks.push(start);\n this.eMarks.push(pos);\n this.tShift.push(indent);\n this.sCount.push(offset);\n this.bsCount.push(0);\n indent_found = false;\n indent = 0;\n offset = 0;\n start = pos + 1;\n }\n } // Push fake entry to simplify cache bounds checks\n\n\n this.bMarks.push(s.length);\n this.eMarks.push(s.length);\n this.tShift.push(0);\n this.sCount.push(0);\n this.bsCount.push(0);\n this.lineMax = this.bMarks.length - 1; // don't count last fake line\n} // Push new token to \"stream\".\n//\n\n\nStateBlock.prototype.push = function (type, tag, nesting) {\n var token = new Token(type, tag, nesting);\n token.block = true;\n if (nesting < 0) this.level--; // closing tag\n\n token.level = this.level;\n if (nesting > 0) this.level++; // opening tag\n\n this.tokens.push(token);\n return token;\n};\n\nStateBlock.prototype.isEmpty = function isEmpty(line) {\n return this.bMarks[line] + this.tShift[line] >= this.eMarks[line];\n};\n\nStateBlock.prototype.skipEmptyLines = function skipEmptyLines(from) {\n for (var max = this.lineMax; from < max; from++) {\n if (this.bMarks[from] + this.tShift[from] < this.eMarks[from]) {\n break;\n }\n }\n\n return from;\n}; // Skip spaces from given position.\n\n\nStateBlock.prototype.skipSpaces = function skipSpaces(pos) {\n var ch;\n\n for (var max = this.src.length; pos < max; pos++) {\n ch = this.src.charCodeAt(pos);\n\n if (!isSpace(ch)) {\n break;\n }\n }\n\n return pos;\n}; // Skip spaces from given position in reverse.\n\n\nStateBlock.prototype.skipSpacesBack = function skipSpacesBack(pos, min) {\n if (pos <= min) {\n return pos;\n }\n\n while (pos > min) {\n if (!isSpace(this.src.charCodeAt(--pos))) {\n return pos + 1;\n }\n }\n\n return pos;\n}; // Skip char codes from given position\n\n\nStateBlock.prototype.skipChars = function skipChars(pos, code) {\n for (var max = this.src.length; pos < max; pos++) {\n if (this.src.charCodeAt(pos) !== code) {\n break;\n }\n }\n\n return pos;\n}; // Skip char codes reverse from given position - 1\n\n\nStateBlock.prototype.skipCharsBack = function skipCharsBack(pos, code, min) {\n if (pos <= min) {\n return pos;\n }\n\n while (pos > min) {\n if (code !== this.src.charCodeAt(--pos)) {\n return pos + 1;\n }\n }\n\n return pos;\n}; // cut lines range from source.\n\n\nStateBlock.prototype.getLines = function getLines(begin, end, indent, keepLastLF) {\n var i,\n lineIndent,\n ch,\n first,\n last,\n queue,\n lineStart,\n line = begin;\n\n if (begin >= end) {\n return '';\n }\n\n queue = new Array(end - begin);\n\n for (i = 0; line < end; line++, i++) {\n lineIndent = 0;\n lineStart = first = this.bMarks[line];\n\n if (line + 1 < end || keepLastLF) {\n // No need for bounds check because we have fake entry on tail.\n last = this.eMarks[line] + 1;\n } else {\n last = this.eMarks[line];\n }\n\n while (first < last && lineIndent < indent) {\n ch = this.src.charCodeAt(first);\n\n if (isSpace(ch)) {\n if (ch === 0x09) {\n lineIndent += 4 - (lineIndent + this.bsCount[line]) % 4;\n } else {\n lineIndent++;\n }\n } else if (first - lineStart < this.tShift[line]) {\n // patched tShift masked characters to look like spaces (blockquotes, list markers)\n lineIndent++;\n } else {\n break;\n }\n\n first++;\n }\n\n if (lineIndent > indent) {\n // partially expanding tabs in code blocks, e.g '\\t\\tfoobar'\n // with indent=2 becomes ' \\tfoobar'\n queue[i] = new Array(lineIndent - indent + 1).join(' ') + this.src.slice(first, last);\n } else {\n queue[i] = this.src.slice(first, last);\n }\n }\n\n return queue.join('');\n}; // re-export Token class to use in block rules\n\n\nStateBlock.prototype.Token = Token;\nmodule.exports = StateBlock;\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_block/state_block.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/rules_block/table.js": -/*!***********************************************************!*\ - !*** ./node_modules/markdown-it/lib/rules_block/table.js ***! - \***********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// GFM table, non-standard\n\n\nvar isSpace = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isSpace;\n\nfunction getLine(state, line) {\n var pos = state.bMarks[line] + state.blkIndent,\n max = state.eMarks[line];\n return state.src.substr(pos, max - pos);\n}\n\nfunction escapedSplit(str) {\n var result = [],\n pos = 0,\n max = str.length,\n ch,\n escapes = 0,\n lastPos = 0,\n backTicked = false,\n lastBackTick = 0;\n ch = str.charCodeAt(pos);\n\n while (pos < max) {\n if (ch === 0x60\n /* ` */\n ) {\n if (backTicked) {\n // make \\` close code sequence, but not open it;\n // the reason is: `\\` is correct code block\n backTicked = false;\n lastBackTick = pos;\n } else if (escapes % 2 === 0) {\n backTicked = true;\n lastBackTick = pos;\n }\n } else if (ch === 0x7c\n /* | */\n && escapes % 2 === 0 && !backTicked) {\n result.push(str.substring(lastPos, pos));\n lastPos = pos + 1;\n }\n\n if (ch === 0x5c\n /* \\ */\n ) {\n escapes++;\n } else {\n escapes = 0;\n }\n\n pos++; // If there was an un-closed backtick, go back to just after\n // the last backtick, but as if it was a normal character\n\n if (pos === max && backTicked) {\n backTicked = false;\n pos = lastBackTick + 1;\n }\n\n ch = str.charCodeAt(pos);\n }\n\n result.push(str.substring(lastPos));\n return result;\n}\n\nmodule.exports = function table(state, startLine, endLine, silent) {\n var ch, lineText, pos, i, nextLine, columns, columnCount, token, aligns, t, tableLines, tbodyLines; // should have at least two lines\n\n if (startLine + 2 > endLine) {\n return false;\n }\n\n nextLine = startLine + 1;\n\n if (state.sCount[nextLine] < state.blkIndent) {\n return false;\n } // if it's indented more than 3 spaces, it should be a code block\n\n\n if (state.sCount[nextLine] - state.blkIndent >= 4) {\n return false;\n } // first character of the second line should be '|', '-', ':',\n // and no other characters are allowed but spaces;\n // basically, this is the equivalent of /^[-:|][-:|\\s]*$/ regexp\n\n\n pos = state.bMarks[nextLine] + state.tShift[nextLine];\n\n if (pos >= state.eMarks[nextLine]) {\n return false;\n }\n\n ch = state.src.charCodeAt(pos++);\n\n if (ch !== 0x7C\n /* | */\n && ch !== 0x2D\n /* - */\n && ch !== 0x3A\n /* : */\n ) {\n return false;\n }\n\n while (pos < state.eMarks[nextLine]) {\n ch = state.src.charCodeAt(pos);\n\n if (ch !== 0x7C\n /* | */\n && ch !== 0x2D\n /* - */\n && ch !== 0x3A\n /* : */\n && !isSpace(ch)) {\n return false;\n }\n\n pos++;\n }\n\n lineText = getLine(state, startLine + 1);\n columns = lineText.split('|');\n aligns = [];\n\n for (i = 0; i < columns.length; i++) {\n t = columns[i].trim();\n\n if (!t) {\n // allow empty columns before and after table, but not in between columns;\n // e.g. allow ` |---| `, disallow ` ---||--- `\n if (i === 0 || i === columns.length - 1) {\n continue;\n } else {\n return false;\n }\n }\n\n if (!/^:?-+:?$/.test(t)) {\n return false;\n }\n\n if (t.charCodeAt(t.length - 1) === 0x3A\n /* : */\n ) {\n aligns.push(t.charCodeAt(0) === 0x3A\n /* : */\n ? 'center' : 'right');\n } else if (t.charCodeAt(0) === 0x3A\n /* : */\n ) {\n aligns.push('left');\n } else {\n aligns.push('');\n }\n }\n\n lineText = getLine(state, startLine).trim();\n\n if (lineText.indexOf('|') === -1) {\n return false;\n }\n\n if (state.sCount[startLine] - state.blkIndent >= 4) {\n return false;\n }\n\n columns = escapedSplit(lineText.replace(/^\\||\\|$/g, '')); // header row will define an amount of columns in the entire table,\n // and align row shouldn't be smaller than that (the rest of the rows can)\n\n columnCount = columns.length;\n\n if (columnCount > aligns.length) {\n return false;\n }\n\n if (silent) {\n return true;\n }\n\n token = state.push('table_open', 'table', 1);\n token.map = tableLines = [startLine, 0];\n token = state.push('thead_open', 'thead', 1);\n token.map = [startLine, startLine + 1];\n token = state.push('tr_open', 'tr', 1);\n token.map = [startLine, startLine + 1];\n\n for (i = 0; i < columns.length; i++) {\n token = state.push('th_open', 'th', 1);\n token.map = [startLine, startLine + 1];\n\n if (aligns[i]) {\n token.attrs = [['style', 'text-align:' + aligns[i]]];\n }\n\n token = state.push('inline', '', 0);\n token.content = columns[i].trim();\n token.map = [startLine, startLine + 1];\n token.children = [];\n token = state.push('th_close', 'th', -1);\n }\n\n token = state.push('tr_close', 'tr', -1);\n token = state.push('thead_close', 'thead', -1);\n token = state.push('tbody_open', 'tbody', 1);\n token.map = tbodyLines = [startLine + 2, 0];\n\n for (nextLine = startLine + 2; nextLine < endLine; nextLine++) {\n if (state.sCount[nextLine] < state.blkIndent) {\n break;\n }\n\n lineText = getLine(state, nextLine).trim();\n\n if (lineText.indexOf('|') === -1) {\n break;\n }\n\n if (state.sCount[nextLine] - state.blkIndent >= 4) {\n break;\n }\n\n columns = escapedSplit(lineText.replace(/^\\||\\|$/g, ''));\n token = state.push('tr_open', 'tr', 1);\n\n for (i = 0; i < columnCount; i++) {\n token = state.push('td_open', 'td', 1);\n\n if (aligns[i]) {\n token.attrs = [['style', 'text-align:' + aligns[i]]];\n }\n\n token = state.push('inline', '', 0);\n token.content = columns[i] ? columns[i].trim() : '';\n token.children = [];\n token = state.push('td_close', 'td', -1);\n }\n\n token = state.push('tr_close', 'tr', -1);\n }\n\n token = state.push('tbody_close', 'tbody', -1);\n token = state.push('table_close', 'table', -1);\n tableLines[1] = tbodyLines[1] = nextLine;\n state.line = nextLine;\n return true;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_block/table.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/rules_core/block.js": -/*!**********************************************************!*\ - !*** ./node_modules/markdown-it/lib/rules_core/block.js ***! - \**********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nmodule.exports = function block(state) {\n var token;\n\n if (state.inlineMode) {\n token = new state.Token('inline', '', 0);\n token.content = state.src;\n token.map = [0, 1];\n token.children = [];\n state.tokens.push(token);\n } else {\n state.md.block.parse(state.src, state.md, state.env, state.tokens);\n }\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_core/block.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/rules_core/inline.js": -/*!***********************************************************!*\ - !*** ./node_modules/markdown-it/lib/rules_core/inline.js ***! - \***********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nmodule.exports = function inline(state) {\n var tokens = state.tokens,\n tok,\n i,\n l; // Parse inlines\n\n for (i = 0, l = tokens.length; i < l; i++) {\n tok = tokens[i];\n\n if (tok.type === 'inline') {\n state.md.inline.parse(tok.content, state.md, state.env, tok.children);\n }\n }\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_core/inline.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/rules_core/linkify.js": -/*!************************************************************!*\ - !*** ./node_modules/markdown-it/lib/rules_core/linkify.js ***! - \************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Replace link-like texts with link nodes.\n//\n// Currently restricted by `md.validateLink()` to http/https/ftp\n//\n\n\nvar arrayReplaceAt = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").arrayReplaceAt;\n\nfunction isLinkOpen(str) {\n return /^\\s]/i.test(str);\n}\n\nfunction isLinkClose(str) {\n return /^<\\/a\\s*>/i.test(str);\n}\n\nmodule.exports = function linkify(state) {\n var i,\n j,\n l,\n tokens,\n token,\n currentToken,\n nodes,\n ln,\n text,\n pos,\n lastPos,\n level,\n htmlLinkLevel,\n url,\n fullUrl,\n urlText,\n blockTokens = state.tokens,\n links;\n\n if (!state.md.options.linkify) {\n return;\n }\n\n for (j = 0, l = blockTokens.length; j < l; j++) {\n if (blockTokens[j].type !== 'inline' || !state.md.linkify.pretest(blockTokens[j].content)) {\n continue;\n }\n\n tokens = blockTokens[j].children;\n htmlLinkLevel = 0; // We scan from the end, to keep position when new tags added.\n // Use reversed logic in links start/end match\n\n for (i = tokens.length - 1; i >= 0; i--) {\n currentToken = tokens[i]; // Skip content of markdown links\n\n if (currentToken.type === 'link_close') {\n i--;\n\n while (tokens[i].level !== currentToken.level && tokens[i].type !== 'link_open') {\n i--;\n }\n\n continue;\n } // Skip content of html tag links\n\n\n if (currentToken.type === 'html_inline') {\n if (isLinkOpen(currentToken.content) && htmlLinkLevel > 0) {\n htmlLinkLevel--;\n }\n\n if (isLinkClose(currentToken.content)) {\n htmlLinkLevel++;\n }\n }\n\n if (htmlLinkLevel > 0) {\n continue;\n }\n\n if (currentToken.type === 'text' && state.md.linkify.test(currentToken.content)) {\n text = currentToken.content;\n links = state.md.linkify.match(text); // Now split string to nodes\n\n nodes = [];\n level = currentToken.level;\n lastPos = 0;\n\n for (ln = 0; ln < links.length; ln++) {\n url = links[ln].url;\n fullUrl = state.md.normalizeLink(url);\n\n if (!state.md.validateLink(fullUrl)) {\n continue;\n }\n\n urlText = links[ln].text; // Linkifier might send raw hostnames like \"example.com\", where url\n // starts with domain name. So we prepend http:// in those cases,\n // and remove it afterwards.\n //\n\n if (!links[ln].schema) {\n urlText = state.md.normalizeLinkText('http://' + urlText).replace(/^http:\\/\\//, '');\n } else if (links[ln].schema === 'mailto:' && !/^mailto:/i.test(urlText)) {\n urlText = state.md.normalizeLinkText('mailto:' + urlText).replace(/^mailto:/, '');\n } else {\n urlText = state.md.normalizeLinkText(urlText);\n }\n\n pos = links[ln].index;\n\n if (pos > lastPos) {\n token = new state.Token('text', '', 0);\n token.content = text.slice(lastPos, pos);\n token.level = level;\n nodes.push(token);\n }\n\n token = new state.Token('link_open', 'a', 1);\n token.attrs = [['href', fullUrl]];\n token.level = level++;\n token.markup = 'linkify';\n token.info = 'auto';\n nodes.push(token);\n token = new state.Token('text', '', 0);\n token.content = urlText;\n token.level = level;\n nodes.push(token);\n token = new state.Token('link_close', 'a', -1);\n token.level = --level;\n token.markup = 'linkify';\n token.info = 'auto';\n nodes.push(token);\n lastPos = links[ln].lastIndex;\n }\n\n if (lastPos < text.length) {\n token = new state.Token('text', '', 0);\n token.content = text.slice(lastPos);\n token.level = level;\n nodes.push(token);\n } // replace current node\n\n\n blockTokens[j].children = tokens = arrayReplaceAt(tokens, i, nodes);\n }\n }\n }\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_core/linkify.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/rules_core/normalize.js": -/*!**************************************************************!*\ - !*** ./node_modules/markdown-it/lib/rules_core/normalize.js ***! - \**************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Normalize input string\n // https://spec.commonmark.org/0.29/#line-ending\n\nvar NEWLINES_RE = /\\r\\n?|\\n/g;\nvar NULL_RE = /\\0/g;\n\nmodule.exports = function normalize(state) {\n var str; // Normalize newlines\n\n str = state.src.replace(NEWLINES_RE, '\\n'); // Replace NULL characters\n\n str = str.replace(NULL_RE, \"\\uFFFD\");\n state.src = str;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_core/normalize.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/rules_core/replacements.js": -/*!*****************************************************************!*\ - !*** ./node_modules/markdown-it/lib/rules_core/replacements.js ***! - \*****************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Simple typographic replacements\n//\n// (c) (C) → ©\n// (tm) (TM) → ™\n// (r) (R) → ®\n// +- → ±\n// (p) (P) -> §\n// ... → … (also ?.... → ?.., !.... → !..)\n// ???????? → ???, !!!!! → !!!, `,,` → `,`\n// -- → –, --- → —\n//\n // TODO:\n// - fractionals 1/2, 1/4, 3/4 -> ½, ¼, ¾\n// - miltiplication 2 x 4 -> 2 × 4\n\nvar RARE_RE = /\\+-|\\.\\.|\\?\\?\\?\\?|!!!!|,,|--/; // Workaround for phantomjs - need regex without /g flag,\n// or root check will fail every second time\n\nvar SCOPED_ABBR_TEST_RE = /\\((c|tm|r|p)\\)/i;\nvar SCOPED_ABBR_RE = /\\((c|tm|r|p)\\)/ig;\nvar SCOPED_ABBR = {\n c: '©',\n r: '®',\n p: '§',\n tm: '™'\n};\n\nfunction replaceFn(match, name) {\n return SCOPED_ABBR[name.toLowerCase()];\n}\n\nfunction replace_scoped(inlineTokens) {\n var i,\n token,\n inside_autolink = 0;\n\n for (i = inlineTokens.length - 1; i >= 0; i--) {\n token = inlineTokens[i];\n\n if (token.type === 'text' && !inside_autolink) {\n token.content = token.content.replace(SCOPED_ABBR_RE, replaceFn);\n }\n\n if (token.type === 'link_open' && token.info === 'auto') {\n inside_autolink--;\n }\n\n if (token.type === 'link_close' && token.info === 'auto') {\n inside_autolink++;\n }\n }\n}\n\nfunction replace_rare(inlineTokens) {\n var i,\n token,\n inside_autolink = 0;\n\n for (i = inlineTokens.length - 1; i >= 0; i--) {\n token = inlineTokens[i];\n\n if (token.type === 'text' && !inside_autolink) {\n if (RARE_RE.test(token.content)) {\n token.content = token.content.replace(/\\+-/g, '±') // .., ..., ....... -> …\n // but ?..... & !..... -> ?.. & !..\n .replace(/\\.{2,}/g, '…').replace(/([?!])…/g, '$1..').replace(/([?!]){4,}/g, '$1$1$1').replace(/,{2,}/g, ',') // em-dash\n .replace(/(^|[^-])---([^-]|$)/mg, \"$1\\u2014$2\") // en-dash\n .replace(/(^|\\s)--(\\s|$)/mg, \"$1\\u2013$2\").replace(/(^|[^-\\s])--([^-\\s]|$)/mg, \"$1\\u2013$2\");\n }\n }\n\n if (token.type === 'link_open' && token.info === 'auto') {\n inside_autolink--;\n }\n\n if (token.type === 'link_close' && token.info === 'auto') {\n inside_autolink++;\n }\n }\n}\n\nmodule.exports = function replace(state) {\n var blkIdx;\n\n if (!state.md.options.typographer) {\n return;\n }\n\n for (blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {\n if (state.tokens[blkIdx].type !== 'inline') {\n continue;\n }\n\n if (SCOPED_ABBR_TEST_RE.test(state.tokens[blkIdx].content)) {\n replace_scoped(state.tokens[blkIdx].children);\n }\n\n if (RARE_RE.test(state.tokens[blkIdx].content)) {\n replace_rare(state.tokens[blkIdx].children);\n }\n }\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_core/replacements.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/rules_core/smartquotes.js": -/*!****************************************************************!*\ - !*** ./node_modules/markdown-it/lib/rules_core/smartquotes.js ***! - \****************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Convert straight quotation marks to typographic ones\n//\n\n\nvar isWhiteSpace = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isWhiteSpace;\n\nvar isPunctChar = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isPunctChar;\n\nvar isMdAsciiPunct = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isMdAsciiPunct;\n\nvar QUOTE_TEST_RE = /['\"]/;\nvar QUOTE_RE = /['\"]/g;\nvar APOSTROPHE = \"\\u2019\";\n/* ’ */\n\nfunction replaceAt(str, index, ch) {\n return str.substr(0, index) + ch + str.substr(index + 1);\n}\n\nfunction process_inlines(tokens, state) {\n var i, token, text, t, pos, max, thisLevel, item, lastChar, nextChar, isLastPunctChar, isNextPunctChar, isLastWhiteSpace, isNextWhiteSpace, canOpen, canClose, j, isSingle, stack, openQuote, closeQuote;\n stack = [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n thisLevel = tokens[i].level;\n\n for (j = stack.length - 1; j >= 0; j--) {\n if (stack[j].level <= thisLevel) {\n break;\n }\n }\n\n stack.length = j + 1;\n\n if (token.type !== 'text') {\n continue;\n }\n\n text = token.content;\n pos = 0;\n max = text.length;\n /*eslint no-labels:0,block-scoped-var:0*/\n\n OUTER: while (pos < max) {\n QUOTE_RE.lastIndex = pos;\n t = QUOTE_RE.exec(text);\n\n if (!t) {\n break;\n }\n\n canOpen = canClose = true;\n pos = t.index + 1;\n isSingle = t[0] === \"'\"; // Find previous character,\n // default to space if it's the beginning of the line\n //\n\n lastChar = 0x20;\n\n if (t.index - 1 >= 0) {\n lastChar = text.charCodeAt(t.index - 1);\n } else {\n for (j = i - 1; j >= 0; j--) {\n if (tokens[j].type === 'softbreak' || tokens[j].type === 'hardbreak') break; // lastChar defaults to 0x20\n\n if (tokens[j].type !== 'text') continue;\n lastChar = tokens[j].content.charCodeAt(tokens[j].content.length - 1);\n break;\n }\n } // Find next character,\n // default to space if it's the end of the line\n //\n\n\n nextChar = 0x20;\n\n if (pos < max) {\n nextChar = text.charCodeAt(pos);\n } else {\n for (j = i + 1; j < tokens.length; j++) {\n if (tokens[j].type === 'softbreak' || tokens[j].type === 'hardbreak') break; // nextChar defaults to 0x20\n\n if (tokens[j].type !== 'text') continue;\n nextChar = tokens[j].content.charCodeAt(0);\n break;\n }\n }\n\n isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar));\n isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar));\n isLastWhiteSpace = isWhiteSpace(lastChar);\n isNextWhiteSpace = isWhiteSpace(nextChar);\n\n if (isNextWhiteSpace) {\n canOpen = false;\n } else if (isNextPunctChar) {\n if (!(isLastWhiteSpace || isLastPunctChar)) {\n canOpen = false;\n }\n }\n\n if (isLastWhiteSpace) {\n canClose = false;\n } else if (isLastPunctChar) {\n if (!(isNextWhiteSpace || isNextPunctChar)) {\n canClose = false;\n }\n }\n\n if (nextChar === 0x22\n /* \" */\n && t[0] === '\"') {\n if (lastChar >= 0x30\n /* 0 */\n && lastChar <= 0x39\n /* 9 */\n ) {\n // special case: 1\"\" - count first quote as an inch\n canClose = canOpen = false;\n }\n }\n\n if (canOpen && canClose) {\n // treat this as the middle of the word\n canOpen = false;\n canClose = isNextPunctChar;\n }\n\n if (!canOpen && !canClose) {\n // middle of word\n if (isSingle) {\n token.content = replaceAt(token.content, t.index, APOSTROPHE);\n }\n\n continue;\n }\n\n if (canClose) {\n // this could be a closing quote, rewind the stack to get a match\n for (j = stack.length - 1; j >= 0; j--) {\n item = stack[j];\n\n if (stack[j].level < thisLevel) {\n break;\n }\n\n if (item.single === isSingle && stack[j].level === thisLevel) {\n item = stack[j];\n\n if (isSingle) {\n openQuote = state.md.options.quotes[2];\n closeQuote = state.md.options.quotes[3];\n } else {\n openQuote = state.md.options.quotes[0];\n closeQuote = state.md.options.quotes[1];\n } // replace token.content *before* tokens[item.token].content,\n // because, if they are pointing at the same token, replaceAt\n // could mess up indices when quote length != 1\n\n\n token.content = replaceAt(token.content, t.index, closeQuote);\n tokens[item.token].content = replaceAt(tokens[item.token].content, item.pos, openQuote);\n pos += closeQuote.length - 1;\n\n if (item.token === i) {\n pos += openQuote.length - 1;\n }\n\n text = token.content;\n max = text.length;\n stack.length = j;\n continue OUTER;\n }\n }\n }\n\n if (canOpen) {\n stack.push({\n token: i,\n pos: t.index,\n single: isSingle,\n level: thisLevel\n });\n } else if (canClose && isSingle) {\n token.content = replaceAt(token.content, t.index, APOSTROPHE);\n }\n }\n }\n}\n\nmodule.exports = function smartquotes(state) {\n /*eslint max-depth:0*/\n var blkIdx;\n\n if (!state.md.options.typographer) {\n return;\n }\n\n for (blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {\n if (state.tokens[blkIdx].type !== 'inline' || !QUOTE_TEST_RE.test(state.tokens[blkIdx].content)) {\n continue;\n }\n\n process_inlines(state.tokens[blkIdx].children, state);\n }\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_core/smartquotes.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/rules_core/state_core.js": -/*!***************************************************************!*\ - !*** ./node_modules/markdown-it/lib/rules_core/state_core.js ***! - \***************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Core state object\n//\n\n\nvar Token = __webpack_require__(/*! ../token */ \"./node_modules/markdown-it/lib/token.js\");\n\nfunction StateCore(src, md, env) {\n this.src = src;\n this.env = env;\n this.tokens = [];\n this.inlineMode = false;\n this.md = md; // link to parser instance\n} // re-export Token class to use in core rules\n\n\nStateCore.prototype.Token = Token;\nmodule.exports = StateCore;\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_core/state_core.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/rules_inline/autolink.js": -/*!***************************************************************!*\ - !*** ./node_modules/markdown-it/lib/rules_inline/autolink.js ***! - \***************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Process autolinks ''\n\n/*eslint max-len:0*/\n\nvar EMAIL_RE = /^<([a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/;\nvar AUTOLINK_RE = /^<([a-zA-Z][a-zA-Z0-9+.\\-]{1,31}):([^<>\\x00-\\x20]*)>/;\n\nmodule.exports = function autolink(state, silent) {\n var tail,\n linkMatch,\n emailMatch,\n url,\n fullUrl,\n token,\n pos = state.pos;\n\n if (state.src.charCodeAt(pos) !== 0x3C\n /* < */\n ) {\n return false;\n }\n\n tail = state.src.slice(pos);\n\n if (tail.indexOf('>') < 0) {\n return false;\n }\n\n if (AUTOLINK_RE.test(tail)) {\n linkMatch = tail.match(AUTOLINK_RE);\n url = linkMatch[0].slice(1, -1);\n fullUrl = state.md.normalizeLink(url);\n\n if (!state.md.validateLink(fullUrl)) {\n return false;\n }\n\n if (!silent) {\n token = state.push('link_open', 'a', 1);\n token.attrs = [['href', fullUrl]];\n token.markup = 'autolink';\n token.info = 'auto';\n token = state.push('text', '', 0);\n token.content = state.md.normalizeLinkText(url);\n token = state.push('link_close', 'a', -1);\n token.markup = 'autolink';\n token.info = 'auto';\n }\n\n state.pos += linkMatch[0].length;\n return true;\n }\n\n if (EMAIL_RE.test(tail)) {\n emailMatch = tail.match(EMAIL_RE);\n url = emailMatch[0].slice(1, -1);\n fullUrl = state.md.normalizeLink('mailto:' + url);\n\n if (!state.md.validateLink(fullUrl)) {\n return false;\n }\n\n if (!silent) {\n token = state.push('link_open', 'a', 1);\n token.attrs = [['href', fullUrl]];\n token.markup = 'autolink';\n token.info = 'auto';\n token = state.push('text', '', 0);\n token.content = state.md.normalizeLinkText(url);\n token = state.push('link_close', 'a', -1);\n token.markup = 'autolink';\n token.info = 'auto';\n }\n\n state.pos += emailMatch[0].length;\n return true;\n }\n\n return false;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_inline/autolink.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/rules_inline/backticks.js": -/*!****************************************************************!*\ - !*** ./node_modules/markdown-it/lib/rules_inline/backticks.js ***! - \****************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Parse backticks\n\n\nmodule.exports = function backtick(state, silent) {\n var start,\n max,\n marker,\n matchStart,\n matchEnd,\n token,\n pos = state.pos,\n ch = state.src.charCodeAt(pos);\n\n if (ch !== 0x60\n /* ` */\n ) {\n return false;\n }\n\n start = pos;\n pos++;\n max = state.posMax;\n\n while (pos < max && state.src.charCodeAt(pos) === 0x60\n /* ` */\n ) {\n pos++;\n }\n\n marker = state.src.slice(start, pos);\n matchStart = matchEnd = pos;\n\n while ((matchStart = state.src.indexOf('`', matchEnd)) !== -1) {\n matchEnd = matchStart + 1;\n\n while (matchEnd < max && state.src.charCodeAt(matchEnd) === 0x60\n /* ` */\n ) {\n matchEnd++;\n }\n\n if (matchEnd - matchStart === marker.length) {\n if (!silent) {\n token = state.push('code_inline', 'code', 0);\n token.markup = marker;\n token.content = state.src.slice(pos, matchStart).replace(/\\n/g, ' ').replace(/^ (.+) $/, '$1');\n }\n\n state.pos = matchEnd;\n return true;\n }\n }\n\n if (!silent) {\n state.pending += marker;\n }\n\n state.pos += marker.length;\n return true;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_inline/backticks.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/rules_inline/balance_pairs.js": -/*!********************************************************************!*\ - !*** ./node_modules/markdown-it/lib/rules_inline/balance_pairs.js ***! - \********************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// For each opening emphasis-like marker find a matching closing one\n//\n\n\nfunction processDelimiters(state, delimiters) {\n var closerIdx,\n openerIdx,\n closer,\n opener,\n minOpenerIdx,\n newMinOpenerIdx,\n isOddMatch,\n lastJump,\n openersBottom = {},\n max = delimiters.length;\n\n for (closerIdx = 0; closerIdx < max; closerIdx++) {\n closer = delimiters[closerIdx]; // Length is only used for emphasis-specific \"rule of 3\",\n // if it's not defined (in strikethrough or 3rd party plugins),\n // we can default it to 0 to disable those checks.\n //\n\n closer.length = closer.length || 0;\n if (!closer.close) continue; // Previously calculated lower bounds (previous fails)\n // for each marker and each delimiter length modulo 3.\n\n if (!openersBottom.hasOwnProperty(closer.marker)) {\n openersBottom[closer.marker] = [-1, -1, -1];\n }\n\n minOpenerIdx = openersBottom[closer.marker][closer.length % 3];\n newMinOpenerIdx = -1;\n openerIdx = closerIdx - closer.jump - 1;\n\n for (; openerIdx > minOpenerIdx; openerIdx -= opener.jump + 1) {\n opener = delimiters[openerIdx];\n if (opener.marker !== closer.marker) continue;\n if (newMinOpenerIdx === -1) newMinOpenerIdx = openerIdx;\n\n if (opener.open && opener.end < 0 && opener.level === closer.level) {\n isOddMatch = false; // from spec:\n //\n // If one of the delimiters can both open and close emphasis, then the\n // sum of the lengths of the delimiter runs containing the opening and\n // closing delimiters must not be a multiple of 3 unless both lengths\n // are multiples of 3.\n //\n\n if (opener.close || closer.open) {\n if ((opener.length + closer.length) % 3 === 0) {\n if (opener.length % 3 !== 0 || closer.length % 3 !== 0) {\n isOddMatch = true;\n }\n }\n }\n\n if (!isOddMatch) {\n // If previous delimiter cannot be an opener, we can safely skip\n // the entire sequence in future checks. This is required to make\n // sure algorithm has linear complexity (see *_*_*_*_*_... case).\n //\n lastJump = openerIdx > 0 && !delimiters[openerIdx - 1].open ? delimiters[openerIdx - 1].jump + 1 : 0;\n closer.jump = closerIdx - openerIdx + lastJump;\n closer.open = false;\n opener.end = closerIdx;\n opener.jump = lastJump;\n opener.close = false;\n newMinOpenerIdx = -1;\n break;\n }\n }\n }\n\n if (newMinOpenerIdx !== -1) {\n // If match for this delimiter run failed, we want to set lower bound for\n // future lookups. This is required to make sure algorithm has linear\n // complexity.\n //\n // See details here:\n // https://github.com/commonmark/cmark/issues/178#issuecomment-270417442\n //\n openersBottom[closer.marker][(closer.length || 0) % 3] = newMinOpenerIdx;\n }\n }\n}\n\nmodule.exports = function link_pairs(state) {\n var curr,\n tokens_meta = state.tokens_meta,\n max = state.tokens_meta.length;\n processDelimiters(state, state.delimiters);\n\n for (curr = 0; curr < max; curr++) {\n if (tokens_meta[curr] && tokens_meta[curr].delimiters) {\n processDelimiters(state, tokens_meta[curr].delimiters);\n }\n }\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_inline/balance_pairs.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/rules_inline/emphasis.js": -/*!***************************************************************!*\ - !*** ./node_modules/markdown-it/lib/rules_inline/emphasis.js ***! - \***************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Process *this* and _that_\n//\n // Insert each marker as a separate text token, and add it to delimiter list\n//\n\nmodule.exports.tokenize = function emphasis(state, silent) {\n var i,\n scanned,\n token,\n start = state.pos,\n marker = state.src.charCodeAt(start);\n\n if (silent) {\n return false;\n }\n\n if (marker !== 0x5F\n /* _ */\n && marker !== 0x2A\n /* * */\n ) {\n return false;\n }\n\n scanned = state.scanDelims(state.pos, marker === 0x2A);\n\n for (i = 0; i < scanned.length; i++) {\n token = state.push('text', '', 0);\n token.content = String.fromCharCode(marker);\n state.delimiters.push({\n // Char code of the starting marker (number).\n //\n marker: marker,\n // Total length of these series of delimiters.\n //\n length: scanned.length,\n // An amount of characters before this one that's equivalent to\n // current one. In plain English: if this delimiter does not open\n // an emphasis, neither do previous `jump` characters.\n //\n // Used to skip sequences like \"*****\" in one step, for 1st asterisk\n // value will be 0, for 2nd it's 1 and so on.\n //\n jump: i,\n // A position of the token this delimiter corresponds to.\n //\n token: state.tokens.length - 1,\n // If this delimiter is matched as a valid opener, `end` will be\n // equal to its position, otherwise it's `-1`.\n //\n end: -1,\n // Boolean flags that determine if this delimiter could open or close\n // an emphasis.\n //\n open: scanned.can_open,\n close: scanned.can_close\n });\n }\n\n state.pos += scanned.length;\n return true;\n};\n\nfunction postProcess(state, delimiters) {\n var i,\n startDelim,\n endDelim,\n token,\n ch,\n isStrong,\n max = delimiters.length;\n\n for (i = max - 1; i >= 0; i--) {\n startDelim = delimiters[i];\n\n if (startDelim.marker !== 0x5F\n /* _ */\n && startDelim.marker !== 0x2A\n /* * */\n ) {\n continue;\n } // Process only opening markers\n\n\n if (startDelim.end === -1) {\n continue;\n }\n\n endDelim = delimiters[startDelim.end]; // If the previous delimiter has the same marker and is adjacent to this one,\n // merge those into one strong delimiter.\n //\n // `whatever` -> `whatever`\n //\n\n isStrong = i > 0 && delimiters[i - 1].end === startDelim.end + 1 && delimiters[i - 1].token === startDelim.token - 1 && delimiters[startDelim.end + 1].token === endDelim.token + 1 && delimiters[i - 1].marker === startDelim.marker;\n ch = String.fromCharCode(startDelim.marker);\n token = state.tokens[startDelim.token];\n token.type = isStrong ? 'strong_open' : 'em_open';\n token.tag = isStrong ? 'strong' : 'em';\n token.nesting = 1;\n token.markup = isStrong ? ch + ch : ch;\n token.content = '';\n token = state.tokens[endDelim.token];\n token.type = isStrong ? 'strong_close' : 'em_close';\n token.tag = isStrong ? 'strong' : 'em';\n token.nesting = -1;\n token.markup = isStrong ? ch + ch : ch;\n token.content = '';\n\n if (isStrong) {\n state.tokens[delimiters[i - 1].token].content = '';\n state.tokens[delimiters[startDelim.end + 1].token].content = '';\n i--;\n }\n }\n} // Walk through delimiter list and replace text tokens with tags\n//\n\n\nmodule.exports.postProcess = function emphasis(state) {\n var curr,\n tokens_meta = state.tokens_meta,\n max = state.tokens_meta.length;\n postProcess(state, state.delimiters);\n\n for (curr = 0; curr < max; curr++) {\n if (tokens_meta[curr] && tokens_meta[curr].delimiters) {\n postProcess(state, tokens_meta[curr].delimiters);\n }\n }\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_inline/emphasis.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/rules_inline/entity.js": -/*!*************************************************************!*\ - !*** ./node_modules/markdown-it/lib/rules_inline/entity.js ***! - \*************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Process html entity - {, ¯, ", ...\n\n\nvar entities = __webpack_require__(/*! ../common/entities */ \"./node_modules/markdown-it/lib/common/entities.js\");\n\nvar has = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").has;\n\nvar isValidEntityCode = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isValidEntityCode;\n\nvar fromCodePoint = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").fromCodePoint;\n\nvar DIGITAL_RE = /^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i;\nvar NAMED_RE = /^&([a-z][a-z0-9]{1,31});/i;\n\nmodule.exports = function entity(state, silent) {\n var ch,\n code,\n match,\n pos = state.pos,\n max = state.posMax;\n\n if (state.src.charCodeAt(pos) !== 0x26\n /* & */\n ) {\n return false;\n }\n\n if (pos + 1 < max) {\n ch = state.src.charCodeAt(pos + 1);\n\n if (ch === 0x23\n /* # */\n ) {\n match = state.src.slice(pos).match(DIGITAL_RE);\n\n if (match) {\n if (!silent) {\n code = match[1][0].toLowerCase() === 'x' ? parseInt(match[1].slice(1), 16) : parseInt(match[1], 10);\n state.pending += isValidEntityCode(code) ? fromCodePoint(code) : fromCodePoint(0xFFFD);\n }\n\n state.pos += match[0].length;\n return true;\n }\n } else {\n match = state.src.slice(pos).match(NAMED_RE);\n\n if (match) {\n if (has(entities, match[1])) {\n if (!silent) {\n state.pending += entities[match[1]];\n }\n\n state.pos += match[0].length;\n return true;\n }\n }\n }\n }\n\n if (!silent) {\n state.pending += '&';\n }\n\n state.pos++;\n return true;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_inline/entity.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/rules_inline/escape.js": -/*!*************************************************************!*\ - !*** ./node_modules/markdown-it/lib/rules_inline/escape.js ***! - \*************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Process escaped chars and hardbreaks\n\n\nvar isSpace = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isSpace;\n\nvar ESCAPED = [];\n\nfor (var i = 0; i < 256; i++) {\n ESCAPED.push(0);\n}\n\n'\\\\!\"#$%&\\'()*+,./:;<=>?@[]^_`{|}~-'.split('').forEach(function (ch) {\n ESCAPED[ch.charCodeAt(0)] = 1;\n});\n\nmodule.exports = function escape(state, silent) {\n var ch,\n pos = state.pos,\n max = state.posMax;\n\n if (state.src.charCodeAt(pos) !== 0x5C\n /* \\ */\n ) {\n return false;\n }\n\n pos++;\n\n if (pos < max) {\n ch = state.src.charCodeAt(pos);\n\n if (ch < 256 && ESCAPED[ch] !== 0) {\n if (!silent) {\n state.pending += state.src[pos];\n }\n\n state.pos += 2;\n return true;\n }\n\n if (ch === 0x0A) {\n if (!silent) {\n state.push('hardbreak', 'br', 0);\n }\n\n pos++; // skip leading whitespaces from next line\n\n while (pos < max) {\n ch = state.src.charCodeAt(pos);\n\n if (!isSpace(ch)) {\n break;\n }\n\n pos++;\n }\n\n state.pos = pos;\n return true;\n }\n }\n\n if (!silent) {\n state.pending += '\\\\';\n }\n\n state.pos++;\n return true;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_inline/escape.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/rules_inline/html_inline.js": -/*!******************************************************************!*\ - !*** ./node_modules/markdown-it/lib/rules_inline/html_inline.js ***! - \******************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Process html tags\n\n\nvar HTML_TAG_RE = __webpack_require__(/*! ../common/html_re */ \"./node_modules/markdown-it/lib/common/html_re.js\").HTML_TAG_RE;\n\nfunction isLetter(ch) {\n /*eslint no-bitwise:0*/\n var lc = ch | 0x20; // to lower case\n\n return lc >= 0x61\n /* a */\n && lc <= 0x7a\n /* z */\n ;\n}\n\nmodule.exports = function html_inline(state, silent) {\n var ch,\n match,\n max,\n token,\n pos = state.pos;\n\n if (!state.md.options.html) {\n return false;\n } // Check start\n\n\n max = state.posMax;\n\n if (state.src.charCodeAt(pos) !== 0x3C\n /* < */\n || pos + 2 >= max) {\n return false;\n } // Quick fail on second char\n\n\n ch = state.src.charCodeAt(pos + 1);\n\n if (ch !== 0x21\n /* ! */\n && ch !== 0x3F\n /* ? */\n && ch !== 0x2F\n /* / */\n && !isLetter(ch)) {\n return false;\n }\n\n match = state.src.slice(pos).match(HTML_TAG_RE);\n\n if (!match) {\n return false;\n }\n\n if (!silent) {\n token = state.push('html_inline', '', 0);\n token.content = state.src.slice(pos, pos + match[0].length);\n }\n\n state.pos += match[0].length;\n return true;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_inline/html_inline.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/rules_inline/image.js": -/*!************************************************************!*\ - !*** ./node_modules/markdown-it/lib/rules_inline/image.js ***! - \************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Process ![image]( \"title\")\n\n\nvar normalizeReference = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").normalizeReference;\n\nvar isSpace = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isSpace;\n\nmodule.exports = function image(state, silent) {\n var attrs,\n code,\n content,\n label,\n labelEnd,\n labelStart,\n pos,\n ref,\n res,\n title,\n token,\n tokens,\n start,\n href = '',\n oldPos = state.pos,\n max = state.posMax;\n\n if (state.src.charCodeAt(state.pos) !== 0x21\n /* ! */\n ) {\n return false;\n }\n\n if (state.src.charCodeAt(state.pos + 1) !== 0x5B\n /* [ */\n ) {\n return false;\n }\n\n labelStart = state.pos + 2;\n labelEnd = state.md.helpers.parseLinkLabel(state, state.pos + 1, false); // parser failed to find ']', so it's not a valid link\n\n if (labelEnd < 0) {\n return false;\n }\n\n pos = labelEnd + 1;\n\n if (pos < max && state.src.charCodeAt(pos) === 0x28\n /* ( */\n ) {\n //\n // Inline link\n //\n // [link]( \"title\" )\n // ^^ skipping these spaces\n pos++;\n\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n\n if (!isSpace(code) && code !== 0x0A) {\n break;\n }\n }\n\n if (pos >= max) {\n return false;\n } // [link]( \"title\" )\n // ^^^^^^ parsing link destination\n\n\n start = pos;\n res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax);\n\n if (res.ok) {\n href = state.md.normalizeLink(res.str);\n\n if (state.md.validateLink(href)) {\n pos = res.pos;\n } else {\n href = '';\n }\n } // [link]( \"title\" )\n // ^^ skipping these spaces\n\n\n start = pos;\n\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n\n if (!isSpace(code) && code !== 0x0A) {\n break;\n }\n } // [link]( \"title\" )\n // ^^^^^^^ parsing link title\n\n\n res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax);\n\n if (pos < max && start !== pos && res.ok) {\n title = res.str;\n pos = res.pos; // [link]( \"title\" )\n // ^^ skipping these spaces\n\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n\n if (!isSpace(code) && code !== 0x0A) {\n break;\n }\n }\n } else {\n title = '';\n }\n\n if (pos >= max || state.src.charCodeAt(pos) !== 0x29\n /* ) */\n ) {\n state.pos = oldPos;\n return false;\n }\n\n pos++;\n } else {\n //\n // Link reference\n //\n if (typeof state.env.references === 'undefined') {\n return false;\n }\n\n if (pos < max && state.src.charCodeAt(pos) === 0x5B\n /* [ */\n ) {\n start = pos + 1;\n pos = state.md.helpers.parseLinkLabel(state, pos);\n\n if (pos >= 0) {\n label = state.src.slice(start, pos++);\n } else {\n pos = labelEnd + 1;\n }\n } else {\n pos = labelEnd + 1;\n } // covers label === '' and label === undefined\n // (collapsed reference link and shortcut reference link respectively)\n\n\n if (!label) {\n label = state.src.slice(labelStart, labelEnd);\n }\n\n ref = state.env.references[normalizeReference(label)];\n\n if (!ref) {\n state.pos = oldPos;\n return false;\n }\n\n href = ref.href;\n title = ref.title;\n } //\n // We found the end of the link, and know for a fact it's a valid link;\n // so all that's left to do is to call tokenizer.\n //\n\n\n if (!silent) {\n content = state.src.slice(labelStart, labelEnd);\n state.md.inline.parse(content, state.md, state.env, tokens = []);\n token = state.push('image', 'img', 0);\n token.attrs = attrs = [['src', href], ['alt', '']];\n token.children = tokens;\n token.content = content;\n\n if (title) {\n attrs.push(['title', title]);\n }\n }\n\n state.pos = pos;\n state.posMax = max;\n return true;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_inline/image.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/rules_inline/link.js": -/*!***********************************************************!*\ - !*** ./node_modules/markdown-it/lib/rules_inline/link.js ***! - \***********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Process [link]( \"stuff\")\n\n\nvar normalizeReference = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").normalizeReference;\n\nvar isSpace = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isSpace;\n\nmodule.exports = function link(state, silent) {\n var attrs,\n code,\n label,\n labelEnd,\n labelStart,\n pos,\n res,\n ref,\n title,\n token,\n href = '',\n oldPos = state.pos,\n max = state.posMax,\n start = state.pos,\n parseReference = true;\n\n if (state.src.charCodeAt(state.pos) !== 0x5B\n /* [ */\n ) {\n return false;\n }\n\n labelStart = state.pos + 1;\n labelEnd = state.md.helpers.parseLinkLabel(state, state.pos, true); // parser failed to find ']', so it's not a valid link\n\n if (labelEnd < 0) {\n return false;\n }\n\n pos = labelEnd + 1;\n\n if (pos < max && state.src.charCodeAt(pos) === 0x28\n /* ( */\n ) {\n //\n // Inline link\n //\n // might have found a valid shortcut link, disable reference parsing\n parseReference = false; // [link]( \"title\" )\n // ^^ skipping these spaces\n\n pos++;\n\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n\n if (!isSpace(code) && code !== 0x0A) {\n break;\n }\n }\n\n if (pos >= max) {\n return false;\n } // [link]( \"title\" )\n // ^^^^^^ parsing link destination\n\n\n start = pos;\n res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax);\n\n if (res.ok) {\n href = state.md.normalizeLink(res.str);\n\n if (state.md.validateLink(href)) {\n pos = res.pos;\n } else {\n href = '';\n }\n } // [link]( \"title\" )\n // ^^ skipping these spaces\n\n\n start = pos;\n\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n\n if (!isSpace(code) && code !== 0x0A) {\n break;\n }\n } // [link]( \"title\" )\n // ^^^^^^^ parsing link title\n\n\n res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax);\n\n if (pos < max && start !== pos && res.ok) {\n title = res.str;\n pos = res.pos; // [link]( \"title\" )\n // ^^ skipping these spaces\n\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n\n if (!isSpace(code) && code !== 0x0A) {\n break;\n }\n }\n } else {\n title = '';\n }\n\n if (pos >= max || state.src.charCodeAt(pos) !== 0x29\n /* ) */\n ) {\n // parsing a valid shortcut link failed, fallback to reference\n parseReference = true;\n }\n\n pos++;\n }\n\n if (parseReference) {\n //\n // Link reference\n //\n if (typeof state.env.references === 'undefined') {\n return false;\n }\n\n if (pos < max && state.src.charCodeAt(pos) === 0x5B\n /* [ */\n ) {\n start = pos + 1;\n pos = state.md.helpers.parseLinkLabel(state, pos);\n\n if (pos >= 0) {\n label = state.src.slice(start, pos++);\n } else {\n pos = labelEnd + 1;\n }\n } else {\n pos = labelEnd + 1;\n } // covers label === '' and label === undefined\n // (collapsed reference link and shortcut reference link respectively)\n\n\n if (!label) {\n label = state.src.slice(labelStart, labelEnd);\n }\n\n ref = state.env.references[normalizeReference(label)];\n\n if (!ref) {\n state.pos = oldPos;\n return false;\n }\n\n href = ref.href;\n title = ref.title;\n } //\n // We found the end of the link, and know for a fact it's a valid link;\n // so all that's left to do is to call tokenizer.\n //\n\n\n if (!silent) {\n state.pos = labelStart;\n state.posMax = labelEnd;\n token = state.push('link_open', 'a', 1);\n token.attrs = attrs = [['href', href]];\n\n if (title) {\n attrs.push(['title', title]);\n }\n\n state.md.inline.tokenize(state);\n token = state.push('link_close', 'a', -1);\n }\n\n state.pos = pos;\n state.posMax = max;\n return true;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_inline/link.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/rules_inline/newline.js": -/*!**************************************************************!*\ - !*** ./node_modules/markdown-it/lib/rules_inline/newline.js ***! - \**************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Proceess '\\n'\n\n\nvar isSpace = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isSpace;\n\nmodule.exports = function newline(state, silent) {\n var pmax,\n max,\n pos = state.pos;\n\n if (state.src.charCodeAt(pos) !== 0x0A\n /* \\n */\n ) {\n return false;\n }\n\n pmax = state.pending.length - 1;\n max = state.posMax; // ' \\n' -> hardbreak\n // Lookup in pending chars is bad practice! Don't copy to other rules!\n // Pending string is stored in concat mode, indexed lookups will cause\n // convertion to flat mode.\n\n if (!silent) {\n if (pmax >= 0 && state.pending.charCodeAt(pmax) === 0x20) {\n if (pmax >= 1 && state.pending.charCodeAt(pmax - 1) === 0x20) {\n state.pending = state.pending.replace(/ +$/, '');\n state.push('hardbreak', 'br', 0);\n } else {\n state.pending = state.pending.slice(0, -1);\n state.push('softbreak', 'br', 0);\n }\n } else {\n state.push('softbreak', 'br', 0);\n }\n }\n\n pos++; // skip heading spaces for next line\n\n while (pos < max && isSpace(state.src.charCodeAt(pos))) {\n pos++;\n }\n\n state.pos = pos;\n return true;\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_inline/newline.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/rules_inline/state_inline.js": -/*!*******************************************************************!*\ - !*** ./node_modules/markdown-it/lib/rules_inline/state_inline.js ***! - \*******************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Inline parser state\n\n\nvar Token = __webpack_require__(/*! ../token */ \"./node_modules/markdown-it/lib/token.js\");\n\nvar isWhiteSpace = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isWhiteSpace;\n\nvar isPunctChar = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isPunctChar;\n\nvar isMdAsciiPunct = __webpack_require__(/*! ../common/utils */ \"./node_modules/markdown-it/lib/common/utils.js\").isMdAsciiPunct;\n\nfunction StateInline(src, md, env, outTokens) {\n this.src = src;\n this.env = env;\n this.md = md;\n this.tokens = outTokens;\n this.tokens_meta = Array(outTokens.length);\n this.pos = 0;\n this.posMax = this.src.length;\n this.level = 0;\n this.pending = '';\n this.pendingLevel = 0; // Stores { start: end } pairs. Useful for backtrack\n // optimization of pairs parse (emphasis, strikes).\n\n this.cache = {}; // List of emphasis-like delimiters for current tag\n\n this.delimiters = []; // Stack of delimiter lists for upper level tags\n\n this._prev_delimiters = [];\n} // Flush pending text\n//\n\n\nStateInline.prototype.pushPending = function () {\n var token = new Token('text', '', 0);\n token.content = this.pending;\n token.level = this.pendingLevel;\n this.tokens.push(token);\n this.pending = '';\n return token;\n}; // Push new token to \"stream\".\n// If pending text exists - flush it as text token\n//\n\n\nStateInline.prototype.push = function (type, tag, nesting) {\n if (this.pending) {\n this.pushPending();\n }\n\n var token = new Token(type, tag, nesting);\n var token_meta = null;\n\n if (nesting < 0) {\n // closing tag\n this.level--;\n this.delimiters = this._prev_delimiters.pop();\n }\n\n token.level = this.level;\n\n if (nesting > 0) {\n // opening tag\n this.level++;\n\n this._prev_delimiters.push(this.delimiters);\n\n this.delimiters = [];\n token_meta = {\n delimiters: this.delimiters\n };\n }\n\n this.pendingLevel = this.level;\n this.tokens.push(token);\n this.tokens_meta.push(token_meta);\n return token;\n}; // Scan a sequence of emphasis-like markers, and determine whether\n// it can start an emphasis sequence or end an emphasis sequence.\n//\n// - start - position to scan from (it should point at a valid marker);\n// - canSplitWord - determine if these markers can be found inside a word\n//\n\n\nStateInline.prototype.scanDelims = function (start, canSplitWord) {\n var pos = start,\n lastChar,\n nextChar,\n count,\n can_open,\n can_close,\n isLastWhiteSpace,\n isLastPunctChar,\n isNextWhiteSpace,\n isNextPunctChar,\n left_flanking = true,\n right_flanking = true,\n max = this.posMax,\n marker = this.src.charCodeAt(start); // treat beginning of the line as a whitespace\n\n lastChar = start > 0 ? this.src.charCodeAt(start - 1) : 0x20;\n\n while (pos < max && this.src.charCodeAt(pos) === marker) {\n pos++;\n }\n\n count = pos - start; // treat end of the line as a whitespace\n\n nextChar = pos < max ? this.src.charCodeAt(pos) : 0x20;\n isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar));\n isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar));\n isLastWhiteSpace = isWhiteSpace(lastChar);\n isNextWhiteSpace = isWhiteSpace(nextChar);\n\n if (isNextWhiteSpace) {\n left_flanking = false;\n } else if (isNextPunctChar) {\n if (!(isLastWhiteSpace || isLastPunctChar)) {\n left_flanking = false;\n }\n }\n\n if (isLastWhiteSpace) {\n right_flanking = false;\n } else if (isLastPunctChar) {\n if (!(isNextWhiteSpace || isNextPunctChar)) {\n right_flanking = false;\n }\n }\n\n if (!canSplitWord) {\n can_open = left_flanking && (!right_flanking || isLastPunctChar);\n can_close = right_flanking && (!left_flanking || isNextPunctChar);\n } else {\n can_open = left_flanking;\n can_close = right_flanking;\n }\n\n return {\n can_open: can_open,\n can_close: can_close,\n length: count\n };\n}; // re-export Token class to use in block rules\n\n\nStateInline.prototype.Token = Token;\nmodule.exports = StateInline;\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_inline/state_inline.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/rules_inline/strikethrough.js": -/*!********************************************************************!*\ - !*** ./node_modules/markdown-it/lib/rules_inline/strikethrough.js ***! - \********************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// ~~strike through~~\n//\n // Insert each marker as a separate text token, and add it to delimiter list\n//\n\nmodule.exports.tokenize = function strikethrough(state, silent) {\n var i,\n scanned,\n token,\n len,\n ch,\n start = state.pos,\n marker = state.src.charCodeAt(start);\n\n if (silent) {\n return false;\n }\n\n if (marker !== 0x7E\n /* ~ */\n ) {\n return false;\n }\n\n scanned = state.scanDelims(state.pos, true);\n len = scanned.length;\n ch = String.fromCharCode(marker);\n\n if (len < 2) {\n return false;\n }\n\n if (len % 2) {\n token = state.push('text', '', 0);\n token.content = ch;\n len--;\n }\n\n for (i = 0; i < len; i += 2) {\n token = state.push('text', '', 0);\n token.content = ch + ch;\n state.delimiters.push({\n marker: marker,\n length: 0,\n // disable \"rule of 3\" length checks meant for emphasis\n jump: i,\n token: state.tokens.length - 1,\n end: -1,\n open: scanned.can_open,\n close: scanned.can_close\n });\n }\n\n state.pos += scanned.length;\n return true;\n};\n\nfunction postProcess(state, delimiters) {\n var i,\n j,\n startDelim,\n endDelim,\n token,\n loneMarkers = [],\n max = delimiters.length;\n\n for (i = 0; i < max; i++) {\n startDelim = delimiters[i];\n\n if (startDelim.marker !== 0x7E\n /* ~ */\n ) {\n continue;\n }\n\n if (startDelim.end === -1) {\n continue;\n }\n\n endDelim = delimiters[startDelim.end];\n token = state.tokens[startDelim.token];\n token.type = 's_open';\n token.tag = 's';\n token.nesting = 1;\n token.markup = '~~';\n token.content = '';\n token = state.tokens[endDelim.token];\n token.type = 's_close';\n token.tag = 's';\n token.nesting = -1;\n token.markup = '~~';\n token.content = '';\n\n if (state.tokens[endDelim.token - 1].type === 'text' && state.tokens[endDelim.token - 1].content === '~') {\n loneMarkers.push(endDelim.token - 1);\n }\n } // If a marker sequence has an odd number of characters, it's splitted\n // like this: `~~~~~` -> `~` + `~~` + `~~`, leaving one marker at the\n // start of the sequence.\n //\n // So, we have to move all those markers after subsequent s_close tags.\n //\n\n\n while (loneMarkers.length) {\n i = loneMarkers.pop();\n j = i + 1;\n\n while (j < state.tokens.length && state.tokens[j].type === 's_close') {\n j++;\n }\n\n j--;\n\n if (i !== j) {\n token = state.tokens[j];\n state.tokens[j] = state.tokens[i];\n state.tokens[i] = token;\n }\n }\n} // Walk through delimiter list and replace text tokens with tags\n//\n\n\nmodule.exports.postProcess = function strikethrough(state) {\n var curr,\n tokens_meta = state.tokens_meta,\n max = state.tokens_meta.length;\n postProcess(state, state.delimiters);\n\n for (curr = 0; curr < max; curr++) {\n if (tokens_meta[curr] && tokens_meta[curr].delimiters) {\n postProcess(state, tokens_meta[curr].delimiters);\n }\n }\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_inline/strikethrough.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/rules_inline/text.js": -/*!***********************************************************!*\ - !*** ./node_modules/markdown-it/lib/rules_inline/text.js ***! - \***********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Skip text characters for text token, place those to pending buffer\n// and increment current pos\n // Rule to skip pure text\n// '{}$%@~+=:' reserved for extentions\n// !, \", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \\, ], ^, _, `, {, |, }, or ~\n// !!!! Don't confuse with \"Markdown ASCII Punctuation\" chars\n// http://spec.commonmark.org/0.15/#ascii-punctuation-character\n\nfunction isTerminatorChar(ch) {\n switch (ch) {\n case 0x0A\n /* \\n */\n :\n case 0x21\n /* ! */\n :\n case 0x23\n /* # */\n :\n case 0x24\n /* $ */\n :\n case 0x25\n /* % */\n :\n case 0x26\n /* & */\n :\n case 0x2A\n /* * */\n :\n case 0x2B\n /* + */\n :\n case 0x2D\n /* - */\n :\n case 0x3A\n /* : */\n :\n case 0x3C\n /* < */\n :\n case 0x3D\n /* = */\n :\n case 0x3E\n /* > */\n :\n case 0x40\n /* @ */\n :\n case 0x5B\n /* [ */\n :\n case 0x5C\n /* \\ */\n :\n case 0x5D\n /* ] */\n :\n case 0x5E\n /* ^ */\n :\n case 0x5F\n /* _ */\n :\n case 0x60\n /* ` */\n :\n case 0x7B\n /* { */\n :\n case 0x7D\n /* } */\n :\n case 0x7E\n /* ~ */\n :\n return true;\n\n default:\n return false;\n }\n}\n\nmodule.exports = function text(state, silent) {\n var pos = state.pos;\n\n while (pos < state.posMax && !isTerminatorChar(state.src.charCodeAt(pos))) {\n pos++;\n }\n\n if (pos === state.pos) {\n return false;\n }\n\n if (!silent) {\n state.pending += state.src.slice(state.pos, pos);\n }\n\n state.pos = pos;\n return true;\n}; // Alternative implementation, for memory.\n//\n// It costs 10% of performance, but allows extend terminators list, if place it\n// to `ParcerInline` property. Probably, will switch to it sometime, such\n// flexibility required.\n\n/*\nvar TERMINATOR_RE = /[\\n!#$%&*+\\-:<=>@[\\\\\\]^_`{}~]/;\n\nmodule.exports = function text(state, silent) {\n var pos = state.pos,\n idx = state.src.slice(pos).search(TERMINATOR_RE);\n\n // first char is terminator -> empty text\n if (idx === 0) { return false; }\n\n // no terminator -> text till end of string\n if (idx < 0) {\n if (!silent) { state.pending += state.src.slice(pos); }\n state.pos = state.src.length;\n return true;\n }\n\n if (!silent) { state.pending += state.src.slice(pos, pos + idx); }\n\n state.pos += idx;\n\n return true;\n};*/\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_inline/text.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/rules_inline/text_collapse.js": -/*!********************************************************************!*\ - !*** ./node_modules/markdown-it/lib/rules_inline/text_collapse.js ***! - \********************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Clean up tokens after emphasis and strikethrough postprocessing:\n// merge adjacent text nodes into one and re-calculate all token levels\n//\n// This is necessary because initially emphasis delimiter markers (*, _, ~)\n// are treated as their own separate text tokens. Then emphasis rule either\n// leaves them as text (needed to merge with adjacent text) or turns them\n// into opening/closing tags (which messes up levels inside).\n//\n\n\nmodule.exports = function text_collapse(state) {\n var curr,\n last,\n level = 0,\n tokens = state.tokens,\n max = state.tokens.length;\n\n for (curr = last = 0; curr < max; curr++) {\n // re-calculate levels after emphasis/strikethrough turns some text nodes\n // into opening/closing tags\n if (tokens[curr].nesting < 0) level--; // closing tag\n\n tokens[curr].level = level;\n if (tokens[curr].nesting > 0) level++; // opening tag\n\n if (tokens[curr].type === 'text' && curr + 1 < max && tokens[curr + 1].type === 'text') {\n // collapse two adjacent text nodes\n tokens[curr + 1].content = tokens[curr].content + tokens[curr + 1].content;\n } else {\n if (curr !== last) {\n tokens[last] = tokens[curr];\n }\n\n last++;\n }\n }\n\n if (curr !== last) {\n tokens.length = last;\n }\n};\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/rules_inline/text_collapse.js?"); - -/***/ }), - -/***/ "./node_modules/markdown-it/lib/token.js": -/*!***********************************************!*\ - !*** ./node_modules/markdown-it/lib/token.js ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Token class\n\n/**\n * class Token\n **/\n\n/**\n * new Token(type, tag, nesting)\n *\n * Create new token and fill passed properties.\n **/\n\nfunction Token(type, tag, nesting) {\n /**\n * Token#type -> String\n *\n * Type of the token (string, e.g. \"paragraph_open\")\n **/\n this.type = type;\n /**\n * Token#tag -> String\n *\n * html tag name, e.g. \"p\"\n **/\n\n this.tag = tag;\n /**\n * Token#attrs -> Array\n *\n * Html attributes. Format: `[ [ name1, value1 ], [ name2, value2 ] ]`\n **/\n\n this.attrs = null;\n /**\n * Token#map -> Array\n *\n * Source map info. Format: `[ line_begin, line_end ]`\n **/\n\n this.map = null;\n /**\n * Token#nesting -> Number\n *\n * Level change (number in {-1, 0, 1} set), where:\n *\n * - `1` means the tag is opening\n * - `0` means the tag is self-closing\n * - `-1` means the tag is closing\n **/\n\n this.nesting = nesting;\n /**\n * Token#level -> Number\n *\n * nesting level, the same as `state.level`\n **/\n\n this.level = 0;\n /**\n * Token#children -> Array\n *\n * An array of child nodes (inline and img tokens)\n **/\n\n this.children = null;\n /**\n * Token#content -> String\n *\n * In a case of self-closing tag (code, html, fence, etc.),\n * it has contents of this tag.\n **/\n\n this.content = '';\n /**\n * Token#markup -> String\n *\n * '*' or '_' for emphasis, fence string for fence, etc.\n **/\n\n this.markup = '';\n /**\n * Token#info -> String\n *\n * fence infostring\n **/\n\n this.info = '';\n /**\n * Token#meta -> Object\n *\n * A place for plugins to store an arbitrary data\n **/\n\n this.meta = null;\n /**\n * Token#block -> Boolean\n *\n * True for block-level tokens, false for inline tokens.\n * Used in renderer to calculate line breaks\n **/\n\n this.block = false;\n /**\n * Token#hidden -> Boolean\n *\n * If it's true, ignore this element when rendering. Used for tight lists\n * to hide paragraphs.\n **/\n\n this.hidden = false;\n}\n/**\n * Token.attrIndex(name) -> Number\n *\n * Search attribute index by name.\n **/\n\n\nToken.prototype.attrIndex = function attrIndex(name) {\n var attrs, i, len;\n\n if (!this.attrs) {\n return -1;\n }\n\n attrs = this.attrs;\n\n for (i = 0, len = attrs.length; i < len; i++) {\n if (attrs[i][0] === name) {\n return i;\n }\n }\n\n return -1;\n};\n/**\n * Token.attrPush(attrData)\n *\n * Add `[ name, value ]` attribute to list. Init attrs if necessary\n **/\n\n\nToken.prototype.attrPush = function attrPush(attrData) {\n if (this.attrs) {\n this.attrs.push(attrData);\n } else {\n this.attrs = [attrData];\n }\n};\n/**\n * Token.attrSet(name, value)\n *\n * Set `name` attribute to `value`. Override old value if exists.\n **/\n\n\nToken.prototype.attrSet = function attrSet(name, value) {\n var idx = this.attrIndex(name),\n attrData = [name, value];\n\n if (idx < 0) {\n this.attrPush(attrData);\n } else {\n this.attrs[idx] = attrData;\n }\n};\n/**\n * Token.attrGet(name)\n *\n * Get the value of attribute `name`, or null if it does not exist.\n **/\n\n\nToken.prototype.attrGet = function attrGet(name) {\n var idx = this.attrIndex(name),\n value = null;\n\n if (idx >= 0) {\n value = this.attrs[idx][1];\n }\n\n return value;\n};\n/**\n * Token.attrJoin(name, value)\n *\n * Join value to existing attribute via space. Or create new attribute if not\n * exists. Useful to operate with token classes.\n **/\n\n\nToken.prototype.attrJoin = function attrJoin(name, value) {\n var idx = this.attrIndex(name);\n\n if (idx < 0) {\n this.attrPush([name, value]);\n } else {\n this.attrs[idx][1] = this.attrs[idx][1] + ' ' + value;\n }\n};\n\nmodule.exports = Token;\n\n//# sourceURL=webpack:///./node_modules/markdown-it/lib/token.js?"); - -/***/ }), - -/***/ "./node_modules/mdurl/decode.js": -/*!**************************************!*\ - !*** ./node_modules/mdurl/decode.js ***! - \**************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n/* eslint-disable no-bitwise */\n\nvar decodeCache = {};\n\nfunction getDecodeCache(exclude) {\n var i,\n ch,\n cache = decodeCache[exclude];\n\n if (cache) {\n return cache;\n }\n\n cache = decodeCache[exclude] = [];\n\n for (i = 0; i < 128; i++) {\n ch = String.fromCharCode(i);\n cache.push(ch);\n }\n\n for (i = 0; i < exclude.length; i++) {\n ch = exclude.charCodeAt(i);\n cache[ch] = '%' + ('0' + ch.toString(16).toUpperCase()).slice(-2);\n }\n\n return cache;\n} // Decode percent-encoded string.\n//\n\n\nfunction decode(string, exclude) {\n var cache;\n\n if (typeof exclude !== 'string') {\n exclude = decode.defaultChars;\n }\n\n cache = getDecodeCache(exclude);\n return string.replace(/(%[a-f0-9]{2})+/gi, function (seq) {\n var i,\n l,\n b1,\n b2,\n b3,\n b4,\n chr,\n result = '';\n\n for (i = 0, l = seq.length; i < l; i += 3) {\n b1 = parseInt(seq.slice(i + 1, i + 3), 16);\n\n if (b1 < 0x80) {\n result += cache[b1];\n continue;\n }\n\n if ((b1 & 0xE0) === 0xC0 && i + 3 < l) {\n // 110xxxxx 10xxxxxx\n b2 = parseInt(seq.slice(i + 4, i + 6), 16);\n\n if ((b2 & 0xC0) === 0x80) {\n chr = b1 << 6 & 0x7C0 | b2 & 0x3F;\n\n if (chr < 0x80) {\n result += \"\\uFFFD\\uFFFD\";\n } else {\n result += String.fromCharCode(chr);\n }\n\n i += 3;\n continue;\n }\n }\n\n if ((b1 & 0xF0) === 0xE0 && i + 6 < l) {\n // 1110xxxx 10xxxxxx 10xxxxxx\n b2 = parseInt(seq.slice(i + 4, i + 6), 16);\n b3 = parseInt(seq.slice(i + 7, i + 9), 16);\n\n if ((b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80) {\n chr = b1 << 12 & 0xF000 | b2 << 6 & 0xFC0 | b3 & 0x3F;\n\n if (chr < 0x800 || chr >= 0xD800 && chr <= 0xDFFF) {\n result += \"\\uFFFD\\uFFFD\\uFFFD\";\n } else {\n result += String.fromCharCode(chr);\n }\n\n i += 6;\n continue;\n }\n }\n\n if ((b1 & 0xF8) === 0xF0 && i + 9 < l) {\n // 111110xx 10xxxxxx 10xxxxxx 10xxxxxx\n b2 = parseInt(seq.slice(i + 4, i + 6), 16);\n b3 = parseInt(seq.slice(i + 7, i + 9), 16);\n b4 = parseInt(seq.slice(i + 10, i + 12), 16);\n\n if ((b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80 && (b4 & 0xC0) === 0x80) {\n chr = b1 << 18 & 0x1C0000 | b2 << 12 & 0x3F000 | b3 << 6 & 0xFC0 | b4 & 0x3F;\n\n if (chr < 0x10000 || chr > 0x10FFFF) {\n result += \"\\uFFFD\\uFFFD\\uFFFD\\uFFFD\";\n } else {\n chr -= 0x10000;\n result += String.fromCharCode(0xD800 + (chr >> 10), 0xDC00 + (chr & 0x3FF));\n }\n\n i += 9;\n continue;\n }\n }\n\n result += \"\\uFFFD\";\n }\n\n return result;\n });\n}\n\ndecode.defaultChars = ';/?:@&=+$,#';\ndecode.componentChars = '';\nmodule.exports = decode;\n\n//# sourceURL=webpack:///./node_modules/mdurl/decode.js?"); - -/***/ }), - -/***/ "./node_modules/mdurl/encode.js": -/*!**************************************!*\ - !*** ./node_modules/mdurl/encode.js ***! - \**************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar encodeCache = {}; // Create a lookup array where anything but characters in `chars` string\n// and alphanumeric chars is percent-encoded.\n//\n\nfunction getEncodeCache(exclude) {\n var i,\n ch,\n cache = encodeCache[exclude];\n\n if (cache) {\n return cache;\n }\n\n cache = encodeCache[exclude] = [];\n\n for (i = 0; i < 128; i++) {\n ch = String.fromCharCode(i);\n\n if (/^[0-9a-z]$/i.test(ch)) {\n // always allow unencoded alphanumeric characters\n cache.push(ch);\n } else {\n cache.push('%' + ('0' + i.toString(16).toUpperCase()).slice(-2));\n }\n }\n\n for (i = 0; i < exclude.length; i++) {\n cache[exclude.charCodeAt(i)] = exclude[i];\n }\n\n return cache;\n} // Encode unsafe characters with percent-encoding, skipping already\n// encoded sequences.\n//\n// - string - string to encode\n// - exclude - list of characters to ignore (in addition to a-zA-Z0-9)\n// - keepEscaped - don't encode '%' in a correct escape sequence (default: true)\n//\n\n\nfunction encode(string, exclude, keepEscaped) {\n var i,\n l,\n code,\n nextCode,\n cache,\n result = '';\n\n if (typeof exclude !== 'string') {\n // encode(string, keepEscaped)\n keepEscaped = exclude;\n exclude = encode.defaultChars;\n }\n\n if (typeof keepEscaped === 'undefined') {\n keepEscaped = true;\n }\n\n cache = getEncodeCache(exclude);\n\n for (i = 0, l = string.length; i < l; i++) {\n code = string.charCodeAt(i);\n\n if (keepEscaped && code === 0x25\n /* % */\n && i + 2 < l) {\n if (/^[0-9a-f]{2}$/i.test(string.slice(i + 1, i + 3))) {\n result += string.slice(i, i + 3);\n i += 2;\n continue;\n }\n }\n\n if (code < 128) {\n result += cache[code];\n continue;\n }\n\n if (code >= 0xD800 && code <= 0xDFFF) {\n if (code >= 0xD800 && code <= 0xDBFF && i + 1 < l) {\n nextCode = string.charCodeAt(i + 1);\n\n if (nextCode >= 0xDC00 && nextCode <= 0xDFFF) {\n result += encodeURIComponent(string[i] + string[i + 1]);\n i++;\n continue;\n }\n }\n\n result += '%EF%BF%BD';\n continue;\n }\n\n result += encodeURIComponent(string[i]);\n }\n\n return result;\n}\n\nencode.defaultChars = \";/?:@&=+$,-_.!~*'()#\";\nencode.componentChars = \"-_.!~*'()\";\nmodule.exports = encode;\n\n//# sourceURL=webpack:///./node_modules/mdurl/encode.js?"); - -/***/ }), - -/***/ "./node_modules/mdurl/format.js": -/*!**************************************!*\ - !*** ./node_modules/mdurl/format.js ***! - \**************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nmodule.exports = function format(url) {\n var result = '';\n result += url.protocol || '';\n result += url.slashes ? '//' : '';\n result += url.auth ? url.auth + '@' : '';\n\n if (url.hostname && url.hostname.indexOf(':') !== -1) {\n // ipv6 address\n result += '[' + url.hostname + ']';\n } else {\n result += url.hostname || '';\n }\n\n result += url.port ? ':' + url.port : '';\n result += url.pathname || '';\n result += url.search || '';\n result += url.hash || '';\n return result;\n};\n\n//# sourceURL=webpack:///./node_modules/mdurl/format.js?"); - -/***/ }), - -/***/ "./node_modules/mdurl/index.js": -/*!*************************************!*\ - !*** ./node_modules/mdurl/index.js ***! - \*************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nmodule.exports.encode = __webpack_require__(/*! ./encode */ \"./node_modules/mdurl/encode.js\");\nmodule.exports.decode = __webpack_require__(/*! ./decode */ \"./node_modules/mdurl/decode.js\");\nmodule.exports.format = __webpack_require__(/*! ./format */ \"./node_modules/mdurl/format.js\");\nmodule.exports.parse = __webpack_require__(/*! ./parse */ \"./node_modules/mdurl/parse.js\");\n\n//# sourceURL=webpack:///./node_modules/mdurl/index.js?"); - -/***/ }), - -/***/ "./node_modules/mdurl/parse.js": -/*!*************************************!*\ - !*** ./node_modules/mdurl/parse.js ***! - \*************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n //\n// Changes from joyent/node:\n//\n// 1. No leading slash in paths,\n// e.g. in `url.parse('http://foo?bar')` pathname is ``, not `/`\n//\n// 2. Backslashes are not replaced with slashes,\n// so `http:\\\\example.org\\` is treated like a relative path\n//\n// 3. Trailing colon is treated like a part of the path,\n// i.e. in `http://example.org:foo` pathname is `:foo`\n//\n// 4. Nothing is URL-encoded in the resulting object,\n// (in joyent/node some chars in auth and paths are encoded)\n//\n// 5. `url.parse()` does not have `parseQueryString` argument\n//\n// 6. Removed extraneous result properties: `host`, `path`, `query`, etc.,\n// which can be constructed using other parts of the url.\n//\n\nfunction Url() {\n this.protocol = null;\n this.slashes = null;\n this.auth = null;\n this.port = null;\n this.hostname = null;\n this.hash = null;\n this.search = null;\n this.pathname = null;\n} // Reference: RFC 3986, RFC 1808, RFC 2396\n// define these here so at least they only have to be\n// compiled once on the first module load.\n\n\nvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n portPattern = /:[0-9]*$/,\n // Special case for a simple path URL\nsimplePathPattern = /^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,\n // RFC 2396: characters reserved for delimiting URLs.\n// We actually just auto-escape these.\ndelims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'],\n // RFC 2396: characters not allowed for various reasons.\nunwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims),\n // Allowed by RFCs, but cause of XSS attacks. Always escape these.\nautoEscape = ['\\''].concat(unwise),\n // Characters that are never ever allowed in a hostname.\n// Note that any invalid chars are also handled, but these\n// are the ones that are *expected* to be seen, so we fast-path\n// them.\nnonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),\n hostEndingChars = ['/', '?', '#'],\n hostnameMaxLen = 255,\n hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,\n hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,\n // protocols that can allow \"unsafe\" and \"unwise\" chars.\n\n/* eslint-disable no-script-url */\n// protocols that never have a hostname.\nhostlessProtocol = {\n 'javascript': true,\n 'javascript:': true\n},\n // protocols that always contain a // bit.\nslashedProtocol = {\n 'http': true,\n 'https': true,\n 'ftp': true,\n 'gopher': true,\n 'file': true,\n 'http:': true,\n 'https:': true,\n 'ftp:': true,\n 'gopher:': true,\n 'file:': true\n};\n/* eslint-enable no-script-url */\n\nfunction urlParse(url, slashesDenoteHost) {\n if (url && url instanceof Url) {\n return url;\n }\n\n var u = new Url();\n u.parse(url, slashesDenoteHost);\n return u;\n}\n\nUrl.prototype.parse = function (url, slashesDenoteHost) {\n var i,\n l,\n lowerProto,\n hec,\n slashes,\n rest = url; // trim before proceeding.\n // This is to support parse stuff like \" http://foo.com \\n\"\n\n rest = rest.trim();\n\n if (!slashesDenoteHost && url.split('#').length === 1) {\n // Try fast path regexp\n var simplePath = simplePathPattern.exec(rest);\n\n if (simplePath) {\n this.pathname = simplePath[1];\n\n if (simplePath[2]) {\n this.search = simplePath[2];\n }\n\n return this;\n }\n }\n\n var proto = protocolPattern.exec(rest);\n\n if (proto) {\n proto = proto[0];\n lowerProto = proto.toLowerCase();\n this.protocol = proto;\n rest = rest.substr(proto.length);\n } // figure out if it's got a host\n // user@server is *always* interpreted as a hostname, and url\n // resolution will treat //foo/bar as host=foo,path=bar because that's\n // how the browser resolves relative URLs.\n\n\n if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n slashes = rest.substr(0, 2) === '//';\n\n if (slashes && !(proto && hostlessProtocol[proto])) {\n rest = rest.substr(2);\n this.slashes = true;\n }\n }\n\n if (!hostlessProtocol[proto] && (slashes || proto && !slashedProtocol[proto])) {\n // there's a hostname.\n // the first instance of /, ?, ;, or # ends the host.\n //\n // If there is an @ in the hostname, then non-host chars *are* allowed\n // to the left of the last @ sign, unless some host-ending character\n // comes *before* the @-sign.\n // URLs are obnoxious.\n //\n // ex:\n // http://a@b@c/ => user:a@b host:c\n // http://a@b?@c => user:a host:c path:/?@c\n // v0.12 TODO(isaacs): This is not quite how Chrome does things.\n // Review our test case against browsers more comprehensively.\n // find the first instance of any hostEndingChars\n var hostEnd = -1;\n\n for (i = 0; i < hostEndingChars.length; i++) {\n hec = rest.indexOf(hostEndingChars[i]);\n\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) {\n hostEnd = hec;\n }\n } // at this point, either we have an explicit point where the\n // auth portion cannot go past, or the last @ char is the decider.\n\n\n var auth, atSign;\n\n if (hostEnd === -1) {\n // atSign can be anywhere.\n atSign = rest.lastIndexOf('@');\n } else {\n // atSign must be in auth portion.\n // http://a@b/c@d => host:b auth:a path:/c@d\n atSign = rest.lastIndexOf('@', hostEnd);\n } // Now we have a portion which is definitely the auth.\n // Pull that off.\n\n\n if (atSign !== -1) {\n auth = rest.slice(0, atSign);\n rest = rest.slice(atSign + 1);\n this.auth = auth;\n } // the host is the remaining to the left of the first non-host char\n\n\n hostEnd = -1;\n\n for (i = 0; i < nonHostChars.length; i++) {\n hec = rest.indexOf(nonHostChars[i]);\n\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) {\n hostEnd = hec;\n }\n } // if we still have not hit it, then the entire thing is a host.\n\n\n if (hostEnd === -1) {\n hostEnd = rest.length;\n }\n\n if (rest[hostEnd - 1] === ':') {\n hostEnd--;\n }\n\n var host = rest.slice(0, hostEnd);\n rest = rest.slice(hostEnd); // pull out port.\n\n this.parseHost(host); // we've indicated that there is a hostname,\n // so even if it's empty, it has to be present.\n\n this.hostname = this.hostname || ''; // if hostname begins with [ and ends with ]\n // assume that it's an IPv6 address.\n\n var ipv6Hostname = this.hostname[0] === '[' && this.hostname[this.hostname.length - 1] === ']'; // validate a little.\n\n if (!ipv6Hostname) {\n var hostparts = this.hostname.split(/\\./);\n\n for (i = 0, l = hostparts.length; i < l; i++) {\n var part = hostparts[i];\n\n if (!part) {\n continue;\n }\n\n if (!part.match(hostnamePartPattern)) {\n var newpart = '';\n\n for (var j = 0, k = part.length; j < k; j++) {\n if (part.charCodeAt(j) > 127) {\n // we replace non-ASCII char with a temporary placeholder\n // we need this to make sure size of hostname is not\n // broken by replacing non-ASCII by nothing\n newpart += 'x';\n } else {\n newpart += part[j];\n }\n } // we test again with ASCII char only\n\n\n if (!newpart.match(hostnamePartPattern)) {\n var validParts = hostparts.slice(0, i);\n var notHost = hostparts.slice(i + 1);\n var bit = part.match(hostnamePartStart);\n\n if (bit) {\n validParts.push(bit[1]);\n notHost.unshift(bit[2]);\n }\n\n if (notHost.length) {\n rest = notHost.join('.') + rest;\n }\n\n this.hostname = validParts.join('.');\n break;\n }\n }\n }\n }\n\n if (this.hostname.length > hostnameMaxLen) {\n this.hostname = '';\n } // strip [ and ] from the hostname\n // the host field still retains them, though\n\n\n if (ipv6Hostname) {\n this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n }\n } // chop off from the tail first.\n\n\n var hash = rest.indexOf('#');\n\n if (hash !== -1) {\n // got a fragment string.\n this.hash = rest.substr(hash);\n rest = rest.slice(0, hash);\n }\n\n var qm = rest.indexOf('?');\n\n if (qm !== -1) {\n this.search = rest.substr(qm);\n rest = rest.slice(0, qm);\n }\n\n if (rest) {\n this.pathname = rest;\n }\n\n if (slashedProtocol[lowerProto] && this.hostname && !this.pathname) {\n this.pathname = '';\n }\n\n return this;\n};\n\nUrl.prototype.parseHost = function (host) {\n var port = portPattern.exec(host);\n\n if (port) {\n port = port[0];\n\n if (port !== ':') {\n this.port = port.substr(1);\n }\n\n host = host.substr(0, host.length - port.length);\n }\n\n if (host) {\n this.hostname = host;\n }\n};\n\nmodule.exports = urlParse;\n\n//# sourceURL=webpack:///./node_modules/mdurl/parse.js?"); - -/***/ }), - -/***/ "./node_modules/node-libs-browser/node_modules/punycode/punycode.js": -/*!**************************************************************************!*\ - !*** ./node_modules/node-libs-browser/node_modules/punycode/punycode.js ***! - \**************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval("/* WEBPACK VAR INJECTION */(function(module, global) {var __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/*! https://mths.be/punycode v1.4.1 by @mathias */\n;\n\n(function (root) {\n /** Detect free variables */\n var freeExports = ( false ? undefined : _typeof(exports)) == 'object' && exports && !exports.nodeType && exports;\n var freeModule = ( false ? undefined : _typeof(module)) == 'object' && module && !module.nodeType && module;\n var freeGlobal = (typeof global === \"undefined\" ? \"undefined\" : _typeof(global)) == 'object' && global;\n\n if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal) {\n root = freeGlobal;\n }\n /**\n * The `punycode` object.\n * @name punycode\n * @type Object\n */\n\n\n var punycode,\n\n /** Highest positive signed 32-bit float value */\n maxInt = 2147483647,\n // aka. 0x7FFFFFFF or 2^31-1\n\n /** Bootstring parameters */\n base = 36,\n tMin = 1,\n tMax = 26,\n skew = 38,\n damp = 700,\n initialBias = 72,\n initialN = 128,\n // 0x80\n delimiter = '-',\n // '\\x2D'\n\n /** Regular expressions */\n regexPunycode = /^xn--/,\n regexNonASCII = /[^\\x20-\\x7E]/,\n // unprintable ASCII chars + non-ASCII chars\n regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g,\n // RFC 3490 separators\n\n /** Error messages */\n errors = {\n 'overflow': 'Overflow: input needs wider integers to process',\n 'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n 'invalid-input': 'Invalid input'\n },\n\n /** Convenience shortcuts */\n baseMinusTMin = base - tMin,\n floor = Math.floor,\n stringFromCharCode = String.fromCharCode,\n\n /** Temporary variable */\n key;\n /*--------------------------------------------------------------------------*/\n\n /**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\n\n function error(type) {\n throw new RangeError(errors[type]);\n }\n /**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\n\n\n function map(array, fn) {\n var length = array.length;\n var result = [];\n\n while (length--) {\n result[length] = fn(array[length]);\n }\n\n return result;\n }\n /**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {Array} A new string of characters returned by the callback\n * function.\n */\n\n\n function mapDomain(string, fn) {\n var parts = string.split('@');\n var result = '';\n\n if (parts.length > 1) {\n // In email addresses, only the domain name should be punycoded. Leave\n // the local part (i.e. everything up to `@`) intact.\n result = parts[0] + '@';\n string = parts[1];\n } // Avoid `split(regex)` for IE8 compatibility. See #17.\n\n\n string = string.replace(regexSeparators, '\\x2E');\n var labels = string.split('.');\n var encoded = map(labels, fn).join('.');\n return result + encoded;\n }\n /**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see \n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\n\n\n function ucs2decode(string) {\n var output = [],\n counter = 0,\n length = string.length,\n value,\n extra;\n\n while (counter < length) {\n value = string.charCodeAt(counter++);\n\n if (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n // high surrogate, and there is a next character\n extra = string.charCodeAt(counter++);\n\n if ((extra & 0xFC00) == 0xDC00) {\n // low surrogate\n output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n } else {\n // unmatched surrogate; only append this code unit, in case the next\n // code unit is the high surrogate of a surrogate pair\n output.push(value);\n counter--;\n }\n } else {\n output.push(value);\n }\n }\n\n return output;\n }\n /**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\n\n\n function ucs2encode(array) {\n return map(array, function (value) {\n var output = '';\n\n if (value > 0xFFFF) {\n value -= 0x10000;\n output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n value = 0xDC00 | value & 0x3FF;\n }\n\n output += stringFromCharCode(value);\n return output;\n }).join('');\n }\n /**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\n\n\n function basicToDigit(codePoint) {\n if (codePoint - 48 < 10) {\n return codePoint - 22;\n }\n\n if (codePoint - 65 < 26) {\n return codePoint - 65;\n }\n\n if (codePoint - 97 < 26) {\n return codePoint - 97;\n }\n\n return base;\n }\n /**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\n\n\n function digitToBasic(digit, flag) {\n // 0..25 map to ASCII a..z or A..Z\n // 26..35 map to ASCII 0..9\n return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n }\n /**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\n\n\n function adapt(delta, numPoints, firstTime) {\n var k = 0;\n delta = firstTime ? floor(delta / damp) : delta >> 1;\n delta += floor(delta / numPoints);\n\n for (;\n /* no initialization */\n delta > baseMinusTMin * tMax >> 1; k += base) {\n delta = floor(delta / baseMinusTMin);\n }\n\n return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n }\n /**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\n\n\n function decode(input) {\n // Don't use UCS-2\n var output = [],\n inputLength = input.length,\n out,\n i = 0,\n n = initialN,\n bias = initialBias,\n basic,\n j,\n index,\n oldi,\n w,\n k,\n digit,\n t,\n\n /** Cached calculation results */\n baseMinusT; // Handle the basic code points: let `basic` be the number of input code\n // points before the last delimiter, or `0` if there is none, then copy\n // the first basic code points to the output.\n\n basic = input.lastIndexOf(delimiter);\n\n if (basic < 0) {\n basic = 0;\n }\n\n for (j = 0; j < basic; ++j) {\n // if it's not a basic code point\n if (input.charCodeAt(j) >= 0x80) {\n error('not-basic');\n }\n\n output.push(input.charCodeAt(j));\n } // Main decoding loop: start just after the last delimiter if any basic code\n // points were copied; start at the beginning otherwise.\n\n\n for (index = basic > 0 ? basic + 1 : 0; index < inputLength;)\n /* no final expression */\n {\n // `index` is the index of the next character to be consumed.\n // Decode a generalized variable-length integer into `delta`,\n // which gets added to `i`. The overflow checking is easier\n // if we increase `i` as we go, then subtract off its starting\n // value at the end to obtain `delta`.\n for (oldi = i, w = 1, k = base;;\n /* no condition */\n k += base) {\n if (index >= inputLength) {\n error('invalid-input');\n }\n\n digit = basicToDigit(input.charCodeAt(index++));\n\n if (digit >= base || digit > floor((maxInt - i) / w)) {\n error('overflow');\n }\n\n i += digit * w;\n t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;\n\n if (digit < t) {\n break;\n }\n\n baseMinusT = base - t;\n\n if (w > floor(maxInt / baseMinusT)) {\n error('overflow');\n }\n\n w *= baseMinusT;\n }\n\n out = output.length + 1;\n bias = adapt(i - oldi, out, oldi == 0); // `i` was supposed to wrap around from `out` to `0`,\n // incrementing `n` each time, so we'll fix that now:\n\n if (floor(i / out) > maxInt - n) {\n error('overflow');\n }\n\n n += floor(i / out);\n i %= out; // Insert `n` at position `i` of the output\n\n output.splice(i++, 0, n);\n }\n\n return ucs2encode(output);\n }\n /**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\n\n\n function encode(input) {\n var n,\n delta,\n handledCPCount,\n basicLength,\n bias,\n j,\n m,\n q,\n k,\n t,\n currentValue,\n output = [],\n\n /** `inputLength` will hold the number of code points in `input`. */\n inputLength,\n\n /** Cached calculation results */\n handledCPCountPlusOne,\n baseMinusT,\n qMinusT; // Convert the input in UCS-2 to Unicode\n\n input = ucs2decode(input); // Cache the length\n\n inputLength = input.length; // Initialize the state\n\n n = initialN;\n delta = 0;\n bias = initialBias; // Handle the basic code points\n\n for (j = 0; j < inputLength; ++j) {\n currentValue = input[j];\n\n if (currentValue < 0x80) {\n output.push(stringFromCharCode(currentValue));\n }\n }\n\n handledCPCount = basicLength = output.length; // `handledCPCount` is the number of code points that have been handled;\n // `basicLength` is the number of basic code points.\n // Finish the basic string - if it is not empty - with a delimiter\n\n if (basicLength) {\n output.push(delimiter);\n } // Main encoding loop:\n\n\n while (handledCPCount < inputLength) {\n // All non-basic code points < n have been handled already. Find the next\n // larger one:\n for (m = maxInt, j = 0; j < inputLength; ++j) {\n currentValue = input[j];\n\n if (currentValue >= n && currentValue < m) {\n m = currentValue;\n }\n } // Increase `delta` enough to advance the decoder's state to ,\n // but guard against overflow\n\n\n handledCPCountPlusOne = handledCPCount + 1;\n\n if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n error('overflow');\n }\n\n delta += (m - n) * handledCPCountPlusOne;\n n = m;\n\n for (j = 0; j < inputLength; ++j) {\n currentValue = input[j];\n\n if (currentValue < n && ++delta > maxInt) {\n error('overflow');\n }\n\n if (currentValue == n) {\n // Represent delta as a generalized variable-length integer\n for (q = delta, k = base;;\n /* no condition */\n k += base) {\n t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;\n\n if (q < t) {\n break;\n }\n\n qMinusT = q - t;\n baseMinusT = base - t;\n output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)));\n q = floor(qMinusT / baseMinusT);\n }\n\n output.push(stringFromCharCode(digitToBasic(q, 0)));\n bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n delta = 0;\n ++handledCPCount;\n }\n }\n\n ++delta;\n ++n;\n }\n\n return output.join('');\n }\n /**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\n\n\n function toUnicode(input) {\n return mapDomain(input, function (string) {\n return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;\n });\n }\n /**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\n\n\n function toASCII(input) {\n return mapDomain(input, function (string) {\n return regexNonASCII.test(string) ? 'xn--' + encode(string) : string;\n });\n }\n /*--------------------------------------------------------------------------*/\n\n /** Define the public API */\n\n\n punycode = {\n /**\n * A string representing the current Punycode.js version number.\n * @memberOf punycode\n * @type String\n */\n 'version': '1.4.1',\n\n /**\n * An object of methods to convert from JavaScript's internal character\n * representation (UCS-2) to Unicode code points, and back.\n * @see \n * @memberOf punycode\n * @type Object\n */\n 'ucs2': {\n 'decode': ucs2decode,\n 'encode': ucs2encode\n },\n 'decode': decode,\n 'encode': encode,\n 'toASCII': toASCII,\n 'toUnicode': toUnicode\n };\n /** Expose `punycode` */\n // Some AMD build optimizers, like r.js, check for specific condition patterns\n // like the following:\n\n if ( true && _typeof(__webpack_require__(/*! !webpack amd options */ \"./node_modules/webpack/buildin/amd-options.js\")) == 'object' && __webpack_require__(/*! !webpack amd options */ \"./node_modules/webpack/buildin/amd-options.js\")) {\n !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {\n return punycode;\n }).call(exports, __webpack_require__, exports, module),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n } else if (freeExports && freeModule) {\n if (module.exports == freeExports) {\n // in Node.js, io.js, or RingoJS v0.8.0+\n freeModule.exports = punycode;\n } else {\n // in Narwhal or RingoJS v0.7.0-\n for (key in punycode) {\n punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);\n }\n }\n } else {\n // in Rhino or a web browser\n root.punycode = punycode;\n }\n})(this);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module), __webpack_require__(/*! ./../../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack:///./node_modules/node-libs-browser/node_modules/punycode/punycode.js?"); - -/***/ }), - -/***/ "./node_modules/orderedmap/index.es.js": -/*!*********************************************!*\ - !*** ./node_modules/orderedmap/index.es.js ***! - \*********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// ::- Persistent data structure representing an ordered mapping from\n// strings to values, with some convenient update methods.\nfunction OrderedMap(content) {\n this.content = content;\n}\n\nOrderedMap.prototype = {\n constructor: OrderedMap,\n find: function find(key) {\n for (var i = 0; i < this.content.length; i += 2) {\n if (this.content[i] === key) return i;\n }\n\n return -1;\n },\n // :: (string) → ?any\n // Retrieve the value stored under `key`, or return undefined when\n // no such key exists.\n get: function get(key) {\n var found = this.find(key);\n return found == -1 ? undefined : this.content[found + 1];\n },\n // :: (string, any, ?string) → OrderedMap\n // Create a new map by replacing the value of `key` with a new\n // value, or adding a binding to the end of the map. If `newKey` is\n // given, the key of the binding will be replaced with that key.\n update: function update(key, value, newKey) {\n var self = newKey && newKey != key ? this.remove(newKey) : this;\n var found = self.find(key),\n content = self.content.slice();\n\n if (found == -1) {\n content.push(newKey || key, value);\n } else {\n content[found + 1] = value;\n if (newKey) content[found] = newKey;\n }\n\n return new OrderedMap(content);\n },\n // :: (string) → OrderedMap\n // Return a map with the given key removed, if it existed.\n remove: function remove(key) {\n var found = this.find(key);\n if (found == -1) return this;\n var content = this.content.slice();\n content.splice(found, 2);\n return new OrderedMap(content);\n },\n // :: (string, any) → OrderedMap\n // Add a new key to the start of the map.\n addToStart: function addToStart(key, value) {\n return new OrderedMap([key, value].concat(this.remove(key).content));\n },\n // :: (string, any) → OrderedMap\n // Add a new key to the end of the map.\n addToEnd: function addToEnd(key, value) {\n var content = this.remove(key).content.slice();\n content.push(key, value);\n return new OrderedMap(content);\n },\n // :: (string, string, any) → OrderedMap\n // Add a key after the given key. If `place` is not found, the new\n // key is added to the end.\n addBefore: function addBefore(place, key, value) {\n var without = this.remove(key),\n content = without.content.slice();\n var found = without.find(place);\n content.splice(found == -1 ? content.length : found, 0, key, value);\n return new OrderedMap(content);\n },\n // :: ((key: string, value: any))\n // Call the given function for each key/value pair in the map, in\n // order.\n forEach: function forEach(f) {\n for (var i = 0; i < this.content.length; i += 2) {\n f(this.content[i], this.content[i + 1]);\n }\n },\n // :: (union) → OrderedMap\n // Create a new map by prepending the keys in this map that don't\n // appear in `map` before the keys in `map`.\n prepend: function prepend(map) {\n map = OrderedMap.from(map);\n if (!map.size) return this;\n return new OrderedMap(map.content.concat(this.subtract(map).content));\n },\n // :: (union) → OrderedMap\n // Create a new map by appending the keys in this map that don't\n // appear in `map` after the keys in `map`.\n append: function append(map) {\n map = OrderedMap.from(map);\n if (!map.size) return this;\n return new OrderedMap(this.subtract(map).content.concat(map.content));\n },\n // :: (union) → OrderedMap\n // Create a map containing all the keys in this map that don't\n // appear in `map`.\n subtract: function subtract(map) {\n var result = this;\n map = OrderedMap.from(map);\n\n for (var i = 0; i < map.content.length; i += 2) {\n result = result.remove(map.content[i]);\n }\n\n return result;\n },\n\n // :: number\n // The amount of keys in this map.\n get size() {\n return this.content.length >> 1;\n }\n\n}; // :: (?union) → OrderedMap\n// Return a map with the given content. If null, create an empty\n// map. If given an ordered map, return that map itself. If given an\n// object, create a map from the object's properties.\n\nOrderedMap.from = function (value) {\n if (value instanceof OrderedMap) return value;\n var content = [];\n if (value) for (var prop in value) {\n content.push(prop, value[prop]);\n }\n return new OrderedMap(content);\n};\n\nvar orderedmap = OrderedMap;\n/* harmony default export */ __webpack_exports__[\"default\"] = (orderedmap);\n\n//# sourceURL=webpack:///./node_modules/orderedmap/index.es.js?"); - -/***/ }), - -/***/ "./node_modules/prosemirror-commands/dist/index.es.js": -/*!************************************************************!*\ - !*** ./node_modules/prosemirror-commands/dist/index.es.js ***! - \************************************************************/ -/*! exports provided: autoJoin, baseKeymap, chainCommands, createParagraphNear, deleteSelection, exitCode, joinBackward, joinDown, joinForward, joinUp, lift, liftEmptyBlock, macBaseKeymap, newlineInCode, pcBaseKeymap, selectAll, selectNodeBackward, selectNodeForward, selectParentNode, setBlockType, splitBlock, splitBlockKeepMarks, toggleMark, wrapIn */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"autoJoin\", function() { return autoJoin; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"baseKeymap\", function() { return baseKeymap; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"chainCommands\", function() { return chainCommands; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createParagraphNear\", function() { return createParagraphNear; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"deleteSelection\", function() { return deleteSelection; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"exitCode\", function() { return exitCode; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"joinBackward\", function() { return joinBackward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"joinDown\", function() { return joinDown; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"joinForward\", function() { return joinForward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"joinUp\", function() { return joinUp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lift\", function() { return lift; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"liftEmptyBlock\", function() { return liftEmptyBlock; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"macBaseKeymap\", function() { return macBaseKeymap; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"newlineInCode\", function() { return newlineInCode; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"pcBaseKeymap\", function() { return pcBaseKeymap; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"selectAll\", function() { return selectAll; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"selectNodeBackward\", function() { return selectNodeBackward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"selectNodeForward\", function() { return selectNodeForward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"selectParentNode\", function() { return selectParentNode; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setBlockType\", function() { return setBlockType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"splitBlock\", function() { return splitBlock; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"splitBlockKeepMarks\", function() { return splitBlockKeepMarks; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"toggleMark\", function() { return toggleMark; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"wrapIn\", function() { return wrapIn; });\n/* harmony import */ var prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prosemirror-transform */ \"./node_modules/prosemirror-transform/dist/index.es.js\");\n/* harmony import */ var prosemirror_model__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prosemirror-model */ \"./node_modules/prosemirror-model/dist/index.es.js\");\n/* harmony import */ var prosemirror_state__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prosemirror-state */ \"./node_modules/prosemirror-state/dist/index.es.js\");\n\n\n // :: (EditorState, ?(tr: Transaction)) → bool\n// Delete the selection, if there is one.\n\nfunction deleteSelection(state, dispatch) {\n if (state.selection.empty) {\n return false;\n }\n\n if (dispatch) {\n dispatch(state.tr.deleteSelection().scrollIntoView());\n }\n\n return true;\n} // :: (EditorState, ?(tr: Transaction), ?EditorView) → bool\n// If the selection is empty and at the start of a textblock, try to\n// reduce the distance between that block and the one before it—if\n// there's a block directly before it that can be joined, join them.\n// If not, try to move the selected block closer to the next one in\n// the document structure by lifting it out of its parent or moving it\n// into a parent of the previous block. Will use the view for accurate\n// (bidi-aware) start-of-textblock detection if given.\n\n\nfunction joinBackward(state, dispatch, view) {\n var ref = state.selection;\n var $cursor = ref.$cursor;\n\n if (!$cursor || (view ? !view.endOfTextblock(\"backward\", state) : $cursor.parentOffset > 0)) {\n return false;\n }\n\n var $cut = findCutBefore($cursor); // If there is no node before this, try to lift\n\n if (!$cut) {\n var range = $cursor.blockRange(),\n target = range && Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"liftTarget\"])(range);\n\n if (target == null) {\n return false;\n }\n\n if (dispatch) {\n dispatch(state.tr.lift(range, target).scrollIntoView());\n }\n\n return true;\n }\n\n var before = $cut.nodeBefore; // Apply the joining algorithm\n\n if (!before.type.spec.isolating && deleteBarrier(state, $cut, dispatch)) {\n return true;\n } // If the node below has no content and the node above is\n // selectable, delete the node below and select the one above.\n\n\n if ($cursor.parent.content.size == 0 && (textblockAt(before, \"end\") || prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"NodeSelection\"].isSelectable(before))) {\n if (dispatch) {\n var tr = state.tr.deleteRange($cursor.before(), $cursor.after());\n tr.setSelection(textblockAt(before, \"end\") ? prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"Selection\"].findFrom(tr.doc.resolve(tr.mapping.map($cut.pos, -1)), -1) : prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"NodeSelection\"].create(tr.doc, $cut.pos - before.nodeSize));\n dispatch(tr.scrollIntoView());\n }\n\n return true;\n } // If the node before is an atom, delete it\n\n\n if (before.isAtom && $cut.depth == $cursor.depth - 1) {\n if (dispatch) {\n dispatch(state.tr[\"delete\"]($cut.pos - before.nodeSize, $cut.pos).scrollIntoView());\n }\n\n return true;\n }\n\n return false;\n}\n\nfunction textblockAt(node, side) {\n for (; node; node = side == \"start\" ? node.firstChild : node.lastChild) {\n if (node.isTextblock) {\n return true;\n }\n }\n\n return false;\n} // :: (EditorState, ?(tr: Transaction), ?EditorView) → bool\n// When the selection is empty and at the start of a textblock, select\n// the node before that textblock, if possible. This is intended to be\n// bound to keys like backspace, after\n// [`joinBackward`](#commands.joinBackward) or other deleting\n// commands, as a fall-back behavior when the schema doesn't allow\n// deletion at the selected point.\n\n\nfunction selectNodeBackward(state, dispatch, view) {\n var ref = state.selection;\n var $cursor = ref.$cursor;\n\n if (!$cursor || (view ? !view.endOfTextblock(\"backward\", state) : $cursor.parentOffset > 0)) {\n return false;\n }\n\n var $cut = findCutBefore($cursor),\n node = $cut && $cut.nodeBefore;\n\n if (!node || !prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"NodeSelection\"].isSelectable(node)) {\n return false;\n }\n\n if (dispatch) {\n dispatch(state.tr.setSelection(prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"NodeSelection\"].create(state.doc, $cut.pos - node.nodeSize)).scrollIntoView());\n }\n\n return true;\n}\n\nfunction findCutBefore($pos) {\n if (!$pos.parent.type.spec.isolating) {\n for (var i = $pos.depth - 1; i >= 0; i--) {\n if ($pos.index(i) > 0) {\n return $pos.doc.resolve($pos.before(i + 1));\n }\n\n if ($pos.node(i).type.spec.isolating) {\n break;\n }\n }\n }\n\n return null;\n} // :: (EditorState, ?(tr: Transaction), ?EditorView) → bool\n// If the selection is empty and the cursor is at the end of a\n// textblock, try to reduce or remove the boundary between that block\n// and the one after it, either by joining them or by moving the other\n// block closer to this one in the tree structure. Will use the view\n// for accurate start-of-textblock detection if given.\n\n\nfunction joinForward(state, dispatch, view) {\n var ref = state.selection;\n var $cursor = ref.$cursor;\n\n if (!$cursor || (view ? !view.endOfTextblock(\"forward\", state) : $cursor.parentOffset < $cursor.parent.content.size)) {\n return false;\n }\n\n var $cut = findCutAfter($cursor); // If there is no node after this, there's nothing to do\n\n if (!$cut) {\n return false;\n }\n\n var after = $cut.nodeAfter; // Try the joining algorithm\n\n if (deleteBarrier(state, $cut, dispatch)) {\n return true;\n } // If the node above has no content and the node below is\n // selectable, delete the node above and select the one below.\n\n\n if ($cursor.parent.content.size == 0 && (textblockAt(after, \"start\") || prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"NodeSelection\"].isSelectable(after))) {\n if (dispatch) {\n var tr = state.tr.deleteRange($cursor.before(), $cursor.after());\n tr.setSelection(textblockAt(after, \"start\") ? prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"Selection\"].findFrom(tr.doc.resolve(tr.mapping.map($cut.pos)), 1) : prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"NodeSelection\"].create(tr.doc, tr.mapping.map($cut.pos)));\n dispatch(tr.scrollIntoView());\n }\n\n return true;\n } // If the next node is an atom, delete it\n\n\n if (after.isAtom && $cut.depth == $cursor.depth - 1) {\n if (dispatch) {\n dispatch(state.tr[\"delete\"]($cut.pos, $cut.pos + after.nodeSize).scrollIntoView());\n }\n\n return true;\n }\n\n return false;\n} // :: (EditorState, ?(tr: Transaction), ?EditorView) → bool\n// When the selection is empty and at the end of a textblock, select\n// the node coming after that textblock, if possible. This is intended\n// to be bound to keys like delete, after\n// [`joinForward`](#commands.joinForward) and similar deleting\n// commands, to provide a fall-back behavior when the schema doesn't\n// allow deletion at the selected point.\n\n\nfunction selectNodeForward(state, dispatch, view) {\n var ref = state.selection;\n var $cursor = ref.$cursor;\n\n if (!$cursor || (view ? !view.endOfTextblock(\"forward\", state) : $cursor.parentOffset < $cursor.parent.content.size)) {\n return false;\n }\n\n var $cut = findCutAfter($cursor),\n node = $cut && $cut.nodeAfter;\n\n if (!node || !prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"NodeSelection\"].isSelectable(node)) {\n return false;\n }\n\n if (dispatch) {\n dispatch(state.tr.setSelection(prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"NodeSelection\"].create(state.doc, $cut.pos)).scrollIntoView());\n }\n\n return true;\n}\n\nfunction findCutAfter($pos) {\n if (!$pos.parent.type.spec.isolating) {\n for (var i = $pos.depth - 1; i >= 0; i--) {\n var parent = $pos.node(i);\n\n if ($pos.index(i) + 1 < parent.childCount) {\n return $pos.doc.resolve($pos.after(i + 1));\n }\n\n if (parent.type.spec.isolating) {\n break;\n }\n }\n }\n\n return null;\n} // :: (EditorState, ?(tr: Transaction)) → bool\n// Join the selected block or, if there is a text selection, the\n// closest ancestor block of the selection that can be joined, with\n// the sibling above it.\n\n\nfunction joinUp(state, dispatch) {\n var sel = state.selection,\n nodeSel = sel instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"NodeSelection\"],\n point;\n\n if (nodeSel) {\n if (sel.node.isTextblock || !Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"canJoin\"])(state.doc, sel.from)) {\n return false;\n }\n\n point = sel.from;\n } else {\n point = Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"joinPoint\"])(state.doc, sel.from, -1);\n\n if (point == null) {\n return false;\n }\n }\n\n if (dispatch) {\n var tr = state.tr.join(point);\n\n if (nodeSel) {\n tr.setSelection(prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"NodeSelection\"].create(tr.doc, point - state.doc.resolve(point).nodeBefore.nodeSize));\n }\n\n dispatch(tr.scrollIntoView());\n }\n\n return true;\n} // :: (EditorState, ?(tr: Transaction)) → bool\n// Join the selected block, or the closest ancestor of the selection\n// that can be joined, with the sibling after it.\n\n\nfunction joinDown(state, dispatch) {\n var sel = state.selection,\n point;\n\n if (sel instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"NodeSelection\"]) {\n if (sel.node.isTextblock || !Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"canJoin\"])(state.doc, sel.to)) {\n return false;\n }\n\n point = sel.to;\n } else {\n point = Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"joinPoint\"])(state.doc, sel.to, 1);\n\n if (point == null) {\n return false;\n }\n }\n\n if (dispatch) {\n dispatch(state.tr.join(point).scrollIntoView());\n }\n\n return true;\n} // :: (EditorState, ?(tr: Transaction)) → bool\n// Lift the selected block, or the closest ancestor block of the\n// selection that can be lifted, out of its parent node.\n\n\nfunction lift(state, dispatch) {\n var ref = state.selection;\n var $from = ref.$from;\n var $to = ref.$to;\n var range = $from.blockRange($to),\n target = range && Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"liftTarget\"])(range);\n\n if (target == null) {\n return false;\n }\n\n if (dispatch) {\n dispatch(state.tr.lift(range, target).scrollIntoView());\n }\n\n return true;\n} // :: (EditorState, ?(tr: Transaction)) → bool\n// If the selection is in a node whose type has a truthy\n// [`code`](#model.NodeSpec.code) property in its spec, replace the\n// selection with a newline character.\n\n\nfunction newlineInCode(state, dispatch) {\n var ref = state.selection;\n var $head = ref.$head;\n var $anchor = ref.$anchor;\n\n if (!$head.parent.type.spec.code || !$head.sameParent($anchor)) {\n return false;\n }\n\n if (dispatch) {\n dispatch(state.tr.insertText(\"\\n\").scrollIntoView());\n }\n\n return true;\n}\n\nfunction defaultBlockAt(match) {\n for (var i = 0; i < match.edgeCount; i++) {\n var ref = match.edge(i);\n var type = ref.type;\n\n if (type.isTextblock && !type.hasRequiredAttrs()) {\n return type;\n }\n }\n\n return null;\n} // :: (EditorState, ?(tr: Transaction)) → bool\n// When the selection is in a node with a truthy\n// [`code`](#model.NodeSpec.code) property in its spec, create a\n// default block after the code block, and move the cursor there.\n\n\nfunction exitCode(state, dispatch) {\n var ref = state.selection;\n var $head = ref.$head;\n var $anchor = ref.$anchor;\n\n if (!$head.parent.type.spec.code || !$head.sameParent($anchor)) {\n return false;\n }\n\n var above = $head.node(-1),\n after = $head.indexAfter(-1),\n type = defaultBlockAt(above.contentMatchAt(after));\n\n if (!above.canReplaceWith(after, after, type)) {\n return false;\n }\n\n if (dispatch) {\n var pos = $head.after(),\n tr = state.tr.replaceWith(pos, pos, type.createAndFill());\n tr.setSelection(prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"Selection\"].near(tr.doc.resolve(pos), 1));\n dispatch(tr.scrollIntoView());\n }\n\n return true;\n} // :: (EditorState, ?(tr: Transaction)) → bool\n// If a block node is selected, create an empty paragraph before (if\n// it is its parent's first child) or after it.\n\n\nfunction createParagraphNear(state, dispatch) {\n var ref = state.selection;\n var $from = ref.$from;\n var $to = ref.$to;\n\n if ($from.parent.inlineContent || $to.parent.inlineContent) {\n return false;\n }\n\n var type = defaultBlockAt($from.parent.contentMatchAt($to.indexAfter()));\n\n if (!type || !type.isTextblock) {\n return false;\n }\n\n if (dispatch) {\n var side = (!$from.parentOffset && $to.index() < $to.parent.childCount ? $from : $to).pos;\n var tr = state.tr.insert(side, type.createAndFill());\n tr.setSelection(prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"TextSelection\"].create(tr.doc, side + 1));\n dispatch(tr.scrollIntoView());\n }\n\n return true;\n} // :: (EditorState, ?(tr: Transaction)) → bool\n// If the cursor is in an empty textblock that can be lifted, lift the\n// block.\n\n\nfunction liftEmptyBlock(state, dispatch) {\n var ref = state.selection;\n var $cursor = ref.$cursor;\n\n if (!$cursor || $cursor.parent.content.size) {\n return false;\n }\n\n if ($cursor.depth > 1 && $cursor.after() != $cursor.end(-1)) {\n var before = $cursor.before();\n\n if (Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"canSplit\"])(state.doc, before)) {\n if (dispatch) {\n dispatch(state.tr.split(before).scrollIntoView());\n }\n\n return true;\n }\n }\n\n var range = $cursor.blockRange(),\n target = range && Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"liftTarget\"])(range);\n\n if (target == null) {\n return false;\n }\n\n if (dispatch) {\n dispatch(state.tr.lift(range, target).scrollIntoView());\n }\n\n return true;\n} // :: (EditorState, ?(tr: Transaction)) → bool\n// Split the parent block of the selection. If the selection is a text\n// selection, also delete its content.\n\n\nfunction splitBlock(state, dispatch) {\n var ref = state.selection;\n var $from = ref.$from;\n var $to = ref.$to;\n\n if (state.selection instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"NodeSelection\"] && state.selection.node.isBlock) {\n if (!$from.parentOffset || !Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"canSplit\"])(state.doc, $from.pos)) {\n return false;\n }\n\n if (dispatch) {\n dispatch(state.tr.split($from.pos).scrollIntoView());\n }\n\n return true;\n }\n\n if (!$from.parent.isBlock) {\n return false;\n }\n\n if (dispatch) {\n var atEnd = $to.parentOffset == $to.parent.content.size;\n var tr = state.tr;\n\n if (state.selection instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"TextSelection\"]) {\n tr.deleteSelection();\n }\n\n var deflt = $from.depth == 0 ? null : defaultBlockAt($from.node(-1).contentMatchAt($from.indexAfter(-1)));\n var types = atEnd && deflt ? [{\n type: deflt\n }] : null;\n var can = Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"canSplit\"])(tr.doc, tr.mapping.map($from.pos), 1, types);\n\n if (!types && !can && Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"canSplit\"])(tr.doc, tr.mapping.map($from.pos), 1, deflt && [{\n type: deflt\n }])) {\n types = [{\n type: deflt\n }];\n can = true;\n }\n\n if (can) {\n tr.split(tr.mapping.map($from.pos), 1, types);\n\n if (!atEnd && !$from.parentOffset && $from.parent.type != deflt && $from.node(-1).canReplace($from.index(-1), $from.indexAfter(-1), prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(deflt.create(), $from.parent))) {\n tr.setNodeMarkup(tr.mapping.map($from.before()), deflt);\n }\n }\n\n dispatch(tr.scrollIntoView());\n }\n\n return true;\n} // :: (EditorState, ?(tr: Transaction)) → bool\n// Acts like [`splitBlock`](#commands.splitBlock), but without\n// resetting the set of active marks at the cursor.\n\n\nfunction splitBlockKeepMarks(state, dispatch) {\n return splitBlock(state, dispatch && function (tr) {\n var marks = state.storedMarks || state.selection.$to.parentOffset && state.selection.$from.marks();\n\n if (marks) {\n tr.ensureMarks(marks);\n }\n\n dispatch(tr);\n });\n} // :: (EditorState, ?(tr: Transaction)) → bool\n// Move the selection to the node wrapping the current selection, if\n// any. (Will not select the document node.)\n\n\nfunction selectParentNode(state, dispatch) {\n var ref = state.selection;\n var $from = ref.$from;\n var to = ref.to;\n var pos;\n var same = $from.sharedDepth(to);\n\n if (same == 0) {\n return false;\n }\n\n pos = $from.before(same);\n\n if (dispatch) {\n dispatch(state.tr.setSelection(prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"NodeSelection\"].create(state.doc, pos)));\n }\n\n return true;\n} // :: (EditorState, ?(tr: Transaction)) → bool\n// Select the whole document.\n\n\nfunction selectAll(state, dispatch) {\n if (dispatch) {\n dispatch(state.tr.setSelection(new prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"AllSelection\"](state.doc)));\n }\n\n return true;\n}\n\nfunction joinMaybeClear(state, $pos, dispatch) {\n var before = $pos.nodeBefore,\n after = $pos.nodeAfter,\n index = $pos.index();\n\n if (!before || !after || !before.type.compatibleContent(after.type)) {\n return false;\n }\n\n if (!before.content.size && $pos.parent.canReplace(index - 1, index)) {\n if (dispatch) {\n dispatch(state.tr[\"delete\"]($pos.pos - before.nodeSize, $pos.pos).scrollIntoView());\n }\n\n return true;\n }\n\n if (!$pos.parent.canReplace(index, index + 1) || !(after.isTextblock || Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"canJoin\"])(state.doc, $pos.pos))) {\n return false;\n }\n\n if (dispatch) {\n dispatch(state.tr.clearIncompatible($pos.pos, before.type, before.contentMatchAt(before.childCount)).join($pos.pos).scrollIntoView());\n }\n\n return true;\n}\n\nfunction deleteBarrier(state, $cut, dispatch) {\n var before = $cut.nodeBefore,\n after = $cut.nodeAfter,\n conn,\n match;\n\n if (before.type.spec.isolating || after.type.spec.isolating) {\n return false;\n }\n\n if (joinMaybeClear(state, $cut, dispatch)) {\n return true;\n }\n\n if ($cut.parent.canReplace($cut.index(), $cut.index() + 1) && (conn = (match = before.contentMatchAt(before.childCount)).findWrapping(after.type)) && match.matchType(conn[0] || after.type).validEnd) {\n if (dispatch) {\n var end = $cut.pos + after.nodeSize,\n wrap = prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].empty;\n\n for (var i = conn.length - 1; i >= 0; i--) {\n wrap = prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(conn[i].create(null, wrap));\n }\n\n wrap = prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(before.copy(wrap));\n var tr = state.tr.step(new prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"ReplaceAroundStep\"]($cut.pos - 1, end, $cut.pos, end, new prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Slice\"](wrap, 1, 0), conn.length, true));\n var joinAt = end + 2 * conn.length;\n\n if (Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"canJoin\"])(tr.doc, joinAt)) {\n tr.join(joinAt);\n }\n\n dispatch(tr.scrollIntoView());\n }\n\n return true;\n }\n\n var selAfter = prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"Selection\"].findFrom($cut, 1);\n var range = selAfter && selAfter.$from.blockRange(selAfter.$to),\n target = range && Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"liftTarget\"])(range);\n\n if (target != null && target >= $cut.depth) {\n if (dispatch) {\n dispatch(state.tr.lift(range, target).scrollIntoView());\n }\n\n return true;\n }\n\n return false;\n} // Parameterized commands\n// :: (NodeType, ?Object) → (state: EditorState, dispatch: ?(tr: Transaction)) → bool\n// Wrap the selection in a node of the given type with the given\n// attributes.\n\n\nfunction wrapIn(nodeType, attrs) {\n return function (state, dispatch) {\n var ref = state.selection;\n var $from = ref.$from;\n var $to = ref.$to;\n var range = $from.blockRange($to),\n wrapping = range && Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"findWrapping\"])(range, nodeType, attrs);\n\n if (!wrapping) {\n return false;\n }\n\n if (dispatch) {\n dispatch(state.tr.wrap(range, wrapping).scrollIntoView());\n }\n\n return true;\n };\n} // :: (NodeType, ?Object) → (state: EditorState, dispatch: ?(tr: Transaction)) → bool\n// Returns a command that tries to set the selected textblocks to the\n// given node type with the given attributes.\n\n\nfunction setBlockType(nodeType, attrs) {\n return function (state, dispatch) {\n var ref = state.selection;\n var from = ref.from;\n var to = ref.to;\n var applicable = false;\n state.doc.nodesBetween(from, to, function (node, pos) {\n if (applicable) {\n return false;\n }\n\n if (!node.isTextblock || node.hasMarkup(nodeType, attrs)) {\n return;\n }\n\n if (node.type == nodeType) {\n applicable = true;\n } else {\n var $pos = state.doc.resolve(pos),\n index = $pos.index();\n applicable = $pos.parent.canReplaceWith(index, index + 1, nodeType);\n }\n });\n\n if (!applicable) {\n return false;\n }\n\n if (dispatch) {\n dispatch(state.tr.setBlockType(from, to, nodeType, attrs).scrollIntoView());\n }\n\n return true;\n };\n}\n\nfunction markApplies(doc, ranges, type) {\n var loop = function loop(i) {\n var ref = ranges[i];\n var $from = ref.$from;\n var $to = ref.$to;\n var can = $from.depth == 0 ? doc.type.allowsMarkType(type) : false;\n doc.nodesBetween($from.pos, $to.pos, function (node) {\n if (can) {\n return false;\n }\n\n can = node.inlineContent && node.type.allowsMarkType(type);\n });\n\n if (can) {\n return {\n v: true\n };\n }\n };\n\n for (var i = 0; i < ranges.length; i++) {\n var returned = loop(i);\n if (returned) return returned.v;\n }\n\n return false;\n} // :: (MarkType, ?Object) → (state: EditorState, dispatch: ?(tr: Transaction)) → bool\n// Create a command function that toggles the given mark with the\n// given attributes. Will return `false` when the current selection\n// doesn't support that mark. This will remove the mark if any marks\n// of that type exist in the selection, or add it otherwise. If the\n// selection is empty, this applies to the [stored\n// marks](#state.EditorState.storedMarks) instead of a range of the\n// document.\n\n\nfunction toggleMark(markType, attrs) {\n return function (state, dispatch) {\n var ref = state.selection;\n var empty = ref.empty;\n var $cursor = ref.$cursor;\n var ranges = ref.ranges;\n\n if (empty && !$cursor || !markApplies(state.doc, ranges, markType)) {\n return false;\n }\n\n if (dispatch) {\n if ($cursor) {\n if (markType.isInSet(state.storedMarks || $cursor.marks())) {\n dispatch(state.tr.removeStoredMark(markType));\n } else {\n dispatch(state.tr.addStoredMark(markType.create(attrs)));\n }\n } else {\n var has = false,\n tr = state.tr;\n\n for (var i = 0; !has && i < ranges.length; i++) {\n var ref$1 = ranges[i];\n var $from = ref$1.$from;\n var $to = ref$1.$to;\n has = state.doc.rangeHasMark($from.pos, $to.pos, markType);\n }\n\n for (var i$1 = 0; i$1 < ranges.length; i$1++) {\n var ref$2 = ranges[i$1];\n var $from$1 = ref$2.$from;\n var $to$1 = ref$2.$to;\n\n if (has) {\n tr.removeMark($from$1.pos, $to$1.pos, markType);\n } else {\n tr.addMark($from$1.pos, $to$1.pos, markType.create(attrs));\n }\n }\n\n dispatch(tr.scrollIntoView());\n }\n }\n\n return true;\n };\n}\n\nfunction wrapDispatchForJoin(dispatch, isJoinable) {\n return function (tr) {\n if (!tr.isGeneric) {\n return dispatch(tr);\n }\n\n var ranges = [];\n\n for (var i = 0; i < tr.mapping.maps.length; i++) {\n var map = tr.mapping.maps[i];\n\n for (var j = 0; j < ranges.length; j++) {\n ranges[j] = map.map(ranges[j]);\n }\n\n map.forEach(function (_s, _e, from, to) {\n return ranges.push(from, to);\n });\n } // Figure out which joinable points exist inside those ranges,\n // by checking all node boundaries in their parent nodes.\n\n\n var joinable = [];\n\n for (var i$1 = 0; i$1 < ranges.length; i$1 += 2) {\n var from = ranges[i$1],\n to = ranges[i$1 + 1];\n var $from = tr.doc.resolve(from),\n depth = $from.sharedDepth(to),\n parent = $from.node(depth);\n\n for (var index = $from.indexAfter(depth), pos = $from.after(depth + 1); pos <= to; ++index) {\n var after = parent.maybeChild(index);\n\n if (!after) {\n break;\n }\n\n if (index && joinable.indexOf(pos) == -1) {\n var before = parent.child(index - 1);\n\n if (before.type == after.type && isJoinable(before, after)) {\n joinable.push(pos);\n }\n }\n\n pos += after.nodeSize;\n }\n } // Join the joinable points\n\n\n joinable.sort(function (a, b) {\n return a - b;\n });\n\n for (var i$2 = joinable.length - 1; i$2 >= 0; i$2--) {\n if (Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"canJoin\"])(tr.doc, joinable[i$2])) {\n tr.join(joinable[i$2]);\n }\n }\n\n dispatch(tr);\n };\n} // :: ((state: EditorState, ?(tr: Transaction)) → bool, union<(before: Node, after: Node) → bool, [string]>) → (state: EditorState, ?(tr: Transaction)) → bool\n// Wrap a command so that, when it produces a transform that causes\n// two joinable nodes to end up next to each other, those are joined.\n// Nodes are considered joinable when they are of the same type and\n// when the `isJoinable` predicate returns true for them or, if an\n// array of strings was passed, if their node type name is in that\n// array.\n\n\nfunction autoJoin(command, isJoinable) {\n if (Array.isArray(isJoinable)) {\n var types = isJoinable;\n\n isJoinable = function isJoinable(node) {\n return types.indexOf(node.type.name) > -1;\n };\n }\n\n return function (state, dispatch) {\n return command(state, dispatch && wrapDispatchForJoin(dispatch, isJoinable));\n };\n} // :: (...[(EditorState, ?(tr: Transaction), ?EditorView) → bool]) → (EditorState, ?(tr: Transaction), ?EditorView) → bool\n// Combine a number of command functions into a single function (which\n// calls them one by one until one returns true).\n\n\nfunction chainCommands() {\n var commands = [],\n len = arguments.length;\n\n while (len--) {\n commands[len] = arguments[len];\n }\n\n return function (state, dispatch, view) {\n for (var i = 0; i < commands.length; i++) {\n if (commands[i](state, dispatch, view)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nvar backspace = chainCommands(deleteSelection, joinBackward, selectNodeBackward);\nvar del = chainCommands(deleteSelection, joinForward, selectNodeForward); // :: Object\n// A basic keymap containing bindings not specific to any schema.\n// Binds the following keys (when multiple commands are listed, they\n// are chained with [`chainCommands`](#commands.chainCommands)):\n//\n// * **Enter** to `newlineInCode`, `createParagraphNear`, `liftEmptyBlock`, `splitBlock`\n// * **Mod-Enter** to `exitCode`\n// * **Backspace** and **Mod-Backspace** to `deleteSelection`, `joinBackward`, `selectNodeBackward`\n// * **Delete** and **Mod-Delete** to `deleteSelection`, `joinForward`, `selectNodeForward`\n// * **Mod-Delete** to `deleteSelection`, `joinForward`, `selectNodeForward`\n// * **Mod-a** to `selectAll`\n\nvar pcBaseKeymap = {\n \"Enter\": chainCommands(newlineInCode, createParagraphNear, liftEmptyBlock, splitBlock),\n \"Mod-Enter\": exitCode,\n \"Backspace\": backspace,\n \"Mod-Backspace\": backspace,\n \"Delete\": del,\n \"Mod-Delete\": del,\n \"Mod-a\": selectAll\n}; // :: Object\n// A copy of `pcBaseKeymap` that also binds **Ctrl-h** like Backspace,\n// **Ctrl-d** like Delete, **Alt-Backspace** like Ctrl-Backspace, and\n// **Ctrl-Alt-Backspace**, **Alt-Delete**, and **Alt-d** like\n// Ctrl-Delete.\n\nvar macBaseKeymap = {\n \"Ctrl-h\": pcBaseKeymap[\"Backspace\"],\n \"Alt-Backspace\": pcBaseKeymap[\"Mod-Backspace\"],\n \"Ctrl-d\": pcBaseKeymap[\"Delete\"],\n \"Ctrl-Alt-Backspace\": pcBaseKeymap[\"Mod-Delete\"],\n \"Alt-Delete\": pcBaseKeymap[\"Mod-Delete\"],\n \"Alt-d\": pcBaseKeymap[\"Mod-Delete\"]\n};\n\nfor (var key in pcBaseKeymap) {\n macBaseKeymap[key] = pcBaseKeymap[key];\n} // declare global: os, navigator\n\n\nvar mac = typeof navigator != \"undefined\" ? /Mac/.test(navigator.platform) : typeof os != \"undefined\" ? os.platform() == \"darwin\" : false; // :: Object\n// Depending on the detected platform, this will hold\n// [`pcBasekeymap`](#commands.pcBaseKeymap) or\n// [`macBaseKeymap`](#commands.macBaseKeymap).\n\nvar baseKeymap = mac ? macBaseKeymap : pcBaseKeymap;\n\n\n//# sourceURL=webpack:///./node_modules/prosemirror-commands/dist/index.es.js?"); - -/***/ }), - -/***/ "./node_modules/prosemirror-dropcursor/dist/index.es.js": -/*!**************************************************************!*\ - !*** ./node_modules/prosemirror-dropcursor/dist/index.es.js ***! - \**************************************************************/ -/*! exports provided: dropCursor */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"dropCursor\", function() { return dropCursor; });\n/* harmony import */ var prosemirror_state__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prosemirror-state */ \"./node_modules/prosemirror-state/dist/index.es.js\");\n/* harmony import */ var prosemirror_transform__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prosemirror-transform */ \"./node_modules/prosemirror-transform/dist/index.es.js\");\n\n // :: (options: ?Object) → Plugin\n// Create a plugin that, when added to a ProseMirror instance,\n// causes a decoration to show up at the drop position when something\n// is dragged over the editor.\n//\n// options::- These options are supported:\n//\n// color:: ?string\n// The color of the cursor. Defaults to `black`.\n//\n// width:: ?number\n// The precise width of the cursor in pixels. Defaults to 1.\n//\n// class:: ?string\n// A CSS class name to add to the cursor element.\n\nfunction dropCursor(options) {\n if (options === void 0) options = {};\n return new prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"Plugin\"]({\n view: function view(editorView) {\n return new DropCursorView(editorView, options);\n }\n });\n}\n\nvar DropCursorView = function DropCursorView(editorView, options) {\n var this$1 = this;\n this.editorView = editorView;\n this.width = options.width || 1;\n this.color = options.color || \"black\";\n this[\"class\"] = options[\"class\"];\n this.cursorPos = null;\n this.element = null;\n this.timeout = null;\n this.handlers = [\"dragover\", \"dragend\", \"drop\", \"dragleave\"].map(function (name) {\n var handler = function handler(e) {\n return this$1[name](e);\n };\n\n editorView.dom.addEventListener(name, handler);\n return {\n name: name,\n handler: handler\n };\n });\n};\n\nDropCursorView.prototype.destroy = function destroy() {\n var this$1 = this;\n this.handlers.forEach(function (ref) {\n var name = ref.name;\n var handler = ref.handler;\n return this$1.editorView.dom.removeEventListener(name, handler);\n });\n};\n\nDropCursorView.prototype.update = function update(editorView, prevState) {\n if (this.cursorPos != null && prevState.doc != editorView.state.doc) {\n this.updateOverlay();\n }\n};\n\nDropCursorView.prototype.setCursor = function setCursor(pos) {\n if (pos == this.cursorPos) {\n return;\n }\n\n this.cursorPos = pos;\n\n if (pos == null) {\n this.element.parentNode.removeChild(this.element);\n this.element = null;\n } else {\n this.updateOverlay();\n }\n};\n\nDropCursorView.prototype.updateOverlay = function updateOverlay() {\n var $pos = this.editorView.state.doc.resolve(this.cursorPos),\n rect;\n\n if (!$pos.parent.inlineContent) {\n var before = $pos.nodeBefore,\n after = $pos.nodeAfter;\n\n if (before || after) {\n var nodeRect = this.editorView.nodeDOM(this.cursorPos - (before ? before.nodeSize : 0)).getBoundingClientRect();\n var top = before ? nodeRect.bottom : nodeRect.top;\n\n if (before && after) {\n top = (top + this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top) / 2;\n }\n\n rect = {\n left: nodeRect.left,\n right: nodeRect.right,\n top: top - this.width / 2,\n bottom: top + this.width / 2\n };\n }\n }\n\n if (!rect) {\n var coords = this.editorView.coordsAtPos(this.cursorPos);\n rect = {\n left: coords.left - this.width / 2,\n right: coords.left + this.width / 2,\n top: coords.top,\n bottom: coords.bottom\n };\n }\n\n var parent = this.editorView.dom.offsetParent;\n\n if (!this.element) {\n this.element = parent.appendChild(document.createElement(\"div\"));\n\n if (this[\"class\"]) {\n this.element.className = this[\"class\"];\n }\n\n this.element.style.cssText = \"position: absolute; z-index: 50; pointer-events: none; background-color: \" + this.color;\n }\n\n var parentRect = !parent || parent == document.body && getComputedStyle(parent).position == \"static\" ? {\n left: -pageXOffset,\n top: -pageYOffset\n } : parent.getBoundingClientRect();\n this.element.style.left = rect.left - parentRect.left + \"px\";\n this.element.style.top = rect.top - parentRect.top + \"px\";\n this.element.style.width = rect.right - rect.left + \"px\";\n this.element.style.height = rect.bottom - rect.top + \"px\";\n};\n\nDropCursorView.prototype.scheduleRemoval = function scheduleRemoval(timeout) {\n var this$1 = this;\n clearTimeout(this.timeout);\n this.timeout = setTimeout(function () {\n return this$1.setCursor(null);\n }, timeout);\n};\n\nDropCursorView.prototype.dragover = function dragover(event) {\n if (!this.editorView.editable) {\n return;\n }\n\n var pos = this.editorView.posAtCoords({\n left: event.clientX,\n top: event.clientY\n });\n\n if (pos) {\n var target = pos.pos;\n\n if (this.editorView.dragging && this.editorView.dragging.slice) {\n target = Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_1__[\"dropPoint\"])(this.editorView.state.doc, target, this.editorView.dragging.slice);\n\n if (target == null) {\n target = pos.pos;\n }\n }\n\n this.setCursor(target);\n this.scheduleRemoval(5000);\n }\n};\n\nDropCursorView.prototype.dragend = function dragend() {\n this.scheduleRemoval(20);\n};\n\nDropCursorView.prototype.drop = function drop() {\n this.scheduleRemoval(20);\n};\n\nDropCursorView.prototype.dragleave = function dragleave(event) {\n if (event.target == this.editorView.dom || !this.editorView.dom.contains(event.relatedTarget)) {\n this.setCursor(null);\n }\n};\n\n\n\n//# sourceURL=webpack:///./node_modules/prosemirror-dropcursor/dist/index.es.js?"); - -/***/ }), - -/***/ "./node_modules/prosemirror-example-setup/dist/index.es.js": -/*!*****************************************************************!*\ - !*** ./node_modules/prosemirror-example-setup/dist/index.es.js ***! - \*****************************************************************/ -/*! exports provided: buildInputRules, buildKeymap, buildMenuItems, exampleSetup */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"buildInputRules\", function() { return buildInputRules; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"buildKeymap\", function() { return buildKeymap; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"buildMenuItems\", function() { return buildMenuItems; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"exampleSetup\", function() { return exampleSetup; });\n/* harmony import */ var prosemirror_keymap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prosemirror-keymap */ \"./node_modules/prosemirror-keymap/dist/index.es.js\");\n/* harmony import */ var prosemirror_history__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prosemirror-history */ \"./node_modules/prosemirror-history/dist/index.es.js\");\n/* harmony import */ var prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prosemirror-commands */ \"./node_modules/prosemirror-commands/dist/index.es.js\");\n/* harmony import */ var prosemirror_state__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prosemirror-state */ \"./node_modules/prosemirror-state/dist/index.es.js\");\n/* harmony import */ var prosemirror_dropcursor__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prosemirror-dropcursor */ \"./node_modules/prosemirror-dropcursor/dist/index.es.js\");\n/* harmony import */ var prosemirror_gapcursor__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! prosemirror-gapcursor */ \"./node_modules/prosemirror-gapcursor/dist/index.es.js\");\n/* harmony import */ var prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! prosemirror-menu */ \"./node_modules/prosemirror-menu/dist/index.es.js\");\n/* harmony import */ var prosemirror_schema_list__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! prosemirror-schema-list */ \"./node_modules/prosemirror-schema-list/dist/index.es.js\");\n/* harmony import */ var prosemirror_inputrules__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! prosemirror-inputrules */ \"./node_modules/prosemirror-inputrules/dist/index.es.js\");\n\n\n\n\n\n\n\n\n\nvar prefix = \"ProseMirror-prompt\";\n\nfunction openPrompt(options) {\n var wrapper = document.body.appendChild(document.createElement(\"div\"));\n wrapper.className = prefix;\n\n var mouseOutside = function mouseOutside(e) {\n if (!wrapper.contains(e.target)) {\n close();\n }\n };\n\n setTimeout(function () {\n return window.addEventListener(\"mousedown\", mouseOutside);\n }, 50);\n\n var close = function close() {\n window.removeEventListener(\"mousedown\", mouseOutside);\n\n if (wrapper.parentNode) {\n wrapper.parentNode.removeChild(wrapper);\n }\n };\n\n var domFields = [];\n\n for (var name in options.fields) {\n domFields.push(options.fields[name].render());\n }\n\n var submitButton = document.createElement(\"button\");\n submitButton.type = \"submit\";\n submitButton.className = prefix + \"-submit\";\n submitButton.textContent = \"OK\";\n var cancelButton = document.createElement(\"button\");\n cancelButton.type = \"button\";\n cancelButton.className = prefix + \"-cancel\";\n cancelButton.textContent = \"Cancel\";\n cancelButton.addEventListener(\"click\", close);\n var form = wrapper.appendChild(document.createElement(\"form\"));\n\n if (options.title) {\n form.appendChild(document.createElement(\"h5\")).textContent = options.title;\n }\n\n domFields.forEach(function (field) {\n form.appendChild(document.createElement(\"div\")).appendChild(field);\n });\n var buttons = form.appendChild(document.createElement(\"div\"));\n buttons.className = prefix + \"-buttons\";\n buttons.appendChild(submitButton);\n buttons.appendChild(document.createTextNode(\" \"));\n buttons.appendChild(cancelButton);\n var box = wrapper.getBoundingClientRect();\n wrapper.style.top = (window.innerHeight - box.height) / 2 + \"px\";\n wrapper.style.left = (window.innerWidth - box.width) / 2 + \"px\";\n\n var submit = function submit() {\n var params = getValues(options.fields, domFields);\n\n if (params) {\n close();\n options.callback(params);\n }\n };\n\n form.addEventListener(\"submit\", function (e) {\n e.preventDefault();\n submit();\n });\n form.addEventListener(\"keydown\", function (e) {\n if (e.keyCode == 27) {\n e.preventDefault();\n close();\n } else if (e.keyCode == 13 && !(e.ctrlKey || e.metaKey || e.shiftKey)) {\n e.preventDefault();\n submit();\n } else if (e.keyCode == 9) {\n window.setTimeout(function () {\n if (!wrapper.contains(document.activeElement)) {\n close();\n }\n }, 500);\n }\n });\n var input = form.elements[0];\n\n if (input) {\n input.focus();\n }\n}\n\nfunction getValues(fields, domFields) {\n var result = Object.create(null),\n i = 0;\n\n for (var name in fields) {\n var field = fields[name],\n dom = domFields[i++];\n var value = field.read(dom),\n bad = field.validate(value);\n\n if (bad) {\n reportInvalid(dom, bad);\n return null;\n }\n\n result[name] = field.clean(value);\n }\n\n return result;\n}\n\nfunction reportInvalid(dom, message) {\n // FIXME this is awful and needs a lot more work\n var parent = dom.parentNode;\n var msg = parent.appendChild(document.createElement(\"div\"));\n msg.style.left = dom.offsetLeft + dom.offsetWidth + 2 + \"px\";\n msg.style.top = dom.offsetTop - 5 + \"px\";\n msg.className = \"ProseMirror-invalid\";\n msg.textContent = message;\n setTimeout(function () {\n return parent.removeChild(msg);\n }, 1500);\n} // ::- The type of field that `FieldPrompt` expects to be passed to it.\n\n\nvar Field = function Field(options) {\n this.options = options;\n}; // render:: (state: EditorState, props: Object) → dom.Node\n// Render the field to the DOM. Should be implemented by all subclasses.\n// :: (dom.Node) → any\n// Read the field's value from its DOM node.\n\n\nField.prototype.read = function read(dom) {\n return dom.value;\n}; // :: (any) → ?string\n// A field-type-specific validation function.\n\n\nField.prototype.validateType = function validateType(_value) {};\n\nField.prototype.validate = function validate(value) {\n if (!value && this.options.required) {\n return \"Required field\";\n }\n\n return this.validateType(value) || this.options.validate && this.options.validate(value);\n};\n\nField.prototype.clean = function clean(value) {\n return this.options.clean ? this.options.clean(value) : value;\n}; // ::- A field class for single-line text fields.\n\n\nvar TextField = /*@__PURE__*/function (Field) {\n function TextField() {\n Field.apply(this, arguments);\n }\n\n if (Field) TextField.__proto__ = Field;\n TextField.prototype = Object.create(Field && Field.prototype);\n TextField.prototype.constructor = TextField;\n\n TextField.prototype.render = function render() {\n var input = document.createElement(\"input\");\n input.type = \"text\";\n input.placeholder = this.options.label;\n input.value = this.options.value || \"\";\n input.autocomplete = \"off\";\n return input;\n };\n\n return TextField;\n}(Field); // Helpers to create specific types of items\n\n\nfunction canInsert(state, nodeType) {\n var $from = state.selection.$from;\n\n for (var d = $from.depth; d >= 0; d--) {\n var index = $from.index(d);\n\n if ($from.node(d).canReplaceWith(index, index, nodeType)) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction insertImageItem(nodeType) {\n return new prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"MenuItem\"]({\n title: \"Insert image\",\n label: \"Image\",\n enable: function enable(state) {\n return canInsert(state, nodeType);\n },\n run: function run(state, _, view) {\n var ref = state.selection;\n var from = ref.from;\n var to = ref.to;\n var attrs = null;\n\n if (state.selection instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_3__[\"NodeSelection\"] && state.selection.node.type == nodeType) {\n attrs = state.selection.node.attrs;\n }\n\n openPrompt({\n title: \"Insert image\",\n fields: {\n src: new TextField({\n label: \"Location\",\n required: true,\n value: attrs && attrs.src\n }),\n title: new TextField({\n label: \"Title\",\n value: attrs && attrs.title\n }),\n alt: new TextField({\n label: \"Description\",\n value: attrs ? attrs.alt : state.doc.textBetween(from, to, \" \")\n })\n },\n callback: function callback(attrs) {\n view.dispatch(view.state.tr.replaceSelectionWith(nodeType.createAndFill(attrs)));\n view.focus();\n }\n });\n }\n });\n}\n\nfunction cmdItem(cmd, options) {\n var passedOptions = {\n label: options.title,\n run: cmd\n };\n\n for (var prop in options) {\n passedOptions[prop] = options[prop];\n }\n\n if ((!options.enable || options.enable === true) && !options.select) {\n passedOptions[options.enable ? \"enable\" : \"select\"] = function (state) {\n return cmd(state);\n };\n }\n\n return new prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"MenuItem\"](passedOptions);\n}\n\nfunction markActive(state, type) {\n var ref = state.selection;\n var from = ref.from;\n var $from = ref.$from;\n var to = ref.to;\n var empty = ref.empty;\n\n if (empty) {\n return type.isInSet(state.storedMarks || $from.marks());\n } else {\n return state.doc.rangeHasMark(from, to, type);\n }\n}\n\nfunction markItem(markType, options) {\n var passedOptions = {\n active: function active(state) {\n return markActive(state, markType);\n },\n enable: true\n };\n\n for (var prop in options) {\n passedOptions[prop] = options[prop];\n }\n\n return cmdItem(Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"toggleMark\"])(markType), passedOptions);\n}\n\nfunction linkItem(markType) {\n return new prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"MenuItem\"]({\n title: \"Add or remove link\",\n icon: prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"icons\"].link,\n active: function active(state) {\n return markActive(state, markType);\n },\n enable: function enable(state) {\n return !state.selection.empty;\n },\n run: function run(state, dispatch, view) {\n if (markActive(state, markType)) {\n Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"toggleMark\"])(markType)(state, dispatch);\n return true;\n }\n\n openPrompt({\n title: \"Create a link\",\n fields: {\n href: new TextField({\n label: \"Link target\",\n required: true\n }),\n title: new TextField({\n label: \"Title\"\n })\n },\n callback: function callback(attrs) {\n Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"toggleMark\"])(markType, attrs)(view.state, view.dispatch);\n view.focus();\n }\n });\n }\n });\n}\n\nfunction wrapListItem(nodeType, options) {\n return cmdItem(Object(prosemirror_schema_list__WEBPACK_IMPORTED_MODULE_7__[\"wrapInList\"])(nodeType, options.attrs), options);\n} // :: (Schema) → Object\n// Given a schema, look for default mark and node types in it and\n// return an object with relevant menu items relating to those marks:\n//\n// **`toggleStrong`**`: MenuItem`\n// : A menu item to toggle the [strong mark](#schema-basic.StrongMark).\n//\n// **`toggleEm`**`: MenuItem`\n// : A menu item to toggle the [emphasis mark](#schema-basic.EmMark).\n//\n// **`toggleCode`**`: MenuItem`\n// : A menu item to toggle the [code font mark](#schema-basic.CodeMark).\n//\n// **`toggleLink`**`: MenuItem`\n// : A menu item to toggle the [link mark](#schema-basic.LinkMark).\n//\n// **`insertImage`**`: MenuItem`\n// : A menu item to insert an [image](#schema-basic.Image).\n//\n// **`wrapBulletList`**`: MenuItem`\n// : A menu item to wrap the selection in a [bullet list](#schema-list.BulletList).\n//\n// **`wrapOrderedList`**`: MenuItem`\n// : A menu item to wrap the selection in an [ordered list](#schema-list.OrderedList).\n//\n// **`wrapBlockQuote`**`: MenuItem`\n// : A menu item to wrap the selection in a [block quote](#schema-basic.BlockQuote).\n//\n// **`makeParagraph`**`: MenuItem`\n// : A menu item to set the current textblock to be a normal\n// [paragraph](#schema-basic.Paragraph).\n//\n// **`makeCodeBlock`**`: MenuItem`\n// : A menu item to set the current textblock to be a\n// [code block](#schema-basic.CodeBlock).\n//\n// **`makeHead[N]`**`: MenuItem`\n// : Where _N_ is 1 to 6. Menu items to set the current textblock to\n// be a [heading](#schema-basic.Heading) of level _N_.\n//\n// **`insertHorizontalRule`**`: MenuItem`\n// : A menu item to insert a horizontal rule.\n//\n// The return value also contains some prefabricated menu elements and\n// menus, that you can use instead of composing your own menu from\n// scratch:\n//\n// **`insertMenu`**`: Dropdown`\n// : A dropdown containing the `insertImage` and\n// `insertHorizontalRule` items.\n//\n// **`typeMenu`**`: Dropdown`\n// : A dropdown containing the items for making the current\n// textblock a paragraph, code block, or heading.\n//\n// **`fullMenu`**`: [[MenuElement]]`\n// : An array of arrays of menu elements for use as the full menu\n// for, for example the [menu bar](https://github.com/prosemirror/prosemirror-menu#user-content-menubar).\n\n\nfunction buildMenuItems(schema) {\n var r = {},\n type;\n\n if (type = schema.marks.strong) {\n r.toggleStrong = markItem(type, {\n title: \"Toggle strong style\",\n icon: prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"icons\"].strong\n });\n }\n\n if (type = schema.marks.em) {\n r.toggleEm = markItem(type, {\n title: \"Toggle emphasis\",\n icon: prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"icons\"].em\n });\n }\n\n if (type = schema.marks.code) {\n r.toggleCode = markItem(type, {\n title: \"Toggle code font\",\n icon: prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"icons\"].code\n });\n }\n\n if (type = schema.marks.link) {\n r.toggleLink = linkItem(type);\n }\n\n if (type = schema.nodes.image) {\n r.insertImage = insertImageItem(type);\n }\n\n if (type = schema.nodes.bullet_list) {\n r.wrapBulletList = wrapListItem(type, {\n title: \"Wrap in bullet list\",\n icon: prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"icons\"].bulletList\n });\n }\n\n if (type = schema.nodes.ordered_list) {\n r.wrapOrderedList = wrapListItem(type, {\n title: \"Wrap in ordered list\",\n icon: prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"icons\"].orderedList\n });\n }\n\n if (type = schema.nodes.blockquote) {\n r.wrapBlockQuote = Object(prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"wrapItem\"])(type, {\n title: \"Wrap in block quote\",\n icon: prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"icons\"].blockquote\n });\n }\n\n if (type = schema.nodes.paragraph) {\n r.makeParagraph = Object(prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"blockTypeItem\"])(type, {\n title: \"Change to paragraph\",\n label: \"Plain\"\n });\n }\n\n if (type = schema.nodes.code_block) {\n r.makeCodeBlock = Object(prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"blockTypeItem\"])(type, {\n title: \"Change to code block\",\n label: \"Code\"\n });\n }\n\n if (type = schema.nodes.heading) {\n for (var i = 1; i <= 10; i++) {\n r[\"makeHead\" + i] = Object(prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"blockTypeItem\"])(type, {\n title: \"Change to heading \" + i,\n label: \"Level \" + i,\n attrs: {\n level: i\n }\n });\n }\n }\n\n if (type = schema.nodes.horizontal_rule) {\n var hr = type;\n r.insertHorizontalRule = new prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"MenuItem\"]({\n title: \"Insert horizontal rule\",\n label: \"Horizontal rule\",\n enable: function enable(state) {\n return canInsert(state, hr);\n },\n run: function run(state, dispatch) {\n dispatch(state.tr.replaceSelectionWith(hr.create()));\n }\n });\n }\n\n var cut = function cut(arr) {\n return arr.filter(function (x) {\n return x;\n });\n };\n\n r.insertMenu = new prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"Dropdown\"](cut([r.insertImage, r.insertHorizontalRule]), {\n label: \"Insert\"\n });\n r.typeMenu = new prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"Dropdown\"](cut([r.makeParagraph, r.makeCodeBlock, r.makeHead1 && new prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"DropdownSubmenu\"](cut([r.makeHead1, r.makeHead2, r.makeHead3, r.makeHead4, r.makeHead5, r.makeHead6]), {\n label: \"Heading\"\n })]), {\n label: \"Type...\"\n });\n r.inlineMenu = [cut([r.toggleStrong, r.toggleEm, r.toggleCode, r.toggleLink])];\n r.blockMenu = [cut([r.wrapBulletList, r.wrapOrderedList, r.wrapBlockQuote, prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"joinUpItem\"], prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"liftItem\"], prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"selectParentNodeItem\"]])];\n r.fullMenu = r.inlineMenu.concat([[r.insertMenu, r.typeMenu]], [[prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"undoItem\"], prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"redoItem\"]]], r.blockMenu);\n return r;\n}\n\nvar mac = typeof navigator != \"undefined\" ? /Mac/.test(navigator.platform) : false; // :: (Schema, ?Object) → Object\n// Inspect the given schema looking for marks and nodes from the\n// basic schema, and if found, add key bindings related to them.\n// This will add:\n//\n// * **Mod-b** for toggling [strong](#schema-basic.StrongMark)\n// * **Mod-i** for toggling [emphasis](#schema-basic.EmMark)\n// * **Mod-`** for toggling [code font](#schema-basic.CodeMark)\n// * **Ctrl-Shift-0** for making the current textblock a paragraph\n// * **Ctrl-Shift-1** to **Ctrl-Shift-Digit6** for making the current\n// textblock a heading of the corresponding level\n// * **Ctrl-Shift-Backslash** to make the current textblock a code block\n// * **Ctrl-Shift-8** to wrap the selection in an ordered list\n// * **Ctrl-Shift-9** to wrap the selection in a bullet list\n// * **Ctrl->** to wrap the selection in a block quote\n// * **Enter** to split a non-empty textblock in a list item while at\n// the same time splitting the list item\n// * **Mod-Enter** to insert a hard break\n// * **Mod-_** to insert a horizontal rule\n// * **Backspace** to undo an input rule\n// * **Alt-ArrowUp** to `joinUp`\n// * **Alt-ArrowDown** to `joinDown`\n// * **Mod-BracketLeft** to `lift`\n// * **Escape** to `selectParentNode`\n//\n// You can suppress or map these bindings by passing a `mapKeys`\n// argument, which maps key names (say `\"Mod-B\"` to either `false`, to\n// remove the binding, or a new key name string.\n\nfunction buildKeymap(schema, mapKeys) {\n var keys = {},\n type;\n\n function bind(key, cmd) {\n if (mapKeys) {\n var mapped = mapKeys[key];\n\n if (mapped === false) {\n return;\n }\n\n if (mapped) {\n key = mapped;\n }\n }\n\n keys[key] = cmd;\n }\n\n bind(\"Mod-z\", prosemirror_history__WEBPACK_IMPORTED_MODULE_1__[\"undo\"]);\n bind(\"Shift-Mod-z\", prosemirror_history__WEBPACK_IMPORTED_MODULE_1__[\"redo\"]);\n bind(\"Backspace\", prosemirror_inputrules__WEBPACK_IMPORTED_MODULE_8__[\"undoInputRule\"]);\n\n if (!mac) {\n bind(\"Mod-y\", prosemirror_history__WEBPACK_IMPORTED_MODULE_1__[\"redo\"]);\n }\n\n bind(\"Alt-ArrowUp\", prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"joinUp\"]);\n bind(\"Alt-ArrowDown\", prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"joinDown\"]);\n bind(\"Mod-BracketLeft\", prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"lift\"]);\n bind(\"Escape\", prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"selectParentNode\"]);\n\n if (type = schema.marks.strong) {\n bind(\"Mod-b\", Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"toggleMark\"])(type));\n bind(\"Mod-B\", Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"toggleMark\"])(type));\n }\n\n if (type = schema.marks.em) {\n bind(\"Mod-i\", Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"toggleMark\"])(type));\n bind(\"Mod-I\", Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"toggleMark\"])(type));\n }\n\n if (type = schema.marks.code) {\n bind(\"Mod-`\", Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"toggleMark\"])(type));\n }\n\n if (type = schema.nodes.bullet_list) {\n bind(\"Shift-Ctrl-8\", Object(prosemirror_schema_list__WEBPACK_IMPORTED_MODULE_7__[\"wrapInList\"])(type));\n }\n\n if (type = schema.nodes.ordered_list) {\n bind(\"Shift-Ctrl-9\", Object(prosemirror_schema_list__WEBPACK_IMPORTED_MODULE_7__[\"wrapInList\"])(type));\n }\n\n if (type = schema.nodes.blockquote) {\n bind(\"Ctrl->\", Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"wrapIn\"])(type));\n }\n\n if (type = schema.nodes.hard_break) {\n var br = type,\n cmd = Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"chainCommands\"])(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"exitCode\"], function (state, dispatch) {\n dispatch(state.tr.replaceSelectionWith(br.create()).scrollIntoView());\n return true;\n });\n bind(\"Mod-Enter\", cmd);\n bind(\"Shift-Enter\", cmd);\n\n if (mac) {\n bind(\"Ctrl-Enter\", cmd);\n }\n }\n\n if (type = schema.nodes.list_item) {\n bind(\"Enter\", Object(prosemirror_schema_list__WEBPACK_IMPORTED_MODULE_7__[\"splitListItem\"])(type));\n bind(\"Mod-[\", Object(prosemirror_schema_list__WEBPACK_IMPORTED_MODULE_7__[\"liftListItem\"])(type));\n bind(\"Mod-]\", Object(prosemirror_schema_list__WEBPACK_IMPORTED_MODULE_7__[\"sinkListItem\"])(type));\n }\n\n if (type = schema.nodes.paragraph) {\n bind(\"Shift-Ctrl-0\", Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"setBlockType\"])(type));\n }\n\n if (type = schema.nodes.code_block) {\n bind(\"Shift-Ctrl-\\\\\", Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"setBlockType\"])(type));\n }\n\n if (type = schema.nodes.heading) {\n for (var i = 1; i <= 6; i++) {\n bind(\"Shift-Ctrl-\" + i, Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"setBlockType\"])(type, {\n level: i\n }));\n }\n }\n\n if (type = schema.nodes.horizontal_rule) {\n var hr = type;\n bind(\"Mod-_\", function (state, dispatch) {\n dispatch(state.tr.replaceSelectionWith(hr.create()).scrollIntoView());\n return true;\n });\n }\n\n return keys;\n} // : (NodeType) → InputRule\n// Given a blockquote node type, returns an input rule that turns `\"> \"`\n// at the start of a textblock into a blockquote.\n\n\nfunction blockQuoteRule(nodeType) {\n return Object(prosemirror_inputrules__WEBPACK_IMPORTED_MODULE_8__[\"wrappingInputRule\"])(/^\\s*>\\s$/, nodeType);\n} // : (NodeType) → InputRule\n// Given a list node type, returns an input rule that turns a number\n// followed by a dot at the start of a textblock into an ordered list.\n\n\nfunction orderedListRule(nodeType) {\n return Object(prosemirror_inputrules__WEBPACK_IMPORTED_MODULE_8__[\"wrappingInputRule\"])(/^(\\d+)\\.\\s$/, nodeType, function (match) {\n return {\n order: +match[1]\n };\n }, function (match, node) {\n return node.childCount + node.attrs.order == +match[1];\n });\n} // : (NodeType) → InputRule\n// Given a list node type, returns an input rule that turns a bullet\n// (dash, plush, or asterisk) at the start of a textblock into a\n// bullet list.\n\n\nfunction bulletListRule(nodeType) {\n return Object(prosemirror_inputrules__WEBPACK_IMPORTED_MODULE_8__[\"wrappingInputRule\"])(/^\\s*([-+*])\\s$/, nodeType);\n} // : (NodeType) → InputRule\n// Given a code block node type, returns an input rule that turns a\n// textblock starting with three backticks into a code block.\n\n\nfunction codeBlockRule(nodeType) {\n return Object(prosemirror_inputrules__WEBPACK_IMPORTED_MODULE_8__[\"textblockTypeInputRule\"])(/^```$/, nodeType);\n} // : (NodeType, number) → InputRule\n// Given a node type and a maximum level, creates an input rule that\n// turns up to that number of `#` characters followed by a space at\n// the start of a textblock into a heading whose level corresponds to\n// the number of `#` signs.\n\n\nfunction headingRule(nodeType, maxLevel) {\n return Object(prosemirror_inputrules__WEBPACK_IMPORTED_MODULE_8__[\"textblockTypeInputRule\"])(new RegExp(\"^(#{1,\" + maxLevel + \"})\\\\s$\"), nodeType, function (match) {\n return {\n level: match[1].length\n };\n });\n} // : (Schema) → Plugin\n// A set of input rules for creating the basic block quotes, lists,\n// code blocks, and heading.\n\n\nfunction buildInputRules(schema) {\n var rules = prosemirror_inputrules__WEBPACK_IMPORTED_MODULE_8__[\"smartQuotes\"].concat(prosemirror_inputrules__WEBPACK_IMPORTED_MODULE_8__[\"ellipsis\"], prosemirror_inputrules__WEBPACK_IMPORTED_MODULE_8__[\"emDash\"]),\n type;\n\n if (type = schema.nodes.blockquote) {\n rules.push(blockQuoteRule(type));\n }\n\n if (type = schema.nodes.ordered_list) {\n rules.push(orderedListRule(type));\n }\n\n if (type = schema.nodes.bullet_list) {\n rules.push(bulletListRule(type));\n }\n\n if (type = schema.nodes.code_block) {\n rules.push(codeBlockRule(type));\n }\n\n if (type = schema.nodes.heading) {\n rules.push(headingRule(type, 6));\n }\n\n return Object(prosemirror_inputrules__WEBPACK_IMPORTED_MODULE_8__[\"inputRules\"])({\n rules: rules\n });\n} // !! This module exports helper functions for deriving a set of basic\n// menu items, input rules, or key bindings from a schema. These\n// values need to know about the schema for two reasons—they need\n// access to specific instances of node and mark types, and they need\n// to know which of the node and mark types that they know about are\n// actually present in the schema.\n//\n// The `exampleSetup` plugin ties these together into a plugin that\n// will automatically enable this basic functionality in an editor.\n// :: (Object) → [Plugin]\n// A convenience plugin that bundles together a simple menu with basic\n// key bindings, input rules, and styling for the example schema.\n// Probably only useful for quickly setting up a passable\n// editor—you'll need more control over your settings in most\n// real-world situations.\n//\n// options::- The following options are recognized:\n//\n// schema:: Schema\n// The schema to generate key bindings and menu items for.\n//\n// mapKeys:: ?Object\n// Can be used to [adjust](#example-setup.buildKeymap) the key bindings created.\n//\n// menuBar:: ?bool\n// Set to false to disable the menu bar.\n//\n// history:: ?bool\n// Set to false to disable the history plugin.\n//\n// floatingMenu:: ?bool\n// Set to false to make the menu bar non-floating.\n//\n// menuContent:: [[MenuItem]]\n// Can be used to override the menu content.\n\n\nfunction exampleSetup(options) {\n var plugins = [buildInputRules(options.schema), Object(prosemirror_keymap__WEBPACK_IMPORTED_MODULE_0__[\"keymap\"])(buildKeymap(options.schema, options.mapKeys)), Object(prosemirror_keymap__WEBPACK_IMPORTED_MODULE_0__[\"keymap\"])(prosemirror_commands__WEBPACK_IMPORTED_MODULE_2__[\"baseKeymap\"]), Object(prosemirror_dropcursor__WEBPACK_IMPORTED_MODULE_4__[\"dropCursor\"])(), Object(prosemirror_gapcursor__WEBPACK_IMPORTED_MODULE_5__[\"gapCursor\"])()];\n\n if (options.menuBar !== false) {\n plugins.push(Object(prosemirror_menu__WEBPACK_IMPORTED_MODULE_6__[\"menuBar\"])({\n floating: options.floatingMenu !== false,\n content: options.menuContent || buildMenuItems(options.schema).fullMenu\n }));\n }\n\n if (options.history !== false) {\n plugins.push(Object(prosemirror_history__WEBPACK_IMPORTED_MODULE_1__[\"history\"])());\n }\n\n return plugins.concat(new prosemirror_state__WEBPACK_IMPORTED_MODULE_3__[\"Plugin\"]({\n props: {\n attributes: {\n \"class\": \"ProseMirror-example-setup-style\"\n }\n }\n }));\n}\n\n\n\n//# sourceURL=webpack:///./node_modules/prosemirror-example-setup/dist/index.es.js?"); - -/***/ }), - -/***/ "./node_modules/prosemirror-gapcursor/dist/index.es.js": -/*!*************************************************************!*\ - !*** ./node_modules/prosemirror-gapcursor/dist/index.es.js ***! - \*************************************************************/ -/*! exports provided: GapCursor, gapCursor */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"GapCursor\", function() { return GapCursor; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gapCursor\", function() { return gapCursor; });\n/* harmony import */ var prosemirror_keymap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prosemirror-keymap */ \"./node_modules/prosemirror-keymap/dist/index.es.js\");\n/* harmony import */ var prosemirror_state__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prosemirror-state */ \"./node_modules/prosemirror-state/dist/index.es.js\");\n/* harmony import */ var prosemirror_view__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prosemirror-view */ \"./node_modules/prosemirror-view/dist/index.es.js\");\n/* harmony import */ var prosemirror_model__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prosemirror-model */ \"./node_modules/prosemirror-model/dist/index.es.js\");\n\n\n\n // ::- Gap cursor selections are represented using this class. Its\n// `$anchor` and `$head` properties both point at the cursor position.\n\nvar GapCursor = /*@__PURE__*/function (Selection) {\n function GapCursor($pos) {\n Selection.call(this, $pos, $pos);\n }\n\n if (Selection) GapCursor.__proto__ = Selection;\n GapCursor.prototype = Object.create(Selection && Selection.prototype);\n GapCursor.prototype.constructor = GapCursor;\n\n GapCursor.prototype.map = function map(doc, mapping) {\n var $pos = doc.resolve(mapping.map(this.head));\n return GapCursor.valid($pos) ? new GapCursor($pos) : Selection.near($pos);\n };\n\n GapCursor.prototype.content = function content() {\n return prosemirror_model__WEBPACK_IMPORTED_MODULE_3__[\"Slice\"].empty;\n };\n\n GapCursor.prototype.eq = function eq(other) {\n return other instanceof GapCursor && other.head == this.head;\n };\n\n GapCursor.prototype.toJSON = function toJSON() {\n return {\n type: \"gapcursor\",\n pos: this.head\n };\n };\n\n GapCursor.fromJSON = function fromJSON(doc, json) {\n if (typeof json.pos != \"number\") {\n throw new RangeError(\"Invalid input for GapCursor.fromJSON\");\n }\n\n return new GapCursor(doc.resolve(json.pos));\n };\n\n GapCursor.prototype.getBookmark = function getBookmark() {\n return new GapBookmark(this.anchor);\n };\n\n GapCursor.valid = function valid($pos) {\n var parent = $pos.parent;\n\n if (parent.isTextblock || !closedBefore($pos) || !closedAfter($pos)) {\n return false;\n }\n\n var override = parent.type.spec.allowGapCursor;\n\n if (override != null) {\n return override;\n }\n\n var deflt = parent.contentMatchAt($pos.index()).defaultType;\n return deflt && deflt.isTextblock;\n };\n\n GapCursor.findFrom = function findFrom($pos, dir, mustMove) {\n if (!mustMove && GapCursor.valid($pos)) {\n return $pos;\n }\n\n var pos = $pos.pos,\n next = null; // Scan up from this position\n\n for (var d = $pos.depth;; d--) {\n var parent = $pos.node(d);\n\n if (dir > 0 ? $pos.indexAfter(d) < parent.childCount : $pos.index(d) > 0) {\n next = parent.maybeChild(dir > 0 ? $pos.indexAfter(d) : $pos.index(d) - 1);\n break;\n } else if (d == 0) {\n return null;\n }\n\n pos += dir;\n var $cur = $pos.doc.resolve(pos);\n\n if (GapCursor.valid($cur)) {\n return $cur;\n }\n } // And then down into the next node\n\n\n for (;;) {\n next = dir > 0 ? next.firstChild : next.lastChild;\n\n if (!next) {\n break;\n }\n\n pos += dir;\n var $cur$1 = $pos.doc.resolve(pos);\n\n if (GapCursor.valid($cur$1)) {\n return $cur$1;\n }\n }\n\n return null;\n };\n\n return GapCursor;\n}(prosemirror_state__WEBPACK_IMPORTED_MODULE_1__[\"Selection\"]);\n\nGapCursor.prototype.visible = false;\nprosemirror_state__WEBPACK_IMPORTED_MODULE_1__[\"Selection\"].jsonID(\"gapcursor\", GapCursor);\n\nvar GapBookmark = function GapBookmark(pos) {\n this.pos = pos;\n};\n\nGapBookmark.prototype.map = function map(mapping) {\n return new GapBookmark(mapping.map(this.pos));\n};\n\nGapBookmark.prototype.resolve = function resolve(doc) {\n var $pos = doc.resolve(this.pos);\n return GapCursor.valid($pos) ? new GapCursor($pos) : prosemirror_state__WEBPACK_IMPORTED_MODULE_1__[\"Selection\"].near($pos);\n};\n\nfunction closedBefore($pos) {\n for (var d = $pos.depth; d >= 0; d--) {\n var index = $pos.index(d); // At the start of this parent, look at next one\n\n if (index == 0) {\n continue;\n } // See if the node before (or its first ancestor) is closed\n\n\n for (var before = $pos.node(d).child(index - 1);; before = before.lastChild) {\n if (before.childCount == 0 && !before.inlineContent || before.isAtom || before.type.spec.isolating) {\n return true;\n }\n\n if (before.inlineContent) {\n return false;\n }\n }\n } // Hit start of document\n\n\n return true;\n}\n\nfunction closedAfter($pos) {\n for (var d = $pos.depth; d >= 0; d--) {\n var index = $pos.indexAfter(d),\n parent = $pos.node(d);\n\n if (index == parent.childCount) {\n continue;\n }\n\n for (var after = parent.child(index);; after = after.firstChild) {\n if (after.childCount == 0 && !after.inlineContent || after.isAtom || after.type.spec.isolating) {\n return true;\n }\n\n if (after.inlineContent) {\n return false;\n }\n }\n }\n\n return true;\n} // :: () → Plugin\n// Create a gap cursor plugin. When enabled, this will capture clicks\n// near and arrow-key-motion past places that don't have a normally\n// selectable position nearby, and create a gap cursor selection for\n// them. The cursor is drawn as an element with class\n// `ProseMirror-gapcursor`. You can either include\n// `style/gapcursor.css` from the package's directory or add your own\n// styles to make it visible.\n\n\nvar gapCursor = function gapCursor() {\n return new prosemirror_state__WEBPACK_IMPORTED_MODULE_1__[\"Plugin\"]({\n props: {\n decorations: drawGapCursor,\n createSelectionBetween: function createSelectionBetween(_view, $anchor, $head) {\n if ($anchor.pos == $head.pos && GapCursor.valid($head)) {\n return new GapCursor($head);\n }\n },\n handleClick: handleClick,\n handleKeyDown: handleKeyDown\n }\n });\n};\n\nvar handleKeyDown = Object(prosemirror_keymap__WEBPACK_IMPORTED_MODULE_0__[\"keydownHandler\"])({\n \"ArrowLeft\": arrow(\"horiz\", -1),\n \"ArrowRight\": arrow(\"horiz\", 1),\n \"ArrowUp\": arrow(\"vert\", -1),\n \"ArrowDown\": arrow(\"vert\", 1)\n});\n\nfunction arrow(axis, dir) {\n var dirStr = axis == \"vert\" ? dir > 0 ? \"down\" : \"up\" : dir > 0 ? \"right\" : \"left\";\n return function (state, dispatch, view) {\n var sel = state.selection;\n var $start = dir > 0 ? sel.$to : sel.$from,\n mustMove = sel.empty;\n\n if (sel instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_1__[\"TextSelection\"]) {\n if (!view.endOfTextblock(dirStr) || $start.depth == 0) {\n return false;\n }\n\n mustMove = false;\n $start = state.doc.resolve(dir > 0 ? $start.after() : $start.before());\n }\n\n var $found = GapCursor.findFrom($start, dir, mustMove);\n\n if (!$found) {\n return false;\n }\n\n if (dispatch) {\n dispatch(state.tr.setSelection(new GapCursor($found)));\n }\n\n return true;\n };\n}\n\nfunction handleClick(view, pos, event) {\n if (!view.editable) {\n return false;\n }\n\n var $pos = view.state.doc.resolve(pos);\n\n if (!GapCursor.valid($pos)) {\n return false;\n }\n\n var ref = view.posAtCoords({\n left: event.clientX,\n top: event.clientY\n });\n var inside = ref.inside;\n\n if (inside > -1 && prosemirror_state__WEBPACK_IMPORTED_MODULE_1__[\"NodeSelection\"].isSelectable(view.state.doc.nodeAt(inside))) {\n return false;\n }\n\n view.dispatch(view.state.tr.setSelection(new GapCursor($pos)));\n return true;\n}\n\nfunction drawGapCursor(state) {\n if (!(state.selection instanceof GapCursor)) {\n return null;\n }\n\n var node = document.createElement(\"div\");\n node.className = \"ProseMirror-gapcursor\";\n return prosemirror_view__WEBPACK_IMPORTED_MODULE_2__[\"DecorationSet\"].create(state.doc, [prosemirror_view__WEBPACK_IMPORTED_MODULE_2__[\"Decoration\"].widget(state.selection.head, node, {\n key: \"gapcursor\"\n })]);\n}\n\n\n\n//# sourceURL=webpack:///./node_modules/prosemirror-gapcursor/dist/index.es.js?"); - -/***/ }), - -/***/ "./node_modules/prosemirror-history/dist/index.es.js": -/*!***********************************************************!*\ - !*** ./node_modules/prosemirror-history/dist/index.es.js ***! - \***********************************************************/ -/*! exports provided: HistoryState, closeHistory, history, redo, redoDepth, undo, undoDepth */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"HistoryState\", function() { return HistoryState; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"closeHistory\", function() { return closeHistory; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"history\", function() { return history; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"redo\", function() { return redo; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"redoDepth\", function() { return redoDepth; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"undo\", function() { return undo; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"undoDepth\", function() { return undoDepth; });\n/* harmony import */ var rope_sequence__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rope-sequence */ \"./node_modules/rope-sequence/dist/index.es.js\");\n/* harmony import */ var prosemirror_transform__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prosemirror-transform */ \"./node_modules/prosemirror-transform/dist/index.es.js\");\n/* harmony import */ var prosemirror_state__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prosemirror-state */ \"./node_modules/prosemirror-state/dist/index.es.js\");\n\n\n // ProseMirror's history isn't simply a way to roll back to a previous\n// state, because ProseMirror supports applying changes without adding\n// them to the history (for example during collaboration).\n//\n// To this end, each 'Branch' (one for the undo history and one for\n// the redo history) keeps an array of 'Items', which can optionally\n// hold a step (an actual undoable change), and always hold a position\n// map (which is needed to move changes below them to apply to the\n// current document).\n//\n// An item that has both a step and a selection bookmark is the start\n// of an 'event' — a group of changes that will be undone or redone at\n// once. (It stores only the bookmark, since that way we don't have to\n// provide a document until the selection is actually applied, which\n// is useful when compressing.)\n// Used to schedule history compression\n\nvar max_empty_items = 500;\n\nvar Branch = function Branch(items, eventCount) {\n this.items = items;\n this.eventCount = eventCount;\n}; // : (EditorState, bool) → ?{transform: Transform, selection: ?SelectionBookmark, remaining: Branch}\n// Pop the latest event off the branch's history and apply it\n// to a document transform.\n\n\nBranch.prototype.popEvent = function popEvent(state, preserveItems) {\n var this$1 = this;\n\n if (this.eventCount == 0) {\n return null;\n }\n\n var end = this.items.length;\n\n for (;; end--) {\n var next = this.items.get(end - 1);\n\n if (next.selection) {\n --end;\n break;\n }\n }\n\n var remap, mapFrom;\n\n if (preserveItems) {\n remap = this.remapping(end, this.items.length);\n mapFrom = remap.maps.length;\n }\n\n var transform = state.tr;\n var selection, remaining;\n var addAfter = [],\n addBefore = [];\n this.items.forEach(function (item, i) {\n if (!item.step) {\n if (!remap) {\n remap = this$1.remapping(end, i + 1);\n mapFrom = remap.maps.length;\n }\n\n mapFrom--;\n addBefore.push(item);\n return;\n }\n\n if (remap) {\n addBefore.push(new Item(item.map));\n var step = item.step.map(remap.slice(mapFrom)),\n map;\n\n if (step && transform.maybeStep(step).doc) {\n map = transform.mapping.maps[transform.mapping.maps.length - 1];\n addAfter.push(new Item(map, null, null, addAfter.length + addBefore.length));\n }\n\n mapFrom--;\n\n if (map) {\n remap.appendMap(map, mapFrom);\n }\n } else {\n transform.maybeStep(item.step);\n }\n\n if (item.selection) {\n selection = remap ? item.selection.map(remap.slice(mapFrom)) : item.selection;\n remaining = new Branch(this$1.items.slice(0, end).append(addBefore.reverse().concat(addAfter)), this$1.eventCount - 1);\n return false;\n }\n }, this.items.length, 0);\n return {\n remaining: remaining,\n transform: transform,\n selection: selection\n };\n}; // : (Transform, ?SelectionBookmark, Object) → Branch\n// Create a new branch with the given transform added.\n\n\nBranch.prototype.addTransform = function addTransform(transform, selection, histOptions, preserveItems) {\n var newItems = [],\n eventCount = this.eventCount;\n var oldItems = this.items,\n lastItem = !preserveItems && oldItems.length ? oldItems.get(oldItems.length - 1) : null;\n\n for (var i = 0; i < transform.steps.length; i++) {\n var step = transform.steps[i].invert(transform.docs[i]);\n var item = new Item(transform.mapping.maps[i], step, selection),\n merged = void 0;\n\n if (merged = lastItem && lastItem.merge(item)) {\n item = merged;\n\n if (i) {\n newItems.pop();\n } else {\n oldItems = oldItems.slice(0, oldItems.length - 1);\n }\n }\n\n newItems.push(item);\n\n if (selection) {\n eventCount++;\n selection = null;\n }\n\n if (!preserveItems) {\n lastItem = item;\n }\n }\n\n var overflow = eventCount - histOptions.depth;\n\n if (overflow > DEPTH_OVERFLOW) {\n oldItems = cutOffEvents(oldItems, overflow);\n eventCount -= overflow;\n }\n\n return new Branch(oldItems.append(newItems), eventCount);\n};\n\nBranch.prototype.remapping = function remapping(from, to) {\n var maps = new prosemirror_transform__WEBPACK_IMPORTED_MODULE_1__[\"Mapping\"]();\n this.items.forEach(function (item, i) {\n var mirrorPos = item.mirrorOffset != null && i - item.mirrorOffset >= from ? maps.maps.length - item.mirrorOffset : null;\n maps.appendMap(item.map, mirrorPos);\n }, from, to);\n return maps;\n};\n\nBranch.prototype.addMaps = function addMaps(array) {\n if (this.eventCount == 0) {\n return this;\n }\n\n return new Branch(this.items.append(array.map(function (map) {\n return new Item(map);\n })), this.eventCount);\n}; // : (Transform, number)\n// When the collab module receives remote changes, the history has\n// to know about those, so that it can adjust the steps that were\n// rebased on top of the remote changes, and include the position\n// maps for the remote changes in its array of items.\n\n\nBranch.prototype.rebased = function rebased(rebasedTransform, rebasedCount) {\n if (!this.eventCount) {\n return this;\n }\n\n var rebasedItems = [],\n start = Math.max(0, this.items.length - rebasedCount);\n var mapping = rebasedTransform.mapping;\n var newUntil = rebasedTransform.steps.length;\n var eventCount = this.eventCount;\n this.items.forEach(function (item) {\n if (item.selection) {\n eventCount--;\n }\n }, start);\n var iRebased = rebasedCount;\n this.items.forEach(function (item) {\n var pos = mapping.getMirror(--iRebased);\n\n if (pos == null) {\n return;\n }\n\n newUntil = Math.min(newUntil, pos);\n var map = mapping.maps[pos];\n\n if (item.step) {\n var step = rebasedTransform.steps[pos].invert(rebasedTransform.docs[pos]);\n var selection = item.selection && item.selection.map(mapping.slice(iRebased + 1, pos));\n\n if (selection) {\n eventCount++;\n }\n\n rebasedItems.push(new Item(map, step, selection));\n } else {\n rebasedItems.push(new Item(map));\n }\n }, start);\n var newMaps = [];\n\n for (var i = rebasedCount; i < newUntil; i++) {\n newMaps.push(new Item(mapping.maps[i]));\n }\n\n var items = this.items.slice(0, start).append(newMaps).append(rebasedItems);\n var branch = new Branch(items, eventCount);\n\n if (branch.emptyItemCount() > max_empty_items) {\n branch = branch.compress(this.items.length - rebasedItems.length);\n }\n\n return branch;\n};\n\nBranch.prototype.emptyItemCount = function emptyItemCount() {\n var count = 0;\n this.items.forEach(function (item) {\n if (!item.step) {\n count++;\n }\n });\n return count;\n}; // Compressing a branch means rewriting it to push the air (map-only\n// items) out. During collaboration, these naturally accumulate\n// because each remote change adds one. The `upto` argument is used\n// to ensure that only the items below a given level are compressed,\n// because `rebased` relies on a clean, untouched set of items in\n// order to associate old items with rebased steps.\n\n\nBranch.prototype.compress = function compress(upto) {\n if (upto === void 0) upto = this.items.length;\n var remap = this.remapping(0, upto),\n mapFrom = remap.maps.length;\n var items = [],\n events = 0;\n this.items.forEach(function (item, i) {\n if (i >= upto) {\n items.push(item);\n\n if (item.selection) {\n events++;\n }\n } else if (item.step) {\n var step = item.step.map(remap.slice(mapFrom)),\n map = step && step.getMap();\n mapFrom--;\n\n if (map) {\n remap.appendMap(map, mapFrom);\n }\n\n if (step) {\n var selection = item.selection && item.selection.map(remap.slice(mapFrom));\n\n if (selection) {\n events++;\n }\n\n var newItem = new Item(map.invert(), step, selection),\n merged,\n last = items.length - 1;\n\n if (merged = items.length && items[last].merge(newItem)) {\n items[last] = merged;\n } else {\n items.push(newItem);\n }\n }\n } else if (item.map) {\n mapFrom--;\n }\n }, this.items.length, 0);\n return new Branch(rope_sequence__WEBPACK_IMPORTED_MODULE_0__[\"default\"].from(items.reverse()), events);\n};\n\nBranch.empty = new Branch(rope_sequence__WEBPACK_IMPORTED_MODULE_0__[\"default\"].empty, 0);\n\nfunction cutOffEvents(items, n) {\n var cutPoint;\n items.forEach(function (item, i) {\n if (item.selection && n-- == 0) {\n cutPoint = i;\n return false;\n }\n });\n return items.slice(cutPoint);\n}\n\nvar Item = function Item(map, step, selection, mirrorOffset) {\n // The (forward) step map for this item.\n this.map = map; // The inverted step\n\n this.step = step; // If this is non-null, this item is the start of a group, and\n // this selection is the starting selection for the group (the one\n // that was active before the first step was applied)\n\n this.selection = selection; // If this item is the inverse of a previous mapping on the stack,\n // this points at the inverse's offset\n\n this.mirrorOffset = mirrorOffset;\n};\n\nItem.prototype.merge = function merge(other) {\n if (this.step && other.step && !other.selection) {\n var step = other.step.merge(this.step);\n\n if (step) {\n return new Item(step.getMap().invert(), step, this.selection);\n }\n }\n}; // The value of the state field that tracks undo/redo history for that\n// state. Will be stored in the plugin state when the history plugin\n// is active.\n\n\nvar HistoryState = function HistoryState(done, undone, prevRanges, prevTime) {\n this.done = done;\n this.undone = undone;\n this.prevRanges = prevRanges;\n this.prevTime = prevTime;\n};\n\nvar DEPTH_OVERFLOW = 20; // : (HistoryState, EditorState, Transaction, Object)\n// Record a transformation in undo history.\n\nfunction applyTransaction(history, state, tr, options) {\n var historyTr = tr.getMeta(historyKey),\n rebased;\n\n if (historyTr) {\n return historyTr.historyState;\n }\n\n if (tr.getMeta(closeHistoryKey)) {\n history = new HistoryState(history.done, history.undone, null, 0);\n }\n\n var appended = tr.getMeta(\"appendedTransaction\");\n\n if (tr.steps.length == 0) {\n return history;\n } else if (appended && appended.getMeta(historyKey)) {\n if (appended.getMeta(historyKey).redo) {\n return new HistoryState(history.done.addTransform(tr, null, options, mustPreserveItems(state)), history.undone, rangesFor(tr.mapping.maps[tr.steps.length - 1]), history.prevTime);\n } else {\n return new HistoryState(history.done, history.undone.addTransform(tr, null, options, mustPreserveItems(state)), null, history.prevTime);\n }\n } else if (tr.getMeta(\"addToHistory\") !== false && !(appended && appended.getMeta(\"addToHistory\") === false)) {\n // Group transforms that occur in quick succession into one event.\n var newGroup = history.prevTime == 0 || !appended && (history.prevTime < (tr.time || 0) - options.newGroupDelay || !isAdjacentTo(tr, history.prevRanges));\n var prevRanges = appended ? mapRanges(history.prevRanges, tr.mapping) : rangesFor(tr.mapping.maps[tr.steps.length - 1]);\n return new HistoryState(history.done.addTransform(tr, newGroup ? state.selection.getBookmark() : null, options, mustPreserveItems(state)), Branch.empty, prevRanges, tr.time);\n } else if (rebased = tr.getMeta(\"rebased\")) {\n // Used by the collab module to tell the history that some of its\n // content has been rebased.\n return new HistoryState(history.done.rebased(tr, rebased), history.undone.rebased(tr, rebased), mapRanges(history.prevRanges, tr.mapping), history.prevTime);\n } else {\n return new HistoryState(history.done.addMaps(tr.mapping.maps), history.undone.addMaps(tr.mapping.maps), mapRanges(history.prevRanges, tr.mapping), history.prevTime);\n }\n}\n\nfunction isAdjacentTo(transform, prevRanges) {\n if (!prevRanges) {\n return false;\n }\n\n if (!transform.docChanged) {\n return true;\n }\n\n var adjacent = false;\n transform.mapping.maps[0].forEach(function (start, end) {\n for (var i = 0; i < prevRanges.length; i += 2) {\n if (start <= prevRanges[i + 1] && end >= prevRanges[i]) {\n adjacent = true;\n }\n }\n });\n return adjacent;\n}\n\nfunction rangesFor(map) {\n var result = [];\n map.forEach(function (_from, _to, from, to) {\n return result.push(from, to);\n });\n return result;\n}\n\nfunction mapRanges(ranges, mapping) {\n if (!ranges) {\n return null;\n }\n\n var result = [];\n\n for (var i = 0; i < ranges.length; i += 2) {\n var from = mapping.map(ranges[i], 1),\n to = mapping.map(ranges[i + 1], -1);\n\n if (from <= to) {\n result.push(from, to);\n }\n }\n\n return result;\n} // : (HistoryState, EditorState, (tr: Transaction), bool)\n// Apply the latest event from one branch to the document and shift the event\n// onto the other branch.\n\n\nfunction histTransaction(history, state, dispatch, redo) {\n var preserveItems = mustPreserveItems(state),\n histOptions = historyKey.get(state).spec.config;\n var pop = (redo ? history.undone : history.done).popEvent(state, preserveItems);\n\n if (!pop) {\n return;\n }\n\n var selection = pop.selection.resolve(pop.transform.doc);\n var added = (redo ? history.done : history.undone).addTransform(pop.transform, state.selection.getBookmark(), histOptions, preserveItems);\n var newHist = new HistoryState(redo ? added : pop.remaining, redo ? pop.remaining : added, null, 0);\n dispatch(pop.transform.setSelection(selection).setMeta(historyKey, {\n redo: redo,\n historyState: newHist\n }).scrollIntoView());\n}\n\nvar cachedPreserveItems = false,\n cachedPreserveItemsPlugins = null; // Check whether any plugin in the given state has a\n// `historyPreserveItems` property in its spec, in which case we must\n// preserve steps exactly as they came in, so that they can be\n// rebased.\n\nfunction mustPreserveItems(state) {\n var plugins = state.plugins;\n\n if (cachedPreserveItemsPlugins != plugins) {\n cachedPreserveItems = false;\n cachedPreserveItemsPlugins = plugins;\n\n for (var i = 0; i < plugins.length; i++) {\n if (plugins[i].spec.historyPreserveItems) {\n cachedPreserveItems = true;\n break;\n }\n }\n }\n\n return cachedPreserveItems;\n} // :: (Transaction) → Transaction\n// Set a flag on the given transaction that will prevent further steps\n// from being appended to an existing history event (so that they\n// require a separate undo command to undo).\n\n\nfunction closeHistory(tr) {\n return tr.setMeta(closeHistoryKey, true);\n}\n\nvar historyKey = new prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"PluginKey\"](\"history\");\nvar closeHistoryKey = new prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"PluginKey\"](\"closeHistory\"); // :: (?Object) → Plugin\n// Returns a plugin that enables the undo history for an editor. The\n// plugin will track undo and redo stacks, which can be used with the\n// [`undo`](#history.undo) and [`redo`](#history.redo) commands.\n//\n// You can set an `\"addToHistory\"` [metadata\n// property](#state.Transaction.setMeta) of `false` on a transaction\n// to prevent it from being rolled back by undo.\n//\n// config::-\n// Supports the following configuration options:\n//\n// depth:: ?number\n// The amount of history events that are collected before the\n// oldest events are discarded. Defaults to 100.\n//\n// newGroupDelay:: ?number\n// The delay between changes after which a new group should be\n// started. Defaults to 500 (milliseconds). Note that when changes\n// aren't adjacent, a new group is always started.\n\nfunction history(config) {\n config = {\n depth: config && config.depth || 100,\n newGroupDelay: config && config.newGroupDelay || 500\n };\n return new prosemirror_state__WEBPACK_IMPORTED_MODULE_2__[\"Plugin\"]({\n key: historyKey,\n state: {\n init: function init() {\n return new HistoryState(Branch.empty, Branch.empty, null, 0);\n },\n apply: function apply(tr, hist, state) {\n return applyTransaction(hist, state, tr, config);\n }\n },\n config: config\n });\n} // :: (EditorState, ?(tr: Transaction)) → bool\n// A command function that undoes the last change, if any.\n\n\nfunction undo(state, dispatch) {\n var hist = historyKey.getState(state);\n\n if (!hist || hist.done.eventCount == 0) {\n return false;\n }\n\n if (dispatch) {\n histTransaction(hist, state, dispatch, false);\n }\n\n return true;\n} // :: (EditorState, ?(tr: Transaction)) → bool\n// A command function that redoes the last undone change, if any.\n\n\nfunction redo(state, dispatch) {\n var hist = historyKey.getState(state);\n\n if (!hist || hist.undone.eventCount == 0) {\n return false;\n }\n\n if (dispatch) {\n histTransaction(hist, state, dispatch, true);\n }\n\n return true;\n} // :: (EditorState) → number\n// The amount of undoable events available in a given state.\n\n\nfunction undoDepth(state) {\n var hist = historyKey.getState(state);\n return hist ? hist.done.eventCount : 0;\n} // :: (EditorState) → number\n// The amount of redoable events available in a given editor state.\n\n\nfunction redoDepth(state) {\n var hist = historyKey.getState(state);\n return hist ? hist.undone.eventCount : 0;\n}\n\n\n\n//# sourceURL=webpack:///./node_modules/prosemirror-history/dist/index.es.js?"); - -/***/ }), - -/***/ "./node_modules/prosemirror-inputrules/dist/index.es.js": -/*!**************************************************************!*\ - !*** ./node_modules/prosemirror-inputrules/dist/index.es.js ***! - \**************************************************************/ -/*! exports provided: InputRule, closeDoubleQuote, closeSingleQuote, ellipsis, emDash, inputRules, openDoubleQuote, openSingleQuote, smartQuotes, textblockTypeInputRule, undoInputRule, wrappingInputRule */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"InputRule\", function() { return InputRule; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"closeDoubleQuote\", function() { return closeDoubleQuote; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"closeSingleQuote\", function() { return closeSingleQuote; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ellipsis\", function() { return ellipsis; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"emDash\", function() { return emDash; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inputRules\", function() { return inputRules; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"openDoubleQuote\", function() { return openDoubleQuote; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"openSingleQuote\", function() { return openSingleQuote; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"smartQuotes\", function() { return smartQuotes; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"textblockTypeInputRule\", function() { return textblockTypeInputRule; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"undoInputRule\", function() { return undoInputRule; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"wrappingInputRule\", function() { return wrappingInputRule; });\n/* harmony import */ var prosemirror_state__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prosemirror-state */ \"./node_modules/prosemirror-state/dist/index.es.js\");\n/* harmony import */ var prosemirror_transform__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prosemirror-transform */ \"./node_modules/prosemirror-transform/dist/index.es.js\");\n\n // ::- Input rules are regular expressions describing a piece of text\n// that, when typed, causes something to happen. This might be\n// changing two dashes into an emdash, wrapping a paragraph starting\n// with `\"> \"` into a blockquote, or something entirely different.\n\nvar InputRule = function InputRule(match, handler) {\n this.match = match;\n this.handler = typeof handler == \"string\" ? stringHandler(handler) : handler;\n};\n\nfunction stringHandler(string) {\n return function (state, match, start, end) {\n var insert = string;\n\n if (match[1]) {\n var offset = match[0].lastIndexOf(match[1]);\n insert += match[0].slice(offset + match[1].length);\n start += offset;\n var cutOff = start - end;\n\n if (cutOff > 0) {\n insert = match[0].slice(offset - cutOff, offset) + insert;\n start = end;\n }\n }\n\n return state.tr.insertText(insert, start, end);\n };\n}\n\nvar MAX_MATCH = 500; // :: (config: {rules: [InputRule]}) → Plugin\n// Create an input rules plugin. When enabled, it will cause text\n// input that matches any of the given rules to trigger the rule's\n// action.\n\nfunction inputRules(ref) {\n var rules = ref.rules;\n var plugin = new prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"Plugin\"]({\n state: {\n init: function init() {\n return null;\n },\n apply: function apply(tr, prev) {\n var stored = tr.getMeta(this);\n\n if (stored) {\n return stored;\n }\n\n return tr.selectionSet || tr.docChanged ? null : prev;\n }\n },\n props: {\n handleTextInput: function handleTextInput(view, from, to, text) {\n return run(view, from, to, text, rules, plugin);\n },\n handleDOMEvents: {\n compositionend: function compositionend(view) {\n setTimeout(function () {\n var ref = view.state.selection;\n var $cursor = ref.$cursor;\n\n if ($cursor) {\n run(view, $cursor.pos, $cursor.pos, \"\", rules, plugin);\n }\n });\n }\n }\n },\n isInputRules: true\n });\n return plugin;\n}\n\nfunction run(view, from, to, text, rules, plugin) {\n if (view.composing) {\n return false;\n }\n\n var state = view.state,\n $from = state.doc.resolve(from);\n\n if ($from.parent.type.spec.code) {\n return false;\n }\n\n var textBefore = $from.parent.textBetween(Math.max(0, $from.parentOffset - MAX_MATCH), $from.parentOffset, null, \"\\uFFFC\") + text;\n\n for (var i = 0; i < rules.length; i++) {\n var match = rules[i].match.exec(textBefore);\n var tr = match && rules[i].handler(state, match, from - (match[0].length - text.length), to);\n\n if (!tr) {\n continue;\n }\n\n view.dispatch(tr.setMeta(plugin, {\n transform: tr,\n from: from,\n to: to,\n text: text\n }));\n return true;\n }\n\n return false;\n} // :: (EditorState, ?(Transaction)) → bool\n// This is a command that will undo an input rule, if applying such a\n// rule was the last thing that the user did.\n\n\nfunction undoInputRule(state, dispatch) {\n var plugins = state.plugins;\n\n for (var i = 0; i < plugins.length; i++) {\n var plugin = plugins[i],\n undoable = void 0;\n\n if (plugin.spec.isInputRules && (undoable = plugin.getState(state))) {\n if (dispatch) {\n var tr = state.tr,\n toUndo = undoable.transform;\n\n for (var j = toUndo.steps.length - 1; j >= 0; j--) {\n tr.step(toUndo.steps[j].invert(toUndo.docs[j]));\n }\n\n var marks = tr.doc.resolve(undoable.from).marks();\n dispatch(tr.replaceWith(undoable.from, undoable.to, state.schema.text(undoable.text, marks)));\n }\n\n return true;\n }\n }\n\n return false;\n} // :: InputRule Converts double dashes to an emdash.\n\n\nvar emDash = new InputRule(/--$/, \"—\"); // :: InputRule Converts three dots to an ellipsis character.\n\nvar ellipsis = new InputRule(/\\.\\.\\.$/, \"…\"); // :: InputRule “Smart” opening double quotes.\n\nvar openDoubleQuote = new InputRule(/(?:^|[\\s\\{\\[\\(\\<'\"\\u2018\\u201C])(\")$/, \"“\"); // :: InputRule “Smart” closing double quotes.\n\nvar closeDoubleQuote = new InputRule(/\"$/, \"”\"); // :: InputRule “Smart” opening single quotes.\n\nvar openSingleQuote = new InputRule(/(?:^|[\\s\\{\\[\\(\\<'\"\\u2018\\u201C])(')$/, \"‘\"); // :: InputRule “Smart” closing single quotes.\n\nvar closeSingleQuote = new InputRule(/'$/, \"’\"); // :: [InputRule] Smart-quote related input rules.\n\nvar smartQuotes = [openDoubleQuote, closeDoubleQuote, openSingleQuote, closeSingleQuote]; // :: (RegExp, NodeType, ?union, ?([string], Node) → bool) → InputRule\n// Build an input rule for automatically wrapping a textblock when a\n// given string is typed. The `regexp` argument is\n// directly passed through to the `InputRule` constructor. You'll\n// probably want the regexp to start with `^`, so that the pattern can\n// only occur at the start of a textblock.\n//\n// `nodeType` is the type of node to wrap in. If it needs attributes,\n// you can either pass them directly, or pass a function that will\n// compute them from the regular expression match.\n//\n// By default, if there's a node with the same type above the newly\n// wrapped node, the rule will try to [join](#transform.Transform.join) those\n// two nodes. You can pass a join predicate, which takes a regular\n// expression match and the node before the wrapped node, and can\n// return a boolean to indicate whether a join should happen.\n\nfunction wrappingInputRule(regexp, nodeType, getAttrs, joinPredicate) {\n return new InputRule(regexp, function (state, match, start, end) {\n var attrs = getAttrs instanceof Function ? getAttrs(match) : getAttrs;\n var tr = state.tr[\"delete\"](start, end);\n var $start = tr.doc.resolve(start),\n range = $start.blockRange(),\n wrapping = range && Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_1__[\"findWrapping\"])(range, nodeType, attrs);\n\n if (!wrapping) {\n return null;\n }\n\n tr.wrap(range, wrapping);\n var before = tr.doc.resolve(start - 1).nodeBefore;\n\n if (before && before.type == nodeType && Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_1__[\"canJoin\"])(tr.doc, start - 1) && (!joinPredicate || joinPredicate(match, before))) {\n tr.join(start - 1);\n }\n\n return tr;\n });\n} // :: (RegExp, NodeType, ?union) → InputRule\n// Build an input rule that changes the type of a textblock when the\n// matched text is typed into it. You'll usually want to start your\n// regexp with `^` to that it is only matched at the start of a\n// textblock. The optional `getAttrs` parameter can be used to compute\n// the new node's attributes, and works the same as in the\n// `wrappingInputRule` function.\n\n\nfunction textblockTypeInputRule(regexp, nodeType, getAttrs) {\n return new InputRule(regexp, function (state, match, start, end) {\n var $start = state.doc.resolve(start);\n var attrs = getAttrs instanceof Function ? getAttrs(match) : getAttrs;\n\n if (!$start.node(-1).canReplaceWith($start.index(-1), $start.indexAfter(-1), nodeType)) {\n return null;\n }\n\n return state.tr[\"delete\"](start, end).setBlockType(start, start, nodeType, attrs);\n });\n}\n\n\n\n//# sourceURL=webpack:///./node_modules/prosemirror-inputrules/dist/index.es.js?"); - -/***/ }), - -/***/ "./node_modules/prosemirror-keymap/dist/index.es.js": -/*!**********************************************************!*\ - !*** ./node_modules/prosemirror-keymap/dist/index.es.js ***! - \**********************************************************/ -/*! exports provided: keydownHandler, keymap */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"keydownHandler\", function() { return keydownHandler; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"keymap\", function() { return keymap; });\n/* harmony import */ var w3c_keyname__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! w3c-keyname */ \"./node_modules/w3c-keyname/index.es.js\");\n/* harmony import */ var prosemirror_state__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prosemirror-state */ \"./node_modules/prosemirror-state/dist/index.es.js\");\n\n // declare global: navigator\n\nvar mac = typeof navigator != \"undefined\" ? /Mac/.test(navigator.platform) : false;\n\nfunction normalizeKeyName(name) {\n var parts = name.split(/-(?!$)/),\n result = parts[parts.length - 1];\n\n if (result == \"Space\") {\n result = \" \";\n }\n\n var alt, ctrl, shift, meta;\n\n for (var i = 0; i < parts.length - 1; i++) {\n var mod = parts[i];\n\n if (/^(cmd|meta|m)$/i.test(mod)) {\n meta = true;\n } else if (/^a(lt)?$/i.test(mod)) {\n alt = true;\n } else if (/^(c|ctrl|control)$/i.test(mod)) {\n ctrl = true;\n } else if (/^s(hift)?$/i.test(mod)) {\n shift = true;\n } else if (/^mod$/i.test(mod)) {\n if (mac) {\n meta = true;\n } else {\n ctrl = true;\n }\n } else {\n throw new Error(\"Unrecognized modifier name: \" + mod);\n }\n }\n\n if (alt) {\n result = \"Alt-\" + result;\n }\n\n if (ctrl) {\n result = \"Ctrl-\" + result;\n }\n\n if (meta) {\n result = \"Meta-\" + result;\n }\n\n if (shift) {\n result = \"Shift-\" + result;\n }\n\n return result;\n}\n\nfunction normalize(map) {\n var copy = Object.create(null);\n\n for (var prop in map) {\n copy[normalizeKeyName(prop)] = map[prop];\n }\n\n return copy;\n}\n\nfunction modifiers(name, event, shift) {\n if (event.altKey) {\n name = \"Alt-\" + name;\n }\n\n if (event.ctrlKey) {\n name = \"Ctrl-\" + name;\n }\n\n if (event.metaKey) {\n name = \"Meta-\" + name;\n }\n\n if (shift !== false && event.shiftKey) {\n name = \"Shift-\" + name;\n }\n\n return name;\n} // :: (Object) → Plugin\n// Create a keymap plugin for the given set of bindings.\n//\n// Bindings should map key names to [command](#commands)-style\n// functions, which will be called with `(EditorState, dispatch,\n// EditorView)` arguments, and should return true when they've handled\n// the key. Note that the view argument isn't part of the command\n// protocol, but can be used as an escape hatch if a binding needs to\n// directly interact with the UI.\n//\n// Key names may be strings like `\"Shift-Ctrl-Enter\"`—a key\n// identifier prefixed with zero or more modifiers. Key identifiers\n// are based on the strings that can appear in\n// [`KeyEvent.key`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key).\n// Use lowercase letters to refer to letter keys (or uppercase letters\n// if you want shift to be held). You may use `\"Space\"` as an alias\n// for the `\" \"` name.\n//\n// Modifiers can be given in any order. `Shift-` (or `s-`), `Alt-` (or\n// `a-`), `Ctrl-` (or `c-` or `Control-`) and `Cmd-` (or `m-` or\n// `Meta-`) are recognized. For characters that are created by holding\n// shift, the `Shift-` prefix is implied, and should not be added\n// explicitly.\n//\n// You can use `Mod-` as a shorthand for `Cmd-` on Mac and `Ctrl-` on\n// other platforms.\n//\n// You can add multiple keymap plugins to an editor. The order in\n// which they appear determines their precedence (the ones early in\n// the array get to dispatch first).\n\n\nfunction keymap(bindings) {\n return new prosemirror_state__WEBPACK_IMPORTED_MODULE_1__[\"Plugin\"]({\n props: {\n handleKeyDown: keydownHandler(bindings)\n }\n });\n} // :: (Object) → (view: EditorView, event: dom.Event) → bool\n// Given a set of bindings (using the same format as\n// [`keymap`](#keymap.keymap), return a [keydown\n// handler](#view.EditorProps.handleKeyDown) that handles them.\n\n\nfunction keydownHandler(bindings) {\n var map = normalize(bindings);\n return function (view, event) {\n var name = Object(w3c_keyname__WEBPACK_IMPORTED_MODULE_0__[\"keyName\"])(event),\n isChar = name.length == 1 && name != \" \",\n baseName;\n var direct = map[modifiers(name, event, !isChar)];\n\n if (direct && direct(view.state, view.dispatch, view)) {\n return true;\n }\n\n if (isChar && (event.shiftKey || event.altKey || event.metaKey) && (baseName = w3c_keyname__WEBPACK_IMPORTED_MODULE_0__[\"base\"][event.keyCode]) && baseName != name) {\n var fromCode = map[modifiers(baseName, event, true)];\n\n if (fromCode && fromCode(view.state, view.dispatch, view)) {\n return true;\n }\n } else if (isChar && event.shiftKey) {\n var withShift = map[modifiers(name, event, true)];\n\n if (withShift && withShift(view.state, view.dispatch, view)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\n\n\n//# sourceURL=webpack:///./node_modules/prosemirror-keymap/dist/index.es.js?"); - -/***/ }), - -/***/ "./node_modules/prosemirror-markdown/dist/index.es.js": -/*!************************************************************!*\ - !*** ./node_modules/prosemirror-markdown/dist/index.es.js ***! - \************************************************************/ -/*! exports provided: MarkdownParser, MarkdownSerializer, MarkdownSerializerState, defaultMarkdownParser, defaultMarkdownSerializer, schema */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"MarkdownParser\", function() { return MarkdownParser; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"MarkdownSerializer\", function() { return MarkdownSerializer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"MarkdownSerializerState\", function() { return MarkdownSerializerState; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaultMarkdownParser\", function() { return defaultMarkdownParser; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaultMarkdownSerializer\", function() { return defaultMarkdownSerializer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"schema\", function() { return schema; });\n/* harmony import */ var prosemirror_model__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prosemirror-model */ \"./node_modules/prosemirror-model/dist/index.es.js\");\n/* harmony import */ var markdown_it__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! markdown-it */ \"./node_modules/markdown-it/index.js\");\n/* harmony import */ var markdown_it__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(markdown_it__WEBPACK_IMPORTED_MODULE_1__);\n\n // ::Schema Document schema for the data model used by CommonMark.\n\nvar schema = new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Schema\"]({\n nodes: {\n doc: {\n content: \"block+\"\n },\n paragraph: {\n content: \"inline*\",\n group: \"block\",\n parseDOM: [{\n tag: \"p\"\n }],\n toDOM: function toDOM() {\n return [\"p\", 0];\n }\n },\n blockquote: {\n content: \"block+\",\n group: \"block\",\n parseDOM: [{\n tag: \"blockquote\"\n }],\n toDOM: function toDOM() {\n return [\"blockquote\", 0];\n }\n },\n horizontal_rule: {\n group: \"block\",\n parseDOM: [{\n tag: \"hr\"\n }],\n toDOM: function toDOM() {\n return [\"div\", [\"hr\"]];\n }\n },\n heading: {\n attrs: {\n level: {\n \"default\": 1\n }\n },\n content: \"inline*\",\n group: \"block\",\n defining: true,\n parseDOM: [{\n tag: \"h1\",\n attrs: {\n level: 1\n }\n }, {\n tag: \"h2\",\n attrs: {\n level: 2\n }\n }, {\n tag: \"h3\",\n attrs: {\n level: 3\n }\n }, {\n tag: \"h4\",\n attrs: {\n level: 4\n }\n }, {\n tag: \"h5\",\n attrs: {\n level: 5\n }\n }, {\n tag: \"h6\",\n attrs: {\n level: 6\n }\n }],\n toDOM: function toDOM(node) {\n return [\"h\" + node.attrs.level, 0];\n }\n },\n code_block: {\n content: \"text*\",\n group: \"block\",\n code: true,\n defining: true,\n marks: \"\",\n attrs: {\n params: {\n \"default\": \"\"\n }\n },\n parseDOM: [{\n tag: \"pre\",\n preserveWhitespace: \"full\",\n getAttrs: function getAttrs(node) {\n return {\n params: node.getAttribute(\"data-params\") || \"\"\n };\n }\n }],\n toDOM: function toDOM(node) {\n return [\"pre\", node.attrs.params ? {\n \"data-params\": node.attrs.params\n } : {}, [\"code\", 0]];\n }\n },\n ordered_list: {\n content: \"list_item+\",\n group: \"block\",\n attrs: {\n order: {\n \"default\": 1\n },\n tight: {\n \"default\": false\n }\n },\n parseDOM: [{\n tag: \"ol\",\n getAttrs: function getAttrs(dom) {\n return {\n order: dom.hasAttribute(\"start\") ? +dom.getAttribute(\"start\") : 1,\n tight: dom.hasAttribute(\"data-tight\")\n };\n }\n }],\n toDOM: function toDOM(node) {\n return [\"ol\", {\n start: node.attrs.order == 1 ? null : node.attrs.order,\n \"data-tight\": node.attrs.tight ? \"true\" : null\n }, 0];\n }\n },\n bullet_list: {\n content: \"list_item+\",\n group: \"block\",\n attrs: {\n tight: {\n \"default\": false\n }\n },\n parseDOM: [{\n tag: \"ul\",\n getAttrs: function getAttrs(dom) {\n return {\n tight: dom.hasAttribute(\"data-tight\")\n };\n }\n }],\n toDOM: function toDOM(node) {\n return [\"ul\", {\n \"data-tight\": node.attrs.tight ? \"true\" : null\n }, 0];\n }\n },\n list_item: {\n content: \"paragraph block*\",\n defining: true,\n parseDOM: [{\n tag: \"li\"\n }],\n toDOM: function toDOM() {\n return [\"li\", 0];\n }\n },\n text: {\n group: \"inline\"\n },\n image: {\n inline: true,\n attrs: {\n src: {},\n alt: {\n \"default\": null\n },\n title: {\n \"default\": null\n }\n },\n group: \"inline\",\n draggable: true,\n parseDOM: [{\n tag: \"img[src]\",\n getAttrs: function getAttrs(dom) {\n return {\n src: dom.getAttribute(\"src\"),\n title: dom.getAttribute(\"title\"),\n alt: dom.getAttribute(\"alt\")\n };\n }\n }],\n toDOM: function toDOM(node) {\n return [\"img\", node.attrs];\n }\n },\n hard_break: {\n inline: true,\n group: \"inline\",\n selectable: false,\n parseDOM: [{\n tag: \"br\"\n }],\n toDOM: function toDOM() {\n return [\"br\"];\n }\n }\n },\n marks: {\n em: {\n parseDOM: [{\n tag: \"i\"\n }, {\n tag: \"em\"\n }, {\n style: \"font-style\",\n getAttrs: function getAttrs(value) {\n return value == \"italic\" && null;\n }\n }],\n toDOM: function toDOM() {\n return [\"em\"];\n }\n },\n strong: {\n parseDOM: [{\n tag: \"b\"\n }, {\n tag: \"strong\"\n }, {\n style: \"font-weight\",\n getAttrs: function getAttrs(value) {\n return /^(bold(er)?|[5-9]\\d{2,})$/.test(value) && null;\n }\n }],\n toDOM: function toDOM() {\n return [\"strong\"];\n }\n },\n link: {\n attrs: {\n href: {},\n title: {\n \"default\": null\n }\n },\n inclusive: false,\n parseDOM: [{\n tag: \"a[href]\",\n getAttrs: function getAttrs(dom) {\n return {\n href: dom.getAttribute(\"href\"),\n title: dom.getAttribute(\"title\")\n };\n }\n }],\n toDOM: function toDOM(node) {\n return [\"a\", node.attrs];\n }\n },\n code: {\n parseDOM: [{\n tag: \"code\"\n }],\n toDOM: function toDOM() {\n return [\"code\"];\n }\n }\n }\n});\n\nfunction maybeMerge(a, b) {\n if (a.isText && b.isText && prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Mark\"].sameSet(a.marks, b.marks)) {\n return a.withText(a.text + b.text);\n }\n} // Object used to track the context of a running parse.\n\n\nvar MarkdownParseState = function MarkdownParseState(schema, tokenHandlers) {\n this.schema = schema;\n this.stack = [{\n type: schema.topNodeType,\n content: []\n }];\n this.marks = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Mark\"].none;\n this.tokenHandlers = tokenHandlers;\n};\n\nMarkdownParseState.prototype.top = function top() {\n return this.stack[this.stack.length - 1];\n};\n\nMarkdownParseState.prototype.push = function push(elt) {\n if (this.stack.length) {\n this.top().content.push(elt);\n }\n}; // : (string)\n// Adds the given text to the current position in the document,\n// using the current marks as styling.\n\n\nMarkdownParseState.prototype.addText = function addText(text) {\n if (!text) {\n return;\n }\n\n var nodes = this.top().content,\n last = nodes[nodes.length - 1];\n var node = this.schema.text(text, this.marks),\n merged;\n\n if (last && (merged = maybeMerge(last, node))) {\n nodes[nodes.length - 1] = merged;\n } else {\n nodes.push(node);\n }\n}; // : (Mark)\n// Adds the given mark to the set of active marks.\n\n\nMarkdownParseState.prototype.openMark = function openMark(mark) {\n this.marks = mark.addToSet(this.marks);\n}; // : (Mark)\n// Removes the given mark from the set of active marks.\n\n\nMarkdownParseState.prototype.closeMark = function closeMark(mark) {\n this.marks = mark.removeFromSet(this.marks);\n};\n\nMarkdownParseState.prototype.parseTokens = function parseTokens(toks) {\n for (var i = 0; i < toks.length; i++) {\n var tok = toks[i];\n var handler = this.tokenHandlers[tok.type];\n\n if (!handler) {\n throw new Error(\"Token type `\" + tok.type + \"` not supported by Markdown parser\");\n }\n\n handler(this, tok);\n }\n}; // : (NodeType, ?Object, ?[Node]) → ?Node\n// Add a node at the current position.\n\n\nMarkdownParseState.prototype.addNode = function addNode(type, attrs, content) {\n var node = type.createAndFill(attrs, content, this.marks);\n\n if (!node) {\n return null;\n }\n\n this.push(node);\n return node;\n}; // : (NodeType, ?Object)\n// Wrap subsequent content in a node of the given type.\n\n\nMarkdownParseState.prototype.openNode = function openNode(type, attrs) {\n this.stack.push({\n type: type,\n attrs: attrs,\n content: []\n });\n}; // : () → ?Node\n// Close and return the node that is currently on top of the stack.\n\n\nMarkdownParseState.prototype.closeNode = function closeNode() {\n if (this.marks.length) {\n this.marks = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Mark\"].none;\n }\n\n var info = this.stack.pop();\n return this.addNode(info.type, info.attrs, info.content);\n};\n\nfunction attrs(spec, token) {\n if (spec.getAttrs) {\n return spec.getAttrs(token);\n } // For backwards compatibility when `attrs` is a Function\n else if (spec.attrs instanceof Function) {\n return spec.attrs(token);\n } else {\n return spec.attrs;\n }\n} // Code content is represented as a single token with a `content`\n// property in Markdown-it.\n\n\nfunction noOpenClose(type) {\n return type == \"code_inline\" || type == \"code_block\" || type == \"fence\";\n}\n\nfunction withoutTrailingNewline(str) {\n return str[str.length - 1] == \"\\n\" ? str.slice(0, str.length - 1) : str;\n}\n\nfunction noOp() {}\n\nfunction tokenHandlers(schema, tokens) {\n var handlers = Object.create(null);\n\n var loop = function loop(type) {\n var spec = tokens[type];\n\n if (spec.block) {\n var nodeType = schema.nodeType(spec.block);\n\n if (noOpenClose(type)) {\n handlers[type] = function (state, tok) {\n state.openNode(nodeType, attrs(spec, tok));\n state.addText(withoutTrailingNewline(tok.content));\n state.closeNode();\n };\n } else {\n handlers[type + \"_open\"] = function (state, tok) {\n return state.openNode(nodeType, attrs(spec, tok));\n };\n\n handlers[type + \"_close\"] = function (state) {\n return state.closeNode();\n };\n }\n } else if (spec.node) {\n var nodeType$1 = schema.nodeType(spec.node);\n\n handlers[type] = function (state, tok) {\n return state.addNode(nodeType$1, attrs(spec, tok));\n };\n } else if (spec.mark) {\n var markType = schema.marks[spec.mark];\n\n if (noOpenClose(type)) {\n handlers[type] = function (state, tok) {\n state.openMark(markType.create(attrs(spec, tok)));\n state.addText(withoutTrailingNewline(tok.content));\n state.closeMark(markType);\n };\n } else {\n handlers[type + \"_open\"] = function (state, tok) {\n return state.openMark(markType.create(attrs(spec, tok)));\n };\n\n handlers[type + \"_close\"] = function (state) {\n return state.closeMark(markType);\n };\n }\n } else if (spec.ignore) {\n if (noOpenClose(type)) {\n handlers[type] = noOp;\n } else {\n handlers[type + '_open'] = noOp;\n handlers[type + '_close'] = noOp;\n }\n } else {\n throw new RangeError(\"Unrecognized parsing spec \" + JSON.stringify(spec));\n }\n };\n\n for (var type in tokens) {\n loop(type);\n }\n\n handlers.text = function (state, tok) {\n return state.addText(tok.content);\n };\n\n handlers.inline = function (state, tok) {\n return state.parseTokens(tok.children);\n };\n\n handlers.softbreak = handlers.softbreak || function (state) {\n return state.addText(\"\\n\");\n };\n\n return handlers;\n} // ::- A configuration of a Markdown parser. Such a parser uses\n// [markdown-it](https://github.com/markdown-it/markdown-it) to\n// tokenize a file, and then runs the custom rules it is given over\n// the tokens to create a ProseMirror document tree.\n\n\nvar MarkdownParser = function MarkdownParser(schema, tokenizer, tokens) {\n // :: Object The value of the `tokens` object used to construct\n // this parser. Can be useful to copy and modify to base other\n // parsers on.\n this.tokens = tokens;\n this.schema = schema;\n this.tokenizer = tokenizer;\n this.tokenHandlers = tokenHandlers(schema, tokens);\n}; // :: (string) → Node\n// Parse a string as [CommonMark](http://commonmark.org/) markup,\n// and create a ProseMirror document as prescribed by this parser's\n// rules.\n\n\nMarkdownParser.prototype.parse = function parse(text) {\n var state = new MarkdownParseState(this.schema, this.tokenHandlers),\n doc;\n state.parseTokens(this.tokenizer.parse(text, {}));\n\n do {\n doc = state.closeNode();\n } while (state.stack.length);\n\n return doc;\n}; // :: MarkdownParser\n// A parser parsing unextended [CommonMark](http://commonmark.org/),\n// without inline HTML, and producing a document in the basic schema.\n\n\nvar defaultMarkdownParser = new MarkdownParser(schema, markdown_it__WEBPACK_IMPORTED_MODULE_1___default()(\"commonmark\", {\n html: false\n}), {\n blockquote: {\n block: \"blockquote\"\n },\n paragraph: {\n block: \"paragraph\"\n },\n list_item: {\n block: \"list_item\"\n },\n bullet_list: {\n block: \"bullet_list\"\n },\n ordered_list: {\n block: \"ordered_list\",\n getAttrs: function getAttrs(tok) {\n return {\n order: +tok.attrGet(\"start\") || 1\n };\n }\n },\n heading: {\n block: \"heading\",\n getAttrs: function getAttrs(tok) {\n return {\n level: +tok.tag.slice(1)\n };\n }\n },\n code_block: {\n block: \"code_block\"\n },\n fence: {\n block: \"code_block\",\n getAttrs: function getAttrs(tok) {\n return {\n params: tok.info || \"\"\n };\n }\n },\n hr: {\n node: \"horizontal_rule\"\n },\n image: {\n node: \"image\",\n getAttrs: function getAttrs(tok) {\n return {\n src: tok.attrGet(\"src\"),\n title: tok.attrGet(\"title\") || null,\n alt: tok.children[0] && tok.children[0].content || null\n };\n }\n },\n hardbreak: {\n node: \"hard_break\"\n },\n em: {\n mark: \"em\"\n },\n strong: {\n mark: \"strong\"\n },\n link: {\n mark: \"link\",\n getAttrs: function getAttrs(tok) {\n return {\n href: tok.attrGet(\"href\"),\n title: tok.attrGet(\"title\") || null\n };\n }\n },\n code_inline: {\n mark: \"code\"\n }\n}); // ::- A specification for serializing a ProseMirror document as\n// Markdown/CommonMark text.\n\nvar MarkdownSerializer = function MarkdownSerializer(nodes, marks) {\n // :: Object<(MarkdownSerializerState, Node)> The node serializer\n // functions for this serializer.\n this.nodes = nodes; // :: Object The mark serializer info.\n\n this.marks = marks;\n}; // :: (Node, ?Object) → string\n// Serialize the content of the given node to\n// [CommonMark](http://commonmark.org/).\n\n\nMarkdownSerializer.prototype.serialize = function serialize(content, options) {\n var state = new MarkdownSerializerState(this.nodes, this.marks, options);\n state.renderContent(content);\n return state.out;\n}; // :: MarkdownSerializer\n// A serializer for the [basic schema](#schema).\n\n\nvar defaultMarkdownSerializer = new MarkdownSerializer({\n blockquote: function blockquote(state, node) {\n state.wrapBlock(\"> \", null, node, function () {\n return state.renderContent(node);\n });\n },\n code_block: function code_block(state, node) {\n state.write(\"```\" + (node.attrs.params || \"\") + \"\\n\");\n state.text(node.textContent, false);\n state.ensureNewLine();\n state.write(\"```\");\n state.closeBlock(node);\n },\n heading: function heading(state, node) {\n state.write(state.repeat(\"#\", node.attrs.level) + \" \");\n state.renderInline(node);\n state.closeBlock(node);\n },\n horizontal_rule: function horizontal_rule(state, node) {\n state.write(node.attrs.markup || \"---\");\n state.closeBlock(node);\n },\n bullet_list: function bullet_list(state, node) {\n state.renderList(node, \" \", function () {\n return (node.attrs.bullet || \"*\") + \" \";\n });\n },\n ordered_list: function ordered_list(state, node) {\n var start = node.attrs.order || 1;\n var maxW = String(start + node.childCount - 1).length;\n var space = state.repeat(\" \", maxW + 2);\n state.renderList(node, space, function (i) {\n var nStr = String(start + i);\n return state.repeat(\" \", maxW - nStr.length) + nStr + \". \";\n });\n },\n list_item: function list_item(state, node) {\n state.renderContent(node);\n },\n paragraph: function paragraph(state, node) {\n state.renderInline(node);\n state.closeBlock(node);\n },\n image: function image(state, node) {\n state.write(\"![\" + state.esc(node.attrs.alt || \"\") + \"](\" + state.esc(node.attrs.src) + (node.attrs.title ? \" \" + state.quote(node.attrs.title) : \"\") + \")\");\n },\n hard_break: function hard_break(state, node, parent, index) {\n for (var i = index + 1; i < parent.childCount; i++) {\n if (parent.child(i).type != node.type) {\n state.write(\"\\\\\\n\");\n return;\n }\n }\n },\n text: function text(state, node) {\n state.text(node.text);\n }\n}, {\n em: {\n open: \"*\",\n close: \"*\",\n mixable: true,\n expelEnclosingWhitespace: true\n },\n strong: {\n open: \"**\",\n close: \"**\",\n mixable: true,\n expelEnclosingWhitespace: true\n },\n link: {\n open: function open(_state, mark, parent, index) {\n return isPlainURL(mark, parent, index, 1) ? \"<\" : \"[\";\n },\n close: function close(state, mark, parent, index) {\n return isPlainURL(mark, parent, index, -1) ? \">\" : \"](\" + state.esc(mark.attrs.href) + (mark.attrs.title ? \" \" + state.quote(mark.attrs.title) : \"\") + \")\";\n }\n },\n code: {\n open: function open(_state, _mark, parent, index) {\n return backticksFor(parent.child(index), -1);\n },\n close: function close(_state, _mark, parent, index) {\n return backticksFor(parent.child(index - 1), 1);\n },\n escape: false\n }\n});\n\nfunction backticksFor(node, side) {\n var ticks = /`+/g,\n m,\n len = 0;\n\n if (node.isText) {\n while (m = ticks.exec(node.text)) {\n len = Math.max(len, m[0].length);\n }\n }\n\n var result = len > 0 && side > 0 ? \" `\" : \"`\";\n\n for (var i = 0; i < len; i++) {\n result += \"`\";\n }\n\n if (len > 0 && side < 0) {\n result += \" \";\n }\n\n return result;\n}\n\nfunction isPlainURL(link, parent, index, side) {\n if (link.attrs.title || !/^\\w+:/.test(link.attrs.href)) {\n return false;\n }\n\n var content = parent.child(index + (side < 0 ? -1 : 0));\n\n if (!content.isText || content.text != link.attrs.href || content.marks[content.marks.length - 1] != link) {\n return false;\n }\n\n if (index == (side < 0 ? 1 : parent.childCount - 1)) {\n return true;\n }\n\n var next = parent.child(index + (side < 0 ? -2 : 1));\n return !link.isInSet(next.marks);\n} // ::- This is an object used to track state and expose\n// methods related to markdown serialization. Instances are passed to\n// node and mark serialization methods (see `toMarkdown`).\n\n\nvar MarkdownSerializerState = function MarkdownSerializerState(nodes, marks, options) {\n this.nodes = nodes;\n this.marks = marks;\n this.delim = this.out = \"\";\n this.closed = false;\n this.inTightList = false; // :: Object\n // The options passed to the serializer.\n // tightLists:: ?bool\n // Whether to render lists in a tight style. This can be overridden\n // on a node level by specifying a tight attribute on the node.\n // Defaults to false.\n\n this.options = options || {};\n\n if (typeof this.options.tightLists == \"undefined\") {\n this.options.tightLists = false;\n }\n};\n\nMarkdownSerializerState.prototype.flushClose = function flushClose(size) {\n if (this.closed) {\n if (!this.atBlank()) {\n this.out += \"\\n\";\n }\n\n if (size == null) {\n size = 2;\n }\n\n if (size > 1) {\n var delimMin = this.delim;\n var trim = /\\s+$/.exec(delimMin);\n\n if (trim) {\n delimMin = delimMin.slice(0, delimMin.length - trim[0].length);\n }\n\n for (var i = 1; i < size; i++) {\n this.out += delimMin + \"\\n\";\n }\n }\n\n this.closed = false;\n }\n}; // :: (string, ?string, Node, ())\n// Render a block, prefixing each line with `delim`, and the first\n// line in `firstDelim`. `node` should be the node that is closed at\n// the end of the block, and `f` is a function that renders the\n// content of the block.\n\n\nMarkdownSerializerState.prototype.wrapBlock = function wrapBlock(delim, firstDelim, node, f) {\n var old = this.delim;\n this.write(firstDelim || delim);\n this.delim += delim;\n f();\n this.delim = old;\n this.closeBlock(node);\n};\n\nMarkdownSerializerState.prototype.atBlank = function atBlank() {\n return /(^|\\n)$/.test(this.out);\n}; // :: ()\n// Ensure the current content ends with a newline.\n\n\nMarkdownSerializerState.prototype.ensureNewLine = function ensureNewLine() {\n if (!this.atBlank()) {\n this.out += \"\\n\";\n }\n}; // :: (?string)\n// Prepare the state for writing output (closing closed paragraphs,\n// adding delimiters, and so on), and then optionally add content\n// (unescaped) to the output.\n\n\nMarkdownSerializerState.prototype.write = function write(content) {\n this.flushClose();\n\n if (this.delim && this.atBlank()) {\n this.out += this.delim;\n }\n\n if (content) {\n this.out += content;\n }\n}; // :: (Node)\n// Close the block for the given node.\n\n\nMarkdownSerializerState.prototype.closeBlock = function closeBlock(node) {\n this.closed = node;\n}; // :: (string, ?bool)\n// Add the given text to the document. When escape is not `false`,\n// it will be escaped.\n\n\nMarkdownSerializerState.prototype.text = function text(text$1, escape) {\n var lines = text$1.split(\"\\n\");\n\n for (var i = 0; i < lines.length; i++) {\n var startOfLine = this.atBlank() || this.closed;\n this.write();\n this.out += escape !== false ? this.esc(lines[i], startOfLine) : lines[i];\n\n if (i != lines.length - 1) {\n this.out += \"\\n\";\n }\n }\n}; // :: (Node)\n// Render the given node as a block.\n\n\nMarkdownSerializerState.prototype.render = function render(node, parent, index) {\n if (typeof parent == \"number\") {\n throw new Error(\"!\");\n }\n\n this.nodes[node.type.name](this, node, parent, index);\n}; // :: (Node)\n// Render the contents of `parent` as block nodes.\n\n\nMarkdownSerializerState.prototype.renderContent = function renderContent(parent) {\n var this$1 = this;\n parent.forEach(function (node, _, i) {\n return this$1.render(node, parent, i);\n });\n}; // :: (Node)\n// Render the contents of `parent` as inline content.\n\n\nMarkdownSerializerState.prototype.renderInline = function renderInline(parent) {\n var this$1 = this;\n var active = [],\n trailing = \"\";\n\n var progress = function progress(node, _, index) {\n var marks = node ? node.marks : []; // Remove marks from `hard_break` that are the last node inside\n // that mark to prevent parser edge cases with new lines just\n // before closing marks.\n // (FIXME it'd be nice if we had a schema-agnostic way to\n // identify nodes that serialize as hard breaks)\n\n if (node && node.type.name === \"hard_break\") {\n marks = marks.filter(function (m) {\n if (index + 1 == parent.childCount) {\n return false;\n }\n\n var next = parent.child(index + 1);\n return m.isInSet(next.marks) && (!next.isText || /\\S/.test(next.text));\n });\n }\n\n var leading = trailing;\n trailing = \"\"; // If whitespace has to be expelled from the node, adjust\n // leading and trailing accordingly.\n\n if (node && node.isText && marks.some(function (mark) {\n var info = this$1.marks[mark.type.name];\n return info && info.expelEnclosingWhitespace;\n })) {\n var ref = /^(\\s*)(.*?)(\\s*)$/m.exec(node.text);\n var _$1 = ref[0];\n var lead = ref[1];\n var inner$1 = ref[2];\n var trail = ref[3];\n leading += lead;\n trailing = trail;\n\n if (lead || trail) {\n node = inner$1 ? node.withText(inner$1) : null;\n\n if (!node) {\n marks = active;\n }\n }\n }\n\n var inner = marks.length && marks[marks.length - 1],\n noEsc = inner && this$1.marks[inner.type.name].escape === false;\n var len = marks.length - (noEsc ? 1 : 0); // Try to reorder 'mixable' marks, such as em and strong, which\n // in Markdown may be opened and closed in different order, so\n // that order of the marks for the token matches the order in\n // active.\n\n outer: for (var i = 0; i < len; i++) {\n var mark = marks[i];\n\n if (!this$1.marks[mark.type.name].mixable) {\n break;\n }\n\n for (var j = 0; j < active.length; j++) {\n var other = active[j];\n\n if (!this$1.marks[other.type.name].mixable) {\n break;\n }\n\n if (mark.eq(other)) {\n if (i > j) {\n marks = marks.slice(0, j).concat(mark).concat(marks.slice(j, i)).concat(marks.slice(i + 1, len));\n } else if (j > i) {\n marks = marks.slice(0, i).concat(marks.slice(i + 1, j)).concat(mark).concat(marks.slice(j, len));\n }\n\n continue outer;\n }\n }\n } // Find the prefix of the mark set that didn't change\n\n\n var keep = 0;\n\n while (keep < Math.min(active.length, len) && marks[keep].eq(active[keep])) {\n ++keep;\n } // Close the marks that need to be closed\n\n\n while (keep < active.length) {\n this$1.text(this$1.markString(active.pop(), false, parent, index), false);\n } // Output any previously expelled trailing whitespace outside the marks\n\n\n if (leading) {\n this$1.text(leading);\n } // Open the marks that need to be opened\n\n\n if (node) {\n while (active.length < len) {\n var add = marks[active.length];\n active.push(add);\n this$1.text(this$1.markString(add, true, parent, index), false);\n } // Render the node. Special case code marks, since their content\n // may not be escaped.\n\n\n if (noEsc && node.isText) {\n this$1.text(this$1.markString(inner, true, parent, index) + node.text + this$1.markString(inner, false, parent, index + 1), false);\n } else {\n this$1.render(node, parent, index);\n }\n }\n };\n\n parent.forEach(progress);\n progress(null, null, parent.childCount);\n}; // :: (Node, string, (number) → string)\n// Render a node's content as a list. `delim` should be the extra\n// indentation added to all lines except the first in an item,\n// `firstDelim` is a function going from an item index to a\n// delimiter for the first line of the item.\n\n\nMarkdownSerializerState.prototype.renderList = function renderList(node, delim, firstDelim) {\n var this$1 = this;\n\n if (this.closed && this.closed.type == node.type) {\n this.flushClose(3);\n } else if (this.inTightList) {\n this.flushClose(1);\n }\n\n var isTight = typeof node.attrs.tight != \"undefined\" ? node.attrs.tight : this.options.tightLists;\n var prevTight = this.inTightList;\n this.inTightList = isTight;\n node.forEach(function (child, _, i) {\n if (i && isTight) {\n this$1.flushClose(1);\n }\n\n this$1.wrapBlock(delim, firstDelim(i), node, function () {\n return this$1.render(child, node, i);\n });\n });\n this.inTightList = prevTight;\n}; // :: (string, ?bool) → string\n// Escape the given string so that it can safely appear in Markdown\n// content. If `startOfLine` is true, also escape characters that\n// has special meaning only at the start of the line.\n\n\nMarkdownSerializerState.prototype.esc = function esc(str, startOfLine) {\n str = str.replace(/[`*\\\\~\\[\\]]/g, \"\\\\$&\");\n\n if (startOfLine) {\n str = str.replace(/^[:#\\-*+]/, \"\\\\$&\").replace(/^(\\d+)\\./, \"$1\\\\.\");\n }\n\n return str;\n};\n\nMarkdownSerializerState.prototype.quote = function quote(str) {\n var wrap = str.indexOf('\"') == -1 ? '\"\"' : str.indexOf(\"'\") == -1 ? \"''\" : \"()\";\n return wrap[0] + str + wrap[1];\n}; // :: (string, number) → string\n// Repeat the given string `n` times.\n\n\nMarkdownSerializerState.prototype.repeat = function repeat(str, n) {\n var out = \"\";\n\n for (var i = 0; i < n; i++) {\n out += str;\n }\n\n return out;\n}; // : (Mark, bool, string?) → string\n// Get the markdown string for a given opening or closing mark.\n\n\nMarkdownSerializerState.prototype.markString = function markString(mark, open, parent, index) {\n var info = this.marks[mark.type.name];\n var value = open ? info.open : info.close;\n return typeof value == \"string\" ? value : value(this, mark, parent, index);\n}; // :: (string) → { leading: ?string, trailing: ?string }\n// Get leading and trailing whitespace from a string. Values of\n// leading or trailing property of the return object will be undefined\n// if there is no match.\n\n\nMarkdownSerializerState.prototype.getEnclosingWhitespace = function getEnclosingWhitespace(text) {\n return {\n leading: (text.match(/^(\\s+)/) || [])[0],\n trailing: (text.match(/(\\s+)$/) || [])[0]\n };\n};\n\n\n\n//# sourceURL=webpack:///./node_modules/prosemirror-markdown/dist/index.es.js?"); - -/***/ }), - -/***/ "./node_modules/prosemirror-menu/dist/index.es.js": -/*!********************************************************!*\ - !*** ./node_modules/prosemirror-menu/dist/index.es.js ***! - \********************************************************/ -/*! exports provided: Dropdown, DropdownSubmenu, MenuItem, blockTypeItem, icons, joinUpItem, liftItem, menuBar, redoItem, renderGrouped, selectParentNodeItem, undoItem, wrapItem */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Dropdown\", function() { return Dropdown; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"DropdownSubmenu\", function() { return DropdownSubmenu; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"MenuItem\", function() { return MenuItem; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"blockTypeItem\", function() { return blockTypeItem; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"icons\", function() { return icons; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"joinUpItem\", function() { return joinUpItem; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"liftItem\", function() { return liftItem; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"menuBar\", function() { return menuBar; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"redoItem\", function() { return redoItem; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"renderGrouped\", function() { return renderGrouped; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"selectParentNodeItem\", function() { return selectParentNodeItem; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"undoItem\", function() { return undoItem; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"wrapItem\", function() { return wrapItem; });\n/* harmony import */ var crel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! crel */ \"./node_modules/crel/crel.es.js\");\n/* harmony import */ var prosemirror_commands__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prosemirror-commands */ \"./node_modules/prosemirror-commands/dist/index.es.js\");\n/* harmony import */ var prosemirror_history__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prosemirror-history */ \"./node_modules/prosemirror-history/dist/index.es.js\");\n/* harmony import */ var prosemirror_state__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prosemirror-state */ \"./node_modules/prosemirror-state/dist/index.es.js\");\n\n\n\n\nvar SVG = \"http://www.w3.org/2000/svg\";\nvar XLINK = \"http://www.w3.org/1999/xlink\";\nvar prefix = \"ProseMirror-icon\";\n\nfunction hashPath(path) {\n var hash = 0;\n\n for (var i = 0; i < path.length; i++) {\n hash = (hash << 5) - hash + path.charCodeAt(i) | 0;\n }\n\n return hash;\n}\n\nfunction getIcon(icon) {\n var node = document.createElement(\"div\");\n node.className = prefix;\n\n if (icon.path) {\n var name = \"pm-icon-\" + hashPath(icon.path).toString(16);\n\n if (!document.getElementById(name)) {\n buildSVG(name, icon);\n }\n\n var svg = node.appendChild(document.createElementNS(SVG, \"svg\"));\n svg.style.width = icon.width / icon.height + \"em\";\n var use = svg.appendChild(document.createElementNS(SVG, \"use\"));\n use.setAttributeNS(XLINK, \"href\", /([^#]*)/.exec(document.location)[1] + \"#\" + name);\n } else if (icon.dom) {\n node.appendChild(icon.dom.cloneNode(true));\n } else {\n node.appendChild(document.createElement(\"span\")).textContent = icon.text || '';\n\n if (icon.css) {\n node.firstChild.style.cssText = icon.css;\n }\n }\n\n return node;\n}\n\nfunction buildSVG(name, data) {\n var collection = document.getElementById(prefix + \"-collection\");\n\n if (!collection) {\n collection = document.createElementNS(SVG, \"svg\");\n collection.id = prefix + \"-collection\";\n collection.style.display = \"none\";\n document.body.insertBefore(collection, document.body.firstChild);\n }\n\n var sym = document.createElementNS(SVG, \"symbol\");\n sym.id = name;\n sym.setAttribute(\"viewBox\", \"0 0 \" + data.width + \" \" + data.height);\n var path = sym.appendChild(document.createElementNS(SVG, \"path\"));\n path.setAttribute(\"d\", data.path);\n collection.appendChild(sym);\n}\n\nvar prefix$1 = \"ProseMirror-menu\"; // ::- An icon or label that, when clicked, executes a command.\n\nvar MenuItem = function MenuItem(spec) {\n // :: MenuItemSpec\n // The spec used to create the menu item.\n this.spec = spec;\n}; // :: (EditorView) → {dom: dom.Node, update: (EditorState) → bool}\n// Renders the icon according to its [display\n// spec](#menu.MenuItemSpec.display), and adds an event handler which\n// executes the command when the representation is clicked.\n\n\nMenuItem.prototype.render = function render(view) {\n var spec = this.spec;\n var dom = spec.render ? spec.render(view) : spec.icon ? getIcon(spec.icon) : spec.label ? Object(crel__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"div\", null, translate(view, spec.label)) : null;\n\n if (!dom) {\n throw new RangeError(\"MenuItem without icon or label property\");\n }\n\n if (spec.title) {\n var title = typeof spec.title === \"function\" ? spec.title(view.state) : spec.title;\n dom.setAttribute(\"title\", translate(view, title));\n }\n\n if (spec[\"class\"]) {\n dom.classList.add(spec[\"class\"]);\n }\n\n if (spec.css) {\n dom.style.cssText += spec.css;\n }\n\n dom.addEventListener(\"mousedown\", function (e) {\n e.preventDefault();\n\n if (!dom.classList.contains(prefix$1 + \"-disabled\")) {\n spec.run(view.state, view.dispatch, view, e);\n }\n });\n\n function update(state) {\n if (spec.select) {\n var selected = spec.select(state);\n dom.style.display = selected ? \"\" : \"none\";\n\n if (!selected) {\n return false;\n }\n }\n\n var enabled = true;\n\n if (spec.enable) {\n enabled = spec.enable(state) || false;\n setClass(dom, prefix$1 + \"-disabled\", !enabled);\n }\n\n if (spec.active) {\n var active = enabled && spec.active(state) || false;\n setClass(dom, prefix$1 + \"-active\", active);\n }\n\n return true;\n }\n\n return {\n dom: dom,\n update: update\n };\n};\n\nfunction translate(view, text) {\n return view._props.translate ? view._props.translate(text) : text;\n} // MenuItemSpec:: interface\n// The configuration object passed to the `MenuItem` constructor.\n//\n// run:: (EditorState, (Transaction), EditorView, dom.Event)\n// The function to execute when the menu item is activated.\n//\n// select:: ?(EditorState) → bool\n// Optional function that is used to determine whether the item is\n// appropriate at the moment. Deselected items will be hidden.\n//\n// enable:: ?(EditorState) → bool\n// Function that is used to determine if the item is enabled. If\n// given and returning false, the item will be given a disabled\n// styling.\n//\n// active:: ?(EditorState) → bool\n// A predicate function to determine whether the item is 'active' (for\n// example, the item for toggling the strong mark might be active then\n// the cursor is in strong text).\n//\n// render:: ?(EditorView) → dom.Node\n// A function that renders the item. You must provide either this,\n// [`icon`](#menu.MenuItemSpec.icon), or [`label`](#MenuItemSpec.label).\n//\n// icon:: ?Object\n// Describes an icon to show for this item. The object may specify\n// an SVG icon, in which case its `path` property should be an [SVG\n// path\n// spec](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d),\n// and `width` and `height` should provide the viewbox in which that\n// path exists. Alternatively, it may have a `text` property\n// specifying a string of text that makes up the icon, with an\n// optional `css` property giving additional CSS styling for the\n// text. _Or_ it may contain `dom` property containing a DOM node.\n//\n// label:: ?string\n// Makes the item show up as a text label. Mostly useful for items\n// wrapped in a [drop-down](#menu.Dropdown) or similar menu. The object\n// should have a `label` property providing the text to display.\n//\n// title:: ?union\n// Defines DOM title (mouseover) text for the item.\n//\n// class:: ?string\n// Optionally adds a CSS class to the item's DOM representation.\n//\n// css:: ?string\n// Optionally adds a string of inline CSS to the item's DOM\n// representation.\n\n\nvar lastMenuEvent = {\n time: 0,\n node: null\n};\n\nfunction markMenuEvent(e) {\n lastMenuEvent.time = Date.now();\n lastMenuEvent.node = e.target;\n}\n\nfunction isMenuEvent(wrapper) {\n return Date.now() - 100 < lastMenuEvent.time && lastMenuEvent.node && wrapper.contains(lastMenuEvent.node);\n} // ::- A drop-down menu, displayed as a label with a downwards-pointing\n// triangle to the right of it.\n\n\nvar Dropdown = function Dropdown(content, options) {\n this.options = options || {};\n this.content = Array.isArray(content) ? content : [content];\n}; // :: (EditorView) → {dom: dom.Node, update: (EditorState)}\n// Render the dropdown menu and sub-items.\n\n\nDropdown.prototype.render = function render(view) {\n var this$1 = this;\n var content = renderDropdownItems(this.content, view);\n var label = Object(crel__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"div\", {\n \"class\": prefix$1 + \"-dropdown \" + (this.options[\"class\"] || \"\"),\n style: this.options.css\n }, translate(view, this.options.label));\n\n if (this.options.title) {\n label.setAttribute(\"title\", translate(view, this.options.title));\n }\n\n var wrap = Object(crel__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"div\", {\n \"class\": prefix$1 + \"-dropdown-wrap\"\n }, label);\n var open = null,\n listeningOnClose = null;\n\n var close = function close() {\n if (open && open.close()) {\n open = null;\n window.removeEventListener(\"mousedown\", listeningOnClose);\n }\n };\n\n label.addEventListener(\"mousedown\", function (e) {\n e.preventDefault();\n markMenuEvent(e);\n\n if (open) {\n close();\n } else {\n open = this$1.expand(wrap, content.dom);\n window.addEventListener(\"mousedown\", listeningOnClose = function listeningOnClose() {\n if (!isMenuEvent(wrap)) {\n close();\n }\n });\n }\n });\n\n function update(state) {\n var inner = content.update(state);\n wrap.style.display = inner ? \"\" : \"none\";\n return inner;\n }\n\n return {\n dom: wrap,\n update: update\n };\n};\n\nDropdown.prototype.expand = function expand(dom, items) {\n var menuDOM = Object(crel__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"div\", {\n \"class\": prefix$1 + \"-dropdown-menu \" + (this.options[\"class\"] || \"\")\n }, items);\n var done = false;\n\n function close() {\n if (done) {\n return;\n }\n\n done = true;\n dom.removeChild(menuDOM);\n return true;\n }\n\n dom.appendChild(menuDOM);\n return {\n close: close,\n node: menuDOM\n };\n};\n\nfunction renderDropdownItems(items, view) {\n var rendered = [],\n updates = [];\n\n for (var i = 0; i < items.length; i++) {\n var ref = items[i].render(view);\n var dom = ref.dom;\n var update = ref.update;\n rendered.push(Object(crel__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"div\", {\n \"class\": prefix$1 + \"-dropdown-item\"\n }, dom));\n updates.push(update);\n }\n\n return {\n dom: rendered,\n update: combineUpdates(updates, rendered)\n };\n}\n\nfunction combineUpdates(updates, nodes) {\n return function (state) {\n var something = false;\n\n for (var i = 0; i < updates.length; i++) {\n var up = updates[i](state);\n nodes[i].style.display = up ? \"\" : \"none\";\n\n if (up) {\n something = true;\n }\n }\n\n return something;\n };\n} // ::- Represents a submenu wrapping a group of elements that start\n// hidden and expand to the right when hovered over or tapped.\n\n\nvar DropdownSubmenu = function DropdownSubmenu(content, options) {\n this.options = options || {};\n this.content = Array.isArray(content) ? content : [content];\n}; // :: (EditorView) → {dom: dom.Node, update: (EditorState) → bool}\n// Renders the submenu.\n\n\nDropdownSubmenu.prototype.render = function render(view) {\n var items = renderDropdownItems(this.content, view);\n var label = Object(crel__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"div\", {\n \"class\": prefix$1 + \"-submenu-label\"\n }, translate(view, this.options.label));\n var wrap = Object(crel__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"div\", {\n \"class\": prefix$1 + \"-submenu-wrap\"\n }, label, Object(crel__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"div\", {\n \"class\": prefix$1 + \"-submenu\"\n }, items.dom));\n var _listeningOnClose = null;\n label.addEventListener(\"mousedown\", function (e) {\n e.preventDefault();\n markMenuEvent(e);\n setClass(wrap, prefix$1 + \"-submenu-wrap-active\");\n\n if (!_listeningOnClose) {\n window.addEventListener(\"mousedown\", _listeningOnClose = function listeningOnClose() {\n if (!isMenuEvent(wrap)) {\n wrap.classList.remove(prefix$1 + \"-submenu-wrap-active\");\n window.removeEventListener(\"mousedown\", _listeningOnClose);\n _listeningOnClose = null;\n }\n });\n }\n });\n\n function update(state) {\n var inner = items.update(state);\n wrap.style.display = inner ? \"\" : \"none\";\n return inner;\n }\n\n return {\n dom: wrap,\n update: update\n };\n}; // :: (EditorView, [union]) → {dom: ?dom.DocumentFragment, update: (EditorState) → bool}\n// Render the given, possibly nested, array of menu elements into a\n// document fragment, placing separators between them (and ensuring no\n// superfluous separators appear when some of the groups turn out to\n// be empty).\n\n\nfunction renderGrouped(view, content) {\n var result = document.createDocumentFragment();\n var updates = [],\n separators = [];\n\n for (var i = 0; i < content.length; i++) {\n var items = content[i],\n localUpdates = [],\n localNodes = [];\n\n for (var j = 0; j < items.length; j++) {\n var ref = items[j].render(view);\n var dom = ref.dom;\n var update$1 = ref.update;\n var span = Object(crel__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"span\", {\n \"class\": prefix$1 + \"item\"\n }, dom);\n result.appendChild(span);\n localNodes.push(span);\n localUpdates.push(update$1);\n }\n\n if (localUpdates.length) {\n updates.push(combineUpdates(localUpdates, localNodes));\n\n if (i < content.length - 1) {\n separators.push(result.appendChild(separator()));\n }\n }\n }\n\n function update(state) {\n var something = false,\n needSep = false;\n\n for (var i = 0; i < updates.length; i++) {\n var hasContent = updates[i](state);\n\n if (i) {\n separators[i - 1].style.display = needSep && hasContent ? \"\" : \"none\";\n }\n\n needSep = hasContent;\n\n if (hasContent) {\n something = true;\n }\n }\n\n return something;\n }\n\n return {\n dom: result,\n update: update\n };\n}\n\nfunction separator() {\n return Object(crel__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"span\", {\n \"class\": prefix$1 + \"separator\"\n });\n} // :: Object\n// A set of basic editor-related icons. Contains the properties\n// `join`, `lift`, `selectParentNode`, `undo`, `redo`, `strong`, `em`,\n// `code`, `link`, `bulletList`, `orderedList`, and `blockquote`, each\n// holding an object that can be used as the `icon` option to\n// `MenuItem`.\n\n\nvar icons = {\n join: {\n width: 800,\n height: 900,\n path: \"M0 75h800v125h-800z M0 825h800v-125h-800z M250 400h100v-100h100v100h100v100h-100v100h-100v-100h-100z\"\n },\n lift: {\n width: 1024,\n height: 1024,\n path: \"M219 310v329q0 7-5 12t-12 5q-8 0-13-5l-164-164q-5-5-5-13t5-13l164-164q5-5 13-5 7 0 12 5t5 12zM1024 749v109q0 7-5 12t-12 5h-987q-7 0-12-5t-5-12v-109q0-7 5-12t12-5h987q7 0 12 5t5 12zM1024 530v109q0 7-5 12t-12 5h-621q-7 0-12-5t-5-12v-109q0-7 5-12t12-5h621q7 0 12 5t5 12zM1024 310v109q0 7-5 12t-12 5h-621q-7 0-12-5t-5-12v-109q0-7 5-12t12-5h621q7 0 12 5t5 12zM1024 91v109q0 7-5 12t-12 5h-987q-7 0-12-5t-5-12v-109q0-7 5-12t12-5h987q7 0 12 5t5 12z\"\n },\n selectParentNode: {\n text: \"\\u2B1A\",\n css: \"font-weight: bold\"\n },\n undo: {\n width: 1024,\n height: 1024,\n path: \"M761 1024c113-206 132-520-313-509v253l-384-384 384-384v248c534-13 594 472 313 775z\"\n },\n redo: {\n width: 1024,\n height: 1024,\n path: \"M576 248v-248l384 384-384 384v-253c-446-10-427 303-313 509-280-303-221-789 313-775z\"\n },\n strong: {\n width: 805,\n height: 1024,\n path: \"M317 869q42 18 80 18 214 0 214-191 0-65-23-102-15-25-35-42t-38-26-46-14-48-6-54-1q-41 0-57 5 0 30-0 90t-0 90q0 4-0 38t-0 55 2 47 6 38zM309 442q24 4 62 4 46 0 81-7t62-25 42-51 14-81q0-40-16-70t-45-46-61-24-70-8q-28 0-74 7 0 28 2 86t2 86q0 15-0 45t-0 45q0 26 0 39zM0 950l1-53q8-2 48-9t60-15q4-6 7-15t4-19 3-18 1-21 0-19v-37q0-561-12-585-2-4-12-8t-25-6-28-4-27-2-17-1l-2-47q56-1 194-6t213-5q13 0 39 0t38 0q40 0 78 7t73 24 61 40 42 59 16 78q0 29-9 54t-22 41-36 32-41 25-48 22q88 20 146 76t58 141q0 57-20 102t-53 74-78 48-93 27-100 8q-25 0-75-1t-75-1q-60 0-175 6t-132 6z\"\n },\n em: {\n width: 585,\n height: 1024,\n path: \"M0 949l9-48q3-1 46-12t63-21q16-20 23-57 0-4 35-165t65-310 29-169v-14q-13-7-31-10t-39-4-33-3l10-58q18 1 68 3t85 4 68 1q27 0 56-1t69-4 56-3q-2 22-10 50-17 5-58 16t-62 19q-4 10-8 24t-5 22-4 26-3 24q-15 84-50 239t-44 203q-1 5-7 33t-11 51-9 47-3 32l0 10q9 2 105 17-1 25-9 56-6 0-18 0t-18 0q-16 0-49-5t-49-5q-78-1-117-1-29 0-81 5t-69 6z\"\n },\n code: {\n width: 896,\n height: 1024,\n path: \"M608 192l-96 96 224 224-224 224 96 96 288-320-288-320zM288 192l-288 320 288 320 96-96-224-224 224-224-96-96z\"\n },\n link: {\n width: 951,\n height: 1024,\n path: \"M832 694q0-22-16-38l-118-118q-16-16-38-16-24 0-41 18 1 1 10 10t12 12 8 10 7 14 2 15q0 22-16 38t-38 16q-8 0-15-2t-14-7-10-8-12-12-10-10q-18 17-18 41 0 22 16 38l117 118q15 15 38 15 22 0 38-14l84-83q16-16 16-38zM430 292q0-22-16-38l-117-118q-16-16-38-16-22 0-38 15l-84 83q-16 16-16 38 0 22 16 38l118 118q15 15 38 15 24 0 41-17-1-1-10-10t-12-12-8-10-7-14-2-15q0-22 16-38t38-16q8 0 15 2t14 7 10 8 12 12 10 10q18-17 18-41zM941 694q0 68-48 116l-84 83q-47 47-116 47-69 0-116-48l-117-118q-47-47-47-116 0-70 50-119l-50-50q-49 50-118 50-68 0-116-48l-118-118q-48-48-48-116t48-116l84-83q47-47 116-47 69 0 116 48l117 118q47 47 47 116 0 70-50 119l50 50q49-50 118-50 68 0 116 48l118 118q48 48 48 116z\"\n },\n bulletList: {\n width: 768,\n height: 896,\n path: \"M0 512h128v-128h-128v128zM0 256h128v-128h-128v128zM0 768h128v-128h-128v128zM256 512h512v-128h-512v128zM256 256h512v-128h-512v128zM256 768h512v-128h-512v128z\"\n },\n orderedList: {\n width: 768,\n height: 896,\n path: \"M320 512h448v-128h-448v128zM320 768h448v-128h-448v128zM320 128v128h448v-128h-448zM79 384h78v-256h-36l-85 23v50l43-2v185zM189 590c0-36-12-78-96-78-33 0-64 6-83 16l1 66c21-10 42-15 67-15s32 11 32 28c0 26-30 58-110 112v50h192v-67l-91 2c49-30 87-66 87-113l1-1z\"\n },\n blockquote: {\n width: 640,\n height: 896,\n path: \"M0 448v256h256v-256h-128c0 0 0-128 128-128v-128c0 0-256 0-256 256zM640 320v-128c0 0-256 0-256 256v256h256v-256h-128c0 0 0-128 128-128z\"\n }\n}; // :: MenuItem\n// Menu item for the `joinUp` command.\n\nvar joinUpItem = new MenuItem({\n title: \"Join with above block\",\n run: prosemirror_commands__WEBPACK_IMPORTED_MODULE_1__[\"joinUp\"],\n select: function select(state) {\n return Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_1__[\"joinUp\"])(state);\n },\n icon: icons.join\n}); // :: MenuItem\n// Menu item for the `lift` command.\n\nvar liftItem = new MenuItem({\n title: \"Lift out of enclosing block\",\n run: prosemirror_commands__WEBPACK_IMPORTED_MODULE_1__[\"lift\"],\n select: function select(state) {\n return Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_1__[\"lift\"])(state);\n },\n icon: icons.lift\n}); // :: MenuItem\n// Menu item for the `selectParentNode` command.\n\nvar selectParentNodeItem = new MenuItem({\n title: \"Select parent node\",\n run: prosemirror_commands__WEBPACK_IMPORTED_MODULE_1__[\"selectParentNode\"],\n select: function select(state) {\n return Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_1__[\"selectParentNode\"])(state);\n },\n icon: icons.selectParentNode\n}); // :: MenuItem\n// Menu item for the `undo` command.\n\nvar undoItem = new MenuItem({\n title: \"Undo last change\",\n run: prosemirror_history__WEBPACK_IMPORTED_MODULE_2__[\"undo\"],\n enable: function enable(state) {\n return Object(prosemirror_history__WEBPACK_IMPORTED_MODULE_2__[\"undo\"])(state);\n },\n icon: icons.undo\n}); // :: MenuItem\n// Menu item for the `redo` command.\n\nvar redoItem = new MenuItem({\n title: \"Redo last undone change\",\n run: prosemirror_history__WEBPACK_IMPORTED_MODULE_2__[\"redo\"],\n enable: function enable(state) {\n return Object(prosemirror_history__WEBPACK_IMPORTED_MODULE_2__[\"redo\"])(state);\n },\n icon: icons.redo\n}); // :: (NodeType, Object) → MenuItem\n// Build a menu item for wrapping the selection in a given node type.\n// Adds `run` and `select` properties to the ones present in\n// `options`. `options.attrs` may be an object or a function.\n\nfunction wrapItem(nodeType, options) {\n var passedOptions = {\n run: function run(state, dispatch) {\n // FIXME if (options.attrs instanceof Function) options.attrs(state, attrs => wrapIn(nodeType, attrs)(state))\n return Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_1__[\"wrapIn\"])(nodeType, options.attrs)(state, dispatch);\n },\n select: function select(state) {\n return Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_1__[\"wrapIn\"])(nodeType, options.attrs instanceof Function ? null : options.attrs)(state);\n }\n };\n\n for (var prop in options) {\n passedOptions[prop] = options[prop];\n }\n\n return new MenuItem(passedOptions);\n} // :: (NodeType, Object) → MenuItem\n// Build a menu item for changing the type of the textblock around the\n// selection to the given type. Provides `run`, `active`, and `select`\n// properties. Others must be given in `options`. `options.attrs` may\n// be an object to provide the attributes for the textblock node.\n\n\nfunction blockTypeItem(nodeType, options) {\n var command = Object(prosemirror_commands__WEBPACK_IMPORTED_MODULE_1__[\"setBlockType\"])(nodeType, options.attrs);\n var passedOptions = {\n run: command,\n enable: function enable(state) {\n return command(state);\n },\n active: function active(state) {\n var ref = state.selection;\n var $from = ref.$from;\n var to = ref.to;\n var node = ref.node;\n\n if (node) {\n return node.hasMarkup(nodeType, options.attrs);\n }\n\n return to <= $from.end() && $from.parent.hasMarkup(nodeType, options.attrs);\n }\n };\n\n for (var prop in options) {\n passedOptions[prop] = options[prop];\n }\n\n return new MenuItem(passedOptions);\n} // Work around classList.toggle being broken in IE11\n\n\nfunction setClass(dom, cls, on) {\n if (on) {\n dom.classList.add(cls);\n } else {\n dom.classList.remove(cls);\n }\n}\n\nvar prefix$2 = \"ProseMirror-menubar\";\n\nfunction isIOS() {\n if (typeof navigator == \"undefined\") {\n return false;\n }\n\n var agent = navigator.userAgent;\n return !/Edge\\/\\d/.test(agent) && /AppleWebKit/.test(agent) && /Mobile\\/\\w+/.test(agent);\n} // :: (Object) → Plugin\n// A plugin that will place a menu bar above the editor. Note that\n// this involves wrapping the editor in an additional `
`.\n//\n// options::-\n// Supports the following options:\n//\n// content:: [[MenuElement]]\n// Provides the content of the menu, as a nested array to be\n// passed to `renderGrouped`.\n//\n// floating:: ?bool\n// Determines whether the menu floats, i.e. whether it sticks to\n// the top of the viewport when the editor is partially scrolled\n// out of view.\n\n\nfunction menuBar(options) {\n return new prosemirror_state__WEBPACK_IMPORTED_MODULE_3__[\"Plugin\"]({\n view: function view(editorView) {\n return new MenuBarView(editorView, options);\n }\n });\n}\n\nvar MenuBarView = function MenuBarView(editorView, options) {\n var this$1 = this;\n this.editorView = editorView;\n this.options = options;\n this.wrapper = Object(crel__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"div\", {\n \"class\": prefix$2 + \"-wrapper\"\n });\n this.menu = this.wrapper.appendChild(Object(crel__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"div\", {\n \"class\": prefix$2\n }));\n this.menu.className = prefix$2;\n this.spacer = null;\n editorView.dom.parentNode.replaceChild(this.wrapper, editorView.dom);\n this.wrapper.appendChild(editorView.dom);\n this.maxHeight = 0;\n this.widthForMaxHeight = 0;\n this.floating = false;\n var ref = renderGrouped(this.editorView, this.options.content);\n var dom = ref.dom;\n var update = ref.update;\n this.contentUpdate = update;\n this.menu.appendChild(dom);\n this.update();\n\n if (options.floating && !isIOS()) {\n this.updateFloat();\n var potentialScrollers = getAllWrapping(this.wrapper);\n\n this.scrollFunc = function (e) {\n var root = this$1.editorView.root;\n\n if (!(root.body || root).contains(this$1.wrapper)) {\n potentialScrollers.forEach(function (el) {\n return el.removeEventListener(\"scroll\", this$1.scrollFunc);\n });\n } else {\n this$1.updateFloat(e.target.getBoundingClientRect && e.target);\n }\n };\n\n potentialScrollers.forEach(function (el) {\n return el.addEventListener('scroll', this$1.scrollFunc);\n });\n }\n};\n\nMenuBarView.prototype.update = function update() {\n this.contentUpdate(this.editorView.state);\n\n if (this.floating) {\n this.updateScrollCursor();\n } else {\n if (this.menu.offsetWidth != this.widthForMaxHeight) {\n this.widthForMaxHeight = this.menu.offsetWidth;\n this.maxHeight = 0;\n }\n\n if (this.menu.offsetHeight > this.maxHeight) {\n this.maxHeight = this.menu.offsetHeight;\n this.menu.style.minHeight = this.maxHeight + \"px\";\n }\n }\n};\n\nMenuBarView.prototype.updateScrollCursor = function updateScrollCursor() {\n var selection = this.editorView.root.getSelection();\n\n if (!selection.focusNode) {\n return;\n }\n\n var rects = selection.getRangeAt(0).getClientRects();\n var selRect = rects[selectionIsInverted(selection) ? 0 : rects.length - 1];\n\n if (!selRect) {\n return;\n }\n\n var menuRect = this.menu.getBoundingClientRect();\n\n if (selRect.top < menuRect.bottom && selRect.bottom > menuRect.top) {\n var scrollable = findWrappingScrollable(this.wrapper);\n\n if (scrollable) {\n scrollable.scrollTop -= menuRect.bottom - selRect.top;\n }\n }\n};\n\nMenuBarView.prototype.updateFloat = function updateFloat(scrollAncestor) {\n var parent = this.wrapper,\n editorRect = parent.getBoundingClientRect(),\n top = scrollAncestor ? Math.max(0, scrollAncestor.getBoundingClientRect().top) : 0;\n\n if (this.floating) {\n if (editorRect.top >= top || editorRect.bottom < this.menu.offsetHeight + 10) {\n this.floating = false;\n this.menu.style.position = this.menu.style.left = this.menu.style.top = this.menu.style.width = \"\";\n this.menu.style.display = \"\";\n this.spacer.parentNode.removeChild(this.spacer);\n this.spacer = null;\n } else {\n var border = (parent.offsetWidth - parent.clientWidth) / 2;\n this.menu.style.left = editorRect.left + border + \"px\";\n this.menu.style.display = editorRect.top > window.innerHeight ? \"none\" : \"\";\n\n if (scrollAncestor) {\n this.menu.style.top = top + \"px\";\n }\n }\n } else {\n if (editorRect.top < top && editorRect.bottom >= this.menu.offsetHeight + 10) {\n this.floating = true;\n var menuRect = this.menu.getBoundingClientRect();\n this.menu.style.left = menuRect.left + \"px\";\n this.menu.style.width = menuRect.width + \"px\";\n\n if (scrollAncestor) {\n this.menu.style.top = top + \"px\";\n }\n\n this.menu.style.position = \"fixed\";\n this.spacer = Object(crel__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(\"div\", {\n \"class\": prefix$2 + \"-spacer\",\n style: \"height: \" + menuRect.height + \"px\"\n });\n parent.insertBefore(this.spacer, this.menu);\n }\n }\n};\n\nMenuBarView.prototype.destroy = function destroy() {\n if (this.wrapper.parentNode) {\n this.wrapper.parentNode.replaceChild(this.editorView.dom, this.wrapper);\n }\n}; // Not precise, but close enough\n\n\nfunction selectionIsInverted(selection) {\n if (selection.anchorNode == selection.focusNode) {\n return selection.anchorOffset > selection.focusOffset;\n }\n\n return selection.anchorNode.compareDocumentPosition(selection.focusNode) == Node.DOCUMENT_POSITION_FOLLOWING;\n}\n\nfunction findWrappingScrollable(node) {\n for (var cur = node.parentNode; cur; cur = cur.parentNode) {\n if (cur.scrollHeight > cur.clientHeight) {\n return cur;\n }\n }\n}\n\nfunction getAllWrapping(node) {\n var res = [window];\n\n for (var cur = node.parentNode; cur; cur = cur.parentNode) {\n res.push(cur);\n }\n\n return res;\n}\n\n\n\n//# sourceURL=webpack:///./node_modules/prosemirror-menu/dist/index.es.js?"); - -/***/ }), - -/***/ "./node_modules/prosemirror-model/dist/index.es.js": -/*!*********************************************************!*\ - !*** ./node_modules/prosemirror-model/dist/index.es.js ***! - \*********************************************************/ -/*! exports provided: ContentMatch, DOMParser, DOMSerializer, Fragment, Mark, MarkType, Node, NodeRange, NodeType, ReplaceError, ResolvedPos, Schema, Slice */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ContentMatch\", function() { return ContentMatch; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"DOMParser\", function() { return DOMParser; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"DOMSerializer\", function() { return DOMSerializer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Fragment\", function() { return Fragment; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Mark\", function() { return Mark; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"MarkType\", function() { return MarkType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Node\", function() { return Node; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"NodeRange\", function() { return NodeRange; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"NodeType\", function() { return NodeType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ReplaceError\", function() { return ReplaceError; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ResolvedPos\", function() { return ResolvedPos; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Schema\", function() { return Schema; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Slice\", function() { return Slice; });\n/* harmony import */ var orderedmap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! orderedmap */ \"./node_modules/orderedmap/index.es.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n\n\nfunction findDiffStart(a, b, pos) {\n for (var i = 0;; i++) {\n if (i == a.childCount || i == b.childCount) {\n return a.childCount == b.childCount ? null : pos;\n }\n\n var childA = a.child(i),\n childB = b.child(i);\n\n if (childA == childB) {\n pos += childA.nodeSize;\n continue;\n }\n\n if (!childA.sameMarkup(childB)) {\n return pos;\n }\n\n if (childA.isText && childA.text != childB.text) {\n for (var j = 0; childA.text[j] == childB.text[j]; j++) {\n pos++;\n }\n\n return pos;\n }\n\n if (childA.content.size || childB.content.size) {\n var inner = findDiffStart(childA.content, childB.content, pos + 1);\n\n if (inner != null) {\n return inner;\n }\n }\n\n pos += childA.nodeSize;\n }\n}\n\nfunction findDiffEnd(a, b, posA, posB) {\n for (var iA = a.childCount, iB = b.childCount;;) {\n if (iA == 0 || iB == 0) {\n return iA == iB ? null : {\n a: posA,\n b: posB\n };\n }\n\n var childA = a.child(--iA),\n childB = b.child(--iB),\n size = childA.nodeSize;\n\n if (childA == childB) {\n posA -= size;\n posB -= size;\n continue;\n }\n\n if (!childA.sameMarkup(childB)) {\n return {\n a: posA,\n b: posB\n };\n }\n\n if (childA.isText && childA.text != childB.text) {\n var same = 0,\n minSize = Math.min(childA.text.length, childB.text.length);\n\n while (same < minSize && childA.text[childA.text.length - same - 1] == childB.text[childB.text.length - same - 1]) {\n same++;\n posA--;\n posB--;\n }\n\n return {\n a: posA,\n b: posB\n };\n }\n\n if (childA.content.size || childB.content.size) {\n var inner = findDiffEnd(childA.content, childB.content, posA - 1, posB - 1);\n\n if (inner) {\n return inner;\n }\n }\n\n posA -= size;\n posB -= size;\n }\n} // ::- A fragment represents a node's collection of child nodes.\n//\n// Like nodes, fragments are persistent data structures, and you\n// should not mutate them or their content. Rather, you create new\n// instances whenever needed. The API tries to make this easy.\n\n\nvar Fragment = function Fragment(content, size) {\n this.content = content; // :: number\n // The size of the fragment, which is the total of the size of its\n // content nodes.\n\n this.size = size || 0;\n\n if (size == null) {\n for (var i = 0; i < content.length; i++) {\n this.size += content[i].nodeSize;\n }\n }\n};\n\nvar prototypeAccessors = {\n firstChild: {\n configurable: true\n },\n lastChild: {\n configurable: true\n },\n childCount: {\n configurable: true\n }\n}; // :: (number, number, (node: Node, start: number, parent: Node, index: number) → ?bool, ?number)\n// Invoke a callback for all descendant nodes between the given two\n// positions (relative to start of this fragment). Doesn't descend\n// into a node when the callback returns `false`.\n\nFragment.prototype.nodesBetween = function nodesBetween(from, to, f, nodeStart, parent) {\n if (nodeStart === void 0) nodeStart = 0;\n\n for (var i = 0, pos = 0; pos < to; i++) {\n var child = this.content[i],\n end = pos + child.nodeSize;\n\n if (end > from && f(child, nodeStart + pos, parent, i) !== false && child.content.size) {\n var start = pos + 1;\n child.nodesBetween(Math.max(0, from - start), Math.min(child.content.size, to - start), f, nodeStart + start);\n }\n\n pos = end;\n }\n}; // :: ((node: Node, pos: number, parent: Node) → ?bool)\n// Call the given callback for every descendant node. The callback\n// may return `false` to prevent traversal of a given node's children.\n\n\nFragment.prototype.descendants = function descendants(f) {\n this.nodesBetween(0, this.size, f);\n}; // : (number, number, ?string, ?string) → string\n\n\nFragment.prototype.textBetween = function textBetween(from, to, blockSeparator, leafText) {\n var text = \"\",\n separated = true;\n this.nodesBetween(from, to, function (node, pos) {\n if (node.isText) {\n text += node.text.slice(Math.max(from, pos) - pos, to - pos);\n separated = !blockSeparator;\n } else if (node.isLeaf && leafText) {\n text += leafText;\n separated = !blockSeparator;\n } else if (!separated && node.isBlock) {\n text += blockSeparator;\n separated = true;\n }\n }, 0);\n return text;\n}; // :: (Fragment) → Fragment\n// Create a new fragment containing the combined content of this\n// fragment and the other.\n\n\nFragment.prototype.append = function append(other) {\n if (!other.size) {\n return this;\n }\n\n if (!this.size) {\n return other;\n }\n\n var last = this.lastChild,\n first = other.firstChild,\n content = this.content.slice(),\n i = 0;\n\n if (last.isText && last.sameMarkup(first)) {\n content[content.length - 1] = last.withText(last.text + first.text);\n i = 1;\n }\n\n for (; i < other.content.length; i++) {\n content.push(other.content[i]);\n }\n\n return new Fragment(content, this.size + other.size);\n}; // :: (number, ?number) → Fragment\n// Cut out the sub-fragment between the two given positions.\n\n\nFragment.prototype.cut = function cut(from, to) {\n if (to == null) {\n to = this.size;\n }\n\n if (from == 0 && to == this.size) {\n return this;\n }\n\n var result = [],\n size = 0;\n\n if (to > from) {\n for (var i = 0, pos = 0; pos < to; i++) {\n var child = this.content[i],\n end = pos + child.nodeSize;\n\n if (end > from) {\n if (pos < from || end > to) {\n if (child.isText) {\n child = child.cut(Math.max(0, from - pos), Math.min(child.text.length, to - pos));\n } else {\n child = child.cut(Math.max(0, from - pos - 1), Math.min(child.content.size, to - pos - 1));\n }\n }\n\n result.push(child);\n size += child.nodeSize;\n }\n\n pos = end;\n }\n }\n\n return new Fragment(result, size);\n};\n\nFragment.prototype.cutByIndex = function cutByIndex(from, to) {\n if (from == to) {\n return Fragment.empty;\n }\n\n if (from == 0 && to == this.content.length) {\n return this;\n }\n\n return new Fragment(this.content.slice(from, to));\n}; // :: (number, Node) → Fragment\n// Create a new fragment in which the node at the given index is\n// replaced by the given node.\n\n\nFragment.prototype.replaceChild = function replaceChild(index, node) {\n var current = this.content[index];\n\n if (current == node) {\n return this;\n }\n\n var copy = this.content.slice();\n var size = this.size + node.nodeSize - current.nodeSize;\n copy[index] = node;\n return new Fragment(copy, size);\n}; // : (Node) → Fragment\n// Create a new fragment by prepending the given node to this\n// fragment.\n\n\nFragment.prototype.addToStart = function addToStart(node) {\n return new Fragment([node].concat(this.content), this.size + node.nodeSize);\n}; // : (Node) → Fragment\n// Create a new fragment by appending the given node to this\n// fragment.\n\n\nFragment.prototype.addToEnd = function addToEnd(node) {\n return new Fragment(this.content.concat(node), this.size + node.nodeSize);\n}; // :: (Fragment) → bool\n// Compare this fragment to another one.\n\n\nFragment.prototype.eq = function eq(other) {\n if (this.content.length != other.content.length) {\n return false;\n }\n\n for (var i = 0; i < this.content.length; i++) {\n if (!this.content[i].eq(other.content[i])) {\n return false;\n }\n }\n\n return true;\n}; // :: ?Node\n// The first child of the fragment, or `null` if it is empty.\n\n\nprototypeAccessors.firstChild.get = function () {\n return this.content.length ? this.content[0] : null;\n}; // :: ?Node\n// The last child of the fragment, or `null` if it is empty.\n\n\nprototypeAccessors.lastChild.get = function () {\n return this.content.length ? this.content[this.content.length - 1] : null;\n}; // :: number\n// The number of child nodes in this fragment.\n\n\nprototypeAccessors.childCount.get = function () {\n return this.content.length;\n}; // :: (number) → Node\n// Get the child node at the given index. Raise an error when the\n// index is out of range.\n\n\nFragment.prototype.child = function child(index) {\n var found = this.content[index];\n\n if (!found) {\n throw new RangeError(\"Index \" + index + \" out of range for \" + this);\n }\n\n return found;\n}; // :: (number) → ?Node\n// Get the child node at the given index, if it exists.\n\n\nFragment.prototype.maybeChild = function maybeChild(index) {\n return this.content[index];\n}; // :: ((node: Node, offset: number, index: number))\n// Call `f` for every child node, passing the node, its offset\n// into this parent node, and its index.\n\n\nFragment.prototype.forEach = function forEach(f) {\n for (var i = 0, p = 0; i < this.content.length; i++) {\n var child = this.content[i];\n f(child, p, i);\n p += child.nodeSize;\n }\n}; // :: (Fragment) → ?number\n// Find the first position at which this fragment and another\n// fragment differ, or `null` if they are the same.\n\n\nFragment.prototype.findDiffStart = function findDiffStart$1(other, pos) {\n if (pos === void 0) pos = 0;\n return findDiffStart(this, other, pos);\n}; // :: (Fragment) → ?{a: number, b: number}\n// Find the first position, searching from the end, at which this\n// fragment and the given fragment differ, or `null` if they are the\n// same. Since this position will not be the same in both nodes, an\n// object with two separate positions is returned.\n\n\nFragment.prototype.findDiffEnd = function findDiffEnd$1(other, pos, otherPos) {\n if (pos === void 0) pos = this.size;\n if (otherPos === void 0) otherPos = other.size;\n return findDiffEnd(this, other, pos, otherPos);\n}; // : (number, ?number) → {index: number, offset: number}\n// Find the index and inner offset corresponding to a given relative\n// position in this fragment. The result object will be reused\n// (overwritten) the next time the function is called. (Not public.)\n\n\nFragment.prototype.findIndex = function findIndex(pos, round) {\n if (round === void 0) round = -1;\n\n if (pos == 0) {\n return retIndex(0, pos);\n }\n\n if (pos == this.size) {\n return retIndex(this.content.length, pos);\n }\n\n if (pos > this.size || pos < 0) {\n throw new RangeError(\"Position \" + pos + \" outside of fragment (\" + this + \")\");\n }\n\n for (var i = 0, curPos = 0;; i++) {\n var cur = this.child(i),\n end = curPos + cur.nodeSize;\n\n if (end >= pos) {\n if (end == pos || round > 0) {\n return retIndex(i + 1, end);\n }\n\n return retIndex(i, curPos);\n }\n\n curPos = end;\n }\n}; // :: () → string\n// Return a debugging string that describes this fragment.\n\n\nFragment.prototype.toString = function toString() {\n return \"<\" + this.toStringInner() + \">\";\n};\n\nFragment.prototype.toStringInner = function toStringInner() {\n return this.content.join(\", \");\n}; // :: () → ?Object\n// Create a JSON-serializeable representation of this fragment.\n\n\nFragment.prototype.toJSON = function toJSON() {\n return this.content.length ? this.content.map(function (n) {\n return n.toJSON();\n }) : null;\n}; // :: (Schema, ?Object) → Fragment\n// Deserialize a fragment from its JSON representation.\n\n\nFragment.fromJSON = function fromJSON(schema, value) {\n if (!value) {\n return Fragment.empty;\n }\n\n if (!Array.isArray(value)) {\n throw new RangeError(\"Invalid input for Fragment.fromJSON\");\n }\n\n return new Fragment(value.map(schema.nodeFromJSON));\n}; // :: ([Node]) → Fragment\n// Build a fragment from an array of nodes. Ensures that adjacent\n// text nodes with the same marks are joined together.\n\n\nFragment.fromArray = function fromArray(array) {\n if (!array.length) {\n return Fragment.empty;\n }\n\n var joined,\n size = 0;\n\n for (var i = 0; i < array.length; i++) {\n var node = array[i];\n size += node.nodeSize;\n\n if (i && node.isText && array[i - 1].sameMarkup(node)) {\n if (!joined) {\n joined = array.slice(0, i);\n }\n\n joined[joined.length - 1] = node.withText(joined[joined.length - 1].text + node.text);\n } else if (joined) {\n joined.push(node);\n }\n }\n\n return new Fragment(joined || array, size);\n}; // :: (?union) → Fragment\n// Create a fragment from something that can be interpreted as a set\n// of nodes. For `null`, it returns the empty fragment. For a\n// fragment, the fragment itself. For a node or array of nodes, a\n// fragment containing those nodes.\n\n\nFragment.from = function from(nodes) {\n if (!nodes) {\n return Fragment.empty;\n }\n\n if (nodes instanceof Fragment) {\n return nodes;\n }\n\n if (Array.isArray(nodes)) {\n return this.fromArray(nodes);\n }\n\n if (nodes.attrs) {\n return new Fragment([nodes], nodes.nodeSize);\n }\n\n throw new RangeError(\"Can not convert \" + nodes + \" to a Fragment\" + (nodes.nodesBetween ? \" (looks like multiple versions of prosemirror-model were loaded)\" : \"\"));\n};\n\nObject.defineProperties(Fragment.prototype, prototypeAccessors);\nvar found = {\n index: 0,\n offset: 0\n};\n\nfunction retIndex(index, offset) {\n found.index = index;\n found.offset = offset;\n return found;\n} // :: Fragment\n// An empty fragment. Intended to be reused whenever a node doesn't\n// contain anything (rather than allocating a new empty fragment for\n// each leaf node).\n\n\nFragment.empty = new Fragment([], 0);\n\nfunction compareDeep(a, b) {\n if (a === b) {\n return true;\n }\n\n if (!(a && _typeof(a) == \"object\") || !(b && _typeof(b) == \"object\")) {\n return false;\n }\n\n var array = Array.isArray(a);\n\n if (Array.isArray(b) != array) {\n return false;\n }\n\n if (array) {\n if (a.length != b.length) {\n return false;\n }\n\n for (var i = 0; i < a.length; i++) {\n if (!compareDeep(a[i], b[i])) {\n return false;\n }\n }\n } else {\n for (var p in a) {\n if (!(p in b) || !compareDeep(a[p], b[p])) {\n return false;\n }\n }\n\n for (var p$1 in b) {\n if (!(p$1 in a)) {\n return false;\n }\n }\n }\n\n return true;\n} // ::- A mark is a piece of information that can be attached to a node,\n// such as it being emphasized, in code font, or a link. It has a type\n// and optionally a set of attributes that provide further information\n// (such as the target of the link). Marks are created through a\n// `Schema`, which controls which types exist and which\n// attributes they have.\n\n\nvar Mark = function Mark(type, attrs) {\n // :: MarkType\n // The type of this mark.\n this.type = type; // :: Object\n // The attributes associated with this mark.\n\n this.attrs = attrs;\n}; // :: ([Mark]) → [Mark]\n// Given a set of marks, create a new set which contains this one as\n// well, in the right position. If this mark is already in the set,\n// the set itself is returned. If any marks that are set to be\n// [exclusive](#model.MarkSpec.excludes) with this mark are present,\n// those are replaced by this one.\n\n\nMark.prototype.addToSet = function addToSet(set) {\n var copy,\n placed = false;\n\n for (var i = 0; i < set.length; i++) {\n var other = set[i];\n\n if (this.eq(other)) {\n return set;\n }\n\n if (this.type.excludes(other.type)) {\n if (!copy) {\n copy = set.slice(0, i);\n }\n } else if (other.type.excludes(this.type)) {\n return set;\n } else {\n if (!placed && other.type.rank > this.type.rank) {\n if (!copy) {\n copy = set.slice(0, i);\n }\n\n copy.push(this);\n placed = true;\n }\n\n if (copy) {\n copy.push(other);\n }\n }\n }\n\n if (!copy) {\n copy = set.slice();\n }\n\n if (!placed) {\n copy.push(this);\n }\n\n return copy;\n}; // :: ([Mark]) → [Mark]\n// Remove this mark from the given set, returning a new set. If this\n// mark is not in the set, the set itself is returned.\n\n\nMark.prototype.removeFromSet = function removeFromSet(set) {\n for (var i = 0; i < set.length; i++) {\n if (this.eq(set[i])) {\n return set.slice(0, i).concat(set.slice(i + 1));\n }\n }\n\n return set;\n}; // :: ([Mark]) → bool\n// Test whether this mark is in the given set of marks.\n\n\nMark.prototype.isInSet = function isInSet(set) {\n for (var i = 0; i < set.length; i++) {\n if (this.eq(set[i])) {\n return true;\n }\n }\n\n return false;\n}; // :: (Mark) → bool\n// Test whether this mark has the same type and attributes as\n// another mark.\n\n\nMark.prototype.eq = function eq(other) {\n return this == other || this.type == other.type && compareDeep(this.attrs, other.attrs);\n}; // :: () → Object\n// Convert this mark to a JSON-serializeable representation.\n\n\nMark.prototype.toJSON = function toJSON() {\n var obj = {\n type: this.type.name\n };\n\n for (var _ in this.attrs) {\n obj.attrs = this.attrs;\n break;\n }\n\n return obj;\n}; // :: (Schema, Object) → Mark\n\n\nMark.fromJSON = function fromJSON(schema, json) {\n if (!json) {\n throw new RangeError(\"Invalid input for Mark.fromJSON\");\n }\n\n var type = schema.marks[json.type];\n\n if (!type) {\n throw new RangeError(\"There is no mark type \" + json.type + \" in this schema\");\n }\n\n return type.create(json.attrs);\n}; // :: ([Mark], [Mark]) → bool\n// Test whether two sets of marks are identical.\n\n\nMark.sameSet = function sameSet(a, b) {\n if (a == b) {\n return true;\n }\n\n if (a.length != b.length) {\n return false;\n }\n\n for (var i = 0; i < a.length; i++) {\n if (!a[i].eq(b[i])) {\n return false;\n }\n }\n\n return true;\n}; // :: (?union) → [Mark]\n// Create a properly sorted mark set from null, a single mark, or an\n// unsorted array of marks.\n\n\nMark.setFrom = function setFrom(marks) {\n if (!marks || marks.length == 0) {\n return Mark.none;\n }\n\n if (marks instanceof Mark) {\n return [marks];\n }\n\n var copy = marks.slice();\n copy.sort(function (a, b) {\n return a.type.rank - b.type.rank;\n });\n return copy;\n}; // :: [Mark] The empty set of marks.\n\n\nMark.none = []; // ReplaceError:: class extends Error\n// Error type raised by [`Node.replace`](#model.Node.replace) when\n// given an invalid replacement.\n\nfunction ReplaceError(message) {\n var err = Error.call(this, message);\n err.__proto__ = ReplaceError.prototype;\n return err;\n}\n\nReplaceError.prototype = Object.create(Error.prototype);\nReplaceError.prototype.constructor = ReplaceError;\nReplaceError.prototype.name = \"ReplaceError\"; // ::- A slice represents a piece cut out of a larger document. It\n// stores not only a fragment, but also the depth up to which nodes on\n// both side are ‘open’ (cut through).\n\nvar Slice = function Slice(content, openStart, openEnd) {\n // :: Fragment The slice's content.\n this.content = content; // :: number The open depth at the start.\n\n this.openStart = openStart; // :: number The open depth at the end.\n\n this.openEnd = openEnd;\n};\n\nvar prototypeAccessors$1 = {\n size: {\n configurable: true\n }\n}; // :: number\n// The size this slice would add when inserted into a document.\n\nprototypeAccessors$1.size.get = function () {\n return this.content.size - this.openStart - this.openEnd;\n};\n\nSlice.prototype.insertAt = function insertAt(pos, fragment) {\n var content = insertInto(this.content, pos + this.openStart, fragment, null);\n return content && new Slice(content, this.openStart, this.openEnd);\n};\n\nSlice.prototype.removeBetween = function removeBetween(from, to) {\n return new Slice(removeRange(this.content, from + this.openStart, to + this.openStart), this.openStart, this.openEnd);\n}; // :: (Slice) → bool\n// Tests whether this slice is equal to another slice.\n\n\nSlice.prototype.eq = function eq(other) {\n return this.content.eq(other.content) && this.openStart == other.openStart && this.openEnd == other.openEnd;\n};\n\nSlice.prototype.toString = function toString() {\n return this.content + \"(\" + this.openStart + \",\" + this.openEnd + \")\";\n}; // :: () → ?Object\n// Convert a slice to a JSON-serializable representation.\n\n\nSlice.prototype.toJSON = function toJSON() {\n if (!this.content.size) {\n return null;\n }\n\n var json = {\n content: this.content.toJSON()\n };\n\n if (this.openStart > 0) {\n json.openStart = this.openStart;\n }\n\n if (this.openEnd > 0) {\n json.openEnd = this.openEnd;\n }\n\n return json;\n}; // :: (Schema, ?Object) → Slice\n// Deserialize a slice from its JSON representation.\n\n\nSlice.fromJSON = function fromJSON(schema, json) {\n if (!json) {\n return Slice.empty;\n }\n\n var openStart = json.openStart || 0,\n openEnd = json.openEnd || 0;\n\n if (typeof openStart != \"number\" || typeof openEnd != \"number\") {\n throw new RangeError(\"Invalid input for Slice.fromJSON\");\n }\n\n return new Slice(Fragment.fromJSON(schema, json.content), json.openStart || 0, json.openEnd || 0);\n}; // :: (Fragment, ?bool) → Slice\n// Create a slice from a fragment by taking the maximum possible\n// open value on both side of the fragment.\n\n\nSlice.maxOpen = function maxOpen(fragment, openIsolating) {\n if (openIsolating === void 0) openIsolating = true;\n var openStart = 0,\n openEnd = 0;\n\n for (var n = fragment.firstChild; n && !n.isLeaf && (openIsolating || !n.type.spec.isolating); n = n.firstChild) {\n openStart++;\n }\n\n for (var n$1 = fragment.lastChild; n$1 && !n$1.isLeaf && (openIsolating || !n$1.type.spec.isolating); n$1 = n$1.lastChild) {\n openEnd++;\n }\n\n return new Slice(fragment, openStart, openEnd);\n};\n\nObject.defineProperties(Slice.prototype, prototypeAccessors$1);\n\nfunction removeRange(content, from, to) {\n var ref = content.findIndex(from);\n var index = ref.index;\n var offset = ref.offset;\n var child = content.maybeChild(index);\n var ref$1 = content.findIndex(to);\n var indexTo = ref$1.index;\n var offsetTo = ref$1.offset;\n\n if (offset == from || child.isText) {\n if (offsetTo != to && !content.child(indexTo).isText) {\n throw new RangeError(\"Removing non-flat range\");\n }\n\n return content.cut(0, from).append(content.cut(to));\n }\n\n if (index != indexTo) {\n throw new RangeError(\"Removing non-flat range\");\n }\n\n return content.replaceChild(index, child.copy(removeRange(child.content, from - offset - 1, to - offset - 1)));\n}\n\nfunction insertInto(content, dist, insert, parent) {\n var ref = content.findIndex(dist);\n var index = ref.index;\n var offset = ref.offset;\n var child = content.maybeChild(index);\n\n if (offset == dist || child.isText) {\n if (parent && !parent.canReplace(index, index, insert)) {\n return null;\n }\n\n return content.cut(0, dist).append(insert).append(content.cut(dist));\n }\n\n var inner = insertInto(child.content, dist - offset - 1, insert);\n return inner && content.replaceChild(index, child.copy(inner));\n} // :: Slice\n// The empty slice.\n\n\nSlice.empty = new Slice(Fragment.empty, 0, 0);\n\nfunction replace($from, $to, slice) {\n if (slice.openStart > $from.depth) {\n throw new ReplaceError(\"Inserted content deeper than insertion position\");\n }\n\n if ($from.depth - slice.openStart != $to.depth - slice.openEnd) {\n throw new ReplaceError(\"Inconsistent open depths\");\n }\n\n return replaceOuter($from, $to, slice, 0);\n}\n\nfunction replaceOuter($from, $to, slice, depth) {\n var index = $from.index(depth),\n node = $from.node(depth);\n\n if (index == $to.index(depth) && depth < $from.depth - slice.openStart) {\n var inner = replaceOuter($from, $to, slice, depth + 1);\n return node.copy(node.content.replaceChild(index, inner));\n } else if (!slice.content.size) {\n return close(node, replaceTwoWay($from, $to, depth));\n } else if (!slice.openStart && !slice.openEnd && $from.depth == depth && $to.depth == depth) {\n // Simple, flat case\n var parent = $from.parent,\n content = parent.content;\n return close(parent, content.cut(0, $from.parentOffset).append(slice.content).append(content.cut($to.parentOffset)));\n } else {\n var ref = prepareSliceForReplace(slice, $from);\n var start = ref.start;\n var end = ref.end;\n return close(node, replaceThreeWay($from, start, end, $to, depth));\n }\n}\n\nfunction checkJoin(main, sub) {\n if (!sub.type.compatibleContent(main.type)) {\n throw new ReplaceError(\"Cannot join \" + sub.type.name + \" onto \" + main.type.name);\n }\n}\n\nfunction joinable($before, $after, depth) {\n var node = $before.node(depth);\n checkJoin(node, $after.node(depth));\n return node;\n}\n\nfunction addNode(child, target) {\n var last = target.length - 1;\n\n if (last >= 0 && child.isText && child.sameMarkup(target[last])) {\n target[last] = child.withText(target[last].text + child.text);\n } else {\n target.push(child);\n }\n}\n\nfunction addRange($start, $end, depth, target) {\n var node = ($end || $start).node(depth);\n var startIndex = 0,\n endIndex = $end ? $end.index(depth) : node.childCount;\n\n if ($start) {\n startIndex = $start.index(depth);\n\n if ($start.depth > depth) {\n startIndex++;\n } else if ($start.textOffset) {\n addNode($start.nodeAfter, target);\n startIndex++;\n }\n }\n\n for (var i = startIndex; i < endIndex; i++) {\n addNode(node.child(i), target);\n }\n\n if ($end && $end.depth == depth && $end.textOffset) {\n addNode($end.nodeBefore, target);\n }\n}\n\nfunction close(node, content) {\n if (!node.type.validContent(content)) {\n throw new ReplaceError(\"Invalid content for node \" + node.type.name);\n }\n\n return node.copy(content);\n}\n\nfunction replaceThreeWay($from, $start, $end, $to, depth) {\n var openStart = $from.depth > depth && joinable($from, $start, depth + 1);\n var openEnd = $to.depth > depth && joinable($end, $to, depth + 1);\n var content = [];\n addRange(null, $from, depth, content);\n\n if (openStart && openEnd && $start.index(depth) == $end.index(depth)) {\n checkJoin(openStart, openEnd);\n addNode(close(openStart, replaceThreeWay($from, $start, $end, $to, depth + 1)), content);\n } else {\n if (openStart) {\n addNode(close(openStart, replaceTwoWay($from, $start, depth + 1)), content);\n }\n\n addRange($start, $end, depth, content);\n\n if (openEnd) {\n addNode(close(openEnd, replaceTwoWay($end, $to, depth + 1)), content);\n }\n }\n\n addRange($to, null, depth, content);\n return new Fragment(content);\n}\n\nfunction replaceTwoWay($from, $to, depth) {\n var content = [];\n addRange(null, $from, depth, content);\n\n if ($from.depth > depth) {\n var type = joinable($from, $to, depth + 1);\n addNode(close(type, replaceTwoWay($from, $to, depth + 1)), content);\n }\n\n addRange($to, null, depth, content);\n return new Fragment(content);\n}\n\nfunction prepareSliceForReplace(slice, $along) {\n var extra = $along.depth - slice.openStart,\n parent = $along.node(extra);\n var node = parent.copy(slice.content);\n\n for (var i = extra - 1; i >= 0; i--) {\n node = $along.node(i).copy(Fragment.from(node));\n }\n\n return {\n start: node.resolveNoCache(slice.openStart + extra),\n end: node.resolveNoCache(node.content.size - slice.openEnd - extra)\n };\n} // ::- You can [_resolve_](#model.Node.resolve) a position to get more\n// information about it. Objects of this class represent such a\n// resolved position, providing various pieces of context information,\n// and some helper methods.\n//\n// Throughout this interface, methods that take an optional `depth`\n// parameter will interpret undefined as `this.depth` and negative\n// numbers as `this.depth + value`.\n\n\nvar ResolvedPos = function ResolvedPos(pos, path, parentOffset) {\n // :: number The position that was resolved.\n this.pos = pos;\n this.path = path; // :: number\n // The number of levels the parent node is from the root. If this\n // position points directly into the root node, it is 0. If it\n // points into a top-level paragraph, 1, and so on.\n\n this.depth = path.length / 3 - 1; // :: number The offset this position has into its parent node.\n\n this.parentOffset = parentOffset;\n};\n\nvar prototypeAccessors$2 = {\n parent: {\n configurable: true\n },\n doc: {\n configurable: true\n },\n textOffset: {\n configurable: true\n },\n nodeAfter: {\n configurable: true\n },\n nodeBefore: {\n configurable: true\n }\n};\n\nResolvedPos.prototype.resolveDepth = function resolveDepth(val) {\n if (val == null) {\n return this.depth;\n }\n\n if (val < 0) {\n return this.depth + val;\n }\n\n return val;\n}; // :: Node\n// The parent node that the position points into. Note that even if\n// a position points into a text node, that node is not considered\n// the parent—text nodes are ‘flat’ in this model, and have no content.\n\n\nprototypeAccessors$2.parent.get = function () {\n return this.node(this.depth);\n}; // :: Node\n// The root node in which the position was resolved.\n\n\nprototypeAccessors$2.doc.get = function () {\n return this.node(0);\n}; // :: (?number) → Node\n// The ancestor node at the given level. `p.node(p.depth)` is the\n// same as `p.parent`.\n\n\nResolvedPos.prototype.node = function node(depth) {\n return this.path[this.resolveDepth(depth) * 3];\n}; // :: (?number) → number\n// The index into the ancestor at the given level. If this points at\n// the 3rd node in the 2nd paragraph on the top level, for example,\n// `p.index(0)` is 1 and `p.index(1)` is 2.\n\n\nResolvedPos.prototype.index = function index(depth) {\n return this.path[this.resolveDepth(depth) * 3 + 1];\n}; // :: (?number) → number\n// The index pointing after this position into the ancestor at the\n// given level.\n\n\nResolvedPos.prototype.indexAfter = function indexAfter(depth) {\n depth = this.resolveDepth(depth);\n return this.index(depth) + (depth == this.depth && !this.textOffset ? 0 : 1);\n}; // :: (?number) → number\n// The (absolute) position at the start of the node at the given\n// level.\n\n\nResolvedPos.prototype.start = function start(depth) {\n depth = this.resolveDepth(depth);\n return depth == 0 ? 0 : this.path[depth * 3 - 1] + 1;\n}; // :: (?number) → number\n// The (absolute) position at the end of the node at the given\n// level.\n\n\nResolvedPos.prototype.end = function end(depth) {\n depth = this.resolveDepth(depth);\n return this.start(depth) + this.node(depth).content.size;\n}; // :: (?number) → number\n// The (absolute) position directly before the wrapping node at the\n// given level, or, when `depth` is `this.depth + 1`, the original\n// position.\n\n\nResolvedPos.prototype.before = function before(depth) {\n depth = this.resolveDepth(depth);\n\n if (!depth) {\n throw new RangeError(\"There is no position before the top-level node\");\n }\n\n return depth == this.depth + 1 ? this.pos : this.path[depth * 3 - 1];\n}; // :: (?number) → number\n// The (absolute) position directly after the wrapping node at the\n// given level, or the original position when `depth` is `this.depth + 1`.\n\n\nResolvedPos.prototype.after = function after(depth) {\n depth = this.resolveDepth(depth);\n\n if (!depth) {\n throw new RangeError(\"There is no position after the top-level node\");\n }\n\n return depth == this.depth + 1 ? this.pos : this.path[depth * 3 - 1] + this.path[depth * 3].nodeSize;\n}; // :: number\n// When this position points into a text node, this returns the\n// distance between the position and the start of the text node.\n// Will be zero for positions that point between nodes.\n\n\nprototypeAccessors$2.textOffset.get = function () {\n return this.pos - this.path[this.path.length - 1];\n}; // :: ?Node\n// Get the node directly after the position, if any. If the position\n// points into a text node, only the part of that node after the\n// position is returned.\n\n\nprototypeAccessors$2.nodeAfter.get = function () {\n var parent = this.parent,\n index = this.index(this.depth);\n\n if (index == parent.childCount) {\n return null;\n }\n\n var dOff = this.pos - this.path[this.path.length - 1],\n child = parent.child(index);\n return dOff ? parent.child(index).cut(dOff) : child;\n}; // :: ?Node\n// Get the node directly before the position, if any. If the\n// position points into a text node, only the part of that node\n// before the position is returned.\n\n\nprototypeAccessors$2.nodeBefore.get = function () {\n var index = this.index(this.depth);\n var dOff = this.pos - this.path[this.path.length - 1];\n\n if (dOff) {\n return this.parent.child(index).cut(0, dOff);\n }\n\n return index == 0 ? null : this.parent.child(index - 1);\n}; // :: () → [Mark]\n// Get the marks at this position, factoring in the surrounding\n// marks' [`inclusive`](#model.MarkSpec.inclusive) property. If the\n// position is at the start of a non-empty node, the marks of the\n// node after it (if any) are returned.\n\n\nResolvedPos.prototype.marks = function marks() {\n var parent = this.parent,\n index = this.index(); // In an empty parent, return the empty array\n\n if (parent.content.size == 0) {\n return Mark.none;\n } // When inside a text node, just return the text node's marks\n\n\n if (this.textOffset) {\n return parent.child(index).marks;\n }\n\n var main = parent.maybeChild(index - 1),\n other = parent.maybeChild(index); // If the `after` flag is true of there is no node before, make\n // the node after this position the main reference.\n\n if (!main) {\n var tmp = main;\n main = other;\n other = tmp;\n } // Use all marks in the main node, except those that have\n // `inclusive` set to false and are not present in the other node.\n\n\n var marks = main.marks;\n\n for (var i = 0; i < marks.length; i++) {\n if (marks[i].type.spec.inclusive === false && (!other || !marks[i].isInSet(other.marks))) {\n marks = marks[i--].removeFromSet(marks);\n }\n }\n\n return marks;\n}; // :: (ResolvedPos) → ?[Mark]\n// Get the marks after the current position, if any, except those\n// that are non-inclusive and not present at position `$end`. This\n// is mostly useful for getting the set of marks to preserve after a\n// deletion. Will return `null` if this position is at the end of\n// its parent node or its parent node isn't a textblock (in which\n// case no marks should be preserved).\n\n\nResolvedPos.prototype.marksAcross = function marksAcross($end) {\n var after = this.parent.maybeChild(this.index());\n\n if (!after || !after.isInline) {\n return null;\n }\n\n var marks = after.marks,\n next = $end.parent.maybeChild($end.index());\n\n for (var i = 0; i < marks.length; i++) {\n if (marks[i].type.spec.inclusive === false && (!next || !marks[i].isInSet(next.marks))) {\n marks = marks[i--].removeFromSet(marks);\n }\n }\n\n return marks;\n}; // :: (number) → number\n// The depth up to which this position and the given (non-resolved)\n// position share the same parent nodes.\n\n\nResolvedPos.prototype.sharedDepth = function sharedDepth(pos) {\n for (var depth = this.depth; depth > 0; depth--) {\n if (this.start(depth) <= pos && this.end(depth) >= pos) {\n return depth;\n }\n }\n\n return 0;\n}; // :: (?ResolvedPos, ?(Node) → bool) → ?NodeRange\n// Returns a range based on the place where this position and the\n// given position diverge around block content. If both point into\n// the same textblock, for example, a range around that textblock\n// will be returned. If they point into different blocks, the range\n// around those blocks in their shared ancestor is returned. You can\n// pass in an optional predicate that will be called with a parent\n// node to see if a range into that parent is acceptable.\n\n\nResolvedPos.prototype.blockRange = function blockRange(other, pred) {\n if (other === void 0) other = this;\n\n if (other.pos < this.pos) {\n return other.blockRange(this);\n }\n\n for (var d = this.depth - (this.parent.inlineContent || this.pos == other.pos ? 1 : 0); d >= 0; d--) {\n if (other.pos <= this.end(d) && (!pred || pred(this.node(d)))) {\n return new NodeRange(this, other, d);\n }\n }\n}; // :: (ResolvedPos) → bool\n// Query whether the given position shares the same parent node.\n\n\nResolvedPos.prototype.sameParent = function sameParent(other) {\n return this.pos - this.parentOffset == other.pos - other.parentOffset;\n}; // :: (ResolvedPos) → ResolvedPos\n// Return the greater of this and the given position.\n\n\nResolvedPos.prototype.max = function max(other) {\n return other.pos > this.pos ? other : this;\n}; // :: (ResolvedPos) → ResolvedPos\n// Return the smaller of this and the given position.\n\n\nResolvedPos.prototype.min = function min(other) {\n return other.pos < this.pos ? other : this;\n};\n\nResolvedPos.prototype.toString = function toString() {\n var str = \"\";\n\n for (var i = 1; i <= this.depth; i++) {\n str += (str ? \"/\" : \"\") + this.node(i).type.name + \"_\" + this.index(i - 1);\n }\n\n return str + \":\" + this.parentOffset;\n};\n\nResolvedPos.resolve = function resolve(doc, pos) {\n if (!(pos >= 0 && pos <= doc.content.size)) {\n throw new RangeError(\"Position \" + pos + \" out of range\");\n }\n\n var path = [];\n var start = 0,\n parentOffset = pos;\n\n for (var node = doc;;) {\n var ref = node.content.findIndex(parentOffset);\n var index = ref.index;\n var offset = ref.offset;\n var rem = parentOffset - offset;\n path.push(node, index, start + offset);\n\n if (!rem) {\n break;\n }\n\n node = node.child(index);\n\n if (node.isText) {\n break;\n }\n\n parentOffset = rem - 1;\n start += offset + 1;\n }\n\n return new ResolvedPos(pos, path, parentOffset);\n};\n\nResolvedPos.resolveCached = function resolveCached(doc, pos) {\n for (var i = 0; i < resolveCache.length; i++) {\n var cached = resolveCache[i];\n\n if (cached.pos == pos && cached.doc == doc) {\n return cached;\n }\n }\n\n var result = resolveCache[resolveCachePos] = ResolvedPos.resolve(doc, pos);\n resolveCachePos = (resolveCachePos + 1) % resolveCacheSize;\n return result;\n};\n\nObject.defineProperties(ResolvedPos.prototype, prototypeAccessors$2);\nvar resolveCache = [],\n resolveCachePos = 0,\n resolveCacheSize = 12; // ::- Represents a flat range of content, i.e. one that starts and\n// ends in the same node.\n\nvar NodeRange = function NodeRange($from, $to, depth) {\n // :: ResolvedPos A resolved position along the start of the\n // content. May have a `depth` greater than this object's `depth`\n // property, since these are the positions that were used to\n // compute the range, not re-resolved positions directly at its\n // boundaries.\n this.$from = $from; // :: ResolvedPos A position along the end of the content. See\n // caveat for [`$from`](#model.NodeRange.$from).\n\n this.$to = $to; // :: number The depth of the node that this range points into.\n\n this.depth = depth;\n};\n\nvar prototypeAccessors$1$1 = {\n start: {\n configurable: true\n },\n end: {\n configurable: true\n },\n parent: {\n configurable: true\n },\n startIndex: {\n configurable: true\n },\n endIndex: {\n configurable: true\n }\n}; // :: number The position at the start of the range.\n\nprototypeAccessors$1$1.start.get = function () {\n return this.$from.before(this.depth + 1);\n}; // :: number The position at the end of the range.\n\n\nprototypeAccessors$1$1.end.get = function () {\n return this.$to.after(this.depth + 1);\n}; // :: Node The parent node that the range points into.\n\n\nprototypeAccessors$1$1.parent.get = function () {\n return this.$from.node(this.depth);\n}; // :: number The start index of the range in the parent node.\n\n\nprototypeAccessors$1$1.startIndex.get = function () {\n return this.$from.index(this.depth);\n}; // :: number The end index of the range in the parent node.\n\n\nprototypeAccessors$1$1.endIndex.get = function () {\n return this.$to.indexAfter(this.depth);\n};\n\nObject.defineProperties(NodeRange.prototype, prototypeAccessors$1$1);\nvar emptyAttrs = Object.create(null); // ::- This class represents a node in the tree that makes up a\n// ProseMirror document. So a document is an instance of `Node`, with\n// children that are also instances of `Node`.\n//\n// Nodes are persistent data structures. Instead of changing them, you\n// create new ones with the content you want. Old ones keep pointing\n// at the old document shape. This is made cheaper by sharing\n// structure between the old and new data as much as possible, which a\n// tree shape like this (without back pointers) makes easy.\n//\n// **Do not** directly mutate the properties of a `Node` object. See\n// [the guide](/docs/guide/#doc) for more information.\n\nvar Node = function Node(type, attrs, content, marks) {\n // :: NodeType\n // The type of node that this is.\n this.type = type; // :: Object\n // An object mapping attribute names to values. The kind of\n // attributes allowed and required are\n // [determined](#model.NodeSpec.attrs) by the node type.\n\n this.attrs = attrs; // :: Fragment\n // A container holding the node's children.\n\n this.content = content || Fragment.empty; // :: [Mark]\n // The marks (things like whether it is emphasized or part of a\n // link) applied to this node.\n\n this.marks = marks || Mark.none;\n};\n\nvar prototypeAccessors$3 = {\n nodeSize: {\n configurable: true\n },\n childCount: {\n configurable: true\n },\n textContent: {\n configurable: true\n },\n firstChild: {\n configurable: true\n },\n lastChild: {\n configurable: true\n },\n isBlock: {\n configurable: true\n },\n isTextblock: {\n configurable: true\n },\n inlineContent: {\n configurable: true\n },\n isInline: {\n configurable: true\n },\n isText: {\n configurable: true\n },\n isLeaf: {\n configurable: true\n },\n isAtom: {\n configurable: true\n }\n}; // text:: ?string\n// For text nodes, this contains the node's text content.\n// :: number\n// The size of this node, as defined by the integer-based [indexing\n// scheme](/docs/guide/#doc.indexing). For text nodes, this is the\n// amount of characters. For other leaf nodes, it is one. For\n// non-leaf nodes, it is the size of the content plus two (the start\n// and end token).\n\nprototypeAccessors$3.nodeSize.get = function () {\n return this.isLeaf ? 1 : 2 + this.content.size;\n}; // :: number\n// The number of children that the node has.\n\n\nprototypeAccessors$3.childCount.get = function () {\n return this.content.childCount;\n}; // :: (number) → Node\n// Get the child node at the given index. Raises an error when the\n// index is out of range.\n\n\nNode.prototype.child = function child(index) {\n return this.content.child(index);\n}; // :: (number) → ?Node\n// Get the child node at the given index, if it exists.\n\n\nNode.prototype.maybeChild = function maybeChild(index) {\n return this.content.maybeChild(index);\n}; // :: ((node: Node, offset: number, index: number))\n// Call `f` for every child node, passing the node, its offset\n// into this parent node, and its index.\n\n\nNode.prototype.forEach = function forEach(f) {\n this.content.forEach(f);\n}; // :: (number, number, (node: Node, pos: number, parent: Node, index: number) → ?bool, ?number)\n// Invoke a callback for all descendant nodes recursively between\n// the given two positions that are relative to start of this node's\n// content. The callback is invoked with the node, its\n// parent-relative position, its parent node, and its child index.\n// When the callback returns false for a given node, that node's\n// children will not be recursed over. The last parameter can be\n// used to specify a starting position to count from.\n\n\nNode.prototype.nodesBetween = function nodesBetween(from, to, f, startPos) {\n if (startPos === void 0) startPos = 0;\n this.content.nodesBetween(from, to, f, startPos, this);\n}; // :: ((node: Node, pos: number, parent: Node) → ?bool)\n// Call the given callback for every descendant node. Doesn't\n// descend into a node when the callback returns `false`.\n\n\nNode.prototype.descendants = function descendants(f) {\n this.nodesBetween(0, this.content.size, f);\n}; // :: string\n// Concatenates all the text nodes found in this fragment and its\n// children.\n\n\nprototypeAccessors$3.textContent.get = function () {\n return this.textBetween(0, this.content.size, \"\");\n}; // :: (number, number, ?string, ?string) → string\n// Get all text between positions `from` and `to`. When\n// `blockSeparator` is given, it will be inserted whenever a new\n// block node is started. When `leafText` is given, it'll be\n// inserted for every non-text leaf node encountered.\n\n\nNode.prototype.textBetween = function textBetween(from, to, blockSeparator, leafText) {\n return this.content.textBetween(from, to, blockSeparator, leafText);\n}; // :: ?Node\n// Returns this node's first child, or `null` if there are no\n// children.\n\n\nprototypeAccessors$3.firstChild.get = function () {\n return this.content.firstChild;\n}; // :: ?Node\n// Returns this node's last child, or `null` if there are no\n// children.\n\n\nprototypeAccessors$3.lastChild.get = function () {\n return this.content.lastChild;\n}; // :: (Node) → bool\n// Test whether two nodes represent the same piece of document.\n\n\nNode.prototype.eq = function eq(other) {\n return this == other || this.sameMarkup(other) && this.content.eq(other.content);\n}; // :: (Node) → bool\n// Compare the markup (type, attributes, and marks) of this node to\n// those of another. Returns `true` if both have the same markup.\n\n\nNode.prototype.sameMarkup = function sameMarkup(other) {\n return this.hasMarkup(other.type, other.attrs, other.marks);\n}; // :: (NodeType, ?Object, ?[Mark]) → bool\n// Check whether this node's markup correspond to the given type,\n// attributes, and marks.\n\n\nNode.prototype.hasMarkup = function hasMarkup(type, attrs, marks) {\n return this.type == type && compareDeep(this.attrs, attrs || type.defaultAttrs || emptyAttrs) && Mark.sameSet(this.marks, marks || Mark.none);\n}; // :: (?Fragment) → Node\n// Create a new node with the same markup as this node, containing\n// the given content (or empty, if no content is given).\n\n\nNode.prototype.copy = function copy(content) {\n if (content === void 0) content = null;\n\n if (content == this.content) {\n return this;\n }\n\n return new this.constructor(this.type, this.attrs, content, this.marks);\n}; // :: ([Mark]) → Node\n// Create a copy of this node, with the given set of marks instead\n// of the node's own marks.\n\n\nNode.prototype.mark = function mark(marks) {\n return marks == this.marks ? this : new this.constructor(this.type, this.attrs, this.content, marks);\n}; // :: (number, ?number) → Node\n// Create a copy of this node with only the content between the\n// given positions. If `to` is not given, it defaults to the end of\n// the node.\n\n\nNode.prototype.cut = function cut(from, to) {\n if (from == 0 && to == this.content.size) {\n return this;\n }\n\n return this.copy(this.content.cut(from, to));\n}; // :: (number, ?number) → Slice\n// Cut out the part of the document between the given positions, and\n// return it as a `Slice` object.\n\n\nNode.prototype.slice = function slice(from, to, includeParents) {\n if (to === void 0) to = this.content.size;\n if (includeParents === void 0) includeParents = false;\n\n if (from == to) {\n return Slice.empty;\n }\n\n var $from = this.resolve(from),\n $to = this.resolve(to);\n var depth = includeParents ? 0 : $from.sharedDepth(to);\n var start = $from.start(depth),\n node = $from.node(depth);\n var content = node.content.cut($from.pos - start, $to.pos - start);\n return new Slice(content, $from.depth - depth, $to.depth - depth);\n}; // :: (number, number, Slice) → Node\n// Replace the part of the document between the given positions with\n// the given slice. The slice must 'fit', meaning its open sides\n// must be able to connect to the surrounding content, and its\n// content nodes must be valid children for the node they are placed\n// into. If any of this is violated, an error of type\n// [`ReplaceError`](#model.ReplaceError) is thrown.\n\n\nNode.prototype.replace = function replace$1(from, to, slice) {\n return replace(this.resolve(from), this.resolve(to), slice);\n}; // :: (number) → ?Node\n// Find the node directly after the given position.\n\n\nNode.prototype.nodeAt = function nodeAt(pos) {\n for (var node = this;;) {\n var ref = node.content.findIndex(pos);\n var index = ref.index;\n var offset = ref.offset;\n node = node.maybeChild(index);\n\n if (!node) {\n return null;\n }\n\n if (offset == pos || node.isText) {\n return node;\n }\n\n pos -= offset + 1;\n }\n}; // :: (number) → {node: ?Node, index: number, offset: number}\n// Find the (direct) child node after the given offset, if any,\n// and return it along with its index and offset relative to this\n// node.\n\n\nNode.prototype.childAfter = function childAfter(pos) {\n var ref = this.content.findIndex(pos);\n var index = ref.index;\n var offset = ref.offset;\n return {\n node: this.content.maybeChild(index),\n index: index,\n offset: offset\n };\n}; // :: (number) → {node: ?Node, index: number, offset: number}\n// Find the (direct) child node before the given offset, if any,\n// and return it along with its index and offset relative to this\n// node.\n\n\nNode.prototype.childBefore = function childBefore(pos) {\n if (pos == 0) {\n return {\n node: null,\n index: 0,\n offset: 0\n };\n }\n\n var ref = this.content.findIndex(pos);\n var index = ref.index;\n var offset = ref.offset;\n\n if (offset < pos) {\n return {\n node: this.content.child(index),\n index: index,\n offset: offset\n };\n }\n\n var node = this.content.child(index - 1);\n return {\n node: node,\n index: index - 1,\n offset: offset - node.nodeSize\n };\n}; // :: (number) → ResolvedPos\n// Resolve the given position in the document, returning an\n// [object](#model.ResolvedPos) with information about its context.\n\n\nNode.prototype.resolve = function resolve(pos) {\n return ResolvedPos.resolveCached(this, pos);\n};\n\nNode.prototype.resolveNoCache = function resolveNoCache(pos) {\n return ResolvedPos.resolve(this, pos);\n}; // :: (number, number, MarkType) → bool\n// Test whether a mark of the given type occurs in this document\n// between the two given positions.\n\n\nNode.prototype.rangeHasMark = function rangeHasMark(from, to, type) {\n var found = false;\n\n if (to > from) {\n this.nodesBetween(from, to, function (node) {\n if (type.isInSet(node.marks)) {\n found = true;\n }\n\n return !found;\n });\n }\n\n return found;\n}; // :: bool\n// True when this is a block (non-inline node)\n\n\nprototypeAccessors$3.isBlock.get = function () {\n return this.type.isBlock;\n}; // :: bool\n// True when this is a textblock node, a block node with inline\n// content.\n\n\nprototypeAccessors$3.isTextblock.get = function () {\n return this.type.isTextblock;\n}; // :: bool\n// True when this node allows inline content.\n\n\nprototypeAccessors$3.inlineContent.get = function () {\n return this.type.inlineContent;\n}; // :: bool\n// True when this is an inline node (a text node or a node that can\n// appear among text).\n\n\nprototypeAccessors$3.isInline.get = function () {\n return this.type.isInline;\n}; // :: bool\n// True when this is a text node.\n\n\nprototypeAccessors$3.isText.get = function () {\n return this.type.isText;\n}; // :: bool\n// True when this is a leaf node.\n\n\nprototypeAccessors$3.isLeaf.get = function () {\n return this.type.isLeaf;\n}; // :: bool\n// True when this is an atom, i.e. when it does not have directly\n// editable content. This is usually the same as `isLeaf`, but can\n// be configured with the [`atom` property](#model.NodeSpec.atom) on\n// a node's spec (typically used when the node is displayed as an\n// uneditable [node view](#view.NodeView)).\n\n\nprototypeAccessors$3.isAtom.get = function () {\n return this.type.isAtom;\n}; // :: () → string\n// Return a string representation of this node for debugging\n// purposes.\n\n\nNode.prototype.toString = function toString() {\n if (this.type.spec.toDebugString) {\n return this.type.spec.toDebugString(this);\n }\n\n var name = this.type.name;\n\n if (this.content.size) {\n name += \"(\" + this.content.toStringInner() + \")\";\n }\n\n return wrapMarks(this.marks, name);\n}; // :: (number) → ContentMatch\n// Get the content match in this node at the given index.\n\n\nNode.prototype.contentMatchAt = function contentMatchAt(index) {\n var match = this.type.contentMatch.matchFragment(this.content, 0, index);\n\n if (!match) {\n throw new Error(\"Called contentMatchAt on a node with invalid content\");\n }\n\n return match;\n}; // :: (number, number, ?Fragment, ?number, ?number) → bool\n// Test whether replacing the range between `from` and `to` (by\n// child index) with the given replacement fragment (which defaults\n// to the empty fragment) would leave the node's content valid. You\n// can optionally pass `start` and `end` indices into the\n// replacement fragment.\n\n\nNode.prototype.canReplace = function canReplace(from, to, replacement, start, end) {\n if (replacement === void 0) replacement = Fragment.empty;\n if (start === void 0) start = 0;\n if (end === void 0) end = replacement.childCount;\n var one = this.contentMatchAt(from).matchFragment(replacement, start, end);\n var two = one && one.matchFragment(this.content, to);\n\n if (!two || !two.validEnd) {\n return false;\n }\n\n for (var i = start; i < end; i++) {\n if (!this.type.allowsMarks(replacement.child(i).marks)) {\n return false;\n }\n }\n\n return true;\n}; // :: (number, number, NodeType, ?[Mark]) → bool\n// Test whether replacing the range `from` to `to` (by index) with a\n// node of the given type would leave the node's content valid.\n\n\nNode.prototype.canReplaceWith = function canReplaceWith(from, to, type, marks) {\n if (marks && !this.type.allowsMarks(marks)) {\n return false;\n }\n\n var start = this.contentMatchAt(from).matchType(type);\n var end = start && start.matchFragment(this.content, to);\n return end ? end.validEnd : false;\n}; // :: (Node) → bool\n// Test whether the given node's content could be appended to this\n// node. If that node is empty, this will only return true if there\n// is at least one node type that can appear in both nodes (to avoid\n// merging completely incompatible nodes).\n\n\nNode.prototype.canAppend = function canAppend(other) {\n if (other.content.size) {\n return this.canReplace(this.childCount, this.childCount, other.content);\n } else {\n return this.type.compatibleContent(other.type);\n }\n}; // :: ()\n// Check whether this node and its descendants conform to the\n// schema, and raise error when they do not.\n\n\nNode.prototype.check = function check() {\n if (!this.type.validContent(this.content)) {\n throw new RangeError(\"Invalid content for node \" + this.type.name + \": \" + this.content.toString().slice(0, 50));\n }\n\n this.content.forEach(function (node) {\n return node.check();\n });\n}; // :: () → Object\n// Return a JSON-serializeable representation of this node.\n\n\nNode.prototype.toJSON = function toJSON() {\n var obj = {\n type: this.type.name\n };\n\n for (var _ in this.attrs) {\n obj.attrs = this.attrs;\n break;\n }\n\n if (this.content.size) {\n obj.content = this.content.toJSON();\n }\n\n if (this.marks.length) {\n obj.marks = this.marks.map(function (n) {\n return n.toJSON();\n });\n }\n\n return obj;\n}; // :: (Schema, Object) → Node\n// Deserialize a node from its JSON representation.\n\n\nNode.fromJSON = function fromJSON(schema, json) {\n if (!json) {\n throw new RangeError(\"Invalid input for Node.fromJSON\");\n }\n\n var marks = null;\n\n if (json.marks) {\n if (!Array.isArray(json.marks)) {\n throw new RangeError(\"Invalid mark data for Node.fromJSON\");\n }\n\n marks = json.marks.map(schema.markFromJSON);\n }\n\n if (json.type == \"text\") {\n if (typeof json.text != \"string\") {\n throw new RangeError(\"Invalid text node in JSON\");\n }\n\n return schema.text(json.text, marks);\n }\n\n var content = Fragment.fromJSON(schema, json.content);\n return schema.nodeType(json.type).create(json.attrs, content, marks);\n};\n\nObject.defineProperties(Node.prototype, prototypeAccessors$3);\n\nvar TextNode = /*@__PURE__*/function (Node) {\n function TextNode(type, attrs, content, marks) {\n Node.call(this, type, attrs, null, marks);\n\n if (!content) {\n throw new RangeError(\"Empty text nodes are not allowed\");\n }\n\n this.text = content;\n }\n\n if (Node) TextNode.__proto__ = Node;\n TextNode.prototype = Object.create(Node && Node.prototype);\n TextNode.prototype.constructor = TextNode;\n var prototypeAccessors$1 = {\n textContent: {\n configurable: true\n },\n nodeSize: {\n configurable: true\n }\n };\n\n TextNode.prototype.toString = function toString() {\n if (this.type.spec.toDebugString) {\n return this.type.spec.toDebugString(this);\n }\n\n return wrapMarks(this.marks, JSON.stringify(this.text));\n };\n\n prototypeAccessors$1.textContent.get = function () {\n return this.text;\n };\n\n TextNode.prototype.textBetween = function textBetween(from, to) {\n return this.text.slice(from, to);\n };\n\n prototypeAccessors$1.nodeSize.get = function () {\n return this.text.length;\n };\n\n TextNode.prototype.mark = function mark(marks) {\n return marks == this.marks ? this : new TextNode(this.type, this.attrs, this.text, marks);\n };\n\n TextNode.prototype.withText = function withText(text) {\n if (text == this.text) {\n return this;\n }\n\n return new TextNode(this.type, this.attrs, text, this.marks);\n };\n\n TextNode.prototype.cut = function cut(from, to) {\n if (from === void 0) from = 0;\n if (to === void 0) to = this.text.length;\n\n if (from == 0 && to == this.text.length) {\n return this;\n }\n\n return this.withText(this.text.slice(from, to));\n };\n\n TextNode.prototype.eq = function eq(other) {\n return this.sameMarkup(other) && this.text == other.text;\n };\n\n TextNode.prototype.toJSON = function toJSON() {\n var base = Node.prototype.toJSON.call(this);\n base.text = this.text;\n return base;\n };\n\n Object.defineProperties(TextNode.prototype, prototypeAccessors$1);\n return TextNode;\n}(Node);\n\nfunction wrapMarks(marks, str) {\n for (var i = marks.length - 1; i >= 0; i--) {\n str = marks[i].type.name + \"(\" + str + \")\";\n }\n\n return str;\n} // ::- Instances of this class represent a match state of a node\n// type's [content expression](#model.NodeSpec.content), and can be\n// used to find out whether further content matches here, and whether\n// a given position is a valid end of the node.\n\n\nvar ContentMatch = function ContentMatch(validEnd) {\n // :: bool\n // True when this match state represents a valid end of the node.\n this.validEnd = validEnd;\n this.next = [];\n this.wrapCache = [];\n};\n\nvar prototypeAccessors$4 = {\n inlineContent: {\n configurable: true\n },\n defaultType: {\n configurable: true\n },\n edgeCount: {\n configurable: true\n }\n};\n\nContentMatch.parse = function parse(string, nodeTypes) {\n var stream = new TokenStream(string, nodeTypes);\n\n if (stream.next == null) {\n return ContentMatch.empty;\n }\n\n var expr = parseExpr(stream);\n\n if (stream.next) {\n stream.err(\"Unexpected trailing text\");\n }\n\n var match = dfa(nfa(expr));\n checkForDeadEnds(match, stream);\n return match;\n}; // :: (NodeType) → ?ContentMatch\n// Match a node type, returning a match after that node if\n// successful.\n\n\nContentMatch.prototype.matchType = function matchType(type) {\n for (var i = 0; i < this.next.length; i += 2) {\n if (this.next[i] == type) {\n return this.next[i + 1];\n }\n }\n\n return null;\n}; // :: (Fragment, ?number, ?number) → ?ContentMatch\n// Try to match a fragment. Returns the resulting match when\n// successful.\n\n\nContentMatch.prototype.matchFragment = function matchFragment(frag, start, end) {\n if (start === void 0) start = 0;\n if (end === void 0) end = frag.childCount;\n var cur = this;\n\n for (var i = start; cur && i < end; i++) {\n cur = cur.matchType(frag.child(i).type);\n }\n\n return cur;\n};\n\nprototypeAccessors$4.inlineContent.get = function () {\n var first = this.next[0];\n return first ? first.isInline : false;\n}; // :: ?NodeType\n// Get the first matching node type at this match position that can\n// be generated.\n\n\nprototypeAccessors$4.defaultType.get = function () {\n for (var i = 0; i < this.next.length; i += 2) {\n var type = this.next[i];\n\n if (!(type.isText || type.hasRequiredAttrs())) {\n return type;\n }\n }\n};\n\nContentMatch.prototype.compatible = function compatible(other) {\n for (var i = 0; i < this.next.length; i += 2) {\n for (var j = 0; j < other.next.length; j += 2) {\n if (this.next[i] == other.next[j]) {\n return true;\n }\n }\n }\n\n return false;\n}; // :: (Fragment, bool, ?number) → ?Fragment\n// Try to match the given fragment, and if that fails, see if it can\n// be made to match by inserting nodes in front of it. When\n// successful, return a fragment of inserted nodes (which may be\n// empty if nothing had to be inserted). When `toEnd` is true, only\n// return a fragment if the resulting match goes to the end of the\n// content expression.\n\n\nContentMatch.prototype.fillBefore = function fillBefore(after, toEnd, startIndex) {\n if (toEnd === void 0) toEnd = false;\n if (startIndex === void 0) startIndex = 0;\n var seen = [this];\n\n function search(match, types) {\n var finished = match.matchFragment(after, startIndex);\n\n if (finished && (!toEnd || finished.validEnd)) {\n return Fragment.from(types.map(function (tp) {\n return tp.createAndFill();\n }));\n }\n\n for (var i = 0; i < match.next.length; i += 2) {\n var type = match.next[i],\n next = match.next[i + 1];\n\n if (!(type.isText || type.hasRequiredAttrs()) && seen.indexOf(next) == -1) {\n seen.push(next);\n var found = search(next, types.concat(type));\n\n if (found) {\n return found;\n }\n }\n }\n }\n\n return search(this, []);\n}; // :: (NodeType) → ?[NodeType]\n// Find a set of wrapping node types that would allow a node of the\n// given type to appear at this position. The result may be empty\n// (when it fits directly) and will be null when no such wrapping\n// exists.\n\n\nContentMatch.prototype.findWrapping = function findWrapping(target) {\n for (var i = 0; i < this.wrapCache.length; i += 2) {\n if (this.wrapCache[i] == target) {\n return this.wrapCache[i + 1];\n }\n }\n\n var computed = this.computeWrapping(target);\n this.wrapCache.push(target, computed);\n return computed;\n};\n\nContentMatch.prototype.computeWrapping = function computeWrapping(target) {\n var seen = Object.create(null),\n active = [{\n match: this,\n type: null,\n via: null\n }];\n\n while (active.length) {\n var current = active.shift(),\n match = current.match;\n\n if (match.matchType(target)) {\n var result = [];\n\n for (var obj = current; obj.type; obj = obj.via) {\n result.push(obj.type);\n }\n\n return result.reverse();\n }\n\n for (var i = 0; i < match.next.length; i += 2) {\n var type = match.next[i];\n\n if (!type.isLeaf && !type.hasRequiredAttrs() && !(type.name in seen) && (!current.type || match.next[i + 1].validEnd)) {\n active.push({\n match: type.contentMatch,\n type: type,\n via: current\n });\n seen[type.name] = true;\n }\n }\n }\n}; // :: number\n// The number of outgoing edges this node has in the finite\n// automaton that describes the content expression.\n\n\nprototypeAccessors$4.edgeCount.get = function () {\n return this.next.length >> 1;\n}; // :: (number) → {type: NodeType, next: ContentMatch}\n// Get the _n_​th outgoing edge from this node in the finite\n// automaton that describes the content expression.\n\n\nContentMatch.prototype.edge = function edge(n) {\n var i = n << 1;\n\n if (i >= this.next.length) {\n throw new RangeError(\"There's no \" + n + \"th edge in this content match\");\n }\n\n return {\n type: this.next[i],\n next: this.next[i + 1]\n };\n};\n\nContentMatch.prototype.toString = function toString() {\n var seen = [];\n\n function scan(m) {\n seen.push(m);\n\n for (var i = 1; i < m.next.length; i += 2) {\n if (seen.indexOf(m.next[i]) == -1) {\n scan(m.next[i]);\n }\n }\n }\n\n scan(this);\n return seen.map(function (m, i) {\n var out = i + (m.validEnd ? \"*\" : \" \") + \" \";\n\n for (var i$1 = 0; i$1 < m.next.length; i$1 += 2) {\n out += (i$1 ? \", \" : \"\") + m.next[i$1].name + \"->\" + seen.indexOf(m.next[i$1 + 1]);\n }\n\n return out;\n }).join(\"\\n\");\n};\n\nObject.defineProperties(ContentMatch.prototype, prototypeAccessors$4);\nContentMatch.empty = new ContentMatch(true);\n\nvar TokenStream = function TokenStream(string, nodeTypes) {\n this.string = string;\n this.nodeTypes = nodeTypes;\n this.inline = null;\n this.pos = 0;\n this.tokens = string.split(/\\s*(?=\\b|\\W|$)/);\n\n if (this.tokens[this.tokens.length - 1] == \"\") {\n this.tokens.pop();\n }\n\n if (this.tokens[0] == \"\") {\n this.tokens.unshift();\n }\n};\n\nvar prototypeAccessors$1$2 = {\n next: {\n configurable: true\n }\n};\n\nprototypeAccessors$1$2.next.get = function () {\n return this.tokens[this.pos];\n};\n\nTokenStream.prototype.eat = function eat(tok) {\n return this.next == tok && (this.pos++ || true);\n};\n\nTokenStream.prototype.err = function err(str) {\n throw new SyntaxError(str + \" (in content expression '\" + this.string + \"')\");\n};\n\nObject.defineProperties(TokenStream.prototype, prototypeAccessors$1$2);\n\nfunction parseExpr(stream) {\n var exprs = [];\n\n do {\n exprs.push(parseExprSeq(stream));\n } while (stream.eat(\"|\"));\n\n return exprs.length == 1 ? exprs[0] : {\n type: \"choice\",\n exprs: exprs\n };\n}\n\nfunction parseExprSeq(stream) {\n var exprs = [];\n\n do {\n exprs.push(parseExprSubscript(stream));\n } while (stream.next && stream.next != \")\" && stream.next != \"|\");\n\n return exprs.length == 1 ? exprs[0] : {\n type: \"seq\",\n exprs: exprs\n };\n}\n\nfunction parseExprSubscript(stream) {\n var expr = parseExprAtom(stream);\n\n for (;;) {\n if (stream.eat(\"+\")) {\n expr = {\n type: \"plus\",\n expr: expr\n };\n } else if (stream.eat(\"*\")) {\n expr = {\n type: \"star\",\n expr: expr\n };\n } else if (stream.eat(\"?\")) {\n expr = {\n type: \"opt\",\n expr: expr\n };\n } else if (stream.eat(\"{\")) {\n expr = parseExprRange(stream, expr);\n } else {\n break;\n }\n }\n\n return expr;\n}\n\nfunction parseNum(stream) {\n if (/\\D/.test(stream.next)) {\n stream.err(\"Expected number, got '\" + stream.next + \"'\");\n }\n\n var result = Number(stream.next);\n stream.pos++;\n return result;\n}\n\nfunction parseExprRange(stream, expr) {\n var min = parseNum(stream),\n max = min;\n\n if (stream.eat(\",\")) {\n if (stream.next != \"}\") {\n max = parseNum(stream);\n } else {\n max = -1;\n }\n }\n\n if (!stream.eat(\"}\")) {\n stream.err(\"Unclosed braced range\");\n }\n\n return {\n type: \"range\",\n min: min,\n max: max,\n expr: expr\n };\n}\n\nfunction resolveName(stream, name) {\n var types = stream.nodeTypes,\n type = types[name];\n\n if (type) {\n return [type];\n }\n\n var result = [];\n\n for (var typeName in types) {\n var type$1 = types[typeName];\n\n if (type$1.groups.indexOf(name) > -1) {\n result.push(type$1);\n }\n }\n\n if (result.length == 0) {\n stream.err(\"No node type or group '\" + name + \"' found\");\n }\n\n return result;\n}\n\nfunction parseExprAtom(stream) {\n if (stream.eat(\"(\")) {\n var expr = parseExpr(stream);\n\n if (!stream.eat(\")\")) {\n stream.err(\"Missing closing paren\");\n }\n\n return expr;\n } else if (!/\\W/.test(stream.next)) {\n var exprs = resolveName(stream, stream.next).map(function (type) {\n if (stream.inline == null) {\n stream.inline = type.isInline;\n } else if (stream.inline != type.isInline) {\n stream.err(\"Mixing inline and block content\");\n }\n\n return {\n type: \"name\",\n value: type\n };\n });\n stream.pos++;\n return exprs.length == 1 ? exprs[0] : {\n type: \"choice\",\n exprs: exprs\n };\n } else {\n stream.err(\"Unexpected token '\" + stream.next + \"'\");\n }\n} // The code below helps compile a regular-expression-like language\n// into a deterministic finite automaton. For a good introduction to\n// these concepts, see https://swtch.com/~rsc/regexp/regexp1.html\n// : (Object) → [[{term: ?any, to: number}]]\n// Construct an NFA from an expression as returned by the parser. The\n// NFA is represented as an array of states, which are themselves\n// arrays of edges, which are `{term, to}` objects. The first state is\n// the entry state and the last node is the success state.\n//\n// Note that unlike typical NFAs, the edge ordering in this one is\n// significant, in that it is used to contruct filler content when\n// necessary.\n\n\nfunction nfa(expr) {\n var nfa = [[]];\n connect(compile(expr, 0), node());\n return nfa;\n\n function node() {\n return nfa.push([]) - 1;\n }\n\n function edge(from, to, term) {\n var edge = {\n term: term,\n to: to\n };\n nfa[from].push(edge);\n return edge;\n }\n\n function connect(edges, to) {\n edges.forEach(function (edge) {\n return edge.to = to;\n });\n }\n\n function compile(expr, from) {\n if (expr.type == \"choice\") {\n return expr.exprs.reduce(function (out, expr) {\n return out.concat(compile(expr, from));\n }, []);\n } else if (expr.type == \"seq\") {\n for (var i = 0;; i++) {\n var next = compile(expr.exprs[i], from);\n\n if (i == expr.exprs.length - 1) {\n return next;\n }\n\n connect(next, from = node());\n }\n } else if (expr.type == \"star\") {\n var loop = node();\n edge(from, loop);\n connect(compile(expr.expr, loop), loop);\n return [edge(loop)];\n } else if (expr.type == \"plus\") {\n var loop$1 = node();\n connect(compile(expr.expr, from), loop$1);\n connect(compile(expr.expr, loop$1), loop$1);\n return [edge(loop$1)];\n } else if (expr.type == \"opt\") {\n return [edge(from)].concat(compile(expr.expr, from));\n } else if (expr.type == \"range\") {\n var cur = from;\n\n for (var i$1 = 0; i$1 < expr.min; i$1++) {\n var next$1 = node();\n connect(compile(expr.expr, cur), next$1);\n cur = next$1;\n }\n\n if (expr.max == -1) {\n connect(compile(expr.expr, cur), cur);\n } else {\n for (var i$2 = expr.min; i$2 < expr.max; i$2++) {\n var next$2 = node();\n edge(cur, next$2);\n connect(compile(expr.expr, cur), next$2);\n cur = next$2;\n }\n }\n\n return [edge(cur)];\n } else if (expr.type == \"name\") {\n return [edge(from, null, expr.value)];\n }\n }\n}\n\nfunction cmp(a, b) {\n return b - a;\n} // Get the set of nodes reachable by null edges from `node`. Omit\n// nodes with only a single null-out-edge, since they may lead to\n// needless duplicated nodes.\n\n\nfunction nullFrom(nfa, node) {\n var result = [];\n scan(node);\n return result.sort(cmp);\n\n function scan(node) {\n var edges = nfa[node];\n\n if (edges.length == 1 && !edges[0].term) {\n return scan(edges[0].to);\n }\n\n result.push(node);\n\n for (var i = 0; i < edges.length; i++) {\n var ref = edges[i];\n var term = ref.term;\n var to = ref.to;\n\n if (!term && result.indexOf(to) == -1) {\n scan(to);\n }\n }\n }\n} // : ([[{term: ?any, to: number}]]) → ContentMatch\n// Compiles an NFA as produced by `nfa` into a DFA, modeled as a set\n// of state objects (`ContentMatch` instances) with transitions\n// between them.\n\n\nfunction dfa(nfa) {\n var labeled = Object.create(null);\n return explore(nullFrom(nfa, 0));\n\n function explore(states) {\n var out = [];\n states.forEach(function (node) {\n nfa[node].forEach(function (ref) {\n var term = ref.term;\n var to = ref.to;\n\n if (!term) {\n return;\n }\n\n var known = out.indexOf(term),\n set = known > -1 && out[known + 1];\n nullFrom(nfa, to).forEach(function (node) {\n if (!set) {\n out.push(term, set = []);\n }\n\n if (set.indexOf(node) == -1) {\n set.push(node);\n }\n });\n });\n });\n var state = labeled[states.join(\",\")] = new ContentMatch(states.indexOf(nfa.length - 1) > -1);\n\n for (var i = 0; i < out.length; i += 2) {\n var states$1 = out[i + 1].sort(cmp);\n state.next.push(out[i], labeled[states$1.join(\",\")] || explore(states$1));\n }\n\n return state;\n }\n}\n\nfunction checkForDeadEnds(match, stream) {\n for (var i = 0, work = [match]; i < work.length; i++) {\n var state = work[i],\n dead = !state.validEnd,\n nodes = [];\n\n for (var j = 0; j < state.next.length; j += 2) {\n var node = state.next[j],\n next = state.next[j + 1];\n nodes.push(node.name);\n\n if (dead && !(node.isText || node.hasRequiredAttrs())) {\n dead = false;\n }\n\n if (work.indexOf(next) == -1) {\n work.push(next);\n }\n }\n\n if (dead) {\n stream.err(\"Only non-generatable nodes (\" + nodes.join(\", \") + \") in a required position\");\n }\n }\n} // For node types where all attrs have a default value (or which don't\n// have any attributes), build up a single reusable default attribute\n// object, and use it for all nodes that don't specify specific\n// attributes.\n\n\nfunction defaultAttrs(attrs) {\n var defaults = Object.create(null);\n\n for (var attrName in attrs) {\n var attr = attrs[attrName];\n\n if (!attr.hasDefault) {\n return null;\n }\n\n defaults[attrName] = attr[\"default\"];\n }\n\n return defaults;\n}\n\nfunction computeAttrs(attrs, value) {\n var built = Object.create(null);\n\n for (var name in attrs) {\n var given = value && value[name];\n\n if (given === undefined) {\n var attr = attrs[name];\n\n if (attr.hasDefault) {\n given = attr[\"default\"];\n } else {\n throw new RangeError(\"No value supplied for attribute \" + name);\n }\n }\n\n built[name] = given;\n }\n\n return built;\n}\n\nfunction initAttrs(attrs) {\n var result = Object.create(null);\n\n if (attrs) {\n for (var name in attrs) {\n result[name] = new Attribute(attrs[name]);\n }\n }\n\n return result;\n} // ::- Node types are objects allocated once per `Schema` and used to\n// [tag](#model.Node.type) `Node` instances. They contain information\n// about the node type, such as its name and what kind of node it\n// represents.\n\n\nvar NodeType = function NodeType(name, schema, spec) {\n // :: string\n // The name the node type has in this schema.\n this.name = name; // :: Schema\n // A link back to the `Schema` the node type belongs to.\n\n this.schema = schema; // :: NodeSpec\n // The spec that this type is based on\n\n this.spec = spec;\n this.groups = spec.group ? spec.group.split(\" \") : [];\n this.attrs = initAttrs(spec.attrs);\n this.defaultAttrs = defaultAttrs(this.attrs); // :: ContentMatch\n // The starting match of the node type's content expression.\n\n this.contentMatch = null; // : ?[MarkType]\n // The set of marks allowed in this node. `null` means all marks\n // are allowed.\n\n this.markSet = null; // :: bool\n // True if this node type has inline content.\n\n this.inlineContent = null; // :: bool\n // True if this is a block type\n\n this.isBlock = !(spec.inline || name == \"text\"); // :: bool\n // True if this is the text node type.\n\n this.isText = name == \"text\";\n};\n\nvar prototypeAccessors$5 = {\n isInline: {\n configurable: true\n },\n isTextblock: {\n configurable: true\n },\n isLeaf: {\n configurable: true\n },\n isAtom: {\n configurable: true\n }\n}; // :: bool\n// True if this is an inline type.\n\nprototypeAccessors$5.isInline.get = function () {\n return !this.isBlock;\n}; // :: bool\n// True if this is a textblock type, a block that contains inline\n// content.\n\n\nprototypeAccessors$5.isTextblock.get = function () {\n return this.isBlock && this.inlineContent;\n}; // :: bool\n// True for node types that allow no content.\n\n\nprototypeAccessors$5.isLeaf.get = function () {\n return this.contentMatch == ContentMatch.empty;\n}; // :: bool\n// True when this node is an atom, i.e. when it does not have\n// directly editable content.\n\n\nprototypeAccessors$5.isAtom.get = function () {\n return this.isLeaf || this.spec.atom;\n}; // :: () → bool\n// Tells you whether this node type has any required attributes.\n\n\nNodeType.prototype.hasRequiredAttrs = function hasRequiredAttrs() {\n for (var n in this.attrs) {\n if (this.attrs[n].isRequired) {\n return true;\n }\n }\n\n return false;\n};\n\nNodeType.prototype.compatibleContent = function compatibleContent(other) {\n return this == other || this.contentMatch.compatible(other.contentMatch);\n};\n\nNodeType.prototype.computeAttrs = function computeAttrs$1(attrs) {\n if (!attrs && this.defaultAttrs) {\n return this.defaultAttrs;\n } else {\n return computeAttrs(this.attrs, attrs);\n }\n}; // :: (?Object, ?union, ?[Mark]) → Node\n// Create a `Node` of this type. The given attributes are\n// checked and defaulted (you can pass `null` to use the type's\n// defaults entirely, if no required attributes exist). `content`\n// may be a `Fragment`, a node, an array of nodes, or\n// `null`. Similarly `marks` may be `null` to default to the empty\n// set of marks.\n\n\nNodeType.prototype.create = function create(attrs, content, marks) {\n if (this.isText) {\n throw new Error(\"NodeType.create can't construct text nodes\");\n }\n\n return new Node(this, this.computeAttrs(attrs), Fragment.from(content), Mark.setFrom(marks));\n}; // :: (?Object, ?union, ?[Mark]) → Node\n// Like [`create`](#model.NodeType.create), but check the given content\n// against the node type's content restrictions, and throw an error\n// if it doesn't match.\n\n\nNodeType.prototype.createChecked = function createChecked(attrs, content, marks) {\n content = Fragment.from(content);\n\n if (!this.validContent(content)) {\n throw new RangeError(\"Invalid content for node \" + this.name);\n }\n\n return new Node(this, this.computeAttrs(attrs), content, Mark.setFrom(marks));\n}; // :: (?Object, ?union, ?[Mark]) → ?Node\n// Like [`create`](#model.NodeType.create), but see if it is necessary to\n// add nodes to the start or end of the given fragment to make it\n// fit the node. If no fitting wrapping can be found, return null.\n// Note that, due to the fact that required nodes can always be\n// created, this will always succeed if you pass null or\n// `Fragment.empty` as content.\n\n\nNodeType.prototype.createAndFill = function createAndFill(attrs, content, marks) {\n attrs = this.computeAttrs(attrs);\n content = Fragment.from(content);\n\n if (content.size) {\n var before = this.contentMatch.fillBefore(content);\n\n if (!before) {\n return null;\n }\n\n content = before.append(content);\n }\n\n var after = this.contentMatch.matchFragment(content).fillBefore(Fragment.empty, true);\n\n if (!after) {\n return null;\n }\n\n return new Node(this, attrs, content.append(after), Mark.setFrom(marks));\n}; // :: (Fragment) → bool\n// Returns true if the given fragment is valid content for this node\n// type with the given attributes.\n\n\nNodeType.prototype.validContent = function validContent(content) {\n var result = this.contentMatch.matchFragment(content);\n\n if (!result || !result.validEnd) {\n return false;\n }\n\n for (var i = 0; i < content.childCount; i++) {\n if (!this.allowsMarks(content.child(i).marks)) {\n return false;\n }\n }\n\n return true;\n}; // :: (MarkType) → bool\n// Check whether the given mark type is allowed in this node.\n\n\nNodeType.prototype.allowsMarkType = function allowsMarkType(markType) {\n return this.markSet == null || this.markSet.indexOf(markType) > -1;\n}; // :: ([Mark]) → bool\n// Test whether the given set of marks are allowed in this node.\n\n\nNodeType.prototype.allowsMarks = function allowsMarks(marks) {\n if (this.markSet == null) {\n return true;\n }\n\n for (var i = 0; i < marks.length; i++) {\n if (!this.allowsMarkType(marks[i].type)) {\n return false;\n }\n }\n\n return true;\n}; // :: ([Mark]) → [Mark]\n// Removes the marks that are not allowed in this node from the given set.\n\n\nNodeType.prototype.allowedMarks = function allowedMarks(marks) {\n if (this.markSet == null) {\n return marks;\n }\n\n var copy;\n\n for (var i = 0; i < marks.length; i++) {\n if (!this.allowsMarkType(marks[i].type)) {\n if (!copy) {\n copy = marks.slice(0, i);\n }\n } else if (copy) {\n copy.push(marks[i]);\n }\n }\n\n return !copy ? marks : copy.length ? copy : Mark.empty;\n};\n\nNodeType.compile = function compile(nodes, schema) {\n var result = Object.create(null);\n nodes.forEach(function (name, spec) {\n return result[name] = new NodeType(name, schema, spec);\n });\n var topType = schema.spec.topNode || \"doc\";\n\n if (!result[topType]) {\n throw new RangeError(\"Schema is missing its top node type ('\" + topType + \"')\");\n }\n\n if (!result.text) {\n throw new RangeError(\"Every schema needs a 'text' type\");\n }\n\n for (var _ in result.text.attrs) {\n throw new RangeError(\"The text node type should not have attributes\");\n }\n\n return result;\n};\n\nObject.defineProperties(NodeType.prototype, prototypeAccessors$5); // Attribute descriptors\n\nvar Attribute = function Attribute(options) {\n this.hasDefault = Object.prototype.hasOwnProperty.call(options, \"default\");\n this[\"default\"] = options[\"default\"];\n};\n\nvar prototypeAccessors$1$3 = {\n isRequired: {\n configurable: true\n }\n};\n\nprototypeAccessors$1$3.isRequired.get = function () {\n return !this.hasDefault;\n};\n\nObject.defineProperties(Attribute.prototype, prototypeAccessors$1$3); // Marks\n// ::- Like nodes, marks (which are associated with nodes to signify\n// things like emphasis or being part of a link) are\n// [tagged](#model.Mark.type) with type objects, which are\n// instantiated once per `Schema`.\n\nvar MarkType = function MarkType(name, rank, schema, spec) {\n // :: string\n // The name of the mark type.\n this.name = name; // :: Schema\n // The schema that this mark type instance is part of.\n\n this.schema = schema; // :: MarkSpec\n // The spec on which the type is based.\n\n this.spec = spec;\n this.attrs = initAttrs(spec.attrs);\n this.rank = rank;\n this.excluded = null;\n var defaults = defaultAttrs(this.attrs);\n this.instance = defaults && new Mark(this, defaults);\n}; // :: (?Object) → Mark\n// Create a mark of this type. `attrs` may be `null` or an object\n// containing only some of the mark's attributes. The others, if\n// they have defaults, will be added.\n\n\nMarkType.prototype.create = function create(attrs) {\n if (!attrs && this.instance) {\n return this.instance;\n }\n\n return new Mark(this, computeAttrs(this.attrs, attrs));\n};\n\nMarkType.compile = function compile(marks, schema) {\n var result = Object.create(null),\n rank = 0;\n marks.forEach(function (name, spec) {\n return result[name] = new MarkType(name, rank++, schema, spec);\n });\n return result;\n}; // :: ([Mark]) → [Mark]\n// When there is a mark of this type in the given set, a new set\n// without it is returned. Otherwise, the input set is returned.\n\n\nMarkType.prototype.removeFromSet = function removeFromSet(set) {\n for (var i = 0; i < set.length; i++) {\n if (set[i].type == this) {\n return set.slice(0, i).concat(set.slice(i + 1));\n }\n }\n\n return set;\n}; // :: ([Mark]) → ?Mark\n// Tests whether there is a mark of this type in the given set.\n\n\nMarkType.prototype.isInSet = function isInSet(set) {\n for (var i = 0; i < set.length; i++) {\n if (set[i].type == this) {\n return set[i];\n }\n }\n}; // :: (MarkType) → bool\n// Queries whether a given mark type is\n// [excluded](#model.MarkSpec.excludes) by this one.\n\n\nMarkType.prototype.excludes = function excludes(other) {\n return this.excluded.indexOf(other) > -1;\n}; // SchemaSpec:: interface\n// An object describing a schema, as passed to the [`Schema`](#model.Schema)\n// constructor.\n//\n// nodes:: union, OrderedMap>\n// The node types in this schema. Maps names to\n// [`NodeSpec`](#model.NodeSpec) objects that describe the node type\n// associated with that name. Their order is significant—it\n// determines which [parse rules](#model.NodeSpec.parseDOM) take\n// precedence by default, and which nodes come first in a given\n// [group](#model.NodeSpec.group).\n//\n// marks:: ?union, OrderedMap>\n// The mark types that exist in this schema. The order in which they\n// are provided determines the order in which [mark\n// sets](#model.Mark.addToSet) are sorted and in which [parse\n// rules](#model.MarkSpec.parseDOM) are tried.\n//\n// topNode:: ?string\n// The name of the default top-level node for the schema. Defaults\n// to `\"doc\"`.\n// NodeSpec:: interface\n//\n// content:: ?string\n// The content expression for this node, as described in the [schema\n// guide](/docs/guide/#schema.content_expressions). When not given,\n// the node does not allow any content.\n//\n// marks:: ?string\n// The marks that are allowed inside of this node. May be a\n// space-separated string referring to mark names or groups, `\"_\"`\n// to explicitly allow all marks, or `\"\"` to disallow marks. When\n// not given, nodes with inline content default to allowing all\n// marks, other nodes default to not allowing marks.\n//\n// group:: ?string\n// The group or space-separated groups to which this node belongs,\n// which can be referred to in the content expressions for the\n// schema.\n//\n// inline:: ?bool\n// Should be set to true for inline nodes. (Implied for text nodes.)\n//\n// atom:: ?bool\n// Can be set to true to indicate that, though this isn't a [leaf\n// node](#model.NodeType.isLeaf), it doesn't have directly editable\n// content and should be treated as a single unit in the view.\n//\n// attrs:: ?Object\n// The attributes that nodes of this type get.\n//\n// selectable:: ?bool\n// Controls whether nodes of this type can be selected as a [node\n// selection](#state.NodeSelection). Defaults to true for non-text\n// nodes.\n//\n// draggable:: ?bool\n// Determines whether nodes of this type can be dragged without\n// being selected. Defaults to false.\n//\n// code:: ?bool\n// Can be used to indicate that this node contains code, which\n// causes some commands to behave differently.\n//\n// defining:: ?bool\n// Determines whether this node is considered an important parent\n// node during replace operations (such as paste). Non-defining (the\n// default) nodes get dropped when their entire content is replaced,\n// whereas defining nodes persist and wrap the inserted content.\n// Likewise, in _inserted_ content the defining parents of the\n// content are preserved when possible. Typically,\n// non-default-paragraph textblock types, and possibly list items,\n// are marked as defining.\n//\n// isolating:: ?bool\n// When enabled (default is false), the sides of nodes of this type\n// count as boundaries that regular editing operations, like\n// backspacing or lifting, won't cross. An example of a node that\n// should probably have this enabled is a table cell.\n//\n// toDOM:: ?(node: Node) → DOMOutputSpec\n// Defines the default way a node of this type should be serialized\n// to DOM/HTML (as used by\n// [`DOMSerializer.fromSchema`](#model.DOMSerializer^fromSchema)).\n// Should return a DOM node or an [array\n// structure](#model.DOMOutputSpec) that describes one, with an\n// optional number zero (“hole”) in it to indicate where the node's\n// content should be inserted.\n//\n// For text nodes, the default is to create a text DOM node. Though\n// it is possible to create a serializer where text is rendered\n// differently, this is not supported inside the editor, so you\n// shouldn't override that in your text node spec.\n//\n// parseDOM:: ?[ParseRule]\n// Associates DOM parser information with this node, which can be\n// used by [`DOMParser.fromSchema`](#model.DOMParser^fromSchema) to\n// automatically derive a parser. The `node` field in the rules is\n// implied (the name of this node will be filled in automatically).\n// If you supply your own parser, you do not need to also specify\n// parsing rules in your schema.\n//\n// toDebugString:: ?(node: Node) -> string\n// Defines the default way a node of this type should be serialized\n// to a string representation for debugging (e.g. in error messages).\n// MarkSpec:: interface\n//\n// attrs:: ?Object\n// The attributes that marks of this type get.\n//\n// inclusive:: ?bool\n// Whether this mark should be active when the cursor is positioned\n// at its end (or at its start when that is also the start of the\n// parent node). Defaults to true.\n//\n// excludes:: ?string\n// Determines which other marks this mark can coexist with. Should\n// be a space-separated strings naming other marks or groups of marks.\n// When a mark is [added](#model.Mark.addToSet) to a set, all marks\n// that it excludes are removed in the process. If the set contains\n// any mark that excludes the new mark but is not, itself, excluded\n// by the new mark, the mark can not be added an the set. You can\n// use the value `\"_\"` to indicate that the mark excludes all\n// marks in the schema.\n//\n// Defaults to only being exclusive with marks of the same type. You\n// can set it to an empty string (or any string not containing the\n// mark's own name) to allow multiple marks of a given type to\n// coexist (as long as they have different attributes).\n//\n// group:: ?string\n// The group or space-separated groups to which this mark belongs.\n//\n// spanning:: ?bool\n// Determines whether marks of this type can span multiple adjacent\n// nodes when serialized to DOM/HTML. Defaults to true.\n//\n// toDOM:: ?(mark: Mark, inline: bool) → DOMOutputSpec\n// Defines the default way marks of this type should be serialized\n// to DOM/HTML. When the resulting spec contains a hole, that is\n// where the marked content is placed. Otherwise, it is appended to\n// the top node.\n//\n// parseDOM:: ?[ParseRule]\n// Associates DOM parser information with this mark (see the\n// corresponding [node spec field](#model.NodeSpec.parseDOM)). The\n// `mark` field in the rules is implied.\n// AttributeSpec:: interface\n//\n// Used to [define](#model.NodeSpec.attrs) attributes on nodes or\n// marks.\n//\n// default:: ?any\n// The default value for this attribute, to use when no explicit\n// value is provided. Attributes that have no default must be\n// provided whenever a node or mark of a type that has them is\n// created.\n// ::- A document schema. Holds [node](#model.NodeType) and [mark\n// type](#model.MarkType) objects for the nodes and marks that may\n// occur in conforming documents, and provides functionality for\n// creating and deserializing such documents.\n\n\nvar Schema = function Schema(spec) {\n // :: SchemaSpec\n // The [spec](#model.SchemaSpec) on which the schema is based,\n // with the added guarantee that its `nodes` and `marks`\n // properties are\n // [`OrderedMap`](https://github.com/marijnh/orderedmap) instances\n // (not raw objects).\n this.spec = {};\n\n for (var prop in spec) {\n this.spec[prop] = spec[prop];\n }\n\n this.spec.nodes = orderedmap__WEBPACK_IMPORTED_MODULE_0__[\"default\"].from(spec.nodes);\n this.spec.marks = orderedmap__WEBPACK_IMPORTED_MODULE_0__[\"default\"].from(spec.marks); // :: Object\n // An object mapping the schema's node names to node type objects.\n\n this.nodes = NodeType.compile(this.spec.nodes, this); // :: Object\n // A map from mark names to mark type objects.\n\n this.marks = MarkType.compile(this.spec.marks, this);\n var contentExprCache = Object.create(null);\n\n for (var prop$1 in this.nodes) {\n if (prop$1 in this.marks) {\n throw new RangeError(prop$1 + \" can not be both a node and a mark\");\n }\n\n var type = this.nodes[prop$1],\n contentExpr = type.spec.content || \"\",\n markExpr = type.spec.marks;\n type.contentMatch = contentExprCache[contentExpr] || (contentExprCache[contentExpr] = ContentMatch.parse(contentExpr, this.nodes));\n type.inlineContent = type.contentMatch.inlineContent;\n type.markSet = markExpr == \"_\" ? null : markExpr ? gatherMarks(this, markExpr.split(\" \")) : markExpr == \"\" || !type.inlineContent ? [] : null;\n }\n\n for (var prop$2 in this.marks) {\n var type$1 = this.marks[prop$2],\n excl = type$1.spec.excludes;\n type$1.excluded = excl == null ? [type$1] : excl == \"\" ? [] : gatherMarks(this, excl.split(\" \"));\n }\n\n this.nodeFromJSON = this.nodeFromJSON.bind(this);\n this.markFromJSON = this.markFromJSON.bind(this); // :: NodeType\n // The type of the [default top node](#model.SchemaSpec.topNode)\n // for this schema.\n\n this.topNodeType = this.nodes[this.spec.topNode || \"doc\"]; // :: Object\n // An object for storing whatever values modules may want to\n // compute and cache per schema. (If you want to store something\n // in it, try to use property names unlikely to clash.)\n\n this.cached = Object.create(null);\n this.cached.wrappings = Object.create(null);\n}; // :: (union, ?Object, ?union, ?[Mark]) → Node\n// Create a node in this schema. The `type` may be a string or a\n// `NodeType` instance. Attributes will be extended\n// with defaults, `content` may be a `Fragment`,\n// `null`, a `Node`, or an array of nodes.\n\n\nSchema.prototype.node = function node(type, attrs, content, marks) {\n if (typeof type == \"string\") {\n type = this.nodeType(type);\n } else if (!(type instanceof NodeType)) {\n throw new RangeError(\"Invalid node type: \" + type);\n } else if (type.schema != this) {\n throw new RangeError(\"Node type from different schema used (\" + type.name + \")\");\n }\n\n return type.createChecked(attrs, content, marks);\n}; // :: (string, ?[Mark]) → Node\n// Create a text node in the schema. Empty text nodes are not\n// allowed.\n\n\nSchema.prototype.text = function text(text$1, marks) {\n var type = this.nodes.text;\n return new TextNode(type, type.defaultAttrs, text$1, Mark.setFrom(marks));\n}; // :: (union, ?Object) → Mark\n// Create a mark with the given type and attributes.\n\n\nSchema.prototype.mark = function mark(type, attrs) {\n if (typeof type == \"string\") {\n type = this.marks[type];\n }\n\n return type.create(attrs);\n}; // :: (Object) → Node\n// Deserialize a node from its JSON representation. This method is\n// bound.\n\n\nSchema.prototype.nodeFromJSON = function nodeFromJSON(json) {\n return Node.fromJSON(this, json);\n}; // :: (Object) → Mark\n// Deserialize a mark from its JSON representation. This method is\n// bound.\n\n\nSchema.prototype.markFromJSON = function markFromJSON(json) {\n return Mark.fromJSON(this, json);\n};\n\nSchema.prototype.nodeType = function nodeType(name) {\n var found = this.nodes[name];\n\n if (!found) {\n throw new RangeError(\"Unknown node type: \" + name);\n }\n\n return found;\n};\n\nfunction gatherMarks(schema, marks) {\n var found = [];\n\n for (var i = 0; i < marks.length; i++) {\n var name = marks[i],\n mark = schema.marks[name],\n ok = mark;\n\n if (mark) {\n found.push(mark);\n } else {\n for (var prop in schema.marks) {\n var mark$1 = schema.marks[prop];\n\n if (name == \"_\" || mark$1.spec.group && mark$1.spec.group.split(\" \").indexOf(name) > -1) {\n found.push(ok = mark$1);\n }\n }\n }\n\n if (!ok) {\n throw new SyntaxError(\"Unknown mark type: '\" + marks[i] + \"'\");\n }\n }\n\n return found;\n} // ParseOptions:: interface\n// These are the options recognized by the\n// [`parse`](#model.DOMParser.parse) and\n// [`parseSlice`](#model.DOMParser.parseSlice) methods.\n//\n// preserveWhitespace:: ?union\n// By default, whitespace is collapsed as per HTML's rules. Pass\n// `true` to preserve whitespace, but normalize newlines to\n// spaces, and `\"full\"` to preserve whitespace entirely.\n//\n// findPositions:: ?[{node: dom.Node, offset: number}]\n// When given, the parser will, beside parsing the content,\n// record the document positions of the given DOM positions. It\n// will do so by writing to the objects, adding a `pos` property\n// that holds the document position. DOM positions that are not\n// in the parsed content will not be written to.\n//\n// from:: ?number\n// The child node index to start parsing from.\n//\n// to:: ?number\n// The child node index to stop parsing at.\n//\n// topNode:: ?Node\n// By default, the content is parsed into the schema's default\n// [top node type](#model.Schema.topNodeType). You can pass this\n// option to use the type and attributes from a different node\n// as the top container.\n//\n// topMatch:: ?ContentMatch\n// Provide the starting content match that content parsed into the\n// top node is matched against.\n//\n// context:: ?ResolvedPos\n// A set of additional nodes to count as\n// [context](#model.ParseRule.context) when parsing, above the\n// given [top node](#model.ParseOptions.topNode).\n// ParseRule:: interface\n// A value that describes how to parse a given DOM node or inline\n// style as a ProseMirror node or mark.\n//\n// tag:: ?string\n// A CSS selector describing the kind of DOM elements to match. A\n// single rule should have _either_ a `tag` or a `style` property.\n//\n// namespace:: ?string\n// The namespace to match. This should be used with `tag`.\n// Nodes are only matched when the namespace matches or this property\n// is null.\n//\n// style:: ?string\n// A CSS property name to match. When given, this rule matches\n// inline styles that list that property. May also have the form\n// `\"property=value\"`, in which case the rule only matches if the\n// propery's value exactly matches the given value. (For more\n// complicated filters, use [`getAttrs`](#model.ParseRule.getAttrs)\n// and return false to indicate that the match failed.)\n//\n// priority:: ?number\n// Can be used to change the order in which the parse rules in a\n// schema are tried. Those with higher priority come first. Rules\n// without a priority are counted as having priority 50. This\n// property is only meaningful in a schema—when directly\n// constructing a parser, the order of the rule array is used.\n//\n// context:: ?string\n// When given, restricts this rule to only match when the current\n// context—the parent nodes into which the content is being\n// parsed—matches this expression. Should contain one or more node\n// names or node group names followed by single or double slashes.\n// For example `\"paragraph/\"` means the rule only matches when the\n// parent node is a paragraph, `\"blockquote/paragraph/\"` restricts\n// it to be in a paragraph that is inside a blockquote, and\n// `\"section//\"` matches any position inside a section—a double\n// slash matches any sequence of ancestor nodes. To allow multiple\n// different contexts, they can be separated by a pipe (`|`)\n// character, as in `\"blockquote/|list_item/\"`.\n//\n// node:: ?string\n// The name of the node type to create when this rule matches. Only\n// valid for rules with a `tag` property, not for style rules. Each\n// rule should have one of a `node`, `mark`, or `ignore` property\n// (except when it appears in a [node](#model.NodeSpec.parseDOM) or\n// [mark spec](#model.MarkSpec.parseDOM), in which case the `node`\n// or `mark` property will be derived from its position).\n//\n// mark:: ?string\n// The name of the mark type to wrap the matched content in.\n//\n// ignore:: ?bool\n// When true, ignore content that matches this rule.\n//\n// skip:: ?bool\n// When true, ignore the node that matches this rule, but do parse\n// its content.\n//\n// attrs:: ?Object\n// Attributes for the node or mark created by this rule. When\n// `getAttrs` is provided, it takes precedence.\n//\n// getAttrs:: ?(union) → ?union\n// A function used to compute the attributes for the node or mark\n// created by this rule. Can also be used to describe further\n// conditions the DOM element or style must match. When it returns\n// `false`, the rule won't match. When it returns null or undefined,\n// that is interpreted as an empty/default set of attributes.\n//\n// Called with a DOM Element for `tag` rules, and with a string (the\n// style's value) for `style` rules.\n//\n// contentElement:: ?union\n// For `tag` rules that produce non-leaf nodes or marks, by default\n// the content of the DOM element is parsed as content of the mark\n// or node. If the child nodes are in a descendent node, this may be\n// a CSS selector string that the parser must use to find the actual\n// content element, or a function that returns the actual content\n// element to the parser.\n//\n// getContent:: ?(dom.Node, schema: Schema) → Fragment\n// Can be used to override the content of a matched node. When\n// present, instead of parsing the node's child nodes, the result of\n// this function is used.\n//\n// preserveWhitespace:: ?union\n// Controls whether whitespace should be preserved when parsing the\n// content inside the matched element. `false` means whitespace may\n// be collapsed, `true` means that whitespace should be preserved\n// but newlines normalized to spaces, and `\"full\"` means that\n// newlines should also be preserved.\n// ::- A DOM parser represents a strategy for parsing DOM content into\n// a ProseMirror document conforming to a given schema. Its behavior\n// is defined by an array of [rules](#model.ParseRule).\n\n\nvar DOMParser = function DOMParser(schema, rules) {\n var this$1 = this; // :: Schema\n // The schema into which the parser parses.\n\n this.schema = schema; // :: [ParseRule]\n // The set of [parse rules](#model.ParseRule) that the parser\n // uses, in order of precedence.\n\n this.rules = rules;\n this.tags = [];\n this.styles = [];\n rules.forEach(function (rule) {\n if (rule.tag) {\n this$1.tags.push(rule);\n } else if (rule.style) {\n this$1.styles.push(rule);\n }\n });\n}; // :: (dom.Node, ?ParseOptions) → Node\n// Parse a document from the content of a DOM node.\n\n\nDOMParser.prototype.parse = function parse(dom, options) {\n if (options === void 0) options = {};\n var context = new ParseContext(this, options, false);\n context.addAll(dom, null, options.from, options.to);\n return context.finish();\n}; // :: (dom.Node, ?ParseOptions) → Slice\n// Parses the content of the given DOM node, like\n// [`parse`](#model.DOMParser.parse), and takes the same set of\n// options. But unlike that method, which produces a whole node,\n// this one returns a slice that is open at the sides, meaning that\n// the schema constraints aren't applied to the start of nodes to\n// the left of the input and the end of nodes at the end.\n\n\nDOMParser.prototype.parseSlice = function parseSlice(dom, options) {\n if (options === void 0) options = {};\n var context = new ParseContext(this, options, true);\n context.addAll(dom, null, options.from, options.to);\n return Slice.maxOpen(context.finish());\n};\n\nDOMParser.prototype.matchTag = function matchTag(dom, context) {\n for (var i = 0; i < this.tags.length; i++) {\n var rule = this.tags[i];\n\n if (matches(dom, rule.tag) && (rule.namespace === undefined || dom.namespaceURI == rule.namespace) && (!rule.context || context.matchesContext(rule.context))) {\n if (rule.getAttrs) {\n var result = rule.getAttrs(dom);\n\n if (result === false) {\n continue;\n }\n\n rule.attrs = result;\n }\n\n return rule;\n }\n }\n};\n\nDOMParser.prototype.matchStyle = function matchStyle(prop, value, context) {\n for (var i = 0; i < this.styles.length; i++) {\n var rule = this.styles[i];\n\n if (rule.style.indexOf(prop) != 0 || rule.context && !context.matchesContext(rule.context) || // Test that the style string either precisely matches the prop,\n // or has an '=' sign after the prop, followed by the given\n // value.\n rule.style.length > prop.length && (rule.style.charCodeAt(prop.length) != 61 || rule.style.slice(prop.length + 1) != value)) {\n continue;\n }\n\n if (rule.getAttrs) {\n var result = rule.getAttrs(value);\n\n if (result === false) {\n continue;\n }\n\n rule.attrs = result;\n }\n\n return rule;\n }\n}; // : (Schema) → [ParseRule]\n\n\nDOMParser.schemaRules = function schemaRules(schema) {\n var result = [];\n\n function insert(rule) {\n var priority = rule.priority == null ? 50 : rule.priority,\n i = 0;\n\n for (; i < result.length; i++) {\n var next = result[i],\n nextPriority = next.priority == null ? 50 : next.priority;\n\n if (nextPriority < priority) {\n break;\n }\n }\n\n result.splice(i, 0, rule);\n }\n\n var loop = function loop(name) {\n var rules = schema.marks[name].spec.parseDOM;\n\n if (rules) {\n rules.forEach(function (rule) {\n insert(rule = copy(rule));\n rule.mark = name;\n });\n }\n };\n\n for (var name in schema.marks) {\n loop(name);\n }\n\n var loop$1 = function loop$1(name) {\n var rules$1 = schema.nodes[name$1].spec.parseDOM;\n\n if (rules$1) {\n rules$1.forEach(function (rule) {\n insert(rule = copy(rule));\n rule.node = name$1;\n });\n }\n };\n\n for (var name$1 in schema.nodes) {\n loop$1();\n }\n\n return result;\n}; // :: (Schema) → DOMParser\n// Construct a DOM parser using the parsing rules listed in a\n// schema's [node specs](#model.NodeSpec.parseDOM), reordered by\n// [priority](#model.ParseRule.priority).\n\n\nDOMParser.fromSchema = function fromSchema(schema) {\n return schema.cached.domParser || (schema.cached.domParser = new DOMParser(schema, DOMParser.schemaRules(schema)));\n}; // : Object The block-level tags in HTML5\n\n\nvar blockTags = {\n address: true,\n article: true,\n aside: true,\n blockquote: true,\n canvas: true,\n dd: true,\n div: true,\n dl: true,\n fieldset: true,\n figcaption: true,\n figure: true,\n footer: true,\n form: true,\n h1: true,\n h2: true,\n h3: true,\n h4: true,\n h5: true,\n h6: true,\n header: true,\n hgroup: true,\n hr: true,\n li: true,\n noscript: true,\n ol: true,\n output: true,\n p: true,\n pre: true,\n section: true,\n table: true,\n tfoot: true,\n ul: true\n}; // : Object The tags that we normally ignore.\n\nvar ignoreTags = {\n head: true,\n noscript: true,\n object: true,\n script: true,\n style: true,\n title: true\n}; // : Object List tags.\n\nvar listTags = {\n ol: true,\n ul: true\n}; // Using a bitfield for node context options\n\nvar OPT_PRESERVE_WS = 1,\n OPT_PRESERVE_WS_FULL = 2,\n OPT_OPEN_LEFT = 4;\n\nfunction wsOptionsFor(preserveWhitespace) {\n return (preserveWhitespace ? OPT_PRESERVE_WS : 0) | (preserveWhitespace === \"full\" ? OPT_PRESERVE_WS_FULL : 0);\n}\n\nvar NodeContext = function NodeContext(type, attrs, marks, pendingMarks, solid, match, options) {\n this.type = type;\n this.attrs = attrs;\n this.solid = solid;\n this.match = match || (options & OPT_OPEN_LEFT ? null : type.contentMatch);\n this.options = options;\n this.content = []; // Marks applied to this node itself\n\n this.marks = marks; // Marks applied to its children\n\n this.activeMarks = Mark.none; // Marks that can't apply here, but will be used in children if possible\n\n this.pendingMarks = pendingMarks;\n};\n\nNodeContext.prototype.findWrapping = function findWrapping(node) {\n if (!this.match) {\n if (!this.type) {\n return [];\n }\n\n var fill = this.type.contentMatch.fillBefore(Fragment.from(node));\n\n if (fill) {\n this.match = this.type.contentMatch.matchFragment(fill);\n } else {\n var start = this.type.contentMatch,\n wrap;\n\n if (wrap = start.findWrapping(node.type)) {\n this.match = start;\n return wrap;\n } else {\n return null;\n }\n }\n }\n\n return this.match.findWrapping(node.type);\n};\n\nNodeContext.prototype.finish = function finish(openEnd) {\n if (!(this.options & OPT_PRESERVE_WS)) {\n // Strip trailing whitespace\n var last = this.content[this.content.length - 1],\n m;\n\n if (last && last.isText && (m = /[ \\t\\r\\n\\u000c]+$/.exec(last.text))) {\n if (last.text.length == m[0].length) {\n this.content.pop();\n } else {\n this.content[this.content.length - 1] = last.withText(last.text.slice(0, last.text.length - m[0].length));\n }\n }\n }\n\n var content = Fragment.from(this.content);\n\n if (!openEnd && this.match) {\n content = content.append(this.match.fillBefore(Fragment.empty, true));\n }\n\n return this.type ? this.type.create(this.attrs, content, this.marks) : content;\n};\n\nNodeContext.prototype.applyPending = function applyPending(nextType) {\n for (var i = 0, pending = this.pendingMarks; i < pending.length; i++) {\n var mark = pending[i];\n\n if ((this.type ? this.type.allowsMarkType(mark.type) : markMayApply(mark.type, nextType)) && !mark.isInSet(this.activeMarks)) {\n this.activeMarks = mark.addToSet(this.activeMarks);\n this.pendingMarks = mark.removeFromSet(this.pendingMarks);\n }\n }\n};\n\nvar ParseContext = function ParseContext(parser, options, open) {\n // : DOMParser The parser we are using.\n this.parser = parser; // : Object The options passed to this parse.\n\n this.options = options;\n this.isOpen = open;\n var topNode = options.topNode,\n topContext;\n var topOptions = wsOptionsFor(options.preserveWhitespace) | (open ? OPT_OPEN_LEFT : 0);\n\n if (topNode) {\n topContext = new NodeContext(topNode.type, topNode.attrs, Mark.none, Mark.none, true, options.topMatch || topNode.type.contentMatch, topOptions);\n } else if (open) {\n topContext = new NodeContext(null, null, Mark.none, Mark.none, true, null, topOptions);\n } else {\n topContext = new NodeContext(parser.schema.topNodeType, null, Mark.none, Mark.none, true, null, topOptions);\n }\n\n this.nodes = [topContext]; // : [Mark] The current set of marks\n\n this.open = 0;\n this.find = options.findPositions;\n this.needsBlock = false;\n};\n\nvar prototypeAccessors$6 = {\n top: {\n configurable: true\n },\n currentPos: {\n configurable: true\n }\n};\n\nprototypeAccessors$6.top.get = function () {\n return this.nodes[this.open];\n}; // : (dom.Node)\n// Add a DOM node to the content. Text is inserted as text node,\n// otherwise, the node is passed to `addElement` or, if it has a\n// `style` attribute, `addElementWithStyles`.\n\n\nParseContext.prototype.addDOM = function addDOM(dom) {\n if (dom.nodeType == 3) {\n this.addTextNode(dom);\n } else if (dom.nodeType == 1) {\n var style = dom.getAttribute(\"style\");\n var marks = style ? this.readStyles(parseStyles(style)) : null,\n top = this.top;\n\n if (marks != null) {\n for (var i = 0; i < marks.length; i++) {\n this.addPendingMark(marks[i]);\n }\n }\n\n this.addElement(dom);\n\n if (marks != null) {\n for (var i$1 = 0; i$1 < marks.length; i$1++) {\n this.removePendingMark(marks[i$1], top);\n }\n }\n }\n};\n\nParseContext.prototype.addTextNode = function addTextNode(dom) {\n var value = dom.nodeValue;\n var top = this.top;\n\n if ((top.type ? top.type.inlineContent : top.content.length && top.content[0].isInline) || /[^ \\t\\r\\n\\u000c]/.test(value)) {\n if (!(top.options & OPT_PRESERVE_WS)) {\n value = value.replace(/[ \\t\\r\\n\\u000c]+/g, \" \"); // If this starts with whitespace, and there is no node before it, or\n // a hard break, or a text node that ends with whitespace, strip the\n // leading space.\n\n if (/^[ \\t\\r\\n\\u000c]/.test(value) && this.open == this.nodes.length - 1) {\n var nodeBefore = top.content[top.content.length - 1];\n var domNodeBefore = dom.previousSibling;\n\n if (!nodeBefore || domNodeBefore && domNodeBefore.nodeName == 'BR' || nodeBefore.isText && /[ \\t\\r\\n\\u000c]$/.test(nodeBefore.text)) {\n value = value.slice(1);\n }\n }\n } else if (!(top.options & OPT_PRESERVE_WS_FULL)) {\n value = value.replace(/\\r?\\n|\\r/g, \" \");\n }\n\n if (value) {\n this.insertNode(this.parser.schema.text(value));\n }\n\n this.findInText(dom);\n } else {\n this.findInside(dom);\n }\n}; // : (dom.Element)\n// Try to find a handler for the given tag and use that to parse. If\n// none is found, the element's content nodes are added directly.\n\n\nParseContext.prototype.addElement = function addElement(dom) {\n var name = dom.nodeName.toLowerCase();\n\n if (listTags.hasOwnProperty(name)) {\n normalizeList(dom);\n }\n\n var rule = this.options.ruleFromNode && this.options.ruleFromNode(dom) || this.parser.matchTag(dom, this);\n\n if (rule ? rule.ignore : ignoreTags.hasOwnProperty(name)) {\n this.findInside(dom);\n } else if (!rule || rule.skip) {\n if (rule && rule.skip.nodeType) {\n dom = rule.skip;\n }\n\n var sync,\n top = this.top,\n oldNeedsBlock = this.needsBlock;\n\n if (blockTags.hasOwnProperty(name)) {\n sync = true;\n\n if (!top.type) {\n this.needsBlock = true;\n }\n } else if (!dom.firstChild) {\n this.leafFallback(dom);\n return;\n }\n\n this.addAll(dom);\n\n if (sync) {\n this.sync(top);\n }\n\n this.needsBlock = oldNeedsBlock;\n } else {\n this.addElementByRule(dom, rule);\n }\n}; // Called for leaf DOM nodes that would otherwise be ignored\n\n\nParseContext.prototype.leafFallback = function leafFallback(dom) {\n if (dom.nodeName == \"BR\" && this.top.type && this.top.type.inlineContent) {\n this.addTextNode(dom.ownerDocument.createTextNode(\"\\n\"));\n }\n}; // Run any style parser associated with the node's styles. Either\n// return an array of marks, or null to indicate some of the styles\n// had a rule with `ignore` set.\n\n\nParseContext.prototype.readStyles = function readStyles(styles) {\n var marks = Mark.none;\n\n for (var i = 0; i < styles.length; i += 2) {\n var rule = this.parser.matchStyle(styles[i], styles[i + 1], this);\n\n if (!rule) {\n continue;\n }\n\n if (rule.ignore) {\n return null;\n }\n\n marks = this.parser.schema.marks[rule.mark].create(rule.attrs).addToSet(marks);\n }\n\n return marks;\n}; // : (dom.Element, ParseRule) → bool\n// Look up a handler for the given node. If none are found, return\n// false. Otherwise, apply it, use its return value to drive the way\n// the node's content is wrapped, and return true.\n\n\nParseContext.prototype.addElementByRule = function addElementByRule(dom, rule) {\n var this$1 = this;\n var sync, nodeType, markType, mark;\n\n if (rule.node) {\n nodeType = this.parser.schema.nodes[rule.node];\n\n if (!nodeType.isLeaf) {\n sync = this.enter(nodeType, rule.attrs, rule.preserveWhitespace);\n } else if (!this.insertNode(nodeType.create(rule.attrs))) {\n this.leafFallback(dom);\n }\n } else {\n markType = this.parser.schema.marks[rule.mark];\n mark = markType.create(rule.attrs);\n this.addPendingMark(mark);\n }\n\n var startIn = this.top;\n\n if (nodeType && nodeType.isLeaf) {\n this.findInside(dom);\n } else if (rule.getContent) {\n this.findInside(dom);\n rule.getContent(dom, this.parser.schema).forEach(function (node) {\n return this$1.insertNode(node);\n });\n } else {\n var contentDOM = rule.contentElement;\n\n if (typeof contentDOM == \"string\") {\n contentDOM = dom.querySelector(contentDOM);\n } else if (typeof contentDOM == \"function\") {\n contentDOM = contentDOM(dom);\n }\n\n if (!contentDOM) {\n contentDOM = dom;\n }\n\n this.findAround(dom, contentDOM, true);\n this.addAll(contentDOM, sync);\n }\n\n if (sync) {\n this.sync(startIn);\n this.open--;\n }\n\n if (mark) {\n this.removePendingMark(mark, startIn);\n }\n}; // : (dom.Node, ?NodeBuilder, ?number, ?number)\n// Add all child nodes between `startIndex` and `endIndex` (or the\n// whole node, if not given). If `sync` is passed, use it to\n// synchronize after every block element.\n\n\nParseContext.prototype.addAll = function addAll(parent, sync, startIndex, endIndex) {\n var index = startIndex || 0;\n\n for (var dom = startIndex ? parent.childNodes[startIndex] : parent.firstChild, end = endIndex == null ? null : parent.childNodes[endIndex]; dom != end; dom = dom.nextSibling, ++index) {\n this.findAtPoint(parent, index);\n this.addDOM(dom);\n\n if (sync && blockTags.hasOwnProperty(dom.nodeName.toLowerCase())) {\n this.sync(sync);\n }\n }\n\n this.findAtPoint(parent, index);\n}; // Try to find a way to fit the given node type into the current\n// context. May add intermediate wrappers and/or leave non-solid\n// nodes that we're in.\n\n\nParseContext.prototype.findPlace = function findPlace(node) {\n var route, sync;\n\n for (var depth = this.open; depth >= 0; depth--) {\n var cx = this.nodes[depth];\n var found = cx.findWrapping(node);\n\n if (found && (!route || route.length > found.length)) {\n route = found;\n sync = cx;\n\n if (!found.length) {\n break;\n }\n }\n\n if (cx.solid) {\n break;\n }\n }\n\n if (!route) {\n return false;\n }\n\n this.sync(sync);\n\n for (var i = 0; i < route.length; i++) {\n this.enterInner(route[i], null, false);\n }\n\n return true;\n}; // : (Node) → ?Node\n// Try to insert the given node, adjusting the context when needed.\n\n\nParseContext.prototype.insertNode = function insertNode(node) {\n if (node.isInline && this.needsBlock && !this.top.type) {\n var block = this.textblockFromContext();\n\n if (block) {\n this.enterInner(block);\n }\n }\n\n if (this.findPlace(node)) {\n this.closeExtra();\n var top = this.top;\n top.applyPending(node.type);\n\n if (top.match) {\n top.match = top.match.matchType(node.type);\n }\n\n var marks = top.activeMarks;\n\n for (var i = 0; i < node.marks.length; i++) {\n if (!top.type || top.type.allowsMarkType(node.marks[i].type)) {\n marks = node.marks[i].addToSet(marks);\n }\n }\n\n top.content.push(node.mark(marks));\n return true;\n }\n\n return false;\n}; // : (NodeType, ?Object) → bool\n// Try to start a node of the given type, adjusting the context when\n// necessary.\n\n\nParseContext.prototype.enter = function enter(type, attrs, preserveWS) {\n var ok = this.findPlace(type.create(attrs));\n\n if (ok) {\n this.enterInner(type, attrs, true, preserveWS);\n }\n\n return ok;\n}; // Open a node of the given type\n\n\nParseContext.prototype.enterInner = function enterInner(type, attrs, solid, preserveWS) {\n this.closeExtra();\n var top = this.top;\n top.applyPending(type);\n top.match = top.match && top.match.matchType(type, attrs);\n var options = preserveWS == null ? top.options & ~OPT_OPEN_LEFT : wsOptionsFor(preserveWS);\n\n if (top.options & OPT_OPEN_LEFT && top.content.length == 0) {\n options |= OPT_OPEN_LEFT;\n }\n\n this.nodes.push(new NodeContext(type, attrs, top.activeMarks, top.pendingMarks, solid, null, options));\n this.open++;\n}; // Make sure all nodes above this.open are finished and added to\n// their parents\n\n\nParseContext.prototype.closeExtra = function closeExtra(openEnd) {\n var i = this.nodes.length - 1;\n\n if (i > this.open) {\n for (; i > this.open; i--) {\n this.nodes[i - 1].content.push(this.nodes[i].finish(openEnd));\n }\n\n this.nodes.length = this.open + 1;\n }\n};\n\nParseContext.prototype.finish = function finish() {\n this.open = 0;\n this.closeExtra(this.isOpen);\n return this.nodes[0].finish(this.isOpen || this.options.topOpen);\n};\n\nParseContext.prototype.sync = function sync(to) {\n for (var i = this.open; i >= 0; i--) {\n if (this.nodes[i] == to) {\n this.open = i;\n return;\n }\n }\n};\n\nprototypeAccessors$6.currentPos.get = function () {\n this.closeExtra();\n var pos = 0;\n\n for (var i = this.open; i >= 0; i--) {\n var content = this.nodes[i].content;\n\n for (var j = content.length - 1; j >= 0; j--) {\n pos += content[j].nodeSize;\n }\n\n if (i) {\n pos++;\n }\n }\n\n return pos;\n};\n\nParseContext.prototype.findAtPoint = function findAtPoint(parent, offset) {\n if (this.find) {\n for (var i = 0; i < this.find.length; i++) {\n if (this.find[i].node == parent && this.find[i].offset == offset) {\n this.find[i].pos = this.currentPos;\n }\n }\n }\n};\n\nParseContext.prototype.findInside = function findInside(parent) {\n if (this.find) {\n for (var i = 0; i < this.find.length; i++) {\n if (this.find[i].pos == null && parent.nodeType == 1 && parent.contains(this.find[i].node)) {\n this.find[i].pos = this.currentPos;\n }\n }\n }\n};\n\nParseContext.prototype.findAround = function findAround(parent, content, before) {\n if (parent != content && this.find) {\n for (var i = 0; i < this.find.length; i++) {\n if (this.find[i].pos == null && parent.nodeType == 1 && parent.contains(this.find[i].node)) {\n var pos = content.compareDocumentPosition(this.find[i].node);\n\n if (pos & (before ? 2 : 4)) {\n this.find[i].pos = this.currentPos;\n }\n }\n }\n }\n};\n\nParseContext.prototype.findInText = function findInText(textNode) {\n if (this.find) {\n for (var i = 0; i < this.find.length; i++) {\n if (this.find[i].node == textNode) {\n this.find[i].pos = this.currentPos - (textNode.nodeValue.length - this.find[i].offset);\n }\n }\n }\n}; // : (string) → bool\n// Determines whether the given [context\n// string](#ParseRule.context) matches this context.\n\n\nParseContext.prototype.matchesContext = function matchesContext(context) {\n var this$1 = this;\n\n if (context.indexOf(\"|\") > -1) {\n return context.split(/\\s*\\|\\s*/).some(this.matchesContext, this);\n }\n\n var parts = context.split(\"/\");\n var option = this.options.context;\n var useRoot = !this.isOpen && (!option || option.parent.type == this.nodes[0].type);\n var minDepth = -(option ? option.depth + 1 : 0) + (useRoot ? 0 : 1);\n\n var match = function match(i, depth) {\n for (; i >= 0; i--) {\n var part = parts[i];\n\n if (part == \"\") {\n if (i == parts.length - 1 || i == 0) {\n continue;\n }\n\n for (; depth >= minDepth; depth--) {\n if (match(i - 1, depth)) {\n return true;\n }\n }\n\n return false;\n } else {\n var next = depth > 0 || depth == 0 && useRoot ? this$1.nodes[depth].type : option && depth >= minDepth ? option.node(depth - minDepth).type : null;\n\n if (!next || next.name != part && next.groups.indexOf(part) == -1) {\n return false;\n }\n\n depth--;\n }\n }\n\n return true;\n };\n\n return match(parts.length - 1, this.open);\n};\n\nParseContext.prototype.textblockFromContext = function textblockFromContext() {\n var $context = this.options.context;\n\n if ($context) {\n for (var d = $context.depth; d >= 0; d--) {\n var deflt = $context.node(d).contentMatchAt($context.indexAfter(d)).defaultType;\n\n if (deflt && deflt.isTextblock && deflt.defaultAttrs) {\n return deflt;\n }\n }\n }\n\n for (var name in this.parser.schema.nodes) {\n var type = this.parser.schema.nodes[name];\n\n if (type.isTextblock && type.defaultAttrs) {\n return type;\n }\n }\n};\n\nParseContext.prototype.addPendingMark = function addPendingMark(mark) {\n this.top.pendingMarks = mark.addToSet(this.top.pendingMarks);\n};\n\nParseContext.prototype.removePendingMark = function removePendingMark(mark, upto) {\n for (var depth = this.open; depth >= 0; depth--) {\n var level = this.nodes[depth];\n var found = level.pendingMarks.lastIndexOf(mark);\n\n if (found > -1) {\n level.pendingMarks = mark.removeFromSet(level.pendingMarks);\n } else {\n level.activeMarks = mark.removeFromSet(level.activeMarks);\n }\n\n if (level == upto) {\n break;\n }\n }\n};\n\nObject.defineProperties(ParseContext.prototype, prototypeAccessors$6); // Kludge to work around directly nested list nodes produced by some\n// tools and allowed by browsers to mean that the nested list is\n// actually part of the list item above it.\n\nfunction normalizeList(dom) {\n for (var child = dom.firstChild, prevItem = null; child; child = child.nextSibling) {\n var name = child.nodeType == 1 ? child.nodeName.toLowerCase() : null;\n\n if (name && listTags.hasOwnProperty(name) && prevItem) {\n prevItem.appendChild(child);\n child = prevItem;\n } else if (name == \"li\") {\n prevItem = child;\n } else if (name) {\n prevItem = null;\n }\n }\n} // Apply a CSS selector.\n\n\nfunction matches(dom, selector) {\n return (dom.matches || dom.msMatchesSelector || dom.webkitMatchesSelector || dom.mozMatchesSelector).call(dom, selector);\n} // : (string) → [string]\n// Tokenize a style attribute into property/value pairs.\n\n\nfunction parseStyles(style) {\n var re = /\\s*([\\w-]+)\\s*:\\s*([^;]+)/g,\n m,\n result = [];\n\n while (m = re.exec(style)) {\n result.push(m[1], m[2].trim());\n }\n\n return result;\n}\n\nfunction copy(obj) {\n var copy = {};\n\n for (var prop in obj) {\n copy[prop] = obj[prop];\n }\n\n return copy;\n} // Used when finding a mark at the top level of a fragment parse.\n// Checks whether it would be reasonable to apply a given mark type to\n// a given node, by looking at the way the mark occurs in the schema.\n\n\nfunction markMayApply(markType, nodeType) {\n var nodes = nodeType.schema.nodes;\n\n var loop = function loop(name) {\n var parent = nodes[name];\n\n if (!parent.allowsMarkType(markType)) {\n return;\n }\n\n var seen = [],\n scan = function scan(match) {\n seen.push(match);\n\n for (var i = 0; i < match.edgeCount; i++) {\n var ref = match.edge(i);\n var type = ref.type;\n var next = ref.next;\n\n if (type == nodeType) {\n return true;\n }\n\n if (seen.indexOf(next) < 0 && scan(next)) {\n return true;\n }\n }\n };\n\n if (scan(parent.contentMatch)) {\n return {\n v: true\n };\n }\n };\n\n for (var name in nodes) {\n var returned = loop(name);\n if (returned) return returned.v;\n }\n} // DOMOutputSpec:: interface\n// A description of a DOM structure. Can be either a string, which is\n// interpreted as a text node, a DOM node, which is interpreted as\n// itself, or an array.\n//\n// An array describes a DOM element. The first value in the array\n// should be a string—the name of the DOM element, optionally prefixed\n// by a namespace URL and a space. If the second element is plain\n// object, it is interpreted as a set of attributes for the element.\n// Any elements after that (including the 2nd if it's not an attribute\n// object) are interpreted as children of the DOM elements, and must\n// either be valid `DOMOutputSpec` values, or the number zero.\n//\n// The number zero (pronounced “hole”) is used to indicate the place\n// where a node's child nodes should be inserted. If it occurs in an\n// output spec, it should be the only child element in its parent\n// node.\n// ::- A DOM serializer knows how to convert ProseMirror nodes and\n// marks of various types to DOM nodes.\n\n\nvar DOMSerializer = function DOMSerializer(nodes, marks) {\n // :: Object<(node: Node) → DOMOutputSpec>\n // The node serialization functions.\n this.nodes = nodes || {}; // :: Object\n // The mark serialization functions.\n\n this.marks = marks || {};\n}; // :: (Fragment, ?Object) → dom.DocumentFragment\n// Serialize the content of this fragment to a DOM fragment. When\n// not in the browser, the `document` option, containing a DOM\n// document, should be passed so that the serializer can create\n// nodes.\n\n\nDOMSerializer.prototype.serializeFragment = function serializeFragment(fragment, options, target) {\n var this$1 = this;\n if (options === void 0) options = {};\n\n if (!target) {\n target = doc(options).createDocumentFragment();\n }\n\n var top = target,\n active = null;\n fragment.forEach(function (node) {\n if (active || node.marks.length) {\n if (!active) {\n active = [];\n }\n\n var keep = 0,\n rendered = 0;\n\n while (keep < active.length && rendered < node.marks.length) {\n var next = node.marks[rendered];\n\n if (!this$1.marks[next.type.name]) {\n rendered++;\n continue;\n }\n\n if (!next.eq(active[keep]) || next.type.spec.spanning === false) {\n break;\n }\n\n keep += 2;\n rendered++;\n }\n\n while (keep < active.length) {\n top = active.pop();\n active.pop();\n }\n\n while (rendered < node.marks.length) {\n var add = node.marks[rendered++];\n var markDOM = this$1.serializeMark(add, node.isInline, options);\n\n if (markDOM) {\n active.push(add, top);\n top.appendChild(markDOM.dom);\n top = markDOM.contentDOM || markDOM.dom;\n }\n }\n }\n\n top.appendChild(this$1.serializeNode(node, options));\n });\n return target;\n}; // :: (Node, ?Object) → dom.Node\n// Serialize this node to a DOM node. This can be useful when you\n// need to serialize a part of a document, as opposed to the whole\n// document. To serialize a whole document, use\n// [`serializeFragment`](#model.DOMSerializer.serializeFragment) on\n// its [content](#model.Node.content).\n\n\nDOMSerializer.prototype.serializeNode = function serializeNode(node, options) {\n if (options === void 0) options = {};\n var ref = DOMSerializer.renderSpec(doc(options), this.nodes[node.type.name](node));\n var dom = ref.dom;\n var contentDOM = ref.contentDOM;\n\n if (contentDOM) {\n if (node.isLeaf) {\n throw new RangeError(\"Content hole not allowed in a leaf node spec\");\n }\n\n if (options.onContent) {\n options.onContent(node, contentDOM, options);\n } else {\n this.serializeFragment(node.content, options, contentDOM);\n }\n }\n\n return dom;\n};\n\nDOMSerializer.prototype.serializeNodeAndMarks = function serializeNodeAndMarks(node, options) {\n if (options === void 0) options = {};\n var dom = this.serializeNode(node, options);\n\n for (var i = node.marks.length - 1; i >= 0; i--) {\n var wrap = this.serializeMark(node.marks[i], node.isInline, options);\n\n if (wrap) {\n (wrap.contentDOM || wrap.dom).appendChild(dom);\n dom = wrap.dom;\n }\n }\n\n return dom;\n};\n\nDOMSerializer.prototype.serializeMark = function serializeMark(mark, inline, options) {\n if (options === void 0) options = {};\n var toDOM = this.marks[mark.type.name];\n return toDOM && DOMSerializer.renderSpec(doc(options), toDOM(mark, inline));\n}; // :: (dom.Document, DOMOutputSpec) → {dom: dom.Node, contentDOM: ?dom.Node}\n// Render an [output spec](#model.DOMOutputSpec) to a DOM node. If\n// the spec has a hole (zero) in it, `contentDOM` will point at the\n// node with the hole.\n\n\nDOMSerializer.renderSpec = function renderSpec(doc, structure, xmlNS) {\n if (xmlNS === void 0) xmlNS = null;\n\n if (typeof structure == \"string\") {\n return {\n dom: doc.createTextNode(structure)\n };\n }\n\n if (structure.nodeType != null) {\n return {\n dom: structure\n };\n }\n\n var tagName = structure[0],\n space = tagName.indexOf(\" \");\n\n if (space > 0) {\n xmlNS = tagName.slice(0, space);\n tagName = tagName.slice(space + 1);\n }\n\n var contentDOM = null,\n dom = xmlNS ? doc.createElementNS(xmlNS, tagName) : doc.createElement(tagName);\n var attrs = structure[1],\n start = 1;\n\n if (attrs && _typeof(attrs) == \"object\" && attrs.nodeType == null && !Array.isArray(attrs)) {\n start = 2;\n\n for (var name in attrs) {\n if (attrs[name] != null) {\n var space$1 = name.indexOf(\" \");\n\n if (space$1 > 0) {\n dom.setAttributeNS(name.slice(0, space$1), name.slice(space$1 + 1), attrs[name]);\n } else {\n dom.setAttribute(name, attrs[name]);\n }\n }\n }\n }\n\n for (var i = start; i < structure.length; i++) {\n var child = structure[i];\n\n if (child === 0) {\n if (i < structure.length - 1 || i > start) {\n throw new RangeError(\"Content hole must be the only child of its parent node\");\n }\n\n return {\n dom: dom,\n contentDOM: dom\n };\n } else {\n var ref = DOMSerializer.renderSpec(doc, child, xmlNS);\n var inner = ref.dom;\n var innerContent = ref.contentDOM;\n dom.appendChild(inner);\n\n if (innerContent) {\n if (contentDOM) {\n throw new RangeError(\"Multiple content holes\");\n }\n\n contentDOM = innerContent;\n }\n }\n }\n\n return {\n dom: dom,\n contentDOM: contentDOM\n };\n}; // :: (Schema) → DOMSerializer\n// Build a serializer using the [`toDOM`](#model.NodeSpec.toDOM)\n// properties in a schema's node and mark specs.\n\n\nDOMSerializer.fromSchema = function fromSchema(schema) {\n return schema.cached.domSerializer || (schema.cached.domSerializer = new DOMSerializer(this.nodesFromSchema(schema), this.marksFromSchema(schema)));\n}; // : (Schema) → Object<(node: Node) → DOMOutputSpec>\n// Gather the serializers in a schema's node specs into an object.\n// This can be useful as a base to build a custom serializer from.\n\n\nDOMSerializer.nodesFromSchema = function nodesFromSchema(schema) {\n var result = gatherToDOM(schema.nodes);\n\n if (!result.text) {\n result.text = function (node) {\n return node.text;\n };\n }\n\n return result;\n}; // : (Schema) → Object<(mark: Mark) → DOMOutputSpec>\n// Gather the serializers in a schema's mark specs into an object.\n\n\nDOMSerializer.marksFromSchema = function marksFromSchema(schema) {\n return gatherToDOM(schema.marks);\n};\n\nfunction gatherToDOM(obj) {\n var result = {};\n\n for (var name in obj) {\n var toDOM = obj[name].spec.toDOM;\n\n if (toDOM) {\n result[name] = toDOM;\n }\n }\n\n return result;\n}\n\nfunction doc(options) {\n // declare global: window\n return options.document || window.document;\n}\n\n\n\n//# sourceURL=webpack:///./node_modules/prosemirror-model/dist/index.es.js?"); - -/***/ }), - -/***/ "./node_modules/prosemirror-schema-list/dist/index.es.js": -/*!***************************************************************!*\ - !*** ./node_modules/prosemirror-schema-list/dist/index.es.js ***! - \***************************************************************/ -/*! exports provided: addListNodes, bulletList, liftListItem, listItem, orderedList, sinkListItem, splitListItem, wrapInList */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addListNodes\", function() { return addListNodes; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bulletList\", function() { return bulletList; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"liftListItem\", function() { return liftListItem; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"listItem\", function() { return listItem; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"orderedList\", function() { return orderedList; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sinkListItem\", function() { return sinkListItem; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"splitListItem\", function() { return splitListItem; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"wrapInList\", function() { return wrapInList; });\n/* harmony import */ var prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prosemirror-transform */ \"./node_modules/prosemirror-transform/dist/index.es.js\");\n/* harmony import */ var prosemirror_model__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prosemirror-model */ \"./node_modules/prosemirror-model/dist/index.es.js\");\n\n\nvar olDOM = [\"ol\", 0],\n ulDOM = [\"ul\", 0],\n liDOM = [\"li\", 0]; // :: NodeSpec\n// An ordered list [node spec](#model.NodeSpec). Has a single\n// attribute, `order`, which determines the number at which the list\n// starts counting, and defaults to 1. Represented as an `
    `\n// element.\n\nvar orderedList = {\n attrs: {\n order: {\n \"default\": 1\n }\n },\n parseDOM: [{\n tag: \"ol\",\n getAttrs: function getAttrs(dom) {\n return {\n order: dom.hasAttribute(\"start\") ? +dom.getAttribute(\"start\") : 1\n };\n }\n }],\n toDOM: function toDOM(node) {\n return node.attrs.order == 1 ? olDOM : [\"ol\", {\n start: node.attrs.order\n }, 0];\n }\n}; // :: NodeSpec\n// A bullet list node spec, represented in the DOM as `
      `.\n\nvar bulletList = {\n parseDOM: [{\n tag: \"ul\"\n }],\n toDOM: function toDOM() {\n return ulDOM;\n }\n}; // :: NodeSpec\n// A list item (`
    • `) spec.\n\nvar listItem = {\n parseDOM: [{\n tag: \"li\"\n }],\n toDOM: function toDOM() {\n return liDOM;\n },\n defining: true\n};\n\nfunction add(obj, props) {\n var copy = {};\n\n for (var prop in obj) {\n copy[prop] = obj[prop];\n }\n\n for (var prop$1 in props) {\n copy[prop$1] = props[prop$1];\n }\n\n return copy;\n} // :: (OrderedMap, string, ?string) → OrderedMap\n// Convenience function for adding list-related node types to a map\n// specifying the nodes for a schema. Adds\n// [`orderedList`](#schema-list.orderedList) as `\"ordered_list\"`,\n// [`bulletList`](#schema-list.bulletList) as `\"bullet_list\"`, and\n// [`listItem`](#schema-list.listItem) as `\"list_item\"`.\n//\n// `itemContent` determines the content expression for the list items.\n// If you want the commands defined in this module to apply to your\n// list structure, it should have a shape like `\"paragraph block*\"` or\n// `\"paragraph (ordered_list | bullet_list)*\"`. `listGroup` can be\n// given to assign a group name to the list node types, for example\n// `\"block\"`.\n\n\nfunction addListNodes(nodes, itemContent, listGroup) {\n return nodes.append({\n ordered_list: add(orderedList, {\n content: \"list_item+\",\n group: listGroup\n }),\n bullet_list: add(bulletList, {\n content: \"list_item+\",\n group: listGroup\n }),\n list_item: add(listItem, {\n content: itemContent\n })\n });\n} // :: (NodeType, ?Object) → (state: EditorState, dispatch: ?(tr: Transaction)) → bool\n// Returns a command function that wraps the selection in a list with\n// the given type an attributes. If `dispatch` is null, only return a\n// value to indicate whether this is possible, but don't actually\n// perform the change.\n\n\nfunction wrapInList(listType, attrs) {\n return function (state, dispatch) {\n var ref = state.selection;\n var $from = ref.$from;\n var $to = ref.$to;\n var range = $from.blockRange($to),\n doJoin = false,\n outerRange = range;\n\n if (!range) {\n return false;\n } // This is at the top of an existing list item\n\n\n if (range.depth >= 2 && $from.node(range.depth - 1).type.compatibleContent(listType) && range.startIndex == 0) {\n // Don't do anything if this is the top of the list\n if ($from.index(range.depth - 1) == 0) {\n return false;\n }\n\n var $insert = state.doc.resolve(range.start - 2);\n outerRange = new prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"NodeRange\"]($insert, $insert, range.depth);\n\n if (range.endIndex < range.parent.childCount) {\n range = new prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"NodeRange\"]($from, state.doc.resolve($to.end(range.depth)), range.depth);\n }\n\n doJoin = true;\n }\n\n var wrap = Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"findWrapping\"])(outerRange, listType, attrs, range);\n\n if (!wrap) {\n return false;\n }\n\n if (dispatch) {\n dispatch(doWrapInList(state.tr, range, wrap, doJoin, listType).scrollIntoView());\n }\n\n return true;\n };\n}\n\nfunction doWrapInList(tr, range, wrappers, joinBefore, listType) {\n var content = prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].empty;\n\n for (var i = wrappers.length - 1; i >= 0; i--) {\n content = prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(wrappers[i].type.create(wrappers[i].attrs, content));\n }\n\n tr.step(new prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"ReplaceAroundStep\"](range.start - (joinBefore ? 2 : 0), range.end, range.start, range.end, new prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Slice\"](content, 0, 0), wrappers.length, true));\n var found = 0;\n\n for (var i$1 = 0; i$1 < wrappers.length; i$1++) {\n if (wrappers[i$1].type == listType) {\n found = i$1 + 1;\n }\n }\n\n var splitDepth = wrappers.length - found;\n var splitPos = range.start + wrappers.length - (joinBefore ? 2 : 0),\n parent = range.parent;\n\n for (var i$2 = range.startIndex, e = range.endIndex, first = true; i$2 < e; i$2++, first = false) {\n if (!first && Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"canSplit\"])(tr.doc, splitPos, splitDepth)) {\n tr.split(splitPos, splitDepth);\n splitPos += 2 * splitDepth;\n }\n\n splitPos += parent.child(i$2).nodeSize;\n }\n\n return tr;\n} // :: (NodeType) → (state: EditorState, dispatch: ?(tr: Transaction)) → bool\n// Build a command that splits a non-empty textblock at the top level\n// of a list item by also splitting that list item.\n\n\nfunction splitListItem(itemType) {\n return function (state, dispatch) {\n var ref = state.selection;\n var $from = ref.$from;\n var $to = ref.$to;\n var node = ref.node;\n\n if (node && node.isBlock || $from.depth < 2 || !$from.sameParent($to)) {\n return false;\n }\n\n var grandParent = $from.node(-1);\n\n if (grandParent.type != itemType) {\n return false;\n }\n\n if ($from.parent.content.size == 0) {\n // In an empty block. If this is a nested list, the wrapping\n // list item should be split. Otherwise, bail out and let next\n // command handle lifting.\n if ($from.depth == 2 || $from.node(-3).type != itemType || $from.index(-2) != $from.node(-2).childCount - 1) {\n return false;\n }\n\n if (dispatch) {\n var wrap = prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].empty,\n keepItem = $from.index(-1) > 0; // Build a fragment containing empty versions of the structure\n // from the outer list item to the parent node of the cursor\n\n for (var d = $from.depth - (keepItem ? 1 : 2); d >= $from.depth - 3; d--) {\n wrap = prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from($from.node(d).copy(wrap));\n } // Add a second list item with an empty default start node\n\n\n wrap = wrap.append(prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(itemType.createAndFill()));\n var tr$1 = state.tr.replace($from.before(keepItem ? null : -1), $from.after(-3), new prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Slice\"](wrap, keepItem ? 3 : 2, 2));\n tr$1.setSelection(state.selection.constructor.near(tr$1.doc.resolve($from.pos + (keepItem ? 3 : 2))));\n dispatch(tr$1.scrollIntoView());\n }\n\n return true;\n }\n\n var nextType = $to.pos == $from.end() ? grandParent.contentMatchAt(0).defaultType : null;\n var tr = state.tr[\"delete\"]($from.pos, $to.pos);\n var types = nextType && [null, {\n type: nextType\n }];\n\n if (!Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"canSplit\"])(tr.doc, $from.pos, 2, types)) {\n return false;\n }\n\n if (dispatch) {\n dispatch(tr.split($from.pos, 2, types).scrollIntoView());\n }\n\n return true;\n };\n} // :: (NodeType) → (state: EditorState, dispatch: ?(tr: Transaction)) → bool\n// Create a command to lift the list item around the selection up into\n// a wrapping list.\n\n\nfunction liftListItem(itemType) {\n return function (state, dispatch) {\n var ref = state.selection;\n var $from = ref.$from;\n var $to = ref.$to;\n var range = $from.blockRange($to, function (node) {\n return node.childCount && node.firstChild.type == itemType;\n });\n\n if (!range) {\n return false;\n }\n\n if (!dispatch) {\n return true;\n }\n\n if ($from.node(range.depth - 1).type == itemType) // Inside a parent list\n {\n return liftToOuterList(state, dispatch, itemType, range);\n } else // Outer list node\n {\n return liftOutOfList(state, dispatch, range);\n }\n };\n}\n\nfunction liftToOuterList(state, dispatch, itemType, range) {\n var tr = state.tr,\n end = range.end,\n endOfList = range.$to.end(range.depth);\n\n if (end < endOfList) {\n // There are siblings after the lifted items, which must become\n // children of the last item\n tr.step(new prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"ReplaceAroundStep\"](end - 1, endOfList, end, endOfList, new prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Slice\"](prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(itemType.create(null, range.parent.copy())), 1, 0), 1, true));\n range = new prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"NodeRange\"](tr.doc.resolve(range.$from.pos), tr.doc.resolve(endOfList), range.depth);\n }\n\n dispatch(tr.lift(range, Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"liftTarget\"])(range)).scrollIntoView());\n return true;\n}\n\nfunction liftOutOfList(state, dispatch, range) {\n var tr = state.tr,\n list = range.parent; // Merge the list items into a single big item\n\n for (var pos = range.end, i = range.endIndex - 1, e = range.startIndex; i > e; i--) {\n pos -= list.child(i).nodeSize;\n tr[\"delete\"](pos - 1, pos + 1);\n }\n\n var $start = tr.doc.resolve(range.start),\n item = $start.nodeAfter;\n var atStart = range.startIndex == 0,\n atEnd = range.endIndex == list.childCount;\n var parent = $start.node(-1),\n indexBefore = $start.index(-1);\n\n if (!parent.canReplace(indexBefore + (atStart ? 0 : 1), indexBefore + 1, item.content.append(atEnd ? prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].empty : prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(list)))) {\n return false;\n }\n\n var start = $start.pos,\n end = start + item.nodeSize; // Strip off the surrounding list. At the sides where we're not at\n // the end of the list, the existing list is closed. At sides where\n // this is the end, it is overwritten to its end.\n\n tr.step(new prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"ReplaceAroundStep\"](start - (atStart ? 1 : 0), end + (atEnd ? 1 : 0), start + 1, end - 1, new prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Slice\"]((atStart ? prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].empty : prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(list.copy(prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].empty))).append(atEnd ? prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].empty : prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(list.copy(prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].empty))), atStart ? 0 : 1, atEnd ? 0 : 1), atStart ? 0 : 1));\n dispatch(tr.scrollIntoView());\n return true;\n} // :: (NodeType) → (state: EditorState, dispatch: ?(tr: Transaction)) → bool\n// Create a command to sink the list item around the selection down\n// into an inner list.\n\n\nfunction sinkListItem(itemType) {\n return function (state, dispatch) {\n var ref = state.selection;\n var $from = ref.$from;\n var $to = ref.$to;\n var range = $from.blockRange($to, function (node) {\n return node.childCount && node.firstChild.type == itemType;\n });\n\n if (!range) {\n return false;\n }\n\n var startIndex = range.startIndex;\n\n if (startIndex == 0) {\n return false;\n }\n\n var parent = range.parent,\n nodeBefore = parent.child(startIndex - 1);\n\n if (nodeBefore.type != itemType) {\n return false;\n }\n\n if (dispatch) {\n var nestedBefore = nodeBefore.lastChild && nodeBefore.lastChild.type == parent.type;\n var inner = prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(nestedBefore ? itemType.create() : null);\n var slice = new prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Slice\"](prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(itemType.create(null, prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(parent.type.create(null, inner)))), nestedBefore ? 3 : 1, 0);\n var before = range.start,\n after = range.end;\n dispatch(state.tr.step(new prosemirror_transform__WEBPACK_IMPORTED_MODULE_0__[\"ReplaceAroundStep\"](before - (nestedBefore ? 3 : 1), after, before, after, slice, 1, true)).scrollIntoView());\n }\n\n return true;\n };\n}\n\n\n\n//# sourceURL=webpack:///./node_modules/prosemirror-schema-list/dist/index.es.js?"); - -/***/ }), - -/***/ "./node_modules/prosemirror-state/dist/index.es.js": -/*!*********************************************************!*\ - !*** ./node_modules/prosemirror-state/dist/index.es.js ***! - \*********************************************************/ -/*! exports provided: AllSelection, EditorState, NodeSelection, Plugin, PluginKey, Selection, SelectionRange, TextSelection, Transaction */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"AllSelection\", function() { return AllSelection; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"EditorState\", function() { return EditorState; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"NodeSelection\", function() { return NodeSelection; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Plugin\", function() { return Plugin; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"PluginKey\", function() { return PluginKey; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Selection\", function() { return Selection; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"SelectionRange\", function() { return SelectionRange; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"TextSelection\", function() { return TextSelection; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Transaction\", function() { return Transaction; });\n/* harmony import */ var prosemirror_model__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prosemirror-model */ \"./node_modules/prosemirror-model/dist/index.es.js\");\n/* harmony import */ var prosemirror_transform__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prosemirror-transform */ \"./node_modules/prosemirror-transform/dist/index.es.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n\n\nvar classesById = Object.create(null); // ::- Superclass for editor selections. Every selection type should\n// extend this. Should not be instantiated directly.\n\nvar Selection = function Selection($anchor, $head, ranges) {\n // :: [SelectionRange]\n // The ranges covered by the selection.\n this.ranges = ranges || [new SelectionRange($anchor.min($head), $anchor.max($head))]; // :: ResolvedPos\n // The resolved anchor of the selection (the side that stays in\n // place when the selection is modified).\n\n this.$anchor = $anchor; // :: ResolvedPos\n // The resolved head of the selection (the side that moves when\n // the selection is modified).\n\n this.$head = $head;\n};\n\nvar prototypeAccessors = {\n anchor: {\n configurable: true\n },\n head: {\n configurable: true\n },\n from: {\n configurable: true\n },\n to: {\n configurable: true\n },\n $from: {\n configurable: true\n },\n $to: {\n configurable: true\n },\n empty: {\n configurable: true\n }\n}; // :: number\n// The selection's anchor, as an unresolved position.\n\nprototypeAccessors.anchor.get = function () {\n return this.$anchor.pos;\n}; // :: number\n// The selection's head.\n\n\nprototypeAccessors.head.get = function () {\n return this.$head.pos;\n}; // :: number\n// The lower bound of the selection's main range.\n\n\nprototypeAccessors.from.get = function () {\n return this.$from.pos;\n}; // :: number\n// The upper bound of the selection's main range.\n\n\nprototypeAccessors.to.get = function () {\n return this.$to.pos;\n}; // :: ResolvedPos\n// The resolved lowerbound of the selection's main range.\n\n\nprototypeAccessors.$from.get = function () {\n return this.ranges[0].$from;\n}; // :: ResolvedPos\n// The resolved upper bound of the selection's main range.\n\n\nprototypeAccessors.$to.get = function () {\n return this.ranges[0].$to;\n}; // :: bool\n// Indicates whether the selection contains any content.\n\n\nprototypeAccessors.empty.get = function () {\n var ranges = this.ranges;\n\n for (var i = 0; i < ranges.length; i++) {\n if (ranges[i].$from.pos != ranges[i].$to.pos) {\n return false;\n }\n }\n\n return true;\n}; // eq:: (Selection) → bool\n// Test whether the selection is the same as another selection.\n// map:: (doc: Node, mapping: Mappable) → Selection\n// Map this selection through a [mappable](#transform.Mappable) thing. `doc`\n// should be the new document to which we are mapping.\n// :: () → Slice\n// Get the content of this selection as a slice.\n\n\nSelection.prototype.content = function content() {\n return this.$from.node(0).slice(this.from, this.to, true);\n}; // :: (Transaction, ?Slice)\n// Replace the selection with a slice or, if no slice is given,\n// delete the selection. Will append to the given transaction.\n\n\nSelection.prototype.replace = function replace(tr, content) {\n if (content === void 0) content = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"].empty; // Put the new selection at the position after the inserted\n // content. When that ended in an inline node, search backwards,\n // to get the position after that node. If not, search forward.\n\n var lastNode = content.content.lastChild,\n lastParent = null;\n\n for (var i = 0; i < content.openEnd; i++) {\n lastParent = lastNode;\n lastNode = lastNode.lastChild;\n }\n\n var mapFrom = tr.steps.length,\n ranges = this.ranges;\n\n for (var i$1 = 0; i$1 < ranges.length; i$1++) {\n var ref = ranges[i$1];\n var $from = ref.$from;\n var $to = ref.$to;\n var mapping = tr.mapping.slice(mapFrom);\n tr.replaceRange(mapping.map($from.pos), mapping.map($to.pos), i$1 ? prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"].empty : content);\n\n if (i$1 == 0) {\n selectionToInsertionEnd(tr, mapFrom, (lastNode ? lastNode.isInline : lastParent && lastParent.isTextblock) ? -1 : 1);\n }\n }\n}; // :: (Transaction, Node)\n// Replace the selection with the given node, appending the changes\n// to the given transaction.\n\n\nSelection.prototype.replaceWith = function replaceWith(tr, node) {\n var mapFrom = tr.steps.length,\n ranges = this.ranges;\n\n for (var i = 0; i < ranges.length; i++) {\n var ref = ranges[i];\n var $from = ref.$from;\n var $to = ref.$to;\n var mapping = tr.mapping.slice(mapFrom);\n var from = mapping.map($from.pos),\n to = mapping.map($to.pos);\n\n if (i) {\n tr.deleteRange(from, to);\n } else {\n tr.replaceRangeWith(from, to, node);\n selectionToInsertionEnd(tr, mapFrom, node.isInline ? -1 : 1);\n }\n }\n}; // toJSON:: () → Object\n// Convert the selection to a JSON representation. When implementing\n// this for a custom selection class, make sure to give the object a\n// `type` property whose value matches the ID under which you\n// [registered](#state.Selection^jsonID) your class.\n// :: (ResolvedPos, number, ?bool) → ?Selection\n// Find a valid cursor or leaf node selection starting at the given\n// position and searching back if `dir` is negative, and forward if\n// positive. When `textOnly` is true, only consider cursor\n// selections. Will return null when no valid selection position is\n// found.\n\n\nSelection.findFrom = function findFrom($pos, dir, textOnly) {\n var inner = $pos.parent.inlineContent ? new TextSelection($pos) : findSelectionIn($pos.node(0), $pos.parent, $pos.pos, $pos.index(), dir, textOnly);\n\n if (inner) {\n return inner;\n }\n\n for (var depth = $pos.depth - 1; depth >= 0; depth--) {\n var found = dir < 0 ? findSelectionIn($pos.node(0), $pos.node(depth), $pos.before(depth + 1), $pos.index(depth), dir, textOnly) : findSelectionIn($pos.node(0), $pos.node(depth), $pos.after(depth + 1), $pos.index(depth) + 1, dir, textOnly);\n\n if (found) {\n return found;\n }\n }\n}; // :: (ResolvedPos, ?number) → Selection\n// Find a valid cursor or leaf node selection near the given\n// position. Searches forward first by default, but if `bias` is\n// negative, it will search backwards first.\n\n\nSelection.near = function near($pos, bias) {\n if (bias === void 0) bias = 1;\n return this.findFrom($pos, bias) || this.findFrom($pos, -bias) || new AllSelection($pos.node(0));\n}; // :: (Node) → Selection\n// Find the cursor or leaf node selection closest to the start of\n// the given document. Will return an\n// [`AllSelection`](#state.AllSelection) if no valid position\n// exists.\n\n\nSelection.atStart = function atStart(doc) {\n return findSelectionIn(doc, doc, 0, 0, 1) || new AllSelection(doc);\n}; // :: (Node) → Selection\n// Find the cursor or leaf node selection closest to the end of the\n// given document.\n\n\nSelection.atEnd = function atEnd(doc) {\n return findSelectionIn(doc, doc, doc.content.size, doc.childCount, -1) || new AllSelection(doc);\n}; // :: (Node, Object) → Selection\n// Deserialize the JSON representation of a selection. Must be\n// implemented for custom classes (as a static class method).\n\n\nSelection.fromJSON = function fromJSON(doc, json) {\n if (!json || !json.type) {\n throw new RangeError(\"Invalid input for Selection.fromJSON\");\n }\n\n var cls = classesById[json.type];\n\n if (!cls) {\n throw new RangeError(\"No selection type \" + json.type + \" defined\");\n }\n\n return cls.fromJSON(doc, json);\n}; // :: (string, constructor)\n// To be able to deserialize selections from JSON, custom selection\n// classes must register themselves with an ID string, so that they\n// can be disambiguated. Try to pick something that's unlikely to\n// clash with classes from other modules.\n\n\nSelection.jsonID = function jsonID(id, selectionClass) {\n if (id in classesById) {\n throw new RangeError(\"Duplicate use of selection JSON ID \" + id);\n }\n\n classesById[id] = selectionClass;\n selectionClass.prototype.jsonID = id;\n return selectionClass;\n}; // :: () → SelectionBookmark\n// Get a [bookmark](#state.SelectionBookmark) for this selection,\n// which is a value that can be mapped without having access to a\n// current document, and later resolved to a real selection for a\n// given document again. (This is used mostly by the history to\n// track and restore old selections.) The default implementation of\n// this method just converts the selection to a text selection and\n// returns the bookmark for that.\n\n\nSelection.prototype.getBookmark = function getBookmark() {\n return TextSelection.between(this.$anchor, this.$head).getBookmark();\n};\n\nObject.defineProperties(Selection.prototype, prototypeAccessors); // :: bool\n// Controls whether, when a selection of this type is active in the\n// browser, the selected range should be visible to the user. Defaults\n// to `true`.\n\nSelection.prototype.visible = true; // SelectionBookmark:: interface\n// A lightweight, document-independent representation of a selection.\n// You can define a custom bookmark type for a custom selection class\n// to make the history handle it well.\n//\n// map:: (mapping: Mapping) → SelectionBookmark\n// Map the bookmark through a set of changes.\n//\n// resolve:: (doc: Node) → Selection\n// Resolve the bookmark to a real selection again. This may need to\n// do some error checking and may fall back to a default (usually\n// [`TextSelection.between`](#state.TextSelection^between)) if\n// mapping made the bookmark invalid.\n// ::- Represents a selected range in a document.\n\nvar SelectionRange = function SelectionRange($from, $to) {\n // :: ResolvedPos\n // The lower bound of the range.\n this.$from = $from; // :: ResolvedPos\n // The upper bound of the range.\n\n this.$to = $to;\n}; // ::- A text selection represents a classical editor selection, with\n// a head (the moving side) and anchor (immobile side), both of which\n// point into textblock nodes. It can be empty (a regular cursor\n// position).\n\n\nvar TextSelection = /*@__PURE__*/function (Selection) {\n function TextSelection($anchor, $head) {\n if ($head === void 0) $head = $anchor;\n Selection.call(this, $anchor, $head);\n }\n\n if (Selection) TextSelection.__proto__ = Selection;\n TextSelection.prototype = Object.create(Selection && Selection.prototype);\n TextSelection.prototype.constructor = TextSelection;\n var prototypeAccessors$1 = {\n $cursor: {\n configurable: true\n }\n }; // :: ?ResolvedPos\n // Returns a resolved position if this is a cursor selection (an\n // empty text selection), and null otherwise.\n\n prototypeAccessors$1.$cursor.get = function () {\n return this.$anchor.pos == this.$head.pos ? this.$head : null;\n };\n\n TextSelection.prototype.map = function map(doc, mapping) {\n var $head = doc.resolve(mapping.map(this.head));\n\n if (!$head.parent.inlineContent) {\n return Selection.near($head);\n }\n\n var $anchor = doc.resolve(mapping.map(this.anchor));\n return new TextSelection($anchor.parent.inlineContent ? $anchor : $head, $head);\n };\n\n TextSelection.prototype.replace = function replace(tr, content) {\n if (content === void 0) content = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"].empty;\n Selection.prototype.replace.call(this, tr, content);\n\n if (content == prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"].empty) {\n var marks = this.$from.marksAcross(this.$to);\n\n if (marks) {\n tr.ensureMarks(marks);\n }\n }\n };\n\n TextSelection.prototype.eq = function eq(other) {\n return other instanceof TextSelection && other.anchor == this.anchor && other.head == this.head;\n };\n\n TextSelection.prototype.getBookmark = function getBookmark() {\n return new TextBookmark(this.anchor, this.head);\n };\n\n TextSelection.prototype.toJSON = function toJSON() {\n return {\n type: \"text\",\n anchor: this.anchor,\n head: this.head\n };\n };\n\n TextSelection.fromJSON = function fromJSON(doc, json) {\n if (typeof json.anchor != \"number\" || typeof json.head != \"number\") {\n throw new RangeError(\"Invalid input for TextSelection.fromJSON\");\n }\n\n return new TextSelection(doc.resolve(json.anchor), doc.resolve(json.head));\n }; // :: (Node, number, ?number) → TextSelection\n // Create a text selection from non-resolved positions.\n\n\n TextSelection.create = function create(doc, anchor, head) {\n if (head === void 0) head = anchor;\n var $anchor = doc.resolve(anchor);\n return new this($anchor, head == anchor ? $anchor : doc.resolve(head));\n }; // :: (ResolvedPos, ResolvedPos, ?number) → Selection\n // Return a text selection that spans the given positions or, if\n // they aren't text positions, find a text selection near them.\n // `bias` determines whether the method searches forward (default)\n // or backwards (negative number) first. Will fall back to calling\n // [`Selection.near`](#state.Selection^near) when the document\n // doesn't contain a valid text position.\n\n\n TextSelection.between = function between($anchor, $head, bias) {\n var dPos = $anchor.pos - $head.pos;\n\n if (!bias || dPos) {\n bias = dPos >= 0 ? 1 : -1;\n }\n\n if (!$head.parent.inlineContent) {\n var found = Selection.findFrom($head, bias, true) || Selection.findFrom($head, -bias, true);\n\n if (found) {\n $head = found.$head;\n } else {\n return Selection.near($head, bias);\n }\n }\n\n if (!$anchor.parent.inlineContent) {\n if (dPos == 0) {\n $anchor = $head;\n } else {\n $anchor = (Selection.findFrom($anchor, -bias, true) || Selection.findFrom($anchor, bias, true)).$anchor;\n\n if ($anchor.pos < $head.pos != dPos < 0) {\n $anchor = $head;\n }\n }\n }\n\n return new TextSelection($anchor, $head);\n };\n\n Object.defineProperties(TextSelection.prototype, prototypeAccessors$1);\n return TextSelection;\n}(Selection);\n\nSelection.jsonID(\"text\", TextSelection);\n\nvar TextBookmark = function TextBookmark(anchor, head) {\n this.anchor = anchor;\n this.head = head;\n};\n\nTextBookmark.prototype.map = function map(mapping) {\n return new TextBookmark(mapping.map(this.anchor), mapping.map(this.head));\n};\n\nTextBookmark.prototype.resolve = function resolve(doc) {\n return TextSelection.between(doc.resolve(this.anchor), doc.resolve(this.head));\n}; // ::- A node selection is a selection that points at a single node.\n// All nodes marked [selectable](#model.NodeSpec.selectable) can be\n// the target of a node selection. In such a selection, `from` and\n// `to` point directly before and after the selected node, `anchor`\n// equals `from`, and `head` equals `to`..\n\n\nvar NodeSelection = /*@__PURE__*/function (Selection) {\n function NodeSelection($pos) {\n var node = $pos.nodeAfter;\n var $end = $pos.node(0).resolve($pos.pos + node.nodeSize);\n Selection.call(this, $pos, $end); // :: Node The selected node.\n\n this.node = node;\n }\n\n if (Selection) NodeSelection.__proto__ = Selection;\n NodeSelection.prototype = Object.create(Selection && Selection.prototype);\n NodeSelection.prototype.constructor = NodeSelection;\n\n NodeSelection.prototype.map = function map(doc, mapping) {\n var ref = mapping.mapResult(this.anchor);\n var deleted = ref.deleted;\n var pos = ref.pos;\n var $pos = doc.resolve(pos);\n\n if (deleted) {\n return Selection.near($pos);\n }\n\n return new NodeSelection($pos);\n };\n\n NodeSelection.prototype.content = function content() {\n return new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].from(this.node), 0, 0);\n };\n\n NodeSelection.prototype.eq = function eq(other) {\n return other instanceof NodeSelection && other.anchor == this.anchor;\n };\n\n NodeSelection.prototype.toJSON = function toJSON() {\n return {\n type: \"node\",\n anchor: this.anchor\n };\n };\n\n NodeSelection.prototype.getBookmark = function getBookmark() {\n return new NodeBookmark(this.anchor);\n };\n\n NodeSelection.fromJSON = function fromJSON(doc, json) {\n if (typeof json.anchor != \"number\") {\n throw new RangeError(\"Invalid input for NodeSelection.fromJSON\");\n }\n\n return new NodeSelection(doc.resolve(json.anchor));\n }; // :: (Node, number) → NodeSelection\n // Create a node selection from non-resolved positions.\n\n\n NodeSelection.create = function create(doc, from) {\n return new this(doc.resolve(from));\n }; // :: (Node) → bool\n // Determines whether the given node may be selected as a node\n // selection.\n\n\n NodeSelection.isSelectable = function isSelectable(node) {\n return !node.isText && node.type.spec.selectable !== false;\n };\n\n return NodeSelection;\n}(Selection);\n\nNodeSelection.prototype.visible = false;\nSelection.jsonID(\"node\", NodeSelection);\n\nvar NodeBookmark = function NodeBookmark(anchor) {\n this.anchor = anchor;\n};\n\nNodeBookmark.prototype.map = function map(mapping) {\n var ref = mapping.mapResult(this.anchor);\n var deleted = ref.deleted;\n var pos = ref.pos;\n return deleted ? new TextBookmark(pos, pos) : new NodeBookmark(pos);\n};\n\nNodeBookmark.prototype.resolve = function resolve(doc) {\n var $pos = doc.resolve(this.anchor),\n node = $pos.nodeAfter;\n\n if (node && NodeSelection.isSelectable(node)) {\n return new NodeSelection($pos);\n }\n\n return Selection.near($pos);\n}; // ::- A selection type that represents selecting the whole document\n// (which can not necessarily be expressed with a text selection, when\n// there are for example leaf block nodes at the start or end of the\n// document).\n\n\nvar AllSelection = /*@__PURE__*/function (Selection) {\n function AllSelection(doc) {\n Selection.call(this, doc.resolve(0), doc.resolve(doc.content.size));\n }\n\n if (Selection) AllSelection.__proto__ = Selection;\n AllSelection.prototype = Object.create(Selection && Selection.prototype);\n AllSelection.prototype.constructor = AllSelection;\n\n AllSelection.prototype.toJSON = function toJSON() {\n return {\n type: \"all\"\n };\n };\n\n AllSelection.fromJSON = function fromJSON(doc) {\n return new AllSelection(doc);\n };\n\n AllSelection.prototype.map = function map(doc) {\n return new AllSelection(doc);\n };\n\n AllSelection.prototype.eq = function eq(other) {\n return other instanceof AllSelection;\n };\n\n AllSelection.prototype.getBookmark = function getBookmark() {\n return AllBookmark;\n };\n\n return AllSelection;\n}(Selection);\n\nSelection.jsonID(\"all\", AllSelection);\nvar AllBookmark = {\n map: function map() {\n return this;\n },\n resolve: function resolve(doc) {\n return new AllSelection(doc);\n }\n}; // FIXME we'll need some awareness of text direction when scanning for selections\n// Try to find a selection inside the given node. `pos` points at the\n// position where the search starts. When `text` is true, only return\n// text selections.\n\nfunction findSelectionIn(doc, node, pos, index, dir, text) {\n if (node.inlineContent) {\n return TextSelection.create(doc, pos);\n }\n\n for (var i = index - (dir > 0 ? 0 : 1); dir > 0 ? i < node.childCount : i >= 0; i += dir) {\n var child = node.child(i);\n\n if (!child.isAtom) {\n var inner = findSelectionIn(doc, child, pos + dir, dir < 0 ? child.childCount : 0, dir, text);\n\n if (inner) {\n return inner;\n }\n } else if (!text && NodeSelection.isSelectable(child)) {\n return NodeSelection.create(doc, pos - (dir < 0 ? child.nodeSize : 0));\n }\n\n pos += child.nodeSize * dir;\n }\n}\n\nfunction selectionToInsertionEnd(tr, startLen, bias) {\n var last = tr.steps.length - 1;\n\n if (last < startLen) {\n return;\n }\n\n var step = tr.steps[last];\n\n if (!(step instanceof prosemirror_transform__WEBPACK_IMPORTED_MODULE_1__[\"ReplaceStep\"] || step instanceof prosemirror_transform__WEBPACK_IMPORTED_MODULE_1__[\"ReplaceAroundStep\"])) {\n return;\n }\n\n var map = tr.mapping.maps[last],\n end;\n map.forEach(function (_from, _to, _newFrom, newTo) {\n if (end == null) {\n end = newTo;\n }\n });\n tr.setSelection(Selection.near(tr.doc.resolve(end), bias));\n}\n\nvar UPDATED_SEL = 1,\n UPDATED_MARKS = 2,\n UPDATED_SCROLL = 4; // ::- An editor state transaction, which can be applied to a state to\n// create an updated state. Use\n// [`EditorState.tr`](#state.EditorState.tr) to create an instance.\n//\n// Transactions track changes to the document (they are a subclass of\n// [`Transform`](#transform.Transform)), but also other state changes,\n// like selection updates and adjustments of the set of [stored\n// marks](#state.EditorState.storedMarks). In addition, you can store\n// metadata properties in a transaction, which are extra pieces of\n// information that client code or plugins can use to describe what a\n// transacion represents, so that they can update their [own\n// state](#state.StateField) accordingly.\n//\n// The [editor view](#view.EditorView) uses a few metadata properties:\n// it will attach a property `\"pointer\"` with the value `true` to\n// selection transactions directly caused by mouse or touch input, and\n// a `\"uiEvent\"` property of that may be `\"paste\"`, `\"cut\"`, or `\"drop\"`.\n\nvar Transaction = /*@__PURE__*/function (Transform) {\n function Transaction(state) {\n Transform.call(this, state.doc); // :: number\n // The timestamp associated with this transaction, in the same\n // format as `Date.now()`.\n\n this.time = Date.now();\n this.curSelection = state.selection; // The step count for which the current selection is valid.\n\n this.curSelectionFor = 0; // :: ?[Mark]\n // The stored marks set by this transaction, if any.\n\n this.storedMarks = state.storedMarks; // Bitfield to track which aspects of the state were updated by\n // this transaction.\n\n this.updated = 0; // Object used to store metadata properties for the transaction.\n\n this.meta = Object.create(null);\n }\n\n if (Transform) Transaction.__proto__ = Transform;\n Transaction.prototype = Object.create(Transform && Transform.prototype);\n Transaction.prototype.constructor = Transaction;\n var prototypeAccessors = {\n selection: {\n configurable: true\n },\n selectionSet: {\n configurable: true\n },\n storedMarksSet: {\n configurable: true\n },\n isGeneric: {\n configurable: true\n },\n scrolledIntoView: {\n configurable: true\n }\n }; // :: Selection\n // The transaction's current selection. This defaults to the editor\n // selection [mapped](#state.Selection.map) through the steps in the\n // transaction, but can be overwritten with\n // [`setSelection`](#state.Transaction.setSelection).\n\n prototypeAccessors.selection.get = function () {\n if (this.curSelectionFor < this.steps.length) {\n this.curSelection = this.curSelection.map(this.doc, this.mapping.slice(this.curSelectionFor));\n this.curSelectionFor = this.steps.length;\n }\n\n return this.curSelection;\n }; // :: (Selection) → Transaction\n // Update the transaction's current selection. Will determine the\n // selection that the editor gets when the transaction is applied.\n\n\n Transaction.prototype.setSelection = function setSelection(selection) {\n if (selection.$from.doc != this.doc) {\n throw new RangeError(\"Selection passed to setSelection must point at the current document\");\n }\n\n this.curSelection = selection;\n this.curSelectionFor = this.steps.length;\n this.updated = (this.updated | UPDATED_SEL) & ~UPDATED_MARKS;\n this.storedMarks = null;\n return this;\n }; // :: bool\n // Whether the selection was explicitly updated by this transaction.\n\n\n prototypeAccessors.selectionSet.get = function () {\n return (this.updated & UPDATED_SEL) > 0;\n }; // :: (?[Mark]) → Transaction\n // Set the current stored marks.\n\n\n Transaction.prototype.setStoredMarks = function setStoredMarks(marks) {\n this.storedMarks = marks;\n this.updated |= UPDATED_MARKS;\n return this;\n }; // :: ([Mark]) → Transaction\n // Make sure the current stored marks or, if that is null, the marks\n // at the selection, match the given set of marks. Does nothing if\n // this is already the case.\n\n\n Transaction.prototype.ensureMarks = function ensureMarks(marks) {\n if (!prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Mark\"].sameSet(this.storedMarks || this.selection.$from.marks(), marks)) {\n this.setStoredMarks(marks);\n }\n\n return this;\n }; // :: (Mark) → Transaction\n // Add a mark to the set of stored marks.\n\n\n Transaction.prototype.addStoredMark = function addStoredMark(mark) {\n return this.ensureMarks(mark.addToSet(this.storedMarks || this.selection.$head.marks()));\n }; // :: (union) → Transaction\n // Remove a mark or mark type from the set of stored marks.\n\n\n Transaction.prototype.removeStoredMark = function removeStoredMark(mark) {\n return this.ensureMarks(mark.removeFromSet(this.storedMarks || this.selection.$head.marks()));\n }; // :: bool\n // Whether the stored marks were explicitly set for this transaction.\n\n\n prototypeAccessors.storedMarksSet.get = function () {\n return (this.updated & UPDATED_MARKS) > 0;\n };\n\n Transaction.prototype.addStep = function addStep(step, doc) {\n Transform.prototype.addStep.call(this, step, doc);\n this.updated = this.updated & ~UPDATED_MARKS;\n this.storedMarks = null;\n }; // :: (number) → Transaction\n // Update the timestamp for the transaction.\n\n\n Transaction.prototype.setTime = function setTime(time) {\n this.time = time;\n return this;\n }; // :: (Slice) → Transaction\n // Replace the current selection with the given slice.\n\n\n Transaction.prototype.replaceSelection = function replaceSelection(slice) {\n this.selection.replace(this, slice);\n return this;\n }; // :: (Node, ?bool) → Transaction\n // Replace the selection with the given node. When `inheritMarks` is\n // true and the content is inline, it inherits the marks from the\n // place where it is inserted.\n\n\n Transaction.prototype.replaceSelectionWith = function replaceSelectionWith(node, inheritMarks) {\n var selection = this.selection;\n\n if (inheritMarks !== false) {\n node = node.mark(this.storedMarks || (selection.empty ? selection.$from.marks() : selection.$from.marksAcross(selection.$to) || prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Mark\"].none));\n }\n\n selection.replaceWith(this, node);\n return this;\n }; // :: () → Transaction\n // Delete the selection.\n\n\n Transaction.prototype.deleteSelection = function deleteSelection() {\n this.selection.replace(this);\n return this;\n }; // :: (string, from: ?number, to: ?number) → Transaction\n // Replace the given range, or the selection if no range is given,\n // with a text node containing the given string.\n\n\n Transaction.prototype.insertText = function insertText(text, from, to) {\n if (to === void 0) to = from;\n var schema = this.doc.type.schema;\n\n if (from == null) {\n if (!text) {\n return this.deleteSelection();\n }\n\n return this.replaceSelectionWith(schema.text(text), true);\n } else {\n if (!text) {\n return this.deleteRange(from, to);\n }\n\n var marks = this.storedMarks;\n\n if (!marks) {\n var $from = this.doc.resolve(from);\n marks = to == from ? $from.marks() : $from.marksAcross(this.doc.resolve(to));\n }\n\n this.replaceRangeWith(from, to, schema.text(text, marks));\n\n if (!this.selection.empty) {\n this.setSelection(Selection.near(this.selection.$to));\n }\n\n return this;\n }\n }; // :: (union, any) → Transaction\n // Store a metadata property in this transaction, keyed either by\n // name or by plugin.\n\n\n Transaction.prototype.setMeta = function setMeta(key, value) {\n this.meta[typeof key == \"string\" ? key : key.key] = value;\n return this;\n }; // :: (union) → any\n // Retrieve a metadata property for a given name or plugin.\n\n\n Transaction.prototype.getMeta = function getMeta(key) {\n return this.meta[typeof key == \"string\" ? key : key.key];\n }; // :: bool\n // Returns true if this transaction doesn't contain any metadata,\n // and can thus safely be extended.\n\n\n prototypeAccessors.isGeneric.get = function () {\n for (var _ in this.meta) {\n return false;\n }\n\n return true;\n }; // :: () → Transaction\n // Indicate that the editor should scroll the selection into view\n // when updated to the state produced by this transaction.\n\n\n Transaction.prototype.scrollIntoView = function scrollIntoView() {\n this.updated |= UPDATED_SCROLL;\n return this;\n };\n\n prototypeAccessors.scrolledIntoView.get = function () {\n return (this.updated & UPDATED_SCROLL) > 0;\n };\n\n Object.defineProperties(Transaction.prototype, prototypeAccessors);\n return Transaction;\n}(prosemirror_transform__WEBPACK_IMPORTED_MODULE_1__[\"Transform\"]);\n\nfunction bind(f, self) {\n return !self || !f ? f : f.bind(self);\n}\n\nvar FieldDesc = function FieldDesc(name, desc, self) {\n this.name = name;\n this.init = bind(desc.init, self);\n this.apply = bind(desc.apply, self);\n};\n\nvar baseFields = [new FieldDesc(\"doc\", {\n init: function init(config) {\n return config.doc || config.schema.topNodeType.createAndFill();\n },\n apply: function apply(tr) {\n return tr.doc;\n }\n}), new FieldDesc(\"selection\", {\n init: function init(config, instance) {\n return config.selection || Selection.atStart(instance.doc);\n },\n apply: function apply(tr) {\n return tr.selection;\n }\n}), new FieldDesc(\"storedMarks\", {\n init: function init(config) {\n return config.storedMarks || null;\n },\n apply: function apply(tr, _marks, _old, state) {\n return state.selection.$cursor ? tr.storedMarks : null;\n }\n}), new FieldDesc(\"scrollToSelection\", {\n init: function init() {\n return 0;\n },\n apply: function apply(tr, prev) {\n return tr.scrolledIntoView ? prev + 1 : prev;\n }\n})]; // Object wrapping the part of a state object that stays the same\n// across transactions. Stored in the state's `config` property.\n\nvar Configuration = function Configuration(schema, plugins) {\n var this$1 = this;\n this.schema = schema;\n this.fields = baseFields.concat();\n this.plugins = [];\n this.pluginsByKey = Object.create(null);\n\n if (plugins) {\n plugins.forEach(function (plugin) {\n if (this$1.pluginsByKey[plugin.key]) {\n throw new RangeError(\"Adding different instances of a keyed plugin (\" + plugin.key + \")\");\n }\n\n this$1.plugins.push(plugin);\n this$1.pluginsByKey[plugin.key] = plugin;\n\n if (plugin.spec.state) {\n this$1.fields.push(new FieldDesc(plugin.key, plugin.spec.state, plugin));\n }\n });\n }\n}; // ::- The state of a ProseMirror editor is represented by an object\n// of this type. A state is a persistent data structure—it isn't\n// updated, but rather a new state value is computed from an old one\n// using the [`apply`](#state.EditorState.apply) method.\n//\n// A state holds a number of built-in fields, and plugins can\n// [define](#state.PluginSpec.state) additional fields.\n\n\nvar EditorState = function EditorState(config) {\n this.config = config;\n};\n\nvar prototypeAccessors$1 = {\n schema: {\n configurable: true\n },\n plugins: {\n configurable: true\n },\n tr: {\n configurable: true\n }\n}; // doc:: Node\n// The current document.\n// selection:: Selection\n// The selection.\n// storedMarks:: ?[Mark]\n// A set of marks to apply to the next input. Will be null when\n// no explicit marks have been set.\n// :: Schema\n// The schema of the state's document.\n\nprototypeAccessors$1.schema.get = function () {\n return this.config.schema;\n}; // :: [Plugin]\n// The plugins that are active in this state.\n\n\nprototypeAccessors$1.plugins.get = function () {\n return this.config.plugins;\n}; // :: (Transaction) → EditorState\n// Apply the given transaction to produce a new state.\n\n\nEditorState.prototype.apply = function apply(tr) {\n return this.applyTransaction(tr).state;\n}; // : (Transaction) → bool\n\n\nEditorState.prototype.filterTransaction = function filterTransaction(tr, ignore) {\n if (ignore === void 0) ignore = -1;\n\n for (var i = 0; i < this.config.plugins.length; i++) {\n if (i != ignore) {\n var plugin = this.config.plugins[i];\n\n if (plugin.spec.filterTransaction && !plugin.spec.filterTransaction.call(plugin, tr, this)) {\n return false;\n }\n }\n }\n\n return true;\n}; // :: (Transaction) → {state: EditorState, transactions: [Transaction]}\n// Verbose variant of [`apply`](#state.EditorState.apply) that\n// returns the precise transactions that were applied (which might\n// be influenced by the [transaction\n// hooks](#state.PluginSpec.filterTransaction) of\n// plugins) along with the new state.\n\n\nEditorState.prototype.applyTransaction = function applyTransaction(rootTr) {\n if (!this.filterTransaction(rootTr)) {\n return {\n state: this,\n transactions: []\n };\n }\n\n var trs = [rootTr],\n newState = this.applyInner(rootTr),\n seen = null; // This loop repeatedly gives plugins a chance to respond to\n // transactions as new transactions are added, making sure to only\n // pass the transactions the plugin did not see before.\n\n for (;;) {\n var haveNew = false;\n\n for (var i = 0; i < this.config.plugins.length; i++) {\n var plugin = this.config.plugins[i];\n\n if (plugin.spec.appendTransaction) {\n var n = seen ? seen[i].n : 0,\n oldState = seen ? seen[i].state : this;\n var tr = n < trs.length && plugin.spec.appendTransaction.call(plugin, n ? trs.slice(n) : trs, oldState, newState);\n\n if (tr && newState.filterTransaction(tr, i)) {\n tr.setMeta(\"appendedTransaction\", rootTr);\n\n if (!seen) {\n seen = [];\n\n for (var j = 0; j < this.config.plugins.length; j++) {\n seen.push(j < i ? {\n state: newState,\n n: trs.length\n } : {\n state: this,\n n: 0\n });\n }\n }\n\n trs.push(tr);\n newState = newState.applyInner(tr);\n haveNew = true;\n }\n\n if (seen) {\n seen[i] = {\n state: newState,\n n: trs.length\n };\n }\n }\n }\n\n if (!haveNew) {\n return {\n state: newState,\n transactions: trs\n };\n }\n }\n}; // : (Transaction) → EditorState\n\n\nEditorState.prototype.applyInner = function applyInner(tr) {\n if (!tr.before.eq(this.doc)) {\n throw new RangeError(\"Applying a mismatched transaction\");\n }\n\n var newInstance = new EditorState(this.config),\n fields = this.config.fields;\n\n for (var i = 0; i < fields.length; i++) {\n var field = fields[i];\n newInstance[field.name] = field.apply(tr, this[field.name], this, newInstance);\n }\n\n for (var i$1 = 0; i$1 < applyListeners.length; i$1++) {\n applyListeners[i$1](this, tr, newInstance);\n }\n\n return newInstance;\n}; // :: Transaction\n// Start a [transaction](#state.Transaction) from this state.\n\n\nprototypeAccessors$1.tr.get = function () {\n return new Transaction(this);\n}; // :: (Object) → EditorState\n// Create a new state.\n//\n// config::- Configuration options. Must contain `schema` or `doc` (or both).\n//\n// schema:: ?Schema\n// The schema to use.\n//\n// doc:: ?Node\n// The starting document.\n//\n// selection:: ?Selection\n// A valid selection in the document.\n//\n// storedMarks:: ?[Mark]\n// The initial set of [stored marks](#state.EditorState.storedMarks).\n//\n// plugins:: ?[Plugin]\n// The plugins that should be active in this state.\n\n\nEditorState.create = function create(config) {\n var $config = new Configuration(config.schema || config.doc.type.schema, config.plugins);\n var instance = new EditorState($config);\n\n for (var i = 0; i < $config.fields.length; i++) {\n instance[$config.fields[i].name] = $config.fields[i].init(config, instance);\n }\n\n return instance;\n}; // :: (Object) → EditorState\n// Create a new state based on this one, but with an adjusted set of\n// active plugins. State fields that exist in both sets of plugins\n// are kept unchanged. Those that no longer exist are dropped, and\n// those that are new are initialized using their\n// [`init`](#state.StateField.init) method, passing in the new\n// configuration object..\n//\n// config::- configuration options\n//\n// schema:: ?Schema\n// New schema to use.\n//\n// plugins:: ?[Plugin]\n// New set of active plugins.\n\n\nEditorState.prototype.reconfigure = function reconfigure(config) {\n var $config = new Configuration(config.schema || this.schema, config.plugins);\n var fields = $config.fields,\n instance = new EditorState($config);\n\n for (var i = 0; i < fields.length; i++) {\n var name = fields[i].name;\n instance[name] = this.hasOwnProperty(name) ? this[name] : fields[i].init(config, instance);\n }\n\n return instance;\n}; // :: (?union, string, number>) → Object\n// Serialize this state to JSON. If you want to serialize the state\n// of plugins, pass an object mapping property names to use in the\n// resulting JSON object to plugin objects. The argument may also be\n// a string or number, in which case it is ignored, to support the\n// way `JSON.stringify` calls `toString` methods.\n\n\nEditorState.prototype.toJSON = function toJSON(pluginFields) {\n var result = {\n doc: this.doc.toJSON(),\n selection: this.selection.toJSON()\n };\n\n if (this.storedMarks) {\n result.storedMarks = this.storedMarks.map(function (m) {\n return m.toJSON();\n });\n }\n\n if (pluginFields && _typeof(pluginFields) == 'object') {\n for (var prop in pluginFields) {\n if (prop == \"doc\" || prop == \"selection\") {\n throw new RangeError(\"The JSON fields `doc` and `selection` are reserved\");\n }\n\n var plugin = pluginFields[prop],\n state = plugin.spec.state;\n\n if (state && state.toJSON) {\n result[prop] = state.toJSON.call(plugin, this[plugin.key]);\n }\n }\n }\n\n return result;\n}; // :: (Object, Object, ?Object) → EditorState\n// Deserialize a JSON representation of a state. `config` should\n// have at least a `schema` field, and should contain array of\n// plugins to initialize the state with. `pluginFields` can be used\n// to deserialize the state of plugins, by associating plugin\n// instances with the property names they use in the JSON object.\n//\n// config::- configuration options\n//\n// schema:: Schema\n// The schema to use.\n//\n// plugins:: ?[Plugin]\n// The set of active plugins.\n\n\nEditorState.fromJSON = function fromJSON(config, json, pluginFields) {\n if (!json) {\n throw new RangeError(\"Invalid input for EditorState.fromJSON\");\n }\n\n if (!config.schema) {\n throw new RangeError(\"Required config field 'schema' missing\");\n }\n\n var $config = new Configuration(config.schema, config.plugins);\n var instance = new EditorState($config);\n $config.fields.forEach(function (field) {\n if (field.name == \"doc\") {\n instance.doc = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Node\"].fromJSON(config.schema, json.doc);\n } else if (field.name == \"selection\") {\n instance.selection = Selection.fromJSON(instance.doc, json.selection);\n } else if (field.name == \"storedMarks\") {\n if (json.storedMarks) {\n instance.storedMarks = json.storedMarks.map(config.schema.markFromJSON);\n }\n } else {\n if (pluginFields) {\n for (var prop in pluginFields) {\n var plugin = pluginFields[prop],\n state = plugin.spec.state;\n\n if (plugin.key == field.name && state && state.fromJSON && Object.prototype.hasOwnProperty.call(json, prop)) {\n // This field belongs to a plugin mapped to a JSON field, read it from there.\n instance[field.name] = state.fromJSON.call(plugin, config, json[prop], instance);\n return;\n }\n }\n }\n\n instance[field.name] = field.init(config, instance);\n }\n });\n return instance;\n}; // Kludge to allow the view to track mappings between different\n// instances of a state.\n//\n// FIXME this is no longer needed as of prosemirror-view 1.9.0,\n// though due to backwards-compat we should probably keep it around\n// for a while (if only as a no-op)\n\n\nEditorState.addApplyListener = function addApplyListener(f) {\n applyListeners.push(f);\n};\n\nEditorState.removeApplyListener = function removeApplyListener(f) {\n var found = applyListeners.indexOf(f);\n\n if (found > -1) {\n applyListeners.splice(found, 1);\n }\n};\n\nObject.defineProperties(EditorState.prototype, prototypeAccessors$1);\nvar applyListeners = []; // PluginSpec:: interface\n//\n// This is the type passed to the [`Plugin`](#state.Plugin)\n// constructor. It provides a definition for a plugin.\n//\n// props:: ?EditorProps\n// The [view props](#view.EditorProps) added by this plugin. Props\n// that are functions will be bound to have the plugin instance as\n// their `this` binding.\n//\n// state:: ?StateField\n// Allows a plugin to define a [state field](#state.StateField), an\n// extra slot in the state object in which it can keep its own data.\n//\n// key:: ?PluginKey\n// Can be used to make this a keyed plugin. You can have only one\n// plugin with a given key in a given state, but it is possible to\n// access the plugin's configuration and state through the key,\n// without having access to the plugin instance object.\n//\n// view:: ?(EditorView) → Object\n// When the plugin needs to interact with the editor view, or\n// set something up in the DOM, use this field. The function\n// will be called when the plugin's state is associated with an\n// editor view.\n//\n// return::-\n// Should return an object with the following optional\n// properties:\n//\n// update:: ?(view: EditorView, prevState: EditorState)\n// Called whenever the view's state is updated.\n//\n// destroy:: ?()\n// Called when the view is destroyed or receives a state\n// with different plugins.\n//\n// filterTransaction:: ?(Transaction, EditorState) → bool\n// When present, this will be called before a transaction is\n// applied by the state, allowing the plugin to cancel it (by\n// returning false).\n//\n// appendTransaction:: ?(transactions: [Transaction], oldState: EditorState, newState: EditorState) → ?Transaction\n// Allows the plugin to append another transaction to be applied\n// after the given array of transactions. When another plugin\n// appends a transaction after this was called, it is called again\n// with the new state and new transactions—but only the new\n// transactions, i.e. it won't be passed transactions that it\n// already saw.\n\nfunction bindProps(obj, self, target) {\n for (var prop in obj) {\n var val = obj[prop];\n\n if (val instanceof Function) {\n val = val.bind(self);\n } else if (prop == \"handleDOMEvents\") {\n val = bindProps(val, self, {});\n }\n\n target[prop] = val;\n }\n\n return target;\n} // ::- Plugins bundle functionality that can be added to an editor.\n// They are part of the [editor state](#state.EditorState) and\n// may influence that state and the view that contains it.\n\n\nvar Plugin = function Plugin(spec) {\n // :: EditorProps\n // The [props](#view.EditorProps) exported by this plugin.\n this.props = {};\n\n if (spec.props) {\n bindProps(spec.props, this, this.props);\n } // :: Object\n // The plugin's [spec object](#state.PluginSpec).\n\n\n this.spec = spec;\n this.key = spec.key ? spec.key.key : createKey(\"plugin\");\n}; // :: (EditorState) → any\n// Extract the plugin's state field from an editor state.\n\n\nPlugin.prototype.getState = function getState(state) {\n return state[this.key];\n}; // StateField:: interface\n// A plugin spec may provide a state field (under its\n// [`state`](#state.PluginSpec.state) property) of this type, which\n// describes the state it wants to keep. Functions provided here are\n// always called with the plugin instance as their `this` binding.\n//\n// init:: (config: Object, instance: EditorState) → T\n// Initialize the value of the field. `config` will be the object\n// passed to [`EditorState.create`](#state.EditorState^create). Note\n// that `instance` is a half-initialized state instance, and will\n// not have values for plugin fields initialized after this one.\n//\n// apply:: (tr: Transaction, value: T, oldState: EditorState, newState: EditorState) → T\n// Apply the given transaction to this state field, producing a new\n// field value. Note that the `newState` argument is again a partially\n// constructed state does not yet contain the state from plugins\n// coming after this one.\n//\n// toJSON:: ?(value: T) → *\n// Convert this field to JSON. Optional, can be left off to disable\n// JSON serialization for the field.\n//\n// fromJSON:: ?(config: Object, value: *, state: EditorState) → T\n// Deserialize the JSON representation of this field. Note that the\n// `state` argument is again a half-initialized state.\n\n\nvar keys = Object.create(null);\n\nfunction createKey(name) {\n if (name in keys) {\n return name + \"$\" + ++keys[name];\n }\n\n keys[name] = 0;\n return name + \"$\";\n} // ::- A key is used to [tag](#state.PluginSpec.key)\n// plugins in a way that makes it possible to find them, given an\n// editor state. Assigning a key does mean only one plugin of that\n// type can be active in a state.\n\n\nvar PluginKey = function PluginKey(name) {\n if (name === void 0) name = \"key\";\n this.key = createKey(name);\n}; // :: (EditorState) → ?Plugin\n// Get the active plugin with this key, if any, from an editor\n// state.\n\n\nPluginKey.prototype.get = function get(state) {\n return state.config.pluginsByKey[this.key];\n}; // :: (EditorState) → ?any\n// Get the plugin's state from an editor state.\n\n\nPluginKey.prototype.getState = function getState(state) {\n return state[this.key];\n};\n\n\n\n//# sourceURL=webpack:///./node_modules/prosemirror-state/dist/index.es.js?"); - -/***/ }), - -/***/ "./node_modules/prosemirror-transform/dist/index.es.js": -/*!*************************************************************!*\ - !*** ./node_modules/prosemirror-transform/dist/index.es.js ***! - \*************************************************************/ -/*! exports provided: AddMarkStep, MapResult, Mapping, RemoveMarkStep, ReplaceAroundStep, ReplaceStep, Step, StepMap, StepResult, Transform, TransformError, canJoin, canSplit, dropPoint, findWrapping, insertPoint, joinPoint, liftTarget, replaceStep */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"AddMarkStep\", function() { return AddMarkStep; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"MapResult\", function() { return MapResult; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Mapping\", function() { return Mapping; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"RemoveMarkStep\", function() { return RemoveMarkStep; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ReplaceAroundStep\", function() { return ReplaceAroundStep; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ReplaceStep\", function() { return ReplaceStep; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Step\", function() { return Step; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"StepMap\", function() { return StepMap; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"StepResult\", function() { return StepResult; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Transform\", function() { return Transform; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"TransformError\", function() { return TransformError; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"canJoin\", function() { return canJoin; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"canSplit\", function() { return canSplit; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"dropPoint\", function() { return dropPoint; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"findWrapping\", function() { return findWrapping; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"insertPoint\", function() { return insertPoint; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"joinPoint\", function() { return joinPoint; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"liftTarget\", function() { return liftTarget; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"replaceStep\", function() { return replaceStep; });\n/* harmony import */ var prosemirror_model__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prosemirror-model */ \"./node_modules/prosemirror-model/dist/index.es.js\");\n // Mappable:: interface\n// There are several things that positions can be mapped through.\n// Such objects conform to this interface.\n//\n// map:: (pos: number, assoc: ?number) → number\n// Map a position through this object. When given, `assoc` (should\n// be -1 or 1, defaults to 1) determines with which side the\n// position is associated, which determines in which direction to\n// move when a chunk of content is inserted at the mapped position.\n//\n// mapResult:: (pos: number, assoc: ?number) → MapResult\n// Map a position, and return an object containing additional\n// information about the mapping. The result's `deleted` field tells\n// you whether the position was deleted (completely enclosed in a\n// replaced range) during the mapping. When content on only one side\n// is deleted, the position itself is only considered deleted when\n// `assoc` points in the direction of the deleted content.\n// Recovery values encode a range index and an offset. They are\n// represented as numbers, because tons of them will be created when\n// mapping, for example, a large number of decorations. The number's\n// lower 16 bits provide the index, the remaining bits the offset.\n//\n// Note: We intentionally don't use bit shift operators to en- and\n// decode these, since those clip to 32 bits, which we might in rare\n// cases want to overflow. A 64-bit float can represent 48-bit\n// integers precisely.\n\nvar lower16 = 0xffff;\nvar factor16 = Math.pow(2, 16);\n\nfunction makeRecover(index, offset) {\n return index + offset * factor16;\n}\n\nfunction recoverIndex(value) {\n return value & lower16;\n}\n\nfunction recoverOffset(value) {\n return (value - (value & lower16)) / factor16;\n} // ::- An object representing a mapped position with extra\n// information.\n\n\nvar MapResult = function MapResult(pos, deleted, recover) {\n if (deleted === void 0) deleted = false;\n if (recover === void 0) recover = null; // :: number The mapped version of the position.\n\n this.pos = pos; // :: bool Tells you whether the position was deleted, that is,\n // whether the step removed its surroundings from the document.\n\n this.deleted = deleted;\n this.recover = recover;\n}; // :: class extends Mappable\n// A map describing the deletions and insertions made by a step, which\n// can be used to find the correspondence between positions in the\n// pre-step version of a document and the same position in the\n// post-step version.\n\n\nvar StepMap = function StepMap(ranges, inverted) {\n if (inverted === void 0) inverted = false;\n this.ranges = ranges;\n this.inverted = inverted;\n};\n\nStepMap.prototype.recover = function recover(value) {\n var diff = 0,\n index = recoverIndex(value);\n\n if (!this.inverted) {\n for (var i = 0; i < index; i++) {\n diff += this.ranges[i * 3 + 2] - this.ranges[i * 3 + 1];\n }\n }\n\n return this.ranges[index * 3] + diff + recoverOffset(value);\n}; // : (number, ?number) → MapResult\n\n\nStepMap.prototype.mapResult = function mapResult(pos, assoc) {\n if (assoc === void 0) assoc = 1;\n return this._map(pos, assoc, false);\n}; // : (number, ?number) → number\n\n\nStepMap.prototype.map = function map(pos, assoc) {\n if (assoc === void 0) assoc = 1;\n return this._map(pos, assoc, true);\n};\n\nStepMap.prototype._map = function _map(pos, assoc, simple) {\n var diff = 0,\n oldIndex = this.inverted ? 2 : 1,\n newIndex = this.inverted ? 1 : 2;\n\n for (var i = 0; i < this.ranges.length; i += 3) {\n var start = this.ranges[i] - (this.inverted ? diff : 0);\n\n if (start > pos) {\n break;\n }\n\n var oldSize = this.ranges[i + oldIndex],\n newSize = this.ranges[i + newIndex],\n end = start + oldSize;\n\n if (pos <= end) {\n var side = !oldSize ? assoc : pos == start ? -1 : pos == end ? 1 : assoc;\n var result = start + diff + (side < 0 ? 0 : newSize);\n\n if (simple) {\n return result;\n }\n\n var recover = makeRecover(i / 3, pos - start);\n return new MapResult(result, assoc < 0 ? pos != start : pos != end, recover);\n }\n\n diff += newSize - oldSize;\n }\n\n return simple ? pos + diff : new MapResult(pos + diff);\n};\n\nStepMap.prototype.touches = function touches(pos, recover) {\n var diff = 0,\n index = recoverIndex(recover);\n var oldIndex = this.inverted ? 2 : 1,\n newIndex = this.inverted ? 1 : 2;\n\n for (var i = 0; i < this.ranges.length; i += 3) {\n var start = this.ranges[i] - (this.inverted ? diff : 0);\n\n if (start > pos) {\n break;\n }\n\n var oldSize = this.ranges[i + oldIndex],\n end = start + oldSize;\n\n if (pos <= end && i == index * 3) {\n return true;\n }\n\n diff += this.ranges[i + newIndex] - oldSize;\n }\n\n return false;\n}; // :: ((oldStart: number, oldEnd: number, newStart: number, newEnd: number))\n// Calls the given function on each of the changed ranges included in\n// this map.\n\n\nStepMap.prototype.forEach = function forEach(f) {\n var oldIndex = this.inverted ? 2 : 1,\n newIndex = this.inverted ? 1 : 2;\n\n for (var i = 0, diff = 0; i < this.ranges.length; i += 3) {\n var start = this.ranges[i],\n oldStart = start - (this.inverted ? diff : 0),\n newStart = start + (this.inverted ? 0 : diff);\n var oldSize = this.ranges[i + oldIndex],\n newSize = this.ranges[i + newIndex];\n f(oldStart, oldStart + oldSize, newStart, newStart + newSize);\n diff += newSize - oldSize;\n }\n}; // :: () → StepMap\n// Create an inverted version of this map. The result can be used to\n// map positions in the post-step document to the pre-step document.\n\n\nStepMap.prototype.invert = function invert() {\n return new StepMap(this.ranges, !this.inverted);\n};\n\nStepMap.prototype.toString = function toString() {\n return (this.inverted ? \"-\" : \"\") + JSON.stringify(this.ranges);\n}; // :: (n: number) → StepMap\n// Create a map that moves all positions by offset `n` (which may be\n// negative). This can be useful when applying steps meant for a\n// sub-document to a larger document, or vice-versa.\n\n\nStepMap.offset = function offset(n) {\n return n == 0 ? StepMap.empty : new StepMap(n < 0 ? [0, -n, 0] : [0, 0, n]);\n};\n\nStepMap.empty = new StepMap([]); // :: class extends Mappable\n// A mapping represents a pipeline of zero or more [step\n// maps](#transform.StepMap). It has special provisions for losslessly\n// handling mapping positions through a series of steps in which some\n// steps are inverted versions of earlier steps. (This comes up when\n// ‘[rebasing](/docs/guide/#transform.rebasing)’ steps for\n// collaboration or history management.)\n\nvar Mapping = function Mapping(maps, mirror, from, to) {\n // :: [StepMap]\n // The step maps in this mapping.\n this.maps = maps || []; // :: number\n // The starting position in the `maps` array, used when `map` or\n // `mapResult` is called.\n\n this.from = from || 0; // :: number\n // The end position in the `maps` array.\n\n this.to = to == null ? this.maps.length : to;\n this.mirror = mirror;\n}; // :: (?number, ?number) → Mapping\n// Create a mapping that maps only through a part of this one.\n\n\nMapping.prototype.slice = function slice(from, to) {\n if (from === void 0) from = 0;\n if (to === void 0) to = this.maps.length;\n return new Mapping(this.maps, this.mirror, from, to);\n};\n\nMapping.prototype.copy = function copy() {\n return new Mapping(this.maps.slice(), this.mirror && this.mirror.slice(), this.from, this.to);\n}; // :: (StepMap, ?number)\n// Add a step map to the end of this mapping. If `mirrors` is\n// given, it should be the index of the step map that is the mirror\n// image of this one.\n\n\nMapping.prototype.appendMap = function appendMap(map, mirrors) {\n this.to = this.maps.push(map);\n\n if (mirrors != null) {\n this.setMirror(this.maps.length - 1, mirrors);\n }\n}; // :: (Mapping)\n// Add all the step maps in a given mapping to this one (preserving\n// mirroring information).\n\n\nMapping.prototype.appendMapping = function appendMapping(mapping) {\n for (var i = 0, startSize = this.maps.length; i < mapping.maps.length; i++) {\n var mirr = mapping.getMirror(i);\n this.appendMap(mapping.maps[i], mirr != null && mirr < i ? startSize + mirr : null);\n }\n}; // :: (number) → ?number\n// Finds the offset of the step map that mirrors the map at the\n// given offset, in this mapping (as per the second argument to\n// `appendMap`).\n\n\nMapping.prototype.getMirror = function getMirror(n) {\n if (this.mirror) {\n for (var i = 0; i < this.mirror.length; i++) {\n if (this.mirror[i] == n) {\n return this.mirror[i + (i % 2 ? -1 : 1)];\n }\n }\n }\n};\n\nMapping.prototype.setMirror = function setMirror(n, m) {\n if (!this.mirror) {\n this.mirror = [];\n }\n\n this.mirror.push(n, m);\n}; // :: (Mapping)\n// Append the inverse of the given mapping to this one.\n\n\nMapping.prototype.appendMappingInverted = function appendMappingInverted(mapping) {\n for (var i = mapping.maps.length - 1, totalSize = this.maps.length + mapping.maps.length; i >= 0; i--) {\n var mirr = mapping.getMirror(i);\n this.appendMap(mapping.maps[i].invert(), mirr != null && mirr > i ? totalSize - mirr - 1 : null);\n }\n}; // :: () → Mapping\n// Create an inverted version of this mapping.\n\n\nMapping.prototype.invert = function invert() {\n var inverse = new Mapping();\n inverse.appendMappingInverted(this);\n return inverse;\n}; // : (number, ?number) → number\n// Map a position through this mapping.\n\n\nMapping.prototype.map = function map(pos, assoc) {\n if (assoc === void 0) assoc = 1;\n\n if (this.mirror) {\n return this._map(pos, assoc, true);\n }\n\n for (var i = this.from; i < this.to; i++) {\n pos = this.maps[i].map(pos, assoc);\n }\n\n return pos;\n}; // : (number, ?number) → MapResult\n// Map a position through this mapping, returning a mapping\n// result.\n\n\nMapping.prototype.mapResult = function mapResult(pos, assoc) {\n if (assoc === void 0) assoc = 1;\n return this._map(pos, assoc, false);\n};\n\nMapping.prototype._map = function _map(pos, assoc, simple) {\n var deleted = false,\n recoverables = null;\n\n for (var i = this.from; i < this.to; i++) {\n var map = this.maps[i],\n rec = recoverables && recoverables[i];\n\n if (rec != null && map.touches(pos, rec)) {\n pos = map.recover(rec);\n continue;\n }\n\n var result = map.mapResult(pos, assoc);\n\n if (result.recover != null) {\n var corr = this.getMirror(i);\n\n if (corr != null && corr > i && corr < this.to) {\n if (result.deleted) {\n i = corr;\n pos = this.maps[corr].recover(result.recover);\n continue;\n } else {\n (recoverables || (recoverables = Object.create(null)))[corr] = result.recover;\n }\n }\n }\n\n if (result.deleted) {\n deleted = true;\n }\n\n pos = result.pos;\n }\n\n return simple ? pos : new MapResult(pos, deleted);\n};\n\nfunction TransformError(message) {\n var err = Error.call(this, message);\n err.__proto__ = TransformError.prototype;\n return err;\n}\n\nTransformError.prototype = Object.create(Error.prototype);\nTransformError.prototype.constructor = TransformError;\nTransformError.prototype.name = \"TransformError\"; // ::- Abstraction to build up and track an array of\n// [steps](#transform.Step) representing a document transformation.\n//\n// Most transforming methods return the `Transform` object itself, so\n// that they can be chained.\n\nvar Transform = function Transform(doc) {\n // :: Node\n // The current document (the result of applying the steps in the\n // transform).\n this.doc = doc; // :: [Step]\n // The steps in this transform.\n\n this.steps = []; // :: [Node]\n // The documents before each of the steps.\n\n this.docs = []; // :: Mapping\n // A mapping with the maps for each of the steps in this transform.\n\n this.mapping = new Mapping();\n};\n\nvar prototypeAccessors = {\n before: {\n configurable: true\n },\n docChanged: {\n configurable: true\n }\n}; // :: Node The starting document.\n\nprototypeAccessors.before.get = function () {\n return this.docs.length ? this.docs[0] : this.doc;\n}; // :: (step: Step) → this\n// Apply a new step in this transform, saving the result. Throws an\n// error when the step fails.\n\n\nTransform.prototype.step = function step(object) {\n var result = this.maybeStep(object);\n\n if (result.failed) {\n throw new TransformError(result.failed);\n }\n\n return this;\n}; // :: (Step) → StepResult\n// Try to apply a step in this transformation, ignoring it if it\n// fails. Returns the step result.\n\n\nTransform.prototype.maybeStep = function maybeStep(step) {\n var result = step.apply(this.doc);\n\n if (!result.failed) {\n this.addStep(step, result.doc);\n }\n\n return result;\n}; // :: bool\n// True when the document has been changed (when there are any\n// steps).\n\n\nprototypeAccessors.docChanged.get = function () {\n return this.steps.length > 0;\n};\n\nTransform.prototype.addStep = function addStep(step, doc) {\n this.docs.push(this.doc);\n this.steps.push(step);\n this.mapping.appendMap(step.getMap());\n this.doc = doc;\n};\n\nObject.defineProperties(Transform.prototype, prototypeAccessors);\n\nfunction mustOverride() {\n throw new Error(\"Override me\");\n}\n\nvar stepsByID = Object.create(null); // ::- A step object represents an atomic change. It generally applies\n// only to the document it was created for, since the positions\n// stored in it will only make sense for that document.\n//\n// New steps are defined by creating classes that extend `Step`,\n// overriding the `apply`, `invert`, `map`, `getMap` and `fromJSON`\n// methods, and registering your class with a unique\n// JSON-serialization identifier using\n// [`Step.jsonID`](#transform.Step^jsonID).\n\nvar Step = function Step() {};\n\nStep.prototype.apply = function apply(_doc) {\n return mustOverride();\n}; // :: () → StepMap\n// Get the step map that represents the changes made by this step,\n// and which can be used to transform between positions in the old\n// and the new document.\n\n\nStep.prototype.getMap = function getMap() {\n return StepMap.empty;\n}; // :: (doc: Node) → Step\n// Create an inverted version of this step. Needs the document as it\n// was before the step as argument.\n\n\nStep.prototype.invert = function invert(_doc) {\n return mustOverride();\n}; // :: (mapping: Mappable) → ?Step\n// Map this step through a mappable thing, returning either a\n// version of that step with its positions adjusted, or `null` if\n// the step was entirely deleted by the mapping.\n\n\nStep.prototype.map = function map(_mapping) {\n return mustOverride();\n}; // :: (other: Step) → ?Step\n// Try to merge this step with another one, to be applied directly\n// after it. Returns the merged step when possible, null if the\n// steps can't be merged.\n\n\nStep.prototype.merge = function merge(_other) {\n return null;\n}; // :: () → Object\n// Create a JSON-serializeable representation of this step. When\n// defining this for a custom subclass, make sure the result object\n// includes the step type's [JSON id](#transform.Step^jsonID) under\n// the `stepType` property.\n\n\nStep.prototype.toJSON = function toJSON() {\n return mustOverride();\n}; // :: (Schema, Object) → Step\n// Deserialize a step from its JSON representation. Will call\n// through to the step class' own implementation of this method.\n\n\nStep.fromJSON = function fromJSON(schema, json) {\n if (!json || !json.stepType) {\n throw new RangeError(\"Invalid input for Step.fromJSON\");\n }\n\n var type = stepsByID[json.stepType];\n\n if (!type) {\n throw new RangeError(\"No step type \" + json.stepType + \" defined\");\n }\n\n return type.fromJSON(schema, json);\n}; // :: (string, constructor)\n// To be able to serialize steps to JSON, each step needs a string\n// ID to attach to its JSON representation. Use this method to\n// register an ID for your step classes. Try to pick something\n// that's unlikely to clash with steps from other modules.\n\n\nStep.jsonID = function jsonID(id, stepClass) {\n if (id in stepsByID) {\n throw new RangeError(\"Duplicate use of step JSON ID \" + id);\n }\n\n stepsByID[id] = stepClass;\n stepClass.prototype.jsonID = id;\n return stepClass;\n}; // ::- The result of [applying](#transform.Step.apply) a step. Contains either a\n// new document or a failure value.\n\n\nvar StepResult = function StepResult(doc, failed) {\n // :: ?Node The transformed document.\n this.doc = doc; // :: ?string Text providing information about a failed step.\n\n this.failed = failed;\n}; // :: (Node) → StepResult\n// Create a successful step result.\n\n\nStepResult.ok = function ok(doc) {\n return new StepResult(doc, null);\n}; // :: (string) → StepResult\n// Create a failed step result.\n\n\nStepResult.fail = function fail(message) {\n return new StepResult(null, message);\n}; // :: (Node, number, number, Slice) → StepResult\n// Call [`Node.replace`](#model.Node.replace) with the given\n// arguments. Create a successful result if it succeeds, and a\n// failed one if it throws a `ReplaceError`.\n\n\nStepResult.fromReplace = function fromReplace(doc, from, to, slice) {\n try {\n return StepResult.ok(doc.replace(from, to, slice));\n } catch (e) {\n if (e instanceof prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"ReplaceError\"]) {\n return StepResult.fail(e.message);\n }\n\n throw e;\n }\n}; // ::- Replace a part of the document with a slice of new content.\n\n\nvar ReplaceStep = /*@__PURE__*/function (Step) {\n function ReplaceStep(from, to, slice, structure) {\n Step.call(this);\n this.from = from;\n this.to = to;\n this.slice = slice;\n this.structure = !!structure;\n }\n\n if (Step) ReplaceStep.__proto__ = Step;\n ReplaceStep.prototype = Object.create(Step && Step.prototype);\n ReplaceStep.prototype.constructor = ReplaceStep;\n\n ReplaceStep.prototype.apply = function apply(doc) {\n if (this.structure && contentBetween(doc, this.from, this.to)) {\n return StepResult.fail(\"Structure replace would overwrite content\");\n }\n\n return StepResult.fromReplace(doc, this.from, this.to, this.slice);\n };\n\n ReplaceStep.prototype.getMap = function getMap() {\n return new StepMap([this.from, this.to - this.from, this.slice.size]);\n };\n\n ReplaceStep.prototype.invert = function invert(doc) {\n return new ReplaceStep(this.from, this.from + this.slice.size, doc.slice(this.from, this.to));\n };\n\n ReplaceStep.prototype.map = function map(mapping) {\n var from = mapping.mapResult(this.from, 1),\n to = mapping.mapResult(this.to, -1);\n\n if (from.deleted && to.deleted) {\n return null;\n }\n\n return new ReplaceStep(from.pos, Math.max(from.pos, to.pos), this.slice);\n };\n\n ReplaceStep.prototype.merge = function merge(other) {\n if (!(other instanceof ReplaceStep) || other.structure != this.structure) {\n return null;\n }\n\n if (this.from + this.slice.size == other.from && !this.slice.openEnd && !other.slice.openStart) {\n var slice = this.slice.size + other.slice.size == 0 ? prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"].empty : new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](this.slice.content.append(other.slice.content), this.slice.openStart, other.slice.openEnd);\n return new ReplaceStep(this.from, this.to + (other.to - other.from), slice, this.structure);\n } else if (other.to == this.from && !this.slice.openStart && !other.slice.openEnd) {\n var slice$1 = this.slice.size + other.slice.size == 0 ? prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"].empty : new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](other.slice.content.append(this.slice.content), other.slice.openStart, this.slice.openEnd);\n return new ReplaceStep(other.from, this.to, slice$1, this.structure);\n } else {\n return null;\n }\n };\n\n ReplaceStep.prototype.toJSON = function toJSON() {\n var json = {\n stepType: \"replace\",\n from: this.from,\n to: this.to\n };\n\n if (this.slice.size) {\n json.slice = this.slice.toJSON();\n }\n\n if (this.structure) {\n json.structure = true;\n }\n\n return json;\n };\n\n ReplaceStep.fromJSON = function fromJSON(schema, json) {\n if (typeof json.from != \"number\" || typeof json.to != \"number\") {\n throw new RangeError(\"Invalid input for ReplaceStep.fromJSON\");\n }\n\n return new ReplaceStep(json.from, json.to, prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"].fromJSON(schema, json.slice), !!json.structure);\n };\n\n return ReplaceStep;\n}(Step);\n\nStep.jsonID(\"replace\", ReplaceStep); // ::- Replace a part of the document with a slice of content, but\n// preserve a range of the replaced content by moving it into the\n// slice.\n\nvar ReplaceAroundStep = /*@__PURE__*/function (Step) {\n function ReplaceAroundStep(from, to, gapFrom, gapTo, slice, insert, structure) {\n Step.call(this);\n this.from = from;\n this.to = to;\n this.gapFrom = gapFrom;\n this.gapTo = gapTo;\n this.slice = slice;\n this.insert = insert;\n this.structure = !!structure;\n }\n\n if (Step) ReplaceAroundStep.__proto__ = Step;\n ReplaceAroundStep.prototype = Object.create(Step && Step.prototype);\n ReplaceAroundStep.prototype.constructor = ReplaceAroundStep;\n\n ReplaceAroundStep.prototype.apply = function apply(doc) {\n if (this.structure && (contentBetween(doc, this.from, this.gapFrom) || contentBetween(doc, this.gapTo, this.to))) {\n return StepResult.fail(\"Structure gap-replace would overwrite content\");\n }\n\n var gap = doc.slice(this.gapFrom, this.gapTo);\n\n if (gap.openStart || gap.openEnd) {\n return StepResult.fail(\"Gap is not a flat range\");\n }\n\n var inserted = this.slice.insertAt(this.insert, gap.content);\n\n if (!inserted) {\n return StepResult.fail(\"Content does not fit in gap\");\n }\n\n return StepResult.fromReplace(doc, this.from, this.to, inserted);\n };\n\n ReplaceAroundStep.prototype.getMap = function getMap() {\n return new StepMap([this.from, this.gapFrom - this.from, this.insert, this.gapTo, this.to - this.gapTo, this.slice.size - this.insert]);\n };\n\n ReplaceAroundStep.prototype.invert = function invert(doc) {\n var gap = this.gapTo - this.gapFrom;\n return new ReplaceAroundStep(this.from, this.from + this.slice.size + gap, this.from + this.insert, this.from + this.insert + gap, doc.slice(this.from, this.to).removeBetween(this.gapFrom - this.from, this.gapTo - this.from), this.gapFrom - this.from, this.structure);\n };\n\n ReplaceAroundStep.prototype.map = function map(mapping) {\n var from = mapping.mapResult(this.from, 1),\n to = mapping.mapResult(this.to, -1);\n var gapFrom = mapping.map(this.gapFrom, -1),\n gapTo = mapping.map(this.gapTo, 1);\n\n if (from.deleted && to.deleted || gapFrom < from.pos || gapTo > to.pos) {\n return null;\n }\n\n return new ReplaceAroundStep(from.pos, to.pos, gapFrom, gapTo, this.slice, this.insert, this.structure);\n };\n\n ReplaceAroundStep.prototype.toJSON = function toJSON() {\n var json = {\n stepType: \"replaceAround\",\n from: this.from,\n to: this.to,\n gapFrom: this.gapFrom,\n gapTo: this.gapTo,\n insert: this.insert\n };\n\n if (this.slice.size) {\n json.slice = this.slice.toJSON();\n }\n\n if (this.structure) {\n json.structure = true;\n }\n\n return json;\n };\n\n ReplaceAroundStep.fromJSON = function fromJSON(schema, json) {\n if (typeof json.from != \"number\" || typeof json.to != \"number\" || typeof json.gapFrom != \"number\" || typeof json.gapTo != \"number\" || typeof json.insert != \"number\") {\n throw new RangeError(\"Invalid input for ReplaceAroundStep.fromJSON\");\n }\n\n return new ReplaceAroundStep(json.from, json.to, json.gapFrom, json.gapTo, prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"].fromJSON(schema, json.slice), json.insert, !!json.structure);\n };\n\n return ReplaceAroundStep;\n}(Step);\n\nStep.jsonID(\"replaceAround\", ReplaceAroundStep);\n\nfunction contentBetween(doc, from, to) {\n var $from = doc.resolve(from),\n dist = to - from,\n depth = $from.depth;\n\n while (dist > 0 && depth > 0 && $from.indexAfter(depth) == $from.node(depth).childCount) {\n depth--;\n dist--;\n }\n\n if (dist > 0) {\n var next = $from.node(depth).maybeChild($from.indexAfter(depth));\n\n while (dist > 0) {\n if (!next || next.isLeaf) {\n return true;\n }\n\n next = next.firstChild;\n dist--;\n }\n }\n\n return false;\n}\n\nfunction canCut(node, start, end) {\n return (start == 0 || node.canReplace(start, node.childCount)) && (end == node.childCount || node.canReplace(0, end));\n} // :: (NodeRange) → ?number\n// Try to find a target depth to which the content in the given range\n// can be lifted. Will not go across\n// [isolating](#model.NodeSpec.isolating) parent nodes.\n\n\nfunction liftTarget(range) {\n var parent = range.parent;\n var content = parent.content.cutByIndex(range.startIndex, range.endIndex);\n\n for (var depth = range.depth;; --depth) {\n var node = range.$from.node(depth);\n var index = range.$from.index(depth),\n endIndex = range.$to.indexAfter(depth);\n\n if (depth < range.depth && node.canReplace(index, endIndex, content)) {\n return depth;\n }\n\n if (depth == 0 || node.type.spec.isolating || !canCut(node, index, endIndex)) {\n break;\n }\n }\n} // :: (NodeRange, number) → this\n// Split the content in the given range off from its parent, if there\n// is sibling content before or after it, and move it up the tree to\n// the depth specified by `target`. You'll probably want to use\n// [`liftTarget`](#transform.liftTarget) to compute `target`, to make\n// sure the lift is valid.\n\n\nTransform.prototype.lift = function (range, target) {\n var $from = range.$from;\n var $to = range.$to;\n var depth = range.depth;\n var gapStart = $from.before(depth + 1),\n gapEnd = $to.after(depth + 1);\n var start = gapStart,\n end = gapEnd;\n var before = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].empty,\n openStart = 0;\n\n for (var d = depth, splitting = false; d > target; d--) {\n if (splitting || $from.index(d) > 0) {\n splitting = true;\n before = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].from($from.node(d).copy(before));\n openStart++;\n } else {\n start--;\n }\n }\n\n var after = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].empty,\n openEnd = 0;\n\n for (var d$1 = depth, splitting$1 = false; d$1 > target; d$1--) {\n if (splitting$1 || $to.after(d$1 + 1) < $to.end(d$1)) {\n splitting$1 = true;\n after = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].from($to.node(d$1).copy(after));\n openEnd++;\n } else {\n end++;\n }\n }\n\n return this.step(new ReplaceAroundStep(start, end, gapStart, gapEnd, new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](before.append(after), openStart, openEnd), before.size - openStart, true));\n}; // :: (NodeRange, NodeType, ?Object, ?NodeRange) → ?[{type: NodeType, attrs: ?Object}]\n// Try to find a valid way to wrap the content in the given range in a\n// node of the given type. May introduce extra nodes around and inside\n// the wrapper node, if necessary. Returns null if no valid wrapping\n// could be found. When `innerRange` is given, that range's content is\n// used as the content to fit into the wrapping, instead of the\n// content of `range`.\n\n\nfunction findWrapping(range, nodeType, attrs, innerRange) {\n if (innerRange === void 0) innerRange = range;\n var around = findWrappingOutside(range, nodeType);\n var inner = around && findWrappingInside(innerRange, nodeType);\n\n if (!inner) {\n return null;\n }\n\n return around.map(withAttrs).concat({\n type: nodeType,\n attrs: attrs\n }).concat(inner.map(withAttrs));\n}\n\nfunction withAttrs(type) {\n return {\n type: type,\n attrs: null\n };\n}\n\nfunction findWrappingOutside(range, type) {\n var parent = range.parent;\n var startIndex = range.startIndex;\n var endIndex = range.endIndex;\n var around = parent.contentMatchAt(startIndex).findWrapping(type);\n\n if (!around) {\n return null;\n }\n\n var outer = around.length ? around[0] : type;\n return parent.canReplaceWith(startIndex, endIndex, outer) ? around : null;\n}\n\nfunction findWrappingInside(range, type) {\n var parent = range.parent;\n var startIndex = range.startIndex;\n var endIndex = range.endIndex;\n var inner = parent.child(startIndex);\n var inside = type.contentMatch.findWrapping(inner.type);\n\n if (!inside) {\n return null;\n }\n\n var lastType = inside.length ? inside[inside.length - 1] : type;\n var innerMatch = lastType.contentMatch;\n\n for (var i = startIndex; innerMatch && i < endIndex; i++) {\n innerMatch = innerMatch.matchType(parent.child(i).type);\n }\n\n if (!innerMatch || !innerMatch.validEnd) {\n return null;\n }\n\n return inside;\n} // :: (NodeRange, [{type: NodeType, attrs: ?Object}]) → this\n// Wrap the given [range](#model.NodeRange) in the given set of wrappers.\n// The wrappers are assumed to be valid in this position, and should\n// probably be computed with [`findWrapping`](#transform.findWrapping).\n\n\nTransform.prototype.wrap = function (range, wrappers) {\n var content = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].empty;\n\n for (var i = wrappers.length - 1; i >= 0; i--) {\n content = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].from(wrappers[i].type.create(wrappers[i].attrs, content));\n }\n\n var start = range.start,\n end = range.end;\n return this.step(new ReplaceAroundStep(start, end, start, end, new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](content, 0, 0), wrappers.length, true));\n}; // :: (number, ?number, NodeType, ?Object) → this\n// Set the type of all textblocks (partly) between `from` and `to` to\n// the given node type with the given attributes.\n\n\nTransform.prototype.setBlockType = function (from, to, type, attrs) {\n var this$1 = this;\n if (to === void 0) to = from;\n\n if (!type.isTextblock) {\n throw new RangeError(\"Type given to setBlockType should be a textblock\");\n }\n\n var mapFrom = this.steps.length;\n this.doc.nodesBetween(from, to, function (node, pos) {\n if (node.isTextblock && !node.hasMarkup(type, attrs) && canChangeType(this$1.doc, this$1.mapping.slice(mapFrom).map(pos), type)) {\n // Ensure all markup that isn't allowed in the new node type is cleared\n this$1.clearIncompatible(this$1.mapping.slice(mapFrom).map(pos, 1), type);\n var mapping = this$1.mapping.slice(mapFrom);\n var startM = mapping.map(pos, 1),\n endM = mapping.map(pos + node.nodeSize, 1);\n this$1.step(new ReplaceAroundStep(startM, endM, startM + 1, endM - 1, new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].from(type.create(attrs, null, node.marks)), 0, 0), 1, true));\n return false;\n }\n });\n return this;\n};\n\nfunction canChangeType(doc, pos, type) {\n var $pos = doc.resolve(pos),\n index = $pos.index();\n return $pos.parent.canReplaceWith(index, index + 1, type);\n} // :: (number, ?NodeType, ?Object, ?[Mark]) → this\n// Change the type, attributes, and/or marks of the node at `pos`.\n// When `type` isn't given, the existing node type is preserved,\n\n\nTransform.prototype.setNodeMarkup = function (pos, type, attrs, marks) {\n var node = this.doc.nodeAt(pos);\n\n if (!node) {\n throw new RangeError(\"No node at given position\");\n }\n\n if (!type) {\n type = node.type;\n }\n\n var newNode = type.create(attrs, null, marks || node.marks);\n\n if (node.isLeaf) {\n return this.replaceWith(pos, pos + node.nodeSize, newNode);\n }\n\n if (!type.validContent(node.content)) {\n throw new RangeError(\"Invalid content for node type \" + type.name);\n }\n\n return this.step(new ReplaceAroundStep(pos, pos + node.nodeSize, pos + 1, pos + node.nodeSize - 1, new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].from(newNode), 0, 0), 1, true));\n}; // :: (Node, number, number, ?[?{type: NodeType, attrs: ?Object}]) → bool\n// Check whether splitting at the given position is allowed.\n\n\nfunction canSplit(doc, pos, depth, typesAfter) {\n if (depth === void 0) depth = 1;\n var $pos = doc.resolve(pos),\n base = $pos.depth - depth;\n var innerType = typesAfter && typesAfter[typesAfter.length - 1] || $pos.parent;\n\n if (base < 0 || $pos.parent.type.spec.isolating || !$pos.parent.canReplace($pos.index(), $pos.parent.childCount) || !innerType.type.validContent($pos.parent.content.cutByIndex($pos.index(), $pos.parent.childCount))) {\n return false;\n }\n\n for (var d = $pos.depth - 1, i = depth - 2; d > base; d--, i--) {\n var node = $pos.node(d),\n index$1 = $pos.index(d);\n\n if (node.type.spec.isolating) {\n return false;\n }\n\n var rest = node.content.cutByIndex(index$1, node.childCount);\n var after = typesAfter && typesAfter[i] || node;\n\n if (after != node) {\n rest = rest.replaceChild(0, after.type.create(after.attrs));\n }\n\n if (!node.canReplace(index$1 + 1, node.childCount) || !after.type.validContent(rest)) {\n return false;\n }\n }\n\n var index = $pos.indexAfter(base);\n var baseType = typesAfter && typesAfter[0];\n return $pos.node(base).canReplaceWith(index, index, baseType ? baseType.type : $pos.node(base + 1).type);\n} // :: (number, ?number, ?[?{type: NodeType, attrs: ?Object}]) → this\n// Split the node at the given position, and optionally, if `depth` is\n// greater than one, any number of nodes above that. By default, the\n// parts split off will inherit the node type of the original node.\n// This can be changed by passing an array of types and attributes to\n// use after the split.\n\n\nTransform.prototype.split = function (pos, depth, typesAfter) {\n if (depth === void 0) depth = 1;\n var $pos = this.doc.resolve(pos),\n before = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].empty,\n after = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].empty;\n\n for (var d = $pos.depth, e = $pos.depth - depth, i = depth - 1; d > e; d--, i--) {\n before = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].from($pos.node(d).copy(before));\n var typeAfter = typesAfter && typesAfter[i];\n after = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].from(typeAfter ? typeAfter.type.create(typeAfter.attrs, after) : $pos.node(d).copy(after));\n }\n\n return this.step(new ReplaceStep(pos, pos, new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](before.append(after), depth, depth), true));\n}; // :: (Node, number) → bool\n// Test whether the blocks before and after a given position can be\n// joined.\n\n\nfunction canJoin(doc, pos) {\n var $pos = doc.resolve(pos),\n index = $pos.index();\n return joinable($pos.nodeBefore, $pos.nodeAfter) && $pos.parent.canReplace(index, index + 1);\n}\n\nfunction joinable(a, b) {\n return a && b && !a.isLeaf && a.canAppend(b);\n} // :: (Node, number, ?number) → ?number\n// Find an ancestor of the given position that can be joined to the\n// block before (or after if `dir` is positive). Returns the joinable\n// point, if any.\n\n\nfunction joinPoint(doc, pos, dir) {\n if (dir === void 0) dir = -1;\n var $pos = doc.resolve(pos);\n\n for (var d = $pos.depth;; d--) {\n var before = void 0,\n after = void 0,\n index = $pos.index(d);\n\n if (d == $pos.depth) {\n before = $pos.nodeBefore;\n after = $pos.nodeAfter;\n } else if (dir > 0) {\n before = $pos.node(d + 1);\n index++;\n after = $pos.node(d).maybeChild(index);\n } else {\n before = $pos.node(d).maybeChild(index - 1);\n after = $pos.node(d + 1);\n }\n\n if (before && !before.isTextblock && joinable(before, after) && $pos.node(d).canReplace(index, index + 1)) {\n return pos;\n }\n\n if (d == 0) {\n break;\n }\n\n pos = dir < 0 ? $pos.before(d) : $pos.after(d);\n }\n} // :: (number, ?number) → this\n// Join the blocks around the given position. If depth is 2, their\n// last and first siblings are also joined, and so on.\n\n\nTransform.prototype.join = function (pos, depth) {\n if (depth === void 0) depth = 1;\n var step = new ReplaceStep(pos - depth, pos + depth, prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"].empty, true);\n return this.step(step);\n}; // :: (Node, number, NodeType) → ?number\n// Try to find a point where a node of the given type can be inserted\n// near `pos`, by searching up the node hierarchy when `pos` itself\n// isn't a valid place but is at the start or end of a node. Return\n// null if no position was found.\n\n\nfunction insertPoint(doc, pos, nodeType) {\n var $pos = doc.resolve(pos);\n\n if ($pos.parent.canReplaceWith($pos.index(), $pos.index(), nodeType)) {\n return pos;\n }\n\n if ($pos.parentOffset == 0) {\n for (var d = $pos.depth - 1; d >= 0; d--) {\n var index = $pos.index(d);\n\n if ($pos.node(d).canReplaceWith(index, index, nodeType)) {\n return $pos.before(d + 1);\n }\n\n if (index > 0) {\n return null;\n }\n }\n }\n\n if ($pos.parentOffset == $pos.parent.content.size) {\n for (var d$1 = $pos.depth - 1; d$1 >= 0; d$1--) {\n var index$1 = $pos.indexAfter(d$1);\n\n if ($pos.node(d$1).canReplaceWith(index$1, index$1, nodeType)) {\n return $pos.after(d$1 + 1);\n }\n\n if (index$1 < $pos.node(d$1).childCount) {\n return null;\n }\n }\n }\n} // :: (Node, number, Slice) → ?number\n// Finds a position at or around the given position where the given\n// slice can be inserted. Will look at parent nodes' nearest boundary\n// and try there, even if the original position wasn't directly at the\n// start or end of that node. Returns null when no position was found.\n\n\nfunction dropPoint(doc, pos, slice) {\n var $pos = doc.resolve(pos);\n\n if (!slice.content.size) {\n return pos;\n }\n\n var content = slice.content;\n\n for (var i = 0; i < slice.openStart; i++) {\n content = content.firstChild.content;\n }\n\n for (var pass = 1; pass <= (slice.openStart == 0 && slice.size ? 2 : 1); pass++) {\n for (var d = $pos.depth; d >= 0; d--) {\n var bias = d == $pos.depth ? 0 : $pos.pos <= ($pos.start(d + 1) + $pos.end(d + 1)) / 2 ? -1 : 1;\n var insertPos = $pos.index(d) + (bias > 0 ? 1 : 0);\n\n if (pass == 1 ? $pos.node(d).canReplace(insertPos, insertPos, content) : $pos.node(d).contentMatchAt(insertPos).findWrapping(content.firstChild.type)) {\n return bias == 0 ? $pos.pos : bias < 0 ? $pos.before(d + 1) : $pos.after(d + 1);\n }\n }\n }\n\n return null;\n}\n\nfunction mapFragment(fragment, f, parent) {\n var mapped = [];\n\n for (var i = 0; i < fragment.childCount; i++) {\n var child = fragment.child(i);\n\n if (child.content.size) {\n child = child.copy(mapFragment(child.content, f, child));\n }\n\n if (child.isInline) {\n child = f(child, parent, i);\n }\n\n mapped.push(child);\n }\n\n return prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].fromArray(mapped);\n} // ::- Add a mark to all inline content between two positions.\n\n\nvar AddMarkStep = /*@__PURE__*/function (Step) {\n function AddMarkStep(from, to, mark) {\n Step.call(this);\n this.from = from;\n this.to = to;\n this.mark = mark;\n }\n\n if (Step) AddMarkStep.__proto__ = Step;\n AddMarkStep.prototype = Object.create(Step && Step.prototype);\n AddMarkStep.prototype.constructor = AddMarkStep;\n\n AddMarkStep.prototype.apply = function apply(doc) {\n var this$1 = this;\n var oldSlice = doc.slice(this.from, this.to),\n $from = doc.resolve(this.from);\n var parent = $from.node($from.sharedDepth(this.to));\n var slice = new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](mapFragment(oldSlice.content, function (node, parent) {\n if (!parent.type.allowsMarkType(this$1.mark.type)) {\n return node;\n }\n\n return node.mark(this$1.mark.addToSet(node.marks));\n }, parent), oldSlice.openStart, oldSlice.openEnd);\n return StepResult.fromReplace(doc, this.from, this.to, slice);\n };\n\n AddMarkStep.prototype.invert = function invert() {\n return new RemoveMarkStep(this.from, this.to, this.mark);\n };\n\n AddMarkStep.prototype.map = function map(mapping) {\n var from = mapping.mapResult(this.from, 1),\n to = mapping.mapResult(this.to, -1);\n\n if (from.deleted && to.deleted || from.pos >= to.pos) {\n return null;\n }\n\n return new AddMarkStep(from.pos, to.pos, this.mark);\n };\n\n AddMarkStep.prototype.merge = function merge(other) {\n if (other instanceof AddMarkStep && other.mark.eq(this.mark) && this.from <= other.to && this.to >= other.from) {\n return new AddMarkStep(Math.min(this.from, other.from), Math.max(this.to, other.to), this.mark);\n }\n };\n\n AddMarkStep.prototype.toJSON = function toJSON() {\n return {\n stepType: \"addMark\",\n mark: this.mark.toJSON(),\n from: this.from,\n to: this.to\n };\n };\n\n AddMarkStep.fromJSON = function fromJSON(schema, json) {\n if (typeof json.from != \"number\" || typeof json.to != \"number\") {\n throw new RangeError(\"Invalid input for AddMarkStep.fromJSON\");\n }\n\n return new AddMarkStep(json.from, json.to, schema.markFromJSON(json.mark));\n };\n\n return AddMarkStep;\n}(Step);\n\nStep.jsonID(\"addMark\", AddMarkStep); // ::- Remove a mark from all inline content between two positions.\n\nvar RemoveMarkStep = /*@__PURE__*/function (Step) {\n function RemoveMarkStep(from, to, mark) {\n Step.call(this);\n this.from = from;\n this.to = to;\n this.mark = mark;\n }\n\n if (Step) RemoveMarkStep.__proto__ = Step;\n RemoveMarkStep.prototype = Object.create(Step && Step.prototype);\n RemoveMarkStep.prototype.constructor = RemoveMarkStep;\n\n RemoveMarkStep.prototype.apply = function apply(doc) {\n var this$1 = this;\n var oldSlice = doc.slice(this.from, this.to);\n var slice = new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](mapFragment(oldSlice.content, function (node) {\n return node.mark(this$1.mark.removeFromSet(node.marks));\n }), oldSlice.openStart, oldSlice.openEnd);\n return StepResult.fromReplace(doc, this.from, this.to, slice);\n };\n\n RemoveMarkStep.prototype.invert = function invert() {\n return new AddMarkStep(this.from, this.to, this.mark);\n };\n\n RemoveMarkStep.prototype.map = function map(mapping) {\n var from = mapping.mapResult(this.from, 1),\n to = mapping.mapResult(this.to, -1);\n\n if (from.deleted && to.deleted || from.pos >= to.pos) {\n return null;\n }\n\n return new RemoveMarkStep(from.pos, to.pos, this.mark);\n };\n\n RemoveMarkStep.prototype.merge = function merge(other) {\n if (other instanceof RemoveMarkStep && other.mark.eq(this.mark) && this.from <= other.to && this.to >= other.from) {\n return new RemoveMarkStep(Math.min(this.from, other.from), Math.max(this.to, other.to), this.mark);\n }\n };\n\n RemoveMarkStep.prototype.toJSON = function toJSON() {\n return {\n stepType: \"removeMark\",\n mark: this.mark.toJSON(),\n from: this.from,\n to: this.to\n };\n };\n\n RemoveMarkStep.fromJSON = function fromJSON(schema, json) {\n if (typeof json.from != \"number\" || typeof json.to != \"number\") {\n throw new RangeError(\"Invalid input for RemoveMarkStep.fromJSON\");\n }\n\n return new RemoveMarkStep(json.from, json.to, schema.markFromJSON(json.mark));\n };\n\n return RemoveMarkStep;\n}(Step);\n\nStep.jsonID(\"removeMark\", RemoveMarkStep); // :: (number, number, Mark) → this\n// Add the given mark to the inline content between `from` and `to`.\n\nTransform.prototype.addMark = function (from, to, mark) {\n var this$1 = this;\n var removed = [],\n added = [],\n removing = null,\n adding = null;\n this.doc.nodesBetween(from, to, function (node, pos, parent) {\n if (!node.isInline) {\n return;\n }\n\n var marks = node.marks;\n\n if (!mark.isInSet(marks) && parent.type.allowsMarkType(mark.type)) {\n var start = Math.max(pos, from),\n end = Math.min(pos + node.nodeSize, to);\n var newSet = mark.addToSet(marks);\n\n for (var i = 0; i < marks.length; i++) {\n if (!marks[i].isInSet(newSet)) {\n if (removing && removing.to == start && removing.mark.eq(marks[i])) {\n removing.to = end;\n } else {\n removed.push(removing = new RemoveMarkStep(start, end, marks[i]));\n }\n }\n }\n\n if (adding && adding.to == start) {\n adding.to = end;\n } else {\n added.push(adding = new AddMarkStep(start, end, mark));\n }\n }\n });\n removed.forEach(function (s) {\n return this$1.step(s);\n });\n added.forEach(function (s) {\n return this$1.step(s);\n });\n return this;\n}; // :: (number, number, ?union) → this\n// Remove marks from inline nodes between `from` and `to`. When `mark`\n// is a single mark, remove precisely that mark. When it is a mark type,\n// remove all marks of that type. When it is null, remove all marks of\n// any type.\n\n\nTransform.prototype.removeMark = function (from, to, mark) {\n var this$1 = this;\n if (mark === void 0) mark = null;\n var matched = [],\n step = 0;\n this.doc.nodesBetween(from, to, function (node, pos) {\n if (!node.isInline) {\n return;\n }\n\n step++;\n var toRemove = null;\n\n if (mark instanceof prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"MarkType\"]) {\n var found = mark.isInSet(node.marks);\n\n if (found) {\n toRemove = [found];\n }\n } else if (mark) {\n if (mark.isInSet(node.marks)) {\n toRemove = [mark];\n }\n } else {\n toRemove = node.marks;\n }\n\n if (toRemove && toRemove.length) {\n var end = Math.min(pos + node.nodeSize, to);\n\n for (var i = 0; i < toRemove.length; i++) {\n var style = toRemove[i],\n found$1 = void 0;\n\n for (var j = 0; j < matched.length; j++) {\n var m = matched[j];\n\n if (m.step == step - 1 && style.eq(matched[j].style)) {\n found$1 = m;\n }\n }\n\n if (found$1) {\n found$1.to = end;\n found$1.step = step;\n } else {\n matched.push({\n style: style,\n from: Math.max(pos, from),\n to: end,\n step: step\n });\n }\n }\n }\n });\n matched.forEach(function (m) {\n return this$1.step(new RemoveMarkStep(m.from, m.to, m.style));\n });\n return this;\n}; // :: (number, NodeType, ?ContentMatch) → this\n// Removes all marks and nodes from the content of the node at `pos`\n// that don't match the given new parent node type. Accepts an\n// optional starting [content match](#model.ContentMatch) as third\n// argument.\n\n\nTransform.prototype.clearIncompatible = function (pos, parentType, match) {\n if (match === void 0) match = parentType.contentMatch;\n var node = this.doc.nodeAt(pos);\n var delSteps = [],\n cur = pos + 1;\n\n for (var i = 0; i < node.childCount; i++) {\n var child = node.child(i),\n end = cur + child.nodeSize;\n var allowed = match.matchType(child.type, child.attrs);\n\n if (!allowed) {\n delSteps.push(new ReplaceStep(cur, end, prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"].empty));\n } else {\n match = allowed;\n\n for (var j = 0; j < child.marks.length; j++) {\n if (!parentType.allowsMarkType(child.marks[j].type)) {\n this.step(new RemoveMarkStep(cur, end, child.marks[j]));\n }\n }\n }\n\n cur = end;\n }\n\n if (!match.validEnd) {\n var fill = match.fillBefore(prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].empty, true);\n this.replace(cur, cur, new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](fill, 0, 0));\n }\n\n for (var i$1 = delSteps.length - 1; i$1 >= 0; i$1--) {\n this.step(delSteps[i$1]);\n }\n\n return this;\n}; // :: (Node, number, ?number, ?Slice) → ?Step\n// ‘Fit’ a slice into a given position in the document, producing a\n// [step](#transform.Step) that inserts it. Will return null if\n// there's no meaningful way to insert the slice here, or inserting it\n// would be a no-op (an empty slice over an empty range).\n\n\nfunction replaceStep(doc, from, to, slice) {\n if (to === void 0) to = from;\n if (slice === void 0) slice = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"].empty;\n\n if (from == to && !slice.size) {\n return null;\n }\n\n var $from = doc.resolve(from),\n $to = doc.resolve(to); // Optimization -- avoid work if it's obvious that it's not needed.\n\n if (fitsTrivially($from, $to, slice)) {\n return new ReplaceStep(from, to, slice);\n }\n\n var placed = placeSlice($from, slice);\n var fittedLeft = fitLeft($from, placed);\n var fitted = fitRight($from, $to, fittedLeft);\n\n if (!fitted) {\n return null;\n }\n\n if (fittedLeft.size != fitted.size && canMoveText($from, $to, fittedLeft)) {\n var d = $to.depth,\n after = $to.after(d);\n\n while (d > 1 && after == $to.end(--d)) {\n ++after;\n }\n\n var fittedAfter = fitRight($from, doc.resolve(after), fittedLeft);\n\n if (fittedAfter) {\n return new ReplaceAroundStep(from, after, to, $to.end(), fittedAfter, fittedLeft.size);\n }\n }\n\n return fitted.size || from != to ? new ReplaceStep(from, to, fitted) : null;\n} // :: (number, ?number, ?Slice) → this\n// Replace the part of the document between `from` and `to` with the\n// given `slice`.\n\n\nTransform.prototype.replace = function (from, to, slice) {\n if (to === void 0) to = from;\n if (slice === void 0) slice = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"].empty;\n var step = replaceStep(this.doc, from, to, slice);\n\n if (step) {\n this.step(step);\n }\n\n return this;\n}; // :: (number, number, union) → this\n// Replace the given range with the given content, which may be a\n// fragment, node, or array of nodes.\n\n\nTransform.prototype.replaceWith = function (from, to, content) {\n return this.replace(from, to, new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].from(content), 0, 0));\n}; // :: (number, number) → this\n// Delete the content between the given positions.\n\n\nTransform.prototype[\"delete\"] = function (from, to) {\n return this.replace(from, to, prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"].empty);\n}; // :: (number, union) → this\n// Insert the given content at the given position.\n\n\nTransform.prototype.insert = function (pos, content) {\n return this.replaceWith(pos, pos, content);\n};\n\nfunction fitLeftInner($from, depth, placed, placedBelow) {\n var content = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].empty,\n openEnd = 0,\n placedHere = placed[depth];\n\n if ($from.depth > depth) {\n var inner = fitLeftInner($from, depth + 1, placed, placedBelow || placedHere);\n openEnd = inner.openEnd + 1;\n content = prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].from($from.node(depth + 1).copy(inner.content));\n }\n\n if (placedHere) {\n content = content.append(placedHere.content);\n openEnd = placedHere.openEnd;\n }\n\n if (placedBelow) {\n content = content.append($from.node(depth).contentMatchAt($from.indexAfter(depth)).fillBefore(prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].empty, true));\n openEnd = 0;\n }\n\n return {\n content: content,\n openEnd: openEnd\n };\n}\n\nfunction fitLeft($from, placed) {\n var ref = fitLeftInner($from, 0, placed, false);\n var content = ref.content;\n var openEnd = ref.openEnd;\n return new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](content, $from.depth, openEnd || 0);\n}\n\nfunction fitRightJoin(content, parent, $from, $to, depth, openStart, openEnd) {\n var match,\n count = content.childCount,\n matchCount = count - (openEnd > 0 ? 1 : 0);\n var parentNode = openStart < 0 ? parent : $from.node(depth);\n\n if (openStart < 0) {\n match = parentNode.contentMatchAt(matchCount);\n } else if (count == 1 && openEnd > 0) {\n match = parentNode.contentMatchAt(openStart ? $from.index(depth) : $from.indexAfter(depth));\n } else {\n match = parentNode.contentMatchAt($from.indexAfter(depth)).matchFragment(content, count > 0 && openStart ? 1 : 0, matchCount);\n }\n\n var toNode = $to.node(depth);\n\n if (openEnd > 0 && depth < $to.depth) {\n var after = toNode.content.cutByIndex($to.indexAfter(depth)).addToStart(content.lastChild);\n var joinable$1 = match.fillBefore(after, true); // Can't insert content if there's a single node stretched across this gap\n\n if (joinable$1 && joinable$1.size && openStart > 0 && count == 1) {\n joinable$1 = null;\n }\n\n if (joinable$1) {\n var inner = fitRightJoin(content.lastChild.content, content.lastChild, $from, $to, depth + 1, count == 1 ? openStart - 1 : -1, openEnd - 1);\n\n if (inner) {\n var last = content.lastChild.copy(inner);\n\n if (joinable$1.size) {\n return content.cutByIndex(0, count - 1).append(joinable$1).addToEnd(last);\n } else {\n return content.replaceChild(count - 1, last);\n }\n }\n }\n }\n\n if (openEnd > 0) {\n match = match.matchType((count == 1 && openStart > 0 ? $from.node(depth + 1) : content.lastChild).type);\n } // If we're here, the next level can't be joined, so we see what\n // happens if we leave it open.\n\n\n var toIndex = $to.index(depth);\n\n if (toIndex == toNode.childCount && !toNode.type.compatibleContent(parent.type)) {\n return null;\n }\n\n var joinable = match.fillBefore(toNode.content, true, toIndex);\n\n for (var i = toIndex; joinable && i < toNode.content.childCount; i++) {\n if (!parentNode.type.allowsMarks(toNode.content.child(i).marks)) {\n joinable = null;\n }\n }\n\n if (!joinable) {\n return null;\n }\n\n if (openEnd > 0) {\n var closed = fitRightClosed(content.lastChild, openEnd - 1, $from, depth + 1, count == 1 ? openStart - 1 : -1);\n content = content.replaceChild(count - 1, closed);\n }\n\n content = content.append(joinable);\n\n if ($to.depth > depth) {\n content = content.addToEnd(fitRightSeparate($to, depth + 1));\n }\n\n return content;\n}\n\nfunction fitRightClosed(node, openEnd, $from, depth, openStart) {\n var match,\n content = node.content,\n count = content.childCount;\n\n if (openStart >= 0) {\n match = $from.node(depth).contentMatchAt($from.indexAfter(depth)).matchFragment(content, openStart > 0 ? 1 : 0, count);\n } else {\n match = node.contentMatchAt(count);\n }\n\n if (openEnd > 0) {\n var closed = fitRightClosed(content.lastChild, openEnd - 1, $from, depth + 1, count == 1 ? openStart - 1 : -1);\n content = content.replaceChild(count - 1, closed);\n }\n\n return node.copy(content.append(match.fillBefore(prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].empty, true)));\n}\n\nfunction fitRightSeparate($to, depth) {\n var node = $to.node(depth);\n var fill = node.contentMatchAt(0).fillBefore(node.content, true, $to.index(depth));\n\n if ($to.depth > depth) {\n fill = fill.addToEnd(fitRightSeparate($to, depth + 1));\n }\n\n return node.copy(fill);\n}\n\nfunction normalizeSlice(content, openStart, openEnd) {\n while (openStart > 0 && openEnd > 0 && content.childCount == 1) {\n content = content.firstChild.content;\n openStart--;\n openEnd--;\n }\n\n return new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](content, openStart, openEnd);\n} // : (ResolvedPos, ResolvedPos, number, Slice) → Slice\n\n\nfunction fitRight($from, $to, slice) {\n var fitted = fitRightJoin(slice.content, $from.node(0), $from, $to, 0, slice.openStart, slice.openEnd);\n\n if (!fitted) {\n return null;\n }\n\n return normalizeSlice(fitted, slice.openStart, $to.depth);\n}\n\nfunction fitsTrivially($from, $to, slice) {\n return !slice.openStart && !slice.openEnd && $from.start() == $to.start() && $from.parent.canReplace($from.index(), $to.index(), slice.content);\n}\n\nfunction canMoveText($from, $to, slice) {\n if (!$to.parent.isTextblock) {\n return false;\n }\n\n var parent = slice.openEnd ? nodeRight(slice.content, slice.openEnd) : $from.node($from.depth - (slice.openStart - slice.openEnd));\n\n if (!parent.isTextblock) {\n return false;\n }\n\n for (var i = $to.index(); i < $to.parent.childCount; i++) {\n if (!parent.type.allowsMarks($to.parent.child(i).marks)) {\n return false;\n }\n }\n\n var match;\n\n if (slice.openEnd) {\n match = parent.contentMatchAt(parent.childCount);\n } else {\n match = parent.contentMatchAt(parent.childCount);\n\n if (slice.size) {\n match = match.matchFragment(slice.content, slice.openStart ? 1 : 0);\n }\n }\n\n match = match.matchFragment($to.parent.content, $to.index());\n return match && match.validEnd;\n}\n\nfunction nodeRight(content, depth) {\n for (var i = 1; i < depth; i++) {\n content = content.lastChild.content;\n }\n\n return content.lastChild;\n} // Algorithm for 'placing' the elements of a slice into a gap:\n//\n// We consider the content of each node that is open to the left to be\n// independently placeable. I.e. in , when the\n// paragraph on the left is open, \"foo\" can be placed (somewhere on\n// the left side of the replacement gap) independently from p(\"bar\").\n//\n// So placeSlice splits up a slice into a number of sub-slices,\n// along with information on where they can be placed on the given\n// left-side edge. It works by walking the open side of the slice,\n// from the inside out, and trying to find a landing spot for each\n// element, by simultaneously scanning over the gap side. When no\n// place is found for an open node's content, it is left in that node.\n// : (ResolvedPos, Slice) → [{content: Fragment, openEnd: number, depth: number}]\n\n\nfunction placeSlice($from, slice) {\n var frontier = new Frontier($from);\n\n for (var pass = 1; slice.size && pass <= 3; pass++) {\n var value = frontier.placeSlice(slice.content, slice.openStart, slice.openEnd, pass);\n\n if (pass == 3 && value != slice && value.size) {\n pass = 0;\n } // Restart if the 3rd pass made progress but left content\n\n\n slice = value;\n }\n\n while (frontier.open.length) {\n frontier.closeNode();\n }\n\n return frontier.placed;\n} // Helper class that models the open side of the insert position,\n// keeping track of the content match and already inserted content\n// at each depth.\n\n\nvar Frontier = function Frontier($pos) {\n // : [{parent: Node, match: ContentMatch, content: Fragment, wrapper: bool, openEnd: number, depth: number}]\n this.open = [];\n\n for (var d = 0; d <= $pos.depth; d++) {\n var parent = $pos.node(d),\n match = parent.contentMatchAt($pos.indexAfter(d));\n this.open.push({\n parent: parent,\n match: match,\n content: prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].empty,\n wrapper: false,\n openEnd: 0,\n depth: d\n });\n }\n\n this.placed = [];\n}; // : (Fragment, number, number, number, ?Node) → Slice\n// Tries to place the content of the given slice, and returns a\n// slice containing unplaced content.\n//\n// pass 1: try to fit directly\n// pass 2: allow wrapper nodes to be introduced\n// pass 3: allow unwrapping of nodes that aren't open\n\n\nFrontier.prototype.placeSlice = function placeSlice(fragment, openStart, openEnd, pass, parent) {\n if (openStart > 0) {\n var first = fragment.firstChild;\n var inner = this.placeSlice(first.content, Math.max(0, openStart - 1), openEnd && fragment.childCount == 1 ? openEnd - 1 : 0, pass, first);\n\n if (inner.content != first.content) {\n if (inner.content.size) {\n fragment = fragment.replaceChild(0, first.copy(inner.content));\n openStart = inner.openStart + 1;\n } else {\n if (fragment.childCount == 1) {\n openEnd = 0;\n }\n\n fragment = fragment.cutByIndex(1);\n openStart = 0;\n }\n }\n }\n\n var result = this.placeContent(fragment, openStart, openEnd, pass, parent);\n\n if (pass > 2 && result.size && openStart == 0) {\n var child = result.content.firstChild,\n single = result.content.childCount == 1;\n this.placeContent(child.content, 0, openEnd && single ? openEnd - 1 : 0, pass, child);\n result = single ? prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].empty : new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](result.content.cutByIndex(1), 0, openEnd);\n }\n\n return result;\n};\n\nFrontier.prototype.placeContent = function placeContent(fragment, openStart, openEnd, pass, parent) {\n var i = 0; // Go over the fragment's children\n\n for (; i < fragment.childCount; i++) {\n var child = fragment.child(i),\n placed = false,\n last = i == fragment.childCount - 1; // Try each open node in turn, starting from the innermost\n\n for (var d = this.open.length - 1; d >= 0; d--) {\n var open = this.open[d],\n wrap = void 0; // If pass > 1, it is allowed to wrap the node to help find a\n // fit, so if findWrapping returns something, we add open\n // nodes to the frontier for that wrapping.\n\n if (pass > 1 && (wrap = open.match.findWrapping(child.type)) && !(parent && wrap.length && wrap[wrap.length - 1] == parent.type)) {\n while (this.open.length - 1 > d) {\n this.closeNode();\n }\n\n for (var w = 0; w < wrap.length; w++) {\n open.match = open.match.matchType(wrap[w]);\n d++;\n open = {\n parent: wrap[w].create(),\n match: wrap[w].contentMatch,\n content: prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].empty,\n wrapper: true,\n openEnd: 0,\n depth: d + w\n };\n this.open.push(open);\n }\n } // See if the child fits here\n\n\n var match = open.match.matchType(child.type);\n\n if (!match) {\n var fill = open.match.fillBefore(prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].from(child));\n\n if (fill) {\n for (var j = 0; j < fill.childCount; j++) {\n var ch = fill.child(j);\n this.addNode(open, ch, 0);\n match = open.match.matchFragment(ch);\n }\n } else if (parent && open.match.matchType(parent.type)) {\n // Don't continue looking further up if the parent node\n // would fit here.\n break;\n } else {\n continue;\n }\n } // Close open nodes above this one, since we're starting to\n // add to this.\n\n\n while (this.open.length - 1 > d) {\n this.closeNode();\n } // Strip marks from the child or close its start when necessary\n\n\n child = child.mark(open.parent.type.allowedMarks(child.marks));\n\n if (openStart) {\n child = closeNodeStart(child, openStart, last ? openEnd : 0);\n openStart = 0;\n } // Add the child to this open node and adjust its metadata\n\n\n this.addNode(open, child, last ? openEnd : 0);\n open.match = match;\n\n if (last) {\n openEnd = 0;\n }\n\n placed = true;\n break;\n } // As soon as we've failed to place a node we stop looking at\n // later nodes\n\n\n if (!placed) {\n break;\n }\n } // Close the current open node if it's not the the root and we\n // either placed up to the end of the node or the the current\n // slice depth's node type matches the open node's type\n\n\n if (this.open.length > 1 && (i > 0 && i == fragment.childCount || parent && this.open[this.open.length - 1].parent.type == parent.type)) {\n this.closeNode();\n }\n\n return new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](fragment.cutByIndex(i), openStart, openEnd);\n};\n\nFrontier.prototype.addNode = function addNode(open, node, openEnd) {\n open.content = closeFragmentEnd(open.content, open.openEnd).addToEnd(node);\n open.openEnd = openEnd;\n};\n\nFrontier.prototype.closeNode = function closeNode() {\n var open = this.open.pop();\n if (open.content.size == 0) ;else if (open.wrapper) {\n this.addNode(this.open[this.open.length - 1], open.parent.copy(open.content), open.openEnd + 1);\n } else {\n this.placed[open.depth] = {\n depth: open.depth,\n content: open.content,\n openEnd: open.openEnd\n };\n }\n};\n\nfunction closeNodeStart(node, openStart, openEnd) {\n var content = node.content;\n\n if (openStart > 1) {\n var first = closeNodeStart(node.firstChild, openStart - 1, node.childCount == 1 ? openEnd - 1 : 0);\n content = node.content.replaceChild(0, first);\n }\n\n var fill = node.type.contentMatch.fillBefore(content, openEnd == 0);\n return node.copy(fill.append(content));\n}\n\nfunction closeNodeEnd(node, depth) {\n var content = node.content;\n\n if (depth > 1) {\n var last = closeNodeEnd(node.lastChild, depth - 1);\n content = node.content.replaceChild(node.childCount - 1, last);\n }\n\n var fill = node.contentMatchAt(node.childCount).fillBefore(prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].empty, true);\n return node.copy(content.append(fill));\n}\n\nfunction closeFragmentEnd(fragment, depth) {\n return depth ? fragment.replaceChild(fragment.childCount - 1, closeNodeEnd(fragment.lastChild, depth)) : fragment;\n} // :: (number, number, Slice) → this\n// Replace a range of the document with a given slice, using `from`,\n// `to`, and the slice's [`openStart`](#model.Slice.openStart) property\n// as hints, rather than fixed start and end points. This method may\n// grow the replaced area or close open nodes in the slice in order to\n// get a fit that is more in line with WYSIWYG expectations, by\n// dropping fully covered parent nodes of the replaced region when\n// they are marked [non-defining](#model.NodeSpec.defining), or\n// including an open parent node from the slice that _is_ marked as\n// [defining](#model.NodeSpec.defining).\n//\n// This is the method, for example, to handle paste. The similar\n// [`replace`](#transform.Transform.replace) method is a more\n// primitive tool which will _not_ move the start and end of its given\n// range, and is useful in situations where you need more precise\n// control over what happens.\n\n\nTransform.prototype.replaceRange = function (from, to, slice) {\n if (!slice.size) {\n return this.deleteRange(from, to);\n }\n\n var $from = this.doc.resolve(from),\n $to = this.doc.resolve(to);\n\n if (fitsTrivially($from, $to, slice)) {\n return this.step(new ReplaceStep(from, to, slice));\n }\n\n var targetDepths = coveredDepths($from, this.doc.resolve(to)); // Can't replace the whole document, so remove 0 if it's present\n\n if (targetDepths[targetDepths.length - 1] == 0) {\n targetDepths.pop();\n } // Negative numbers represent not expansion over the whole node at\n // that depth, but replacing from $from.before(-D) to $to.pos.\n\n\n var preferredTarget = -($from.depth + 1);\n targetDepths.unshift(preferredTarget); // This loop picks a preferred target depth, if one of the covering\n // depths is not outside of a defining node, and adds negative\n // depths for any depth that has $from at its start and does not\n // cross a defining node.\n\n for (var d = $from.depth, pos = $from.pos - 1; d > 0; d--, pos--) {\n var spec = $from.node(d).type.spec;\n\n if (spec.defining || spec.isolating) {\n break;\n }\n\n if (targetDepths.indexOf(d) > -1) {\n preferredTarget = d;\n } else if ($from.before(d) == pos) {\n targetDepths.splice(1, 0, -d);\n }\n } // Try to fit each possible depth of the slice into each possible\n // target depth, starting with the preferred depths.\n\n\n var preferredTargetIndex = targetDepths.indexOf(preferredTarget);\n var leftNodes = [],\n preferredDepth = slice.openStart;\n\n for (var content = slice.content, i = 0;; i++) {\n var node = content.firstChild;\n leftNodes.push(node);\n\n if (i == slice.openStart) {\n break;\n }\n\n content = node.content;\n } // Back up if the node directly above openStart, or the node above\n // that separated only by a non-defining textblock node, is defining.\n\n\n if (preferredDepth > 0 && leftNodes[preferredDepth - 1].type.spec.defining && $from.node(preferredTargetIndex).type != leftNodes[preferredDepth - 1].type) {\n preferredDepth -= 1;\n } else if (preferredDepth >= 2 && leftNodes[preferredDepth - 1].isTextblock && leftNodes[preferredDepth - 2].type.spec.defining && $from.node(preferredTargetIndex).type != leftNodes[preferredDepth - 2].type) {\n preferredDepth -= 2;\n }\n\n for (var j = slice.openStart; j >= 0; j--) {\n var openDepth = (j + preferredDepth + 1) % (slice.openStart + 1);\n var insert = leftNodes[openDepth];\n\n if (!insert) {\n continue;\n }\n\n for (var i$1 = 0; i$1 < targetDepths.length; i$1++) {\n // Loop over possible expansion levels, starting with the\n // preferred one\n var targetDepth = targetDepths[(i$1 + preferredTargetIndex) % targetDepths.length],\n expand = true;\n\n if (targetDepth < 0) {\n expand = false;\n targetDepth = -targetDepth;\n }\n\n var parent = $from.node(targetDepth - 1),\n index = $from.index(targetDepth - 1);\n\n if (parent.canReplaceWith(index, index, insert.type, insert.marks)) {\n return this.replace($from.before(targetDepth), expand ? $to.after(targetDepth) : to, new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](closeFragment(slice.content, 0, slice.openStart, openDepth), openDepth, slice.openEnd));\n }\n }\n }\n\n var startSteps = this.steps.length;\n\n for (var i$2 = targetDepths.length - 1; i$2 >= 0; i$2--) {\n this.replace(from, to, slice);\n\n if (this.steps.length > startSteps) {\n break;\n }\n\n var depth = targetDepths[i$2];\n\n if (i$2 < 0) {\n continue;\n }\n\n from = $from.before(depth);\n to = $to.after(depth);\n }\n\n return this;\n};\n\nfunction closeFragment(fragment, depth, oldOpen, newOpen, parent) {\n if (depth < oldOpen) {\n var first = fragment.firstChild;\n fragment = fragment.replaceChild(0, first.copy(closeFragment(first.content, depth + 1, oldOpen, newOpen, first)));\n }\n\n if (depth > newOpen) {\n var match = parent.contentMatchAt(0);\n var start = match.fillBefore(fragment).append(fragment);\n fragment = start.append(match.matchFragment(start).fillBefore(prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].empty, true));\n }\n\n return fragment;\n} // :: (number, number, Node) → this\n// Replace the given range with a node, but use `from` and `to` as\n// hints, rather than precise positions. When from and to are the same\n// and are at the start or end of a parent node in which the given\n// node doesn't fit, this method may _move_ them out towards a parent\n// that does allow the given node to be placed. When the given range\n// completely covers a parent node, this method may completely replace\n// that parent node.\n\n\nTransform.prototype.replaceRangeWith = function (from, to, node) {\n if (!node.isInline && from == to && this.doc.resolve(from).parent.content.size) {\n var point = insertPoint(this.doc, from, node.type);\n\n if (point != null) {\n from = to = point;\n }\n }\n\n return this.replaceRange(from, to, new prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Slice\"](prosemirror_model__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"].from(node), 0, 0));\n}; // :: (number, number) → this\n// Delete the given range, expanding it to cover fully covered\n// parent nodes until a valid replace is found.\n\n\nTransform.prototype.deleteRange = function (from, to) {\n var $from = this.doc.resolve(from),\n $to = this.doc.resolve(to);\n var covered = coveredDepths($from, $to);\n\n for (var i = 0; i < covered.length; i++) {\n var depth = covered[i],\n last = i == covered.length - 1;\n\n if (last && depth == 0 || $from.node(depth).type.contentMatch.validEnd) {\n return this[\"delete\"]($from.start(depth), $to.end(depth));\n }\n\n if (depth > 0 && (last || $from.node(depth - 1).canReplace($from.index(depth - 1), $to.indexAfter(depth - 1)))) {\n return this[\"delete\"]($from.before(depth), $to.after(depth));\n }\n }\n\n for (var d = 1; d <= $from.depth && d <= $to.depth; d++) {\n if (from - $from.start(d) == $from.depth - d && to > $from.end(d) && $to.end(d) - to != $to.depth - d) {\n return this[\"delete\"]($from.before(d), to);\n }\n }\n\n return this[\"delete\"](from, to);\n}; // : (ResolvedPos, ResolvedPos) → [number]\n// Returns an array of all depths for which $from - $to spans the\n// whole content of the nodes at that depth.\n\n\nfunction coveredDepths($from, $to) {\n var result = [],\n minDepth = Math.min($from.depth, $to.depth);\n\n for (var d = minDepth; d >= 0; d--) {\n var start = $from.start(d);\n\n if (start < $from.pos - ($from.depth - d) || $to.end(d) > $to.pos + ($to.depth - d) || $from.node(d).type.spec.isolating || $to.node(d).type.spec.isolating) {\n break;\n }\n\n if (start == $to.start(d)) {\n result.push(d);\n }\n }\n\n return result;\n}\n\n\n\n//# sourceURL=webpack:///./node_modules/prosemirror-transform/dist/index.es.js?"); - -/***/ }), - -/***/ "./node_modules/prosemirror-view/dist/index.es.js": -/*!********************************************************!*\ - !*** ./node_modules/prosemirror-view/dist/index.es.js ***! - \********************************************************/ -/*! exports provided: Decoration, DecorationSet, EditorView, __endComposition, __parseFromClipboard, __serializeForClipboard */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Decoration\", function() { return Decoration; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"DecorationSet\", function() { return DecorationSet; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"EditorView\", function() { return EditorView; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__endComposition\", function() { return endComposition; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__parseFromClipboard\", function() { return parseFromClipboard; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__serializeForClipboard\", function() { return serializeForClipboard; });\n/* harmony import */ var prosemirror_state__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prosemirror-state */ \"./node_modules/prosemirror-state/dist/index.es.js\");\n/* harmony import */ var prosemirror_model__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prosemirror-model */ \"./node_modules/prosemirror-model/dist/index.es.js\");\n/* harmony import */ var prosemirror_transform__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prosemirror-transform */ \"./node_modules/prosemirror-transform/dist/index.es.js\");\n\n\n\nvar result = {};\n\nif (typeof navigator != \"undefined\" && typeof document != \"undefined\") {\n var ie_edge = /Edge\\/(\\d+)/.exec(navigator.userAgent);\n var ie_upto10 = /MSIE \\d/.test(navigator.userAgent);\n var ie_11up = /Trident\\/(?:[7-9]|\\d{2,})\\..*rv:(\\d+)/.exec(navigator.userAgent);\n result.mac = /Mac/.test(navigator.platform);\n var ie = result.ie = !!(ie_upto10 || ie_11up || ie_edge);\n result.ie_version = ie_upto10 ? document.documentMode || 6 : ie_11up ? +ie_11up[1] : ie_edge ? +ie_edge[1] : null;\n result.gecko = !ie && /gecko\\/(\\d+)/i.test(navigator.userAgent);\n result.gecko_version = result.gecko && +(/Firefox\\/(\\d+)/.exec(navigator.userAgent) || [0, 0])[1];\n var chrome = !ie && /Chrome\\/(\\d+)/.exec(navigator.userAgent);\n result.chrome = !!chrome;\n result.chrome_version = chrome && +chrome[1];\n result.ios = !ie && /AppleWebKit/.test(navigator.userAgent) && /Mobile\\/\\w+/.test(navigator.userAgent);\n result.android = /Android \\d/.test(navigator.userAgent);\n result.webkit = !ie && 'WebkitAppearance' in document.documentElement.style;\n result.safari = /Apple Computer/.test(navigator.vendor);\n result.webkit_version = result.webkit && +(/\\bAppleWebKit\\/(\\d+)/.exec(navigator.userAgent) || [0, 0])[1];\n}\n\nvar domIndex = function domIndex(node) {\n for (var index = 0;; index++) {\n node = node.previousSibling;\n\n if (!node) {\n return index;\n }\n }\n};\n\nvar parentNode = function parentNode(node) {\n var parent = node.parentNode;\n return parent && parent.nodeType == 11 ? parent.host : parent;\n};\n\nvar textRange = function textRange(node, from, to) {\n var range = document.createRange();\n range.setEnd(node, to == null ? node.nodeValue.length : to);\n range.setStart(node, from || 0);\n return range;\n}; // Scans forward and backward through DOM positions equivalent to the\n// given one to see if the two are in the same place (i.e. after a\n// text node vs at the end of that text node)\n\n\nvar isEquivalentPosition = function isEquivalentPosition(node, off, targetNode, targetOff) {\n return targetNode && (scanFor(node, off, targetNode, targetOff, -1) || scanFor(node, off, targetNode, targetOff, 1));\n};\n\nvar atomElements = /^(img|br|input|textarea|hr)$/i;\n\nfunction scanFor(node, off, targetNode, targetOff, dir) {\n for (;;) {\n if (node == targetNode && off == targetOff) {\n return true;\n }\n\n if (off == (dir < 0 ? 0 : nodeSize(node))) {\n var parent = node.parentNode;\n\n if (parent.nodeType != 1 || hasBlockDesc(node) || atomElements.test(node.nodeName) || node.contentEditable == \"false\") {\n return false;\n }\n\n off = domIndex(node) + (dir < 0 ? 0 : 1);\n node = parent;\n } else if (node.nodeType == 1) {\n node = node.childNodes[off + (dir < 0 ? -1 : 0)];\n\n if (node.contentEditable == \"false\") {\n return false;\n }\n\n off = dir < 0 ? nodeSize(node) : 0;\n } else {\n return false;\n }\n }\n}\n\nfunction nodeSize(node) {\n return node.nodeType == 3 ? node.nodeValue.length : node.childNodes.length;\n}\n\nfunction isOnEdge(node, offset, parent) {\n for (var atStart = offset == 0, atEnd = offset == nodeSize(node); atStart || atEnd;) {\n if (node == parent) {\n return true;\n }\n\n var index = domIndex(node);\n node = node.parentNode;\n\n if (!node) {\n return false;\n }\n\n atStart = atStart && index == 0;\n atEnd = atEnd && index == nodeSize(node);\n }\n}\n\nfunction hasBlockDesc(dom) {\n var desc;\n\n for (var cur = dom; cur; cur = cur.parentNode) {\n if (desc = cur.pmViewDesc) {\n break;\n }\n }\n\n return desc && desc.node && desc.node.isBlock && (desc.dom == dom || desc.contentDOM == dom);\n} // Work around Chrome issue https://bugs.chromium.org/p/chromium/issues/detail?id=447523\n// (isCollapsed inappropriately returns true in shadow dom)\n\n\nvar selectionCollapsed = function selectionCollapsed(domSel) {\n var collapsed = domSel.isCollapsed;\n\n if (collapsed && result.chrome && domSel.rangeCount && !domSel.getRangeAt(0).collapsed) {\n collapsed = false;\n }\n\n return collapsed;\n};\n\nfunction keyEvent(keyCode, key) {\n var event = document.createEvent(\"Event\");\n event.initEvent(\"keydown\", true, true);\n event.keyCode = keyCode;\n event.key = event.code = key;\n return event;\n}\n\nfunction windowRect(win) {\n return {\n left: 0,\n right: win.innerWidth,\n top: 0,\n bottom: win.innerHeight\n };\n}\n\nfunction getSide(value, side) {\n return typeof value == \"number\" ? value : value[side];\n}\n\nfunction scrollRectIntoView(view, rect, startDOM) {\n var scrollThreshold = view.someProp(\"scrollThreshold\") || 0,\n scrollMargin = view.someProp(\"scrollMargin\") || 5;\n var doc = view.dom.ownerDocument,\n win = doc.defaultView;\n\n for (var parent = startDOM || view.dom;; parent = parentNode(parent)) {\n if (!parent) {\n break;\n }\n\n if (parent.nodeType != 1) {\n continue;\n }\n\n var atTop = parent == doc.body || parent.nodeType != 1;\n var bounding = atTop ? windowRect(win) : parent.getBoundingClientRect();\n var moveX = 0,\n moveY = 0;\n\n if (rect.top < bounding.top + getSide(scrollThreshold, \"top\")) {\n moveY = -(bounding.top - rect.top + getSide(scrollMargin, \"top\"));\n } else if (rect.bottom > bounding.bottom - getSide(scrollThreshold, \"bottom\")) {\n moveY = rect.bottom - bounding.bottom + getSide(scrollMargin, \"bottom\");\n }\n\n if (rect.left < bounding.left + getSide(scrollThreshold, \"left\")) {\n moveX = -(bounding.left - rect.left + getSide(scrollMargin, \"left\"));\n } else if (rect.right > bounding.right - getSide(scrollThreshold, \"right\")) {\n moveX = rect.right - bounding.right + getSide(scrollMargin, \"right\");\n }\n\n if (moveX || moveY) {\n if (atTop) {\n win.scrollBy(moveX, moveY);\n } else {\n if (moveY) {\n parent.scrollTop += moveY;\n }\n\n if (moveX) {\n parent.scrollLeft += moveX;\n }\n\n rect = {\n left: rect.left - moveX,\n top: rect.top - moveY,\n right: rect.right - moveX,\n bottom: rect.bottom - moveY\n };\n }\n }\n\n if (atTop) {\n break;\n }\n }\n} // Store the scroll position of the editor's parent nodes, along with\n// the top position of an element near the top of the editor, which\n// will be used to make sure the visible viewport remains stable even\n// when the size of the content above changes.\n\n\nfunction storeScrollPos(view) {\n var rect = view.dom.getBoundingClientRect(),\n startY = Math.max(0, rect.top);\n var refDOM, refTop;\n\n for (var x = (rect.left + rect.right) / 2, y = startY + 1; y < Math.min(innerHeight, rect.bottom); y += 5) {\n var dom = view.root.elementFromPoint(x, y);\n\n if (dom == view.dom || !view.dom.contains(dom)) {\n continue;\n }\n\n var localRect = dom.getBoundingClientRect();\n\n if (localRect.top >= startY - 20) {\n refDOM = dom;\n refTop = localRect.top;\n break;\n }\n }\n\n return {\n refDOM: refDOM,\n refTop: refTop,\n stack: scrollStack(view.dom)\n };\n}\n\nfunction scrollStack(dom) {\n var stack = [],\n doc = dom.ownerDocument;\n\n for (; dom; dom = parentNode(dom)) {\n stack.push({\n dom: dom,\n top: dom.scrollTop,\n left: dom.scrollLeft\n });\n\n if (dom == doc) {\n break;\n }\n }\n\n return stack;\n} // Reset the scroll position of the editor's parent nodes to that what\n// it was before, when storeScrollPos was called.\n\n\nfunction resetScrollPos(ref) {\n var refDOM = ref.refDOM;\n var refTop = ref.refTop;\n var stack = ref.stack;\n var newRefTop = refDOM ? refDOM.getBoundingClientRect().top : 0;\n restoreScrollStack(stack, newRefTop == 0 ? 0 : newRefTop - refTop);\n}\n\nfunction restoreScrollStack(stack, dTop) {\n for (var i = 0; i < stack.length; i++) {\n var ref = stack[i];\n var dom = ref.dom;\n var top = ref.top;\n var left = ref.left;\n\n if (dom.scrollTop != top + dTop) {\n dom.scrollTop = top + dTop;\n }\n\n if (dom.scrollLeft != left) {\n dom.scrollLeft = left;\n }\n }\n}\n\nvar preventScrollSupported = null; // Feature-detects support for .focus({preventScroll: true}), and uses\n// a fallback kludge when not supported.\n\nfunction focusPreventScroll(dom) {\n if (dom.setActive) {\n return dom.setActive();\n } // in IE\n\n\n if (preventScrollSupported) {\n return dom.focus(preventScrollSupported);\n }\n\n var stored = scrollStack(dom);\n dom.focus(preventScrollSupported == null ? {\n get preventScroll() {\n preventScrollSupported = {\n preventScroll: true\n };\n return true;\n }\n\n } : undefined);\n\n if (!preventScrollSupported) {\n preventScrollSupported = false;\n restoreScrollStack(stored, 0);\n }\n}\n\nfunction findOffsetInNode(node, coords) {\n var closest,\n dxClosest = 2e8,\n coordsClosest,\n offset = 0;\n var rowBot = coords.top,\n rowTop = coords.top;\n\n for (var child = node.firstChild, childIndex = 0; child; child = child.nextSibling, childIndex++) {\n var rects = void 0;\n\n if (child.nodeType == 1) {\n rects = child.getClientRects();\n } else if (child.nodeType == 3) {\n rects = textRange(child).getClientRects();\n } else {\n continue;\n }\n\n for (var i = 0; i < rects.length; i++) {\n var rect = rects[i];\n\n if (rect.top <= rowBot && rect.bottom >= rowTop) {\n rowBot = Math.max(rect.bottom, rowBot);\n rowTop = Math.min(rect.top, rowTop);\n var dx = rect.left > coords.left ? rect.left - coords.left : rect.right < coords.left ? coords.left - rect.right : 0;\n\n if (dx < dxClosest) {\n closest = child;\n dxClosest = dx;\n coordsClosest = dx && closest.nodeType == 3 ? {\n left: rect.right < coords.left ? rect.right : rect.left,\n top: coords.top\n } : coords;\n\n if (child.nodeType == 1 && dx) {\n offset = childIndex + (coords.left >= (rect.left + rect.right) / 2 ? 1 : 0);\n }\n\n continue;\n }\n }\n\n if (!closest && (coords.left >= rect.right && coords.top >= rect.top || coords.left >= rect.left && coords.top >= rect.bottom)) {\n offset = childIndex + 1;\n }\n }\n }\n\n if (closest && closest.nodeType == 3) {\n return findOffsetInText(closest, coordsClosest);\n }\n\n if (!closest || dxClosest && closest.nodeType == 1) {\n return {\n node: node,\n offset: offset\n };\n }\n\n return findOffsetInNode(closest, coordsClosest);\n}\n\nfunction findOffsetInText(node, coords) {\n var len = node.nodeValue.length;\n var range = document.createRange();\n\n for (var i = 0; i < len; i++) {\n range.setEnd(node, i + 1);\n range.setStart(node, i);\n var rect = singleRect(range, 1);\n\n if (rect.top == rect.bottom) {\n continue;\n }\n\n if (inRect(coords, rect)) {\n return {\n node: node,\n offset: i + (coords.left >= (rect.left + rect.right) / 2 ? 1 : 0)\n };\n }\n }\n\n return {\n node: node,\n offset: 0\n };\n}\n\nfunction inRect(coords, rect) {\n return coords.left >= rect.left - 1 && coords.left <= rect.right + 1 && coords.top >= rect.top - 1 && coords.top <= rect.bottom + 1;\n}\n\nfunction targetKludge(dom, coords) {\n var parent = dom.parentNode;\n\n if (parent && /^li$/i.test(parent.nodeName) && coords.left < dom.getBoundingClientRect().left) {\n return parent;\n }\n\n return dom;\n}\n\nfunction posFromElement(view, elt, coords) {\n var ref = findOffsetInNode(elt, coords);\n var node = ref.node;\n var offset = ref.offset;\n var bias = -1;\n\n if (node.nodeType == 1 && !node.firstChild) {\n var rect = node.getBoundingClientRect();\n bias = rect.left != rect.right && coords.left > (rect.left + rect.right) / 2 ? 1 : -1;\n }\n\n return view.docView.posFromDOM(node, offset, bias);\n}\n\nfunction posFromCaret(view, node, offset, coords) {\n // Browser (in caretPosition/RangeFromPoint) will agressively\n // normalize towards nearby inline nodes. Since we are interested in\n // positions between block nodes too, we first walk up the hierarchy\n // of nodes to see if there are block nodes that the coordinates\n // fall outside of. If so, we take the position before/after that\n // block. If not, we call `posFromDOM` on the raw node/offset.\n var outside = -1;\n\n for (var cur = node;;) {\n if (cur == view.dom) {\n break;\n }\n\n var desc = view.docView.nearestDesc(cur, true);\n\n if (!desc) {\n return null;\n }\n\n if (desc.node.isBlock && desc.parent) {\n var rect = desc.dom.getBoundingClientRect();\n\n if (rect.left > coords.left || rect.top > coords.top) {\n outside = desc.posBefore;\n } else if (rect.right < coords.left || rect.bottom < coords.top) {\n outside = desc.posAfter;\n } else {\n break;\n }\n }\n\n cur = desc.dom.parentNode;\n }\n\n return outside > -1 ? outside : view.docView.posFromDOM(node, offset);\n}\n\nfunction elementFromPoint(element, coords, box) {\n var len = element.childNodes.length;\n\n if (len && box.top < box.bottom) {\n for (var startI = Math.max(0, Math.min(len - 1, Math.floor(len * (coords.top - box.top) / (box.bottom - box.top)) - 2)), i = startI;;) {\n var child = element.childNodes[i];\n\n if (child.nodeType == 1) {\n var rects = child.getClientRects();\n\n for (var j = 0; j < rects.length; j++) {\n var rect = rects[j];\n\n if (inRect(coords, rect)) {\n return elementFromPoint(child, coords, rect);\n }\n }\n }\n\n if ((i = (i + 1) % len) == startI) {\n break;\n }\n }\n }\n\n return element;\n} // Given an x,y position on the editor, get the position in the document.\n\n\nfunction posAtCoords(view, coords) {\n var assign, assign$1;\n var root = view.root,\n node,\n offset;\n\n if (root.caretPositionFromPoint) {\n try {\n // Firefox throws for this call in hard-to-predict circumstances (#994)\n var pos$1 = root.caretPositionFromPoint(coords.left, coords.top);\n\n if (pos$1) {\n assign = pos$1, node = assign.offsetNode, offset = assign.offset;\n }\n } catch (_) {}\n }\n\n if (!node && root.caretRangeFromPoint) {\n var range = root.caretRangeFromPoint(coords.left, coords.top);\n\n if (range) {\n assign$1 = range, node = assign$1.startContainer, offset = assign$1.startOffset;\n }\n }\n\n var elt = root.elementFromPoint(coords.left, coords.top + 1),\n pos;\n\n if (!elt || !view.dom.contains(elt.nodeType != 1 ? elt.parentNode : elt)) {\n var box = view.dom.getBoundingClientRect();\n\n if (!inRect(coords, box)) {\n return null;\n }\n\n elt = elementFromPoint(view.dom, coords, box);\n\n if (!elt) {\n return null;\n }\n }\n\n elt = targetKludge(elt, coords);\n\n if (node) {\n if (result.gecko && node.nodeType == 1) {\n // Firefox will sometimes return offsets into nodes, which\n // have no actual children, from caretPositionFromPoint (#953)\n offset = Math.min(offset, node.childNodes.length); // It'll also move the returned position before image nodes,\n // even if those are behind it.\n\n if (offset < node.childNodes.length) {\n var next = node.childNodes[offset],\n box$1;\n\n if (next.nodeName == \"IMG\" && (box$1 = next.getBoundingClientRect()).right <= coords.left && box$1.bottom > coords.top) {\n offset++;\n }\n }\n } // Suspiciously specific kludge to work around caret*FromPoint\n // never returning a position at the end of the document\n\n\n if (node == view.dom && offset == node.childNodes.length - 1 && node.lastChild.nodeType == 1 && coords.top > node.lastChild.getBoundingClientRect().bottom) {\n pos = view.state.doc.content.size;\n } // Ignore positions directly after a BR, since caret*FromPoint\n // 'round up' positions that would be more accurately placed\n // before the BR node.\n else if (offset == 0 || node.nodeType != 1 || node.childNodes[offset - 1].nodeName != \"BR\") {\n pos = posFromCaret(view, node, offset, coords);\n }\n }\n\n if (pos == null) {\n pos = posFromElement(view, elt, coords);\n }\n\n var desc = view.docView.nearestDesc(elt, true);\n return {\n pos: pos,\n inside: desc ? desc.posAtStart - desc.border : -1\n };\n}\n\nfunction singleRect(object, bias) {\n var rects = object.getClientRects();\n return !rects.length ? object.getBoundingClientRect() : rects[bias < 0 ? 0 : rects.length - 1];\n} // : (EditorView, number) → {left: number, top: number, right: number, bottom: number}\n// Given a position in the document model, get a bounding box of the\n// character at that position, relative to the window.\n\n\nfunction coordsAtPos(view, pos) {\n var ref = view.docView.domFromPos(pos);\n var node = ref.node;\n var offset = ref.offset; // These browsers support querying empty text ranges\n\n if (node.nodeType == 3 && (result.chrome || result.gecko)) {\n var rect = singleRect(textRange(node, offset, offset), 0); // Firefox returns bad results (the position before the space)\n // when querying a position directly after line-broken\n // whitespace. Detect this situation and and kludge around it\n\n if (result.gecko && offset && /\\s/.test(node.nodeValue[offset - 1]) && offset < node.nodeValue.length) {\n var rectBefore = singleRect(textRange(node, offset - 1, offset - 1), -1);\n\n if (Math.abs(rectBefore.left - rect.left) < 1 && rectBefore.top == rect.top) {\n var rectAfter = singleRect(textRange(node, offset, offset + 1), -1);\n return flattenV(rectAfter, rectAfter.left < rectBefore.left);\n }\n }\n\n return rect;\n }\n\n if (node.nodeType == 1 && !view.state.doc.resolve(pos).parent.inlineContent) {\n // Return a horizontal line in block context\n var top = true,\n rect$1;\n\n if (offset < node.childNodes.length) {\n var after = node.childNodes[offset];\n\n if (after.nodeType == 1) {\n rect$1 = after.getBoundingClientRect();\n }\n }\n\n if (!rect$1 && offset) {\n var before = node.childNodes[offset - 1];\n\n if (before.nodeType == 1) {\n rect$1 = before.getBoundingClientRect();\n top = false;\n }\n }\n\n return flattenH(rect$1 || node.getBoundingClientRect(), top);\n } // Not Firefox/Chrome, or not in a text node, so we have to use\n // actual element/character rectangles to get a solution (this part\n // is not very bidi-safe)\n //\n // Try the left side first, fall back to the right one if that\n // doesn't work.\n\n\n for (var dir = -1; dir < 2; dir += 2) {\n if (dir < 0 && offset) {\n var prev = void 0,\n target = node.nodeType == 3 ? textRange(node, offset - 1, offset) : (prev = node.childNodes[offset - 1]).nodeType == 3 ? textRange(prev) : prev.nodeType == 1 && prev.nodeName != \"BR\" ? prev : null; // BR nodes tend to only return the rectangle before them\n\n if (target) {\n var rect$2 = singleRect(target, 1);\n\n if (rect$2.top < rect$2.bottom) {\n return flattenV(rect$2, false);\n }\n }\n } else if (dir > 0 && offset < nodeSize(node)) {\n var next = void 0,\n target$1 = node.nodeType == 3 ? textRange(node, offset, offset + 1) : (next = node.childNodes[offset]).nodeType == 3 ? textRange(next) : next.nodeType == 1 ? next : null;\n\n if (target$1) {\n var rect$3 = singleRect(target$1, -1);\n\n if (rect$3.top < rect$3.bottom) {\n return flattenV(rect$3, true);\n }\n }\n }\n } // All else failed, just try to get a rectangle for the target node\n\n\n return flattenV(singleRect(node.nodeType == 3 ? textRange(node) : node, 0), false);\n}\n\nfunction flattenV(rect, left) {\n if (rect.width == 0) {\n return rect;\n }\n\n var x = left ? rect.left : rect.right;\n return {\n top: rect.top,\n bottom: rect.bottom,\n left: x,\n right: x\n };\n}\n\nfunction flattenH(rect, top) {\n if (rect.height == 0) {\n return rect;\n }\n\n var y = top ? rect.top : rect.bottom;\n return {\n top: y,\n bottom: y,\n left: rect.left,\n right: rect.right\n };\n}\n\nfunction withFlushedState(view, state, f) {\n var viewState = view.state,\n active = view.root.activeElement;\n\n if (viewState != state) {\n view.updateState(state);\n }\n\n if (active != view.dom) {\n view.focus();\n }\n\n try {\n return f();\n } finally {\n if (viewState != state) {\n view.updateState(viewState);\n }\n\n if (active != view.dom) {\n active.focus();\n }\n }\n} // : (EditorView, number, number)\n// Whether vertical position motion in a given direction\n// from a position would leave a text block.\n\n\nfunction endOfTextblockVertical(view, state, dir) {\n var sel = state.selection;\n var $pos = dir == \"up\" ? sel.$anchor.min(sel.$head) : sel.$anchor.max(sel.$head);\n return withFlushedState(view, state, function () {\n var ref = view.docView.domFromPos($pos.pos);\n var dom = ref.node;\n\n for (;;) {\n var nearest = view.docView.nearestDesc(dom, true);\n\n if (!nearest) {\n break;\n }\n\n if (nearest.node.isBlock) {\n dom = nearest.dom;\n break;\n }\n\n dom = nearest.dom.parentNode;\n }\n\n var coords = coordsAtPos(view, $pos.pos);\n\n for (var child = dom.firstChild; child; child = child.nextSibling) {\n var boxes = void 0;\n\n if (child.nodeType == 1) {\n boxes = child.getClientRects();\n } else if (child.nodeType == 3) {\n boxes = textRange(child, 0, child.nodeValue.length).getClientRects();\n } else {\n continue;\n }\n\n for (var i = 0; i < boxes.length; i++) {\n var box = boxes[i];\n\n if (box.bottom > box.top && (dir == \"up\" ? box.bottom < coords.top + 1 : box.top > coords.bottom - 1)) {\n return false;\n }\n }\n }\n\n return true;\n });\n}\n\nvar maybeRTL = /[\\u0590-\\u08ac]/;\n\nfunction endOfTextblockHorizontal(view, state, dir) {\n var ref = state.selection;\n var $head = ref.$head;\n\n if (!$head.parent.isTextblock) {\n return false;\n }\n\n var offset = $head.parentOffset,\n atStart = !offset,\n atEnd = offset == $head.parent.content.size;\n var sel = getSelection(); // If the textblock is all LTR, or the browser doesn't support\n // Selection.modify (Edge), fall back to a primitive approach\n\n if (!maybeRTL.test($head.parent.textContent) || !sel.modify) {\n return dir == \"left\" || dir == \"backward\" ? atStart : atEnd;\n }\n\n return withFlushedState(view, state, function () {\n // This is a huge hack, but appears to be the best we can\n // currently do: use `Selection.modify` to move the selection by\n // one character, and see if that moves the cursor out of the\n // textblock (or doesn't move it at all, when at the start/end of\n // the document).\n var oldRange = sel.getRangeAt(0),\n oldNode = sel.focusNode,\n oldOff = sel.focusOffset;\n var oldBidiLevel = sel.caretBidiLevel; // Only for Firefox\n\n sel.modify(\"move\", dir, \"character\");\n var parentDOM = $head.depth ? view.docView.domAfterPos($head.before()) : view.dom;\n var result = !parentDOM.contains(sel.focusNode.nodeType == 1 ? sel.focusNode : sel.focusNode.parentNode) || oldNode == sel.focusNode && oldOff == sel.focusOffset; // Restore the previous selection\n\n sel.removeAllRanges();\n sel.addRange(oldRange);\n\n if (oldBidiLevel != null) {\n sel.caretBidiLevel = oldBidiLevel;\n }\n\n return result;\n });\n}\n\nvar cachedState = null,\n cachedDir = null,\n cachedResult = false;\n\nfunction endOfTextblock(view, state, dir) {\n if (cachedState == state && cachedDir == dir) {\n return cachedResult;\n }\n\n cachedState = state;\n cachedDir = dir;\n return cachedResult = dir == \"up\" || dir == \"down\" ? endOfTextblockVertical(view, state, dir) : endOfTextblockHorizontal(view, state, dir);\n} // NodeView:: interface\n//\n// By default, document nodes are rendered using the result of the\n// [`toDOM`](#model.NodeSpec.toDOM) method of their spec, and managed\n// entirely by the editor. For some use cases, such as embedded\n// node-specific editing interfaces, you want more control over\n// the behavior of a node's in-editor representation, and need to\n// [define](#view.EditorProps.nodeViews) a custom node view.\n//\n// Objects returned as node views must conform to this interface.\n//\n// dom:: ?dom.Node\n// The outer DOM node that represents the document node. When not\n// given, the default strategy is used to create a DOM node.\n//\n// contentDOM:: ?dom.Node\n// The DOM node that should hold the node's content. Only meaningful\n// if the node view also defines a `dom` property and if its node\n// type is not a leaf node type. When this is present, ProseMirror\n// will take care of rendering the node's children into it. When it\n// is not present, the node view itself is responsible for rendering\n// (or deciding not to render) its child nodes.\n//\n// update:: ?(node: Node, decorations: [Decoration]) → bool\n// When given, this will be called when the view is updating itself.\n// It will be given a node (possibly of a different type), and an\n// array of active decorations (which are automatically drawn, and\n// the node view may ignore if it isn't interested in them), and\n// should return true if it was able to update to that node, and\n// false otherwise. If the node view has a `contentDOM` property (or\n// no `dom` property), updating its child nodes will be handled by\n// ProseMirror.\n//\n// selectNode:: ?()\n// Can be used to override the way the node's selected status (as a\n// node selection) is displayed.\n//\n// deselectNode:: ?()\n// When defining a `selectNode` method, you should also provide a\n// `deselectNode` method to remove the effect again.\n//\n// setSelection:: ?(anchor: number, head: number, root: dom.Document)\n// This will be called to handle setting the selection inside the\n// node. The `anchor` and `head` positions are relative to the start\n// of the node. By default, a DOM selection will be created between\n// the DOM positions corresponding to those positions, but if you\n// override it you can do something else.\n//\n// stopEvent:: ?(event: dom.Event) → bool\n// Can be used to prevent the editor view from trying to handle some\n// or all DOM events that bubble up from the node view. Events for\n// which this returns true are not handled by the editor.\n//\n// ignoreMutation:: ?(dom.MutationRecord) → bool\n// Called when a DOM\n// [mutation](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver)\n// or a selection change happens within the view. When the change is\n// a selection change, the record will have a `type` property of\n// `\"selection\"` (which doesn't occur for native mutation records).\n// Return false if the editor should re-read the selection or\n// re-parse the range around the mutation, true if it can safely be\n// ignored.\n//\n// destroy:: ?()\n// Called when the node view is removed from the editor or the whole\n// editor is destroyed.\n// View descriptions are data structures that describe the DOM that is\n// used to represent the editor's content. They are used for:\n//\n// - Incremental redrawing when the document changes\n//\n// - Figuring out what part of the document a given DOM position\n// corresponds to\n//\n// - Wiring in custom implementations of the editing interface for a\n// given node\n//\n// They form a doubly-linked mutable tree, starting at `view.docView`.\n\n\nvar NOT_DIRTY = 0,\n CHILD_DIRTY = 1,\n CONTENT_DIRTY = 2,\n NODE_DIRTY = 3; // Superclass for the various kinds of descriptions. Defines their\n// basic structure and shared methods.\n\nvar ViewDesc = function ViewDesc(parent, children, dom, contentDOM) {\n this.parent = parent;\n this.children = children;\n this.dom = dom; // An expando property on the DOM node provides a link back to its\n // description.\n\n dom.pmViewDesc = this; // This is the node that holds the child views. It may be null for\n // descs that don't have children.\n\n this.contentDOM = contentDOM;\n this.dirty = NOT_DIRTY;\n};\n\nvar prototypeAccessors = {\n beforePosition: {\n configurable: true\n },\n size: {\n configurable: true\n },\n border: {\n configurable: true\n },\n posBefore: {\n configurable: true\n },\n posAtStart: {\n configurable: true\n },\n posAfter: {\n configurable: true\n },\n posAtEnd: {\n configurable: true\n },\n contentLost: {\n configurable: true\n }\n}; // Used to check whether a given description corresponds to a\n// widget/mark/node.\n\nViewDesc.prototype.matchesWidget = function matchesWidget() {\n return false;\n};\n\nViewDesc.prototype.matchesMark = function matchesMark() {\n return false;\n};\n\nViewDesc.prototype.matchesNode = function matchesNode() {\n return false;\n};\n\nViewDesc.prototype.matchesHack = function matchesHack() {\n return false;\n};\n\nprototypeAccessors.beforePosition.get = function () {\n return false;\n}; // : () → ?ParseRule\n// When parsing in-editor content (in domchange.js), we allow\n// descriptions to determine the parse rules that should be used to\n// parse them.\n\n\nViewDesc.prototype.parseRule = function parseRule() {\n return null;\n}; // : (dom.Event) → bool\n// Used by the editor's event handler to ignore events that come\n// from certain descs.\n\n\nViewDesc.prototype.stopEvent = function stopEvent() {\n return false;\n}; // The size of the content represented by this desc.\n\n\nprototypeAccessors.size.get = function () {\n var size = 0;\n\n for (var i = 0; i < this.children.length; i++) {\n size += this.children[i].size;\n }\n\n return size;\n}; // For block nodes, this represents the space taken up by their\n// start/end tokens.\n\n\nprototypeAccessors.border.get = function () {\n return 0;\n};\n\nViewDesc.prototype.destroy = function destroy() {\n this.parent = null;\n\n if (this.dom.pmViewDesc == this) {\n this.dom.pmViewDesc = null;\n }\n\n for (var i = 0; i < this.children.length; i++) {\n this.children[i].destroy();\n }\n};\n\nViewDesc.prototype.posBeforeChild = function posBeforeChild(child) {\n for (var i = 0, pos = this.posAtStart; i < this.children.length; i++) {\n var cur = this.children[i];\n\n if (cur == child) {\n return pos;\n }\n\n pos += cur.size;\n }\n};\n\nprototypeAccessors.posBefore.get = function () {\n return this.parent.posBeforeChild(this);\n};\n\nprototypeAccessors.posAtStart.get = function () {\n return this.parent ? this.parent.posBeforeChild(this) + this.border : 0;\n};\n\nprototypeAccessors.posAfter.get = function () {\n return this.posBefore + this.size;\n};\n\nprototypeAccessors.posAtEnd.get = function () {\n return this.posAtStart + this.size - 2 * this.border;\n}; // : (dom.Node, number, ?number) → number\n\n\nViewDesc.prototype.localPosFromDOM = function localPosFromDOM(dom, offset, bias) {\n // If the DOM position is in the content, use the child desc after\n // it to figure out a position.\n if (this.contentDOM && this.contentDOM.contains(dom.nodeType == 1 ? dom : dom.parentNode)) {\n if (bias < 0) {\n var domBefore, desc;\n\n if (dom == this.contentDOM) {\n domBefore = dom.childNodes[offset - 1];\n } else {\n while (dom.parentNode != this.contentDOM) {\n dom = dom.parentNode;\n }\n\n domBefore = dom.previousSibling;\n }\n\n while (domBefore && !((desc = domBefore.pmViewDesc) && desc.parent == this)) {\n domBefore = domBefore.previousSibling;\n }\n\n return domBefore ? this.posBeforeChild(desc) + desc.size : this.posAtStart;\n } else {\n var domAfter, desc$1;\n\n if (dom == this.contentDOM) {\n domAfter = dom.childNodes[offset];\n } else {\n while (dom.parentNode != this.contentDOM) {\n dom = dom.parentNode;\n }\n\n domAfter = dom.nextSibling;\n }\n\n while (domAfter && !((desc$1 = domAfter.pmViewDesc) && desc$1.parent == this)) {\n domAfter = domAfter.nextSibling;\n }\n\n return domAfter ? this.posBeforeChild(desc$1) : this.posAtEnd;\n }\n } // Otherwise, use various heuristics, falling back on the bias\n // parameter, to determine whether to return the position at the\n // start or at the end of this view desc.\n\n\n var atEnd;\n\n if (this.contentDOM && this.contentDOM != this.dom && this.dom.contains(this.contentDOM)) {\n atEnd = dom.compareDocumentPosition(this.contentDOM) & 2;\n } else if (this.dom.firstChild) {\n if (offset == 0) {\n for (var search = dom;; search = search.parentNode) {\n if (search == this.dom) {\n atEnd = false;\n break;\n }\n\n if (search.parentNode.firstChild != search) {\n break;\n }\n }\n }\n\n if (atEnd == null && offset == dom.childNodes.length) {\n for (var search$1 = dom;; search$1 = search$1.parentNode) {\n if (search$1 == this.dom) {\n atEnd = true;\n break;\n }\n\n if (search$1.parentNode.lastChild != search$1) {\n break;\n }\n }\n }\n }\n\n return (atEnd == null ? bias > 0 : atEnd) ? this.posAtEnd : this.posAtStart;\n}; // Scan up the dom finding the first desc that is a descendant of\n// this one.\n\n\nViewDesc.prototype.nearestDesc = function nearestDesc(dom, onlyNodes) {\n for (var first = true, cur = dom; cur; cur = cur.parentNode) {\n var desc = this.getDesc(cur);\n\n if (desc && (!onlyNodes || desc.node)) {\n // If dom is outside of this desc's nodeDOM, don't count it.\n if (first && desc.nodeDOM && !(desc.nodeDOM.nodeType == 1 ? desc.nodeDOM.contains(dom) : desc.nodeDOM == dom)) {\n first = false;\n } else {\n return desc;\n }\n }\n }\n};\n\nViewDesc.prototype.getDesc = function getDesc(dom) {\n var desc = dom.pmViewDesc;\n\n for (var cur = desc; cur; cur = cur.parent) {\n if (cur == this) {\n return desc;\n }\n }\n};\n\nViewDesc.prototype.posFromDOM = function posFromDOM(dom, offset, bias) {\n for (var scan = dom;; scan = scan.parentNode) {\n var desc = this.getDesc(scan);\n\n if (desc) {\n return desc.localPosFromDOM(dom, offset, bias);\n }\n }\n}; // : (number) → ?NodeViewDesc\n// Find the desc for the node after the given pos, if any. (When a\n// parent node overrode rendering, there might not be one.)\n\n\nViewDesc.prototype.descAt = function descAt(pos) {\n for (var i = 0, offset = 0; i < this.children.length; i++) {\n var child = this.children[i],\n end = offset + child.size;\n\n if (offset == pos && end != offset) {\n while (!child.border && child.children.length) {\n child = child.children[0];\n }\n\n return child;\n }\n\n if (pos < end) {\n return child.descAt(pos - offset - child.border);\n }\n\n offset = end;\n }\n}; // : (number) → {node: dom.Node, offset: number}\n\n\nViewDesc.prototype.domFromPos = function domFromPos(pos) {\n if (!this.contentDOM) {\n return {\n node: this.dom,\n offset: 0\n };\n }\n\n for (var offset = 0, i = 0;; i++) {\n if (offset == pos) {\n while (i < this.children.length && (this.children[i].beforePosition || this.children[i].dom.parentNode != this.contentDOM)) {\n i++;\n }\n\n return {\n node: this.contentDOM,\n offset: i == this.children.length ? this.contentDOM.childNodes.length : domIndex(this.children[i].dom)\n };\n }\n\n if (i == this.children.length) {\n throw new Error(\"Invalid position \" + pos);\n }\n\n var child = this.children[i],\n end = offset + child.size;\n\n if (pos < end) {\n return child.domFromPos(pos - offset - child.border);\n }\n\n offset = end;\n }\n}; // Used to find a DOM range in a single parent for a given changed\n// range.\n\n\nViewDesc.prototype.parseRange = function parseRange(from, to, base) {\n if (base === void 0) base = 0;\n\n if (this.children.length == 0) {\n return {\n node: this.contentDOM,\n from: from,\n to: to,\n fromOffset: 0,\n toOffset: this.contentDOM.childNodes.length\n };\n }\n\n var fromOffset = -1,\n toOffset = -1;\n\n for (var offset = base, i = 0;; i++) {\n var child = this.children[i],\n end = offset + child.size;\n\n if (fromOffset == -1 && from <= end) {\n var childBase = offset + child.border; // FIXME maybe descend mark views to parse a narrower range?\n\n if (from >= childBase && to <= end - child.border && child.node && child.contentDOM && this.contentDOM.contains(child.contentDOM)) {\n return child.parseRange(from, to, childBase);\n }\n\n from = offset;\n\n for (var j = i; j > 0; j--) {\n var prev = this.children[j - 1];\n\n if (prev.size && prev.dom.parentNode == this.contentDOM && !prev.emptyChildAt(1)) {\n fromOffset = domIndex(prev.dom) + 1;\n break;\n }\n\n from -= prev.size;\n }\n\n if (fromOffset == -1) {\n fromOffset = 0;\n }\n }\n\n if (fromOffset > -1 && to <= end) {\n to = end;\n\n for (var j$1 = i + 1; j$1 < this.children.length; j$1++) {\n var next = this.children[j$1];\n\n if (next.size && next.dom.parentNode == this.contentDOM && !next.emptyChildAt(-1)) {\n toOffset = domIndex(next.dom);\n break;\n }\n\n to += next.size;\n }\n\n if (toOffset == -1) {\n toOffset = this.contentDOM.childNodes.length;\n }\n\n break;\n }\n\n offset = end;\n }\n\n return {\n node: this.contentDOM,\n from: from,\n to: to,\n fromOffset: fromOffset,\n toOffset: toOffset\n };\n};\n\nViewDesc.prototype.emptyChildAt = function emptyChildAt(side) {\n if (this.border || !this.contentDOM || !this.children.length) {\n return false;\n }\n\n var child = this.children[side < 0 ? 0 : this.children.length - 1];\n return child.size == 0 || child.emptyChildAt(side);\n}; // : (number) → dom.Node\n\n\nViewDesc.prototype.domAfterPos = function domAfterPos(pos) {\n var ref = this.domFromPos(pos);\n var node = ref.node;\n var offset = ref.offset;\n\n if (node.nodeType != 1 || offset == node.childNodes.length) {\n throw new RangeError(\"No node after pos \" + pos);\n }\n\n return node.childNodes[offset];\n}; // : (number, number, dom.Document)\n// View descs are responsible for setting any selection that falls\n// entirely inside of them, so that custom implementations can do\n// custom things with the selection. Note that this falls apart when\n// a selection starts in such a node and ends in another, in which\n// case we just use whatever domFromPos produces as a best effort.\n\n\nViewDesc.prototype.setSelection = function setSelection(anchor, head, root, force) {\n // If the selection falls entirely in a child, give it to that child\n var from = Math.min(anchor, head),\n to = Math.max(anchor, head);\n\n for (var i = 0, offset = 0; i < this.children.length; i++) {\n var child = this.children[i],\n end = offset + child.size;\n\n if (from > offset && to < end) {\n return child.setSelection(anchor - offset - child.border, head - offset - child.border, root, force);\n }\n\n offset = end;\n }\n\n var anchorDOM = this.domFromPos(anchor),\n headDOM = this.domFromPos(head);\n var domSel = root.getSelection(),\n range = document.createRange();\n\n if (!force && isEquivalentPosition(anchorDOM.node, anchorDOM.offset, domSel.anchorNode, domSel.anchorOffset) && isEquivalentPosition(headDOM.node, headDOM.offset, domSel.focusNode, domSel.focusOffset)) {\n return;\n } // Selection.extend can be used to create an 'inverted' selection\n // (one where the focus is before the anchor), but not all\n // browsers support it yet.\n\n\n if (domSel.extend) {\n range.setEnd(anchorDOM.node, anchorDOM.offset);\n range.collapse(false);\n } else {\n if (anchor > head) {\n var tmp = anchorDOM;\n anchorDOM = headDOM;\n headDOM = tmp;\n }\n\n range.setEnd(headDOM.node, headDOM.offset);\n range.setStart(anchorDOM.node, anchorDOM.offset);\n }\n\n domSel.removeAllRanges();\n domSel.addRange(range);\n\n if (domSel.extend) {\n domSel.extend(headDOM.node, headDOM.offset);\n }\n}; // : (dom.MutationRecord) → bool\n\n\nViewDesc.prototype.ignoreMutation = function ignoreMutation(mutation) {\n return !this.contentDOM && mutation.type != \"selection\";\n};\n\nprototypeAccessors.contentLost.get = function () {\n return this.contentDOM && this.contentDOM != this.dom && !this.dom.contains(this.contentDOM);\n}; // Remove a subtree of the element tree that has been touched\n// by a DOM change, so that the next update will redraw it.\n\n\nViewDesc.prototype.markDirty = function markDirty(from, to) {\n for (var offset = 0, i = 0; i < this.children.length; i++) {\n var child = this.children[i],\n end = offset + child.size;\n\n if (offset == end ? from <= end && to >= offset : from < end && to > offset) {\n var startInside = offset + child.border,\n endInside = end - child.border;\n\n if (from >= startInside && to <= endInside) {\n this.dirty = from == offset || to == end ? CONTENT_DIRTY : CHILD_DIRTY;\n\n if (from == startInside && to == endInside && (child.contentLost || child.dom.parentNode != this.contentDOM)) {\n child.dirty = NODE_DIRTY;\n } else {\n child.markDirty(from - startInside, to - startInside);\n }\n\n return;\n } else {\n child.dirty = NODE_DIRTY;\n }\n }\n\n offset = end;\n }\n\n this.dirty = CONTENT_DIRTY;\n};\n\nViewDesc.prototype.markParentsDirty = function markParentsDirty() {\n for (var node = this.parent; node; node = node.parent) {\n var dirty = CONTENT_DIRTY;\n\n if (node.dirty < dirty) {\n node.dirty = dirty;\n }\n }\n};\n\nObject.defineProperties(ViewDesc.prototype, prototypeAccessors); // Reused array to avoid allocating fresh arrays for things that will\n// stay empty anyway.\n\nvar nothing = []; // A widget desc represents a widget decoration, which is a DOM node\n// drawn between the document nodes.\n\nvar WidgetViewDesc = /*@__PURE__*/function (ViewDesc) {\n function WidgetViewDesc(parent, widget, view, pos) {\n var self,\n dom = widget.type.toDOM;\n\n if (typeof dom == \"function\") {\n dom = dom(view, function () {\n if (!self) {\n return pos;\n }\n\n if (self.parent) {\n return self.parent.posBeforeChild(self);\n }\n });\n }\n\n if (!widget.type.spec.raw) {\n if (dom.nodeType != 1) {\n var wrap = document.createElement(\"span\");\n wrap.appendChild(dom);\n dom = wrap;\n }\n\n dom.contentEditable = false;\n dom.classList.add(\"ProseMirror-widget\");\n }\n\n ViewDesc.call(this, parent, nothing, dom, null);\n this.widget = widget;\n self = this;\n }\n\n if (ViewDesc) WidgetViewDesc.__proto__ = ViewDesc;\n WidgetViewDesc.prototype = Object.create(ViewDesc && ViewDesc.prototype);\n WidgetViewDesc.prototype.constructor = WidgetViewDesc;\n var prototypeAccessors$1 = {\n beforePosition: {\n configurable: true\n }\n };\n\n prototypeAccessors$1.beforePosition.get = function () {\n return this.widget.type.side < 0;\n };\n\n WidgetViewDesc.prototype.matchesWidget = function matchesWidget(widget) {\n return this.dirty == NOT_DIRTY && widget.type.eq(this.widget.type);\n };\n\n WidgetViewDesc.prototype.parseRule = function parseRule() {\n return {\n ignore: true\n };\n };\n\n WidgetViewDesc.prototype.stopEvent = function stopEvent(event) {\n var stop = this.widget.spec.stopEvent;\n return stop ? stop(event) : false;\n };\n\n WidgetViewDesc.prototype.ignoreMutation = function ignoreMutation(mutation) {\n return mutation.type != \"selection\" || this.widget.spec.ignoreSelection;\n };\n\n Object.defineProperties(WidgetViewDesc.prototype, prototypeAccessors$1);\n return WidgetViewDesc;\n}(ViewDesc);\n\nvar CompositionViewDesc = /*@__PURE__*/function (ViewDesc) {\n function CompositionViewDesc(parent, dom, textDOM, text) {\n ViewDesc.call(this, parent, nothing, dom, null);\n this.textDOM = textDOM;\n this.text = text;\n }\n\n if (ViewDesc) CompositionViewDesc.__proto__ = ViewDesc;\n CompositionViewDesc.prototype = Object.create(ViewDesc && ViewDesc.prototype);\n CompositionViewDesc.prototype.constructor = CompositionViewDesc;\n var prototypeAccessors$2 = {\n size: {\n configurable: true\n }\n };\n\n prototypeAccessors$2.size.get = function () {\n return this.text.length;\n };\n\n CompositionViewDesc.prototype.localPosFromDOM = function localPosFromDOM(dom, offset) {\n if (dom != this.textDOM) {\n return this.posAtStart + (offset ? this.size : 0);\n }\n\n return this.posAtStart + offset;\n };\n\n CompositionViewDesc.prototype.domFromPos = function domFromPos(pos) {\n return {\n node: this.textDOM,\n offset: pos\n };\n };\n\n CompositionViewDesc.prototype.ignoreMutation = function ignoreMutation(mut) {\n return mut.type === 'characterData' && mut.target.nodeValue == mut.oldValue;\n };\n\n Object.defineProperties(CompositionViewDesc.prototype, prototypeAccessors$2);\n return CompositionViewDesc;\n}(ViewDesc); // A mark desc represents a mark. May have multiple children,\n// depending on how the mark is split. Note that marks are drawn using\n// a fixed nesting order, for simplicity and predictability, so in\n// some cases they will be split more often than would appear\n// necessary.\n\n\nvar MarkViewDesc = /*@__PURE__*/function (ViewDesc) {\n function MarkViewDesc(parent, mark, dom, contentDOM) {\n ViewDesc.call(this, parent, [], dom, contentDOM);\n this.mark = mark;\n }\n\n if (ViewDesc) MarkViewDesc.__proto__ = ViewDesc;\n MarkViewDesc.prototype = Object.create(ViewDesc && ViewDesc.prototype);\n MarkViewDesc.prototype.constructor = MarkViewDesc;\n\n MarkViewDesc.create = function create(parent, mark, inline, view) {\n var custom = view.nodeViews[mark.type.name];\n var spec = custom && custom(mark, view, inline);\n\n if (!spec || !spec.dom) {\n spec = prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"DOMSerializer\"].renderSpec(document, mark.type.spec.toDOM(mark, inline));\n }\n\n return new MarkViewDesc(parent, mark, spec.dom, spec.contentDOM || spec.dom);\n };\n\n MarkViewDesc.prototype.parseRule = function parseRule() {\n return {\n mark: this.mark.type.name,\n attrs: this.mark.attrs,\n contentElement: this.contentDOM\n };\n };\n\n MarkViewDesc.prototype.matchesMark = function matchesMark(mark) {\n return this.dirty != NODE_DIRTY && this.mark.eq(mark);\n };\n\n MarkViewDesc.prototype.markDirty = function markDirty(from, to) {\n ViewDesc.prototype.markDirty.call(this, from, to); // Move dirty info to nearest node view\n\n if (this.dirty != NOT_DIRTY) {\n var parent = this.parent;\n\n while (!parent.node) {\n parent = parent.parent;\n }\n\n if (parent.dirty < this.dirty) {\n parent.dirty = this.dirty;\n }\n\n this.dirty = NOT_DIRTY;\n }\n };\n\n MarkViewDesc.prototype.slice = function slice(from, to, view) {\n var copy = MarkViewDesc.create(this.parent, this.mark, true, view);\n var nodes = this.children,\n size = this.size;\n\n if (to < size) {\n nodes = replaceNodes(nodes, to, size, view);\n }\n\n if (from > 0) {\n nodes = replaceNodes(nodes, 0, from, view);\n }\n\n for (var i = 0; i < nodes.length; i++) {\n nodes[i].parent = copy;\n }\n\n copy.children = nodes;\n return copy;\n };\n\n return MarkViewDesc;\n}(ViewDesc); // Node view descs are the main, most common type of view desc, and\n// correspond to an actual node in the document. Unlike mark descs,\n// they populate their child array themselves.\n\n\nvar NodeViewDesc = /*@__PURE__*/function (ViewDesc) {\n function NodeViewDesc(parent, node, outerDeco, innerDeco, dom, contentDOM, nodeDOM, view, pos) {\n ViewDesc.call(this, parent, node.isLeaf ? nothing : [], dom, contentDOM);\n this.nodeDOM = nodeDOM;\n this.node = node;\n this.outerDeco = outerDeco;\n this.innerDeco = innerDeco;\n\n if (contentDOM) {\n this.updateChildren(view, pos);\n }\n }\n\n if (ViewDesc) NodeViewDesc.__proto__ = ViewDesc;\n NodeViewDesc.prototype = Object.create(ViewDesc && ViewDesc.prototype);\n NodeViewDesc.prototype.constructor = NodeViewDesc;\n var prototypeAccessors$3 = {\n size: {\n configurable: true\n },\n border: {\n configurable: true\n }\n }; // By default, a node is rendered using the `toDOM` method from the\n // node type spec. But client code can use the `nodeViews` spec to\n // supply a custom node view, which can influence various aspects of\n // the way the node works.\n //\n // (Using subclassing for this was intentionally decided against,\n // since it'd require exposing a whole slew of finnicky\n // implementation details to the user code that they probably will\n // never need.)\n\n NodeViewDesc.create = function create(parent, node, outerDeco, innerDeco, view, pos) {\n var assign;\n var custom = view.nodeViews[node.type.name],\n descObj;\n var spec = custom && custom(node, view, function () {\n // (This is a function that allows the custom view to find its\n // own position)\n if (!descObj) {\n return pos;\n }\n\n if (descObj.parent) {\n return descObj.parent.posBeforeChild(descObj);\n }\n }, outerDeco);\n var dom = spec && spec.dom,\n contentDOM = spec && spec.contentDOM;\n\n if (node.isText) {\n if (!dom) {\n dom = document.createTextNode(node.text);\n } else if (dom.nodeType != 3) {\n throw new RangeError(\"Text must be rendered as a DOM text node\");\n }\n } else if (!dom) {\n assign = prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"DOMSerializer\"].renderSpec(document, node.type.spec.toDOM(node)), dom = assign.dom, contentDOM = assign.contentDOM;\n }\n\n if (!contentDOM && !node.isText && dom.nodeName != \"BR\") {\n // Chrome gets confused by
      \n if (!dom.hasAttribute(\"contenteditable\")) {\n dom.contentEditable = false;\n }\n\n if (node.type.spec.draggable) {\n dom.draggable = true;\n }\n }\n\n var nodeDOM = dom;\n dom = applyOuterDeco(dom, outerDeco, node);\n\n if (spec) {\n return descObj = new CustomNodeViewDesc(parent, node, outerDeco, innerDeco, dom, contentDOM, nodeDOM, spec, view, pos + 1);\n } else if (node.isText) {\n return new TextViewDesc(parent, node, outerDeco, innerDeco, dom, nodeDOM, view);\n } else {\n return new NodeViewDesc(parent, node, outerDeco, innerDeco, dom, contentDOM, nodeDOM, view, pos + 1);\n }\n };\n\n NodeViewDesc.prototype.parseRule = function parseRule() {\n var this$1 = this; // Experimental kludge to allow opt-in re-parsing of nodes\n\n if (this.node.type.spec.reparseInView) {\n return null;\n } // FIXME the assumption that this can always return the current\n // attrs means that if the user somehow manages to change the\n // attrs in the dom, that won't be picked up. Not entirely sure\n // whether this is a problem\n\n\n var rule = {\n node: this.node.type.name,\n attrs: this.node.attrs\n };\n\n if (this.node.type.spec.code) {\n rule.preserveWhitespace = \"full\";\n }\n\n if (this.contentDOM && !this.contentLost) {\n rule.contentElement = this.contentDOM;\n } else {\n rule.getContent = function () {\n return this$1.contentDOM ? prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].empty : this$1.node.content;\n };\n }\n\n return rule;\n };\n\n NodeViewDesc.prototype.matchesNode = function matchesNode(node, outerDeco, innerDeco) {\n return this.dirty == NOT_DIRTY && node.eq(this.node) && sameOuterDeco(outerDeco, this.outerDeco) && innerDeco.eq(this.innerDeco);\n };\n\n prototypeAccessors$3.size.get = function () {\n return this.node.nodeSize;\n };\n\n prototypeAccessors$3.border.get = function () {\n return this.node.isLeaf ? 0 : 1;\n }; // Syncs `this.children` to match `this.node.content` and the local\n // decorations, possibly introducing nesting for marks. Then, in a\n // separate step, syncs the DOM inside `this.contentDOM` to\n // `this.children`.\n\n\n NodeViewDesc.prototype.updateChildren = function updateChildren(view, pos) {\n var this$1 = this;\n var inline = this.node.inlineContent,\n off = pos;\n var composition = inline && view.composing && this.localCompositionNode(view, pos);\n var updater = new ViewTreeUpdater(this, composition && composition.node);\n iterDeco(this.node, this.innerDeco, function (widget, i, insideNode) {\n if (widget.spec.marks) {\n updater.syncToMarks(widget.spec.marks, inline, view);\n } else if (widget.type.side >= 0 && !insideNode) {\n updater.syncToMarks(i == this$1.node.childCount ? prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Mark\"].none : this$1.node.child(i).marks, inline, view);\n } // If the next node is a desc matching this widget, reuse it,\n // otherwise insert the widget as a new view desc.\n\n\n updater.placeWidget(widget, view, off);\n }, function (child, outerDeco, innerDeco, i) {\n // Make sure the wrapping mark descs match the node's marks.\n updater.syncToMarks(child.marks, inline, view); // Either find an existing desc that exactly matches this node,\n // and drop the descs before it.\n\n updater.findNodeMatch(child, outerDeco, innerDeco, i) || // Or try updating the next desc to reflect this node.\n updater.updateNextNode(child, outerDeco, innerDeco, view, i) || // Or just add it as a new desc.\n updater.addNode(child, outerDeco, innerDeco, view, off);\n off += child.nodeSize;\n }); // Drop all remaining descs after the current position.\n\n updater.syncToMarks(nothing, inline, view);\n\n if (this.node.isTextblock) {\n updater.addTextblockHacks();\n }\n\n updater.destroyRest(); // Sync the DOM if anything changed\n\n if (updater.changed || this.dirty == CONTENT_DIRTY) {\n // May have to protect focused DOM from being changed if a composition is active\n if (composition) {\n this.protectLocalComposition(view, composition);\n }\n\n this.renderChildren();\n }\n };\n\n NodeViewDesc.prototype.renderChildren = function renderChildren() {\n renderDescs(this.contentDOM, this.children);\n\n if (result.ios) {\n iosHacks(this.dom);\n }\n };\n\n NodeViewDesc.prototype.localCompositionNode = function localCompositionNode(view, pos) {\n // Only do something if both the selection and a focused text node\n // are inside of this node, and the node isn't already part of a\n // view that's a child of this view\n var ref = view.state.selection;\n var from = ref.from;\n var to = ref.to;\n\n if (!(view.state.selection instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"TextSelection\"]) || from < pos || to > pos + this.node.content.size) {\n return;\n }\n\n var sel = view.root.getSelection();\n var textNode = nearbyTextNode(sel.focusNode, sel.focusOffset);\n\n if (!textNode || !this.dom.contains(textNode.parentNode)) {\n return;\n } // Find the text in the focused node in the node, stop if it's not\n // there (may have been modified through other means, in which\n // case it should overwritten)\n\n\n var text = textNode.nodeValue;\n var textPos = findTextInFragment(this.node.content, text, from - pos, to - pos);\n return textPos < 0 ? null : {\n node: textNode,\n pos: textPos,\n text: text\n };\n };\n\n NodeViewDesc.prototype.protectLocalComposition = function protectLocalComposition(view, ref) {\n var node = ref.node;\n var pos = ref.pos;\n var text = ref.text; // The node is already part of a local view desc, leave it there\n\n if (this.getDesc(node)) {\n return;\n } // Create a composition view for the orphaned nodes\n\n\n var topNode = node;\n\n for (;; topNode = topNode.parentNode) {\n if (topNode.parentNode == this.contentDOM) {\n break;\n }\n\n while (topNode.previousSibling) {\n topNode.parentNode.removeChild(topNode.previousSibling);\n }\n\n while (topNode.nextSibling) {\n topNode.parentNode.removeChild(topNode.nextSibling);\n }\n\n if (topNode.pmViewDesc) {\n topNode.pmViewDesc = null;\n }\n }\n\n var desc = new CompositionViewDesc(this, topNode, node, text);\n view.compositionNodes.push(desc); // Patch up this.children to contain the composition view\n\n this.children = replaceNodes(this.children, pos, pos + text.length, view, desc);\n }; // : (Node, [Decoration], DecorationSet, EditorView) → bool\n // If this desc be updated to match the given node decoration,\n // do so and return true.\n\n\n NodeViewDesc.prototype.update = function update(node, outerDeco, innerDeco, view) {\n if (this.dirty == NODE_DIRTY || !node.sameMarkup(this.node)) {\n return false;\n }\n\n this.updateInner(node, outerDeco, innerDeco, view);\n return true;\n };\n\n NodeViewDesc.prototype.updateInner = function updateInner(node, outerDeco, innerDeco, view) {\n this.updateOuterDeco(outerDeco);\n this.node = node;\n this.innerDeco = innerDeco;\n\n if (this.contentDOM) {\n this.updateChildren(view, this.posAtStart);\n }\n\n this.dirty = NOT_DIRTY;\n };\n\n NodeViewDesc.prototype.updateOuterDeco = function updateOuterDeco(outerDeco) {\n if (sameOuterDeco(outerDeco, this.outerDeco)) {\n return;\n }\n\n var needsWrap = this.nodeDOM.nodeType != 1;\n var oldDOM = this.dom;\n this.dom = patchOuterDeco(this.dom, this.nodeDOM, computeOuterDeco(this.outerDeco, this.node, needsWrap), computeOuterDeco(outerDeco, this.node, needsWrap));\n\n if (this.dom != oldDOM) {\n oldDOM.pmViewDesc = null;\n this.dom.pmViewDesc = this;\n }\n\n this.outerDeco = outerDeco;\n }; // Mark this node as being the selected node.\n\n\n NodeViewDesc.prototype.selectNode = function selectNode() {\n this.nodeDOM.classList.add(\"ProseMirror-selectednode\");\n\n if (this.contentDOM || !this.node.type.spec.draggable) {\n this.dom.draggable = true;\n }\n }; // Remove selected node marking from this node.\n\n\n NodeViewDesc.prototype.deselectNode = function deselectNode() {\n this.nodeDOM.classList.remove(\"ProseMirror-selectednode\");\n\n if (this.contentDOM || !this.node.type.spec.draggable) {\n this.dom.draggable = false;\n }\n };\n\n Object.defineProperties(NodeViewDesc.prototype, prototypeAccessors$3);\n return NodeViewDesc;\n}(ViewDesc); // Create a view desc for the top-level document node, to be exported\n// and used by the view class.\n\n\nfunction docViewDesc(doc, outerDeco, innerDeco, dom, view) {\n applyOuterDeco(dom, outerDeco, doc);\n return new NodeViewDesc(null, doc, outerDeco, innerDeco, dom, dom, dom, view, 0);\n}\n\nvar TextViewDesc = /*@__PURE__*/function (NodeViewDesc) {\n function TextViewDesc(parent, node, outerDeco, innerDeco, dom, nodeDOM, view) {\n NodeViewDesc.call(this, parent, node, outerDeco, innerDeco, dom, null, nodeDOM, view);\n }\n\n if (NodeViewDesc) TextViewDesc.__proto__ = NodeViewDesc;\n TextViewDesc.prototype = Object.create(NodeViewDesc && NodeViewDesc.prototype);\n TextViewDesc.prototype.constructor = TextViewDesc;\n\n TextViewDesc.prototype.parseRule = function parseRule() {\n return {\n skip: this.nodeDOM.parentNode || true\n };\n };\n\n TextViewDesc.prototype.update = function update(node, outerDeco) {\n if (this.dirty == NODE_DIRTY || this.dirty != NOT_DIRTY && !this.inParent() || !node.sameMarkup(this.node)) {\n return false;\n }\n\n this.updateOuterDeco(outerDeco);\n\n if ((this.dirty != NOT_DIRTY || node.text != this.node.text) && node.text != this.nodeDOM.nodeValue) {\n this.nodeDOM.nodeValue = node.text;\n }\n\n this.node = node;\n this.dirty = NOT_DIRTY;\n return true;\n };\n\n TextViewDesc.prototype.inParent = function inParent() {\n var parentDOM = this.parent.contentDOM;\n\n for (var n = this.nodeDOM; n; n = n.parentNode) {\n if (n == parentDOM) {\n return true;\n }\n }\n\n return false;\n };\n\n TextViewDesc.prototype.domFromPos = function domFromPos(pos) {\n return {\n node: this.nodeDOM,\n offset: pos\n };\n };\n\n TextViewDesc.prototype.localPosFromDOM = function localPosFromDOM(dom, offset, bias) {\n if (dom == this.nodeDOM) {\n return this.posAtStart + Math.min(offset, this.node.text.length);\n }\n\n return NodeViewDesc.prototype.localPosFromDOM.call(this, dom, offset, bias);\n };\n\n TextViewDesc.prototype.ignoreMutation = function ignoreMutation(mutation) {\n return mutation.type != \"characterData\" && mutation.type != \"selection\";\n };\n\n TextViewDesc.prototype.slice = function slice(from, to, view) {\n var node = this.node.cut(from, to),\n dom = document.createTextNode(node.text);\n return new TextViewDesc(this.parent, node, this.outerDeco, this.innerDeco, dom, dom, view);\n };\n\n return TextViewDesc;\n}(NodeViewDesc); // A dummy desc used to tag trailing BR or span nodes created to work\n// around contentEditable terribleness.\n\n\nvar BRHackViewDesc = /*@__PURE__*/function (ViewDesc) {\n function BRHackViewDesc() {\n ViewDesc.apply(this, arguments);\n }\n\n if (ViewDesc) BRHackViewDesc.__proto__ = ViewDesc;\n BRHackViewDesc.prototype = Object.create(ViewDesc && ViewDesc.prototype);\n BRHackViewDesc.prototype.constructor = BRHackViewDesc;\n\n BRHackViewDesc.prototype.parseRule = function parseRule() {\n return {\n ignore: true\n };\n };\n\n BRHackViewDesc.prototype.matchesHack = function matchesHack() {\n return this.dirty == NOT_DIRTY;\n };\n\n return BRHackViewDesc;\n}(ViewDesc); // A separate subclass is used for customized node views, so that the\n// extra checks only have to be made for nodes that are actually\n// customized.\n\n\nvar CustomNodeViewDesc = /*@__PURE__*/function (NodeViewDesc) {\n function CustomNodeViewDesc(parent, node, outerDeco, innerDeco, dom, contentDOM, nodeDOM, spec, view, pos) {\n NodeViewDesc.call(this, parent, node, outerDeco, innerDeco, dom, contentDOM, nodeDOM, view, pos);\n this.spec = spec;\n }\n\n if (NodeViewDesc) CustomNodeViewDesc.__proto__ = NodeViewDesc;\n CustomNodeViewDesc.prototype = Object.create(NodeViewDesc && NodeViewDesc.prototype);\n CustomNodeViewDesc.prototype.constructor = CustomNodeViewDesc; // A custom `update` method gets to decide whether the update goes\n // through. If it does, and there's a `contentDOM` node, our logic\n // updates the children.\n\n CustomNodeViewDesc.prototype.update = function update(node, outerDeco, innerDeco, view) {\n if (this.dirty == NODE_DIRTY) {\n return false;\n }\n\n if (this.spec.update) {\n var result = this.spec.update(node, outerDeco);\n\n if (result) {\n this.updateInner(node, outerDeco, innerDeco, view);\n }\n\n return result;\n } else if (!this.contentDOM && !node.isLeaf) {\n return false;\n } else {\n return NodeViewDesc.prototype.update.call(this, node, outerDeco, innerDeco, view);\n }\n };\n\n CustomNodeViewDesc.prototype.selectNode = function selectNode() {\n this.spec.selectNode ? this.spec.selectNode() : NodeViewDesc.prototype.selectNode.call(this);\n };\n\n CustomNodeViewDesc.prototype.deselectNode = function deselectNode() {\n this.spec.deselectNode ? this.spec.deselectNode() : NodeViewDesc.prototype.deselectNode.call(this);\n };\n\n CustomNodeViewDesc.prototype.setSelection = function setSelection(anchor, head, root, force) {\n this.spec.setSelection ? this.spec.setSelection(anchor, head, root) : NodeViewDesc.prototype.setSelection.call(this, anchor, head, root, force);\n };\n\n CustomNodeViewDesc.prototype.destroy = function destroy() {\n if (this.spec.destroy) {\n this.spec.destroy();\n }\n\n NodeViewDesc.prototype.destroy.call(this);\n };\n\n CustomNodeViewDesc.prototype.stopEvent = function stopEvent(event) {\n return this.spec.stopEvent ? this.spec.stopEvent(event) : false;\n };\n\n CustomNodeViewDesc.prototype.ignoreMutation = function ignoreMutation(mutation) {\n return this.spec.ignoreMutation ? this.spec.ignoreMutation(mutation) : NodeViewDesc.prototype.ignoreMutation.call(this, mutation);\n };\n\n return CustomNodeViewDesc;\n}(NodeViewDesc); // : (dom.Node, [ViewDesc])\n// Sync the content of the given DOM node with the nodes associated\n// with the given array of view descs, recursing into mark descs\n// because this should sync the subtree for a whole node at a time.\n\n\nfunction renderDescs(parentDOM, descs) {\n var dom = parentDOM.firstChild;\n\n for (var i = 0; i < descs.length; i++) {\n var desc = descs[i],\n childDOM = desc.dom;\n\n if (childDOM.parentNode == parentDOM) {\n while (childDOM != dom) {\n dom = rm(dom);\n }\n\n dom = dom.nextSibling;\n } else {\n parentDOM.insertBefore(childDOM, dom);\n }\n\n if (desc instanceof MarkViewDesc) {\n var pos = dom ? dom.previousSibling : parentDOM.lastChild;\n renderDescs(desc.contentDOM, desc.children);\n dom = pos ? pos.nextSibling : parentDOM.firstChild;\n }\n }\n\n while (dom) {\n dom = rm(dom);\n }\n}\n\nfunction OuterDecoLevel(nodeName) {\n if (nodeName) {\n this.nodeName = nodeName;\n }\n}\n\nOuterDecoLevel.prototype = Object.create(null);\nvar noDeco = [new OuterDecoLevel()];\n\nfunction computeOuterDeco(outerDeco, node, needsWrap) {\n if (outerDeco.length == 0) {\n return noDeco;\n }\n\n var top = needsWrap ? noDeco[0] : new OuterDecoLevel(),\n result = [top];\n\n for (var i = 0; i < outerDeco.length; i++) {\n var attrs = outerDeco[i].type.attrs,\n cur = top;\n\n if (!attrs) {\n continue;\n }\n\n if (attrs.nodeName) {\n result.push(cur = new OuterDecoLevel(attrs.nodeName));\n }\n\n for (var name in attrs) {\n var val = attrs[name];\n\n if (val == null) {\n continue;\n }\n\n if (needsWrap && result.length == 1) {\n result.push(cur = top = new OuterDecoLevel(node.isInline ? \"span\" : \"div\"));\n }\n\n if (name == \"class\") {\n cur[\"class\"] = (cur[\"class\"] ? cur[\"class\"] + \" \" : \"\") + val;\n } else if (name == \"style\") {\n cur.style = (cur.style ? cur.style + \";\" : \"\") + val;\n } else if (name != \"nodeName\") {\n cur[name] = val;\n }\n }\n }\n\n return result;\n}\n\nfunction patchOuterDeco(outerDOM, nodeDOM, prevComputed, curComputed) {\n // Shortcut for trivial case\n if (prevComputed == noDeco && curComputed == noDeco) {\n return nodeDOM;\n }\n\n var curDOM = nodeDOM;\n\n for (var i = 0; i < curComputed.length; i++) {\n var deco = curComputed[i],\n prev = prevComputed[i];\n\n if (i) {\n var parent = void 0;\n\n if (prev && prev.nodeName == deco.nodeName && curDOM != outerDOM && (parent = curDOM.parentNode) && parent.tagName.toLowerCase() == deco.nodeName) {\n curDOM = parent;\n } else {\n parent = document.createElement(deco.nodeName);\n parent.appendChild(curDOM);\n prev = noDeco[0];\n curDOM = parent;\n }\n }\n\n patchAttributes(curDOM, prev || noDeco[0], deco);\n }\n\n return curDOM;\n}\n\nfunction patchAttributes(dom, prev, cur) {\n for (var name in prev) {\n if (name != \"class\" && name != \"style\" && name != \"nodeName\" && !(name in cur)) {\n dom.removeAttribute(name);\n }\n }\n\n for (var name$1 in cur) {\n if (name$1 != \"class\" && name$1 != \"style\" && name$1 != \"nodeName\" && cur[name$1] != prev[name$1]) {\n dom.setAttribute(name$1, cur[name$1]);\n }\n }\n\n if (prev[\"class\"] != cur[\"class\"]) {\n var prevList = prev[\"class\"] ? prev[\"class\"].split(\" \") : nothing;\n var curList = cur[\"class\"] ? cur[\"class\"].split(\" \") : nothing;\n\n for (var i = 0; i < prevList.length; i++) {\n if (curList.indexOf(prevList[i]) == -1) {\n dom.classList.remove(prevList[i]);\n }\n }\n\n for (var i$1 = 0; i$1 < curList.length; i$1++) {\n if (prevList.indexOf(curList[i$1]) == -1) {\n dom.classList.add(curList[i$1]);\n }\n }\n }\n\n if (prev.style != cur.style) {\n if (prev.style) {\n var prop = /\\s*([\\w\\-\\xa1-\\uffff]+)\\s*:(?:\"(?:\\\\.|[^\"])*\"|'(?:\\\\.|[^'])*'|\\(.*?\\)|[^;])*/g,\n m;\n\n while (m = prop.exec(prev.style)) {\n dom.style.removeProperty(m[1]);\n }\n }\n\n if (cur.style) {\n dom.style.cssText += cur.style;\n }\n }\n}\n\nfunction applyOuterDeco(dom, deco, node) {\n return patchOuterDeco(dom, dom, noDeco, computeOuterDeco(deco, node, dom.nodeType != 1));\n} // : ([Decoration], [Decoration]) → bool\n\n\nfunction sameOuterDeco(a, b) {\n if (a.length != b.length) {\n return false;\n }\n\n for (var i = 0; i < a.length; i++) {\n if (!a[i].type.eq(b[i].type)) {\n return false;\n }\n }\n\n return true;\n} // Remove a DOM node and return its next sibling.\n\n\nfunction rm(dom) {\n var next = dom.nextSibling;\n dom.parentNode.removeChild(dom);\n return next;\n} // Helper class for incrementally updating a tree of mark descs and\n// the widget and node descs inside of them.\n\n\nvar ViewTreeUpdater = function ViewTreeUpdater(top, lockedNode) {\n this.top = top;\n this.lock = lockedNode; // Index into `this.top`'s child array, represents the current\n // update position.\n\n this.index = 0; // When entering a mark, the current top and index are pushed\n // onto this.\n\n this.stack = []; // Tracks whether anything was changed\n\n this.changed = false;\n var pre = preMatch(top.node.content, top.children);\n this.preMatched = pre.nodes;\n this.preMatchOffset = pre.offset;\n};\n\nViewTreeUpdater.prototype.getPreMatch = function getPreMatch(index) {\n return index >= this.preMatchOffset ? this.preMatched[index - this.preMatchOffset] : null;\n}; // Destroy and remove the children between the given indices in\n// `this.top`.\n\n\nViewTreeUpdater.prototype.destroyBetween = function destroyBetween(start, end) {\n if (start == end) {\n return;\n }\n\n for (var i = start; i < end; i++) {\n this.top.children[i].destroy();\n }\n\n this.top.children.splice(start, end - start);\n this.changed = true;\n}; // Destroy all remaining children in `this.top`.\n\n\nViewTreeUpdater.prototype.destroyRest = function destroyRest() {\n this.destroyBetween(this.index, this.top.children.length);\n}; // : ([Mark], EditorView)\n// Sync the current stack of mark descs with the given array of\n// marks, reusing existing mark descs when possible.\n\n\nViewTreeUpdater.prototype.syncToMarks = function syncToMarks(marks, inline, view) {\n var keep = 0,\n depth = this.stack.length >> 1;\n var maxKeep = Math.min(depth, marks.length);\n\n while (keep < maxKeep && (keep == depth - 1 ? this.top : this.stack[keep + 1 << 1]).matchesMark(marks[keep]) && marks[keep].type.spec.spanning !== false) {\n keep++;\n }\n\n while (keep < depth) {\n this.destroyRest();\n this.top.dirty = NOT_DIRTY;\n this.index = this.stack.pop();\n this.top = this.stack.pop();\n depth--;\n }\n\n while (depth < marks.length) {\n this.stack.push(this.top, this.index + 1);\n var found = -1;\n\n for (var i = this.index; i < Math.min(this.index + 3, this.top.children.length); i++) {\n if (this.top.children[i].matchesMark(marks[depth])) {\n found = i;\n break;\n }\n }\n\n if (found > -1) {\n if (found > this.index) {\n this.changed = true;\n this.destroyBetween(this.index, found);\n }\n\n this.top = this.top.children[this.index];\n } else {\n var markDesc = MarkViewDesc.create(this.top, marks[depth], inline, view);\n this.top.children.splice(this.index, 0, markDesc);\n this.top = markDesc;\n this.changed = true;\n }\n\n this.index = 0;\n depth++;\n }\n}; // : (Node, [Decoration], DecorationSet) → bool\n// Try to find a node desc matching the given data. Skip over it and\n// return true when successful.\n\n\nViewTreeUpdater.prototype.findNodeMatch = function findNodeMatch(node, outerDeco, innerDeco, index) {\n var found = -1,\n preMatch = index < 0 ? undefined : this.getPreMatch(index),\n children = this.top.children;\n\n if (preMatch && preMatch.matchesNode(node, outerDeco, innerDeco)) {\n found = children.indexOf(preMatch);\n } else {\n for (var i = this.index, e = Math.min(children.length, i + 5); i < e; i++) {\n var child = children[i];\n\n if (child.matchesNode(node, outerDeco, innerDeco) && this.preMatched.indexOf(child) < 0) {\n found = i;\n break;\n }\n }\n }\n\n if (found < 0) {\n return false;\n }\n\n this.destroyBetween(this.index, found);\n this.index++;\n return true;\n}; // : (Node, [Decoration], DecorationSet, EditorView, Fragment, number) → bool\n// Try to update the next node, if any, to the given data. Checks\n// pre-matches to avoid overwriting nodes that could still be used.\n\n\nViewTreeUpdater.prototype.updateNextNode = function updateNextNode(node, outerDeco, innerDeco, view, index) {\n if (this.index == this.top.children.length) {\n return false;\n }\n\n var next = this.top.children[this.index];\n\n if (next instanceof NodeViewDesc) {\n var preMatch = this.preMatched.indexOf(next);\n\n if (preMatch > -1 && preMatch + this.preMatchOffset != index) {\n return false;\n }\n\n var nextDOM = next.dom; // Can't update if nextDOM is or contains this.lock, except if\n // it's a text node whose content already matches the new text\n // and whose decorations match the new ones.\n\n var locked = this.lock && (nextDOM == this.lock || nextDOM.nodeType == 1 && nextDOM.contains(this.lock.parentNode)) && !(node.isText && next.node && next.node.isText && next.nodeDOM.nodeValue == node.text && next.dirty != NODE_DIRTY && sameOuterDeco(outerDeco, next.outerDeco));\n\n if (!locked && next.update(node, outerDeco, innerDeco, view)) {\n if (next.dom != nextDOM) {\n this.changed = true;\n }\n\n this.index++;\n return true;\n }\n }\n\n return false;\n}; // : (Node, [Decoration], DecorationSet, EditorView)\n// Insert the node as a newly created node desc.\n\n\nViewTreeUpdater.prototype.addNode = function addNode(node, outerDeco, innerDeco, view, pos) {\n this.top.children.splice(this.index++, 0, NodeViewDesc.create(this.top, node, outerDeco, innerDeco, view, pos));\n this.changed = true;\n};\n\nViewTreeUpdater.prototype.placeWidget = function placeWidget(widget, view, pos) {\n if (this.index < this.top.children.length && this.top.children[this.index].matchesWidget(widget)) {\n this.index++;\n } else {\n var desc = new WidgetViewDesc(this.top, widget, view, pos);\n this.top.children.splice(this.index++, 0, desc);\n this.changed = true;\n }\n}; // Make sure a textblock looks and behaves correctly in\n// contentEditable.\n\n\nViewTreeUpdater.prototype.addTextblockHacks = function addTextblockHacks() {\n var lastChild = this.top.children[this.index - 1];\n\n while (lastChild instanceof MarkViewDesc) {\n lastChild = lastChild.children[lastChild.children.length - 1];\n }\n\n if (!lastChild || // Empty textblock\n !(lastChild instanceof TextViewDesc) || /\\n$/.test(lastChild.node.text)) {\n if (this.index < this.top.children.length && this.top.children[this.index].matchesHack()) {\n this.index++;\n } else {\n var dom = document.createElement(\"br\");\n this.top.children.splice(this.index++, 0, new BRHackViewDesc(this.top, nothing, dom, null));\n this.changed = true;\n }\n }\n}; // : (Fragment, [ViewDesc]) → [ViewDesc]\n// Iterate from the end of the fragment and array of descs to find\n// directly matching ones, in order to avoid overeagerly reusing\n// those for other nodes. Returns an array whose positions correspond\n// to node positions in the fragment, and whose elements are either\n// descs matched to the child at that index, or empty.\n\n\nfunction preMatch(frag, descs) {\n var result = [],\n end = frag.childCount;\n\n for (var i = descs.length - 1; end > 0 && i >= 0; i--) {\n var desc = descs[i],\n node = desc.node;\n\n if (!node) {\n continue;\n }\n\n if (node != frag.child(end - 1)) {\n break;\n }\n\n result.push(desc);\n --end;\n }\n\n return {\n nodes: result.reverse(),\n offset: end\n };\n}\n\nfunction compareSide(a, b) {\n return a.type.side - b.type.side;\n} // : (ViewDesc, DecorationSet, (Decoration, number), (Node, [Decoration], DecorationSet, number))\n// This function abstracts iterating over the nodes and decorations in\n// a fragment. Calls `onNode` for each node, with its local and child\n// decorations. Splits text nodes when there is a decoration starting\n// or ending inside of them. Calls `onWidget` for each widget.\n\n\nfunction iterDeco(parent, deco, onWidget, onNode) {\n var locals = deco.locals(parent),\n offset = 0; // Simple, cheap variant for when there are no local decorations\n\n if (locals.length == 0) {\n for (var i = 0; i < parent.childCount; i++) {\n var child = parent.child(i);\n onNode(child, locals, deco.forChild(offset, child), i);\n offset += child.nodeSize;\n }\n\n return;\n }\n\n var decoIndex = 0,\n active = [],\n restNode = null;\n\n for (var parentIndex = 0;;) {\n if (decoIndex < locals.length && locals[decoIndex].to == offset) {\n var widget = locals[decoIndex++],\n widgets = void 0;\n\n while (decoIndex < locals.length && locals[decoIndex].to == offset) {\n (widgets || (widgets = [widget])).push(locals[decoIndex++]);\n }\n\n if (widgets) {\n widgets.sort(compareSide);\n\n for (var i$1 = 0; i$1 < widgets.length; i$1++) {\n onWidget(widgets[i$1], parentIndex, !!restNode);\n }\n } else {\n onWidget(widget, parentIndex, !!restNode);\n }\n }\n\n var child$1 = void 0,\n index = void 0;\n\n if (restNode) {\n index = -1;\n child$1 = restNode;\n restNode = null;\n } else if (parentIndex < parent.childCount) {\n index = parentIndex;\n child$1 = parent.child(parentIndex++);\n } else {\n break;\n }\n\n for (var i$2 = 0; i$2 < active.length; i$2++) {\n if (active[i$2].to <= offset) {\n active.splice(i$2--, 1);\n }\n }\n\n while (decoIndex < locals.length && locals[decoIndex].from == offset) {\n active.push(locals[decoIndex++]);\n }\n\n var end = offset + child$1.nodeSize;\n\n if (child$1.isText) {\n var cutAt = end;\n\n if (decoIndex < locals.length && locals[decoIndex].from < cutAt) {\n cutAt = locals[decoIndex].from;\n }\n\n for (var i$3 = 0; i$3 < active.length; i$3++) {\n if (active[i$3].to < cutAt) {\n cutAt = active[i$3].to;\n }\n }\n\n if (cutAt < end) {\n restNode = child$1.cut(cutAt - offset);\n child$1 = child$1.cut(0, cutAt - offset);\n end = cutAt;\n index = -1;\n }\n }\n\n onNode(child$1, active.length ? active.slice() : nothing, deco.forChild(offset, child$1), index);\n offset = end;\n }\n} // List markers in Mobile Safari will mysteriously disappear\n// sometimes. This works around that.\n\n\nfunction iosHacks(dom) {\n if (dom.nodeName == \"UL\" || dom.nodeName == \"OL\") {\n var oldCSS = dom.style.cssText;\n dom.style.cssText = oldCSS + \"; list-style: square !important\";\n window.getComputedStyle(dom).listStyle;\n dom.style.cssText = oldCSS;\n }\n}\n\nfunction nearbyTextNode(node, offset) {\n for (;;) {\n if (node.nodeType == 3) {\n return node;\n }\n\n if (node.nodeType == 1 && offset > 0) {\n if (node.childNodes.length > offset && node.childNodes[offset].nodeType == 3) {\n return node.childNodes[offset];\n }\n\n node = node.childNodes[offset - 1];\n offset = nodeSize(node);\n } else if (node.nodeType == 1 && offset < node.childNodes.length) {\n node = node.childNodes[offset];\n offset = 0;\n } else {\n return null;\n }\n }\n} // Find a piece of text in an inline fragment, overlapping from-to\n\n\nfunction findTextInFragment(frag, text, from, to) {\n for (var i = 0, pos = 0; i < frag.childCount && pos <= to;) {\n var child = frag.child(i++),\n childStart = pos;\n pos += child.nodeSize;\n\n if (!child.isText) {\n continue;\n }\n\n var str = child.text;\n\n while (i < frag.childCount) {\n var next = frag.child(i++);\n pos += next.nodeSize;\n\n if (!next.isText) {\n break;\n }\n\n str += next.text;\n }\n\n if (pos >= from) {\n var found = str.lastIndexOf(text, to - childStart);\n\n if (found >= 0 && found + text.length + childStart >= from) {\n return childStart + found;\n }\n }\n }\n\n return -1;\n} // Replace range from-to in an array of view descs with replacement\n// (may be null to just delete). This goes very much against the grain\n// of the rest of this code, which tends to create nodes with the\n// right shape in one go, rather than messing with them after\n// creation, but is necessary in the composition hack.\n\n\nfunction replaceNodes(nodes, from, to, view, replacement) {\n var result = [];\n\n for (var i = 0, off = 0; i < nodes.length; i++) {\n var child = nodes[i],\n start = off,\n end = off += child.size;\n\n if (start >= to || end <= from) {\n result.push(child);\n } else {\n if (start < from) {\n result.push(child.slice(0, from - start, view));\n }\n\n if (replacement) {\n result.push(replacement);\n replacement = null;\n }\n\n if (end > to) {\n result.push(child.slice(to - start, child.size, view));\n }\n }\n }\n\n return result;\n}\n\nfunction moveSelectionBlock(state, dir) {\n var ref = state.selection;\n var $anchor = ref.$anchor;\n var $head = ref.$head;\n var $side = dir > 0 ? $anchor.max($head) : $anchor.min($head);\n var $start = !$side.parent.inlineContent ? $side : $side.depth ? state.doc.resolve(dir > 0 ? $side.after() : $side.before()) : null;\n return $start && prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"].findFrom($start, dir);\n}\n\nfunction apply(view, sel) {\n view.dispatch(view.state.tr.setSelection(sel).scrollIntoView());\n return true;\n}\n\nfunction selectHorizontally(view, dir, mods) {\n var sel = view.state.selection;\n\n if (sel instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"TextSelection\"]) {\n if (!sel.empty || mods.indexOf(\"s\") > -1) {\n return false;\n } else if (view.endOfTextblock(dir > 0 ? \"right\" : \"left\")) {\n var next = moveSelectionBlock(view.state, dir);\n\n if (next && next instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"]) {\n return apply(view, next);\n }\n\n return false;\n } else {\n var $head = sel.$head,\n node = $head.textOffset ? null : dir < 0 ? $head.nodeBefore : $head.nodeAfter,\n desc;\n\n if (!node || node.isText) {\n return false;\n }\n\n var nodePos = dir < 0 ? $head.pos - node.nodeSize : $head.pos;\n\n if (!(node.isAtom || (desc = view.docView.descAt(nodePos)) && !desc.contentDOM)) {\n return false;\n }\n\n if (prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"].isSelectable(node)) {\n return apply(view, new prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"](dir < 0 ? view.state.doc.resolve($head.pos - node.nodeSize) : $head));\n } else if (result.webkit) {\n // Chrome and Safari will introduce extra pointless cursor\n // positions around inline uneditable nodes, so we have to\n // take over and move the cursor past them (#937)\n return apply(view, new prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"TextSelection\"](view.state.doc.resolve(dir < 0 ? nodePos : nodePos + node.nodeSize)));\n } else {\n return false;\n }\n }\n } else if (sel instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"] && sel.node.isInline) {\n return apply(view, new prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"TextSelection\"](dir > 0 ? sel.$to : sel.$from));\n } else {\n var next$1 = moveSelectionBlock(view.state, dir);\n\n if (next$1) {\n return apply(view, next$1);\n }\n\n return false;\n }\n}\n\nfunction nodeLen(node) {\n return node.nodeType == 3 ? node.nodeValue.length : node.childNodes.length;\n}\n\nfunction isIgnorable(dom) {\n var desc = dom.pmViewDesc;\n return desc && desc.size == 0 && (dom.nextSibling || dom.nodeName != \"BR\");\n} // Make sure the cursor isn't directly after one or more ignored\n// nodes, which will confuse the browser's cursor motion logic.\n\n\nfunction skipIgnoredNodesLeft(view) {\n var sel = view.root.getSelection();\n var node = sel.focusNode,\n offset = sel.focusOffset;\n\n if (!node) {\n return;\n }\n\n var moveNode,\n moveOffset,\n force = false; // Gecko will do odd things when the selection is directly in front\n // of a non-editable node, so in that case, move it into the next\n // node if possible. Issue prosemirror/prosemirror#832.\n\n if (result.gecko && node.nodeType == 1 && offset < nodeLen(node) && isIgnorable(node.childNodes[offset])) {\n force = true;\n }\n\n for (;;) {\n if (offset > 0) {\n if (node.nodeType != 1) {\n break;\n } else {\n var before = node.childNodes[offset - 1];\n\n if (isIgnorable(before)) {\n moveNode = node;\n moveOffset = --offset;\n } else if (before.nodeType == 3) {\n node = before;\n offset = node.nodeValue.length;\n } else {\n break;\n }\n }\n } else if (isBlockNode(node)) {\n break;\n } else {\n var prev = node.previousSibling;\n\n while (prev && isIgnorable(prev)) {\n moveNode = node.parentNode;\n moveOffset = domIndex(prev);\n prev = prev.previousSibling;\n }\n\n if (!prev) {\n node = node.parentNode;\n\n if (node == view.dom) {\n break;\n }\n\n offset = 0;\n } else {\n node = prev;\n offset = nodeLen(node);\n }\n }\n }\n\n if (force) {\n setSelFocus(view, sel, node, offset);\n } else if (moveNode) {\n setSelFocus(view, sel, moveNode, moveOffset);\n }\n} // Make sure the cursor isn't directly before one or more ignored\n// nodes.\n\n\nfunction skipIgnoredNodesRight(view) {\n var sel = view.root.getSelection();\n var node = sel.focusNode,\n offset = sel.focusOffset;\n\n if (!node) {\n return;\n }\n\n var len = nodeLen(node);\n var moveNode, moveOffset;\n\n for (;;) {\n if (offset < len) {\n if (node.nodeType != 1) {\n break;\n }\n\n var after = node.childNodes[offset];\n\n if (isIgnorable(after)) {\n moveNode = node;\n moveOffset = ++offset;\n } else {\n break;\n }\n } else if (isBlockNode(node)) {\n break;\n } else {\n var next = node.nextSibling;\n\n while (next && isIgnorable(next)) {\n moveNode = next.parentNode;\n moveOffset = domIndex(next) + 1;\n next = next.nextSibling;\n }\n\n if (!next) {\n node = node.parentNode;\n\n if (node == view.dom) {\n break;\n }\n\n offset = len = 0;\n } else {\n node = next;\n offset = 0;\n len = nodeLen(node);\n }\n }\n }\n\n if (moveNode) {\n setSelFocus(view, sel, moveNode, moveOffset);\n }\n}\n\nfunction isBlockNode(dom) {\n var desc = dom.pmViewDesc;\n return desc && desc.node && desc.node.isBlock;\n}\n\nfunction setSelFocus(view, sel, node, offset) {\n if (selectionCollapsed(sel)) {\n var range = document.createRange();\n range.setEnd(node, offset);\n range.setStart(node, offset);\n sel.removeAllRanges();\n sel.addRange(range);\n } else if (sel.extend) {\n sel.extend(node, offset);\n }\n\n view.domObserver.setCurSelection();\n} // : (EditorState, number)\n// Check whether vertical selection motion would involve node\n// selections. If so, apply it (if not, the result is left to the\n// browser)\n\n\nfunction selectVertically(view, dir, mods) {\n var sel = view.state.selection;\n\n if (sel instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"TextSelection\"] && !sel.empty || mods.indexOf(\"s\") > -1) {\n return false;\n }\n\n var $from = sel.$from;\n var $to = sel.$to;\n\n if (!$from.parent.inlineContent || view.endOfTextblock(dir < 0 ? \"up\" : \"down\")) {\n var next = moveSelectionBlock(view.state, dir);\n\n if (next && next instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"]) {\n return apply(view, next);\n }\n }\n\n if (!$from.parent.inlineContent) {\n var beyond = prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"].findFrom(dir < 0 ? $from : $to, dir);\n return beyond ? apply(view, beyond) : true;\n }\n\n return false;\n}\n\nfunction stopNativeHorizontalDelete(view, dir) {\n if (!(view.state.selection instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"TextSelection\"])) {\n return true;\n }\n\n var ref = view.state.selection;\n var $head = ref.$head;\n var $anchor = ref.$anchor;\n var empty = ref.empty;\n\n if (!$head.sameParent($anchor)) {\n return true;\n }\n\n if (!empty) {\n return false;\n }\n\n if (view.endOfTextblock(dir > 0 ? \"forward\" : \"backward\")) {\n return true;\n }\n\n var nextNode = !$head.textOffset && (dir < 0 ? $head.nodeBefore : $head.nodeAfter);\n\n if (nextNode && !nextNode.isText) {\n var tr = view.state.tr;\n\n if (dir < 0) {\n tr[\"delete\"]($head.pos - nextNode.nodeSize, $head.pos);\n } else {\n tr[\"delete\"]($head.pos, $head.pos + nextNode.nodeSize);\n }\n\n view.dispatch(tr);\n return true;\n }\n\n return false;\n}\n\nfunction switchEditable(view, node, state) {\n view.domObserver.stop();\n node.contentEditable = state;\n view.domObserver.start();\n} // Issue #867 / https://bugs.chromium.org/p/chromium/issues/detail?id=903821\n// In which Chrome does really wrong things when the down arrow is\n// pressed when the cursor is directly at the start of a textblock and\n// has an uneditable node after it\n\n\nfunction chromeDownArrowBug(view) {\n if (!result.chrome || view.state.selection.$head.parentOffset > 0) {\n return;\n }\n\n var ref = view.root.getSelection();\n var focusNode = ref.focusNode;\n var focusOffset = ref.focusOffset;\n\n if (focusNode && focusNode.nodeType == 1 && focusOffset == 0 && focusNode.firstChild && focusNode.firstChild.contentEditable == \"false\") {\n var child = focusNode.firstChild;\n switchEditable(view, child, true);\n setTimeout(function () {\n return switchEditable(view, child, false);\n }, 20);\n }\n} // A backdrop key mapping used to make sure we always suppress keys\n// that have a dangerous default effect, even if the commands they are\n// bound to return false, and to make sure that cursor-motion keys\n// find a cursor (as opposed to a node selection) when pressed. For\n// cursor-motion keys, the code in the handlers also takes care of\n// block selections.\n\n\nfunction getMods(event) {\n var result = \"\";\n\n if (event.ctrlKey) {\n result += \"c\";\n }\n\n if (event.metaKey) {\n result += \"m\";\n }\n\n if (event.altKey) {\n result += \"a\";\n }\n\n if (event.shiftKey) {\n result += \"s\";\n }\n\n return result;\n}\n\nfunction captureKeyDown(view, event) {\n var code = event.keyCode,\n mods = getMods(event);\n\n if (code == 8 || result.mac && code == 72 && mods == \"c\") {\n // Backspace, Ctrl-h on Mac\n return stopNativeHorizontalDelete(view, -1) || skipIgnoredNodesLeft(view);\n } else if (code == 46 || result.mac && code == 68 && mods == \"c\") {\n // Delete, Ctrl-d on Mac\n return stopNativeHorizontalDelete(view, 1) || skipIgnoredNodesRight(view);\n } else if (code == 13 && !result.ios || code == 27) {\n // Enter (let through on iOS, to avoid keyboard sync issues), Esc\n return true;\n } else if (code == 37) {\n // Left arrow\n return selectHorizontally(view, -1, mods) || skipIgnoredNodesLeft(view);\n } else if (code == 39) {\n // Right arrow\n return selectHorizontally(view, 1, mods) || skipIgnoredNodesRight(view);\n } else if (code == 38) {\n // Up arrow\n return selectVertically(view, -1, mods) || skipIgnoredNodesLeft(view);\n } else if (code == 40) {\n // Down arrow\n return chromeDownArrowBug(view) || selectVertically(view, 1, mods) || skipIgnoredNodesRight(view);\n } else if (mods == (result.mac ? \"m\" : \"c\") && (code == 66 || code == 73 || code == 89 || code == 90)) {\n // Mod-[biyz]\n return true;\n }\n\n return false;\n}\n\nfunction selectionFromDOM(view, origin) {\n var domSel = view.root.getSelection(),\n doc = view.state.doc;\n var nearestDesc = view.docView.nearestDesc(domSel.focusNode),\n inWidget = nearestDesc && nearestDesc.size == 0;\n var head = view.docView.posFromDOM(domSel.focusNode, domSel.focusOffset);\n var $head = doc.resolve(head),\n $anchor,\n selection;\n\n if (selectionCollapsed(domSel)) {\n $anchor = $head;\n\n while (nearestDesc && !nearestDesc.node) {\n nearestDesc = nearestDesc.parent;\n }\n\n if (nearestDesc && nearestDesc.node.isAtom && prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"].isSelectable(nearestDesc.node) && nearestDesc.parent && !(nearestDesc.node.isInline && isOnEdge(domSel.focusNode, domSel.focusOffset, nearestDesc.dom))) {\n var pos = nearestDesc.posBefore;\n selection = new prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"](head == pos ? $head : doc.resolve(pos));\n }\n } else {\n $anchor = doc.resolve(view.docView.posFromDOM(domSel.anchorNode, domSel.anchorOffset));\n }\n\n if (!selection) {\n var bias = origin == \"pointer\" || view.state.selection.head < $head.pos && !inWidget ? 1 : -1;\n selection = selectionBetween(view, $anchor, $head, bias);\n }\n\n return selection;\n}\n\nfunction selectionToDOM(view, force) {\n var sel = view.state.selection;\n syncNodeSelection(view, sel);\n\n if (view.editable ? !view.hasFocus() : !(hasSelection(view) && document.activeElement.contains(view.dom))) {\n return;\n }\n\n view.domObserver.disconnectSelection();\n\n if (view.cursorWrapper) {\n selectCursorWrapper(view);\n } else {\n var anchor = sel.anchor;\n var head = sel.head;\n var resetEditableFrom, resetEditableTo;\n\n if (brokenSelectBetweenUneditable && !(sel instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"TextSelection\"])) {\n if (!sel.$from.parent.inlineContent) {\n resetEditableFrom = temporarilyEditableNear(view, sel.from);\n }\n\n if (!sel.empty && !sel.$from.parent.inlineContent) {\n resetEditableTo = temporarilyEditableNear(view, sel.to);\n }\n }\n\n view.docView.setSelection(anchor, head, view.root, force);\n\n if (brokenSelectBetweenUneditable) {\n if (resetEditableFrom) {\n resetEditable(resetEditableFrom);\n }\n\n if (resetEditableTo) {\n resetEditable(resetEditableTo);\n }\n }\n\n if (sel.visible) {\n view.dom.classList.remove(\"ProseMirror-hideselection\");\n } else if (anchor != head) {\n view.dom.classList.add(\"ProseMirror-hideselection\");\n\n if (\"onselectionchange\" in document) {\n removeClassOnSelectionChange(view);\n }\n }\n }\n\n view.domObserver.setCurSelection();\n view.domObserver.connectSelection();\n} // Kludge to work around Webkit not allowing a selection to start/end\n// between non-editable block nodes. We briefly make something\n// editable, set the selection, then set it uneditable again.\n\n\nvar brokenSelectBetweenUneditable = result.safari || result.chrome && result.chrome_version < 63;\n\nfunction temporarilyEditableNear(view, pos) {\n var ref = view.docView.domFromPos(pos);\n var node = ref.node;\n var offset = ref.offset;\n var after = offset < node.childNodes.length ? node.childNodes[offset] : null;\n var before = offset ? node.childNodes[offset - 1] : null;\n\n if (result.safari && after && after.contentEditable == \"false\") {\n return setEditable(after);\n }\n\n if ((!after || after.contentEditable == \"false\") && (!before || before.contentEditable == \"false\")) {\n if (after) {\n return setEditable(after);\n } else if (before) {\n return setEditable(before);\n }\n }\n}\n\nfunction setEditable(element) {\n element.contentEditable = \"true\";\n\n if (result.safari && element.draggable) {\n element.draggable = false;\n element.wasDraggable = true;\n }\n\n return element;\n}\n\nfunction resetEditable(element) {\n element.contentEditable = \"false\";\n\n if (element.wasDraggable) {\n element.draggable = true;\n element.wasDraggable = null;\n }\n}\n\nfunction removeClassOnSelectionChange(view) {\n var doc = view.dom.ownerDocument;\n doc.removeEventListener(\"selectionchange\", view.hideSelectionGuard);\n var domSel = view.root.getSelection();\n var node = domSel.anchorNode,\n offset = domSel.anchorOffset;\n doc.addEventListener(\"selectionchange\", view.hideSelectionGuard = function () {\n if (domSel.anchorNode != node || domSel.anchorOffset != offset) {\n doc.removeEventListener(\"selectionchange\", view.hideSelectionGuard);\n view.dom.classList.remove(\"ProseMirror-hideselection\");\n }\n });\n}\n\nfunction selectCursorWrapper(view) {\n var domSel = view.root.getSelection(),\n range = document.createRange();\n var node = view.cursorWrapper.dom,\n img = node.nodeName == \"IMG\";\n\n if (img) {\n range.setEnd(node.parentNode, domIndex(node) + 1);\n } else {\n range.setEnd(node, 0);\n }\n\n range.collapse(false);\n domSel.removeAllRanges();\n domSel.addRange(range); // Kludge to kill 'control selection' in IE11 when selecting an\n // invisible cursor wrapper, since that would result in those weird\n // resize handles and a selection that considers the absolutely\n // positioned wrapper, rather than the root editable node, the\n // focused element.\n\n if (!img && !view.state.selection.visible && result.ie && result.ie_version <= 11) {\n node.disabled = true;\n node.disabled = false;\n }\n}\n\nfunction syncNodeSelection(view, sel) {\n if (sel instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"]) {\n var desc = view.docView.descAt(sel.from);\n\n if (desc != view.lastSelectedViewDesc) {\n clearNodeSelection(view);\n\n if (desc) {\n desc.selectNode();\n }\n\n view.lastSelectedViewDesc = desc;\n }\n } else {\n clearNodeSelection(view);\n }\n} // Clear all DOM statefulness of the last node selection.\n\n\nfunction clearNodeSelection(view) {\n if (view.lastSelectedViewDesc) {\n if (view.lastSelectedViewDesc.parent) {\n view.lastSelectedViewDesc.deselectNode();\n }\n\n view.lastSelectedViewDesc = null;\n }\n}\n\nfunction selectionBetween(view, $anchor, $head, bias) {\n return view.someProp(\"createSelectionBetween\", function (f) {\n return f(view, $anchor, $head);\n }) || prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"TextSelection\"].between($anchor, $head, bias);\n}\n\nfunction hasFocusAndSelection(view) {\n if (view.editable && view.root.activeElement != view.dom) {\n return false;\n }\n\n return hasSelection(view);\n}\n\nfunction hasSelection(view) {\n var sel = view.root.getSelection();\n\n if (!sel.anchorNode) {\n return false;\n }\n\n try {\n // Firefox will raise 'permission denied' errors when accessing\n // properties of `sel.anchorNode` when it's in a generated CSS\n // element.\n return view.dom.contains(sel.anchorNode.nodeType == 3 ? sel.anchorNode.parentNode : sel.anchorNode) && (view.editable || view.dom.contains(sel.focusNode.nodeType == 3 ? sel.focusNode.parentNode : sel.focusNode));\n } catch (_) {\n return false;\n }\n}\n\nfunction anchorInRightPlace(view) {\n var anchorDOM = view.docView.domFromPos(view.state.selection.anchor);\n var domSel = view.root.getSelection();\n return isEquivalentPosition(anchorDOM.node, anchorDOM.offset, domSel.anchorNode, domSel.anchorOffset);\n} // Note that all referencing and parsing is done with the\n// start-of-operation selection and document, since that's the one\n// that the DOM represents. If any changes came in in the meantime,\n// the modification is mapped over those before it is applied, in\n// readDOMChange.\n\n\nfunction parseBetween(view, from_, to_) {\n var ref = view.docView.parseRange(from_, to_);\n var parent = ref.node;\n var fromOffset = ref.fromOffset;\n var toOffset = ref.toOffset;\n var from = ref.from;\n var to = ref.to;\n var domSel = view.root.getSelection(),\n find = null,\n anchor = domSel.anchorNode;\n\n if (anchor && view.dom.contains(anchor.nodeType == 1 ? anchor : anchor.parentNode)) {\n find = [{\n node: anchor,\n offset: domSel.anchorOffset\n }];\n\n if (!selectionCollapsed(domSel)) {\n find.push({\n node: domSel.focusNode,\n offset: domSel.focusOffset\n });\n }\n } // Work around issue in Chrome where backspacing sometimes replaces\n // the deleted content with a random BR node (issues #799, #831)\n\n\n if (result.chrome && view.lastKeyCode === 8) {\n for (var off = toOffset; off > fromOffset; off--) {\n var node = parent.childNodes[off - 1],\n desc = node.pmViewDesc;\n\n if (node.nodeType == \"BR\" && !desc) {\n toOffset = off;\n break;\n }\n\n if (!desc || desc.size) {\n break;\n }\n }\n }\n\n var startDoc = view.state.doc;\n var parser = view.someProp(\"domParser\") || prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"DOMParser\"].fromSchema(view.state.schema);\n var $from = startDoc.resolve(from);\n var sel = null,\n doc = parser.parse(parent, {\n topNode: $from.parent,\n topMatch: $from.parent.contentMatchAt($from.index()),\n topOpen: true,\n from: fromOffset,\n to: toOffset,\n preserveWhitespace: $from.parent.type.spec.code ? \"full\" : true,\n editableContent: true,\n findPositions: find,\n ruleFromNode: ruleFromNode,\n context: $from\n });\n\n if (find && find[0].pos != null) {\n var anchor$1 = find[0].pos,\n head = find[1] && find[1].pos;\n\n if (head == null) {\n head = anchor$1;\n }\n\n sel = {\n anchor: anchor$1 + from,\n head: head + from\n };\n }\n\n return {\n doc: doc,\n sel: sel,\n from: from,\n to: to\n };\n}\n\nfunction ruleFromNode(dom) {\n var desc = dom.pmViewDesc;\n\n if (desc) {\n return desc.parseRule();\n } else if (dom.nodeName == \"BR\" && dom.parentNode) {\n // Safari replaces the list item or table cell with a BR\n // directly in the list node (?!) if you delete the last\n // character in a list item or table cell (#708, #862)\n if (result.safari && /^(ul|ol)$/i.test(dom.parentNode.nodeName)) {\n var skip = document.createElement(\"div\");\n skip.appendChild(document.createElement(\"li\"));\n return {\n skip: skip\n };\n } else if (dom.parentNode.lastChild == dom || result.safari && /^(tr|table)$/i.test(dom.parentNode.nodeName)) {\n return {\n ignore: true\n };\n }\n } else if (dom.nodeName == \"IMG\" && dom.getAttribute(\"mark-placeholder\")) {\n return {\n ignore: true\n };\n }\n}\n\nfunction readDOMChange(view, from, to, typeOver, addedNodes) {\n if (from < 0) {\n var origin = view.lastSelectionTime > Date.now() - 50 ? view.lastSelectionOrigin : null;\n var newSel = selectionFromDOM(view, origin);\n\n if (!view.state.selection.eq(newSel)) {\n var tr$1 = view.state.tr.setSelection(newSel);\n\n if (origin == \"pointer\") {\n tr$1.setMeta(\"pointer\", true);\n } else if (origin == \"key\") {\n tr$1.scrollIntoView();\n }\n\n view.dispatch(tr$1);\n }\n\n return;\n }\n\n var $before = view.state.doc.resolve(from);\n var shared = $before.sharedDepth(to);\n from = $before.before(shared + 1);\n to = view.state.doc.resolve(to).after(shared + 1);\n var sel = view.state.selection;\n var parse = parseBetween(view, from, to);\n var doc = view.state.doc,\n compare = doc.slice(parse.from, parse.to);\n var preferredPos, preferredSide; // Prefer anchoring to end when Backspace is pressed\n\n if (view.lastKeyCode === 8 && Date.now() - 100 < view.lastKeyCodeTime) {\n preferredPos = view.state.selection.to;\n preferredSide = \"end\";\n } else {\n preferredPos = view.state.selection.from;\n preferredSide = \"start\";\n }\n\n view.lastKeyCode = null;\n var change = findDiff(compare.content, parse.doc.content, parse.from, preferredPos, preferredSide);\n\n if (!change) {\n if (typeOver && sel instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"TextSelection\"] && !sel.empty && sel.$head.sameParent(sel.$anchor) && !view.composing && !(parse.sel && parse.sel.anchor != parse.sel.head)) {\n change = {\n start: sel.from,\n endA: sel.to,\n endB: sel.to\n };\n } else {\n if (parse.sel) {\n var sel$1 = resolveSelection(view, view.state.doc, parse.sel);\n\n if (sel$1 && !sel$1.eq(view.state.selection)) {\n view.dispatch(view.state.tr.setSelection(sel$1));\n }\n }\n\n return;\n }\n }\n\n view.domChangeCount++; // Handle the case where overwriting a selection by typing matches\n // the start or end of the selected content, creating a change\n // that's smaller than what was actually overwritten.\n\n if (view.state.selection.from < view.state.selection.to && change.start == change.endB && view.state.selection instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"TextSelection\"]) {\n if (change.start > view.state.selection.from && change.start <= view.state.selection.from + 2) {\n change.start = view.state.selection.from;\n } else if (change.endA < view.state.selection.to && change.endA >= view.state.selection.to - 2) {\n change.endB += view.state.selection.to - change.endA;\n change.endA = view.state.selection.to;\n }\n } // IE11 will insert a non-breaking space _ahead_ of the space after\n // the cursor space when adding a space before another space. When\n // that happened, adjust the change to cover the space instead.\n\n\n if (result.ie && result.ie_version <= 11 && change.endB == change.start + 1 && change.endA == change.start && change.start > parse.from && parse.doc.textBetween(change.start - parse.from - 1, change.start - parse.from + 1) == \" \\xA0\") {\n change.start--;\n change.endA--;\n change.endB--;\n }\n\n var $from = parse.doc.resolveNoCache(change.start - parse.from);\n var $to = parse.doc.resolveNoCache(change.endB - parse.from);\n var nextSel; // If this looks like the effect of pressing Enter (or was recorded\n // as being an iOS enter press), just dispatch an Enter key instead.\n\n if ((result.ios && view.lastIOSEnter > Date.now() - 100 && (!$from.sameParent($to) || addedNodes.some(function (n) {\n return n.nodeName == \"DIV\";\n })) || !$from.sameParent($to) && $from.pos < parse.doc.content.size && (nextSel = prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"].findFrom(parse.doc.resolve($from.pos + 1), 1, true)) && nextSel.head == $to.pos) && view.someProp(\"handleKeyDown\", function (f) {\n return f(view, keyEvent(13, \"Enter\"));\n })) {\n view.lastIOSEnter = 0;\n return;\n } // Same for backspace\n\n\n if (view.state.selection.anchor > change.start && looksLikeJoin(doc, change.start, change.endA, $from, $to) && view.someProp(\"handleKeyDown\", function (f) {\n return f(view, keyEvent(8, \"Backspace\"));\n })) {\n if (result.android && result.chrome) {\n view.domObserver.suppressSelectionUpdates();\n } // #820\n\n\n return;\n }\n\n var chFrom = change.start,\n chTo = change.endA;\n var tr, storedMarks, markChange, $from1;\n\n if ($from.sameParent($to) && $from.parent.inlineContent) {\n if ($from.pos == $to.pos) {\n // Deletion\n // IE11 sometimes weirdly moves the DOM selection around after\n // backspacing out the first element in a textblock\n if (result.ie && result.ie_version <= 11 && $from.parentOffset == 0) {\n view.domObserver.suppressSelectionUpdates();\n setTimeout(function () {\n return selectionToDOM(view);\n }, 20);\n }\n\n tr = view.state.tr[\"delete\"](chFrom, chTo);\n storedMarks = doc.resolve(change.start).marksAcross(doc.resolve(change.endA));\n } else if ( // Adding or removing a mark\n change.endA == change.endB && ($from1 = doc.resolve(change.start)) && (markChange = isMarkChange($from.parent.content.cut($from.parentOffset, $to.parentOffset), $from1.parent.content.cut($from1.parentOffset, change.endA - $from1.start())))) {\n tr = view.state.tr;\n\n if (markChange.type == \"add\") {\n tr.addMark(chFrom, chTo, markChange.mark);\n } else {\n tr.removeMark(chFrom, chTo, markChange.mark);\n }\n } else if ($from.parent.child($from.index()).isText && $from.index() == $to.index() - ($to.textOffset ? 0 : 1)) {\n // Both positions in the same text node -- simply insert text\n var text = $from.parent.textBetween($from.parentOffset, $to.parentOffset);\n\n if (view.someProp(\"handleTextInput\", function (f) {\n return f(view, chFrom, chTo, text);\n })) {\n return;\n }\n\n tr = view.state.tr.insertText(text, chFrom, chTo);\n }\n }\n\n if (!tr) {\n tr = view.state.tr.replace(chFrom, chTo, parse.doc.slice(change.start - parse.from, change.endB - parse.from));\n }\n\n if (parse.sel) {\n var sel$2 = resolveSelection(view, tr.doc, parse.sel); // Chrome Android will sometimes, during composition, report the\n // selection in the wrong place. If it looks like that is\n // happening, don't update the selection.\n // Edge just doesn't move the cursor forward when you start typing\n // in an empty block or between br nodes.\n\n if (sel$2 && !(result.chrome && result.android && view.composing && sel$2.empty && sel$2.head == chFrom || result.ie && sel$2.empty && sel$2.head == chFrom)) {\n tr.setSelection(sel$2);\n }\n }\n\n if (storedMarks) {\n tr.ensureMarks(storedMarks);\n }\n\n view.dispatch(tr.scrollIntoView());\n}\n\nfunction resolveSelection(view, doc, parsedSel) {\n if (Math.max(parsedSel.anchor, parsedSel.head) > doc.content.size) {\n return null;\n }\n\n return selectionBetween(view, doc.resolve(parsedSel.anchor), doc.resolve(parsedSel.head));\n} // : (Fragment, Fragment) → ?{mark: Mark, type: string}\n// Given two same-length, non-empty fragments of inline content,\n// determine whether the first could be created from the second by\n// removing or adding a single mark type.\n\n\nfunction isMarkChange(cur, prev) {\n var curMarks = cur.firstChild.marks,\n prevMarks = prev.firstChild.marks;\n var added = curMarks,\n removed = prevMarks,\n type,\n mark,\n update;\n\n for (var i = 0; i < prevMarks.length; i++) {\n added = prevMarks[i].removeFromSet(added);\n }\n\n for (var i$1 = 0; i$1 < curMarks.length; i$1++) {\n removed = curMarks[i$1].removeFromSet(removed);\n }\n\n if (added.length == 1 && removed.length == 0) {\n mark = added[0];\n type = \"add\";\n\n update = function update(node) {\n return node.mark(mark.addToSet(node.marks));\n };\n } else if (added.length == 0 && removed.length == 1) {\n mark = removed[0];\n type = \"remove\";\n\n update = function update(node) {\n return node.mark(mark.removeFromSet(node.marks));\n };\n } else {\n return null;\n }\n\n var updated = [];\n\n for (var i$2 = 0; i$2 < prev.childCount; i$2++) {\n updated.push(update(prev.child(i$2)));\n }\n\n if (prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(updated).eq(cur)) {\n return {\n mark: mark,\n type: type\n };\n }\n}\n\nfunction looksLikeJoin(old, start, end, $newStart, $newEnd) {\n if (!$newStart.parent.isTextblock || // The content must have shrunk\n end - start <= $newEnd.pos - $newStart.pos || // newEnd must point directly at or after the end of the block that newStart points into\n skipClosingAndOpening($newStart, true, false) < $newEnd.pos) {\n return false;\n }\n\n var $start = old.resolve(start); // Start must be at the end of a block\n\n if ($start.parentOffset < $start.parent.content.size || !$start.parent.isTextblock) {\n return false;\n }\n\n var $next = old.resolve(skipClosingAndOpening($start, true, true)); // The next textblock must start before end and end near it\n\n if (!$next.parent.isTextblock || $next.pos > end || skipClosingAndOpening($next, true, false) < end) {\n return false;\n } // The fragments after the join point must match\n\n\n return $newStart.parent.content.cut($newStart.parentOffset).eq($next.parent.content);\n}\n\nfunction skipClosingAndOpening($pos, fromEnd, mayOpen) {\n var depth = $pos.depth,\n end = fromEnd ? $pos.end() : $pos.pos;\n\n while (depth > 0 && (fromEnd || $pos.indexAfter(depth) == $pos.node(depth).childCount)) {\n depth--;\n end++;\n fromEnd = false;\n }\n\n if (mayOpen) {\n var next = $pos.node(depth).maybeChild($pos.indexAfter(depth));\n\n while (next && !next.isLeaf) {\n next = next.firstChild;\n end++;\n }\n }\n\n return end;\n}\n\nfunction findDiff(a, b, pos, preferredPos, preferredSide) {\n var start = a.findDiffStart(b, pos);\n\n if (start == null) {\n return null;\n }\n\n var ref = a.findDiffEnd(b, pos + a.size, pos + b.size);\n var endA = ref.a;\n var endB = ref.b;\n\n if (preferredSide == \"end\") {\n var adjust = Math.max(0, start - Math.min(endA, endB));\n preferredPos -= endA + adjust - start;\n }\n\n if (endA < start && a.size < b.size) {\n var move = preferredPos <= start && preferredPos >= endA ? start - preferredPos : 0;\n start -= move;\n endB = start + (endB - endA);\n endA = start;\n } else if (endB < start) {\n var move$1 = preferredPos <= start && preferredPos >= endB ? start - preferredPos : 0;\n start -= move$1;\n endA = start + (endA - endB);\n endB = start;\n }\n\n return {\n start: start,\n endA: endA,\n endB: endB\n };\n}\n\nfunction serializeForClipboard(view, slice) {\n var context = [];\n var content = slice.content;\n var openStart = slice.openStart;\n var openEnd = slice.openEnd;\n\n while (openStart > 1 && openEnd > 1 && content.childCount == 1 && content.firstChild.childCount == 1) {\n openStart--;\n openEnd--;\n var node = content.firstChild;\n context.push(node.type.name, node.type.hasRequiredAttrs() ? node.attrs : null);\n content = node.content;\n }\n\n var serializer = view.someProp(\"clipboardSerializer\") || prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"DOMSerializer\"].fromSchema(view.state.schema);\n var doc = detachedDoc(),\n wrap = doc.createElement(\"div\");\n wrap.appendChild(serializer.serializeFragment(content, {\n document: doc\n }));\n var firstChild = wrap.firstChild,\n needsWrap;\n\n while (firstChild && firstChild.nodeType == 1 && (needsWrap = wrapMap[firstChild.nodeName.toLowerCase()])) {\n for (var i = needsWrap.length - 1; i >= 0; i--) {\n var wrapper = doc.createElement(needsWrap[i]);\n\n while (wrap.firstChild) {\n wrapper.appendChild(wrap.firstChild);\n }\n\n wrap.appendChild(wrapper);\n }\n\n firstChild = wrap.firstChild;\n }\n\n if (firstChild && firstChild.nodeType == 1) {\n firstChild.setAttribute(\"data-pm-slice\", openStart + \" \" + openEnd + \" \" + JSON.stringify(context));\n }\n\n var text = view.someProp(\"clipboardTextSerializer\", function (f) {\n return f(slice);\n }) || slice.content.textBetween(0, slice.content.size, \"\\n\\n\");\n return {\n dom: wrap,\n text: text\n };\n} // : (EditorView, string, string, ?bool, ResolvedPos) → ?Slice\n// Read a slice of content from the clipboard (or drop data).\n\n\nfunction parseFromClipboard(view, text, html, plainText, $context) {\n var dom,\n inCode = $context.parent.type.spec.code,\n slice;\n\n if (!html && !text) {\n return null;\n }\n\n var asText = text && (plainText || inCode || !html);\n\n if (asText) {\n view.someProp(\"transformPastedText\", function (f) {\n text = f(text);\n });\n\n if (inCode) {\n return new prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Slice\"](prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(view.state.schema.text(text)), 0, 0);\n }\n\n var parsed = view.someProp(\"clipboardTextParser\", function (f) {\n return f(text, $context);\n });\n\n if (parsed) {\n slice = parsed;\n } else {\n dom = document.createElement(\"div\");\n text.trim().split(/(?:\\r\\n?|\\n)+/).forEach(function (block) {\n dom.appendChild(document.createElement(\"p\")).textContent = block;\n });\n }\n } else {\n view.someProp(\"transformPastedHTML\", function (f) {\n html = f(html);\n });\n dom = readHTML(html);\n }\n\n var contextNode = dom && dom.querySelector(\"[data-pm-slice]\");\n var sliceData = contextNode && /^(\\d+) (\\d+) (.*)/.exec(contextNode.getAttribute(\"data-pm-slice\"));\n\n if (!slice) {\n var parser = view.someProp(\"clipboardParser\") || view.someProp(\"domParser\") || prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"DOMParser\"].fromSchema(view.state.schema);\n slice = parser.parseSlice(dom, {\n preserveWhitespace: !!(asText || sliceData),\n context: $context\n });\n }\n\n if (sliceData) {\n slice = addContext(closeSlice(slice, +sliceData[1], +sliceData[2]), sliceData[3]);\n } else // HTML wasn't created by ProseMirror. Make sure top-level siblings are coherent\n {\n slice = prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Slice\"].maxOpen(normalizeSiblings(slice.content, $context), false);\n }\n\n view.someProp(\"transformPasted\", function (f) {\n slice = f(slice);\n });\n return slice;\n} // Takes a slice parsed with parseSlice, which means there hasn't been\n// any content-expression checking done on the top nodes, tries to\n// find a parent node in the current context that might fit the nodes,\n// and if successful, rebuilds the slice so that it fits into that parent.\n//\n// This addresses the problem that Transform.replace expects a\n// coherent slice, and will fail to place a set of siblings that don't\n// fit anywhere in the schema.\n\n\nfunction normalizeSiblings(fragment, $context) {\n if (fragment.childCount < 2) {\n return fragment;\n }\n\n var loop = function loop(d) {\n var parent = $context.node(d);\n var match = parent.contentMatchAt($context.index(d));\n var lastWrap = void 0,\n result = [];\n fragment.forEach(function (node) {\n if (!result) {\n return;\n }\n\n var wrap = match.findWrapping(node.type),\n inLast;\n\n if (!wrap) {\n return result = null;\n }\n\n if (inLast = result.length && lastWrap.length && addToSibling(wrap, lastWrap, node, result[result.length - 1], 0)) {\n result[result.length - 1] = inLast;\n } else {\n if (result.length) {\n result[result.length - 1] = closeRight(result[result.length - 1], lastWrap.length);\n }\n\n var wrapped = withWrappers(node, wrap);\n result.push(wrapped);\n match = match.matchType(wrapped.type, wrapped.attrs);\n lastWrap = wrap;\n }\n });\n\n if (result) {\n return {\n v: prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(result)\n };\n }\n };\n\n for (var d = $context.depth; d >= 0; d--) {\n var returned = loop(d);\n if (returned) return returned.v;\n }\n\n return fragment;\n}\n\nfunction withWrappers(node, wrap, from) {\n if (from === void 0) from = 0;\n\n for (var i = wrap.length - 1; i >= from; i--) {\n node = wrap[i].create(null, prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(node));\n }\n\n return node;\n} // Used to group adjacent nodes wrapped in similar parents by\n// normalizeSiblings into the same parent node\n\n\nfunction addToSibling(wrap, lastWrap, node, sibling, depth) {\n if (depth < wrap.length && depth < lastWrap.length && wrap[depth] == lastWrap[depth]) {\n var inner = addToSibling(wrap, lastWrap, node, sibling.lastChild, depth + 1);\n\n if (inner) {\n return sibling.copy(sibling.content.replaceChild(sibling.childCount - 1, inner));\n }\n\n var match = sibling.contentMatchAt(sibling.childCount);\n\n if (match.matchType(depth == wrap.length - 1 ? node.type : wrap[depth + 1])) {\n return sibling.copy(sibling.content.append(prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(withWrappers(node, wrap, depth + 1))));\n }\n }\n}\n\nfunction closeRight(node, depth) {\n if (depth == 0) {\n return node;\n }\n\n var fragment = node.content.replaceChild(node.childCount - 1, closeRight(node.lastChild, depth - 1));\n var fill = node.contentMatchAt(node.childCount).fillBefore(prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].empty, true);\n return node.copy(fragment.append(fill));\n}\n\nfunction closeRange(fragment, side, from, to, depth, openEnd) {\n var node = side < 0 ? fragment.firstChild : fragment.lastChild,\n inner = node.content;\n\n if (depth < to - 1) {\n inner = closeRange(inner, side, from, to, depth + 1, openEnd);\n }\n\n if (depth >= from) {\n inner = side < 0 ? node.contentMatchAt(0).fillBefore(inner, fragment.childCount > 1 || openEnd <= depth).append(inner) : inner.append(node.contentMatchAt(node.childCount).fillBefore(prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].empty, true));\n }\n\n return fragment.replaceChild(side < 0 ? 0 : fragment.childCount - 1, node.copy(inner));\n}\n\nfunction closeSlice(slice, openStart, openEnd) {\n if (openStart < slice.openStart) {\n slice = new prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Slice\"](closeRange(slice.content, -1, openStart, slice.openStart, 0, slice.openEnd), openStart, slice.openEnd);\n }\n\n if (openEnd < slice.openEnd) {\n slice = new prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Slice\"](closeRange(slice.content, 1, openEnd, slice.openEnd, 0, 0), slice.openStart, openEnd);\n }\n\n return slice;\n} // Trick from jQuery -- some elements must be wrapped in other\n// elements for innerHTML to work. I.e. if you do `div.innerHTML =\n// \"..\"` the table cells are ignored.\n\n\nvar wrapMap = {\n thead: [\"table\"],\n tbody: [\"table\"],\n tfoot: [\"table\"],\n caption: [\"table\"],\n colgroup: [\"table\"],\n col: [\"table\", \"colgroup\"],\n tr: [\"table\", \"tbody\"],\n td: [\"table\", \"tbody\", \"tr\"],\n th: [\"table\", \"tbody\", \"tr\"]\n};\nvar _detachedDoc = null;\n\nfunction detachedDoc() {\n return _detachedDoc || (_detachedDoc = document.implementation.createHTMLDocument(\"title\"));\n}\n\nfunction readHTML(html) {\n var metas = /(\\s*]*>)*/.exec(html);\n\n if (metas) {\n html = html.slice(metas[0].length);\n }\n\n var elt = detachedDoc().createElement(\"div\");\n var firstTag = /(?:]*>)*<([a-z][^>\\s]+)/i.exec(html),\n wrap,\n depth = 0;\n\n if (wrap = firstTag && wrapMap[firstTag[1].toLowerCase()]) {\n html = wrap.map(function (n) {\n return \"<\" + n + \">\";\n }).join(\"\") + html + wrap.map(function (n) {\n return \"\";\n }).reverse().join(\"\");\n depth = wrap.length;\n }\n\n elt.innerHTML = html;\n\n for (var i = 0; i < depth; i++) {\n elt = elt.firstChild;\n }\n\n return elt;\n}\n\nfunction addContext(slice, context) {\n if (!slice.size) {\n return slice;\n }\n\n var schema = slice.content.firstChild.type.schema,\n array;\n\n try {\n array = JSON.parse(context);\n } catch (e) {\n return slice;\n }\n\n var content = slice.content;\n var openStart = slice.openStart;\n var openEnd = slice.openEnd;\n\n for (var i = array.length - 2; i >= 0; i -= 2) {\n var type = schema.nodes[array[i]];\n\n if (!type || type.hasRequiredAttrs()) {\n break;\n }\n\n content = prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"].from(type.create(array[i + 1], content));\n openStart++;\n openEnd++;\n }\n\n return new prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Slice\"](content, openStart, openEnd);\n}\n\nvar observeOptions = {\n childList: true,\n characterData: true,\n characterDataOldValue: true,\n attributes: true,\n attributeOldValue: true,\n subtree: true\n}; // IE11 has very broken mutation observers, so we also listen to DOMCharacterDataModified\n\nvar useCharData = result.ie && result.ie_version <= 11;\n\nvar SelectionState = function SelectionState() {\n this.anchorNode = this.anchorOffset = this.focusNode = this.focusOffset = null;\n};\n\nSelectionState.prototype.set = function set(sel) {\n this.anchorNode = sel.anchorNode;\n this.anchorOffset = sel.anchorOffset;\n this.focusNode = sel.focusNode;\n this.focusOffset = sel.focusOffset;\n};\n\nSelectionState.prototype.eq = function eq(sel) {\n return sel.anchorNode == this.anchorNode && sel.anchorOffset == this.anchorOffset && sel.focusNode == this.focusNode && sel.focusOffset == this.focusOffset;\n};\n\nvar DOMObserver = function DOMObserver(view, handleDOMChange) {\n var this$1 = this;\n this.view = view;\n this.handleDOMChange = handleDOMChange;\n this.queue = [];\n this.flushingSoon = false;\n this.observer = window.MutationObserver && new window.MutationObserver(function (mutations) {\n for (var i = 0; i < mutations.length; i++) {\n this$1.queue.push(mutations[i]);\n } // IE11 will sometimes (on backspacing out a single character\n // text node after a BR node) call the observer callback\n // before actually updating the DOM, which will cause\n // ProseMirror to miss the change (see #930)\n\n\n if (result.ie && result.ie_version <= 11 && mutations.some(function (m) {\n return m.type == \"childList\" && m.removedNodes.length || m.type == \"characterData\" && m.oldValue.length > m.target.nodeValue.length;\n })) {\n this$1.flushSoon();\n } else {\n this$1.flush();\n }\n });\n this.currentSelection = new SelectionState();\n\n if (useCharData) {\n this.onCharData = function (e) {\n this$1.queue.push({\n target: e.target,\n type: \"characterData\",\n oldValue: e.prevValue\n });\n this$1.flushSoon();\n };\n }\n\n this.onSelectionChange = this.onSelectionChange.bind(this);\n this.suppressingSelectionUpdates = false;\n};\n\nDOMObserver.prototype.flushSoon = function flushSoon() {\n var this$1 = this;\n\n if (!this.flushingSoon) {\n this.flushingSoon = true;\n window.setTimeout(function () {\n this$1.flushingSoon = false;\n this$1.flush();\n }, 20);\n }\n};\n\nDOMObserver.prototype.start = function start() {\n if (this.observer) {\n this.observer.observe(this.view.dom, observeOptions);\n }\n\n if (useCharData) {\n this.view.dom.addEventListener(\"DOMCharacterDataModified\", this.onCharData);\n }\n\n this.connectSelection();\n};\n\nDOMObserver.prototype.stop = function stop() {\n var this$1 = this;\n\n if (this.observer) {\n var take = this.observer.takeRecords();\n\n if (take.length) {\n for (var i = 0; i < take.length; i++) {\n this.queue.push(take[i]);\n }\n\n window.setTimeout(function () {\n return this$1.flush();\n }, 20);\n }\n\n this.observer.disconnect();\n }\n\n if (useCharData) {\n this.view.dom.removeEventListener(\"DOMCharacterDataModified\", this.onCharData);\n }\n\n this.disconnectSelection();\n};\n\nDOMObserver.prototype.connectSelection = function connectSelection() {\n this.view.dom.ownerDocument.addEventListener(\"selectionchange\", this.onSelectionChange);\n};\n\nDOMObserver.prototype.disconnectSelection = function disconnectSelection() {\n this.view.dom.ownerDocument.removeEventListener(\"selectionchange\", this.onSelectionChange);\n};\n\nDOMObserver.prototype.suppressSelectionUpdates = function suppressSelectionUpdates() {\n var this$1 = this;\n this.suppressingSelectionUpdates = true;\n setTimeout(function () {\n return this$1.suppressingSelectionUpdates = false;\n }, 50);\n};\n\nDOMObserver.prototype.onSelectionChange = function onSelectionChange() {\n if (!hasFocusAndSelection(this.view)) {\n return;\n }\n\n if (this.suppressingSelectionUpdates) {\n return selectionToDOM(this.view);\n } // Deletions on IE11 fire their events in the wrong order, giving\n // us a selection change event before the DOM changes are\n // reported.\n\n\n if (result.ie && result.ie_version <= 11 && !this.view.state.selection.empty) {\n var sel = this.view.root.getSelection(); // Selection.isCollapsed isn't reliable on IE\n\n if (sel.focusNode && isEquivalentPosition(sel.focusNode, sel.focusOffset, sel.anchorNode, sel.anchorOffset)) {\n return this.flushSoon();\n }\n }\n\n this.flush();\n};\n\nDOMObserver.prototype.setCurSelection = function setCurSelection() {\n this.currentSelection.set(this.view.root.getSelection());\n};\n\nDOMObserver.prototype.ignoreSelectionChange = function ignoreSelectionChange(sel) {\n if (sel.rangeCount == 0) {\n return true;\n }\n\n var container = sel.getRangeAt(0).commonAncestorContainer;\n var desc = this.view.docView.nearestDesc(container);\n\n if (desc && desc.ignoreMutation({\n type: \"selection\",\n target: container.nodeType == 3 ? container.parentNode : container\n })) {\n this.setCurSelection();\n return true;\n }\n};\n\nDOMObserver.prototype.flush = function flush() {\n if (!this.view.docView || this.flushingSoon) {\n return;\n }\n\n var mutations = this.observer ? this.observer.takeRecords() : [];\n\n if (this.queue.length) {\n mutations = this.queue.concat(mutations);\n this.queue.length = 0;\n }\n\n var sel = this.view.root.getSelection();\n var newSel = !this.suppressingSelectionUpdates && !this.currentSelection.eq(sel) && hasSelection(this.view) && !this.ignoreSelectionChange(sel);\n var from = -1,\n to = -1,\n typeOver = false,\n added = [];\n\n if (this.view.editable) {\n for (var i = 0; i < mutations.length; i++) {\n var result$1 = this.registerMutation(mutations[i], added);\n\n if (result$1) {\n from = from < 0 ? result$1.from : Math.min(result$1.from, from);\n to = to < 0 ? result$1.to : Math.max(result$1.to, to);\n\n if (result$1.typeOver && !this.view.composing) {\n typeOver = true;\n }\n }\n }\n }\n\n if (result.gecko && added.length > 1) {\n var brs = added.filter(function (n) {\n return n.nodeName == \"BR\";\n });\n\n if (brs.length == 2) {\n var a = brs[0];\n var b = brs[1];\n\n if (a.parentNode && a.parentNode.parentNode == b.parentNode) {\n b.remove();\n } else {\n a.remove();\n }\n }\n }\n\n if (from > -1 || newSel) {\n if (from > -1) {\n this.view.docView.markDirty(from, to);\n checkCSS(this.view);\n }\n\n this.handleDOMChange(from, to, typeOver, added);\n\n if (this.view.docView.dirty) {\n this.view.updateState(this.view.state);\n } else if (!this.currentSelection.eq(sel)) {\n selectionToDOM(this.view);\n }\n }\n};\n\nDOMObserver.prototype.registerMutation = function registerMutation(mut, added) {\n // Ignore mutations inside nodes that were already noted as inserted\n if (added.indexOf(mut.target) > -1) {\n return null;\n }\n\n var desc = this.view.docView.nearestDesc(mut.target);\n\n if (mut.type == \"attributes\" && (desc == this.view.docView || mut.attributeName == \"contenteditable\" || // Firefox sometimes fires spurious events for null/empty styles\n mut.attributeName == \"style\" && !mut.oldValue && !mut.target.getAttribute(\"style\"))) {\n return null;\n }\n\n if (!desc || desc.ignoreMutation(mut)) {\n return null;\n }\n\n if (mut.type == \"childList\") {\n var prev = mut.previousSibling,\n next = mut.nextSibling;\n\n if (result.ie && result.ie_version <= 11 && mut.addedNodes.length) {\n // IE11 gives us incorrect next/prev siblings for some\n // insertions, so if there are added nodes, recompute those\n for (var i = 0; i < mut.addedNodes.length; i++) {\n var ref = mut.addedNodes[i];\n var previousSibling = ref.previousSibling;\n var nextSibling = ref.nextSibling;\n\n if (!previousSibling || Array.prototype.indexOf.call(mut.addedNodes, previousSibling) < 0) {\n prev = previousSibling;\n }\n\n if (!nextSibling || Array.prototype.indexOf.call(mut.addedNodes, nextSibling) < 0) {\n next = nextSibling;\n }\n }\n }\n\n var fromOffset = prev && prev.parentNode == mut.target ? domIndex(prev) + 1 : 0;\n var from = desc.localPosFromDOM(mut.target, fromOffset, -1);\n var toOffset = next && next.parentNode == mut.target ? domIndex(next) : mut.target.childNodes.length;\n\n for (var i$1 = 0; i$1 < mut.addedNodes.length; i$1++) {\n added.push(mut.addedNodes[i$1]);\n }\n\n var to = desc.localPosFromDOM(mut.target, toOffset, 1);\n return {\n from: from,\n to: to\n };\n } else if (mut.type == \"attributes\") {\n return {\n from: desc.posAtStart - desc.border,\n to: desc.posAtEnd + desc.border\n };\n } else {\n // \"characterData\"\n return {\n from: desc.posAtStart,\n to: desc.posAtEnd,\n // An event was generated for a text change that didn't change\n // any text. Mark the dom change to fall back to assuming the\n // selection was typed over with an identical value if it can't\n // find another change.\n typeOver: mut.target.nodeValue == mut.oldValue\n };\n }\n};\n\nvar cssChecked = false;\n\nfunction checkCSS(view) {\n if (cssChecked) {\n return;\n }\n\n cssChecked = true;\n\n if (getComputedStyle(view.dom).whiteSpace == \"normal\") {\n console[\"warn\"](\"ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package.\");\n }\n} // A collection of DOM events that occur within the editor, and callback functions\n// to invoke when the event fires.\n\n\nvar handlers = {},\n editHandlers = {};\n\nfunction initInput(view) {\n view.shiftKey = false;\n view.mouseDown = null;\n view.lastKeyCode = null;\n view.lastKeyCodeTime = 0;\n view.lastClick = {\n time: 0,\n x: 0,\n y: 0,\n type: \"\"\n };\n view.lastSelectionOrigin = null;\n view.lastSelectionTime = 0;\n view.lastIOSEnter = 0;\n view.composing = false;\n view.composingTimeout = null;\n view.compositionNodes = [];\n view.compositionEndedAt = -2e8;\n view.domObserver = new DOMObserver(view, function (from, to, typeOver, added) {\n return readDOMChange(view, from, to, typeOver, added);\n });\n view.domObserver.start(); // Used by hacks like the beforeinput handler to check whether anything happened in the DOM\n\n view.domChangeCount = 0;\n view.eventHandlers = Object.create(null);\n\n var loop = function loop(event) {\n var handler = handlers[event];\n view.dom.addEventListener(event, view.eventHandlers[event] = function (event) {\n if (eventBelongsToView(view, event) && !runCustomHandler(view, event) && (view.editable || !(event.type in editHandlers))) {\n handler(view, event);\n }\n });\n };\n\n for (var event in handlers) {\n loop(event);\n } // On Safari, for reasons beyond my understanding, adding an input\n // event handler makes an issue where the composition vanishes when\n // you press enter go away.\n\n\n if (result.safari) {\n view.dom.addEventListener(\"input\", function () {\n return null;\n });\n }\n\n ensureListeners(view);\n}\n\nfunction setSelectionOrigin(view, origin) {\n view.lastSelectionOrigin = origin;\n view.lastSelectionTime = Date.now();\n}\n\nfunction destroyInput(view) {\n view.domObserver.stop();\n\n for (var type in view.eventHandlers) {\n view.dom.removeEventListener(type, view.eventHandlers[type]);\n }\n\n clearTimeout(view.composingTimeout);\n}\n\nfunction ensureListeners(view) {\n view.someProp(\"handleDOMEvents\", function (currentHandlers) {\n for (var type in currentHandlers) {\n if (!view.eventHandlers[type]) {\n view.dom.addEventListener(type, view.eventHandlers[type] = function (event) {\n return runCustomHandler(view, event);\n });\n }\n }\n });\n}\n\nfunction runCustomHandler(view, event) {\n return view.someProp(\"handleDOMEvents\", function (handlers) {\n var handler = handlers[event.type];\n return handler ? handler(view, event) || event.defaultPrevented : false;\n });\n}\n\nfunction eventBelongsToView(view, event) {\n if (!event.bubbles) {\n return true;\n }\n\n if (event.defaultPrevented) {\n return false;\n }\n\n for (var node = event.target; node != view.dom; node = node.parentNode) {\n if (!node || node.nodeType == 11 || node.pmViewDesc && node.pmViewDesc.stopEvent(event)) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction dispatchEvent(view, event) {\n if (!runCustomHandler(view, event) && handlers[event.type] && (view.editable || !(event.type in editHandlers))) {\n handlers[event.type](view, event);\n }\n}\n\neditHandlers.keydown = function (view, event) {\n view.shiftKey = event.keyCode == 16 || event.shiftKey;\n\n if (inOrNearComposition(view, event)) {\n return;\n }\n\n view.lastKeyCode = event.keyCode;\n view.lastKeyCodeTime = Date.now(); // On iOS, if we preventDefault enter key presses, the virtual\n // keyboard gets confused. So the hack here is to set a flag that\n // makes the DOM change code recognize that what just happens should\n // be replaced by whatever the Enter key handlers do.\n\n if (result.ios && event.keyCode == 13 && !event.ctrlKey && !event.altKey && !event.metaKey) {\n view.lastIOSEnter = Date.now();\n } else if (view.someProp(\"handleKeyDown\", function (f) {\n return f(view, event);\n }) || captureKeyDown(view, event)) {\n event.preventDefault();\n } else {\n setSelectionOrigin(view, \"key\");\n }\n};\n\neditHandlers.keyup = function (view, e) {\n if (e.keyCode == 16) {\n view.shiftKey = false;\n }\n};\n\neditHandlers.keypress = function (view, event) {\n if (inOrNearComposition(view, event) || !event.charCode || event.ctrlKey && !event.altKey || result.mac && event.metaKey) {\n return;\n }\n\n if (view.someProp(\"handleKeyPress\", function (f) {\n return f(view, event);\n })) {\n event.preventDefault();\n return;\n }\n\n var sel = view.state.selection;\n\n if (!(sel instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"TextSelection\"]) || !sel.$from.sameParent(sel.$to)) {\n var text = String.fromCharCode(event.charCode);\n\n if (!view.someProp(\"handleTextInput\", function (f) {\n return f(view, sel.$from.pos, sel.$to.pos, text);\n })) {\n view.dispatch(view.state.tr.insertText(text).scrollIntoView());\n }\n\n event.preventDefault();\n }\n};\n\nfunction eventCoords(event) {\n return {\n left: event.clientX,\n top: event.clientY\n };\n}\n\nfunction isNear(event, click) {\n var dx = click.x - event.clientX,\n dy = click.y - event.clientY;\n return dx * dx + dy * dy < 100;\n}\n\nfunction runHandlerOnContext(view, propName, pos, inside, event) {\n if (inside == -1) {\n return false;\n }\n\n var $pos = view.state.doc.resolve(inside);\n\n var loop = function loop(i) {\n if (view.someProp(propName, function (f) {\n return i > $pos.depth ? f(view, pos, $pos.nodeAfter, $pos.before(i), event, true) : f(view, pos, $pos.node(i), $pos.before(i), event, false);\n })) {\n return {\n v: true\n };\n }\n };\n\n for (var i = $pos.depth + 1; i > 0; i--) {\n var returned = loop(i);\n if (returned) return returned.v;\n }\n\n return false;\n}\n\nfunction updateSelection(view, selection, origin) {\n if (!view.focused) {\n view.focus();\n }\n\n var tr = view.state.tr.setSelection(selection);\n\n if (origin == \"pointer\") {\n tr.setMeta(\"pointer\", true);\n }\n\n view.dispatch(tr);\n}\n\nfunction selectClickedLeaf(view, inside) {\n if (inside == -1) {\n return false;\n }\n\n var $pos = view.state.doc.resolve(inside),\n node = $pos.nodeAfter;\n\n if (node && node.isAtom && prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"].isSelectable(node)) {\n updateSelection(view, new prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"]($pos), \"pointer\");\n return true;\n }\n\n return false;\n}\n\nfunction selectClickedNode(view, inside) {\n if (inside == -1) {\n return false;\n }\n\n var sel = view.state.selection,\n selectedNode,\n selectAt;\n\n if (sel instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"]) {\n selectedNode = sel.node;\n }\n\n var $pos = view.state.doc.resolve(inside);\n\n for (var i = $pos.depth + 1; i > 0; i--) {\n var node = i > $pos.depth ? $pos.nodeAfter : $pos.node(i);\n\n if (prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"].isSelectable(node)) {\n if (selectedNode && sel.$from.depth > 0 && i >= sel.$from.depth && $pos.before(sel.$from.depth + 1) == sel.$from.pos) {\n selectAt = $pos.before(sel.$from.depth);\n } else {\n selectAt = $pos.before(i);\n }\n\n break;\n }\n }\n\n if (selectAt != null) {\n updateSelection(view, prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"].create(view.state.doc, selectAt), \"pointer\");\n return true;\n } else {\n return false;\n }\n}\n\nfunction handleSingleClick(view, pos, inside, event, selectNode) {\n return runHandlerOnContext(view, \"handleClickOn\", pos, inside, event) || view.someProp(\"handleClick\", function (f) {\n return f(view, pos, event);\n }) || (selectNode ? selectClickedNode(view, inside) : selectClickedLeaf(view, inside));\n}\n\nfunction handleDoubleClick(view, pos, inside, event) {\n return runHandlerOnContext(view, \"handleDoubleClickOn\", pos, inside, event) || view.someProp(\"handleDoubleClick\", function (f) {\n return f(view, pos, event);\n });\n}\n\nfunction handleTripleClick(view, pos, inside, event) {\n return runHandlerOnContext(view, \"handleTripleClickOn\", pos, inside, event) || view.someProp(\"handleTripleClick\", function (f) {\n return f(view, pos, event);\n }) || defaultTripleClick(view, inside);\n}\n\nfunction defaultTripleClick(view, inside) {\n var doc = view.state.doc;\n\n if (inside == -1) {\n if (doc.inlineContent) {\n updateSelection(view, prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"TextSelection\"].create(doc, 0, doc.content.size), \"pointer\");\n return true;\n }\n\n return false;\n }\n\n var $pos = doc.resolve(inside);\n\n for (var i = $pos.depth + 1; i > 0; i--) {\n var node = i > $pos.depth ? $pos.nodeAfter : $pos.node(i);\n var nodePos = $pos.before(i);\n\n if (node.inlineContent) {\n updateSelection(view, prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"TextSelection\"].create(doc, nodePos + 1, nodePos + 1 + node.content.size), \"pointer\");\n } else if (prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"].isSelectable(node)) {\n updateSelection(view, prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"].create(doc, nodePos), \"pointer\");\n } else {\n continue;\n }\n\n return true;\n }\n}\n\nfunction forceDOMFlush(view) {\n return endComposition(view);\n}\n\nvar selectNodeModifier = result.mac ? \"metaKey\" : \"ctrlKey\";\n\nhandlers.mousedown = function (view, event) {\n view.shiftKey = event.shiftKey;\n var flushed = forceDOMFlush(view);\n var now = Date.now(),\n type = \"singleClick\";\n\n if (now - view.lastClick.time < 500 && isNear(event, view.lastClick) && !event[selectNodeModifier]) {\n if (view.lastClick.type == \"singleClick\") {\n type = \"doubleClick\";\n } else if (view.lastClick.type == \"doubleClick\") {\n type = \"tripleClick\";\n }\n }\n\n view.lastClick = {\n time: now,\n x: event.clientX,\n y: event.clientY,\n type: type\n };\n var pos = view.posAtCoords(eventCoords(event));\n\n if (!pos) {\n return;\n }\n\n if (type == \"singleClick\") {\n view.mouseDown = new MouseDown(view, pos, event, flushed);\n } else if ((type == \"doubleClick\" ? handleDoubleClick : handleTripleClick)(view, pos.pos, pos.inside, event)) {\n event.preventDefault();\n } else {\n setSelectionOrigin(view, \"pointer\");\n }\n};\n\nvar MouseDown = function MouseDown(view, pos, event, flushed) {\n var this$1 = this;\n this.view = view;\n this.startDoc = view.state.doc;\n this.pos = pos;\n this.event = event;\n this.flushed = flushed;\n this.selectNode = event[selectNodeModifier];\n this.allowDefault = event.shiftKey;\n var targetNode, targetPos;\n\n if (pos.inside > -1) {\n targetNode = view.state.doc.nodeAt(pos.inside);\n targetPos = pos.inside;\n } else {\n var $pos = view.state.doc.resolve(pos.pos);\n targetNode = $pos.parent;\n targetPos = $pos.depth ? $pos.before() : 0;\n }\n\n this.mightDrag = null;\n var target = flushed ? null : event.target;\n var targetDesc = target ? view.docView.nearestDesc(target, true) : null;\n this.target = targetDesc ? targetDesc.dom : null;\n\n if (targetNode.type.spec.draggable && targetNode.type.spec.selectable !== false || view.state.selection instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"] && targetPos == view.state.selection.from) {\n this.mightDrag = {\n node: targetNode,\n pos: targetPos,\n addAttr: this.target && !this.target.draggable,\n setUneditable: this.target && result.gecko && !this.target.hasAttribute(\"contentEditable\")\n };\n }\n\n if (this.target && this.mightDrag && (this.mightDrag.addAttr || this.mightDrag.setUneditable)) {\n this.view.domObserver.stop();\n\n if (this.mightDrag.addAttr) {\n this.target.draggable = true;\n }\n\n if (this.mightDrag.setUneditable) {\n setTimeout(function () {\n return this$1.target.setAttribute(\"contentEditable\", \"false\");\n }, 20);\n }\n\n this.view.domObserver.start();\n }\n\n view.root.addEventListener(\"mouseup\", this.up = this.up.bind(this));\n view.root.addEventListener(\"mousemove\", this.move = this.move.bind(this));\n setSelectionOrigin(view, \"pointer\");\n};\n\nMouseDown.prototype.done = function done() {\n this.view.root.removeEventListener(\"mouseup\", this.up);\n this.view.root.removeEventListener(\"mousemove\", this.move);\n\n if (this.mightDrag && this.target) {\n this.view.domObserver.stop();\n\n if (this.mightDrag.addAttr) {\n this.target.draggable = false;\n }\n\n if (this.mightDrag.setUneditable) {\n this.target.removeAttribute(\"contentEditable\");\n }\n\n this.view.domObserver.start();\n }\n\n this.view.mouseDown = null;\n};\n\nMouseDown.prototype.up = function up(event) {\n this.done();\n\n if (!this.view.dom.contains(event.target.nodeType == 3 ? event.target.parentNode : event.target)) {\n return;\n }\n\n var pos = this.pos;\n\n if (this.view.state.doc != this.startDoc) {\n pos = this.view.posAtCoords(eventCoords(event));\n }\n\n if (this.allowDefault || !pos) {\n setSelectionOrigin(this.view, \"pointer\");\n } else if (handleSingleClick(this.view, pos.pos, pos.inside, event, this.selectNode)) {\n event.preventDefault();\n } else if (this.flushed || // Chrome will sometimes treat a node selection as a\n // cursor, but still report that the node is selected\n // when asked through getSelection. You'll then get a\n // situation where clicking at the point where that\n // (hidden) cursor is doesn't change the selection, and\n // thus doesn't get a reaction from ProseMirror. This\n // works around that.\n result.chrome && !(this.view.state.selection instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"TextSelection\"]) && (pos.pos == this.view.state.selection.from || pos.pos == this.view.state.selection.to)) {\n updateSelection(this.view, prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"Selection\"].near(this.view.state.doc.resolve(pos.pos)), \"pointer\");\n event.preventDefault();\n } else {\n setSelectionOrigin(this.view, \"pointer\");\n }\n};\n\nMouseDown.prototype.move = function move(event) {\n if (!this.allowDefault && (Math.abs(this.event.x - event.clientX) > 4 || Math.abs(this.event.y - event.clientY) > 4)) {\n this.allowDefault = true;\n }\n\n setSelectionOrigin(this.view, \"pointer\");\n};\n\nhandlers.touchdown = function (view) {\n forceDOMFlush(view);\n setSelectionOrigin(view, \"pointer\");\n};\n\nhandlers.contextmenu = function (view) {\n return forceDOMFlush(view);\n};\n\nfunction inOrNearComposition(view, event) {\n if (view.composing) {\n return true;\n } // See https://www.stum.de/2016/06/24/handling-ime-events-in-javascript/.\n // On Japanese input method editors (IMEs), the Enter key is used to confirm character\n // selection. On Safari, when Enter is pressed, compositionend and keydown events are\n // emitted. The keydown event triggers newline insertion, which we don't want.\n // This method returns true if the keydown event should be ignored.\n // We only ignore it once, as pressing Enter a second time *should* insert a newline.\n // Furthermore, the keydown event timestamp must be close to the compositionEndedAt timestamp.\n // This guards against the case where compositionend is triggered without the keyboard\n // (e.g. character confirmation may be done with the mouse), and keydown is triggered\n // afterwards- we wouldn't want to ignore the keydown event in this case.\n\n\n if (result.safari && Math.abs(event.timeStamp - view.compositionEndedAt) < 500) {\n view.compositionEndedAt = -2e8;\n return true;\n }\n\n return false;\n} // Drop active composition after 5 seconds of inactivity on Android\n\n\nvar timeoutComposition = result.android ? 5000 : -1;\n\neditHandlers.compositionstart = editHandlers.compositionupdate = function (view) {\n if (!view.composing) {\n view.domObserver.flush();\n var state = view.state;\n var $pos = state.selection.$from;\n\n if (state.selection.empty && (state.storedMarks || !$pos.textOffset && $pos.parentOffset && $pos.nodeBefore.marks.some(function (m) {\n return m.type.spec.inclusive === false;\n }))) {\n // Need to wrap the cursor in mark nodes different from the ones in the DOM context\n view.markCursor = view.state.storedMarks || $pos.marks();\n endComposition(view, true);\n view.markCursor = null;\n } else {\n endComposition(view); // In firefox, if the cursor is after but outside a marked node,\n // the inserted text won't inherit the marks. So this moves it\n // inside if necessary.\n\n if (result.gecko && state.selection.empty && $pos.parentOffset && !$pos.textOffset && $pos.nodeBefore.marks.length) {\n var sel = view.root.getSelection();\n\n for (var node = sel.focusNode, offset = sel.focusOffset; node && node.nodeType == 1 && offset != 0;) {\n var before = offset < 0 ? node.lastChild : node.childNodes[offset - 1];\n\n if (!before) {\n break;\n }\n\n if (before.nodeType == 3) {\n sel.collapse(before, before.nodeValue.length);\n break;\n } else {\n node = before;\n offset = -1;\n }\n }\n }\n }\n\n view.composing = true;\n }\n\n scheduleComposeEnd(view, timeoutComposition);\n};\n\neditHandlers.compositionend = function (view, event) {\n if (view.composing) {\n view.composing = false;\n view.compositionEndedAt = event.timeStamp;\n scheduleComposeEnd(view, 20);\n }\n};\n\nfunction scheduleComposeEnd(view, delay) {\n clearTimeout(view.composingTimeout);\n\n if (delay > -1) {\n view.composingTimeout = setTimeout(function () {\n return endComposition(view);\n }, delay);\n }\n}\n\nfunction endComposition(view, forceUpdate) {\n view.composing = false;\n\n while (view.compositionNodes.length > 0) {\n view.compositionNodes.pop().markParentsDirty();\n }\n\n if (forceUpdate || view.docView.dirty) {\n view.updateState(view.state);\n return true;\n }\n\n return false;\n}\n\nfunction captureCopy(view, dom) {\n // The extra wrapper is somehow necessary on IE/Edge to prevent the\n // content from being mangled when it is put onto the clipboard\n var doc = view.dom.ownerDocument;\n var wrap = doc.body.appendChild(doc.createElement(\"div\"));\n wrap.appendChild(dom);\n wrap.style.cssText = \"position: fixed; left: -10000px; top: 10px\";\n var sel = getSelection(),\n range = doc.createRange();\n range.selectNodeContents(dom); // Done because IE will fire a selectionchange moving the selection\n // to its start when removeAllRanges is called and the editor still\n // has focus (which will mess up the editor's selection state).\n\n view.dom.blur();\n sel.removeAllRanges();\n sel.addRange(range);\n setTimeout(function () {\n doc.body.removeChild(wrap);\n view.focus();\n }, 50);\n} // This is very crude, but unfortunately both these browsers _pretend_\n// that they have a clipboard API—all the objects and methods are\n// there, they just don't work, and they are hard to test.\n\n\nvar brokenClipboardAPI = result.ie && result.ie_version < 15 || result.ios && result.webkit_version < 604;\n\nhandlers.copy = editHandlers.cut = function (view, e) {\n var sel = view.state.selection,\n cut = e.type == \"cut\";\n\n if (sel.empty) {\n return;\n } // IE and Edge's clipboard interface is completely broken\n\n\n var data = brokenClipboardAPI ? null : e.clipboardData;\n var slice = sel.content();\n var ref = serializeForClipboard(view, slice);\n var dom = ref.dom;\n var text = ref.text;\n\n if (data) {\n e.preventDefault();\n data.clearData();\n data.setData(\"text/html\", dom.innerHTML);\n data.setData(\"text/plain\", text);\n } else {\n captureCopy(view, dom);\n }\n\n if (cut) {\n view.dispatch(view.state.tr.deleteSelection().scrollIntoView().setMeta(\"uiEvent\", \"cut\"));\n }\n};\n\nfunction sliceSingleNode(slice) {\n return slice.openStart == 0 && slice.openEnd == 0 && slice.content.childCount == 1 ? slice.content.firstChild : null;\n}\n\nfunction capturePaste(view, e) {\n var doc = view.dom.ownerDocument;\n var plainText = view.shiftKey || view.state.selection.$from.parent.type.spec.code;\n var target = doc.body.appendChild(doc.createElement(plainText ? \"textarea\" : \"div\"));\n\n if (!plainText) {\n target.contentEditable = \"true\";\n }\n\n target.style.cssText = \"position: fixed; left: -10000px; top: 10px\";\n target.focus();\n setTimeout(function () {\n view.focus();\n doc.body.removeChild(target);\n\n if (plainText) {\n doPaste(view, target.value, null, e);\n } else {\n doPaste(view, target.textContent, target.innerHTML, e);\n }\n }, 50);\n}\n\nfunction doPaste(view, text, html, e) {\n var slice = parseFromClipboard(view, text, html, view.shiftKey, view.state.selection.$from);\n\n if (view.someProp(\"handlePaste\", function (f) {\n return f(view, e, slice || prosemirror_model__WEBPACK_IMPORTED_MODULE_1__[\"Slice\"].empty);\n }) || !slice) {\n return;\n }\n\n var singleNode = sliceSingleNode(slice);\n var tr = singleNode ? view.state.tr.replaceSelectionWith(singleNode, view.shiftKey) : view.state.tr.replaceSelection(slice);\n view.dispatch(tr.scrollIntoView().setMeta(\"paste\", true).setMeta(\"uiEvent\", \"paste\"));\n}\n\neditHandlers.paste = function (view, e) {\n var data = brokenClipboardAPI ? null : e.clipboardData;\n var html = data && data.getData(\"text/html\"),\n text = data && data.getData(\"text/plain\");\n\n if (data && (html || text || data.files.length)) {\n doPaste(view, text, html, e);\n e.preventDefault();\n } else {\n capturePaste(view, e);\n }\n};\n\nvar Dragging = function Dragging(slice, move) {\n this.slice = slice;\n this.move = move;\n};\n\nvar dragCopyModifier = result.mac ? \"altKey\" : \"ctrlKey\";\n\nhandlers.dragstart = function (view, e) {\n var mouseDown = view.mouseDown;\n\n if (mouseDown) {\n mouseDown.done();\n }\n\n if (!e.dataTransfer) {\n return;\n }\n\n var sel = view.state.selection;\n var pos = sel.empty ? null : view.posAtCoords(eventCoords(e));\n if (pos && pos.pos >= sel.from && pos.pos <= (sel instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"] ? sel.to - 1 : sel.to)) ;else if (mouseDown && mouseDown.mightDrag) {\n view.dispatch(view.state.tr.setSelection(prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"].create(view.state.doc, mouseDown.mightDrag.pos)));\n } else if (e.target && e.target.nodeType == 1) {\n var desc = view.docView.nearestDesc(e.target, true);\n\n if (!desc || !desc.node.type.spec.draggable || desc == view.docView) {\n return;\n }\n\n view.dispatch(view.state.tr.setSelection(prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"].create(view.state.doc, desc.posBefore)));\n }\n var slice = view.state.selection.content();\n var ref = serializeForClipboard(view, slice);\n var dom = ref.dom;\n var text = ref.text;\n e.dataTransfer.clearData();\n e.dataTransfer.setData(brokenClipboardAPI ? \"Text\" : \"text/html\", dom.innerHTML);\n\n if (!brokenClipboardAPI) {\n e.dataTransfer.setData(\"text/plain\", text);\n }\n\n view.dragging = new Dragging(slice, !e[dragCopyModifier]);\n};\n\nhandlers.dragend = function (view) {\n window.setTimeout(function () {\n return view.dragging = null;\n }, 50);\n};\n\neditHandlers.dragover = editHandlers.dragenter = function (_, e) {\n return e.preventDefault();\n};\n\neditHandlers.drop = function (view, e) {\n var dragging = view.dragging;\n view.dragging = null;\n\n if (!e.dataTransfer) {\n return;\n }\n\n var eventPos = view.posAtCoords(eventCoords(e));\n\n if (!eventPos) {\n return;\n }\n\n var $mouse = view.state.doc.resolve(eventPos.pos);\n\n if (!$mouse) {\n return;\n }\n\n var slice = dragging && dragging.slice || parseFromClipboard(view, e.dataTransfer.getData(brokenClipboardAPI ? \"Text\" : \"text/plain\"), brokenClipboardAPI ? null : e.dataTransfer.getData(\"text/html\"), false, $mouse);\n\n if (!slice) {\n return;\n }\n\n e.preventDefault();\n\n if (view.someProp(\"handleDrop\", function (f) {\n return f(view, e, slice, dragging && dragging.move);\n })) {\n return;\n }\n\n var insertPos = slice ? Object(prosemirror_transform__WEBPACK_IMPORTED_MODULE_2__[\"dropPoint\"])(view.state.doc, $mouse.pos, slice) : $mouse.pos;\n\n if (insertPos == null) {\n insertPos = $mouse.pos;\n }\n\n var tr = view.state.tr;\n\n if (dragging && dragging.move) {\n tr.deleteSelection();\n }\n\n var pos = tr.mapping.map(insertPos);\n var isNode = slice.openStart == 0 && slice.openEnd == 0 && slice.content.childCount == 1;\n var beforeInsert = tr.doc;\n\n if (isNode) {\n tr.replaceRangeWith(pos, pos, slice.content.firstChild);\n } else {\n tr.replaceRange(pos, pos, slice);\n }\n\n if (tr.doc.eq(beforeInsert)) {\n return;\n }\n\n var $pos = tr.doc.resolve(pos);\n\n if (isNode && prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"].isSelectable(slice.content.firstChild) && $pos.nodeAfter && $pos.nodeAfter.sameMarkup(slice.content.firstChild)) {\n tr.setSelection(new prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"]($pos));\n } else {\n tr.setSelection(selectionBetween(view, $pos, tr.doc.resolve(tr.mapping.map(insertPos))));\n }\n\n view.focus();\n view.dispatch(tr.setMeta(\"uiEvent\", \"drop\"));\n};\n\nhandlers.focus = function (view) {\n if (!view.focused) {\n view.domObserver.stop();\n view.dom.classList.add(\"ProseMirror-focused\");\n view.domObserver.start();\n view.focused = true;\n setTimeout(function () {\n if (view.docView && view.hasFocus() && !view.domObserver.currentSelection.eq(view.root.getSelection())) {\n selectionToDOM(view);\n }\n }, 20);\n }\n};\n\nhandlers.blur = function (view) {\n if (view.focused) {\n view.domObserver.stop();\n view.dom.classList.remove(\"ProseMirror-focused\");\n view.domObserver.start();\n view.domObserver.currentSelection.set({});\n view.focused = false;\n }\n};\n\nhandlers.beforeinput = function (view, event) {\n // We should probably do more with beforeinput events, but support\n // is so spotty that I'm still waiting to see where they are going.\n // Very specific hack to deal with backspace sometimes failing on\n // Chrome Android when after an uneditable node.\n if (result.chrome && result.android && event.inputType == \"deleteContentBackward\") {\n var domChangeCount = view.domChangeCount;\n setTimeout(function () {\n if (view.domChangeCount != domChangeCount) {\n return;\n } // Event already had some effect\n // This bug tends to close the virtual keyboard, so we refocus\n\n\n view.dom.blur();\n view.focus();\n\n if (view.someProp(\"handleKeyDown\", function (f) {\n return f(view, keyEvent(8, \"Backspace\"));\n })) {\n return;\n }\n\n var ref = view.state.selection;\n var $cursor = ref.$cursor; // Crude approximation of backspace behavior when no command handled it\n\n if ($cursor && $cursor.pos > 0) {\n view.dispatch(view.state.tr[\"delete\"]($cursor.pos - 1, $cursor.pos).scrollIntoView());\n }\n }, 50);\n }\n}; // Make sure all handlers get registered\n\n\nfor (var prop in editHandlers) {\n handlers[prop] = editHandlers[prop];\n}\n\nfunction compareObjs(a, b) {\n if (a == b) {\n return true;\n }\n\n for (var p in a) {\n if (a[p] !== b[p]) {\n return false;\n }\n }\n\n for (var p$1 in b) {\n if (!(p$1 in a)) {\n return false;\n }\n }\n\n return true;\n}\n\nvar WidgetType = function WidgetType(toDOM, spec) {\n this.spec = spec || noSpec;\n this.side = this.spec.side || 0;\n this.toDOM = toDOM;\n};\n\nWidgetType.prototype.map = function map(mapping, span, offset, oldOffset) {\n var ref = mapping.mapResult(span.from + oldOffset, this.side < 0 ? -1 : 1);\n var pos = ref.pos;\n var deleted = ref.deleted;\n return deleted ? null : new Decoration(pos - offset, pos - offset, this);\n};\n\nWidgetType.prototype.valid = function valid() {\n return true;\n};\n\nWidgetType.prototype.eq = function eq(other) {\n return this == other || other instanceof WidgetType && (this.spec.key && this.spec.key == other.spec.key || this.toDOM == other.toDOM && compareObjs(this.spec, other.spec));\n};\n\nvar InlineType = function InlineType(attrs, spec) {\n this.spec = spec || noSpec;\n this.attrs = attrs;\n};\n\nInlineType.prototype.map = function map(mapping, span, offset, oldOffset) {\n var from = mapping.map(span.from + oldOffset, this.spec.inclusiveStart ? -1 : 1) - offset;\n var to = mapping.map(span.to + oldOffset, this.spec.inclusiveEnd ? 1 : -1) - offset;\n return from >= to ? null : new Decoration(from, to, this);\n};\n\nInlineType.prototype.valid = function valid(_, span) {\n return span.from < span.to;\n};\n\nInlineType.prototype.eq = function eq(other) {\n return this == other || other instanceof InlineType && compareObjs(this.attrs, other.attrs) && compareObjs(this.spec, other.spec);\n};\n\nInlineType.is = function is(span) {\n return span.type instanceof InlineType;\n};\n\nvar NodeType = function NodeType(attrs, spec) {\n this.spec = spec || noSpec;\n this.attrs = attrs;\n};\n\nNodeType.prototype.map = function map(mapping, span, offset, oldOffset) {\n var from = mapping.mapResult(span.from + oldOffset, 1);\n\n if (from.deleted) {\n return null;\n }\n\n var to = mapping.mapResult(span.to + oldOffset, -1);\n\n if (to.deleted || to.pos <= from.pos) {\n return null;\n }\n\n return new Decoration(from.pos - offset, to.pos - offset, this);\n};\n\nNodeType.prototype.valid = function valid(node, span) {\n var ref = node.content.findIndex(span.from);\n var index = ref.index;\n var offset = ref.offset;\n return offset == span.from && offset + node.child(index).nodeSize == span.to;\n};\n\nNodeType.prototype.eq = function eq(other) {\n return this == other || other instanceof NodeType && compareObjs(this.attrs, other.attrs) && compareObjs(this.spec, other.spec);\n}; // ::- Decoration objects can be provided to the view through the\n// [`decorations` prop](#view.EditorProps.decorations). They come in\n// several variants—see the static members of this class for details.\n\n\nvar Decoration = function Decoration(from, to, type) {\n // :: number\n // The start position of the decoration.\n this.from = from; // :: number\n // The end position. Will be the same as `from` for [widget\n // decorations](#view.Decoration^widget).\n\n this.to = to;\n this.type = type;\n};\n\nvar prototypeAccessors$1 = {\n spec: {\n configurable: true\n }\n};\n\nDecoration.prototype.copy = function copy(from, to) {\n return new Decoration(from, to, this.type);\n};\n\nDecoration.prototype.eq = function eq(other) {\n return this.type.eq(other.type) && this.from == other.from && this.to == other.to;\n};\n\nDecoration.prototype.map = function map(mapping, offset, oldOffset) {\n return this.type.map(mapping, this, offset, oldOffset);\n}; // :: (number, union<(view: EditorView, getPos: () → number) → dom.Node, dom.Node>, ?Object) → Decoration\n// Creates a widget decoration, which is a DOM node that's shown in\n// the document at the given position. It is recommended that you\n// delay rendering the widget by passing a function that will be\n// called when the widget is actually drawn in a view, but you can\n// also directly pass a DOM node. `getPos` can be used to find the\n// widget's current document position.\n//\n// spec::- These options are supported:\n//\n// side:: ?number\n// Controls which side of the document position this widget is\n// associated with. When negative, it is drawn before a cursor\n// at its position, and content inserted at that position ends\n// up after the widget. When zero (the default) or positive, the\n// widget is drawn after the cursor and content inserted there\n// ends up before the widget.\n//\n// When there are multiple widgets at a given position, their\n// `side` values determine the order in which they appear. Those\n// with lower values appear first. The ordering of widgets with\n// the same `side` value is unspecified.\n//\n// When `marks` is null, `side` also determines the marks that\n// the widget is wrapped in—those of the node before when\n// negative, those of the node after when positive.\n//\n// marks:: ?[Mark]\n// The precise set of marks to draw around the widget.\n//\n// stopEvent:: ?(event: dom.Event) → bool\n// Can be used to control which DOM events, when they bubble out\n// of this widget, the editor view should ignore.\n//\n// ignoreSelection:: ?bool\n// When set (defaults to false), selection changes inside the\n// widget are ignored, and don't cause ProseMirror to try and\n// re-sync the selection with its selection state.\n//\n// key:: ?string\n// When comparing decorations of this type (in order to decide\n// whether it needs to be redrawn), ProseMirror will by default\n// compare the widget DOM node by identity. If you pass a key,\n// that key will be compared instead, which can be useful when\n// you generate decorations on the fly and don't want to store\n// and reuse DOM nodes. Make sure that any widgets with the same\n// key are interchangeable—if widgets differ in, for example,\n// the behavior of some event handler, they should get\n// different keys.\n\n\nDecoration.widget = function widget(pos, toDOM, spec) {\n return new Decoration(pos, pos, new WidgetType(toDOM, spec));\n}; // :: (number, number, DecorationAttrs, ?Object) → Decoration\n// Creates an inline decoration, which adds the given attributes to\n// each inline node between `from` and `to`.\n//\n// spec::- These options are recognized:\n//\n// inclusiveStart:: ?bool\n// Determines how the left side of the decoration is\n// [mapped](#transform.Position_Mapping) when content is\n// inserted directly at that position. By default, the decoration\n// won't include the new content, but you can set this to `true`\n// to make it inclusive.\n//\n// inclusiveEnd:: ?bool\n// Determines how the right side of the decoration is mapped.\n// See\n// [`inclusiveStart`](#view.Decoration^inline^spec.inclusiveStart).\n\n\nDecoration.inline = function inline(from, to, attrs, spec) {\n return new Decoration(from, to, new InlineType(attrs, spec));\n}; // :: (number, number, DecorationAttrs, ?Object) → Decoration\n// Creates a node decoration. `from` and `to` should point precisely\n// before and after a node in the document. That node, and only that\n// node, will receive the given attributes.\n//\n// spec::-\n//\n// Optional information to store with the decoration. It\n// is also used when comparing decorators for equality.\n\n\nDecoration.node = function node(from, to, attrs, spec) {\n return new Decoration(from, to, new NodeType(attrs, spec));\n}; // :: Object\n// The spec provided when creating this decoration. Can be useful\n// if you've stored extra information in that object.\n\n\nprototypeAccessors$1.spec.get = function () {\n return this.type.spec;\n};\n\nObject.defineProperties(Decoration.prototype, prototypeAccessors$1); // DecorationAttrs:: interface\n// A set of attributes to add to a decorated node. Most properties\n// simply directly correspond to DOM attributes of the same name,\n// which will be set to the property's value. These are exceptions:\n//\n// class:: ?string\n// A CSS class name or a space-separated set of class names to be\n// _added_ to the classes that the node already had.\n//\n// style:: ?string\n// A string of CSS to be _added_ to the node's existing `style` property.\n//\n// nodeName:: ?string\n// When non-null, the target node is wrapped in a DOM element of\n// this type (and the other attributes are applied to this element).\n\nvar none = [],\n noSpec = {}; // ::- A collection of [decorations](#view.Decoration), organized in\n// such a way that the drawing algorithm can efficiently use and\n// compare them. This is a persistent data structure—it is not\n// modified, updates create a new value.\n\nvar DecorationSet = function DecorationSet(local, children) {\n this.local = local && local.length ? local : none;\n this.children = children && children.length ? children : none;\n}; // :: (Node, [Decoration]) → DecorationSet\n// Create a set of decorations, using the structure of the given\n// document.\n\n\nDecorationSet.create = function create(doc, decorations) {\n return decorations.length ? buildTree(decorations, doc, 0, noSpec) : empty;\n}; // :: (?number, ?number, ?(spec: Object) → bool) → [Decoration]\n// Find all decorations in this set which touch the given range\n// (including decorations that start or end directly at the\n// boundaries) and match the given predicate on their spec. When\n// `start` and `end` are omitted, all decorations in the set are\n// considered. When `predicate` isn't given, all decorations are\n// assumed to match.\n\n\nDecorationSet.prototype.find = function find(start, end, predicate) {\n var result = [];\n this.findInner(start == null ? 0 : start, end == null ? 1e9 : end, result, 0, predicate);\n return result;\n};\n\nDecorationSet.prototype.findInner = function findInner(start, end, result, offset, predicate) {\n for (var i = 0; i < this.local.length; i++) {\n var span = this.local[i];\n\n if (span.from <= end && span.to >= start && (!predicate || predicate(span.spec))) {\n result.push(span.copy(span.from + offset, span.to + offset));\n }\n }\n\n for (var i$1 = 0; i$1 < this.children.length; i$1 += 3) {\n if (this.children[i$1] < end && this.children[i$1 + 1] > start) {\n var childOff = this.children[i$1] + 1;\n this.children[i$1 + 2].findInner(start - childOff, end - childOff, result, offset + childOff, predicate);\n }\n }\n}; // :: (Mapping, Node, ?Object) → DecorationSet\n// Map the set of decorations in response to a change in the\n// document.\n//\n// options::- An optional set of options.\n//\n// onRemove:: ?(decorationSpec: Object)\n// When given, this function will be called for each decoration\n// that gets dropped as a result of the mapping, passing the\n// spec of that decoration.\n\n\nDecorationSet.prototype.map = function map(mapping, doc, options) {\n if (this == empty || mapping.maps.length == 0) {\n return this;\n }\n\n return this.mapInner(mapping, doc, 0, 0, options || noSpec);\n};\n\nDecorationSet.prototype.mapInner = function mapInner(mapping, node, offset, oldOffset, options) {\n var newLocal;\n\n for (var i = 0; i < this.local.length; i++) {\n var mapped = this.local[i].map(mapping, offset, oldOffset);\n\n if (mapped && mapped.type.valid(node, mapped)) {\n (newLocal || (newLocal = [])).push(mapped);\n } else if (options.onRemove) {\n options.onRemove(this.local[i].spec);\n }\n }\n\n if (this.children.length) {\n return mapChildren(this.children, newLocal, mapping, node, offset, oldOffset, options);\n } else {\n return newLocal ? new DecorationSet(newLocal.sort(byPos)) : empty;\n }\n}; // :: (Node, [Decoration]) → DecorationSet\n// Add the given array of decorations to the ones in the set,\n// producing a new set. Needs access to the current document to\n// create the appropriate tree structure.\n\n\nDecorationSet.prototype.add = function add(doc, decorations) {\n if (!decorations.length) {\n return this;\n }\n\n if (this == empty) {\n return DecorationSet.create(doc, decorations);\n }\n\n return this.addInner(doc, decorations, 0);\n};\n\nDecorationSet.prototype.addInner = function addInner(doc, decorations, offset) {\n var this$1 = this;\n var children,\n childIndex = 0;\n doc.forEach(function (childNode, childOffset) {\n var baseOffset = childOffset + offset,\n found;\n\n if (!(found = takeSpansForNode(decorations, childNode, baseOffset))) {\n return;\n }\n\n if (!children) {\n children = this$1.children.slice();\n }\n\n while (childIndex < children.length && children[childIndex] < childOffset) {\n childIndex += 3;\n }\n\n if (children[childIndex] == childOffset) {\n children[childIndex + 2] = children[childIndex + 2].addInner(childNode, found, baseOffset + 1);\n } else {\n children.splice(childIndex, 0, childOffset, childOffset + childNode.nodeSize, buildTree(found, childNode, baseOffset + 1, noSpec));\n }\n\n childIndex += 3;\n });\n var local = moveSpans(childIndex ? withoutNulls(decorations) : decorations, -offset);\n return new DecorationSet(local.length ? this.local.concat(local).sort(byPos) : this.local, children || this.children);\n}; // :: ([Decoration]) → DecorationSet\n// Create a new set that contains the decorations in this set, minus\n// the ones in the given array.\n\n\nDecorationSet.prototype.remove = function remove(decorations) {\n if (decorations.length == 0 || this == empty) {\n return this;\n }\n\n return this.removeInner(decorations, 0);\n};\n\nDecorationSet.prototype.removeInner = function removeInner(decorations, offset) {\n var children = this.children,\n local = this.local;\n\n for (var i = 0; i < children.length; i += 3) {\n var found = void 0,\n from = children[i] + offset,\n to = children[i + 1] + offset;\n\n for (var j = 0, span = void 0; j < decorations.length; j++) {\n if (span = decorations[j]) {\n if (span.from > from && span.to < to) {\n decorations[j] = null;\n (found || (found = [])).push(span);\n }\n }\n }\n\n if (!found) {\n continue;\n }\n\n if (children == this.children) {\n children = this.children.slice();\n }\n\n var removed = children[i + 2].removeInner(found, from + 1);\n\n if (removed != empty) {\n children[i + 2] = removed;\n } else {\n children.splice(i, 3);\n i -= 3;\n }\n }\n\n if (local.length) {\n for (var i$1 = 0, span$1 = void 0; i$1 < decorations.length; i$1++) {\n if (span$1 = decorations[i$1]) {\n for (var j$1 = 0; j$1 < local.length; j$1++) {\n if (local[j$1].type.eq(span$1.type)) {\n if (local == this.local) {\n local = this.local.slice();\n }\n\n local.splice(j$1--, 1);\n }\n }\n }\n }\n }\n\n if (children == this.children && local == this.local) {\n return this;\n }\n\n return local.length || children.length ? new DecorationSet(local, children) : empty;\n};\n\nDecorationSet.prototype.forChild = function forChild(offset, node) {\n if (this == empty) {\n return this;\n }\n\n if (node.isLeaf) {\n return DecorationSet.empty;\n }\n\n var child, local;\n\n for (var i = 0; i < this.children.length; i += 3) {\n if (this.children[i] >= offset) {\n if (this.children[i] == offset) {\n child = this.children[i + 2];\n }\n\n break;\n }\n }\n\n var start = offset + 1,\n end = start + node.content.size;\n\n for (var i$1 = 0; i$1 < this.local.length; i$1++) {\n var dec = this.local[i$1];\n\n if (dec.from < end && dec.to > start && dec.type instanceof InlineType) {\n var from = Math.max(start, dec.from) - start,\n to = Math.min(end, dec.to) - start;\n\n if (from < to) {\n (local || (local = [])).push(dec.copy(from, to));\n }\n }\n }\n\n if (local) {\n var localSet = new DecorationSet(local.sort(byPos));\n return child ? new DecorationGroup([localSet, child]) : localSet;\n }\n\n return child || empty;\n};\n\nDecorationSet.prototype.eq = function eq(other) {\n if (this == other) {\n return true;\n }\n\n if (!(other instanceof DecorationSet) || this.local.length != other.local.length || this.children.length != other.children.length) {\n return false;\n }\n\n for (var i = 0; i < this.local.length; i++) {\n if (!this.local[i].eq(other.local[i])) {\n return false;\n }\n }\n\n for (var i$1 = 0; i$1 < this.children.length; i$1 += 3) {\n if (this.children[i$1] != other.children[i$1] || this.children[i$1 + 1] != other.children[i$1 + 1] || !this.children[i$1 + 2].eq(other.children[i$1 + 2])) {\n return false;\n }\n }\n\n return true;\n};\n\nDecorationSet.prototype.locals = function locals(node) {\n return removeOverlap(this.localsInner(node));\n};\n\nDecorationSet.prototype.localsInner = function localsInner(node) {\n if (this == empty) {\n return none;\n }\n\n if (node.inlineContent || !this.local.some(InlineType.is)) {\n return this.local;\n }\n\n var result = [];\n\n for (var i = 0; i < this.local.length; i++) {\n if (!(this.local[i].type instanceof InlineType)) {\n result.push(this.local[i]);\n }\n }\n\n return result;\n};\n\nvar empty = new DecorationSet(); // :: DecorationSet\n// The empty set of decorations.\n\nDecorationSet.empty = empty;\nDecorationSet.removeOverlap = removeOverlap; // :- An abstraction that allows the code dealing with decorations to\n// treat multiple DecorationSet objects as if it were a single object\n// with (a subset of) the same interface.\n\nvar DecorationGroup = function DecorationGroup(members) {\n this.members = members;\n};\n\nDecorationGroup.prototype.forChild = function forChild(offset, child) {\n if (child.isLeaf) {\n return DecorationSet.empty;\n }\n\n var found = [];\n\n for (var i = 0; i < this.members.length; i++) {\n var result = this.members[i].forChild(offset, child);\n\n if (result == empty) {\n continue;\n }\n\n if (result instanceof DecorationGroup) {\n found = found.concat(result.members);\n } else {\n found.push(result);\n }\n }\n\n return DecorationGroup.from(found);\n};\n\nDecorationGroup.prototype.eq = function eq(other) {\n if (!(other instanceof DecorationGroup) || other.members.length != this.members.length) {\n return false;\n }\n\n for (var i = 0; i < this.members.length; i++) {\n if (!this.members[i].eq(other.members[i])) {\n return false;\n }\n }\n\n return true;\n};\n\nDecorationGroup.prototype.locals = function locals(node) {\n var result,\n sorted = true;\n\n for (var i = 0; i < this.members.length; i++) {\n var locals = this.members[i].localsInner(node);\n\n if (!locals.length) {\n continue;\n }\n\n if (!result) {\n result = locals;\n } else {\n if (sorted) {\n result = result.slice();\n sorted = false;\n }\n\n for (var j = 0; j < locals.length; j++) {\n result.push(locals[j]);\n }\n }\n }\n\n return result ? removeOverlap(sorted ? result : result.sort(byPos)) : none;\n}; // : ([DecorationSet]) → union\n// Create a group for the given array of decoration sets, or return\n// a single set when possible.\n\n\nDecorationGroup.from = function from(members) {\n switch (members.length) {\n case 0:\n return empty;\n\n case 1:\n return members[0];\n\n default:\n return new DecorationGroup(members);\n }\n};\n\nfunction mapChildren(oldChildren, newLocal, mapping, node, offset, oldOffset, options) {\n var children = oldChildren.slice(); // Mark the children that are directly touched by changes, and\n // move those that are after the changes.\n\n var shift = function shift(oldStart, oldEnd, newStart, newEnd) {\n for (var i = 0; i < children.length; i += 3) {\n var end = children[i + 1],\n dSize = void 0;\n\n if (end == -1 || oldStart > end + oldOffset) {\n continue;\n }\n\n if (oldEnd >= children[i] + oldOffset) {\n children[i + 1] = -1;\n } else if (dSize = newEnd - newStart - (oldEnd - oldStart) + (oldOffset - offset)) {\n children[i] += dSize;\n children[i + 1] += dSize;\n }\n }\n };\n\n for (var i = 0; i < mapping.maps.length; i++) {\n mapping.maps[i].forEach(shift);\n } // Find the child nodes that still correspond to a single node,\n // recursively call mapInner on them and update their positions.\n\n\n var mustRebuild = false;\n\n for (var i$1 = 0; i$1 < children.length; i$1 += 3) {\n if (children[i$1 + 1] == -1) {\n // Touched nodes\n var from = mapping.map(children[i$1] + oldOffset),\n fromLocal = from - offset;\n\n if (fromLocal < 0 || fromLocal >= node.content.size) {\n mustRebuild = true;\n continue;\n } // Must read oldChildren because children was tagged with -1\n\n\n var to = mapping.map(oldChildren[i$1 + 1] + oldOffset, -1),\n toLocal = to - offset;\n var ref = node.content.findIndex(fromLocal);\n var index = ref.index;\n var childOffset = ref.offset;\n var childNode = node.maybeChild(index);\n\n if (childNode && childOffset == fromLocal && childOffset + childNode.nodeSize == toLocal) {\n var mapped = children[i$1 + 2].mapInner(mapping, childNode, from + 1, children[i$1] + oldOffset + 1, options);\n\n if (mapped != empty) {\n children[i$1] = fromLocal;\n children[i$1 + 1] = toLocal;\n children[i$1 + 2] = mapped;\n } else {\n children[i$1 + 1] = -2;\n mustRebuild = true;\n }\n } else {\n mustRebuild = true;\n }\n }\n } // Remaining children must be collected and rebuilt into the appropriate structure\n\n\n if (mustRebuild) {\n var decorations = mapAndGatherRemainingDecorations(children, oldChildren, newLocal || [], mapping, offset, oldOffset, options);\n var built = buildTree(decorations, node, 0, options);\n newLocal = built.local;\n\n for (var i$2 = 0; i$2 < children.length; i$2 += 3) {\n if (children[i$2 + 1] < 0) {\n children.splice(i$2, 3);\n i$2 -= 3;\n }\n }\n\n for (var i$3 = 0, j = 0; i$3 < built.children.length; i$3 += 3) {\n var from$1 = built.children[i$3];\n\n while (j < children.length && children[j] < from$1) {\n j += 3;\n }\n\n children.splice(j, 0, built.children[i$3], built.children[i$3 + 1], built.children[i$3 + 2]);\n }\n }\n\n return new DecorationSet(newLocal && newLocal.sort(byPos), children);\n}\n\nfunction moveSpans(spans, offset) {\n if (!offset || !spans.length) {\n return spans;\n }\n\n var result = [];\n\n for (var i = 0; i < spans.length; i++) {\n var span = spans[i];\n result.push(new Decoration(span.from + offset, span.to + offset, span.type));\n }\n\n return result;\n}\n\nfunction mapAndGatherRemainingDecorations(children, oldChildren, decorations, mapping, offset, oldOffset, options) {\n // Gather all decorations from the remaining marked children\n function gather(set, oldOffset) {\n for (var i = 0; i < set.local.length; i++) {\n var mapped = set.local[i].map(mapping, offset, oldOffset);\n\n if (mapped) {\n decorations.push(mapped);\n } else if (options.onRemove) {\n options.onRemove(set.local[i].spec);\n }\n }\n\n for (var i$1 = 0; i$1 < set.children.length; i$1 += 3) {\n gather(set.children[i$1 + 2], set.children[i$1] + oldOffset + 1);\n }\n }\n\n for (var i = 0; i < children.length; i += 3) {\n if (children[i + 1] == -1) {\n gather(children[i + 2], oldChildren[i] + oldOffset + 1);\n }\n }\n\n return decorations;\n}\n\nfunction takeSpansForNode(spans, node, offset) {\n if (node.isLeaf) {\n return null;\n }\n\n var end = offset + node.nodeSize,\n found = null;\n\n for (var i = 0, span = void 0; i < spans.length; i++) {\n if ((span = spans[i]) && span.from > offset && span.to < end) {\n (found || (found = [])).push(span);\n spans[i] = null;\n }\n }\n\n return found;\n}\n\nfunction withoutNulls(array) {\n var result = [];\n\n for (var i = 0; i < array.length; i++) {\n if (array[i] != null) {\n result.push(array[i]);\n }\n }\n\n return result;\n} // : ([Decoration], Node, number) → DecorationSet\n// Build up a tree that corresponds to a set of decorations. `offset`\n// is a base offset that should be subtractet from the `from` and `to`\n// positions in the spans (so that we don't have to allocate new spans\n// for recursive calls).\n\n\nfunction buildTree(spans, node, offset, options) {\n var children = [],\n hasNulls = false;\n node.forEach(function (childNode, localStart) {\n var found = takeSpansForNode(spans, childNode, localStart + offset);\n\n if (found) {\n hasNulls = true;\n var subtree = buildTree(found, childNode, offset + localStart + 1, options);\n\n if (subtree != empty) {\n children.push(localStart, localStart + childNode.nodeSize, subtree);\n }\n }\n });\n var locals = moveSpans(hasNulls ? withoutNulls(spans) : spans, -offset).sort(byPos);\n\n for (var i = 0; i < locals.length; i++) {\n if (!locals[i].type.valid(node, locals[i])) {\n if (options.onRemove) {\n options.onRemove(locals[i].spec);\n }\n\n locals.splice(i--, 1);\n }\n }\n\n return locals.length || children.length ? new DecorationSet(locals, children) : empty;\n} // : (Decoration, Decoration) → number\n// Used to sort decorations so that ones with a low start position\n// come first, and within a set with the same start position, those\n// with an smaller end position come first.\n\n\nfunction byPos(a, b) {\n return a.from - b.from || a.to - b.to;\n} // : ([Decoration]) → [Decoration]\n// Scan a sorted array of decorations for partially overlapping spans,\n// and split those so that only fully overlapping spans are left (to\n// make subsequent rendering easier). Will return the input array if\n// no partially overlapping spans are found (the common case).\n\n\nfunction removeOverlap(spans) {\n var working = spans;\n\n for (var i = 0; i < working.length - 1; i++) {\n var span = working[i];\n\n if (span.from != span.to) {\n for (var j = i + 1; j < working.length; j++) {\n var next = working[j];\n\n if (next.from == span.from) {\n if (next.to != span.to) {\n if (working == spans) {\n working = spans.slice();\n } // Followed by a partially overlapping larger span. Split that\n // span.\n\n\n working[j] = next.copy(next.from, span.to);\n insertAhead(working, j + 1, next.copy(span.to, next.to));\n }\n\n continue;\n } else {\n if (next.from < span.to) {\n if (working == spans) {\n working = spans.slice();\n } // The end of this one overlaps with a subsequent span. Split\n // this one.\n\n\n working[i] = span.copy(span.from, next.from);\n insertAhead(working, j, span.copy(next.from, span.to));\n }\n\n break;\n }\n }\n }\n }\n\n return working;\n}\n\nfunction insertAhead(array, i, deco) {\n while (i < array.length && byPos(deco, array[i]) > 0) {\n i++;\n }\n\n array.splice(i, 0, deco);\n} // : (EditorView) → union\n// Get the decorations associated with the current props of a view.\n\n\nfunction viewDecorations(view) {\n var found = [];\n view.someProp(\"decorations\", function (f) {\n var result = f(view.state);\n\n if (result && result != empty) {\n found.push(result);\n }\n });\n\n if (view.cursorWrapper) {\n found.push(DecorationSet.create(view.state.doc, [view.cursorWrapper.deco]));\n }\n\n return DecorationGroup.from(found);\n} // ::- An editor view manages the DOM structure that represents an\n// editable document. Its state and behavior are determined by its\n// [props](#view.DirectEditorProps).\n\n\nvar EditorView = function EditorView(place, props) {\n this._props = props; // :: EditorState\n // The view's current [state](#state.EditorState).\n\n this.state = props.state;\n this.dispatch = this.dispatch.bind(this);\n this._root = null;\n this.focused = false; // :: dom.Element\n // An editable DOM node containing the document. (You probably\n // should not directly interfere with its content.)\n\n this.dom = place && place.mount || document.createElement(\"div\");\n\n if (place) {\n if (place.appendChild) {\n place.appendChild(this.dom);\n } else if (place.apply) {\n place(this.dom);\n } else if (place.mount) {\n this.mounted = true;\n }\n } // :: bool\n // Indicates whether the editor is currently [editable](#view.EditorProps.editable).\n\n\n this.editable = getEditable(this);\n this.markCursor = null;\n this.cursorWrapper = null;\n updateCursorWrapper(this);\n this.nodeViews = buildNodeViews(this);\n this.docView = docViewDesc(this.state.doc, computeDocDeco(this), viewDecorations(this), this.dom, this);\n this.lastSelectedViewDesc = null; // :: ?{slice: Slice, move: bool}\n // When editor content is being dragged, this object contains\n // information about the dragged slice and whether it is being\n // copied or moved. At any other time, it is null.\n\n this.dragging = null;\n initInput(this);\n this.pluginViews = [];\n this.updatePluginViews();\n};\n\nvar prototypeAccessors$2 = {\n props: {\n configurable: true\n },\n root: {\n configurable: true\n }\n}; // composing:: boolean\n// Holds `true` when a\n// [composition](https://developer.mozilla.org/en-US/docs/Mozilla/IME_handling_guide)\n// is active.\n// :: DirectEditorProps\n// The view's current [props](#view.EditorProps).\n\nprototypeAccessors$2.props.get = function () {\n if (this._props.state != this.state) {\n var prev = this._props;\n this._props = {};\n\n for (var name in prev) {\n this._props[name] = prev[name];\n }\n\n this._props.state = this.state;\n }\n\n return this._props;\n}; // :: (DirectEditorProps)\n// Update the view's props. Will immediately cause an update to\n// the DOM.\n\n\nEditorView.prototype.update = function update(props) {\n if (props.handleDOMEvents != this._props.handleDOMEvents) {\n ensureListeners(this);\n }\n\n this._props = props;\n this.updateStateInner(props.state, true);\n}; // :: (DirectEditorProps)\n// Update the view by updating existing props object with the object\n// given as argument. Equivalent to `view.update(Object.assign({},\n// view.props, props))`.\n\n\nEditorView.prototype.setProps = function setProps(props) {\n var updated = {};\n\n for (var name in this._props) {\n updated[name] = this._props[name];\n }\n\n updated.state = this.state;\n\n for (var name$1 in props) {\n updated[name$1] = props[name$1];\n }\n\n this.update(updated);\n}; // :: (EditorState)\n// Update the editor's `state` prop, without touching any of the\n// other props.\n\n\nEditorView.prototype.updateState = function updateState(state) {\n this.updateStateInner(state, this.state.plugins != state.plugins);\n};\n\nEditorView.prototype.updateStateInner = function updateStateInner(state, reconfigured) {\n var this$1 = this;\n var prev = this.state,\n redraw = false;\n this.state = state;\n\n if (reconfigured) {\n var nodeViews = buildNodeViews(this);\n\n if (changedNodeViews(nodeViews, this.nodeViews)) {\n this.nodeViews = nodeViews;\n redraw = true;\n }\n\n ensureListeners(this);\n }\n\n this.editable = getEditable(this);\n updateCursorWrapper(this);\n var innerDeco = viewDecorations(this),\n outerDeco = computeDocDeco(this);\n var scroll = reconfigured ? \"reset\" : state.scrollToSelection > prev.scrollToSelection ? \"to selection\" : \"preserve\";\n var updateDoc = redraw || !this.docView.matchesNode(state.doc, outerDeco, innerDeco);\n var updateSel = updateDoc || !state.selection.eq(prev.selection);\n var oldScrollPos = scroll == \"preserve\" && updateSel && this.dom.style.overflowAnchor == null && storeScrollPos(this);\n\n if (updateSel) {\n this.domObserver.stop(); // Work around an issue in Chrome, IE, and Edge where changing\n // the DOM around an active selection puts it into a broken\n // state where the thing the user sees differs from the\n // selection reported by the Selection object (#710, #973,\n // #1011, #1013).\n\n var forceSelUpdate = updateDoc && (result.ie || result.chrome) && !prev.selection.empty && !state.selection.empty && selectionContextChanged(prev.selection, state.selection);\n\n if (updateDoc) {\n if (redraw || !this.docView.update(state.doc, outerDeco, innerDeco, this)) {\n this.docView.destroy();\n this.docView = docViewDesc(state.doc, outerDeco, innerDeco, this.dom, this);\n }\n } // Work around for an issue where an update arriving right between\n // a DOM selection change and the \"selectionchange\" event for it\n // can cause a spurious DOM selection update, disrupting mouse\n // drag selection.\n\n\n if (forceSelUpdate || !(this.mouseDown && this.domObserver.currentSelection.eq(this.root.getSelection()) && anchorInRightPlace(this))) {\n selectionToDOM(this, forceSelUpdate);\n } else {\n syncNodeSelection(this, state.selection);\n this.domObserver.setCurSelection();\n }\n\n this.domObserver.start();\n }\n\n this.updatePluginViews(prev);\n\n if (scroll == \"reset\") {\n this.dom.scrollTop = 0;\n } else if (scroll == \"to selection\") {\n var startDOM = this.root.getSelection().focusNode;\n if (this.someProp(\"handleScrollToSelection\", function (f) {\n return f(this$1);\n })) ; // Handled\n else if (state.selection instanceof prosemirror_state__WEBPACK_IMPORTED_MODULE_0__[\"NodeSelection\"]) {\n scrollRectIntoView(this, this.docView.domAfterPos(state.selection.from).getBoundingClientRect(), startDOM);\n } else {\n scrollRectIntoView(this, this.coordsAtPos(state.selection.head), startDOM);\n }\n } else if (oldScrollPos) {\n resetScrollPos(oldScrollPos);\n }\n};\n\nEditorView.prototype.destroyPluginViews = function destroyPluginViews() {\n var view;\n\n while (view = this.pluginViews.pop()) {\n if (view.destroy) {\n view.destroy();\n }\n }\n};\n\nEditorView.prototype.updatePluginViews = function updatePluginViews(prevState) {\n if (!prevState || prevState.plugins != this.state.plugins) {\n this.destroyPluginViews();\n\n for (var i = 0; i < this.state.plugins.length; i++) {\n var plugin = this.state.plugins[i];\n\n if (plugin.spec.view) {\n this.pluginViews.push(plugin.spec.view(this));\n }\n }\n } else {\n for (var i$1 = 0; i$1 < this.pluginViews.length; i$1++) {\n var pluginView = this.pluginViews[i$1];\n\n if (pluginView.update) {\n pluginView.update(this, prevState);\n }\n }\n }\n}; // :: (string, ?(prop: *) → *) → *\n// Goes over the values of a prop, first those provided directly,\n// then those from plugins (in order), and calls `f` every time a\n// non-undefined value is found. When `f` returns a truthy value,\n// that is immediately returned. When `f` isn't provided, it is\n// treated as the identity function (the prop value is returned\n// directly).\n\n\nEditorView.prototype.someProp = function someProp(propName, f) {\n var prop = this._props && this._props[propName],\n value;\n\n if (prop != null && (value = f ? f(prop) : prop)) {\n return value;\n }\n\n var plugins = this.state.plugins;\n\n if (plugins) {\n for (var i = 0; i < plugins.length; i++) {\n var prop$1 = plugins[i].props[propName];\n\n if (prop$1 != null && (value = f ? f(prop$1) : prop$1)) {\n return value;\n }\n }\n }\n}; // :: () → bool\n// Query whether the view has focus.\n\n\nEditorView.prototype.hasFocus = function hasFocus() {\n return this.root.activeElement == this.dom;\n}; // :: ()\n// Focus the editor.\n\n\nEditorView.prototype.focus = function focus() {\n this.domObserver.stop();\n\n if (this.editable) {\n focusPreventScroll(this.dom);\n }\n\n selectionToDOM(this);\n this.domObserver.start();\n}; // :: union\n// Get the document root in which the editor exists. This will\n// usually be the top-level `document`, but might be a [shadow\n// DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Shadow_DOM)\n// root if the editor is inside one.\n\n\nprototypeAccessors$2.root.get = function () {\n var cached = this._root;\n\n if (cached == null) {\n for (var search = this.dom.parentNode; search; search = search.parentNode) {\n if (search.nodeType == 9 || search.nodeType == 11 && search.host) {\n if (!search.getSelection) {\n Object.getPrototypeOf(search).getSelection = function () {\n return document.getSelection();\n };\n }\n\n return this._root = search;\n }\n }\n }\n\n return cached || document;\n}; // :: ({left: number, top: number}) → ?{pos: number, inside: number}\n// Given a pair of viewport coordinates, return the document\n// position that corresponds to them. May return null if the given\n// coordinates aren't inside of the editor. When an object is\n// returned, its `pos` property is the position nearest to the\n// coordinates, and its `inside` property holds the position of the\n// inner node that the position falls inside of, or -1 if it is at\n// the top level, not in any node.\n\n\nEditorView.prototype.posAtCoords = function posAtCoords$1(coords) {\n return posAtCoords(this, coords);\n}; // :: (number) → {left: number, right: number, top: number, bottom: number}\n// Returns the viewport rectangle at a given document position. `left`\n// and `right` will be the same number, as this returns a flat\n// cursor-ish rectangle.\n\n\nEditorView.prototype.coordsAtPos = function coordsAtPos$1(pos) {\n return coordsAtPos(this, pos);\n}; // :: (number) → {node: dom.Node, offset: number}\n// Find the DOM position that corresponds to the given document\n// position. Note that you should **not** mutate the editor's\n// internal DOM, only inspect it (and even that is usually not\n// necessary).\n\n\nEditorView.prototype.domAtPos = function domAtPos(pos) {\n return this.docView.domFromPos(pos);\n}; // :: (number) → ?dom.Node\n// Find the DOM node that represents the document node after the\n// given position. May return `null` when the position doesn't point\n// in front of a node or if the node is inside an opaque node view.\n//\n// This is intended to be able to call things like\n// `getBoundingClientRect` on that DOM node. Do **not** mutate the\n// editor DOM directly, or add styling this way, since that will be\n// immediately overriden by the editor as it redraws the node.\n\n\nEditorView.prototype.nodeDOM = function nodeDOM(pos) {\n var desc = this.docView.descAt(pos);\n return desc ? desc.nodeDOM : null;\n}; // :: (dom.Node, number, ?number) → number\n// Find the document position that corresponds to a given DOM\n// position. (Whenever possible, it is preferable to inspect the\n// document structure directly, rather than poking around in the\n// DOM, but sometimes—for example when interpreting an event\n// target—you don't have a choice.)\n//\n// The `bias` parameter can be used to influence which side of a DOM\n// node to use when the position is inside a leaf node.\n\n\nEditorView.prototype.posAtDOM = function posAtDOM(node, offset, bias) {\n if (bias === void 0) bias = -1;\n var pos = this.docView.posFromDOM(node, offset, bias);\n\n if (pos == null) {\n throw new RangeError(\"DOM position not inside the editor\");\n }\n\n return pos;\n}; // :: (union<\"up\", \"down\", \"left\", \"right\", \"forward\", \"backward\">, ?EditorState) → bool\n// Find out whether the selection is at the end of a textblock when\n// moving in a given direction. When, for example, given `\"left\"`,\n// it will return true if moving left from the current cursor\n// position would leave that position's parent textblock. Will apply\n// to the view's current state by default, but it is possible to\n// pass a different state.\n\n\nEditorView.prototype.endOfTextblock = function endOfTextblock$1(dir, state) {\n return endOfTextblock(this, state || this.state, dir);\n}; // :: ()\n// Removes the editor from the DOM and destroys all [node\n// views](#view.NodeView).\n\n\nEditorView.prototype.destroy = function destroy() {\n if (!this.docView) {\n return;\n }\n\n destroyInput(this);\n this.destroyPluginViews();\n\n if (this.mounted) {\n this.docView.update(this.state.doc, [], viewDecorations(this), this);\n this.dom.textContent = \"\";\n } else if (this.dom.parentNode) {\n this.dom.parentNode.removeChild(this.dom);\n }\n\n this.docView.destroy();\n this.docView = null;\n}; // Used for testing.\n\n\nEditorView.prototype.dispatchEvent = function dispatchEvent$1(event) {\n return dispatchEvent(this, event);\n}; // :: (Transaction)\n// Dispatch a transaction. Will call\n// [`dispatchTransaction`](#view.DirectEditorProps.dispatchTransaction)\n// when given, and otherwise defaults to applying the transaction to\n// the current state and calling\n// [`updateState`](#view.EditorView.updateState) with the result.\n// This method is bound to the view instance, so that it can be\n// easily passed around.\n\n\nEditorView.prototype.dispatch = function dispatch(tr) {\n var dispatchTransaction = this._props.dispatchTransaction;\n\n if (dispatchTransaction) {\n dispatchTransaction.call(this, tr);\n } else {\n this.updateState(this.state.apply(tr));\n }\n};\n\nObject.defineProperties(EditorView.prototype, prototypeAccessors$2);\n\nfunction computeDocDeco(view) {\n var attrs = Object.create(null);\n attrs[\"class\"] = \"ProseMirror\";\n attrs.contenteditable = String(view.editable);\n view.someProp(\"attributes\", function (value) {\n if (typeof value == \"function\") {\n value = value(view.state);\n }\n\n if (value) {\n for (var attr in value) {\n if (attr == \"class\") {\n attrs[\"class\"] += \" \" + value[attr];\n } else if (!attrs[attr] && attr != \"contenteditable\" && attr != \"nodeName\") {\n attrs[attr] = String(value[attr]);\n }\n }\n }\n });\n return [Decoration.node(0, view.state.doc.content.size, attrs)];\n}\n\nfunction updateCursorWrapper(view) {\n var ref = view.state.selection;\n var $head = ref.$head;\n var $anchor = ref.$anchor;\n var visible = ref.visible;\n\n if (view.markCursor) {\n var dom = document.createElement(\"img\");\n dom.setAttribute(\"mark-placeholder\", \"true\");\n view.cursorWrapper = {\n dom: dom,\n deco: Decoration.widget($head.pos, dom, {\n raw: true,\n marks: view.markCursor\n })\n };\n } else if (visible || $head.pos != $anchor.pos) {\n view.cursorWrapper = null;\n } else {\n var dom$1;\n\n if (!view.cursorWrapper || view.cursorWrapper.dom.childNodes.length) {\n dom$1 = document.createElement(\"div\");\n dom$1.style.position = \"absolute\";\n dom$1.style.left = \"-100000px\";\n } else if (view.cursorWrapper.deco.pos != $head.pos) {\n dom$1 = view.cursorWrapper.dom;\n }\n\n if (dom$1) {\n view.cursorWrapper = {\n dom: dom$1,\n deco: Decoration.widget($head.pos, dom$1, {\n raw: true\n })\n };\n }\n }\n}\n\nfunction getEditable(view) {\n return !view.someProp(\"editable\", function (value) {\n return value(view.state) === false;\n });\n}\n\nfunction selectionContextChanged(sel1, sel2) {\n var depth = Math.min(sel1.$anchor.sharedDepth(sel1.head), sel2.$anchor.sharedDepth(sel2.head));\n return sel1.$anchor.node(depth) != sel2.$anchor.node(depth);\n}\n\nfunction buildNodeViews(view) {\n var result = {};\n view.someProp(\"nodeViews\", function (obj) {\n for (var prop in obj) {\n if (!Object.prototype.hasOwnProperty.call(result, prop)) {\n result[prop] = obj[prop];\n }\n }\n });\n return result;\n}\n\nfunction changedNodeViews(a, b) {\n var nA = 0,\n nB = 0;\n\n for (var prop in a) {\n if (a[prop] != b[prop]) {\n return true;\n }\n\n nA++;\n }\n\n for (var _ in b) {\n nB++;\n }\n\n return nA != nB;\n} // EditorProps:: interface\n//\n// Props are configuration values that can be passed to an editor view\n// or included in a plugin. This interface lists the supported props.\n//\n// The various event-handling functions may all return `true` to\n// indicate that they handled the given event. The view will then take\n// care to call `preventDefault` on the event, except with\n// `handleDOMEvents`, where the handler itself is responsible for that.\n//\n// How a prop is resolved depends on the prop. Handler functions are\n// called one at a time, starting with the base props and then\n// searching through the plugins (in order of appearance) until one of\n// them returns true. For some props, the first plugin that yields a\n// value gets precedence.\n//\n// handleDOMEvents:: ?Object<(view: EditorView, event: dom.Event) → bool>\n// Can be an object mapping DOM event type names to functions that\n// handle them. Such functions will be called before any handling\n// ProseMirror does of events fired on the editable DOM element.\n// Contrary to the other event handling props, when returning true\n// from such a function, you are responsible for calling\n// `preventDefault` yourself (or not, if you want to allow the\n// default behavior).\n//\n// handleKeyDown:: ?(view: EditorView, event: dom.KeyboardEvent) → bool\n// Called when the editor receives a `keydown` event.\n//\n// handleKeyPress:: ?(view: EditorView, event: dom.KeyboardEvent) → bool\n// Handler for `keypress` events.\n//\n// handleTextInput:: ?(view: EditorView, from: number, to: number, text: string) → bool\n// Whenever the user directly input text, this handler is called\n// before the input is applied. If it returns `true`, the default\n// behavior of actually inserting the text is suppressed.\n//\n// handleClickOn:: ?(view: EditorView, pos: number, node: Node, nodePos: number, event: dom.MouseEvent, direct: bool) → bool\n// Called for each node around a click, from the inside out. The\n// `direct` flag will be true for the inner node.\n//\n// handleClick:: ?(view: EditorView, pos: number, event: dom.MouseEvent) → bool\n// Called when the editor is clicked, after `handleClickOn` handlers\n// have been called.\n//\n// handleDoubleClickOn:: ?(view: EditorView, pos: number, node: Node, nodePos: number, event: dom.MouseEvent, direct: bool) → bool\n// Called for each node around a double click.\n//\n// handleDoubleClick:: ?(view: EditorView, pos: number, event: dom.MouseEvent) → bool\n// Called when the editor is double-clicked, after `handleDoubleClickOn`.\n//\n// handleTripleClickOn:: ?(view: EditorView, pos: number, node: Node, nodePos: number, event: dom.MouseEvent, direct: bool) → bool\n// Called for each node around a triple click.\n//\n// handleTripleClick:: ?(view: EditorView, pos: number, event: dom.MouseEvent) → bool\n// Called when the editor is triple-clicked, after `handleTripleClickOn`.\n//\n// handlePaste:: ?(view: EditorView, event: dom.Event, slice: Slice) → bool\n// Can be used to override the behavior of pasting. `slice` is the\n// pasted content parsed by the editor, but you can directly access\n// the event to get at the raw content.\n//\n// handleDrop:: ?(view: EditorView, event: dom.Event, slice: Slice, moved: bool) → bool\n// Called when something is dropped on the editor. `moved` will be\n// true if this drop moves from the current selection (which should\n// thus be deleted).\n//\n// handleScrollToSelection:: ?(view: EditorView) → bool\n// Called when the view, after updating its state, tries to scroll\n// the selection into view. A handler function may return false to\n// indicate that it did not handle the scrolling and further\n// handlers or the default behavior should be tried.\n//\n// createSelectionBetween:: ?(view: EditorView, anchor: ResolvedPos, head: ResolvedPos) → ?Selection\n// Can be used to override the way a selection is created when\n// reading a DOM selection between the given anchor and head.\n//\n// domParser:: ?DOMParser\n// The [parser](#model.DOMParser) to use when reading editor changes\n// from the DOM. Defaults to calling\n// [`DOMParser.fromSchema`](#model.DOMParser^fromSchema) on the\n// editor's schema.\n//\n// transformPastedHTML:: ?(html: string) → string\n// Can be used to transform pasted HTML text, _before_ it is parsed,\n// for example to clean it up.\n//\n// clipboardParser:: ?DOMParser\n// The [parser](#model.DOMParser) to use when reading content from\n// the clipboard. When not given, the value of the\n// [`domParser`](#view.EditorProps.domParser) prop is used.\n//\n// transformPastedText:: ?(text: string) → string\n// Transform pasted plain text.\n//\n// clipboardTextParser:: ?(text: string, $context: ResolvedPos) → Slice\n// A function to parse text from the clipboard into a document\n// slice. Called after\n// [`transformPastedText`](#view.EditorProps.transformPastedText).\n// The default behavior is to split the text into lines, wrap them\n// in `

      ` tags, and call\n// [`clipboardParser`](#view.EditorProps.clipboardParser) on it.\n//\n// transformPasted:: ?(Slice) → Slice\n// Can be used to transform pasted content before it is applied to\n// the document.\n//\n// nodeViews:: ?Object<(node: Node, view: EditorView, getPos: () → number, decorations: [Decoration]) → NodeView>\n// Allows you to pass custom rendering and behavior logic for nodes\n// and marks. Should map node and mark names to constructor\n// functions that produce a [`NodeView`](#view.NodeView) object\n// implementing the node's display behavior. For nodes, the third\n// argument `getPos` is a function that can be called to get the\n// node's current position, which can be useful when creating\n// transactions to update it. For marks, the third argument is a\n// boolean that indicates whether the mark's content is inline.\n//\n// `decorations` is an array of node or inline decorations that are\n// active around the node. They are automatically drawn in the\n// normal way, and you will usually just want to ignore this, but\n// they can also be used as a way to provide context information to\n// the node view without adding it to the document itself.\n//\n// clipboardSerializer:: ?DOMSerializer\n// The DOM serializer to use when putting content onto the\n// clipboard. If not given, the result of\n// [`DOMSerializer.fromSchema`](#model.DOMSerializer^fromSchema)\n// will be used.\n//\n// clipboardTextSerializer:: ?(Slice) → string\n// A function that will be called to get the text for the current\n// selection when copying text to the clipboard. By default, the\n// editor will use [`textBetween`](#model.Node.textBetween) on the\n// selected range.\n//\n// decorations:: ?(state: EditorState) → ?DecorationSet\n// A set of [document decorations](#view.Decoration) to show in the\n// view.\n//\n// editable:: ?(state: EditorState) → bool\n// When this returns false, the content of the view is not directly\n// editable.\n//\n// attributes:: ?union, (EditorState) → ?Object>\n// Control the DOM attributes of the editable element. May be either\n// an object or a function going from an editor state to an object.\n// By default, the element will get a class `\"ProseMirror\"`, and\n// will have its `contentEditable` attribute determined by the\n// [`editable` prop](#view.EditorProps.editable). Additional classes\n// provided here will be added to the class. For other attributes,\n// the value provided first (as in\n// [`someProp`](#view.EditorView.someProp)) will be used.\n//\n// scrollThreshold:: ?union\n// Determines the distance (in pixels) between the cursor and the\n// end of the visible viewport at which point, when scrolling the\n// cursor into view, scrolling takes place. Defaults to 0.\n//\n// scrollMargin:: ?union\n// Determines the extra space (in pixels) that is left above or\n// below the cursor when it is scrolled into view. Defaults to 5.\n// DirectEditorProps:: interface extends EditorProps\n//\n// The props object given directly to the editor view supports two\n// fields that can't be used in plugins:\n//\n// state:: EditorState\n// The current state of the editor.\n//\n// dispatchTransaction:: ?(tr: Transaction)\n// The callback over which to send transactions (state updates)\n// produced by the view. If you specify this, you probably want to\n// make sure this ends up calling the view's\n// [`updateState`](#view.EditorView.updateState) method with a new\n// state that has the transaction\n// [applied](#state.EditorState.apply). The callback will be bound to have\n// the view instance as its `this` binding.\n\n\n\n\n//# sourceURL=webpack:///./node_modules/prosemirror-view/dist/index.es.js?"); - -/***/ }), - -/***/ "./node_modules/rope-sequence/dist/index.es.js": -/*!*****************************************************!*\ - !*** ./node_modules/rope-sequence/dist/index.es.js ***! - \*****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\nvar GOOD_LEAF_SIZE = 200; // :: class A rope sequence is a persistent sequence data structure\n// that supports appending, prepending, and slicing without doing a\n// full copy. It is represented as a mostly-balanced tree.\n\nvar RopeSequence = function RopeSequence() {};\n\nRopeSequence.prototype.append = function append(other) {\n if (!other.length) {\n return this;\n }\n\n other = RopeSequence.from(other);\n return !this.length && other || other.length < GOOD_LEAF_SIZE && this.leafAppend(other) || this.length < GOOD_LEAF_SIZE && other.leafPrepend(this) || this.appendInner(other);\n}; // :: (union<[T], RopeSequence>) → RopeSequence\n// Prepend an array or other rope to this one, returning a new rope.\n\n\nRopeSequence.prototype.prepend = function prepend(other) {\n if (!other.length) {\n return this;\n }\n\n return RopeSequence.from(other).append(this);\n};\n\nRopeSequence.prototype.appendInner = function appendInner(other) {\n return new Append(this, other);\n}; // :: (?number, ?number) → RopeSequence\n// Create a rope repesenting a sub-sequence of this rope.\n\n\nRopeSequence.prototype.slice = function slice(from, to) {\n if (from === void 0) from = 0;\n if (to === void 0) to = this.length;\n\n if (from >= to) {\n return RopeSequence.empty;\n }\n\n return this.sliceInner(Math.max(0, from), Math.min(this.length, to));\n}; // :: (number) → T\n// Retrieve the element at the given position from this rope.\n\n\nRopeSequence.prototype.get = function get(i) {\n if (i < 0 || i >= this.length) {\n return undefined;\n }\n\n return this.getInner(i);\n}; // :: ((element: T, index: number) → ?bool, ?number, ?number)\n// Call the given function for each element between the given\n// indices. This tends to be more efficient than looping over the\n// indices and calling `get`, because it doesn't have to descend the\n// tree for every element.\n\n\nRopeSequence.prototype.forEach = function forEach(f, from, to) {\n if (from === void 0) from = 0;\n if (to === void 0) to = this.length;\n\n if (from <= to) {\n this.forEachInner(f, from, to, 0);\n } else {\n this.forEachInvertedInner(f, from, to, 0);\n }\n}; // :: ((element: T, index: number) → U, ?number, ?number) → [U]\n// Map the given functions over the elements of the rope, producing\n// a flat array.\n\n\nRopeSequence.prototype.map = function map(f, from, to) {\n if (from === void 0) from = 0;\n if (to === void 0) to = this.length;\n var result = [];\n this.forEach(function (elt, i) {\n return result.push(f(elt, i));\n }, from, to);\n return result;\n}; // :: (?union<[T], RopeSequence>) → RopeSequence\n// Create a rope representing the given array, or return the rope\n// itself if a rope was given.\n\n\nRopeSequence.from = function from(values) {\n if (values instanceof RopeSequence) {\n return values;\n }\n\n return values && values.length ? new Leaf(values) : RopeSequence.empty;\n};\n\nvar Leaf = /*@__PURE__*/function (RopeSequence) {\n function Leaf(values) {\n RopeSequence.call(this);\n this.values = values;\n }\n\n if (RopeSequence) Leaf.__proto__ = RopeSequence;\n Leaf.prototype = Object.create(RopeSequence && RopeSequence.prototype);\n Leaf.prototype.constructor = Leaf;\n var prototypeAccessors = {\n length: {\n configurable: true\n },\n depth: {\n configurable: true\n }\n };\n\n Leaf.prototype.flatten = function flatten() {\n return this.values;\n };\n\n Leaf.prototype.sliceInner = function sliceInner(from, to) {\n if (from == 0 && to == this.length) {\n return this;\n }\n\n return new Leaf(this.values.slice(from, to));\n };\n\n Leaf.prototype.getInner = function getInner(i) {\n return this.values[i];\n };\n\n Leaf.prototype.forEachInner = function forEachInner(f, from, to, start) {\n for (var i = from; i < to; i++) {\n if (f(this.values[i], start + i) === false) {\n return false;\n }\n }\n };\n\n Leaf.prototype.forEachInvertedInner = function forEachInvertedInner(f, from, to, start) {\n for (var i = from - 1; i >= to; i--) {\n if (f(this.values[i], start + i) === false) {\n return false;\n }\n }\n };\n\n Leaf.prototype.leafAppend = function leafAppend(other) {\n if (this.length + other.length <= GOOD_LEAF_SIZE) {\n return new Leaf(this.values.concat(other.flatten()));\n }\n };\n\n Leaf.prototype.leafPrepend = function leafPrepend(other) {\n if (this.length + other.length <= GOOD_LEAF_SIZE) {\n return new Leaf(other.flatten().concat(this.values));\n }\n };\n\n prototypeAccessors.length.get = function () {\n return this.values.length;\n };\n\n prototypeAccessors.depth.get = function () {\n return 0;\n };\n\n Object.defineProperties(Leaf.prototype, prototypeAccessors);\n return Leaf;\n}(RopeSequence); // :: RopeSequence\n// The empty rope sequence.\n\n\nRopeSequence.empty = new Leaf([]);\n\nvar Append = /*@__PURE__*/function (RopeSequence) {\n function Append(left, right) {\n RopeSequence.call(this);\n this.left = left;\n this.right = right;\n this.length = left.length + right.length;\n this.depth = Math.max(left.depth, right.depth) + 1;\n }\n\n if (RopeSequence) Append.__proto__ = RopeSequence;\n Append.prototype = Object.create(RopeSequence && RopeSequence.prototype);\n Append.prototype.constructor = Append;\n\n Append.prototype.flatten = function flatten() {\n return this.left.flatten().concat(this.right.flatten());\n };\n\n Append.prototype.getInner = function getInner(i) {\n return i < this.left.length ? this.left.get(i) : this.right.get(i - this.left.length);\n };\n\n Append.prototype.forEachInner = function forEachInner(f, from, to, start) {\n var leftLen = this.left.length;\n\n if (from < leftLen && this.left.forEachInner(f, from, Math.min(to, leftLen), start) === false) {\n return false;\n }\n\n if (to > leftLen && this.right.forEachInner(f, Math.max(from - leftLen, 0), Math.min(this.length, to) - leftLen, start + leftLen) === false) {\n return false;\n }\n };\n\n Append.prototype.forEachInvertedInner = function forEachInvertedInner(f, from, to, start) {\n var leftLen = this.left.length;\n\n if (from > leftLen && this.right.forEachInvertedInner(f, from - leftLen, Math.max(to, leftLen) - leftLen, start + leftLen) === false) {\n return false;\n }\n\n if (to < leftLen && this.left.forEachInvertedInner(f, Math.min(from, leftLen), to, start) === false) {\n return false;\n }\n };\n\n Append.prototype.sliceInner = function sliceInner(from, to) {\n if (from == 0 && to == this.length) {\n return this;\n }\n\n var leftLen = this.left.length;\n\n if (to <= leftLen) {\n return this.left.slice(from, to);\n }\n\n if (from >= leftLen) {\n return this.right.slice(from - leftLen, to - leftLen);\n }\n\n return this.left.slice(from, leftLen).append(this.right.slice(0, to - leftLen));\n };\n\n Append.prototype.leafAppend = function leafAppend(other) {\n var inner = this.right.leafAppend(other);\n\n if (inner) {\n return new Append(this.left, inner);\n }\n };\n\n Append.prototype.leafPrepend = function leafPrepend(other) {\n var inner = this.left.leafPrepend(other);\n\n if (inner) {\n return new Append(inner, this.right);\n }\n };\n\n Append.prototype.appendInner = function appendInner(other) {\n if (this.left.depth >= Math.max(this.right.depth, other.depth) + 1) {\n return new Append(this.left, new Append(this.right, other));\n }\n\n return new Append(this, other);\n };\n\n return Append;\n}(RopeSequence);\n\nvar ropeSequence = RopeSequence;\n/* harmony default export */ __webpack_exports__[\"default\"] = (ropeSequence);\n\n//# sourceURL=webpack:///./node_modules/rope-sequence/dist/index.es.js?"); - -/***/ }), - -/***/ "./node_modules/uc.micro/categories/Cc/regex.js": -/*!******************************************************!*\ - !*** ./node_modules/uc.micro/categories/Cc/regex.js ***! - \******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -eval("module.exports = /[\\0-\\x1F\\x7F-\\x9F]/;\n\n//# sourceURL=webpack:///./node_modules/uc.micro/categories/Cc/regex.js?"); - -/***/ }), - -/***/ "./node_modules/uc.micro/categories/Cf/regex.js": -/*!******************************************************!*\ - !*** ./node_modules/uc.micro/categories/Cf/regex.js ***! - \******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -eval("module.exports = /[\\xAD\\u0600-\\u0605\\u061C\\u06DD\\u070F\\u08E2\\u180E\\u200B-\\u200F\\u202A-\\u202E\\u2060-\\u2064\\u2066-\\u206F\\uFEFF\\uFFF9-\\uFFFB]|\\uD804[\\uDCBD\\uDCCD]|\\uD82F[\\uDCA0-\\uDCA3]|\\uD834[\\uDD73-\\uDD7A]|\\uDB40[\\uDC01\\uDC20-\\uDC7F]/;\n\n//# sourceURL=webpack:///./node_modules/uc.micro/categories/Cf/regex.js?"); - -/***/ }), - -/***/ "./node_modules/uc.micro/categories/P/regex.js": -/*!*****************************************************!*\ - !*** ./node_modules/uc.micro/categories/P/regex.js ***! - \*****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -eval("module.exports = /[!-#%-\\*,-\\/:;\\?@\\[-\\]_\\{\\}\\xA1\\xA7\\xAB\\xB6\\xB7\\xBB\\xBF\\u037E\\u0387\\u055A-\\u055F\\u0589\\u058A\\u05BE\\u05C0\\u05C3\\u05C6\\u05F3\\u05F4\\u0609\\u060A\\u060C\\u060D\\u061B\\u061E\\u061F\\u066A-\\u066D\\u06D4\\u0700-\\u070D\\u07F7-\\u07F9\\u0830-\\u083E\\u085E\\u0964\\u0965\\u0970\\u09FD\\u0A76\\u0AF0\\u0C84\\u0DF4\\u0E4F\\u0E5A\\u0E5B\\u0F04-\\u0F12\\u0F14\\u0F3A-\\u0F3D\\u0F85\\u0FD0-\\u0FD4\\u0FD9\\u0FDA\\u104A-\\u104F\\u10FB\\u1360-\\u1368\\u1400\\u166D\\u166E\\u169B\\u169C\\u16EB-\\u16ED\\u1735\\u1736\\u17D4-\\u17D6\\u17D8-\\u17DA\\u1800-\\u180A\\u1944\\u1945\\u1A1E\\u1A1F\\u1AA0-\\u1AA6\\u1AA8-\\u1AAD\\u1B5A-\\u1B60\\u1BFC-\\u1BFF\\u1C3B-\\u1C3F\\u1C7E\\u1C7F\\u1CC0-\\u1CC7\\u1CD3\\u2010-\\u2027\\u2030-\\u2043\\u2045-\\u2051\\u2053-\\u205E\\u207D\\u207E\\u208D\\u208E\\u2308-\\u230B\\u2329\\u232A\\u2768-\\u2775\\u27C5\\u27C6\\u27E6-\\u27EF\\u2983-\\u2998\\u29D8-\\u29DB\\u29FC\\u29FD\\u2CF9-\\u2CFC\\u2CFE\\u2CFF\\u2D70\\u2E00-\\u2E2E\\u2E30-\\u2E4E\\u3001-\\u3003\\u3008-\\u3011\\u3014-\\u301F\\u3030\\u303D\\u30A0\\u30FB\\uA4FE\\uA4FF\\uA60D-\\uA60F\\uA673\\uA67E\\uA6F2-\\uA6F7\\uA874-\\uA877\\uA8CE\\uA8CF\\uA8F8-\\uA8FA\\uA8FC\\uA92E\\uA92F\\uA95F\\uA9C1-\\uA9CD\\uA9DE\\uA9DF\\uAA5C-\\uAA5F\\uAADE\\uAADF\\uAAF0\\uAAF1\\uABEB\\uFD3E\\uFD3F\\uFE10-\\uFE19\\uFE30-\\uFE52\\uFE54-\\uFE61\\uFE63\\uFE68\\uFE6A\\uFE6B\\uFF01-\\uFF03\\uFF05-\\uFF0A\\uFF0C-\\uFF0F\\uFF1A\\uFF1B\\uFF1F\\uFF20\\uFF3B-\\uFF3D\\uFF3F\\uFF5B\\uFF5D\\uFF5F-\\uFF65]|\\uD800[\\uDD00-\\uDD02\\uDF9F\\uDFD0]|\\uD801\\uDD6F|\\uD802[\\uDC57\\uDD1F\\uDD3F\\uDE50-\\uDE58\\uDE7F\\uDEF0-\\uDEF6\\uDF39-\\uDF3F\\uDF99-\\uDF9C]|\\uD803[\\uDF55-\\uDF59]|\\uD804[\\uDC47-\\uDC4D\\uDCBB\\uDCBC\\uDCBE-\\uDCC1\\uDD40-\\uDD43\\uDD74\\uDD75\\uDDC5-\\uDDC8\\uDDCD\\uDDDB\\uDDDD-\\uDDDF\\uDE38-\\uDE3D\\uDEA9]|\\uD805[\\uDC4B-\\uDC4F\\uDC5B\\uDC5D\\uDCC6\\uDDC1-\\uDDD7\\uDE41-\\uDE43\\uDE60-\\uDE6C\\uDF3C-\\uDF3E]|\\uD806[\\uDC3B\\uDE3F-\\uDE46\\uDE9A-\\uDE9C\\uDE9E-\\uDEA2]|\\uD807[\\uDC41-\\uDC45\\uDC70\\uDC71\\uDEF7\\uDEF8]|\\uD809[\\uDC70-\\uDC74]|\\uD81A[\\uDE6E\\uDE6F\\uDEF5\\uDF37-\\uDF3B\\uDF44]|\\uD81B[\\uDE97-\\uDE9A]|\\uD82F\\uDC9F|\\uD836[\\uDE87-\\uDE8B]|\\uD83A[\\uDD5E\\uDD5F]/;\n\n//# sourceURL=webpack:///./node_modules/uc.micro/categories/P/regex.js?"); - -/***/ }), - -/***/ "./node_modules/uc.micro/categories/Z/regex.js": -/*!*****************************************************!*\ - !*** ./node_modules/uc.micro/categories/Z/regex.js ***! - \*****************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -eval("module.exports = /[ \\xA0\\u1680\\u2000-\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000]/;\n\n//# sourceURL=webpack:///./node_modules/uc.micro/categories/Z/regex.js?"); - -/***/ }), - -/***/ "./node_modules/uc.micro/index.js": -/*!****************************************!*\ - !*** ./node_modules/uc.micro/index.js ***! - \****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nexports.Any = __webpack_require__(/*! ./properties/Any/regex */ \"./node_modules/uc.micro/properties/Any/regex.js\");\nexports.Cc = __webpack_require__(/*! ./categories/Cc/regex */ \"./node_modules/uc.micro/categories/Cc/regex.js\");\nexports.Cf = __webpack_require__(/*! ./categories/Cf/regex */ \"./node_modules/uc.micro/categories/Cf/regex.js\");\nexports.P = __webpack_require__(/*! ./categories/P/regex */ \"./node_modules/uc.micro/categories/P/regex.js\");\nexports.Z = __webpack_require__(/*! ./categories/Z/regex */ \"./node_modules/uc.micro/categories/Z/regex.js\");\n\n//# sourceURL=webpack:///./node_modules/uc.micro/index.js?"); - -/***/ }), - -/***/ "./node_modules/uc.micro/properties/Any/regex.js": -/*!*******************************************************!*\ - !*** ./node_modules/uc.micro/properties/Any/regex.js ***! - \*******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -eval("module.exports = /[\\0-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/;\n\n//# sourceURL=webpack:///./node_modules/uc.micro/properties/Any/regex.js?"); - -/***/ }), - -/***/ "./node_modules/w3c-keyname/index.es.js": -/*!**********************************************!*\ - !*** ./node_modules/w3c-keyname/index.es.js ***! - \**********************************************/ -/*! exports provided: default, base, keyName, shift */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"base\", function() { return base_1; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"keyName\", function() { return keyName; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"shif