@thestatic-tv/dcl-sdk 2.11.2 → 2.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1272,7 +1272,7 @@ async function signedRequest(url, init = {}) {
1272
1272
  }
1273
1273
 
1274
1274
  // src/ui/guide-ui.tsx
1275
- import ReactEcs2, { UiEntity as UiEntity2, Input as Input2, Label as Label2 } from "@dcl/sdk/react-ecs";
1275
+ import ReactEcs3, { UiEntity as UiEntity3, Input as Input2, Label as Label2 } from "@dcl/sdk/react-ecs";
1276
1276
  import { Color4 as Color43 } from "@dcl/sdk/math";
1277
1277
  import { openExternalUrl as openExternalUrl2 } from "~system/RestrictedActions";
1278
1278
 
@@ -1515,6 +1515,106 @@ function truncateText(text, maxLength) {
1515
1515
  return text.substring(0, maxLength - 3) + "...";
1516
1516
  }
1517
1517
 
1518
+ // src/ui/toolbar-button.ts
1519
+ import ReactEcs2, { UiEntity as UiEntity2 } from "@dcl/sdk/react-ecs";
1520
+
1521
+ // src/ui/toolbar.ts
1522
+ var TOOLBAR = { edge: 20, gap: 10, buttonWidth: 100, buttonHeight: 45, bottom: 10 };
1523
+ var COLUMN_SLOTS = 5;
1524
+ function platformOf(answer) {
1525
+ const raw = answer?.platform;
1526
+ if (typeof raw !== "string") return "unknown";
1527
+ const p = raw.trim().toLowerCase();
1528
+ return p === "desktop" || p === "mobile" || p === "vr" || p === "web" ? p : "unknown";
1529
+ }
1530
+ function isPhonePlatform(platform) {
1531
+ return platform === "mobile";
1532
+ }
1533
+ var scaled = (value, uiScale) => Math.round(value * uiScale);
1534
+ function rowRight(slot, uiScale = 1) {
1535
+ return TOOLBAR.edge + slot * (scaled(TOOLBAR.buttonWidth, uiScale) + TOOLBAR.gap);
1536
+ }
1537
+ function columnSlot(slot, uiScale = 1) {
1538
+ const h = scaled(TOOLBAR.buttonHeight, uiScale);
1539
+ return {
1540
+ right: TOOLBAR.edge,
1541
+ boxHeight: COLUMN_SLOTS * h + (COLUMN_SLOTS - 1) * TOOLBAR.gap,
1542
+ above: Math.max(0, slot) * (h + TOOLBAR.gap)
1543
+ };
1544
+ }
1545
+ function panelRight(phone, desktopRight, uiScale = 1) {
1546
+ return phone ? TOOLBAR.edge + scaled(TOOLBAR.buttonWidth, uiScale) + TOOLBAR.gap : desktopRight;
1547
+ }
1548
+ var DESKTOP_CLOSES = { guide: ["admin"], admin: ["guide"] };
1549
+ function panelsToClose(opened, registered, phone) {
1550
+ if (phone) return registered.filter((name) => name !== opened);
1551
+ const closes = DESKTOP_CLOSES[opened] ?? [];
1552
+ return registered.filter((name) => closes.includes(name));
1553
+ }
1554
+ var PanelRules = class {
1555
+ constructor(phone) {
1556
+ this.hides = /* @__PURE__ */ new Map();
1557
+ this.phone = phone;
1558
+ }
1559
+ /** Register (or replace) a panel; its hide runs when another panel opens and the rule says so */
1560
+ register(name, hide) {
1561
+ this.hides.set(name, hide);
1562
+ }
1563
+ /** A panel opened: close the ones the rule names. One failing hide does not stop the rest. */
1564
+ opened(name) {
1565
+ for (const other of panelsToClose(name, [...this.hides.keys()], this.phone())) {
1566
+ try {
1567
+ this.hides.get(other)?.();
1568
+ } catch {
1569
+ }
1570
+ }
1571
+ }
1572
+ get names() {
1573
+ return [...this.hides.keys()];
1574
+ }
1575
+ };
1576
+
1577
+ // src/ui/toolbar-button.ts
1578
+ function toolbarButton(slot, props, phone, uiScale = 1) {
1579
+ const width = Math.round(TOOLBAR.buttonWidth * uiScale);
1580
+ const height = Math.round(TOOLBAR.buttonHeight * uiScale);
1581
+ if (!phone) {
1582
+ return ReactEcs2.createElement(UiEntity2, {
1583
+ ...props,
1584
+ uiTransform: {
1585
+ positionType: "absolute",
1586
+ position: { right: rowRight(slot, uiScale), bottom: TOOLBAR.bottom },
1587
+ width,
1588
+ height,
1589
+ ...props.uiTransform
1590
+ }
1591
+ });
1592
+ }
1593
+ const place = columnSlot(slot, uiScale);
1594
+ return ReactEcs2.createElement(UiEntity2, {
1595
+ uiTransform: {
1596
+ positionType: "absolute",
1597
+ position: { right: place.right, top: 0 },
1598
+ width,
1599
+ height: "100%",
1600
+ flexDirection: "column",
1601
+ justifyContent: "center"
1602
+ },
1603
+ children: [
1604
+ ReactEcs2.createElement(UiEntity2, {
1605
+ uiTransform: { width, height: place.boxHeight, flexDirection: "column", flexShrink: 0 },
1606
+ children: [
1607
+ ReactEcs2.createElement(UiEntity2, { uiTransform: { width, height: place.above, flexShrink: 0 } }),
1608
+ ReactEcs2.createElement(UiEntity2, {
1609
+ ...props,
1610
+ uiTransform: { width, height, flexShrink: 0, ...props.uiTransform }
1611
+ })
1612
+ ]
1613
+ })
1614
+ ]
1615
+ });
1616
+ }
1617
+
1518
1618
  // src/ui/guide-ui.tsx
1519
1619
  function withLock(mapped, v, fallback) {
1520
1620
  if (v.locked !== true) return mapped;
@@ -1550,7 +1650,7 @@ var GuideUIModule = class {
1550
1650
  if (this.client.isVisitorBlocked) return null;
1551
1651
  const windowW = UI_DIMENSIONS.guide.width;
1552
1652
  const windowH = UI_DIMENSIONS.guide.height;
1553
- return ReactEcs2.createElement(UiEntity2, {
1653
+ return ReactEcs3.createElement(UiEntity3, {
1554
1654
  key: `guide-root-${this.client.uiScale}`,
1555
1655
  uiTransform: {
1556
1656
  width: "100%",
@@ -1562,13 +1662,14 @@ var GuideUIModule = class {
1562
1662
  this.renderToggleButton(),
1563
1663
  // Render panel when visible - Guide positioned relative to Chat's scaled width
1564
1664
  // Guide.right = Chat.right + Chat.scaledWidth + gap (10px)
1565
- this._isVisible ? ReactEcs2.createElement(UiEntity2, {
1665
+ this._isVisible ? ReactEcs3.createElement(UiEntity3, {
1566
1666
  key: `guide-panel-${this.client.uiScale}`,
1567
1667
  uiTransform: {
1568
1668
  width: windowW,
1569
1669
  height: windowH,
1570
1670
  positionType: "absolute",
1571
- position: { bottom: UI_DIMENSIONS.guide.bottom, right: UI_DIMENSIONS.chat.right + this.s(UI_DIMENSIONS.chat.width) + 10 },
1671
+ // On a phone, left of the toolbar's column (2.12.0); elsewhere left of the chat panel, as before
1672
+ position: { bottom: UI_DIMENSIONS.guide.bottom, right: this.client.panelRight(UI_DIMENSIONS.chat.right + this.s(UI_DIMENSIONS.chat.width) + 10) },
1572
1673
  flexDirection: "row",
1573
1674
  border: { top: 2, bottom: 2, left: 2, right: 2 },
1574
1675
  borderColor: THEME.colors.panelBorder
@@ -1600,7 +1701,7 @@ var GuideUIModule = class {
1600
1701
  */
1601
1702
  show() {
1602
1703
  if (this._isVisible) return;
1603
- this.client.closeOtherPanels("guide");
1704
+ this.client.panelOpened("guide");
1604
1705
  this._isVisible = true;
1605
1706
  this.fetchGuideData().catch(() => {
1606
1707
  });
@@ -1778,7 +1879,7 @@ var GuideUIModule = class {
1778
1879
  const nodesPlaylist = this.featuredPlaylists.find((p) => p.name === "NODES");
1779
1880
  const nodesCount = nodesPlaylist ? nodesPlaylist.videos.filter((v) => v.isCreator).length : 0;
1780
1881
  const displayedPlaylists = this.featuredPlaylists.filter((p) => p.name !== "NODES").slice(0, 6);
1781
- return ReactEcs2.createElement(UiEntity2, {
1882
+ return ReactEcs3.createElement(UiEntity3, {
1782
1883
  uiTransform: {
1783
1884
  width: sidebarW,
1784
1885
  minWidth: sidebarW,
@@ -1792,11 +1893,11 @@ var GuideUIModule = class {
1792
1893
  uiBackground: { color: Color43.create(0, 0, 0, 0.4) },
1793
1894
  children: [
1794
1895
  // Header & Search
1795
- ReactEcs2.createElement(UiEntity2, {
1896
+ ReactEcs3.createElement(UiEntity3, {
1796
1897
  uiTransform: { width: "100%", flexDirection: "column", padding: 10 },
1797
1898
  children: [
1798
1899
  // Title row
1799
- ReactEcs2.createElement(UiEntity2, {
1900
+ ReactEcs3.createElement(UiEntity3, {
1800
1901
  uiTransform: {
1801
1902
  width: "100%",
1802
1903
  height: this.s(40),
@@ -1806,7 +1907,7 @@ var GuideUIModule = class {
1806
1907
  },
1807
1908
  children: [
1808
1909
  // Title
1809
- ReactEcs2.createElement(UiEntity2, {
1910
+ ReactEcs3.createElement(UiEntity3, {
1810
1911
  uiText: {
1811
1912
  value: "THE STATIC TV",
1812
1913
  fontSize: this.s(UI_DIMENSIONS.guide.sidebar.headerSize),
@@ -1817,7 +1918,7 @@ var GuideUIModule = class {
1817
1918
  ]
1818
1919
  }),
1819
1920
  // Random Signal button
1820
- ReactEcs2.createElement(UiEntity2, {
1921
+ ReactEcs3.createElement(UiEntity3, {
1821
1922
  uiTransform: {
1822
1923
  width: "100%",
1823
1924
  height: this.s(40),
@@ -1835,13 +1936,13 @@ var GuideUIModule = class {
1835
1936
  }
1836
1937
  },
1837
1938
  children: [
1838
- ReactEcs2.createElement(UiEntity2, {
1939
+ ReactEcs3.createElement(UiEntity3, {
1839
1940
  uiText: { value: ">> RANDOM SIGNAL <<", fontSize: this.s(14), color: THEME.colors.cyan }
1840
1941
  })
1841
1942
  ]
1842
1943
  }),
1843
1944
  // Search input
1844
- ReactEcs2.createElement(Input2, {
1945
+ ReactEcs3.createElement(Input2, {
1845
1946
  placeholder: "SCAN FREQ...",
1846
1947
  fontSize: this.s(UI_DIMENSIONS.guide.sidebar.fontSize),
1847
1948
  uiTransform: {
@@ -1861,11 +1962,11 @@ var GuideUIModule = class {
1861
1962
  ]
1862
1963
  }),
1863
1964
  // Menu items
1864
- ReactEcs2.createElement(UiEntity2, {
1965
+ ReactEcs3.createElement(UiEntity3, {
1865
1966
  uiTransform: { flexGrow: 1, flexDirection: "column", width: "100%", padding: { top: 5 } },
1866
1967
  children: [
1867
1968
  // Section header
1868
- ReactEcs2.createElement(UiEntity2, {
1969
+ ReactEcs3.createElement(UiEntity3, {
1869
1970
  uiTransform: { padding: { left: 10, bottom: 8, top: 5 } },
1870
1971
  uiText: { value: "GLOBAL NETWORK", fontSize: this.s(12), color: THEME.colors.cyan }
1871
1972
  }),
@@ -1874,12 +1975,12 @@ var GuideUIModule = class {
1874
1975
  this.renderMenuButton("SIGNALS", signalCount, THEME.colors.white, void 0, "VODS & RECORDINGS"),
1875
1976
  this.renderMenuButton("NODES", nodesCount, THEME.colors.magenta, void 0, "CHANNELS & CREATORS"),
1876
1977
  // Divider
1877
- ReactEcs2.createElement(UiEntity2, {
1978
+ ReactEcs3.createElement(UiEntity3, {
1878
1979
  uiTransform: { height: 1, width: "90%", margin: { top: 12, bottom: 8, left: 5 } },
1879
1980
  uiBackground: { color: THEME.colors.panelBorder }
1880
1981
  }),
1881
1982
  // Archives section
1882
- ReactEcs2.createElement(UiEntity2, {
1983
+ ReactEcs3.createElement(UiEntity3, {
1883
1984
  uiTransform: { padding: { left: 10, bottom: 8 } },
1884
1985
  uiText: { value: "ARCHIVES", fontSize: this.s(12), color: THEME.colors.cyan }
1885
1986
  }),
@@ -1895,7 +1996,7 @@ var GuideUIModule = class {
1895
1996
  renderMenuButton(label, count, color, badge, subtitle) {
1896
1997
  const isActive = this.activeTab === label;
1897
1998
  const buttonHeight = this.s(UI_DIMENSIONS.guide.sidebar.buttonHeight);
1898
- return ReactEcs2.createElement(UiEntity2, {
1999
+ return ReactEcs3.createElement(UiEntity3, {
1899
2000
  key: label,
1900
2001
  uiTransform: {
1901
2002
  width: "100%",
@@ -1914,10 +2015,10 @@ var GuideUIModule = class {
1914
2015
  this.currentPage = 0;
1915
2016
  },
1916
2017
  children: [
1917
- ReactEcs2.createElement(UiEntity2, {
2018
+ ReactEcs3.createElement(UiEntity3, {
1918
2019
  uiTransform: { flexDirection: "column", alignItems: "flex-start", justifyContent: "center", gap: 0 },
1919
2020
  children: [
1920
- ReactEcs2.createElement(UiEntity2, {
2021
+ ReactEcs3.createElement(UiEntity3, {
1921
2022
  uiTransform: { height: this.s(18) },
1922
2023
  uiText: {
1923
2024
  value: `${label} [${count}]`,
@@ -1927,7 +2028,7 @@ var GuideUIModule = class {
1927
2028
  }
1928
2029
  }),
1929
2030
  ...subtitle ? [
1930
- ReactEcs2.createElement(UiEntity2, {
2031
+ ReactEcs3.createElement(UiEntity3, {
1931
2032
  key: "subtitle",
1932
2033
  uiTransform: { height: this.s(12), marginTop: -2 },
1933
2034
  uiText: {
@@ -1941,7 +2042,7 @@ var GuideUIModule = class {
1941
2042
  ]
1942
2043
  }),
1943
2044
  ...badge ? [
1944
- ReactEcs2.createElement(UiEntity2, {
2045
+ ReactEcs3.createElement(UiEntity3, {
1945
2046
  key: "badge",
1946
2047
  uiText: { value: badge, fontSize: this.s(UI_DIMENSIONS.guide.sidebar.fontSize), color: THEME.colors.red }
1947
2048
  })
@@ -1970,7 +2071,7 @@ var GuideUIModule = class {
1970
2071
  const start = this.currentPage * this.itemsPerPage;
1971
2072
  const paged = videosToShow.slice(start, start + this.itemsPerPage);
1972
2073
  const totalPages = Math.ceil(videosToShow.length / this.itemsPerPage);
1973
- return ReactEcs2.createElement(UiEntity2, {
2074
+ return ReactEcs3.createElement(UiEntity3, {
1974
2075
  uiTransform: {
1975
2076
  flexGrow: 1,
1976
2077
  flexDirection: "column",
@@ -1981,7 +2082,7 @@ var GuideUIModule = class {
1981
2082
  this.renderCardGrid(paged),
1982
2083
  // Pagination
1983
2084
  ...totalPages > 1 ? [
1984
- ReactEcs2.createElement(UiEntity2, {
2085
+ ReactEcs3.createElement(UiEntity3, {
1985
2086
  key: "pagination",
1986
2087
  uiTransform: {
1987
2088
  width: "100%",
@@ -1994,7 +2095,7 @@ var GuideUIModule = class {
1994
2095
  },
1995
2096
  children: [
1996
2097
  ...this.currentPage > 0 ? [
1997
- ReactEcs2.createElement(UiEntity2, {
2098
+ ReactEcs3.createElement(UiEntity3, {
1998
2099
  key: "prev",
1999
2100
  uiText: {
2000
2101
  value: "< PREV",
@@ -2004,7 +2105,7 @@ var GuideUIModule = class {
2004
2105
  onMouseDown: () => this.currentPage--
2005
2106
  })
2006
2107
  ] : [],
2007
- ReactEcs2.createElement(UiEntity2, {
2108
+ ReactEcs3.createElement(UiEntity3, {
2008
2109
  uiText: {
2009
2110
  value: `${this.currentPage + 1}/${totalPages}`,
2010
2111
  fontSize: this.s(UI_DIMENSIONS.guide.content.bodySize),
@@ -2012,7 +2113,7 @@ var GuideUIModule = class {
2012
2113
  }
2013
2114
  }),
2014
2115
  ...this.currentPage < totalPages - 1 ? [
2015
- ReactEcs2.createElement(UiEntity2, {
2116
+ ReactEcs3.createElement(UiEntity3, {
2016
2117
  key: "next",
2017
2118
  uiText: {
2018
2119
  value: "NEXT >",
@@ -2030,7 +2131,7 @@ var GuideUIModule = class {
2030
2131
  }
2031
2132
  renderCardGrid(videos) {
2032
2133
  if (videos.length === 0) {
2033
- return ReactEcs2.createElement(UiEntity2, {
2134
+ return ReactEcs3.createElement(UiEntity3, {
2034
2135
  uiTransform: { width: "100%", flexGrow: 1, justifyContent: "center", alignItems: "center" },
2035
2136
  uiText: { value: "NO SIGNAL", fontSize: this.s(UI_DIMENSIONS.guide.content.bodySize), color: THEME.colors.gray }
2036
2137
  });
@@ -2040,7 +2141,7 @@ var GuideUIModule = class {
2040
2141
  rows.push(videos.slice(i, i + 2));
2041
2142
  }
2042
2143
  const cardH = this.s(UI_DIMENSIONS.guide.content.cardHeight);
2043
- return ReactEcs2.createElement(UiEntity2, {
2144
+ return ReactEcs3.createElement(UiEntity3, {
2044
2145
  uiTransform: {
2045
2146
  width: "100%",
2046
2147
  flexGrow: 1,
@@ -2049,7 +2150,7 @@ var GuideUIModule = class {
2049
2150
  gap: 8
2050
2151
  },
2051
2152
  children: rows.map(
2052
- (row, rowIndex) => ReactEcs2.createElement(UiEntity2, {
2153
+ (row, rowIndex) => ReactEcs3.createElement(UiEntity3, {
2053
2154
  key: `row-${rowIndex}`,
2054
2155
  uiTransform: {
2055
2156
  width: "100%",
@@ -2076,7 +2177,7 @@ var GuideUIModule = class {
2076
2177
  } else if (isActive) {
2077
2178
  cardBgColor = Color43.create(0, 0.4, 0, 0.5);
2078
2179
  }
2079
- return ReactEcs2.createElement(UiEntity2, {
2180
+ return ReactEcs3.createElement(UiEntity3, {
2080
2181
  key: video.id,
2081
2182
  uiTransform: {
2082
2183
  width: cardW,
@@ -2091,7 +2192,7 @@ var GuideUIModule = class {
2091
2192
  uiBackground: { color: cardBgColor },
2092
2193
  children: [
2093
2194
  // Main click area
2094
- ReactEcs2.createElement(UiEntity2, {
2195
+ ReactEcs3.createElement(UiEntity3, {
2095
2196
  uiTransform: {
2096
2197
  width: "100%",
2097
2198
  height: "70%",
@@ -2101,7 +2202,7 @@ var GuideUIModule = class {
2101
2202
  },
2102
2203
  onMouseDown: () => this.handleVideoSelect(video),
2103
2204
  children: [
2104
- ReactEcs2.createElement(UiEntity2, {
2205
+ ReactEcs3.createElement(UiEntity3, {
2105
2206
  uiText: {
2106
2207
  value: truncateText(video.name || "Unknown", 22),
2107
2208
  fontSize: this.s(UI_DIMENSIONS.guide.content.headerSize),
@@ -2110,7 +2211,7 @@ var GuideUIModule = class {
2110
2211
  }),
2111
2212
  // Status indicator: OFFLINE > CONNECTING > PLAYING > LIVE
2112
2213
  ...isOffline ? [
2113
- ReactEcs2.createElement(UiEntity2, {
2214
+ ReactEcs3.createElement(UiEntity3, {
2114
2215
  key: "offline",
2115
2216
  uiText: {
2116
2217
  value: "OFFLINE",
@@ -2119,7 +2220,7 @@ var GuideUIModule = class {
2119
2220
  }
2120
2221
  })
2121
2222
  ] : isConnecting ? [
2122
- ReactEcs2.createElement(UiEntity2, {
2223
+ ReactEcs3.createElement(UiEntity3, {
2123
2224
  key: "connecting",
2124
2225
  uiText: {
2125
2226
  value: "CONNECTING...",
@@ -2128,7 +2229,7 @@ var GuideUIModule = class {
2128
2229
  }
2129
2230
  })
2130
2231
  ] : isActive ? [
2131
- ReactEcs2.createElement(UiEntity2, {
2232
+ ReactEcs3.createElement(UiEntity3, {
2132
2233
  key: "playing",
2133
2234
  uiText: {
2134
2235
  value: "PLAYING",
@@ -2137,18 +2238,18 @@ var GuideUIModule = class {
2137
2238
  }
2138
2239
  })
2139
2240
  ] : video.isLive ? [
2140
- ReactEcs2.createElement(UiEntity2, {
2241
+ ReactEcs3.createElement(UiEntity3, {
2141
2242
  key: "live",
2142
2243
  uiTransform: { padding: { left: 4, right: 4, top: 2, bottom: 2 }, marginTop: 4 },
2143
2244
  uiBackground: { color: THEME.colors.red },
2144
2245
  children: [
2145
- ReactEcs2.createElement(Label2, { value: "LIVE", fontSize: this.s(10), color: THEME.colors.white })
2246
+ ReactEcs3.createElement(Label2, { value: "LIVE", fontSize: this.s(10), color: THEME.colors.white })
2146
2247
  ]
2147
2248
  })
2148
2249
  ] : [],
2149
2250
  // A locked channel (2026-11-20): its badge, the words a refused pick shows - one line, 12px in the 260px card
2150
2251
  ...video.locked === true ? [
2151
- ReactEcs2.createElement(UiEntity2, {
2252
+ ReactEcs3.createElement(UiEntity3, {
2152
2253
  key: "locked",
2153
2254
  uiTransform: { height: this.s(16), marginTop: 4 },
2154
2255
  uiText: { value: LOCKED_LINE, fontSize: this.s(12), color: THEME.colors.yellow }
@@ -2157,7 +2258,7 @@ var GuideUIModule = class {
2157
2258
  ]
2158
2259
  }),
2159
2260
  // Channel link
2160
- ReactEcs2.createElement(UiEntity2, {
2261
+ ReactEcs3.createElement(UiEntity3, {
2161
2262
  uiTransform: {
2162
2263
  width: "100%",
2163
2264
  height: "30%",
@@ -2168,7 +2269,7 @@ var GuideUIModule = class {
2168
2269
  uiBackground: { color: Color43.create(0, 0, 0, 0.3) },
2169
2270
  onMouseDown: () => this.handleChannelClick(video),
2170
2271
  children: [
2171
- ReactEcs2.createElement(UiEntity2, {
2272
+ ReactEcs3.createElement(UiEntity3, {
2172
2273
  uiText: {
2173
2274
  value: "CHANNEL",
2174
2275
  fontSize: this.s(UI_DIMENSIONS.guide.content.bodySize),
@@ -2185,7 +2286,7 @@ var GuideUIModule = class {
2185
2286
  const buttonW = this.s(170);
2186
2287
  const buttonH = this.s(44);
2187
2288
  const bodyH = this.s(UI_DIMENSIONS.guide.content.bodySize * 1.5 * 2);
2188
- return ReactEcs2.createElement(UiEntity2, {
2289
+ return ReactEcs3.createElement(UiEntity3, {
2189
2290
  key: "age-choice",
2190
2291
  uiTransform: {
2191
2292
  positionType: "absolute",
@@ -2199,7 +2300,7 @@ var GuideUIModule = class {
2199
2300
  },
2200
2301
  uiBackground: { color: Color43.create(0, 0, 0, 0.85) },
2201
2302
  children: [
2202
- ReactEcs2.createElement(UiEntity2, {
2303
+ ReactEcs3.createElement(UiEntity3, {
2203
2304
  uiTransform: {
2204
2305
  width: this.s(480),
2205
2306
  flexDirection: "column",
@@ -2210,15 +2311,15 @@ var GuideUIModule = class {
2210
2311
  },
2211
2312
  uiBackground: { color: THEME.colors.panel },
2212
2313
  children: [
2213
- ReactEcs2.createElement(UiEntity2, {
2314
+ ReactEcs3.createElement(UiEntity3, {
2214
2315
  uiTransform: { marginBottom: this.s(8) },
2215
2316
  uiText: { value: "MATURE CONTENT", fontSize: this.s(24), color: THEME.colors.red }
2216
2317
  }),
2217
- ReactEcs2.createElement(UiEntity2, {
2318
+ ReactEcs3.createElement(UiEntity3, {
2218
2319
  uiTransform: { marginBottom: this.s(12) },
2219
2320
  uiText: { value: truncateText(video.name || "Unknown", 40), fontSize: this.s(16), color: THEME.colors.cyan }
2220
2321
  }),
2221
- ReactEcs2.createElement(UiEntity2, {
2322
+ ReactEcs3.createElement(UiEntity3, {
2222
2323
  uiTransform: { width: "100%", minHeight: bodyH, marginBottom: this.s(20) },
2223
2324
  uiText: {
2224
2325
  value: "This channel is for viewers aged 18 and older. Are you 18 or older?",
@@ -2228,21 +2329,21 @@ var GuideUIModule = class {
2228
2329
  textWrap: "wrap"
2229
2330
  }
2230
2331
  }),
2231
- ReactEcs2.createElement(UiEntity2, {
2332
+ ReactEcs3.createElement(UiEntity3, {
2232
2333
  uiTransform: { flexDirection: "row", justifyContent: "center", gap: this.s(16) },
2233
2334
  children: [
2234
- ReactEcs2.createElement(UiEntity2, {
2335
+ ReactEcs3.createElement(UiEntity3, {
2235
2336
  key: "age-yes",
2236
2337
  uiTransform: { width: buttonW, height: buttonH, justifyContent: "center", alignItems: "center" },
2237
2338
  uiBackground: { color: THEME.colors.red },
2238
2339
  onMouseDown: () => this.answerAge(true),
2239
2340
  children: [
2240
- ReactEcs2.createElement(UiEntity2, {
2341
+ ReactEcs3.createElement(UiEntity3, {
2241
2342
  uiText: { value: "YES, I AM 18+", fontSize: this.s(14), color: THEME.colors.white }
2242
2343
  })
2243
2344
  ]
2244
2345
  }),
2245
- ReactEcs2.createElement(UiEntity2, {
2346
+ ReactEcs3.createElement(UiEntity3, {
2246
2347
  key: "age-no",
2247
2348
  uiTransform: {
2248
2349
  width: buttonW,
@@ -2255,7 +2356,7 @@ var GuideUIModule = class {
2255
2356
  uiBackground: { color: THEME.colors.buttonBackground },
2256
2357
  onMouseDown: () => this.answerAge(false),
2257
2358
  children: [
2258
- ReactEcs2.createElement(UiEntity2, {
2359
+ ReactEcs3.createElement(UiEntity3, {
2259
2360
  uiText: { value: "NO", fontSize: this.s(14), color: THEME.colors.white }
2260
2361
  })
2261
2362
  ]
@@ -2269,7 +2370,7 @@ var GuideUIModule = class {
2269
2370
  }
2270
2371
  renderCloseButton() {
2271
2372
  const closeSize = this.s(UI_DIMENSIONS.closeButton.size);
2272
- return ReactEcs2.createElement(UiEntity2, {
2373
+ return ReactEcs3.createElement(UiEntity3, {
2273
2374
  uiTransform: {
2274
2375
  positionType: "absolute",
2275
2376
  position: { top: -5, right: -5 },
@@ -2281,7 +2382,7 @@ var GuideUIModule = class {
2281
2382
  uiBackground: { color: THEME.colors.panel },
2282
2383
  onMouseDown: () => this.hide(),
2283
2384
  children: [
2284
- ReactEcs2.createElement(UiEntity2, {
2385
+ ReactEcs3.createElement(UiEntity3, {
2285
2386
  uiText: { value: "X", fontSize: this.s(UI_DIMENSIONS.closeButton.fontSize), color: THEME.colors.red }
2286
2387
  })
2287
2388
  ]
@@ -2290,8 +2391,25 @@ var GuideUIModule = class {
2290
2391
  renderToggleButton() {
2291
2392
  const buttonText = this._isVisible ? "CLOSE" : "GUIDE";
2292
2393
  const buttonColor = this._isVisible ? Color43.create(0.2, 0.2, 0.28, 0.9) : Color43.create(0, 0.5, 0.5, 0.9);
2394
+ const label = ReactEcs3.createElement(UiEntity3, {
2395
+ uiText: {
2396
+ value: buttonText,
2397
+ fontSize: this.s(14),
2398
+ color: THEME.colors.white,
2399
+ textAlign: "middle-center"
2400
+ }
2401
+ });
2402
+ const press = () => this._isVisible ? this.hide() : this.show();
2403
+ if (this.client.isPhone) {
2404
+ return toolbarButton(1, {
2405
+ uiTransform: { justifyContent: "center", alignItems: "center" },
2406
+ uiBackground: { color: buttonColor },
2407
+ onMouseDown: press,
2408
+ children: [label]
2409
+ }, true, this.client.uiScale);
2410
+ }
2293
2411
  const buttonPos = 20 + this.s(100) + 10;
2294
- return ReactEcs2.createElement(UiEntity2, {
2412
+ return ReactEcs3.createElement(UiEntity3, {
2295
2413
  uiTransform: {
2296
2414
  positionType: "absolute",
2297
2415
  position: { right: buttonPos, bottom: 10 },
@@ -2301,23 +2419,14 @@ var GuideUIModule = class {
2301
2419
  alignItems: "center"
2302
2420
  },
2303
2421
  uiBackground: { color: buttonColor },
2304
- onMouseDown: () => this._isVisible ? this.hide() : this.show(),
2305
- children: [
2306
- ReactEcs2.createElement(UiEntity2, {
2307
- uiText: {
2308
- value: buttonText,
2309
- fontSize: this.s(14),
2310
- color: THEME.colors.white,
2311
- textAlign: "middle-center"
2312
- }
2313
- })
2314
- ]
2422
+ onMouseDown: press,
2423
+ children: [label]
2315
2424
  });
2316
2425
  }
2317
2426
  };
2318
2427
 
2319
2428
  // src/ui/chat-ui.tsx
2320
- import ReactEcs3, { UiEntity as UiEntity3, Label as Label3, Input as Input3, Button as Button2 } from "@dcl/sdk/react-ecs";
2429
+ import ReactEcs4, { UiEntity as UiEntity4, Label as Label3, Input as Input3, Button as Button2 } from "@dcl/sdk/react-ecs";
2321
2430
  import { Color4 as Color44 } from "@dcl/sdk/math";
2322
2431
  import { signedFetch as signedFetch3 } from "~system/SignedFetch";
2323
2432
  import { getPlayer } from "@dcl/sdk/players";
@@ -2368,7 +2477,7 @@ var ChatUIModule = class {
2368
2477
  if (this.client.isVisitorBlocked) return null;
2369
2478
  const scaledTheme = scaleChatTheme(DEFAULT_CHAT_THEME, this.client.uiScale);
2370
2479
  const positionStyle = this.getPositionStyle();
2371
- return ReactEcs3.createElement(UiEntity3, {
2480
+ return ReactEcs4.createElement(UiEntity4, {
2372
2481
  uiTransform: {
2373
2482
  width: "100%",
2374
2483
  height: "100%",
@@ -2379,13 +2488,14 @@ var ChatUIModule = class {
2379
2488
  this.renderToggleButton(),
2380
2489
  // Render panel when visible - scaled sizes, fixed position
2381
2490
  // Key includes uiScale to force re-render when scale changes from other panels
2382
- this._isVisible ? ReactEcs3.createElement(UiEntity3, {
2491
+ this._isVisible ? ReactEcs4.createElement(UiEntity4, {
2383
2492
  key: `chat-panel-${this.client.uiScale}`,
2384
2493
  uiTransform: {
2385
2494
  width: this.s(UI_DIMENSIONS.chat.width),
2386
2495
  height: this.s(UI_DIMENSIONS.chat.height),
2387
2496
  positionType: "absolute",
2388
- position: { bottom: UI_DIMENSIONS.chat.bottom, right: UI_DIMENSIONS.chat.right },
2497
+ // On a phone, left of the toolbar's column (2.12.0); elsewhere at the right edge, as before
2498
+ position: { bottom: UI_DIMENSIONS.chat.bottom, right: this.client.panelRight(UI_DIMENSIONS.chat.right) },
2389
2499
  flexDirection: "column",
2390
2500
  border: { top: 2, bottom: 2, left: 2, right: 2 },
2391
2501
  borderColor: THEME.colors.panelBorder
@@ -2395,7 +2505,7 @@ var ChatUIModule = class {
2395
2505
  this.renderHeader(),
2396
2506
  this.renderChannelButton(scaledTheme),
2397
2507
  this.renderMessagesArea(scaledTheme),
2398
- ReactEcs3.createElement(UiEntity3, {
2508
+ ReactEcs4.createElement(UiEntity4, {
2399
2509
  uiTransform: { width: "100%", height: 1, flexShrink: 0 },
2400
2510
  uiBackground: { color: THEME.colors.panelBorder }
2401
2511
  }),
@@ -2428,6 +2538,7 @@ var ChatUIModule = class {
2428
2538
  */
2429
2539
  show() {
2430
2540
  if (this._isVisible) return;
2541
+ this.client.panelOpened("chat");
2431
2542
  this._isVisible = true;
2432
2543
  this._unreadCount = 0;
2433
2544
  this.chatScrollOffset = 0;
@@ -2736,7 +2847,7 @@ var ChatUIModule = class {
2736
2847
  renderChannelButton(theme) {
2737
2848
  const currentChannel = this.channels.find((c) => c.id === this.currentChannelId);
2738
2849
  const displayName = currentChannel?.name || this.currentChannelId;
2739
- return ReactEcs3.createElement(UiEntity3, {
2850
+ return ReactEcs4.createElement(UiEntity4, {
2740
2851
  uiTransform: {
2741
2852
  height: 40,
2742
2853
  width: "100%",
@@ -2751,12 +2862,12 @@ var ChatUIModule = class {
2751
2862
  this.showChannelDropdown = !this.showChannelDropdown;
2752
2863
  },
2753
2864
  children: [
2754
- ReactEcs3.createElement(Label3, {
2865
+ ReactEcs4.createElement(Label3, {
2755
2866
  value: `// ${truncateText(displayName, 24)}`,
2756
2867
  fontSize: theme.channelButton,
2757
2868
  color: THEME.colors.white
2758
2869
  }),
2759
- ReactEcs3.createElement(Label3, {
2870
+ ReactEcs4.createElement(Label3, {
2760
2871
  value: this.showChannelDropdown ? "\u25B2" : "\u25BC",
2761
2872
  fontSize: 10,
2762
2873
  color: THEME.colors.cyan
@@ -2785,7 +2896,7 @@ var ChatUIModule = class {
2785
2896
  const visibleMessages = allMessages.slice(startIdx, endIdx);
2786
2897
  const canScrollUp = this.chatScrollOffset < maxOffset;
2787
2898
  const canScrollDown = this.chatScrollOffset > 0;
2788
- return ReactEcs3.createElement(UiEntity3, {
2899
+ return ReactEcs4.createElement(UiEntity4, {
2789
2900
  uiTransform: { flexGrow: 1, width: "100%", flexDirection: "row", overflow: "hidden" },
2790
2901
  children: [
2791
2902
  // Messages - anchored at the bottom, so the newest stays in view now that a row grows with its text
@@ -2793,7 +2904,7 @@ var ChatUIModule = class {
2793
2904
  // past it; now its oldest clips at the top, one scroll up away. The rows keep their height
2794
2905
  // (flexShrink 0 - the protocol's default of 1 squeezes them onto each other) in one column
2795
2906
  // (nowrap - the protocol documents wrap as its default).
2796
- ReactEcs3.createElement(UiEntity3, {
2907
+ ReactEcs4.createElement(UiEntity4, {
2797
2908
  uiTransform: {
2798
2909
  flexGrow: 1,
2799
2910
  flexDirection: "column",
@@ -2807,7 +2918,7 @@ var ChatUIModule = class {
2807
2918
  )
2808
2919
  }),
2809
2920
  // Scroll controls
2810
- ReactEcs3.createElement(UiEntity3, {
2921
+ ReactEcs4.createElement(UiEntity4, {
2811
2922
  uiTransform: {
2812
2923
  width: 28,
2813
2924
  height: "100%",
@@ -2817,22 +2928,22 @@ var ChatUIModule = class {
2817
2928
  gap: 8
2818
2929
  },
2819
2930
  children: [
2820
- ReactEcs3.createElement(UiEntity3, {
2931
+ ReactEcs4.createElement(UiEntity4, {
2821
2932
  uiTransform: { width: 26, height: 36, justifyContent: "center", alignItems: "center" },
2822
2933
  uiBackground: { color: canScrollUp ? THEME.colors.buttonBackground : Color44.create(0.1, 0.1, 0.1, 0.3) },
2823
2934
  onMouseDown: () => {
2824
2935
  if (canScrollUp) this.chatScrollOffset += 1;
2825
2936
  },
2826
2937
  children: [
2827
- ReactEcs3.createElement(UiEntity3, {
2938
+ ReactEcs4.createElement(UiEntity4, {
2828
2939
  uiText: { value: "\u25B2", fontSize: 14, color: canScrollUp ? THEME.colors.cyan : THEME.colors.gray }
2829
2940
  })
2830
2941
  ]
2831
2942
  }),
2832
- ReactEcs3.createElement(UiEntity3, {
2943
+ ReactEcs4.createElement(UiEntity4, {
2833
2944
  uiTransform: { width: 26, height: 24, justifyContent: "center", alignItems: "center" },
2834
2945
  children: [
2835
- ReactEcs3.createElement(UiEntity3, {
2946
+ ReactEcs4.createElement(UiEntity4, {
2836
2947
  uiText: {
2837
2948
  value: totalMessages > UI_DIMENSIONS.chat.messagesPerPage ? `${this.chatScrollOffset}` : "-",
2838
2949
  fontSize: 10,
@@ -2841,14 +2952,14 @@ var ChatUIModule = class {
2841
2952
  })
2842
2953
  ]
2843
2954
  }),
2844
- ReactEcs3.createElement(UiEntity3, {
2955
+ ReactEcs4.createElement(UiEntity4, {
2845
2956
  uiTransform: { width: 26, height: 36, justifyContent: "center", alignItems: "center" },
2846
2957
  uiBackground: { color: canScrollDown ? THEME.colors.buttonBackground : Color44.create(0.1, 0.1, 0.1, 0.3) },
2847
2958
  onMouseDown: () => {
2848
2959
  if (canScrollDown) this.chatScrollOffset -= 1;
2849
2960
  },
2850
2961
  children: [
2851
- ReactEcs3.createElement(UiEntity3, {
2962
+ ReactEcs4.createElement(UiEntity4, {
2852
2963
  uiText: { value: "\u25BC", fontSize: 14, color: canScrollDown ? THEME.colors.cyan : THEME.colors.gray }
2853
2964
  })
2854
2965
  ]
@@ -2859,7 +2970,7 @@ var ChatUIModule = class {
2859
2970
  });
2860
2971
  }
2861
2972
  renderSystemMessage(msg, theme) {
2862
- return ReactEcs3.createElement(UiEntity3, {
2973
+ return ReactEcs4.createElement(UiEntity4, {
2863
2974
  key: msg.id,
2864
2975
  uiTransform: { width: "100%", height: 24, marginBottom: 4, flexShrink: 0 },
2865
2976
  uiText: {
@@ -2879,12 +2990,12 @@ var ChatUIModule = class {
2879
2990
  if (displayName.toLowerCase().includes("admin")) accentColor = THEME.colors.magenta;
2880
2991
  else if (isCurrentUser) accentColor = THEME.colors.green;
2881
2992
  const textRoom = this.messageTextRoom(msg.text, theme.chatMessage);
2882
- return ReactEcs3.createElement(UiEntity3, {
2993
+ return ReactEcs4.createElement(UiEntity4, {
2883
2994
  key: msg.id,
2884
2995
  uiTransform: { width: "100%", flexDirection: "column", marginBottom: 16, flexShrink: 0 },
2885
2996
  children: [
2886
2997
  // Header row
2887
- ReactEcs3.createElement(UiEntity3, {
2998
+ ReactEcs4.createElement(UiEntity4, {
2888
2999
  uiTransform: {
2889
3000
  width: "100%",
2890
3001
  height: 24,
@@ -2894,23 +3005,23 @@ var ChatUIModule = class {
2894
3005
  marginBottom: 4
2895
3006
  },
2896
3007
  children: [
2897
- ReactEcs3.createElement(UiEntity3, {
3008
+ ReactEcs4.createElement(UiEntity4, {
2898
3009
  uiText: { value: displayName, fontSize: theme.chatUsername, color: accentColor, textAlign: "middle-left" }
2899
3010
  }),
2900
- ReactEcs3.createElement(UiEntity3, {
3011
+ ReactEcs4.createElement(UiEntity4, {
2901
3012
  uiText: { value: time, fontSize: theme.chatTimestamp, color: THEME.colors.gray, textAlign: "middle-right" }
2902
3013
  })
2903
3014
  ]
2904
3015
  }),
2905
3016
  // Message content
2906
- ReactEcs3.createElement(UiEntity3, {
3017
+ ReactEcs4.createElement(UiEntity4, {
2907
3018
  uiTransform: { width: "100%", flexDirection: "row", alignItems: "stretch", paddingLeft: 8 },
2908
3019
  children: [
2909
- ReactEcs3.createElement(UiEntity3, {
3020
+ ReactEcs4.createElement(UiEntity4, {
2910
3021
  uiTransform: { width: 3, minHeight: textRoom },
2911
3022
  uiBackground: { color: accentColor }
2912
3023
  }),
2913
- ReactEcs3.createElement(UiEntity3, {
3024
+ ReactEcs4.createElement(UiEntity4, {
2914
3025
  uiTransform: { flexGrow: 1, minHeight: textRoom, paddingLeft: 12, paddingTop: 4, paddingBottom: 4 },
2915
3026
  uiText: {
2916
3027
  value: msg.text,
@@ -2926,7 +3037,7 @@ var ChatUIModule = class {
2926
3037
  });
2927
3038
  }
2928
3039
  renderUserInfoBar(theme) {
2929
- return ReactEcs3.createElement(UiEntity3, {
3040
+ return ReactEcs4.createElement(UiEntity4, {
2930
3041
  uiTransform: {
2931
3042
  width: "100%",
2932
3043
  height: 34,
@@ -2938,12 +3049,12 @@ var ChatUIModule = class {
2938
3049
  },
2939
3050
  uiBackground: { color: Color44.create(0.03, 0.03, 0.05, 1) },
2940
3051
  children: [
2941
- ReactEcs3.createElement(Label3, {
3052
+ ReactEcs4.createElement(Label3, {
2942
3053
  value: `// ${this.currentUsername || "Guest"}`,
2943
3054
  fontSize: theme.userInfo,
2944
3055
  color: THEME.colors.yellow
2945
3056
  }),
2946
- ReactEcs3.createElement(Label3, {
3057
+ ReactEcs4.createElement(Label3, {
2947
3058
  value: this.isRegisteredUser ? "\u25CF CITIZEN" : "\u25CB GUEST",
2948
3059
  fontSize: theme.authStatus,
2949
3060
  color: this.isRegisteredUser ? THEME.colors.green : THEME.colors.gray
@@ -2954,7 +3065,7 @@ var ChatUIModule = class {
2954
3065
  renderInputArea(theme) {
2955
3066
  const baseUrl = this.getBaseUrl();
2956
3067
  if (!this.isRegisteredUser) {
2957
- return ReactEcs3.createElement(UiEntity3, {
3068
+ return ReactEcs4.createElement(UiEntity4, {
2958
3069
  uiTransform: {
2959
3070
  height: 75,
2960
3071
  minHeight: 75,
@@ -2968,14 +3079,14 @@ var ChatUIModule = class {
2968
3079
  },
2969
3080
  uiBackground: { color: Color44.create(0.08, 0.08, 0.1, 1) },
2970
3081
  children: [
2971
- ReactEcs3.createElement(Label3, {
3082
+ ReactEcs4.createElement(Label3, {
2972
3083
  value: "ACCESS RESTRICTED: CITIZENS ONLY",
2973
3084
  fontSize: 12,
2974
3085
  color: THEME.colors.red,
2975
3086
  textAlign: "middle-center",
2976
3087
  uiTransform: { marginBottom: 5 }
2977
3088
  }),
2978
- ReactEcs3.createElement(Button2, {
3089
+ ReactEcs4.createElement(Button2, {
2979
3090
  value: "REGISTER IDENTITY",
2980
3091
  fontSize: 14,
2981
3092
  uiTransform: { width: 200, height: 30 },
@@ -2988,7 +3099,7 @@ var ChatUIModule = class {
2988
3099
  ]
2989
3100
  });
2990
3101
  }
2991
- return ReactEcs3.createElement(UiEntity3, {
3102
+ return ReactEcs4.createElement(UiEntity4, {
2992
3103
  uiTransform: {
2993
3104
  height: 75,
2994
3105
  minHeight: 75,
@@ -3000,7 +3111,7 @@ var ChatUIModule = class {
3000
3111
  },
3001
3112
  uiBackground: { color: Color44.create(0.08, 0.08, 0.1, 1) },
3002
3113
  children: [
3003
- ReactEcs3.createElement(Input3, {
3114
+ ReactEcs4.createElement(Input3, {
3004
3115
  onChange: (v) => {
3005
3116
  this.inputText = v;
3006
3117
  },
@@ -3013,7 +3124,7 @@ var ChatUIModule = class {
3013
3124
  uiBackground: { color: Color44.create(0.12, 0.12, 0.14, 1) },
3014
3125
  uiTransform: { flexGrow: 1, height: "100%", margin: { right: 10 } }
3015
3126
  }),
3016
- ReactEcs3.createElement(Button2, {
3127
+ ReactEcs4.createElement(Button2, {
3017
3128
  value: this.isSigningIn ? "..." : "SEND",
3018
3129
  onMouseDown: () => this.handleSend(),
3019
3130
  uiTransform: { width: 80, height: "100%" },
@@ -3030,7 +3141,7 @@ var ChatUIModule = class {
3030
3141
  const endIdx = startIdx + UI_DIMENSIONS.chat.channelsPerPage;
3031
3142
  const visibleChannels = this.channels.slice(startIdx, endIdx);
3032
3143
  const totalPages = Math.ceil(this.channels.length / UI_DIMENSIONS.chat.channelsPerPage);
3033
- return ReactEcs3.createElement(UiEntity3, {
3144
+ return ReactEcs4.createElement(UiEntity4, {
3034
3145
  uiTransform: {
3035
3146
  width: "100%",
3036
3147
  height: 260,
@@ -3041,13 +3152,13 @@ var ChatUIModule = class {
3041
3152
  uiBackground: { color: Color44.create(0.08, 0.1, 0.14, 1) },
3042
3153
  children: [
3043
3154
  // Top border
3044
- ReactEcs3.createElement(UiEntity3, {
3155
+ ReactEcs4.createElement(UiEntity4, {
3045
3156
  uiTransform: { width: "100%", height: 2, flexShrink: 0 },
3046
3157
  uiBackground: { color: THEME.colors.cyan }
3047
3158
  }),
3048
3159
  // Channel list
3049
3160
  ...visibleChannels.map(
3050
- (channel) => ReactEcs3.createElement(UiEntity3, {
3161
+ (channel) => ReactEcs4.createElement(UiEntity4, {
3051
3162
  key: channel.id,
3052
3163
  uiTransform: {
3053
3164
  height: 38,
@@ -3060,7 +3171,7 @@ var ChatUIModule = class {
3060
3171
  },
3061
3172
  onMouseDown: () => this.switchChannel(channel.id),
3062
3173
  children: [
3063
- ReactEcs3.createElement(Label3, {
3174
+ ReactEcs4.createElement(Label3, {
3064
3175
  value: channel.id === this.currentChannelId ? `\u25B8 ${channel.name}` : channel.name,
3065
3176
  fontSize: theme.channelDropdown,
3066
3177
  color: channel.id === this.currentChannelId ? THEME.colors.cyan : THEME.colors.gray
@@ -3070,7 +3181,7 @@ var ChatUIModule = class {
3070
3181
  ),
3071
3182
  // Pagination
3072
3183
  ...totalPages > 1 ? [
3073
- ReactEcs3.createElement(UiEntity3, {
3184
+ ReactEcs4.createElement(UiEntity4, {
3074
3185
  key: "pagination",
3075
3186
  uiTransform: {
3076
3187
  width: "100%",
@@ -3083,11 +3194,11 @@ var ChatUIModule = class {
3083
3194
  },
3084
3195
  children: [
3085
3196
  ...this.channelPage > 0 ? [
3086
- ReactEcs3.createElement(UiEntity3, {
3197
+ ReactEcs4.createElement(UiEntity4, {
3087
3198
  key: "prev",
3088
3199
  onMouseDown: () => this.channelPage--,
3089
3200
  children: [
3090
- ReactEcs3.createElement(Label3, {
3201
+ ReactEcs4.createElement(Label3, {
3091
3202
  value: "<< PREV",
3092
3203
  fontSize: 10,
3093
3204
  color: THEME.colors.cyan
@@ -3095,17 +3206,17 @@ var ChatUIModule = class {
3095
3206
  ]
3096
3207
  })
3097
3208
  ] : [],
3098
- ReactEcs3.createElement(Label3, {
3209
+ ReactEcs4.createElement(Label3, {
3099
3210
  value: `${this.channelPage + 1}/${totalPages}`,
3100
3211
  fontSize: 10,
3101
3212
  color: THEME.colors.gray
3102
3213
  }),
3103
3214
  ...this.channelPage < totalPages - 1 ? [
3104
- ReactEcs3.createElement(UiEntity3, {
3215
+ ReactEcs4.createElement(UiEntity4, {
3105
3216
  key: "next",
3106
3217
  onMouseDown: () => this.channelPage++,
3107
3218
  children: [
3108
- ReactEcs3.createElement(Label3, {
3219
+ ReactEcs4.createElement(Label3, {
3109
3220
  value: "NEXT >>",
3110
3221
  fontSize: 10,
3111
3222
  color: THEME.colors.cyan
@@ -3117,7 +3228,7 @@ var ChatUIModule = class {
3117
3228
  })
3118
3229
  ] : [],
3119
3230
  // Bottom border
3120
- ReactEcs3.createElement(UiEntity3, {
3231
+ ReactEcs4.createElement(UiEntity4, {
3121
3232
  uiTransform: { width: "100%", height: 1, flexShrink: 0 },
3122
3233
  uiBackground: { color: THEME.colors.panelBorder }
3123
3234
  })
@@ -3128,7 +3239,24 @@ var ChatUIModule = class {
3128
3239
  const unreadBadge = this._unreadCount > 0 ? ` (${this._unreadCount})` : "";
3129
3240
  const buttonText = this._isVisible ? "CLOSE" : `CHAT${unreadBadge}`;
3130
3241
  const buttonColor = this._isVisible ? Color44.create(0.2, 0.2, 0.28, 0.9) : Color44.create(0.6, 0, 0.5, 0.9);
3131
- return ReactEcs3.createElement(UiEntity3, {
3242
+ const label = ReactEcs4.createElement(UiEntity4, {
3243
+ uiText: {
3244
+ value: buttonText,
3245
+ fontSize: this.s(14),
3246
+ color: THEME.colors.white,
3247
+ textAlign: "middle-center"
3248
+ }
3249
+ });
3250
+ const press = () => this._isVisible ? this.hide() : this.show();
3251
+ if (this.client.isPhone) {
3252
+ return toolbarButton(0, {
3253
+ uiTransform: { justifyContent: "center", alignItems: "center" },
3254
+ uiBackground: { color: buttonColor },
3255
+ onMouseDown: press,
3256
+ children: [label]
3257
+ }, true, this.client.uiScale);
3258
+ }
3259
+ return ReactEcs4.createElement(UiEntity4, {
3132
3260
  uiTransform: {
3133
3261
  positionType: "absolute",
3134
3262
  position: { right: 20, bottom: 10 },
@@ -3138,29 +3266,20 @@ var ChatUIModule = class {
3138
3266
  alignItems: "center"
3139
3267
  },
3140
3268
  uiBackground: { color: buttonColor },
3141
- onMouseDown: () => this._isVisible ? this.hide() : this.show(),
3142
- children: [
3143
- ReactEcs3.createElement(UiEntity3, {
3144
- uiText: {
3145
- value: buttonText,
3146
- fontSize: this.s(14),
3147
- color: THEME.colors.white,
3148
- textAlign: "middle-center"
3149
- }
3150
- })
3151
- ]
3269
+ onMouseDown: press,
3270
+ children: [label]
3152
3271
  });
3153
3272
  }
3154
3273
  };
3155
3274
 
3156
3275
  // src/ui/admin-panel-ui.tsx
3157
- import ReactEcs6, { UiEntity as UiEntity6, Button as Button4, Label as Label6, Input as Input4 } from "@dcl/sdk/react-ecs";
3276
+ import ReactEcs7, { UiEntity as UiEntity7, Button as Button4, Label as Label6, Input as Input4 } from "@dcl/sdk/react-ecs";
3158
3277
  import { Color4 as Color46 } from "@dcl/sdk/math";
3159
3278
  import { getPlayer as getPlayer2 } from "@dcl/sdk/players";
3160
3279
  import { openExternalUrl as openExternalUrl5 } from "~system/RestrictedActions";
3161
3280
 
3162
3281
  // src/ui/ui-renderer.tsx
3163
- import ReactEcs4, { ReactEcsRenderer, UiEntity as UiEntity4, Label as Label4 } from "@dcl/sdk/react-ecs";
3282
+ import ReactEcs5, { ReactEcsRenderer, UiEntity as UiEntity5, Label as Label4 } from "@dcl/sdk/react-ecs";
3164
3283
  import { engine as engine3 } from "@dcl/sdk/ecs";
3165
3284
  var notificationText = "";
3166
3285
  var notificationVisible = false;
@@ -3193,8 +3312,8 @@ function NotificationBanner() {
3193
3312
  if (!notificationVisible) return null;
3194
3313
  return (
3195
3314
  // Full-width container to center the notification
3196
- /* @__PURE__ */ ReactEcs4.createElement(
3197
- UiEntity4,
3315
+ /* @__PURE__ */ ReactEcs5.createElement(
3316
+ UiEntity5,
3198
3317
  {
3199
3318
  uiTransform: {
3200
3319
  positionType: "absolute",
@@ -3204,8 +3323,8 @@ function NotificationBanner() {
3204
3323
  alignItems: "center"
3205
3324
  }
3206
3325
  },
3207
- /* @__PURE__ */ ReactEcs4.createElement(
3208
- UiEntity4,
3326
+ /* @__PURE__ */ ReactEcs5.createElement(
3327
+ UiEntity5,
3209
3328
  {
3210
3329
  uiTransform: {
3211
3330
  width: N.width,
@@ -3215,8 +3334,8 @@ function NotificationBanner() {
3215
3334
  },
3216
3335
  uiBackground: { color: C.panel }
3217
3336
  },
3218
- /* @__PURE__ */ ReactEcs4.createElement(
3219
- UiEntity4,
3337
+ /* @__PURE__ */ ReactEcs5.createElement(
3338
+ UiEntity5,
3220
3339
  {
3221
3340
  uiTransform: {
3222
3341
  width: N.borderWidth,
@@ -3225,8 +3344,8 @@ function NotificationBanner() {
3225
3344
  uiBackground: { color: C.cyan }
3226
3345
  }
3227
3346
  ),
3228
- /* @__PURE__ */ ReactEcs4.createElement(
3229
- UiEntity4,
3347
+ /* @__PURE__ */ ReactEcs5.createElement(
3348
+ UiEntity5,
3230
3349
  {
3231
3350
  uiTransform: {
3232
3351
  flexGrow: 1,
@@ -3236,7 +3355,7 @@ function NotificationBanner() {
3236
3355
  alignItems: "flex-start"
3237
3356
  }
3238
3357
  },
3239
- /* @__PURE__ */ ReactEcs4.createElement(
3358
+ /* @__PURE__ */ ReactEcs5.createElement(
3240
3359
  Label4,
3241
3360
  {
3242
3361
  value: notificationText,
@@ -3246,8 +3365,8 @@ function NotificationBanner() {
3246
3365
  }
3247
3366
  )
3248
3367
  ),
3249
- /* @__PURE__ */ ReactEcs4.createElement(
3250
- UiEntity4,
3368
+ /* @__PURE__ */ ReactEcs5.createElement(
3369
+ UiEntity5,
3251
3370
  {
3252
3371
  uiTransform: {
3253
3372
  width: 5,
@@ -3269,8 +3388,8 @@ function createStaticUI(client) {
3269
3388
  const guideComponent = client.guideUI?.getComponent() ?? null;
3270
3389
  const chatComponent = client.chatUI?.getComponent() ?? null;
3271
3390
  const adminComponent = client.adminPanel?.getComponent() ?? null;
3272
- return /* @__PURE__ */ ReactEcs4.createElement(
3273
- UiEntity4,
3391
+ return /* @__PURE__ */ ReactEcs5.createElement(
3392
+ UiEntity5,
3274
3393
  {
3275
3394
  key: `static-ui-root-${currentScale}`,
3276
3395
  uiTransform: {
@@ -3281,7 +3400,7 @@ function createStaticUI(client) {
3281
3400
  alignItems: "center"
3282
3401
  }
3283
3402
  },
3284
- blocked ? null : /* @__PURE__ */ ReactEcs4.createElement(NotificationBanner, null),
3403
+ blocked ? null : /* @__PURE__ */ ReactEcs5.createElement(NotificationBanner, null),
3285
3404
  guideComponent,
3286
3405
  chatComponent,
3287
3406
  adminComponent
@@ -3294,7 +3413,7 @@ function setupStaticUI(client) {
3294
3413
  }
3295
3414
 
3296
3415
  // src/ui/blocked-notice.tsx
3297
- import ReactEcs5, { UiEntity as UiEntity5, Label as Label5, Button as Button3 } from "@dcl/sdk/react-ecs";
3416
+ import ReactEcs6, { UiEntity as UiEntity6, Label as Label5, Button as Button3 } from "@dcl/sdk/react-ecs";
3298
3417
  import { Color4 as Color45 } from "@dcl/sdk/math";
3299
3418
  import { openExternalUrl as openExternalUrl4 } from "~system/RestrictedActions";
3300
3419
  var DEFAULT_SITE_URL = "https://thestatic.tv";
@@ -3321,8 +3440,8 @@ function BlockedNotice(props) {
3321
3440
  const s = (v) => Math.round(v * props.scale);
3322
3441
  const [title, ...body] = lines;
3323
3442
  const action = blockedNoticeAction(props.standing, props.siteUrl || DEFAULT_SITE_URL);
3324
- return /* @__PURE__ */ ReactEcs5.createElement(
3325
- UiEntity5,
3443
+ return /* @__PURE__ */ ReactEcs6.createElement(
3444
+ UiEntity6,
3326
3445
  {
3327
3446
  uiTransform: {
3328
3447
  width: "100%",
@@ -3332,15 +3451,15 @@ function BlockedNotice(props) {
3332
3451
  alignItems: "center"
3333
3452
  }
3334
3453
  },
3335
- /* @__PURE__ */ ReactEcs5.createElement(
3336
- UiEntity5,
3454
+ /* @__PURE__ */ ReactEcs6.createElement(
3455
+ UiEntity6,
3337
3456
  {
3338
3457
  uiTransform: { width: s(460), flexDirection: "column", alignItems: "center", padding: s(20) },
3339
3458
  uiBackground: { color: Color45.create(0.05, 0.05, 0.08, 0.95) }
3340
3459
  },
3341
- /* @__PURE__ */ ReactEcs5.createElement(Label5, { value: title, fontSize: s(22), color: Color45.create(0.9, 0.2, 0.2, 1), uiTransform: { height: s(34) } }),
3342
- body.map((line, i) => /* @__PURE__ */ ReactEcs5.createElement(Label5, { key: `blocked-line-${i}`, value: line, fontSize: s(16), color: Color45.White(), uiTransform: { height: s(26) } })),
3343
- action && /* @__PURE__ */ ReactEcs5.createElement(
3460
+ /* @__PURE__ */ ReactEcs6.createElement(Label5, { value: title, fontSize: s(22), color: Color45.create(0.9, 0.2, 0.2, 1), uiTransform: { height: s(34) } }),
3461
+ body.map((line, i) => /* @__PURE__ */ ReactEcs6.createElement(Label5, { key: `blocked-line-${i}`, value: line, fontSize: s(16), color: Color45.White(), uiTransform: { height: s(26) } })),
3462
+ action && /* @__PURE__ */ ReactEcs6.createElement(
3344
3463
  Button3,
3345
3464
  {
3346
3465
  uiTransform: { width: s(220), height: s(36), margin: { top: s(12) } },
@@ -3831,15 +3950,15 @@ var AdminPanelUIModule = class {
3831
3950
  this.privateStatus = line;
3832
3951
  } };
3833
3952
  // --- UI Components ---
3834
- this.SectionHead = ({ label, color }) => /* @__PURE__ */ ReactEcs6.createElement(
3835
- UiEntity6,
3953
+ this.SectionHead = ({ label, color }) => /* @__PURE__ */ ReactEcs7.createElement(
3954
+ UiEntity7,
3836
3955
  {
3837
3956
  uiTransform: { width: "100%", height: this.s(UI_DIMENSIONS.admin.sectionHeadHeight), margin: { bottom: 8 }, padding: { left: 10 }, alignItems: "center" },
3838
3957
  uiBackground: { color: Color46.create(color.r * 0.3, color.g * 0.3, color.b * 0.3, 0.5) }
3839
3958
  },
3840
- /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: label, fontSize: this.theme.sectionHead, color })
3959
+ /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: label, fontSize: this.theme.sectionHead, color })
3841
3960
  );
3842
- this.TabBtn = ({ label, tab }) => /* @__PURE__ */ ReactEcs6.createElement(
3961
+ this.TabBtn = ({ label, tab }) => /* @__PURE__ */ ReactEcs7.createElement(
3843
3962
  Button4,
3844
3963
  {
3845
3964
  uiTransform: { flexGrow: 1, height: this.s(UI_DIMENSIONS.admin.tabHeight), justifyContent: "center", alignItems: "center" },
@@ -3858,7 +3977,7 @@ var AdminPanelUIModule = class {
3858
3977
  */
3859
3978
  this.ControlsTab = () => {
3860
3979
  const t = this.theme;
3861
- return /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "column", width: "100%", padding: 10 } }, this.controls.map((control) => /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { key: `control-${control.id}`, uiTransform: { flexDirection: "column", margin: { bottom: 14 } } }, /* @__PURE__ */ ReactEcs6.createElement(this.SectionHead, { label: control.label, color: C2.cyan }), /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "row", flexWrap: "wrap" } }, control.options.map((option) => this.controlButton(control, option.id, option.label)), control.off === true && this.controlButton(control, "off", "OFF")))), this.controlStatus && /* @__PURE__ */ ReactEcs6.createElement(
3980
+ return /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "column", width: "100%", padding: 10 } }, this.controls.map((control) => /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { key: `control-${control.id}`, uiTransform: { flexDirection: "column", margin: { bottom: 14 } } }, /* @__PURE__ */ ReactEcs7.createElement(this.SectionHead, { label: control.label, color: C2.cyan }), /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "row", flexWrap: "wrap" } }, control.options.map((option) => this.controlButton(control, option.id, option.label)), control.off === true && this.controlButton(control, "off", "OFF")))), this.controlStatus && /* @__PURE__ */ ReactEcs7.createElement(
3862
3981
  Label6,
3863
3982
  {
3864
3983
  value: this.controlStatus,
@@ -3873,7 +3992,7 @@ var AdminPanelUIModule = class {
3873
3992
  this.fetchStreamData();
3874
3993
  }
3875
3994
  const t = this.theme;
3876
- return /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "column", width: "100%", padding: 10 } }, !this.streamData?.hasChannel && /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "column", margin: { bottom: 14 } } }, /* @__PURE__ */ ReactEcs6.createElement(this.SectionHead, { label: "LIVE STREAM", color: C2.btn }), /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: "No streaming channel linked", fontSize: t.labelSmall, color: C2.textDim, uiTransform: { margin: { bottom: 8 } } }), this.isOwner && /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "column" } }, this.streamData?.trialAvailable && /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "column", margin: { bottom: 10 } } }, /* @__PURE__ */ ReactEcs6.createElement(
3995
+ return /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "column", width: "100%", padding: 10 } }, !this.streamData?.hasChannel && /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "column", margin: { bottom: 14 } } }, /* @__PURE__ */ ReactEcs7.createElement(this.SectionHead, { label: "LIVE STREAM", color: C2.btn }), /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: "No streaming channel linked", fontSize: t.labelSmall, color: C2.textDim, uiTransform: { margin: { bottom: 8 } } }), this.isOwner && /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "column" } }, this.streamData?.trialAvailable && /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "column", margin: { bottom: 10 } } }, /* @__PURE__ */ ReactEcs7.createElement(
3877
3996
  Button4,
3878
3997
  {
3879
3998
  uiTransform: { width: this.s(200), height: this.s(UI_DIMENSIONS.admin.buttonHeight), margin: { bottom: 6 } },
@@ -3883,7 +4002,7 @@ var AdminPanelUIModule = class {
3883
4002
  color: C2.text,
3884
4003
  onMouseDown: () => this.claimTrial()
3885
4004
  }
3886
- ), this.trialClaimError && /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: this.trialClaimError, fontSize: t.status, color: C2.red }), /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: trialNoteText(this.streamData?.trialSparks), fontSize: t.labelSmall, color: C2.textDim, uiTransform: { margin: { top: 4 } } })), !this.streamData?.trialAvailable && /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "column" } }, /* @__PURE__ */ ReactEcs6.createElement(
4005
+ ), this.trialClaimError && /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: this.trialClaimError, fontSize: t.status, color: C2.red }), /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: trialNoteText(this.streamData?.trialSparks), fontSize: t.labelSmall, color: C2.textDim, uiTransform: { margin: { top: 4 } } })), !this.streamData?.trialAvailable && /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "column" } }, /* @__PURE__ */ ReactEcs7.createElement(
3887
4006
  Button4,
3888
4007
  {
3889
4008
  uiTransform: { width: this.s(170), height: this.s(UI_DIMENSIONS.admin.buttonHeight), margin: { bottom: 6 } },
@@ -3893,14 +4012,14 @@ var AdminPanelUIModule = class {
3893
4012
  color: C2.text,
3894
4013
  onMouseDown: () => this.createChannel()
3895
4014
  }
3896
- ), this.channelCreateError && /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: this.channelCreateError, fontSize: t.status, color: C2.red }), /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: "Relay tier \u2022 $25/mo \u2022 8 hours streaming", fontSize: t.labelSmall, color: C2.textDim, uiTransform: { margin: { top: 4 } } })))), this.streamData?.hasChannel && this.isOwner && /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "column", margin: { bottom: 14 } } }, /* @__PURE__ */ ReactEcs6.createElement(this.SectionHead, { label: this.streamData.isLive ? "LIVE STREAM" : "STREAM SETTINGS", color: this.streamData.isLive ? C2.red : C2.yellow }), /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "row", alignItems: "center", margin: { bottom: 8 } } }, /* @__PURE__ */ ReactEcs6.createElement(
4015
+ ), this.channelCreateError && /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: this.channelCreateError, fontSize: t.status, color: C2.red }), /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: "Relay tier \u2022 $25/mo \u2022 8 hours streaming", fontSize: t.labelSmall, color: C2.textDim, uiTransform: { margin: { top: 4 } } })))), this.streamData?.hasChannel && this.isOwner && /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "column", margin: { bottom: 14 } } }, /* @__PURE__ */ ReactEcs7.createElement(this.SectionHead, { label: this.streamData.isLive ? "LIVE STREAM" : "STREAM SETTINGS", color: this.streamData.isLive ? C2.red : C2.yellow }), /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "row", alignItems: "center", margin: { bottom: 8 } } }, /* @__PURE__ */ ReactEcs7.createElement(
3897
4016
  Label6,
3898
4017
  {
3899
4018
  value: this.streamData.isLive ? `LIVE \u2022 ${this.streamData.currentViewers || 0} viewers` : "OFFLINE",
3900
4019
  fontSize: t.label,
3901
4020
  color: this.streamData.isLive ? C2.red : C2.textDim
3902
4021
  }
3903
- ), /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: ` \u2022 ${this.streamData.tier?.toUpperCase() || "RELAY"}`, fontSize: t.labelSmall, color: C2.cyan }), /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: ` \u2022 ${this.streamData.sparksBalance || 0} Sparks`, fontSize: t.labelSmall, color: C2.textDim })), /* @__PURE__ */ ReactEcs6.createElement(
4022
+ ), /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: ` \u2022 ${this.streamData.tier?.toUpperCase() || "RELAY"}`, fontSize: t.labelSmall, color: C2.cyan }), /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: ` \u2022 ${this.streamData.sparksBalance || 0} Sparks`, fontSize: t.labelSmall, color: C2.textDim })), /* @__PURE__ */ ReactEcs7.createElement(
3904
4023
  Label6,
3905
4024
  {
3906
4025
  value: `Channel: ${this.streamData.channelName || this.streamData.channelId}`,
@@ -3908,7 +4027,7 @@ var AdminPanelUIModule = class {
3908
4027
  color: C2.textDim,
3909
4028
  uiTransform: { margin: { bottom: 10 } }
3910
4029
  }
3911
- ), /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "column", margin: { bottom: 6 } } }, /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: "RTMP Server:", fontSize: t.labelSmall, color: C2.textDim }), /* @__PURE__ */ ReactEcs6.createElement(
4030
+ ), /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "column", margin: { bottom: 6 } } }, /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: "RTMP Server:", fontSize: t.labelSmall, color: C2.textDim }), /* @__PURE__ */ ReactEcs7.createElement(
3912
4031
  Label6,
3913
4032
  {
3914
4033
  value: this.streamData.rtmpUrl || "Loading...",
@@ -3916,7 +4035,7 @@ var AdminPanelUIModule = class {
3916
4035
  color: this.streamData.rtmpUrl ? C2.text : C2.textDim,
3917
4036
  uiTransform: { margin: { left: 6 } }
3918
4037
  }
3919
- )), /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "column", margin: { bottom: 6 } } }, /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: "Stream Key:", fontSize: t.labelSmall, color: C2.textDim }), /* @__PURE__ */ ReactEcs6.createElement(
4038
+ )), /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "column", margin: { bottom: 6 } } }, /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: "Stream Key:", fontSize: t.labelSmall, color: C2.textDim }), /* @__PURE__ */ ReactEcs7.createElement(
3920
4039
  Label6,
3921
4040
  {
3922
4041
  value: this.streamData.streamKey || "Loading...",
@@ -3924,7 +4043,7 @@ var AdminPanelUIModule = class {
3924
4043
  color: this.streamData.streamKey ? C2.cyan : C2.textDim,
3925
4044
  uiTransform: { margin: { left: 6 } }
3926
4045
  }
3927
- )), /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "column", margin: { bottom: 10 } } }, /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: "HLS Playback:", fontSize: t.labelSmall, color: C2.textDim }), /* @__PURE__ */ ReactEcs6.createElement(
4046
+ )), /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "column", margin: { bottom: 10 } } }, /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: "HLS Playback:", fontSize: t.labelSmall, color: C2.textDim }), /* @__PURE__ */ ReactEcs7.createElement(
3928
4047
  Label6,
3929
4048
  {
3930
4049
  value: this.streamData.locked === true ? LOCKED_LINE : this.streamData.hlsUrl || "Not available",
@@ -3932,7 +4051,7 @@ var AdminPanelUIModule = class {
3932
4051
  color: this.streamData.locked === true ? C2.yellow : this.streamData.hlsUrl ? C2.green : C2.textDim,
3933
4052
  uiTransform: { margin: { left: 6 } }
3934
4053
  }
3935
- )), /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "row", flexWrap: "wrap", margin: { bottom: 6 } } }, !this.streamData.isLive && /* @__PURE__ */ ReactEcs6.createElement(
4054
+ )), /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "row", flexWrap: "wrap", margin: { bottom: 6 } } }, !this.streamData.isLive && /* @__PURE__ */ ReactEcs7.createElement(
3936
4055
  Button4,
3937
4056
  {
3938
4057
  uiTransform: { width: this.s(110), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
@@ -3942,7 +4061,7 @@ var AdminPanelUIModule = class {
3942
4061
  color: C2.text,
3943
4062
  onMouseDown: () => this.startStream()
3944
4063
  }
3945
- ), this.streamData.isLive && /* @__PURE__ */ ReactEcs6.createElement(
4064
+ ), this.streamData.isLive && /* @__PURE__ */ ReactEcs7.createElement(
3946
4065
  Button4,
3947
4066
  {
3948
4067
  uiTransform: { width: this.s(110), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
@@ -3952,7 +4071,7 @@ var AdminPanelUIModule = class {
3952
4071
  color: C2.text,
3953
4072
  onMouseDown: () => this.stopStream()
3954
4073
  }
3955
- ), this.streamData.isLive && (this.streamData.hlsUrl || this.streamData.locked === true) && /* @__PURE__ */ ReactEcs6.createElement(
4074
+ ), this.streamData.isLive && (this.streamData.hlsUrl || this.streamData.locked === true) && /* @__PURE__ */ ReactEcs7.createElement(
3956
4075
  Button4,
3957
4076
  {
3958
4077
  uiTransform: { width: this.s(100), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
@@ -3962,7 +4081,7 @@ var AdminPanelUIModule = class {
3962
4081
  color: C2.text,
3963
4082
  onMouseDown: () => this.playStreamOnScreen()
3964
4083
  }
3965
- )), /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "row", flexWrap: "wrap", margin: { bottom: 6 } } }, /* @__PURE__ */ ReactEcs6.createElement(
4084
+ )), /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "row", flexWrap: "wrap", margin: { bottom: 6 } } }, /* @__PURE__ */ ReactEcs7.createElement(
3966
4085
  Button4,
3967
4086
  {
3968
4087
  uiTransform: { width: this.s(80), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
@@ -3972,7 +4091,7 @@ var AdminPanelUIModule = class {
3972
4091
  color: C2.text,
3973
4092
  onMouseDown: () => this.refreshStreamStatus()
3974
4093
  }
3975
- ), /* @__PURE__ */ ReactEcs6.createElement(
4094
+ ), /* @__PURE__ */ ReactEcs7.createElement(
3976
4095
  Button4,
3977
4096
  {
3978
4097
  uiTransform: { width: this.s(95), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
@@ -3982,7 +4101,7 @@ var AdminPanelUIModule = class {
3982
4101
  color: C2.text,
3983
4102
  onMouseDown: () => this.rotateStreamKey()
3984
4103
  }
3985
- ), !this.streamData.isLive && !this.channelDeleteLook && /* @__PURE__ */ ReactEcs6.createElement(
4104
+ ), !this.streamData.isLive && !this.channelDeleteLook && /* @__PURE__ */ ReactEcs7.createElement(
3986
4105
  Button4,
3987
4106
  {
3988
4107
  uiTransform: { width: this.s(70), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
@@ -3992,7 +4111,7 @@ var AdminPanelUIModule = class {
3992
4111
  color: C2.text,
3993
4112
  onMouseDown: () => this.deleteChannel()
3994
4113
  }
3995
- )), !this.streamData.isLive && this.channelDeleteLook && /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "column", margin: { bottom: 6 }, padding: 6 }, uiBackground: { color: C2.section } }, /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: "DELETE THIS CHANNEL?", fontSize: t.labelSmall, color: C2.red, uiTransform: { height: this.s(18) } }), channelDeleteLines(this.channelDeleteLook, this.channelDeleteChanged).map((line, i) => /* @__PURE__ */ ReactEcs6.createElement(Label6, { key: `delete-line-${i}`, value: line, fontSize: t.status, color: line.startsWith("WHAT") ? C2.yellow : C2.text, uiTransform: { height: this.s(18) } })), /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "row", margin: { top: 4 } } }, /* @__PURE__ */ ReactEcs6.createElement(
4114
+ )), !this.streamData.isLive && this.channelDeleteLook && /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "column", margin: { bottom: 6 }, padding: 6 }, uiBackground: { color: C2.section } }, /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: "DELETE THIS CHANNEL?", fontSize: t.labelSmall, color: C2.red, uiTransform: { height: this.s(18) } }), channelDeleteLines(this.channelDeleteLook, this.channelDeleteChanged).map((line, i) => /* @__PURE__ */ ReactEcs7.createElement(Label6, { key: `delete-line-${i}`, value: line, fontSize: t.status, color: line.startsWith("WHAT") ? C2.yellow : C2.text, uiTransform: { height: this.s(18) } })), /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "row", margin: { top: 4 } } }, /* @__PURE__ */ ReactEcs7.createElement(
3996
4115
  Button4,
3997
4116
  {
3998
4117
  uiTransform: { width: this.s(120), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
@@ -4002,7 +4121,7 @@ var AdminPanelUIModule = class {
4002
4121
  color: C2.text,
4003
4122
  onMouseDown: () => this.confirmDeleteChannel()
4004
4123
  }
4005
- ), /* @__PURE__ */ ReactEcs6.createElement(
4124
+ ), /* @__PURE__ */ ReactEcs7.createElement(
4006
4125
  Button4,
4007
4126
  {
4008
4127
  uiTransform: { width: this.s(70), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
@@ -4012,7 +4131,7 @@ var AdminPanelUIModule = class {
4012
4131
  color: C2.text,
4013
4132
  onMouseDown: () => this.cancelDeleteChannel()
4014
4133
  }
4015
- ))), this.streamControlStatus === "started" && /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: "Stream started - begin broadcasting in OBS", fontSize: t.status, color: C2.green }), this.streamControlStatus === "stopped" && /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: "Stream stopped", fontSize: t.status, color: C2.textDim }), this.keyRotateStatus === "success" && /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: "Key rotated! Update OBS", fontSize: t.status, color: C2.green }), this.keyRotateStatus === "error" && /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: "Failed to rotate key", fontSize: t.status, color: C2.red }), this.channelDeleteError && /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: this.channelDeleteError, fontSize: t.status, color: C2.red }), this.streamControlStatus === "error" && /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: "Stream control failed", fontSize: t.status, color: C2.red })), /* @__PURE__ */ ReactEcs6.createElement(this.SectionHead, { label: "PLAY NOW", color: C2.orange }), /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "row", alignItems: "center", margin: { bottom: 14 } } }, /* @__PURE__ */ ReactEcs6.createElement(
4134
+ ))), this.streamControlStatus === "started" && /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: "Stream started - begin broadcasting in OBS", fontSize: t.status, color: C2.green }), this.streamControlStatus === "stopped" && /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: "Stream stopped", fontSize: t.status, color: C2.textDim }), this.keyRotateStatus === "success" && /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: "Key rotated! Update OBS", fontSize: t.status, color: C2.green }), this.keyRotateStatus === "error" && /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: "Failed to rotate key", fontSize: t.status, color: C2.red }), this.channelDeleteError && /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: this.channelDeleteError, fontSize: t.status, color: C2.red }), this.streamControlStatus === "error" && /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: "Stream control failed", fontSize: t.status, color: C2.red })), /* @__PURE__ */ ReactEcs7.createElement(this.SectionHead, { label: "PLAY NOW", color: C2.orange }), /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "row", alignItems: "center", margin: { bottom: 14 } } }, /* @__PURE__ */ ReactEcs7.createElement(
4016
4135
  Input4,
4017
4136
  {
4018
4137
  uiTransform: { width: this.s(230), height: this.s(UI_DIMENSIONS.admin.inputHeight) },
@@ -4026,7 +4145,7 @@ var AdminPanelUIModule = class {
4026
4145
  this.customVideoUrl = val;
4027
4146
  }
4028
4147
  }
4029
- ), /* @__PURE__ */ ReactEcs6.createElement(
4148
+ ), /* @__PURE__ */ ReactEcs7.createElement(
4030
4149
  Button4,
4031
4150
  {
4032
4151
  uiTransform: { width: this.s(75), height: this.s(UI_DIMENSIONS.admin.inputHeight), margin: { left: 8 } },
@@ -4036,7 +4155,7 @@ var AdminPanelUIModule = class {
4036
4155
  color: C2.text,
4037
4156
  onMouseDown: () => this.playNow()
4038
4157
  }
4039
- ), /* @__PURE__ */ ReactEcs6.createElement(
4158
+ ), /* @__PURE__ */ ReactEcs7.createElement(
4040
4159
  Button4,
4041
4160
  {
4042
4161
  uiTransform: { width: this.s(65), height: this.s(UI_DIMENSIONS.admin.inputHeight), margin: { left: 6 } },
@@ -4048,7 +4167,7 @@ var AdminPanelUIModule = class {
4048
4167
  this.customVideoUrl = "";
4049
4168
  }
4050
4169
  }
4051
- )), this.videoStatus && /* @__PURE__ */ ReactEcs6.createElement(
4170
+ )), this.videoStatus && /* @__PURE__ */ ReactEcs7.createElement(
4052
4171
  Label6,
4053
4172
  {
4054
4173
  value: this.videoStatus,
@@ -4056,7 +4175,7 @@ var AdminPanelUIModule = class {
4056
4175
  color: this.videoStatus.startsWith("Not sent") || this.videoStatus === LOCKED_LINE || this.videoStatus === UNAVAILABLE_LINE ? C2.red : C2.green,
4057
4176
  uiTransform: { height: this.s(18), margin: { bottom: 6 } }
4058
4177
  }
4059
- ), /* @__PURE__ */ ReactEcs6.createElement(this.SectionHead, { label: "PLAYBACK", color: C2.green }), /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "row", flexWrap: "wrap", margin: { bottom: 14 } } }, /* @__PURE__ */ ReactEcs6.createElement(
4178
+ ), /* @__PURE__ */ ReactEcs7.createElement(this.SectionHead, { label: "PLAYBACK", color: C2.green }), /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "row", flexWrap: "wrap", margin: { bottom: 14 } } }, /* @__PURE__ */ ReactEcs7.createElement(
4060
4179
  Button4,
4061
4180
  {
4062
4181
  uiTransform: { width: this.s(75), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
@@ -4066,7 +4185,7 @@ var AdminPanelUIModule = class {
4066
4185
  color: C2.text,
4067
4186
  onMouseDown: () => this.playbackPlay()
4068
4187
  }
4069
- ), /* @__PURE__ */ ReactEcs6.createElement(
4188
+ ), /* @__PURE__ */ ReactEcs7.createElement(
4070
4189
  Button4,
4071
4190
  {
4072
4191
  uiTransform: { width: this.s(75), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
@@ -4076,7 +4195,7 @@ var AdminPanelUIModule = class {
4076
4195
  color: C2.text,
4077
4196
  onMouseDown: () => this.playbackStop()
4078
4197
  }
4079
- ), /* @__PURE__ */ ReactEcs6.createElement(
4198
+ ), /* @__PURE__ */ ReactEcs7.createElement(
4080
4199
  Button4,
4081
4200
  {
4082
4201
  uiTransform: { width: this.s(100), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
@@ -4086,7 +4205,7 @@ var AdminPanelUIModule = class {
4086
4205
  color: C2.text,
4087
4206
  onMouseDown: () => this.resetDefault()
4088
4207
  }
4089
- )), /* @__PURE__ */ ReactEcs6.createElement(this.SectionHead, { label: "VIDEO SLOTS", color: C2.cyan }), /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "row", flexWrap: "wrap", margin: { bottom: 10 } } }, ["slot1", "slot2", "slot3", "slot4", "slot5"].map((slot, i) => /* @__PURE__ */ ReactEcs6.createElement(
4208
+ )), /* @__PURE__ */ ReactEcs7.createElement(this.SectionHead, { label: "VIDEO SLOTS", color: C2.cyan }), /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "row", flexWrap: "wrap", margin: { bottom: 10 } } }, ["slot1", "slot2", "slot3", "slot4", "slot5"].map((slot, i) => /* @__PURE__ */ ReactEcs7.createElement(
4090
4209
  Button4,
4091
4210
  {
4092
4211
  key: `play-${slot}`,
@@ -4097,7 +4216,7 @@ var AdminPanelUIModule = class {
4097
4216
  color: C2.text,
4098
4217
  onMouseDown: () => this.pressSlot(slot)
4099
4218
  }
4100
- ))), /* @__PURE__ */ ReactEcs6.createElement(
4219
+ ))), /* @__PURE__ */ ReactEcs7.createElement(
4101
4220
  Button4,
4102
4221
  {
4103
4222
  uiTransform: { height: this.s(24) },
@@ -4111,7 +4230,7 @@ var AdminPanelUIModule = class {
4111
4230
  };
4112
4231
  this.ModTab = () => {
4113
4232
  const t = this.theme;
4114
- return /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "column", width: "100%", padding: 10 } }, this.modStatus === "loading" && /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: "Loading...", fontSize: t.status, color: C2.yellow }), this.modStatus === "saved" && /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: "Saved!", fontSize: t.status, color: C2.green }), this.modStatus === "error" && /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: "Error - check input", fontSize: t.status, color: C2.red }), this.kickStatus && /* @__PURE__ */ ReactEcs6.createElement(
4233
+ return /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "column", width: "100%", padding: 10 } }, this.modStatus === "loading" && /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: "Loading...", fontSize: t.status, color: C2.yellow }), this.modStatus === "saved" && /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: "Saved!", fontSize: t.status, color: C2.green }), this.modStatus === "error" && /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: "Error - check input", fontSize: t.status, color: C2.red }), this.kickStatus && /* @__PURE__ */ ReactEcs7.createElement(
4115
4234
  Label6,
4116
4235
  {
4117
4236
  value: this.kickStatus,
@@ -4119,7 +4238,7 @@ var AdminPanelUIModule = class {
4119
4238
  color: this.kickStatus.startsWith("Kick not sent") ? C2.red : C2.green,
4120
4239
  uiTransform: { height: this.s(18) }
4121
4240
  }
4122
- ), /* @__PURE__ */ ReactEcs6.createElement(this.SectionHead, { label: "BROADCAST", color: C2.orange }), /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "row", alignItems: "center", margin: { bottom: 14 } } }, /* @__PURE__ */ ReactEcs6.createElement(
4241
+ ), /* @__PURE__ */ ReactEcs7.createElement(this.SectionHead, { label: "BROADCAST", color: C2.orange }), /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "row", alignItems: "center", margin: { bottom: 14 } } }, /* @__PURE__ */ ReactEcs7.createElement(
4123
4242
  Input4,
4124
4243
  {
4125
4244
  uiTransform: { width: this.s(230), height: this.s(UI_DIMENSIONS.admin.inputHeight) },
@@ -4133,7 +4252,7 @@ var AdminPanelUIModule = class {
4133
4252
  this.broadcastText = val;
4134
4253
  }
4135
4254
  }
4136
- ), /* @__PURE__ */ ReactEcs6.createElement(
4255
+ ), /* @__PURE__ */ ReactEcs7.createElement(
4137
4256
  Button4,
4138
4257
  {
4139
4258
  uiTransform: { width: this.s(65), height: this.s(UI_DIMENSIONS.admin.inputHeight), margin: { left: 8 } },
@@ -4143,7 +4262,7 @@ var AdminPanelUIModule = class {
4143
4262
  color: C2.text,
4144
4263
  onMouseDown: () => this.sendBroadcast()
4145
4264
  }
4146
- )), this.broadcastStatus && /* @__PURE__ */ ReactEcs6.createElement(
4265
+ )), this.broadcastStatus && /* @__PURE__ */ ReactEcs7.createElement(
4147
4266
  Label6,
4148
4267
  {
4149
4268
  value: this.broadcastStatus,
@@ -4151,7 +4270,7 @@ var AdminPanelUIModule = class {
4151
4270
  color: this.broadcastStatus.startsWith("Not sent") ? C2.red : C2.green,
4152
4271
  uiTransform: { height: this.s(18), margin: { bottom: 6 } }
4153
4272
  }
4154
- ), /* @__PURE__ */ ReactEcs6.createElement(this.SectionHead, { label: "CHAOS MODE", color: C2.red }), /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "row", flexWrap: "wrap", margin: { bottom: 14 } } }, /* @__PURE__ */ ReactEcs6.createElement(
4273
+ ), /* @__PURE__ */ ReactEcs7.createElement(this.SectionHead, { label: "CHAOS MODE", color: C2.red }), /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "row", flexWrap: "wrap", margin: { bottom: 14 } } }, /* @__PURE__ */ ReactEcs7.createElement(
4155
4274
  Button4,
4156
4275
  {
4157
4276
  uiTransform: { width: this.s(130), height: this.s(UI_DIMENSIONS.admin.buttonHeight), margin: 4 },
@@ -4161,7 +4280,7 @@ var AdminPanelUIModule = class {
4161
4280
  color: C2.text,
4162
4281
  onMouseDown: () => this.kickAll()
4163
4282
  }
4164
- )), this.venue && /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "column", margin: { bottom: 14 } } }, /* @__PURE__ */ ReactEcs6.createElement(this.SectionHead, { label: "PRIVATE MODE", color: C2.yellow }), /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: "While ON, only citizens get in", fontSize: t.labelSmall, color: C2.textDim, uiTransform: { height: this.s(18), margin: { bottom: 4 } } }), /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "row", flexWrap: "wrap" } }, [true, false].map((on) => /* @__PURE__ */ ReactEcs6.createElement(
4283
+ )), this.venue && /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "column", margin: { bottom: 14 } } }, /* @__PURE__ */ ReactEcs7.createElement(this.SectionHead, { label: "PRIVATE MODE", color: C2.yellow }), /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: "While ON, only citizens get in", fontSize: t.labelSmall, color: C2.textDim, uiTransform: { height: this.s(18), margin: { bottom: 4 } } }), /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "row", flexWrap: "wrap" } }, [true, false].map((on) => /* @__PURE__ */ ReactEcs7.createElement(
4165
4284
  Button4,
4166
4285
  {
4167
4286
  key: `private-${on ? "on" : "off"}`,
@@ -4172,7 +4291,7 @@ var AdminPanelUIModule = class {
4172
4291
  color: this.privateModeOn === on ? Color46.Black() : C2.text,
4173
4292
  onMouseDown: () => this.setPrivateMode(on)
4174
4293
  }
4175
- ))), this.privateStatus && /* @__PURE__ */ ReactEcs6.createElement(
4294
+ ))), this.privateStatus && /* @__PURE__ */ ReactEcs7.createElement(
4176
4295
  Label6,
4177
4296
  {
4178
4297
  value: this.privateStatus,
@@ -4180,13 +4299,13 @@ var AdminPanelUIModule = class {
4180
4299
  color: this.privateStatus.startsWith("Not sent") ? C2.red : C2.green,
4181
4300
  uiTransform: { height: this.s(18) }
4182
4301
  }
4183
- )), /* @__PURE__ */ ReactEcs6.createElement(this.SectionHead, { label: "SCENE ADMINS", color: C2.purple }), /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "column", margin: { bottom: 6 } } }, this.sceneAdmins.length === 0 && this.modStatus !== "loading" && /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: "No scene admins", fontSize: t.labelSmall, color: C2.textDim }), this.sceneAdmins.map((wallet, i) => /* @__PURE__ */ ReactEcs6.createElement(
4184
- UiEntity6,
4302
+ )), /* @__PURE__ */ ReactEcs7.createElement(this.SectionHead, { label: "SCENE ADMINS", color: C2.purple }), /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "column", margin: { bottom: 6 } } }, this.sceneAdmins.length === 0 && this.modStatus !== "loading" && /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: "No scene admins", fontSize: t.labelSmall, color: C2.textDim }), this.sceneAdmins.map((wallet, i) => /* @__PURE__ */ ReactEcs7.createElement(
4303
+ UiEntity7,
4185
4304
  {
4186
4305
  key: `admin-${i}`,
4187
4306
  uiTransform: { flexDirection: "row", alignItems: "center", margin: { bottom: 5 }, width: "100%" }
4188
4307
  },
4189
- /* @__PURE__ */ ReactEcs6.createElement(
4308
+ /* @__PURE__ */ ReactEcs7.createElement(
4190
4309
  Label6,
4191
4310
  {
4192
4311
  value: `${wallet.slice(0, 6)}...${wallet.slice(-4)}`,
@@ -4195,7 +4314,7 @@ var AdminPanelUIModule = class {
4195
4314
  uiTransform: { width: this.s(130) }
4196
4315
  }
4197
4316
  ),
4198
- /* @__PURE__ */ ReactEcs6.createElement(
4317
+ /* @__PURE__ */ ReactEcs7.createElement(
4199
4318
  Button4,
4200
4319
  {
4201
4320
  uiTransform: { width: this.s(70), height: this.s(28), margin: { left: 8 } },
@@ -4206,7 +4325,7 @@ var AdminPanelUIModule = class {
4206
4325
  onMouseDown: () => this.removeSceneAdmin(wallet)
4207
4326
  }
4208
4327
  )
4209
- ))), /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "row", alignItems: "center", margin: { bottom: 14 } } }, /* @__PURE__ */ ReactEcs6.createElement(
4328
+ ))), /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "row", alignItems: "center", margin: { bottom: 14 } } }, /* @__PURE__ */ ReactEcs7.createElement(
4210
4329
  Input4,
4211
4330
  {
4212
4331
  uiTransform: { width: this.s(230), height: this.s(UI_DIMENSIONS.admin.inputHeight) },
@@ -4220,7 +4339,7 @@ var AdminPanelUIModule = class {
4220
4339
  this.newAdminWallet = val;
4221
4340
  }
4222
4341
  }
4223
- ), /* @__PURE__ */ ReactEcs6.createElement(
4342
+ ), /* @__PURE__ */ ReactEcs7.createElement(
4224
4343
  Button4,
4225
4344
  {
4226
4345
  uiTransform: { width: this.s(60), height: this.s(UI_DIMENSIONS.admin.inputHeight), margin: { left: 8 } },
@@ -4232,13 +4351,13 @@ var AdminPanelUIModule = class {
4232
4351
  if (this.newAdminWallet) this.addSceneAdmin(this.newAdminWallet);
4233
4352
  }
4234
4353
  }
4235
- )), /* @__PURE__ */ ReactEcs6.createElement(this.SectionHead, { label: "BANNED WALLETS", color: C2.red }), /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "column", margin: { bottom: 6 } } }, this.bannedWallets.length === 0 && this.modStatus !== "loading" && /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: "No banned wallets", fontSize: t.labelSmall, color: C2.textDim }), this.bannedWallets.map((wallet, i) => /* @__PURE__ */ ReactEcs6.createElement(
4236
- UiEntity6,
4354
+ )), /* @__PURE__ */ ReactEcs7.createElement(this.SectionHead, { label: "BANNED WALLETS", color: C2.red }), /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "column", margin: { bottom: 6 } } }, this.bannedWallets.length === 0 && this.modStatus !== "loading" && /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: "No banned wallets", fontSize: t.labelSmall, color: C2.textDim }), this.bannedWallets.map((wallet, i) => /* @__PURE__ */ ReactEcs7.createElement(
4355
+ UiEntity7,
4237
4356
  {
4238
4357
  key: `ban-${i}`,
4239
4358
  uiTransform: { flexDirection: "row", alignItems: "center", margin: { bottom: 5 }, width: "100%" }
4240
4359
  },
4241
- /* @__PURE__ */ ReactEcs6.createElement(
4360
+ /* @__PURE__ */ ReactEcs7.createElement(
4242
4361
  Label6,
4243
4362
  {
4244
4363
  value: `${wallet.slice(0, 6)}...${wallet.slice(-4)}`,
@@ -4247,7 +4366,7 @@ var AdminPanelUIModule = class {
4247
4366
  uiTransform: { width: this.s(130) }
4248
4367
  }
4249
4368
  ),
4250
- /* @__PURE__ */ ReactEcs6.createElement(
4369
+ /* @__PURE__ */ ReactEcs7.createElement(
4251
4370
  Button4,
4252
4371
  {
4253
4372
  uiTransform: { width: this.s(70), height: this.s(28), margin: { left: 8 } },
@@ -4258,7 +4377,7 @@ var AdminPanelUIModule = class {
4258
4377
  onMouseDown: () => this.unbanWallet(wallet)
4259
4378
  }
4260
4379
  )
4261
- ))), /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "row", alignItems: "center", margin: { bottom: 10 } } }, /* @__PURE__ */ ReactEcs6.createElement(
4380
+ ))), /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "row", alignItems: "center", margin: { bottom: 10 } } }, /* @__PURE__ */ ReactEcs7.createElement(
4262
4381
  Input4,
4263
4382
  {
4264
4383
  uiTransform: { width: this.s(230), height: this.s(UI_DIMENSIONS.admin.inputHeight) },
@@ -4272,7 +4391,7 @@ var AdminPanelUIModule = class {
4272
4391
  this.newBanWallet = val;
4273
4392
  }
4274
4393
  }
4275
- ), /* @__PURE__ */ ReactEcs6.createElement(
4394
+ ), /* @__PURE__ */ ReactEcs7.createElement(
4276
4395
  Button4,
4277
4396
  {
4278
4397
  uiTransform: { width: this.s(60), height: this.s(UI_DIMENSIONS.admin.inputHeight), margin: { left: 8 } },
@@ -4284,7 +4403,7 @@ var AdminPanelUIModule = class {
4284
4403
  if (this.newBanWallet) this.banWallet(this.newBanWallet);
4285
4404
  }
4286
4405
  }
4287
- )), /* @__PURE__ */ ReactEcs6.createElement(
4406
+ )), /* @__PURE__ */ ReactEcs7.createElement(
4288
4407
  Button4,
4289
4408
  {
4290
4409
  uiTransform: { height: this.s(24) },
@@ -4331,8 +4450,8 @@ var AdminPanelUIModule = class {
4331
4450
  if (!tabs.find((tab) => tab.id === this.activeTab) && tabs.length > 0) {
4332
4451
  this.activeTab = tabs[0].id;
4333
4452
  }
4334
- return /* @__PURE__ */ ReactEcs6.createElement(
4335
- UiEntity6,
4453
+ return /* @__PURE__ */ ReactEcs7.createElement(
4454
+ UiEntity7,
4336
4455
  {
4337
4456
  uiTransform: {
4338
4457
  width: "100%",
@@ -4341,42 +4460,33 @@ var AdminPanelUIModule = class {
4341
4460
  }
4342
4461
  },
4343
4462
  this.renderScaledNotification(),
4344
- /* @__PURE__ */ ReactEcs6.createElement(
4345
- UiEntity6,
4463
+ this.client.isPhone ? toolbarButton(2, { children: [this.renderToggleFace()] }, true, this.client.uiScale) : /* @__PURE__ */ ReactEcs7.createElement(
4464
+ UiEntity7,
4346
4465
  {
4347
4466
  uiTransform: {
4348
4467
  position: { right: 20 + this.s(100) + 10 + this.s(100) + 10, bottom: 10 },
4349
4468
  positionType: "absolute"
4350
4469
  }
4351
4470
  },
4352
- /* @__PURE__ */ ReactEcs6.createElement(
4353
- Button4,
4354
- {
4355
- uiTransform: { width: this.s(100), height: this.s(45) },
4356
- uiBackground: { color: this.panelOpen ? C2.btn : C2.header },
4357
- value: this.panelOpen ? "CLOSE" : "ADMIN",
4358
- fontSize: this.s(14),
4359
- color: C2.text,
4360
- onMouseDown: () => this.toggle()
4361
- }
4362
- )
4471
+ this.renderToggleFace()
4363
4472
  ),
4364
- this.panelOpen && /* @__PURE__ */ ReactEcs6.createElement(
4365
- UiEntity6,
4473
+ this.panelOpen && /* @__PURE__ */ ReactEcs7.createElement(
4474
+ UiEntity7,
4366
4475
  {
4367
4476
  key: `admin-panel-${this.client.uiScale}`,
4368
4477
  uiTransform: {
4369
4478
  width: this.s(UI_DIMENSIONS.admin.width),
4370
4479
  height: this.s(UI_DIMENSIONS.admin.height),
4371
4480
  maxHeight: this.s(UI_DIMENSIONS.admin.maxHeight),
4372
- position: { right: UI_DIMENSIONS.chat.right + this.s(UI_DIMENSIONS.chat.width) + 10, bottom: UI_DIMENSIONS.admin.bottom },
4481
+ // On a phone, left of the toolbar's column (2.12.0); elsewhere left of the chat panel, as before
4482
+ position: { right: this.client.panelRight(UI_DIMENSIONS.chat.right + this.s(UI_DIMENSIONS.chat.width) + 10), bottom: UI_DIMENSIONS.admin.bottom },
4373
4483
  positionType: "absolute",
4374
4484
  flexDirection: "column"
4375
4485
  },
4376
4486
  uiBackground: { color: C2.bg }
4377
4487
  },
4378
- /* @__PURE__ */ ReactEcs6.createElement(
4379
- UiEntity6,
4488
+ /* @__PURE__ */ ReactEcs7.createElement(
4489
+ UiEntity7,
4380
4490
  {
4381
4491
  uiTransform: {
4382
4492
  width: "100%",
@@ -4388,8 +4498,8 @@ var AdminPanelUIModule = class {
4388
4498
  },
4389
4499
  uiBackground: { color: C2.header }
4390
4500
  },
4391
- /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: this.config.title || "ADMIN PANEL", fontSize: t.header, color: C2.text }),
4392
- /* @__PURE__ */ ReactEcs6.createElement(
4501
+ /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: this.config.title || "ADMIN PANEL", fontSize: t.header, color: C2.text }),
4502
+ /* @__PURE__ */ ReactEcs7.createElement(
4393
4503
  Button4,
4394
4504
  {
4395
4505
  uiTransform: { width: this.s(28), height: this.s(28) },
@@ -4401,9 +4511,9 @@ var AdminPanelUIModule = class {
4401
4511
  }
4402
4512
  )
4403
4513
  ),
4404
- /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { width: "100%", height: this.s(UI_DIMENSIONS.admin.tabHeight), flexDirection: "row" } }, tabs.map((tab) => /* @__PURE__ */ ReactEcs6.createElement(this.TabBtn, { label: tab.label, tab: tab.id }))),
4405
- /* @__PURE__ */ ReactEcs6.createElement(
4406
- UiEntity6,
4514
+ /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { width: "100%", height: this.s(UI_DIMENSIONS.admin.tabHeight), flexDirection: "row" } }, tabs.map((tab) => /* @__PURE__ */ ReactEcs7.createElement(this.TabBtn, { label: tab.label, tab: tab.id }))),
4515
+ /* @__PURE__ */ ReactEcs7.createElement(
4516
+ UiEntity7,
4407
4517
  {
4408
4518
  uiTransform: {
4409
4519
  width: "100%",
@@ -4412,13 +4522,13 @@ var AdminPanelUIModule = class {
4412
4522
  flexDirection: "column"
4413
4523
  }
4414
4524
  },
4415
- this.activeTab === "controls" && this.venue && this.controls.length > 0 && /* @__PURE__ */ ReactEcs6.createElement(this.ControlsTab, null),
4416
- this.activeTab === "video" && /* @__PURE__ */ ReactEcs6.createElement(this.VideoTab, null),
4417
- this.activeTab === "mod" && this.isOwner && /* @__PURE__ */ ReactEcs6.createElement(this.ModTab, null),
4525
+ this.activeTab === "controls" && this.venue && this.controls.length > 0 && /* @__PURE__ */ ReactEcs7.createElement(this.ControlsTab, null),
4526
+ this.activeTab === "video" && /* @__PURE__ */ ReactEcs7.createElement(this.VideoTab, null),
4527
+ this.activeTab === "mod" && this.isOwner && /* @__PURE__ */ ReactEcs7.createElement(this.ModTab, null),
4418
4528
  this.config.sceneTabs?.map((tab) => this.activeTab === tab.id && tab.render())
4419
4529
  ),
4420
- /* @__PURE__ */ ReactEcs6.createElement(
4421
- UiEntity6,
4530
+ /* @__PURE__ */ ReactEcs7.createElement(
4531
+ UiEntity7,
4422
4532
  {
4423
4533
  uiTransform: {
4424
4534
  width: "100%",
@@ -4428,7 +4538,7 @@ var AdminPanelUIModule = class {
4428
4538
  },
4429
4539
  uiBackground: { color: C2.section }
4430
4540
  },
4431
- /* @__PURE__ */ ReactEcs6.createElement(
4541
+ /* @__PURE__ */ ReactEcs7.createElement(
4432
4542
  Button4,
4433
4543
  {
4434
4544
  uiTransform: { height: this.s(24) },
@@ -4642,7 +4752,7 @@ var AdminPanelUIModule = class {
4642
4752
  */
4643
4753
  show() {
4644
4754
  if (this.panelOpen) return;
4645
- this.client.closeOtherPanels("admin");
4755
+ this.client.panelOpened("admin");
4646
4756
  this.panelOpen = true;
4647
4757
  if (this.activeTab === "video") {
4648
4758
  this.startStreamPolling();
@@ -5596,7 +5706,7 @@ var AdminPanelUIModule = class {
5596
5706
  /** A control's button (2026-11-18): the option's label, highlighted while that option is current on this copy */
5597
5707
  controlButton(control, option, label) {
5598
5708
  const current = this.currentOption[control.id] === option;
5599
- return /* @__PURE__ */ ReactEcs6.createElement(
5709
+ return /* @__PURE__ */ ReactEcs7.createElement(
5600
5710
  Button4,
5601
5711
  {
5602
5712
  key: `control-${control.id}-${option}`,
@@ -5619,8 +5729,8 @@ var AdminPanelUIModule = class {
5619
5729
  if (!state.visible) return null;
5620
5730
  const N2 = UI_DIMENSIONS.notification;
5621
5731
  const colors = THEME.colors;
5622
- return /* @__PURE__ */ ReactEcs6.createElement(
5623
- UiEntity6,
5732
+ return /* @__PURE__ */ ReactEcs7.createElement(
5733
+ UiEntity7,
5624
5734
  {
5625
5735
  uiTransform: {
5626
5736
  positionType: "absolute",
@@ -5630,8 +5740,8 @@ var AdminPanelUIModule = class {
5630
5740
  alignItems: "center"
5631
5741
  }
5632
5742
  },
5633
- /* @__PURE__ */ ReactEcs6.createElement(
5634
- UiEntity6,
5743
+ /* @__PURE__ */ ReactEcs7.createElement(
5744
+ UiEntity7,
5635
5745
  {
5636
5746
  uiTransform: {
5637
5747
  minWidth: this.s(200),
@@ -5643,15 +5753,15 @@ var AdminPanelUIModule = class {
5643
5753
  },
5644
5754
  uiBackground: { color: colors.panel }
5645
5755
  },
5646
- /* @__PURE__ */ ReactEcs6.createElement(
5647
- UiEntity6,
5756
+ /* @__PURE__ */ ReactEcs7.createElement(
5757
+ UiEntity7,
5648
5758
  {
5649
5759
  uiTransform: { width: N2.borderWidth, height: "100%" },
5650
5760
  uiBackground: { color: colors.cyan }
5651
5761
  }
5652
5762
  ),
5653
- /* @__PURE__ */ ReactEcs6.createElement(
5654
- UiEntity6,
5763
+ /* @__PURE__ */ ReactEcs7.createElement(
5764
+ UiEntity7,
5655
5765
  {
5656
5766
  uiTransform: {
5657
5767
  flexGrow: 1,
@@ -5661,7 +5771,7 @@ var AdminPanelUIModule = class {
5661
5771
  alignItems: "center"
5662
5772
  }
5663
5773
  },
5664
- /* @__PURE__ */ ReactEcs6.createElement(
5774
+ /* @__PURE__ */ ReactEcs7.createElement(
5665
5775
  Label6,
5666
5776
  {
5667
5777
  value: state.text,
@@ -5671,8 +5781,8 @@ var AdminPanelUIModule = class {
5671
5781
  }
5672
5782
  )
5673
5783
  ),
5674
- /* @__PURE__ */ ReactEcs6.createElement(
5675
- UiEntity6,
5784
+ /* @__PURE__ */ ReactEcs7.createElement(
5785
+ UiEntity7,
5676
5786
  {
5677
5787
  uiTransform: { width: 5, height: 5, margin: { right: 10 } },
5678
5788
  uiBackground: { color: colors.cyan }
@@ -5681,16 +5791,31 @@ var AdminPanelUIModule = class {
5681
5791
  )
5682
5792
  );
5683
5793
  }
5794
+ /** The ADMIN / CLOSE button itself; its place is the row's or, on a phone, the column's (2.12.0) */
5795
+ renderToggleFace() {
5796
+ return /* @__PURE__ */ ReactEcs7.createElement(
5797
+ Button4,
5798
+ {
5799
+ uiTransform: { width: this.s(100), height: this.s(45) },
5800
+ uiBackground: { color: this.panelOpen ? C2.btn : C2.header },
5801
+ value: this.panelOpen ? "CLOSE" : "ADMIN",
5802
+ fontSize: this.s(14),
5803
+ color: C2.text,
5804
+ onMouseDown: () => this.toggle()
5805
+ }
5806
+ );
5807
+ }
5684
5808
  };
5685
5809
 
5686
5810
  // src/StaticTVClient.ts
5811
+ import { getExplorerInformation } from "~system/Runtime";
5687
5812
  import { VideoPlayer, videoEventsSystem, VideoState } from "@dcl/sdk/ecs";
5688
5813
  import * as utils from "@dcl-sdk/utils";
5689
5814
  var DEFAULT_BASE_URL = "https://thestatic.tv/api/v1/dcl";
5690
5815
  var DEFAULT_FALLBACK_VIDEO = "https://media.thestatic.tv/fallback-loop.mp4";
5691
5816
  var KEY_TYPE_CHANNEL = "channel";
5692
5817
  var KEY_TYPE_SCENE = "scene";
5693
- var StaticTVClient = class {
5818
+ var _StaticTVClient = class _StaticTVClient {
5694
5819
  /**
5695
5820
  * Create a new StaticTVClient
5696
5821
  *
@@ -5750,6 +5875,13 @@ var StaticTVClient = class {
5750
5875
  this.adminPanel = null;
5751
5876
  /** UI scale - fixed at 1.0. DCL's UI system auto-scales based on viewport. */
5752
5877
  this.uiScale = 1;
5878
+ /** The explorer's platform, read once at construction (2.12.0); unknown until it answers, and if it cannot */
5879
+ this._platform = "unknown";
5880
+ /**
5881
+ * Which panels close when one opens (2.12.0, src/ui/toolbar.ts): on a phone every other one, the SDK's and a
5882
+ * scene's (registerPanel); elsewhere the guide and the admin panel close each other, as before.
5883
+ */
5884
+ this.panelRules = new PanelRules(() => this.isPhone);
5753
5885
  // =============================================================================
5754
5886
  // --- VIDEO PLAYBACK (Internal handler for videoScreen) ---
5755
5887
  // =============================================================================
@@ -5790,6 +5922,16 @@ var StaticTVClient = class {
5790
5922
  clearInterval: dclClearInterval,
5791
5923
  log: (msg, ...args) => this.log(msg, ...args)
5792
5924
  });
5925
+ this.readPlatform();
5926
+ this.panelRules.register("guide", () => {
5927
+ if (this.guideUI?.isVisible) this.guideUI.hide();
5928
+ });
5929
+ this.panelRules.register("chat", () => {
5930
+ if (this.chatUI?.isVisible) this.chatUI.hide();
5931
+ });
5932
+ this.panelRules.register("admin", () => {
5933
+ if (this.adminPanel?.isOpen) this.adminPanel.hide();
5934
+ });
5793
5935
  if (!config.apiKey) {
5794
5936
  this._disabled = true;
5795
5937
  this._keyType = null;
@@ -6640,16 +6782,75 @@ var StaticTVClient = class {
6640
6782
  }
6641
6783
  /**
6642
6784
  * Close Admin/Guide panels (they share the same screen space)
6643
- * Chat is independent and stays open.
6785
+ * Chat is independent and stays open. On a phone (2.12.0) every other panel closes: the same as panelOpened().
6644
6786
  * @param except The panel that should stay open: 'admin' | 'guide'
6645
6787
  */
6646
6788
  closeOtherPanels(except) {
6647
- if (except !== "guide" && this.guideUI?.isVisible) {
6648
- this.guideUI.hide();
6789
+ this.panelRules.opened(except);
6790
+ }
6791
+ // ===========================================================================
6792
+ // The toolbar on a phone (2.12.0, 2026-12-01; src/ui/toolbar.ts)
6793
+ // ===========================================================================
6794
+ /** Ask the explorer which platform this is, once; a failed or missing call leaves it unknown (the desktop layout) */
6795
+ readPlatform() {
6796
+ try {
6797
+ getExplorerInformation({}).then((answer) => {
6798
+ this._platform = platformOf(answer);
6799
+ this.log(`Platform: ${this._platform}`);
6800
+ }).catch(() => {
6801
+ });
6802
+ } catch {
6649
6803
  }
6650
- if (except !== "admin" && this.adminPanel?.isOpen) {
6651
- this.adminPanel.hide();
6804
+ }
6805
+ /** The explorer's platform: 'desktop', 'mobile', 'vr', 'web', or 'unknown' until it answers (and if it cannot) */
6806
+ get platform() {
6807
+ return this._platform;
6808
+ }
6809
+ /** A phone: the toolbar stands in a column on the right edge, panels open to its left, one at a time */
6810
+ get isPhone() {
6811
+ return isPhonePlatform(this._platform);
6812
+ }
6813
+ /**
6814
+ * Draw one of the scene's own toolbar buttons in its slot: the row along the bottom right on desktop (where a scene
6815
+ * placed its own by hand before), the column on a phone. Slots count from the right (the row) or the top (the
6816
+ * column): 0 is CHAT's, 1 GUIDE's, 2 ADMIN's (for a non-admin the scene's first button may take it), then the
6817
+ * scene's. `props` is the button's face - its uiBackground, onMouseDown and children - the slot gives its place and
6818
+ * size (a width or height in props.uiTransform wins).
6819
+ *
6820
+ * @example
6821
+ * ```typescript
6822
+ * staticTV.toolbarButton(3, {
6823
+ * uiTransform: { justifyContent: 'center', alignItems: 'center' },
6824
+ * uiBackground: { color: Color4.create(0.2, 0.4, 0.2, 0.9) },
6825
+ * onMouseDown: () => myPanel.toggle(),
6826
+ * children: [ReactEcs.createElement(UiEntity, { uiText: { value: 'MAP', fontSize: 14 } })],
6827
+ * })
6828
+ * ```
6829
+ */
6830
+ toolbarButton(slot, props) {
6831
+ return toolbarButton(slot, props, this.isPhone, this.uiScale);
6832
+ }
6833
+ /** Where a scene's own panel's right edge goes: on a phone just left of the column; elsewhere `desktopRight` */
6834
+ panelRight(desktopRight) {
6835
+ return panelRight(this.isPhone, desktopRight, this.uiScale);
6836
+ }
6837
+ /**
6838
+ * Put one of the scene's own panels under the one-panel rule: on a phone, when another panel opens (the SDK's or the
6839
+ * scene's), `hide` runs. The SDK's own names (guide, chat, admin) are taken. Call panelOpened(name) when it opens.
6840
+ */
6841
+ registerPanel(name, hide) {
6842
+ if (_StaticTVClient.OWN_PANELS.includes(name)) {
6843
+ this.log(`registerPanel: '${name}' is one of the SDK's own panels - pick another name`);
6844
+ return;
6652
6845
  }
6846
+ this.panelRules.register(name, hide);
6847
+ }
6848
+ /**
6849
+ * A panel opened: on a phone every other one closes, the SDK's and the scene's registered ones; elsewhere the guide
6850
+ * and the admin panel close each other, as before, and a scene's own panel closes nothing here.
6851
+ */
6852
+ panelOpened(name) {
6853
+ this.panelRules.opened(name);
6653
6854
  }
6654
6855
  /**
6655
6856
  * Set up the UI renderer for all SDK panels
@@ -6707,6 +6908,9 @@ var StaticTVClient = class {
6707
6908
  this.log("StaticTVClient destroyed");
6708
6909
  }
6709
6910
  };
6911
+ /** The SDK's own panels, which a scene cannot register over */
6912
+ _StaticTVClient.OWN_PANELS = ["guide", "chat", "admin"];
6913
+ var StaticTVClient = _StaticTVClient;
6710
6914
  export {
6711
6915
  AdminPanelUIModule,
6712
6916
  ChatUIModule,