wind-agent-cli 1.37.2 → 1.38.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.
- package/LICENSE +718 -718
- package/README.md +17 -2
- package/dist/api-docs.html +901 -901
- package/dist/assets/{CodeEditor-B2Wf7Fg0.js → CodeEditor-FvgsnJ7J.js} +6 -6
- package/dist/assets/FileTree-NLULrBDi.js +1 -0
- package/dist/assets/GitPanel-51KUBbEW.js +4 -0
- package/dist/assets/{MarkdownPreview-C0tqYnVu.js → MarkdownPreview-PEEWVWeS.js} +17 -27
- package/dist/assets/Shell-BEx66cW_.js +76 -0
- package/dist/assets/Shell-DrlLKa8f.css +1 -0
- package/dist/assets/StandaloneShell-BkuUCPZP.js +1 -0
- package/dist/assets/TaskMasterPanel-DfQG80SF.js +2 -0
- package/dist/assets/abnfDiagram-N423BO3Z-Cc0ul87U.js +1 -0
- package/dist/assets/arc-BAuugHw_.js +1 -0
- package/dist/assets/architectureDiagram-T3A2C74G-DA3G7QZD.js +36 -0
- package/dist/assets/{blockDiagram-VBNYF7ZC-DpaEf3mv.js → blockDiagram-VBNYF7ZC-tJ12IJs3.js} +4 -4
- package/dist/assets/c4Diagram-5PPSVZJV-5BTMCXL4.js +10 -0
- package/dist/assets/channel-BGDgNNQz.js +1 -0
- package/dist/assets/{chunk-2GRJ4B5K-DoSdNo8u.js → chunk-2GRJ4B5K-BPaI06Ou.js} +1 -1
- package/dist/assets/{chunk-2Q5K7J3B-CE7I3uMn.js → chunk-2Q5K7J3B-HV4zmsEe.js} +1 -1
- package/dist/assets/chunk-5RXB4S5H-BAwutJoU.js +231 -0
- package/dist/assets/{chunk-5VM5RSS4-B55XgqHZ.js → chunk-5VM5RSS4-B9QAJPrv.js} +1 -1
- package/dist/assets/{chunk-6Q2QTUOP-BS1KpefW.js → chunk-6Q2QTUOP-BOIW8bzI.js} +1 -1
- package/dist/assets/chunk-GF5L2VYU-DD13o00-.js +206 -0
- package/dist/assets/{chunk-JWPE2WC7-DOtkNhMm.js → chunk-JWPE2WC7-CFBm23VK.js} +1 -1
- package/dist/assets/{chunk-KBJHAD2P-BXLjviqM.js → chunk-KBJHAD2P-C0i0v8Op.js} +1 -1
- package/dist/assets/{chunk-RYQCIY6F-C50fjNNz.js → chunk-RYQCIY6F-DfeK0taV.js} +1 -1
- package/dist/assets/{chunk-XXDRQBXY-QBYqCkb7.js → chunk-XXDRQBXY-BKWvf-QE.js} +1 -1
- package/dist/assets/classDiagram-JCYQIIEL-C2SNM4oy.js +1 -0
- package/dist/assets/classDiagram-v2-OCEON4UE-C2SNM4oy.js +1 -0
- package/dist/assets/cose-bilkent-JH36ORCC-CBE8oM7L.js +1 -0
- package/dist/assets/{cynefin-VYW2F7L2-DnJa_OlQ.js → cynefin-VYW2F7L2-DziGp35A.js} +11 -23
- package/dist/assets/cynefinDiagram-MW4NZA55-CNvtHl39.js +62 -0
- package/dist/assets/cytoscape.esm-yzknjiTM.js +321 -0
- package/dist/assets/dagre-VZM6K2ZE-Bz9lsU7m.js +4 -0
- package/dist/assets/{diagram-7IWD3JNH-pFzs9HEu.js → diagram-7IWD3JNH-CV7D3VSd.js} +5 -5
- package/dist/assets/{diagram-B4RE2ZJO-CcehQC7x.js → diagram-B4RE2ZJO-Dj4EjDNC.js} +2 -2
- package/dist/assets/diagram-LBJQPF4R-wJ6FHvf-.js +24 -0
- package/dist/assets/diagram-Q27KOJAE-DMFYMhOB.js +24 -0
- package/dist/assets/diagram-UB23O5K3-DeBSbWAI.js +41 -0
- package/dist/assets/ebnfDiagram-BXEA7PRR-2NnJSGhT.js +1 -0
- package/dist/assets/erDiagram-JOGREHBK-DrSlg8hr.js +85 -0
- package/dist/assets/feature-chat-CvOCyaLe.js +88 -0
- package/dist/assets/feature-workspace-CAB6bgPy.js +39 -0
- package/dist/assets/{flowDiagram-UKHOOZJN-CJV8fQPR.js → flowDiagram-UKHOOZJN-C0pejU6W.js} +4 -4
- package/dist/assets/ganttDiagram-PKOTCBZU-BM0VCUUz.js +292 -0
- package/dist/assets/gitGraphDiagram-DS77QQ5N-SbLG0c5_.js +106 -0
- package/dist/assets/graph-DOmOIIwC.js +1 -0
- package/dist/assets/{index-GFhXZyl2.js → index-BflGfU1C.js} +3 -3
- package/dist/assets/index-Btkf0_rU.js +1 -0
- package/dist/assets/index-Cr5MbHuj.css +1 -0
- package/dist/assets/index-Gqazqfs3.js +1 -0
- package/dist/assets/index-nyrkoQK6.js +35 -0
- package/dist/assets/infoDiagram-6WML65LV-Cf5DSa66.js +2 -0
- package/dist/assets/ishikawaDiagram-WSZJBQD7-DwyFutKy.js +70 -0
- package/dist/assets/journeyDiagram-NVQOT4AX-Df0FRhLo.js +139 -0
- package/dist/assets/{kanban-definition-27J2QSJJ-B3iL0ztJ.js → kanban-definition-27J2QSJJ-HmpbjrZz.js} +6 -6
- package/dist/assets/{layout-D6BstSzF.js → layout-D-LzfAck.js} +1 -1
- package/dist/assets/{linear-Cwe9dEKA.js → linear-DOM01LBe.js} +1 -1
- package/dist/assets/map-DxJ2ADlA.js +1 -0
- package/dist/assets/mermaid.core-C2Ma-_S6.js +306 -0
- package/dist/assets/{mindmap-definition-FAOFIHXS-BgfBYMzr.js → mindmap-definition-FAOFIHXS-B4GOIn76.js} +4 -4
- package/dist/assets/pegDiagram-VL7TDLO6-BHur7aH2.js +1 -0
- package/dist/assets/{pieDiagram-7S7Q4E2Y-DeSrxc4I.js → pieDiagram-7S7Q4E2Y-Cw0UELLV.js} +2 -2
- package/dist/assets/quadrantDiagram-CIZ2JOQS-CB2BrX3g.js +7 -0
- package/dist/assets/railroadDiagram-AXF67PYL-DPYZYmLX.js +1 -0
- package/dist/assets/requirementDiagram-LRYGKXZP-DSX4IJ1n.js +84 -0
- package/dist/assets/sankeyDiagram-W5VNT64P-TenC3ZQo.js +40 -0
- package/dist/assets/sequenceDiagram-SI44F4Z6-DltGsf3F.js +162 -0
- package/dist/assets/sizeCapture-X5ZJPWSS-D7llwbJZ.js +1 -0
- package/dist/assets/stateDiagram-OKZ733FA-C-hAvbnY.js +1 -0
- package/dist/assets/stateDiagram-v2-UEYNNEHI-DaYSFcRQ.js +1 -0
- package/dist/assets/swimlanes-SLNWSIFB-DWD30fv6.js +2 -0
- package/dist/assets/swimlanesDiagram-ULZ7WXOC-LTkF2T6t.js +8 -0
- package/dist/assets/timeline-definition-Z64GVDOM-quWmimSE.js +120 -0
- package/dist/assets/vendor-data-DsEZeNPr.js +4 -0
- package/dist/assets/vendor-i18n-B6HjLCnN.js +1 -0
- package/dist/assets/vendor-markdown-DkITEES2.js +298 -0
- package/dist/assets/vendor-react-C2GTiUCy.js +10 -0
- package/dist/assets/vendor-ui-CAUHSABu.js +49 -0
- package/dist/assets/vennDiagram-T6HMQDX7-aUQcm8h5.js +34 -0
- package/dist/assets/{wardleyDiagram-T6FBY63Y-BNCpsFZV.js → wardleyDiagram-T6FBY63Y-BZ0bwsFQ.js} +2 -2
- package/dist/assets/workbox-window.prod.es5-BBnX5xw4.js +2 -0
- package/dist/assets/xychartDiagram-ELKLHX3M-DOVzAq63.js +7 -0
- package/dist/clear-cache.html +85 -85
- package/dist/convert-icons.md +52 -52
- package/dist/favicon.png +0 -0
- package/dist/favicon.svg +8 -8
- package/dist/generate-icons.js +48 -48
- package/dist/icons/codex-white.svg +3 -3
- package/dist/icons/codex.svg +3 -3
- package/dist/icons/cursor-white.svg +11 -11
- package/dist/icons/icon-128x128.png +0 -0
- package/dist/icons/icon-128x128.svg +11 -11
- package/dist/icons/icon-144x144.png +0 -0
- package/dist/icons/icon-144x144.svg +11 -11
- package/dist/icons/icon-152x152.png +0 -0
- package/dist/icons/icon-152x152.svg +11 -11
- package/dist/icons/icon-180x180.png +0 -0
- package/dist/icons/icon-192x192.png +0 -0
- package/dist/icons/icon-192x192.svg +11 -11
- package/dist/icons/icon-384x384.png +0 -0
- package/dist/icons/icon-384x384.svg +11 -11
- package/dist/icons/icon-512x512.png +0 -0
- package/dist/icons/icon-512x512.svg +11 -11
- package/dist/icons/icon-72x72.png +0 -0
- package/dist/icons/icon-72x72.svg +11 -11
- package/dist/icons/icon-96x96.png +0 -0
- package/dist/icons/icon-96x96.svg +11 -11
- package/dist/icons/icon-maskable-192x192.png +0 -0
- package/dist/icons/icon-maskable-512x512.png +0 -0
- package/dist/icons/icon-template.svg +11 -11
- package/dist/icons/new-icon.png +0 -0
- package/dist/index.html +48 -58
- package/dist/logo-128.png +0 -0
- package/dist/logo-256.png +0 -0
- package/dist/logo.svg +17 -17
- package/dist/manifest.webmanifest +1 -0
- package/dist/push-sw.js +48 -0
- package/dist/screenshots/setup-screen-mobile.png +0 -0
- package/dist/screenshots/setup-screen.png +0 -0
- package/dist/sw.js +1 -124
- package/dist/workbox-ae5c0bb2.js +1 -0
- package/dist-server/server/index.js +1 -1
- package/dist-server/server/index.js.map +1 -1
- package/dist-server/server/load-env.js +4 -2
- package/dist-server/server/load-env.js.map +1 -1
- package/dist-server/server/modules/agent/agent.routes.js +1 -1
- package/dist-server/server/modules/agent/agent.routes.js.map +1 -1
- package/dist-server/server/modules/browser-use/browser-use.service.js +1 -1
- package/dist-server/server/modules/browser-use/browser-use.service.js.map +1 -1
- package/dist-server/server/modules/cli/cli.service.js +37 -37
- package/dist-server/server/modules/cli/cli.service.js.map +1 -1
- package/dist-server/server/modules/cli/sandbox.service.js +43 -43
- package/dist-server/server/modules/cli/sandbox.service.js.map +1 -1
- package/dist-server/server/modules/cli/tests/cli-environment-bootstrap.test.js +74 -74
- package/dist-server/server/modules/commands/commands.routes.js +25 -25
- package/dist-server/server/modules/commands/commands.routes.js.map +1 -1
- package/dist-server/server/modules/commands/tests/commands.test.js +1 -1
- package/dist-server/server/modules/commands/tests/commands.test.js.map +1 -1
- package/dist-server/server/modules/database/connection.js +1 -1
- package/dist-server/server/modules/database/connection.js.map +1 -1
- package/dist-server/server/modules/database/migrations.js +190 -190
- package/dist-server/server/modules/database/repositories/api-keys.js +3 -3
- package/dist-server/server/modules/database/repositories/github-tokens.js +2 -2
- package/dist-server/server/modules/database/repositories/notification-channel-endpoints.js +28 -28
- package/dist-server/server/modules/database/repositories/notification-preferences.js +4 -4
- package/dist-server/server/modules/database/repositories/projects.db.js +61 -61
- package/dist-server/server/modules/database/repositories/provider-models.js +35 -35
- package/dist-server/server/modules/database/repositories/push-subscriptions.js +5 -5
- package/dist-server/server/modules/database/repositories/scan-state.db.js +5 -5
- package/dist-server/server/modules/database/repositories/sessions.db.js +93 -93
- package/dist-server/server/modules/database/schema.js +177 -177
- package/dist-server/server/modules/database/tests/projects.db.integration.test.js +3 -2
- package/dist-server/server/modules/database/tests/projects.db.integration.test.js.map +1 -1
- package/dist-server/server/modules/database/tests/provider-models.db.integration.test.js +6 -6
- package/dist-server/server/modules/database/tests/sessions-provider-mapping.test.js +4 -3
- package/dist-server/server/modules/database/tests/sessions-provider-mapping.test.js.map +1 -1
- package/dist-server/server/modules/database/tests/sessions.db.integration.test.js +2 -1
- package/dist-server/server/modules/database/tests/sessions.db.integration.test.js.map +1 -1
- package/dist-server/server/modules/git/git.routes.js +17 -17
- package/dist-server/server/modules/notifications/services/notification-orchestrator.service.js +1 -1
- package/dist-server/server/modules/notifications/services/notification-orchestrator.service.js.map +1 -1
- package/dist-server/server/modules/notifications/vapid-keys.service.js +1 -1
- package/dist-server/server/modules/notifications/vapid-keys.service.js.map +1 -1
- package/dist-server/server/modules/projects/tests/project-management.service.test.js +2 -1
- package/dist-server/server/modules/projects/tests/project-management.service.test.js.map +1 -1
- package/dist-server/server/modules/providers/list/codex/codex-app-server.client.js +2 -2
- package/dist-server/server/modules/providers/list/codex/codex-app-server.client.js.map +1 -1
- package/dist-server/server/modules/providers/list/codex/codex-models.provider.js +1 -1
- package/dist-server/server/modules/providers/list/codex/codex-models.provider.js.map +1 -1
- package/dist-server/server/modules/providers/list/cursor/cursor-models.provider.js +1 -1
- package/dist-server/server/modules/providers/list/cursor/cursor-models.provider.js.map +1 -1
- package/dist-server/server/modules/providers/list/cursor/cursor-session-synchronizer.provider.js.map +1 -1
- package/dist-server/server/modules/providers/list/opencode/opencode-models.provider.js +13 -13
- package/dist-server/server/modules/providers/list/opencode/opencode-runtime.provider.js +9 -9
- package/dist-server/server/modules/providers/list/opencode/opencode-runtime.provider.test.js +17 -17
- package/dist-server/server/modules/providers/list/opencode/opencode-session-synchronizer.provider.js +25 -25
- package/dist-server/server/modules/providers/list/opencode/opencode-sessions.provider.js +27 -27
- package/dist-server/server/modules/providers/services/provider-token-usage.service.js +9 -9
- package/dist-server/server/modules/providers/services/sessions.service.js +1 -1
- package/dist-server/server/modules/providers/tests/claude-auth.test.js +8 -0
- package/dist-server/server/modules/providers/tests/claude-auth.test.js.map +1 -1
- package/dist-server/server/modules/providers/tests/codex-sessions.test.js +1 -1
- package/dist-server/server/modules/providers/tests/codex-sessions.test.js.map +1 -1
- package/dist-server/server/modules/providers/tests/mcp.test.js +3 -3
- package/dist-server/server/modules/providers/tests/opencode-sessions.test.js +98 -98
- package/dist-server/server/modules/providers/tests/opencode-sessions.test.js.map +1 -1
- package/dist-server/server/modules/providers/tests/provider-token-usage.service.test.js +18 -18
- package/dist-server/server/modules/providers/tests/provider.routes.test.js +1 -1
- package/dist-server/server/modules/providers/tests/provider.routes.test.js.map +1 -1
- package/dist-server/server/modules/system/system.service.js +1 -1
- package/dist-server/server/modules/system/system.service.js.map +1 -1
- package/dist-server/server/modules/system/tests/system.service.test.js +1 -1
- package/dist-server/server/modules/system/tests/system.service.test.js.map +1 -1
- package/dist-server/server/modules/taskmaster/taskmaster.routes.js +423 -422
- package/dist-server/server/modules/taskmaster/taskmaster.routes.js.map +1 -1
- package/dist-server/server/modules/websocket/services/shell-websocket.service.js +1 -1
- package/dist-server/server/modules/websocket/services/shell-websocket.service.js.map +1 -1
- package/dist-server/server/modules/worktrees/services/worktree-list.service.js +1 -1
- package/dist-server/server/modules/worktrees/services/worktree-open.service.js +1 -1
- package/dist-server/server/modules/worktrees/services/worktree-remove.service.js +1 -1
- package/electron/cloud.js +260 -260
- package/electron/desktopNotifications.js +378 -378
- package/electron/desktopWindow.js +766 -766
- package/electron/launcher/index.html +14 -14
- package/electron/launcher/launcher.css +801 -801
- package/electron/launcher/launcher.js +687 -687
- package/electron/localServer.js +549 -549
- package/electron/main.js +944 -944
- package/electron/preload.cjs +60 -60
- package/electron/scripts/generate-macos-icon.js +62 -62
- package/electron/serverInstaller.js +277 -277
- package/electron/tabs.js +87 -87
- package/electron/viewHost.js +331 -331
- package/package.json +262 -247
- package/public/api-docs.html +901 -901
- package/scripts/build-client.mjs +30 -0
- package/scripts/fix-node-pty.js +67 -67
- package/scripts/generate-pwa-icons.ps1 +33 -0
- package/scripts/promote-dist-server.mjs +50 -50
- package/scripts/release/build-server-bundle.js +176 -176
- package/scripts/release/prepare-desktop-app.js +152 -152
- package/scripts/verify-pwa-build.mjs +37 -0
- package/server/index.ts +399 -399
- package/server/load-env.ts +49 -47
- package/server/modules/agent/agent.module.ts +52 -52
- package/server/modules/agent/agent.routes.ts +1287 -1287
- package/server/modules/agent/index.ts +2 -2
- package/server/modules/agent/tests/agent.routes.test.ts +205 -205
- package/server/modules/assets/assets.routes.ts +150 -150
- package/server/modules/assets/index.ts +3 -3
- package/server/modules/assets/services/image-assets.service.ts +127 -127
- package/server/modules/assets/tests/image-assets.service.test.ts +74 -74
- package/server/modules/auth/auth.middleware.ts +163 -163
- package/server/modules/auth/auth.module.ts +38 -38
- package/server/modules/auth/auth.routes.ts +57 -57
- package/server/modules/auth/auth.service.ts +155 -155
- package/server/modules/auth/index.ts +9 -9
- package/server/modules/auth/tests/auth.service.test.ts +95 -95
- package/server/modules/browser-use/browser-use-mcp.routes.ts +120 -120
- package/server/modules/browser-use/browser-use-mcp.ts +386 -386
- package/server/modules/browser-use/browser-use-runtime.ts +10 -10
- package/server/modules/browser-use/browser-use.routes.ts +96 -96
- package/server/modules/browser-use/browser-use.service.ts +836 -836
- package/server/modules/browser-use/index.ts +11 -11
- package/server/modules/browser-use/tests/browser-use.service.test.ts +10 -10
- package/server/modules/cli/cli.module.ts +93 -93
- package/server/modules/cli/cli.service.ts +248 -248
- package/server/modules/cli/cli.ts +19 -19
- package/server/modules/cli/index.ts +2 -2
- package/server/modules/cli/sandbox.service.ts +398 -398
- package/server/modules/cli/tests/cli-environment-bootstrap.test.ts +186 -186
- package/server/modules/cli/tests/cli.service.test.ts +86 -86
- package/server/modules/cli/tests/sandbox.service.test.ts +58 -58
- package/server/modules/commands/commands.module.ts +22 -22
- package/server/modules/commands/commands.routes.ts +587 -587
- package/server/modules/commands/index.ts +2 -2
- package/server/modules/commands/tests/commands.test.ts +110 -110
- package/server/modules/database/connection.ts +144 -143
- package/server/modules/database/index.ts +17 -17
- package/server/modules/database/init-db.ts +17 -17
- package/server/modules/database/migrations.ts +515 -515
- package/server/modules/database/repositories/api-keys.ts +119 -119
- package/server/modules/database/repositories/app-config.ts +53 -53
- package/server/modules/database/repositories/credentials.ts +106 -106
- package/server/modules/database/repositories/github-tokens.ts +100 -100
- package/server/modules/database/repositories/notification-channel-endpoints.ts +153 -153
- package/server/modules/database/repositories/notification-preferences.ts +117 -117
- package/server/modules/database/repositories/projects.db.ts +196 -196
- package/server/modules/database/repositories/provider-models.ts +168 -168
- package/server/modules/database/repositories/push-subscriptions.ts +80 -80
- package/server/modules/database/repositories/scan-state.db.ts +42 -42
- package/server/modules/database/repositories/sessions.db.ts +524 -524
- package/server/modules/database/repositories/users.ts +140 -140
- package/server/modules/database/repositories/vapid-keys.ts +57 -57
- package/server/modules/database/schema.ts +210 -210
- package/server/modules/database/tests/projects.db.integration.test.ts +73 -72
- package/server/modules/database/tests/provider-models.db.integration.test.ts +125 -125
- package/server/modules/database/tests/sessions-provider-mapping.test.ts +110 -109
- package/server/modules/database/tests/sessions.db.integration.test.ts +117 -116
- package/server/modules/file-tree/file-tree.module.ts +116 -116
- package/server/modules/file-tree/file-tree.routes.ts +258 -258
- package/server/modules/file-tree/file-tree.service.ts +675 -675
- package/server/modules/file-tree/index.ts +2 -2
- package/server/modules/file-tree/tests/file-tree.routes.test.ts +157 -157
- package/server/modules/file-tree/tests/file-tree.service.test.ts +371 -371
- package/server/modules/git/git-branch.service.ts +43 -43
- package/server/modules/git/git-parsing.service.ts +66 -66
- package/server/modules/git/git.module.ts +22 -22
- package/server/modules/git/git.routes.ts +1596 -1596
- package/server/modules/git/index.ts +2 -2
- package/server/modules/git/tests/git-branch.service.test.ts +60 -60
- package/server/modules/git/tests/git-init.routes.test.ts +132 -132
- package/server/modules/git/tests/git.test.ts +106 -106
- package/server/modules/notifications/index.ts +24 -24
- package/server/modules/notifications/notifications.routes.ts +127 -127
- package/server/modules/notifications/services/desktop-notification-clients.service.ts +124 -124
- package/server/modules/notifications/services/notification-orchestrator.service.js +310 -310
- package/server/modules/notifications/tests/notification-orchestrator.integration.test.ts +55 -55
- package/server/modules/notifications/vapid-keys.service.ts +38 -38
- package/server/modules/notifications/websocket/desktop-notifications-websocket.service.ts +109 -109
- package/server/modules/plugins/index.ts +9 -9
- package/server/modules/plugins/plugin-process.service.ts +217 -217
- package/server/modules/plugins/plugin-registry.service.ts +459 -459
- package/server/modules/plugins/plugins.module.ts +33 -33
- package/server/modules/plugins/plugins.routes.ts +66 -66
- package/server/modules/plugins/plugins.service.ts +147 -147
- package/server/modules/plugins/tests/plugins.service.test.ts +32 -32
- package/server/modules/projects/index.ts +11 -11
- package/server/modules/projects/projects.routes.ts +273 -273
- package/server/modules/projects/services/project-clone.service.ts +323 -323
- package/server/modules/projects/services/project-delete.service.ts +90 -90
- package/server/modules/projects/services/project-management.service.ts +144 -144
- package/server/modules/projects/services/project-star.service.ts +78 -78
- package/server/modules/projects/services/projects-has-taskmaster.service.ts +248 -248
- package/server/modules/projects/services/projects-with-sessions-fetch.service.ts +314 -314
- package/server/modules/projects/tests/project-clone.service.test.ts +183 -183
- package/server/modules/projects/tests/project-management.service.test.ts +118 -117
- package/server/modules/projects/tests/project-star.service.test.ts +123 -123
- package/server/modules/projects/tests/projects-has-taskmaster.service.test.ts +105 -105
- package/server/modules/providers/README.md +380 -380
- package/server/modules/providers/index.ts +10 -10
- package/server/modules/providers/list/claude/claude-auth.provider.ts +160 -160
- package/server/modules/providers/list/claude/claude-mcp.provider.ts +135 -135
- package/server/modules/providers/list/claude/claude-models.provider.ts +294 -294
- package/server/modules/providers/list/claude/claude-runtime.provider.js +1068 -1068
- package/server/modules/providers/list/claude/claude-session-synchronizer.provider.ts +203 -203
- package/server/modules/providers/list/claude/claude-sessions.provider.ts +684 -684
- package/server/modules/providers/list/claude/claude-skills.provider.ts +265 -265
- package/server/modules/providers/list/claude/claude.provider.ts +30 -30
- package/server/modules/providers/list/codex/codex-app-server.client.ts +2 -2
- package/server/modules/providers/list/codex/codex-auth.provider.ts +100 -100
- package/server/modules/providers/list/codex/codex-mcp.provider.ts +135 -135
- package/server/modules/providers/list/codex/codex-models.provider.ts +123 -123
- package/server/modules/providers/list/codex/codex-runtime.provider.js +533 -533
- package/server/modules/providers/list/codex/codex-session-synchronizer.provider.ts +203 -203
- package/server/modules/providers/list/codex/codex-sessions.provider.ts +938 -938
- package/server/modules/providers/list/codex/codex-skills.provider.ts +73 -73
- package/server/modules/providers/list/codex/codex.provider.ts +28 -28
- package/server/modules/providers/list/cursor/cursor-auth.provider.ts +143 -143
- package/server/modules/providers/list/cursor/cursor-mcp.provider.ts +108 -108
- package/server/modules/providers/list/cursor/cursor-models.provider.ts +119 -119
- package/server/modules/providers/list/cursor/cursor-runtime.provider.js +385 -385
- package/server/modules/providers/list/cursor/cursor-session-synchronizer.provider.ts +158 -159
- package/server/modules/providers/list/cursor/cursor-sessions.provider.ts +654 -654
- package/server/modules/providers/list/cursor/cursor-skills.provider.ts +39 -39
- package/server/modules/providers/list/cursor/cursor.provider.ts +30 -30
- package/server/modules/providers/list/opencode/opencode-auth.provider.ts +110 -110
- package/server/modules/providers/list/opencode/opencode-mcp.provider.ts +228 -228
- package/server/modules/providers/list/opencode/opencode-models.provider.ts +203 -203
- package/server/modules/providers/list/opencode/opencode-runtime.provider.js +434 -434
- package/server/modules/providers/list/opencode/opencode-runtime.provider.test.js +261 -261
- package/server/modules/providers/list/opencode/opencode-session-synchronizer.provider.ts +179 -179
- package/server/modules/providers/list/opencode/opencode-sessions.provider.ts +500 -500
- package/server/modules/providers/list/opencode/opencode-skills.provider.ts +78 -78
- package/server/modules/providers/list/opencode/opencode.provider.ts +30 -30
- package/server/modules/providers/provider.registry.ts +36 -36
- package/server/modules/providers/provider.routes.ts +877 -877
- package/server/modules/providers/services/mcp.service.ts +109 -109
- package/server/modules/providers/services/provider-auth.service.ts +26 -26
- package/server/modules/providers/services/provider-capabilities.service.ts +97 -97
- package/server/modules/providers/services/provider-models.service.ts +401 -401
- package/server/modules/providers/services/provider-runtime.service.ts +108 -108
- package/server/modules/providers/services/provider-token-usage.service.ts +357 -357
- package/server/modules/providers/services/session-conversations-search.service.ts +1321 -1321
- package/server/modules/providers/services/session-synchronizer.service.ts +74 -74
- package/server/modules/providers/services/sessions-watcher.service.ts +247 -247
- package/server/modules/providers/services/sessions.service.ts +471 -471
- package/server/modules/providers/services/skills.service.ts +39 -39
- package/server/modules/providers/shared/base/abstract.provider.ts +32 -32
- package/server/modules/providers/shared/mcp/mcp.provider.ts +151 -151
- package/server/modules/providers/shared/skills/skills.provider.ts +287 -287
- package/server/modules/providers/tests/claude-auth.test.ts +157 -150
- package/server/modules/providers/tests/claude-sessions.test.ts +61 -61
- package/server/modules/providers/tests/codex-sessions.test.ts +231 -231
- package/server/modules/providers/tests/mcp.test.ts +349 -349
- package/server/modules/providers/tests/opencode-models.test.ts +41 -41
- package/server/modules/providers/tests/opencode-sessions.test.ts +522 -522
- package/server/modules/providers/tests/provider-attachment-history.test.ts +247 -247
- package/server/modules/providers/tests/provider-models.service.test.ts +353 -353
- package/server/modules/providers/tests/provider-runtime.service.test.ts +138 -138
- package/server/modules/providers/tests/provider-token-usage.service.test.ts +186 -186
- package/server/modules/providers/tests/provider.routes.test.ts +244 -244
- package/server/modules/providers/tests/sessions-details.test.ts +73 -73
- package/server/modules/providers/tests/sessions.service.test.ts +127 -127
- package/server/modules/providers/tests/skills.test.ts +692 -692
- package/server/modules/settings/index.ts +2 -2
- package/server/modules/settings/settings.module.ts +50 -50
- package/server/modules/settings/settings.routes.ts +51 -51
- package/server/modules/settings/settings.service.ts +186 -186
- package/server/modules/settings/tests/settings.service.test.ts +54 -54
- package/server/modules/system/index.ts +2 -2
- package/server/modules/system/system.module.ts +62 -62
- package/server/modules/system/system.routes.ts +21 -21
- package/server/modules/system/system.service.ts +76 -76
- package/server/modules/system/tests/system.service.test.ts +118 -118
- package/server/modules/taskmaster/index.ts +2 -2
- package/server/modules/taskmaster/taskmaster.module.ts +24 -24
- package/server/modules/taskmaster/taskmaster.routes.ts +1483 -1482
- package/server/modules/taskmaster/taskmaster.service.ts +132 -132
- package/server/modules/taskmaster/tests/taskmaster.routes.test.ts +144 -144
- package/server/modules/taskmaster/tests/taskmaster.service.test.ts +97 -97
- package/server/modules/user/index.ts +2 -2
- package/server/modules/user/tests/user.service.test.ts +61 -61
- package/server/modules/user/user.module.ts +58 -58
- package/server/modules/user/user.routes.ts +50 -50
- package/server/modules/user/user.service.ts +85 -85
- package/server/modules/voice/index.ts +2 -2
- package/server/modules/voice/tests/voice.service.test.ts +98 -98
- package/server/modules/voice/voice.module.ts +47 -47
- package/server/modules/voice/voice.routes.ts +113 -113
- package/server/modules/voice/voice.service.ts +192 -192
- package/server/modules/websocket/README.md +273 -273
- package/server/modules/websocket/index.ts +3 -3
- package/server/modules/websocket/services/chat-run-registry.service.ts +343 -343
- package/server/modules/websocket/services/chat-session-writer.service.ts +145 -145
- package/server/modules/websocket/services/chat-websocket.service.ts +425 -425
- package/server/modules/websocket/services/plugin-websocket-proxy.service.ts +65 -65
- package/server/modules/websocket/services/shell-websocket.service.ts +503 -503
- package/server/modules/websocket/services/websocket-auth.service.ts +59 -59
- package/server/modules/websocket/services/websocket-server.service.ts +124 -124
- package/server/modules/websocket/services/websocket-state.service.ts +16 -16
- package/server/modules/websocket/services/websocket-writer.service.ts +38 -38
- package/server/modules/websocket/tests/chat-attachment-filter.test.ts +59 -59
- package/server/modules/websocket/tests/chat-run-registry.test.ts +282 -282
- package/server/modules/websocket/tests/shell-websocket.service.test.ts +100 -100
- package/server/modules/websocket/tests/websocket-heartbeat.service.test.ts +78 -78
- package/server/modules/worktrees/index.ts +2 -2
- package/server/modules/worktrees/services/worktree-create-and-open.service.ts +53 -53
- package/server/modules/worktrees/services/worktree-create.service.ts +104 -104
- package/server/modules/worktrees/services/worktree-git.service.ts +207 -207
- package/server/modules/worktrees/services/worktree-list.service.ts +143 -143
- package/server/modules/worktrees/services/worktree-merge.service.ts +157 -157
- package/server/modules/worktrees/services/worktree-open.service.ts +85 -85
- package/server/modules/worktrees/services/worktree-remove.service.ts +88 -88
- package/server/modules/worktrees/tests/worktree-create-and-open.service.test.ts +68 -68
- package/server/modules/worktrees/tests/worktree-create.service.test.ts +142 -142
- package/server/modules/worktrees/tests/worktree-git.service.test.ts +84 -84
- package/server/modules/worktrees/tests/worktree-list.service.test.ts +45 -45
- package/server/modules/worktrees/tests/worktree-merge.service.test.ts +213 -213
- package/server/modules/worktrees/tests/worktree-open.service.test.ts +122 -122
- package/server/modules/worktrees/tests/worktree-remove.service.test.ts +227 -227
- package/server/modules/worktrees/tests/worktrees.routes.test.ts +199 -199
- package/server/modules/worktrees/worktrees.module.ts +113 -113
- package/server/modules/worktrees/worktrees.routes.ts +116 -116
- package/server/shared/claude-cli-path.ts +139 -139
- package/server/shared/frontmatter.ts +18 -18
- package/server/shared/image-attachments.ts +435 -435
- package/server/shared/interfaces.ts +179 -179
- package/server/shared/tests/claude-cli-path.test.ts +61 -61
- package/server/shared/tests/image-attachments.test.ts +353 -353
- package/server/shared/tests/slice-tail-page.test.ts +42 -42
- package/server/shared/types.ts +1228 -1228
- package/server/shared/utils.ts +1161 -1161
- package/server/tsconfig.json +40 -40
- package/shared/networkHosts.js +22 -22
- package/dist/assets/FileTree-N2IkkHlv.js +0 -127
- package/dist/assets/GitPanel-DZCeuFZ2.js +0 -29
- package/dist/assets/PluginTabContent-Bnuf-fb8.js +0 -1
- package/dist/assets/Shell-BfFnMZ-f.js +0 -81
- package/dist/assets/Shell-qxJ8_QYu.css +0 -32
- package/dist/assets/StandaloneShell-QmyYwNAl.js +0 -1
- package/dist/assets/TaskMasterPanel-fMsmvN9L.js +0 -32
- package/dist/assets/abnfDiagram-N423BO3Z-DjPU7HLs.js +0 -1
- package/dist/assets/arc-Pdq6Tvr3.js +0 -1
- package/dist/assets/architectureDiagram-T3A2C74G-D0JnT0Vh.js +0 -36
- package/dist/assets/c4Diagram-5PPSVZJV-MpqlPGFi.js +0 -10
- package/dist/assets/channel-Bm0ZLE4z.js +0 -1
- package/dist/assets/chunk-5RXB4S5H-B4UQ8snD.js +0 -231
- package/dist/assets/chunk-GF5L2VYU-DkEPedJP.js +0 -206
- package/dist/assets/classDiagram-JCYQIIEL-DqEOcNxw.js +0 -1
- package/dist/assets/classDiagram-v2-OCEON4UE-DqEOcNxw.js +0 -1
- package/dist/assets/code-xml-VK1YfShP.js +0 -6
- package/dist/assets/cose-bilkent-JH36ORCC-DrVTo1Nh.js +0 -1
- package/dist/assets/cynefinDiagram-MW4NZA55-CCxBjw9E.js +0 -62
- package/dist/assets/cytoscape.esm-C10L9Icf.js +0 -331
- package/dist/assets/dagre-VZM6K2ZE-C_GvE4lu.js +0 -4
- package/dist/assets/diagram-LBJQPF4R-hfKcrrxe.js +0 -24
- package/dist/assets/diagram-Q27KOJAE-C1semJfK.js +0 -24
- package/dist/assets/diagram-UB23O5K3-57hvXQXO.js +0 -41
- package/dist/assets/ebnfDiagram-BXEA7PRR-9KIAlAVw.js +0 -1
- package/dist/assets/erDiagram-JOGREHBK-B7OzJ767.js +0 -85
- package/dist/assets/ganttDiagram-PKOTCBZU-CbMNWWQu.js +0 -292
- package/dist/assets/gitGraphDiagram-DS77QQ5N-I_vZ5waO.js +0 -106
- package/dist/assets/graph-Cx-EqisW.js +0 -1
- package/dist/assets/index-DFnVoqpx.js +0 -1174
- package/dist/assets/index-DlSeAkw_.js +0 -11
- package/dist/assets/index-ZHwIojzi.js +0 -1
- package/dist/assets/index-t1w8KNxn.css +0 -1
- package/dist/assets/infoDiagram-6WML65LV-Dh20Tsbq.js +0 -2
- package/dist/assets/ishikawaDiagram-WSZJBQD7-DH2Sm3ko.js +0 -70
- package/dist/assets/journeyDiagram-NVQOT4AX-BNFQqlVu.js +0 -139
- package/dist/assets/map-CV9uif0g.js +0 -1
- package/dist/assets/mermaid.core-BYRQSshi.js +0 -312
- package/dist/assets/pegDiagram-VL7TDLO6-CNYpECr8.js +0 -1
- package/dist/assets/quadrantDiagram-CIZ2JOQS-BXVVQsa6.js +0 -7
- package/dist/assets/railroadDiagram-AXF67PYL-JTroIW8F.js +0 -1
- package/dist/assets/requirementDiagram-LRYGKXZP-C1Z_inLz.js +0 -84
- package/dist/assets/sankeyDiagram-W5VNT64P-DCJgKFUk.js +0 -40
- package/dist/assets/sequenceDiagram-SI44F4Z6-D8Wrx5Vc.js +0 -162
- package/dist/assets/sizeCapture-X5ZJPWSS-CXqD68vD.js +0 -1
- package/dist/assets/stateDiagram-OKZ733FA-CF0Ekqjo.js +0 -1
- package/dist/assets/stateDiagram-v2-UEYNNEHI-DARLpEFJ.js +0 -1
- package/dist/assets/swimlanes-SLNWSIFB-DVIax_k4.js +0 -2
- package/dist/assets/swimlanesDiagram-ULZ7WXOC-CrgDgaY8.js +0 -8
- package/dist/assets/timeline-definition-Z64GVDOM-DSqk3ApG.js +0 -120
- package/dist/assets/vendor-react-whEHfigN.js +0 -59
- package/dist/assets/vennDiagram-T6HMQDX7-DNbTqyG5.js +0 -34
- package/dist/assets/xychartDiagram-ELKLHX3M-XsVZphHr.js +0 -7
- package/dist/manifest.json +0 -61
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import{c as le,aj as Ce,F as ve,ak as tt,S as ue,J as Se,al as Ee,am as Ft,an as Ne,ao as Vt,ap as Be,aq as Le,a1 as pt,ar as Me,h as je,q as we,a6 as Gt,a5 as qt,as as Xt,at as Kt,j as z,au as mt,T as gt,U as yt,D as _t,av as rt,a3 as Fe,R as nt,d as pe,aw as ct,Z as Yt,ax as Jt,ay as dt,i as Dt,w as Ot,e as be,L as Rt,G as Qt,z as er,m as tr,X as ut,t as rr,az as nr,b as ir,aA as ar,Q as sr}from"./index-DFnVoqpx.js";import{r as $,c as Ge,g as or}from"./vendor-react-whEHfigN.js";import{C as Je}from"./code-xml-VK1YfShP.js";/**
|
|
2
|
-
* @license lucide-react v0.515.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const lr=[["rect",{x:"14",y:"14",width:"4",height:"6",rx:"2",key:"p02svl"}],["rect",{x:"6",y:"4",width:"4",height:"6",rx:"2",key:"xm4xkj"}],["path",{d:"M6 20h4",key:"1i6q5t"}],["path",{d:"M14 10h4",key:"ru81e7"}],["path",{d:"M6 14h2v6",key:"16z9wg"}],["path",{d:"M14 4h2v6",key:"1idq9u"}]],ze=le("binary",lr);/**
|
|
7
|
-
* @license lucide-react v0.515.0 - ISC
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const cr=[["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["path",{d:"M10 21V8a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1H3",key:"1fpvtg"}]],dr=le("blocks",cr);/**
|
|
12
|
-
* @license lucide-react v0.515.0 - ISC
|
|
13
|
-
*
|
|
14
|
-
* This source code is licensed under the ISC license.
|
|
15
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const ur=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],Ze=le("box",ur);/**
|
|
17
|
-
* @license lucide-react v0.515.0 - ISC
|
|
18
|
-
*
|
|
19
|
-
* This source code is licensed under the ISC license.
|
|
20
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const hr=[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]],Te=le("braces",hr);/**
|
|
22
|
-
* @license lucide-react v0.515.0 - ISC
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the ISC license.
|
|
25
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/const fr=[["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M14 2v2",key:"6buw04"}],["path",{d:"M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1",key:"pwadti"}],["path",{d:"M6 2v2",key:"colzsn"}]],bt=le("coffee",fr);/**
|
|
27
|
-
* @license lucide-react v0.515.0 - ISC
|
|
28
|
-
*
|
|
29
|
-
* This source code is licensed under the ISC license.
|
|
30
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/const pr=[["path",{d:"M12 20a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z",key:"sobvz5"}],["path",{d:"M12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z",key:"11i496"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 22v-2",key:"1osdcq"}],["path",{d:"m17 20.66-1-1.73",key:"eq3orb"}],["path",{d:"M11 10.27 7 3.34",key:"16pf9h"}],["path",{d:"m20.66 17-1.73-1",key:"sg0v6f"}],["path",{d:"m3.34 7 1.73 1",key:"1ulond"}],["path",{d:"M14 12h8",key:"4f43i9"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"m20.66 7-1.73 1",key:"1ow05n"}],["path",{d:"m3.34 17 1.73-1",key:"nuk764"}],["path",{d:"m17 3.34-1 1.73",key:"2wel8s"}],["path",{d:"m11 13.73-4 6.93",key:"794ttg"}]],We=le("cog",pr);/**
|
|
32
|
-
* @license lucide-react v0.515.0 - ISC
|
|
33
|
-
*
|
|
34
|
-
* This source code is licensed under the ISC license.
|
|
35
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/const mr=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],gr=le("database",mr);/**
|
|
37
|
-
* @license lucide-react v0.515.0 - ISC
|
|
38
|
-
*
|
|
39
|
-
* This source code is licensed under the ISC license.
|
|
40
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/const yr=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m9 15 2 2 4-4",key:"1grp1n"}]],it=le("file-check",yr);/**
|
|
42
|
-
* @license lucide-react v0.515.0 - ISC
|
|
43
|
-
*
|
|
44
|
-
* This source code is licensed under the ISC license.
|
|
45
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/const _r=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]],xt=le("file-spreadsheet",_r);/**
|
|
47
|
-
* @license lucide-react v0.515.0 - ISC
|
|
48
|
-
*
|
|
49
|
-
* This source code is licensed under the ISC license.
|
|
50
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
-
*/const br=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M9 13v-1h6v1",key:"1bb014"}],["path",{d:"M12 12v6",key:"3ahymv"}],["path",{d:"M11 18h2",key:"12mj7e"}]],Ue=le("file-type",br);/**
|
|
52
|
-
* @license lucide-react v0.515.0 - ISC
|
|
53
|
-
*
|
|
54
|
-
* This source code is licensed under the ISC license.
|
|
55
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/const xr=[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]],at=le("flame",xr);/**
|
|
57
|
-
* @license lucide-react v0.515.0 - ISC
|
|
58
|
-
*
|
|
59
|
-
* This source code is licensed under the ISC license.
|
|
60
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
-
*/const vr=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],wr=le("flask-conical",vr);/**
|
|
62
|
-
* @license lucide-react v0.515.0 - ISC
|
|
63
|
-
*
|
|
64
|
-
* This source code is licensed under the ISC license.
|
|
65
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
-
*/const kr=[["path",{d:"M6 3h12l4 6-10 13L2 9Z",key:"1pcd5k"}],["path",{d:"M11 3 8 9l4 13 4-13-3-6",key:"1fcu3u"}],["path",{d:"M2 9h20",key:"16fsjt"}]],st=le("gem",kr);/**
|
|
67
|
-
* @license lucide-react v0.515.0 - ISC
|
|
68
|
-
*
|
|
69
|
-
* This source code is licensed under the ISC license.
|
|
70
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
-
*/const Cr=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],Ie=le("hash",Cr);/**
|
|
72
|
-
* @license lucide-react v0.515.0 - ISC
|
|
73
|
-
*
|
|
74
|
-
* This source code is licensed under the ISC license.
|
|
75
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
-
*/const Sr=[["path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z",key:"yt0hxn"}]],He=le("hexagon",Sr);/**
|
|
77
|
-
* @license lucide-react v0.515.0 - ISC
|
|
78
|
-
*
|
|
79
|
-
* This source code is licensed under the ISC license.
|
|
80
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
-
*/const Er=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],ke=le("image",Er);/**
|
|
82
|
-
* @license lucide-react v0.515.0 - ISC
|
|
83
|
-
*
|
|
84
|
-
* This source code is licensed under the ISC license.
|
|
85
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/const Nr=[["circle",{cx:"8",cy:"18",r:"4",key:"1fc0mg"}],["path",{d:"M12 18V2l7 4",key:"g04rme"}]],Ae=le("music-2",Nr);/**
|
|
87
|
-
* @license lucide-react v0.515.0 - ISC
|
|
88
|
-
*
|
|
89
|
-
* This source code is licensed under the ISC license.
|
|
90
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/const zr=[["path",{d:"M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4",key:"re6nr2"}],["path",{d:"M2 6h4",key:"aawbzj"}],["path",{d:"M2 10h4",key:"l0bgd4"}],["path",{d:"M2 14h4",key:"1gsvsf"}],["path",{d:"M2 18h4",key:"1bu2t1"}],["path",{d:"M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"pqwjuv"}]],Ar=le("notebook-pen",zr);/**
|
|
92
|
-
* @license lucide-react v0.515.0 - ISC
|
|
93
|
-
*
|
|
94
|
-
* This source code is licensed under the ISC license.
|
|
95
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
-
*/const jr=[["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],ot=le("scroll",jr);/**
|
|
97
|
-
* @license lucide-react v0.515.0 - ISC
|
|
98
|
-
*
|
|
99
|
-
* This source code is licensed under the ISC license.
|
|
100
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
-
*/const Ir=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["path",{d:"M9 17c2 0 2.8-1 2.8-2.8V10c0-2 1-3.3 3.2-3",key:"m1af9g"}],["path",{d:"M9 11.2h5.7",key:"3zgcl2"}]],Tr=le("square-function",Ir);/**
|
|
102
|
-
* @license lucide-react v0.515.0 - ISC
|
|
103
|
-
*
|
|
104
|
-
* This source code is licensed under the ISC license.
|
|
105
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
-
*/const Fr=[["path",{d:"M15 3v18",key:"14nvp0"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 9H3",key:"1338ky"}],["path",{d:"M21 15H3",key:"9uk58r"}]],Dr=le("table-properties",Fr);/**
|
|
107
|
-
* @license lucide-react v0.515.0 - ISC
|
|
108
|
-
*
|
|
109
|
-
* This source code is licensed under the ISC license.
|
|
110
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
-
*/const Or=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],Pe=le("video",Or);/**
|
|
112
|
-
* @license lucide-react v0.515.0 - ISC
|
|
113
|
-
*
|
|
114
|
-
* This source code is licensed under the ISC license.
|
|
115
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
-
*/const Rr=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],vt=le("workflow",Rr),wt="w-4 h-4 flex-shrink-0",kt={js:{icon:Be,color:"text-yellow-500"},jsx:{icon:Be,color:"text-yellow-500"},mjs:{icon:Be,color:"text-yellow-500"},cjs:{icon:Be,color:"text-yellow-500"},ts:{icon:Le,color:"text-blue-500"},tsx:{icon:Le,color:"text-blue-500"},mts:{icon:Le,color:"text-blue-500"},py:{icon:Je,color:"text-emerald-500"},pyw:{icon:Je,color:"text-emerald-500"},pyi:{icon:Je,color:"text-emerald-400"},ipynb:{icon:Ar,color:"text-orange-500"},rs:{icon:We,color:"text-orange-600"},toml:{icon:ue,color:"text-gray-500"},go:{icon:He,color:"text-cyan-500"},rb:{icon:st,color:"text-red-500"},erb:{icon:st,color:"text-red-400"},php:{icon:dr,color:"text-violet-500"},java:{icon:bt,color:"text-red-600"},jar:{icon:bt,color:"text-red-500"},kt:{icon:He,color:"text-violet-500"},kts:{icon:He,color:"text-violet-400"},c:{icon:Me,color:"text-blue-600"},h:{icon:Me,color:"text-blue-400"},cpp:{icon:Me,color:"text-blue-700"},hpp:{icon:Me,color:"text-blue-500"},cc:{icon:Me,color:"text-blue-700"},cs:{icon:He,color:"text-purple-600"},swift:{icon:at,color:"text-orange-500"},lua:{icon:Tr,color:"text-blue-500"},r:{icon:wr,color:"text-blue-600"},html:{icon:pt,color:"text-orange-600"},htm:{icon:pt,color:"text-orange-600"},css:{icon:Ie,color:"text-blue-500"},scss:{icon:Ie,color:"text-pink-500"},sass:{icon:Ie,color:"text-pink-400"},less:{icon:Ie,color:"text-indigo-500"},vue:{icon:Le,color:"text-emerald-500"},svelte:{icon:Le,color:"text-orange-500"},json:{icon:Te,color:"text-yellow-600"},jsonc:{icon:Te,color:"text-yellow-500"},json5:{icon:Te,color:"text-yellow-500"},yaml:{icon:ue,color:"text-purple-400"},yml:{icon:ue,color:"text-purple-400"},xml:{icon:Be,color:"text-orange-500"},csv:{icon:xt,color:"text-green-600"},tsv:{icon:xt,color:"text-green-500"},sql:{icon:gr,color:"text-blue-500"},graphql:{icon:vt,color:"text-pink-500"},gql:{icon:vt,color:"text-pink-500"},proto:{icon:Ze,color:"text-green-500"},env:{icon:Ee,color:"text-yellow-600"},md:{icon:tt,color:"text-blue-500"},mdx:{icon:tt,color:"text-blue-400"},txt:{icon:ve,color:"text-gray-500"},doc:{icon:ve,color:"text-blue-600"},docx:{icon:ve,color:"text-blue-600"},pdf:{icon:it,color:"text-red-600"},rtf:{icon:ve,color:"text-gray-500"},tex:{icon:ot,color:"text-teal-600"},rst:{icon:ve,color:"text-gray-400"},sh:{icon:Se,color:"text-green-500"},bash:{icon:Se,color:"text-green-500"},zsh:{icon:Se,color:"text-green-400"},fish:{icon:Se,color:"text-green-400"},ps1:{icon:Se,color:"text-blue-400"},bat:{icon:Se,color:"text-gray-500"},cmd:{icon:Se,color:"text-gray-500"},png:{icon:ke,color:"text-purple-500"},jpg:{icon:ke,color:"text-purple-500"},jpeg:{icon:ke,color:"text-purple-500"},gif:{icon:ke,color:"text-purple-400"},webp:{icon:ke,color:"text-purple-400"},ico:{icon:ke,color:"text-purple-400"},bmp:{icon:ke,color:"text-purple-400"},tiff:{icon:ke,color:"text-purple-400"},svg:{icon:Vt,color:"text-amber-500"},mp3:{icon:Ae,color:"text-pink-500"},wav:{icon:Ae,color:"text-pink-500"},ogg:{icon:Ae,color:"text-pink-400"},flac:{icon:Ae,color:"text-pink-400"},aac:{icon:Ae,color:"text-pink-400"},m4a:{icon:Ae,color:"text-pink-400"},mp4:{icon:Pe,color:"text-rose-500"},mov:{icon:Pe,color:"text-rose-500"},avi:{icon:Pe,color:"text-rose-500"},webm:{icon:Pe,color:"text-rose-400"},mkv:{icon:Pe,color:"text-rose-400"},ttf:{icon:Ue,color:"text-red-500"},otf:{icon:Ue,color:"text-red-500"},woff:{icon:Ue,color:"text-red-400"},woff2:{icon:Ue,color:"text-red-400"},eot:{icon:Ue,color:"text-red-400"},zip:{icon:Ne,color:"text-amber-600"},tar:{icon:Ne,color:"text-amber-600"},gz:{icon:Ne,color:"text-amber-600"},bz2:{icon:Ne,color:"text-amber-600"},rar:{icon:Ne,color:"text-amber-500"},"7z":{icon:Ne,color:"text-amber-500"},lock:{icon:Ce,color:"text-gray-500"},exe:{icon:ze,color:"text-gray-500"},bin:{icon:ze,color:"text-gray-500"},dll:{icon:ze,color:"text-gray-400"},so:{icon:ze,color:"text-gray-400"},dylib:{icon:ze,color:"text-gray-400"},wasm:{icon:ze,color:"text-purple-500"},ini:{icon:ue,color:"text-gray-500"},cfg:{icon:ue,color:"text-gray-500"},conf:{icon:ue,color:"text-gray-500"},log:{icon:ot,color:"text-gray-400"},map:{icon:Ft,color:"text-gray-400"}},Ct={Dockerfile:{icon:Ze,color:"text-blue-500"},"docker-compose.yml":{icon:Ze,color:"text-blue-500"},"docker-compose.yaml":{icon:Ze,color:"text-blue-500"},".dockerignore":{icon:Ze,color:"text-gray-500"},".gitignore":{icon:ue,color:"text-gray-500"},".gitmodules":{icon:ue,color:"text-gray-500"},".gitattributes":{icon:ue,color:"text-gray-500"},".editorconfig":{icon:ue,color:"text-gray-500"},".prettierrc":{icon:ue,color:"text-pink-400"},".prettierignore":{icon:ue,color:"text-gray-500"},".eslintrc":{icon:ue,color:"text-violet-500"},".eslintrc.js":{icon:ue,color:"text-violet-500"},".eslintrc.json":{icon:ue,color:"text-violet-500"},".eslintrc.cjs":{icon:ue,color:"text-violet-500"},"eslint.config.js":{icon:ue,color:"text-violet-500"},"eslint.config.mjs":{icon:ue,color:"text-violet-500"},".env":{icon:Ee,color:"text-yellow-600"},".env.local":{icon:Ee,color:"text-yellow-600"},".env.development":{icon:Ee,color:"text-yellow-500"},".env.production":{icon:Ee,color:"text-yellow-600"},".env.example":{icon:Ee,color:"text-yellow-400"},"package.json":{icon:Te,color:"text-green-500"},"package-lock.json":{icon:Ce,color:"text-gray-500"},"yarn.lock":{icon:Ce,color:"text-blue-400"},"pnpm-lock.yaml":{icon:Ce,color:"text-orange-400"},"bun.lockb":{icon:Ce,color:"text-gray-400"},"Cargo.toml":{icon:We,color:"text-orange-600"},"Cargo.lock":{icon:Ce,color:"text-orange-400"},Gemfile:{icon:st,color:"text-red-500"},"Gemfile.lock":{icon:Ce,color:"text-red-400"},Makefile:{icon:Se,color:"text-gray-500"},"CMakeLists.txt":{icon:We,color:"text-blue-500"},"tsconfig.json":{icon:Te,color:"text-blue-500"},"jsconfig.json":{icon:Te,color:"text-yellow-500"},"vite.config.ts":{icon:at,color:"text-purple-500"},"vite.config.js":{icon:at,color:"text-purple-500"},"webpack.config.js":{icon:We,color:"text-blue-500"},"tailwind.config.js":{icon:Ie,color:"text-cyan-500"},"tailwind.config.ts":{icon:Ie,color:"text-cyan-500"},"postcss.config.js":{icon:We,color:"text-red-400"},"babel.config.js":{icon:ue,color:"text-yellow-500"},".babelrc":{icon:ue,color:"text-yellow-500"},"README.md":{icon:tt,color:"text-blue-500"},LICENSE:{icon:it,color:"text-gray-500"},"LICENSE.md":{icon:it,color:"text-gray-500"},"CHANGELOG.md":{icon:ot,color:"text-blue-400"},"requirements.txt":{icon:ve,color:"text-emerald-400"},"go.mod":{icon:He,color:"text-cyan-500"},"go.sum":{icon:Ce,color:"text-cyan-400"}};function Br(C){if(Ct[C])return Ct[C];if(C.startsWith(".env"))return{icon:Ee,color:"text-yellow-600"};const L=C.split(".").pop()?.toLowerCase();return L&&kt[L]?kt[L]:{icon:Ft,color:"text-muted-foreground"}}function Lr(){const[C,L]=$.useState(()=>new Set),o=$.useCallback(i=>{L(s=>{const r=new Set(s);return r.has(i)?r.delete(i):r.add(i),r})},[]),k=$.useCallback(i=>{i.length!==0&&L(s=>{const r=new Set(s);return i.forEach(c=>r.add(c)),r})},[]),f=$.useCallback(()=>{L(new Set)},[]);return{expandedDirs:C,toggleDirectory:o,expandDirectories:k,collapseAll:f}}const St="Unable to load the file tree for this project.";function Mr(C){try{const L=JSON.parse(C),o=typeof L=="object"&&L!==null&&"error"in L?L.error:null;return typeof o=="string"&&o.trim()?o:null}catch{return null}}function Ur(C){const[L,o]=$.useState([]),[k,f]=$.useState(!1),[i,s]=$.useState(null),[r,c]=$.useState(0),_=$.useRef(null),x=$.useCallback(()=>{c(y=>y+1)},[]);return $.useEffect(()=>{const y=C?.projectId;if(!y){o([]),f(!1),s(null);return}_.current&&_.current.abort(),_.current=new AbortController;let p=!0;return(async()=>{p&&(f(!0),s(null));try{const h=await je.getFiles(y,{signal:_.current.signal});if(!h.ok){const d=await h.text();console.error("File fetch failed:",h.status,d),p&&(o([]),s(Mr(d)??St));return}const a=await h.json();p&&o(a)}catch(h){if(h.name==="AbortError")return;console.error("Error fetching files:",h),p&&(o([]),s(St))}finally{p&&f(!1)}})(),()=>{p=!1,_.current?.abort()}},[C?.projectId,r]),{files:L,loading:k,error:i,refreshFiles:x}}function qe(C){throw new Error('Could not dynamically require "'+C+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Qe={exports:{}};/*!
|
|
117
|
-
|
|
118
|
-
JSZip v3.10.1 - A JavaScript class for generating and reading zip files
|
|
119
|
-
<http://stuartk.com/jszip>
|
|
120
|
-
|
|
121
|
-
(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
|
|
122
|
-
Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.
|
|
123
|
-
|
|
124
|
-
JSZip uses the library pako released under the MIT license :
|
|
125
|
-
https://github.com/nodeca/pako/blob/main/LICENSE
|
|
126
|
-
*/var Et;function Pr(){return Et||(Et=1,function(C,L){(function(o){C.exports=o()})(function(){return function o(k,f,i){function s(_,x){if(!f[_]){if(!k[_]){var y=typeof qe=="function"&&qe;if(!x&&y)return y(_,!0);if(r)return r(_,!0);var p=new Error("Cannot find module '"+_+"'");throw p.code="MODULE_NOT_FOUND",p}var n=f[_]={exports:{}};k[_][0].call(n.exports,function(h){var a=k[_][1][h];return s(a||h)},n,n.exports,o,k,f,i)}return f[_].exports}for(var r=typeof qe=="function"&&qe,c=0;c<i.length;c++)s(i[c]);return s}({1:[function(o,k,f){var i=o("./utils"),s=o("./support"),r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";f.encode=function(c){for(var _,x,y,p,n,h,a,d=[],l=0,g=c.length,w=g,E=i.getTypeOf(c)!=="string";l<c.length;)w=g-l,y=E?(_=c[l++],x=l<g?c[l++]:0,l<g?c[l++]:0):(_=c.charCodeAt(l++),x=l<g?c.charCodeAt(l++):0,l<g?c.charCodeAt(l++):0),p=_>>2,n=(3&_)<<4|x>>4,h=1<w?(15&x)<<2|y>>6:64,a=2<w?63&y:64,d.push(r.charAt(p)+r.charAt(n)+r.charAt(h)+r.charAt(a));return d.join("")},f.decode=function(c){var _,x,y,p,n,h,a=0,d=0,l="data:";if(c.substr(0,l.length)===l)throw new Error("Invalid base64 input, it looks like a data url.");var g,w=3*(c=c.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(c.charAt(c.length-1)===r.charAt(64)&&w--,c.charAt(c.length-2)===r.charAt(64)&&w--,w%1!=0)throw new Error("Invalid base64 input, bad content length.");for(g=s.uint8array?new Uint8Array(0|w):new Array(0|w);a<c.length;)_=r.indexOf(c.charAt(a++))<<2|(p=r.indexOf(c.charAt(a++)))>>4,x=(15&p)<<4|(n=r.indexOf(c.charAt(a++)))>>2,y=(3&n)<<6|(h=r.indexOf(c.charAt(a++))),g[d++]=_,n!==64&&(g[d++]=x),h!==64&&(g[d++]=y);return g}},{"./support":30,"./utils":32}],2:[function(o,k,f){var i=o("./external"),s=o("./stream/DataWorker"),r=o("./stream/Crc32Probe"),c=o("./stream/DataLengthProbe");function _(x,y,p,n,h){this.compressedSize=x,this.uncompressedSize=y,this.crc32=p,this.compression=n,this.compressedContent=h}_.prototype={getContentWorker:function(){var x=new s(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new c("data_length")),y=this;return x.on("end",function(){if(this.streamInfo.data_length!==y.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),x},getCompressedWorker:function(){return new s(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},_.createWorkerFrom=function(x,y,p){return x.pipe(new r).pipe(new c("uncompressedSize")).pipe(y.compressWorker(p)).pipe(new c("compressedSize")).withStreamInfo("compression",y)},k.exports=_},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(o,k,f){var i=o("./stream/GenericWorker");f.STORE={magic:"\0\0",compressWorker:function(){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},f.DEFLATE=o("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(o,k,f){var i=o("./utils"),s=function(){for(var r,c=[],_=0;_<256;_++){r=_;for(var x=0;x<8;x++)r=1&r?3988292384^r>>>1:r>>>1;c[_]=r}return c}();k.exports=function(r,c){return r!==void 0&&r.length?i.getTypeOf(r)!=="string"?function(_,x,y,p){var n=s,h=p+y;_^=-1;for(var a=p;a<h;a++)_=_>>>8^n[255&(_^x[a])];return-1^_}(0|c,r,r.length,0):function(_,x,y,p){var n=s,h=p+y;_^=-1;for(var a=p;a<h;a++)_=_>>>8^n[255&(_^x.charCodeAt(a))];return-1^_}(0|c,r,r.length,0):0}},{"./utils":32}],5:[function(o,k,f){f.base64=!1,f.binary=!1,f.dir=!1,f.createFolders=!0,f.date=null,f.compression=null,f.compressionOptions=null,f.comment=null,f.unixPermissions=null,f.dosPermissions=null},{}],6:[function(o,k,f){var i=null;i=typeof Promise<"u"?Promise:o("lie"),k.exports={Promise:i}},{lie:37}],7:[function(o,k,f){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",s=o("pako"),r=o("./utils"),c=o("./stream/GenericWorker"),_=i?"uint8array":"array";function x(y,p){c.call(this,"FlateWorker/"+y),this._pako=null,this._pakoAction=y,this._pakoOptions=p,this.meta={}}f.magic="\b\0",r.inherits(x,c),x.prototype.processChunk=function(y){this.meta=y.meta,this._pako===null&&this._createPako(),this._pako.push(r.transformTo(_,y.data),!1)},x.prototype.flush=function(){c.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},x.prototype.cleanUp=function(){c.prototype.cleanUp.call(this),this._pako=null},x.prototype._createPako=function(){this._pako=new s[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var y=this;this._pako.onData=function(p){y.push({data:p,meta:y.meta})}},f.compressWorker=function(y){return new x("Deflate",y)},f.uncompressWorker=function(){return new x("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(o,k,f){function i(n,h){var a,d="";for(a=0;a<h;a++)d+=String.fromCharCode(255&n),n>>>=8;return d}function s(n,h,a,d,l,g){var w,E,S=n.file,F=n.compression,v=g!==_.utf8encode,D=r.transformTo("string",g(S.name)),j=r.transformTo("string",_.utf8encode(S.name)),U=S.comment,X=r.transformTo("string",g(U)),b=r.transformTo("string",_.utf8encode(U)),B=j.length!==S.name.length,t=b.length!==U.length,M="",te="",W="",Y=S.dir,O=S.date,K={crc32:0,compressedSize:0,uncompressedSize:0};h&&!a||(K.crc32=n.crc32,K.compressedSize=n.compressedSize,K.uncompressedSize=n.uncompressedSize);var A=0;h&&(A|=8),v||!B&&!t||(A|=2048);var I=0,ee=0;Y&&(I|=16),l==="UNIX"?(ee=798,I|=function(q,se){var he=q;return q||(he=se?16893:33204),(65535&he)<<16}(S.unixPermissions,Y)):(ee=20,I|=function(q){return 63&(q||0)}(S.dosPermissions)),w=O.getUTCHours(),w<<=6,w|=O.getUTCMinutes(),w<<=5,w|=O.getUTCSeconds()/2,E=O.getUTCFullYear()-1980,E<<=4,E|=O.getUTCMonth()+1,E<<=5,E|=O.getUTCDate(),B&&(te=i(1,1)+i(x(D),4)+j,M+="up"+i(te.length,2)+te),t&&(W=i(1,1)+i(x(X),4)+b,M+="uc"+i(W.length,2)+W);var J="";return J+=`
|
|
127
|
-
\0`,J+=i(A,2),J+=F.magic,J+=i(w,2),J+=i(E,2),J+=i(K.crc32,4),J+=i(K.compressedSize,4),J+=i(K.uncompressedSize,4),J+=i(D.length,2),J+=i(M.length,2),{fileRecord:y.LOCAL_FILE_HEADER+J+D+M,dirRecord:y.CENTRAL_FILE_HEADER+i(ee,2)+J+i(X.length,2)+"\0\0\0\0"+i(I,4)+i(d,4)+D+M+X}}var r=o("../utils"),c=o("../stream/GenericWorker"),_=o("../utf8"),x=o("../crc32"),y=o("../signature");function p(n,h,a,d){c.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=h,this.zipPlatform=a,this.encodeFileName=d,this.streamFiles=n,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}r.inherits(p,c),p.prototype.push=function(n){var h=n.meta.percent||0,a=this.entriesCount,d=this._sources.length;this.accumulate?this.contentBuffer.push(n):(this.bytesWritten+=n.data.length,c.prototype.push.call(this,{data:n.data,meta:{currentFile:this.currentFile,percent:a?(h+100*(a-d-1))/a:100}}))},p.prototype.openedSource=function(n){this.currentSourceOffset=this.bytesWritten,this.currentFile=n.file.name;var h=this.streamFiles&&!n.file.dir;if(h){var a=s(n,h,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:a.fileRecord,meta:{percent:0}})}else this.accumulate=!0},p.prototype.closedSource=function(n){this.accumulate=!1;var h=this.streamFiles&&!n.file.dir,a=s(n,h,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(a.dirRecord),h)this.push({data:function(d){return y.DATA_DESCRIPTOR+i(d.crc32,4)+i(d.compressedSize,4)+i(d.uncompressedSize,4)}(n),meta:{percent:100}});else for(this.push({data:a.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},p.prototype.flush=function(){for(var n=this.bytesWritten,h=0;h<this.dirRecords.length;h++)this.push({data:this.dirRecords[h],meta:{percent:100}});var a=this.bytesWritten-n,d=function(l,g,w,E,S){var F=r.transformTo("string",S(E));return y.CENTRAL_DIRECTORY_END+"\0\0\0\0"+i(l,2)+i(l,2)+i(g,4)+i(w,4)+i(F.length,2)+F}(this.dirRecords.length,a,n,this.zipComment,this.encodeFileName);this.push({data:d,meta:{percent:100}})},p.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},p.prototype.registerPrevious=function(n){this._sources.push(n);var h=this;return n.on("data",function(a){h.processChunk(a)}),n.on("end",function(){h.closedSource(h.previous.streamInfo),h._sources.length?h.prepareNextSource():h.end()}),n.on("error",function(a){h.error(a)}),this},p.prototype.resume=function(){return!!c.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},p.prototype.error=function(n){var h=this._sources;if(!c.prototype.error.call(this,n))return!1;for(var a=0;a<h.length;a++)try{h[a].error(n)}catch{}return!0},p.prototype.lock=function(){c.prototype.lock.call(this);for(var n=this._sources,h=0;h<n.length;h++)n[h].lock()},k.exports=p},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(o,k,f){var i=o("../compressions"),s=o("./ZipFileWorker");f.generateWorker=function(r,c,_){var x=new s(c.streamFiles,_,c.platform,c.encodeFileName),y=0;try{r.forEach(function(p,n){y++;var h=function(g,w){var E=g||w,S=i[E];if(!S)throw new Error(E+" is not a valid compression method !");return S}(n.options.compression,c.compression),a=n.options.compressionOptions||c.compressionOptions||{},d=n.dir,l=n.date;n._compressWorker(h,a).withStreamInfo("file",{name:p,dir:d,date:l,comment:n.comment||"",unixPermissions:n.unixPermissions,dosPermissions:n.dosPermissions}).pipe(x)}),x.entriesCount=y}catch(p){x.error(p)}return x}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(o,k,f){function i(){if(!(this instanceof i))return new i;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var s=new i;for(var r in this)typeof this[r]!="function"&&(s[r]=this[r]);return s}}(i.prototype=o("./object")).loadAsync=o("./load"),i.support=o("./support"),i.defaults=o("./defaults"),i.version="3.10.1",i.loadAsync=function(s,r){return new i().loadAsync(s,r)},i.external=o("./external"),k.exports=i},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(o,k,f){var i=o("./utils"),s=o("./external"),r=o("./utf8"),c=o("./zipEntries"),_=o("./stream/Crc32Probe"),x=o("./nodejsUtils");function y(p){return new s.Promise(function(n,h){var a=p.decompressed.getContentWorker().pipe(new _);a.on("error",function(d){h(d)}).on("end",function(){a.streamInfo.crc32!==p.decompressed.crc32?h(new Error("Corrupted zip : CRC32 mismatch")):n()}).resume()})}k.exports=function(p,n){var h=this;return n=i.extend(n||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:r.utf8decode}),x.isNode&&x.isStream(p)?s.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):i.prepareContent("the loaded zip file",p,!0,n.optimizedBinaryString,n.base64).then(function(a){var d=new c(n);return d.load(a),d}).then(function(a){var d=[s.Promise.resolve(a)],l=a.files;if(n.checkCRC32)for(var g=0;g<l.length;g++)d.push(y(l[g]));return s.Promise.all(d)}).then(function(a){for(var d=a.shift(),l=d.files,g=0;g<l.length;g++){var w=l[g],E=w.fileNameStr,S=i.resolve(w.fileNameStr);h.file(S,w.decompressed,{binary:!0,optimizedBinaryString:!0,date:w.date,dir:w.dir,comment:w.fileCommentStr.length?w.fileCommentStr:null,unixPermissions:w.unixPermissions,dosPermissions:w.dosPermissions,createFolders:n.createFolders}),w.dir||(h.file(S).unsafeOriginalName=E)}return d.zipComment.length&&(h.comment=d.zipComment),h})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(o,k,f){var i=o("../utils"),s=o("../stream/GenericWorker");function r(c,_){s.call(this,"Nodejs stream input adapter for "+c),this._upstreamEnded=!1,this._bindStream(_)}i.inherits(r,s),r.prototype._bindStream=function(c){var _=this;(this._stream=c).pause(),c.on("data",function(x){_.push({data:x,meta:{percent:0}})}).on("error",function(x){_.isPaused?this.generatedError=x:_.error(x)}).on("end",function(){_.isPaused?_._upstreamEnded=!0:_.end()})},r.prototype.pause=function(){return!!s.prototype.pause.call(this)&&(this._stream.pause(),!0)},r.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},k.exports=r},{"../stream/GenericWorker":28,"../utils":32}],13:[function(o,k,f){var i=o("readable-stream").Readable;function s(r,c,_){i.call(this,c),this._helper=r;var x=this;r.on("data",function(y,p){x.push(y)||x._helper.pause(),_&&_(p)}).on("error",function(y){x.emit("error",y)}).on("end",function(){x.push(null)})}o("../utils").inherits(s,i),s.prototype._read=function(){this._helper.resume()},k.exports=s},{"../utils":32,"readable-stream":16}],14:[function(o,k,f){k.exports={isNode:typeof Buffer<"u",newBufferFrom:function(i,s){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(i,s);if(typeof i=="number")throw new Error('The "data" argument must not be a number');return new Buffer(i,s)},allocBuffer:function(i){if(Buffer.alloc)return Buffer.alloc(i);var s=new Buffer(i);return s.fill(0),s},isBuffer:function(i){return Buffer.isBuffer(i)},isStream:function(i){return i&&typeof i.on=="function"&&typeof i.pause=="function"&&typeof i.resume=="function"}}},{}],15:[function(o,k,f){function i(S,F,v){var D,j=r.getTypeOf(F),U=r.extend(v||{},x);U.date=U.date||new Date,U.compression!==null&&(U.compression=U.compression.toUpperCase()),typeof U.unixPermissions=="string"&&(U.unixPermissions=parseInt(U.unixPermissions,8)),U.unixPermissions&&16384&U.unixPermissions&&(U.dir=!0),U.dosPermissions&&16&U.dosPermissions&&(U.dir=!0),U.dir&&(S=l(S)),U.createFolders&&(D=d(S))&&g.call(this,D,!0);var X=j==="string"&&U.binary===!1&&U.base64===!1;v&&v.binary!==void 0||(U.binary=!X),(F instanceof y&&F.uncompressedSize===0||U.dir||!F||F.length===0)&&(U.base64=!1,U.binary=!0,F="",U.compression="STORE",j="string");var b=null;b=F instanceof y||F instanceof c?F:h.isNode&&h.isStream(F)?new a(S,F):r.prepareContent(S,F,U.binary,U.optimizedBinaryString,U.base64);var B=new p(S,b,U);this.files[S]=B}var s=o("./utf8"),r=o("./utils"),c=o("./stream/GenericWorker"),_=o("./stream/StreamHelper"),x=o("./defaults"),y=o("./compressedObject"),p=o("./zipObject"),n=o("./generate"),h=o("./nodejsUtils"),a=o("./nodejs/NodejsStreamInputAdapter"),d=function(S){S.slice(-1)==="/"&&(S=S.substring(0,S.length-1));var F=S.lastIndexOf("/");return 0<F?S.substring(0,F):""},l=function(S){return S.slice(-1)!=="/"&&(S+="/"),S},g=function(S,F){return F=F!==void 0?F:x.createFolders,S=l(S),this.files[S]||i.call(this,S,null,{dir:!0,createFolders:F}),this.files[S]};function w(S){return Object.prototype.toString.call(S)==="[object RegExp]"}var E={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(S){var F,v,D;for(F in this.files)D=this.files[F],(v=F.slice(this.root.length,F.length))&&F.slice(0,this.root.length)===this.root&&S(v,D)},filter:function(S){var F=[];return this.forEach(function(v,D){S(v,D)&&F.push(D)}),F},file:function(S,F,v){if(arguments.length!==1)return S=this.root+S,i.call(this,S,F,v),this;if(w(S)){var D=S;return this.filter(function(U,X){return!X.dir&&D.test(U)})}var j=this.files[this.root+S];return j&&!j.dir?j:null},folder:function(S){if(!S)return this;if(w(S))return this.filter(function(j,U){return U.dir&&S.test(j)});var F=this.root+S,v=g.call(this,F),D=this.clone();return D.root=v.name,D},remove:function(S){S=this.root+S;var F=this.files[S];if(F||(S.slice(-1)!=="/"&&(S+="/"),F=this.files[S]),F&&!F.dir)delete this.files[S];else for(var v=this.filter(function(j,U){return U.name.slice(0,S.length)===S}),D=0;D<v.length;D++)delete this.files[v[D].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(S){var F,v={};try{if((v=r.extend(S||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:s.utf8encode})).type=v.type.toLowerCase(),v.compression=v.compression.toUpperCase(),v.type==="binarystring"&&(v.type="string"),!v.type)throw new Error("No output type specified.");r.checkSupport(v.type),v.platform!=="darwin"&&v.platform!=="freebsd"&&v.platform!=="linux"&&v.platform!=="sunos"||(v.platform="UNIX"),v.platform==="win32"&&(v.platform="DOS");var D=v.comment||this.comment||"";F=n.generateWorker(this,v,D)}catch(j){(F=new c("error")).error(j)}return new _(F,v.type||"string",v.mimeType)},generateAsync:function(S,F){return this.generateInternalStream(S).accumulate(F)},generateNodeStream:function(S,F){return(S=S||{}).type||(S.type="nodebuffer"),this.generateInternalStream(S).toNodejsStream(F)}};k.exports=E},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(o,k,f){k.exports=o("stream")},{stream:void 0}],17:[function(o,k,f){var i=o("./DataReader");function s(r){i.call(this,r);for(var c=0;c<this.data.length;c++)r[c]=255&r[c]}o("../utils").inherits(s,i),s.prototype.byteAt=function(r){return this.data[this.zero+r]},s.prototype.lastIndexOfSignature=function(r){for(var c=r.charCodeAt(0),_=r.charCodeAt(1),x=r.charCodeAt(2),y=r.charCodeAt(3),p=this.length-4;0<=p;--p)if(this.data[p]===c&&this.data[p+1]===_&&this.data[p+2]===x&&this.data[p+3]===y)return p-this.zero;return-1},s.prototype.readAndCheckSignature=function(r){var c=r.charCodeAt(0),_=r.charCodeAt(1),x=r.charCodeAt(2),y=r.charCodeAt(3),p=this.readData(4);return c===p[0]&&_===p[1]&&x===p[2]&&y===p[3]},s.prototype.readData=function(r){if(this.checkOffset(r),r===0)return[];var c=this.data.slice(this.zero+this.index,this.zero+this.index+r);return this.index+=r,c},k.exports=s},{"../utils":32,"./DataReader":18}],18:[function(o,k,f){var i=o("../utils");function s(r){this.data=r,this.length=r.length,this.index=0,this.zero=0}s.prototype={checkOffset:function(r){this.checkIndex(this.index+r)},checkIndex:function(r){if(this.length<this.zero+r||r<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+r+"). Corrupted zip ?")},setIndex:function(r){this.checkIndex(r),this.index=r},skip:function(r){this.setIndex(this.index+r)},byteAt:function(){},readInt:function(r){var c,_=0;for(this.checkOffset(r),c=this.index+r-1;c>=this.index;c--)_=(_<<8)+this.byteAt(c);return this.index+=r,_},readString:function(r){return i.transformTo("string",this.readData(r))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var r=this.readInt(4);return new Date(Date.UTC(1980+(r>>25&127),(r>>21&15)-1,r>>16&31,r>>11&31,r>>5&63,(31&r)<<1))}},k.exports=s},{"../utils":32}],19:[function(o,k,f){var i=o("./Uint8ArrayReader");function s(r){i.call(this,r)}o("../utils").inherits(s,i),s.prototype.readData=function(r){this.checkOffset(r);var c=this.data.slice(this.zero+this.index,this.zero+this.index+r);return this.index+=r,c},k.exports=s},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(o,k,f){var i=o("./DataReader");function s(r){i.call(this,r)}o("../utils").inherits(s,i),s.prototype.byteAt=function(r){return this.data.charCodeAt(this.zero+r)},s.prototype.lastIndexOfSignature=function(r){return this.data.lastIndexOf(r)-this.zero},s.prototype.readAndCheckSignature=function(r){return r===this.readData(4)},s.prototype.readData=function(r){this.checkOffset(r);var c=this.data.slice(this.zero+this.index,this.zero+this.index+r);return this.index+=r,c},k.exports=s},{"../utils":32,"./DataReader":18}],21:[function(o,k,f){var i=o("./ArrayReader");function s(r){i.call(this,r)}o("../utils").inherits(s,i),s.prototype.readData=function(r){if(this.checkOffset(r),r===0)return new Uint8Array(0);var c=this.data.subarray(this.zero+this.index,this.zero+this.index+r);return this.index+=r,c},k.exports=s},{"../utils":32,"./ArrayReader":17}],22:[function(o,k,f){var i=o("../utils"),s=o("../support"),r=o("./ArrayReader"),c=o("./StringReader"),_=o("./NodeBufferReader"),x=o("./Uint8ArrayReader");k.exports=function(y){var p=i.getTypeOf(y);return i.checkSupport(p),p!=="string"||s.uint8array?p==="nodebuffer"?new _(y):s.uint8array?new x(i.transformTo("uint8array",y)):new r(i.transformTo("array",y)):new c(y)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(o,k,f){f.LOCAL_FILE_HEADER="PK",f.CENTRAL_FILE_HEADER="PK",f.CENTRAL_DIRECTORY_END="PK",f.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",f.ZIP64_CENTRAL_DIRECTORY_END="PK",f.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(o,k,f){var i=o("./GenericWorker"),s=o("../utils");function r(c){i.call(this,"ConvertWorker to "+c),this.destType=c}s.inherits(r,i),r.prototype.processChunk=function(c){this.push({data:s.transformTo(this.destType,c.data),meta:c.meta})},k.exports=r},{"../utils":32,"./GenericWorker":28}],25:[function(o,k,f){var i=o("./GenericWorker"),s=o("../crc32");function r(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}o("../utils").inherits(r,i),r.prototype.processChunk=function(c){this.streamInfo.crc32=s(c.data,this.streamInfo.crc32||0),this.push(c)},k.exports=r},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(o,k,f){var i=o("../utils"),s=o("./GenericWorker");function r(c){s.call(this,"DataLengthProbe for "+c),this.propName=c,this.withStreamInfo(c,0)}i.inherits(r,s),r.prototype.processChunk=function(c){if(c){var _=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=_+c.data.length}s.prototype.processChunk.call(this,c)},k.exports=r},{"../utils":32,"./GenericWorker":28}],27:[function(o,k,f){var i=o("../utils"),s=o("./GenericWorker");function r(c){s.call(this,"DataWorker");var _=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,c.then(function(x){_.dataIsReady=!0,_.data=x,_.max=x&&x.length||0,_.type=i.getTypeOf(x),_.isPaused||_._tickAndRepeat()},function(x){_.error(x)})}i.inherits(r,s),r.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this.data=null},r.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},r.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},r.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var c=null,_=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":c=this.data.substring(this.index,_);break;case"uint8array":c=this.data.subarray(this.index,_);break;case"array":case"nodebuffer":c=this.data.slice(this.index,_)}return this.index=_,this.push({data:c,meta:{percent:this.max?this.index/this.max*100:0}})},k.exports=r},{"../utils":32,"./GenericWorker":28}],28:[function(o,k,f){function i(s){this.name=s||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(s){this.emit("data",s)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(s){this.emit("error",s)}return!0},error:function(s){return!this.isFinished&&(this.isPaused?this.generatedError=s:(this.isFinished=!0,this.emit("error",s),this.previous&&this.previous.error(s),this.cleanUp()),!0)},on:function(s,r){return this._listeners[s].push(r),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(s,r){if(this._listeners[s])for(var c=0;c<this._listeners[s].length;c++)this._listeners[s][c].call(this,r)},pipe:function(s){return s.registerPrevious(this)},registerPrevious:function(s){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=s.streamInfo,this.mergeStreamInfo(),this.previous=s;var r=this;return s.on("data",function(c){r.processChunk(c)}),s.on("end",function(){r.end()}),s.on("error",function(c){r.error(c)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var s=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),s=!0),this.previous&&this.previous.resume(),!s},flush:function(){},processChunk:function(s){this.push(s)},withStreamInfo:function(s,r){return this.extraStreamInfo[s]=r,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var s in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,s)&&(this.streamInfo[s]=this.extraStreamInfo[s])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var s="Worker "+this.name;return this.previous?this.previous+" -> "+s:s}},k.exports=i},{}],29:[function(o,k,f){var i=o("../utils"),s=o("./ConvertWorker"),r=o("./GenericWorker"),c=o("../base64"),_=o("../support"),x=o("../external"),y=null;if(_.nodestream)try{y=o("../nodejs/NodejsStreamOutputAdapter")}catch{}function p(h,a){return new x.Promise(function(d,l){var g=[],w=h._internalType,E=h._outputType,S=h._mimeType;h.on("data",function(F,v){g.push(F),a&&a(v)}).on("error",function(F){g=[],l(F)}).on("end",function(){try{var F=function(v,D,j){switch(v){case"blob":return i.newBlob(i.transformTo("arraybuffer",D),j);case"base64":return c.encode(D);default:return i.transformTo(v,D)}}(E,function(v,D){var j,U=0,X=null,b=0;for(j=0;j<D.length;j++)b+=D[j].length;switch(v){case"string":return D.join("");case"array":return Array.prototype.concat.apply([],D);case"uint8array":for(X=new Uint8Array(b),j=0;j<D.length;j++)X.set(D[j],U),U+=D[j].length;return X;case"nodebuffer":return Buffer.concat(D);default:throw new Error("concat : unsupported type '"+v+"'")}}(w,g),S);d(F)}catch(v){l(v)}g=[]}).resume()})}function n(h,a,d){var l=a;switch(a){case"blob":case"arraybuffer":l="uint8array";break;case"base64":l="string"}try{this._internalType=l,this._outputType=a,this._mimeType=d,i.checkSupport(l),this._worker=h.pipe(new s(l)),h.lock()}catch(g){this._worker=new r("error"),this._worker.error(g)}}n.prototype={accumulate:function(h){return p(this,h)},on:function(h,a){var d=this;return h==="data"?this._worker.on(h,function(l){a.call(d,l.data,l.meta)}):this._worker.on(h,function(){i.delay(a,arguments,d)}),this},resume:function(){return i.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(h){if(i.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new y(this,{objectMode:this._outputType!=="nodebuffer"},h)}},k.exports=n},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(o,k,f){if(f.base64=!0,f.array=!0,f.string=!0,f.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",f.nodebuffer=typeof Buffer<"u",f.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")f.blob=!1;else{var i=new ArrayBuffer(0);try{f.blob=new Blob([i],{type:"application/zip"}).size===0}catch{try{var s=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);s.append(i),f.blob=s.getBlob("application/zip").size===0}catch{f.blob=!1}}}try{f.nodestream=!!o("readable-stream").Readable}catch{f.nodestream=!1}},{"readable-stream":16}],31:[function(o,k,f){for(var i=o("./utils"),s=o("./support"),r=o("./nodejsUtils"),c=o("./stream/GenericWorker"),_=new Array(256),x=0;x<256;x++)_[x]=252<=x?6:248<=x?5:240<=x?4:224<=x?3:192<=x?2:1;_[254]=_[254]=1;function y(){c.call(this,"utf-8 decode"),this.leftOver=null}function p(){c.call(this,"utf-8 encode")}f.utf8encode=function(n){return s.nodebuffer?r.newBufferFrom(n,"utf-8"):function(h){var a,d,l,g,w,E=h.length,S=0;for(g=0;g<E;g++)(64512&(d=h.charCodeAt(g)))==55296&&g+1<E&&(64512&(l=h.charCodeAt(g+1)))==56320&&(d=65536+(d-55296<<10)+(l-56320),g++),S+=d<128?1:d<2048?2:d<65536?3:4;for(a=s.uint8array?new Uint8Array(S):new Array(S),g=w=0;w<S;g++)(64512&(d=h.charCodeAt(g)))==55296&&g+1<E&&(64512&(l=h.charCodeAt(g+1)))==56320&&(d=65536+(d-55296<<10)+(l-56320),g++),d<128?a[w++]=d:(d<2048?a[w++]=192|d>>>6:(d<65536?a[w++]=224|d>>>12:(a[w++]=240|d>>>18,a[w++]=128|d>>>12&63),a[w++]=128|d>>>6&63),a[w++]=128|63&d);return a}(n)},f.utf8decode=function(n){return s.nodebuffer?i.transformTo("nodebuffer",n).toString("utf-8"):function(h){var a,d,l,g,w=h.length,E=new Array(2*w);for(a=d=0;a<w;)if((l=h[a++])<128)E[d++]=l;else if(4<(g=_[l]))E[d++]=65533,a+=g-1;else{for(l&=g===2?31:g===3?15:7;1<g&&a<w;)l=l<<6|63&h[a++],g--;1<g?E[d++]=65533:l<65536?E[d++]=l:(l-=65536,E[d++]=55296|l>>10&1023,E[d++]=56320|1023&l)}return E.length!==d&&(E.subarray?E=E.subarray(0,d):E.length=d),i.applyFromCharCode(E)}(n=i.transformTo(s.uint8array?"uint8array":"array",n))},i.inherits(y,c),y.prototype.processChunk=function(n){var h=i.transformTo(s.uint8array?"uint8array":"array",n.data);if(this.leftOver&&this.leftOver.length){if(s.uint8array){var a=h;(h=new Uint8Array(a.length+this.leftOver.length)).set(this.leftOver,0),h.set(a,this.leftOver.length)}else h=this.leftOver.concat(h);this.leftOver=null}var d=function(g,w){var E;for((w=w||g.length)>g.length&&(w=g.length),E=w-1;0<=E&&(192&g[E])==128;)E--;return E<0||E===0?w:E+_[g[E]]>w?E:w}(h),l=h;d!==h.length&&(s.uint8array?(l=h.subarray(0,d),this.leftOver=h.subarray(d,h.length)):(l=h.slice(0,d),this.leftOver=h.slice(d,h.length))),this.push({data:f.utf8decode(l),meta:n.meta})},y.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:f.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},f.Utf8DecodeWorker=y,i.inherits(p,c),p.prototype.processChunk=function(n){this.push({data:f.utf8encode(n.data),meta:n.meta})},f.Utf8EncodeWorker=p},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(o,k,f){var i=o("./support"),s=o("./base64"),r=o("./nodejsUtils"),c=o("./external");function _(a){return a}function x(a,d){for(var l=0;l<a.length;++l)d[l]=255&a.charCodeAt(l);return d}o("setimmediate"),f.newBlob=function(a,d){f.checkSupport("blob");try{return new Blob([a],{type:d})}catch{try{var l=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return l.append(a),l.getBlob(d)}catch{throw new Error("Bug : can't construct the Blob.")}}};var y={stringifyByChunk:function(a,d,l){var g=[],w=0,E=a.length;if(E<=l)return String.fromCharCode.apply(null,a);for(;w<E;)d==="array"||d==="nodebuffer"?g.push(String.fromCharCode.apply(null,a.slice(w,Math.min(w+l,E)))):g.push(String.fromCharCode.apply(null,a.subarray(w,Math.min(w+l,E)))),w+=l;return g.join("")},stringifyByChar:function(a){for(var d="",l=0;l<a.length;l++)d+=String.fromCharCode(a[l]);return d},applyCanBeUsed:{uint8array:function(){try{return i.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return i.nodebuffer&&String.fromCharCode.apply(null,r.allocBuffer(1)).length===1}catch{return!1}}()}};function p(a){var d=65536,l=f.getTypeOf(a),g=!0;if(l==="uint8array"?g=y.applyCanBeUsed.uint8array:l==="nodebuffer"&&(g=y.applyCanBeUsed.nodebuffer),g)for(;1<d;)try{return y.stringifyByChunk(a,l,d)}catch{d=Math.floor(d/2)}return y.stringifyByChar(a)}function n(a,d){for(var l=0;l<a.length;l++)d[l]=a[l];return d}f.applyFromCharCode=p;var h={};h.string={string:_,array:function(a){return x(a,new Array(a.length))},arraybuffer:function(a){return h.string.uint8array(a).buffer},uint8array:function(a){return x(a,new Uint8Array(a.length))},nodebuffer:function(a){return x(a,r.allocBuffer(a.length))}},h.array={string:p,array:_,arraybuffer:function(a){return new Uint8Array(a).buffer},uint8array:function(a){return new Uint8Array(a)},nodebuffer:function(a){return r.newBufferFrom(a)}},h.arraybuffer={string:function(a){return p(new Uint8Array(a))},array:function(a){return n(new Uint8Array(a),new Array(a.byteLength))},arraybuffer:_,uint8array:function(a){return new Uint8Array(a)},nodebuffer:function(a){return r.newBufferFrom(new Uint8Array(a))}},h.uint8array={string:p,array:function(a){return n(a,new Array(a.length))},arraybuffer:function(a){return a.buffer},uint8array:_,nodebuffer:function(a){return r.newBufferFrom(a)}},h.nodebuffer={string:p,array:function(a){return n(a,new Array(a.length))},arraybuffer:function(a){return h.nodebuffer.uint8array(a).buffer},uint8array:function(a){return n(a,new Uint8Array(a.length))},nodebuffer:_},f.transformTo=function(a,d){if(d=d||"",!a)return d;f.checkSupport(a);var l=f.getTypeOf(d);return h[l][a](d)},f.resolve=function(a){for(var d=a.split("/"),l=[],g=0;g<d.length;g++){var w=d[g];w==="."||w===""&&g!==0&&g!==d.length-1||(w===".."?l.pop():l.push(w))}return l.join("/")},f.getTypeOf=function(a){return typeof a=="string"?"string":Object.prototype.toString.call(a)==="[object Array]"?"array":i.nodebuffer&&r.isBuffer(a)?"nodebuffer":i.uint8array&&a instanceof Uint8Array?"uint8array":i.arraybuffer&&a instanceof ArrayBuffer?"arraybuffer":void 0},f.checkSupport=function(a){if(!i[a.toLowerCase()])throw new Error(a+" is not supported by this platform")},f.MAX_VALUE_16BITS=65535,f.MAX_VALUE_32BITS=-1,f.pretty=function(a){var d,l,g="";for(l=0;l<(a||"").length;l++)g+="\\x"+((d=a.charCodeAt(l))<16?"0":"")+d.toString(16).toUpperCase();return g},f.delay=function(a,d,l){setImmediate(function(){a.apply(l||null,d||[])})},f.inherits=function(a,d){function l(){}l.prototype=d.prototype,a.prototype=new l},f.extend=function(){var a,d,l={};for(a=0;a<arguments.length;a++)for(d in arguments[a])Object.prototype.hasOwnProperty.call(arguments[a],d)&&l[d]===void 0&&(l[d]=arguments[a][d]);return l},f.prepareContent=function(a,d,l,g,w){return c.Promise.resolve(d).then(function(E){return i.blob&&(E instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(E))!==-1)&&typeof FileReader<"u"?new c.Promise(function(S,F){var v=new FileReader;v.onload=function(D){S(D.target.result)},v.onerror=function(D){F(D.target.error)},v.readAsArrayBuffer(E)}):E}).then(function(E){var S=f.getTypeOf(E);return S?(S==="arraybuffer"?E=f.transformTo("uint8array",E):S==="string"&&(w?E=s.decode(E):l&&g!==!0&&(E=function(F){return x(F,i.uint8array?new Uint8Array(F.length):new Array(F.length))}(E))),E):c.Promise.reject(new Error("Can't read the data of '"+a+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(o,k,f){var i=o("./reader/readerFor"),s=o("./utils"),r=o("./signature"),c=o("./zipEntry"),_=o("./support");function x(y){this.files=[],this.loadOptions=y}x.prototype={checkSignature:function(y){if(!this.reader.readAndCheckSignature(y)){this.reader.index-=4;var p=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+s.pretty(p)+", expected "+s.pretty(y)+")")}},isSignature:function(y,p){var n=this.reader.index;this.reader.setIndex(y);var h=this.reader.readString(4)===p;return this.reader.setIndex(n),h},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var y=this.reader.readData(this.zipCommentLength),p=_.uint8array?"uint8array":"array",n=s.transformTo(p,y);this.zipComment=this.loadOptions.decodeFileName(n)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var y,p,n,h=this.zip64EndOfCentralSize-44;0<h;)y=this.reader.readInt(2),p=this.reader.readInt(4),n=this.reader.readData(p),this.zip64ExtensibleData[y]={id:y,length:p,value:n}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var y,p;for(y=0;y<this.files.length;y++)p=this.files[y],this.reader.setIndex(p.localHeaderOffset),this.checkSignature(r.LOCAL_FILE_HEADER),p.readLocalPart(this.reader),p.handleUTF8(),p.processAttributes()},readCentralDir:function(){var y;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(r.CENTRAL_FILE_HEADER);)(y=new c({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(y);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var y=this.reader.lastIndexOfSignature(r.CENTRAL_DIRECTORY_END);if(y<0)throw this.isSignature(0,r.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(y);var p=y;if(this.checkSignature(r.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===s.MAX_VALUE_16BITS||this.diskWithCentralDirStart===s.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===s.MAX_VALUE_16BITS||this.centralDirRecords===s.MAX_VALUE_16BITS||this.centralDirSize===s.MAX_VALUE_32BITS||this.centralDirOffset===s.MAX_VALUE_32BITS){if(this.zip64=!0,(y=this.reader.lastIndexOfSignature(r.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(y),this.checkSignature(r.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,r.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(r.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(r.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var n=this.centralDirOffset+this.centralDirSize;this.zip64&&(n+=20,n+=12+this.zip64EndOfCentralSize);var h=p-n;if(0<h)this.isSignature(p,r.CENTRAL_FILE_HEADER)||(this.reader.zero=h);else if(h<0)throw new Error("Corrupted zip: missing "+Math.abs(h)+" bytes.")},prepareReader:function(y){this.reader=i(y)},load:function(y){this.prepareReader(y),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},k.exports=x},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(o,k,f){var i=o("./reader/readerFor"),s=o("./utils"),r=o("./compressedObject"),c=o("./crc32"),_=o("./utf8"),x=o("./compressions"),y=o("./support");function p(n,h){this.options=n,this.loadOptions=h}p.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(n){var h,a;if(n.skip(22),this.fileNameLength=n.readInt(2),a=n.readInt(2),this.fileName=n.readData(this.fileNameLength),n.skip(a),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((h=function(d){for(var l in x)if(Object.prototype.hasOwnProperty.call(x,l)&&x[l].magic===d)return x[l];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+s.pretty(this.compressionMethod)+" unknown (inner file : "+s.transformTo("string",this.fileName)+")");this.decompressed=new r(this.compressedSize,this.uncompressedSize,this.crc32,h,n.readData(this.compressedSize))},readCentralPart:function(n){this.versionMadeBy=n.readInt(2),n.skip(2),this.bitFlag=n.readInt(2),this.compressionMethod=n.readString(2),this.date=n.readDate(),this.crc32=n.readInt(4),this.compressedSize=n.readInt(4),this.uncompressedSize=n.readInt(4);var h=n.readInt(2);if(this.extraFieldsLength=n.readInt(2),this.fileCommentLength=n.readInt(2),this.diskNumberStart=n.readInt(2),this.internalFileAttributes=n.readInt(2),this.externalFileAttributes=n.readInt(4),this.localHeaderOffset=n.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");n.skip(h),this.readExtraFields(n),this.parseZIP64ExtraField(n),this.fileComment=n.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var n=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),n==0&&(this.dosPermissions=63&this.externalFileAttributes),n==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var n=i(this.extraFields[1].value);this.uncompressedSize===s.MAX_VALUE_32BITS&&(this.uncompressedSize=n.readInt(8)),this.compressedSize===s.MAX_VALUE_32BITS&&(this.compressedSize=n.readInt(8)),this.localHeaderOffset===s.MAX_VALUE_32BITS&&(this.localHeaderOffset=n.readInt(8)),this.diskNumberStart===s.MAX_VALUE_32BITS&&(this.diskNumberStart=n.readInt(4))}},readExtraFields:function(n){var h,a,d,l=n.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});n.index+4<l;)h=n.readInt(2),a=n.readInt(2),d=n.readData(a),this.extraFields[h]={id:h,length:a,value:d};n.setIndex(l)},handleUTF8:function(){var n=y.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=_.utf8decode(this.fileName),this.fileCommentStr=_.utf8decode(this.fileComment);else{var h=this.findExtraFieldUnicodePath();if(h!==null)this.fileNameStr=h;else{var a=s.transformTo(n,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(a)}var d=this.findExtraFieldUnicodeComment();if(d!==null)this.fileCommentStr=d;else{var l=s.transformTo(n,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(l)}}},findExtraFieldUnicodePath:function(){var n=this.extraFields[28789];if(n){var h=i(n.value);return h.readInt(1)!==1||c(this.fileName)!==h.readInt(4)?null:_.utf8decode(h.readData(n.length-5))}return null},findExtraFieldUnicodeComment:function(){var n=this.extraFields[25461];if(n){var h=i(n.value);return h.readInt(1)!==1||c(this.fileComment)!==h.readInt(4)?null:_.utf8decode(h.readData(n.length-5))}return null}},k.exports=p},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(o,k,f){function i(h,a,d){this.name=h,this.dir=d.dir,this.date=d.date,this.comment=d.comment,this.unixPermissions=d.unixPermissions,this.dosPermissions=d.dosPermissions,this._data=a,this._dataBinary=d.binary,this.options={compression:d.compression,compressionOptions:d.compressionOptions}}var s=o("./stream/StreamHelper"),r=o("./stream/DataWorker"),c=o("./utf8"),_=o("./compressedObject"),x=o("./stream/GenericWorker");i.prototype={internalStream:function(h){var a=null,d="string";try{if(!h)throw new Error("No output type specified.");var l=(d=h.toLowerCase())==="string"||d==="text";d!=="binarystring"&&d!=="text"||(d="string"),a=this._decompressWorker();var g=!this._dataBinary;g&&!l&&(a=a.pipe(new c.Utf8EncodeWorker)),!g&&l&&(a=a.pipe(new c.Utf8DecodeWorker))}catch(w){(a=new x("error")).error(w)}return new s(a,d,"")},async:function(h,a){return this.internalStream(h).accumulate(a)},nodeStream:function(h,a){return this.internalStream(h||"nodebuffer").toNodejsStream(a)},_compressWorker:function(h,a){if(this._data instanceof _&&this._data.compression.magic===h.magic)return this._data.getCompressedWorker();var d=this._decompressWorker();return this._dataBinary||(d=d.pipe(new c.Utf8EncodeWorker)),_.createWorkerFrom(d,h,a)},_decompressWorker:function(){return this._data instanceof _?this._data.getContentWorker():this._data instanceof x?this._data:new r(this._data)}};for(var y=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],p=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},n=0;n<y.length;n++)i.prototype[y[n]]=p;k.exports=i},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(o,k,f){(function(i){var s,r,c=i.MutationObserver||i.WebKitMutationObserver;if(c){var _=0,x=new c(h),y=i.document.createTextNode("");x.observe(y,{characterData:!0}),s=function(){y.data=_=++_%2}}else if(i.setImmediate||i.MessageChannel===void 0)s="document"in i&&"onreadystatechange"in i.document.createElement("script")?function(){var a=i.document.createElement("script");a.onreadystatechange=function(){h(),a.onreadystatechange=null,a.parentNode.removeChild(a),a=null},i.document.documentElement.appendChild(a)}:function(){setTimeout(h,0)};else{var p=new i.MessageChannel;p.port1.onmessage=h,s=function(){p.port2.postMessage(0)}}var n=[];function h(){var a,d;r=!0;for(var l=n.length;l;){for(d=n,n=[],a=-1;++a<l;)d[a]();l=n.length}r=!1}k.exports=function(a){n.push(a)!==1||r||s()}}).call(this,typeof Ge<"u"?Ge:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(o,k,f){var i=o("immediate");function s(){}var r={},c=["REJECTED"],_=["FULFILLED"],x=["PENDING"];function y(l){if(typeof l!="function")throw new TypeError("resolver must be a function");this.state=x,this.queue=[],this.outcome=void 0,l!==s&&a(this,l)}function p(l,g,w){this.promise=l,typeof g=="function"&&(this.onFulfilled=g,this.callFulfilled=this.otherCallFulfilled),typeof w=="function"&&(this.onRejected=w,this.callRejected=this.otherCallRejected)}function n(l,g,w){i(function(){var E;try{E=g(w)}catch(S){return r.reject(l,S)}E===l?r.reject(l,new TypeError("Cannot resolve promise with itself")):r.resolve(l,E)})}function h(l){var g=l&&l.then;if(l&&(typeof l=="object"||typeof l=="function")&&typeof g=="function")return function(){g.apply(l,arguments)}}function a(l,g){var w=!1;function E(v){w||(w=!0,r.reject(l,v))}function S(v){w||(w=!0,r.resolve(l,v))}var F=d(function(){g(S,E)});F.status==="error"&&E(F.value)}function d(l,g){var w={};try{w.value=l(g),w.status="success"}catch(E){w.status="error",w.value=E}return w}(k.exports=y).prototype.finally=function(l){if(typeof l!="function")return this;var g=this.constructor;return this.then(function(w){return g.resolve(l()).then(function(){return w})},function(w){return g.resolve(l()).then(function(){throw w})})},y.prototype.catch=function(l){return this.then(null,l)},y.prototype.then=function(l,g){if(typeof l!="function"&&this.state===_||typeof g!="function"&&this.state===c)return this;var w=new this.constructor(s);return this.state!==x?n(w,this.state===_?l:g,this.outcome):this.queue.push(new p(w,l,g)),w},p.prototype.callFulfilled=function(l){r.resolve(this.promise,l)},p.prototype.otherCallFulfilled=function(l){n(this.promise,this.onFulfilled,l)},p.prototype.callRejected=function(l){r.reject(this.promise,l)},p.prototype.otherCallRejected=function(l){n(this.promise,this.onRejected,l)},r.resolve=function(l,g){var w=d(h,g);if(w.status==="error")return r.reject(l,w.value);var E=w.value;if(E)a(l,E);else{l.state=_,l.outcome=g;for(var S=-1,F=l.queue.length;++S<F;)l.queue[S].callFulfilled(g)}return l},r.reject=function(l,g){l.state=c,l.outcome=g;for(var w=-1,E=l.queue.length;++w<E;)l.queue[w].callRejected(g);return l},y.resolve=function(l){return l instanceof this?l:r.resolve(new this(s),l)},y.reject=function(l){var g=new this(s);return r.reject(g,l)},y.all=function(l){var g=this;if(Object.prototype.toString.call(l)!=="[object Array]")return this.reject(new TypeError("must be an array"));var w=l.length,E=!1;if(!w)return this.resolve([]);for(var S=new Array(w),F=0,v=-1,D=new this(s);++v<w;)j(l[v],v);return D;function j(U,X){g.resolve(U).then(function(b){S[X]=b,++F!==w||E||(E=!0,r.resolve(D,S))},function(b){E||(E=!0,r.reject(D,b))})}},y.race=function(l){var g=this;if(Object.prototype.toString.call(l)!=="[object Array]")return this.reject(new TypeError("must be an array"));var w=l.length,E=!1;if(!w)return this.resolve([]);for(var S=-1,F=new this(s);++S<w;)v=l[S],g.resolve(v).then(function(D){E||(E=!0,r.resolve(F,D))},function(D){E||(E=!0,r.reject(F,D))});var v;return F}},{immediate:36}],38:[function(o,k,f){var i={};(0,o("./lib/utils/common").assign)(i,o("./lib/deflate"),o("./lib/inflate"),o("./lib/zlib/constants")),k.exports=i},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(o,k,f){var i=o("./zlib/deflate"),s=o("./utils/common"),r=o("./utils/strings"),c=o("./zlib/messages"),_=o("./zlib/zstream"),x=Object.prototype.toString,y=0,p=-1,n=0,h=8;function a(l){if(!(this instanceof a))return new a(l);this.options=s.assign({level:p,method:h,chunkSize:16384,windowBits:15,memLevel:8,strategy:n,to:""},l||{});var g=this.options;g.raw&&0<g.windowBits?g.windowBits=-g.windowBits:g.gzip&&0<g.windowBits&&g.windowBits<16&&(g.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new _,this.strm.avail_out=0;var w=i.deflateInit2(this.strm,g.level,g.method,g.windowBits,g.memLevel,g.strategy);if(w!==y)throw new Error(c[w]);if(g.header&&i.deflateSetHeader(this.strm,g.header),g.dictionary){var E;if(E=typeof g.dictionary=="string"?r.string2buf(g.dictionary):x.call(g.dictionary)==="[object ArrayBuffer]"?new Uint8Array(g.dictionary):g.dictionary,(w=i.deflateSetDictionary(this.strm,E))!==y)throw new Error(c[w]);this._dict_set=!0}}function d(l,g){var w=new a(g);if(w.push(l,!0),w.err)throw w.msg||c[w.err];return w.result}a.prototype.push=function(l,g){var w,E,S=this.strm,F=this.options.chunkSize;if(this.ended)return!1;E=g===~~g?g:g===!0?4:0,typeof l=="string"?S.input=r.string2buf(l):x.call(l)==="[object ArrayBuffer]"?S.input=new Uint8Array(l):S.input=l,S.next_in=0,S.avail_in=S.input.length;do{if(S.avail_out===0&&(S.output=new s.Buf8(F),S.next_out=0,S.avail_out=F),(w=i.deflate(S,E))!==1&&w!==y)return this.onEnd(w),!(this.ended=!0);S.avail_out!==0&&(S.avail_in!==0||E!==4&&E!==2)||(this.options.to==="string"?this.onData(r.buf2binstring(s.shrinkBuf(S.output,S.next_out))):this.onData(s.shrinkBuf(S.output,S.next_out)))}while((0<S.avail_in||S.avail_out===0)&&w!==1);return E===4?(w=i.deflateEnd(this.strm),this.onEnd(w),this.ended=!0,w===y):E!==2||(this.onEnd(y),!(S.avail_out=0))},a.prototype.onData=function(l){this.chunks.push(l)},a.prototype.onEnd=function(l){l===y&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=l,this.msg=this.strm.msg},f.Deflate=a,f.deflate=d,f.deflateRaw=function(l,g){return(g=g||{}).raw=!0,d(l,g)},f.gzip=function(l,g){return(g=g||{}).gzip=!0,d(l,g)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(o,k,f){var i=o("./zlib/inflate"),s=o("./utils/common"),r=o("./utils/strings"),c=o("./zlib/constants"),_=o("./zlib/messages"),x=o("./zlib/zstream"),y=o("./zlib/gzheader"),p=Object.prototype.toString;function n(a){if(!(this instanceof n))return new n(a);this.options=s.assign({chunkSize:16384,windowBits:0,to:""},a||{});var d=this.options;d.raw&&0<=d.windowBits&&d.windowBits<16&&(d.windowBits=-d.windowBits,d.windowBits===0&&(d.windowBits=-15)),!(0<=d.windowBits&&d.windowBits<16)||a&&a.windowBits||(d.windowBits+=32),15<d.windowBits&&d.windowBits<48&&(15&d.windowBits)==0&&(d.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new x,this.strm.avail_out=0;var l=i.inflateInit2(this.strm,d.windowBits);if(l!==c.Z_OK)throw new Error(_[l]);this.header=new y,i.inflateGetHeader(this.strm,this.header)}function h(a,d){var l=new n(d);if(l.push(a,!0),l.err)throw l.msg||_[l.err];return l.result}n.prototype.push=function(a,d){var l,g,w,E,S,F,v=this.strm,D=this.options.chunkSize,j=this.options.dictionary,U=!1;if(this.ended)return!1;g=d===~~d?d:d===!0?c.Z_FINISH:c.Z_NO_FLUSH,typeof a=="string"?v.input=r.binstring2buf(a):p.call(a)==="[object ArrayBuffer]"?v.input=new Uint8Array(a):v.input=a,v.next_in=0,v.avail_in=v.input.length;do{if(v.avail_out===0&&(v.output=new s.Buf8(D),v.next_out=0,v.avail_out=D),(l=i.inflate(v,c.Z_NO_FLUSH))===c.Z_NEED_DICT&&j&&(F=typeof j=="string"?r.string2buf(j):p.call(j)==="[object ArrayBuffer]"?new Uint8Array(j):j,l=i.inflateSetDictionary(this.strm,F)),l===c.Z_BUF_ERROR&&U===!0&&(l=c.Z_OK,U=!1),l!==c.Z_STREAM_END&&l!==c.Z_OK)return this.onEnd(l),!(this.ended=!0);v.next_out&&(v.avail_out!==0&&l!==c.Z_STREAM_END&&(v.avail_in!==0||g!==c.Z_FINISH&&g!==c.Z_SYNC_FLUSH)||(this.options.to==="string"?(w=r.utf8border(v.output,v.next_out),E=v.next_out-w,S=r.buf2string(v.output,w),v.next_out=E,v.avail_out=D-E,E&&s.arraySet(v.output,v.output,w,E,0),this.onData(S)):this.onData(s.shrinkBuf(v.output,v.next_out)))),v.avail_in===0&&v.avail_out===0&&(U=!0)}while((0<v.avail_in||v.avail_out===0)&&l!==c.Z_STREAM_END);return l===c.Z_STREAM_END&&(g=c.Z_FINISH),g===c.Z_FINISH?(l=i.inflateEnd(this.strm),this.onEnd(l),this.ended=!0,l===c.Z_OK):g!==c.Z_SYNC_FLUSH||(this.onEnd(c.Z_OK),!(v.avail_out=0))},n.prototype.onData=function(a){this.chunks.push(a)},n.prototype.onEnd=function(a){a===c.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=a,this.msg=this.strm.msg},f.Inflate=n,f.inflate=h,f.inflateRaw=function(a,d){return(d=d||{}).raw=!0,h(a,d)},f.ungzip=h},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(o,k,f){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";f.assign=function(c){for(var _=Array.prototype.slice.call(arguments,1);_.length;){var x=_.shift();if(x){if(typeof x!="object")throw new TypeError(x+"must be non-object");for(var y in x)x.hasOwnProperty(y)&&(c[y]=x[y])}}return c},f.shrinkBuf=function(c,_){return c.length===_?c:c.subarray?c.subarray(0,_):(c.length=_,c)};var s={arraySet:function(c,_,x,y,p){if(_.subarray&&c.subarray)c.set(_.subarray(x,x+y),p);else for(var n=0;n<y;n++)c[p+n]=_[x+n]},flattenChunks:function(c){var _,x,y,p,n,h;for(_=y=0,x=c.length;_<x;_++)y+=c[_].length;for(h=new Uint8Array(y),_=p=0,x=c.length;_<x;_++)n=c[_],h.set(n,p),p+=n.length;return h}},r={arraySet:function(c,_,x,y,p){for(var n=0;n<y;n++)c[p+n]=_[x+n]},flattenChunks:function(c){return[].concat.apply([],c)}};f.setTyped=function(c){c?(f.Buf8=Uint8Array,f.Buf16=Uint16Array,f.Buf32=Int32Array,f.assign(f,s)):(f.Buf8=Array,f.Buf16=Array,f.Buf32=Array,f.assign(f,r))},f.setTyped(i)},{}],42:[function(o,k,f){var i=o("./common"),s=!0,r=!0;try{String.fromCharCode.apply(null,[0])}catch{s=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{r=!1}for(var c=new i.Buf8(256),_=0;_<256;_++)c[_]=252<=_?6:248<=_?5:240<=_?4:224<=_?3:192<=_?2:1;function x(y,p){if(p<65537&&(y.subarray&&r||!y.subarray&&s))return String.fromCharCode.apply(null,i.shrinkBuf(y,p));for(var n="",h=0;h<p;h++)n+=String.fromCharCode(y[h]);return n}c[254]=c[254]=1,f.string2buf=function(y){var p,n,h,a,d,l=y.length,g=0;for(a=0;a<l;a++)(64512&(n=y.charCodeAt(a)))==55296&&a+1<l&&(64512&(h=y.charCodeAt(a+1)))==56320&&(n=65536+(n-55296<<10)+(h-56320),a++),g+=n<128?1:n<2048?2:n<65536?3:4;for(p=new i.Buf8(g),a=d=0;d<g;a++)(64512&(n=y.charCodeAt(a)))==55296&&a+1<l&&(64512&(h=y.charCodeAt(a+1)))==56320&&(n=65536+(n-55296<<10)+(h-56320),a++),n<128?p[d++]=n:(n<2048?p[d++]=192|n>>>6:(n<65536?p[d++]=224|n>>>12:(p[d++]=240|n>>>18,p[d++]=128|n>>>12&63),p[d++]=128|n>>>6&63),p[d++]=128|63&n);return p},f.buf2binstring=function(y){return x(y,y.length)},f.binstring2buf=function(y){for(var p=new i.Buf8(y.length),n=0,h=p.length;n<h;n++)p[n]=y.charCodeAt(n);return p},f.buf2string=function(y,p){var n,h,a,d,l=p||y.length,g=new Array(2*l);for(n=h=0;n<l;)if((a=y[n++])<128)g[h++]=a;else if(4<(d=c[a]))g[h++]=65533,n+=d-1;else{for(a&=d===2?31:d===3?15:7;1<d&&n<l;)a=a<<6|63&y[n++],d--;1<d?g[h++]=65533:a<65536?g[h++]=a:(a-=65536,g[h++]=55296|a>>10&1023,g[h++]=56320|1023&a)}return x(g,h)},f.utf8border=function(y,p){var n;for((p=p||y.length)>y.length&&(p=y.length),n=p-1;0<=n&&(192&y[n])==128;)n--;return n<0||n===0?p:n+c[y[n]]>p?n:p}},{"./common":41}],43:[function(o,k,f){k.exports=function(i,s,r,c){for(var _=65535&i|0,x=i>>>16&65535|0,y=0;r!==0;){for(r-=y=2e3<r?2e3:r;x=x+(_=_+s[c++]|0)|0,--y;);_%=65521,x%=65521}return _|x<<16|0}},{}],44:[function(o,k,f){k.exports={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_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}},{}],45:[function(o,k,f){var i=function(){for(var s,r=[],c=0;c<256;c++){s=c;for(var _=0;_<8;_++)s=1&s?3988292384^s>>>1:s>>>1;r[c]=s}return r}();k.exports=function(s,r,c,_){var x=i,y=_+c;s^=-1;for(var p=_;p<y;p++)s=s>>>8^x[255&(s^r[p])];return-1^s}},{}],46:[function(o,k,f){var i,s=o("../utils/common"),r=o("./trees"),c=o("./adler32"),_=o("./crc32"),x=o("./messages"),y=0,p=4,n=0,h=-2,a=-1,d=4,l=2,g=8,w=9,E=286,S=30,F=19,v=2*E+1,D=15,j=3,U=258,X=U+j+1,b=42,B=113,t=1,M=2,te=3,W=4;function Y(e,P){return e.msg=x[P],P}function O(e){return(e<<1)-(4<e?9:0)}function K(e){for(var P=e.length;0<=--P;)e[P]=0}function A(e){var P=e.state,R=P.pending;R>e.avail_out&&(R=e.avail_out),R!==0&&(s.arraySet(e.output,P.pending_buf,P.pending_out,R,e.next_out),e.next_out+=R,P.pending_out+=R,e.total_out+=R,e.avail_out-=R,P.pending-=R,P.pending===0&&(P.pending_out=0))}function I(e,P){r._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,P),e.block_start=e.strstart,A(e.strm)}function ee(e,P){e.pending_buf[e.pending++]=P}function J(e,P){e.pending_buf[e.pending++]=P>>>8&255,e.pending_buf[e.pending++]=255&P}function q(e,P){var R,m,u=e.max_chain_length,N=e.strstart,Z=e.prev_length,H=e.nice_match,T=e.strstart>e.w_size-X?e.strstart-(e.w_size-X):0,V=e.window,Q=e.w_mask,G=e.prev,re=e.strstart+U,oe=V[N+Z-1],ie=V[N+Z];e.prev_length>=e.good_match&&(u>>=2),H>e.lookahead&&(H=e.lookahead);do if(V[(R=P)+Z]===ie&&V[R+Z-1]===oe&&V[R]===V[N]&&V[++R]===V[N+1]){N+=2,R++;do;while(V[++N]===V[++R]&&V[++N]===V[++R]&&V[++N]===V[++R]&&V[++N]===V[++R]&&V[++N]===V[++R]&&V[++N]===V[++R]&&V[++N]===V[++R]&&V[++N]===V[++R]&&N<re);if(m=U-(re-N),N=re-U,Z<m){if(e.match_start=P,H<=(Z=m))break;oe=V[N+Z-1],ie=V[N+Z]}}while((P=G[P&Q])>T&&--u!=0);return Z<=e.lookahead?Z:e.lookahead}function se(e){var P,R,m,u,N,Z,H,T,V,Q,G=e.w_size;do{if(u=e.window_size-e.lookahead-e.strstart,e.strstart>=G+(G-X)){for(s.arraySet(e.window,e.window,G,G,0),e.match_start-=G,e.strstart-=G,e.block_start-=G,P=R=e.hash_size;m=e.head[--P],e.head[P]=G<=m?m-G:0,--R;);for(P=R=G;m=e.prev[--P],e.prev[P]=G<=m?m-G:0,--R;);u+=G}if(e.strm.avail_in===0)break;if(Z=e.strm,H=e.window,T=e.strstart+e.lookahead,V=u,Q=void 0,Q=Z.avail_in,V<Q&&(Q=V),R=Q===0?0:(Z.avail_in-=Q,s.arraySet(H,Z.input,Z.next_in,Q,T),Z.state.wrap===1?Z.adler=c(Z.adler,H,Q,T):Z.state.wrap===2&&(Z.adler=_(Z.adler,H,Q,T)),Z.next_in+=Q,Z.total_in+=Q,Q),e.lookahead+=R,e.lookahead+e.insert>=j)for(N=e.strstart-e.insert,e.ins_h=e.window[N],e.ins_h=(e.ins_h<<e.hash_shift^e.window[N+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[N+j-1])&e.hash_mask,e.prev[N&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=N,N++,e.insert--,!(e.lookahead+e.insert<j)););}while(e.lookahead<X&&e.strm.avail_in!==0)}function he(e,P){for(var R,m;;){if(e.lookahead<X){if(se(e),e.lookahead<X&&P===y)return t;if(e.lookahead===0)break}if(R=0,e.lookahead>=j&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+j-1])&e.hash_mask,R=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),R!==0&&e.strstart-R<=e.w_size-X&&(e.match_length=q(e,R)),e.match_length>=j)if(m=r._tr_tally(e,e.strstart-e.match_start,e.match_length-j),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=j){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+j-1])&e.hash_mask,R=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart,--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=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else m=r._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(m&&(I(e,!1),e.strm.avail_out===0))return t}return e.insert=e.strstart<j-1?e.strstart:j-1,P===p?(I(e,!0),e.strm.avail_out===0?te:W):e.last_lit&&(I(e,!1),e.strm.avail_out===0)?t:M}function ne(e,P){for(var R,m,u;;){if(e.lookahead<X){if(se(e),e.lookahead<X&&P===y)return t;if(e.lookahead===0)break}if(R=0,e.lookahead>=j&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+j-1])&e.hash_mask,R=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=j-1,R!==0&&e.prev_length<e.max_lazy_match&&e.strstart-R<=e.w_size-X&&(e.match_length=q(e,R),e.match_length<=5&&(e.strategy===1||e.match_length===j&&4096<e.strstart-e.match_start)&&(e.match_length=j-1)),e.prev_length>=j&&e.match_length<=e.prev_length){for(u=e.strstart+e.lookahead-j,m=r._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-j),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=u&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+j-1])&e.hash_mask,R=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),--e.prev_length!=0;);if(e.match_available=0,e.match_length=j-1,e.strstart++,m&&(I(e,!1),e.strm.avail_out===0))return t}else if(e.match_available){if((m=r._tr_tally(e,0,e.window[e.strstart-1]))&&I(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return t}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(m=r._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<j-1?e.strstart:j-1,P===p?(I(e,!0),e.strm.avail_out===0?te:W):e.last_lit&&(I(e,!1),e.strm.avail_out===0)?t:M}function ae(e,P,R,m,u){this.good_length=e,this.max_lazy=P,this.nice_length=R,this.max_chain=m,this.func=u}function fe(){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=g,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 s.Buf16(2*v),this.dyn_dtree=new s.Buf16(2*(2*S+1)),this.bl_tree=new s.Buf16(2*(2*F+1)),K(this.dyn_ltree),K(this.dyn_dtree),K(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new s.Buf16(D+1),this.heap=new s.Buf16(2*E+1),K(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new s.Buf16(2*E+1),K(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function ce(e){var P;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=l,(P=e.state).pending=0,P.pending_out=0,P.wrap<0&&(P.wrap=-P.wrap),P.status=P.wrap?b:B,e.adler=P.wrap===2?0:1,P.last_flush=y,r._tr_init(P),n):Y(e,h)}function ye(e){var P=ce(e);return P===n&&function(R){R.window_size=2*R.w_size,K(R.head),R.max_lazy_match=i[R.level].max_lazy,R.good_match=i[R.level].good_length,R.nice_match=i[R.level].nice_length,R.max_chain_length=i[R.level].max_chain,R.strstart=0,R.block_start=0,R.lookahead=0,R.insert=0,R.match_length=R.prev_length=j-1,R.match_available=0,R.ins_h=0}(e.state),P}function ge(e,P,R,m,u,N){if(!e)return h;var Z=1;if(P===a&&(P=6),m<0?(Z=0,m=-m):15<m&&(Z=2,m-=16),u<1||w<u||R!==g||m<8||15<m||P<0||9<P||N<0||d<N)return Y(e,h);m===8&&(m=9);var H=new fe;return(e.state=H).strm=e,H.wrap=Z,H.gzhead=null,H.w_bits=m,H.w_size=1<<H.w_bits,H.w_mask=H.w_size-1,H.hash_bits=u+7,H.hash_size=1<<H.hash_bits,H.hash_mask=H.hash_size-1,H.hash_shift=~~((H.hash_bits+j-1)/j),H.window=new s.Buf8(2*H.w_size),H.head=new s.Buf16(H.hash_size),H.prev=new s.Buf16(H.w_size),H.lit_bufsize=1<<u+6,H.pending_buf_size=4*H.lit_bufsize,H.pending_buf=new s.Buf8(H.pending_buf_size),H.d_buf=1*H.lit_bufsize,H.l_buf=3*H.lit_bufsize,H.level=P,H.strategy=N,H.method=R,ye(e)}i=[new ae(0,0,0,0,function(e,P){var R=65535;for(R>e.pending_buf_size-5&&(R=e.pending_buf_size-5);;){if(e.lookahead<=1){if(se(e),e.lookahead===0&&P===y)return t;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var m=e.block_start+R;if((e.strstart===0||e.strstart>=m)&&(e.lookahead=e.strstart-m,e.strstart=m,I(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-X&&(I(e,!1),e.strm.avail_out===0))return t}return e.insert=0,P===p?(I(e,!0),e.strm.avail_out===0?te:W):(e.strstart>e.block_start&&(I(e,!1),e.strm.avail_out),t)}),new ae(4,4,8,4,he),new ae(4,5,16,8,he),new ae(4,6,32,32,he),new ae(4,4,16,16,ne),new ae(8,16,32,32,ne),new ae(8,16,128,128,ne),new ae(8,32,128,256,ne),new ae(32,128,258,1024,ne),new ae(32,258,258,4096,ne)],f.deflateInit=function(e,P){return ge(e,P,g,15,8,0)},f.deflateInit2=ge,f.deflateReset=ye,f.deflateResetKeep=ce,f.deflateSetHeader=function(e,P){return e&&e.state?e.state.wrap!==2?h:(e.state.gzhead=P,n):h},f.deflate=function(e,P){var R,m,u,N;if(!e||!e.state||5<P||P<0)return e?Y(e,h):h;if(m=e.state,!e.output||!e.input&&e.avail_in!==0||m.status===666&&P!==p)return Y(e,e.avail_out===0?-5:h);if(m.strm=e,R=m.last_flush,m.last_flush=P,m.status===b)if(m.wrap===2)e.adler=0,ee(m,31),ee(m,139),ee(m,8),m.gzhead?(ee(m,(m.gzhead.text?1:0)+(m.gzhead.hcrc?2:0)+(m.gzhead.extra?4:0)+(m.gzhead.name?8:0)+(m.gzhead.comment?16:0)),ee(m,255&m.gzhead.time),ee(m,m.gzhead.time>>8&255),ee(m,m.gzhead.time>>16&255),ee(m,m.gzhead.time>>24&255),ee(m,m.level===9?2:2<=m.strategy||m.level<2?4:0),ee(m,255&m.gzhead.os),m.gzhead.extra&&m.gzhead.extra.length&&(ee(m,255&m.gzhead.extra.length),ee(m,m.gzhead.extra.length>>8&255)),m.gzhead.hcrc&&(e.adler=_(e.adler,m.pending_buf,m.pending,0)),m.gzindex=0,m.status=69):(ee(m,0),ee(m,0),ee(m,0),ee(m,0),ee(m,0),ee(m,m.level===9?2:2<=m.strategy||m.level<2?4:0),ee(m,3),m.status=B);else{var Z=g+(m.w_bits-8<<4)<<8;Z|=(2<=m.strategy||m.level<2?0:m.level<6?1:m.level===6?2:3)<<6,m.strstart!==0&&(Z|=32),Z+=31-Z%31,m.status=B,J(m,Z),m.strstart!==0&&(J(m,e.adler>>>16),J(m,65535&e.adler)),e.adler=1}if(m.status===69)if(m.gzhead.extra){for(u=m.pending;m.gzindex<(65535&m.gzhead.extra.length)&&(m.pending!==m.pending_buf_size||(m.gzhead.hcrc&&m.pending>u&&(e.adler=_(e.adler,m.pending_buf,m.pending-u,u)),A(e),u=m.pending,m.pending!==m.pending_buf_size));)ee(m,255&m.gzhead.extra[m.gzindex]),m.gzindex++;m.gzhead.hcrc&&m.pending>u&&(e.adler=_(e.adler,m.pending_buf,m.pending-u,u)),m.gzindex===m.gzhead.extra.length&&(m.gzindex=0,m.status=73)}else m.status=73;if(m.status===73)if(m.gzhead.name){u=m.pending;do{if(m.pending===m.pending_buf_size&&(m.gzhead.hcrc&&m.pending>u&&(e.adler=_(e.adler,m.pending_buf,m.pending-u,u)),A(e),u=m.pending,m.pending===m.pending_buf_size)){N=1;break}N=m.gzindex<m.gzhead.name.length?255&m.gzhead.name.charCodeAt(m.gzindex++):0,ee(m,N)}while(N!==0);m.gzhead.hcrc&&m.pending>u&&(e.adler=_(e.adler,m.pending_buf,m.pending-u,u)),N===0&&(m.gzindex=0,m.status=91)}else m.status=91;if(m.status===91)if(m.gzhead.comment){u=m.pending;do{if(m.pending===m.pending_buf_size&&(m.gzhead.hcrc&&m.pending>u&&(e.adler=_(e.adler,m.pending_buf,m.pending-u,u)),A(e),u=m.pending,m.pending===m.pending_buf_size)){N=1;break}N=m.gzindex<m.gzhead.comment.length?255&m.gzhead.comment.charCodeAt(m.gzindex++):0,ee(m,N)}while(N!==0);m.gzhead.hcrc&&m.pending>u&&(e.adler=_(e.adler,m.pending_buf,m.pending-u,u)),N===0&&(m.status=103)}else m.status=103;if(m.status===103&&(m.gzhead.hcrc?(m.pending+2>m.pending_buf_size&&A(e),m.pending+2<=m.pending_buf_size&&(ee(m,255&e.adler),ee(m,e.adler>>8&255),e.adler=0,m.status=B)):m.status=B),m.pending!==0){if(A(e),e.avail_out===0)return m.last_flush=-1,n}else if(e.avail_in===0&&O(P)<=O(R)&&P!==p)return Y(e,-5);if(m.status===666&&e.avail_in!==0)return Y(e,-5);if(e.avail_in!==0||m.lookahead!==0||P!==y&&m.status!==666){var H=m.strategy===2?function(T,V){for(var Q;;){if(T.lookahead===0&&(se(T),T.lookahead===0)){if(V===y)return t;break}if(T.match_length=0,Q=r._tr_tally(T,0,T.window[T.strstart]),T.lookahead--,T.strstart++,Q&&(I(T,!1),T.strm.avail_out===0))return t}return T.insert=0,V===p?(I(T,!0),T.strm.avail_out===0?te:W):T.last_lit&&(I(T,!1),T.strm.avail_out===0)?t:M}(m,P):m.strategy===3?function(T,V){for(var Q,G,re,oe,ie=T.window;;){if(T.lookahead<=U){if(se(T),T.lookahead<=U&&V===y)return t;if(T.lookahead===0)break}if(T.match_length=0,T.lookahead>=j&&0<T.strstart&&(G=ie[re=T.strstart-1])===ie[++re]&&G===ie[++re]&&G===ie[++re]){oe=T.strstart+U;do;while(G===ie[++re]&&G===ie[++re]&&G===ie[++re]&&G===ie[++re]&&G===ie[++re]&&G===ie[++re]&&G===ie[++re]&&G===ie[++re]&&re<oe);T.match_length=U-(oe-re),T.match_length>T.lookahead&&(T.match_length=T.lookahead)}if(T.match_length>=j?(Q=r._tr_tally(T,1,T.match_length-j),T.lookahead-=T.match_length,T.strstart+=T.match_length,T.match_length=0):(Q=r._tr_tally(T,0,T.window[T.strstart]),T.lookahead--,T.strstart++),Q&&(I(T,!1),T.strm.avail_out===0))return t}return T.insert=0,V===p?(I(T,!0),T.strm.avail_out===0?te:W):T.last_lit&&(I(T,!1),T.strm.avail_out===0)?t:M}(m,P):i[m.level].func(m,P);if(H!==te&&H!==W||(m.status=666),H===t||H===te)return e.avail_out===0&&(m.last_flush=-1),n;if(H===M&&(P===1?r._tr_align(m):P!==5&&(r._tr_stored_block(m,0,0,!1),P===3&&(K(m.head),m.lookahead===0&&(m.strstart=0,m.block_start=0,m.insert=0))),A(e),e.avail_out===0))return m.last_flush=-1,n}return P!==p?n:m.wrap<=0?1:(m.wrap===2?(ee(m,255&e.adler),ee(m,e.adler>>8&255),ee(m,e.adler>>16&255),ee(m,e.adler>>24&255),ee(m,255&e.total_in),ee(m,e.total_in>>8&255),ee(m,e.total_in>>16&255),ee(m,e.total_in>>24&255)):(J(m,e.adler>>>16),J(m,65535&e.adler)),A(e),0<m.wrap&&(m.wrap=-m.wrap),m.pending!==0?n:1)},f.deflateEnd=function(e){var P;return e&&e.state?(P=e.state.status)!==b&&P!==69&&P!==73&&P!==91&&P!==103&&P!==B&&P!==666?Y(e,h):(e.state=null,P===B?Y(e,-3):n):h},f.deflateSetDictionary=function(e,P){var R,m,u,N,Z,H,T,V,Q=P.length;if(!e||!e.state||(N=(R=e.state).wrap)===2||N===1&&R.status!==b||R.lookahead)return h;for(N===1&&(e.adler=c(e.adler,P,Q,0)),R.wrap=0,Q>=R.w_size&&(N===0&&(K(R.head),R.strstart=0,R.block_start=0,R.insert=0),V=new s.Buf8(R.w_size),s.arraySet(V,P,Q-R.w_size,R.w_size,0),P=V,Q=R.w_size),Z=e.avail_in,H=e.next_in,T=e.input,e.avail_in=Q,e.next_in=0,e.input=P,se(R);R.lookahead>=j;){for(m=R.strstart,u=R.lookahead-(j-1);R.ins_h=(R.ins_h<<R.hash_shift^R.window[m+j-1])&R.hash_mask,R.prev[m&R.w_mask]=R.head[R.ins_h],R.head[R.ins_h]=m,m++,--u;);R.strstart=m,R.lookahead=j-1,se(R)}return R.strstart+=R.lookahead,R.block_start=R.strstart,R.insert=R.lookahead,R.lookahead=0,R.match_length=R.prev_length=j-1,R.match_available=0,e.next_in=H,e.input=T,e.avail_in=Z,R.wrap=N,n},f.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(o,k,f){k.exports=function(){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}},{}],48:[function(o,k,f){k.exports=function(i,s){var r,c,_,x,y,p,n,h,a,d,l,g,w,E,S,F,v,D,j,U,X,b,B,t,M;r=i.state,c=i.next_in,t=i.input,_=c+(i.avail_in-5),x=i.next_out,M=i.output,y=x-(s-i.avail_out),p=x+(i.avail_out-257),n=r.dmax,h=r.wsize,a=r.whave,d=r.wnext,l=r.window,g=r.hold,w=r.bits,E=r.lencode,S=r.distcode,F=(1<<r.lenbits)-1,v=(1<<r.distbits)-1;e:do{w<15&&(g+=t[c++]<<w,w+=8,g+=t[c++]<<w,w+=8),D=E[g&F];t:for(;;){if(g>>>=j=D>>>24,w-=j,(j=D>>>16&255)===0)M[x++]=65535&D;else{if(!(16&j)){if((64&j)==0){D=E[(65535&D)+(g&(1<<j)-1)];continue t}if(32&j){r.mode=12;break e}i.msg="invalid literal/length code",r.mode=30;break e}U=65535&D,(j&=15)&&(w<j&&(g+=t[c++]<<w,w+=8),U+=g&(1<<j)-1,g>>>=j,w-=j),w<15&&(g+=t[c++]<<w,w+=8,g+=t[c++]<<w,w+=8),D=S[g&v];r:for(;;){if(g>>>=j=D>>>24,w-=j,!(16&(j=D>>>16&255))){if((64&j)==0){D=S[(65535&D)+(g&(1<<j)-1)];continue r}i.msg="invalid distance code",r.mode=30;break e}if(X=65535&D,w<(j&=15)&&(g+=t[c++]<<w,(w+=8)<j&&(g+=t[c++]<<w,w+=8)),n<(X+=g&(1<<j)-1)){i.msg="invalid distance too far back",r.mode=30;break e}if(g>>>=j,w-=j,(j=x-y)<X){if(a<(j=X-j)&&r.sane){i.msg="invalid distance too far back",r.mode=30;break e}if(B=l,(b=0)===d){if(b+=h-j,j<U){for(U-=j;M[x++]=l[b++],--j;);b=x-X,B=M}}else if(d<j){if(b+=h+d-j,(j-=d)<U){for(U-=j;M[x++]=l[b++],--j;);if(b=0,d<U){for(U-=j=d;M[x++]=l[b++],--j;);b=x-X,B=M}}}else if(b+=d-j,j<U){for(U-=j;M[x++]=l[b++],--j;);b=x-X,B=M}for(;2<U;)M[x++]=B[b++],M[x++]=B[b++],M[x++]=B[b++],U-=3;U&&(M[x++]=B[b++],1<U&&(M[x++]=B[b++]))}else{for(b=x-X;M[x++]=M[b++],M[x++]=M[b++],M[x++]=M[b++],2<(U-=3););U&&(M[x++]=M[b++],1<U&&(M[x++]=M[b++]))}break}}break}}while(c<_&&x<p);c-=U=w>>3,g&=(1<<(w-=U<<3))-1,i.next_in=c,i.next_out=x,i.avail_in=c<_?_-c+5:5-(c-_),i.avail_out=x<p?p-x+257:257-(x-p),r.hold=g,r.bits=w}},{}],49:[function(o,k,f){var i=o("../utils/common"),s=o("./adler32"),r=o("./crc32"),c=o("./inffast"),_=o("./inftrees"),x=1,y=2,p=0,n=-2,h=1,a=852,d=592;function l(b){return(b>>>24&255)+(b>>>8&65280)+((65280&b)<<8)+((255&b)<<24)}function g(){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 i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function w(b){var B;return b&&b.state?(B=b.state,b.total_in=b.total_out=B.total=0,b.msg="",B.wrap&&(b.adler=1&B.wrap),B.mode=h,B.last=0,B.havedict=0,B.dmax=32768,B.head=null,B.hold=0,B.bits=0,B.lencode=B.lendyn=new i.Buf32(a),B.distcode=B.distdyn=new i.Buf32(d),B.sane=1,B.back=-1,p):n}function E(b){var B;return b&&b.state?((B=b.state).wsize=0,B.whave=0,B.wnext=0,w(b)):n}function S(b,B){var t,M;return b&&b.state?(M=b.state,B<0?(t=0,B=-B):(t=1+(B>>4),B<48&&(B&=15)),B&&(B<8||15<B)?n:(M.window!==null&&M.wbits!==B&&(M.window=null),M.wrap=t,M.wbits=B,E(b))):n}function F(b,B){var t,M;return b?(M=new g,(b.state=M).window=null,(t=S(b,B))!==p&&(b.state=null),t):n}var v,D,j=!0;function U(b){if(j){var B;for(v=new i.Buf32(512),D=new i.Buf32(32),B=0;B<144;)b.lens[B++]=8;for(;B<256;)b.lens[B++]=9;for(;B<280;)b.lens[B++]=7;for(;B<288;)b.lens[B++]=8;for(_(x,b.lens,0,288,v,0,b.work,{bits:9}),B=0;B<32;)b.lens[B++]=5;_(y,b.lens,0,32,D,0,b.work,{bits:5}),j=!1}b.lencode=v,b.lenbits=9,b.distcode=D,b.distbits=5}function X(b,B,t,M){var te,W=b.state;return W.window===null&&(W.wsize=1<<W.wbits,W.wnext=0,W.whave=0,W.window=new i.Buf8(W.wsize)),M>=W.wsize?(i.arraySet(W.window,B,t-W.wsize,W.wsize,0),W.wnext=0,W.whave=W.wsize):(M<(te=W.wsize-W.wnext)&&(te=M),i.arraySet(W.window,B,t-M,te,W.wnext),(M-=te)?(i.arraySet(W.window,B,t-M,M,0),W.wnext=M,W.whave=W.wsize):(W.wnext+=te,W.wnext===W.wsize&&(W.wnext=0),W.whave<W.wsize&&(W.whave+=te))),0}f.inflateReset=E,f.inflateReset2=S,f.inflateResetKeep=w,f.inflateInit=function(b){return F(b,15)},f.inflateInit2=F,f.inflate=function(b,B){var t,M,te,W,Y,O,K,A,I,ee,J,q,se,he,ne,ae,fe,ce,ye,ge,e,P,R,m,u=0,N=new i.Buf8(4),Z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!b||!b.state||!b.output||!b.input&&b.avail_in!==0)return n;(t=b.state).mode===12&&(t.mode=13),Y=b.next_out,te=b.output,K=b.avail_out,W=b.next_in,M=b.input,O=b.avail_in,A=t.hold,I=t.bits,ee=O,J=K,P=p;e:for(;;)switch(t.mode){case h:if(t.wrap===0){t.mode=13;break}for(;I<16;){if(O===0)break e;O--,A+=M[W++]<<I,I+=8}if(2&t.wrap&&A===35615){N[t.check=0]=255&A,N[1]=A>>>8&255,t.check=r(t.check,N,2,0),I=A=0,t.mode=2;break}if(t.flags=0,t.head&&(t.head.done=!1),!(1&t.wrap)||(((255&A)<<8)+(A>>8))%31){b.msg="incorrect header check",t.mode=30;break}if((15&A)!=8){b.msg="unknown compression method",t.mode=30;break}if(I-=4,e=8+(15&(A>>>=4)),t.wbits===0)t.wbits=e;else if(e>t.wbits){b.msg="invalid window size",t.mode=30;break}t.dmax=1<<e,b.adler=t.check=1,t.mode=512&A?10:12,I=A=0;break;case 2:for(;I<16;){if(O===0)break e;O--,A+=M[W++]<<I,I+=8}if(t.flags=A,(255&t.flags)!=8){b.msg="unknown compression method",t.mode=30;break}if(57344&t.flags){b.msg="unknown header flags set",t.mode=30;break}t.head&&(t.head.text=A>>8&1),512&t.flags&&(N[0]=255&A,N[1]=A>>>8&255,t.check=r(t.check,N,2,0)),I=A=0,t.mode=3;case 3:for(;I<32;){if(O===0)break e;O--,A+=M[W++]<<I,I+=8}t.head&&(t.head.time=A),512&t.flags&&(N[0]=255&A,N[1]=A>>>8&255,N[2]=A>>>16&255,N[3]=A>>>24&255,t.check=r(t.check,N,4,0)),I=A=0,t.mode=4;case 4:for(;I<16;){if(O===0)break e;O--,A+=M[W++]<<I,I+=8}t.head&&(t.head.xflags=255&A,t.head.os=A>>8),512&t.flags&&(N[0]=255&A,N[1]=A>>>8&255,t.check=r(t.check,N,2,0)),I=A=0,t.mode=5;case 5:if(1024&t.flags){for(;I<16;){if(O===0)break e;O--,A+=M[W++]<<I,I+=8}t.length=A,t.head&&(t.head.extra_len=A),512&t.flags&&(N[0]=255&A,N[1]=A>>>8&255,t.check=r(t.check,N,2,0)),I=A=0}else t.head&&(t.head.extra=null);t.mode=6;case 6:if(1024&t.flags&&(O<(q=t.length)&&(q=O),q&&(t.head&&(e=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Array(t.head.extra_len)),i.arraySet(t.head.extra,M,W,q,e)),512&t.flags&&(t.check=r(t.check,M,q,W)),O-=q,W+=q,t.length-=q),t.length))break e;t.length=0,t.mode=7;case 7:if(2048&t.flags){if(O===0)break e;for(q=0;e=M[W+q++],t.head&&e&&t.length<65536&&(t.head.name+=String.fromCharCode(e)),e&&q<O;);if(512&t.flags&&(t.check=r(t.check,M,q,W)),O-=q,W+=q,e)break e}else t.head&&(t.head.name=null);t.length=0,t.mode=8;case 8:if(4096&t.flags){if(O===0)break e;for(q=0;e=M[W+q++],t.head&&e&&t.length<65536&&(t.head.comment+=String.fromCharCode(e)),e&&q<O;);if(512&t.flags&&(t.check=r(t.check,M,q,W)),O-=q,W+=q,e)break e}else t.head&&(t.head.comment=null);t.mode=9;case 9:if(512&t.flags){for(;I<16;){if(O===0)break e;O--,A+=M[W++]<<I,I+=8}if(A!==(65535&t.check)){b.msg="header crc mismatch",t.mode=30;break}I=A=0}t.head&&(t.head.hcrc=t.flags>>9&1,t.head.done=!0),b.adler=t.check=0,t.mode=12;break;case 10:for(;I<32;){if(O===0)break e;O--,A+=M[W++]<<I,I+=8}b.adler=t.check=l(A),I=A=0,t.mode=11;case 11:if(t.havedict===0)return b.next_out=Y,b.avail_out=K,b.next_in=W,b.avail_in=O,t.hold=A,t.bits=I,2;b.adler=t.check=1,t.mode=12;case 12:if(B===5||B===6)break e;case 13:if(t.last){A>>>=7&I,I-=7&I,t.mode=27;break}for(;I<3;){if(O===0)break e;O--,A+=M[W++]<<I,I+=8}switch(t.last=1&A,I-=1,3&(A>>>=1)){case 0:t.mode=14;break;case 1:if(U(t),t.mode=20,B!==6)break;A>>>=2,I-=2;break e;case 2:t.mode=17;break;case 3:b.msg="invalid block type",t.mode=30}A>>>=2,I-=2;break;case 14:for(A>>>=7&I,I-=7&I;I<32;){if(O===0)break e;O--,A+=M[W++]<<I,I+=8}if((65535&A)!=(A>>>16^65535)){b.msg="invalid stored block lengths",t.mode=30;break}if(t.length=65535&A,I=A=0,t.mode=15,B===6)break e;case 15:t.mode=16;case 16:if(q=t.length){if(O<q&&(q=O),K<q&&(q=K),q===0)break e;i.arraySet(te,M,W,q,Y),O-=q,W+=q,K-=q,Y+=q,t.length-=q;break}t.mode=12;break;case 17:for(;I<14;){if(O===0)break e;O--,A+=M[W++]<<I,I+=8}if(t.nlen=257+(31&A),A>>>=5,I-=5,t.ndist=1+(31&A),A>>>=5,I-=5,t.ncode=4+(15&A),A>>>=4,I-=4,286<t.nlen||30<t.ndist){b.msg="too many length or distance symbols",t.mode=30;break}t.have=0,t.mode=18;case 18:for(;t.have<t.ncode;){for(;I<3;){if(O===0)break e;O--,A+=M[W++]<<I,I+=8}t.lens[Z[t.have++]]=7&A,A>>>=3,I-=3}for(;t.have<19;)t.lens[Z[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,R={bits:t.lenbits},P=_(0,t.lens,0,19,t.lencode,0,t.work,R),t.lenbits=R.bits,P){b.msg="invalid code lengths set",t.mode=30;break}t.have=0,t.mode=19;case 19:for(;t.have<t.nlen+t.ndist;){for(;ae=(u=t.lencode[A&(1<<t.lenbits)-1])>>>16&255,fe=65535&u,!((ne=u>>>24)<=I);){if(O===0)break e;O--,A+=M[W++]<<I,I+=8}if(fe<16)A>>>=ne,I-=ne,t.lens[t.have++]=fe;else{if(fe===16){for(m=ne+2;I<m;){if(O===0)break e;O--,A+=M[W++]<<I,I+=8}if(A>>>=ne,I-=ne,t.have===0){b.msg="invalid bit length repeat",t.mode=30;break}e=t.lens[t.have-1],q=3+(3&A),A>>>=2,I-=2}else if(fe===17){for(m=ne+3;I<m;){if(O===0)break e;O--,A+=M[W++]<<I,I+=8}I-=ne,e=0,q=3+(7&(A>>>=ne)),A>>>=3,I-=3}else{for(m=ne+7;I<m;){if(O===0)break e;O--,A+=M[W++]<<I,I+=8}I-=ne,e=0,q=11+(127&(A>>>=ne)),A>>>=7,I-=7}if(t.have+q>t.nlen+t.ndist){b.msg="invalid bit length repeat",t.mode=30;break}for(;q--;)t.lens[t.have++]=e}}if(t.mode===30)break;if(t.lens[256]===0){b.msg="invalid code -- missing end-of-block",t.mode=30;break}if(t.lenbits=9,R={bits:t.lenbits},P=_(x,t.lens,0,t.nlen,t.lencode,0,t.work,R),t.lenbits=R.bits,P){b.msg="invalid literal/lengths set",t.mode=30;break}if(t.distbits=6,t.distcode=t.distdyn,R={bits:t.distbits},P=_(y,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,R),t.distbits=R.bits,P){b.msg="invalid distances set",t.mode=30;break}if(t.mode=20,B===6)break e;case 20:t.mode=21;case 21:if(6<=O&&258<=K){b.next_out=Y,b.avail_out=K,b.next_in=W,b.avail_in=O,t.hold=A,t.bits=I,c(b,J),Y=b.next_out,te=b.output,K=b.avail_out,W=b.next_in,M=b.input,O=b.avail_in,A=t.hold,I=t.bits,t.mode===12&&(t.back=-1);break}for(t.back=0;ae=(u=t.lencode[A&(1<<t.lenbits)-1])>>>16&255,fe=65535&u,!((ne=u>>>24)<=I);){if(O===0)break e;O--,A+=M[W++]<<I,I+=8}if(ae&&(240&ae)==0){for(ce=ne,ye=ae,ge=fe;ae=(u=t.lencode[ge+((A&(1<<ce+ye)-1)>>ce)])>>>16&255,fe=65535&u,!(ce+(ne=u>>>24)<=I);){if(O===0)break e;O--,A+=M[W++]<<I,I+=8}A>>>=ce,I-=ce,t.back+=ce}if(A>>>=ne,I-=ne,t.back+=ne,t.length=fe,ae===0){t.mode=26;break}if(32&ae){t.back=-1,t.mode=12;break}if(64&ae){b.msg="invalid literal/length code",t.mode=30;break}t.extra=15&ae,t.mode=22;case 22:if(t.extra){for(m=t.extra;I<m;){if(O===0)break e;O--,A+=M[W++]<<I,I+=8}t.length+=A&(1<<t.extra)-1,A>>>=t.extra,I-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=23;case 23:for(;ae=(u=t.distcode[A&(1<<t.distbits)-1])>>>16&255,fe=65535&u,!((ne=u>>>24)<=I);){if(O===0)break e;O--,A+=M[W++]<<I,I+=8}if((240&ae)==0){for(ce=ne,ye=ae,ge=fe;ae=(u=t.distcode[ge+((A&(1<<ce+ye)-1)>>ce)])>>>16&255,fe=65535&u,!(ce+(ne=u>>>24)<=I);){if(O===0)break e;O--,A+=M[W++]<<I,I+=8}A>>>=ce,I-=ce,t.back+=ce}if(A>>>=ne,I-=ne,t.back+=ne,64&ae){b.msg="invalid distance code",t.mode=30;break}t.offset=fe,t.extra=15&ae,t.mode=24;case 24:if(t.extra){for(m=t.extra;I<m;){if(O===0)break e;O--,A+=M[W++]<<I,I+=8}t.offset+=A&(1<<t.extra)-1,A>>>=t.extra,I-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){b.msg="invalid distance too far back",t.mode=30;break}t.mode=25;case 25:if(K===0)break e;if(q=J-K,t.offset>q){if((q=t.offset-q)>t.whave&&t.sane){b.msg="invalid distance too far back",t.mode=30;break}se=q>t.wnext?(q-=t.wnext,t.wsize-q):t.wnext-q,q>t.length&&(q=t.length),he=t.window}else he=te,se=Y-t.offset,q=t.length;for(K<q&&(q=K),K-=q,t.length-=q;te[Y++]=he[se++],--q;);t.length===0&&(t.mode=21);break;case 26:if(K===0)break e;te[Y++]=t.length,K--,t.mode=21;break;case 27:if(t.wrap){for(;I<32;){if(O===0)break e;O--,A|=M[W++]<<I,I+=8}if(J-=K,b.total_out+=J,t.total+=J,J&&(b.adler=t.check=t.flags?r(t.check,te,J,Y-J):s(t.check,te,J,Y-J)),J=K,(t.flags?A:l(A))!==t.check){b.msg="incorrect data check",t.mode=30;break}I=A=0}t.mode=28;case 28:if(t.wrap&&t.flags){for(;I<32;){if(O===0)break e;O--,A+=M[W++]<<I,I+=8}if(A!==(4294967295&t.total)){b.msg="incorrect length check",t.mode=30;break}I=A=0}t.mode=29;case 29:P=1;break e;case 30:P=-3;break e;case 31:return-4;case 32:default:return n}return b.next_out=Y,b.avail_out=K,b.next_in=W,b.avail_in=O,t.hold=A,t.bits=I,(t.wsize||J!==b.avail_out&&t.mode<30&&(t.mode<27||B!==4))&&X(b,b.output,b.next_out,J-b.avail_out)?(t.mode=31,-4):(ee-=b.avail_in,J-=b.avail_out,b.total_in+=ee,b.total_out+=J,t.total+=J,t.wrap&&J&&(b.adler=t.check=t.flags?r(t.check,te,J,b.next_out-J):s(t.check,te,J,b.next_out-J)),b.data_type=t.bits+(t.last?64:0)+(t.mode===12?128:0)+(t.mode===20||t.mode===15?256:0),(ee==0&&J===0||B===4)&&P===p&&(P=-5),P)},f.inflateEnd=function(b){if(!b||!b.state)return n;var B=b.state;return B.window&&(B.window=null),b.state=null,p},f.inflateGetHeader=function(b,B){var t;return b&&b.state?(2&(t=b.state).wrap)==0?n:((t.head=B).done=!1,p):n},f.inflateSetDictionary=function(b,B){var t,M=B.length;return b&&b.state?(t=b.state).wrap!==0&&t.mode!==11?n:t.mode===11&&s(1,B,M,0)!==t.check?-3:X(b,B,M,M)?(t.mode=31,-4):(t.havedict=1,p):n},f.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(o,k,f){var i=o("../utils/common"),s=[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],r=[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],c=[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],_=[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];k.exports=function(x,y,p,n,h,a,d,l){var g,w,E,S,F,v,D,j,U,X=l.bits,b=0,B=0,t=0,M=0,te=0,W=0,Y=0,O=0,K=0,A=0,I=null,ee=0,J=new i.Buf16(16),q=new i.Buf16(16),se=null,he=0;for(b=0;b<=15;b++)J[b]=0;for(B=0;B<n;B++)J[y[p+B]]++;for(te=X,M=15;1<=M&&J[M]===0;M--);if(M<te&&(te=M),M===0)return h[a++]=20971520,h[a++]=20971520,l.bits=1,0;for(t=1;t<M&&J[t]===0;t++);for(te<t&&(te=t),b=O=1;b<=15;b++)if(O<<=1,(O-=J[b])<0)return-1;if(0<O&&(x===0||M!==1))return-1;for(q[1]=0,b=1;b<15;b++)q[b+1]=q[b]+J[b];for(B=0;B<n;B++)y[p+B]!==0&&(d[q[y[p+B]]++]=B);if(v=x===0?(I=se=d,19):x===1?(I=s,ee-=257,se=r,he-=257,256):(I=c,se=_,-1),b=t,F=a,Y=B=A=0,E=-1,S=(K=1<<(W=te))-1,x===1&&852<K||x===2&&592<K)return 1;for(;;){for(D=b-Y,U=d[B]<v?(j=0,d[B]):d[B]>v?(j=se[he+d[B]],I[ee+d[B]]):(j=96,0),g=1<<b-Y,t=w=1<<W;h[F+(A>>Y)+(w-=g)]=D<<24|j<<16|U|0,w!==0;);for(g=1<<b-1;A&g;)g>>=1;if(g!==0?(A&=g-1,A+=g):A=0,B++,--J[b]==0){if(b===M)break;b=y[p+d[B]]}if(te<b&&(A&S)!==E){for(Y===0&&(Y=te),F+=t,O=1<<(W=b-Y);W+Y<M&&!((O-=J[W+Y])<=0);)W++,O<<=1;if(K+=1<<W,x===1&&852<K||x===2&&592<K)return 1;h[E=A&S]=te<<24|W<<16|F-a|0}}return A!==0&&(h[F+A]=b-Y<<24|64<<16|0),l.bits=te,0}},{"../utils/common":41}],51:[function(o,k,f){k.exports={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"}},{}],52:[function(o,k,f){var i=o("../utils/common"),s=0,r=1;function c(u){for(var N=u.length;0<=--N;)u[N]=0}var _=0,x=29,y=256,p=y+1+x,n=30,h=19,a=2*p+1,d=15,l=16,g=7,w=256,E=16,S=17,F=18,v=[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],D=[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],j=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],U=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],X=new Array(2*(p+2));c(X);var b=new Array(2*n);c(b);var B=new Array(512);c(B);var t=new Array(256);c(t);var M=new Array(x);c(M);var te,W,Y,O=new Array(n);function K(u,N,Z,H,T){this.static_tree=u,this.extra_bits=N,this.extra_base=Z,this.elems=H,this.max_length=T,this.has_stree=u&&u.length}function A(u,N){this.dyn_tree=u,this.max_code=0,this.stat_desc=N}function I(u){return u<256?B[u]:B[256+(u>>>7)]}function ee(u,N){u.pending_buf[u.pending++]=255&N,u.pending_buf[u.pending++]=N>>>8&255}function J(u,N,Z){u.bi_valid>l-Z?(u.bi_buf|=N<<u.bi_valid&65535,ee(u,u.bi_buf),u.bi_buf=N>>l-u.bi_valid,u.bi_valid+=Z-l):(u.bi_buf|=N<<u.bi_valid&65535,u.bi_valid+=Z)}function q(u,N,Z){J(u,Z[2*N],Z[2*N+1])}function se(u,N){for(var Z=0;Z|=1&u,u>>>=1,Z<<=1,0<--N;);return Z>>>1}function he(u,N,Z){var H,T,V=new Array(d+1),Q=0;for(H=1;H<=d;H++)V[H]=Q=Q+Z[H-1]<<1;for(T=0;T<=N;T++){var G=u[2*T+1];G!==0&&(u[2*T]=se(V[G]++,G))}}function ne(u){var N;for(N=0;N<p;N++)u.dyn_ltree[2*N]=0;for(N=0;N<n;N++)u.dyn_dtree[2*N]=0;for(N=0;N<h;N++)u.bl_tree[2*N]=0;u.dyn_ltree[2*w]=1,u.opt_len=u.static_len=0,u.last_lit=u.matches=0}function ae(u){8<u.bi_valid?ee(u,u.bi_buf):0<u.bi_valid&&(u.pending_buf[u.pending++]=u.bi_buf),u.bi_buf=0,u.bi_valid=0}function fe(u,N,Z,H){var T=2*N,V=2*Z;return u[T]<u[V]||u[T]===u[V]&&H[N]<=H[Z]}function ce(u,N,Z){for(var H=u.heap[Z],T=Z<<1;T<=u.heap_len&&(T<u.heap_len&&fe(N,u.heap[T+1],u.heap[T],u.depth)&&T++,!fe(N,H,u.heap[T],u.depth));)u.heap[Z]=u.heap[T],Z=T,T<<=1;u.heap[Z]=H}function ye(u,N,Z){var H,T,V,Q,G=0;if(u.last_lit!==0)for(;H=u.pending_buf[u.d_buf+2*G]<<8|u.pending_buf[u.d_buf+2*G+1],T=u.pending_buf[u.l_buf+G],G++,H===0?q(u,T,N):(q(u,(V=t[T])+y+1,N),(Q=v[V])!==0&&J(u,T-=M[V],Q),q(u,V=I(--H),Z),(Q=D[V])!==0&&J(u,H-=O[V],Q)),G<u.last_lit;);q(u,w,N)}function ge(u,N){var Z,H,T,V=N.dyn_tree,Q=N.stat_desc.static_tree,G=N.stat_desc.has_stree,re=N.stat_desc.elems,oe=-1;for(u.heap_len=0,u.heap_max=a,Z=0;Z<re;Z++)V[2*Z]!==0?(u.heap[++u.heap_len]=oe=Z,u.depth[Z]=0):V[2*Z+1]=0;for(;u.heap_len<2;)V[2*(T=u.heap[++u.heap_len]=oe<2?++oe:0)]=1,u.depth[T]=0,u.opt_len--,G&&(u.static_len-=Q[2*T+1]);for(N.max_code=oe,Z=u.heap_len>>1;1<=Z;Z--)ce(u,V,Z);for(T=re;Z=u.heap[1],u.heap[1]=u.heap[u.heap_len--],ce(u,V,1),H=u.heap[1],u.heap[--u.heap_max]=Z,u.heap[--u.heap_max]=H,V[2*T]=V[2*Z]+V[2*H],u.depth[T]=(u.depth[Z]>=u.depth[H]?u.depth[Z]:u.depth[H])+1,V[2*Z+1]=V[2*H+1]=T,u.heap[1]=T++,ce(u,V,1),2<=u.heap_len;);u.heap[--u.heap_max]=u.heap[1],function(ie,me){var De,_e,Oe,de,$e,Ye,xe=me.dyn_tree,ht=me.max_code,Wt=me.stat_desc.static_tree,Ht=me.stat_desc.has_stree,$t=me.stat_desc.extra_bits,ft=me.stat_desc.extra_base,Re=me.stat_desc.max_length,Ve=0;for(de=0;de<=d;de++)ie.bl_count[de]=0;for(xe[2*ie.heap[ie.heap_max]+1]=0,De=ie.heap_max+1;De<a;De++)Re<(de=xe[2*xe[2*(_e=ie.heap[De])+1]+1]+1)&&(de=Re,Ve++),xe[2*_e+1]=de,ht<_e||(ie.bl_count[de]++,$e=0,ft<=_e&&($e=$t[_e-ft]),Ye=xe[2*_e],ie.opt_len+=Ye*(de+$e),Ht&&(ie.static_len+=Ye*(Wt[2*_e+1]+$e)));if(Ve!==0){do{for(de=Re-1;ie.bl_count[de]===0;)de--;ie.bl_count[de]--,ie.bl_count[de+1]+=2,ie.bl_count[Re]--,Ve-=2}while(0<Ve);for(de=Re;de!==0;de--)for(_e=ie.bl_count[de];_e!==0;)ht<(Oe=ie.heap[--De])||(xe[2*Oe+1]!==de&&(ie.opt_len+=(de-xe[2*Oe+1])*xe[2*Oe],xe[2*Oe+1]=de),_e--)}}(u,N),he(V,oe,u.bl_count)}function e(u,N,Z){var H,T,V=-1,Q=N[1],G=0,re=7,oe=4;for(Q===0&&(re=138,oe=3),N[2*(Z+1)+1]=65535,H=0;H<=Z;H++)T=Q,Q=N[2*(H+1)+1],++G<re&&T===Q||(G<oe?u.bl_tree[2*T]+=G:T!==0?(T!==V&&u.bl_tree[2*T]++,u.bl_tree[2*E]++):G<=10?u.bl_tree[2*S]++:u.bl_tree[2*F]++,V=T,oe=(G=0)===Q?(re=138,3):T===Q?(re=6,3):(re=7,4))}function P(u,N,Z){var H,T,V=-1,Q=N[1],G=0,re=7,oe=4;for(Q===0&&(re=138,oe=3),H=0;H<=Z;H++)if(T=Q,Q=N[2*(H+1)+1],!(++G<re&&T===Q)){if(G<oe)for(;q(u,T,u.bl_tree),--G!=0;);else T!==0?(T!==V&&(q(u,T,u.bl_tree),G--),q(u,E,u.bl_tree),J(u,G-3,2)):G<=10?(q(u,S,u.bl_tree),J(u,G-3,3)):(q(u,F,u.bl_tree),J(u,G-11,7));V=T,oe=(G=0)===Q?(re=138,3):T===Q?(re=6,3):(re=7,4)}}c(O);var R=!1;function m(u,N,Z,H){J(u,(_<<1)+(H?1:0),3),function(T,V,Q,G){ae(T),ee(T,Q),ee(T,~Q),i.arraySet(T.pending_buf,T.window,V,Q,T.pending),T.pending+=Q}(u,N,Z)}f._tr_init=function(u){R||(function(){var N,Z,H,T,V,Q=new Array(d+1);for(T=H=0;T<x-1;T++)for(M[T]=H,N=0;N<1<<v[T];N++)t[H++]=T;for(t[H-1]=T,T=V=0;T<16;T++)for(O[T]=V,N=0;N<1<<D[T];N++)B[V++]=T;for(V>>=7;T<n;T++)for(O[T]=V<<7,N=0;N<1<<D[T]-7;N++)B[256+V++]=T;for(Z=0;Z<=d;Z++)Q[Z]=0;for(N=0;N<=143;)X[2*N+1]=8,N++,Q[8]++;for(;N<=255;)X[2*N+1]=9,N++,Q[9]++;for(;N<=279;)X[2*N+1]=7,N++,Q[7]++;for(;N<=287;)X[2*N+1]=8,N++,Q[8]++;for(he(X,p+1,Q),N=0;N<n;N++)b[2*N+1]=5,b[2*N]=se(N,5);te=new K(X,v,y+1,p,d),W=new K(b,D,0,n,d),Y=new K(new Array(0),j,0,h,g)}(),R=!0),u.l_desc=new A(u.dyn_ltree,te),u.d_desc=new A(u.dyn_dtree,W),u.bl_desc=new A(u.bl_tree,Y),u.bi_buf=0,u.bi_valid=0,ne(u)},f._tr_stored_block=m,f._tr_flush_block=function(u,N,Z,H){var T,V,Q=0;0<u.level?(u.strm.data_type===2&&(u.strm.data_type=function(G){var re,oe=4093624447;for(re=0;re<=31;re++,oe>>>=1)if(1&oe&&G.dyn_ltree[2*re]!==0)return s;if(G.dyn_ltree[18]!==0||G.dyn_ltree[20]!==0||G.dyn_ltree[26]!==0)return r;for(re=32;re<y;re++)if(G.dyn_ltree[2*re]!==0)return r;return s}(u)),ge(u,u.l_desc),ge(u,u.d_desc),Q=function(G){var re;for(e(G,G.dyn_ltree,G.l_desc.max_code),e(G,G.dyn_dtree,G.d_desc.max_code),ge(G,G.bl_desc),re=h-1;3<=re&&G.bl_tree[2*U[re]+1]===0;re--);return G.opt_len+=3*(re+1)+5+5+4,re}(u),T=u.opt_len+3+7>>>3,(V=u.static_len+3+7>>>3)<=T&&(T=V)):T=V=Z+5,Z+4<=T&&N!==-1?m(u,N,Z,H):u.strategy===4||V===T?(J(u,2+(H?1:0),3),ye(u,X,b)):(J(u,4+(H?1:0),3),function(G,re,oe,ie){var me;for(J(G,re-257,5),J(G,oe-1,5),J(G,ie-4,4),me=0;me<ie;me++)J(G,G.bl_tree[2*U[me]+1],3);P(G,G.dyn_ltree,re-1),P(G,G.dyn_dtree,oe-1)}(u,u.l_desc.max_code+1,u.d_desc.max_code+1,Q+1),ye(u,u.dyn_ltree,u.dyn_dtree)),ne(u),H&&ae(u)},f._tr_tally=function(u,N,Z){return u.pending_buf[u.d_buf+2*u.last_lit]=N>>>8&255,u.pending_buf[u.d_buf+2*u.last_lit+1]=255&N,u.pending_buf[u.l_buf+u.last_lit]=255&Z,u.last_lit++,N===0?u.dyn_ltree[2*Z]++:(u.matches++,N--,u.dyn_ltree[2*(t[Z]+y+1)]++,u.dyn_dtree[2*I(N)]++),u.last_lit===u.lit_bufsize-1},f._tr_align=function(u){J(u,2,3),q(u,w,X),function(N){N.bi_valid===16?(ee(N,N.bi_buf),N.bi_buf=0,N.bi_valid=0):8<=N.bi_valid&&(N.pending_buf[N.pending++]=255&N.bi_buf,N.bi_buf>>=8,N.bi_valid-=8)}(u)}},{"../utils/common":41}],53:[function(o,k,f){k.exports=function(){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}},{}],54:[function(o,k,f){(function(i){(function(s,r){if(!s.setImmediate){var c,_,x,y,p=1,n={},h=!1,a=s.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(s);d=d&&d.setTimeout?d:s,c={}.toString.call(s.process)==="[object process]"?function(E){process.nextTick(function(){g(E)})}:function(){if(s.postMessage&&!s.importScripts){var E=!0,S=s.onmessage;return s.onmessage=function(){E=!1},s.postMessage("","*"),s.onmessage=S,E}}()?(y="setImmediate$"+Math.random()+"$",s.addEventListener?s.addEventListener("message",w,!1):s.attachEvent("onmessage",w),function(E){s.postMessage(y+E,"*")}):s.MessageChannel?((x=new MessageChannel).port1.onmessage=function(E){g(E.data)},function(E){x.port2.postMessage(E)}):a&&"onreadystatechange"in a.createElement("script")?(_=a.documentElement,function(E){var S=a.createElement("script");S.onreadystatechange=function(){g(E),S.onreadystatechange=null,_.removeChild(S),S=null},_.appendChild(S)}):function(E){setTimeout(g,0,E)},d.setImmediate=function(E){typeof E!="function"&&(E=new Function(""+E));for(var S=new Array(arguments.length-1),F=0;F<S.length;F++)S[F]=arguments[F+1];var v={callback:E,args:S};return n[p]=v,c(p),p++},d.clearImmediate=l}function l(E){delete n[E]}function g(E){if(h)setTimeout(g,0,E);else{var S=n[E];if(S){h=!0;try{(function(F){var v=F.callback,D=F.args;switch(D.length){case 0:v();break;case 1:v(D[0]);break;case 2:v(D[0],D[1]);break;case 3:v(D[0],D[1],D[2]);break;default:v.apply(r,D)}})(S)}finally{l(E),h=!1}}}}function w(E){E.source===s&&typeof E.data=="string"&&E.data.indexOf(y)===0&&g(+E.data.slice(y.length))}})(typeof self>"u"?i===void 0?this:i:self)}).call(this,typeof Ge<"u"?Ge:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})}(Qe)),Qe.exports}var Zr=Pr();const Wr=or(Zr),Hr=/[<>:"/\\|?*\x00-\x1f]/,$r=/^(CON|PRN|AUX|NUL|COM[1-9]|LPT[1-9])$/i;function Vr({selectedProject:C,onRefresh:L,showToast:o}){const{t:k}=we(),[f,i]=$.useState(null),[s,r]=$.useState(""),[c,_]=$.useState({isOpen:!1,item:null}),[x,y]=$.useState(!1),[p,n]=$.useState(""),[h,a]=$.useState("file"),[d,l]=$.useState(""),[g,w]=$.useState(!1),E=$.useCallback(O=>!O||!O.trim()?k("fileTree.validation.emptyName","Filename cannot be empty"):Hr.test(O)?k("fileTree.validation.invalidChars","Filename contains invalid characters"):$r.test(O)?k("fileTree.validation.reserved","Filename is a reserved name"):/^\.+$/.test(O)?k("fileTree.validation.dotsOnly","Filename cannot be only dots"):null,[k]),S=$.useCallback(O=>{i(O),r(O.name),y(!1)},[]),F=$.useCallback(()=>{i(null),r("")},[]),v=$.useCallback(async()=>{if(!f||!C)return;const O=E(s);if(O){o(O,"error");return}if(s===f.name){F();return}w(!0);try{const K=await je.renameFile(C.projectId,{oldPath:f.path,newName:s});if(!K.ok){const A=await K.json();throw new Error(A.error||"Failed to rename")}o(k("fileTree.toast.renamed","Renamed successfully"),"success"),L(),F()}catch(K){o(K.message,"error")}finally{w(!1)}},[f,s,C,E,o,k,L,F]),D=$.useCallback(O=>{_({isOpen:!0,item:O})},[]),j=$.useCallback(()=>{_({isOpen:!1,item:null})},[]),U=$.useCallback(async()=>{const{item:O}=c;if(!(!O||!C)){w(!0);try{const K=await je.deleteFile(C.projectId,{path:O.path,type:O.type});if(!K.ok){const A=await K.json();throw new Error(A.error||"Failed to delete")}o(O.type==="directory"?k("fileTree.toast.folderDeleted","Folder deleted"):k("fileTree.toast.fileDeleted","File deleted"),"success"),L(),j()}catch(K){o(K.message,"error")}finally{w(!1)}}},[c,C,o,k,L,j]),X=$.useCallback((O,K)=>{n(O||""),a(K),l(K==="file"?"untitled.txt":"new-folder"),y(!0),i(null)},[]),b=$.useCallback(()=>{y(!1),n(""),l("")},[]),B=$.useCallback(async()=>{if(!C)return;const O=E(d);if(O){o(O,"error");return}w(!0);try{const K=await je.createFile(C.projectId,{path:p,type:h,name:d});if(!K.ok){const A=await K.json();throw new Error(A.error||"Failed to create")}o(h==="file"?k("fileTree.toast.fileCreated","File created successfully"):k("fileTree.toast.folderCreated","Folder created successfully"),"success"),L(),b()}catch(K){o(K.message,"error")}finally{w(!1)}},[C,p,h,d,E,o,k,L,b]),t=$.useCallback(O=>{navigator.clipboard.writeText(O.path).catch(()=>{o(k("fileTree.toast.copyFailed","Failed to copy path"),"error")}),o(k("fileTree.toast.pathCopied","Path copied to clipboard"),"success")},[o,k]),M=$.useCallback((O,K)=>{const A=URL.createObjectURL(O),I=document.createElement("a");I.href=A,I.download=K,document.body.appendChild(I),I.click(),document.body.removeChild(I),URL.revokeObjectURL(A)},[]),te=$.useCallback(async O=>{if(C){w(!0);try{O.type==="directory"?await Y(O):await W(O)}catch(K){o(K.message,"error")}finally{w(!1)}}},[C,o]),W=$.useCallback(async O=>{if(!C)return;const K=await je.readFileBlob(C.projectId,O.path);if(!K.ok)throw new Error("Failed to download file");const A=await K.blob();M(A,O.name)},[C,M]),Y=$.useCallback(async O=>{if(!C)return;const K=new Wr,A=async(ee,J)=>{const q=J?`${J}/${ee.name}`:ee.name;if(ee.type==="file"){const se=await je.readFileBlob(C.projectId,ee.path);if(!se.ok)throw new Error(`Failed to download "${ee.name}" for ZIP export`);const he=await se.arrayBuffer();K.file(q,he)}else if(ee.type==="directory"&&ee.children)for(const se of ee.children)await A(se,q)};if(O.children&&O.children.length>0)for(const ee of O.children)await A(ee,"");const I=await K.generateAsync({type:"blob"});M(I,`${O.name}.zip`),o(k("fileTree.toast.folderDownloaded","Folder downloaded as ZIP"),"success")},[C,o,k,M]);return{renamingItem:f,renameValue:s,handleStartRename:S,handleCancelRename:F,handleConfirmRename:v,setRenameValue:r,deleteConfirmation:c,handleStartDelete:D,handleCancelDelete:j,handleConfirmDelete:U,isCreating:x,newItemParent:p,newItemType:h,newItemName:d,handleStartCreate:X,handleCancelCreate:b,handleConfirmCreate:B,setNewItemName:l,handleCopyPath:t,handleDownload:te,operationLoading:g,validateFilename:E}}const Nt="file-tree-view-mode",Gr="detailed",qr=["simple","compact","detailed"],Bt=200,Xr=Bt*1024*1024,lt=`${Bt}MB`,zt=20,Kr=new Set(["png","jpg","jpeg","gif","svg","webp","ico","bmp"]);function Lt(C,L){return C.reduce((o,k)=>{const f=k.name.toLowerCase().includes(L),i=k.type==="directory"&&k.children?Lt(k.children,L):[];return(f||i.length>0)&&o.push({...k,children:i}),o},[])}function Yr(C){const L=[],o=k=>{k.forEach(f=>{f.type==="directory"&&f.children&&f.children.length>0&&(L.push(f.path),o(f.children))})};return o(C),L}function Jr(C){if(!C||C===0)return"0 B";const L=1024,o=["B","KB","MB","GB"],k=Math.floor(Math.log(C)/Math.log(L));return`${(C/Math.pow(L,k)).toFixed(1).replace(/\.0$/,"")} ${o[k]}`}function Qr(C,L){if(!C)return"-";const o=new Date,k=new Date(C),f=Math.floor((o.getTime()-k.getTime())/1e3);return f<60?L("fileTree.justNow"):f<3600?L("fileTree.minAgo",{count:Math.floor(f/60)}):f<86400?L("fileTree.hoursAgo",{count:Math.floor(f/3600)}):f<2592e3?L("fileTree.daysAgo",{count:Math.floor(f/86400)}):k.toLocaleDateString()}function en(C){const L=C.split(".").pop()?.toLowerCase();return!!(L&&Kr.has(L))}function tn({files:C,expandDirectories:L}){const[o,k]=$.useState(""),[f,i]=$.useState(C);return $.useEffect(()=>{const s=o.trim().toLowerCase();if(!s){i(C);return}const r=Lt(C,s);i(r),L(Yr(r))},[C,o,L]),{searchQuery:o,setSearchQuery:k,filteredFiles:f}}function rn(){const[C,L]=$.useState(Gr);$.useEffect(()=>{try{const k=localStorage.getItem(Nt);k&&qr.includes(k)&&L(k)}catch{}},[]);const o=$.useCallback(k=>{L(k);try{localStorage.setItem(Nt,k)}catch{}},[]);return{viewMode:C,changeViewMode:o}}const nn=1400,an=3200,At=C=>C===1?"file":"files",Mt=C=>C.webkitRelativePath||C.name,Ut=C=>Mt(C).split(/[\\/]/).pop()||C.name,sn=C=>{if(C.length>zt)return`You can upload up to ${zt} files at once.`;const L=C.find(o=>o.size>Xr);return L?`${Ut(L)} is larger than ${lt}.`:null},on=C=>{if(!C.responseText)return{};try{return JSON.parse(C.responseText)}catch{return{}}},ln=(C,L)=>C!==L?`Uploaded ${C} of ${L} ${At(L)}`:`Uploaded ${C} ${At(C)} successfully`,cn=(C,L)=>{const o=new FormData,k=[];return o.append("targetPath",L),o.append("requestedFileCount",String(C.length)),C.forEach(f=>{const i=Mt(f),s=new File([f],i.split(/[\\/]/).pop()||f.name,{type:f.type,lastModified:f.lastModified});o.append("files",s),k.push(i)}),o.append("relativePaths",JSON.stringify(k)),o},dn=(C,L,o)=>new Promise((k,f)=>{const i=new XMLHttpRequest;i.open("POST",`/api/file-tree/projects/${encodeURIComponent(C)}/files/upload`);const s=Gt();!qt&&s&&i.setRequestHeader("Authorization",`Bearer ${s}`),i.upload.onprogress=r=>{r.lengthComputable&&o(Math.min(99,Math.round(r.loaded/r.total*100)))},i.onload=()=>{const r=i.getResponseHeader("X-Refreshed-Token");r&&Xt(r),i.getResponseHeader("X-Auth-Error")&&Kt();const c=on(i);if(i.status>=200&&i.status<300){k(c);return}f(new Error(c.error||c.message||`Upload failed with status ${i.status}`))},i.onerror=()=>f(new Error("Upload failed. Check your connection and try again.")),i.onabort=()=>f(new Error("Upload canceled.")),i.send(L)}),Pt=async(C,L="")=>{const o=[],k=C.createReader();let f=[],i;do i=await new Promise((r,c)=>{k.readEntries(r,c)}),f=f.concat(i);while(i.length>0);const s=[".DS_Store","Thumbs.db","desktop.ini"];for(const r of f){const c=L?`${L}/${r.name}`:r.name;if(r.isFile){const _=r,x=await new Promise((p,n)=>{_.file(p,n)});if(s.includes(x.name))continue;const y=new File([x],c,{type:x.type,lastModified:x.lastModified});o.push(y)}else if(r.isDirectory){const x=await Pt(r,c);o.push(...x)}}return o},un=async C=>{const L=[],{items:o}=C;if(o){for(const k of Array.from(o)){if(k.kind!=="file")continue;const f=k.webkitGetAsEntry?k.webkitGetAsEntry():null;if(!f){const i=k.getAsFile();i&&L.push(i);continue}if(f.isFile){const i=await new Promise((s,r)=>{f.file(s,r)});L.push(i)}else if(f.isDirectory){const i=await Pt(f,f.name);L.push(...i)}}return L}for(const k of Array.from(C.files))L.push(k);return L},hn=({selectedProject:C,onRefresh:L,showToast:o})=>{const[k,f]=$.useState(!1),[i,s]=$.useState(null),[r,c]=$.useState(!1),[_,x]=$.useState(null),y=$.useRef(null),p=$.useRef(null),n=$.useCallback(()=>{p.current&&(clearTimeout(p.current),p.current=null)},[]),h=$.useCallback(v=>{n(),p.current=setTimeout(()=>{x(null),p.current=null},v)},[n]);$.useEffect(()=>n,[n]);const a=$.useCallback((v,D,j="",U,X=0)=>{x({status:"error",progress:X,fileCount:D,fileName:U,targetPath:j,error:v}),h(an)},[h]),d=$.useCallback(async(v,D="")=>{if(v.length===0){s(null);return}const j=v.length===1?Ut(v[0]):void 0;if(!C){const b="Select a project before uploading files.";o(b,"error"),a(b,v.length,D,j);return}const U=sn(v);if(U){o(U,"error"),a(U,v.length,D,j);return}n(),c(!0),x({status:"uploading",progress:0,fileCount:v.length,fileName:j,targetPath:D});let X=0;try{const b=await dn(C.projectId,cn(v,D),M=>{X=M,x(te=>te&&te.status==="uploading"?{...te,progress:M}:te)}),B=typeof b.uploadedCount=="number"?b.uploadedCount:b.files?.length??v.length,t=typeof b.requestedFileCount=="number"?b.requestedFileCount:v.length;x({status:"complete",progress:100,fileCount:t,uploadedCount:B,fileName:j,targetPath:D}),o(ln(B,t),"success"),h(nn),L()}catch(b){const B=b instanceof Error?b.message:"Upload failed";console.error("Upload error:",b),o(B,"error"),a(B,v.length,D,j,X)}finally{c(!1),s(null)}},[n,L,h,C,a,o]),l=$.useCallback(async v=>{await d(Array.from(v),"")},[d]),g=$.useCallback(v=>{v.preventDefault(),v.stopPropagation(),f(!0)},[]),w=$.useCallback(v=>{v.preventDefault(),v.stopPropagation(),s(null)},[]),E=$.useCallback(v=>{v.preventDefault(),v.stopPropagation(),y.current&&!y.current.contains(v.relatedTarget)&&(f(!1),s(null))},[]),S=$.useCallback(async v=>{v.preventDefault(),v.stopPropagation(),f(!1);const D=i||"";try{const j=await un(v.dataTransfer);await d(j,D)}catch(j){const U=j instanceof Error?j.message:"Could not read dropped files";console.error("Upload error:",j),o(U,"error"),a(U,0,D),s(null)}},[i,a,o,d]),F=$.useCallback((v,D)=>{v.preventDefault(),v.stopPropagation(),s(D)},[]);return{isDragOver:k,dropTarget:i,operationLoading:r,uploadProgress:_,treeRef:y,uploadFiles:d,handleFileSelect:l,handleDragEnter:g,handleDragOver:w,handleDragLeave:E,handleDrop:S,handleItemDragOver:F,setDropTarget:s}};function et({icon:C,title:L,description:o}){return z.jsxs("div",{className:"py-8 text-center",children:[z.jsx("div",{className:"mx-auto mb-3 flex h-12 w-12 items-center justify-center rounded-lg bg-muted",children:z.jsx(C,{className:"h-6 w-6 text-muted-foreground"})}),z.jsx("h4",{className:"mb-1 font-medium text-foreground",children:L}),z.jsx("p",{className:"text-sm text-muted-foreground",children:o})]})}const jt=200,It=300,Xe=10;function fn(C,L){const o=C+jt>window.innerWidth?window.innerWidth-jt-Xe:C,k=L+It>window.innerHeight?window.innerHeight-It-Xe:L;return{x:Math.max(Xe,o),y:Math.max(Xe,k)}}function pn({children:C,item:L,onRename:o,onDelete:k,onNewFile:f,onNewFolder:i,onUpload:s,onRefresh:r,onCopyPath:c,onDownload:_,isLoading:x=!1,className:y=""}){const{t:p}=we(),[n,h]=$.useState(!1),[a,d]=$.useState({x:0,y:0}),l=$.useRef(null),g=$.useCallback(()=>{h(!1)},[]),w=$.useCallback(F=>{F.preventDefault(),F.stopPropagation(),d(fn(F.clientX,F.clientY)),h(!0)},[]),E=$.useCallback(F=>{g(),F?.()},[g]),S=$.useMemo(()=>L?.type==="file"?[{key:"rename",icon:mt,label:p("fileTree.context.rename","Rename"),onSelect:()=>o?.(L)},{key:"delete",icon:gt,label:p("fileTree.context.delete","Delete"),onSelect:()=>k?.(L),isDanger:!0},{key:"copyPath",icon:yt,label:p("fileTree.context.copyPath","Copy Path"),onSelect:()=>c?.(L),showDividerBefore:!0},{key:"download",icon:_t,label:p("fileTree.context.download","Download"),onSelect:()=>_?.(L)}]:L?.type==="directory"?[{key:"newFile",icon:ve,label:p("fileTree.context.newFile","New File"),onSelect:()=>f?.(L.path)},{key:"newFolder",icon:rt,label:p("fileTree.context.newFolder","New Folder"),onSelect:()=>i?.(L.path)},{key:"upload",icon:Fe,label:p("fileTree.context.upload","Upload Files"),onSelect:()=>s?.(L.path)},{key:"rename",icon:mt,label:p("fileTree.context.rename","Rename"),onSelect:()=>o?.(L),showDividerBefore:!0},{key:"delete",icon:gt,label:p("fileTree.context.delete","Delete"),onSelect:()=>k?.(L),isDanger:!0},{key:"copyPath",icon:yt,label:p("fileTree.context.copyPath","Copy Path"),onSelect:()=>c?.(L),showDividerBefore:!0},{key:"download",icon:_t,label:p("fileTree.context.download","Download"),onSelect:()=>_?.(L)}]:[{key:"newFile",icon:ve,label:p("fileTree.context.newFile","New File"),onSelect:()=>f?.("")},{key:"newFolder",icon:rt,label:p("fileTree.context.newFolder","New Folder"),onSelect:()=>i?.("")},{key:"upload",icon:Fe,label:p("fileTree.context.upload","Upload Files"),onSelect:()=>s?.("")},{key:"refresh",icon:nt,label:p("fileTree.context.refresh","Refresh"),onSelect:r,showDividerBefore:!0}],[L,c,k,_,f,i,r,o,s,p]);return $.useEffect(()=>{if(!n)return;const F=D=>{const j=l.current;j&&!j.contains(D.target)&&g()},v=D=>{D.key==="Escape"&&g()};return document.addEventListener("mousedown",F),document.addEventListener("keydown",v),()=>{document.removeEventListener("mousedown",F),document.removeEventListener("keydown",v)}},[g,n]),$.useEffect(()=>{if(!n)return;const F=v=>{const D=l.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!D||D.length===0)return;const j=document.activeElement,U=Array.from(D).findIndex(X=>X===j);if(v.key==="ArrowDown"){v.preventDefault();const X=U<D.length-1?U+1:0;D[X]?.focus()}else if(v.key==="ArrowUp"){v.preventDefault();const X=U>0?U-1:D.length-1;D[X]?.focus()}else(v.key==="Enter"||v.key===" ")&&j?.hasAttribute("role")&&(v.preventDefault(),j.click())};return document.addEventListener("keydown",F),()=>{document.removeEventListener("keydown",F)}},[n]),z.jsxs(z.Fragment,{children:[z.jsx("div",{onContextMenu:w,className:pe("contents",y),children:C}),n&&z.jsx("div",{ref:l,role:"menu","aria-label":p("fileTree.context.menuLabel","File context menu"),style:{position:"fixed",left:a.x,top:a.y,zIndex:9999},className:pe("min-w-[180px] py-1 px-1","bg-popover border border-border rounded-lg shadow-lg","animate-in fade-in-0 zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95"),children:x?z.jsxs("div",{className:"flex items-center justify-center py-4",children:[z.jsx(nt,{className:"h-4 w-4 animate-spin text-muted-foreground"}),z.jsx("span",{className:"ml-2 text-sm text-muted-foreground",children:p("fileTree.context.loading","Loading...")})]}):S.map(F=>z.jsxs($.Fragment,{children:[F.showDividerBefore&&z.jsx("div",{className:"mx-2 my-1 h-px bg-border"}),z.jsxs("button",{role:"menuitem",tabIndex:F.isDisabled?-1:0,disabled:x||F.isDisabled,onClick:()=>E(F.onSelect),className:pe("w-full flex items-center gap-3 px-3 py-2 text-sm text-left rounded-md transition-colors","focus:outline-none focus:bg-accent",F.isDisabled?"opacity-50 cursor-not-allowed":F.isDanger?"text-red-600 dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-950":"hover:bg-accent",x&&"pointer-events-none"),children:[F.icon&&z.jsx(F.icon,{className:"h-4 w-4 flex-shrink-0"}),z.jsx("span",{className:"flex-1",children:F.label}),F.shortcut&&z.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:F.shortcut})]})]},F.key))})]})}function mn(C){const L=C.split(/[\\/]/);return L.pop(),L.join("/")}function Ke({item:C,isOpen:L,renderFileIcon:o}){return C.type==="directory"?z.jsxs("span",{className:"flex flex-shrink-0 items-center gap-0.5",children:[z.jsx(Yt,{className:pe("w-3.5 h-3.5 text-muted-foreground/70 transition-transform duration-150",L&&"rotate-90")}),L?z.jsx(Jt,{className:"h-4 w-4 flex-shrink-0 text-blue-500"}):z.jsx(dt,{className:"h-4 w-4 flex-shrink-0 text-muted-foreground"})]}):z.jsx("span",{className:"ml-[18px] flex flex-shrink-0 items-center",children:o(C.name)})}function Zt({item:C,level:L,viewMode:o,expandedDirs:k,onItemClick:f,renderFileIcon:i,formatFileSize:s,formatRelativeTime:r,onRename:c,onDelete:_,onNewFile:x,onNewFolder:y,onCopyPath:p,onDownload:n,onUpload:h,onRefresh:a,dropTarget:d,onItemDragOver:l,renamingItem:g,renameValue:w,setRenameValue:E,handleConfirmRename:S,handleCancelRename:F,renameInputRef:v,operationLoading:D}){const{t:j}=we(),U=C.type==="directory",X=U&&k.has(C.path),b=!!(U&&C.children&&C.children.length>0),B=g?.path===C.path,t=U?C.path:mn(C.path),M=U&&d===C.path,te=pe("text-[13px] leading-tight truncate",U?"font-medium text-foreground":"text-foreground/90"),W=pe(o==="detailed"?"group grid grid-cols-12 gap-2 py-[3px] pr-2 hover:bg-accent/60 cursor-pointer items-center rounded-sm transition-colors duration-100":o==="compact"?"group flex items-center justify-between py-[3px] pr-2 hover:bg-accent/60 cursor-pointer rounded-sm transition-colors duration-100":"group flex items-center gap-1.5 py-[3px] pr-2 cursor-pointer rounded-sm hover:bg-accent/60 transition-colors duration-100",U&&X&&"border-l-2 border-primary/30",U&&!X||!U?"border-l-2 border-transparent":"","relative",M&&"bg-blue-500/10 ring-1 ring-inset ring-blue-500/40");if(B&&E&&S&&F)return z.jsxs("div",{className:pe(W,"bg-accent/30"),style:{paddingLeft:`${L*16+4}px`},onClick:A=>A.stopPropagation(),children:[z.jsx(Ke,{item:C,isOpen:X,renderFileIcon:i}),z.jsx(ct,{ref:v,type:"text",value:w||"",onChange:A=>E(A.target.value),onKeyDown:A=>{A.stopPropagation(),A.key==="Enter"&&S(),A.key==="Escape"&&F()},onBlur:()=>{setTimeout(()=>{S()},100)},className:"h-6 flex-1 text-sm",disabled:D})]});const Y=U&&h&&z.jsx("button",{type:"button",onClick:A=>{A.stopPropagation(),h(C.path)},title:j("fileTree.uploadToFolder",'Upload files to "{{folder}}"',{folder:C.name}),"aria-label":j("fileTree.uploadToFolder",'Upload files to "{{folder}}"',{folder:C.name}),className:pe("absolute right-1 top-1/2 -translate-y-1/2 rounded p-1","bg-background/80 text-muted-foreground opacity-0 transition-opacity","group-hover:opacity-100 focus-visible:opacity-100 hover:bg-accent hover:text-foreground"),children:z.jsx(Fe,{className:"h-3.5 w-3.5"})}),O=z.jsxs("div",{className:W,style:{paddingLeft:`${L*16+4}px`},onClick:()=>f(C),onDragOver:l?A=>l(A,t):void 0,children:[o==="detailed"?z.jsxs(z.Fragment,{children:[z.jsxs("div",{className:"col-span-5 flex min-w-0 items-center gap-1.5",children:[z.jsx(Ke,{item:C,isOpen:X,renderFileIcon:i}),z.jsx("span",{className:te,children:C.name})]}),z.jsx("div",{className:"col-span-2 text-sm tabular-nums text-muted-foreground",children:C.type==="file"?s(C.size):""}),z.jsx("div",{className:"col-span-3 text-sm text-muted-foreground",children:r(C.modified)}),z.jsx("div",{className:"col-span-2 font-mono text-sm text-muted-foreground",children:C.permissionsRwx||""})]}):o==="compact"?z.jsxs(z.Fragment,{children:[z.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[z.jsx(Ke,{item:C,isOpen:X,renderFileIcon:i}),z.jsx("span",{className:te,children:C.name})]}),z.jsx("div",{className:"ml-2 flex flex-shrink-0 items-center gap-3 text-sm text-muted-foreground",children:C.type==="file"&&z.jsxs(z.Fragment,{children:[z.jsx("span",{className:"tabular-nums",children:s(C.size)}),z.jsx("span",{className:"font-mono",children:C.permissionsRwx})]})})]}):z.jsxs(z.Fragment,{children:[z.jsx(Ke,{item:C,isOpen:X,renderFileIcon:i}),z.jsx("span",{className:te,children:C.name})]}),Y]}),K=c||_||x||y||p||n||a;return z.jsxs("div",{className:"select-none",children:[K?z.jsx(pn,{item:C,onRename:c,onDelete:_,onNewFile:x,onNewFolder:y,onUpload:h,onCopyPath:p,onDownload:n,onRefresh:a,children:O}):O,U&&X&&b&&z.jsxs("div",{className:"relative",children:[z.jsx("span",{className:"absolute bottom-0 top-0 border-l border-border/40",style:{left:`${L*16+14}px`},"aria-hidden":"true"}),C.children?.map(A=>z.jsx(Zt,{item:A,level:L+1,viewMode:o,expandedDirs:k,onItemClick:f,renderFileIcon:i,formatFileSize:s,formatRelativeTime:r,onRename:c,onDelete:_,onNewFile:x,onNewFolder:y,onCopyPath:p,onDownload:n,onUpload:h,onRefresh:a,dropTarget:d,onItemDragOver:l,renamingItem:g,renameValue:w,setRenameValue:E,handleConfirmRename:S,handleCancelRename:F,renameInputRef:v,operationLoading:D},A.path))]})]})}function gn({items:C,viewMode:L,expandedDirs:o,onItemClick:k,renderFileIcon:f,formatFileSize:i,formatRelativeTime:s,onRename:r,onDelete:c,onNewFile:_,onNewFolder:x,onCopyPath:y,onDownload:p,onUpload:n,onRefresh:h,dropTarget:a,onItemDragOver:d,renamingItem:l,renameValue:g,setRenameValue:w,handleConfirmRename:E,handleCancelRename:S,renameInputRef:F,operationLoading:v}){return z.jsx("div",{children:C.map(D=>z.jsx(Zt,{item:D,level:0,viewMode:L,expandedDirs:o,onItemClick:k,renderFileIcon:f,formatFileSize:i,formatRelativeTime:s,onRename:r,onDelete:c,onNewFile:_,onNewFolder:x,onCopyPath:y,onDownload:p,onUpload:n,onRefresh:h,dropTarget:a,onItemDragOver:d,renamingItem:l,renameValue:g,setRenameValue:w,handleConfirmRename:E,handleCancelRename:S,renameInputRef:F,operationLoading:v},D.path))})}function yn({files:C,filteredFiles:L,error:o,searchQuery:k,viewMode:f,expandedDirs:i,onItemClick:s,renderFileIcon:r,formatFileSize:c,formatRelativeTime:_,onRename:x,onDelete:y,onNewFile:p,onNewFolder:n,onCopyPath:h,onDownload:a,onUpload:d,onRefresh:l,dropTarget:g,onItemDragOver:w,renamingItem:E,renameValue:S,setRenameValue:F,handleConfirmRename:v,handleCancelRename:D,renameInputRef:j,operationLoading:U}){const{t:X}=we();return z.jsx(z.Fragment,{children:o?z.jsx(et,{icon:Dt,title:X("fileTree.loadFailed"),description:o}):C.length===0?z.jsx(et,{icon:dt,title:X("fileTree.noFilesFound"),description:X("fileTree.checkProjectPath")}):L.length===0&&k?z.jsx(et,{icon:Ot,title:X("fileTree.noMatchesFound"),description:X("fileTree.tryDifferentSearch")}):z.jsx(gn,{items:L,viewMode:f,expandedDirs:i,onItemClick:s,renderFileIcon:r,formatFileSize:c,formatRelativeTime:_,onRename:x,onDelete:y,onNewFile:p,onNewFolder:n,onCopyPath:h,onDownload:a,onUpload:d,onRefresh:l,dropTarget:g,onItemDragOver:w,renamingItem:E,renameValue:S,setRenameValue:F,handleConfirmRename:v,handleCancelRename:D,renameInputRef:j,operationLoading:U})})}function _n(){const{t:C}=we();return z.jsx("div",{className:"border-b border-border px-3 pb-1 pt-1.5",children:z.jsxs("div",{className:"grid grid-cols-12 gap-2 px-1 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground/70",children:[z.jsx("div",{className:"col-span-5",children:C("fileTree.name")}),z.jsx("div",{className:"col-span-2",children:C("fileTree.size")}),z.jsx("div",{className:"col-span-3",children:C("fileTree.modified")}),z.jsx("div",{className:"col-span-2",children:C("fileTree.permissions")})]})})}function bn({viewMode:C,onViewModeChange:L,searchQuery:o,onSearchQueryChange:k,onNewFile:f,onNewFolder:i,onUploadFiles:s,onRefresh:r,onCollapseAll:c,loading:_,operationLoading:x,isUploading:y,uploadProgress:p}){const{t:n}=we(),h=$.useRef(null),a=d=>{const{files:l}=d.target;l&&l.length>0&&s?.(l),d.target.value=""};return z.jsxs("div",{className:"space-y-2 border-b border-border px-3 pb-2 pt-3",children:[z.jsxs("div",{className:"flex items-center justify-between",children:[z.jsx("h3",{className:"text-sm font-medium text-foreground",children:n("fileTree.files")}),z.jsxs("div",{className:"flex items-center gap-0.5",children:[s&&z.jsxs(z.Fragment,{children:[z.jsx("input",{ref:h,type:"file",multiple:!0,className:"hidden",onChange:a,tabIndex:-1,"aria-hidden":"true"}),z.jsxs(be,{variant:"ghost",size:"sm",className:"relative h-7 w-7 p-0",onClick:()=>h.current?.click(),title:y?n("fileTree.uploadingFiles","Uploading files"):n("fileTree.uploadFiles","Upload files (max {{size}} each)",{size:lt}),"aria-label":n("fileTree.uploadFiles","Upload files (max {{size}} each)",{size:lt}),disabled:x,children:[y?z.jsx(Rt,{className:"h-3.5 w-3.5 animate-spin"}):z.jsx(Fe,{className:"h-3.5 w-3.5"}),y&&typeof p=="number"&&z.jsx("span",{className:"absolute bottom-0.5 left-1/2 h-0.5 w-4 -translate-x-1/2 overflow-hidden rounded-full bg-primary/20",children:z.jsx("span",{className:"block h-full rounded-full bg-primary transition-[width] duration-150",style:{width:`${p}%`}})})]})]}),f&&z.jsx(be,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:f,title:n("fileTree.newFile","New File (Cmd+N)"),"aria-label":n("fileTree.newFile","New File (Cmd+N)"),disabled:x,children:z.jsx(ve,{className:"h-3.5 w-3.5"})}),i&&z.jsx(be,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:i,title:n("fileTree.newFolder","New Folder (Cmd+Shift+N)"),"aria-label":n("fileTree.newFolder","New Folder (Cmd+Shift+N)"),disabled:x,children:z.jsx(rt,{className:"h-3.5 w-3.5"})}),r&&z.jsx(be,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:r,title:n("fileTree.refresh","Refresh"),"aria-label":n("fileTree.refresh","Refresh"),disabled:x,children:z.jsx(nt,{className:pe("w-3.5 h-3.5",_&&"animate-spin")})}),c&&z.jsx(be,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:c,title:n("fileTree.collapseAll","Collapse All"),"aria-label":n("fileTree.collapseAll","Collapse All"),children:z.jsx(Qt,{className:"h-3.5 w-3.5"})}),z.jsx("div",{className:"mx-0.5 h-4 w-px bg-border"}),z.jsx(be,{variant:C==="simple"?"default":"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:()=>L("simple"),title:n("fileTree.simpleView"),"aria-label":n("fileTree.simpleView"),children:z.jsx(er,{className:"h-3.5 w-3.5"})}),z.jsx(be,{variant:C==="compact"?"default":"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:()=>L("compact"),title:n("fileTree.compactView"),"aria-label":n("fileTree.compactView"),children:z.jsx(tr,{className:"h-3.5 w-3.5"})}),z.jsx(be,{variant:C==="detailed"?"default":"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:()=>L("detailed"),title:n("fileTree.detailedView"),"aria-label":n("fileTree.detailedView"),children:z.jsx(Dr,{className:"h-3.5 w-3.5"})})]})]}),z.jsxs("div",{className:"relative",children:[z.jsx(Ot,{className:"absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),z.jsx(ct,{type:"text",placeholder:n("fileTree.searchPlaceholder"),value:o,onChange:d=>k(d.target.value),className:"h-8 pl-8 pr-8 text-sm"}),o&&z.jsx(be,{variant:"ghost",size:"sm",className:"absolute right-0.5 top-1/2 h-5 w-5 -translate-y-1/2 p-0 hover:bg-accent",onClick:()=>k(""),title:n("fileTree.clearSearch"),"aria-label":n("fileTree.clearSearch"),children:z.jsx(ut,{className:"h-3 w-3"})})]})]})}function xn(){const{t:C}=we();return z.jsx("div",{className:"flex h-full items-center justify-center",children:z.jsx("div",{className:"text-sm text-muted-foreground",children:C("fileTree.loading")})})}const vn=C=>Math.min(100,Math.max(0,C)),Tt=C=>C===1?"file":"files";function wn({upload:C}){const{t:L}=we();if(!C)return null;const o=vn(C.progress),k=C.status==="uploading",f=C.status==="complete",i=C.status==="error",s=C.fileCount===1&&C.fileName?C.fileName:`${C.fileCount} ${Tt(C.fileCount)}`,r=k?L("fileTree.uploadingFiles","Uploading files"):f?L("fileTree.uploadComplete","Upload complete"):L("fileTree.uploadFailed","Upload failed"),c=i?C.error:f&&typeof C.uploadedCount=="number"?L("fileTree.uploadedCount","Uploaded {{uploaded}} of {{total}} {{label}}",{uploaded:C.uploadedCount,total:C.fileCount,label:Tt(C.fileCount)}):s,_=i?rr:f?nr:Fe;return z.jsxs("div",{className:pe("border-b px-3 py-2 transition-colors",i?"border-red-500/20 bg-red-500/10 text-red-700 dark:text-red-300":f?"border-emerald-500/20 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300":"border-primary/20 bg-primary/10 text-foreground"),children:[z.jsxs("div",{className:"flex min-h-[36px] items-center gap-2",children:[z.jsx("div",{className:pe("flex h-7 w-7 shrink-0 items-center justify-center rounded-md",i?"bg-red-500/15":f?"bg-emerald-500/15":"bg-primary/15"),children:z.jsx(_,{className:pe("h-3.5 w-3.5",k&&"animate-pulse")})}),z.jsxs("div",{className:"min-w-0 flex-1",children:[z.jsxs("div",{className:"flex items-center justify-between gap-3",children:[z.jsx("span",{className:"truncate text-xs font-medium",children:r}),z.jsx("span",{className:"shrink-0 text-[11px] tabular-nums text-muted-foreground",children:k?`${o}%`:f?L("common.done","Done"):L("common.failed","Failed")})]}),z.jsx("div",{className:"mt-1 truncate text-[11px] text-muted-foreground",children:c})]})]}),z.jsx("div",{className:"mt-2 h-1.5 overflow-hidden rounded-full bg-background/80",children:z.jsx("div",{className:pe("h-full rounded-full transition-[width] duration-200",i?"bg-red-500":f?"bg-emerald-500":"bg-primary"),style:{width:`${i?Math.max(o,8):o}%`}})})]})}function kn({file:C,onClose:L}){const o=`/api/file-tree/projects/${C.projectId}/files/content?path=${encodeURIComponent(C.path)}`,[k,f]=$.useState(null),[i,s]=$.useState(null),[r,c]=$.useState(!0);return $.useEffect(()=>{let _=null;const x=new AbortController;return(async()=>{try{c(!0),s(null),f(null);const p=await ir(o,{signal:x.signal});if(!p.ok)throw new Error(`Request failed with status ${p.status}`);const n=await p.blob();_=URL.createObjectURL(n),f(_)}catch(p){if(p instanceof Error&&p.name==="AbortError")return;console.error("Error loading image:",p),s("Unable to load image")}finally{c(!1)}})(),()=>{x.abort(),_&&URL.revokeObjectURL(_)}},[o]),z.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",children:z.jsxs("div",{className:"mx-4 max-h-[90vh] w-full max-w-4xl overflow-hidden rounded-lg bg-white shadow-xl dark:bg-gray-800",children:[z.jsxs("div",{className:"flex items-center justify-between border-b p-4",children:[z.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:C.name}),z.jsx(be,{variant:"ghost",size:"sm",onClick:L,className:"h-8 w-8 p-0",children:z.jsx(ut,{className:"h-4 w-4"})})]}),z.jsxs("div",{className:"flex min-h-[400px] items-center justify-center bg-gray-50 p-4 dark:bg-gray-900",children:[r&&z.jsx("div",{className:"text-center text-gray-500 dark:text-gray-400",children:z.jsx("p",{children:"Loading image..."})}),!r&&k&&z.jsx("img",{src:k,alt:C.name,className:"max-h-[70vh] max-w-full rounded-lg object-contain shadow-md"}),!r&&!k&&z.jsxs("div",{className:"text-center text-gray-500 dark:text-gray-400",children:[z.jsx("p",{children:i||"Unable to load image"}),z.jsx("p",{className:"mt-2 break-all text-sm",children:C.path})]})]}),z.jsx("div",{className:"border-t bg-gray-50 p-4 dark:bg-gray-800",children:z.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:C.path})})]})})}function Nn({selectedProject:C,onFileOpen:L}){const{t:o}=we(),[k,f]=$.useState(null),[i,s]=$.useState(null),r=$.useRef(null),c=$.useRef(null),_=$.useCallback((Y,O)=>{s({message:Y,type:O})},[]);$.useEffect(()=>{if(i){const Y=setTimeout(()=>s(null),3e3);return()=>clearTimeout(Y)}},[i]);const{files:x,loading:y,error:p,refreshFiles:n}=Ur(C),{viewMode:h,changeViewMode:a}=rn(),{expandedDirs:d,toggleDirectory:l,expandDirectories:g,collapseAll:w}=Lr(),{searchQuery:E,setSearchQuery:S,filteredFiles:F}=tn({files:x,expandDirectories:g}),v=Vr({selectedProject:C,onRefresh:n,showToast:_}),D=hn({selectedProject:C,onRefresh:n,showToast:_}),j=v.operationLoading||D.operationLoading,U=$.useRef(null),X=$.useRef(""),{uploadFiles:b}=D,B=$.useCallback(Y=>{X.current=Y,U.current?.click()},[]),t=$.useCallback(Y=>{const{files:O}=Y.target;O&&O.length>0&&b(Array.from(O),X.current),Y.target.value=""},[b]);$.useEffect(()=>{v.isCreating&&r.current&&(r.current.focus(),r.current.select())},[v.isCreating]),$.useEffect(()=>{v.renamingItem&&c.current&&(c.current.focus(),c.current.select())},[v.renamingItem]);const M=$.useCallback(Y=>{const{icon:O,color:K}=Br(Y);return z.jsx(O,{className:pe(wt,K)})},[]),te=$.useCallback(Y=>{if(Y.type==="directory"){l(Y.path);return}if(en(Y.name)&&C){f({name:Y.name,path:Y.path,projectPath:C.path,projectId:C.projectId});return}L?.(Y.path)},[L,C,l]),W=$.useCallback(Y=>Qr(Y,o),[o]);return y?z.jsx(xn,{}):z.jsxs("div",{ref:D.treeRef,className:"relative flex h-full flex-col bg-background",onDragEnter:D.handleDragEnter,onDragOver:D.handleDragOver,onDragLeave:D.handleDragLeave,onDrop:D.handleDrop,children:[z.jsx("input",{ref:U,type:"file",multiple:!0,className:"hidden",onChange:t,tabIndex:-1,"aria-hidden":"true"}),D.isDragOver&&z.jsx("div",{className:"pointer-events-none absolute inset-0 z-50 flex items-center justify-center border-2 border-dashed border-blue-500 bg-blue-500/10",children:z.jsxs("div",{className:"flex items-center gap-3 rounded-lg bg-background/95 px-6 py-4 shadow-lg",children:[z.jsx(Fe,{className:"h-6 w-6 text-blue-500"}),z.jsx("span",{className:"text-sm font-medium",children:D.dropTarget?o("fileTree.dropToUploadTo",'Drop files to upload to "{{folder}}"',{folder:D.dropTarget.split(/[\\/]/).pop()}):o("fileTree.dropToUpload","Drop files to upload")})]})}),z.jsx(bn,{viewMode:h,onViewModeChange:a,searchQuery:E,onSearchQueryChange:S,onUploadFiles:D.handleFileSelect,onNewFile:()=>v.handleStartCreate("","file"),onNewFolder:()=>v.handleStartCreate("","directory"),onRefresh:n,onCollapseAll:w,loading:y,operationLoading:j,isUploading:D.uploadProgress?.status==="uploading",uploadProgress:D.uploadProgress?.progress??null}),z.jsx(wn,{upload:D.uploadProgress}),h==="detailed"&&F.length>0&&z.jsx(_n,{}),z.jsxs(ar,{className:"flex-1 px-2 py-1",children:[v.isCreating&&z.jsxs("div",{className:"mb-1 flex items-center gap-1.5 py-[3px] pr-2",style:{paddingLeft:`${(v.newItemParent.split("/").length-1)*16+4}px`},children:[v.newItemType==="directory"?z.jsx(dt,{className:pe(wt,"text-blue-500")}):z.jsx("span",{className:"ml-[18px]",children:M(v.newItemName)}),z.jsx(ct,{ref:r,type:"text",value:v.newItemName,onChange:Y=>v.setNewItemName(Y.target.value),onKeyDown:Y=>{Y.stopPropagation(),Y.key==="Enter"&&v.handleConfirmCreate(),Y.key==="Escape"&&v.handleCancelCreate()},onBlur:()=>{setTimeout(()=>{v.isCreating&&v.handleConfirmCreate()},100)},className:"h-6 flex-1 text-sm",disabled:j})]}),z.jsx(yn,{files:x,filteredFiles:F,error:p,searchQuery:E,viewMode:h,expandedDirs:d,onItemClick:te,renderFileIcon:M,formatFileSize:Jr,formatRelativeTime:W,onRename:v.handleStartRename,onDelete:v.handleStartDelete,onNewFile:Y=>v.handleStartCreate(Y,"file"),onNewFolder:Y=>v.handleStartCreate(Y,"directory"),onCopyPath:v.handleCopyPath,onDownload:v.handleDownload,onUpload:B,onRefresh:n,dropTarget:D.dropTarget,onItemDragOver:D.handleItemDragOver,renamingItem:v.renamingItem,renameValue:v.renameValue,setRenameValue:v.setRenameValue,handleConfirmRename:v.handleConfirmRename,handleCancelRename:v.handleCancelRename,renameInputRef:c,operationLoading:j})]}),k&&z.jsx(kn,{file:k,onClose:()=>f(null)}),v.deleteConfirmation.isOpen&&v.deleteConfirmation.item&&z.jsx("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center bg-black/50",children:z.jsxs("div",{className:"mx-4 max-w-sm rounded-lg border border-border bg-background p-4 shadow-lg",children:[z.jsxs("div",{className:"mb-4 flex items-center gap-3",children:[z.jsx("div",{className:"rounded-full bg-red-100 p-2 dark:bg-red-900/30",children:z.jsx(Dt,{className:"h-5 w-5 text-red-600 dark:text-red-400"})}),z.jsxs("div",{children:[z.jsx("h3",{className:"font-medium text-foreground",children:o("fileTree.delete.title","Delete {{type}}",{type:v.deleteConfirmation.item.type==="directory"?"Folder":"File"})}),z.jsx("p",{className:"text-sm text-muted-foreground",children:v.deleteConfirmation.item.name})]})]}),z.jsx("p",{className:"mb-4 text-sm text-muted-foreground",children:v.deleteConfirmation.item.type==="directory"?o("fileTree.delete.folderWarning","This folder and all its contents will be permanently deleted."):o("fileTree.delete.fileWarning","This file will be permanently deleted.")}),z.jsxs("div",{className:"flex justify-end gap-2",children:[z.jsx("button",{onClick:v.handleCancelDelete,disabled:j,className:"rounded-md px-3 py-1.5 text-sm transition-colors hover:bg-accent",children:o("common.cancel","Cancel")}),z.jsxs("button",{onClick:v.handleConfirmDelete,disabled:j,className:"flex items-center gap-2 rounded-md bg-red-600 px-3 py-1.5 text-sm text-white transition-colors hover:bg-red-700 disabled:opacity-50",children:[j&&z.jsx(Rt,{className:"h-4 w-4 animate-spin"}),o("fileTree.delete.confirm","Delete")]})]})]})}),i&&z.jsxs("div",{className:pe("fixed bottom-4 right-4 z-[9999] px-4 py-2 rounded-lg shadow-lg flex items-center gap-2 animate-in slide-in-from-bottom-2",i.type==="success"?"bg-green-600 text-white":"bg-red-600 text-white"),children:[i.type==="success"?z.jsx(sr,{className:"h-4 w-4"}):z.jsx(ut,{className:"h-4 w-4"}),z.jsx("span",{className:"text-sm",children:i.message})]})]})}export{Nn as default};
|