@series-inc/rundot-game-sdk 5.22.0 → 5.23.0-beta.1

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 (112) hide show
  1. package/README.md +11 -0
  2. package/dist/{AdsApi-BMDHC7On.d.ts → AdsApi-Bfb7_Weu.d.ts} +132 -9
  3. package/dist/{callRemoteFunction-D-Ah7AxA.d.ts → callRemoteFunction-NBIrdLoa.d.ts} +2 -2
  4. package/dist/{chunk-BJGV6WIK.js → chunk-57DREBKB.js} +2 -2
  5. package/dist/chunk-57DREBKB.js.map +1 -0
  6. package/dist/{chunk-TNBSGNJ2.js → chunk-LKE6IJ4M.js} +3 -3
  7. package/dist/chunk-LKE6IJ4M.js.map +1 -0
  8. package/dist/{chunk-WRZOJJLH.js → chunk-T7HMDUMX.js} +148 -11
  9. package/dist/chunk-T7HMDUMX.js.map +1 -0
  10. package/dist/{chunk-RWCJU5GG.js → chunk-ZUEAIFOZ.js} +447 -99
  11. package/dist/chunk-ZUEAIFOZ.js.map +1 -0
  12. package/dist/host-http.d.ts +4 -4
  13. package/dist/host-http.js +1 -1
  14. package/dist/index.d.ts +38 -19
  15. package/dist/index.js +2 -2
  16. package/dist/mp-server/index.d.ts +224 -1
  17. package/dist/mp-server/index.js +214 -1
  18. package/dist/mp-server/index.js.map +1 -1
  19. package/dist/{sandbox → playground}/index.js +106 -103
  20. package/dist/playground/index.js.map +1 -0
  21. package/dist/rundot-game-api/index.d.ts +2 -2
  22. package/dist/rundot-game-api/index.js +3 -3
  23. package/dist/rundot-game-api/index.js.map +1 -1
  24. package/dist/tabCoordinator-2BPJNWVV.js +3 -0
  25. package/dist/{tabCoordinator-SPKWPZDQ.js.map → tabCoordinator-2BPJNWVV.js.map} +1 -1
  26. package/dist/vite/{dev-server-GV5N4RH3.js → dev-server-4TS6JS4G.js} +27 -2
  27. package/dist/vite/dev-server-4TS6JS4G.js.map +1 -0
  28. package/dist/vite/index.css +1 -1
  29. package/dist/vite/index.css.map +1 -1
  30. package/dist/vite/index.d.ts +215 -92
  31. package/dist/vite/index.js +4318 -4154
  32. package/dist/vite/index.js.map +1 -1
  33. package/docs/README.md +97 -0
  34. package/docs/SUMMARY.md +67 -0
  35. package/docs/agents-index.txt +1 -0
  36. package/docs/rundot-developer-platform/api/ACCESS_GATE.md +218 -0
  37. package/docs/rundot-developer-platform/api/ADS.md +167 -0
  38. package/docs/rundot-developer-platform/api/ADVANCED-MULTIPLAYER.md +386 -0
  39. package/docs/rundot-developer-platform/api/AI.md +434 -0
  40. package/docs/rundot-developer-platform/api/ANALYTICS.md +98 -0
  41. package/docs/rundot-developer-platform/api/APP.md +610 -0
  42. package/docs/rundot-developer-platform/api/ASSETS.md +441 -0
  43. package/docs/rundot-developer-platform/api/ATTRIBUTION.md +93 -0
  44. package/docs/rundot-developer-platform/api/AUDIO_GEN.md +283 -0
  45. package/docs/rundot-developer-platform/api/AVATAR_3D.md +210 -0
  46. package/docs/rundot-developer-platform/api/BIGNUMBERS.md +161 -0
  47. package/docs/rundot-developer-platform/api/BUILDING_TIMERS.md +591 -0
  48. package/docs/rundot-developer-platform/api/CLIPS.md +466 -0
  49. package/docs/rundot-developer-platform/api/COLLECTIBLES.md +89 -0
  50. package/docs/rundot-developer-platform/api/CONTEXT.md +99 -0
  51. package/docs/rundot-developer-platform/api/CREDITS.md +137 -0
  52. package/docs/rundot-developer-platform/api/EMBEDDED_LIBRARIES.md +152 -0
  53. package/docs/rundot-developer-platform/api/ENERGY_SYSTEM.md +508 -0
  54. package/docs/rundot-developer-platform/api/ENTITLEMENTS.md +267 -0
  55. package/docs/rundot-developer-platform/api/ENVIRONMENT.md +369 -0
  56. package/docs/rundot-developer-platform/api/EXPERIMENTS.md +118 -0
  57. package/docs/rundot-developer-platform/api/FILES.md +677 -0
  58. package/docs/rundot-developer-platform/api/GACHA_SYSTEM.md +695 -0
  59. package/docs/rundot-developer-platform/api/GAMEPAD.md +155 -0
  60. package/docs/rundot-developer-platform/api/HAPTICS.md +65 -0
  61. package/docs/rundot-developer-platform/api/IMAGE_GEN.md +308 -0
  62. package/docs/rundot-developer-platform/api/IN_APP_MESSAGING.md +162 -0
  63. package/docs/rundot-developer-platform/api/LEADERBOARD.md +673 -0
  64. package/docs/rundot-developer-platform/api/LIFECYCLES.md +159 -0
  65. package/docs/rundot-developer-platform/api/LOGGING.md +107 -0
  66. package/docs/rundot-developer-platform/api/MULTIPLAYER.md +985 -0
  67. package/docs/rundot-developer-platform/api/NAVIGATION.md +217 -0
  68. package/docs/rundot-developer-platform/api/NOTIFICATIONS.md +310 -0
  69. package/docs/rundot-developer-platform/api/PRELOADER.md +93 -0
  70. package/docs/rundot-developer-platform/api/PROFILE.md +74 -0
  71. package/docs/rundot-developer-platform/api/PURCHASES.md +349 -0
  72. package/docs/rundot-developer-platform/api/PVP_SYSTEM.md +376 -0
  73. package/docs/rundot-developer-platform/api/RATE_LIMITS.md +65 -0
  74. package/docs/rundot-developer-platform/api/RELEASE_NOTES.md +131 -0
  75. package/docs/rundot-developer-platform/api/SAFE_AREA.md +90 -0
  76. package/docs/rundot-developer-platform/api/SERVER_AUTHORITATIVE.md +617 -0
  77. package/docs/rundot-developer-platform/api/SHARED_ASSETS.md +109 -0
  78. package/docs/rundot-developer-platform/api/SHARING.md +308 -0
  79. package/docs/rundot-developer-platform/api/SHOP.md +533 -0
  80. package/docs/rundot-developer-platform/api/SIMULATION_CONFIG.md +1147 -0
  81. package/docs/rundot-developer-platform/api/SPRITE_GEN.md +308 -0
  82. package/docs/rundot-developer-platform/api/STATS.md +162 -0
  83. package/docs/rundot-developer-platform/api/STORAGE.md +268 -0
  84. package/docs/rundot-developer-platform/api/SYSTEM.md +128 -0
  85. package/docs/rundot-developer-platform/api/THREE_D_GEN.md +507 -0
  86. package/docs/rundot-developer-platform/api/TIME.md +164 -0
  87. package/docs/rundot-developer-platform/api/UGC.md +1435 -0
  88. package/docs/rundot-developer-platform/api/VIDEO.md +155 -0
  89. package/docs/rundot-developer-platform/api/VIDEO_GEN.md +327 -0
  90. package/docs/rundot-developer-platform/cli-reference.md +525 -0
  91. package/docs/rundot-developer-platform/deploying-your-game.md +342 -0
  92. package/docs/rundot-developer-platform/error-handling.md +94 -0
  93. package/docs/rundot-developer-platform/getting-started.md +150 -0
  94. package/docs/rundot-developer-platform/initializing-your-game.md +41 -0
  95. package/docs/rundot-developer-platform/marketing-your-game.md +455 -0
  96. package/docs/rundot-developer-platform/playground.md +302 -0
  97. package/docs/rundot-developer-platform/runtime-environment.md +76 -0
  98. package/docs/rundot-developer-platform/setting-your-game-thumbnail.md +37 -0
  99. package/docs/rundot-developer-platform/troubleshooting.md +124 -0
  100. package/package.json +18 -7
  101. package/scripts/copy-docs.mjs +52 -0
  102. package/scripts/install-hint.mjs +10 -0
  103. package/scripts/setup.mjs +378 -0
  104. package/dist/chunk-BJGV6WIK.js.map +0 -1
  105. package/dist/chunk-RWCJU5GG.js.map +0 -1
  106. package/dist/chunk-TNBSGNJ2.js.map +0 -1
  107. package/dist/chunk-WRZOJJLH.js.map +0 -1
  108. package/dist/sandbox/index.js.map +0 -1
  109. package/dist/tabCoordinator-SPKWPZDQ.js +0 -3
  110. package/dist/vite/dev-server-GV5N4RH3.js.map +0 -1
  111. package/scripts/postinstall.mjs +0 -463
  112. /package/dist/{sandbox → playground}/index.d.ts +0 -0
package/README.md CHANGED
@@ -15,6 +15,17 @@ Build connected HTML5 games that integrate deeply with the RUN.game platform. Th
15
15
  npm install @series-inc/rundot-game-sdk@latest
16
16
  ```
17
17
 
18
+ Installing the package only prints a hint — it makes no changes to your project.
19
+ To copy the SDK docs into your project and configure your AI agent files
20
+ (`AGENTS.md`/`CLAUDE.md`/`GEMINI.md`, `.gitignore`, and CLI hooks), run the
21
+ explicit, consent-gated setup command:
22
+
23
+ ```bash
24
+ npx rundot-sdk-setup
25
+ ```
26
+
27
+ It prompts before each change (pass `-y` to accept all, `--no` to skip all).
28
+
18
29
  ### Initialize
19
30
 
20
31
  ```typescript
@@ -404,6 +404,12 @@ interface DeviceApi {
404
404
  getDevice(): DeviceInfo;
405
405
  }
406
406
 
407
+ interface PlatformCapabilities {
408
+ /** Rewarded/interstitial ads can be shown on this platform. */
409
+ readonly ads: boolean;
410
+ /** In-app purchases can be initiated on this platform. */
411
+ readonly purchases: boolean;
412
+ }
407
413
  interface EnvironmentInfo {
408
414
  readonly isDevelopment: boolean;
409
415
  readonly platform: string;
@@ -415,6 +421,46 @@ interface EnvironmentInfo {
415
421
  readonly isTablet: boolean;
416
422
  readonly language: string;
417
423
  };
424
+ /**
425
+ * Channel-static, host-gated feature availability. Synchronous and fixed
426
+ * for the session. A host that predates this field omits it on the wire;
427
+ * `HostEnvironmentApi` then defaults each capability to `true`.
428
+ */
429
+ readonly capabilities: PlatformCapabilities;
430
+ /**
431
+ * Whether the game is running on the Steam channel on a desktop/laptop PC
432
+ * (the Steam client, NOT Steam Deck hardware). Channel-static for the
433
+ * session — branch UX on it (Steam-specific copy, hiding app-store prompts,
434
+ * etc.). Mutually exclusive with `isSteamDeck`: both are `false` off Steam,
435
+ * and exactly one is `true` on Steam. To ask "am I on Steam at all?", check
436
+ * `isSteamDesktop || isSteamDeck`. Also exposed as `system.isSteamDesktop()`. A host
437
+ * that predates this field omits it on the wire; `HostEnvironmentApi` then
438
+ * defaults it to `false`.
439
+ */
440
+ readonly isSteamDesktop: boolean;
441
+ /**
442
+ * Whether the game is running on Steam Deck hardware. Device-static for the
443
+ * session — branch UX on it (gamepad-first navigation, handheld layout,
444
+ * larger touch targets). Mutually exclusive with `isSteamDesktop` (see above).
445
+ * Also exposed as `system.isSteamDeck()`. A host that predates this field
446
+ * omits it on the wire; `HostEnvironmentApi` then defaults it to `false`.
447
+ */
448
+ readonly isSteamDeck: boolean;
449
+ }
450
+ /**
451
+ * The INIT_SDK environment payload as it arrives over the wire / is stored on
452
+ * `_environmentData`. Identical to `EnvironmentInfo` except `capabilities`,
453
+ * `isSteamDesktop`, and `isSteamDeck` are optional, because a host older than those
454
+ * fields omits them. `HostEnvironmentApi` upgrades this into a full
455
+ * `EnvironmentInfo`.
456
+ */
457
+ interface RawEnvironmentInfo extends Omit<EnvironmentInfo, 'capabilities' | 'isSteamDesktop' | 'isSteamDeck'> {
458
+ readonly capabilities?: {
459
+ readonly ads?: boolean;
460
+ readonly purchases?: boolean;
461
+ };
462
+ readonly isSteamDesktop?: boolean;
463
+ readonly isSteamDeck?: boolean;
418
464
  }
419
465
  interface EnvironmentApi {
420
466
  getEnvironment(): EnvironmentInfo;
@@ -466,6 +512,20 @@ interface SystemApi {
466
512
  * @returns true if on web platform
467
513
  */
468
514
  isWeb(): boolean;
515
+ /**
516
+ * Check if running on the Steam channel on a desktop/laptop PC (the Steam
517
+ * client, NOT Steam Deck hardware). Mutually exclusive with `isSteamDeck()`;
518
+ * to ask "am I on Steam at all?", check `isSteamDesktop() || isSteamDeck()`.
519
+ * @returns true on Steam desktop/laptop (non-Deck)
520
+ */
521
+ isSteamDesktop(): boolean;
522
+ /**
523
+ * Check if running on Steam Deck hardware. Mutually exclusive with
524
+ * `isSteamDesktop()`. Use to branch UX for the handheld (gamepad-first
525
+ * navigation, handheld layout, larger touch targets).
526
+ * @returns true on Steam Deck
527
+ */
528
+ isSteamDeck(): boolean;
469
529
  /**
470
530
  * Check whether the current platform can present an "Add to Home Screen"
471
531
  * prompt for the running game right now.
@@ -1661,7 +1721,7 @@ type Protocol = {
1661
1721
  interface JoinTicketRequest {
1662
1722
  roomType: string;
1663
1723
  roomCode?: string;
1664
- action: 'create' | 'joinOrCreate' | 'joinByCode';
1724
+ action: 'create' | 'joinOrCreate' | 'joinByCode' | 'matchmake';
1665
1725
  /**
1666
1726
  * Equality constraints for matchmaking. A candidate room matches iff every
1667
1727
  * key here exists on the room's stored criteria with a strictly-equal value.
@@ -1674,13 +1734,19 @@ interface JoinTicketRequest {
1674
1734
  isPrivate?: boolean;
1675
1735
  metadata?: Record<string, unknown>;
1676
1736
  };
1737
+ /**
1738
+ * Stable key for a persistent room type (e.g. the current season's globe id),
1739
+ * resolved by the host from the platform `SeasonSchedule`. Routes the join to
1740
+ * the deterministic, version-independent persistent room (Phase 1 + Phase 13).
1741
+ */
1742
+ persistentKey?: string;
1677
1743
  }
1678
1744
  /**
1679
1745
  * Optional matchmaking/create knobs threaded through the client room APIs.
1680
- * Both fields optional, so an omitted `RoomOptions` is the pre-WS6 path by
1746
+ * All fields optional, so an omitted `RoomOptions` is the pre-WS6 path by
1681
1747
  * construction — no runtime "did the caller pass options" guard is needed.
1682
1748
  */
1683
- type RoomOptions = Pick<JoinTicketRequest, 'criteria' | 'createOptions'>;
1749
+ type RoomOptions = Pick<JoinTicketRequest, 'criteria' | 'createOptions' | 'persistentKey'>;
1684
1750
  /** Summary of a realtime room, as listed by `multiplayer.getUserRooms()`. */
1685
1751
  interface RealtimeRoomSummary {
1686
1752
  roomId: string;
@@ -1699,6 +1765,16 @@ interface ListUserRoomsOptions {
1699
1765
  includeDisposed?: boolean;
1700
1766
  }
1701
1767
 
1768
+ /** A persisted room chat message (Req 20). Mirrors the server's ChatMessage. */
1769
+ interface ChatMessageData {
1770
+ id: string;
1771
+ roomId: string;
1772
+ senderId: string;
1773
+ senderName?: string;
1774
+ text: string;
1775
+ ts: number;
1776
+ }
1777
+
1702
1778
  /**
1703
1779
  * Server-authoritative room types used by the client multiplayer layer.
1704
1780
  */
@@ -1725,6 +1801,13 @@ interface ServerRoom<P extends Protocol> {
1725
1801
  on(events: RoomEvents<P>): void;
1726
1802
  /** Send a typed message to the server room. */
1727
1803
  send(message: P): void;
1804
+ /**
1805
+ * Send a room chat message (Req 20). The server authorizes it against the live
1806
+ * roster, persists it, and delivers it to all members (incl. you) as `onChat`.
1807
+ */
1808
+ sendChat(text: string): void;
1809
+ /** Request recent chat history; the reply arrives via `onChatHistory`. */
1810
+ fetchChatHistory(limit?: number): void;
1728
1811
  /** Leave the room and close the connection. */
1729
1812
  leave(): void;
1730
1813
  /** Get estimated server time (local time + offset). */
@@ -1735,6 +1818,20 @@ interface RoomEvents<P extends Protocol> {
1735
1818
  onMessage?: (message: P) => void;
1736
1819
  /** Called when a targeted message is received */
1737
1820
  onPrivateMessage?: (message: P) => void;
1821
+ /**
1822
+ * Called for an authoritative world delta (Req 7). Convenience wrapper over the
1823
+ * `world:delta` broadcast so games don't match on the msgType string.
1824
+ */
1825
+ onDelta?: (delta: unknown) => void;
1826
+ /**
1827
+ * Called when the server asks the client to resync (a delta exceeded the WS
1828
+ * frame cap, or state diverged). The client should refetch full state.
1829
+ */
1830
+ onResync?: (reason: string) => void;
1831
+ /** Called when a room chat message is delivered (Req 20). */
1832
+ onChat?: (message: ChatMessageData) => void;
1833
+ /** Called with the reply to {@link ServerRoom.fetchChatHistory}. */
1834
+ onChatHistory?: (messages: ChatMessageData[]) => void;
1738
1835
  /** Called when a player joins the room */
1739
1836
  onPlayerJoined?: (player: ServerPlayer) => void;
1740
1837
  /** Called when a player leaves the room */
@@ -1751,6 +1848,12 @@ interface RoomEvents<P extends Protocol> {
1751
1848
  onReconnecting?: () => void;
1752
1849
  /** Called when reconnected */
1753
1850
  onReconnected?: () => void;
1851
+ /**
1852
+ * Called when the server moved this player to another room (move_player /
1853
+ * Req 19). The socket stays open and now serves `roomId`; the game should
1854
+ * refetch state for the new room. {@link ServerRoom.roomCode} updates to match.
1855
+ */
1856
+ onMoved?: (roomId: string) => void;
1754
1857
  }
1755
1858
 
1756
1859
  /**
@@ -1771,11 +1874,25 @@ interface MultiplayerApi {
1771
1874
  * Join an existing room or create a new one (matchmaking by room type).
1772
1875
  */
1773
1876
  joinOrCreateRoom<P extends Protocol>(roomType: string, opts?: RoomOptions): Promise<ServerRoom<P>>;
1877
+ /**
1878
+ * Server-authoritative PvP matchmaking (Req 18): request a match under
1879
+ * `opts.criteria`. Resolves once the platform pairs you with another player —
1880
+ * even if you land on different server instances — and joins you into the
1881
+ * shared room. The returned promise stays pending while waiting for an
1882
+ * opponent (up to `opts.matchmakeTimeoutMs`).
1883
+ */
1884
+ matchmakeRoom<P extends Protocol>(roomType: string, opts?: MatchmakeOptions): Promise<ServerRoom<P>>;
1774
1885
  /**
1775
1886
  * List the realtime rooms the current user is a member of.
1776
1887
  */
1777
1888
  getUserRooms(options?: ListUserRoomsOptions): Promise<RealtimeRoomSummary[]>;
1778
1889
  }
1890
+ type MatchmakeOptions = Pick<RoomOptions, 'criteria'> & {
1891
+ /** How long to wait for an opponent before rejecting (default 120s). */
1892
+ matchmakeTimeoutMs?: number;
1893
+ /** How often to poll the pool while waiting (default 1s). */
1894
+ pollIntervalMs?: number;
1895
+ };
1779
1896
 
1780
1897
  interface LoggingApi {
1781
1898
  logDebug(message: string, ...args: any[]): void;
@@ -2590,11 +2707,14 @@ interface SocialApi {
2590
2707
  *
2591
2708
  * @param options.shareParams Arbitrary share parameters for your game.
2592
2709
  * @param options.metadata Optional OpenGraph metadata for rich previews.
2710
+ * @param options.slug Optional cosmetic slug appended to the share URL (e.g.
2711
+ * "boss-level"). Sanitized server-side; non-unique; does not affect resolution.
2593
2712
  * @returns The generated share URL.
2594
2713
  */
2595
2714
  shareLinkAsync(options: {
2596
2715
  shareParams: Record<string, string>;
2597
2716
  metadata?: ShareMetadata;
2717
+ slug?: string;
2598
2718
  }): Promise<ShareLinkResult>;
2599
2719
  /**
2600
2720
  * Create a share document and return both the URL and a QR code image.
@@ -2604,12 +2724,15 @@ interface SocialApi {
2604
2724
  * @param options.shareParams Arbitrary share parameters for your game.
2605
2725
  * @param options.metadata Optional OpenGraph metadata for the share.
2606
2726
  * @param options.qrOptions Customisation for the generated QR code.
2727
+ * @param options.slug Optional cosmetic slug appended to the share URL (e.g.
2728
+ * "boss-level"). Sanitized server-side; non-unique; does not affect resolution.
2607
2729
  * @returns The generated share URL, QR code (as a data URL), and shareLinkId.
2608
2730
  */
2609
2731
  createQRCodeAsync(options: {
2610
2732
  shareParams: Record<string, string>;
2611
2733
  metadata?: ShareMetadata;
2612
2734
  qrOptions?: SocialQRCodeOptions;
2735
+ slug?: string;
2613
2736
  }): Promise<QRCodeResult>;
2614
2737
  /**
2615
2738
  * Write click metadata to a share as the current user (clicker).
@@ -3934,7 +4057,7 @@ interface Host {
3934
4057
  * registers the `onNotificationParamsUpdate` subscription. Lets the host
3935
4058
  * tell "SDK booted past READY" apart from "SDK has a live notification
3936
4059
  * subscriber" — the latter is the precise signal for "a live push WILL be
3937
- * received". Optional: Mock / Sandbox hosts have no remote peer and so
4060
+ * received". Optional: Mock / Playground hosts have no remote peer and so
3938
4061
  * don't implement it.
3939
4062
  */
3940
4063
  notifyNotificationParamsSubscribeReady?(): void;
@@ -3943,9 +4066,9 @@ interface Host {
3943
4066
  /**
3944
4067
  * Create a Host instance based on the runtime environment.
3945
4068
  *
3946
- * SandboxHost is loaded via a separate entry point (`@series-inc/rundot-game-sdk/sandbox`)
3947
- * which registers a factory on `globalThis.__RUNDOT_SANDBOX_HOST_FACTORY__`.
3948
- * The Vite sandbox plugin injects this import automatically, keeping Firebase
4069
+ * PlaygroundHost is loaded via a separate entry point (`@series-inc/rundot-game-sdk/playground`)
4070
+ * which registers a factory on `globalThis.__RUNDOT_PLAYGROUND_HOST_FACTORY__`.
4071
+ * The Vite playground plugin injects this import automatically, keeping Firebase
3949
4072
  * completely out of the main bundle's dependency graph.
3950
4073
  */
3951
4074
  declare function createHost(rundotGameApi: RundotGameAPI, isMock: boolean): Promise<Host>;
@@ -4211,7 +4334,7 @@ interface RundotGameAPI {
4211
4334
  config: Record<string, never>;
4212
4335
  _profileData?: Profile;
4213
4336
  _deviceData?: DeviceInfo;
4214
- _environmentData?: EnvironmentInfo;
4337
+ _environmentData?: RawEnvironmentInfo;
4215
4338
  _safeAreaData?: SafeArea;
4216
4339
  _localeData?: string;
4217
4340
  _languageCodeData?: string;
@@ -4457,4 +4580,4 @@ interface AdsApi {
4457
4580
  showInterstitialAd(options?: ShowInterstitialAdOptions): Promise<boolean>;
4458
4581
  }
4459
4582
 
4460
- export { type EnvironmentInfo as $, type AnalyticsApi as A, type BatchRecipeRequirementsResult as B, type NotificationsApi as C, type ScheduleLocalNotification as D, type ScheduleNotificationOptions as E, type RCSAvailabilityStatus as F, type ScheduleRCSInput as G, type Host as H, type ScheduleRCSResult as I, type RequestRCSOptInInput as J, type RequestRCSOptInResult as K, type PopupsApi as L, type ShowToastOptions as M, type NavigationApi as N, type LikeDialogResult as O, type Profile as P, type QuitOptions as Q, type RundotGameAPI as R, type SimulationActiveRunsUpdate as S, type CommentsPanelResult as T, type LikeStateResult as U, type ShowInterstitialAdOptions as V, type ShowRewardedAdOptions as W, type ProfileApi as X, type DeviceApi as Y, type DeviceInfo as Z, type EnvironmentApi as _, type RecipeRequirementQuery as a, type ListRoomsOptions as a$, type SystemApi as a0, type SafeArea as a1, type AddToHomeScreenResult as a2, type CdnApi as a3, type FetchFromCdnOptions as a4, type AssetUrlResult as a5, type TimeApi as a6, type ServerTimeData as a7, type GetFutureTimeOptions as a8, type AiApi as a9, type SimulationAvailableItem as aA, type SimulationPowerPreview as aB, type SimulationSlotMutationResult as aC, type SimulationSlotContainer as aD, type SimulationAssignment as aE, type SimulationState as aF, type ExecuteRecipeOptions as aG, type ExecuteRecipeResponse as aH, type CollectRecipeResult as aI, type ResetStateOptions as aJ, type ResetStateResult as aK, type GetActiveRunsOptions as aL, type ExecuteScopedRecipeOptions as aM, type ExecuteScopedRecipeResult as aN, type GetAvailableRecipesOptions as aO, type GetAvailableRecipesResult as aP, type Recipe as aQ, type GetBatchRecipeRequirements as aR, type TriggerRecipeChainOptions as aS, type RoomDataUpdate as aT, type RoomMessageEvent as aU, type ProposedMoveEvent as aV, RundotGameTransport as aW, type RoomsApi as aX, type CreateRoomOptions as aY, type JoinOrCreateRoomOptions as aZ, type JoinOrCreateResult as a_, type AiChatCompletionRequest as aa, type AiChatCompletionData as ab, type AiChatCompletionStreamOptions as ac, type AiChatCompletionStreamChunk as ad, type HapticsApi as ae, HapticFeedbackStyle as af, type GamepadSnapshot as ag, type GamepadConnectionEvent as ah, type Subscription as ai, type GamepadApi as aj, type GamepadLatencyStats as ak, type FeaturesApi as al, type Experiment as am, type LifecycleApi as an, type SleepCallback as ao, type AwakeCallback as ap, type PauseCallback as aq, type ResumeCallback as ar, type QuitCallback as as, type BackButtonCallback as at, type IdentityChangedCallback as au, type IdentityChangedEvent as av, type SimulationApi as aw, type SimulationSlotValidationResult as ax, type SimulationBatchOperation as ay, type SimulationBatchOperationsResult as az, type RecipeRequirementResult as b, type AdminThreeDGenApi as b$, type UpdateRoomDataOptions as b0, type RoomMessageRequest as b1, type StartRoomGameOptions as b2, type ProposeMoveRequest as b3, type ProposeMoveResult as b4, type ValidateMoveVerdict as b5, type ValidateMoveResult as b6, type RoomSubscriptionOptions as b7, type LoggingApi as b8, type IapApi as b9, type CanShareFileResult as bA, type EntitlementApi as bB, type Entitlement as bC, type LedgerEntry as bD, type StatsApi as bE, type GrantInfo as bF, type CollectiblesApi as bG, type CollectibleCard as bH, type VipClaimResult as bI, type ShopApi as bJ, type StorefrontResponse as bK, type StorefrontItem as bL, type ShopPurchaseResponse as bM, type ShopOrderHistoryResponse as bN, type PromptLoginResult as bO, type AccessTier as bP, type AccessGateApi as bQ, type TextGenApi as bR, type UgcApi as bS, type MultiplayerApi as bT, type VideoApi as bU, type AppApi as bV, type AdminUgcApi as bW, type AdminImageGenApi as bX, type AdminVideoGenApi as bY, type AdminSpriteGenApi as bZ, type AdminAudioGenApi as b_, type SpendCurrencyOptions as ba, type SpendCurrencyResult as bb, type SubscriptionTier as bc, type RunSubscriptionsResponse as bd, type SubscriptionInterval as be, type PurchaseSubscriptionResponse as bf, type OpenStoreResult as bg, type LoadEmbeddedAssetsResponse as bh, type SharedAssetsApi as bi, type CreditsApi as bj, type CreditsBillingContext as bk, type CreditBalance as bl, type CreditSubscription as bm, type CreditPlansCatalog as bn, type OpenPaywallOptions as bo, type CreditsPurchaseResult as bp, type Unsubscribe as bq, type PreloaderApi as br, type SocialApi as bs, type ShareMetadata as bt, type ShareLinkResult as bu, type SocialQRCodeOptions as bv, type QRCodeResult as bw, type ShareClickData as bx, type ShareFileOptions as by, type ShareFileResult as bz, type RundotGameAvailableRecipe as c, type AiContentBlock as c$, type AppRole as c0, type ResolveLaunchIntentOptions as c1, type LaunchIntent as c2, type ReleaseNote as c3, type AdminUgcBrowseParams as c4, type AdminUgcBrowseResponse as c5, type AdminUgcListReportsParams as c6, type AdminUgcListReportsResponse as c7, type AdminUgcResolveAction as c8, type AdminGenBrowseParams as c9, type ClipPersistOptions as cA, type ClipResult as cB, type UgcEntry as cC, type CaptureConsentStatus as cD, AccessDeniedError as cE, type AdminGenApi as cF, type AdminImageGenBrowseParams as cG, type AdminImageGenBrowseResponse as cH, type AdminImageGenListReportsParams as cI, type AdminImageGenListReportsResponse as cJ, type AdminImageGenResolveAction as cK, type AdminSpriteGenBrowseParams as cL, type AdminSpriteGenBrowseResponse as cM, type AdminSpriteGenListReportsParams as cN, type AdminSpriteGenListReportsResponse as cO, type AdminSpriteGenResolveAction as cP, type AdminThreeDGenBrowseParams as cQ, type AdminThreeDGenBrowseResponse as cR, type AdminThreeDGenListReportsParams as cS, type AdminThreeDGenListReportsResponse as cT, type AdminThreeDGenResolveAction as cU, type AdminUgcEntry as cV, type AdminVideoGenBrowseParams as cW, type AdminVideoGenBrowseResponse as cX, type AdminVideoGenListReportsParams as cY, type AdminVideoGenListReportsResponse as cZ, type AdminVideoGenResolveAction as c_, type AdminGenBrowseResponse as ca, type ImageGenEntry as cb, type AdminGenListReportsParams as cc, type AdminGenListReportsResponse as cd, type ImageGenReport as ce, type AdminGenResolveAction as cf, type SpriteGenEntry as cg, type SpriteGenReport as ch, type ThreeDGenEntry as ci, type ThreeDGenReport as cj, type Avatar3dApi as ck, type AssetManifest as cl, type Avatar3dConfig as cm, type ShowEditorOptions as cn, type Avatar3dEdits as co, type AdsApi as cp, type SharedStorageHostApi as cq, type FilesApi as cr, type ClipsApi as cs, type AttributionApi as ct, type InitializationContext as cu, type InitializationOptions as cv, type CaptureConsent as cw, type StartClipRecordingOptions as cx, type ClipBlob as cy, type ClipsSupport as cz, type RundotGameCollectRecipeResult as d, RpcInboundStorageApi as d$, type AiImageContent as d0, type AiImageUrlContent as d1, type AiMessage as d2, type AiResponseFormat as d3, type AiTextContent as d4, type AiToolResultContent as d5, type AiToolUseContent as d6, type Asset as d7, type AudioGenEntry as d8, type AudioGenReport as d9, type InboundStorageApi as dA, type IsPlayerSubscribedRequest as dB, type JoinOrCreateRoomEnvelopeResponse as dC, type JoinRoomMatchCriteria as dD, type LaunchIntentKind as dE, type ListUserRoomsOptions as dF, type LoadEmbeddedAssetsRequest as dG, MockAvatarApi as dH, type NotificationTriggerInput as dI, type OnNotificationCallback as dJ, type OnRequestCallback as dK, type OnResponseCallback as dL, type ProposedMovePayload as dM, type Protocol as dN, type PurchaseSubscriptionRequest as dO, type RCSAvailabilityReason as dP, type RCSOptInStatus as dQ, ROOM_GAME_PHASES as dR, type RealtimeRoomSummary as dS, type RecipeInfo as dT, type ReleaseType as dU, type RoomEnvelopeResponse as dV, type RoomEvents as dW, type RoomGamePhase as dX, type RoomMessageEventType as dY, type RoomMessagePayload as dZ, type RoomsEnvelopeResponse as d_, CLIP_CONTENT_TYPE as da, CREDITS_EXHAUSTED_CODE as db, type Category as dc, type ClipAudioOptions as dd, type ClipCameraOptions as de, type ClipPipLayout as df, type ClipPipPosition as dg, type ConnectionState as dh, type CreditFreeDailyInfo as di, type CreditPlan as dj, type CreditTopUpPack as dk, type CreditsBilledTo as dl, CreditsExhaustedError as dm, type CreditsExhaustedErrorInfo as dn, type CreditsPurchaseOutcome as dp, GAMEPAD_BUTTON_NAMES as dq, type GamepadAxes as dr, type GamepadButtonName as ds, type GamepadButtonState as dt, type GamepadSource as du, type GetSubscriptionsForTierRequest as dv, type HudInsets as dw, type IdentityChangeReason as dx, type InboundForKeyEntry as dy, type InboundMethodIds as dz, type RundotGameExecuteRecipeOptions as e, RpcSharedAssetsApi as e0, type RpcTransport as e1, type RunSubscription as e2, type RundotGameRoomCustomMetadata as e3, type RundotGameRoomPayload as e4, type RundotGameRoomRules as e5, type RundotGameRoomRulesGameState as e6, SHARE_FILE_ALLOWED_MIME_TYPES as e7, SHARE_FILE_MAX_SIZE_BYTES as e8, type ScheduleRCSStatus as e9, type ServerPlayer as ea, type ServerRoom as eb, type ShareFileMimeType as ec, type ShopOrder as ed, type SimulationBatchOperationAssign as ee, type SimulationBatchOperationRemove as ef, type SimulationBatchOperationResult as eg, type SimulationPersonalState as eh, type SimulationRoomActiveRecipe as ei, type SimulationRoomState as ej, type StorefrontCollection as ek, type StorefrontCollectionItem as el, type SubPath as em, type Tool as en, type ToolChoice as eo, type ToolUse as ep, type TimeIntervalTriggerInput as eq, type UgcReport as er, type VideoGenEntry as es, type VideoGenReport as et, asCreditsExhaustedError as eu, createHost as ev, isCreditsExhaustedError as ew, mapCreditsExhaustion as ex, resolveCollectionItemPrice as ey, type RundotGameExecuteRecipeResult as f, type RundotGameExecuteScopedRecipeOptions as g, RundotGameRoom as h, type RundotGameSimulationConfig as i, type RundotGameSimulationEffect as j, type RundotGameSimulationRecipe as k, type RundotGameSimulationStateResponse as l, type SimulationEntityUpdate as m, type SimulationRunSummary as n, type SimulationSnapshotUpdate as o, type SimulationSubscribeOptions as p, type SimulationUpdateData as q, type SimulationUpdateType as r, type RpcRequest as s, type RpcResponse as t, type RpcNotification as u, RpcClient as v, type StorageApi as w, type NavigationStackInfo as x, type PushAppOptions as y, type NavigateToGameOptions as z };
4583
+ export { type EnvironmentInfo as $, type AnalyticsApi as A, type BatchRecipeRequirementsResult as B, type NotificationsApi as C, type ScheduleLocalNotification as D, type ScheduleNotificationOptions as E, type RCSAvailabilityStatus as F, type ScheduleRCSInput as G, type Host as H, type ScheduleRCSResult as I, type RequestRCSOptInInput as J, type RequestRCSOptInResult as K, type PopupsApi as L, type ShowToastOptions as M, type NavigationApi as N, type LikeDialogResult as O, type Profile as P, type QuitOptions as Q, type RundotGameAPI as R, type SimulationActiveRunsUpdate as S, type CommentsPanelResult as T, type LikeStateResult as U, type ShowInterstitialAdOptions as V, type ShowRewardedAdOptions as W, type ProfileApi as X, type DeviceApi as Y, type DeviceInfo as Z, type EnvironmentApi as _, type RecipeRequirementQuery as a, type ListRoomsOptions as a$, type SystemApi as a0, type SafeArea as a1, type AddToHomeScreenResult as a2, type CdnApi as a3, type FetchFromCdnOptions as a4, type AssetUrlResult as a5, type TimeApi as a6, type ServerTimeData as a7, type GetFutureTimeOptions as a8, type AiApi as a9, type SimulationAvailableItem as aA, type SimulationPowerPreview as aB, type SimulationSlotMutationResult as aC, type SimulationSlotContainer as aD, type SimulationAssignment as aE, type SimulationState as aF, type ExecuteRecipeOptions as aG, type ExecuteRecipeResponse as aH, type CollectRecipeResult as aI, type ResetStateOptions as aJ, type ResetStateResult as aK, type GetActiveRunsOptions as aL, type ExecuteScopedRecipeOptions as aM, type ExecuteScopedRecipeResult as aN, type GetAvailableRecipesOptions as aO, type GetAvailableRecipesResult as aP, type Recipe as aQ, type GetBatchRecipeRequirements as aR, type TriggerRecipeChainOptions as aS, type RoomDataUpdate as aT, type RoomMessageEvent as aU, type ProposedMoveEvent as aV, RundotGameTransport as aW, type RoomsApi as aX, type CreateRoomOptions as aY, type JoinOrCreateRoomOptions as aZ, type JoinOrCreateResult as a_, type AiChatCompletionRequest as aa, type AiChatCompletionData as ab, type AiChatCompletionStreamOptions as ac, type AiChatCompletionStreamChunk as ad, type HapticsApi as ae, HapticFeedbackStyle as af, type GamepadSnapshot as ag, type GamepadConnectionEvent as ah, type Subscription as ai, type GamepadApi as aj, type GamepadLatencyStats as ak, type FeaturesApi as al, type Experiment as am, type LifecycleApi as an, type SleepCallback as ao, type AwakeCallback as ap, type PauseCallback as aq, type ResumeCallback as ar, type QuitCallback as as, type BackButtonCallback as at, type IdentityChangedCallback as au, type IdentityChangedEvent as av, type SimulationApi as aw, type SimulationSlotValidationResult as ax, type SimulationBatchOperation as ay, type SimulationBatchOperationsResult as az, type RecipeRequirementResult as b, type AdminThreeDGenApi as b$, type UpdateRoomDataOptions as b0, type RoomMessageRequest as b1, type StartRoomGameOptions as b2, type ProposeMoveRequest as b3, type ProposeMoveResult as b4, type ValidateMoveVerdict as b5, type ValidateMoveResult as b6, type RoomSubscriptionOptions as b7, type LoggingApi as b8, type IapApi as b9, type CanShareFileResult as bA, type EntitlementApi as bB, type Entitlement as bC, type LedgerEntry as bD, type StatsApi as bE, type GrantInfo as bF, type CollectiblesApi as bG, type CollectibleCard as bH, type VipClaimResult as bI, type ShopApi as bJ, type StorefrontResponse as bK, type StorefrontItem as bL, type ShopPurchaseResponse as bM, type ShopOrderHistoryResponse as bN, type PromptLoginResult as bO, type AccessTier as bP, type AccessGateApi as bQ, type TextGenApi as bR, type UgcApi as bS, type MultiplayerApi as bT, type VideoApi as bU, type AppApi as bV, type AdminUgcApi as bW, type AdminImageGenApi as bX, type AdminVideoGenApi as bY, type AdminSpriteGenApi as bZ, type AdminAudioGenApi as b_, type SpendCurrencyOptions as ba, type SpendCurrencyResult as bb, type SubscriptionTier as bc, type RunSubscriptionsResponse as bd, type SubscriptionInterval as be, type PurchaseSubscriptionResponse as bf, type OpenStoreResult as bg, type LoadEmbeddedAssetsResponse as bh, type SharedAssetsApi as bi, type CreditsApi as bj, type CreditsBillingContext as bk, type CreditBalance as bl, type CreditSubscription as bm, type CreditPlansCatalog as bn, type OpenPaywallOptions as bo, type CreditsPurchaseResult as bp, type Unsubscribe as bq, type PreloaderApi as br, type SocialApi as bs, type ShareMetadata as bt, type ShareLinkResult as bu, type SocialQRCodeOptions as bv, type QRCodeResult as bw, type ShareClickData as bx, type ShareFileOptions as by, type ShareFileResult as bz, type RundotGameAvailableRecipe as c, type AdminVideoGenResolveAction as c$, type AppRole as c0, type ResolveLaunchIntentOptions as c1, type LaunchIntent as c2, type ReleaseNote as c3, type AdminUgcBrowseParams as c4, type AdminUgcBrowseResponse as c5, type AdminUgcListReportsParams as c6, type AdminUgcListReportsResponse as c7, type AdminUgcResolveAction as c8, type AdminGenBrowseParams as c9, type ClipsSupport as cA, type ClipPersistOptions as cB, type ClipResult as cC, type UgcEntry as cD, type CaptureConsentStatus as cE, AccessDeniedError as cF, type AdminGenApi as cG, type AdminImageGenBrowseParams as cH, type AdminImageGenBrowseResponse as cI, type AdminImageGenListReportsParams as cJ, type AdminImageGenListReportsResponse as cK, type AdminImageGenResolveAction as cL, type AdminSpriteGenBrowseParams as cM, type AdminSpriteGenBrowseResponse as cN, type AdminSpriteGenListReportsParams as cO, type AdminSpriteGenListReportsResponse as cP, type AdminSpriteGenResolveAction as cQ, type AdminThreeDGenBrowseParams as cR, type AdminThreeDGenBrowseResponse as cS, type AdminThreeDGenListReportsParams as cT, type AdminThreeDGenListReportsResponse as cU, type AdminThreeDGenResolveAction as cV, type AdminUgcEntry as cW, type AdminVideoGenBrowseParams as cX, type AdminVideoGenBrowseResponse as cY, type AdminVideoGenListReportsParams as cZ, type AdminVideoGenListReportsResponse as c_, type AdminGenBrowseResponse as ca, type ImageGenEntry as cb, type AdminGenListReportsParams as cc, type AdminGenListReportsResponse as cd, type ImageGenReport as ce, type AdminGenResolveAction as cf, type SpriteGenEntry as cg, type SpriteGenReport as ch, type ThreeDGenEntry as ci, type ThreeDGenReport as cj, type Avatar3dApi as ck, type AssetManifest as cl, type Avatar3dConfig as cm, type ShowEditorOptions as cn, type Avatar3dEdits as co, type AdsApi as cp, type RawEnvironmentInfo as cq, type SharedStorageHostApi as cr, type FilesApi as cs, type ClipsApi as ct, type AttributionApi as cu, type InitializationContext as cv, type InitializationOptions as cw, type CaptureConsent as cx, type StartClipRecordingOptions as cy, type ClipBlob as cz, type RundotGameCollectRecipeResult as d, type RoomGamePhase as d$, type AiContentBlock as d0, type AiImageContent as d1, type AiImageUrlContent as d2, type AiMessage as d3, type AiResponseFormat as d4, type AiTextContent as d5, type AiToolResultContent as d6, type AiToolUseContent as d7, type Asset as d8, type AudioGenEntry as d9, type InboundForKeyEntry as dA, type InboundMethodIds as dB, type InboundStorageApi as dC, type IsPlayerSubscribedRequest as dD, type JoinOrCreateRoomEnvelopeResponse as dE, type JoinRoomMatchCriteria as dF, type LaunchIntentKind as dG, type ListUserRoomsOptions as dH, type LoadEmbeddedAssetsRequest as dI, type MatchmakeOptions as dJ, MockAvatarApi as dK, type NotificationTriggerInput as dL, type OnNotificationCallback as dM, type OnRequestCallback as dN, type OnResponseCallback as dO, type PlatformCapabilities as dP, type ProposedMovePayload as dQ, type Protocol as dR, type PurchaseSubscriptionRequest as dS, type RCSAvailabilityReason as dT, type RCSOptInStatus as dU, ROOM_GAME_PHASES as dV, type RealtimeRoomSummary as dW, type RecipeInfo as dX, type ReleaseType as dY, type RoomEnvelopeResponse as dZ, type RoomEvents as d_, type AudioGenReport as da, CLIP_CONTENT_TYPE as db, CREDITS_EXHAUSTED_CODE as dc, type Category as dd, type ChatMessageData as de, type ClipAudioOptions as df, type ClipCameraOptions as dg, type ClipPipLayout as dh, type ClipPipPosition as di, type ConnectionState as dj, type CreditFreeDailyInfo as dk, type CreditPlan as dl, type CreditTopUpPack as dm, type CreditsBilledTo as dn, CreditsExhaustedError as dp, type CreditsExhaustedErrorInfo as dq, type CreditsPurchaseOutcome as dr, GAMEPAD_BUTTON_NAMES as ds, type GamepadAxes as dt, type GamepadButtonName as du, type GamepadButtonState as dv, type GamepadSource as dw, type GetSubscriptionsForTierRequest as dx, type HudInsets as dy, type IdentityChangeReason as dz, type RundotGameExecuteRecipeOptions as e, type RoomMessageEventType as e0, type RoomMessagePayload as e1, type RoomsEnvelopeResponse as e2, RpcInboundStorageApi as e3, RpcSharedAssetsApi as e4, type RpcTransport as e5, type RunSubscription as e6, type RundotGameRoomCustomMetadata as e7, type RundotGameRoomPayload as e8, type RundotGameRoomRules as e9, isCreditsExhaustedError as eA, mapCreditsExhaustion as eB, resolveCollectionItemPrice as eC, type RundotGameRoomRulesGameState as ea, SHARE_FILE_ALLOWED_MIME_TYPES as eb, SHARE_FILE_MAX_SIZE_BYTES as ec, type ScheduleRCSStatus as ed, type ServerPlayer as ee, type ServerRoom as ef, type ShareFileMimeType as eg, type ShopOrder as eh, type SimulationBatchOperationAssign as ei, type SimulationBatchOperationRemove as ej, type SimulationBatchOperationResult as ek, type SimulationPersonalState as el, type SimulationRoomActiveRecipe as em, type SimulationRoomState as en, type StorefrontCollection as eo, type StorefrontCollectionItem as ep, type SubPath as eq, type Tool as er, type ToolChoice as es, type ToolUse as et, type TimeIntervalTriggerInput as eu, type UgcReport as ev, type VideoGenEntry as ew, type VideoGenReport as ex, asCreditsExhaustedError as ey, createHost as ez, type RundotGameExecuteRecipeResult as f, type RundotGameExecuteScopedRecipeOptions as g, RundotGameRoom as h, type RundotGameSimulationConfig as i, type RundotGameSimulationEffect as j, type RundotGameSimulationRecipe as k, type RundotGameSimulationStateResponse as l, type SimulationEntityUpdate as m, type SimulationRunSummary as n, type SimulationSnapshotUpdate as o, type SimulationSubscribeOptions as p, type SimulationUpdateData as q, type SimulationUpdateType as r, type RpcRequest as s, type RpcResponse as t, type RpcNotification as u, RpcClient as v, type StorageApi as w, type NavigationStackInfo as x, type PushAppOptions as y, type NavigateToGameOptions as z };
@@ -11,8 +11,8 @@
11
11
  * })
12
12
  * ```
13
13
  *
14
- * ⚠️ SANDBOX-ONLY: This file depends on Firebase and should ONLY be imported by SandboxHost
15
- * and other sandbox-only modules. Do NOT import from barrel exports (http/index.ts).
14
+ * ⚠️ PLAYGROUND-ONLY: This file depends on Firebase and should ONLY be imported by PlaygroundHost
15
+ * and other playground-only modules. Do NOT import from barrel exports (http/index.ts).
16
16
  * This ensures Firebase is not bundled in production builds.
17
17
  */
18
18
  /**
@@ -403,5 +403,5 @@ var HttpLeaderboardApi = class {
403
403
  };
404
404
 
405
405
  export { HttpAudioGenApi, HttpImageGenApi, HttpLeaderboardApi, HttpSpriteGenApi, HttpThreeDGenApi, HttpVideoGenApi };
406
- //# sourceMappingURL=chunk-BJGV6WIK.js.map
407
- //# sourceMappingURL=chunk-BJGV6WIK.js.map
406
+ //# sourceMappingURL=chunk-57DREBKB.js.map
407
+ //# sourceMappingURL=chunk-57DREBKB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/imageGen/HttpImageGenApi.ts","../src/audioGen/HttpAudioGenApi.ts","../src/videoGen/HttpVideoGenApi.ts","../src/spriteGen/HttpSpriteGenApi.ts","../src/threeDGen/HttpThreeDGenApi.ts","../src/leaderboard/normalizeScores.ts","../src/leaderboard/HttpLeaderboardApi.ts"],"names":[],"mappings":";;;AAOO,IAAM,kBAAN,MAA6C;AAAA,EACjC,KAAA;AAAA,EACA,IAAA;AAAA,EAEjB,WAAA,CAAY,OAAe,IAAA,EAAuB;AAChD,IAAA,IAAA,CAAK,KAAA,GAAQ,KAAA;AACb,IAAA,IAAA,CAAK,IAAA,GAAO,IAAA;AAAA,EACd;AAAA,EAEA,MAAc,UAAA,CAAc,IAAA,EAAc,IAAA,EAA2C;AACnF,IAAA,MAAM,OAAA,GAAU,MAAM,IAAA,CAAK,IAAA,CAAK,UAAA,EAAW;AAC3C,IAAA,MAAM,OAAA,GAAU,IAAA,CAAK,IAAA,CAAK,cAAA,EAAe;AACzC,IAAA,MAAM,MAAM,CAAA,EAAG,OAAO,gBAAgB,IAAA,CAAK,KAAK,IAAI,IAAI,CAAA,CAAA;AAExD,IAAA,MAAM,QAAA,GAAW,MAAM,KAAA,CAAM,GAAA,EAAK;AAAA,MAChC,MAAA,EAAQ,MAAA;AAAA,MACR,OAAA,EAAS;AAAA,QACP,cAAA,EAAgB,kBAAA;AAAA,QAChB,eAAA,EAAiB,UAAU,OAAO,CAAA,CAAA;AAAA,QAClC,YAAA,EAAc;AAAA,OAChB;AAAA,MACA,IAAA,EAAM,IAAA,CAAK,SAAA,CAAU,IAAI;AAAA,KAC1B,CAAA;AAED,IAAA,IAAI,CAAC,SAAS,EAAA,EAAI;AAChB,MAAA,MAAM,SAAA,GAAY,MAAM,QAAA,CAAS,IAAA,EAAK;AACtC,MAAA,IAAI,YAAA,GAAe,CAAA,gBAAA,EAAmB,QAAA,CA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implementation of ImageGenApi. Firebase-free: auth + base URL\n// come from the injected BackendHttpDeps, so any host (PlaygroundHost, Telegram/Steam\n// shells) can construct it. Do NOT import from barrel exports (imageGen/index.ts).\n\nimport { ImageGenApi, ImageGenParams, ImageGenResult, ImageGenJobEvent, DepthEstimationParams, DepthEstimationResult, RemoveBackgroundParams, RemoveBackgroundResult, UpscaleImageParams, UpscaleImageResult } from './ImageGenApi';\nimport type { BackendHttpDeps } from '../http/backendHttpDeps';\n\nexport class HttpImageGenApi implements ImageGenApi {\n private readonly appId: string;\n private readonly deps: BackendHttpDeps;\n\n constructor(appId: string, deps: BackendHttpDeps) {\n this.appId = appId;\n this.deps = deps;\n }\n\n private async authedPost<T>(path: string, body: Record<string, unknown>): Promise<T> {\n const idToken = await this.deps.getIdToken();\n const baseUrl = this.deps.getCloudRunUrl();\n const url = `${baseUrl}/v1/imagegen/${this.appId}/${path}`;\n\n const response = await fetch(url, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'Authorization': `Bearer ${idToken}`,\n 'x-consumer': 'sdk',\n },\n body: JSON.stringify(body),\n });\n\n if (!response.ok) {\n const errorText = await response.text();\n let errorMessage = `Request failed (${response.status})`;\n try {\n const errorJson = JSON.parse(errorText);\n errorMessage = errorJson.error || errorJson.message || errorMessage;\n } catch {\n if (errorText) errorMessage = errorText;\n }\n throw new Error(errorMessage);\n }\n\n return response.json();\n }\n\n async generate(params: ImageGenParams): Promise<ImageGenResult> {\n return this.authedPost<ImageGenResult>('generate', params as unknown as Record<string, unknown>);\n }\n\n async estimateDepth(params: DepthEstimationParams): Promise<DepthEstimationResult> {\n return this.authedPost<DepthEstimationResult>('estimate-depth', params as unknown as Record<string, unknown>);\n }\n\n async removeBackground(params: RemoveBackgroundParams): Promise<RemoveBackgroundResult> {\n return this.authedPost<RemoveBackgroundResult>('remove-background', params as unknown as Record<string, unknown>);\n }\n\n async upscaleImage(params: UpscaleImageParams): Promise<UpscaleImageResult> {\n return this.authedPost<UpscaleImageResult>('upscale-image', params as unknown as Record<string, unknown>);\n }\n\n async getCompletedJobs(): Promise<ImageGenJobEvent[]> {\n return [];\n }\n}\n","// Host-facing HTTP implementation of AudioGenApi. Firebase-free: auth + base URL\n// come from the injected BackendHttpDeps. Do NOT import from barrel exports\n// (audioGen/index.ts).\n\nimport {\n AudioGenApi,\n AudioGenParams,\n AudioGenResult,\n AudioGenJobEvent,\n ListVoicesResult,\n DesignVoicesParams,\n DesignVoicesResult,\n SaveDesignedVoiceParams,\n SaveDesignedVoiceResult,\n} from './AudioGenApi';\nimport { RundotApiError, RateLimitedError } from '../errors';\nimport type { BackendHttpDeps } from '../http/backendHttpDeps';\n\nexport class HttpAudioGenApi implements AudioGenApi {\n private readonly appId: string;\n private readonly deps: BackendHttpDeps;\n\n constructor(appId: string, deps: BackendHttpDeps) {\n this.appId = appId;\n this.deps = deps;\n }\n\n private async authedFetch(path: string, method: string, body?: unknown): Promise<Response> {\n const idToken = await this.deps.getIdToken();\n const baseUrl = this.deps.getCloudRunUrl();\n const url = `${baseUrl}/v1/audiogen/${this.appId}/${path}`;\n\n const response = await fetch(url, {\n method,\n headers: {\n 'Content-Type': 'application/json',\n 'Authorization': `Bearer ${idToken}`,\n },\n ...(body !== undefined ? { body: JSON.stringify(body) } : {}),\n });\n\n if (!response.ok) {\n if (response.status === 429) {\n const retryAfterSec = parseInt(response.headers.get('Retry-After') ?? '60', 10);\n throw new RateLimitedError(retryAfterSec * 1000);\n }\n const errorText = await response.text();\n let errorMessage = `Audio generation failed (${response.status})`;\n let errorCode = 'UNKNOWN';\n try {\n const errorJson = JSON.parse(errorText) as Record<string, unknown>;\n errorMessage = (errorJson.error ?? errorJson.message ?? errorMessage) as string;\n if (typeof errorJson.code === 'string') errorCode = errorJson.code;\n } catch {\n if (errorText) errorMessage = errorText;\n }\n throw new RundotApiError(errorCode, errorMessage, response.status);\n }\n\n return response;\n }\n\n async generate(params: AudioGenParams): Promise<AudioGenResult> {\n const response = await this.authedFetch('generate', 'POST', params);\n return response.json();\n }\n\n async getCompletedJobs(): Promise<AudioGenJobEvent[]> {\n return [];\n }\n\n async listVoices(): Promise<ListVoicesResult> {\n const response = await this.authedFetch('voices', 'GET');\n return response.json();\n }\n\n async designVoices(params: DesignVoicesParams): Promise<DesignVoicesResult> {\n const response = await this.authedFetch('voices/design', 'POST', params);\n return response.json();\n }\n\n async saveDesignedVoice(params: SaveDesignedVoiceParams): Promise<SaveDesignedVoiceResult> {\n const response = await this.authedFetch('voices/save', 'POST', params);\n return response.json();\n }\n}\n","// Host-facing HTTP implementation of VideoGenApi. Firebase-free: auth + base URL\n// come from the injected BackendHttpDeps. Do NOT import from barrel exports\n// (videoGen/index.ts).\n\nimport { VideoGenApi, VideoGenParams, VideoGenResult, VideoGenJobEvent, VideoGenJobStartedEvent } from './VideoGenApi'\nimport type { BackendHttpDeps } from '../http/backendHttpDeps'\n\nexport class HttpVideoGenApi implements VideoGenApi {\n private readonly appId: string\n private readonly deps: BackendHttpDeps\n\n constructor(appId: string, deps: BackendHttpDeps) {\n this.appId = appId\n this.deps = deps\n }\n\n async generate(params: VideoGenParams): Promise<VideoGenResult> {\n const idToken = await this.deps.getIdToken()\n const baseUrl = this.deps.getCloudRunUrl()\n const url = `${baseUrl}/v1/videogen/${this.appId}/sync-generate`\n\n const response = await fetch(url, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'Authorization': `Bearer ${idToken}`,\n },\n body: JSON.stringify(params),\n })\n\n if (!response.ok) {\n const errorText = await response.text()\n let errorMessage = `Video generation failed (${response.status})`\n try {\n const errorJson = JSON.parse(errorText)\n errorMessage = errorJson.error || errorJson.message || errorMessage\n } catch {\n if (errorText) errorMessage = errorText\n }\n throw new Error(errorMessage)\n }\n\n return response.json()\n }\n\n async getCompletedJobs(): Promise<VideoGenJobEvent[]> {\n return []\n }\n\n async cancel(jobId: string): Promise<void> {\n const idToken = await this.deps.getIdToken()\n const baseUrl = this.deps.getCloudRunUrl()\n const url = `${baseUrl}/v1/jobs/${this.appId}/${jobId}/cancel`\n\n const response = await fetch(url, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'Authorization': `Bearer ${idToken}`,\n },\n })\n\n if (!response.ok) {\n const errorText = await response.text()\n let errorMessage = `Job cancellation failed (${response.status})`\n try {\n const errorJson = JSON.parse(errorText)\n errorMessage = errorJson.error || errorJson.message || errorMessage\n } catch {\n if (errorText) errorMessage = errorText\n }\n throw new Error(errorMessage)\n }\n }\n\n onJobStarted(_callback: (event: VideoGenJobStartedEvent) => void): { unsubscribe: () => void } {\n return { unsubscribe: () => {} }\n }\n}\n","// Host-facing HTTP implementation of SpriteGenApi. Firebase-free: auth + base URL\n// come from the injected BackendHttpDeps.\n\nimport { SpriteGenApi, SpriteGenParams, SpriteGenResult, AnimateSpriteParams, AnimateSpriteResult, SpriteGenJobEvent } from './SpriteGenApi';\nimport type { BackendHttpDeps } from '../http/backendHttpDeps';\n\nexport class HttpSpriteGenApi implements SpriteGenApi {\n private readonly appId: string;\n private readonly deps: BackendHttpDeps;\n\n constructor(appId: string, deps: BackendHttpDeps) {\n this.appId = appId;\n this.deps = deps;\n }\n\n async generate(params: SpriteGenParams): Promise<SpriteGenResult> {\n const idToken = await this.deps.getIdToken();\n const baseUrl = this.deps.getCloudRunUrl();\n const url = `${baseUrl}/v1/spritegen/${this.appId}/generate`;\n\n const response = await fetch(url, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'Authorization': `Bearer ${idToken}`,\n },\n body: JSON.stringify(params),\n });\n\n if (!response.ok) {\n const errorText = await response.text();\n let errorMessage = `Sprite generation failed (${response.status})`;\n try {\n const errorJson = JSON.parse(errorText);\n errorMessage = errorJson.error || errorJson.message || errorMessage;\n } catch {\n if (errorText) errorMessage = errorText;\n }\n throw new Error(errorMessage);\n }\n\n return response.json();\n }\n\n async animate(params: AnimateSpriteParams): Promise<AnimateSpriteResult> {\n const idToken = await this.deps.getIdToken();\n const baseUrl = this.deps.getCloudRunUrl();\n const url = `${baseUrl}/v1/spritegen/${this.appId}/animate`;\n\n const response = await fetch(url, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'Authorization': `Bearer ${idToken}`,\n },\n body: JSON.stringify(params),\n });\n\n if (!response.ok) {\n const errorText = await response.text();\n let errorMessage = `Sprite animation failed (${response.status})`;\n try {\n const errorJson = JSON.parse(errorText);\n errorMessage = errorJson.error || errorJson.message || errorMessage;\n } catch {\n if (errorText) errorMessage = errorText;\n }\n throw new Error(errorMessage);\n }\n\n return response.json();\n }\n\n async getCompletedJobs(): Promise<SpriteGenJobEvent[]> {\n return [];\n }\n}\n","// Host-facing HTTP implementation of ThreeDGenApi. Firebase-free: auth + base URL\n// come from the injected BackendHttpDeps. Do NOT import from barrel exports\n// (threeDGen/index.ts).\n\nimport {\n ThreeDGenApi,\n ThreeDGenParams,\n ThreeDGenResult,\n RemeshParams,\n RemeshResult,\n RigParams,\n RigResult,\n AnimateParams,\n AnimateResult,\n ThreeDGenJobEvent,\n} from './ThreeDGenApi'\nimport { RundotApiError } from '../errors'\nimport type { BackendHttpDeps } from '../http/backendHttpDeps'\n\nexport class HttpThreeDGenApi implements ThreeDGenApi {\n private readonly appId: string\n private readonly deps: BackendHttpDeps\n\n constructor(appId: string, deps: BackendHttpDeps) {\n this.appId = appId\n this.deps = deps\n }\n\n async generate(params: ThreeDGenParams): Promise<ThreeDGenResult> {\n return this.post<ThreeDGenResult>('sync-generate', params)\n }\n\n async remesh(params: RemeshParams): Promise<RemeshResult> {\n return this.post<RemeshResult>('sync-remesh', params)\n }\n\n async rig(params: RigParams): Promise<RigResult> {\n return this.post<RigResult>('sync-rig', params)\n }\n\n async animate(params: AnimateParams): Promise<AnimateResult> {\n return this.post<AnimateResult>('sync-animate', params)\n }\n\n async getCompletedJobs(): Promise<ThreeDGenJobEvent[]> {\n return []\n }\n\n private async post<T>(endpoint: string, body: unknown): Promise<T> {\n const idToken = await this.deps.getIdToken()\n const baseUrl = this.deps.getCloudRunUrl()\n const url = `${baseUrl}/v1/threedgen/${this.appId}/${endpoint}`\n\n const response = await fetch(url, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'Authorization': `Bearer ${idToken}`,\n },\n body: JSON.stringify(body),\n })\n\n if (!response.ok) {\n const errorText = await response.text()\n let errorMessage = `3D generation failed (${response.status})`\n let errorCode = 'UNKNOWN'\n let detail: string | undefined\n try {\n const errorJson = JSON.parse(errorText) as Record<string, unknown>\n errorMessage = (errorJson.error ?? errorJson.message ?? errorMessage) as string\n if (typeof errorJson.code === 'string') errorCode = errorJson.code\n if (typeof errorJson.detail === 'string') detail = errorJson.detail\n } catch {\n if (errorText) errorMessage = errorText\n }\n throw new RundotApiError(errorCode, errorMessage, response.status, detail)\n }\n\n return response.json()\n }\n}\n","/**\n * Idempotently convert Firestore-serialized timestamps to epoch millis on\n * leaderboard score responses. Leaderboard endpoints serialize Firestore\n * Timestamps as `{ seconds, nanoseconds }` (or `{ _seconds, _nanoseconds }`),\n * but `LeaderboardEntry` declares `submittedAt`/`expiresAt` as epoch millis.\n * Already-millis values pass through unchanged.\n */\nfunction toMillis(value: unknown): unknown {\n if (value && typeof value === 'object') {\n const v = value as Record<string, unknown>\n // Firestore Timestamp instance (defensive — survives only in-process, not\n // over HTTP/JSON, but keeps parity with the RN host's normalizer so this can\n // be the single source of truth when that migrates).\n if (typeof v.toMillis === 'function') {\n try {\n return (v.toMillis as () => number)()\n } catch {\n return value\n }\n }\n const seconds = (v.seconds ?? v._seconds) as number | undefined\n const nanos = (v.nanoseconds ?? v._nanoseconds) as number | undefined\n if (typeof seconds === 'number' && typeof nanos === 'number') {\n return seconds * 1000 + Math.floor(nanos / 1_000_000)\n }\n }\n return value\n}\n\nfunction normalizeEntry(entry: unknown): unknown {\n if (!entry || typeof entry !== 'object') return entry\n const e = entry as Record<string, unknown>\n return { ...e, submittedAt: toMillis(e.submittedAt), expiresAt: toMillis(e.expiresAt) }\n}\n\nexport function normalizeScoresResponse<T>(payload: T): T {\n if (!payload || typeof payload !== 'object') return payload\n const p = payload as Record<string, unknown>\n const result: Record<string, unknown> = { ...p }\n if (Array.isArray(p.entries)) result.entries = p.entries.map(normalizeEntry)\n if (p.context && typeof p.context === 'object') {\n const c = p.context as Record<string, unknown>\n result.context = {\n ...c,\n topEntries: Array.isArray(c.topEntries) ? c.topEntries.map(normalizeEntry) : c.topEntries,\n beforePlayer: Array.isArray(c.beforePlayer) ? c.beforePlayer.map(normalizeEntry) : c.beforePlayer,\n playerEntry: c.playerEntry ? normalizeEntry(c.playerEntry) : c.playerEntry,\n afterPlayer: Array.isArray(c.afterPlayer) ? c.afterPlayer.map(normalizeEntry) : c.afterPlayer,\n }\n }\n return result as T\n}\n","/**\n * HTTP-backed {@link LeaderboardApi} implementation usable by any host.\n *\n * Firebase-free: the caller injects `callRemote` (PlaygroundHost passes\n * `callRemoteFunction`; platform shells pass their own authenticated invoker),\n * so importing this file does NOT pull firebase into a host bundle. Do NOT\n * import from barrel exports (leaderboard/index.ts).\n */\nimport {\n LeaderboardApi,\n ScoreToken,\n SubmitScoreParams,\n SubmitScoreResult,\n GetPagedScoresOptions,\n PagedScoresResponse,\n PlayerRankOptions,\n PlayerRankResult,\n GetPodiumScoresOptions,\n PodiumScoresResponse,\n} from './LeaderboardApi'\nimport type { RemoteFunctionInvoker } from '../http/callRemoteFunction'\nimport { normalizeScoresResponse } from './normalizeScores'\n\n/**\n * HTTP-based implementation of LeaderboardApi.\n */\nexport class HttpLeaderboardApi implements LeaderboardApi {\n private readonly appId: string\n private readonly callRemote: RemoteFunctionInvoker\n\n constructor(\n appId: string,\n options: {\n callRemote: RemoteFunctionInvoker\n },\n ) {\n this.appId = appId\n this.callRemote = options.callRemote\n }\n\n async createScoreToken(mode?: string): Promise<ScoreToken> {\n return this.callRemote<ScoreToken>('apiCreateScoreToken', {\n appId: this.appId,\n mode: mode || 'default',\n })\n }\n\n async submitScore(params: SubmitScoreParams): Promise<SubmitScoreResult> {\n return this.callRemote<SubmitScoreResult>('apiSubmitScore', {\n appId: this.appId,\n token: params.token,\n score: params.score,\n duration: params.duration,\n mode: params.mode || 'default',\n period: params.period,\n telemetry: params.telemetry,\n metadata: params.metadata,\n // Score-sealing hash auto-computed by RpcLeaderboardApi; without it sealed\n // leaderboards reject the score.\n hash: params.hash,\n })\n }\n\n async getPagedScores(options?: GetPagedScoresOptions): Promise<PagedScoresResponse> {\n const res = await this.callRemote<PagedScoresResponse>('apiGetPagedScores', {\n appId: this.appId,\n mode: options?.mode || 'default',\n period: options?.period || 'alltime',\n periodDate: options?.periodDate,\n cursor: options?.cursor,\n limit: options?.limit,\n variant: options?.variant || 'standard',\n topCount: options?.topCount,\n contextAhead: options?.contextAhead,\n contextBehind: options?.contextBehind,\n })\n return normalizeScoresResponse(res)\n }\n\n async getMyRank(options?: PlayerRankOptions): Promise<PlayerRankResult> {\n const res = await this.callRemote<PlayerRankResult>('apiGetMyRank', {\n appId: this.appId,\n mode: options?.mode || 'default',\n period: options?.period || 'alltime',\n periodDate: options?.periodDate,\n })\n return normalizeScoresResponse(res)\n }\n\n async getPodiumScores(options?: GetPodiumScoresOptions): Promise<PodiumScoresResponse> {\n const res = await this.callRemote<PodiumScoresResponse>('apiGetPodiumScores', {\n appId: this.appId,\n mode: options?.mode || 'default',\n period: options?.period || 'alltime',\n periodDate: options?.periodDate,\n topCount: options?.topCount,\n contextAhead: options?.contextAhead,\n contextBehind: options?.contextBehind,\n })\n return normalizeScoresResponse(res)\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
- // src/sandbox/tabCoordinator.ts
1
+ // src/playground/tabCoordinator.ts
2
2
  var REGISTRY_KEY = "rundot-playground-tabs";
3
3
  var TAB_ID_KEY = "rundot-playground-tab-id";
4
4
  var STALE_THRESHOLD_MS = 3e4;
@@ -150,5 +150,5 @@ function startHeartbeat(tabId) {
150
150
  }
151
151
 
152
152
  export { PLAYER_POOL, clearRegistry, getOrAssignSlot, isGoogleSignedIn, onGoogleSignedIn, onGoogleSignedOut, setGoogleSignedIn, setPlayerId, startHeartbeat };
153
- //# sourceMappingURL=chunk-TNBSGNJ2.js.map
154
- //# sourceMappingURL=chunk-TNBSGNJ2.js.map
153
+ //# sourceMappingURL=chunk-LKE6IJ4M.js.map
154
+ //# sourceMappingURL=chunk-LKE6IJ4M.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/playground/tabCoordinator.ts"],"names":[],"mappings":";AAYA,IAAM,YAAA,GAAe,wBAAA;AACrB,IAAM,UAAA,GAAa,0BAAA;AACnB,IAAM,kBAAA,GAAqB,GAAA;AAC3B,IAAM,qBAAA,GAAwB,GAAA;AAOvB,IAAM,WAAA,GAAoC,CAAC,IAAA,EAAM,SAAA,EAAW,WAAW,SAAS;AAIvF,SAAS,gBAAA,GAA2B;AAClC,EAAA,IAAI;AACF,IAAA,IAAI,EAAA,GAAK,cAAA,CAAe,OAAA,CAAQ,UAAU,CAAA;AAC1C,IAAA,IAAI,IAAI,OAAO,EAAA;AACf,IAAA,EAAA,GAAK,OAAO,UAAA,EAAW;AACvB,IAAA,cAAA,CAAe,OAAA,CAAQ,YAAY,EAAE,CAAA;AACrC,IAAA,OAAO,EAAA;AAAA,EACT,CAAA,CAAA,MAAQ;AAEN,IAAA,OAAO,OAAO,UAAA,EAAW;AAAA,EAC3B;AACF;AAIA,SAAS,YAAA,GAA4B;AACnC,EAAA,IAAI;AACF,IAAA,MAAM,GAAA,GAAM,YAAA,CAAa,OAAA,CAAQ,YAAY,CAAA;AAC7C,IAAA,IAAI,GAAA,EAAK;AACP,MAAA,MAAM,MAAA,GAAS,IAAA,CAAK,KAAA,CAAM,GAAG,CAAA;AAC7B,MAAA,IAAI,MAAA,IAAU,OAAO,MAAA,CAAO,IAAA,KAAS,UAAU,OAAO,MAAA;AAAA,IACxD;AAAA,EACF,CAAA,CAAA,MAAQ;AAAA,EAER;AACA,EAAA,OAAO,EAAE,IAAA,EAAM,EAAC,EAAG,gBAAgB,KAAA,EAAM;AAC3C;AAEA,S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C","file":"chunk-LKE6IJ4M.js","sourcesContent":["/**\n * Cross-tab slot coordinator for playground mode.\n *\n * Uses localStorage + `storage` events to assign each browser tab a unique slot:\n * Slot 0 = primary tab (Google sign-in)\n * Slot 1+ = secondary tabs (synthetic \"Player N\" profiles)\n * Slot -1 = waiting for primary tab to complete Google sign-in\n *\n * Tab identity is stored in sessionStorage (survives reload, unique per tab).\n * Stale tabs are pruned via a heartbeat mechanism (every 10 s, stale after 30 s).\n */\n\nconst REGISTRY_KEY = 'rundot-playground-tabs'\nconst TAB_ID_KEY = 'rundot-playground-tab-id'\nconst STALE_THRESHOLD_MS = 30_000\nconst HEARTBEAT_INTERVAL_MS = 10_000\n\nexport interface TabRegistry {\n tabs: Record<string, { slot: number; playerId: string | null; timestamp: number }>\n googleSignedIn: boolean\n}\n\nexport const PLAYER_POOL: Array<string | null> = [null, 'player1', 'player2', 'player3']\n\n// ─── Tab ID ─────────────────────────────────────────────────────────────────\n\nfunction getOrCreateTabId(): string {\n try {\n let id = sessionStorage.getItem(TAB_ID_KEY)\n if (id) return id\n id = crypto.randomUUID()\n sessionStorage.setItem(TAB_ID_KEY, id)\n return id\n } catch {\n // Fallback if sessionStorage is unavailable\n return crypto.randomUUID()\n }\n}\n\n// ─── Registry helpers ───────────────────────────────────────────────────────\n\nfunction readRegistry(): TabRegistry {\n try {\n const raw = localStorage.getItem(REGISTRY_KEY)\n if (raw) {\n const parsed = JSON.parse(raw) as TabRegistry\n if (parsed && typeof parsed.tabs === 'object') return parsed\n }\n } catch {\n // corrupt or missing — return default\n }\n return { tabs: {}, googleSignedIn: false }\n}\n\nfunction writeRegistry(registry: TabRegistry): void {\n try {\n localStorage.setItem(REGISTRY_KEY, JSON.stringify(registry))\n } catch {\n // ignore\n }\n}\n\nfunction pruneStale(registry: TabRegistry): void {\n const now = Date.now()\n for (const [tabId, entry] of Object.entries(registry.tabs)) {\n if (now - entry.timestamp > STALE_THRESHOLD_MS) {\n delete registry.tabs[tabId]\n }\n }\n}\n\nfunction claimedSlots(registry: TabRegistry): Set<number> {\n return new Set(Object.values(registry.tabs).map((e) => e.slot))\n}\n\nfunction lowestAvailableSlot(claimed: Set<number>, startFrom: number): number {\n let slot = startFrom\n while (claimed.has(slot)) slot++\n return slot\n}\n\n// ─── Public API ─────────────────────────────────────────────────────────────\n\n/**\n * Assign this tab a slot in the registry.\n *\n * - If no tabs and Google not yet signed in → slot 0 (primary).\n * - If googleSignedIn → lowest unclaimed slot starting from 1.\n * - If not googleSignedIn but other tabs exist → slot -1 (waiting).\n */\nexport function getOrAssignSlot(): { slot: number; tabId: string; playerId: string | null } {\n const tabId = getOrCreateTabId()\n const registry = readRegistry()\n pruneStale(registry)\n\n // If this tab already has a slot, refresh timestamp and return it\n if (registry.tabs[tabId]) {\n registry.tabs[tabId].timestamp = Date.now()\n writeRegistry(registry)\n const entry = registry.tabs[tabId]\n return { slot: entry.slot, tabId, playerId: entry.playerId }\n }\n\n const claimed = claimedSlots(registry)\n let slot: number\n\n if (registry.googleSignedIn) {\n // Google is signed in — assign as secondary (slot 1+)\n // Unless slot 0 is unclaimed, in which case this tab reclaims it\n if (!claimed.has(0)) {\n slot = 0\n } else {\n slot = lowestAvailableSlot(claimed, 1)\n }\n } else if (claimed.size === 0) {\n // First tab, no Google sign-in yet → primary\n slot = 0\n } else {\n // Other tabs exist but Google not signed in → waiting\n slot = -1\n }\n\n // Auto-assign playerId based on slot\n let playerId: string | null = null\n if (slot >= 0) {\n const claimedPlayerIds = new Set(\n Object.entries(registry.tabs)\n .filter(([id]) => id !== tabId)\n .map(([, e]) => e.playerId)\n )\n\n if (slot === 0) {\n // Slot 0 defaults to null (Google/Default)\n playerId = null\n } else {\n // Secondary slots: first unclaimed non-null from pool, or 'anonymous'\n const available = PLAYER_POOL.filter(\n pid => pid !== null && !claimedPlayerIds.has(pid)\n )\n playerId = available.length > 0 ? available[0] : 'anonymous'\n }\n\n registry.tabs[tabId] = { slot, playerId, timestamp: Date.now() }\n writeRegistry(registry)\n }\n\n return { slot, tabId, playerId }\n}\n\n/**\n * Update the playerId for an existing tab entry.\n */\nexport function setPlayerId(tabId: string, playerId: string | null): void {\n const registry = readRegistry()\n if (registry.tabs[tabId]) {\n registry.tabs[tabId].playerId = playerId\n registry.tabs[tabId].timestamp = Date.now()\n writeRegistry(registry)\n }\n}\n\n/**\n * Clear the entire registry (all tabs + googleSignedIn flag).\n * Used on sign-out so every tab starts fresh after reload.\n */\nexport function clearRegistry(): void {\n writeRegistry({ tabs: {}, googleSignedIn: false })\n}\n\n/**\n * Update the `googleSignedIn` flag (called by the primary tab after Google sign-in).\n */\nexport function setGoogleSignedIn(value: boolean): void {\n const registry = readRegistry()\n registry.googleSignedIn = value\n writeRegistry(registry)\n}\n\n/**\n * Read the `googleSignedIn` flag.\n */\nexport function isGoogleSignedIn(): boolean {\n return readRegistry().googleSignedIn\n}\n\n/**\n * Listen for `storage` events to detect when another tab completes Google sign-in.\n * Returns an unsubscribe function.\n */\nexport function onGoogleSignedIn(callback: () => void): () => void {\n const handler = (e: StorageEvent) => {\n if (e.key !== REGISTRY_KEY) return\n try {\n const registry = JSON.parse(e.newValue || '{}') as TabRegistry\n if (registry.googleSignedIn) {\n callback()\n }\n } catch {\n // ignore parse errors\n }\n }\n window.addEventListener('storage', handler)\n return () => window.removeEventListener('storage', handler)\n}\n\n/**\n * Listen for `storage` events to detect when another tab signs out of Google.\n * Returns an unsubscribe function.\n */\nexport function onGoogleSignedOut(callback: () => void): () => void {\n const handler = (e: StorageEvent) => {\n if (e.key !== REGISTRY_KEY) return\n try {\n const newRegistry = JSON.parse(e.newValue || '{}') as TabRegistry\n if (newRegistry.googleSignedIn) return // still signed in — nothing to do\n\n // Only fire if the PREVIOUS state had googleSignedIn === true.\n // Without this guard, any registry write while googleSignedIn is already\n // false (heartbeats, slot claims, clearRegistry) would trigger a reload.\n const oldRegistry = JSON.parse(e.oldValue || '{}') as TabRegistry\n if (oldRegistry.googleSignedIn) {\n callback()\n }\n } catch { /* ignore */ }\n }\n window.addEventListener('storage', handler)\n return () => window.removeEventListener('storage', handler)\n}\n\n/**\n * Start a heartbeat that refreshes this tab's timestamp every 10 s.\n * Returns a stop function.\n */\nexport function startHeartbeat(tabId: string): () => void {\n const interval = setInterval(() => {\n const registry = readRegistry()\n if (registry.tabs[tabId]) {\n registry.tabs[tabId].timestamp = Date.now()\n writeRegistry(registry)\n }\n }, HEARTBEAT_INTERVAL_MS)\n\n return () => clearInterval(interval)\n}\n"]}