├── .gitignore ├── .npmrc ├── README.md ├── package.json ├── pnpm-lock.yaml ├── src ├── app.d.ts ├── app.html ├── lib │ └── search.ts └── routes │ ├── +page.svelte │ └── search.json │ ├── +server.ts │ └── posts.json ├── static └── favicon.png ├── svelte.config.js ├── tsconfig.json └── vite.config.ts /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /build 4 | /.svelte-kit 5 | /package 6 | .env 7 | .env.* 8 | !.env.example 9 | vite.config.js.timestamp-* 10 | vite.config.ts.timestamp-* -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | engine-strict=true 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Blazing Fast SvelteKit Search 2 | 3 | Simple but powerful search with zero network requests at no cost. 4 | 5 | ## Post 6 | 7 | ✍️ https://joyofcode.xyz/blazing-fast-sveltekit-search 8 | 9 | ## Remote Development 10 | 11 | [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/joysofcode/sveltekit-flexsearch) 12 | 13 | ## Local Development 14 | 15 | ### 🧑‍🤝‍🧑 Clone the project 16 | 17 | ```sh 18 | https://github.com/joysofcode/sveltekit-flexsearch.git 19 | ``` 20 | 21 | ### 📦️ Install dependencies 22 | 23 | ```sh 24 | pnpm i 25 | ``` 26 | 27 | ### 💿️ Run the development server 28 | 29 | ```sh 30 | pnpm run dev 31 | ``` 32 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sveltekit-flexsearch", 3 | "version": "0.0.1", 4 | "private": true, 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite dev", 8 | "build": "vite build", 9 | "preview": "vite preview", 10 | "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", 11 | "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch" 12 | }, 13 | "devDependencies": { 14 | "@sveltejs/adapter-auto": "^3.0.0", 15 | "@sveltejs/kit": "^2.0.0", 16 | "@sveltejs/vite-plugin-svelte": "^3.0.0", 17 | "svelte": "^4.2.7", 18 | "svelte-check": "^3.6.0", 19 | "tslib": "^2.4.1", 20 | "typescript": "^5.0.0", 21 | "vite": "^5.0.3" 22 | }, 23 | "dependencies": { 24 | "flexsearch": "^0.7.43" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /pnpm-lock.yaml: -------------------------------------------------------------------------------- 1 | lockfileVersion: '6.0' 2 | 3 | settings: 4 | autoInstallPeers: true 5 | excludeLinksFromLockfile: false 6 | 7 | dependencies: 8 | flexsearch: 9 | specifier: ^0.7.43 10 | version: 0.7.43 11 | 12 | devDependencies: 13 | '@sveltejs/adapter-auto': 14 | specifier: ^3.0.0 15 | version: 3.1.1(@sveltejs/kit@2.5.0) 16 | '@sveltejs/kit': 17 | specifier: ^2.0.0 18 | version: 2.5.0(@sveltejs/vite-plugin-svelte@3.0.2)(svelte@4.2.9)(vite@5.0.12) 19 | '@sveltejs/vite-plugin-svelte': 20 | specifier: ^3.0.0 21 | version: 3.0.2(svelte@4.2.9)(vite@5.0.12) 22 | svelte: 23 | specifier: ^4.2.7 24 | version: 4.2.9 25 | svelte-check: 26 | specifier: ^3.6.0 27 | version: 3.6.3(svelte@4.2.9) 28 | tslib: 29 | specifier: ^2.4.1 30 | version: 2.6.2 31 | typescript: 32 | specifier: ^5.0.0 33 | version: 5.3.3 34 | vite: 35 | specifier: ^5.0.3 36 | version: 5.0.12 37 | 38 | packages: 39 | 40 | /@ampproject/remapping@2.2.1: 41 | resolution: {integrity: sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==} 42 | engines: {node: '>=6.0.0'} 43 | dependencies: 44 | '@jridgewell/gen-mapping': 0.3.3 45 | '@jridgewell/trace-mapping': 0.3.22 46 | dev: true 47 | 48 | /@esbuild/aix-ppc64@0.19.12: 49 | resolution: {integrity: sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==} 50 | engines: {node: '>=12'} 51 | cpu: [ppc64] 52 | os: [aix] 53 | requiresBuild: true 54 | dev: true 55 | optional: true 56 | 57 | /@esbuild/android-arm64@0.19.12: 58 | resolution: {integrity: sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==} 59 | engines: {node: '>=12'} 60 | cpu: [arm64] 61 | os: [android] 62 | requiresBuild: true 63 | dev: true 64 | optional: true 65 | 66 | /@esbuild/android-arm@0.19.12: 67 | resolution: {integrity: sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==} 68 | engines: {node: '>=12'} 69 | cpu: [arm] 70 | os: [android] 71 | requiresBuild: true 72 | dev: true 73 | optional: true 74 | 75 | /@esbuild/android-x64@0.19.12: 76 | resolution: {integrity: sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==} 77 | engines: {node: '>=12'} 78 | cpu: [x64] 79 | os: [android] 80 | requiresBuild: true 81 | dev: true 82 | optional: true 83 | 84 | /@esbuild/darwin-arm64@0.19.12: 85 | resolution: {integrity: sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==} 86 | engines: {node: '>=12'} 87 | cpu: [arm64] 88 | os: [darwin] 89 | requiresBuild: true 90 | dev: true 91 | optional: true 92 | 93 | /@esbuild/darwin-x64@0.19.12: 94 | resolution: {integrity: sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==} 95 | engines: {node: '>=12'} 96 | cpu: [x64] 97 | os: [darwin] 98 | requiresBuild: true 99 | dev: true 100 | optional: true 101 | 102 | /@esbuild/freebsd-arm64@0.19.12: 103 | resolution: {integrity: sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==} 104 | engines: {node: '>=12'} 105 | cpu: [arm64] 106 | os: [freebsd] 107 | requiresBuild: true 108 | dev: true 109 | optional: true 110 | 111 | /@esbuild/freebsd-x64@0.19.12: 112 | resolution: {integrity: sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==} 113 | engines: {node: '>=12'} 114 | cpu: [x64] 115 | os: [freebsd] 116 | requiresBuild: true 117 | dev: true 118 | optional: true 119 | 120 | /@esbuild/linux-arm64@0.19.12: 121 | resolution: {integrity: sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==} 122 | engines: {node: '>=12'} 123 | cpu: [arm64] 124 | os: [linux] 125 | requiresBuild: true 126 | dev: true 127 | optional: true 128 | 129 | /@esbuild/linux-arm@0.19.12: 130 | resolution: {integrity: sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==} 131 | engines: {node: '>=12'} 132 | cpu: [arm] 133 | os: [linux] 134 | requiresBuild: true 135 | dev: true 136 | optional: true 137 | 138 | /@esbuild/linux-ia32@0.19.12: 139 | resolution: {integrity: sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==} 140 | engines: {node: '>=12'} 141 | cpu: [ia32] 142 | os: [linux] 143 | requiresBuild: true 144 | dev: true 145 | optional: true 146 | 147 | /@esbuild/linux-loong64@0.19.12: 148 | resolution: {integrity: sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==} 149 | engines: {node: '>=12'} 150 | cpu: [loong64] 151 | os: [linux] 152 | requiresBuild: true 153 | dev: true 154 | optional: true 155 | 156 | /@esbuild/linux-mips64el@0.19.12: 157 | resolution: {integrity: sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==} 158 | engines: {node: '>=12'} 159 | cpu: [mips64el] 160 | os: [linux] 161 | requiresBuild: true 162 | dev: true 163 | optional: true 164 | 165 | /@esbuild/linux-ppc64@0.19.12: 166 | resolution: {integrity: sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==} 167 | engines: {node: '>=12'} 168 | cpu: [ppc64] 169 | os: [linux] 170 | requiresBuild: true 171 | dev: true 172 | optional: true 173 | 174 | /@esbuild/linux-riscv64@0.19.12: 175 | resolution: {integrity: sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==} 176 | engines: {node: '>=12'} 177 | cpu: [riscv64] 178 | os: [linux] 179 | requiresBuild: true 180 | dev: true 181 | optional: true 182 | 183 | /@esbuild/linux-s390x@0.19.12: 184 | resolution: {integrity: sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==} 185 | engines: {node: '>=12'} 186 | cpu: [s390x] 187 | os: [linux] 188 | requiresBuild: true 189 | dev: true 190 | optional: true 191 | 192 | /@esbuild/linux-x64@0.19.12: 193 | resolution: {integrity: sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==} 194 | engines: {node: '>=12'} 195 | cpu: [x64] 196 | os: [linux] 197 | requiresBuild: true 198 | dev: true 199 | optional: true 200 | 201 | /@esbuild/netbsd-x64@0.19.12: 202 | resolution: {integrity: sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==} 203 | engines: {node: '>=12'} 204 | cpu: [x64] 205 | os: [netbsd] 206 | requiresBuild: true 207 | dev: true 208 | optional: true 209 | 210 | /@esbuild/openbsd-x64@0.19.12: 211 | resolution: {integrity: sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==} 212 | engines: {node: '>=12'} 213 | cpu: [x64] 214 | os: [openbsd] 215 | requiresBuild: true 216 | dev: true 217 | optional: true 218 | 219 | /@esbuild/sunos-x64@0.19.12: 220 | resolution: {integrity: sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==} 221 | engines: {node: '>=12'} 222 | cpu: [x64] 223 | os: [sunos] 224 | requiresBuild: true 225 | dev: true 226 | optional: true 227 | 228 | /@esbuild/win32-arm64@0.19.12: 229 | resolution: {integrity: sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==} 230 | engines: {node: '>=12'} 231 | cpu: [arm64] 232 | os: [win32] 233 | requiresBuild: true 234 | dev: true 235 | optional: true 236 | 237 | /@esbuild/win32-ia32@0.19.12: 238 | resolution: {integrity: sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==} 239 | engines: {node: '>=12'} 240 | cpu: [ia32] 241 | os: [win32] 242 | requiresBuild: true 243 | dev: true 244 | optional: true 245 | 246 | /@esbuild/win32-x64@0.19.12: 247 | resolution: {integrity: sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==} 248 | engines: {node: '>=12'} 249 | cpu: [x64] 250 | os: [win32] 251 | requiresBuild: true 252 | dev: true 253 | optional: true 254 | 255 | /@jridgewell/gen-mapping@0.3.3: 256 | resolution: {integrity: sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==} 257 | engines: {node: '>=6.0.0'} 258 | dependencies: 259 | '@jridgewell/set-array': 1.1.2 260 | '@jridgewell/sourcemap-codec': 1.4.15 261 | '@jridgewell/trace-mapping': 0.3.22 262 | dev: true 263 | 264 | /@jridgewell/resolve-uri@3.1.1: 265 | resolution: {integrity: sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==} 266 | engines: {node: '>=6.0.0'} 267 | dev: true 268 | 269 | /@jridgewell/set-array@1.1.2: 270 | resolution: {integrity: sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==} 271 | engines: {node: '>=6.0.0'} 272 | dev: true 273 | 274 | /@jridgewell/sourcemap-codec@1.4.15: 275 | resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} 276 | dev: true 277 | 278 | /@jridgewell/trace-mapping@0.3.22: 279 | resolution: {integrity: sha512-Wf963MzWtA2sjrNt+g18IAln9lKnlRp+K2eH4jjIoF1wYeq3aMREpG09xhlhdzS0EjwU7qmUJYangWa+151vZw==} 280 | dependencies: 281 | '@jridgewell/resolve-uri': 3.1.1 282 | '@jridgewell/sourcemap-codec': 1.4.15 283 | dev: true 284 | 285 | /@nodelib/fs.scandir@2.1.5: 286 | resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} 287 | engines: {node: '>= 8'} 288 | dependencies: 289 | '@nodelib/fs.stat': 2.0.5 290 | run-parallel: 1.2.0 291 | dev: true 292 | 293 | /@nodelib/fs.stat@2.0.5: 294 | resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} 295 | engines: {node: '>= 8'} 296 | dev: true 297 | 298 | /@nodelib/fs.walk@1.2.8: 299 | resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} 300 | engines: {node: '>= 8'} 301 | dependencies: 302 | '@nodelib/fs.scandir': 2.1.5 303 | fastq: 1.17.0 304 | dev: true 305 | 306 | /@polka/url@1.0.0-next.24: 307 | resolution: {integrity: sha512-2LuNTFBIO0m7kKIQvvPHN6UE63VjpmL9rnEEaOOaiSPbZK+zUOYIzBAWcED+3XYzhYsd/0mD57VdxAEqqV52CQ==} 308 | dev: true 309 | 310 | /@rollup/rollup-android-arm-eabi@4.9.6: 311 | resolution: {integrity: sha512-MVNXSSYN6QXOulbHpLMKYi60ppyO13W9my1qogeiAqtjb2yR4LSmfU2+POvDkLzhjYLXz9Rf9+9a3zFHW1Lecg==} 312 | cpu: [arm] 313 | os: [android] 314 | requiresBuild: true 315 | dev: true 316 | optional: true 317 | 318 | /@rollup/rollup-android-arm64@4.9.6: 319 | resolution: {integrity: sha512-T14aNLpqJ5wzKNf5jEDpv5zgyIqcpn1MlwCrUXLrwoADr2RkWA0vOWP4XxbO9aiO3dvMCQICZdKeDrFl7UMClw==} 320 | cpu: [arm64] 321 | os: [android] 322 | requiresBuild: true 323 | dev: true 324 | optional: true 325 | 326 | /@rollup/rollup-darwin-arm64@4.9.6: 327 | resolution: {integrity: sha512-CqNNAyhRkTbo8VVZ5R85X73H3R5NX9ONnKbXuHisGWC0qRbTTxnF1U4V9NafzJbgGM0sHZpdO83pLPzq8uOZFw==} 328 | cpu: [arm64] 329 | os: [darwin] 330 | requiresBuild: true 331 | dev: true 332 | optional: true 333 | 334 | /@rollup/rollup-darwin-x64@4.9.6: 335 | resolution: {integrity: sha512-zRDtdJuRvA1dc9Mp6BWYqAsU5oeLixdfUvkTHuiYOHwqYuQ4YgSmi6+/lPvSsqc/I0Omw3DdICx4Tfacdzmhog==} 336 | cpu: [x64] 337 | os: [darwin] 338 | requiresBuild: true 339 | dev: true 340 | optional: true 341 | 342 | /@rollup/rollup-linux-arm-gnueabihf@4.9.6: 343 | resolution: {integrity: sha512-oNk8YXDDnNyG4qlNb6is1ojTOGL/tRhbbKeE/YuccItzerEZT68Z9gHrY3ROh7axDc974+zYAPxK5SH0j/G+QQ==} 344 | cpu: [arm] 345 | os: [linux] 346 | requiresBuild: true 347 | dev: true 348 | optional: true 349 | 350 | /@rollup/rollup-linux-arm64-gnu@4.9.6: 351 | resolution: {integrity: sha512-Z3O60yxPtuCYobrtzjo0wlmvDdx2qZfeAWTyfOjEDqd08kthDKexLpV97KfAeUXPosENKd8uyJMRDfFMxcYkDQ==} 352 | cpu: [arm64] 353 | os: [linux] 354 | requiresBuild: true 355 | dev: true 356 | optional: true 357 | 358 | /@rollup/rollup-linux-arm64-musl@4.9.6: 359 | resolution: {integrity: sha512-gpiG0qQJNdYEVad+1iAsGAbgAnZ8j07FapmnIAQgODKcOTjLEWM9sRb+MbQyVsYCnA0Im6M6QIq6ax7liws6eQ==} 360 | cpu: [arm64] 361 | os: [linux] 362 | requiresBuild: true 363 | dev: true 364 | optional: true 365 | 366 | /@rollup/rollup-linux-riscv64-gnu@4.9.6: 367 | resolution: {integrity: sha512-+uCOcvVmFUYvVDr27aiyun9WgZk0tXe7ThuzoUTAukZJOwS5MrGbmSlNOhx1j80GdpqbOty05XqSl5w4dQvcOA==} 368 | cpu: [riscv64] 369 | os: [linux] 370 | requiresBuild: true 371 | dev: true 372 | optional: true 373 | 374 | /@rollup/rollup-linux-x64-gnu@4.9.6: 375 | resolution: {integrity: sha512-HUNqM32dGzfBKuaDUBqFB7tP6VMN74eLZ33Q9Y1TBqRDn+qDonkAUyKWwF9BR9unV7QUzffLnz9GrnKvMqC/fw==} 376 | cpu: [x64] 377 | os: [linux] 378 | requiresBuild: true 379 | dev: true 380 | optional: true 381 | 382 | /@rollup/rollup-linux-x64-musl@4.9.6: 383 | resolution: {integrity: sha512-ch7M+9Tr5R4FK40FHQk8VnML0Szi2KRujUgHXd/HjuH9ifH72GUmw6lStZBo3c3GB82vHa0ZoUfjfcM7JiiMrQ==} 384 | cpu: [x64] 385 | os: [linux] 386 | requiresBuild: true 387 | dev: true 388 | optional: true 389 | 390 | /@rollup/rollup-win32-arm64-msvc@4.9.6: 391 | resolution: {integrity: sha512-VD6qnR99dhmTQ1mJhIzXsRcTBvTjbfbGGwKAHcu+52cVl15AC/kplkhxzW/uT0Xl62Y/meBKDZvoJSJN+vTeGA==} 392 | cpu: [arm64] 393 | os: [win32] 394 | requiresBuild: true 395 | dev: true 396 | optional: true 397 | 398 | /@rollup/rollup-win32-ia32-msvc@4.9.6: 399 | resolution: {integrity: sha512-J9AFDq/xiRI58eR2NIDfyVmTYGyIZmRcvcAoJ48oDld/NTR8wyiPUu2X/v1navJ+N/FGg68LEbX3Ejd6l8B7MQ==} 400 | cpu: [ia32] 401 | os: [win32] 402 | requiresBuild: true 403 | dev: true 404 | optional: true 405 | 406 | /@rollup/rollup-win32-x64-msvc@4.9.6: 407 | resolution: {integrity: sha512-jqzNLhNDvIZOrt69Ce4UjGRpXJBzhUBzawMwnaDAwyHriki3XollsewxWzOzz+4yOFDkuJHtTsZFwMxhYJWmLQ==} 408 | cpu: [x64] 409 | os: [win32] 410 | requiresBuild: true 411 | dev: true 412 | optional: true 413 | 414 | /@sveltejs/adapter-auto@3.1.1(@sveltejs/kit@2.5.0): 415 | resolution: {integrity: sha512-6LeZft2Fo/4HfmLBi5CucMYmgRxgcETweQl/yQoZo/895K3S9YWYN4Sfm/IhwlIpbJp3QNvhKmwCHbsqQNYQpw==} 416 | peerDependencies: 417 | '@sveltejs/kit': ^2.0.0 418 | dependencies: 419 | '@sveltejs/kit': 2.5.0(@sveltejs/vite-plugin-svelte@3.0.2)(svelte@4.2.9)(vite@5.0.12) 420 | import-meta-resolve: 4.0.0 421 | dev: true 422 | 423 | /@sveltejs/kit@2.5.0(@sveltejs/vite-plugin-svelte@3.0.2)(svelte@4.2.9)(vite@5.0.12): 424 | resolution: {integrity: sha512-1uyXvzC2Lu1FZa30T4y5jUAC21R309ZMRG0TPt+PPPbNUoDpy8zSmSNVWYaBWxYDqLGQ5oPNWvjvvF2IjJ1jmA==} 425 | engines: {node: '>=18.13'} 426 | hasBin: true 427 | requiresBuild: true 428 | peerDependencies: 429 | '@sveltejs/vite-plugin-svelte': ^3.0.0 430 | svelte: ^4.0.0 || ^5.0.0-next.0 431 | vite: ^5.0.3 432 | dependencies: 433 | '@sveltejs/vite-plugin-svelte': 3.0.2(svelte@4.2.9)(vite@5.0.12) 434 | '@types/cookie': 0.6.0 435 | cookie: 0.6.0 436 | devalue: 4.3.2 437 | esm-env: 1.0.0 438 | import-meta-resolve: 4.0.0 439 | kleur: 4.1.5 440 | magic-string: 0.30.6 441 | mrmime: 2.0.0 442 | sade: 1.8.1 443 | set-cookie-parser: 2.6.0 444 | sirv: 2.0.4 445 | svelte: 4.2.9 446 | tiny-glob: 0.2.9 447 | vite: 5.0.12 448 | dev: true 449 | 450 | /@sveltejs/vite-plugin-svelte-inspector@2.0.0(@sveltejs/vite-plugin-svelte@3.0.2)(svelte@4.2.9)(vite@5.0.12): 451 | resolution: {integrity: sha512-gjr9ZFg1BSlIpfZ4PRewigrvYmHWbDrq2uvvPB1AmTWKuM+dI1JXQSUu2pIrYLb/QncyiIGkFDFKTwJ0XqQZZg==} 452 | engines: {node: ^18.0.0 || >=20} 453 | peerDependencies: 454 | '@sveltejs/vite-plugin-svelte': ^3.0.0 455 | svelte: ^4.0.0 || ^5.0.0-next.0 456 | vite: ^5.0.0 457 | dependencies: 458 | '@sveltejs/vite-plugin-svelte': 3.0.2(svelte@4.2.9)(vite@5.0.12) 459 | debug: 4.3.4 460 | svelte: 4.2.9 461 | vite: 5.0.12 462 | transitivePeerDependencies: 463 | - supports-color 464 | dev: true 465 | 466 | /@sveltejs/vite-plugin-svelte@3.0.2(svelte@4.2.9)(vite@5.0.12): 467 | resolution: {integrity: sha512-MpmF/cju2HqUls50WyTHQBZUV3ovV/Uk8k66AN2gwHogNAG8wnW8xtZDhzNBsFJJuvmq1qnzA5kE7YfMJNFv2Q==} 468 | engines: {node: ^18.0.0 || >=20} 469 | peerDependencies: 470 | svelte: ^4.0.0 || ^5.0.0-next.0 471 | vite: ^5.0.0 472 | dependencies: 473 | '@sveltejs/vite-plugin-svelte-inspector': 2.0.0(@sveltejs/vite-plugin-svelte@3.0.2)(svelte@4.2.9)(vite@5.0.12) 474 | debug: 4.3.4 475 | deepmerge: 4.3.1 476 | kleur: 4.1.5 477 | magic-string: 0.30.6 478 | svelte: 4.2.9 479 | svelte-hmr: 0.15.3(svelte@4.2.9) 480 | vite: 5.0.12 481 | vitefu: 0.2.5(vite@5.0.12) 482 | transitivePeerDependencies: 483 | - supports-color 484 | dev: true 485 | 486 | /@types/cookie@0.6.0: 487 | resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==} 488 | dev: true 489 | 490 | /@types/estree@1.0.5: 491 | resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} 492 | dev: true 493 | 494 | /@types/pug@2.0.10: 495 | resolution: {integrity: sha512-Sk/uYFOBAB7mb74XcpizmH0KOR2Pv3D2Hmrh1Dmy5BmK3MpdSa5kqZcg6EKBdklU0bFXX9gCfzvpnyUehrPIuA==} 496 | dev: true 497 | 498 | /acorn@8.11.3: 499 | resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==} 500 | engines: {node: '>=0.4.0'} 501 | hasBin: true 502 | dev: true 503 | 504 | /anymatch@3.1.3: 505 | resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} 506 | engines: {node: '>= 8'} 507 | dependencies: 508 | normalize-path: 3.0.0 509 | picomatch: 2.3.1 510 | dev: true 511 | 512 | /aria-query@5.3.0: 513 | resolution: {integrity: sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==} 514 | dependencies: 515 | dequal: 2.0.3 516 | dev: true 517 | 518 | /axobject-query@4.0.0: 519 | resolution: {integrity: sha512-+60uv1hiVFhHZeO+Lz0RYzsVHy5Wr1ayX0mwda9KPDVLNJgZ1T9Ny7VmFbLDzxsH0D87I86vgj3gFrjTJUYznw==} 520 | dependencies: 521 | dequal: 2.0.3 522 | dev: true 523 | 524 | /balanced-match@1.0.2: 525 | resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} 526 | dev: true 527 | 528 | /binary-extensions@2.2.0: 529 | resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} 530 | engines: {node: '>=8'} 531 | dev: true 532 | 533 | /brace-expansion@1.1.11: 534 | resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} 535 | dependencies: 536 | balanced-match: 1.0.2 537 | concat-map: 0.0.1 538 | dev: true 539 | 540 | /braces@3.0.2: 541 | resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} 542 | engines: {node: '>=8'} 543 | dependencies: 544 | fill-range: 7.0.1 545 | dev: true 546 | 547 | /buffer-crc32@0.2.13: 548 | resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==} 549 | dev: true 550 | 551 | /callsites@3.1.0: 552 | resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} 553 | engines: {node: '>=6'} 554 | dev: true 555 | 556 | /chokidar@3.5.3: 557 | resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} 558 | engines: {node: '>= 8.10.0'} 559 | dependencies: 560 | anymatch: 3.1.3 561 | braces: 3.0.2 562 | glob-parent: 5.1.2 563 | is-binary-path: 2.1.0 564 | is-glob: 4.0.3 565 | normalize-path: 3.0.0 566 | readdirp: 3.6.0 567 | optionalDependencies: 568 | fsevents: 2.3.3 569 | dev: true 570 | 571 | /code-red@1.0.4: 572 | resolution: {integrity: sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw==} 573 | dependencies: 574 | '@jridgewell/sourcemap-codec': 1.4.15 575 | '@types/estree': 1.0.5 576 | acorn: 8.11.3 577 | estree-walker: 3.0.3 578 | periscopic: 3.1.0 579 | dev: true 580 | 581 | /concat-map@0.0.1: 582 | resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} 583 | dev: true 584 | 585 | /cookie@0.6.0: 586 | resolution: {integrity: sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==} 587 | engines: {node: '>= 0.6'} 588 | dev: true 589 | 590 | /css-tree@2.3.1: 591 | resolution: {integrity: sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==} 592 | engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0} 593 | dependencies: 594 | mdn-data: 2.0.30 595 | source-map-js: 1.0.2 596 | dev: true 597 | 598 | /debug@4.3.4: 599 | resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} 600 | engines: {node: '>=6.0'} 601 | peerDependencies: 602 | supports-color: '*' 603 | peerDependenciesMeta: 604 | supports-color: 605 | optional: true 606 | dependencies: 607 | ms: 2.1.2 608 | dev: true 609 | 610 | /deepmerge@4.3.1: 611 | resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} 612 | engines: {node: '>=0.10.0'} 613 | dev: true 614 | 615 | /dequal@2.0.3: 616 | resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} 617 | engines: {node: '>=6'} 618 | dev: true 619 | 620 | /detect-indent@6.1.0: 621 | resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} 622 | engines: {node: '>=8'} 623 | dev: true 624 | 625 | /devalue@4.3.2: 626 | resolution: {integrity: sha512-KqFl6pOgOW+Y6wJgu80rHpo2/3H07vr8ntR9rkkFIRETewbf5GaYYcakYfiKz89K+sLsuPkQIZaXDMjUObZwWg==} 627 | dev: true 628 | 629 | /es6-promise@3.3.1: 630 | resolution: {integrity: sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==} 631 | dev: true 632 | 633 | /esbuild@0.19.12: 634 | resolution: {integrity: sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==} 635 | engines: {node: '>=12'} 636 | hasBin: true 637 | requiresBuild: true 638 | optionalDependencies: 639 | '@esbuild/aix-ppc64': 0.19.12 640 | '@esbuild/android-arm': 0.19.12 641 | '@esbuild/android-arm64': 0.19.12 642 | '@esbuild/android-x64': 0.19.12 643 | '@esbuild/darwin-arm64': 0.19.12 644 | '@esbuild/darwin-x64': 0.19.12 645 | '@esbuild/freebsd-arm64': 0.19.12 646 | '@esbuild/freebsd-x64': 0.19.12 647 | '@esbuild/linux-arm': 0.19.12 648 | '@esbuild/linux-arm64': 0.19.12 649 | '@esbuild/linux-ia32': 0.19.12 650 | '@esbuild/linux-loong64': 0.19.12 651 | '@esbuild/linux-mips64el': 0.19.12 652 | '@esbuild/linux-ppc64': 0.19.12 653 | '@esbuild/linux-riscv64': 0.19.12 654 | '@esbuild/linux-s390x': 0.19.12 655 | '@esbuild/linux-x64': 0.19.12 656 | '@esbuild/netbsd-x64': 0.19.12 657 | '@esbuild/openbsd-x64': 0.19.12 658 | '@esbuild/sunos-x64': 0.19.12 659 | '@esbuild/win32-arm64': 0.19.12 660 | '@esbuild/win32-ia32': 0.19.12 661 | '@esbuild/win32-x64': 0.19.12 662 | dev: true 663 | 664 | /esm-env@1.0.0: 665 | resolution: {integrity: sha512-Cf6VksWPsTuW01vU9Mk/3vRue91Zevka5SjyNf3nEpokFRuqt/KjUQoGAwq9qMmhpLTHmXzSIrFRw8zxWzmFBA==} 666 | dev: true 667 | 668 | /estree-walker@3.0.3: 669 | resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} 670 | dependencies: 671 | '@types/estree': 1.0.5 672 | dev: true 673 | 674 | /fast-glob@3.3.2: 675 | resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} 676 | engines: {node: '>=8.6.0'} 677 | dependencies: 678 | '@nodelib/fs.stat': 2.0.5 679 | '@nodelib/fs.walk': 1.2.8 680 | glob-parent: 5.1.2 681 | merge2: 1.4.1 682 | micromatch: 4.0.5 683 | dev: true 684 | 685 | /fastq@1.17.0: 686 | resolution: {integrity: sha512-zGygtijUMT7jnk3h26kUms3BkSDp4IfIKjmnqI2tvx6nuBfiF1UqOxbnLfzdv+apBy+53oaImsKtMw/xYbW+1w==} 687 | dependencies: 688 | reusify: 1.0.4 689 | dev: true 690 | 691 | /fill-range@7.0.1: 692 | resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} 693 | engines: {node: '>=8'} 694 | dependencies: 695 | to-regex-range: 5.0.1 696 | dev: true 697 | 698 | /flexsearch@0.7.43: 699 | resolution: {integrity: sha512-c5o/+Um8aqCSOXGcZoqZOm+NqtVwNsvVpWv6lfmSclU954O3wvQKxxK8zj74fPaSJbXpSLTs4PRhh+wnoCXnKg==} 700 | dev: false 701 | 702 | /fs.realpath@1.0.0: 703 | resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} 704 | dev: true 705 | 706 | /fsevents@2.3.3: 707 | resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} 708 | engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} 709 | os: [darwin] 710 | requiresBuild: true 711 | dev: true 712 | optional: true 713 | 714 | /glob-parent@5.1.2: 715 | resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} 716 | engines: {node: '>= 6'} 717 | dependencies: 718 | is-glob: 4.0.3 719 | dev: true 720 | 721 | /glob@7.2.3: 722 | resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} 723 | dependencies: 724 | fs.realpath: 1.0.0 725 | inflight: 1.0.6 726 | inherits: 2.0.4 727 | minimatch: 3.1.2 728 | once: 1.4.0 729 | path-is-absolute: 1.0.1 730 | dev: true 731 | 732 | /globalyzer@0.1.0: 733 | resolution: {integrity: sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==} 734 | dev: true 735 | 736 | /globrex@0.1.2: 737 | resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==} 738 | dev: true 739 | 740 | /graceful-fs@4.2.11: 741 | resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} 742 | dev: true 743 | 744 | /import-fresh@3.3.0: 745 | resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} 746 | engines: {node: '>=6'} 747 | dependencies: 748 | parent-module: 1.0.1 749 | resolve-from: 4.0.0 750 | dev: true 751 | 752 | /import-meta-resolve@4.0.0: 753 | resolution: {integrity: sha512-okYUR7ZQPH+efeuMJGlq4f8ubUgO50kByRPyt/Cy1Io4PSRsPjxME+YlVaCOx+NIToW7hCsZNFJyTPFFKepRSA==} 754 | dev: true 755 | 756 | /inflight@1.0.6: 757 | resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} 758 | dependencies: 759 | once: 1.4.0 760 | wrappy: 1.0.2 761 | dev: true 762 | 763 | /inherits@2.0.4: 764 | resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} 765 | dev: true 766 | 767 | /is-binary-path@2.1.0: 768 | resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} 769 | engines: {node: '>=8'} 770 | dependencies: 771 | binary-extensions: 2.2.0 772 | dev: true 773 | 774 | /is-extglob@2.1.1: 775 | resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} 776 | engines: {node: '>=0.10.0'} 777 | dev: true 778 | 779 | /is-glob@4.0.3: 780 | resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} 781 | engines: {node: '>=0.10.0'} 782 | dependencies: 783 | is-extglob: 2.1.1 784 | dev: true 785 | 786 | /is-number@7.0.0: 787 | resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} 788 | engines: {node: '>=0.12.0'} 789 | dev: true 790 | 791 | /is-reference@3.0.2: 792 | resolution: {integrity: sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==} 793 | dependencies: 794 | '@types/estree': 1.0.5 795 | dev: true 796 | 797 | /kleur@4.1.5: 798 | resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} 799 | engines: {node: '>=6'} 800 | dev: true 801 | 802 | /locate-character@3.0.0: 803 | resolution: {integrity: sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==} 804 | dev: true 805 | 806 | /magic-string@0.30.6: 807 | resolution: {integrity: sha512-n62qCLbPjNjyo+owKtveQxZFZTBm+Ms6YoGD23Wew6Vw337PElFNifQpknPruVRQV57kVShPnLGo9vWxVhpPvA==} 808 | engines: {node: '>=12'} 809 | dependencies: 810 | '@jridgewell/sourcemap-codec': 1.4.15 811 | dev: true 812 | 813 | /mdn-data@2.0.30: 814 | resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==} 815 | dev: true 816 | 817 | /merge2@1.4.1: 818 | resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} 819 | engines: {node: '>= 8'} 820 | dev: true 821 | 822 | /micromatch@4.0.5: 823 | resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} 824 | engines: {node: '>=8.6'} 825 | dependencies: 826 | braces: 3.0.2 827 | picomatch: 2.3.1 828 | dev: true 829 | 830 | /min-indent@1.0.1: 831 | resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} 832 | engines: {node: '>=4'} 833 | dev: true 834 | 835 | /minimatch@3.1.2: 836 | resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} 837 | dependencies: 838 | brace-expansion: 1.1.11 839 | dev: true 840 | 841 | /minimist@1.2.8: 842 | resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} 843 | dev: true 844 | 845 | /mkdirp@0.5.6: 846 | resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} 847 | hasBin: true 848 | dependencies: 849 | minimist: 1.2.8 850 | dev: true 851 | 852 | /mri@1.2.0: 853 | resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} 854 | engines: {node: '>=4'} 855 | dev: true 856 | 857 | /mrmime@2.0.0: 858 | resolution: {integrity: sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==} 859 | engines: {node: '>=10'} 860 | dev: true 861 | 862 | /ms@2.1.2: 863 | resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} 864 | dev: true 865 | 866 | /nanoid@3.3.7: 867 | resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} 868 | engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} 869 | hasBin: true 870 | dev: true 871 | 872 | /normalize-path@3.0.0: 873 | resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} 874 | engines: {node: '>=0.10.0'} 875 | dev: true 876 | 877 | /once@1.4.0: 878 | resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} 879 | dependencies: 880 | wrappy: 1.0.2 881 | dev: true 882 | 883 | /parent-module@1.0.1: 884 | resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} 885 | engines: {node: '>=6'} 886 | dependencies: 887 | callsites: 3.1.0 888 | dev: true 889 | 890 | /path-is-absolute@1.0.1: 891 | resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} 892 | engines: {node: '>=0.10.0'} 893 | dev: true 894 | 895 | /periscopic@3.1.0: 896 | resolution: {integrity: sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==} 897 | dependencies: 898 | '@types/estree': 1.0.5 899 | estree-walker: 3.0.3 900 | is-reference: 3.0.2 901 | dev: true 902 | 903 | /picocolors@1.0.0: 904 | resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} 905 | dev: true 906 | 907 | /picomatch@2.3.1: 908 | resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} 909 | engines: {node: '>=8.6'} 910 | dev: true 911 | 912 | /postcss@8.4.33: 913 | resolution: {integrity: sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==} 914 | engines: {node: ^10 || ^12 || >=14} 915 | dependencies: 916 | nanoid: 3.3.7 917 | picocolors: 1.0.0 918 | source-map-js: 1.0.2 919 | dev: true 920 | 921 | /queue-microtask@1.2.3: 922 | resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} 923 | dev: true 924 | 925 | /readdirp@3.6.0: 926 | resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} 927 | engines: {node: '>=8.10.0'} 928 | dependencies: 929 | picomatch: 2.3.1 930 | dev: true 931 | 932 | /resolve-from@4.0.0: 933 | resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} 934 | engines: {node: '>=4'} 935 | dev: true 936 | 937 | /reusify@1.0.4: 938 | resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} 939 | engines: {iojs: '>=1.0.0', node: '>=0.10.0'} 940 | dev: true 941 | 942 | /rimraf@2.7.1: 943 | resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==} 944 | hasBin: true 945 | dependencies: 946 | glob: 7.2.3 947 | dev: true 948 | 949 | /rollup@4.9.6: 950 | resolution: {integrity: sha512-05lzkCS2uASX0CiLFybYfVkwNbKZG5NFQ6Go0VWyogFTXXbR039UVsegViTntkk4OglHBdF54ccApXRRuXRbsg==} 951 | engines: {node: '>=18.0.0', npm: '>=8.0.0'} 952 | hasBin: true 953 | dependencies: 954 | '@types/estree': 1.0.5 955 | optionalDependencies: 956 | '@rollup/rollup-android-arm-eabi': 4.9.6 957 | '@rollup/rollup-android-arm64': 4.9.6 958 | '@rollup/rollup-darwin-arm64': 4.9.6 959 | '@rollup/rollup-darwin-x64': 4.9.6 960 | '@rollup/rollup-linux-arm-gnueabihf': 4.9.6 961 | '@rollup/rollup-linux-arm64-gnu': 4.9.6 962 | '@rollup/rollup-linux-arm64-musl': 4.9.6 963 | '@rollup/rollup-linux-riscv64-gnu': 4.9.6 964 | '@rollup/rollup-linux-x64-gnu': 4.9.6 965 | '@rollup/rollup-linux-x64-musl': 4.9.6 966 | '@rollup/rollup-win32-arm64-msvc': 4.9.6 967 | '@rollup/rollup-win32-ia32-msvc': 4.9.6 968 | '@rollup/rollup-win32-x64-msvc': 4.9.6 969 | fsevents: 2.3.3 970 | dev: true 971 | 972 | /run-parallel@1.2.0: 973 | resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} 974 | dependencies: 975 | queue-microtask: 1.2.3 976 | dev: true 977 | 978 | /sade@1.8.1: 979 | resolution: {integrity: sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==} 980 | engines: {node: '>=6'} 981 | dependencies: 982 | mri: 1.2.0 983 | dev: true 984 | 985 | /sander@0.5.1: 986 | resolution: {integrity: sha512-3lVqBir7WuKDHGrKRDn/1Ye3kwpXaDOMsiRP1wd6wpZW56gJhsbp5RqQpA6JG/P+pkXizygnr1dKR8vzWaVsfA==} 987 | dependencies: 988 | es6-promise: 3.3.1 989 | graceful-fs: 4.2.11 990 | mkdirp: 0.5.6 991 | rimraf: 2.7.1 992 | dev: true 993 | 994 | /set-cookie-parser@2.6.0: 995 | resolution: {integrity: sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ==} 996 | dev: true 997 | 998 | /sirv@2.0.4: 999 | resolution: {integrity: sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==} 1000 | engines: {node: '>= 10'} 1001 | dependencies: 1002 | '@polka/url': 1.0.0-next.24 1003 | mrmime: 2.0.0 1004 | totalist: 3.0.1 1005 | dev: true 1006 | 1007 | /sorcery@0.11.0: 1008 | resolution: {integrity: sha512-J69LQ22xrQB1cIFJhPfgtLuI6BpWRiWu1Y3vSsIwK/eAScqJxd/+CJlUuHQRdX2C9NGFamq+KqNywGgaThwfHw==} 1009 | hasBin: true 1010 | dependencies: 1011 | '@jridgewell/sourcemap-codec': 1.4.15 1012 | buffer-crc32: 0.2.13 1013 | minimist: 1.2.8 1014 | sander: 0.5.1 1015 | dev: true 1016 | 1017 | /source-map-js@1.0.2: 1018 | resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} 1019 | engines: {node: '>=0.10.0'} 1020 | dev: true 1021 | 1022 | /strip-indent@3.0.0: 1023 | resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} 1024 | engines: {node: '>=8'} 1025 | dependencies: 1026 | min-indent: 1.0.1 1027 | dev: true 1028 | 1029 | /svelte-check@3.6.3(svelte@4.2.9): 1030 | resolution: {integrity: sha512-Q2nGnoysxUnB9KjnjpQLZwdjK62DHyW6nuH/gm2qteFnDk0lCehe/6z8TsIvYeKjC6luKaWxiNGyOcWiLLPSwA==} 1031 | hasBin: true 1032 | peerDependencies: 1033 | svelte: ^3.55.0 || ^4.0.0-next.0 || ^4.0.0 || ^5.0.0-next.0 1034 | dependencies: 1035 | '@jridgewell/trace-mapping': 0.3.22 1036 | chokidar: 3.5.3 1037 | fast-glob: 3.3.2 1038 | import-fresh: 3.3.0 1039 | picocolors: 1.0.0 1040 | sade: 1.8.1 1041 | svelte: 4.2.9 1042 | svelte-preprocess: 5.1.3(svelte@4.2.9)(typescript@5.3.3) 1043 | typescript: 5.3.3 1044 | transitivePeerDependencies: 1045 | - '@babel/core' 1046 | - coffeescript 1047 | - less 1048 | - postcss 1049 | - postcss-load-config 1050 | - pug 1051 | - sass 1052 | - stylus 1053 | - sugarss 1054 | dev: true 1055 | 1056 | /svelte-hmr@0.15.3(svelte@4.2.9): 1057 | resolution: {integrity: sha512-41snaPswvSf8TJUhlkoJBekRrABDXDMdpNpT2tfHIv4JuhgvHqLMhEPGtaQn0BmbNSTkuz2Ed20DF2eHw0SmBQ==} 1058 | engines: {node: ^12.20 || ^14.13.1 || >= 16} 1059 | peerDependencies: 1060 | svelte: ^3.19.0 || ^4.0.0 1061 | dependencies: 1062 | svelte: 4.2.9 1063 | dev: true 1064 | 1065 | /svelte-preprocess@5.1.3(svelte@4.2.9)(typescript@5.3.3): 1066 | resolution: {integrity: sha512-xxAkmxGHT+J/GourS5mVJeOXZzne1FR5ljeOUAMXUkfEhkLEllRreXpbl3dIYJlcJRfL1LO1uIAPpBpBfiqGPw==} 1067 | engines: {node: '>= 16.0.0', pnpm: ^8.0.0} 1068 | requiresBuild: true 1069 | peerDependencies: 1070 | '@babel/core': ^7.10.2 1071 | coffeescript: ^2.5.1 1072 | less: ^3.11.3 || ^4.0.0 1073 | postcss: ^7 || ^8 1074 | postcss-load-config: ^2.1.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 1075 | pug: ^3.0.0 1076 | sass: ^1.26.8 1077 | stylus: ^0.55.0 1078 | sugarss: ^2.0.0 || ^3.0.0 || ^4.0.0 1079 | svelte: ^3.23.0 || ^4.0.0-next.0 || ^4.0.0 || ^5.0.0-next.0 1080 | typescript: '>=3.9.5 || ^4.0.0 || ^5.0.0' 1081 | peerDependenciesMeta: 1082 | '@babel/core': 1083 | optional: true 1084 | coffeescript: 1085 | optional: true 1086 | less: 1087 | optional: true 1088 | postcss: 1089 | optional: true 1090 | postcss-load-config: 1091 | optional: true 1092 | pug: 1093 | optional: true 1094 | sass: 1095 | optional: true 1096 | stylus: 1097 | optional: true 1098 | sugarss: 1099 | optional: true 1100 | typescript: 1101 | optional: true 1102 | dependencies: 1103 | '@types/pug': 2.0.10 1104 | detect-indent: 6.1.0 1105 | magic-string: 0.30.6 1106 | sorcery: 0.11.0 1107 | strip-indent: 3.0.0 1108 | svelte: 4.2.9 1109 | typescript: 5.3.3 1110 | dev: true 1111 | 1112 | /svelte@4.2.9: 1113 | resolution: {integrity: sha512-hsoB/WZGEPFXeRRLPhPrbRz67PhP6sqYgvwcAs+gWdSQSvNDw+/lTeUJSWe5h2xC97Fz/8QxAOqItwBzNJPU8w==} 1114 | engines: {node: '>=16'} 1115 | dependencies: 1116 | '@ampproject/remapping': 2.2.1 1117 | '@jridgewell/sourcemap-codec': 1.4.15 1118 | '@jridgewell/trace-mapping': 0.3.22 1119 | '@types/estree': 1.0.5 1120 | acorn: 8.11.3 1121 | aria-query: 5.3.0 1122 | axobject-query: 4.0.0 1123 | code-red: 1.0.4 1124 | css-tree: 2.3.1 1125 | estree-walker: 3.0.3 1126 | is-reference: 3.0.2 1127 | locate-character: 3.0.0 1128 | magic-string: 0.30.6 1129 | periscopic: 3.1.0 1130 | dev: true 1131 | 1132 | /tiny-glob@0.2.9: 1133 | resolution: {integrity: sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==} 1134 | dependencies: 1135 | globalyzer: 0.1.0 1136 | globrex: 0.1.2 1137 | dev: true 1138 | 1139 | /to-regex-range@5.0.1: 1140 | resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} 1141 | engines: {node: '>=8.0'} 1142 | dependencies: 1143 | is-number: 7.0.0 1144 | dev: true 1145 | 1146 | /totalist@3.0.1: 1147 | resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==} 1148 | engines: {node: '>=6'} 1149 | dev: true 1150 | 1151 | /tslib@2.6.2: 1152 | resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} 1153 | dev: true 1154 | 1155 | /typescript@5.3.3: 1156 | resolution: {integrity: sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==} 1157 | engines: {node: '>=14.17'} 1158 | hasBin: true 1159 | dev: true 1160 | 1161 | /vite@5.0.12: 1162 | resolution: {integrity: sha512-4hsnEkG3q0N4Tzf1+t6NdN9dg/L3BM+q8SWgbSPnJvrgH2kgdyzfVJwbR1ic69/4uMJJ/3dqDZZE5/WwqW8U1w==} 1163 | engines: {node: ^18.0.0 || >=20.0.0} 1164 | hasBin: true 1165 | peerDependencies: 1166 | '@types/node': ^18.0.0 || >=20.0.0 1167 | less: '*' 1168 | lightningcss: ^1.21.0 1169 | sass: '*' 1170 | stylus: '*' 1171 | sugarss: '*' 1172 | terser: ^5.4.0 1173 | peerDependenciesMeta: 1174 | '@types/node': 1175 | optional: true 1176 | less: 1177 | optional: true 1178 | lightningcss: 1179 | optional: true 1180 | sass: 1181 | optional: true 1182 | stylus: 1183 | optional: true 1184 | sugarss: 1185 | optional: true 1186 | terser: 1187 | optional: true 1188 | dependencies: 1189 | esbuild: 0.19.12 1190 | postcss: 8.4.33 1191 | rollup: 4.9.6 1192 | optionalDependencies: 1193 | fsevents: 2.3.3 1194 | dev: true 1195 | 1196 | /vitefu@0.2.5(vite@5.0.12): 1197 | resolution: {integrity: sha512-SgHtMLoqaeeGnd2evZ849ZbACbnwQCIwRH57t18FxcXoZop0uQu0uzlIhJBlF/eWVzuce0sHeqPcDo+evVcg8Q==} 1198 | peerDependencies: 1199 | vite: ^3.0.0 || ^4.0.0 || ^5.0.0 1200 | peerDependenciesMeta: 1201 | vite: 1202 | optional: true 1203 | dependencies: 1204 | vite: 5.0.12 1205 | dev: true 1206 | 1207 | /wrappy@1.0.2: 1208 | resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} 1209 | dev: true 1210 | -------------------------------------------------------------------------------- /src/app.d.ts: -------------------------------------------------------------------------------- 1 | // See https://kit.svelte.dev/docs/types#app 2 | // for information about these interfaces 3 | declare global { 4 | namespace App { 5 | // interface Error {} 6 | // interface Locals {} 7 | // interface PageData {} 8 | // interface PageState {} 9 | // interface Platform {} 10 | } 11 | } 12 | 13 | export {} 14 | -------------------------------------------------------------------------------- /src/app.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | %sveltekit.head% 7 | 8 | 9 | 10 |
%sveltekit.body%
11 | 12 | 13 | -------------------------------------------------------------------------------- /src/lib/search.ts: -------------------------------------------------------------------------------- 1 | import FlexSearch from 'flexsearch' 2 | 3 | export type Post = { 4 | content: string 5 | slug: string 6 | title: string 7 | } 8 | 9 | export type Result = { 10 | content: string[] 11 | slug: string 12 | title: string 13 | } 14 | 15 | let postsIndex: FlexSearch.Index 16 | let posts: Post[] 17 | 18 | export function createPostsIndex(data: Post[]) { 19 | postsIndex = new FlexSearch.Index({ tokenize: 'forward' }) 20 | 21 | data.forEach((post, i) => { 22 | const item = `${post.title} ${post.content}` 23 | postsIndex.add(i, item) 24 | }) 25 | 26 | posts = data 27 | } 28 | 29 | export function searchPostsIndex(searchTerm: string) { 30 | const match = searchTerm.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') 31 | const results = postsIndex.search(match) 32 | 33 | return results 34 | .map((index) => posts[index as number]) 35 | .map(({ slug, title, content }) => { 36 | return { 37 | slug, 38 | title: replaceTextWithMarker(title, match), 39 | content: getMatches(content, match), 40 | } 41 | }) 42 | } 43 | 44 | function replaceTextWithMarker(text: string, match: string) { 45 | const regex = new RegExp(match, 'gi') 46 | return text.replaceAll(regex, (match) => `${match}`) 47 | } 48 | 49 | function getMatches(text: string, searchTerm: string, limit = 1) { 50 | const regex = new RegExp(searchTerm, 'gi') 51 | const indexes = [] 52 | let matches = 0 53 | let match 54 | 55 | while ((match = regex.exec(text)) !== null && matches < limit) { 56 | indexes.push(match.index) 57 | matches++ 58 | } 59 | 60 | return indexes.map((index) => { 61 | const start = index - 20 62 | const end = index + 80 63 | const excerpt = text.substring(start, end).trim() 64 | return `...${replaceTextWithMarker(excerpt, searchTerm)}...` 65 | }) 66 | } 67 | -------------------------------------------------------------------------------- /src/routes/+page.svelte: -------------------------------------------------------------------------------- 1 | 19 | 20 | {#if search === 'ready'} 21 | 45 | {/if} 46 | 47 | 110 | -------------------------------------------------------------------------------- /src/routes/search.json/+server.ts: -------------------------------------------------------------------------------- 1 | import { json } from '@sveltejs/kit' 2 | import posts from './posts.json' 3 | 4 | export async function GET() { 5 | return json(posts) 6 | } 7 | -------------------------------------------------------------------------------- /src/routes/search.json/posts.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "title": "The Joy of Painting", 4 | "slug": "the-joy-of-painting", 5 | "content": "Imagine you are painting a beautiful sunset over a calm lake. Each stroke of your brush brings another layer of rich color onto the canvas. The sky is a mix of orange, red, and purple hues, gently blending together. The water reflects the colors of the sky, adding depth to the scene. Take your time to add details, like the silhouette of trees on the shore. Remember, every stroke counts. Your painting is a reflection of your emotions and thoughts. Keep adding layers until you are satisfied with the final result." 6 | }, 7 | { 8 | "title": "The Power of Nature", 9 | "slug": "the-power-of-nature", 10 | "content": "Imagine you are painting a dense forest. The trees are tall and majestic, their leaves shimmering in the sunlight. The ground beneath them is covered in a carpet of green, broken up by patches of brightly colored wildflowers. Add depth to your painting by including a winding path that leads deeper into the forest. Remember, every tree and flower adds to the beauty of nature. Your painting is a celebration of life and the natural world around us." 11 | }, 12 | { 13 | "title": "The Beauty of Abstract Art", 14 | "slug": "the-beauty-of-abstract-art", 15 | "content": "Imagine you are painting a piece of abstract art. Start with a blank canvas. Then, slowly begin to add shapes and colors. There are no rules here. You can use any color that makes you happy. Add circles, squares, triangles, and lines. Mix different shades and tones. The goal is not to replicate reality, but to express yourself through color and shape. Your painting is a unique creation that comes from your imagination." 16 | }, 17 | { 18 | "title": "The Calm of Water", 19 | "slug": "the-calm-of-water", 20 | "content": "Imagine you are painting a peaceful river. The water flows smoothly, its surface reflecting the surrounding landscape. Trees grow alongside the riverbank, their branches reaching out towards the water. Birds fly overhead, their wings spread wide. Add details like fish swimming in the water, or a small boat floating downstream. Your painting captures the serene beauty of nature and the calmness it brings." 21 | }, 22 | { 23 | "title": "The Energy of Landscapes", 24 | "slug": "the-energy-of-landscapes", 25 | "content": "Imagine you are painting a dynamic landscape. Mountains rise high into the sky, their peaks covered in snow. A river cuts through the mountains, its flow powerful and relentless. Trees cling to the sides of the mountains, their roots reaching out towards the soil. Clouds float overhead, their shapes constantly changing. Your painting captures the raw energy of nature and the power of its elements." 26 | }, 27 | { 28 | "title": "The Warmth of Autumn", 29 | "slug": "the-warmth-of-autumn", 30 | "content": "Imagine you are painting an autumn scene. Leaves change color, transitioning from green to yellow, orange, and red. They fall gently from the trees, covering the ground in a thick layer. A warm sun hangs low in the sky, casting long shadows across the landscape. Your painting captures the beauty and tranquility of autumn, a time of year that is filled with warmth and coziness." 31 | }, 32 | { 33 | "title": "The Serenity of Winter", 34 | "slug": "the-serenity-of-winter", 35 | "content": "Imagine you are painting a winter scene. Snow covers the ground, creating a pristine white canvas. Trees stand bare, their branches stark against the white background. Ice forms on a nearby body of water, creating a shiny mirror. Your painting captures the quiet beauty and serenity of winter, a time of year that offers a peaceful respite from the busy summer months." 36 | }, 37 | { 38 | "title": "The Elegance of Spring", 39 | "slug": "the-elegance-of-spring", 40 | "content": "Imagine you are painting a spring scene. Flowers bloom in full force, their petals a riot of colors. Blossoms cover the trees, their fragrance filling the air. Birds sing, their melodious songs echoing through the landscape. Your painting captures the elegance and freshness of spring, a time of renewal and growth." 41 | }, 42 | { 43 | "title": "The Mystery of Summer", 44 | "slug": "the-mystery-of-summer", 45 | "content": "Imagine you are painting a summer scene. The sun is hot, the sky is blue, and the air is still. A gentle breeze rustles the leaves of the trees. Butterflies flutter from flower to flower, their wings a blur of color. Your painting captures the mystery and heat of summer, a time of year that is filled with life and activity." 46 | }, 47 | { 48 | "title": "The Magic of Fall", 49 | "slug": "the-magic-of-fall", 50 | "content": "Imagine you are painting a fall scene. Leaves change color, their hues ranging from green to gold, orange, and red. They fall gently from the trees, forming a carpet on the ground. A cool breeze blows, carrying the scent of decaying leaves. Your painting captures the magic and beauty of fall, a transitional season that marks the end of summer and the beginning of winter." 51 | } 52 | ] 53 | -------------------------------------------------------------------------------- /static/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joysofcode/sveltekit-flexsearch/6aabcace0b49723f734ff0a151a4127fa6f39444/static/favicon.png -------------------------------------------------------------------------------- /svelte.config.js: -------------------------------------------------------------------------------- 1 | import adapter from '@sveltejs/adapter-auto' 2 | import { vitePreprocess } from '@sveltejs/vite-plugin-svelte' 3 | 4 | /** @type {import('@sveltejs/kit').Config} */ 5 | const config = { 6 | preprocess: vitePreprocess(), 7 | kit: { 8 | adapter: adapter(), 9 | }, 10 | } 11 | 12 | export default config 13 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./.svelte-kit/tsconfig.json", 3 | "compilerOptions": { 4 | "allowJs": true, 5 | "checkJs": true, 6 | "esModuleInterop": true, 7 | "forceConsistentCasingInFileNames": true, 8 | "resolveJsonModule": true, 9 | "skipLibCheck": true, 10 | "sourceMap": true, 11 | "strict": true, 12 | "moduleResolution": "bundler" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /vite.config.ts: -------------------------------------------------------------------------------- 1 | import { sveltekit } from '@sveltejs/kit/vite' 2 | import { defineConfig } from 'vite' 3 | 4 | export default defineConfig({ 5 | plugins: [sveltekit()], 6 | }) 7 | --------------------------------------------------------------------------------