nsarrazin HF Staff commited on
Commit
acc3177
·
unverified ·
1 Parent(s): 252913a

feat: new MarkdownRenderer with tests (#1601)

Browse files

* feat: add new testing setup for Svelte components

* feat: rework markdown renderer

* test: add tests for markdown renderer

* test: add more tests for markdown renderer

* fix(test): skip failing tests

package-lock.json CHANGED
@@ -32,7 +32,6 @@
32
  "image-size": "^1.0.2",
33
  "ip-address": "^9.0.5",
34
  "jose": "^5.3.0",
35
- "jsdom": "^22.0.0",
36
  "json5": "^2.2.3",
37
  "jsonpath": "^1.1.1",
38
  "katex": "^0.16.11",
@@ -63,7 +62,10 @@
63
  "@iconify-json/eos-icons": "^1.1.6",
64
  "@sveltejs/adapter-node": "^5.2.0",
65
  "@sveltejs/kit": "^2.8.3",
 
66
  "@tailwindcss/typography": "^0.5.9",
 
 
67
  "@types/dompurify": "^3.0.5",
68
  "@types/express": "^4.17.21",
69
  "@types/js-yaml": "^4.0.9",
@@ -78,12 +80,14 @@
78
  "@types/uuid": "^9.0.8",
79
  "@typescript-eslint/eslint-plugin": "^6.x",
80
  "@typescript-eslint/parser": "^6.x",
 
81
  "dompurify": "^3.1.6",
82
  "eslint": "^8.28.0",
83
  "eslint-config-prettier": "^8.5.0",
84
  "eslint-plugin-svelte": "^2.30.0",
85
  "isomorphic-dompurify": "^2.13.0",
86
  "js-yaml": "^4.1.0",
 
87
  "minimist": "^1.2.8",
88
  "mongodb-memory-server": "^10.1.2",
89
  "prettier": "^2.8.0",
@@ -98,7 +102,7 @@
98
  "unplugin-icons": "^0.16.1",
99
  "vite": "^5.4.11",
100
  "vite-node": "^1.3.1",
101
- "vitest": "^2.1.4"
102
  },
103
  "optionalDependencies": {
104
  "@anthropic-ai/sdk": "^0.32.1",
@@ -111,6 +115,13 @@
111
  "openai": "^4.44.0"
112
  }
113
  },
 
 
 
 
 
 
 
114
  "node_modules/@alloc/quick-lru": {
115
  "version": "5.2.0",
116
  "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz",
@@ -1319,6 +1330,31 @@
1319
  "tslib": "^2.3.1"
1320
  }
1321
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1322
  "node_modules/@babel/runtime": {
1323
  "version": "7.25.6",
1324
  "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.6.tgz",
@@ -4073,17 +4109,17 @@
4073
  }
4074
  },
4075
  "node_modules/@sveltejs/vite-plugin-svelte": {
4076
- "version": "3.1.2",
4077
- "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-3.1.2.tgz",
4078
- "integrity": "sha512-Txsm1tJvtiYeLUVRNqxZGKR/mI+CzuIQuc2gn+YCs9rMTowpNZ2Nqt53JdL8KF9bLhAf2ruR/dr9eZCwdTriRA==",
4079
  "dev": true,
4080
- "peer": true,
4081
  "dependencies": {
4082
- "@sveltejs/vite-plugin-svelte-inspector": "^2.1.0",
4083
  "debug": "^4.3.4",
4084
  "deepmerge": "^4.3.1",
4085
  "kleur": "^4.1.5",
4086
- "magic-string": "^0.30.10",
4087
  "svelte-hmr": "^0.16.0",
4088
  "vitefu": "^0.2.5"
4089
  },
@@ -4100,7 +4136,6 @@
4100
  "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte-inspector/-/vite-plugin-svelte-inspector-2.1.0.tgz",
4101
  "integrity": "sha512-9QX28IymvBlSCqsCll5t0kQVxipsfhFFL+L2t3nTWfXnddYwxBuAEtTtlaVQpRz9c37BhJjltSeY4AJSC03SSg==",
4102
  "dev": true,
4103
- "peer": true,
4104
  "dependencies": {
4105
  "debug": "^4.3.4"
4106
  },
@@ -4128,19 +4163,99 @@
4128
  "tailwindcss": ">=3.0.0 || insiders || >=4.0.0-alpha.20"
4129
  }
4130
  },
4131
- "node_modules/@tokenizer/token": {
4132
- "version": "0.3.0",
4133
- "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz",
4134
- "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A=="
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4135
  },
4136
- "node_modules/@tootallnate/once": {
4137
- "version": "2.0.0",
4138
- "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz",
4139
- "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4140
  "engines": {
4141
  "node": ">= 10"
 
 
 
 
 
 
 
 
 
 
 
 
 
4142
  }
4143
  },
 
 
 
 
 
4144
  "node_modules/@tsconfig/node10": {
4145
  "version": "1.0.11",
4146
  "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz",
@@ -4165,6 +4280,13 @@
4165
  "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==",
4166
  "devOptional": true
4167
  },
 
 
 
 
 
 
 
4168
  "node_modules/@types/body-parser": {
4169
  "version": "1.19.5",
4170
  "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz",
@@ -4652,14 +4774,14 @@
4652
  "dev": true
4653
  },
4654
  "node_modules/@vitest/expect": {
4655
- "version": "2.1.4",
4656
- "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.1.4.tgz",
4657
- "integrity": "sha512-DOETT0Oh1avie/D/o2sgMHGrzYUFFo3zqESB2Hn70z6QB1HrS2IQ9z5DfyTqU8sg4Bpu13zZe9V4+UTNQlUeQA==",
4658
  "dev": true,
4659
  "license": "MIT",
4660
  "dependencies": {
4661
- "@vitest/spy": "2.1.4",
4662
- "@vitest/utils": "2.1.4",
4663
  "chai": "^5.1.2",
4664
  "tinyrainbow": "^1.2.0"
4665
  },
@@ -4668,13 +4790,13 @@
4668
  }
4669
  },
4670
  "node_modules/@vitest/mocker": {
4671
- "version": "2.1.4",
4672
- "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-2.1.4.tgz",
4673
- "integrity": "sha512-Ky/O1Lc0QBbutJdW0rqLeFNbuLEyS+mIPiNdlVlp2/yhJ0SbyYqObS5IHdhferJud8MbbwMnexg4jordE5cCoQ==",
4674
  "dev": true,
4675
  "license": "MIT",
4676
  "dependencies": {
4677
- "@vitest/spy": "2.1.4",
4678
  "estree-walker": "^3.0.3",
4679
  "magic-string": "^0.30.12"
4680
  },
@@ -4683,7 +4805,7 @@
4683
  },
4684
  "peerDependencies": {
4685
  "msw": "^2.4.9",
4686
- "vite": "^5.0.0"
4687
  },
4688
  "peerDependenciesMeta": {
4689
  "msw": {
@@ -4705,9 +4827,9 @@
4705
  }
4706
  },
4707
  "node_modules/@vitest/pretty-format": {
4708
- "version": "2.1.4",
4709
- "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.1.4.tgz",
4710
- "integrity": "sha512-L95zIAkEuTDbUX1IsjRl+vyBSLh3PwLLgKpghl37aCK9Jvw0iP+wKwIFhfjdUtA2myLgjrG6VU6JCFLv8q/3Ww==",
4711
  "dev": true,
4712
  "license": "MIT",
4713
  "dependencies": {
@@ -4718,13 +4840,13 @@
4718
  }
4719
  },
4720
  "node_modules/@vitest/runner": {
4721
- "version": "2.1.4",
4722
- "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-2.1.4.tgz",
4723
- "integrity": "sha512-sKRautINI9XICAMl2bjxQM8VfCMTB0EbsBc/EDFA57V6UQevEKY/TOPOF5nzcvCALltiLfXWbq4MaAwWx/YxIA==",
4724
  "dev": true,
4725
  "license": "MIT",
4726
  "dependencies": {
4727
- "@vitest/utils": "2.1.4",
4728
  "pathe": "^1.1.2"
4729
  },
4730
  "funding": {
@@ -4732,13 +4854,13 @@
4732
  }
4733
  },
4734
  "node_modules/@vitest/snapshot": {
4735
- "version": "2.1.4",
4736
- "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-2.1.4.tgz",
4737
- "integrity": "sha512-3Kab14fn/5QZRog5BPj6Rs8dc4B+mim27XaKWFWHWA87R56AKjHTGcBFKpvZKDzC4u5Wd0w/qKsUIio3KzWW4Q==",
4738
  "dev": true,
4739
  "license": "MIT",
4740
  "dependencies": {
4741
- "@vitest/pretty-format": "2.1.4",
4742
  "magic-string": "^0.30.12",
4743
  "pathe": "^1.1.2"
4744
  },
@@ -4747,9 +4869,9 @@
4747
  }
4748
  },
4749
  "node_modules/@vitest/spy": {
4750
- "version": "2.1.4",
4751
- "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-2.1.4.tgz",
4752
- "integrity": "sha512-4JOxa+UAizJgpZfaCPKK2smq9d8mmjZVPMt2kOsg/R8QkoRzydHH1qHxIYNvr1zlEaFj4SXiaaJWxq/LPLKaLg==",
4753
  "dev": true,
4754
  "license": "MIT",
4755
  "dependencies": {
@@ -4759,14 +4881,43 @@
4759
  "url": "https://opencollective.com/vitest"
4760
  }
4761
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4762
  "node_modules/@vitest/utils": {
4763
- "version": "2.1.4",
4764
- "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-2.1.4.tgz",
4765
- "integrity": "sha512-MXDnZn0Awl2S86PSNIim5PWXgIAx8CIkzu35mBdSApUip6RFOGXBCf3YFyeEu8n1IHk4bWD46DeYFu9mQlFIRg==",
4766
  "dev": true,
4767
  "license": "MIT",
4768
  "dependencies": {
4769
- "@vitest/pretty-format": "2.1.4",
4770
  "loupe": "^3.1.2",
4771
  "tinyrainbow": "^1.2.0"
4772
  },
@@ -4774,12 +4925,6 @@
4774
  "url": "https://opencollective.com/vitest"
4775
  }
4776
  },
4777
- "node_modules/abab": {
4778
- "version": "2.0.6",
4779
- "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz",
4780
- "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==",
4781
- "deprecated": "Use your platform's native atob() and btoa() methods instead"
4782
- },
4783
  "node_modules/abort-controller": {
4784
  "version": "3.0.0",
4785
  "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
@@ -4985,7 +5130,8 @@
4985
  "node_modules/asynckit": {
4986
  "version": "0.4.0",
4987
  "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
4988
- "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
 
4989
  },
4990
  "node_modules/atomic-sleep": {
4991
  "version": "1.0.0",
@@ -5756,6 +5902,7 @@
5756
  "version": "1.0.8",
5757
  "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
5758
  "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
 
5759
  "dependencies": {
5760
  "delayed-stream": "~1.0.0"
5761
  },
@@ -5882,6 +6029,13 @@
5882
  "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0"
5883
  }
5884
  },
 
 
 
 
 
 
 
5885
  "node_modules/cssesc": {
5886
  "version": "3.0.0",
5887
  "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz",
@@ -5894,27 +6048,30 @@
5894
  }
5895
  },
5896
  "node_modules/cssstyle": {
5897
- "version": "3.0.0",
5898
- "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-3.0.0.tgz",
5899
- "integrity": "sha512-N4u2ABATi3Qplzf0hWbVCdjenim8F3ojEXpBDF5hBpjzW182MjNGLqfmQ0SkSPeQ+V86ZXgeH8aXj6kayd4jgg==",
 
 
5900
  "dependencies": {
5901
- "rrweb-cssom": "^0.6.0"
5902
  },
5903
  "engines": {
5904
- "node": ">=14"
5905
  }
5906
  },
5907
  "node_modules/data-urls": {
5908
- "version": "4.0.0",
5909
- "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-4.0.0.tgz",
5910
- "integrity": "sha512-/mMTei/JXPqvFqQtfyTowxmJVwr2PVAeCcDxyFf6LhoOu/09TX2OX3kb2wzi4DMXcfj4OItwDOnhl5oziPnT6g==",
 
 
5911
  "dependencies": {
5912
- "abab": "^2.0.6",
5913
- "whatwg-mimetype": "^3.0.0",
5914
- "whatwg-url": "^12.0.0"
5915
  },
5916
  "engines": {
5917
- "node": ">=14"
5918
  }
5919
  },
5920
  "node_modules/date-fns": {
@@ -5959,7 +6116,8 @@
5959
  "node_modules/decimal.js": {
5960
  "version": "10.4.3",
5961
  "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz",
5962
- "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA=="
 
5963
  },
5964
  "node_modules/deep-eql": {
5965
  "version": "5.0.2",
@@ -6004,6 +6162,7 @@
6004
  "version": "1.0.0",
6005
  "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
6006
  "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
 
6007
  "engines": {
6008
  "node": ">=0.4.0"
6009
  }
@@ -6100,6 +6259,13 @@
6100
  "node": ">=6.0.0"
6101
  }
6102
  },
 
 
 
 
 
 
 
6103
  "node_modules/dom-serializer": {
6104
  "version": "2.0.0",
6105
  "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz",
@@ -6124,18 +6290,6 @@
6124
  }
6125
  ]
6126
  },
6127
- "node_modules/domexception": {
6128
- "version": "4.0.0",
6129
- "resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz",
6130
- "integrity": "sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==",
6131
- "deprecated": "Use your platform's native DOMException instead",
6132
- "dependencies": {
6133
- "webidl-conversions": "^7.0.0"
6134
- },
6135
- "engines": {
6136
- "node": ">=12"
6137
- }
6138
- },
6139
  "node_modules/domhandler": {
6140
  "version": "5.0.3",
6141
  "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz",
@@ -6265,6 +6419,13 @@
6265
  "node": ">= 0.4"
6266
  }
6267
  },
 
 
 
 
 
 
 
6268
  "node_modules/es6-promise": {
6269
  "version": "3.3.1",
6270
  "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz",
@@ -7138,6 +7299,7 @@
7138
  "version": "4.0.0",
7139
  "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
7140
  "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
 
7141
  "dependencies": {
7142
  "asynckit": "^0.4.0",
7143
  "combined-stream": "^1.0.8",
@@ -7585,14 +7747,16 @@
7585
  }
7586
  },
7587
  "node_modules/html-encoding-sniffer": {
7588
- "version": "3.0.0",
7589
- "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz",
7590
- "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==",
 
 
7591
  "dependencies": {
7592
- "whatwg-encoding": "^2.0.0"
7593
  },
7594
  "engines": {
7595
- "node": ">=12"
7596
  }
7597
  },
7598
  "node_modules/htmlparser2": {
@@ -7629,27 +7793,17 @@
7629
  }
7630
  },
7631
  "node_modules/http-proxy-agent": {
7632
- "version": "5.0.0",
7633
- "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz",
7634
- "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==",
7635
- "dependencies": {
7636
- "@tootallnate/once": "2",
7637
- "agent-base": "6",
7638
- "debug": "4"
7639
- },
7640
- "engines": {
7641
- "node": ">= 6"
7642
- }
7643
- },
7644
- "node_modules/http-proxy-agent/node_modules/agent-base": {
7645
- "version": "6.0.2",
7646
- "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
7647
- "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
7648
  "dependencies": {
7649
- "debug": "4"
 
7650
  },
7651
  "engines": {
7652
- "node": ">= 6.0.0"
7653
  }
7654
  },
7655
  "node_modules/https-proxy-agent": {
@@ -7783,6 +7937,16 @@
7783
  "node": ">=0.8.19"
7784
  }
7785
  },
 
 
 
 
 
 
 
 
 
 
7786
  "node_modules/inflight": {
7787
  "version": "1.0.6",
7788
  "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
@@ -7939,7 +8103,8 @@
7939
  "node_modules/is-potential-custom-element-name": {
7940
  "version": "1.0.1",
7941
  "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz",
7942
- "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ=="
 
7943
  },
7944
  "node_modules/is-reference": {
7945
  "version": "1.2.1",
@@ -7980,75 +8145,82 @@
7980
  "node": ">=18"
7981
  }
7982
  },
7983
- "node_modules/isomorphic-dompurify/node_modules/cssstyle": {
7984
- "version": "4.1.0",
7985
- "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-4.1.0.tgz",
7986
- "integrity": "sha512-h66W1URKpBS5YMI/V8PyXvTMFT8SupJ1IzoIV8IeBC/ji8WVmrO8dGlTi+2dh6whmdk6BiKJLD/ZBkhWbcg6nA==",
7987
- "dev": true,
7988
  "dependencies": {
7989
- "rrweb-cssom": "^0.7.1"
7990
  },
7991
- "engines": {
7992
- "node": ">=18"
 
 
 
7993
  }
7994
  },
7995
- "node_modules/isomorphic-dompurify/node_modules/data-urls": {
7996
- "version": "5.0.0",
7997
- "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-5.0.0.tgz",
7998
- "integrity": "sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==",
7999
- "dev": true,
8000
- "dependencies": {
8001
- "whatwg-mimetype": "^4.0.0",
8002
- "whatwg-url": "^14.0.0"
8003
- },
 
 
 
 
 
 
 
 
 
 
 
8004
  "engines": {
8005
- "node": ">=18"
8006
  }
8007
  },
8008
- "node_modules/isomorphic-dompurify/node_modules/html-encoding-sniffer": {
 
 
 
 
 
 
8009
  "version": "4.0.0",
8010
- "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-4.0.0.tgz",
8011
- "integrity": "sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==",
 
 
 
 
 
 
 
8012
  "dev": true,
8013
  "dependencies": {
8014
- "whatwg-encoding": "^3.1.1"
8015
  },
8016
- "engines": {
8017
- "node": ">=18"
8018
  }
8019
  },
8020
- "node_modules/isomorphic-dompurify/node_modules/http-proxy-agent": {
8021
- "version": "7.0.2",
8022
- "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz",
8023
- "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==",
8024
- "dev": true,
8025
- "dependencies": {
8026
- "agent-base": "^7.1.0",
8027
- "debug": "^4.3.4"
8028
- },
8029
- "engines": {
8030
- "node": ">= 14"
8031
- }
8032
- },
8033
- "node_modules/isomorphic-dompurify/node_modules/iconv-lite": {
8034
- "version": "0.6.3",
8035
- "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
8036
- "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
8037
- "dev": true,
8038
- "dependencies": {
8039
- "safer-buffer": ">= 2.1.2 < 3.0.0"
8040
- },
8041
- "engines": {
8042
- "node": ">=0.10.0"
8043
- }
8044
  },
8045
- "node_modules/isomorphic-dompurify/node_modules/jsdom": {
8046
- "version": "25.0.0",
8047
- "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-25.0.0.tgz",
8048
- "integrity": "sha512-OhoFVT59T7aEq75TVw9xxEfkXgacpqAhQaYgP9y/fDqWQCMB/b1H66RfmPm/MaeaAIU9nDwMOVTlPN51+ao6CQ==",
8049
  "dev": true,
 
8050
  "dependencies": {
8051
- "cssstyle": "^4.0.1",
8052
  "data-urls": "^5.0.0",
8053
  "decimal.js": "^10.4.3",
8054
  "form-data": "^4.0.0",
@@ -8061,7 +8233,7 @@
8061
  "rrweb-cssom": "^0.7.1",
8062
  "saxes": "^6.0.0",
8063
  "symbol-tree": "^3.2.4",
8064
- "tough-cookie": "^4.1.4",
8065
  "w3c-xmlserializer": "^5.0.0",
8066
  "webidl-conversions": "^7.0.0",
8067
  "whatwg-encoding": "^3.1.1",
@@ -8082,202 +8254,17 @@
8082
  }
8083
  }
8084
  },
8085
- "node_modules/isomorphic-dompurify/node_modules/rrweb-cssom": {
8086
- "version": "0.7.1",
8087
- "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.7.1.tgz",
8088
- "integrity": "sha512-TrEMa7JGdVm0UThDJSx7ddw5nVm3UJS9o9CCIZ72B1vSyEZoziDqBYP3XIoi/12lKrJR8rE3jeFHMok2F/Mnsg==",
8089
- "dev": true
8090
- },
8091
- "node_modules/isomorphic-dompurify/node_modules/tr46": {
8092
- "version": "5.0.0",
8093
- "resolved": "https://registry.npmjs.org/tr46/-/tr46-5.0.0.tgz",
8094
- "integrity": "sha512-tk2G5R2KRwBd+ZN0zaEXpmzdKyOYksXwywulIX95MBODjSzMIuQnQ3m8JxgbhnL1LeVo7lqQKsYa1O3Htl7K5g==",
8095
- "dev": true,
8096
- "dependencies": {
8097
- "punycode": "^2.3.1"
8098
- },
8099
- "engines": {
8100
- "node": ">=18"
8101
- }
8102
- },
8103
- "node_modules/isomorphic-dompurify/node_modules/w3c-xmlserializer": {
8104
  "version": "5.0.0",
8105
- "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz",
8106
- "integrity": "sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==",
8107
- "dev": true,
8108
- "dependencies": {
8109
- "xml-name-validator": "^5.0.0"
8110
- },
8111
- "engines": {
8112
- "node": ">=18"
8113
- }
8114
- },
8115
- "node_modules/isomorphic-dompurify/node_modules/whatwg-encoding": {
8116
- "version": "3.1.1",
8117
- "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz",
8118
- "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==",
8119
- "dev": true,
8120
- "dependencies": {
8121
- "iconv-lite": "0.6.3"
8122
- },
8123
- "engines": {
8124
- "node": ">=18"
8125
- }
8126
- },
8127
- "node_modules/isomorphic-dompurify/node_modules/whatwg-mimetype": {
8128
- "version": "4.0.0",
8129
- "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz",
8130
- "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==",
8131
- "dev": true,
8132
- "engines": {
8133
- "node": ">=18"
8134
- }
8135
- },
8136
- "node_modules/isomorphic-dompurify/node_modules/whatwg-url": {
8137
- "version": "14.0.0",
8138
- "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.0.0.tgz",
8139
- "integrity": "sha512-1lfMEm2IEr7RIV+f4lUNPOqfFL+pO+Xw3fJSqmjX9AbXcXcYOkCe1P6+9VBZB6n94af16NfZf+sSk0JCBZC9aw==",
8140
- "dev": true,
8141
- "dependencies": {
8142
- "tr46": "^5.0.0",
8143
- "webidl-conversions": "^7.0.0"
8144
- },
8145
- "engines": {
8146
- "node": ">=18"
8147
- }
8148
- },
8149
- "node_modules/isomorphic-dompurify/node_modules/xml-name-validator": {
8150
- "version": "5.0.0",
8151
- "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-5.0.0.tgz",
8152
- "integrity": "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==",
8153
- "dev": true,
8154
- "engines": {
8155
- "node": ">=18"
8156
- }
8157
- },
8158
- "node_modules/jackspeak": {
8159
- "version": "3.4.3",
8160
- "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz",
8161
- "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==",
8162
- "dependencies": {
8163
- "@isaacs/cliui": "^8.0.2"
8164
- },
8165
- "funding": {
8166
- "url": "https://github.com/sponsors/isaacs"
8167
- },
8168
- "optionalDependencies": {
8169
- "@pkgjs/parseargs": "^0.11.0"
8170
- }
8171
- },
8172
- "node_modules/jiti": {
8173
- "version": "1.21.6",
8174
- "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.6.tgz",
8175
- "integrity": "sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w==",
8176
- "bin": {
8177
- "jiti": "bin/jiti.js"
8178
- }
8179
- },
8180
- "node_modules/jose": {
8181
- "version": "5.8.0",
8182
- "resolved": "https://registry.npmjs.org/jose/-/jose-5.8.0.tgz",
8183
- "integrity": "sha512-E7CqYpL/t7MMnfGnK/eg416OsFCVUrU/Y3Vwe7QjKhu/BkS1Ms455+2xsqZQVN57/U2MHMBvEb5SrmAZWAIntA==",
8184
- "funding": {
8185
- "url": "https://github.com/sponsors/panva"
8186
- }
8187
- },
8188
- "node_modules/joycon": {
8189
- "version": "3.1.1",
8190
- "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz",
8191
- "integrity": "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==",
8192
- "engines": {
8193
- "node": ">=10"
8194
- }
8195
- },
8196
- "node_modules/js-base64": {
8197
- "version": "3.7.2",
8198
- "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-3.7.2.tgz",
8199
- "integrity": "sha512-NnRs6dsyqUXejqk/yv2aiXlAvOs56sLkX6nUdeaNezI5LFFLlsZjOThmwnrcwh5ZZRwZlCMnVAY3CvhIhoVEKQ==",
8200
- "optional": true
8201
- },
8202
- "node_modules/js-yaml": {
8203
- "version": "4.1.0",
8204
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
8205
- "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
8206
  "dev": true,
 
8207
  "dependencies": {
8208
- "argparse": "^2.0.1"
8209
- },
8210
- "bin": {
8211
- "js-yaml": "bin/js-yaml.js"
8212
- }
8213
- },
8214
- "node_modules/jsbn": {
8215
- "version": "1.1.0",
8216
- "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz",
8217
- "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A=="
8218
- },
8219
- "node_modules/jsdom": {
8220
- "version": "22.1.0",
8221
- "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-22.1.0.tgz",
8222
- "integrity": "sha512-/9AVW7xNbsBv6GfWho4TTNjEo9fe6Zhf9O7s0Fhhr3u+awPwAJMKwAMXnkk5vBxflqLW9hTHX/0cs+P3gW+cQw==",
8223
- "dependencies": {
8224
- "abab": "^2.0.6",
8225
- "cssstyle": "^3.0.0",
8226
- "data-urls": "^4.0.0",
8227
- "decimal.js": "^10.4.3",
8228
- "domexception": "^4.0.0",
8229
- "form-data": "^4.0.0",
8230
- "html-encoding-sniffer": "^3.0.0",
8231
- "http-proxy-agent": "^5.0.0",
8232
- "https-proxy-agent": "^5.0.1",
8233
- "is-potential-custom-element-name": "^1.0.1",
8234
- "nwsapi": "^2.2.4",
8235
- "parse5": "^7.1.2",
8236
- "rrweb-cssom": "^0.6.0",
8237
- "saxes": "^6.0.0",
8238
- "symbol-tree": "^3.2.4",
8239
- "tough-cookie": "^4.1.2",
8240
- "w3c-xmlserializer": "^4.0.0",
8241
- "webidl-conversions": "^7.0.0",
8242
- "whatwg-encoding": "^2.0.0",
8243
- "whatwg-mimetype": "^3.0.0",
8244
- "whatwg-url": "^12.0.1",
8245
- "ws": "^8.13.0",
8246
- "xml-name-validator": "^4.0.0"
8247
  },
8248
  "engines": {
8249
  "node": ">=16"
8250
- },
8251
- "peerDependencies": {
8252
- "canvas": "^2.5.0"
8253
- },
8254
- "peerDependenciesMeta": {
8255
- "canvas": {
8256
- "optional": true
8257
- }
8258
- }
8259
- },
8260
- "node_modules/jsdom/node_modules/agent-base": {
8261
- "version": "6.0.2",
8262
- "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
8263
- "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
8264
- "dependencies": {
8265
- "debug": "4"
8266
- },
8267
- "engines": {
8268
- "node": ">= 6.0.0"
8269
- }
8270
- },
8271
- "node_modules/jsdom/node_modules/https-proxy-agent": {
8272
- "version": "5.0.1",
8273
- "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
8274
- "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",
8275
- "dependencies": {
8276
- "agent-base": "6",
8277
- "debug": "4"
8278
- },
8279
- "engines": {
8280
- "node": ">= 6"
8281
  }
8282
  },
8283
  "node_modules/json-bigint": {
@@ -8600,6 +8587,13 @@
8600
  "url": "https://github.com/sponsors/sindresorhus"
8601
  }
8602
  },
 
 
 
 
 
 
 
8603
  "node_modules/lodash.castarray": {
8604
  "version": "4.4.0",
8605
  "resolved": "https://registry.npmjs.org/lodash.castarray/-/lodash.castarray-4.4.0.tgz",
@@ -8756,6 +8750,16 @@
8756
  "node": ">=10"
8757
  }
8758
  },
 
 
 
 
 
 
 
 
 
 
8759
  "node_modules/lzo": {
8760
  "version": "0.4.11",
8761
  "resolved": "https://registry.npmjs.org/lzo/-/lzo-0.4.11.tgz",
@@ -9577,7 +9581,8 @@
9577
  "node_modules/nwsapi": {
9578
  "version": "2.2.12",
9579
  "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.12.tgz",
9580
- "integrity": "sha512-qXDmcVlZV4XRtKFzddidpfVP4oMSGhga+xdMc25mv8kaLUHtgzCDhUxkrN8exkGdTlLNaXj7CV3GtON7zuGZ+w=="
 
9581
  },
9582
  "node_modules/object-assign": {
9583
  "version": "4.1.1",
@@ -9903,6 +9908,7 @@
9903
  "version": "7.1.2",
9904
  "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz",
9905
  "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==",
 
9906
  "dependencies": {
9907
  "entities": "^4.4.0"
9908
  },
@@ -10587,6 +10593,34 @@
10587
  }
10588
  }
10589
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10590
  "node_modules/process": {
10591
  "version": "0.11.10",
10592
  "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
@@ -10761,6 +10795,13 @@
10761
  "node": ">= 0.8"
10762
  }
10763
  },
 
 
 
 
 
 
 
10764
  "node_modules/read-cache": {
10765
  "version": "1.0.0",
10766
  "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz",
@@ -10803,6 +10844,20 @@
10803
  "node": ">= 12.13.0"
10804
  }
10805
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10806
  "node_modules/regenerator-runtime": {
10807
  "version": "0.14.1",
10808
  "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz",
@@ -10984,9 +11039,11 @@
10984
  }
10985
  },
10986
  "node_modules/rrweb-cssom": {
10987
- "version": "0.6.0",
10988
- "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.6.0.tgz",
10989
- "integrity": "sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw=="
 
 
10990
  },
10991
  "node_modules/run-parallel": {
10992
  "version": "1.2.0",
@@ -11178,6 +11235,7 @@
11178
  "version": "6.0.0",
11179
  "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz",
11180
  "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==",
 
11181
  "dependencies": {
11182
  "xmlchars": "^2.2.0"
11183
  },
@@ -11568,10 +11626,11 @@
11568
  }
11569
  },
11570
  "node_modules/std-env": {
11571
- "version": "3.7.0",
11572
- "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.7.0.tgz",
11573
- "integrity": "sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==",
11574
- "dev": true
 
11575
  },
11576
  "node_modules/streamx": {
11577
  "version": "2.20.1",
@@ -11894,7 +11953,6 @@
11894
  "resolved": "https://registry.npmjs.org/svelte-hmr/-/svelte-hmr-0.16.0.tgz",
11895
  "integrity": "sha512-Gyc7cOS3VJzLlfj7wKS0ZnzDVdv3Pn2IuVeJPk9m2skfhcu5bq3wtIZyQGggr7/Iim5rH5cncyQft/kRLupcnA==",
11896
  "dev": true,
11897
- "peer": true,
11898
  "engines": {
11899
  "node": "^12.20 || ^14.13.1 || >= 16"
11900
  },
@@ -11985,7 +12043,8 @@
11985
  "node_modules/symbol-tree": {
11986
  "version": "3.2.4",
11987
  "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz",
11988
- "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw=="
 
11989
  },
11990
  "node_modules/tailwind-scrollbar": {
11991
  "version": "3.1.0",
@@ -12252,6 +12311,48 @@
12252
  "dev": true,
12253
  "license": "MIT"
12254
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12255
  "node_modules/tinypool": {
12256
  "version": "1.0.1",
12257
  "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.0.1.tgz",
@@ -12282,10 +12383,24 @@
12282
  "node": ">=14.0.0"
12283
  }
12284
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
12285
  "node_modules/tldts-core": {
12286
- "version": "6.1.43",
12287
- "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.43.tgz",
12288
- "integrity": "sha512-iO1G3F2NqtmJUYlTfcH2liSdaqDnjpYn6iGftbLRNx8DF6IRIjbknVt+q0ijwZ2KGZX3J8zeYGFoiI+ZtHT5MQ=="
 
12289
  },
12290
  "node_modules/tldts-experimental": {
12291
  "version": "6.1.43",
@@ -12357,6 +12472,7 @@
12357
  "version": "4.1.1",
12358
  "resolved": "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz",
12359
  "integrity": "sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==",
 
12360
  "dependencies": {
12361
  "punycode": "^2.3.0"
12362
  },
@@ -12823,7 +12939,6 @@
12823
  "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-0.2.5.tgz",
12824
  "integrity": "sha512-SgHtMLoqaeeGnd2evZ849ZbACbnwQCIwRH57t18FxcXoZop0uQu0uzlIhJBlF/eWVzuce0sHeqPcDo+evVcg8Q==",
12825
  "dev": true,
12826
- "peer": true,
12827
  "peerDependencies": {
12828
  "vite": "^3.0.0 || ^4.0.0 || ^5.0.0"
12829
  },
@@ -12834,47 +12949,47 @@
12834
  }
12835
  },
12836
  "node_modules/vitest": {
12837
- "version": "2.1.4",
12838
- "resolved": "https://registry.npmjs.org/vitest/-/vitest-2.1.4.tgz",
12839
- "integrity": "sha512-eDjxbVAJw1UJJCHr5xr/xM86Zx+YxIEXGAR+bmnEID7z9qWfoxpHw0zdobz+TQAFOLT+nEXz3+gx6nUJ7RgmlQ==",
12840
  "dev": true,
12841
  "license": "MIT",
12842
  "dependencies": {
12843
- "@vitest/expect": "2.1.4",
12844
- "@vitest/mocker": "2.1.4",
12845
- "@vitest/pretty-format": "^2.1.4",
12846
- "@vitest/runner": "2.1.4",
12847
- "@vitest/snapshot": "2.1.4",
12848
- "@vitest/spy": "2.1.4",
12849
- "@vitest/utils": "2.1.4",
12850
  "chai": "^5.1.2",
12851
  "debug": "^4.3.7",
12852
  "expect-type": "^1.1.0",
12853
  "magic-string": "^0.30.12",
12854
  "pathe": "^1.1.2",
12855
- "std-env": "^3.7.0",
12856
  "tinybench": "^2.9.0",
12857
  "tinyexec": "^0.3.1",
12858
  "tinypool": "^1.0.1",
12859
  "tinyrainbow": "^1.2.0",
12860
- "vite": "^5.0.0",
12861
- "vite-node": "2.1.4",
12862
  "why-is-node-running": "^2.3.0"
12863
  },
12864
  "bin": {
12865
  "vitest": "vitest.mjs"
12866
  },
12867
  "engines": {
12868
- "node": "^18.0.0 || >=20.0.0"
12869
  },
12870
  "funding": {
12871
  "url": "https://opencollective.com/vitest"
12872
  },
12873
  "peerDependencies": {
12874
  "@edge-runtime/vm": "*",
12875
- "@types/node": "^18.0.0 || >=20.0.0",
12876
- "@vitest/browser": "2.1.4",
12877
- "@vitest/ui": "2.1.4",
12878
  "happy-dom": "*",
12879
  "jsdom": "*"
12880
  },
@@ -12900,36 +13015,39 @@
12900
  }
12901
  },
12902
  "node_modules/vitest/node_modules/vite-node": {
12903
- "version": "2.1.4",
12904
- "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-2.1.4.tgz",
12905
- "integrity": "sha512-kqa9v+oi4HwkG6g8ufRnb5AeplcRw8jUF6/7/Qz1qRQOXHImG8YnLbB+LLszENwFnoBl9xIf9nVdCFzNd7GQEg==",
12906
  "dev": true,
12907
  "license": "MIT",
12908
  "dependencies": {
12909
  "cac": "^6.7.14",
12910
  "debug": "^4.3.7",
 
12911
  "pathe": "^1.1.2",
12912
- "vite": "^5.0.0"
12913
  },
12914
  "bin": {
12915
  "vite-node": "vite-node.mjs"
12916
  },
12917
  "engines": {
12918
- "node": "^18.0.0 || >=20.0.0"
12919
  },
12920
  "funding": {
12921
  "url": "https://opencollective.com/vitest"
12922
  }
12923
  },
12924
  "node_modules/w3c-xmlserializer": {
12925
- "version": "4.0.0",
12926
- "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz",
12927
- "integrity": "sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==",
 
 
12928
  "dependencies": {
12929
- "xml-name-validator": "^4.0.0"
12930
  },
12931
  "engines": {
12932
- "node": ">=14"
12933
  }
12934
  },
12935
  "node_modules/web-streams-polyfill": {
@@ -12956,20 +13074,24 @@
12956
  "dev": true
12957
  },
12958
  "node_modules/whatwg-encoding": {
12959
- "version": "2.0.0",
12960
- "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz",
12961
- "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==",
 
 
12962
  "dependencies": {
12963
  "iconv-lite": "0.6.3"
12964
  },
12965
  "engines": {
12966
- "node": ">=12"
12967
  }
12968
  },
12969
  "node_modules/whatwg-encoding/node_modules/iconv-lite": {
12970
  "version": "0.6.3",
12971
  "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
12972
  "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
 
 
12973
  "dependencies": {
12974
  "safer-buffer": ">= 2.1.2 < 3.0.0"
12975
  },
@@ -12978,23 +13100,40 @@
12978
  }
12979
  },
12980
  "node_modules/whatwg-mimetype": {
12981
- "version": "3.0.0",
12982
- "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz",
12983
- "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==",
 
 
12984
  "engines": {
12985
- "node": ">=12"
12986
  }
12987
  },
12988
  "node_modules/whatwg-url": {
12989
- "version": "12.0.1",
12990
- "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-12.0.1.tgz",
12991
- "integrity": "sha512-Ed/LrqB8EPlGxjS+TrsXcpUond1mhccS3pchLhzSgPCnTimUCKj3IZE75pAs5m6heB2U2TMerKFUXheyHY+VDQ==",
 
 
12992
  "dependencies": {
12993
- "tr46": "^4.1.1",
12994
  "webidl-conversions": "^7.0.0"
12995
  },
12996
  "engines": {
12997
- "node": ">=14"
 
 
 
 
 
 
 
 
 
 
 
 
 
12998
  }
12999
  },
13000
  "node_modules/which": {
@@ -13161,17 +13300,20 @@
13161
  }
13162
  },
13163
  "node_modules/xml-name-validator": {
13164
- "version": "4.0.0",
13165
- "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz",
13166
- "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==",
 
 
13167
  "engines": {
13168
- "node": ">=12"
13169
  }
13170
  },
13171
  "node_modules/xmlchars": {
13172
  "version": "2.2.0",
13173
  "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz",
13174
- "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw=="
 
13175
  },
13176
  "node_modules/y18n": {
13177
  "version": "5.0.8",
 
32
  "image-size": "^1.0.2",
33
  "ip-address": "^9.0.5",
34
  "jose": "^5.3.0",
 
35
  "json5": "^2.2.3",
36
  "jsonpath": "^1.1.1",
37
  "katex": "^0.16.11",
 
62
  "@iconify-json/eos-icons": "^1.1.6",
63
  "@sveltejs/adapter-node": "^5.2.0",
64
  "@sveltejs/kit": "^2.8.3",
65
+ "@sveltejs/vite-plugin-svelte": "^3.1.0",
66
  "@tailwindcss/typography": "^0.5.9",
67
+ "@testing-library/jest-dom": "^6.6.3",
68
+ "@testing-library/svelte": "^5.2.6",
69
  "@types/dompurify": "^3.0.5",
70
  "@types/express": "^4.17.21",
71
  "@types/js-yaml": "^4.0.9",
 
80
  "@types/uuid": "^9.0.8",
81
  "@typescript-eslint/eslint-plugin": "^6.x",
82
  "@typescript-eslint/parser": "^6.x",
83
+ "@vitest/ui": "^2.1.6",
84
  "dompurify": "^3.1.6",
85
  "eslint": "^8.28.0",
86
  "eslint-config-prettier": "^8.5.0",
87
  "eslint-plugin-svelte": "^2.30.0",
88
  "isomorphic-dompurify": "^2.13.0",
89
  "js-yaml": "^4.1.0",
90
+ "jsdom": "^25.0.1",
91
  "minimist": "^1.2.8",
92
  "mongodb-memory-server": "^10.1.2",
93
  "prettier": "^2.8.0",
 
102
  "unplugin-icons": "^0.16.1",
103
  "vite": "^5.4.11",
104
  "vite-node": "^1.3.1",
105
+ "vitest": "^2.1.6"
106
  },
107
  "optionalDependencies": {
108
  "@anthropic-ai/sdk": "^0.32.1",
 
115
  "openai": "^4.44.0"
116
  }
117
  },
118
+ "node_modules/@adobe/css-tools": {
119
+ "version": "4.4.1",
120
+ "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.4.1.tgz",
121
+ "integrity": "sha512-12WGKBQzjUAI4ayyF4IAtfw2QR/IDoqk6jTddXDhtYTJF9ASmoE1zst7cVtP0aL/F1jUJL5r+JxKXKEgHNbEUQ==",
122
+ "dev": true,
123
+ "license": "MIT"
124
+ },
125
  "node_modules/@alloc/quick-lru": {
126
  "version": "5.2.0",
127
  "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz",
 
1330
  "tslib": "^2.3.1"
1331
  }
1332
  },
1333
+ "node_modules/@babel/code-frame": {
1334
+ "version": "7.26.2",
1335
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz",
1336
+ "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==",
1337
+ "dev": true,
1338
+ "license": "MIT",
1339
+ "dependencies": {
1340
+ "@babel/helper-validator-identifier": "^7.25.9",
1341
+ "js-tokens": "^4.0.0",
1342
+ "picocolors": "^1.0.0"
1343
+ },
1344
+ "engines": {
1345
+ "node": ">=6.9.0"
1346
+ }
1347
+ },
1348
+ "node_modules/@babel/helper-validator-identifier": {
1349
+ "version": "7.25.9",
1350
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz",
1351
+ "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==",
1352
+ "dev": true,
1353
+ "license": "MIT",
1354
+ "engines": {
1355
+ "node": ">=6.9.0"
1356
+ }
1357
+ },
1358
  "node_modules/@babel/runtime": {
1359
  "version": "7.25.6",
1360
  "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.6.tgz",
 
4109
  }
4110
  },
4111
  "node_modules/@sveltejs/vite-plugin-svelte": {
4112
+ "version": "3.1.0",
4113
+ "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-3.1.0.tgz",
4114
+ "integrity": "sha512-sY6ncCvg+O3njnzbZexcVtUqOBE3iYmQPJ9y+yXSkOwG576QI/xJrBnQSRXFLGwJNBa0T78JEKg5cIR0WOAuUw==",
4115
  "dev": true,
4116
+ "license": "MIT",
4117
  "dependencies": {
4118
+ "@sveltejs/vite-plugin-svelte-inspector": "^2.0.0",
4119
  "debug": "^4.3.4",
4120
  "deepmerge": "^4.3.1",
4121
  "kleur": "^4.1.5",
4122
+ "magic-string": "^0.30.9",
4123
  "svelte-hmr": "^0.16.0",
4124
  "vitefu": "^0.2.5"
4125
  },
 
4136
  "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte-inspector/-/vite-plugin-svelte-inspector-2.1.0.tgz",
4137
  "integrity": "sha512-9QX28IymvBlSCqsCll5t0kQVxipsfhFFL+L2t3nTWfXnddYwxBuAEtTtlaVQpRz9c37BhJjltSeY4AJSC03SSg==",
4138
  "dev": true,
 
4139
  "dependencies": {
4140
  "debug": "^4.3.4"
4141
  },
 
4163
  "tailwindcss": ">=3.0.0 || insiders || >=4.0.0-alpha.20"
4164
  }
4165
  },
4166
+ "node_modules/@testing-library/dom": {
4167
+ "version": "10.4.0",
4168
+ "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.0.tgz",
4169
+ "integrity": "sha512-pemlzrSESWbdAloYml3bAJMEfNh1Z7EduzqPKprCH5S341frlpYnUEW0H72dLxa6IsYr+mPno20GiSm+h9dEdQ==",
4170
+ "dev": true,
4171
+ "license": "MIT",
4172
+ "dependencies": {
4173
+ "@babel/code-frame": "^7.10.4",
4174
+ "@babel/runtime": "^7.12.5",
4175
+ "@types/aria-query": "^5.0.1",
4176
+ "aria-query": "5.3.0",
4177
+ "chalk": "^4.1.0",
4178
+ "dom-accessibility-api": "^0.5.9",
4179
+ "lz-string": "^1.5.0",
4180
+ "pretty-format": "^27.0.2"
4181
+ },
4182
+ "engines": {
4183
+ "node": ">=18"
4184
+ }
4185
  },
4186
+ "node_modules/@testing-library/jest-dom": {
4187
+ "version": "6.6.3",
4188
+ "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.6.3.tgz",
4189
+ "integrity": "sha512-IteBhl4XqYNkM54f4ejhLRJiZNqcSCoXUOG2CPK7qbD322KjQozM4kHQOfkG2oln9b9HTYqs+Sae8vBATubxxA==",
4190
+ "dev": true,
4191
+ "license": "MIT",
4192
+ "dependencies": {
4193
+ "@adobe/css-tools": "^4.4.0",
4194
+ "aria-query": "^5.0.0",
4195
+ "chalk": "^3.0.0",
4196
+ "css.escape": "^1.5.1",
4197
+ "dom-accessibility-api": "^0.6.3",
4198
+ "lodash": "^4.17.21",
4199
+ "redent": "^3.0.0"
4200
+ },
4201
+ "engines": {
4202
+ "node": ">=14",
4203
+ "npm": ">=6",
4204
+ "yarn": ">=1"
4205
+ }
4206
+ },
4207
+ "node_modules/@testing-library/jest-dom/node_modules/chalk": {
4208
+ "version": "3.0.0",
4209
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
4210
+ "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
4211
+ "dev": true,
4212
+ "license": "MIT",
4213
+ "dependencies": {
4214
+ "ansi-styles": "^4.1.0",
4215
+ "supports-color": "^7.1.0"
4216
+ },
4217
+ "engines": {
4218
+ "node": ">=8"
4219
+ }
4220
+ },
4221
+ "node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api": {
4222
+ "version": "0.6.3",
4223
+ "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.6.3.tgz",
4224
+ "integrity": "sha512-7ZgogeTnjuHbo+ct10G9Ffp0mif17idi0IyWNVA/wcwcm7NPOD/WEHVP3n7n3MhXqxoIYm8d6MuZohYWIZ4T3w==",
4225
+ "dev": true,
4226
+ "license": "MIT"
4227
+ },
4228
+ "node_modules/@testing-library/svelte": {
4229
+ "version": "5.2.6",
4230
+ "resolved": "https://registry.npmjs.org/@testing-library/svelte/-/svelte-5.2.6.tgz",
4231
+ "integrity": "sha512-1Y8cEg/BtV4J6g9irkY0ksz+ueDFYLiikjTLiqvQPkOUeDzR4gg2zECBf8yrOrCy3e2TAOYMcaysFa0bQMyk1w==",
4232
+ "dev": true,
4233
+ "license": "MIT",
4234
+ "dependencies": {
4235
+ "@testing-library/dom": "^10.0.0"
4236
+ },
4237
  "engines": {
4238
  "node": ">= 10"
4239
+ },
4240
+ "peerDependencies": {
4241
+ "svelte": "^3 || ^4 || ^5 || ^5.0.0-next.0",
4242
+ "vite": "*",
4243
+ "vitest": "*"
4244
+ },
4245
+ "peerDependenciesMeta": {
4246
+ "vite": {
4247
+ "optional": true
4248
+ },
4249
+ "vitest": {
4250
+ "optional": true
4251
+ }
4252
  }
4253
  },
4254
+ "node_modules/@tokenizer/token": {
4255
+ "version": "0.3.0",
4256
+ "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz",
4257
+ "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A=="
4258
+ },
4259
  "node_modules/@tsconfig/node10": {
4260
  "version": "1.0.11",
4261
  "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz",
 
4280
  "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==",
4281
  "devOptional": true
4282
  },
4283
+ "node_modules/@types/aria-query": {
4284
+ "version": "5.0.4",
4285
+ "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz",
4286
+ "integrity": "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==",
4287
+ "dev": true,
4288
+ "license": "MIT"
4289
+ },
4290
  "node_modules/@types/body-parser": {
4291
  "version": "1.19.5",
4292
  "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz",
 
4774
  "dev": true
4775
  },
4776
  "node_modules/@vitest/expect": {
4777
+ "version": "2.1.6",
4778
+ "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.1.6.tgz",
4779
+ "integrity": "sha512-9M1UR9CAmrhJOMoSwVnPh2rELPKhYo0m/CSgqw9PyStpxtkwhmdM6XYlXGKeYyERY1N6EIuzkQ7e3Lm1WKCoUg==",
4780
  "dev": true,
4781
  "license": "MIT",
4782
  "dependencies": {
4783
+ "@vitest/spy": "2.1.6",
4784
+ "@vitest/utils": "2.1.6",
4785
  "chai": "^5.1.2",
4786
  "tinyrainbow": "^1.2.0"
4787
  },
 
4790
  }
4791
  },
4792
  "node_modules/@vitest/mocker": {
4793
+ "version": "2.1.6",
4794
+ "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-2.1.6.tgz",
4795
+ "integrity": "sha512-MHZp2Z+Q/A3am5oD4WSH04f9B0T7UvwEb+v5W0kCYMhtXGYbdyl2NUk1wdSMqGthmhpiThPDp/hEoVwu16+u1A==",
4796
  "dev": true,
4797
  "license": "MIT",
4798
  "dependencies": {
4799
+ "@vitest/spy": "2.1.6",
4800
  "estree-walker": "^3.0.3",
4801
  "magic-string": "^0.30.12"
4802
  },
 
4805
  },
4806
  "peerDependencies": {
4807
  "msw": "^2.4.9",
4808
+ "vite": "^5.0.0 || ^6.0.0"
4809
  },
4810
  "peerDependenciesMeta": {
4811
  "msw": {
 
4827
  }
4828
  },
4829
  "node_modules/@vitest/pretty-format": {
4830
+ "version": "2.1.6",
4831
+ "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.1.6.tgz",
4832
+ "integrity": "sha512-exZyLcEnHgDMKc54TtHca4McV4sKT+NKAe9ix/yhd/qkYb/TP8HTyXRFDijV19qKqTZM0hPL4753zU/U8L/gAA==",
4833
  "dev": true,
4834
  "license": "MIT",
4835
  "dependencies": {
 
4840
  }
4841
  },
4842
  "node_modules/@vitest/runner": {
4843
+ "version": "2.1.6",
4844
+ "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-2.1.6.tgz",
4845
+ "integrity": "sha512-SjkRGSFyrA82m5nz7To4CkRSEVWn/rwQISHoia/DB8c6IHIhaE/UNAo+7UfeaeJRE979XceGl00LNkIz09RFsA==",
4846
  "dev": true,
4847
  "license": "MIT",
4848
  "dependencies": {
4849
+ "@vitest/utils": "2.1.6",
4850
  "pathe": "^1.1.2"
4851
  },
4852
  "funding": {
 
4854
  }
4855
  },
4856
  "node_modules/@vitest/snapshot": {
4857
+ "version": "2.1.6",
4858
+ "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-2.1.6.tgz",
4859
+ "integrity": "sha512-5JTWHw8iS9l3v4/VSuthCndw1lN/hpPB+mlgn1BUhFbobeIUj1J1V/Bj2t2ovGEmkXLTckFjQddsxS5T6LuVWw==",
4860
  "dev": true,
4861
  "license": "MIT",
4862
  "dependencies": {
4863
+ "@vitest/pretty-format": "2.1.6",
4864
  "magic-string": "^0.30.12",
4865
  "pathe": "^1.1.2"
4866
  },
 
4869
  }
4870
  },
4871
  "node_modules/@vitest/spy": {
4872
+ "version": "2.1.6",
4873
+ "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-2.1.6.tgz",
4874
+ "integrity": "sha512-oTFObV8bd4SDdRka5O+mSh5w9irgx5IetrD5i+OsUUsk/shsBoHifwCzy45SAORzAhtNiprUVaK3hSCCzZh1jQ==",
4875
  "dev": true,
4876
  "license": "MIT",
4877
  "dependencies": {
 
4881
  "url": "https://opencollective.com/vitest"
4882
  }
4883
  },
4884
+ "node_modules/@vitest/ui": {
4885
+ "version": "2.1.6",
4886
+ "resolved": "https://registry.npmjs.org/@vitest/ui/-/ui-2.1.6.tgz",
4887
+ "integrity": "sha512-SrpLAM0/xpOjXBDv3mayFh5TDEYM59fmEmJXgp1AqtpUWHVw4Tonp6Z9dVBhChU/Q+BY57m74nrQZK8vxKDrMQ==",
4888
+ "dev": true,
4889
+ "license": "MIT",
4890
+ "dependencies": {
4891
+ "@vitest/utils": "2.1.6",
4892
+ "fflate": "^0.8.2",
4893
+ "flatted": "^3.3.1",
4894
+ "pathe": "^1.1.2",
4895
+ "sirv": "^3.0.0",
4896
+ "tinyglobby": "^0.2.10",
4897
+ "tinyrainbow": "^1.2.0"
4898
+ },
4899
+ "funding": {
4900
+ "url": "https://opencollective.com/vitest"
4901
+ },
4902
+ "peerDependencies": {
4903
+ "vitest": "2.1.6"
4904
+ }
4905
+ },
4906
+ "node_modules/@vitest/ui/node_modules/fflate": {
4907
+ "version": "0.8.2",
4908
+ "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.2.tgz",
4909
+ "integrity": "sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==",
4910
+ "dev": true,
4911
+ "license": "MIT"
4912
+ },
4913
  "node_modules/@vitest/utils": {
4914
+ "version": "2.1.6",
4915
+ "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-2.1.6.tgz",
4916
+ "integrity": "sha512-ixNkFy3k4vokOUTU2blIUvOgKq/N2PW8vKIjZZYsGJCMX69MRa9J2sKqX5hY/k5O5Gty3YJChepkqZ3KM9LyIQ==",
4917
  "dev": true,
4918
  "license": "MIT",
4919
  "dependencies": {
4920
+ "@vitest/pretty-format": "2.1.6",
4921
  "loupe": "^3.1.2",
4922
  "tinyrainbow": "^1.2.0"
4923
  },
 
4925
  "url": "https://opencollective.com/vitest"
4926
  }
4927
  },
 
 
 
 
 
 
4928
  "node_modules/abort-controller": {
4929
  "version": "3.0.0",
4930
  "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
 
5130
  "node_modules/asynckit": {
5131
  "version": "0.4.0",
5132
  "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
5133
+ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
5134
+ "devOptional": true
5135
  },
5136
  "node_modules/atomic-sleep": {
5137
  "version": "1.0.0",
 
5902
  "version": "1.0.8",
5903
  "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
5904
  "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
5905
+ "devOptional": true,
5906
  "dependencies": {
5907
  "delayed-stream": "~1.0.0"
5908
  },
 
6029
  "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0"
6030
  }
6031
  },
6032
+ "node_modules/css.escape": {
6033
+ "version": "1.5.1",
6034
+ "resolved": "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz",
6035
+ "integrity": "sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==",
6036
+ "dev": true,
6037
+ "license": "MIT"
6038
+ },
6039
  "node_modules/cssesc": {
6040
  "version": "3.0.0",
6041
  "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz",
 
6048
  }
6049
  },
6050
  "node_modules/cssstyle": {
6051
+ "version": "4.1.0",
6052
+ "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-4.1.0.tgz",
6053
+ "integrity": "sha512-h66W1URKpBS5YMI/V8PyXvTMFT8SupJ1IzoIV8IeBC/ji8WVmrO8dGlTi+2dh6whmdk6BiKJLD/ZBkhWbcg6nA==",
6054
+ "dev": true,
6055
+ "license": "MIT",
6056
  "dependencies": {
6057
+ "rrweb-cssom": "^0.7.1"
6058
  },
6059
  "engines": {
6060
+ "node": ">=18"
6061
  }
6062
  },
6063
  "node_modules/data-urls": {
6064
+ "version": "5.0.0",
6065
+ "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-5.0.0.tgz",
6066
+ "integrity": "sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==",
6067
+ "dev": true,
6068
+ "license": "MIT",
6069
  "dependencies": {
6070
+ "whatwg-mimetype": "^4.0.0",
6071
+ "whatwg-url": "^14.0.0"
 
6072
  },
6073
  "engines": {
6074
+ "node": ">=18"
6075
  }
6076
  },
6077
  "node_modules/date-fns": {
 
6116
  "node_modules/decimal.js": {
6117
  "version": "10.4.3",
6118
  "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz",
6119
+ "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==",
6120
+ "dev": true
6121
  },
6122
  "node_modules/deep-eql": {
6123
  "version": "5.0.2",
 
6162
  "version": "1.0.0",
6163
  "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
6164
  "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
6165
+ "devOptional": true,
6166
  "engines": {
6167
  "node": ">=0.4.0"
6168
  }
 
6259
  "node": ">=6.0.0"
6260
  }
6261
  },
6262
+ "node_modules/dom-accessibility-api": {
6263
+ "version": "0.5.16",
6264
+ "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz",
6265
+ "integrity": "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==",
6266
+ "dev": true,
6267
+ "license": "MIT"
6268
+ },
6269
  "node_modules/dom-serializer": {
6270
  "version": "2.0.0",
6271
  "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz",
 
6290
  }
6291
  ]
6292
  },
 
 
 
 
 
 
 
 
 
 
 
 
6293
  "node_modules/domhandler": {
6294
  "version": "5.0.3",
6295
  "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz",
 
6419
  "node": ">= 0.4"
6420
  }
6421
  },
6422
+ "node_modules/es-module-lexer": {
6423
+ "version": "1.5.4",
6424
+ "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz",
6425
+ "integrity": "sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==",
6426
+ "dev": true,
6427
+ "license": "MIT"
6428
+ },
6429
  "node_modules/es6-promise": {
6430
  "version": "3.3.1",
6431
  "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz",
 
7299
  "version": "4.0.0",
7300
  "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
7301
  "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
7302
+ "devOptional": true,
7303
  "dependencies": {
7304
  "asynckit": "^0.4.0",
7305
  "combined-stream": "^1.0.8",
 
7747
  }
7748
  },
7749
  "node_modules/html-encoding-sniffer": {
7750
+ "version": "4.0.0",
7751
+ "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-4.0.0.tgz",
7752
+ "integrity": "sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==",
7753
+ "dev": true,
7754
+ "license": "MIT",
7755
  "dependencies": {
7756
+ "whatwg-encoding": "^3.1.1"
7757
  },
7758
  "engines": {
7759
+ "node": ">=18"
7760
  }
7761
  },
7762
  "node_modules/htmlparser2": {
 
7793
  }
7794
  },
7795
  "node_modules/http-proxy-agent": {
7796
+ "version": "7.0.2",
7797
+ "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz",
7798
+ "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==",
7799
+ "dev": true,
7800
+ "license": "MIT",
 
 
 
 
 
 
 
 
 
 
 
7801
  "dependencies": {
7802
+ "agent-base": "^7.1.0",
7803
+ "debug": "^4.3.4"
7804
  },
7805
  "engines": {
7806
+ "node": ">= 14"
7807
  }
7808
  },
7809
  "node_modules/https-proxy-agent": {
 
7937
  "node": ">=0.8.19"
7938
  }
7939
  },
7940
+ "node_modules/indent-string": {
7941
+ "version": "4.0.0",
7942
+ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz",
7943
+ "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==",
7944
+ "dev": true,
7945
+ "license": "MIT",
7946
+ "engines": {
7947
+ "node": ">=8"
7948
+ }
7949
+ },
7950
  "node_modules/inflight": {
7951
  "version": "1.0.6",
7952
  "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
 
8103
  "node_modules/is-potential-custom-element-name": {
8104
  "version": "1.0.1",
8105
  "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz",
8106
+ "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==",
8107
+ "dev": true
8108
  },
8109
  "node_modules/is-reference": {
8110
  "version": "1.2.1",
 
8145
  "node": ">=18"
8146
  }
8147
  },
8148
+ "node_modules/jackspeak": {
8149
+ "version": "3.4.3",
8150
+ "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz",
8151
+ "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==",
 
8152
  "dependencies": {
8153
+ "@isaacs/cliui": "^8.0.2"
8154
  },
8155
+ "funding": {
8156
+ "url": "https://github.com/sponsors/isaacs"
8157
+ },
8158
+ "optionalDependencies": {
8159
+ "@pkgjs/parseargs": "^0.11.0"
8160
  }
8161
  },
8162
+ "node_modules/jiti": {
8163
+ "version": "1.21.6",
8164
+ "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.6.tgz",
8165
+ "integrity": "sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w==",
8166
+ "bin": {
8167
+ "jiti": "bin/jiti.js"
8168
+ }
8169
+ },
8170
+ "node_modules/jose": {
8171
+ "version": "5.8.0",
8172
+ "resolved": "https://registry.npmjs.org/jose/-/jose-5.8.0.tgz",
8173
+ "integrity": "sha512-E7CqYpL/t7MMnfGnK/eg416OsFCVUrU/Y3Vwe7QjKhu/BkS1Ms455+2xsqZQVN57/U2MHMBvEb5SrmAZWAIntA==",
8174
+ "funding": {
8175
+ "url": "https://github.com/sponsors/panva"
8176
+ }
8177
+ },
8178
+ "node_modules/joycon": {
8179
+ "version": "3.1.1",
8180
+ "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz",
8181
+ "integrity": "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==",
8182
  "engines": {
8183
+ "node": ">=10"
8184
  }
8185
  },
8186
+ "node_modules/js-base64": {
8187
+ "version": "3.7.2",
8188
+ "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-3.7.2.tgz",
8189
+ "integrity": "sha512-NnRs6dsyqUXejqk/yv2aiXlAvOs56sLkX6nUdeaNezI5LFFLlsZjOThmwnrcwh5ZZRwZlCMnVAY3CvhIhoVEKQ==",
8190
+ "optional": true
8191
+ },
8192
+ "node_modules/js-tokens": {
8193
  "version": "4.0.0",
8194
+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
8195
+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
8196
+ "dev": true,
8197
+ "license": "MIT"
8198
+ },
8199
+ "node_modules/js-yaml": {
8200
+ "version": "4.1.0",
8201
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
8202
+ "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
8203
  "dev": true,
8204
  "dependencies": {
8205
+ "argparse": "^2.0.1"
8206
  },
8207
+ "bin": {
8208
+ "js-yaml": "bin/js-yaml.js"
8209
  }
8210
  },
8211
+ "node_modules/jsbn": {
8212
+ "version": "1.1.0",
8213
+ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz",
8214
+ "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A=="
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8215
  },
8216
+ "node_modules/jsdom": {
8217
+ "version": "25.0.1",
8218
+ "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-25.0.1.tgz",
8219
+ "integrity": "sha512-8i7LzZj7BF8uplX+ZyOlIz86V6TAsSs+np6m1kpW9u0JWi4z/1t+FzcK1aek+ybTnAC4KhBL4uXCNT0wcUIeCw==",
8220
  "dev": true,
8221
+ "license": "MIT",
8222
  "dependencies": {
8223
+ "cssstyle": "^4.1.0",
8224
  "data-urls": "^5.0.0",
8225
  "decimal.js": "^10.4.3",
8226
  "form-data": "^4.0.0",
 
8233
  "rrweb-cssom": "^0.7.1",
8234
  "saxes": "^6.0.0",
8235
  "symbol-tree": "^3.2.4",
8236
+ "tough-cookie": "^5.0.0",
8237
  "w3c-xmlserializer": "^5.0.0",
8238
  "webidl-conversions": "^7.0.0",
8239
  "whatwg-encoding": "^3.1.1",
 
8254
  }
8255
  }
8256
  },
8257
+ "node_modules/jsdom/node_modules/tough-cookie": {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8258
  "version": "5.0.0",
8259
+ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-5.0.0.tgz",
8260
+ "integrity": "sha512-FRKsF7cz96xIIeMZ82ehjC3xW2E+O2+v11udrDYewUbszngYhsGa8z6YUMMzO9QJZzzyd0nGGXnML/TReX6W8Q==",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8261
  "dev": true,
8262
+ "license": "BSD-3-Clause",
8263
  "dependencies": {
8264
+ "tldts": "^6.1.32"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8265
  },
8266
  "engines": {
8267
  "node": ">=16"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8268
  }
8269
  },
8270
  "node_modules/json-bigint": {
 
8587
  "url": "https://github.com/sponsors/sindresorhus"
8588
  }
8589
  },
8590
+ "node_modules/lodash": {
8591
+ "version": "4.17.21",
8592
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
8593
+ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
8594
+ "dev": true,
8595
+ "license": "MIT"
8596
+ },
8597
  "node_modules/lodash.castarray": {
8598
  "version": "4.4.0",
8599
  "resolved": "https://registry.npmjs.org/lodash.castarray/-/lodash.castarray-4.4.0.tgz",
 
8750
  "node": ">=10"
8751
  }
8752
  },
8753
+ "node_modules/lz-string": {
8754
+ "version": "1.5.0",
8755
+ "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz",
8756
+ "integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==",
8757
+ "dev": true,
8758
+ "license": "MIT",
8759
+ "bin": {
8760
+ "lz-string": "bin/bin.js"
8761
+ }
8762
+ },
8763
  "node_modules/lzo": {
8764
  "version": "0.4.11",
8765
  "resolved": "https://registry.npmjs.org/lzo/-/lzo-0.4.11.tgz",
 
9581
  "node_modules/nwsapi": {
9582
  "version": "2.2.12",
9583
  "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.12.tgz",
9584
+ "integrity": "sha512-qXDmcVlZV4XRtKFzddidpfVP4oMSGhga+xdMc25mv8kaLUHtgzCDhUxkrN8exkGdTlLNaXj7CV3GtON7zuGZ+w==",
9585
+ "dev": true
9586
  },
9587
  "node_modules/object-assign": {
9588
  "version": "4.1.1",
 
9908
  "version": "7.1.2",
9909
  "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz",
9910
  "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==",
9911
+ "dev": true,
9912
  "dependencies": {
9913
  "entities": "^4.4.0"
9914
  },
 
10593
  }
10594
  }
10595
  },
10596
+ "node_modules/pretty-format": {
10597
+ "version": "27.5.1",
10598
+ "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz",
10599
+ "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==",
10600
+ "dev": true,
10601
+ "license": "MIT",
10602
+ "dependencies": {
10603
+ "ansi-regex": "^5.0.1",
10604
+ "ansi-styles": "^5.0.0",
10605
+ "react-is": "^17.0.1"
10606
+ },
10607
+ "engines": {
10608
+ "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
10609
+ }
10610
+ },
10611
+ "node_modules/pretty-format/node_modules/ansi-styles": {
10612
+ "version": "5.2.0",
10613
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz",
10614
+ "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",
10615
+ "dev": true,
10616
+ "license": "MIT",
10617
+ "engines": {
10618
+ "node": ">=10"
10619
+ },
10620
+ "funding": {
10621
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
10622
+ }
10623
+ },
10624
  "node_modules/process": {
10625
  "version": "0.11.10",
10626
  "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
 
10795
  "node": ">= 0.8"
10796
  }
10797
  },
10798
+ "node_modules/react-is": {
10799
+ "version": "17.0.2",
10800
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
10801
+ "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==",
10802
+ "dev": true,
10803
+ "license": "MIT"
10804
+ },
10805
  "node_modules/read-cache": {
10806
  "version": "1.0.0",
10807
  "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz",
 
10844
  "node": ">= 12.13.0"
10845
  }
10846
  },
10847
+ "node_modules/redent": {
10848
+ "version": "3.0.0",
10849
+ "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz",
10850
+ "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==",
10851
+ "dev": true,
10852
+ "license": "MIT",
10853
+ "dependencies": {
10854
+ "indent-string": "^4.0.0",
10855
+ "strip-indent": "^3.0.0"
10856
+ },
10857
+ "engines": {
10858
+ "node": ">=8"
10859
+ }
10860
+ },
10861
  "node_modules/regenerator-runtime": {
10862
  "version": "0.14.1",
10863
  "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz",
 
11039
  }
11040
  },
11041
  "node_modules/rrweb-cssom": {
11042
+ "version": "0.7.1",
11043
+ "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.7.1.tgz",
11044
+ "integrity": "sha512-TrEMa7JGdVm0UThDJSx7ddw5nVm3UJS9o9CCIZ72B1vSyEZoziDqBYP3XIoi/12lKrJR8rE3jeFHMok2F/Mnsg==",
11045
+ "dev": true,
11046
+ "license": "MIT"
11047
  },
11048
  "node_modules/run-parallel": {
11049
  "version": "1.2.0",
 
11235
  "version": "6.0.0",
11236
  "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz",
11237
  "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==",
11238
+ "dev": true,
11239
  "dependencies": {
11240
  "xmlchars": "^2.2.0"
11241
  },
 
11626
  }
11627
  },
11628
  "node_modules/std-env": {
11629
+ "version": "3.8.0",
11630
+ "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.8.0.tgz",
11631
+ "integrity": "sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w==",
11632
+ "dev": true,
11633
+ "license": "MIT"
11634
  },
11635
  "node_modules/streamx": {
11636
  "version": "2.20.1",
 
11953
  "resolved": "https://registry.npmjs.org/svelte-hmr/-/svelte-hmr-0.16.0.tgz",
11954
  "integrity": "sha512-Gyc7cOS3VJzLlfj7wKS0ZnzDVdv3Pn2IuVeJPk9m2skfhcu5bq3wtIZyQGggr7/Iim5rH5cncyQft/kRLupcnA==",
11955
  "dev": true,
 
11956
  "engines": {
11957
  "node": "^12.20 || ^14.13.1 || >= 16"
11958
  },
 
12043
  "node_modules/symbol-tree": {
12044
  "version": "3.2.4",
12045
  "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz",
12046
+ "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==",
12047
+ "dev": true
12048
  },
12049
  "node_modules/tailwind-scrollbar": {
12050
  "version": "3.1.0",
 
12311
  "dev": true,
12312
  "license": "MIT"
12313
  },
12314
+ "node_modules/tinyglobby": {
12315
+ "version": "0.2.10",
12316
+ "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.10.tgz",
12317
+ "integrity": "sha512-Zc+8eJlFMvgatPZTl6A9L/yht8QqdmUNtURHaKZLmKBE12hNPSrqNkUp2cs3M/UKmNVVAMFQYSjYIVHDjW5zew==",
12318
+ "dev": true,
12319
+ "license": "MIT",
12320
+ "dependencies": {
12321
+ "fdir": "^6.4.2",
12322
+ "picomatch": "^4.0.2"
12323
+ },
12324
+ "engines": {
12325
+ "node": ">=12.0.0"
12326
+ }
12327
+ },
12328
+ "node_modules/tinyglobby/node_modules/fdir": {
12329
+ "version": "6.4.2",
12330
+ "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.2.tgz",
12331
+ "integrity": "sha512-KnhMXsKSPZlAhp7+IjUkRZKPb4fUyccpDrdFXbi4QL1qkmFh9kVY09Yox+n4MaOb3lHZ1Tv829C3oaaXoMYPDQ==",
12332
+ "dev": true,
12333
+ "license": "MIT",
12334
+ "peerDependencies": {
12335
+ "picomatch": "^3 || ^4"
12336
+ },
12337
+ "peerDependenciesMeta": {
12338
+ "picomatch": {
12339
+ "optional": true
12340
+ }
12341
+ }
12342
+ },
12343
+ "node_modules/tinyglobby/node_modules/picomatch": {
12344
+ "version": "4.0.2",
12345
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz",
12346
+ "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==",
12347
+ "dev": true,
12348
+ "license": "MIT",
12349
+ "engines": {
12350
+ "node": ">=12"
12351
+ },
12352
+ "funding": {
12353
+ "url": "https://github.com/sponsors/jonschlinkert"
12354
+ }
12355
+ },
12356
  "node_modules/tinypool": {
12357
  "version": "1.0.1",
12358
  "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.0.1.tgz",
 
12383
  "node": ">=14.0.0"
12384
  }
12385
  },
12386
+ "node_modules/tldts": {
12387
+ "version": "6.1.64",
12388
+ "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.64.tgz",
12389
+ "integrity": "sha512-ph4AE5BXWIOsSy9stpoeo7bYe/Cy7VfpciIH4RhVZUPItCJmhqWCN0EVzxd8BOHiyNb42vuJc6NWTjJkg91Tuw==",
12390
+ "dev": true,
12391
+ "license": "MIT",
12392
+ "dependencies": {
12393
+ "tldts-core": "^6.1.64"
12394
+ },
12395
+ "bin": {
12396
+ "tldts": "bin/cli.js"
12397
+ }
12398
+ },
12399
  "node_modules/tldts-core": {
12400
+ "version": "6.1.64",
12401
+ "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.64.tgz",
12402
+ "integrity": "sha512-uqnl8vGV16KsyflHOzqrYjjArjfXaU6rMPXYy2/ZWoRKCkXtghgB4VwTDXUG+t0OTGeSewNAG31/x1gCTfLt+Q==",
12403
+ "license": "MIT"
12404
  },
12405
  "node_modules/tldts-experimental": {
12406
  "version": "6.1.43",
 
12472
  "version": "4.1.1",
12473
  "resolved": "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz",
12474
  "integrity": "sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==",
12475
+ "dev": true,
12476
  "dependencies": {
12477
  "punycode": "^2.3.0"
12478
  },
 
12939
  "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-0.2.5.tgz",
12940
  "integrity": "sha512-SgHtMLoqaeeGnd2evZ849ZbACbnwQCIwRH57t18FxcXoZop0uQu0uzlIhJBlF/eWVzuce0sHeqPcDo+evVcg8Q==",
12941
  "dev": true,
 
12942
  "peerDependencies": {
12943
  "vite": "^3.0.0 || ^4.0.0 || ^5.0.0"
12944
  },
 
12949
  }
12950
  },
12951
  "node_modules/vitest": {
12952
+ "version": "2.1.6",
12953
+ "resolved": "https://registry.npmjs.org/vitest/-/vitest-2.1.6.tgz",
12954
+ "integrity": "sha512-isUCkvPL30J4c5O5hgONeFRsDmlw6kzFEdLQHLezmDdKQHy8Ke/B/dgdTMEgU0vm+iZ0TjW8GuK83DiahBoKWQ==",
12955
  "dev": true,
12956
  "license": "MIT",
12957
  "dependencies": {
12958
+ "@vitest/expect": "2.1.6",
12959
+ "@vitest/mocker": "2.1.6",
12960
+ "@vitest/pretty-format": "^2.1.6",
12961
+ "@vitest/runner": "2.1.6",
12962
+ "@vitest/snapshot": "2.1.6",
12963
+ "@vitest/spy": "2.1.6",
12964
+ "@vitest/utils": "2.1.6",
12965
  "chai": "^5.1.2",
12966
  "debug": "^4.3.7",
12967
  "expect-type": "^1.1.0",
12968
  "magic-string": "^0.30.12",
12969
  "pathe": "^1.1.2",
12970
+ "std-env": "^3.8.0",
12971
  "tinybench": "^2.9.0",
12972
  "tinyexec": "^0.3.1",
12973
  "tinypool": "^1.0.1",
12974
  "tinyrainbow": "^1.2.0",
12975
+ "vite": "^5.0.0 || ^6.0.0",
12976
+ "vite-node": "2.1.6",
12977
  "why-is-node-running": "^2.3.0"
12978
  },
12979
  "bin": {
12980
  "vitest": "vitest.mjs"
12981
  },
12982
  "engines": {
12983
+ "node": "^18.0.0 || ^20.0.0 || >=22.0.0"
12984
  },
12985
  "funding": {
12986
  "url": "https://opencollective.com/vitest"
12987
  },
12988
  "peerDependencies": {
12989
  "@edge-runtime/vm": "*",
12990
+ "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0",
12991
+ "@vitest/browser": "2.1.6",
12992
+ "@vitest/ui": "2.1.6",
12993
  "happy-dom": "*",
12994
  "jsdom": "*"
12995
  },
 
13015
  }
13016
  },
13017
  "node_modules/vitest/node_modules/vite-node": {
13018
+ "version": "2.1.6",
13019
+ "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-2.1.6.tgz",
13020
+ "integrity": "sha512-DBfJY0n9JUwnyLxPSSUmEePT21j8JZp/sR9n+/gBwQU6DcQOioPdb8/pibWfXForbirSagZCilseYIwaL3f95A==",
13021
  "dev": true,
13022
  "license": "MIT",
13023
  "dependencies": {
13024
  "cac": "^6.7.14",
13025
  "debug": "^4.3.7",
13026
+ "es-module-lexer": "^1.5.4",
13027
  "pathe": "^1.1.2",
13028
+ "vite": "^5.0.0 || ^6.0.0"
13029
  },
13030
  "bin": {
13031
  "vite-node": "vite-node.mjs"
13032
  },
13033
  "engines": {
13034
+ "node": "^18.0.0 || ^20.0.0 || >=22.0.0"
13035
  },
13036
  "funding": {
13037
  "url": "https://opencollective.com/vitest"
13038
  }
13039
  },
13040
  "node_modules/w3c-xmlserializer": {
13041
+ "version": "5.0.0",
13042
+ "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz",
13043
+ "integrity": "sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==",
13044
+ "dev": true,
13045
+ "license": "MIT",
13046
  "dependencies": {
13047
+ "xml-name-validator": "^5.0.0"
13048
  },
13049
  "engines": {
13050
+ "node": ">=18"
13051
  }
13052
  },
13053
  "node_modules/web-streams-polyfill": {
 
13074
  "dev": true
13075
  },
13076
  "node_modules/whatwg-encoding": {
13077
+ "version": "3.1.1",
13078
+ "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz",
13079
+ "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==",
13080
+ "dev": true,
13081
+ "license": "MIT",
13082
  "dependencies": {
13083
  "iconv-lite": "0.6.3"
13084
  },
13085
  "engines": {
13086
+ "node": ">=18"
13087
  }
13088
  },
13089
  "node_modules/whatwg-encoding/node_modules/iconv-lite": {
13090
  "version": "0.6.3",
13091
  "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
13092
  "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
13093
+ "dev": true,
13094
+ "license": "MIT",
13095
  "dependencies": {
13096
  "safer-buffer": ">= 2.1.2 < 3.0.0"
13097
  },
 
13100
  }
13101
  },
13102
  "node_modules/whatwg-mimetype": {
13103
+ "version": "4.0.0",
13104
+ "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz",
13105
+ "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==",
13106
+ "dev": true,
13107
+ "license": "MIT",
13108
  "engines": {
13109
+ "node": ">=18"
13110
  }
13111
  },
13112
  "node_modules/whatwg-url": {
13113
+ "version": "14.0.0",
13114
+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.0.0.tgz",
13115
+ "integrity": "sha512-1lfMEm2IEr7RIV+f4lUNPOqfFL+pO+Xw3fJSqmjX9AbXcXcYOkCe1P6+9VBZB6n94af16NfZf+sSk0JCBZC9aw==",
13116
+ "dev": true,
13117
+ "license": "MIT",
13118
  "dependencies": {
13119
+ "tr46": "^5.0.0",
13120
  "webidl-conversions": "^7.0.0"
13121
  },
13122
  "engines": {
13123
+ "node": ">=18"
13124
+ }
13125
+ },
13126
+ "node_modules/whatwg-url/node_modules/tr46": {
13127
+ "version": "5.0.0",
13128
+ "resolved": "https://registry.npmjs.org/tr46/-/tr46-5.0.0.tgz",
13129
+ "integrity": "sha512-tk2G5R2KRwBd+ZN0zaEXpmzdKyOYksXwywulIX95MBODjSzMIuQnQ3m8JxgbhnL1LeVo7lqQKsYa1O3Htl7K5g==",
13130
+ "dev": true,
13131
+ "license": "MIT",
13132
+ "dependencies": {
13133
+ "punycode": "^2.3.1"
13134
+ },
13135
+ "engines": {
13136
+ "node": ">=18"
13137
  }
13138
  },
13139
  "node_modules/which": {
 
13300
  }
13301
  },
13302
  "node_modules/xml-name-validator": {
13303
+ "version": "5.0.0",
13304
+ "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-5.0.0.tgz",
13305
+ "integrity": "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==",
13306
+ "dev": true,
13307
+ "license": "Apache-2.0",
13308
  "engines": {
13309
+ "node": ">=18"
13310
  }
13311
  },
13312
  "node_modules/xmlchars": {
13313
  "version": "2.2.0",
13314
  "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz",
13315
+ "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==",
13316
+ "dev": true
13317
  },
13318
  "node_modules/y18n": {
13319
  "version": "5.0.8",
package.json CHANGED
@@ -22,7 +22,10 @@
22
  "@iconify-json/eos-icons": "^1.1.6",
23
  "@sveltejs/adapter-node": "^5.2.0",
24
  "@sveltejs/kit": "^2.8.3",
 
25
  "@tailwindcss/typography": "^0.5.9",
 
 
26
  "@types/dompurify": "^3.0.5",
27
  "@types/express": "^4.17.21",
28
  "@types/js-yaml": "^4.0.9",
@@ -37,12 +40,14 @@
37
  "@types/uuid": "^9.0.8",
38
  "@typescript-eslint/eslint-plugin": "^6.x",
39
  "@typescript-eslint/parser": "^6.x",
 
40
  "dompurify": "^3.1.6",
41
  "eslint": "^8.28.0",
42
  "eslint-config-prettier": "^8.5.0",
43
  "eslint-plugin-svelte": "^2.30.0",
44
  "isomorphic-dompurify": "^2.13.0",
45
  "js-yaml": "^4.1.0",
 
46
  "minimist": "^1.2.8",
47
  "mongodb-memory-server": "^10.1.2",
48
  "prettier": "^2.8.0",
@@ -57,7 +62,7 @@
57
  "unplugin-icons": "^0.16.1",
58
  "vite": "^5.4.11",
59
  "vite-node": "^1.3.1",
60
- "vitest": "^2.1.4"
61
  },
62
  "type": "module",
63
  "dependencies": {
@@ -85,7 +90,6 @@
85
  "image-size": "^1.0.2",
86
  "ip-address": "^9.0.5",
87
  "jose": "^5.3.0",
88
- "jsdom": "^22.0.0",
89
  "json5": "^2.2.3",
90
  "jsonpath": "^1.1.1",
91
  "katex": "^0.16.11",
 
22
  "@iconify-json/eos-icons": "^1.1.6",
23
  "@sveltejs/adapter-node": "^5.2.0",
24
  "@sveltejs/kit": "^2.8.3",
25
+ "@sveltejs/vite-plugin-svelte": "^3.1.0",
26
  "@tailwindcss/typography": "^0.5.9",
27
+ "@testing-library/jest-dom": "^6.6.3",
28
+ "@testing-library/svelte": "^5.2.6",
29
  "@types/dompurify": "^3.0.5",
30
  "@types/express": "^4.17.21",
31
  "@types/js-yaml": "^4.0.9",
 
40
  "@types/uuid": "^9.0.8",
41
  "@typescript-eslint/eslint-plugin": "^6.x",
42
  "@typescript-eslint/parser": "^6.x",
43
+ "@vitest/ui": "^2.1.6",
44
  "dompurify": "^3.1.6",
45
  "eslint": "^8.28.0",
46
  "eslint-config-prettier": "^8.5.0",
47
  "eslint-plugin-svelte": "^2.30.0",
48
  "isomorphic-dompurify": "^2.13.0",
49
  "js-yaml": "^4.1.0",
50
+ "jsdom": "^25.0.1",
51
  "minimist": "^1.2.8",
52
  "mongodb-memory-server": "^10.1.2",
53
  "prettier": "^2.8.0",
 
62
  "unplugin-icons": "^0.16.1",
63
  "vite": "^5.4.11",
64
  "vite-node": "^1.3.1",
65
+ "vitest": "^2.1.6"
66
  },
67
  "type": "module",
68
  "dependencies": {
 
90
  "image-size": "^1.0.2",
91
  "ip-address": "^9.0.5",
92
  "jose": "^5.3.0",
 
93
  "json5": "^2.2.3",
94
  "jsonpath": "^1.1.1",
95
  "katex": "^0.16.11",
scripts/setupTest.ts CHANGED
@@ -3,6 +3,7 @@ import dotenv from "dotenv";
3
  import { resolve } from "path";
4
  import fs from "fs";
5
  import { MongoMemoryServer } from "mongodb-memory-server";
 
6
 
7
  let mongoServer: MongoMemoryServer;
8
  // Load the .env file
 
3
  import { resolve } from "path";
4
  import fs from "fs";
5
  import { MongoMemoryServer } from "mongodb-memory-server";
6
+ import "@testing-library/jest-dom/vitest";
7
 
8
  let mongoServer: MongoMemoryServer;
9
  // Load the .env file
src/lib/components/chat/MarkdownRenderer.spec.ts ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import MarkdownRenderer from "./MarkdownRenderer.svelte";
2
+ import { describe, expect, it } from "vitest";
3
+ import { render, screen } from "@testing-library/svelte";
4
+
5
+ describe("MarkdownRenderer", () => {
6
+ it("renders", () => {
7
+ render(MarkdownRenderer, { content: "Hello, world!" });
8
+ });
9
+ it("renders headings", () => {
10
+ render(MarkdownRenderer, { content: "# Hello, world!" });
11
+ expect(screen.getByRole("heading", { level: 1 })).toBeInTheDocument();
12
+ });
13
+ it("renders links", () => {
14
+ render(MarkdownRenderer, { content: "[Hello, world!](https://example.com)" });
15
+ const link = screen.getByRole("link", { name: "Hello, world!" });
16
+ expect(link).toBeInTheDocument();
17
+ expect(link).toHaveAttribute("href", "https://example.com");
18
+ expect(link).toHaveAttribute("target", "_blank");
19
+ expect(link).toHaveAttribute("rel", "noreferrer");
20
+ });
21
+ it("renders inline codespans", () => {
22
+ render(MarkdownRenderer, { content: "`foobar`" });
23
+ expect(screen.getByText("foobar")).toHaveProperty("tagName", "CODE");
24
+ });
25
+ it("renders block codes", () => {
26
+ render(MarkdownRenderer, { content: "```foobar```" });
27
+ expect(screen.getByText("foobar")).toHaveProperty("tagName", "CODE");
28
+ });
29
+ it("renders sources correctly", () => {
30
+ const props = {
31
+ content: "Hello there [1]",
32
+ sources: [
33
+ {
34
+ title: "foo",
35
+ link: "https://example.com",
36
+ },
37
+ ],
38
+ };
39
+ render(MarkdownRenderer, props);
40
+
41
+ const link = screen.getByRole("link");
42
+ expect(link).toBeInTheDocument();
43
+ expect(link).toHaveAttribute("href", "https://example.com");
44
+ expect(link).toHaveAttribute("target", "_blank");
45
+ expect(link).toHaveAttribute("rel", "noreferrer");
46
+ });
47
+ it("handles groups of sources", () => {
48
+ render(MarkdownRenderer, {
49
+ content: "Hello there [1], [2], [3]",
50
+ sources: [
51
+ {
52
+ title: "foo",
53
+ link: "https://foo.com",
54
+ },
55
+ {
56
+ title: "bar",
57
+ link: "https://bar.com",
58
+ },
59
+ {
60
+ title: "baz",
61
+ link: "https://baz.com",
62
+ },
63
+ ],
64
+ });
65
+ expect(screen.getAllByRole("link")).toHaveLength(3);
66
+ expect(screen.getAllByRole("link")[0]).toHaveAttribute("href", "https://foo.com");
67
+ expect(screen.getAllByRole("link")[1]).toHaveAttribute("href", "https://bar.com");
68
+ expect(screen.getAllByRole("link")[2]).toHaveAttribute("href", "https://baz.com");
69
+ });
70
+ it("does not render sources in code blocks", () => {
71
+ render(MarkdownRenderer, {
72
+ content: "```\narray[1]\n```",
73
+ sources: [
74
+ {
75
+ title: "foo",
76
+ link: "https://example.com",
77
+ },
78
+ ],
79
+ });
80
+ expect(screen.queryByRole("link")).not.toBeInTheDocument();
81
+ });
82
+ it("doesnt render raw html directly", () => {
83
+ render(MarkdownRenderer, { content: "<button>Click me</button>" });
84
+ expect(screen.queryByRole("button")).not.toBeInTheDocument();
85
+ expect(screen.queryByRole("paragraph")).toHaveTextContent("<button>Click me</button>");
86
+ });
87
+ it("renders latex", () => {
88
+ const { baseElement } = render(MarkdownRenderer, { content: "$(oo)^2$" });
89
+ expect(baseElement.querySelectorAll(".katex")).toHaveLength(1);
90
+ });
91
+ it("does not render latex in code blocks", () => {
92
+ const { baseElement } = render(MarkdownRenderer, { content: "```\n$(oo)^2$\n```" });
93
+ expect(baseElement.querySelectorAll(".katex")).toHaveLength(0);
94
+ });
95
+ it.todo("does not render latex in inline codes", () => {
96
+ const { baseElement } = render(MarkdownRenderer, { content: "`$oo` and `$bar`" });
97
+ expect(baseElement.querySelectorAll(".katex")).toHaveLength(0);
98
+ });
99
+ it.todo("does not render latex across multiple lines", () => {
100
+ const { baseElement } = render(MarkdownRenderer, { content: "* $oo \n* $aa" });
101
+ expect(baseElement.querySelectorAll(".katex")).toHaveLength(0);
102
+ });
103
+ it.todo("renders latex with some < and > symbols", () => {
104
+ const { baseElement } = render(MarkdownRenderer, { content: "$foo < bar > baz$" });
105
+ expect(baseElement.querySelectorAll(".katex")).toHaveLength(1);
106
+ });
107
+ });
src/lib/components/chat/MarkdownRenderer.svelte CHANGED
@@ -2,7 +2,7 @@
2
  import type { WebSearchSource } from "$lib/types/WebSearch";
3
  import katex from "katex";
4
  import DOMPurify from "isomorphic-dompurify";
5
- import { marked, type MarkedOptions } from "marked";
6
  import CodeBlock from "../CodeBlock.svelte";
7
 
8
  export let content: string;
@@ -30,24 +30,6 @@
30
  });
31
  }
32
 
33
- const renderer = new marked.Renderer();
34
-
35
- // For code blocks with simple backticks
36
- renderer.codespan = (code) => {
37
- // Unsanitize double-sanitized code
38
- return `<code>${code.replaceAll("&amp;", "&")}</code>`;
39
- };
40
-
41
- renderer.link = (href, title, text) => {
42
- return `<a href="${href?.replace(/>$/, "")}" target="_blank" rel="noreferrer">${text}</a>`;
43
- };
44
-
45
- const options: MarkedOptions = {
46
- gfm: true,
47
- // breaks: true,
48
- renderer,
49
- };
50
-
51
  function escapeHTML(content: string) {
52
  return content.replace(
53
  /[<>&\n]/g,
@@ -60,8 +42,6 @@
60
  );
61
  }
62
 
63
- $: tokens = marked.lexer(addInlineCitations(content, sources));
64
-
65
  function processLatex(parsed: string) {
66
  const delimiters = [
67
  { left: "$$", right: "$$", display: true },
@@ -98,6 +78,21 @@
98
  return parsed;
99
  }
100
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
101
  DOMPurify.addHook("afterSanitizeAttributes", (node) => {
102
  if (node.tagName === "A") {
103
  node.setAttribute("rel", "noreferrer");
@@ -109,14 +104,13 @@
109
  <div
110
  class="prose max-w-none dark:prose-invert max-sm:prose-sm prose-headings:font-semibold prose-h1:text-lg prose-h2:text-base prose-h3:text-base prose-pre:bg-gray-800 dark:prose-pre:bg-gray-900"
111
  >
112
- {#each tokens as token}
113
  {#if token.type === "code"}
114
  <CodeBlock lang={token.lang} code={token.text} />
115
  {:else}
116
- {@const parsed = marked.parse(processLatex(escapeHTML(token.raw)), options)}
117
- {#await parsed then parsed}
118
  <!-- eslint-disable-next-line svelte/no-at-html-tags -->
119
- {@html DOMPurify.sanitize(parsed)}
120
  {/await}
121
  {/if}
122
  {/each}
 
2
  import type { WebSearchSource } from "$lib/types/WebSearch";
3
  import katex from "katex";
4
  import DOMPurify from "isomorphic-dompurify";
5
+ import { Marked } from "marked";
6
  import CodeBlock from "../CodeBlock.svelte";
7
 
8
  export let content: string;
 
30
  });
31
  }
32
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  function escapeHTML(content: string) {
34
  return content.replace(
35
  /[<>&\n]/g,
 
42
  );
43
  }
44
 
 
 
45
  function processLatex(parsed: string) {
46
  const delimiters = [
47
  { left: "$$", right: "$$", display: true },
 
78
  return parsed;
79
  }
80
 
81
+ const marked = new Marked({
82
+ hooks: {
83
+ preprocess: (md) => addInlineCitations(escapeHTML(md), sources),
84
+ postprocess: (html) => {
85
+ return DOMPurify.sanitize(processLatex(html));
86
+ },
87
+ },
88
+ renderer: {
89
+ codespan: (code) => `<code>${code.replaceAll("&amp;", "&")}</code>`,
90
+ link: (href, title, text) =>
91
+ `<a href="${href?.replace(/>$/, "")}" target="_blank" rel="noreferrer">${text}</a>`,
92
+ },
93
+ gfm: true,
94
+ });
95
+
96
  DOMPurify.addHook("afterSanitizeAttributes", (node) => {
97
  if (node.tagName === "A") {
98
  node.setAttribute("rel", "noreferrer");
 
104
  <div
105
  class="prose max-w-none dark:prose-invert max-sm:prose-sm prose-headings:font-semibold prose-h1:text-lg prose-h2:text-base prose-h3:text-base prose-pre:bg-gray-800 dark:prose-pre:bg-gray-900"
106
  >
107
+ {#each marked.lexer(content) as token}
108
  {#if token.type === "code"}
109
  <CodeBlock lang={token.lang} code={token.text} />
110
  {:else}
111
+ {#await marked.parse(token.raw) then parsed}
 
112
  <!-- eslint-disable-next-line svelte/no-at-html-tags -->
113
+ {@html parsed}
114
  {/await}
115
  {/if}
116
  {/each}
tsconfig.json CHANGED
@@ -9,7 +9,8 @@
9
  "skipLibCheck": true,
10
  "sourceMap": true,
11
  "strict": true,
12
- "target": "ES2018"
 
13
  },
14
  "exclude": ["vite.config.ts"]
15
  // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
 
9
  "skipLibCheck": true,
10
  "sourceMap": true,
11
  "strict": true,
12
+ "target": "ES2018",
13
+ "types": ["@testing-library/jest-dom/vitest"]
14
  },
15
  "exclude": ["vite.config.ts"]
16
  // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
vite.config.ts CHANGED
@@ -2,7 +2,7 @@ import { sveltekit } from "@sveltejs/kit/vite";
2
  import Icons from "unplugin-icons/vite";
3
  import { promises } from "fs";
4
  import { defineConfig } from "vitest/config";
5
-
6
  // used to load fonts server side for thumbnail generation
7
  function loadTTFAsArrayBuffer() {
8
  return {
@@ -24,6 +24,9 @@ export default defineConfig({
24
  compiler: "svelte",
25
  }),
26
  loadTTFAsArrayBuffer(),
 
 
 
27
  ],
28
  optimizeDeps: {
29
  include: [
@@ -41,6 +44,7 @@ export default defineConfig({
41
  setupFiles: ["./scripts/setupTest.ts"],
42
  deps: { inline: ["@sveltejs/kit"] },
43
  globals: true,
 
44
  testTimeout: 10000,
45
  },
46
  });
 
2
  import Icons from "unplugin-icons/vite";
3
  import { promises } from "fs";
4
  import { defineConfig } from "vitest/config";
5
+ import { svelteTesting } from "@testing-library/svelte/vite";
6
  // used to load fonts server side for thumbnail generation
7
  function loadTTFAsArrayBuffer() {
8
  return {
 
24
  compiler: "svelte",
25
  }),
26
  loadTTFAsArrayBuffer(),
27
+ svelteTesting({
28
+ resolveBrowser: false,
29
+ }),
30
  ],
31
  optimizeDeps: {
32
  include: [
 
44
  setupFiles: ["./scripts/setupTest.ts"],
45
  deps: { inline: ["@sveltejs/kit"] },
46
  globals: true,
47
+ environment: "jsdom",
48
  testTimeout: 10000,
49
  },
50
  });