diff --git a/.editorconfig b/.editorconfig index 84b8a66..adb96dd 100644 --- a/.editorconfig +++ b/.editorconfig @@ -5,6 +5,7 @@ root = true charset = utf-8 end_of_line = lf insert_final_newline = true -indent_style = tab -indent_size = 4 -tab_width = 4 +indent_style = space +indent_size = 2 +tab_width = 2 +max_line_length = 100 \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 350e329..fbb21c4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,4 +32,4 @@ jobs: gh release create "$tag" \ --title="$tag" \ --draft \ - main.js manifest.json styles.css \ No newline at end of file + main.js manifest.json styles.css diff --git a/esbuild.config.mjs b/esbuild.config.mjs index 309f17b..4480ad1 100644 --- a/esbuild.config.mjs +++ b/esbuild.config.mjs @@ -2,48 +2,48 @@ import esbuild from "esbuild"; import process from "process"; import builtins from "builtin-modules"; -const banner = -`/* +const banner = `/* THIS IS A GENERATED/BUNDLED FILE BY ESBUILD if you want to view the source, please visit the github repository of this plugin */ `; -const prod = (process.argv[2] === "production"); +const prod = process.argv[2] === "production"; const context = await esbuild.context({ - banner: { - js: banner, - }, - entryPoints: ["src/main.ts"], - bundle: true, - external: [ - "obsidian", - "electron", - "@codemirror/autocomplete", - "@codemirror/collab", - "@codemirror/commands", - "@codemirror/language", - "@codemirror/lint", - "@codemirror/search", - "@codemirror/state", - "@codemirror/view", - "@lezer/common", - "@lezer/highlight", - "@lezer/lr", - ...builtins], - format: "cjs", - target: "es2018", - logLevel: "info", - sourcemap: prod ? false : "inline", - treeShaking: true, - outfile: "main.js", - minify: prod, + banner: { + js: banner, + }, + entryPoints: ["src/main.ts"], + bundle: true, + external: [ + "obsidian", + "electron", + "@codemirror/autocomplete", + "@codemirror/collab", + "@codemirror/commands", + "@codemirror/language", + "@codemirror/lint", + "@codemirror/search", + "@codemirror/state", + "@codemirror/view", + "@lezer/common", + "@lezer/highlight", + "@lezer/lr", + ...builtins, + ], + format: "cjs", + target: "es2018", + logLevel: "info", + sourcemap: prod ? false : "inline", + treeShaking: true, + outfile: "main.js", + minify: prod, }); if (prod) { - await context.rebuild(); - process.exit(0); + await context.rebuild(); + process.exit(0); } else { - await context.watch(); + await context.watch(); } diff --git a/manifest.json b/manifest.json index 80c48c9..8e29e31 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "pure-chat-llm", "name": "Pure Chat LLM", - "version": "1.1.4", + "version": "1.1.5", "minAppVersion": "1.8.10", "description": "Turn notes into conversations with chatGPT", "author": "Justice Vellacott", diff --git a/package-lock.json b/package-lock.json index 5f7b3ed..8f44f4a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,2227 +1,2397 @@ { - "name": "pure-chat-llm", - "version": "1.1.4", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "pure-chat-llm", - "version": "1.1.4", - "license": "MIT", - "devDependencies": { - "@types/node": "^16.11.6", - "@typescript-eslint/eslint-plugin": "5.29.0", - "@typescript-eslint/parser": "5.29.0", - "builtin-modules": "3.3.0", - "esbuild": "^0.17.3", - "obsidian": "latest", - "tslib": "2.4.0", - "typescript": "4.7.4" - } - }, - "node_modules/@codemirror/state": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.5.2.tgz", - "integrity": "sha512-FVqsPqtPWKVVL3dPSxy8wEF/ymIEuVzF1PK3VbUgrxXpJUSHQWWZz4JMToquRxnkw+36LTamCZG2iua2Ptq0fA==", - "dev": true, - "peer": true, - "dependencies": { - "@marijn/find-cluster-break": "^1.0.0" - } - }, - "node_modules/@codemirror/view": { - "version": "6.36.7", - "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.36.7.tgz", - "integrity": "sha512-kCWGW/chWGPgZqfZ36Um9Iz0X2IVpmCjg1P/qY6B6a2ecXtWRRAigmpJ6YgUQ5lTWXMyyVdfmpzhLZmsZQMbtg==", - "dev": true, - "peer": true, - "dependencies": { - "@codemirror/state": "^6.5.0", - "style-mod": "^4.1.0", - "w3c-keyname": "^2.2.4" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.19.tgz", - "integrity": "sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.19.tgz", - "integrity": "sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.19.tgz", - "integrity": "sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.19.tgz", - "integrity": "sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.19.tgz", - "integrity": "sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.19.tgz", - "integrity": "sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.19.tgz", - "integrity": "sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.19.tgz", - "integrity": "sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.19.tgz", - "integrity": "sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.19.tgz", - "integrity": "sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.19.tgz", - "integrity": "sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==", - "cpu": [ - "loong64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.19.tgz", - "integrity": "sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==", - "cpu": [ - "mips64el" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.19.tgz", - "integrity": "sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.19.tgz", - "integrity": "sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==", - "cpu": [ - "riscv64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.19.tgz", - "integrity": "sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==", - "cpu": [ - "s390x" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.19.tgz", - "integrity": "sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.19.tgz", - "integrity": "sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.19.tgz", - "integrity": "sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.19.tgz", - "integrity": "sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.19.tgz", - "integrity": "sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.19.tgz", - "integrity": "sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.19.tgz", - "integrity": "sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz", - "integrity": "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==", - "dev": true, - "peer": true, - "dependencies": { - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", - "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", - "dev": true, - "peer": true, - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", - "dev": true, - "peer": true, - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint/js": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", - "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", - "dev": true, - "peer": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", - "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", - "deprecated": "Use @eslint/config-array instead", - "dev": true, - "peer": true, - "dependencies": { - "@humanwhocodes/object-schema": "^2.0.3", - "debug": "^4.3.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, - "peer": true, - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", - "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", - "deprecated": "Use @eslint/object-schema instead", - "dev": true, - "peer": true - }, - "node_modules/@marijn/find-cluster-break": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@marijn/find-cluster-break/-/find-cluster-break-1.0.2.tgz", - "integrity": "sha512-l0h88YhZFyKdXIFNfSWpyjStDjGHwZ/U7iobcK1cQQD8sejsONdQtTVU+1wVN1PBw40PiiHB1vA5S7VTfQiP9g==", - "dev": true, - "peer": true - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@types/codemirror": { - "version": "5.60.8", - "resolved": "https://registry.npmjs.org/@types/codemirror/-/codemirror-5.60.8.tgz", - "integrity": "sha512-VjFgDF/eB+Aklcy15TtOTLQeMjTo07k7KAjql8OK5Dirr7a6sJY4T1uVBDuTVG9VEmn1uUsohOpYnVfgC6/jyw==", - "dev": true, - "dependencies": { - "@types/tern": "*" - } - }, - "node_modules/@types/estree": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz", - "integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==", - "dev": true - }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true - }, - "node_modules/@types/node": { - "version": "16.18.126", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.126.tgz", - "integrity": "sha512-OTcgaiwfGFBKacvfwuHzzn1KLxH/er8mluiy8/uM3sGXHaRe73RrSIj01jow9t4kJEW633Ov+cOexXeiApTyAw==", - "dev": true - }, - "node_modules/@types/tern": { - "version": "0.23.9", - "resolved": "https://registry.npmjs.org/@types/tern/-/tern-0.23.9.tgz", - "integrity": "sha512-ypzHFE/wBzh+BlH6rrBgS5I/Z7RD21pGhZ2rltb/+ZrVM1awdZwjx7hE5XfuYgHWk9uvV5HLZN3SloevCAp3Bw==", - "dev": true, - "dependencies": { - "@types/estree": "*" - } - }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.29.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.29.0.tgz", - "integrity": "sha512-kgTsISt9pM53yRFQmLZ4npj99yGl3x3Pl7z4eA66OuTzAGC4bQB5H5fuLwPnqTKU3yyrrg4MIhjF17UYnL4c0w==", - "dev": true, - "dependencies": { - "@typescript-eslint/scope-manager": "5.29.0", - "@typescript-eslint/type-utils": "5.29.0", - "@typescript-eslint/utils": "5.29.0", - "debug": "^4.3.4", - "functional-red-black-tree": "^1.0.1", - "ignore": "^5.2.0", - "regexpp": "^3.2.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/parser": { - "version": "5.29.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.29.0.tgz", - "integrity": "sha512-ruKWTv+x0OOxbzIw9nW5oWlUopvP/IQDjB5ZqmTglLIoDTctLlAJpAQFpNPJP/ZI7hTT9sARBosEfaKbcFuECw==", - "dev": true, - "dependencies": { - "@typescript-eslint/scope-manager": "5.29.0", - "@typescript-eslint/types": "5.29.0", - "@typescript-eslint/typescript-estree": "5.29.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "5.29.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.29.0.tgz", - "integrity": "sha512-etbXUT0FygFi2ihcxDZjz21LtC+Eps9V2xVx09zFoN44RRHPrkMflidGMI+2dUs821zR1tDS6Oc9IXxIjOUZwA==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.29.0", - "@typescript-eslint/visitor-keys": "5.29.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/type-utils": { - "version": "5.29.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.29.0.tgz", - "integrity": "sha512-JK6bAaaiJozbox3K220VRfCzLa9n0ib/J+FHIwnaV3Enw/TO267qe0pM1b1QrrEuy6xun374XEAsRlA86JJnyg==", - "dev": true, - "dependencies": { - "@typescript-eslint/utils": "5.29.0", - "debug": "^4.3.4", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "*" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/types": { - "version": "5.29.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.29.0.tgz", - "integrity": "sha512-X99VbqvAXOMdVyfFmksMy3u8p8yoRGITgU1joBJPzeYa0rhdf5ok9S56/itRoUSh99fiDoMtarSIJXo7H/SnOg==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.29.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.29.0.tgz", - "integrity": "sha512-mQvSUJ/JjGBdvo+1LwC+GY2XmSYjK1nAaVw2emp/E61wEVYEyibRHCqm1I1vEKbXCpUKuW4G7u9ZCaZhJbLoNQ==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.29.0", - "@typescript-eslint/visitor-keys": "5.29.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/utils": { - "version": "5.29.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.29.0.tgz", - "integrity": "sha512-3Eos6uP1nyLOBayc/VUdKZikV90HahXE5Dx9L5YlSd/7ylQPXhLk1BYb29SDgnBnTp+jmSZUU0QxUiyHgW4p7A==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.29.0", - "@typescript-eslint/types": "5.29.0", - "@typescript-eslint/typescript-estree": "5.29.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.29.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.29.0.tgz", - "integrity": "sha512-Hpb/mCWsjILvikMQoZIE3voc9wtQcS0A9FUw3h8bhr9UxBdtI/tw1ZDZUOXHXLOVMedKCH5NxyzATwnU78bWCQ==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.29.0", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@ungap/structured-clone": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", - "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==", - "dev": true, - "peer": true - }, - "node_modules/acorn": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", - "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", - "dev": true, - "peer": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "peer": true, - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "peer": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "peer": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "peer": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true, - "peer": true - }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true, - "peer": true - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "peer": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/builtin-modules": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", - "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", - "dev": true, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "peer": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "peer": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "peer": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "peer": true - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true, - "peer": true - }, - "node_modules/cross-spawn": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "dev": true, - "peer": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/debug": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", - "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", - "dev": true, - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true, - "peer": true - }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "peer": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/esbuild": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.19.tgz", - "integrity": "sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==", - "dev": true, - "hasInstallScript": true, - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=12" - }, - "optionalDependencies": { - "@esbuild/android-arm": "0.17.19", - "@esbuild/android-arm64": "0.17.19", - "@esbuild/android-x64": "0.17.19", - "@esbuild/darwin-arm64": "0.17.19", - "@esbuild/darwin-x64": "0.17.19", - "@esbuild/freebsd-arm64": "0.17.19", - "@esbuild/freebsd-x64": "0.17.19", - "@esbuild/linux-arm": "0.17.19", - "@esbuild/linux-arm64": "0.17.19", - "@esbuild/linux-ia32": "0.17.19", - "@esbuild/linux-loong64": "0.17.19", - "@esbuild/linux-mips64el": "0.17.19", - "@esbuild/linux-ppc64": "0.17.19", - "@esbuild/linux-riscv64": "0.17.19", - "@esbuild/linux-s390x": "0.17.19", - "@esbuild/linux-x64": "0.17.19", - "@esbuild/netbsd-x64": "0.17.19", - "@esbuild/openbsd-x64": "0.17.19", - "@esbuild/sunos-x64": "0.17.19", - "@esbuild/win32-arm64": "0.17.19", - "@esbuild/win32-ia32": "0.17.19", - "@esbuild/win32-x64": "0.17.19" - } - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "peer": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", - "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", - "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", - "dev": true, - "peer": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.1", - "@humanwhocodes/config-array": "^0.13.0", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^2.0.0" - }, - "engines": { - "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=5" - } - }, - "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", - "dev": true, - "peer": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "peer": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", - "dev": true, - "peer": true, - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/esquery": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", - "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", - "dev": true, - "peer": true, - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esquery/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "peer": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esrecurse/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true, - "peer": true - }, - "node_modules/fast-glob": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", - "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.8" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true, - "peer": true - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true, - "peer": true - }, - "node_modules/fastq": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", - "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", - "dev": true, - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "peer": true, - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "peer": true, - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", - "dev": true, - "peer": true, - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/flatted": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", - "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", - "dev": true, - "peer": true - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true, - "peer": true - }, - "node_modules/functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", - "dev": true - }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "peer": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "peer": true, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "peer": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true, - "peer": true - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "peer": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/import-fresh": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", - "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", - "dev": true, - "peer": true, - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "peer": true, - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", - "dev": true, - "peer": true, - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true, - "peer": true - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "peer": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true, - "peer": true - }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "peer": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true, - "peer": true - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true, - "peer": true - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true, - "peer": true - }, - "node_modules/keyv": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", - "dev": true, - "peer": true, - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "peer": true, - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "peer": true, - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true, - "peer": true - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dev": true, - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "peer": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/moment": { - "version": "2.29.4", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", - "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true, - "peer": true - }, - "node_modules/obsidian": { - "version": "1.8.7", - "resolved": "https://registry.npmjs.org/obsidian/-/obsidian-1.8.7.tgz", - "integrity": "sha512-h4bWwNFAGRXlMlMAzdEiIM2ppTGlrh7uGOJS6w4gClrsjc+ei/3YAtU2VdFUlCiPuTHpY4aBpFJJW75S1Tl/JA==", - "dev": true, - "dependencies": { - "@types/codemirror": "5.60.8", - "moment": "2.29.4" - }, - "peerDependencies": { - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.0.0" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "peer": true, - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/optionator": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", - "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", - "dev": true, - "peer": true, - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "peer": true, - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "peer": true, - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "peer": true, - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "peer": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "peer": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "peer": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, - "peer": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, - "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, - "peer": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/reusify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", - "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", - "dev": true, - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "dev": true, - "peer": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "peer": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "peer": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "peer": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "peer": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/style-mod": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/style-mod/-/style-mod-4.1.2.tgz", - "integrity": "sha512-wnD1HyVqpJUI2+eKZ+eo1UwghftP6yuFheBqqe+bWCotBjC2K1YnteJILRMs3SM4V/0dLEW1SC27MWP5y+mwmw==", - "dev": true, - "peer": true - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "peer": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true, - "peer": true - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", - "dev": true - }, - "node_modules/tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dev": true, - "dependencies": { - "tslib": "^1.8.1" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" - } - }, - "node_modules/tsutils/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "peer": true, - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "peer": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/typescript": { - "version": "4.7.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", - "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "peer": true, - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/w3c-keyname": { - "version": "2.2.8", - "resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.8.tgz", - "integrity": "sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==", - "dev": true, - "peer": true - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "peer": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/word-wrap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", - "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", - "dev": true, - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true, - "peer": true - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "peer": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - } - } + "name": "pure-chat-llm", + "version": "1.1.5", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "pure-chat-llm", + "version": "1.1.5", + "license": "MIT", + "devDependencies": { + "@types/node": "^16.11.6", + "@typescript-eslint/eslint-plugin": "5.29.0", + "@typescript-eslint/parser": "5.29.0", + "builtin-modules": "3.3.0", + "esbuild": "^0.17.3", + "obsidian": "latest", + "tslib": "2.4.0", + "typescript": "4.7.4" + } + }, + "node_modules/@codemirror/state": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.5.2.tgz", + "integrity": "sha512-FVqsPqtPWKVVL3dPSxy8wEF/ymIEuVzF1PK3VbUgrxXpJUSHQWWZz4JMToquRxnkw+36LTamCZG2iua2Ptq0fA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@marijn/find-cluster-break": "^1.0.0" + } + }, + "node_modules/@codemirror/view": { + "version": "6.36.7", + "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.36.7.tgz", + "integrity": "sha512-kCWGW/chWGPgZqfZ36Um9Iz0X2IVpmCjg1P/qY6B6a2ecXtWRRAigmpJ6YgUQ5lTWXMyyVdfmpzhLZmsZQMbtg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@codemirror/state": "^6.5.0", + "style-mod": "^4.1.0", + "w3c-keyname": "^2.2.4" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.19.tgz", + "integrity": "sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.19.tgz", + "integrity": "sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.19.tgz", + "integrity": "sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.19.tgz", + "integrity": "sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.19.tgz", + "integrity": "sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.19.tgz", + "integrity": "sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.19.tgz", + "integrity": "sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.19.tgz", + "integrity": "sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.19.tgz", + "integrity": "sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.19.tgz", + "integrity": "sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.19.tgz", + "integrity": "sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.19.tgz", + "integrity": "sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.19.tgz", + "integrity": "sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.19.tgz", + "integrity": "sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.19.tgz", + "integrity": "sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.19.tgz", + "integrity": "sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.19.tgz", + "integrity": "sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.19.tgz", + "integrity": "sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.19.tgz", + "integrity": "sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.19.tgz", + "integrity": "sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.19.tgz", + "integrity": "sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.19.tgz", + "integrity": "sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz", + "integrity": "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/js": { + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", + "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", + "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", + "deprecated": "Use @eslint/config-array instead", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.3", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "deprecated": "Use @eslint/object-schema instead", + "dev": true, + "license": "BSD-3-Clause", + "peer": true + }, + "node_modules/@marijn/find-cluster-break": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@marijn/find-cluster-break/-/find-cluster-break-1.0.2.tgz", + "integrity": "sha512-l0h88YhZFyKdXIFNfSWpyjStDjGHwZ/U7iobcK1cQQD8sejsONdQtTVU+1wVN1PBw40PiiHB1vA5S7VTfQiP9g==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@types/codemirror": { + "version": "5.60.8", + "resolved": "https://registry.npmjs.org/@types/codemirror/-/codemirror-5.60.8.tgz", + "integrity": "sha512-VjFgDF/eB+Aklcy15TtOTLQeMjTo07k7KAjql8OK5Dirr7a6sJY4T1uVBDuTVG9VEmn1uUsohOpYnVfgC6/jyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/tern": "*" + } + }, + "node_modules/@types/estree": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz", + "integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "16.18.126", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.126.tgz", + "integrity": "sha512-OTcgaiwfGFBKacvfwuHzzn1KLxH/er8mluiy8/uM3sGXHaRe73RrSIj01jow9t4kJEW633Ov+cOexXeiApTyAw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/tern": { + "version": "0.23.9", + "resolved": "https://registry.npmjs.org/@types/tern/-/tern-0.23.9.tgz", + "integrity": "sha512-ypzHFE/wBzh+BlH6rrBgS5I/Z7RD21pGhZ2rltb/+ZrVM1awdZwjx7hE5XfuYgHWk9uvV5HLZN3SloevCAp3Bw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "*" + } + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.29.0.tgz", + "integrity": "sha512-kgTsISt9pM53yRFQmLZ4npj99yGl3x3Pl7z4eA66OuTzAGC4bQB5H5fuLwPnqTKU3yyrrg4MIhjF17UYnL4c0w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/scope-manager": "5.29.0", + "@typescript-eslint/type-utils": "5.29.0", + "@typescript-eslint/utils": "5.29.0", + "debug": "^4.3.4", + "functional-red-black-tree": "^1.0.1", + "ignore": "^5.2.0", + "regexpp": "^3.2.0", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^5.0.0", + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.29.0.tgz", + "integrity": "sha512-ruKWTv+x0OOxbzIw9nW5oWlUopvP/IQDjB5ZqmTglLIoDTctLlAJpAQFpNPJP/ZI7hTT9sARBosEfaKbcFuECw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/scope-manager": "5.29.0", + "@typescript-eslint/types": "5.29.0", + "@typescript-eslint/typescript-estree": "5.29.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.29.0.tgz", + "integrity": "sha512-etbXUT0FygFi2ihcxDZjz21LtC+Eps9V2xVx09zFoN44RRHPrkMflidGMI+2dUs821zR1tDS6Oc9IXxIjOUZwA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "5.29.0", + "@typescript-eslint/visitor-keys": "5.29.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.29.0.tgz", + "integrity": "sha512-JK6bAaaiJozbox3K220VRfCzLa9n0ib/J+FHIwnaV3Enw/TO267qe0pM1b1QrrEuy6xun374XEAsRlA86JJnyg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/utils": "5.29.0", + "debug": "^4.3.4", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.29.0.tgz", + "integrity": "sha512-X99VbqvAXOMdVyfFmksMy3u8p8yoRGITgU1joBJPzeYa0rhdf5ok9S56/itRoUSh99fiDoMtarSIJXo7H/SnOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.29.0.tgz", + "integrity": "sha512-mQvSUJ/JjGBdvo+1LwC+GY2XmSYjK1nAaVw2emp/E61wEVYEyibRHCqm1I1vEKbXCpUKuW4G7u9ZCaZhJbLoNQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/types": "5.29.0", + "@typescript-eslint/visitor-keys": "5.29.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.29.0.tgz", + "integrity": "sha512-3Eos6uP1nyLOBayc/VUdKZikV90HahXE5Dx9L5YlSd/7ylQPXhLk1BYb29SDgnBnTp+jmSZUU0QxUiyHgW4p7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json-schema": "^7.0.9", + "@typescript-eslint/scope-manager": "5.29.0", + "@typescript-eslint/types": "5.29.0", + "@typescript-eslint/typescript-estree": "5.29.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.29.0.tgz", + "integrity": "sha512-Hpb/mCWsjILvikMQoZIE3voc9wtQcS0A9FUw3h8bhr9UxBdtI/tw1ZDZUOXHXLOVMedKCH5NxyzATwnU78bWCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "5.29.0", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@ungap/structured-clone": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", + "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==", + "dev": true, + "license": "ISC", + "peer": true + }, + "node_modules/acorn": { + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", + "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peer": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0", + "peer": true + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/builtin-modules": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", + "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/esbuild": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.19.tgz", + "integrity": "sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/android-arm": "0.17.19", + "@esbuild/android-arm64": "0.17.19", + "@esbuild/android-x64": "0.17.19", + "@esbuild/darwin-arm64": "0.17.19", + "@esbuild/darwin-x64": "0.17.19", + "@esbuild/freebsd-arm64": "0.17.19", + "@esbuild/freebsd-x64": "0.17.19", + "@esbuild/linux-arm": "0.17.19", + "@esbuild/linux-arm64": "0.17.19", + "@esbuild/linux-ia32": "0.17.19", + "@esbuild/linux-loong64": "0.17.19", + "@esbuild/linux-mips64el": "0.17.19", + "@esbuild/linux-ppc64": "0.17.19", + "@esbuild/linux-riscv64": "0.17.19", + "@esbuild/linux-s390x": "0.17.19", + "@esbuild/linux-x64": "0.17.19", + "@esbuild/netbsd-x64": "0.17.19", + "@esbuild/openbsd-x64": "0.17.19", + "@esbuild/sunos-x64": "0.17.19", + "@esbuild/win32-arm64": "0.17.19", + "@esbuild/win32-ia32": "0.17.19", + "@esbuild/win32-x64": "0.17.19" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", + "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", + "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.1", + "@humanwhocodes/config-array": "^0.13.0", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=5" + } + }, + "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esquery/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/fastq": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", + "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", + "dev": true, + "license": "ISC", + "peer": true + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC", + "peer": true + }, + "node_modules/functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", + "dev": true, + "license": "MIT" + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC", + "peer": true + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC", + "peer": true + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/moment": { + "version": "2.29.4", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", + "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/obsidian": { + "version": "1.8.7", + "resolved": "https://registry.npmjs.org/obsidian/-/obsidian-1.8.7.tgz", + "integrity": "sha512-h4bWwNFAGRXlMlMAzdEiIM2ppTGlrh7uGOJS6w4gClrsjc+ei/3YAtU2VdFUlCiPuTHpY4aBpFJJW75S1Tl/JA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/codemirror": "5.60.8", + "moment": "2.29.4" + }, + "peerDependencies": { + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.0.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/regexpp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/semver": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/style-mod": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/style-mod/-/style-mod-4.1.2.tgz", + "integrity": "sha512-wnD1HyVqpJUI2+eKZ+eo1UwghftP6yuFheBqqe+bWCotBjC2K1YnteJILRMs3SM4V/0dLEW1SC27MWP5y+mwmw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", + "dev": true, + "license": "0BSD" + }, + "node_modules/tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^1.8.1" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + } + }, + "node_modules/tsutils/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true, + "license": "0BSD" + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typescript": { + "version": "4.7.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", + "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/w3c-keyname": { + "version": "2.2.8", + "resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.8.tgz", + "integrity": "sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC", + "peer": true + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } } diff --git a/package.json b/package.json index f8cc1bb..a61ad5b 100644 --- a/package.json +++ b/package.json @@ -1,31 +1,32 @@ { - "name": "pure-chat-llm", - "version": "1.1.4", - "description": "Turn notes into conversations with chatGPT", - "main": "main.js", - "scripts": { - "dev": "node esbuild.config.mjs", - "build": "tsc -noEmit -skipLibCheck && node esbuild.config.mjs production", - "version": "node version-bump.mjs && git add manifest.json versions.json" - }, - "keywords": [ - "obsidian", - "plugin", - "chatbot", - "language model", - "LLM", - "notes" - ], - "author": "Justice Vellacott", - "license": "MIT", - "devDependencies": { - "@types/node": "^16.11.6", - "@typescript-eslint/eslint-plugin": "5.29.0", - "@typescript-eslint/parser": "5.29.0", - "builtin-modules": "3.3.0", - "esbuild": "^0.17.3", - "obsidian": "latest", - "tslib": "2.4.0", - "typescript": "4.7.4" - } + "name": "pure-chat-llm", + "version": "1.1.5", + "description": "Turn notes into conversations with chatGPT", + "main": "main.js", + "scripts": { + "dev": "node esbuild.config.mjs", + "build": "tsc -noEmit -skipLibCheck && node esbuild.config.mjs production", + "version": "node version-bump.mjs && git add manifest.json versions.json", + "release": "bash Release.sh" + }, + "keywords": [ + "obsidian", + "plugin", + "chatbot", + "language model", + "LLM", + "notes" + ], + "author": "Justice Vellacott", + "license": "MIT", + "devDependencies": { + "@types/node": "^16.11.6", + "@typescript-eslint/eslint-plugin": "5.29.0", + "@typescript-eslint/parser": "5.29.0", + "builtin-modules": "3.3.0", + "esbuild": "^0.17.3", + "obsidian": "latest", + "tslib": "2.4.0", + "typescript": "4.7.4" + } } diff --git a/src/ChainableEditor.ts b/src/ChainableEditor.ts index f1232f3..6e4e887 100644 --- a/src/ChainableEditor.ts +++ b/src/ChainableEditor.ts @@ -1,11 +1,11 @@ import { - Editor, - EditorPosition, - EditorSelectionOrCaret, - EditorRange, - EditorSelection, - EditorCommandName, - EditorTransaction, + Editor, + EditorPosition, + EditorSelectionOrCaret, + EditorRange, + EditorSelection, + EditorCommandName, + EditorTransaction, } from "obsidian"; /** @@ -13,246 +13,246 @@ import { * allowing multiple operations to be performed fluently. */ export class ChainableEditor { - /** - * The underlying editor instance. - * @private - */ - private editor: Editor; + /** + * The underlying editor instance. + * @private + */ + private editor: Editor; - /** - * Creates a new ChainableEditor wrapping the provided editor. - * @param {Editor} editor - The editor instance to wrap. - */ - constructor(editor: Editor) { - this.editor = editor; - } + /** + * Creates a new ChainableEditor wrapping the provided editor. + * @param {Editor} editor - The editor instance to wrap. + */ + constructor(editor: Editor) { + this.editor = editor; + } - /** - * Sets the editor content to the specified string. - * @param {string} content - The content to set in the editor. - * @returns {this} - The current ChainableEditor instance. - */ - setValue(content: string): this { - this.editor.setValue(content); - return this; - } + /** + * Sets the editor content to the specified string. + * @param {string} content - The content to set in the editor. + * @returns {this} - The current ChainableEditor instance. + */ + setValue(content: string): this { + this.editor.setValue(content); + return this; + } - /** - * Inserts or replaces the specified line with provided text. - * @param {number} n - Zero-based line number. - * @param {string} text - The text to set at the specified line. - * @returns {this} - The current ChainableEditor instance. - */ - setLine(n: number, text: string): this { - this.editor.setLine(n, text); - return this; - } + /** + * Inserts or replaces the specified line with provided text. + * @param {number} n - Zero-based line number. + * @param {string} text - The text to set at the specified line. + * @returns {this} - The current ChainableEditor instance. + */ + setLine(n: number, text: string): this { + this.editor.setLine(n, text); + return this; + } - /** - * Sets the cursor position. - * @param {EditorPosition|number} pos - The position as an object or offset. - * @param {number} [ch] - Optional character position when using offset. - * @returns {this} - The current ChainableEditor instance. - */ - setCursor(pos: EditorPosition | number, ch?: number): this { - this.editor.setCursor(pos, ch); - return this; - } + /** + * Sets the cursor position. + * @param {EditorPosition|number} pos - The position as an object or offset. + * @param {number} [ch] - Optional character position when using offset. + * @returns {this} - The current ChainableEditor instance. + */ + setCursor(pos: EditorPosition | number, ch?: number): this { + this.editor.setCursor(pos, ch); + return this; + } - /** - * Sets the selection range in the editor. - * @param {EditorPosition} anchor - The start position. - * @param {EditorPosition} [head] - The end position (optional). - * @returns {this} - The current ChainableEditor instance. - */ - setSelection(anchor: EditorPosition, head?: EditorPosition): this { - this.editor.setSelection(anchor, head); - return this; - } + /** + * Sets the selection range in the editor. + * @param {EditorPosition} anchor - The start position. + * @param {EditorPosition} [head] - The end position (optional). + * @returns {this} - The current ChainableEditor instance. + */ + setSelection(anchor: EditorPosition, head?: EditorPosition): this { + this.editor.setSelection(anchor, head); + return this; + } - /** - * Replaces the current selection in the editor with the provided text. - * - * @param text - The text to insert in place of the current selection. - * @returns The current instance for method chaining. - */ - replaceSelection(text: string): this { - this.editor.replaceSelection(text); - return this; - } + /** + * Replaces the current selection in the editor with the provided text. + * + * @param text - The text to insert in place of the current selection. + * @returns The current instance for method chaining. + */ + replaceSelection(text: string): this { + this.editor.replaceSelection(text); + return this; + } - /** - * Sets multiple selections in the editor. - * @param {EditorSelectionOrCaret[]} ranges - Array of selection ranges or carets. - * @param {number} [main] - Index of the primary selection (optional). - * @returns {this} - The current ChainableEditor instance. - */ - setSelections(ranges: EditorSelectionOrCaret[], main?: number): this { - this.editor.setSelections(ranges, main); - return this; - } + /** + * Sets multiple selections in the editor. + * @param {EditorSelectionOrCaret[]} ranges - Array of selection ranges or carets. + * @param {number} [main] - Index of the primary selection (optional). + * @returns {this} - The current ChainableEditor instance. + */ + setSelections(ranges: EditorSelectionOrCaret[], main?: number): this { + this.editor.setSelections(ranges, main); + return this; + } - /** - * Scrolls the editor view to the specified coordinates. - * @param {number|null} [x] - Horizontal scroll position (optional). - * @param {number|null} [y] - Vertical scroll position (optional). - * @returns {this} - The current ChainableEditor instance. - */ - scrollTo(x?: number | null, y?: number | null): this { - this.editor.scrollTo(x, y); - return this; - } + /** + * Scrolls the editor view to the specified coordinates. + * @param {number|null} [x] - Horizontal scroll position (optional). + * @param {number|null} [y] - Vertical scroll position (optional). + * @returns {this} - The current ChainableEditor instance. + */ + scrollTo(x?: number | null, y?: number | null): this { + this.editor.scrollTo(x, y); + return this; + } - /** - * Scrolls the editor to bring a range into view. - * @param {EditorRange} range - The range to scroll into view. - * @param {boolean} [center=false] - Whether to center the range (optional). - * @returns {this} - The current ChainableEditor instance. - */ - scrollIntoView(range: EditorRange, center?: boolean): this { - this.editor.scrollIntoView(range, center); - return this; - } + /** + * Scrolls the editor to bring a range into view. + * @param {EditorRange} range - The range to scroll into view. + * @param {boolean} [center=false] - Whether to center the range (optional). + * @returns {this} - The current ChainableEditor instance. + */ + scrollIntoView(range: EditorRange, center?: boolean): this { + this.editor.scrollIntoView(range, center); + return this; + } - /** - * Performs an undo operation. - * @returns {this} - The current ChainableEditor instance. - */ - undo(): this { - this.editor.undo(); - return this; - } + /** + * Performs an undo operation. + * @returns {this} - The current ChainableEditor instance. + */ + undo(): this { + this.editor.undo(); + return this; + } - /** - * Performs a redo operation. - * @returns {this} - The current ChainableEditor instance. - */ - redo(): this { - this.editor.redo(); - return this; - } + /** + * Performs a redo operation. + * @returns {this} - The current ChainableEditor instance. + */ + redo(): this { + this.editor.redo(); + return this; + } - /** - * Focuses the editor. - * @returns {this} - The current ChainableEditor instance. - */ - focus(): this { - this.editor.focus(); - return this; - } + /** + * Focuses the editor. + * @returns {this} - The current ChainableEditor instance. + */ + focus(): this { + this.editor.focus(); + return this; + } - /** - * Removes focus from the editor. - * @returns {this} - The current ChainableEditor instance. - */ - blur(): this { - this.editor.blur(); - return this; - } + /** + * Removes focus from the editor. + * @returns {this} - The current ChainableEditor instance. + */ + blur(): this { + this.editor.blur(); + return this; + } - // Read-only methods - no chaining - /** - * Retrieves the current content of the editor. - * @returns {string} - The editor's current value. - */ - getValue(): string { - return this.editor.getValue(); - } + // Read-only methods - no chaining + /** + * Retrieves the current content of the editor. + * @returns {string} - The editor's current value. + */ + getValue(): string { + return this.editor.getValue(); + } - /** - * Retrieves the content of a specific line. - * @param {number} line - Zero-based line number. - * @returns {string} - The content of the specified line. - */ - getLine(line: number): string { - return this.editor.getLine(line); - } + /** + * Retrieves the content of a specific line. + * @param {number} line - Zero-based line number. + * @returns {string} - The content of the specified line. + */ + getLine(line: number): string { + return this.editor.getLine(line); + } - /** - * Gets the currently selected text. - * @returns {string} - The selected text. - */ - getSelection(): string { - return this.editor.getSelection(); - } + /** + * Gets the currently selected text. + * @returns {string} - The selected text. + */ + getSelection(): string { + return this.editor.getSelection(); + } - /** - * Lists all current selections. - * @returns {EditorSelection[]} - Array of selection objects. - */ - listSelections(): EditorSelection[] { - return this.editor.listSelections(); - } + /** + * Lists all current selections. + * @returns {EditorSelection[]} - Array of selection objects. + */ + listSelections(): EditorSelection[] { + return this.editor.listSelections(); + } - /** - * Gets scroll information. - * @returns {{ top: number; left: number }} - Scroll positions. - */ - getScrollInfo(): { top: number; left: number } { - return this.editor.getScrollInfo(); - } + /** + * Gets scroll information. + * @returns {{ top: number; left: number }} - Scroll positions. + */ + getScrollInfo(): { top: number; left: number } { + return this.editor.getScrollInfo(); + } - /** - * Checks if the editor currently has focus. - * @returns {boolean} - True if focused, false otherwise. - */ - hasFocus(): boolean { - return this.editor.hasFocus(); - } + /** + * Checks if the editor currently has focus. + * @returns {boolean} - True if focused, false otherwise. + */ + hasFocus(): boolean { + return this.editor.hasFocus(); + } - /** - * Retrieves the cursor position. - * @param {'from'|'to'|'head'|'anchor'} [position] - Specific position type (optional). - * @returns {EditorPosition} - The cursor position object. - */ - getCursor(position?: "from" | "to" | "head" | "anchor"): EditorPosition { - return this.editor.getCursor(position); - } + /** + * Retrieves the cursor position. + * @param {'from'|'to'|'head'|'anchor'} [position] - Specific position type (optional). + * @returns {EditorPosition} - The cursor position object. + */ + getCursor(position?: "from" | "to" | "head" | "anchor"): EditorPosition { + return this.editor.getCursor(position); + } - /** - * Converts an editor position to an offset. - * @param {EditorPosition} pos - The position to convert. - * @returns {number} - The corresponding offset. - */ - posToOffset(pos: EditorPosition): number { - return this.editor.posToOffset(pos); - } + /** + * Converts an editor position to an offset. + * @param {EditorPosition} pos - The position to convert. + * @returns {number} - The corresponding offset. + */ + posToOffset(pos: EditorPosition): number { + return this.editor.posToOffset(pos); + } - /** - * Converts an offset to an editor position. - * @param {number} offset - The offset to convert. - * @returns {EditorPosition} - The corresponding position object. - */ - offsetToPos(offset: number): EditorPosition { - return this.editor.offsetToPos(offset); - } + /** + * Converts an offset to an editor position. + * @param {number} offset - The offset to convert. + * @returns {EditorPosition} - The corresponding position object. + */ + offsetToPos(offset: number): EditorPosition { + return this.editor.offsetToPos(offset); + } - /** - * Executes a command in the editor. - * @param {EditorCommandName} command - The name of the command to execute. - * @returns {this} - The current ChainableEditor instance. - */ - exec(command: EditorCommandName): this { - this.editor.exec(command); - return this; - } + /** + * Executes a command in the editor. + * @param {EditorCommandName} command - The name of the command to execute. + * @returns {this} - The current ChainableEditor instance. + */ + exec(command: EditorCommandName): this { + this.editor.exec(command); + return this; + } - /** - * Performs a transaction, optionally with an origin description. - * @param {EditorTransaction} tx - The transaction function to run. - * @param {string} [origin] - Optional description of transaction origin. - * @returns {this} - The current ChainableEditor instance. - */ - transaction(tx: EditorTransaction, origin?: string): this { - this.editor.transaction(tx, origin); - return this; - } + /** + * Performs a transaction, optionally with an origin description. + * @param {EditorTransaction} tx - The transaction function to run. + * @param {string} [origin] - Optional description of transaction origin. + * @returns {this} - The current ChainableEditor instance. + */ + transaction(tx: EditorTransaction, origin?: string): this { + this.editor.transaction(tx, origin); + return this; + } - /** - * Exposes the underlying editor instance. - * @returns {Editor} - The original editor object. - */ - getEditor(): Editor { - return this.editor; - } + /** + * Exposes the underlying editor instance. + * @returns {Editor} - The original editor object. + */ + getEditor(): Editor { + return this.editor; + } } diff --git a/src/Chat.ts b/src/Chat.ts index 04dfb83..0fea403 100644 --- a/src/Chat.ts +++ b/src/Chat.ts @@ -3,18 +3,18 @@ import { codelanguage } from "./codelanguages"; import PureChatLLM from "./main"; import { toSentanceCase } from "./toSentanceCase"; import { - ChatMessage, - chatParser, - EmptyApiKey, - PureChatLLMAPI, - PureChatLLMInstructPrompt, - RoleType, + ChatMessage, + chatParser, + EmptyApiKey, + PureChatLLMAPI, + PureChatLLMInstructPrompt, + RoleType, } from "./types"; import { BrowserConsole } from "./MyBrowserConsole"; export interface codeContent { - language: string; - code: string; + language: string; + code: string; } /** @@ -39,365 +39,335 @@ export interface codeContent { * @public */ export class PureChatLLMChat { - options; - messages: ChatMessage[]; - plugin: PureChatLLM; - console: BrowserConsole; - pretext: string = ""; - endpoint: PureChatLLMAPI; - Parser = chatParser[0]; + options; + messages: ChatMessage[]; + plugin: PureChatLLM; + console: BrowserConsole; + pretext: string = ""; + endpoint: PureChatLLMAPI; + Parser = chatParser[0]; - constructor(plugin: PureChatLLM) { - this.plugin = plugin; - this.console = new BrowserConsole( - plugin.settings.debug, - "PureChatLLMChat" - ); - this.endpoint = - this.plugin.settings.endpoints[this.plugin.settings.endpoint]; - this.options = { - model: this.endpoint.defaultmodel, - max_completion_tokens: 4096, - stream: true, - }; - this.Parser = chatParser[this.plugin.settings.chatParser]; - } + constructor(plugin: PureChatLLM) { + this.plugin = plugin; + this.console = new BrowserConsole(plugin.settings.debug, "PureChatLLMChat"); + this.endpoint = this.plugin.settings.endpoints[this.plugin.settings.endpoint]; + this.options = { + model: this.endpoint.defaultmodel, + max_completion_tokens: 4096, + stream: true, + }; + this.Parser = chatParser[this.plugin.settings.chatParser]; + } - /** - * Generates a Markdown-formatted string representation of the chat options and text. - * - * The output includes a JSON representation of the `options` object wrapped in a - * code block, followed by the chat text. - * - * @returns {string} A Markdown-formatted string containing the JSON representation - * of the chat options and the chat text. - */ - get Markdown(): string { - const prechat = PureChatLLMChat.changeCodeBlockMD( - this.pretext, - "json", - JSON.stringify(this.options, null, 2) - ); - return `${prechat}\n${this.ChatText}`; - } + /** + * Generates a Markdown-formatted string representation of the chat options and text. + * + * The output includes a JSON representation of the `options` object wrapped in a + * code block, followed by the chat text. + * + * @returns {string} A Markdown-formatted string containing the JSON representation + * of the chat options and the chat text. + */ + get Markdown(): string { + const prechat = PureChatLLMChat.changeCodeBlockMD( + this.pretext, + "json", + JSON.stringify(this.options, null, 2) + ); + return `${prechat.trim()}\n${this.ChatText}`; + } - /** - * Sets the Markdown content for the chat and processes it into structured messages. - * - * @param markdown - The Markdown string to be parsed. It is expected to contain - * sections prefixed with `# role: system|user|assistant|developer` - * to define the roles and their respective content. - * - * The method performs the following: - * - Splits the Markdown into a prechat section and chat sections based on the role markers. - * - If no role markers are found, initializes the messages with a system prompt and the - * entire prechat content as a user message. - * - Parses each chat section into a message object with a role, content, and editor range. - * - Extracts JSON options from the prechat section if a JSON code block is present. - * - * Notes: - * - The `cline` property in each message represents the range of lines in the editor - * corresponding to the message content. - * - The `options` property is updated if valid JSON is found in the prechat section. - */ - set Markdown(markdown: string) { - let [prechat, ...chat] = markdown.split(this.Parser.SplitMessages); - let lengthtoHere = prechat.split("\n").length; - this.endpoint = - this.plugin.settings.endpoints[this.plugin.settings.endpoint]; - if (chat.length === 0) { - // if the file has no # role: system|user|assistant|developer - this.messages = []; - this.appendMessage({ - role: "system", - content: this.plugin.settings.SystemPrompt, - }); - this.appendMessage({ role: "user", content: prechat }); - return; - } + /** + * Sets the Markdown content for the chat and processes it into structured messages. + * + * @param markdown - The Markdown string to be parsed. It is expected to contain + * sections prefixed with `# role: system|user|assistant|developer` + * to define the roles and their respective content. + * + * The method performs the following: + * - Splits the Markdown into a prechat section and chat sections based on the role markers. + * - If no role markers are found, initializes the messages with a system prompt and the + * entire prechat content as a user message. + * - Parses each chat section into a message object with a role, content, and editor range. + * - Extracts JSON options from the prechat section if a JSON code block is present. + * + * Notes: + * - The `cline` property in each message represents the range of lines in the editor + * corresponding to the message content. + * - The `options` property is updated if valid JSON is found in the prechat section. + */ + set Markdown(markdown: string) { + let [prechat, ...chat] = markdown.split(this.Parser.SplitMessages); + let lengthtoHere = prechat.split("\n").length; + this.endpoint = this.plugin.settings.endpoints[this.plugin.settings.endpoint]; + if (chat.length === 0) { + // if the file has no # role: system|user|assistant|developer + this.messages = []; + this.appendMessage({ + role: "system", + content: this.plugin.settings.SystemPrompt, + }); + this.appendMessage({ role: "user", content: prechat }); + return; + } - this.messages = chat.map((text) => { - const [role, ...contentLines] = text - .replace(this.Parser.getRole, "$1\n") - .split(/\n/); - const cline: EditorRange = { - from: { line: lengthtoHere, ch: 0 }, - to: { line: lengthtoHere + contentLines.length - 1, ch: 0 }, - }; - lengthtoHere += contentLines.length; - return { - role: role.toLowerCase().trim() as RoleType, - content: contentLines.join("\n").trim(), - cline, - }; - }); - this.pretext = prechat; - const optionsStr = - PureChatLLMChat.extractCodeBlockMD(prechat, "json") || ""; - this.options = PureChatLLMChat.tryJSONParse(optionsStr) || this.options; - } + this.messages = chat.map((text) => { + const [role, ...contentLines] = text.replace(this.Parser.getRole, "$1\n").split(/\n/); + const cline: EditorRange = { + from: { line: lengthtoHere, ch: 0 }, + to: { line: lengthtoHere + contentLines.length - 1, ch: 0 }, + }; + lengthtoHere += contentLines.length; + return { + role: role.toLowerCase().trim() as RoleType, + content: contentLines.join("\n").trim(), + cline, + }; + }); + this.pretext = prechat; + const optionsStr = PureChatLLMChat.extractCodeBlockMD(prechat, "json") || ""; + this.options = PureChatLLMChat.tryJSONParse(optionsStr) || this.options; + } - /** - * Sets the markdown content for the current instance. - * - * @param markdown - The markdown string to set. - * @returns The current instance to allow method chaining. - */ - setMarkdown(markdown: string) { - // make this chainable - this.Markdown = markdown; - return this; - } + /** + * Sets the markdown content for the current instance. + * + * @param markdown - The markdown string to set. + * @returns The current instance to allow method chaining. + */ + setMarkdown(markdown: string) { + // make this chainable + this.Markdown = markdown; + return this; + } - /** - * Sets the model to be used and updates the options with the provided model. - * - * @param modal - The name of the model to set. - * @returns The current instance of the class for method chaining. - */ - setModel(modal: string) { - this.options.model = modal; - return this; - } + /** + * Sets the model to be used and updates the options with the provided model. + * + * @param modal - The name of the model to set. + * @returns The current instance of the class for method chaining. + */ + setModel(modal: string) { + this.options.model = modal; + return this; + } - /** - * Determines whether the provided markdown string represents a chat message. - * - * A valid chat message is identified by a header in the format: - * `# role: (system|user|assistant|developer)` (case-insensitive). - * - * @param markdown - The markdown string to evaluate. - * @returns `true` if the markdown matches the chat message format, otherwise `false`. - */ - static isChat(markdown: string): boolean { - return /^# role: (system|user|assistant|developer)/im.test(markdown); - } + /** + * Determines whether the provided markdown string represents a chat message. + * + * A valid chat message is identified by a header in the format: + * `# role: (system|user|assistant|developer)` (case-insensitive). + * + * @param markdown - The markdown string to evaluate. + * @returns `true` if the markdown matches the chat message format, otherwise `false`. + */ + static isChat(markdown: string): boolean { + return /^# role: (system|user|assistant|developer)/im.test(markdown); + } - isChat(): boolean { - return this.messages[0].content !== this.plugin.settings.SystemPrompt; - } + isChat(): boolean { + return this.messages[0].content !== this.plugin.settings.SystemPrompt; + } - /** - * Extracts the content of a code block from a given markdown string based on the specified programming language. - * - * @param markdown - The markdown string containing the code block. - * @param language - The programming language of the code block to extract. - * @returns The content of the code block as a string if found, otherwise `null`. - * - * @example - * ```typescript - * const markdown = ` - * \`\`\`typescript - * const x = 42; - * \`\`\` - * `; - * const code = extractCodeBlockMD(markdown, "typescript"); - * console.log(code); // Outputs: "const x = 42;" - * ``` - */ - static extractCodeBlockMD( - markdown: string, - language: codelanguage - ): string | null { - const regex = new RegExp( - `\`\`\`${language}\\n([\\s\\S]*?)\\n\`\`\``, - "im" - ); - const match = markdown.match(regex); - return match ? match[1] : null; - } + /** + * Extracts the content of a code block from a given markdown string based on the specified programming language. + * + * @param markdown - The markdown string containing the code block. + * @param language - The programming language of the code block to extract. + * @returns The content of the code block as a string if found, otherwise `null`. + * + * @example + * ```typescript + * const markdown = ` + * \`\`\`typescript + * const x = 42; + * \`\`\` + * `; + * const code = extractCodeBlockMD(markdown, "typescript"); + * console.log(code); // Outputs: "const x = 42;" + * ``` + */ + static extractCodeBlockMD(markdown: string, language: codelanguage): string | null { + const regex = new RegExp(`\`\`\`${language}\\n([\\s\\S]*?)\\n\`\`\``, "im"); + const match = markdown.match(regex); + return match ? match[1] : null; + } - /** - * Extracts all code blocks from a given markdown string. - * - * This method scans the provided markdown content and identifies all code blocks - * enclosed within triple backticks (```), optionally capturing the language identifier - * and the code content. It returns an array of objects, each containing the language - * and the code snippet. - * - * @param markdown - The markdown string to extract code blocks from. - * @returns An array of objects, where each object contains: - * - `language`: The programming language of the code block (default is "plaintext"). - * - `code`: The extracted code content, trimmed of leading and trailing whitespace. - * - * @example - * ```typescript - * const markdown = ` - * Here is some code: - * \`\`\`javascript - * console.log("Hello, world!"); - * \`\`\` - * `; - * const codeBlocks = extractAllCodeBlocks(markdown); - * console.log(codeBlocks); - * // Output: [{ language: "javascript", code: 'console.log("Hello, world!");' }] - * ``` - */ - static extractAllCodeBlocks(markdown: string): codeContent[] { - const regex = /^```(\w*)\n([\s\S]*?)\n```/gm; - const matches: { language: codelanguage; code: string }[] = []; - let match; - while ((match = regex.exec(markdown)) !== null) { - const [, language, code] = match; - const lang = - ((language || "plaintext").trim() as codelanguage) || - "plaintext"; - matches.push({ - language: lang, - code: code.trim(), - }); - } - return matches; - } + /** + * Extracts all code blocks from a given markdown string. + * + * This method scans the provided markdown content and identifies all code blocks + * enclosed within triple backticks (```), optionally capturing the language identifier + * and the code content. It returns an array of objects, each containing the language + * and the code snippet. + * + * @param markdown - The markdown string to extract code blocks from. + * @returns An array of objects, where each object contains: + * - `language`: The programming language of the code block (default is "plaintext"). + * - `code`: The extracted code content, trimmed of leading and trailing whitespace. + * + * @example + * ```typescript + * const markdown = ` + * Here is some code: + * \`\`\`javascript + * console.log("Hello, world!"); + * \`\`\` + * `; + * const codeBlocks = extractAllCodeBlocks(markdown); + * console.log(codeBlocks); + * // Output: [{ language: "javascript", code: 'console.log("Hello, world!");' }] + * ``` + */ + static extractAllCodeBlocks(markdown: string): codeContent[] { + const regex = /^```(\w*)\n([\s\S]*?)\n```/gm; + const matches: { language: codelanguage; code: string }[] = []; + let match; + while ((match = regex.exec(markdown)) !== null) { + const [, language, code] = match; + const lang = ((language || "plaintext").trim() as codelanguage) || "plaintext"; + matches.push({ + language: lang, + code: code.trim(), + }); + } + return matches; + } - /** - * Replaces the content of a code block in a markdown string with new text. - * - * @param text - The original markdown string containing the code block. - * @param language - The programming language of the code block to replace. - * @param newText - The new text to insert into the code block. - * @returns The modified markdown string with the updated code block content. - * - * @example - * ```typescript - * const markdown = ` - * \`\`\`javascript - * console.log("Hello, world!"); - * \`\`\` - * `; - * const updatedMarkdown = changeCodeBlockMD(markdown, "javascript", "console.log('New code');"); - * console.log(updatedMarkdown); - * // Output: "\`\`\`javascript\nconsole.log('New code');\n\`\`\`" - * ``` - */ - static changeCodeBlockMD(text: string, language: string, newText: string) { - const regex = new RegExp( - `\`\`\`${language}\\n([\\s\\S]*?)\\n\`\`\``, - "im" - ); - return ( - text.replace(regex, `\`\`\`${language}\n${newText}\n\`\`\``) || - `${text}\n\`\`\`${language}\n${newText}\n\`\`\`` - ); - } + /** + * Replaces the content of a code block in a markdown string with new text. + * + * @param text - The original markdown string containing the code block. + * @param language - The programming language of the code block to replace. + * @param newText - The new text to insert into the code block. + * @returns The modified markdown string with the updated code block content. + * + * @example + * ```typescript + * const markdown = ` + * \`\`\`javascript + * console.log("Hello, world!"); + * \`\`\` + * `; + * const updatedMarkdown = changeCodeBlockMD(markdown, "javascript", "console.log('New code');"); + * console.log(updatedMarkdown); + * // Output: "\`\`\`javascript\nconsole.log('New code');\n\`\`\`" + * ``` + */ + static changeCodeBlockMD(text: string, language: string, newText: string) { + const regex = new RegExp(`\`\`\`${language}\\n([\\s\\S]*?)\\n\`\`\``, "im"); + return ( + text.replace(regex, `\`\`\`${language}\n${newText}\n\`\`\``) || + `${text}\n\`\`\`${language}\n${newText}\n\`\`\`` + ); + } - /** - * Appends a new message to the list of messages. - * - * @param message - An object containing the role and content of the message. - * - `role`: The role of the message sender (e.g., "user", "assistant"). - * - `content`: The textual content of the message. - * - * The appended message will also include a default `cline` property - * with `from` and `to` positions initialized to `{ line: 0, ch: 0 }`. - */ - appendMessage(message: { role: string; content: string }) { - this.messages.push({ - role: message.role as RoleType, - content: message.content, - cline: { - from: { line: 0, ch: 0 }, - to: { line: 0, ch: 0 }, - }, - }); - } + /** + * Appends a new message to the list of messages. + * + * @param message - An object containing the role and content of the message. + * - `role`: The role of the message sender (e.g., "user", "assistant"). + * - `content`: The textual content of the message. + * + * The appended message will also include a default `cline` property + * with `from` and `to` positions initialized to `{ line: 0, ch: 0 }`. + */ + appendMessage(message: { role: string; content: string }) { + this.messages.push({ + role: message.role as RoleType, + content: message.content, + cline: { + from: { line: 0, ch: 0 }, + to: { line: 0, ch: 0 }, + }, + }); + } - /** - * Resolves file links in a given markdown string by replacing them with the content - * of the referenced files. If a file cannot be resolved, the original link is retained. - * - * @param markdown - The markdown string containing file links to resolve. - * @param activeFile - The currently active file, used as a reference for resolving relative links. - * @param app - The Obsidian application instance, providing access to the vault and metadata cache. - * @returns A promise that resolves to the markdown string with file links replaced by their content. - * - * @remarks - * - File links are expected to be in the format `[[filename]]` or `![[filename]]`. - * - If a file cannot be found, the original link will remain in the output. - * - This function uses asynchronous operations to read file contents, so it returns a promise. - */ - static async resolveFiles( - markdown: string, - activeFile: TFile, - app: App - ): Promise { - const regex = /^\!?\[\[(.*?)\]\]$/gim; - const matches = Array.from(markdown.matchAll(regex)); - const replacements: Promise[] = []; + /** + * Resolves file links in a given markdown string by replacing them with the content + * of the referenced files. If a file cannot be resolved, the original link is retained. + * + * @param markdown - The markdown string containing file links to resolve. + * @param activeFile - The currently active file, used as a reference for resolving relative links. + * @param app - The Obsidian application instance, providing access to the vault and metadata cache. + * @returns A promise that resolves to the markdown string with file links replaced by their content. + * + * @remarks + * - File links are expected to be in the format `[[filename]]` or `![[filename]]`. + * - If a file cannot be found, the original link will remain in the output. + * - This function uses asynchronous operations to read file contents, so it returns a promise. + */ + static async resolveFiles(markdown: string, activeFile: TFile, app: App): Promise { + const regex = /^\!?\[\[(.*?)\]\]$/gim; + const matches = Array.from(markdown.matchAll(regex)); + const replacements: Promise[] = []; - for (const match of matches) { - const filename = match[1]; - const file = app.metadataCache.getFirstLinkpathDest( - filename, - activeFile.path - ); - if (file instanceof TFile) { - replacements.push(app.vault.read(file)); - } else { - replacements.push(Promise.resolve(match[0])); - } - } + for (const match of matches) { + const filename = match[1]; + const file = app.metadataCache.getFirstLinkpathDest(filename, activeFile.path); + if (file instanceof TFile) { + replacements.push(app.vault.read(file)); + } else { + replacements.push(Promise.resolve(match[0])); + } + } - if (replacements.length === 0) return markdown; + if (replacements.length === 0) return markdown; - const resolved = await Promise.all(replacements); - let index = 0; - const result = markdown.replace(regex, () => resolved[index++] || ""); - return result; - } + const resolved = await Promise.all(replacements); + let index = 0; + const result = markdown.replace(regex, () => resolved[index++] || ""); + return result; + } - // Instance method: get chat instructions with resolved files + // Instance method: get chat instructions with resolved files - /** - * Asynchronously generates a structured set of instructions for ChatGPT by resolving file references - * within the provided messages and returning the complete object to be sent to the API. - * - * @param activeFile - The currently active file in the application, used for resolving file references. - * @param app - The application instance, providing access to necessary utilities and context. - * @returns A promise that resolves to an object containing the resolved messages with their roles and content. - */ - async getChatGPTinstructions( - activeFile: TFile, - app: App - ): Promise<{ messages: { role: RoleType; content: string }[] }> { - const resolvedMessages = await Promise.all( - this.messages.map(async ({ role, content }) => ({ - role: role, - content: await PureChatLLMChat.resolveFiles( - content, - activeFile, - app - ), - })) - ); + /** + * Asynchronously generates a structured set of instructions for ChatGPT by resolving file references + * within the provided messages and returning the complete object to be sent to the API. + * + * @param activeFile - The currently active file in the application, used for resolving file references. + * @param app - The application instance, providing access to necessary utilities and context. + * @returns A promise that resolves to an object containing the resolved messages with their roles and content. + */ + async getChatGPTinstructions( + activeFile: TFile, + app: App + ): Promise<{ messages: { role: RoleType; content: string }[] }> { + const resolvedMessages = await Promise.all( + this.messages.map(async ({ role, content }) => ({ + role: role, + content: await PureChatLLMChat.resolveFiles(content, activeFile, app), + })) + ); - // return the whole object sent to the API + // return the whole object sent to the API - return { - ...this.options, - messages: resolvedMessages, - }; - } + return { + ...this.options, + messages: resolvedMessages, + }; + } - /** - * Processes a chat conversation using a specified template prompt. - * - * This method constructs a system prompt instructing the chat model to: - * 1. Extract the chat content enclosed within `` tags. - * 2. Follow a command or instruction provided after the conversation. - * 3. Return the processed chat in markdown format, omitting any tags or instructions. - * - * The method then sends a chat request to the model with the constructed prompts and user input. - * - * @param templatePrompt - The template prompt containing the instruction and template name to guide the chat processing. - * @returns A Promise resolving to the processed chat response from the model. - */ - ProcessChatWithTemplate(templatePrompt: PureChatLLMInstructPrompt) { - if (this.endpoint.apiKey === EmptyApiKey) { - this.plugin.askForApiKey(); - return Promise.resolve({ role: "assistant", content: EmptyApiKey }); - } - const systemprompt = `You are a markdown chat processor. + /** + * Processes a chat conversation using a specified template prompt. + * + * This method constructs a system prompt instructing the chat model to: + * 1. Extract the chat content enclosed within `` tags. + * 2. Follow a command or instruction provided after the conversation. + * 3. Return the processed chat in markdown format, omitting any tags or instructions. + * + * The method then sends a chat request to the model with the constructed prompts and user input. + * + * @param templatePrompt - The template prompt containing the instruction and template name to guide the chat processing. + * @returns A Promise resolving to the processed chat response from the model. + */ + ProcessChatWithTemplate(templatePrompt: PureChatLLMInstructPrompt) { + if (this.endpoint.apiKey === EmptyApiKey) { + this.plugin.askForApiKey(); + return Promise.resolve({ role: "assistant", content: EmptyApiKey }); + } + const systemprompt = `You are a markdown chat processor. You will receive: - A chat conversation enclosed within and tags. @@ -409,48 +379,45 @@ Your task: 3. Return only the final processed chat in markdown format, without any tags or instructions. Use this workflow to accurately handle the chat based on the instruction.`; - //const systemprompt = `You are a ${templatePrompt.name}.`; - new Notice("Generating chat response from template..."); - return this.sendChatRequest({ - model: this.endpoint.defaultmodel, - messages: [ - { role: "system", content: systemprompt }, - { - role: "user", - content: `\n${this.ChatText}\n\n`, - }, - { role: "user", content: templatePrompt.template }, - ], - max_completion_tokens: 4096, - }); - } + //const systemprompt = `You are a ${templatePrompt.name}.`; + new Notice("Generating chat response from template..."); + return this.sendChatRequest({ + model: this.endpoint.defaultmodel, + messages: [ + { role: "system", content: systemprompt }, + { + role: "user", + content: `\n${this.ChatText}\n\n`, + }, + { role: "user", content: templatePrompt.template }, + ], + max_completion_tokens: 4096, + }); + } - /** - * Processes a selected piece of markdown text using a specified instruction prompt. - * - * This method constructs a system prompt to guide a markdown content processor, - * then sends a chat request to an LLM model with the selected markdown and the - * provided instruction. The LLM is expected to extract the markdown within - * tags, apply the instruction, and return only the processed markdown. - * - * @param templatePrompt - The instruction prompt containing the name and template for processing. - * @param selectedText - The markdown text selected by the user to be processed. - * @returns A Promise resolving to the LLM's response containing the processed markdown, - * or an empty response if no text is selected. - */ - SelectionResponse( - templatePrompt: PureChatLLMInstructPrompt, - selectedText: string - ) { - if (this.endpoint.apiKey === EmptyApiKey) { - this.plugin.askForApiKey(); - return Promise.resolve({ - role: "assistant", - content: selectedText, - }); - } - //const endpoint = this.plugin.settings.endpoints[this.plugin.settings.endpoint]; - const systemprompt = `You are a markdown content processor. + /** + * Processes a selected piece of markdown text using a specified instruction prompt. + * + * This method constructs a system prompt to guide a markdown content processor, + * then sends a chat request to an LLM model with the selected markdown and the + * provided instruction. The LLM is expected to extract the markdown within + * tags, apply the instruction, and return only the processed markdown. + * + * @param templatePrompt - The instruction prompt containing the name and template for processing. + * @param selectedText - The markdown text selected by the user to be processed. + * @returns A Promise resolving to the LLM's response containing the processed markdown, + * or an empty response if no text is selected. + */ + SelectionResponse(templatePrompt: PureChatLLMInstructPrompt, selectedText: string) { + if (this.endpoint.apiKey === EmptyApiKey) { + this.plugin.askForApiKey(); + return Promise.resolve({ + role: "assistant", + content: selectedText, + }); + } + //const endpoint = this.plugin.settings.endpoints[this.plugin.settings.endpoint]; + const systemprompt = `You are a markdown content processor. You will receive: - A selected piece of markdown text inside and tags. @@ -462,233 +429,222 @@ Your job: 3. Return only the processed markdown content, without tags or instructions. Use this workflow to help modify markdown content accurately.`; - //const systemprompt = `You are a ${templatePrompt.name}.`; - if (selectedText.length > 0) { - new Notice("Generating response for selection..."); - return this.sendChatRequest({ - model: this.endpoint.defaultmodel, - messages: [ - { role: "system", content: systemprompt }, - { - role: "user", - content: `\n${selectedText}\n\n`, - }, - { role: "user", content: templatePrompt.template }, - ], - max_completion_tokens: 4096, - }); - } - return Promise.resolve({ role: "assistant", content: "" }); - } + //const systemprompt = `You are a ${templatePrompt.name}.`; + if (selectedText.length > 0) { + new Notice("Generating response for selection..."); + return this.sendChatRequest({ + model: this.endpoint.defaultmodel, + messages: [ + { role: "system", content: systemprompt }, + { + role: "user", + content: `\n${selectedText}\n\n`, + }, + { role: "user", content: templatePrompt.template }, + ], + max_completion_tokens: 4096, + }); + } + return Promise.resolve({ role: "assistant", content: "" }); + } - /** - * Handles the process of completing a chat response by interacting with ChatGPT. - * - * @param file - The file object of type `TFile` that contains the context or data for the chat. - * @param streamcallback - An optional callback function that processes text fragments as they are streamed. - * The callback should return a boolean indicating whether to continue streaming. - * @returns A promise that resolves to the current instance (`this`) after processing the chat response. - * - * The method performs the following steps: - * 1. Retrieves chat instructions using `getChatGPTinstructions`. - * 2. Sends a chat request using `sendChatRequest` with the retrieved options and optional streaming callback. - * 3. Appends the received content as a message and adds an empty user message for continuity. - * 4. Handles any errors by logging them to the plugin's console. - */ - CompleteChatResponse( - file: TFile, - streamcallback?: (textFragment: any) => boolean - ): Promise { - if (this.endpoint.apiKey === EmptyApiKey) { - return Promise.resolve(this); - } - return this.getChatGPTinstructions(file, this.plugin.app) - .then((options) => this.sendChatRequest(options, streamcallback)) - .then((content) => { - this.appendMessage(content); - this.appendMessage({ role: "user", content: "" }); - return this; - }) - .catch((error) => { - this.plugin.console.error(`Error in chat completion:`, error); - return this; - }); - } + /** + * Handles the process of completing a chat response by interacting with ChatGPT. + * + * @param file - The file object of type `TFile` that contains the context or data for the chat. + * @param streamcallback - An optional callback function that processes text fragments as they are streamed. + * The callback should return a boolean indicating whether to continue streaming. + * @returns A promise that resolves to the current instance (`this`) after processing the chat response. + * + * The method performs the following steps: + * 1. Retrieves chat instructions using `getChatGPTinstructions`. + * 2. Sends a chat request using `sendChatRequest` with the retrieved options and optional streaming callback. + * 3. Appends the received content as a message and adds an empty user message for continuity. + * 4. Handles any errors by logging them to the plugin's console. + */ + CompleteChatResponse( + file: TFile, + streamcallback?: (textFragment: any) => boolean + ): Promise { + if (this.endpoint.apiKey === EmptyApiKey) { + return Promise.resolve(this); + } + return this.getChatGPTinstructions(file, this.plugin.app) + .then((options) => this.sendChatRequest(options, streamcallback)) + .then((content) => { + this.appendMessage(content); + this.appendMessage({ role: "user", content: "" }); + return this; + }) + .catch((error) => { + this.plugin.console.error(`Error in chat completion:`, error); + return this; + }); + } - /** - * Handles streaming responses from a fetch Response object. - * Calls the provided callback with each parsed data fragment. - * Returns the concatenated content as a string. - */ - static async handleStreamingResponse( - response: Response, - streamcallback: (textFragment: any) => boolean - ): Promise { - if (!response.body) { - throw new Error( - "Response body is null. Streaming is not supported in this environment." - ); - } - const reader = response.body.getReader(); - const decoder = new TextDecoder("utf-8"); - let done = false; - let buffer = ""; - let fullText = ""; + /** + * Handles streaming responses from a fetch Response object. + * Calls the provided callback with each parsed data fragment. + * Returns the concatenated content as a string. + */ + static async handleStreamingResponse( + response: Response, + streamcallback: (textFragment: any) => boolean + ): Promise { + if (!response.body) { + throw new Error("Response body is null. Streaming is not supported in this environment."); + } + const reader = response.body.getReader(); + const decoder = new TextDecoder("utf-8"); + let done = false; + let buffer = ""; + let fullText = ""; - while (!done) { - const { value, done: streamDone } = await reader.read(); - if (streamDone) break; - buffer += decoder.decode(value, { stream: true }); + while (!done) { + const { value, done: streamDone } = await reader.read(); + if (streamDone) break; + buffer += decoder.decode(value, { stream: true }); - let lines = buffer.split("\n"); - buffer = lines.pop() || ""; + let lines = buffer.split("\n"); + buffer = lines.pop() || ""; - for (const line of lines) { - const trimmedLine = line.trim(); - if (trimmedLine.startsWith("data: ")) { - const dataStr = trimmedLine.replace(/^data:\s*/, ""); - if (dataStr === "[DONE]") { - done = true; - break; - } - try { - const data = JSON.parse(dataStr); - const delta = data.choices?.[0]?.delta; - if (delta?.content) { - fullText += delta.content; - const continueProcessing = streamcallback(delta); - if (!continueProcessing) { - done = true; - break; - } - } - } catch (err) { - // Optionally handle parse errors - } - } - } - } - return fullText; - } + for (const line of lines) { + const trimmedLine = line.trim(); + if (trimmedLine.startsWith("data: ")) { + const dataStr = trimmedLine.replace(/^data:\s*/, ""); + if (dataStr === "[DONE]") { + done = true; + break; + } + try { + const data = JSON.parse(dataStr); + const delta = data.choices?.[0]?.delta; + if (delta?.content) { + fullText += delta.content; + const continueProcessing = streamcallback(delta); + if (!continueProcessing) { + done = true; + break; + } + } + } catch (err) { + // Optionally handle parse errors + } + } + } + } + return fullText; + } - /** - * Sends a chat request to the specified endpoint with the provided options. - * - * @param options - The options for the chat request, including any parameters - * required by the API. If `stream` is enabled, the `streamcallback` must also - * be provided. - * @param streamcallback - An optional callback function that processes text - * fragments when streaming is enabled. The callback should return `true` to - * continue streaming or `false` to stop. - * @returns A promise that resolves to the chat response. If streaming is enabled, - * the response contains the full concatenated text from the stream. Otherwise, - * it returns the first message choice from the API response. - * @throws An error if the network request fails or the response is not successful. - */ - async sendChatRequest( - options: any, - streamcallback?: (textFragment: any) => boolean - ) { - this.console.log("Sending chat request with options:", options); - this.console.log("Using API key:", this.endpoint.apiKey); - const response = await fetch(this.endpoint.endpoint, { - method: "POST", - headers: { - Authorization: `Bearer ${this.endpoint.apiKey}`, - "Content-Type": "application/json", - }, - body: JSON.stringify({ - ...options, - stream: options.stream && !!streamcallback, - }), - }); + /** + * Sends a chat request to the specified endpoint with the provided options. + * + * @param options - The options for the chat request, including any parameters + * required by the API. If `stream` is enabled, the `streamcallback` must also + * be provided. + * @param streamcallback - An optional callback function that processes text + * fragments when streaming is enabled. The callback should return `true` to + * continue streaming or `false` to stop. + * @returns A promise that resolves to the chat response. If streaming is enabled, + * the response contains the full concatenated text from the stream. Otherwise, + * it returns the first message choice from the API response. + * @throws An error if the network request fails or the response is not successful. + */ + async sendChatRequest(options: any, streamcallback?: (textFragment: any) => boolean) { + this.console.log("Sending chat request with options:", options); + this.console.log("Using API key:", this.endpoint.apiKey); + const response = await fetch(this.endpoint.endpoint, { + method: "POST", + headers: { + Authorization: `Bearer ${this.endpoint.apiKey}`, + "Content-Type": "application/json", + }, + body: JSON.stringify({ + ...options, + stream: options.stream && !!streamcallback, + }), + }); - if (!response.ok) { - this.console.error(`Network error: ${response.statusText}`); - throw new Error(`Network error: ${response.statusText}`); - } + if (!response.ok) { + this.console.error(`Network error: ${response.statusText}`); + throw new Error(`Network error: ${response.statusText}`); + } - if (options.stream && !!streamcallback) { - const fullText = await PureChatLLMChat.handleStreamingResponse( - response, - streamcallback - ); - return { role: "assistant", content: fullText }; - } else { - const data = await response.json(); - return data.choices[0].message; - } - } + if (options.stream && !!streamcallback) { + const fullText = await PureChatLLMChat.handleStreamingResponse(response, streamcallback); + return { role: "assistant", content: fullText }; + } else { + const data = await response.json(); + return data.choices[0].message; + } + } - /** - * Retrieves a list of all available models from the configured API endpoint. - * If the model list is already cached, it returns the cached list. - * Otherwise, it fetches the model list from the API, sorts it alphabetically, - * and returns the result. - * - * @returns {Promise} A promise that resolves to an array of model IDs. - * - * @remarks - * - Displays a notice and logs a message when fetching models from the API. - * - Requires a valid API key to be set in the plugin's settings. - * - * @throws {Error} If the API request fails or the response is invalid. - */ - getAllModels(): Promise { - const endpoint = - this.plugin.settings.endpoints[this.plugin.settings.endpoint]; - if (this.plugin.modellist.length > 0) { - return Promise.resolve(this.plugin.modellist); - } - new Notice(`Fetching models from ${endpoint.name} API...`); - this.console.log(`Fetching models from ${endpoint.name} API...`); - return fetch(endpoint.listmodels, { - method: "GET", - headers: { - Authorization: `Bearer ${endpoint.apiKey}`, - "Content-Type": "application/json", - }, - }) - .then((response) => response.json()) - .then((data) => - data.data - .map(({ id }: any) => id) - .sort((a: string, b: string) => a.localeCompare(b)) - ); - } + /** + * Retrieves a list of all available models from the configured API endpoint. + * If the model list is already cached, it returns the cached list. + * Otherwise, it fetches the model list from the API, sorts it alphabetically, + * and returns the result. + * + * @returns {Promise} A promise that resolves to an array of model IDs. + * + * @remarks + * - Displays a notice and logs a message when fetching models from the API. + * - Requires a valid API key to be set in the plugin's settings. + * + * @throws {Error} If the API request fails or the response is invalid. + */ + getAllModels(): Promise { + const endpoint = this.plugin.settings.endpoints[this.plugin.settings.endpoint]; + if (this.plugin.modellist.length > 0) { + return Promise.resolve(this.plugin.modellist); + } + new Notice(`Fetching models from ${endpoint.name} API...`); + this.console.log(`Fetching models from ${endpoint.name} API...`); + return fetch(endpoint.listmodels, { + method: "GET", + headers: { + Authorization: `Bearer ${endpoint.apiKey}`, + "Content-Type": "application/json", + }, + }) + .then((response) => response.json()) + .then((data) => + data.data.map(({ id }: any) => id).sort((a: string, b: string) => a.localeCompare(b)) + ); + } - // Instance method: convert chat back to markdown - /** - * Constructs a formatted string representation of all chat messages. - * Each message is prefixed with its role in title case and followed by its content. - * Messages are concatenated into a single string, separated by newlines. - * - * @returns {string} A formatted string containing all chat messages. - */ - get ChatText(): string { - return this.messages - .map( - (msg) => - `${this.Parser.rolePlacement.replace( - /{role}/g, - toSentanceCase(msg.role) - )}\n${msg.content}\n` - ) - .join(""); - } + // Instance method: convert chat back to markdown + /** + * Constructs a formatted string representation of all chat messages. + * Each message is prefixed with its role in title case and followed by its content. + * Messages are concatenated into a single string, separated by newlines. + * + * @returns {string} A formatted string containing all chat messages. + */ + get ChatText(): string { + return this.messages + .map( + (msg) => + `${this.Parser.rolePlacement.replace( + /{role}/g, + toSentanceCase(msg.role) + )}\n${msg.content.trim()}\n` + ) + .join(""); + } - /** - * Attempts to parse a JSON string and return the resulting object. - * If the parsing fails due to invalid JSON, it returns `null`. - * - * @param str - The JSON string to parse. - * @returns The parsed object if successful, or `null` if parsing fails. - */ - static tryJSONParse(str: string): any { - try { - return JSON.parse(str); - } catch (e) { - return null; - } - } + /** + * Attempts to parse a JSON string and return the resulting object. + * If the parsing fails due to invalid JSON, it returns `null`. + * + * @param str - The JSON string to parse. + * @returns The parsed object if successful, or `null` if parsing fails. + */ + static tryJSONParse(str: string): any { + try { + return JSON.parse(str); + } catch (e) { + return null; + } + } } diff --git a/src/MyBrowserConsole.ts b/src/MyBrowserConsole.ts index f6befdd..a9a444e 100644 --- a/src/MyBrowserConsole.ts +++ b/src/MyBrowserConsole.ts @@ -14,58 +14,58 @@ * ``` */ export class BrowserConsole { - private originalConsole: Console = console; - enabled: boolean; - consoleName: string; + private originalConsole: Console = console; + enabled: boolean; + consoleName: string; - /** - * Creates an instance of the class with the specified console state and name. - * - * @param enable - Determines whether the console is enabled. - * @param consoleName - The name to assign to the console instance. - */ - constructor(enable: boolean, consoleName: string) { - this.enabled = enable; - this.consoleName = consoleName; - } + /** + * Creates an instance of the class with the specified console state and name. + * + * @param enable - Determines whether the console is enabled. + * @param consoleName - The name to assign to the console instance. + */ + constructor(enable: boolean, consoleName: string) { + this.enabled = enable; + this.consoleName = consoleName; + } - /** - * Logs messages to the browser console if logging is enabled. - * Prepends the console name to the log output. - * - * @param {...any[]} args - The items to log to the console. - */ - log(...args: any[]): void { - if (this.enabled) this.originalConsole.log(this.consoleName, ...args); - } + /** + * Logs messages to the browser console if logging is enabled. + * Prepends the console name to the log output. + * + * @param {...any[]} args - The items to log to the console. + */ + log(...args: any[]): void { + if (this.enabled) this.originalConsole.log(this.consoleName, ...args); + } - /** - * Logs informational messages to the console if logging is enabled. - * Prepends the console name to the output. - * - * @param {...any[]} args - The messages or objects to log. - */ - info(...args: any[]): void { - if (this.enabled) this.originalConsole.info(this.consoleName, ...args); - } + /** + * Logs informational messages to the console if logging is enabled. + * Prepends the console name to the output. + * + * @param {...any[]} args - The messages or objects to log. + */ + info(...args: any[]): void { + if (this.enabled) this.originalConsole.info(this.consoleName, ...args); + } - /** - * Logs a warning message to the console with the specified console name prefix, - * if logging is enabled. Accepts any number of arguments to be logged. - * - * @param args - The items to log as a warning message. - */ - warn(...args: any[]): void { - if (this.enabled) this.originalConsole.warn(this.consoleName, ...args); - } + /** + * Logs a warning message to the console with the specified console name prefix, + * if logging is enabled. Accepts any number of arguments to be logged. + * + * @param args - The items to log as a warning message. + */ + warn(...args: any[]): void { + if (this.enabled) this.originalConsole.warn(this.consoleName, ...args); + } - /** - * Logs error messages to the console with the specified console name prefix, - * if logging is enabled. Accepts any number of arguments to be logged. - * - * @param args - The error messages or objects to log. - */ - error(...args: any[]): void { - if (this.enabled) this.originalConsole.error(this.consoleName, ...args); - } + /** + * Logs error messages to the console with the specified console name prefix, + * if logging is enabled. Accepts any number of arguments to be logged. + * + * @param args - The error messages or objects to log. + */ + error(...args: any[]): void { + if (this.enabled) this.originalConsole.error(this.consoleName, ...args); + } } diff --git a/src/SideView.ts b/src/SideView.ts index 454e535..0d3bab6 100644 --- a/src/SideView.ts +++ b/src/SideView.ts @@ -1,16 +1,16 @@ import { - ItemView, - WorkspaceLeaf, - Editor, - MarkdownView, - setIcon, - MarkdownRenderer, - EditorRange, - Notice, - ButtonComponent, - Platform, - Menu, - DropdownComponent, + ItemView, + WorkspaceLeaf, + Editor, + MarkdownView, + setIcon, + MarkdownRenderer, + EditorRange, + Notice, + ButtonComponent, + Platform, + Menu, + DropdownComponent, } from "obsidian"; import { PureChatLLMChat } from "./Chat"; import PureChatLLM, { AskForAPI, CodeHandling, SectionHandling } from "./main"; @@ -41,270 +41,223 @@ import { BrowserConsole } from "./MyBrowserConsole"; * @see Editor */ export class PureChatLLMSideView extends ItemView { - plugin: PureChatLLM; - console: BrowserConsole; - viewText: string; + plugin: PureChatLLM; + console: BrowserConsole; + viewText: string; - constructor(leaf: WorkspaceLeaf, plugin: PureChatLLM) { - super(leaf); - this.icon = "text"; - this.plugin = plugin; - this.console = new BrowserConsole( - plugin.settings.debug, - "PureChatLLMSideView" - ); - this.viewText = "Conversation Overview"; - } + constructor(leaf: WorkspaceLeaf, plugin: PureChatLLM) { + super(leaf); + this.icon = "text"; + this.plugin = plugin; + this.console = new BrowserConsole(plugin.settings.debug, "PureChatLLMSideView"); + this.viewText = "Conversation Overview"; + } - getViewType() { - return PURE_CHAT_LLM_VIEW_TYPE; - } + getViewType() { + return PURE_CHAT_LLM_VIEW_TYPE; + } - getDisplayText() { - return this.viewText; - } + getDisplayText() { + return this.viewText; + } - async onOpen() { - // when a file is loaded or changed, update the view + async onOpen() { + // when a file is loaded or changed, update the view - this.registerEvent( - this.app.workspace.on( - "editor-change", - (editor: Editor, view: MarkdownView) => { - // if the user is typing in the editor, update the view - if (!this.plugin.isresponding) this.update(editor, view); - } - ) - ); - this.registerEvent( - this.app.workspace.on("file-open", () => { - const view = - this.app.workspace.getActiveViewOfType(MarkdownView); - const editor = view?.editor; - if (!editor) return; - if (!view) return; - this.update(editor, view); - }) - ); - this.registerEvent( - this.app.workspace.on("active-leaf-change", (leaf) => { - if (!leaf) return; - const v = leaf.view; - if (!(v instanceof MarkdownView)) return; - const e = v.editor; - this.update(e, v); - }) - ); - // check it the editor is open - const view = this.app.workspace.getActiveViewOfType(MarkdownView); - if (view) { - const editor = view.editor; - if (editor) { - this.update(editor, view); - } - } - } + this.registerEvent( + this.app.workspace.on("editor-change", (editor: Editor, view: MarkdownView) => { + // if the user is typing in the editor, update the view + if (!this.plugin.isresponding) this.update(editor, view); + }) + ); + this.registerEvent( + this.app.workspace.on("file-open", () => { + const view = this.app.workspace.getActiveViewOfType(MarkdownView); + const editor = view?.editor; + if (!editor) return; + if (!view) return; + this.update(editor, view); + }) + ); + this.registerEvent( + this.app.workspace.on("active-leaf-change", (leaf) => { + if (!leaf) return; + const v = leaf.view; + if (!(v instanceof MarkdownView)) return; + const e = v.editor; + this.update(e, v); + }) + ); + // check it the editor is open + const view = this.app.workspace.getActiveViewOfType(MarkdownView); + if (view) { + const editor = view.editor; + if (editor) { + this.update(editor, view); + } + } + } - menumodels(e: MouseEvent, editor: Editor) { - //if (!this.plugin.isresponding) return; - const endpoint = - this.plugin.settings.endpoints[this.plugin.settings.endpoint]; - if (endpoint.apiKey === EmptyApiKey) { - new AskForAPI(this.app, this.plugin).open(); - return; - } - new PureChatLLMChat(this.plugin).getAllModels().then((models) => { - const m = new Menu(); - this.plugin.modellist = models; - models.forEach((model) => { - m.addItem((item) => { - item.setTitle(model); - item.onClick(() => { - editor.setValue( - new PureChatLLMChat(this.plugin) - .setMarkdown(editor.getValue()) - .setModel(model).Markdown - ); - // this.plugin.saveSettings(); - new Notice("Model changed to " + model); - }); - }); - }); - m.showAtMouseEvent(e); - }); - } + menumodels(e: MouseEvent, editor: Editor) { + //if (!this.plugin.isresponding) return; + const endpoint = this.plugin.settings.endpoints[this.plugin.settings.endpoint]; + if (endpoint.apiKey === EmptyApiKey) { + new AskForAPI(this.app, this.plugin).open(); + return; + } + new PureChatLLMChat(this.plugin).getAllModels().then((models) => { + const m = new Menu(); + this.plugin.modellist = models; + models.forEach((model) => { + m.addItem((item) => { + item.setTitle(model); + item.onClick(() => { + editor.setValue( + new PureChatLLMChat(this.plugin).setMarkdown(editor.getValue()).setModel(model) + .Markdown + ); + // this.plugin.saveSettings(); + new Notice("Model changed to " + model); + }); + }); + }); + m.showAtMouseEvent(e); + }); + } - update(editor: Editor, view: MarkdownView) { - const editorValue = editor.getValue(); - const chat = new PureChatLLMChat(this.plugin); - chat.Markdown = editorValue; - const container = this.contentEl; - container.empty(); - container.createDiv({ text: "" }, (contain) => { - contain.addClass("PURE", "floattop"); - new ButtonComponent(contain) - //.setIcon("box") - .setButtonText("Models") - .setTooltip("Change model") - .onClick((e) => { - this.menumodels(e, editor); - }); - new DropdownComponent(contain) - .addOptions( - Object.fromEntries( - this.plugin.settings.endpoints.map((e, i) => [ - i.toString(), - e.name, - ]) - ) - ) - .setValue(this.plugin.settings.endpoint.toString()) - .onChange(async (value) => { - this.plugin.settings.endpoint = parseInt(value, 10); - editor.setValue( - new PureChatLLMChat(this.plugin) - .setMarkdown(editor.getValue()) - .setModel( - this.plugin.settings.endpoints[ - this.plugin.settings.endpoint - ].defaultmodel - ).Markdown - ); - this.plugin.modellist = []; - await this.plugin.saveSettings(); - }); - }); + update(editor: Editor, view: MarkdownView) { + const editorValue = editor.getValue(); + const chat = new PureChatLLMChat(this.plugin); + chat.Markdown = editorValue; + const container = this.contentEl; + container.empty(); + container.createDiv({ text: "" }, (contain) => { + contain.addClass("PURE", "floattop"); + new ButtonComponent(contain) + //.setIcon("box") + .setButtonText("Models") + .setTooltip("Change model") + .onClick((e) => { + this.menumodels(e, editor); + }); + new DropdownComponent(contain) + .addOptions( + Object.fromEntries(this.plugin.settings.endpoints.map((e, i) => [i.toString(), e.name])) + ) + .setValue(this.plugin.settings.endpoint.toString()) + .onChange(async (value) => { + this.plugin.settings.endpoint = parseInt(value, 10); + editor.setValue( + new PureChatLLMChat(this.plugin) + .setMarkdown(editor.getValue()) + .setModel(this.plugin.settings.endpoints[this.plugin.settings.endpoint].defaultmodel) + .Markdown + ); + this.plugin.modellist = []; + await this.plugin.saveSettings(); + }); + }); - // Process markdown messages - chat.messages.forEach((message) => { - const preview = - message.content.substring(0, 400) + - (message.content.length > 200 ? "\n... " : ""); + // Process markdown messages + chat.messages.forEach((message) => { + const preview = + message.content.substring(0, 400) + (message.content.length > 200 ? "\n... " : ""); - // Role header with clickable position jump - container.createDiv({ text: "" }, (contain) => { - contain.addClass("PURE", "messageContainer", message.role); - contain.createEl( - "h1", - { text: toSentanceCase(message.role) }, - (el) => { - el.onClickEvent(() => - this.goToPostion(editor, message.cline) - ); - el.addClass("PURE", "messageHeader", message.role); - } - ); - // Preview of message content with copy button - if (preview) - contain.createEl("div", "", (div) => { - div.addClass("PURE", "preview", message.role); - div.createDiv({ text: "" }, (el) => { - el.onClickEvent(() => - this.goToPostion(editor, message.cline, true) - ); - el.addClass( - "PURE", - "messageMarkdown", - message.role - ); - MarkdownRenderer.render( - this.app, - preview, - el, - view.file?.basename || "", - this - ); - }); - new ButtonComponent(div) - .setIcon("copy") - .setTooltip("Copy message to clipboard") - .onClick(() => { - navigator.clipboard.writeText(message.content); - new Notice("Copied message to clipboard"); - }); - new ButtonComponent(div) - .setIcon("message-square-x") - .setTooltip("Delete message") - .onClick(() => { - editor.replaceRange( - "", - { - line: message.cline.from.line - 1, - ch: 0, - }, - message.cline.to - ); - new Notice("Deleted message"); - }); - if (/# \w+/gm.test(message.content)) - new ButtonComponent(div) - .setIcon("table-of-contents") - .setTooltip("View and edit sections") - .onClick(() => { - new SectionHandling( - this.app, - this.plugin, - message.content - ).open(); - }); - if (/```[\w\W]*?```/gm.test(message.content)) - new ButtonComponent(div) - .setIcon("code") - .setTooltip("View and edit code") - .onClick(() => { - new CodeHandling( - this.app, - this.plugin, - message.content - ).open(); - }); - new ButtonComponent(div) - .setIcon("refresh-cw") - .setTooltip("Regenerate response") - .onClick(() => { - editor.replaceRange( - "", - { line: message.cline.to.line, ch: 0 }, - { - line: editor.lastLine(), - ch: editor.getLine(editor.lastLine()) - .length, - } - ); - this.plugin.CompleteChatResponse(editor, view); - }); - }); - }); - }); - // scroll to bottom of container - // if the editor is focused - if (editor.hasFocus()) { - container.scrollTo(0, container.scrollHeight); - } - } + // Role header with clickable position jump + container.createDiv({ text: "" }, (contain) => { + contain.addClass("PURE", "messageContainer", message.role); + contain.createEl("h1", { text: toSentanceCase(message.role) }, (el) => { + el.onClickEvent(() => this.goToPostion(editor, message.cline)); + el.addClass("PURE", "messageHeader", message.role); + }); + // Preview of message content with copy button + if (preview) + contain.createEl("div", "", (div) => { + div.addClass("PURE", "preview", message.role); + div.createDiv({ text: "" }, (el) => { + el.onClickEvent(() => this.goToPostion(editor, message.cline, true)); + el.addClass("PURE", "messageMarkdown", message.role); + MarkdownRenderer.render(this.app, preview, el, view.file?.basename || "", this); + }); + new ButtonComponent(div) + .setIcon("copy") + .setTooltip("Copy message to clipboard") + .onClick(() => { + navigator.clipboard.writeText(message.content); + new Notice("Copied message to clipboard"); + }); + new ButtonComponent(div) + .setIcon("message-square-x") + .setTooltip("Delete message") + .onClick(() => { + editor.replaceRange( + "", + { + line: message.cline.from.line - 1, + ch: 0, + }, + message.cline.to + ); + new Notice("Deleted message"); + }); + if (/# \w+/gm.test(message.content)) + new ButtonComponent(div) + .setIcon("table-of-contents") + .setTooltip("View and edit sections") + .onClick(() => { + new SectionHandling(this.app, this.plugin, message.content).open(); + }); + if (/```[\w\W]*?```/gm.test(message.content)) + new ButtonComponent(div) + .setIcon("code") + .setTooltip("View and edit code") + .onClick(() => { + new CodeHandling(this.app, this.plugin, message.content).open(); + }); + new ButtonComponent(div) + .setIcon("refresh-cw") + .setTooltip("Regenerate response") + .onClick(() => { + editor.replaceRange( + "", + { line: message.cline.to.line, ch: 0 }, + { + line: editor.lastLine(), + ch: editor.getLine(editor.lastLine()).length, + } + ); + this.plugin.CompleteChatResponse(editor, view); + }); + }); + }); + }); + // scroll to bottom of container + // if the editor is focused + if (editor.hasFocus()) { + container.scrollTo(0, container.scrollHeight); + } + } - private goToPostion(editor: Editor, position: EditorRange, select = false) { - if (select) { - editor.setSelections([ - { anchor: position.from, head: position.to }, - ]); - //editor.setSelection(position.from, position.to); - editor.scrollIntoView(position); - } else { - editor.setCursor(position.from); - editor.scrollTo(0, editor.posToOffset(position.from)); - } - editor.focus(); - // if it's mobile, wait 100ms to focus the editor again - // this will make the selection work on mobile - if (Platform.isMobile) { - window.setTimeout(() => { - editor.focus(); - }, 100); - } - } + private goToPostion(editor: Editor, position: EditorRange, select = false) { + if (select) { + editor.setSelections([{ anchor: position.from, head: position.to }]); + //editor.setSelection(position.from, position.to); + editor.scrollIntoView(position); + } else { + editor.setCursor(position.from); + editor.scrollTo(0, editor.posToOffset(position.from)); + } + editor.focus(); + // if it's mobile, wait 100ms to focus the editor again + // this will make the selection work on mobile + if (Platform.isMobile) { + window.setTimeout(() => { + editor.focus(); + }, 100); + } + } - async onClose() { - // Nothing to clean up. - } + async onClose() { + // Nothing to clean up. + } } diff --git a/src/codelanguages.ts b/src/codelanguages.ts index c3f3511..66e3d4a 100644 --- a/src/codelanguages.ts +++ b/src/codelanguages.ts @@ -1,394 +1,394 @@ export type codelanguage = - | "plaintext" - | "markup" - | "html" - | "xml" - | "svg" - | "mathml" - | "ssml" - | "atom" - | "rss" - | "css" - | "clike" - | "javascript" - | "js" - | "abap" - | "abnf" - | "actionscript" - | "ada" - | "agda" - | "al" - | "antlr4" - | "g4" - | "apacheconf" - | "apex" - | "apl" - | "applescript" - | "aql" - | "arduino" - | "ino" - | "arff" - | "asm" - | "arturo" - | "art" - | "asciidoc" - | "adoc" - | "aspnet" - | "asm6502" - | "asmatmel" - | "autohotkey" - | "autoit" - | "avisynth" - | "avs" - | "idl" - | "avdl" - | "awk" - | "gawk" - | "bash" - | "sh" - | "shell" - | "basic" - | "batch" - | "bbcode" - | "shortcode" - | "bbj" - | "bicep" - | "birb" - | "bison" - | "bnf" - | "rbnf" - | "bqn" - | "brainfuck" - | "brightscript" - | "bro" - | "bsl" - | "oscript" - | "c" - | "csharp" - | "cs" - | "dotnet" - | "cpp" - | "cfscript" - | "cfc" - | "chaiscript" - | "cil" - | "c" - | "cpp" - | "cilk" - | "clojure" - | "cmake" - | "cobol" - | "coffeescript" - | "coffee" - | "concurnas" - | "conc" - | "csp" - | "cooklang" - | "coq" - | "crystal" - | "extras" - | "csv" - | "cue" - | "cypher" - | "d" - | "dart" - | "dataweave" - | "dax" - | "dhall" - | "diff" - | "django" - | "jinja2" - | "zone" - | "docker" - | "dockerfile" - | "dot" - | "gv" - | "ebnf" - | "editorconfig" - | "eiffel" - | "ejs" - | "eta" - | "elixir" - | "elm" - | "etlua" - | "erb" - | "erlang" - | "formula" - | "xlsx" - | "xls" - | "fsharp" - | "factor" - | "false" - | "rules" - | "flow" - | "fortran" - | "ftl" - | "gml" - | "gamemakerlanguage" - | "gap" - | "gcode" - | "gdscript" - | "gedcom" - | "gettext" - | "po" - | "gherkin" - | "git" - | "glsl" - | "gn" - | "gni" - | "script" - | "ld" - | "go" - | "mod" - | "gradle" - | "graphql" - | "groovy" - | "haml" - | "handlebars" - | "hbs" - | "mustache" - | "haskell" - | "hs" - | "haxe" - | "hcl" - | "hlsl" - | "hoon" - | "http" - | "hpkp" - | "hsts" - | "ichigojam" - | "icon" - | "format" - | "idris" - | "idr" - | "ignore" - | "gitignore" - | "hgignore" - | "npmignore" - | "inform7" - | "ini" - | "io" - | "j" - | "java" - | "javadoc" - | "javadoclike" - | "javastacktrace" - | "jexl" - | "jolie" - | "jq" - | "jsdoc" - | "extras" - | "json" - | "webmanifest" - | "json5" - | "jsonp" - | "jsstacktrace" - | "templates" - | "julia" - | "keepalived" - | "keyman" - | "kotlin" - | "kt" - | "kts" - | "kumir" - | "kum" - | "kusto" - | "latex" - | "tex" - | "context" - | "latte" - | "less" - | "lilypond" - | "ly" - | "liquid" - | "lisp" - | "livescript" - | "llvm" - | "log" - | "lolcode" - | "lua" - | "magma" - | "makefile" - | "markdown" - | "md" - | "templating" - | "mata" - | "matlab" - | "maxscript" - | "mel" - | "mermaid" - | "metafont" - | "mizar" - | "mongodb" - | "monkey" - | "moonscript" - | "moon" - | "n1ql" - | "n4js" - | "n4jsd" - | "hdl" - | "naniscript" - | "nani" - | "nasm" - | "neon" - | "nevod" - | "nginx" - | "nim" - | "nix" - | "nsis" - | "objectivec" - | "objc" - | "ocaml" - | "odin" - | "opencl" - | "openqasm" - | "qasm" - | "oz" - | "parigp" - | "parser" - | "pascal" - | "objectpascal" - | "pascaligo" - | "psl" - | "pcaxis" - | "px" - | "peoplecode" - | "pcode" - | "perl" - | "php" - | "phpdoc" - | "extras" - | "uml" - | "plantuml" - | "plsql" - | "powerquery" - | "pq" - | "mscript" - | "powershell" - | "processing" - | "prolog" - | "promql" - | "properties" - | "protobuf" - | "pug" - | "puppet" - | "pure" - | "purebasic" - | "pbfasm" - | "purescript" - | "purs" - | "python" - | "py" - | "qsharp" - | "qs" - | "q" - | "qml" - | "qore" - | "r" - | "racket" - | "rkt" - | "cshtml" - | "razor" - | "jsx" - | "tsx" - | "reason" - | "regex" - | "rego" - | "renpy" - | "rpy" - | "rescript" - | "res" - | "rest" - | "rip" - | "roboconf" - | "robotframework" - | "robot" - | "ruby" - | "rb" - | "rust" - | "sas" - | "sass" - | "scss" - | "scala" - | "scheme" - | "session" - | "shellsession" - | "smali" - | "smalltalk" - | "smarty" - | "sml" - | "smlnj" - | "solidity" - | "sol" - | "file" - | "sln" - | "soy" - | "sparql" - | "rq" - | "spl" - | "sqf" - | "sql" - | "squirrel" - | "stan" - | "stata" - | "iecst" - | "stylus" - | "supercollider" - | "sclang" - | "swift" - | "systemd" - | "templating" - | "cs" - | "t4" - | "vb" - | "tap" - | "tcl" - | "tt2" - | "textile" - | "toml" - | "tremor" - | "trickle" - | "troy" - | "turtle" - | "trig" - | "twig" - | "typescript" - | "ts" - | "typoscript" - | "tsconfig" - | "unrealscript" - | "uscript" - | "uc" - | "uorazor" - | "uri" - | "url" - | "v" - | "vala" - | "vbnet" - | "velocity" - | "verilog" - | "vhdl" - | "vim" - | "basic" - | "vb" - | "vba" - | "warpscript" - | "wasm" - | "idl" - | "webidl" - | "wgsl" - | "wiki" - | "wolfram" - | "mathematica" - | "nb" - | "wl" - | "wren" - | "xeora" - | "xeoracube" - | "doc" - | "xojo" - | "xquery" - | "yaml" - | "yml" - | "yang" - | "zig"; + | "plaintext" + | "markup" + | "html" + | "xml" + | "svg" + | "mathml" + | "ssml" + | "atom" + | "rss" + | "css" + | "clike" + | "javascript" + | "js" + | "abap" + | "abnf" + | "actionscript" + | "ada" + | "agda" + | "al" + | "antlr4" + | "g4" + | "apacheconf" + | "apex" + | "apl" + | "applescript" + | "aql" + | "arduino" + | "ino" + | "arff" + | "asm" + | "arturo" + | "art" + | "asciidoc" + | "adoc" + | "aspnet" + | "asm6502" + | "asmatmel" + | "autohotkey" + | "autoit" + | "avisynth" + | "avs" + | "idl" + | "avdl" + | "awk" + | "gawk" + | "bash" + | "sh" + | "shell" + | "basic" + | "batch" + | "bbcode" + | "shortcode" + | "bbj" + | "bicep" + | "birb" + | "bison" + | "bnf" + | "rbnf" + | "bqn" + | "brainfuck" + | "brightscript" + | "bro" + | "bsl" + | "oscript" + | "c" + | "csharp" + | "cs" + | "dotnet" + | "cpp" + | "cfscript" + | "cfc" + | "chaiscript" + | "cil" + | "c" + | "cpp" + | "cilk" + | "clojure" + | "cmake" + | "cobol" + | "coffeescript" + | "coffee" + | "concurnas" + | "conc" + | "csp" + | "cooklang" + | "coq" + | "crystal" + | "extras" + | "csv" + | "cue" + | "cypher" + | "d" + | "dart" + | "dataweave" + | "dax" + | "dhall" + | "diff" + | "django" + | "jinja2" + | "zone" + | "docker" + | "dockerfile" + | "dot" + | "gv" + | "ebnf" + | "editorconfig" + | "eiffel" + | "ejs" + | "eta" + | "elixir" + | "elm" + | "etlua" + | "erb" + | "erlang" + | "formula" + | "xlsx" + | "xls" + | "fsharp" + | "factor" + | "false" + | "rules" + | "flow" + | "fortran" + | "ftl" + | "gml" + | "gamemakerlanguage" + | "gap" + | "gcode" + | "gdscript" + | "gedcom" + | "gettext" + | "po" + | "gherkin" + | "git" + | "glsl" + | "gn" + | "gni" + | "script" + | "ld" + | "go" + | "mod" + | "gradle" + | "graphql" + | "groovy" + | "haml" + | "handlebars" + | "hbs" + | "mustache" + | "haskell" + | "hs" + | "haxe" + | "hcl" + | "hlsl" + | "hoon" + | "http" + | "hpkp" + | "hsts" + | "ichigojam" + | "icon" + | "format" + | "idris" + | "idr" + | "ignore" + | "gitignore" + | "hgignore" + | "npmignore" + | "inform7" + | "ini" + | "io" + | "j" + | "java" + | "javadoc" + | "javadoclike" + | "javastacktrace" + | "jexl" + | "jolie" + | "jq" + | "jsdoc" + | "extras" + | "json" + | "webmanifest" + | "json5" + | "jsonp" + | "jsstacktrace" + | "templates" + | "julia" + | "keepalived" + | "keyman" + | "kotlin" + | "kt" + | "kts" + | "kumir" + | "kum" + | "kusto" + | "latex" + | "tex" + | "context" + | "latte" + | "less" + | "lilypond" + | "ly" + | "liquid" + | "lisp" + | "livescript" + | "llvm" + | "log" + | "lolcode" + | "lua" + | "magma" + | "makefile" + | "markdown" + | "md" + | "templating" + | "mata" + | "matlab" + | "maxscript" + | "mel" + | "mermaid" + | "metafont" + | "mizar" + | "mongodb" + | "monkey" + | "moonscript" + | "moon" + | "n1ql" + | "n4js" + | "n4jsd" + | "hdl" + | "naniscript" + | "nani" + | "nasm" + | "neon" + | "nevod" + | "nginx" + | "nim" + | "nix" + | "nsis" + | "objectivec" + | "objc" + | "ocaml" + | "odin" + | "opencl" + | "openqasm" + | "qasm" + | "oz" + | "parigp" + | "parser" + | "pascal" + | "objectpascal" + | "pascaligo" + | "psl" + | "pcaxis" + | "px" + | "peoplecode" + | "pcode" + | "perl" + | "php" + | "phpdoc" + | "extras" + | "uml" + | "plantuml" + | "plsql" + | "powerquery" + | "pq" + | "mscript" + | "powershell" + | "processing" + | "prolog" + | "promql" + | "properties" + | "protobuf" + | "pug" + | "puppet" + | "pure" + | "purebasic" + | "pbfasm" + | "purescript" + | "purs" + | "python" + | "py" + | "qsharp" + | "qs" + | "q" + | "qml" + | "qore" + | "r" + | "racket" + | "rkt" + | "cshtml" + | "razor" + | "jsx" + | "tsx" + | "reason" + | "regex" + | "rego" + | "renpy" + | "rpy" + | "rescript" + | "res" + | "rest" + | "rip" + | "roboconf" + | "robotframework" + | "robot" + | "ruby" + | "rb" + | "rust" + | "sas" + | "sass" + | "scss" + | "scala" + | "scheme" + | "session" + | "shellsession" + | "smali" + | "smalltalk" + | "smarty" + | "sml" + | "smlnj" + | "solidity" + | "sol" + | "file" + | "sln" + | "soy" + | "sparql" + | "rq" + | "spl" + | "sqf" + | "sql" + | "squirrel" + | "stan" + | "stata" + | "iecst" + | "stylus" + | "supercollider" + | "sclang" + | "swift" + | "systemd" + | "templating" + | "cs" + | "t4" + | "vb" + | "tap" + | "tcl" + | "tt2" + | "textile" + | "toml" + | "tremor" + | "trickle" + | "troy" + | "turtle" + | "trig" + | "twig" + | "typescript" + | "ts" + | "typoscript" + | "tsconfig" + | "unrealscript" + | "uscript" + | "uc" + | "uorazor" + | "uri" + | "url" + | "v" + | "vala" + | "vbnet" + | "velocity" + | "verilog" + | "vhdl" + | "vim" + | "basic" + | "vb" + | "vba" + | "warpscript" + | "wasm" + | "idl" + | "webidl" + | "wgsl" + | "wiki" + | "wolfram" + | "mathematica" + | "nb" + | "wl" + | "wren" + | "xeora" + | "xeoracube" + | "doc" + | "xojo" + | "xquery" + | "yaml" + | "yml" + | "yang" + | "zig"; diff --git a/src/main.ts b/src/main.ts index 34fd27d..70b4327 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,49 +1,48 @@ import { - App, - ButtonComponent, - DropdownComponent, - Editor, - FuzzySuggestModal, - MarkdownView, - Menu, - Modal, - Notice, - Plugin, - PluginSettingTab, - Setting, - TextAreaComponent, - TFile, - WorkspaceLeaf, + App, + ButtonComponent, + Editor, + FuzzySuggestModal, + MarkdownView, + Menu, + Modal, + Notice, + Plugin, + PluginSettingTab, + Setting, + TextAreaComponent, + TFile, + WorkspaceLeaf, } from "obsidian"; import { codeContent, PureChatLLMChat } from "./Chat"; import { PureChatLLMSideView } from "./SideView"; import { - chatParser, - DEFAULT_PROCESS_CHAT_TEMPLATES, - DEFAULT_SELECTION_TEMPLATES, - DEFAULT_SETTINGS, - EmptyApiKey, - ENDPOINTS, - PURE_CHAT_LLM_VIEW_TYPE, - PureChatLLMInstructPrompt, - PureChatLLMInstructPrompts, - PureChatLLMSettings, + chatParser, + DEFAULT_PROCESS_CHAT_TEMPLATES, + DEFAULT_SELECTION_TEMPLATES, + DEFAULT_SETTINGS, + EmptyApiKey, + ENDPOINTS, + PURE_CHAT_LLM_VIEW_TYPE, + PureChatLLMInstructPrompt, + PureChatLLMInstructPrompts, + PureChatLLMSettings, } from "./types"; import { BrowserConsole } from "./MyBrowserConsole"; declare module "obsidian" { - interface App { - commands: { - commands: { - [commandId: string]: { - id: string; - name: string; - callback: () => void; - }; - }; - executeCommandById(commandId: string): boolean; - }; - } + interface App { + commands: { + commands: { + [commandId: string]: { + id: string; + name: string; + callback: () => void; + }; + }; + executeCommandById(commandId: string): boolean; + }; + } } /** @@ -69,359 +68,323 @@ declare module "obsidian" { * @public */ export default class PureChatLLM extends Plugin { - settings: PureChatLLMSettings; - isresponding: boolean; - console: BrowserConsole; - modellist: string[] = []; + settings: PureChatLLMSettings; + isresponding: boolean; + console: BrowserConsole; + modellist: string[] = []; - async onload() { - await this.loadSettings(); - this.console = new BrowserConsole(this.settings.debug, "PureChatLLM"); - this.console.log("settings loaded", this.settings); - if (this.settings.endpoints.length == 0) { - this.settings.endpoints = ENDPOINTS; - } + async onload() { + await this.loadSettings(); + this.console = new BrowserConsole(this.settings.debug, "PureChatLLM"); + this.console.log("settings loaded", this.settings); + if (this.settings.endpoints.length == 0) { + this.settings.endpoints = ENDPOINTS; + } - this.registerView( - PURE_CHAT_LLM_VIEW_TYPE, - (leaf) => new PureChatLLMSideView(leaf, this) - ); + this.registerView(PURE_CHAT_LLM_VIEW_TYPE, (leaf) => new PureChatLLMSideView(leaf, this)); - this.addRibbonIcon( - "text", - "Open conversation overview", - this.activateView.bind(this) - ); + this.addRibbonIcon("text", "Open conversation overview", this.activateView.bind(this)); - // Add command for completing chat response - // No default hotkey - this.addCommand({ - id: "complete-chat-response", - name: "Complete chat response", - icon: "send", - editorCallback: this.CompleteChatResponse.bind(this), - }); - // Add command for settings - this.addCommand({ - id: "generate-title", - name: "Generate title", - icon: "text-cursor-input", - editorCallback: this.GenerateTitle.bind(this), - }); - this.addCommand({ - id: "edit-selection", - name: "Edit Selection", - editorCheckCallback: (checking, e: Editor) => { - const selected = e.getSelection(); - if (checking) return !!selected; - this.GetInstructPrompts( - "PureChatLLM/templates.md", - DEFAULT_SELECTION_TEMPLATES - ).then((templates) => - new InstructPromptsHandler( - this.app, - (s) => - new PureChatLLMChat(this) - .SelectionResponse(s, selected) - .then((response) => - e.replaceSelection(response.content) - ), - templates - ).open() - ); - }, - }); - this.addCommand({ - id: "save-templates", - name: "Save templates", - callback: async () => { - const folderPath = "PureChatLLM"; - const filePath = `${folderPath}/templates.md`; - // Check if folder exists, create if not - if (!this.app.vault.getAbstractFileByPath(folderPath)) { - await this.app.vault.createFolder(folderPath); - } - await this.app.vault.create( - filePath, - Object.values(DEFAULT_SELECTION_TEMPLATES) - .map((t) => `# ${t.name}\n${t.template}`) - .join("\n\n") - ); - }, - }); - this.addCommand({ - id: "analyze-conversation", - name: "Analyze conversation", - icon: "messages-square", - editorCallback: (editor: Editor, view: MarkdownView) => { - new InstructPromptsHandler( - this.app, - (s) => - new PureChatLLMChat(this) - .setMarkdown(editor.getValue()) - .ProcessChatWithTemplate(s) - .then((response) => - editor.replaceSelection(response.content) - ), - DEFAULT_PROCESS_CHAT_TEMPLATES - ).open(); - }, - }); - // Add command for opening the settings - this.addCommand({ - id: "open-hotkeys", - name: "Open hotkeys", - icon: "key", - callback: async () => { - this.openHotkeys(); - }, - }); - // Add a context menu item for simplifying the selection - this.registerEvent( - this.app.workspace.on( - "editor-menu", - (menu: Menu, editor: Editor, view: MarkdownView) => { - //menu.addChild(new MenuItem().setTitle("Pure Chat LLM").setIcon("wand")) - this.addItemsToMenu(menu, editor, view); - } - ) - ); + // Add command for completing chat response + // No default hotkey + this.addCommand({ + id: "complete-chat-response", + name: "Complete chat response", + icon: "send", + editorCallback: this.CompleteChatResponse.bind(this), + }); + // Add command for settings + this.addCommand({ + id: "generate-title", + name: "Generate title", + icon: "text-cursor-input", + editorCallback: this.GenerateTitle.bind(this), + }); + this.addCommand({ + id: "edit-selection", + name: "Edit Selection", + editorCheckCallback: (checking, e: Editor) => { + const selected = e.getSelection(); + if (checking) return !!selected; + this.GetInstructPrompts("PureChatLLM/templates.md", DEFAULT_SELECTION_TEMPLATES).then( + (templates) => + new InstructPromptsHandler( + this.app, + (s) => + new PureChatLLMChat(this) + .SelectionResponse(s, selected) + .then((response) => e.replaceSelection(response.content)), + templates + ).open() + ); + }, + }); + this.addCommand({ + id: "save-templates", + name: "Save templates", + callback: async () => { + const folderPath = "PureChatLLM"; + const filePath = `${folderPath}/templates.md`; + // Check if folder exists, create if not + if (!this.app.vault.getAbstractFileByPath(folderPath)) { + await this.app.vault.createFolder(folderPath); + } + await this.app.vault.create( + filePath, + Object.values(DEFAULT_SELECTION_TEMPLATES) + .map((t) => `# ${t.name}\n${t.template}`) + .join("\n\n") + ); + }, + }); + this.addCommand({ + id: "analyze-conversation", + name: "Analyze conversation", + icon: "messages-square", + editorCallback: (editor: Editor, view: MarkdownView) => { + new InstructPromptsHandler( + this.app, + (s) => + new PureChatLLMChat(this) + .setMarkdown(editor.getValue()) + .ProcessChatWithTemplate(s) + .then((response) => editor.replaceSelection(response.content)), + DEFAULT_PROCESS_CHAT_TEMPLATES + ).open(); + }, + }); + // Add command for opening the settings + this.addCommand({ + id: "open-hotkeys", + name: "Open hotkeys", + icon: "key", + callback: async () => { + this.openHotkeys(); + }, + }); + // Add a context menu item for simplifying the selection + this.registerEvent( + this.app.workspace.on("editor-menu", (menu: Menu, editor: Editor, view: MarkdownView) => { + //menu.addChild(new MenuItem().setTitle("Pure Chat LLM").setIcon("wand")) + this.addItemsToMenu(menu, editor, view); + }) + ); - // Add settings tab - this.addSettingTab(new PureChatLLMSettingTab(this.app, this)); - if (this.settings.debug) { - this.app.workspace.onLayoutReady(() => { - this.activateView(); - //this.openHotkeys(); - }); - } - } + // Add settings tab + this.addSettingTab(new PureChatLLMSettingTab(this.app, this)); + if (this.settings.debug) { + this.app.workspace.onLayoutReady(() => { + this.activateView(); + //this.openHotkeys(); + }); + } + } - async openHotkeys(): Promise { - const setting = (this.app as any).setting; - await setting.open(); - this.console.log(setting.activeTab.searchComponent); - setting.openTabById("hotkeys"); - setting.activeTab.searchComponent.setValue("Pure Chat LLM"); - setting.activeTab.searchComponent.onChanged(); - } + async openHotkeys(): Promise { + // make sure this stays up to date as the documentation does'nt include all the functions used here + const setting = (this.app as any).setting; + await setting.open(); + this.console.log(setting.activeTab.searchComponent); + setting.openTabById("hotkeys"); + setting.activeTab.searchComponent.setValue("Pure Chat LLM"); + setting.activeTab.searchComponent.onChanged(); + } - onUserEnable() { - this.activateView(); - this.openHotkeys(); - this.console.log("Plugin enabled"); - } + onUserEnable() { + this.activateView(); + this.openHotkeys(); + this.console.log("Plugin enabled"); + } - private GetInstructPrompts( - folderNName: string, - DefaultInstructPrompts: PureChatLLMInstructPrompts - ): Promise { - const file = this.app.vault.getAbstractFileByPath(folderNName); - if (file instanceof TFile) - this.app.vault.cachedRead(file).then((InstructPrompts) => - Object.assign( - DefaultInstructPrompts, - Object.fromEntries( - InstructPrompts.split("# ") - .filter(Boolean) - .map((tm) => { - const [name, ...content] = tm.split("\n"); - return [ - name.trim(), - { - name: name.trim(), - template: content.join("\n").trim(), - }, - ] as [string, PureChatLLMInstructPrompt]; - }) - ) - ) - ); - return Promise.resolve(DefaultInstructPrompts); - } + private GetInstructPrompts( + folderNName: string, + DefaultInstructPrompts: PureChatLLMInstructPrompts + ): Promise { + const file = this.app.vault.getAbstractFileByPath(folderNName); + if (file instanceof TFile) + this.app.vault.cachedRead(file).then((InstructPrompts) => + Object.assign( + DefaultInstructPrompts, + Object.fromEntries( + InstructPrompts.split("# ") + .filter(Boolean) + .map((tm) => { + const [name, ...content] = tm.split("\n"); + return [ + name.trim(), + { + name: name.trim(), + template: content.join("\n").trim(), + }, + ] as [string, PureChatLLMInstructPrompt]; + }) + ) + ) + ); + return Promise.resolve(DefaultInstructPrompts); + } - async activateView() { - const { workspace } = this.app; + async activateView() { + const { workspace } = this.app; - let leaf: WorkspaceLeaf | null = null; - const leaves = workspace.getLeavesOfType(PURE_CHAT_LLM_VIEW_TYPE); + let leaf: WorkspaceLeaf | null = null; + const leaves = workspace.getLeavesOfType(PURE_CHAT_LLM_VIEW_TYPE); - if (leaves.length > 0) { - // A leaf with our view already exists, use that - leaf = leaves[0]; - } else { - // Our view could not be found in the workspace, create a new leaf - // in the right sidebar for it - leaf = workspace.getRightLeaf(false); - await leaf?.setViewState({ - type: PURE_CHAT_LLM_VIEW_TYPE, - active: true, - }); - } + if (leaves.length > 0) { + // A leaf with our view already exists, use that + leaf = leaves[0]; + } else { + // Our view could not be found in the workspace, create a new leaf + // in the right sidebar for it + leaf = workspace.getRightLeaf(false); + await leaf?.setViewState({ + type: PURE_CHAT_LLM_VIEW_TYPE, + active: true, + }); + } - // "Reveal" the leaf in case it is in a collapsed sidebar - if (leaf) { - workspace.revealLeaf(leaf); - } - } + // "Reveal" the leaf in case it is in a collapsed sidebar + if (leaf) { + workspace.revealLeaf(leaf); + } + } - addItemsToMenu(menu: Menu, editor: Editor, view: MarkdownView) { - const selected = editor.getSelection(); - if (selected.length > 0) - menu.addItem((item) => - item - .setTitle("Edit Selection") - .setIcon("wand") - .onClick(async () => { - this.GetInstructPrompts( - "PureChatLLM/templates.md", - DEFAULT_SELECTION_TEMPLATES - ).then((templates) => - new InstructPromptsHandler( - this.app, - (s) => - new PureChatLLMChat(this) - .SelectionResponse(s, selected) - .then((response) => - editor.replaceSelection( - response.content - ) - ), - templates - ).open() - ); - }) - .setSection("selection") - ).addItem((item) => - item - .setTitle("wand") - .setIcon("wand") - .onClick(async () => { - new EditSelectionModal( - this.app, - this, - editor.getSelection(), - (s) => editor.replaceSelection(s) - ).open(); - }) - .setSection("selection") - ); + addItemsToMenu(menu: Menu, editor: Editor, view: MarkdownView) { + const selected = editor.getSelection(); + if (selected.length > 0) + menu + .addItem((item) => + item + .setTitle("Edit Selection") + .setIcon("wand") + .onClick(async () => { + this.GetInstructPrompts("PureChatLLM/templates.md", DEFAULT_SELECTION_TEMPLATES).then( + (templates) => + new InstructPromptsHandler( + this.app, + (s) => + new PureChatLLMChat(this) + .SelectionResponse(s, selected) + .then((response) => editor.replaceSelection(response.content)), + templates + ).open() + ); + }) + .setSection("selection") + ) + .addItem((item) => + item + .setTitle("wand") + .setIcon("wand") + .onClick(async () => { + new EditSelectionModal(this.app, this, editor.getSelection(), (s) => + editor.replaceSelection(s) + ).open(); + }) + .setSection("selection") + ); - return menu; - } + return menu; + } - askForApiKey() { - new AskForAPI(this.app, this).open(); - } + askForApiKey() { + new AskForAPI(this.app, this).open(); + } - /** - * Generates a new title for the currently active file based on its content using an LLM-powered chat template. - * The generated title is sanitized to remove non-alphanumeric characters and is used to rename the file. - * If no active file is found, a notice is displayed to the user. - * - * @param editor - The editor instance containing the file's content. - * @param view - The Markdown view associated with the editor. - */ - GenerateTitle(editor: Editor, view: MarkdownView): void { - const ActiveFile = view.file; - if (ActiveFile) - new PureChatLLMChat(this) - .setMarkdown(editor.getValue()) - .ProcessChatWithTemplate( - DEFAULT_PROCESS_CHAT_TEMPLATES["Conversation titler"] - ) - .then((title) => { - const sanitizedTitle = `${ - ActiveFile.parent?.path - }/${title.content.replace(/[^a-zA-Z0-9 ]/g, "").trim()}.${ - ActiveFile.extension - }`; - this.app.fileManager.renameFile(ActiveFile, sanitizedTitle); - new Notice(`File renamed to: ${sanitizedTitle}`); - }); - else new Notice("No active file to rename."); - } + /** + * Generates a new title for the currently active file based on its content using an LLM-powered chat template. + * The generated title is sanitized to remove non-alphanumeric characters and is used to rename the file. + * If no active file is found, a notice is displayed to the user. + * + * @param editor - The editor instance containing the file's content. + * @param view - The Markdown view associated with the editor. + */ + GenerateTitle(editor: Editor, view: MarkdownView): void { + const ActiveFile = view.file; + if (ActiveFile) + new PureChatLLMChat(this) + .setMarkdown(editor.getValue()) + .ProcessChatWithTemplate(DEFAULT_PROCESS_CHAT_TEMPLATES["Conversation titler"]) + .then((title) => { + const sanitizedTitle = `${ActiveFile.parent?.path}/${title.content + .replace(/[^a-zA-Z0-9 ]/g, "") + .trim()}.${ActiveFile.extension}`; + this.app.fileManager.renameFile(ActiveFile, sanitizedTitle); + new Notice(`File renamed to: ${sanitizedTitle}`); + }); + else new Notice("No active file to rename."); + } - /** - * Handles the process of generating a chat response using the PureChatLLMChat class. - * - * This method checks for a valid API key, prompts the user if missing, and initiates a chat completion - * based on the current editor content. It appends a role header, sends the content to the LLM, and inserts - * the response into the editor. If certain conditions are met (e.g., auto-title generation is enabled and - * the file is untitled), it triggers title generation. The method manages the responding state and handles - * errors gracefully. - * - * @param editor - The active Obsidian editor instance where the chat is being composed. - * @param view - The current MarkdownView associated with the editor. - */ - CompleteChatResponse(editor: Editor, view: MarkdownView) { - const endpoint = this.settings.endpoints[this.settings.endpoint]; - if (endpoint.apiKey == EmptyApiKey) { - new AskForAPI(this.app, this).open(); - return; - } - const activeFile = view.file; - if (!activeFile) return; - this.isresponding = true; - const editorcontent = editor.getValue(); - editor.setCursor( - editor.lastLine(), - editor.getLine(editor.lastLine()).length - ); - editor.replaceSelection("\n# role: Assistant...\n"); - editor.scrollIntoView({ - from: editor.getCursor(), - to: editor.getCursor(), - }); - //editor.setValue( - new PureChatLLMChat(this) - .setMarkdown(editorcontent) - .CompleteChatResponse(activeFile, (e) => { - editor.replaceSelection(e.content); - return true; - }) - .then((chat) => { - this.isresponding = false; - if ( - this.settings.AutogenerateTitle > 0 && - chat.messages.length >= this.settings.AutogenerateTitle && - activeFile?.name.includes("Untitled") && - view - ) { - this.GenerateTitle(editor, view); - } - editor.setValue(chat.Markdown); - // put the cursor at the end of the editor - editor.setCursor( - editor.lastLine(), - editor.getLine(editor.lastLine()).length - ); - editor.scrollIntoView({ - from: editor.getCursor(), - to: editor.getCursor(), - }); - }) - .catch((error) => this.console.error(error)) - .finally(() => { - this.isresponding = false; - }); - } + /** + * Handles the process of generating a chat response using the PureChatLLMChat class. + * + * This method checks for a valid API key, prompts the user if missing, and initiates a chat completion + * based on the current editor content. It appends a role header, sends the content to the LLM, and inserts + * the response into the editor. If certain conditions are met (e.g., auto-title generation is enabled and + * the file is untitled), it triggers title generation. The method manages the responding state and handles + * errors gracefully. + * + * @param editor - The active Obsidian editor instance where the chat is being composed. + * @param view - The current MarkdownView associated with the editor. + */ + CompleteChatResponse(editor: Editor, view: MarkdownView) { + const endpoint = this.settings.endpoints[this.settings.endpoint]; + if (endpoint.apiKey == EmptyApiKey) { + new AskForAPI(this.app, this).open(); + return; + } + const activeFile = view.file; + if (!activeFile) return; + this.isresponding = true; + const editorcontent = editor.getValue(); + editor.setCursor(editor.lastLine(), editor.getLine(editor.lastLine()).length); + editor.replaceSelection("\n# role: Assistant...\n"); + editor.scrollIntoView({ + from: editor.getCursor(), + to: editor.getCursor(), + }); + //editor.setValue( + new PureChatLLMChat(this) + .setMarkdown(editorcontent) + .CompleteChatResponse(activeFile, (e) => { + editor.replaceSelection(e.content); + return true; + }) + .then((chat) => { + this.isresponding = false; + if ( + this.settings.AutogenerateTitle > 0 && + chat.messages.length >= this.settings.AutogenerateTitle && + activeFile?.name.includes("Untitled") && + view + ) { + this.GenerateTitle(editor, view); + } + editor.setValue(chat.Markdown); + // put the cursor at the end of the editor + editor.setCursor(editor.lastLine(), editor.getLine(editor.lastLine()).length); + editor.scrollIntoView({ + from: editor.getCursor(), + to: editor.getCursor(), + }); + }) + .catch((error) => this.console.error(error)) + .finally(() => { + this.isresponding = false; + }); + } - async loadSettings() { - this.settings = Object.assign( - {}, - DEFAULT_SETTINGS, - await this.loadData() - ); - } + async loadSettings() { + this.settings = Object.assign({}, DEFAULT_SETTINGS, await this.loadData()); + } - async saveSettings() { - await this.saveData(this.settings); - } + async saveSettings() { + await this.saveData(this.settings); + } - onunload() { - // Cleanup code if needed - } + onunload() { + // Cleanup code if needed + } } /** @@ -444,69 +407,62 @@ export default class PureChatLLM extends Plugin { * @param code - The string containing code blocks to be extracted and displayed. */ export class CodeHandling extends Modal { - plugin: PureChatLLM; - code: codeContent[]; + plugin: PureChatLLM; + code: codeContent[]; - constructor(app: App, plugin: PureChatLLM, code: string) { - super(app); - this.plugin = plugin; - this.code = this.getCode(code); - this.setTitle("Code Handling"); - this.renderCodeBlocks(); - } + constructor(app: App, plugin: PureChatLLM, code: string) { + super(app); + this.plugin = plugin; + this.code = this.getCode(code); + this.setTitle("Code Handling"); + this.renderCodeBlocks(); + } - private renderCodeBlocks() { - if (!this.code.length) { - this.contentEl.createEl("p", { text: "No code blocks found." }); - return; - } - this.code.forEach((c, idx) => { - const section = this.contentEl.createDiv({ - cls: "pure-code-block-section", - }); - section.createEl("h2", { - text: c.language || `Code Block ${idx + 1}`, - }); + private renderCodeBlocks() { + if (!this.code.length) { + this.contentEl.createEl("p", { text: "No code blocks found." }); + return; + } + this.code.forEach((c, idx) => { + const section = this.contentEl.createDiv({ + cls: "pure-code-block-section", + }); + section.createEl("h2", { + text: c.language || `Code Block ${idx + 1}`, + }); - const textArea = new TextAreaComponent(section) - .setValue(c.code) - .onChange((value) => { - c.code = value; - }); - textArea.inputEl.addClass("PUREcodePreview"); + const textArea = new TextAreaComponent(section).setValue(c.code).onChange((value) => { + c.code = value; + }); + textArea.inputEl.addClass("PUREcodePreview"); - const buttonRow = section.createDiv({ - cls: "pure-code-block-actions", - }); + const buttonRow = section.createDiv({ + cls: "pure-code-block-actions", + }); - new ButtonComponent(buttonRow) - .setIcon("copy") - .setTooltip("Copy to clipboard") - .onClick(() => { - navigator.clipboard.writeText(c.code); - new Notice("Code copied to clipboard"); - }); + new ButtonComponent(buttonRow) + .setIcon("copy") + .setTooltip("Copy to clipboard") + .onClick(() => { + navigator.clipboard.writeText(c.code); + new Notice("Code copied to clipboard"); + }); - new ButtonComponent(buttonRow) - .setIcon("pencil") - .setTooltip("Edit with prompt") - .onClick(() => { - new EditSelectionModal( - this.app, - this.plugin, - c.code, - (newCode) => { - c.code = newCode; - textArea.setValue(newCode); - } - ).open(); - }); - }); - } + new ButtonComponent(buttonRow) + .setIcon("pencil") + .setTooltip("Edit with prompt") + .onClick(() => { + new EditSelectionModal(this.app, this.plugin, c.code, (newCode) => { + c.code = newCode; + textArea.setValue(newCode); + }).open(); + }); + }); + } - getCode(code: string): codeContent[] { - return PureChatLLMChat.extractAllCodeBlocks(code); - } + getCode(code: string): codeContent[] { + return PureChatLLMChat.extractAllCodeBlocks(code); + } } /** @@ -517,22 +473,22 @@ export class CodeHandling extends Modal { * @extends CodeHandling */ export class SectionHandling extends CodeHandling { - plugin: PureChatLLM; - code: codeContent[]; - getCode(code: string): codeContent[] { - // Extract all Headers and content from the input string - // capture the headers and the text following them - const regex = /^(#{1,6})\s*(.*?)\n([\s\S]*?)(?=\n#{1,6}|\n$)/gm; - const matches = code.matchAll(regex); - const sections: codeContent[] = []; - for (const match of matches) { - const header = match[2].trim(); - const content = match[3].trim(); - const level = match[1].length; - sections.push({ language: header, code: content }); - } - return sections; - } + plugin: PureChatLLM; + code: codeContent[]; + getCode(code: string): codeContent[] { + // Extract all Headers and content from the input string + // capture the headers and the text following them + const regex = /^(#{1,6})\s*(.*?)\n([\s\S]*?)(?=\n#{1,6}|\n$)/gm; + const matches = code.matchAll(regex); + const sections: codeContent[] = []; + for (const match of matches) { + const header = match[2].trim(); + const content = match[3].trim(); + const level = match[1].length; + sections.push({ language: header, code: content }); + } + return sections; + } } /** @@ -547,79 +503,78 @@ export class SectionHandling extends CodeHandling { * @param plugin - The instance of the PureChatLLM plugin, used to access and save settings. */ export class AskForAPI extends Modal { - plugin: PureChatLLM; - app: App; - private apiKey: string; - private modal: string; + plugin: PureChatLLM; + app: App; + private apiKey: string; + private modal: string; - constructor(app: App, plugin: PureChatLLM) { - super(app); - this.plugin = plugin; - this.app = app; - const endpoint = plugin.settings.endpoints[plugin.settings.endpoint]; - this.apiKey = endpoint.apiKey; - this.setTitle(`Enter your ${endpoint.name} API key`); + constructor(app: App, plugin: PureChatLLM) { + super(app); + this.plugin = plugin; + this.app = app; + const endpoint = plugin.settings.endpoints[plugin.settings.endpoint]; + this.apiKey = endpoint.apiKey; + this.setTitle(`Enter your ${endpoint.name} API key`); - this.buildUI(); - } + this.buildUI(); + } - private buildUI() { - const endpoint = - this.plugin.settings.endpoints[this.plugin.settings.endpoint]; + private buildUI() { + const endpoint = this.plugin.settings.endpoints[this.plugin.settings.endpoint]; - new Setting(this.contentEl) - .setName("API Key") - .setDesc(`Enter your ${endpoint.name} API key.`) - .addText((text) => { - text.setPlaceholder(this.apiKey) - .setValue(this.apiKey) - .onChange((value) => { - this.apiKey = value.trim(); - }); - text.inputEl.addEventListener("keydown", (e) => { - if (e.key === "Enter") { - this.saveAndClose(); - } - }); - }); - new Setting(this.contentEl) - .setName("Default Model") - .setDesc(`Enter the default model for ${endpoint.name}.`) - .addText((text) => { - text.setPlaceholder(endpoint.defaultmodel) - .setValue(endpoint.defaultmodel) - .onChange((value) => { - endpoint.defaultmodel = value || endpoint.defaultmodel; - this.plugin.saveSettings(); - }); - }); - new Setting(this.contentEl) - .addButton((btn) => - btn - .setButtonText("Save") - .setCta() - .onClick(() => { - this.saveAndClose(); - }) - ) - .addButton((btn) => - btn.setButtonText("Cancel").onClick(() => this.close()) - ); + new Setting(this.contentEl) + .setName("API Key") + .setDesc(`Enter your ${endpoint.name} API key.`) + .addText((text) => { + text + .setPlaceholder(this.apiKey) + .setValue(this.apiKey) + .onChange((value) => { + this.apiKey = value.trim(); + }); + text.inputEl.addEventListener("keydown", (e) => { + if (e.key === "Enter") { + this.saveAndClose(); + } + }); + }); + new Setting(this.contentEl) + .setName("Default Model") + .setDesc(`Enter the default model for ${endpoint.name}.`) + .addText((text) => { + text + .setPlaceholder(endpoint.defaultmodel) + .setValue(endpoint.defaultmodel) + .onChange((value) => { + endpoint.defaultmodel = value || endpoint.defaultmodel; + this.plugin.saveSettings(); + }); + }); + new Setting(this.contentEl) + .addButton((btn) => + btn + .setButtonText("Save") + .setCta() + .onClick(() => { + this.saveAndClose(); + }) + ) + .addButton((btn) => btn.setButtonText("Cancel").onClick(() => this.close())); - const infoDiv = this.contentEl.createDiv(); - infoDiv.createSpan({ text: "You can get an API key from " }); - infoDiv.createEl("a", { - text: endpoint.name + " API", - href: endpoint.getapiKey, - }); - } + const infoDiv = this.contentEl.createDiv(); + infoDiv.createSpan({ text: "You can get an API key from " }); + infoDiv.createEl("a", { + text: endpoint.name + " API", + href: endpoint.getapiKey, + }); + } - private async saveAndClose() { - this.plugin.settings.endpoints[this.plugin.settings.endpoint].apiKey = - this.apiKey || EmptyApiKey; - await this.plugin.saveSettings(); - this.close(); - } + private async saveAndClose() { + this.plugin.settings.endpoints[this.plugin.settings.endpoint].apiKey = + this.apiKey || EmptyApiKey; + await this.plugin.saveSettings(); + this.close(); + } } /** @@ -640,33 +595,30 @@ export class AskForAPI extends Modal { * handler.open(); */ export class InstructPromptsHandler extends FuzzySuggestModal { - onSubmit: (result: PureChatLLMInstructPrompt) => void; - templates: PureChatLLMInstructPrompts; - constructor( - app: App, - onSubmit: (result: PureChatLLMInstructPrompt) => void, - templates: PureChatLLMInstructPrompts - ) { - super(app); - this.onSubmit = onSubmit; - this.templates = templates; - } + onSubmit: (result: PureChatLLMInstructPrompt) => void; + templates: PureChatLLMInstructPrompts; + constructor( + app: App, + onSubmit: (result: PureChatLLMInstructPrompt) => void, + templates: PureChatLLMInstructPrompts + ) { + super(app); + this.onSubmit = onSubmit; + this.templates = templates; + } - getItems(): PureChatLLMInstructPrompt[] { - return Object.values(this.templates); - } + getItems(): PureChatLLMInstructPrompt[] { + return Object.values(this.templates); + } - getItemText(book: PureChatLLMInstructPrompt): string { - return book.name; - } + getItemText(book: PureChatLLMInstructPrompt): string { + return book.name; + } - onChooseItem( - book: PureChatLLMInstructPrompt, - evt: MouseEvent | KeyboardEvent - ) { - this.onSubmit(book); - //new Notice(`Selected ${book.name}`); - } + onChooseItem(book: PureChatLLMInstructPrompt, evt: MouseEvent | KeyboardEvent) { + this.onSubmit(book); + //new Notice(`Selected ${book.name}`); + } } /** @@ -687,125 +639,105 @@ export class InstructPromptsHandler extends FuzzySuggestModal { - dropdown - .addOptions( - Object.fromEntries( - settings.endpoints.map((e, i) => [ - i.toString(), - e.name, - ]) - ) - ) - .setValue(settings.endpoint.toString()) - .onChange(async (value) => { - settings.endpoint = parseInt(value, 10); - this.plugin.modellist = []; - await this.plugin.saveSettings(); - }); - }); - new Setting(containerEl) - .setName("Api keys") - .setDesc("Configure API keys for different AI providers") - .addButton((btn) => - btn - .setIcon("key") - .setTooltip("Add API keys") - .onClick(async () => { - const endpoint = settings.endpoints[settings.endpoint]; - new AskForAPI(this.app, this.plugin).open(); - }) - ); - new Setting(containerEl) - .setName("Chat type written style") - .setDesc("Select the chat type written style") - // use the name from the objects in the array: chatParser - .addDropdown((dropdown) => { - dropdown - .addOptions( - Object.fromEntries( - Object.entries(chatParser).map(([key, value]) => [ - key, - value.name, - ]) - ) - ) - .setValue(settings.chatParser.toString()) - .onChange(async (value) => { - settings.chatParser = parseInt(value, 10); - await this.plugin.saveSettings(); - }); - }); + new Setting(containerEl) + .setName("Endpoint") + .setDesc("Select the endpoint to use for chat completions") + .addDropdown((dropdown) => { + dropdown + .addOptions(Object.fromEntries(settings.endpoints.map((e, i) => [i.toString(), e.name]))) + .setValue(settings.endpoint.toString()) + .onChange(async (value) => { + settings.endpoint = parseInt(value, 10); + this.plugin.modellist = []; + await this.plugin.saveSettings(); + }); + }); + new Setting(containerEl) + .setName("Api keys") + .setDesc("Configure API keys for different AI providers") + .addButton((btn) => + btn + .setIcon("key") + .setTooltip("Add API keys") + .onClick(async () => { + const endpoint = settings.endpoints[settings.endpoint]; + new AskForAPI(this.app, this.plugin).open(); + }) + ); + new Setting(containerEl) + .setName("Chat type written style") + .setDesc("Select the chat type written style") + // use the name from the objects in the array: chatParser + .addDropdown((dropdown) => { + dropdown + .addOptions( + Object.fromEntries( + Object.entries(chatParser).map(([key, value]) => [key, value.description]) + ) + ) + .setValue(settings.chatParser.toString()) + .onChange(async (value) => { + settings.chatParser = parseInt(value, 10); + await this.plugin.saveSettings(); + }); + }); - new Setting(containerEl) - .setName("Autogenerate title") - .setDesc( - "Number of responces before generateing title for the conversation, 0 to disable" - ) - .addText((text) => - text - .setPlaceholder( - DEFAULT_SETTINGS.AutogenerateTitle.toString() - ) - .setValue(settings.AutogenerateTitle.toString()) - .onChange(async (value) => { - const num = - value.length != 0 - ? parseInt(value, 10) - : DEFAULT_SETTINGS.AutogenerateTitle; - if (!isNaN(num) && num >= 0) { - settings.AutogenerateTitle = num; - await this.plugin.saveSettings(); - } else { - new Notice("Please enter a valid number."); - } - }) - ); - new Setting(containerEl) - .setName("Default system prompt") - .setDesc("Default system prompt to use for chat completions") - .setClass("PURE") - .addTextArea((text) => - text - .setPlaceholder(DEFAULT_SETTINGS.SystemPrompt) - .setValue(settings.SystemPrompt) - .onChange(async (value) => { - settings.SystemPrompt = - value || DEFAULT_SETTINGS.SystemPrompt; - await this.plugin.saveSettings(); - }) - ); - new Setting(containerEl) - .setName("Debug") - .setDesc("Log debug information to the console") - .addToggle((toggle) => - toggle.setValue(settings.debug).onChange(async (value) => { - settings.debug = value; - await this.plugin.saveSettings(); - this.plugin.console = new BrowserConsole( - settings.debug, - "PureChatLLM" - ); - console.log("reload the plugin to apply the changes"); - }) - ); - } + new Setting(containerEl) + .setName("Autogenerate title") + .setDesc("Number of responces before generateing title for the conversation, 0 to disable") + .addText((text) => + text + .setPlaceholder(DEFAULT_SETTINGS.AutogenerateTitle.toString()) + .setValue(settings.AutogenerateTitle.toString()) + .onChange(async (value) => { + const num = + value.length != 0 ? parseInt(value, 10) : DEFAULT_SETTINGS.AutogenerateTitle; + if (!isNaN(num) && num >= 0) { + settings.AutogenerateTitle = num; + await this.plugin.saveSettings(); + } else { + new Notice("Please enter a valid number."); + } + }) + ); + new Setting(containerEl) + .setName("Default system prompt") + .setDesc("Default system prompt to use for chat completions") + .setClass("PURE") + .addTextArea((text) => + text + .setPlaceholder(DEFAULT_SETTINGS.SystemPrompt) + .setValue(settings.SystemPrompt) + .onChange(async (value) => { + settings.SystemPrompt = value || DEFAULT_SETTINGS.SystemPrompt; + await this.plugin.saveSettings(); + }) + ); + new Setting(containerEl) + .setName("Debug") + .setDesc("Log debug information to the console") + .addToggle((toggle) => + toggle.setValue(settings.debug).onChange(async (value) => { + settings.debug = value; + await this.plugin.saveSettings(); + this.plugin.console = new BrowserConsole(settings.debug, "PureChatLLM"); + console.log("reload the plugin to apply the changes"); + }) + ); + } } /** @@ -825,132 +757,97 @@ class PureChatLLMSettingTab extends PluginSettingTab { * @param onSubmit - Callback invoked with the modified selection when the user confirms. */ class EditSelectionModal extends Modal { - plugin: PureChatLLM; - app: App; - history: string[]; - indexOfHistory: number; - backandforward: Setting; - constructor( - app: App, - plugin: PureChatLLM, - selection: string, - onSubmit: (s: string) => void - ) { - super(app); - this.plugin = plugin; - this.app = app; - this.history = [selection, selection]; - this.indexOfHistory = 1; - this.setTitle("Change selection with prompt"); - this.backandforward = new Setting(this.contentEl) - .addButton((btn) => - btn.setIcon("chevron-left").onClick(async () => { - this.indexOfHistory = Math.max(this.indexOfHistory - 1, 0); - this.update(selectionEl, this.history[this.indexOfHistory]); - }) - ) - .addButton((btn) => btn.setDisabled(true)) - .addButton((btn) => - btn.setIcon("chevron-right").onClick(async () => { - this.indexOfHistory = Math.min( - this.indexOfHistory + 1, - this.history.length - 1 - ); - this.update(selectionEl, this.history[this.indexOfHistory]); - }) - ); - const selectionEl = new TextAreaComponent(this.contentEl) - .setPlaceholder("Selection") - .setValue(selection) - .onChange( - async (value) => (this.history[this.history.length - 1] = value) - ); - selectionEl.inputEl.addClass("PUREcodePreview"); - const promptEl = new TextAreaComponent(this.contentEl).setPlaceholder( - "Enter the prompt" - ); - promptEl.inputEl.addClass("PUREcodePreview"); - new Setting(this.contentEl) - .addButton((btn) => - btn.setIcon("copy").onClick(async () => { - navigator.clipboard.writeText(selectionEl.getValue()); - new Notice("Code copied to clipboard"); - }) - ) - .addButton((btn) => - btn - .setIcon("send") - .setCta() - .onClick(async () => { - new PureChatLLMChat(this.plugin) - .setMarkdown(promptEl.getValue()) - .SelectionResponse( - { name: "", template: promptEl.getValue() }, - selectionEl.getValue() - ) - .then((response) => { - if ( - this.indexOfHistory != - this.history.length - 1 - ) { - this.history = this.history.slice( - 0, - this.indexOfHistory + 1 - ); - } - if ( - this.history[this.history.length - 1] == - this.history[this.history.length - 2] - ) { - this.history.pop(); - } - this.history.push( - response.content, - response.content - ); - this.indexOfHistory = this.history.length - 1; - console.log(this.history); - this.update(selectionEl, response.content); - }); - }) - ); + plugin: PureChatLLM; + app: App; + hist: string[]; + iHist: number; + navHist: Setting; + constructor(app: App, plugin: PureChatLLM, selection: string, onSubmit: (s: string) => void) { + super(app); + this.plugin = plugin; + this.app = app; + this.hist = [selection, selection]; + this.iHist = 1; + this.setTitle("Change selection with prompt"); + this.navHist = new Setting(this.contentEl) + .addButton((btn) => + btn.setIcon("chevron-left").onClick(async () => { + this.iHist = Math.max(this.iHist - 1, 0); + this.update(selectionEl, this.hist[this.iHist]); + }) + ) + .addButton((btn) => btn.setDisabled(true)) + .addButton((btn) => + btn.setIcon("chevron-right").onClick(async () => { + this.iHist = Math.min(this.iHist + 1, this.hist.length - 1); + this.update(selectionEl, this.hist[this.iHist]); + }) + ); + const selectionEl = new TextAreaComponent(this.contentEl) + .setPlaceholder("Selection") + .setValue(selection) + .onChange(async (value) => (this.hist[this.hist.length - 1] = value)); + selectionEl.inputEl.addClass("PUREcodePreview"); + const promptEl = new TextAreaComponent(this.contentEl).setPlaceholder("Enter the prompt"); + promptEl.inputEl.addClass("PUREcodePreview"); + new Setting(this.contentEl) + .addButton((btn) => + btn.setIcon("copy").onClick(async () => { + navigator.clipboard.writeText(selectionEl.getValue()); + new Notice("Code copied to clipboard"); + }) + ) + .addButton((btn) => + btn + .setIcon("send") + .setCta() + .onClick(async () => { + new PureChatLLMChat(this.plugin) + .setMarkdown(promptEl.getValue()) + .SelectionResponse( + { name: "", template: promptEl.getValue() }, + selectionEl.getValue() + ) + .then((response) => { + if (this.iHist != this.hist.length - 1) { + this.hist = this.hist.slice(0, this.iHist + 1); + } + if (this.hist[this.hist.length - 1] == this.hist[this.hist.length - 2]) { + this.hist.pop(); + } + this.hist.push(response.content, response.content); + this.iHist = this.hist.length - 1; + console.log(this.hist); + this.update(selectionEl, response.content); + }); + }) + ); - new Setting(this.contentEl) - .addButton((btn) => - btn - .setIcon("check") - .setCta() - .onClick(async () => { - this.close(); - onSubmit(selectionEl.getValue()); - }) - ) - .addButton((btn) => - btn.setButtonText("Cancel").onClick(async () => { - this.close(); - }) - ); - this.update(selectionEl, selection); - } - update(element: TextAreaComponent, value: string) { - const middle = this.backandforward?.components[1]; - if (middle instanceof ButtonComponent) { - /*if (this.history[this.history.length] == this.history[this.history.length - 1] && this.indexOfHistory == (this.history.length - 1)) - middle.setButtonText(`${this.indexOfHistory}/${this.history.length - 1}`); - else */ - middle.setButtonText( - `${this.indexOfHistory + 1}/${this.history.length}` - ); - } - - this.backandforward?.components[0]?.setDisabled( - this.indexOfHistory == 0 - ); - // this.backandforward?.components[1]? - this.backandforward?.components[2]?.setDisabled( - this.indexOfHistory == this.history.length - 1 - ); - element.setValue(value); - element.inputEl.select(); - } + new Setting(this.contentEl) + .addButton((btn) => + btn + .setIcon("check") + .setCta() + .onClick(async () => { + this.close(); + onSubmit(selectionEl.getValue()); + }) + ) + .addButton((btn) => + btn.setButtonText("Cancel").onClick(async () => { + this.close(); + }) + ); + this.update(selectionEl, selection); + } + update(element: TextAreaComponent, value: string) { + const [back, middle, forward] = this.navHist?.components; + if (middle instanceof ButtonComponent) { + middle.setButtonText(`${this.iHist + 1}/${this.hist.length}`); + } + back.setDisabled(this.iHist == 0); + forward.setDisabled(this.iHist == this.hist.length - 1); + element.setValue(value); + element.inputEl.select(); + } } diff --git a/src/toSentanceCase.ts b/src/toSentanceCase.ts index 78d5c6a..c4abf76 100644 --- a/src/toSentanceCase.ts +++ b/src/toSentanceCase.ts @@ -14,9 +14,9 @@ * ``` */ export function toSentanceCase(str: string): string { - return str - .toLowerCase() - .split(" ") - .map((word) => word.charAt(0).toUpperCase() + word.slice(1)) - .join(" "); + return str + .toLowerCase() + .split(" ") + .map((word) => word.charAt(0).toUpperCase() + word.slice(1)) + .join(" "); } diff --git a/src/types.ts b/src/types.ts index 2ed89ae..5a70bc3 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,120 +1,117 @@ import { EditorRange } from "obsidian"; export interface PureChatLLMSettings { - AutogenerateTitle: number; - SystemPrompt: string; - debug: boolean; - endpoint: number; - endpoints: PureChatLLMAPI[]; - chatParser: number; + AutogenerateTitle: number; + SystemPrompt: string; + debug: boolean; + endpoint: number; + endpoints: PureChatLLMAPI[]; + chatParser: number; } export const DEFAULT_SETTINGS: PureChatLLMSettings = { - AutogenerateTitle: 4, - SystemPrompt: `You are ChatGPT, a large language model trained by OpenAI. Carefully heed the user's instructions. Respond using Markdown.\n\nBe attentive, thoughtful, and precise—provide clear, well-structured answers that honor the complexity of each query. Avoid generic responses; instead, offer insights that encourage creativity, reflection, and learning. Employ subtle, dry humor or depth when appropriate. Respect the user’s individuality and values, adapting your tone and approach as needed to foster a conversational, meaningful, and genuinely supportive exchange.`, - debug: false, - endpoint: 0, - endpoints: [], - chatParser: 0, + AutogenerateTitle: 4, + SystemPrompt: `You are ChatGPT, a large language model trained by OpenAI. Carefully heed the user's instructions. Respond using Markdown.\n\nBe attentive, thoughtful, and precise—provide clear, well-structured answers that honor the complexity of each query. Avoid generic responses; instead, offer insights that encourage creativity, reflection, and learning. Employ subtle, dry humor or depth when appropriate. Respect the user’s individuality and values, adapting your tone and approach as needed to foster a conversational, meaningful, and genuinely supportive exchange.`, + debug: false, + endpoint: 0, + endpoints: [], + chatParser: 0, }; export interface PureChatLLMAPI { - name: string; - apiKey: string; - endpoint: string; - defaultmodel: string; - listmodels: string; - getapiKey: string; + name: string; + apiKey: string; + endpoint: string; + defaultmodel: string; + listmodels: string; + getapiKey: string; } interface ChatParser { - name: string; - description: string; - SplitMessages: RegExp; - getRole: RegExp; - rolePlacement: string; - isChat?: RegExp; + name: string; + description: string; + SplitMessages: RegExp; + getRole: RegExp; + rolePlacement: string; + isChat?: RegExp; } export const chatParser: ChatParser[] = [ - { - name: "SimpleMarkdownHeader", - description: "Simple markdown header parser", - SplitMessages: /^# role: (?=system|user|assistant|developer)/im, - getRole: /^(system|user|assistant|developer)[^\n]+\n/i, - rolePlacement: "# role: {role}", - isChat: /^# role: (system|user|assistant|developer)/i, - }, - { - name: "NoteMarkdownHeader", - description: "Note markdown header parser", - SplitMessages: - /^\n> \[!note\] \w+\n> # role: (?=system|user|assistant|developer)/im, - getRole: /^(system|user|assistant|developer)[^\n]+\n/i, - rolePlacement: "\n> [!note] {role}\n> # role: {role}\n", - isChat: /^> \[!note\] \w+\n> # role: (system|user|assistant|developer)/i, - }, + { + name: "SimpleMarkdownHeader", + description: "Simple markdown header parser", + SplitMessages: /^# role: (?=system|user|assistant|developer)/im, + getRole: /^(system|user|assistant|developer)[^\n]+\n/i, + rolePlacement: "# role: {role}", + isChat: /^# role: (system|user|assistant|developer)/i, + }, + { + name: "NoteMarkdownHeader", + description: "Note markdown header parser", + SplitMessages: /^\n> \[!note\] \w+\n> # role: (?=system|user|assistant|developer)/im, + getRole: /^(system|user|assistant|developer)[^\n]+\n/i, + rolePlacement: "\n> [!note] {role}\n> # role: {role}\n", + isChat: /^> \[!note\] \w+\n> # role: (system|user|assistant|developer)/i, + }, ]; export const EmptyApiKey = "sk-XXXXXXXXX"; export const ENDPOINTS: PureChatLLMAPI[] = [ - { - name: "OpenAI", - apiKey: EmptyApiKey, - defaultmodel: "gpt-4.1-nano", - endpoint: "https://api.openai.com/v1/chat/completions", - listmodels: "https://api.openai.com/v1/models", - getapiKey: "https://platform.openai.com/api-keys", - }, - { - name: "Gemini", - apiKey: EmptyApiKey, - defaultmodel: "gemini-2.0-flash-lite", - endpoint: - "https://generativelanguage.googleapis.com/v1beta/openai/chat/completions", - listmodels: - "https://generativelanguage.googleapis.com/v1beta/openai/models", - getapiKey: "https://aistudio.google.com/apikey", - }, - { - name: "xAI", - apiKey: EmptyApiKey, - defaultmodel: "grok-3-mini", - endpoint: "https://api.x.ai/v1/chat/completions", - listmodels: "https://api.x.ai/v1/models", - getapiKey: "https://console.x.ai", - }, - { - name: "Anthropic", - apiKey: EmptyApiKey, - defaultmodel: "claude-3-7-sonnet-20250219", - endpoint: "https://api.anthropic.com/v1/messages", - listmodels: "https://api.anthropic.com/v1/models", - getapiKey: "https://console.anthropic.com/settings/keys", - }, - { - name: "Cohere", - apiKey: EmptyApiKey, - defaultmodel: "command", - endpoint: "https://api.cohere.ai/v1/generate", - listmodels: "https://api.cohere.ai/v1/models", - getapiKey: "https://dashboard.cohere.com/api-keys", - }, - { - name: "Mistral AI", - apiKey: EmptyApiKey, - defaultmodel: "mixtral-8x7b", - endpoint: "https://api.mistral.ai/v1/chat/completions", - listmodels: "https://api.mistral.ai/v1/models", - getapiKey: "https://console.mistral.ai/api-keys", - }, - { - name: "DeepSeek", - apiKey: EmptyApiKey, - defaultmodel: "deepseek-llm", - endpoint: "https://api.deepseek.com/v1/chat/completions", - listmodels: "https://api.deepseek.com/v1/models", - getapiKey: "https://platform.deepseek.com/api_keys", - }, + { + name: "OpenAI", + apiKey: EmptyApiKey, + defaultmodel: "gpt-4.1-nano", + endpoint: "https://api.openai.com/v1/chat/completions", + listmodels: "https://api.openai.com/v1/models", + getapiKey: "https://platform.openai.com/api-keys", + }, + { + name: "Gemini", + apiKey: EmptyApiKey, + defaultmodel: "gemini-2.0-flash-lite", + endpoint: "https://generativelanguage.googleapis.com/v1beta/openai/chat/completions", + listmodels: "https://generativelanguage.googleapis.com/v1beta/openai/models", + getapiKey: "https://aistudio.google.com/apikey", + }, + { + name: "xAI", + apiKey: EmptyApiKey, + defaultmodel: "grok-3-mini", + endpoint: "https://api.x.ai/v1/chat/completions", + listmodels: "https://api.x.ai/v1/models", + getapiKey: "https://console.x.ai", + }, + { + name: "Anthropic", + apiKey: EmptyApiKey, + defaultmodel: "claude-3-7-sonnet-20250219", + endpoint: "https://api.anthropic.com/v1/messages", + listmodels: "https://api.anthropic.com/v1/models", + getapiKey: "https://console.anthropic.com/settings/keys", + }, + { + name: "Cohere", + apiKey: EmptyApiKey, + defaultmodel: "command", + endpoint: "https://api.cohere.ai/v1/generate", + listmodels: "https://api.cohere.ai/v1/models", + getapiKey: "https://dashboard.cohere.com/api-keys", + }, + { + name: "Mistral AI", + apiKey: EmptyApiKey, + defaultmodel: "mixtral-8x7b", + endpoint: "https://api.mistral.ai/v1/chat/completions", + listmodels: "https://api.mistral.ai/v1/models", + getapiKey: "https://console.mistral.ai/api-keys", + }, + { + name: "DeepSeek", + apiKey: EmptyApiKey, + defaultmodel: "deepseek-llm", + endpoint: "https://api.deepseek.com/v1/chat/completions", + listmodels: "https://api.deepseek.com/v1/models", + getapiKey: "https://platform.deepseek.com/api_keys", + }, ]; /** @@ -134,7 +131,7 @@ export const ENDPOINTS: PureChatLLMAPI[] = [ * ``` */ export interface PureChatLLMInstructPrompts { - [key: string]: PureChatLLMInstructPrompt; + [key: string]: PureChatLLMInstructPrompt; } /** @@ -144,32 +141,32 @@ export interface PureChatLLMInstructPrompts { * @property template - The template string used for the prompt's content. */ export interface PureChatLLMInstructPrompt { - name: string; - template: string; + name: string; + template: string; } export type RoleType = "system" | "user" | "assistant" | "developer"; export interface ChatMessage { - role: RoleType; - content: string; - cline: EditorRange; + role: RoleType; + content: string; + cline: EditorRange; } export const PURE_CHAT_LLM_VIEW_TYPE = "pure-chat-llm-left-pane"; export const DEFAULT_PROCESS_CHAT_TEMPLATES: PureChatLLMInstructPrompts = { - "Conversation titler": { - name: "Conversation titler", - template: `Summarize the conversation in 5 words or fewer: + "Conversation titler": { + name: "Conversation titler", + template: `Summarize the conversation in 5 words or fewer: Be as concise as possible without losing the context of the conversation. Your goal is to extract the key point of the conversation.`, - }, - "Conversation analizer": { - name: "Conversation analizer", - template: `Analyze the conversation. + }, + "Conversation analizer": { + name: "Conversation analizer", + template: `Analyze the conversation. The role's are the \`user\` chatting with the \`assistant\` on the \`system\`. - The roles include the \`user\`, the \`assistant\`, and the \`system\` (instructions). @@ -179,48 +176,48 @@ Write a better system prompt based on what the user was trying to use the system Write another prompt by condensing all the user requests into one to get the final assistant response with just one user message. `, - }, + }, }; export const DEFAULT_SELECTION_TEMPLATES: PureChatLLMInstructPrompts = { - Summarize: { - name: "Summarize", - template: - "Create a bullet-point summary of the provided selection.\nEach bullet point should capture a key point.\nReturn only the bullet-point summary.", - }, - Simplify: { - name: "Simplify", - template: - "Simplify the provided selection to a 6th-grade reading level (ages 11-12).\nUse simple sentences, common words, and clear explanations.\nMaintain the original key concepts.\nReturn only the simplified selection.", - }, - "Add Emojis": { - name: "Add Emojis", - template: - "Add relevant emojis to enhance the provided selection. Follow these rules:\n1. Insert emojis at natural breaks in the text\n2. Never place two emojis next to each other\n3. Keep all original text unchanged\n4. Choose emojis that match the context and tone\nReturn only the emojified selection.", - }, - "Correct Grammar & Spelling": { - name: "Correct Grammar & Spelling", - template: - "Fix the grammar and spelling of the provided selection. Preserve all formatting, line breaks, and special characters. Do not add or remove any content. Return only the corrected text.", - }, - Concentrate: { - name: "Concentrate", - template: - "Reduce the provided selection to half its length while preserving the following elements:\n1. Main ideas and key points\n2. Essential details\n3. Original tone and style\nReturn only the shortened selection.", - }, - Expand: { - name: "Expand", - template: - "Expand the provided selection to twice its length by:\n1. Adding relevant details and examples\n2. Elaborating on key points\n3. Maintaining the original tone and style\nReturn only the expanded selection.", - }, - "Clarify & Expand Instructions": { - name: "Clarify & Expand Instructions", - template: - "The provided selection contains instructions that need to be expanded and clarified. Expand these instructions so that someone new to the task fully understands what needs to be done. Use clear, detailed explanations, examples if necessary, and break down any complex points into simpler parts. Ensure the expanded instructions maintain the original meaning and provide a comprehensive understanding. Return only the expanded instructions.", - }, - "Clarify & Expand Role Description": { - name: "Clarify & Expand Role Description", - template: - "The provided selection contains a brief role description. Expand and clarify this description by explaining the responsibilities, goals, and perspective someone playing this role should adopt. Use detailed and clear language, including relevant context or examples. Maintain the original intent while making the explanation comprehensive. Return only the expanded role description.", - }, + Summarize: { + name: "Summarize", + template: + "Create a bullet-point summary of the provided selection.\nEach bullet point should capture a key point.\nReturn only the bullet-point summary.", + }, + Simplify: { + name: "Simplify", + template: + "Simplify the provided selection to a 6th-grade reading level (ages 11-12).\nUse simple sentences, common words, and clear explanations.\nMaintain the original key concepts.\nReturn only the simplified selection.", + }, + "Add Emojis": { + name: "Add Emojis", + template: + "Add relevant emojis to enhance the provided selection. Follow these rules:\n1. Insert emojis at natural breaks in the text\n2. Never place two emojis next to each other\n3. Keep all original text unchanged\n4. Choose emojis that match the context and tone\nReturn only the emojified selection.", + }, + "Correct Grammar & Spelling": { + name: "Correct Grammar & Spelling", + template: + "Fix the grammar and spelling of the provided selection. Preserve all formatting, line breaks, and special characters. Do not add or remove any content. Return only the corrected text.", + }, + Concentrate: { + name: "Concentrate", + template: + "Reduce the provided selection to half its length while preserving the following elements:\n1. Main ideas and key points\n2. Essential details\n3. Original tone and style\nReturn only the shortened selection.", + }, + Expand: { + name: "Expand", + template: + "Expand the provided selection to twice its length by:\n1. Adding relevant details and examples\n2. Elaborating on key points\n3. Maintaining the original tone and style\nReturn only the expanded selection.", + }, + "Clarify & Expand Instructions": { + name: "Clarify & Expand Instructions", + template: + "The provided selection contains instructions that need to be expanded and clarified. Expand these instructions so that someone new to the task fully understands what needs to be done. Use clear, detailed explanations, examples if necessary, and break down any complex points into simpler parts. Ensure the expanded instructions maintain the original meaning and provide a comprehensive understanding. Return only the expanded instructions.", + }, + "Clarify & Expand Role Description": { + name: "Clarify & Expand Role Description", + template: + "The provided selection contains a brief role description. Expand and clarify this description by explaining the responsibilities, goals, and perspective someone playing this role should adopt. Use detailed and clear language, including relevant context or examples. Maintain the original intent while making the explanation comprehensive. Return only the expanded role description.", + }, }; diff --git a/styles.css b/styles.css index cf6f07f..077aca5 100644 --- a/styles.css +++ b/styles.css @@ -21,130 +21,130 @@ Customization: */ .PURE { - --noshadow: 0 0 0 var(--text-normal); - --littleshadow: 1px 1px 4px var(--text-normal); - --littleshadowhover: 4px 4px 16px var(--text-normal); - --bigshadow: 2px 2px 8px var(--text-normal); - --bigshadowhover: 8px 8px 32px var(--text-normal); + --noshadow: 0 0 0 var(--text-normal); + --littleshadow: 1px 1px 4px var(--text-normal); + --littleshadowhover: 4px 4px 16px var(--text-normal); + --bigshadow: 2px 2px 8px var(--text-normal); + --bigshadowhover: 8px 8px 32px var(--text-normal); } .PURE.floattop { - position: fixed; - top: 0; - left: 0; - width: 100%; - background-color: var(--background-secondary); - border-bottom: var(--border-width) solid var(--background-modifier-border); - padding: 1em; - z-index: 100; + position: fixed; + top: 0; + left: 0; + width: 100%; + background-color: var(--background-secondary); + border-bottom: var(--border-width) solid var(--background-modifier-border); + padding: 1em; + z-index: 100; } .PURE.messageContainer.user { - text-align: right; - gap: 10px; + text-align: right; + gap: 10px; } .PURE.messageContainer.system, .PURE.messageContainer.developer { - text-align: center; - gap: 10px; + text-align: center; + gap: 10px; } .PURE.messageContainer.assistant { - text-align: left; - gap: 10px; + text-align: left; + gap: 10px; } .PURE.messageHeader { - text-shadow: var(--noshadow); - transition: text-shadow 0.3s ease; + text-shadow: var(--noshadow); + transition: text-shadow 0.3s ease; } .PURE.messageHeader:hover { - text-shadow: var(--littleshadowhover); + text-shadow: var(--littleshadowhover); } .PURE.preview.user, .PURE.preview.system, .PURE.preview.developer, .PURE.preview.assistant { - max-width: 90%; - display: inline-block; + max-width: 90%; + display: inline-block; } .PURE.preview.user { - margin-left: auto; - margin-right: 0; + margin-left: auto; + margin-right: 0; } .PURE.preview.system, .PURE.preview.developer { - margin: auto; + margin: auto; } .PURE.preview.assistant { - margin-left: 0; - margin-right: auto; + margin-left: 0; + margin-right: auto; } .PURE.messageMarkdown { - padding: 0 var(--size-4-4); - max-height: 10em; - overflow: hidden; - border: var(--border-width) solid var(--background-modifier-border); - border-radius: var(--radius-m); - font-size: 0.75em; - text-align: left; - box-shadow: var(--bigshadow); - transition: box-shadow 0.3s ease; + padding: 0 var(--size-4-4); + max-height: 10em; + overflow: hidden; + border: var(--border-width) solid var(--background-modifier-border); + border-radius: var(--radius-m); + font-size: 0.75em; + text-align: left; + box-shadow: var(--bigshadow); + transition: box-shadow 0.3s ease; } .PURE.messageMarkdown:hover { - box-shadow: var(--bigshadowhover); + box-shadow: var(--bigshadowhover); } .PURE.messageMarkdown.user { - border-radius: 0 var(--radius-xl); + border-radius: 0 var(--radius-xl); } .PURE.messageMarkdown.assistant { - border-radius: var(--radius-xl) 0; + border-radius: var(--radius-xl) 0; } .PURE.messageMarkdown.system { - border-radius: var(--radius-xl) var(--radius-xl) 0 0; + border-radius: var(--radius-xl) var(--radius-xl) 0 0; } .PURE.messageMarkdown pre .copy-code-button { - display: none; + display: none; } .PURE.preview button { - margin: 0.5em; - box-shadow: var(--littleshadow); - transition: box-shadow 0.3s ease; + margin: 0.5em; + box-shadow: var(--littleshadow); + transition: box-shadow 0.3s ease; } .PURE.preview button:hover { - box-shadow: var(--littleshadowhover); + box-shadow: var(--littleshadowhover); } .PURE.preview.user button { - border-radius: 0 var(--radius-m); + border-radius: 0 var(--radius-m); } .PURE.preview.assistant button { - border-radius: var(--radius-m) 0; + border-radius: var(--radius-m) 0; } .PURE.setting-item textarea { - width: 100%; - height: 7em; - resize: none; + width: 100%; + height: 7em; + resize: none; } .PUREcodePreview { - width: 100%; - min-height: 10em; - resize: vertical; + width: 100%; + min-height: 10em; + resize: vertical; } diff --git a/versions.json b/versions.json index b2d353c..4306128 100644 --- a/versions.json +++ b/versions.json @@ -9,5 +9,6 @@ "1.1.1": "1.8.10", "1.1.2": "1.8.10", "1.1.3": "1.8.10", - "1.1.4": "1.8.10" + "1.1.4": "1.8.10", + "1.1.5": "1.8.10" } \ No newline at end of file