├── .gitignore ├── LICENSE ├── README.md ├── browser.js ├── index.html ├── index.js ├── index.mjs ├── package-lock.json ├── package.json ├── rollup.config.mjs └── test ├── all.js └── fixtures └── default.txt /.gitignore: -------------------------------------------------------------------------------- 1 | index.js 2 | package-lock.json 3 | 4 | # Created by .ignore support plugin (hsz.mobi) 5 | ### macOS template 6 | # General 7 | .DS_Store 8 | .AppleDouble 9 | .LSOverride 10 | 11 | # Icon must end with two \r 12 | Icon 13 | 14 | # Thumbnails 15 | ._* 16 | 17 | # Files that might appear in the root of a volume 18 | .DocumentRevisions-V100 19 | .fseventsd 20 | .Spotlight-V100 21 | .TemporaryItems 22 | .Trashes 23 | .VolumeIcon.icns 24 | .com.apple.timemachine.donotpresent 25 | 26 | # Directories potentially created on remote AFP share 27 | .AppleDB 28 | .AppleDesktop 29 | Network Trash Folder 30 | Temporary Items 31 | .apdisk 32 | ### JetBrains template 33 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm 34 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 35 | 36 | # User-specific stuff 37 | .idea/**/workspace.xml 38 | .idea/**/tasks.xml 39 | .idea/**/dictionaries 40 | .idea/**/shelf 41 | 42 | # Sensitive or high-churn files 43 | .idea/**/dataSources/ 44 | .idea/**/dataSources.ids 45 | .idea/**/dataSources.local.xml 46 | .idea/**/sqlDataSources.xml 47 | .idea/**/dynamic.xml 48 | .idea/**/uiDesigner.xml 49 | .idea/**/dbnavigator.xml 50 | 51 | # Gradle 52 | .idea/**/gradle.xml 53 | .idea/**/libraries 54 | 55 | # CMake 56 | cmake-build-debug/ 57 | cmake-build-release/ 58 | 59 | # Mongo Explorer plugin 60 | .idea/**/mongoSettings.xml 61 | 62 | # File-based project format 63 | *.iws 64 | 65 | # IntelliJ 66 | out/ 67 | 68 | # mpeltonen/sbt-idea plugin 69 | .idea_modules/ 70 | 71 | # JIRA plugin 72 | atlassian-ide-plugin.xml 73 | 74 | # Cursive Clojure plugin 75 | .idea/replstate.xml 76 | 77 | # Crashlytics plugin (for Android Studio and IntelliJ) 78 | com_crashlytics_export_strings.xml 79 | crashlytics.properties 80 | crashlytics-build.properties 81 | fabric.properties 82 | 83 | # Editor-based Rest Client 84 | .idea/httpRequests 85 | ### Windows template 86 | # Windows thumbnail cache files 87 | Thumbs.db 88 | ehthumbs.db 89 | ehthumbs_vista.db 90 | 91 | # Dump file 92 | *.stackdump 93 | 94 | # Folder config file 95 | [Dd]esktop.ini 96 | 97 | # Recycle Bin used on file shares 98 | $RECYCLE.BIN/ 99 | 100 | # Windows Installer files 101 | *.cab 102 | *.msi 103 | *.msix 104 | *.msm 105 | *.msp 106 | 107 | # Windows shortcuts 108 | *.lnk 109 | ### Node template 110 | # Logs 111 | logs 112 | *.log 113 | npm-debug.log* 114 | yarn-debug.log* 115 | yarn-error.log* 116 | 117 | # Runtime data 118 | pids 119 | *.pid 120 | *.seed 121 | *.pid.lock 122 | 123 | # Directory for instrumented libs generated by jscoverage/JSCover 124 | lib-cov 125 | 126 | # Coverage directory used by tools like istanbul 127 | coverage 128 | 129 | # nyc test coverage 130 | .nyc_output 131 | 132 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 133 | .grunt 134 | 135 | # Bower dependency directory (https://bower.io/) 136 | bower_components 137 | 138 | # node-waf configuration 139 | .lock-wscript 140 | 141 | # Compiled binary addons (https://nodejs.org/api/addons.html) 142 | build/Release 143 | 144 | # Dependency directories 145 | node_modules/ 146 | jspm_packages/ 147 | 148 | # TypeScript v1 declaration files 149 | typings/ 150 | 151 | # Optional npm cache directory 152 | .npm 153 | 154 | # Optional eslint cache 155 | .eslintcache 156 | 157 | # Optional REPL history 158 | .node_repl_history 159 | 160 | # Output of 'npm pack' 161 | *.tgz 162 | 163 | # Yarn Integrity file 164 | .yarn-integrity 165 | 166 | # dotenv environment variables file 167 | .env 168 | 169 | # next.js build output 170 | .next 171 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Waylon Flinn 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | --- 24 | 25 | The MIT License (MIT) 26 | 27 | Copyright (c) 2018 Takahiro Ethan Ikeuchi @iktakahiro 28 | 29 | Permission is hereby granted, free of charge, to any person obtaining a copy 30 | of this software and associated documentation files (the "Software"), to deal 31 | in the Software without restriction, including without limitation the rights 32 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 33 | copies of the Software, and to permit persons to whom the Software is 34 | furnished to do so, subject to the following conditions: 35 | 36 | The above copyright notice and this permission notice shall be included in all 37 | copies or substantial portions of the Software. 38 | 39 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 40 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 41 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 42 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 43 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 44 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 45 | SOFTWARE. 46 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This plugin is forked from [@iktakahiro/markdown-it-katex](https://github.com/iktakahiro/markdown-it-katex), adding ESM support and updating dependencies. 2 | 3 | # markdown-it-katex 4 | 5 | Add Math to your Markdown 6 | 7 | [KaTeX](https://github.com/Khan/KaTeX) is a faster alternative to MathJax. This plugin makes it easy to support in your markdown. 8 | 9 | ## Install 10 | 11 | Install markdown-it 12 | 13 | ```bash 14 | npm install markdown-it 15 | ``` 16 | 17 | Install the plugin 18 | 19 | ```bash 20 | npm install @ruanyf/markdown-it-katex 21 | ``` 22 | 23 | ## Usage 24 | 25 | Load it in ES module. 26 | 27 | ```javascript 28 | import markdownit from 'markdown-it'; 29 | import mk from '@ruanyf/markdown-it-katex'; 30 | 31 | const md = markdownit(); 32 | 33 | md.use(mk); 34 | 35 | // double backslash is required for javascript strings, but not html input 36 | var result = md.render('# Math Rulez! \n $\\sqrt{3x-1}+(1+x)^2$'); 37 | ``` 38 | 39 | Or load it in CommonJS module. 40 | 41 | ```javascript 42 | var md = require('markdown-it')(), 43 | mk = require('@ruanyf/markdown-it-katex'); 44 | 45 | md.use(mk); 46 | 47 | // double backslash is required for javascript strings, but not html input 48 | var result = md.render('# Math Rulez! \n $\\sqrt{3x-1}+(1+x)^2$'); 49 | ``` 50 | 51 | Include the KaTeX stylesheet in your html: 52 | 53 | ```html 54 | 55 | ``` 56 | 57 | If you're using the default markdown-it parser, I also recommend the [github stylesheet](https://github.com/sindresorhus/github-markdown-css): 58 | 59 | ```html 60 | 61 | ``` 62 | 63 | `KaTeX` options can be supplied with the second argument to use. 64 | 65 | ```javascript 66 | md.use(mk, {"throwOnError" : false, "errorColor" : " #cc0000"}); 67 | ``` 68 | 69 | ## Examples 70 | 71 | ### Inline 72 | 73 | Surround your LaTeX with a single `$` on each side for inline rendering. 74 | 75 | ```latex 76 | $\sqrt{3x-1}+(1+x)^2$ 77 | ``` 78 | 79 | ### Block 80 | 81 | Use two (`$$`) for block rendering. This mode uses bigger symbols and centers 82 | the result. 83 | 84 | ```latex 85 | $$\begin{array}{c} 86 | 87 | \nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} & 88 | = \frac{4\pi}{c}\vec{\mathbf{j}} \nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \\ 89 | 90 | \nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \\ 91 | 92 | \nabla \cdot \vec{\mathbf{B}} & = 0 93 | 94 | \end{array}$$ 95 | ``` 96 | 97 | ## Syntax 98 | 99 | Math parsing in markdown is designed to agree with the conventions set by pandoc: 100 | 101 | Anything between two $ characters will be treated as TeX math. The opening $ must 102 | have a non-space character immediately to its right, while the closing $ must 103 | have a non-space character immediately to its left, and must not be followed 104 | immediately by a digit. Thus, $20,000 and $30,000 won’t parse as math. If for some 105 | reason you need to enclose text in literal $ characters, backslash-escape them and 106 | they won’t be treated as math delimiters. 107 | 108 | ## Math Syntax Support 109 | 110 | KaTeX is based on TeX and LaTeX. Support for both is growing. Here's a list of 111 | currently supported functions: 112 | 113 | [Things that KaTeX does not (yet) support](https://github.com/KaTeX/KaTeX/wiki/Things-that-KaTeX-does-not-%28yet%29-support) 114 | -------------------------------------------------------------------------------- /browser.js: -------------------------------------------------------------------------------- 1 | var md = require('markdown-it')(), 2 | mk = require('./index'); 3 | 4 | md.use(mk); 5 | 6 | var input = document.getElementById('input'), 7 | output = document.getElementById('output'), 8 | button = document.getElementById('button'); 9 | 10 | button.addEventListener('click', function(ev){ 11 | 12 | var result = md.render(input.value); 13 | 14 | output.innerHTML = result; 15 | 16 | }); 17 | 18 | /* 19 | 20 | # Some Math 21 | 22 | $\sqrt{3x-1}+(1+x)^2$ 23 | 24 | # Maxwells Equations 25 | 26 | $\nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} 27 | = \frac{4\pi}{c}\vec{\mathbf{j}} \nabla \cdot \vec{\mathbf{E}} = 4 \pi \rho$ 28 | 29 | $\nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} = \vec{\mathbf{0}}$ (curl of $\vec{\mathbf{E}}$ is proportional to the time derivative of $\vec{\mathbf{B}}$) 30 | 31 | $\nabla \cdot \vec{\mathbf{B}} = 0$ 32 | 33 | 34 | 35 | \sqrt{3x-1}+(1+x)^2 36 | 37 | c = \pm\sqrt{a^2 + b^2} 38 | 39 | Maxwell's Equations 40 | 41 | \nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} 42 | = \frac{4\pi}{c}\vec{\mathbf{j}} \nabla \cdot \vec{\mathbf{E}} = 4 \pi \rho 43 | 44 | \nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} = \vec{\mathbf{0}} 45 | 46 | \nabla \cdot \vec{\mathbf{B}} = 0 47 | 48 | Same thing in a LaTeX array 49 | \begin{array}{c} 50 | 51 | \nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} & 52 | = \frac{4\pi}{c}\vec{\mathbf{j}} \nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \\ 53 | 54 | \nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \\ 55 | 56 | \nabla \cdot \vec{\mathbf{B}} & = 0 57 | 58 | \end{array} 59 | 60 | 61 | \begin{array}{c} 62 | y_1 \\ 63 | y_2 \mathtt{t}_i \\ 64 | z_{3,4} 65 | \end{array} 66 | 67 | \begin{array}{c} 68 | x' &=& &x \sin\phi &+& z \cos\phi \\ 69 | z' &=& - &x \cos\phi &+& z \sin\phi \\ 70 | \end{array} 71 | 72 | 73 | 74 | # Maxwell's Equations 75 | 76 | 77 | equation | description 78 | ----------|------------ 79 | $\nabla \cdot \vec{\mathbf{B}} = 0$ | divergence of $\vec{\mathbf{B}}$ is zero 80 | $\nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} = \vec{\mathbf{0}}$ | curl of $\vec{\mathbf{E}}$ is proportional to the rate of change of $\vec{\mathbf{B}}$ 81 | $\nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} = \frac{4\pi}{c}\vec{\mathbf{j}} \nabla \cdot \vec{\mathbf{E}} = 4 \pi \rho$ | wha? 82 | 83 | ![electricity](http://i.giphy.com/Gty2oDYQ1fih2.gif) 84 | */ 85 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 23 | 24 | 25 | 36 | 37 |
38 | 39 | 40 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var katex = require('katex'); 4 | 5 | /* Process inline math */ 6 | /* 7 | Like markdown-it-simplemath, this is a stripped down, simplified version of: 8 | https://github.com/runarberg/markdown-it-math 9 | 10 | It differs in that it takes (a subset of) LaTeX as input and relies on KaTeX 11 | for rendering output. 12 | */ 13 | 14 | 15 | // Test if potential opening or closing delimieter 16 | // Assumes that there is a "$" at state.src[pos] 17 | function isValidDelim(state, pos) { 18 | var prevChar, nextChar, 19 | max = state.posMax, 20 | can_open = true, 21 | can_close = true; 22 | 23 | prevChar = pos > 0 ? state.src.charCodeAt(pos - 1) : -1; 24 | nextChar = pos + 1 <= max ? state.src.charCodeAt(pos + 1) : -1; 25 | 26 | // Check non-whitespace conditions for opening and closing, and 27 | // check that closing delimeter isn't followed by a number 28 | if (prevChar === 0x20/* " " */ || prevChar === 0x09/* \t */ || 29 | (nextChar >= 0x30/* "0" */ && nextChar <= 0x39/* "9" */)) { 30 | can_close = false; 31 | } 32 | if (nextChar === 0x20/* " " */ || nextChar === 0x09/* \t */) { 33 | can_open = false; 34 | } 35 | 36 | return { 37 | can_open: can_open, 38 | can_close: can_close 39 | }; 40 | } 41 | 42 | function math_inline(state, silent) { 43 | var start, match, token, res, pos; 44 | 45 | if (state.src[state.pos] !== "$") { return false; } 46 | 47 | res = isValidDelim(state, state.pos); 48 | if (!res.can_open) { 49 | if (!silent) { state.pending += "$"; } 50 | state.pos += 1; 51 | return true; 52 | } 53 | 54 | // First check for and bypass all properly escaped delimieters 55 | // This loop will assume that the first leading backtick can not 56 | // be the first character in state.src, which is known since 57 | // we have found an opening delimieter already. 58 | start = state.pos + 1; 59 | match = start; 60 | while ( (match = state.src.indexOf("$", match)) !== -1) { 61 | // Found potential $, look for escapes, pos will point to 62 | // first non escape when complete 63 | pos = match - 1; 64 | while (state.src[pos] === "\\") { pos -= 1; } 65 | 66 | // Even number of escapes, potential closing delimiter found 67 | if ( ((match - pos) % 2) == 1 ) { break; } 68 | match += 1; 69 | } 70 | 71 | // No closing delimter found. Consume $ and continue. 72 | if (match === -1) { 73 | if (!silent) { state.pending += "$"; } 74 | state.pos = start; 75 | return true; 76 | } 77 | 78 | // Check if we have empty content, ie: $$. Do not parse. 79 | if (match - start === 0) { 80 | if (!silent) { state.pending += "$$"; } 81 | state.pos = start + 1; 82 | return true; 83 | } 84 | 85 | // Check for valid closing delimiter 86 | res = isValidDelim(state, match); 87 | if (!res.can_close) { 88 | if (!silent) { state.pending += "$"; } 89 | state.pos = start; 90 | return true; 91 | } 92 | 93 | if (!silent) { 94 | token = state.push('math_inline', 'math', 0); 95 | token.markup = "$"; 96 | token.content = state.src.slice(start, match); 97 | } 98 | 99 | state.pos = match + 1; 100 | return true; 101 | } 102 | 103 | function math_block(state, start, end, silent){ 104 | var firstLine, lastLine, next, lastPos, found = false, token, 105 | pos = state.bMarks[start] + state.tShift[start], 106 | max = state.eMarks[start]; 107 | 108 | if(pos + 2 > max){ return false; } 109 | if(state.src.slice(pos,pos+2)!=='$$'){ return false; } 110 | 111 | pos += 2; 112 | firstLine = state.src.slice(pos,max); 113 | 114 | if(silent){ return true; } 115 | if(firstLine.trim().slice(-2)==='$$'){ 116 | // Single line expression 117 | firstLine = firstLine.trim().slice(0, -2); 118 | found = true; 119 | } 120 | 121 | for(next = start; !found; ){ 122 | 123 | next++; 124 | 125 | if(next >= end){ break; } 126 | 127 | pos = state.bMarks[next]+state.tShift[next]; 128 | max = state.eMarks[next]; 129 | 130 | if(pos < max && state.tShift[next] < state.blkIndent){ 131 | // non-empty line with negative indent should stop the list: 132 | break; 133 | } 134 | 135 | if(state.src.slice(pos,max).trim().slice(-2)==='$$'){ 136 | lastPos = state.src.slice(0,max).lastIndexOf('$$'); 137 | lastLine = state.src.slice(pos,lastPos); 138 | found = true; 139 | } 140 | 141 | } 142 | 143 | state.line = next + 1; 144 | 145 | token = state.push('math_block', 'math', 0); 146 | token.block = true; 147 | token.content = (firstLine && firstLine.trim() ? firstLine + '\n' : '') 148 | + state.getLines(start + 1, next, state.tShift[start], true) 149 | + (lastLine && lastLine.trim() ? lastLine : ''); 150 | token.map = [ start, state.line ]; 151 | token.markup = '$$'; 152 | return true; 153 | } 154 | 155 | function escapeHtml(unsafe) { 156 | return unsafe 157 | .replace(/&/g, "&") 158 | .replace(//g, ">") 160 | .replace(/"/g, """) 161 | .replace(/'/g, "'"); 162 | } 163 | 164 | function math_plugin(md, options) { 165 | // Default options 166 | 167 | options = options || {}; 168 | 169 | // set KaTeX as the renderer for markdown-it-simplemath 170 | var katexInline = function(latex){ 171 | options.displayMode = false; 172 | try{ 173 | return katex.renderToString(latex, options); 174 | } 175 | catch(error){ 176 | if(options.throwOnError){ console.log(error); } 177 | return `${escapeHtml(latex)}`; 178 | } 179 | }; 180 | 181 | var inlineRenderer = function(tokens, idx){ 182 | return katexInline(tokens[idx].content); 183 | }; 184 | 185 | var katexBlock = function(latex){ 186 | options.displayMode = true; 187 | try{ 188 | return "

" + katex.renderToString(latex, options) + "

"; 189 | } 190 | catch(error){ 191 | if(options.throwOnError){ console.log(error); } 192 | return `

${escapeHtml(latex)}

`; 193 | } 194 | }; 195 | 196 | var blockRenderer = function(tokens, idx){ 197 | return katexBlock(tokens[idx].content) + '\n'; 198 | }; 199 | 200 | md.inline.ruler.after('escape', 'math_inline', math_inline); 201 | md.block.ruler.after('blockquote', 'math_block', math_block, { 202 | alt: [ 'paragraph', 'reference', 'blockquote', 'list' ] 203 | }); 204 | md.renderer.rules.math_inline = inlineRenderer; 205 | md.renderer.rules.math_block = blockRenderer; 206 | } 207 | 208 | module.exports = math_plugin; 209 | -------------------------------------------------------------------------------- /index.mjs: -------------------------------------------------------------------------------- 1 | /* Process inline math */ 2 | /* 3 | Like markdown-it-simplemath, this is a stripped down, simplified version of: 4 | https://github.com/runarberg/markdown-it-math 5 | 6 | It differs in that it takes (a subset of) LaTeX as input and relies on KaTeX 7 | for rendering output. 8 | */ 9 | 10 | /*jslint node: true */ 11 | 'use strict'; 12 | 13 | import katex from 'katex'; 14 | 15 | // Test if potential opening or closing delimieter 16 | // Assumes that there is a "$" at state.src[pos] 17 | function isValidDelim(state, pos) { 18 | var prevChar, nextChar, 19 | max = state.posMax, 20 | can_open = true, 21 | can_close = true; 22 | 23 | prevChar = pos > 0 ? state.src.charCodeAt(pos - 1) : -1; 24 | nextChar = pos + 1 <= max ? state.src.charCodeAt(pos + 1) : -1; 25 | 26 | // Check non-whitespace conditions for opening and closing, and 27 | // check that closing delimeter isn't followed by a number 28 | if (prevChar === 0x20/* " " */ || prevChar === 0x09/* \t */ || 29 | (nextChar >= 0x30/* "0" */ && nextChar <= 0x39/* "9" */)) { 30 | can_close = false; 31 | } 32 | if (nextChar === 0x20/* " " */ || nextChar === 0x09/* \t */) { 33 | can_open = false; 34 | } 35 | 36 | return { 37 | can_open: can_open, 38 | can_close: can_close 39 | }; 40 | } 41 | 42 | function math_inline(state, silent) { 43 | var start, match, token, res, pos, esc_count; 44 | 45 | if (state.src[state.pos] !== "$") { return false; } 46 | 47 | res = isValidDelim(state, state.pos); 48 | if (!res.can_open) { 49 | if (!silent) { state.pending += "$"; } 50 | state.pos += 1; 51 | return true; 52 | } 53 | 54 | // First check for and bypass all properly escaped delimieters 55 | // This loop will assume that the first leading backtick can not 56 | // be the first character in state.src, which is known since 57 | // we have found an opening delimieter already. 58 | start = state.pos + 1; 59 | match = start; 60 | while ( (match = state.src.indexOf("$", match)) !== -1) { 61 | // Found potential $, look for escapes, pos will point to 62 | // first non escape when complete 63 | pos = match - 1; 64 | while (state.src[pos] === "\\") { pos -= 1; } 65 | 66 | // Even number of escapes, potential closing delimiter found 67 | if ( ((match - pos) % 2) == 1 ) { break; } 68 | match += 1; 69 | } 70 | 71 | // No closing delimter found. Consume $ and continue. 72 | if (match === -1) { 73 | if (!silent) { state.pending += "$"; } 74 | state.pos = start; 75 | return true; 76 | } 77 | 78 | // Check if we have empty content, ie: $$. Do not parse. 79 | if (match - start === 0) { 80 | if (!silent) { state.pending += "$$"; } 81 | state.pos = start + 1; 82 | return true; 83 | } 84 | 85 | // Check for valid closing delimiter 86 | res = isValidDelim(state, match); 87 | if (!res.can_close) { 88 | if (!silent) { state.pending += "$"; } 89 | state.pos = start; 90 | return true; 91 | } 92 | 93 | if (!silent) { 94 | token = state.push('math_inline', 'math', 0); 95 | token.markup = "$"; 96 | token.content = state.src.slice(start, match); 97 | } 98 | 99 | state.pos = match + 1; 100 | return true; 101 | } 102 | 103 | function math_block(state, start, end, silent){ 104 | var firstLine, lastLine, next, lastPos, found = false, token, 105 | pos = state.bMarks[start] + state.tShift[start], 106 | max = state.eMarks[start] 107 | 108 | if(pos + 2 > max){ return false; } 109 | if(state.src.slice(pos,pos+2)!=='$$'){ return false; } 110 | 111 | pos += 2; 112 | firstLine = state.src.slice(pos,max); 113 | 114 | if(silent){ return true; } 115 | if(firstLine.trim().slice(-2)==='$$'){ 116 | // Single line expression 117 | firstLine = firstLine.trim().slice(0, -2); 118 | found = true; 119 | } 120 | 121 | for(next = start; !found; ){ 122 | 123 | next++; 124 | 125 | if(next >= end){ break; } 126 | 127 | pos = state.bMarks[next]+state.tShift[next]; 128 | max = state.eMarks[next]; 129 | 130 | if(pos < max && state.tShift[next] < state.blkIndent){ 131 | // non-empty line with negative indent should stop the list: 132 | break; 133 | } 134 | 135 | if(state.src.slice(pos,max).trim().slice(-2)==='$$'){ 136 | lastPos = state.src.slice(0,max).lastIndexOf('$$'); 137 | lastLine = state.src.slice(pos,lastPos); 138 | found = true; 139 | } 140 | 141 | } 142 | 143 | state.line = next + 1; 144 | 145 | token = state.push('math_block', 'math', 0); 146 | token.block = true; 147 | token.content = (firstLine && firstLine.trim() ? firstLine + '\n' : '') 148 | + state.getLines(start + 1, next, state.tShift[start], true) 149 | + (lastLine && lastLine.trim() ? lastLine : ''); 150 | token.map = [ start, state.line ]; 151 | token.markup = '$$'; 152 | return true; 153 | } 154 | 155 | function escapeHtml(unsafe) { 156 | return unsafe 157 | .replace(/&/g, "&") 158 | .replace(//g, ">") 160 | .replace(/"/g, """) 161 | .replace(/'/g, "'"); 162 | } 163 | 164 | function math_plugin(md, options) { 165 | // Default options 166 | 167 | options = options || {}; 168 | 169 | // set KaTeX as the renderer for markdown-it-simplemath 170 | var katexInline = function(latex){ 171 | options.displayMode = false; 172 | try{ 173 | return katex.renderToString(latex, options); 174 | } 175 | catch(error){ 176 | if(options.throwOnError){ console.log(error); } 177 | return `${escapeHtml(latex)}`; 178 | } 179 | }; 180 | 181 | var inlineRenderer = function(tokens, idx){ 182 | return katexInline(tokens[idx].content); 183 | }; 184 | 185 | var katexBlock = function(latex){ 186 | options.displayMode = true; 187 | try{ 188 | return "

" + katex.renderToString(latex, options) + "

"; 189 | } 190 | catch(error){ 191 | if(options.throwOnError){ console.log(error); } 192 | return `

${escapeHtml(latex)}

`; 193 | } 194 | } 195 | 196 | var blockRenderer = function(tokens, idx){ 197 | return katexBlock(tokens[idx].content) + '\n'; 198 | } 199 | 200 | md.inline.ruler.after('escape', 'math_inline', math_inline); 201 | md.block.ruler.after('blockquote', 'math_block', math_block, { 202 | alt: [ 'paragraph', 'reference', 'blockquote', 'list' ] 203 | }); 204 | md.renderer.rules.math_inline = inlineRenderer; 205 | md.renderer.rules.math_block = blockRenderer; 206 | }; 207 | 208 | export default math_plugin; 209 | 210 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@iktakahiro/markdown-it-katex", 3 | "version": "5.0.0", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "@iktakahiro/markdown-it-katex", 9 | "version": "5.0.0", 10 | "license": "MIT", 11 | "dependencies": { 12 | "katex": "latest" 13 | }, 14 | "devDependencies": { 15 | "markdown-it": "latest", 16 | "markdown-it-testgen": "0.1.6", 17 | "rollup": "^4.18.0", 18 | "tape": "5.x" 19 | } 20 | }, 21 | "node_modules/@ljharb/resumer": { 22 | "version": "0.1.3", 23 | "resolved": "https://registry.npmjs.org/@ljharb/resumer/-/resumer-0.1.3.tgz", 24 | "integrity": "sha512-d+tsDgfkj9X5QTriqM4lKesCkMMJC3IrbPKHvayP00ELx2axdXvDfWkqjxrLXIzGcQzmj7VAUT1wopqARTvafw==", 25 | "dev": true, 26 | "license": "MIT", 27 | "dependencies": { 28 | "@ljharb/through": "^2.3.13", 29 | "call-bind": "^1.0.7" 30 | }, 31 | "engines": { 32 | "node": ">= 0.4" 33 | } 34 | }, 35 | "node_modules/@ljharb/through": { 36 | "version": "2.3.13", 37 | "resolved": "https://registry.npmjs.org/@ljharb/through/-/through-2.3.13.tgz", 38 | "integrity": "sha512-/gKJun8NNiWGZJkGzI/Ragc53cOdcLNdzjLaIa+GEjguQs0ulsurx8WN0jijdK9yPqDvziX995sMRLyLt1uZMQ==", 39 | "dev": true, 40 | "license": "MIT", 41 | "dependencies": { 42 | "call-bind": "^1.0.7" 43 | }, 44 | "engines": { 45 | "node": ">= 0.4" 46 | } 47 | }, 48 | "node_modules/@rollup/rollup-android-arm-eabi": { 49 | "version": "4.18.0", 50 | "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.0.tgz", 51 | "integrity": "sha512-Tya6xypR10giZV1XzxmH5wr25VcZSncG0pZIjfePT0OVBvqNEurzValetGNarVrGiq66EBVAFn15iYX4w6FKgQ==", 52 | "cpu": [ 53 | "arm" 54 | ], 55 | "dev": true, 56 | "license": "MIT", 57 | "optional": true, 58 | "os": [ 59 | "android" 60 | ] 61 | }, 62 | "node_modules/@rollup/rollup-android-arm64": { 63 | "version": "4.18.0", 64 | "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.18.0.tgz", 65 | "integrity": "sha512-avCea0RAP03lTsDhEyfy+hpfr85KfyTctMADqHVhLAF3MlIkq83CP8UfAHUssgXTYd+6er6PaAhx/QGv4L1EiA==", 66 | "cpu": [ 67 | "arm64" 68 | ], 69 | "dev": true, 70 | "license": "MIT", 71 | "optional": true, 72 | "os": [ 73 | "android" 74 | ] 75 | }, 76 | "node_modules/@rollup/rollup-darwin-arm64": { 77 | "version": "4.18.0", 78 | "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.18.0.tgz", 79 | "integrity": "sha512-IWfdwU7KDSm07Ty0PuA/W2JYoZ4iTj3TUQjkVsO/6U+4I1jN5lcR71ZEvRh52sDOERdnNhhHU57UITXz5jC1/w==", 80 | "cpu": [ 81 | "arm64" 82 | ], 83 | "dev": true, 84 | "license": "MIT", 85 | "optional": true, 86 | "os": [ 87 | "darwin" 88 | ] 89 | }, 90 | "node_modules/@rollup/rollup-darwin-x64": { 91 | "version": "4.18.0", 92 | "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.18.0.tgz", 93 | "integrity": "sha512-n2LMsUz7Ynu7DoQrSQkBf8iNrjOGyPLrdSg802vk6XT3FtsgX6JbE8IHRvposskFm9SNxzkLYGSq9QdpLYpRNA==", 94 | "cpu": [ 95 | "x64" 96 | ], 97 | "dev": true, 98 | "license": "MIT", 99 | "optional": true, 100 | "os": [ 101 | "darwin" 102 | ] 103 | }, 104 | "node_modules/@rollup/rollup-linux-arm-gnueabihf": { 105 | "version": "4.18.0", 106 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.18.0.tgz", 107 | "integrity": "sha512-C/zbRYRXFjWvz9Z4haRxcTdnkPt1BtCkz+7RtBSuNmKzMzp3ZxdM28Mpccn6pt28/UWUCTXa+b0Mx1k3g6NOMA==", 108 | "cpu": [ 109 | "arm" 110 | ], 111 | "dev": true, 112 | "license": "MIT", 113 | "optional": true, 114 | "os": [ 115 | "linux" 116 | ] 117 | }, 118 | "node_modules/@rollup/rollup-linux-arm-musleabihf": { 119 | "version": "4.18.0", 120 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.18.0.tgz", 121 | "integrity": "sha512-l3m9ewPgjQSXrUMHg93vt0hYCGnrMOcUpTz6FLtbwljo2HluS4zTXFy2571YQbisTnfTKPZ01u/ukJdQTLGh9A==", 122 | "cpu": [ 123 | "arm" 124 | ], 125 | "dev": true, 126 | "license": "MIT", 127 | "optional": true, 128 | "os": [ 129 | "linux" 130 | ] 131 | }, 132 | "node_modules/@rollup/rollup-linux-arm64-gnu": { 133 | "version": "4.18.0", 134 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.18.0.tgz", 135 | "integrity": "sha512-rJ5D47d8WD7J+7STKdCUAgmQk49xuFrRi9pZkWoRD1UeSMakbcepWXPF8ycChBoAqs1pb2wzvbY6Q33WmN2ftw==", 136 | "cpu": [ 137 | "arm64" 138 | ], 139 | "dev": true, 140 | "license": "MIT", 141 | "optional": true, 142 | "os": [ 143 | "linux" 144 | ] 145 | }, 146 | "node_modules/@rollup/rollup-linux-arm64-musl": { 147 | "version": "4.18.0", 148 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.18.0.tgz", 149 | "integrity": "sha512-be6Yx37b24ZwxQ+wOQXXLZqpq4jTckJhtGlWGZs68TgdKXJgw54lUUoFYrg6Zs/kjzAQwEwYbp8JxZVzZLRepQ==", 150 | "cpu": [ 151 | "arm64" 152 | ], 153 | "dev": true, 154 | "license": "MIT", 155 | "optional": true, 156 | "os": [ 157 | "linux" 158 | ] 159 | }, 160 | "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { 161 | "version": "4.18.0", 162 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.18.0.tgz", 163 | "integrity": "sha512-hNVMQK+qrA9Todu9+wqrXOHxFiD5YmdEi3paj6vP02Kx1hjd2LLYR2eaN7DsEshg09+9uzWi2W18MJDlG0cxJA==", 164 | "cpu": [ 165 | "ppc64" 166 | ], 167 | "dev": true, 168 | "license": "MIT", 169 | "optional": true, 170 | "os": [ 171 | "linux" 172 | ] 173 | }, 174 | "node_modules/@rollup/rollup-linux-riscv64-gnu": { 175 | "version": "4.18.0", 176 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.18.0.tgz", 177 | "integrity": "sha512-ROCM7i+m1NfdrsmvwSzoxp9HFtmKGHEqu5NNDiZWQtXLA8S5HBCkVvKAxJ8U+CVctHwV2Gb5VUaK7UAkzhDjlg==", 178 | "cpu": [ 179 | "riscv64" 180 | ], 181 | "dev": true, 182 | "license": "MIT", 183 | "optional": true, 184 | "os": [ 185 | "linux" 186 | ] 187 | }, 188 | "node_modules/@rollup/rollup-linux-s390x-gnu": { 189 | "version": "4.18.0", 190 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.18.0.tgz", 191 | "integrity": "sha512-0UyyRHyDN42QL+NbqevXIIUnKA47A+45WyasO+y2bGJ1mhQrfrtXUpTxCOrfxCR4esV3/RLYyucGVPiUsO8xjg==", 192 | "cpu": [ 193 | "s390x" 194 | ], 195 | "dev": true, 196 | "license": "MIT", 197 | "optional": true, 198 | "os": [ 199 | "linux" 200 | ] 201 | }, 202 | "node_modules/@rollup/rollup-linux-x64-gnu": { 203 | "version": "4.18.0", 204 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.18.0.tgz", 205 | "integrity": "sha512-xuglR2rBVHA5UsI8h8UbX4VJ470PtGCf5Vpswh7p2ukaqBGFTnsfzxUBetoWBWymHMxbIG0Cmx7Y9qDZzr648w==", 206 | "cpu": [ 207 | "x64" 208 | ], 209 | "dev": true, 210 | "license": "MIT", 211 | "optional": true, 212 | "os": [ 213 | "linux" 214 | ] 215 | }, 216 | "node_modules/@rollup/rollup-linux-x64-musl": { 217 | "version": "4.18.0", 218 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.18.0.tgz", 219 | "integrity": "sha512-LKaqQL9osY/ir2geuLVvRRs+utWUNilzdE90TpyoX0eNqPzWjRm14oMEE+YLve4k/NAqCdPkGYDaDF5Sw+xBfg==", 220 | "cpu": [ 221 | "x64" 222 | ], 223 | "dev": true, 224 | "license": "MIT", 225 | "optional": true, 226 | "os": [ 227 | "linux" 228 | ] 229 | }, 230 | "node_modules/@rollup/rollup-win32-arm64-msvc": { 231 | "version": "4.18.0", 232 | "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.18.0.tgz", 233 | "integrity": "sha512-7J6TkZQFGo9qBKH0pk2cEVSRhJbL6MtfWxth7Y5YmZs57Pi+4x6c2dStAUvaQkHQLnEQv1jzBUW43GvZW8OFqA==", 234 | "cpu": [ 235 | "arm64" 236 | ], 237 | "dev": true, 238 | "license": "MIT", 239 | "optional": true, 240 | "os": [ 241 | "win32" 242 | ] 243 | }, 244 | "node_modules/@rollup/rollup-win32-ia32-msvc": { 245 | "version": "4.18.0", 246 | "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.18.0.tgz", 247 | "integrity": "sha512-Txjh+IxBPbkUB9+SXZMpv+b/vnTEtFyfWZgJ6iyCmt2tdx0OF5WhFowLmnh8ENGNpfUlUZkdI//4IEmhwPieNg==", 248 | "cpu": [ 249 | "ia32" 250 | ], 251 | "dev": true, 252 | "license": "MIT", 253 | "optional": true, 254 | "os": [ 255 | "win32" 256 | ] 257 | }, 258 | "node_modules/@rollup/rollup-win32-x64-msvc": { 259 | "version": "4.18.0", 260 | "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.0.tgz", 261 | "integrity": "sha512-UOo5FdvOL0+eIVTgS4tIdbW+TtnBLWg1YBCcU2KWM7nuNwRz9bksDX1bekJJCpu25N1DVWaCwnT39dVQxzqS8g==", 262 | "cpu": [ 263 | "x64" 264 | ], 265 | "dev": true, 266 | "license": "MIT", 267 | "optional": true, 268 | "os": [ 269 | "win32" 270 | ] 271 | }, 272 | "node_modules/@types/estree": { 273 | "version": "1.0.5", 274 | "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", 275 | "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", 276 | "dev": true, 277 | "license": "MIT" 278 | }, 279 | "node_modules/argparse": { 280 | "version": "2.0.1", 281 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", 282 | "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", 283 | "dev": true, 284 | "license": "Python-2.0" 285 | }, 286 | "node_modules/array-buffer-byte-length": { 287 | "version": "1.0.1", 288 | "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", 289 | "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", 290 | "dev": true, 291 | "license": "MIT", 292 | "dependencies": { 293 | "call-bind": "^1.0.5", 294 | "is-array-buffer": "^3.0.4" 295 | }, 296 | "engines": { 297 | "node": ">= 0.4" 298 | }, 299 | "funding": { 300 | "url": "https://github.com/sponsors/ljharb" 301 | } 302 | }, 303 | "node_modules/array.prototype.every": { 304 | "version": "1.1.6", 305 | "resolved": "https://registry.npmjs.org/array.prototype.every/-/array.prototype.every-1.1.6.tgz", 306 | "integrity": "sha512-gNEqZD97w6bfQRNmHkFv7rNnGM+VWyHZT+h/rf9C+22owcXuENr66Lfo0phItpU5KoXW6Owb34q2+8MnSIZ57w==", 307 | "dev": true, 308 | "license": "MIT", 309 | "dependencies": { 310 | "call-bind": "^1.0.7", 311 | "define-properties": "^1.2.1", 312 | "es-abstract": "^1.23.0", 313 | "es-object-atoms": "^1.0.0", 314 | "is-string": "^1.0.7" 315 | }, 316 | "engines": { 317 | "node": ">= 0.4" 318 | }, 319 | "funding": { 320 | "url": "https://github.com/sponsors/ljharb" 321 | } 322 | }, 323 | "node_modules/arraybuffer.prototype.slice": { 324 | "version": "1.0.3", 325 | "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", 326 | "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", 327 | "dev": true, 328 | "license": "MIT", 329 | "dependencies": { 330 | "array-buffer-byte-length": "^1.0.1", 331 | "call-bind": "^1.0.5", 332 | "define-properties": "^1.2.1", 333 | "es-abstract": "^1.22.3", 334 | "es-errors": "^1.2.1", 335 | "get-intrinsic": "^1.2.3", 336 | "is-array-buffer": "^3.0.4", 337 | "is-shared-array-buffer": "^1.0.2" 338 | }, 339 | "engines": { 340 | "node": ">= 0.4" 341 | }, 342 | "funding": { 343 | "url": "https://github.com/sponsors/ljharb" 344 | } 345 | }, 346 | "node_modules/assertion-error": { 347 | "version": "1.0.0", 348 | "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.0.0.tgz", 349 | "integrity": "sha512-g/gZV+G476cnmtYI+Ko9d5khxSoCSoom/EaNmmCfwpOvBXEJ18qwFrxfP1/CsIqk2no1sAKKwxndV0tP7ROOFQ==", 350 | "dev": true, 351 | "license": "MIT", 352 | "engines": { 353 | "node": "*" 354 | } 355 | }, 356 | "node_modules/available-typed-arrays": { 357 | "version": "1.0.7", 358 | "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", 359 | "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", 360 | "dev": true, 361 | "license": "MIT", 362 | "dependencies": { 363 | "possible-typed-array-names": "^1.0.0" 364 | }, 365 | "engines": { 366 | "node": ">= 0.4" 367 | }, 368 | "funding": { 369 | "url": "https://github.com/sponsors/ljharb" 370 | } 371 | }, 372 | "node_modules/balanced-match": { 373 | "version": "1.0.2", 374 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 375 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", 376 | "dev": true, 377 | "license": "MIT" 378 | }, 379 | "node_modules/brace-expansion": { 380 | "version": "1.1.11", 381 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 382 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 383 | "dev": true, 384 | "license": "MIT", 385 | "dependencies": { 386 | "balanced-match": "^1.0.0", 387 | "concat-map": "0.0.1" 388 | } 389 | }, 390 | "node_modules/call-bind": { 391 | "version": "1.0.7", 392 | "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", 393 | "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", 394 | "dev": true, 395 | "license": "MIT", 396 | "dependencies": { 397 | "es-define-property": "^1.0.0", 398 | "es-errors": "^1.3.0", 399 | "function-bind": "^1.1.2", 400 | "get-intrinsic": "^1.2.4", 401 | "set-function-length": "^1.2.1" 402 | }, 403 | "engines": { 404 | "node": ">= 0.4" 405 | }, 406 | "funding": { 407 | "url": "https://github.com/sponsors/ljharb" 408 | } 409 | }, 410 | "node_modules/chai": { 411 | "version": "1.10.0", 412 | "resolved": "https://registry.npmjs.org/chai/-/chai-1.10.0.tgz", 413 | "integrity": "sha512-E3L9M2SeQU1XagJkE9KJyTAXXHKJkJ1EsKkFp0Rl53lYa3mro2PVgYHNiCb2YRa2nUeyg7aqmI1EIcSBayNd5w==", 414 | "dev": true, 415 | "license": "MIT", 416 | "dependencies": { 417 | "assertion-error": "1.0.0", 418 | "deep-eql": "0.1.3" 419 | }, 420 | "engines": { 421 | "node": ">= 0.4.0" 422 | } 423 | }, 424 | "node_modules/commander": { 425 | "version": "8.3.0", 426 | "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", 427 | "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", 428 | "license": "MIT", 429 | "engines": { 430 | "node": ">= 12" 431 | } 432 | }, 433 | "node_modules/concat-map": { 434 | "version": "0.0.1", 435 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 436 | "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", 437 | "dev": true, 438 | "license": "MIT" 439 | }, 440 | "node_modules/data-view-buffer": { 441 | "version": "1.0.1", 442 | "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", 443 | "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", 444 | "dev": true, 445 | "license": "MIT", 446 | "dependencies": { 447 | "call-bind": "^1.0.6", 448 | "es-errors": "^1.3.0", 449 | "is-data-view": "^1.0.1" 450 | }, 451 | "engines": { 452 | "node": ">= 0.4" 453 | }, 454 | "funding": { 455 | "url": "https://github.com/sponsors/ljharb" 456 | } 457 | }, 458 | "node_modules/data-view-byte-length": { 459 | "version": "1.0.1", 460 | "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", 461 | "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", 462 | "dev": true, 463 | "license": "MIT", 464 | "dependencies": { 465 | "call-bind": "^1.0.7", 466 | "es-errors": "^1.3.0", 467 | "is-data-view": "^1.0.1" 468 | }, 469 | "engines": { 470 | "node": ">= 0.4" 471 | }, 472 | "funding": { 473 | "url": "https://github.com/sponsors/ljharb" 474 | } 475 | }, 476 | "node_modules/data-view-byte-offset": { 477 | "version": "1.0.0", 478 | "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", 479 | "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", 480 | "dev": true, 481 | "license": "MIT", 482 | "dependencies": { 483 | "call-bind": "^1.0.6", 484 | "es-errors": "^1.3.0", 485 | "is-data-view": "^1.0.1" 486 | }, 487 | "engines": { 488 | "node": ">= 0.4" 489 | }, 490 | "funding": { 491 | "url": "https://github.com/sponsors/ljharb" 492 | } 493 | }, 494 | "node_modules/deep-eql": { 495 | "version": "0.1.3", 496 | "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-0.1.3.tgz", 497 | "integrity": "sha512-6sEotTRGBFiNcqVoeHwnfopbSpi5NbH1VWJmYCVkmxMmaVTT0bUTrNaGyBwhgP4MZL012W/mkzIn3Da+iDYweg==", 498 | "dev": true, 499 | "license": "MIT", 500 | "dependencies": { 501 | "type-detect": "0.1.1" 502 | }, 503 | "engines": { 504 | "node": "*" 505 | } 506 | }, 507 | "node_modules/deep-equal": { 508 | "version": "2.2.3", 509 | "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.3.tgz", 510 | "integrity": "sha512-ZIwpnevOurS8bpT4192sqAowWM76JDKSHYzMLty3BZGSswgq6pBaH3DhCSW5xVAZICZyKdOBPjwww5wfgT/6PA==", 511 | "dev": true, 512 | "license": "MIT", 513 | "dependencies": { 514 | "array-buffer-byte-length": "^1.0.0", 515 | "call-bind": "^1.0.5", 516 | "es-get-iterator": "^1.1.3", 517 | "get-intrinsic": "^1.2.2", 518 | "is-arguments": "^1.1.1", 519 | "is-array-buffer": "^3.0.2", 520 | "is-date-object": "^1.0.5", 521 | "is-regex": "^1.1.4", 522 | "is-shared-array-buffer": "^1.0.2", 523 | "isarray": "^2.0.5", 524 | "object-is": "^1.1.5", 525 | "object-keys": "^1.1.1", 526 | "object.assign": "^4.1.4", 527 | "regexp.prototype.flags": "^1.5.1", 528 | "side-channel": "^1.0.4", 529 | "which-boxed-primitive": "^1.0.2", 530 | "which-collection": "^1.0.1", 531 | "which-typed-array": "^1.1.13" 532 | }, 533 | "engines": { 534 | "node": ">= 0.4" 535 | }, 536 | "funding": { 537 | "url": "https://github.com/sponsors/ljharb" 538 | } 539 | }, 540 | "node_modules/define-data-property": { 541 | "version": "1.1.4", 542 | "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", 543 | "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", 544 | "dev": true, 545 | "license": "MIT", 546 | "dependencies": { 547 | "es-define-property": "^1.0.0", 548 | "es-errors": "^1.3.0", 549 | "gopd": "^1.0.1" 550 | }, 551 | "engines": { 552 | "node": ">= 0.4" 553 | }, 554 | "funding": { 555 | "url": "https://github.com/sponsors/ljharb" 556 | } 557 | }, 558 | "node_modules/define-properties": { 559 | "version": "1.2.1", 560 | "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", 561 | "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", 562 | "dev": true, 563 | "license": "MIT", 564 | "dependencies": { 565 | "define-data-property": "^1.0.1", 566 | "has-property-descriptors": "^1.0.0", 567 | "object-keys": "^1.1.1" 568 | }, 569 | "engines": { 570 | "node": ">= 0.4" 571 | }, 572 | "funding": { 573 | "url": "https://github.com/sponsors/ljharb" 574 | } 575 | }, 576 | "node_modules/defined": { 577 | "version": "1.0.1", 578 | "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.1.tgz", 579 | "integrity": "sha512-hsBd2qSVCRE+5PmNdHt1uzyrFu5d3RwmFDKzyNZMFq/EwDNJF7Ee5+D5oEKF0hU6LhtoUF1macFvOe4AskQC1Q==", 580 | "dev": true, 581 | "license": "MIT", 582 | "funding": { 583 | "url": "https://github.com/sponsors/ljharb" 584 | } 585 | }, 586 | "node_modules/dotignore": { 587 | "version": "0.1.2", 588 | "resolved": "https://registry.npmjs.org/dotignore/-/dotignore-0.1.2.tgz", 589 | "integrity": "sha512-UGGGWfSauusaVJC+8fgV+NVvBXkCTmVv7sk6nojDZZvuOUNGUy0Zk4UpHQD6EDjS0jpBwcACvH4eofvyzBcRDw==", 590 | "dev": true, 591 | "license": "MIT", 592 | "dependencies": { 593 | "minimatch": "^3.0.4" 594 | }, 595 | "bin": { 596 | "ignored": "bin/ignored" 597 | } 598 | }, 599 | "node_modules/entities": { 600 | "version": "4.5.0", 601 | "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", 602 | "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", 603 | "dev": true, 604 | "license": "BSD-2-Clause", 605 | "engines": { 606 | "node": ">=0.12" 607 | }, 608 | "funding": { 609 | "url": "https://github.com/fb55/entities?sponsor=1" 610 | } 611 | }, 612 | "node_modules/es-abstract": { 613 | "version": "1.23.3", 614 | "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", 615 | "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", 616 | "dev": true, 617 | "license": "MIT", 618 | "dependencies": { 619 | "array-buffer-byte-length": "^1.0.1", 620 | "arraybuffer.prototype.slice": "^1.0.3", 621 | "available-typed-arrays": "^1.0.7", 622 | "call-bind": "^1.0.7", 623 | "data-view-buffer": "^1.0.1", 624 | "data-view-byte-length": "^1.0.1", 625 | "data-view-byte-offset": "^1.0.0", 626 | "es-define-property": "^1.0.0", 627 | "es-errors": "^1.3.0", 628 | "es-object-atoms": "^1.0.0", 629 | "es-set-tostringtag": "^2.0.3", 630 | "es-to-primitive": "^1.2.1", 631 | "function.prototype.name": "^1.1.6", 632 | "get-intrinsic": "^1.2.4", 633 | "get-symbol-description": "^1.0.2", 634 | "globalthis": "^1.0.3", 635 | "gopd": "^1.0.1", 636 | "has-property-descriptors": "^1.0.2", 637 | "has-proto": "^1.0.3", 638 | "has-symbols": "^1.0.3", 639 | "hasown": "^2.0.2", 640 | "internal-slot": "^1.0.7", 641 | "is-array-buffer": "^3.0.4", 642 | "is-callable": "^1.2.7", 643 | "is-data-view": "^1.0.1", 644 | "is-negative-zero": "^2.0.3", 645 | "is-regex": "^1.1.4", 646 | "is-shared-array-buffer": "^1.0.3", 647 | "is-string": "^1.0.7", 648 | "is-typed-array": "^1.1.13", 649 | "is-weakref": "^1.0.2", 650 | "object-inspect": "^1.13.1", 651 | "object-keys": "^1.1.1", 652 | "object.assign": "^4.1.5", 653 | "regexp.prototype.flags": "^1.5.2", 654 | "safe-array-concat": "^1.1.2", 655 | "safe-regex-test": "^1.0.3", 656 | "string.prototype.trim": "^1.2.9", 657 | "string.prototype.trimend": "^1.0.8", 658 | "string.prototype.trimstart": "^1.0.8", 659 | "typed-array-buffer": "^1.0.2", 660 | "typed-array-byte-length": "^1.0.1", 661 | "typed-array-byte-offset": "^1.0.2", 662 | "typed-array-length": "^1.0.6", 663 | "unbox-primitive": "^1.0.2", 664 | "which-typed-array": "^1.1.15" 665 | }, 666 | "engines": { 667 | "node": ">= 0.4" 668 | }, 669 | "funding": { 670 | "url": "https://github.com/sponsors/ljharb" 671 | } 672 | }, 673 | "node_modules/es-define-property": { 674 | "version": "1.0.0", 675 | "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", 676 | "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", 677 | "dev": true, 678 | "license": "MIT", 679 | "dependencies": { 680 | "get-intrinsic": "^1.2.4" 681 | }, 682 | "engines": { 683 | "node": ">= 0.4" 684 | } 685 | }, 686 | "node_modules/es-errors": { 687 | "version": "1.3.0", 688 | "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", 689 | "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", 690 | "dev": true, 691 | "license": "MIT", 692 | "engines": { 693 | "node": ">= 0.4" 694 | } 695 | }, 696 | "node_modules/es-get-iterator": { 697 | "version": "1.1.3", 698 | "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.3.tgz", 699 | "integrity": "sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==", 700 | "dev": true, 701 | "license": "MIT", 702 | "dependencies": { 703 | "call-bind": "^1.0.2", 704 | "get-intrinsic": "^1.1.3", 705 | "has-symbols": "^1.0.3", 706 | "is-arguments": "^1.1.1", 707 | "is-map": "^2.0.2", 708 | "is-set": "^2.0.2", 709 | "is-string": "^1.0.7", 710 | "isarray": "^2.0.5", 711 | "stop-iteration-iterator": "^1.0.0" 712 | }, 713 | "funding": { 714 | "url": "https://github.com/sponsors/ljharb" 715 | } 716 | }, 717 | "node_modules/es-object-atoms": { 718 | "version": "1.0.0", 719 | "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", 720 | "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", 721 | "dev": true, 722 | "license": "MIT", 723 | "dependencies": { 724 | "es-errors": "^1.3.0" 725 | }, 726 | "engines": { 727 | "node": ">= 0.4" 728 | } 729 | }, 730 | "node_modules/es-set-tostringtag": { 731 | "version": "2.0.3", 732 | "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", 733 | "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", 734 | "dev": true, 735 | "license": "MIT", 736 | "dependencies": { 737 | "get-intrinsic": "^1.2.4", 738 | "has-tostringtag": "^1.0.2", 739 | "hasown": "^2.0.1" 740 | }, 741 | "engines": { 742 | "node": ">= 0.4" 743 | } 744 | }, 745 | "node_modules/es-to-primitive": { 746 | "version": "1.2.1", 747 | "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", 748 | "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", 749 | "dev": true, 750 | "license": "MIT", 751 | "dependencies": { 752 | "is-callable": "^1.1.4", 753 | "is-date-object": "^1.0.1", 754 | "is-symbol": "^1.0.2" 755 | }, 756 | "engines": { 757 | "node": ">= 0.4" 758 | }, 759 | "funding": { 760 | "url": "https://github.com/sponsors/ljharb" 761 | } 762 | }, 763 | "node_modules/esprima": { 764 | "version": "4.0.1", 765 | "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", 766 | "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", 767 | "dev": true, 768 | "license": "BSD-2-Clause", 769 | "bin": { 770 | "esparse": "bin/esparse.js", 771 | "esvalidate": "bin/esvalidate.js" 772 | }, 773 | "engines": { 774 | "node": ">=4" 775 | } 776 | }, 777 | "node_modules/for-each": { 778 | "version": "0.3.3", 779 | "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", 780 | "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", 781 | "dev": true, 782 | "license": "MIT", 783 | "dependencies": { 784 | "is-callable": "^1.1.3" 785 | } 786 | }, 787 | "node_modules/fs.realpath": { 788 | "version": "1.0.0", 789 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 790 | "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", 791 | "dev": true, 792 | "license": "ISC" 793 | }, 794 | "node_modules/fsevents": { 795 | "version": "2.3.3", 796 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", 797 | "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", 798 | "dev": true, 799 | "hasInstallScript": true, 800 | "license": "MIT", 801 | "optional": true, 802 | "os": [ 803 | "darwin" 804 | ], 805 | "engines": { 806 | "node": "^8.16.0 || ^10.6.0 || >=11.0.0" 807 | } 808 | }, 809 | "node_modules/function-bind": { 810 | "version": "1.1.2", 811 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", 812 | "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", 813 | "dev": true, 814 | "license": "MIT", 815 | "funding": { 816 | "url": "https://github.com/sponsors/ljharb" 817 | } 818 | }, 819 | "node_modules/function.prototype.name": { 820 | "version": "1.1.6", 821 | "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", 822 | "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", 823 | "dev": true, 824 | "license": "MIT", 825 | "dependencies": { 826 | "call-bind": "^1.0.2", 827 | "define-properties": "^1.2.0", 828 | "es-abstract": "^1.22.1", 829 | "functions-have-names": "^1.2.3" 830 | }, 831 | "engines": { 832 | "node": ">= 0.4" 833 | }, 834 | "funding": { 835 | "url": "https://github.com/sponsors/ljharb" 836 | } 837 | }, 838 | "node_modules/functions-have-names": { 839 | "version": "1.2.3", 840 | "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", 841 | "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", 842 | "dev": true, 843 | "license": "MIT", 844 | "funding": { 845 | "url": "https://github.com/sponsors/ljharb" 846 | } 847 | }, 848 | "node_modules/get-intrinsic": { 849 | "version": "1.2.4", 850 | "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", 851 | "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", 852 | "dev": true, 853 | "license": "MIT", 854 | "dependencies": { 855 | "es-errors": "^1.3.0", 856 | "function-bind": "^1.1.2", 857 | "has-proto": "^1.0.1", 858 | "has-symbols": "^1.0.3", 859 | "hasown": "^2.0.0" 860 | }, 861 | "engines": { 862 | "node": ">= 0.4" 863 | }, 864 | "funding": { 865 | "url": "https://github.com/sponsors/ljharb" 866 | } 867 | }, 868 | "node_modules/get-package-type": { 869 | "version": "0.1.0", 870 | "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", 871 | "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", 872 | "dev": true, 873 | "license": "MIT", 874 | "engines": { 875 | "node": ">=8.0.0" 876 | } 877 | }, 878 | "node_modules/get-symbol-description": { 879 | "version": "1.0.2", 880 | "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", 881 | "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", 882 | "dev": true, 883 | "license": "MIT", 884 | "dependencies": { 885 | "call-bind": "^1.0.5", 886 | "es-errors": "^1.3.0", 887 | "get-intrinsic": "^1.2.4" 888 | }, 889 | "engines": { 890 | "node": ">= 0.4" 891 | }, 892 | "funding": { 893 | "url": "https://github.com/sponsors/ljharb" 894 | } 895 | }, 896 | "node_modules/glob": { 897 | "version": "7.2.3", 898 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", 899 | "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", 900 | "deprecated": "Glob versions prior to v9 are no longer supported", 901 | "dev": true, 902 | "license": "ISC", 903 | "dependencies": { 904 | "fs.realpath": "^1.0.0", 905 | "inflight": "^1.0.4", 906 | "inherits": "2", 907 | "minimatch": "^3.1.1", 908 | "once": "^1.3.0", 909 | "path-is-absolute": "^1.0.0" 910 | }, 911 | "engines": { 912 | "node": "*" 913 | }, 914 | "funding": { 915 | "url": "https://github.com/sponsors/isaacs" 916 | } 917 | }, 918 | "node_modules/globalthis": { 919 | "version": "1.0.4", 920 | "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", 921 | "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", 922 | "dev": true, 923 | "license": "MIT", 924 | "dependencies": { 925 | "define-properties": "^1.2.1", 926 | "gopd": "^1.0.1" 927 | }, 928 | "engines": { 929 | "node": ">= 0.4" 930 | }, 931 | "funding": { 932 | "url": "https://github.com/sponsors/ljharb" 933 | } 934 | }, 935 | "node_modules/gopd": { 936 | "version": "1.0.1", 937 | "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", 938 | "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", 939 | "dev": true, 940 | "license": "MIT", 941 | "dependencies": { 942 | "get-intrinsic": "^1.1.3" 943 | }, 944 | "funding": { 945 | "url": "https://github.com/sponsors/ljharb" 946 | } 947 | }, 948 | "node_modules/has-bigints": { 949 | "version": "1.0.2", 950 | "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", 951 | "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", 952 | "dev": true, 953 | "license": "MIT", 954 | "funding": { 955 | "url": "https://github.com/sponsors/ljharb" 956 | } 957 | }, 958 | "node_modules/has-dynamic-import": { 959 | "version": "2.1.0", 960 | "resolved": "https://registry.npmjs.org/has-dynamic-import/-/has-dynamic-import-2.1.0.tgz", 961 | "integrity": "sha512-su0anMkNEnJKZ/rB99jn3y6lV/J8Ro96hBJ28YAeVzj5rWxH+YL/AdCyiYYA1HDLV9YhmvqpWSJJj2KLo1MX6g==", 962 | "dev": true, 963 | "license": "MIT", 964 | "dependencies": { 965 | "call-bind": "^1.0.5", 966 | "get-intrinsic": "^1.2.2" 967 | }, 968 | "engines": { 969 | "node": ">= 0.4" 970 | }, 971 | "funding": { 972 | "url": "https://github.com/sponsors/ljharb" 973 | } 974 | }, 975 | "node_modules/has-property-descriptors": { 976 | "version": "1.0.2", 977 | "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", 978 | "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", 979 | "dev": true, 980 | "license": "MIT", 981 | "dependencies": { 982 | "es-define-property": "^1.0.0" 983 | }, 984 | "funding": { 985 | "url": "https://github.com/sponsors/ljharb" 986 | } 987 | }, 988 | "node_modules/has-proto": { 989 | "version": "1.0.3", 990 | "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", 991 | "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", 992 | "dev": true, 993 | "license": "MIT", 994 | "engines": { 995 | "node": ">= 0.4" 996 | }, 997 | "funding": { 998 | "url": "https://github.com/sponsors/ljharb" 999 | } 1000 | }, 1001 | "node_modules/has-symbols": { 1002 | "version": "1.0.3", 1003 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", 1004 | "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", 1005 | "dev": true, 1006 | "license": "MIT", 1007 | "engines": { 1008 | "node": ">= 0.4" 1009 | }, 1010 | "funding": { 1011 | "url": "https://github.com/sponsors/ljharb" 1012 | } 1013 | }, 1014 | "node_modules/has-tostringtag": { 1015 | "version": "1.0.2", 1016 | "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", 1017 | "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", 1018 | "dev": true, 1019 | "license": "MIT", 1020 | "dependencies": { 1021 | "has-symbols": "^1.0.3" 1022 | }, 1023 | "engines": { 1024 | "node": ">= 0.4" 1025 | }, 1026 | "funding": { 1027 | "url": "https://github.com/sponsors/ljharb" 1028 | } 1029 | }, 1030 | "node_modules/hasown": { 1031 | "version": "2.0.2", 1032 | "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", 1033 | "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", 1034 | "dev": true, 1035 | "license": "MIT", 1036 | "dependencies": { 1037 | "function-bind": "^1.1.2" 1038 | }, 1039 | "engines": { 1040 | "node": ">= 0.4" 1041 | } 1042 | }, 1043 | "node_modules/inflight": { 1044 | "version": "1.0.6", 1045 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 1046 | "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", 1047 | "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", 1048 | "dev": true, 1049 | "license": "ISC", 1050 | "dependencies": { 1051 | "once": "^1.3.0", 1052 | "wrappy": "1" 1053 | } 1054 | }, 1055 | "node_modules/inherits": { 1056 | "version": "2.0.4", 1057 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 1058 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 1059 | "dev": true, 1060 | "license": "ISC" 1061 | }, 1062 | "node_modules/internal-slot": { 1063 | "version": "1.0.7", 1064 | "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", 1065 | "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", 1066 | "dev": true, 1067 | "license": "MIT", 1068 | "dependencies": { 1069 | "es-errors": "^1.3.0", 1070 | "hasown": "^2.0.0", 1071 | "side-channel": "^1.0.4" 1072 | }, 1073 | "engines": { 1074 | "node": ">= 0.4" 1075 | } 1076 | }, 1077 | "node_modules/is-arguments": { 1078 | "version": "1.1.1", 1079 | "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", 1080 | "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", 1081 | "dev": true, 1082 | "license": "MIT", 1083 | "dependencies": { 1084 | "call-bind": "^1.0.2", 1085 | "has-tostringtag": "^1.0.0" 1086 | }, 1087 | "engines": { 1088 | "node": ">= 0.4" 1089 | }, 1090 | "funding": { 1091 | "url": "https://github.com/sponsors/ljharb" 1092 | } 1093 | }, 1094 | "node_modules/is-array-buffer": { 1095 | "version": "3.0.4", 1096 | "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", 1097 | "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", 1098 | "dev": true, 1099 | "license": "MIT", 1100 | "dependencies": { 1101 | "call-bind": "^1.0.2", 1102 | "get-intrinsic": "^1.2.1" 1103 | }, 1104 | "engines": { 1105 | "node": ">= 0.4" 1106 | }, 1107 | "funding": { 1108 | "url": "https://github.com/sponsors/ljharb" 1109 | } 1110 | }, 1111 | "node_modules/is-bigint": { 1112 | "version": "1.0.4", 1113 | "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", 1114 | "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", 1115 | "dev": true, 1116 | "license": "MIT", 1117 | "dependencies": { 1118 | "has-bigints": "^1.0.1" 1119 | }, 1120 | "funding": { 1121 | "url": "https://github.com/sponsors/ljharb" 1122 | } 1123 | }, 1124 | "node_modules/is-boolean-object": { 1125 | "version": "1.1.2", 1126 | "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", 1127 | "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", 1128 | "dev": true, 1129 | "license": "MIT", 1130 | "dependencies": { 1131 | "call-bind": "^1.0.2", 1132 | "has-tostringtag": "^1.0.0" 1133 | }, 1134 | "engines": { 1135 | "node": ">= 0.4" 1136 | }, 1137 | "funding": { 1138 | "url": "https://github.com/sponsors/ljharb" 1139 | } 1140 | }, 1141 | "node_modules/is-callable": { 1142 | "version": "1.2.7", 1143 | "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", 1144 | "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", 1145 | "dev": true, 1146 | "license": "MIT", 1147 | "engines": { 1148 | "node": ">= 0.4" 1149 | }, 1150 | "funding": { 1151 | "url": "https://github.com/sponsors/ljharb" 1152 | } 1153 | }, 1154 | "node_modules/is-core-module": { 1155 | "version": "2.13.1", 1156 | "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", 1157 | "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", 1158 | "dev": true, 1159 | "license": "MIT", 1160 | "dependencies": { 1161 | "hasown": "^2.0.0" 1162 | }, 1163 | "funding": { 1164 | "url": "https://github.com/sponsors/ljharb" 1165 | } 1166 | }, 1167 | "node_modules/is-data-view": { 1168 | "version": "1.0.1", 1169 | "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", 1170 | "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", 1171 | "dev": true, 1172 | "license": "MIT", 1173 | "dependencies": { 1174 | "is-typed-array": "^1.1.13" 1175 | }, 1176 | "engines": { 1177 | "node": ">= 0.4" 1178 | }, 1179 | "funding": { 1180 | "url": "https://github.com/sponsors/ljharb" 1181 | } 1182 | }, 1183 | "node_modules/is-date-object": { 1184 | "version": "1.0.5", 1185 | "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", 1186 | "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", 1187 | "dev": true, 1188 | "license": "MIT", 1189 | "dependencies": { 1190 | "has-tostringtag": "^1.0.0" 1191 | }, 1192 | "engines": { 1193 | "node": ">= 0.4" 1194 | }, 1195 | "funding": { 1196 | "url": "https://github.com/sponsors/ljharb" 1197 | } 1198 | }, 1199 | "node_modules/is-map": { 1200 | "version": "2.0.3", 1201 | "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", 1202 | "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", 1203 | "dev": true, 1204 | "license": "MIT", 1205 | "engines": { 1206 | "node": ">= 0.4" 1207 | }, 1208 | "funding": { 1209 | "url": "https://github.com/sponsors/ljharb" 1210 | } 1211 | }, 1212 | "node_modules/is-negative-zero": { 1213 | "version": "2.0.3", 1214 | "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", 1215 | "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", 1216 | "dev": true, 1217 | "license": "MIT", 1218 | "engines": { 1219 | "node": ">= 0.4" 1220 | }, 1221 | "funding": { 1222 | "url": "https://github.com/sponsors/ljharb" 1223 | } 1224 | }, 1225 | "node_modules/is-number-object": { 1226 | "version": "1.0.7", 1227 | "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", 1228 | "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", 1229 | "dev": true, 1230 | "license": "MIT", 1231 | "dependencies": { 1232 | "has-tostringtag": "^1.0.0" 1233 | }, 1234 | "engines": { 1235 | "node": ">= 0.4" 1236 | }, 1237 | "funding": { 1238 | "url": "https://github.com/sponsors/ljharb" 1239 | } 1240 | }, 1241 | "node_modules/is-regex": { 1242 | "version": "1.1.4", 1243 | "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", 1244 | "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", 1245 | "dev": true, 1246 | "license": "MIT", 1247 | "dependencies": { 1248 | "call-bind": "^1.0.2", 1249 | "has-tostringtag": "^1.0.0" 1250 | }, 1251 | "engines": { 1252 | "node": ">= 0.4" 1253 | }, 1254 | "funding": { 1255 | "url": "https://github.com/sponsors/ljharb" 1256 | } 1257 | }, 1258 | "node_modules/is-set": { 1259 | "version": "2.0.3", 1260 | "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", 1261 | "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", 1262 | "dev": true, 1263 | "license": "MIT", 1264 | "engines": { 1265 | "node": ">= 0.4" 1266 | }, 1267 | "funding": { 1268 | "url": "https://github.com/sponsors/ljharb" 1269 | } 1270 | }, 1271 | "node_modules/is-shared-array-buffer": { 1272 | "version": "1.0.3", 1273 | "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", 1274 | "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", 1275 | "dev": true, 1276 | "license": "MIT", 1277 | "dependencies": { 1278 | "call-bind": "^1.0.7" 1279 | }, 1280 | "engines": { 1281 | "node": ">= 0.4" 1282 | }, 1283 | "funding": { 1284 | "url": "https://github.com/sponsors/ljharb" 1285 | } 1286 | }, 1287 | "node_modules/is-string": { 1288 | "version": "1.0.7", 1289 | "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", 1290 | "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", 1291 | "dev": true, 1292 | "license": "MIT", 1293 | "dependencies": { 1294 | "has-tostringtag": "^1.0.0" 1295 | }, 1296 | "engines": { 1297 | "node": ">= 0.4" 1298 | }, 1299 | "funding": { 1300 | "url": "https://github.com/sponsors/ljharb" 1301 | } 1302 | }, 1303 | "node_modules/is-symbol": { 1304 | "version": "1.0.4", 1305 | "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", 1306 | "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", 1307 | "dev": true, 1308 | "license": "MIT", 1309 | "dependencies": { 1310 | "has-symbols": "^1.0.2" 1311 | }, 1312 | "engines": { 1313 | "node": ">= 0.4" 1314 | }, 1315 | "funding": { 1316 | "url": "https://github.com/sponsors/ljharb" 1317 | } 1318 | }, 1319 | "node_modules/is-typed-array": { 1320 | "version": "1.1.13", 1321 | "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", 1322 | "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", 1323 | "dev": true, 1324 | "license": "MIT", 1325 | "dependencies": { 1326 | "which-typed-array": "^1.1.14" 1327 | }, 1328 | "engines": { 1329 | "node": ">= 0.4" 1330 | }, 1331 | "funding": { 1332 | "url": "https://github.com/sponsors/ljharb" 1333 | } 1334 | }, 1335 | "node_modules/is-weakmap": { 1336 | "version": "2.0.2", 1337 | "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", 1338 | "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", 1339 | "dev": true, 1340 | "license": "MIT", 1341 | "engines": { 1342 | "node": ">= 0.4" 1343 | }, 1344 | "funding": { 1345 | "url": "https://github.com/sponsors/ljharb" 1346 | } 1347 | }, 1348 | "node_modules/is-weakref": { 1349 | "version": "1.0.2", 1350 | "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", 1351 | "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", 1352 | "dev": true, 1353 | "license": "MIT", 1354 | "dependencies": { 1355 | "call-bind": "^1.0.2" 1356 | }, 1357 | "funding": { 1358 | "url": "https://github.com/sponsors/ljharb" 1359 | } 1360 | }, 1361 | "node_modules/is-weakset": { 1362 | "version": "2.0.3", 1363 | "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.3.tgz", 1364 | "integrity": "sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==", 1365 | "dev": true, 1366 | "license": "MIT", 1367 | "dependencies": { 1368 | "call-bind": "^1.0.7", 1369 | "get-intrinsic": "^1.2.4" 1370 | }, 1371 | "engines": { 1372 | "node": ">= 0.4" 1373 | }, 1374 | "funding": { 1375 | "url": "https://github.com/sponsors/ljharb" 1376 | } 1377 | }, 1378 | "node_modules/isarray": { 1379 | "version": "2.0.5", 1380 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", 1381 | "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", 1382 | "dev": true, 1383 | "license": "MIT" 1384 | }, 1385 | "node_modules/js-yaml": { 1386 | "version": "3.14.1", 1387 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", 1388 | "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", 1389 | "dev": true, 1390 | "license": "MIT", 1391 | "dependencies": { 1392 | "argparse": "^1.0.7", 1393 | "esprima": "^4.0.0" 1394 | }, 1395 | "bin": { 1396 | "js-yaml": "bin/js-yaml.js" 1397 | } 1398 | }, 1399 | "node_modules/js-yaml/node_modules/argparse": { 1400 | "version": "1.0.10", 1401 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", 1402 | "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", 1403 | "dev": true, 1404 | "license": "MIT", 1405 | "dependencies": { 1406 | "sprintf-js": "~1.0.2" 1407 | } 1408 | }, 1409 | "node_modules/katex": { 1410 | "version": "0.16.10", 1411 | "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.10.tgz", 1412 | "integrity": "sha512-ZiqaC04tp2O5utMsl2TEZTXxa6WSC4yo0fv5ML++D3QZv/vx2Mct0mTlRx3O+uUkjfuAgOkzsCmq5MiUEsDDdA==", 1413 | "funding": [ 1414 | "https://opencollective.com/katex", 1415 | "https://github.com/sponsors/katex" 1416 | ], 1417 | "license": "MIT", 1418 | "dependencies": { 1419 | "commander": "^8.3.0" 1420 | }, 1421 | "bin": { 1422 | "katex": "cli.js" 1423 | } 1424 | }, 1425 | "node_modules/linkify-it": { 1426 | "version": "5.0.0", 1427 | "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz", 1428 | "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==", 1429 | "dev": true, 1430 | "license": "MIT", 1431 | "dependencies": { 1432 | "uc.micro": "^2.0.0" 1433 | } 1434 | }, 1435 | "node_modules/markdown-it": { 1436 | "version": "14.1.0", 1437 | "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz", 1438 | "integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==", 1439 | "dev": true, 1440 | "license": "MIT", 1441 | "dependencies": { 1442 | "argparse": "^2.0.1", 1443 | "entities": "^4.4.0", 1444 | "linkify-it": "^5.0.0", 1445 | "mdurl": "^2.0.0", 1446 | "punycode.js": "^2.3.1", 1447 | "uc.micro": "^2.1.0" 1448 | }, 1449 | "bin": { 1450 | "markdown-it": "bin/markdown-it.mjs" 1451 | } 1452 | }, 1453 | "node_modules/markdown-it-testgen": { 1454 | "version": "0.1.6", 1455 | "resolved": "https://registry.npmjs.org/markdown-it-testgen/-/markdown-it-testgen-0.1.6.tgz", 1456 | "integrity": "sha512-hYC71G4Mcv3Y7fLTsi4PyoHKSs0P4UgkpzmGBtUYoR/TS83lFbfXUMaI71OiMJ9r4p3fbMhHBwdNTLhSDwmt6Q==", 1457 | "dev": true, 1458 | "license": "MIT", 1459 | "dependencies": { 1460 | "chai": "^1.10.0", 1461 | "js-yaml": "^3.13.1", 1462 | "object-assign": "^4.1.1" 1463 | } 1464 | }, 1465 | "node_modules/mdurl": { 1466 | "version": "2.0.0", 1467 | "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", 1468 | "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==", 1469 | "dev": true, 1470 | "license": "MIT" 1471 | }, 1472 | "node_modules/minimatch": { 1473 | "version": "3.1.2", 1474 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", 1475 | "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", 1476 | "dev": true, 1477 | "license": "ISC", 1478 | "dependencies": { 1479 | "brace-expansion": "^1.1.7" 1480 | }, 1481 | "engines": { 1482 | "node": "*" 1483 | } 1484 | }, 1485 | "node_modules/minimist": { 1486 | "version": "1.2.8", 1487 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", 1488 | "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", 1489 | "dev": true, 1490 | "license": "MIT", 1491 | "funding": { 1492 | "url": "https://github.com/sponsors/ljharb" 1493 | } 1494 | }, 1495 | "node_modules/mock-property": { 1496 | "version": "1.0.3", 1497 | "resolved": "https://registry.npmjs.org/mock-property/-/mock-property-1.0.3.tgz", 1498 | "integrity": "sha512-2emPTb1reeLLYwHxyVx993iYyCHEiRRO+y8NFXFPL5kl5q14sgTK76cXyEKkeKCHeRw35SfdkUJ10Q1KfHuiIQ==", 1499 | "dev": true, 1500 | "license": "MIT", 1501 | "dependencies": { 1502 | "define-data-property": "^1.1.1", 1503 | "functions-have-names": "^1.2.3", 1504 | "gopd": "^1.0.1", 1505 | "has-property-descriptors": "^1.0.0", 1506 | "hasown": "^2.0.0", 1507 | "isarray": "^2.0.5" 1508 | }, 1509 | "engines": { 1510 | "node": ">= 0.4" 1511 | }, 1512 | "funding": { 1513 | "url": "https://github.com/sponsors/ljharb" 1514 | } 1515 | }, 1516 | "node_modules/object-assign": { 1517 | "version": "4.1.1", 1518 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", 1519 | "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", 1520 | "dev": true, 1521 | "license": "MIT", 1522 | "engines": { 1523 | "node": ">=0.10.0" 1524 | } 1525 | }, 1526 | "node_modules/object-inspect": { 1527 | "version": "1.13.1", 1528 | "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", 1529 | "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", 1530 | "dev": true, 1531 | "license": "MIT", 1532 | "funding": { 1533 | "url": "https://github.com/sponsors/ljharb" 1534 | } 1535 | }, 1536 | "node_modules/object-is": { 1537 | "version": "1.1.6", 1538 | "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.6.tgz", 1539 | "integrity": "sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==", 1540 | "dev": true, 1541 | "license": "MIT", 1542 | "dependencies": { 1543 | "call-bind": "^1.0.7", 1544 | "define-properties": "^1.2.1" 1545 | }, 1546 | "engines": { 1547 | "node": ">= 0.4" 1548 | }, 1549 | "funding": { 1550 | "url": "https://github.com/sponsors/ljharb" 1551 | } 1552 | }, 1553 | "node_modules/object-keys": { 1554 | "version": "1.1.1", 1555 | "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", 1556 | "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", 1557 | "dev": true, 1558 | "license": "MIT", 1559 | "engines": { 1560 | "node": ">= 0.4" 1561 | } 1562 | }, 1563 | "node_modules/object.assign": { 1564 | "version": "4.1.5", 1565 | "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", 1566 | "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", 1567 | "dev": true, 1568 | "license": "MIT", 1569 | "dependencies": { 1570 | "call-bind": "^1.0.5", 1571 | "define-properties": "^1.2.1", 1572 | "has-symbols": "^1.0.3", 1573 | "object-keys": "^1.1.1" 1574 | }, 1575 | "engines": { 1576 | "node": ">= 0.4" 1577 | }, 1578 | "funding": { 1579 | "url": "https://github.com/sponsors/ljharb" 1580 | } 1581 | }, 1582 | "node_modules/once": { 1583 | "version": "1.4.0", 1584 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 1585 | "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", 1586 | "dev": true, 1587 | "license": "ISC", 1588 | "dependencies": { 1589 | "wrappy": "1" 1590 | } 1591 | }, 1592 | "node_modules/path-is-absolute": { 1593 | "version": "1.0.1", 1594 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 1595 | "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", 1596 | "dev": true, 1597 | "license": "MIT", 1598 | "engines": { 1599 | "node": ">=0.10.0" 1600 | } 1601 | }, 1602 | "node_modules/path-parse": { 1603 | "version": "1.0.7", 1604 | "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", 1605 | "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", 1606 | "dev": true, 1607 | "license": "MIT" 1608 | }, 1609 | "node_modules/possible-typed-array-names": { 1610 | "version": "1.0.0", 1611 | "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", 1612 | "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", 1613 | "dev": true, 1614 | "license": "MIT", 1615 | "engines": { 1616 | "node": ">= 0.4" 1617 | } 1618 | }, 1619 | "node_modules/punycode.js": { 1620 | "version": "2.3.1", 1621 | "resolved": "https://registry.npmjs.org/punycode.js/-/punycode.js-2.3.1.tgz", 1622 | "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", 1623 | "dev": true, 1624 | "license": "MIT", 1625 | "engines": { 1626 | "node": ">=6" 1627 | } 1628 | }, 1629 | "node_modules/regexp.prototype.flags": { 1630 | "version": "1.5.2", 1631 | "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", 1632 | "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", 1633 | "dev": true, 1634 | "license": "MIT", 1635 | "dependencies": { 1636 | "call-bind": "^1.0.6", 1637 | "define-properties": "^1.2.1", 1638 | "es-errors": "^1.3.0", 1639 | "set-function-name": "^2.0.1" 1640 | }, 1641 | "engines": { 1642 | "node": ">= 0.4" 1643 | }, 1644 | "funding": { 1645 | "url": "https://github.com/sponsors/ljharb" 1646 | } 1647 | }, 1648 | "node_modules/resolve": { 1649 | "version": "2.0.0-next.5", 1650 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.5.tgz", 1651 | "integrity": "sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==", 1652 | "dev": true, 1653 | "license": "MIT", 1654 | "dependencies": { 1655 | "is-core-module": "^2.13.0", 1656 | "path-parse": "^1.0.7", 1657 | "supports-preserve-symlinks-flag": "^1.0.0" 1658 | }, 1659 | "bin": { 1660 | "resolve": "bin/resolve" 1661 | }, 1662 | "funding": { 1663 | "url": "https://github.com/sponsors/ljharb" 1664 | } 1665 | }, 1666 | "node_modules/rollup": { 1667 | "version": "4.18.0", 1668 | "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.18.0.tgz", 1669 | "integrity": "sha512-QmJz14PX3rzbJCN1SG4Xe/bAAX2a6NpCP8ab2vfu2GiUr8AQcr2nCV/oEO3yneFarB67zk8ShlIyWb2LGTb3Sg==", 1670 | "dev": true, 1671 | "license": "MIT", 1672 | "dependencies": { 1673 | "@types/estree": "1.0.5" 1674 | }, 1675 | "bin": { 1676 | "rollup": "dist/bin/rollup" 1677 | }, 1678 | "engines": { 1679 | "node": ">=18.0.0", 1680 | "npm": ">=8.0.0" 1681 | }, 1682 | "optionalDependencies": { 1683 | "@rollup/rollup-android-arm-eabi": "4.18.0", 1684 | "@rollup/rollup-android-arm64": "4.18.0", 1685 | "@rollup/rollup-darwin-arm64": "4.18.0", 1686 | "@rollup/rollup-darwin-x64": "4.18.0", 1687 | "@rollup/rollup-linux-arm-gnueabihf": "4.18.0", 1688 | "@rollup/rollup-linux-arm-musleabihf": "4.18.0", 1689 | "@rollup/rollup-linux-arm64-gnu": "4.18.0", 1690 | "@rollup/rollup-linux-arm64-musl": "4.18.0", 1691 | "@rollup/rollup-linux-powerpc64le-gnu": "4.18.0", 1692 | "@rollup/rollup-linux-riscv64-gnu": "4.18.0", 1693 | "@rollup/rollup-linux-s390x-gnu": "4.18.0", 1694 | "@rollup/rollup-linux-x64-gnu": "4.18.0", 1695 | "@rollup/rollup-linux-x64-musl": "4.18.0", 1696 | "@rollup/rollup-win32-arm64-msvc": "4.18.0", 1697 | "@rollup/rollup-win32-ia32-msvc": "4.18.0", 1698 | "@rollup/rollup-win32-x64-msvc": "4.18.0", 1699 | "fsevents": "~2.3.2" 1700 | } 1701 | }, 1702 | "node_modules/safe-array-concat": { 1703 | "version": "1.1.2", 1704 | "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", 1705 | "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", 1706 | "dev": true, 1707 | "license": "MIT", 1708 | "dependencies": { 1709 | "call-bind": "^1.0.7", 1710 | "get-intrinsic": "^1.2.4", 1711 | "has-symbols": "^1.0.3", 1712 | "isarray": "^2.0.5" 1713 | }, 1714 | "engines": { 1715 | "node": ">=0.4" 1716 | }, 1717 | "funding": { 1718 | "url": "https://github.com/sponsors/ljharb" 1719 | } 1720 | }, 1721 | "node_modules/safe-regex-test": { 1722 | "version": "1.0.3", 1723 | "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", 1724 | "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", 1725 | "dev": true, 1726 | "license": "MIT", 1727 | "dependencies": { 1728 | "call-bind": "^1.0.6", 1729 | "es-errors": "^1.3.0", 1730 | "is-regex": "^1.1.4" 1731 | }, 1732 | "engines": { 1733 | "node": ">= 0.4" 1734 | }, 1735 | "funding": { 1736 | "url": "https://github.com/sponsors/ljharb" 1737 | } 1738 | }, 1739 | "node_modules/set-function-length": { 1740 | "version": "1.2.2", 1741 | "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", 1742 | "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", 1743 | "dev": true, 1744 | "license": "MIT", 1745 | "dependencies": { 1746 | "define-data-property": "^1.1.4", 1747 | "es-errors": "^1.3.0", 1748 | "function-bind": "^1.1.2", 1749 | "get-intrinsic": "^1.2.4", 1750 | "gopd": "^1.0.1", 1751 | "has-property-descriptors": "^1.0.2" 1752 | }, 1753 | "engines": { 1754 | "node": ">= 0.4" 1755 | } 1756 | }, 1757 | "node_modules/set-function-name": { 1758 | "version": "2.0.2", 1759 | "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", 1760 | "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", 1761 | "dev": true, 1762 | "license": "MIT", 1763 | "dependencies": { 1764 | "define-data-property": "^1.1.4", 1765 | "es-errors": "^1.3.0", 1766 | "functions-have-names": "^1.2.3", 1767 | "has-property-descriptors": "^1.0.2" 1768 | }, 1769 | "engines": { 1770 | "node": ">= 0.4" 1771 | } 1772 | }, 1773 | "node_modules/side-channel": { 1774 | "version": "1.0.6", 1775 | "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", 1776 | "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", 1777 | "dev": true, 1778 | "license": "MIT", 1779 | "dependencies": { 1780 | "call-bind": "^1.0.7", 1781 | "es-errors": "^1.3.0", 1782 | "get-intrinsic": "^1.2.4", 1783 | "object-inspect": "^1.13.1" 1784 | }, 1785 | "engines": { 1786 | "node": ">= 0.4" 1787 | }, 1788 | "funding": { 1789 | "url": "https://github.com/sponsors/ljharb" 1790 | } 1791 | }, 1792 | "node_modules/sprintf-js": { 1793 | "version": "1.0.3", 1794 | "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", 1795 | "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", 1796 | "dev": true, 1797 | "license": "BSD-3-Clause" 1798 | }, 1799 | "node_modules/stop-iteration-iterator": { 1800 | "version": "1.0.0", 1801 | "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz", 1802 | "integrity": "sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==", 1803 | "dev": true, 1804 | "license": "MIT", 1805 | "dependencies": { 1806 | "internal-slot": "^1.0.4" 1807 | }, 1808 | "engines": { 1809 | "node": ">= 0.4" 1810 | } 1811 | }, 1812 | "node_modules/string.prototype.trim": { 1813 | "version": "1.2.9", 1814 | "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", 1815 | "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", 1816 | "dev": true, 1817 | "license": "MIT", 1818 | "dependencies": { 1819 | "call-bind": "^1.0.7", 1820 | "define-properties": "^1.2.1", 1821 | "es-abstract": "^1.23.0", 1822 | "es-object-atoms": "^1.0.0" 1823 | }, 1824 | "engines": { 1825 | "node": ">= 0.4" 1826 | }, 1827 | "funding": { 1828 | "url": "https://github.com/sponsors/ljharb" 1829 | } 1830 | }, 1831 | "node_modules/string.prototype.trimend": { 1832 | "version": "1.0.8", 1833 | "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", 1834 | "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", 1835 | "dev": true, 1836 | "license": "MIT", 1837 | "dependencies": { 1838 | "call-bind": "^1.0.7", 1839 | "define-properties": "^1.2.1", 1840 | "es-object-atoms": "^1.0.0" 1841 | }, 1842 | "funding": { 1843 | "url": "https://github.com/sponsors/ljharb" 1844 | } 1845 | }, 1846 | "node_modules/string.prototype.trimstart": { 1847 | "version": "1.0.8", 1848 | "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", 1849 | "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", 1850 | "dev": true, 1851 | "license": "MIT", 1852 | "dependencies": { 1853 | "call-bind": "^1.0.7", 1854 | "define-properties": "^1.2.1", 1855 | "es-object-atoms": "^1.0.0" 1856 | }, 1857 | "engines": { 1858 | "node": ">= 0.4" 1859 | }, 1860 | "funding": { 1861 | "url": "https://github.com/sponsors/ljharb" 1862 | } 1863 | }, 1864 | "node_modules/supports-preserve-symlinks-flag": { 1865 | "version": "1.0.0", 1866 | "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", 1867 | "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", 1868 | "dev": true, 1869 | "license": "MIT", 1870 | "engines": { 1871 | "node": ">= 0.4" 1872 | }, 1873 | "funding": { 1874 | "url": "https://github.com/sponsors/ljharb" 1875 | } 1876 | }, 1877 | "node_modules/tape": { 1878 | "version": "5.7.5", 1879 | "resolved": "https://registry.npmjs.org/tape/-/tape-5.7.5.tgz", 1880 | "integrity": "sha512-C5Gm1MR8ujZmNrsmOiHSkKFfY2thrnUrFw/fFtcva9FABbN7LrHuQPi3MTS0Z0i/SLfYSJtRIcJYDUpwPsQ8yA==", 1881 | "dev": true, 1882 | "license": "MIT", 1883 | "dependencies": { 1884 | "@ljharb/resumer": "^0.1.2", 1885 | "@ljharb/through": "^2.3.12", 1886 | "array.prototype.every": "^1.1.5", 1887 | "call-bind": "^1.0.7", 1888 | "deep-equal": "^2.2.3", 1889 | "defined": "^1.0.1", 1890 | "dotignore": "^0.1.2", 1891 | "for-each": "^0.3.3", 1892 | "get-package-type": "^0.1.0", 1893 | "glob": "^7.2.3", 1894 | "has-dynamic-import": "^2.1.0", 1895 | "hasown": "^2.0.1", 1896 | "inherits": "^2.0.4", 1897 | "is-regex": "^1.1.4", 1898 | "minimist": "^1.2.8", 1899 | "mock-property": "^1.0.3", 1900 | "object-inspect": "^1.13.1", 1901 | "object-is": "^1.1.5", 1902 | "object-keys": "^1.1.1", 1903 | "object.assign": "^4.1.5", 1904 | "resolve": "^2.0.0-next.5", 1905 | "string.prototype.trim": "^1.2.8" 1906 | }, 1907 | "bin": { 1908 | "tape": "bin/tape" 1909 | }, 1910 | "funding": { 1911 | "url": "https://github.com/sponsors/ljharb" 1912 | } 1913 | }, 1914 | "node_modules/type-detect": { 1915 | "version": "0.1.1", 1916 | "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-0.1.1.tgz", 1917 | "integrity": "sha512-5rqszGVwYgBoDkIm2oUtvkfZMQ0vk29iDMU0W2qCa3rG0vPDNczCMT4hV/bLBgLg8k8ri6+u3Zbt+S/14eMzlA==", 1918 | "dev": true, 1919 | "license": "MIT", 1920 | "engines": { 1921 | "node": "*" 1922 | } 1923 | }, 1924 | "node_modules/typed-array-buffer": { 1925 | "version": "1.0.2", 1926 | "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", 1927 | "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", 1928 | "dev": true, 1929 | "license": "MIT", 1930 | "dependencies": { 1931 | "call-bind": "^1.0.7", 1932 | "es-errors": "^1.3.0", 1933 | "is-typed-array": "^1.1.13" 1934 | }, 1935 | "engines": { 1936 | "node": ">= 0.4" 1937 | } 1938 | }, 1939 | "node_modules/typed-array-byte-length": { 1940 | "version": "1.0.1", 1941 | "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", 1942 | "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", 1943 | "dev": true, 1944 | "license": "MIT", 1945 | "dependencies": { 1946 | "call-bind": "^1.0.7", 1947 | "for-each": "^0.3.3", 1948 | "gopd": "^1.0.1", 1949 | "has-proto": "^1.0.3", 1950 | "is-typed-array": "^1.1.13" 1951 | }, 1952 | "engines": { 1953 | "node": ">= 0.4" 1954 | }, 1955 | "funding": { 1956 | "url": "https://github.com/sponsors/ljharb" 1957 | } 1958 | }, 1959 | "node_modules/typed-array-byte-offset": { 1960 | "version": "1.0.2", 1961 | "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", 1962 | "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", 1963 | "dev": true, 1964 | "license": "MIT", 1965 | "dependencies": { 1966 | "available-typed-arrays": "^1.0.7", 1967 | "call-bind": "^1.0.7", 1968 | "for-each": "^0.3.3", 1969 | "gopd": "^1.0.1", 1970 | "has-proto": "^1.0.3", 1971 | "is-typed-array": "^1.1.13" 1972 | }, 1973 | "engines": { 1974 | "node": ">= 0.4" 1975 | }, 1976 | "funding": { 1977 | "url": "https://github.com/sponsors/ljharb" 1978 | } 1979 | }, 1980 | "node_modules/typed-array-length": { 1981 | "version": "1.0.6", 1982 | "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", 1983 | "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", 1984 | "dev": true, 1985 | "license": "MIT", 1986 | "dependencies": { 1987 | "call-bind": "^1.0.7", 1988 | "for-each": "^0.3.3", 1989 | "gopd": "^1.0.1", 1990 | "has-proto": "^1.0.3", 1991 | "is-typed-array": "^1.1.13", 1992 | "possible-typed-array-names": "^1.0.0" 1993 | }, 1994 | "engines": { 1995 | "node": ">= 0.4" 1996 | }, 1997 | "funding": { 1998 | "url": "https://github.com/sponsors/ljharb" 1999 | } 2000 | }, 2001 | "node_modules/uc.micro": { 2002 | "version": "2.1.0", 2003 | "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", 2004 | "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", 2005 | "dev": true, 2006 | "license": "MIT" 2007 | }, 2008 | "node_modules/unbox-primitive": { 2009 | "version": "1.0.2", 2010 | "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", 2011 | "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", 2012 | "dev": true, 2013 | "license": "MIT", 2014 | "dependencies": { 2015 | "call-bind": "^1.0.2", 2016 | "has-bigints": "^1.0.2", 2017 | "has-symbols": "^1.0.3", 2018 | "which-boxed-primitive": "^1.0.2" 2019 | }, 2020 | "funding": { 2021 | "url": "https://github.com/sponsors/ljharb" 2022 | } 2023 | }, 2024 | "node_modules/which-boxed-primitive": { 2025 | "version": "1.0.2", 2026 | "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", 2027 | "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", 2028 | "dev": true, 2029 | "license": "MIT", 2030 | "dependencies": { 2031 | "is-bigint": "^1.0.1", 2032 | "is-boolean-object": "^1.1.0", 2033 | "is-number-object": "^1.0.4", 2034 | "is-string": "^1.0.5", 2035 | "is-symbol": "^1.0.3" 2036 | }, 2037 | "funding": { 2038 | "url": "https://github.com/sponsors/ljharb" 2039 | } 2040 | }, 2041 | "node_modules/which-collection": { 2042 | "version": "1.0.2", 2043 | "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", 2044 | "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", 2045 | "dev": true, 2046 | "license": "MIT", 2047 | "dependencies": { 2048 | "is-map": "^2.0.3", 2049 | "is-set": "^2.0.3", 2050 | "is-weakmap": "^2.0.2", 2051 | "is-weakset": "^2.0.3" 2052 | }, 2053 | "engines": { 2054 | "node": ">= 0.4" 2055 | }, 2056 | "funding": { 2057 | "url": "https://github.com/sponsors/ljharb" 2058 | } 2059 | }, 2060 | "node_modules/which-typed-array": { 2061 | "version": "1.1.15", 2062 | "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", 2063 | "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", 2064 | "dev": true, 2065 | "license": "MIT", 2066 | "dependencies": { 2067 | "available-typed-arrays": "^1.0.7", 2068 | "call-bind": "^1.0.7", 2069 | "for-each": "^0.3.3", 2070 | "gopd": "^1.0.1", 2071 | "has-tostringtag": "^1.0.2" 2072 | }, 2073 | "engines": { 2074 | "node": ">= 0.4" 2075 | }, 2076 | "funding": { 2077 | "url": "https://github.com/sponsors/ljharb" 2078 | } 2079 | }, 2080 | "node_modules/wrappy": { 2081 | "version": "1.0.2", 2082 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 2083 | "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", 2084 | "dev": true, 2085 | "license": "ISC" 2086 | } 2087 | } 2088 | } 2089 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@ruanyf/markdown-it-katex", 3 | "version": "5.0.0", 4 | "description": "Fast math support for markdown-it with KaTeX", 5 | "main": "index.js", 6 | "exports": { 7 | ".": { 8 | "import": "./index.mjs", 9 | "require": "./index.js" 10 | } 11 | }, 12 | "scripts": { 13 | "build": "rollup --config rollup.config.mjs", 14 | "watch": "watchify browser.js -o bundle.js -v", 15 | "test": "npm run build && node test/all.js", 16 | "prepublishOnly": "npm run build" 17 | }, 18 | "homepage": "https://github.com/ruanyf/markdown-it-katex", 19 | "repository": { 20 | "type": "git", 21 | "url": "git+ssh://git@github.com/ruanyf/markdown-it-katex.git" 22 | }, 23 | "keywords": [ 24 | "markdown", 25 | "KaTeX", 26 | "math", 27 | "LaTeX", 28 | "markdown-it-plugin", 29 | "markdown-it" 30 | ], 31 | "author": "Takahiro Ethan Ikeuchi @iktakahiro", 32 | "license": "MIT", 33 | "dependencies": { 34 | "katex": "latest" 35 | }, 36 | "devDependencies": { 37 | "markdown-it": "latest", 38 | "markdown-it-testgen": "0.1.6", 39 | "rollup": "^4.18.0", 40 | "tape": "5.x" 41 | }, 42 | "directories": { 43 | "test": "test" 44 | }, 45 | "bugs": { 46 | "url": "https://github.com/ruanyf/markdown-it-katex/issues" 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /rollup.config.mjs: -------------------------------------------------------------------------------- 1 | export default { 2 | input: 'index.mjs', 3 | output: { 4 | file: 'index.js', 5 | format: 'cjs' 6 | }, 7 | external: ['katex'] 8 | }; 9 | -------------------------------------------------------------------------------- /test/all.js: -------------------------------------------------------------------------------- 1 | var path = require('path'), 2 | tape = require('tape'), 3 | testLoad = require('markdown-it-testgen').load, 4 | mdk = require('../index'); 5 | 6 | var md = require('markdown-it')() 7 | .use(mdk); 8 | 9 | /* this uses the markdown-it-testgen module to automatically generate tests 10 | based on an easy to read text file 11 | */ 12 | testLoad(path.join(__dirname, 'fixtures/default.txt'), function(data){ 13 | data.fixtures.forEach(function (fixture){ 14 | 15 | /* generic test definition code using tape */ 16 | tape(fixture.header, function(t){ 17 | t.plan(1); 18 | 19 | var expected = fixture.second.text, 20 | actual = md.render(fixture.first.text); 21 | 22 | t.equals(actual, expected); 23 | 24 | }); 25 | 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /test/fixtures/default.txt: -------------------------------------------------------------------------------- 1 | 2 | Simple inline math 3 | . 4 | $1+1 = 2$ 5 | . 6 |

1+1=21+1 = 2

7 | . 8 | 9 | Simple block math 10 | . 11 | $$1+1 = 2$$ 12 | . 13 |

1+1=21+1 = 2 14 |

15 | . 16 | 17 | Ignore single dollar sign 18 | . 19 | It costs $5. 20 | . 21 |

It costs $5.

22 | . 23 | 24 | Ignore multiple dollar signs in separate paragraphs 25 | . 26 | This costs $5. 27 | 28 | That costs $10. 29 | . 30 |

This costs $5.

31 |

That costs $10.

32 | . 33 | 34 | Inline math inside heading 35 | . 36 | # The $N$-eigenvalue problem and two applications 37 | . 38 |

The NN-eigenvalue problem and two applications

39 | . 40 | --------------------------------------------------------------------------------