@elizaos/server 1.6.0-alpha.0 → 1.6.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/README.md +16 -0
  2. package/dist/api/agents/crud.d.ts +2 -3
  3. package/dist/api/agents/index.d.ts +2 -3
  4. package/dist/api/agents/lifecycle.d.ts +2 -3
  5. package/dist/api/agents/logs.d.ts +2 -3
  6. package/dist/api/agents/panels.d.ts +2 -3
  7. package/dist/api/agents/runs.d.ts +6 -0
  8. package/dist/api/agents/worlds.d.ts +2 -3
  9. package/dist/api/audio/audioBuffer.d.ts +0 -1
  10. package/dist/api/audio/conversation.d.ts +2 -3
  11. package/dist/api/audio/index.d.ts +2 -3
  12. package/dist/api/audio/processing.d.ts +2 -3
  13. package/dist/api/audio/synthesis.d.ts +2 -3
  14. package/dist/api/index.d.ts +5 -6
  15. package/dist/api/media/agents.d.ts +0 -1
  16. package/dist/api/media/channels.d.ts +0 -1
  17. package/dist/api/media/index.d.ts +0 -1
  18. package/dist/api/memory/agents.d.ts +2 -3
  19. package/dist/api/memory/groups.d.ts +2 -3
  20. package/dist/api/memory/index.d.ts +2 -3
  21. package/dist/api/memory/rooms.d.ts +2 -3
  22. package/dist/api/messaging/channels.d.ts +2 -3
  23. package/dist/api/messaging/core.d.ts +0 -1
  24. package/dist/api/messaging/errors/SessionErrors.d.ts +0 -1
  25. package/dist/api/messaging/index.d.ts +2 -3
  26. package/dist/api/messaging/servers.d.ts +0 -1
  27. package/dist/api/messaging/sessions.d.ts +2 -3
  28. package/dist/api/runtime/debug.d.ts +0 -1
  29. package/dist/api/runtime/health.d.ts +2 -3
  30. package/dist/api/runtime/index.d.ts +2 -3
  31. package/dist/api/runtime/logging.d.ts +0 -1
  32. package/dist/api/shared/constants.d.ts +0 -1
  33. package/dist/api/shared/file-utils.d.ts +0 -1
  34. package/dist/api/shared/index.d.ts +0 -1
  35. package/dist/api/shared/middleware.d.ts +2 -3
  36. package/dist/api/shared/response-utils.d.ts +0 -1
  37. package/dist/api/shared/uploads/index.d.ts +0 -1
  38. package/dist/api/shared/validation.d.ts +2 -3
  39. package/dist/api/system/environment.d.ts +0 -1
  40. package/dist/api/system/index.d.ts +0 -1
  41. package/dist/api/system/version.d.ts +0 -1
  42. package/dist/api/tee/index.d.ts +0 -1
  43. package/dist/api/tee/tee.d.ts +0 -1
  44. package/dist/authMiddleware.d.ts +0 -1
  45. package/dist/bus.d.ts +0 -1
  46. package/dist/characters/default.d.ts +14 -0
  47. package/dist/client/assets/main--sdaD56A.js +8 -0
  48. package/dist/client/assets/main--sdaD56A.js.map +1 -0
  49. package/dist/client/assets/main-CkbfKgca.css +5999 -0
  50. package/dist/client/assets/main-DeWqErjb.js +119 -0
  51. package/dist/client/assets/main-DeWqErjb.js.map +1 -0
  52. package/dist/client/assets/react-vendor-D5Td5IIA.js +546 -0
  53. package/dist/client/assets/react-vendor-D5Td5IIA.js.map +1 -0
  54. package/dist/client/assets/ui-vendor-B7JxFfFk.js +2 -0
  55. package/dist/client/assets/ui-vendor-B7JxFfFk.js.map +1 -0
  56. package/dist/client/elizaos-avatar.png +0 -0
  57. package/dist/client/elizaos-icon.png +0 -0
  58. package/dist/client/elizaos-logo-light.png +0 -0
  59. package/dist/client/elizaos.webp +0 -0
  60. package/dist/client/favicon.ico +0 -0
  61. package/dist/client/images/agents/agent1.png +0 -0
  62. package/dist/client/images/agents/agent2.png +0 -0
  63. package/dist/client/images/agents/agent3.png +0 -0
  64. package/dist/client/images/agents/agent4.png +0 -0
  65. package/dist/client/images/agents/agent5.png +0 -0
  66. package/dist/client/index.html +14 -0
  67. package/dist/index.d.ts +34 -6
  68. package/dist/index.js +43259 -6171
  69. package/dist/loader.d.ts +0 -1
  70. package/dist/managers/ConfigManager.d.ts +32 -0
  71. package/dist/managers/PluginInstaller.d.ts +10 -0
  72. package/dist/managers/PluginLoader.d.ts +27 -0
  73. package/dist/scripts/copy-client-dist.d.ts +0 -1
  74. package/dist/services/message.d.ts +0 -1
  75. package/dist/socketio/index.d.ts +3 -5
  76. package/dist/types/sessions.d.ts +0 -1
  77. package/dist/types.d.ts +18 -1
  78. package/dist/upload.d.ts +0 -1
  79. package/dist/utils/media-transformer.d.ts +16 -0
  80. package/package.json +6 -4
  81. package/dist/api/agents/crud.d.ts.map +0 -1
  82. package/dist/api/agents/index.d.ts.map +0 -1
  83. package/dist/api/agents/lifecycle.d.ts.map +0 -1
  84. package/dist/api/agents/logs.d.ts.map +0 -1
  85. package/dist/api/agents/panels.d.ts.map +0 -1
  86. package/dist/api/agents/worlds.d.ts.map +0 -1
  87. package/dist/api/audio/audioBuffer.d.ts.map +0 -1
  88. package/dist/api/audio/conversation.d.ts.map +0 -1
  89. package/dist/api/audio/index.d.ts.map +0 -1
  90. package/dist/api/audio/processing.d.ts.map +0 -1
  91. package/dist/api/audio/synthesis.d.ts.map +0 -1
  92. package/dist/api/index.d.ts.map +0 -1
  93. package/dist/api/media/agents.d.ts.map +0 -1
  94. package/dist/api/media/channels.d.ts.map +0 -1
  95. package/dist/api/media/index.d.ts.map +0 -1
  96. package/dist/api/memory/agents.d.ts.map +0 -1
  97. package/dist/api/memory/groups.d.ts.map +0 -1
  98. package/dist/api/memory/index.d.ts.map +0 -1
  99. package/dist/api/memory/rooms.d.ts.map +0 -1
  100. package/dist/api/messaging/channels.d.ts.map +0 -1
  101. package/dist/api/messaging/core.d.ts.map +0 -1
  102. package/dist/api/messaging/errors/SessionErrors.d.ts.map +0 -1
  103. package/dist/api/messaging/index.d.ts.map +0 -1
  104. package/dist/api/messaging/servers.d.ts.map +0 -1
  105. package/dist/api/messaging/sessions.d.ts.map +0 -1
  106. package/dist/api/runtime/debug.d.ts.map +0 -1
  107. package/dist/api/runtime/health.d.ts.map +0 -1
  108. package/dist/api/runtime/index.d.ts.map +0 -1
  109. package/dist/api/runtime/logging.d.ts.map +0 -1
  110. package/dist/api/shared/constants.d.ts.map +0 -1
  111. package/dist/api/shared/file-utils.d.ts.map +0 -1
  112. package/dist/api/shared/index.d.ts.map +0 -1
  113. package/dist/api/shared/middleware.d.ts.map +0 -1
  114. package/dist/api/shared/response-utils.d.ts.map +0 -1
  115. package/dist/api/shared/uploads/index.d.ts.map +0 -1
  116. package/dist/api/shared/validation.d.ts.map +0 -1
  117. package/dist/api/system/environment.d.ts.map +0 -1
  118. package/dist/api/system/index.d.ts.map +0 -1
  119. package/dist/api/system/version.d.ts.map +0 -1
  120. package/dist/api/tee/index.d.ts.map +0 -1
  121. package/dist/api/tee/tee.d.ts.map +0 -1
  122. package/dist/authMiddleware.d.ts.map +0 -1
  123. package/dist/bus.d.ts.map +0 -1
  124. package/dist/index.d.ts.map +0 -1
  125. package/dist/loader.d.ts.map +0 -1
  126. package/dist/scripts/copy-client-dist.d.ts.map +0 -1
  127. package/dist/services/message.d.ts.map +0 -1
  128. package/dist/socketio/index.d.ts.map +0 -1
  129. package/dist/types/sessions.d.ts.map +0 -1
  130. package/dist/types.d.ts.map +0 -1
  131. package/dist/upload.d.ts.map +0 -1
package/README.md CHANGED
@@ -202,6 +202,22 @@ The server respects these environment variables:
202
202
  - `LOG_LEVEL` - Logging level (debug, info, warn, error)
203
203
  - `CORS_ORIGIN` - CORS allowed origins
204
204
 
205
+ ### Error Monitoring (Sentry)
206
+
207
+ Set these to enable Sentry error reporting:
208
+
209
+ - `SENTRY_DSN` - Your Sentry DSN (enables Sentry when set)
210
+ - `SENTRY_ENVIRONMENT` - Environment name (e.g. `production`, `staging`, `development`)
211
+ - `SENTRY_TRACES_SAMPLE_RATE` - Number between 0 and 1 to enable tracing (optional; default 0)
212
+
213
+ When `SENTRY_DSN` is present, the server:
214
+
215
+ - Initializes Sentry during startup
216
+ - Captures API handler exceptions with route and request context
217
+ - Captures `uncaughtException` and `unhandledRejection` at the process level
218
+
219
+ Note: The server includes a default DSN that will be used if `SENTRY_DSN` is not set. To disable Sentry entirely, set `SENTRY_DSN` to an empty string.
220
+
205
221
  ### Server Options
206
222
 
207
223
  ```typescript
@@ -1,8 +1,7 @@
1
- import type { IAgentRuntime, UUID } from '@elizaos/core';
1
+ import type { ElizaOS } from '@elizaos/core';
2
2
  import express from 'express';
3
3
  import type { AgentServer } from '../../index';
4
4
  /**
5
5
  * Agent CRUD operations
6
6
  */
7
- export declare function createAgentCrudRouter(agents: Map<UUID, IAgentRuntime>, serverInstance: AgentServer): express.Router;
8
- //# sourceMappingURL=crud.d.ts.map
7
+ export declare function createAgentCrudRouter(elizaOS: ElizaOS, serverInstance: AgentServer): express.Router;
@@ -1,8 +1,7 @@
1
- import type { IAgentRuntime, UUID } from '@elizaos/core';
1
+ import type { ElizaOS } from '@elizaos/core';
2
2
  import express from 'express';
3
3
  import type { AgentServer } from '../../index';
4
4
  /**
5
5
  * Creates the agents router for agent lifecycle and management operations
6
6
  */
7
- export declare function agentsRouter(agents: Map<UUID, IAgentRuntime>, serverInstance: AgentServer): express.Router;
8
- //# sourceMappingURL=index.d.ts.map
7
+ export declare function agentsRouter(elizaOS: ElizaOS, serverInstance: AgentServer): express.Router;
@@ -1,8 +1,7 @@
1
- import type { IAgentRuntime, UUID } from '@elizaos/core';
1
+ import type { ElizaOS } from '@elizaos/core';
2
2
  import express from 'express';
3
3
  import type { AgentServer } from '../../index';
4
4
  /**
5
5
  * Agent lifecycle operations (start, stop, status)
6
6
  */
7
- export declare function createAgentLifecycleRouter(agents: Map<UUID, IAgentRuntime>, serverInstance: AgentServer): express.Router;
8
- //# sourceMappingURL=lifecycle.d.ts.map
7
+ export declare function createAgentLifecycleRouter(elizaOS: ElizaOS, serverInstance: AgentServer): express.Router;
@@ -1,7 +1,6 @@
1
- import type { IAgentRuntime, UUID } from '@elizaos/core';
1
+ import type { ElizaOS } from '@elizaos/core';
2
2
  import express from 'express';
3
3
  /**
4
4
  * Agent logs management
5
5
  */
6
- export declare function createAgentLogsRouter(agents: Map<UUID, IAgentRuntime>): express.Router;
7
- //# sourceMappingURL=logs.d.ts.map
6
+ export declare function createAgentLogsRouter(elizaOS: ElizaOS): express.Router;
@@ -1,7 +1,6 @@
1
- import type { IAgentRuntime, UUID } from '@elizaos/core';
1
+ import type { ElizaOS } from '@elizaos/core';
2
2
  import express from 'express';
3
3
  /**
4
4
  * Agent panels and plugin routes management
5
5
  */
6
- export declare function createAgentPanelsRouter(agents: Map<UUID, IAgentRuntime>): express.Router;
7
- //# sourceMappingURL=panels.d.ts.map
6
+ export declare function createAgentPanelsRouter(elizaOS: ElizaOS): express.Router;
@@ -0,0 +1,6 @@
1
+ import type { ElizaOS } from '@elizaos/core';
2
+ import express from 'express';
3
+ /**
4
+ * Agent runs management
5
+ */
6
+ export declare function createAgentRunsRouter(elizaOS: ElizaOS): express.Router;
@@ -1,7 +1,6 @@
1
- import type { IAgentRuntime, UUID } from '@elizaos/core';
1
+ import type { ElizaOS } from '@elizaos/core';
2
2
  import express from 'express';
3
3
  /**
4
4
  * Agent world management operations
5
5
  */
6
- export declare function createAgentWorldsRouter(agents: Map<UUID, IAgentRuntime>): express.Router;
7
- //# sourceMappingURL=worlds.d.ts.map
6
+ export declare function createAgentWorldsRouter(elizaOS: ElizaOS): express.Router;
@@ -15,4 +15,3 @@ export interface AudioProcessingResult {
15
15
  }
16
16
  export declare function convertToAudioBuffer(speechResponse: any): Promise<Buffer>;
17
17
  export declare function convertToAudioBuffer(speechResponse: any, detectMimeType: true): Promise<AudioProcessingResult>;
18
- //# sourceMappingURL=audioBuffer.d.ts.map
@@ -1,7 +1,6 @@
1
- import type { IAgentRuntime, UUID } from '@elizaos/core';
1
+ import type { ElizaOS } from '@elizaos/core';
2
2
  import express from 'express';
3
3
  /**
4
4
  * Speech conversation functionality
5
5
  */
6
- export declare function createConversationRouter(agents: Map<UUID, IAgentRuntime>): express.Router;
7
- //# sourceMappingURL=conversation.d.ts.map
6
+ export declare function createConversationRouter(elizaOS: ElizaOS): express.Router;
@@ -1,7 +1,6 @@
1
- import type { IAgentRuntime, UUID } from '@elizaos/core';
1
+ import type { ElizaOS } from '@elizaos/core';
2
2
  import express from 'express';
3
3
  /**
4
4
  * Creates the audio router for speech and audio processing
5
5
  */
6
- export declare function audioRouter(agents: Map<UUID, IAgentRuntime>): express.Router;
7
- //# sourceMappingURL=index.d.ts.map
6
+ export declare function audioRouter(elizaOS: ElizaOS): express.Router;
@@ -1,4 +1,4 @@
1
- import type { IAgentRuntime, UUID } from '@elizaos/core';
1
+ import type { ElizaOS } from '@elizaos/core';
2
2
  import express from 'express';
3
3
  /**
4
4
  * Securely validates a file path to prevent path traversal attacks
@@ -6,5 +6,4 @@ import express from 'express';
6
6
  /**
7
7
  * Audio processing functionality - upload and transcription
8
8
  */
9
- export declare function createAudioProcessingRouter(agents: Map<UUID, IAgentRuntime>): express.Router;
10
- //# sourceMappingURL=processing.d.ts.map
9
+ export declare function createAudioProcessingRouter(elizaOS: ElizaOS): express.Router;
@@ -1,7 +1,6 @@
1
- import type { IAgentRuntime, UUID } from '@elizaos/core';
1
+ import type { ElizaOS } from '@elizaos/core';
2
2
  import express from 'express';
3
3
  /**
4
4
  * Text-to-speech synthesis functionality
5
5
  */
6
- export declare function createSynthesisRouter(agents: Map<UUID, IAgentRuntime>): express.Router;
7
- //# sourceMappingURL=synthesis.d.ts.map
6
+ export declare function createSynthesisRouter(elizaOS: ElizaOS): express.Router;
@@ -1,4 +1,4 @@
1
- import type { IAgentRuntime, UUID } from '@elizaos/core';
1
+ import type { ElizaOS } from '@elizaos/core';
2
2
  import express from 'express';
3
3
  import http from 'node:http';
4
4
  import { Server as SocketIOServer } from 'socket.io';
@@ -8,13 +8,12 @@ import type { AgentServer } from '../index';
8
8
  * @param server HTTP Server instance
9
9
  * @param agents Map of agent runtimes
10
10
  */
11
- export declare function setupSocketIO(server: http.Server, agents: Map<UUID, IAgentRuntime>, serverInstance: AgentServer): SocketIOServer;
12
- export declare function createPluginRouteHandler(agents: Map<UUID, IAgentRuntime>): express.RequestHandler;
11
+ export declare function setupSocketIO(server: http.Server, elizaOS: ElizaOS, serverInstance: AgentServer): SocketIOServer;
12
+ export declare function createPluginRouteHandler(elizaOS: ElizaOS): express.RequestHandler;
13
13
  /**
14
14
  * Creates an API router with various endpoints and middleware.
15
- * @param {Map<UUID, IAgentRuntime>} agents - Map of agents with UUID as key and IAgentRuntime as value.
15
+ * @param {ElizaOS} elizaOS - ElizaOS instance containing all agents and their runtimes.
16
16
  * @param {AgentServer} [server] - Optional AgentServer instance.
17
17
  * @returns {express.Router} The configured API router.
18
18
  */
19
- export declare function createApiRouter(agents: Map<UUID, IAgentRuntime>, serverInstance: AgentServer): express.Router;
20
- //# sourceMappingURL=index.d.ts.map
19
+ export declare function createApiRouter(elizaOS: ElizaOS, serverInstance: AgentServer): express.Router;
@@ -3,4 +3,3 @@ import express from 'express';
3
3
  * Agent media upload functionality
4
4
  */
5
5
  export declare function createAgentMediaRouter(): express.Router;
6
- //# sourceMappingURL=agents.d.ts.map
@@ -3,4 +3,3 @@ import express from 'express';
3
3
  * Channel media upload functionality
4
4
  */
5
5
  export declare function createChannelMediaRouter(): express.Router;
6
- //# sourceMappingURL=channels.d.ts.map
@@ -3,4 +3,3 @@ import express from 'express';
3
3
  * Creates the media router for file uploads and media handling
4
4
  */
5
5
  export declare function mediaRouter(): express.Router;
6
- //# sourceMappingURL=index.d.ts.map
@@ -1,7 +1,6 @@
1
- import type { IAgentRuntime, UUID } from '@elizaos/core';
1
+ import type { ElizaOS } from '@elizaos/core';
2
2
  import express from 'express';
3
3
  /**
4
4
  * Agent memory management functionality
5
5
  */
6
- export declare function createAgentMemoryRouter(agents: Map<UUID, IAgentRuntime>): express.Router;
7
- //# sourceMappingURL=agents.d.ts.map
6
+ export declare function createAgentMemoryRouter(elizaOS: ElizaOS): express.Router;
@@ -1,8 +1,7 @@
1
- import type { IAgentRuntime, UUID } from '@elizaos/core';
1
+ import type { ElizaOS } from '@elizaos/core';
2
2
  import express from 'express';
3
3
  import type { AgentServer } from '../../index';
4
4
  /**
5
5
  * Group and world memory management functionality
6
6
  */
7
- export declare function createGroupMemoryRouter(agents: Map<UUID, IAgentRuntime>, serverInstance: AgentServer): express.Router;
8
- //# sourceMappingURL=groups.d.ts.map
7
+ export declare function createGroupMemoryRouter(elizaOS: ElizaOS, serverInstance: AgentServer): express.Router;
@@ -1,8 +1,7 @@
1
- import type { IAgentRuntime, UUID } from '@elizaos/core';
1
+ import type { ElizaOS } from '@elizaos/core';
2
2
  import express from 'express';
3
3
  import type { AgentServer } from '../../index';
4
4
  /**
5
5
  * Creates the memory router for memory and knowledge management
6
6
  */
7
- export declare function memoryRouter(agents: Map<UUID, IAgentRuntime>, serverInstance: AgentServer): express.Router;
8
- //# sourceMappingURL=index.d.ts.map
7
+ export declare function memoryRouter(elizaOS: ElizaOS, serverInstance: AgentServer): express.Router;
@@ -1,7 +1,6 @@
1
- import type { IAgentRuntime, UUID } from '@elizaos/core';
1
+ import type { ElizaOS } from '@elizaos/core';
2
2
  import express from 'express';
3
3
  /**
4
4
  * Room management functionality for agents
5
5
  */
6
- export declare function createRoomManagementRouter(agents: Map<UUID, IAgentRuntime>): express.Router;
7
- //# sourceMappingURL=rooms.d.ts.map
6
+ export declare function createRoomManagementRouter(elizaOS: ElizaOS): express.Router;
@@ -1,8 +1,7 @@
1
- import { IAgentRuntime, type UUID } from '@elizaos/core';
1
+ import { ElizaOS } from '@elizaos/core';
2
2
  import express from 'express';
3
3
  import type { AgentServer } from '../../index';
4
4
  /**
5
5
  * Channel management functionality
6
6
  */
7
- export declare function createChannelsRouter(agents: Map<UUID, IAgentRuntime>, serverInstance: AgentServer): express.Router;
8
- //# sourceMappingURL=channels.d.ts.map
7
+ export declare function createChannelsRouter(elizaOS: ElizaOS, serverInstance: AgentServer): express.Router;
@@ -4,4 +4,3 @@ import type { AgentServer } from '../../index';
4
4
  * Core messaging functionality - message submission and ingestion
5
5
  */
6
6
  export declare function createMessagingCoreRouter(serverInstance: AgentServer): express.Router;
7
- //# sourceMappingURL=core.d.ts.map
@@ -146,4 +146,3 @@ export declare function isSessionError(error: unknown): error is SessionError;
146
146
  * Type guard to check if an error is a validation error
147
147
  */
148
148
  export declare function isValidationError(error: unknown): error is ValidationError;
149
- //# sourceMappingURL=SessionErrors.d.ts.map
@@ -1,8 +1,7 @@
1
- import type { IAgentRuntime, UUID } from '@elizaos/core';
1
+ import type { ElizaOS } from '@elizaos/core';
2
2
  import express from 'express';
3
3
  import type { AgentServer } from '../../index';
4
4
  /**
5
5
  * Creates the messaging router for all communication functionality
6
6
  */
7
- export declare function messagingRouter(agents: Map<UUID, IAgentRuntime>, serverInstance: AgentServer): express.Router;
8
- //# sourceMappingURL=index.d.ts.map
7
+ export declare function messagingRouter(elizaOS: ElizaOS, serverInstance: AgentServer): express.Router;
@@ -4,4 +4,3 @@ import type { AgentServer } from '../../index';
4
4
  * Server management functionality
5
5
  */
6
6
  export declare function createServersRouter(serverInstance: AgentServer): express.Router;
7
- //# sourceMappingURL=servers.d.ts.map
@@ -1,4 +1,4 @@
1
- import { type UUID, type IAgentRuntime } from '@elizaos/core';
1
+ import { type ElizaOS } from '@elizaos/core';
2
2
  import express from 'express';
3
3
  import type { AgentServer } from '../../index';
4
4
  /**
@@ -19,5 +19,4 @@ export interface SessionRouter extends express.Router {
19
19
  * @param serverInstance - The server instance for message handling
20
20
  * @returns Router with cleanup method to prevent memory leaks
21
21
  */
22
- export declare function createSessionsRouter(agents: Map<UUID, IAgentRuntime>, serverInstance: AgentServer): SessionRouter;
23
- //# sourceMappingURL=sessions.d.ts.map
22
+ export declare function createSessionsRouter(elizaOS: ElizaOS, serverInstance: AgentServer): SessionRouter;
@@ -4,4 +4,3 @@ import type { AgentServer } from '../../index';
4
4
  * Debug and diagnostic endpoints
5
5
  */
6
6
  export declare function createDebugRouter(serverInstance: AgentServer): express.Router;
7
- //# sourceMappingURL=debug.d.ts.map
@@ -1,8 +1,7 @@
1
- import type { IAgentRuntime, UUID } from '@elizaos/core';
1
+ import type { ElizaOS } from '@elizaos/core';
2
2
  import express from 'express';
3
3
  import type { AgentServer } from '../../index';
4
4
  /**
5
5
  * Health monitoring and status endpoints
6
6
  */
7
- export declare function createHealthRouter(agents: Map<UUID, IAgentRuntime>, serverInstance: AgentServer): express.Router;
8
- //# sourceMappingURL=health.d.ts.map
7
+ export declare function createHealthRouter(elizaOS: ElizaOS, serverInstance: AgentServer): express.Router;
@@ -1,8 +1,7 @@
1
- import type { IAgentRuntime, UUID } from '@elizaos/core';
1
+ import type { ElizaOS } from '@elizaos/core';
2
2
  import express from 'express';
3
3
  import type { AgentServer } from '../../index';
4
4
  /**
5
5
  * Creates the runtime router for system operations and health monitoring
6
6
  */
7
- export declare function runtimeRouter(agents: Map<UUID, IAgentRuntime>, serverInstance: AgentServer): express.Router;
8
- //# sourceMappingURL=index.d.ts.map
7
+ export declare function runtimeRouter(elizaOS: ElizaOS, serverInstance: AgentServer): express.Router;
@@ -3,4 +3,3 @@ import express from 'express';
3
3
  * Logging management endpoints
4
4
  */
5
5
  export declare function createLoggingRouter(): express.Router;
6
- //# sourceMappingURL=logging.d.ts.map
@@ -19,4 +19,3 @@ export declare const ALLOWED_AUDIO_MIME_TYPES: readonly ["audio/mpeg", "audio/mp
19
19
  * Valid MIME types for media files (includes audio, images, documents)
20
20
  */
21
21
  export declare const ALLOWED_MEDIA_MIME_TYPES: readonly ["audio/mpeg", "audio/mp3", "audio/wav", "audio/ogg", "audio/webm", "audio/mp4", "audio/aac", "audio/flac", "audio/x-wav", "audio/wave", "image/jpeg", "image/png", "image/gif", "image/webp", "video/mp4", "video/webm", "application/pdf", "text/plain"];
22
- //# sourceMappingURL=constants.d.ts.map
@@ -18,4 +18,3 @@ export declare const cleanupFiles: (files: Express.Multer.File[]) => void;
18
18
  * Cleans up a multer file (no-op for memory storage)
19
19
  */
20
20
  export declare const cleanupUploadedFile: (file: Express.Multer.File) => void;
21
- //# sourceMappingURL=file-utils.d.ts.map
@@ -4,4 +4,3 @@ export * from './file-utils';
4
4
  export * from './middleware';
5
5
  export * from './uploads';
6
6
  export * from './constants';
7
- //# sourceMappingURL=index.d.ts.map
@@ -1,9 +1,9 @@
1
- import type { IAgentRuntime, UUID } from '@elizaos/core';
1
+ import type { ElizaOS } from '@elizaos/core';
2
2
  import express from 'express';
3
3
  /**
4
4
  * Middleware to validate that an agent exists
5
5
  */
6
- export declare const agentExistsMiddleware: (agents: Map<UUID, IAgentRuntime>) => (req: express.Request, res: express.Response, next: express.NextFunction) => void;
6
+ export declare const agentExistsMiddleware: (elizaOS: ElizaOS) => (req: express.Request, res: express.Response, next: express.NextFunction) => void;
7
7
  /**
8
8
  * Middleware to validate UUID parameters
9
9
  */
@@ -37,4 +37,3 @@ export declare const createUploadRateLimit: () => import("express-rate-limit").R
37
37
  * Prevents brute force attacks on channel IDs
38
38
  */
39
39
  export declare const createChannelValidationRateLimit: () => import("express-rate-limit").RateLimitRequestHandler;
40
- //# sourceMappingURL=middleware.d.ts.map
@@ -7,4 +7,3 @@ export declare const sendError: (res: express.Response, status: number, code: st
7
7
  * Sends a standardized success response
8
8
  */
9
9
  export declare const sendSuccess: (res: express.Response, data: any, status?: number) => void;
10
- //# sourceMappingURL=response-utils.d.ts.map
@@ -1,2 +1 @@
1
1
  export { agentAudioUpload, agentMediaUpload, channelUpload, validateAudioFile, validateMediaFile, processUploadedFile, generateSecureFilename, ensureUploadDir, } from '../../../upload';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1,8 +1,8 @@
1
- import type { IAgentRuntime, UUID } from '@elizaos/core';
1
+ import type { ElizaOS, UUID } from '@elizaos/core';
2
2
  /**
3
3
  * Validates and retrieves an agent runtime from the agents map
4
4
  */
5
- export declare const getRuntime: (agents: Map<UUID, IAgentRuntime>, agentId: UUID) => IAgentRuntime;
5
+ export declare const getRuntime: (elizaOS: ElizaOS, agentId: UUID) => import("@elizaos/core").IAgentRuntime;
6
6
  /**
7
7
  * Validates a UUID parameter and returns it as UUID type or null if invalid
8
8
  */
@@ -24,4 +24,3 @@ export declare const validateMemoryId: (memoryId: string) => UUID | null;
24
24
  * Validates a world ID parameter
25
25
  */
26
26
  export declare const validateWorldId: (worldId: string) => UUID | null;
27
- //# sourceMappingURL=validation.d.ts.map
@@ -21,4 +21,3 @@ export declare function resolveEnvFile(startDir?: string): string;
21
21
  * Environment configuration management
22
22
  */
23
23
  export declare function createEnvironmentRouter(): express.Router;
24
- //# sourceMappingURL=environment.d.ts.map
@@ -3,4 +3,3 @@ import express from 'express';
3
3
  * Creates the system router for configuration and environment management
4
4
  */
5
5
  export declare function systemRouter(): express.Router;
6
- //# sourceMappingURL=index.d.ts.map
@@ -3,4 +3,3 @@ import express from 'express';
3
3
  * Creates the version router for system version information
4
4
  */
5
5
  export declare function createVersionRouter(): express.Router;
6
- //# sourceMappingURL=version.d.ts.map
@@ -3,4 +3,3 @@ import express from 'express';
3
3
  * Creates the security router for TEE and security operations
4
4
  */
5
5
  export declare function teeRouter(): express.Router;
6
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- //# sourceMappingURL=tee.d.ts.map
@@ -13,4 +13,3 @@ import { type Request, type Response, type NextFunction } from 'express';
13
13
  * @param next - Express next function.
14
14
  */
15
15
  export declare function apiKeyAuthMiddleware(req: Request, res: Response, next: NextFunction): void | Response<any, Record<string, any>>;
16
- //# sourceMappingURL=authMiddleware.d.ts.map
package/dist/bus.d.ts CHANGED
@@ -28,4 +28,3 @@ declare class InternalMessageBus extends EventTarget {
28
28
  }
29
29
  declare const internalMessageBus: InternalMessageBus;
30
30
  export default internalMessageBus;
31
- //# sourceMappingURL=bus.d.ts.map
@@ -0,0 +1,14 @@
1
+ import type { Character } from '@elizaos/core';
2
+ /**
3
+ * Returns the default Eliza character with plugins ordered by priority based on environment variables.
4
+ * This should be called after environment variables are loaded.
5
+ *
6
+ * @returns {Character} The Eliza character with appropriate plugins for the current environment
7
+ */
8
+ export declare function getDefaultCharacter(): Character;
9
+ /**
10
+ * Legacy export for backward compatibility.
11
+ * Note: This will include all plugins regardless of environment variables.
12
+ * Use getDefaultCharacter() for environment-aware plugin loading.
13
+ */
14
+ export declare const character: Character;
@@ -0,0 +1,8 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/main-DeWqErjb.js","assets/react-vendor-D5Td5IIA.js","assets/ui-vendor-B7JxFfFk.js","assets/main-CkbfKgca.css"])))=>i.map(i=>d[i]);
2
+ var Sr=Object.defineProperty;var c=(x,l)=>Sr(x,"name",{value:l,configurable:!0});c(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const p of document.querySelectorAll('link[rel="modulepreload"]'))S(p);new MutationObserver(p=>{for(const w of p)if(w.type==="childList")for(const s of w.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&S(s)}).observe(document,{childList:!0,subtree:!0});function U(p){const w={};return p.integrity&&(w.integrity=p.integrity),p.referrerPolicy&&(w.referrerPolicy=p.referrerPolicy),p.crossOrigin==="use-credentials"?w.credentials="include":p.crossOrigin==="anonymous"?w.credentials="omit":w.credentials="same-origin",w}c(U,"getFetchOpts");function S(p){if(p.ep)return;p.ep=!0;const w=U(p);fetch(p.href,w)}c(S,"processPreload")},"polyfill")();var X={},W={},cr;function _r(){if(cr)return W;cr=1,W.byteLength=o,W.toByteArray=I,W.fromByteArray=R;for(var x=[],l=[],U=typeof Uint8Array<"u"?Uint8Array:Array,S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,w=S.length;p<w;++p)x[p]=S[p],l[S.charCodeAt(p)]=p;l[45]=62,l[95]=63;function s(h){var y=h.length;if(y%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var d=h.indexOf("=");d===-1&&(d=y);var L=d===y?0:4-d%4;return[d,L]}c(s,"getLens");function o(h){var y=s(h),d=y[0],L=y[1];return(d+L)*3/4-L}c(o,"byteLength");function b(h,y,d){return(y+d)*3/4-d}c(b,"_byteLength");function I(h){var y,d=s(h),L=d[0],N=d[1],C=new U(b(h,L,N)),P=0,$=N>0?L-4:L,T;for(T=0;T<$;T+=4)y=l[h.charCodeAt(T)]<<18|l[h.charCodeAt(T+1)]<<12|l[h.charCodeAt(T+2)]<<6|l[h.charCodeAt(T+3)],C[P++]=y>>16&255,C[P++]=y>>8&255,C[P++]=y&255;return N===2&&(y=l[h.charCodeAt(T)]<<2|l[h.charCodeAt(T+1)]>>4,C[P++]=y&255),N===1&&(y=l[h.charCodeAt(T)]<<10|l[h.charCodeAt(T+1)]<<4|l[h.charCodeAt(T+2)]>>2,C[P++]=y>>8&255,C[P++]=y&255),C}c(I,"toByteArray");function E(h){return x[h>>18&63]+x[h>>12&63]+x[h>>6&63]+x[h&63]}c(E,"tripletToBase64");function m(h,y,d){for(var L,N=[],C=y;C<d;C+=3)L=(h[C]<<16&16711680)+(h[C+1]<<8&65280)+(h[C+2]&255),N.push(E(L));return N.join("")}c(m,"encodeChunk");function R(h){for(var y,d=h.length,L=d%3,N=[],C=16383,P=0,$=d-L;P<$;P+=C)N.push(m(h,P,P+C>$?$:P+C));return L===1?(y=h[d-1],N.push(x[y>>2]+x[y<<4&63]+"==")):L===2&&(y=(h[d-2]<<8)+h[d-1],N.push(x[y>>10]+x[y>>4&63]+x[y<<2&63]+"=")),N.join("")}return c(R,"fromByteArray"),W}c(_r,"requireBase64Js");var j={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var fr;function br(){return fr||(fr=1,j.read=function(x,l,U,S,p){var w,s,o=p*8-S-1,b=(1<<o)-1,I=b>>1,E=-7,m=U?p-1:0,R=U?-1:1,h=x[l+m];for(m+=R,w=h&(1<<-E)-1,h>>=-E,E+=o;E>0;w=w*256+x[l+m],m+=R,E-=8);for(s=w&(1<<-E)-1,w>>=-E,E+=S;E>0;s=s*256+x[l+m],m+=R,E-=8);if(w===0)w=1-I;else{if(w===b)return s?NaN:(h?-1:1)*(1/0);s=s+Math.pow(2,S),w=w-I}return(h?-1:1)*s*Math.pow(2,w-S)},j.write=function(x,l,U,S,p,w){var s,o,b,I=w*8-p-1,E=(1<<I)-1,m=E>>1,R=p===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=S?0:w-1,y=S?1:-1,d=l<0||l===0&&1/l<0?1:0;for(l=Math.abs(l),isNaN(l)||l===1/0?(o=isNaN(l)?1:0,s=E):(s=Math.floor(Math.log(l)/Math.LN2),l*(b=Math.pow(2,-s))<1&&(s--,b*=2),s+m>=1?l+=R/b:l+=R*Math.pow(2,1-m),l*b>=2&&(s++,b/=2),s+m>=E?(o=0,s=E):s+m>=1?(o=(l*b-1)*Math.pow(2,p),s=s+m):(o=l*Math.pow(2,m-1)*Math.pow(2,p),s=0));p>=8;x[U+h]=o&255,h+=y,o/=256,p-=8);for(s=s<<p|o,I+=p;I>0;x[U+h]=s&255,h+=y,s/=256,I-=8);x[U+h-y]|=d*128}),j}c(br,"requireIeee754");/*!
3
+ * The buffer module from node.js, for the browser.
4
+ *
5
+ * @author Feross Aboukhadijeh <https://feross.org>
6
+ * @license MIT
7
+ */var hr;function Lr(){return hr||(hr=1,(function(x){const l=_r(),U=br(),S=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;x.Buffer=o,x.SlowBuffer=C,x.INSPECT_MAX_BYTES=50;const p=2147483647;x.kMaxLength=p,o.TYPED_ARRAY_SUPPORT=w(),!o.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function w(){try{const e=new Uint8Array(1),r={foo:c(function(){return 42},"foo")};return Object.setPrototypeOf(r,Uint8Array.prototype),Object.setPrototypeOf(e,r),e.foo()===42}catch{return!1}}c(w,"typedArraySupport"),Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:c(function(){if(o.isBuffer(this))return this.buffer},"get")}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:c(function(){if(o.isBuffer(this))return this.byteOffset},"get")});function s(e){if(e>p)throw new RangeError('The value "'+e+'" is invalid for option "size"');const r=new Uint8Array(e);return Object.setPrototypeOf(r,o.prototype),r}c(s,"createBuffer");function o(e,r,t){if(typeof e=="number"){if(typeof r=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return m(e)}return b(e,r,t)}c(o,"Buffer"),o.poolSize=8192;function b(e,r,t){if(typeof e=="string")return R(e,r);if(ArrayBuffer.isView(e))return y(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(D(e,ArrayBuffer)||e&&D(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(D(e,SharedArrayBuffer)||e&&D(e.buffer,SharedArrayBuffer)))return d(e,r,t);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const i=e.valueOf&&e.valueOf();if(i!=null&&i!==e)return o.from(i,r,t);const n=L(e);if(n)return n;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return o.from(e[Symbol.toPrimitive]("string"),r,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}c(b,"from"),o.from=function(e,r,t){return b(e,r,t)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function I(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}c(I,"assertSize");function E(e,r,t){return I(e),e<=0?s(e):r!==void 0?typeof t=="string"?s(e).fill(r,t):s(e).fill(r):s(e)}c(E,"alloc"),o.alloc=function(e,r,t){return E(e,r,t)};function m(e){return I(e),s(e<0?0:N(e)|0)}c(m,"allocUnsafe"),o.allocUnsafe=function(e){return m(e)},o.allocUnsafeSlow=function(e){return m(e)};function R(e,r){if((typeof r!="string"||r==="")&&(r="utf8"),!o.isEncoding(r))throw new TypeError("Unknown encoding: "+r);const t=P(e,r)|0;let i=s(t);const n=i.write(e,r);return n!==t&&(i=i.slice(0,n)),i}c(R,"fromString");function h(e){const r=e.length<0?0:N(e.length)|0,t=s(r);for(let i=0;i<r;i+=1)t[i]=e[i]&255;return t}c(h,"fromArrayLike");function y(e){if(D(e,Uint8Array)){const r=new Uint8Array(e);return d(r.buffer,r.byteOffset,r.byteLength)}return h(e)}c(y,"fromArrayView");function d(e,r,t){if(r<0||e.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<r+(t||0))throw new RangeError('"length" is outside of buffer bounds');let i;return r===void 0&&t===void 0?i=new Uint8Array(e):t===void 0?i=new Uint8Array(e,r):i=new Uint8Array(e,r,t),Object.setPrototypeOf(i,o.prototype),i}c(d,"fromArrayBuffer");function L(e){if(o.isBuffer(e)){const r=N(e.length)|0,t=s(r);return t.length===0||e.copy(t,0,0,r),t}if(e.length!==void 0)return typeof e.length!="number"||H(e.length)?s(0):h(e);if(e.type==="Buffer"&&Array.isArray(e.data))return h(e.data)}c(L,"fromObject");function N(e){if(e>=p)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+p.toString(16)+" bytes");return e|0}c(N,"checked");function C(e){return+e!=e&&(e=0),o.alloc(+e)}c(C,"SlowBuffer"),o.isBuffer=c(function(r){return r!=null&&r._isBuffer===!0&&r!==o.prototype},"isBuffer"),o.compare=c(function(r,t){if(D(r,Uint8Array)&&(r=o.from(r,r.offset,r.byteLength)),D(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),!o.isBuffer(r)||!o.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===t)return 0;let i=r.length,n=t.length;for(let u=0,f=Math.min(i,n);u<f;++u)if(r[u]!==t[u]){i=r[u],n=t[u];break}return i<n?-1:n<i?1:0},"compare"),o.isEncoding=c(function(r){switch(String(r).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},"isEncoding"),o.concat=c(function(r,t){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return o.alloc(0);let i;if(t===void 0)for(t=0,i=0;i<r.length;++i)t+=r[i].length;const n=o.allocUnsafe(t);let u=0;for(i=0;i<r.length;++i){let f=r[i];if(D(f,Uint8Array))u+f.length>n.length?(o.isBuffer(f)||(f=o.from(f)),f.copy(n,u)):Uint8Array.prototype.set.call(n,f,u);else if(o.isBuffer(f))f.copy(n,u);else throw new TypeError('"list" argument must be an Array of Buffers');u+=f.length}return n},"concat");function P(e,r){if(o.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||D(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const t=e.length,i=arguments.length>2&&arguments[2]===!0;if(!i&&t===0)return 0;let n=!1;for(;;)switch(r){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return ur(e).length;default:if(n)return i?-1:V(e).length;r=(""+r).toLowerCase(),n=!0}}c(P,"byteLength"),o.byteLength=P;function $(e,r,t){let i=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,r>>>=0,t<=r))return"";for(e||(e="utf8");;)switch(e){case"hex":return mr(this,r,t);case"utf8":case"utf-8":return Z(this,r,t);case"ascii":return Br(this,r,t);case"latin1":case"binary":return Er(this,r,t);case"base64":return xr(this,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return gr(this,r,t);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}c($,"slowToString"),o.prototype._isBuffer=!0;function T(e,r,t){const i=e[r];e[r]=e[t],e[t]=i}c(T,"swap"),o.prototype.swap16=c(function(){const r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<r;t+=2)T(this,t,t+1);return this},"swap16"),o.prototype.swap32=c(function(){const r=this.length;if(r%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<r;t+=4)T(this,t,t+3),T(this,t+1,t+2);return this},"swap32"),o.prototype.swap64=c(function(){const r=this.length;if(r%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<r;t+=8)T(this,t,t+7),T(this,t+1,t+6),T(this,t+2,t+5),T(this,t+3,t+4);return this},"swap64"),o.prototype.toString=c(function(){const r=this.length;return r===0?"":arguments.length===0?Z(this,0,r):$.apply(this,arguments)},"toString"),o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=c(function(r){if(!o.isBuffer(r))throw new TypeError("Argument must be a Buffer");return this===r?!0:o.compare(this,r)===0},"equals"),o.prototype.inspect=c(function(){let r="";const t=x.INSPECT_MAX_BYTES;return r=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(r+=" ... "),"<Buffer "+r+">"},"inspect"),S&&(o.prototype[S]=o.prototype.inspect),o.prototype.compare=c(function(r,t,i,n,u){if(D(r,Uint8Array)&&(r=o.from(r,r.offset,r.byteLength)),!o.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(t===void 0&&(t=0),i===void 0&&(i=r?r.length:0),n===void 0&&(n=0),u===void 0&&(u=this.length),t<0||i>r.length||n<0||u>this.length)throw new RangeError("out of range index");if(n>=u&&t>=i)return 0;if(n>=u)return-1;if(t>=i)return 1;if(t>>>=0,i>>>=0,n>>>=0,u>>>=0,this===r)return 0;let f=u-n,a=i-t;const F=Math.min(f,a),g=this.slice(n,u),A=r.slice(t,i);for(let B=0;B<F;++B)if(g[B]!==A[B]){f=g[B],a=A[B];break}return f<a?-1:a<f?1:0},"compare");function z(e,r,t,i,n){if(e.length===0)return-1;if(typeof t=="string"?(i=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,H(t)&&(t=n?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(n)return-1;t=e.length-1}else if(t<0)if(n)t=0;else return-1;if(typeof r=="string"&&(r=o.from(r,i)),o.isBuffer(r))return r.length===0?-1:K(e,r,t,i,n);if(typeof r=="number")return r=r&255,typeof Uint8Array.prototype.indexOf=="function"?n?Uint8Array.prototype.indexOf.call(e,r,t):Uint8Array.prototype.lastIndexOf.call(e,r,t):K(e,[r],t,i,n);throw new TypeError("val must be string, number or Buffer")}c(z,"bidirectionalIndexOf");function K(e,r,t,i,n){let u=1,f=e.length,a=r.length;if(i!==void 0&&(i=String(i).toLowerCase(),i==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le")){if(e.length<2||r.length<2)return-1;u=2,f/=2,a/=2,t/=2}function F(A,B){return u===1?A[B]:A.readUInt16BE(B*u)}c(F,"read");let g;if(n){let A=-1;for(g=t;g<f;g++)if(F(e,g)===F(r,A===-1?0:g-A)){if(A===-1&&(A=g),g-A+1===a)return A*u}else A!==-1&&(g-=g-A),A=-1}else for(t+a>f&&(t=f-a),g=t;g>=0;g--){let A=!0;for(let B=0;B<a;B++)if(F(e,g+B)!==F(r,B)){A=!1;break}if(A)return g}return-1}c(K,"arrayIndexOf"),o.prototype.includes=c(function(r,t,i){return this.indexOf(r,t,i)!==-1},"includes"),o.prototype.indexOf=c(function(r,t,i){return z(this,r,t,i,!0)},"indexOf"),o.prototype.lastIndexOf=c(function(r,t,i){return z(this,r,t,i,!1)},"lastIndexOf");function lr(e,r,t,i){t=Number(t)||0;const n=e.length-t;i?(i=Number(i),i>n&&(i=n)):i=n;const u=r.length;i>u/2&&(i=u/2);let f;for(f=0;f<i;++f){const a=parseInt(r.substr(f*2,2),16);if(H(a))return f;e[t+f]=a}return f}c(lr,"hexWrite");function pr(e,r,t,i){return Y(V(r,e.length-t),e,t,i)}c(pr,"utf8Write");function ar(e,r,t,i){return Y(Ur(r),e,t,i)}c(ar,"asciiWrite");function yr(e,r,t,i){return Y(ur(r),e,t,i)}c(yr,"base64Write");function wr(e,r,t,i){return Y(Tr(r,e.length-t),e,t,i)}c(wr,"ucs2Write"),o.prototype.write=c(function(r,t,i,n){if(t===void 0)n="utf8",i=this.length,t=0;else if(i===void 0&&typeof t=="string")n=t,i=this.length,t=0;else if(isFinite(t))t=t>>>0,isFinite(i)?(i=i>>>0,n===void 0&&(n="utf8")):(n=i,i=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const u=this.length-t;if((i===void 0||i>u)&&(i=u),r.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let f=!1;for(;;)switch(n){case"hex":return lr(this,r,t,i);case"utf8":case"utf-8":return pr(this,r,t,i);case"ascii":case"latin1":case"binary":return ar(this,r,t,i);case"base64":return yr(this,r,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return wr(this,r,t,i);default:if(f)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),f=!0}},"write"),o.prototype.toJSON=c(function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},"toJSON");function xr(e,r,t){return r===0&&t===e.length?l.fromByteArray(e):l.fromByteArray(e.slice(r,t))}c(xr,"base64Slice");function Z(e,r,t){t=Math.min(e.length,t);const i=[];let n=r;for(;n<t;){const u=e[n];let f=null,a=u>239?4:u>223?3:u>191?2:1;if(n+a<=t){let F,g,A,B;switch(a){case 1:u<128&&(f=u);break;case 2:F=e[n+1],(F&192)===128&&(B=(u&31)<<6|F&63,B>127&&(f=B));break;case 3:F=e[n+1],g=e[n+2],(F&192)===128&&(g&192)===128&&(B=(u&15)<<12|(F&63)<<6|g&63,B>2047&&(B<55296||B>57343)&&(f=B));break;case 4:F=e[n+1],g=e[n+2],A=e[n+3],(F&192)===128&&(g&192)===128&&(A&192)===128&&(B=(u&15)<<18|(F&63)<<12|(g&63)<<6|A&63,B>65535&&B<1114112&&(f=B))}}f===null?(f=65533,a=1):f>65535&&(f-=65536,i.push(f>>>10&1023|55296),f=56320|f&1023),i.push(f),n+=a}return dr(i)}c(Z,"utf8Slice");const Q=4096;function dr(e){const r=e.length;if(r<=Q)return String.fromCharCode.apply(String,e);let t="",i=0;for(;i<r;)t+=String.fromCharCode.apply(String,e.slice(i,i+=Q));return t}c(dr,"decodeCodePointsArray");function Br(e,r,t){let i="";t=Math.min(e.length,t);for(let n=r;n<t;++n)i+=String.fromCharCode(e[n]&127);return i}c(Br,"asciiSlice");function Er(e,r,t){let i="";t=Math.min(e.length,t);for(let n=r;n<t;++n)i+=String.fromCharCode(e[n]);return i}c(Er,"latin1Slice");function mr(e,r,t){const i=e.length;(!r||r<0)&&(r=0),(!t||t<0||t>i)&&(t=i);let n="";for(let u=r;u<t;++u)n+=Rr[e[u]];return n}c(mr,"hexSlice");function gr(e,r,t){const i=e.slice(r,t);let n="";for(let u=0;u<i.length-1;u+=2)n+=String.fromCharCode(i[u]+i[u+1]*256);return n}c(gr,"utf16leSlice"),o.prototype.slice=c(function(r,t){const i=this.length;r=~~r,t=t===void 0?i:~~t,r<0?(r+=i,r<0&&(r=0)):r>i&&(r=i),t<0?(t+=i,t<0&&(t=0)):t>i&&(t=i),t<r&&(t=r);const n=this.subarray(r,t);return Object.setPrototypeOf(n,o.prototype),n},"slice");function _(e,r,t){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+r>t)throw new RangeError("Trying to access beyond buffer length")}c(_,"checkOffset"),o.prototype.readUintLE=o.prototype.readUIntLE=c(function(r,t,i){r=r>>>0,t=t>>>0,i||_(r,t,this.length);let n=this[r],u=1,f=0;for(;++f<t&&(u*=256);)n+=this[r+f]*u;return n},"readUIntLE"),o.prototype.readUintBE=o.prototype.readUIntBE=c(function(r,t,i){r=r>>>0,t=t>>>0,i||_(r,t,this.length);let n=this[r+--t],u=1;for(;t>0&&(u*=256);)n+=this[r+--t]*u;return n},"readUIntBE"),o.prototype.readUint8=o.prototype.readUInt8=c(function(r,t){return r=r>>>0,t||_(r,1,this.length),this[r]},"readUInt8"),o.prototype.readUint16LE=o.prototype.readUInt16LE=c(function(r,t){return r=r>>>0,t||_(r,2,this.length),this[r]|this[r+1]<<8},"readUInt16LE"),o.prototype.readUint16BE=o.prototype.readUInt16BE=c(function(r,t){return r=r>>>0,t||_(r,2,this.length),this[r]<<8|this[r+1]},"readUInt16BE"),o.prototype.readUint32LE=o.prototype.readUInt32LE=c(function(r,t){return r=r>>>0,t||_(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216},"readUInt32LE"),o.prototype.readUint32BE=o.prototype.readUInt32BE=c(function(r,t){return r=r>>>0,t||_(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])},"readUInt32BE"),o.prototype.readBigUInt64LE=k(c(function(r){r=r>>>0,q(r,"offset");const t=this[r],i=this[r+7];(t===void 0||i===void 0)&&G(r,this.length-8);const n=t+this[++r]*2**8+this[++r]*2**16+this[++r]*2**24,u=this[++r]+this[++r]*2**8+this[++r]*2**16+i*2**24;return BigInt(n)+(BigInt(u)<<BigInt(32))},"readBigUInt64LE")),o.prototype.readBigUInt64BE=k(c(function(r){r=r>>>0,q(r,"offset");const t=this[r],i=this[r+7];(t===void 0||i===void 0)&&G(r,this.length-8);const n=t*2**24+this[++r]*2**16+this[++r]*2**8+this[++r],u=this[++r]*2**24+this[++r]*2**16+this[++r]*2**8+i;return(BigInt(n)<<BigInt(32))+BigInt(u)},"readBigUInt64BE")),o.prototype.readIntLE=c(function(r,t,i){r=r>>>0,t=t>>>0,i||_(r,t,this.length);let n=this[r],u=1,f=0;for(;++f<t&&(u*=256);)n+=this[r+f]*u;return u*=128,n>=u&&(n-=Math.pow(2,8*t)),n},"readIntLE"),o.prototype.readIntBE=c(function(r,t,i){r=r>>>0,t=t>>>0,i||_(r,t,this.length);let n=t,u=1,f=this[r+--n];for(;n>0&&(u*=256);)f+=this[r+--n]*u;return u*=128,f>=u&&(f-=Math.pow(2,8*t)),f},"readIntBE"),o.prototype.readInt8=c(function(r,t){return r=r>>>0,t||_(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]},"readInt8"),o.prototype.readInt16LE=c(function(r,t){r=r>>>0,t||_(r,2,this.length);const i=this[r]|this[r+1]<<8;return i&32768?i|4294901760:i},"readInt16LE"),o.prototype.readInt16BE=c(function(r,t){r=r>>>0,t||_(r,2,this.length);const i=this[r+1]|this[r]<<8;return i&32768?i|4294901760:i},"readInt16BE"),o.prototype.readInt32LE=c(function(r,t){return r=r>>>0,t||_(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24},"readInt32LE"),o.prototype.readInt32BE=c(function(r,t){return r=r>>>0,t||_(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]},"readInt32BE"),o.prototype.readBigInt64LE=k(c(function(r){r=r>>>0,q(r,"offset");const t=this[r],i=this[r+7];(t===void 0||i===void 0)&&G(r,this.length-8);const n=this[r+4]+this[r+5]*2**8+this[r+6]*2**16+(i<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+this[++r]*2**8+this[++r]*2**16+this[++r]*2**24)},"readBigInt64LE")),o.prototype.readBigInt64BE=k(c(function(r){r=r>>>0,q(r,"offset");const t=this[r],i=this[r+7];(t===void 0||i===void 0)&&G(r,this.length-8);const n=(t<<24)+this[++r]*2**16+this[++r]*2**8+this[++r];return(BigInt(n)<<BigInt(32))+BigInt(this[++r]*2**24+this[++r]*2**16+this[++r]*2**8+i)},"readBigInt64BE")),o.prototype.readFloatLE=c(function(r,t){return r=r>>>0,t||_(r,4,this.length),U.read(this,r,!0,23,4)},"readFloatLE"),o.prototype.readFloatBE=c(function(r,t){return r=r>>>0,t||_(r,4,this.length),U.read(this,r,!1,23,4)},"readFloatBE"),o.prototype.readDoubleLE=c(function(r,t){return r=r>>>0,t||_(r,8,this.length),U.read(this,r,!0,52,8)},"readDoubleLE"),o.prototype.readDoubleBE=c(function(r,t){return r=r>>>0,t||_(r,8,this.length),U.read(this,r,!1,52,8)},"readDoubleBE");function M(e,r,t,i,n,u){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>n||r<u)throw new RangeError('"value" argument is out of bounds');if(t+i>e.length)throw new RangeError("Index out of range")}c(M,"checkInt"),o.prototype.writeUintLE=o.prototype.writeUIntLE=c(function(r,t,i,n){if(r=+r,t=t>>>0,i=i>>>0,!n){const a=Math.pow(2,8*i)-1;M(this,r,t,i,a,0)}let u=1,f=0;for(this[t]=r&255;++f<i&&(u*=256);)this[t+f]=r/u&255;return t+i},"writeUIntLE"),o.prototype.writeUintBE=o.prototype.writeUIntBE=c(function(r,t,i,n){if(r=+r,t=t>>>0,i=i>>>0,!n){const a=Math.pow(2,8*i)-1;M(this,r,t,i,a,0)}let u=i-1,f=1;for(this[t+u]=r&255;--u>=0&&(f*=256);)this[t+u]=r/f&255;return t+i},"writeUIntBE"),o.prototype.writeUint8=o.prototype.writeUInt8=c(function(r,t,i){return r=+r,t=t>>>0,i||M(this,r,t,1,255,0),this[t]=r&255,t+1},"writeUInt8"),o.prototype.writeUint16LE=o.prototype.writeUInt16LE=c(function(r,t,i){return r=+r,t=t>>>0,i||M(this,r,t,2,65535,0),this[t]=r&255,this[t+1]=r>>>8,t+2},"writeUInt16LE"),o.prototype.writeUint16BE=o.prototype.writeUInt16BE=c(function(r,t,i){return r=+r,t=t>>>0,i||M(this,r,t,2,65535,0),this[t]=r>>>8,this[t+1]=r&255,t+2},"writeUInt16BE"),o.prototype.writeUint32LE=o.prototype.writeUInt32LE=c(function(r,t,i){return r=+r,t=t>>>0,i||M(this,r,t,4,4294967295,0),this[t+3]=r>>>24,this[t+2]=r>>>16,this[t+1]=r>>>8,this[t]=r&255,t+4},"writeUInt32LE"),o.prototype.writeUint32BE=o.prototype.writeUInt32BE=c(function(r,t,i){return r=+r,t=t>>>0,i||M(this,r,t,4,4294967295,0),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4},"writeUInt32BE");function v(e,r,t,i,n){or(r,i,n,e,t,7);let u=Number(r&BigInt(4294967295));e[t++]=u,u=u>>8,e[t++]=u,u=u>>8,e[t++]=u,u=u>>8,e[t++]=u;let f=Number(r>>BigInt(32)&BigInt(4294967295));return e[t++]=f,f=f>>8,e[t++]=f,f=f>>8,e[t++]=f,f=f>>8,e[t++]=f,t}c(v,"wrtBigUInt64LE");function rr(e,r,t,i,n){or(r,i,n,e,t,7);let u=Number(r&BigInt(4294967295));e[t+7]=u,u=u>>8,e[t+6]=u,u=u>>8,e[t+5]=u,u=u>>8,e[t+4]=u;let f=Number(r>>BigInt(32)&BigInt(4294967295));return e[t+3]=f,f=f>>8,e[t+2]=f,f=f>>8,e[t+1]=f,f=f>>8,e[t]=f,t+8}c(rr,"wrtBigUInt64BE"),o.prototype.writeBigUInt64LE=k(c(function(r,t=0){return v(this,r,t,BigInt(0),BigInt("0xffffffffffffffff"))},"writeBigUInt64LE")),o.prototype.writeBigUInt64BE=k(c(function(r,t=0){return rr(this,r,t,BigInt(0),BigInt("0xffffffffffffffff"))},"writeBigUInt64BE")),o.prototype.writeIntLE=c(function(r,t,i,n){if(r=+r,t=t>>>0,!n){const F=Math.pow(2,8*i-1);M(this,r,t,i,F-1,-F)}let u=0,f=1,a=0;for(this[t]=r&255;++u<i&&(f*=256);)r<0&&a===0&&this[t+u-1]!==0&&(a=1),this[t+u]=(r/f>>0)-a&255;return t+i},"writeIntLE"),o.prototype.writeIntBE=c(function(r,t,i,n){if(r=+r,t=t>>>0,!n){const F=Math.pow(2,8*i-1);M(this,r,t,i,F-1,-F)}let u=i-1,f=1,a=0;for(this[t+u]=r&255;--u>=0&&(f*=256);)r<0&&a===0&&this[t+u+1]!==0&&(a=1),this[t+u]=(r/f>>0)-a&255;return t+i},"writeIntBE"),o.prototype.writeInt8=c(function(r,t,i){return r=+r,t=t>>>0,i||M(this,r,t,1,127,-128),r<0&&(r=255+r+1),this[t]=r&255,t+1},"writeInt8"),o.prototype.writeInt16LE=c(function(r,t,i){return r=+r,t=t>>>0,i||M(this,r,t,2,32767,-32768),this[t]=r&255,this[t+1]=r>>>8,t+2},"writeInt16LE"),o.prototype.writeInt16BE=c(function(r,t,i){return r=+r,t=t>>>0,i||M(this,r,t,2,32767,-32768),this[t]=r>>>8,this[t+1]=r&255,t+2},"writeInt16BE"),o.prototype.writeInt32LE=c(function(r,t,i){return r=+r,t=t>>>0,i||M(this,r,t,4,2147483647,-2147483648),this[t]=r&255,this[t+1]=r>>>8,this[t+2]=r>>>16,this[t+3]=r>>>24,t+4},"writeInt32LE"),o.prototype.writeInt32BE=c(function(r,t,i){return r=+r,t=t>>>0,i||M(this,r,t,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4},"writeInt32BE"),o.prototype.writeBigInt64LE=k(c(function(r,t=0){return v(this,r,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))},"writeBigInt64LE")),o.prototype.writeBigInt64BE=k(c(function(r,t=0){return rr(this,r,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))},"writeBigInt64BE"));function tr(e,r,t,i,n,u){if(t+i>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}c(tr,"checkIEEE754");function er(e,r,t,i,n){return r=+r,t=t>>>0,n||tr(e,r,t,4),U.write(e,r,t,i,23,4),t+4}c(er,"writeFloat"),o.prototype.writeFloatLE=c(function(r,t,i){return er(this,r,t,!0,i)},"writeFloatLE"),o.prototype.writeFloatBE=c(function(r,t,i){return er(this,r,t,!1,i)},"writeFloatBE");function ir(e,r,t,i,n){return r=+r,t=t>>>0,n||tr(e,r,t,8),U.write(e,r,t,i,52,8),t+8}c(ir,"writeDouble"),o.prototype.writeDoubleLE=c(function(r,t,i){return ir(this,r,t,!0,i)},"writeDoubleLE"),o.prototype.writeDoubleBE=c(function(r,t,i){return ir(this,r,t,!1,i)},"writeDoubleBE"),o.prototype.copy=c(function(r,t,i,n){if(!o.isBuffer(r))throw new TypeError("argument should be a Buffer");if(i||(i=0),!n&&n!==0&&(n=this.length),t>=r.length&&(t=r.length),t||(t=0),n>0&&n<i&&(n=i),n===i||r.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),r.length-t<n-i&&(n=r.length-t+i);const u=n-i;return this===r&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(t,i,n):Uint8Array.prototype.set.call(r,this.subarray(i,n),t),u},"copy"),o.prototype.fill=c(function(r,t,i,n){if(typeof r=="string"){if(typeof t=="string"?(n=t,t=0,i=this.length):typeof i=="string"&&(n=i,i=this.length),n!==void 0&&typeof n!="string")throw new TypeError("encoding must be a string");if(typeof n=="string"&&!o.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(r.length===1){const f=r.charCodeAt(0);(n==="utf8"&&f<128||n==="latin1")&&(r=f)}}else typeof r=="number"?r=r&255:typeof r=="boolean"&&(r=Number(r));if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;t=t>>>0,i=i===void 0?this.length:i>>>0,r||(r=0);let u;if(typeof r=="number")for(u=t;u<i;++u)this[u]=r;else{const f=o.isBuffer(r)?r:o.from(r,n),a=f.length;if(a===0)throw new TypeError('The value "'+r+'" is invalid for argument "value"');for(u=0;u<i-t;++u)this[u+t]=f[u%a]}return this},"fill");const O={};function J(e,r,t){O[e]=class extends t{static{c(this,"NodeError")}constructor(){super(),Object.defineProperty(this,"message",{value:r.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(n){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:n,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}c(J,"E"),J("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),J("ERR_INVALID_ARG_TYPE",function(e,r){return`The "${e}" argument must be of type number. Received type ${typeof r}`},TypeError),J("ERR_OUT_OF_RANGE",function(e,r,t){let i=`The value of "${e}" is out of range.`,n=t;return Number.isInteger(t)&&Math.abs(t)>2**32?n=nr(String(t)):typeof t=="bigint"&&(n=String(t),(t>BigInt(2)**BigInt(32)||t<-(BigInt(2)**BigInt(32)))&&(n=nr(n)),n+="n"),i+=` It must be ${r}. Received ${n}`,i},RangeError);function nr(e){let r="",t=e.length;const i=e[0]==="-"?1:0;for(;t>=i+4;t-=3)r=`_${e.slice(t-3,t)}${r}`;return`${e.slice(0,t)}${r}`}c(nr,"addNumericalSeparator");function Ir(e,r,t){q(r,"offset"),(e[r]===void 0||e[r+t]===void 0)&&G(r,e.length-(t+1))}c(Ir,"checkBounds");function or(e,r,t,i,n,u){if(e>t||e<r){const f=typeof r=="bigint"?"n":"";let a;throw r===0||r===BigInt(0)?a=`>= 0${f} and < 2${f} ** ${(u+1)*8}${f}`:a=`>= -(2${f} ** ${(u+1)*8-1}${f}) and < 2 ** ${(u+1)*8-1}${f}`,new O.ERR_OUT_OF_RANGE("value",a,e)}Ir(i,n,u)}c(or,"checkIntBI");function q(e,r){if(typeof e!="number")throw new O.ERR_INVALID_ARG_TYPE(r,"number",e)}c(q,"validateNumber");function G(e,r,t){throw Math.floor(e)!==e?(q(e,t),new O.ERR_OUT_OF_RANGE("offset","an integer",e)):r<0?new O.ERR_BUFFER_OUT_OF_BOUNDS:new O.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${r}`,e)}c(G,"boundsError");const Fr=/[^+/0-9A-Za-z-_]/g;function Ar(e){if(e=e.split("=")[0],e=e.trim().replace(Fr,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}c(Ar,"base64clean");function V(e,r){r=r||1/0;let t;const i=e.length;let n=null;const u=[];for(let f=0;f<i;++f){if(t=e.charCodeAt(f),t>55295&&t<57344){if(!n){if(t>56319){(r-=3)>-1&&u.push(239,191,189);continue}else if(f+1===i){(r-=3)>-1&&u.push(239,191,189);continue}n=t;continue}if(t<56320){(r-=3)>-1&&u.push(239,191,189),n=t;continue}t=(n-55296<<10|t-56320)+65536}else n&&(r-=3)>-1&&u.push(239,191,189);if(n=null,t<128){if((r-=1)<0)break;u.push(t)}else if(t<2048){if((r-=2)<0)break;u.push(t>>6|192,t&63|128)}else if(t<65536){if((r-=3)<0)break;u.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((r-=4)<0)break;u.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return u}c(V,"utf8ToBytes");function Ur(e){const r=[];for(let t=0;t<e.length;++t)r.push(e.charCodeAt(t)&255);return r}c(Ur,"asciiToBytes");function Tr(e,r){let t,i,n;const u=[];for(let f=0;f<e.length&&!((r-=2)<0);++f)t=e.charCodeAt(f),i=t>>8,n=t%256,u.push(n),u.push(i);return u}c(Tr,"utf16leToBytes");function ur(e){return l.toByteArray(Ar(e))}c(ur,"base64ToBytes");function Y(e,r,t,i){let n;for(n=0;n<i&&!(n+t>=r.length||n>=e.length);++n)r[n+t]=e[n];return n}c(Y,"blitBuffer");function D(e,r){return e instanceof r||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===r.name}c(D,"isInstance");function H(e){return e!==e}c(H,"numberIsNaN");const Rr=(function(){const e="0123456789abcdef",r=new Array(256);for(let t=0;t<16;++t){const i=t*16;for(let n=0;n<16;++n)r[i+n]=e[t]+e[n]}return r})();function k(e){return typeof BigInt>"u"?Cr:e}c(k,"defineBigIntMethod");function Cr(){throw new Error("BigInt not supported")}c(Cr,"BufferBigIntNotDefined")})(X)),X}c(Lr,"requireBuffer");var Nr=Lr();typeof globalThis.Buffer>"u"&&(globalThis.Buffer=Nr.Buffer);typeof globalThis.global>"u"&&(globalThis.global=globalThis);typeof globalThis.process>"u"&&(globalThis.process={env:{}});const Pr="modulepreload",Mr=c(function(x){return"/"+x},"assetsURL"),sr={},Dr=c(function(l,U,S){let p=Promise.resolve();if(U&&U.length>0){let s=c(function(I){return Promise.all(I.map(E=>Promise.resolve(E).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))},"allSettled2");document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),b=o?.nonce||o?.getAttribute("nonce");p=s(U.map(I=>{if(I=Mr(I),I in sr)return;sr[I]=!0;const E=I.endsWith(".css"),m=E?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${I}"]${m}`))return;const R=document.createElement("link");if(R.rel=E?"stylesheet":Pr,E||(R.as="script"),R.crossOrigin="",R.href=I,b&&R.setAttribute("nonce",b),document.head.appendChild(R),E)return new Promise((h,y)=>{R.addEventListener("load",h),R.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${I}`)))})}))}function w(s){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s}return c(w,"handlePreloadError"),p.then(s=>{for(const o of s||[])o.status==="rejected"&&w(o.reason);return l().catch(w)})},"preload");Dr(()=>import("./main-DeWqErjb.js"),__vite__mapDeps([0,1,2,3]));export{Lr as r};
8
+ //# sourceMappingURL=main--sdaD56A.js.map