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MACA,OACA,OACA,UACA,UACA,QACA,QACA,MACA,OACA,MACA,OACA,YACA,aACA,MACA,MACA,SACA,OACA,cACA,SACA,MACA,KACA,MACA,QACA,KACA,MACA,OACA,cACA,cACA,eACA,OACA,UACA,UACA,YACA,MACA,MACA,MACA,MACA,aACA,KACA,UACA,UACA,OACA,SACA,SACA,mBACA,0BACA,UACA,MACA,kBACA,qBACA,MACA,MACA,OACA,WACA,OACA,SACA,OACA,KACA,MACA,eACA,QACA,MACA,OACA,MACA,MACA,OACA,OACA,OACA,MACA,MACA,UACA,SACA,QACA,SACA,OACA,SACA,UACA,MACA,UACA,QACA,SACA,MACA,QACA,MACA,OACA,YACA,WACA,QACA,OACA,QACA,MACA,WACA,MACA,QACA,OACA,aACA,OACA,MACA,QACA,MACA,SACA,UACA,MACA,QACA,MACA,YACA,SACA,MACA,SACA,SACA,WACA,cACA,SACA,OACA,UACA,QACA,MACA,SAOEC,GAAc,2IACdC,GAAc,2CAGlB,SAASC,GAAS9N,EAAOqH,GACvB,IAAI0G,EAAMC,EAAWC,EAAYjuB,EAAKkuB,EAAStuB,EAAMogB,EAAMpgB,IAE3D,OAAkC,KAA9BogB,EAAMrD,IAAI1S,WAAWrK,KAEzBmuB,EAAO/N,EAAMrD,IAAI1kB,MAAM2H,KAEnBmuB,EAAK12B,QAAQ,KAAO,KAExB22B,EAAYD,EAAKpkB,MAAMkkB,IAEnBG,IACEL,GAAYt2B,QAAQ22B,EAAU,GAAGtrB,eAAiB,KAEtD1C,EAAMguB,EAAU,GAAG/1B,MAAM,GAAI,GAC7Bi2B,EAAU1M,EAAcxhB,KACnBggB,EAAM1c,OAAOse,aAAa5hB,KAE1BqnB,IACHrH,EAAMrqB,KAAK,CACT3B,KAAM,YACNwoB,KAAM0R,EACNhO,MAAOF,EAAME,QAEfF,EAAMrqB,KAAK,CACT3B,KAAM,OACNkS,QAASlG,EACTkgB,MAAOF,EAAME,MAAQ,IAEvBF,EAAMrqB,KAAK,CAAE3B,KAAM,a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4Q,EAAKmV,GAAM5mB,KAAKqjB,QAASuD,EAClE,EAUAqV,GAAWt1B,UAAU21B,YAAc,SAAU7qB,EAAKmV,GAChD,IAAIqF,EAAQ,IAAI8P,GAAU/7B,KAAMyR,EAAKmV,GAGrC,OAFAqF,EAAMC,YAAa,EACnBlsB,KAAK27B,KAAKne,QAAQyO,GACXA,EAAM5R,MACf,EAWA4hB,GAAWt1B,UAAUgoB,aAAe,SAAUld,EAAKmV,GAEjD,OADAA,EAAMA,GAAO,CAAC,EACP5mB,KAAKg8B,SAASlN,OAAO9uB,KAAKs8B,YAAY7qB,EAAKmV,GAAM5mB,KAAKqjB,QAASuD,EACxE,C","sources":["webpack://i4proportal/./node_modules/postcss/lib/at-rule.js","webpack://i4proportal/./node_modules/postcss/lib/comment.js","webpack://i4proportal/./node_modules/postcss/lib/container.js","webpack://i4proportal/./node_modules/postcss/lib/css-syntax-error.js","webpack://i4proportal/./node_modules/postcss/lib/declaration.js","webpack://i4proportal/./node_modules/postcss/lib/document.js","webpack://i4proportal/./node_modules/postcss/lib/fromJSON.js","webpack://i4proportal/./node_modules/postcss/lib/input.js","webpack://i4proportal/./node_modules/postcss/lib/lazy-result.js","webpack://i4proportal/./node_modules/postcss/lib/list.js","webpack://i4proportal/./node_modules/postcss/lib/map-generator.js","webpack://i4proportal/./node_modules/postcss/lib/no-work-result.js","webpack://i4proportal/./node_modules/postcss/lib/node.js","webpack://i4proportal/./node_modules/postcss/lib/parse.js","webpack://i4proportal/./node_modules/postcss/lib/parser.js","webpack://i4proportal/./node_modules/postcss/lib/postcss.js","webpack://i4proportal/./node_modules/postcss/lib/previous-map.js","webpack://i4proportal/./node_modules/postcss/lib/processor.js","webpack://i4proportal/./node_modules/postcss/lib/result.js","webpack://i4proportal/./node_modules/postcss/lib/root.js","webpack://i4proportal/./node_modules/postcss/lib/rule.js","webpack://i4proportal/./node_modules/postcss/lib/stringifier.js","webpack://i4proportal/./node_modules/postcss/lib/stringify.js","webpack://i4proportal/./node_modules/postcss/lib/symbols.js","webpack://i4proportal/./node_modules/postcss/lib/tokenize.js","webpack://i4proportal/./node_modules/postcss/lib/warn-once.js","webpack://i4proportal/./node_modules/postcss/lib/warning.js","webpack://i4proportal/./node_modules/remarkable/dist/esm/index.browser.js"],"sourcesContent":["'use strict'\n\nlet Container = require('./container')\n\nclass AtRule extends Container {\n constructor(defaults) {\n super(defaults)\n this.type = 'atrule'\n }\n\n append(...children) {\n if (!this.proxyOf.nodes) this.nodes = []\n return super.append(...children)\n }\n\n prepend(...children) {\n if (!this.proxyOf.nodes) this.nodes = []\n return super.prepend(...children)\n }\n}\n\nmodule.exports = AtRule\nAtRule.default = AtRule\n\nContainer.registerAtRule(AtRule)\n","'use strict'\n\nlet Node = require('./node')\n\nclass Comment extends Node {\n constructor(defaults) {\n super(defaults)\n this.type = 'comment'\n }\n}\n\nmodule.exports = Comment\nComment.default = Comment\n","'use strict'\n\nlet Comment = require('./comment')\nlet Declaration = require('./declaration')\nlet Node = require('./node')\nlet { isClean, my } = require('./symbols')\n\nlet AtRule, parse, Root, Rule\n\nfunction cleanSource(nodes) {\n return nodes.map(i => {\n if (i.nodes) i.nodes = cleanSource(i.nodes)\n delete i.source\n return i\n })\n}\n\nfunction markTreeDirty(node) {\n node[isClean] = false\n if (node.proxyOf.nodes) {\n for (let i of node.proxyOf.nodes) {\n markTreeDirty(i)\n }\n }\n}\n\nclass Container extends Node {\n append(...children) {\n for (let child of children) {\n let nodes = this.normalize(child, this.last)\n for (let node of nodes) this.proxyOf.nodes.push(node)\n }\n\n this.markDirty()\n\n return this\n }\n\n cleanRaws(keepBetween) {\n super.cleanRaws(keepBetween)\n if (this.nodes) {\n for (let node of this.nodes) node.cleanRaws(keepBetween)\n }\n }\n\n each(callback) {\n if (!this.proxyOf.nodes) return undefined\n let iterator = this.getIterator()\n\n let index, result\n while (this.indexes[iterator] < this.proxyOf.nodes.length) {\n index = this.indexes[iterator]\n result = callback(this.proxyOf.nodes[index], index)\n if (result === false) break\n\n this.indexes[iterator] += 1\n }\n\n delete this.indexes[iterator]\n return result\n }\n\n every(condition) {\n return this.nodes.every(condition)\n }\n\n getIterator() {\n if (!this.lastEach) this.lastEach = 0\n if (!this.indexes) this.indexes = {}\n\n this.lastEach += 1\n let iterator = this.lastEach\n this.indexes[iterator] = 0\n\n return iterator\n }\n\n getProxyProcessor() {\n return {\n get(node, prop) {\n if (prop === 'proxyOf') {\n return node\n } else if (!node[prop]) {\n return node[prop]\n } else if (\n prop === 'each' ||\n (typeof prop === 'string' && prop.startsWith('walk'))\n ) {\n return (...args) => {\n return node[prop](\n ...args.map(i => {\n if (typeof i === 'function') {\n return (child, index) => i(child.toProxy(), index)\n } else {\n return i\n }\n })\n )\n }\n } else if (prop === 'every' || prop === 'some') {\n return cb => {\n return node[prop]((child, ...other) =>\n cb(child.toProxy(), ...other)\n )\n }\n } else if (prop === 'root') {\n return () => node.root().toProxy()\n } else if (prop === 'nodes') {\n return node.nodes.map(i => i.toProxy())\n } else if (prop === 'first' || prop === 'last') {\n return node[prop].toProxy()\n } else {\n return node[prop]\n }\n },\n\n set(node, prop, value) {\n if (node[prop] === value) return true\n node[prop] = value\n if (prop === 'name' || prop === 'params' || prop === 'selector') {\n node.markDirty()\n }\n return true\n }\n }\n }\n\n index(child) {\n if (typeof child === 'number') return child\n if (child.proxyOf) child = child.proxyOf\n return this.proxyOf.nodes.indexOf(child)\n }\n\n insertAfter(exist, add) {\n let existIndex = this.index(exist)\n let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse()\n existIndex = this.index(exist)\n for (let node of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node)\n\n let index\n for (let id in this.indexes) {\n index = this.indexes[id]\n if (existIndex < index) {\n this.indexes[id] = index + nodes.length\n }\n }\n\n this.markDirty()\n\n return this\n }\n\n insertBefore(exist, add) {\n let existIndex = this.index(exist)\n let type = existIndex === 0 ? 'prepend' : false\n let nodes = this.normalize(\n add,\n this.proxyOf.nodes[existIndex],\n type\n ).reverse()\n existIndex = this.index(exist)\n for (let node of nodes) this.proxyOf.nodes.splice(existIndex, 0, node)\n\n let index\n for (let id in this.indexes) {\n index = this.indexes[id]\n if (existIndex <= index) {\n this.indexes[id] = index + nodes.length\n }\n }\n\n this.markDirty()\n\n return this\n }\n\n normalize(nodes, sample) {\n if (typeof nodes === 'string') {\n nodes = cleanSource(parse(nodes).nodes)\n } else if (typeof nodes === 'undefined') {\n nodes = []\n } else if (Array.isArray(nodes)) {\n nodes = nodes.slice(0)\n for (let i of nodes) {\n if (i.parent) i.parent.removeChild(i, 'ignore')\n }\n } else if (nodes.type === 'root' && this.type !== 'document') {\n nodes = nodes.nodes.slice(0)\n for (let i of nodes) {\n if (i.parent) i.parent.removeChild(i, 'ignore')\n }\n } else if (nodes.type) {\n nodes = [nodes]\n } else if (nodes.prop) {\n if (typeof nodes.value === 'undefined') {\n throw new Error('Value field is missed in node creation')\n } else if (typeof nodes.value !== 'string') {\n nodes.value = String(nodes.value)\n }\n nodes = [new Declaration(nodes)]\n } else if (nodes.selector || nodes.selectors) {\n nodes = [new Rule(nodes)]\n } else if (nodes.name) {\n nodes = [new AtRule(nodes)]\n } else if (nodes.text) {\n nodes = [new Comment(nodes)]\n } else {\n throw new Error('Unknown node type in node creation')\n }\n\n let processed = nodes.map(i => {\n /* c8 ignore next */\n if (!i[my]) Container.rebuild(i)\n i = i.proxyOf\n if (i.parent) i.parent.removeChild(i)\n if (i[isClean]) markTreeDirty(i)\n\n if (!i.raws) i.raws = {}\n if (typeof i.raws.before === 'undefined') {\n if (sample && typeof sample.raws.before !== 'undefined') {\n i.raws.before = sample.raws.before.replace(/\\S/g, '')\n }\n }\n i.parent = this.proxyOf\n return i\n })\n\n return processed\n }\n\n prepend(...children) {\n children = children.reverse()\n for (let child of children) {\n let nodes = this.normalize(child, this.first, 'prepend').reverse()\n for (let node of nodes) this.proxyOf.nodes.unshift(node)\n for (let id in this.indexes) {\n this.indexes[id] = this.indexes[id] + nodes.length\n }\n }\n\n this.markDirty()\n\n return this\n }\n\n push(child) {\n child.parent = this\n this.proxyOf.nodes.push(child)\n return this\n }\n\n removeAll() {\n for (let node of this.proxyOf.nodes) node.parent = undefined\n this.proxyOf.nodes = []\n\n this.markDirty()\n\n return this\n }\n\n removeChild(child) {\n child = this.index(child)\n this.proxyOf.nodes[child].parent = undefined\n this.proxyOf.nodes.splice(child, 1)\n\n let index\n for (let id in this.indexes) {\n index = this.indexes[id]\n if (index >= child) {\n this.indexes[id] = index - 1\n }\n }\n\n this.markDirty()\n\n return this\n }\n\n replaceValues(pattern, opts, callback) {\n if (!callback) {\n callback = opts\n opts = {}\n }\n\n this.walkDecls(decl => {\n if (opts.props && !opts.props.includes(decl.prop)) return\n if (opts.fast && !decl.value.includes(opts.fast)) return\n\n decl.value = decl.value.replace(pattern, callback)\n })\n\n this.markDirty()\n\n return this\n }\n\n some(condition) {\n return this.nodes.some(condition)\n }\n\n walk(callback) {\n return this.each((child, i) => {\n let result\n try {\n result = callback(child, i)\n } catch (e) {\n throw child.addToError(e)\n }\n if (result !== false && child.walk) {\n result = child.walk(callback)\n }\n\n return result\n })\n }\n\n walkAtRules(name, callback) {\n if (!callback) {\n callback = name\n return this.walk((child, i) => {\n if (child.type === 'atrule') {\n return callback(child, i)\n }\n })\n }\n if (name instanceof RegExp) {\n return this.walk((child, i) => {\n if (child.type === 'atrule' && name.test(child.name)) {\n return callback(child, i)\n }\n })\n }\n return this.walk((child, i) => {\n if (child.type === 'atrule' && child.name === name) {\n return callback(child, i)\n }\n })\n }\n\n walkComments(callback) {\n return this.walk((child, i) => {\n if (child.type === 'comment') {\n return callback(child, i)\n }\n })\n }\n\n walkDecls(prop, callback) {\n if (!callback) {\n callback = prop\n return this.walk((child, i) => {\n if (child.type === 'decl') {\n return callback(child, i)\n }\n })\n }\n if (prop instanceof RegExp) {\n return this.walk((child, i) => {\n if (child.type === 'decl' && prop.test(child.prop)) {\n return callback(child, i)\n }\n })\n }\n return this.walk((child, i) => {\n if (child.type === 'decl' && child.prop === prop) {\n return callback(child, i)\n }\n })\n }\n\n walkRules(selector, callback) {\n if (!callback) {\n callback = selector\n\n return this.walk((child, i) => {\n if (child.type === 'rule') {\n return callback(child, i)\n }\n })\n }\n if (selector instanceof RegExp) {\n return this.walk((child, i) => {\n if (child.type === 'rule' && selector.test(child.selector)) {\n return callback(child, i)\n }\n })\n }\n return this.walk((child, i) => {\n if (child.type === 'rule' && child.selector === selector) {\n return callback(child, i)\n }\n })\n }\n\n get first() {\n if (!this.proxyOf.nodes) return undefined\n return this.proxyOf.nodes[0]\n }\n\n get last() {\n if (!this.proxyOf.nodes) return undefined\n return this.proxyOf.nodes[this.proxyOf.nodes.length - 1]\n }\n}\n\nContainer.registerParse = dependant => {\n parse = dependant\n}\n\nContainer.registerRule = dependant => {\n Rule = dependant\n}\n\nContainer.registerAtRule = dependant => {\n AtRule = dependant\n}\n\nContainer.registerRoot = dependant => {\n Root = dependant\n}\n\nmodule.exports = Container\nContainer.default = Container\n\n/* c8 ignore start */\nContainer.rebuild = node => {\n if (node.type === 'atrule') {\n Object.setPrototypeOf(node, AtRule.prototype)\n } else if (node.type === 'rule') {\n Object.setPrototypeOf(node, Rule.prototype)\n } else if (node.type === 'decl') {\n Object.setPrototypeOf(node, Declaration.prototype)\n } else if (node.type === 'comment') {\n Object.setPrototypeOf(node, Comment.prototype)\n } else if (node.type === 'root') {\n Object.setPrototypeOf(node, Root.prototype)\n }\n\n node[my] = true\n\n if (node.nodes) {\n node.nodes.forEach(child => {\n Container.rebuild(child)\n })\n }\n}\n/* c8 ignore stop */\n","'use strict'\n\nlet pico = require('picocolors')\n\nlet terminalHighlight = require('./terminal-highlight')\n\nclass CssSyntaxError extends Error {\n constructor(message, line, column, source, file, plugin) {\n super(message)\n this.name = 'CssSyntaxError'\n this.reason = message\n\n if (file) {\n this.file = file\n }\n if (source) {\n this.source = source\n }\n if (plugin) {\n this.plugin = plugin\n }\n if (typeof line !== 'undefined' && typeof column !== 'undefined') {\n if (typeof line === 'number') {\n this.line = line\n this.column = column\n } else {\n this.line = line.line\n this.column = line.column\n this.endLine = column.line\n this.endColumn = column.column\n }\n }\n\n this.setMessage()\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, CssSyntaxError)\n }\n }\n\n setMessage() {\n this.message = this.plugin ? this.plugin + ': ' : ''\n this.message += this.file ? this.file : ''\n if (typeof this.line !== 'undefined') {\n this.message += ':' + this.line + ':' + this.column\n }\n this.message += ': ' + this.reason\n }\n\n showSourceCode(color) {\n if (!this.source) return ''\n\n let css = this.source\n if (color == null) color = pico.isColorSupported\n\n let aside = text => text\n let mark = text => text\n let highlight = text => text\n if (color) {\n let { bold, gray, red } = pico.createColors(true)\n mark = text => bold(red(text))\n aside = text => gray(text)\n if (terminalHighlight) {\n highlight = text => terminalHighlight(text)\n }\n }\n\n let lines = css.split(/\\r?\\n/)\n let start = Math.max(this.line - 3, 0)\n let end = Math.min(this.line + 2, lines.length)\n let maxWidth = String(end).length\n\n return lines\n .slice(start, end)\n .map((line, index) => {\n let number = start + 1 + index\n let gutter = ' ' + (' ' + number).slice(-maxWidth) + ' | '\n if (number === this.line) {\n if (line.length > 160) {\n let padding = 20\n let subLineStart = Math.max(0, this.column - padding)\n let subLineEnd = Math.max(\n this.column + padding,\n this.endColumn + padding\n )\n let subLine = line.slice(subLineStart, subLineEnd)\n\n let spacing =\n aside(gutter.replace(/\\d/g, ' ')) +\n line\n .slice(0, Math.min(this.column - 1, padding - 1))\n .replace(/[^\\t]/g, ' ')\n\n return (\n mark('>') +\n aside(gutter) +\n highlight(subLine) +\n '\\n ' +\n spacing +\n mark('^')\n )\n }\n\n let spacing =\n aside(gutter.replace(/\\d/g, ' ')) +\n line.slice(0, this.column - 1).replace(/[^\\t]/g, ' ')\n\n return (\n mark('>') +\n aside(gutter) +\n highlight(line) +\n '\\n ' +\n spacing +\n mark('^')\n )\n }\n\n return ' ' + aside(gutter) + highlight(line)\n })\n .join('\\n')\n }\n\n toString() {\n let code = this.showSourceCode()\n if (code) {\n code = '\\n\\n' + code + '\\n'\n }\n return this.name + ': ' + this.message + code\n }\n}\n\nmodule.exports = CssSyntaxError\nCssSyntaxError.default = CssSyntaxError\n","'use strict'\n\nlet Node = require('./node')\n\nclass Declaration extends Node {\n constructor(defaults) {\n if (\n defaults &&\n typeof defaults.value !== 'undefined' &&\n typeof defaults.value !== 'string'\n ) {\n defaults = { ...defaults, value: String(defaults.value) }\n }\n super(defaults)\n this.type = 'decl'\n }\n\n get variable() {\n return this.prop.startsWith('--') || this.prop[0] === '$'\n }\n}\n\nmodule.exports = Declaration\nDeclaration.default = Declaration\n","'use strict'\n\nlet Container = require('./container')\n\nlet LazyResult, Processor\n\nclass Document extends Container {\n constructor(defaults) {\n // type needs to be passed to super, otherwise child roots won't be normalized correctly\n super({ type: 'document', ...defaults })\n\n if (!this.nodes) {\n this.nodes = []\n }\n }\n\n toResult(opts = {}) {\n let lazy = new LazyResult(new Processor(), this, opts)\n\n return lazy.stringify()\n }\n}\n\nDocument.registerLazyResult = dependant => {\n LazyResult = dependant\n}\n\nDocument.registerProcessor = dependant => {\n Processor = dependant\n}\n\nmodule.exports = Document\nDocument.default = Document\n","'use strict'\n\nlet AtRule = require('./at-rule')\nlet Comment = require('./comment')\nlet Declaration = require('./declaration')\nlet Input = require('./input')\nlet PreviousMap = require('./previous-map')\nlet Root = require('./root')\nlet Rule = require('./rule')\n\nfunction fromJSON(json, inputs) {\n if (Array.isArray(json)) return json.map(n => fromJSON(n))\n\n let { inputs: ownInputs, ...defaults } = json\n if (ownInputs) {\n inputs = []\n for (let input of ownInputs) {\n let inputHydrated = { ...input, __proto__: Input.prototype }\n if (inputHydrated.map) {\n inputHydrated.map = {\n ...inputHydrated.map,\n __proto__: PreviousMap.prototype\n }\n }\n inputs.push(inputHydrated)\n }\n }\n if (defaults.nodes) {\n defaults.nodes = json.nodes.map(n => fromJSON(n, inputs))\n }\n if (defaults.source) {\n let { inputId, ...source } = defaults.source\n defaults.source = source\n if (inputId != null) {\n defaults.source.input = inputs[inputId]\n }\n }\n if (defaults.type === 'root') {\n return new Root(defaults)\n } else if (defaults.type === 'decl') {\n return new Declaration(defaults)\n } else if (defaults.type === 'rule') {\n return new Rule(defaults)\n } else if (defaults.type === 'comment') {\n return new Comment(defaults)\n } else if (defaults.type === 'atrule') {\n return new AtRule(defaults)\n } else {\n throw new Error('Unknown node type: ' + json.type)\n }\n}\n\nmodule.exports = fromJSON\nfromJSON.default = fromJSON\n","'use strict'\n\nlet { nanoid } = require('nanoid/non-secure')\nlet { isAbsolute, resolve } = require('path')\nlet { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')\nlet { fileURLToPath, pathToFileURL } = require('url')\n\nlet CssSyntaxError = require('./css-syntax-error')\nlet PreviousMap = require('./previous-map')\nlet terminalHighlight = require('./terminal-highlight')\n\nlet fromOffsetCache = Symbol('fromOffsetCache')\n\nlet sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator)\nlet pathAvailable = Boolean(resolve && isAbsolute)\n\nclass Input {\n constructor(css, opts = {}) {\n if (\n css === null ||\n typeof css === 'undefined' ||\n (typeof css === 'object' && !css.toString)\n ) {\n throw new Error(`PostCSS received ${css} instead of CSS string`)\n }\n\n this.css = css.toString()\n\n if (this.css[0] === '\\uFEFF' || this.css[0] === '\\uFFFE') {\n this.hasBOM = true\n this.css = this.css.slice(1)\n } else {\n this.hasBOM = false\n }\n\n if (opts.from) {\n if (\n !pathAvailable ||\n /^\\w+:\\/\\//.test(opts.from) ||\n isAbsolute(opts.from)\n ) {\n this.file = opts.from\n } else {\n this.file = resolve(opts.from)\n }\n }\n\n if (pathAvailable && sourceMapAvailable) {\n let map = new PreviousMap(this.css, opts)\n if (map.text) {\n this.map = map\n let file = map.consumer().file\n if (!this.file && file) this.file = this.mapResolve(file)\n }\n }\n\n if (!this.file) {\n this.id = ''\n }\n if (this.map) this.map.file = this.from\n }\n\n error(message, line, column, opts = {}) {\n let endColumn, endLine, result\n\n if (line && typeof line === 'object') {\n let start = line\n let end = column\n if (typeof start.offset === 'number') {\n let pos = this.fromOffset(start.offset)\n line = pos.line\n column = pos.col\n } else {\n line = start.line\n column = start.column\n }\n if (typeof end.offset === 'number') {\n let pos = this.fromOffset(end.offset)\n endLine = pos.line\n endColumn = pos.col\n } else {\n endLine = end.line\n endColumn = end.column\n }\n } else if (!column) {\n let pos = this.fromOffset(line)\n line = pos.line\n column = pos.col\n }\n\n let origin = this.origin(line, column, endLine, endColumn)\n if (origin) {\n result = new CssSyntaxError(\n message,\n origin.endLine === undefined\n ? origin.line\n : { column: origin.column, line: origin.line },\n origin.endLine === undefined\n ? origin.column\n : { column: origin.endColumn, line: origin.endLine },\n origin.source,\n origin.file,\n opts.plugin\n )\n } else {\n result = new CssSyntaxError(\n message,\n endLine === undefined ? line : { column, line },\n endLine === undefined ? column : { column: endColumn, line: endLine },\n this.css,\n this.file,\n opts.plugin\n )\n }\n\n result.input = { column, endColumn, endLine, line, source: this.css }\n if (this.file) {\n if (pathToFileURL) {\n result.input.url = pathToFileURL(this.file).toString()\n }\n result.input.file = this.file\n }\n\n return result\n }\n\n fromOffset(offset) {\n let lastLine, lineToIndex\n if (!this[fromOffsetCache]) {\n let lines = this.css.split('\\n')\n lineToIndex = new Array(lines.length)\n let prevIndex = 0\n\n for (let i = 0, l = lines.length; i < l; i++) {\n lineToIndex[i] = prevIndex\n prevIndex += lines[i].length + 1\n }\n\n this[fromOffsetCache] = lineToIndex\n } else {\n lineToIndex = this[fromOffsetCache]\n }\n lastLine = lineToIndex[lineToIndex.length - 1]\n\n let min = 0\n if (offset >= lastLine) {\n min = lineToIndex.length - 1\n } else {\n let max = lineToIndex.length - 2\n let mid\n while (min < max) {\n mid = min + ((max - min) >> 1)\n if (offset < lineToIndex[mid]) {\n max = mid - 1\n } else if (offset >= lineToIndex[mid + 1]) {\n min = mid + 1\n } else {\n min = mid\n break\n }\n }\n }\n return {\n col: offset - lineToIndex[min] + 1,\n line: min + 1\n }\n }\n\n mapResolve(file) {\n if (/^\\w+:\\/\\//.test(file)) {\n return file\n }\n return resolve(this.map.consumer().sourceRoot || this.map.root || '.', file)\n }\n\n origin(line, column, endLine, endColumn) {\n if (!this.map) return false\n let consumer = this.map.consumer()\n\n let from = consumer.originalPositionFor({ column, line })\n if (!from.source) return false\n\n let to\n if (typeof endLine === 'number') {\n to = consumer.originalPositionFor({ column: endColumn, line: endLine })\n }\n\n let fromUrl\n\n if (isAbsolute(from.source)) {\n fromUrl = pathToFileURL(from.source)\n } else {\n fromUrl = new URL(\n from.source,\n this.map.consumer().sourceRoot || pathToFileURL(this.map.mapFile)\n )\n }\n\n let result = {\n column: from.column,\n endColumn: to && to.column,\n endLine: to && to.line,\n line: from.line,\n url: fromUrl.toString()\n }\n\n if (fromUrl.protocol === 'file:') {\n if (fileURLToPath) {\n result.file = fileURLToPath(fromUrl)\n } else {\n /* c8 ignore next 2 */\n throw new Error(`file: protocol is not available in this PostCSS build`)\n }\n }\n\n let source = consumer.sourceContentFor(from.source)\n if (source) result.source = source\n\n return result\n }\n\n toJSON() {\n let json = {}\n for (let name of ['hasBOM', 'css', 'file', 'id']) {\n if (this[name] != null) {\n json[name] = this[name]\n }\n }\n if (this.map) {\n json.map = { ...this.map }\n if (json.map.consumerCache) {\n json.map.consumerCache = undefined\n }\n }\n return json\n }\n\n get from() {\n return this.file || this.id\n }\n}\n\nmodule.exports = Input\nInput.default = Input\n\nif (terminalHighlight && terminalHighlight.registerInput) {\n terminalHighlight.registerInput(Input)\n}\n","'use strict'\n\nlet Container = require('./container')\nlet Document = require('./document')\nlet MapGenerator = require('./map-generator')\nlet parse = require('./parse')\nlet Result = require('./result')\nlet Root = require('./root')\nlet stringify = require('./stringify')\nlet { isClean, my } = require('./symbols')\nlet warnOnce = require('./warn-once')\n\nconst TYPE_TO_CLASS_NAME = {\n atrule: 'AtRule',\n comment: 'Comment',\n decl: 'Declaration',\n document: 'Document',\n root: 'Root',\n rule: 'Rule'\n}\n\nconst PLUGIN_PROPS = {\n AtRule: true,\n AtRuleExit: true,\n Comment: true,\n CommentExit: true,\n Declaration: true,\n DeclarationExit: true,\n Document: true,\n DocumentExit: true,\n Once: true,\n OnceExit: true,\n postcssPlugin: true,\n prepare: true,\n Root: true,\n RootExit: true,\n Rule: true,\n RuleExit: true\n}\n\nconst NOT_VISITORS = {\n Once: true,\n postcssPlugin: true,\n prepare: true\n}\n\nconst CHILDREN = 0\n\nfunction isPromise(obj) {\n return typeof obj === 'object' && typeof obj.then === 'function'\n}\n\nfunction getEvents(node) {\n let key = false\n let type = TYPE_TO_CLASS_NAME[node.type]\n if (node.type === 'decl') {\n key = node.prop.toLowerCase()\n } else if (node.type === 'atrule') {\n key = node.name.toLowerCase()\n }\n\n if (key && node.append) {\n return [\n type,\n type + '-' + key,\n CHILDREN,\n type + 'Exit',\n type + 'Exit-' + key\n ]\n } else if (key) {\n return [type, type + '-' + key, type + 'Exit', type + 'Exit-' + key]\n } else if (node.append) {\n return [type, CHILDREN, type + 'Exit']\n } else {\n return [type, type + 'Exit']\n }\n}\n\nfunction toStack(node) {\n let events\n if (node.type === 'document') {\n events = ['Document', CHILDREN, 'DocumentExit']\n } else if (node.type === 'root') {\n events = ['Root', CHILDREN, 'RootExit']\n } else {\n events = getEvents(node)\n }\n\n return {\n eventIndex: 0,\n events,\n iterator: 0,\n node,\n visitorIndex: 0,\n visitors: []\n }\n}\n\nfunction cleanMarks(node) {\n node[isClean] = false\n if (node.nodes) node.nodes.forEach(i => cleanMarks(i))\n return node\n}\n\nlet postcss = {}\n\nclass LazyResult {\n constructor(processor, css, opts) {\n this.stringified = false\n this.processed = false\n\n let root\n if (\n typeof css === 'object' &&\n css !== null &&\n (css.type === 'root' || css.type === 'document')\n ) {\n root = cleanMarks(css)\n } else if (css instanceof LazyResult || css instanceof Result) {\n root = cleanMarks(css.root)\n if (css.map) {\n if (typeof opts.map === 'undefined') opts.map = {}\n if (!opts.map.inline) opts.map.inline = false\n opts.map.prev = css.map\n }\n } else {\n let parser = parse\n if (opts.syntax) parser = opts.syntax.parse\n if (opts.parser) parser = opts.parser\n if (parser.parse) parser = parser.parse\n\n try {\n root = parser(css, opts)\n } catch (error) {\n this.processed = true\n this.error = error\n }\n\n if (root && !root[my]) {\n /* c8 ignore next 2 */\n Container.rebuild(root)\n }\n }\n\n this.result = new Result(processor, root, opts)\n this.helpers = { ...postcss, postcss, result: this.result }\n this.plugins = this.processor.plugins.map(plugin => {\n if (typeof plugin === 'object' && plugin.prepare) {\n return { ...plugin, ...plugin.prepare(this.result) }\n } else {\n return plugin\n }\n })\n }\n\n async() {\n if (this.error) return Promise.reject(this.error)\n if (this.processed) return Promise.resolve(this.result)\n if (!this.processing) {\n this.processing = this.runAsync()\n }\n return this.processing\n }\n\n catch(onRejected) {\n return this.async().catch(onRejected)\n }\n\n finally(onFinally) {\n return this.async().then(onFinally, onFinally)\n }\n\n getAsyncError() {\n throw new Error('Use process(css).then(cb) to work with async plugins')\n }\n\n handleError(error, node) {\n let plugin = this.result.lastPlugin\n try {\n if (node) node.addToError(error)\n this.error = error\n if (error.name === 'CssSyntaxError' && !error.plugin) {\n error.plugin = plugin.postcssPlugin\n error.setMessage()\n } else if (plugin.postcssVersion) {\n if (process.env.NODE_ENV !== 'production') {\n let pluginName = plugin.postcssPlugin\n let pluginVer = plugin.postcssVersion\n let runtimeVer = this.result.processor.version\n let a = pluginVer.split('.')\n let b = runtimeVer.split('.')\n\n if (a[0] !== b[0] || parseInt(a[1]) > parseInt(b[1])) {\n // eslint-disable-next-line no-console\n console.error(\n 'Unknown error from PostCSS plugin. Your current PostCSS ' +\n 'version is ' +\n runtimeVer +\n ', but ' +\n pluginName +\n ' uses ' +\n pluginVer +\n '. Perhaps this is the source of the error below.'\n )\n }\n }\n }\n } catch (err) {\n /* c8 ignore next 3 */\n // eslint-disable-next-line no-console\n if (console && console.error) console.error(err)\n }\n return error\n }\n\n prepareVisitors() {\n this.listeners = {}\n let add = (plugin, type, cb) => {\n if (!this.listeners[type]) this.listeners[type] = []\n this.listeners[type].push([plugin, cb])\n }\n for (let plugin of this.plugins) {\n if (typeof plugin === 'object') {\n for (let event in plugin) {\n if (!PLUGIN_PROPS[event] && /^[A-Z]/.test(event)) {\n throw new Error(\n `Unknown event ${event} in ${plugin.postcssPlugin}. ` +\n `Try to update PostCSS (${this.processor.version} now).`\n )\n }\n if (!NOT_VISITORS[event]) {\n if (typeof plugin[event] === 'object') {\n for (let filter in plugin[event]) {\n if (filter === '*') {\n add(plugin, event, plugin[event][filter])\n } else {\n add(\n plugin,\n event + '-' + filter.toLowerCase(),\n plugin[event][filter]\n )\n }\n }\n } else if (typeof plugin[event] === 'function') {\n add(plugin, event, plugin[event])\n }\n }\n }\n }\n }\n this.hasListener = Object.keys(this.listeners).length > 0\n }\n\n async runAsync() {\n this.plugin = 0\n for (let i = 0; i < this.plugins.length; i++) {\n let plugin = this.plugins[i]\n let promise = this.runOnRoot(plugin)\n if (isPromise(promise)) {\n try {\n await promise\n } catch (error) {\n throw this.handleError(error)\n }\n }\n }\n\n this.prepareVisitors()\n if (this.hasListener) {\n let root = this.result.root\n while (!root[isClean]) {\n root[isClean] = true\n let stack = [toStack(root)]\n while (stack.length > 0) {\n let promise = this.visitTick(stack)\n if (isPromise(promise)) {\n try {\n await promise\n } catch (e) {\n let node = stack[stack.length - 1].node\n throw this.handleError(e, node)\n }\n }\n }\n }\n\n if (this.listeners.OnceExit) {\n for (let [plugin, visitor] of this.listeners.OnceExit) {\n this.result.lastPlugin = plugin\n try {\n if (root.type === 'document') {\n let roots = root.nodes.map(subRoot =>\n visitor(subRoot, this.helpers)\n )\n\n await Promise.all(roots)\n } else {\n await visitor(root, this.helpers)\n }\n } catch (e) {\n throw this.handleError(e)\n }\n }\n }\n }\n\n this.processed = true\n return this.stringify()\n }\n\n runOnRoot(plugin) {\n this.result.lastPlugin = plugin\n try {\n if (typeof plugin === 'object' && plugin.Once) {\n if (this.result.root.type === 'document') {\n let roots = this.result.root.nodes.map(root =>\n plugin.Once(root, this.helpers)\n )\n\n if (isPromise(roots[0])) {\n return Promise.all(roots)\n }\n\n return roots\n }\n\n return plugin.Once(this.result.root, this.helpers)\n } else if (typeof plugin === 'function') {\n return plugin(this.result.root, this.result)\n }\n } catch (error) {\n throw this.handleError(error)\n }\n }\n\n stringify() {\n if (this.error) throw this.error\n if (this.stringified) return this.result\n this.stringified = true\n\n this.sync()\n\n let opts = this.result.opts\n let str = stringify\n if (opts.syntax) str = opts.syntax.stringify\n if (opts.stringifier) str = opts.stringifier\n if (str.stringify) str = str.stringify\n\n let map = new MapGenerator(str, this.result.root, this.result.opts)\n let data = map.generate()\n this.result.css = data[0]\n this.result.map = data[1]\n\n return this.result\n }\n\n sync() {\n if (this.error) throw this.error\n if (this.processed) return this.result\n this.processed = true\n\n if (this.processing) {\n throw this.getAsyncError()\n }\n\n for (let plugin of this.plugins) {\n let promise = this.runOnRoot(plugin)\n if (isPromise(promise)) {\n throw this.getAsyncError()\n }\n }\n\n this.prepareVisitors()\n if (this.hasListener) {\n let root = this.result.root\n while (!root[isClean]) {\n root[isClean] = true\n this.walkSync(root)\n }\n if (this.listeners.OnceExit) {\n if (root.type === 'document') {\n for (let subRoot of root.nodes) {\n this.visitSync(this.listeners.OnceExit, subRoot)\n }\n } else {\n this.visitSync(this.listeners.OnceExit, root)\n }\n }\n }\n\n return this.result\n }\n\n then(onFulfilled, onRejected) {\n if (process.env.NODE_ENV !== 'production') {\n if (!('from' in this.opts)) {\n warnOnce(\n 'Without `from` option PostCSS could generate wrong source map ' +\n 'and will not find Browserslist config. Set it to CSS file path ' +\n 'or to `undefined` to prevent this warning.'\n )\n }\n }\n return this.async().then(onFulfilled, onRejected)\n }\n\n toString() {\n return this.css\n }\n\n visitSync(visitors, node) {\n for (let [plugin, visitor] of visitors) {\n this.result.lastPlugin = plugin\n let promise\n try {\n promise = visitor(node, this.helpers)\n } catch (e) {\n throw this.handleError(e, node.proxyOf)\n }\n if (node.type !== 'root' && node.type !== 'document' && !node.parent) {\n return true\n }\n if (isPromise(promise)) {\n throw this.getAsyncError()\n }\n }\n }\n\n visitTick(stack) {\n let visit = stack[stack.length - 1]\n let { node, visitors } = visit\n\n if (node.type !== 'root' && node.type !== 'document' && !node.parent) {\n stack.pop()\n return\n }\n\n if (visitors.length > 0 && visit.visitorIndex < visitors.length) {\n let [plugin, visitor] = visitors[visit.visitorIndex]\n visit.visitorIndex += 1\n if (visit.visitorIndex === visitors.length) {\n visit.visitors = []\n visit.visitorIndex = 0\n }\n this.result.lastPlugin = plugin\n try {\n return visitor(node.toProxy(), this.helpers)\n } catch (e) {\n throw this.handleError(e, node)\n }\n }\n\n if (visit.iterator !== 0) {\n let iterator = visit.iterator\n let child\n while ((child = node.nodes[node.indexes[iterator]])) {\n node.indexes[iterator] += 1\n if (!child[isClean]) {\n child[isClean] = true\n stack.push(toStack(child))\n return\n }\n }\n visit.iterator = 0\n delete node.indexes[iterator]\n }\n\n let events = visit.events\n while (visit.eventIndex < events.length) {\n let event = events[visit.eventIndex]\n visit.eventIndex += 1\n if (event === CHILDREN) {\n if (node.nodes && node.nodes.length) {\n node[isClean] = true\n visit.iterator = node.getIterator()\n }\n return\n } else if (this.listeners[event]) {\n visit.visitors = this.listeners[event]\n return\n }\n }\n stack.pop()\n }\n\n walkSync(node) {\n node[isClean] = true\n let events = getEvents(node)\n for (let event of events) {\n if (event === CHILDREN) {\n if (node.nodes) {\n node.each(child => {\n if (!child[isClean]) this.walkSync(child)\n })\n }\n } else {\n let visitors = this.listeners[event]\n if (visitors) {\n if (this.visitSync(visitors, node.toProxy())) return\n }\n }\n }\n }\n\n warnings() {\n return this.sync().warnings()\n }\n\n get content() {\n return this.stringify().content\n }\n\n get css() {\n return this.stringify().css\n }\n\n get map() {\n return this.stringify().map\n }\n\n get messages() {\n return this.sync().messages\n }\n\n get opts() {\n return this.result.opts\n }\n\n get processor() {\n return this.result.processor\n }\n\n get root() {\n return this.sync().root\n }\n\n get [Symbol.toStringTag]() {\n return 'LazyResult'\n }\n}\n\nLazyResult.registerPostcss = dependant => {\n postcss = dependant\n}\n\nmodule.exports = LazyResult\nLazyResult.default = LazyResult\n\nRoot.registerLazyResult(LazyResult)\nDocument.registerLazyResult(LazyResult)\n","'use strict'\n\nlet list = {\n comma(string) {\n return list.split(string, [','], true)\n },\n\n space(string) {\n let spaces = [' ', '\\n', '\\t']\n return list.split(string, spaces)\n },\n\n split(string, separators, last) {\n let array = []\n let current = ''\n let split = false\n\n let func = 0\n let inQuote = false\n let prevQuote = ''\n let escape = false\n\n for (let letter of string) {\n if (escape) {\n escape = false\n } else if (letter === '\\\\') {\n escape = true\n } else if (inQuote) {\n if (letter === prevQuote) {\n inQuote = false\n }\n } else if (letter === '\"' || letter === \"'\") {\n inQuote = true\n prevQuote = letter\n } else if (letter === '(') {\n func += 1\n } else if (letter === ')') {\n if (func > 0) func -= 1\n } else if (func === 0) {\n if (separators.includes(letter)) split = true\n }\n\n if (split) {\n if (current !== '') array.push(current.trim())\n current = ''\n split = false\n } else {\n current += letter\n }\n }\n\n if (last || current !== '') array.push(current.trim())\n return array\n }\n}\n\nmodule.exports = list\nlist.default = list\n","'use strict'\n\nlet { dirname, relative, resolve, sep } = require('path')\nlet { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')\nlet { pathToFileURL } = require('url')\n\nlet Input = require('./input')\n\nlet sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator)\nlet pathAvailable = Boolean(dirname && resolve && relative && sep)\n\nclass MapGenerator {\n constructor(stringify, root, opts, cssString) {\n this.stringify = stringify\n this.mapOpts = opts.map || {}\n this.root = root\n this.opts = opts\n this.css = cssString\n this.originalCSS = cssString\n this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute\n\n this.memoizedFileURLs = new Map()\n this.memoizedPaths = new Map()\n this.memoizedURLs = new Map()\n }\n\n addAnnotation() {\n let content\n\n if (this.isInline()) {\n content =\n 'data:application/json;base64,' + this.toBase64(this.map.toString())\n } else if (typeof this.mapOpts.annotation === 'string') {\n content = this.mapOpts.annotation\n } else if (typeof this.mapOpts.annotation === 'function') {\n content = this.mapOpts.annotation(this.opts.to, this.root)\n } else {\n content = this.outputFile() + '.map'\n }\n let eol = '\\n'\n if (this.css.includes('\\r\\n')) eol = '\\r\\n'\n\n this.css += eol + '/*# sourceMappingURL=' + content + ' */'\n }\n\n applyPrevMaps() {\n for (let prev of this.previous()) {\n let from = this.toUrl(this.path(prev.file))\n let root = prev.root || dirname(prev.file)\n let map\n\n if (this.mapOpts.sourcesContent === false) {\n map = new SourceMapConsumer(prev.text)\n if (map.sourcesContent) {\n map.sourcesContent = null\n }\n } else {\n map = prev.consumer()\n }\n\n this.map.applySourceMap(map, from, this.toUrl(this.path(root)))\n }\n }\n\n clearAnnotation() {\n if (this.mapOpts.annotation === false) return\n\n if (this.root) {\n let node\n for (let i = this.root.nodes.length - 1; i >= 0; i--) {\n node = this.root.nodes[i]\n if (node.type !== 'comment') continue\n if (node.text.startsWith('# sourceMappingURL=')) {\n this.root.removeChild(i)\n }\n }\n } else if (this.css) {\n this.css = this.css.replace(/\\n*\\/\\*#[\\S\\s]*?\\*\\/$/gm, '')\n }\n }\n\n generate() {\n this.clearAnnotation()\n if (pathAvailable && sourceMapAvailable && this.isMap()) {\n return this.generateMap()\n } else {\n let result = ''\n this.stringify(this.root, i => {\n result += i\n })\n return [result]\n }\n }\n\n generateMap() {\n if (this.root) {\n this.generateString()\n } else if (this.previous().length === 1) {\n let prev = this.previous()[0].consumer()\n prev.file = this.outputFile()\n this.map = SourceMapGenerator.fromSourceMap(prev, {\n ignoreInvalidMapping: true\n })\n } else {\n this.map = new SourceMapGenerator({\n file: this.outputFile(),\n ignoreInvalidMapping: true\n })\n this.map.addMapping({\n generated: { column: 0, line: 1 },\n original: { column: 0, line: 1 },\n source: this.opts.from\n ? this.toUrl(this.path(this.opts.from))\n : ''\n })\n }\n\n if (this.isSourcesContent()) this.setSourcesContent()\n if (this.root && this.previous().length > 0) this.applyPrevMaps()\n if (this.isAnnotation()) this.addAnnotation()\n\n if (this.isInline()) {\n return [this.css]\n } else {\n return [this.css, this.map]\n }\n }\n\n generateString() {\n this.css = ''\n this.map = new SourceMapGenerator({\n file: this.outputFile(),\n ignoreInvalidMapping: true\n })\n\n let line = 1\n let column = 1\n\n let noSource = ''\n let mapping = {\n generated: { column: 0, line: 0 },\n original: { column: 0, line: 0 },\n source: ''\n }\n\n let last, lines\n this.stringify(this.root, (str, node, type) => {\n this.css += str\n\n if (node && type !== 'end') {\n mapping.generated.line = line\n mapping.generated.column = column - 1\n if (node.source && node.source.start) {\n mapping.source = this.sourcePath(node)\n mapping.original.line = node.source.start.line\n mapping.original.column = node.source.start.column - 1\n this.map.addMapping(mapping)\n } else {\n mapping.source = noSource\n mapping.original.line = 1\n mapping.original.column = 0\n this.map.addMapping(mapping)\n }\n }\n\n lines = str.match(/\\n/g)\n if (lines) {\n line += lines.length\n last = str.lastIndexOf('\\n')\n column = str.length - last\n } else {\n column += str.length\n }\n\n if (node && type !== 'start') {\n let p = node.parent || { raws: {} }\n let childless =\n node.type === 'decl' || (node.type === 'atrule' && !node.nodes)\n if (!childless || node !== p.last || p.raws.semicolon) {\n if (node.source && node.source.end) {\n mapping.source = this.sourcePath(node)\n mapping.original.line = node.source.end.line\n mapping.original.column = node.source.end.column - 1\n mapping.generated.line = line\n mapping.generated.column = column - 2\n this.map.addMapping(mapping)\n } else {\n mapping.source = noSource\n mapping.original.line = 1\n mapping.original.column = 0\n mapping.generated.line = line\n mapping.generated.column = column - 1\n this.map.addMapping(mapping)\n }\n }\n }\n })\n }\n\n isAnnotation() {\n if (this.isInline()) {\n return true\n }\n if (typeof this.mapOpts.annotation !== 'undefined') {\n return this.mapOpts.annotation\n }\n if (this.previous().length) {\n return this.previous().some(i => i.annotation)\n }\n return true\n }\n\n isInline() {\n if (typeof this.mapOpts.inline !== 'undefined') {\n return this.mapOpts.inline\n }\n\n let annotation = this.mapOpts.annotation\n if (typeof annotation !== 'undefined' && annotation !== true) {\n return false\n }\n\n if (this.previous().length) {\n return this.previous().some(i => i.inline)\n }\n return true\n }\n\n isMap() {\n if (typeof this.opts.map !== 'undefined') {\n return !!this.opts.map\n }\n return this.previous().length > 0\n }\n\n isSourcesContent() {\n if (typeof this.mapOpts.sourcesContent !== 'undefined') {\n return this.mapOpts.sourcesContent\n }\n if (this.previous().length) {\n return this.previous().some(i => i.withContent())\n }\n return true\n }\n\n outputFile() {\n if (this.opts.to) {\n return this.path(this.opts.to)\n } else if (this.opts.from) {\n return this.path(this.opts.from)\n } else {\n return 'to.css'\n }\n }\n\n path(file) {\n if (this.mapOpts.absolute) return file\n if (file.charCodeAt(0) === 60 /* `<` */) return file\n if (/^\\w+:\\/\\//.test(file)) return file\n let cached = this.memoizedPaths.get(file)\n if (cached) return cached\n\n let from = this.opts.to ? dirname(this.opts.to) : '.'\n\n if (typeof this.mapOpts.annotation === 'string') {\n from = dirname(resolve(from, this.mapOpts.annotation))\n }\n\n let path = relative(from, file)\n this.memoizedPaths.set(file, path)\n\n return path\n }\n\n previous() {\n if (!this.previousMaps) {\n this.previousMaps = []\n if (this.root) {\n this.root.walk(node => {\n if (node.source && node.source.input.map) {\n let map = node.source.input.map\n if (!this.previousMaps.includes(map)) {\n this.previousMaps.push(map)\n }\n }\n })\n } else {\n let input = new Input(this.originalCSS, this.opts)\n if (input.map) this.previousMaps.push(input.map)\n }\n }\n\n return this.previousMaps\n }\n\n setSourcesContent() {\n let already = {}\n if (this.root) {\n this.root.walk(node => {\n if (node.source) {\n let from = node.source.input.from\n if (from && !already[from]) {\n already[from] = true\n let fromUrl = this.usesFileUrls\n ? this.toFileUrl(from)\n : this.toUrl(this.path(from))\n this.map.setSourceContent(fromUrl, node.source.input.css)\n }\n }\n })\n } else if (this.css) {\n let from = this.opts.from\n ? this.toUrl(this.path(this.opts.from))\n : ''\n this.map.setSourceContent(from, this.css)\n }\n }\n\n sourcePath(node) {\n if (this.mapOpts.from) {\n return this.toUrl(this.mapOpts.from)\n } else if (this.usesFileUrls) {\n return this.toFileUrl(node.source.input.from)\n } else {\n return this.toUrl(this.path(node.source.input.from))\n }\n }\n\n toBase64(str) {\n if (Buffer) {\n return Buffer.from(str).toString('base64')\n } else {\n return window.btoa(unescape(encodeURIComponent(str)))\n }\n }\n\n toFileUrl(path) {\n let cached = this.memoizedFileURLs.get(path)\n if (cached) return cached\n\n if (pathToFileURL) {\n let fileURL = pathToFileURL(path).toString()\n this.memoizedFileURLs.set(path, fileURL)\n\n return fileURL\n } else {\n throw new Error(\n '`map.absolute` option is not available in this PostCSS build'\n )\n }\n }\n\n toUrl(path) {\n let cached = this.memoizedURLs.get(path)\n if (cached) return cached\n\n if (sep === '\\\\') {\n path = path.replace(/\\\\/g, '/')\n }\n\n let url = encodeURI(path).replace(/[#?]/g, encodeURIComponent)\n this.memoizedURLs.set(path, url)\n\n return url\n }\n}\n\nmodule.exports = MapGenerator\n","'use strict'\n\nlet MapGenerator = require('./map-generator')\nlet parse = require('./parse')\nconst Result = require('./result')\nlet stringify = require('./stringify')\nlet warnOnce = require('./warn-once')\n\nclass NoWorkResult {\n constructor(processor, css, opts) {\n css = css.toString()\n this.stringified = false\n\n this._processor = processor\n this._css = css\n this._opts = opts\n this._map = undefined\n let root\n\n let str = stringify\n this.result = new Result(this._processor, root, this._opts)\n this.result.css = css\n\n let self = this\n Object.defineProperty(this.result, 'root', {\n get() {\n return self.root\n }\n })\n\n let map = new MapGenerator(str, root, this._opts, css)\n if (map.isMap()) {\n let [generatedCSS, generatedMap] = map.generate()\n if (generatedCSS) {\n this.result.css = generatedCSS\n }\n if (generatedMap) {\n this.result.map = generatedMap\n }\n } else {\n map.clearAnnotation()\n this.result.css = map.css\n }\n }\n\n async() {\n if (this.error) return Promise.reject(this.error)\n return Promise.resolve(this.result)\n }\n\n catch(onRejected) {\n return this.async().catch(onRejected)\n }\n\n finally(onFinally) {\n return this.async().then(onFinally, onFinally)\n }\n\n sync() {\n if (this.error) throw this.error\n return this.result\n }\n\n then(onFulfilled, onRejected) {\n if (process.env.NODE_ENV !== 'production') {\n if (!('from' in this._opts)) {\n warnOnce(\n 'Without `from` option PostCSS could generate wrong source map ' +\n 'and will not find Browserslist config. Set it to CSS file path ' +\n 'or to `undefined` to prevent this warning.'\n )\n }\n }\n\n return this.async().then(onFulfilled, onRejected)\n }\n\n toString() {\n return this._css\n }\n\n warnings() {\n return []\n }\n\n get content() {\n return this.result.css\n }\n\n get css() {\n return this.result.css\n }\n\n get map() {\n return this.result.map\n }\n\n get messages() {\n return []\n }\n\n get opts() {\n return this.result.opts\n }\n\n get processor() {\n return this.result.processor\n }\n\n get root() {\n if (this._root) {\n return this._root\n }\n\n let root\n let parser = parse\n\n try {\n root = parser(this._css, this._opts)\n } catch (error) {\n this.error = error\n }\n\n if (this.error) {\n throw this.error\n } else {\n this._root = root\n return root\n }\n }\n\n get [Symbol.toStringTag]() {\n return 'NoWorkResult'\n }\n}\n\nmodule.exports = NoWorkResult\nNoWorkResult.default = NoWorkResult\n","'use strict'\n\nlet CssSyntaxError = require('./css-syntax-error')\nlet Stringifier = require('./stringifier')\nlet stringify = require('./stringify')\nlet { isClean, my } = require('./symbols')\n\nfunction cloneNode(obj, parent) {\n let cloned = new obj.constructor()\n\n for (let i in obj) {\n if (!Object.prototype.hasOwnProperty.call(obj, i)) {\n /* c8 ignore next 2 */\n continue\n }\n if (i === 'proxyCache') continue\n let value = obj[i]\n let type = typeof value\n\n if (i === 'parent' && type === 'object') {\n if (parent) cloned[i] = parent\n } else if (i === 'source') {\n cloned[i] = value\n } else if (Array.isArray(value)) {\n cloned[i] = value.map(j => cloneNode(j, cloned))\n } else {\n if (type === 'object' && value !== null) value = cloneNode(value)\n cloned[i] = value\n }\n }\n\n return cloned\n}\n\nfunction sourceOffset(inputCSS, position) {\n // Not all custom syntaxes support `offset` in `source.start` and `source.end`\n if (\n position &&\n typeof position.offset !== 'undefined'\n ) {\n return position.offset;\n }\n\n let column = 1\n let line = 1\n let offset = 0\n\n for (let i = 0; i < inputCSS.length; i++) {\n if (line === position.line && column === position.column) {\n offset = i\n break\n }\n\n if (inputCSS[i] === '\\n') {\n column = 1\n line += 1\n } else {\n column += 1\n }\n }\n\n return offset\n}\n\nclass Node {\n constructor(defaults = {}) {\n this.raws = {}\n this[isClean] = false\n this[my] = true\n\n for (let name in defaults) {\n if (name === 'nodes') {\n this.nodes = []\n for (let node of defaults[name]) {\n if (typeof node.clone === 'function') {\n this.append(node.clone())\n } else {\n this.append(node)\n }\n }\n } else {\n this[name] = defaults[name]\n }\n }\n }\n\n addToError(error) {\n error.postcssNode = this\n if (error.stack && this.source && /\\n\\s{4}at /.test(error.stack)) {\n let s = this.source\n error.stack = error.stack.replace(\n /\\n\\s{4}at /,\n `$&${s.input.from}:${s.start.line}:${s.start.column}$&`\n )\n }\n return error\n }\n\n after(add) {\n this.parent.insertAfter(this, add)\n return this\n }\n\n assign(overrides = {}) {\n for (let name in overrides) {\n this[name] = overrides[name]\n }\n return this\n }\n\n before(add) {\n this.parent.insertBefore(this, add)\n return this\n }\n\n cleanRaws(keepBetween) {\n delete this.raws.before\n delete this.raws.after\n if (!keepBetween) delete this.raws.between\n }\n\n clone(overrides = {}) {\n let cloned = cloneNode(this)\n for (let name in overrides) {\n cloned[name] = overrides[name]\n }\n return cloned\n }\n\n cloneAfter(overrides = {}) {\n let cloned = this.clone(overrides)\n this.parent.insertAfter(this, cloned)\n return cloned\n }\n\n cloneBefore(overrides = {}) {\n let cloned = this.clone(overrides)\n this.parent.insertBefore(this, cloned)\n return cloned\n }\n\n error(message, opts = {}) {\n if (this.source) {\n let { end, start } = this.rangeBy(opts)\n return this.source.input.error(\n message,\n { column: start.column, line: start.line },\n { column: end.column, line: end.line },\n opts\n )\n }\n return new CssSyntaxError(message)\n }\n\n getProxyProcessor() {\n return {\n get(node, prop) {\n if (prop === 'proxyOf') {\n return node\n } else if (prop === 'root') {\n return () => node.root().toProxy()\n } else {\n return node[prop]\n }\n },\n\n set(node, prop, value) {\n if (node[prop] === value) return true\n node[prop] = value\n if (\n prop === 'prop' ||\n prop === 'value' ||\n prop === 'name' ||\n prop === 'params' ||\n prop === 'important' ||\n /* c8 ignore next */\n prop === 'text'\n ) {\n node.markDirty()\n }\n return true\n }\n }\n }\n\n /* c8 ignore next 3 */\n markClean() {\n this[isClean] = true\n }\n\n markDirty() {\n if (this[isClean]) {\n this[isClean] = false\n let next = this\n while ((next = next.parent)) {\n next[isClean] = false\n }\n }\n }\n\n next() {\n if (!this.parent) return undefined\n let index = this.parent.index(this)\n return this.parent.nodes[index + 1]\n }\n\n positionBy(opts) {\n let pos = this.source.start\n if (opts.index) {\n pos = this.positionInside(opts.index)\n } else if (opts.word) {\n let stringRepresentation = this.source.input.css.slice(\n sourceOffset(this.source.input.css, this.source.start),\n sourceOffset(this.source.input.css, this.source.end)\n )\n let index = stringRepresentation.indexOf(opts.word)\n if (index !== -1) pos = this.positionInside(index)\n }\n return pos\n }\n\n positionInside(index) {\n let column = this.source.start.column\n let line = this.source.start.line\n let offset = sourceOffset(this.source.input.css, this.source.start)\n let end = offset + index\n\n for (let i = offset; i < end; i++) {\n if (this.source.input.css[i] === '\\n') {\n column = 1\n line += 1\n } else {\n column += 1\n }\n }\n\n return { column, line }\n }\n\n prev() {\n if (!this.parent) return undefined\n let index = this.parent.index(this)\n return this.parent.nodes[index - 1]\n }\n\n rangeBy(opts) {\n let start = {\n column: this.source.start.column,\n line: this.source.start.line\n }\n let end = this.source.end\n ? {\n column: this.source.end.column + 1,\n line: this.source.end.line\n }\n : {\n column: start.column + 1,\n line: start.line\n }\n\n if (opts.word) {\n let stringRepresentation = this.source.input.css.slice(\n sourceOffset(this.source.input.css, this.source.start),\n sourceOffset(this.source.input.css, this.source.end)\n )\n let index = stringRepresentation.indexOf(opts.word)\n if (index !== -1) {\n start = this.positionInside(index)\n end = this.positionInside(\n index + opts.word.length,\n )\n }\n } else {\n if (opts.start) {\n start = {\n column: opts.start.column,\n line: opts.start.line\n }\n } else if (opts.index) {\n start = this.positionInside(opts.index)\n }\n\n if (opts.end) {\n end = {\n column: opts.end.column,\n line: opts.end.line\n }\n } else if (typeof opts.endIndex === 'number') {\n end = this.positionInside(opts.endIndex)\n } else if (opts.index) {\n end = this.positionInside(opts.index + 1)\n }\n }\n\n if (\n end.line < start.line ||\n (end.line === start.line && end.column <= start.column)\n ) {\n end = { column: start.column + 1, line: start.line }\n }\n\n return { end, start }\n }\n\n raw(prop, defaultType) {\n let str = new Stringifier()\n return str.raw(this, prop, defaultType)\n }\n\n remove() {\n if (this.parent) {\n this.parent.removeChild(this)\n }\n this.parent = undefined\n return this\n }\n\n replaceWith(...nodes) {\n if (this.parent) {\n let bookmark = this\n let foundSelf = false\n for (let node of nodes) {\n if (node === this) {\n foundSelf = true\n } else if (foundSelf) {\n this.parent.insertAfter(bookmark, node)\n bookmark = node\n } else {\n this.parent.insertBefore(bookmark, node)\n }\n }\n\n if (!foundSelf) {\n this.remove()\n }\n }\n\n return this\n }\n\n root() {\n let result = this\n while (result.parent && result.parent.type !== 'document') {\n result = result.parent\n }\n return result\n }\n\n toJSON(_, inputs) {\n let fixed = {}\n let emitInputs = inputs == null\n inputs = inputs || new Map()\n let inputsNextIndex = 0\n\n for (let name in this) {\n if (!Object.prototype.hasOwnProperty.call(this, name)) {\n /* c8 ignore next 2 */\n continue\n }\n if (name === 'parent' || name === 'proxyCache') continue\n let value = this[name]\n\n if (Array.isArray(value)) {\n fixed[name] = value.map(i => {\n if (typeof i === 'object' && i.toJSON) {\n return i.toJSON(null, inputs)\n } else {\n return i\n }\n })\n } else if (typeof value === 'object' && value.toJSON) {\n fixed[name] = value.toJSON(null, inputs)\n } else if (name === 'source') {\n let inputId = inputs.get(value.input)\n if (inputId == null) {\n inputId = inputsNextIndex\n inputs.set(value.input, inputsNextIndex)\n inputsNextIndex++\n }\n fixed[name] = {\n end: value.end,\n inputId,\n start: value.start\n }\n } else {\n fixed[name] = value\n }\n }\n\n if (emitInputs) {\n fixed.inputs = [...inputs.keys()].map(input => input.toJSON())\n }\n\n return fixed\n }\n\n toProxy() {\n if (!this.proxyCache) {\n this.proxyCache = new Proxy(this, this.getProxyProcessor())\n }\n return this.proxyCache\n }\n\n toString(stringifier = stringify) {\n if (stringifier.stringify) stringifier = stringifier.stringify\n let result = ''\n stringifier(this, i => {\n result += i\n })\n return result\n }\n\n warn(result, text, opts) {\n let data = { node: this }\n for (let i in opts) data[i] = opts[i]\n return result.warn(text, data)\n }\n\n get proxyOf() {\n return this\n }\n}\n\nmodule.exports = Node\nNode.default = Node\n","'use strict'\n\nlet Container = require('./container')\nlet Input = require('./input')\nlet Parser = require('./parser')\n\nfunction parse(css, opts) {\n let input = new Input(css, opts)\n let parser = new Parser(input)\n try {\n parser.parse()\n } catch (e) {\n if (process.env.NODE_ENV !== 'production') {\n if (e.name === 'CssSyntaxError' && opts && opts.from) {\n if (/\\.scss$/i.test(opts.from)) {\n e.message +=\n '\\nYou tried to parse SCSS with ' +\n 'the standard CSS parser; ' +\n 'try again with the postcss-scss parser'\n } else if (/\\.sass/i.test(opts.from)) {\n e.message +=\n '\\nYou tried to parse Sass with ' +\n 'the standard CSS parser; ' +\n 'try again with the postcss-sass parser'\n } else if (/\\.less$/i.test(opts.from)) {\n e.message +=\n '\\nYou tried to parse Less with ' +\n 'the standard CSS parser; ' +\n 'try again with the postcss-less parser'\n }\n }\n }\n throw e\n }\n\n return parser.root\n}\n\nmodule.exports = parse\nparse.default = parse\n\nContainer.registerParse(parse)\n","'use strict'\n\nlet AtRule = require('./at-rule')\nlet Comment = require('./comment')\nlet Declaration = require('./declaration')\nlet Root = require('./root')\nlet Rule = require('./rule')\nlet tokenizer = require('./tokenize')\n\nconst SAFE_COMMENT_NEIGHBOR = {\n empty: true,\n space: true\n}\n\nfunction findLastWithPosition(tokens) {\n for (let i = tokens.length - 1; i >= 0; i--) {\n let token = tokens[i]\n let pos = token[3] || token[2]\n if (pos) return pos\n }\n}\n\nclass Parser {\n constructor(input) {\n this.input = input\n\n this.root = new Root()\n this.current = this.root\n this.spaces = ''\n this.semicolon = false\n\n this.createTokenizer()\n this.root.source = { input, start: { column: 1, line: 1, offset: 0 } }\n }\n\n atrule(token) {\n let node = new AtRule()\n node.name = token[1].slice(1)\n if (node.name === '') {\n this.unnamedAtrule(node, token)\n }\n this.init(node, token[2])\n\n let type\n let prev\n let shift\n let last = false\n let open = false\n let params = []\n let brackets = []\n\n while (!this.tokenizer.endOfFile()) {\n token = this.tokenizer.nextToken()\n type = token[0]\n\n if (type === '(' || type === '[') {\n brackets.push(type === '(' ? ')' : ']')\n } else if (type === '{' && brackets.length > 0) {\n brackets.push('}')\n } else if (type === brackets[brackets.length - 1]) {\n brackets.pop()\n }\n\n if (brackets.length === 0) {\n if (type === ';') {\n node.source.end = this.getPosition(token[2])\n node.source.end.offset++\n this.semicolon = true\n break\n } else if (type === '{') {\n open = true\n break\n } else if (type === '}') {\n if (params.length > 0) {\n shift = params.length - 1\n prev = params[shift]\n while (prev && prev[0] === 'space') {\n prev = params[--shift]\n }\n if (prev) {\n node.source.end = this.getPosition(prev[3] || prev[2])\n node.source.end.offset++\n }\n }\n this.end(token)\n break\n } else {\n params.push(token)\n }\n } else {\n params.push(token)\n }\n\n if (this.tokenizer.endOfFile()) {\n last = true\n break\n }\n }\n\n node.raws.between = this.spacesAndCommentsFromEnd(params)\n if (params.length) {\n node.raws.afterName = this.spacesAndCommentsFromStart(params)\n this.raw(node, 'params', params)\n if (last) {\n token = params[params.length - 1]\n node.source.end = this.getPosition(token[3] || token[2])\n node.source.end.offset++\n this.spaces = node.raws.between\n node.raws.between = ''\n }\n } else {\n node.raws.afterName = ''\n node.params = ''\n }\n\n if (open) {\n node.nodes = []\n this.current = node\n }\n }\n\n checkMissedSemicolon(tokens) {\n let colon = this.colon(tokens)\n if (colon === false) return\n\n let founded = 0\n let token\n for (let j = colon - 1; j >= 0; j--) {\n token = tokens[j]\n if (token[0] !== 'space') {\n founded += 1\n if (founded === 2) break\n }\n }\n // If the token is a word, e.g. `!important`, `red` or any other valid property's value.\n // Then we need to return the colon after that word token. [3] is the \"end\" colon of that word.\n // And because we need it after that one we do +1 to get the next one.\n throw this.input.error(\n 'Missed semicolon',\n token[0] === 'word' ? token[3] + 1 : token[2]\n )\n }\n\n colon(tokens) {\n let brackets = 0\n let prev, token, type\n for (let [i, element] of tokens.entries()) {\n token = element\n type = token[0]\n\n if (type === '(') {\n brackets += 1\n }\n if (type === ')') {\n brackets -= 1\n }\n if (brackets === 0 && type === ':') {\n if (!prev) {\n this.doubleColon(token)\n } else if (prev[0] === 'word' && prev[1] === 'progid') {\n continue\n } else {\n return i\n }\n }\n\n prev = token\n }\n return false\n }\n\n comment(token) {\n let node = new Comment()\n this.init(node, token[2])\n node.source.end = this.getPosition(token[3] || token[2])\n node.source.end.offset++\n\n let text = token[1].slice(2, -2)\n if (/^\\s*$/.test(text)) {\n node.text = ''\n node.raws.left = text\n node.raws.right = ''\n } else {\n let match = text.match(/^(\\s*)([^]*\\S)(\\s*)$/)\n node.text = match[2]\n node.raws.left = match[1]\n node.raws.right = match[3]\n }\n }\n\n createTokenizer() {\n this.tokenizer = tokenizer(this.input)\n }\n\n decl(tokens, customProperty) {\n let node = new Declaration()\n this.init(node, tokens[0][2])\n\n let last = tokens[tokens.length - 1]\n if (last[0] === ';') {\n this.semicolon = true\n tokens.pop()\n }\n\n node.source.end = this.getPosition(\n last[3] || last[2] || findLastWithPosition(tokens)\n )\n node.source.end.offset++\n\n while (tokens[0][0] !== 'word') {\n if (tokens.length === 1) this.unknownWord(tokens)\n node.raws.before += tokens.shift()[1]\n }\n node.source.start = this.getPosition(tokens[0][2])\n\n node.prop = ''\n while (tokens.length) {\n let type = tokens[0][0]\n if (type === ':' || type === 'space' || type === 'comment') {\n break\n }\n node.prop += tokens.shift()[1]\n }\n\n node.raws.between = ''\n\n let token\n while (tokens.length) {\n token = tokens.shift()\n\n if (token[0] === ':') {\n node.raws.between += token[1]\n break\n } else {\n if (token[0] === 'word' && /\\w/.test(token[1])) {\n this.unknownWord([token])\n }\n node.raws.between += token[1]\n }\n }\n\n if (node.prop[0] === '_' || node.prop[0] === '*') {\n node.raws.before += node.prop[0]\n node.prop = node.prop.slice(1)\n }\n\n let firstSpaces = []\n let next\n while (tokens.length) {\n next = tokens[0][0]\n if (next !== 'space' && next !== 'comment') break\n firstSpaces.push(tokens.shift())\n }\n\n this.precheckMissedSemicolon(tokens)\n\n for (let i = tokens.length - 1; i >= 0; i--) {\n token = tokens[i]\n if (token[1].toLowerCase() === '!important') {\n node.important = true\n let string = this.stringFrom(tokens, i)\n string = this.spacesFromEnd(tokens) + string\n if (string !== ' !important') node.raws.important = string\n break\n } else if (token[1].toLowerCase() === 'important') {\n let cache = tokens.slice(0)\n let str = ''\n for (let j = i; j > 0; j--) {\n let type = cache[j][0]\n if (str.trim().startsWith('!') && type !== 'space') {\n break\n }\n str = cache.pop()[1] + str\n }\n if (str.trim().startsWith('!')) {\n node.important = true\n node.raws.important = str\n tokens = cache\n }\n }\n\n if (token[0] !== 'space' && token[0] !== 'comment') {\n break\n }\n }\n\n let hasWord = tokens.some(i => i[0] !== 'space' && i[0] !== 'comment')\n\n if (hasWord) {\n node.raws.between += firstSpaces.map(i => i[1]).join('')\n firstSpaces = []\n }\n this.raw(node, 'value', firstSpaces.concat(tokens), customProperty)\n\n if (node.value.includes(':') && !customProperty) {\n this.checkMissedSemicolon(tokens)\n }\n }\n\n doubleColon(token) {\n throw this.input.error(\n 'Double colon',\n { offset: token[2] },\n { offset: token[2] + token[1].length }\n )\n }\n\n emptyRule(token) {\n let node = new Rule()\n this.init(node, token[2])\n node.selector = ''\n node.raws.between = ''\n this.current = node\n }\n\n end(token) {\n if (this.current.nodes && this.current.nodes.length) {\n this.current.raws.semicolon = this.semicolon\n }\n this.semicolon = false\n\n this.current.raws.after = (this.current.raws.after || '') + this.spaces\n this.spaces = ''\n\n if (this.current.parent) {\n this.current.source.end = this.getPosition(token[2])\n this.current.source.end.offset++\n this.current = this.current.parent\n } else {\n this.unexpectedClose(token)\n }\n }\n\n endFile() {\n if (this.current.parent) this.unclosedBlock()\n if (this.current.nodes && this.current.nodes.length) {\n this.current.raws.semicolon = this.semicolon\n }\n this.current.raws.after = (this.current.raws.after || '') + this.spaces\n this.root.source.end = this.getPosition(this.tokenizer.position())\n }\n\n freeSemicolon(token) {\n this.spaces += token[1]\n if (this.current.nodes) {\n let prev = this.current.nodes[this.current.nodes.length - 1]\n if (prev && prev.type === 'rule' && !prev.raws.ownSemicolon) {\n prev.raws.ownSemicolon = this.spaces\n this.spaces = ''\n }\n }\n }\n\n // Helpers\n\n getPosition(offset) {\n let pos = this.input.fromOffset(offset)\n return {\n column: pos.col,\n line: pos.line,\n offset\n }\n }\n\n init(node, offset) {\n this.current.push(node)\n node.source = {\n input: this.input,\n start: this.getPosition(offset)\n }\n node.raws.before = this.spaces\n this.spaces = ''\n if (node.type !== 'comment') this.semicolon = false\n }\n\n other(start) {\n let end = false\n let type = null\n let colon = false\n let bracket = null\n let brackets = []\n let customProperty = start[1].startsWith('--')\n\n let tokens = []\n let token = start\n while (token) {\n type = token[0]\n tokens.push(token)\n\n if (type === '(' || type === '[') {\n if (!bracket) bracket = token\n brackets.push(type === '(' ? ')' : ']')\n } else if (customProperty && colon && type === '{') {\n if (!bracket) bracket = token\n brackets.push('}')\n } else if (brackets.length === 0) {\n if (type === ';') {\n if (colon) {\n this.decl(tokens, customProperty)\n return\n } else {\n break\n }\n } else if (type === '{') {\n this.rule(tokens)\n return\n } else if (type === '}') {\n this.tokenizer.back(tokens.pop())\n end = true\n break\n } else if (type === ':') {\n colon = true\n }\n } else if (type === brackets[brackets.length - 1]) {\n brackets.pop()\n if (brackets.length === 0) bracket = null\n }\n\n token = this.tokenizer.nextToken()\n }\n\n if (this.tokenizer.endOfFile()) end = true\n if (brackets.length > 0) this.unclosedBracket(bracket)\n\n if (end && colon) {\n if (!customProperty) {\n while (tokens.length) {\n token = tokens[tokens.length - 1][0]\n if (token !== 'space' && token !== 'comment') break\n this.tokenizer.back(tokens.pop())\n }\n }\n this.decl(tokens, customProperty)\n } else {\n this.unknownWord(tokens)\n }\n }\n\n parse() {\n let token\n while (!this.tokenizer.endOfFile()) {\n token = this.tokenizer.nextToken()\n\n switch (token[0]) {\n case 'space':\n this.spaces += token[1]\n break\n\n case ';':\n this.freeSemicolon(token)\n break\n\n case '}':\n this.end(token)\n break\n\n case 'comment':\n this.comment(token)\n break\n\n case 'at-word':\n this.atrule(token)\n break\n\n case '{':\n this.emptyRule(token)\n break\n\n default:\n this.other(token)\n break\n }\n }\n this.endFile()\n }\n\n precheckMissedSemicolon(/* tokens */) {\n // Hook for Safe Parser\n }\n\n raw(node, prop, tokens, customProperty) {\n let token, type\n let length = tokens.length\n let value = ''\n let clean = true\n let next, prev\n\n for (let i = 0; i < length; i += 1) {\n token = tokens[i]\n type = token[0]\n if (type === 'space' && i === length - 1 && !customProperty) {\n clean = false\n } else if (type === 'comment') {\n prev = tokens[i - 1] ? tokens[i - 1][0] : 'empty'\n next = tokens[i + 1] ? tokens[i + 1][0] : 'empty'\n if (!SAFE_COMMENT_NEIGHBOR[prev] && !SAFE_COMMENT_NEIGHBOR[next]) {\n if (value.slice(-1) === ',') {\n clean = false\n } else {\n value += token[1]\n }\n } else {\n clean = false\n }\n } else {\n value += token[1]\n }\n }\n if (!clean) {\n let raw = tokens.reduce((all, i) => all + i[1], '')\n node.raws[prop] = { raw, value }\n }\n node[prop] = value\n }\n\n rule(tokens) {\n tokens.pop()\n\n let node = new Rule()\n this.init(node, tokens[0][2])\n\n node.raws.between = this.spacesAndCommentsFromEnd(tokens)\n this.raw(node, 'selector', tokens)\n this.current = node\n }\n\n spacesAndCommentsFromEnd(tokens) {\n let lastTokenType\n let spaces = ''\n while (tokens.length) {\n lastTokenType = tokens[tokens.length - 1][0]\n if (lastTokenType !== 'space' && lastTokenType !== 'comment') break\n spaces = tokens.pop()[1] + spaces\n }\n return spaces\n }\n\n // Errors\n\n spacesAndCommentsFromStart(tokens) {\n let next\n let spaces = ''\n while (tokens.length) {\n next = tokens[0][0]\n if (next !== 'space' && next !== 'comment') break\n spaces += tokens.shift()[1]\n }\n return spaces\n }\n\n spacesFromEnd(tokens) {\n let lastTokenType\n let spaces = ''\n while (tokens.length) {\n lastTokenType = tokens[tokens.length - 1][0]\n if (lastTokenType !== 'space') break\n spaces = tokens.pop()[1] + spaces\n }\n return spaces\n }\n\n stringFrom(tokens, from) {\n let result = ''\n for (let i = from; i < tokens.length; i++) {\n result += tokens[i][1]\n }\n tokens.splice(from, tokens.length - from)\n return result\n }\n\n unclosedBlock() {\n let pos = this.current.source.start\n throw this.input.error('Unclosed block', pos.line, pos.column)\n }\n\n unclosedBracket(bracket) {\n throw this.input.error(\n 'Unclosed bracket',\n { offset: bracket[2] },\n { offset: bracket[2] + 1 }\n )\n }\n\n unexpectedClose(token) {\n throw this.input.error(\n 'Unexpected }',\n { offset: token[2] },\n { offset: token[2] + 1 }\n )\n }\n\n unknownWord(tokens) {\n throw this.input.error(\n 'Unknown word',\n { offset: tokens[0][2] },\n { offset: tokens[0][2] + tokens[0][1].length }\n )\n }\n\n unnamedAtrule(node, token) {\n throw this.input.error(\n 'At-rule without name',\n { offset: token[2] },\n { offset: token[2] + token[1].length }\n )\n }\n}\n\nmodule.exports = Parser\n","'use strict'\n\nlet AtRule = require('./at-rule')\nlet Comment = require('./comment')\nlet Container = require('./container')\nlet CssSyntaxError = require('./css-syntax-error')\nlet Declaration = require('./declaration')\nlet Document = require('./document')\nlet fromJSON = require('./fromJSON')\nlet Input = require('./input')\nlet LazyResult = require('./lazy-result')\nlet list = require('./list')\nlet Node = require('./node')\nlet parse = require('./parse')\nlet Processor = require('./processor')\nlet Result = require('./result.js')\nlet Root = require('./root')\nlet Rule = require('./rule')\nlet stringify = require('./stringify')\nlet Warning = require('./warning')\n\nfunction postcss(...plugins) {\n if (plugins.length === 1 && Array.isArray(plugins[0])) {\n plugins = plugins[0]\n }\n return new Processor(plugins)\n}\n\npostcss.plugin = function plugin(name, initializer) {\n let warningPrinted = false\n function creator(...args) {\n // eslint-disable-next-line no-console\n if (console && console.warn && !warningPrinted) {\n warningPrinted = true\n // eslint-disable-next-line no-console\n console.warn(\n name +\n ': postcss.plugin was deprecated. Migration guide:\\n' +\n 'https://evilmartians.com/chronicles/postcss-8-plugin-migration'\n )\n if (process.env.LANG && process.env.LANG.startsWith('cn')) {\n /* c8 ignore next 7 */\n // eslint-disable-next-line no-console\n console.warn(\n name +\n ': 里面 postcss.plugin 被弃用. 迁移指南:\\n' +\n 'https://www.w3ctech.com/topic/2226'\n )\n }\n }\n let transformer = initializer(...args)\n transformer.postcssPlugin = name\n transformer.postcssVersion = new Processor().version\n return transformer\n }\n\n let cache\n Object.defineProperty(creator, 'postcss', {\n get() {\n if (!cache) cache = creator()\n return cache\n }\n })\n\n creator.process = function (css, processOpts, pluginOpts) {\n return postcss([creator(pluginOpts)]).process(css, processOpts)\n }\n\n return creator\n}\n\npostcss.stringify = stringify\npostcss.parse = parse\npostcss.fromJSON = fromJSON\npostcss.list = list\n\npostcss.comment = defaults => new Comment(defaults)\npostcss.atRule = defaults => new AtRule(defaults)\npostcss.decl = defaults => new Declaration(defaults)\npostcss.rule = defaults => new Rule(defaults)\npostcss.root = defaults => new Root(defaults)\npostcss.document = defaults => new Document(defaults)\n\npostcss.CssSyntaxError = CssSyntaxError\npostcss.Declaration = Declaration\npostcss.Container = Container\npostcss.Processor = Processor\npostcss.Document = Document\npostcss.Comment = Comment\npostcss.Warning = Warning\npostcss.AtRule = AtRule\npostcss.Result = Result\npostcss.Input = Input\npostcss.Rule = Rule\npostcss.Root = Root\npostcss.Node = Node\n\nLazyResult.registerPostcss(postcss)\n\nmodule.exports = postcss\npostcss.default = postcss\n","'use strict'\n\nlet { existsSync, readFileSync } = require('fs')\nlet { dirname, join } = require('path')\nlet { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')\n\nfunction fromBase64(str) {\n if (Buffer) {\n return Buffer.from(str, 'base64').toString()\n } else {\n /* c8 ignore next 2 */\n return window.atob(str)\n }\n}\n\nclass PreviousMap {\n constructor(css, opts) {\n if (opts.map === false) return\n this.loadAnnotation(css)\n this.inline = this.startWith(this.annotation, 'data:')\n\n let prev = opts.map ? opts.map.prev : undefined\n let text = this.loadMap(opts.from, prev)\n if (!this.mapFile && opts.from) {\n this.mapFile = opts.from\n }\n if (this.mapFile) this.root = dirname(this.mapFile)\n if (text) this.text = text\n }\n\n consumer() {\n if (!this.consumerCache) {\n this.consumerCache = new SourceMapConsumer(this.text)\n }\n return this.consumerCache\n }\n\n decodeInline(text) {\n let baseCharsetUri = /^data:application\\/json;charset=utf-?8;base64,/\n let baseUri = /^data:application\\/json;base64,/\n let charsetUri = /^data:application\\/json;charset=utf-?8,/\n let uri = /^data:application\\/json,/\n\n let uriMatch = text.match(charsetUri) || text.match(uri)\n if (uriMatch) {\n return decodeURIComponent(text.substr(uriMatch[0].length))\n }\n\n let baseUriMatch = text.match(baseCharsetUri) || text.match(baseUri)\n if (baseUriMatch) {\n return fromBase64(text.substr(baseUriMatch[0].length))\n }\n\n let encoding = text.match(/data:application\\/json;([^,]+),/)[1]\n throw new Error('Unsupported source map encoding ' + encoding)\n }\n\n getAnnotationURL(sourceMapString) {\n return sourceMapString.replace(/^\\/\\*\\s*# sourceMappingURL=/, '').trim()\n }\n\n isMap(map) {\n if (typeof map !== 'object') return false\n return (\n typeof map.mappings === 'string' ||\n typeof map._mappings === 'string' ||\n Array.isArray(map.sections)\n )\n }\n\n loadAnnotation(css) {\n let comments = css.match(/\\/\\*\\s*# sourceMappingURL=/g)\n if (!comments) return\n\n // sourceMappingURLs from comments, strings, etc.\n let start = css.lastIndexOf(comments.pop())\n let end = css.indexOf('*/', start)\n\n if (start > -1 && end > -1) {\n // Locate the last sourceMappingURL to avoid pickin\n this.annotation = this.getAnnotationURL(css.substring(start, end))\n }\n }\n\n loadFile(path) {\n this.root = dirname(path)\n if (existsSync(path)) {\n this.mapFile = path\n return readFileSync(path, 'utf-8').toString().trim()\n }\n }\n\n loadMap(file, prev) {\n if (prev === false) return false\n\n if (prev) {\n if (typeof prev === 'string') {\n return prev\n } else if (typeof prev === 'function') {\n let prevPath = prev(file)\n if (prevPath) {\n let map = this.loadFile(prevPath)\n if (!map) {\n throw new Error(\n 'Unable to load previous source map: ' + prevPath.toString()\n )\n }\n return map\n }\n } else if (prev instanceof SourceMapConsumer) {\n return SourceMapGenerator.fromSourceMap(prev).toString()\n } else if (prev instanceof SourceMapGenerator) {\n return prev.toString()\n } else if (this.isMap(prev)) {\n return JSON.stringify(prev)\n } else {\n throw new Error(\n 'Unsupported previous source map format: ' + prev.toString()\n )\n }\n } else if (this.inline) {\n return this.decodeInline(this.annotation)\n } else if (this.annotation) {\n let map = this.annotation\n if (file) map = join(dirname(file), map)\n return this.loadFile(map)\n }\n }\n\n startWith(string, start) {\n if (!string) return false\n return string.substr(0, start.length) === start\n }\n\n withContent() {\n return !!(\n this.consumer().sourcesContent &&\n this.consumer().sourcesContent.length > 0\n )\n }\n}\n\nmodule.exports = PreviousMap\nPreviousMap.default = PreviousMap\n","'use strict'\n\nlet Document = require('./document')\nlet LazyResult = require('./lazy-result')\nlet NoWorkResult = require('./no-work-result')\nlet Root = require('./root')\n\nclass Processor {\n constructor(plugins = []) {\n this.version = '8.4.49'\n this.plugins = this.normalize(plugins)\n }\n\n normalize(plugins) {\n let normalized = []\n for (let i of plugins) {\n if (i.postcss === true) {\n i = i()\n } else if (i.postcss) {\n i = i.postcss\n }\n\n if (typeof i === 'object' && Array.isArray(i.plugins)) {\n normalized = normalized.concat(i.plugins)\n } else if (typeof i === 'object' && i.postcssPlugin) {\n normalized.push(i)\n } else if (typeof i === 'function') {\n normalized.push(i)\n } else if (typeof i === 'object' && (i.parse || i.stringify)) {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error(\n 'PostCSS syntaxes cannot be used as plugins. Instead, please use ' +\n 'one of the syntax/parser/stringifier options as outlined ' +\n 'in your PostCSS runner documentation.'\n )\n }\n } else {\n throw new Error(i + ' is not a PostCSS plugin')\n }\n }\n return normalized\n }\n\n process(css, opts = {}) {\n if (\n !this.plugins.length &&\n !opts.parser &&\n !opts.stringifier &&\n !opts.syntax\n ) {\n return new NoWorkResult(this, css, opts)\n } else {\n return new LazyResult(this, css, opts)\n }\n }\n\n use(plugin) {\n this.plugins = this.plugins.concat(this.normalize([plugin]))\n return this\n }\n}\n\nmodule.exports = Processor\nProcessor.default = Processor\n\nRoot.registerProcessor(Processor)\nDocument.registerProcessor(Processor)\n","'use strict'\n\nlet Warning = require('./warning')\n\nclass Result {\n constructor(processor, root, opts) {\n this.processor = processor\n this.messages = []\n this.root = root\n this.opts = opts\n this.css = undefined\n this.map = undefined\n }\n\n toString() {\n return this.css\n }\n\n warn(text, opts = {}) {\n if (!opts.plugin) {\n if (this.lastPlugin && this.lastPlugin.postcssPlugin) {\n opts.plugin = this.lastPlugin.postcssPlugin\n }\n }\n\n let warning = new Warning(text, opts)\n this.messages.push(warning)\n\n return warning\n }\n\n warnings() {\n return this.messages.filter(i => i.type === 'warning')\n }\n\n get content() {\n return this.css\n }\n}\n\nmodule.exports = Result\nResult.default = Result\n","'use strict'\n\nlet Container = require('./container')\n\nlet LazyResult, Processor\n\nclass Root extends Container {\n constructor(defaults) {\n super(defaults)\n this.type = 'root'\n if (!this.nodes) this.nodes = []\n }\n\n normalize(child, sample, type) {\n let nodes = super.normalize(child)\n\n if (sample) {\n if (type === 'prepend') {\n if (this.nodes.length > 1) {\n sample.raws.before = this.nodes[1].raws.before\n } else {\n delete sample.raws.before\n }\n } else if (this.first !== sample) {\n for (let node of nodes) {\n node.raws.before = sample.raws.before\n }\n }\n }\n\n return nodes\n }\n\n removeChild(child, ignore) {\n let index = this.index(child)\n\n if (!ignore && index === 0 && this.nodes.length > 1) {\n this.nodes[1].raws.before = this.nodes[index].raws.before\n }\n\n return super.removeChild(child)\n }\n\n toResult(opts = {}) {\n let lazy = new LazyResult(new Processor(), this, opts)\n return lazy.stringify()\n }\n}\n\nRoot.registerLazyResult = dependant => {\n LazyResult = dependant\n}\n\nRoot.registerProcessor = dependant => {\n Processor = dependant\n}\n\nmodule.exports = Root\nRoot.default = Root\n\nContainer.registerRoot(Root)\n","'use strict'\n\nlet Container = require('./container')\nlet list = require('./list')\n\nclass Rule extends Container {\n constructor(defaults) {\n super(defaults)\n this.type = 'rule'\n if (!this.nodes) this.nodes = []\n }\n\n get selectors() {\n return list.comma(this.selector)\n }\n\n set selectors(values) {\n let match = this.selector ? this.selector.match(/,\\s*/) : null\n let sep = match ? match[0] : ',' + this.raw('between', 'beforeOpen')\n this.selector = values.join(sep)\n }\n}\n\nmodule.exports = Rule\nRule.default = Rule\n\nContainer.registerRule(Rule)\n","'use strict'\n\nconst DEFAULT_RAW = {\n after: '\\n',\n beforeClose: '\\n',\n beforeComment: '\\n',\n beforeDecl: '\\n',\n beforeOpen: ' ',\n beforeRule: '\\n',\n colon: ': ',\n commentLeft: ' ',\n commentRight: ' ',\n emptyBody: '',\n indent: ' ',\n semicolon: false\n}\n\nfunction capitalize(str) {\n return str[0].toUpperCase() + str.slice(1)\n}\n\nclass Stringifier {\n constructor(builder) {\n this.builder = builder\n }\n\n atrule(node, semicolon) {\n let name = '@' + node.name\n let params = node.params ? this.rawValue(node, 'params') : ''\n\n if (typeof node.raws.afterName !== 'undefined') {\n name += node.raws.afterName\n } else if (params) {\n name += ' '\n }\n\n if (node.nodes) {\n this.block(node, name + params)\n } else {\n let end = (node.raws.between || '') + (semicolon ? ';' : '')\n this.builder(name + params + end, node)\n }\n }\n\n beforeAfter(node, detect) {\n let value\n if (node.type === 'decl') {\n value = this.raw(node, null, 'beforeDecl')\n } else if (node.type === 'comment') {\n value = this.raw(node, null, 'beforeComment')\n } else if (detect === 'before') {\n value = this.raw(node, null, 'beforeRule')\n } else {\n value = this.raw(node, null, 'beforeClose')\n }\n\n let buf = node.parent\n let depth = 0\n while (buf && buf.type !== 'root') {\n depth += 1\n buf = buf.parent\n }\n\n if (value.includes('\\n')) {\n let indent = this.raw(node, null, 'indent')\n if (indent.length) {\n for (let step = 0; step < depth; step++) value += indent\n }\n }\n\n return value\n }\n\n block(node, start) {\n let between = this.raw(node, 'between', 'beforeOpen')\n this.builder(start + between + '{', node, 'start')\n\n let after\n if (node.nodes && node.nodes.length) {\n this.body(node)\n after = this.raw(node, 'after')\n } else {\n after = this.raw(node, 'after', 'emptyBody')\n }\n\n if (after) this.builder(after)\n this.builder('}', node, 'end')\n }\n\n body(node) {\n let last = node.nodes.length - 1\n while (last > 0) {\n if (node.nodes[last].type !== 'comment') break\n last -= 1\n }\n\n let semicolon = this.raw(node, 'semicolon')\n for (let i = 0; i < node.nodes.length; i++) {\n let child = node.nodes[i]\n let before = this.raw(child, 'before')\n if (before) this.builder(before)\n this.stringify(child, last !== i || semicolon)\n }\n }\n\n comment(node) {\n let left = this.raw(node, 'left', 'commentLeft')\n let right = this.raw(node, 'right', 'commentRight')\n this.builder('/*' + left + node.text + right + '*/', node)\n }\n\n decl(node, semicolon) {\n let between = this.raw(node, 'between', 'colon')\n let string = node.prop + between + this.rawValue(node, 'value')\n\n if (node.important) {\n string += node.raws.important || ' !important'\n }\n\n if (semicolon) string += ';'\n this.builder(string, node)\n }\n\n document(node) {\n this.body(node)\n }\n\n raw(node, own, detect) {\n let value\n if (!detect) detect = own\n\n // Already had\n if (own) {\n value = node.raws[own]\n if (typeof value !== 'undefined') return value\n }\n\n let parent = node.parent\n\n if (detect === 'before') {\n // Hack for first rule in CSS\n if (!parent || (parent.type === 'root' && parent.first === node)) {\n return ''\n }\n\n // `root` nodes in `document` should use only their own raws\n if (parent && parent.type === 'document') {\n return ''\n }\n }\n\n // Floating child without parent\n if (!parent) return DEFAULT_RAW[detect]\n\n // Detect style by other nodes\n let root = node.root()\n if (!root.rawCache) root.rawCache = {}\n if (typeof root.rawCache[detect] !== 'undefined') {\n return root.rawCache[detect]\n }\n\n if (detect === 'before' || detect === 'after') {\n return this.beforeAfter(node, detect)\n } else {\n let method = 'raw' + capitalize(detect)\n if (this[method]) {\n value = this[method](root, node)\n } else {\n root.walk(i => {\n value = i.raws[own]\n if (typeof value !== 'undefined') return false\n })\n }\n }\n\n if (typeof value === 'undefined') value = DEFAULT_RAW[detect]\n\n root.rawCache[detect] = value\n return value\n }\n\n rawBeforeClose(root) {\n let value\n root.walk(i => {\n if (i.nodes && i.nodes.length > 0) {\n if (typeof i.raws.after !== 'undefined') {\n value = i.raws.after\n if (value.includes('\\n')) {\n value = value.replace(/[^\\n]+$/, '')\n }\n return false\n }\n }\n })\n if (value) value = value.replace(/\\S/g, '')\n return value\n }\n\n rawBeforeComment(root, node) {\n let value\n root.walkComments(i => {\n if (typeof i.raws.before !== 'undefined') {\n value = i.raws.before\n if (value.includes('\\n')) {\n value = value.replace(/[^\\n]+$/, '')\n }\n return false\n }\n })\n if (typeof value === 'undefined') {\n value = this.raw(node, null, 'beforeDecl')\n } else if (value) {\n value = value.replace(/\\S/g, '')\n }\n return value\n }\n\n rawBeforeDecl(root, node) {\n let value\n root.walkDecls(i => {\n if (typeof i.raws.before !== 'undefined') {\n value = i.raws.before\n if (value.includes('\\n')) {\n value = value.replace(/[^\\n]+$/, '')\n }\n return false\n }\n })\n if (typeof value === 'undefined') {\n value = this.raw(node, null, 'beforeRule')\n } else if (value) {\n value = value.replace(/\\S/g, '')\n }\n return value\n }\n\n rawBeforeOpen(root) {\n let value\n root.walk(i => {\n if (i.type !== 'decl') {\n value = i.raws.between\n if (typeof value !== 'undefined') return false\n }\n })\n return value\n }\n\n rawBeforeRule(root) {\n let value\n root.walk(i => {\n if (i.nodes && (i.parent !== root || root.first !== i)) {\n if (typeof i.raws.before !== 'undefined') {\n value = i.raws.before\n if (value.includes('\\n')) {\n value = value.replace(/[^\\n]+$/, '')\n }\n return false\n }\n }\n })\n if (value) value = value.replace(/\\S/g, '')\n return value\n }\n\n rawColon(root) {\n let value\n root.walkDecls(i => {\n if (typeof i.raws.between !== 'undefined') {\n value = i.raws.between.replace(/[^\\s:]/g, '')\n return false\n }\n })\n return value\n }\n\n rawEmptyBody(root) {\n let value\n root.walk(i => {\n if (i.nodes && i.nodes.length === 0) {\n value = i.raws.after\n if (typeof value !== 'undefined') return false\n }\n })\n return value\n }\n\n rawIndent(root) {\n if (root.raws.indent) return root.raws.indent\n let value\n root.walk(i => {\n let p = i.parent\n if (p && p !== root && p.parent && p.parent === root) {\n if (typeof i.raws.before !== 'undefined') {\n let parts = i.raws.before.split('\\n')\n value = parts[parts.length - 1]\n value = value.replace(/\\S/g, '')\n return false\n }\n }\n })\n return value\n }\n\n rawSemicolon(root) {\n let value\n root.walk(i => {\n if (i.nodes && i.nodes.length && i.last.type === 'decl') {\n value = i.raws.semicolon\n if (typeof value !== 'undefined') return false\n }\n })\n return value\n }\n\n rawValue(node, prop) {\n let value = node[prop]\n let raw = node.raws[prop]\n if (raw && raw.value === value) {\n return raw.raw\n }\n\n return value\n }\n\n root(node) {\n this.body(node)\n if (node.raws.after) this.builder(node.raws.after)\n }\n\n rule(node) {\n this.block(node, this.rawValue(node, 'selector'))\n if (node.raws.ownSemicolon) {\n this.builder(node.raws.ownSemicolon, node, 'end')\n }\n }\n\n stringify(node, semicolon) {\n /* c8 ignore start */\n if (!this[node.type]) {\n throw new Error(\n 'Unknown AST node type ' +\n node.type +\n '. ' +\n 'Maybe you need to change PostCSS stringifier.'\n )\n }\n /* c8 ignore stop */\n this[node.type](node, semicolon)\n }\n}\n\nmodule.exports = Stringifier\nStringifier.default = Stringifier\n","'use strict'\n\nlet Stringifier = require('./stringifier')\n\nfunction stringify(node, builder) {\n let str = new Stringifier(builder)\n str.stringify(node)\n}\n\nmodule.exports = stringify\nstringify.default = stringify\n","'use strict'\n\nmodule.exports.isClean = Symbol('isClean')\n\nmodule.exports.my = Symbol('my')\n","'use strict'\n\nconst SINGLE_QUOTE = \"'\".charCodeAt(0)\nconst DOUBLE_QUOTE = '\"'.charCodeAt(0)\nconst BACKSLASH = '\\\\'.charCodeAt(0)\nconst SLASH = '/'.charCodeAt(0)\nconst NEWLINE = '\\n'.charCodeAt(0)\nconst SPACE = ' '.charCodeAt(0)\nconst FEED = '\\f'.charCodeAt(0)\nconst TAB = '\\t'.charCodeAt(0)\nconst CR = '\\r'.charCodeAt(0)\nconst OPEN_SQUARE = '['.charCodeAt(0)\nconst CLOSE_SQUARE = ']'.charCodeAt(0)\nconst OPEN_PARENTHESES = '('.charCodeAt(0)\nconst CLOSE_PARENTHESES = ')'.charCodeAt(0)\nconst OPEN_CURLY = '{'.charCodeAt(0)\nconst CLOSE_CURLY = '}'.charCodeAt(0)\nconst SEMICOLON = ';'.charCodeAt(0)\nconst ASTERISK = '*'.charCodeAt(0)\nconst COLON = ':'.charCodeAt(0)\nconst AT = '@'.charCodeAt(0)\n\nconst RE_AT_END = /[\\t\\n\\f\\r \"#'()/;[\\\\\\]{}]/g\nconst RE_WORD_END = /[\\t\\n\\f\\r !\"#'():;@[\\\\\\]{}]|\\/(?=\\*)/g\nconst RE_BAD_BRACKET = /.[\\r\\n\"'(/\\\\]/\nconst RE_HEX_ESCAPE = /[\\da-f]/i\n\nmodule.exports = function tokenizer(input, options = {}) {\n let css = input.css.valueOf()\n let ignore = options.ignoreErrors\n\n let code, content, escape, next, quote\n let currentToken, escaped, escapePos, n, prev\n\n let length = css.length\n let pos = 0\n let buffer = []\n let returned = []\n\n function position() {\n return pos\n }\n\n function unclosed(what) {\n throw input.error('Unclosed ' + what, pos)\n }\n\n function endOfFile() {\n return returned.length === 0 && pos >= length\n }\n\n function nextToken(opts) {\n if (returned.length) return returned.pop()\n if (pos >= length) return\n\n let ignoreUnclosed = opts ? opts.ignoreUnclosed : false\n\n code = css.charCodeAt(pos)\n\n switch (code) {\n case NEWLINE:\n case SPACE:\n case TAB:\n case CR:\n case FEED: {\n next = pos\n do {\n next += 1\n code = css.charCodeAt(next)\n } while (\n code === SPACE ||\n code === NEWLINE ||\n code === TAB ||\n code === CR ||\n code === FEED\n )\n\n currentToken = ['space', css.slice(pos, next)]\n pos = next - 1\n break\n }\n\n case OPEN_SQUARE:\n case CLOSE_SQUARE:\n case OPEN_CURLY:\n case CLOSE_CURLY:\n case COLON:\n case SEMICOLON:\n case CLOSE_PARENTHESES: {\n let controlChar = String.fromCharCode(code)\n currentToken = [controlChar, controlChar, pos]\n break\n }\n\n case OPEN_PARENTHESES: {\n prev = buffer.length ? buffer.pop()[1] : ''\n n = css.charCodeAt(pos + 1)\n if (\n prev === 'url' &&\n n !== SINGLE_QUOTE &&\n n !== DOUBLE_QUOTE &&\n n !== SPACE &&\n n !== NEWLINE &&\n n !== TAB &&\n n !== FEED &&\n n !== CR\n ) {\n next = pos\n do {\n escaped = false\n next = css.indexOf(')', next + 1)\n if (next === -1) {\n if (ignore || ignoreUnclosed) {\n next = pos\n break\n } else {\n unclosed('bracket')\n }\n }\n escapePos = next\n while (css.charCodeAt(escapePos - 1) === BACKSLASH) {\n escapePos -= 1\n escaped = !escaped\n }\n } while (escaped)\n\n currentToken = ['brackets', css.slice(pos, next + 1), pos, next]\n\n pos = next\n } else {\n next = css.indexOf(')', pos + 1)\n content = css.slice(pos, next + 1)\n\n if (next === -1 || RE_BAD_BRACKET.test(content)) {\n currentToken = ['(', '(', pos]\n } else {\n currentToken = ['brackets', content, pos, next]\n pos = next\n }\n }\n\n break\n }\n\n case SINGLE_QUOTE:\n case DOUBLE_QUOTE: {\n quote = code === SINGLE_QUOTE ? \"'\" : '\"'\n next = pos\n do {\n escaped = false\n next = css.indexOf(quote, next + 1)\n if (next === -1) {\n if (ignore || ignoreUnclosed) {\n next = pos + 1\n break\n } else {\n unclosed('string')\n }\n }\n escapePos = next\n while (css.charCodeAt(escapePos - 1) === BACKSLASH) {\n escapePos -= 1\n escaped = !escaped\n }\n } while (escaped)\n\n currentToken = ['string', css.slice(pos, next + 1), pos, next]\n pos = next\n break\n }\n\n case AT: {\n RE_AT_END.lastIndex = pos + 1\n RE_AT_END.test(css)\n if (RE_AT_END.lastIndex === 0) {\n next = css.length - 1\n } else {\n next = RE_AT_END.lastIndex - 2\n }\n\n currentToken = ['at-word', css.slice(pos, next + 1), pos, next]\n\n pos = next\n break\n }\n\n case BACKSLASH: {\n next = pos\n escape = true\n while (css.charCodeAt(next + 1) === BACKSLASH) {\n next += 1\n escape = !escape\n }\n code = css.charCodeAt(next + 1)\n if (\n escape &&\n code !== SLASH &&\n code !== SPACE &&\n code !== NEWLINE &&\n code !== TAB &&\n code !== CR &&\n code !== FEED\n ) {\n next += 1\n if (RE_HEX_ESCAPE.test(css.charAt(next))) {\n while (RE_HEX_ESCAPE.test(css.charAt(next + 1))) {\n next += 1\n }\n if (css.charCodeAt(next + 1) === SPACE) {\n next += 1\n }\n }\n }\n\n currentToken = ['word', css.slice(pos, next + 1), pos, next]\n\n pos = next\n break\n }\n\n default: {\n if (code === SLASH && css.charCodeAt(pos + 1) === ASTERISK) {\n next = css.indexOf('*/', pos + 2) + 1\n if (next === 0) {\n if (ignore || ignoreUnclosed) {\n next = css.length\n } else {\n unclosed('comment')\n }\n }\n\n currentToken = ['comment', css.slice(pos, next + 1), pos, next]\n pos = next\n } else {\n RE_WORD_END.lastIndex = pos + 1\n RE_WORD_END.test(css)\n if (RE_WORD_END.lastIndex === 0) {\n next = css.length - 1\n } else {\n next = RE_WORD_END.lastIndex - 2\n }\n\n currentToken = ['word', css.slice(pos, next + 1), pos, next]\n buffer.push(currentToken)\n pos = next\n }\n\n break\n }\n }\n\n pos++\n return currentToken\n }\n\n function back(token) {\n returned.push(token)\n }\n\n return {\n back,\n endOfFile,\n nextToken,\n position\n }\n}\n","/* eslint-disable no-console */\n'use strict'\n\nlet printed = {}\n\nmodule.exports = function warnOnce(message) {\n if (printed[message]) return\n printed[message] = true\n\n if (typeof console !== 'undefined' && console.warn) {\n console.warn(message)\n }\n}\n","'use strict'\n\nclass Warning {\n constructor(text, opts = {}) {\n this.type = 'warning'\n this.text = text\n\n if (opts.node && opts.node.source) {\n let range = opts.node.rangeBy(opts)\n this.line = range.start.line\n this.column = range.start.column\n this.endLine = range.end.line\n this.endColumn = range.end.column\n }\n\n for (let opt in opts) this[opt] = opts[opt]\n }\n\n toString() {\n if (this.node) {\n return this.node.error(this.text, {\n index: this.index,\n plugin: this.plugin,\n word: this.word\n }).message\n }\n\n if (this.plugin) {\n return this.plugin + ': ' + this.text\n }\n\n return this.text\n }\n}\n\nmodule.exports = Warning\nWarning.default = Warning\n","var textarea;\n\nfunction decodeEntity(name) {\n textarea = textarea || document.createElement('textarea');\n textarea.innerHTML = '&' + name;\n return textarea.value;\n}\n\n/**\n * Utility functions\n */\n\nfunction typeOf(obj) {\n return Object.prototype.toString.call(obj);\n}\n\nfunction isString(obj) {\n return typeOf(obj) === '[object String]';\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty;\n\nfunction has(object, key) {\n return object\n ? hasOwn.call(object, key)\n : false;\n}\n\n// Extend objects\n//\nfunction assign(obj /*from1, from2, from3, ...*/) {\n var sources = [].slice.call(arguments, 1);\n\n sources.forEach(function (source) {\n if (!source) { return; }\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\n return obj;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\nvar UNESCAPE_MD_RE = /\\\\([\\\\!\"#$%&'()*+,.\\/:;<=>?@[\\]^_`{|}~-])/g;\n\nfunction unescapeMd(str) {\n if (str.indexOf('\\\\') < 0) { return str; }\n return str.replace(UNESCAPE_MD_RE, '$1');\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\nfunction isValidEntityCode(c) {\n /*eslint no-bitwise:0*/\n // broken sequence\n if (c >= 0xD800 && c <= 0xDFFF) { return false; }\n // never used\n if (c >= 0xFDD0 && c <= 0xFDEF) { return false; }\n if ((c & 0xFFFF) === 0xFFFF || (c & 0xFFFF) === 0xFFFE) { return false; }\n // control codes\n if (c >= 0x00 && c <= 0x08) { return false; }\n if (c === 0x0B) { return false; }\n if (c >= 0x0E && c <= 0x1F) { return false; }\n if (c >= 0x7F && c <= 0x9F) { return false; }\n // out of range\n if (c > 0x10FFFF) { return false; }\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\n return String.fromCharCode(surrogate1, surrogate2);\n }\n return String.fromCharCode(c);\n}\n\nvar NAMED_ENTITY_RE = /&([a-z#][a-z0-9]{1,31});/gi;\nvar DIGITAL_ENTITY_TEST_RE = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i;\n\nfunction replaceEntityPattern(match, name) {\n var code = 0;\n var decoded = decodeEntity(name);\n\n if (name !== decoded) {\n return decoded;\n } else if (name.charCodeAt(0) === 0x23/* # */ && DIGITAL_ENTITY_TEST_RE.test(name)) {\n code = name[1].toLowerCase() === 'x' ?\n parseInt(name.slice(2), 16)\n :\n parseInt(name.slice(1), 10);\n if (isValidEntityCode(code)) {\n return fromCodePoint(code);\n }\n }\n return match;\n}\n\nfunction replaceEntities(str) {\n if (str.indexOf('&') < 0) { return str; }\n\n return str.replace(NAMED_ENTITY_RE, replaceEntityPattern);\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 return str;\n}\n\nvar utils = /*#__PURE__*/Object.freeze({\n isString: isString,\n has: has,\n assign: assign,\n unescapeMd: unescapeMd,\n isValidEntityCode: isValidEntityCode,\n fromCodePoint: fromCodePoint,\n replaceEntities: replaceEntities,\n escapeHtml: escapeHtml\n});\n\n/**\n * Renderer rules cache\n */\n\nvar rules = {};\n\n/**\n * Blockquotes\n */\n\nrules.blockquote_open = function(/* tokens, idx, options, env */) {\n return '
\\n';\n};\n\nrules.blockquote_close = function(tokens, idx /*, options, env */) {\n return '
' + getBreak(tokens, idx);\n};\n\n/**\n * Code\n */\n\nrules.code = function(tokens, idx /*, options, env */) {\n if (tokens[idx].block) {\n return '
' + escapeHtml(tokens[idx].content) + '
' + getBreak(tokens, idx);\n }\n return '' + escapeHtml(tokens[idx].content) + '';\n};\n\n/**\n * Fenced code blocks\n */\n\nrules.fence = function(tokens, idx, options, env, instance) {\n var token = tokens[idx];\n var langClass = '';\n var langPrefix = options.langPrefix;\n var langName = '', fences, fenceName;\n var highlighted;\n\n if (token.params) {\n\n //\n // ```foo bar\n //\n // Try custom renderer \"foo\" first. That will simplify overwrite\n // for diagrams, latex, and any other fenced block with custom look\n //\n\n fences = token.params.split(/\\s+/g);\n fenceName = fences.join(' ');\n\n if (has(instance.rules.fence_custom, fences[0])) {\n return instance.rules.fence_custom[fences[0]](tokens, idx, options, env, instance);\n }\n\n langName = escapeHtml(replaceEntities(unescapeMd(fenceName)));\n langClass = ' class=\"' + langPrefix + langName + '\"';\n }\n\n if (options.highlight) {\n highlighted = options.highlight.apply(options.highlight, [ token.content ].concat(fences))\n || escapeHtml(token.content);\n } else {\n highlighted = escapeHtml(token.content);\n }\n\n return '
'\n        + highlighted\n        + '
'\n + getBreak(tokens, idx);\n};\n\nrules.fence_custom = {};\n\n/**\n * Headings\n */\n\nrules.heading_open = function(tokens, idx /*, options, env */) {\n return '';\n};\nrules.heading_close = function(tokens, idx /*, options, env */) {\n return '\\n';\n};\n\n/**\n * Horizontal rules\n */\n\nrules.hr = function(tokens, idx, options /*, env */) {\n return (options.xhtmlOut ? '
' : '
') + getBreak(tokens, idx);\n};\n\n/**\n * Bullets\n */\n\nrules.bullet_list_open = function(/* tokens, idx, options, env */) {\n return '
    \\n';\n};\nrules.bullet_list_close = function(tokens, idx /*, options, env */) {\n return '
' + getBreak(tokens, idx);\n};\n\n/**\n * List items\n */\n\nrules.list_item_open = function(/* tokens, idx, options, env */) {\n return '
  • ';\n};\nrules.list_item_close = function(/* tokens, idx, options, env */) {\n return '
  • \\n';\n};\n\n/**\n * Ordered list items\n */\n\nrules.ordered_list_open = function(tokens, idx /*, options, env */) {\n var token = tokens[idx];\n var order = token.order > 1 ? ' start=\"' + token.order + '\"' : '';\n return '\\n';\n};\nrules.ordered_list_close = function(tokens, idx /*, options, env */) {\n return '' + getBreak(tokens, idx);\n};\n\n/**\n * Paragraphs\n */\n\nrules.paragraph_open = function(tokens, idx /*, options, env */) {\n return tokens[idx].tight ? '' : '

    ';\n};\nrules.paragraph_close = function(tokens, idx /*, options, env */) {\n var addBreak = !(tokens[idx].tight && idx && tokens[idx - 1].type === 'inline' && !tokens[idx - 1].content);\n return (tokens[idx].tight ? '' : '

    ') + (addBreak ? getBreak(tokens, idx) : '');\n};\n\n/**\n * Links\n */\n\nrules.link_open = function(tokens, idx, options /* env */) {\n var title = tokens[idx].title ? (' title=\"' + escapeHtml(replaceEntities(tokens[idx].title)) + '\"') : '';\n var target = options.linkTarget ? (' target=\"' + options.linkTarget + '\"') : '';\n return '';\n};\nrules.link_close = function(/* tokens, idx, options, env */) {\n return '';\n};\n\n/**\n * Images\n */\n\nrules.image = function(tokens, idx, options /*, env */) {\n var src = ' src=\"' + escapeHtml(tokens[idx].src) + '\"';\n var title = tokens[idx].title ? (' title=\"' + escapeHtml(replaceEntities(tokens[idx].title)) + '\"') : '';\n var alt = ' alt=\"' + (tokens[idx].alt ? escapeHtml(replaceEntities(unescapeMd(tokens[idx].alt))) : '') + '\"';\n var suffix = options.xhtmlOut ? ' /' : '';\n return '';\n};\n\n/**\n * Tables\n */\n\nrules.table_open = function(/* tokens, idx, options, env */) {\n return '\\n';\n};\nrules.table_close = function(/* tokens, idx, options, env */) {\n return '
    \\n';\n};\nrules.thead_open = function(/* tokens, idx, options, env */) {\n return '\\n';\n};\nrules.thead_close = function(/* tokens, idx, options, env */) {\n return '\\n';\n};\nrules.tbody_open = function(/* tokens, idx, options, env */) {\n return '\\n';\n};\nrules.tbody_close = function(/* tokens, idx, options, env */) {\n return '\\n';\n};\nrules.tr_open = function(/* tokens, idx, options, env */) {\n return '';\n};\nrules.tr_close = function(/* tokens, idx, options, env */) {\n return '\\n';\n};\nrules.th_open = function(tokens, idx /*, options, env */) {\n var token = tokens[idx];\n return '';\n};\nrules.th_close = function(/* tokens, idx, options, env */) {\n return '';\n};\nrules.td_open = function(tokens, idx /*, options, env */) {\n var token = tokens[idx];\n return '';\n};\nrules.td_close = function(/* tokens, idx, options, env */) {\n return '';\n};\n\n/**\n * Bold\n */\n\nrules.strong_open = function(/* tokens, idx, options, env */) {\n return '';\n};\nrules.strong_close = function(/* tokens, idx, options, env */) {\n return '';\n};\n\n/**\n * Italicize\n */\n\nrules.em_open = function(/* tokens, idx, options, env */) {\n return '';\n};\nrules.em_close = function(/* tokens, idx, options, env */) {\n return '';\n};\n\n/**\n * Strikethrough\n */\n\nrules.del_open = function(/* tokens, idx, options, env */) {\n return '';\n};\nrules.del_close = function(/* tokens, idx, options, env */) {\n return '';\n};\n\n/**\n * Insert\n */\n\nrules.ins_open = function(/* tokens, idx, options, env */) {\n return '';\n};\nrules.ins_close = function(/* tokens, idx, options, env */) {\n return '';\n};\n\n/**\n * Highlight\n */\n\nrules.mark_open = function(/* tokens, idx, options, env */) {\n return '';\n};\nrules.mark_close = function(/* tokens, idx, options, env */) {\n return '';\n};\n\n/**\n * Super- and sub-script\n */\n\nrules.sub = function(tokens, idx /*, options, env */) {\n return '' + escapeHtml(tokens[idx].content) + '';\n};\nrules.sup = function(tokens, idx /*, options, env */) {\n return '' + escapeHtml(tokens[idx].content) + '';\n};\n\n/**\n * Breaks\n */\n\nrules.hardbreak = function(tokens, idx, options /*, env */) {\n return options.xhtmlOut ? '
    \\n' : '
    \\n';\n};\nrules.softbreak = function(tokens, idx, options /*, env */) {\n return options.breaks ? (options.xhtmlOut ? '
    \\n' : '
    \\n') : '\\n';\n};\n\n/**\n * Text\n */\n\nrules.text = function(tokens, idx /*, options, env */) {\n return escapeHtml(tokens[idx].content);\n};\n\n/**\n * Content\n */\n\nrules.htmlblock = function(tokens, idx /*, options, env */) {\n return tokens[idx].content;\n};\nrules.htmltag = function(tokens, idx /*, options, env */) {\n return tokens[idx].content;\n};\n\n/**\n * Abbreviations, initialism\n */\n\nrules.abbr_open = function(tokens, idx /*, options, env */) {\n return '';\n};\nrules.abbr_close = function(/* tokens, idx, options, env */) {\n return '';\n};\n\n/**\n * Footnotes\n */\n\nrules.footnote_ref = function(tokens, idx) {\n var n = Number(tokens[idx].id + 1).toString();\n var id = 'fnref' + n;\n if (tokens[idx].subId > 0) {\n id += ':' + tokens[idx].subId;\n }\n return '[' + n + ']';\n};\nrules.footnote_block_open = function(tokens, idx, options) {\n var hr = options.xhtmlOut\n ? '
    \\n'\n : '
    \\n';\n return hr + '
    \\n
      \\n';\n};\nrules.footnote_block_close = function() {\n return '
    \\n
    \\n';\n};\nrules.footnote_open = function(tokens, idx) {\n var id = Number(tokens[idx].id + 1).toString();\n return '
  • ';\n};\nrules.footnote_close = function() {\n return '
  • \\n';\n};\nrules.footnote_anchor = function(tokens, idx) {\n var n = Number(tokens[idx].id + 1).toString();\n var id = 'fnref' + n;\n if (tokens[idx].subId > 0) {\n id += ':' + tokens[idx].subId;\n }\n return ' ';\n};\n\n/**\n * Definition lists\n */\n\nrules.dl_open = function() {\n return '
    \\n';\n};\nrules.dt_open = function() {\n return '
    ';\n};\nrules.dd_open = function() {\n return '
    ';\n};\nrules.dl_close = function() {\n return '
    \\n';\n};\nrules.dt_close = function() {\n return '\\n';\n};\nrules.dd_close = function() {\n return '\\n';\n};\n\n/**\n * Helper functions\n */\n\nfunction nextToken(tokens, idx) {\n if (++idx >= tokens.length - 2) {\n return idx;\n }\n if ((tokens[idx].type === 'paragraph_open' && tokens[idx].tight) &&\n (tokens[idx + 1].type === 'inline' && tokens[idx + 1].content.length === 0) &&\n (tokens[idx + 2].type === 'paragraph_close' && tokens[idx + 2].tight)) {\n return nextToken(tokens, idx + 2);\n }\n return idx;\n}\n\n/**\n * Check to see if `\\n` is needed before the next token.\n *\n * @param {Array} `tokens`\n * @param {Number} `idx`\n * @return {String} Empty string or newline\n * @api private\n */\n\nvar getBreak = rules.getBreak = function getBreak(tokens, idx) {\n idx = nextToken(tokens, idx);\n if (idx < tokens.length && tokens[idx].type === 'list_item_close') {\n return '';\n }\n return '\\n';\n};\n\n/**\n * Renderer class. Renders HTML and exposes `rules` to allow\n * local modifications.\n */\n\nfunction Renderer() {\n this.rules = assign({}, rules);\n\n // exported helper, for custom rules only\n this.getBreak = rules.getBreak;\n}\n\n/**\n * Render a string of inline HTML with the given `tokens` and\n * `options`.\n *\n * @param {Array} `tokens`\n * @param {Object} `options`\n * @param {Object} `env`\n * @return {String}\n * @api public\n */\n\nRenderer.prototype.renderInline = function (tokens, options, env) {\n var _rules = this.rules;\n var len = tokens.length, i = 0;\n var result = '';\n\n while (len--) {\n result += _rules[tokens[i].type](tokens, i++, options, env, this);\n }\n\n return result;\n};\n\n/**\n * Render a string of HTML with the given `tokens` and\n * `options`.\n *\n * @param {Array} `tokens`\n * @param {Object} `options`\n * @param {Object} `env`\n * @return {String}\n * @api public\n */\n\nRenderer.prototype.render = function (tokens, options, env) {\n var _rules = this.rules;\n var len = tokens.length, i = -1;\n var result = '';\n\n while (++i < len) {\n if (tokens[i].type === 'inline') {\n result += this.renderInline(tokens[i].children, options, env);\n } else {\n result += _rules[tokens[i].type](tokens, i, options, env, this);\n }\n }\n return result;\n};\n\n/**\n * Ruler is a helper class for building responsibility chains from\n * parse rules. It allows:\n *\n * - easy stack rules chains\n * - getting main chain and named chains content (as arrays of functions)\n *\n * Helper methods, should not be used directly.\n * @api private\n */\n\nfunction Ruler() {\n // List of added rules. Each element is:\n //\n // { name: XXX,\n // enabled: Boolean,\n // fn: Function(),\n // alt: [ name2, name3 ] }\n //\n this.__rules__ = [];\n\n // Cached rule chains.\n //\n // First level - chain name, '' for default.\n // Second level - digital anchor for fast filtering by charcodes.\n //\n this.__cache__ = null;\n}\n\n/**\n * Find the index of a rule by `name`.\n *\n * @param {String} `name`\n * @return {Number} Index of the given `name`\n * @api private\n */\n\nRuler.prototype.__find__ = function (name) {\n var len = this.__rules__.length;\n var i = -1;\n\n while (len--) {\n if (this.__rules__[++i].name === name) {\n return i;\n }\n }\n return -1;\n};\n\n/**\n * Build the rules lookup cache\n *\n * @api private\n */\n\nRuler.prototype.__compile__ = function () {\n var self = this;\n var chains = [ '' ];\n\n // collect unique names\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\n chains.forEach(function (chain) {\n self.__cache__[chain] = [];\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 self.__cache__[chain].push(rule.fn);\n });\n });\n};\n\n/**\n * Ruler public methods\n * ------------------------------------------------\n */\n\n/**\n * Replace rule function\n *\n * @param {String} `name` Rule name\n * @param {Function `fn`\n * @param {Object} `options`\n * @api private\n */\n\nRuler.prototype.at = function (name, fn, options) {\n var idx = this.__find__(name);\n var opt = options || {};\n\n if (idx === -1) {\n throw new Error('Parser rule not found: ' + name);\n }\n\n this.__rules__[idx].fn = fn;\n this.__rules__[idx].alt = opt.alt || [];\n this.__cache__ = null;\n};\n\n/**\n * Add a rule to the chain before given the `ruleName`.\n *\n * @param {String} `beforeName`\n * @param {String} `ruleName`\n * @param {Function} `fn`\n * @param {Object} `options`\n * @api private\n */\n\nRuler.prototype.before = function (beforeName, ruleName, fn, options) {\n var idx = this.__find__(beforeName);\n var opt = options || {};\n\n if (idx === -1) {\n throw new Error('Parser rule not found: ' + beforeName);\n }\n\n this.__rules__.splice(idx, 0, {\n name: ruleName,\n enabled: true,\n fn: fn,\n alt: opt.alt || []\n });\n\n this.__cache__ = null;\n};\n\n/**\n * Add a rule to the chain after the given `ruleName`.\n *\n * @param {String} `afterName`\n * @param {String} `ruleName`\n * @param {Function} `fn`\n * @param {Object} `options`\n * @api private\n */\n\nRuler.prototype.after = function (afterName, ruleName, fn, options) {\n var idx = this.__find__(afterName);\n var opt = options || {};\n\n if (idx === -1) {\n throw new Error('Parser rule not found: ' + afterName);\n }\n\n this.__rules__.splice(idx + 1, 0, {\n name: ruleName,\n enabled: true,\n fn: fn,\n alt: opt.alt || []\n });\n\n this.__cache__ = null;\n};\n\n/**\n * Add a rule to the end of chain.\n *\n * @param {String} `ruleName`\n * @param {Function} `fn`\n * @param {Object} `options`\n * @return {String}\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/**\n * Enable a rule or list of rules.\n *\n * @param {String|Array} `list` Name or array of rule names to enable\n * @param {Boolean} `strict` If `true`, all non listed rules will be disabled.\n * @api private\n */\n\nRuler.prototype.enable = function (list, strict) {\n list = !Array.isArray(list)\n ? [ list ]\n : list;\n\n // In strict mode disable all existing rules first\n if (strict) {\n this.__rules__.forEach(function (rule) {\n rule.enabled = false;\n });\n }\n\n // Search by name and enable\n list.forEach(function (name) {\n var idx = this.__find__(name);\n if (idx < 0) {\n throw new Error('Rules manager: invalid rule name ' + name);\n }\n this.__rules__[idx].enabled = true;\n }, this);\n\n this.__cache__ = null;\n};\n\n\n/**\n * Disable a rule or list of rules.\n *\n * @param {String|Array} `list` Name or array of rule names to disable\n * @api private\n */\n\nRuler.prototype.disable = function (list) {\n list = !Array.isArray(list)\n ? [ list ]\n : list;\n\n // Search by name and disable\n list.forEach(function (name) {\n var idx = this.__find__(name);\n if (idx < 0) {\n throw new Error('Rules manager: invalid rule name ' + name);\n }\n this.__rules__[idx].enabled = false;\n }, this);\n\n this.__cache__ = null;\n};\n\n/**\n * Get a rules list as an array of functions.\n *\n * @param {String} `chainName`\n * @return {Object}\n * @api private\n */\n\nRuler.prototype.getRules = function (chainName) {\n if (this.__cache__ === null) {\n this.__compile__();\n }\n return this.__cache__[chainName] || [];\n};\n\nfunction block(state) {\n\n if (state.inlineMode) {\n state.tokens.push({\n type: 'inline',\n content: state.src.replace(/\\n/g, ' ').trim(),\n level: 0,\n lines: [ 0, 1 ],\n children: []\n });\n\n } else {\n state.block.parse(state.src, state.options, state.env, state.tokens);\n }\n}\n\n// Inline parser state\n\nfunction StateInline(src, parserInline, options, env, outTokens) {\n this.src = src;\n this.env = env;\n this.options = options;\n this.parser = parserInline;\n this.tokens = outTokens;\n this.pos = 0;\n this.posMax = this.src.length;\n this.level = 0;\n this.pending = '';\n this.pendingLevel = 0;\n\n this.cache = []; // Stores { start: end } pairs. Useful for backtrack\n // optimization of pairs parse (emphasis, strikes).\n\n // Link parser state vars\n\n this.isInLabel = false; // Set true when seek link label - we should disable\n // \"paired\" rules (emphasis, strikes) to not skip\n // tailing `]`\n\n this.linkLevel = 0; // Increment for each nesting link. Used to prevent\n // nesting in definitions\n\n this.linkContent = ''; // Temporary storage for link url\n\n this.labelUnmatchedScopes = 0; // Track unpaired `[` for link labels\n // (backtrack optimization)\n}\n\n// Flush pending text\n//\nStateInline.prototype.pushPending = function () {\n this.tokens.push({\n type: 'text',\n content: this.pending,\n level: this.pendingLevel\n });\n this.pending = '';\n};\n\n// Push new token to \"stream\".\n// If pending text exists - flush it as text token\n//\nStateInline.prototype.push = function (token) {\n if (this.pending) {\n this.pushPending();\n }\n\n this.tokens.push(token);\n this.pendingLevel = this.level;\n};\n\n// Store value to cache.\n// !!! Implementation has parser-specific optimizations\n// !!! keys MUST be integer, >= 0; values MUST be integer, > 0\n//\nStateInline.prototype.cacheSet = function (key, val) {\n for (var i = this.cache.length; i <= key; i++) {\n this.cache.push(0);\n }\n\n this.cache[key] = val;\n};\n\n// Get cache value\n//\nStateInline.prototype.cacheGet = function (key) {\n return key < this.cache.length ? this.cache[key] : 0;\n};\n\n/**\n * Parse link labels\n *\n * This function assumes that first character (`[`) already matches;\n * returns the end of the label.\n *\n * @param {Object} state\n * @param {Number} start\n * @api private\n */\n\nfunction parseLinkLabel(state, start) {\n var level, found, marker,\n labelEnd = -1,\n max = state.posMax,\n oldPos = state.pos,\n oldFlag = state.isInLabel;\n\n if (state.isInLabel) { return -1; }\n\n if (state.labelUnmatchedScopes) {\n state.labelUnmatchedScopes--;\n return -1;\n }\n\n state.pos = start + 1;\n state.isInLabel = true;\n level = 1;\n\n while (state.pos < max) {\n marker = state.src.charCodeAt(state.pos);\n if (marker === 0x5B /* [ */) {\n level++;\n } else if (marker === 0x5D /* ] */) {\n level--;\n if (level === 0) {\n found = true;\n break;\n }\n }\n\n state.parser.skipToken(state);\n }\n\n if (found) {\n labelEnd = state.pos;\n state.labelUnmatchedScopes = 0;\n } else {\n state.labelUnmatchedScopes = level - 1;\n }\n\n // restore old state\n state.pos = oldPos;\n state.isInLabel = oldFlag;\n\n return labelEnd;\n}\n\n// Parse abbreviation definitions, i.e. `*[abbr]: description`\n\n\nfunction parseAbbr(str, parserInline, options, env) {\n var state, labelEnd, pos, max, label, title;\n\n if (str.charCodeAt(0) !== 0x2A/* * */) { return -1; }\n if (str.charCodeAt(1) !== 0x5B/* [ */) { return -1; }\n\n if (str.indexOf(']:') === -1) { return -1; }\n\n state = new StateInline(str, parserInline, options, env, []);\n labelEnd = parseLinkLabel(state, 1);\n\n if (labelEnd < 0 || str.charCodeAt(labelEnd + 1) !== 0x3A/* : */) { return -1; }\n\n max = state.posMax;\n\n // abbr title is always one line, so looking for ending \"\\n\" here\n for (pos = labelEnd + 2; pos < max; pos++) {\n if (state.src.charCodeAt(pos) === 0x0A) { break; }\n }\n\n label = str.slice(2, labelEnd);\n title = str.slice(labelEnd + 2, pos).trim();\n if (title.length === 0) { return -1; }\n if (!env.abbreviations) { env.abbreviations = {}; }\n // prepend ':' to avoid conflict with Object.prototype members\n if (typeof env.abbreviations[':' + label] === 'undefined') {\n env.abbreviations[':' + label] = title;\n }\n\n return pos;\n}\n\nfunction abbr(state) {\n var tokens = state.tokens, i, l, content, pos;\n\n if (state.inlineMode) {\n return;\n }\n\n // Parse inlines\n for (i = 1, l = tokens.length - 1; i < l; i++) {\n if (tokens[i - 1].type === 'paragraph_open' &&\n tokens[i].type === 'inline' &&\n tokens[i + 1].type === 'paragraph_close') {\n\n content = tokens[i].content;\n while (content.length) {\n pos = parseAbbr(content, state.inline, state.options, state.env);\n if (pos < 0) { break; }\n content = content.slice(pos).trim();\n }\n\n tokens[i].content = content;\n if (!content.length) {\n tokens[i - 1].tight = true;\n tokens[i + 1].tight = true;\n }\n }\n }\n}\n\nfunction normalizeLink(url) {\n var normalized = replaceEntities(url);\n // We shouldn't care about the result of malformed URIs,\n // and should not throw an exception.\n try {\n normalized = decodeURI(normalized);\n } catch (err) {}\n return encodeURI(normalized);\n}\n\n/**\n * Parse link destination\n *\n * - on success it returns a string and updates state.pos;\n * - on failure it returns null\n *\n * @param {Object} state\n * @param {Number} pos\n * @api private\n */\n\nfunction parseLinkDestination(state, pos) {\n var code, level, link,\n start = pos,\n max = state.posMax;\n\n if (state.src.charCodeAt(pos) === 0x3C /* < */) {\n pos++;\n while (pos < max) {\n code = state.src.charCodeAt(pos);\n if (code === 0x0A /* \\n */) { return false; }\n if (code === 0x3E /* > */) {\n link = normalizeLink(unescapeMd(state.src.slice(start + 1, pos)));\n if (!state.parser.validateLink(link)) { return false; }\n state.pos = pos + 1;\n state.linkContent = link;\n return true;\n }\n if (code === 0x5C /* \\ */ && pos + 1 < max) {\n pos += 2;\n continue;\n }\n\n pos++;\n }\n\n // no closing '>'\n return false;\n }\n\n // this should be ... } else { ... branch\n\n level = 0;\n while (pos < max) {\n code = state.src.charCodeAt(pos);\n\n if (code === 0x20) { break; }\n\n // ascii control chars\n if (code < 0x20 || code === 0x7F) { break; }\n\n if (code === 0x5C /* \\ */ && pos + 1 < max) {\n pos += 2;\n continue;\n }\n\n if (code === 0x28 /* ( */) {\n level++;\n if (level > 1) { break; }\n }\n\n if (code === 0x29 /* ) */) {\n level--;\n if (level < 0) { break; }\n }\n\n pos++;\n }\n\n if (start === pos) { return false; }\n\n link = unescapeMd(state.src.slice(start, pos));\n if (!state.parser.validateLink(link)) { return false; }\n\n state.linkContent = link;\n state.pos = pos;\n return true;\n}\n\n/**\n * Parse link title\n *\n * - on success it returns a string and updates state.pos;\n * - on failure it returns null\n *\n * @param {Object} state\n * @param {Number} pos\n * @api private\n */\n\nfunction parseLinkTitle(state, pos) {\n var code,\n start = pos,\n max = state.posMax,\n marker = state.src.charCodeAt(pos);\n\n if (marker !== 0x22 /* \" */ && marker !== 0x27 /* ' */ && marker !== 0x28 /* ( */) { return false; }\n\n pos++;\n\n // if opening marker is \"(\", switch it to closing marker \")\"\n if (marker === 0x28) { marker = 0x29; }\n\n while (pos < max) {\n code = state.src.charCodeAt(pos);\n if (code === marker) {\n state.pos = pos + 1;\n state.linkContent = unescapeMd(state.src.slice(start + 1, pos));\n return true;\n }\n if (code === 0x5C /* \\ */ && pos + 1 < max) {\n pos += 2;\n continue;\n }\n\n pos++;\n }\n\n return false;\n}\n\nfunction normalizeReference(str) {\n // use .toUpperCase() instead of .toLowerCase()\n // here to avoid a conflict with Object.prototype\n // members (most notably, `__proto__`)\n return str.trim().replace(/\\s+/g, ' ').toUpperCase();\n}\n\nfunction parseReference(str, parser, options, env) {\n var state, labelEnd, pos, max, code, start, href, title, label;\n\n if (str.charCodeAt(0) !== 0x5B/* [ */) { return -1; }\n\n if (str.indexOf(']:') === -1) { return -1; }\n\n state = new StateInline(str, parser, options, env, []);\n labelEnd = parseLinkLabel(state, 0);\n\n if (labelEnd < 0 || str.charCodeAt(labelEnd + 1) !== 0x3A/* : */) { return -1; }\n\n max = state.posMax;\n\n // [label]: destination 'title'\n // ^^^ skip optional whitespace here\n for (pos = labelEnd + 2; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n if (code !== 0x20 && code !== 0x0A) { break; }\n }\n\n // [label]: destination 'title'\n // ^^^^^^^^^^^ parse this\n if (!parseLinkDestination(state, pos)) { return -1; }\n href = state.linkContent;\n pos = state.pos;\n\n // [label]: destination 'title'\n // ^^^ skipping those spaces\n start = pos;\n for (pos = pos + 1; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n if (code !== 0x20 && code !== 0x0A) { break; }\n }\n\n // [label]: destination 'title'\n // ^^^^^^^ parse this\n if (pos < max && start !== pos && parseLinkTitle(state, pos)) {\n title = state.linkContent;\n pos = state.pos;\n } else {\n title = '';\n pos = start;\n }\n\n // ensure that the end of the line is empty\n while (pos < max && state.src.charCodeAt(pos) === 0x20/* space */) { pos++; }\n if (pos < max && state.src.charCodeAt(pos) !== 0x0A) { return -1; }\n\n label = normalizeReference(str.slice(1, labelEnd));\n if (typeof env.references[label] === 'undefined') {\n env.references[label] = { title: title, href: href };\n }\n\n return pos;\n}\n\n\nfunction references(state) {\n var tokens = state.tokens, i, l, content, pos;\n\n state.env.references = state.env.references || {};\n\n if (state.inlineMode) {\n return;\n }\n\n // Scan definitions in paragraph inlines\n for (i = 1, l = tokens.length - 1; i < l; i++) {\n if (tokens[i].type === 'inline' &&\n tokens[i - 1].type === 'paragraph_open' &&\n tokens[i + 1].type === 'paragraph_close') {\n\n content = tokens[i].content;\n while (content.length) {\n pos = parseReference(content, state.inline, state.options, state.env);\n if (pos < 0) { break; }\n content = content.slice(pos).trim();\n }\n\n tokens[i].content = content;\n if (!content.length) {\n tokens[i - 1].tight = true;\n tokens[i + 1].tight = true;\n }\n }\n }\n}\n\nfunction inline(state) {\n var tokens = state.tokens, tok, i, l;\n\n // Parse inlines\n for (i = 0, l = tokens.length; i < l; i++) {\n tok = tokens[i];\n if (tok.type === 'inline') {\n state.inline.parse(tok.content, state.options, state.env, tok.children);\n }\n }\n}\n\nfunction footnote_block(state) {\n var i, l, j, t, lastParagraph, list, tokens, current, currentLabel,\n level = 0,\n insideRef = false,\n refTokens = {};\n\n if (!state.env.footnotes) { return; }\n\n state.tokens = state.tokens.filter(function(tok) {\n if (tok.type === 'footnote_reference_open') {\n insideRef = true;\n current = [];\n currentLabel = tok.label;\n return false;\n }\n if (tok.type === 'footnote_reference_close') {\n insideRef = false;\n // prepend ':' to avoid conflict with Object.prototype members\n refTokens[':' + currentLabel] = current;\n return false;\n }\n if (insideRef) { current.push(tok); }\n return !insideRef;\n });\n\n if (!state.env.footnotes.list) { return; }\n list = state.env.footnotes.list;\n\n state.tokens.push({\n type: 'footnote_block_open',\n level: level++\n });\n for (i = 0, l = list.length; i < l; i++) {\n state.tokens.push({\n type: 'footnote_open',\n id: i,\n level: level++\n });\n\n if (list[i].tokens) {\n tokens = [];\n tokens.push({\n type: 'paragraph_open',\n tight: false,\n level: level++\n });\n tokens.push({\n type: 'inline',\n content: '',\n level: level,\n children: list[i].tokens\n });\n tokens.push({\n type: 'paragraph_close',\n tight: false,\n level: --level\n });\n } else if (list[i].label) {\n tokens = refTokens[':' + list[i].label];\n }\n\n state.tokens = state.tokens.concat(tokens);\n if (state.tokens[state.tokens.length - 1].type === 'paragraph_close') {\n lastParagraph = state.tokens.pop();\n } else {\n lastParagraph = null;\n }\n\n t = list[i].count > 0 ? list[i].count : 1;\n for (j = 0; j < t; j++) {\n state.tokens.push({\n type: 'footnote_anchor',\n id: i,\n subId: j,\n level: level\n });\n }\n\n if (lastParagraph) {\n state.tokens.push(lastParagraph);\n }\n\n state.tokens.push({\n type: 'footnote_close',\n level: --level\n });\n }\n state.tokens.push({\n type: 'footnote_block_close',\n level: --level\n });\n}\n\n// Enclose abbreviations in tags\n//\n\nvar PUNCT_CHARS = ' \\n()[]\\'\".,!?-';\n\n\n// from Google closure library\n// http://closure-library.googlecode.com/git-history/docs/local_closure_goog_string_string.js.source.html#line1021\nfunction regEscape(s) {\n return s.replace(/([-()\\[\\]{}+?*.$\\^|,:#= 0; i--) {\n token = tokens[i];\n if (token.type !== 'text') { continue; }\n\n pos = 0;\n text = token.content;\n reg.lastIndex = 0;\n level = token.level;\n nodes = [];\n\n while ((m = reg.exec(text))) {\n if (reg.lastIndex > pos) {\n nodes.push({\n type: 'text',\n content: text.slice(pos, m.index + m[1].length),\n level: level\n });\n }\n\n nodes.push({\n type: 'abbr_open',\n title: state.env.abbreviations[':' + m[2]],\n level: level++\n });\n nodes.push({\n type: 'text',\n content: m[2],\n level: level\n });\n nodes.push({\n type: 'abbr_close',\n level: --level\n });\n pos = reg.lastIndex - m[3].length;\n }\n\n if (!nodes.length) { continue; }\n\n if (pos < text.length) {\n nodes.push({\n type: 'text',\n content: text.slice(pos),\n level: level\n });\n }\n\n // replace current node\n blockTokens[j].children = tokens = [].concat(tokens.slice(0, i), nodes, tokens.slice(i + 1));\n }\n }\n}\n\n// Simple typographical replacements\n//\n// TODO:\n// - fractionals 1/2, 1/4, 3/4 -> ½, ¼, ¾\n// - miltiplication 2 x 4 -> 2 × 4\n\nvar RARE_RE = /\\+-|\\.\\.|\\?\\?\\?\\?|!!!!|,,|--/;\n\nvar SCOPED_ABBR_RE = /\\((c|tm|r|p)\\)/ig;\nvar SCOPED_ABBR = {\n 'c': '©',\n 'r': '®',\n 'p': '§',\n 'tm': '™'\n};\n\nfunction replaceScopedAbbr(str) {\n if (str.indexOf('(') < 0) { return str; }\n\n return str.replace(SCOPED_ABBR_RE, function(match, name) {\n return SCOPED_ABBR[name.toLowerCase()];\n });\n}\n\n\nfunction replace(state) {\n var i, token, text, inlineTokens, blkIdx;\n\n if (!state.options.typographer) { return; }\n\n for (blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {\n\n if (state.tokens[blkIdx].type !== 'inline') { continue; }\n\n inlineTokens = state.tokens[blkIdx].children;\n\n for (i = inlineTokens.length - 1; i >= 0; i--) {\n token = inlineTokens[i];\n if (token.type === 'text') {\n text = token.content;\n\n text = replaceScopedAbbr(text);\n\n if (RARE_RE.test(text)) {\n text = text\n .replace(/\\+-/g, '±')\n // .., ..., ....... -> …\n // but ?..... & !..... -> ?.. & !..\n .replace(/\\.{2,}/g, '…').replace(/([?!])…/g, '$1..')\n .replace(/([?!]){4,}/g, '$1$1$1').replace(/,{2,}/g, ',')\n // em-dash\n .replace(/(^|[^-])---([^-]|$)/mg, '$1\\u2014$2')\n // en-dash\n .replace(/(^|\\s)--(\\s|$)/mg, '$1\\u2013$2')\n .replace(/(^|[^-\\s])--([^-\\s]|$)/mg, '$1\\u2013$2');\n }\n\n token.content = text;\n }\n }\n }\n}\n\n// Convert straight quotation marks to typographic ones\n//\n\nvar QUOTE_TEST_RE = /['\"]/;\nvar QUOTE_RE = /['\"]/g;\nvar PUNCT_RE = /[-\\s()\\[\\]]/;\nvar APOSTROPHE = '’';\n\n// This function returns true if the character at `pos`\n// could be inside a word.\nfunction isLetter(str, pos) {\n if (pos < 0 || pos >= str.length) { return false; }\n return !PUNCT_RE.test(str[pos]);\n}\n\n\nfunction replaceAt(str, index, ch) {\n return str.substr(0, index) + ch + str.substr(index + 1);\n}\n\n\nfunction smartquotes(state) {\n /*eslint max-depth:0*/\n var i, token, text, t, pos, max, thisLevel, lastSpace, nextSpace, item,\n canOpen, canClose, j, isSingle, blkIdx, tokens,\n stack;\n\n if (!state.options.typographer) { return; }\n\n stack = [];\n\n for (blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {\n\n if (state.tokens[blkIdx].type !== 'inline') { continue; }\n\n tokens = state.tokens[blkIdx].children;\n stack.length = 0;\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n\n if (token.type !== 'text' || QUOTE_TEST_RE.test(token.text)) { continue; }\n\n thisLevel = tokens[i].level;\n\n for (j = stack.length - 1; j >= 0; j--) {\n if (stack[j].level <= thisLevel) { break; }\n }\n stack.length = j + 1;\n\n text = token.content;\n pos = 0;\n max = text.length;\n\n /*eslint no-labels:0,block-scoped-var:0*/\n OUTER:\n while (pos < max) {\n QUOTE_RE.lastIndex = pos;\n t = QUOTE_RE.exec(text);\n if (!t) { break; }\n\n lastSpace = !isLetter(text, t.index - 1);\n pos = t.index + 1;\n isSingle = (t[0] === \"'\");\n nextSpace = !isLetter(text, pos);\n\n if (!nextSpace && !lastSpace) {\n // middle of word\n if (isSingle) {\n token.content = replaceAt(token.content, t.index, APOSTROPHE);\n }\n continue;\n }\n\n canOpen = !nextSpace;\n canClose = !lastSpace;\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 if (stack[j].level < thisLevel) { break; }\n if (item.single === isSingle && stack[j].level === thisLevel) {\n item = stack[j];\n if (isSingle) {\n tokens[item.token].content = replaceAt(tokens[item.token].content, item.pos, state.options.quotes[2]);\n token.content = replaceAt(token.content, t.index, state.options.quotes[3]);\n } else {\n tokens[item.token].content = replaceAt(tokens[item.token].content, item.pos, state.options.quotes[0]);\n token.content = replaceAt(token.content, t.index, state.options.quotes[1]);\n }\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}\n\n/**\n * Core parser `rules`\n */\n\nvar _rules = [\n [ 'block', block ],\n [ 'abbr', abbr ],\n [ 'references', references ],\n [ 'inline', inline ],\n [ 'footnote_tail', footnote_block ],\n [ 'abbr2', abbr2 ],\n [ 'replacements', replace ],\n [ 'smartquotes', smartquotes ],\n];\n\n/**\n * Class for top level (`core`) parser rules\n *\n * @api private\n */\n\nfunction Core() {\n this.options = {};\n this.ruler = new Ruler();\n for (var i = 0; i < _rules.length; i++) {\n this.ruler.push(_rules[i][0], _rules[i][1]);\n }\n}\n\n/**\n * Process rules with the given `state`\n *\n * @param {Object} `state`\n * @api private\n */\n\nCore.prototype.process = function (state) {\n var i, l, rules;\n rules = this.ruler.getRules('');\n for (i = 0, l = rules.length; i < l; i++) {\n rules[i](state);\n }\n};\n\n// Parser state class\n\nfunction StateBlock(src, parser, options, env, tokens) {\n var ch, s, start, pos, len, indent, indent_found;\n\n this.src = src;\n\n // Shortcuts to simplify nested calls\n this.parser = parser;\n\n this.options = options;\n\n this.env = env;\n\n //\n // Internal state vartiables\n //\n\n this.tokens = tokens;\n\n this.bMarks = []; // line begin offsets for fast jumps\n this.eMarks = []; // line end offsets for fast jumps\n this.tShift = []; // indent for each line\n\n // block parser variables\n this.blkIndent = 0; // required block content indent\n // (for example, if we are in list)\n this.line = 0; // line index in src\n this.lineMax = 0; // lines count\n this.tight = false; // loose/tight mode for lists\n this.parentType = 'root'; // if `list`, block parser stops on two newlines\n this.ddIndent = -1; // indent of the current dd block (-1 if there isn't any)\n\n this.level = 0;\n\n // renderer\n this.result = '';\n\n // Create caches\n // Generate markers.\n s = this.src;\n indent = 0;\n indent_found = false;\n\n for (start = pos = indent = 0, len = s.length; pos < len; pos++) {\n ch = s.charCodeAt(pos);\n\n if (!indent_found) {\n if (ch === 0x20/* space */) {\n indent++;\n continue;\n } else {\n indent_found = true;\n }\n }\n\n if (ch === 0x0A || pos === len - 1) {\n if (ch !== 0x0A) { pos++; }\n this.bMarks.push(start);\n this.eMarks.push(pos);\n this.tShift.push(indent);\n\n indent_found = false;\n indent = 0;\n start = pos + 1;\n }\n }\n\n // Push fake entry to simplify cache bounds checks\n this.bMarks.push(s.length);\n this.eMarks.push(s.length);\n this.tShift.push(0);\n\n this.lineMax = this.bMarks.length - 1; // don't count last fake line\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 return from;\n};\n\n// Skip spaces from given position.\nStateBlock.prototype.skipSpaces = function skipSpaces(pos) {\n for (var max = this.src.length; pos < max; pos++) {\n if (this.src.charCodeAt(pos) !== 0x20/* space */) { break; }\n }\n return pos;\n};\n\n// Skip char codes from given position\nStateBlock.prototype.skipChars = function skipChars(pos, code) {\n for (var max = this.src.length; pos < max; pos++) {\n if (this.src.charCodeAt(pos) !== code) { break; }\n }\n return pos;\n};\n\n// Skip char codes reverse from given position - 1\nStateBlock.prototype.skipCharsBack = function skipCharsBack(pos, code, min) {\n if (pos <= min) { return pos; }\n\n while (pos > min) {\n if (code !== this.src.charCodeAt(--pos)) { return pos + 1; }\n }\n return pos;\n};\n\n// cut lines range from source.\nStateBlock.prototype.getLines = function getLines(begin, end, indent, keepLastLF) {\n var i, first, last, queue, shift,\n line = begin;\n\n if (begin >= end) {\n return '';\n }\n\n // Opt: don't use push queue for single line;\n if (line + 1 === end) {\n first = this.bMarks[line] + Math.min(this.tShift[line], indent);\n last = keepLastLF ? this.eMarks[line] + 1 : this.eMarks[line];\n return this.src.slice(first, last);\n }\n\n queue = new Array(end - begin);\n\n for (i = 0; line < end; line++, i++) {\n shift = this.tShift[line];\n if (shift > indent) { shift = indent; }\n if (shift < 0) { shift = 0; }\n\n first = this.bMarks[line] + shift;\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 queue[i] = this.src.slice(first, last);\n }\n\n return queue.join('');\n};\n\n// Code block (4 spaces padded)\n\nfunction code(state, startLine, endLine/*, silent*/) {\n var nextLine, last;\n\n if (state.tShift[startLine] - state.blkIndent < 4) { return false; }\n\n last = nextLine = startLine + 1;\n\n while (nextLine < endLine) {\n if (state.isEmpty(nextLine)) {\n nextLine++;\n continue;\n }\n if (state.tShift[nextLine] - state.blkIndent >= 4) {\n nextLine++;\n last = nextLine;\n continue;\n }\n break;\n }\n\n state.line = nextLine;\n state.tokens.push({\n type: 'code',\n content: state.getLines(startLine, last, 4 + state.blkIndent, true),\n block: true,\n lines: [ startLine, state.line ],\n level: state.level\n });\n\n return true;\n}\n\n// fences (``` lang, ~~~ lang)\n\nfunction fences(state, startLine, endLine, silent) {\n var marker, len, params, nextLine, mem,\n haveEndMarker = false,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine];\n\n if (pos + 3 > max) { return false; }\n\n marker = state.src.charCodeAt(pos);\n\n if (marker !== 0x7E/* ~ */ && marker !== 0x60 /* ` */) {\n return false;\n }\n\n // scan marker length\n mem = pos;\n pos = state.skipChars(pos, marker);\n\n len = pos - mem;\n\n if (len < 3) { return false; }\n\n params = state.src.slice(pos, max).trim();\n\n if (params.indexOf('`') >= 0) { return false; }\n\n // Since start is found, we can report success here in validation mode\n if (silent) { return true; }\n\n // search end of block\n nextLine = startLine;\n\n for (;;) {\n nextLine++;\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.tShift[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) { continue; }\n\n if (state.tShift[nextLine] - state.blkIndent >= 4) {\n // closing fence should be indented less than 4 spaces\n continue;\n }\n\n pos = state.skipChars(pos, marker);\n\n // closing code fence must be at least as long as the opening one\n if (pos - mem < len) { continue; }\n\n // make sure tail has spaces only\n pos = state.skipSpaces(pos);\n\n if (pos < max) { continue; }\n\n haveEndMarker = true;\n // found!\n break;\n }\n\n // If a fence has heading spaces, they should be removed from its inner block\n len = state.tShift[startLine];\n\n state.line = nextLine + (haveEndMarker ? 1 : 0);\n state.tokens.push({\n type: 'fence',\n params: params,\n content: state.getLines(startLine + 1, nextLine, len, true),\n lines: [ startLine, state.line ],\n level: state.level\n });\n\n return true;\n}\n\n// Block quotes\n\nfunction blockquote(state, startLine, endLine, silent) {\n var nextLine, lastLineEmpty, oldTShift, oldBMarks, oldIndent, oldParentType, lines,\n terminatorRules,\n i, l, terminate,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine];\n\n if (pos > max) { return false; }\n\n // check the block quote marker\n if (state.src.charCodeAt(pos++) !== 0x3E/* > */) { return false; }\n\n if (state.level >= state.options.maxNesting) { return false; }\n\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 if (silent) { return true; }\n\n // skip one optional space after '>'\n if (state.src.charCodeAt(pos) === 0x20) { pos++; }\n\n oldIndent = state.blkIndent;\n state.blkIndent = 0;\n\n oldBMarks = [ state.bMarks[startLine] ];\n state.bMarks[startLine] = pos;\n\n // check if we have an empty blockquote\n pos = pos < max ? state.skipSpaces(pos) : pos;\n lastLineEmpty = pos >= max;\n\n oldTShift = [ state.tShift[startLine] ];\n state.tShift[startLine] = pos - state.bMarks[startLine];\n\n terminatorRules = state.parser.ruler.getRules('blockquote');\n\n // 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 for (nextLine = startLine + 1; nextLine < endLine; nextLine++) {\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 // This line is inside the blockquote.\n\n // skip one optional space after '>'\n if (state.src.charCodeAt(pos) === 0x20) { pos++; }\n\n oldBMarks.push(state.bMarks[nextLine]);\n state.bMarks[nextLine] = pos;\n\n pos = pos < max ? state.skipSpaces(pos) : pos;\n lastLineEmpty = pos >= max;\n\n oldTShift.push(state.tShift[nextLine]);\n state.tShift[nextLine] = pos - state.bMarks[nextLine];\n continue;\n }\n\n // Case 2: line is not inside the blockquote, and the last line was empty.\n if (lastLineEmpty) { break; }\n\n // Case 3: another tag found.\n terminate = false;\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 if (terminate) { break; }\n\n oldBMarks.push(state.bMarks[nextLine]);\n oldTShift.push(state.tShift[nextLine]);\n\n // A negative number means that this is a paragraph continuation;\n //\n // Any negative number will do the job here, but it's better for it\n // to be large enough to make any bugs obvious.\n state.tShift[nextLine] = -1337;\n }\n\n oldParentType = state.parentType;\n state.parentType = 'blockquote';\n state.tokens.push({\n type: 'blockquote_open',\n lines: lines = [ startLine, 0 ],\n level: state.level++\n });\n state.parser.tokenize(state, startLine, nextLine);\n state.tokens.push({\n type: 'blockquote_close',\n level: --state.level\n });\n state.parentType = oldParentType;\n lines[1] = state.line;\n\n // 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 for (i = 0; i < oldTShift.length; i++) {\n state.bMarks[i + startLine] = oldBMarks[i];\n state.tShift[i + startLine] = oldTShift[i];\n }\n state.blkIndent = oldIndent;\n\n return true;\n}\n\n// Horizontal rule\n\nfunction hr(state, startLine, endLine, silent) {\n var marker, cnt, ch,\n pos = state.bMarks[startLine],\n max = state.eMarks[startLine];\n\n pos += state.tShift[startLine];\n\n if (pos > max) { return false; }\n\n marker = state.src.charCodeAt(pos++);\n\n // Check hr marker\n if (marker !== 0x2A/* * */ &&\n marker !== 0x2D/* - */ &&\n marker !== 0x5F/* _ */) {\n return false;\n }\n\n // markers can be mixed with spaces, but there should be at least 3 one\n\n cnt = 1;\n while (pos < max) {\n ch = state.src.charCodeAt(pos++);\n if (ch !== marker && ch !== 0x20/* space */) { return false; }\n if (ch === marker) { cnt++; }\n }\n\n if (cnt < 3) { return false; }\n\n if (silent) { return true; }\n\n state.line = startLine + 1;\n state.tokens.push({\n type: 'hr',\n lines: [ startLine, state.line ],\n level: state.level\n });\n\n return true;\n}\n\n// Lists\n\n// Search `[-+*][\\n ]`, returns next pos arter marker on success\n// or -1 on fail.\nfunction skipBulletListMarker(state, startLine) {\n var marker, pos, max;\n\n pos = state.bMarks[startLine] + state.tShift[startLine];\n max = state.eMarks[startLine];\n\n if (pos >= max) { return -1; }\n\n marker = state.src.charCodeAt(pos++);\n // Check bullet\n if (marker !== 0x2A/* * */ &&\n marker !== 0x2D/* - */ &&\n marker !== 0x2B/* + */) {\n return -1;\n }\n\n if (pos < max && state.src.charCodeAt(pos) !== 0x20) {\n // \" 1.test \" - is not a list item\n return -1;\n }\n\n return pos;\n}\n\n// Search `\\d+[.)][\\n ]`, returns next pos arter marker on success\n// or -1 on fail.\nfunction skipOrderedListMarker(state, startLine) {\n var ch,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine];\n\n if (pos + 1 >= max) { return -1; }\n\n ch = state.src.charCodeAt(pos++);\n\n if (ch < 0x30/* 0 */ || ch > 0x39/* 9 */) { return -1; }\n\n for (;;) {\n // EOL -> fail\n if (pos >= max) { return -1; }\n\n ch = state.src.charCodeAt(pos++);\n\n if (ch >= 0x30/* 0 */ && ch <= 0x39/* 9 */) {\n continue;\n }\n\n // found valid marker\n if (ch === 0x29/* ) */ || ch === 0x2e/* . */) {\n break;\n }\n\n return -1;\n }\n\n\n if (pos < max && state.src.charCodeAt(pos) !== 0x20/* space */) {\n // \" 1.test \" - is not a list item\n return -1;\n }\n return pos;\n}\n\nfunction markTightParagraphs(state, idx) {\n var i, 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].tight = true;\n state.tokens[i].tight = true;\n i += 2;\n }\n }\n}\n\n\nfunction list(state, startLine, endLine, silent) {\n var nextLine,\n indent,\n oldTShift,\n oldIndent,\n oldTight,\n oldParentType,\n start,\n posAfterMarker,\n max,\n indentAfterMarker,\n markerValue,\n markerCharCode,\n isOrdered,\n contentStart,\n listTokIdx,\n prevEmptyEnd,\n listLines,\n itemLines,\n tight = true,\n terminatorRules,\n i, l, terminate;\n\n // Detect list type and position after marker\n if ((posAfterMarker = skipOrderedListMarker(state, startLine)) >= 0) {\n isOrdered = true;\n } else if ((posAfterMarker = skipBulletListMarker(state, startLine)) >= 0) {\n isOrdered = false;\n } else {\n return false;\n }\n\n if (state.level >= state.options.maxNesting) { return false; }\n\n // We should terminate list on style change. Remember first one to compare.\n markerCharCode = state.src.charCodeAt(posAfterMarker - 1);\n\n // For validation mode we can terminate immediately\n if (silent) { return true; }\n\n // Start list\n listTokIdx = state.tokens.length;\n\n if (isOrdered) {\n start = state.bMarks[startLine] + state.tShift[startLine];\n markerValue = Number(state.src.substr(start, posAfterMarker - start - 1));\n\n state.tokens.push({\n type: 'ordered_list_open',\n order: markerValue,\n lines: listLines = [ startLine, 0 ],\n level: state.level++\n });\n\n } else {\n state.tokens.push({\n type: 'bullet_list_open',\n lines: listLines = [ startLine, 0 ],\n level: state.level++\n });\n }\n\n //\n // Iterate list items\n //\n\n nextLine = startLine;\n prevEmptyEnd = false;\n terminatorRules = state.parser.ruler.getRules('list');\n\n while (nextLine < endLine) {\n contentStart = state.skipSpaces(posAfterMarker);\n max = state.eMarks[nextLine];\n\n if (contentStart >= max) {\n // trimming space in \"- \\n 3\" case, indent is 1 here\n indentAfterMarker = 1;\n } else {\n indentAfterMarker = contentStart - posAfterMarker;\n }\n\n // If we have more than 4 spaces, the indent is 1\n // (the rest is just indented code block)\n if (indentAfterMarker > 4) { indentAfterMarker = 1; }\n\n // If indent is less than 1, assume that it's one, example:\n // \"-\\n test\"\n if (indentAfterMarker < 1) { indentAfterMarker = 1; }\n\n // \" - test\"\n // ^^^^^ - calculating total length of this thing\n indent = (posAfterMarker - state.bMarks[nextLine]) + indentAfterMarker;\n\n // Run subparser & write tokens\n state.tokens.push({\n type: 'list_item_open',\n lines: itemLines = [ startLine, 0 ],\n level: state.level++\n });\n\n oldIndent = state.blkIndent;\n oldTight = state.tight;\n oldTShift = state.tShift[startLine];\n oldParentType = state.parentType;\n state.tShift[startLine] = contentStart - state.bMarks[startLine];\n state.blkIndent = indent;\n state.tight = true;\n state.parentType = 'list';\n\n state.parser.tokenize(state, startLine, endLine, true);\n\n // If any of list item is tight, mark list as tight\n if (!state.tight || prevEmptyEnd) {\n tight = false;\n }\n // Item become loose if finish with empty line,\n // but we should filter last element, because it means list finish\n prevEmptyEnd = (state.line - startLine) > 1 && state.isEmpty(state.line - 1);\n\n state.blkIndent = oldIndent;\n state.tShift[startLine] = oldTShift;\n state.tight = oldTight;\n state.parentType = oldParentType;\n\n state.tokens.push({\n type: 'list_item_close',\n level: --state.level\n });\n\n nextLine = startLine = state.line;\n itemLines[1] = nextLine;\n contentStart = state.bMarks[startLine];\n\n if (nextLine >= endLine) { break; }\n\n if (state.isEmpty(nextLine)) {\n break;\n }\n\n //\n // Try to check if list is terminated or continued.\n //\n if (state.tShift[nextLine] < state.blkIndent) { break; }\n\n // fail if terminating block found\n terminate = false;\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 if (terminate) { break; }\n\n // fail if list has another type\n if (isOrdered) {\n posAfterMarker = skipOrderedListMarker(state, nextLine);\n if (posAfterMarker < 0) { break; }\n } else {\n posAfterMarker = skipBulletListMarker(state, nextLine);\n if (posAfterMarker < 0) { break; }\n }\n\n if (markerCharCode !== state.src.charCodeAt(posAfterMarker - 1)) { break; }\n }\n\n // Finilize list\n state.tokens.push({\n type: isOrdered ? 'ordered_list_close' : 'bullet_list_close',\n level: --state.level\n });\n listLines[1] = nextLine;\n\n state.line = nextLine;\n\n // mark paragraphs tight if needed\n if (tight) {\n markTightParagraphs(state, listTokIdx);\n }\n\n return true;\n}\n\n// Process footnote reference list\n\nfunction footnote(state, startLine, endLine, silent) {\n var oldBMark, oldTShift, oldParentType, pos, label,\n start = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine];\n\n // line should be at least 5 chars - \"[^x]:\"\n if (start + 4 > max) { return false; }\n\n if (state.src.charCodeAt(start) !== 0x5B/* [ */) { return false; }\n if (state.src.charCodeAt(start + 1) !== 0x5E/* ^ */) { return false; }\n if (state.level >= state.options.maxNesting) { return false; }\n\n for (pos = start + 2; pos < max; pos++) {\n if (state.src.charCodeAt(pos) === 0x20) { return false; }\n if (state.src.charCodeAt(pos) === 0x5D /* ] */) {\n break;\n }\n }\n\n if (pos === start + 2) { return false; } // no empty footnote labels\n if (pos + 1 >= max || state.src.charCodeAt(++pos) !== 0x3A /* : */) { return false; }\n if (silent) { return true; }\n pos++;\n\n if (!state.env.footnotes) { state.env.footnotes = {}; }\n if (!state.env.footnotes.refs) { state.env.footnotes.refs = {}; }\n label = state.src.slice(start + 2, pos - 2);\n state.env.footnotes.refs[':' + label] = -1;\n\n state.tokens.push({\n type: 'footnote_reference_open',\n label: label,\n level: state.level++\n });\n\n oldBMark = state.bMarks[startLine];\n oldTShift = state.tShift[startLine];\n oldParentType = state.parentType;\n state.tShift[startLine] = state.skipSpaces(pos) - pos;\n state.bMarks[startLine] = pos;\n state.blkIndent += 4;\n state.parentType = 'footnote';\n\n if (state.tShift[startLine] < state.blkIndent) {\n state.tShift[startLine] += state.blkIndent;\n state.bMarks[startLine] -= state.blkIndent;\n }\n\n state.parser.tokenize(state, startLine, endLine, true);\n\n state.parentType = oldParentType;\n state.blkIndent -= 4;\n state.tShift[startLine] = oldTShift;\n state.bMarks[startLine] = oldBMark;\n\n state.tokens.push({\n type: 'footnote_reference_close',\n level: --state.level\n });\n\n return true;\n}\n\n// heading (#, ##, ...)\n\nfunction heading(state, startLine, endLine, silent) {\n var ch, level, tmp,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine];\n\n if (pos >= max) { return false; }\n\n ch = state.src.charCodeAt(pos);\n\n if (ch !== 0x23/* # */ || pos >= max) { return false; }\n\n // count heading level\n level = 1;\n ch = state.src.charCodeAt(++pos);\n while (ch === 0x23/* # */ && pos < max && level <= 6) {\n level++;\n ch = state.src.charCodeAt(++pos);\n }\n\n if (level > 6 || (pos < max && ch !== 0x20/* space */)) { return false; }\n\n if (silent) { return true; }\n\n // Let's cut tails like ' ### ' from the end of string\n\n max = state.skipCharsBack(max, 0x20, pos); // space\n tmp = state.skipCharsBack(max, 0x23, pos); // #\n if (tmp > pos && state.src.charCodeAt(tmp - 1) === 0x20/* space */) {\n max = tmp;\n }\n\n state.line = startLine + 1;\n\n state.tokens.push({ type: 'heading_open',\n hLevel: level,\n lines: [ startLine, state.line ],\n level: state.level\n });\n\n // only if header is not empty\n if (pos < max) {\n state.tokens.push({\n type: 'inline',\n content: state.src.slice(pos, max).trim(),\n level: state.level + 1,\n lines: [ startLine, state.line ],\n children: []\n });\n }\n state.tokens.push({ type: 'heading_close', hLevel: level, level: state.level });\n\n return true;\n}\n\n// lheading (---, ===)\n\nfunction lheading(state, startLine, endLine/*, silent*/) {\n var marker, pos, max,\n next = startLine + 1;\n\n if (next >= endLine) { return false; }\n if (state.tShift[next] < state.blkIndent) { return false; }\n\n // Scan next line\n\n if (state.tShift[next] - state.blkIndent > 3) { return false; }\n\n pos = state.bMarks[next] + state.tShift[next];\n max = state.eMarks[next];\n\n if (pos >= max) { return false; }\n\n marker = state.src.charCodeAt(pos);\n\n if (marker !== 0x2D/* - */ && marker !== 0x3D/* = */) { return false; }\n\n pos = state.skipChars(pos, marker);\n\n pos = state.skipSpaces(pos);\n\n if (pos < max) { return false; }\n\n pos = state.bMarks[startLine] + state.tShift[startLine];\n\n state.line = next + 1;\n state.tokens.push({\n type: 'heading_open',\n hLevel: marker === 0x3D/* = */ ? 1 : 2,\n lines: [ startLine, state.line ],\n level: state.level\n });\n state.tokens.push({\n type: 'inline',\n content: state.src.slice(pos, state.eMarks[startLine]).trim(),\n level: state.level + 1,\n lines: [ startLine, state.line - 1 ],\n children: []\n });\n state.tokens.push({\n type: 'heading_close',\n hLevel: marker === 0x3D/* = */ ? 1 : 2,\n level: state.level\n });\n\n return true;\n}\n\n// List of valid html blocks names, accorting to commonmark spec\n// http://jgm.github.io/CommonMark/spec.html#html-blocks\n\nvar html_blocks = {};\n\n[\n 'article',\n 'aside',\n 'button',\n 'blockquote',\n 'body',\n 'canvas',\n 'caption',\n 'col',\n 'colgroup',\n 'dd',\n 'div',\n 'dl',\n 'dt',\n 'embed',\n 'fieldset',\n 'figcaption',\n 'figure',\n 'footer',\n 'form',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'header',\n 'hgroup',\n 'hr',\n 'iframe',\n 'li',\n 'map',\n 'object',\n 'ol',\n 'output',\n 'p',\n 'pre',\n 'progress',\n 'script',\n 'section',\n 'style',\n 'table',\n 'tbody',\n 'td',\n 'textarea',\n 'tfoot',\n 'th',\n 'tr',\n 'thead',\n 'ul',\n 'video'\n].forEach(function (name) { html_blocks[name] = true; });\n\n// HTML block\n\n\nvar HTML_TAG_OPEN_RE = /^<([a-zA-Z]{1,15})[\\s\\/>]/;\nvar HTML_TAG_CLOSE_RE = /^<\\/([a-zA-Z]{1,15})[\\s>]/;\n\nfunction isLetter$1(ch) {\n /*eslint no-bitwise:0*/\n var lc = ch | 0x20; // to lower case\n return (lc >= 0x61/* a */) && (lc <= 0x7a/* z */);\n}\n\nfunction htmlblock(state, startLine, endLine, silent) {\n var ch, match, nextLine,\n pos = state.bMarks[startLine],\n max = state.eMarks[startLine],\n shift = state.tShift[startLine];\n\n pos += shift;\n\n if (!state.options.html) { return false; }\n\n if (shift > 3 || pos + 2 >= max) { return false; }\n\n if (state.src.charCodeAt(pos) !== 0x3C/* < */) { return false; }\n\n ch = state.src.charCodeAt(pos + 1);\n\n if (ch === 0x21/* ! */ || ch === 0x3F/* ? */) {\n // Directive start / comment start / processing instruction start\n if (silent) { return true; }\n\n } else if (ch === 0x2F/* / */ || isLetter$1(ch)) {\n\n // Probably start or end of tag\n if (ch === 0x2F/* \\ */) {\n // closing tag\n match = state.src.slice(pos, max).match(HTML_TAG_CLOSE_RE);\n if (!match) { return false; }\n } else {\n // opening tag\n match = state.src.slice(pos, max).match(HTML_TAG_OPEN_RE);\n if (!match) { return false; }\n }\n // Make sure tag name is valid\n if (html_blocks[match[1].toLowerCase()] !== true) { return false; }\n if (silent) { return true; }\n\n } else {\n return false;\n }\n\n // If we are here - we detected HTML block.\n // Let's roll down till empty line (block end).\n nextLine = startLine + 1;\n while (nextLine < state.lineMax && !state.isEmpty(nextLine)) {\n nextLine++;\n }\n\n state.line = nextLine;\n state.tokens.push({\n type: 'htmlblock',\n level: state.level,\n lines: [ startLine, state.line ],\n content: state.getLines(startLine, nextLine, 0, true)\n });\n\n return true;\n}\n\n// GFM table, non-standard\n\nfunction getLine(state, line) {\n var pos = state.bMarks[line] + state.blkIndent,\n max = state.eMarks[line];\n\n return state.src.substr(pos, max - pos);\n}\n\nfunction table(state, startLine, endLine, silent) {\n var ch, lineText, pos, i, nextLine, rows, cell,\n aligns, t, tableLines, tbodyLines;\n\n // should have at least three lines\n if (startLine + 2 > endLine) { return false; }\n\n nextLine = startLine + 1;\n\n if (state.tShift[nextLine] < state.blkIndent) { return false; }\n\n // first character of the second line should be '|' or '-'\n\n pos = state.bMarks[nextLine] + state.tShift[nextLine];\n if (pos >= state.eMarks[nextLine]) { return false; }\n\n ch = state.src.charCodeAt(pos);\n if (ch !== 0x7C/* | */ && ch !== 0x2D/* - */ && ch !== 0x3A/* : */) { return false; }\n\n lineText = getLine(state, startLine + 1);\n if (!/^[-:| ]+$/.test(lineText)) { return false; }\n\n rows = lineText.split('|');\n if (rows <= 2) { return false; }\n aligns = [];\n for (i = 0; i < rows.length; i++) {\n t = rows[i].trim();\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 === rows.length - 1) {\n continue;\n } else {\n return false;\n }\n }\n\n if (!/^:?-+:?$/.test(t)) { return false; }\n if (t.charCodeAt(t.length - 1) === 0x3A/* : */) {\n aligns.push(t.charCodeAt(0) === 0x3A/* : */ ? 'center' : 'right');\n } else if (t.charCodeAt(0) === 0x3A/* : */) {\n aligns.push('left');\n } else {\n aligns.push('');\n }\n }\n\n lineText = getLine(state, startLine).trim();\n if (lineText.indexOf('|') === -1) { return false; }\n rows = lineText.replace(/^\\||\\|$/g, '').split('|');\n if (aligns.length !== rows.length) { return false; }\n if (silent) { return true; }\n\n state.tokens.push({\n type: 'table_open',\n lines: tableLines = [ startLine, 0 ],\n level: state.level++\n });\n state.tokens.push({\n type: 'thead_open',\n lines: [ startLine, startLine + 1 ],\n level: state.level++\n });\n\n state.tokens.push({\n type: 'tr_open',\n lines: [ startLine, startLine + 1 ],\n level: state.level++\n });\n for (i = 0; i < rows.length; i++) {\n state.tokens.push({\n type: 'th_open',\n align: aligns[i],\n lines: [ startLine, startLine + 1 ],\n level: state.level++\n });\n state.tokens.push({\n type: 'inline',\n content: rows[i].trim(),\n lines: [ startLine, startLine + 1 ],\n level: state.level,\n children: []\n });\n state.tokens.push({ type: 'th_close', level: --state.level });\n }\n state.tokens.push({ type: 'tr_close', level: --state.level });\n state.tokens.push({ type: 'thead_close', level: --state.level });\n\n state.tokens.push({\n type: 'tbody_open',\n lines: tbodyLines = [ startLine + 2, 0 ],\n level: state.level++\n });\n\n for (nextLine = startLine + 2; nextLine < endLine; nextLine++) {\n if (state.tShift[nextLine] < state.blkIndent) { break; }\n\n lineText = getLine(state, nextLine).trim();\n if (lineText.indexOf('|') === -1) { break; }\n rows = lineText.replace(/^\\||\\|$/g, '').split('|');\n\n state.tokens.push({ type: 'tr_open', level: state.level++ });\n for (i = 0; i < rows.length; i++) {\n state.tokens.push({ type: 'td_open', align: aligns[i], level: state.level++ });\n // 0x7c === '|'\n cell = rows[i].substring(\n rows[i].charCodeAt(0) === 0x7c ? 1 : 0,\n rows[i].charCodeAt(rows[i].length - 1) === 0x7c ? rows[i].length - 1 : rows[i].length\n ).trim();\n state.tokens.push({\n type: 'inline',\n content: cell,\n level: state.level,\n children: []\n });\n state.tokens.push({ type: 'td_close', level: --state.level });\n }\n state.tokens.push({ type: 'tr_close', level: --state.level });\n }\n state.tokens.push({ type: 'tbody_close', level: --state.level });\n state.tokens.push({ type: 'table_close', level: --state.level });\n\n tableLines[1] = tbodyLines[1] = nextLine;\n state.line = nextLine;\n return true;\n}\n\n// Definition lists\n\n// Search `[:~][\\n ]`, returns next pos after marker on success\n// or -1 on fail.\nfunction skipMarker(state, line) {\n var pos, marker,\n start = state.bMarks[line] + state.tShift[line],\n max = state.eMarks[line];\n\n if (start >= max) { return -1; }\n\n // Check bullet\n marker = state.src.charCodeAt(start++);\n if (marker !== 0x7E/* ~ */ && marker !== 0x3A/* : */) { return -1; }\n\n pos = state.skipSpaces(start);\n\n // require space after \":\"\n if (start === pos) { return -1; }\n\n // no empty definitions, e.g. \" : \"\n if (pos >= max) { return -1; }\n\n return pos;\n}\n\nfunction markTightParagraphs$1(state, idx) {\n var i, 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].tight = true;\n state.tokens[i].tight = true;\n i += 2;\n }\n }\n}\n\nfunction deflist(state, startLine, endLine, silent) {\n var contentStart,\n ddLine,\n dtLine,\n itemLines,\n listLines,\n listTokIdx,\n nextLine,\n oldIndent,\n oldDDIndent,\n oldParentType,\n oldTShift,\n oldTight,\n prevEmptyEnd,\n tight;\n\n if (silent) {\n // quirk: validation mode validates a dd block only, not a whole deflist\n if (state.ddIndent < 0) { return false; }\n return skipMarker(state, startLine) >= 0;\n }\n\n nextLine = startLine + 1;\n if (state.isEmpty(nextLine)) {\n if (++nextLine > endLine) { return false; }\n }\n\n if (state.tShift[nextLine] < state.blkIndent) { return false; }\n contentStart = skipMarker(state, nextLine);\n if (contentStart < 0) { return false; }\n\n if (state.level >= state.options.maxNesting) { return false; }\n\n // Start list\n listTokIdx = state.tokens.length;\n\n state.tokens.push({\n type: 'dl_open',\n lines: listLines = [ startLine, 0 ],\n level: state.level++\n });\n\n //\n // Iterate list items\n //\n\n dtLine = startLine;\n ddLine = nextLine;\n\n // One definition list can contain multiple DTs,\n // and one DT can be followed by multiple DDs.\n //\n // Thus, there is two loops here, and label is\n // needed to break out of the second one\n //\n /*eslint no-labels:0,block-scoped-var:0*/\n OUTER:\n for (;;) {\n tight = true;\n prevEmptyEnd = false;\n\n state.tokens.push({\n type: 'dt_open',\n lines: [ dtLine, dtLine ],\n level: state.level++\n });\n state.tokens.push({\n type: 'inline',\n content: state.getLines(dtLine, dtLine + 1, state.blkIndent, false).trim(),\n level: state.level + 1,\n lines: [ dtLine, dtLine ],\n children: []\n });\n state.tokens.push({\n type: 'dt_close',\n level: --state.level\n });\n\n for (;;) {\n state.tokens.push({\n type: 'dd_open',\n lines: itemLines = [ nextLine, 0 ],\n level: state.level++\n });\n\n oldTight = state.tight;\n oldDDIndent = state.ddIndent;\n oldIndent = state.blkIndent;\n oldTShift = state.tShift[ddLine];\n oldParentType = state.parentType;\n state.blkIndent = state.ddIndent = state.tShift[ddLine] + 2;\n state.tShift[ddLine] = contentStart - state.bMarks[ddLine];\n state.tight = true;\n state.parentType = 'deflist';\n\n state.parser.tokenize(state, ddLine, endLine, true);\n\n // If any of list item is tight, mark list as tight\n if (!state.tight || prevEmptyEnd) {\n tight = false;\n }\n // Item become loose if finish with empty line,\n // but we should filter last element, because it means list finish\n prevEmptyEnd = (state.line - ddLine) > 1 && state.isEmpty(state.line - 1);\n\n state.tShift[ddLine] = oldTShift;\n state.tight = oldTight;\n state.parentType = oldParentType;\n state.blkIndent = oldIndent;\n state.ddIndent = oldDDIndent;\n\n state.tokens.push({\n type: 'dd_close',\n level: --state.level\n });\n\n itemLines[1] = nextLine = state.line;\n\n if (nextLine >= endLine) { break OUTER; }\n\n if (state.tShift[nextLine] < state.blkIndent) { break OUTER; }\n contentStart = skipMarker(state, nextLine);\n if (contentStart < 0) { break; }\n\n ddLine = nextLine;\n\n // go to the next loop iteration:\n // insert DD tag and repeat checking\n }\n\n if (nextLine >= endLine) { break; }\n dtLine = nextLine;\n\n if (state.isEmpty(dtLine)) { break; }\n if (state.tShift[dtLine] < state.blkIndent) { break; }\n\n ddLine = dtLine + 1;\n if (ddLine >= endLine) { break; }\n if (state.isEmpty(ddLine)) { ddLine++; }\n if (ddLine >= endLine) { break; }\n\n if (state.tShift[ddLine] < state.blkIndent) { break; }\n contentStart = skipMarker(state, ddLine);\n if (contentStart < 0) { break; }\n\n // go to the next loop iteration:\n // insert DT and DD tags and repeat checking\n }\n\n // Finilize list\n state.tokens.push({\n type: 'dl_close',\n level: --state.level\n });\n listLines[1] = nextLine;\n\n state.line = nextLine;\n\n // mark paragraphs tight if needed\n if (tight) {\n markTightParagraphs$1(state, listTokIdx);\n }\n\n return true;\n}\n\n// Paragraph\n\nfunction paragraph(state, startLine/*, endLine*/) {\n var endLine, content, terminate, i, l,\n nextLine = startLine + 1,\n terminatorRules;\n\n endLine = state.lineMax;\n\n // jump line-by-line until empty one or EOF\n if (nextLine < endLine && !state.isEmpty(nextLine)) {\n terminatorRules = state.parser.ruler.getRules('paragraph');\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.tShift[nextLine] - state.blkIndent > 3) { continue; }\n\n // Some tags can terminate paragraph without empty line.\n terminate = false;\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 if (terminate) { break; }\n }\n }\n\n content = state.getLines(startLine, nextLine, state.blkIndent, false).trim();\n\n state.line = nextLine;\n if (content.length) {\n state.tokens.push({\n type: 'paragraph_open',\n tight: false,\n lines: [ startLine, state.line ],\n level: state.level\n });\n state.tokens.push({\n type: 'inline',\n content: content,\n level: state.level + 1,\n lines: [ startLine, state.line ],\n children: []\n });\n state.tokens.push({\n type: 'paragraph_close',\n tight: false,\n level: state.level\n });\n }\n\n return true;\n}\n\n/**\n * Parser rules\n */\n\nvar _rules$1 = [\n [ 'code', code ],\n [ 'fences', fences, [ 'paragraph', 'blockquote', 'list' ] ],\n [ 'blockquote', blockquote, [ 'paragraph', 'blockquote', 'list' ] ],\n [ 'hr', hr, [ 'paragraph', 'blockquote', 'list' ] ],\n [ 'list', list, [ 'paragraph', 'blockquote' ] ],\n [ 'footnote', footnote, [ 'paragraph' ] ],\n [ 'heading', heading, [ 'paragraph', 'blockquote' ] ],\n [ 'lheading', lheading ],\n [ 'htmlblock', htmlblock, [ 'paragraph', 'blockquote' ] ],\n [ 'table', table, [ 'paragraph' ] ],\n [ 'deflist', deflist, [ 'paragraph' ] ],\n [ 'paragraph', paragraph ]\n];\n\n/**\n * Block Parser class\n *\n * @api private\n */\n\nfunction ParserBlock() {\n this.ruler = new Ruler();\n for (var i = 0; i < _rules$1.length; i++) {\n this.ruler.push(_rules$1[i][0], _rules$1[i][1], {\n alt: (_rules$1[i][2] || []).slice()\n });\n }\n}\n\n/**\n * Generate tokens for the given input range.\n *\n * @param {Object} `state` Has properties like `src`, `parser`, `options` etc\n * @param {Number} `startLine`\n * @param {Number} `endLine`\n * @api private\n */\n\nParserBlock.prototype.tokenize = function (state, startLine, endLine) {\n var rules = this.ruler.getRules('');\n var len = rules.length;\n var line = startLine;\n var hasEmptyLines = false;\n var ok, i;\n\n while (line < endLine) {\n state.line = line = state.skipEmptyLines(line);\n if (line >= endLine) {\n break;\n }\n\n // Termination condition for nested calls.\n // Nested calls currently used for blockquotes & lists\n if (state.tShift[line] < state.blkIndent) {\n break;\n }\n\n // Try all possible rules.\n // On success, rule should:\n //\n // - update `state.line`\n // - update `state.tokens`\n // - return true\n\n for (i = 0; i < len; i++) {\n ok = rules[i](state, line, endLine, false);\n if (ok) {\n break;\n }\n }\n\n // set state.tight iff we had an empty line before current tag\n // i.e. latest empty line should not count\n state.tight = !hasEmptyLines;\n\n // paragraph might \"eat\" one newline after it in nested lists\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\n // two empty lines should stop the parser in list mode\n if (line < endLine && state.parentType === 'list' && state.isEmpty(line)) { break; }\n state.line = line;\n }\n }\n};\n\nvar TABS_SCAN_RE = /[\\n\\t]/g;\nvar NEWLINES_RE = /\\r[\\n\\u0085]|[\\u2424\\u2028\\u0085]/g;\nvar SPACES_RE = /\\u00a0/g;\n\n/**\n * Tokenize the given `str`.\n *\n * @param {String} `str` Source string\n * @param {Object} `options`\n * @param {Object} `env`\n * @param {Array} `outTokens`\n * @api private\n */\n\nParserBlock.prototype.parse = function (str, options, env, outTokens) {\n var state, lineStart = 0, lastTabPos = 0;\n if (!str) { return []; }\n\n // Normalize spaces\n str = str.replace(SPACES_RE, ' ');\n\n // Normalize newlines\n str = str.replace(NEWLINES_RE, '\\n');\n\n // Replace tabs with proper number of spaces (1..4)\n if (str.indexOf('\\t') >= 0) {\n str = str.replace(TABS_SCAN_RE, function (match, offset) {\n var result;\n if (str.charCodeAt(offset) === 0x0A) {\n lineStart = offset + 1;\n lastTabPos = 0;\n return match;\n }\n result = ' '.slice((offset - lineStart - lastTabPos) % 4);\n lastTabPos = offset - lineStart + 1;\n return result;\n });\n }\n\n state = new StateBlock(str, this, options, env, outTokens);\n this.tokenize(state, state.line, state.lineMax);\n};\n\n// Skip text characters for text token, place those to pending buffer\n// and increment current pos\n\n// Rule to skip pure text\n// '{}$%@~+=:' reserved for extentions\n\nfunction isTerminatorChar(ch) {\n switch (ch) {\n case 0x0A/* \\n */:\n case 0x5C/* \\ */:\n case 0x60/* ` */:\n case 0x2A/* * */:\n case 0x5F/* _ */:\n case 0x5E/* ^ */:\n case 0x5B/* [ */:\n case 0x5D/* ] */:\n case 0x21/* ! */:\n case 0x26/* & */:\n case 0x3C/* < */:\n case 0x3E/* > */:\n case 0x7B/* { */:\n case 0x7D/* } */:\n case 0x24/* $ */:\n case 0x25/* % */:\n case 0x40/* @ */:\n case 0x7E/* ~ */:\n case 0x2B/* + */:\n case 0x3D/* = */:\n case 0x3A/* : */:\n return true;\n default:\n return false;\n }\n}\n\nfunction 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) { return false; }\n\n if (!silent) { state.pending += state.src.slice(state.pos, pos); }\n\n state.pos = pos;\n\n return true;\n}\n\n// Proceess '\\n'\n\nfunction newline(state, silent) {\n var pmax, max, pos = state.pos;\n\n if (state.src.charCodeAt(pos) !== 0x0A/* \\n */) { return false; }\n\n pmax = state.pending.length - 1;\n max = state.posMax;\n\n // ' \\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 if (!silent) {\n if (pmax >= 0 && state.pending.charCodeAt(pmax) === 0x20) {\n if (pmax >= 1 && state.pending.charCodeAt(pmax - 1) === 0x20) {\n // Strip out all trailing spaces on this line.\n for (var i = pmax - 2; i >= 0; i--) {\n if (state.pending.charCodeAt(i) !== 0x20) {\n state.pending = state.pending.substring(0, i + 1);\n break;\n }\n }\n state.push({\n type: 'hardbreak',\n level: state.level\n });\n } else {\n state.pending = state.pending.slice(0, -1);\n state.push({\n type: 'softbreak',\n level: state.level\n });\n }\n\n } else {\n state.push({\n type: 'softbreak',\n level: state.level\n });\n }\n }\n\n pos++;\n\n // skip heading spaces for next line\n while (pos < max && state.src.charCodeAt(pos) === 0x20) { pos++; }\n\n state.pos = pos;\n return true;\n}\n\n// Proceess escaped chars and hardbreaks\n\nvar ESCAPED = [];\n\nfor (var i = 0; i < 256; i++) { ESCAPED.push(0); }\n\n'\\\\!\"#$%&\\'()*+,./:;<=>?@[]^_`{|}~-'\n .split('').forEach(function(ch) { ESCAPED[ch.charCodeAt(0)] = 1; });\n\n\nfunction escape(state, silent) {\n var ch, pos = state.pos, max = state.posMax;\n\n if (state.src.charCodeAt(pos) !== 0x5C/* \\ */) { return false; }\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) { state.pending += state.src[pos]; }\n state.pos += 2;\n return true;\n }\n\n if (ch === 0x0A) {\n if (!silent) {\n state.push({\n type: 'hardbreak',\n level: state.level\n });\n }\n\n pos++;\n // skip leading whitespaces from next line\n while (pos < max && state.src.charCodeAt(pos) === 0x20) { pos++; }\n\n state.pos = pos;\n return true;\n }\n }\n\n if (!silent) { state.pending += '\\\\'; }\n state.pos++;\n return true;\n}\n\n// Parse backticks\n\nfunction backticks(state, silent) {\n var start, max, marker, matchStart, matchEnd,\n pos = state.pos,\n ch = state.src.charCodeAt(pos);\n\n if (ch !== 0x60/* ` */) { return false; }\n\n start = pos;\n pos++;\n max = state.posMax;\n\n while (pos < max && state.src.charCodeAt(pos) === 0x60/* ` */) { pos++; }\n\n marker = state.src.slice(start, pos);\n\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/* ` */) { matchEnd++; }\n\n if (matchEnd - matchStart === marker.length) {\n if (!silent) {\n state.push({\n type: 'code',\n content: state.src.slice(pos, matchStart)\n .replace(/[ \\n]+/g, ' ')\n .trim(),\n block: false,\n level: state.level\n });\n }\n state.pos = matchEnd;\n return true;\n }\n }\n\n if (!silent) { state.pending += marker; }\n state.pos += marker.length;\n return true;\n}\n\n// Process ~~deleted text~~\n\nfunction del(state, silent) {\n var found,\n pos,\n stack,\n max = state.posMax,\n start = state.pos,\n lastChar,\n nextChar;\n\n if (state.src.charCodeAt(start) !== 0x7E/* ~ */) { return false; }\n if (silent) { return false; } // don't run any pairs in validation mode\n if (start + 4 >= max) { return false; }\n if (state.src.charCodeAt(start + 1) !== 0x7E/* ~ */) { return false; }\n if (state.level >= state.options.maxNesting) { return false; }\n\n lastChar = start > 0 ? state.src.charCodeAt(start - 1) : -1;\n nextChar = state.src.charCodeAt(start + 2);\n\n if (lastChar === 0x7E/* ~ */) { return false; }\n if (nextChar === 0x7E/* ~ */) { return false; }\n if (nextChar === 0x20 || nextChar === 0x0A) { return false; }\n\n pos = start + 2;\n while (pos < max && state.src.charCodeAt(pos) === 0x7E/* ~ */) { pos++; }\n if (pos > start + 3) {\n // sequence of 4+ markers taking as literal, same as in a emphasis\n state.pos += pos - start;\n if (!silent) { state.pending += state.src.slice(start, pos); }\n return true;\n }\n\n state.pos = start + 2;\n stack = 1;\n\n while (state.pos + 1 < max) {\n if (state.src.charCodeAt(state.pos) === 0x7E/* ~ */) {\n if (state.src.charCodeAt(state.pos + 1) === 0x7E/* ~ */) {\n lastChar = state.src.charCodeAt(state.pos - 1);\n nextChar = state.pos + 2 < max ? state.src.charCodeAt(state.pos + 2) : -1;\n if (nextChar !== 0x7E/* ~ */ && lastChar !== 0x7E/* ~ */) {\n if (lastChar !== 0x20 && lastChar !== 0x0A) {\n // closing '~~'\n stack--;\n } else if (nextChar !== 0x20 && nextChar !== 0x0A) {\n // opening '~~'\n stack++;\n } // else {\n // // standalone ' ~~ ' indented with spaces\n // }\n if (stack <= 0) {\n found = true;\n break;\n }\n }\n }\n }\n\n state.parser.skipToken(state);\n }\n\n if (!found) {\n // parser failed to find ending tag, so it's not valid emphasis\n state.pos = start;\n return false;\n }\n\n // found!\n state.posMax = state.pos;\n state.pos = start + 2;\n\n if (!silent) {\n state.push({ type: 'del_open', level: state.level++ });\n state.parser.tokenize(state);\n state.push({ type: 'del_close', level: --state.level });\n }\n\n state.pos = state.posMax + 2;\n state.posMax = max;\n return true;\n}\n\n// Process ++inserted text++\n\nfunction ins(state, silent) {\n var found,\n pos,\n stack,\n max = state.posMax,\n start = state.pos,\n lastChar,\n nextChar;\n\n if (state.src.charCodeAt(start) !== 0x2B/* + */) { return false; }\n if (silent) { return false; } // don't run any pairs in validation mode\n if (start + 4 >= max) { return false; }\n if (state.src.charCodeAt(start + 1) !== 0x2B/* + */) { return false; }\n if (state.level >= state.options.maxNesting) { return false; }\n\n lastChar = start > 0 ? state.src.charCodeAt(start - 1) : -1;\n nextChar = state.src.charCodeAt(start + 2);\n\n if (lastChar === 0x2B/* + */) { return false; }\n if (nextChar === 0x2B/* + */) { return false; }\n if (nextChar === 0x20 || nextChar === 0x0A) { return false; }\n\n pos = start + 2;\n while (pos < max && state.src.charCodeAt(pos) === 0x2B/* + */) { pos++; }\n if (pos !== start + 2) {\n // sequence of 3+ markers taking as literal, same as in a emphasis\n state.pos += pos - start;\n if (!silent) { state.pending += state.src.slice(start, pos); }\n return true;\n }\n\n state.pos = start + 2;\n stack = 1;\n\n while (state.pos + 1 < max) {\n if (state.src.charCodeAt(state.pos) === 0x2B/* + */) {\n if (state.src.charCodeAt(state.pos + 1) === 0x2B/* + */) {\n lastChar = state.src.charCodeAt(state.pos - 1);\n nextChar = state.pos + 2 < max ? state.src.charCodeAt(state.pos + 2) : -1;\n if (nextChar !== 0x2B/* + */ && lastChar !== 0x2B/* + */) {\n if (lastChar !== 0x20 && lastChar !== 0x0A) {\n // closing '++'\n stack--;\n } else if (nextChar !== 0x20 && nextChar !== 0x0A) {\n // opening '++'\n stack++;\n } // else {\n // // standalone ' ++ ' indented with spaces\n // }\n if (stack <= 0) {\n found = true;\n break;\n }\n }\n }\n }\n\n state.parser.skipToken(state);\n }\n\n if (!found) {\n // parser failed to find ending tag, so it's not valid emphasis\n state.pos = start;\n return false;\n }\n\n // found!\n state.posMax = state.pos;\n state.pos = start + 2;\n\n if (!silent) {\n state.push({ type: 'ins_open', level: state.level++ });\n state.parser.tokenize(state);\n state.push({ type: 'ins_close', level: --state.level });\n }\n\n state.pos = state.posMax + 2;\n state.posMax = max;\n return true;\n}\n\n// Process ==highlighted text==\n\nfunction mark(state, silent) {\n var found,\n pos,\n stack,\n max = state.posMax,\n start = state.pos,\n lastChar,\n nextChar;\n\n if (state.src.charCodeAt(start) !== 0x3D/* = */) { return false; }\n if (silent) { return false; } // don't run any pairs in validation mode\n if (start + 4 >= max) { return false; }\n if (state.src.charCodeAt(start + 1) !== 0x3D/* = */) { return false; }\n if (state.level >= state.options.maxNesting) { return false; }\n\n lastChar = start > 0 ? state.src.charCodeAt(start - 1) : -1;\n nextChar = state.src.charCodeAt(start + 2);\n\n if (lastChar === 0x3D/* = */) { return false; }\n if (nextChar === 0x3D/* = */) { return false; }\n if (nextChar === 0x20 || nextChar === 0x0A) { return false; }\n\n pos = start + 2;\n while (pos < max && state.src.charCodeAt(pos) === 0x3D/* = */) { pos++; }\n if (pos !== start + 2) {\n // sequence of 3+ markers taking as literal, same as in a emphasis\n state.pos += pos - start;\n if (!silent) { state.pending += state.src.slice(start, pos); }\n return true;\n }\n\n state.pos = start + 2;\n stack = 1;\n\n while (state.pos + 1 < max) {\n if (state.src.charCodeAt(state.pos) === 0x3D/* = */) {\n if (state.src.charCodeAt(state.pos + 1) === 0x3D/* = */) {\n lastChar = state.src.charCodeAt(state.pos - 1);\n nextChar = state.pos + 2 < max ? state.src.charCodeAt(state.pos + 2) : -1;\n if (nextChar !== 0x3D/* = */ && lastChar !== 0x3D/* = */) {\n if (lastChar !== 0x20 && lastChar !== 0x0A) {\n // closing '=='\n stack--;\n } else if (nextChar !== 0x20 && nextChar !== 0x0A) {\n // opening '=='\n stack++;\n } // else {\n // // standalone ' == ' indented with spaces\n // }\n if (stack <= 0) {\n found = true;\n break;\n }\n }\n }\n }\n\n state.parser.skipToken(state);\n }\n\n if (!found) {\n // parser failed to find ending tag, so it's not valid emphasis\n state.pos = start;\n return false;\n }\n\n // found!\n state.posMax = state.pos;\n state.pos = start + 2;\n\n if (!silent) {\n state.push({ type: 'mark_open', level: state.level++ });\n state.parser.tokenize(state);\n state.push({ type: 'mark_close', level: --state.level });\n }\n\n state.pos = state.posMax + 2;\n state.posMax = max;\n return true;\n}\n\n// Process *this* and _that_\n\nfunction isAlphaNum(code) {\n return (code >= 0x30 /* 0 */ && code <= 0x39 /* 9 */) ||\n (code >= 0x41 /* A */ && code <= 0x5A /* Z */) ||\n (code >= 0x61 /* a */ && code <= 0x7A /* z */);\n}\n\n// parse sequence of emphasis markers,\n// \"start\" should point at a valid marker\nfunction scanDelims(state, start) {\n var pos = start, lastChar, nextChar, count,\n can_open = true,\n can_close = true,\n max = state.posMax,\n marker = state.src.charCodeAt(start);\n\n lastChar = start > 0 ? state.src.charCodeAt(start - 1) : -1;\n\n while (pos < max && state.src.charCodeAt(pos) === marker) { pos++; }\n if (pos >= max) { can_open = false; }\n count = pos - start;\n\n if (count >= 4) {\n // sequence of four or more unescaped markers can't start/end an emphasis\n can_open = can_close = false;\n } else {\n nextChar = pos < max ? state.src.charCodeAt(pos) : -1;\n\n // check whitespace conditions\n if (nextChar === 0x20 || nextChar === 0x0A) { can_open = false; }\n if (lastChar === 0x20 || lastChar === 0x0A) { can_close = false; }\n\n if (marker === 0x5F /* _ */) {\n // check if we aren't inside the word\n if (isAlphaNum(lastChar)) { can_open = false; }\n if (isAlphaNum(nextChar)) { can_close = false; }\n }\n }\n\n return {\n can_open: can_open,\n can_close: can_close,\n delims: count\n };\n}\n\nfunction emphasis(state, silent) {\n var startCount,\n count,\n found,\n oldCount,\n newCount,\n stack,\n res,\n max = state.posMax,\n start = state.pos,\n marker = state.src.charCodeAt(start);\n\n if (marker !== 0x5F/* _ */ && marker !== 0x2A /* * */) { return false; }\n if (silent) { return false; } // don't run any pairs in validation mode\n\n res = scanDelims(state, start);\n startCount = res.delims;\n if (!res.can_open) {\n state.pos += startCount;\n if (!silent) { state.pending += state.src.slice(start, state.pos); }\n return true;\n }\n\n if (state.level >= state.options.maxNesting) { return false; }\n\n state.pos = start + startCount;\n stack = [ startCount ];\n\n while (state.pos < max) {\n if (state.src.charCodeAt(state.pos) === marker) {\n res = scanDelims(state, state.pos);\n count = res.delims;\n if (res.can_close) {\n oldCount = stack.pop();\n newCount = count;\n\n while (oldCount !== newCount) {\n if (newCount < oldCount) {\n stack.push(oldCount - newCount);\n break;\n }\n\n // assert(newCount > oldCount)\n newCount -= oldCount;\n\n if (stack.length === 0) { break; }\n state.pos += oldCount;\n oldCount = stack.pop();\n }\n\n if (stack.length === 0) {\n startCount = oldCount;\n found = true;\n break;\n }\n state.pos += count;\n continue;\n }\n\n if (res.can_open) { stack.push(count); }\n state.pos += count;\n continue;\n }\n\n state.parser.skipToken(state);\n }\n\n if (!found) {\n // parser failed to find ending tag, so it's not valid emphasis\n state.pos = start;\n return false;\n }\n\n // found!\n state.posMax = state.pos;\n state.pos = start + startCount;\n\n if (!silent) {\n if (startCount === 2 || startCount === 3) {\n state.push({ type: 'strong_open', level: state.level++ });\n }\n if (startCount === 1 || startCount === 3) {\n state.push({ type: 'em_open', level: state.level++ });\n }\n\n state.parser.tokenize(state);\n\n if (startCount === 1 || startCount === 3) {\n state.push({ type: 'em_close', level: --state.level });\n }\n if (startCount === 2 || startCount === 3) {\n state.push({ type: 'strong_close', level: --state.level });\n }\n }\n\n state.pos = state.posMax + startCount;\n state.posMax = max;\n return true;\n}\n\n// Process ~subscript~\n\n// same as UNESCAPE_MD_RE plus a space\nvar UNESCAPE_RE = /\\\\([ \\\\!\"#$%&'()*+,.\\/:;<=>?@[\\]^_`{|}~-])/g;\n\nfunction sub(state, silent) {\n var found,\n content,\n max = state.posMax,\n start = state.pos;\n\n if (state.src.charCodeAt(start) !== 0x7E/* ~ */) { return false; }\n if (silent) { return false; } // don't run any pairs in validation mode\n if (start + 2 >= max) { return false; }\n if (state.level >= state.options.maxNesting) { return false; }\n\n state.pos = start + 1;\n\n while (state.pos < max) {\n if (state.src.charCodeAt(state.pos) === 0x7E/* ~ */) {\n found = true;\n break;\n }\n\n state.parser.skipToken(state);\n }\n\n if (!found || start + 1 === state.pos) {\n state.pos = start;\n return false;\n }\n\n content = state.src.slice(start + 1, state.pos);\n\n // don't allow unescaped spaces/newlines inside\n if (content.match(/(^|[^\\\\])(\\\\\\\\)*\\s/)) {\n state.pos = start;\n return false;\n }\n\n // found!\n state.posMax = state.pos;\n state.pos = start + 1;\n\n if (!silent) {\n state.push({\n type: 'sub',\n level: state.level,\n content: content.replace(UNESCAPE_RE, '$1')\n });\n }\n\n state.pos = state.posMax + 1;\n state.posMax = max;\n return true;\n}\n\n// Process ^superscript^\n\n// same as UNESCAPE_MD_RE plus a space\nvar UNESCAPE_RE$1 = /\\\\([ \\\\!\"#$%&'()*+,.\\/:;<=>?@[\\]^_`{|}~-])/g;\n\nfunction sup(state, silent) {\n var found,\n content,\n max = state.posMax,\n start = state.pos;\n\n if (state.src.charCodeAt(start) !== 0x5E/* ^ */) { return false; }\n if (silent) { return false; } // don't run any pairs in validation mode\n if (start + 2 >= max) { return false; }\n if (state.level >= state.options.maxNesting) { return false; }\n\n state.pos = start + 1;\n\n while (state.pos < max) {\n if (state.src.charCodeAt(state.pos) === 0x5E/* ^ */) {\n found = true;\n break;\n }\n\n state.parser.skipToken(state);\n }\n\n if (!found || start + 1 === state.pos) {\n state.pos = start;\n return false;\n }\n\n content = state.src.slice(start + 1, state.pos);\n\n // don't allow unescaped spaces/newlines inside\n if (content.match(/(^|[^\\\\])(\\\\\\\\)*\\s/)) {\n state.pos = start;\n return false;\n }\n\n // found!\n state.posMax = state.pos;\n state.pos = start + 1;\n\n if (!silent) {\n state.push({\n type: 'sup',\n level: state.level,\n content: content.replace(UNESCAPE_RE$1, '$1')\n });\n }\n\n state.pos = state.posMax + 1;\n state.posMax = max;\n return true;\n}\n\n// Process [links]( \"stuff\")\n\n\nfunction links(state, silent) {\n var labelStart,\n labelEnd,\n label,\n href,\n title,\n pos,\n ref,\n code,\n isImage = false,\n oldPos = state.pos,\n max = state.posMax,\n start = state.pos,\n marker = state.src.charCodeAt(start);\n\n if (marker === 0x21/* ! */) {\n isImage = true;\n marker = state.src.charCodeAt(++start);\n }\n\n if (marker !== 0x5B/* [ */) { return false; }\n if (state.level >= state.options.maxNesting) { return false; }\n\n labelStart = start + 1;\n labelEnd = parseLinkLabel(state, start);\n\n // parser failed to find ']', so it's not a valid link\n if (labelEnd < 0) { return false; }\n\n pos = labelEnd + 1;\n if (pos < max && state.src.charCodeAt(pos) === 0x28/* ( */) {\n //\n // Inline link\n //\n\n // [link]( \"title\" )\n // ^^ skipping these spaces\n pos++;\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n if (code !== 0x20 && code !== 0x0A) { break; }\n }\n if (pos >= max) { return false; }\n\n // [link]( \"title\" )\n // ^^^^^^ parsing link destination\n start = pos;\n if (parseLinkDestination(state, pos)) {\n href = state.linkContent;\n pos = state.pos;\n } else {\n href = '';\n }\n\n // [link]( \"title\" )\n // ^^ skipping these spaces\n start = pos;\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n if (code !== 0x20 && code !== 0x0A) { break; }\n }\n\n // [link]( \"title\" )\n // ^^^^^^^ parsing link title\n if (pos < max && start !== pos && parseLinkTitle(state, pos)) {\n title = state.linkContent;\n pos = state.pos;\n\n // [link]( \"title\" )\n // ^^ skipping these spaces\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n if (code !== 0x20 && code !== 0x0A) { break; }\n }\n } else {\n title = '';\n }\n\n if (pos >= max || state.src.charCodeAt(pos) !== 0x29/* ) */) {\n state.pos = oldPos;\n return false;\n }\n pos++;\n } else {\n //\n // Link reference\n //\n\n // do not allow nested reference links\n if (state.linkLevel > 0) { return false; }\n\n // [foo] [bar]\n // ^^ optional whitespace (can include newlines)\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n if (code !== 0x20 && code !== 0x0A) { break; }\n }\n\n if (pos < max && state.src.charCodeAt(pos) === 0x5B/* [ */) {\n start = pos + 1;\n pos = parseLinkLabel(state, pos);\n if (pos >= 0) {\n label = state.src.slice(start, pos++);\n } else {\n pos = start - 1;\n }\n }\n\n // covers label === '' and label === undefined\n // (collapsed reference link and shortcut reference link respectively)\n if (!label) {\n if (typeof label === 'undefined') {\n pos = labelEnd + 1;\n }\n label = state.src.slice(labelStart, labelEnd);\n }\n\n ref = state.env.references[normalizeReference(label)];\n if (!ref) {\n state.pos = oldPos;\n return false;\n }\n href = ref.href;\n title = ref.title;\n }\n\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 if (!silent) {\n state.pos = labelStart;\n state.posMax = labelEnd;\n\n if (isImage) {\n state.push({\n type: 'image',\n src: href,\n title: title,\n alt: state.src.substr(labelStart, labelEnd - labelStart),\n level: state.level\n });\n } else {\n state.push({\n type: 'link_open',\n href: href,\n title: title,\n level: state.level++\n });\n state.linkLevel++;\n state.parser.tokenize(state);\n state.linkLevel--;\n state.push({ type: 'link_close', level: --state.level });\n }\n }\n\n state.pos = pos;\n state.posMax = max;\n return true;\n}\n\n// Process inline footnotes (^[...])\n\n\nfunction footnote_inline(state, silent) {\n var labelStart,\n labelEnd,\n footnoteId,\n oldLength,\n max = state.posMax,\n start = state.pos;\n\n if (start + 2 >= max) { return false; }\n if (state.src.charCodeAt(start) !== 0x5E/* ^ */) { return false; }\n if (state.src.charCodeAt(start + 1) !== 0x5B/* [ */) { return false; }\n if (state.level >= state.options.maxNesting) { return false; }\n\n labelStart = start + 2;\n labelEnd = parseLinkLabel(state, start + 1);\n\n // parser failed to find ']', so it's not a valid note\n if (labelEnd < 0) { return false; }\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 if (!silent) {\n if (!state.env.footnotes) { state.env.footnotes = {}; }\n if (!state.env.footnotes.list) { state.env.footnotes.list = []; }\n footnoteId = state.env.footnotes.list.length;\n\n state.pos = labelStart;\n state.posMax = labelEnd;\n\n state.push({\n type: 'footnote_ref',\n id: footnoteId,\n level: state.level\n });\n state.linkLevel++;\n oldLength = state.tokens.length;\n state.parser.tokenize(state);\n state.env.footnotes.list[footnoteId] = { tokens: state.tokens.splice(oldLength) };\n state.linkLevel--;\n }\n\n state.pos = labelEnd + 1;\n state.posMax = max;\n return true;\n}\n\n// Process footnote references ([^...])\n\nfunction footnote_ref(state, silent) {\n var label,\n pos,\n footnoteId,\n footnoteSubId,\n max = state.posMax,\n start = state.pos;\n\n // should be at least 4 chars - \"[^x]\"\n if (start + 3 > max) { return false; }\n\n if (!state.env.footnotes || !state.env.footnotes.refs) { return false; }\n if (state.src.charCodeAt(start) !== 0x5B/* [ */) { return false; }\n if (state.src.charCodeAt(start + 1) !== 0x5E/* ^ */) { return false; }\n if (state.level >= state.options.maxNesting) { return false; }\n\n for (pos = start + 2; pos < max; pos++) {\n if (state.src.charCodeAt(pos) === 0x20) { return false; }\n if (state.src.charCodeAt(pos) === 0x0A) { return false; }\n if (state.src.charCodeAt(pos) === 0x5D /* ] */) {\n break;\n }\n }\n\n if (pos === start + 2) { return false; } // no empty footnote labels\n if (pos >= max) { return false; }\n pos++;\n\n label = state.src.slice(start + 2, pos - 1);\n if (typeof state.env.footnotes.refs[':' + label] === 'undefined') { return false; }\n\n if (!silent) {\n if (!state.env.footnotes.list) { state.env.footnotes.list = []; }\n\n if (state.env.footnotes.refs[':' + label] < 0) {\n footnoteId = state.env.footnotes.list.length;\n state.env.footnotes.list[footnoteId] = { label: label, count: 0 };\n state.env.footnotes.refs[':' + label] = footnoteId;\n } else {\n footnoteId = state.env.footnotes.refs[':' + label];\n }\n\n footnoteSubId = state.env.footnotes.list[footnoteId].count;\n state.env.footnotes.list[footnoteId].count++;\n\n state.push({\n type: 'footnote_ref',\n id: footnoteId,\n subId: footnoteSubId,\n level: state.level\n });\n }\n\n state.pos = pos;\n state.posMax = max;\n return true;\n}\n\n// List of valid url schemas, accorting to commonmark spec\n// http://jgm.github.io/CommonMark/spec.html#autolinks\n\nvar url_schemas = [\n 'coap',\n 'doi',\n 'javascript',\n 'aaa',\n 'aaas',\n 'about',\n 'acap',\n 'cap',\n 'cid',\n 'crid',\n 'data',\n 'dav',\n 'dict',\n 'dns',\n 'file',\n 'ftp',\n 'geo',\n 'go',\n 'gopher',\n 'h323',\n 'http',\n 'https',\n 'iax',\n 'icap',\n 'im',\n 'imap',\n 'info',\n 'ipp',\n 'iris',\n 'iris.beep',\n 'iris.xpc',\n 'iris.xpcs',\n 'iris.lwz',\n 'ldap',\n 'mailto',\n 'mid',\n 'msrp',\n 'msrps',\n 'mtqp',\n 'mupdate',\n 'news',\n 'nfs',\n 'ni',\n 'nih',\n 'nntp',\n 'opaquelocktoken',\n 'pop',\n 'pres',\n 'rtsp',\n 'service',\n 'session',\n 'shttp',\n 'sieve',\n 'sip',\n 'sips',\n 'sms',\n 'snmp',\n 'soap.beep',\n 'soap.beeps',\n 'tag',\n 'tel',\n 'telnet',\n 'tftp',\n 'thismessage',\n 'tn3270',\n 'tip',\n 'tv',\n 'urn',\n 'vemmi',\n 'ws',\n 'wss',\n 'xcon',\n 'xcon-userid',\n 'xmlrpc.beep',\n 'xmlrpc.beeps',\n 'xmpp',\n 'z39.50r',\n 'z39.50s',\n 'adiumxtra',\n 'afp',\n 'afs',\n 'aim',\n 'apt',\n 'attachment',\n 'aw',\n 'beshare',\n 'bitcoin',\n 'bolo',\n 'callto',\n 'chrome',\n 'chrome-extension',\n 'com-eventbrite-attendee',\n 'content',\n 'cvs',\n 'dlna-playsingle',\n 'dlna-playcontainer',\n 'dtn',\n 'dvb',\n 'ed2k',\n 'facetime',\n 'feed',\n 'finger',\n 'fish',\n 'gg',\n 'git',\n 'gizmoproject',\n 'gtalk',\n 'hcp',\n 'icon',\n 'ipn',\n 'irc',\n 'irc6',\n 'ircs',\n 'itms',\n 'jar',\n 'jms',\n 'keyparc',\n 'lastfm',\n 'ldaps',\n 'magnet',\n 'maps',\n 'market',\n 'message',\n 'mms',\n 'ms-help',\n 'msnim',\n 'mumble',\n 'mvn',\n 'notes',\n 'oid',\n 'palm',\n 'paparazzi',\n 'platform',\n 'proxy',\n 'psyc',\n 'query',\n 'res',\n 'resource',\n 'rmi',\n 'rsync',\n 'rtmp',\n 'secondlife',\n 'sftp',\n 'sgn',\n 'skype',\n 'smb',\n 'soldat',\n 'spotify',\n 'ssh',\n 'steam',\n 'svn',\n 'teamspeak',\n 'things',\n 'udp',\n 'unreal',\n 'ut2004',\n 'ventrilo',\n 'view-source',\n 'webcal',\n 'wtai',\n 'wyciwyg',\n 'xfire',\n 'xri',\n 'ymsgr'\n];\n\n// Process autolinks ''\n\n\n/*eslint max-len:0*/\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.\\-]{1,25}):([^<>\\x00-\\x20]*)>/;\n\n\nfunction autolink(state, silent) {\n var tail, linkMatch, emailMatch, url, fullUrl, pos = state.pos;\n\n if (state.src.charCodeAt(pos) !== 0x3C/* < */) { return false; }\n\n tail = state.src.slice(pos);\n\n if (tail.indexOf('>') < 0) { return false; }\n\n linkMatch = tail.match(AUTOLINK_RE);\n\n if (linkMatch) {\n if (url_schemas.indexOf(linkMatch[1].toLowerCase()) < 0) { return false; }\n\n url = linkMatch[0].slice(1, -1);\n fullUrl = normalizeLink(url);\n if (!state.parser.validateLink(url)) { return false; }\n\n if (!silent) {\n state.push({\n type: 'link_open',\n href: fullUrl,\n level: state.level\n });\n state.push({\n type: 'text',\n content: url,\n level: state.level + 1\n });\n state.push({ type: 'link_close', level: state.level });\n }\n\n state.pos += linkMatch[0].length;\n return true;\n }\n\n emailMatch = tail.match(EMAIL_RE);\n\n if (emailMatch) {\n\n url = emailMatch[0].slice(1, -1);\n\n fullUrl = normalizeLink('mailto:' + url);\n if (!state.parser.validateLink(fullUrl)) { return false; }\n\n if (!silent) {\n state.push({\n type: 'link_open',\n href: fullUrl,\n level: state.level\n });\n state.push({\n type: 'text',\n content: url,\n level: state.level + 1\n });\n state.push({ type: 'link_close', level: state.level });\n }\n\n state.pos += emailMatch[0].length;\n return true;\n }\n\n return false;\n}\n\n// Regexps to match html elements\n\nfunction replace$1(regex, options) {\n regex = regex.source;\n options = options || '';\n\n return function self(name, val) {\n if (!name) {\n return new RegExp(regex, options);\n }\n val = val.source || val;\n regex = regex.replace(name, val);\n return self;\n };\n}\n\n\nvar attr_name = /[a-zA-Z_:][a-zA-Z0-9:._-]*/;\n\nvar unquoted = /[^\"'=<>`\\x00-\\x20]+/;\nvar single_quoted = /'[^']*'/;\nvar double_quoted = /\"[^\"]*\"/;\n\n/*eslint no-spaced-func:0*/\nvar attr_value = replace$1(/(?:unquoted|single_quoted|double_quoted)/)\n ('unquoted', unquoted)\n ('single_quoted', single_quoted)\n ('double_quoted', double_quoted)\n ();\n\nvar attribute = replace$1(/(?:\\s+attr_name(?:\\s*=\\s*attr_value)?)/)\n ('attr_name', attr_name)\n ('attr_value', attr_value)\n ();\n\nvar open_tag = replace$1(/<[A-Za-z][A-Za-z0-9]*attribute*\\s*\\/?>/)\n ('attribute', attribute)\n ();\n\nvar close_tag = /<\\/[A-Za-z][A-Za-z0-9]*\\s*>/;\nvar comment = /|/;\nvar processing = /<[?].*?[?]>/;\nvar declaration = /]*>/;\nvar cdata = //;\n\nvar HTML_TAG_RE = replace$1(/^(?:open_tag|close_tag|comment|processing|declaration|cdata)/)\n ('open_tag', open_tag)\n ('close_tag', close_tag)\n ('comment', comment)\n ('processing', processing)\n ('declaration', declaration)\n ('cdata', cdata)\n ();\n\n// Process html tags\n\n\nfunction isLetter$2(ch) {\n /*eslint no-bitwise:0*/\n var lc = ch | 0x20; // to lower case\n return (lc >= 0x61/* a */) && (lc <= 0x7a/* z */);\n}\n\n\nfunction htmltag(state, silent) {\n var ch, match, max, pos = state.pos;\n\n if (!state.options.html) { return false; }\n\n // Check start\n max = state.posMax;\n if (state.src.charCodeAt(pos) !== 0x3C/* < */ ||\n pos + 2 >= max) {\n return false;\n }\n\n // Quick fail on second char\n ch = state.src.charCodeAt(pos + 1);\n if (ch !== 0x21/* ! */ &&\n ch !== 0x3F/* ? */ &&\n ch !== 0x2F/* / */ &&\n !isLetter$2(ch)) {\n return false;\n }\n\n match = state.src.slice(pos).match(HTML_TAG_RE);\n if (!match) { return false; }\n\n if (!silent) {\n state.push({\n type: 'htmltag',\n content: state.src.slice(pos, pos + match[0].length),\n level: state.level\n });\n }\n state.pos += match[0].length;\n return true;\n}\n\n// Process html entity - {, ¯, ", ...\n\n\nvar DIGITAL_RE = /^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i;\nvar NAMED_RE = /^&([a-z][a-z0-9]{1,31});/i;\n\n\nfunction entity(state, silent) {\n var ch, code, match, pos = state.pos, max = state.posMax;\n\n if (state.src.charCodeAt(pos) !== 0x26/* & */) { return false; }\n\n if (pos + 1 < max) {\n ch = state.src.charCodeAt(pos + 1);\n\n if (ch === 0x23 /* # */) {\n match = state.src.slice(pos).match(DIGITAL_RE);\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 state.pos += match[0].length;\n return true;\n }\n } else {\n match = state.src.slice(pos).match(NAMED_RE);\n if (match) {\n var decoded = decodeEntity(match[1]);\n if (match[1] !== decoded) {\n if (!silent) { state.pending += decoded; }\n state.pos += match[0].length;\n return true;\n }\n }\n }\n }\n\n if (!silent) { state.pending += '&'; }\n state.pos++;\n return true;\n}\n\n/**\n * Inline Parser `rules`\n */\n\nvar _rules$2 = [\n [ 'text', text ],\n [ 'newline', newline ],\n [ 'escape', escape ],\n [ 'backticks', backticks ],\n [ 'del', del ],\n [ 'ins', ins ],\n [ 'mark', mark ],\n [ 'emphasis', emphasis ],\n [ 'sub', sub ],\n [ 'sup', sup ],\n [ 'links', links ],\n [ 'footnote_inline', footnote_inline ],\n [ 'footnote_ref', footnote_ref ],\n [ 'autolink', autolink ],\n [ 'htmltag', htmltag ],\n [ 'entity', entity ]\n];\n\n/**\n * Inline Parser class. Note that link validation is stricter\n * in Remarkable than what is specified by CommonMark. If you\n * want to change this you can use a custom validator.\n *\n * @api private\n */\n\nfunction ParserInline() {\n this.ruler = new Ruler();\n for (var i = 0; i < _rules$2.length; i++) {\n this.ruler.push(_rules$2[i][0], _rules$2[i][1]);\n }\n\n // Can be overridden with a custom validator\n this.validateLink = validateLink;\n}\n\n/**\n * Skip a single token by running all rules in validation mode.\n * Returns `true` if any rule reports success.\n *\n * @param {Object} `state`\n * @api privage\n */\n\nParserInline.prototype.skipToken = function (state) {\n var rules = this.ruler.getRules('');\n var len = rules.length;\n var pos = state.pos;\n var i, cached_pos;\n\n if ((cached_pos = state.cacheGet(pos)) > 0) {\n state.pos = cached_pos;\n return;\n }\n\n for (i = 0; i < len; i++) {\n if (rules[i](state, true)) {\n state.cacheSet(pos, state.pos);\n return;\n }\n }\n\n state.pos++;\n state.cacheSet(pos, state.pos);\n};\n\n/**\n * Generate tokens for the given input range.\n *\n * @param {Object} `state`\n * @api private\n */\n\nParserInline.prototype.tokenize = function (state) {\n var rules = this.ruler.getRules('');\n var len = rules.length;\n var end = state.posMax;\n var ok, i;\n\n while (state.pos < end) {\n\n // Try all possible rules.\n // On success, the rule should:\n //\n // - update `state.pos`\n // - update `state.tokens`\n // - return true\n for (i = 0; i < len; i++) {\n ok = rules[i](state, false);\n\n if (ok) {\n break;\n }\n }\n\n if (ok) {\n if (state.pos >= end) { break; }\n continue;\n }\n\n state.pending += state.src[state.pos++];\n }\n\n if (state.pending) {\n state.pushPending();\n }\n};\n\n/**\n * Parse the given input string.\n *\n * @param {String} `str`\n * @param {Object} `options`\n * @param {Object} `env`\n * @param {Array} `outTokens`\n * @api private\n */\n\nParserInline.prototype.parse = function (str, options, env, outTokens) {\n var state = new StateInline(str, this, options, env, outTokens);\n this.tokenize(state);\n};\n\n/**\n * Validate the given `url` by checking for bad protocols.\n *\n * @param {String} `url`\n * @return {Boolean}\n */\n\nfunction validateLink(url) {\n var BAD_PROTOCOLS = [ 'vbscript', 'javascript', 'file', 'data' ];\n var str = url.trim().toLowerCase();\n // Care about digital entities \"javascript:alert(1)\"\n str = replaceEntities(str);\n if (str.indexOf(':') !== -1 && BAD_PROTOCOLS.indexOf(str.split(':')[0]) !== -1) {\n return false;\n }\n return true;\n}\n\n// Remarkable default options\n\nvar defaultConfig = {\n options: {\n html: false, // Enable HTML tags in source\n xhtmlOut: false, // Use '/' to close single tags (
    )\n breaks: false, // Convert '\\n' in paragraphs into
    \n langPrefix: 'language-', // CSS language prefix for fenced blocks\n linkTarget: '', // set target to open link in\n\n // Enable some language-neutral replacements + quotes beautification\n typographer: false,\n\n // Double + single quotes replacement pairs, when typographer enabled,\n // and smartquotes on. Set doubles to '«»' for Russian, '„“' for German.\n quotes: '“”‘’',\n\n // Highlighter function. Should return escaped HTML,\n // or '' if input not changed\n //\n // function (/*str, lang*/) { return ''; }\n //\n highlight: null,\n\n maxNesting: 20 // Internal protection, recursion limit\n },\n\n components: {\n\n core: {\n rules: [\n 'block',\n 'inline',\n 'references',\n 'replacements',\n 'smartquotes',\n 'references',\n 'abbr2',\n 'footnote_tail'\n ]\n },\n\n block: {\n rules: [\n 'blockquote',\n 'code',\n 'fences',\n 'footnote',\n 'heading',\n 'hr',\n 'htmlblock',\n 'lheading',\n 'list',\n 'paragraph',\n 'table'\n ]\n },\n\n inline: {\n rules: [\n 'autolink',\n 'backticks',\n 'del',\n 'emphasis',\n 'entity',\n 'escape',\n 'footnote_ref',\n 'htmltag',\n 'links',\n 'newline',\n 'text'\n ]\n }\n }\n};\n\n// Remarkable default options\n\nvar fullConfig = {\n options: {\n html: false, // Enable HTML tags in source\n xhtmlOut: false, // Use '/' to close single tags (
    )\n breaks: false, // Convert '\\n' in paragraphs into
    \n langPrefix: 'language-', // CSS language prefix for fenced blocks\n linkTarget: '', // set target to open link in\n\n // Enable some language-neutral replacements + quotes beautification\n typographer: false,\n\n // Double + single quotes replacement pairs, when typographer enabled,\n // and smartquotes on. Set doubles to '«»' for Russian, '„“' for German.\n quotes: '“”‘’',\n\n // Highlighter function. Should return escaped HTML,\n // or '' if input not changed\n //\n // function (/*str, lang*/) { return ''; }\n //\n highlight: null,\n\n maxNesting: 20 // Internal protection, recursion limit\n },\n\n components: {\n // Don't restrict core/block/inline rules\n core: {},\n block: {},\n inline: {}\n }\n};\n\n// Commonmark default options\n\nvar commonmarkConfig = {\n options: {\n html: true, // Enable HTML tags in source\n xhtmlOut: true, // Use '/' to close single tags (
    )\n breaks: false, // Convert '\\n' in paragraphs into
    \n langPrefix: 'language-', // CSS language prefix for fenced blocks\n linkTarget: '', // set target to open link in\n\n // Enable some language-neutral replacements + quotes beautification\n typographer: false,\n\n // Double + single quotes replacement pairs, when typographer enabled,\n // and smartquotes on. Set doubles to '«»' for Russian, '„“' for German.\n quotes: '“”‘’',\n\n // Highlighter function. Should return escaped HTML,\n // or '' if input not changed\n //\n // function (/*str, lang*/) { return ''; }\n //\n highlight: null,\n\n maxNesting: 20 // Internal protection, recursion limit\n },\n\n components: {\n\n core: {\n rules: [\n 'block',\n 'inline',\n 'references',\n 'abbr2'\n ]\n },\n\n block: {\n rules: [\n 'blockquote',\n 'code',\n 'fences',\n 'heading',\n 'hr',\n 'htmlblock',\n 'lheading',\n 'list',\n 'paragraph'\n ]\n },\n\n inline: {\n rules: [\n 'autolink',\n 'backticks',\n 'emphasis',\n 'entity',\n 'escape',\n 'htmltag',\n 'links',\n 'newline',\n 'text'\n ]\n }\n }\n};\n\n/**\n * Preset configs\n */\n\nvar config = {\n 'default': defaultConfig,\n 'full': fullConfig,\n 'commonmark': commonmarkConfig\n};\n\n/**\n * The `StateCore` class manages state.\n *\n * @param {Object} `instance` Remarkable instance\n * @param {String} `str` Markdown string\n * @param {Object} `env`\n */\n\nfunction StateCore(instance, str, env) {\n this.src = str;\n this.env = env;\n this.options = instance.options;\n this.tokens = [];\n this.inlineMode = false;\n\n this.inline = instance.inline;\n this.block = instance.block;\n this.renderer = instance.renderer;\n this.typographer = instance.typographer;\n}\n\n/**\n * The main `Remarkable` class. Create an instance of\n * `Remarkable` with a `preset` and/or `options`.\n *\n * @param {String} `preset` If no preset is given, `default` is used.\n * @param {Object} `options`\n */\n\nfunction Remarkable(preset, options) {\n if (typeof preset !== 'string') {\n options = preset;\n preset = 'default';\n }\n\n if (options && options.linkify != null) {\n console.warn(\n 'linkify option is removed. Use linkify plugin instead:\\n\\n' +\n 'import Remarkable from \\'remarkable\\';\\n' +\n 'import linkify from \\'remarkable/linkify\\';\\n' +\n 'new Remarkable().use(linkify)\\n'\n );\n }\n\n this.inline = new ParserInline();\n this.block = new ParserBlock();\n this.core = new Core();\n this.renderer = new Renderer();\n this.ruler = new Ruler();\n\n this.options = {};\n this.configure(config[preset]);\n this.set(options || {});\n}\n\n/**\n * Set options as an alternative to passing them\n * to the constructor.\n *\n * ```js\n * md.set({typographer: true});\n * ```\n * @param {Object} `options`\n * @api public\n */\n\nRemarkable.prototype.set = function (options) {\n assign(this.options, options);\n};\n\n/**\n * Batch loader for components rules states, and options\n *\n * @param {Object} `presets`\n */\n\nRemarkable.prototype.configure = function (presets) {\n var self = this;\n\n if (!presets) { throw new Error('Wrong `remarkable` preset, check name/content'); }\n if (presets.options) { self.set(presets.options); }\n if (presets.components) {\n Object.keys(presets.components).forEach(function (name) {\n if (presets.components[name].rules) {\n self[name].ruler.enable(presets.components[name].rules, true);\n }\n });\n }\n};\n\n/**\n * Use a plugin.\n *\n * ```js\n * var md = new Remarkable();\n *\n * md.use(plugin1)\n * .use(plugin2, opts)\n * .use(plugin3);\n * ```\n *\n * @param {Function} `plugin`\n * @param {Object} `options`\n * @return {Object} `Remarkable` for chaining\n */\n\nRemarkable.prototype.use = function (plugin, options) {\n plugin(this, options);\n return this;\n};\n\n\n/**\n * Parse the input `string` and return a tokens array.\n * Modifies `env` with definitions data.\n *\n * @param {String} `string`\n * @param {Object} `env`\n * @return {Array} Array of tokens\n */\n\nRemarkable.prototype.parse = function (str, env) {\n var state = new StateCore(this, str, env);\n this.core.process(state);\n return state.tokens;\n};\n\n/**\n * The main `.render()` method that does all the magic :)\n *\n * @param {String} `string`\n * @param {Object} `env`\n * @return {String} Rendered HTML.\n */\n\nRemarkable.prototype.render = function (str, env) {\n env = env || {};\n return this.renderer.render(this.parse(str, env), this.options, env);\n};\n\n/**\n * Parse the given content `string` as a single string.\n *\n * @param {String} `string`\n * @param {Object} `env`\n * @return {Array} Array of tokens\n */\n\nRemarkable.prototype.parseInline = function (str, env) {\n var state = new StateCore(this, str, env);\n state.inlineMode = true;\n this.core.process(state);\n return state.tokens;\n};\n\n/**\n * Render a single content `string`, without wrapping it\n * to paragraphs\n *\n * @param {String} `str`\n * @param {Object} `env`\n * @return {String}\n */\n\nRemarkable.prototype.renderInline = function (str, env) {\n env = env || {};\n return this.renderer.render(this.parseInline(str, env), this.options, env);\n};\n\nexport { Remarkable, utils };\n"],"names":["Container","AtRule","constructor","defaults","super","this","type","append","children","proxyOf","nodes","prepend","module","exports","default","registerAtRule","Node","Comment","parse","Root","Rule","Declaration","isClean","my","cleanSource","map","i","source","markTreeDirty","node","child","normalize","last","push","markDirty","cleanRaws","keepBetween","each","callback","index","result","iterator","getIterator","indexes","length","every","condition","lastEach","getProxyProcessor","get","prop","startsWith","args","toProxy","cb","other","root","set","value","indexOf","insertAfter","exist","add","existIndex","reverse","splice","id","insertBefore","sample","Array","isArray","slice","parent","removeChild","Error","String","selector","selectors","name","text","processed","rebuild","raws","before","replace","first","unshift","removeAll","undefined","replaceValues","pattern","opts","walkDecls","decl","props","includes","fast","some","walk","e","addToError","walkAtRules","RegExp","test","walkComments","walkRules","registerParse","dependant","registerRule","registerRoot","Object","setPrototypeOf","prototype","forEach","pico","terminalHighlight","CssSyntaxError","message","line","column","file","plugin","reason","endLine","endColumn","setMessage","captureStackTrace","showSourceCode","color","css","isColorSupported","aside","mark","highlight","bold","gray","red","createColors","lines","split","start","Math","max","end","min","maxWidth","number","gutter","padding","subLineStart","subLineEnd","subLine","spacing","join","toString","code","variable","LazyResult","Processor","Document","toResult","lazy","stringify","registerLazyResult","registerProcessor","Input","PreviousMap","fromJSON","json","inputs","n","ownInputs","input","inputHydrated","__proto__","inputId","nanoid","isAbsolute","resolve","SourceMapConsumer","SourceMapGenerator","fileURLToPath","pathToFileURL","fromOffsetCache","Symbol","sourceMapAvailable","Boolean","pathAvailable","hasBOM","from","consumer","mapResolve","error","offset","pos","fromOffset","col","origin","url","lastLine","lineToIndex","prevIndex","l","mid","sourceRoot","to","fromUrl","originalPositionFor","URL","mapFile","protocol","sourceContentFor","toJSON","consumerCache","registerInput","MapGenerator","Result","TYPE_TO_CLASS_NAME","atrule","comment","document","rule","PLUGIN_PROPS","AtRuleExit","CommentExit","DeclarationExit","DocumentExit","Once","OnceExit","postcssPlugin","prepare","RootExit","RuleExit","NOT_VISITORS","CHILDREN","isPromise","obj","then","getEvents","key","toLowerCase","toStack","events","eventIndex","visitorIndex","visitors","cleanMarks","postcss","processor","stringified","inline","prev","parser","syntax","helpers","plugins","async","Promise","reject","processing","runAsync","onRejected","catch","onFinally","getAsyncError","handleError","lastPlugin","postcssVersion","err","console","prepareVisitors","listeners","event","version","filter","hasListener","keys","promise","runOnRoot","stack","visitTick","visitor","roots","subRoot","all","sync","str","stringifier","data","generate","walkSync","visitSync","onFulfilled","visit","pop","warnings","content","messages","toStringTag","registerPostcss","list","comma","string","space","spaces","separators","array","current","func","inQuote","prevQuote","escape","letter","trim","dirname","relative","sep","cssString","mapOpts","originalCSS","usesFileUrls","absolute","memoizedFileURLs","Map","memoizedPaths","memoizedURLs","addAnnotation","isInline","toBase64","annotation","outputFile","eol","applyPrevMaps","previous","toUrl","path","sourcesContent","applySourceMap","clearAnnotation","isMap","generateMap","generateString","fromSourceMap","ignoreInvalidMapping","addMapping","generated","original","isSourcesContent","setSourcesContent","isAnnotation","noSource","mapping","sourcePath","match","lastIndexOf","p","childless","semicolon","withContent","charCodeAt","cached","previousMaps","already","toFileUrl","setSourceContent","Buffer","window","btoa","unescape","encodeURIComponent","fileURL","encodeURI","NoWorkResult","_processor","_css","_opts","_map","self","defineProperty","generatedCSS","generatedMap","_root","Stringifier","cloneNode","cloned","hasOwnProperty","call","j","sourceOffset","inputCSS","position","clone","postcssNode","s","after","assign","overrides","between","cloneAfter","cloneBefore","rangeBy","markClean","next","positionBy","positionInside","word","stringRepresentation","endIndex","raw","defaultType","remove","replaceWith","bookmark","foundSelf","_","fixed","emitInputs","inputsNextIndex","proxyCache","Proxy","warn","Parser","tokenizer","SAFE_COMMENT_NEIGHBOR","empty","findLastWithPosition","tokens","token","createTokenizer","shift","unnamedAtrule","init","open","params","brackets","endOfFile","nextToken","getPosition","spacesAndCommentsFromEnd","afterName","spacesAndCommentsFromStart","checkMissedSemicolon","colon","founded","element","entries","doubleColon","left","right","customProperty","unknownWord","firstSpaces","precheckMissedSemicolon","important","stringFrom","spacesFromEnd","cache","hasWord","concat","emptyRule","unexpectedClose","endFile","unclosedBlock","freeSemicolon","ownSemicolon","bracket","back","unclosedBracket","clean","reduce","lastTokenType","Warning","initializer","warningPrinted","creator","LANG","transformer","process","processOpts","pluginOpts","atRule","existsSync","readFileSync","fromBase64","atob","loadAnnotation","startWith","loadMap","decodeInline","baseCharsetUri","baseUri","charsetUri","uri","uriMatch","decodeURIComponent","substr","baseUriMatch","encoding","getAnnotationURL","sourceMapString","mappings","_mappings","sections","comments","substring","loadFile","JSON","prevPath","normalized","use","warning","ignore","values","DEFAULT_RAW","beforeClose","beforeComment","beforeDecl","beforeOpen","beforeRule","commentLeft","commentRight","emptyBody","indent","capitalize","toUpperCase","builder","rawValue","block","beforeAfter","detect","buf","depth","step","body","own","rawCache","method","rawBeforeClose","rawBeforeComment","rawBeforeDecl","rawBeforeOpen","rawBeforeRule","rawColon","rawEmptyBody","rawIndent","parts","rawSemicolon","SINGLE_QUOTE","DOUBLE_QUOTE","BACKSLASH","SLASH","NEWLINE","SPACE","FEED","TAB","CR","OPEN_SQUARE","CLOSE_SQUARE","OPEN_PARENTHESES","CLOSE_PARENTHESES","OPEN_CURLY","CLOSE_CURLY","SEMICOLON","ASTERISK","COLON","AT","RE_AT_END","RE_WORD_END","RE_BAD_BRACKET","RE_HEX_ESCAPE","options","quote","currentToken","escaped","escapePos","valueOf","ignoreErrors","buffer","returned","unclosed","what","ignoreUnclosed","controlChar","fromCharCode","lastIndex","charAt","printed","range","opt","textarea","decodeEntity","createElement","innerHTML","hasOwn","has","object","sources","arguments","TypeError","UNESCAPE_MD_RE","unescapeMd","isValidEntityCode","c","fromCodePoint","surrogate1","surrogate2","NAMED_ENTITY_RE","DIGITAL_ENTITY_TEST_RE","replaceEntityPattern","decoded","parseInt","replaceEntities","HTML_ESCAPE_TEST_RE","HTML_ESCAPE_REPLACE_RE","HTML_REPLACEMENTS","replaceUnsafeChar","ch","escapeHtml","rules","idx","tight","blockquote_open","blockquote_close","getBreak","fence","env","instance","fences","fenceName","highlighted","langClass","langPrefix","langName","fence_custom","apply","heading_open","hLevel","heading_close","hr","xhtmlOut","bullet_list_open","bullet_list_close","list_item_open","list_item_close","ordered_list_open","order","ordered_list_close","paragraph_open","paragraph_close","addBreak","link_open","title","target","linkTarget","href","link_close","image","src","alt","suffix","table_open","table_close","thead_open","thead_close","tbody_open","tbody_close","tr_open","tr_close","th_open","align","th_close","td_open","td_close","strong_open","strong_close","em_open","em_close","del_open","del_close","ins_open","ins_close","mark_open","mark_close","sub","sup","hardbreak","softbreak","breaks","htmlblock","htmltag","abbr_open","abbr_close","footnote_ref","Number","subId","footnote_block_open","footnote_block_close","footnote_open","footnote_close","footnote_anchor","dl_open","dt_open","dd_open","dl_close","dt_close","dd_close","Renderer","Ruler","__rules__","__cache__","state","inlineMode","level","StateInline","parserInline","outTokens","posMax","pending","pendingLevel","isInLabel","linkLevel","linkContent","labelUnmatchedScopes","parseLinkLabel","found","marker","labelEnd","oldPos","oldFlag","skipToken","parseAbbr","label","abbreviations","abbr","normalizeLink","decodeURI","parseLinkDestination","link","validateLink","parseLinkTitle","normalizeReference","parseReference","references","tok","footnote_block","t","lastParagraph","currentLabel","insideRef","refTokens","footnotes","count","renderInline","_rules","len","render","__find__","__compile__","chains","enabled","altName","chain","fn","at","beforeName","ruleName","enable","strict","disable","getRules","chainName","pushPending","cacheSet","val","cacheGet","PUNCT_CHARS","regEscape","abbr2","reg","m","regText","blockTokens","abbrRegExp","x","sort","a","b","exec","RARE_RE","SCOPED_ABBR_RE","SCOPED_ABBR","replaceScopedAbbr","inlineTokens","blkIdx","typographer","QUOTE_TEST_RE","QUOTE_RE","PUNCT_RE","APOSTROPHE","isLetter","replaceAt","smartquotes","thisLevel","lastSpace","nextSpace","item","canOpen","canClose","isSingle","OUTER","single","quotes","Core","ruler","StateBlock","indent_found","bMarks","eMarks","tShift","blkIndent","lineMax","parentType","ddIndent","startLine","nextLine","isEmpty","getLines","silent","mem","haveEndMarker","skipChars","skipSpaces","blockquote","lastLineEmpty","oldTShift","oldBMarks","oldIndent","oldParentType","terminatorRules","terminate","maxNesting","tokenize","cnt","skipBulletListMarker","skipOrderedListMarker","markTightParagraphs","oldTight","posAfterMarker","indentAfterMarker","markerValue","markerCharCode","isOrdered","contentStart","listTokIdx","prevEmptyEnd","listLines","itemLines","footnote","oldBMark","refs","heading","tmp","skipCharsBack","lheading","skipEmptyLines","begin","keepLastLF","queue","html_blocks","HTML_TAG_OPEN_RE","HTML_TAG_CLOSE_RE","isLetter$1","lc","html","getLine","table","lineText","rows","cell","aligns","tableLines","tbodyLines","skipMarker","markTightParagraphs$1","deflist","ddLine","dtLine","oldDDIndent","paragraph","_rules$1","ParserBlock","ok","hasEmptyLines","TABS_SCAN_RE","NEWLINES_RE","SPACES_RE","isTerminatorChar","newline","pmax","lineStart","lastTabPos","ESCAPED","backticks","matchStart","matchEnd","del","lastChar","nextChar","ins","isAlphaNum","scanDelims","can_open","can_close","delims","emphasis","startCount","oldCount","newCount","res","UNESCAPE_RE","UNESCAPE_RE$1","links","labelStart","ref","isImage","footnote_inline","footnoteId","oldLength","footnoteSubId","url_schemas","EMAIL_RE","AUTOLINK_RE","autolink","tail","linkMatch","emailMatch","fullUrl","replace$1","regex","attr_name","unquoted","single_quoted","double_quoted","attr_value","attribute","open_tag","close_tag","declaration","cdata","HTML_TAG_RE","isLetter$2","DIGITAL_RE","NAMED_RE","entity","_rules$2","ParserInline","BAD_PROTOCOLS","cached_pos","defaultConfig","components","core","fullConfig","commonmarkConfig","config","StateCore","renderer","Remarkable","preset","linkify","configure","presets","parseInline"],"sourceRoot":""}