@ikonai/sdk-ui 1.0.3 → 1.0.4

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/index.js CHANGED
@@ -23,12 +23,10 @@ function qt(e) {
23
23
  flags: c
24
24
  };
25
25
  }
26
- function B(e, t, s) {
26
+ function M(e, t, s) {
27
27
  const r = G(e), i = qt(r);
28
28
  if (t !== void 0 && i.opcode !== t)
29
29
  throw new Error(`Unexpected opcode ${i.opcode}`);
30
- if (s !== void 0 && i.payloadVersion !== s)
31
- throw new Error(`Unexpected payload version ${i.payloadVersion}`);
32
30
  if (i.payloadType !== 8)
33
31
  throw new Error(`Unexpected payload type ${i.payloadType}`);
34
32
  const n = P + i.targetIds.length * 4;
@@ -44,7 +42,7 @@ function Qt(e, t, s, r, i) {
44
42
  }
45
43
  var C = /* @__PURE__ */ ((e) => (e[e.Null = 1] = "Null", e[e.Bool = 2] = "Bool", e[e.Int32 = 3] = "Int32", e[e.Int64 = 4] = "Int64", e[e.UInt32 = 5] = "UInt32", e[e.UInt64 = 6] = "UInt64", e[e.Float32 = 7] = "Float32", e[e.Float64 = 8] = "Float64", e[e.Array = 9] = "Array", e[e.Dict = 10] = "Dict", e[e.Object = 11] = "Object", e[e.String = 12] = "String", e[e.Binary = 13] = "Binary", e[e.Guid = 14] = "Guid", e))(C || {});
46
44
  const lt = 161, It = 162, Y = new TextEncoder(), Zt = new TextDecoder("utf-8", { fatal: !0 });
47
- class M {
45
+ class B {
48
46
  constructor(t = 1) {
49
47
  this.version = t, this.buffer.writeByte(lt), this.buffer.writeVarUInt(t >>> 0);
50
48
  }
@@ -86,7 +84,7 @@ class M {
86
84
  this.writeVariableField(t, 13, s);
87
85
  }
88
86
  writeObjectField(t, s, r) {
89
- const i = new M(s);
87
+ const i = new B(s);
90
88
  r(i);
91
89
  const n = i.finish();
92
90
  this.writeVariableField(t, 11, n);
@@ -193,7 +191,7 @@ class K {
193
191
  11
194
192
  /* Object */
195
193
  ), this.count++;
196
- const r = new M(t);
194
+ const r = new B(t);
197
195
  s(r);
198
196
  const i = r.finish();
199
197
  this.payload.writeVarUInt(i.length), this.payload.writeBytes(i);
@@ -398,7 +396,7 @@ class te {
398
396
  11
399
397
  /* Object */
400
398
  );
401
- const r = new M(t);
399
+ const r = new B(t);
402
400
  s(r);
403
401
  const i = r.finish();
404
402
  this.payload.writeVarUInt(i.length), this.payload.writeBytes(i), this.valueWritten = !0;
@@ -1075,7 +1073,7 @@ function Ne(e) {
1075
1073
  t.push(s.asString());
1076
1074
  return t;
1077
1075
  }
1078
- const we = 76337612, Ue = 185396121, Ce = 388632637, De = 417197284, Re = 469070965, me = 470595159, Le = 781727218, ge = 834078886, pe = 1043273762, Oe = 1236999138, be = 1368629611, Pe = 1715899485, Fe = 1942830531, ke = 1999510636, ve = 2079864626, Ve = 2142346422, Be = 2598291686, Me = 2719718823, Ge = 2810953526, xe = 2840065720, He = 2885165957, Ye = 3586157513, We = 3717933110, Ke = 4062655306;
1076
+ const we = 76337612, Ue = 185396121, Ce = 388632637, De = 417197284, Re = 469070965, me = 470595159, Le = 781727218, ge = 834078886, pe = 1043273762, Oe = 1236999138, be = 1368629611, Pe = 1715899485, Fe = 1942830531, ke = 1999510636, ve = 2079864626, Ve = 2142346422, Me = 2598291686, Be = 2719718823, Ge = 2810953526, xe = 2840065720, He = 2885165957, Ye = 3586157513, We = 3717933110, Ke = 4062655306;
1079
1077
  function $e(e) {
1080
1078
  const t = {};
1081
1079
  return Nt(t), t;
@@ -1171,12 +1169,12 @@ function Xe(e, t) {
1171
1169
  t.PayloadType = s.asInt32();
1172
1170
  break;
1173
1171
  }
1174
- case Be: {
1172
+ case Me: {
1175
1173
  if (s.isNull) throw new Error();
1176
1174
  t.VersionId = s.asString();
1177
1175
  break;
1178
1176
  }
1179
- case Me: {
1177
+ case Be: {
1180
1178
  if (s.isNull) throw new Error();
1181
1179
  t.UniqueSessionId = s.asString();
1182
1180
  break;
@@ -1428,7 +1426,7 @@ function Os(e, t) {
1428
1426
  }
1429
1427
  }
1430
1428
  }
1431
- const bs = 164808083, Ps = 1368629611, Fs = 2739413426, ks = 2768375929, vs = 2950031986, Vs = 3284746250, Bs = 4065070594;
1429
+ const bs = 164808083, Ps = 1368629611, Fs = 2739413426, ks = 2768375929, vs = 2950031986, Vs = 3284746250, Ms = 4065070594;
1432
1430
  function Lt(e) {
1433
1431
  const t = {};
1434
1432
  return gt(t), t;
@@ -1436,7 +1434,7 @@ function Lt(e) {
1436
1434
  function gt(e) {
1437
1435
  return e.Description = "", e.Codec = dt.H264, e.Width = 0, e.Height = 0, e.Framerate = 30, e.Bitrate = 0, e.IsHardwareAccelerated = !1, e;
1438
1436
  }
1439
- function Ms(e, t) {
1437
+ function Bs(e, t) {
1440
1438
  const s = t ?? Lt();
1441
1439
  return gt(s), Gs(e, s), s;
1442
1440
  }
@@ -1474,145 +1472,145 @@ function Gs(e, t) {
1474
1472
  t.Codec = s.asInt32();
1475
1473
  break;
1476
1474
  }
1477
- case Bs: {
1475
+ case Ms: {
1478
1476
  if (s.isNull) throw new Error();
1479
1477
  t.Width = s.asInt32();
1480
1478
  break;
1481
1479
  }
1482
1480
  }
1483
1481
  }
1484
- const xs = 4, Hs = 65539, Ys = 414670648, Ws = 693643444, Ks = 1144553441, $s = 1497620243, js = 1559330978, Xs = 1999510636, zs = 2277643855, Js = 2469008121, qs = 3042922213, Qs = 3219210453, Zs = 3504054055, tr = 3642827795, er = 3678477544, sr = 3696445035, rr = 3707543140, ir = 3712281496, nr = 3748214980, or = 3823842552, ar = 3895362455, lr = 3897397815, Ir = 4225107827;
1485
- function hr(e) {
1482
+ const xs = 65539, Hs = 414670648, Ys = 693643444, Ws = 1144553441, Ks = 1497620243, $s = 1559330978, js = 1999510636, Xs = 2277643855, zs = 2469008121, Js = 3042922213, qs = 3219210453, Qs = 3504054055, Zs = 3642827795, tr = 3678477544, er = 3696445035, sr = 3707543140, rr = 3712281496, ir = 3748214980, nr = 3823842552, or = 3895362455, ar = 3897397815, lr = 4225107827;
1483
+ function Ir(e) {
1486
1484
  const t = {};
1487
1485
  return pt(t), t;
1488
1486
  }
1489
1487
  function pt(e) {
1490
1488
  return e.Clients = /* @__PURE__ */ Object.create(null), e.UIStreams = /* @__PURE__ */ Object.create(null), e.AudioStreams = /* @__PURE__ */ Object.create(null), e.VideoStreams = /* @__PURE__ */ Object.create(null), e.TrackingStreams = /* @__PURE__ */ Object.create(null), e.SpaceId = "", e.ChannelInstanceId = "", e.FirstUserId = "", e.ChannelUrl = "", e.ChannelId = "", e.PrimaryUserId = "", e.OrganisationName = "", e.SpaceName = "", e.ChannelName = "", e.SessionId = "", e.RunnerType = "", e.BootType = "", e.PublicAccess = !1, e.DebugMode = !1, e.IsGitSource = !1, e.Functions = /* @__PURE__ */ Object.create(null), e;
1491
1489
  }
1492
- function cr(e, t) {
1490
+ function hr(e, t) {
1493
1491
  const s = p.create(e);
1494
- return ur(s, t);
1492
+ return cr(s, t);
1495
1493
  }
1496
- function ur(e, t) {
1497
- const s = t ?? hr();
1498
- return pt(s), Er(e, s), s;
1494
+ function cr(e, t) {
1495
+ const s = t ?? Ir();
1496
+ return pt(s), ur(e, s), s;
1499
1497
  }
1500
- function Er(e, t) {
1498
+ function ur(e, t) {
1501
1499
  let s;
1502
1500
  for (; (s = e.next()) !== null; )
1503
1501
  switch (s.fieldId) {
1504
- case Ys: {
1502
+ case Hs: {
1505
1503
  if (s.isNull) throw new Error();
1506
1504
  t.IsGitSource = s.asBool();
1507
1505
  break;
1508
1506
  }
1509
- case Ws: {
1507
+ case Ys: {
1510
1508
  if (s.isNull) throw new Error();
1511
1509
  t.FirstUserId = s.asString();
1512
1510
  break;
1513
1511
  }
1512
+ case Ws: {
1513
+ if (s.isNull) throw new Error();
1514
+ t.Clients = _r(s.asDictionary());
1515
+ break;
1516
+ }
1514
1517
  case Ks: {
1515
1518
  if (s.isNull) throw new Error();
1516
- t.Clients = fr(s.asDictionary());
1519
+ t.TrackingStreams = fr(s.asDictionary());
1517
1520
  break;
1518
1521
  }
1519
1522
  case $s: {
1520
1523
  if (s.isNull) throw new Error();
1521
- t.TrackingStreams = dr(s.asDictionary());
1524
+ t.ChannelId = s.asString();
1522
1525
  break;
1523
1526
  }
1524
1527
  case js: {
1525
1528
  if (s.isNull) throw new Error();
1526
- t.ChannelId = s.asString();
1529
+ t.SessionId = s.asString();
1527
1530
  break;
1528
1531
  }
1529
1532
  case Xs: {
1530
1533
  if (s.isNull) throw new Error();
1531
- t.SessionId = s.asString();
1534
+ t.ChannelUrl = s.asString();
1532
1535
  break;
1533
1536
  }
1534
1537
  case zs: {
1535
1538
  if (s.isNull) throw new Error();
1536
- t.ChannelUrl = s.asString();
1539
+ t.ChannelName = s.asString();
1537
1540
  break;
1538
1541
  }
1539
1542
  case Js: {
1540
1543
  if (s.isNull) throw new Error();
1541
- t.ChannelName = s.asString();
1544
+ t.PublicAccess = s.asBool();
1542
1545
  break;
1543
1546
  }
1544
1547
  case qs: {
1545
1548
  if (s.isNull) throw new Error();
1546
- t.PublicAccess = s.asBool();
1549
+ t.OrganisationName = s.asString();
1547
1550
  break;
1548
1551
  }
1549
1552
  case Qs: {
1550
1553
  if (s.isNull) throw new Error();
1551
- t.OrganisationName = s.asString();
1554
+ t.DebugMode = s.asBool();
1552
1555
  break;
1553
1556
  }
1554
1557
  case Zs: {
1555
1558
  if (s.isNull) throw new Error();
1556
- t.DebugMode = s.asBool();
1559
+ t.RunnerType = s.asString();
1557
1560
  break;
1558
1561
  }
1559
1562
  case tr: {
1560
1563
  if (s.isNull) throw new Error();
1561
- t.RunnerType = s.asString();
1564
+ t.Functions = dr(s.asDictionary());
1562
1565
  break;
1563
1566
  }
1564
1567
  case er: {
1565
1568
  if (s.isNull) throw new Error();
1566
- t.Functions = Tr(s.asDictionary());
1569
+ t.UIStreams = Tr(s.asDictionary());
1567
1570
  break;
1568
1571
  }
1569
1572
  case sr: {
1570
1573
  if (s.isNull) throw new Error();
1571
- t.UIStreams = yr(s.asDictionary());
1574
+ t.SpaceId = s.asString();
1572
1575
  break;
1573
1576
  }
1574
1577
  case rr: {
1575
1578
  if (s.isNull) throw new Error();
1576
- t.SpaceId = s.asString();
1579
+ t.PrimaryUserId = s.asString();
1577
1580
  break;
1578
1581
  }
1579
1582
  case ir: {
1580
1583
  if (s.isNull) throw new Error();
1581
- t.PrimaryUserId = s.asString();
1584
+ t.BootType = s.asString();
1582
1585
  break;
1583
1586
  }
1584
1587
  case nr: {
1585
1588
  if (s.isNull) throw new Error();
1586
- t.BootType = s.asString();
1589
+ t.ChannelInstanceId = s.asString();
1587
1590
  break;
1588
1591
  }
1589
1592
  case or: {
1590
1593
  if (s.isNull) throw new Error();
1591
- t.ChannelInstanceId = s.asString();
1594
+ t.AudioStreams = yr(s.asDictionary());
1592
1595
  break;
1593
1596
  }
1594
1597
  case ar: {
1595
1598
  if (s.isNull) throw new Error();
1596
- t.AudioStreams = Sr(s.asDictionary());
1599
+ t.VideoStreams = Sr(s.asDictionary());
1597
1600
  break;
1598
1601
  }
1599
1602
  case lr: {
1600
- if (s.isNull) throw new Error();
1601
- t.VideoStreams = Ar(s.asDictionary());
1602
- break;
1603
- }
1604
- case Ir: {
1605
1603
  if (s.isNull) throw new Error();
1606
1604
  t.SpaceName = s.asString();
1607
1605
  break;
1608
1606
  }
1609
1607
  }
1610
1608
  }
1611
- function _r(e, t) {
1612
- const s = B(e, Hs, xs);
1613
- return cr(s, t);
1609
+ function Er(e, t) {
1610
+ const s = M(e, xs);
1611
+ return hr(s, t);
1614
1612
  }
1615
- function fr(e) {
1613
+ function _r(e) {
1616
1614
  const t = /* @__PURE__ */ Object.create(null);
1617
1615
  let s;
1618
1616
  for (; (s = e.next()) !== null; ) {
@@ -1621,275 +1619,275 @@ function fr(e) {
1621
1619
  }
1622
1620
  return t;
1623
1621
  }
1624
- function dr(e) {
1622
+ function fr(e) {
1625
1623
  const t = /* @__PURE__ */ Object.create(null);
1626
1624
  let s;
1627
1625
  for (; (s = e.next()) !== null; ) {
1628
1626
  const r = s.key.asString();
1629
- t[r] = Xr(s.value.asObject());
1627
+ t[r] = jr(s.value.asObject());
1630
1628
  }
1631
1629
  return t;
1632
1630
  }
1633
- function Tr(e) {
1631
+ function dr(e) {
1634
1632
  const t = /* @__PURE__ */ Object.create(null);
1635
1633
  let s;
1636
1634
  for (; (s = e.next()) !== null; ) {
1637
1635
  const r = s.key.asInt32();
1638
- t[r] = Nr(s.value.asArray());
1636
+ t[r] = Ar(s.value.asArray());
1639
1637
  }
1640
1638
  return t;
1641
1639
  }
1642
- function yr(e) {
1640
+ function Tr(e) {
1643
1641
  const t = /* @__PURE__ */ Object.create(null);
1644
1642
  let s;
1645
1643
  for (; (s = e.next()) !== null; ) {
1646
1644
  const r = s.key.asString();
1647
- t[r] = mr(s.value.asObject());
1645
+ t[r] = Rr(s.value.asObject());
1648
1646
  }
1649
1647
  return t;
1650
1648
  }
1651
- function Sr(e) {
1649
+ function yr(e) {
1652
1650
  const t = /* @__PURE__ */ Object.create(null);
1653
1651
  let s;
1654
1652
  for (; (s = e.next()) !== null; ) {
1655
1653
  const r = s.key.asString();
1656
- t[r] = Fr(s.value.asObject());
1654
+ t[r] = Pr(s.value.asObject());
1657
1655
  }
1658
1656
  return t;
1659
1657
  }
1660
- function Ar(e) {
1658
+ function Sr(e) {
1661
1659
  const t = /* @__PURE__ */ Object.create(null);
1662
1660
  let s;
1663
1661
  for (; (s = e.next()) !== null; ) {
1664
1662
  const r = s.key.asString();
1665
- t[r] = xr(s.value.asObject());
1663
+ t[r] = Gr(s.value.asObject());
1666
1664
  }
1667
1665
  return t;
1668
1666
  }
1669
- function Nr(e) {
1667
+ function Ar(e) {
1670
1668
  const t = [];
1671
1669
  let s;
1672
1670
  for (; (s = e.next()) !== null; )
1673
1671
  t.push(ls(s.asObject()));
1674
1672
  return t;
1675
1673
  }
1676
- const wr = 161083277, Ur = 325678206, Cr = 3469892363, Dr = 3645544153;
1677
- function Rr(e) {
1674
+ const Nr = 161083277, wr = 325678206, Ur = 3469892363, Cr = 3645544153;
1675
+ function Dr(e) {
1678
1676
  const t = {};
1679
1677
  return Ot(t), t;
1680
1678
  }
1681
1679
  function Ot(e) {
1682
1680
  return e.StreamId = "", e.ClientSessionId = 0, e.TrackId = 0, e.Info = Rt(), e;
1683
1681
  }
1684
- function mr(e, t) {
1685
- const s = t ?? Rr();
1686
- return Ot(s), Lr(e, s), s;
1682
+ function Rr(e, t) {
1683
+ const s = t ?? Dr();
1684
+ return Ot(s), mr(e, s), s;
1687
1685
  }
1688
- function Lr(e, t) {
1686
+ function mr(e, t) {
1689
1687
  let s;
1690
1688
  for (; (s = e.next()) !== null; )
1691
1689
  switch (s.fieldId) {
1692
- case wr: {
1690
+ case Nr: {
1693
1691
  if (s.isNull) throw new Error();
1694
1692
  t.StreamId = s.asString();
1695
1693
  break;
1696
1694
  }
1697
- case Ur: {
1695
+ case wr: {
1698
1696
  if (s.isNull) throw new Error();
1699
1697
  t.ClientSessionId = s.asInt32();
1700
1698
  break;
1701
1699
  }
1702
- case Cr: {
1700
+ case Ur: {
1703
1701
  if (s.isNull) throw new Error();
1704
1702
  t.TrackId = s.asInt32();
1705
1703
  break;
1706
1704
  }
1707
- case Dr: {
1705
+ case Cr: {
1708
1706
  if (s.isNull) throw new Error();
1709
1707
  t.Info = ps(s.asObject());
1710
1708
  break;
1711
1709
  }
1712
1710
  }
1713
1711
  }
1714
- const gr = 161083277, pr = 325678206, Or = 3469892363, br = 3645544153;
1715
- function Pr(e) {
1712
+ const Lr = 161083277, gr = 325678206, pr = 3469892363, Or = 3645544153;
1713
+ function br(e) {
1716
1714
  const t = {};
1717
1715
  return bt(t), t;
1718
1716
  }
1719
1717
  function bt(e) {
1720
1718
  return e.StreamId = "", e.ClientSessionId = 0, e.TrackId = 0, e.Info = yt(), e;
1721
1719
  }
1722
- function Fr(e, t) {
1723
- const s = t ?? Pr();
1724
- return bt(s), kr(e, s), s;
1720
+ function Pr(e, t) {
1721
+ const s = t ?? br();
1722
+ return bt(s), Fr(e, s), s;
1725
1723
  }
1726
- function kr(e, t) {
1724
+ function Fr(e, t) {
1727
1725
  let s;
1728
1726
  for (; (s = e.next()) !== null; )
1729
1727
  switch (s.fieldId) {
1730
- case gr: {
1728
+ case Lr: {
1731
1729
  if (s.isNull) throw new Error();
1732
1730
  t.StreamId = s.asString();
1733
1731
  break;
1734
1732
  }
1735
- case pr: {
1733
+ case gr: {
1736
1734
  if (s.isNull) throw new Error();
1737
1735
  t.ClientSessionId = s.asInt32();
1738
1736
  break;
1739
1737
  }
1740
- case Or: {
1738
+ case pr: {
1741
1739
  if (s.isNull) throw new Error();
1742
1740
  t.TrackId = s.asInt32();
1743
1741
  break;
1744
1742
  }
1745
- case br: {
1743
+ case Or: {
1746
1744
  if (s.isNull) throw new Error();
1747
1745
  t.Info = ue(s.asObject());
1748
1746
  break;
1749
1747
  }
1750
1748
  }
1751
1749
  }
1752
- const vr = 161083277, Vr = 325678206, Br = 3469892363, Mr = 3645544153;
1753
- function Gr(e) {
1750
+ const kr = 161083277, vr = 325678206, Vr = 3469892363, Mr = 3645544153;
1751
+ function Br(e) {
1754
1752
  const t = {};
1755
1753
  return Pt(t), t;
1756
1754
  }
1757
1755
  function Pt(e) {
1758
1756
  return e.StreamId = "", e.ClientSessionId = 0, e.TrackId = 0, e.Info = Lt(), e;
1759
1757
  }
1760
- function xr(e, t) {
1761
- const s = t ?? Gr();
1762
- return Pt(s), Hr(e, s), s;
1758
+ function Gr(e, t) {
1759
+ const s = t ?? Br();
1760
+ return Pt(s), xr(e, s), s;
1763
1761
  }
1764
- function Hr(e, t) {
1762
+ function xr(e, t) {
1765
1763
  let s;
1766
1764
  for (; (s = e.next()) !== null; )
1767
1765
  switch (s.fieldId) {
1768
- case vr: {
1766
+ case kr: {
1769
1767
  if (s.isNull) throw new Error();
1770
1768
  t.StreamId = s.asString();
1771
1769
  break;
1772
1770
  }
1773
- case Vr: {
1771
+ case vr: {
1774
1772
  if (s.isNull) throw new Error();
1775
1773
  t.ClientSessionId = s.asInt32();
1776
1774
  break;
1777
1775
  }
1778
- case Br: {
1776
+ case Vr: {
1779
1777
  if (s.isNull) throw new Error();
1780
1778
  t.TrackId = s.asInt32();
1781
1779
  break;
1782
1780
  }
1783
1781
  case Mr: {
1784
1782
  if (s.isNull) throw new Error();
1785
- t.Info = Ms(s.asObject());
1783
+ t.Info = Bs(s.asObject());
1786
1784
  break;
1787
1785
  }
1788
1786
  }
1789
1787
  }
1790
- const Yr = 161083277, Wr = 325678206, Kr = 3469892363, $r = 3645544153;
1791
- function jr(e) {
1788
+ const Hr = 161083277, Yr = 325678206, Wr = 3469892363, Kr = 3645544153;
1789
+ function $r(e) {
1792
1790
  const t = {};
1793
1791
  return Ft(t), t;
1794
1792
  }
1795
1793
  function Ft(e) {
1796
1794
  return e.StreamId = "", e.ClientSessionId = 0, e.TrackId = 0, e.Info = Ct(), e;
1797
1795
  }
1798
- function Xr(e, t) {
1799
- const s = t ?? jr();
1800
- return Ft(s), zr(e, s), s;
1796
+ function jr(e, t) {
1797
+ const s = t ?? $r();
1798
+ return Ft(s), Xr(e, s), s;
1801
1799
  }
1802
- function zr(e, t) {
1800
+ function Xr(e, t) {
1803
1801
  let s;
1804
1802
  for (; (s = e.next()) !== null; )
1805
1803
  switch (s.fieldId) {
1806
- case Yr: {
1804
+ case Hr: {
1807
1805
  if (s.isNull) throw new Error();
1808
1806
  t.StreamId = s.asString();
1809
1807
  break;
1810
1808
  }
1811
- case Wr: {
1809
+ case Yr: {
1812
1810
  if (s.isNull) throw new Error();
1813
1811
  t.ClientSessionId = s.asInt32();
1814
1812
  break;
1815
1813
  }
1816
- case Kr: {
1814
+ case Wr: {
1817
1815
  if (s.isNull) throw new Error();
1818
1816
  t.TrackId = s.asInt32();
1819
1817
  break;
1820
1818
  }
1821
- case $r: {
1819
+ case Kr: {
1822
1820
  if (s.isNull) throw new Error();
1823
1821
  t.Info = Rs(s.asObject());
1824
1822
  break;
1825
1823
  }
1826
1824
  }
1827
1825
  }
1828
- const Jr = 1405462580, qr = 2968276160;
1829
- function Qr(e) {
1826
+ const zr = 1405462580, Jr = 2968276160;
1827
+ function qr(e) {
1830
1828
  const t = {};
1831
1829
  return kt(t), t;
1832
1830
  }
1833
1831
  function kt(e) {
1834
1832
  return e.MimeType = "", e.Value = new Uint8Array(0), e;
1835
1833
  }
1836
- function Zr(e, t) {
1837
- const s = t ?? Qr();
1838
- return kt(s), ti(e, s), s;
1834
+ function Qr(e, t) {
1835
+ const s = t ?? qr();
1836
+ return kt(s), Zr(e, s), s;
1839
1837
  }
1840
- function ti(e, t) {
1838
+ function Zr(e, t) {
1841
1839
  let s;
1842
1840
  for (; (s = e.next()) !== null; )
1843
1841
  switch (s.fieldId) {
1844
- case Jr: {
1842
+ case zr: {
1845
1843
  if (s.isNull) throw new Error();
1846
1844
  t.Value = s.asBinary();
1847
1845
  break;
1848
1846
  }
1849
- case qr: {
1847
+ case Jr: {
1850
1848
  if (s.isNull) throw new Error();
1851
1849
  t.MimeType = s.asString();
1852
1850
  break;
1853
1851
  }
1854
1852
  }
1855
1853
  }
1856
- const ei = 1, si = 2097188, ri = 979822885, ii = 2374537704;
1857
- function ni(e) {
1854
+ const ti = 2097188, ei = 979822885, si = 2374537704;
1855
+ function ri(e) {
1858
1856
  const t = {};
1859
1857
  return vt(t), t;
1860
1858
  }
1861
1859
  function vt(e) {
1862
1860
  return e.StyleId = "", e.Style = /* @__PURE__ */ Object.create(null), e;
1863
1861
  }
1864
- function oi(e, t) {
1862
+ function ii(e, t) {
1865
1863
  const s = p.create(e);
1866
- return ai(s, t);
1864
+ return ni(s, t);
1867
1865
  }
1868
- function ai(e, t) {
1869
- const s = t ?? ni();
1870
- return vt(s), li(e, s), s;
1866
+ function ni(e, t) {
1867
+ const s = t ?? ri();
1868
+ return vt(s), oi(e, s), s;
1871
1869
  }
1872
- function li(e, t) {
1870
+ function oi(e, t) {
1873
1871
  let s;
1874
1872
  for (; (s = e.next()) !== null; )
1875
1873
  switch (s.fieldId) {
1876
- case ri: {
1874
+ case ei: {
1877
1875
  if (s.isNull) throw new Error();
1878
1876
  t.StyleId = s.asString();
1879
1877
  break;
1880
1878
  }
1881
- case ii: {
1879
+ case si: {
1882
1880
  if (s.isNull) throw new Error();
1883
- t.Style = hi(s.asDictionary());
1881
+ t.Style = li(s.asDictionary());
1884
1882
  break;
1885
1883
  }
1886
1884
  }
1887
1885
  }
1888
- function Ii(e, t) {
1889
- const s = B(e, si, ei);
1890
- return oi(s, t);
1886
+ function ai(e, t) {
1887
+ const s = M(e, ti);
1888
+ return ii(s, t);
1891
1889
  }
1892
- function hi(e) {
1890
+ function li(e) {
1893
1891
  const t = /* @__PURE__ */ Object.create(null);
1894
1892
  let s;
1895
1893
  for (; (s = e.next()) !== null; ) {
@@ -1898,73 +1896,73 @@ function hi(e) {
1898
1896
  }
1899
1897
  return t;
1900
1898
  }
1901
- const ci = 1, ui = 2097192, Ei = 2136687806;
1902
- function _i(e) {
1899
+ const Ii = 2097192, hi = 2136687806;
1900
+ function ci(e) {
1903
1901
  const t = {};
1904
1902
  return Vt(t), t;
1905
1903
  }
1906
1904
  function Vt(e) {
1907
1905
  return e.Styles = [], e;
1908
1906
  }
1909
- function fi(e, t) {
1907
+ function ui(e, t) {
1910
1908
  const s = p.create(e);
1911
- return di(s, t);
1909
+ return Ei(s, t);
1912
1910
  }
1913
- function di(e, t) {
1914
- const s = t ?? _i();
1915
- return Vt(s), Ti(e, s), s;
1911
+ function Ei(e, t) {
1912
+ const s = t ?? ci();
1913
+ return Vt(s), _i(e, s), s;
1916
1914
  }
1917
- function Ti(e, t) {
1915
+ function _i(e, t) {
1918
1916
  let s;
1919
1917
  for (; (s = e.next()) !== null; )
1920
1918
  switch (s.fieldId) {
1921
- case Ei: {
1919
+ case hi: {
1922
1920
  if (s.isNull) throw new Error();
1923
- t.Styles = Si(s.asArray());
1921
+ t.Styles = di(s.asArray());
1924
1922
  break;
1925
1923
  }
1926
1924
  }
1927
1925
  }
1928
- function yi(e, t) {
1929
- const s = B(e, ui, ci);
1930
- return fi(s, t);
1926
+ function fi(e, t) {
1927
+ const s = M(e, Ii);
1928
+ return ui(s, t);
1931
1929
  }
1932
- function Si(e) {
1930
+ function di(e) {
1933
1931
  const t = [];
1934
1932
  let s;
1935
1933
  for (; (s = e.next()) !== null; )
1936
- t.push(Ui(s.asObject()));
1934
+ t.push(Ai(s.asObject()));
1937
1935
  return t;
1938
1936
  }
1939
- const Ai = 979822885, Ni = 2374537704;
1940
- function wi(e) {
1937
+ const Ti = 979822885, yi = 2374537704;
1938
+ function Si(e) {
1941
1939
  const t = {};
1942
- return Bt(t), t;
1940
+ return Mt(t), t;
1943
1941
  }
1944
- function Bt(e) {
1942
+ function Mt(e) {
1945
1943
  return e.StyleId = "", e.Style = /* @__PURE__ */ Object.create(null), e;
1946
1944
  }
1947
- function Ui(e, t) {
1948
- const s = t ?? wi();
1949
- return Bt(s), Ci(e, s), s;
1945
+ function Ai(e, t) {
1946
+ const s = t ?? Si();
1947
+ return Mt(s), Ni(e, s), s;
1950
1948
  }
1951
- function Ci(e, t) {
1949
+ function Ni(e, t) {
1952
1950
  let s;
1953
1951
  for (; (s = e.next()) !== null; )
1954
1952
  switch (s.fieldId) {
1955
- case Ai: {
1953
+ case Ti: {
1956
1954
  if (s.isNull) throw new Error();
1957
1955
  t.StyleId = s.asString();
1958
1956
  break;
1959
1957
  }
1960
- case Ni: {
1958
+ case yi: {
1961
1959
  if (s.isNull) throw new Error();
1962
- t.Style = Di(s.asDictionary());
1960
+ t.Style = wi(s.asDictionary());
1963
1961
  break;
1964
1962
  }
1965
1963
  }
1966
1964
  }
1967
- function Di(e) {
1965
+ function wi(e) {
1968
1966
  const t = /* @__PURE__ */ Object.create(null);
1969
1967
  let s;
1970
1968
  for (; (s = e.next()) !== null; ) {
@@ -1973,100 +1971,100 @@ function Di(e) {
1973
1971
  }
1974
1972
  return t;
1975
1973
  }
1976
- const Ri = 1, mi = 2097193, Li = 1415642792;
1977
- function gi(e) {
1974
+ const Ui = 2097193, Ci = 1415642792;
1975
+ function Di(e) {
1978
1976
  const t = {};
1979
- return Mt(t), t;
1977
+ return Bt(t), t;
1980
1978
  }
1981
- function Mt(e) {
1979
+ function Bt(e) {
1982
1980
  return e.StyleIds = [], e;
1983
1981
  }
1984
- function pi(e, t) {
1982
+ function Ri(e, t) {
1985
1983
  const s = p.create(e);
1986
- return Oi(s, t);
1984
+ return mi(s, t);
1987
1985
  }
1988
- function Oi(e, t) {
1989
- const s = t ?? gi();
1990
- return Mt(s), bi(e, s), s;
1986
+ function mi(e, t) {
1987
+ const s = t ?? Di();
1988
+ return Bt(s), Li(e, s), s;
1991
1989
  }
1992
- function bi(e, t) {
1990
+ function Li(e, t) {
1993
1991
  let s;
1994
1992
  for (; (s = e.next()) !== null; )
1995
1993
  switch (s.fieldId) {
1996
- case Li: {
1994
+ case Ci: {
1997
1995
  if (s.isNull) throw new Error();
1998
- t.StyleIds = Fi(s.asArray());
1996
+ t.StyleIds = pi(s.asArray());
1999
1997
  break;
2000
1998
  }
2001
1999
  }
2002
2000
  }
2003
- function Pi(e, t) {
2004
- const s = B(e, mi, Ri);
2005
- return pi(s, t);
2001
+ function gi(e, t) {
2002
+ const s = M(e, Ui);
2003
+ return Ri(s, t);
2006
2004
  }
2007
- function Fi(e) {
2005
+ function pi(e) {
2008
2006
  const t = [];
2009
2007
  let s;
2010
2008
  for (; (s = e.next()) !== null; )
2011
2009
  t.push(s.asString());
2012
2010
  return t;
2013
2011
  }
2014
- const ki = 1, vi = 2097190, Vi = 425183262, Bi = 653781469;
2015
- function Mi(e) {
2012
+ const Oi = 2097190, bi = 425183262, Pi = 653781469;
2013
+ function Fi(e) {
2016
2014
  const t = {};
2017
2015
  return Gt(t), t;
2018
2016
  }
2019
2017
  function Gt(e) {
2020
2018
  return e.Json = "", e.Payloads = /* @__PURE__ */ Object.create(null), e;
2021
2019
  }
2022
- function Gi(e, t) {
2020
+ function ki(e, t) {
2023
2021
  const s = p.create(e);
2024
- return xi(s, t);
2022
+ return vi(s, t);
2025
2023
  }
2026
- function xi(e, t) {
2027
- const s = t ?? Mi();
2028
- return Gt(s), Hi(e, s), s;
2024
+ function vi(e, t) {
2025
+ const s = t ?? Fi();
2026
+ return Gt(s), Vi(e, s), s;
2029
2027
  }
2030
- function Hi(e, t) {
2028
+ function Vi(e, t) {
2031
2029
  let s;
2032
2030
  for (; (s = e.next()) !== null; )
2033
2031
  switch (s.fieldId) {
2034
- case Vi: {
2032
+ case bi: {
2035
2033
  if (s.isNull) throw new Error();
2036
2034
  t.Json = s.asString();
2037
2035
  break;
2038
2036
  }
2039
- case Bi: {
2037
+ case Pi: {
2040
2038
  if (s.isNull) throw new Error();
2041
- t.Payloads = Wi(s.asDictionary());
2039
+ t.Payloads = Bi(s.asDictionary());
2042
2040
  break;
2043
2041
  }
2044
2042
  }
2045
2043
  }
2046
- function Yi(e, t) {
2047
- const s = B(e, vi, ki);
2048
- return Gi(s, t);
2044
+ function Mi(e, t) {
2045
+ const s = M(e, Oi);
2046
+ return ki(s, t);
2049
2047
  }
2050
- function Wi(e) {
2048
+ function Bi(e) {
2051
2049
  const t = /* @__PURE__ */ Object.create(null);
2052
2050
  let s;
2053
2051
  for (; (s = e.next()) !== null; ) {
2054
2052
  const r = s.key.asString();
2055
- t[r] = Zr(s.value.asObject());
2053
+ t[r] = Qr(s.value.asObject());
2056
2054
  }
2057
2055
  return t;
2058
2056
  }
2059
- const xt = 1, Ki = 1048636, $i = 2610786289;
2060
- function ji(e) {
2061
- const t = new M(xt);
2062
- return Xi(e, t), t.finish();
2057
+ const xt = 1, Gi = 1048636, xi = 2610786289;
2058
+ function Hi(e) {
2059
+ const t = new B(xt);
2060
+ return Yi(e, t), t.finish();
2063
2061
  }
2064
- function Xi(e, t) {
2065
- t.writeUInt32Field($i, e.Version >>> 0);
2062
+ function Yi(e, t) {
2063
+ t.writeUInt32Field(xi, e.Version >>> 0);
2066
2064
  }
2067
- function zi(e, t, s) {
2068
- const r = ji(e);
2069
- return Qt(Ki, r, xt, t, s);
2065
+ function Wi(e, t, s) {
2066
+ const r = Hi(e);
2067
+ return Qt(Gi, r, xt, t, s);
2070
2068
  }
2071
2069
  function w(e) {
2072
2070
  return typeof e == "object" && e !== null && !Array.isArray(e);
@@ -2124,7 +2122,7 @@ function it(e, t) {
2124
2122
  styleIds: u ?? []
2125
2123
  };
2126
2124
  }
2127
- function Ji(e, t) {
2125
+ function Ki(e, t) {
2128
2126
  if (!w(e))
2129
2127
  throw new Error(`Invalid text delta at ${t}`);
2130
2128
  const s = e.NodeId, r = e.PropertyName, i = e.Start, n = e.End, o = e.InsertedText;
@@ -2151,7 +2149,7 @@ function Ji(e, t) {
2151
2149
  insertedText: o
2152
2150
  };
2153
2151
  }
2154
- function qi(e, t) {
2152
+ function $i(e, t) {
2155
2153
  if (!w(e))
2156
2154
  throw new Error(`Invalid child insert at ${t}`);
2157
2155
  const s = e.Index, r = e.Node;
@@ -2164,7 +2162,7 @@ function qi(e, t) {
2164
2162
  node: it(r, `${t}.node`)
2165
2163
  };
2166
2164
  }
2167
- function Qi(e, t) {
2165
+ function ji(e, t) {
2168
2166
  if (!w(e))
2169
2167
  throw new Error(`Invalid child move at ${t}`);
2170
2168
  const s = e.NodeId, r = e.FromIndex, i = e.ToIndex;
@@ -2180,7 +2178,7 @@ function Qi(e, t) {
2180
2178
  toIndex: i
2181
2179
  };
2182
2180
  }
2183
- function Zi(e, t) {
2181
+ function Xi(e, t) {
2184
2182
  if (!w(e))
2185
2183
  throw new Error(`Invalid child remove at ${t}`);
2186
2184
  const s = e.NodeId, r = e.Index;
@@ -2193,18 +2191,18 @@ function Zi(e, t) {
2193
2191
  index: r
2194
2192
  };
2195
2193
  }
2196
- function tn(e, t) {
2194
+ function zi(e, t) {
2197
2195
  if (!w(e))
2198
2196
  throw new Error(`Invalid node change at ${t}`);
2199
2197
  const s = e.nodeId;
2200
2198
  if (typeof s != "string" || s.length === 0)
2201
2199
  throw new Error(`Invalid node change nodeId at ${t}`);
2202
2200
  const r = Array.isArray(e.inserts) ? e.inserts.map(
2203
- (I, c) => qi(I ?? {}, `${t}.inserts[${c}]`)
2201
+ (I, c) => $i(I ?? {}, `${t}.inserts[${c}]`)
2204
2202
  ) : void 0, i = Array.isArray(e.moves) ? e.moves.map(
2205
- (I, c) => Qi(I ?? {}, `${t}.moves[${c}]`)
2203
+ (I, c) => ji(I ?? {}, `${t}.moves[${c}]`)
2206
2204
  ) : void 0, n = Array.isArray(e.removals) ? e.removals.map(
2207
- (I, c) => Zi(I ?? {}, `${t}.removals[${c}]`)
2205
+ (I, c) => Xi(I ?? {}, `${t}.removals[${c}]`)
2208
2206
  ) : void 0;
2209
2207
  let o;
2210
2208
  if (w(e.changedProps)) {
@@ -2217,7 +2215,7 @@ function tn(e, t) {
2217
2215
  }
2218
2216
  }
2219
2217
  const a = Array.isArray(e.textUpdates) ? e.textUpdates.map(
2220
- (I, c) => Ji(I ?? {}, `${t}.textUpdates[${c}]`)
2218
+ (I, c) => Ki(I ?? {}, `${t}.textUpdates[${c}]`)
2221
2219
  ) : void 0, l = e.styleIds, u = l !== void 0 ? Yt(l, t, s, !0) : void 0;
2222
2220
  return {
2223
2221
  nodeId: s,
@@ -2229,19 +2227,19 @@ function tn(e, t) {
2229
2227
  ...u !== void 0 ? { styleIds: u } : {}
2230
2228
  };
2231
2229
  }
2232
- function en(e) {
2230
+ function Ji(e) {
2233
2231
  const t = /* @__PURE__ */ new Map();
2234
2232
  for (const [s, r] of Object.entries(e))
2235
2233
  t.set(s, r);
2236
2234
  return t;
2237
2235
  }
2238
- function sn(e, t, s) {
2236
+ function qi(e, t, s) {
2239
2237
  if (!e || typeof e != "object")
2240
2238
  throw new D("UI update graph is missing");
2241
2239
  const r = it(e, "graph");
2242
2240
  if (r.type !== "root")
2243
2241
  throw new D('UI update root element must have type "root"');
2244
- const i = nn(r.props, t);
2242
+ const i = Zi(r.props, t);
2245
2243
  return {
2246
2244
  type: "full",
2247
2245
  version: s,
@@ -2249,7 +2247,7 @@ function sn(e, t, s) {
2249
2247
  metadata: i
2250
2248
  };
2251
2249
  }
2252
- function rn(e, t, s) {
2250
+ function Qi(e, t, s) {
2253
2251
  if (!Array.isArray(e))
2254
2252
  throw new D("UI diff changes must be an array");
2255
2253
  if (!w(t))
@@ -2258,7 +2256,7 @@ function rn(e, t, s) {
2258
2256
  if (typeof r != "string" || r.length === 0)
2259
2257
  throw new D("UI diff metadata is missing viewId");
2260
2258
  const i = e.map(
2261
- (c, h) => tn(c ?? {}, `changes[${h}]`)
2259
+ (c, h) => zi(c ?? {}, `changes[${h}]`)
2262
2260
  ), n = t.optimisticActionId === null || typeof t.optimisticActionId == "string" ? t.optimisticActionId : void 0, o = typeof t.isOptimistic == "boolean" ? t.isOptimistic : void 0, a = typeof t.isUpdate == "boolean" ? t.isUpdate : void 0, l = z(t.optimisticPatch), u = J(t.optimisticReconcile), I = {
2263
2261
  viewId: r,
2264
2262
  ...n !== void 0 ? { optimisticActionId: n } : {},
@@ -2274,7 +2272,7 @@ function rn(e, t, s) {
2274
2272
  metadata: I
2275
2273
  };
2276
2274
  }
2277
- function nn(e, t) {
2275
+ function Zi(e, t) {
2278
2276
  const s = e.viewId;
2279
2277
  if (typeof s != "string" || s.length === 0)
2280
2278
  throw new D("UI update root is missing viewId");
@@ -2332,7 +2330,7 @@ class D extends Error {
2332
2330
  super(t), this.causeError = s, this.name = "UiUpdateParseError", s instanceof Error && (this.stack = s.stack);
2333
2331
  }
2334
2332
  }
2335
- function on(e) {
2333
+ function tn(e) {
2336
2334
  let t;
2337
2335
  try {
2338
2336
  t = JSON.parse(e.Json);
@@ -2346,13 +2344,13 @@ function on(e) {
2346
2344
  throw new D(`Unknown UI update type: ${String(s)}`);
2347
2345
  if (typeof r != "number")
2348
2346
  throw new D("UI update version must be a number");
2349
- const i = s === "full" ? sn(t.graph, t.metadata, r) : rn(t.changes, t.metadata, r), n = e.Payloads ? en(e.Payloads) : /* @__PURE__ */ new Map();
2347
+ const i = s === "full" ? qi(t.graph, t.metadata, r) : Qi(t.changes, t.metadata, r), n = e.Payloads ? Ji(e.Payloads) : /* @__PURE__ */ new Map();
2350
2348
  return {
2351
2349
  snapshot: i,
2352
2350
  payloads: n
2353
2351
  };
2354
2352
  }
2355
- class an {
2353
+ class en {
2356
2354
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2357
2355
  cache = /* @__PURE__ */ new Map();
2358
2356
  /**
@@ -2433,7 +2431,7 @@ class an {
2433
2431
  return this.cache.size;
2434
2432
  }
2435
2433
  }
2436
- class ln {
2434
+ class sn {
2437
2435
  views = /* @__PURE__ */ new Map();
2438
2436
  listeners = /* @__PURE__ */ new Set();
2439
2437
  payloads = /* @__PURE__ */ new Map();
@@ -2455,7 +2453,7 @@ class ln {
2455
2453
  patchesDirty = !0;
2456
2454
  payloadsDirty = !0;
2457
2455
  // Handler cache for stable event handlers
2458
- handlerCache = new an();
2456
+ handlerCache = new en();
2459
2457
  getSortedPatches(t) {
2460
2458
  const s = this.buildPatchCacheKey(t.patches);
2461
2459
  if (t.sortedPatchesCacheKey === s && t.sortedPatchesCache)
@@ -2574,7 +2572,7 @@ class ln {
2574
2572
  if (t.upsertOptimisticPatches && t.upsertOptimisticPatches.length > 0)
2575
2573
  for (const [h, E] of t.upsertOptimisticPatches) {
2576
2574
  const _ = u(), y = _.get(h);
2577
- un(y, E) || (_.set(h, E), r = !0);
2575
+ an(y, E) || (_.set(h, E), r = !0);
2578
2576
  }
2579
2577
  const I = t.rootViewId ?? this.snapshot.rootViewId;
2580
2578
  I !== this.snapshot.rootViewId && (r = !0, this.structureChanged = !0);
@@ -2701,7 +2699,7 @@ class ln {
2701
2699
  }
2702
2700
  }
2703
2701
  }
2704
- class In {
2702
+ class rn {
2705
2703
  streams = /* @__PURE__ */ new Map();
2706
2704
  listeners = /* @__PURE__ */ new Set();
2707
2705
  apply(t, s) {
@@ -2765,7 +2763,7 @@ class In {
2765
2763
  }
2766
2764
  getOrCreateStreamEntry(t) {
2767
2765
  let s = this.streams.get(t);
2768
- return s || (s = { store: new ln() }, this.streams.set(t, s)), s;
2766
+ return s || (s = { store: new sn() }, this.streams.set(t, s)), s;
2769
2767
  }
2770
2768
  notify(t) {
2771
2769
  for (const s of this.listeners)
@@ -2784,7 +2782,7 @@ function Wt(e, t, s) {
2784
2782
  const r = t.get(e.id);
2785
2783
  let i = e, n = !1;
2786
2784
  if (r?.textUpdates && r.textUpdates.length > 0) {
2787
- const f = _n(e, r.textUpdates);
2785
+ const f = In(e, r.textUpdates);
2788
2786
  i = f.node, n = f.changed;
2789
2787
  }
2790
2788
  let o = !1, a = i.props;
@@ -2855,7 +2853,7 @@ function b(e, t) {
2855
2853
  b(s, t);
2856
2854
  }
2857
2855
  const x = [];
2858
- function hn(e) {
2856
+ function nn(e) {
2859
2857
  for (; x.length <= e; )
2860
2858
  x.push(/* @__PURE__ */ new Map());
2861
2859
  return x[e].clear(), x[e];
@@ -2866,10 +2864,10 @@ function H(e, t, s) {
2866
2864
  function Kt(e, t, s, r) {
2867
2865
  if (e === t)
2868
2866
  return;
2869
- (e.type !== t.type || !cn(e.props, t.props) || !jt(e.styleIds, t.styleIds)) && s.add(t.id);
2867
+ (e.type !== t.type || !on(e.props, t.props) || !jt(e.styleIds, t.styleIds)) && s.add(t.id);
2870
2868
  const n = e.children ?? [], o = t.children ?? [];
2871
2869
  if (n !== o) {
2872
- const a = hn(r);
2870
+ const a = nn(r);
2873
2871
  for (const l of n)
2874
2872
  a.set(l.id, l);
2875
2873
  for (const l of o) {
@@ -2879,7 +2877,7 @@ function Kt(e, t, s, r) {
2879
2877
  n.length !== o.length && s.add(t.id);
2880
2878
  }
2881
2879
  }
2882
- function cn(e, t) {
2880
+ function on(e, t) {
2883
2881
  return k(e, t);
2884
2882
  }
2885
2883
  function $t(e, t) {
@@ -2895,7 +2893,7 @@ function $t(e, t) {
2895
2893
  function jt(e, t) {
2896
2894
  return k(e, t);
2897
2895
  }
2898
- function un(e, t) {
2896
+ function an(e, t) {
2899
2897
  if (e === t) return !0;
2900
2898
  if (!e || !t || e.length !== t.length) return !1;
2901
2899
  for (let s = 0; s < e.length; s++) {
@@ -2905,7 +2903,7 @@ function un(e, t) {
2905
2903
  }
2906
2904
  return !0;
2907
2905
  }
2908
- function En(e, t) {
2906
+ function ln(e, t) {
2909
2907
  if (t.length === 0)
2910
2908
  return e;
2911
2909
  const s = [...t].sort((n, o) => n.start - o.start);
@@ -2913,7 +2911,7 @@ function En(e, t) {
2913
2911
  for (const n of s) {
2914
2912
  const o = at(n.start + i, 0, r.length);
2915
2913
  if (n.end == null) {
2916
- const I = r.slice(o), c = fn(I, n.insertedText);
2914
+ const I = r.slice(o), c = hn(I, n.insertedText);
2917
2915
  r = r.slice(0, o) + n.insertedText + I.slice(c), i += n.insertedText.length - c;
2918
2916
  continue;
2919
2917
  }
@@ -2922,7 +2920,7 @@ function En(e, t) {
2922
2920
  }
2923
2921
  return r;
2924
2922
  }
2925
- function _n(e, t, s) {
2923
+ function In(e, t, s) {
2926
2924
  if (t.length === 0)
2927
2925
  return { node: e, changed: !1 };
2928
2926
  const r = /* @__PURE__ */ new Map();
@@ -2942,7 +2940,7 @@ function Xt(e, t, s) {
2942
2940
  c ? c.push(I) : u.set(I.propertyName, [I]);
2943
2941
  }
2944
2942
  for (const [I, c] of u.entries()) {
2945
- const h = n[I], _ = En(typeof h == "string" ? h : "", c);
2943
+ const h = n[I], _ = ln(typeof h == "string" ? h : "", c);
2946
2944
  i || (n = V(n), i = !0), n[I] = _;
2947
2945
  }
2948
2946
  }
@@ -2971,7 +2969,7 @@ function Xt(e, t, s) {
2971
2969
  function at(e, t, s) {
2972
2970
  return Math.max(t, Math.min(s, e));
2973
2971
  }
2974
- function fn(e, t) {
2972
+ function hn(e, t) {
2975
2973
  const s = Math.min(e.length, t.length);
2976
2974
  let r = 0;
2977
2975
  for (; r < s && e.charCodeAt(r) === t.charCodeAt(r); )
@@ -3011,9 +3009,9 @@ function k(e, t) {
3011
3009
  }
3012
3010
  return !1;
3013
3011
  }
3014
- function dn(e) {
3012
+ function cn(e) {
3015
3013
  return new Worker(
3016
- "" + new URL("assets/ui-worker-CXjzZlNS.js", import.meta.url).href,
3014
+ "" + new URL("assets/ui-worker-aijZxF0a.js", import.meta.url).href,
3017
3015
  {
3018
3016
  type: "module",
3019
3017
  name: e?.name
@@ -3021,10 +3019,10 @@ function dn(e) {
3021
3019
  );
3022
3020
  }
3023
3021
  const R = zt("IkonUICore");
3024
- class Sn {
3022
+ class _n {
3025
3023
  unsubscribeProtocolMessages;
3026
3024
  client = null;
3027
- uiStore = new In();
3025
+ uiStore = new rn();
3028
3026
  uiWorker = null;
3029
3027
  uiStyles = /* @__PURE__ */ new Map();
3030
3028
  uiUpdateListeners = /* @__PURE__ */ new Set();
@@ -3077,7 +3075,7 @@ class Sn {
3077
3075
  }
3078
3076
  startUiWorker(t) {
3079
3077
  try {
3080
- this.uiWorker = new dn();
3078
+ this.uiWorker = new cn();
3081
3079
  } catch (i) {
3082
3080
  R.warn("Failed to create UI worker, falling back to main thread", i), this.uiWorker = null;
3083
3081
  return;
@@ -3194,7 +3192,7 @@ class Sn {
3194
3192
  }
3195
3193
  handleGlobalState(t) {
3196
3194
  try {
3197
- const s = _r(t), r = /* @__PURE__ */ new Set();
3195
+ const s = Er(t), r = /* @__PURE__ */ new Set();
3198
3196
  for (const i of Object.values(s.UIStreams ?? {}))
3199
3197
  r.add(i.StreamId), this.uiStore.setCategory(i.StreamId, i.Info?.Category);
3200
3198
  for (const i of this.uiStore.getSnapshots())
@@ -3206,7 +3204,7 @@ class Sn {
3206
3204
  handleUiUpdate(t) {
3207
3205
  const s = nt(t), r = `${s.senderId}_${s.trackId}`;
3208
3206
  try {
3209
- const i = Yi(t), n = on(i);
3207
+ const i = Mi(t), n = tn(i);
3210
3208
  this.notifyUiUpdate(r, n), this.uiStore.apply(r, n), this.sendUiUpdateAck(s.trackId, n.snapshot.version);
3211
3209
  } catch (i) {
3212
3210
  i instanceof D ? R.warn("Failed to parse UI update", i.causeError ?? i) : R.error("Failed to apply UI update", i);
@@ -3214,7 +3212,7 @@ class Sn {
3214
3212
  }
3215
3213
  handleUiStyles(t) {
3216
3214
  try {
3217
- const s = Ii(t);
3215
+ const s = ai(t);
3218
3216
  if (!s.StyleId) return;
3219
3217
  const r = {
3220
3218
  styleId: s.StyleId,
@@ -3228,7 +3226,7 @@ class Sn {
3228
3226
  }
3229
3227
  handleUiStylesBatch(t) {
3230
3228
  try {
3231
- const s = yi(t);
3229
+ const s = fi(t);
3232
3230
  if (!s.Styles) return;
3233
3231
  for (const r of s.Styles) {
3234
3232
  if (!r.StyleId) continue;
@@ -3245,7 +3243,7 @@ class Sn {
3245
3243
  }
3246
3244
  handleUiStylesDelete(t) {
3247
3245
  try {
3248
- const s = Pi(t);
3246
+ const s = gi(t);
3249
3247
  if (!s.StyleIds || s.StyleIds.length === 0) return;
3250
3248
  for (const r of s.StyleIds)
3251
3249
  this.uiStyles.delete(r);
@@ -3277,7 +3275,7 @@ class Sn {
3277
3275
  sendUiUpdateAck(t, s) {
3278
3276
  if (this.client && !(!Number.isFinite(s) || s < 0))
3279
3277
  try {
3280
- const r = zi({ Version: s }, this.client.sessionId ?? 0, { trackId: t });
3278
+ const r = Wi({ Version: s }, this.client.sessionId ?? 0, { trackId: t });
3281
3279
  this.client.sendProtocolMessage(r);
3282
3280
  } catch (r) {
3283
3281
  R.warn("Failed to send UI update ack", r);
@@ -3285,10 +3283,10 @@ class Sn {
3285
3283
  }
3286
3284
  }
3287
3285
  export {
3288
- an as HandlerCache,
3289
- Sn as IkonUICore,
3290
- In as UiStore,
3291
- ln as UiStreamStore,
3286
+ en as HandlerCache,
3287
+ _n as IkonUICore,
3288
+ rn as UiStore,
3289
+ sn as UiStreamStore,
3292
3290
  D as UiUpdateParseError,
3293
- on as parseUiUpdate
3291
+ tn as parseUiUpdate
3294
3292
  };