@thestatic-tv/dcl-sdk 2.11.2 → 2.13.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,113 @@ 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
+ var PHONE_EDGE = 0;
1525
+ function platformOf(answer) {
1526
+ const raw = answer?.platform;
1527
+ if (typeof raw !== "string") return "unknown";
1528
+ const p = raw.trim().toLowerCase();
1529
+ return p === "desktop" || p === "mobile" || p === "vr" || p === "web" ? p : "unknown";
1530
+ }
1531
+ function isPhonePlatform(platform) {
1532
+ return platform === "mobile";
1533
+ }
1534
+ var scaled = (value, uiScale) => Math.round(value * uiScale);
1535
+ function rowRight(slot, uiScale = 1) {
1536
+ return TOOLBAR.edge + slot * (scaled(TOOLBAR.buttonWidth, uiScale) + TOOLBAR.gap);
1537
+ }
1538
+ function columnSlot(slot, uiScale = 1) {
1539
+ const h = scaled(TOOLBAR.buttonHeight, uiScale);
1540
+ return {
1541
+ right: PHONE_EDGE,
1542
+ boxHeight: COLUMN_SLOTS * h + (COLUMN_SLOTS - 1) * TOOLBAR.gap,
1543
+ above: Math.max(0, slot) * (h + TOOLBAR.gap)
1544
+ };
1545
+ }
1546
+ function panelRight(phone, desktopRight, uiScale = 1) {
1547
+ return phone ? PHONE_EDGE + scaled(TOOLBAR.buttonWidth, uiScale) + TOOLBAR.gap : desktopRight;
1548
+ }
1549
+ var DESKTOP_CLOSES = { guide: ["admin"], admin: ["guide"] };
1550
+ var GUIDE_PLACE = ["guide", "admin"];
1551
+ function panelsToClose(opened, registered, phone, coversGuide = []) {
1552
+ if (phone) return registered.filter((name) => name !== opened);
1553
+ const closes = [...DESKTOP_CLOSES[opened] ?? []];
1554
+ if (GUIDE_PLACE.includes(opened)) closes.push(...coversGuide);
1555
+ if (coversGuide.includes(opened)) closes.push(...GUIDE_PLACE);
1556
+ return registered.filter((name) => name !== opened && closes.includes(name));
1557
+ }
1558
+ var PanelRules = class {
1559
+ constructor(phone) {
1560
+ this.hides = /* @__PURE__ */ new Map();
1561
+ this.coveringGuide = /* @__PURE__ */ new Set();
1562
+ this.phone = phone;
1563
+ }
1564
+ /** Register (or replace) a panel; its hide runs when another panel opens and the rule says so */
1565
+ register(name, hide, options = {}) {
1566
+ this.hides.set(name, hide);
1567
+ if (options.coversGuide === true) this.coveringGuide.add(name);
1568
+ else this.coveringGuide.delete(name);
1569
+ }
1570
+ /** A panel opened: close the ones the rule names. One failing hide does not stop the rest. */
1571
+ opened(name) {
1572
+ for (const other of panelsToClose(name, [...this.hides.keys()], this.phone(), [...this.coveringGuide])) {
1573
+ try {
1574
+ this.hides.get(other)?.();
1575
+ } catch {
1576
+ }
1577
+ }
1578
+ }
1579
+ get names() {
1580
+ return [...this.hides.keys()];
1581
+ }
1582
+ };
1583
+
1584
+ // src/ui/toolbar-button.ts
1585
+ function toolbarButton(slot, props, phone, uiScale = 1) {
1586
+ const width = Math.round(TOOLBAR.buttonWidth * uiScale);
1587
+ const height = Math.round(TOOLBAR.buttonHeight * uiScale);
1588
+ if (!phone) {
1589
+ return ReactEcs2.createElement(UiEntity2, {
1590
+ ...props,
1591
+ uiTransform: {
1592
+ positionType: "absolute",
1593
+ position: { right: rowRight(slot, uiScale), bottom: TOOLBAR.bottom },
1594
+ width,
1595
+ height,
1596
+ ...props.uiTransform
1597
+ }
1598
+ });
1599
+ }
1600
+ const place = columnSlot(slot, uiScale);
1601
+ return ReactEcs2.createElement(UiEntity2, {
1602
+ uiTransform: {
1603
+ positionType: "absolute",
1604
+ position: { right: place.right, top: 0 },
1605
+ width,
1606
+ height: "100%",
1607
+ flexDirection: "column",
1608
+ justifyContent: "center"
1609
+ },
1610
+ children: [
1611
+ ReactEcs2.createElement(UiEntity2, {
1612
+ uiTransform: { width, height: place.boxHeight, flexDirection: "column", flexShrink: 0 },
1613
+ children: [
1614
+ ReactEcs2.createElement(UiEntity2, { uiTransform: { width, height: place.above, flexShrink: 0 } }),
1615
+ ReactEcs2.createElement(UiEntity2, {
1616
+ ...props,
1617
+ uiTransform: { width, height, flexShrink: 0, ...props.uiTransform }
1618
+ })
1619
+ ]
1620
+ })
1621
+ ]
1622
+ });
1623
+ }
1624
+
1518
1625
  // src/ui/guide-ui.tsx
1519
1626
  function withLock(mapped, v, fallback) {
1520
1627
  if (v.locked !== true) return mapped;
@@ -1550,7 +1657,7 @@ var GuideUIModule = class {
1550
1657
  if (this.client.isVisitorBlocked) return null;
1551
1658
  const windowW = UI_DIMENSIONS.guide.width;
1552
1659
  const windowH = UI_DIMENSIONS.guide.height;
1553
- return ReactEcs2.createElement(UiEntity2, {
1660
+ return ReactEcs3.createElement(UiEntity3, {
1554
1661
  key: `guide-root-${this.client.uiScale}`,
1555
1662
  uiTransform: {
1556
1663
  width: "100%",
@@ -1562,7 +1669,8 @@ var GuideUIModule = class {
1562
1669
  this.renderToggleButton(),
1563
1670
  // Render panel when visible - Guide positioned relative to Chat's scaled width
1564
1671
  // Guide.right = Chat.right + Chat.scaledWidth + gap (10px)
1565
- this._isVisible ? ReactEcs2.createElement(UiEntity2, {
1672
+ // On a phone centered beside the toolbar's column (2.13.0, src/ui/toolbar-panel.ts); elsewhere as here
1673
+ this._isVisible ? this.client.toolbarPanel({
1566
1674
  key: `guide-panel-${this.client.uiScale}`,
1567
1675
  uiTransform: {
1568
1676
  width: windowW,
@@ -1600,7 +1708,7 @@ var GuideUIModule = class {
1600
1708
  */
1601
1709
  show() {
1602
1710
  if (this._isVisible) return;
1603
- this.client.closeOtherPanels("guide");
1711
+ this.client.panelOpened("guide");
1604
1712
  this._isVisible = true;
1605
1713
  this.fetchGuideData().catch(() => {
1606
1714
  });
@@ -1778,7 +1886,7 @@ var GuideUIModule = class {
1778
1886
  const nodesPlaylist = this.featuredPlaylists.find((p) => p.name === "NODES");
1779
1887
  const nodesCount = nodesPlaylist ? nodesPlaylist.videos.filter((v) => v.isCreator).length : 0;
1780
1888
  const displayedPlaylists = this.featuredPlaylists.filter((p) => p.name !== "NODES").slice(0, 6);
1781
- return ReactEcs2.createElement(UiEntity2, {
1889
+ return ReactEcs3.createElement(UiEntity3, {
1782
1890
  uiTransform: {
1783
1891
  width: sidebarW,
1784
1892
  minWidth: sidebarW,
@@ -1792,11 +1900,11 @@ var GuideUIModule = class {
1792
1900
  uiBackground: { color: Color43.create(0, 0, 0, 0.4) },
1793
1901
  children: [
1794
1902
  // Header & Search
1795
- ReactEcs2.createElement(UiEntity2, {
1903
+ ReactEcs3.createElement(UiEntity3, {
1796
1904
  uiTransform: { width: "100%", flexDirection: "column", padding: 10 },
1797
1905
  children: [
1798
1906
  // Title row
1799
- ReactEcs2.createElement(UiEntity2, {
1907
+ ReactEcs3.createElement(UiEntity3, {
1800
1908
  uiTransform: {
1801
1909
  width: "100%",
1802
1910
  height: this.s(40),
@@ -1806,7 +1914,7 @@ var GuideUIModule = class {
1806
1914
  },
1807
1915
  children: [
1808
1916
  // Title
1809
- ReactEcs2.createElement(UiEntity2, {
1917
+ ReactEcs3.createElement(UiEntity3, {
1810
1918
  uiText: {
1811
1919
  value: "THE STATIC TV",
1812
1920
  fontSize: this.s(UI_DIMENSIONS.guide.sidebar.headerSize),
@@ -1817,7 +1925,7 @@ var GuideUIModule = class {
1817
1925
  ]
1818
1926
  }),
1819
1927
  // Random Signal button
1820
- ReactEcs2.createElement(UiEntity2, {
1928
+ ReactEcs3.createElement(UiEntity3, {
1821
1929
  uiTransform: {
1822
1930
  width: "100%",
1823
1931
  height: this.s(40),
@@ -1835,13 +1943,13 @@ var GuideUIModule = class {
1835
1943
  }
1836
1944
  },
1837
1945
  children: [
1838
- ReactEcs2.createElement(UiEntity2, {
1946
+ ReactEcs3.createElement(UiEntity3, {
1839
1947
  uiText: { value: ">> RANDOM SIGNAL <<", fontSize: this.s(14), color: THEME.colors.cyan }
1840
1948
  })
1841
1949
  ]
1842
1950
  }),
1843
1951
  // Search input
1844
- ReactEcs2.createElement(Input2, {
1952
+ ReactEcs3.createElement(Input2, {
1845
1953
  placeholder: "SCAN FREQ...",
1846
1954
  fontSize: this.s(UI_DIMENSIONS.guide.sidebar.fontSize),
1847
1955
  uiTransform: {
@@ -1861,11 +1969,11 @@ var GuideUIModule = class {
1861
1969
  ]
1862
1970
  }),
1863
1971
  // Menu items
1864
- ReactEcs2.createElement(UiEntity2, {
1972
+ ReactEcs3.createElement(UiEntity3, {
1865
1973
  uiTransform: { flexGrow: 1, flexDirection: "column", width: "100%", padding: { top: 5 } },
1866
1974
  children: [
1867
1975
  // Section header
1868
- ReactEcs2.createElement(UiEntity2, {
1976
+ ReactEcs3.createElement(UiEntity3, {
1869
1977
  uiTransform: { padding: { left: 10, bottom: 8, top: 5 } },
1870
1978
  uiText: { value: "GLOBAL NETWORK", fontSize: this.s(12), color: THEME.colors.cyan }
1871
1979
  }),
@@ -1874,12 +1982,12 @@ var GuideUIModule = class {
1874
1982
  this.renderMenuButton("SIGNALS", signalCount, THEME.colors.white, void 0, "VODS & RECORDINGS"),
1875
1983
  this.renderMenuButton("NODES", nodesCount, THEME.colors.magenta, void 0, "CHANNELS & CREATORS"),
1876
1984
  // Divider
1877
- ReactEcs2.createElement(UiEntity2, {
1985
+ ReactEcs3.createElement(UiEntity3, {
1878
1986
  uiTransform: { height: 1, width: "90%", margin: { top: 12, bottom: 8, left: 5 } },
1879
1987
  uiBackground: { color: THEME.colors.panelBorder }
1880
1988
  }),
1881
1989
  // Archives section
1882
- ReactEcs2.createElement(UiEntity2, {
1990
+ ReactEcs3.createElement(UiEntity3, {
1883
1991
  uiTransform: { padding: { left: 10, bottom: 8 } },
1884
1992
  uiText: { value: "ARCHIVES", fontSize: this.s(12), color: THEME.colors.cyan }
1885
1993
  }),
@@ -1895,7 +2003,7 @@ var GuideUIModule = class {
1895
2003
  renderMenuButton(label, count, color, badge, subtitle) {
1896
2004
  const isActive = this.activeTab === label;
1897
2005
  const buttonHeight = this.s(UI_DIMENSIONS.guide.sidebar.buttonHeight);
1898
- return ReactEcs2.createElement(UiEntity2, {
2006
+ return ReactEcs3.createElement(UiEntity3, {
1899
2007
  key: label,
1900
2008
  uiTransform: {
1901
2009
  width: "100%",
@@ -1914,10 +2022,10 @@ var GuideUIModule = class {
1914
2022
  this.currentPage = 0;
1915
2023
  },
1916
2024
  children: [
1917
- ReactEcs2.createElement(UiEntity2, {
2025
+ ReactEcs3.createElement(UiEntity3, {
1918
2026
  uiTransform: { flexDirection: "column", alignItems: "flex-start", justifyContent: "center", gap: 0 },
1919
2027
  children: [
1920
- ReactEcs2.createElement(UiEntity2, {
2028
+ ReactEcs3.createElement(UiEntity3, {
1921
2029
  uiTransform: { height: this.s(18) },
1922
2030
  uiText: {
1923
2031
  value: `${label} [${count}]`,
@@ -1927,7 +2035,7 @@ var GuideUIModule = class {
1927
2035
  }
1928
2036
  }),
1929
2037
  ...subtitle ? [
1930
- ReactEcs2.createElement(UiEntity2, {
2038
+ ReactEcs3.createElement(UiEntity3, {
1931
2039
  key: "subtitle",
1932
2040
  uiTransform: { height: this.s(12), marginTop: -2 },
1933
2041
  uiText: {
@@ -1941,7 +2049,7 @@ var GuideUIModule = class {
1941
2049
  ]
1942
2050
  }),
1943
2051
  ...badge ? [
1944
- ReactEcs2.createElement(UiEntity2, {
2052
+ ReactEcs3.createElement(UiEntity3, {
1945
2053
  key: "badge",
1946
2054
  uiText: { value: badge, fontSize: this.s(UI_DIMENSIONS.guide.sidebar.fontSize), color: THEME.colors.red }
1947
2055
  })
@@ -1970,7 +2078,7 @@ var GuideUIModule = class {
1970
2078
  const start = this.currentPage * this.itemsPerPage;
1971
2079
  const paged = videosToShow.slice(start, start + this.itemsPerPage);
1972
2080
  const totalPages = Math.ceil(videosToShow.length / this.itemsPerPage);
1973
- return ReactEcs2.createElement(UiEntity2, {
2081
+ return ReactEcs3.createElement(UiEntity3, {
1974
2082
  uiTransform: {
1975
2083
  flexGrow: 1,
1976
2084
  flexDirection: "column",
@@ -1981,7 +2089,7 @@ var GuideUIModule = class {
1981
2089
  this.renderCardGrid(paged),
1982
2090
  // Pagination
1983
2091
  ...totalPages > 1 ? [
1984
- ReactEcs2.createElement(UiEntity2, {
2092
+ ReactEcs3.createElement(UiEntity3, {
1985
2093
  key: "pagination",
1986
2094
  uiTransform: {
1987
2095
  width: "100%",
@@ -1994,7 +2102,7 @@ var GuideUIModule = class {
1994
2102
  },
1995
2103
  children: [
1996
2104
  ...this.currentPage > 0 ? [
1997
- ReactEcs2.createElement(UiEntity2, {
2105
+ ReactEcs3.createElement(UiEntity3, {
1998
2106
  key: "prev",
1999
2107
  uiText: {
2000
2108
  value: "< PREV",
@@ -2004,7 +2112,7 @@ var GuideUIModule = class {
2004
2112
  onMouseDown: () => this.currentPage--
2005
2113
  })
2006
2114
  ] : [],
2007
- ReactEcs2.createElement(UiEntity2, {
2115
+ ReactEcs3.createElement(UiEntity3, {
2008
2116
  uiText: {
2009
2117
  value: `${this.currentPage + 1}/${totalPages}`,
2010
2118
  fontSize: this.s(UI_DIMENSIONS.guide.content.bodySize),
@@ -2012,7 +2120,7 @@ var GuideUIModule = class {
2012
2120
  }
2013
2121
  }),
2014
2122
  ...this.currentPage < totalPages - 1 ? [
2015
- ReactEcs2.createElement(UiEntity2, {
2123
+ ReactEcs3.createElement(UiEntity3, {
2016
2124
  key: "next",
2017
2125
  uiText: {
2018
2126
  value: "NEXT >",
@@ -2030,7 +2138,7 @@ var GuideUIModule = class {
2030
2138
  }
2031
2139
  renderCardGrid(videos) {
2032
2140
  if (videos.length === 0) {
2033
- return ReactEcs2.createElement(UiEntity2, {
2141
+ return ReactEcs3.createElement(UiEntity3, {
2034
2142
  uiTransform: { width: "100%", flexGrow: 1, justifyContent: "center", alignItems: "center" },
2035
2143
  uiText: { value: "NO SIGNAL", fontSize: this.s(UI_DIMENSIONS.guide.content.bodySize), color: THEME.colors.gray }
2036
2144
  });
@@ -2040,7 +2148,7 @@ var GuideUIModule = class {
2040
2148
  rows.push(videos.slice(i, i + 2));
2041
2149
  }
2042
2150
  const cardH = this.s(UI_DIMENSIONS.guide.content.cardHeight);
2043
- return ReactEcs2.createElement(UiEntity2, {
2151
+ return ReactEcs3.createElement(UiEntity3, {
2044
2152
  uiTransform: {
2045
2153
  width: "100%",
2046
2154
  flexGrow: 1,
@@ -2049,7 +2157,7 @@ var GuideUIModule = class {
2049
2157
  gap: 8
2050
2158
  },
2051
2159
  children: rows.map(
2052
- (row, rowIndex) => ReactEcs2.createElement(UiEntity2, {
2160
+ (row, rowIndex) => ReactEcs3.createElement(UiEntity3, {
2053
2161
  key: `row-${rowIndex}`,
2054
2162
  uiTransform: {
2055
2163
  width: "100%",
@@ -2076,7 +2184,7 @@ var GuideUIModule = class {
2076
2184
  } else if (isActive) {
2077
2185
  cardBgColor = Color43.create(0, 0.4, 0, 0.5);
2078
2186
  }
2079
- return ReactEcs2.createElement(UiEntity2, {
2187
+ return ReactEcs3.createElement(UiEntity3, {
2080
2188
  key: video.id,
2081
2189
  uiTransform: {
2082
2190
  width: cardW,
@@ -2091,7 +2199,7 @@ var GuideUIModule = class {
2091
2199
  uiBackground: { color: cardBgColor },
2092
2200
  children: [
2093
2201
  // Main click area
2094
- ReactEcs2.createElement(UiEntity2, {
2202
+ ReactEcs3.createElement(UiEntity3, {
2095
2203
  uiTransform: {
2096
2204
  width: "100%",
2097
2205
  height: "70%",
@@ -2101,7 +2209,7 @@ var GuideUIModule = class {
2101
2209
  },
2102
2210
  onMouseDown: () => this.handleVideoSelect(video),
2103
2211
  children: [
2104
- ReactEcs2.createElement(UiEntity2, {
2212
+ ReactEcs3.createElement(UiEntity3, {
2105
2213
  uiText: {
2106
2214
  value: truncateText(video.name || "Unknown", 22),
2107
2215
  fontSize: this.s(UI_DIMENSIONS.guide.content.headerSize),
@@ -2110,7 +2218,7 @@ var GuideUIModule = class {
2110
2218
  }),
2111
2219
  // Status indicator: OFFLINE > CONNECTING > PLAYING > LIVE
2112
2220
  ...isOffline ? [
2113
- ReactEcs2.createElement(UiEntity2, {
2221
+ ReactEcs3.createElement(UiEntity3, {
2114
2222
  key: "offline",
2115
2223
  uiText: {
2116
2224
  value: "OFFLINE",
@@ -2119,7 +2227,7 @@ var GuideUIModule = class {
2119
2227
  }
2120
2228
  })
2121
2229
  ] : isConnecting ? [
2122
- ReactEcs2.createElement(UiEntity2, {
2230
+ ReactEcs3.createElement(UiEntity3, {
2123
2231
  key: "connecting",
2124
2232
  uiText: {
2125
2233
  value: "CONNECTING...",
@@ -2128,7 +2236,7 @@ var GuideUIModule = class {
2128
2236
  }
2129
2237
  })
2130
2238
  ] : isActive ? [
2131
- ReactEcs2.createElement(UiEntity2, {
2239
+ ReactEcs3.createElement(UiEntity3, {
2132
2240
  key: "playing",
2133
2241
  uiText: {
2134
2242
  value: "PLAYING",
@@ -2137,18 +2245,18 @@ var GuideUIModule = class {
2137
2245
  }
2138
2246
  })
2139
2247
  ] : video.isLive ? [
2140
- ReactEcs2.createElement(UiEntity2, {
2248
+ ReactEcs3.createElement(UiEntity3, {
2141
2249
  key: "live",
2142
2250
  uiTransform: { padding: { left: 4, right: 4, top: 2, bottom: 2 }, marginTop: 4 },
2143
2251
  uiBackground: { color: THEME.colors.red },
2144
2252
  children: [
2145
- ReactEcs2.createElement(Label2, { value: "LIVE", fontSize: this.s(10), color: THEME.colors.white })
2253
+ ReactEcs3.createElement(Label2, { value: "LIVE", fontSize: this.s(10), color: THEME.colors.white })
2146
2254
  ]
2147
2255
  })
2148
2256
  ] : [],
2149
2257
  // A locked channel (2026-11-20): its badge, the words a refused pick shows - one line, 12px in the 260px card
2150
2258
  ...video.locked === true ? [
2151
- ReactEcs2.createElement(UiEntity2, {
2259
+ ReactEcs3.createElement(UiEntity3, {
2152
2260
  key: "locked",
2153
2261
  uiTransform: { height: this.s(16), marginTop: 4 },
2154
2262
  uiText: { value: LOCKED_LINE, fontSize: this.s(12), color: THEME.colors.yellow }
@@ -2157,7 +2265,7 @@ var GuideUIModule = class {
2157
2265
  ]
2158
2266
  }),
2159
2267
  // Channel link
2160
- ReactEcs2.createElement(UiEntity2, {
2268
+ ReactEcs3.createElement(UiEntity3, {
2161
2269
  uiTransform: {
2162
2270
  width: "100%",
2163
2271
  height: "30%",
@@ -2168,7 +2276,7 @@ var GuideUIModule = class {
2168
2276
  uiBackground: { color: Color43.create(0, 0, 0, 0.3) },
2169
2277
  onMouseDown: () => this.handleChannelClick(video),
2170
2278
  children: [
2171
- ReactEcs2.createElement(UiEntity2, {
2279
+ ReactEcs3.createElement(UiEntity3, {
2172
2280
  uiText: {
2173
2281
  value: "CHANNEL",
2174
2282
  fontSize: this.s(UI_DIMENSIONS.guide.content.bodySize),
@@ -2185,7 +2293,7 @@ var GuideUIModule = class {
2185
2293
  const buttonW = this.s(170);
2186
2294
  const buttonH = this.s(44);
2187
2295
  const bodyH = this.s(UI_DIMENSIONS.guide.content.bodySize * 1.5 * 2);
2188
- return ReactEcs2.createElement(UiEntity2, {
2296
+ return ReactEcs3.createElement(UiEntity3, {
2189
2297
  key: "age-choice",
2190
2298
  uiTransform: {
2191
2299
  positionType: "absolute",
@@ -2199,7 +2307,7 @@ var GuideUIModule = class {
2199
2307
  },
2200
2308
  uiBackground: { color: Color43.create(0, 0, 0, 0.85) },
2201
2309
  children: [
2202
- ReactEcs2.createElement(UiEntity2, {
2310
+ ReactEcs3.createElement(UiEntity3, {
2203
2311
  uiTransform: {
2204
2312
  width: this.s(480),
2205
2313
  flexDirection: "column",
@@ -2210,15 +2318,15 @@ var GuideUIModule = class {
2210
2318
  },
2211
2319
  uiBackground: { color: THEME.colors.panel },
2212
2320
  children: [
2213
- ReactEcs2.createElement(UiEntity2, {
2321
+ ReactEcs3.createElement(UiEntity3, {
2214
2322
  uiTransform: { marginBottom: this.s(8) },
2215
2323
  uiText: { value: "MATURE CONTENT", fontSize: this.s(24), color: THEME.colors.red }
2216
2324
  }),
2217
- ReactEcs2.createElement(UiEntity2, {
2325
+ ReactEcs3.createElement(UiEntity3, {
2218
2326
  uiTransform: { marginBottom: this.s(12) },
2219
2327
  uiText: { value: truncateText(video.name || "Unknown", 40), fontSize: this.s(16), color: THEME.colors.cyan }
2220
2328
  }),
2221
- ReactEcs2.createElement(UiEntity2, {
2329
+ ReactEcs3.createElement(UiEntity3, {
2222
2330
  uiTransform: { width: "100%", minHeight: bodyH, marginBottom: this.s(20) },
2223
2331
  uiText: {
2224
2332
  value: "This channel is for viewers aged 18 and older. Are you 18 or older?",
@@ -2228,21 +2336,21 @@ var GuideUIModule = class {
2228
2336
  textWrap: "wrap"
2229
2337
  }
2230
2338
  }),
2231
- ReactEcs2.createElement(UiEntity2, {
2339
+ ReactEcs3.createElement(UiEntity3, {
2232
2340
  uiTransform: { flexDirection: "row", justifyContent: "center", gap: this.s(16) },
2233
2341
  children: [
2234
- ReactEcs2.createElement(UiEntity2, {
2342
+ ReactEcs3.createElement(UiEntity3, {
2235
2343
  key: "age-yes",
2236
2344
  uiTransform: { width: buttonW, height: buttonH, justifyContent: "center", alignItems: "center" },
2237
2345
  uiBackground: { color: THEME.colors.red },
2238
2346
  onMouseDown: () => this.answerAge(true),
2239
2347
  children: [
2240
- ReactEcs2.createElement(UiEntity2, {
2348
+ ReactEcs3.createElement(UiEntity3, {
2241
2349
  uiText: { value: "YES, I AM 18+", fontSize: this.s(14), color: THEME.colors.white }
2242
2350
  })
2243
2351
  ]
2244
2352
  }),
2245
- ReactEcs2.createElement(UiEntity2, {
2353
+ ReactEcs3.createElement(UiEntity3, {
2246
2354
  key: "age-no",
2247
2355
  uiTransform: {
2248
2356
  width: buttonW,
@@ -2255,7 +2363,7 @@ var GuideUIModule = class {
2255
2363
  uiBackground: { color: THEME.colors.buttonBackground },
2256
2364
  onMouseDown: () => this.answerAge(false),
2257
2365
  children: [
2258
- ReactEcs2.createElement(UiEntity2, {
2366
+ ReactEcs3.createElement(UiEntity3, {
2259
2367
  uiText: { value: "NO", fontSize: this.s(14), color: THEME.colors.white }
2260
2368
  })
2261
2369
  ]
@@ -2269,7 +2377,7 @@ var GuideUIModule = class {
2269
2377
  }
2270
2378
  renderCloseButton() {
2271
2379
  const closeSize = this.s(UI_DIMENSIONS.closeButton.size);
2272
- return ReactEcs2.createElement(UiEntity2, {
2380
+ return ReactEcs3.createElement(UiEntity3, {
2273
2381
  uiTransform: {
2274
2382
  positionType: "absolute",
2275
2383
  position: { top: -5, right: -5 },
@@ -2281,7 +2389,7 @@ var GuideUIModule = class {
2281
2389
  uiBackground: { color: THEME.colors.panel },
2282
2390
  onMouseDown: () => this.hide(),
2283
2391
  children: [
2284
- ReactEcs2.createElement(UiEntity2, {
2392
+ ReactEcs3.createElement(UiEntity3, {
2285
2393
  uiText: { value: "X", fontSize: this.s(UI_DIMENSIONS.closeButton.fontSize), color: THEME.colors.red }
2286
2394
  })
2287
2395
  ]
@@ -2290,8 +2398,25 @@ var GuideUIModule = class {
2290
2398
  renderToggleButton() {
2291
2399
  const buttonText = this._isVisible ? "CLOSE" : "GUIDE";
2292
2400
  const buttonColor = this._isVisible ? Color43.create(0.2, 0.2, 0.28, 0.9) : Color43.create(0, 0.5, 0.5, 0.9);
2401
+ const label = ReactEcs3.createElement(UiEntity3, {
2402
+ uiText: {
2403
+ value: buttonText,
2404
+ fontSize: this.s(14),
2405
+ color: THEME.colors.white,
2406
+ textAlign: "middle-center"
2407
+ }
2408
+ });
2409
+ const press = () => this._isVisible ? this.hide() : this.show();
2410
+ if (this.client.isPhone) {
2411
+ return toolbarButton(1, {
2412
+ uiTransform: { justifyContent: "center", alignItems: "center" },
2413
+ uiBackground: { color: buttonColor },
2414
+ onMouseDown: press,
2415
+ children: [label]
2416
+ }, true, this.client.uiScale);
2417
+ }
2293
2418
  const buttonPos = 20 + this.s(100) + 10;
2294
- return ReactEcs2.createElement(UiEntity2, {
2419
+ return ReactEcs3.createElement(UiEntity3, {
2295
2420
  uiTransform: {
2296
2421
  positionType: "absolute",
2297
2422
  position: { right: buttonPos, bottom: 10 },
@@ -2301,23 +2426,14 @@ var GuideUIModule = class {
2301
2426
  alignItems: "center"
2302
2427
  },
2303
2428
  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
- ]
2429
+ onMouseDown: press,
2430
+ children: [label]
2315
2431
  });
2316
2432
  }
2317
2433
  };
2318
2434
 
2319
2435
  // 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";
2436
+ import ReactEcs4, { UiEntity as UiEntity4, Label as Label3, Input as Input3, Button as Button2 } from "@dcl/sdk/react-ecs";
2321
2437
  import { Color4 as Color44 } from "@dcl/sdk/math";
2322
2438
  import { signedFetch as signedFetch3 } from "~system/SignedFetch";
2323
2439
  import { getPlayer } from "@dcl/sdk/players";
@@ -2368,7 +2484,7 @@ var ChatUIModule = class {
2368
2484
  if (this.client.isVisitorBlocked) return null;
2369
2485
  const scaledTheme = scaleChatTheme(DEFAULT_CHAT_THEME, this.client.uiScale);
2370
2486
  const positionStyle = this.getPositionStyle();
2371
- return ReactEcs3.createElement(UiEntity3, {
2487
+ return ReactEcs4.createElement(UiEntity4, {
2372
2488
  uiTransform: {
2373
2489
  width: "100%",
2374
2490
  height: "100%",
@@ -2379,7 +2495,8 @@ var ChatUIModule = class {
2379
2495
  this.renderToggleButton(),
2380
2496
  // Render panel when visible - scaled sizes, fixed position
2381
2497
  // Key includes uiScale to force re-render when scale changes from other panels
2382
- this._isVisible ? ReactEcs3.createElement(UiEntity3, {
2498
+ // On a phone centered beside the toolbar's column (2.13.0, src/ui/toolbar-panel.ts); elsewhere as here
2499
+ this._isVisible ? this.client.toolbarPanel({
2383
2500
  key: `chat-panel-${this.client.uiScale}`,
2384
2501
  uiTransform: {
2385
2502
  width: this.s(UI_DIMENSIONS.chat.width),
@@ -2395,7 +2512,7 @@ var ChatUIModule = class {
2395
2512
  this.renderHeader(),
2396
2513
  this.renderChannelButton(scaledTheme),
2397
2514
  this.renderMessagesArea(scaledTheme),
2398
- ReactEcs3.createElement(UiEntity3, {
2515
+ ReactEcs4.createElement(UiEntity4, {
2399
2516
  uiTransform: { width: "100%", height: 1, flexShrink: 0 },
2400
2517
  uiBackground: { color: THEME.colors.panelBorder }
2401
2518
  }),
@@ -2428,6 +2545,7 @@ var ChatUIModule = class {
2428
2545
  */
2429
2546
  show() {
2430
2547
  if (this._isVisible) return;
2548
+ this.client.panelOpened("chat");
2431
2549
  this._isVisible = true;
2432
2550
  this._unreadCount = 0;
2433
2551
  this.chatScrollOffset = 0;
@@ -2736,7 +2854,7 @@ var ChatUIModule = class {
2736
2854
  renderChannelButton(theme) {
2737
2855
  const currentChannel = this.channels.find((c) => c.id === this.currentChannelId);
2738
2856
  const displayName = currentChannel?.name || this.currentChannelId;
2739
- return ReactEcs3.createElement(UiEntity3, {
2857
+ return ReactEcs4.createElement(UiEntity4, {
2740
2858
  uiTransform: {
2741
2859
  height: 40,
2742
2860
  width: "100%",
@@ -2751,12 +2869,12 @@ var ChatUIModule = class {
2751
2869
  this.showChannelDropdown = !this.showChannelDropdown;
2752
2870
  },
2753
2871
  children: [
2754
- ReactEcs3.createElement(Label3, {
2872
+ ReactEcs4.createElement(Label3, {
2755
2873
  value: `// ${truncateText(displayName, 24)}`,
2756
2874
  fontSize: theme.channelButton,
2757
2875
  color: THEME.colors.white
2758
2876
  }),
2759
- ReactEcs3.createElement(Label3, {
2877
+ ReactEcs4.createElement(Label3, {
2760
2878
  value: this.showChannelDropdown ? "\u25B2" : "\u25BC",
2761
2879
  fontSize: 10,
2762
2880
  color: THEME.colors.cyan
@@ -2785,7 +2903,7 @@ var ChatUIModule = class {
2785
2903
  const visibleMessages = allMessages.slice(startIdx, endIdx);
2786
2904
  const canScrollUp = this.chatScrollOffset < maxOffset;
2787
2905
  const canScrollDown = this.chatScrollOffset > 0;
2788
- return ReactEcs3.createElement(UiEntity3, {
2906
+ return ReactEcs4.createElement(UiEntity4, {
2789
2907
  uiTransform: { flexGrow: 1, width: "100%", flexDirection: "row", overflow: "hidden" },
2790
2908
  children: [
2791
2909
  // Messages - anchored at the bottom, so the newest stays in view now that a row grows with its text
@@ -2793,7 +2911,7 @@ var ChatUIModule = class {
2793
2911
  // past it; now its oldest clips at the top, one scroll up away. The rows keep their height
2794
2912
  // (flexShrink 0 - the protocol's default of 1 squeezes them onto each other) in one column
2795
2913
  // (nowrap - the protocol documents wrap as its default).
2796
- ReactEcs3.createElement(UiEntity3, {
2914
+ ReactEcs4.createElement(UiEntity4, {
2797
2915
  uiTransform: {
2798
2916
  flexGrow: 1,
2799
2917
  flexDirection: "column",
@@ -2807,7 +2925,7 @@ var ChatUIModule = class {
2807
2925
  )
2808
2926
  }),
2809
2927
  // Scroll controls
2810
- ReactEcs3.createElement(UiEntity3, {
2928
+ ReactEcs4.createElement(UiEntity4, {
2811
2929
  uiTransform: {
2812
2930
  width: 28,
2813
2931
  height: "100%",
@@ -2817,22 +2935,22 @@ var ChatUIModule = class {
2817
2935
  gap: 8
2818
2936
  },
2819
2937
  children: [
2820
- ReactEcs3.createElement(UiEntity3, {
2938
+ ReactEcs4.createElement(UiEntity4, {
2821
2939
  uiTransform: { width: 26, height: 36, justifyContent: "center", alignItems: "center" },
2822
2940
  uiBackground: { color: canScrollUp ? THEME.colors.buttonBackground : Color44.create(0.1, 0.1, 0.1, 0.3) },
2823
2941
  onMouseDown: () => {
2824
2942
  if (canScrollUp) this.chatScrollOffset += 1;
2825
2943
  },
2826
2944
  children: [
2827
- ReactEcs3.createElement(UiEntity3, {
2945
+ ReactEcs4.createElement(UiEntity4, {
2828
2946
  uiText: { value: "\u25B2", fontSize: 14, color: canScrollUp ? THEME.colors.cyan : THEME.colors.gray }
2829
2947
  })
2830
2948
  ]
2831
2949
  }),
2832
- ReactEcs3.createElement(UiEntity3, {
2950
+ ReactEcs4.createElement(UiEntity4, {
2833
2951
  uiTransform: { width: 26, height: 24, justifyContent: "center", alignItems: "center" },
2834
2952
  children: [
2835
- ReactEcs3.createElement(UiEntity3, {
2953
+ ReactEcs4.createElement(UiEntity4, {
2836
2954
  uiText: {
2837
2955
  value: totalMessages > UI_DIMENSIONS.chat.messagesPerPage ? `${this.chatScrollOffset}` : "-",
2838
2956
  fontSize: 10,
@@ -2841,14 +2959,14 @@ var ChatUIModule = class {
2841
2959
  })
2842
2960
  ]
2843
2961
  }),
2844
- ReactEcs3.createElement(UiEntity3, {
2962
+ ReactEcs4.createElement(UiEntity4, {
2845
2963
  uiTransform: { width: 26, height: 36, justifyContent: "center", alignItems: "center" },
2846
2964
  uiBackground: { color: canScrollDown ? THEME.colors.buttonBackground : Color44.create(0.1, 0.1, 0.1, 0.3) },
2847
2965
  onMouseDown: () => {
2848
2966
  if (canScrollDown) this.chatScrollOffset -= 1;
2849
2967
  },
2850
2968
  children: [
2851
- ReactEcs3.createElement(UiEntity3, {
2969
+ ReactEcs4.createElement(UiEntity4, {
2852
2970
  uiText: { value: "\u25BC", fontSize: 14, color: canScrollDown ? THEME.colors.cyan : THEME.colors.gray }
2853
2971
  })
2854
2972
  ]
@@ -2859,7 +2977,7 @@ var ChatUIModule = class {
2859
2977
  });
2860
2978
  }
2861
2979
  renderSystemMessage(msg, theme) {
2862
- return ReactEcs3.createElement(UiEntity3, {
2980
+ return ReactEcs4.createElement(UiEntity4, {
2863
2981
  key: msg.id,
2864
2982
  uiTransform: { width: "100%", height: 24, marginBottom: 4, flexShrink: 0 },
2865
2983
  uiText: {
@@ -2879,12 +2997,12 @@ var ChatUIModule = class {
2879
2997
  if (displayName.toLowerCase().includes("admin")) accentColor = THEME.colors.magenta;
2880
2998
  else if (isCurrentUser) accentColor = THEME.colors.green;
2881
2999
  const textRoom = this.messageTextRoom(msg.text, theme.chatMessage);
2882
- return ReactEcs3.createElement(UiEntity3, {
3000
+ return ReactEcs4.createElement(UiEntity4, {
2883
3001
  key: msg.id,
2884
3002
  uiTransform: { width: "100%", flexDirection: "column", marginBottom: 16, flexShrink: 0 },
2885
3003
  children: [
2886
3004
  // Header row
2887
- ReactEcs3.createElement(UiEntity3, {
3005
+ ReactEcs4.createElement(UiEntity4, {
2888
3006
  uiTransform: {
2889
3007
  width: "100%",
2890
3008
  height: 24,
@@ -2894,23 +3012,23 @@ var ChatUIModule = class {
2894
3012
  marginBottom: 4
2895
3013
  },
2896
3014
  children: [
2897
- ReactEcs3.createElement(UiEntity3, {
3015
+ ReactEcs4.createElement(UiEntity4, {
2898
3016
  uiText: { value: displayName, fontSize: theme.chatUsername, color: accentColor, textAlign: "middle-left" }
2899
3017
  }),
2900
- ReactEcs3.createElement(UiEntity3, {
3018
+ ReactEcs4.createElement(UiEntity4, {
2901
3019
  uiText: { value: time, fontSize: theme.chatTimestamp, color: THEME.colors.gray, textAlign: "middle-right" }
2902
3020
  })
2903
3021
  ]
2904
3022
  }),
2905
3023
  // Message content
2906
- ReactEcs3.createElement(UiEntity3, {
3024
+ ReactEcs4.createElement(UiEntity4, {
2907
3025
  uiTransform: { width: "100%", flexDirection: "row", alignItems: "stretch", paddingLeft: 8 },
2908
3026
  children: [
2909
- ReactEcs3.createElement(UiEntity3, {
3027
+ ReactEcs4.createElement(UiEntity4, {
2910
3028
  uiTransform: { width: 3, minHeight: textRoom },
2911
3029
  uiBackground: { color: accentColor }
2912
3030
  }),
2913
- ReactEcs3.createElement(UiEntity3, {
3031
+ ReactEcs4.createElement(UiEntity4, {
2914
3032
  uiTransform: { flexGrow: 1, minHeight: textRoom, paddingLeft: 12, paddingTop: 4, paddingBottom: 4 },
2915
3033
  uiText: {
2916
3034
  value: msg.text,
@@ -2926,7 +3044,7 @@ var ChatUIModule = class {
2926
3044
  });
2927
3045
  }
2928
3046
  renderUserInfoBar(theme) {
2929
- return ReactEcs3.createElement(UiEntity3, {
3047
+ return ReactEcs4.createElement(UiEntity4, {
2930
3048
  uiTransform: {
2931
3049
  width: "100%",
2932
3050
  height: 34,
@@ -2938,12 +3056,12 @@ var ChatUIModule = class {
2938
3056
  },
2939
3057
  uiBackground: { color: Color44.create(0.03, 0.03, 0.05, 1) },
2940
3058
  children: [
2941
- ReactEcs3.createElement(Label3, {
3059
+ ReactEcs4.createElement(Label3, {
2942
3060
  value: `// ${this.currentUsername || "Guest"}`,
2943
3061
  fontSize: theme.userInfo,
2944
3062
  color: THEME.colors.yellow
2945
3063
  }),
2946
- ReactEcs3.createElement(Label3, {
3064
+ ReactEcs4.createElement(Label3, {
2947
3065
  value: this.isRegisteredUser ? "\u25CF CITIZEN" : "\u25CB GUEST",
2948
3066
  fontSize: theme.authStatus,
2949
3067
  color: this.isRegisteredUser ? THEME.colors.green : THEME.colors.gray
@@ -2954,7 +3072,7 @@ var ChatUIModule = class {
2954
3072
  renderInputArea(theme) {
2955
3073
  const baseUrl = this.getBaseUrl();
2956
3074
  if (!this.isRegisteredUser) {
2957
- return ReactEcs3.createElement(UiEntity3, {
3075
+ return ReactEcs4.createElement(UiEntity4, {
2958
3076
  uiTransform: {
2959
3077
  height: 75,
2960
3078
  minHeight: 75,
@@ -2968,14 +3086,14 @@ var ChatUIModule = class {
2968
3086
  },
2969
3087
  uiBackground: { color: Color44.create(0.08, 0.08, 0.1, 1) },
2970
3088
  children: [
2971
- ReactEcs3.createElement(Label3, {
3089
+ ReactEcs4.createElement(Label3, {
2972
3090
  value: "ACCESS RESTRICTED: CITIZENS ONLY",
2973
3091
  fontSize: 12,
2974
3092
  color: THEME.colors.red,
2975
3093
  textAlign: "middle-center",
2976
3094
  uiTransform: { marginBottom: 5 }
2977
3095
  }),
2978
- ReactEcs3.createElement(Button2, {
3096
+ ReactEcs4.createElement(Button2, {
2979
3097
  value: "REGISTER IDENTITY",
2980
3098
  fontSize: 14,
2981
3099
  uiTransform: { width: 200, height: 30 },
@@ -2988,7 +3106,7 @@ var ChatUIModule = class {
2988
3106
  ]
2989
3107
  });
2990
3108
  }
2991
- return ReactEcs3.createElement(UiEntity3, {
3109
+ return ReactEcs4.createElement(UiEntity4, {
2992
3110
  uiTransform: {
2993
3111
  height: 75,
2994
3112
  minHeight: 75,
@@ -3000,7 +3118,7 @@ var ChatUIModule = class {
3000
3118
  },
3001
3119
  uiBackground: { color: Color44.create(0.08, 0.08, 0.1, 1) },
3002
3120
  children: [
3003
- ReactEcs3.createElement(Input3, {
3121
+ ReactEcs4.createElement(Input3, {
3004
3122
  onChange: (v) => {
3005
3123
  this.inputText = v;
3006
3124
  },
@@ -3013,7 +3131,7 @@ var ChatUIModule = class {
3013
3131
  uiBackground: { color: Color44.create(0.12, 0.12, 0.14, 1) },
3014
3132
  uiTransform: { flexGrow: 1, height: "100%", margin: { right: 10 } }
3015
3133
  }),
3016
- ReactEcs3.createElement(Button2, {
3134
+ ReactEcs4.createElement(Button2, {
3017
3135
  value: this.isSigningIn ? "..." : "SEND",
3018
3136
  onMouseDown: () => this.handleSend(),
3019
3137
  uiTransform: { width: 80, height: "100%" },
@@ -3030,7 +3148,7 @@ var ChatUIModule = class {
3030
3148
  const endIdx = startIdx + UI_DIMENSIONS.chat.channelsPerPage;
3031
3149
  const visibleChannels = this.channels.slice(startIdx, endIdx);
3032
3150
  const totalPages = Math.ceil(this.channels.length / UI_DIMENSIONS.chat.channelsPerPage);
3033
- return ReactEcs3.createElement(UiEntity3, {
3151
+ return ReactEcs4.createElement(UiEntity4, {
3034
3152
  uiTransform: {
3035
3153
  width: "100%",
3036
3154
  height: 260,
@@ -3041,13 +3159,13 @@ var ChatUIModule = class {
3041
3159
  uiBackground: { color: Color44.create(0.08, 0.1, 0.14, 1) },
3042
3160
  children: [
3043
3161
  // Top border
3044
- ReactEcs3.createElement(UiEntity3, {
3162
+ ReactEcs4.createElement(UiEntity4, {
3045
3163
  uiTransform: { width: "100%", height: 2, flexShrink: 0 },
3046
3164
  uiBackground: { color: THEME.colors.cyan }
3047
3165
  }),
3048
3166
  // Channel list
3049
3167
  ...visibleChannels.map(
3050
- (channel) => ReactEcs3.createElement(UiEntity3, {
3168
+ (channel) => ReactEcs4.createElement(UiEntity4, {
3051
3169
  key: channel.id,
3052
3170
  uiTransform: {
3053
3171
  height: 38,
@@ -3060,7 +3178,7 @@ var ChatUIModule = class {
3060
3178
  },
3061
3179
  onMouseDown: () => this.switchChannel(channel.id),
3062
3180
  children: [
3063
- ReactEcs3.createElement(Label3, {
3181
+ ReactEcs4.createElement(Label3, {
3064
3182
  value: channel.id === this.currentChannelId ? `\u25B8 ${channel.name}` : channel.name,
3065
3183
  fontSize: theme.channelDropdown,
3066
3184
  color: channel.id === this.currentChannelId ? THEME.colors.cyan : THEME.colors.gray
@@ -3070,7 +3188,7 @@ var ChatUIModule = class {
3070
3188
  ),
3071
3189
  // Pagination
3072
3190
  ...totalPages > 1 ? [
3073
- ReactEcs3.createElement(UiEntity3, {
3191
+ ReactEcs4.createElement(UiEntity4, {
3074
3192
  key: "pagination",
3075
3193
  uiTransform: {
3076
3194
  width: "100%",
@@ -3083,11 +3201,11 @@ var ChatUIModule = class {
3083
3201
  },
3084
3202
  children: [
3085
3203
  ...this.channelPage > 0 ? [
3086
- ReactEcs3.createElement(UiEntity3, {
3204
+ ReactEcs4.createElement(UiEntity4, {
3087
3205
  key: "prev",
3088
3206
  onMouseDown: () => this.channelPage--,
3089
3207
  children: [
3090
- ReactEcs3.createElement(Label3, {
3208
+ ReactEcs4.createElement(Label3, {
3091
3209
  value: "<< PREV",
3092
3210
  fontSize: 10,
3093
3211
  color: THEME.colors.cyan
@@ -3095,17 +3213,17 @@ var ChatUIModule = class {
3095
3213
  ]
3096
3214
  })
3097
3215
  ] : [],
3098
- ReactEcs3.createElement(Label3, {
3216
+ ReactEcs4.createElement(Label3, {
3099
3217
  value: `${this.channelPage + 1}/${totalPages}`,
3100
3218
  fontSize: 10,
3101
3219
  color: THEME.colors.gray
3102
3220
  }),
3103
3221
  ...this.channelPage < totalPages - 1 ? [
3104
- ReactEcs3.createElement(UiEntity3, {
3222
+ ReactEcs4.createElement(UiEntity4, {
3105
3223
  key: "next",
3106
3224
  onMouseDown: () => this.channelPage++,
3107
3225
  children: [
3108
- ReactEcs3.createElement(Label3, {
3226
+ ReactEcs4.createElement(Label3, {
3109
3227
  value: "NEXT >>",
3110
3228
  fontSize: 10,
3111
3229
  color: THEME.colors.cyan
@@ -3117,7 +3235,7 @@ var ChatUIModule = class {
3117
3235
  })
3118
3236
  ] : [],
3119
3237
  // Bottom border
3120
- ReactEcs3.createElement(UiEntity3, {
3238
+ ReactEcs4.createElement(UiEntity4, {
3121
3239
  uiTransform: { width: "100%", height: 1, flexShrink: 0 },
3122
3240
  uiBackground: { color: THEME.colors.panelBorder }
3123
3241
  })
@@ -3128,7 +3246,24 @@ var ChatUIModule = class {
3128
3246
  const unreadBadge = this._unreadCount > 0 ? ` (${this._unreadCount})` : "";
3129
3247
  const buttonText = this._isVisible ? "CLOSE" : `CHAT${unreadBadge}`;
3130
3248
  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, {
3249
+ const label = ReactEcs4.createElement(UiEntity4, {
3250
+ uiText: {
3251
+ value: buttonText,
3252
+ fontSize: this.s(14),
3253
+ color: THEME.colors.white,
3254
+ textAlign: "middle-center"
3255
+ }
3256
+ });
3257
+ const press = () => this._isVisible ? this.hide() : this.show();
3258
+ if (this.client.isPhone) {
3259
+ return toolbarButton(0, {
3260
+ uiTransform: { justifyContent: "center", alignItems: "center" },
3261
+ uiBackground: { color: buttonColor },
3262
+ onMouseDown: press,
3263
+ children: [label]
3264
+ }, true, this.client.uiScale);
3265
+ }
3266
+ return ReactEcs4.createElement(UiEntity4, {
3132
3267
  uiTransform: {
3133
3268
  positionType: "absolute",
3134
3269
  position: { right: 20, bottom: 10 },
@@ -3138,29 +3273,20 @@ var ChatUIModule = class {
3138
3273
  alignItems: "center"
3139
3274
  },
3140
3275
  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
- ]
3276
+ onMouseDown: press,
3277
+ children: [label]
3152
3278
  });
3153
3279
  }
3154
3280
  };
3155
3281
 
3156
3282
  // 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";
3283
+ import ReactEcs7, { UiEntity as UiEntity7, Button as Button4, Label as Label6, Input as Input4 } from "@dcl/sdk/react-ecs";
3158
3284
  import { Color4 as Color46 } from "@dcl/sdk/math";
3159
3285
  import { getPlayer as getPlayer2 } from "@dcl/sdk/players";
3160
3286
  import { openExternalUrl as openExternalUrl5 } from "~system/RestrictedActions";
3161
3287
 
3162
3288
  // src/ui/ui-renderer.tsx
3163
- import ReactEcs4, { ReactEcsRenderer, UiEntity as UiEntity4, Label as Label4 } from "@dcl/sdk/react-ecs";
3289
+ import ReactEcs5, { ReactEcsRenderer, UiEntity as UiEntity5, Label as Label4 } from "@dcl/sdk/react-ecs";
3164
3290
  import { engine as engine3 } from "@dcl/sdk/ecs";
3165
3291
  var notificationText = "";
3166
3292
  var notificationVisible = false;
@@ -3193,8 +3319,8 @@ function NotificationBanner() {
3193
3319
  if (!notificationVisible) return null;
3194
3320
  return (
3195
3321
  // Full-width container to center the notification
3196
- /* @__PURE__ */ ReactEcs4.createElement(
3197
- UiEntity4,
3322
+ /* @__PURE__ */ ReactEcs5.createElement(
3323
+ UiEntity5,
3198
3324
  {
3199
3325
  uiTransform: {
3200
3326
  positionType: "absolute",
@@ -3204,8 +3330,8 @@ function NotificationBanner() {
3204
3330
  alignItems: "center"
3205
3331
  }
3206
3332
  },
3207
- /* @__PURE__ */ ReactEcs4.createElement(
3208
- UiEntity4,
3333
+ /* @__PURE__ */ ReactEcs5.createElement(
3334
+ UiEntity5,
3209
3335
  {
3210
3336
  uiTransform: {
3211
3337
  width: N.width,
@@ -3215,8 +3341,8 @@ function NotificationBanner() {
3215
3341
  },
3216
3342
  uiBackground: { color: C.panel }
3217
3343
  },
3218
- /* @__PURE__ */ ReactEcs4.createElement(
3219
- UiEntity4,
3344
+ /* @__PURE__ */ ReactEcs5.createElement(
3345
+ UiEntity5,
3220
3346
  {
3221
3347
  uiTransform: {
3222
3348
  width: N.borderWidth,
@@ -3225,8 +3351,8 @@ function NotificationBanner() {
3225
3351
  uiBackground: { color: C.cyan }
3226
3352
  }
3227
3353
  ),
3228
- /* @__PURE__ */ ReactEcs4.createElement(
3229
- UiEntity4,
3354
+ /* @__PURE__ */ ReactEcs5.createElement(
3355
+ UiEntity5,
3230
3356
  {
3231
3357
  uiTransform: {
3232
3358
  flexGrow: 1,
@@ -3236,7 +3362,7 @@ function NotificationBanner() {
3236
3362
  alignItems: "flex-start"
3237
3363
  }
3238
3364
  },
3239
- /* @__PURE__ */ ReactEcs4.createElement(
3365
+ /* @__PURE__ */ ReactEcs5.createElement(
3240
3366
  Label4,
3241
3367
  {
3242
3368
  value: notificationText,
@@ -3246,8 +3372,8 @@ function NotificationBanner() {
3246
3372
  }
3247
3373
  )
3248
3374
  ),
3249
- /* @__PURE__ */ ReactEcs4.createElement(
3250
- UiEntity4,
3375
+ /* @__PURE__ */ ReactEcs5.createElement(
3376
+ UiEntity5,
3251
3377
  {
3252
3378
  uiTransform: {
3253
3379
  width: 5,
@@ -3269,8 +3395,8 @@ function createStaticUI(client) {
3269
3395
  const guideComponent = client.guideUI?.getComponent() ?? null;
3270
3396
  const chatComponent = client.chatUI?.getComponent() ?? null;
3271
3397
  const adminComponent = client.adminPanel?.getComponent() ?? null;
3272
- return /* @__PURE__ */ ReactEcs4.createElement(
3273
- UiEntity4,
3398
+ return /* @__PURE__ */ ReactEcs5.createElement(
3399
+ UiEntity5,
3274
3400
  {
3275
3401
  key: `static-ui-root-${currentScale}`,
3276
3402
  uiTransform: {
@@ -3281,7 +3407,7 @@ function createStaticUI(client) {
3281
3407
  alignItems: "center"
3282
3408
  }
3283
3409
  },
3284
- blocked ? null : /* @__PURE__ */ ReactEcs4.createElement(NotificationBanner, null),
3410
+ blocked ? null : /* @__PURE__ */ ReactEcs5.createElement(NotificationBanner, null),
3285
3411
  guideComponent,
3286
3412
  chatComponent,
3287
3413
  adminComponent
@@ -3294,7 +3420,7 @@ function setupStaticUI(client) {
3294
3420
  }
3295
3421
 
3296
3422
  // src/ui/blocked-notice.tsx
3297
- import ReactEcs5, { UiEntity as UiEntity5, Label as Label5, Button as Button3 } from "@dcl/sdk/react-ecs";
3423
+ import ReactEcs6, { UiEntity as UiEntity6, Label as Label5, Button as Button3 } from "@dcl/sdk/react-ecs";
3298
3424
  import { Color4 as Color45 } from "@dcl/sdk/math";
3299
3425
  import { openExternalUrl as openExternalUrl4 } from "~system/RestrictedActions";
3300
3426
  var DEFAULT_SITE_URL = "https://thestatic.tv";
@@ -3321,8 +3447,8 @@ function BlockedNotice(props) {
3321
3447
  const s = (v) => Math.round(v * props.scale);
3322
3448
  const [title, ...body] = lines;
3323
3449
  const action = blockedNoticeAction(props.standing, props.siteUrl || DEFAULT_SITE_URL);
3324
- return /* @__PURE__ */ ReactEcs5.createElement(
3325
- UiEntity5,
3450
+ return /* @__PURE__ */ ReactEcs6.createElement(
3451
+ UiEntity6,
3326
3452
  {
3327
3453
  uiTransform: {
3328
3454
  width: "100%",
@@ -3332,15 +3458,15 @@ function BlockedNotice(props) {
3332
3458
  alignItems: "center"
3333
3459
  }
3334
3460
  },
3335
- /* @__PURE__ */ ReactEcs5.createElement(
3336
- UiEntity5,
3461
+ /* @__PURE__ */ ReactEcs6.createElement(
3462
+ UiEntity6,
3337
3463
  {
3338
3464
  uiTransform: { width: s(460), flexDirection: "column", alignItems: "center", padding: s(20) },
3339
3465
  uiBackground: { color: Color45.create(0.05, 0.05, 0.08, 0.95) }
3340
3466
  },
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(
3467
+ /* @__PURE__ */ ReactEcs6.createElement(Label5, { value: title, fontSize: s(22), color: Color45.create(0.9, 0.2, 0.2, 1), uiTransform: { height: s(34) } }),
3468
+ body.map((line, i) => /* @__PURE__ */ ReactEcs6.createElement(Label5, { key: `blocked-line-${i}`, value: line, fontSize: s(16), color: Color45.White(), uiTransform: { height: s(26) } })),
3469
+ action && /* @__PURE__ */ ReactEcs6.createElement(
3344
3470
  Button3,
3345
3471
  {
3346
3472
  uiTransform: { width: s(220), height: s(36), margin: { top: s(12) } },
@@ -3831,15 +3957,15 @@ var AdminPanelUIModule = class {
3831
3957
  this.privateStatus = line;
3832
3958
  } };
3833
3959
  // --- UI Components ---
3834
- this.SectionHead = ({ label, color }) => /* @__PURE__ */ ReactEcs6.createElement(
3835
- UiEntity6,
3960
+ this.SectionHead = ({ label, color }) => /* @__PURE__ */ ReactEcs7.createElement(
3961
+ UiEntity7,
3836
3962
  {
3837
3963
  uiTransform: { width: "100%", height: this.s(UI_DIMENSIONS.admin.sectionHeadHeight), margin: { bottom: 8 }, padding: { left: 10 }, alignItems: "center" },
3838
3964
  uiBackground: { color: Color46.create(color.r * 0.3, color.g * 0.3, color.b * 0.3, 0.5) }
3839
3965
  },
3840
- /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: label, fontSize: this.theme.sectionHead, color })
3966
+ /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: label, fontSize: this.theme.sectionHead, color })
3841
3967
  );
3842
- this.TabBtn = ({ label, tab }) => /* @__PURE__ */ ReactEcs6.createElement(
3968
+ this.TabBtn = ({ label, tab }) => /* @__PURE__ */ ReactEcs7.createElement(
3843
3969
  Button4,
3844
3970
  {
3845
3971
  uiTransform: { flexGrow: 1, height: this.s(UI_DIMENSIONS.admin.tabHeight), justifyContent: "center", alignItems: "center" },
@@ -3858,7 +3984,7 @@ var AdminPanelUIModule = class {
3858
3984
  */
3859
3985
  this.ControlsTab = () => {
3860
3986
  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(
3987
+ 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
3988
  Label6,
3863
3989
  {
3864
3990
  value: this.controlStatus,
@@ -3873,7 +3999,7 @@ var AdminPanelUIModule = class {
3873
3999
  this.fetchStreamData();
3874
4000
  }
3875
4001
  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(
4002
+ 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
4003
  Button4,
3878
4004
  {
3879
4005
  uiTransform: { width: this.s(200), height: this.s(UI_DIMENSIONS.admin.buttonHeight), margin: { bottom: 6 } },
@@ -3883,7 +4009,7 @@ var AdminPanelUIModule = class {
3883
4009
  color: C2.text,
3884
4010
  onMouseDown: () => this.claimTrial()
3885
4011
  }
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(
4012
+ ), 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
4013
  Button4,
3888
4014
  {
3889
4015
  uiTransform: { width: this.s(170), height: this.s(UI_DIMENSIONS.admin.buttonHeight), margin: { bottom: 6 } },
@@ -3893,14 +4019,14 @@ var AdminPanelUIModule = class {
3893
4019
  color: C2.text,
3894
4020
  onMouseDown: () => this.createChannel()
3895
4021
  }
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(
4022
+ ), 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
4023
  Label6,
3898
4024
  {
3899
4025
  value: this.streamData.isLive ? `LIVE \u2022 ${this.streamData.currentViewers || 0} viewers` : "OFFLINE",
3900
4026
  fontSize: t.label,
3901
4027
  color: this.streamData.isLive ? C2.red : C2.textDim
3902
4028
  }
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(
4029
+ ), /* @__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
4030
  Label6,
3905
4031
  {
3906
4032
  value: `Channel: ${this.streamData.channelName || this.streamData.channelId}`,
@@ -3908,7 +4034,7 @@ var AdminPanelUIModule = class {
3908
4034
  color: C2.textDim,
3909
4035
  uiTransform: { margin: { bottom: 10 } }
3910
4036
  }
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(
4037
+ ), /* @__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
4038
  Label6,
3913
4039
  {
3914
4040
  value: this.streamData.rtmpUrl || "Loading...",
@@ -3916,7 +4042,7 @@ var AdminPanelUIModule = class {
3916
4042
  color: this.streamData.rtmpUrl ? C2.text : C2.textDim,
3917
4043
  uiTransform: { margin: { left: 6 } }
3918
4044
  }
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(
4045
+ )), /* @__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
4046
  Label6,
3921
4047
  {
3922
4048
  value: this.streamData.streamKey || "Loading...",
@@ -3924,7 +4050,7 @@ var AdminPanelUIModule = class {
3924
4050
  color: this.streamData.streamKey ? C2.cyan : C2.textDim,
3925
4051
  uiTransform: { margin: { left: 6 } }
3926
4052
  }
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(
4053
+ )), /* @__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
4054
  Label6,
3929
4055
  {
3930
4056
  value: this.streamData.locked === true ? LOCKED_LINE : this.streamData.hlsUrl || "Not available",
@@ -3932,7 +4058,7 @@ var AdminPanelUIModule = class {
3932
4058
  color: this.streamData.locked === true ? C2.yellow : this.streamData.hlsUrl ? C2.green : C2.textDim,
3933
4059
  uiTransform: { margin: { left: 6 } }
3934
4060
  }
3935
- )), /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "row", flexWrap: "wrap", margin: { bottom: 6 } } }, !this.streamData.isLive && /* @__PURE__ */ ReactEcs6.createElement(
4061
+ )), /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "row", flexWrap: "wrap", margin: { bottom: 6 } } }, !this.streamData.isLive && /* @__PURE__ */ ReactEcs7.createElement(
3936
4062
  Button4,
3937
4063
  {
3938
4064
  uiTransform: { width: this.s(110), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
@@ -3942,7 +4068,7 @@ var AdminPanelUIModule = class {
3942
4068
  color: C2.text,
3943
4069
  onMouseDown: () => this.startStream()
3944
4070
  }
3945
- ), this.streamData.isLive && /* @__PURE__ */ ReactEcs6.createElement(
4071
+ ), this.streamData.isLive && /* @__PURE__ */ ReactEcs7.createElement(
3946
4072
  Button4,
3947
4073
  {
3948
4074
  uiTransform: { width: this.s(110), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
@@ -3952,7 +4078,7 @@ var AdminPanelUIModule = class {
3952
4078
  color: C2.text,
3953
4079
  onMouseDown: () => this.stopStream()
3954
4080
  }
3955
- ), this.streamData.isLive && (this.streamData.hlsUrl || this.streamData.locked === true) && /* @__PURE__ */ ReactEcs6.createElement(
4081
+ ), this.streamData.isLive && (this.streamData.hlsUrl || this.streamData.locked === true) && /* @__PURE__ */ ReactEcs7.createElement(
3956
4082
  Button4,
3957
4083
  {
3958
4084
  uiTransform: { width: this.s(100), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
@@ -3962,7 +4088,7 @@ var AdminPanelUIModule = class {
3962
4088
  color: C2.text,
3963
4089
  onMouseDown: () => this.playStreamOnScreen()
3964
4090
  }
3965
- )), /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "row", flexWrap: "wrap", margin: { bottom: 6 } } }, /* @__PURE__ */ ReactEcs6.createElement(
4091
+ )), /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "row", flexWrap: "wrap", margin: { bottom: 6 } } }, /* @__PURE__ */ ReactEcs7.createElement(
3966
4092
  Button4,
3967
4093
  {
3968
4094
  uiTransform: { width: this.s(80), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
@@ -3972,7 +4098,7 @@ var AdminPanelUIModule = class {
3972
4098
  color: C2.text,
3973
4099
  onMouseDown: () => this.refreshStreamStatus()
3974
4100
  }
3975
- ), /* @__PURE__ */ ReactEcs6.createElement(
4101
+ ), /* @__PURE__ */ ReactEcs7.createElement(
3976
4102
  Button4,
3977
4103
  {
3978
4104
  uiTransform: { width: this.s(95), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
@@ -3982,7 +4108,7 @@ var AdminPanelUIModule = class {
3982
4108
  color: C2.text,
3983
4109
  onMouseDown: () => this.rotateStreamKey()
3984
4110
  }
3985
- ), !this.streamData.isLive && !this.channelDeleteLook && /* @__PURE__ */ ReactEcs6.createElement(
4111
+ ), !this.streamData.isLive && !this.channelDeleteLook && /* @__PURE__ */ ReactEcs7.createElement(
3986
4112
  Button4,
3987
4113
  {
3988
4114
  uiTransform: { width: this.s(70), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
@@ -3992,7 +4118,7 @@ var AdminPanelUIModule = class {
3992
4118
  color: C2.text,
3993
4119
  onMouseDown: () => this.deleteChannel()
3994
4120
  }
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(
4121
+ )), !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
4122
  Button4,
3997
4123
  {
3998
4124
  uiTransform: { width: this.s(120), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
@@ -4002,7 +4128,7 @@ var AdminPanelUIModule = class {
4002
4128
  color: C2.text,
4003
4129
  onMouseDown: () => this.confirmDeleteChannel()
4004
4130
  }
4005
- ), /* @__PURE__ */ ReactEcs6.createElement(
4131
+ ), /* @__PURE__ */ ReactEcs7.createElement(
4006
4132
  Button4,
4007
4133
  {
4008
4134
  uiTransform: { width: this.s(70), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
@@ -4012,7 +4138,7 @@ var AdminPanelUIModule = class {
4012
4138
  color: C2.text,
4013
4139
  onMouseDown: () => this.cancelDeleteChannel()
4014
4140
  }
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(
4141
+ ))), 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
4142
  Input4,
4017
4143
  {
4018
4144
  uiTransform: { width: this.s(230), height: this.s(UI_DIMENSIONS.admin.inputHeight) },
@@ -4026,7 +4152,7 @@ var AdminPanelUIModule = class {
4026
4152
  this.customVideoUrl = val;
4027
4153
  }
4028
4154
  }
4029
- ), /* @__PURE__ */ ReactEcs6.createElement(
4155
+ ), /* @__PURE__ */ ReactEcs7.createElement(
4030
4156
  Button4,
4031
4157
  {
4032
4158
  uiTransform: { width: this.s(75), height: this.s(UI_DIMENSIONS.admin.inputHeight), margin: { left: 8 } },
@@ -4036,7 +4162,7 @@ var AdminPanelUIModule = class {
4036
4162
  color: C2.text,
4037
4163
  onMouseDown: () => this.playNow()
4038
4164
  }
4039
- ), /* @__PURE__ */ ReactEcs6.createElement(
4165
+ ), /* @__PURE__ */ ReactEcs7.createElement(
4040
4166
  Button4,
4041
4167
  {
4042
4168
  uiTransform: { width: this.s(65), height: this.s(UI_DIMENSIONS.admin.inputHeight), margin: { left: 6 } },
@@ -4048,7 +4174,7 @@ var AdminPanelUIModule = class {
4048
4174
  this.customVideoUrl = "";
4049
4175
  }
4050
4176
  }
4051
- )), this.videoStatus && /* @__PURE__ */ ReactEcs6.createElement(
4177
+ )), this.videoStatus && /* @__PURE__ */ ReactEcs7.createElement(
4052
4178
  Label6,
4053
4179
  {
4054
4180
  value: this.videoStatus,
@@ -4056,7 +4182,7 @@ var AdminPanelUIModule = class {
4056
4182
  color: this.videoStatus.startsWith("Not sent") || this.videoStatus === LOCKED_LINE || this.videoStatus === UNAVAILABLE_LINE ? C2.red : C2.green,
4057
4183
  uiTransform: { height: this.s(18), margin: { bottom: 6 } }
4058
4184
  }
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(
4185
+ ), /* @__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
4186
  Button4,
4061
4187
  {
4062
4188
  uiTransform: { width: this.s(75), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
@@ -4066,7 +4192,7 @@ var AdminPanelUIModule = class {
4066
4192
  color: C2.text,
4067
4193
  onMouseDown: () => this.playbackPlay()
4068
4194
  }
4069
- ), /* @__PURE__ */ ReactEcs6.createElement(
4195
+ ), /* @__PURE__ */ ReactEcs7.createElement(
4070
4196
  Button4,
4071
4197
  {
4072
4198
  uiTransform: { width: this.s(75), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
@@ -4076,7 +4202,7 @@ var AdminPanelUIModule = class {
4076
4202
  color: C2.text,
4077
4203
  onMouseDown: () => this.playbackStop()
4078
4204
  }
4079
- ), /* @__PURE__ */ ReactEcs6.createElement(
4205
+ ), /* @__PURE__ */ ReactEcs7.createElement(
4080
4206
  Button4,
4081
4207
  {
4082
4208
  uiTransform: { width: this.s(100), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
@@ -4086,7 +4212,7 @@ var AdminPanelUIModule = class {
4086
4212
  color: C2.text,
4087
4213
  onMouseDown: () => this.resetDefault()
4088
4214
  }
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(
4215
+ )), /* @__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
4216
  Button4,
4091
4217
  {
4092
4218
  key: `play-${slot}`,
@@ -4097,7 +4223,7 @@ var AdminPanelUIModule = class {
4097
4223
  color: C2.text,
4098
4224
  onMouseDown: () => this.pressSlot(slot)
4099
4225
  }
4100
- ))), /* @__PURE__ */ ReactEcs6.createElement(
4226
+ ))), /* @__PURE__ */ ReactEcs7.createElement(
4101
4227
  Button4,
4102
4228
  {
4103
4229
  uiTransform: { height: this.s(24) },
@@ -4111,7 +4237,7 @@ var AdminPanelUIModule = class {
4111
4237
  };
4112
4238
  this.ModTab = () => {
4113
4239
  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(
4240
+ 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
4241
  Label6,
4116
4242
  {
4117
4243
  value: this.kickStatus,
@@ -4119,7 +4245,7 @@ var AdminPanelUIModule = class {
4119
4245
  color: this.kickStatus.startsWith("Kick not sent") ? C2.red : C2.green,
4120
4246
  uiTransform: { height: this.s(18) }
4121
4247
  }
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(
4248
+ ), /* @__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
4249
  Input4,
4124
4250
  {
4125
4251
  uiTransform: { width: this.s(230), height: this.s(UI_DIMENSIONS.admin.inputHeight) },
@@ -4133,7 +4259,7 @@ var AdminPanelUIModule = class {
4133
4259
  this.broadcastText = val;
4134
4260
  }
4135
4261
  }
4136
- ), /* @__PURE__ */ ReactEcs6.createElement(
4262
+ ), /* @__PURE__ */ ReactEcs7.createElement(
4137
4263
  Button4,
4138
4264
  {
4139
4265
  uiTransform: { width: this.s(65), height: this.s(UI_DIMENSIONS.admin.inputHeight), margin: { left: 8 } },
@@ -4143,7 +4269,7 @@ var AdminPanelUIModule = class {
4143
4269
  color: C2.text,
4144
4270
  onMouseDown: () => this.sendBroadcast()
4145
4271
  }
4146
- )), this.broadcastStatus && /* @__PURE__ */ ReactEcs6.createElement(
4272
+ )), this.broadcastStatus && /* @__PURE__ */ ReactEcs7.createElement(
4147
4273
  Label6,
4148
4274
  {
4149
4275
  value: this.broadcastStatus,
@@ -4151,7 +4277,7 @@ var AdminPanelUIModule = class {
4151
4277
  color: this.broadcastStatus.startsWith("Not sent") ? C2.red : C2.green,
4152
4278
  uiTransform: { height: this.s(18), margin: { bottom: 6 } }
4153
4279
  }
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(
4280
+ ), /* @__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
4281
  Button4,
4156
4282
  {
4157
4283
  uiTransform: { width: this.s(130), height: this.s(UI_DIMENSIONS.admin.buttonHeight), margin: 4 },
@@ -4161,7 +4287,7 @@ var AdminPanelUIModule = class {
4161
4287
  color: C2.text,
4162
4288
  onMouseDown: () => this.kickAll()
4163
4289
  }
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(
4290
+ )), 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
4291
  Button4,
4166
4292
  {
4167
4293
  key: `private-${on ? "on" : "off"}`,
@@ -4172,7 +4298,7 @@ var AdminPanelUIModule = class {
4172
4298
  color: this.privateModeOn === on ? Color46.Black() : C2.text,
4173
4299
  onMouseDown: () => this.setPrivateMode(on)
4174
4300
  }
4175
- ))), this.privateStatus && /* @__PURE__ */ ReactEcs6.createElement(
4301
+ ))), this.privateStatus && /* @__PURE__ */ ReactEcs7.createElement(
4176
4302
  Label6,
4177
4303
  {
4178
4304
  value: this.privateStatus,
@@ -4180,13 +4306,13 @@ var AdminPanelUIModule = class {
4180
4306
  color: this.privateStatus.startsWith("Not sent") ? C2.red : C2.green,
4181
4307
  uiTransform: { height: this.s(18) }
4182
4308
  }
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,
4309
+ )), /* @__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(
4310
+ UiEntity7,
4185
4311
  {
4186
4312
  key: `admin-${i}`,
4187
4313
  uiTransform: { flexDirection: "row", alignItems: "center", margin: { bottom: 5 }, width: "100%" }
4188
4314
  },
4189
- /* @__PURE__ */ ReactEcs6.createElement(
4315
+ /* @__PURE__ */ ReactEcs7.createElement(
4190
4316
  Label6,
4191
4317
  {
4192
4318
  value: `${wallet.slice(0, 6)}...${wallet.slice(-4)}`,
@@ -4195,7 +4321,7 @@ var AdminPanelUIModule = class {
4195
4321
  uiTransform: { width: this.s(130) }
4196
4322
  }
4197
4323
  ),
4198
- /* @__PURE__ */ ReactEcs6.createElement(
4324
+ /* @__PURE__ */ ReactEcs7.createElement(
4199
4325
  Button4,
4200
4326
  {
4201
4327
  uiTransform: { width: this.s(70), height: this.s(28), margin: { left: 8 } },
@@ -4206,7 +4332,7 @@ var AdminPanelUIModule = class {
4206
4332
  onMouseDown: () => this.removeSceneAdmin(wallet)
4207
4333
  }
4208
4334
  )
4209
- ))), /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "row", alignItems: "center", margin: { bottom: 14 } } }, /* @__PURE__ */ ReactEcs6.createElement(
4335
+ ))), /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "row", alignItems: "center", margin: { bottom: 14 } } }, /* @__PURE__ */ ReactEcs7.createElement(
4210
4336
  Input4,
4211
4337
  {
4212
4338
  uiTransform: { width: this.s(230), height: this.s(UI_DIMENSIONS.admin.inputHeight) },
@@ -4220,7 +4346,7 @@ var AdminPanelUIModule = class {
4220
4346
  this.newAdminWallet = val;
4221
4347
  }
4222
4348
  }
4223
- ), /* @__PURE__ */ ReactEcs6.createElement(
4349
+ ), /* @__PURE__ */ ReactEcs7.createElement(
4224
4350
  Button4,
4225
4351
  {
4226
4352
  uiTransform: { width: this.s(60), height: this.s(UI_DIMENSIONS.admin.inputHeight), margin: { left: 8 } },
@@ -4232,13 +4358,13 @@ var AdminPanelUIModule = class {
4232
4358
  if (this.newAdminWallet) this.addSceneAdmin(this.newAdminWallet);
4233
4359
  }
4234
4360
  }
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,
4361
+ )), /* @__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(
4362
+ UiEntity7,
4237
4363
  {
4238
4364
  key: `ban-${i}`,
4239
4365
  uiTransform: { flexDirection: "row", alignItems: "center", margin: { bottom: 5 }, width: "100%" }
4240
4366
  },
4241
- /* @__PURE__ */ ReactEcs6.createElement(
4367
+ /* @__PURE__ */ ReactEcs7.createElement(
4242
4368
  Label6,
4243
4369
  {
4244
4370
  value: `${wallet.slice(0, 6)}...${wallet.slice(-4)}`,
@@ -4247,7 +4373,7 @@ var AdminPanelUIModule = class {
4247
4373
  uiTransform: { width: this.s(130) }
4248
4374
  }
4249
4375
  ),
4250
- /* @__PURE__ */ ReactEcs6.createElement(
4376
+ /* @__PURE__ */ ReactEcs7.createElement(
4251
4377
  Button4,
4252
4378
  {
4253
4379
  uiTransform: { width: this.s(70), height: this.s(28), margin: { left: 8 } },
@@ -4258,7 +4384,7 @@ var AdminPanelUIModule = class {
4258
4384
  onMouseDown: () => this.unbanWallet(wallet)
4259
4385
  }
4260
4386
  )
4261
- ))), /* @__PURE__ */ ReactEcs6.createElement(UiEntity6, { uiTransform: { flexDirection: "row", alignItems: "center", margin: { bottom: 10 } } }, /* @__PURE__ */ ReactEcs6.createElement(
4387
+ ))), /* @__PURE__ */ ReactEcs7.createElement(UiEntity7, { uiTransform: { flexDirection: "row", alignItems: "center", margin: { bottom: 10 } } }, /* @__PURE__ */ ReactEcs7.createElement(
4262
4388
  Input4,
4263
4389
  {
4264
4390
  uiTransform: { width: this.s(230), height: this.s(UI_DIMENSIONS.admin.inputHeight) },
@@ -4272,7 +4398,7 @@ var AdminPanelUIModule = class {
4272
4398
  this.newBanWallet = val;
4273
4399
  }
4274
4400
  }
4275
- ), /* @__PURE__ */ ReactEcs6.createElement(
4401
+ ), /* @__PURE__ */ ReactEcs7.createElement(
4276
4402
  Button4,
4277
4403
  {
4278
4404
  uiTransform: { width: this.s(60), height: this.s(UI_DIMENSIONS.admin.inputHeight), margin: { left: 8 } },
@@ -4284,7 +4410,7 @@ var AdminPanelUIModule = class {
4284
4410
  if (this.newBanWallet) this.banWallet(this.newBanWallet);
4285
4411
  }
4286
4412
  }
4287
- )), /* @__PURE__ */ ReactEcs6.createElement(
4413
+ )), /* @__PURE__ */ ReactEcs7.createElement(
4288
4414
  Button4,
4289
4415
  {
4290
4416
  uiTransform: { height: this.s(24) },
@@ -4331,8 +4457,8 @@ var AdminPanelUIModule = class {
4331
4457
  if (!tabs.find((tab) => tab.id === this.activeTab) && tabs.length > 0) {
4332
4458
  this.activeTab = tabs[0].id;
4333
4459
  }
4334
- return /* @__PURE__ */ ReactEcs6.createElement(
4335
- UiEntity6,
4460
+ return /* @__PURE__ */ ReactEcs7.createElement(
4461
+ UiEntity7,
4336
4462
  {
4337
4463
  uiTransform: {
4338
4464
  width: "100%",
@@ -4341,106 +4467,99 @@ var AdminPanelUIModule = class {
4341
4467
  }
4342
4468
  },
4343
4469
  this.renderScaledNotification(),
4344
- /* @__PURE__ */ ReactEcs6.createElement(
4345
- UiEntity6,
4470
+ this.client.isPhone ? toolbarButton(2, { children: [this.renderToggleFace()] }, true, this.client.uiScale) : /* @__PURE__ */ ReactEcs7.createElement(
4471
+ UiEntity7,
4346
4472
  {
4347
4473
  uiTransform: {
4348
4474
  position: { right: 20 + this.s(100) + 10 + this.s(100) + 10, bottom: 10 },
4349
4475
  positionType: "absolute"
4350
4476
  }
4351
4477
  },
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
- )
4478
+ this.renderToggleFace()
4363
4479
  ),
4364
- this.panelOpen && /* @__PURE__ */ ReactEcs6.createElement(
4365
- UiEntity6,
4366
- {
4367
- key: `admin-panel-${this.client.uiScale}`,
4368
- uiTransform: {
4369
- width: this.s(UI_DIMENSIONS.admin.width),
4370
- height: this.s(UI_DIMENSIONS.admin.height),
4371
- 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 },
4373
- positionType: "absolute",
4374
- flexDirection: "column"
4375
- },
4376
- uiBackground: { color: C2.bg }
4480
+ this.panelOpen && this.client.toolbarPanel({
4481
+ key: `admin-panel-${this.client.uiScale}`,
4482
+ uiTransform: {
4483
+ width: this.s(UI_DIMENSIONS.admin.width),
4484
+ height: this.s(UI_DIMENSIONS.admin.height),
4485
+ maxHeight: this.s(UI_DIMENSIONS.admin.maxHeight),
4486
+ position: { right: UI_DIMENSIONS.chat.right + this.s(UI_DIMENSIONS.chat.width) + 10, bottom: UI_DIMENSIONS.admin.bottom },
4487
+ positionType: "absolute",
4488
+ flexDirection: "column"
4377
4489
  },
4378
- /* @__PURE__ */ ReactEcs6.createElement(
4379
- UiEntity6,
4380
- {
4381
- uiTransform: {
4382
- width: "100%",
4383
- height: this.s(UI_DIMENSIONS.admin.headerHeight),
4384
- justifyContent: "space-between",
4385
- alignItems: "center",
4386
- flexDirection: "row",
4387
- padding: { left: 12, right: 8 }
4490
+ uiBackground: { color: C2.bg },
4491
+ children: [
4492
+ // Header with font controls
4493
+ /* @__PURE__ */ ReactEcs7.createElement(
4494
+ UiEntity7,
4495
+ {
4496
+ uiTransform: {
4497
+ width: "100%",
4498
+ height: this.s(UI_DIMENSIONS.admin.headerHeight),
4499
+ justifyContent: "space-between",
4500
+ alignItems: "center",
4501
+ flexDirection: "row",
4502
+ padding: { left: 12, right: 8 }
4503
+ },
4504
+ uiBackground: { color: C2.header }
4388
4505
  },
4389
- uiBackground: { color: C2.header }
4390
- },
4391
- /* @__PURE__ */ ReactEcs6.createElement(Label6, { value: this.config.title || "ADMIN PANEL", fontSize: t.header, color: C2.text }),
4392
- /* @__PURE__ */ ReactEcs6.createElement(
4393
- Button4,
4506
+ /* @__PURE__ */ ReactEcs7.createElement(Label6, { value: this.config.title || "ADMIN PANEL", fontSize: t.header, color: C2.text }),
4507
+ /* @__PURE__ */ ReactEcs7.createElement(
4508
+ Button4,
4509
+ {
4510
+ uiTransform: { width: this.s(28), height: this.s(28) },
4511
+ uiBackground: { color: Color46.create(0, 0, 0, 0.3) },
4512
+ value: "X",
4513
+ fontSize: t.header,
4514
+ color: THEME.colors.red,
4515
+ onMouseDown: () => this.hide()
4516
+ }
4517
+ )
4518
+ ),
4519
+ // Tabs
4520
+ /* @__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 }))),
4521
+ // Content
4522
+ /* @__PURE__ */ ReactEcs7.createElement(
4523
+ UiEntity7,
4394
4524
  {
4395
- uiTransform: { width: this.s(28), height: this.s(28) },
4396
- uiBackground: { color: Color46.create(0, 0, 0, 0.3) },
4397
- value: "X",
4398
- fontSize: t.header,
4399
- color: THEME.colors.red,
4400
- onMouseDown: () => this.hide()
4401
- }
4402
- )
4403
- ),
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,
4407
- {
4408
- uiTransform: {
4409
- width: "100%",
4410
- flexGrow: 1,
4411
- overflow: "scroll",
4412
- flexDirection: "column"
4413
- }
4414
- },
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),
4418
- this.config.sceneTabs?.map((tab) => this.activeTab === tab.id && tab.render())
4419
- ),
4420
- /* @__PURE__ */ ReactEcs6.createElement(
4421
- UiEntity6,
4422
- {
4423
- uiTransform: {
4424
- width: "100%",
4425
- height: this.s(UI_DIMENSIONS.admin.footerHeight),
4426
- justifyContent: "center",
4427
- alignItems: "center"
4525
+ uiTransform: {
4526
+ width: "100%",
4527
+ flexGrow: 1,
4528
+ overflow: "scroll",
4529
+ flexDirection: "column"
4530
+ }
4428
4531
  },
4429
- uiBackground: { color: C2.section }
4430
- },
4431
- /* @__PURE__ */ ReactEcs6.createElement(
4432
- Button4,
4532
+ this.activeTab === "controls" && this.venue && this.controls.length > 0 && /* @__PURE__ */ ReactEcs7.createElement(this.ControlsTab, null),
4533
+ this.activeTab === "video" && /* @__PURE__ */ ReactEcs7.createElement(this.VideoTab, null),
4534
+ this.activeTab === "mod" && this.isOwner && /* @__PURE__ */ ReactEcs7.createElement(this.ModTab, null),
4535
+ this.config.sceneTabs?.map((tab) => this.activeTab === tab.id && tab.render())
4536
+ ),
4537
+ // Footer
4538
+ /* @__PURE__ */ ReactEcs7.createElement(
4539
+ UiEntity7,
4433
4540
  {
4434
- uiTransform: { height: this.s(24) },
4435
- uiBackground: { color: Color46.create(0, 0, 0, 0) },
4436
- value: `thestatic.tv/scene/${this.config.sceneId}`,
4437
- fontSize: t.labelSmall,
4438
- color: C2.cyan,
4439
- onMouseDown: () => openExternalUrl5({ url: this.config.footerLink || `https://thestatic.tv/scene/${this.config.sceneId}` })
4440
- }
4541
+ uiTransform: {
4542
+ width: "100%",
4543
+ height: this.s(UI_DIMENSIONS.admin.footerHeight),
4544
+ justifyContent: "center",
4545
+ alignItems: "center"
4546
+ },
4547
+ uiBackground: { color: C2.section }
4548
+ },
4549
+ /* @__PURE__ */ ReactEcs7.createElement(
4550
+ Button4,
4551
+ {
4552
+ uiTransform: { height: this.s(24) },
4553
+ uiBackground: { color: Color46.create(0, 0, 0, 0) },
4554
+ value: `thestatic.tv/scene/${this.config.sceneId}`,
4555
+ fontSize: t.labelSmall,
4556
+ color: C2.cyan,
4557
+ onMouseDown: () => openExternalUrl5({ url: this.config.footerLink || `https://thestatic.tv/scene/${this.config.sceneId}` })
4558
+ }
4559
+ )
4441
4560
  )
4442
- )
4443
- )
4561
+ ]
4562
+ })
4444
4563
  );
4445
4564
  };
4446
4565
  this.client = client;
@@ -4642,7 +4761,7 @@ var AdminPanelUIModule = class {
4642
4761
  */
4643
4762
  show() {
4644
4763
  if (this.panelOpen) return;
4645
- this.client.closeOtherPanels("admin");
4764
+ this.client.panelOpened("admin");
4646
4765
  this.panelOpen = true;
4647
4766
  if (this.activeTab === "video") {
4648
4767
  this.startStreamPolling();
@@ -5596,7 +5715,7 @@ var AdminPanelUIModule = class {
5596
5715
  /** A control's button (2026-11-18): the option's label, highlighted while that option is current on this copy */
5597
5716
  controlButton(control, option, label) {
5598
5717
  const current = this.currentOption[control.id] === option;
5599
- return /* @__PURE__ */ ReactEcs6.createElement(
5718
+ return /* @__PURE__ */ ReactEcs7.createElement(
5600
5719
  Button4,
5601
5720
  {
5602
5721
  key: `control-${control.id}-${option}`,
@@ -5619,8 +5738,8 @@ var AdminPanelUIModule = class {
5619
5738
  if (!state.visible) return null;
5620
5739
  const N2 = UI_DIMENSIONS.notification;
5621
5740
  const colors = THEME.colors;
5622
- return /* @__PURE__ */ ReactEcs6.createElement(
5623
- UiEntity6,
5741
+ return /* @__PURE__ */ ReactEcs7.createElement(
5742
+ UiEntity7,
5624
5743
  {
5625
5744
  uiTransform: {
5626
5745
  positionType: "absolute",
@@ -5630,8 +5749,8 @@ var AdminPanelUIModule = class {
5630
5749
  alignItems: "center"
5631
5750
  }
5632
5751
  },
5633
- /* @__PURE__ */ ReactEcs6.createElement(
5634
- UiEntity6,
5752
+ /* @__PURE__ */ ReactEcs7.createElement(
5753
+ UiEntity7,
5635
5754
  {
5636
5755
  uiTransform: {
5637
5756
  minWidth: this.s(200),
@@ -5643,15 +5762,15 @@ var AdminPanelUIModule = class {
5643
5762
  },
5644
5763
  uiBackground: { color: colors.panel }
5645
5764
  },
5646
- /* @__PURE__ */ ReactEcs6.createElement(
5647
- UiEntity6,
5765
+ /* @__PURE__ */ ReactEcs7.createElement(
5766
+ UiEntity7,
5648
5767
  {
5649
5768
  uiTransform: { width: N2.borderWidth, height: "100%" },
5650
5769
  uiBackground: { color: colors.cyan }
5651
5770
  }
5652
5771
  ),
5653
- /* @__PURE__ */ ReactEcs6.createElement(
5654
- UiEntity6,
5772
+ /* @__PURE__ */ ReactEcs7.createElement(
5773
+ UiEntity7,
5655
5774
  {
5656
5775
  uiTransform: {
5657
5776
  flexGrow: 1,
@@ -5661,7 +5780,7 @@ var AdminPanelUIModule = class {
5661
5780
  alignItems: "center"
5662
5781
  }
5663
5782
  },
5664
- /* @__PURE__ */ ReactEcs6.createElement(
5783
+ /* @__PURE__ */ ReactEcs7.createElement(
5665
5784
  Label6,
5666
5785
  {
5667
5786
  value: state.text,
@@ -5671,8 +5790,8 @@ var AdminPanelUIModule = class {
5671
5790
  }
5672
5791
  )
5673
5792
  ),
5674
- /* @__PURE__ */ ReactEcs6.createElement(
5675
- UiEntity6,
5793
+ /* @__PURE__ */ ReactEcs7.createElement(
5794
+ UiEntity7,
5676
5795
  {
5677
5796
  uiTransform: { width: 5, height: 5, margin: { right: 10 } },
5678
5797
  uiBackground: { color: colors.cyan }
@@ -5681,8 +5800,48 @@ var AdminPanelUIModule = class {
5681
5800
  )
5682
5801
  );
5683
5802
  }
5803
+ /** The ADMIN / CLOSE button itself; its place is the row's or, on a phone, the column's (2.12.0) */
5804
+ renderToggleFace() {
5805
+ return /* @__PURE__ */ ReactEcs7.createElement(
5806
+ Button4,
5807
+ {
5808
+ uiTransform: { width: this.s(100), height: this.s(45) },
5809
+ uiBackground: { color: this.panelOpen ? C2.btn : C2.header },
5810
+ value: this.panelOpen ? "CLOSE" : "ADMIN",
5811
+ fontSize: this.s(14),
5812
+ color: C2.text,
5813
+ onMouseDown: () => this.toggle()
5814
+ }
5815
+ );
5816
+ }
5684
5817
  };
5685
5818
 
5819
+ // src/StaticTVClient.ts
5820
+ import { getExplorerInformation } from "~system/Runtime";
5821
+
5822
+ // src/ui/toolbar-panel.ts
5823
+ import ReactEcs8, { UiEntity as UiEntity8 } from "@dcl/sdk/react-ecs";
5824
+ function toolbarPanel(props, phone, uiScale = 1) {
5825
+ if (!phone) return ReactEcs8.createElement(UiEntity8, props);
5826
+ const { key, uiTransform = {}, ...rest } = props;
5827
+ const { position: _position, positionType: _positionType, ...ownLayout } = uiTransform;
5828
+ const spacer = () => ReactEcs8.createElement(UiEntity8, { uiTransform: { height: 0, flexGrow: 1 } });
5829
+ return ReactEcs8.createElement(UiEntity8, {
5830
+ key,
5831
+ uiTransform: {
5832
+ positionType: "absolute",
5833
+ position: { right: panelRight(true, 0, uiScale), top: 0 },
5834
+ height: "100%",
5835
+ flexDirection: "column"
5836
+ },
5837
+ children: [
5838
+ spacer(),
5839
+ ReactEcs8.createElement(UiEntity8, { ...rest, uiTransform: { ...ownLayout, flexShrink: 0 } }),
5840
+ spacer()
5841
+ ]
5842
+ });
5843
+ }
5844
+
5686
5845
  // src/StaticTVClient.ts
5687
5846
  import { VideoPlayer, videoEventsSystem, VideoState } from "@dcl/sdk/ecs";
5688
5847
  import * as utils from "@dcl-sdk/utils";
@@ -5690,7 +5849,7 @@ var DEFAULT_BASE_URL = "https://thestatic.tv/api/v1/dcl";
5690
5849
  var DEFAULT_FALLBACK_VIDEO = "https://media.thestatic.tv/fallback-loop.mp4";
5691
5850
  var KEY_TYPE_CHANNEL = "channel";
5692
5851
  var KEY_TYPE_SCENE = "scene";
5693
- var StaticTVClient = class {
5852
+ var _StaticTVClient = class _StaticTVClient {
5694
5853
  /**
5695
5854
  * Create a new StaticTVClient
5696
5855
  *
@@ -5750,6 +5909,13 @@ var StaticTVClient = class {
5750
5909
  this.adminPanel = null;
5751
5910
  /** UI scale - fixed at 1.0. DCL's UI system auto-scales based on viewport. */
5752
5911
  this.uiScale = 1;
5912
+ /** The explorer's platform, read once at construction (2.12.0); unknown until it answers, and if it cannot */
5913
+ this._platform = "unknown";
5914
+ /**
5915
+ * Which panels close when one opens (2.12.0, src/ui/toolbar.ts): on a phone every other one, the SDK's and a
5916
+ * scene's (registerPanel); elsewhere the guide and the admin panel close each other, as before.
5917
+ */
5918
+ this.panelRules = new PanelRules(() => this.isPhone);
5753
5919
  // =============================================================================
5754
5920
  // --- VIDEO PLAYBACK (Internal handler for videoScreen) ---
5755
5921
  // =============================================================================
@@ -5790,6 +5956,16 @@ var StaticTVClient = class {
5790
5956
  clearInterval: dclClearInterval,
5791
5957
  log: (msg, ...args) => this.log(msg, ...args)
5792
5958
  });
5959
+ this.readPlatform();
5960
+ this.panelRules.register("guide", () => {
5961
+ if (this.guideUI?.isVisible) this.guideUI.hide();
5962
+ });
5963
+ this.panelRules.register("chat", () => {
5964
+ if (this.chatUI?.isVisible) this.chatUI.hide();
5965
+ });
5966
+ this.panelRules.register("admin", () => {
5967
+ if (this.adminPanel?.isOpen) this.adminPanel.hide();
5968
+ });
5793
5969
  if (!config.apiKey) {
5794
5970
  this._disabled = true;
5795
5971
  this._keyType = null;
@@ -6640,16 +6816,99 @@ var StaticTVClient = class {
6640
6816
  }
6641
6817
  /**
6642
6818
  * Close Admin/Guide panels (they share the same screen space)
6643
- * Chat is independent and stays open.
6819
+ * Chat is independent and stays open. On a phone (2.12.0) every other panel closes: the same as panelOpened().
6644
6820
  * @param except The panel that should stay open: 'admin' | 'guide'
6645
6821
  */
6646
6822
  closeOtherPanels(except) {
6647
- if (except !== "guide" && this.guideUI?.isVisible) {
6648
- this.guideUI.hide();
6823
+ this.panelRules.opened(except);
6824
+ }
6825
+ // ===========================================================================
6826
+ // The toolbar on a phone (2.12.0, 2026-12-01; src/ui/toolbar.ts)
6827
+ // ===========================================================================
6828
+ /** Ask the explorer which platform this is, once; a failed or missing call leaves it unknown (the desktop layout) */
6829
+ readPlatform() {
6830
+ try {
6831
+ getExplorerInformation({}).then((answer) => {
6832
+ this._platform = platformOf(answer);
6833
+ this.log(`Platform: ${this._platform}`);
6834
+ }).catch(() => {
6835
+ });
6836
+ } catch {
6649
6837
  }
6650
- if (except !== "admin" && this.adminPanel?.isOpen) {
6651
- this.adminPanel.hide();
6838
+ }
6839
+ /** The explorer's platform: 'desktop', 'mobile', 'vr', 'web', or 'unknown' until it answers (and if it cannot) */
6840
+ get platform() {
6841
+ return this._platform;
6842
+ }
6843
+ /** A phone: the toolbar stands in a column on the right edge, panels open to its left, one at a time */
6844
+ get isPhone() {
6845
+ return isPhonePlatform(this._platform);
6846
+ }
6847
+ /**
6848
+ * Draw one of the scene's own toolbar buttons in its slot: the row along the bottom right on desktop (where a scene
6849
+ * placed its own by hand before), the column on a phone. Slots count from the right (the row) or the top (the
6850
+ * 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
6851
+ * scene's. `props` is the button's face - its uiBackground, onMouseDown and children - the slot gives its place and
6852
+ * size (a width or height in props.uiTransform wins).
6853
+ *
6854
+ * @example
6855
+ * ```typescript
6856
+ * staticTV.toolbarButton(3, {
6857
+ * uiTransform: { justifyContent: 'center', alignItems: 'center' },
6858
+ * uiBackground: { color: Color4.create(0.2, 0.4, 0.2, 0.9) },
6859
+ * onMouseDown: () => myPanel.toggle(),
6860
+ * children: [ReactEcs.createElement(UiEntity, { uiText: { value: 'MAP', fontSize: 14 } })],
6861
+ * })
6862
+ * ```
6863
+ */
6864
+ toolbarButton(slot, props) {
6865
+ return toolbarButton(slot, props, this.isPhone, this.uiScale);
6866
+ }
6867
+ /** Where a scene's own panel's right edge goes: on a phone one gap left of the column; elsewhere `desktopRight` */
6868
+ panelRight(desktopRight) {
6869
+ return panelRight(this.isPhone, desktopRight, this.uiScale);
6870
+ }
6871
+ /**
6872
+ * Draw one of the scene's own panels in its place (2.13.0): on desktop exactly as `props` say (their absolute
6873
+ * position included), on a phone centered on the screen's height one gap left of the toolbar's column, its top at
6874
+ * (canvas height - panel height) / 2 - or at the canvas's top when the panel is taller, so its header and close
6875
+ * button stay on screen. `props` is the panel's UiEntity props as on desktop: key, uiTransform, uiBackground,
6876
+ * children. The SDK's own chat, guide and admin panel draw through it.
6877
+ *
6878
+ * @example
6879
+ * ```typescript
6880
+ * myPanel.isOpen ? staticTV.toolbarPanel({
6881
+ * uiTransform: { positionType: 'absolute', position: { right: 20, bottom: 55 }, width: 380, height: 580 },
6882
+ * uiBackground: { color: Color4.create(0.05, 0.05, 0.08, 0.98) },
6883
+ * children: [header, body],
6884
+ * }) : null
6885
+ * ```
6886
+ */
6887
+ toolbarPanel(props) {
6888
+ return toolbarPanel(props, this.isPhone, this.uiScale);
6889
+ }
6890
+ /**
6891
+ * Put one of the scene's own panels under the panel rule: on a phone, when another panel opens (the SDK's or the
6892
+ * scene's), `hide` runs. On desktop (2.13.0), with `{ coversGuide: true }`, the panel and the guide's place close
6893
+ * each other: opening it closes the guide and the admin panel, and opening either runs `hide`; without it, the SDK
6894
+ * leaves the panel to the scene there. The SDK's own names (guide, chat, admin) are taken. Call panelOpened(name)
6895
+ * when it opens.
6896
+ */
6897
+ registerPanel(name, hide, options = {}) {
6898
+ if (_StaticTVClient.OWN_PANELS.includes(name)) {
6899
+ this.log(`registerPanel: '${name}' is one of the SDK's own panels - pick another name`);
6900
+ return;
6652
6901
  }
6902
+ this.panelRules.register(name, hide, options);
6903
+ }
6904
+ /**
6905
+ * A panel opened: on a phone every other one closes, the SDK's and the scene's registered ones. Elsewhere a panel
6906
+ * closes any panel it would cover: the guide and the admin panel close each other, and each closes a scene's panel
6907
+ * registered with coversGuide, as that panel closes them (2.13.0); the chat stays open beside the guide or the admin
6908
+ * panel, and a scene's other panels are left to the scene.
6909
+ */
6910
+ panelOpened(name) {
6911
+ this.panelRules.opened(name);
6653
6912
  }
6654
6913
  /**
6655
6914
  * Set up the UI renderer for all SDK panels
@@ -6707,6 +6966,9 @@ var StaticTVClient = class {
6707
6966
  this.log("StaticTVClient destroyed");
6708
6967
  }
6709
6968
  };
6969
+ /** The SDK's own panels, which a scene cannot register over */
6970
+ _StaticTVClient.OWN_PANELS = ["guide", "chat", "admin"];
6971
+ var StaticTVClient = _StaticTVClient;
6710
6972
  export {
6711
6973
  AdminPanelUIModule,
6712
6974
  ChatUIModule,