@hivemagnus/magnus-ui 1.0.1 → 1.0.2
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/dist/app/apps/dashboard/.next/BUILD_ID +1 -1
- package/dist/app/apps/dashboard/.next/build-manifest.json +56 -56
- package/dist/app/apps/dashboard/.next/prerender-manifest.json +3 -3
- package/dist/app/apps/dashboard/.next/required-server-files.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_global-error/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/_global-error/page.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_global-error.html +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_global-error.rsc +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_not-found/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/_not-found/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/anomalies/[anomalyId]/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/anomalies/[anomalyId]/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/anomalies/[anomalyId]/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/anomalies/[anomalyId]/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/anomalies/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/anomalies/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/anomalies/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/anomalies/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/anomalies/remediation/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/anomalies/remediation/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/anomalies/remediation/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/anomalies/remediation/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/auth/hive/callback/route.js +6 -6
- package/dist/app/apps/dashboard/.next/server/app/api/auth/hive/callback/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/auth/hive/configured/route.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/api/auth/hive/configured/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/auth/hive/start/route.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/api/auth/hive/start/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/auth/login/route.js +6 -6
- package/dist/app/apps/dashboard/.next/server/app/api/auth/login/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/auth/logout/route.js +8 -8
- package/dist/app/apps/dashboard/.next/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/auth/me/route.js +5 -5
- package/dist/app/apps/dashboard/.next/server/app/api/auth/me/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/control-nodes/[id]/route.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/api/control-nodes/[id]/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/control-nodes/migrate/route.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/control-nodes/migrate/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/control-nodes/route.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/api/control-nodes/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/federation/route.js +9 -9
- package/dist/app/apps/dashboard/.next/server/app/api/federation/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/health/route.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/health/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/hermes/dashboard/[[...path]]/route.js +6 -6
- package/dist/app/apps/dashboard/.next/server/app/api/hermes/dashboard/[[...path]]/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/hive-router/dashboard/[[...path]]/route.js +5 -5
- package/dist/app/apps/dashboard/.next/server/app/api/hive-router/dashboard/[[...path]]/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/internal/resource-enrollment/drain/route.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/api/internal/resource-enrollment/drain/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/proxy/[...path]/route.js +9 -9
- package/dist/app/apps/dashboard/.next/server/app/api/proxy/[...path]/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/close/route.js +7 -7
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/close/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/input/route.js +7 -7
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/input/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/join/route.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/join/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/open/route.js +12 -12
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/open/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/promote/route.js +7 -7
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/promote/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/resize/route.js +7 -7
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/resize/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/share/route.js +7 -7
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/share/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/stream/route.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/stream/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/ws/route.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/ws/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api-docs/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/api-docs/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/api-docs/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api-docs/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/application-operations/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/application-operations/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/application-operations/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/application-operations/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/installations/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/ardent/installations/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/ardent/installations/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/installations/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/ardent/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/ardent/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/[id]/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/[id]/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/[id]/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/[id]/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/audit/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/audit/page.js +4 -4
- package/dist/app/apps/dashboard/.next/server/app/audit/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/audit/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/codex/installations/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/codex/installations/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/codex/installations/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/codex/installations/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/codex/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/codex/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/codex/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/codex/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/commands/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/commands/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/commands/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/commands/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/cron/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/cron/page/server-reference-manifest.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/cron/page.js +4 -4
- package/dist/app/apps/dashboard/.next/server/app/cron/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/cron/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/files/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/files/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/files/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/files/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/fleet-map/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/fleet-map/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/fleet-map/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/fleet-map/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/fleet-readiness/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/fleet-readiness/page.js +4 -4
- package/dist/app/apps/dashboard/.next/server/app/fleet-readiness/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/fleet-readiness/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/fleet-timeline/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/fleet-timeline/page.js +4 -4
- package/dist/app/apps/dashboard/.next/server/app/fleet-timeline/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/fleet-timeline/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/governor/operations/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/governor/operations/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/governor/operations/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/governor/operations/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/governor/share/[token]/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/governor/share/[token]/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/governor/share/[token]/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/governor/share/[token]/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/hermes-drift/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/hermes-drift/page.js +4 -4
- package/dist/app/apps/dashboard/.next/server/app/hermes-drift/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/hermes-drift/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/hermes-security/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/hermes-security/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/hermes-security/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/hermes-security/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/icon.svg/route.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/icon.svg/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/incidents/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/incidents/page.js +4 -4
- package/dist/app/apps/dashboard/.next/server/app/incidents/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/incidents/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/library/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/library/page.js +4 -4
- package/dist/app/apps/dashboard/.next/server/app/library/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/library/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/login/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/login/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/login/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/logs/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/logs/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/logs/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/logs/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/mission-control/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/mission-control/page.js +4 -4
- package/dist/app/apps/dashboard/.next/server/app/mission-control/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/mission-control/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/nodes/[nodeId]/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/nodes/[nodeId]/page/react-loadable-manifest.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/nodes/[nodeId]/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/nodes/[nodeId]/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/nodes/[nodeId]/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/nodes/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/nodes/page.js +4 -4
- package/dist/app/apps/dashboard/.next/server/app/nodes/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/nodes/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/notifications/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/notifications/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/notifications/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/notifications/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/installations/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/orchestra/installations/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/orchestra/installations/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/installations/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/orchestra/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/orchestra/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/profiles/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/orchestra/profiles/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/orchestra/profiles/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/profiles/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/web-gateway/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/orchestra/web-gateway/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/orchestra/web-gateway/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/web-gateway/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/page/react-loadable-manifest.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/page.js +4 -4
- package/dist/app/apps/dashboard/.next/server/app/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/retention/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/retention/page.js +4 -4
- package/dist/app/apps/dashboard/.next/server/app/retention/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/retention/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/roles/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/roles/page.js +4 -4
- package/dist/app/apps/dashboard/.next/server/app/roles/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/roles/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/rollouts/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/rollouts/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/rollouts/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/rollouts/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/[caseId]/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/[caseId]/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/[caseId]/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/[caseId]/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/entities/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/entities/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/entities/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/entities/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/events/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/events/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/events/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/events/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/evidence/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/evidence/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/evidence/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/evidence/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/page.js +4 -4
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/policies/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/policies/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/policies/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/policies/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/sources/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/sources/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/sources/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/sources/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/skills/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/skills/page/server-reference-manifest.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/skills/page.js +4 -4
- package/dist/app/apps/dashboard/.next/server/app/skills/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/webhooks/[id]/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/webhooks/[id]/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/webhooks/[id]/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/webhooks/[id]/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/webhooks/new/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/webhooks/new/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/webhooks/new/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/webhooks/new/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/webhooks/page/build-manifest.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/webhooks/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/webhooks/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/webhooks/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/{[externals]__008p31tyfke4p._.js → [externals]__04mrhyqb1ufrv._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/[externals]__0c8llxdk0vw6c._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/{[externals]__127ju0a21em5b._.js → [externals]__1-nhjrs611jhq._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/{[externals]__19s3z4xub-s5g._.js → [externals]__12udgi92o71ao._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/{[externals]__0oquf_joz4imb._.js → [externals]__16ij4oi2sj-rr._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/{[externals]__03sskbmq69qzo._.js → [externals]__187hm276lglag._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/{[externals]__1j9d977zxln9e._.js → [externals]__1fagjmvrmd51m._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/{[root-of-the-server]__1gbe_ef7h5s4s._.js → [root-of-the-server]__0-yqr0-10hc0_._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/{[root-of-the-server]__11j8mz2i5lxvn._.js → [root-of-the-server]__06nhceb5uf63i._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/{[root-of-the-server]__14aadvs_w6cq9._.js → [root-of-the-server]__09q7ixy9dkn77._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/{[root-of-the-server]__18bl_zdpbstlo._.js → [root-of-the-server]__0a3vv554ltxx-._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/{[root-of-the-server]__16mwoo9uguylg._.js → [root-of-the-server]__0cn86kzz3hpv3._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__0kyzfsxt0lqmw._.js +7 -7
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__0tva5tfgfuthn._.js +206 -0
- package/dist/app/apps/dashboard/.next/server/chunks/{[root-of-the-server]__0xlbop91l63ny._.js → [root-of-the-server]__0uj0ijk3ozu-l._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__0y71f5krqzyd9._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__150x74j-d_djz._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__15bjnu5yieigz._.js +3 -3
- package/dist/app/apps/dashboard/.next/server/chunks/{[root-of-the-server]__0dbkbse3ahd2w._.js → [root-of-the-server]__16rqx2oazfcv5._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/{[root-of-the-server]__0wwd68idziz8p._.js → [root-of-the-server]__1i35sr1_-chih._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__1vywioi0uxxp2._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/_0-w_jq1-cxsud._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/_00ln_4foby9k6._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/_0_fjgwmia8tfa._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/_0cz-sjd6cade0._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/_0h965a-fek_i1._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/_0j68riv96qwg8._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/_0jaugku4pdkak._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/_0jpo8wzqrpdsu._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/_0jvoc4-ta3zc0._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/_0rpixw8k9f_1q._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/_0s788ryrplkp6._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/_0ss4gyka2xwtu._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/_0ti6qpnzqaoee._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/_0z1bwl42i7kyh._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/_109zj-srrib-n._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/_158j5k3z37xqq._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/_1bbph2o31ut9-._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/_1bnwf9dhenncq._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/_1di30nby6-dr0._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/_1e42zgily9-_5._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/_1j9ys57oirxn5._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/_1pyikdwas349f._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/_1vpikd37nriwr._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/_1xodprib7qa_j._.js +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/_1xoy6p0t2si_y._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/apps_dashboard_src_lib_auth_ts_1hhq1tq6hjj-e._.js +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/apps_dashboard_src_lib_hive-login_ts_0ab2iq7-rpy13._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/{node_modules_0d7iiw_gb9ie_._.js → node_modules_04l42sk4k7jqc._.js} +3 -3
- package/dist/app/apps/dashboard/.next/server/chunks/{node_modules_0oydwsbt-8fj0._.js → node_modules_11zk8u7fu3bfa._.js} +3 -3
- package/dist/app/apps/dashboard/.next/server/chunks/{node_modules_1j205d3rrp_ve._.js → node_modules_1ze5f5ud32ii7._.js} +3 -3
- package/dist/app/apps/dashboard/.next/server/chunks/node_modules_next_0g8xe7c6fvfgl._.js +61 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__03u0iwrsol58b._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__01fwdfqdnpl41._.js → [root-of-the-server]__08qjsqx5xg5sp._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__0l_h8q81ktozu._.js → [root-of-the-server]__0bpezsts2nk27._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__1jsl-i6vpy67t._.js → [root-of-the-server]__0cjs7a6nlno3a._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__0ayqtni_d_zat._.js → [root-of-the-server]__0iw2gybtg_uwp._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__1vgcdwjm3kky8._.js → [root-of-the-server]__0l8hx5fmmz73w._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__14v2mw9pp87q5._.js → [root-of-the-server]__0l8uocvha6qpv._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__1iu3g_aey5-2t._.js → [root-of-the-server]__0p95c61y11y6q._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__1c2-kff21qbp1._.js → [root-of-the-server]__0wly91np9rak4._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__0gg--jhi4nfke._.js → [root-of-the-server]__0z6dblsnzx20l._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__10vlrswrzvf4x._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__136kygh22io_q._.js → [root-of-the-server]__12tzy7fpv7mea._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__1_nim1fz4p-f5._.js → [root-of-the-server]__1477x3csbkdfa._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__1-p4bt5_oohm8._.js → [root-of-the-server]__16q4-tbu02sit._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__0wygzdp44n944._.js → [root-of-the-server]__19kgtx10ey2jw._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__1vjevhqrszq2x._.js → [root-of-the-server]__1cdwjg6sttmzq._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__0fwb-62ncs-g8._.js → [root-of-the-server]__1cnr5ucuq-tas._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__1i_lf6u7i-ce7._.js → [root-of-the-server]__1s0tp902hhgv5._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_033mw4lb6hg5v._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_05_jycpmoagp2._.js +3 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_083obx7eqpdb6._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_0pgm38c_ix0jk._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_1ml_bvfb1fitq._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_0gs_s688kgg1i._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_cron_page_tsx_1i3duyygc0_tg._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_files_page_tsx_1kls9-qinldks._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_nodes_nodes-client_tsx_0pt4iarhpqbgn._.js +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_skills_page_tsx_0n5zp4xad38in._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_lib_api-client_ts_0tho-kkk5ez7h._.js +2 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_lib_cn_ts_0038m9h2x02mo._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_lib_cn_ts_1p8--q21wpxcq._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{node_modules_0baa492_t21ua._.js → node_modules_01i0ukei4d8fh._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_0r87b6r_5hggb._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_1unf5c-k6rle8._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{node_modules_@xterm_0a9mhzkkyaexr._.js → node_modules_@xterm_0igvl11h9lkh1._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_refresh-ccw-dot_1bka5q1p8_fx4.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_next_06ob4w68jmryj._.js +32 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_next_dist_0janj0i6dqko7._.js +3 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{node_modules_next_dist_1_6--c12g_0c8._.js → node_modules_next_dist_0n6z_kn7rdm9s._.js} +22 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_next_dist_112u6z88a3g80._.js +54 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_next_dist_1khq67j4vo9y4._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_next_dist_1qrfck6kfdp-h._.js +3 -3
- package/dist/app/apps/dashboard/.next/server/middleware-build-manifest.js +56 -56
- package/dist/app/apps/dashboard/.next/server/middleware.js +2 -2
- package/dist/app/apps/dashboard/.next/server/pages/500.html +1 -1
- package/dist/app/apps/dashboard/.next/server/preview-props.json +3 -3
- package/dist/app/apps/dashboard/.next/server/server-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/server-reference-manifest.json +3 -3
- package/dist/app/apps/dashboard/.next/static/chunks/{3zkikie0jjdck.js → 07pjhg_to7dzv.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/{3sp2cijnoequi.js → 0akep08qly94l.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/{3rnduuxf48bud.js → 0rb485ohk6md7.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/0u4hpe9c52_j7.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/{19uky_q8p2lq7.js → 144lduiqejqn6.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/1dldgklwy-d1m.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/{200t8wg-mkgcl.js → 1ka4ptby_22zq.js} +2 -2
- package/dist/app/apps/dashboard/.next/static/chunks/230jc2e9pxyrn.js +2 -0
- package/dist/app/apps/dashboard/.next/static/chunks/{0-dikax-7opx9.js → 28q140y6b7-89.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/2_46_b2fwiefm.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/2f_8x6hbx8hcy.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/2koijmn3fv51d.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/{1dv7-6iv0mmpc.js → 2w06s_csq4lq9.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/{1t-inm5k6qdjb.js → 2zfns6xyegode.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/36hoxd3zs7thr.js +4 -0
- package/dist/app/apps/dashboard/.next/static/chunks/{2v8qi2um3ebh8.js → 3ltx1we1130yf.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/3vpeqic83hqi4.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/3x0jzyr-nzhaj.js +1 -0
- package/dist/app/apps/dashboard/package.json +21 -21
- package/dist/app/apps/dashboard/server.js +1 -1
- package/dist/app/node_modules/@next/env/package.json +1 -1
- package/dist/app/node_modules/next/dist/build/swc/index.js +1 -1
- package/dist/app/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +24 -24
- package/dist/app/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +26 -26
- package/dist/app/node_modules/next/dist/compiled/next-server/app-route-turbo.runtime.prod.js +3 -3
- package/dist/app/node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js +13 -13
- package/dist/app/node_modules/next/dist/lib/patch-incorrect-lockfile.js +3 -3
- package/dist/app/node_modules/next/dist/server/app-render/app-render.js +41 -40
- package/dist/app/node_modules/next/dist/server/app-render/async-local-storage.js +1 -1
- package/dist/app/node_modules/next/dist/server/app-render/dynamic-rendering-validation.js +814 -0
- package/dist/app/node_modules/next/dist/server/app-render/dynamic-rendering.js +1 -799
- package/dist/app/node_modules/next/dist/server/base-server.js +39 -5
- package/dist/app/node_modules/next/dist/server/config.js +1 -1
- package/dist/app/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +2 -2
- package/dist/app/node_modules/next/dist/server/dev/hot-reloader-webpack.js +1 -1
- package/dist/app/node_modules/next/dist/server/lib/app-info-log.js +1 -1
- package/dist/app/node_modules/next/dist/server/lib/dedupe-fetch.js +4 -43
- package/dist/app/node_modules/next/dist/server/lib/patch-fetch-symbol.js +13 -0
- package/dist/app/node_modules/next/dist/server/lib/patch-fetch.js +3 -7
- package/dist/app/node_modules/next/dist/server/lib/router-server.js +3 -3
- package/dist/app/node_modules/next/dist/server/lib/router-utils/instrumentation-globals.external.js +77 -12
- package/dist/app/node_modules/next/dist/server/lib/start-server.js +1 -1
- package/dist/app/node_modules/next/dist/server/lib/trace/constants.js +12 -0
- package/dist/app/node_modules/next/dist/server/lib/trace/tracer.js +30 -14
- package/dist/app/node_modules/next/dist/server/next-server.js +10 -11
- package/dist/app/node_modules/next/dist/server/route-modules/pages/pages-handler.js +29 -23
- package/dist/app/node_modules/next/dist/server/route-modules/route-module.js +85 -8
- package/dist/app/node_modules/next/dist/server/use-cache/use-cache-wrapper.js +1 -1
- package/dist/app/node_modules/next/dist/server/web/adapter.js +124 -65
- package/dist/app/node_modules/next/dist/server/web/forward-trace-context.js +102 -0
- package/dist/app/node_modules/next/dist/telemetry/anonymous-meta.js +1 -1
- package/dist/app/node_modules/next/dist/telemetry/events/swc-load-failure.js +1 -1
- package/dist/app/node_modules/next/dist/telemetry/events/version.js +2 -2
- package/dist/app/node_modules/next/package.json +10 -10
- package/dist/app/node_modules/react/cjs/react.production.js +112 -89
- package/dist/app/node_modules/react/package.json +3 -3
- package/dist/app/node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.js +1165 -790
- package/dist/app/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.js +1171 -791
- package/dist/app/node_modules/react-dom/cjs/react-dom-server.browser.production.js +1321 -885
- package/dist/app/node_modules/react-dom/cjs/react-dom-server.edge.production.js +1331 -888
- package/dist/app/node_modules/react-dom/cjs/react-dom-server.node.production.js +1345 -918
- package/dist/app/node_modules/react-dom/cjs/react-dom.production.js +24 -5
- package/dist/app/node_modules/react-dom/package.json +6 -6
- package/package.json +21 -21
- package/dist/app/apps/dashboard/.next/server/chunks/[externals]__20foc2fayer1h._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__0fj6mr59tcyhd._.js +0 -465
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__1gtv08z8_5n1d._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__1hov5of4utc4i._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__1p_4c8q9368we._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/node_modules_next_0sx6ib_cz483a._.js +0 -320
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_1rwff962kyi-f._.js +0 -11
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_0yc0r3jgbz1n2._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_0y2ixgupgmqjw._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_next_1rs5fyuw7ryji._.js +0 -271
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_next_dist_02gi-7dkkyj58._.js +0 -313
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_next_dist_1dupwucoqt5qm._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_next_dist_shared_lib_1p_7c7q9c7kdw._.js +0 -23
- package/dist/app/apps/dashboard/.next/static/chunks/0emw9pnglrabk.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/0nk_updyz_tfq.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/228pxgpdddlyl.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/2id56ot_k0n72.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/3igqsagsgmp14.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/3j3pw8h_ynhqf.js +0 -4
- package/dist/app/apps/dashboard/.next/static/chunks/3myt7_smzzvme.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/3r1n-vlupwlqx.js +0 -9
- package/dist/app/apps/dashboard/.next/static/chunks/3y7ljiq4dptwp.js +0 -1
- package/dist/app/node_modules/react/cjs/react.development.js +0 -1284
- /package/dist/app/apps/dashboard/.next/static/{Dg-cuGMpBrY-PQC6V5cDi → UZn0mscl5hk5YJtZnvSnK}/_buildManifest.js +0 -0
- /package/dist/app/apps/dashboard/.next/static/{Dg-cuGMpBrY-PQC6V5cDi → UZn0mscl5hk5YJtZnvSnK}/_clientMiddlewareManifest.js +0 -0
- /package/dist/app/apps/dashboard/.next/static/{Dg-cuGMpBrY-PQC6V5cDi → UZn0mscl5hk5YJtZnvSnK}/_ssgManifest.js +0 -0
package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__0kyzfsxt0lqmw._.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
module.exports=[[21640,e=>{let t,r;var s=e.i(66680),i=e.i(43698),o=e.i(2157);e.i(794),e.i(61095);var n=e.i(50227);let a=(e={})=>({type:"string",...e}),l=(e={})=>({type:"url",...e}),c=(e={})=>({type:"path",...e}),u=(e={})=>({type:"integer",...e}),h=Object.freeze({CONTROL_API_URL:l({default:"https://localhost:4000",purpose:"Default Magnus Control API target."}),CONTROL_API_CA_PATH:c({optional:!0,purpose:"Private CA bundle used for verified Control API TLS."}),CONTROL_API_MAX_RESPONSE_BYTES:u({default:1048576,minimum:1024,purpose:"Maximum accepted Control API response size in bytes."}),DASHBOARD_PROXY_BODY_LIMIT_BYTES:u({default:1048576,minimum:1,purpose:"Maximum forwarded request body size in bytes, enforced while streaming."}),API_SECRET:a({required:!0,sensitive:!0,purpose:"Server-side secret injected into Control API proxy requests."}),CONTROL_NODE_CREDENTIAL_KEY:a({required:!0,sensitive:!0,minimumLength:32,purpose:"Dedicated key for encrypted control-node credentials at rest."}),SESSION_SECRET:a({optional:!0,sensitive:!0,requirement:"Required; temporary legacy fallback is separately gated",purpose:"Dedicated dashboard session signing secret."}),SESSION_ISSUER:a({default:"magnus-dashboard",purpose:"Required issuer claim for dashboard session tokens."}),SESSION_AUDIENCE:a({default:"magnus-dashboard-session",purpose:"Required audience claim for dashboard session tokens."}),ALLOW_LEGACY_SESSION_SECRET:a({default:"false",enum:["true","false"],purpose:"Temporary opt-in for the expiring JWT_SECRET session fallback."}),HERMES_SSH_AUTHORIZATIONS_FILE:c({default:".magnus/hermes-ssh-authorizations.json",requirement:"Required (default path shown)",purpose:"Reviewed installation, node, address, and SSH host-key bindings."}),DASHBOARD_PUBLIC_ORIGIN:l({required:!0,purpose:"Canonical browser origin allowed to open the Hermes WebSocket bridge."}),HERMES_WEBSOCKET_ALLOWED_ORIGINS:a({optional:!0,purpose:"Comma-separated additional allowed Hermes WebSocket origins."}),DASHBOARD_ADMIN_USERNAME:a({optional:!0,requirement:"Required with DASHBOARD_ADMIN_PASSWORD_HASH; deployment may serialize it",purpose:"Dedicated dashboard administrator identity."}),DASHBOARD_ADMIN_USERNAME_B64:a({optional:!0,sensitive:!0,purpose:"Serializer-managed base64 form of the dashboard administrator identity."}),DASHBOARD_ADMIN_PASSWORD_HASH:a({optional:!0,requirement:"Required with DASHBOARD_ADMIN_USERNAME; Argon2id only",sensitive:!0,purpose:"Non-reusable Argon2id dashboard administrator password verifier."}),DASHBOARD_ADMIN_PASSWORD_HASH_B64:a({optional:!0,sensitive:!0,purpose:"Serializer-managed base64 form of the Argon2id verifier."}),DASHBOARD_ADMIN_CREDENTIAL_METADATA_B64:a({optional:!0,sensitive:!0,purpose:"Versioned non-secret credential purpose, rotation, fleet-password, and fingerprint-separation evidence."}),DASHBOARD_LOGIN_USERNAME:a({optional:!0,purpose:"Temporary two-phase migration source for the former dedicated dashboard login."}),DASHBOARD_LOGIN_PASSWORD:a({optional:!0,sensitive:!0,purpose:"Temporary two-phase reusable secret; rejected when equal to fleet or bootstrap credentials."}),REDIS_URL:l({default:"redis://127.0.0.1:6379",sensitive:!0,purpose:"Durable dashboard authentication throttling and concurrency store."}),REDIS_PREFIX:a({default:"magnus-",purpose:"Namespace prefix for durable Redis authentication limiter keys."}),AUTH_RATE_LIMIT_LABEL_KEY:a({optional:!0,sensitive:!0,purpose:"Optional dedicated HMAC key for de-identifying authentication limiter labels."}),DASHBOARD_SSH_USERNAME:a({optional:!0,requirement:"Required for the terminal and Hermes proxy",purpose:"Dedicated, unprivileged dashboard proxy account on managed nodes."}),DASHBOARD_SSH_PASSWORD:a({optional:!0,sensitive:!0,purpose:"Optional dedicated dashboard SSH password; restricted keys are preferred."}),DASHBOARD_SSH_PRIVATE_KEY_PATH:c({optional:!0,requirement:"Required for the terminal and Hermes proxy (or DASHBOARD_SSH_PASSWORD)",purpose:"Restricted dashboard-proxy private key with no deployment privileges."}),NEXT_PUBLIC_API_URL:l({default:"https://localhost:4000",public:!0,purpose:"Legacy build-time Control API URL; must never contain a secret."}),HIVE_OAUTH_DISCOVERY_URL:l({optional:!0,purpose:"Hive OAuth discovery URL for optional named dashboard login; HTTPS required."}),HIVE_OAUTH_CLIENT_ID:a({optional:!0,purpose:"Registered Magnus dashboard OAuth client ID."}),HIVE_OAUTH_CLIENT_SECRET:a({optional:!0,sensitive:!0,purpose:"Optional confidential OAuth client secret, kept server-side."}),HIVE_OAUTH_ISSUER:l({optional:!0,purpose:"Exact trusted Hive access-token issuer."}),HIVE_OAUTH_API_AUDIENCE:a({optional:!0,purpose:"Exact access-token audience accepted by the Control API."}),HIVE_OAUTH_SCOPE:a({default:"openid profile email",purpose:"Registered named-user OAuth scopes."}),HIVE_ROUTER_ADMIN_URL:l({optional:!0,purpose:"Optional Hive Router admin plane; enables the embedded router dashboard proxy."}),HIVE_ROUTER_CA_PATH:c({optional:!0,purpose:"Optional private CA bundle for hostname-verified Hive Router TLS."}),MAGNUS_SECURITY_CONSOLE_URL:l({optional:!0,purpose:"Optional external security console; enables the Security pages and nav entry."}),MAGNUS_HERMES_ENABLED:a({default:"false",enum:["true","false"],purpose:"Enables the optional Hermes Agent pages, dashboard proxy and WebSocket bridge."}),PORT:u({default:3e3,minimum:1,purpose:"Listen port for magnus-ui start."}),HOST:a({default:"0.0.0.0",purpose:"Listen address for magnus-ui start."}),TLS_CERT_PATH:c({optional:!0,requirement:"Required unless MAGNUS_UI_ALLOW_HTTP=true",purpose:"PEM certificate served by magnus-ui start."}),TLS_KEY_PATH:c({optional:!0,requirement:"Required unless MAGNUS_UI_ALLOW_HTTP=true",purpose:"PEM private key for TLS_CERT_PATH."}),MAGNUS_UI_DATA_DIR:c({optional:!0,purpose:"Working directory for runtime state (.magnus/, terminal-audit/); magnus-ui start defaults it to the current directory."}),UI_SECURITY_LOG_PATH:c({default:".magnus/security-events.jsonl",purpose:"Append-only authentication audit log; login fails closed when it cannot be written."}),MAGNUS_UI_ALLOW_HTTP:a({default:"false",enum:["true","false"],purpose:"Serve plain HTTP when no TLS certificate is configured (local development or behind a TLS proxy only)."})});function d(e,t){throw Error(`${e} ${t}`)}function f(e,t=process.env){let r=h[e];r||d(e,"is not declared in the dashboard environment schema");let s=t[e]?.trim()||r.default;if(null==s||""===s){r.required&&d(e,"is required");return}if(r.enum&&!r.enum.includes(String(s))&&d(e,`must be one of: ${r.enum.join(", ")}`),"integer"===r.type){let t=Number(s);return(!Number.isSafeInteger(t)||t<(r.minimum??Number.MIN_SAFE_INTEGER))&&d(e,`must be an integer of at least ${r.minimum}`),t}if("url"===r.type)try{return new URL(String(s)).toString().replace(/\/$/,"")}catch{d(e,"must be an absolute URL")}return"path"===r.type&&String(s).includes("\0")&&d(e,"must not contain NUL bytes"),"string"===r.type&&r.minimumLength&&String(s).length<r.minimumLength&&d(e,`must contain at least ${r.minimumLength} characters`),String(s)}let p=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,y=/^[0-9a-f]{64}$/,m=new Set(["terminal-http","terminal-ws","hermes-http","hermes-ws"]);function g(e){return Array.isArray(e)?`[${e.map(g).join(",")}]`:e&&"object"==typeof e?`{${Object.keys(e).sort().map(t=>`${JSON.stringify(t)}:${g(e[t])}`).join(",")}}`:JSON.stringify(e)}function S(e){let t=e.RESOURCE_ENROLLMENT_DASHBOARD_SECRET;if("string"!=typeof t||t.length<32||["API_SECRET","SESSION_SECRET","JWT_SECRET","NODE_MANAGER_SECRET","RESULT_SIGNING_SECRET","MAGNUS_SECRET","SECURITY_SENTI_BRIDGE_TOKEN","COMMAND_RECONCILIATION_SECRET","RESOURCE_PARTICIPANT_RECONCILIATION_SECRET","CREDENTIAL_ROTATION_KEY","AGENT_DISCOVERY_SECRET","RESOURCE_LEASE_RESULT_SECRET","RESOURCE_ENROLLMENT_NODE_SECRET","RESOURCE_LEASE_ADAPTER_SECRET"].some(r=>e[r]&&e[r]===t))throw Error("Dashboard resource participant credential is unavailable or not dedicated");return t}let b=function({env:e=process.env,request:t=(t,r)=>(function(e,t,r){let s=S(e),n=new URL(e.CONTROL_API_URL??"");if("https:"!==n.protocol||n.username||n.password||n.search||n.hash)throw Error("Dashboard resource authority must use verified HTTPS");let a=new URL(`${n.pathname.replace(/\/+$/,"")}/api/v1/resource-leases/enrollment/dashboard${t}`,n.origin),l=JSON.stringify(r);return new Promise((t,r)=>{let n=(0,i.request)(a,{method:"POST",...function(e=process.env){let t=f("CONTROL_API_CA_PATH",e);if(!t)return{rejectUnauthorized:!0};if(!(0,o.existsSync)(t))throw Error(`CONTROL_API_CA_PATH does not exist: ${t}`);return{rejectUnauthorized:!0,ca:(0,o.readFileSync)(t)}}(e),timeout:5e3,headers:{"content-type":"application/json","content-length":Buffer.byteLength(l),"x-resource-drain-key":s}},e=>{let s="";e.on("data",e=>{s+=e.toString(),Buffer.byteLength(s)>65536&&n.destroy(Error("Resource authority response exceeded limit"))}),e.on("error",r),e.on("end",()=>{try{if(200!==e.statusCode)throw Error("Resource authority denied managed SSH admission or settlement");let r=JSON.parse(s);if(!0!==r.success||!r.data)throw Error("Invalid resource authority response");t(r.data)}catch(e){r(e)}})});n.on("timeout",()=>n.destroy(Error("Resource authority request timed out"))),n.on("error",r),n.end(l)})})(e,t,r),ownerId:r=(0,s.randomUUID)()}={}){if(!p.test(r))throw Error("Invalid dashboard process incarnation");return{async begin(i,o){let n;if(S(e),"string"!=typeof i||!i||i.length>253||!m.has(o))throw Error("Invalid managed SSH target or kind");let a=(0,s.randomUUID)(),l=Date.now()+9e5,c=(0,s.createHash)("sha256").update(g({domain:"magnus.dashboard-external-session.v1",host:i.toLowerCase(),workId:a,ownerId:r,kind:o,effectBoundary:"external-unverified"})).digest("hex"),u=await t("/work/reserve",{host:i,workId:a,ownerId:r,kind:o,operationSha256:c,deadline:l});if("string"!=typeof u.nodeId||!u.nodeId||"string"!=typeof u.nodeFqdn||!u.nodeFqdn||u.workId!==a||"dashboard"!==u.participant||u.ownerId!==r||u.kind!==o||"reserved"!==u.state||!Number.isSafeInteger(u.epoch)||u.epoch<0||!(null===u.barrierId||p.test(u.barrierId))||!y.test(u.requestSha256)||u.operationSha256!==c||!/^[1-9][0-9]{0,19}$/.test(u.fence)||u.deadline!==l)throw Error("Invalid managed SSH reservation");let h=await t(`/work/${a}/start`,{ownerId:r,epoch:u.epoch,barrierId:u.barrierId,operationSha256:c,fence:u.fence,deadline:l,requestSha256:u.requestSha256});if(h.workId!==a||"dashboard"!==h.participant||h.ownerId!==r||h.kind!==o||h.nodeId!==u.nodeId||h.nodeFqdn!==u.nodeFqdn||h.epoch!==u.epoch||h.barrierId!==u.barrierId||h.operationSha256!==c||h.fence!==u.fence||h.deadline!==l||h.requestSha256!==u.requestSha256||"running"!==h.state)throw Error("Managed SSH start was not acknowledged");return{workId:a,finish:(e="unknown",i=(0,s.createHash)("sha256").update(g({workId:a,ownerId:r,disposition:e,proof:"transport-observation-only"})).digest("hex"))=>["not-started","remote-ended","unknown"].includes(e)&&y.test(i)?n??=t(`/work/${a}/finish`,{ownerId:r,disposition:e,evidenceSha256:i}):Promise.reject(Error("Invalid managed SSH disposition"))}},async drain(r,i){let o=S(e);if("string"!=typeof i||Buffer.byteLength(i)!==Buffer.byteLength(o)||!(0,s.timingSafeEqual)(Buffer.from(i),Buffer.from(o)))throw Error("Invalid drain authentication");let n=["version","participant","nodeId","nodeFqdn","epoch","barrierId","challengeId","expiresAt"].sort();if(!r||Object.keys(r).sort().join()!==n.join()||1!==r.version||"dashboard"!==r.participant||"string"!=typeof r.nodeId||!r.nodeId||"string"!=typeof r.nodeFqdn||!r.nodeFqdn||!Number.isSafeInteger(r.epoch)||!p.test(r.barrierId)||!p.test(r.challengeId)||!Number.isSafeInteger(r.expiresAt)||r.expiresAt<=Date.now())throw Error("Invalid or expired drain challenge");let a=(0,s.randomUUID)(),l=await t("/status",{nodeId:r.nodeId,nonce:a});if(1!==l.version||l.nodeId!==r.nodeId||l.nodeFqdn!==r.nodeFqdn||l.nonce!==a||l.epoch!==r.epoch||l.barrierId!==r.barrierId||l.challenge?.challengeId!==r.challengeId||l.challenge?.expiresAt!==r.expiresAt||r.expiresAt<=Date.now()||"draining"!==l.state||!Number.isSafeInteger(l.activeCount)||l.activeCount<0||!Number.isSafeInteger(l.unknownCount)||l.unknownCount<0||!y.test(l.evidenceSha256))throw Error("Drain challenge did not match authoritative durable state");let c={...r,status:0===l.activeCount&&0===l.unknownCount?"drained":"pending",activeCount:l.activeCount,unknownCount:l.unknownCount,evidenceSha256:l.evidenceSha256};return{...c,signature:(0,s.createHmac)("sha256",o).update("magnus.resource-enrollment.v1\n"+g(c)).digest("hex")}}}}();function _(e,t="unknown"){e.finish(t).catch(()=>{console.error("Managed SSH settlement unacknowledged; resource drain remains blocked")})}e.i(699),e.i(61892),e.i(51468),e.i(59892),e.i(38479),e.i(72038);var k=e.i(74272),E=e.i(32174);k.default;var v=e.i(57764),w=e.i(29072),C=e.i(6401);let A="2026-10-01T00:00:00.000Z",O=!1;function T(e,t,r){if(!!e!=!!t)throw Error(r)}function R(e,t){let r=e[`${t}_B64`];if(null!=r){if(!/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(r))throw Error(`${t}_B64 is not valid base64`);return Buffer.from(r,"base64").toString("utf8")}return e[t]}let I=()=>new TextEncoder().encode(function(e=process.env,t=Date.now()){if(e.SESSION_SECRET)return e.SESSION_SECRET;if(function(e=process.env,t=Date.now()){let r=!!e.SESSION_SECRET,s=!!e.JWT_SECRET,i="true"===e.ALLOW_LEGACY_SESSION_SECRET,o=t>=Date.parse(A);return{configured:r||s&&i&&!o,source:r?"dedicated":s&&i&&!o?"legacy_jwt_secret":"missing",legacyFallbackActive:!r&&s&&i&&!o,legacyFallbackAllowed:i&&!o,migrationDeadline:A}}(e,t).legacyFallbackActive)return O||(O=!0,console.error(`[SECURITY:HIGH] ALLOW_LEGACY_SESSION_SECRET=true is reusing JWT_SECRET for dashboard sessions; migrate before ${A}`)),e.JWT_SECRET;if(e.JWT_SECRET&&"true"!==e.ALLOW_LEGACY_SESSION_SECRET)throw Error("SESSION_SECRET is required; JWT_SECRET fallback requires ALLOW_LEGACY_SESSION_SECRET=true");if(e.JWT_SECRET)throw Error(`Legacy JWT_SECRET session fallback expired on ${A}`);throw Error("SESSION_SECRET is required")}());async function x(){return t||(t=new C.Redis(process.env.REDIS_URL??"redis://127.0.0.1:6379",{maxRetriesPerRequest:1,connectTimeout:2e3,commandTimeout:2500,enableOfflineQueue:!1})).on("error",()=>void 0),("connecting"===t.status||"connect"===t.status)&&await new Promise((e,r)=>{let s=()=>{t.off("error",i),e()},i=e=>{t.off("ready",s),r(e)};t.once("ready",s),t.once("error",i)}),t}async function N(e){var t;let r;if("hive"===e.provider)return!0;if("string"!=typeof e.username||!e.sessionId||!/^[a-f0-9-]{36}$/.test(e.sessionId))return!1;let i=(t=e.username,`magnus_session:local:${(0,s.createHmac)("sha256",I()).update(t).digest("hex")}`),[o,n]=await (await x()).mget(`${i}:generation`,`${i}:session:${e.sessionId}`);return!!(o&&n===`${o}:${r=function(e=process.env,t=new Date){let r=R(e,"DASHBOARD_ADMIN_USERNAME"),s=R(e,"DASHBOARD_ADMIN_PASSWORD");if(r&&s)return{username:r,password:s,source:"dashboard-admin-password",version:2};let i=R(e,"DASHBOARD_ADMIN_PASSWORD_HASH");if(T(r,i,"DASHBOARD_ADMIN_USERNAME and DASHBOARD_ADMIN_PASSWORD (or _HASH) must be configured together"),r&&i){if(!i.startsWith("$argon2id$"))throw Error("DASHBOARD_ADMIN_PASSWORD_HASH must be an Argon2id hash");return{username:r,passwordHash:i,source:"dashboard-admin-hash",version:2}}let o=R(e,"DASHBOARD_LOGIN_USERNAME"),n=R(e,"DASHBOARD_LOGIN_PASSWORD");if(T(o,n,"DASHBOARD_LOGIN_USERNAME and DASHBOARD_LOGIN_PASSWORD must be configured together"),!o||!n)throw Error("Dedicated dashboard administrator credentials are required");if(t>=new Date("2026-10-01T00:00:00Z"))throw Error("Legacy dashboard login credentials have expired; configure the dashboard administrator hash");for(let t of["DASHBOARD_SSH_PASSWORD","BOOTSTRAP_SSH_PASSWORD"])if(e[t]&&n===e[t])throw Error(`Dashboard login password must not equal ${t}`);return{username:o,password:n,source:"legacy-dashboard-login",version:1}}(),(0,s.createHmac)("sha256",I()).update(JSON.stringify([r.username,r.passwordHash??r.password,process.env.LOCAL_SESSION_GENERATION??""])).digest("hex")}`)}let M=new TextEncoder,D=new TextDecoder;function P(e){let t=new Uint8Array(e.length);for(let r=0;r<e.length;r++){let s=e.charCodeAt(r);if(s>127)throw TypeError("non-ASCII string encountered in encode()");t[r]=s}return t}function B(e){if(Uint8Array.fromBase64)return Uint8Array.fromBase64("string"==typeof e?e:D.decode(e),{alphabet:"base64url"});let t=e;t instanceof Uint8Array&&(t=D.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/");try{var r=t;if(Uint8Array.fromBase64)return Uint8Array.fromBase64(r);let e=atob(r),s=new Uint8Array(e.length);for(let t=0;t<e.length;t++)s[t]=e.charCodeAt(t);return s}catch{throw TypeError("The input to be decoded is not correctly encoded.")}}class L extends Error{static code="ERR_JOSE_GENERIC";code="ERR_JOSE_GENERIC";constructor(e,t){super(e,t),this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}}class U extends L{static code="ERR_JWT_CLAIM_VALIDATION_FAILED";code="ERR_JWT_CLAIM_VALIDATION_FAILED";claim;reason;payload;constructor(e,t,r="unspecified",s="unspecified"){super(e,{cause:{claim:r,reason:s,payload:t}}),this.claim=r,this.reason=s,this.payload=t}}class F extends L{static code="ERR_JWT_EXPIRED";code="ERR_JWT_EXPIRED";claim;reason;payload;constructor(e,t,r="unspecified",s="unspecified"){super(e,{cause:{claim:r,reason:s,payload:t}}),this.claim=r,this.reason=s,this.payload=t}}class j extends L{static code="ERR_JOSE_ALG_NOT_ALLOWED";code="ERR_JOSE_ALG_NOT_ALLOWED"}class H extends L{static code="ERR_JOSE_NOT_SUPPORTED";code="ERR_JOSE_NOT_SUPPORTED"}class W extends L{static code="ERR_JWS_INVALID";code="ERR_JWS_INVALID"}class G extends L{static code="ERR_JWT_INVALID";code="ERR_JWT_INVALID"}class z extends L{static code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";constructor(e="signature verification failed",t){super(e,t)}}let Q=(e,t="algorithm.name")=>TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`);function K(e,t){if(parseInt(e.hash.name.slice(4),10)!==t)throw Q(`SHA-${t}`,"algorithm.hash")}function q(e,t,...r){if((r=r.filter(Boolean)).length>2){let t=r.pop();e+=`one of type ${r.join(", ")}, or ${t}.`}else 2===r.length?e+=`one of type ${r[0]} or ${r[1]}.`:e+=`of type ${r[0]}.`;return null==t?e+=` Received ${t}`:"function"==typeof t&&t.name?e+=` Received function ${t.name}`:"object"==typeof t&&null!=t&&t.constructor?.name&&(e+=` Received an instance of ${t.constructor.name}`),e}let V=(e,t,...r)=>q(`Key for the ${e} algorithm must be `,t,...r);async function J(e,t,r){if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw TypeError(((e,...t)=>q("Key must be ",e,...t))(t,"CryptoKey","KeyObject","JSON Web Key"));return crypto.subtle.importKey("raw",t,{hash:`SHA-${e.slice(-3)}`,name:"HMAC"},!1,[r])}return!function(e,t,r){switch(t){case"HS256":case"HS384":case"HS512":if("HMAC"!==e.algorithm.name)throw Q("HMAC");K(e.algorithm,parseInt(t.slice(2),10));break;case"RS256":case"RS384":case"RS512":if("RSASSA-PKCS1-v1_5"!==e.algorithm.name)throw Q("RSASSA-PKCS1-v1_5");K(e.algorithm,parseInt(t.slice(2),10));break;case"PS256":case"PS384":case"PS512":if("RSA-PSS"!==e.algorithm.name)throw Q("RSA-PSS");K(e.algorithm,parseInt(t.slice(2),10));break;case"Ed25519":case"EdDSA":if("Ed25519"!==e.algorithm.name)throw Q("Ed25519");break;case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":let s;if(s=e.algorithm,s.name!==t)throw Q(t);break;case"ES256":case"ES384":case"ES512":{if("ECDSA"!==e.algorithm.name)throw Q("ECDSA");let r=function(e){switch(e){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw Error("unreachable")}}(t);if(e.algorithm.namedCurve!==r)throw Q(r,"algorithm.namedCurve");break}default:throw TypeError("CryptoKey does not support this operation")}if(r&&!e.usages.includes(r))throw TypeError(`CryptoKey does not support this operation, its usages must include ${r}.`)}(t,e,r),t}async function Y(e,t,r,s){let i=await J(e,t,"verify");!function(e,t){if(e.startsWith("RS")||e.startsWith("PS")){let{modulusLength:r}=t.algorithm;if("number"!=typeof r||r<2048)throw TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}}(e,i);let o=function(e,t){let r=`SHA-${e.slice(-3)}`;switch(e){case"HS256":case"HS384":case"HS512":return{hash:r,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:r,name:"RSA-PSS",saltLength:parseInt(e.slice(-3),10)>>3};case"RS256":case"RS384":case"RS512":return{hash:r,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:r,name:"ECDSA",namedCurve:t.namedCurve};case"Ed25519":case"EdDSA":return{name:"Ed25519"};case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":return{name:e};default:throw new H(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}(e,i.algorithm);try{return await crypto.subtle.verify(o,i,r,s)}catch{return!1}}function $(e,t,r){try{return B(e)}catch{throw new r(`Failed to base64url decode the ${t}`)}}function X(e){if("object"!=typeof e||null===e||"[object Object]"!==Object.prototype.toString.call(e))return!1;if(null===Object.getPrototypeOf(e))return!0;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}Symbol();let Z=e=>X(e)&&"string"==typeof e.kty,ee=e=>{if(e?.[Symbol.toStringTag]==="CryptoKey")return!0;try{return e instanceof CryptoKey}catch{return!1}},et=e=>e?.[Symbol.toStringTag]==="KeyObject",er=e=>ee(e)||et(e),es=e=>e?.[Symbol.toStringTag],ei=(e,t,r)=>{if(void 0!==t.use){let e;switch(r){case"sign":case"verify":e="sig";break;case"encrypt":case"decrypt":e="enc"}if(t.use!==e)throw TypeError(`Invalid key for this operation, its "use" must be "${e}" when present`)}if(void 0!==t.alg&&t.alg!==e)throw TypeError(`Invalid key for this operation, its "alg" must be "${e}" when present`);if(Array.isArray(t.key_ops)){let s;switch(!0){case"sign"===r||"verify"===r:case"dir"===e:case e.includes("CBC-HS"):s=r;break;case e.startsWith("PBES2"):s="deriveBits";break;case/^A\d{3}(?:GCM)?(?:KW)?$/.test(e):s=!e.includes("GCM")&&e.endsWith("KW")?"encrypt"===r?"wrapKey":"unwrapKey":r;break;case"encrypt"===r&&e.startsWith("RSA"):s="wrapKey";break;case"decrypt"===r:s=e.startsWith("RSA")?"unwrapKey":"deriveBits"}if(s&&t.key_ops?.includes?.(s)===!1)throw TypeError(`Invalid key for this operation, its "key_ops" must include "${s}" when present`)}return!0},eo='Invalid or unsupported JWK "alg" (Algorithm) Parameter value';async function en(e){if(!e.alg)throw TypeError('"alg" argument is required when "jwk.alg" is not present');let{algorithm:t,keyUsages:r}=function(e){let t,r;switch(e.kty){case"AKP":switch(e.alg){case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":t={name:e.alg},r=e.priv?["sign"]:["verify"];break;default:throw new H(eo)}break;case"RSA":switch(e.alg){case"PS256":case"PS384":case"PS512":t={name:"RSA-PSS",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":t={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":t={name:"RSA-OAEP",hash:`SHA-${parseInt(e.alg.slice(-3),10)||1}`},r=e.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new H(eo)}break;case"EC":switch(e.alg){case"ES256":case"ES384":case"ES512":t={name:"ECDSA",namedCurve:({ES256:"P-256",ES384:"P-384",ES512:"P-521"})[e.alg]},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:"ECDH",namedCurve:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new H(eo)}break;case"OKP":switch(e.alg){case"Ed25519":case"EdDSA":t={name:"Ed25519"},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new H(eo)}break;default:throw new H('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:t,keyUsages:r}}(e),s={...e};return"AKP"!==s.kty&&delete s.alg,delete s.use,crypto.subtle.importKey("jwk",s,t,e.ext??(!e.d&&!e.priv),e.key_ops??r)}let ea="given KeyObject instance cannot be used for this algorithm",el=async(e,t,s,i=!1)=>{let o=(r||=new WeakMap).get(e);if(o?.[s])return o[s];let n=await en({...t,alg:s});return i&&Object.freeze(e),o?o[s]=n:r.set(e,{[s]:n}),n};async function ec(e,t){if(e instanceof Uint8Array||ee(e))return e;if(et(e)){if("secret"===e.type)return e.export();if("toCryptoKey"in e&&"function"==typeof e.toCryptoKey)try{return((e,t)=>{let s,i=(r||=new WeakMap).get(e);if(i?.[t])return i[t];let o="public"===e.type,n=!!o;if("x25519"===e.asymmetricKeyType){switch(t){case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":break;default:throw TypeError(ea)}s=e.toCryptoKey(e.asymmetricKeyType,n,o?[]:["deriveBits"])}if("ed25519"===e.asymmetricKeyType){if("EdDSA"!==t&&"Ed25519"!==t)throw TypeError(ea);s=e.toCryptoKey(e.asymmetricKeyType,n,[o?"verify":"sign"])}switch(e.asymmetricKeyType){case"ml-dsa-44":case"ml-dsa-65":case"ml-dsa-87":if(t!==e.asymmetricKeyType.toUpperCase())throw TypeError(ea);s=e.toCryptoKey(e.asymmetricKeyType,n,[o?"verify":"sign"])}if("rsa"===e.asymmetricKeyType){let r;switch(t){case"RSA-OAEP":r="SHA-1";break;case"RS256":case"PS256":case"RSA-OAEP-256":r="SHA-256";break;case"RS384":case"PS384":case"RSA-OAEP-384":r="SHA-384";break;case"RS512":case"PS512":case"RSA-OAEP-512":r="SHA-512";break;default:throw TypeError(ea)}if(t.startsWith("RSA-OAEP"))return e.toCryptoKey({name:"RSA-OAEP",hash:r},n,o?["encrypt"]:["decrypt"]);s=e.toCryptoKey({name:t.startsWith("PS")?"RSA-PSS":"RSASSA-PKCS1-v1_5",hash:r},n,[o?"verify":"sign"])}if("ec"===e.asymmetricKeyType){let r=new Map([["prime256v1","P-256"],["secp384r1","P-384"],["secp521r1","P-521"]]).get(e.asymmetricKeyDetails?.namedCurve);if(!r)throw TypeError(ea);let i={ES256:"P-256",ES384:"P-384",ES512:"P-521"};i[t]&&r===i[t]&&(s=e.toCryptoKey({name:"ECDSA",namedCurve:r},n,[o?"verify":"sign"])),t.startsWith("ECDH-ES")&&(s=e.toCryptoKey({name:"ECDH",namedCurve:r},n,o?[]:["deriveBits"]))}if(!s)throw TypeError(ea);return i?i[t]=s:r.set(e,{[t]:s}),s})(e,t)}catch(e){if(e instanceof TypeError)throw e}let s=e.export({format:"jwk"});return el(e,s,t)}if(Z(e))return e.k?B(e.k):el(e,e,t,!0);throw Error("unreachable")}async function eu(e,t,r){if(!X(e))throw new W("Flattened JWS must be an object");if(void 0===e.protected&&void 0===e.header)throw new W('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==e.protected&&"string"!=typeof e.protected)throw new W("JWS Protected Header incorrect type");if(void 0===e.payload)throw new W("JWS Payload missing");if("string"!=typeof e.signature)throw new W("JWS Signature missing or incorrect type");if(void 0!==e.header&&!X(e.header))throw new W("JWS Unprotected Header incorrect type");let s={};if(e.protected)try{let t=B(e.protected);s=JSON.parse(D.decode(t))}catch{throw new W("JWS Protected Header is invalid")}if(!function(...e){let t,r=e.filter(Boolean);if(0===r.length||1===r.length)return!0;for(let e of r){let r=Object.keys(e);if(!t||0===t.size){t=new Set(r);continue}for(let e of r){if(t.has(e))return!1;t.add(e)}}return!0}(s,e.header))throw new W("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let i={...s,...e.header},o=function(e,t,r,s,i){let o;if(void 0!==i.crit&&s?.crit===void 0)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!s||void 0===s.crit)return new Set;if(!Array.isArray(s.crit)||0===s.crit.length||s.crit.some(e=>"string"!=typeof e||0===e.length))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');for(let n of(o=void 0!==r?new Map([...Object.entries(r),...t.entries()]):t,s.crit)){if(!o.has(n))throw new H(`Extension Header Parameter "${n}" is not recognized`);if(void 0===i[n])throw new e(`Extension Header Parameter "${n}" is missing`);if(o.get(n)&&void 0===s[n])throw new e(`Extension Header Parameter "${n}" MUST be integrity protected`)}return new Set(s.crit)}(W,new Map([["b64",!0]]),r?.crit,s,i),n=!0;if(o.has("b64")&&"boolean"!=typeof(n=s.b64))throw new W('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:a}=i;if("string"!=typeof a||!a)throw new W('JWS "alg" (Algorithm) Header Parameter missing or invalid');let l=r&&function(e,t){if(void 0!==t&&(!Array.isArray(t)||t.some(e=>"string"!=typeof e)))throw TypeError(`"${e}" option must be an array of strings`);if(t)return new Set(t)}("algorithms",r.algorithms);if(l&&!l.has(a))throw new j('"alg" (Algorithm) Header Parameter value not allowed');if(n){if("string"!=typeof e.payload)throw new W("JWS Payload must be a string")}else if("string"!=typeof e.payload&&!(e.payload instanceof Uint8Array))throw new W("JWS Payload must be a string or an Uint8Array instance");let c=!1;"function"==typeof t&&(t=await t(s,e),c=!0);var u=t,h="verify";switch(a.substring(0,2)){case"A1":case"A2":case"di":case"HS":case"PB":((e,t,r)=>{if(!(t instanceof Uint8Array)){if(Z(t)){if("oct"===t.kty&&"string"==typeof t.k&&ei(e,t,r))return;throw TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present')}if(!er(t))throw TypeError(V(e,t,"CryptoKey","KeyObject","JSON Web Key","Uint8Array"));if("secret"!==t.type)throw TypeError(`${es(t)} instances for symmetric algorithms must be of type "secret"`)}})(a,u,h);break;default:((e,t,r)=>{if(Z(t))switch(r){case"decrypt":case"sign":if("oct"!==t.kty&&("AKP"===t.kty&&"string"==typeof t.priv||"string"==typeof t.d)&&ei(e,t,r))return;throw TypeError("JSON Web Key for this operation must be a private JWK");case"encrypt":case"verify":if("oct"!==t.kty&&void 0===t.d&&void 0===t.priv&&ei(e,t,r))return;throw TypeError("JSON Web Key for this operation must be a public JWK")}if(!er(t))throw TypeError(V(e,t,"CryptoKey","KeyObject","JSON Web Key"));if("secret"===t.type)throw TypeError(`${es(t)} instances for asymmetric algorithms must not be of type "secret"`);if("public"===t.type)switch(r){case"sign":throw TypeError(`${es(t)} instances for asymmetric algorithm signing must be of type "private"`);case"decrypt":throw TypeError(`${es(t)} instances for asymmetric algorithm decryption must be of type "private"`)}if("private"===t.type)switch(r){case"verify":throw TypeError(`${es(t)} instances for asymmetric algorithm verifying must be of type "public"`);case"encrypt":throw TypeError(`${es(t)} instances for asymmetric algorithm encryption must be of type "public"`)}})(a,u,h)}let d=function(...e){let t=new Uint8Array(e.reduce((e,{length:t})=>e+t,0)),r=0;for(let s of e)t.set(s,r),r+=s.length;return t}(void 0!==e.protected?P(e.protected):new Uint8Array,P("."),"string"==typeof e.payload?n?P(e.payload):M.encode(e.payload):e.payload),f=$(e.signature,"signature",W),p=await ec(t,a);if(!await Y(a,p,f,d))throw new z;let y={payload:n?$(e.payload,"payload",W):"string"==typeof e.payload?M.encode(e.payload):e.payload};return(void 0!==e.protected&&(y.protectedHeader=s),void 0!==e.header&&(y.unprotectedHeader=e.header),c)?{...y,key:p}:y}async function eh(e,t,r){if(e instanceof Uint8Array&&(e=D.decode(e)),"string"!=typeof e)throw new W("Compact JWS must be a string or Uint8Array");let{0:s,1:i,2:o,length:n}=e.split(".");if(3!==n)throw new W("Invalid Compact JWS");let a=await eu({payload:i,protected:s,signature:o},t,r),l={payload:a.payload,protectedHeader:a.protectedHeader};return"function"==typeof t?{...l,key:a.key}:l}let ed=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i;function ef(e){let t,r=ed.exec(e);if(!r||r[4]&&r[1])throw TypeError("Invalid time period format");let s=parseFloat(r[2]);switch(r[3].toLowerCase()){case"sec":case"secs":case"second":case"seconds":case"s":t=Math.round(s);break;case"minute":case"minutes":case"min":case"mins":case"m":t=Math.round(60*s);break;case"hour":case"hours":case"hr":case"hrs":case"h":t=Math.round(3600*s);break;case"day":case"days":case"d":t=Math.round(86400*s);break;case"week":case"weeks":case"w":t=Math.round(604800*s);break;default:t=Math.round(0x1e187e0*s)}return"-"===r[1]||"ago"===r[4]?-t:t}let ep=e=>e.includes("/")?e.toLowerCase():`application/${e.toLowerCase()}`;async function ey(e,t,r){let s=await eh(e,t,r);if(s.protectedHeader.crit?.includes("b64")&&!1===s.protectedHeader.b64)throw new G("JWTs MUST NOT use unencoded payload");let i={payload:function(e,t,r={}){var s,i;let o,n;try{o=JSON.parse(D.decode(t))}catch{}if(!X(o))throw new G("JWT Claims Set must be a top-level JSON object");let{typ:a}=r;if(a&&("string"!=typeof e.typ||ep(e.typ)!==ep(a)))throw new U('unexpected "typ" JWT header value',o,"typ","check_failed");let{requiredClaims:l=[],issuer:c,subject:u,audience:h,maxTokenAge:d}=r,f=[...l];for(let e of(void 0!==d&&f.push("iat"),void 0!==h&&f.push("aud"),void 0!==u&&f.push("sub"),void 0!==c&&f.push("iss"),new Set(f.reverse())))if(!(e in o))throw new U(`missing required "${e}" claim`,o,e,"missing");if(c&&!(Array.isArray(c)?c:[c]).includes(o.iss))throw new U('unexpected "iss" claim value',o,"iss","check_failed");if(u&&o.sub!==u)throw new U('unexpected "sub" claim value',o,"sub","check_failed");if(h&&(s=o.aud,i="string"==typeof h?[h]:h,"string"==typeof s?!i.includes(s):!(Array.isArray(s)&&i.some(Set.prototype.has.bind(new Set(s))))))throw new U('unexpected "aud" claim value',o,"aud","check_failed");switch(typeof r.clockTolerance){case"string":n=ef(r.clockTolerance);break;case"number":n=r.clockTolerance;break;case"undefined":n=0;break;default:throw TypeError("Invalid clockTolerance option type")}let{currentDate:p}=r,y=Math.floor((p||new Date).getTime()/1e3);if((void 0!==o.iat||d)&&"number"!=typeof o.iat)throw new U('"iat" claim must be a number',o,"iat","invalid");if(void 0!==o.nbf){if("number"!=typeof o.nbf)throw new U('"nbf" claim must be a number',o,"nbf","invalid");if(o.nbf>y+n)throw new U('"nbf" claim timestamp check failed',o,"nbf","check_failed")}if(void 0!==o.exp){if("number"!=typeof o.exp)throw new U('"exp" claim must be a number',o,"exp","invalid");if(o.exp<=y-n)throw new F('"exp" claim timestamp check failed',o,"exp","check_failed")}if(d){let e=y-o.iat;if(e-n>("number"==typeof d?d:ef(d)))throw new F('"iat" claim timestamp check failed (too far in the past)',o,"iat","check_failed");if(e<0-n)throw new U('"iat" claim timestamp check failed (it should be in the past)',o,"iat","check_failed")}return o}(s.protectedHeader,s.payload,r),protectedHeader:s.protectedHeader};return"function"==typeof t?{...i,key:s.key}:i}let em=f("SESSION_ISSUER"),eg=f("SESSION_AUDIENCE"),eS="2026-10-01T00:00:00.000Z",eb=!1;async function e_(e,t=!1){let r;try{let{payload:t}=await ey(e,function(){let e=process.env.SESSION_SECRET,t=function(e=Date.now()){let t=!!process.env.SESSION_SECRET,r=!!process.env.JWT_SECRET,s="true"===process.env.ALLOW_LEGACY_SESSION_SECRET,i=e>=Date.parse(eS);return{configured:t||r&&s&&!i,source:t?"dedicated":r&&s&&!i?"legacy_jwt_secret":"missing",legacyFallbackActive:!t&&r&&s&&!i,legacyFallbackAllowed:s&&!i,migrationDeadline:eS}}();if(!e&&t.legacyFallbackActive&&(e=process.env.JWT_SECRET,eb||(eb=!0,console.error(`[SECURITY:HIGH] ALLOW_LEGACY_SESSION_SECRET=true is reusing JWT_SECRET for dashboard sessions; migrate before ${eS}`))),!e){if(process.env.JWT_SECRET&&"true"!==process.env.ALLOW_LEGACY_SESSION_SECRET)throw Error("SESSION_SECRET is required; JWT_SECRET fallback requires ALLOW_LEGACY_SESSION_SECRET=true.");throw Error(`SESSION_SECRET is required; legacy fallback expires ${eS}.`)}return new TextEncoder().encode(e)}(),{algorithms:["HS256"],issuer:em,audience:eg});r=t}catch{return null}try{return await N(r)?r:null}catch(e){if(t)throw e;return null}}let ek=new Set;function eE(e){try{let t=process.env.TERMINAL_AUDIT_DIR??(0,n.join)(process.cwd(),"terminal-audit");(0,o.mkdirSync)(t,{recursive:!0,mode:448}),(0,o.appendFileSync)((0,n.join)(t,"sessions.jsonl"),`${JSON.stringify({...e,timestamp:new Date().toISOString()})}
|
|
2
|
-
`,{mode:384})}catch{}}function
|
|
3
|
-
`)}catch{}}async function
|
|
4
|
-
`,{encoding:"utf8"}),(0,
|
|
5
|
-
`,void 0,"utf8"),(0,o.fsyncSync)(c),(0,o.closeSync)(c),c=null,(0,o.renameSync)(l,i),ew(i,"file");let e=(0,o.openSync)(a,o.constants.O_RDONLY);try{(0,o.fsyncSync)(e)}finally{(0,o.closeSync)(e)}}catch(e){null!==c&&(0,o.closeSync)(c);try{(0,o.unlinkSync)(l)}catch{}throw e}return eE({event:"host-key-enrolled",host:e,observed:t,mode:r}),!0}let f=d===t;return f||(eE({event:"host-key-mismatch",host:e,expected:d,observed:t,mode:r}),console.error(`[terminal] SSH host key mismatch for ${e}`)),f||"enforce"!==r}catch(t){return ev(r,{event:"host-key-store-error",host:e,reason:t instanceof Error?t.message:String(t),mode:r})}finally{if(null!==c){try{(0,o.closeSync)(c)}catch{}try{(0,o.unlinkSync)(l);let e=(0,o.openSync)(a,o.constants.O_RDONLY);try{(0,o.fsyncSync)(e)}finally{(0,o.closeSync)(e)}}catch{}}ek.delete(i)}})(i,e)})}catch(e){throw clearTimeout(p),_(d),e}}function eR(e){let t=eA.get(e);if(t){try{t.ssh.end()}catch{}eA.delete(e)}}e.s(["attachWebSocketTerminal",0,function(e){if(eC.__terminalWss)return eC.__terminalWss;let t=new E.default({noServer:!0});return eC.__terminalWss=t,e.on("upgrade",(e,r,s)=>{let{pathname:i}=(0,v.parse)(e.url??"",!0);"/api/terminal/ws"===i&&t.handleUpgrade(e,r,s,r=>{t.emit("connection",r,e)})}),t.on("connection",(e,t)=>{eT(e,t).catch(()=>{try{e.close(1011,"Terminal connection error")}catch{}eR(e)})}),eC.__wsHeartbeat||(eC.__wsHeartbeat=setInterval(()=>{for(let[e,t]of eA){if(!t.alive){e.terminate(),eR(e);continue}t.alive=!1,e.ping()}},3e4)),t}],21640)},87693,(e,t,r)=>{var s=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.getKeyIndexes=r.hasFlag=r.exists=r.list=void 0;let i=s(e.r(9030));r.list=Object.keys(i.default);let o={};function n(e){"string"!=typeof e&&(e=String(e));let t=e.indexOf("->");return -1===t?e.length:t}r.list.forEach(e=>{o[e]=i.default[e].flags.reduce(function(e,t){return e[t]=!0,e},{})}),r.exists=function(e,t){return e=(null==t?void 0:t.caseInsensitive)?String(e).toLowerCase():e,!!i.default[e]},r.hasFlag=function(e,t,r){if(!o[e=(null==r?void 0:r.nameCaseInsensitive)?String(e).toLowerCase():e])throw Error("Unknown command "+e);return!!o[e][t]},r.getKeyIndexes=function(e,t,r){e=(null==r?void 0:r.nameCaseInsensitive)?String(e).toLowerCase():e;let s=i.default[e];if(!s)throw Error("Unknown command "+e);if(!Array.isArray(t))throw Error("Expect args to be an array");let o=[],a=!!(r&&r.parseExternalKey),l=(e,t)=>{let r=[],s=Number(e[t]);for(let e=0;e<s;e++)r.push(e+t+1);return r},c=(e,t,r)=>{for(let s=t;s<e.length-1;s+=1)if(String(e[s]).toLowerCase()===r.toLowerCase())return s+1;return null};switch(e){case"zunionstore":case"zinterstore":case"zdiffstore":o.push(0,...l(t,1));break;case"eval":case"evalsha":case"eval_ro":case"evalsha_ro":case"fcall":case"fcall_ro":case"blmpop":case"bzmpop":o.push(...l(t,1));break;case"sintercard":case"lmpop":case"zunion":case"zinter":case"zmpop":case"zintercard":case"zdiff":o.push(...l(t,0));break;case"msetex":{let e=Number(t[0]);for(let t=0;t<e;t++)o.push(1+2*t);break}case"georadius":{o.push(0);let e=c(t,5,"STORE");e&&o.push(e);let r=c(t,5,"STOREDIST");r&&o.push(r);break}case"georadiusbymember":{o.push(0);let e=c(t,4,"STORE");e&&o.push(e);let r=c(t,4,"STOREDIST");r&&o.push(r);break}case"sort":case"sort_ro":o.push(0);for(let e=1;e<t.length-1;e++){let r=t[e];if("string"!=typeof r)continue;let s=r.toUpperCase();"GET"===s?(e+=1,"#"!==(r=t[e])&&(a?o.push([e,n(r)]):o.push(e))):"BY"===s?(e+=1,a?o.push([e,n(t[e])]):o.push(e)):"STORE"===s&&(e+=1,o.push(e))}break;case"migrate":if(""===t[2])for(let e=5;e<t.length-1;e++){let r=t[e];if("string"==typeof r&&"KEYS"===r.toUpperCase()){for(let r=e+1;r<t.length;r++)o.push(r);break}}else o.push(2);break;case"xreadgroup":case"xread":for(let r=3*("xread"!==e);r<t.length-1;r++)if("STREAMS"===String(t[r]).toUpperCase()){for(let e=r+1;e<=r+(t.length-1-r)/2;e++)o.push(e);break}break;default:if(s.step>0){let e=s.keyStart-1,r=s.keyStop>0?s.keyStop:t.length+s.keyStop+1;for(let t=e;t<r;t+=s.step)o.push(t)}}return o}},20265,(e,t,r)=>{function s(e,t){var t=t||{};this._capacity=t.capacity,this._head=0,this._tail=0,Array.isArray(e)?this._fromArray(e):(this._capacityMask=3,this._list=[,,,,])}s.prototype.peekAt=function(e){var t=e;if(t===(0|t)){var r=this.size();if(!(t>=r)&&!(t<-r))return t<0&&(t+=r),t=this._head+t&this._capacityMask,this._list[t]}},s.prototype.get=function(e){return this.peekAt(e)},s.prototype.peek=function(){if(this._head!==this._tail)return this._list[this._head]},s.prototype.peekFront=function(){return this.peek()},s.prototype.peekBack=function(){return this.peekAt(-1)},Object.defineProperty(s.prototype,"length",{get:function(){return this.size()}}),s.prototype.size=function(){return this._head===this._tail?0:this._head<this._tail?this._tail-this._head:this._capacityMask+1-(this._head-this._tail)},s.prototype.unshift=function(e){if(0==arguments.length)return this.size();var t=this._list.length;return(this._head=this._head-1+t&this._capacityMask,this._list[this._head]=e,this._tail===this._head&&this._growArray(),this._capacity&&this.size()>this._capacity&&this.pop(),this._head<this._tail)?this._tail-this._head:this._capacityMask+1-(this._head-this._tail)},s.prototype.shift=function(){var e=this._head;if(e!==this._tail){var t=this._list[e];return this._list[e]=void 0,this._head=e+1&this._capacityMask,e<2&&this._tail>1e4&&this._tail<=this._list.length>>>2&&this._shrinkArray(),t}},s.prototype.push=function(e){if(0==arguments.length)return this.size();var t=this._tail;return(this._list[t]=e,this._tail=t+1&this._capacityMask,this._tail===this._head&&this._growArray(),this._capacity&&this.size()>this._capacity&&this.shift(),this._head<this._tail)?this._tail-this._head:this._capacityMask+1-(this._head-this._tail)},s.prototype.pop=function(){var e=this._tail;if(e!==this._head){var t=this._list.length;this._tail=e-1+t&this._capacityMask;var r=this._list[this._tail];return this._list[this._tail]=void 0,this._head<2&&e>1e4&&e<=t>>>2&&this._shrinkArray(),r}},s.prototype.removeOne=function(e){var t,r=e;if(r===(0|r)&&this._head!==this._tail){var s=this.size(),i=this._list.length;if(!(r>=s)&&!(r<-s)){r<0&&(r+=s),r=this._head+r&this._capacityMask;var o=this._list[r];if(e<s/2){for(t=e;t>0;t--)this._list[r]=this._list[r=r-1+i&this._capacityMask];this._list[r]=void 0,this._head=this._head+1+i&this._capacityMask}else{for(t=s-1-e;t>0;t--)this._list[r]=this._list[r=r+1+i&this._capacityMask];this._list[r]=void 0,this._tail=this._tail-1+i&this._capacityMask}return o}}},s.prototype.remove=function(e,t){var r,s,i=e,o=t;if(i===(0|i)&&this._head!==this._tail){var n=this.size(),a=this._list.length;if(!(i>=n)&&!(i<-n)&&!(t<1)){if(i<0&&(i+=n),1===t||!t)return(r=[,])[0]=this.removeOne(i),r;if(0===i&&i+t>=n)return r=this.toArray(),this.clear(),r;for(i+t>n&&(t=n-i),r=Array(t),s=0;s<t;s++)r[s]=this._list[this._head+i+s&this._capacityMask];if(i=this._head+i&this._capacityMask,e+t===n){for(this._tail=this._tail-t+a&this._capacityMask,s=t;s>0;s--)this._list[i=i+1+a&this._capacityMask]=void 0;return r}if(0===e){for(this._head=this._head+t+a&this._capacityMask,s=t-1;s>0;s--)this._list[i=i+1+a&this._capacityMask]=void 0;return r}if(i<n/2){for(this._head=this._head+e+t+a&this._capacityMask,s=e;s>0;s--)this.unshift(this._list[i=i-1+a&this._capacityMask]);for(i=this._head-1+a&this._capacityMask;o>0;)this._list[i=i-1+a&this._capacityMask]=void 0,o--;e<0&&(this._tail=i)}else{for(this._tail=i,i=i+t+a&this._capacityMask,s=n-(t+e);s>0;s--)this.push(this._list[i++]);for(i=this._tail;o>0;)this._list[i=i+1+a&this._capacityMask]=void 0,o--}return this._head<2&&this._tail>1e4&&this._tail<=a>>>2&&this._shrinkArray(),r}}},s.prototype.splice=function(e,t){var r=e;if(r===(0|r)){var s=this.size();if(r<0&&(r+=s),!(r>s))if(!(arguments.length>2))return this.remove(r,t);else{var i,o,n,a=arguments.length,l=this._list.length,c=2;if(!s||r<s/2){for(o=Array(r),i=0;i<r;i++)o[i]=this._list[this._head+i&this._capacityMask];for(0===t?(n=[],r>0&&(this._head=this._head+r+l&this._capacityMask)):(n=this.remove(r,t),this._head=this._head+r+l&this._capacityMask);a>c;)this.unshift(arguments[--a]);for(i=r;i>0;i--)this.unshift(o[i-1])}else{var u=(o=Array(s-(r+t))).length;for(i=0;i<u;i++)o[i]=this._list[this._head+r+t+i&this._capacityMask];for(0===t?(n=[],r!=s&&(this._tail=this._head+r+l&this._capacityMask)):(n=this.remove(r,t),this._tail=this._tail-u+l&this._capacityMask);c<a;)this.push(arguments[c++]);for(i=0;i<u;i++)this.push(o[i])}return n}}},s.prototype.clear=function(){this._list=Array(this._list.length),this._head=0,this._tail=0},s.prototype.isEmpty=function(){return this._head===this._tail},s.prototype.toArray=function(){return this._copyArray(!1)},s.prototype._fromArray=function(e){var t=e.length,r=this._nextPowerOf2(t);this._list=Array(r),this._capacityMask=r-1,this._tail=t;for(var s=0;s<t;s++)this._list[s]=e[s]},s.prototype._copyArray=function(e,t){var r,s=this._list,i=s.length,o=this.length;if((t|=o)==o&&this._head<this._tail)return this._list.slice(this._head,this._tail);var n=Array(t),a=0;if(e||this._head>this._tail){for(r=this._head;r<i;r++)n[a++]=s[r];for(r=0;r<this._tail;r++)n[a++]=s[r]}else for(r=this._head;r<this._tail;r++)n[a++]=s[r];return n},s.prototype._growArray=function(){if(0!=this._head){var e=this._copyArray(!0,this._list.length<<1);this._tail=this._list.length,this._head=0,this._list=e}else this._tail=this._list.length,this._list.length<<=1;this._capacityMask=this._capacityMask<<1|1},s.prototype._shrinkArray=function(){this._list.length>>>=1,this._capacityMask>>>=1},s.prototype._nextPowerOf2=function(e){return Math.max(1<<Math.log(e)/Math.log(2)+1,4)},t.exports=s},59026,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});let s=e.r(87693),i=e.r(43594),o=e.r(42351),n=e.r(13895),a=e.r(79805);class l{constructor(e,t=[],r={},s){if(this.name=e,this.inTransaction=!1,this.isTraced=!1,this.isResolved=!1,this.transformed=!1,this.replyEncoding=r.replyEncoding,this.errorStack=r.errorStack,this.args=t.flat(),this.callback=s,this.initPromise(),r.keyPrefix){let e=r.keyPrefix instanceof Buffer,t=e?r.keyPrefix:null;this._iterateKeys(s=>s instanceof Buffer?(null===t&&(t=Buffer.from(r.keyPrefix)),Buffer.concat([t,s])):e?Buffer.concat([r.keyPrefix,Buffer.from(String(s))]):r.keyPrefix+s)}r.readOnly&&(this.isReadOnly=!0)}static checkFlag(e,t){return t=t.toLowerCase(),!!this.getFlagMap()[e][t]}static setArgumentTransformer(e,t){this._transformer.argument[e]=t}static setReplyTransformer(e,t){this._transformer.reply[e]=t}static getFlagMap(){return this.flagMap||(this.flagMap=Object.keys(l.FLAGS).reduce((e,t)=>(e[t]={},l.FLAGS[t].forEach(r=>{e[t][r]=!0}),e),{})),this.flagMap}getSlot(){if(void 0===this.slot){let e=this.getKeys()[0];this.slot=null==e?null:i(e)}return this.slot}getKeys(){return this._iterateKeys()}toWritable(e){let t,r="*"+(this.args.length+1)+"\r\n$"+Buffer.byteLength(this.name)+"\r\n"+this.name+"\r\n";if(this.bufferMode){let e=new h;e.push(r);for(let t=0;t<this.args.length;++t){let r=this.args[t];r instanceof Buffer?0===r.length?e.push("$0\r\n\r\n"):(e.push("$"+r.length+"\r\n"),e.push(r),e.push("\r\n")):e.push("$"+Buffer.byteLength(r)+"\r\n"+r+"\r\n")}t=e.toBuffer()}else{t=r;for(let e=0;e<this.args.length;++e){let r=this.args[e];t+="$"+Buffer.byteLength(r)+"\r\n"+r+"\r\n"}}return t}stringifyArguments(){for(let e=0;e<this.args.length;++e){let t=this.args[e];"string"==typeof t||(t instanceof Buffer?this.bufferMode=!0:this.args[e]=(0,n.toArg)(t))}}transformReply(e){this.replyEncoding&&(e=(0,n.convertBufferToString)(e,this.replyEncoding));let t=l._transformer.reply[this.name];return t&&(e=t(e)),e}setTimeout(e){this._commandTimeoutTimer||(this._commandTimeoutTimer=setTimeout(()=>{this.isResolved||this.reject(Error("Command timed out"))},e))}setBlockingTimeout(e){if(e<=0)return;this._blockingTimeoutTimer&&(clearTimeout(this._blockingTimeoutTimer),this._blockingTimeoutTimer=void 0);let t=Date.now();void 0===this._blockingDeadline&&(this._blockingDeadline=t+e);let r=this._blockingDeadline-t;r<=0?this.resolve(null):this._blockingTimeoutTimer=setTimeout(()=>{if(this.isResolved){this._blockingTimeoutTimer=void 0;return}this._blockingTimeoutTimer=void 0,this.resolve(null)},r)}extractBlockingTimeout(){let e=this.args;if(!e||0===e.length)return;let t=this.name.toLowerCase();return l.checkFlag("LAST_ARG_TIMEOUT_COMMANDS",t)?(0,a.parseSecondsArgument)(e[e.length-1]):l.checkFlag("FIRST_ARG_TIMEOUT_COMMANDS",t)?(0,a.parseSecondsArgument)(e[0]):l.checkFlag("BLOCK_OPTION_COMMANDS",t)?(0,a.parseBlockOption)(e):void 0}_clearTimers(){let e=this._commandTimeoutTimer;e&&(clearTimeout(e),delete this._commandTimeoutTimer);let t=this._blockingTimeoutTimer;t&&(clearTimeout(t),delete this._blockingTimeoutTimer)}initPromise(){let e=new Promise((e,t)=>{if(!this.transformed){this.transformed=!0;let e=l._transformer.argument[this.name];e&&(this.args=e(this.args)),this.stringifyArguments()}this.resolve=this._convertValue(e),this.reject=e=>{this._clearTimers(),this.errorStack?t((0,n.optimizeErrorStack)(e,this.errorStack.stack,"/ROOT/node_modules/ioredis/built")):t(e)}});this.promise=(0,o.default)(e,this.callback)}_iterateKeys(e=e=>e){if(void 0===this.keys&&(this.keys=[],(0,s.exists)(this.name,{caseInsensitive:!0})))for(let t of(0,s.getKeyIndexes)(this.name,this.args,{nameCaseInsensitive:!0}))this.args[t]=e(this.args[t]),this.keys.push(this.args[t]);return this.keys}_convertValue(e){return t=>{try{this._clearTimers(),e(this.transformReply(t)),this.isResolved=!0}catch(e){this.reject(e)}return this.promise}}}r.default=l,l.FLAGS={VALID_IN_SUBSCRIBER_MODE:["subscribe","psubscribe","unsubscribe","punsubscribe","ssubscribe","sunsubscribe","ping","quit"],VALID_IN_MONITOR_MODE:["monitor","auth"],ENTER_SUBSCRIBER_MODE:["subscribe","psubscribe","ssubscribe"],EXIT_SUBSCRIBER_MODE:["unsubscribe","punsubscribe","sunsubscribe"],WILL_DISCONNECT:["quit"],HANDSHAKE_COMMANDS:["auth","select","client","readonly","info"],IGNORE_RECONNECT_ON_ERROR:["client"],BLOCKING_COMMANDS:["blpop","brpop","brpoplpush","blmove","bzpopmin","bzpopmax","bzmpop","blmpop","xread","xreadgroup"],LAST_ARG_TIMEOUT_COMMANDS:["blpop","brpop","brpoplpush","blmove","bzpopmin","bzpopmax"],FIRST_ARG_TIMEOUT_COMMANDS:["bzmpop","blmpop"],BLOCK_OPTION_COMMANDS:["xread","xreadgroup"]},l._transformer={argument:{},reply:{}};let c=function(e){if(1===e.length){if(e[0]instanceof Map)return(0,n.convertMapToArray)(e[0]);if("object"==typeof e[0]&&null!==e[0])return(0,n.convertObjectToArray)(e[0])}return e},u=function(e){if(2===e.length){if(e[1]instanceof Map)return[e[0]].concat((0,n.convertMapToArray)(e[1]));if("object"==typeof e[1]&&null!==e[1])return[e[0]].concat((0,n.convertObjectToArray)(e[1]))}return e};l.setArgumentTransformer("mset",c),l.setArgumentTransformer("msetnx",c),l.setArgumentTransformer("hset",u),l.setArgumentTransformer("hmset",u),l.setReplyTransformer("hgetall",function(e){if(Array.isArray(e)){let t={};for(let r=0;r<e.length;r+=2){let s=e[r],i=e[r+1];s in t?Object.defineProperty(t,s,{value:i,configurable:!0,enumerable:!0,writable:!0}):t[s]=i}return t}return e});class h{constructor(){this.length=0,this.items=[]}push(e){this.length+=Buffer.byteLength(e),this.items.push(e)}toBuffer(){let e=Buffer.allocUnsafe(this.length),t=0;for(let r of this.items){let s=Buffer.byteLength(r);Buffer.isBuffer(r)?r.copy(e,t):e.write(r,t,s),t+=s}return e}}},92683,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});let s=e.r(59026),i=e.r(13895),o=e.r(86111),n=e.r(28305),a=(0,i.Debug)("dataHandler");r.default=class{constructor(e,t){this.redis=e;let r=new o({stringNumbers:t.stringNumbers,returnBuffers:!0,returnError:e=>{this.returnError(e)},returnFatalError:e=>{this.returnFatalError(e)},returnReply:e=>{this.returnReply(e)}});e.stream.prependListener("data",e=>{r.execute(e)}),e.stream.resume()}returnFatalError(e){e.message+=". Please report this.",this.redis.recoverFromFatalError(e,e,{offlineQueue:!1})}returnError(e){let t=this.shiftCommand(e);if(t){if(e.command={name:t.command.name,args:t.command.args},"ssubscribe"==t.command.name&&e.message.includes("MOVED"))return void this.redis.emit("moved");this.redis.handleReconnection(e,t)}}returnReply(e){if(this.handleMonitorReply(e)||this.handleSubscriberReply(e))return;let t=this.shiftCommand(e);t&&(s.default.checkFlag("ENTER_SUBSCRIBER_MODE",t.command.name)?(this.redis.condition.subscriber=new n.default,this.redis.condition.subscriber.add(t.command.name,e[1].toString()),c(t.command,e[2])||this.redis.commandQueue.unshift(t)):s.default.checkFlag("EXIT_SUBSCRIBER_MODE",t.command.name)?u(t.command,e[2])||this.redis.commandQueue.unshift(t):t.command.resolve(e))}handleSubscriberReply(e){if(!this.redis.condition.subscriber)return!1;let t=Array.isArray(e)?e[0].toString():null;switch(a('receive reply "%s" in subscriber mode',t),t){case"message":this.redis.listeners("message").length>0&&this.redis.emit("message",e[1].toString(),e[2]?e[2].toString():""),this.redis.emit("messageBuffer",e[1],e[2]);break;case"pmessage":{let t=e[1].toString();this.redis.listeners("pmessage").length>0&&this.redis.emit("pmessage",t,e[2].toString(),e[3].toString()),this.redis.emit("pmessageBuffer",t,e[2],e[3]);break}case"smessage":this.redis.listeners("smessage").length>0&&this.redis.emit("smessage",e[1].toString(),e[2]?e[2].toString():""),this.redis.emit("smessageBuffer",e[1],e[2]);break;case"ssubscribe":case"subscribe":case"psubscribe":{let r=e[1].toString();this.redis.condition.subscriber.add(t,r);let s=this.shiftCommand(e);if(!s)return;c(s.command,e[2])||this.redis.commandQueue.unshift(s);break}case"sunsubscribe":case"unsubscribe":case"punsubscribe":{let r=e[1]?e[1].toString():null;r&&this.redis.condition.subscriber.del(t,r);let s=e[2];0===Number(s)&&(this.redis.condition.subscriber=!1);let i=this.shiftCommand(e);if(!i)return;u(i.command,s)||this.redis.commandQueue.unshift(i);break}default:{let t=this.shiftCommand(e);if(!t)return;t.command.resolve(e)}}return!0}handleMonitorReply(e){if("monitoring"!==this.redis.status)return!1;let t=e.toString();if("OK"===t)return!1;let r=t.indexOf(" "),s=t.slice(0,r),i=t.indexOf('"'),o=t.slice(i+1,-1).split('" "').map(e=>e.replace(/\\"/g,'"')),n=t.slice(r+2,i-2).split(" ");return this.redis.emit("monitor",s,o,n[1],n[0]),!0}shiftCommand(e){let t=this.redis.commandQueue.shift();if(!t){let t=Error("Command queue state error. If you can reproduce this, please report it."+(e instanceof Error?` Last error: ${e.message}`:` Last reply: ${e.toString()}`));return this.redis.emit("error",t),null}return t}};let l=new WeakMap;function c(e,t){let r=l.has(e)?l.get(e):e.args.length;return(r-=1)<=0?(e.resolve(t),l.delete(e),!0):(l.set(e,r),!1)}function u(e,t){let r=l.has(e)?l.get(e):e.args.length;return 0===r?0===Number(t)&&(l.delete(e),e.resolve(t),!0):(r-=1)<=0?(e.resolve(t),!0):(l.set(e,r),!1)}},60520,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});let s=e.r(43594),i=e.r(87693),o=e.r(42351),n=e.r(24361),a=e.r(59026),l=e.r(874),c=e.r(13895),u=e.r(34207);class h extends u.default{constructor(e){super(),this.redis=e,this.isPipeline=!0,this.replyPending=0,this._queue=[],this._result=[],this._transactions=0,this._shaToScript={},this.isCluster="Cluster"===this.redis.constructor.name||this.redis.isCluster,this.options=e.options,Object.keys(e.scriptsSet).forEach(t=>{let r=e.scriptsSet[t];this._shaToScript[r.sha]=r,this[t]=e[t],this[t+"Buffer"]=e[t+"Buffer"]}),e.addedBuiltinSet.forEach(t=>{this[t]=e[t],this[t+"Buffer"]=e[t+"Buffer"]}),this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t});let t=this;Object.defineProperty(this,"length",{get:function(){return t._queue.length}})}fillResult(e,t){if("exec"===this._queue[t].name&&Array.isArray(e[1])){let r=e[1].length;for(let s=0;s<r;s++){if(e[1][s]instanceof Error)continue;let i=this._queue[t-(r-s)];try{e[1][s]=i.transformReply(e[1][s])}catch(t){e[1][s]=t}}}if(this._result[t]=e,--this.replyPending)return;if(this.isCluster){let e,t=!0;for(let r=0;r<this._result.length;++r){let s=this._result[r][0],o=this._queue[r];if(s){if("exec"===o.name&&"EXECABORT Transaction discarded because of previous errors."===s.message)continue;if(e){if(e.name!==s.name||e.message!==s.message){t=!1;break}}else e={name:s.name,message:s.message}}else if(!o.inTransaction&&!((0,i.exists)(o.name,{caseInsensitive:!0})&&(0,i.hasFlag)(o.name,"readonly",{nameCaseInsensitive:!0}))){t=!1;break}}if(e&&t){let t=this,r=e.message.split(" "),s=this._queue,i=!1;this._queue=[];for(let e=0;e<s.length;++e){if("ASK"===r[0]&&!i&&"asking"!==s[e].name&&(!s[e-1]||"asking"!==s[e-1].name)){let e=new a.default("asking");e.ignore=!0,this.sendCommand(e)}s[e].initPromise(),this.sendCommand(s[e]),i=s[e].inTransaction}let o=!0;void 0===this.leftRedirections&&(this.leftRedirections={});let n=function(){t.exec()},l=this.redis;if(l.handleError(e,this.leftRedirections,{moved:function(e,s){t.preferKey=s,l.slots[r[1]]?l.slots[r[1]][0]!==s&&(l.slots[r[1]]=[s]):l.slots[r[1]]=[s],l._groupsBySlot[r[1]]=l._groupsIds[l.slots[r[1]].join(";")],l.refreshSlotsCache(),t.exec()},ask:function(e,r){t.preferKey=r,t.exec()},tryagain:n,clusterDown:n,connectionClosed:n,maxRedirections:()=>{o=!1},defaults:()=>{o=!1}}),o)return}}let r=0;for(let e=0;e<this._queue.length-r;++e)this._queue[e+r].ignore&&(r+=1),this._result[e]=this._result[e+r];this.resolve(this._result.slice(0,this._result.length-r))}sendCommand(e){this._transactions>0&&(e.inTransaction=!0);let t=this._queue.length;return e.pipelineIndex=t,e.promise.then(e=>{this.fillResult([null,e],t)}).catch(e=>{this.fillResult([e],t)}),this._queue.push(e),this}addBatch(e){let t,r,s;for(let i=0;i<e.length;++i)r=(t=e[i])[0],s=t.slice(1),this[r].apply(this,s);return this}}r.default=h;let d=h.prototype.multi;h.prototype.multi=function(){return this._transactions+=1,d.apply(this,arguments)};let f=h.prototype.execBuffer;h.prototype.execBuffer=(0,n.deprecate)(function(){return this._transactions>0&&(this._transactions-=1),f.apply(this,arguments)},"Pipeline#execBuffer: Use Pipeline#exec instead"),h.prototype.exec=function(e){let t;if(this.isCluster&&!this.redis.slots.length)return"wait"===this.redis.status&&this.redis.connect().catch(c.noop),e&&!this.nodeifiedPromise&&(this.nodeifiedPromise=!0,(0,o.default)(this.promise,e)),this.redis.delayUntilReady(t=>{t?this.reject(t):this.exec(e)}),this.promise;if(this._transactions>0)return this._transactions-=1,f.apply(this,arguments);if(this.nodeifiedPromise||(this.nodeifiedPromise=!0,(0,o.default)(this.promise,e)),this._queue.length||this.resolve([]),this.isCluster){let e=[];for(let t=0;t<this._queue.length;t++){let r=this._queue[t].getKeys();if(r.length&&e.push(r[0]),r.length&&0>s.generateMulti(r))return this.reject(Error("All the keys in a pipeline command should belong to the same slot")),this.promise}if(e.length){if((t=function(e,t){let r=s(t[0]),i=e._groupsBySlot[r];for(let r=1;r<t.length;r++)if(e._groupsBySlot[s(t[r])]!==i)return -1;return r}(this.redis,e))<0)return this.reject(Error("All keys in the pipeline should belong to the same slots allocation group")),this.promise}else t=16384*Math.random()|0}let r=this;return function(){let e,s,i=r.replyPending=r._queue.length;r.isCluster&&(e={slot:t,redis:r.redis.connectionPool.nodes.all[r.preferKey]});let o="",n={isPipeline:!0,destination:r.isCluster?e:{redis:r.redis},write(e){"string"!=typeof e?(s||(s=[]),o&&(s.push(Buffer.from(o,"utf8")),o=""),s.push(e)):(o.length+e.length>=l.constants.MAX_STRING_LENGTH&&(s||(s=[]),o&&(s.push(Buffer.from(o,"utf8")),o="")),o+=e),--i||(s?(o&&s.push(Buffer.from(o,"utf8")),n.destination.redis.stream.write(Buffer.concat(s))):n.destination.redis.stream.write(o),i=r._queue.length,o="",s=void 0)}};for(let t=0;t<r._queue.length;++t)r.redis.sendCommand(r._queue[t],n,e);r.promise}(),this.promise}},45375,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});let s=e.r(87693),i=e.r(27699),o=e.r(42351),n=e.r(58063),a=e.r(59026),l=e.r(25752),c=e.r(3107),u=e.r(3046),h=e.r(80494),d=e.r(59875),f=e.r(60886),p=e.r(13895),y=e.r(94455),m=e.r(74031),g=e.r(34207),S=e.r(18761),b=e.r(20265),_=(0,p.Debug)("redis");class k extends g.default{constructor(e,t,r){if(super(),this.status="wait",this.isCluster=!1,this.reconnectTimeout=null,this.connectionEpoch=0,this.retryAttempts=0,this.manuallyClosing=!1,this._autoPipelines=new Map,this._runningAutoPipelines=new Set,this.parseOptions(e,t,r),i.EventEmitter.call(this),this.resetCommandQueue(),this.resetOfflineQueue(),this.options.Connector)this.connector=new this.options.Connector(this.options);else if(this.options.sentinels){let e=new c.default(this.options);e.emitter=this,this.connector=e}else this.connector=new l.StandaloneConnector(this.options);this.options.scripts&&Object.entries(this.options.scripts).forEach(([e,t])=>{this.defineCommand(e,t)}),this.options.lazyConnect?this.setStatus("wait"):this.connect().catch(S.noop)}static createClient(...e){return new k(...e)}get autoPipelineQueueSize(){let e=0;for(let t of this._autoPipelines.values())e+=t.length;return e}connect(e){let t=(0,y.traceConnect)(()=>this._connect(),()=>{let{address:e,port:t}=this._getServerAddress();return{serverAddress:e,serverPort:t,connectionEpoch:this.connectionEpoch}});return(0,o.default)(t,e)}_connect(){return new Promise((e,t)=>{if("connecting"===this.status||"connect"===this.status||"ready"===this.status)return void t(Error("Redis is already connecting/connected"));this.connectionEpoch+=1,this.setStatus("connecting");let{options:r}=this;this.condition={select:r.db,auth:r.username?[r.username,r.password]:r.password,subscriber:!1};let s=this;(0,o.default)(this.connector.connect(function(e,t){s.silentEmit(e,t)}),function(i,o){if(i){s.flushQueue(i),s.silentEmit("error",i),t(i),s.setStatus("end");return}let n=r.tls?"secureConnect":"connect";if("sentinels"in r&&r.sentinels&&!r.enableTLSForSentinelMode&&(n="connect"),s.stream=o,r.noDelay&&o.setNoDelay(!0),"number"==typeof r.keepAlive&&(o.connecting?o.once(n,()=>{o.setKeepAlive(!0,r.keepAlive)}):o.setKeepAlive(!0,r.keepAlive)),o.connecting){if(o.once(n,u.connectHandler(s)),r.connectTimeout){let e=!1;o.setTimeout(r.connectTimeout,function(){if(e)return;o.setTimeout(0),o.destroy();let t=Error("connect ETIMEDOUT");t.errorno="ETIMEDOUT",t.code="ETIMEDOUT",t.syscall="connect",u.errorHandler(s)(t)}),o.once(n,function(){e=!0,o.setTimeout(0)})}}else if(o.destroyed){let e=s.connector.firstError;e&&process.nextTick(()=>{u.errorHandler(s)(e)}),process.nextTick(u.closeHandler(s))}else process.nextTick(u.connectHandler(s));o.destroyed||(o.once("error",u.errorHandler(s)),o.once("close",u.closeHandler(s)));let a=function(){s.removeListener("close",l),e()};var l=function(){s.removeListener("ready",a),t(Error(p.CONNECTION_CLOSED_ERROR_MSG))};s.once("ready",a),s.once("close",l)})})}disconnect(e=!1){e||(this.manuallyClosing=!0),this.reconnectTimeout&&!e&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null),"wait"===this.status?u.closeHandler(this)():this.connector.disconnect()}end(){this.disconnect()}duplicate(e){return new k({...this.options,...e})}get mode(){var e;return this.options.monitor?"monitor":(null==(e=this.condition)?void 0:e.subscriber)?"subscriber":"normal"}monitor(e){let t=this.duplicate({monitor:!0,lazyConnect:!1});return(0,o.default)(new Promise(function(e,r){t.once("error",r),t.once("monitoring",function(){e(t)})}),e)}sendCommand(e,t){var r,i;if("wait"===this.status&&this.connect().catch(S.noop),"end"===this.status)return e.reject(Error(p.CONNECTION_CLOSED_ERROR_MSG)),e.promise;if((null==(r=this.condition)?void 0:r.subscriber)&&!a.default.checkFlag("VALID_IN_SUBSCRIBER_MODE",e.name))return e.reject(Error("Connection in subscriber mode, only subscriber commands may be used")),e.promise;"number"==typeof this.options.commandTimeout&&e.setTimeout(this.options.commandTimeout);let o=this.getBlockingTimeoutInMs(e),n="ready"===this.status||!t&&"connect"===this.status&&(0,s.exists)(e.name,{caseInsensitive:!0})&&((0,s.hasFlag)(e.name,"loading",{nameCaseInsensitive:!0})||a.default.checkFlag("HANDSHAKE_COMMANDS",e.name));if(this.stream&&this.stream.writable?this.stream._writableState&&this.stream._writableState.ended&&(n=!1):n=!1,n)_.enabled&&_("write command[%s]: %d -> %s(%o)",this._getDescription(),null==(i=this.condition)?void 0:i.select,e.name,e.args),t?"isPipeline"in t&&t.isPipeline?t.write(e.toWritable(t.destination.redis.stream)):t.write(e.toWritable(t)):this.stream.write(e.toWritable(this.stream)),this.commandQueue.push({command:e,stream:t,select:this.condition.select}),void 0!==o&&e.setBlockingTimeout(o),a.default.checkFlag("WILL_DISCONNECT",e.name)&&(this.manuallyClosing=!0),void 0!==this.options.socketTimeout&&void 0===this.socketTimeoutTimer&&this.setSocketTimeout();else{if(!this.options.enableOfflineQueue)return e.reject(Error("Stream isn't writeable and enableOfflineQueue options is false")),e.promise;if("quit"===e.name&&0===this.offlineQueue.length)return this.disconnect(),e.resolve(Buffer.from("OK")),e.promise;if(_.enabled&&_("queue command[%s]: %d -> %s(%o)",this._getDescription(),this.condition.select,e.name,e.args),this.offlineQueue.push({command:e,stream:t,select:this.condition.select}),a.default.checkFlag("BLOCKING_COMMANDS",e.name)){let t=this.getConfiguredBlockingTimeout();void 0!==t&&e.setBlockingTimeout(t)}}if("select"===e.name&&(0,p.isInt)(e.args[0])){let t=parseInt(e.args[0],10);this.condition.select!==t&&(this.condition.select=t,this.emit("select",t),_("switch to db [%d]",this.condition.select))}return!n||e.isTraced?e.promise:(e.isTraced=!0,(0,y.traceCommand)(()=>e.promise,()=>this._buildCommandContext(e)))}getBlockingTimeoutInMs(e){var t;if(!a.default.checkFlag("BLOCKING_COMMANDS",e.name))return;let r=this.getConfiguredBlockingTimeout();if(void 0===r)return;let s=e.extractBlockingTimeout();return"number"==typeof s?s>0?s+(null!=(t=this.options.blockingTimeoutGrace)?t:h.DEFAULT_REDIS_OPTIONS.blockingTimeoutGrace):r:null===s?r:void 0}getConfiguredBlockingTimeout(){if("number"==typeof this.options.blockingTimeout&&this.options.blockingTimeout>0)return this.options.blockingTimeout}setSocketTimeout(){this.socketTimeoutTimer=setTimeout(()=>{this.stream.destroy(Error(`Socket timeout. Expecting data, but didn't receive any in ${this.options.socketTimeout}ms.`)),this.socketTimeoutTimer=void 0},this.options.socketTimeout),this.stream.once("data",()=>{clearTimeout(this.socketTimeoutTimer),this.socketTimeoutTimer=void 0,0!==this.commandQueue.length&&this.setSocketTimeout()})}scanStream(e){return this.createScanStream("scan",{options:e})}scanBufferStream(e){return this.createScanStream("scanBuffer",{options:e})}sscanStream(e,t){return this.createScanStream("sscan",{key:e,options:t})}sscanBufferStream(e,t){return this.createScanStream("sscanBuffer",{key:e,options:t})}hscanStream(e,t){return this.createScanStream("hscan",{key:e,options:t})}hscanBufferStream(e,t){return this.createScanStream("hscanBuffer",{key:e,options:t})}zscanStream(e,t){return this.createScanStream("zscan",{key:e,options:t})}zscanBufferStream(e,t){return this.createScanStream("zscanBuffer",{key:e,options:t})}silentEmit(e,t){let r;if("error"!==e||(r=t,"end"!==this.status&&(!this.manuallyClosing||!(r instanceof Error)||r.message!==p.CONNECTION_CLOSED_ERROR_MSG&&"connect"!==r.syscall&&"read"!==r.syscall)))return this.listeners(e).length>0?this.emit.apply(this,arguments):(r&&r instanceof Error&&console.error("[ioredis] Unhandled error event:",r.stack),!1)}recoverFromFatalError(e,t,r){this.flushQueue(t,r),this.silentEmit("error",t),this.disconnect(!0)}handleReconnection(e,t){var r;let s=!1;switch(this.options.reconnectOnError&&!a.default.checkFlag("IGNORE_RECONNECT_ON_ERROR",t.command.name)&&(s=this.options.reconnectOnError(e)),s){case 1:case!0:"reconnecting"!==this.status&&this.disconnect(!0),t.command.reject(e);break;case 2:"reconnecting"!==this.status&&this.disconnect(!0),(null==(r=this.condition)?void 0:r.select)!==t.select&&"select"!==t.command.name&&this.select(t.select),this.sendCommand(t.command);break;default:t.command.reject(e)}}_getServerAddress(){return"path"in this.options&&this.options.path?{address:this.options.path,port:void 0}:{address:"host"in this.options&&this.options.host||"localhost",port:"port"in this.options&&this.options.port||6379}}_buildCommandContext(e){var t,r,s;let{address:i,port:o}=this._getServerAddress();return{command:e.name,args:(0,y.sanitizeArgs)(e.name,e.args),database:null!=(s=null!=(r=null==(t=this.condition)?void 0:t.select)?r:this.options.db)?s:0,serverAddress:i,serverPort:o}}_buildBatchContext(e){var t,r,s;let{address:i,port:o}=this._getServerAddress();return{batchMode:"MULTI",batchSize:e,database:null!=(s=null!=(r=null==(t=this.condition)?void 0:t.select)?r:this.options.db)?s:0,serverAddress:i,serverPort:o}}_getDescription(){let e;return e="path"in this.options&&this.options.path?this.options.path:this.stream&&this.stream.remoteAddress&&this.stream.remotePort?this.stream.remoteAddress+":"+this.stream.remotePort:"host"in this.options&&this.options.host?this.options.host+":"+this.options.port:"",this.options.connectionName&&(e+=` (${this.options.connectionName})`),e}resetCommandQueue(){this.commandQueue=new b}resetOfflineQueue(){this.offlineQueue=new b}parseOptions(...e){let t={},r=!1;for(let s=0;s<e.length;++s){let i=e[s];if(null!=i)if("object"==typeof i)(0,S.defaults)(t,i);else if("string"==typeof i)(0,S.defaults)(t,(0,p.parseURL)(i)),i.startsWith("rediss://")&&(r=!0);else if("number"==typeof i)t.port=i;else throw Error("Invalid argument "+i)}r&&(0,S.defaults)(t,{tls:!0}),(0,S.defaults)(t,k.defaultOptions),"string"==typeof t.port&&(t.port=parseInt(t.port,10)),"string"==typeof t.db&&(t.db=parseInt(t.db,10)),this.options=(0,p.resolveTLSProfile)(t)}setStatus(e,t){_.enabled&&_("status[%s]: %s -> %s",this._getDescription(),this.status||"[empty]",e),this.status=e,process.nextTick(this.emit.bind(this,e,t))}createScanStream(e,{key:t,options:r={}}){return new d.default({objectMode:!0,key:t,redis:this,command:e,...r})}flushQueue(e,t){let r;if((t=(0,S.defaults)({},t,{offlineQueue:!0,commandQueue:!0})).offlineQueue)for(;r=this.offlineQueue.shift();)r.command.reject(e);if(t.commandQueue&&this.commandQueue.length>0)for(this.stream&&this.stream.removeAllListeners("data");r=this.commandQueue.shift();)r.command.reject(e)}_readyCheck(e){let t=this;this.info(function(r,s){if(r)return r.message&&r.message.includes("NOPERM")?(console.warn(`Skipping the ready check because INFO command fails: "${r.message}". You can disable ready check with "enableReadyCheck". More: https://github.com/luin/ioredis/wiki/Disable-ready-check.`),e(null,{})):e(r);if("string"!=typeof s)return e(null,s);let i={},o=s.split("\r\n");for(let e=0;e<o.length;++e){let[t,...r]=o[e].split(":"),s=r.join(":");s&&(i[t]=s)}if(i.loading&&"0"!==i.loading){let r=1e3*(i.loading_eta_seconds||1),s=t.options.maxLoadingRetryTime&&t.options.maxLoadingRetryTime<r?t.options.maxLoadingRetryTime:r;_("Redis server still loading, trying again in "+s+"ms"),setTimeout(function(){t._readyCheck(e)},s)}else e(null,i)}).catch(S.noop)}}k.Cluster=n.default,k.Command=a.default,k.defaultOptions=h.DEFAULT_REDIS_OPTIONS,(0,m.default)(k,i.EventEmitter),(0,f.addTransactionSupport)(k.prototype),r.default=k},59875,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});let s=e.r(88947);class i extends s.Readable{constructor(e){super(e),this.opt=e,this._redisCursor="0",this._redisDrained=!1}_read(){if(this._redisDrained)return void this.push(null);let e=[this._redisCursor];this.opt.key&&e.unshift(this.opt.key),this.opt.match&&e.push("MATCH",this.opt.match),this.opt.type&&e.push("TYPE",this.opt.type),this.opt.count&&e.push("COUNT",String(this.opt.count)),this.opt.noValues&&e.push("NOVALUES"),this.opt.redis[this.opt.command](e,(e,t)=>{e?this.emit("error",e):(this._redisCursor=t[0]instanceof Buffer?t[0].toString():t[0],"0"===this._redisCursor&&(this._redisDrained=!0),this.push(t[1]))})}close(){this._redisDrained=!0}}r.default=i},27743,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});let s=e.r(54799),i=e.r(59026),o=e.r(42351);r.default=class{constructor(e,t=null,r="",o=!1){this.lua=e,this.numberOfKeys=t,this.keyPrefix=r,this.readOnly=o,this.sha=(0,s.createHash)("sha1").update(e).digest("hex");let n=this.sha,a=new WeakSet;this.Command=class extends i.default{toWritable(t){let r=this.reject;return this.reject=e=>{-1!==e.message.indexOf("NOSCRIPT")&&a.delete(t),r.call(this,e)},a.has(t)?"eval"===this.name&&(this.name="evalsha",this.args[0]=n):(a.add(t),this.name="eval",this.args[0]=e),super.toWritable(t)}}}execute(e,t,r,s){"number"==typeof this.numberOfKeys&&t.unshift(this.numberOfKeys),this.keyPrefix&&(r.keyPrefix=this.keyPrefix),this.readOnly&&(r.readOnly=!0);let i=new this.Command("evalsha",[this.sha,...t],r);return i.promise=i.promise.catch(s=>{if(-1===s.message.indexOf("NOSCRIPT"))throw s;let i=new this.Command("evalsha",[this.sha,...t],r);return(e.isPipeline?e.redis:e).sendCommand(i)}),(0,o.default)(i.promise,s),e.sendCommand(i)}}},28305,(e,t,r)=>{function s(e){return"unsubscribe"===e?"subscribe":"punsubscribe"===e?"psubscribe":"sunsubscribe"===e?"ssubscribe":e}Object.defineProperty(r,"__esModule",{value:!0}),r.default=class{constructor(){this.set={subscribe:{},psubscribe:{},ssubscribe:{}}}add(e,t){this.set[s(e)][t]=!0}del(e,t){delete this.set[s(e)][t]}channels(e){return Object.keys(this.set[s(e)])}isEmpty(){return 0===this.channels("subscribe").length&&0===this.channels("psubscribe").length&&0===this.channels("ssubscribe").length}}},47145,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.executeWithAutoPipelining=r.getFirstValueInFlattenedArray=r.shouldUseAutoPipelining=r.notAllowedAutoPipelineCommands=r.kCallbacks=r.kExec=void 0;let s=e.r(18761),i=e.r(43594),o=e.r(42351),n=e.r(87693);function a(e){for(let t=0;t<e.length;t++){let r=e[t];if("string"==typeof r)return r;if(Array.isArray(r)||(0,s.isArguments)(r)){if(0===r.length)continue;return r[0]}let i=[r].flat();if(i.length>0)return i[0]}}r.kExec=Symbol("exec"),r.kCallbacks=Symbol("callbacks"),r.notAllowedAutoPipelineCommands=["auth","info","script","quit","cluster","pipeline","multi","subscribe","psubscribe","unsubscribe","unpsubscribe","select","client"],r.shouldUseAutoPipelining=function(e,t,s){return t&&e.options.enableAutoPipelining&&!e.isPipeline&&!r.notAllowedAutoPipelineCommands.includes(s)&&!e.options.autoPipeliningIgnoredCommands.includes(s)},r.getFirstValueInFlattenedArray=a,r.executeWithAutoPipelining=function e(t,l,c,u,h){if(t.isCluster&&!t.slots.length)return"wait"===t.status&&t.connect().catch(s.noop),(0,o.default)(new Promise(function(r,s){t.delayUntilReady(i=>{i?s(i):e(t,l,c,u,null).then(r,s)})}),h);let d=t.options.keyPrefix||"",f=t.isCluster?t.slots[i(`${d}${function(e,t){if((0,n.exists)(e,{caseInsensitive:!0})){let r=t.flat(),s=(0,n.getKeyIndexes)(e,r,{nameCaseInsensitive:!0});if(s.length)return r[s[0]]}return a(t)}(c,u)}`)].join(","):"main";if(t.isCluster&&"master"!==t.options.scaleReads&&(f+=(0,n.exists)(c)&&(0,n.hasFlag)(c,"readonly")?":read":":write"),!t._autoPipelines.has(f)){let e=t.pipeline();e[r.kExec]=!1,e[r.kCallbacks]=[],t._autoPipelines.set(f,e)}let p=t._autoPipelines.get(f);p[r.kExec]||(p[r.kExec]=!0,setImmediate(function e(t,s){if(t._runningAutoPipelines.has(s)||!t._autoPipelines.has(s))return;t._runningAutoPipelines.add(s);let i=t._autoPipelines.get(s);t._autoPipelines.delete(s);let o=i[r.kCallbacks];i[r.kCallbacks]=null,i.exec(function(r,i){if(t._runningAutoPipelines.delete(s),r)for(let e=0;e<o.length;e++)process.nextTick(o[e],r);else for(let e=0;e<o.length;e++)process.nextTick(o[e],...i[e]);t._autoPipelines.has(s)&&e(t,s)})},t,f));let y=new Promise(function(e,t){p[r.kCallbacks].push(function(r,s){r?t(r):e(s)}),"call"===l&&u.unshift(c),p[l](...u)});return(0,o.default)(y,h)}},84633,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_CLUSTER_OPTIONS=void 0;let s=e.r(79594);r.DEFAULT_CLUSTER_OPTIONS={clusterRetryStrategy:e=>Math.min(100+2*e,2e3),clusterNodeRetryStrategy:null,enableOfflineQueue:!0,enableReadyCheck:!0,scaleReads:"master",maxRedirections:16,retryDelayOnMoved:0,retryDelayOnFailover:100,retryDelayOnClusterDown:100,retryDelayOnTryAgain:100,slotsRefreshTimeout:1e3,useSRVRecords:!1,resolveSrv:s.resolveSrv,dnsLookup:s.lookup,enableAutoPipelining:!1,autoPipeliningIgnoredCommands:[],shardedSubscribers:!1}},65575,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});let s=e.r(57375),i=e.r(13895),o=e.r(45375),n=(0,i.Debug)("cluster:subscriber");r.default=class{constructor(e,t,r=!1){this.connectionPool=e,this.emitter=t,this.isSharded=r,this.started=!1,this.subscriber=null,this.slotRange=[],this.onSubscriberEnd=()=>{this.started?(n("subscriber has disconnected, selecting a new one..."),this.selectSubscriber()):n("subscriber has disconnected, but ClusterSubscriber is not started, so not reconnecting.")},this.connectionPool.on("-node",(e,t)=>{this.started&&this.subscriber&&(0,s.getNodeKey)(this.subscriber.options)===t&&(n("subscriber has left, selecting a new one..."),this.selectSubscriber())}),this.connectionPool.on("+node",()=>{this.started&&!this.subscriber&&(n("a new node is discovered and there is no subscriber, selecting a new one..."),this.selectSubscriber())})}getInstance(){return this.subscriber}associateSlotRange(e){return this.isSharded&&(this.slotRange=e),this.slotRange}start(){this.started=!0,this.selectSubscriber(),n("started")}stop(){this.started=!1,this.subscriber&&(this.subscriber.disconnect(),this.subscriber=null)}isStarted(){return this.started}selectSubscriber(){let e=this.lastActiveSubscriber;e&&(e.off("end",this.onSubscriberEnd),e.disconnect()),this.subscriber&&(this.subscriber.off("end",this.onSubscriberEnd),this.subscriber.disconnect());let t=(0,i.sample)(this.connectionPool.getNodes());if(!t){n("selecting subscriber failed since there is no node discovered in the cluster yet"),this.subscriber=null;return}let{options:r}=t;n("selected a subscriber %s:%s",r.host,r.port);let a="subscriber";this.isSharded&&(a="ssubscriber"),this.subscriber=new o.default({port:r.port,host:r.host,username:r.username,password:r.password,enableReadyCheck:!0,connectionName:(0,s.getConnectionName)(a,r.connectionName),lazyConnect:!0,tls:r.tls,retryStrategy:null}),this.subscriber.on("error",i.noop),this.subscriber.on("moved",()=>{this.emitter.emit("forceRefresh")}),this.subscriber.once("end",this.onSubscriberEnd);let l={subscribe:[],psubscribe:[],ssubscribe:[]};if(e){let t=e.condition||e.prevCondition;t&&t.subscriber&&(l.subscribe=t.subscriber.channels("subscribe"),l.psubscribe=t.subscriber.channels("psubscribe"),l.ssubscribe=t.subscriber.channels("ssubscribe"))}if(l.subscribe.length||l.psubscribe.length||l.ssubscribe.length){let e=0;for(let t of["subscribe","psubscribe","ssubscribe"]){let r=l[t];if(0!=r.length)if(n("%s %d channels",t,r.length),"ssubscribe"===t)for(let s of r)e+=1,this.subscriber[t](s).then(()=>{--e||(this.lastActiveSubscriber=this.subscriber)}).catch(()=>{n("failed to ssubscribe to channel: %s",s)});else e+=1,this.subscriber[t](r).then(()=>{--e||(this.lastActiveSubscriber=this.subscriber)}).catch(()=>{n("failed to %s %d channels",t,r.length)})}}else this.lastActiveSubscriber=this.subscriber;for(let e of["message","messageBuffer"])this.subscriber.on(e,(t,r)=>{this.emitter.emit(e,t,r)});for(let e of["pmessage","pmessageBuffer"])this.subscriber.on(e,(t,r,s)=>{this.emitter.emit(e,t,r,s)});if(!0==this.isSharded)for(let e of["smessage","smessageBuffer"])this.subscriber.on(e,(t,r)=>{this.emitter.emit(e,t,r)})}}},27785,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});let s=e.r(13895),i=e.r(57375),o=e.r(43594),n=e.r(7498),a=(0,s.Debug)("cluster:subscriberGroup");class l{constructor(e,t){this.subscriberGroupEmitter=e,this.options=t,this.shardedSubscribers=new Map,this.clusterSlots=[],this.subscriberToSlotsIndex=new Map,this.channels=new Map,this.failedAttemptsByNode=new Map,this.isResetting=!1,this.pendingReset=null,this.handleSubscriberConnectFailed=(e,t)=>{let r=(this.failedAttemptsByNode.get(t)||0)+1;this.failedAttemptsByNode.set(t,r);let s=Math.min(r,l.MAX_RETRY_ATTEMPTS),i=Math.min(l.BASE_BACKOFF_MS*2**s,l.MAX_BACKOFF_MS),o=Math.floor(.5*i*(Math.random()-.5)),n=Math.max(0,i+o);a("Failed to connect subscriber for %s. Refreshing slots in %dms",t,n),this.subscriberGroupEmitter.emit("subscriberConnectFailed",{delay:n,error:e})},this.handleSubscriberConnectSucceeded=e=>{this.failedAttemptsByNode.delete(e)}}getResponsibleSubscriber(e){let t=this.clusterSlots[e][0],r=this.shardedSubscribers.get(t);return r&&"idle"===r.subscriberStatus&&r.start().then(()=>{this.handleSubscriberConnectSucceeded(r.getNodeKey())}).catch(e=>{this.handleSubscriberConnectFailed(e,r.getNodeKey())}),r}addChannels(e){let t=o(e[0]);for(let r of e)if(o(r)!==t)return -1;let r=this.channels.get(t);return r?this.channels.set(t,r.concat(e)):this.channels.set(t,e),Array.from(this.channels.values()).reduce((e,t)=>e+t.length,0)}removeChannels(e){let t=o(e[0]);for(let r of e)if(o(r)!==t)return -1;let r=this.channels.get(t);if(r){let s=r.filter(t=>!e.includes(t));this.channels.set(t,s)}return Array.from(this.channels.values()).reduce((e,t)=>e+t.length,0)}stop(){for(let e of this.shardedSubscribers.values())e.stop();this.pendingReset=null,this.shardedSubscribers.clear(),this.subscriberToSlotsIndex.clear()}start(){let e=[];for(let t of this.shardedSubscribers.values())this.shouldStartSubscriber(t)&&(e.push(t.start().then(()=>{this.handleSubscriberConnectSucceeded(t.getNodeKey())}).catch(e=>{this.handleSubscriberConnectFailed(e,t.getNodeKey())})),this.subscriberGroupEmitter.emit("+subscriber"));return Promise.all(e)}async reset(e,t){if(this.isResetting){this.pendingReset={slots:e,nodes:t};return}this.isResetting=!0;try{let r=this._refreshSlots(e),s=this.hasUnhealthySubscribers();if(!r&&!s)return void a("No topology change detected or failed subscribers. Skipping reset.");for(let[e,t]of this.shardedSubscribers){if(this.subscriberToSlotsIndex.has(e)&&t.isHealthy()){a("Skipping deleting subscriber for %s",e);continue}a("Removing subscriber for %s",e),t.stop(),this.shardedSubscribers.delete(e),this.subscriberGroupEmitter.emit("-subscriber")}let o=[];for(let[e,r]of this.subscriberToSlotsIndex){let r=this.shardedSubscribers.get(e);if(r&&r.isHealthy()){a("Skipping creating new subscriber for %s",e),!r.isStarted()&&this.shouldStartSubscriber(r)&&o.push(r.start().then(()=>{this.handleSubscriberConnectSucceeded(e)}).catch(t=>{this.handleSubscriberConnectFailed(t,e)}));continue}r&&!r.isHealthy()&&(a("Replacing subscriber for %s",e),r.stop(),this.shardedSubscribers.delete(e),this.subscriberGroupEmitter.emit("-subscriber")),a("Creating new subscriber for %s",e);let s=t.find(t=>(0,i.getNodeKey)(t.options)===e);if(!s){a("Failed to find node for key %s",e);continue}let l=new n.default(this.subscriberGroupEmitter,s.options,this.options.redisOptions);this.shardedSubscribers.set(e,l),this.shouldStartSubscriber(l)&&o.push(l.start().then(()=>{this.handleSubscriberConnectSucceeded(e)}).catch(t=>{this.handleSubscriberConnectFailed(t,e)})),this.subscriberGroupEmitter.emit("+subscriber")}await Promise.all(o),this._resubscribe(),this.subscriberGroupEmitter.emit("subscribersReady")}finally{if(this.isResetting=!1,this.pendingReset){let{slots:e,nodes:t}=this.pendingReset;this.pendingReset=null,await this.reset(e,t)}}}_refreshSlots(e){if(this._slotsAreEqual(e)&&this.subscriberToSlotsIndex.size>0)return a("Nothing to refresh because the new cluster map is equal to the previous one."),!1;a("Refreshing the slots of the subscriber group."),this.subscriberToSlotsIndex=new Map;for(let t=0;t<e.length;t++){let r=e[t][0];this.subscriberToSlotsIndex.has(r)||this.subscriberToSlotsIndex.set(r,[]),this.subscriberToSlotsIndex.get(r).push(Number(t))}return this.clusterSlots=JSON.parse(JSON.stringify(e)),!0}_resubscribe(){this.shardedSubscribers&&this.shardedSubscribers.forEach((e,t)=>{let r=this.subscriberToSlotsIndex.get(t);r&&r.forEach(r=>{let s=e.getInstance(),i=this.channels.get(r);if(i&&i.length>0){if(!s||"end"===s.status)return;"ready"===s.status?s.ssubscribe(...i).catch(e=>{a("Failed to ssubscribe on node %s: %s",t,e)}):s.once("ready",()=>{s.ssubscribe(...i).catch(e=>{a("Failed to ssubscribe on node %s: %s",t,e)})})}})})}_slotsAreEqual(e){return void 0!==this.clusterSlots&&JSON.stringify(this.clusterSlots)===JSON.stringify(e)}hasUnhealthySubscribers(){let e=Array.from(this.shardedSubscribers.values()).some(e=>!e.isHealthy()),t=Array.from(this.subscriberToSlotsIndex.keys()).some(e=>!this.shardedSubscribers.has(e));return e||t}shouldStartSubscriber(e){if(e.isStarted())return!1;if(!e.isLazyConnect())return!0;let t=this.subscriberToSlotsIndex.get(e.getNodeKey());return!!t&&t.some(e=>{let t=this.channels.get(e);return!!(t&&t.length>0)})}}r.default=l,l.MAX_RETRY_ATTEMPTS=10,l.MAX_BACKOFF_MS=2e3,l.BASE_BACKOFF_MS=100},15371,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});let s=e.r(27699),i=e.r(13895),o=e.r(57375),n=e.r(45375),a=(0,i.Debug)("cluster:connectionPool");class l extends s.EventEmitter{constructor(e,t=null){super(),this.redisOptions=e,this.clusterNodeRetryStrategy=t,this.nodes={all:{},master:{},slave:{}},this.specifiedOptions={}}getNodes(e="all"){let t=this.nodes[e];return Object.keys(t).map(e=>t[e])}getInstanceByKey(e){return this.nodes.all[e]}getSampleInstance(e){let t=Object.keys(this.nodes[e]),r=(0,i.sample)(t);return this.nodes[e][r]}addMasterNode(e){let t=(0,o.getNodeKey)(e.options),r=this.createRedisFromOptions(e,e.options.readOnly);return!e.options.readOnly&&(this.nodes.all[t]=r,this.nodes.master[t]=r,!0)}createRedisFromOptions(e,t){return new n.default((0,i.defaults)({retryStrategy:"function"==typeof this.clusterNodeRetryStrategy?this.clusterNodeRetryStrategy:null,enableOfflineQueue:!0,readOnly:t},e,this.redisOptions,{lazyConnect:!0}))}findOrCreate(e,t=!1){let r,s=(0,o.getNodeKey)(e);return t=!!t,this.specifiedOptions[s]?Object.assign(e,this.specifiedOptions[s]):this.specifiedOptions[s]=e,this.nodes.all[s]?(r=this.nodes.all[s]).options.readOnly!==t&&(r.options.readOnly=t,a("Change role of %s to %s",s,t?"slave":"master"),r[t?"readonly":"readwrite"]().catch(i.noop),t?(delete this.nodes.master[s],this.nodes.slave[s]=r):(delete this.nodes.slave[s],this.nodes.master[s]=r)):(a("Connecting to %s as %s",s,t?"slave":"master"),r=this.createRedisFromOptions(e,t),this.nodes.all[s]=r,this.nodes[t?"slave":"master"][s]=r,r.once("end",()=>{this.removeNode(s),this.emit("-node",r,s),Object.keys(this.nodes.all).length||this.emit("drain")}),this.emit("+node",r,s),r.on("error",e=>{this.emit("nodeError",e,s)})),r}reset(e){a("Reset with %O",e);let t={};e.forEach(e=>{let r=(0,o.getNodeKey)(e);e.readOnly&&t[r]||(t[r]=e)}),Object.keys(this.nodes.all).forEach(e=>{t[e]||(a("Disconnect %s because the node does not hold any slot",e),this.nodes.all[e].disconnect(),this.removeNode(e))}),Object.keys(t).forEach(e=>{let r=t[e];this.findOrCreate(r,r.readOnly)})}removeNode(e){let{nodes:t}=this;t.all[e]&&(a("Remove %s from the pool",e),delete t.all[e]),delete t.master[e],delete t.slave[e]}}r.default=l},28181,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});let s=e.r(13895),i=e.r(20265),o=(0,s.Debug)("delayqueue");r.default=class{constructor(){this.queues={},this.timeouts={}}push(e,t,r){let s=r.callback||process.nextTick;this.queues[e]||(this.queues[e]=new i),this.queues[e].push(t),this.timeouts[e]||(this.timeouts[e]=setTimeout(()=>{s(()=>{this.timeouts[e]=null,this.execute(e)})},r.timeout))}execute(e){let t=this.queues[e];if(!t)return;let{length:r}=t;if(r)for(o("send %d commands in %s queue",r,e),this.queues[e]=null;t.length>0;)t.shift()()}}},7498,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});let s=e.r(57375),i=e.r(13895),o=e.r(45375),n=(0,i.Debug)("cluster:subscriberGroup:shardedSubscriber"),a="idle",l="starting",c="connected",u="stopping",h="ended",d={[a]:[l,u,h],[l]:[c,u,h],[c]:[u,h],[u]:[h],[h]:[]};r.default=class{constructor(e,t,r){var n;for(let l of(this.emitter=e,this.status=a,this.instance=null,this.connectPromise=null,this.messageListeners=new Map,this.onEnd=()=>{this.updateStatus(h),this.emitter.emit("-node",this.instance,this.nodeKey)},this.onError=e=>{this.emitter.emit("nodeError",e,this.nodeKey)},this.onMoved=()=>{this.emitter.emit("moved")},this.instance=new o.default((0,i.defaults)({enableReadyCheck:!1,enableOfflineQueue:!0,connectionName:(0,s.getConnectionName)("ssubscriber",t.connectionName),retryStrategy:null,lazyConnect:!0},t,r)),this.lazyConnect=null==(n=null==r?void 0:r.lazyConnect)||n,this.nodeKey=(0,s.getNodeKey)(t),this.instance.on("end",this.onEnd),this.instance.on("error",this.onError),this.instance.on("moved",this.onMoved),["smessage","smessageBuffer"])){let e=(...e)=>{this.emitter.emit(l,...e)};this.messageListeners.set(l,e),this.instance.on(l,e)}}async start(){if(this.connectPromise)return this.connectPromise;if(this.status!==l&&this.status!==c){if(this.status===h||!this.instance)throw Error(`Sharded subscriber ${this.nodeKey} cannot be restarted once ended.`);this.updateStatus(l),this.connectPromise=this.instance.connect();try{await this.connectPromise,this.updateStatus(c)}catch(e){throw this.updateStatus(h),e}finally{this.connectPromise=null}}}stop(){this.updateStatus(u),this.instance&&(this.instance.disconnect(),this.instance.removeAllListeners(),this.messageListeners.clear(),this.instance=null),this.updateStatus(h),n("stopped %s",this.nodeKey)}isStarted(){return[c,l].includes(this.status)}get subscriberStatus(){return this.status}isHealthy(){return(this.status===a||this.status===c||this.status===l)&&null!==this.instance}getInstance(){return this.instance}getNodeKey(){return this.nodeKey}isLazyConnect(){return this.lazyConnect}updateStatus(e){if(this.status!==e){if(!d[this.status].includes(e))return void n("Invalid status transition for %s: %s -> %s",this.nodeKey,this.status,e);this.status=e}}}},58063,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});let s=e.r(87693),i=e.r(27699),o=e.r(87315),n=e.r(42351),a=e.r(59026),l=e.r(93474),c=e.r(45375),u=e.r(59875),h=e.r(60886),d=e.r(13895),f=e.r(74031),p=e.r(34207),y=e.r(84633),m=e.r(65575),g=e.r(15371),S=e.r(28181),b=e.r(57375),_=e.r(20265),k=e.r(27785),E=(0,d.Debug)("cluster"),v=new WeakSet;class w extends p.default{constructor(e,t={}){var r;if(super(),this.slots=[],this._groupsIds={},this._groupsBySlot=Array(16384),this.isCluster=!0,this.retryAttempts=0,this.delayQueue=new S.default,this.offlineQueue=new _,this.isRefreshing=!1,this._refreshSlotsCacheCallbacks=[],this._autoPipelines=new Map,this._runningAutoPipelines=new Set,this._readyDelayedCallbacks=[],this.connectionEpoch=0,i.EventEmitter.call(this),this.startupNodes=e,this.options=(0,d.defaults)({},t,y.DEFAULT_CLUSTER_OPTIONS,this.options),this.options.shardedSubscribers&&this.createShardedSubscriberGroup(),this.options.redisOptions&&this.options.redisOptions.keyPrefix&&!this.options.keyPrefix&&(this.options.keyPrefix=this.options.redisOptions.keyPrefix),"function"!=typeof this.options.scaleReads&&-1===["all","master","slave"].indexOf(this.options.scaleReads))throw Error('Invalid option scaleReads "'+this.options.scaleReads+'". Expected "all", "master", "slave" or a custom function');this.connectionPool=new g.default(null!=(r=this.options.redisOptions)?r:{},this.options.clusterNodeRetryStrategy),this.connectionPool.on("-node",(e,t)=>{this.emit("-node",e)}),this.connectionPool.on("+node",e=>{this.emit("+node",e)}),this.connectionPool.on("drain",()=>{this.setStatus("close")}),this.connectionPool.on("nodeError",(e,t)=>{this.emit("node error",e,t)}),this.subscriber=new m.default(this.connectionPool,this),this.options.scripts&&Object.entries(this.options.scripts).forEach(([e,t])=>{this.defineCommand(e,t)}),this.options.lazyConnect?this.setStatus("wait"):this.connect().catch(e=>{E("connecting failed: %s",e)})}connect(){return new Promise((e,t)=>{if("connecting"===this.status||"connect"===this.status||"ready"===this.status)return void t(Error("Redis is already connecting/connected"));let r=++this.connectionEpoch;this.setStatus("connecting"),this.resolveStartupNodeHostnames().then(s=>{let i;if(this.connectionEpoch!==r){E("discard connecting after resolving startup nodes because epoch not match: %d != %d",r,this.connectionEpoch),t(new o.RedisError("Connection is discarded because a new connection is made"));return}if("connecting"!==this.status){E("discard connecting after resolving startup nodes because the status changed to %s",this.status),t(new o.RedisError("Connection is aborted"));return}this.connectionPool.reset(s),this.options.shardedSubscribers&&this.shardedSubscribers.reset(this.slots,this.connectionPool.getNodes("all")).catch(e=>{E("Error while starting subscribers: %s",e)});let n=()=>{this.setStatus("ready"),this.retryAttempts=0,this.executeOfflineCommands(),this.resetNodesRefreshInterval(),e()},a=()=>{this.invokeReadyDelayedCallbacks(void 0),this.removeListener("close",i),this.manuallyClosing=!1,this.setStatus("connect"),this.options.enableReadyCheck?this.readyCheck((e,t)=>{e||t?(E("Ready check failed (%s). Reconnecting...",e||t),"connect"===this.status&&this.disconnect(!0)):n()}):n()};i=()=>{let e=Error("None of startup nodes is available");this.removeListener("refresh",a),this.invokeReadyDelayedCallbacks(e),t(e)},this.once("refresh",a),this.once("close",i),this.once("close",this.handleCloseEvent.bind(this)),this.refreshSlotsCache(e=>{e&&e.message===l.default.defaultMessage&&(c.default.prototype.silentEmit.call(this,"error",e),this.connectionPool.reset([]))}),this.subscriber.start(),this.options.shardedSubscribers&&this.shardedSubscribers.start().catch(e=>{E("Error while starting subscribers: %s",e)})}).catch(e=>{this.setStatus("close"),this.handleCloseEvent(e),this.invokeReadyDelayedCallbacks(e),t(e)})})}disconnect(e=!1){let t=this.status;this.setStatus("disconnecting"),e||(this.manuallyClosing=!0),this.reconnectTimeout&&!e&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null,E("Canceled reconnecting attempts")),this.clearNodesRefreshInterval(),this.subscriber.stop(),this.options.shardedSubscribers&&this.shardedSubscribers.stop(),"wait"===t?(this.setStatus("close"),this.handleCloseEvent()):this.connectionPool.reset([])}quit(e){let t=this.status;if(this.setStatus("disconnecting"),this.manuallyClosing=!0,this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null),this.clearNodesRefreshInterval(),this.subscriber.stop(),this.options.shardedSubscribers&&this.shardedSubscribers.stop(),"wait"===t){let t=(0,n.default)(Promise.resolve("OK"),e);return setImmediate((function(){this.setStatus("close"),this.handleCloseEvent()}).bind(this)),t}return(0,n.default)(Promise.all(this.nodes().map(e=>e.quit().catch(e=>{if(e.message===d.CONNECTION_CLOSED_ERROR_MSG)return"OK";throw e}))).then(()=>"OK"),e)}duplicate(e=[],t={}){return new w(e.length>0?e:this.startupNodes.slice(0),Object.assign({},this.options,t))}nodes(e="all"){if("all"!==e&&"master"!==e&&"slave"!==e)throw Error('Invalid role "'+e+'". Expected "all", "master" or "slave"');return this.connectionPool.getNodes(e)}delayUntilReady(e){this._readyDelayedCallbacks.push(e)}get autoPipelineQueueSize(){let e=0;for(let t of this._autoPipelines.values())e+=t.length;return e}refreshSlotsCache(e){if(e&&this._refreshSlotsCacheCallbacks.push(e),this.isRefreshing)return;this.isRefreshing=!0;let t=this,r=e=>{for(let t of(this.isRefreshing=!1,this._refreshSlotsCacheCallbacks))t(e);this._refreshSlotsCacheCallbacks=[]},s=(0,d.shuffle)(this.connectionPool.getNodes()),i=null;!function e(o){if(o===s.length)return r(new l.default(l.default.defaultMessage,i));let n=s[o],a=`${n.options.host}:${n.options.port}`;E("getting slot cache from %s",a),t.getInfoFromNode(n,function(s){switch(t.status){case"close":case"end":return r(Error("Cluster is disconnected."));case"disconnecting":return r(Error("Cluster is disconnecting."))}s?(t.emit("node error",s,a),i=s,e(o+1)):(t.emit("refresh"),r())})}(0)}sendCommand(e,t,r){if("wait"===this.status&&this.connect().catch(d.noop),"end"===this.status)return e.reject(Error(d.CONNECTION_CLOSED_ERROR_MSG)),e.promise;let i=this.options.scaleReads;"master"!==i&&(e.isReadOnly||(0,s.exists)(e.name)&&(0,s.hasFlag)(e.name,"readonly")||(i="master"));let n=r?r.slot:e.getSlot(),l={},c=this;if(!r&&!v.has(e)){v.add(e);let t=e.reject;e.reject=function(r){let s=u.bind(null,!0);c.handleError(r,l,{moved:function(t,r){E("command %s is moved to %s",e.name,r),n=Number(t),c.slots[t]?c.slots[t][0]=r:c.slots[t]=[r],c._groupsBySlot[t]=c._groupsIds[c.slots[t].join(";")],c.connectionPool.findOrCreate(c.natMapper(r)),u(),E("refreshing slot caches... (triggered by MOVED error)"),c.refreshSlotsCache()},ask:function(t,r){E("command %s is required to ask %s:%s",e.name,r);let s=c.natMapper(r);c.connectionPool.findOrCreate(s),u(!1,`${s.host}:${s.port}`)},tryagain:s,clusterDown:s,connectionClosed:s,maxRedirections:function(r){t.call(e,r)},defaults:function(){t.call(e,r)}})}}function u(s,l){let u;if("end"===c.status)return void e.reject(new o.AbortError("Cluster is ended."));if("ready"===c.status||"cluster"===e.name){if(r&&r.redis)u=r.redis;else if(a.default.checkFlag("ENTER_SUBSCRIBER_MODE",e.name)||a.default.checkFlag("EXIT_SUBSCRIBER_MODE",e.name)){if(c.options.shardedSubscribers&&("ssubscribe"==e.name||"sunsubscribe"==e.name)){let t=c.shardedSubscribers.getResponsibleSubscriber(n);if(!t)return void e.reject(new o.AbortError(`No sharded subscriber for slot: ${n}`));let r=-1;"ssubscribe"==e.name&&(r=c.shardedSubscribers.addChannels(e.getKeys())),"sunsubscribe"==e.name&&(r=c.shardedSubscribers.removeChannels(e.getKeys())),-1!==r?u=t.getInstance():e.reject(new o.AbortError("Possible CROSSSLOT error: All channels must hash to the same slot"))}else u=c.subscriber.getInstance();if(!u)return void e.reject(new o.AbortError("No subscriber for the cluster"))}else{if(!s){if("number"==typeof n&&c.slots[n]){let t=c.slots[n];if("function"==typeof i){let r=t.map(function(e){return c.connectionPool.getInstanceByKey(e)});Array.isArray(u=i(r,e))&&(u=(0,d.sample)(u)),u||(u=r[0])}else{let e;e="all"===i?(0,d.sample)(t):"slave"===i&&t.length>1?(0,d.sample)(t,1):t[0],u=c.connectionPool.getInstanceByKey(e)}}l&&(u=c.connectionPool.getInstanceByKey(l)).asking()}if(u||(u=("function"==typeof i?null:c.connectionPool.getSampleInstance(i))||c.connectionPool.getSampleInstance("all")),u&&!c.options.enableOfflineQueue&&"ready"!==u.status&&"wait"!==u.status)return void e.reject(Error(d.CONNECTION_CLOSED_ERROR_MSG))}r&&!r.redis&&(r.redis=u)}!u&&c.options.enableOfflineQueue?c.offlineQueue.push({command:e,stream:t,node:r}):u?u.sendCommand(e,t):e.reject(Error("Cluster isn't ready and enableOfflineQueue options is false"))}return u(),e.promise}sscanStream(e,t){return this.createScanStream("sscan",{key:e,options:t})}sscanBufferStream(e,t){return this.createScanStream("sscanBuffer",{key:e,options:t})}hscanStream(e,t){return this.createScanStream("hscan",{key:e,options:t})}hscanBufferStream(e,t){return this.createScanStream("hscanBuffer",{key:e,options:t})}zscanStream(e,t){return this.createScanStream("zscan",{key:e,options:t})}zscanBufferStream(e,t){return this.createScanStream("zscanBuffer",{key:e,options:t})}handleError(e,t,r){if(void 0===t.value?t.value=this.options.maxRedirections:t.value-=1,t.value<=0)return void r.maxRedirections(Error("Too many Cluster redirections. Last error: "+e));let s=e.message.split(" ");if("MOVED"===s[0]){let e=this.options.retryDelayOnMoved;e&&"number"==typeof e?this.delayQueue.push("moved",r.moved.bind(null,s[1],s[2]),{timeout:e}):r.moved(s[1],s[2])}else"ASK"===s[0]?r.ask(s[1],s[2]):"TRYAGAIN"===s[0]?this.delayQueue.push("tryagain",r.tryagain,{timeout:this.options.retryDelayOnTryAgain}):"CLUSTERDOWN"===s[0]&&this.options.retryDelayOnClusterDown>0?this.delayQueue.push("clusterdown",r.connectionClosed,{timeout:this.options.retryDelayOnClusterDown,callback:this.refreshSlotsCache.bind(this)}):e.message===d.CONNECTION_CLOSED_ERROR_MSG&&this.options.retryDelayOnFailover>0&&"ready"===this.status?this.delayQueue.push("failover",r.connectionClosed,{timeout:this.options.retryDelayOnFailover,callback:this.refreshSlotsCache.bind(this)}):r.defaults()}resetOfflineQueue(){this.offlineQueue=new _}clearNodesRefreshInterval(){this.slotsTimer&&(clearTimeout(this.slotsTimer),this.slotsTimer=null)}resetNodesRefreshInterval(){if(this.slotsTimer||!this.options.slotsRefreshInterval)return;let e=()=>{this.slotsTimer=setTimeout(()=>{E('refreshing slot caches... (triggered by "slotsRefreshInterval" option)'),this.refreshSlotsCache(()=>{e()})},this.options.slotsRefreshInterval)};e()}setStatus(e){E("status: %s -> %s",this.status||"[empty]",e),this.status=e,process.nextTick(()=>{this.emit(e)})}handleCloseEvent(e){var t;let r;e&&E("closed because %s",e),this.manuallyClosing||"function"!=typeof this.options.clusterRetryStrategy||(r=this.options.clusterRetryStrategy.call(this,++this.retryAttempts,e)),"number"==typeof r?(this.setStatus("reconnecting"),this.reconnectTimeout=setTimeout(()=>{this.reconnectTimeout=null,E("Cluster is disconnected. Retrying after %dms",r),this.connect().catch(function(e){E("Got error %s when reconnecting. Ignoring...",e)})},r)):(this.options.shardedSubscribers&&(null==(t=this.subscriberGroupEmitter)||t.removeAllListeners()),this.setStatus("end"),this.flushQueue(Error("None of startup nodes is available")))}flushQueue(e){let t;for(;t=this.offlineQueue.shift();)t.command.reject(e)}executeOfflineCommands(){if(this.offlineQueue.length){let e;E("send %d commands in offline queue",this.offlineQueue.length);let t=this.offlineQueue;for(this.resetOfflineQueue();e=t.shift();)this.sendCommand(e.command,e.stream,e.node)}}natMapper(e){let t="string"==typeof e?e:`${e.host}:${e.port}`,r=null;return(this.options.natMap&&"function"==typeof this.options.natMap?r=this.options.natMap(t):this.options.natMap&&"object"==typeof this.options.natMap&&(r=this.options.natMap[t]),r)?(E("NAT mapping %s -> %O",t,r),Object.assign({},r)):"string"==typeof e?(0,b.nodeKeyToRedisOptions)(e):e}getInfoFromNode(e,t){if(!e)return t(Error("Node is disconnected"));let r=e.duplicate({enableOfflineQueue:!0,enableReadyCheck:!1,retryStrategy:null,connectionName:(0,b.getConnectionName)("refresher",this.options.redisOptions&&this.options.redisOptions.connectionName)});r.on("error",d.noop),r.cluster("SLOTS",(0,d.timeout)((e,s)=>{if(r.disconnect(),e)return E("error encountered running CLUSTER.SLOTS: %s",e),t(e);if("disconnecting"===this.status||"close"===this.status||"end"===this.status){E("ignore CLUSTER.SLOTS results (count: %d) since cluster status is %s",s.length,this.status),t();return}let i=[];E("cluster slots result count: %d",s.length);for(let e=0;e<s.length;++e){let t=s[e],r=t[0],o=t[1],n=[];for(let e=2;e<t.length;e++){if(!t[e][0])continue;let r=this.natMapper({host:t[e][0],port:t[e][1]});r.readOnly=2!==e,i.push(r),n.push(r.host+":"+r.port)}E("cluster slots result [%d]: slots %d~%d served by %s",e,r,o,n);for(let e=r;e<=o;e++)this.slots[e]=n}this._groupsIds=Object.create(null);let o=0;for(let e=0;e<16384;e++){let t=(this.slots[e]||[]).join(";");if(!t.length){this._groupsBySlot[e]=void 0;continue}this._groupsIds[t]||(this._groupsIds[t]=++o),this._groupsBySlot[e]=this._groupsIds[t]}this.connectionPool.reset(i),this.options.shardedSubscribers&&this.shardedSubscribers.reset(this.slots,this.connectionPool.getNodes("all")).catch(e=>{E("Error while starting subscribers: %s",e)}),t()},this.options.slotsRefreshTimeout))}invokeReadyDelayedCallbacks(e){for(let t of this._readyDelayedCallbacks)process.nextTick(t,e);this._readyDelayedCallbacks=[]}readyCheck(e){this.cluster("INFO",(t,r)=>{let s;if(t)return e(t);if("string"!=typeof r)return e();let i=r.split("\r\n");for(let e=0;e<i.length;++e){let t=i[e].split(":");if("cluster_state"===t[0]){s=t[1];break}}"fail"===s?(E("cluster state not ok (%s)",s),e(null,s)):e()})}resolveSrv(e){return new Promise((t,r)=>{this.options.resolveSrv(e,(e,s)=>{if(e)return r(e);let i=this,o=(0,b.groupSrvRecords)(s),n=Object.keys(o).sort((e,t)=>parseInt(e)-parseInt(t));!function e(s){if(!n.length)return r(s);let a=o[n[0]],l=(0,b.weightSrvRecords)(a);a.records.length||n.shift(),i.dnsLookup(l.name).then(e=>t({host:e,port:l.port}),e)}()})})}dnsLookup(e){return new Promise((t,r)=>{this.options.dnsLookup(e,(s,i)=>{s?(E("failed to resolve hostname %s to IP: %s",e,s.message),r(s)):(E("resolved hostname %s to IP %s",e,i),t(i))})})}async resolveStartupNodeHostnames(){if(!Array.isArray(this.startupNodes)||0===this.startupNodes.length)throw Error("`startupNodes` should contain at least one node.");let e=(0,b.normalizeNodeOptions)(this.startupNodes),t=(0,b.getUniqueHostnamesFromOptions)(e);if(0===t.length)return e;let r=await Promise.all(t.map((this.options.useSRVRecords?this.resolveSrv:this.dnsLookup).bind(this))),s=(0,d.zipMap)(t,r);return e.map(e=>{let t=s.get(e.host);return t?this.options.useSRVRecords?Object.assign({},e,t):Object.assign({},e,{host:t}):e})}createScanStream(e,{key:t,options:r={}}){return new u.default({objectMode:!0,key:t,redis:this,command:e,...r})}createShardedSubscriberGroup(){this.subscriberGroupEmitter=new i.EventEmitter,this.shardedSubscribers=new k.default(this.subscriberGroupEmitter,this.options);let e=e=>{e instanceof l.default&&this.disconnect(!0)};for(let t of(this.subscriberGroupEmitter.on("-node",(t,r)=>{this.emit("-node",t,r),this.refreshSlotsCache(e)}),this.subscriberGroupEmitter.on("subscriberConnectFailed",({delay:t,error:r})=>{this.emit("error",r),setTimeout(()=>{this.refreshSlotsCache(e)},t)}),this.subscriberGroupEmitter.on("moved",()=>{this.refreshSlotsCache(e)}),this.subscriberGroupEmitter.on("-subscriber",()=>{this.emit("-subscriber")}),this.subscriberGroupEmitter.on("+subscriber",()=>{this.emit("+subscriber")}),this.subscriberGroupEmitter.on("nodeError",(e,t)=>{this.emit("nodeError",e,t)}),this.subscriberGroupEmitter.on("subscribersReady",()=>{this.emit("subscribersReady")}),["smessage","smessageBuffer"]))this.subscriberGroupEmitter.on(t,(e,r,s)=>{this.emit(t,e,r,s)})}}(0,f.default)(w,i.EventEmitter),(0,h.addTransactionSupport)(w.prototype),r.default=w},57375,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.getConnectionName=r.weightSrvRecords=r.groupSrvRecords=r.getUniqueHostnamesFromOptions=r.normalizeNodeOptions=r.nodeKeyToRedisOptions=r.getNodeKey=void 0;let s=e.r(13895),i=e.r(4446);r.getNodeKey=function(e){return e.port=e.port||6379,e.host=e.host||"127.0.0.1",e.host+":"+e.port},r.nodeKeyToRedisOptions=function(e){let t=e.lastIndexOf(":");if(-1===t)throw Error(`Invalid node key ${e}`);return{host:e.slice(0,t),port:Number(e.slice(t+1))}},r.normalizeNodeOptions=function(e){return e.map(e=>{let t={};if("object"==typeof e)Object.assign(t,e);else if("string"==typeof e)Object.assign(t,(0,s.parseURL)(e));else if("number"==typeof e)t.port=e;else throw Error("Invalid argument "+e);return"string"==typeof t.port&&(t.port=parseInt(t.port,10)),delete t.db,t.port||(t.port=6379),t.host||(t.host="127.0.0.1"),(0,s.resolveTLSProfile)(t)})},r.getUniqueHostnamesFromOptions=function(e){let t={};return e.forEach(e=>{t[e.host]=!0}),Object.keys(t).filter(e=>!(0,i.isIP)(e))},r.groupSrvRecords=function(e){let t={};for(let r of e)t.hasOwnProperty(r.priority)?(t[r.priority].totalWeight+=r.weight,t[r.priority].records.push(r)):t[r.priority]={totalWeight:r.weight,records:[r]};return t},r.weightSrvRecords=function(e){if(1===e.records.length)return e.totalWeight=0,e.records.shift();let t=Math.floor(Math.random()*(e.totalWeight+e.records.length)),r=0;for(let[s,i]of e.records.entries())if((r+=1+i.weight)>t)return e.totalWeight-=i.weight,e.records.splice(s,1),i},r.getConnectionName=function(e,t){let r=`ioredis-cluster(${e})`;return t?`${r}:${t}`:r}},12251,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});let s=(0,e.r(13895).Debug)("AbstractConnector");r.default=class{constructor(e){this.connecting=!1,this.disconnectTimeout=e}check(e){return!0}disconnect(){if(this.connecting=!1,this.stream){let e=this.stream,t=setTimeout(()=>{s("stream %s:%s still open, destroying it",e.remoteAddress,e.remotePort),e.destroy()},this.disconnectTimeout);e.on("close",()=>clearTimeout(t)),e.end()}}}},6057,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.FailoverDetector=void 0;let s=(0,e.r(13895).Debug)("FailoverDetector"),i="+switch-master";r.FailoverDetector=class{constructor(e,t){this.isDisconnected=!1,this.connector=e,this.sentinels=t}cleanup(){for(let e of(this.isDisconnected=!0,this.sentinels))e.client.disconnect()}async subscribe(){s("Starting FailoverDetector");let e=[];for(let t of this.sentinels){let r=t.client.subscribe(i).catch(e=>{s("Failed to subscribe to failover messages on sentinel %s:%s (%s)",t.address.host||"127.0.0.1",t.address.port||26739,e.message)});e.push(r),t.client.on("message",e=>{this.isDisconnected||e!==i||this.disconnect()})}await Promise.all(e)}disconnect(){this.isDisconnected=!0,s("Failover detected, disconnecting"),this.connector.disconnect()}}},99378,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.default=class{constructor(e){this.cursor=0,this.sentinels=e.slice(0)}next(){let e=this.cursor>=this.sentinels.length;return{done:e,value:e?void 0:this.sentinels[this.cursor++]}}reset(e){e&&this.sentinels.length>1&&1!==this.cursor&&this.sentinels.unshift(...this.sentinels.splice(this.cursor-1)),this.cursor=0}add(e){for(let r=0;r<this.sentinels.length;r++){var t;if(t=this.sentinels[r],(e.host||"127.0.0.1")===(t.host||"127.0.0.1")&&(e.port||26379)===(t.port||26379))return!1}return this.sentinels.push(e),!0}toString(){return`${JSON.stringify(this.sentinels)} @${this.cursor}`}}},3107,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.SentinelIterator=void 0;let s=e.r(4446),i=e.r(13895),o=e.r(55004),n=e.r(99378);r.SentinelIterator=n.default;let a=e.r(12251),l=e.r(45375),c=e.r(6057),u=(0,i.Debug)("SentinelConnector");class h extends a.default{constructor(e){if(super(e.disconnectTimeout),this.options=e,this.emitter=null,this.failoverDetector=null,!this.options.sentinels.length)throw Error("Requires at least one sentinel to connect to.");if(!this.options.name)throw Error("Requires the name of master.");this.sentinelIterator=new n.default(this.options.sentinels)}check(e){let t=!e.role||this.options.role===e.role;return t||(u("role invalid, expected %s, but got %s",this.options.role,e.role),this.sentinelIterator.next(),this.sentinelIterator.next(),this.sentinelIterator.reset(!0)),t}disconnect(){super.disconnect(),this.failoverDetector&&this.failoverDetector.cleanup()}connect(e){let t;this.connecting=!0,this.retryAttempts=0;let r=async()=>{let n=this.sentinelIterator.next();if(n.done){this.sentinelIterator.reset(!1);let s="function"==typeof this.options.sentinelRetryStrategy?this.options.sentinelRetryStrategy(++this.retryAttempts):null,i="number"!=typeof s?"All sentinels are unreachable and retry is disabled.":`All sentinels are unreachable. Retrying from scratch after ${s}ms.`;t&&(i+=` Last error: ${t.message}`),u(i);let o=Error(i);if("number"==typeof s)return e("error",o),await new Promise(e=>setTimeout(e,s)),r();throw o}let a=null,l=null;try{a=await this.resolve(n.value)}catch(e){l=e}if(!this.connecting)throw Error(i.CONNECTION_CLOSED_ERROR_MSG);let c=n.value.host+":"+n.value.port;if(a)return u("resolved: %s:%s from sentinel %s",a.host,a.port,c),this.options.enableTLSForSentinelMode&&this.options.tls?(Object.assign(a,this.options.tls),this.stream=(0,o.connect)(a),this.stream.once("secureConnect",this.initFailoverDetector.bind(this))):(this.stream=(0,s.createConnection)(a),this.stream.once("connect",this.initFailoverDetector.bind(this))),this.stream.once("error",e=>{this.firstError=e}),this.stream;{let s=l?"failed to connect to sentinel "+c+" because "+l.message:"connected to sentinel "+c+" successfully, but got an invalid reply: "+a;return u(s),e("sentinelError",Error(s)),l&&(t=l),r()}};return r()}async updateSentinels(e){if(!this.options.updateSentinels)return;let t=await e.sentinel("sentinels",this.options.name);Array.isArray(t)&&(t.map(i.packObject).forEach(e=>{if(-1===(e.flags?e.flags.split(","):[]).indexOf("disconnected")&&e.ip&&e.port){let t=this.sentinelNatResolve(d(e));this.sentinelIterator.add(t)&&u("adding sentinel %s:%s",t.host,t.port)}}),u("Updated internal sentinels: %s",this.sentinelIterator))}async resolveMaster(e){let t=await e.sentinel("get-master-addr-by-name",this.options.name);return await this.updateSentinels(e),this.sentinelNatResolve(Array.isArray(t)?{host:t[0],port:Number(t[1])}:null)}async resolveSlave(e){let t=await e.sentinel("slaves",this.options.name);if(!Array.isArray(t))return null;let r=t.map(i.packObject).filter(e=>e.flags&&!e.flags.match(/(disconnected|s_down|o_down)/));return this.sentinelNatResolve(function(e,t){let r;if(0===e.length)return null;if("function"==typeof t)r=t(e);else if(null!==t&&"object"==typeof t){let s=Array.isArray(t)?t:[t];s.sort((e,t)=>(e.prio||(e.prio=1),t.prio||(t.prio=1),e.prio<t.prio)?-1:+(e.prio>t.prio));for(let t=0;t<s.length;t++){for(let i=0;i<e.length;i++){let o=e[i];if(o.ip===s[t].ip&&o.port===s[t].port){r=o;break}}if(r)break}}return r||(r=(0,i.sample)(e)),d(r)}(r,this.options.preferredSlaves))}sentinelNatResolve(e){if(!e||!this.options.natMap)return e;let t=`${e.host}:${e.port}`,r=e;return"function"==typeof this.options.natMap?r=this.options.natMap(t)||e:"object"==typeof this.options.natMap&&(r=this.options.natMap[t]||e),r}connectToSentinel(e,t){return new l.default({port:e.port||26379,host:e.host,username:this.options.sentinelUsername||null,password:this.options.sentinelPassword||null,family:e.family||("path"in this.options&&this.options.path?void 0:this.options.family),tls:this.options.sentinelTLS,retryStrategy:null,enableReadyCheck:!1,connectTimeout:this.options.connectTimeout,commandTimeout:this.options.sentinelCommandTimeout,...t})}async resolve(e){let t=this.connectToSentinel(e);t.on("error",f);try{if("slave"===this.options.role)return await this.resolveSlave(t);return await this.resolveMaster(t)}finally{t.disconnect()}}async initFailoverDetector(){var e;if(!this.options.failoverDetector)return;this.sentinelIterator.reset(!0);let t=[];for(;t.length<this.options.sentinelMaxConnections;){let{done:e,value:r}=this.sentinelIterator.next();if(e)break;let s=this.connectToSentinel(r,{lazyConnect:!0,retryStrategy:this.options.sentinelReconnectStrategy});s.on("reconnecting",()=>{var e;null==(e=this.emitter)||e.emit("sentinelReconnecting")}),t.push({address:r,client:s})}this.sentinelIterator.reset(!1),this.failoverDetector&&this.failoverDetector.cleanup(),this.failoverDetector=new c.FailoverDetector(this,t),await this.failoverDetector.subscribe(),null==(e=this.emitter)||e.emit("failoverSubscribed")}}function d(e){return{host:e.ip,port:Number(e.port)}}function f(){}r.default=h},14069,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});let s=e.r(4446),i=e.r(55004),o=e.r(13895),n=e.r(12251);class a extends n.default{constructor(e){super(e.disconnectTimeout),this.options=e}connect(e){let t,{options:r}=this;return this.connecting=!0,"path"in r&&r.path?t={path:r.path}:(t={},"port"in r&&null!=r.port&&(t.port=r.port),"host"in r&&null!=r.host&&(t.host=r.host),"family"in r&&null!=r.family&&(t.family=r.family)),r.tls&&Object.assign(t,r.tls),new Promise((e,n)=>{process.nextTick(()=>{if(!this.connecting)return void n(Error(o.CONNECTION_CLOSED_ERROR_MSG));try{r.tls?this.stream=(0,i.connect)(t):this.stream=(0,s.createConnection)(t)}catch(e){n(e);return}this.stream.once("error",e=>{this.firstError=e}),e(this.stream)})})}}r.default=a},25752,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.SentinelConnector=r.StandaloneConnector=void 0,r.StandaloneConnector=e.r(14069).default,r.SentinelConnector=e.r(3107).default},66275,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});let s=`-----BEGIN CERTIFICATE-----
|
|
1
|
+
module.exports=[[21640,e=>{let t,r;var s=e.i(66680),i=e.i(43698),n=e.i(2157);e.i(794),e.i(61095);var o=e.i(50227);let a=(e={})=>({type:"string",...e}),l=(e={})=>({type:"url",...e}),c=(e={})=>({type:"path",...e}),u=(e={})=>({type:"integer",...e}),h=Object.freeze({CONTROL_API_URL:l({default:"https://localhost:4000",purpose:"Default Magnus Control API target."}),CONTROL_API_CA_PATH:c({optional:!0,purpose:"Private CA bundle used for verified Control API TLS."}),CONTROL_API_MAX_RESPONSE_BYTES:u({default:1048576,minimum:1024,purpose:"Maximum accepted Control API response size in bytes."}),DASHBOARD_PROXY_BODY_LIMIT_BYTES:u({default:1048576,minimum:1,purpose:"Maximum forwarded request body size in bytes, enforced while streaming."}),API_SECRET:a({required:!0,sensitive:!0,purpose:"Server-side secret injected into Control API proxy requests."}),CONTROL_NODE_CREDENTIAL_KEY:a({required:!0,sensitive:!0,minimumLength:32,purpose:"Dedicated key for encrypted control-node credentials at rest."}),SESSION_SECRET:a({optional:!0,sensitive:!0,requirement:"Required; temporary legacy fallback is separately gated",purpose:"Dedicated dashboard session signing secret."}),SESSION_ISSUER:a({default:"magnus-dashboard",purpose:"Required issuer claim for dashboard session tokens."}),SESSION_AUDIENCE:a({default:"magnus-dashboard-session",purpose:"Required audience claim for dashboard session tokens."}),ALLOW_LEGACY_SESSION_SECRET:a({default:"false",enum:["true","false"],purpose:"Temporary opt-in for the expiring JWT_SECRET session fallback."}),HERMES_SSH_AUTHORIZATIONS_FILE:c({default:".magnus/hermes-ssh-authorizations.json",requirement:"Required (default path shown)",purpose:"Reviewed installation, node, address, and SSH host-key bindings."}),DASHBOARD_PUBLIC_ORIGIN:l({required:!0,purpose:"Canonical browser origin allowed to open the Hermes WebSocket bridge."}),HERMES_WEBSOCKET_ALLOWED_ORIGINS:a({optional:!0,purpose:"Comma-separated additional allowed Hermes WebSocket origins."}),DASHBOARD_ADMIN_USERNAME:a({optional:!0,requirement:"Required with DASHBOARD_ADMIN_PASSWORD_HASH; deployment may serialize it",purpose:"Dedicated dashboard administrator identity."}),DASHBOARD_ADMIN_USERNAME_B64:a({optional:!0,sensitive:!0,purpose:"Serializer-managed base64 form of the dashboard administrator identity."}),DASHBOARD_ADMIN_PASSWORD_HASH:a({optional:!0,requirement:"Required with DASHBOARD_ADMIN_USERNAME; Argon2id only",sensitive:!0,purpose:"Non-reusable Argon2id dashboard administrator password verifier."}),DASHBOARD_ADMIN_PASSWORD_HASH_B64:a({optional:!0,sensitive:!0,purpose:"Serializer-managed base64 form of the Argon2id verifier."}),DASHBOARD_ADMIN_CREDENTIAL_METADATA_B64:a({optional:!0,sensitive:!0,purpose:"Versioned non-secret credential purpose, rotation, fleet-password, and fingerprint-separation evidence."}),DASHBOARD_LOGIN_USERNAME:a({optional:!0,purpose:"Temporary two-phase migration source for the former dedicated dashboard login."}),DASHBOARD_LOGIN_PASSWORD:a({optional:!0,sensitive:!0,purpose:"Temporary two-phase reusable secret; rejected when equal to fleet or bootstrap credentials."}),REDIS_URL:l({default:"redis://127.0.0.1:6379",sensitive:!0,purpose:"Durable dashboard authentication throttling and concurrency store."}),REDIS_PREFIX:a({default:"magnus-",purpose:"Namespace prefix for durable Redis authentication limiter keys."}),AUTH_RATE_LIMIT_LABEL_KEY:a({optional:!0,sensitive:!0,purpose:"Optional dedicated HMAC key for de-identifying authentication limiter labels."}),DASHBOARD_SSH_USERNAME:a({optional:!0,requirement:"Required for the terminal and Hermes proxy",purpose:"Dedicated, unprivileged dashboard proxy account on managed nodes."}),DASHBOARD_SSH_PASSWORD:a({optional:!0,sensitive:!0,purpose:"Optional dedicated dashboard SSH password; restricted keys are preferred."}),DASHBOARD_SSH_PRIVATE_KEY_PATH:c({optional:!0,requirement:"Required for the terminal and Hermes proxy (or DASHBOARD_SSH_PASSWORD)",purpose:"Restricted dashboard-proxy private key with no deployment privileges."}),NEXT_PUBLIC_API_URL:l({default:"https://localhost:4000",public:!0,purpose:"Legacy build-time Control API URL; must never contain a secret."}),HIVE_OAUTH_DISCOVERY_URL:l({optional:!0,purpose:"Hive OAuth discovery URL for optional named dashboard login; HTTPS required."}),HIVE_OAUTH_CLIENT_ID:a({optional:!0,purpose:"Registered Magnus dashboard OAuth client ID."}),HIVE_OAUTH_CLIENT_SECRET:a({optional:!0,sensitive:!0,purpose:"Optional confidential OAuth client secret, kept server-side."}),HIVE_OAUTH_ISSUER:l({optional:!0,purpose:"Exact trusted Hive access-token issuer."}),HIVE_OAUTH_API_AUDIENCE:a({optional:!0,purpose:"Exact access-token audience accepted by the Control API."}),HIVE_OAUTH_SCOPE:a({default:"openid profile email",purpose:"Registered named-user OAuth scopes."}),HIVE_ROUTER_ADMIN_URL:l({optional:!0,purpose:"Optional Hive Router admin plane; enables the embedded router dashboard proxy."}),HIVE_ROUTER_CA_PATH:c({optional:!0,purpose:"Optional private CA bundle for hostname-verified Hive Router TLS."}),MAGNUS_SECURITY_CONSOLE_URL:l({optional:!0,purpose:"Optional external security console; enables the Security pages and nav entry."}),MAGNUS_HERMES_ENABLED:a({default:"false",enum:["true","false"],purpose:"Enables the optional Hermes Agent pages, dashboard proxy and WebSocket bridge."}),PORT:u({default:3e3,minimum:1,purpose:"Listen port for magnus-ui start."}),HOST:a({default:"0.0.0.0",purpose:"Listen address for magnus-ui start."}),TLS_CERT_PATH:c({optional:!0,requirement:"Required unless MAGNUS_UI_ALLOW_HTTP=true",purpose:"PEM certificate served by magnus-ui start."}),TLS_KEY_PATH:c({optional:!0,requirement:"Required unless MAGNUS_UI_ALLOW_HTTP=true",purpose:"PEM private key for TLS_CERT_PATH."}),MAGNUS_UI_DATA_DIR:c({optional:!0,purpose:"Working directory for runtime state (.magnus/, terminal-audit/); magnus-ui start defaults it to the current directory."}),UI_SECURITY_LOG_PATH:c({default:".magnus/security-events.jsonl",purpose:"Append-only authentication audit log; login fails closed when it cannot be written."}),MAGNUS_UI_ALLOW_HTTP:a({default:"false",enum:["true","false"],purpose:"Serve plain HTTP when no TLS certificate is configured (local development or behind a TLS proxy only)."})});function d(e,t){throw Error(`${e} ${t}`)}function f(e,t=process.env){let r=h[e];r||d(e,"is not declared in the dashboard environment schema");let s=t[e]?.trim()||r.default;if(null==s||""===s){r.required&&d(e,"is required");return}if(r.enum&&!r.enum.includes(String(s))&&d(e,`must be one of: ${r.enum.join(", ")}`),"integer"===r.type){let t=Number(s);return(!Number.isSafeInteger(t)||t<(r.minimum??Number.MIN_SAFE_INTEGER))&&d(e,`must be an integer of at least ${r.minimum}`),t}if("url"===r.type)try{return new URL(String(s)).toString().replace(/\/$/,"")}catch{d(e,"must be an absolute URL")}return"path"===r.type&&String(s).includes("\0")&&d(e,"must not contain NUL bytes"),"string"===r.type&&r.minimumLength&&String(s).length<r.minimumLength&&d(e,`must contain at least ${r.minimumLength} characters`),String(s)}let p=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,y=/^[0-9a-f]{64}$/,m=new Set(["terminal-http","terminal-ws","hermes-http","hermes-ws"]);function g(e){return Array.isArray(e)?`[${e.map(g).join(",")}]`:e&&"object"==typeof e?`{${Object.keys(e).sort().map(t=>`${JSON.stringify(t)}:${g(e[t])}`).join(",")}}`:JSON.stringify(e)}function S(e){let t=e.RESOURCE_ENROLLMENT_DASHBOARD_SECRET;if("string"!=typeof t||t.length<32||["API_SECRET","SESSION_SECRET","JWT_SECRET","NODE_MANAGER_SECRET","RESULT_SIGNING_SECRET","MAGNUS_SECRET","SECURITY_SENTI_BRIDGE_TOKEN","COMMAND_RECONCILIATION_SECRET","RESOURCE_PARTICIPANT_RECONCILIATION_SECRET","CREDENTIAL_ROTATION_KEY","AGENT_DISCOVERY_SECRET","RESOURCE_LEASE_RESULT_SECRET","RESOURCE_ENROLLMENT_NODE_SECRET","RESOURCE_LEASE_ADAPTER_SECRET"].some(r=>e[r]&&e[r]===t))throw Error("Dashboard resource participant credential is unavailable or not dedicated");return t}let b=function({env:e=process.env,request:t=(t,r)=>(function(e,t,r){let s=S(e),o=new URL(e.CONTROL_API_URL??"");if("https:"!==o.protocol||o.username||o.password||o.search||o.hash)throw Error("Dashboard resource authority must use verified HTTPS");let a=new URL(`${o.pathname.replace(/\/+$/,"")}/api/v1/resource-leases/enrollment/dashboard${t}`,o.origin),l=JSON.stringify(r);return new Promise((t,r)=>{let o=(0,i.request)(a,{method:"POST",...function(e=process.env){let t=f("CONTROL_API_CA_PATH",e);if(!t)return{rejectUnauthorized:!0};if(!(0,n.existsSync)(t))throw Error(`CONTROL_API_CA_PATH does not exist: ${t}`);return{rejectUnauthorized:!0,ca:(0,n.readFileSync)(t)}}(e),timeout:5e3,headers:{"content-type":"application/json","content-length":Buffer.byteLength(l),"x-resource-drain-key":s}},e=>{let s="";e.on("data",e=>{s+=e.toString(),Buffer.byteLength(s)>65536&&o.destroy(Error("Resource authority response exceeded limit"))}),e.on("error",r),e.on("end",()=>{try{if(200!==e.statusCode)throw Error("Resource authority denied managed SSH admission or settlement");let r=JSON.parse(s);if(!0!==r.success||!r.data)throw Error("Invalid resource authority response");t(r.data)}catch(e){r(e)}})});o.on("timeout",()=>o.destroy(Error("Resource authority request timed out"))),o.on("error",r),o.end(l)})})(e,t,r),ownerId:r=(0,s.randomUUID)()}={}){if(!p.test(r))throw Error("Invalid dashboard process incarnation");return{async begin(i,n){let o;if(S(e),"string"!=typeof i||!i||i.length>253||!m.has(n))throw Error("Invalid managed SSH target or kind");let a=(0,s.randomUUID)(),l=Date.now()+9e5,c=(0,s.createHash)("sha256").update(g({domain:"magnus.dashboard-external-session.v1",host:i.toLowerCase(),workId:a,ownerId:r,kind:n,effectBoundary:"external-unverified"})).digest("hex"),u=await t("/work/reserve",{host:i,workId:a,ownerId:r,kind:n,operationSha256:c,deadline:l});if("string"!=typeof u.nodeId||!u.nodeId||"string"!=typeof u.nodeFqdn||!u.nodeFqdn||u.workId!==a||"dashboard"!==u.participant||u.ownerId!==r||u.kind!==n||"reserved"!==u.state||!Number.isSafeInteger(u.epoch)||u.epoch<0||!(null===u.barrierId||p.test(u.barrierId))||!y.test(u.requestSha256)||u.operationSha256!==c||!/^[1-9][0-9]{0,19}$/.test(u.fence)||u.deadline!==l)throw Error("Invalid managed SSH reservation");let h=await t(`/work/${a}/start`,{ownerId:r,epoch:u.epoch,barrierId:u.barrierId,operationSha256:c,fence:u.fence,deadline:l,requestSha256:u.requestSha256});if(h.workId!==a||"dashboard"!==h.participant||h.ownerId!==r||h.kind!==n||h.nodeId!==u.nodeId||h.nodeFqdn!==u.nodeFqdn||h.epoch!==u.epoch||h.barrierId!==u.barrierId||h.operationSha256!==c||h.fence!==u.fence||h.deadline!==l||h.requestSha256!==u.requestSha256||"running"!==h.state)throw Error("Managed SSH start was not acknowledged");return{workId:a,finish:(e="unknown",i=(0,s.createHash)("sha256").update(g({workId:a,ownerId:r,disposition:e,proof:"transport-observation-only"})).digest("hex"))=>["not-started","remote-ended","unknown"].includes(e)&&y.test(i)?o??=t(`/work/${a}/finish`,{ownerId:r,disposition:e,evidenceSha256:i}):Promise.reject(Error("Invalid managed SSH disposition"))}},async drain(r,i){let n=S(e);if("string"!=typeof i||Buffer.byteLength(i)!==Buffer.byteLength(n)||!(0,s.timingSafeEqual)(Buffer.from(i),Buffer.from(n)))throw Error("Invalid drain authentication");let o=["version","participant","nodeId","nodeFqdn","epoch","barrierId","challengeId","expiresAt"].sort();if(!r||Object.keys(r).sort().join()!==o.join()||1!==r.version||"dashboard"!==r.participant||"string"!=typeof r.nodeId||!r.nodeId||"string"!=typeof r.nodeFqdn||!r.nodeFqdn||!Number.isSafeInteger(r.epoch)||!p.test(r.barrierId)||!p.test(r.challengeId)||!Number.isSafeInteger(r.expiresAt)||r.expiresAt<=Date.now())throw Error("Invalid or expired drain challenge");let a=(0,s.randomUUID)(),l=await t("/status",{nodeId:r.nodeId,nonce:a});if(1!==l.version||l.nodeId!==r.nodeId||l.nodeFqdn!==r.nodeFqdn||l.nonce!==a||l.epoch!==r.epoch||l.barrierId!==r.barrierId||l.challenge?.challengeId!==r.challengeId||l.challenge?.expiresAt!==r.expiresAt||r.expiresAt<=Date.now()||"draining"!==l.state||!Number.isSafeInteger(l.activeCount)||l.activeCount<0||!Number.isSafeInteger(l.unknownCount)||l.unknownCount<0||!y.test(l.evidenceSha256))throw Error("Drain challenge did not match authoritative durable state");let c={...r,status:0===l.activeCount&&0===l.unknownCount?"drained":"pending",activeCount:l.activeCount,unknownCount:l.unknownCount,evidenceSha256:l.evidenceSha256};return{...c,signature:(0,s.createHmac)("sha256",n).update("magnus.resource-enrollment.v1\n"+g(c)).digest("hex")}}}}();function _(e,t="unknown"){e.finish(t).catch(()=>{console.error("Managed SSH settlement unacknowledged; resource drain remains blocked")})}e.i(699),e.i(61892),e.i(51468),e.i(59892),e.i(38479),e.i(72038);var k=e.i(74272),E=e.i(32174);k.default;var v=e.i(57764),w=e.i(29072),C=e.i(6401);let A="2026-10-01T00:00:00.000Z",O=!1;function T(e,t,r){if(!!e!=!!t)throw Error(r)}function R(e,t){let r=e[`${t}_B64`];if(null!=r){if(!/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(r))throw Error(`${t}_B64 is not valid base64`);return Buffer.from(r,"base64").toString("utf8")}return e[t]}let x=()=>new TextEncoder().encode(function(e=process.env,t=Date.now()){if(e.SESSION_SECRET)return e.SESSION_SECRET;if(function(e=process.env,t=Date.now()){let r=!!e.SESSION_SECRET,s=!!e.JWT_SECRET,i="true"===e.ALLOW_LEGACY_SESSION_SECRET,n=t>=Date.parse(A);return{configured:r||s&&i&&!n,source:r?"dedicated":s&&i&&!n?"legacy_jwt_secret":"missing",legacyFallbackActive:!r&&s&&i&&!n,legacyFallbackAllowed:i&&!n,migrationDeadline:A}}(e,t).legacyFallbackActive)return O||(O=!0,console.error(`[SECURITY:HIGH] ALLOW_LEGACY_SESSION_SECRET=true is reusing JWT_SECRET for dashboard sessions; migrate before ${A}`)),e.JWT_SECRET;if(e.JWT_SECRET&&"true"!==e.ALLOW_LEGACY_SESSION_SECRET)throw Error("SESSION_SECRET is required; JWT_SECRET fallback requires ALLOW_LEGACY_SESSION_SECRET=true");if(e.JWT_SECRET)throw Error(`Legacy JWT_SECRET session fallback expired on ${A}`);throw Error("SESSION_SECRET is required")}());async function I(){return t||(t=new C.Redis(process.env.REDIS_URL??"redis://127.0.0.1:6379",{maxRetriesPerRequest:1,connectTimeout:2e3,commandTimeout:2500,enableOfflineQueue:!1})).on("error",()=>void 0),("connecting"===t.status||"connect"===t.status)&&await new Promise((e,r)=>{let s=()=>{t.off("error",i),e()},i=e=>{t.off("ready",s),r(e)};t.once("ready",s),t.once("error",i)}),t}async function N(e){var t;let r;if("hive"===e.provider)return!0;if("string"!=typeof e.username||!e.sessionId||!/^[a-f0-9-]{36}$/.test(e.sessionId))return!1;let i=(t=e.username,`magnus_session:local:${(0,s.createHmac)("sha256",x()).update(t).digest("hex")}`),[n,o]=await (await I()).mget(`${i}:generation`,`${i}:session:${e.sessionId}`);return!!(n&&o===`${n}:${r=function(e=process.env,t=new Date){let r=R(e,"DASHBOARD_ADMIN_USERNAME"),s=R(e,"DASHBOARD_ADMIN_PASSWORD");if(r&&s)return{username:r,password:s,source:"dashboard-admin-password",version:2};let i=R(e,"DASHBOARD_ADMIN_PASSWORD_HASH");if(T(r,i,"DASHBOARD_ADMIN_USERNAME and DASHBOARD_ADMIN_PASSWORD (or _HASH) must be configured together"),r&&i){if(!i.startsWith("$argon2id$"))throw Error("DASHBOARD_ADMIN_PASSWORD_HASH must be an Argon2id hash");return{username:r,passwordHash:i,source:"dashboard-admin-hash",version:2}}let n=R(e,"DASHBOARD_LOGIN_USERNAME"),o=R(e,"DASHBOARD_LOGIN_PASSWORD");if(T(n,o,"DASHBOARD_LOGIN_USERNAME and DASHBOARD_LOGIN_PASSWORD must be configured together"),!n||!o)throw Error("Dedicated dashboard administrator credentials are required");if(t>=new Date("2026-10-01T00:00:00Z"))throw Error("Legacy dashboard login credentials have expired; configure the dashboard administrator hash");for(let t of["DASHBOARD_SSH_PASSWORD","BOOTSTRAP_SSH_PASSWORD"])if(e[t]&&o===e[t])throw Error(`Dashboard login password must not equal ${t}`);return{username:n,password:o,source:"legacy-dashboard-login",version:1}}(),(0,s.createHmac)("sha256",x()).update(JSON.stringify([r.username,r.passwordHash??r.password,process.env.LOCAL_SESSION_GENERATION??""])).digest("hex")}`)}class M extends Error{static code="ERR_JOSE_GENERIC";code="ERR_JOSE_GENERIC";constructor(e,t){super(e,t),this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}}class D extends M{static code="ERR_JWT_CLAIM_VALIDATION_FAILED";code="ERR_JWT_CLAIM_VALIDATION_FAILED";claim;reason;payload;constructor(e,t,r="unspecified",s="unspecified"){super(e,{cause:{claim:r,reason:s,payload:t}}),this.claim=r,this.reason=s,this.payload=t}}class B extends M{static code="ERR_JWT_EXPIRED";code="ERR_JWT_EXPIRED";claim;reason;payload;constructor(e,t,r="unspecified",s="unspecified"){super(e,{cause:{claim:r,reason:s,payload:t}}),this.claim=r,this.reason=s,this.payload=t}}class P extends M{static code="ERR_JOSE_ALG_NOT_ALLOWED";code="ERR_JOSE_ALG_NOT_ALLOWED"}class L extends M{static code="ERR_JOSE_NOT_SUPPORTED";code="ERR_JOSE_NOT_SUPPORTED"}class F extends M{static code="ERR_JWS_INVALID";code="ERR_JWS_INVALID"}class U extends M{static code="ERR_JWT_INVALID";code="ERR_JWT_INVALID"}class j extends M{static code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";constructor(e="signature verification failed",t){super(e,t)}}let H=[["verify"],["sign"]];function G(e){let t={name:"HMAC",hash:`SHA-${e}`};return{kty:["oct"],secret:!0,subtle:t,signing:t,usages:H}}function W(e,t){let r={name:t?"RSA-PSS":"RSASSA-PKCS1-v1_5",hash:`SHA-${e}`};return{kty:["RSA"],subtle:r,signing:t?{...r,saltLength:t}:r,usages:H,minRsaBits:2048}}function z(e,t){return{kty:["EC"],crv:e,subtle:{name:"ECDSA",namedCurve:e},signing:{name:"ECDSA",hash:`SHA-${t}`},usages:H}}function Q(){let e={name:"Ed25519"};return{kty:["OKP"],crv:"Ed25519",subtle:e,signing:e,usages:H}}function K(e){let t={name:`ML-DSA-${e}`};return{kty:["AKP"],subtle:t,signing:t,usages:H}}let q=function(e){let t={__proto__:null};for(let r in e)t[r]={...e[r],alg:r};return t}({HS256:G(256),HS384:G(384),HS512:G(512),RS256:W(256),RS384:W(384),RS512:W(512),PS256:W(256,32),PS384:W(384,48),PS512:W(512,64),ES256:z("P-256",256),ES384:z("P-384",384),ES512:z("P-521",512),EdDSA:Q(),Ed25519:Q(),"ML-DSA-44":K(44),"ML-DSA-65":K(65),"ML-DSA-87":K(87)}),V=new TextEncoder,J=new TextDecoder,Y=new TextDecoder("utf-8",{fatal:!0}),$=/[^\x00-\x7f]/;function X(e){if("string"==typeof e&&e.length>=128){if($.test(e))throw TypeError("non-ASCII string encountered in encode()");return V.encode(e)}let t=new Uint8Array(e.length);for(let r=0;r<e.length;r++){let s=e.charCodeAt(r);if(s>127)throw TypeError("non-ASCII string encountered in encode()");t[r]=s}return t}function Z(e){try{return function(e,t=!1){if(Uint8Array.fromBase64)return Uint8Array.fromBase64(e,{alphabet:t?"base64url":"base64"});if(t){if(e.includes("+")||e.includes("/"))throw TypeError("Invalid base64url");e=e.replace(/-/g,"+").replace(/_/g,"/")}let r=atob(e),s=new Uint8Array(r.length);for(let e=0;e<r.length;e++)s[e]=r.charCodeAt(e);return s}("string"==typeof e?e:J.decode(e),!0)}catch(e){throw TypeError("The input to be decoded is not correctly encoded.",{cause:e})}}function ee(e){if("object"!=typeof e||null===e||"[object Object]"!==Object.prototype.toString.call(e))return!1;let t=Object.getPrototypeOf(e);return null===t||null===Object.getPrototypeOf(t)}function et(e,t,r){try{return Z(e)}catch(e){throw new r(`Failed to base64url decode the ${t}`,{cause:e})}}let er={__proto__:null,b64:!0};async function es(e,t,s){let i,n,{alg:o,secret:a}=e,l="decrypt"===s||"sign"===s;if(a&&t instanceof Uint8Array)return t;if(ee(t)){if("string"!=typeof(i=function(e){let t={__proto__:null,...e};if(void 0!==t.ext&&"boolean"!=typeof t.ext)throw TypeError('"ext" (Extractable) Parameter must be a boolean');if(void 0!==t.key_ops){let e=t.key_ops,r=Array.isArray(e)?[...e]:void 0;if(!r||r.some(e=>"string"!=typeof e)||new Set(r).size!==r.length)throw TypeError('"key_ops" (Key Operations) Parameter must be an array of unique strings');t.key_ops=r}return t}(t)).kty)throw ea(o,t,a);if(!(a?"oct"===i.kty&&"string"==typeof i.k:"oct"!==i.kty&&(l?"AKP"===i.kty&&"string"==typeof i.priv||"string"==typeof i.d:void 0===i.d&&void 0===i.priv)))throw TypeError(a?'JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present':`JSON Web Key for this operation must be a ${l?"private":"public"} JWK`);if(((e,t,r)=>{let{alg:s}=e;if(void 0!==t.use){let e="sign"===r||"verify"===r?"sig":"enc";if(t.use!==e)throw TypeError(`Invalid key for this operation, its "use" must be "${e}" when present`)}if(void 0!==t.alg&&t.alg!==s)throw TypeError(`Invalid key for this operation, its "alg" must be "${s}" when present`);if(Array.isArray(t.key_ops)){let s="encrypt"===r||"decrypt"===r?e.ops?.[+("encrypt"!==r)]:r;if(s&&!t.key_ops.includes(s))throw TypeError(`Invalid key for this operation, its "key_ops" must include "${s}" when present`)}})(e,i,s),"oct"===i.kty)return Z(i.k);if(!Object.isFrozen(t)){let{key_ops:e}=t;Array.isArray(e)&&Object.freeze(e),Object.freeze(t)}}else{if(!eo(t))throw ea(o,t,a);let e=a?"secret":l?"private":"public";if(t.type!==e&&(a||["secret","public","private"].includes(t.type)))throw TypeError(`${t[Symbol.toStringTag]} instances must be of type "${e}" for the ${o} algorithm`);if(en(t))return t;if("secret"===(n=t).type)return n.export()}let c=(r||=new WeakMap).get(t);if(c?.[o])return c[o];if(c||r.set(t,c={}),n&&"function"==typeof n.toCryptoKey){let t="public"===n.type,r=ei[n.asymmetricKeyDetails?.namedCurve],s=e.resolve?.({crv:r,asymmetricKeyType:n.asymmetricKeyType})??e.subtle;return c[o]=n.toCryptoKey(s,t,e.usages[+!t])}return(i??=n.export({format:"jwk"})).alg=o,c[o]=await ec(e,i)}let ei={__proto__:null,prime256v1:"P-256",secp384r1:"P-384",secp521r1:"P-521"},en=e=>{if(e?.[Symbol.toStringTag]==="CryptoKey")return!0;try{return e instanceof CryptoKey}catch{return!1}},eo=e=>en(e)||e?.[Symbol.toStringTag]==="KeyObject";function ea(e,t,r){let s=["CryptoKey","KeyObject","JSON Web Key"];return r&&s.push("Uint8Array"),TypeError(function(e,t,...r){if(r.length>2){let t=r.pop();e+=`one of type ${r.join(", ")}, or ${t}.`}else 2===r.length?e+=`one of type ${r[0]} or ${r[1]}.`:e+=`of type ${r[0]}.`;return null==t?e+=` Received ${t}`:"function"==typeof t&&t.name?e+=` Received function ${t.name}`:"object"==typeof t&&null!=t&&t.constructor?.name&&(e+=` Received an instance of ${t.constructor.name}`),e}(`Key for the ${e} algorithm must be `,t,...s))}let el=(e,t="algorithm.name")=>TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`);async function ec(e,t,r){if(!e.kty.includes(t.kty))throw new L('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');let s=e.resolve?.({kty:t.kty,crv:t.crv})??e.subtle,i=!!(t.d||t.priv),n={...t,ext:r??t.ext};return"AKP"!==n.kty&&delete n.alg,delete n.use,crypto.subtle.importKey("jwk",n,s,n.ext??!i,t.key_ops??e.usages[+!!i])}async function eu(e,t,r,s=!1){return e instanceof Uint8Array&&(e=await crypto.subtle.importKey("raw",e,t,s,[r])),function(e,t,r){let s=e.algorithm;if(s.name!==t.name)throw el(t.name);if(t.hash&&s.hash?.name!==t.hash)throw el(t.hash,"algorithm.hash");if(t.namedCurve&&s.namedCurve!==t.namedCurve)throw el(t.namedCurve,"algorithm.namedCurve");if(void 0!==t.length&&s.length!==t.length)throw el(t.length,"algorithm.length");if(r&&!e.usages.includes(r))throw TypeError(`CryptoKey does not support this operation, its usages must include ${r}.`)}(e,t,r),e}function eh(e){try{return X(e)}catch(e){throw new F("JWS Compact Serialization payload must use only ASCII characters",{cause:e})}}async function ed(e,t,r,s,i){let{protected:n,header:o,payload:a}=e,l=i??(void 0===n?{}:function(e,t,r){let s;try{s=JSON.parse(Y.decode(Z(e)))}catch(e){throw new t(r,{cause:e})}if(!ee(s))throw new t(r);return s}(n,F,"JWS Protected Header is invalid"));if(!function(...e){let t=new Set;for(let r of e)if(r)for(let e of Object.keys(r)){if(t.has(e))return!1;t.add(e)}return!0}(l,o))throw new F("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let c={...l,...o},u=function(e,t){if(t.includes("b64")){let t=e.b64;if("boolean"!=typeof t)throw new F('The "b64" (base64url-encode payload) Header Parameter must be a boolean');return t}return!0}(l,function(e,t,r,s,i){if(void 0!==i.crit&&s?.crit===void 0)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!s||void 0===s.crit)return[];if(!Array.isArray(s.crit)||0===s.crit.length||s.crit.some(e=>"string"!=typeof e||0===e.length))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let n=void 0===r?t:{__proto__:null,...r,...t};for(let t of s.crit){if(!(t in n))throw new L(`Extension Header Parameter "${t}" is not recognized`);if(!Object.hasOwn(i,t)||void 0===i[t])throw new e(`Extension Header Parameter "${t}" is missing`);if(n[t]&&(!Object.hasOwn(s,t)||void 0===s[t]))throw new e(`Extension Header Parameter "${t}" MUST be integrity protected`)}return s.crit}(F,er,t[1],l,c)),{alg:h}=c;if("string"!=typeof h||!h)throw new F('JWS "alg" (Algorithm) Header Parameter missing or invalid');if(t[0]&&!t[0].has(h))throw new P('"alg" (Algorithm) Header Parameter value not allowed');if(u){if("string"!=typeof a)throw new F("JWS Payload must be a string")}else if("string"!=typeof a&&!(a instanceof Uint8Array))throw new F("JWS Payload must be a string or an Uint8Array instance");let d=u||"string"!=typeof a?a:s(a),f=!1;"function"==typeof r&&(r=await r(l,e),f=!0);let p=function(e){let t="string"==typeof e?q[e]:void 0;if(!t)throw new L(`alg ${e} is not supported either by JOSE or your javascript runtime`);return t}(h),y=function(...e){let t=new Uint8Array(e.reduce((e,{length:t})=>e+t,0)),r=0;for(let s of e)t.set(s,r),r+=s.length;return t}(void 0!==n?X(n):new Uint8Array,X("."),"string"==typeof d?t[2]??=function(e,t,r){try{return X(e)}catch(e){throw new r(`The ${t} is not a valid base64url string`,{cause:e})}}(d,"payload",F):d),m=et(e.signature,"signature",F),g=await es(p,r,"verify"),S=await eu(g,p.subtle,"verify");p.minRsaBits&&function(e,t){let{modulusLength:r}=t.algorithm;if("number"!=typeof r||r<2048)throw TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}(p.alg,S);let b=!1;try{b=await crypto.subtle.verify(p.signing,S,m,y)}catch(e){throw new j(void 0,{cause:e})}if(!b)throw new j;let _={payload:"string"==typeof d?et(d,"payload",F):d};return void 0!==n&&(_.protectedHeader=l),void 0!==o&&(_.unprotectedHeader=o),f?[{..._,key:g},u]:[_,u]}async function ef(e,t,r){if(e instanceof Uint8Array&&(e=J.decode(e)),"string"!=typeof e)throw new F("Compact JWS must be a string or Uint8Array");let{0:s,1:i,2:n,length:o}=e.split(".");if(3!==o)throw new F("Invalid Compact JWS");return ed({payload:i,protected:s,signature:n},t,r,eh)}let ep={s:1,m:60,h:3600,d:86400,w:604800,y:0x1e187e0},ey=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i,em="check_failed";function eg(){throw TypeError("Invalid time period format")}function eS(e){"string"!=typeof e&&eg();let t=ey.exec(e);(!t||t[4]&&t[1])&&eg();let r=Math.round(parseFloat(t[2])*ep[t[3][0].toLowerCase()]);return Number.isFinite(r)||eg(),"-"===t[1]||"ago"===t[4]?-r:r}function eb(e,t){if(!Number.isFinite(t))throw TypeError(`Invalid ${e} input`);return t}let e_=e=>{let t=e.toLowerCase();return e.includes("/")?t:`application/${t}`};function ek(e,t,r=!1){let s=e[t];if(!(void 0===s&&!r)){if("number"!=typeof s)throw new D(`"${t}" claim must be a number`,e,t,"invalid");return s}}function eE(e,t){throw new D(`unexpected "${t}" claim value`,e,t,em)}async function ev(e,t,r){let[s,i]=await ef(e,[r&&function(e,t){if(void 0!==t&&(!Array.isArray(t)||t.some(e=>"string"!=typeof e)))throw TypeError(`"${e}" option must be an array of strings`);return void 0===t?void 0:new Set(t)}("algorithms",r.algorithms),r?.crit],t);if(!i)throw new U("JWTs MUST NOT use unencoded payload");let n=function(e,t,r={}){let s,i,n;try{s=JSON.parse(Y.decode(t))}catch(e){throw new U("JWT Claims Set must be a top-level JSON object",{cause:e})}if(!ee(s))throw new U("JWT Claims Set must be a top-level JSON object");let{typ:o}=r;if(void 0!==o&&("string"!=typeof e.typ||e_(e.typ)!==e_(o)))throw new D('unexpected "typ" JWT header value',s,"typ",em);let{requiredClaims:a=[],issuer:l,subject:c,audience:u,maxTokenAge:h}=r,d=[...a];for(let e of(void 0!==h&&d.push("iat"),void 0!==u&&d.push("aud"),void 0!==c&&d.push("sub"),void 0!==l&&d.push("iss"),new Set(d.reverse())))if(!Object.hasOwn(s,e))throw new D(`missing required "${e}" claim`,s,e,"missing");void 0===l||(Array.isArray(l)?l:[l]).includes(s.iss)||eE(s,"iss"),void 0!==c&&s.sub!==c&&eE(s,"sub"),void 0===u||(i=s.aud,n="string"==typeof u?[u]:u,"string"==typeof i?n.includes(i):!!Array.isArray(i)&&n.some(e=>i.includes(e)))||eE(s,"aud");let{clockTolerance:f}=r,p=0;if("string"==typeof f)p=eS(f);else if(void 0!==f){if("number"!=typeof f)throw TypeError("Invalid clockTolerance option type");p=f}eb("clockTolerance option",p);let{currentDate:y}=r,m=eb("currentDate option",Math.floor((void 0===y?new Date:y).getTime()/1e3)),g=ek(s,"iat",void 0!==h),S=ek(s,"nbf");if(void 0!==S&&S>m+p)throw new D('"nbf" claim timestamp check failed',s,"nbf",em);let b=ek(s,"exp");if(void 0!==b&&b<=m-p)throw new B('"exp" claim timestamp check failed',s,"exp",em);if(void 0!==h){let e=m-g;if(e-p>eb("maxTokenAge option","number"==typeof h?h:eS(h)))throw new B('"iat" claim timestamp check failed (too far in the past)',s,"iat",em);if(e<-p)throw new D('"iat" claim timestamp check failed (it should be in the past)',s,"iat",em)}return s}(s.protectedHeader,s.payload,r);return{...s,payload:n}}let ew=f("SESSION_ISSUER"),eC=f("SESSION_AUDIENCE"),eA="2026-10-01T00:00:00.000Z",eO=!1;async function eT(e,t=!1){let r;try{let{payload:t}=await ev(e,function(){let e=process.env.SESSION_SECRET,t=function(e=Date.now()){let t=!!process.env.SESSION_SECRET,r=!!process.env.JWT_SECRET,s="true"===process.env.ALLOW_LEGACY_SESSION_SECRET,i=e>=Date.parse(eA);return{configured:t||r&&s&&!i,source:t?"dedicated":r&&s&&!i?"legacy_jwt_secret":"missing",legacyFallbackActive:!t&&r&&s&&!i,legacyFallbackAllowed:s&&!i,migrationDeadline:eA}}();if(!e&&t.legacyFallbackActive&&(e=process.env.JWT_SECRET,eO||(eO=!0,console.error(`[SECURITY:HIGH] ALLOW_LEGACY_SESSION_SECRET=true is reusing JWT_SECRET for dashboard sessions; migrate before ${eA}`))),!e){if(process.env.JWT_SECRET&&"true"!==process.env.ALLOW_LEGACY_SESSION_SECRET)throw Error("SESSION_SECRET is required; JWT_SECRET fallback requires ALLOW_LEGACY_SESSION_SECRET=true.");throw Error(`SESSION_SECRET is required; legacy fallback expires ${eA}.`)}return new TextEncoder().encode(e)}(),{algorithms:["HS256"],issuer:ew,audience:eC});r=t}catch{return null}try{return await N(r)?r:null}catch(e){if(t)throw e;return null}}let eR=new Set;function ex(e){try{let t=process.env.TERMINAL_AUDIT_DIR??(0,o.join)(process.cwd(),"terminal-audit");(0,n.mkdirSync)(t,{recursive:!0,mode:448}),(0,n.appendFileSync)((0,o.join)(t,"sessions.jsonl"),`${JSON.stringify({...e,timestamp:new Date().toISOString()})}
|
|
2
|
+
`,{mode:384})}catch{}}function eI(e,t){return ex(t),console.error(`[terminal] SSH host-key verification failed for ${String(t.host??"unknown host")}: ${String(t.reason??"verification error")}`),"enforce"!==e}function eN(e,t){let r=(0,n.lstatSync)(e),s="function"==typeof process.geteuid?process.geteuid():r.uid;if(r.isSymbolicLink()||("directory"===t?!r.isDirectory():!r.isFile()))throw Error(`${t} is not a regular ${t}`);if(r.uid!==s)throw Error(`${t} is not owned by the service account`);let i=511&r.mode;if("directory"===t?448!==i:384!==i)throw Error(`${t} permissions must be ${"directory"===t?"0700":"0600"}`)}let eM=globalThis,eD=eM.__wsSessions??=new Map;function eB(e){try{let t=process.env.TERMINAL_AUDIT_DIR??(0,o.join)(process.cwd(),"terminal-audit");(0,n.mkdirSync)(t,{recursive:!0}),(0,n.appendFileSync)((0,o.join)(t,"sessions.jsonl"),`${JSON.stringify({...e,timestamp:new Date().toISOString()})}
|
|
3
|
+
`)}catch{}}async function eP(e,t){let{query:r}=(0,v.parse)(t.url??"",!0),i=r.host;if(!i)return void e.close(4e3,"Missing host parameter");let a=(function(e=""){return function(e=""){let t=new Map;for(let r of e.split(";")){let e=r.indexOf("=");if(-1===e)continue;let s=r.slice(0,e).trim();if(s)try{t.set(s,decodeURIComponent(r.slice(e+1).trim()))}catch{}}return t}(e)})(t.headers.cookie??"").get("magnus_session"),l=a?await eT(a):null;if(!l)return void e.close(4004,"Unauthorized");let c=function(e=process.env){let t,r=e.DASHBOARD_SSH_USERNAME,s=e.DASHBOARD_SSH_PASSWORD,i=e.DASHBOARD_SSH_PRIVATE_KEY_PATH;if(!r||!s&&!i)throw Error("Dedicated dashboard SSH proxy credentials are required (DASHBOARD_SSH_USERNAME with DASHBOARD_SSH_PRIVATE_KEY_PATH or DASHBOARD_SSH_PASSWORD)");if(i){if(!(0,n.existsSync)(i))throw Error(`Dashboard SSH private key does not exist: ${i}`);t=(0,n.readFileSync)(i,"utf8")}return{username:r,password:s??"",privateKey:t,privateKeyPath:i,source:"dedicated"}}(),u=Number(r.cols??"120"),h=Number(r.rows??"30"),d=await b.begin(i,"terminal-ws"),f=new w.Client;if(e.once("close",()=>{_(d),f.end()}),e.once("error",()=>{_(d),f.end()}),f.once("close",()=>_(d)),e.readyState!==e.OPEN)return void _(d,"not-started");let p=setTimeout(()=>{_(d),f.end(),e.close(4001,"SSH connection timed out")},15e3);f.on("error",t=>{_(d),clearTimeout(p);try{e.send(JSON.stringify({type:"error",message:t.message}))}catch{}e.close(4002,"SSH error"),eL(e)}),f.on("ready",()=>{clearTimeout(p),f.shell({term:"xterm-256color",cols:u,rows:h},(t,r)=>{if(t){e.close(4003,"Shell error"),f.end(),eL(e);return}let s=new Date().toISOString(),n={ws:e,ssh:f,host:i,alive:!0,openedAt:s,username:l.username},o=`${Date.now()}-${Math.random().toString(36).slice(2,8)}`;eB({event:"open",sessionId:o,host:i,username:l.username}),eD.set(e,n),r.on("data",t=>{e.readyState===e.OPEN&&e.send(t)}),r.stderr.on("data",t=>{e.readyState===e.OPEN&&e.send(t)}),r.on("close",t=>{_(d,"number"==typeof t&&Number.isInteger(t)&&t>=0&&t<=0xffffffff?"remote-ended":"unknown"),e.close(1e3,"Shell closed"),eL(e)}),e.on("message",t=>{if(n.alive=!0,"string"==typeof t||Buffer.isBuffer(t)&&123===t[0])try{let s=JSON.parse(t.toString());if("resize"===s.type&&s.cols&&s.rows)return void r.setWindow(s.rows,s.cols,0,0);if("ping"===s.type)return void e.send(JSON.stringify({type:"pong"}))}catch{}r.write(Buffer.isBuffer(t)?t:Buffer.from(t))}),e.on("pong",()=>{n.alive=!0}),e.on("close",()=>{try{r.close()}catch{}f.end(),eB({event:"close",sessionId:o,host:i,username:l.username,openedAt:s}),eL(e)}),e.on("error",()=>{try{r.close()}catch{}f.end(),eB({event:"error",sessionId:o,host:i,username:l.username,openedAt:s}),eL(e)})})});try{f.connect({host:i,port:22,username:c.username,...c.privateKey?{privateKey:c.privateKey}:{password:c.password},readyTimeout:12e3,hostHash:"sha256",hostVerifier:e=>(function(e,t){let r="warn"===process.env.SSH_HOST_KEY_PINNING?"warn":"enforce",i=process.env.SSH_HOST_KEYS_FILE??(0,o.join)(process.cwd(),"terminal-audit","known-hosts.json"),a=(0,o.dirname)(i),l=`${i}.lock`;if(!e||!t)return eI(r,{event:"host-key-store-error",host:e,reason:"invalid host or fingerprint",mode:r});if(eR.has(i))return eI(r,{event:"host-key-store-error",host:e,reason:"process enrollment lock is already held",mode:r});eR.add(i);let c=null;try{let h;(0,n.existsSync)(a)||(0,n.mkdirSync)(a,{recursive:!0,mode:448}),eN(a,"directory"),c=function(e){let t=Date.now()+2e3;for(;;)try{let t=(0,n.openSync)(e,n.constants.O_CREAT|n.constants.O_EXCL|n.constants.O_WRONLY,384);return(0,n.writeFileSync)(t,`${process.pid}
|
|
4
|
+
`,{encoding:"utf8"}),(0,n.fsyncSync)(t),t}catch(e){if("EEXIST"!==e.code||Date.now()>=t)throw e;Atomics.wait(new Int32Array(new SharedArrayBuffer(4)),0,0,20)}}(l),eN(l,"file"),(0,n.existsSync)(i)?(eN(i,"file"),h=function(e){let t=JSON.parse((0,n.readFileSync)(e,"utf8"));if(!t||"object"!=typeof t||Array.isArray(t))throw Error("known-hosts document must be an object");let r=Object.create(null);for(let[e,s]of Object.entries(t)){if(!e||e.length>253||["__proto__","prototype","constructor"].includes(e)||"string"!=typeof s||0===s.length||s.length>256)throw Error("known-hosts document contains an invalid entry");r[e]=s}return r}(i)):h=Object.create(null);let d=h[e];if(!d){h[e]=t;var u=h;let a=(0,o.dirname)(i),l=(0,o.join)(a,`.${i.split("/").pop()??"known-hosts"}.${process.pid}.${(0,s.randomBytes)(6).toString("hex")}.tmp`),c=null;try{c=(0,n.openSync)(l,n.constants.O_CREAT|n.constants.O_EXCL|n.constants.O_WRONLY,384),(0,n.writeSync)(c,`${JSON.stringify(u,null,2)}
|
|
5
|
+
`,void 0,"utf8"),(0,n.fsyncSync)(c),(0,n.closeSync)(c),c=null,(0,n.renameSync)(l,i),eN(i,"file");let e=(0,n.openSync)(a,n.constants.O_RDONLY);try{(0,n.fsyncSync)(e)}finally{(0,n.closeSync)(e)}}catch(e){null!==c&&(0,n.closeSync)(c);try{(0,n.unlinkSync)(l)}catch{}throw e}return ex({event:"host-key-enrolled",host:e,observed:t,mode:r}),!0}let f=d===t;return f||(ex({event:"host-key-mismatch",host:e,expected:d,observed:t,mode:r}),console.error(`[terminal] SSH host key mismatch for ${e}`)),f||"enforce"!==r}catch(t){return eI(r,{event:"host-key-store-error",host:e,reason:t instanceof Error?t.message:String(t),mode:r})}finally{if(null!==c){try{(0,n.closeSync)(c)}catch{}try{(0,n.unlinkSync)(l);let e=(0,n.openSync)(a,n.constants.O_RDONLY);try{(0,n.fsyncSync)(e)}finally{(0,n.closeSync)(e)}}catch{}}eR.delete(i)}})(i,e)})}catch(e){throw clearTimeout(p),_(d),e}}function eL(e){let t=eD.get(e);if(t){try{t.ssh.end()}catch{}eD.delete(e)}}e.s(["attachWebSocketTerminal",0,function(e){if(eM.__terminalWss)return eM.__terminalWss;let t=new E.default({noServer:!0});return eM.__terminalWss=t,e.on("upgrade",(e,r,s)=>{let{pathname:i}=(0,v.parse)(e.url??"",!0);"/api/terminal/ws"===i&&t.handleUpgrade(e,r,s,r=>{t.emit("connection",r,e)})}),t.on("connection",(e,t)=>{eP(e,t).catch(()=>{try{e.close(1011,"Terminal connection error")}catch{}eL(e)})}),eM.__wsHeartbeat||(eM.__wsHeartbeat=setInterval(()=>{for(let[e,t]of eD){if(!t.alive){e.terminate(),eL(e);continue}t.alive=!1,e.ping()}},3e4)),t}],21640)},87693,(e,t,r)=>{var s=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.getKeyIndexes=r.hasFlag=r.exists=r.list=void 0;let i=s(e.r(9030));r.list=Object.keys(i.default);let n={};function o(e){"string"!=typeof e&&(e=String(e));let t=e.indexOf("->");return -1===t?e.length:t}r.list.forEach(e=>{n[e]=i.default[e].flags.reduce(function(e,t){return e[t]=!0,e},{})}),r.exists=function(e,t){return e=(null==t?void 0:t.caseInsensitive)?String(e).toLowerCase():e,!!i.default[e]},r.hasFlag=function(e,t,r){if(!n[e=(null==r?void 0:r.nameCaseInsensitive)?String(e).toLowerCase():e])throw Error("Unknown command "+e);return!!n[e][t]},r.getKeyIndexes=function(e,t,r){e=(null==r?void 0:r.nameCaseInsensitive)?String(e).toLowerCase():e;let s=i.default[e];if(!s)throw Error("Unknown command "+e);if(!Array.isArray(t))throw Error("Expect args to be an array");let n=[],a=!!(r&&r.parseExternalKey),l=(e,t)=>{let r=[],s=Number(e[t]);for(let e=0;e<s;e++)r.push(e+t+1);return r},c=(e,t,r)=>{for(let s=t;s<e.length-1;s+=1)if(String(e[s]).toLowerCase()===r.toLowerCase())return s+1;return null};switch(e){case"zunionstore":case"zinterstore":case"zdiffstore":n.push(0,...l(t,1));break;case"eval":case"evalsha":case"eval_ro":case"evalsha_ro":case"fcall":case"fcall_ro":case"blmpop":case"bzmpop":n.push(...l(t,1));break;case"sintercard":case"lmpop":case"zunion":case"zinter":case"zmpop":case"zintercard":case"zdiff":n.push(...l(t,0));break;case"msetex":{let e=Number(t[0]);for(let t=0;t<e;t++)n.push(1+2*t);break}case"georadius":{n.push(0);let e=c(t,5,"STORE");e&&n.push(e);let r=c(t,5,"STOREDIST");r&&n.push(r);break}case"georadiusbymember":{n.push(0);let e=c(t,4,"STORE");e&&n.push(e);let r=c(t,4,"STOREDIST");r&&n.push(r);break}case"sort":case"sort_ro":n.push(0);for(let e=1;e<t.length-1;e++){let r=t[e];if("string"!=typeof r)continue;let s=r.toUpperCase();"GET"===s?(e+=1,"#"!==(r=t[e])&&(a?n.push([e,o(r)]):n.push(e))):"BY"===s?(e+=1,a?n.push([e,o(t[e])]):n.push(e)):"STORE"===s&&(e+=1,n.push(e))}break;case"migrate":if(""===t[2])for(let e=5;e<t.length-1;e++){let r=t[e];if("string"==typeof r&&"KEYS"===r.toUpperCase()){for(let r=e+1;r<t.length;r++)n.push(r);break}}else n.push(2);break;case"xreadgroup":case"xread":for(let r=3*("xread"!==e);r<t.length-1;r++)if("STREAMS"===String(t[r]).toUpperCase()){for(let e=r+1;e<=r+(t.length-1-r)/2;e++)n.push(e);break}break;default:if(s.step>0){let e=s.keyStart-1,r=s.keyStop>0?s.keyStop:t.length+s.keyStop+1;for(let t=e;t<r;t+=s.step)n.push(t)}}return n}},20265,(e,t,r)=>{function s(e,t){var t=t||{};this._capacity=t.capacity,this._head=0,this._tail=0,Array.isArray(e)?this._fromArray(e):(this._capacityMask=3,this._list=[,,,,])}s.prototype.peekAt=function(e){var t=e;if(t===(0|t)){var r=this.size();if(!(t>=r)&&!(t<-r))return t<0&&(t+=r),t=this._head+t&this._capacityMask,this._list[t]}},s.prototype.get=function(e){return this.peekAt(e)},s.prototype.peek=function(){if(this._head!==this._tail)return this._list[this._head]},s.prototype.peekFront=function(){return this.peek()},s.prototype.peekBack=function(){return this.peekAt(-1)},Object.defineProperty(s.prototype,"length",{get:function(){return this.size()}}),s.prototype.size=function(){return this._head===this._tail?0:this._head<this._tail?this._tail-this._head:this._capacityMask+1-(this._head-this._tail)},s.prototype.unshift=function(e){if(0==arguments.length)return this.size();var t=this._list.length;return(this._head=this._head-1+t&this._capacityMask,this._list[this._head]=e,this._tail===this._head&&this._growArray(),this._capacity&&this.size()>this._capacity&&this.pop(),this._head<this._tail)?this._tail-this._head:this._capacityMask+1-(this._head-this._tail)},s.prototype.shift=function(){var e=this._head;if(e!==this._tail){var t=this._list[e];return this._list[e]=void 0,this._head=e+1&this._capacityMask,e<2&&this._tail>1e4&&this._tail<=this._list.length>>>2&&this._shrinkArray(),t}},s.prototype.push=function(e){if(0==arguments.length)return this.size();var t=this._tail;return(this._list[t]=e,this._tail=t+1&this._capacityMask,this._tail===this._head&&this._growArray(),this._capacity&&this.size()>this._capacity&&this.shift(),this._head<this._tail)?this._tail-this._head:this._capacityMask+1-(this._head-this._tail)},s.prototype.pop=function(){var e=this._tail;if(e!==this._head){var t=this._list.length;this._tail=e-1+t&this._capacityMask;var r=this._list[this._tail];return this._list[this._tail]=void 0,this._head<2&&e>1e4&&e<=t>>>2&&this._shrinkArray(),r}},s.prototype.removeOne=function(e){var t,r=e;if(r===(0|r)&&this._head!==this._tail){var s=this.size(),i=this._list.length;if(!(r>=s)&&!(r<-s)){r<0&&(r+=s),r=this._head+r&this._capacityMask;var n=this._list[r];if(e<s/2){for(t=e;t>0;t--)this._list[r]=this._list[r=r-1+i&this._capacityMask];this._list[r]=void 0,this._head=this._head+1+i&this._capacityMask}else{for(t=s-1-e;t>0;t--)this._list[r]=this._list[r=r+1+i&this._capacityMask];this._list[r]=void 0,this._tail=this._tail-1+i&this._capacityMask}return n}}},s.prototype.remove=function(e,t){var r,s,i=e,n=t;if(i===(0|i)&&this._head!==this._tail){var o=this.size(),a=this._list.length;if(!(i>=o)&&!(i<-o)&&!(t<1)){if(i<0&&(i+=o),1===t||!t)return(r=[,])[0]=this.removeOne(i),r;if(0===i&&i+t>=o)return r=this.toArray(),this.clear(),r;for(i+t>o&&(t=o-i),r=Array(t),s=0;s<t;s++)r[s]=this._list[this._head+i+s&this._capacityMask];if(i=this._head+i&this._capacityMask,e+t===o){for(this._tail=this._tail-t+a&this._capacityMask,s=t;s>0;s--)this._list[i=i+1+a&this._capacityMask]=void 0;return r}if(0===e){for(this._head=this._head+t+a&this._capacityMask,s=t-1;s>0;s--)this._list[i=i+1+a&this._capacityMask]=void 0;return r}if(i<o/2){for(this._head=this._head+e+t+a&this._capacityMask,s=e;s>0;s--)this.unshift(this._list[i=i-1+a&this._capacityMask]);for(i=this._head-1+a&this._capacityMask;n>0;)this._list[i=i-1+a&this._capacityMask]=void 0,n--;e<0&&(this._tail=i)}else{for(this._tail=i,i=i+t+a&this._capacityMask,s=o-(t+e);s>0;s--)this.push(this._list[i++]);for(i=this._tail;n>0;)this._list[i=i+1+a&this._capacityMask]=void 0,n--}return this._head<2&&this._tail>1e4&&this._tail<=a>>>2&&this._shrinkArray(),r}}},s.prototype.splice=function(e,t){var r=e;if(r===(0|r)){var s=this.size();if(r<0&&(r+=s),!(r>s))if(!(arguments.length>2))return this.remove(r,t);else{var i,n,o,a=arguments.length,l=this._list.length,c=2;if(!s||r<s/2){for(n=Array(r),i=0;i<r;i++)n[i]=this._list[this._head+i&this._capacityMask];for(0===t?(o=[],r>0&&(this._head=this._head+r+l&this._capacityMask)):(o=this.remove(r,t),this._head=this._head+r+l&this._capacityMask);a>c;)this.unshift(arguments[--a]);for(i=r;i>0;i--)this.unshift(n[i-1])}else{var u=(n=Array(s-(r+t))).length;for(i=0;i<u;i++)n[i]=this._list[this._head+r+t+i&this._capacityMask];for(0===t?(o=[],r!=s&&(this._tail=this._head+r+l&this._capacityMask)):(o=this.remove(r,t),this._tail=this._tail-u+l&this._capacityMask);c<a;)this.push(arguments[c++]);for(i=0;i<u;i++)this.push(n[i])}return o}}},s.prototype.clear=function(){this._list=Array(this._list.length),this._head=0,this._tail=0},s.prototype.isEmpty=function(){return this._head===this._tail},s.prototype.toArray=function(){return this._copyArray(!1)},s.prototype._fromArray=function(e){var t=e.length,r=this._nextPowerOf2(t);this._list=Array(r),this._capacityMask=r-1,this._tail=t;for(var s=0;s<t;s++)this._list[s]=e[s]},s.prototype._copyArray=function(e,t){var r,s=this._list,i=s.length,n=this.length;if((t|=n)==n&&this._head<this._tail)return this._list.slice(this._head,this._tail);var o=Array(t),a=0;if(e||this._head>this._tail){for(r=this._head;r<i;r++)o[a++]=s[r];for(r=0;r<this._tail;r++)o[a++]=s[r]}else for(r=this._head;r<this._tail;r++)o[a++]=s[r];return o},s.prototype._growArray=function(){if(0!=this._head){var e=this._copyArray(!0,this._list.length<<1);this._tail=this._list.length,this._head=0,this._list=e}else this._tail=this._list.length,this._list.length<<=1;this._capacityMask=this._capacityMask<<1|1},s.prototype._shrinkArray=function(){this._list.length>>>=1,this._capacityMask>>>=1},s.prototype._nextPowerOf2=function(e){return Math.max(1<<Math.log(e)/Math.log(2)+1,4)},t.exports=s},59026,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});let s=e.r(87693),i=e.r(43594),n=e.r(42351),o=e.r(13895),a=e.r(79805);class l{constructor(e,t=[],r={},s){if(this.name=e,this.inTransaction=!1,this.isTraced=!1,this.isResolved=!1,this.transformed=!1,this.replyEncoding=r.replyEncoding,this.errorStack=r.errorStack,this.args=t.flat(),this.callback=s,this.initPromise(),r.keyPrefix){let e=r.keyPrefix instanceof Buffer,t=e?r.keyPrefix:null;this._iterateKeys(s=>s instanceof Buffer?(null===t&&(t=Buffer.from(r.keyPrefix)),Buffer.concat([t,s])):e?Buffer.concat([r.keyPrefix,Buffer.from(String(s))]):r.keyPrefix+s)}r.readOnly&&(this.isReadOnly=!0)}static checkFlag(e,t){return t=t.toLowerCase(),!!this.getFlagMap()[e][t]}static setArgumentTransformer(e,t){this._transformer.argument[e]=t}static setReplyTransformer(e,t){this._transformer.reply[e]=t}static getFlagMap(){return this.flagMap||(this.flagMap=Object.keys(l.FLAGS).reduce((e,t)=>(e[t]={},l.FLAGS[t].forEach(r=>{e[t][r]=!0}),e),{})),this.flagMap}getSlot(){if(void 0===this.slot){let e=this.getKeys()[0];this.slot=null==e?null:i(e)}return this.slot}getKeys(){return this._iterateKeys()}toWritable(e){let t,r="*"+(this.args.length+1)+"\r\n$"+Buffer.byteLength(this.name)+"\r\n"+this.name+"\r\n";if(this.bufferMode){let e=new h;e.push(r);for(let t=0;t<this.args.length;++t){let r=this.args[t];r instanceof Buffer?0===r.length?e.push("$0\r\n\r\n"):(e.push("$"+r.length+"\r\n"),e.push(r),e.push("\r\n")):e.push("$"+Buffer.byteLength(r)+"\r\n"+r+"\r\n")}t=e.toBuffer()}else{t=r;for(let e=0;e<this.args.length;++e){let r=this.args[e];t+="$"+Buffer.byteLength(r)+"\r\n"+r+"\r\n"}}return t}stringifyArguments(){for(let e=0;e<this.args.length;++e){let t=this.args[e];"string"==typeof t||(t instanceof Buffer?this.bufferMode=!0:this.args[e]=(0,o.toArg)(t))}}transformReply(e){this.replyEncoding&&(e=(0,o.convertBufferToString)(e,this.replyEncoding));let t=l._transformer.reply[this.name];return t&&(e=t(e)),e}setTimeout(e){this._commandTimeoutTimer||(this._commandTimeoutTimer=setTimeout(()=>{this.isResolved||this.reject(Error("Command timed out"))},e))}setBlockingTimeout(e){if(e<=0)return;this._blockingTimeoutTimer&&(clearTimeout(this._blockingTimeoutTimer),this._blockingTimeoutTimer=void 0);let t=Date.now();void 0===this._blockingDeadline&&(this._blockingDeadline=t+e);let r=this._blockingDeadline-t;r<=0?this.resolve(null):this._blockingTimeoutTimer=setTimeout(()=>{if(this.isResolved){this._blockingTimeoutTimer=void 0;return}this._blockingTimeoutTimer=void 0,this.resolve(null)},r)}extractBlockingTimeout(){let e=this.args;if(!e||0===e.length)return;let t=this.name.toLowerCase();return l.checkFlag("LAST_ARG_TIMEOUT_COMMANDS",t)?(0,a.parseSecondsArgument)(e[e.length-1]):l.checkFlag("FIRST_ARG_TIMEOUT_COMMANDS",t)?(0,a.parseSecondsArgument)(e[0]):l.checkFlag("BLOCK_OPTION_COMMANDS",t)?(0,a.parseBlockOption)(e):void 0}_clearTimers(){let e=this._commandTimeoutTimer;e&&(clearTimeout(e),delete this._commandTimeoutTimer);let t=this._blockingTimeoutTimer;t&&(clearTimeout(t),delete this._blockingTimeoutTimer)}initPromise(){let e=new Promise((e,t)=>{if(!this.transformed){this.transformed=!0;let e=l._transformer.argument[this.name];e&&(this.args=e(this.args)),this.stringifyArguments()}this.resolve=this._convertValue(e),this.reject=e=>{this._clearTimers(),this.errorStack?t((0,o.optimizeErrorStack)(e,this.errorStack.stack,"/ROOT/node_modules/ioredis/built")):t(e)}});this.promise=(0,n.default)(e,this.callback)}_iterateKeys(e=e=>e){if(void 0===this.keys&&(this.keys=[],(0,s.exists)(this.name,{caseInsensitive:!0})))for(let t of(0,s.getKeyIndexes)(this.name,this.args,{nameCaseInsensitive:!0}))this.args[t]=e(this.args[t]),this.keys.push(this.args[t]);return this.keys}_convertValue(e){return t=>{try{this._clearTimers(),e(this.transformReply(t)),this.isResolved=!0}catch(e){this.reject(e)}return this.promise}}}r.default=l,l.FLAGS={VALID_IN_SUBSCRIBER_MODE:["subscribe","psubscribe","unsubscribe","punsubscribe","ssubscribe","sunsubscribe","ping","quit"],VALID_IN_MONITOR_MODE:["monitor","auth"],ENTER_SUBSCRIBER_MODE:["subscribe","psubscribe","ssubscribe"],EXIT_SUBSCRIBER_MODE:["unsubscribe","punsubscribe","sunsubscribe"],WILL_DISCONNECT:["quit"],HANDSHAKE_COMMANDS:["auth","select","client","readonly","info"],IGNORE_RECONNECT_ON_ERROR:["client"],BLOCKING_COMMANDS:["blpop","brpop","brpoplpush","blmove","bzpopmin","bzpopmax","bzmpop","blmpop","xread","xreadgroup"],LAST_ARG_TIMEOUT_COMMANDS:["blpop","brpop","brpoplpush","blmove","bzpopmin","bzpopmax"],FIRST_ARG_TIMEOUT_COMMANDS:["bzmpop","blmpop"],BLOCK_OPTION_COMMANDS:["xread","xreadgroup"]},l._transformer={argument:{},reply:{}};let c=function(e){if(1===e.length){if(e[0]instanceof Map)return(0,o.convertMapToArray)(e[0]);if("object"==typeof e[0]&&null!==e[0])return(0,o.convertObjectToArray)(e[0])}return e},u=function(e){if(2===e.length){if(e[1]instanceof Map)return[e[0]].concat((0,o.convertMapToArray)(e[1]));if("object"==typeof e[1]&&null!==e[1])return[e[0]].concat((0,o.convertObjectToArray)(e[1]))}return e};l.setArgumentTransformer("mset",c),l.setArgumentTransformer("msetnx",c),l.setArgumentTransformer("hset",u),l.setArgumentTransformer("hmset",u),l.setReplyTransformer("hgetall",function(e){if(Array.isArray(e)){let t={};for(let r=0;r<e.length;r+=2){let s=e[r],i=e[r+1];s in t?Object.defineProperty(t,s,{value:i,configurable:!0,enumerable:!0,writable:!0}):t[s]=i}return t}return e});class h{constructor(){this.length=0,this.items=[]}push(e){this.length+=Buffer.byteLength(e),this.items.push(e)}toBuffer(){let e=Buffer.allocUnsafe(this.length),t=0;for(let r of this.items){let s=Buffer.byteLength(r);Buffer.isBuffer(r)?r.copy(e,t):e.write(r,t,s),t+=s}return e}}},92683,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});let s=e.r(59026),i=e.r(13895),n=e.r(86111),o=e.r(28305),a=(0,i.Debug)("dataHandler");r.default=class{constructor(e,t){this.redis=e;let r=new n({stringNumbers:t.stringNumbers,returnBuffers:!0,returnError:e=>{this.returnError(e)},returnFatalError:e=>{this.returnFatalError(e)},returnReply:e=>{this.returnReply(e)}});e.stream.prependListener("data",e=>{r.execute(e)}),e.stream.resume()}returnFatalError(e){e.message+=". Please report this.",this.redis.recoverFromFatalError(e,e,{offlineQueue:!1})}returnError(e){let t=this.shiftCommand(e);if(t){if(e.command={name:t.command.name,args:t.command.args},"ssubscribe"==t.command.name&&e.message.includes("MOVED"))return void this.redis.emit("moved");this.redis.handleReconnection(e,t)}}returnReply(e){if(this.handleMonitorReply(e)||this.handleSubscriberReply(e))return;let t=this.shiftCommand(e);t&&(s.default.checkFlag("ENTER_SUBSCRIBER_MODE",t.command.name)?(this.redis.condition.subscriber=new o.default,this.redis.condition.subscriber.add(t.command.name,e[1].toString()),c(t.command,e[2])||this.redis.commandQueue.unshift(t)):s.default.checkFlag("EXIT_SUBSCRIBER_MODE",t.command.name)?u(t.command,e[2])||this.redis.commandQueue.unshift(t):t.command.resolve(e))}handleSubscriberReply(e){if(!this.redis.condition.subscriber)return!1;let t=Array.isArray(e)?e[0].toString():null;switch(a('receive reply "%s" in subscriber mode',t),t){case"message":this.redis.listeners("message").length>0&&this.redis.emit("message",e[1].toString(),e[2]?e[2].toString():""),this.redis.emit("messageBuffer",e[1],e[2]);break;case"pmessage":{let t=e[1].toString();this.redis.listeners("pmessage").length>0&&this.redis.emit("pmessage",t,e[2].toString(),e[3].toString()),this.redis.emit("pmessageBuffer",t,e[2],e[3]);break}case"smessage":this.redis.listeners("smessage").length>0&&this.redis.emit("smessage",e[1].toString(),e[2]?e[2].toString():""),this.redis.emit("smessageBuffer",e[1],e[2]);break;case"ssubscribe":case"subscribe":case"psubscribe":{let r=e[1].toString();this.redis.condition.subscriber.add(t,r);let s=this.shiftCommand(e);if(!s)return;c(s.command,e[2])||this.redis.commandQueue.unshift(s);break}case"sunsubscribe":case"unsubscribe":case"punsubscribe":{let r=e[1]?e[1].toString():null;r&&this.redis.condition.subscriber.del(t,r);let s=e[2];0===Number(s)&&(this.redis.condition.subscriber=!1);let i=this.shiftCommand(e);if(!i)return;u(i.command,s)||this.redis.commandQueue.unshift(i);break}default:{let t=this.shiftCommand(e);if(!t)return;t.command.resolve(e)}}return!0}handleMonitorReply(e){if("monitoring"!==this.redis.status)return!1;let t=e.toString();if("OK"===t)return!1;let r=t.indexOf(" "),s=t.slice(0,r),i=t.indexOf('"'),n=t.slice(i+1,-1).split('" "').map(e=>e.replace(/\\"/g,'"')),o=t.slice(r+2,i-2).split(" ");return this.redis.emit("monitor",s,n,o[1],o[0]),!0}shiftCommand(e){let t=this.redis.commandQueue.shift();if(!t){let t=Error("Command queue state error. If you can reproduce this, please report it."+(e instanceof Error?` Last error: ${e.message}`:` Last reply: ${e.toString()}`));return this.redis.emit("error",t),null}return t}};let l=new WeakMap;function c(e,t){let r=l.has(e)?l.get(e):e.args.length;return(r-=1)<=0?(e.resolve(t),l.delete(e),!0):(l.set(e,r),!1)}function u(e,t){let r=l.has(e)?l.get(e):e.args.length;return 0===r?0===Number(t)&&(l.delete(e),e.resolve(t),!0):(r-=1)<=0?(e.resolve(t),!0):(l.set(e,r),!1)}},60520,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});let s=e.r(43594),i=e.r(87693),n=e.r(42351),o=e.r(24361),a=e.r(59026),l=e.r(874),c=e.r(13895),u=e.r(34207);class h extends u.default{constructor(e){super(),this.redis=e,this.isPipeline=!0,this.replyPending=0,this._queue=[],this._result=[],this._transactions=0,this._shaToScript={},this.isCluster="Cluster"===this.redis.constructor.name||this.redis.isCluster,this.options=e.options,Object.keys(e.scriptsSet).forEach(t=>{let r=e.scriptsSet[t];this._shaToScript[r.sha]=r,this[t]=e[t],this[t+"Buffer"]=e[t+"Buffer"]}),e.addedBuiltinSet.forEach(t=>{this[t]=e[t],this[t+"Buffer"]=e[t+"Buffer"]}),this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t});let t=this;Object.defineProperty(this,"length",{get:function(){return t._queue.length}})}fillResult(e,t){if("exec"===this._queue[t].name&&Array.isArray(e[1])){let r=e[1].length;for(let s=0;s<r;s++){if(e[1][s]instanceof Error)continue;let i=this._queue[t-(r-s)];try{e[1][s]=i.transformReply(e[1][s])}catch(t){e[1][s]=t}}}if(this._result[t]=e,--this.replyPending)return;if(this.isCluster){let e,t=!0;for(let r=0;r<this._result.length;++r){let s=this._result[r][0],n=this._queue[r];if(s){if("exec"===n.name&&"EXECABORT Transaction discarded because of previous errors."===s.message)continue;if(e){if(e.name!==s.name||e.message!==s.message){t=!1;break}}else e={name:s.name,message:s.message}}else if(!n.inTransaction&&!((0,i.exists)(n.name,{caseInsensitive:!0})&&(0,i.hasFlag)(n.name,"readonly",{nameCaseInsensitive:!0}))){t=!1;break}}if(e&&t){let t=this,r=e.message.split(" "),s=this._queue,i=!1;this._queue=[];for(let e=0;e<s.length;++e){if("ASK"===r[0]&&!i&&"asking"!==s[e].name&&(!s[e-1]||"asking"!==s[e-1].name)){let e=new a.default("asking");e.ignore=!0,this.sendCommand(e)}s[e].initPromise(),this.sendCommand(s[e]),i=s[e].inTransaction}let n=!0;void 0===this.leftRedirections&&(this.leftRedirections={});let o=function(){t.exec()},l=this.redis;if(l.handleError(e,this.leftRedirections,{moved:function(e,s){t.preferKey=s,l.slots[r[1]]?l.slots[r[1]][0]!==s&&(l.slots[r[1]]=[s]):l.slots[r[1]]=[s],l._groupsBySlot[r[1]]=l._groupsIds[l.slots[r[1]].join(";")],l.refreshSlotsCache(),t.exec()},ask:function(e,r){t.preferKey=r,t.exec()},tryagain:o,clusterDown:o,connectionClosed:o,maxRedirections:()=>{n=!1},defaults:()=>{n=!1}}),n)return}}let r=0;for(let e=0;e<this._queue.length-r;++e)this._queue[e+r].ignore&&(r+=1),this._result[e]=this._result[e+r];this.resolve(this._result.slice(0,this._result.length-r))}sendCommand(e){this._transactions>0&&(e.inTransaction=!0);let t=this._queue.length;return e.pipelineIndex=t,e.promise.then(e=>{this.fillResult([null,e],t)}).catch(e=>{this.fillResult([e],t)}),this._queue.push(e),this}addBatch(e){let t,r,s;for(let i=0;i<e.length;++i)r=(t=e[i])[0],s=t.slice(1),this[r].apply(this,s);return this}}r.default=h;let d=h.prototype.multi;h.prototype.multi=function(){return this._transactions+=1,d.apply(this,arguments)};let f=h.prototype.execBuffer;h.prototype.execBuffer=(0,o.deprecate)(function(){return this._transactions>0&&(this._transactions-=1),f.apply(this,arguments)},"Pipeline#execBuffer: Use Pipeline#exec instead"),h.prototype.exec=function(e){let t;if(this.isCluster&&!this.redis.slots.length)return"wait"===this.redis.status&&this.redis.connect().catch(c.noop),e&&!this.nodeifiedPromise&&(this.nodeifiedPromise=!0,(0,n.default)(this.promise,e)),this.redis.delayUntilReady(t=>{t?this.reject(t):this.exec(e)}),this.promise;if(this._transactions>0)return this._transactions-=1,f.apply(this,arguments);if(this.nodeifiedPromise||(this.nodeifiedPromise=!0,(0,n.default)(this.promise,e)),this._queue.length||this.resolve([]),this.isCluster){let e=[];for(let t=0;t<this._queue.length;t++){let r=this._queue[t].getKeys();if(r.length&&e.push(r[0]),r.length&&0>s.generateMulti(r))return this.reject(Error("All the keys in a pipeline command should belong to the same slot")),this.promise}if(e.length){if((t=function(e,t){let r=s(t[0]),i=e._groupsBySlot[r];for(let r=1;r<t.length;r++)if(e._groupsBySlot[s(t[r])]!==i)return -1;return r}(this.redis,e))<0)return this.reject(Error("All keys in the pipeline should belong to the same slots allocation group")),this.promise}else t=16384*Math.random()|0}let r=this;return function(){let e,s,i=r.replyPending=r._queue.length;r.isCluster&&(e={slot:t,redis:r.redis.connectionPool.nodes.all[r.preferKey]});let n="",o={isPipeline:!0,destination:r.isCluster?e:{redis:r.redis},write(e){"string"!=typeof e?(s||(s=[]),n&&(s.push(Buffer.from(n,"utf8")),n=""),s.push(e)):(n.length+e.length>=l.constants.MAX_STRING_LENGTH&&(s||(s=[]),n&&(s.push(Buffer.from(n,"utf8")),n="")),n+=e),--i||(s?(n&&s.push(Buffer.from(n,"utf8")),o.destination.redis.stream.write(Buffer.concat(s))):o.destination.redis.stream.write(n),i=r._queue.length,n="",s=void 0)}};for(let t=0;t<r._queue.length;++t)r.redis.sendCommand(r._queue[t],o,e);r.promise}(),this.promise}},45375,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});let s=e.r(87693),i=e.r(27699),n=e.r(42351),o=e.r(58063),a=e.r(59026),l=e.r(25752),c=e.r(3107),u=e.r(3046),h=e.r(80494),d=e.r(59875),f=e.r(60886),p=e.r(13895),y=e.r(94455),m=e.r(74031),g=e.r(34207),S=e.r(18761),b=e.r(20265),_=(0,p.Debug)("redis");class k extends g.default{constructor(e,t,r){if(super(),this.status="wait",this.isCluster=!1,this.reconnectTimeout=null,this.connectionEpoch=0,this.retryAttempts=0,this.manuallyClosing=!1,this._autoPipelines=new Map,this._runningAutoPipelines=new Set,this.parseOptions(e,t,r),i.EventEmitter.call(this),this.resetCommandQueue(),this.resetOfflineQueue(),this.options.Connector)this.connector=new this.options.Connector(this.options);else if(this.options.sentinels){let e=new c.default(this.options);e.emitter=this,this.connector=e}else this.connector=new l.StandaloneConnector(this.options);this.options.scripts&&Object.entries(this.options.scripts).forEach(([e,t])=>{this.defineCommand(e,t)}),this.options.lazyConnect?this.setStatus("wait"):this.connect().catch(S.noop)}static createClient(...e){return new k(...e)}get autoPipelineQueueSize(){let e=0;for(let t of this._autoPipelines.values())e+=t.length;return e}connect(e){let t=(0,y.traceConnect)(()=>this._connect(),()=>{let{address:e,port:t}=this._getServerAddress();return{serverAddress:e,serverPort:t,connectionEpoch:this.connectionEpoch}});return(0,n.default)(t,e)}_connect(){return new Promise((e,t)=>{if("connecting"===this.status||"connect"===this.status||"ready"===this.status)return void t(Error("Redis is already connecting/connected"));this.connectionEpoch+=1,this.setStatus("connecting");let{options:r}=this;this.condition={select:r.db,auth:r.username?[r.username,r.password]:r.password,subscriber:!1};let s=this;(0,n.default)(this.connector.connect(function(e,t){s.silentEmit(e,t)}),function(i,n){if(i){s.flushQueue(i),s.silentEmit("error",i),t(i),s.setStatus("end");return}let o=r.tls?"secureConnect":"connect";if("sentinels"in r&&r.sentinels&&!r.enableTLSForSentinelMode&&(o="connect"),s.stream=n,r.noDelay&&n.setNoDelay(!0),"number"==typeof r.keepAlive&&(n.connecting?n.once(o,()=>{n.setKeepAlive(!0,r.keepAlive)}):n.setKeepAlive(!0,r.keepAlive)),n.connecting){if(n.once(o,u.connectHandler(s)),r.connectTimeout){let e=!1;n.setTimeout(r.connectTimeout,function(){if(e)return;n.setTimeout(0),n.destroy();let t=Error("connect ETIMEDOUT");t.errorno="ETIMEDOUT",t.code="ETIMEDOUT",t.syscall="connect",u.errorHandler(s)(t)}),n.once(o,function(){e=!0,n.setTimeout(0)})}}else if(n.destroyed){let e=s.connector.firstError;e&&process.nextTick(()=>{u.errorHandler(s)(e)}),process.nextTick(u.closeHandler(s))}else process.nextTick(u.connectHandler(s));n.destroyed||(n.once("error",u.errorHandler(s)),n.once("close",u.closeHandler(s)));let a=function(){s.removeListener("close",l),e()};var l=function(){s.removeListener("ready",a),t(Error(p.CONNECTION_CLOSED_ERROR_MSG))};s.once("ready",a),s.once("close",l)})})}disconnect(e=!1){e||(this.manuallyClosing=!0),this.reconnectTimeout&&!e&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null),"wait"===this.status?u.closeHandler(this)():this.connector.disconnect()}end(){this.disconnect()}duplicate(e){return new k({...this.options,...e})}get mode(){var e;return this.options.monitor?"monitor":(null==(e=this.condition)?void 0:e.subscriber)?"subscriber":"normal"}monitor(e){let t=this.duplicate({monitor:!0,lazyConnect:!1});return(0,n.default)(new Promise(function(e,r){t.once("error",r),t.once("monitoring",function(){e(t)})}),e)}sendCommand(e,t){var r,i;if("wait"===this.status&&this.connect().catch(S.noop),"end"===this.status)return e.reject(Error(p.CONNECTION_CLOSED_ERROR_MSG)),e.promise;if((null==(r=this.condition)?void 0:r.subscriber)&&!a.default.checkFlag("VALID_IN_SUBSCRIBER_MODE",e.name))return e.reject(Error("Connection in subscriber mode, only subscriber commands may be used")),e.promise;"number"==typeof this.options.commandTimeout&&e.setTimeout(this.options.commandTimeout);let n=this.getBlockingTimeoutInMs(e),o="ready"===this.status||!t&&"connect"===this.status&&(0,s.exists)(e.name,{caseInsensitive:!0})&&((0,s.hasFlag)(e.name,"loading",{nameCaseInsensitive:!0})||a.default.checkFlag("HANDSHAKE_COMMANDS",e.name));if(this.stream&&this.stream.writable?this.stream._writableState&&this.stream._writableState.ended&&(o=!1):o=!1,o)_.enabled&&_("write command[%s]: %d -> %s(%o)",this._getDescription(),null==(i=this.condition)?void 0:i.select,e.name,e.args),t?"isPipeline"in t&&t.isPipeline?t.write(e.toWritable(t.destination.redis.stream)):t.write(e.toWritable(t)):this.stream.write(e.toWritable(this.stream)),this.commandQueue.push({command:e,stream:t,select:this.condition.select}),void 0!==n&&e.setBlockingTimeout(n),a.default.checkFlag("WILL_DISCONNECT",e.name)&&(this.manuallyClosing=!0),void 0!==this.options.socketTimeout&&void 0===this.socketTimeoutTimer&&this.setSocketTimeout();else{if(!this.options.enableOfflineQueue)return e.reject(Error("Stream isn't writeable and enableOfflineQueue options is false")),e.promise;if("quit"===e.name&&0===this.offlineQueue.length)return this.disconnect(),e.resolve(Buffer.from("OK")),e.promise;if(_.enabled&&_("queue command[%s]: %d -> %s(%o)",this._getDescription(),this.condition.select,e.name,e.args),this.offlineQueue.push({command:e,stream:t,select:this.condition.select}),a.default.checkFlag("BLOCKING_COMMANDS",e.name)){let t=this.getConfiguredBlockingTimeout();void 0!==t&&e.setBlockingTimeout(t)}}if("select"===e.name&&(0,p.isInt)(e.args[0])){let t=parseInt(e.args[0],10);this.condition.select!==t&&(this.condition.select=t,this.emit("select",t),_("switch to db [%d]",this.condition.select))}return!o||e.isTraced?e.promise:(e.isTraced=!0,(0,y.traceCommand)(()=>e.promise,()=>this._buildCommandContext(e)))}getBlockingTimeoutInMs(e){var t;if(!a.default.checkFlag("BLOCKING_COMMANDS",e.name))return;let r=this.getConfiguredBlockingTimeout();if(void 0===r)return;let s=e.extractBlockingTimeout();return"number"==typeof s?s>0?s+(null!=(t=this.options.blockingTimeoutGrace)?t:h.DEFAULT_REDIS_OPTIONS.blockingTimeoutGrace):r:null===s?r:void 0}getConfiguredBlockingTimeout(){if("number"==typeof this.options.blockingTimeout&&this.options.blockingTimeout>0)return this.options.blockingTimeout}setSocketTimeout(){this.socketTimeoutTimer=setTimeout(()=>{this.stream.destroy(Error(`Socket timeout. Expecting data, but didn't receive any in ${this.options.socketTimeout}ms.`)),this.socketTimeoutTimer=void 0},this.options.socketTimeout),this.stream.once("data",()=>{clearTimeout(this.socketTimeoutTimer),this.socketTimeoutTimer=void 0,0!==this.commandQueue.length&&this.setSocketTimeout()})}scanStream(e){return this.createScanStream("scan",{options:e})}scanBufferStream(e){return this.createScanStream("scanBuffer",{options:e})}sscanStream(e,t){return this.createScanStream("sscan",{key:e,options:t})}sscanBufferStream(e,t){return this.createScanStream("sscanBuffer",{key:e,options:t})}hscanStream(e,t){return this.createScanStream("hscan",{key:e,options:t})}hscanBufferStream(e,t){return this.createScanStream("hscanBuffer",{key:e,options:t})}zscanStream(e,t){return this.createScanStream("zscan",{key:e,options:t})}zscanBufferStream(e,t){return this.createScanStream("zscanBuffer",{key:e,options:t})}silentEmit(e,t){let r;if("error"!==e||(r=t,"end"!==this.status&&(!this.manuallyClosing||!(r instanceof Error)||r.message!==p.CONNECTION_CLOSED_ERROR_MSG&&"connect"!==r.syscall&&"read"!==r.syscall)))return this.listeners(e).length>0?this.emit.apply(this,arguments):(r&&r instanceof Error&&console.error("[ioredis] Unhandled error event:",r.stack),!1)}recoverFromFatalError(e,t,r){this.flushQueue(t,r),this.silentEmit("error",t),this.disconnect(!0)}handleReconnection(e,t){var r;let s=!1;switch(this.options.reconnectOnError&&!a.default.checkFlag("IGNORE_RECONNECT_ON_ERROR",t.command.name)&&(s=this.options.reconnectOnError(e)),s){case 1:case!0:"reconnecting"!==this.status&&this.disconnect(!0),t.command.reject(e);break;case 2:"reconnecting"!==this.status&&this.disconnect(!0),(null==(r=this.condition)?void 0:r.select)!==t.select&&"select"!==t.command.name&&this.select(t.select),this.sendCommand(t.command);break;default:t.command.reject(e)}}_getServerAddress(){return"path"in this.options&&this.options.path?{address:this.options.path,port:void 0}:{address:"host"in this.options&&this.options.host||"localhost",port:"port"in this.options&&this.options.port||6379}}_buildCommandContext(e){var t,r,s;let{address:i,port:n}=this._getServerAddress();return{command:e.name,args:(0,y.sanitizeArgs)(e.name,e.args),database:null!=(s=null!=(r=null==(t=this.condition)?void 0:t.select)?r:this.options.db)?s:0,serverAddress:i,serverPort:n}}_buildBatchContext(e){var t,r,s;let{address:i,port:n}=this._getServerAddress();return{batchMode:"MULTI",batchSize:e,database:null!=(s=null!=(r=null==(t=this.condition)?void 0:t.select)?r:this.options.db)?s:0,serverAddress:i,serverPort:n}}_getDescription(){let e;return e="path"in this.options&&this.options.path?this.options.path:this.stream&&this.stream.remoteAddress&&this.stream.remotePort?this.stream.remoteAddress+":"+this.stream.remotePort:"host"in this.options&&this.options.host?this.options.host+":"+this.options.port:"",this.options.connectionName&&(e+=` (${this.options.connectionName})`),e}resetCommandQueue(){this.commandQueue=new b}resetOfflineQueue(){this.offlineQueue=new b}parseOptions(...e){let t={},r=!1;for(let s=0;s<e.length;++s){let i=e[s];if(null!=i)if("object"==typeof i)(0,S.defaults)(t,i);else if("string"==typeof i)(0,S.defaults)(t,(0,p.parseURL)(i)),i.startsWith("rediss://")&&(r=!0);else if("number"==typeof i)t.port=i;else throw Error("Invalid argument "+i)}r&&(0,S.defaults)(t,{tls:!0}),(0,S.defaults)(t,k.defaultOptions),"string"==typeof t.port&&(t.port=parseInt(t.port,10)),"string"==typeof t.db&&(t.db=parseInt(t.db,10)),this.options=(0,p.resolveTLSProfile)(t)}setStatus(e,t){_.enabled&&_("status[%s]: %s -> %s",this._getDescription(),this.status||"[empty]",e),this.status=e,process.nextTick(this.emit.bind(this,e,t))}createScanStream(e,{key:t,options:r={}}){return new d.default({objectMode:!0,key:t,redis:this,command:e,...r})}flushQueue(e,t){let r;if((t=(0,S.defaults)({},t,{offlineQueue:!0,commandQueue:!0})).offlineQueue)for(;r=this.offlineQueue.shift();)r.command.reject(e);if(t.commandQueue&&this.commandQueue.length>0)for(this.stream&&this.stream.removeAllListeners("data");r=this.commandQueue.shift();)r.command.reject(e)}_readyCheck(e){let t=this;this.info(function(r,s){if(r)return r.message&&r.message.includes("NOPERM")?(console.warn(`Skipping the ready check because INFO command fails: "${r.message}". You can disable ready check with "enableReadyCheck". More: https://github.com/luin/ioredis/wiki/Disable-ready-check.`),e(null,{})):e(r);if("string"!=typeof s)return e(null,s);let i={},n=s.split("\r\n");for(let e=0;e<n.length;++e){let[t,...r]=n[e].split(":"),s=r.join(":");s&&(i[t]=s)}if(i.loading&&"0"!==i.loading){let r=1e3*(i.loading_eta_seconds||1),s=t.options.maxLoadingRetryTime&&t.options.maxLoadingRetryTime<r?t.options.maxLoadingRetryTime:r;_("Redis server still loading, trying again in "+s+"ms"),setTimeout(function(){t._readyCheck(e)},s)}else e(null,i)}).catch(S.noop)}}k.Cluster=o.default,k.Command=a.default,k.defaultOptions=h.DEFAULT_REDIS_OPTIONS,(0,m.default)(k,i.EventEmitter),(0,f.addTransactionSupport)(k.prototype),r.default=k},59875,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});let s=e.r(88947);class i extends s.Readable{constructor(e){super(e),this.opt=e,this._redisCursor="0",this._redisDrained=!1}_read(){if(this._redisDrained)return void this.push(null);let e=[this._redisCursor];this.opt.key&&e.unshift(this.opt.key),this.opt.match&&e.push("MATCH",this.opt.match),this.opt.type&&e.push("TYPE",this.opt.type),this.opt.count&&e.push("COUNT",String(this.opt.count)),this.opt.noValues&&e.push("NOVALUES"),this.opt.redis[this.opt.command](e,(e,t)=>{e?this.emit("error",e):(this._redisCursor=t[0]instanceof Buffer?t[0].toString():t[0],"0"===this._redisCursor&&(this._redisDrained=!0),this.push(t[1]))})}close(){this._redisDrained=!0}}r.default=i},27743,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});let s=e.r(54799),i=e.r(59026),n=e.r(42351);r.default=class{constructor(e,t=null,r="",n=!1){this.lua=e,this.numberOfKeys=t,this.keyPrefix=r,this.readOnly=n,this.sha=(0,s.createHash)("sha1").update(e).digest("hex");let o=this.sha,a=new WeakSet;this.Command=class extends i.default{toWritable(t){let r=this.reject;return this.reject=e=>{-1!==e.message.indexOf("NOSCRIPT")&&a.delete(t),r.call(this,e)},a.has(t)?"eval"===this.name&&(this.name="evalsha",this.args[0]=o):(a.add(t),this.name="eval",this.args[0]=e),super.toWritable(t)}}}execute(e,t,r,s){"number"==typeof this.numberOfKeys&&t.unshift(this.numberOfKeys),this.keyPrefix&&(r.keyPrefix=this.keyPrefix),this.readOnly&&(r.readOnly=!0);let i=new this.Command("evalsha",[this.sha,...t],r);return i.promise=i.promise.catch(s=>{if(-1===s.message.indexOf("NOSCRIPT"))throw s;let i=new this.Command("evalsha",[this.sha,...t],r);return(e.isPipeline?e.redis:e).sendCommand(i)}),(0,n.default)(i.promise,s),e.sendCommand(i)}}},28305,(e,t,r)=>{function s(e){return"unsubscribe"===e?"subscribe":"punsubscribe"===e?"psubscribe":"sunsubscribe"===e?"ssubscribe":e}Object.defineProperty(r,"__esModule",{value:!0}),r.default=class{constructor(){this.set={subscribe:{},psubscribe:{},ssubscribe:{}}}add(e,t){this.set[s(e)][t]=!0}del(e,t){delete this.set[s(e)][t]}channels(e){return Object.keys(this.set[s(e)])}isEmpty(){return 0===this.channels("subscribe").length&&0===this.channels("psubscribe").length&&0===this.channels("ssubscribe").length}}},47145,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.executeWithAutoPipelining=r.getFirstValueInFlattenedArray=r.shouldUseAutoPipelining=r.notAllowedAutoPipelineCommands=r.kCallbacks=r.kExec=void 0;let s=e.r(18761),i=e.r(43594),n=e.r(42351),o=e.r(87693);function a(e){for(let t=0;t<e.length;t++){let r=e[t];if("string"==typeof r)return r;if(Array.isArray(r)||(0,s.isArguments)(r)){if(0===r.length)continue;return r[0]}let i=[r].flat();if(i.length>0)return i[0]}}r.kExec=Symbol("exec"),r.kCallbacks=Symbol("callbacks"),r.notAllowedAutoPipelineCommands=["auth","info","script","quit","cluster","pipeline","multi","subscribe","psubscribe","unsubscribe","unpsubscribe","select","client"],r.shouldUseAutoPipelining=function(e,t,s){return t&&e.options.enableAutoPipelining&&!e.isPipeline&&!r.notAllowedAutoPipelineCommands.includes(s)&&!e.options.autoPipeliningIgnoredCommands.includes(s)},r.getFirstValueInFlattenedArray=a,r.executeWithAutoPipelining=function e(t,l,c,u,h){if(t.isCluster&&!t.slots.length)return"wait"===t.status&&t.connect().catch(s.noop),(0,n.default)(new Promise(function(r,s){t.delayUntilReady(i=>{i?s(i):e(t,l,c,u,null).then(r,s)})}),h);let d=t.options.keyPrefix||"",f=t.isCluster?t.slots[i(`${d}${function(e,t){if((0,o.exists)(e,{caseInsensitive:!0})){let r=t.flat(),s=(0,o.getKeyIndexes)(e,r,{nameCaseInsensitive:!0});if(s.length)return r[s[0]]}return a(t)}(c,u)}`)].join(","):"main";if(t.isCluster&&"master"!==t.options.scaleReads&&(f+=(0,o.exists)(c)&&(0,o.hasFlag)(c,"readonly")?":read":":write"),!t._autoPipelines.has(f)){let e=t.pipeline();e[r.kExec]=!1,e[r.kCallbacks]=[],t._autoPipelines.set(f,e)}let p=t._autoPipelines.get(f);p[r.kExec]||(p[r.kExec]=!0,setImmediate(function e(t,s){if(t._runningAutoPipelines.has(s)||!t._autoPipelines.has(s))return;t._runningAutoPipelines.add(s);let i=t._autoPipelines.get(s);t._autoPipelines.delete(s);let n=i[r.kCallbacks];i[r.kCallbacks]=null,i.exec(function(r,i){if(t._runningAutoPipelines.delete(s),r)for(let e=0;e<n.length;e++)process.nextTick(n[e],r);else for(let e=0;e<n.length;e++)process.nextTick(n[e],...i[e]);t._autoPipelines.has(s)&&e(t,s)})},t,f));let y=new Promise(function(e,t){p[r.kCallbacks].push(function(r,s){r?t(r):e(s)}),"call"===l&&u.unshift(c),p[l](...u)});return(0,n.default)(y,h)}},84633,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_CLUSTER_OPTIONS=void 0;let s=e.r(79594);r.DEFAULT_CLUSTER_OPTIONS={clusterRetryStrategy:e=>Math.min(100+2*e,2e3),clusterNodeRetryStrategy:null,enableOfflineQueue:!0,enableReadyCheck:!0,scaleReads:"master",maxRedirections:16,retryDelayOnMoved:0,retryDelayOnFailover:100,retryDelayOnClusterDown:100,retryDelayOnTryAgain:100,slotsRefreshTimeout:1e3,useSRVRecords:!1,resolveSrv:s.resolveSrv,dnsLookup:s.lookup,enableAutoPipelining:!1,autoPipeliningIgnoredCommands:[],shardedSubscribers:!1}},65575,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});let s=e.r(57375),i=e.r(13895),n=e.r(45375),o=(0,i.Debug)("cluster:subscriber");r.default=class{constructor(e,t,r=!1){this.connectionPool=e,this.emitter=t,this.isSharded=r,this.started=!1,this.subscriber=null,this.slotRange=[],this.onSubscriberEnd=()=>{this.started?(o("subscriber has disconnected, selecting a new one..."),this.selectSubscriber()):o("subscriber has disconnected, but ClusterSubscriber is not started, so not reconnecting.")},this.connectionPool.on("-node",(e,t)=>{this.started&&this.subscriber&&(0,s.getNodeKey)(this.subscriber.options)===t&&(o("subscriber has left, selecting a new one..."),this.selectSubscriber())}),this.connectionPool.on("+node",()=>{this.started&&!this.subscriber&&(o("a new node is discovered and there is no subscriber, selecting a new one..."),this.selectSubscriber())})}getInstance(){return this.subscriber}associateSlotRange(e){return this.isSharded&&(this.slotRange=e),this.slotRange}start(){this.started=!0,this.selectSubscriber(),o("started")}stop(){this.started=!1,this.subscriber&&(this.subscriber.disconnect(),this.subscriber=null)}isStarted(){return this.started}selectSubscriber(){let e=this.lastActiveSubscriber;e&&(e.off("end",this.onSubscriberEnd),e.disconnect()),this.subscriber&&(this.subscriber.off("end",this.onSubscriberEnd),this.subscriber.disconnect());let t=(0,i.sample)(this.connectionPool.getNodes());if(!t){o("selecting subscriber failed since there is no node discovered in the cluster yet"),this.subscriber=null;return}let{options:r}=t;o("selected a subscriber %s:%s",r.host,r.port);let a="subscriber";this.isSharded&&(a="ssubscriber"),this.subscriber=new n.default({port:r.port,host:r.host,username:r.username,password:r.password,enableReadyCheck:!0,connectionName:(0,s.getConnectionName)(a,r.connectionName),lazyConnect:!0,tls:r.tls,retryStrategy:null}),this.subscriber.on("error",i.noop),this.subscriber.on("moved",()=>{this.emitter.emit("forceRefresh")}),this.subscriber.once("end",this.onSubscriberEnd);let l={subscribe:[],psubscribe:[],ssubscribe:[]};if(e){let t=e.condition||e.prevCondition;t&&t.subscriber&&(l.subscribe=t.subscriber.channels("subscribe"),l.psubscribe=t.subscriber.channels("psubscribe"),l.ssubscribe=t.subscriber.channels("ssubscribe"))}if(l.subscribe.length||l.psubscribe.length||l.ssubscribe.length){let e=0;for(let t of["subscribe","psubscribe","ssubscribe"]){let r=l[t];if(0!=r.length)if(o("%s %d channels",t,r.length),"ssubscribe"===t)for(let s of r)e+=1,this.subscriber[t](s).then(()=>{--e||(this.lastActiveSubscriber=this.subscriber)}).catch(()=>{o("failed to ssubscribe to channel: %s",s)});else e+=1,this.subscriber[t](r).then(()=>{--e||(this.lastActiveSubscriber=this.subscriber)}).catch(()=>{o("failed to %s %d channels",t,r.length)})}}else this.lastActiveSubscriber=this.subscriber;for(let e of["message","messageBuffer"])this.subscriber.on(e,(t,r)=>{this.emitter.emit(e,t,r)});for(let e of["pmessage","pmessageBuffer"])this.subscriber.on(e,(t,r,s)=>{this.emitter.emit(e,t,r,s)});if(!0==this.isSharded)for(let e of["smessage","smessageBuffer"])this.subscriber.on(e,(t,r)=>{this.emitter.emit(e,t,r)})}}},27785,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});let s=e.r(13895),i=e.r(57375),n=e.r(43594),o=e.r(7498),a=(0,s.Debug)("cluster:subscriberGroup");class l{constructor(e,t){this.subscriberGroupEmitter=e,this.options=t,this.shardedSubscribers=new Map,this.clusterSlots=[],this.subscriberToSlotsIndex=new Map,this.channels=new Map,this.failedAttemptsByNode=new Map,this.isResetting=!1,this.pendingReset=null,this.handleSubscriberConnectFailed=(e,t)=>{let r=(this.failedAttemptsByNode.get(t)||0)+1;this.failedAttemptsByNode.set(t,r);let s=Math.min(r,l.MAX_RETRY_ATTEMPTS),i=Math.min(l.BASE_BACKOFF_MS*2**s,l.MAX_BACKOFF_MS),n=Math.floor(.5*i*(Math.random()-.5)),o=Math.max(0,i+n);a("Failed to connect subscriber for %s. Refreshing slots in %dms",t,o),this.subscriberGroupEmitter.emit("subscriberConnectFailed",{delay:o,error:e})},this.handleSubscriberConnectSucceeded=e=>{this.failedAttemptsByNode.delete(e)}}getResponsibleSubscriber(e){let t=this.clusterSlots[e][0],r=this.shardedSubscribers.get(t);return r&&"idle"===r.subscriberStatus&&r.start().then(()=>{this.handleSubscriberConnectSucceeded(r.getNodeKey())}).catch(e=>{this.handleSubscriberConnectFailed(e,r.getNodeKey())}),r}addChannels(e){let t=n(e[0]);for(let r of e)if(n(r)!==t)return -1;let r=this.channels.get(t);return r?this.channels.set(t,r.concat(e)):this.channels.set(t,e),Array.from(this.channels.values()).reduce((e,t)=>e+t.length,0)}removeChannels(e){let t=n(e[0]);for(let r of e)if(n(r)!==t)return -1;let r=this.channels.get(t);if(r){let s=r.filter(t=>!e.includes(t));this.channels.set(t,s)}return Array.from(this.channels.values()).reduce((e,t)=>e+t.length,0)}stop(){for(let e of this.shardedSubscribers.values())e.stop();this.pendingReset=null,this.shardedSubscribers.clear(),this.subscriberToSlotsIndex.clear()}start(){let e=[];for(let t of this.shardedSubscribers.values())this.shouldStartSubscriber(t)&&(e.push(t.start().then(()=>{this.handleSubscriberConnectSucceeded(t.getNodeKey())}).catch(e=>{this.handleSubscriberConnectFailed(e,t.getNodeKey())})),this.subscriberGroupEmitter.emit("+subscriber"));return Promise.all(e)}async reset(e,t){if(this.isResetting){this.pendingReset={slots:e,nodes:t};return}this.isResetting=!0;try{let r=this._refreshSlots(e),s=this.hasUnhealthySubscribers();if(!r&&!s)return void a("No topology change detected or failed subscribers. Skipping reset.");for(let[e,t]of this.shardedSubscribers){if(this.subscriberToSlotsIndex.has(e)&&t.isHealthy()){a("Skipping deleting subscriber for %s",e);continue}a("Removing subscriber for %s",e),t.stop(),this.shardedSubscribers.delete(e),this.subscriberGroupEmitter.emit("-subscriber")}let n=[];for(let[e,r]of this.subscriberToSlotsIndex){let r=this.shardedSubscribers.get(e);if(r&&r.isHealthy()){a("Skipping creating new subscriber for %s",e),!r.isStarted()&&this.shouldStartSubscriber(r)&&n.push(r.start().then(()=>{this.handleSubscriberConnectSucceeded(e)}).catch(t=>{this.handleSubscriberConnectFailed(t,e)}));continue}r&&!r.isHealthy()&&(a("Replacing subscriber for %s",e),r.stop(),this.shardedSubscribers.delete(e),this.subscriberGroupEmitter.emit("-subscriber")),a("Creating new subscriber for %s",e);let s=t.find(t=>(0,i.getNodeKey)(t.options)===e);if(!s){a("Failed to find node for key %s",e);continue}let l=new o.default(this.subscriberGroupEmitter,s.options,this.options.redisOptions);this.shardedSubscribers.set(e,l),this.shouldStartSubscriber(l)&&n.push(l.start().then(()=>{this.handleSubscriberConnectSucceeded(e)}).catch(t=>{this.handleSubscriberConnectFailed(t,e)})),this.subscriberGroupEmitter.emit("+subscriber")}await Promise.all(n),this._resubscribe(),this.subscriberGroupEmitter.emit("subscribersReady")}finally{if(this.isResetting=!1,this.pendingReset){let{slots:e,nodes:t}=this.pendingReset;this.pendingReset=null,await this.reset(e,t)}}}_refreshSlots(e){if(this._slotsAreEqual(e)&&this.subscriberToSlotsIndex.size>0)return a("Nothing to refresh because the new cluster map is equal to the previous one."),!1;a("Refreshing the slots of the subscriber group."),this.subscriberToSlotsIndex=new Map;for(let t=0;t<e.length;t++){let r=e[t][0];this.subscriberToSlotsIndex.has(r)||this.subscriberToSlotsIndex.set(r,[]),this.subscriberToSlotsIndex.get(r).push(Number(t))}return this.clusterSlots=JSON.parse(JSON.stringify(e)),!0}_resubscribe(){this.shardedSubscribers&&this.shardedSubscribers.forEach((e,t)=>{let r=this.subscriberToSlotsIndex.get(t);r&&r.forEach(r=>{let s=e.getInstance(),i=this.channels.get(r);if(i&&i.length>0){if(!s||"end"===s.status)return;"ready"===s.status?s.ssubscribe(...i).catch(e=>{a("Failed to ssubscribe on node %s: %s",t,e)}):s.once("ready",()=>{s.ssubscribe(...i).catch(e=>{a("Failed to ssubscribe on node %s: %s",t,e)})})}})})}_slotsAreEqual(e){return void 0!==this.clusterSlots&&JSON.stringify(this.clusterSlots)===JSON.stringify(e)}hasUnhealthySubscribers(){let e=Array.from(this.shardedSubscribers.values()).some(e=>!e.isHealthy()),t=Array.from(this.subscriberToSlotsIndex.keys()).some(e=>!this.shardedSubscribers.has(e));return e||t}shouldStartSubscriber(e){if(e.isStarted())return!1;if(!e.isLazyConnect())return!0;let t=this.subscriberToSlotsIndex.get(e.getNodeKey());return!!t&&t.some(e=>{let t=this.channels.get(e);return!!(t&&t.length>0)})}}r.default=l,l.MAX_RETRY_ATTEMPTS=10,l.MAX_BACKOFF_MS=2e3,l.BASE_BACKOFF_MS=100},15371,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});let s=e.r(27699),i=e.r(13895),n=e.r(57375),o=e.r(45375),a=(0,i.Debug)("cluster:connectionPool");class l extends s.EventEmitter{constructor(e,t=null){super(),this.redisOptions=e,this.clusterNodeRetryStrategy=t,this.nodes={all:{},master:{},slave:{}},this.specifiedOptions={}}getNodes(e="all"){let t=this.nodes[e];return Object.keys(t).map(e=>t[e])}getInstanceByKey(e){return this.nodes.all[e]}getSampleInstance(e){let t=Object.keys(this.nodes[e]),r=(0,i.sample)(t);return this.nodes[e][r]}addMasterNode(e){let t=(0,n.getNodeKey)(e.options),r=this.createRedisFromOptions(e,e.options.readOnly);return!e.options.readOnly&&(this.nodes.all[t]=r,this.nodes.master[t]=r,!0)}createRedisFromOptions(e,t){return new o.default((0,i.defaults)({retryStrategy:"function"==typeof this.clusterNodeRetryStrategy?this.clusterNodeRetryStrategy:null,enableOfflineQueue:!0,readOnly:t},e,this.redisOptions,{lazyConnect:!0}))}findOrCreate(e,t=!1){let r,s=(0,n.getNodeKey)(e);return t=!!t,this.specifiedOptions[s]?Object.assign(e,this.specifiedOptions[s]):this.specifiedOptions[s]=e,this.nodes.all[s]?(r=this.nodes.all[s]).options.readOnly!==t&&(r.options.readOnly=t,a("Change role of %s to %s",s,t?"slave":"master"),r[t?"readonly":"readwrite"]().catch(i.noop),t?(delete this.nodes.master[s],this.nodes.slave[s]=r):(delete this.nodes.slave[s],this.nodes.master[s]=r)):(a("Connecting to %s as %s",s,t?"slave":"master"),r=this.createRedisFromOptions(e,t),this.nodes.all[s]=r,this.nodes[t?"slave":"master"][s]=r,r.once("end",()=>{this.removeNode(s),this.emit("-node",r,s),Object.keys(this.nodes.all).length||this.emit("drain")}),this.emit("+node",r,s),r.on("error",e=>{this.emit("nodeError",e,s)})),r}reset(e){a("Reset with %O",e);let t={};e.forEach(e=>{let r=(0,n.getNodeKey)(e);e.readOnly&&t[r]||(t[r]=e)}),Object.keys(this.nodes.all).forEach(e=>{t[e]||(a("Disconnect %s because the node does not hold any slot",e),this.nodes.all[e].disconnect(),this.removeNode(e))}),Object.keys(t).forEach(e=>{let r=t[e];this.findOrCreate(r,r.readOnly)})}removeNode(e){let{nodes:t}=this;t.all[e]&&(a("Remove %s from the pool",e),delete t.all[e]),delete t.master[e],delete t.slave[e]}}r.default=l},28181,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});let s=e.r(13895),i=e.r(20265),n=(0,s.Debug)("delayqueue");r.default=class{constructor(){this.queues={},this.timeouts={}}push(e,t,r){let s=r.callback||process.nextTick;this.queues[e]||(this.queues[e]=new i),this.queues[e].push(t),this.timeouts[e]||(this.timeouts[e]=setTimeout(()=>{s(()=>{this.timeouts[e]=null,this.execute(e)})},r.timeout))}execute(e){let t=this.queues[e];if(!t)return;let{length:r}=t;if(r)for(n("send %d commands in %s queue",r,e),this.queues[e]=null;t.length>0;)t.shift()()}}},7498,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});let s=e.r(57375),i=e.r(13895),n=e.r(45375),o=(0,i.Debug)("cluster:subscriberGroup:shardedSubscriber"),a="idle",l="starting",c="connected",u="stopping",h="ended",d={[a]:[l,u,h],[l]:[c,u,h],[c]:[u,h],[u]:[h],[h]:[]};r.default=class{constructor(e,t,r){var o;for(let l of(this.emitter=e,this.status=a,this.instance=null,this.connectPromise=null,this.messageListeners=new Map,this.onEnd=()=>{this.updateStatus(h),this.emitter.emit("-node",this.instance,this.nodeKey)},this.onError=e=>{this.emitter.emit("nodeError",e,this.nodeKey)},this.onMoved=()=>{this.emitter.emit("moved")},this.instance=new n.default((0,i.defaults)({enableReadyCheck:!1,enableOfflineQueue:!0,connectionName:(0,s.getConnectionName)("ssubscriber",t.connectionName),retryStrategy:null,lazyConnect:!0},t,r)),this.lazyConnect=null==(o=null==r?void 0:r.lazyConnect)||o,this.nodeKey=(0,s.getNodeKey)(t),this.instance.on("end",this.onEnd),this.instance.on("error",this.onError),this.instance.on("moved",this.onMoved),["smessage","smessageBuffer"])){let e=(...e)=>{this.emitter.emit(l,...e)};this.messageListeners.set(l,e),this.instance.on(l,e)}}async start(){if(this.connectPromise)return this.connectPromise;if(this.status!==l&&this.status!==c){if(this.status===h||!this.instance)throw Error(`Sharded subscriber ${this.nodeKey} cannot be restarted once ended.`);this.updateStatus(l),this.connectPromise=this.instance.connect();try{await this.connectPromise,this.updateStatus(c)}catch(e){throw this.updateStatus(h),e}finally{this.connectPromise=null}}}stop(){this.updateStatus(u),this.instance&&(this.instance.disconnect(),this.instance.removeAllListeners(),this.messageListeners.clear(),this.instance=null),this.updateStatus(h),o("stopped %s",this.nodeKey)}isStarted(){return[c,l].includes(this.status)}get subscriberStatus(){return this.status}isHealthy(){return(this.status===a||this.status===c||this.status===l)&&null!==this.instance}getInstance(){return this.instance}getNodeKey(){return this.nodeKey}isLazyConnect(){return this.lazyConnect}updateStatus(e){if(this.status!==e){if(!d[this.status].includes(e))return void o("Invalid status transition for %s: %s -> %s",this.nodeKey,this.status,e);this.status=e}}}},58063,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});let s=e.r(87693),i=e.r(27699),n=e.r(87315),o=e.r(42351),a=e.r(59026),l=e.r(93474),c=e.r(45375),u=e.r(59875),h=e.r(60886),d=e.r(13895),f=e.r(74031),p=e.r(34207),y=e.r(84633),m=e.r(65575),g=e.r(15371),S=e.r(28181),b=e.r(57375),_=e.r(20265),k=e.r(27785),E=(0,d.Debug)("cluster"),v=new WeakSet;class w extends p.default{constructor(e,t={}){var r;if(super(),this.slots=[],this._groupsIds={},this._groupsBySlot=Array(16384),this.isCluster=!0,this.retryAttempts=0,this.delayQueue=new S.default,this.offlineQueue=new _,this.isRefreshing=!1,this._refreshSlotsCacheCallbacks=[],this._autoPipelines=new Map,this._runningAutoPipelines=new Set,this._readyDelayedCallbacks=[],this.connectionEpoch=0,i.EventEmitter.call(this),this.startupNodes=e,this.options=(0,d.defaults)({},t,y.DEFAULT_CLUSTER_OPTIONS,this.options),this.options.shardedSubscribers&&this.createShardedSubscriberGroup(),this.options.redisOptions&&this.options.redisOptions.keyPrefix&&!this.options.keyPrefix&&(this.options.keyPrefix=this.options.redisOptions.keyPrefix),"function"!=typeof this.options.scaleReads&&-1===["all","master","slave"].indexOf(this.options.scaleReads))throw Error('Invalid option scaleReads "'+this.options.scaleReads+'". Expected "all", "master", "slave" or a custom function');this.connectionPool=new g.default(null!=(r=this.options.redisOptions)?r:{},this.options.clusterNodeRetryStrategy),this.connectionPool.on("-node",(e,t)=>{this.emit("-node",e)}),this.connectionPool.on("+node",e=>{this.emit("+node",e)}),this.connectionPool.on("drain",()=>{this.setStatus("close")}),this.connectionPool.on("nodeError",(e,t)=>{this.emit("node error",e,t)}),this.subscriber=new m.default(this.connectionPool,this),this.options.scripts&&Object.entries(this.options.scripts).forEach(([e,t])=>{this.defineCommand(e,t)}),this.options.lazyConnect?this.setStatus("wait"):this.connect().catch(e=>{E("connecting failed: %s",e)})}connect(){return new Promise((e,t)=>{if("connecting"===this.status||"connect"===this.status||"ready"===this.status)return void t(Error("Redis is already connecting/connected"));let r=++this.connectionEpoch;this.setStatus("connecting"),this.resolveStartupNodeHostnames().then(s=>{let i;if(this.connectionEpoch!==r){E("discard connecting after resolving startup nodes because epoch not match: %d != %d",r,this.connectionEpoch),t(new n.RedisError("Connection is discarded because a new connection is made"));return}if("connecting"!==this.status){E("discard connecting after resolving startup nodes because the status changed to %s",this.status),t(new n.RedisError("Connection is aborted"));return}this.connectionPool.reset(s),this.options.shardedSubscribers&&this.shardedSubscribers.reset(this.slots,this.connectionPool.getNodes("all")).catch(e=>{E("Error while starting subscribers: %s",e)});let o=()=>{this.setStatus("ready"),this.retryAttempts=0,this.executeOfflineCommands(),this.resetNodesRefreshInterval(),e()},a=()=>{this.invokeReadyDelayedCallbacks(void 0),this.removeListener("close",i),this.manuallyClosing=!1,this.setStatus("connect"),this.options.enableReadyCheck?this.readyCheck((e,t)=>{e||t?(E("Ready check failed (%s). Reconnecting...",e||t),"connect"===this.status&&this.disconnect(!0)):o()}):o()};i=()=>{let e=Error("None of startup nodes is available");this.removeListener("refresh",a),this.invokeReadyDelayedCallbacks(e),t(e)},this.once("refresh",a),this.once("close",i),this.once("close",this.handleCloseEvent.bind(this)),this.refreshSlotsCache(e=>{e&&e.message===l.default.defaultMessage&&(c.default.prototype.silentEmit.call(this,"error",e),this.connectionPool.reset([]))}),this.subscriber.start(),this.options.shardedSubscribers&&this.shardedSubscribers.start().catch(e=>{E("Error while starting subscribers: %s",e)})}).catch(e=>{this.setStatus("close"),this.handleCloseEvent(e),this.invokeReadyDelayedCallbacks(e),t(e)})})}disconnect(e=!1){let t=this.status;this.setStatus("disconnecting"),e||(this.manuallyClosing=!0),this.reconnectTimeout&&!e&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null,E("Canceled reconnecting attempts")),this.clearNodesRefreshInterval(),this.subscriber.stop(),this.options.shardedSubscribers&&this.shardedSubscribers.stop(),"wait"===t?(this.setStatus("close"),this.handleCloseEvent()):this.connectionPool.reset([])}quit(e){let t=this.status;if(this.setStatus("disconnecting"),this.manuallyClosing=!0,this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null),this.clearNodesRefreshInterval(),this.subscriber.stop(),this.options.shardedSubscribers&&this.shardedSubscribers.stop(),"wait"===t){let t=(0,o.default)(Promise.resolve("OK"),e);return setImmediate((function(){this.setStatus("close"),this.handleCloseEvent()}).bind(this)),t}return(0,o.default)(Promise.all(this.nodes().map(e=>e.quit().catch(e=>{if(e.message===d.CONNECTION_CLOSED_ERROR_MSG)return"OK";throw e}))).then(()=>"OK"),e)}duplicate(e=[],t={}){return new w(e.length>0?e:this.startupNodes.slice(0),Object.assign({},this.options,t))}nodes(e="all"){if("all"!==e&&"master"!==e&&"slave"!==e)throw Error('Invalid role "'+e+'". Expected "all", "master" or "slave"');return this.connectionPool.getNodes(e)}delayUntilReady(e){this._readyDelayedCallbacks.push(e)}get autoPipelineQueueSize(){let e=0;for(let t of this._autoPipelines.values())e+=t.length;return e}refreshSlotsCache(e){if(e&&this._refreshSlotsCacheCallbacks.push(e),this.isRefreshing)return;this.isRefreshing=!0;let t=this,r=e=>{for(let t of(this.isRefreshing=!1,this._refreshSlotsCacheCallbacks))t(e);this._refreshSlotsCacheCallbacks=[]},s=(0,d.shuffle)(this.connectionPool.getNodes()),i=null;!function e(n){if(n===s.length)return r(new l.default(l.default.defaultMessage,i));let o=s[n],a=`${o.options.host}:${o.options.port}`;E("getting slot cache from %s",a),t.getInfoFromNode(o,function(s){switch(t.status){case"close":case"end":return r(Error("Cluster is disconnected."));case"disconnecting":return r(Error("Cluster is disconnecting."))}s?(t.emit("node error",s,a),i=s,e(n+1)):(t.emit("refresh"),r())})}(0)}sendCommand(e,t,r){if("wait"===this.status&&this.connect().catch(d.noop),"end"===this.status)return e.reject(Error(d.CONNECTION_CLOSED_ERROR_MSG)),e.promise;let i=this.options.scaleReads;"master"!==i&&(e.isReadOnly||(0,s.exists)(e.name)&&(0,s.hasFlag)(e.name,"readonly")||(i="master"));let o=r?r.slot:e.getSlot(),l={},c=this;if(!r&&!v.has(e)){v.add(e);let t=e.reject;e.reject=function(r){let s=u.bind(null,!0);c.handleError(r,l,{moved:function(t,r){E("command %s is moved to %s",e.name,r),o=Number(t),c.slots[t]?c.slots[t][0]=r:c.slots[t]=[r],c._groupsBySlot[t]=c._groupsIds[c.slots[t].join(";")],c.connectionPool.findOrCreate(c.natMapper(r)),u(),E("refreshing slot caches... (triggered by MOVED error)"),c.refreshSlotsCache()},ask:function(t,r){E("command %s is required to ask %s:%s",e.name,r);let s=c.natMapper(r);c.connectionPool.findOrCreate(s),u(!1,`${s.host}:${s.port}`)},tryagain:s,clusterDown:s,connectionClosed:s,maxRedirections:function(r){t.call(e,r)},defaults:function(){t.call(e,r)}})}}function u(s,l){let u;if("end"===c.status)return void e.reject(new n.AbortError("Cluster is ended."));if("ready"===c.status||"cluster"===e.name){if(r&&r.redis)u=r.redis;else if(a.default.checkFlag("ENTER_SUBSCRIBER_MODE",e.name)||a.default.checkFlag("EXIT_SUBSCRIBER_MODE",e.name)){if(c.options.shardedSubscribers&&("ssubscribe"==e.name||"sunsubscribe"==e.name)){let t=c.shardedSubscribers.getResponsibleSubscriber(o);if(!t)return void e.reject(new n.AbortError(`No sharded subscriber for slot: ${o}`));let r=-1;"ssubscribe"==e.name&&(r=c.shardedSubscribers.addChannels(e.getKeys())),"sunsubscribe"==e.name&&(r=c.shardedSubscribers.removeChannels(e.getKeys())),-1!==r?u=t.getInstance():e.reject(new n.AbortError("Possible CROSSSLOT error: All channels must hash to the same slot"))}else u=c.subscriber.getInstance();if(!u)return void e.reject(new n.AbortError("No subscriber for the cluster"))}else{if(!s){if("number"==typeof o&&c.slots[o]){let t=c.slots[o];if("function"==typeof i){let r=t.map(function(e){return c.connectionPool.getInstanceByKey(e)});Array.isArray(u=i(r,e))&&(u=(0,d.sample)(u)),u||(u=r[0])}else{let e;e="all"===i?(0,d.sample)(t):"slave"===i&&t.length>1?(0,d.sample)(t,1):t[0],u=c.connectionPool.getInstanceByKey(e)}}l&&(u=c.connectionPool.getInstanceByKey(l)).asking()}if(u||(u=("function"==typeof i?null:c.connectionPool.getSampleInstance(i))||c.connectionPool.getSampleInstance("all")),u&&!c.options.enableOfflineQueue&&"ready"!==u.status&&"wait"!==u.status)return void e.reject(Error(d.CONNECTION_CLOSED_ERROR_MSG))}r&&!r.redis&&(r.redis=u)}!u&&c.options.enableOfflineQueue?c.offlineQueue.push({command:e,stream:t,node:r}):u?u.sendCommand(e,t):e.reject(Error("Cluster isn't ready and enableOfflineQueue options is false"))}return u(),e.promise}sscanStream(e,t){return this.createScanStream("sscan",{key:e,options:t})}sscanBufferStream(e,t){return this.createScanStream("sscanBuffer",{key:e,options:t})}hscanStream(e,t){return this.createScanStream("hscan",{key:e,options:t})}hscanBufferStream(e,t){return this.createScanStream("hscanBuffer",{key:e,options:t})}zscanStream(e,t){return this.createScanStream("zscan",{key:e,options:t})}zscanBufferStream(e,t){return this.createScanStream("zscanBuffer",{key:e,options:t})}handleError(e,t,r){if(void 0===t.value?t.value=this.options.maxRedirections:t.value-=1,t.value<=0)return void r.maxRedirections(Error("Too many Cluster redirections. Last error: "+e));let s=e.message.split(" ");if("MOVED"===s[0]){let e=this.options.retryDelayOnMoved;e&&"number"==typeof e?this.delayQueue.push("moved",r.moved.bind(null,s[1],s[2]),{timeout:e}):r.moved(s[1],s[2])}else"ASK"===s[0]?r.ask(s[1],s[2]):"TRYAGAIN"===s[0]?this.delayQueue.push("tryagain",r.tryagain,{timeout:this.options.retryDelayOnTryAgain}):"CLUSTERDOWN"===s[0]&&this.options.retryDelayOnClusterDown>0?this.delayQueue.push("clusterdown",r.connectionClosed,{timeout:this.options.retryDelayOnClusterDown,callback:this.refreshSlotsCache.bind(this)}):e.message===d.CONNECTION_CLOSED_ERROR_MSG&&this.options.retryDelayOnFailover>0&&"ready"===this.status?this.delayQueue.push("failover",r.connectionClosed,{timeout:this.options.retryDelayOnFailover,callback:this.refreshSlotsCache.bind(this)}):r.defaults()}resetOfflineQueue(){this.offlineQueue=new _}clearNodesRefreshInterval(){this.slotsTimer&&(clearTimeout(this.slotsTimer),this.slotsTimer=null)}resetNodesRefreshInterval(){if(this.slotsTimer||!this.options.slotsRefreshInterval)return;let e=()=>{this.slotsTimer=setTimeout(()=>{E('refreshing slot caches... (triggered by "slotsRefreshInterval" option)'),this.refreshSlotsCache(()=>{e()})},this.options.slotsRefreshInterval)};e()}setStatus(e){E("status: %s -> %s",this.status||"[empty]",e),this.status=e,process.nextTick(()=>{this.emit(e)})}handleCloseEvent(e){var t;let r;e&&E("closed because %s",e),this.manuallyClosing||"function"!=typeof this.options.clusterRetryStrategy||(r=this.options.clusterRetryStrategy.call(this,++this.retryAttempts,e)),"number"==typeof r?(this.setStatus("reconnecting"),this.reconnectTimeout=setTimeout(()=>{this.reconnectTimeout=null,E("Cluster is disconnected. Retrying after %dms",r),this.connect().catch(function(e){E("Got error %s when reconnecting. Ignoring...",e)})},r)):(this.options.shardedSubscribers&&(null==(t=this.subscriberGroupEmitter)||t.removeAllListeners()),this.setStatus("end"),this.flushQueue(Error("None of startup nodes is available")))}flushQueue(e){let t;for(;t=this.offlineQueue.shift();)t.command.reject(e)}executeOfflineCommands(){if(this.offlineQueue.length){let e;E("send %d commands in offline queue",this.offlineQueue.length);let t=this.offlineQueue;for(this.resetOfflineQueue();e=t.shift();)this.sendCommand(e.command,e.stream,e.node)}}natMapper(e){let t="string"==typeof e?e:`${e.host}:${e.port}`,r=null;return(this.options.natMap&&"function"==typeof this.options.natMap?r=this.options.natMap(t):this.options.natMap&&"object"==typeof this.options.natMap&&(r=this.options.natMap[t]),r)?(E("NAT mapping %s -> %O",t,r),Object.assign({},r)):"string"==typeof e?(0,b.nodeKeyToRedisOptions)(e):e}getInfoFromNode(e,t){if(!e)return t(Error("Node is disconnected"));let r=e.duplicate({enableOfflineQueue:!0,enableReadyCheck:!1,retryStrategy:null,connectionName:(0,b.getConnectionName)("refresher",this.options.redisOptions&&this.options.redisOptions.connectionName)});r.on("error",d.noop),r.cluster("SLOTS",(0,d.timeout)((e,s)=>{if(r.disconnect(),e)return E("error encountered running CLUSTER.SLOTS: %s",e),t(e);if("disconnecting"===this.status||"close"===this.status||"end"===this.status){E("ignore CLUSTER.SLOTS results (count: %d) since cluster status is %s",s.length,this.status),t();return}let i=[];E("cluster slots result count: %d",s.length);for(let e=0;e<s.length;++e){let t=s[e],r=t[0],n=t[1],o=[];for(let e=2;e<t.length;e++){if(!t[e][0])continue;let r=this.natMapper({host:t[e][0],port:t[e][1]});r.readOnly=2!==e,i.push(r),o.push(r.host+":"+r.port)}E("cluster slots result [%d]: slots %d~%d served by %s",e,r,n,o);for(let e=r;e<=n;e++)this.slots[e]=o}this._groupsIds=Object.create(null);let n=0;for(let e=0;e<16384;e++){let t=(this.slots[e]||[]).join(";");if(!t.length){this._groupsBySlot[e]=void 0;continue}this._groupsIds[t]||(this._groupsIds[t]=++n),this._groupsBySlot[e]=this._groupsIds[t]}this.connectionPool.reset(i),this.options.shardedSubscribers&&this.shardedSubscribers.reset(this.slots,this.connectionPool.getNodes("all")).catch(e=>{E("Error while starting subscribers: %s",e)}),t()},this.options.slotsRefreshTimeout))}invokeReadyDelayedCallbacks(e){for(let t of this._readyDelayedCallbacks)process.nextTick(t,e);this._readyDelayedCallbacks=[]}readyCheck(e){this.cluster("INFO",(t,r)=>{let s;if(t)return e(t);if("string"!=typeof r)return e();let i=r.split("\r\n");for(let e=0;e<i.length;++e){let t=i[e].split(":");if("cluster_state"===t[0]){s=t[1];break}}"fail"===s?(E("cluster state not ok (%s)",s),e(null,s)):e()})}resolveSrv(e){return new Promise((t,r)=>{this.options.resolveSrv(e,(e,s)=>{if(e)return r(e);let i=this,n=(0,b.groupSrvRecords)(s),o=Object.keys(n).sort((e,t)=>parseInt(e)-parseInt(t));!function e(s){if(!o.length)return r(s);let a=n[o[0]],l=(0,b.weightSrvRecords)(a);a.records.length||o.shift(),i.dnsLookup(l.name).then(e=>t({host:e,port:l.port}),e)}()})})}dnsLookup(e){return new Promise((t,r)=>{this.options.dnsLookup(e,(s,i)=>{s?(E("failed to resolve hostname %s to IP: %s",e,s.message),r(s)):(E("resolved hostname %s to IP %s",e,i),t(i))})})}async resolveStartupNodeHostnames(){if(!Array.isArray(this.startupNodes)||0===this.startupNodes.length)throw Error("`startupNodes` should contain at least one node.");let e=(0,b.normalizeNodeOptions)(this.startupNodes),t=(0,b.getUniqueHostnamesFromOptions)(e);if(0===t.length)return e;let r=await Promise.all(t.map((this.options.useSRVRecords?this.resolveSrv:this.dnsLookup).bind(this))),s=(0,d.zipMap)(t,r);return e.map(e=>{let t=s.get(e.host);return t?this.options.useSRVRecords?Object.assign({},e,t):Object.assign({},e,{host:t}):e})}createScanStream(e,{key:t,options:r={}}){return new u.default({objectMode:!0,key:t,redis:this,command:e,...r})}createShardedSubscriberGroup(){this.subscriberGroupEmitter=new i.EventEmitter,this.shardedSubscribers=new k.default(this.subscriberGroupEmitter,this.options);let e=e=>{e instanceof l.default&&this.disconnect(!0)};for(let t of(this.subscriberGroupEmitter.on("-node",(t,r)=>{this.emit("-node",t,r),this.refreshSlotsCache(e)}),this.subscriberGroupEmitter.on("subscriberConnectFailed",({delay:t,error:r})=>{this.emit("error",r),setTimeout(()=>{this.refreshSlotsCache(e)},t)}),this.subscriberGroupEmitter.on("moved",()=>{this.refreshSlotsCache(e)}),this.subscriberGroupEmitter.on("-subscriber",()=>{this.emit("-subscriber")}),this.subscriberGroupEmitter.on("+subscriber",()=>{this.emit("+subscriber")}),this.subscriberGroupEmitter.on("nodeError",(e,t)=>{this.emit("nodeError",e,t)}),this.subscriberGroupEmitter.on("subscribersReady",()=>{this.emit("subscribersReady")}),["smessage","smessageBuffer"]))this.subscriberGroupEmitter.on(t,(e,r,s)=>{this.emit(t,e,r,s)})}}(0,f.default)(w,i.EventEmitter),(0,h.addTransactionSupport)(w.prototype),r.default=w},57375,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.getConnectionName=r.weightSrvRecords=r.groupSrvRecords=r.getUniqueHostnamesFromOptions=r.normalizeNodeOptions=r.nodeKeyToRedisOptions=r.getNodeKey=void 0;let s=e.r(13895),i=e.r(4446);r.getNodeKey=function(e){return e.port=e.port||6379,e.host=e.host||"127.0.0.1",e.host+":"+e.port},r.nodeKeyToRedisOptions=function(e){let t=e.lastIndexOf(":");if(-1===t)throw Error(`Invalid node key ${e}`);return{host:e.slice(0,t),port:Number(e.slice(t+1))}},r.normalizeNodeOptions=function(e){return e.map(e=>{let t={};if("object"==typeof e)Object.assign(t,e);else if("string"==typeof e)Object.assign(t,(0,s.parseURL)(e));else if("number"==typeof e)t.port=e;else throw Error("Invalid argument "+e);return"string"==typeof t.port&&(t.port=parseInt(t.port,10)),delete t.db,t.port||(t.port=6379),t.host||(t.host="127.0.0.1"),(0,s.resolveTLSProfile)(t)})},r.getUniqueHostnamesFromOptions=function(e){let t={};return e.forEach(e=>{t[e.host]=!0}),Object.keys(t).filter(e=>!(0,i.isIP)(e))},r.groupSrvRecords=function(e){let t={};for(let r of e)t.hasOwnProperty(r.priority)?(t[r.priority].totalWeight+=r.weight,t[r.priority].records.push(r)):t[r.priority]={totalWeight:r.weight,records:[r]};return t},r.weightSrvRecords=function(e){if(1===e.records.length)return e.totalWeight=0,e.records.shift();let t=Math.floor(Math.random()*(e.totalWeight+e.records.length)),r=0;for(let[s,i]of e.records.entries())if((r+=1+i.weight)>t)return e.totalWeight-=i.weight,e.records.splice(s,1),i},r.getConnectionName=function(e,t){let r=`ioredis-cluster(${e})`;return t?`${r}:${t}`:r}},12251,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});let s=(0,e.r(13895).Debug)("AbstractConnector");r.default=class{constructor(e){this.connecting=!1,this.disconnectTimeout=e}check(e){return!0}disconnect(){if(this.connecting=!1,this.stream){let e=this.stream,t=setTimeout(()=>{s("stream %s:%s still open, destroying it",e.remoteAddress,e.remotePort),e.destroy()},this.disconnectTimeout);e.on("close",()=>clearTimeout(t)),e.end()}}}},6057,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.FailoverDetector=void 0;let s=(0,e.r(13895).Debug)("FailoverDetector"),i="+switch-master";r.FailoverDetector=class{constructor(e,t){this.isDisconnected=!1,this.connector=e,this.sentinels=t}cleanup(){for(let e of(this.isDisconnected=!0,this.sentinels))e.client.disconnect()}async subscribe(){s("Starting FailoverDetector");let e=[];for(let t of this.sentinels){let r=t.client.subscribe(i).catch(e=>{s("Failed to subscribe to failover messages on sentinel %s:%s (%s)",t.address.host||"127.0.0.1",t.address.port||26739,e.message)});e.push(r),t.client.on("message",e=>{this.isDisconnected||e!==i||this.disconnect()})}await Promise.all(e)}disconnect(){this.isDisconnected=!0,s("Failover detected, disconnecting"),this.connector.disconnect()}}},99378,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.default=class{constructor(e){this.cursor=0,this.sentinels=e.slice(0)}next(){let e=this.cursor>=this.sentinels.length;return{done:e,value:e?void 0:this.sentinels[this.cursor++]}}reset(e){e&&this.sentinels.length>1&&1!==this.cursor&&this.sentinels.unshift(...this.sentinels.splice(this.cursor-1)),this.cursor=0}add(e){for(let r=0;r<this.sentinels.length;r++){var t;if(t=this.sentinels[r],(e.host||"127.0.0.1")===(t.host||"127.0.0.1")&&(e.port||26379)===(t.port||26379))return!1}return this.sentinels.push(e),!0}toString(){return`${JSON.stringify(this.sentinels)} @${this.cursor}`}}},3107,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.SentinelIterator=void 0;let s=e.r(4446),i=e.r(13895),n=e.r(55004),o=e.r(99378);r.SentinelIterator=o.default;let a=e.r(12251),l=e.r(45375),c=e.r(6057),u=(0,i.Debug)("SentinelConnector");class h extends a.default{constructor(e){if(super(e.disconnectTimeout),this.options=e,this.emitter=null,this.failoverDetector=null,!this.options.sentinels.length)throw Error("Requires at least one sentinel to connect to.");if(!this.options.name)throw Error("Requires the name of master.");this.sentinelIterator=new o.default(this.options.sentinels)}check(e){let t=!e.role||this.options.role===e.role;return t||(u("role invalid, expected %s, but got %s",this.options.role,e.role),this.sentinelIterator.next(),this.sentinelIterator.next(),this.sentinelIterator.reset(!0)),t}disconnect(){super.disconnect(),this.failoverDetector&&this.failoverDetector.cleanup()}connect(e){let t;this.connecting=!0,this.retryAttempts=0;let r=async()=>{let o=this.sentinelIterator.next();if(o.done){this.sentinelIterator.reset(!1);let s="function"==typeof this.options.sentinelRetryStrategy?this.options.sentinelRetryStrategy(++this.retryAttempts):null,i="number"!=typeof s?"All sentinels are unreachable and retry is disabled.":`All sentinels are unreachable. Retrying from scratch after ${s}ms.`;t&&(i+=` Last error: ${t.message}`),u(i);let n=Error(i);if("number"==typeof s)return e("error",n),await new Promise(e=>setTimeout(e,s)),r();throw n}let a=null,l=null;try{a=await this.resolve(o.value)}catch(e){l=e}if(!this.connecting)throw Error(i.CONNECTION_CLOSED_ERROR_MSG);let c=o.value.host+":"+o.value.port;if(a)return u("resolved: %s:%s from sentinel %s",a.host,a.port,c),this.options.enableTLSForSentinelMode&&this.options.tls?(Object.assign(a,this.options.tls),this.stream=(0,n.connect)(a),this.stream.once("secureConnect",this.initFailoverDetector.bind(this))):(this.stream=(0,s.createConnection)(a),this.stream.once("connect",this.initFailoverDetector.bind(this))),this.stream.once("error",e=>{this.firstError=e}),this.stream;{let s=l?"failed to connect to sentinel "+c+" because "+l.message:"connected to sentinel "+c+" successfully, but got an invalid reply: "+a;return u(s),e("sentinelError",Error(s)),l&&(t=l),r()}};return r()}async updateSentinels(e){if(!this.options.updateSentinels)return;let t=await e.sentinel("sentinels",this.options.name);Array.isArray(t)&&(t.map(i.packObject).forEach(e=>{if(-1===(e.flags?e.flags.split(","):[]).indexOf("disconnected")&&e.ip&&e.port){let t=this.sentinelNatResolve(d(e));this.sentinelIterator.add(t)&&u("adding sentinel %s:%s",t.host,t.port)}}),u("Updated internal sentinels: %s",this.sentinelIterator))}async resolveMaster(e){let t=await e.sentinel("get-master-addr-by-name",this.options.name);return await this.updateSentinels(e),this.sentinelNatResolve(Array.isArray(t)?{host:t[0],port:Number(t[1])}:null)}async resolveSlave(e){let t=await e.sentinel("slaves",this.options.name);if(!Array.isArray(t))return null;let r=t.map(i.packObject).filter(e=>e.flags&&!e.flags.match(/(disconnected|s_down|o_down)/));return this.sentinelNatResolve(function(e,t){let r;if(0===e.length)return null;if("function"==typeof t)r=t(e);else if(null!==t&&"object"==typeof t){let s=Array.isArray(t)?t:[t];s.sort((e,t)=>(e.prio||(e.prio=1),t.prio||(t.prio=1),e.prio<t.prio)?-1:+(e.prio>t.prio));for(let t=0;t<s.length;t++){for(let i=0;i<e.length;i++){let n=e[i];if(n.ip===s[t].ip&&n.port===s[t].port){r=n;break}}if(r)break}}return r||(r=(0,i.sample)(e)),d(r)}(r,this.options.preferredSlaves))}sentinelNatResolve(e){if(!e||!this.options.natMap)return e;let t=`${e.host}:${e.port}`,r=e;return"function"==typeof this.options.natMap?r=this.options.natMap(t)||e:"object"==typeof this.options.natMap&&(r=this.options.natMap[t]||e),r}connectToSentinel(e,t){return new l.default({port:e.port||26379,host:e.host,username:this.options.sentinelUsername||null,password:this.options.sentinelPassword||null,family:e.family||("path"in this.options&&this.options.path?void 0:this.options.family),tls:this.options.sentinelTLS,retryStrategy:null,enableReadyCheck:!1,connectTimeout:this.options.connectTimeout,commandTimeout:this.options.sentinelCommandTimeout,...t})}async resolve(e){let t=this.connectToSentinel(e);t.on("error",f);try{if("slave"===this.options.role)return await this.resolveSlave(t);return await this.resolveMaster(t)}finally{t.disconnect()}}async initFailoverDetector(){var e;if(!this.options.failoverDetector)return;this.sentinelIterator.reset(!0);let t=[];for(;t.length<this.options.sentinelMaxConnections;){let{done:e,value:r}=this.sentinelIterator.next();if(e)break;let s=this.connectToSentinel(r,{lazyConnect:!0,retryStrategy:this.options.sentinelReconnectStrategy});s.on("reconnecting",()=>{var e;null==(e=this.emitter)||e.emit("sentinelReconnecting")}),t.push({address:r,client:s})}this.sentinelIterator.reset(!1),this.failoverDetector&&this.failoverDetector.cleanup(),this.failoverDetector=new c.FailoverDetector(this,t),await this.failoverDetector.subscribe(),null==(e=this.emitter)||e.emit("failoverSubscribed")}}function d(e){return{host:e.ip,port:Number(e.port)}}function f(){}r.default=h},14069,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});let s=e.r(4446),i=e.r(55004),n=e.r(13895),o=e.r(12251);class a extends o.default{constructor(e){super(e.disconnectTimeout),this.options=e}connect(e){let t,{options:r}=this;return this.connecting=!0,"path"in r&&r.path?t={path:r.path}:(t={},"port"in r&&null!=r.port&&(t.port=r.port),"host"in r&&null!=r.host&&(t.host=r.host),"family"in r&&null!=r.family&&(t.family=r.family)),r.tls&&Object.assign(t,r.tls),new Promise((e,o)=>{process.nextTick(()=>{if(!this.connecting)return void o(Error(n.CONNECTION_CLOSED_ERROR_MSG));try{r.tls?this.stream=(0,i.connect)(t):this.stream=(0,s.createConnection)(t)}catch(e){o(e);return}this.stream.once("error",e=>{this.firstError=e}),e(this.stream)})})}}r.default=a},25752,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.SentinelConnector=r.StandaloneConnector=void 0,r.StandaloneConnector=e.r(14069).default,r.SentinelConnector=e.r(3107).default},66275,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});let s=`-----BEGIN CERTIFICATE-----
|
|
6
6
|
MIIDTzCCAjegAwIBAgIJAKSVpiDswLcwMA0GCSqGSIb3DQEBBQUAMD4xFjAUBgNV
|
|
7
7
|
BAoMDUdhcmFudGlhIERhdGExJDAiBgNVBAMMG1NTTCBDZXJ0aWZpY2F0aW9uIEF1
|
|
8
8
|
dGhvcml0eTAeFw0xMzEwMDExMjE0NTVaFw0yMzA5MjkxMjE0NTVaMD4xFjAUBgNV
|
|
@@ -140,7 +140,7 @@ jjM5RcOO5LlXbKr8EpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw8lo/s7awlOqzJCK
|
|
|
140
140
|
mcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18YIvDQVETI53O9zJrlAGomecs
|
|
141
141
|
Mx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7rkpeDMdmztcpH
|
|
142
142
|
WD9f
|
|
143
|
-
-----END CERTIFICATE-----`;r.default={RedisCloudFixed:{ca:s},RedisCloudFlexible:{ca:s}}},93474,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});let s=e.r(87315);class i extends s.RedisError{constructor(e,t){super(e),this.lastNodeError=t,Error.captureStackTrace(this,this.constructor)}get name(){return this.constructor.name}}r.default=i,i.defaultMessage="Failed to refresh slots cache."},91217,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});let s=e.r(87315);class i extends s.AbortError{constructor(e){super(`Reached the max retries per request limit (which is ${e}). Refer to "maxRetriesPerRequest" option for details.`),Error.captureStackTrace(this,this.constructor)}get name(){return this.constructor.name}}r.default=i},59788,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.MaxRetriesPerRequestError=void 0,r.MaxRetriesPerRequestError=e.r(91217).default},6401,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.print=r.ReplyError=r.SentinelIterator=r.SentinelConnector=r.AbstractConnector=r.Pipeline=r.ScanStream=r.Command=r.Cluster=r.Redis=r.default=void 0,r=t.exports=e.r(45375).default;var s=e.r(45375);Object.defineProperty(r,"default",{enumerable:!0,get:function(){return s.default}});var i=e.r(45375);Object.defineProperty(r,"Redis",{enumerable:!0,get:function(){return i.default}});var o=e.r(58063);Object.defineProperty(r,"Cluster",{enumerable:!0,get:function(){return o.default}});var n=e.r(59026);Object.defineProperty(r,"Command",{enumerable:!0,get:function(){return n.default}});var a=e.r(59875);Object.defineProperty(r,"ScanStream",{enumerable:!0,get:function(){return a.default}});var l=e.r(60520);Object.defineProperty(r,"Pipeline",{enumerable:!0,get:function(){return l.default}});var c=e.r(12251);Object.defineProperty(r,"AbstractConnector",{enumerable:!0,get:function(){return c.default}});var u=e.r(3107);Object.defineProperty(r,"SentinelConnector",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(r,"SentinelIterator",{enumerable:!0,get:function(){return u.SentinelIterator}}),r.ReplyError=e.r(87315).ReplyError,Object.defineProperty(r,"Promise",{get:()=>(console.warn("ioredis v5 does not support plugging third-party Promise library anymore. Native Promise will be used."),Promise),set(e){console.warn("ioredis v5 does not support plugging third-party Promise library anymore. Native Promise will be used.")}}),r.print=function(e,t){e?console.log("Error: "+e):console.log("Reply: "+t)}},80494,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_REDIS_OPTIONS=void 0,r.DEFAULT_REDIS_OPTIONS={port:6379,host:"localhost",family:0,connectTimeout:1e4,disconnectTimeout:2e3,retryStrategy:function(e){return Math.min(50*e,2e3)},keepAlive:0,noDelay:!0,connectionName:null,disableClientInfo:!1,clientInfoTag:void 0,sentinels:null,name:null,role:"master",sentinelRetryStrategy:function(e){return Math.min(10*e,1e3)},sentinelReconnectStrategy:function(){return 6e4},natMap:null,enableTLSForSentinelMode:!1,updateSentinels:!0,failoverDetector:!1,username:null,password:null,db:0,enableOfflineQueue:!0,enableReadyCheck:!0,autoResubscribe:!0,autoResendUnfulfilledCommands:!0,lazyConnect:!1,keyPrefix:"",reconnectOnError:null,readOnly:!1,stringNumbers:!1,maxRetriesPerRequest:20,maxLoadingRetryTime:1e4,enableAutoPipelining:!1,autoPipeliningIgnoredCommands:[],sentinelMaxConnections:10,blockingTimeoutGrace:100}},3046,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.readyHandler=r.errorHandler=r.closeHandler=r.connectHandler=void 0;let s=e.r(87315),i=e.r(59026),o=e.r(59788),n=e.r(13895),a=e.r(92683),l=(0,n.Debug)("connection");function c(e){let t=new s.AbortError("Command aborted due to connection close");return t.command={name:e.name,args:e.args},t}r.connectHandler=function(e){return function(){var t;e.setStatus("connect"),e.resetCommandQueue();let s=!1,{connectionEpoch:i}=e;e.condition.auth&&e.auth(e.condition.auth,function(t){i===e.connectionEpoch&&t&&(-1!==t.message.indexOf("no password is set")?console.warn("[WARN] Redis server does not require a password, but a password was supplied."):-1!==t.message.indexOf("without any password configured for the default user")?console.warn("[WARN] This Redis server's `default` user does not require a password, but a password was supplied"):-1!==t.message.indexOf("wrong number of arguments for 'auth' command")?console.warn("[ERROR] The server returned \"wrong number of arguments for 'auth' command\". You are probably passing both username and password to Redis version 5 or below. You should only pass the 'password' option for Redis version 5 and under."):(s=!0,e.recoverFromFatalError(t,t)))}),e.condition.select&&e.select(e.condition.select).catch(t=>{e.silentEmit("error",t)}),new a.default(e,{stringNumbers:e.options.stringNumbers});let o=[];e.options.connectionName&&(l("set the connection name [%s]",e.options.connectionName),o.push(e.client("setname",e.options.connectionName).catch(n.noop))),e.options.disableClientInfo||(l("set the client info"),o.push((0,n.getPackageMeta)().then(t=>e.client("SETINFO","LIB-VER",t.version).catch(n.noop)).catch(n.noop)),o.push(e.client("SETINFO","LIB-NAME",(null==(t=e.options)?void 0:t.clientInfoTag)?`ioredis(${e.options.clientInfoTag})`:"ioredis").catch(n.noop))),Promise.all(o).catch(n.noop).finally(()=>{e.options.enableReadyCheck||r.readyHandler(e)(),e.options.enableReadyCheck&&e._readyCheck(function(t,o){i===e.connectionEpoch&&(t?s||e.recoverFromFatalError(Error("Ready check failed: "+t.message),t):e.connector.check(o)?r.readyHandler(e)():e.disconnect(!0))})})}},r.closeHandler=function(e){return function(){let r=e.status;if(e.setStatus("close"),e.commandQueue.length&&function(e){var t;let r=0;for(let s=0;s<e.length;){let i=null==(t=e.peekAt(s))?void 0:t.command,o=i.pipelineIndex;if((void 0===o||0===o)&&(r=0),void 0!==o&&o!==r++){e.remove(s,1),i.reject(c(i));continue}s++}}(e.commandQueue),e.offlineQueue.length&&function(e){var t;for(let r=0;r<e.length;){let s=null==(t=e.peekAt(r))?void 0:t.command;if("multi"===s.name)break;if("exec"===s.name){e.remove(r,1),s.reject(c(s));break}s.inTransaction?(e.remove(r,1),s.reject(c(s))):r++}}(e.offlineQueue),"ready"===r&&(e.prevCondition||(e.prevCondition=e.condition),e.commandQueue.length&&(e.prevCommandQueue=e.commandQueue)),e.manuallyClosing)return e.manuallyClosing=!1,l("skip reconnecting since the connection is manually closed."),t();if("function"!=typeof e.options.retryStrategy)return l("skip reconnecting because `retryStrategy` is not a function"),t();let s=e.options.retryStrategy(++e.retryAttempts);if("number"!=typeof s)return l("skip reconnecting because `retryStrategy` doesn't return a number"),t();l("reconnect in %sms",s),e.setStatus("reconnecting",s),e.reconnectTimeout=setTimeout(function(){e.reconnectTimeout=null,e.connect().catch(n.noop)},s);let{maxRetriesPerRequest:i}=e.options;"number"==typeof i&&(i<0?l("maxRetriesPerRequest is negative, ignoring..."):0==e.retryAttempts%(i+1)&&(l("reach maxRetriesPerRequest limitation, flushing command queue..."),e.flushQueue(new o.MaxRetriesPerRequestError(i))))};function t(){e.setStatus("end"),e.flushQueue(Error(n.CONNECTION_CLOSED_ERROR_MSG))}},r.errorHandler=function(e){return function(t){l("error: %s",t),e.silentEmit("error",t)}},r.readyHandler=function(e){return function(){if(e.setStatus("ready"),e.retryAttempts=0,e.options.monitor){e.call("monitor").then(()=>e.setStatus("monitoring"),t=>e.emit("error",t));let{sendCommand:t}=e;e.sendCommand=function(r){return i.default.checkFlag("VALID_IN_MONITOR_MODE",r.name)?t.call(e,r):(r.reject(Error("Connection is in monitoring mode, can't process commands.")),r.promise)},e.once("close",function(){delete e.sendCommand});return}let t=e.prevCondition?e.prevCondition.select:e.condition.select;if(e.options.readOnly&&(l("set the connection to readonly mode"),e.readonly().catch(n.noop)),e.prevCondition){let r=e.prevCondition;if(e.prevCondition=null,r.subscriber&&e.options.autoResubscribe){e.condition.select!==t&&(l("connect to db [%d]",t),e.select(t));let s=r.subscriber.channels("subscribe");s.length&&(l("subscribe %d channels",s.length),e.subscribe(s));let i=r.subscriber.channels("psubscribe");i.length&&(l("psubscribe %d channels",i.length),e.psubscribe(i));let o=r.subscriber.channels("ssubscribe");if(o.length)for(let t of(l("ssubscribe %s",o.length),o))e.ssubscribe(t)}}if(e.prevCommandQueue)if(e.options.autoResendUnfulfilledCommands)for(l("resend %d unfulfilled commands",e.prevCommandQueue.length);e.prevCommandQueue.length>0;){let t=e.prevCommandQueue.shift();t.select!==e.condition.select&&"select"!==t.command.name&&e.select(t.select),e.sendCommand(t.command,t.stream)}else e.prevCommandQueue=null;if(e.offlineQueue.length){l("send %d commands in offline queue",e.offlineQueue.length);let t=e.offlineQueue;for(e.resetOfflineQueue();t.length>0;){let r=t.shift();r.select!==e.condition.select&&"select"!==r.command.name&&e.select(r.select),e.sendCommand(r.command,r.stream)}}e.condition.select!==t&&(l("connect to db [%d]",t),e.select(t))}}},94455,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.traceConnect=r.traceBatch=r.traceCommand=r.sanitizeArgs=void 0;let s=[{regex:/^ECHO/i,args:0},{regex:/^(LPUSH|MSET|PFA|PUBLISH|RPUSH|SADD|SET|SPUBLISH|XADD|ZADD)/i,args:1},{regex:/^(HSET|HMSET|LSET|LINSERT)/i,args:2},{regex:/^(ACL|BIT|B[LRZ]|CLIENT|CLUSTER|CONFIG|COMMAND|DECR|DEL|EVAL|EX|FUNCTION|GEO|GET|HINCR|HMGET|HSCAN|INCR|L[TRLM]|MEMORY|P[EFISTU]|RPOP|S[CDIMORSU]|XACK|X[CDGILPRT]|Z[CDILMPRS])/i,args:-1}];r.sanitizeArgs=function(e,t){let r=0;for(let t of s)if(t.regex.test(e)){r=t.args;break}if(-1===r)return t.map(e=>String(e));let i=[];for(let e=0;e<t.length;e++)e<r?i.push(String(t[e])):i.push("?");return i};let i=(()=>{try{return"getBuiltinModule"in process?process.getBuiltinModule("node:diagnostics_channel"):e.r(77652)}catch{return}})(),o=i&&"function"==typeof i.tracingChannel,n=o?i.tracingChannel("ioredis:command"):void 0,a=o?i.tracingChannel("ioredis:batch"):void 0,l=o?i.tracingChannel("ioredis:connect"):void 0;function c(e){return!!e&&!1!==e.hasSubscribers}let u=()=>{};r.traceCommand=function(e,t){if(!c(n))return e();let r=n.tracePromise(e,t());return r.catch(u),r},r.traceBatch=function(e,t){if(!c(a))return e();let r=a.tracePromise(e,t());return r.catch(u),r},r.traceConnect=function(e,t){return c(l)?l.tracePromise(e,t()):e()}},60886,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.addTransactionSupport=void 0;let s=e.r(13895),i=e.r(42351),o=e.r(60520),n=e.r(94455);r.addTransactionSupport=function(e){e.pipeline=function(e){let t=new o.default(this);return Array.isArray(e)&&t.addBatch(e),t};let{multi:t}=e;e.multi=function(e,r){if(void 0!==r||Array.isArray(e)||(r=e,e=null),r&&!1===r.pipeline)return t.call(this);let a=new o.default(this);a.multi(),Array.isArray(e)&&a.addBatch(e);let l=a.exec;a.exec=function(e){if(this.isCluster&&!this.redis.slots.length)return"wait"===this.redis.status&&this.redis.connect().catch(s.noop),(0,i.default)(new Promise((e,t)=>{this.redis.delayUntilReady(r=>{r?t(r):this.exec(a).then(e,t)})}),e);if(this._transactions>0&&l.call(a),this.nodeifiedPromise)return l.call(a);let t=Math.max(a.length-2,0),r=()=>l.call(a).then(function(e){let t=e[e.length-1];if(void 0===t)throw Error("Pipeline cannot be used to send any commands when the `exec()` has been called on it.");if(t[0]){t[0].previousErrors=[];for(let r=0;r<e.length-1;++r)e[r][0]&&t[0].previousErrors.push(e[r][0]);throw t[0]}return(0,s.wrapMultiResult)(t[1])}),o="_buildBatchContext"in this.redis?(0,n.traceBatch)(r,()=>this.redis._buildBatchContext(t)):r();return(0,i.default)(o,e)};let{execBuffer:c}=a;return a.execBuffer=function(e){return this._transactions>0&&c.call(a),a.exec(e)},a};let{exec:r}=e;e.exec=function(e){return(0,i.default)(r.call(this).then(function(e){return Array.isArray(e)&&(e=(0,s.wrapMultiResult)(e)),e}),e)}}},34207,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});let s=e.r(87693),i=e.r(47145),o=e.r(59026),n=e.r(27743);class a{constructor(){this.options={},this.scriptsSet={},this.addedBuiltinSet=new Set}getBuiltinCommands(){return l.slice(0)}createBuiltinCommand(e){return{string:c(null,e,"utf8"),buffer:c(null,e,null)}}addBuiltinCommand(e){this.addedBuiltinSet.add(e),this[e]=c(e,e,"utf8"),this[e+"Buffer"]=c(e+"Buffer",e,null)}defineCommand(e,t){let r=new n.default(t.lua,t.numberOfKeys,this.options.keyPrefix,t.readOnly);this.scriptsSet[e]=r,this[e]=u(e,e,r,"utf8"),this[e+"Buffer"]=u(e+"Buffer",e,r,null)}sendCommand(e,t,r){throw Error('"sendCommand" is not implemented')}}let l=s.list.filter(e=>"monitor"!==e);function c(e,t,r){return void 0===r&&(r=t,t=null),function(...s){let n=t||s.shift(),a=s[s.length-1];"function"==typeof a?s.pop():a=void 0;let l={errorStack:this.options.showFriendlyErrorStack?Error():void 0,keyPrefix:this.options.keyPrefix,replyEncoding:r};return(0,i.shouldUseAutoPipelining)(this,e,n)?(0,i.executeWithAutoPipelining)(this,e,n,s,a):this.sendCommand(new o.default(n,s,l,a))}}function u(e,t,r,s){return function(...o){let n="function"==typeof o[o.length-1]?o.pop():void 0,a={replyEncoding:s};return(this.options.showFriendlyErrorStack&&(a.errorStack=Error()),(0,i.shouldUseAutoPipelining)(this,e,t))?(0,i.executeWithAutoPipelining)(this,e,t,o,n):r.execute(this,o,a,n)}}l.push("sentinel"),l.forEach(function(e){a.prototype[e]=c(e,e,"utf8"),a.prototype[e+"Buffer"]=c(e+"Buffer",e,null)}),a.prototype.call=c("call","utf8"),a.prototype.callBuffer=c("callBuffer",null),a.prototype.send_command=a.prototype.call,r.default=a},74031,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e,t){Object.getOwnPropertyNames(t.prototype).forEach(r=>{Object.defineProperty(e.prototype,r,Object.getOwnPropertyDescriptor(t.prototype,r))})}},79805,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.parseBlockOption=r.parseSecondsArgument=void 0;let s=e=>{if("number"==typeof e)return e;if(Buffer.isBuffer(e))return s(e.toString());if("string"==typeof e){let t=Number(e);return Number.isFinite(t)?t:void 0}},i=e=>"string"==typeof e?e:Buffer.isBuffer(e)?e.toString():void 0;r.parseSecondsArgument=e=>{let t=s(e);if(void 0!==t)return t<=0?0:1e3*t},r.parseBlockOption=e=>{for(let t=0;t<e.length;t++){let r=i(e[t]);if(r&&"block"===r.toLowerCase()){let r=s(e[t+1]);if(void 0===r)return;if(r<=0)return 0;return r}}return null}},880,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.genRedactedString=r.getStringValue=r.MAX_ARGUMENT_LENGTH=void 0;let s=e.r(26914);function i(e){if(null!==e)switch(typeof e){case"boolean":case"number":return;case"object":if(Buffer.isBuffer(e))return e.toString("hex");if(Array.isArray(e))return e.join(",");try{return JSON.stringify(e)}catch(e){return}case"string":return e}}function o(e,t){let{length:r}=e;return r<=t?e:e.slice(0,t)+' ... <REDACTED full-length="'+r+'">'}r.MAX_ARGUMENT_LENGTH=200,r.getStringValue=i,r.genRedactedString=o,r.default=function(e){let t=(0,s.default)(`ioredis:${e}`);function r(...e){if(t.enabled){for(let t=1;t<e.length;t++){let r=i(e[t]);"string"==typeof r&&r.length>200&&(e[t]=o(r,200))}return t.apply(null,e)}}return Object.defineProperties(r,{namespace:{get:()=>t.namespace},enabled:{get:()=>t.enabled},destroy:{get:()=>t.destroy},log:{get:()=>t.log,set(e){t.log=e}}}),r}},20110,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.defaults=void 0;let s=/^(?:0|[1-9]\d*)$/;function i(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}r.defaults=function(e,...t){e=Object(e);let r=Object.prototype,o=t.length,n=o>2?t[2]:void 0;n&&function(e,t,r){var o;return null!==r&&("object"==typeof r||"function"==typeof r)&&(!!("number"==typeof t&&null!=r&&"function"!=typeof r&&Number.isSafeInteger(o=r.length)&&o>=0&&function(e,t=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e<t;case"symbol":return!1;case"string":return s.test(e)}}(t))&&t<r.length||"string"==typeof t&&t in r)&&i(r[t],e)}(t[0],t[1],n)&&(o=1);for(let s=0;s<o;s++){if(null==t[s])continue;let o=t[s];for(let t in o){let s=e[t];(void 0===s||!r.hasOwnProperty.call(e,t)&&i(s,r[t]))&&(e[t]=o[t])}}return e}},13895,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.noop=r.isArguments=r.defaults=r.Debug=r.getPackageMeta=r.zipMap=r.CONNECTION_CLOSED_ERROR_MSG=r.shuffle=r.sample=r.resolveTLSProfile=r.parseURL=r.optimizeErrorStack=r.toArg=r.convertMapToArray=r.convertObjectToArray=r.timeout=r.packObject=r.isInt=r.wrapMultiResult=r.convertBufferToString=void 0;let s=e.r(22734),i=e.r(14747),o=e.r(18761);Object.defineProperty(r,"defaults",{enumerable:!0,get:function(){return o.defaults}}),Object.defineProperty(r,"isArguments",{enumerable:!0,get:function(){return o.isArguments}}),Object.defineProperty(r,"noop",{enumerable:!0,get:function(){return o.noop}}),r.Debug=e.r(880).default;let n=e.r(66275);function a(e){let t=parseFloat(e);return!isNaN(e)&&(0|t)===t}function l(e,t){if("family"===e){let e=Number.parseInt(t,10);if(!Number.isNaN(e))return e}return t}r.convertBufferToString=function e(t,r){if(t instanceof Buffer)return t.toString(r);if(Array.isArray(t)){let s=t.length,i=Array(s);for(let o=0;o<s;++o)i[o]=t[o]instanceof Buffer&&"utf8"===r?t[o].toString():e(t[o],r);return i}return t},r.wrapMultiResult=function(e){if(!e)return null;let t=[],r=e.length;for(let s=0;s<r;++s){let r=e[s];r instanceof Error?t.push([r]):t.push([null,r])}return t},r.isInt=a,r.packObject=function(e){let t={},r=e.length;for(let s=1;s<r;s+=2)t[e[s-1]]=e[s];return t},r.timeout=function(e,t){let r=null,s=function(){r&&(clearTimeout(r),r=null,e.apply(this,arguments))};return r=setTimeout(s,t,Error("timeout")),s},r.convertObjectToArray=function(e){let t=[],r=Object.keys(e);for(let s=0,i=r.length;s<i;s++)t.push(r[s],e[r[s]]);return t},r.convertMapToArray=function(e){let t=[],r=0;return e.forEach(function(e,s){t[r]=s,t[r+1]=e,r+=2}),t},r.toArg=function(e){return null==e?"":String(e)},r.optimizeErrorStack=function(e,t,r){let s,i=t.split("\n"),o="";for(s=1;s<i.length&&-1!==i[s].indexOf(r);++s);for(let e=s;e<i.length;++e)o+="\n"+i[e];if(e.stack){let t=e.stack.indexOf("\n");e.stack=e.stack.slice(0,t)+o}return e},r.parseURL=function(e){let t;if(a(e))return{port:e};let r=/^rediss?:\/\//i.test(e),s=e.startsWith("//");if("/"===e[0]&&!s){let t=e.indexOf("?"),r={path:-1===t?e:e.slice(0,t)};if(-1!==t){let s={};new URLSearchParams(e.slice(t+1)).forEach((e,t)=>{s[t]=l(t,e)}),(0,o.defaults)(r,s)}return r}t=new URL(r?e:s?"redis:"+e:"redis://"+e);let i={};t.searchParams.forEach((e,t)=>{i[t]=l(t,e)});let n={};return(t.username||t.password)&&(n.username=decodeURIComponent(t.username),n.password=decodeURIComponent(t.password)),t.pathname&&"/"!==t.pathname&&(r||s?t.pathname.length>1&&(n.db=t.pathname.slice(1)):n.path=t.pathname),t.hostname&&(n.host=t.hostname.replace(/^\[|\]$/g,"")),t.port&&(n.port=t.port),(0,o.defaults)(n,i),n},r.resolveTLSProfile=function(e){let t=null==e?void 0:e.tls;"string"==typeof t&&(t={profile:t});let r=n.default[null==t?void 0:t.profile];return r&&(t=Object.assign({},r,t),delete t.profile,e=Object.assign({},e,{tls:t})),e},r.sample=function(e,t=0){let r=e.length;return t>=r?null:e[t+Math.floor(Math.random()*(r-t))]},r.shuffle=function(e){let t=e.length;for(;t>0;){let r=Math.floor(Math.random()*t);t--,[e[t],e[r]]=[e[r],e[t]]}return e},r.CONNECTION_CLOSED_ERROR_MSG="Connection is closed.",r.zipMap=function(e,t){let r=new Map;return e.forEach((e,s)=>{r.set(e,t[s])}),r};let c=null;r.getPackageMeta=async function(){if(c)return c;try{let e=(0,i.resolve)("/ROOT/node_modules/ioredis/built/utils","..","..","package.json"),t=await s.promises.readFile(e,"utf8");return c={version:JSON.parse(t).version}}catch(e){return c={version:"error-fetching-version"}}}},29693,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.isArguments=void 0,r.isArguments=function(e){return null!==e&&"object"==typeof e&&"[object Arguments]"===(null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e))}},18761,(e,t,r)=>{var s=e.e&&e.e.__createBinding||(Object.create?function(e,t,r,s){void 0===s&&(s=r),Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,s){void 0===s&&(s=r),e[s]=t[r]}),i=e.e&&e.e.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),r.noop=void 0,r.noop=function(){},i(e.r(20110),r),i(e.r(29693),r)},87315,(e,t,r)=>{t.exports=55>process.version.charCodeAt(1)&&46===process.version.charCodeAt(2)?e.r(27351):e.r(29338)},29338,(e,t,r)=>{let s=e.r(49719);class i extends Error{get name(){return this.constructor.name}}class o extends i{get name(){return this.constructor.name}}t.exports={RedisError:i,ParserError:class extends i{constructor(e,t,r){s(t),s.strictEqual(typeof r,"number");let i=Error.stackTraceLimit;Error.stackTraceLimit=2,super(e),Error.stackTraceLimit=i,this.offset=r,this.buffer=t}get name(){return this.constructor.name}},ReplyError:class extends i{constructor(e){let t=Error.stackTraceLimit;Error.stackTraceLimit=2,super(e),Error.stackTraceLimit=t}get name(){return this.constructor.name}},AbortError:o,InterruptError:class extends o{get name(){return this.constructor.name}}}},27351,(e,t,r)=>{let s=e.r(49719),i=e.r(24361);function o(e){Object.defineProperty(this,"message",{value:e||"",configurable:!0,writable:!0}),Error.captureStackTrace(this,this.constructor)}function n(e,t,r){s(t),s.strictEqual(typeof r,"number"),Object.defineProperty(this,"message",{value:e||"",configurable:!0,writable:!0});let i=Error.stackTraceLimit;Error.stackTraceLimit=2,Error.captureStackTrace(this,this.constructor),Error.stackTraceLimit=i,this.offset=r,this.buffer=t}function a(e){Object.defineProperty(this,"message",{value:e||"",configurable:!0,writable:!0});let t=Error.stackTraceLimit;Error.stackTraceLimit=2,Error.captureStackTrace(this,this.constructor),Error.stackTraceLimit=t}function l(e){Object.defineProperty(this,"message",{value:e||"",configurable:!0,writable:!0}),Error.captureStackTrace(this,this.constructor)}function c(e){Object.defineProperty(this,"message",{value:e||"",configurable:!0,writable:!0}),Error.captureStackTrace(this,this.constructor)}i.inherits(o,Error),Object.defineProperty(o.prototype,"name",{value:"RedisError",configurable:!0,writable:!0}),i.inherits(n,o),Object.defineProperty(n.prototype,"name",{value:"ParserError",configurable:!0,writable:!0}),i.inherits(a,o),Object.defineProperty(a.prototype,"name",{value:"ReplyError",configurable:!0,writable:!0}),i.inherits(l,o),Object.defineProperty(l.prototype,"name",{value:"AbortError",configurable:!0,writable:!0}),i.inherits(c,l),Object.defineProperty(c.prototype,"name",{value:"InterruptError",configurable:!0,writable:!0}),t.exports={RedisError:o,ParserError:n,ReplyError:a,AbortError:l,InterruptError:c}},86111,(e,t,r)=>{t.exports=e.r(39157)},39157,(e,t,r)=>{let s=e.r(874).Buffer,i=new(e.r(99348)).StringDecoder,o=e.r(87315),n=o.ReplyError,a=o.ParserError;var l=s.allocUnsafe(32768),c=0,u=null,h=0,d=0;function f(e){let t=e.offset,r=e.buffer,s=r.length-1;for(var i=t;i<s;)if(13===r[i++]){if(e.offset=i+1,!0===e.optionReturnBuffers)return e.buffer.slice(t,i-1);return e.buffer.toString("utf8",t,i-1)}}function p(e){let t=e.buffer.length-1;for(var r=e.offset,s=0;r<t;){let t=e.buffer[r++];if(13===t)return e.offset=r+1,s;s=10*s+(t-48)}}function y(e,t,r){e.arrayCache.push(t),e.arrayPos.push(r)}function m(e){let t=e.arrayCache.pop();var r=e.arrayPos.pop();if(e.arrayCache.length){let s=m(e);if(void 0===s)return void y(e,t,r);t[r++]=s}return g(e,t,r)}function g(e,t,r){let s=e.buffer.length;for(;r<t.length;){let i=e.offset;if(e.offset>=s)return void y(e,t,r);let o=S(e,e.buffer[e.offset++]);if(void 0===o){e.arrayCache.length||e.bufferCache.length||(e.offset=i),y(e,t,r);return}t[r]=o,r++}return t}function S(e,t){switch(t){case 36:let r=p(e);if(void 0===r)return;if(r<0)return null;let s=e.offset+r;if(s+2>e.buffer.length){e.bigStrSize=s+2,e.totalChunkSize=e.buffer.length,e.bufferCache.push(e.buffer);return}let i=e.offset;return(e.offset=s+2,!0===e.optionReturnBuffers)?e.buffer.slice(i,s):e.buffer.toString("utf8",i,s);case 43:return f(e);case 42:let o;return void 0===(o=p(e))?void 0:o<0?null:g(e,Array(o),0);case 58:return!0===e.optionStringNumbers?function(e){let t=e.buffer.length-1;var r=e.offset,s=0,i="";for(45===e.buffer[r]&&(i+="-",r++);r<t;){var o=e.buffer[r++];if(13===o)return e.offset=r+1,0!==s&&(i+=s),i;s>0x19999998?(i+=10*s+(o-48),s=0):48===o&&0===s?i+=0:s=10*s+(o-48)}}(e):function(e){let t=e.buffer.length-1;var r=e.offset,s=0,i=1;for(45===e.buffer[r]&&(i=-1,r++);r<t;){let t=e.buffer[r++];if(13===t)return e.offset=r+1,i*s;s=10*s+(t-48)}}(e);case 45:var l=f(e);if(void 0!==l)return!0===e.optionReturnBuffers&&(l=l.toString()),new n(l);return;default:let c;return c=new a("Protocol error, got "+JSON.stringify(String.fromCharCode(t))+" as reply type byte",JSON.stringify(e.buffer),e.offset),void(e.buffer=null,e.returnFatalError(c))}}function b(){if(l.length>51200)if(1===h||d>2*h){let e=Math.floor(l.length/10),t=e<c?c:e;c=0,l=l.slice(t,l.length)}else d++,h--;else clearInterval(u),h=0,d=0,u=null}t.exports=class{constructor(e){if(!e)throw TypeError("Options are mandatory.");if("function"!=typeof e.returnError||"function"!=typeof e.returnReply)throw TypeError("The returnReply and returnError options have to be functions.");this.setReturnBuffers(!!e.returnBuffers),this.setStringNumbers(!!e.stringNumbers),this.returnError=e.returnError,this.returnFatalError=e.returnFatalError||e.returnError,this.returnReply=e.returnReply,this.reset()}reset(){this.offset=0,this.buffer=null,this.bigStrSize=0,this.totalChunkSize=0,this.bufferCache=[],this.arrayCache=[],this.arrayPos=[]}setReturnBuffers(e){if("boolean"!=typeof e)throw TypeError("The returnBuffers argument has to be a boolean");this.optionReturnBuffers=e}setStringNumbers(e){if("boolean"!=typeof e)throw TypeError("The stringNumbers argument has to be a boolean");this.optionStringNumbers=e}execute(e){if(null===this.buffer)this.buffer=e,this.offset=0;else if(0===this.bigStrSize){let t=this.buffer.length,r=t-this.offset,i=s.allocUnsafe(r+e.length);if(this.buffer.copy(i,0,this.offset,t),e.copy(i,r,0,e.length),this.buffer=i,this.offset=0,this.arrayCache.length){let e=m(this);if(void 0===e)return;this.returnReply(e)}}else if(this.totalChunkSize+e.length>=this.bigStrSize){this.bufferCache.push(e);var t=this.optionReturnBuffers?function(e){let t=e.bufferCache,r=e.offset,i=e.bigStrSize-r-2;var o=t.length,n=e.bigStrSize-e.totalChunkSize;if(e.offset=n,n<=2){if(2===o)return t[0].slice(r,t[0].length+n-2);o--,n=t[t.length-2].length+n}l.length<i+c&&(c>0x6f00000&&(c=0x3200000),l=s.allocUnsafe(i*(i>0x4b00000?2:3)+c),c=0,h++,null===u&&(u=setInterval(b,50)));let a=c;t[0].copy(l,a,r,t[0].length),c+=t[0].length-r;for(var d=1;d<o-1;d++)t[d].copy(l,c),c+=t[d].length;return t[d].copy(l,c,0,n-2),c+=n-2,l.slice(a,c)}(this):function(e){let t=e.bufferCache,r=e.offset;var s=t.length,o=e.bigStrSize-e.totalChunkSize;if(e.offset=o,o<=2){if(2===s)return t[0].toString("utf8",r,t[0].length+o-2);s--,o=t[t.length-2].length+o}for(var n=i.write(t[0].slice(r)),a=1;a<s-1;a++)n+=i.write(t[a]);return n+i.end(t[a].slice(0,o-2))}(this);if(this.bigStrSize=0,this.bufferCache=[],this.buffer=e,this.arrayCache.length&&(this.arrayCache[0][this.arrayPos[0]++]=t,void 0===(t=m(this))))return;this.returnReply(t)}else{this.bufferCache.push(e),this.totalChunkSize+=e.length;return}for(;this.offset<this.buffer.length;){let e=this.offset,t=this.buffer[this.offset++],r=S(this,t);if(void 0===r){this.arrayCache.length||this.bufferCache.length||(this.offset=e);return}45===t?this.returnError(r):this.returnReply(r)}this.buffer=null}}},42351,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});let s=e.r(8538);function i(e){setTimeout(function(){throw e},0)}r.default=function(e,t,r){return"function"==typeof t&&e.then(e=>{let o;(o=void 0!==r&&Object(r).spread&&Array.isArray(e)?s.tryCatch(t).apply(void 0,[null].concat(e)):void 0===e?s.tryCatch(t)(null):s.tryCatch(t)(null,e))===s.errorObj&&i(o.e)},e=>{if(!e){let t=Error(e+"");Object.assign(t,{cause:e}),e=t}let r=s.tryCatch(t)(e);r===s.errorObj&&i(r.e)}),e}},8538,(e,t,r)=>{let s;function i(e,t){try{let e=s;return s=null,e.apply(this,arguments)}catch(e){return r.errorObj.e=e,r.errorObj}}Object.defineProperty(r,"__esModule",{value:!0}),r.tryCatch=r.errorObj=void 0,r.errorObj={e:{}},r.tryCatch=function(e){return s=e,i}},97718,(e,t,r)=>{let{EMPTY_BUFFER:s}=e.r(15517),i=Buffer[Symbol.species];function o(e,t,r,s,i){for(let o=0;o<i;o++)r[s+o]=e[o]^t[3&o]}function n(e,t){for(let r=0;r<e.length;r++)e[r]^=t[3&r]}function a(e){let t;return(a.readOnly=!0,Buffer.isBuffer(e))?e:(e instanceof ArrayBuffer?t=new i(e):ArrayBuffer.isView(e)?t=new i(e.buffer,e.byteOffset,e.byteLength):(t=Buffer.from(e),a.readOnly=!1),t)}if(t.exports={concat:function(e,t){if(0===e.length)return s;if(1===e.length)return e[0];let r=Buffer.allocUnsafe(t),o=0;for(let t=0;t<e.length;t++){let s=e[t];r.set(s,o),o+=s.length}return o<t?new i(r.buffer,r.byteOffset,o):r},mask:o,toArrayBuffer:function(e){return e.length===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.length)},toBuffer:a,unmask:n},!process.env.WS_NO_BUFFER_UTIL)try{let e=(()=>{let e=Error("Cannot find module 'bufferutil'");throw e.code="MODULE_NOT_FOUND",e})();t.exports.mask=function(t,r,s,i,n){n<48?o(t,r,s,i,n):e.mask(t,r,s,i,n)},t.exports.unmask=function(t,r){t.length<32?n(t,r):e.unmask(t,r)}}catch(e){}},15517,(e,t,r)=>{let s=["nodebuffer","arraybuffer","fragments"],i="u">typeof Blob;i&&s.push("blob"),t.exports={BINARY_TYPES:s,CLOSE_TIMEOUT:3e4,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:i,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}},46296,(e,t,r)=>{let{kForOnEventAttribute:s,kListener:i}=e.r(15517),o=Symbol("kCode"),n=Symbol("kData"),a=Symbol("kError"),l=Symbol("kMessage"),c=Symbol("kReason"),u=Symbol("kTarget"),h=Symbol("kType"),d=Symbol("kWasClean");class f{constructor(e){this[u]=null,this[h]=e}get target(){return this[u]}get type(){return this[h]}}Object.defineProperty(f.prototype,"target",{enumerable:!0}),Object.defineProperty(f.prototype,"type",{enumerable:!0});class p extends f{constructor(e,t={}){super(e),this[o]=void 0===t.code?0:t.code,this[c]=void 0===t.reason?"":t.reason,this[d]=void 0!==t.wasClean&&t.wasClean}get code(){return this[o]}get reason(){return this[c]}get wasClean(){return this[d]}}Object.defineProperty(p.prototype,"code",{enumerable:!0}),Object.defineProperty(p.prototype,"reason",{enumerable:!0}),Object.defineProperty(p.prototype,"wasClean",{enumerable:!0});class y extends f{constructor(e,t={}){super(e),this[a]=void 0===t.error?null:t.error,this[l]=void 0===t.message?"":t.message}get error(){return this[a]}get message(){return this[l]}}Object.defineProperty(y.prototype,"error",{enumerable:!0}),Object.defineProperty(y.prototype,"message",{enumerable:!0});class m extends f{constructor(e,t={}){super(e),this[n]=void 0===t.data?null:t.data}get data(){return this[n]}}function g(e,t,r){"object"==typeof e&&e.handleEvent?e.handleEvent.call(e,r):e.call(t,r)}Object.defineProperty(m.prototype,"data",{enumerable:!0}),t.exports={CloseEvent:p,ErrorEvent:y,Event:f,EventTarget:{addEventListener(e,t,r={}){let o;for(let o of this.listeners(e))if(!r[s]&&o[i]===t&&!o[s])return;if("message"===e)o=function(e,r){let s=new m("message",{data:r?e:e.toString()});s[u]=this,g(t,this,s)};else if("close"===e)o=function(e,r){let s=new p("close",{code:e,reason:r.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});s[u]=this,g(t,this,s)};else if("error"===e)o=function(e){let r=new y("error",{error:e,message:e.message});r[u]=this,g(t,this,r)};else{if("open"!==e)return;o=function(){let e=new f("open");e[u]=this,g(t,this,e)}}o[s]=!!r[s],o[i]=t,r.once?this.once(e,o):this.on(e,o)},removeEventListener(e,t){for(let r of this.listeners(e))if(r[i]===t&&!r[s]){this.removeListener(e,r);break}}},MessageEvent:m}},61892,(e,t,r)=>{let{tokenChars:s}=e.r(6921);function i(e,t,r){void 0===e[t]?e[t]=[r]:e[t].push(r)}t.exports={format:function(e){return Object.keys(e).map(t=>{let r=e[t];return Array.isArray(r)||(r=[r]),r.map(e=>[t].concat(Object.keys(e).map(t=>{let r=e[t];return Array.isArray(r)||(r=[r]),r.map(e=>!0===e?t:`${t}=${e}`).join("; ")})).join("; ")).join(", ")}).join(", ")},parse:function(e){let t,r,o=Object.create(null),n=Object.create(null),a=!1,l=!1,c=!1,u=-1,h=-1,d=-1,f=0;for(;f<e.length;f++)if(h=e.charCodeAt(f),void 0===t)if(-1===d&&1===s[h])-1===u&&(u=f);else if(0!==f&&(32===h||9===h))-1===d&&-1!==u&&(d=f);else if(59===h||44===h){if(-1===u)throw SyntaxError(`Unexpected character at index ${f}`);-1===d&&(d=f);let r=e.slice(u,d);44===h?(i(o,r,n),n=Object.create(null)):t=r,u=d=-1}else throw SyntaxError(`Unexpected character at index ${f}`);else if(void 0===r)if(-1===d&&1===s[h])-1===u&&(u=f);else if(32===h||9===h)-1===d&&-1!==u&&(d=f);else if(59===h||44===h){if(-1===u)throw SyntaxError(`Unexpected character at index ${f}`);-1===d&&(d=f),i(n,e.slice(u,d),!0),44===h&&(i(o,t,n),n=Object.create(null),t=void 0),u=d=-1}else if(61===h&&-1!==u&&-1===d)r=e.slice(u,f),u=d=-1;else throw SyntaxError(`Unexpected character at index ${f}`);else if(l){if(1!==s[h])throw SyntaxError(`Unexpected character at index ${f}`);-1===u?u=f:a||(a=!0),l=!1}else if(c)if(1===s[h])-1===u&&(u=f);else if(34===h&&-1!==u)c=!1,d=f;else if(92===h)l=!0;else throw SyntaxError(`Unexpected character at index ${f}`);else if(34===h&&61===e.charCodeAt(f-1))c=!0;else if(-1===d&&1===s[h])-1===u&&(u=f);else if(-1!==u&&(32===h||9===h))-1===d&&(d=f);else if(59===h||44===h){if(-1===u)throw SyntaxError(`Unexpected character at index ${f}`);-1===d&&(d=f);let s=e.slice(u,d);a&&(s=s.replace(/\\/g,""),a=!1),i(n,r,s),44===h&&(i(o,t,n),n=Object.create(null),t=void 0),r=void 0,u=d=-1}else throw SyntaxError(`Unexpected character at index ${f}`);if(-1===u||c||32===h||9===h)throw SyntaxError("Unexpected end of input");-1===d&&(d=f);let p=e.slice(u,d);return void 0===t?i(o,p,n):(void 0===r?i(n,p,!0):a?i(n,r,p.replace(/\\/g,"")):i(n,r,p),i(o,t,n)),o}}},49526,(e,t,r)=>{let s=Symbol("kDone"),i=Symbol("kRun");t.exports=class{constructor(e){this[s]=()=>{this.pending--,this[i]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[i]()}[i](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[s])}}}},51468,(e,t,r)=>{let s,i=e.r(6461),o=e.r(97718),n=e.r(49526),{kStatusCode:a}=e.r(15517),l=Buffer[Symbol.species],c=Buffer.from([0,0,255,255]),u=Symbol("permessage-deflate"),h=Symbol("total-length"),d=Symbol("callback"),f=Symbol("buffers"),p=Symbol("error");function y(e){this[f].push(e),this[h]+=e.length}function m(e){(this[h]+=e.length,this[u]._maxPayload<1||this[h]<=this[u]._maxPayload)?this[f].push(e):(this[p]=RangeError("Max payload size exceeded"),this[p].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[p][a]=1009,this.removeListener("data",m),this.reset())}function g(e){(this[u]._inflate=null,this[p])?this[d](this[p]):(e[a]=1007,this[d](e))}t.exports=class{constructor(e){this._options=e||{},this._threshold=void 0!==this._options.threshold?this._options.threshold:1024,this._maxPayload=0|this._options.maxPayload,this._isServer=!!this._options.isServer,this._deflate=null,this._inflate=null,this.params=null,s||(s=new n(void 0!==this._options.concurrencyLimit?this._options.concurrencyLimit:10))}static get extensionName(){return"permessage-deflate"}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:null==this._options.clientMaxWindowBits&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let e=this._deflate[d];this._deflate.close(),this._deflate=null,e&&e(Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){let t=this._options,r=e.find(e=>(!1!==t.serverNoContextTakeover||!e.server_no_context_takeover)&&(!e.server_max_window_bits||!1!==t.serverMaxWindowBits&&("number"!=typeof t.serverMaxWindowBits||!(t.serverMaxWindowBits>e.server_max_window_bits)))&&("number"!=typeof t.clientMaxWindowBits||!!e.client_max_window_bits));if(!r)throw Error("None of the extension offers can be accepted");return t.serverNoContextTakeover&&(r.server_no_context_takeover=!0),t.clientNoContextTakeover&&(r.client_no_context_takeover=!0),"number"==typeof t.serverMaxWindowBits&&(r.server_max_window_bits=t.serverMaxWindowBits),"number"==typeof t.clientMaxWindowBits?r.client_max_window_bits=t.clientMaxWindowBits:(!0===r.client_max_window_bits||!1===t.clientMaxWindowBits)&&delete r.client_max_window_bits,r}acceptAsClient(e){let t=e[0];if(!1===this._options.clientNoContextTakeover&&t.client_no_context_takeover)throw Error('Unexpected parameter "client_no_context_takeover"');if(t.client_max_window_bits){if(!1===this._options.clientMaxWindowBits||"number"==typeof this._options.clientMaxWindowBits&&t.client_max_window_bits>this._options.clientMaxWindowBits)throw Error('Unexpected or invalid parameter "client_max_window_bits"')}else"number"==typeof this._options.clientMaxWindowBits&&(t.client_max_window_bits=this._options.clientMaxWindowBits);return t}normalizeParams(e){return e.forEach(e=>{Object.keys(e).forEach(t=>{let r=e[t];if(r.length>1)throw Error(`Parameter "${t}" must have only a single value`);if(r=r[0],"client_max_window_bits"===t){if(!0!==r){let e=+r;if(!Number.isInteger(e)||e<8||e>15)throw TypeError(`Invalid value for parameter "${t}": ${r}`);r=e}else if(!this._isServer)throw TypeError(`Invalid value for parameter "${t}": ${r}`)}else if("server_max_window_bits"===t){let e=+r;if(!Number.isInteger(e)||e<8||e>15)throw TypeError(`Invalid value for parameter "${t}": ${r}`);r=e}else if("client_no_context_takeover"===t||"server_no_context_takeover"===t){if(!0!==r)throw TypeError(`Invalid value for parameter "${t}": ${r}`)}else throw Error(`Unknown parameter "${t}"`);e[t]=r})}),e}decompress(e,t,r){s.add(s=>{this._decompress(e,t,(e,t)=>{s(),r(e,t)})})}compress(e,t,r){s.add(s=>{this._compress(e,t,(e,t)=>{s(),r(e,t)})})}_decompress(e,t,r){let s=this._isServer?"client":"server";if(!this._inflate){let e=`${s}_max_window_bits`,t="number"!=typeof this.params[e]?i.Z_DEFAULT_WINDOWBITS:this.params[e];this._inflate=i.createInflateRaw({...this._options.zlibInflateOptions,windowBits:t}),this._inflate[u]=this,this._inflate[h]=0,this._inflate[f]=[],this._inflate.on("error",g),this._inflate.on("data",m)}this._inflate[d]=r,this._inflate.write(e),t&&this._inflate.write(c),this._inflate.flush(()=>{let e=this._inflate[p];if(e){this._inflate.close(),this._inflate=null,r(e);return}let i=o.concat(this._inflate[f],this._inflate[h]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[h]=0,this._inflate[f]=[],t&&this.params[`${s}_no_context_takeover`]&&this._inflate.reset()),r(null,i)})}_compress(e,t,r){let s=this._isServer?"server":"client";if(!this._deflate){let e=`${s}_max_window_bits`,t="number"!=typeof this.params[e]?i.Z_DEFAULT_WINDOWBITS:this.params[e];this._deflate=i.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:t}),this._deflate[h]=0,this._deflate[f]=[],this._deflate.on("data",y)}this._deflate[d]=r,this._deflate.write(e),this._deflate.flush(i.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let e=o.concat(this._deflate[f],this._deflate[h]);t&&(e=new l(e.buffer,e.byteOffset,e.length-4)),this._deflate[d]=null,this._deflate[h]=0,this._deflate[f]=[],t&&this.params[`${s}_no_context_takeover`]&&this._deflate.reset(),r(null,e)})}}},59892,(e,t,r)=>{let{Writable:s}=e.r(88947),i=e.r(51468),{BINARY_TYPES:o,EMPTY_BUFFER:n,kStatusCode:a,kWebSocket:l}=e.r(15517),{concat:c,toArrayBuffer:u,unmask:h}=e.r(97718),{isValidStatusCode:d,isValidUTF8:f}=e.r(6921),p=Buffer[Symbol.species];t.exports=class extends s{constructor(e={}){super(),this._allowSynchronousEvents=void 0===e.allowSynchronousEvents||e.allowSynchronousEvents,this._binaryType=e.binaryType||o[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxBufferedChunks=0|e.maxBufferedChunks,this._maxFragments=0|e.maxFragments,this._maxPayload=0|e.maxPayload,this._skipUTF8Validation=!!e.skipUTF8Validation,this[l]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._numFragments=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=0}_write(e,t,r){return 8===this._opcode&&0==this._state?r():this._maxBufferedChunks>0&&this._buffers.length>=this._maxBufferedChunks?void r(this.createError(RangeError,"Too many buffered chunks",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS")):void(this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(r))}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let t=this._buffers[0];return this._buffers[0]=new p(t.buffer,t.byteOffset+e,t.length-e),new p(t.buffer,t.byteOffset,e)}let t=Buffer.allocUnsafe(e);do{let r=this._buffers[0],s=t.length-e;e>=r.length?t.set(this._buffers.shift(),s):(t.set(new Uint8Array(r.buffer,r.byteOffset,e),s),this._buffers[0]=new p(r.buffer,r.byteOffset+e,r.length-e)),e-=r.length}while(e>0)return t}startLoop(e){this._loop=!0;do switch(this._state){case 0:this.getInfo(e);break;case 1:this.getPayloadLength16(e);break;case 2:this.getPayloadLength64(e);break;case 3:this.getMask();break;case 4:this.getData(e);break;case 5:case 6:this._loop=!1;return}while(this._loop)this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let t=this.consume(2);if((48&t[0])!=0)return void e(this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3"));let r=(64&t[0])==64;if(r&&!this._extensions[i.extensionName])return void e(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"));if(this._fin=(128&t[0])==128,this._opcode=15&t[0],this._payloadLength=127&t[1],0===this._opcode){if(r)return void e(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"));if(!this._fragmented)return void e(this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE"));this._opcode=this._fragmented}else if(1===this._opcode||2===this._opcode){if(this._fragmented)return void e(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE"));this._compressed=r}else{if(!(this._opcode>7)||!(this._opcode<11))return void e(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE"));if(!this._fin)return void e(this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN"));if(r)return void e(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"));if(this._payloadLength>125||8===this._opcode&&1===this._payloadLength)return void e(this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH"))}if(this._fin||this._fragmented||(this._fragmented=this._opcode),this._masked=(128&t[1])==128,this._isServer){if(!this._masked)return void e(this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK"))}else if(this._masked)return void e(this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK"));126===this._payloadLength?this._state=1:127===this._payloadLength?this._state=2:this.haveLength(e)}getPayloadLength16(e){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e)}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let t=this.consume(8),r=t.readUInt32BE(0);r>2097151?e(this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH")):(this._payloadLength=0x100000000*r+t.readUInt32BE(4),this.haveLength(e))}haveLength(e){this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)?e(this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH")):this._masked?this._state=3:this._state=4}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=4}getData(e){let t=n;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}t=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!=0&&h(t,this._mask)}if(this._opcode>7)return void this.controlMessage(t,e);if(this._maxFragments>0&&++this._numFragments>this._maxFragments)return void e(this.createError(RangeError,"Too many message fragments",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS"));if(this._compressed){this._state=5,this.decompress(t,e);return}t.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(t)),this.dataMessage(e)}decompress(e,t){this._extensions[i.extensionName].decompress(e,this._fin,(e,r)=>{if(e)return t(e);if(r.length){if(this._messageLength+=r.length,this._messageLength>this._maxPayload&&this._maxPayload>0)return void t(this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"));this._fragments.push(r)}this.dataMessage(t),0===this._state&&this.startLoop(t)})}dataMessage(e){if(!this._fin){this._state=0;return}let t=this._messageLength,r=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._numFragments=0,this._fragments=[],2===this._opcode){let s;s="nodebuffer"===this._binaryType?c(r,t):"arraybuffer"===this._binaryType?u(c(r,t)):"blob"===this._binaryType?new Blob(r):r,this._allowSynchronousEvents?(this.emit("message",s,!0),this._state=0):(this._state=6,setImmediate(()=>{this.emit("message",s,!0),this._state=0,this.startLoop(e)}))}else{let s=c(r,t);if(!this._skipUTF8Validation&&!f(s))return void e(this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8"));5===this._state||this._allowSynchronousEvents?(this.emit("message",s,!1),this._state=0):(this._state=6,setImmediate(()=>{this.emit("message",s,!1),this._state=0,this.startLoop(e)}))}}controlMessage(e,t){if(8===this._opcode){if(0===e.length)this._loop=!1,this.emit("conclude",1005,n),this.end();else{let r=e.readUInt16BE(0);if(!d(r))return void t(this.createError(RangeError,`invalid status code ${r}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE"));let s=new p(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!f(s))return void t(this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8"));this._loop=!1,this.emit("conclude",r,s),this.end()}this._state=0;return}this._allowSynchronousEvents?(this.emit(9===this._opcode?"ping":"pong",e),this._state=0):(this._state=6,setImmediate(()=>{this.emit(9===this._opcode?"ping":"pong",e),this._state=0,this.startLoop(t)}))}createError(e,t,r,s,i){this._loop=!1,this._errored=!0;let o=new e(r?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(o,this.createError),o.code=i,o[a]=s,o}}},38479,(e,t,r)=>{let s,{Duplex:i}=e.r(88947),{randomFillSync:o}=e.r(54799),{types:{isUint8Array:n}}=e.r(24361),a=e.r(51468),{EMPTY_BUFFER:l,kWebSocket:c,NOOP:u}=e.r(15517),{isBlob:h,isValidStatusCode:d}=e.r(6921),{mask:f,toBuffer:p}=e.r(97718),y=Symbol("kByteLength"),m=Buffer.alloc(4),g=8192;function S(e,t,r){"function"==typeof r&&r(t);for(let r=0;r<e._queue.length;r++){let s=e._queue[r],i=s[s.length-1];"function"==typeof i&&i(t)}}function b(e,t,r){S(e,t,r),e.onerror(t)}t.exports=class e{constructor(e,t,r){this._extensions=t||{},r&&(this._generateMask=r,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=0,this.onerror=u,this[c]=void 0}static frame(e,t){let r,i,n=!1,a=2,l=!1;t.mask&&(r=t.maskBuffer||m,t.generateMask?t.generateMask(r):(8192===g&&(void 0===s&&(s=Buffer.alloc(8192)),o(s,0,8192),g=0),r[0]=s[g++],r[1]=s[g++],r[2]=s[g++],r[3]=s[g++]),l=(r[0]|r[1]|r[2]|r[3])==0,a=6),"string"==typeof e?i=(!t.mask||l)&&void 0!==t[y]?t[y]:(e=Buffer.from(e)).length:(i=e.length,n=t.mask&&t.readOnly&&!l);let c=i;i>=65536?(a+=8,c=127):i>125&&(a+=2,c=126);let u=Buffer.allocUnsafe(n?i+a:a);return(u[0]=t.fin?128|t.opcode:t.opcode,t.rsv1&&(u[0]|=64),u[1]=c,126===c?u.writeUInt16BE(i,2):127===c&&(u[2]=u[3]=0,u.writeUIntBE(i,4,6)),t.mask)?(u[1]|=128,u[a-4]=r[0],u[a-3]=r[1],u[a-2]=r[2],u[a-1]=r[3],l)?[u,e]:n?(f(e,r,u,a,i),[u]):(f(e,r,e,0,i),[u,e]):[u,e]}close(t,r,s,i){let o;if(void 0===t)o=l;else if("number"==typeof t&&d(t))if(void 0!==r&&r.length){let e=Buffer.byteLength(r);if(e>123)throw RangeError("The message must not be greater than 123 bytes");if((o=Buffer.allocUnsafe(2+e)).writeUInt16BE(t,0),"string"==typeof r)o.write(r,2);else if(n(r))o.set(r,2);else throw TypeError("Second argument must be a string or a Uint8Array")}else(o=Buffer.allocUnsafe(2)).writeUInt16BE(t,0);else throw TypeError("First argument must be a valid error code number");let a={[y]:o.length,fin:!0,generateMask:this._generateMask,mask:s,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};0!==this._state?this.enqueue([this.dispatch,o,!1,a,i]):this.sendFrame(e.frame(o,a),i)}ping(t,r,s){let i,o;if("string"==typeof t?(i=Buffer.byteLength(t),o=!1):h(t)?(i=t.size,o=!1):(i=(t=p(t)).length,o=p.readOnly),i>125)throw RangeError("The data size must not be greater than 125 bytes");let n={[y]:i,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:9,readOnly:o,rsv1:!1};h(t)?0!==this._state?this.enqueue([this.getBlobData,t,!1,n,s]):this.getBlobData(t,!1,n,s):0!==this._state?this.enqueue([this.dispatch,t,!1,n,s]):this.sendFrame(e.frame(t,n),s)}pong(t,r,s){let i,o;if("string"==typeof t?(i=Buffer.byteLength(t),o=!1):h(t)?(i=t.size,o=!1):(i=(t=p(t)).length,o=p.readOnly),i>125)throw RangeError("The data size must not be greater than 125 bytes");let n={[y]:i,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:10,readOnly:o,rsv1:!1};h(t)?0!==this._state?this.enqueue([this.getBlobData,t,!1,n,s]):this.getBlobData(t,!1,n,s):0!==this._state?this.enqueue([this.dispatch,t,!1,n,s]):this.sendFrame(e.frame(t,n),s)}send(e,t,r){let s,i,o=this._extensions[a.extensionName],n=t.binary?2:1,l=t.compress;"string"==typeof e?(s=Buffer.byteLength(e),i=!1):h(e)?(s=e.size,i=!1):(s=(e=p(e)).length,i=p.readOnly),this._firstFragment?(this._firstFragment=!1,l&&o&&o.params[o._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(l=s>=o._threshold),this._compress=l):(l=!1,n=0),t.fin&&(this._firstFragment=!0);let c={[y]:s,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:n,readOnly:i,rsv1:l};h(e)?0!==this._state?this.enqueue([this.getBlobData,e,this._compress,c,r]):this.getBlobData(e,this._compress,c,r):0!==this._state?this.enqueue([this.dispatch,e,this._compress,c,r]):this.dispatch(e,this._compress,c,r)}getBlobData(t,r,s,i){this._bufferedBytes+=s[y],this._state=2,t.arrayBuffer().then(t=>{if(this._socket.destroyed){let e=Error("The socket was closed while the blob was being read");process.nextTick(S,this,e,i);return}this._bufferedBytes-=s[y];let o=p(t);r?this.dispatch(o,r,s,i):(this._state=0,this.sendFrame(e.frame(o,s),i),this.dequeue())}).catch(e=>{process.nextTick(b,this,e,i)})}dispatch(t,r,s,i){if(!r)return void this.sendFrame(e.frame(t,s),i);let o=this._extensions[a.extensionName];this._bufferedBytes+=s[y],this._state=1,o.compress(t,s.fin,(t,r)=>{this._socket.destroyed?S(this,Error("The socket was closed while data was being compressed"),i):(this._bufferedBytes-=s[y],this._state=0,s.readOnly=!1,this.sendFrame(e.frame(r,s),i),this.dequeue())})}dequeue(){for(;0===this._state&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][y],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][y],this._queue.push(e)}sendFrame(e,t){2===e.length?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],t),this._socket.uncork()):this._socket.write(e[0],t)}}},699,(e,t,r)=>{e.r(74272);let{Duplex:s}=e.r(88947);function i(e){e.emit("close")}function o(){!this.destroyed&&this._writableState.finished&&this.destroy()}function n(e){this.removeListener("error",n),this.destroy(),0===this.listenerCount("error")&&this.emit("error",e)}t.exports=function(e,t){let r=!0,a=new s({...t,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return e.on("message",function(t,r){let s=!r&&a._readableState.objectMode?t.toString():t;a.push(s)||e.pause()}),e.once("error",function(e){a.destroyed||(r=!1,a.destroy(e))}),e.once("close",function(){a.destroyed||a.push(null)}),a._destroy=function(t,s){if(e.readyState===e.CLOSED){s(t),process.nextTick(i,a);return}let o=!1;e.once("error",function(e){o=!0,s(e)}),e.once("close",function(){o||s(t),process.nextTick(i,a)}),r&&e.terminate()},a._final=function(t){e.readyState===e.CONNECTING?e.once("open",function(){a._final(t)}):null!==e._socket&&(e._socket._writableState.finished?(t(),a._readableState.endEmitted&&a.destroy()):(e._socket.once("finish",function(){t()}),e.close()))},a._read=function(){e.isPaused&&e.resume()},a._write=function(t,r,s){e.readyState===e.CONNECTING?e.once("open",function(){a._write(t,r,s)}):e.send(t,s)},a.on("end",o),a.on("error",n),a}},72038,(e,t,r)=>{let{tokenChars:s}=e.r(6921);t.exports={parse:function(e){let t=new Set,r=-1,i=-1,o=0;for(;o<e.length;o++){let n=e.charCodeAt(o);if(-1===i&&1===s[n])-1===r&&(r=o);else if(0!==o&&(32===n||9===n))-1===i&&-1!==r&&(i=o);else if(44===n){if(-1===r)throw SyntaxError(`Unexpected character at index ${o}`);-1===i&&(i=o);let s=e.slice(r,i);if(t.has(s))throw SyntaxError(`The "${s}" subprotocol is duplicated`);t.add(s),r=i=-1}else throw SyntaxError(`Unexpected character at index ${o}`)}if(-1===r||-1!==i)throw SyntaxError("Unexpected end of input");let n=e.slice(r,o);if(t.has(n))throw SyntaxError(`The "${n}" subprotocol is duplicated`);return t.add(n),t}}},6921,(e,t,r)=>{let{isUtf8:s}=e.r(874),{hasBlob:i}=e.r(15517);function o(e){let t=e.length,r=0;for(;r<t;)if((128&e[r])==0)r++;else if((224&e[r])==192){if(r+1===t||(192&e[r+1])!=128||(254&e[r])==192)return!1;r+=2}else if((240&e[r])==224){if(r+2>=t||(192&e[r+1])!=128||(192&e[r+2])!=128||224===e[r]&&(224&e[r+1])==128||237===e[r]&&(224&e[r+1])==160)return!1;r+=3}else{if((248&e[r])!=240||r+3>=t||(192&e[r+1])!=128||(192&e[r+2])!=128||(192&e[r+3])!=128||240===e[r]&&(240&e[r+1])==128||244===e[r]&&e[r+1]>143||e[r]>244)return!1;r+=4}return!0}if(t.exports={isBlob:function(e){return i&&"object"==typeof e&&"function"==typeof e.arrayBuffer&&"string"==typeof e.type&&"function"==typeof e.stream&&("Blob"===e[Symbol.toStringTag]||"File"===e[Symbol.toStringTag])},isValidStatusCode:function(e){return e>=1e3&&e<=1014&&1004!==e&&1005!==e&&1006!==e||e>=3e3&&e<=4999},isValidUTF8:o,tokenChars:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0]},s)t.exports.isValidUTF8=function(e){return e.length<24?o(e):s(e)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let e=(()=>{let e=Error("Cannot find module 'utf-8-validate'");throw e.code="MODULE_NOT_FOUND",e})();t.exports.isValidUTF8=function(t){return t.length<32?o(t):e(t)}}catch(e){}},32174,(e,t,r)=>{let s=e.r(27699),i=e.r(21517),{Duplex:o}=e.r(88947),{createHash:n}=e.r(54799),a=e.r(61892),l=e.r(51468),c=e.r(72038),u=e.r(74272),{CLOSE_TIMEOUT:h,GUID:d,kWebSocket:f}=e.r(15517),p=/^[+/0-9A-Za-z]{22}==$/;function y(e){e._state=2,e.emit("close")}function m(){this.destroy()}function g(e,t,r,s){r=r||i.STATUS_CODES[t],s={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(r),...s},e.once("finish",e.destroy),e.end(`HTTP/1.1 ${t} ${i.STATUS_CODES[t]}\r
|
|
144
|
-
`+Object.keys(s).map(e=>`${e}: ${s[e]}`).join("\r\n")+"\r\n\r\n"+r)}function S(e,t,r,s,i,o){if(e.listenerCount("wsClientError")){let s=Error(i);Error.captureStackTrace(s,S),e.emit("wsClientError",s,r,t)}else g(r,s,i,o)}t.exports=class extends s{constructor(e,t){if(super(),null==(e={allowSynchronousEvents:!0,autoPong:!0,maxBufferedChunks:262144,maxFragments:16384,maxPayload:0x6400000,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:h,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:u,...e}).port&&!e.server&&!e.noServer||null!=e.port&&(e.server||e.noServer)||e.server&&e.noServer)throw TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(null!=e.port?(this._server=i.createServer((e,t)=>{let r=i.STATUS_CODES[426];t.writeHead(426,{"Content-Length":r.length,"Content-Type":"text/plain"}),t.end(r)}),this._server.listen(e.port,e.host,e.backlog,t)):e.server&&(this._server=e.server),this._server){let e=this.emit.bind(this,"connection");this._removeListeners=function(e,t){for(let r of Object.keys(t))e.on(r,t[r]);return function(){for(let r of Object.keys(t))e.removeListener(r,t[r])}}(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(t,r,s)=>{this.handleUpgrade(t,r,s,e)}})}!0===e.perMessageDeflate&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=0}address(){if(this.options.noServer)throw Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(2===this._state){e&&this.once("close",()=>{e(Error("The server is not running"))}),process.nextTick(y,this);return}if(e&&this.once("close",e),1!==this._state)if(this._state=1,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients&&this.clients.size?this._shouldEmitClose=!0:process.nextTick(y,this);else{let e=this._server;this._removeListeners(),this._removeListeners=this._server=null,e.close(()=>{y(this)})}}shouldHandle(e){if(this.options.path){let t=e.url.indexOf("?");if((-1!==t?e.url.slice(0,t):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,t,r,s){t.on("error",m);let i=e.headers["sec-websocket-key"],o=e.headers.upgrade,n=+e.headers["sec-websocket-version"];if("GET"!==e.method)return void S(this,e,t,405,"Invalid HTTP method");if(void 0===o||"websocket"!==o.toLowerCase())return void S(this,e,t,400,"Invalid Upgrade header");if(void 0===i||!p.test(i))return void S(this,e,t,400,"Missing or invalid Sec-WebSocket-Key header");if(13!==n&&8!==n)return void S(this,e,t,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});if(!this.shouldHandle(e))return void g(t,400);let u=e.headers["sec-websocket-protocol"],h=new Set;if(void 0!==u)try{h=c.parse(u)}catch(r){S(this,e,t,400,"Invalid Sec-WebSocket-Protocol header");return}let d=e.headers["sec-websocket-extensions"],f={};if(this.options.perMessageDeflate&&void 0!==d){let r=new l({...this.options.perMessageDeflate,isServer:!0,maxPayload:this.options.maxPayload});try{let e=a.parse(d);e[l.extensionName]&&(r.accept(e[l.extensionName]),f[l.extensionName]=r)}catch(r){S(this,e,t,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let o={origin:e.headers[`${8===n?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(2===this.options.verifyClient.length)return void this.options.verifyClient(o,(o,n,a,l)=>{if(!o)return g(t,n||401,a,l);this.completeUpgrade(f,i,h,e,t,r,s)});if(!this.options.verifyClient(o))return g(t,401)}this.completeUpgrade(f,i,h,e,t,r,s)}completeUpgrade(e,t,r,s,i,o,c){if(!i.readable||!i.writable)return i.destroy();if(i[f])throw Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>0)return g(i,503);let u=n("sha1").update(t+d).digest("base64"),h=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${u}`],p=new this.options.WebSocket(null,void 0,this.options);if(r.size){let e=this.options.handleProtocols?this.options.handleProtocols(r,s):r.values().next().value;e&&(h.push(`Sec-WebSocket-Protocol: ${e}`),p._protocol=e)}if(e[l.extensionName]){let t=e[l.extensionName].params,r=a.format({[l.extensionName]:[t]});h.push(`Sec-WebSocket-Extensions: ${r}`),p._extensions=e}this.emit("headers",h,s),i.write(h.concat("\r\n").join("\r\n")),i.removeListener("error",m),p.setSocket(i,o,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxBufferedChunks:this.options.maxBufferedChunks,maxFragments:this.options.maxFragments,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(p),p.on("close",()=>{this.clients.delete(p),this._shouldEmitClose&&!this.clients.size&&process.nextTick(y,this)})),c(p,s)}}},74272,(e,t,r)=>{let s=e.r(27699),i=e.r(24836),o=e.r(21517),n=e.r(4446),a=e.r(55004),{randomBytes:l,createHash:c}=e.r(54799),{Duplex:u,Readable:h}=e.r(88947),{URL:d}=e.r(92509),f=e.r(51468),p=e.r(59892),y=e.r(38479),{isBlob:m}=e.r(6921),{BINARY_TYPES:g,CLOSE_TIMEOUT:S,EMPTY_BUFFER:b,GUID:_,kForOnEventAttribute:k,kListener:E,kStatusCode:v,kWebSocket:w,NOOP:C}=e.r(15517),{EventTarget:{addEventListener:A,removeEventListener:O}}=e.r(46296),{format:T,parse:R}=e.r(61892),{toBuffer:I}=e.r(97718),x=Symbol("kAborted"),N=[8,13],M=["CONNECTING","OPEN","CLOSING","CLOSED"],D=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;class P extends s{constructor(e,t,r){super(),this._binaryType=g[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=b,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=P.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,null!==e?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,void 0===t?t=[]:Array.isArray(t)||("object"==typeof t&&null!==t?(r=t,t=[]):t=[t]),function e(t,r,s,n){let a,u,h,p,y={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:S,protocolVersion:N[1],maxBufferedChunks:262144,maxFragments:16384,maxPayload:0x6400000,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...n,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(t._autoPong=y.autoPong,t._closeTimeout=y.closeTimeout,!N.includes(y.protocolVersion))throw RangeError(`Unsupported protocol version: ${y.protocolVersion} (supported versions: ${N.join(", ")})`);if(r instanceof d)a=r;else try{a=new d(r)}catch{throw SyntaxError(`Invalid URL: ${r}`)}"http:"===a.protocol?a.protocol="ws:":"https:"===a.protocol&&(a.protocol="wss:"),t._url=a.href;let m="wss:"===a.protocol,g="ws+unix:"===a.protocol;if("ws:"===a.protocol||m||g?g&&!a.pathname?u="The URL's pathname is empty":a.hash&&(u="The URL contains a fragment identifier"):u='The URL\'s protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"',u){let e=SyntaxError(u);if(0!==t._redirects)return void B(t,e);throw e}let b=m?443:80,k=l(16).toString("base64"),E=m?i.request:o.request,v=new Set;if(y.createConnection=y.createConnection||(m?U:L),y.defaultPort=y.defaultPort||b,y.port=a.port||b,y.host=a.hostname.startsWith("[")?a.hostname.slice(1,-1):a.hostname,y.headers={...y.headers,"Sec-WebSocket-Version":y.protocolVersion,"Sec-WebSocket-Key":k,Connection:"Upgrade",Upgrade:"websocket"},y.path=a.pathname+a.search,y.timeout=y.handshakeTimeout,y.perMessageDeflate&&(h=new f({...y.perMessageDeflate,isServer:!1,maxPayload:y.maxPayload}),y.headers["Sec-WebSocket-Extensions"]=T({[f.extensionName]:h.offer()})),s.length){for(let e of s){if("string"!=typeof e||!D.test(e)||v.has(e))throw SyntaxError("An invalid or duplicated subprotocol was specified");v.add(e)}y.headers["Sec-WebSocket-Protocol"]=s.join(",")}if(y.origin&&(y.protocolVersion<13?y.headers["Sec-WebSocket-Origin"]=y.origin:y.headers.Origin=y.origin),(a.username||a.password)&&(y.auth=`${a.username}:${a.password}`),g){let e=y.path.split(":");y.socketPath=e[0],y.path=e[1]}if(y.followRedirects){if(0===t._redirects){t._originalIpc=g,t._originalSecure=m,t._originalHostOrSocketPath=g?y.socketPath:a.host;let e=n&&n.headers;if(n={...n,headers:{}},e)for(let[t,r]of Object.entries(e))n.headers[t.toLowerCase()]=r}else if(0===t.listenerCount("redirect")){let e=g?!!t._originalIpc&&y.socketPath===t._originalHostOrSocketPath:!t._originalIpc&&a.host===t._originalHostOrSocketPath;e&&(!t._originalSecure||m)||(delete y.headers.authorization,delete y.headers.cookie,e||delete y.headers.host,y.auth=void 0)}y.auth&&!n.headers.authorization&&(n.headers.authorization="Basic "+Buffer.from(y.auth).toString("base64")),p=t._req=E(y),t._redirects&&t.emit("redirect",t.url,p)}else p=t._req=E(y);y.timeout&&p.on("timeout",()=>{F(t,p,"Opening handshake has timed out")}),p.on("error",e=>{null===p||p[x]||(p=t._req=null,B(t,e))}),p.on("response",i=>{let o=i.headers.location,a=i.statusCode;if(o&&y.followRedirects&&a>=300&&a<400){let i;if(++t._redirects>y.maxRedirects)return void F(t,p,"Maximum redirects exceeded");p.abort();try{i=new d(o,r)}catch(e){B(t,SyntaxError(`Invalid URL: ${o}`));return}e(t,i,s,n)}else t.emit("unexpected-response",p,i)||F(t,p,`Unexpected server response: ${i.statusCode}`)}),p.on("upgrade",(e,r,s)=>{let i;if(t.emit("upgrade",e),t.readyState!==P.CONNECTING)return;p=t._req=null;let o=e.headers.upgrade;if(void 0===o||"websocket"!==o.toLowerCase())return void F(t,r,"Invalid Upgrade header");let n=c("sha1").update(k+_).digest("base64");if(e.headers["sec-websocket-accept"]!==n)return void F(t,r,"Invalid Sec-WebSocket-Accept header");let a=e.headers["sec-websocket-protocol"];if(void 0!==a?v.size?v.has(a)||(i="Server sent an invalid subprotocol"):i="Server sent a subprotocol but none was requested":v.size&&(i="Server sent no subprotocol"),i)return void F(t,r,i);a&&(t._protocol=a);let l=e.headers["sec-websocket-extensions"];if(void 0!==l){let e;if(!h)return void F(t,r,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");try{e=R(l)}catch(e){F(t,r,"Invalid Sec-WebSocket-Extensions header");return}let s=Object.keys(e);if(1!==s.length||s[0]!==f.extensionName)return void F(t,r,"Server indicated an extension that was not requested");try{h.accept(e[f.extensionName])}catch(e){F(t,r,"Invalid Sec-WebSocket-Extensions header");return}t._extensions[f.extensionName]=h}t.setSocket(r,s,{allowSynchronousEvents:y.allowSynchronousEvents,generateMask:y.generateMask,maxBufferedChunks:y.maxBufferedChunks,maxFragments:y.maxFragments,maxPayload:y.maxPayload,skipUTF8Validation:y.skipUTF8Validation})}),y.finishRequest?y.finishRequest(p,t):p.end()}(this,e,t,r)):(this._autoPong=r.autoPong,this._closeTimeout=r.closeTimeout,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){g.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,t,r){let s=new p({allowSynchronousEvents:r.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxBufferedChunks:r.maxBufferedChunks,maxFragments:r.maxFragments,maxPayload:r.maxPayload,skipUTF8Validation:r.skipUTF8Validation}),i=new y(e,this._extensions,r.generateMask);this._receiver=s,this._sender=i,this._socket=e,s[w]=this,i[w]=this,e[w]=this,s.on("conclude",H),s.on("drain",W),s.on("error",G),s.on("message",Q),s.on("ping",K),s.on("pong",q),i.onerror=J,e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),t.length>0&&e.unshift(t),e.on("close",$),e.on("data",X),e.on("end",Z),e.on("error",ee),this._readyState=P.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=P.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[f.extensionName]&&this._extensions[f.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=P.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,t){if(this.readyState!==P.CLOSED){if(this.readyState===P.CONNECTING)return void F(this,this._req,"WebSocket was closed before the connection was established");if(this.readyState===P.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=P.CLOSING,this._sender.close(e,t,!this._isServer,e=>{!e&&(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),Y(this)}}pause(){this.readyState!==P.CONNECTING&&this.readyState!==P.CLOSED&&(this._paused=!0,this._socket.pause())}ping(e,t,r){if(this.readyState===P.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");("function"==typeof e?(r=e,e=t=void 0):"function"==typeof t&&(r=t,t=void 0),"number"==typeof e&&(e=e.toString()),this.readyState!==P.OPEN)?j(this,e,r):(void 0===t&&(t=!this._isServer),this._sender.ping(e||b,t,r))}pong(e,t,r){if(this.readyState===P.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");("function"==typeof e?(r=e,e=t=void 0):"function"==typeof t&&(r=t,t=void 0),"number"==typeof e&&(e=e.toString()),this.readyState!==P.OPEN)?j(this,e,r):(void 0===t&&(t=!this._isServer),this._sender.pong(e||b,t,r))}resume(){this.readyState!==P.CONNECTING&&this.readyState!==P.CLOSED&&(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,t,r){if(this.readyState===P.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");if("function"==typeof t&&(r=t,t={}),"number"==typeof e&&(e=e.toString()),this.readyState!==P.OPEN)return void j(this,e,r);let s={binary:"string"!=typeof e,mask:!this._isServer,compress:!0,fin:!0,...t};this._extensions[f.extensionName]||(s.compress=!1),this._sender.send(e||b,s,r)}terminate(){if(this.readyState!==P.CLOSED){if(this.readyState===P.CONNECTING)return void F(this,this._req,"WebSocket was closed before the connection was established");this._socket&&(this._readyState=P.CLOSING,this._socket.destroy())}}}function B(e,t){e._readyState=P.CLOSING,e._errorEmitted=!0,e.emit("error",t),e.emitClose()}function L(e){return e.path=e.socketPath,n.connect(e)}function U(e){return e.path=void 0,e.servername||""===e.servername||(e.servername=n.isIP(e.host)?"":e.host),a.connect(e)}function F(e,t,r){e._readyState=P.CLOSING;let s=Error(r);Error.captureStackTrace(s,F),t.setHeader?(t[x]=!0,t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),process.nextTick(B,e,s)):(t.destroy(s),t.once("error",e.emit.bind(e,"error")),t.once("close",e.emitClose.bind(e)))}function j(e,t,r){if(t){let r=m(t)?t.size:I(t).length;e._socket?e._sender._bufferedBytes+=r:e._bufferedAmount+=r}if(r){let t=Error(`WebSocket is not open: readyState ${e.readyState} (${M[e.readyState]})`);process.nextTick(r,t)}}function H(e,t){let r=this[w];r._closeFrameReceived=!0,r._closeMessage=t,r._closeCode=e,void 0!==r._socket[w]&&(r._socket.removeListener("data",X),process.nextTick(V,r._socket),1005===e?r.close():r.close(e,t))}function W(){let e=this[w];e.isPaused||e._socket.resume()}function G(e){let t=this[w];void 0!==t._socket[w]&&(t._socket.removeListener("data",X),process.nextTick(V,t._socket),t.close(e[v])),t._errorEmitted||(t._errorEmitted=!0,t.emit("error",e))}function z(){this[w].emitClose()}function Q(e,t){this[w].emit("message",e,t)}function K(e){let t=this[w];t._autoPong&&t.pong(e,!this._isServer,C),t.emit("ping",e)}function q(e){this[w].emit("pong",e)}function V(e){e.resume()}function J(e){let t=this[w];t.readyState!==P.CLOSED&&(t.readyState===P.OPEN&&(t._readyState=P.CLOSING,Y(t)),this._socket.end(),t._errorEmitted||(t._errorEmitted=!0,t.emit("error",e)))}function Y(e){e._closeTimer=setTimeout(e._socket.destroy.bind(e._socket),e._closeTimeout)}function $(){let e=this[w];if(this.removeListener("close",$),this.removeListener("data",X),this.removeListener("end",Z),e._readyState=P.CLOSING,!this._readableState.endEmitted&&!e._closeFrameReceived&&!e._receiver._writableState.errorEmitted&&0!==this._readableState.length){let t=this.read(this._readableState.length);e._receiver.write(t)}e._receiver.end(),this[w]=void 0,clearTimeout(e._closeTimer),e._receiver._writableState.finished||e._receiver._writableState.errorEmitted?e.emitClose():(e._receiver.on("error",z),e._receiver.on("finish",z))}function X(e){this[w]._receiver.write(e)||this.pause()}function Z(){let e=this[w];e._readyState=P.CLOSING,e._receiver.end(),this.end()}function ee(){let e=this[w];this.removeListener("error",ee),this.on("error",C),e&&(e._readyState=P.CLOSING,this.destroy())}Object.defineProperty(P,"CONNECTING",{enumerable:!0,value:M.indexOf("CONNECTING")}),Object.defineProperty(P.prototype,"CONNECTING",{enumerable:!0,value:M.indexOf("CONNECTING")}),Object.defineProperty(P,"OPEN",{enumerable:!0,value:M.indexOf("OPEN")}),Object.defineProperty(P.prototype,"OPEN",{enumerable:!0,value:M.indexOf("OPEN")}),Object.defineProperty(P,"CLOSING",{enumerable:!0,value:M.indexOf("CLOSING")}),Object.defineProperty(P.prototype,"CLOSING",{enumerable:!0,value:M.indexOf("CLOSING")}),Object.defineProperty(P,"CLOSED",{enumerable:!0,value:M.indexOf("CLOSED")}),Object.defineProperty(P.prototype,"CLOSED",{enumerable:!0,value:M.indexOf("CLOSED")}),["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(e=>{Object.defineProperty(P.prototype,e,{enumerable:!0})}),["open","error","close","message"].forEach(e=>{Object.defineProperty(P.prototype,`on${e}`,{enumerable:!0,get(){for(let t of this.listeners(e))if(t[k])return t[E];return null},set(t){for(let t of this.listeners(e))if(t[k]){this.removeListener(e,t);break}"function"==typeof t&&this.addEventListener(e,t,{[k]:!0})}})}),P.prototype.addEventListener=A,P.prototype.removeEventListener=O,t.exports=P}],21517,(e,t,r)=>{t.exports=e.x("http",()=>require("http"))},24836,(e,t,r)=>{t.exports=e.x("https",()=>require("https"))},92509,(e,t,r)=>{t.exports=e.x("url",()=>require("url"))},6461,(e,t,r)=>{t.exports=e.x("zlib",()=>require("zlib"))},9030,(e,t,r)=>{t.exports=JSON.parse('{"vadd":{"arity":-5,"flags":["write","denyoom","module"],"keyStart":1,"keyStop":1,"step":1},"vcard":{"arity":2,"flags":["readonly","module","fast"],"keyStart":1,"keyStop":1,"step":1},"vdim":{"arity":2,"flags":["readonly","module","fast"],"keyStart":1,"keyStop":1,"step":1},"vemb":{"arity":-3,"flags":["readonly","module","fast"],"keyStart":1,"keyStop":1,"step":1},"vgetattr":{"arity":3,"flags":["readonly","module","fast"],"keyStart":1,"keyStop":1,"step":1},"vinfo":{"arity":2,"flags":["readonly","module","fast"],"keyStart":1,"keyStop":1,"step":1},"vismember":{"arity":3,"flags":["readonly","module"],"keyStart":1,"keyStop":1,"step":1},"vlinks":{"arity":-3,"flags":["readonly","module","fast"],"keyStart":1,"keyStop":1,"step":1},"vrandmember":{"arity":-2,"flags":["readonly","module"],"keyStart":1,"keyStop":1,"step":1},"vrange":{"arity":-4,"flags":["readonly","module"],"keyStart":1,"keyStop":1,"step":1},"vrem":{"arity":3,"flags":["write","module"],"keyStart":1,"keyStop":1,"step":1},"vsetattr":{"arity":4,"flags":["write","module","fast"],"keyStart":1,"keyStop":1,"step":1},"vsim":{"arity":-4,"flags":["readonly","module"],"keyStart":1,"keyStop":1,"step":1},"acl":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0},"append":{"arity":3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"arcount":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"ardel":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"ardelrange":{"arity":-4,"flags":["write"],"keyStart":1,"keyStop":1,"step":1},"arget":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"argetrange":{"arity":4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"argrep":{"arity":-6,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"arinfo":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"arinsert":{"arity":-3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"arlastitems":{"arity":-3,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"arlen":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"armget":{"arity":-3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"armset":{"arity":-4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"arnext":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"arop":{"arity":-5,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"arring":{"arity":-4,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"arscan":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"arseek":{"arity":3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"arset":{"arity":-4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"asking":{"arity":1,"flags":["fast"],"keyStart":0,"keyStop":0,"step":0},"auth":{"arity":-2,"flags":["noscript","loading","stale","fast","no_auth","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"bgrewriteaof":{"arity":1,"flags":["admin","noscript","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"bgsave":{"arity":-1,"flags":["admin","noscript","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"bitcount":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"bitfield":{"arity":-2,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"bitfield_ro":{"arity":-2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"bitop":{"arity":-4,"flags":["write","denyoom"],"keyStart":2,"keyStop":-1,"step":1},"bitpos":{"arity":-3,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"blmove":{"arity":6,"flags":["write","denyoom","noscript","blocking"],"keyStart":1,"keyStop":2,"step":1},"blmpop":{"arity":-5,"flags":["write","blocking","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"blpop":{"arity":-3,"flags":["write","noscript","blocking"],"keyStart":1,"keyStop":-2,"step":1},"brpop":{"arity":-3,"flags":["write","noscript","blocking"],"keyStart":1,"keyStop":-2,"step":1},"brpoplpush":{"arity":4,"flags":["write","denyoom","noscript","blocking"],"keyStart":1,"keyStop":2,"step":1},"bzmpop":{"arity":-5,"flags":["write","blocking","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"bzpopmax":{"arity":-3,"flags":["write","noscript","blocking","fast"],"keyStart":1,"keyStop":-2,"step":1},"bzpopmin":{"arity":-3,"flags":["write","noscript","blocking","fast"],"keyStart":1,"keyStop":-2,"step":1},"client":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0},"cluster":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0},"command":{"arity":-1,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"config":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0},"copy":{"arity":-3,"flags":["write","denyoom"],"keyStart":1,"keyStop":2,"step":1},"dbsize":{"arity":1,"flags":["readonly","fast"],"keyStart":0,"keyStop":0,"step":0},"debug":{"arity":-2,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"decr":{"arity":2,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"decrby":{"arity":3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"del":{"arity":-2,"flags":["write"],"keyStart":1,"keyStop":-1,"step":1},"discard":{"arity":1,"flags":["noscript","loading","stale","fast","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"dump":{"arity":2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"echo":{"arity":2,"flags":["fast"],"keyStart":0,"keyStop":0,"step":0},"eval":{"arity":-3,"flags":["noscript","stale","skip_monitor","no_mandatory_keys","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"eval_ro":{"arity":-3,"flags":["readonly","noscript","stale","skip_monitor","no_mandatory_keys","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"evalsha":{"arity":-3,"flags":["noscript","stale","skip_monitor","no_mandatory_keys","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"evalsha_ro":{"arity":-3,"flags":["readonly","noscript","stale","skip_monitor","no_mandatory_keys","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"exec":{"arity":1,"flags":["noscript","loading","stale","skip_slowlog"],"keyStart":0,"keyStop":0,"step":0},"exists":{"arity":-2,"flags":["readonly","fast"],"keyStart":1,"keyStop":-1,"step":1},"expire":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"expireat":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"expiretime":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"failover":{"arity":-1,"flags":["admin","noscript","stale"],"keyStart":0,"keyStop":0,"step":0},"fcall":{"arity":-3,"flags":["noscript","stale","skip_monitor","no_mandatory_keys","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"fcall_ro":{"arity":-3,"flags":["readonly","noscript","stale","skip_monitor","no_mandatory_keys","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"flushall":{"arity":-1,"flags":["write"],"keyStart":0,"keyStop":0,"step":0},"flushdb":{"arity":-1,"flags":["write"],"keyStart":0,"keyStop":0,"step":0},"function":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0},"geoadd":{"arity":-5,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"geodist":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"geohash":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"geopos":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"georadius":{"arity":-6,"flags":["write","denyoom","movablekeys"],"keyStart":1,"keyStop":1,"step":1},"georadius_ro":{"arity":-6,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"georadiusbymember":{"arity":-5,"flags":["write","denyoom","movablekeys"],"keyStart":1,"keyStop":1,"step":1},"georadiusbymember_ro":{"arity":-5,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"geosearch":{"arity":-7,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"geosearchstore":{"arity":-8,"flags":["write","denyoom"],"keyStart":1,"keyStop":2,"step":1},"get":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"getbit":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"getdel":{"arity":2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"getex":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"getrange":{"arity":4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"getset":{"arity":3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"hdel":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"hello":{"arity":-1,"flags":["noscript","loading","stale","fast","no_auth","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"hexists":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"hexpire":{"arity":-6,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"hexpireat":{"arity":-6,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"hexpiretime":{"arity":-5,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"hget":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"hgetall":{"arity":2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"hgetdel":{"arity":-5,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"hgetex":{"arity":-5,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"hincrby":{"arity":4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"hincrbyfloat":{"arity":4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"hkeys":{"arity":2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"hlen":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"hmget":{"arity":-3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"hmset":{"arity":-4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"hpersist":{"arity":-5,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"hpexpire":{"arity":-6,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"hpexpireat":{"arity":-6,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"hpexpiretime":{"arity":-5,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"hpttl":{"arity":-5,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"hrandfield":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"hscan":{"arity":-3,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"hset":{"arity":-4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"hsetex":{"arity":-6,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"hsetnx":{"arity":4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"hstrlen":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"httl":{"arity":-5,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"hvals":{"arity":2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"incr":{"arity":2,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"incrby":{"arity":3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"incrbyfloat":{"arity":3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"increx":{"arity":-2,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"info":{"arity":-1,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"keys":{"arity":2,"flags":["readonly"],"keyStart":0,"keyStop":0,"step":0},"lastsave":{"arity":1,"flags":["loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"latency":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0},"lcs":{"arity":-3,"flags":["readonly"],"keyStart":1,"keyStop":2,"step":1},"lindex":{"arity":3,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"linsert":{"arity":5,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"llen":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"lmove":{"arity":5,"flags":["write","denyoom"],"keyStart":1,"keyStop":2,"step":1},"lmpop":{"arity":-4,"flags":["write","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"lolwut":{"arity":-1,"flags":["readonly","fast"],"keyStart":0,"keyStop":0,"step":0},"lpop":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"lpos":{"arity":-3,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"lpush":{"arity":-3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"lpushx":{"arity":-3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"lrange":{"arity":4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"lrem":{"arity":4,"flags":["write"],"keyStart":1,"keyStop":1,"step":1},"lset":{"arity":4,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"ltrim":{"arity":4,"flags":["write"],"keyStart":1,"keyStop":1,"step":1},"memory":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0},"mget":{"arity":-2,"flags":["readonly","fast"],"keyStart":1,"keyStop":-1,"step":1},"migrate":{"arity":-6,"flags":["write","movablekeys"],"keyStart":3,"keyStop":3,"step":1},"module":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0},"monitor":{"arity":1,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"move":{"arity":3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"mset":{"arity":-3,"flags":["write","denyoom"],"keyStart":1,"keyStop":-1,"step":2},"msetex":{"arity":-4,"flags":["write","denyoom","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"msetnx":{"arity":-3,"flags":["write","denyoom"],"keyStart":1,"keyStop":-1,"step":2},"multi":{"arity":1,"flags":["noscript","loading","stale","fast","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"object":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0},"persist":{"arity":2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"pexpire":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"pexpireat":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"pexpiretime":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"pfadd":{"arity":-2,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"pfcount":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":-1,"step":1},"pfdebug":{"arity":3,"flags":["write","denyoom","admin"],"keyStart":2,"keyStop":2,"step":1},"pfmerge":{"arity":-2,"flags":["write","denyoom"],"keyStart":1,"keyStop":-1,"step":1},"pfselftest":{"arity":1,"flags":["admin"],"keyStart":0,"keyStop":0,"step":0},"ping":{"arity":-1,"flags":["fast"],"keyStart":0,"keyStop":0,"step":0},"psetex":{"arity":4,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"psubscribe":{"arity":-2,"flags":["pubsub","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"psync":{"arity":-3,"flags":["admin","noscript","no_async_loading","no_multi"],"keyStart":0,"keyStop":0,"step":0},"pttl":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"publish":{"arity":3,"flags":["pubsub","loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"pubsub":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0},"punsubscribe":{"arity":-1,"flags":["pubsub","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"quit":{"arity":-1,"flags":["noscript","loading","stale","fast","no_auth","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"randomkey":{"arity":1,"flags":["readonly"],"keyStart":0,"keyStop":0,"step":0},"readonly":{"arity":1,"flags":["loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"readwrite":{"arity":1,"flags":["loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"rename":{"arity":3,"flags":["write"],"keyStart":1,"keyStop":2,"step":1},"renamenx":{"arity":3,"flags":["write","fast"],"keyStart":1,"keyStop":2,"step":1},"replconf":{"arity":-1,"flags":["admin","noscript","loading","stale","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"replicaof":{"arity":3,"flags":["admin","noscript","stale","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"reset":{"arity":1,"flags":["noscript","loading","stale","fast","no_auth","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"restore":{"arity":-4,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"restore-asking":{"arity":-4,"flags":["write","denyoom","asking"],"keyStart":1,"keyStop":1,"step":1},"role":{"arity":1,"flags":["noscript","loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"rpop":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"rpoplpush":{"arity":3,"flags":["write","denyoom"],"keyStart":1,"keyStop":2,"step":1},"rpush":{"arity":-3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"rpushx":{"arity":-3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"sadd":{"arity":-3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"save":{"arity":1,"flags":["admin","noscript","no_async_loading","no_multi"],"keyStart":0,"keyStop":0,"step":0},"scan":{"arity":-2,"flags":["readonly"],"keyStart":0,"keyStop":0,"step":0},"scard":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"script":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0},"sdiff":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":-1,"step":1},"sdiffstore":{"arity":-3,"flags":["write","denyoom"],"keyStart":1,"keyStop":-1,"step":1},"select":{"arity":2,"flags":["loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"set":{"arity":-3,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"setbit":{"arity":4,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"setex":{"arity":4,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"setnx":{"arity":3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"setrange":{"arity":4,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"shutdown":{"arity":-1,"flags":["admin","noscript","loading","stale","no_multi","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"sinter":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":-1,"step":1},"sintercard":{"arity":-3,"flags":["readonly","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"sinterstore":{"arity":-3,"flags":["write","denyoom"],"keyStart":1,"keyStop":-1,"step":1},"sismember":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"slaveof":{"arity":3,"flags":["admin","noscript","stale","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"slowlog":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0},"smembers":{"arity":2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"smismember":{"arity":-3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"smove":{"arity":4,"flags":["write","fast"],"keyStart":1,"keyStop":2,"step":1},"sort":{"arity":-2,"flags":["write","denyoom","movablekeys"],"keyStart":1,"keyStop":1,"step":1},"sort_ro":{"arity":-2,"flags":["readonly","movablekeys"],"keyStart":1,"keyStop":1,"step":1},"spop":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"spublish":{"arity":3,"flags":["pubsub","loading","stale","fast"],"keyStart":1,"keyStop":1,"step":1},"srandmember":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"srem":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"sscan":{"arity":-3,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"ssubscribe":{"arity":-2,"flags":["pubsub","noscript","loading","stale"],"keyStart":1,"keyStop":-1,"step":1},"strlen":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"subscribe":{"arity":-2,"flags":["pubsub","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"substr":{"arity":4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"sunion":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":-1,"step":1},"sunionstore":{"arity":-3,"flags":["write","denyoom"],"keyStart":1,"keyStop":-1,"step":1},"sunsubscribe":{"arity":-1,"flags":["pubsub","noscript","loading","stale"],"keyStart":1,"keyStop":-1,"step":1},"swapdb":{"arity":3,"flags":["write","fast"],"keyStart":0,"keyStop":0,"step":0},"sync":{"arity":1,"flags":["admin","noscript","no_async_loading","no_multi"],"keyStart":0,"keyStop":0,"step":0},"time":{"arity":1,"flags":["loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"touch":{"arity":-2,"flags":["readonly","fast"],"keyStart":1,"keyStop":-1,"step":1},"ttl":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"type":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"unlink":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":-1,"step":1},"unsubscribe":{"arity":-1,"flags":["pubsub","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"unwatch":{"arity":1,"flags":["noscript","loading","stale","fast","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"wait":{"arity":3,"flags":["noscript"],"keyStart":0,"keyStop":0,"step":0},"watch":{"arity":-2,"flags":["noscript","loading","stale","fast","allow_busy"],"keyStart":1,"keyStop":-1,"step":1},"xack":{"arity":-4,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"xadd":{"arity":-5,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"xautoclaim":{"arity":-6,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"xclaim":{"arity":-6,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"xdel":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"xdelex":{"arity":-5,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"xgroup":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0},"xinfo":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0},"xlen":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"xnack":{"arity":-7,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"xpending":{"arity":-3,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"xrange":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"xread":{"arity":-4,"flags":["readonly","blocking","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"xreadgroup":{"arity":-7,"flags":["write","blocking","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"xrevrange":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"xsetid":{"arity":-3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"xtrim":{"arity":-4,"flags":["write"],"keyStart":1,"keyStop":1,"step":1},"zadd":{"arity":-4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"zcard":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"zcount":{"arity":4,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"zdiff":{"arity":-3,"flags":["readonly","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"zdiffstore":{"arity":-4,"flags":["write","denyoom","movablekeys"],"keyStart":1,"keyStop":1,"step":1},"zincrby":{"arity":4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"zinter":{"arity":-3,"flags":["readonly","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"zintercard":{"arity":-3,"flags":["readonly","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"zinterstore":{"arity":-4,"flags":["write","denyoom","movablekeys"],"keyStart":1,"keyStop":1,"step":1},"zlexcount":{"arity":4,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"zmpop":{"arity":-4,"flags":["write","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"zmscore":{"arity":-3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"zpopmax":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"zpopmin":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"zrandmember":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zrange":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zrangebylex":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zrangebyscore":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zrangestore":{"arity":-5,"flags":["write","denyoom"],"keyStart":1,"keyStop":2,"step":1},"zrank":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"zrem":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"zremrangebylex":{"arity":4,"flags":["write"],"keyStart":1,"keyStop":1,"step":1},"zremrangebyrank":{"arity":4,"flags":["write"],"keyStart":1,"keyStop":1,"step":1},"zremrangebyscore":{"arity":4,"flags":["write"],"keyStart":1,"keyStop":1,"step":1},"zrevrange":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zrevrangebylex":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zrevrangebyscore":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zrevrank":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"zscan":{"arity":-3,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zscore":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"zunion":{"arity":-3,"flags":["readonly","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"zunionstore":{"arity":-4,"flags":["write","denyoom","movablekeys"],"keyStart":1,"keyStop":1,"step":1}}')},43594,(e,t,r)=>{var s=[0,4129,8258,12387,16516,20645,24774,28903,33032,37161,41290,45419,49548,53677,57806,61935,4657,528,12915,8786,21173,17044,29431,25302,37689,33560,45947,41818,54205,50076,62463,58334,9314,13379,1056,5121,25830,29895,17572,21637,42346,46411,34088,38153,58862,62927,50604,54669,13907,9842,5649,1584,30423,26358,22165,18100,46939,42874,38681,34616,63455,59390,55197,51132,18628,22757,26758,30887,2112,6241,10242,14371,51660,55789,59790,63919,35144,39273,43274,47403,23285,19156,31415,27286,6769,2640,14899,10770,56317,52188,64447,60318,39801,35672,47931,43802,27814,31879,19684,23749,11298,15363,3168,7233,60846,64911,52716,56781,44330,48395,36200,40265,32407,28342,24277,20212,15891,11826,7761,3696,65439,61374,57309,53244,48923,44858,40793,36728,37256,33193,45514,41451,53516,49453,61774,57711,4224,161,12482,8419,20484,16421,28742,24679,33721,37784,41979,46042,49981,54044,58239,62302,689,4752,8947,13010,16949,21012,25207,29270,46570,42443,38312,34185,62830,58703,54572,50445,13538,9411,5280,1153,29798,25671,21540,17413,42971,47098,34713,38840,59231,63358,50973,55100,9939,14066,1681,5808,26199,30326,17941,22068,55628,51565,63758,59695,39368,35305,47498,43435,22596,18533,30726,26663,6336,2273,14466,10403,52093,56156,60223,64286,35833,39896,43963,48026,19061,23124,27191,31254,2801,6864,10931,14994,64814,60687,56684,52557,48554,44427,40424,36297,31782,27655,23652,19525,15522,11395,7392,3265,61215,65342,53085,57212,44955,49082,36825,40952,28183,32310,20053,24180,11923,16050,3793,7920],i=function(e){for(var t,r=0,s=0,i=[],o=e.length;r<o;r++)(t=e.charCodeAt(r))<128?i[s++]=t:(t<2048?i[s++]=t>>6|192:((64512&t)==55296&&r+1<e.length&&(64512&e.charCodeAt(r+1))==56320?(t=65536+((1023&t)<<10)+(1023&e.charCodeAt(++r)),i[s++]=t>>18|240,i[s++]=t>>12&63|128):i[s++]=t>>12|224,i[s++]=t>>6&63|128),i[s++]=63&t|128);return i},o=t.exports=function(e){for(var t,r=0,o=-1,n=0,a=0,l="string"==typeof e?i(e):e,c=l.length;r<c;){if(t=l[r++],-1===o)123===t&&(o=r);else if(125!==t)a=s[(t^a>>8)&255]^a<<8;else if(r-1!==o)return 16383&a;n=s[(t^n>>8)&255]^n<<8}return 16383&n};t.exports.generateMulti=function(e){for(var t=1,r=e.length,s=o(e[0]);t<r;)if(o(e[t++])!==s)return -1;return s}},80353,(e,t,r)=>{let s;r.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;let r="color: "+this.color;e.splice(1,0,r,"color: inherit");let s=0,i=0;e[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(s++,"%c"===e&&(i=s))}),e.splice(i,0,r)},r.save=function(e){try{e?r.storage.setItem("debug",e):r.storage.removeItem("debug")}catch(e){}},r.load=function(){let e;try{e=r.storage.getItem("debug")||r.storage.getItem("DEBUG")}catch(e){}return!e&&"u">typeof process&&"env"in process&&(e=process.env.DEBUG),e},r.useColors=function(){let e;return!("u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("u">typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"u">typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},r.storage=function(){try{return localStorage}catch(e){}}(),s=!1,r.destroy=()=>{s||(s=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))},r.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],r.log=console.debug||console.log||(()=>{}),t.exports=e.r(20319)(r);let{formatters:i}=t.exports;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},20319,(e,t,r)=>{t.exports=function(t){function r(e){let t,i,o,n=null;function a(...e){if(!a.enabled)return;let s=Number(new Date);a.diff=s-(t||s),a.prev=t,a.curr=s,t=s,e[0]=r.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let i=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(t,s)=>{if("%%"===t)return"%";i++;let o=r.formatters[s];if("function"==typeof o){let r=e[i];t=o.call(a,r),e.splice(i,1),i--}return t}),r.formatArgs.call(a,e),(a.log||r.log).apply(a,e)}return a.namespace=e,a.useColors=r.useColors(),a.color=r.selectColor(e),a.extend=s,a.destroy=r.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==n?n:(i!==r.namespaces&&(i=r.namespaces,o=r.enabled(e)),o),set:e=>{n=e}}),"function"==typeof r.init&&r.init(a),a}function s(e,t){let s=r(this.namespace+(void 0===t?":":t)+e);return s.log=this.log,s}function i(e,t){let r=0,s=0,i=-1,o=0;for(;r<e.length;)if(s<t.length&&(t[s]===e[r]||"*"===t[s]))"*"===t[s]?(i=s,o=r):r++,s++;else{if(-1===i)return!1;s=i+1,r=++o}for(;s<t.length&&"*"===t[s];)s++;return s===t.length}return r.debug=r,r.default=r,r.coerce=function(e){return e instanceof Error?e.stack||e.message:e},r.disable=function(){let e=[...r.names,...r.skips.map(e=>"-"+e)].join(",");return r.enable(""),e},r.enable=function(e){for(let t of(r.save(e),r.namespaces=e,r.names=[],r.skips=[],("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean)))"-"===t[0]?r.skips.push(t.slice(1)):r.names.push(t)},r.enabled=function(e){for(let t of r.skips)if(i(e,t))return!1;for(let t of r.names)if(i(e,t))return!0;return!1},r.humanize=e.r(51550),r.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(t).forEach(e=>{r[e]=t[e]}),r.names=[],r.skips=[],r.formatters={},r.selectColor=function(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r)|0;return r.colors[Math.abs(t)%r.colors.length]},r.enable(r.load()),r}},26914,(e,t,r)=>{"u"<typeof process||"renderer"===process.type||process.__nwjs?t.exports=e.r(80353):t.exports=e.r(78766)},78766,(e,t,r)=>{let s=e.r(70722),i=e.r(24361);r.init=function(e){e.inspectOpts={};let t=Object.keys(r.inspectOpts);for(let s=0;s<t.length;s++)e.inspectOpts[t[s]]=r.inspectOpts[t[s]]},r.log=function(...e){return process.stderr.write(i.formatWithOptions(r.inspectOpts,...e)+"\n")},r.formatArgs=function(e){let{namespace:s,useColors:i}=this;if(i){let r=this.color,i="\x1b[3"+(r<8?r:"8;5;"+r),o=` ${i};1m${s} \x1b[0m`;e[0]=o+e[0].split("\n").join("\n"+o),e.push(i+"m+"+t.exports.humanize(this.diff)+"\x1b[0m")}else e[0]=(r.inspectOpts.hideDate?"":new Date().toISOString()+" ")+s+" "+e[0]},r.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},r.load=function(){return process.env.DEBUG},r.useColors=function(){return"colors"in r.inspectOpts?!!r.inspectOpts.colors:s.isatty(process.stderr.fd)},r.destroy=i.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),r.colors=[6,2,3,4,5,1];try{let e=(()=>{let e=Error("Cannot find module 'supports-color'");throw e.code="MODULE_NOT_FOUND",e})();e&&(e.stderr||e).level>=2&&(r.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}r.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),s=process.env[t];return s=!!/^(yes|on|true|enabled)$/i.test(s)||!/^(no|off|false|disabled)$/i.test(s)&&("null"===s?null:Number(s)),e[r]=s,e},{}),t.exports=e.r(20319)(r);let{formatters:o}=t.exports;o.o=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts).split("\n").map(e=>e.trim()).join(" ")},o.O=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts)}},51550,(e,t,r)=>{function s(e,t,r,s){return Math.round(e/r)+" "+s+(t>=1.5*r?"s":"")}t.exports=function(e,t){t=t||{};var r,i,o,n,a=typeof e;if("string"===a&&e.length>0){var l=e;if(!((l=String(l)).length>100)){var c=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(l);if(c){var u=parseFloat(c[1]);switch((c[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*u;case"weeks":case"week":case"w":return 6048e5*u;case"days":case"day":case"d":return 864e5*u;case"hours":case"hour":case"hrs":case"hr":case"h":return 36e5*u;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*u;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*u;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:break}}}return}if("number"===a&&isFinite(e)){return t.long?(i=Math.abs(r=e))>=864e5?s(r,i,864e5,"day"):i>=36e5?s(r,i,36e5,"hour"):i>=6e4?s(r,i,6e4,"minute"):i>=1e3?s(r,i,1e3,"second"):r+" ms":(n=Math.abs(o=e))>=864e5?Math.round(o/864e5)+"d":n>=36e5?Math.round(o/36e5)+"h":n>=6e4?Math.round(o/6e4)+"m":n>=1e3?Math.round(o/1e3)+"s":o+"ms"}throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}];
|
|
143
|
+
-----END CERTIFICATE-----`;r.default={RedisCloudFixed:{ca:s},RedisCloudFlexible:{ca:s}}},93474,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});let s=e.r(87315);class i extends s.RedisError{constructor(e,t){super(e),this.lastNodeError=t,Error.captureStackTrace(this,this.constructor)}get name(){return this.constructor.name}}r.default=i,i.defaultMessage="Failed to refresh slots cache."},91217,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});let s=e.r(87315);class i extends s.AbortError{constructor(e){super(`Reached the max retries per request limit (which is ${e}). Refer to "maxRetriesPerRequest" option for details.`),Error.captureStackTrace(this,this.constructor)}get name(){return this.constructor.name}}r.default=i},59788,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.MaxRetriesPerRequestError=void 0,r.MaxRetriesPerRequestError=e.r(91217).default},6401,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.print=r.ReplyError=r.SentinelIterator=r.SentinelConnector=r.AbstractConnector=r.Pipeline=r.ScanStream=r.Command=r.Cluster=r.Redis=r.default=void 0,r=t.exports=e.r(45375).default;var s=e.r(45375);Object.defineProperty(r,"default",{enumerable:!0,get:function(){return s.default}});var i=e.r(45375);Object.defineProperty(r,"Redis",{enumerable:!0,get:function(){return i.default}});var n=e.r(58063);Object.defineProperty(r,"Cluster",{enumerable:!0,get:function(){return n.default}});var o=e.r(59026);Object.defineProperty(r,"Command",{enumerable:!0,get:function(){return o.default}});var a=e.r(59875);Object.defineProperty(r,"ScanStream",{enumerable:!0,get:function(){return a.default}});var l=e.r(60520);Object.defineProperty(r,"Pipeline",{enumerable:!0,get:function(){return l.default}});var c=e.r(12251);Object.defineProperty(r,"AbstractConnector",{enumerable:!0,get:function(){return c.default}});var u=e.r(3107);Object.defineProperty(r,"SentinelConnector",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(r,"SentinelIterator",{enumerable:!0,get:function(){return u.SentinelIterator}}),r.ReplyError=e.r(87315).ReplyError,Object.defineProperty(r,"Promise",{get:()=>(console.warn("ioredis v5 does not support plugging third-party Promise library anymore. Native Promise will be used."),Promise),set(e){console.warn("ioredis v5 does not support plugging third-party Promise library anymore. Native Promise will be used.")}}),r.print=function(e,t){e?console.log("Error: "+e):console.log("Reply: "+t)}},80494,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_REDIS_OPTIONS=void 0,r.DEFAULT_REDIS_OPTIONS={port:6379,host:"localhost",family:0,connectTimeout:1e4,disconnectTimeout:2e3,retryStrategy:function(e){return Math.min(50*e,2e3)},keepAlive:0,noDelay:!0,connectionName:null,disableClientInfo:!1,clientInfoTag:void 0,sentinels:null,name:null,role:"master",sentinelRetryStrategy:function(e){return Math.min(10*e,1e3)},sentinelReconnectStrategy:function(){return 6e4},natMap:null,enableTLSForSentinelMode:!1,updateSentinels:!0,failoverDetector:!1,username:null,password:null,db:0,enableOfflineQueue:!0,enableReadyCheck:!0,autoResubscribe:!0,autoResendUnfulfilledCommands:!0,lazyConnect:!1,keyPrefix:"",reconnectOnError:null,readOnly:!1,stringNumbers:!1,maxRetriesPerRequest:20,maxLoadingRetryTime:1e4,enableAutoPipelining:!1,autoPipeliningIgnoredCommands:[],sentinelMaxConnections:10,blockingTimeoutGrace:100}},3046,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.readyHandler=r.errorHandler=r.closeHandler=r.connectHandler=void 0;let s=e.r(87315),i=e.r(59026),n=e.r(59788),o=e.r(13895),a=e.r(92683),l=(0,o.Debug)("connection");function c(e){let t=new s.AbortError("Command aborted due to connection close");return t.command={name:e.name,args:e.args},t}r.connectHandler=function(e){return function(){var t;e.setStatus("connect"),e.resetCommandQueue();let s=!1,{connectionEpoch:i}=e;e.condition.auth&&e.auth(e.condition.auth,function(t){i===e.connectionEpoch&&t&&(-1!==t.message.indexOf("no password is set")?console.warn("[WARN] Redis server does not require a password, but a password was supplied."):-1!==t.message.indexOf("without any password configured for the default user")?console.warn("[WARN] This Redis server's `default` user does not require a password, but a password was supplied"):-1!==t.message.indexOf("wrong number of arguments for 'auth' command")?console.warn("[ERROR] The server returned \"wrong number of arguments for 'auth' command\". You are probably passing both username and password to Redis version 5 or below. You should only pass the 'password' option for Redis version 5 and under."):(s=!0,e.recoverFromFatalError(t,t)))}),e.condition.select&&e.select(e.condition.select).catch(t=>{e.silentEmit("error",t)}),new a.default(e,{stringNumbers:e.options.stringNumbers});let n=[];e.options.connectionName&&(l("set the connection name [%s]",e.options.connectionName),n.push(e.client("setname",e.options.connectionName).catch(o.noop))),e.options.disableClientInfo||(l("set the client info"),n.push((0,o.getPackageMeta)().then(t=>e.client("SETINFO","LIB-VER",t.version).catch(o.noop)).catch(o.noop)),n.push(e.client("SETINFO","LIB-NAME",(null==(t=e.options)?void 0:t.clientInfoTag)?`ioredis(${e.options.clientInfoTag})`:"ioredis").catch(o.noop))),Promise.all(n).catch(o.noop).finally(()=>{e.options.enableReadyCheck||r.readyHandler(e)(),e.options.enableReadyCheck&&e._readyCheck(function(t,n){i===e.connectionEpoch&&(t?s||e.recoverFromFatalError(Error("Ready check failed: "+t.message),t):e.connector.check(n)?r.readyHandler(e)():e.disconnect(!0))})})}},r.closeHandler=function(e){return function(){let r=e.status;if(e.setStatus("close"),e.commandQueue.length&&function(e){var t;let r=0;for(let s=0;s<e.length;){let i=null==(t=e.peekAt(s))?void 0:t.command,n=i.pipelineIndex;if((void 0===n||0===n)&&(r=0),void 0!==n&&n!==r++){e.remove(s,1),i.reject(c(i));continue}s++}}(e.commandQueue),e.offlineQueue.length&&function(e){var t;for(let r=0;r<e.length;){let s=null==(t=e.peekAt(r))?void 0:t.command;if("multi"===s.name)break;if("exec"===s.name){e.remove(r,1),s.reject(c(s));break}s.inTransaction?(e.remove(r,1),s.reject(c(s))):r++}}(e.offlineQueue),"ready"===r&&(e.prevCondition||(e.prevCondition=e.condition),e.commandQueue.length&&(e.prevCommandQueue=e.commandQueue)),e.manuallyClosing)return e.manuallyClosing=!1,l("skip reconnecting since the connection is manually closed."),t();if("function"!=typeof e.options.retryStrategy)return l("skip reconnecting because `retryStrategy` is not a function"),t();let s=e.options.retryStrategy(++e.retryAttempts);if("number"!=typeof s)return l("skip reconnecting because `retryStrategy` doesn't return a number"),t();l("reconnect in %sms",s),e.setStatus("reconnecting",s),e.reconnectTimeout=setTimeout(function(){e.reconnectTimeout=null,e.connect().catch(o.noop)},s);let{maxRetriesPerRequest:i}=e.options;"number"==typeof i&&(i<0?l("maxRetriesPerRequest is negative, ignoring..."):0==e.retryAttempts%(i+1)&&(l("reach maxRetriesPerRequest limitation, flushing command queue..."),e.flushQueue(new n.MaxRetriesPerRequestError(i))))};function t(){e.setStatus("end"),e.flushQueue(Error(o.CONNECTION_CLOSED_ERROR_MSG))}},r.errorHandler=function(e){return function(t){l("error: %s",t),e.silentEmit("error",t)}},r.readyHandler=function(e){return function(){if(e.setStatus("ready"),e.retryAttempts=0,e.options.monitor){e.call("monitor").then(()=>e.setStatus("monitoring"),t=>e.emit("error",t));let{sendCommand:t}=e;e.sendCommand=function(r){return i.default.checkFlag("VALID_IN_MONITOR_MODE",r.name)?t.call(e,r):(r.reject(Error("Connection is in monitoring mode, can't process commands.")),r.promise)},e.once("close",function(){delete e.sendCommand});return}let t=e.prevCondition?e.prevCondition.select:e.condition.select;if(e.options.readOnly&&(l("set the connection to readonly mode"),e.readonly().catch(o.noop)),e.prevCondition){let r=e.prevCondition;if(e.prevCondition=null,r.subscriber&&e.options.autoResubscribe){e.condition.select!==t&&(l("connect to db [%d]",t),e.select(t));let s=r.subscriber.channels("subscribe");s.length&&(l("subscribe %d channels",s.length),e.subscribe(s));let i=r.subscriber.channels("psubscribe");i.length&&(l("psubscribe %d channels",i.length),e.psubscribe(i));let n=r.subscriber.channels("ssubscribe");if(n.length)for(let t of(l("ssubscribe %s",n.length),n))e.ssubscribe(t)}}if(e.prevCommandQueue)if(e.options.autoResendUnfulfilledCommands)for(l("resend %d unfulfilled commands",e.prevCommandQueue.length);e.prevCommandQueue.length>0;){let t=e.prevCommandQueue.shift();t.select!==e.condition.select&&"select"!==t.command.name&&e.select(t.select),e.sendCommand(t.command,t.stream)}else e.prevCommandQueue=null;if(e.offlineQueue.length){l("send %d commands in offline queue",e.offlineQueue.length);let t=e.offlineQueue;for(e.resetOfflineQueue();t.length>0;){let r=t.shift();r.select!==e.condition.select&&"select"!==r.command.name&&e.select(r.select),e.sendCommand(r.command,r.stream)}}e.condition.select!==t&&(l("connect to db [%d]",t),e.select(t))}}},94455,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.traceConnect=r.traceBatch=r.traceCommand=r.sanitizeArgs=void 0;let s=[{regex:/^ECHO/i,args:0},{regex:/^(LPUSH|MSET|PFA|PUBLISH|RPUSH|SADD|SET|SPUBLISH|XADD|ZADD)/i,args:1},{regex:/^(HSET|HMSET|LSET|LINSERT)/i,args:2},{regex:/^(ACL|BIT|B[LRZ]|CLIENT|CLUSTER|CONFIG|COMMAND|DECR|DEL|EVAL|EX|FUNCTION|GEO|GET|HINCR|HMGET|HSCAN|INCR|L[TRLM]|MEMORY|P[EFISTU]|RPOP|S[CDIMORSU]|XACK|X[CDGILPRT]|Z[CDILMPRS])/i,args:-1}];r.sanitizeArgs=function(e,t){let r=0;for(let t of s)if(t.regex.test(e)){r=t.args;break}if(-1===r)return t.map(e=>String(e));let i=[];for(let e=0;e<t.length;e++)e<r?i.push(String(t[e])):i.push("?");return i};let i=(()=>{try{return"getBuiltinModule"in process?process.getBuiltinModule("node:diagnostics_channel"):e.r(77652)}catch{return}})(),n=i&&"function"==typeof i.tracingChannel,o=n?i.tracingChannel("ioredis:command"):void 0,a=n?i.tracingChannel("ioredis:batch"):void 0,l=n?i.tracingChannel("ioredis:connect"):void 0;function c(e){return!!e&&!1!==e.hasSubscribers}let u=()=>{};r.traceCommand=function(e,t){if(!c(o))return e();let r=o.tracePromise(e,t());return r.catch(u),r},r.traceBatch=function(e,t){if(!c(a))return e();let r=a.tracePromise(e,t());return r.catch(u),r},r.traceConnect=function(e,t){return c(l)?l.tracePromise(e,t()):e()}},60886,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.addTransactionSupport=void 0;let s=e.r(13895),i=e.r(42351),n=e.r(60520),o=e.r(94455);r.addTransactionSupport=function(e){e.pipeline=function(e){let t=new n.default(this);return Array.isArray(e)&&t.addBatch(e),t};let{multi:t}=e;e.multi=function(e,r){if(void 0!==r||Array.isArray(e)||(r=e,e=null),r&&!1===r.pipeline)return t.call(this);let a=new n.default(this);a.multi(),Array.isArray(e)&&a.addBatch(e);let l=a.exec;a.exec=function(e){if(this.isCluster&&!this.redis.slots.length)return"wait"===this.redis.status&&this.redis.connect().catch(s.noop),(0,i.default)(new Promise((e,t)=>{this.redis.delayUntilReady(r=>{r?t(r):this.exec(a).then(e,t)})}),e);if(this._transactions>0&&l.call(a),this.nodeifiedPromise)return l.call(a);let t=Math.max(a.length-2,0),r=()=>l.call(a).then(function(e){let t=e[e.length-1];if(void 0===t)throw Error("Pipeline cannot be used to send any commands when the `exec()` has been called on it.");if(t[0]){t[0].previousErrors=[];for(let r=0;r<e.length-1;++r)e[r][0]&&t[0].previousErrors.push(e[r][0]);throw t[0]}return(0,s.wrapMultiResult)(t[1])}),n="_buildBatchContext"in this.redis?(0,o.traceBatch)(r,()=>this.redis._buildBatchContext(t)):r();return(0,i.default)(n,e)};let{execBuffer:c}=a;return a.execBuffer=function(e){return this._transactions>0&&c.call(a),a.exec(e)},a};let{exec:r}=e;e.exec=function(e){return(0,i.default)(r.call(this).then(function(e){return Array.isArray(e)&&(e=(0,s.wrapMultiResult)(e)),e}),e)}}},34207,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});let s=e.r(87693),i=e.r(47145),n=e.r(59026),o=e.r(27743);class a{constructor(){this.options={},this.scriptsSet={},this.addedBuiltinSet=new Set}getBuiltinCommands(){return l.slice(0)}createBuiltinCommand(e){return{string:c(null,e,"utf8"),buffer:c(null,e,null)}}addBuiltinCommand(e){this.addedBuiltinSet.add(e),this[e]=c(e,e,"utf8"),this[e+"Buffer"]=c(e+"Buffer",e,null)}defineCommand(e,t){let r=new o.default(t.lua,t.numberOfKeys,this.options.keyPrefix,t.readOnly);this.scriptsSet[e]=r,this[e]=u(e,e,r,"utf8"),this[e+"Buffer"]=u(e+"Buffer",e,r,null)}sendCommand(e,t,r){throw Error('"sendCommand" is not implemented')}}let l=s.list.filter(e=>"monitor"!==e);function c(e,t,r){return void 0===r&&(r=t,t=null),function(...s){let o=t||s.shift(),a=s[s.length-1];"function"==typeof a?s.pop():a=void 0;let l={errorStack:this.options.showFriendlyErrorStack?Error():void 0,keyPrefix:this.options.keyPrefix,replyEncoding:r};return(0,i.shouldUseAutoPipelining)(this,e,o)?(0,i.executeWithAutoPipelining)(this,e,o,s,a):this.sendCommand(new n.default(o,s,l,a))}}function u(e,t,r,s){return function(...n){let o="function"==typeof n[n.length-1]?n.pop():void 0,a={replyEncoding:s};return(this.options.showFriendlyErrorStack&&(a.errorStack=Error()),(0,i.shouldUseAutoPipelining)(this,e,t))?(0,i.executeWithAutoPipelining)(this,e,t,n,o):r.execute(this,n,a,o)}}l.push("sentinel"),l.forEach(function(e){a.prototype[e]=c(e,e,"utf8"),a.prototype[e+"Buffer"]=c(e+"Buffer",e,null)}),a.prototype.call=c("call","utf8"),a.prototype.callBuffer=c("callBuffer",null),a.prototype.send_command=a.prototype.call,r.default=a},74031,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e,t){Object.getOwnPropertyNames(t.prototype).forEach(r=>{Object.defineProperty(e.prototype,r,Object.getOwnPropertyDescriptor(t.prototype,r))})}},79805,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.parseBlockOption=r.parseSecondsArgument=void 0;let s=e=>{if("number"==typeof e)return e;if(Buffer.isBuffer(e))return s(e.toString());if("string"==typeof e){let t=Number(e);return Number.isFinite(t)?t:void 0}},i=e=>"string"==typeof e?e:Buffer.isBuffer(e)?e.toString():void 0;r.parseSecondsArgument=e=>{let t=s(e);if(void 0!==t)return t<=0?0:1e3*t},r.parseBlockOption=e=>{for(let t=0;t<e.length;t++){let r=i(e[t]);if(r&&"block"===r.toLowerCase()){let r=s(e[t+1]);if(void 0===r)return;if(r<=0)return 0;return r}}return null}},880,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.genRedactedString=r.getStringValue=r.MAX_ARGUMENT_LENGTH=void 0;let s=e.r(26914);function i(e){if(null!==e)switch(typeof e){case"boolean":case"number":return;case"object":if(Buffer.isBuffer(e))return e.toString("hex");if(Array.isArray(e))return e.join(",");try{return JSON.stringify(e)}catch(e){return}case"string":return e}}function n(e,t){let{length:r}=e;return r<=t?e:e.slice(0,t)+' ... <REDACTED full-length="'+r+'">'}r.MAX_ARGUMENT_LENGTH=200,r.getStringValue=i,r.genRedactedString=n,r.default=function(e){let t=(0,s.default)(`ioredis:${e}`);function r(...e){if(t.enabled){for(let t=1;t<e.length;t++){let r=i(e[t]);"string"==typeof r&&r.length>200&&(e[t]=n(r,200))}return t.apply(null,e)}}return Object.defineProperties(r,{namespace:{get:()=>t.namespace},enabled:{get:()=>t.enabled},destroy:{get:()=>t.destroy},log:{get:()=>t.log,set(e){t.log=e}}}),r}},20110,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.defaults=void 0;let s=/^(?:0|[1-9]\d*)$/;function i(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}r.defaults=function(e,...t){e=Object(e);let r=Object.prototype,n=t.length,o=n>2?t[2]:void 0;o&&function(e,t,r){var n;return null!==r&&("object"==typeof r||"function"==typeof r)&&(!!("number"==typeof t&&null!=r&&"function"!=typeof r&&Number.isSafeInteger(n=r.length)&&n>=0&&function(e,t=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e<t;case"symbol":return!1;case"string":return s.test(e)}}(t))&&t<r.length||"string"==typeof t&&t in r)&&i(r[t],e)}(t[0],t[1],o)&&(n=1);for(let s=0;s<n;s++){if(null==t[s])continue;let n=t[s];for(let t in n){let s=e[t];(void 0===s||!r.hasOwnProperty.call(e,t)&&i(s,r[t]))&&(e[t]=n[t])}}return e}},13895,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.noop=r.isArguments=r.defaults=r.Debug=r.getPackageMeta=r.zipMap=r.CONNECTION_CLOSED_ERROR_MSG=r.shuffle=r.sample=r.resolveTLSProfile=r.parseURL=r.optimizeErrorStack=r.toArg=r.convertMapToArray=r.convertObjectToArray=r.timeout=r.packObject=r.isInt=r.wrapMultiResult=r.convertBufferToString=void 0;let s=e.r(22734),i=e.r(14747),n=e.r(18761);Object.defineProperty(r,"defaults",{enumerable:!0,get:function(){return n.defaults}}),Object.defineProperty(r,"isArguments",{enumerable:!0,get:function(){return n.isArguments}}),Object.defineProperty(r,"noop",{enumerable:!0,get:function(){return n.noop}}),r.Debug=e.r(880).default;let o=e.r(66275);function a(e){let t=parseFloat(e);return!isNaN(e)&&(0|t)===t}function l(e,t){if("family"===e){let e=Number.parseInt(t,10);if(!Number.isNaN(e))return e}return t}r.convertBufferToString=function e(t,r){if(t instanceof Buffer)return t.toString(r);if(Array.isArray(t)){let s=t.length,i=Array(s);for(let n=0;n<s;++n)i[n]=t[n]instanceof Buffer&&"utf8"===r?t[n].toString():e(t[n],r);return i}return t},r.wrapMultiResult=function(e){if(!e)return null;let t=[],r=e.length;for(let s=0;s<r;++s){let r=e[s];r instanceof Error?t.push([r]):t.push([null,r])}return t},r.isInt=a,r.packObject=function(e){let t={},r=e.length;for(let s=1;s<r;s+=2)t[e[s-1]]=e[s];return t},r.timeout=function(e,t){let r=null,s=function(){r&&(clearTimeout(r),r=null,e.apply(this,arguments))};return r=setTimeout(s,t,Error("timeout")),s},r.convertObjectToArray=function(e){let t=[],r=Object.keys(e);for(let s=0,i=r.length;s<i;s++)t.push(r[s],e[r[s]]);return t},r.convertMapToArray=function(e){let t=[],r=0;return e.forEach(function(e,s){t[r]=s,t[r+1]=e,r+=2}),t},r.toArg=function(e){return null==e?"":String(e)},r.optimizeErrorStack=function(e,t,r){let s,i=t.split("\n"),n="";for(s=1;s<i.length&&-1!==i[s].indexOf(r);++s);for(let e=s;e<i.length;++e)n+="\n"+i[e];if(e.stack){let t=e.stack.indexOf("\n");e.stack=e.stack.slice(0,t)+n}return e},r.parseURL=function(e){let t;if(a(e))return{port:e};let r=/^rediss?:\/\//i.test(e),s=e.startsWith("//");if("/"===e[0]&&!s){let t=e.indexOf("?"),r={path:-1===t?e:e.slice(0,t)};if(-1!==t){let s={};new URLSearchParams(e.slice(t+1)).forEach((e,t)=>{s[t]=l(t,e)}),(0,n.defaults)(r,s)}return r}t=new URL(r?e:s?"redis:"+e:"redis://"+e);let i={};t.searchParams.forEach((e,t)=>{i[t]=l(t,e)});let o={};return(t.username||t.password)&&(o.username=decodeURIComponent(t.username),o.password=decodeURIComponent(t.password)),t.pathname&&"/"!==t.pathname&&(r||s?t.pathname.length>1&&(o.db=t.pathname.slice(1)):o.path=t.pathname),t.hostname&&(o.host=t.hostname.replace(/^\[|\]$/g,"")),t.port&&(o.port=t.port),(0,n.defaults)(o,i),o},r.resolveTLSProfile=function(e){let t=null==e?void 0:e.tls;"string"==typeof t&&(t={profile:t});let r=o.default[null==t?void 0:t.profile];return r&&(t=Object.assign({},r,t),delete t.profile,e=Object.assign({},e,{tls:t})),e},r.sample=function(e,t=0){let r=e.length;return t>=r?null:e[t+Math.floor(Math.random()*(r-t))]},r.shuffle=function(e){let t=e.length;for(;t>0;){let r=Math.floor(Math.random()*t);t--,[e[t],e[r]]=[e[r],e[t]]}return e},r.CONNECTION_CLOSED_ERROR_MSG="Connection is closed.",r.zipMap=function(e,t){let r=new Map;return e.forEach((e,s)=>{r.set(e,t[s])}),r};let c=null;r.getPackageMeta=async function(){if(c)return c;try{let e=(0,i.resolve)("/ROOT/node_modules/ioredis/built/utils","..","..","package.json"),t=await s.promises.readFile(e,"utf8");return c={version:JSON.parse(t).version}}catch(e){return c={version:"error-fetching-version"}}}},29693,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.isArguments=void 0,r.isArguments=function(e){return null!==e&&"object"==typeof e&&"[object Arguments]"===(null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e))}},18761,(e,t,r)=>{var s=e.e&&e.e.__createBinding||(Object.create?function(e,t,r,s){void 0===s&&(s=r),Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,s){void 0===s&&(s=r),e[s]=t[r]}),i=e.e&&e.e.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),r.noop=void 0,r.noop=function(){},i(e.r(20110),r),i(e.r(29693),r)},87315,(e,t,r)=>{t.exports=55>process.version.charCodeAt(1)&&46===process.version.charCodeAt(2)?e.r(27351):e.r(29338)},29338,(e,t,r)=>{let s=e.r(49719);class i extends Error{get name(){return this.constructor.name}}class n extends i{get name(){return this.constructor.name}}t.exports={RedisError:i,ParserError:class extends i{constructor(e,t,r){s(t),s.strictEqual(typeof r,"number");let i=Error.stackTraceLimit;Error.stackTraceLimit=2,super(e),Error.stackTraceLimit=i,this.offset=r,this.buffer=t}get name(){return this.constructor.name}},ReplyError:class extends i{constructor(e){let t=Error.stackTraceLimit;Error.stackTraceLimit=2,super(e),Error.stackTraceLimit=t}get name(){return this.constructor.name}},AbortError:n,InterruptError:class extends n{get name(){return this.constructor.name}}}},27351,(e,t,r)=>{let s=e.r(49719),i=e.r(24361);function n(e){Object.defineProperty(this,"message",{value:e||"",configurable:!0,writable:!0}),Error.captureStackTrace(this,this.constructor)}function o(e,t,r){s(t),s.strictEqual(typeof r,"number"),Object.defineProperty(this,"message",{value:e||"",configurable:!0,writable:!0});let i=Error.stackTraceLimit;Error.stackTraceLimit=2,Error.captureStackTrace(this,this.constructor),Error.stackTraceLimit=i,this.offset=r,this.buffer=t}function a(e){Object.defineProperty(this,"message",{value:e||"",configurable:!0,writable:!0});let t=Error.stackTraceLimit;Error.stackTraceLimit=2,Error.captureStackTrace(this,this.constructor),Error.stackTraceLimit=t}function l(e){Object.defineProperty(this,"message",{value:e||"",configurable:!0,writable:!0}),Error.captureStackTrace(this,this.constructor)}function c(e){Object.defineProperty(this,"message",{value:e||"",configurable:!0,writable:!0}),Error.captureStackTrace(this,this.constructor)}i.inherits(n,Error),Object.defineProperty(n.prototype,"name",{value:"RedisError",configurable:!0,writable:!0}),i.inherits(o,n),Object.defineProperty(o.prototype,"name",{value:"ParserError",configurable:!0,writable:!0}),i.inherits(a,n),Object.defineProperty(a.prototype,"name",{value:"ReplyError",configurable:!0,writable:!0}),i.inherits(l,n),Object.defineProperty(l.prototype,"name",{value:"AbortError",configurable:!0,writable:!0}),i.inherits(c,l),Object.defineProperty(c.prototype,"name",{value:"InterruptError",configurable:!0,writable:!0}),t.exports={RedisError:n,ParserError:o,ReplyError:a,AbortError:l,InterruptError:c}},86111,(e,t,r)=>{t.exports=e.r(39157)},39157,(e,t,r)=>{let s=e.r(874).Buffer,i=new(e.r(99348)).StringDecoder,n=e.r(87315),o=n.ReplyError,a=n.ParserError;var l=s.allocUnsafe(32768),c=0,u=null,h=0,d=0;function f(e){let t=e.offset,r=e.buffer,s=r.length-1;for(var i=t;i<s;)if(13===r[i++]){if(e.offset=i+1,!0===e.optionReturnBuffers)return e.buffer.slice(t,i-1);return e.buffer.toString("utf8",t,i-1)}}function p(e){let t=e.buffer.length-1;for(var r=e.offset,s=0;r<t;){let t=e.buffer[r++];if(13===t)return e.offset=r+1,s;s=10*s+(t-48)}}function y(e,t,r){e.arrayCache.push(t),e.arrayPos.push(r)}function m(e){let t=e.arrayCache.pop();var r=e.arrayPos.pop();if(e.arrayCache.length){let s=m(e);if(void 0===s)return void y(e,t,r);t[r++]=s}return g(e,t,r)}function g(e,t,r){let s=e.buffer.length;for(;r<t.length;){let i=e.offset;if(e.offset>=s)return void y(e,t,r);let n=S(e,e.buffer[e.offset++]);if(void 0===n){e.arrayCache.length||e.bufferCache.length||(e.offset=i),y(e,t,r);return}t[r]=n,r++}return t}function S(e,t){switch(t){case 36:let r=p(e);if(void 0===r)return;if(r<0)return null;let s=e.offset+r;if(s+2>e.buffer.length){e.bigStrSize=s+2,e.totalChunkSize=e.buffer.length,e.bufferCache.push(e.buffer);return}let i=e.offset;return(e.offset=s+2,!0===e.optionReturnBuffers)?e.buffer.slice(i,s):e.buffer.toString("utf8",i,s);case 43:return f(e);case 42:let n;return void 0===(n=p(e))?void 0:n<0?null:g(e,Array(n),0);case 58:return!0===e.optionStringNumbers?function(e){let t=e.buffer.length-1;var r=e.offset,s=0,i="";for(45===e.buffer[r]&&(i+="-",r++);r<t;){var n=e.buffer[r++];if(13===n)return e.offset=r+1,0!==s&&(i+=s),i;s>0x19999998?(i+=10*s+(n-48),s=0):48===n&&0===s?i+=0:s=10*s+(n-48)}}(e):function(e){let t=e.buffer.length-1;var r=e.offset,s=0,i=1;for(45===e.buffer[r]&&(i=-1,r++);r<t;){let t=e.buffer[r++];if(13===t)return e.offset=r+1,i*s;s=10*s+(t-48)}}(e);case 45:var l=f(e);if(void 0!==l)return!0===e.optionReturnBuffers&&(l=l.toString()),new o(l);return;default:let c;return c=new a("Protocol error, got "+JSON.stringify(String.fromCharCode(t))+" as reply type byte",JSON.stringify(e.buffer),e.offset),void(e.buffer=null,e.returnFatalError(c))}}function b(){if(l.length>51200)if(1===h||d>2*h){let e=Math.floor(l.length/10),t=e<c?c:e;c=0,l=l.slice(t,l.length)}else d++,h--;else clearInterval(u),h=0,d=0,u=null}t.exports=class{constructor(e){if(!e)throw TypeError("Options are mandatory.");if("function"!=typeof e.returnError||"function"!=typeof e.returnReply)throw TypeError("The returnReply and returnError options have to be functions.");this.setReturnBuffers(!!e.returnBuffers),this.setStringNumbers(!!e.stringNumbers),this.returnError=e.returnError,this.returnFatalError=e.returnFatalError||e.returnError,this.returnReply=e.returnReply,this.reset()}reset(){this.offset=0,this.buffer=null,this.bigStrSize=0,this.totalChunkSize=0,this.bufferCache=[],this.arrayCache=[],this.arrayPos=[]}setReturnBuffers(e){if("boolean"!=typeof e)throw TypeError("The returnBuffers argument has to be a boolean");this.optionReturnBuffers=e}setStringNumbers(e){if("boolean"!=typeof e)throw TypeError("The stringNumbers argument has to be a boolean");this.optionStringNumbers=e}execute(e){if(null===this.buffer)this.buffer=e,this.offset=0;else if(0===this.bigStrSize){let t=this.buffer.length,r=t-this.offset,i=s.allocUnsafe(r+e.length);if(this.buffer.copy(i,0,this.offset,t),e.copy(i,r,0,e.length),this.buffer=i,this.offset=0,this.arrayCache.length){let e=m(this);if(void 0===e)return;this.returnReply(e)}}else if(this.totalChunkSize+e.length>=this.bigStrSize){this.bufferCache.push(e);var t=this.optionReturnBuffers?function(e){let t=e.bufferCache,r=e.offset,i=e.bigStrSize-r-2;var n=t.length,o=e.bigStrSize-e.totalChunkSize;if(e.offset=o,o<=2){if(2===n)return t[0].slice(r,t[0].length+o-2);n--,o=t[t.length-2].length+o}l.length<i+c&&(c>0x6f00000&&(c=0x3200000),l=s.allocUnsafe(i*(i>0x4b00000?2:3)+c),c=0,h++,null===u&&(u=setInterval(b,50)));let a=c;t[0].copy(l,a,r,t[0].length),c+=t[0].length-r;for(var d=1;d<n-1;d++)t[d].copy(l,c),c+=t[d].length;return t[d].copy(l,c,0,o-2),c+=o-2,l.slice(a,c)}(this):function(e){let t=e.bufferCache,r=e.offset;var s=t.length,n=e.bigStrSize-e.totalChunkSize;if(e.offset=n,n<=2){if(2===s)return t[0].toString("utf8",r,t[0].length+n-2);s--,n=t[t.length-2].length+n}for(var o=i.write(t[0].slice(r)),a=1;a<s-1;a++)o+=i.write(t[a]);return o+i.end(t[a].slice(0,n-2))}(this);if(this.bigStrSize=0,this.bufferCache=[],this.buffer=e,this.arrayCache.length&&(this.arrayCache[0][this.arrayPos[0]++]=t,void 0===(t=m(this))))return;this.returnReply(t)}else{this.bufferCache.push(e),this.totalChunkSize+=e.length;return}for(;this.offset<this.buffer.length;){let e=this.offset,t=this.buffer[this.offset++],r=S(this,t);if(void 0===r){this.arrayCache.length||this.bufferCache.length||(this.offset=e);return}45===t?this.returnError(r):this.returnReply(r)}this.buffer=null}}},42351,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});let s=e.r(8538);function i(e){setTimeout(function(){throw e},0)}r.default=function(e,t,r){return"function"==typeof t&&e.then(e=>{let n;(n=void 0!==r&&Object(r).spread&&Array.isArray(e)?s.tryCatch(t).apply(void 0,[null].concat(e)):void 0===e?s.tryCatch(t)(null):s.tryCatch(t)(null,e))===s.errorObj&&i(n.e)},e=>{if(!e){let t=Error(e+"");Object.assign(t,{cause:e}),e=t}let r=s.tryCatch(t)(e);r===s.errorObj&&i(r.e)}),e}},8538,(e,t,r)=>{let s;function i(e,t){try{let e=s;return s=null,e.apply(this,arguments)}catch(e){return r.errorObj.e=e,r.errorObj}}Object.defineProperty(r,"__esModule",{value:!0}),r.tryCatch=r.errorObj=void 0,r.errorObj={e:{}},r.tryCatch=function(e){return s=e,i}},97718,(e,t,r)=>{let{websocketMask:s,websocketUnmask:i}=e.r(21517),{EMPTY_BUFFER:n}=e.r(15517),o=Buffer[Symbol.species];function a(e,t,r,s,i){for(let n=0;n<i;n++)r[s+n]=e[n]^t[3&n]}function l(e,t){for(let r=0;r<e.length;r++)e[r]^=t[3&r]}function c(e){let t;return(c.readOnly=!0,Buffer.isBuffer(e))?e:(e instanceof ArrayBuffer?t=new o(e):ArrayBuffer.isView(e)?t=new o(e.buffer,e.byteOffset,e.byteLength):(t=Buffer.from(e),c.readOnly=!1),t)}if(t.exports={concat:function(e,t){if(0===e.length)return n;if(1===e.length)return e[0];let r=Buffer.allocUnsafe(t),s=0;for(let t=0;t<e.length;t++){let i=e[t];r.set(i,s),s+=i.length}return s<t?new o(r.buffer,r.byteOffset,s):r},mask:a,toArrayBuffer:function(e){return e.length===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.length)},toBuffer:c,unmask:l},s)t.exports.mask=function(e,t,r,i,n){n<24?a(e,t,r,i,n):s(e,t,r,i,n)},t.exports.unmask=function(e,t){e.length<24?l(e,t):i(e,t)};else if(!process.env.WS_NO_BUFFER_UTIL)try{let e=(()=>{let e=Error("Cannot find module 'bufferutil'");throw e.code="MODULE_NOT_FOUND",e})();t.exports.mask=function(t,r,s,i,n){n<48?a(t,r,s,i,n):e.mask(t,r,s,i,n)},t.exports.unmask=function(t,r){t.length<32?l(t,r):e.unmask(t,r)}}catch(e){}},15517,(e,t,r)=>{let s=["nodebuffer","arraybuffer","fragments"],i="u">typeof Blob;i&&s.push("blob"),t.exports={BINARY_TYPES:s,CLOSE_TIMEOUT:3e4,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:i,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}},46296,(e,t,r)=>{let{kForOnEventAttribute:s,kListener:i}=e.r(15517),n=Symbol("kCode"),o=Symbol("kData"),a=Symbol("kError"),l=Symbol("kMessage"),c=Symbol("kReason"),u=Symbol("kTarget"),h=Symbol("kType"),d=Symbol("kWasClean");class f{constructor(e){this[u]=null,this[h]=e}get target(){return this[u]}get type(){return this[h]}}Object.defineProperty(f.prototype,"target",{enumerable:!0}),Object.defineProperty(f.prototype,"type",{enumerable:!0});class p extends f{constructor(e,t={}){super(e),this[n]=void 0===t.code?0:t.code,this[c]=void 0===t.reason?"":t.reason,this[d]=void 0!==t.wasClean&&t.wasClean}get code(){return this[n]}get reason(){return this[c]}get wasClean(){return this[d]}}Object.defineProperty(p.prototype,"code",{enumerable:!0}),Object.defineProperty(p.prototype,"reason",{enumerable:!0}),Object.defineProperty(p.prototype,"wasClean",{enumerable:!0});class y extends f{constructor(e,t={}){super(e),this[a]=void 0===t.error?null:t.error,this[l]=void 0===t.message?"":t.message}get error(){return this[a]}get message(){return this[l]}}Object.defineProperty(y.prototype,"error",{enumerable:!0}),Object.defineProperty(y.prototype,"message",{enumerable:!0});class m extends f{constructor(e,t={}){super(e),this[o]=void 0===t.data?null:t.data}get data(){return this[o]}}function g(e,t,r){"object"==typeof e&&e.handleEvent?e.handleEvent.call(e,r):e.call(t,r)}Object.defineProperty(m.prototype,"data",{enumerable:!0}),t.exports={CloseEvent:p,ErrorEvent:y,Event:f,EventTarget:{addEventListener(e,t,r={}){let n;for(let n of this.listeners(e))if(!r[s]&&n[i]===t&&!n[s])return;if("message"===e)n=function(e,r){let s=new m("message",{data:r?e:e.toString()});s[u]=this,g(t,this,s)};else if("close"===e)n=function(e,r){let s=new p("close",{code:e,reason:r.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});s[u]=this,g(t,this,s)};else if("error"===e)n=function(e){let r=new y("error",{error:e,message:e.message});r[u]=this,g(t,this,r)};else{if("open"!==e)return;n=function(){let e=new f("open");e[u]=this,g(t,this,e)}}n[s]=!!r[s],n[i]=t,r.once?this.once(e,n):this.on(e,n)},removeEventListener(e,t){for(let r of this.listeners(e))if(r[i]===t&&!r[s]){this.removeListener(e,r);break}}},MessageEvent:m}},61892,(e,t,r)=>{let{tokenChars:s}=e.r(6921);function i(e,t,r){void 0===e[t]?e[t]=[r]:e[t].push(r)}t.exports={format:function(e){return Object.keys(e).map(t=>{let r=e[t];return Array.isArray(r)||(r=[r]),r.map(e=>[t].concat(Object.keys(e).map(t=>{let r=e[t];return Array.isArray(r)||(r=[r]),r.map(e=>!0===e?t:`${t}=${e}`).join("; ")})).join("; ")).join(", ")}).join(", ")},parse:function(e){let t,r,n=Object.create(null),o=Object.create(null),a=!1,l=!1,c=!1,u=-1,h=-1,d=-1,f=0;for(;f<e.length;f++)if(h=e.charCodeAt(f),void 0===t)if(-1===d&&1===s[h])-1===u&&(u=f);else if(0!==f&&(32===h||9===h))-1===d&&-1!==u&&(d=f);else if(59===h||44===h){if(-1===u)throw SyntaxError(`Unexpected character at index ${f}`);-1===d&&(d=f);let r=e.slice(u,d);44===h?(i(n,r,o),o=Object.create(null)):t=r,u=d=-1}else throw SyntaxError(`Unexpected character at index ${f}`);else if(void 0===r)if(-1===d&&1===s[h])-1===u&&(u=f);else if(32===h||9===h)-1===d&&-1!==u&&(d=f);else if(59===h||44===h){if(-1===u)throw SyntaxError(`Unexpected character at index ${f}`);-1===d&&(d=f),i(o,e.slice(u,d),!0),44===h&&(i(n,t,o),o=Object.create(null),t=void 0),u=d=-1}else if(61===h&&-1!==u&&-1===d)r=e.slice(u,f),u=d=-1;else throw SyntaxError(`Unexpected character at index ${f}`);else if(l){if(1!==s[h])throw SyntaxError(`Unexpected character at index ${f}`);-1===u?u=f:a||(a=!0),l=!1}else if(c)if(1===s[h])-1===u&&(u=f);else if(34===h&&-1!==u)c=!1,d=f;else if(92===h)l=!0;else throw SyntaxError(`Unexpected character at index ${f}`);else if(34===h&&61===e.charCodeAt(f-1))c=!0;else if(-1===d&&1===s[h])-1===u&&(u=f);else if(-1!==u&&(32===h||9===h))-1===d&&(d=f);else if(59===h||44===h){if(-1===u)throw SyntaxError(`Unexpected character at index ${f}`);-1===d&&(d=f);let s=e.slice(u,d);a&&(s=s.replace(/\\/g,""),a=!1),i(o,r,s),44===h&&(i(n,t,o),o=Object.create(null),t=void 0),r=void 0,u=d=-1}else throw SyntaxError(`Unexpected character at index ${f}`);if(-1===u||c||32===h||9===h)throw SyntaxError("Unexpected end of input");-1===d&&(d=f);let p=e.slice(u,d);return void 0===t?i(n,p,o):(void 0===r?i(o,p,!0):a?i(o,r,p.replace(/\\/g,"")):i(o,r,p),i(n,t,o)),n}}},49526,(e,t,r)=>{let s=Symbol("kDone"),i=Symbol("kRun");t.exports=class{constructor(e){this[s]=()=>{this.pending--,this[i]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[i]()}[i](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[s])}}}},51468,(e,t,r)=>{let s,i=e.r(6461),n=e.r(97718),o=e.r(49526),{kStatusCode:a}=e.r(15517),l=Buffer[Symbol.species],c=Buffer.from([0,0,255,255]),u=Symbol("permessage-deflate"),h=Symbol("total-length"),d=Symbol("callback"),f=Symbol("buffers"),p=Symbol("error");function y(e){this[f].push(e),this[h]+=e.length}function m(e){(this[h]+=e.length,this[u]._maxPayload<1||this[h]<=this[u]._maxPayload)?this[f].push(e):(this[p]=RangeError("Max payload size exceeded"),this[p].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[p][a]=1009,this.removeListener("data",m),this.reset())}function g(e){(this[u]._inflate=null,this[p])?this[d](this[p]):(e[a]=1007,this[d](e))}t.exports=class{constructor(e){this._options=e||{},this._threshold=void 0!==this._options.threshold?this._options.threshold:1024,this._maxPayload=0|this._options.maxPayload,this._isServer=!!this._options.isServer,this._deflate=null,this._inflate=null,this.params=null,s||(s=new o(void 0!==this._options.concurrencyLimit?this._options.concurrencyLimit:10))}static get extensionName(){return"permessage-deflate"}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:null==this._options.clientMaxWindowBits&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let e=this._deflate[d];this._deflate.close(),this._deflate=null,e&&e(Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){let t=this._options,r=e.find(e=>(!1!==t.serverNoContextTakeover||!e.server_no_context_takeover)&&(!e.server_max_window_bits||!1!==t.serverMaxWindowBits&&("number"!=typeof t.serverMaxWindowBits||!(t.serverMaxWindowBits>e.server_max_window_bits)))&&("number"!=typeof t.clientMaxWindowBits||("number"==typeof e.client_max_window_bits?!(t.clientMaxWindowBits>e.client_max_window_bits):!!e.client_max_window_bits)));if(!r)throw Error("None of the extension offers can be accepted");return t.serverNoContextTakeover&&(r.server_no_context_takeover=!0),t.clientNoContextTakeover&&(r.client_no_context_takeover=!0),"number"==typeof t.serverMaxWindowBits&&(r.server_max_window_bits=t.serverMaxWindowBits),"number"==typeof t.clientMaxWindowBits?r.client_max_window_bits=t.clientMaxWindowBits:(!0===r.client_max_window_bits||!1===t.clientMaxWindowBits)&&delete r.client_max_window_bits,r}acceptAsClient(e){let t=e[0];if(!1===this._options.clientNoContextTakeover&&t.client_no_context_takeover)throw Error('Unexpected parameter "client_no_context_takeover"');if(t.client_max_window_bits){if(!1===this._options.clientMaxWindowBits||"number"==typeof this._options.clientMaxWindowBits&&t.client_max_window_bits>this._options.clientMaxWindowBits)throw Error('Unexpected or invalid parameter "client_max_window_bits"')}else"number"==typeof this._options.clientMaxWindowBits&&(t.client_max_window_bits=this._options.clientMaxWindowBits);return t}normalizeParams(e){return e.forEach(e=>{Object.keys(e).forEach(t=>{let r=e[t];if(r.length>1)throw Error(`Parameter "${t}" must have only a single value`);if(r=r[0],"client_max_window_bits"===t){if(!0!==r){let e=+r;if(!Number.isInteger(e)||e<8||e>15)throw TypeError(`Invalid value for parameter "${t}": ${r}`);r=e}else if(!this._isServer)throw TypeError(`Invalid value for parameter "${t}": ${r}`)}else if("server_max_window_bits"===t){let e=+r;if(!Number.isInteger(e)||e<8||e>15)throw TypeError(`Invalid value for parameter "${t}": ${r}`);r=e}else if("client_no_context_takeover"===t||"server_no_context_takeover"===t){if(!0!==r)throw TypeError(`Invalid value for parameter "${t}": ${r}`)}else throw Error(`Unknown parameter "${t}"`);e[t]=r})}),e}decompress(e,t,r){s.add(s=>{this._decompress(e,t,(e,t)=>{s(),r(e,t)})})}compress(e,t,r){s.add(s=>{this._compress(e,t,(e,t)=>{s(),r(e,t)})})}_decompress(e,t,r){let s=this._isServer?"client":"server";if(!this._inflate){let e=`${s}_max_window_bits`,t="number"!=typeof this.params[e]?i.Z_DEFAULT_WINDOWBITS:this.params[e];this._inflate=i.createInflateRaw({...this._options.zlibInflateOptions,windowBits:t}),this._inflate[u]=this,this._inflate[h]=0,this._inflate[f]=[],this._inflate.on("error",g),this._inflate.on("data",m)}this._inflate[d]=r,this._inflate.write(e),t&&this._inflate.write(c),this._inflate.flush(()=>{let e=this._inflate[p];if(e){this._inflate.close(),this._inflate=null,r(e);return}let i=n.concat(this._inflate[f],this._inflate[h]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[h]=0,this._inflate[f]=[],t&&this.params[`${s}_no_context_takeover`]&&this._inflate.reset()),r(null,i)})}_compress(e,t,r){let s=this._isServer?"server":"client";if(!this._deflate){let e=`${s}_max_window_bits`,t="number"!=typeof this.params[e]?i.Z_DEFAULT_WINDOWBITS:this.params[e];this._deflate=i.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:t}),this._deflate[h]=0,this._deflate[f]=[],this._deflate.on("data",y)}this._deflate[d]=r,this._deflate.write(e),this._deflate.flush(i.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let e=n.concat(this._deflate[f],this._deflate[h]);t&&(e=new l(e.buffer,e.byteOffset,e.length-4)),this._deflate[d]=null,this._deflate[h]=0,this._deflate[f]=[],t&&this.params[`${s}_no_context_takeover`]&&this._deflate.reset(),r(null,e)})}}},59892,(e,t,r)=>{let{Writable:s}=e.r(88947),i=e.r(51468),{BINARY_TYPES:n,EMPTY_BUFFER:o,kStatusCode:a,kWebSocket:l}=e.r(15517),{concat:c,toArrayBuffer:u,unmask:h}=e.r(97718),{isValidStatusCode:d,isValidUTF8:f}=e.r(6921),p=Buffer[Symbol.species];t.exports=class extends s{constructor(e={}){super(),this._allowSynchronousEvents=void 0===e.allowSynchronousEvents||e.allowSynchronousEvents,this._binaryType=e.binaryType||n[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxBufferedChunks=0|e.maxBufferedChunks,this._maxFragments=0|e.maxFragments,this._maxPayload=0|e.maxPayload,this._skipUTF8Validation=!!e.skipUTF8Validation,this[l]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._numFragments=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=0}_write(e,t,r){return 8===this._opcode&&0==this._state?r():this._maxBufferedChunks>0&&this._buffers.length>=this._maxBufferedChunks?void r(this.createError(RangeError,"Too many buffered chunks",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS")):void(this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(r))}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let t=this._buffers[0];return this._buffers[0]=new p(t.buffer,t.byteOffset+e,t.length-e),new p(t.buffer,t.byteOffset,e)}let t=Buffer.allocUnsafe(e);do{let r=this._buffers[0],s=t.length-e;e>=r.length?t.set(this._buffers.shift(),s):(t.set(new Uint8Array(r.buffer,r.byteOffset,e),s),this._buffers[0]=new p(r.buffer,r.byteOffset+e,r.length-e)),e-=r.length}while(e>0)return t}startLoop(e){this._loop=!0;do switch(this._state){case 0:this.getInfo(e);break;case 1:this.getPayloadLength16(e);break;case 2:this.getPayloadLength64(e);break;case 3:this.getMask();break;case 4:this.getData(e);break;case 5:case 6:this._loop=!1;return}while(this._loop)this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let t=this.consume(2);if((48&t[0])!=0)return void e(this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3"));let r=(64&t[0])==64;if(r&&!this._extensions[i.extensionName])return void e(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"));if(this._fin=(128&t[0])==128,this._opcode=15&t[0],this._payloadLength=127&t[1],0===this._opcode){if(r)return void e(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"));if(!this._fragmented)return void e(this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE"));this._opcode=this._fragmented}else if(1===this._opcode||2===this._opcode){if(this._fragmented)return void e(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE"));this._compressed=r}else{if(!(this._opcode>7)||!(this._opcode<11))return void e(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE"));if(!this._fin)return void e(this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN"));if(r)return void e(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"));if(this._payloadLength>125||8===this._opcode&&1===this._payloadLength)return void e(this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH"))}if(this._fin||this._fragmented||(this._fragmented=this._opcode),this._masked=(128&t[1])==128,this._isServer){if(!this._masked)return void e(this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK"))}else if(this._masked)return void e(this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK"));126===this._payloadLength?this._state=1:127===this._payloadLength?this._state=2:this.haveLength(e)}getPayloadLength16(e){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e)}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let t=this.consume(8),r=t.readUInt32BE(0);r>2097151?e(this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH")):(this._payloadLength=0x100000000*r+t.readUInt32BE(4),this.haveLength(e))}haveLength(e){this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)?e(this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH")):this._masked?this._state=3:this._state=4}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=4}getData(e){let t=o;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}t=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!=0&&h(t,this._mask)}if(this._opcode>7)return void this.controlMessage(t,e);if(this._maxFragments>0&&++this._numFragments>this._maxFragments)return void e(this.createError(RangeError,"Too many message fragments",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS"));if(this._compressed){this._state=5,this.decompress(t,e);return}t.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(t)),this.dataMessage(e)}decompress(e,t){this._extensions[i.extensionName].decompress(e,this._fin,(e,r)=>{if(e)return t(e);if(r.length){if(this._messageLength+=r.length,this._messageLength>this._maxPayload&&this._maxPayload>0)return void t(this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"));this._fragments.push(r)}this.dataMessage(t),0===this._state&&this.startLoop(t)})}dataMessage(e){if(!this._fin){this._state=0;return}let t=this._messageLength,r=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._numFragments=0,this._fragments=[],2===this._opcode){let s;s="nodebuffer"===this._binaryType?c(r,t):"arraybuffer"===this._binaryType?u(c(r,t)):"blob"===this._binaryType?new Blob(r):r,this._allowSynchronousEvents?(this.emit("message",s,!0),this._state=0):(this._state=6,setImmediate(()=>{this.emit("message",s,!0),this._state=0,this.startLoop(e)}))}else{let s=c(r,t);if(!this._skipUTF8Validation&&!f(s))return void e(this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8"));5===this._state||this._allowSynchronousEvents?(this.emit("message",s,!1),this._state=0):(this._state=6,setImmediate(()=>{this.emit("message",s,!1),this._state=0,this.startLoop(e)}))}}controlMessage(e,t){if(8===this._opcode){if(0===e.length)this._loop=!1,this.emit("conclude",1005,o),this.end();else{let r=e.readUInt16BE(0);if(!d(r))return void t(this.createError(RangeError,`invalid status code ${r}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE"));let s=new p(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!f(s))return void t(this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8"));this._loop=!1,this.emit("conclude",r,s),this.end()}this._state=0;return}this._allowSynchronousEvents?(this.emit(9===this._opcode?"ping":"pong",e),this._state=0):(this._state=6,setImmediate(()=>{this.emit(9===this._opcode?"ping":"pong",e),this._state=0,this.startLoop(t)}))}createError(e,t,r,s,i){this._loop=!1,this._errored=!0;let n=new e(r?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(n,this.createError),n.code=i,n[a]=s,n}}},38479,(e,t,r)=>{let s,{Duplex:i}=e.r(88947),{randomFillSync:n}=e.r(54799),{types:{isUint8Array:o}}=e.r(24361),a=e.r(51468),{EMPTY_BUFFER:l,kWebSocket:c,NOOP:u}=e.r(15517),{isBlob:h,isValidStatusCode:d}=e.r(6921),{mask:f,toBuffer:p}=e.r(97718),y=Symbol("kByteLength"),m=Buffer.alloc(4),g=8192;function S(e,t,r){"function"==typeof r&&r(t);for(let r=0;r<e._queue.length;r++){let s=e._queue[r],i=s[s.length-1];"function"==typeof i&&i(t)}}function b(e,t,r){S(e,t,r),e.onerror(t)}t.exports=class e{constructor(e,t,r){this._extensions=t||{},r&&(this._generateMask=r,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=0,this.onerror=u,this[c]=void 0}static frame(e,t){let r,i,o=!1,a=2,l=!1;t.mask&&(r=t.maskBuffer||m,t.generateMask?t.generateMask(r):(8192===g&&(void 0===s&&(s=Buffer.alloc(8192)),n(s,0,8192),g=0),r[0]=s[g++],r[1]=s[g++],r[2]=s[g++],r[3]=s[g++]),l=(r[0]|r[1]|r[2]|r[3])==0,a=6),"string"==typeof e?i=(!t.mask||l)&&void 0!==t[y]?t[y]:(e=Buffer.from(e)).length:(i=e.length,o=t.mask&&t.readOnly&&!l);let c=i;i>=65536?(a+=8,c=127):i>125&&(a+=2,c=126);let u=Buffer.allocUnsafe(o?i+a:a);return(u[0]=t.fin?128|t.opcode:t.opcode,t.rsv1&&(u[0]|=64),u[1]=c,126===c?u.writeUInt16BE(i,2):127===c&&(u[2]=u[3]=0,u.writeUIntBE(i,4,6)),t.mask)?(u[1]|=128,u[a-4]=r[0],u[a-3]=r[1],u[a-2]=r[2],u[a-1]=r[3],i)?l?[u,e]:o?(f(e,r,u,a,i),[u]):(f(e,r,e,0,i),[u,e]):[u]:i?[u,e]:[u]}close(t,r,s,i){let n;if(void 0===t)n=l;else if("number"==typeof t&&d(t))if(void 0!==r&&r.length){let e=Buffer.byteLength(r);if(e>123)throw RangeError("The message must not be greater than 123 bytes");if((n=Buffer.allocUnsafe(2+e)).writeUInt16BE(t,0),"string"==typeof r)n.write(r,2);else if(o(r))n.set(r,2);else throw TypeError("Second argument must be a string or a Uint8Array")}else(n=Buffer.allocUnsafe(2)).writeUInt16BE(t,0);else throw TypeError("First argument must be a valid error code number");let a={[y]:n.length,fin:!0,generateMask:this._generateMask,mask:s,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};0!==this._state?this.enqueue([this.dispatch,n,!1,a,i]):this.sendFrame(e.frame(n,a),i)}ping(t,r,s){let i,n;if("string"==typeof t?(i=Buffer.byteLength(t),n=!1):h(t)?(i=t.size,n=!1):(i=(t=p(t)).length,n=p.readOnly),i>125)throw RangeError("The data size must not be greater than 125 bytes");let o={[y]:i,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:9,readOnly:n,rsv1:!1};h(t)?0!==this._state?this.enqueue([this.getBlobData,t,!1,o,s]):this.getBlobData(t,!1,o,s):0!==this._state?this.enqueue([this.dispatch,t,!1,o,s]):this.sendFrame(e.frame(t,o),s)}pong(t,r,s){let i,n;if("string"==typeof t?(i=Buffer.byteLength(t),n=!1):h(t)?(i=t.size,n=!1):(i=(t=p(t)).length,n=p.readOnly),i>125)throw RangeError("The data size must not be greater than 125 bytes");let o={[y]:i,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:10,readOnly:n,rsv1:!1};h(t)?0!==this._state?this.enqueue([this.getBlobData,t,!1,o,s]):this.getBlobData(t,!1,o,s):0!==this._state?this.enqueue([this.dispatch,t,!1,o,s]):this.sendFrame(e.frame(t,o),s)}send(e,t,r){let s,i,n=this._extensions[a.extensionName],o=t.binary?2:1,l=t.compress;"string"==typeof e?(s=Buffer.byteLength(e),i=!1):h(e)?(s=e.size,i=!1):(s=(e=p(e)).length,i=p.readOnly),this._firstFragment?(this._firstFragment=!1,l&&n&&n.params[n._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(l=s>=n._threshold),this._compress=l):(l=!1,o=0),t.fin&&(this._firstFragment=!0);let c={[y]:s,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:o,readOnly:i,rsv1:l};h(e)?0!==this._state?this.enqueue([this.getBlobData,e,this._compress,c,r]):this.getBlobData(e,this._compress,c,r):0!==this._state?this.enqueue([this.dispatch,e,this._compress,c,r]):this.dispatch(e,this._compress,c,r)}getBlobData(t,r,s,i){this._bufferedBytes+=s[y],this._state=2,t.arrayBuffer().then(t=>{if(this._socket.destroyed){let e=Error("The socket was closed while the blob was being read");process.nextTick(S,this,e,i);return}this._bufferedBytes-=s[y];let n=p(t);r?this.dispatch(n,r,s,i):(this._state=0,this.sendFrame(e.frame(n,s),i),this.dequeue())}).catch(e=>{process.nextTick(b,this,e,i)})}dispatch(t,r,s,i){if(!r)return void this.sendFrame(e.frame(t,s),i);let n=this._extensions[a.extensionName];this._bufferedBytes+=s[y],this._state=1,n.compress(t,s.fin,(t,r)=>{this._socket.destroyed?S(this,Error("The socket was closed while data was being compressed"),i):(this._bufferedBytes-=s[y],this._state=0,s.readOnly=!1,this.sendFrame(e.frame(r,s),i),this.dequeue())})}dequeue(){for(;0===this._state&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][y],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][y],this._queue.push(e)}sendFrame(e,t){2===e.length?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],t),this._socket.uncork()):this._socket.write(e[0],t)}}},699,(e,t,r)=>{e.r(74272);let{Duplex:s}=e.r(88947);function i(e){e.emit("close")}function n(){!this.destroyed&&this._writableState.finished&&this.destroy()}function o(e){this.removeListener("error",o),this.destroy(),0===this.listenerCount("error")&&this.emit("error",e)}t.exports=function(e,t){let r=!0,a=new s({...t,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return e.on("message",function(t,r){let s=!r&&a._readableState.objectMode?t.toString():t;a.push(s)||e.pause()}),e.once("error",function(e){a.destroyed||(r=!1,a.destroy(e))}),e.once("close",function(){a.destroyed||a.push(null)}),a._destroy=function(t,s){if(e.readyState===e.CLOSED){s(t),process.nextTick(i,a);return}let n=!1;e.once("error",function(e){n=!0,s(e)}),e.once("close",function(){n||s(t),process.nextTick(i,a)}),r&&e.terminate()},a._final=function(t){e.readyState===e.CONNECTING?e.once("open",function(){a._final(t)}):null!==e._socket&&(e._socket._writableState.finished?(t(),a._readableState.endEmitted&&a.destroy()):(e._socket.once("finish",function(){t()}),e.close()))},a._read=function(){e.isPaused&&e.resume()},a._write=function(t,r,s){e.readyState===e.CONNECTING?e.once("open",function(){a._write(t,r,s)}):e.send(t,s)},a.on("end",n),a.on("error",o),a}},72038,(e,t,r)=>{let{tokenChars:s}=e.r(6921);t.exports={parse:function(e){let t=new Set,r=-1,i=-1,n=0;for(;n<e.length;n++){let o=e.charCodeAt(n);if(-1===i&&1===s[o])-1===r&&(r=n);else if(0!==n&&(32===o||9===o))-1===i&&-1!==r&&(i=n);else if(44===o){if(-1===r)throw SyntaxError(`Unexpected character at index ${n}`);-1===i&&(i=n);let s=e.slice(r,i);if(t.has(s))throw SyntaxError(`The "${s}" subprotocol is duplicated`);t.add(s),r=i=-1}else throw SyntaxError(`Unexpected character at index ${n}`)}if(-1===r||-1!==i)throw SyntaxError("Unexpected end of input");let o=e.slice(r,n);if(t.has(o))throw SyntaxError(`The "${o}" subprotocol is duplicated`);return t.add(o),t}}},6921,(e,t,r)=>{let{isUtf8:s}=e.r(874),{hasBlob:i}=e.r(15517);function n(e){let t=e.length,r=0;for(;r<t;)if((128&e[r])==0)r++;else if((224&e[r])==192){if(r+1===t||(192&e[r+1])!=128||(254&e[r])==192)return!1;r+=2}else if((240&e[r])==224){if(r+2>=t||(192&e[r+1])!=128||(192&e[r+2])!=128||224===e[r]&&(224&e[r+1])==128||237===e[r]&&(224&e[r+1])==160)return!1;r+=3}else{if((248&e[r])!=240||r+3>=t||(192&e[r+1])!=128||(192&e[r+2])!=128||(192&e[r+3])!=128||240===e[r]&&(240&e[r+1])==128||244===e[r]&&e[r+1]>143||e[r]>244)return!1;r+=4}return!0}if(t.exports={isBlob:function(e){return i&&"object"==typeof e&&"function"==typeof e.arrayBuffer&&"string"==typeof e.type&&"function"==typeof e.stream&&("Blob"===e[Symbol.toStringTag]||"File"===e[Symbol.toStringTag])},isValidStatusCode:function(e){return e>=1e3&&e<=1014&&1004!==e&&1005!==e&&1006!==e||e>=3e3&&e<=4999},isValidUTF8:n,tokenChars:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0]},s)t.exports.isValidUTF8=function(e){return e.length<24?n(e):s(e)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let e=(()=>{let e=Error("Cannot find module 'utf-8-validate'");throw e.code="MODULE_NOT_FOUND",e})();t.exports.isValidUTF8=function(t){return t.length<32?n(t):e(t)}}catch(e){}},32174,(e,t,r)=>{let s=e.r(27699),i=e.r(21517),{Duplex:n}=e.r(88947),{createHash:o}=e.r(54799),a=e.r(61892),l=e.r(51468),c=e.r(72038),u=e.r(74272),{CLOSE_TIMEOUT:h,GUID:d,kWebSocket:f}=e.r(15517),p=/^[+/0-9A-Za-z]{22}==$/;function y(e){e._state=2,e.emit("close")}function m(){this.destroy()}function g(e,t,r,s){r=r||i.STATUS_CODES[t],s={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(r),...s},e.once("finish",e.destroy),e.end(`HTTP/1.1 ${t} ${i.STATUS_CODES[t]}\r
|
|
144
|
+
`+Object.keys(s).map(e=>`${e}: ${s[e]}`).join("\r\n")+"\r\n\r\n"+r)}function S(e,t,r,s,i,n){if(e.listenerCount("wsClientError")){let s=Error(i);Error.captureStackTrace(s,S),e.emit("wsClientError",s,r,t)}else g(r,s,i,n)}t.exports=class extends s{constructor(e,t){if(super(),null==(e={allowSynchronousEvents:!0,autoPong:!0,maxBufferedChunks:262144,maxFragments:16384,maxPayload:0x6400000,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:h,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:u,...e}).port&&!e.server&&!e.noServer||null!=e.port&&(e.server||e.noServer)||e.server&&e.noServer)throw TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(null!=e.port?(this._server=i.createServer((e,t)=>{let r=i.STATUS_CODES[426];t.writeHead(426,{"Content-Length":r.length,"Content-Type":"text/plain"}),t.end(r)}),this._server.listen(e.port,e.host,e.backlog,t)):e.server&&(this._server=e.server),this._server){let e=this.emit.bind(this,"connection");this._removeListeners=function(e,t){for(let r of Object.keys(t))e.on(r,t[r]);return function(){for(let r of Object.keys(t))e.removeListener(r,t[r])}}(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(t,r,s)=>{this.handleUpgrade(t,r,s,e)}})}!0===e.perMessageDeflate&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=0}address(){if(this.options.noServer)throw Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(2===this._state){e&&this.once("close",()=>{e(Error("The server is not running"))}),process.nextTick(y,this);return}if(e&&this.once("close",e),1!==this._state)if(this._state=1,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients&&this.clients.size?this._shouldEmitClose=!0:process.nextTick(y,this);else{let e=this._server;this._removeListeners(),this._removeListeners=this._server=null,e.close(()=>{y(this)})}}shouldHandle(e){if(this.options.path){let t=e.url.indexOf("?");if((-1!==t?e.url.slice(0,t):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,t,r,s){t.on("error",m);let i=e.headers["sec-websocket-key"],n=e.headers.upgrade,o=+e.headers["sec-websocket-version"];if("GET"!==e.method)return void S(this,e,t,405,"Invalid HTTP method");if(void 0===n||"websocket"!==n.toLowerCase())return void S(this,e,t,400,"Invalid Upgrade header");if(void 0===i||!p.test(i))return void S(this,e,t,400,"Missing or invalid Sec-WebSocket-Key header");if(13!==o&&8!==o)return void S(this,e,t,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});if(!this.shouldHandle(e))return void g(t,400);let u=e.headers["sec-websocket-protocol"],h=new Set;if(void 0!==u)try{h=c.parse(u)}catch(r){S(this,e,t,400,"Invalid Sec-WebSocket-Protocol header");return}let d=e.headers["sec-websocket-extensions"],f={};if(this.options.perMessageDeflate&&void 0!==d){let r=new l({...this.options.perMessageDeflate,isServer:!0,maxPayload:this.options.maxPayload});try{let e=a.parse(d);e[l.extensionName]&&(r.accept(e[l.extensionName]),f[l.extensionName]=r)}catch(r){S(this,e,t,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let n={origin:e.headers[`${8===o?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(2===this.options.verifyClient.length)return void this.options.verifyClient(n,(n,o,a,l)=>{if(!n)return g(t,o||401,a,l);this.completeUpgrade(f,i,h,e,t,r,s)});if(!this.options.verifyClient(n))return g(t,401)}this.completeUpgrade(f,i,h,e,t,r,s)}completeUpgrade(e,t,r,s,i,n,c){if(!i.readable||!i.writable)return i.destroy();if(i[f])throw Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>0)return g(i,503);let u=o("sha1").update(t+d).digest("base64"),h=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${u}`],p=new this.options.WebSocket(null,void 0,this.options);if(r.size){let e=this.options.handleProtocols?this.options.handleProtocols(r,s):r.values().next().value;e&&(h.push(`Sec-WebSocket-Protocol: ${e}`),p._protocol=e)}if(e[l.extensionName]){let t=e[l.extensionName].params,r=a.format({[l.extensionName]:[t]});h.push(`Sec-WebSocket-Extensions: ${r}`),p._extensions=e}this.emit("headers",h,s),i.write(h.concat("\r\n").join("\r\n")),i.removeListener("error",m),p.setSocket(i,n,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxBufferedChunks:this.options.maxBufferedChunks,maxFragments:this.options.maxFragments,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(p),p.on("close",()=>{this.clients.delete(p),this._shouldEmitClose&&!this.clients.size&&process.nextTick(y,this)})),c(p,s)}}},74272,(e,t,r)=>{let s=e.r(27699),i=e.r(24836),n=e.r(21517),o=e.r(4446),a=e.r(55004),{randomBytes:l,createHash:c}=e.r(54799),{Duplex:u,Readable:h}=e.r(88947),{URL:d}=e.r(92509),f=e.r(51468),p=e.r(59892),y=e.r(38479),{isBlob:m}=e.r(6921),{BINARY_TYPES:g,CLOSE_TIMEOUT:S,EMPTY_BUFFER:b,GUID:_,kForOnEventAttribute:k,kListener:E,kStatusCode:v,kWebSocket:w,NOOP:C}=e.r(15517),{EventTarget:{addEventListener:A,removeEventListener:O}}=e.r(46296),{format:T,parse:R}=e.r(61892),{toBuffer:x}=e.r(97718),I=Symbol("kAborted"),N=[8,13],M=["CONNECTING","OPEN","CLOSING","CLOSED"],D=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;class B extends s{constructor(e,t,r){super(),this._binaryType=g[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=b,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=B.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,null!==e?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,void 0===t?t=r&&void 0!==r.protocols?Array.isArray(r.protocols)?r.protocols:[r.protocols]:[]:Array.isArray(t)||(t="object"==typeof t&&null!==t?void 0===(r=t).protocols?[]:Array.isArray(r.protocols)?r.protocols:[r.protocols]:[t]),function e(t,r,s,o){let a,u,h,p,y={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:S,protocolVersion:N[1],maxBufferedChunks:262144,maxFragments:16384,maxPayload:0x6400000,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...o,socketPath:void 0,hostname:void 0,protocol:void 0,protocols:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(t._autoPong=y.autoPong,t._closeTimeout=y.closeTimeout,!N.includes(y.protocolVersion))throw RangeError(`Unsupported protocol version: ${y.protocolVersion} (supported versions: ${N.join(", ")})`);if(r instanceof d)a=r;else try{a=new d(r)}catch{throw SyntaxError(`Invalid URL: ${r}`)}"http:"===a.protocol?a.protocol="ws:":"https:"===a.protocol&&(a.protocol="wss:"),t._url=a.href;let m="wss:"===a.protocol,g="ws+unix:"===a.protocol;if("ws:"===a.protocol||m||g?g&&!a.pathname?u="The URL's pathname is empty":a.hash&&(u="The URL contains a fragment identifier"):u='The URL\'s protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"',u){let e=SyntaxError(u);if(0!==t._redirects)return void P(t,e);throw e}let b=m?443:80,k=l(16).toString("base64"),E=m?i.request:n.request,v=new Set;if(y.createConnection=y.createConnection||(m?F:L),y.defaultPort=y.defaultPort||b,y.port=a.port||b,y.host=a.hostname.startsWith("[")?a.hostname.slice(1,-1):a.hostname,y.headers={...y.headers,"Sec-WebSocket-Version":y.protocolVersion,"Sec-WebSocket-Key":k,Connection:"Upgrade",Upgrade:"websocket"},y.path=a.pathname+a.search,y.timeout=y.handshakeTimeout,y.perMessageDeflate&&(h=new f({...y.perMessageDeflate,isServer:!1,maxPayload:y.maxPayload}),y.headers["Sec-WebSocket-Extensions"]=T({[f.extensionName]:h.offer()})),s.length){for(let e of s){if("string"!=typeof e||!D.test(e)||v.has(e))throw SyntaxError("An invalid or duplicated subprotocol was specified");v.add(e)}y.headers["Sec-WebSocket-Protocol"]=s.join(",")}if(y.origin&&(y.protocolVersion<13?y.headers["Sec-WebSocket-Origin"]=y.origin:y.headers.Origin=y.origin),(a.username||a.password)&&(y.auth=`${a.username}:${a.password}`),g){let e=y.path.indexOf(":");-1===e?(y.socketPath=y.path,y.path=""):(y.socketPath=y.path.slice(0,e),y.path=y.path.slice(e+1))}if(y.followRedirects){if(0===t._redirects){t._originalIpc=g,t._originalSecure=m,t._originalHostOrSocketPath=g?y.socketPath:a.host;let e=o&&o.headers;if(o={...o,headers:{}},e)for(let[t,r]of Object.entries(e))o.headers[t.toLowerCase()]=r}else if(0===t.listenerCount("redirect")){let e=g?!!t._originalIpc&&y.socketPath===t._originalHostOrSocketPath:!t._originalIpc&&a.host===t._originalHostOrSocketPath;e&&(!t._originalSecure||m)||(delete y.headers.authorization,delete y.headers.cookie,e||delete y.headers.host,y.auth=void 0)}y.auth&&!o.headers.authorization&&(o.headers.authorization="Basic "+Buffer.from(y.auth).toString("base64")),p=t._req=E(y),t._redirects&&t.emit("redirect",t.url,p)}else p=t._req=E(y);y.timeout&&p.on("timeout",()=>{U(t,p,"Opening handshake has timed out")}),p.on("error",e=>{null===p||p[I]||(p=t._req=null,P(t,e))}),p.on("response",i=>{let n=i.headers.location,a=i.statusCode;if(n&&y.followRedirects&&a>=300&&a<400){let i;if(++t._redirects>y.maxRedirects)return void U(t,p,"Maximum redirects exceeded");p.abort();try{i=new d(n,r)}catch(e){P(t,SyntaxError(`Invalid URL: ${n}`));return}e(t,i,s,o)}else t.emit("unexpected-response",p,i)||U(t,p,`Unexpected server response: ${i.statusCode}`)}),p.on("upgrade",(e,r,s)=>{let i;if(t.emit("upgrade",e),t.readyState!==B.CONNECTING)return;p=t._req=null;let n=e.headers.upgrade;if(void 0===n||"websocket"!==n.toLowerCase())return void U(t,r,"Invalid Upgrade header");let o=c("sha1").update(k+_).digest("base64");if(e.headers["sec-websocket-accept"]!==o)return void U(t,r,"Invalid Sec-WebSocket-Accept header");let a=e.headers["sec-websocket-protocol"];if(void 0!==a?v.size?v.has(a)||(i="Server sent an invalid subprotocol"):i="Server sent a subprotocol but none was requested":v.size&&(i="Server sent no subprotocol"),i)return void U(t,r,i);a&&(t._protocol=a);let l=e.headers["sec-websocket-extensions"];if(void 0!==l){let e;if(!h)return void U(t,r,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");try{e=R(l)}catch(e){U(t,r,"Invalid Sec-WebSocket-Extensions header");return}let s=Object.keys(e);if(1!==s.length||s[0]!==f.extensionName)return void U(t,r,"Server indicated an extension that was not requested");try{h.accept(e[f.extensionName])}catch(e){U(t,r,"Invalid Sec-WebSocket-Extensions header");return}t._extensions[f.extensionName]=h}t.setSocket(r,s,{allowSynchronousEvents:y.allowSynchronousEvents,generateMask:y.generateMask,maxBufferedChunks:y.maxBufferedChunks,maxFragments:y.maxFragments,maxPayload:y.maxPayload,skipUTF8Validation:y.skipUTF8Validation})}),y.finishRequest?y.finishRequest(p,t):p.end()}(this,e,t,r)):(this._autoPong=r.autoPong,this._closeTimeout=r.closeTimeout,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){g.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,t,r){let s=new p({allowSynchronousEvents:r.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxBufferedChunks:r.maxBufferedChunks,maxFragments:r.maxFragments,maxPayload:r.maxPayload,skipUTF8Validation:r.skipUTF8Validation}),i=new y(e,this._extensions,r.generateMask);this._receiver=s,this._sender=i,this._socket=e,s[w]=this,i[w]=this,e[w]=this,s.on("conclude",H),s.on("drain",G),s.on("error",W),s.on("message",Q),s.on("ping",K),s.on("pong",q),i.onerror=J,e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),t.length>0&&e.unshift(t),e.on("close",$),e.on("data",X),e.on("end",Z),e.on("error",ee),this._readyState=B.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=B.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[f.extensionName]&&this._extensions[f.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=B.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,t){if(this.readyState!==B.CLOSED){if(this.readyState===B.CONNECTING)return void U(this,this._req,"WebSocket was closed before the connection was established");if(this.readyState===B.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._sender.close(e,t,!this._isServer,e=>{!e&&(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),this._readyState=B.CLOSING,Y(this)}}pause(){this.readyState!==B.CONNECTING&&this.readyState!==B.CLOSED&&(this._paused=!0,this._socket.pause())}ping(e,t,r){if(this.readyState===B.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");("function"==typeof e?(r=e,e=t=void 0):"function"==typeof t&&(r=t,t=void 0),"number"==typeof e&&(e=e.toString()),this.readyState!==B.OPEN)?j(this,e,r):(void 0===t&&(t=!this._isServer),this._sender.ping(e||b,t,r))}pong(e,t,r){if(this.readyState===B.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");("function"==typeof e?(r=e,e=t=void 0):"function"==typeof t&&(r=t,t=void 0),"number"==typeof e&&(e=e.toString()),this.readyState!==B.OPEN)?j(this,e,r):(void 0===t&&(t=!this._isServer),this._sender.pong(e||b,t,r))}resume(){this.readyState!==B.CONNECTING&&this.readyState!==B.CLOSED&&(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,t,r){if(this.readyState===B.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");if("function"==typeof t&&(r=t,t={}),"number"==typeof e&&(e=e.toString()),this.readyState!==B.OPEN)return void j(this,e,r);let s={binary:"string"!=typeof e,mask:!this._isServer,compress:!0,fin:!0,...t};this._extensions[f.extensionName]||(s.compress=!1),this._sender.send(e||b,s,r)}terminate(){if(this.readyState!==B.CLOSED){if(this.readyState===B.CONNECTING)return void U(this,this._req,"WebSocket was closed before the connection was established");this._socket&&(this._readyState=B.CLOSING,this._socket.destroy())}}}function P(e,t){e._readyState=B.CLOSING,e._errorEmitted=!0,e.emit("error",t),e.emitClose()}function L(e){return e.path=e.socketPath,o.connect(e)}function F(e){return e.path=void 0,e.servername||""===e.servername||(e.servername=o.isIP(e.host)?"":e.host),a.connect(e)}function U(e,t,r){e._readyState=B.CLOSING;let s=Error(r);Error.captureStackTrace(s,U),t.setHeader?(t[I]=!0,t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),process.nextTick(P,e,s)):(t.destroy(s),t.once("error",e.emit.bind(e,"error")),t.once("close",e.emitClose.bind(e)))}function j(e,t,r){if(t){let r=m(t)?t.size:x(t).length;e._socket?e._sender._bufferedBytes+=r:e._bufferedAmount+=r}if(r){let t=Error(`WebSocket is not open: readyState ${e.readyState} (${M[e.readyState]})`);process.nextTick(r,t)}}function H(e,t){let r=this[w];r._closeFrameReceived=!0,r._closeMessage=t,r._closeCode=e,void 0!==r._socket[w]&&(r._socket.removeListener("data",X),process.nextTick(V,r._socket),1005===e?r.close():r.close(e,t))}function G(){let e=this[w];e.isPaused||e._socket.resume()}function W(e){let t=this[w];void 0!==t._socket[w]&&(t._socket.removeListener("data",X),process.nextTick(V,t._socket),t.close(e[v])),t._errorEmitted||(t._errorEmitted=!0,t.emit("error",e))}function z(){this[w].emitClose()}function Q(e,t){this[w].emit("message",e,t)}function K(e){let t=this[w];t._autoPong&&t.pong(e,!this._isServer,C),t.emit("ping",e)}function q(e){this[w].emit("pong",e)}function V(e){e.resume()}function J(e){let t=this[w];t.readyState!==B.CLOSED&&(t.readyState===B.OPEN&&(t._readyState=B.CLOSING,Y(t)),this._socket.end(),t._errorEmitted||(t._errorEmitted=!0,t.emit("error",e)))}function Y(e){e._closeTimer=setTimeout(e._socket.destroy.bind(e._socket),e._closeTimeout)}function $(){let e=this[w];if(this.removeListener("close",$),this.removeListener("data",X),this.removeListener("end",Z),e._readyState=B.CLOSING,!this._readableState.endEmitted&&!e._closeFrameReceived&&!e._receiver._writableState.errorEmitted&&0!==this._readableState.length){let t=this.read(this._readableState.length);e._receiver.write(t)}e._receiver.end(),this[w]=void 0,clearTimeout(e._closeTimer),e._receiver._writableState.finished||e._receiver._writableState.errorEmitted?e.emitClose():(e._receiver.on("error",z),e._receiver.on("finish",z))}function X(e){this[w]._receiver.write(e)||this.pause()}function Z(){let e=this[w];e._readyState=B.CLOSING,e._receiver.end(),this.end()}function ee(){let e=this[w];this.removeListener("error",ee),this.on("error",C),e&&(e._readyState=B.CLOSING,this.destroy())}Object.defineProperty(B,"CONNECTING",{enumerable:!0,value:M.indexOf("CONNECTING")}),Object.defineProperty(B.prototype,"CONNECTING",{enumerable:!0,value:M.indexOf("CONNECTING")}),Object.defineProperty(B,"OPEN",{enumerable:!0,value:M.indexOf("OPEN")}),Object.defineProperty(B.prototype,"OPEN",{enumerable:!0,value:M.indexOf("OPEN")}),Object.defineProperty(B,"CLOSING",{enumerable:!0,value:M.indexOf("CLOSING")}),Object.defineProperty(B.prototype,"CLOSING",{enumerable:!0,value:M.indexOf("CLOSING")}),Object.defineProperty(B,"CLOSED",{enumerable:!0,value:M.indexOf("CLOSED")}),Object.defineProperty(B.prototype,"CLOSED",{enumerable:!0,value:M.indexOf("CLOSED")}),["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(e=>{Object.defineProperty(B.prototype,e,{enumerable:!0})}),["open","error","close","message"].forEach(e=>{Object.defineProperty(B.prototype,`on${e}`,{enumerable:!0,get(){for(let t of this.listeners(e))if(t[k])return t[E];return null},set(t){for(let t of this.listeners(e))if(t[k]){this.removeListener(e,t);break}"function"==typeof t&&this.addEventListener(e,t,{[k]:!0})}})}),B.prototype.addEventListener=A,B.prototype.removeEventListener=O,t.exports=B}],21517,(e,t,r)=>{t.exports=e.x("http",()=>require("http"))},24836,(e,t,r)=>{t.exports=e.x("https",()=>require("https"))},92509,(e,t,r)=>{t.exports=e.x("url",()=>require("url"))},6461,(e,t,r)=>{t.exports=e.x("zlib",()=>require("zlib"))},9030,(e,t,r)=>{t.exports=JSON.parse('{"vadd":{"arity":-5,"flags":["write","denyoom","module"],"keyStart":1,"keyStop":1,"step":1},"vcard":{"arity":2,"flags":["readonly","module","fast"],"keyStart":1,"keyStop":1,"step":1},"vdim":{"arity":2,"flags":["readonly","module","fast"],"keyStart":1,"keyStop":1,"step":1},"vemb":{"arity":-3,"flags":["readonly","module","fast"],"keyStart":1,"keyStop":1,"step":1},"vgetattr":{"arity":3,"flags":["readonly","module","fast"],"keyStart":1,"keyStop":1,"step":1},"vinfo":{"arity":2,"flags":["readonly","module","fast"],"keyStart":1,"keyStop":1,"step":1},"vismember":{"arity":3,"flags":["readonly","module"],"keyStart":1,"keyStop":1,"step":1},"vlinks":{"arity":-3,"flags":["readonly","module","fast"],"keyStart":1,"keyStop":1,"step":1},"vrandmember":{"arity":-2,"flags":["readonly","module"],"keyStart":1,"keyStop":1,"step":1},"vrange":{"arity":-4,"flags":["readonly","module"],"keyStart":1,"keyStop":1,"step":1},"vrem":{"arity":3,"flags":["write","module"],"keyStart":1,"keyStop":1,"step":1},"vsetattr":{"arity":4,"flags":["write","module","fast"],"keyStart":1,"keyStop":1,"step":1},"vsim":{"arity":-4,"flags":["readonly","module"],"keyStart":1,"keyStop":1,"step":1},"acl":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0},"append":{"arity":3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"arcount":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"ardel":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"ardelrange":{"arity":-4,"flags":["write"],"keyStart":1,"keyStop":1,"step":1},"arget":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"argetrange":{"arity":4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"argrep":{"arity":-6,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"arinfo":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"arinsert":{"arity":-3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"arlastitems":{"arity":-3,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"arlen":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"armget":{"arity":-3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"armset":{"arity":-4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"arnext":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"arop":{"arity":-5,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"arring":{"arity":-4,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"arscan":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"arseek":{"arity":3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"arset":{"arity":-4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"asking":{"arity":1,"flags":["fast"],"keyStart":0,"keyStop":0,"step":0},"auth":{"arity":-2,"flags":["noscript","loading","stale","fast","no_auth","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"bgrewriteaof":{"arity":1,"flags":["admin","noscript","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"bgsave":{"arity":-1,"flags":["admin","noscript","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"bitcount":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"bitfield":{"arity":-2,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"bitfield_ro":{"arity":-2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"bitop":{"arity":-4,"flags":["write","denyoom"],"keyStart":2,"keyStop":-1,"step":1},"bitpos":{"arity":-3,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"blmove":{"arity":6,"flags":["write","denyoom","noscript","blocking"],"keyStart":1,"keyStop":2,"step":1},"blmpop":{"arity":-5,"flags":["write","blocking","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"blpop":{"arity":-3,"flags":["write","noscript","blocking"],"keyStart":1,"keyStop":-2,"step":1},"brpop":{"arity":-3,"flags":["write","noscript","blocking"],"keyStart":1,"keyStop":-2,"step":1},"brpoplpush":{"arity":4,"flags":["write","denyoom","noscript","blocking"],"keyStart":1,"keyStop":2,"step":1},"bzmpop":{"arity":-5,"flags":["write","blocking","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"bzpopmax":{"arity":-3,"flags":["write","noscript","blocking","fast"],"keyStart":1,"keyStop":-2,"step":1},"bzpopmin":{"arity":-3,"flags":["write","noscript","blocking","fast"],"keyStart":1,"keyStop":-2,"step":1},"client":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0},"cluster":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0},"command":{"arity":-1,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"config":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0},"copy":{"arity":-3,"flags":["write","denyoom"],"keyStart":1,"keyStop":2,"step":1},"dbsize":{"arity":1,"flags":["readonly","fast"],"keyStart":0,"keyStop":0,"step":0},"debug":{"arity":-2,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"decr":{"arity":2,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"decrby":{"arity":3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"del":{"arity":-2,"flags":["write"],"keyStart":1,"keyStop":-1,"step":1},"discard":{"arity":1,"flags":["noscript","loading","stale","fast","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"dump":{"arity":2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"echo":{"arity":2,"flags":["fast"],"keyStart":0,"keyStop":0,"step":0},"eval":{"arity":-3,"flags":["noscript","stale","skip_monitor","no_mandatory_keys","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"eval_ro":{"arity":-3,"flags":["readonly","noscript","stale","skip_monitor","no_mandatory_keys","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"evalsha":{"arity":-3,"flags":["noscript","stale","skip_monitor","no_mandatory_keys","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"evalsha_ro":{"arity":-3,"flags":["readonly","noscript","stale","skip_monitor","no_mandatory_keys","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"exec":{"arity":1,"flags":["noscript","loading","stale","skip_slowlog"],"keyStart":0,"keyStop":0,"step":0},"exists":{"arity":-2,"flags":["readonly","fast"],"keyStart":1,"keyStop":-1,"step":1},"expire":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"expireat":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"expiretime":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"failover":{"arity":-1,"flags":["admin","noscript","stale"],"keyStart":0,"keyStop":0,"step":0},"fcall":{"arity":-3,"flags":["noscript","stale","skip_monitor","no_mandatory_keys","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"fcall_ro":{"arity":-3,"flags":["readonly","noscript","stale","skip_monitor","no_mandatory_keys","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"flushall":{"arity":-1,"flags":["write"],"keyStart":0,"keyStop":0,"step":0},"flushdb":{"arity":-1,"flags":["write"],"keyStart":0,"keyStop":0,"step":0},"function":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0},"geoadd":{"arity":-5,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"geodist":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"geohash":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"geopos":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"georadius":{"arity":-6,"flags":["write","denyoom","movablekeys"],"keyStart":1,"keyStop":1,"step":1},"georadius_ro":{"arity":-6,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"georadiusbymember":{"arity":-5,"flags":["write","denyoom","movablekeys"],"keyStart":1,"keyStop":1,"step":1},"georadiusbymember_ro":{"arity":-5,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"geosearch":{"arity":-7,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"geosearchstore":{"arity":-8,"flags":["write","denyoom"],"keyStart":1,"keyStop":2,"step":1},"get":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"getbit":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"getdel":{"arity":2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"getex":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"getrange":{"arity":4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"getset":{"arity":3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"hdel":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"hello":{"arity":-1,"flags":["noscript","loading","stale","fast","no_auth","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"hexists":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"hexpire":{"arity":-6,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"hexpireat":{"arity":-6,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"hexpiretime":{"arity":-5,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"hget":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"hgetall":{"arity":2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"hgetdel":{"arity":-5,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"hgetex":{"arity":-5,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"hincrby":{"arity":4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"hincrbyfloat":{"arity":4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"hkeys":{"arity":2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"hlen":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"hmget":{"arity":-3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"hmset":{"arity":-4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"hpersist":{"arity":-5,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"hpexpire":{"arity":-6,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"hpexpireat":{"arity":-6,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"hpexpiretime":{"arity":-5,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"hpttl":{"arity":-5,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"hrandfield":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"hscan":{"arity":-3,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"hset":{"arity":-4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"hsetex":{"arity":-6,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"hsetnx":{"arity":4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"hstrlen":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"httl":{"arity":-5,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"hvals":{"arity":2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"incr":{"arity":2,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"incrby":{"arity":3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"incrbyfloat":{"arity":3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"increx":{"arity":-2,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"info":{"arity":-1,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"keys":{"arity":2,"flags":["readonly"],"keyStart":0,"keyStop":0,"step":0},"lastsave":{"arity":1,"flags":["loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"latency":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0},"lcs":{"arity":-3,"flags":["readonly"],"keyStart":1,"keyStop":2,"step":1},"lindex":{"arity":3,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"linsert":{"arity":5,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"llen":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"lmove":{"arity":5,"flags":["write","denyoom"],"keyStart":1,"keyStop":2,"step":1},"lmpop":{"arity":-4,"flags":["write","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"lolwut":{"arity":-1,"flags":["readonly","fast"],"keyStart":0,"keyStop":0,"step":0},"lpop":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"lpos":{"arity":-3,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"lpush":{"arity":-3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"lpushx":{"arity":-3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"lrange":{"arity":4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"lrem":{"arity":4,"flags":["write"],"keyStart":1,"keyStop":1,"step":1},"lset":{"arity":4,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"ltrim":{"arity":4,"flags":["write"],"keyStart":1,"keyStop":1,"step":1},"memory":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0},"mget":{"arity":-2,"flags":["readonly","fast"],"keyStart":1,"keyStop":-1,"step":1},"migrate":{"arity":-6,"flags":["write","movablekeys"],"keyStart":3,"keyStop":3,"step":1},"module":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0},"monitor":{"arity":1,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"move":{"arity":3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"mset":{"arity":-3,"flags":["write","denyoom"],"keyStart":1,"keyStop":-1,"step":2},"msetex":{"arity":-4,"flags":["write","denyoom","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"msetnx":{"arity":-3,"flags":["write","denyoom"],"keyStart":1,"keyStop":-1,"step":2},"multi":{"arity":1,"flags":["noscript","loading","stale","fast","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"object":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0},"persist":{"arity":2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"pexpire":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"pexpireat":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"pexpiretime":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"pfadd":{"arity":-2,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"pfcount":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":-1,"step":1},"pfdebug":{"arity":3,"flags":["write","denyoom","admin"],"keyStart":2,"keyStop":2,"step":1},"pfmerge":{"arity":-2,"flags":["write","denyoom"],"keyStart":1,"keyStop":-1,"step":1},"pfselftest":{"arity":1,"flags":["admin"],"keyStart":0,"keyStop":0,"step":0},"ping":{"arity":-1,"flags":["fast"],"keyStart":0,"keyStop":0,"step":0},"psetex":{"arity":4,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"psubscribe":{"arity":-2,"flags":["pubsub","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"psync":{"arity":-3,"flags":["admin","noscript","no_async_loading","no_multi"],"keyStart":0,"keyStop":0,"step":0},"pttl":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"publish":{"arity":3,"flags":["pubsub","loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"pubsub":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0},"punsubscribe":{"arity":-1,"flags":["pubsub","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"quit":{"arity":-1,"flags":["noscript","loading","stale","fast","no_auth","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"randomkey":{"arity":1,"flags":["readonly"],"keyStart":0,"keyStop":0,"step":0},"readonly":{"arity":1,"flags":["loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"readwrite":{"arity":1,"flags":["loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"rename":{"arity":3,"flags":["write"],"keyStart":1,"keyStop":2,"step":1},"renamenx":{"arity":3,"flags":["write","fast"],"keyStart":1,"keyStop":2,"step":1},"replconf":{"arity":-1,"flags":["admin","noscript","loading","stale","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"replicaof":{"arity":3,"flags":["admin","noscript","stale","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"reset":{"arity":1,"flags":["noscript","loading","stale","fast","no_auth","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"restore":{"arity":-4,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"restore-asking":{"arity":-4,"flags":["write","denyoom","asking"],"keyStart":1,"keyStop":1,"step":1},"role":{"arity":1,"flags":["noscript","loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"rpop":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"rpoplpush":{"arity":3,"flags":["write","denyoom"],"keyStart":1,"keyStop":2,"step":1},"rpush":{"arity":-3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"rpushx":{"arity":-3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"sadd":{"arity":-3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"save":{"arity":1,"flags":["admin","noscript","no_async_loading","no_multi"],"keyStart":0,"keyStop":0,"step":0},"scan":{"arity":-2,"flags":["readonly"],"keyStart":0,"keyStop":0,"step":0},"scard":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"script":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0},"sdiff":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":-1,"step":1},"sdiffstore":{"arity":-3,"flags":["write","denyoom"],"keyStart":1,"keyStop":-1,"step":1},"select":{"arity":2,"flags":["loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"set":{"arity":-3,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"setbit":{"arity":4,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"setex":{"arity":4,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"setnx":{"arity":3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"setrange":{"arity":4,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"shutdown":{"arity":-1,"flags":["admin","noscript","loading","stale","no_multi","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"sinter":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":-1,"step":1},"sintercard":{"arity":-3,"flags":["readonly","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"sinterstore":{"arity":-3,"flags":["write","denyoom"],"keyStart":1,"keyStop":-1,"step":1},"sismember":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"slaveof":{"arity":3,"flags":["admin","noscript","stale","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"slowlog":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0},"smembers":{"arity":2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"smismember":{"arity":-3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"smove":{"arity":4,"flags":["write","fast"],"keyStart":1,"keyStop":2,"step":1},"sort":{"arity":-2,"flags":["write","denyoom","movablekeys"],"keyStart":1,"keyStop":1,"step":1},"sort_ro":{"arity":-2,"flags":["readonly","movablekeys"],"keyStart":1,"keyStop":1,"step":1},"spop":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"spublish":{"arity":3,"flags":["pubsub","loading","stale","fast"],"keyStart":1,"keyStop":1,"step":1},"srandmember":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"srem":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"sscan":{"arity":-3,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"ssubscribe":{"arity":-2,"flags":["pubsub","noscript","loading","stale"],"keyStart":1,"keyStop":-1,"step":1},"strlen":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"subscribe":{"arity":-2,"flags":["pubsub","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"substr":{"arity":4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"sunion":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":-1,"step":1},"sunionstore":{"arity":-3,"flags":["write","denyoom"],"keyStart":1,"keyStop":-1,"step":1},"sunsubscribe":{"arity":-1,"flags":["pubsub","noscript","loading","stale"],"keyStart":1,"keyStop":-1,"step":1},"swapdb":{"arity":3,"flags":["write","fast"],"keyStart":0,"keyStop":0,"step":0},"sync":{"arity":1,"flags":["admin","noscript","no_async_loading","no_multi"],"keyStart":0,"keyStop":0,"step":0},"time":{"arity":1,"flags":["loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"touch":{"arity":-2,"flags":["readonly","fast"],"keyStart":1,"keyStop":-1,"step":1},"ttl":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"type":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"unlink":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":-1,"step":1},"unsubscribe":{"arity":-1,"flags":["pubsub","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"unwatch":{"arity":1,"flags":["noscript","loading","stale","fast","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"wait":{"arity":3,"flags":["noscript"],"keyStart":0,"keyStop":0,"step":0},"watch":{"arity":-2,"flags":["noscript","loading","stale","fast","allow_busy"],"keyStart":1,"keyStop":-1,"step":1},"xack":{"arity":-4,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"xadd":{"arity":-5,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"xautoclaim":{"arity":-6,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"xclaim":{"arity":-6,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"xdel":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"xdelex":{"arity":-5,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"xgroup":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0},"xinfo":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0},"xlen":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"xnack":{"arity":-7,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"xpending":{"arity":-3,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"xrange":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"xread":{"arity":-4,"flags":["readonly","blocking","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"xreadgroup":{"arity":-7,"flags":["write","blocking","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"xrevrange":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"xsetid":{"arity":-3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"xtrim":{"arity":-4,"flags":["write"],"keyStart":1,"keyStop":1,"step":1},"zadd":{"arity":-4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"zcard":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"zcount":{"arity":4,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"zdiff":{"arity":-3,"flags":["readonly","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"zdiffstore":{"arity":-4,"flags":["write","denyoom","movablekeys"],"keyStart":1,"keyStop":1,"step":1},"zincrby":{"arity":4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"zinter":{"arity":-3,"flags":["readonly","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"zintercard":{"arity":-3,"flags":["readonly","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"zinterstore":{"arity":-4,"flags":["write","denyoom","movablekeys"],"keyStart":1,"keyStop":1,"step":1},"zlexcount":{"arity":4,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"zmpop":{"arity":-4,"flags":["write","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"zmscore":{"arity":-3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"zpopmax":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"zpopmin":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"zrandmember":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zrange":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zrangebylex":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zrangebyscore":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zrangestore":{"arity":-5,"flags":["write","denyoom"],"keyStart":1,"keyStop":2,"step":1},"zrank":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"zrem":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"zremrangebylex":{"arity":4,"flags":["write"],"keyStart":1,"keyStop":1,"step":1},"zremrangebyrank":{"arity":4,"flags":["write"],"keyStart":1,"keyStop":1,"step":1},"zremrangebyscore":{"arity":4,"flags":["write"],"keyStart":1,"keyStop":1,"step":1},"zrevrange":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zrevrangebylex":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zrevrangebyscore":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zrevrank":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"zscan":{"arity":-3,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zscore":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"zunion":{"arity":-3,"flags":["readonly","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"zunionstore":{"arity":-4,"flags":["write","denyoom","movablekeys"],"keyStart":1,"keyStop":1,"step":1}}')},43594,(e,t,r)=>{var s=[0,4129,8258,12387,16516,20645,24774,28903,33032,37161,41290,45419,49548,53677,57806,61935,4657,528,12915,8786,21173,17044,29431,25302,37689,33560,45947,41818,54205,50076,62463,58334,9314,13379,1056,5121,25830,29895,17572,21637,42346,46411,34088,38153,58862,62927,50604,54669,13907,9842,5649,1584,30423,26358,22165,18100,46939,42874,38681,34616,63455,59390,55197,51132,18628,22757,26758,30887,2112,6241,10242,14371,51660,55789,59790,63919,35144,39273,43274,47403,23285,19156,31415,27286,6769,2640,14899,10770,56317,52188,64447,60318,39801,35672,47931,43802,27814,31879,19684,23749,11298,15363,3168,7233,60846,64911,52716,56781,44330,48395,36200,40265,32407,28342,24277,20212,15891,11826,7761,3696,65439,61374,57309,53244,48923,44858,40793,36728,37256,33193,45514,41451,53516,49453,61774,57711,4224,161,12482,8419,20484,16421,28742,24679,33721,37784,41979,46042,49981,54044,58239,62302,689,4752,8947,13010,16949,21012,25207,29270,46570,42443,38312,34185,62830,58703,54572,50445,13538,9411,5280,1153,29798,25671,21540,17413,42971,47098,34713,38840,59231,63358,50973,55100,9939,14066,1681,5808,26199,30326,17941,22068,55628,51565,63758,59695,39368,35305,47498,43435,22596,18533,30726,26663,6336,2273,14466,10403,52093,56156,60223,64286,35833,39896,43963,48026,19061,23124,27191,31254,2801,6864,10931,14994,64814,60687,56684,52557,48554,44427,40424,36297,31782,27655,23652,19525,15522,11395,7392,3265,61215,65342,53085,57212,44955,49082,36825,40952,28183,32310,20053,24180,11923,16050,3793,7920],i=function(e){for(var t,r=0,s=0,i=[],n=e.length;r<n;r++)(t=e.charCodeAt(r))<128?i[s++]=t:(t<2048?i[s++]=t>>6|192:((64512&t)==55296&&r+1<e.length&&(64512&e.charCodeAt(r+1))==56320?(t=65536+((1023&t)<<10)+(1023&e.charCodeAt(++r)),i[s++]=t>>18|240,i[s++]=t>>12&63|128):i[s++]=t>>12|224,i[s++]=t>>6&63|128),i[s++]=63&t|128);return i},n=t.exports=function(e){for(var t,r=0,n=-1,o=0,a=0,l="string"==typeof e?i(e):e,c=l.length;r<c;){if(t=l[r++],-1===n)123===t&&(n=r);else if(125!==t)a=s[(t^a>>8)&255]^a<<8;else if(r-1!==n)return 16383&a;o=s[(t^o>>8)&255]^o<<8}return 16383&o};t.exports.generateMulti=function(e){for(var t=1,r=e.length,s=n(e[0]);t<r;)if(n(e[t++])!==s)return -1;return s}},80353,(e,t,r)=>{let s;r.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;let r="color: "+this.color;e.splice(1,0,r,"color: inherit");let s=0,i=0;e[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(s++,"%c"===e&&(i=s))}),e.splice(i,0,r)},r.save=function(e){try{e?r.storage.setItem("debug",e):r.storage.removeItem("debug")}catch(e){}},r.load=function(){let e;try{e=r.storage.getItem("debug")||r.storage.getItem("DEBUG")}catch(e){}return!e&&"u">typeof process&&"env"in process&&(e=process.env.DEBUG),e},r.useColors=function(){let e;return!("u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("u">typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"u">typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},r.storage=function(){try{return localStorage}catch(e){}}(),s=!1,r.destroy=()=>{s||(s=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))},r.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],r.log=console.debug||console.log||(()=>{}),t.exports=e.r(20319)(r);let{formatters:i}=t.exports;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},20319,(e,t,r)=>{t.exports=function(t){function r(e){let t,i,n,o=null;function a(...e){if(!a.enabled)return;let s=Number(new Date);a.diff=s-(t||s),a.prev=t,a.curr=s,t=s,e[0]=r.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let i=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(t,s)=>{if("%%"===t)return"%";i++;let n=r.formatters[s];if("function"==typeof n){let r=e[i];t=n.call(a,r),e.splice(i,1),i--}return t}),r.formatArgs.call(a,e),(a.log||r.log).apply(a,e)}return a.namespace=e,a.useColors=r.useColors(),a.color=r.selectColor(e),a.extend=s,a.destroy=r.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(i!==r.namespaces&&(i=r.namespaces,n=r.enabled(e)),n),set:e=>{o=e}}),"function"==typeof r.init&&r.init(a),a}function s(e,t){let s=r(this.namespace+(void 0===t?":":t)+e);return s.log=this.log,s}function i(e,t){let r=0,s=0,i=-1,n=0;for(;r<e.length;)if(s<t.length&&(t[s]===e[r]||"*"===t[s]))"*"===t[s]?(i=s,n=r):r++,s++;else{if(-1===i)return!1;s=i+1,r=++n}for(;s<t.length&&"*"===t[s];)s++;return s===t.length}return r.debug=r,r.default=r,r.coerce=function(e){return e instanceof Error?e.stack||e.message:e},r.disable=function(){let e=[...r.names,...r.skips.map(e=>"-"+e)].join(",");return r.enable(""),e},r.enable=function(e){for(let t of(r.save(e),r.namespaces=e,r.names=[],r.skips=[],("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean)))"-"===t[0]?r.skips.push(t.slice(1)):r.names.push(t)},r.enabled=function(e){for(let t of r.skips)if(i(e,t))return!1;for(let t of r.names)if(i(e,t))return!0;return!1},r.humanize=e.r(51550),r.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(t).forEach(e=>{r[e]=t[e]}),r.names=[],r.skips=[],r.formatters={},r.selectColor=function(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r)|0;return r.colors[Math.abs(t)%r.colors.length]},r.enable(r.load()),r}},26914,(e,t,r)=>{"u"<typeof process||"renderer"===process.type||process.__nwjs?t.exports=e.r(80353):t.exports=e.r(78766)},78766,(e,t,r)=>{let s=e.r(70722),i=e.r(24361);r.init=function(e){e.inspectOpts={};let t=Object.keys(r.inspectOpts);for(let s=0;s<t.length;s++)e.inspectOpts[t[s]]=r.inspectOpts[t[s]]},r.log=function(...e){return process.stderr.write(i.formatWithOptions(r.inspectOpts,...e)+"\n")},r.formatArgs=function(e){let{namespace:s,useColors:i}=this;if(i){let r=this.color,i="\x1b[3"+(r<8?r:"8;5;"+r),n=` ${i};1m${s} \x1b[0m`;e[0]=n+e[0].split("\n").join("\n"+n),e.push(i+"m+"+t.exports.humanize(this.diff)+"\x1b[0m")}else e[0]=(r.inspectOpts.hideDate?"":new Date().toISOString()+" ")+s+" "+e[0]},r.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},r.load=function(){return process.env.DEBUG},r.useColors=function(){return"colors"in r.inspectOpts?!!r.inspectOpts.colors:s.isatty(process.stderr.fd)},r.destroy=i.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),r.colors=[6,2,3,4,5,1];try{let e=(()=>{let e=Error("Cannot find module 'supports-color'");throw e.code="MODULE_NOT_FOUND",e})();e&&(e.stderr||e).level>=2&&(r.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}r.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),s=process.env[t];return s=!!/^(yes|on|true|enabled)$/i.test(s)||!/^(no|off|false|disabled)$/i.test(s)&&("null"===s?null:Number(s)),e[r]=s,e},{}),t.exports=e.r(20319)(r);let{formatters:n}=t.exports;n.o=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts).split("\n").map(e=>e.trim()).join(" ")},n.O=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts)}},51550,(e,t,r)=>{function s(e,t,r,s){return Math.round(e/r)+" "+s+(t>=1.5*r?"s":"")}t.exports=function(e,t){t=t||{};var r,i,n,o,a=typeof e;if("string"===a&&e.length>0){var l=e;if(!((l=String(l)).length>100)){var c=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(l);if(c){var u=parseFloat(c[1]);switch((c[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*u;case"weeks":case"week":case"w":return 6048e5*u;case"days":case"day":case"d":return 864e5*u;case"hours":case"hour":case"hrs":case"hr":case"h":return 36e5*u;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*u;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*u;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:break}}}return}if("number"===a&&isFinite(e)){return t.long?(i=Math.abs(r=e))>=864e5?s(r,i,864e5,"day"):i>=36e5?s(r,i,36e5,"hour"):i>=6e4?s(r,i,6e4,"minute"):i>=1e3?s(r,i,1e3,"second"):r+" ms":(o=Math.abs(n=e))>=864e5?Math.round(n/864e5)+"d":o>=36e5?Math.round(n/36e5)+"h":o>=6e4?Math.round(n/6e4)+"m":o>=1e3?Math.round(n/1e3)+"s":n+"ms"}throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}];
|
|
145
145
|
|
|
146
146
|
//# sourceMappingURL=%5Broot-of-the-server%5D__0kyzfsxt0lqmw._.js.map
|