├── .eslintrc ├── .gitignore ├── LICENSE ├── README.md ├── lib ├── highlight.min.js └── marked.min.js ├── package-lock.json ├── package.json ├── scripts └── send.js ├── src ├── styles.css └── widget.js └── tpack.config.js /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "eslint:recommended", 3 | "env": { 4 | "node": true, 5 | "es2020": true, 6 | "browser": true, 7 | "jquery": true 8 | }, 9 | "parserOptions": { 10 | "ecmaVersion": 2022, 11 | "sourceType": "module" 12 | }, 13 | "rules": { 14 | "accessor-pairs": "error", 15 | "block-spacing": ["error", "never"], 16 | "brace-style": ["error", "stroustrup", {"allowSingleLine": true}], 17 | "curly": ["error", "multi-line", "consistent"], 18 | "dot-location": ["error", "property"], 19 | "dot-notation": "error", 20 | "func-call-spacing": "error", 21 | "handle-callback-err": "error", 22 | "key-spacing": "error", 23 | "keyword-spacing": "error", 24 | "new-cap": ["error", {"newIsCap": true}], 25 | "no-array-constructor": "error", 26 | "no-caller": "error", 27 | "no-console": "error", 28 | "no-duplicate-imports": "error", 29 | "no-else-return": "error", 30 | "no-eval": "error", 31 | "no-floating-decimal": "error", 32 | "no-implied-eval": "error", 33 | "no-iterator": "error", 34 | "no-label-var": "error", 35 | "no-labels": "error", 36 | "no-lone-blocks": "error", 37 | "no-mixed-spaces-and-tabs": "error", 38 | "no-multi-spaces": "error", 39 | "no-multi-str": "error", 40 | "no-new": "error", 41 | "no-new-func": "error", 42 | "no-new-object": "error", 43 | "no-new-wrappers": "error", 44 | "no-octal-escape": "error", 45 | "no-path-concat": "error", 46 | "no-proto": "error", 47 | "no-prototype-builtins": "off", 48 | "no-redeclare": ["error", {"builtinGlobals": true}], 49 | "no-self-compare": "error", 50 | "no-sequences": "error", 51 | "no-shadow": ["warn", {"builtinGlobals": false, "hoist": "functions"}], 52 | "no-tabs": "error", 53 | "no-template-curly-in-string": "error", 54 | "no-throw-literal": "error", 55 | "no-undef": "error", 56 | "no-undef-init": "error", 57 | "no-unmodified-loop-condition": "error", 58 | "no-unneeded-ternary": "error", 59 | "no-useless-call": "error", 60 | "no-useless-computed-key": "error", 61 | "no-useless-constructor": "error", 62 | "no-useless-rename": "error", 63 | "no-var": "error", 64 | "no-whitespace-before-property": "error", 65 | "object-curly-spacing": ["error", "never", {"objectsInObjects": false}], 66 | "object-property-newline": ["error", {"allowAllPropertiesOnSameLine": true}], 67 | "operator-linebreak": ["error", "none", {"overrides": {"?": "before", ":": "before", "&&": "before"}}], 68 | "prefer-const": "error", 69 | "quote-props": ["error", "consistent-as-needed", {"keywords": true}], 70 | "quotes": ["error", "double", {"allowTemplateLiterals": true}], 71 | "rest-spread-spacing": "error", 72 | "semi": "error", 73 | "semi-spacing": "error", 74 | "space-before-blocks": "error", 75 | "space-in-parens": "error", 76 | "space-infix-ops": "error", 77 | "space-unary-ops": ["error", {"words": true, "nonwords": false, "overrides": {"typeof": false}}], 78 | "spaced-comment": ["error", "always", {"exceptions": ["-", "*"]}], 79 | "template-curly-spacing": "error", 80 | "wrap-iife": ["error", "inside"], 81 | "yield-star-spacing": "error", 82 | "yoda": "error" 83 | }, 84 | "globals": { 85 | "api": "readonly" 86 | } 87 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | legacy/ 3 | dist/ 4 | .env -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Trilium-MarkdownPreview 2 | A widget for trilium notes for live previewing markdown files with support for anchors, images, and sync scroll. 3 | 4 | ## Why? 5 | I know Trilium isn't a markdown editor, but I still use markdown for other things like my GitHub READMEs and I like storing everything in one place--Trilium. The only problem was, I couldn't preview my markdown files, and that's super helpful to have before I go pushing a commit. After looking, I couldn't find an existing widget for it, so I decided to make my own. 6 | 7 | ## Preview 8 | 9 | ![Banner](https://github.com/rauenzi/Trilium-MarkdownPreview/assets/6865942/93194c61-eee3-49fd-8ed8-970f1476539c) 10 | 11 | 12 | ## Features 13 | 14 | - Preview markdown notes in real time 15 | - Global and per-note styles 16 | - Embed local images 17 | - Clickable in-page anchor links 18 | - Syncable scrollbars 19 | - GFM-compliant with tables and more 20 | 21 | 22 | ## Installation 23 | 24 | 1. Download the `zip` file from the [latest release](https://github.com/rauenzi/Trilium-MarkdownPreview/releases/latest) on GitHub. 25 | 1. Import the zip into Trilium, but make sure you uncheck `Safe Import`! 26 | 1. (optional) Create one (or more) child code notes of `CSS` type and fill it with any global markdown styles. 27 | 28 | 29 | ## Usage 30 | 31 | Create a code note with markdown type. Then, to make a note previewable, simply add the `#markdownPreview` attribute to it. (You may have to switch notes afterward for the preview to appear.) 32 | 33 | After that, just start writing in markdown on the code editor side. You'll see the preview update with you as you go. 34 | 35 | If you're going to add any images or styles to the note, it can be annoying to see the preview cards at the bottom. You can hide those by adding the `#hideChildrenOverview` native to Trilium. 36 | 37 | ### Syntax Highlighting 38 | 39 | Syntax highlighting is enabled by default, you can disable this by unchecking the promoted attribute `syntaxHighlighting` on the widget note! 40 | 41 | ### Images 42 | #### Local 43 | 44 | To use a local image, attach the image as a child of the markdown note. You can then simply refer to it by filename. 45 | 46 | #### Remote 47 | 48 | Remote images can be attached just like any other image using the full url. 49 | 50 | ### Anchor Links 51 | 52 | The actual heading anchors are created automatically and match GFM style. That means for complex headings you can have multiple `-` in a row. e.g. `Heading (subtext)` becomes `#heading--subtext-`. 53 | 54 | From there you can create anchor links by linking them as `[link text](#heading-name)` replacing any special characters (and spaces) with `-`. 55 | 56 | ### Scroll Sync 57 | 58 | By default, MarkdownPreview will try to keep the scroll bars in sync no matter which side you are scrolling. The widget is not perfect at keeping them exactly at the same place contextually because the rendering can be so different. 59 | 60 | #### Disabling 61 | 62 | You can disable the sync entirely by adding the `#markdownScrollSync` attribute with `none` as the value. You can also disable each side separately with `left` or `right`. For instance, if you want the preview to automatically scroll as you scroll the source, but not the other way around, then use `#markdownScrollSync=left`. 63 | 64 | ### Styling 65 | 66 | Both the global and local styles are picked up and reapplied on note switch, so no need to keep reloading if you are tinkering with your styles! 67 | #### Global 68 | As mentioned in the [installation](#installation) section, any `CSS` note that is a child to the widget code will automatically be picked up and applied. 69 | 70 | #### Local 71 | Local styles are specific to the markdown note. Just make a `CSS` note as a child of the markdown note and it'll be picked up! 72 | 73 | ## Showcase 74 | 75 | ### Anchors 76 | https://github.com/rauenzi/Trilium-MarkdownPreview/assets/6865942/dbf35c96-cd2e-4265-85bf-9cc977d44b18 77 | 78 | ### Local Styles 79 | https://github.com/rauenzi/Trilium-MarkdownPreview/assets/6865942/1d41cbc7-c4f8-41ab-8ab3-6b7fb2bfa75b 80 | 81 | ### ScrollSync 82 | https://github.com/rauenzi/Trilium-MarkdownPreview/assets/6865942/9ece0241-5f6a-4cbc-b911-26b0f95b7dff 83 | 84 | ### ScrollSync=left 85 | https://github.com/rauenzi/Trilium-MarkdownPreview/assets/6865942/c58e6ab1-0ad8-4714-8aa8-e972a61c20db 86 | 87 | -------------------------------------------------------------------------------- /lib/marked.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * marked v7.0.2 - a markdown parser 3 | * Copyright (c) 2011-2023, Christopher Jeffrey. (MIT Licensed) 4 | * https://github.com/markedjs/marked 5 | */ 6 | !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).marked={})}(this,function(t){"use strict";function e(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!1,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!1,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function n(e){t.defaults=e}t.defaults=e();const s=/[&<>"']/,r=new RegExp(s.source,"g"),i=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,l=new RegExp(i.source,"g"),a={"&":"&","<":"<",">":">",'"':""","'":"'"},o=e=>a[e];function h(e,t){if(t){if(s.test(e))return e.replace(r,o)}else if(i.test(e))return e.replace(l,o);return e}const c=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function z(e){return e.replace(c,(e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):"")}const p=/(^|[^\[])\^/g;function u(n,e){n="string"==typeof n?n:n.source,e=e||"";const s={replace:(e,t)=>(t=(t="object"==typeof t&&"source"in t?t.source:t).replace(p,"$1"),n=n.replace(e,t),s),getRegex:()=>new RegExp(n,e)};return s}const g=/[^\w:]/g,d=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function k(e,t,n){if(e){let e;try{e=decodeURIComponent(z(n)).replace(g,"").toLowerCase()}catch(e){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}var s;t&&!d.test(n)&&(e=t,t=n,f[" "+e]||(x.test(e)?f[" "+e]=e+"/":f[" "+e]=w(e,"/",!0)),s=-1===(e=f[" "+e]).indexOf(":"),n="//"===t.substring(0,2)?s?t:e.replace(D,"$1")+t:"/"===t.charAt(0)?s?t:e.replace(O,"$1")+t:e+t);try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n}const f={},x=/^[^:]+:\/*[^/]*$/,D=/^([^:]+:)[\s\S]*$/,O=/^([^:]+:\/*[^/]*)[\s\S]*$/;var m={exec:()=>null};function b(e,t){var n=e.replace(/\|/g,(e,t,n)=>{let s=!1,r=t;for(;0<=--r&&"\\"===n[r];)s=!s;return s?"|":" |"}).split(/ \|/);let s=0;if(n[0].trim()||n.shift(),0t)n.splice(t);else for(;n.length{var t=e.match(/^\s+/);return null!==t&&([t]=t,t.length>=n.length)?e.slice(n.length):e}).join("\n")}(t=e[0],e[3]||""),{type:"code",raw:t,lang:e[2]&&e[2].trim().replace(this.rules.inline._escapes,"$1"),text:n}}heading(t){var n,t=this.rules.block.heading.exec(t);if(t){let e=t[2].trim();return/#$/.test(e)&&(n=w(e,"#"),!this.options.pedantic&&n&&!/ $/.test(n)||(e=n.trim())),{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){e=this.rules.block.hr.exec(e);if(e)return{type:"hr",raw:e[0]}}blockquote(e){var t,n,s,e=this.rules.block.blockquote.exec(e);if(e)return t=e[0].replace(/^ *>[ \t]?/gm,""),n=this.lexer.state.top,this.lexer.state.top=!0,s=this.lexer.blockTokens(t),this.lexer.state.top=n,{type:"blockquote",raw:e[0],tokens:s,text:t}}list(g){let d=this.rules.block.list.exec(g);if(d){let e,t,n,s,r,i,l,a,o,h,c,p,u=d[1].trim();for(var k=1" ".repeat(3*e.length)),o=g.split("\n",1)[0],this.options.pedantic?(s=2,c=a.trimLeft()):(s=4<(s=d[2].search(/[^ ]/))?1:s,c=a.slice(s),s+=d[1].length),i=!1,!a&&/^ *$/.test(o)&&(e+=o+"\n",g=g.substring(o.length+1),p=!0),!p)for(var m=new RegExp(`^ {0,${Math.min(3,s-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),b=new RegExp(`^ {0,${Math.min(3,s-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),w=new RegExp(`^ {0,${Math.min(3,s-1)}}(?:\`\`\`|~~~)`),y=new RegExp(`^ {0,${Math.min(3,s-1)}}#`);g&&(h=g.split("\n",1)[0],o=h,this.options.pedantic&&(o=o.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!w.test(o))&&!y.test(o)&&!m.test(o)&&!b.test(g);){if(o.search(/[^ ]/)>=s||!o.trim())c+="\n"+o.slice(s);else{if(i)break;if(4<=a.search(/[^ ]/))break;if(w.test(a))break;if(y.test(a))break;if(b.test(a))break;c+="\n"+o}i||o.trim()||(i=!0),e+=h+"\n",g=g.substring(h.length+1),a=o.slice(s)}f.loose||(l?f.loose=!0:/\n *\n *$/.test(e)&&(l=!0)),this.options.gfm&&(t=/^\[[ xX]\] /.exec(c))&&(n="[ ] "!==t[0],c=c.replace(/^\[[ xX]\] +/,"")),f.items.push({type:"list_item",raw:e,task:!!t,checked:n,loose:!1,text:c}),f.raw+=e}f.items[f.items.length-1].raw=e.trimRight(),f.items[f.items.length-1].text=c.trimRight(),f.raw=f.raw.trimRight();var _,$=f.items.length;for(r=0;r<$;r++)this.lexer.state.top=!1,f.items[r].tokens=this.lexer.blockTokens(f.items[r].text,[]),f.loose||(_=0<(_=f.items[r].tokens.filter(e=>"space"===e.type)).length&&_.some(e=>/\n.*\n/.test(e.raw)),f.loose=_);if(f.loose)for(r=0;r<$;r++)f.items[r].loose=!0;return f}}html(e){var t,n,e=this.rules.block.html.exec(e);if(e)return t={type:"html",block:!0,raw:e[0],pre:!this.options.sanitizer&&("pre"===e[1]||"script"===e[1]||"style"===e[1]),text:e[0]},this.options.sanitize&&(e=this.options.sanitizer?this.options.sanitizer(e[0]):h(e[0]),(n=t).type="paragraph",n.text=e,n.tokens=this.lexer.inline(e)),t}def(e){var t,n,s,e=this.rules.block.def.exec(e);if(e)return t=e[1].toLowerCase().replace(/\s+/g," "),n=e[2]?e[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",s=e[3]&&e[3].substring(1,e[3].length-1).replace(this.rules.inline._escapes,"$1"),{type:"def",tag:t,raw:e[0],href:n,title:s}}table(e){e=this.rules.block.table.exec(e);if(e){var i={type:"table",raw:e[0],header:b(e[1]).map(e=>({text:e})),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:e[3]&&e[3].trim()?e[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(i.header.length===i.align.length){let e=i.align.length,t,n,s,r;for(t=0;t({text:e}));for(e=i.header.length,n=0;n/i.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):h(e[0]):e[0]}}link(n){n=this.rules.inline.link.exec(n);if(n){var s=n[2].trim();if(!this.options.pedantic&&/^$/.test(s))return;var r=w(s.slice(0,-1),"\\");if((s.length-r.length)%2==0)return}else{var i,r=function(n,s){if(-1!==n.indexOf(s[1])){var r=n.length;let e=0,t=0;for(;t$/.test(s)?e.slice(1):e.slice(1,-1):e)&&e.replace(this.rules.inline._escapes,"$1"),title:t&&t.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(t,n){let s;if(s=(s=this.rules.inline.reflink.exec(t))||this.rules.inline.nolink.exec(t)){let e=(s[2]||s[1]).replace(/\s+/g," ");return(e=n[e.toLowerCase()])?y(s,e,s[0],this.lexer):{type:"text",raw:t=s[0].charAt(0),text:t}}}emStrong(r,i,e=""){let l=this.rules.inline.emStrong.lDelim.exec(r);if(l&&((!l[3]||!e.match(/[\p{L}\p{N}]/u))&&(!(l[1]||l[2]||"")||!e||this.rules.inline.punctuation.exec(e)))){var a=l[0].length-1;let e,t,n=a,s=0;var o,h,c="*"===l[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(c.lastIndex=0,i=i.slice(-1*r.length+a);null!=(l=c.exec(i));)if(e=l[1]||l[2]||l[3]||l[4]||l[5]||l[6])if(t=e.length,l[3]||l[4])n+=t;else if((l[5]||l[6])&&a%3&&!((a+t)%3))s+=t;else if(!(0<(n-=t)))return t=Math.min(t,t+n+s),o=r.slice(0,a+l.index+t+1),Math.min(a,t)%2?(h=o.slice(1,-1),{type:"em",raw:o,text:h,tokens:this.lexer.inlineTokens(h)}):(h=o.slice(2,-2),{type:"strong",raw:o,text:h,tokens:this.lexer.inlineTokens(h)})}}codespan(t){t=this.rules.inline.code.exec(t);if(t){let e=t[2].replace(/\n/g," ");var n=/[^ ]/.test(e),s=/^ /.test(e)&&/ $/.test(e);return e=h(e=n&&s?e.substring(1,e.length-1):e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){e=this.rules.inline.br.exec(e);if(e)return{type:"br",raw:e[0]}}del(e){e=this.rules.inline.del.exec(e);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(n,s){n=this.rules.inline.autolink.exec(n);if(n){let e,t;return t="@"===n[2]?"mailto:"+(e=h(this.options.mangle?s(n[1]):n[1])):e=h(n[1]),{type:"link",raw:n[0],text:e,href:t,tokens:[{type:"text",raw:e,text:e}]}}}url(e,n){var s,r;if(s=this.rules.inline.url.exec(e)){let e,t;if("@"===s[2])e=h(this.options.mangle?n(s[0]):s[0]),t="mailto:"+e;else{for(;r=s[0],s[0]=this.rules.inline._backpedal.exec(s[0])[0],r!==s[0];);e=h(s[0]),t="www."===s[1]?"http://"+s[0]:s[0]}return{type:"link",raw:s[0],text:e,href:t,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(t,n){t=this.rules.inline.text.exec(t);if(t){let e;return e=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):h(t[0]):t[0]:h(this.options.smartypants?n(t[0]):t[0]),{type:"text",raw:t[0],text:e}}}}const $={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:m,lheading:/^((?:(?!^bull ).|\n(?!\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/},v=($.def=u($.def).replace("label",$._label).replace("title",$._title).getRegex(),$.bullet=/(?:[*+-]|\d{1,9}[.)])/,$.listItemStart=u(/^( *)(bull) */).replace("bull",$.bullet).getRegex(),$.list=u($.list).replace(/bull/g,$.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+$.def.source+")").getRegex(),$._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",$._comment=/|$)/,$.html=u($.html,"i").replace("comment",$._comment).replace("tag",$._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),$.lheading=u($.lheading).replace(/bull/g,$.bullet).getRegex(),$.paragraph=u($._paragraph).replace("hr",$.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",$._tag).getRegex(),$.blockquote=u($.blockquote).replace("paragraph",$.paragraph).getRegex(),$.normal={...$},$.gfm={...$.normal,table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"},$.gfm.table=u($.gfm.table).replace("hr",$.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",$._tag).getRegex(),$.gfm.paragraph=u($._paragraph).replace("hr",$.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",$.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",$._tag).getRegex(),$.pedantic={...$.normal,html:u("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",$._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:m,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:u($.normal._paragraph).replace("hr",$.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",$.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()},{escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:m,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,rDelimAst:/^[^_*]*?__[^_*]*?\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\*)[punct](\*+)(?=[\s]|$)|[^punct\s](\*+)(?!\*)(?=[punct\s]|$)|(?!\*)[punct\s](\*+)(?=[^punct\s])|[\s](\*+)(?!\*)(?=[punct])|(?!\*)[punct](\*+)(?!\*)(?=[punct])|[^punct\s](\*+)(?=[^punct\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\s]|$)|[^punct\s](_+)(?!_)(?=[punct\s]|$)|(?!_)[punct\s](_+)(?=[^punct\s])|[\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:m,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`^|~",v.punctuation=u(v.punctuation,"u").replace(/punctuation/g,v._punctuation).getRegex(),v.blockSkip=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,v.anyPunctuation=/\\[punct]/g,v._escapes=/\\([punct])/g,v._comment=u($._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),v.emStrong.lDelim=u(v.emStrong.lDelim,"u").replace(/punct/g,v._punctuation).getRegex(),v.emStrong.rDelimAst=u(v.emStrong.rDelimAst,"gu").replace(/punct/g,v._punctuation).getRegex(),v.emStrong.rDelimUnd=u(v.emStrong.rDelimUnd,"gu").replace(/punct/g,v._punctuation).getRegex(),v.anyPunctuation=u(v.anyPunctuation,"gu").replace(/punct/g,v._punctuation).getRegex(),v._escapes=u(v._escapes,"gu").replace(/punct/g,v._punctuation).getRegex(),v._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,v._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,v.autolink=u(v.autolink).replace("scheme",v._scheme).replace("email",v._email).getRegex(),v._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,v.tag=u(v.tag).replace("comment",v._comment).replace("attribute",v._attribute).getRegex(),v._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,v._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,v._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,v.link=u(v.link).replace("label",v._label).replace("href",v._href).replace("title",v._title).getRegex(),v.reflink=u(v.reflink).replace("label",v._label).replace("ref",$._label).getRegex(),v.nolink=u(v.nolink).replace("ref",$._label).getRegex(),v.reflinkSearch=u(v.reflinkSearch,"g").replace("reflink",v.reflink).replace("nolink",v.nolink).getRegex(),v.normal={...v},v.pedantic={...v.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:u(/^!?\[(label)\]\((.*?)\)/).replace("label",v._label).getRegex(),reflink:u(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",v._label).getRegex()},v.gfm={...v.normal,escape:u(v.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\t+" ".repeat(n.length));let n,e,r,i;for(;s;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(e=>!!(n=e.call({lexer:this},s,t))&&(s=s.substring(n.raw.length),t.push(n),!0))))if(n=this.tokenizer.space(s))s=s.substring(n.raw.length),1===n.raw.length&&0{"number"==typeof(n=e.call({lexer:this},a))&&0<=n&&(t=Math.min(t,n))}),t<1/0&&0<=t&&(r=s.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(r)))e=t[t.length-1],i&&"paragraph"===e.type?(e.raw+="\n"+n.raw,e.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=e.text):t.push(n),i=r.length!==s.length,s=s.substring(n.raw.length);else if(n=this.tokenizer.text(s))s=s.substring(n.raw.length),(e=t[t.length-1])&&"text"===e.type?(e.raw+="\n"+n.raw,e.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=e.text):t.push(n);else if(s){var l="Infinite loop on byte: "+s.charCodeAt(0);if(this.options.silent){console.error(l);break}throw new Error(l)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(s,t=[]){let n,e,r,i=s,l,a,o;if(this.tokens.links){var h=Object.keys(this.tokens.links);if(0!!(n=e.call({lexer:this},s,t))&&(s=s.substring(n.raw.length),t.push(n),!0))))if(n=this.tokenizer.escape(s))s=s.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.tag(s))s=s.substring(n.raw.length),(e=t[t.length-1])&&"text"===n.type&&"text"===e.type?(e.raw+=n.raw,e.text+=n.text):t.push(n);else if(n=this.tokenizer.link(s))s=s.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.reflink(s,this.tokens.links))s=s.substring(n.raw.length),(e=t[t.length-1])&&"text"===n.type&&"text"===e.type?(e.raw+=n.raw,e.text+=n.text):t.push(n);else if(n=this.tokenizer.emStrong(s,i,o))s=s.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.codespan(s))s=s.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.br(s))s=s.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.del(s))s=s.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.autolink(s,S))s=s.substring(n.raw.length),t.push(n);else if(!this.state.inLink&&(n=this.tokenizer.url(s,S)))s=s.substring(n.raw.length),t.push(n);else{if(r=s,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const p=s.slice(1);let n;this.options.extensions.startInline.forEach(e=>{"number"==typeof(n=e.call({lexer:this},p))&&0<=n&&(t=Math.min(t,n))}),t<1/0&&0<=t&&(r=s.substring(0,t+1))}if(n=this.tokenizer.inlineText(r,j))s=s.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(o=n.raw.slice(-1)),a=!0,(e=t[t.length-1])&&"text"===e.type?(e.raw+=n.raw,e.text+=n.text):t.push(n);else if(s){var c="Infinite loop on byte: "+s.charCodeAt(0);if(this.options.silent){console.error(c);break}throw new Error(c)}}return t}}class T{options;constructor(e){this.options=e||t.defaults}code(e,t,n){var s,t=(t||"").match(/\S*/)[0];return this.options.highlight&&null!=(s=this.options.highlight(e,t))&&s!==e&&(n=!0,e=s),e=e.replace(/\n$/,"")+"\n",t?'
'+(n?e:h(e,!0))+"
\n":"
"+(n?e:h(e,!0))+"
\n"}blockquote(e){return`
7 | ${e}
8 | `}html(e,t){return e}heading(e,t,n,s){return this.options.headerIds?`${e} 9 | `:`${e} 10 | `}hr(){return this.options.xhtml?"
\n":"
\n"}list(e,t,n){var s=t?"ol":"ul";return"<"+s+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"}listitem(e,t,n){return`
  • ${e}
  • 11 | `}checkbox(e){return" "}paragraph(e){return`

    ${e}

    12 | `}table(e,t){return"\n\n"+e+"\n"+(t=t&&`${t}`)+"
    \n"}tablerow(e){return` 13 | ${e} 14 | `}tablecell(e,t){var n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+` 15 | `}strong(e){return`${e}`}em(e){return`${e}`}codespan(e){return`${e}`}br(){return this.options.xhtml?"
    ":"
    "}del(e){return`${e}`}link(e,t,n){if(null===(e=k(this.options.sanitize,this.options.baseUrl,e)))return n;let s='"}image(e,t,n){if(null===(e=k(this.options.sanitize,this.options.baseUrl,e)))return n;let s=`${n}":">"}text(e){return e}}class A{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}class I{seen;constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(e,t){let n=e,s=0;if(this.seen.hasOwnProperty(n))for(s=this.seen[e];s++,n=e+"-"+s,this.seen.hasOwnProperty(n););return t||(this.seen[e]=s,this.seen[n]=0),n}slug(e,t={}){e=this.serialize(e);return this.getNextSafeSlug(e,t.dryrun)}}class E{options;renderer;textRenderer;slugger;constructor(e){this.options=e||t.defaults,this.options.renderer=this.options.renderer||new T,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new A,this.slugger=new I}static parse(e,t){return new E(t).parse(e)}static parseInline(e,t){return new E(t).parseInline(e)}parse(e,t=!0){let n="",s,r,i,l,a,o,h,c,p,u,g,d,k,f,x,m,b,w,y;var _=e.length;for(s=0;s<_;s++)if(u=e[s],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[u.type]&&(!1!==(y=this.options.extensions.renderers[u.type].call({parser:this},u))||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(u.type)))n+=y||"";else switch(u.type){case"space":continue;case"hr":n+=this.renderer.hr();continue;case"heading":n+=this.renderer.heading(this.parseInline(u.tokens),u.depth,z(this.parseInline(u.tokens,this.textRenderer)),this.slugger);continue;case"code":n+=this.renderer.code(u.text,u.lang,!!u.escaped);continue;case"table":for(c="",h="",l=u.header.length,r=0;r{n=n.concat(this.walkTokens(s[e],t))}):s.tokens&&(n=n.concat(this.walkTokens(s.tokens,t)))}return n}use(...e){const m=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{var e={...n};if(e.async=this.defaults.async||e.async||!1,n.extensions&&(n.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){const s=m.renderers[n.name];s?m.renderers[n.name]=function(...e){let t=n.renderer.apply(this,e);return t=!1===t?s.apply(this,e):t}:m.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||"block"!==n.level&&"inline"!==n.level)throw new Error("extension level must be 'block' or 'inline'");m[n.level]?m[n.level].unshift(n.tokenizer):m[n.level]=[n.tokenizer],n.start&&("block"===n.level?m.startBlock?m.startBlock.push(n.start):m.startBlock=[n.start]:"inline"===n.level&&(m.startInline?m.startInline.push(n.start):m.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(m.childTokens[n.name]=n.childTokens)}),e.extensions=m),n.renderer){const i=this.defaults.renderer||new T(this.defaults);for(const l in n.renderer){const a=n.renderer[l];var t=l;const o=i[t];i[t]=(...e)=>{let t=a.apply(i,e);return(t=!1===t?o.apply(i,e):t)||""}}e.renderer=i}if(n.tokenizer){const h=this.defaults.tokenizer||new _(this.defaults);for(const c in n.tokenizer){const p=n.tokenizer[c];var s=c;const u=h[s];h[s]=(...e)=>{let t=p.apply(h,e);return t=!1===t?u.apply(h,e):t}}e.tokenizer=h}if(n.hooks){const g=this.defaults.hooks||new P;for(const d in n.hooks){const k=n.hooks[d];var r=d;const f=g[r];P.passThroughHooks.has(d)?g[r]=e=>{return this.defaults.async?Promise.resolve(k.call(g,e)).then(e=>f.call(g,e)):(e=k.call(g,e),f.call(g,e))}:g[r]=(...e)=>{let t=k.apply(g,e);return t=!1===t?f.apply(g,e):t}}e.hooks=g}if(n.walkTokens){const x=this.defaults.walkTokens;e.walkTokens=function(e){let t=[];return t.push(n.walkTokens.call(this,e)),t=x?t.concat(x.call(this,e)):t}}this.defaults={...this.defaults,...e}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}#parseMarkdown(h,c){return(t,e,r)=>{"function"==typeof e&&(r=e,e=null);var n,e={...e};const i={...this.defaults,...e},l=this.#onError(!!i.silent,!!i.async,r);if(null==t)return l(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(e=i,n=r,e&&!e.silent&&(n&&console.warn("marked(): callback is deprecated since version 5.0.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/using_pro#async"),(e.sanitize||e.sanitizer)&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options"),!e.highlight&&"language-"===e.langPrefix||console.warn("marked(): highlight and langPrefix parameters are deprecated since version 5.0.0, should not be used and will be removed in the future. Instead use https://www.npmjs.com/package/marked-highlight."),e.mangle&&console.warn("marked(): mangle parameter is enabled by default, but is deprecated since version 5.0.0, and will be removed in the future. To clear this warning, install https://www.npmjs.com/package/marked-mangle, or disable by setting `{mangle: false}`."),e.baseUrl&&console.warn("marked(): baseUrl parameter is deprecated since version 5.0.0, should not be used and will be removed in the future. Instead use https://www.npmjs.com/package/marked-base-url."),e.smartypants&&console.warn("marked(): smartypants parameter is deprecated since version 5.0.0, should not be used and will be removed in the future. Instead use https://www.npmjs.com/package/marked-smartypants."),e.xhtml&&console.warn("marked(): xhtml parameter is deprecated since version 5.0.0, should not be used and will be removed in the future. Instead use https://www.npmjs.com/package/marked-xhtml."),e.headerIds||e.headerPrefix)&&console.warn("marked(): headerIds and headerPrefix parameters enabled by default, but are deprecated since version 5.0.0, and will be removed in the future. To clear this warning, install https://www.npmjs.com/package/marked-gfm-heading-id, or disable by setting `{headerIds: false}`."),i.hooks&&(i.hooks.options=i),r){const a=i.highlight;let n;try{i.hooks&&(t=i.hooks.preprocess(t)),n=h(t,i)}catch(e){return l(e)}const o=t=>{let e;if(!t)try{i.walkTokens&&this.walkTokens(n,i.walkTokens),e=c(n,i),i.hooks&&(e=i.hooks.postprocess(e))}catch(e){t=e}return i.highlight=a,t?l(t):r(null,e)};if(!a||a.length<3)return o();if(delete i.highlight,!n.length)return o();let s=0;this.walkTokens(n,n=>{"code"===n.type&&(s++,setTimeout(()=>{a(n.text,n.lang,(e,t)=>{if(e)return o(e);null!=t&&t!==n.text&&(n.text=t,n.escaped=!0),0===--s&&o()})},0))}),void(0===s&&o())}else{if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(t):t).then(e=>h(e,i)).then(e=>i.walkTokens?Promise.all(this.walkTokens(e,i.walkTokens)).then(()=>e):e).then(e=>c(e,i)).then(e=>i.hooks?i.hooks.postprocess(e):e).catch(l);try{i.hooks&&(t=i.hooks.preprocess(t));var s=h(t,i);i.walkTokens&&this.walkTokens(s,i.walkTokens);let e=c(s,i);return e=i.hooks?i.hooks.postprocess(e):e}catch(e){return l(e)}}}}#onError(n,s,r){return e=>{var t;if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",n)return t="

    An error occurred:

    "+h(e.message+"",!0)+"
    ",s?Promise.resolve(t):r?void r(null,t):t;if(s)return Promise.reject(e);if(!r)throw e;r(e)}}}const q=new Z;function L(e,t,n){return q.parse(e,t,n)}L.options=L.setOptions=function(e){return q.setOptions(e),n(L.defaults=q.defaults),L},L.getDefaults=e,L.defaults=t.defaults,L.use=function(...e){return q.use(...e),n(L.defaults=q.defaults),L},L.walkTokens=function(e,t){return q.walkTokens(e,t)},L.parseInline=q.parseInline,L.Parser=E,L.parser=E.parse,L.Renderer=T,L.TextRenderer=A,L.Lexer=R,L.lexer=R.lex,L.Tokenizer=_,L.Slugger=I,L.Hooks=P;var m=(L.parse=L).options,C=L.setOptions,B=L.use,Q=L.walkTokens,U=L.parseInline,M=L,H=E.parse,N=R.lex;t.Hooks=P,t.Lexer=R,t.Marked=Z,t.Parser=E,t.Renderer=T,t.Slugger=I,t.TextRenderer=A,t.Tokenizer=_,t.getDefaults=e,t.lexer=N,t.marked=L,t.options=m,t.parse=M,t.parseInline=U,t.parser=H,t.setOptions=C,t.use=B,t.walkTokens=Q}); -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "trilium-markdownpreview", 3 | "version": "1.0.0", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "trilium-markdownpreview", 9 | "version": "1.0.0", 10 | "license": "Apache-2.0", 11 | "dependencies": { 12 | "highlight.js": "^11.8.0", 13 | "marked": "^7.0.3" 14 | }, 15 | "devDependencies": { 16 | "@types/trilium": "npm:trilium-types@^0.1.0", 17 | "dotenv": "^16.3.1", 18 | "eslint": "^8.47.0", 19 | "trilium-etapi": "^0.1.1", 20 | "trilium-pack": "^0.1.0" 21 | } 22 | }, 23 | "node_modules/@aashutoshrathi/word-wrap": { 24 | "version": "1.2.6", 25 | "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", 26 | "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", 27 | "dev": true, 28 | "engines": { 29 | "node": ">=0.10.0" 30 | } 31 | }, 32 | "node_modules/@ckeditor/ckeditor5-clipboard": { 33 | "version": "39.0.1", 34 | "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-clipboard/-/ckeditor5-clipboard-39.0.1.tgz", 35 | "integrity": "sha512-OIlIvsiz6YTZM8o1Y1zG9eW9rUx06Bs3rMbMv37kNN1vq145D9h0OQt0iPKw1eXAG387Sk+SWZhO+Um+/O3eGw==", 36 | "dev": true, 37 | "dependencies": { 38 | "@ckeditor/ckeditor5-core": "39.0.1", 39 | "@ckeditor/ckeditor5-engine": "39.0.1", 40 | "@ckeditor/ckeditor5-ui": "39.0.1", 41 | "@ckeditor/ckeditor5-utils": "39.0.1", 42 | "@ckeditor/ckeditor5-widget": "39.0.1", 43 | "lodash-es": "4.17.21" 44 | }, 45 | "engines": { 46 | "node": ">=16.0.0", 47 | "npm": ">=5.7.1" 48 | } 49 | }, 50 | "node_modules/@ckeditor/ckeditor5-core": { 51 | "version": "39.0.1", 52 | "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-core/-/ckeditor5-core-39.0.1.tgz", 53 | "integrity": "sha512-3hva3sRdDS2TLDhQNKgnJmpdXhuaod5tooDI/vnaiK+kduqy3nPuWI0qHtFpMhe7dlQWPZSI9ZhS/7cfFQ4CUg==", 54 | "dev": true, 55 | "dependencies": { 56 | "@ckeditor/ckeditor5-engine": "39.0.1", 57 | "@ckeditor/ckeditor5-utils": "39.0.1", 58 | "lodash-es": "4.17.21" 59 | }, 60 | "engines": { 61 | "node": ">=16.0.0", 62 | "npm": ">=5.7.1" 63 | } 64 | }, 65 | "node_modules/@ckeditor/ckeditor5-editor-balloon": { 66 | "version": "39.0.1", 67 | "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-editor-balloon/-/ckeditor5-editor-balloon-39.0.1.tgz", 68 | "integrity": "sha512-pzhRVk8Vh1HubSmNsVvPQShHN8YsMVcz31O64xEyiuf8mn3sT/PoFogH4q+xziHnO72AOu3JerWIZg8k/Kxb5Q==", 69 | "dev": true, 70 | "dependencies": { 71 | "ckeditor5": "39.0.1", 72 | "lodash-es": "4.17.21" 73 | }, 74 | "engines": { 75 | "node": ">=16.0.0", 76 | "npm": ">=5.7.1" 77 | } 78 | }, 79 | "node_modules/@ckeditor/ckeditor5-engine": { 80 | "version": "39.0.1", 81 | "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-engine/-/ckeditor5-engine-39.0.1.tgz", 82 | "integrity": "sha512-QWyx1vO7+UO3rVIx9o1M7q05ghu1T+E4ugnzlcjLx+TiRLBH280M5RmxZ5gE8HjTSIabGDK1M0kmskL+wl2nDw==", 83 | "dev": true, 84 | "dependencies": { 85 | "@ckeditor/ckeditor5-utils": "39.0.1", 86 | "lodash-es": "4.17.21" 87 | }, 88 | "engines": { 89 | "node": ">=16.0.0", 90 | "npm": ">=5.7.1" 91 | } 92 | }, 93 | "node_modules/@ckeditor/ckeditor5-enter": { 94 | "version": "39.0.1", 95 | "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-enter/-/ckeditor5-enter-39.0.1.tgz", 96 | "integrity": "sha512-4gF0CFbEgZowQGmcyKP9KKBKOk67bdQIP5y71QvDgP6rUdbOQ5NDAS3FKis6a2Aubhtg92BO4QC6tZADPiW3hA==", 97 | "dev": true, 98 | "dependencies": { 99 | "@ckeditor/ckeditor5-core": "39.0.1", 100 | "@ckeditor/ckeditor5-engine": "39.0.1", 101 | "@ckeditor/ckeditor5-utils": "39.0.1" 102 | }, 103 | "engines": { 104 | "node": ">=16.0.0", 105 | "npm": ">=5.7.1" 106 | } 107 | }, 108 | "node_modules/@ckeditor/ckeditor5-paragraph": { 109 | "version": "39.0.1", 110 | "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-paragraph/-/ckeditor5-paragraph-39.0.1.tgz", 111 | "integrity": "sha512-zKYtpka2X8uR6bTiCXecwl86XKQ8ngk7Hm3UkmptDSfBDOp9PpFCeA3i8m1soFvT2OcdxQYbuAcd9TwoV/HY0g==", 112 | "dev": true, 113 | "dependencies": { 114 | "@ckeditor/ckeditor5-core": "39.0.1", 115 | "@ckeditor/ckeditor5-ui": "39.0.1", 116 | "@ckeditor/ckeditor5-utils": "39.0.1" 117 | }, 118 | "engines": { 119 | "node": ">=16.0.0", 120 | "npm": ">=5.7.1" 121 | } 122 | }, 123 | "node_modules/@ckeditor/ckeditor5-select-all": { 124 | "version": "39.0.1", 125 | "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-select-all/-/ckeditor5-select-all-39.0.1.tgz", 126 | "integrity": "sha512-Q4BwezfYmZEwODecoxXc2+2UNUkx/Gu5n7jZH/2kKNBVFwb3iVIun9tj5Q1+093FKjmLA46maYsG5HIG6eArTg==", 127 | "dev": true, 128 | "dependencies": { 129 | "@ckeditor/ckeditor5-core": "39.0.1", 130 | "@ckeditor/ckeditor5-ui": "39.0.1", 131 | "@ckeditor/ckeditor5-utils": "39.0.1" 132 | }, 133 | "engines": { 134 | "node": ">=16.0.0", 135 | "npm": ">=5.7.1" 136 | } 137 | }, 138 | "node_modules/@ckeditor/ckeditor5-typing": { 139 | "version": "39.0.1", 140 | "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-typing/-/ckeditor5-typing-39.0.1.tgz", 141 | "integrity": "sha512-bfMGH3IKj8LdhzfMpfOFUlnCPkpGQhl1HN2oF2g7EViOfuDKM4A2GboUIEqRP2C3tkwtHK5zM55Rdbd71DAQPQ==", 142 | "dev": true, 143 | "dependencies": { 144 | "@ckeditor/ckeditor5-core": "39.0.1", 145 | "@ckeditor/ckeditor5-engine": "39.0.1", 146 | "@ckeditor/ckeditor5-utils": "39.0.1", 147 | "lodash-es": "4.17.21" 148 | }, 149 | "engines": { 150 | "node": ">=16.0.0", 151 | "npm": ">=5.7.1" 152 | } 153 | }, 154 | "node_modules/@ckeditor/ckeditor5-ui": { 155 | "version": "39.0.1", 156 | "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-ui/-/ckeditor5-ui-39.0.1.tgz", 157 | "integrity": "sha512-6mBZNfMVSjyNb3HHyjJFwrR2rvmTuH1JSc+ebuulw5knYQmDaeCaS4tiYmOVcGGz/WcrAYRQAtSGrfZmuLesMQ==", 158 | "dev": true, 159 | "dependencies": { 160 | "@ckeditor/ckeditor5-core": "39.0.1", 161 | "@ckeditor/ckeditor5-utils": "39.0.1", 162 | "color-convert": "2.0.1", 163 | "color-parse": "1.4.2", 164 | "lodash-es": "4.17.21", 165 | "vanilla-colorful": "0.7.2" 166 | }, 167 | "engines": { 168 | "node": ">=16.0.0", 169 | "npm": ">=5.7.1" 170 | } 171 | }, 172 | "node_modules/@ckeditor/ckeditor5-undo": { 173 | "version": "39.0.1", 174 | "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-undo/-/ckeditor5-undo-39.0.1.tgz", 175 | "integrity": "sha512-fgI5zNylzuiT2EitHm9ZVaAXB27JxOmONe51tSe9aUQoUkFLHau0HJfTNpKgHQTEPXMxhUPzH09xvj7QEc94Pg==", 176 | "dev": true, 177 | "dependencies": { 178 | "@ckeditor/ckeditor5-core": "39.0.1", 179 | "@ckeditor/ckeditor5-engine": "39.0.1", 180 | "@ckeditor/ckeditor5-ui": "39.0.1" 181 | }, 182 | "engines": { 183 | "node": ">=16.0.0", 184 | "npm": ">=5.7.1" 185 | } 186 | }, 187 | "node_modules/@ckeditor/ckeditor5-upload": { 188 | "version": "39.0.1", 189 | "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-upload/-/ckeditor5-upload-39.0.1.tgz", 190 | "integrity": "sha512-VVVWErIHRnw5kw00t8OYLxHDgSE1ywtoy/Zih0GJVxe882jIfajPj7KdZUjylfZuPeQnp1kAIpoe+WX3scvxFQ==", 191 | "dev": true, 192 | "dependencies": { 193 | "@ckeditor/ckeditor5-core": "39.0.1", 194 | "@ckeditor/ckeditor5-ui": "39.0.1", 195 | "@ckeditor/ckeditor5-utils": "39.0.1" 196 | }, 197 | "engines": { 198 | "node": ">=16.0.0", 199 | "npm": ">=5.7.1" 200 | } 201 | }, 202 | "node_modules/@ckeditor/ckeditor5-utils": { 203 | "version": "39.0.1", 204 | "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-utils/-/ckeditor5-utils-39.0.1.tgz", 205 | "integrity": "sha512-lQ+1h4FgUScEdk547uCzfdvajFigVt4u0mRw1m9TtJ3B2GiatwRvst8TZEuWl8aFrIHjQ/gho66QIElJi/6+CA==", 206 | "dev": true, 207 | "dependencies": { 208 | "lodash-es": "4.17.21" 209 | }, 210 | "engines": { 211 | "node": ">=16.0.0", 212 | "npm": ">=5.7.1" 213 | } 214 | }, 215 | "node_modules/@ckeditor/ckeditor5-watchdog": { 216 | "version": "39.0.1", 217 | "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-watchdog/-/ckeditor5-watchdog-39.0.1.tgz", 218 | "integrity": "sha512-f5Uo0RdcbeKGs0gmBm8Y8c+Z9YgcjqX7ai4vdcw8HIEc0vCeEanPt816V53nLZ3LbPgez8LeWluR7VlzoxKO+g==", 219 | "dev": true, 220 | "dependencies": { 221 | "lodash-es": "4.17.21" 222 | }, 223 | "engines": { 224 | "node": ">=16.0.0", 225 | "npm": ">=5.7.1" 226 | } 227 | }, 228 | "node_modules/@ckeditor/ckeditor5-widget": { 229 | "version": "39.0.1", 230 | "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-widget/-/ckeditor5-widget-39.0.1.tgz", 231 | "integrity": "sha512-rd4ojJcdZQJttrrDogycDa+sb/rtKu9sU7G0+QEoJZXD25WjxIEgjyOoIqfv2UZZrZDX/0u8dviGhPbcbQEEnw==", 232 | "dev": true, 233 | "dependencies": { 234 | "@ckeditor/ckeditor5-core": "39.0.1", 235 | "@ckeditor/ckeditor5-engine": "39.0.1", 236 | "@ckeditor/ckeditor5-enter": "39.0.1", 237 | "@ckeditor/ckeditor5-typing": "39.0.1", 238 | "@ckeditor/ckeditor5-ui": "39.0.1", 239 | "@ckeditor/ckeditor5-utils": "39.0.1", 240 | "lodash-es": "4.17.21" 241 | }, 242 | "engines": { 243 | "node": ">=16.0.0", 244 | "npm": ">=5.7.1" 245 | } 246 | }, 247 | "node_modules/@eslint-community/eslint-utils": { 248 | "version": "4.4.0", 249 | "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", 250 | "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", 251 | "dev": true, 252 | "dependencies": { 253 | "eslint-visitor-keys": "^3.3.0" 254 | }, 255 | "engines": { 256 | "node": "^12.22.0 || ^14.17.0 || >=16.0.0" 257 | }, 258 | "peerDependencies": { 259 | "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" 260 | } 261 | }, 262 | "node_modules/@eslint-community/regexpp": { 263 | "version": "4.6.2", 264 | "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.6.2.tgz", 265 | "integrity": "sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==", 266 | "dev": true, 267 | "engines": { 268 | "node": "^12.0.0 || ^14.0.0 || >=16.0.0" 269 | } 270 | }, 271 | "node_modules/@eslint/eslintrc": { 272 | "version": "2.1.2", 273 | "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", 274 | "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", 275 | "dev": true, 276 | "dependencies": { 277 | "ajv": "^6.12.4", 278 | "debug": "^4.3.2", 279 | "espree": "^9.6.0", 280 | "globals": "^13.19.0", 281 | "ignore": "^5.2.0", 282 | "import-fresh": "^3.2.1", 283 | "js-yaml": "^4.1.0", 284 | "minimatch": "^3.1.2", 285 | "strip-json-comments": "^3.1.1" 286 | }, 287 | "engines": { 288 | "node": "^12.22.0 || ^14.17.0 || >=16.0.0" 289 | }, 290 | "funding": { 291 | "url": "https://opencollective.com/eslint" 292 | } 293 | }, 294 | "node_modules/@eslint/js": { 295 | "version": "8.47.0", 296 | "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.47.0.tgz", 297 | "integrity": "sha512-P6omY1zv5MItm93kLM8s2vr1HICJH8v0dvddDhysbIuZ+vcjOHg5Zbkf1mTkcmi2JA9oBG2anOkRnW8WJTS8Og==", 298 | "dev": true, 299 | "engines": { 300 | "node": "^12.22.0 || ^14.17.0 || >=16.0.0" 301 | } 302 | }, 303 | "node_modules/@humanwhocodes/config-array": { 304 | "version": "0.11.10", 305 | "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", 306 | "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", 307 | "dev": true, 308 | "dependencies": { 309 | "@humanwhocodes/object-schema": "^1.2.1", 310 | "debug": "^4.1.1", 311 | "minimatch": "^3.0.5" 312 | }, 313 | "engines": { 314 | "node": ">=10.10.0" 315 | } 316 | }, 317 | "node_modules/@humanwhocodes/module-importer": { 318 | "version": "1.0.1", 319 | "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", 320 | "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", 321 | "dev": true, 322 | "engines": { 323 | "node": ">=12.22" 324 | }, 325 | "funding": { 326 | "type": "github", 327 | "url": "https://github.com/sponsors/nzakas" 328 | } 329 | }, 330 | "node_modules/@humanwhocodes/object-schema": { 331 | "version": "1.2.1", 332 | "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", 333 | "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", 334 | "dev": true 335 | }, 336 | "node_modules/@nodelib/fs.scandir": { 337 | "version": "2.1.5", 338 | "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", 339 | "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", 340 | "dev": true, 341 | "dependencies": { 342 | "@nodelib/fs.stat": "2.0.5", 343 | "run-parallel": "^1.1.9" 344 | }, 345 | "engines": { 346 | "node": ">= 8" 347 | } 348 | }, 349 | "node_modules/@nodelib/fs.stat": { 350 | "version": "2.0.5", 351 | "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", 352 | "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", 353 | "dev": true, 354 | "engines": { 355 | "node": ">= 8" 356 | } 357 | }, 358 | "node_modules/@nodelib/fs.walk": { 359 | "version": "1.2.8", 360 | "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", 361 | "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", 362 | "dev": true, 363 | "dependencies": { 364 | "@nodelib/fs.scandir": "2.1.5", 365 | "fastq": "^1.6.0" 366 | }, 367 | "engines": { 368 | "node": ">= 8" 369 | } 370 | }, 371 | "node_modules/@types/codemirror": { 372 | "version": "5.60.10", 373 | "resolved": "https://registry.npmjs.org/@types/codemirror/-/codemirror-5.60.10.tgz", 374 | "integrity": "sha512-ZTA3teiCWKT8HUUofqlGPlShu5ojdIajizsS0HpH6GL0/iEdjRt7fXbCLHHqKYP5k7dC/HnnWIjZAiELUwBdjQ==", 375 | "dev": true, 376 | "dependencies": { 377 | "@types/tern": "*" 378 | } 379 | }, 380 | "node_modules/@types/estree": { 381 | "version": "1.0.1", 382 | "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.1.tgz", 383 | "integrity": "sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==", 384 | "dev": true 385 | }, 386 | "node_modules/@types/jquery": { 387 | "version": "3.5.18", 388 | "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.5.18.tgz", 389 | "integrity": "sha512-sNm7O6LECFhHmF+3KYo6QIl2fIbjlPYa0PDgDQwfOaEJzwpK20Eub9Ke7VKkGsSJ2K0HUR50S266qYzRX4GlSw==", 390 | "dev": true, 391 | "dependencies": { 392 | "@types/sizzle": "*" 393 | } 394 | }, 395 | "node_modules/@types/node": { 396 | "version": "20.5.9", 397 | "resolved": "https://registry.npmjs.org/@types/node/-/node-20.5.9.tgz", 398 | "integrity": "sha512-PcGNd//40kHAS3sTlzKB9C9XL4K0sTup8nbG5lC14kzEteTNuAFh9u5nA0o5TWnSG2r/JNPRXFVcHJIIeRlmqQ==", 399 | "dev": true 400 | }, 401 | "node_modules/@types/sizzle": { 402 | "version": "2.3.3", 403 | "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.3.tgz", 404 | "integrity": "sha512-JYM8x9EGF163bEyhdJBpR2QX1R5naCJHC8ucJylJ3w9/CVBaskdQ8WqBf8MmQrd1kRvp/a4TS8HJ+bxzR7ZJYQ==", 405 | "dev": true 406 | }, 407 | "node_modules/@types/tern": { 408 | "version": "0.23.4", 409 | "resolved": "https://registry.npmjs.org/@types/tern/-/tern-0.23.4.tgz", 410 | "integrity": "sha512-JAUw1iXGO1qaWwEOzxTKJZ/5JxVeON9kvGZ/osgZaJImBnyjyn0cjovPsf6FNLmyGY8Vw9DoXZCMlfMkMwHRWg==", 411 | "dev": true, 412 | "dependencies": { 413 | "@types/estree": "*" 414 | } 415 | }, 416 | "node_modules/@types/trilium": { 417 | "name": "trilium-types", 418 | "version": "0.1.0", 419 | "resolved": "https://registry.npmjs.org/trilium-types/-/trilium-types-0.1.0.tgz", 420 | "integrity": "sha512-ShBmUNKNZOVRAwNiI9ZEvrmeofZ+J2rmThBl+CQ8gSl1p/kTSym6ER1M7C9sgq0CU+NXTFpR5o8F2VtS3RDjnA==", 421 | "dev": true, 422 | "dependencies": { 423 | "@ckeditor/ckeditor5-editor-balloon": "^39.0.1", 424 | "@types/codemirror": "^5.60.8", 425 | "@types/jquery": "^3.5.16", 426 | "@types/node": "^20.5.0", 427 | "@types/xml2js": "^0.4.11", 428 | "axios": "^1.4.0", 429 | "dayjs": "^1.11.9" 430 | } 431 | }, 432 | "node_modules/@types/xml2js": { 433 | "version": "0.4.12", 434 | "resolved": "https://registry.npmjs.org/@types/xml2js/-/xml2js-0.4.12.tgz", 435 | "integrity": "sha512-CZPpQKBZ8db66EP5hCjwvYrLThgZvnyZrPXK2W+UI1oOaWezGt34iOaUCX4Jah2X8+rQqjvl9VKEIT8TR1I0rA==", 436 | "dev": true, 437 | "dependencies": { 438 | "@types/node": "*" 439 | } 440 | }, 441 | "node_modules/acorn": { 442 | "version": "8.10.0", 443 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", 444 | "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", 445 | "dev": true, 446 | "bin": { 447 | "acorn": "bin/acorn" 448 | }, 449 | "engines": { 450 | "node": ">=0.4.0" 451 | } 452 | }, 453 | "node_modules/acorn-jsx": { 454 | "version": "5.3.2", 455 | "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", 456 | "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", 457 | "dev": true, 458 | "peerDependencies": { 459 | "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" 460 | } 461 | }, 462 | "node_modules/ajv": { 463 | "version": "6.12.6", 464 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", 465 | "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", 466 | "dev": true, 467 | "dependencies": { 468 | "fast-deep-equal": "^3.1.1", 469 | "fast-json-stable-stringify": "^2.0.0", 470 | "json-schema-traverse": "^0.4.1", 471 | "uri-js": "^4.2.2" 472 | }, 473 | "funding": { 474 | "type": "github", 475 | "url": "https://github.com/sponsors/epoberezkin" 476 | } 477 | }, 478 | "node_modules/ansi-regex": { 479 | "version": "5.0.1", 480 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", 481 | "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", 482 | "dev": true, 483 | "engines": { 484 | "node": ">=8" 485 | } 486 | }, 487 | "node_modules/ansi-styles": { 488 | "version": "4.3.0", 489 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 490 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 491 | "dev": true, 492 | "dependencies": { 493 | "color-convert": "^2.0.1" 494 | }, 495 | "engines": { 496 | "node": ">=8" 497 | }, 498 | "funding": { 499 | "url": "https://github.com/chalk/ansi-styles?sponsor=1" 500 | } 501 | }, 502 | "node_modules/archiver": { 503 | "version": "6.0.1", 504 | "resolved": "https://registry.npmjs.org/archiver/-/archiver-6.0.1.tgz", 505 | "integrity": "sha512-CXGy4poOLBKptiZH//VlWdFuUC1RESbdZjGjILwBuZ73P7WkAUN0htfSfBq/7k6FRFlpu7bg4JOkj1vU9G6jcQ==", 506 | "dev": true, 507 | "dependencies": { 508 | "archiver-utils": "^4.0.1", 509 | "async": "^3.2.4", 510 | "buffer-crc32": "^0.2.1", 511 | "readable-stream": "^3.6.0", 512 | "readdir-glob": "^1.1.2", 513 | "tar-stream": "^3.0.0", 514 | "zip-stream": "^5.0.1" 515 | }, 516 | "engines": { 517 | "node": ">= 12.0.0" 518 | } 519 | }, 520 | "node_modules/archiver-utils": { 521 | "version": "4.0.1", 522 | "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-4.0.1.tgz", 523 | "integrity": "sha512-Q4Q99idbvzmgCTEAAhi32BkOyq8iVI5EwdO0PmBDSGIzzjYNdcFn7Q7k3OzbLy4kLUPXfJtG6fO2RjftXbobBg==", 524 | "dev": true, 525 | "dependencies": { 526 | "glob": "^8.0.0", 527 | "graceful-fs": "^4.2.0", 528 | "lazystream": "^1.0.0", 529 | "lodash": "^4.17.15", 530 | "normalize-path": "^3.0.0", 531 | "readable-stream": "^3.6.0" 532 | }, 533 | "engines": { 534 | "node": ">= 12.0.0" 535 | } 536 | }, 537 | "node_modules/archiver-utils/node_modules/brace-expansion": { 538 | "version": "2.0.1", 539 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", 540 | "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", 541 | "dev": true, 542 | "dependencies": { 543 | "balanced-match": "^1.0.0" 544 | } 545 | }, 546 | "node_modules/archiver-utils/node_modules/glob": { 547 | "version": "8.1.0", 548 | "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", 549 | "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", 550 | "dev": true, 551 | "dependencies": { 552 | "fs.realpath": "^1.0.0", 553 | "inflight": "^1.0.4", 554 | "inherits": "2", 555 | "minimatch": "^5.0.1", 556 | "once": "^1.3.0" 557 | }, 558 | "engines": { 559 | "node": ">=12" 560 | }, 561 | "funding": { 562 | "url": "https://github.com/sponsors/isaacs" 563 | } 564 | }, 565 | "node_modules/archiver-utils/node_modules/minimatch": { 566 | "version": "5.1.6", 567 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", 568 | "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", 569 | "dev": true, 570 | "dependencies": { 571 | "brace-expansion": "^2.0.1" 572 | }, 573 | "engines": { 574 | "node": ">=10" 575 | } 576 | }, 577 | "node_modules/argparse": { 578 | "version": "2.0.1", 579 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", 580 | "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", 581 | "dev": true 582 | }, 583 | "node_modules/async": { 584 | "version": "3.2.4", 585 | "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", 586 | "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==", 587 | "dev": true 588 | }, 589 | "node_modules/asynckit": { 590 | "version": "0.4.0", 591 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", 592 | "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", 593 | "dev": true 594 | }, 595 | "node_modules/axios": { 596 | "version": "1.5.0", 597 | "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.0.tgz", 598 | "integrity": "sha512-D4DdjDo5CY50Qms0qGQTTw6Q44jl7zRwY7bthds06pUGfChBCTcQs+N743eFWGEd6pRTMd6A+I87aWyFV5wiZQ==", 599 | "dev": true, 600 | "dependencies": { 601 | "follow-redirects": "^1.15.0", 602 | "form-data": "^4.0.0", 603 | "proxy-from-env": "^1.1.0" 604 | } 605 | }, 606 | "node_modules/b4a": { 607 | "version": "1.6.4", 608 | "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.4.tgz", 609 | "integrity": "sha512-fpWrvyVHEKyeEvbKZTVOeZF3VSKKWtJxFIxX/jaVPf+cLbGUSitjb49pHLqPV2BUNNZ0LcoeEGfE/YCpyDYHIw==", 610 | "dev": true 611 | }, 612 | "node_modules/balanced-match": { 613 | "version": "1.0.2", 614 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 615 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", 616 | "dev": true 617 | }, 618 | "node_modules/brace-expansion": { 619 | "version": "1.1.11", 620 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 621 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 622 | "dev": true, 623 | "dependencies": { 624 | "balanced-match": "^1.0.0", 625 | "concat-map": "0.0.1" 626 | } 627 | }, 628 | "node_modules/buffer-crc32": { 629 | "version": "0.2.13", 630 | "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", 631 | "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", 632 | "dev": true, 633 | "engines": { 634 | "node": "*" 635 | } 636 | }, 637 | "node_modules/callsites": { 638 | "version": "3.1.0", 639 | "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", 640 | "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", 641 | "dev": true, 642 | "engines": { 643 | "node": ">=6" 644 | } 645 | }, 646 | "node_modules/centra": { 647 | "version": "2.6.0", 648 | "resolved": "https://registry.npmjs.org/centra/-/centra-2.6.0.tgz", 649 | "integrity": "sha512-dgh+YleemrT8u85QL11Z6tYhegAs3MMxsaWAq/oXeAmYJ7VxL3SI9TZtnfaEvNDMAPolj25FXIb3S+HCI4wQaQ==", 650 | "dev": true 651 | }, 652 | "node_modules/chalk": { 653 | "version": "4.1.2", 654 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", 655 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", 656 | "dev": true, 657 | "dependencies": { 658 | "ansi-styles": "^4.1.0", 659 | "supports-color": "^7.1.0" 660 | }, 661 | "engines": { 662 | "node": ">=10" 663 | }, 664 | "funding": { 665 | "url": "https://github.com/chalk/chalk?sponsor=1" 666 | } 667 | }, 668 | "node_modules/ckeditor5": { 669 | "version": "39.0.1", 670 | "resolved": "https://registry.npmjs.org/ckeditor5/-/ckeditor5-39.0.1.tgz", 671 | "integrity": "sha512-KU6P0U9HQdsj7YBNZyG72ii+LNjIuWqxwdhlcd+QN11urQSDzoC6OjnqtDZ2Q3dQvwYf2aN9kDwUA9ElQ1krIg==", 672 | "dev": true, 673 | "dependencies": { 674 | "@ckeditor/ckeditor5-clipboard": "39.0.1", 675 | "@ckeditor/ckeditor5-core": "39.0.1", 676 | "@ckeditor/ckeditor5-engine": "39.0.1", 677 | "@ckeditor/ckeditor5-enter": "39.0.1", 678 | "@ckeditor/ckeditor5-paragraph": "39.0.1", 679 | "@ckeditor/ckeditor5-select-all": "39.0.1", 680 | "@ckeditor/ckeditor5-typing": "39.0.1", 681 | "@ckeditor/ckeditor5-ui": "39.0.1", 682 | "@ckeditor/ckeditor5-undo": "39.0.1", 683 | "@ckeditor/ckeditor5-upload": "39.0.1", 684 | "@ckeditor/ckeditor5-utils": "39.0.1", 685 | "@ckeditor/ckeditor5-watchdog": "39.0.1", 686 | "@ckeditor/ckeditor5-widget": "39.0.1" 687 | }, 688 | "engines": { 689 | "node": ">=16.0.0", 690 | "npm": ">=5.7.1" 691 | } 692 | }, 693 | "node_modules/color-convert": { 694 | "version": "2.0.1", 695 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 696 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 697 | "dev": true, 698 | "dependencies": { 699 | "color-name": "~1.1.4" 700 | }, 701 | "engines": { 702 | "node": ">=7.0.0" 703 | } 704 | }, 705 | "node_modules/color-name": { 706 | "version": "1.1.4", 707 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 708 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 709 | "dev": true 710 | }, 711 | "node_modules/color-parse": { 712 | "version": "1.4.2", 713 | "resolved": "https://registry.npmjs.org/color-parse/-/color-parse-1.4.2.tgz", 714 | "integrity": "sha512-RI7s49/8yqDj3fECFZjUI1Yi0z/Gq1py43oNJivAIIDSyJiOZLfYCRQEgn8HEVAj++PcRe8AnL2XF0fRJ3BTnA==", 715 | "dev": true, 716 | "dependencies": { 717 | "color-name": "^1.0.0" 718 | } 719 | }, 720 | "node_modules/combined-stream": { 721 | "version": "1.0.8", 722 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", 723 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", 724 | "dev": true, 725 | "dependencies": { 726 | "delayed-stream": "~1.0.0" 727 | }, 728 | "engines": { 729 | "node": ">= 0.8" 730 | } 731 | }, 732 | "node_modules/compress-commons": { 733 | "version": "5.0.1", 734 | "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-5.0.1.tgz", 735 | "integrity": "sha512-MPh//1cERdLtqwO3pOFLeXtpuai0Y2WCd5AhtKxznqM7WtaMYaOEMSgn45d9D10sIHSfIKE603HlOp8OPGrvag==", 736 | "dev": true, 737 | "dependencies": { 738 | "crc-32": "^1.2.0", 739 | "crc32-stream": "^5.0.0", 740 | "normalize-path": "^3.0.0", 741 | "readable-stream": "^3.6.0" 742 | }, 743 | "engines": { 744 | "node": ">= 12.0.0" 745 | } 746 | }, 747 | "node_modules/concat-map": { 748 | "version": "0.0.1", 749 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 750 | "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", 751 | "dev": true 752 | }, 753 | "node_modules/core-util-is": { 754 | "version": "1.0.3", 755 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", 756 | "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", 757 | "dev": true 758 | }, 759 | "node_modules/crc-32": { 760 | "version": "1.2.2", 761 | "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", 762 | "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", 763 | "dev": true, 764 | "bin": { 765 | "crc32": "bin/crc32.njs" 766 | }, 767 | "engines": { 768 | "node": ">=0.8" 769 | } 770 | }, 771 | "node_modules/crc32-stream": { 772 | "version": "5.0.0", 773 | "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-5.0.0.tgz", 774 | "integrity": "sha512-B0EPa1UK+qnpBZpG+7FgPCu0J2ETLpXq09o9BkLkEAhdB6Z61Qo4pJ3JYu0c+Qi+/SAL7QThqnzS06pmSSyZaw==", 775 | "dev": true, 776 | "dependencies": { 777 | "crc-32": "^1.2.0", 778 | "readable-stream": "^3.4.0" 779 | }, 780 | "engines": { 781 | "node": ">= 12.0.0" 782 | } 783 | }, 784 | "node_modules/cross-spawn": { 785 | "version": "7.0.3", 786 | "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", 787 | "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", 788 | "dev": true, 789 | "dependencies": { 790 | "path-key": "^3.1.0", 791 | "shebang-command": "^2.0.0", 792 | "which": "^2.0.1" 793 | }, 794 | "engines": { 795 | "node": ">= 8" 796 | } 797 | }, 798 | "node_modules/dayjs": { 799 | "version": "1.11.9", 800 | "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.9.tgz", 801 | "integrity": "sha512-QvzAURSbQ0pKdIye2txOzNaHmxtUBXerpY0FJsFXUMKbIZeFm5ht1LS/jFsrncjnmtv8HsG0W2g6c0zUjZWmpA==", 802 | "dev": true 803 | }, 804 | "node_modules/debug": { 805 | "version": "4.3.4", 806 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", 807 | "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", 808 | "dev": true, 809 | "dependencies": { 810 | "ms": "2.1.2" 811 | }, 812 | "engines": { 813 | "node": ">=6.0" 814 | }, 815 | "peerDependenciesMeta": { 816 | "supports-color": { 817 | "optional": true 818 | } 819 | } 820 | }, 821 | "node_modules/deep-is": { 822 | "version": "0.1.4", 823 | "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", 824 | "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", 825 | "dev": true 826 | }, 827 | "node_modules/delayed-stream": { 828 | "version": "1.0.0", 829 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 830 | "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", 831 | "dev": true, 832 | "engines": { 833 | "node": ">=0.4.0" 834 | } 835 | }, 836 | "node_modules/doctrine": { 837 | "version": "3.0.0", 838 | "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", 839 | "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", 840 | "dev": true, 841 | "dependencies": { 842 | "esutils": "^2.0.2" 843 | }, 844 | "engines": { 845 | "node": ">=6.0.0" 846 | } 847 | }, 848 | "node_modules/dotenv": { 849 | "version": "16.3.1", 850 | "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", 851 | "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==", 852 | "dev": true, 853 | "engines": { 854 | "node": ">=12" 855 | }, 856 | "funding": { 857 | "url": "https://github.com/motdotla/dotenv?sponsor=1" 858 | } 859 | }, 860 | "node_modules/escape-string-regexp": { 861 | "version": "4.0.0", 862 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", 863 | "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", 864 | "dev": true, 865 | "engines": { 866 | "node": ">=10" 867 | }, 868 | "funding": { 869 | "url": "https://github.com/sponsors/sindresorhus" 870 | } 871 | }, 872 | "node_modules/eslint": { 873 | "version": "8.47.0", 874 | "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.47.0.tgz", 875 | "integrity": "sha512-spUQWrdPt+pRVP1TTJLmfRNJJHHZryFmptzcafwSvHsceV81djHOdnEeDmkdotZyLNjDhrOasNK8nikkoG1O8Q==", 876 | "dev": true, 877 | "dependencies": { 878 | "@eslint-community/eslint-utils": "^4.2.0", 879 | "@eslint-community/regexpp": "^4.6.1", 880 | "@eslint/eslintrc": "^2.1.2", 881 | "@eslint/js": "^8.47.0", 882 | "@humanwhocodes/config-array": "^0.11.10", 883 | "@humanwhocodes/module-importer": "^1.0.1", 884 | "@nodelib/fs.walk": "^1.2.8", 885 | "ajv": "^6.12.4", 886 | "chalk": "^4.0.0", 887 | "cross-spawn": "^7.0.2", 888 | "debug": "^4.3.2", 889 | "doctrine": "^3.0.0", 890 | "escape-string-regexp": "^4.0.0", 891 | "eslint-scope": "^7.2.2", 892 | "eslint-visitor-keys": "^3.4.3", 893 | "espree": "^9.6.1", 894 | "esquery": "^1.4.2", 895 | "esutils": "^2.0.2", 896 | "fast-deep-equal": "^3.1.3", 897 | "file-entry-cache": "^6.0.1", 898 | "find-up": "^5.0.0", 899 | "glob-parent": "^6.0.2", 900 | "globals": "^13.19.0", 901 | "graphemer": "^1.4.0", 902 | "ignore": "^5.2.0", 903 | "imurmurhash": "^0.1.4", 904 | "is-glob": "^4.0.0", 905 | "is-path-inside": "^3.0.3", 906 | "js-yaml": "^4.1.0", 907 | "json-stable-stringify-without-jsonify": "^1.0.1", 908 | "levn": "^0.4.1", 909 | "lodash.merge": "^4.6.2", 910 | "minimatch": "^3.1.2", 911 | "natural-compare": "^1.4.0", 912 | "optionator": "^0.9.3", 913 | "strip-ansi": "^6.0.1", 914 | "text-table": "^0.2.0" 915 | }, 916 | "bin": { 917 | "eslint": "bin/eslint.js" 918 | }, 919 | "engines": { 920 | "node": "^12.22.0 || ^14.17.0 || >=16.0.0" 921 | }, 922 | "funding": { 923 | "url": "https://opencollective.com/eslint" 924 | } 925 | }, 926 | "node_modules/eslint-scope": { 927 | "version": "7.2.2", 928 | "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", 929 | "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", 930 | "dev": true, 931 | "dependencies": { 932 | "esrecurse": "^4.3.0", 933 | "estraverse": "^5.2.0" 934 | }, 935 | "engines": { 936 | "node": "^12.22.0 || ^14.17.0 || >=16.0.0" 937 | }, 938 | "funding": { 939 | "url": "https://opencollective.com/eslint" 940 | } 941 | }, 942 | "node_modules/eslint-visitor-keys": { 943 | "version": "3.4.3", 944 | "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", 945 | "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", 946 | "dev": true, 947 | "engines": { 948 | "node": "^12.22.0 || ^14.17.0 || >=16.0.0" 949 | }, 950 | "funding": { 951 | "url": "https://opencollective.com/eslint" 952 | } 953 | }, 954 | "node_modules/espree": { 955 | "version": "9.6.1", 956 | "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", 957 | "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", 958 | "dev": true, 959 | "dependencies": { 960 | "acorn": "^8.9.0", 961 | "acorn-jsx": "^5.3.2", 962 | "eslint-visitor-keys": "^3.4.1" 963 | }, 964 | "engines": { 965 | "node": "^12.22.0 || ^14.17.0 || >=16.0.0" 966 | }, 967 | "funding": { 968 | "url": "https://opencollective.com/eslint" 969 | } 970 | }, 971 | "node_modules/esquery": { 972 | "version": "1.5.0", 973 | "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", 974 | "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", 975 | "dev": true, 976 | "dependencies": { 977 | "estraverse": "^5.1.0" 978 | }, 979 | "engines": { 980 | "node": ">=0.10" 981 | } 982 | }, 983 | "node_modules/esrecurse": { 984 | "version": "4.3.0", 985 | "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", 986 | "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", 987 | "dev": true, 988 | "dependencies": { 989 | "estraverse": "^5.2.0" 990 | }, 991 | "engines": { 992 | "node": ">=4.0" 993 | } 994 | }, 995 | "node_modules/estraverse": { 996 | "version": "5.3.0", 997 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", 998 | "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", 999 | "dev": true, 1000 | "engines": { 1001 | "node": ">=4.0" 1002 | } 1003 | }, 1004 | "node_modules/esutils": { 1005 | "version": "2.0.3", 1006 | "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", 1007 | "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", 1008 | "dev": true, 1009 | "engines": { 1010 | "node": ">=0.10.0" 1011 | } 1012 | }, 1013 | "node_modules/fast-deep-equal": { 1014 | "version": "3.1.3", 1015 | "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", 1016 | "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", 1017 | "dev": true 1018 | }, 1019 | "node_modules/fast-fifo": { 1020 | "version": "1.3.2", 1021 | "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", 1022 | "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==", 1023 | "dev": true 1024 | }, 1025 | "node_modules/fast-json-stable-stringify": { 1026 | "version": "2.1.0", 1027 | "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", 1028 | "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", 1029 | "dev": true 1030 | }, 1031 | "node_modules/fast-levenshtein": { 1032 | "version": "2.0.6", 1033 | "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", 1034 | "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", 1035 | "dev": true 1036 | }, 1037 | "node_modules/fastq": { 1038 | "version": "1.15.0", 1039 | "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", 1040 | "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", 1041 | "dev": true, 1042 | "dependencies": { 1043 | "reusify": "^1.0.4" 1044 | } 1045 | }, 1046 | "node_modules/file-entry-cache": { 1047 | "version": "6.0.1", 1048 | "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", 1049 | "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", 1050 | "dev": true, 1051 | "dependencies": { 1052 | "flat-cache": "^3.0.4" 1053 | }, 1054 | "engines": { 1055 | "node": "^10.12.0 || >=12.0.0" 1056 | } 1057 | }, 1058 | "node_modules/find-up": { 1059 | "version": "5.0.0", 1060 | "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", 1061 | "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", 1062 | "dev": true, 1063 | "dependencies": { 1064 | "locate-path": "^6.0.0", 1065 | "path-exists": "^4.0.0" 1066 | }, 1067 | "engines": { 1068 | "node": ">=10" 1069 | }, 1070 | "funding": { 1071 | "url": "https://github.com/sponsors/sindresorhus" 1072 | } 1073 | }, 1074 | "node_modules/flat-cache": { 1075 | "version": "3.0.4", 1076 | "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", 1077 | "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", 1078 | "dev": true, 1079 | "dependencies": { 1080 | "flatted": "^3.1.0", 1081 | "rimraf": "^3.0.2" 1082 | }, 1083 | "engines": { 1084 | "node": "^10.12.0 || >=12.0.0" 1085 | } 1086 | }, 1087 | "node_modules/flatted": { 1088 | "version": "3.2.7", 1089 | "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", 1090 | "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", 1091 | "dev": true 1092 | }, 1093 | "node_modules/follow-redirects": { 1094 | "version": "1.15.2", 1095 | "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", 1096 | "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", 1097 | "dev": true, 1098 | "funding": [ 1099 | { 1100 | "type": "individual", 1101 | "url": "https://github.com/sponsors/RubenVerborgh" 1102 | } 1103 | ], 1104 | "engines": { 1105 | "node": ">=4.0" 1106 | }, 1107 | "peerDependenciesMeta": { 1108 | "debug": { 1109 | "optional": true 1110 | } 1111 | } 1112 | }, 1113 | "node_modules/form-data": { 1114 | "version": "4.0.0", 1115 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", 1116 | "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", 1117 | "dev": true, 1118 | "dependencies": { 1119 | "asynckit": "^0.4.0", 1120 | "combined-stream": "^1.0.8", 1121 | "mime-types": "^2.1.12" 1122 | }, 1123 | "engines": { 1124 | "node": ">= 6" 1125 | } 1126 | }, 1127 | "node_modules/fs.realpath": { 1128 | "version": "1.0.0", 1129 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 1130 | "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", 1131 | "dev": true 1132 | }, 1133 | "node_modules/glob": { 1134 | "version": "7.2.3", 1135 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", 1136 | "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", 1137 | "dev": true, 1138 | "dependencies": { 1139 | "fs.realpath": "^1.0.0", 1140 | "inflight": "^1.0.4", 1141 | "inherits": "2", 1142 | "minimatch": "^3.1.1", 1143 | "once": "^1.3.0", 1144 | "path-is-absolute": "^1.0.0" 1145 | }, 1146 | "engines": { 1147 | "node": "*" 1148 | }, 1149 | "funding": { 1150 | "url": "https://github.com/sponsors/isaacs" 1151 | } 1152 | }, 1153 | "node_modules/glob-parent": { 1154 | "version": "6.0.2", 1155 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", 1156 | "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", 1157 | "dev": true, 1158 | "dependencies": { 1159 | "is-glob": "^4.0.3" 1160 | }, 1161 | "engines": { 1162 | "node": ">=10.13.0" 1163 | } 1164 | }, 1165 | "node_modules/globals": { 1166 | "version": "13.21.0", 1167 | "resolved": "https://registry.npmjs.org/globals/-/globals-13.21.0.tgz", 1168 | "integrity": "sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg==", 1169 | "dev": true, 1170 | "dependencies": { 1171 | "type-fest": "^0.20.2" 1172 | }, 1173 | "engines": { 1174 | "node": ">=8" 1175 | }, 1176 | "funding": { 1177 | "url": "https://github.com/sponsors/sindresorhus" 1178 | } 1179 | }, 1180 | "node_modules/graceful-fs": { 1181 | "version": "4.2.11", 1182 | "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", 1183 | "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", 1184 | "dev": true 1185 | }, 1186 | "node_modules/graphemer": { 1187 | "version": "1.4.0", 1188 | "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", 1189 | "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", 1190 | "dev": true 1191 | }, 1192 | "node_modules/has-flag": { 1193 | "version": "4.0.0", 1194 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 1195 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 1196 | "dev": true, 1197 | "engines": { 1198 | "node": ">=8" 1199 | } 1200 | }, 1201 | "node_modules/highlight.js": { 1202 | "version": "11.8.0", 1203 | "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.8.0.tgz", 1204 | "integrity": "sha512-MedQhoqVdr0U6SSnWPzfiadUcDHfN/Wzq25AkXiQv9oiOO/sG0S7XkvpFIqWBl9Yq1UYyYOOVORs5UW2XlPyzg==", 1205 | "engines": { 1206 | "node": ">=12.0.0" 1207 | } 1208 | }, 1209 | "node_modules/ignore": { 1210 | "version": "5.2.4", 1211 | "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", 1212 | "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", 1213 | "dev": true, 1214 | "engines": { 1215 | "node": ">= 4" 1216 | } 1217 | }, 1218 | "node_modules/import-fresh": { 1219 | "version": "3.3.0", 1220 | "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", 1221 | "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", 1222 | "dev": true, 1223 | "dependencies": { 1224 | "parent-module": "^1.0.0", 1225 | "resolve-from": "^4.0.0" 1226 | }, 1227 | "engines": { 1228 | "node": ">=6" 1229 | }, 1230 | "funding": { 1231 | "url": "https://github.com/sponsors/sindresorhus" 1232 | } 1233 | }, 1234 | "node_modules/imurmurhash": { 1235 | "version": "0.1.4", 1236 | "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", 1237 | "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", 1238 | "dev": true, 1239 | "engines": { 1240 | "node": ">=0.8.19" 1241 | } 1242 | }, 1243 | "node_modules/inflight": { 1244 | "version": "1.0.6", 1245 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 1246 | "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", 1247 | "dev": true, 1248 | "dependencies": { 1249 | "once": "^1.3.0", 1250 | "wrappy": "1" 1251 | } 1252 | }, 1253 | "node_modules/inherits": { 1254 | "version": "2.0.4", 1255 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 1256 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 1257 | "dev": true 1258 | }, 1259 | "node_modules/is-extglob": { 1260 | "version": "2.1.1", 1261 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 1262 | "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", 1263 | "dev": true, 1264 | "engines": { 1265 | "node": ">=0.10.0" 1266 | } 1267 | }, 1268 | "node_modules/is-glob": { 1269 | "version": "4.0.3", 1270 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", 1271 | "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", 1272 | "dev": true, 1273 | "dependencies": { 1274 | "is-extglob": "^2.1.1" 1275 | }, 1276 | "engines": { 1277 | "node": ">=0.10.0" 1278 | } 1279 | }, 1280 | "node_modules/is-path-inside": { 1281 | "version": "3.0.3", 1282 | "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", 1283 | "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", 1284 | "dev": true, 1285 | "engines": { 1286 | "node": ">=8" 1287 | } 1288 | }, 1289 | "node_modules/isarray": { 1290 | "version": "1.0.0", 1291 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", 1292 | "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", 1293 | "dev": true 1294 | }, 1295 | "node_modules/isexe": { 1296 | "version": "2.0.0", 1297 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", 1298 | "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", 1299 | "dev": true 1300 | }, 1301 | "node_modules/js-yaml": { 1302 | "version": "4.1.0", 1303 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", 1304 | "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", 1305 | "dev": true, 1306 | "dependencies": { 1307 | "argparse": "^2.0.1" 1308 | }, 1309 | "bin": { 1310 | "js-yaml": "bin/js-yaml.js" 1311 | } 1312 | }, 1313 | "node_modules/json-schema-traverse": { 1314 | "version": "0.4.1", 1315 | "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", 1316 | "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", 1317 | "dev": true 1318 | }, 1319 | "node_modules/json-stable-stringify-without-jsonify": { 1320 | "version": "1.0.1", 1321 | "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", 1322 | "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", 1323 | "dev": true 1324 | }, 1325 | "node_modules/lazystream": { 1326 | "version": "1.0.1", 1327 | "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.1.tgz", 1328 | "integrity": "sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==", 1329 | "dev": true, 1330 | "dependencies": { 1331 | "readable-stream": "^2.0.5" 1332 | }, 1333 | "engines": { 1334 | "node": ">= 0.6.3" 1335 | } 1336 | }, 1337 | "node_modules/lazystream/node_modules/readable-stream": { 1338 | "version": "2.3.8", 1339 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", 1340 | "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", 1341 | "dev": true, 1342 | "dependencies": { 1343 | "core-util-is": "~1.0.0", 1344 | "inherits": "~2.0.3", 1345 | "isarray": "~1.0.0", 1346 | "process-nextick-args": "~2.0.0", 1347 | "safe-buffer": "~5.1.1", 1348 | "string_decoder": "~1.1.1", 1349 | "util-deprecate": "~1.0.1" 1350 | } 1351 | }, 1352 | "node_modules/lazystream/node_modules/safe-buffer": { 1353 | "version": "5.1.2", 1354 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 1355 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", 1356 | "dev": true 1357 | }, 1358 | "node_modules/lazystream/node_modules/string_decoder": { 1359 | "version": "1.1.1", 1360 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", 1361 | "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", 1362 | "dev": true, 1363 | "dependencies": { 1364 | "safe-buffer": "~5.1.0" 1365 | } 1366 | }, 1367 | "node_modules/levn": { 1368 | "version": "0.4.1", 1369 | "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", 1370 | "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", 1371 | "dev": true, 1372 | "dependencies": { 1373 | "prelude-ls": "^1.2.1", 1374 | "type-check": "~0.4.0" 1375 | }, 1376 | "engines": { 1377 | "node": ">= 0.8.0" 1378 | } 1379 | }, 1380 | "node_modules/locate-path": { 1381 | "version": "6.0.0", 1382 | "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", 1383 | "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", 1384 | "dev": true, 1385 | "dependencies": { 1386 | "p-locate": "^5.0.0" 1387 | }, 1388 | "engines": { 1389 | "node": ">=10" 1390 | }, 1391 | "funding": { 1392 | "url": "https://github.com/sponsors/sindresorhus" 1393 | } 1394 | }, 1395 | "node_modules/lodash": { 1396 | "version": "4.17.21", 1397 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", 1398 | "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", 1399 | "dev": true 1400 | }, 1401 | "node_modules/lodash-es": { 1402 | "version": "4.17.21", 1403 | "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", 1404 | "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==", 1405 | "dev": true 1406 | }, 1407 | "node_modules/lodash.merge": { 1408 | "version": "4.6.2", 1409 | "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", 1410 | "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", 1411 | "dev": true 1412 | }, 1413 | "node_modules/marked": { 1414 | "version": "7.0.3", 1415 | "resolved": "https://registry.npmjs.org/marked/-/marked-7.0.3.tgz", 1416 | "integrity": "sha512-ev2uM40p0zQ/GbvqotfKcSWEa59fJwluGZj5dcaUOwDRrB1F3dncdXy8NWUApk4fi8atU3kTBOwjyjZ0ud0dxw==", 1417 | "bin": { 1418 | "marked": "bin/marked.js" 1419 | }, 1420 | "engines": { 1421 | "node": ">= 16" 1422 | } 1423 | }, 1424 | "node_modules/mime-db": { 1425 | "version": "1.52.0", 1426 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", 1427 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", 1428 | "dev": true, 1429 | "engines": { 1430 | "node": ">= 0.6" 1431 | } 1432 | }, 1433 | "node_modules/mime-types": { 1434 | "version": "2.1.35", 1435 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", 1436 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", 1437 | "dev": true, 1438 | "dependencies": { 1439 | "mime-db": "1.52.0" 1440 | }, 1441 | "engines": { 1442 | "node": ">= 0.6" 1443 | } 1444 | }, 1445 | "node_modules/minimatch": { 1446 | "version": "3.1.2", 1447 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", 1448 | "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", 1449 | "dev": true, 1450 | "dependencies": { 1451 | "brace-expansion": "^1.1.7" 1452 | }, 1453 | "engines": { 1454 | "node": "*" 1455 | } 1456 | }, 1457 | "node_modules/ms": { 1458 | "version": "2.1.2", 1459 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 1460 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", 1461 | "dev": true 1462 | }, 1463 | "node_modules/natural-compare": { 1464 | "version": "1.4.0", 1465 | "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", 1466 | "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", 1467 | "dev": true 1468 | }, 1469 | "node_modules/normalize-path": { 1470 | "version": "3.0.0", 1471 | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", 1472 | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", 1473 | "dev": true, 1474 | "engines": { 1475 | "node": ">=0.10.0" 1476 | } 1477 | }, 1478 | "node_modules/once": { 1479 | "version": "1.4.0", 1480 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 1481 | "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", 1482 | "dev": true, 1483 | "dependencies": { 1484 | "wrappy": "1" 1485 | } 1486 | }, 1487 | "node_modules/optionator": { 1488 | "version": "0.9.3", 1489 | "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", 1490 | "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", 1491 | "dev": true, 1492 | "dependencies": { 1493 | "@aashutoshrathi/word-wrap": "^1.2.3", 1494 | "deep-is": "^0.1.3", 1495 | "fast-levenshtein": "^2.0.6", 1496 | "levn": "^0.4.1", 1497 | "prelude-ls": "^1.2.1", 1498 | "type-check": "^0.4.0" 1499 | }, 1500 | "engines": { 1501 | "node": ">= 0.8.0" 1502 | } 1503 | }, 1504 | "node_modules/p-limit": { 1505 | "version": "3.1.0", 1506 | "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", 1507 | "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", 1508 | "dev": true, 1509 | "dependencies": { 1510 | "yocto-queue": "^0.1.0" 1511 | }, 1512 | "engines": { 1513 | "node": ">=10" 1514 | }, 1515 | "funding": { 1516 | "url": "https://github.com/sponsors/sindresorhus" 1517 | } 1518 | }, 1519 | "node_modules/p-locate": { 1520 | "version": "5.0.0", 1521 | "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", 1522 | "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", 1523 | "dev": true, 1524 | "dependencies": { 1525 | "p-limit": "^3.0.2" 1526 | }, 1527 | "engines": { 1528 | "node": ">=10" 1529 | }, 1530 | "funding": { 1531 | "url": "https://github.com/sponsors/sindresorhus" 1532 | } 1533 | }, 1534 | "node_modules/parent-module": { 1535 | "version": "1.0.1", 1536 | "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", 1537 | "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", 1538 | "dev": true, 1539 | "dependencies": { 1540 | "callsites": "^3.0.0" 1541 | }, 1542 | "engines": { 1543 | "node": ">=6" 1544 | } 1545 | }, 1546 | "node_modules/path-exists": { 1547 | "version": "4.0.0", 1548 | "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", 1549 | "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", 1550 | "dev": true, 1551 | "engines": { 1552 | "node": ">=8" 1553 | } 1554 | }, 1555 | "node_modules/path-is-absolute": { 1556 | "version": "1.0.1", 1557 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 1558 | "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", 1559 | "dev": true, 1560 | "engines": { 1561 | "node": ">=0.10.0" 1562 | } 1563 | }, 1564 | "node_modules/path-key": { 1565 | "version": "3.1.1", 1566 | "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", 1567 | "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", 1568 | "dev": true, 1569 | "engines": { 1570 | "node": ">=8" 1571 | } 1572 | }, 1573 | "node_modules/phin": { 1574 | "version": "3.7.0", 1575 | "resolved": "https://registry.npmjs.org/phin/-/phin-3.7.0.tgz", 1576 | "integrity": "sha512-DqnVNrpYhKGBZppNKprD+UJylMeEKOZxHgPB+ZP6mGzf3uA2uox4Ep9tUm+rUc8WLIdHT3HcAE4X8fhwQA9JKg==", 1577 | "dev": true, 1578 | "dependencies": { 1579 | "centra": "^2.6.0" 1580 | }, 1581 | "engines": { 1582 | "node": ">= 8" 1583 | } 1584 | }, 1585 | "node_modules/prelude-ls": { 1586 | "version": "1.2.1", 1587 | "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", 1588 | "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", 1589 | "dev": true, 1590 | "engines": { 1591 | "node": ">= 0.8.0" 1592 | } 1593 | }, 1594 | "node_modules/process-nextick-args": { 1595 | "version": "2.0.1", 1596 | "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", 1597 | "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", 1598 | "dev": true 1599 | }, 1600 | "node_modules/proxy-from-env": { 1601 | "version": "1.1.0", 1602 | "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", 1603 | "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", 1604 | "dev": true 1605 | }, 1606 | "node_modules/punycode": { 1607 | "version": "2.3.0", 1608 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", 1609 | "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", 1610 | "dev": true, 1611 | "engines": { 1612 | "node": ">=6" 1613 | } 1614 | }, 1615 | "node_modules/queue-microtask": { 1616 | "version": "1.2.3", 1617 | "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", 1618 | "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", 1619 | "dev": true, 1620 | "funding": [ 1621 | { 1622 | "type": "github", 1623 | "url": "https://github.com/sponsors/feross" 1624 | }, 1625 | { 1626 | "type": "patreon", 1627 | "url": "https://www.patreon.com/feross" 1628 | }, 1629 | { 1630 | "type": "consulting", 1631 | "url": "https://feross.org/support" 1632 | } 1633 | ] 1634 | }, 1635 | "node_modules/queue-tick": { 1636 | "version": "1.0.1", 1637 | "resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz", 1638 | "integrity": "sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==", 1639 | "dev": true 1640 | }, 1641 | "node_modules/readable-stream": { 1642 | "version": "3.6.2", 1643 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", 1644 | "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", 1645 | "dev": true, 1646 | "dependencies": { 1647 | "inherits": "^2.0.3", 1648 | "string_decoder": "^1.1.1", 1649 | "util-deprecate": "^1.0.1" 1650 | }, 1651 | "engines": { 1652 | "node": ">= 6" 1653 | } 1654 | }, 1655 | "node_modules/readdir-glob": { 1656 | "version": "1.1.3", 1657 | "resolved": "https://registry.npmjs.org/readdir-glob/-/readdir-glob-1.1.3.tgz", 1658 | "integrity": "sha512-v05I2k7xN8zXvPD9N+z/uhXPaj0sUFCe2rcWZIpBsqxfP7xXFQ0tipAd/wjj1YxWyWtUS5IDJpOG82JKt2EAVA==", 1659 | "dev": true, 1660 | "dependencies": { 1661 | "minimatch": "^5.1.0" 1662 | } 1663 | }, 1664 | "node_modules/readdir-glob/node_modules/brace-expansion": { 1665 | "version": "2.0.1", 1666 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", 1667 | "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", 1668 | "dev": true, 1669 | "dependencies": { 1670 | "balanced-match": "^1.0.0" 1671 | } 1672 | }, 1673 | "node_modules/readdir-glob/node_modules/minimatch": { 1674 | "version": "5.1.6", 1675 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", 1676 | "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", 1677 | "dev": true, 1678 | "dependencies": { 1679 | "brace-expansion": "^2.0.1" 1680 | }, 1681 | "engines": { 1682 | "node": ">=10" 1683 | } 1684 | }, 1685 | "node_modules/resolve-from": { 1686 | "version": "4.0.0", 1687 | "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", 1688 | "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", 1689 | "dev": true, 1690 | "engines": { 1691 | "node": ">=4" 1692 | } 1693 | }, 1694 | "node_modules/reusify": { 1695 | "version": "1.0.4", 1696 | "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", 1697 | "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", 1698 | "dev": true, 1699 | "engines": { 1700 | "iojs": ">=1.0.0", 1701 | "node": ">=0.10.0" 1702 | } 1703 | }, 1704 | "node_modules/rimraf": { 1705 | "version": "3.0.2", 1706 | "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", 1707 | "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", 1708 | "dev": true, 1709 | "dependencies": { 1710 | "glob": "^7.1.3" 1711 | }, 1712 | "bin": { 1713 | "rimraf": "bin.js" 1714 | }, 1715 | "funding": { 1716 | "url": "https://github.com/sponsors/isaacs" 1717 | } 1718 | }, 1719 | "node_modules/run-parallel": { 1720 | "version": "1.2.0", 1721 | "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", 1722 | "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", 1723 | "dev": true, 1724 | "funding": [ 1725 | { 1726 | "type": "github", 1727 | "url": "https://github.com/sponsors/feross" 1728 | }, 1729 | { 1730 | "type": "patreon", 1731 | "url": "https://www.patreon.com/feross" 1732 | }, 1733 | { 1734 | "type": "consulting", 1735 | "url": "https://feross.org/support" 1736 | } 1737 | ], 1738 | "dependencies": { 1739 | "queue-microtask": "^1.2.2" 1740 | } 1741 | }, 1742 | "node_modules/safe-buffer": { 1743 | "version": "5.2.1", 1744 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 1745 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", 1746 | "dev": true, 1747 | "funding": [ 1748 | { 1749 | "type": "github", 1750 | "url": "https://github.com/sponsors/feross" 1751 | }, 1752 | { 1753 | "type": "patreon", 1754 | "url": "https://www.patreon.com/feross" 1755 | }, 1756 | { 1757 | "type": "consulting", 1758 | "url": "https://feross.org/support" 1759 | } 1760 | ] 1761 | }, 1762 | "node_modules/shebang-command": { 1763 | "version": "2.0.0", 1764 | "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", 1765 | "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", 1766 | "dev": true, 1767 | "dependencies": { 1768 | "shebang-regex": "^3.0.0" 1769 | }, 1770 | "engines": { 1771 | "node": ">=8" 1772 | } 1773 | }, 1774 | "node_modules/shebang-regex": { 1775 | "version": "3.0.0", 1776 | "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", 1777 | "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", 1778 | "dev": true, 1779 | "engines": { 1780 | "node": ">=8" 1781 | } 1782 | }, 1783 | "node_modules/streamx": { 1784 | "version": "2.15.1", 1785 | "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.15.1.tgz", 1786 | "integrity": "sha512-fQMzy2O/Q47rgwErk/eGeLu/roaFWV0jVsogDmrszM9uIw8L5OA+t+V93MgYlufNptfjmYR1tOMWhei/Eh7TQA==", 1787 | "dev": true, 1788 | "dependencies": { 1789 | "fast-fifo": "^1.1.0", 1790 | "queue-tick": "^1.0.1" 1791 | } 1792 | }, 1793 | "node_modules/string_decoder": { 1794 | "version": "1.3.0", 1795 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", 1796 | "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", 1797 | "dev": true, 1798 | "dependencies": { 1799 | "safe-buffer": "~5.2.0" 1800 | } 1801 | }, 1802 | "node_modules/strip-ansi": { 1803 | "version": "6.0.1", 1804 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", 1805 | "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", 1806 | "dev": true, 1807 | "dependencies": { 1808 | "ansi-regex": "^5.0.1" 1809 | }, 1810 | "engines": { 1811 | "node": ">=8" 1812 | } 1813 | }, 1814 | "node_modules/strip-json-comments": { 1815 | "version": "3.1.1", 1816 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", 1817 | "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", 1818 | "dev": true, 1819 | "engines": { 1820 | "node": ">=8" 1821 | }, 1822 | "funding": { 1823 | "url": "https://github.com/sponsors/sindresorhus" 1824 | } 1825 | }, 1826 | "node_modules/supports-color": { 1827 | "version": "7.2.0", 1828 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 1829 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 1830 | "dev": true, 1831 | "dependencies": { 1832 | "has-flag": "^4.0.0" 1833 | }, 1834 | "engines": { 1835 | "node": ">=8" 1836 | } 1837 | }, 1838 | "node_modules/tar-stream": { 1839 | "version": "3.1.6", 1840 | "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.6.tgz", 1841 | "integrity": "sha512-B/UyjYwPpMBv+PaFSWAmtYjwdrlEaZQEhMIBFNC5oEG8lpiW8XjcSdmEaClj28ArfKScKHs2nshz3k2le6crsg==", 1842 | "dev": true, 1843 | "dependencies": { 1844 | "b4a": "^1.6.4", 1845 | "fast-fifo": "^1.2.0", 1846 | "streamx": "^2.15.0" 1847 | } 1848 | }, 1849 | "node_modules/text-table": { 1850 | "version": "0.2.0", 1851 | "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", 1852 | "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", 1853 | "dev": true 1854 | }, 1855 | "node_modules/trilium-etapi": { 1856 | "version": "0.1.1", 1857 | "resolved": "https://registry.npmjs.org/trilium-etapi/-/trilium-etapi-0.1.1.tgz", 1858 | "integrity": "sha512-YwK9zgEe2ikti8G5jPE26E+hq3yFyST7xozjsneJ4jt9wK68wB2ZKThKWpvg3EoN8QvmtGB7bxWZ1PkxKOa+AQ==", 1859 | "dev": true, 1860 | "dependencies": { 1861 | "@types/node": "^20.5.1", 1862 | "phin": "^3.7.0" 1863 | }, 1864 | "engines": { 1865 | "node": ">=16" 1866 | } 1867 | }, 1868 | "node_modules/trilium-pack": { 1869 | "version": "0.1.0", 1870 | "resolved": "https://registry.npmjs.org/trilium-pack/-/trilium-pack-0.1.0.tgz", 1871 | "integrity": "sha512-IRoYzyfULKhpQJb/rui16HuksDmI8h2DgxvprHRfLhcB7Su9Ft5oehQ+mgTRegmCIthc9P5cylJED23KtDPR9g==", 1872 | "dev": true, 1873 | "dependencies": { 1874 | "archiver": "^6.0.0" 1875 | }, 1876 | "bin": { 1877 | "tpack": "bin/tpack.js" 1878 | } 1879 | }, 1880 | "node_modules/type-check": { 1881 | "version": "0.4.0", 1882 | "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", 1883 | "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", 1884 | "dev": true, 1885 | "dependencies": { 1886 | "prelude-ls": "^1.2.1" 1887 | }, 1888 | "engines": { 1889 | "node": ">= 0.8.0" 1890 | } 1891 | }, 1892 | "node_modules/type-fest": { 1893 | "version": "0.20.2", 1894 | "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", 1895 | "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", 1896 | "dev": true, 1897 | "engines": { 1898 | "node": ">=10" 1899 | }, 1900 | "funding": { 1901 | "url": "https://github.com/sponsors/sindresorhus" 1902 | } 1903 | }, 1904 | "node_modules/uri-js": { 1905 | "version": "4.4.1", 1906 | "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", 1907 | "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", 1908 | "dev": true, 1909 | "dependencies": { 1910 | "punycode": "^2.1.0" 1911 | } 1912 | }, 1913 | "node_modules/util-deprecate": { 1914 | "version": "1.0.2", 1915 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", 1916 | "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", 1917 | "dev": true 1918 | }, 1919 | "node_modules/vanilla-colorful": { 1920 | "version": "0.7.2", 1921 | "resolved": "https://registry.npmjs.org/vanilla-colorful/-/vanilla-colorful-0.7.2.tgz", 1922 | "integrity": "sha512-z2YZusTFC6KnLERx1cgoIRX2CjPRP0W75N+3CC6gbvdX5Ch47rZkEMGO2Xnf+IEmi3RiFLxS18gayMA27iU7Kg==", 1923 | "dev": true 1924 | }, 1925 | "node_modules/which": { 1926 | "version": "2.0.2", 1927 | "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", 1928 | "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", 1929 | "dev": true, 1930 | "dependencies": { 1931 | "isexe": "^2.0.0" 1932 | }, 1933 | "bin": { 1934 | "node-which": "bin/node-which" 1935 | }, 1936 | "engines": { 1937 | "node": ">= 8" 1938 | } 1939 | }, 1940 | "node_modules/wrappy": { 1941 | "version": "1.0.2", 1942 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 1943 | "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", 1944 | "dev": true 1945 | }, 1946 | "node_modules/yocto-queue": { 1947 | "version": "0.1.0", 1948 | "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", 1949 | "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", 1950 | "dev": true, 1951 | "engines": { 1952 | "node": ">=10" 1953 | }, 1954 | "funding": { 1955 | "url": "https://github.com/sponsors/sindresorhus" 1956 | } 1957 | }, 1958 | "node_modules/zip-stream": { 1959 | "version": "5.0.1", 1960 | "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-5.0.1.tgz", 1961 | "integrity": "sha512-UfZ0oa0C8LI58wJ+moL46BDIMgCQbnsb+2PoiJYtonhBsMh2bq1eRBVkvjfVsqbEHd9/EgKPUuL9saSSsec8OA==", 1962 | "dev": true, 1963 | "dependencies": { 1964 | "archiver-utils": "^4.0.1", 1965 | "compress-commons": "^5.0.1", 1966 | "readable-stream": "^3.6.0" 1967 | }, 1968 | "engines": { 1969 | "node": ">= 12.0.0" 1970 | } 1971 | } 1972 | } 1973 | } 1974 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "trilium-markdownpreview", 3 | "version": "1.0.1", 4 | "description": "A widget for trilium to preview markdown notes.", 5 | "main": "src/widget.js", 6 | "directories": { 7 | "lib": "lib" 8 | }, 9 | "scripts": { 10 | "pack": "tpack", 11 | "send": "node scripts/send.js" 12 | }, 13 | "author": "Zerebos", 14 | "license": "Apache-2.0", 15 | "devDependencies": { 16 | "@types/trilium": "npm:trilium-types@^0.1.0", 17 | "dotenv": "^16.3.1", 18 | "eslint": "^8.47.0", 19 | "trilium-etapi": "^0.1.1", 20 | "trilium-pack": "^0.1.0" 21 | }, 22 | "dependencies": { 23 | "highlight.js": "^11.8.0", 24 | "marked": "^7.0.3" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /scripts/send.js: -------------------------------------------------------------------------------- 1 | const fs = require("node:fs"); 2 | const path = require("node:path"); 3 | const dotenv = require("dotenv"); 4 | const tepi = require("trilium-etapi").default; 5 | 6 | dotenv.config(); 7 | 8 | const widget = path.join(__dirname, "..", "src", "widget.js"); 9 | 10 | tepi.token(process.env.TRILIUM_ETAPI_TOKEN); 11 | tepi.putNoteContentById(process.env.NOTE_ID, fs.readFileSync(widget).toString()); -------------------------------------------------------------------------------- /src/styles.css: -------------------------------------------------------------------------------- 1 | pre code.hljs { 2 | display: block; 3 | overflow-x: auto; 4 | padding: 1em; 5 | } 6 | 7 | code.hljs { 8 | padding: 3px 5px; 9 | } 10 | 11 | .hljs-comment, 12 | .hljs-meta { 13 | color: #565f89 14 | } 15 | 16 | .hljs-deletion, 17 | .hljs-doctag, 18 | .hljs-regexp, 19 | .hljs-selector-attr, 20 | .hljs-selector-class, 21 | .hljs-selector-id, 22 | .hljs-selector-pseudo, 23 | .hljs-tag, 24 | .hljs-template-tag, 25 | .hljs-variable.language_ { 26 | color: #f7768e 27 | } 28 | 29 | .hljs-link, 30 | .hljs-literal, 31 | .hljs-number, 32 | .hljs-params, 33 | .hljs-template-variable, 34 | .hljs-type, 35 | .hljs-variable { 36 | color: #ff9e64 37 | } 38 | 39 | .hljs-attribute, 40 | .hljs-built_in { 41 | color: #e0af68 42 | } 43 | 44 | .hljs-keyword, 45 | .hljs-property, 46 | .hljs-subst, 47 | .hljs-title, 48 | .hljs-title.class_, 49 | .hljs-title.class_.inherited__, 50 | .hljs-title.function_ { 51 | color: #7dcfff 52 | } 53 | 54 | .hljs-selector-tag { 55 | color: #73daca 56 | } 57 | 58 | .hljs-addition, 59 | .hljs-bullet, 60 | .hljs-quote, 61 | .hljs-string, 62 | .hljs-symbol { 63 | color: #9ece6a 64 | } 65 | 66 | .hljs-code, 67 | .hljs-formula, 68 | .hljs-section { 69 | color: #7aa2f7 70 | } 71 | 72 | .hljs-attr, 73 | .hljs-char.escape_, 74 | .hljs-keyword, 75 | .hljs-name, 76 | .hljs-operator { 77 | color: #bb9af7 78 | } 79 | 80 | .hljs-punctuation { 81 | color: #c0caf5 82 | } 83 | 84 | .hljs { 85 | background: #141414; 86 | border: 1px solid rgba(255, 255, 255, .1) !important; 87 | border-radius: 0; 88 | color: #9aa5ce 89 | } 90 | 91 | .hljs-emphasis { 92 | font-style: italic 93 | } 94 | 95 | .hljs-strong { 96 | font-weight: 700 97 | } -------------------------------------------------------------------------------- /src/widget.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This widget allows you to preview any markdown code note in real time. 3 | */ 4 | const TPL = `
    5 | 6 |
    7 |
    `; 8 | 9 | /* global highlightminjs:false markedminjs:false */ 10 | 11 | 12 | // A couple of temporary hoists 13 | let noteId = ""; 14 | const imageCache = {}; 15 | 16 | 17 | /** @type {import("highlight.js").default} */ 18 | let hljs; 19 | try { 20 | hljs = highlightminjs; 21 | hljs.configure({cssSelector: "#markdown-preview pre code"}); 22 | } 23 | catch { 24 | // eslint-disable-next-line no-console 25 | console.info("highlight.min.js not found, no syntax highlighting in markdown preview."); 26 | } 27 | 28 | /** @type {import("marked").Marked} */ 29 | const markedjs = markedminjs; 30 | 31 | const slugify = text => text.toLowerCase().replace(/[^\w]/g, "-"); 32 | const renderer = { 33 | heading(text, level) { 34 | const escapedText = slugify(text); 35 | return ` 36 |
    37 | 38 | 39 | ${text} 40 | `; 41 | }, 42 | 43 | image(href, title, text) { 44 | const found = imageCache[noteId] && imageCache[noteId][href]; 45 | if (found) href = `api/images/${found}/${href}`; 46 | return `${text}`; 47 | }, 48 | }; 49 | 50 | markedjs.use({renderer}); 51 | 52 | 53 | class MarkdownPreviewWidget extends api.RightPanelWidget { 54 | get widgetTitle() {return "Markdown Preview";} 55 | get parentWidget() {return "right-pane";} 56 | 57 | isEnabled() { 58 | return super.isEnabled() 59 | && this.note.type === "code" 60 | && this.note.mime 61 | && this.note.mime === "text/x-markdown" 62 | && this.note.hasLabel("markdownPreview"); 63 | } 64 | 65 | async doRenderBody() { 66 | this.$body.html(TPL); 67 | this.$preview = this.$body.find("#markdown-preview"); 68 | this.$body.on("click", "a", this.jumpToLink.bind(this)); 69 | await this.updateCss(); 70 | return this.$body; 71 | } 72 | 73 | async refreshWithNote(note) { 74 | const {content} = await note.getNoteComplement(); 75 | this.$preview.html(markedjs.parse(content)); 76 | const highlightLabel = api.startNote.getLabel("syntaxHighlighting"); 77 | if (highlightLabel?.value !== "false") hljs?.highlightAll?.(); 78 | } 79 | 80 | async entitiesReloadedEvent({loadResults}) { 81 | if (loadResults.isNoteContentReloaded(this.noteId)) { 82 | this.refresh(); 83 | } 84 | } 85 | 86 | async noteSwitched() { 87 | if (!this.note) return; 88 | noteId = this.note.noteId; 89 | await this.getImages(); 90 | await this.updateCss(); 91 | await this.refresh(); 92 | 93 | if (!this.isEnabled()) return; 94 | const scrollSyncStatus = this.note.getLabelValue("markdownScrollSync"); 95 | const disableBoth = scrollSyncStatus === "none"; 96 | const onlyLeft = scrollSyncStatus === "left"; 97 | const onlyRight = scrollSyncStatus === "right"; 98 | 99 | $("#center-pane .CodeMirror-scroll, #center-pane .component.scrolling-container").off(".mdpreview"); 100 | $("#right-pane").off(".mdpreview"); 101 | if (disableBoth) return; 102 | 103 | const isFullHeight = document.querySelector(".note-detail.full-height"); 104 | const centerSelector = isFullHeight ? "#center-pane .CodeMirror-scroll" : "#center-pane .component.scrolling-container"; 105 | const center = document.querySelector(centerSelector); 106 | const right = document.querySelector("#right-pane"); 107 | if (!onlyRight) this.addSyncListener(center, right, !onlyLeft); 108 | if (!onlyLeft) this.addSyncListener(right, center, !onlyRight); 109 | } 110 | 111 | async getImages() { 112 | const children = await this.note.getChildNotes(); 113 | const images = children.filter(n => n.type === "image"); 114 | imageCache[this.note.noteId] = {}; 115 | for (const image of images) imageCache[this.note.noteId][image.title] = image.noteId; 116 | } 117 | 118 | jumpToLink(ev) { 119 | const link = ev.target; 120 | const href = link.getAttribute("href"); 121 | const isAnchorLink = href.startsWith("#"); 122 | if (!isAnchorLink) return; 123 | const heading = this.$body.find(href); 124 | if (!heading.length) return; 125 | heading[0].scrollIntoView({behavior: "instant", block: "start"}); 126 | } 127 | 128 | addSyncListener(target, other, shouldRestart = true) { 129 | const jTarget = $(target); 130 | jTarget.on("scroll.mdpreview", (ev) => { 131 | $(other).off("scroll.mdpreview"); 132 | this.syncedScroll(ev.target, other); 133 | clearTimeout($.data(jTarget, "scrollTimer")); 134 | $.data(jTarget, "scrollTimer", setTimeout(() => { 135 | if (shouldRestart) this.addSyncListener(other, target, shouldRestart); 136 | }, 250)); 137 | }); 138 | } 139 | 140 | syncedScroll(target, other) { 141 | const max = target.scrollHeight - target.clientHeight; 142 | const current = target.scrollTop; 143 | const percent = current / max; 144 | const maxPane = other.scrollHeight - other.clientHeight; 145 | const newScroll = (percent * maxPane); 146 | other.scrollTop = newScroll; 147 | } 148 | 149 | async updateCss() { 150 | let accumulator = ""; 151 | 152 | const globalChildren = await api.startNote.getChildNotes(); 153 | const globalStyles = globalChildren.filter(n => n.mime == "text/css"); 154 | for (const style of globalStyles) accumulator += await style.getContent(); 155 | 156 | if (this.note && this.isEnabled()) { 157 | const localChildren = await this.note.getChildNotes(); 158 | const localStyles = localChildren.filter(n => n.mime == "text/css"); 159 | for (const style of localStyles) accumulator += await style.getContent(); 160 | } 161 | 162 | this.$body.find("style").html(accumulator); 163 | } 164 | } 165 | 166 | module.exports = new MarkdownPreviewWidget(); -------------------------------------------------------------------------------- /tpack.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | output: "dist/Trilium-MarkdownPreview.zip", 3 | notes: { 4 | title: "Markdown Preview", 5 | file: "src/widget.js", 6 | attributes: { 7 | "#widget": "", 8 | "#label:syntaxHighlighting": "promoted,single,boolean", 9 | "#syntaxHighlighting": "true" 10 | }, 11 | children: [ 12 | {type: "file", file: "lib/highlight.min.js"}, 13 | {type: "file", file: "lib/marked.min.js"}, 14 | {file: "src/styles.css"} 15 | ] 16 | } 17 | }; --------------------------------------------------------------------------------