likec4 1.48.0 → 1.50.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/README.md +11 -1
  2. package/__app__/src/likec4.js +5941 -4496
  3. package/__app__/src/routes/index.js +3 -153
  4. package/__app__/src/routes/projects.js +21 -1087
  5. package/__app__/src/routes/single.js +1228 -16
  6. package/__app__/src/style.css +1 -1
  7. package/__app__/src/vendors.js +4649 -1897
  8. package/__app__/src/webcomponent.js +1 -1
  9. package/config/schema.json +169 -141
  10. package/dist/THIRD-PARTY-LICENSES.md +1769 -0
  11. package/dist/_chunks/LikeC4.mjs +1154 -202
  12. package/dist/_chunks/binary.mjs +72 -0
  13. package/dist/_chunks/index.d.mts +234 -140
  14. package/dist/_chunks/index2.d.mts +2043 -1828
  15. package/dist/_chunks/libs/@chevrotain/cst-dts-gen.mjs +30 -0
  16. package/dist/_chunks/libs/@chevrotain/regexp-to-ast.mjs +9 -785
  17. package/dist/_chunks/libs/@chevrotain/utils.mjs +1 -37
  18. package/dist/_chunks/libs/@hono/mcp.mjs +34 -0
  19. package/dist/_chunks/libs/@hono/node-server.mjs +1 -436
  20. package/dist/_chunks/libs/@logtape/logtape.d.mts +741 -0
  21. package/dist/_chunks/libs/@logtape/logtape.mjs +6 -1354
  22. package/dist/_chunks/libs/@lume/kiwi.mjs +1 -1355
  23. package/dist/_chunks/libs/@modelcontextprotocol/sdk.d.mts +114 -14
  24. package/dist/_chunks/libs/@modelcontextprotocol/sdk.mjs +12 -25105
  25. package/dist/_chunks/libs/@msgpack/msgpack.mjs +1 -1503
  26. package/dist/_chunks/libs/@nanostores/react.d.mts +61 -1
  27. package/dist/_chunks/libs/@nanostores/react.mjs +1 -30
  28. package/dist/_chunks/libs/@smithy/is-array-buffer.mjs +1 -10
  29. package/dist/_chunks/libs/@smithy/util-base64.mjs +1 -100
  30. package/dist/_chunks/libs/ajv.mjs +1 -777
  31. package/dist/_chunks/libs/atomically.mjs +1 -362
  32. package/dist/_chunks/libs/birpc.mjs +1 -201
  33. package/dist/_chunks/libs/chevrotain-allstar.mjs +2 -850
  34. package/dist/_chunks/libs/chevrotain.mjs +55 -6229
  35. package/dist/_chunks/libs/conf.mjs +1 -2258
  36. package/dist/_chunks/libs/defu.mjs +1 -42
  37. package/dist/_chunks/libs/esm-env.mjs +1 -5
  38. package/dist/_chunks/libs/eventemitter3.mjs +1 -243
  39. package/dist/_chunks/libs/fast-equals.mjs +1 -446
  40. package/dist/_chunks/libs/find-up-simple.mjs +1 -24
  41. package/dist/_chunks/libs/get-port.mjs +1 -107
  42. package/dist/_chunks/libs/is-docker.mjs +1 -26
  43. package/dist/_chunks/libs/is-error-instance.mjs +1 -26
  44. package/dist/_chunks/libs/is-inside-container.mjs +1 -20
  45. package/dist/_chunks/libs/is-plain-obj.mjs +1 -9
  46. package/dist/_chunks/libs/isexe.mjs +1 -127
  47. package/dist/_chunks/libs/json5.mjs +14 -959
  48. package/dist/_chunks/libs/khroma.mjs +1 -605
  49. package/dist/_chunks/libs/ky.mjs +2 -807
  50. package/dist/_chunks/libs/langium.d.mts +2913 -2876
  51. package/dist/_chunks/libs/langium.mjs +33 -20351
  52. package/dist/_chunks/libs/merge-error-cause.mjs +2 -746
  53. package/dist/_chunks/libs/p-limit.mjs +1 -120
  54. package/dist/_chunks/libs/p-queue.mjs +1 -449
  55. package/dist/_chunks/libs/package-manager-detector.mjs +1 -559
  56. package/dist/_chunks/libs/package-up.mjs +1 -10
  57. package/dist/_chunks/libs/pako.mjs +1 -0
  58. package/dist/_chunks/libs/parse-ms.mjs +1 -36
  59. package/dist/_chunks/libs/pathe.mjs +1 -0
  60. package/dist/_chunks/libs/picomatch.mjs +1 -1673
  61. package/dist/_chunks/libs/pretty-ms.mjs +1 -80
  62. package/dist/_chunks/libs/remeda.mjs +2 -690
  63. package/dist/_chunks/libs/safe-stringify.mjs +1 -21
  64. package/dist/_chunks/libs/strip-indent.mjs +1 -15
  65. package/dist/_chunks/libs/tinyrainbow.mjs +1 -88
  66. package/dist/_chunks/libs/ts-graphviz.mjs +4 -725
  67. package/dist/_chunks/libs/ufo.mjs +1 -240
  68. package/dist/_chunks/libs/which.mjs +1 -84
  69. package/dist/_chunks/libs/word-wrap.mjs +12 -43
  70. package/dist/_chunks/rolldown-runtime.mjs +1 -48
  71. package/dist/_chunks/sequence.mjs +1 -0
  72. package/dist/_chunks/src.mjs +15 -0
  73. package/dist/_chunks/src2.mjs +499 -0
  74. package/dist/cli/index.mjs +77 -1952
  75. package/dist/config/index.d.mts +2 -2
  76. package/dist/config/index.mjs +1 -6
  77. package/dist/index.d.mts +150 -7
  78. package/dist/index.mjs +1 -21
  79. package/dist/model/builder.mjs +1 -3
  80. package/dist/model/index.d.mts +57 -3
  81. package/dist/model/index.mjs +1 -5
  82. package/dist/vite-plugin/index.d.mts +7 -3
  83. package/dist/vite-plugin/index.mjs +1 -22
  84. package/dist/vite-plugin/internal.d.mts +6 -7
  85. package/dist/vite-plugin/internal.mjs +1 -68
  86. package/package.json +64 -45
  87. package/react/{index.d.ts → index.d.mts} +114 -72
  88. package/react/{index.js → index.mjs} +21320 -22041
  89. package/react/package.json +2 -5
  90. package/vite-plugin-modules.d.ts +10 -5
  91. package/dist/_chunks/LikeC4.d.mts +0 -121
  92. package/dist/_chunks/config-app.prod.d.mts +0 -18
  93. package/dist/_chunks/config-app.prod.mjs +0 -188
  94. package/dist/_chunks/config-webcomponent.prod.mjs +0 -71
  95. package/dist/_chunks/define-config.mjs +0 -409
  96. package/dist/_chunks/index3.d.mts +0 -60
  97. package/dist/_chunks/libs/@chevrotain/gast.mjs +0 -3969
  98. package/dist/_chunks/libs/hono.mjs +0 -1829
  99. package/dist/_chunks/libs/nanoid.mjs +0 -29
  100. package/dist/_chunks/libs/nanostores.d.mts +0 -63
  101. package/dist/_chunks/libs/nanostores.mjs +0 -198
  102. package/dist/_chunks/model.mjs +0 -12
  103. package/dist/_chunks/module.d.mts +0 -71
  104. package/dist/_chunks/module.mjs +0 -18657
  105. package/dist/_chunks/plugin.mjs +0 -996
  106. package/dist/_chunks/sequence-view.mjs +0 -575
  107. package/dist/_chunks/vite-build.mjs +0 -69
  108. package/dist/_chunks/vite-dev.mjs +0 -79
  109. package/dist/_chunks/vite-preview.mjs +0 -27
  110. package/dist/language/module.d.mts +0 -5
  111. package/dist/language/module.mjs +0 -20
  112. package/dist/vite/vite-build.d.mts +0 -26
  113. package/dist/vite/vite-build.mjs +0 -27
  114. package/dist/vite/vite-dev.d.mts +0 -34
  115. package/dist/vite/vite-dev.mjs +0 -29
  116. package/dist/vite/vite-preview.d.mts +0 -20
  117. package/dist/vite/vite-preview.mjs +0 -26
  118. /package/dist/_chunks/{index4.d.mts → libs/@chevrotain/types.d.mts} +0 -0
@@ -1,559 +1 @@
1
- import path from "node:path";
2
- import fsPromises from "node:fs/promises";
3
- import process from "node:process";
4
-
5
- //#region ../../node_modules/.pnpm/package-manager-detector@1.6.0/node_modules/package-manager-detector/dist/commands.mjs
6
- function dashDashArg(agent, agentCommand) {
7
- return (args) => {
8
- if (args.length > 1) return [
9
- agent,
10
- agentCommand,
11
- args[0],
12
- "--",
13
- ...args.slice(1)
14
- ];
15
- else return [
16
- agent,
17
- agentCommand,
18
- args[0]
19
- ];
20
- };
21
- }
22
- function denoExecute() {
23
- return (args) => {
24
- return [
25
- "deno",
26
- "run",
27
- `npm:${args[0]}`,
28
- ...args.slice(1)
29
- ];
30
- };
31
- }
32
- const npm = {
33
- "agent": ["npm", 0],
34
- "run": dashDashArg("npm", "run"),
35
- "install": [
36
- "npm",
37
- "i",
38
- 0
39
- ],
40
- "frozen": [
41
- "npm",
42
- "ci",
43
- 0
44
- ],
45
- "global": [
46
- "npm",
47
- "i",
48
- "-g",
49
- 0
50
- ],
51
- "add": [
52
- "npm",
53
- "i",
54
- 0
55
- ],
56
- "upgrade": [
57
- "npm",
58
- "update",
59
- 0
60
- ],
61
- "upgrade-interactive": null,
62
- "dedupe": [
63
- "npm",
64
- "dedupe",
65
- 0
66
- ],
67
- "execute": ["npx", 0],
68
- "execute-local": ["npx", 0],
69
- "uninstall": [
70
- "npm",
71
- "uninstall",
72
- 0
73
- ],
74
- "global_uninstall": [
75
- "npm",
76
- "uninstall",
77
- "-g",
78
- 0
79
- ]
80
- };
81
- const yarn = {
82
- "agent": ["yarn", 0],
83
- "run": [
84
- "yarn",
85
- "run",
86
- 0
87
- ],
88
- "install": [
89
- "yarn",
90
- "install",
91
- 0
92
- ],
93
- "frozen": [
94
- "yarn",
95
- "install",
96
- "--frozen-lockfile",
97
- 0
98
- ],
99
- "global": [
100
- "yarn",
101
- "global",
102
- "add",
103
- 0
104
- ],
105
- "add": [
106
- "yarn",
107
- "add",
108
- 0
109
- ],
110
- "upgrade": [
111
- "yarn",
112
- "upgrade",
113
- 0
114
- ],
115
- "upgrade-interactive": [
116
- "yarn",
117
- "upgrade-interactive",
118
- 0
119
- ],
120
- "dedupe": null,
121
- "execute": ["npx", 0],
122
- "execute-local": dashDashArg("yarn", "exec"),
123
- "uninstall": [
124
- "yarn",
125
- "remove",
126
- 0
127
- ],
128
- "global_uninstall": [
129
- "yarn",
130
- "global",
131
- "remove",
132
- 0
133
- ]
134
- };
135
- const yarnBerry = {
136
- ...yarn,
137
- "frozen": [
138
- "yarn",
139
- "install",
140
- "--immutable",
141
- 0
142
- ],
143
- "upgrade": [
144
- "yarn",
145
- "up",
146
- 0
147
- ],
148
- "upgrade-interactive": [
149
- "yarn",
150
- "up",
151
- "-i",
152
- 0
153
- ],
154
- "dedupe": [
155
- "yarn",
156
- "dedupe",
157
- 0
158
- ],
159
- "execute": [
160
- "yarn",
161
- "dlx",
162
- 0
163
- ],
164
- "execute-local": [
165
- "yarn",
166
- "exec",
167
- 0
168
- ],
169
- "global": [
170
- "npm",
171
- "i",
172
- "-g",
173
- 0
174
- ],
175
- "global_uninstall": [
176
- "npm",
177
- "uninstall",
178
- "-g",
179
- 0
180
- ]
181
- };
182
- const pnpm = {
183
- "agent": ["pnpm", 0],
184
- "run": [
185
- "pnpm",
186
- "run",
187
- 0
188
- ],
189
- "install": [
190
- "pnpm",
191
- "i",
192
- 0
193
- ],
194
- "frozen": [
195
- "pnpm",
196
- "i",
197
- "--frozen-lockfile",
198
- 0
199
- ],
200
- "global": [
201
- "pnpm",
202
- "add",
203
- "-g",
204
- 0
205
- ],
206
- "add": [
207
- "pnpm",
208
- "add",
209
- 0
210
- ],
211
- "upgrade": [
212
- "pnpm",
213
- "update",
214
- 0
215
- ],
216
- "upgrade-interactive": [
217
- "pnpm",
218
- "update",
219
- "-i",
220
- 0
221
- ],
222
- "dedupe": [
223
- "pnpm",
224
- "dedupe",
225
- 0
226
- ],
227
- "execute": [
228
- "pnpm",
229
- "dlx",
230
- 0
231
- ],
232
- "execute-local": [
233
- "pnpm",
234
- "exec",
235
- 0
236
- ],
237
- "uninstall": [
238
- "pnpm",
239
- "remove",
240
- 0
241
- ],
242
- "global_uninstall": [
243
- "pnpm",
244
- "remove",
245
- "--global",
246
- 0
247
- ]
248
- };
249
- const bun = {
250
- "agent": ["bun", 0],
251
- "run": [
252
- "bun",
253
- "run",
254
- 0
255
- ],
256
- "install": [
257
- "bun",
258
- "install",
259
- 0
260
- ],
261
- "frozen": [
262
- "bun",
263
- "install",
264
- "--frozen-lockfile",
265
- 0
266
- ],
267
- "global": [
268
- "bun",
269
- "add",
270
- "-g",
271
- 0
272
- ],
273
- "add": [
274
- "bun",
275
- "add",
276
- 0
277
- ],
278
- "upgrade": [
279
- "bun",
280
- "update",
281
- 0
282
- ],
283
- "upgrade-interactive": [
284
- "bun",
285
- "update",
286
- "-i",
287
- 0
288
- ],
289
- "dedupe": null,
290
- "execute": [
291
- "bun",
292
- "x",
293
- 0
294
- ],
295
- "execute-local": [
296
- "bun",
297
- "x",
298
- 0
299
- ],
300
- "uninstall": [
301
- "bun",
302
- "remove",
303
- 0
304
- ],
305
- "global_uninstall": [
306
- "bun",
307
- "remove",
308
- "-g",
309
- 0
310
- ]
311
- };
312
- const deno = {
313
- "agent": ["deno", 0],
314
- "run": [
315
- "deno",
316
- "task",
317
- 0
318
- ],
319
- "install": [
320
- "deno",
321
- "install",
322
- 0
323
- ],
324
- "frozen": [
325
- "deno",
326
- "install",
327
- "--frozen",
328
- 0
329
- ],
330
- "global": [
331
- "deno",
332
- "install",
333
- "-g",
334
- 0
335
- ],
336
- "add": [
337
- "deno",
338
- "add",
339
- 0
340
- ],
341
- "upgrade": [
342
- "deno",
343
- "outdated",
344
- "--update",
345
- 0
346
- ],
347
- "upgrade-interactive": [
348
- "deno",
349
- "outdated",
350
- "--update",
351
- 0
352
- ],
353
- "dedupe": null,
354
- "execute": denoExecute(),
355
- "execute-local": [
356
- "deno",
357
- "task",
358
- "--eval",
359
- 0
360
- ],
361
- "uninstall": [
362
- "deno",
363
- "remove",
364
- 0
365
- ],
366
- "global_uninstall": [
367
- "deno",
368
- "uninstall",
369
- "-g",
370
- 0
371
- ]
372
- };
373
- const COMMANDS = {
374
- "npm": npm,
375
- "yarn": yarn,
376
- "yarn@berry": yarnBerry,
377
- "pnpm": pnpm,
378
- "pnpm@6": {
379
- ...pnpm,
380
- run: dashDashArg("pnpm", "run")
381
- },
382
- "bun": bun,
383
- "deno": deno
384
- };
385
- function resolveCommand(agent, command, args) {
386
- const value = COMMANDS[agent][command];
387
- return constructCommand(value, args);
388
- }
389
- function constructCommand(value, args) {
390
- if (value == null) return null;
391
- const list = typeof value === "function" ? value(args) : value.flatMap((v) => {
392
- if (typeof v === "number") return args;
393
- return [v];
394
- });
395
- return {
396
- command: list[0],
397
- args: list.slice(1)
398
- };
399
- }
400
-
401
- //#endregion
402
- //#region ../../node_modules/.pnpm/package-manager-detector@1.6.0/node_modules/package-manager-detector/dist/constants.mjs
403
- const AGENTS = [
404
- "npm",
405
- "yarn",
406
- "yarn@berry",
407
- "pnpm",
408
- "pnpm@6",
409
- "bun",
410
- "deno"
411
- ];
412
- const LOCKS = {
413
- "bun.lock": "bun",
414
- "bun.lockb": "bun",
415
- "deno.lock": "deno",
416
- "pnpm-lock.yaml": "pnpm",
417
- "pnpm-workspace.yaml": "pnpm",
418
- "yarn.lock": "yarn",
419
- "package-lock.json": "npm",
420
- "npm-shrinkwrap.json": "npm"
421
- };
422
- const INSTALL_METADATA = {
423
- "node_modules/.deno/": "deno",
424
- "node_modules/.pnpm/": "pnpm",
425
- "node_modules/.yarn-state.yml": "yarn",
426
- "node_modules/.yarn_integrity": "yarn",
427
- "node_modules/.package-lock.json": "npm",
428
- ".pnp.cjs": "yarn",
429
- ".pnp.js": "yarn",
430
- "bun.lock": "bun",
431
- "bun.lockb": "bun"
432
- };
433
-
434
- //#endregion
435
- //#region ../../node_modules/.pnpm/package-manager-detector@1.6.0/node_modules/package-manager-detector/dist/detect.mjs
436
- async function pathExists(path2, type) {
437
- try {
438
- const stat = await fsPromises.stat(path2);
439
- return type === "file" ? stat.isFile() : stat.isDirectory();
440
- } catch {
441
- return false;
442
- }
443
- }
444
- function* lookup(cwd = process.cwd()) {
445
- let directory = path.resolve(cwd);
446
- const { root } = path.parse(directory);
447
- while (directory && directory !== root) {
448
- yield directory;
449
- directory = path.dirname(directory);
450
- }
451
- }
452
- async function parsePackageJson(filepath, options) {
453
- if (!filepath || !await pathExists(filepath, "file")) return null;
454
- return await handlePackageManager(filepath, options);
455
- }
456
- async function detect(options = {}) {
457
- const { cwd, strategies = [
458
- "lockfile",
459
- "packageManager-field",
460
- "devEngines-field"
461
- ] } = options;
462
- let stopDir;
463
- if (typeof options.stopDir === "string") {
464
- const resolved = path.resolve(options.stopDir);
465
- stopDir = (dir) => dir === resolved;
466
- } else stopDir = options.stopDir;
467
- for (const directory of lookup(cwd)) {
468
- for (const strategy of strategies) switch (strategy) {
469
- case "lockfile":
470
- for (const lock of Object.keys(LOCKS)) if (await pathExists(path.join(directory, lock), "file")) {
471
- const name = LOCKS[lock];
472
- const result = await parsePackageJson(path.join(directory, "package.json"), options);
473
- if (result) return result;
474
- else return {
475
- name,
476
- agent: name
477
- };
478
- }
479
- break;
480
- case "packageManager-field":
481
- case "devEngines-field": {
482
- const result = await parsePackageJson(path.join(directory, "package.json"), options);
483
- if (result) return result;
484
- break;
485
- }
486
- case "install-metadata":
487
- for (const metadata of Object.keys(INSTALL_METADATA)) {
488
- const fileOrDir = metadata.endsWith("/") ? "dir" : "file";
489
- if (await pathExists(path.join(directory, metadata), fileOrDir)) {
490
- const name = INSTALL_METADATA[metadata];
491
- return {
492
- name,
493
- agent: name === "yarn" ? isMetadataYarnClassic(metadata) ? "yarn" : "yarn@berry" : name
494
- };
495
- }
496
- }
497
- break;
498
- }
499
- if (stopDir?.(directory)) break;
500
- }
501
- return null;
502
- }
503
- function getNameAndVer(pkg) {
504
- const handelVer = (version) => version?.match(/\d+(\.\d+){0,2}/)?.[0] ?? version;
505
- if (typeof pkg.packageManager === "string") {
506
- const [name, ver] = pkg.packageManager.replace(/^\^/, "").split("@");
507
- return {
508
- name,
509
- ver: handelVer(ver)
510
- };
511
- }
512
- if (typeof pkg.devEngines?.packageManager?.name === "string") return {
513
- name: pkg.devEngines.packageManager.name,
514
- ver: handelVer(pkg.devEngines.packageManager.version)
515
- };
516
- }
517
- async function handlePackageManager(filepath, options) {
518
- try {
519
- const content = await fsPromises.readFile(filepath, "utf8");
520
- const pkg = options.packageJsonParser ? await options.packageJsonParser(content, filepath) : JSON.parse(content);
521
- let agent;
522
- const nameAndVer = getNameAndVer(pkg);
523
- if (nameAndVer) {
524
- const name = nameAndVer.name;
525
- const ver = nameAndVer.ver;
526
- let version = ver;
527
- if (name === "yarn" && ver && Number.parseInt(ver) > 1) {
528
- agent = "yarn@berry";
529
- version = "berry";
530
- return {
531
- name,
532
- agent,
533
- version
534
- };
535
- } else if (name === "pnpm" && ver && Number.parseInt(ver) < 7) {
536
- agent = "pnpm@6";
537
- return {
538
- name,
539
- agent,
540
- version
541
- };
542
- } else if (AGENTS.includes(name)) {
543
- agent = name;
544
- return {
545
- name,
546
- agent,
547
- version
548
- };
549
- } else return options.onUnknown?.(pkg.packageManager) ?? null;
550
- }
551
- } catch {}
552
- return null;
553
- }
554
- function isMetadataYarnClassic(metadataPath) {
555
- return metadataPath.endsWith(".yarn_integrity");
556
- }
557
-
558
- //#endregion
559
- export { resolveCommand as n, detect as t };
1
+ import e from"node:fs/promises";import t from"node:path";import n from"node:process";function r(e,t){return n=>n.length>1?[e,t,n[0],`--`,...n.slice(1)]:[e,t,n[0]]}function i(){return e=>[`deno`,`run`,`npm:${e[0]}`,...e.slice(1)]}const a={agent:[`npm`,0],run:r(`npm`,`run`),install:[`npm`,`i`,0],frozen:[`npm`,`ci`,0],global:[`npm`,`i`,`-g`,0],add:[`npm`,`i`,0],upgrade:[`npm`,`update`,0],"upgrade-interactive":null,dedupe:[`npm`,`dedupe`,0],execute:[`npx`,0],"execute-local":[`npx`,0],uninstall:[`npm`,`uninstall`,0],global_uninstall:[`npm`,`uninstall`,`-g`,0]},o={agent:[`yarn`,0],run:[`yarn`,`run`,0],install:[`yarn`,`install`,0],frozen:[`yarn`,`install`,`--frozen-lockfile`,0],global:[`yarn`,`global`,`add`,0],add:[`yarn`,`add`,0],upgrade:[`yarn`,`upgrade`,0],"upgrade-interactive":[`yarn`,`upgrade-interactive`,0],dedupe:null,execute:[`npx`,0],"execute-local":r(`yarn`,`exec`),uninstall:[`yarn`,`remove`,0],global_uninstall:[`yarn`,`global`,`remove`,0]},s={...o,frozen:[`yarn`,`install`,`--immutable`,0],upgrade:[`yarn`,`up`,0],"upgrade-interactive":[`yarn`,`up`,`-i`,0],dedupe:[`yarn`,`dedupe`,0],execute:[`yarn`,`dlx`,0],"execute-local":[`yarn`,`exec`,0],global:[`npm`,`i`,`-g`,0],global_uninstall:[`npm`,`uninstall`,`-g`,0]},c={agent:[`pnpm`,0],run:[`pnpm`,`run`,0],install:[`pnpm`,`i`,0],frozen:[`pnpm`,`i`,`--frozen-lockfile`,0],global:[`pnpm`,`add`,`-g`,0],add:[`pnpm`,`add`,0],upgrade:[`pnpm`,`update`,0],"upgrade-interactive":[`pnpm`,`update`,`-i`,0],dedupe:[`pnpm`,`dedupe`,0],execute:[`pnpm`,`dlx`,0],"execute-local":[`pnpm`,`exec`,0],uninstall:[`pnpm`,`remove`,0],global_uninstall:[`pnpm`,`remove`,`--global`,0]},l={agent:[`bun`,0],run:[`bun`,`run`,0],install:[`bun`,`install`,0],frozen:[`bun`,`install`,`--frozen-lockfile`,0],global:[`bun`,`add`,`-g`,0],add:[`bun`,`add`,0],upgrade:[`bun`,`update`,0],"upgrade-interactive":[`bun`,`update`,`-i`,0],dedupe:null,execute:[`bun`,`x`,0],"execute-local":[`bun`,`x`,0],uninstall:[`bun`,`remove`,0],global_uninstall:[`bun`,`remove`,`-g`,0]},u={agent:[`deno`,0],run:[`deno`,`task`,0],install:[`deno`,`install`,0],frozen:[`deno`,`install`,`--frozen`,0],global:[`deno`,`install`,`-g`,0],add:[`deno`,`add`,0],upgrade:[`deno`,`outdated`,`--update`,0],"upgrade-interactive":[`deno`,`outdated`,`--update`,0],dedupe:null,execute:i(),"execute-local":[`deno`,`task`,`--eval`,0],uninstall:[`deno`,`remove`,0],global_uninstall:[`deno`,`uninstall`,`-g`,0]},d={npm:a,yarn:o,"yarn@berry":s,pnpm:c,"pnpm@6":{...c,run:r(`pnpm`,`run`)},bun:l,deno:u};function f(e,t,n){let r=d[e][t];return p(r,n)}function p(e,t){if(e==null)return null;let n=typeof e==`function`?e(t):e.flatMap(e=>typeof e==`number`?t:[e]);return{command:n[0],args:n.slice(1)}}const m=[`npm`,`yarn`,`yarn@berry`,`pnpm`,`pnpm@6`,`bun`,`deno`],h={"bun.lock":`bun`,"bun.lockb":`bun`,"deno.lock":`deno`,"pnpm-lock.yaml":`pnpm`,"pnpm-workspace.yaml":`pnpm`,"yarn.lock":`yarn`,"package-lock.json":`npm`,"npm-shrinkwrap.json":`npm`},g={"node_modules/.deno/":`deno`,"node_modules/.pnpm/":`pnpm`,"node_modules/.yarn-state.yml":`yarn`,"node_modules/.yarn_integrity":`yarn`,"node_modules/.package-lock.json":`npm`,".pnp.cjs":`yarn`,".pnp.js":`yarn`,"bun.lock":`bun`,"bun.lockb":`bun`};async function _(t,n){try{let r=await e.stat(t);return n===`file`?r.isFile():r.isDirectory()}catch{return!1}}function*v(e=n.cwd()){let r=t.resolve(e),{root:i}=t.parse(r);for(;r&&r!==i;)yield r,r=t.dirname(r)}async function y(e,t){return!e||!await _(e,`file`)?null:await S(e,t)}async function b(e={}){let{cwd:n,strategies:r=[`lockfile`,`packageManager-field`,`devEngines-field`]}=e,i;if(typeof e.stopDir==`string`){let n=t.resolve(e.stopDir);i=e=>e===n}else i=e.stopDir;for(let a of v(n)){for(let n of r)switch(n){case`lockfile`:for(let n of Object.keys(h))if(await _(t.join(a,n),`file`)){let r=h[n];return await y(t.join(a,`package.json`),e)||{name:r,agent:r}}break;case`packageManager-field`:case`devEngines-field`:{let n=await y(t.join(a,`package.json`),e);if(n)return n;break}case`install-metadata`:for(let e of Object.keys(g)){let n=e.endsWith(`/`)?`dir`:`file`;if(await _(t.join(a,e),n)){let t=g[e];return{name:t,agent:t===`yarn`?C(e)?`yarn`:`yarn@berry`:t}}}break}if(i?.(a))break}return null}function x(e){let t=e=>e?.match(/\d+(\.\d+){0,2}/)?.[0]??e;if(typeof e.packageManager==`string`){let[n,r]=e.packageManager.replace(/^\^/,``).split(`@`);return{name:n,ver:t(r)}}if(typeof e.devEngines?.packageManager?.name==`string`)return{name:e.devEngines.packageManager.name,ver:t(e.devEngines.packageManager.version)}}async function S(t,n){try{let r=await e.readFile(t,`utf8`),i=n.packageJsonParser?await n.packageJsonParser(r,t):JSON.parse(r),a,o=x(i);if(o){let e=o.name,t=o.ver,r=t;return e===`yarn`&&t&&Number.parseInt(t)>1?(a=`yarn@berry`,r=`berry`,{name:e,agent:a,version:r}):e===`pnpm`&&t&&Number.parseInt(t)<7?(a=`pnpm@6`,{name:e,agent:a,version:r}):m.includes(e)?(a=e,{name:e,agent:a,version:r}):n.onUnknown?.(i.packageManager)??null}}catch{}return null}function C(e){return e.endsWith(`.yarn_integrity`)}export{f as n,b as t};
@@ -1,10 +1 @@
1
- import { t as findUpSync } from "./find-up-simple.mjs";
2
- import process from "node:process";
3
-
4
- //#region ../../node_modules/.pnpm/package-up@5.0.0/node_modules/package-up/index.js
5
- function packageUpSync({ cwd = process.cwd() } = {}) {
6
- return findUpSync("package.json", { cwd });
7
- }
8
-
9
- //#endregion
10
- export { packageUpSync as t };
1
+ import{t as e}from"./find-up-simple.mjs";import t from"node:process";function n({cwd:n=t.cwd()}={}){return e(`package.json`,{cwd:n})}export{n as t};
@@ -0,0 +1 @@
1
+ function e(e){let t=e.length;for(;--t>=0;)e[t]=0}const t=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),n=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),r=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),i=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=Array(288*2);e(a);const o=Array(60);e(o);const s=Array(512);e(s);const c=Array(256);e(c);const l=Array(29);e(l);const u=Array(30);e(u);function d(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}let f,p,m;function h(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}const g=e=>e<256?s[e]:s[256+(e>>>7)],_=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},v=(e,t,n)=>{e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,_(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},y=(e,t,n)=>{v(e,n[t*2],n[t*2+1])},b=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},x=e=>{e.bi_valid===16?(_(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},S=(e,t)=>{let n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,c=t.stat_desc.max_length,l,u,d,f,p,m,h=0;for(f=0;f<=15;f++)e.bl_count[f]=0;for(n[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<573;l++)u=e.heap[l],f=n[n[u*2+1]*2+1]+1,f>c&&(f=c,h++),n[u*2+1]=f,!(u>r)&&(e.bl_count[f]++,p=0,u>=s&&(p=o[u-s]),m=n[u*2],e.opt_len+=m*(f+p),a&&(e.static_len+=m*(i[u*2+1]+p)));if(h!==0){do{for(f=c-1;e.bl_count[f]===0;)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[c]--,h-=2}while(h>0);for(f=c;f!==0;f--)for(u=e.bl_count[f];u!==0;)d=e.heap[--l],!(d>r)&&(n[d*2+1]!==f&&(e.opt_len+=(f-n[d*2+1])*n[d*2],n[d*2+1]=f),u--)}},C=(e,t,n)=>{let r=Array(16),i=0,a,o;for(a=1;a<=15;a++)i=i+n[a-1]<<1,r[a]=i;for(o=0;o<=t;o++){let t=e[o*2+1];t!==0&&(e[o*2]=b(r[t]++,t))}},w=()=>{let e,i,h,g,_,v=Array(16);for(h=0,g=0;g<28;g++)for(l[g]=h,e=0;e<1<<t[g];e++)c[h++]=g;for(c[h-1]=g,_=0,g=0;g<16;g++)for(u[g]=_,e=0;e<1<<n[g];e++)s[_++]=g;for(_>>=7;g<30;g++)for(u[g]=_<<7,e=0;e<1<<n[g]-7;e++)s[256+ _++]=g;for(i=0;i<=15;i++)v[i]=0;for(e=0;e<=143;)a[e*2+1]=8,e++,v[8]++;for(;e<=255;)a[e*2+1]=9,e++,v[9]++;for(;e<=279;)a[e*2+1]=7,e++,v[7]++;for(;e<=287;)a[e*2+1]=8,e++,v[8]++;for(C(a,287,v),e=0;e<30;e++)o[e*2+1]=5,o[e*2]=b(e,5);f=new d(a,t,257,286,15),p=new d(o,n,0,30,15),m=new d([],r,0,19,7)},T=e=>{let t;for(t=0;t<286;t++)e.dyn_ltree[t*2]=0;for(t=0;t<30;t++)e.dyn_dtree[t*2]=0;for(t=0;t<19;t++)e.bl_tree[t*2]=0;e.dyn_ltree[256*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},E=e=>{e.bi_valid>8?_(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},D=(e,t,n,r)=>{let i=t*2,a=n*2;return e[i]<e[a]||e[i]===e[a]&&r[t]<=r[n]},O=(e,t,n)=>{let r=e.heap[n],i=n<<1;for(;i<=e.heap_len&&(i<e.heap_len&&D(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!D(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},ee=(e,r,i)=>{let a,o,s=0,d,f;if(e.sym_next!==0)do a=e.pending_buf[e.sym_buf+ s++]&255,a+=(e.pending_buf[e.sym_buf+ s++]&255)<<8,o=e.pending_buf[e.sym_buf+ s++],a===0?y(e,o,r):(d=c[o],y(e,d+256+1,r),f=t[d],f!==0&&(o-=l[d],v(e,o,f)),a--,d=g(a),y(e,d,i),f=n[d],f!==0&&(a-=u[d],v(e,a,f)));while(s<e.sym_next);y(e,256,r)},k=(e,t)=>{let n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,a=t.stat_desc.elems,o,s,c=-1,l;for(e.heap_len=0,e.heap_max=573,o=0;o<a;o++)n[o*2]===0?n[o*2+1]=0:(e.heap[++e.heap_len]=c=o,e.depth[o]=0);for(;e.heap_len<2;)l=e.heap[++e.heap_len]=c<2?++c:0,n[l*2]=1,e.depth[l]=0,e.opt_len--,i&&(e.static_len-=r[l*2+1]);for(t.max_code=c,o=e.heap_len>>1;o>=1;o--)O(e,n,o);l=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],O(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,n[l*2]=n[o*2]+n[s*2],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,n[o*2+1]=n[s*2+1]=l,e.heap[1]=l++,O(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],S(e,t),C(n,c,e.bl_count)},A=(e,t,n)=>{let r,i=-1,a,o=t[1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)a=o,o=t[(r+1)*2+1],!(++s<c&&a===o)&&(s<l?e.bl_tree[a*2]+=s:a===0?s<=10?e.bl_tree[34]++:e.bl_tree[36]++:(a!==i&&e.bl_tree[a*2]++,e.bl_tree[32]++),s=0,i=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4))},te=(e,t,n)=>{let r,i=-1,a,o=t[1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),r=0;r<=n;r++)if(a=o,o=t[(r+1)*2+1],!(++s<c&&a===o)){if(s<l)do y(e,a,e.bl_tree);while(--s!==0);else a===0?s<=10?(y(e,17,e.bl_tree),v(e,s-3,3)):(y(e,18,e.bl_tree),v(e,s-11,7)):(a!==i&&(y(e,a,e.bl_tree),s--),y(e,16,e.bl_tree),v(e,s-3,2));s=0,i=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4)}},ne=e=>{let t;for(A(e,e.dyn_ltree,e.l_desc.max_code),A(e,e.dyn_dtree,e.d_desc.max_code),k(e,e.bl_desc),t=18;t>=3&&e.bl_tree[i[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},re=(e,t,n,r)=>{let a;for(v(e,t-257,5),v(e,n-1,5),v(e,r-4,4),a=0;a<r;a++)v(e,e.bl_tree[i[a]*2+1],3);te(e,e.dyn_ltree,t-1),te(e,e.dyn_dtree,n-1)},ie=e=>{let t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return 0;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return 1;for(n=32;n<256;n++)if(e.dyn_ltree[n*2]!==0)return 1;return 0};let ae=!1;const oe=e=>{ae||=(w(),!0),e.l_desc=new h(e.dyn_ltree,f),e.d_desc=new h(e.dyn_dtree,p),e.bl_desc=new h(e.bl_tree,m),e.bi_buf=0,e.bi_valid=0,T(e)},se=(e,t,n,r)=>{v(e,0+(r?1:0),3),E(e),_(e,n),_(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},ce=e=>{v(e,2,3),y(e,256,a),x(e)},le=(e,t,n,r)=>{let i,s,c=0;e.level>0?(e.strm.data_type===2&&(e.strm.data_type=ie(e)),k(e,e.l_desc),k(e,e.d_desc),c=ne(e),i=e.opt_len+3+7>>>3,s=e.static_len+3+7>>>3,s<=i&&(i=s)):i=s=n+5,n+4<=i&&t!==-1?se(e,t,n,r):e.strategy===4||s===i?(v(e,2+(r?1:0),3),ee(e,a,o)):(v(e,4+(r?1:0),3),re(e,e.l_desc.max_code+1,e.d_desc.max_code+1,c+1),ee(e,e.dyn_ltree,e.dyn_dtree)),T(e),r&&E(e)},ue=(e,t,n)=>(e.pending_buf[e.sym_buf+ e.sym_next++]=t,e.pending_buf[e.sym_buf+ e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+ e.sym_next++]=n,t===0?e.dyn_ltree[n*2]++:(e.matches++,t--,e.dyn_ltree[(c[n]+256+1)*2]++,e.dyn_dtree[g(t)*2]++),e.sym_next===e.sym_end);var de={_tr_init:oe,_tr_stored_block:se,_tr_flush_block:le,_tr_tally:ue,_tr_align:ce};const fe=(e,t,n,r)=>{let i=e&65535|0,a=e>>>16&65535|0,o=0;for(;n!==0;){o=n>2e3?2e3:n,n-=o;do i=i+t[r++]|0,a=a+i|0;while(--o);i%=65521,a%=65521}return i|a<<16|0};var pe=fe;const me=()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t},he=new Uint32Array(me()),ge=(e,t,n,r)=>{let i=he,a=r+n;e^=-1;for(let n=r;n<a;n++)e=e>>>8^i[(e^t[n])&255];return e^-1};var j=ge,M={2:`need dictionary`,1:`stream end`,0:``,"-1":`file error`,"-2":`stream error`,"-3":`data error`,"-4":`insufficient memory`,"-5":`buffer error`,"-6":`incompatible version`},N={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:_e,_tr_stored_block:ve,_tr_flush_block:ye,_tr_tally:P,_tr_align:be}=de,{Z_NO_FLUSH:F,Z_PARTIAL_FLUSH:xe,Z_FULL_FLUSH:Se,Z_FINISH:I,Z_BLOCK:Ce,Z_OK:L,Z_STREAM_END:we,Z_STREAM_ERROR:R,Z_DATA_ERROR:Te,Z_BUF_ERROR:Ee,Z_DEFAULT_COMPRESSION:De,Z_FILTERED:Oe,Z_HUFFMAN_ONLY:ke,Z_RLE:Ae,Z_FIXED:je,Z_DEFAULT_STRATEGY:Me,Z_UNKNOWN:Ne,Z_DEFLATED:Pe}=N,z=(e,t)=>(e.msg=M[t],t),Fe=e=>e*2-(e>4?9:0),B=e=>{let t=e.length;for(;--t>=0;)e[t]=0},Ie=e=>{let t,n,r,i=e.w_size;t=e.hash_size,r=t;do n=e.head[--r],e.head[r]=n>=i?n-i:0;while(--t);t=i,r=t;do n=e.prev[--r],e.prev[r]=n>=i?n-i:0;while(--t)};let Le=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask,V=Le;const H=e=>{let t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))},U=(e,t)=>{ye(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,H(e.strm)},W=(e,t)=>{e.pending_buf[e.pending++]=t},Re=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},ze=(e,t,n,r)=>{let i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),e.state.wrap===1?e.adler=pe(e.adler,t,i,n):e.state.wrap===2&&(e.adler=j(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},Be=(e,t)=>{let n=e.max_chain_length,r=e.strstart,i,a,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,l=e.window,u=e.w_mask,d=e.prev,f=e.strstart+258,p=l[r+o-1],m=l[r+o];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do{if(i=t,l[i+o]!==m||l[i+o-1]!==p||l[i]!==l[r]||l[++i]!==l[r+1])continue;r+=2,i++;do;while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&r<f);if(a=258-(f-r),r=f-258,a>o){if(e.match_start=t,o=a,a>=s)break;p=l[r+o-1],m=l[r+o]}}while((t=d[t&u])>c&&--n!==0);return o<=e.lookahead?o:e.lookahead},G=e=>{let t=e.w_size,n,r,i;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-262)&&(e.window.set(e.window.subarray(t,t+t-r),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),Ie(e),r+=t),e.strm.avail_in===0)break;if(n=ze(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,e.lookahead+e.insert>=3)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=V(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=V(e,e.ins_h,e.window[i+3-1]),e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<262&&e.strm.avail_in!==0)},Ve=(e,t)=>{let n=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,r,i,a,o=0,s=e.strm.avail_in;do{if(r=65535,a=e.bi_valid+42>>3,e.strm.avail_out<a||(a=e.strm.avail_out-a,i=e.strstart-e.block_start,r>i+e.strm.avail_in&&(r=i+e.strm.avail_in),r>a&&(r=a),r<n&&(r===0&&t!==I||t===F||r!==i+e.strm.avail_in)))break;o=t===I&&r===i+e.strm.avail_in?1:0,ve(e,0,0,o),e.pending_buf[e.pending-4]=r,e.pending_buf[e.pending-3]=r>>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,H(e.strm),i&&(i>r&&(i=r),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i,e.block_start+=i,r-=i),r&&(ze(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(o===0);return s-=e.strm.avail_in,s&&(s>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=s&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),o?4:t!==F&&t!==I&&e.strm.avail_in===0&&e.strstart===e.block_start?2:(a=e.window_size-e.strstart,e.strm.avail_in>a&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,a+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),a>e.strm.avail_in&&(a=e.strm.avail_in),a&&(ze(e.strm,e.window,e.strstart,a),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.high_water<e.strstart&&(e.high_water=e.strstart),a=e.bi_valid+42>>3,a=e.pending_buf_size-a>65535?65535:e.pending_buf_size-a,n=a>e.w_size?e.w_size:a,i=e.strstart-e.block_start,(i>=n||(i||t===I)&&t!==F&&e.strm.avail_in===0&&i<=a)&&(r=i>a?a:i,o=t===I&&e.strm.avail_in===0&&r===i?1:0,ve(e,e.block_start,r,o),e.block_start+=r,H(e.strm)),o?3:1)},He=(e,t)=>{let n,r;for(;;){if(e.lookahead<262){if(G(e),e.lookahead<262&&t===F)return 1;if(e.lookahead===0)break}if(n=0,e.lookahead>=3&&(e.ins_h=V(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),n!==0&&e.strstart-n<=e.w_size-262&&(e.match_length=Be(e,n)),e.match_length>=3)if(r=P(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do e.strstart++,e.ins_h=V(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=V(e,e.ins_h,e.window[e.strstart+1]);else r=P(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(U(e,!1),e.strm.avail_out===0))return 1}return e.insert=e.strstart<2?e.strstart:2,t===I?(U(e,!0),e.strm.avail_out===0?3:4):e.sym_next&&(U(e,!1),e.strm.avail_out===0)?1:2},K=(e,t)=>{let n,r,i;for(;;){if(e.lookahead<262){if(G(e),e.lookahead<262&&t===F)return 1;if(e.lookahead===0)break}if(n=0,e.lookahead>=3&&(e.ins_h=V(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-262&&(e.match_length=Be(e,n),e.match_length<=5&&(e.strategy===Oe||e.match_length===3&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,r=P(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=V(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(U(e,!1),e.strm.avail_out===0))return 1}else if(e.match_available){if(r=P(e,0,e.window[e.strstart-1]),r&&U(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&=(r=P(e,0,e.window[e.strstart-1]),0),e.insert=e.strstart<2?e.strstart:2,t===I?(U(e,!0),e.strm.avail_out===0?3:4):e.sym_next&&(U(e,!1),e.strm.avail_out===0)?1:2},Ue=(e,t)=>{let n,r,i,a,o=e.window;for(;;){if(e.lookahead<=258){if(G(e),e.lookahead<=258&&t===F)return 1;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(i=e.strstart-1,r=o[i],r===o[++i]&&r===o[++i]&&r===o[++i])){a=e.strstart+258;do;while(r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&i<a);e.match_length=258-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=P(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=P(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(U(e,!1),e.strm.avail_out===0))return 1}return e.insert=0,t===I?(U(e,!0),e.strm.avail_out===0?3:4):e.sym_next&&(U(e,!1),e.strm.avail_out===0)?1:2},We=(e,t)=>{let n;for(;;){if(e.lookahead===0&&(G(e),e.lookahead===0)){if(t===F)return 1;break}if(e.match_length=0,n=P(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(U(e,!1),e.strm.avail_out===0))return 1}return e.insert=0,t===I?(U(e,!0),e.strm.avail_out===0?3:4):e.sym_next&&(U(e,!1),e.strm.avail_out===0)?1:2};function q(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}const Ge=[new q(0,0,0,0,Ve),new q(4,4,8,4,He),new q(4,5,16,8,He),new q(4,6,32,32,He),new q(4,4,16,16,K),new q(8,16,32,32,K),new q(8,16,128,128,K),new q(8,32,128,256,K),new q(32,128,258,1024,K),new q(32,258,258,4096,K)],Ke=e=>{e.window_size=2*e.w_size,B(e.head),e.max_lazy_match=Ge[e.level].max_lazy,e.good_match=Ge[e.level].good_length,e.nice_match=Ge[e.level].nice_length,e.max_chain_length=Ge[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0};function qe(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Pe,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(573*2),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),B(this.dyn_ltree),B(this.dyn_dtree),B(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),B(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),B(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Je=e=>{if(!e)return 1;let t=e.state;return!t||t.strm!==e||t.status!==42&&t.status!==57&&t.status!==69&&t.status!==73&&t.status!==91&&t.status!==103&&t.status!==113&&t.status!==666?1:0},Ye=e=>{if(Je(e))return z(e,R);e.total_in=e.total_out=0,e.data_type=Ne;let t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?57:t.wrap?42:113,e.adler=t.wrap===2?0:1,t.last_flush=-2,_e(t),L},Xe=e=>{let t=Ye(e);return t===L&&Ke(e.state),t},Ze=(e,t)=>Je(e)||e.state.wrap!==2?R:(e.state.gzhead=t,L),Qe=(e,t,n,r,i,a)=>{if(!e)return R;let o=1;if(t===De&&(t=6),r<0?(o=0,r=-r):r>15&&(o=2,r-=16),i<1||i>9||n!==Pe||r<8||r>15||t<0||t>9||a<0||a>je||r===8&&o!==1)return z(e,R);r===8&&(r=9);let s=new qe;return e.state=s,s.strm=e,s.status=42,s.wrap=o,s.gzhead=null,s.w_bits=r,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+3-1)/3),s.window=new Uint8Array(s.w_size*2),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new Uint8Array(s.pending_buf_size),s.sym_buf=s.lit_bufsize,s.sym_end=(s.lit_bufsize-1)*3,s.level=t,s.strategy=a,s.method=n,Xe(e)},$e=(e,t)=>Qe(e,t,Pe,15,8,Me),et=(e,t)=>{if(Je(e)||t>Ce||t<0)return e?z(e,R):R;let n=e.state;if(!e.output||e.avail_in!==0&&!e.input||n.status===666&&t!==I)return z(e,e.avail_out===0?Ee:R);let r=n.last_flush;if(n.last_flush=t,n.pending!==0){if(H(e),e.avail_out===0)return n.last_flush=-1,L}else if(e.avail_in===0&&Fe(t)<=Fe(r)&&t!==I)return z(e,Ee);if(n.status===666&&e.avail_in!==0)return z(e,Ee);if(n.status===42&&n.wrap===0&&(n.status=113),n.status===42){let t=Pe+(n.w_bits-8<<4)<<8,r=-1;if(r=n.strategy>=ke||n.level<2?0:n.level<6?1:n.level===6?2:3,t|=r<<6,n.strstart!==0&&(t|=32),t+=31-t%31,Re(n,t),n.strstart!==0&&(Re(n,e.adler>>>16),Re(n,e.adler&65535)),e.adler=1,n.status=113,H(e),n.pending!==0)return n.last_flush=-1,L}if(n.status===57){if(e.adler=0,W(n,31),W(n,139),W(n,8),n.gzhead)W(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),W(n,n.gzhead.time&255),W(n,n.gzhead.time>>8&255),W(n,n.gzhead.time>>16&255),W(n,n.gzhead.time>>24&255),W(n,n.level===9?2:n.strategy>=ke||n.level<2?4:0),W(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(W(n,n.gzhead.extra.length&255),W(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=j(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69;else if(W(n,0),W(n,0),W(n,0),W(n,0),W(n,0),W(n,n.level===9?2:n.strategy>=ke||n.level<2?4:0),W(n,3),n.status=113,H(e),n.pending!==0)return n.last_flush=-1,L}if(n.status===69){if(n.gzhead.extra){let t=n.pending,r=(n.gzhead.extra.length&65535)-n.gzindex;for(;n.pending+r>n.pending_buf_size;){let i=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+i),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>t&&(e.adler=j(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex+=i,H(e),n.pending!==0)return n.last_flush=-1,L;t=0,r-=i}let i=new Uint8Array(n.gzhead.extra);n.pending_buf.set(i.subarray(n.gzindex,n.gzindex+r),n.pending),n.pending+=r,n.gzhead.hcrc&&n.pending>t&&(e.adler=j(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex=0}n.status=73}if(n.status===73){if(n.gzhead.name){let t=n.pending,r;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>t&&(e.adler=j(e.adler,n.pending_buf,n.pending-t,t)),H(e),n.pending!==0)return n.last_flush=-1,L;t=0}r=n.gzindex<n.gzhead.name.length?n.gzhead.name.charCodeAt(n.gzindex++)&255:0,W(n,r)}while(r!==0);n.gzhead.hcrc&&n.pending>t&&(e.adler=j(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex=0}n.status=91}if(n.status===91){if(n.gzhead.comment){let t=n.pending,r;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>t&&(e.adler=j(e.adler,n.pending_buf,n.pending-t,t)),H(e),n.pending!==0)return n.last_flush=-1,L;t=0}r=n.gzindex<n.gzhead.comment.length?n.gzhead.comment.charCodeAt(n.gzindex++)&255:0,W(n,r)}while(r!==0);n.gzhead.hcrc&&n.pending>t&&(e.adler=j(e.adler,n.pending_buf,n.pending-t,t))}n.status=103}if(n.status===103){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(H(e),n.pending!==0))return n.last_flush=-1,L;W(n,e.adler&255),W(n,e.adler>>8&255),e.adler=0}if(n.status=113,H(e),n.pending!==0)return n.last_flush=-1,L}if(e.avail_in!==0||n.lookahead!==0||t!==F&&n.status!==666){let r=n.level===0?Ve(n,t):n.strategy===ke?We(n,t):n.strategy===Ae?Ue(n,t):Ge[n.level].func(n,t);if((r===3||r===4)&&(n.status=666),r===1||r===3)return e.avail_out===0&&(n.last_flush=-1),L;if(r===2&&(t===xe?be(n):t!==Ce&&(ve(n,0,0,!1),t===Se&&(B(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),H(e),e.avail_out===0))return n.last_flush=-1,L}return t===I?n.wrap<=0?we:(n.wrap===2?(W(n,e.adler&255),W(n,e.adler>>8&255),W(n,e.adler>>16&255),W(n,e.adler>>24&255),W(n,e.total_in&255),W(n,e.total_in>>8&255),W(n,e.total_in>>16&255),W(n,e.total_in>>24&255)):(Re(n,e.adler>>>16),Re(n,e.adler&65535)),H(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending===0?we:L):L},tt=e=>{if(Je(e))return R;let t=e.state.status;return e.state=null,t===113?z(e,Te):L},nt=(e,t)=>{let n=t.length;if(Je(e))return R;let r=e.state,i=r.wrap;if(i===2||i===1&&r.status!==42||r.lookahead)return R;if(i===1&&(e.adler=pe(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){i===0&&(B(r.head),r.strstart=0,r.block_start=0,r.insert=0);let e=new Uint8Array(r.w_size);e.set(t.subarray(n-r.w_size,n),0),t=e,n=r.w_size}let a=e.avail_in,o=e.next_in,s=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,G(r);r.lookahead>=3;){let e=r.strstart,t=r.lookahead-2;do r.ins_h=V(r,r.ins_h,r.window[e+3-1]),r.prev[e&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=e,e++;while(--t);r.strstart=e,r.lookahead=2,G(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=o,e.input=s,e.avail_in=a,r.wrap=i,L};var rt={deflateInit:$e,deflateInit2:Qe,deflateReset:Xe,deflateResetKeep:Ye,deflateSetHeader:Ze,deflate:et,deflateEnd:tt,deflateSetDictionary:nt,deflateInfo:`pako deflate (from Nodeca project)`};const it=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var at=function(e){let t=Array.prototype.slice.call(arguments,1);for(;t.length;){let n=t.shift();if(n){if(typeof n!=`object`)throw TypeError(n+`must be non-object`);for(let t in n)it(n,t)&&(e[t]=n[t])}}return e},ot=e=>{let t=0;for(let n=0,r=e.length;n<r;n++)t+=e[n].length;let n=new Uint8Array(t);for(let t=0,r=0,i=e.length;t<i;t++){let i=e[t];n.set(i,r),r+=i.length}return n},st={assign:at,flattenChunks:ot};let ct=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{ct=!1}const lt=new Uint8Array(256);for(let e=0;e<256;e++)lt[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;lt[254]=lt[254]=1;var ut=e=>{if(typeof TextEncoder==`function`&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,n,r,i,a,o=e.length,s=0;for(i=0;i<o;i++)n=e.charCodeAt(i),(n&64512)==55296&&i+1<o&&(r=e.charCodeAt(i+1),(r&64512)==56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(s),a=0,i=0;a<s;i++)n=e.charCodeAt(i),(n&64512)==55296&&i+1<o&&(r=e.charCodeAt(i+1),(r&64512)==56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|n&63):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|n&63):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|n&63);return t};const dt=(e,t)=>{if(t<65534&&e.subarray&&ct)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n=``;for(let r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n};var ft=(e,t)=>{let n=t||e.length;if(typeof TextDecoder==`function`&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,t));let r,i,a=Array(n*2);for(i=0,r=0;r<n;){let t=e[r++];if(t<128){a[i++]=t;continue}let o=lt[t];if(o>4){a[i++]=65533,r+=o-1;continue}for(t&=o===2?31:o===3?15:7;o>1&&r<n;)t=t<<6|e[r++]&63,o--;if(o>1){a[i++]=65533;continue}t<65536?a[i++]=t:(t-=65536,a[i++]=55296|t>>10&1023,a[i++]=56320|t&1023)}return dt(a,i)},pt=(e,t)=>{t||=e.length,t>e.length&&(t=e.length);let n=t-1;for(;n>=0&&(e[n]&192)==128;)n--;return n<0||n===0?t:n+lt[e[n]]>t?n:t},mt={string2buf:ut,buf2string:ft,utf8border:pt};function ht(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=``,this.state=null,this.data_type=2,this.adler=0}var gt=ht;const _t=Object.prototype.toString,{Z_NO_FLUSH:vt,Z_SYNC_FLUSH:yt,Z_FULL_FLUSH:bt,Z_FINISH:xt,Z_OK:St,Z_STREAM_END:Ct,Z_DEFAULT_COMPRESSION:wt,Z_DEFAULT_STRATEGY:Tt,Z_DEFLATED:Et}=N;function Dt(e){this.options=st.assign({level:wt,method:Et,chunkSize:16384,windowBits:15,memLevel:8,strategy:Tt},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg=``,this.ended=!1,this.chunks=[],this.strm=new gt,this.strm.avail_out=0;let n=rt.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==St)throw Error(M[n]);if(t.header&&rt.deflateSetHeader(this.strm,t.header),t.dictionary){let e;if(e=typeof t.dictionary==`string`?mt.string2buf(t.dictionary):_t.call(t.dictionary)===`[object ArrayBuffer]`?new Uint8Array(t.dictionary):t.dictionary,n=rt.deflateSetDictionary(this.strm,e),n!==St)throw Error(M[n]);this._dict_set=!0}}Dt.prototype.push=function(e,t){let n=this.strm,r=this.options.chunkSize,i,a;if(this.ended)return!1;for(a=t===~~t?t:t===!0?xt:vt,typeof e==`string`?n.input=mt.string2buf(e):_t.call(e)===`[object ArrayBuffer]`?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){if(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(a===yt||a===bt)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(i=rt.deflate(n,a),i===Ct)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=rt.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===St;if(n.avail_out===0){this.onData(n.output);continue}if(a>0&&n.next_out>0){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(n.avail_in===0)break}return!0},Dt.prototype.onData=function(e){this.chunks.push(e)},Dt.prototype.onEnd=function(e){e===St&&(this.result=st.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Ot(e,t){let n=new Dt(t);if(n.push(e,!0),n.err)throw n.msg||M[n.err];return n.result}function kt(e,t){return t||={},t.raw=!0,Ot(e,t)}function At(e,t){return t||={},t.gzip=!0,Ot(e,t)}var jt={Deflate:Dt,deflate:Ot,deflateRaw:kt,gzip:At,constants:N};const Mt=16209;var Nt=function e(t,n){let r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D=t.state;r=t.next_in,T=t.input,i=r+(t.avail_in-5),a=t.next_out,E=t.output,o=a-(n-t.avail_out),s=a+(t.avail_out-257),c=D.dmax,l=D.wsize,u=D.whave,d=D.wnext,f=D.window,p=D.hold,m=D.bits,h=D.lencode,g=D.distcode,_=(1<<D.lenbits)-1,v=(1<<D.distbits)-1;top:do{m<15&&(p+=T[r++]<<m,m+=8,p+=T[r++]<<m,m+=8),y=h[p&_];dolen:for(;;){if(b=y>>>24,p>>>=b,m-=b,b=y>>>16&255,b===0)E[a++]=y&65535;else if(b&16){x=y&65535,b&=15,b&&(m<b&&(p+=T[r++]<<m,m+=8),x+=p&(1<<b)-1,p>>>=b,m-=b),m<15&&(p+=T[r++]<<m,m+=8,p+=T[r++]<<m,m+=8),y=g[p&v];dodist:for(;;){if(b=y>>>24,p>>>=b,m-=b,b=y>>>16&255,b&16){if(S=y&65535,b&=15,m<b&&(p+=T[r++]<<m,m+=8,m<b&&(p+=T[r++]<<m,m+=8)),S+=p&(1<<b)-1,S>c){t.msg=`invalid distance too far back`,D.mode=Mt;break top}if(p>>>=b,m-=b,b=a-o,S>b){if(b=S-b,b>u&&D.sane){t.msg=`invalid distance too far back`,D.mode=Mt;break top}if(C=0,w=f,d===0){if(C+=l-b,b<x){x-=b;do E[a++]=f[C++];while(--b);C=a-S,w=E}}else if(d<b){if(C+=l+d-b,b-=d,b<x){x-=b;do E[a++]=f[C++];while(--b);if(C=0,d<x){b=d,x-=b;do E[a++]=f[C++];while(--b);C=a-S,w=E}}}else if(C+=d-b,b<x){x-=b;do E[a++]=f[C++];while(--b);C=a-S,w=E}for(;x>2;)E[a++]=w[C++],E[a++]=w[C++],E[a++]=w[C++],x-=3;x&&(E[a++]=w[C++],x>1&&(E[a++]=w[C++]))}else{C=a-S;do E[a++]=E[C++],E[a++]=E[C++],E[a++]=E[C++],x-=3;while(x>2);x&&(E[a++]=E[C++],x>1&&(E[a++]=E[C++]))}}else if(b&64){t.msg=`invalid distance code`,D.mode=Mt;break top}else{y=g[(y&65535)+(p&(1<<b)-1)];continue dodist}break}}else if(!(b&64)){y=h[(y&65535)+(p&(1<<b)-1)];continue dolen}else if(b&32){D.mode=16191;break top}else{t.msg=`invalid literal/length code`,D.mode=Mt;break top}break}}while(r<i&&a<s);x=m>>3,r-=x,m-=x<<3,p&=(1<<m)-1,t.next_in=r,t.next_out=a,t.avail_in=r<i?5+(i-r):5-(r-i),t.avail_out=a<s?257+(s-a):257-(a-s),D.hold=p,D.bits=m};const Pt=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),Ft=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),It=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),Lt=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),Rt=(e,t,n,r,i,a,o,s)=>{let c=s.bits,l=0,u=0,d=0,f=0,p=0,m=0,h=0,g=0,_=0,v=0,y,b,x,S,C,w=null,T,E=new Uint16Array(16),D=new Uint16Array(16),O=null,ee,k,A;for(l=0;l<=15;l++)E[l]=0;for(u=0;u<r;u++)E[t[n+u]]++;for(p=c,f=15;f>=1&&E[f]===0;f--);if(p>f&&(p=f),f===0)return i[a++]=20971520,i[a++]=20971520,s.bits=1,0;for(d=1;d<f&&E[d]===0;d++);for(p<d&&(p=d),g=1,l=1;l<=15;l++)if(g<<=1,g-=E[l],g<0)return-1;if(g>0&&(e===0||f!==1))return-1;for(D[1]=0,l=1;l<15;l++)D[l+1]=D[l]+E[l];for(u=0;u<r;u++)t[n+u]!==0&&(o[D[t[n+u]]++]=u);if(e===0?(w=O=o,T=20):e===1?(w=Pt,O=Ft,T=257):(w=It,O=Lt,T=0),v=0,u=0,l=d,C=a,m=p,h=0,x=-1,_=1<<p,S=_-1,e===1&&_>852||e===2&&_>592)return 1;for(;;){ee=l-h,o[u]+1<T?(k=0,A=o[u]):o[u]>=T?(k=O[o[u]-T],A=w[o[u]-T]):(k=96,A=0),y=1<<l-h,b=1<<m,d=b;do b-=y,i[C+(v>>h)+b]=ee<<24|k<<16|A|0;while(b!==0);for(y=1<<l-1;v&y;)y>>=1;if(y===0?v=0:(v&=y-1,v+=y),u++,--E[l]===0){if(l===f)break;l=t[n+o[u]]}if(l>p&&(v&S)!==x){for(h===0&&(h=p),C+=d,m=l-h,g=1<<m;m+h<f&&(g-=E[m+h],!(g<=0));)m++,g<<=1;if(_+=1<<m,e===1&&_>852||e===2&&_>592)return 1;x=v&S,i[x]=p<<24|m<<16|C-a|0}}return v!==0&&(i[C+v]=l-h<<24|4194304),s.bits=p,0};var zt=Rt;const{Z_FINISH:Bt,Z_BLOCK:Vt,Z_TREES:Ht,Z_OK:J,Z_STREAM_END:Ut,Z_NEED_DICT:Wt,Z_STREAM_ERROR:Y,Z_DATA_ERROR:Gt,Z_MEM_ERROR:Kt,Z_BUF_ERROR:qt,Z_DEFLATED:Jt}=N,Yt=16180,Xt=16181,Zt=16182,Qt=16183,$t=16184,en=16185,tn=16186,nn=16187,rn=16188,an=16189,on=16190,X=16191,sn=16192,cn=16193,ln=16194,un=16195,dn=16196,fn=16197,pn=16198,mn=16199,hn=16200,gn=16201,_n=16202,vn=16203,yn=16204,bn=16205,xn=16206,Sn=16207,Cn=16208,Z=16209,wn=16210,Tn=16211,En=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function Dn(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Q=e=>{if(!e)return 1;let t=e.state;return!t||t.strm!==e||t.mode<Yt||t.mode>Tn?1:0},On=e=>{if(Q(e))return Y;let t=e.state;return e.total_in=e.total_out=t.total=0,e.msg=``,t.wrap&&(e.adler=t.wrap&1),t.mode=Yt,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,J},kn=e=>{if(Q(e))return Y;let t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,On(e)},An=(e,t)=>{let n;if(Q(e))return Y;let r=e.state;return t<0?(n=0,t=-t):(n=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?Y:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,kn(e))},jn=(e,t)=>{if(!e)return Y;let n=new Dn;e.state=n,n.strm=e,n.window=null,n.mode=Yt;let r=An(e,t);return r!==J&&(e.state=null),r},Mn=e=>jn(e,15);let Nn=!0,Pn,Fn;const In=e=>{if(Nn){Pn=new Int32Array(512),Fn=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(zt(1,e.lens,0,288,Pn,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;zt(2,e.lens,0,32,Fn,0,e.work,{bits:5}),Nn=!1}e.lencode=Pn,e.lenbits=9,e.distcode=Fn,e.distbits=5},Ln=(e,t,n,r)=>{let i,a=e.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Uint8Array(a.wsize)),r>=a.wsize?(a.window.set(t.subarray(n-a.wsize,n),0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>r&&(i=r),a.window.set(t.subarray(n-r,n-r+i),a.wnext),r-=i,r?(a.window.set(t.subarray(n-r,n),0),a.wnext=r,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0},Rn=(e,t)=>{let n,r,i,a,o,s,c,l,u,d,f,p,m,h,g=0,_,v,y,b,x,S,C,w,T=new Uint8Array(4),E,D,O=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Q(e)||!e.output||!e.input&&e.avail_in!==0)return Y;n=e.state,n.mode===X&&(n.mode=sn),o=e.next_out,i=e.output,c=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,d=s,f=c,w=J;inf_leave:for(;;)switch(n.mode){case Yt:if(n.wrap===0){n.mode=sn;break}for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.wrap&2&&l===35615){n.wbits===0&&(n.wbits=15),n.check=0,T[0]=l&255,T[1]=l>>>8&255,n.check=j(n.check,T,2,0),l=0,u=0,n.mode=Xt;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg=`incorrect header check`,n.mode=Z;break}if((l&15)!==Jt){e.msg=`unknown compression method`,n.mode=Z;break}if(l>>>=4,u-=4,C=(l&15)+8,n.wbits===0&&(n.wbits=C),C>15||C>n.wbits){e.msg=`invalid window size`,n.mode=Z;break}n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=l&512?an:X,l=0,u=0;break;case Xt:for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.flags=l,(n.flags&255)!==Jt){e.msg=`unknown compression method`,n.mode=Z;break}if(n.flags&57344){e.msg=`unknown header flags set`,n.mode=Z;break}n.head&&(n.head.text=l>>8&1),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,n.check=j(n.check,T,2,0)),l=0,u=0,n.mode=Zt;case Zt:for(;u<32;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.head&&(n.head.time=l),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,T[2]=l>>>16&255,T[3]=l>>>24&255,n.check=j(n.check,T,4,0)),l=0,u=0,n.mode=Qt;case Qt:for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.head&&(n.head.xflags=l&255,n.head.os=l>>8),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,n.check=j(n.check,T,2,0)),l=0,u=0,n.mode=$t;case $t:if(n.flags&1024){for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.length=l,n.head&&(n.head.extra_len=l),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,n.check=j(n.check,T,2,0)),l=0,u=0}else n.head&&(n.head.extra=null);n.mode=en;case en:if(n.flags&1024&&(p=n.length,p>s&&(p=s),p&&(n.head&&(C=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(a,a+p),C)),n.flags&512&&n.wrap&4&&(n.check=j(n.check,r,p,a)),s-=p,a+=p,n.length-=p),n.length))break inf_leave;n.length=0,n.mode=tn;case tn:if(n.flags&2048){if(s===0)break inf_leave;p=0;do C=r[a+ p++],n.head&&C&&n.length<65536&&(n.head.name+=String.fromCharCode(C));while(C&&p<s);if(n.flags&512&&n.wrap&4&&(n.check=j(n.check,r,p,a)),s-=p,a+=p,C)break inf_leave}else n.head&&(n.head.name=null);n.length=0,n.mode=nn;case nn:if(n.flags&4096){if(s===0)break inf_leave;p=0;do C=r[a+ p++],n.head&&C&&n.length<65536&&(n.head.comment+=String.fromCharCode(C));while(C&&p<s);if(n.flags&512&&n.wrap&4&&(n.check=j(n.check,r,p,a)),s-=p,a+=p,C)break inf_leave}else n.head&&(n.head.comment=null);n.mode=rn;case rn:if(n.flags&512){for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.wrap&4&&l!==(n.check&65535)){e.msg=`header crc mismatch`,n.mode=Z;break}l=0,u=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=X;break;case an:for(;u<32;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}e.adler=n.check=En(l),l=0,u=0,n.mode=on;case on:if(n.havedict===0)return e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,Wt;e.adler=n.check=1,n.mode=X;case X:if(t===Vt||t===Ht)break inf_leave;case sn:if(n.last){l>>>=u&7,u-=u&7,n.mode=xn;break}for(;u<3;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}switch(n.last=l&1,l>>>=1,--u,l&3){case 0:n.mode=cn;break;case 1:if(In(n),n.mode=mn,t===Ht){l>>>=2,u-=2;break inf_leave}break;case 2:n.mode=dn;break;case 3:e.msg=`invalid block type`,n.mode=Z}l>>>=2,u-=2;break;case cn:for(l>>>=u&7,u-=u&7;u<32;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if((l&65535)!=(l>>>16^65535)){e.msg=`invalid stored block lengths`,n.mode=Z;break}if(n.length=l&65535,l=0,u=0,n.mode=ln,t===Ht)break inf_leave;case ln:n.mode=un;case un:if(p=n.length,p){if(p>s&&(p=s),p>c&&(p=c),p===0)break inf_leave;i.set(r.subarray(a,a+p),o),s-=p,a+=p,c-=p,o+=p,n.length-=p;break}n.mode=X;break;case dn:for(;u<14;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.nlen=(l&31)+257,l>>>=5,u-=5,n.ndist=(l&31)+1,l>>>=5,u-=5,n.ncode=(l&15)+4,l>>>=4,u-=4,n.nlen>286||n.ndist>30){e.msg=`too many length or distance symbols`,n.mode=Z;break}n.have=0,n.mode=fn;case fn:for(;n.have<n.ncode;){for(;u<3;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.lens[O[n.have++]]=l&7,l>>>=3,u-=3}for(;n.have<19;)n.lens[O[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,E={bits:n.lenbits},w=zt(0,n.lens,0,19,n.lencode,0,n.work,E),n.lenbits=E.bits,w){e.msg=`invalid code lengths set`,n.mode=Z;break}n.have=0,n.mode=pn;case pn:for(;n.have<n.nlen+n.ndist;){for(;g=n.lencode[l&(1<<n.lenbits)-1],_=g>>>24,v=g>>>16&255,y=g&65535,!(_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(y<16)l>>>=_,u-=_,n.lens[n.have++]=y;else{if(y===16){for(D=_+2;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(l>>>=_,u-=_,n.have===0){e.msg=`invalid bit length repeat`,n.mode=Z;break}C=n.lens[n.have-1],p=3+(l&3),l>>>=2,u-=2}else if(y===17){for(D=_+3;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}l>>>=_,u-=_,C=0,p=3+(l&7),l>>>=3,u-=3}else{for(D=_+7;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}l>>>=_,u-=_,C=0,p=11+(l&127),l>>>=7,u-=7}if(n.have+p>n.nlen+n.ndist){e.msg=`invalid bit length repeat`,n.mode=Z;break}for(;p--;)n.lens[n.have++]=C}}if(n.mode===Z)break;if(n.lens[256]===0){e.msg=`invalid code -- missing end-of-block`,n.mode=Z;break}if(n.lenbits=9,E={bits:n.lenbits},w=zt(1,n.lens,0,n.nlen,n.lencode,0,n.work,E),n.lenbits=E.bits,w){e.msg=`invalid literal/lengths set`,n.mode=Z;break}if(n.distbits=6,n.distcode=n.distdyn,E={bits:n.distbits},w=zt(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,E),n.distbits=E.bits,w){e.msg=`invalid distances set`,n.mode=Z;break}if(n.mode=mn,t===Ht)break inf_leave;case mn:n.mode=hn;case hn:if(s>=6&&c>=258){e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,Nt(e,f),o=e.next_out,i=e.output,c=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,n.mode===X&&(n.back=-1);break}for(n.back=0;g=n.lencode[l&(1<<n.lenbits)-1],_=g>>>24,v=g>>>16&255,y=g&65535,!(_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(v&&!(v&240)){for(b=_,x=v,S=y;g=n.lencode[S+((l&(1<<b+x)-1)>>b)],_=g>>>24,v=g>>>16&255,y=g&65535,!(b+_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}l>>>=b,u-=b,n.back+=b}if(l>>>=_,u-=_,n.back+=_,n.length=y,v===0){n.mode=bn;break}if(v&32){n.back=-1,n.mode=X;break}if(v&64){e.msg=`invalid literal/length code`,n.mode=Z;break}n.extra=v&15,n.mode=gn;case gn:if(n.extra){for(D=n.extra;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=_n;case _n:for(;g=n.distcode[l&(1<<n.distbits)-1],_=g>>>24,v=g>>>16&255,y=g&65535,!(_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(!(v&240)){for(b=_,x=v,S=y;g=n.distcode[S+((l&(1<<b+x)-1)>>b)],_=g>>>24,v=g>>>16&255,y=g&65535,!(b+_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}l>>>=b,u-=b,n.back+=b}if(l>>>=_,u-=_,n.back+=_,v&64){e.msg=`invalid distance code`,n.mode=Z;break}n.offset=y,n.extra=v&15,n.mode=vn;case vn:if(n.extra){for(D=n.extra;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg=`invalid distance too far back`,n.mode=Z;break}n.mode=yn;case yn:if(c===0)break inf_leave;if(p=f-c,n.offset>p){if(p=n.offset-p,p>n.whave&&n.sane){e.msg=`invalid distance too far back`,n.mode=Z;break}p>n.wnext?(p-=n.wnext,m=n.wsize-p):m=n.wnext-p,p>n.length&&(p=n.length),h=n.window}else h=i,m=o-n.offset,p=n.length;p>c&&(p=c),c-=p,n.length-=p;do i[o++]=h[m++];while(--p);n.length===0&&(n.mode=hn);break;case bn:if(c===0)break inf_leave;i[o++]=n.length,c--,n.mode=hn;break;case xn:if(n.wrap){for(;u<32;){if(s===0)break inf_leave;s--,l|=r[a++]<<u,u+=8}if(f-=c,e.total_out+=f,n.total+=f,n.wrap&4&&f&&(e.adler=n.check=n.flags?j(n.check,i,f,o-f):pe(n.check,i,f,o-f)),f=c,n.wrap&4&&(n.flags?l:En(l))!==n.check){e.msg=`incorrect data check`,n.mode=Z;break}l=0,u=0}n.mode=Sn;case Sn:if(n.wrap&&n.flags){for(;u<32;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.wrap&4&&l!==(n.total&4294967295)){e.msg=`incorrect length check`,n.mode=Z;break}l=0,u=0}n.mode=Cn;case Cn:w=Ut;break inf_leave;case Z:w=Gt;break inf_leave;case wn:return Kt;case Tn:default:return Y}return e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,(n.wsize||f!==e.avail_out&&n.mode<Z&&(n.mode<xn||t!==Bt))&&Ln(e,e.output,e.next_out,f-e.avail_out),d-=e.avail_in,f-=e.avail_out,e.total_in+=d,e.total_out+=f,n.total+=f,n.wrap&4&&f&&(e.adler=n.check=n.flags?j(n.check,i,f,e.next_out-f):pe(n.check,i,f,e.next_out-f)),e.data_type=n.bits+(n.last?64:0)+(n.mode===X?128:0)+(n.mode===mn||n.mode===ln?256:0),(d===0&&f===0||t===Bt)&&w===J&&(w=qt),w},zn=e=>{if(Q(e))return Y;let t=e.state;return t.window&&=null,e.state=null,J},Bn=(e,t)=>{if(Q(e))return Y;let n=e.state;return n.wrap&2?(n.head=t,t.done=!1,J):Y},Vn=(e,t)=>{let n=t.length,r,i,a;return Q(e)||(r=e.state,r.wrap!==0&&r.mode!==on)?Y:r.mode===on&&(i=1,i=pe(i,t,n,0),i!==r.check)?Gt:(a=Ln(e,t,n,n),a?(r.mode=wn,Kt):(r.havedict=1,J))};var $={inflateReset:kn,inflateReset2:An,inflateResetKeep:On,inflateInit:Mn,inflateInit2:jn,inflate:Rn,inflateEnd:zn,inflateGetHeader:Bn,inflateSetDictionary:Vn,inflateInfo:`pako inflate (from Nodeca project)`};function Hn(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name=``,this.comment=``,this.hcrc=0,this.done=!1}var Un=Hn;const Wn=Object.prototype.toString,{Z_NO_FLUSH:Gn,Z_FINISH:Kn,Z_OK:qn,Z_STREAM_END:Jn,Z_NEED_DICT:Yn,Z_STREAM_ERROR:Xn,Z_DATA_ERROR:Zn,Z_MEM_ERROR:Qn}=N;function $n(e){this.options=st.assign({chunkSize:1024*64,windowBits:15,to:``},e||{});let t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg=``,this.ended=!1,this.chunks=[],this.strm=new gt,this.strm.avail_out=0;let n=$.inflateInit2(this.strm,t.windowBits);if(n!==qn||(this.header=new Un,$.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary==`string`?t.dictionary=mt.string2buf(t.dictionary):Wn.call(t.dictionary)===`[object ArrayBuffer]`&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=$.inflateSetDictionary(this.strm,t.dictionary),n!==qn))))throw Error(M[n])}$n.prototype.push=function(e,t){let n=this.strm,r=this.options.chunkSize,i=this.options.dictionary,a,o,s;if(this.ended)return!1;for(o=t===~~t?t:t===!0?Kn:Gn,Wn.call(e)===`[object ArrayBuffer]`?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),a=$.inflate(n,o),a===Yn&&i&&(a=$.inflateSetDictionary(n,i),a===qn?a=$.inflate(n,o):a===Zn&&(a=Yn));n.avail_in>0&&a===Jn&&n.state.wrap>0&&e[n.next_in]!==0;)$.inflateReset(n),a=$.inflate(n,o);switch(a){case Xn:case Zn:case Yn:case Qn:return this.onEnd(a),this.ended=!0,!1}if(s=n.avail_out,n.next_out&&(n.avail_out===0||a===Jn))if(this.options.to===`string`){let e=mt.utf8border(n.output,n.next_out),t=n.next_out-e,i=mt.buf2string(n.output,e);n.next_out=t,n.avail_out=r-t,t&&n.output.set(n.output.subarray(e,e+t),0),this.onData(i)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(a===qn&&s===0)){if(a===Jn)return a=$.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(n.avail_in===0)break}}return!0},$n.prototype.onData=function(e){this.chunks.push(e)},$n.prototype.onEnd=function(e){e===qn&&(this.options.to===`string`?this.result=this.chunks.join(``):this.result=st.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function er(e,t){let n=new $n(t);if(n.push(e),n.err)throw n.msg||M[n.err];return n.result}function tr(e,t){return t||={},t.raw=!0,er(e,t)}var nr={Inflate:$n,inflate:er,inflateRaw:tr,ungzip:er,constants:N};const{Deflate:rr,deflate:ir,deflateRaw:ar,gzip:or}=jt,{Inflate:sr,inflate:cr,inflateRaw:lr,ungzip:ur}=nr;var dr={Deflate:rr,deflate:ir,deflateRaw:ar,gzip:or,Inflate:sr,inflate:cr,inflateRaw:lr,ungzip:ur,constants:N};export{dr as t};