@naviedu/room-platform-react 0.0.27 → 0.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.d.ts +18 -3
  2. package/index.esm.js +282 -226
  3. package/package.json +1 -1
package/index.esm.js CHANGED
@@ -197,6 +197,7 @@ var RoomPlatformCapability = {
197
197
  MEDIA_PUBLISH_AUDIO: 'media:publish_audio',
198
198
  MEDIA_PUBLISH_VIDEO: 'media:publish_video',
199
199
  MEDIA_SHARE_SCREEN: 'media:share_screen',
200
+ ROOM_SET_MODE: 'room:set_mode',
200
201
  DATA_PUBLISH: 'data:publish',
201
202
  ROOM_SPEAK_REQUEST: 'room:speak_request',
202
203
  ROOM_MODERATE: 'room:moderate',
@@ -243,10 +244,11 @@ var RoomPlatformAction = /*#__PURE__*/ function(RoomPlatformAction) {
243
244
  RoomPlatformAction["SPEAK_REJECT"] = "speak.reject";
244
245
  RoomPlatformAction["SPEAKER_SET"] = "speaker.set";
245
246
  RoomPlatformAction["SPEAKER_CLEAR"] = "speaker.clear";
247
+ RoomPlatformAction["MODE_SET"] = "room.mode.set";
246
248
  return RoomPlatformAction;
247
249
  }({});
248
250
  var _obj;
249
- var roomActionCapabilities = (_obj = {}, _define_property$z(_obj, "private_room.invite", RoomPlatformCapability.PRIVATE_ROOM_INVITE), _define_property$z(_obj, "private_room.respond", RoomPlatformCapability.PRIVATE_ROOM_RESPOND), _define_property$z(_obj, "private_room.close", RoomPlatformCapability.PRIVATE_ROOM_CLOSE), _define_property$z(_obj, "private_room.screen_share.start", RoomPlatformCapability.MEDIA_SHARE_SCREEN), _define_property$z(_obj, "private_room.screen_share.stop", RoomPlatformCapability.MEDIA_SHARE_SCREEN), _define_property$z(_obj, "monitor.start", RoomPlatformCapability.MONITOR_MANAGE), _define_property$z(_obj, "monitor.stop", RoomPlatformCapability.MONITOR_MANAGE), _define_property$z(_obj, "moderation.mute", RoomPlatformCapability.ROOM_MODERATE), _define_property$z(_obj, "moderation.remove", RoomPlatformCapability.ROOM_MODERATE), _define_property$z(_obj, "moderation.lower_hand", RoomPlatformCapability.ROOM_MODERATE), _define_property$z(_obj, "whiteboard.clear", RoomPlatformCapability.WHITEBOARD_CLEAR), _define_property$z(_obj, "speak.request", RoomPlatformCapability.ROOM_SPEAK_REQUEST), _define_property$z(_obj, "speak.cancel", RoomPlatformCapability.ROOM_SPEAK_REQUEST), _define_property$z(_obj, "speak.approve", RoomPlatformCapability.ROOM_MODERATE), _define_property$z(_obj, "speak.reject", RoomPlatformCapability.ROOM_MODERATE), _define_property$z(_obj, "speaker.set", RoomPlatformCapability.ROOM_MODERATE), _define_property$z(_obj, "speaker.clear", RoomPlatformCapability.ROOM_MODERATE), _obj);
251
+ var roomActionCapabilities = (_obj = {}, _define_property$z(_obj, "private_room.invite", RoomPlatformCapability.PRIVATE_ROOM_INVITE), _define_property$z(_obj, "private_room.respond", RoomPlatformCapability.PRIVATE_ROOM_RESPOND), _define_property$z(_obj, "private_room.close", RoomPlatformCapability.PRIVATE_ROOM_CLOSE), _define_property$z(_obj, "private_room.screen_share.start", RoomPlatformCapability.MEDIA_SHARE_SCREEN), _define_property$z(_obj, "private_room.screen_share.stop", RoomPlatformCapability.MEDIA_SHARE_SCREEN), _define_property$z(_obj, "monitor.start", RoomPlatformCapability.MONITOR_MANAGE), _define_property$z(_obj, "monitor.stop", RoomPlatformCapability.MONITOR_MANAGE), _define_property$z(_obj, "moderation.mute", RoomPlatformCapability.ROOM_MODERATE), _define_property$z(_obj, "moderation.remove", RoomPlatformCapability.ROOM_MODERATE), _define_property$z(_obj, "moderation.lower_hand", RoomPlatformCapability.ROOM_MODERATE), _define_property$z(_obj, "whiteboard.clear", RoomPlatformCapability.WHITEBOARD_CLEAR), _define_property$z(_obj, "speak.request", RoomPlatformCapability.ROOM_SPEAK_REQUEST), _define_property$z(_obj, "speak.cancel", RoomPlatformCapability.ROOM_SPEAK_REQUEST), _define_property$z(_obj, "speak.approve", RoomPlatformCapability.ROOM_MODERATE), _define_property$z(_obj, "speak.reject", RoomPlatformCapability.ROOM_MODERATE), _define_property$z(_obj, "speaker.set", RoomPlatformCapability.ROOM_MODERATE), _define_property$z(_obj, "speaker.clear", RoomPlatformCapability.ROOM_MODERATE), _define_property$z(_obj, "room.mode.set", RoomPlatformCapability.ROOM_SET_MODE), _obj);
250
252
 
251
253
  function _type_of$d(obj) {
252
254
  "@swc/helpers - typeof";
@@ -256,7 +258,7 @@ var isRoomControlState = function(value) {
256
258
  if (!value || (typeof value === "undefined" ? "undefined" : _type_of$d(value)) !== 'object' || Array.isArray(value)) return false;
257
259
  var state = value;
258
260
  var monitorViewerCount = state['monitorViewerCount'];
259
- return typeof state['revision'] === 'string' && /^\d+$/.test(state['revision']) && Array.isArray(state['raisedHandParticipantIdentities']) && state['raisedHandParticipantIdentities'].every(function(identity) {
261
+ return typeof state['revision'] === 'string' && /^\d+$/.test(state['revision']) && typeof state['mode'] === 'string' && state['mode'].trim().length > 0 && state['mode'].length <= 64 && Array.isArray(state['raisedHandParticipantIdentities']) && state['raisedHandParticipantIdentities'].every(function(identity) {
260
262
  return typeof identity === 'string';
261
263
  }) && (state['activeSpeakerParticipantIdentity'] === undefined || typeof state['activeSpeakerParticipantIdentity'] === 'string') && typeof state['monitorActive'] === 'boolean' && typeof monitorViewerCount === 'number' && Number.isInteger(monitorViewerCount) && monitorViewerCount >= 0 && state['monitorActive'] === monitorViewerCount > 0 && state['monitorViewers'] === undefined && state['storageRevision'] === undefined;
262
264
  };
@@ -287,7 +289,7 @@ function _array_like_to_array$E(arr, len) {
287
289
  function _array_with_holes$z(arr) {
288
290
  if (Array.isArray(arr)) return arr;
289
291
  }
290
- function _array_without_holes$g(arr) {
292
+ function _array_without_holes$h(arr) {
291
293
  if (Array.isArray(arr)) return _array_like_to_array$E(arr);
292
294
  }
293
295
  function _define_property$y(obj, key, value) {
@@ -303,7 +305,7 @@ function _define_property$y(obj, key, value) {
303
305
  }
304
306
  return obj;
305
307
  }
306
- function _iterable_to_array$g(iter) {
308
+ function _iterable_to_array$h(iter) {
307
309
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
308
310
  }
309
311
  function _iterable_to_array_limit$z(arr, i) {
@@ -333,7 +335,7 @@ function _iterable_to_array_limit$z(arr, i) {
333
335
  function _non_iterable_rest$z() {
334
336
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
335
337
  }
336
- function _non_iterable_spread$g() {
338
+ function _non_iterable_spread$h() {
337
339
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
338
340
  }
339
341
  function _object_spread$v(target) {
@@ -354,8 +356,8 @@ function _object_spread$v(target) {
354
356
  function _sliced_to_array$z(arr, i) {
355
357
  return _array_with_holes$z(arr) || _iterable_to_array_limit$z(arr, i) || _unsupported_iterable_to_array$E(arr, i) || _non_iterable_rest$z();
356
358
  }
357
- function _to_consumable_array$g(arr) {
358
- return _array_without_holes$g(arr) || _iterable_to_array$g(arr) || _unsupported_iterable_to_array$E(arr) || _non_iterable_spread$g();
359
+ function _to_consumable_array$h(arr) {
360
+ return _array_without_holes$h(arr) || _iterable_to_array$h(arr) || _unsupported_iterable_to_array$E(arr) || _non_iterable_spread$h();
359
361
  }
360
362
  function _unsupported_iterable_to_array$E(o, minLen) {
361
363
  if (!o) return;
@@ -693,7 +695,7 @@ var createParseClassName = function(config) {
693
695
  if (currentSegment.length > 0) {
694
696
  var _result;
695
697
  currentSegment.sort();
696
- (_result = result).push.apply(_result, _to_consumable_array$g(currentSegment));
698
+ (_result = result).push.apply(_result, _to_consumable_array$h(currentSegment));
697
699
  currentSegment = [];
698
700
  }
699
701
  result.push(modifier);
@@ -706,7 +708,7 @@ var createParseClassName = function(config) {
706
708
  if (currentSegment.length > 0) {
707
709
  var _result1;
708
710
  currentSegment.sort();
709
- (_result1 = result).push.apply(_result1, _to_consumable_array$g(currentSegment));
711
+ (_result1 = result).push.apply(_result1, _to_consumable_array$h(currentSegment));
710
712
  }
711
713
  return result;
712
714
  };
@@ -846,7 +848,7 @@ var createTailwindMerge = function(createConfigFirst) {
846
848
  for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
847
849
  args[_key] = arguments[_key];
848
850
  }
849
- return functionToCall(twJoin.apply(void 0, _to_consumable_array$g(args)));
851
+ return functionToCall(twJoin.apply(void 0, _to_consumable_array$h(args)));
850
852
  };
851
853
  };
852
854
  var fallbackThemeArr = [];
@@ -1062,7 +1064,7 @@ var getDefaultConfig = function() {
1062
1064
  ];
1063
1065
  };
1064
1066
  var scalePositionWithArbitrary = function() {
1065
- return _to_consumable_array$g(scalePosition()).concat([
1067
+ return _to_consumable_array$h(scalePosition()).concat([
1066
1068
  isArbitraryVariable,
1067
1069
  isArbitraryValue
1068
1070
  ]);
@@ -1095,7 +1097,7 @@ var getDefaultConfig = function() {
1095
1097
  isFraction,
1096
1098
  'full',
1097
1099
  'auto'
1098
- ].concat(_to_consumable_array$g(scaleUnambiguousSpacing()));
1100
+ ].concat(_to_consumable_array$h(scaleUnambiguousSpacing()));
1099
1101
  };
1100
1102
  var scaleGridTemplateColsRows = function() {
1101
1103
  return [
@@ -1167,7 +1169,7 @@ var getDefaultConfig = function() {
1167
1169
  var scaleMargin = function() {
1168
1170
  return [
1169
1171
  'auto'
1170
- ].concat(_to_consumable_array$g(scaleUnambiguousSpacing()));
1172
+ ].concat(_to_consumable_array$h(scaleUnambiguousSpacing()));
1171
1173
  };
1172
1174
  var scaleSizing = function() {
1173
1175
  return [
@@ -1183,7 +1185,7 @@ var getDefaultConfig = function() {
1183
1185
  'min',
1184
1186
  'max',
1185
1187
  'fit'
1186
- ].concat(_to_consumable_array$g(scaleUnambiguousSpacing()));
1188
+ ].concat(_to_consumable_array$h(scaleUnambiguousSpacing()));
1187
1189
  };
1188
1190
  var scaleSizingInline = function() {
1189
1191
  return [
@@ -1196,7 +1198,7 @@ var getDefaultConfig = function() {
1196
1198
  'min',
1197
1199
  'max',
1198
1200
  'fit'
1199
- ].concat(_to_consumable_array$g(scaleUnambiguousSpacing()));
1201
+ ].concat(_to_consumable_array$h(scaleUnambiguousSpacing()));
1200
1202
  };
1201
1203
  var scaleSizingBlock = function() {
1202
1204
  return [
@@ -1210,7 +1212,7 @@ var getDefaultConfig = function() {
1210
1212
  'min',
1211
1213
  'max',
1212
1214
  'fit'
1213
- ].concat(_to_consumable_array$g(scaleUnambiguousSpacing()));
1215
+ ].concat(_to_consumable_array$h(scaleUnambiguousSpacing()));
1214
1216
  };
1215
1217
  var scaleColor = function() {
1216
1218
  return [
@@ -1220,7 +1222,7 @@ var getDefaultConfig = function() {
1220
1222
  ];
1221
1223
  };
1222
1224
  var scaleBgPosition = function() {
1223
- return _to_consumable_array$g(scalePosition()).concat([
1225
+ return _to_consumable_array$h(scalePosition()).concat([
1224
1226
  isArbitraryVariablePosition,
1225
1227
  isArbitraryPosition,
1226
1228
  {
@@ -1359,7 +1361,7 @@ var getDefaultConfig = function() {
1359
1361
  return [
1360
1362
  isFraction,
1361
1363
  'full'
1362
- ].concat(_to_consumable_array$g(scaleUnambiguousSpacing()));
1364
+ ].concat(_to_consumable_array$h(scaleUnambiguousSpacing()));
1363
1365
  };
1364
1366
  return {
1365
1367
  cacheSize: 500,
@@ -1822,7 +1824,7 @@ var getDefaultConfig = function() {
1822
1824
  'full',
1823
1825
  'auto',
1824
1826
  themeContainer
1825
- ].concat(_to_consumable_array$g(scaleUnambiguousSpacing()))
1827
+ ].concat(_to_consumable_array$h(scaleUnambiguousSpacing()))
1826
1828
  }
1827
1829
  ],
1828
1830
  /**
@@ -2029,7 +2031,7 @@ var getDefaultConfig = function() {
2029
2031
  * @see https://tailwindcss.com/docs/justify-content
2030
2032
  */ 'justify-content': [
2031
2033
  {
2032
- justify: _to_consumable_array$g(scaleAlignPrimaryAxis()).concat([
2034
+ justify: _to_consumable_array$h(scaleAlignPrimaryAxis()).concat([
2033
2035
  'normal'
2034
2036
  ])
2035
2037
  }
@@ -2039,7 +2041,7 @@ var getDefaultConfig = function() {
2039
2041
  * @see https://tailwindcss.com/docs/justify-items
2040
2042
  */ 'justify-items': [
2041
2043
  {
2042
- 'justify-items': _to_consumable_array$g(scaleAlignSecondaryAxis()).concat([
2044
+ 'justify-items': _to_consumable_array$h(scaleAlignSecondaryAxis()).concat([
2043
2045
  'normal'
2044
2046
  ])
2045
2047
  }
@@ -2051,7 +2053,7 @@ var getDefaultConfig = function() {
2051
2053
  {
2052
2054
  'justify-self': [
2053
2055
  'auto'
2054
- ].concat(_to_consumable_array$g(scaleAlignSecondaryAxis()))
2056
+ ].concat(_to_consumable_array$h(scaleAlignSecondaryAxis()))
2055
2057
  }
2056
2058
  ],
2057
2059
  /**
@@ -2061,7 +2063,7 @@ var getDefaultConfig = function() {
2061
2063
  {
2062
2064
  content: [
2063
2065
  'normal'
2064
- ].concat(_to_consumable_array$g(scaleAlignPrimaryAxis()))
2066
+ ].concat(_to_consumable_array$h(scaleAlignPrimaryAxis()))
2065
2067
  }
2066
2068
  ],
2067
2069
  /**
@@ -2069,7 +2071,7 @@ var getDefaultConfig = function() {
2069
2071
  * @see https://tailwindcss.com/docs/align-items
2070
2072
  */ 'align-items': [
2071
2073
  {
2072
- items: _to_consumable_array$g(scaleAlignSecondaryAxis()).concat([
2074
+ items: _to_consumable_array$h(scaleAlignSecondaryAxis()).concat([
2073
2075
  {
2074
2076
  baseline: [
2075
2077
  '',
@@ -2086,7 +2088,7 @@ var getDefaultConfig = function() {
2086
2088
  {
2087
2089
  self: [
2088
2090
  'auto'
2089
- ].concat(_to_consumable_array$g(scaleAlignSecondaryAxis()), [
2091
+ ].concat(_to_consumable_array$h(scaleAlignSecondaryAxis()), [
2090
2092
  {
2091
2093
  baseline: [
2092
2094
  '',
@@ -2109,7 +2111,7 @@ var getDefaultConfig = function() {
2109
2111
  * @see https://tailwindcss.com/docs/place-items
2110
2112
  */ 'place-items': [
2111
2113
  {
2112
- 'place-items': _to_consumable_array$g(scaleAlignSecondaryAxis()).concat([
2114
+ 'place-items': _to_consumable_array$h(scaleAlignSecondaryAxis()).concat([
2113
2115
  'baseline'
2114
2116
  ])
2115
2117
  }
@@ -2121,7 +2123,7 @@ var getDefaultConfig = function() {
2121
2123
  {
2122
2124
  'place-self': [
2123
2125
  'auto'
2124
- ].concat(_to_consumable_array$g(scaleAlignSecondaryAxis()))
2126
+ ].concat(_to_consumable_array$h(scaleAlignSecondaryAxis()))
2125
2127
  }
2126
2128
  ],
2127
2129
  // Spacing
@@ -2347,7 +2349,7 @@ var getDefaultConfig = function() {
2347
2349
  {
2348
2350
  inline: [
2349
2351
  'auto'
2350
- ].concat(_to_consumable_array$g(scaleSizingInline()))
2352
+ ].concat(_to_consumable_array$h(scaleSizingInline()))
2351
2353
  }
2352
2354
  ],
2353
2355
  /**
@@ -2357,7 +2359,7 @@ var getDefaultConfig = function() {
2357
2359
  {
2358
2360
  'min-inline': [
2359
2361
  'auto'
2360
- ].concat(_to_consumable_array$g(scaleSizingInline()))
2362
+ ].concat(_to_consumable_array$h(scaleSizingInline()))
2361
2363
  }
2362
2364
  ],
2363
2365
  /**
@@ -2367,7 +2369,7 @@ var getDefaultConfig = function() {
2367
2369
  {
2368
2370
  'max-inline': [
2369
2371
  'none'
2370
- ].concat(_to_consumable_array$g(scaleSizingInline()))
2372
+ ].concat(_to_consumable_array$h(scaleSizingInline()))
2371
2373
  }
2372
2374
  ],
2373
2375
  /**
@@ -2377,7 +2379,7 @@ var getDefaultConfig = function() {
2377
2379
  {
2378
2380
  block: [
2379
2381
  'auto'
2380
- ].concat(_to_consumable_array$g(scaleSizingBlock()))
2382
+ ].concat(_to_consumable_array$h(scaleSizingBlock()))
2381
2383
  }
2382
2384
  ],
2383
2385
  /**
@@ -2387,7 +2389,7 @@ var getDefaultConfig = function() {
2387
2389
  {
2388
2390
  'min-block': [
2389
2391
  'auto'
2390
- ].concat(_to_consumable_array$g(scaleSizingBlock()))
2392
+ ].concat(_to_consumable_array$h(scaleSizingBlock()))
2391
2393
  }
2392
2394
  ],
2393
2395
  /**
@@ -2397,7 +2399,7 @@ var getDefaultConfig = function() {
2397
2399
  {
2398
2400
  'max-block': [
2399
2401
  'none'
2400
- ].concat(_to_consumable_array$g(scaleSizingBlock()))
2402
+ ].concat(_to_consumable_array$h(scaleSizingBlock()))
2401
2403
  }
2402
2404
  ],
2403
2405
  /**
@@ -2408,7 +2410,7 @@ var getDefaultConfig = function() {
2408
2410
  w: [
2409
2411
  themeContainer,
2410
2412
  'screen'
2411
- ].concat(_to_consumable_array$g(scaleSizing()))
2413
+ ].concat(_to_consumable_array$h(scaleSizing()))
2412
2414
  }
2413
2415
  ],
2414
2416
  /**
@@ -2420,7 +2422,7 @@ var getDefaultConfig = function() {
2420
2422
  themeContainer,
2421
2423
  'screen',
2422
2424
  /** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */ 'none'
2423
- ].concat(_to_consumable_array$g(scaleSizing()))
2425
+ ].concat(_to_consumable_array$h(scaleSizing()))
2424
2426
  }
2425
2427
  ],
2426
2428
  /**
@@ -2438,7 +2440,7 @@ var getDefaultConfig = function() {
2438
2440
  themeBreakpoint
2439
2441
  ]
2440
2442
  }
2441
- ].concat(_to_consumable_array$g(scaleSizing()))
2443
+ ].concat(_to_consumable_array$h(scaleSizing()))
2442
2444
  }
2443
2445
  ],
2444
2446
  /**
@@ -2449,7 +2451,7 @@ var getDefaultConfig = function() {
2449
2451
  h: [
2450
2452
  'screen',
2451
2453
  'lh'
2452
- ].concat(_to_consumable_array$g(scaleSizing()))
2454
+ ].concat(_to_consumable_array$h(scaleSizing()))
2453
2455
  }
2454
2456
  ],
2455
2457
  /**
@@ -2461,7 +2463,7 @@ var getDefaultConfig = function() {
2461
2463
  'screen',
2462
2464
  'lh',
2463
2465
  'none'
2464
- ].concat(_to_consumable_array$g(scaleSizing()))
2466
+ ].concat(_to_consumable_array$h(scaleSizing()))
2465
2467
  }
2466
2468
  ],
2467
2469
  /**
@@ -2472,7 +2474,7 @@ var getDefaultConfig = function() {
2472
2474
  'max-h': [
2473
2475
  'screen',
2474
2476
  'lh'
2475
- ].concat(_to_consumable_array$g(scaleSizing()))
2477
+ ].concat(_to_consumable_array$h(scaleSizing()))
2476
2478
  }
2477
2479
  ],
2478
2480
  // ------------------
@@ -2630,7 +2632,7 @@ var getDefaultConfig = function() {
2630
2632
  {
2631
2633
  leading: [
2632
2634
  /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */ themeLeading
2633
- ].concat(_to_consumable_array$g(scaleUnambiguousSpacing()))
2635
+ ].concat(_to_consumable_array$h(scaleUnambiguousSpacing()))
2634
2636
  }
2635
2637
  ],
2636
2638
  /**
@@ -2716,7 +2718,7 @@ var getDefaultConfig = function() {
2716
2718
  * @see https://tailwindcss.com/docs/text-decoration-style
2717
2719
  */ 'text-decoration-style': [
2718
2720
  {
2719
- decoration: _to_consumable_array$g(scaleLineStyle()).concat([
2721
+ decoration: _to_consumable_array$h(scaleLineStyle()).concat([
2720
2722
  'wavy'
2721
2723
  ])
2722
2724
  }
@@ -3282,7 +3284,7 @@ var getDefaultConfig = function() {
3282
3284
  * @see https://tailwindcss.com/docs/border-style
3283
3285
  */ 'border-style': [
3284
3286
  {
3285
- border: _to_consumable_array$g(scaleLineStyle()).concat([
3287
+ border: _to_consumable_array$h(scaleLineStyle()).concat([
3286
3288
  'hidden',
3287
3289
  'none'
3288
3290
  ])
@@ -3293,7 +3295,7 @@ var getDefaultConfig = function() {
3293
3295
  * @see https://tailwindcss.com/docs/border-style#setting-the-divider-style
3294
3296
  */ 'divide-style': [
3295
3297
  {
3296
- divide: _to_consumable_array$g(scaleLineStyle()).concat([
3298
+ divide: _to_consumable_array$h(scaleLineStyle()).concat([
3297
3299
  'hidden',
3298
3300
  'none'
3299
3301
  ])
@@ -3400,7 +3402,7 @@ var getDefaultConfig = function() {
3400
3402
  * @see https://tailwindcss.com/docs/outline-style
3401
3403
  */ 'outline-style': [
3402
3404
  {
3403
- outline: _to_consumable_array$g(scaleLineStyle()).concat([
3405
+ outline: _to_consumable_array$h(scaleLineStyle()).concat([
3404
3406
  'none',
3405
3407
  'hidden'
3406
3408
  ])
@@ -3587,7 +3589,7 @@ var getDefaultConfig = function() {
3587
3589
  * @see https://tailwindcss.com/docs/mix-blend-mode
3588
3590
  */ 'mix-blend': [
3589
3591
  {
3590
- 'mix-blend': _to_consumable_array$g(scaleBlendMode()).concat([
3592
+ 'mix-blend': _to_consumable_array$h(scaleBlendMode()).concat([
3591
3593
  'plus-darker',
3592
3594
  'plus-lighter'
3593
3595
  ])
@@ -4980,7 +4982,7 @@ var getDefaultConfig = function() {
4980
4982
  {
4981
4983
  fill: [
4982
4984
  'none'
4983
- ].concat(_to_consumable_array$g(scaleColor()))
4985
+ ].concat(_to_consumable_array$h(scaleColor()))
4984
4986
  }
4985
4987
  ],
4986
4988
  /**
@@ -5003,7 +5005,7 @@ var getDefaultConfig = function() {
5003
5005
  {
5004
5006
  stroke: [
5005
5007
  'none'
5006
- ].concat(_to_consumable_array$g(scaleColor()))
5008
+ ].concat(_to_consumable_array$h(scaleColor()))
5007
5009
  }
5008
5010
  ],
5009
5011
  // ---------------------
@@ -5320,7 +5322,7 @@ function _array_like_to_array$D(arr, len) {
5320
5322
  function _array_with_holes$y(arr) {
5321
5323
  if (Array.isArray(arr)) return arr;
5322
5324
  }
5323
- function _array_without_holes$f(arr) {
5325
+ function _array_without_holes$g(arr) {
5324
5326
  if (Array.isArray(arr)) return _array_like_to_array$D(arr);
5325
5327
  }
5326
5328
  function _define_property$x(obj, key, value) {
@@ -5336,7 +5338,7 @@ function _define_property$x(obj, key, value) {
5336
5338
  }
5337
5339
  return obj;
5338
5340
  }
5339
- function _iterable_to_array$f(iter) {
5341
+ function _iterable_to_array$g(iter) {
5340
5342
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
5341
5343
  }
5342
5344
  function _iterable_to_array_limit$y(arr, i) {
@@ -5366,7 +5368,7 @@ function _iterable_to_array_limit$y(arr, i) {
5366
5368
  function _non_iterable_rest$y() {
5367
5369
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
5368
5370
  }
5369
- function _non_iterable_spread$f() {
5371
+ function _non_iterable_spread$g() {
5370
5372
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
5371
5373
  }
5372
5374
  function _object_spread$u(target) {
@@ -5423,8 +5425,8 @@ function _object_without_properties_loose$f(source, excluded) {
5423
5425
  function _sliced_to_array$y(arr, i) {
5424
5426
  return _array_with_holes$y(arr) || _iterable_to_array_limit$y(arr, i) || _unsupported_iterable_to_array$D(arr, i) || _non_iterable_rest$y();
5425
5427
  }
5426
- function _to_consumable_array$f(arr) {
5427
- return _array_without_holes$f(arr) || _iterable_to_array$f(arr) || _unsupported_iterable_to_array$D(arr) || _non_iterable_spread$f();
5428
+ function _to_consumable_array$g(arr) {
5429
+ return _array_without_holes$g(arr) || _iterable_to_array$g(arr) || _unsupported_iterable_to_array$D(arr) || _non_iterable_spread$g();
5428
5430
  }
5429
5431
  function _unsupported_iterable_to_array$D(o, minLen) {
5430
5432
  if (!o) return;
@@ -5466,7 +5468,7 @@ var cva = function(base, config) {
5466
5468
  return Object.entries(compoundVariantOptions).every(function(param) {
5467
5469
  var _param = _sliced_to_array$y(param, 2), key = _param[0], value = _param[1];
5468
5470
  return Array.isArray(value) ? value.includes(_object_spread$u({}, defaultVariants, propsWithoutUndefined)[key]) : _object_spread$u({}, defaultVariants, propsWithoutUndefined)[key] === value;
5469
- }) ? _to_consumable_array$f(acc).concat([
5471
+ }) ? _to_consumable_array$g(acc).concat([
5470
5472
  cvClass,
5471
5473
  cvClassName
5472
5474
  ]) : acc;
@@ -6803,13 +6805,6 @@ var reduceRoomControlState = function(current, next) {
6803
6805
  };
6804
6806
  };
6805
6807
 
6806
- var RoomPlatformPrivateRoomContext = createContext(undefined);
6807
- function useRoomPlatformPrivateRoomContext() {
6808
- var context = useContext(RoomPlatformPrivateRoomContext);
6809
- if (!context) throw new Error('useRoomPlatformPrivateRoomContext must be used inside RoomPlatformProvider');
6810
- return context;
6811
- }
6812
-
6813
6808
  var WhiteboardContext = createContext(undefined);
6814
6809
  function useWhiteboard() {
6815
6810
  var context = useContext(WhiteboardContext);
@@ -6936,7 +6931,7 @@ function _array_like_to_array$B(arr, len) {
6936
6931
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
6937
6932
  return arr2;
6938
6933
  }
6939
- function _array_without_holes$e(arr) {
6934
+ function _array_without_holes$f(arr) {
6940
6935
  if (Array.isArray(arr)) return _array_like_to_array$B(arr);
6941
6936
  }
6942
6937
  function _define_property$o(obj, key, value) {
@@ -6952,10 +6947,10 @@ function _define_property$o(obj, key, value) {
6952
6947
  }
6953
6948
  return obj;
6954
6949
  }
6955
- function _iterable_to_array$e(iter) {
6950
+ function _iterable_to_array$f(iter) {
6956
6951
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
6957
6952
  }
6958
- function _non_iterable_spread$e() {
6953
+ function _non_iterable_spread$f() {
6959
6954
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
6960
6955
  }
6961
6956
  function _object_spread$l(target) {
@@ -7028,8 +7023,8 @@ function _object_without_properties_loose$6(source, excluded) {
7028
7023
  }
7029
7024
  return target;
7030
7025
  }
7031
- function _to_consumable_array$e(arr) {
7032
- return _array_without_holes$e(arr) || _iterable_to_array$e(arr) || _unsupported_iterable_to_array$B(arr) || _non_iterable_spread$e();
7026
+ function _to_consumable_array$f(arr) {
7027
+ return _array_without_holes$f(arr) || _iterable_to_array$f(arr) || _unsupported_iterable_to_array$B(arr) || _non_iterable_spread$f();
7033
7028
  }
7034
7029
  function _unsupported_iterable_to_array$B(o, minLen) {
7035
7030
  if (!o) return;
@@ -7046,13 +7041,13 @@ function createWhiteboardLocalHistory(createOperationId) {
7046
7041
  };
7047
7042
  var getState = function() {
7048
7043
  return {
7049
- undoStack: _to_consumable_array$e(state.undoStack),
7050
- redoStack: _to_consumable_array$e(state.redoStack)
7044
+ undoStack: _to_consumable_array$f(state.undoStack),
7045
+ redoStack: _to_consumable_array$f(state.redoStack)
7051
7046
  };
7052
7047
  };
7053
7048
  var record = function(entry) {
7054
7049
  state = {
7055
- undoStack: _to_consumable_array$e(state.undoStack).concat([
7050
+ undoStack: _to_consumable_array$f(state.undoStack).concat([
7056
7051
  entry
7057
7052
  ]),
7058
7053
  redoStack: []
@@ -7114,7 +7109,7 @@ function createWhiteboardLocalHistory(createOperationId) {
7114
7109
  clearOperationId: entry.clearOperationId
7115
7110
  }
7116
7111
  },
7117
- restoredObjects: _to_consumable_array$e(entry.localObjects)
7112
+ restoredObjects: _to_consumable_array$f(entry.localObjects)
7118
7113
  };
7119
7114
  }
7120
7115
  var clearOperationId = createOperationId();
@@ -7133,7 +7128,7 @@ function createWhiteboardLocalHistory(createOperationId) {
7133
7128
  if (!entry) return undefined;
7134
7129
  var transition = commandFor(entry, direction);
7135
7130
  var _obj;
7136
- state = _object_spread_props$j(_object_spread$l({}, state), (_obj = {}, _define_property$o(_obj, from, source.slice(0, -1)), _define_property$o(_obj, to, _to_consumable_array$e(state[to]).concat([
7131
+ state = _object_spread_props$j(_object_spread$l({}, state), (_obj = {}, _define_property$o(_obj, from, source.slice(0, -1)), _define_property$o(_obj, to, _to_consumable_array$f(state[to]).concat([
7137
7132
  entry
7138
7133
  ])), _obj));
7139
7134
  return transition;
@@ -7156,7 +7151,7 @@ function createWhiteboardLocalHistory(createOperationId) {
7156
7151
  return record({
7157
7152
  kind: 'clear',
7158
7153
  clearOperationId: clearOperationId,
7159
- localObjects: _to_consumable_array$e(localObjects)
7154
+ localObjects: _to_consumable_array$f(localObjects)
7160
7155
  });
7161
7156
  },
7162
7157
  undo: function() {
@@ -7185,17 +7180,17 @@ function _array_like_to_array$A(arr, len) {
7185
7180
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
7186
7181
  return arr2;
7187
7182
  }
7188
- function _array_without_holes$d(arr) {
7183
+ function _array_without_holes$e(arr) {
7189
7184
  if (Array.isArray(arr)) return _array_like_to_array$A(arr);
7190
7185
  }
7191
- function _iterable_to_array$d(iter) {
7186
+ function _iterable_to_array$e(iter) {
7192
7187
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
7193
7188
  }
7194
- function _non_iterable_spread$d() {
7189
+ function _non_iterable_spread$e() {
7195
7190
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
7196
7191
  }
7197
- function _to_consumable_array$d(arr) {
7198
- return _array_without_holes$d(arr) || _iterable_to_array$d(arr) || _unsupported_iterable_to_array$A(arr) || _non_iterable_spread$d();
7192
+ function _to_consumable_array$e(arr) {
7193
+ return _array_without_holes$e(arr) || _iterable_to_array$e(arr) || _unsupported_iterable_to_array$A(arr) || _non_iterable_spread$e();
7199
7194
  }
7200
7195
  function _unsupported_iterable_to_array$A(o, minLen) {
7201
7196
  if (!o) return;
@@ -7250,7 +7245,7 @@ function clearCanvas(context, frameRect) {
7250
7245
  function redrawScene(context, objects, frameRect) {
7251
7246
  var now = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : new Date();
7252
7247
  clearCanvas(context, frameRect);
7253
- var orderedObjects = _to_consumable_array$d(objects).sort(function(left, right) {
7248
+ var orderedObjects = _to_consumable_array$e(objects).sort(function(left, right) {
7254
7249
  return left.latestRevision - right.latestRevision;
7255
7250
  });
7256
7251
  orderedObjects.forEach(function(object) {
@@ -7269,7 +7264,7 @@ function renderDraft(context, draft, frameRect) {
7269
7264
  function hitTestObject(point, objects, frameRect) {
7270
7265
  var now = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : new Date();
7271
7266
  var pixelPoint = toPixelPoint(point, frameRect);
7272
- var orderedObjects = _to_consumable_array$d(objects).sort(function(left, right) {
7267
+ var orderedObjects = _to_consumable_array$e(objects).sort(function(left, right) {
7273
7268
  return right.latestRevision - left.latestRevision;
7274
7269
  });
7275
7270
  return orderedObjects.find(function(object) {
@@ -7498,10 +7493,10 @@ function getObjectBounds(object, frameRect) {
7498
7493
  return point.y;
7499
7494
  });
7500
7495
  return {
7501
- height: (_Math = Math).max.apply(_Math, _to_consumable_array$d(ys)) - (_Math1 = Math).min.apply(_Math1, _to_consumable_array$d(ys)),
7502
- width: (_Math2 = Math).max.apply(_Math2, _to_consumable_array$d(xs)) - (_Math3 = Math).min.apply(_Math3, _to_consumable_array$d(xs)),
7503
- x: (_Math4 = Math).min.apply(_Math4, _to_consumable_array$d(xs)),
7504
- y: (_Math5 = Math).min.apply(_Math5, _to_consumable_array$d(ys))
7496
+ height: (_Math = Math).max.apply(_Math, _to_consumable_array$e(ys)) - (_Math1 = Math).min.apply(_Math1, _to_consumable_array$e(ys)),
7497
+ width: (_Math2 = Math).max.apply(_Math2, _to_consumable_array$e(xs)) - (_Math3 = Math).min.apply(_Math3, _to_consumable_array$e(xs)),
7498
+ x: (_Math4 = Math).min.apply(_Math4, _to_consumable_array$e(xs)),
7499
+ y: (_Math5 = Math).min.apply(_Math5, _to_consumable_array$e(ys))
7505
7500
  };
7506
7501
  }
7507
7502
  var startPoint = toPixelPoint(object.payload.start, frameRect);
@@ -7554,7 +7549,7 @@ function _array_like_to_array$z(arr, len) {
7554
7549
  function _array_with_holes$w(arr) {
7555
7550
  if (Array.isArray(arr)) return arr;
7556
7551
  }
7557
- function _array_without_holes$c(arr) {
7552
+ function _array_without_holes$d(arr) {
7558
7553
  if (Array.isArray(arr)) return _array_like_to_array$z(arr);
7559
7554
  }
7560
7555
  function _define_property$n(obj, key, value) {
@@ -7570,7 +7565,7 @@ function _define_property$n(obj, key, value) {
7570
7565
  }
7571
7566
  return obj;
7572
7567
  }
7573
- function _iterable_to_array$c(iter) {
7568
+ function _iterable_to_array$d(iter) {
7574
7569
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
7575
7570
  }
7576
7571
  function _iterable_to_array_limit$w(arr, i) {
@@ -7600,7 +7595,7 @@ function _iterable_to_array_limit$w(arr, i) {
7600
7595
  function _non_iterable_rest$w() {
7601
7596
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
7602
7597
  }
7603
- function _non_iterable_spread$c() {
7598
+ function _non_iterable_spread$d() {
7604
7599
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
7605
7600
  }
7606
7601
  function _object_spread$k(target) {
@@ -7640,8 +7635,8 @@ function _object_spread_props$i(target, source) {
7640
7635
  function _sliced_to_array$w(arr, i) {
7641
7636
  return _array_with_holes$w(arr) || _iterable_to_array_limit$w(arr, i) || _unsupported_iterable_to_array$z(arr, i) || _non_iterable_rest$w();
7642
7637
  }
7643
- function _to_consumable_array$c(arr) {
7644
- return _array_without_holes$c(arr) || _iterable_to_array$c(arr) || _unsupported_iterable_to_array$z(arr) || _non_iterable_spread$c();
7638
+ function _to_consumable_array$d(arr) {
7639
+ return _array_without_holes$d(arr) || _iterable_to_array$d(arr) || _unsupported_iterable_to_array$z(arr) || _non_iterable_spread$d();
7645
7640
  }
7646
7641
  function _type_of$9(obj) {
7647
7642
  "@swc/helpers - typeof";
@@ -7930,7 +7925,7 @@ function applyOperationToScene(state, operation, revision, optimisticRestoreObje
7930
7925
  }
7931
7926
  }
7932
7927
  function sortRecoveredObjects(state) {
7933
- state.recoveredObjects = new Map(_to_consumable_array$c(state.recoveredObjects.entries()).sort(function(param, param1) {
7928
+ state.recoveredObjects = new Map(_to_consumable_array$d(state.recoveredObjects.entries()).sort(function(param, param1) {
7934
7929
  var _param = _sliced_to_array$w(param, 2), left = _param[1], _param1 = _sliced_to_array$w(param1, 2), right = _param1[1];
7935
7930
  return left.latestRevision === right.latestRevision ? left.objectId.localeCompare(right.objectId) : left.latestRevision - right.latestRevision;
7936
7931
  }));
@@ -7966,7 +7961,7 @@ function getOptimisticTail(state, operationId) {
7966
7961
  function cloneState(state) {
7967
7962
  return _object_spread_props$i(_object_spread$k({}, state), {
7968
7963
  appliedOperationIds: new Set(state.appliedOperationIds),
7969
- optimisticOperationIds: _to_consumable_array$c(state.optimisticOperationIds),
7964
+ optimisticOperationIds: _to_consumable_array$d(state.optimisticOperationIds),
7970
7965
  optimisticOperations: new Map(state.optimisticOperations),
7971
7966
  recoveredObjects: new Map(state.recoveredObjects)
7972
7967
  });
@@ -8710,7 +8705,7 @@ function _array_like_to_array$y(arr, len) {
8710
8705
  function _array_with_holes$v(arr) {
8711
8706
  if (Array.isArray(arr)) return arr;
8712
8707
  }
8713
- function _array_without_holes$b(arr) {
8708
+ function _array_without_holes$c(arr) {
8714
8709
  if (Array.isArray(arr)) return _array_like_to_array$y(arr);
8715
8710
  }
8716
8711
  function _define_property$l(obj, key, value) {
@@ -8726,7 +8721,7 @@ function _define_property$l(obj, key, value) {
8726
8721
  }
8727
8722
  return obj;
8728
8723
  }
8729
- function _iterable_to_array$b(iter) {
8724
+ function _iterable_to_array$c(iter) {
8730
8725
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
8731
8726
  }
8732
8727
  function _iterable_to_array_limit$v(arr, i) {
@@ -8756,7 +8751,7 @@ function _iterable_to_array_limit$v(arr, i) {
8756
8751
  function _non_iterable_rest$v() {
8757
8752
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
8758
8753
  }
8759
- function _non_iterable_spread$b() {
8754
+ function _non_iterable_spread$c() {
8760
8755
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
8761
8756
  }
8762
8757
  function _object_spread$j(target) {
@@ -8796,8 +8791,8 @@ function _object_spread_props$h(target, source) {
8796
8791
  function _sliced_to_array$v(arr, i) {
8797
8792
  return _array_with_holes$v(arr) || _iterable_to_array_limit$v(arr, i) || _unsupported_iterable_to_array$y(arr, i) || _non_iterable_rest$v();
8798
8793
  }
8799
- function _to_consumable_array$b(arr) {
8800
- return _array_without_holes$b(arr) || _iterable_to_array$b(arr) || _unsupported_iterable_to_array$y(arr) || _non_iterable_spread$b();
8794
+ function _to_consumable_array$c(arr) {
8795
+ return _array_without_holes$c(arr) || _iterable_to_array$c(arr) || _unsupported_iterable_to_array$y(arr) || _non_iterable_spread$c();
8801
8796
  }
8802
8797
  function _unsupported_iterable_to_array$y(o, minLen) {
8803
8798
  if (!o) return;
@@ -9146,7 +9141,7 @@ function getPreferredPopoverSide(dock, position, toolbarSize, viewport) {
9146
9141
  position.top - (viewport.top + WHITEBOARD_VIEWPORT_PADDING)
9147
9142
  ]
9148
9143
  ];
9149
- return _to_consumable_array$b(spaces).sort(function(left, right) {
9144
+ return _to_consumable_array$c(spaces).sort(function(left, right) {
9150
9145
  return right[1] - left[1];
9151
9146
  })[0][0];
9152
9147
  }
@@ -9966,7 +9961,7 @@ function _array_like_to_array$v(arr, len) {
9966
9961
  function _array_with_holes$s(arr) {
9967
9962
  if (Array.isArray(arr)) return arr;
9968
9963
  }
9969
- function _array_without_holes$a(arr) {
9964
+ function _array_without_holes$b(arr) {
9970
9965
  if (Array.isArray(arr)) return _array_like_to_array$v(arr);
9971
9966
  }
9972
9967
  function asyncGeneratorStep$n(gen, resolve, reject, _next, _throw, key, arg) {
@@ -10011,7 +10006,7 @@ function _define_property$j(obj, key, value) {
10011
10006
  }
10012
10007
  return obj;
10013
10008
  }
10014
- function _iterable_to_array$a(iter) {
10009
+ function _iterable_to_array$b(iter) {
10015
10010
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
10016
10011
  }
10017
10012
  function _iterable_to_array_limit$s(arr, i) {
@@ -10041,7 +10036,7 @@ function _iterable_to_array_limit$s(arr, i) {
10041
10036
  function _non_iterable_rest$s() {
10042
10037
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
10043
10038
  }
10044
- function _non_iterable_spread$a() {
10039
+ function _non_iterable_spread$b() {
10045
10040
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
10046
10041
  }
10047
10042
  function _object_spread$h(target) {
@@ -10117,8 +10112,8 @@ function _object_without_properties_loose$5(source, excluded) {
10117
10112
  function _sliced_to_array$s(arr, i) {
10118
10113
  return _array_with_holes$s(arr) || _iterable_to_array_limit$s(arr, i) || _unsupported_iterable_to_array$v(arr, i) || _non_iterable_rest$s();
10119
10114
  }
10120
- function _to_consumable_array$a(arr) {
10121
- return _array_without_holes$a(arr) || _iterable_to_array$a(arr) || _unsupported_iterable_to_array$v(arr) || _non_iterable_spread$a();
10115
+ function _to_consumable_array$b(arr) {
10116
+ return _array_without_holes$b(arr) || _iterable_to_array$b(arr) || _unsupported_iterable_to_array$v(arr) || _non_iterable_spread$b();
10122
10117
  }
10123
10118
  function _type_of$8(obj) {
10124
10119
  "@swc/helpers - typeof";
@@ -10274,7 +10269,7 @@ function WhiteboardCanvas(param) {
10274
10269
  var isSubmitBusy = submitState === 'submitting';
10275
10270
  var interactionEnabled = hasWritePermission && runtimeState === 'ready' && toolbarOpen;
10276
10271
  var sceneObjects = useMemo(function() {
10277
- return _to_consumable_array$a(sceneState.recoveredObjects.values()).map(function(object) {
10272
+ return _to_consumable_array$b(sceneState.recoveredObjects.values()).map(function(object) {
10278
10273
  return applyLocalMarkerExpiry(object, localMarkerExpiryByObjectIdRef.current.get(object.objectId));
10279
10274
  });
10280
10275
  }, [
@@ -10783,7 +10778,7 @@ function freezeDraftObject(object) {
10783
10778
  if (object.objectType === 'annotation.stroke') {
10784
10779
  return _object_spread_props$f(_object_spread$h({}, object), {
10785
10780
  payload: _object_spread_props$f(_object_spread$h({}, object.payload), {
10786
- points: _to_consumable_array$a(object.payload.points)
10781
+ points: _to_consumable_array$b(object.payload.points)
10787
10782
  })
10788
10783
  });
10789
10784
  }
@@ -10867,7 +10862,7 @@ function getNearestMarkerExpiry(objects) {
10867
10862
  expiry
10868
10863
  ] : [];
10869
10864
  });
10870
- return expiries.length ? (_Math = Math).min.apply(_Math, _to_consumable_array$a(expiries)) : undefined;
10865
+ return expiries.length ? (_Math = Math).min.apply(_Math, _to_consumable_array$b(expiries)) : undefined;
10871
10866
  }
10872
10867
  function getNormalizedPoint(event, frameRect) {
10873
10868
  var currentFrameRect = getPointerFrameRect(event, frameRect);
@@ -11146,7 +11141,7 @@ function _array_like_to_array$t(arr, len) {
11146
11141
  function _array_with_holes$q(arr) {
11147
11142
  if (Array.isArray(arr)) return arr;
11148
11143
  }
11149
- function _array_without_holes$9(arr) {
11144
+ function _array_without_holes$a(arr) {
11150
11145
  if (Array.isArray(arr)) return _array_like_to_array$t(arr);
11151
11146
  }
11152
11147
  function asyncGeneratorStep$m(gen, resolve, reject, _next, _throw, key, arg) {
@@ -11191,7 +11186,7 @@ function _define_property$i(obj, key, value) {
11191
11186
  }
11192
11187
  return obj;
11193
11188
  }
11194
- function _iterable_to_array$9(iter) {
11189
+ function _iterable_to_array$a(iter) {
11195
11190
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
11196
11191
  }
11197
11192
  function _iterable_to_array_limit$q(arr, i) {
@@ -11221,7 +11216,7 @@ function _iterable_to_array_limit$q(arr, i) {
11221
11216
  function _non_iterable_rest$q() {
11222
11217
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
11223
11218
  }
11224
- function _non_iterable_spread$9() {
11219
+ function _non_iterable_spread$a() {
11225
11220
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
11226
11221
  }
11227
11222
  function _object_spread$g(target) {
@@ -11261,8 +11256,8 @@ function _object_spread_props$e(target, source) {
11261
11256
  function _sliced_to_array$q(arr, i) {
11262
11257
  return _array_with_holes$q(arr) || _iterable_to_array_limit$q(arr, i) || _unsupported_iterable_to_array$t(arr, i) || _non_iterable_rest$q();
11263
11258
  }
11264
- function _to_consumable_array$9(arr) {
11265
- return _array_without_holes$9(arr) || _iterable_to_array$9(arr) || _unsupported_iterable_to_array$t(arr) || _non_iterable_spread$9();
11259
+ function _to_consumable_array$a(arr) {
11260
+ return _array_without_holes$a(arr) || _iterable_to_array$a(arr) || _unsupported_iterable_to_array$t(arr) || _non_iterable_spread$a();
11266
11261
  }
11267
11262
  function _type_of$7(obj) {
11268
11263
  "@swc/helpers - typeof";
@@ -11508,7 +11503,7 @@ function createWhiteboardRuntime() {
11508
11503
  bootstrap: bootstrap,
11509
11504
  deltas: [],
11510
11505
  mode: 'replace',
11511
- settledOperationIds: _to_consumable_array$9(settledOperationIds)
11506
+ settledOperationIds: _to_consumable_array$a(settledOperationIds)
11512
11507
  };
11513
11508
  boardId = bootstrap.boardId;
11514
11509
  hasCanonicalScene = true;
@@ -11702,7 +11697,7 @@ function createWhiteboardRuntime() {
11702
11697
  confirmRevision(delta.toRevision);
11703
11698
  _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
11704
11699
  try {
11705
- for(_iterator1 = _to_consumable_array$9(bufferedCommittedEvents.keys())[Symbol.iterator](); !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
11700
+ for(_iterator1 = _to_consumable_array$a(bufferedCommittedEvents.keys())[Symbol.iterator](); !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
11706
11701
  revision = _step1.value;
11707
11702
  if (revision <= appliedRevision) bufferedCommittedEvents.delete(revision);
11708
11703
  }
@@ -11749,7 +11744,7 @@ function createWhiteboardRuntime() {
11749
11744
  ];
11750
11745
  _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
11751
11746
  try {
11752
- for(_iterator = _to_consumable_array$9(bufferedCommittedEvents.keys())[Symbol.iterator](); !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
11747
+ for(_iterator = _to_consumable_array$a(bufferedCommittedEvents.keys())[Symbol.iterator](); !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
11753
11748
  revision = _step.value;
11754
11749
  if (revision <= appliedRevision) bufferedCommittedEvents.delete(revision);
11755
11750
  }
@@ -11772,7 +11767,7 @@ function createWhiteboardRuntime() {
11772
11767
  3,
11773
11768
  2
11774
11769
  ];
11775
- nextRevision = (_Math = Math).min.apply(_Math, _to_consumable_array$9(bufferedCommittedEvents.keys()));
11770
+ nextRevision = (_Math = Math).min.apply(_Math, _to_consumable_array$a(bufferedCommittedEvents.keys()));
11776
11771
  if (!Number.isFinite(nextRevision)) return [
11777
11772
  2,
11778
11773
  true
@@ -12568,7 +12563,7 @@ function foldOperationsIntoRecoverySnapshot(bootstrap, update) {
12568
12563
  return _object_spread_props$e(_object_spread$g({}, bootstrap), {
12569
12564
  boardId: update.boardId,
12570
12565
  headRevision: update.toRevision,
12571
- objects: sortRecoveryObjects(_to_consumable_array$9(objects.values()))
12566
+ objects: sortRecoveryObjects(_to_consumable_array$a(objects.values()))
12572
12567
  });
12573
12568
  }
12574
12569
  function resolveRealtimeEndpoint(endpoint) {
@@ -12793,7 +12788,7 @@ function setSocketToken(socket, token) {
12793
12788
  socket.auth.token = token;
12794
12789
  }
12795
12790
  function sortRecoveryObjects(objects) {
12796
- return _to_consumable_array$9(objects).sort(function(left, right) {
12791
+ return _to_consumable_array$a(objects).sort(function(left, right) {
12797
12792
  return left.latestRevision === right.latestRevision ? left.objectId.localeCompare(right.objectId) : left.latestRevision - right.latestRevision;
12798
12793
  });
12799
12794
  }
@@ -12841,7 +12836,7 @@ function _array_like_to_array$s(arr, len) {
12841
12836
  function _array_with_holes$p(arr) {
12842
12837
  if (Array.isArray(arr)) return arr;
12843
12838
  }
12844
- function _array_without_holes$8(arr) {
12839
+ function _array_without_holes$9(arr) {
12845
12840
  if (Array.isArray(arr)) return _array_like_to_array$s(arr);
12846
12841
  }
12847
12842
  function asyncGeneratorStep$l(gen, resolve, reject, _next, _throw, key, arg) {
@@ -12886,7 +12881,7 @@ function _define_property$h(obj, key, value) {
12886
12881
  }
12887
12882
  return obj;
12888
12883
  }
12889
- function _iterable_to_array$8(iter) {
12884
+ function _iterable_to_array$9(iter) {
12890
12885
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
12891
12886
  }
12892
12887
  function _iterable_to_array_limit$p(arr, i) {
@@ -12916,7 +12911,7 @@ function _iterable_to_array_limit$p(arr, i) {
12916
12911
  function _non_iterable_rest$p() {
12917
12912
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
12918
12913
  }
12919
- function _non_iterable_spread$8() {
12914
+ function _non_iterable_spread$9() {
12920
12915
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
12921
12916
  }
12922
12917
  function _object_spread$f(target) {
@@ -12956,8 +12951,8 @@ function _object_spread_props$d(target, source) {
12956
12951
  function _sliced_to_array$p(arr, i) {
12957
12952
  return _array_with_holes$p(arr) || _iterable_to_array_limit$p(arr, i) || _unsupported_iterable_to_array$s(arr, i) || _non_iterable_rest$p();
12958
12953
  }
12959
- function _to_consumable_array$8(arr) {
12960
- return _array_without_holes$8(arr) || _iterable_to_array$8(arr) || _unsupported_iterable_to_array$s(arr) || _non_iterable_spread$8();
12954
+ function _to_consumable_array$9(arr) {
12955
+ return _array_without_holes$9(arr) || _iterable_to_array$9(arr) || _unsupported_iterable_to_array$s(arr) || _non_iterable_spread$9();
12961
12956
  }
12962
12957
  function _unsupported_iterable_to_array$s(o, minLen) {
12963
12958
  if (!o) return;
@@ -13110,7 +13105,7 @@ function WhiteboardProvider(param) {
13110
13105
  var runtimeCommittedEventChange = useCallback(function(nextEvent) {
13111
13106
  setCommittedEvent(nextEvent);
13112
13107
  setCommittedEvents(function(events) {
13113
- return _to_consumable_array$8(events).concat([
13108
+ return _to_consumable_array$9(events).concat([
13114
13109
  nextEvent
13115
13110
  ]);
13116
13111
  });
@@ -13469,7 +13464,7 @@ function _array_like_to_array$r(arr, len) {
13469
13464
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
13470
13465
  return arr2;
13471
13466
  }
13472
- function _array_without_holes$7(arr) {
13467
+ function _array_without_holes$8(arr) {
13473
13468
  if (Array.isArray(arr)) return _array_like_to_array$r(arr);
13474
13469
  }
13475
13470
  function _define_property$g(obj, key, value) {
@@ -13485,10 +13480,10 @@ function _define_property$g(obj, key, value) {
13485
13480
  }
13486
13481
  return obj;
13487
13482
  }
13488
- function _iterable_to_array$7(iter) {
13483
+ function _iterable_to_array$8(iter) {
13489
13484
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
13490
13485
  }
13491
- function _non_iterable_spread$7() {
13486
+ function _non_iterable_spread$8() {
13492
13487
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
13493
13488
  }
13494
13489
  function _object_spread$e(target) {
@@ -13525,8 +13520,8 @@ function _object_spread_props$c(target, source) {
13525
13520
  }
13526
13521
  return target;
13527
13522
  }
13528
- function _to_consumable_array$7(arr) {
13529
- return _array_without_holes$7(arr) || _iterable_to_array$7(arr) || _unsupported_iterable_to_array$r(arr) || _non_iterable_spread$7();
13523
+ function _to_consumable_array$8(arr) {
13524
+ return _array_without_holes$8(arr) || _iterable_to_array$8(arr) || _unsupported_iterable_to_array$r(arr) || _non_iterable_spread$8();
13530
13525
  }
13531
13526
  function _unsupported_iterable_to_array$r(o, minLen) {
13532
13527
  if (!o) return;
@@ -13552,7 +13547,7 @@ function toChatProviderProps(integration) {
13552
13547
  refreshTokenExpiresAt: integration.refreshTokenExpiresAt,
13553
13548
  rooms: integration.rooms.map(function(room) {
13554
13549
  return _object_spread_props$c(_object_spread$e({}, room), {
13555
- permissions: _to_consumable_array$7(room.permissions)
13550
+ permissions: _to_consumable_array$8(room.permissions)
13556
13551
  });
13557
13552
  }),
13558
13553
  token: integration.token,
@@ -13574,6 +13569,13 @@ function toWhiteboardProviderProps(integration, roomId) {
13574
13569
  };
13575
13570
  }
13576
13571
 
13572
+ var RoomPlatformPrivateRoomContext = createContext(undefined);
13573
+ function useRoomPlatformPrivateRoomContext() {
13574
+ var context = useContext(RoomPlatformPrivateRoomContext);
13575
+ if (!context) throw new Error('useRoomPlatformPrivateRoomContext must be used inside RoomPlatformProvider');
13576
+ return context;
13577
+ }
13578
+
13577
13579
  var RoomPlatformGatewayErrorCode = {
13578
13580
  ACCESS_SESSION_INVALID: 'ROOM_PLATFORM_ACCESS_SESSION_INVALID',
13579
13581
  LAUNCH_TICKET_INVALID: 'ROOM_PLATFORM_LAUNCH_TICKET_INVALID'
@@ -13590,7 +13592,7 @@ function _array_like_to_array$q(arr, len) {
13590
13592
  function _array_with_holes$o(arr) {
13591
13593
  if (Array.isArray(arr)) return arr;
13592
13594
  }
13593
- function _array_without_holes$6(arr) {
13595
+ function _array_without_holes$7(arr) {
13594
13596
  if (Array.isArray(arr)) return _array_like_to_array$q(arr);
13595
13597
  }
13596
13598
  function _assert_this_initialized$1(self) {
@@ -13696,7 +13698,7 @@ function _instanceof$3(left, right) {
13696
13698
  function _is_native_function$1(fn) {
13697
13699
  return Function.toString.call(fn).indexOf("[native code]") !== -1;
13698
13700
  }
13699
- function _iterable_to_array$6(iter) {
13701
+ function _iterable_to_array$7(iter) {
13700
13702
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
13701
13703
  }
13702
13704
  function _iterable_to_array_limit$o(arr, i) {
@@ -13726,7 +13728,7 @@ function _iterable_to_array_limit$o(arr, i) {
13726
13728
  function _non_iterable_rest$o() {
13727
13729
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
13728
13730
  }
13729
- function _non_iterable_spread$6() {
13731
+ function _non_iterable_spread$7() {
13730
13732
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
13731
13733
  }
13732
13734
  function _object_spread$d(target) {
@@ -13779,8 +13781,8 @@ function _set_prototype_of$1(o, p) {
13779
13781
  function _sliced_to_array$o(arr, i) {
13780
13782
  return _array_with_holes$o(arr) || _iterable_to_array_limit$o(arr, i) || _unsupported_iterable_to_array$q(arr, i) || _non_iterable_rest$o();
13781
13783
  }
13782
- function _to_consumable_array$6(arr) {
13783
- return _array_without_holes$6(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$q(arr) || _non_iterable_spread$6();
13784
+ function _to_consumable_array$7(arr) {
13785
+ return _array_without_holes$7(arr) || _iterable_to_array$7(arr) || _unsupported_iterable_to_array$q(arr) || _non_iterable_spread$7();
13784
13786
  }
13785
13787
  function _type_of$6(obj) {
13786
13788
  "@swc/helpers - typeof";
@@ -14071,6 +14073,7 @@ var activeDevicesStateOf = function(room) {
14071
14073
  };
14072
14074
  function RoomPlatformProvider(param) {
14073
14075
  var apiBaseUrl = param.apiBaseUrl, children = param.children, launchToken = param.launchToken, onError = param.onError, onLifecycleEvent = param.onLifecycleEvent, onLaunchTicketRequired = param.onLaunchTicketRequired;
14076
+ var _ref;
14074
14077
  var _useState = _sliced_to_array$o(useState(), 2), access = _useState[0], setAccess = _useState[1];
14075
14078
  var _useState1 = _sliced_to_array$o(useState(emptyActiveDevices), 2), activeDevices = _useState1[0], setActiveDevices = _useState1[1];
14076
14079
  var _useState2 = _sliced_to_array$o(useState(), 2), actionError = _useState2[0], setActionError = _useState2[1];
@@ -15051,12 +15054,12 @@ function RoomPlatformProvider(param) {
15051
15054
  throw actionFailure;
15052
15055
  }).finally(function() {
15053
15056
  pendingActionsRef.current.delete(pendingKey);
15054
- if (isMountedRef.current) setPendingActionKeys(_to_consumable_array$6(pendingActionsRef.current.keys()));
15057
+ if (isMountedRef.current) setPendingActionKeys(_to_consumable_array$7(pendingActionsRef.current.keys()));
15055
15058
  });
15056
15059
  pendingActionsRef.current.set(pendingKey, action);
15057
15060
  if (isMountedRef.current) {
15058
15061
  setActionError(undefined);
15059
- setPendingActionKeys(_to_consumable_array$6(pendingActionsRef.current.keys()));
15062
+ setPendingActionKeys(_to_consumable_array$7(pendingActionsRef.current.keys()));
15060
15063
  }
15061
15064
  return action;
15062
15065
  }, [
@@ -15167,10 +15170,10 @@ function RoomPlatformProvider(param) {
15167
15170
  throw mediaError;
15168
15171
  }).finally(function() {
15169
15172
  pendingLocalMediaRef.current.delete(kind);
15170
- if (isMountedRef.current) setPendingLocalMediaKinds(_to_consumable_array$6(pendingLocalMediaRef.current.keys()));
15173
+ if (isMountedRef.current) setPendingLocalMediaKinds(_to_consumable_array$7(pendingLocalMediaRef.current.keys()));
15171
15174
  });
15172
15175
  pendingLocalMediaRef.current.set(kind, operation);
15173
- if (isMountedRef.current) setPendingLocalMediaKinds(_to_consumable_array$6(pendingLocalMediaRef.current.keys()));
15176
+ if (isMountedRef.current) setPendingLocalMediaKinds(_to_consumable_array$7(pendingLocalMediaRef.current.keys()));
15174
15177
  return operation;
15175
15178
  }, [
15176
15179
  clearMediaError,
@@ -15184,7 +15187,7 @@ function RoomPlatformProvider(param) {
15184
15187
  var localParticipantMonitorCamera = (controlState === null || controlState === void 0 ? void 0 : controlState.monitorActive) === true && roleFromMetadata(room === null || room === void 0 ? void 0 : room.localParticipant.metadata) === 'student';
15185
15188
  var canPublishAudioNow = !privateRoomActiveForActor && (hasCapability(localMediaCapabilities.microphone) || localParticipantIsActiveSpeaker);
15186
15189
  var canPublishCameraNow = !privateRoomActiveForActor && (hasCapability(localMediaCapabilities.camera) || localParticipantIsActiveSpeaker || localParticipantMonitorCamera);
15187
- var canPublishScreenShareNow = hasCapability(localMediaCapabilities.screenShare);
15190
+ var canPublishScreenShareNow = hasCapability(localMediaCapabilities.screenShare) && ((_ref = controlState === null || controlState === void 0 ? void 0 : controlState.mode) !== null && _ref !== void 0 ? _ref : 'live') === 'live';
15188
15191
  useEffect(function() {
15189
15192
  if (!room || !privateRoomForActor || (privateRoom === null || privateRoom === void 0 ? void 0 : privateRoom.status) !== 'ringing') return;
15190
15193
  var participant = room.localParticipant;
@@ -16023,10 +16026,10 @@ function _array_like_to_array$o(arr, len) {
16023
16026
  function _array_with_holes$m(arr) {
16024
16027
  if (Array.isArray(arr)) return arr;
16025
16028
  }
16026
- function _array_without_holes$5(arr) {
16029
+ function _array_without_holes$6(arr) {
16027
16030
  if (Array.isArray(arr)) return _array_like_to_array$o(arr);
16028
16031
  }
16029
- function _iterable_to_array$5(iter) {
16032
+ function _iterable_to_array$6(iter) {
16030
16033
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
16031
16034
  }
16032
16035
  function _iterable_to_array_limit$m(arr, i) {
@@ -16056,14 +16059,14 @@ function _iterable_to_array_limit$m(arr, i) {
16056
16059
  function _non_iterable_rest$m() {
16057
16060
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
16058
16061
  }
16059
- function _non_iterable_spread$5() {
16062
+ function _non_iterable_spread$6() {
16060
16063
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
16061
16064
  }
16062
16065
  function _sliced_to_array$m(arr, i) {
16063
16066
  return _array_with_holes$m(arr) || _iterable_to_array_limit$m(arr, i) || _unsupported_iterable_to_array$o(arr, i) || _non_iterable_rest$m();
16064
16067
  }
16065
- function _to_consumable_array$5(arr) {
16066
- return _array_without_holes$5(arr) || _iterable_to_array$5(arr) || _unsupported_iterable_to_array$o(arr) || _non_iterable_spread$5();
16068
+ function _to_consumable_array$6(arr) {
16069
+ return _array_without_holes$6(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$o(arr) || _non_iterable_spread$6();
16067
16070
  }
16068
16071
  function _type_of$5(obj) {
16069
16072
  "@swc/helpers - typeof";
@@ -16117,7 +16120,7 @@ var snapshotPresence = function(room, controlState) {
16117
16120
  }));
16118
16121
  return [
16119
16122
  snapshotParticipant(room.localParticipant, true, controlState === null || controlState === void 0 ? void 0 : controlState.activeSpeakerParticipantIdentity, speakingParticipantIdentities)
16120
- ].concat(_to_consumable_array$5(Array.from(room.remoteParticipants.values()).map(function(participant) {
16123
+ ].concat(_to_consumable_array$6(Array.from(room.remoteParticipants.values()).map(function(participant) {
16121
16124
  return snapshotParticipant(participant, false, controlState === null || controlState === void 0 ? void 0 : controlState.activeSpeakerParticipantIdentity, speakingParticipantIdentities);
16122
16125
  })));
16123
16126
  };
@@ -19031,7 +19034,7 @@ function _array_like_to_array$g(arr, len) {
19031
19034
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
19032
19035
  return arr2;
19033
19036
  }
19034
- function _array_without_holes$4(arr) {
19037
+ function _array_without_holes$5(arr) {
19035
19038
  if (Array.isArray(arr)) return _array_like_to_array$g(arr);
19036
19039
  }
19037
19040
  function asyncGeneratorStep$f(gen, resolve, reject, _next, _throw, key, arg) {
@@ -19083,10 +19086,10 @@ function _instanceof$1(left, right) {
19083
19086
  return left instanceof right;
19084
19087
  }
19085
19088
  }
19086
- function _iterable_to_array$4(iter) {
19089
+ function _iterable_to_array$5(iter) {
19087
19090
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
19088
19091
  }
19089
- function _non_iterable_spread$4() {
19092
+ function _non_iterable_spread$5() {
19090
19093
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
19091
19094
  }
19092
19095
  function _object_spread$8(target) {
@@ -19123,8 +19126,8 @@ function _object_spread_props$7(target, source) {
19123
19126
  }
19124
19127
  return target;
19125
19128
  }
19126
- function _to_consumable_array$4(arr) {
19127
- return _array_without_holes$4(arr) || _iterable_to_array$4(arr) || _unsupported_iterable_to_array$g(arr) || _non_iterable_spread$4();
19129
+ function _to_consumable_array$5(arr) {
19130
+ return _array_without_holes$5(arr) || _iterable_to_array$5(arr) || _unsupported_iterable_to_array$g(arr) || _non_iterable_spread$5();
19128
19131
  }
19129
19132
  function _type_of$4(obj) {
19130
19133
  "@swc/helpers - typeof";
@@ -19773,7 +19776,7 @@ var appendRoomPlatformUploadAssetId = function(assetId) {
19773
19776
  ];
19774
19777
  }
19775
19778
  nextGallery = saveUploadGallery({
19776
- assetIds: _to_consumable_array$4(galleryAssetIds).concat([
19779
+ assetIds: _to_consumable_array$5(galleryAssetIds).concat([
19777
19780
  assetId
19778
19781
  ]),
19779
19782
  updatedAt: nowIso()
@@ -21078,7 +21081,7 @@ function _array_like_to_array$e(arr, len) {
21078
21081
  function _array_with_holes$d(arr) {
21079
21082
  if (Array.isArray(arr)) return arr;
21080
21083
  }
21081
- function _array_without_holes$3(arr) {
21084
+ function _array_without_holes$4(arr) {
21082
21085
  if (Array.isArray(arr)) return _array_like_to_array$e(arr);
21083
21086
  }
21084
21087
  function asyncGeneratorStep$d(gen, resolve, reject, _next, _throw, key, arg) {
@@ -21110,7 +21113,7 @@ function _async_to_generator$d(fn) {
21110
21113
  });
21111
21114
  };
21112
21115
  }
21113
- function _iterable_to_array$3(iter) {
21116
+ function _iterable_to_array$4(iter) {
21114
21117
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
21115
21118
  }
21116
21119
  function _iterable_to_array_limit$d(arr, i) {
@@ -21140,14 +21143,14 @@ function _iterable_to_array_limit$d(arr, i) {
21140
21143
  function _non_iterable_rest$d() {
21141
21144
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
21142
21145
  }
21143
- function _non_iterable_spread$3() {
21146
+ function _non_iterable_spread$4() {
21144
21147
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
21145
21148
  }
21146
21149
  function _sliced_to_array$d(arr, i) {
21147
21150
  return _array_with_holes$d(arr) || _iterable_to_array_limit$d(arr, i) || _unsupported_iterable_to_array$e(arr, i) || _non_iterable_rest$d();
21148
21151
  }
21149
- function _to_consumable_array$3(arr) {
21150
- return _array_without_holes$3(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$e(arr) || _non_iterable_spread$3();
21152
+ function _to_consumable_array$4(arr) {
21153
+ return _array_without_holes$4(arr) || _iterable_to_array$4(arr) || _unsupported_iterable_to_array$e(arr) || _non_iterable_spread$4();
21151
21154
  }
21152
21155
  function _unsupported_iterable_to_array$e(o, minLen) {
21153
21156
  if (!o) return;
@@ -21262,7 +21265,7 @@ var scopeOf = function(connection) {
21262
21265
  connection.roomName,
21263
21266
  connection.wsUrl,
21264
21267
  String(connection.publishEnabled)
21265
- ].concat(_to_consumable_array$3(connection.permissions)).join('|');
21268
+ ].concat(_to_consumable_array$4(connection.permissions)).join('|');
21266
21269
  };
21267
21270
  function RoomPlatformPrivateRoomCameraBackground() {
21268
21271
  var _cameraTracks_find_publication, _cameraTracks_find;
@@ -23402,7 +23405,7 @@ function _array_like_to_array$a(arr, len) {
23402
23405
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
23403
23406
  return arr2;
23404
23407
  }
23405
- function _array_without_holes$2(arr) {
23408
+ function _array_without_holes$3(arr) {
23406
23409
  if (Array.isArray(arr)) return _array_like_to_array$a(arr);
23407
23410
  }
23408
23411
  function _class_call_check$1(instance, Constructor) {
@@ -23436,14 +23439,14 @@ function _define_property$4(obj, key, value) {
23436
23439
  }
23437
23440
  return obj;
23438
23441
  }
23439
- function _iterable_to_array$2(iter) {
23442
+ function _iterable_to_array$3(iter) {
23440
23443
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
23441
23444
  }
23442
- function _non_iterable_spread$2() {
23445
+ function _non_iterable_spread$3() {
23443
23446
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
23444
23447
  }
23445
- function _to_consumable_array$2(arr) {
23446
- return _array_without_holes$2(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$a(arr) || _non_iterable_spread$2();
23448
+ function _to_consumable_array$3(arr) {
23449
+ return _array_without_holes$3(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$a(arr) || _non_iterable_spread$3();
23447
23450
  }
23448
23451
  function _unsupported_iterable_to_array$a(o, minLen) {
23449
23452
  if (!o) return;
@@ -23496,7 +23499,7 @@ var ChatClientState = /*#__PURE__*/ function() {
23496
23499
  {
23497
23500
  key: "getRooms",
23498
23501
  value: function getRooms() {
23499
- return _to_consumable_array$2(this.rooms.values());
23502
+ return _to_consumable_array$3(this.rooms.values());
23500
23503
  }
23501
23504
  },
23502
23505
  {
@@ -25040,7 +25043,7 @@ function _array_like_to_array$8(arr, len) {
25040
25043
  function _array_with_holes$8(arr) {
25041
25044
  if (Array.isArray(arr)) return arr;
25042
25045
  }
25043
- function _array_without_holes$1(arr) {
25046
+ function _array_without_holes$2(arr) {
25044
25047
  if (Array.isArray(arr)) return _array_like_to_array$8(arr);
25045
25048
  }
25046
25049
  function asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, key, arg) {
@@ -25079,7 +25082,7 @@ function _instanceof(left, right) {
25079
25082
  return left instanceof right;
25080
25083
  }
25081
25084
  }
25082
- function _iterable_to_array$1(iter) {
25085
+ function _iterable_to_array$2(iter) {
25083
25086
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
25084
25087
  }
25085
25088
  function _iterable_to_array_limit$8(arr, i) {
@@ -25109,14 +25112,14 @@ function _iterable_to_array_limit$8(arr, i) {
25109
25112
  function _non_iterable_rest$8() {
25110
25113
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
25111
25114
  }
25112
- function _non_iterable_spread$1() {
25115
+ function _non_iterable_spread$2() {
25113
25116
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
25114
25117
  }
25115
25118
  function _sliced_to_array$8(arr, i) {
25116
25119
  return _array_with_holes$8(arr) || _iterable_to_array_limit$8(arr, i) || _unsupported_iterable_to_array$8(arr, i) || _non_iterable_rest$8();
25117
25120
  }
25118
- function _to_consumable_array$1(arr) {
25119
- return _array_without_holes$1(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$8(arr) || _non_iterable_spread$1();
25121
+ function _to_consumable_array$2(arr) {
25122
+ return _array_without_holes$2(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$8(arr) || _non_iterable_spread$2();
25120
25123
  }
25121
25124
  function _unsupported_iterable_to_array$8(o, minLen) {
25122
25125
  if (!o) return;
@@ -25243,7 +25246,7 @@ function MessageList(param) {
25243
25246
  var _useState4 = _sliced_to_array$8(useState(true), 2), isAtLatest = _useState4[0], setIsAtLatest = _useState4[1];
25244
25247
  var _useState5 = _sliced_to_array$8(useState(false), 2), hasNewMessages = _useState5[0], setHasNewMessages = _useState5[1];
25245
25248
  var orderedMessages = useMemo(function() {
25246
- return _to_consumable_array$1(messages).sort(compareMessagesByCreatedAt);
25249
+ return _to_consumable_array$2(messages).sort(compareMessagesByCreatedAt);
25247
25250
  }, [
25248
25251
  messages
25249
25252
  ]);
@@ -25602,7 +25605,7 @@ var findNextOwnActionDeadlineMs = function(param) {
25602
25605
  return deadline >= currentTimeMs;
25603
25606
  });
25604
25607
  if (!deadlines.length) return undefined;
25605
- return (_Math = Math).min.apply(_Math, _to_consumable_array$1(deadlines));
25608
+ return (_Math = Math).min.apply(_Math, _to_consumable_array$2(deadlines));
25606
25609
  };
25607
25610
  var groupMessages = function(messages) {
25608
25611
  return messages.reduce(function(groups, message) {
@@ -25643,7 +25646,7 @@ var hasNewMessageFromOtherSubject = function(messages, previousMessages, current
25643
25646
  var previousIds = new Set(previousMessages.map(function(message) {
25644
25647
  return message.id;
25645
25648
  }));
25646
- var previousNewestTime = (_Math = Math).max.apply(_Math, _to_consumable_array$1(previousMessages.map(function(message) {
25649
+ var previousNewestTime = (_Math = Math).max.apply(_Math, _to_consumable_array$2(previousMessages.map(function(message) {
25647
25650
  return new Date(message.createdAt).getTime();
25648
25651
  })).concat([
25649
25652
  Number.NEGATIVE_INFINITY
@@ -25995,7 +25998,7 @@ function _array_like_to_array$6(arr, len) {
25995
25998
  function _array_with_holes$6(arr) {
25996
25999
  if (Array.isArray(arr)) return arr;
25997
26000
  }
25998
- function _array_without_holes(arr) {
26001
+ function _array_without_holes$1(arr) {
25999
26002
  if (Array.isArray(arr)) return _array_like_to_array$6(arr);
26000
26003
  }
26001
26004
  function asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, key, arg) {
@@ -26040,7 +26043,7 @@ function _define_property$1(obj, key, value) {
26040
26043
  }
26041
26044
  return obj;
26042
26045
  }
26043
- function _iterable_to_array(iter) {
26046
+ function _iterable_to_array$1(iter) {
26044
26047
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
26045
26048
  }
26046
26049
  function _iterable_to_array_limit$6(arr, i) {
@@ -26070,7 +26073,7 @@ function _iterable_to_array_limit$6(arr, i) {
26070
26073
  function _non_iterable_rest$6() {
26071
26074
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
26072
26075
  }
26073
- function _non_iterable_spread() {
26076
+ function _non_iterable_spread$1() {
26074
26077
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
26075
26078
  }
26076
26079
  function _object_spread$1(target) {
@@ -26110,8 +26113,8 @@ function _object_spread_props$1(target, source) {
26110
26113
  function _sliced_to_array$6(arr, i) {
26111
26114
  return _array_with_holes$6(arr) || _iterable_to_array_limit$6(arr, i) || _unsupported_iterable_to_array$6(arr, i) || _non_iterable_rest$6();
26112
26115
  }
26113
- function _to_consumable_array(arr) {
26114
- return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array$6(arr) || _non_iterable_spread();
26116
+ function _to_consumable_array$1(arr) {
26117
+ return _array_without_holes$1(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$6(arr) || _non_iterable_spread$1();
26115
26118
  }
26116
26119
  function _type_of(obj) {
26117
26120
  "@swc/helpers - typeof";
@@ -26625,7 +26628,7 @@ var upsertMessage = function(messages, message) {
26625
26628
  var index = messages.findIndex(function(candidate) {
26626
26629
  return candidate.id === message.id;
26627
26630
  });
26628
- if (index === -1) return _to_consumable_array(messages).concat([
26631
+ if (index === -1) return _to_consumable_array$1(messages).concat([
26629
26632
  message
26630
26633
  ]);
26631
26634
  return messages.map(function(candidate, candidateIndex) {
@@ -27926,6 +27929,9 @@ function _array_like_to_array(arr, len) {
27926
27929
  function _array_with_holes(arr) {
27927
27930
  if (Array.isArray(arr)) return arr;
27928
27931
  }
27932
+ function _array_without_holes(arr) {
27933
+ if (Array.isArray(arr)) return _array_like_to_array(arr);
27934
+ }
27929
27935
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
27930
27936
  try {
27931
27937
  var info = gen[key](arg);
@@ -27968,6 +27974,9 @@ function _define_property(obj, key, value) {
27968
27974
  }
27969
27975
  return obj;
27970
27976
  }
27977
+ function _iterable_to_array(iter) {
27978
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
27979
+ }
27971
27980
  function _iterable_to_array_limit(arr, i) {
27972
27981
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
27973
27982
  if (_i == null) return;
@@ -27995,6 +28004,9 @@ function _iterable_to_array_limit(arr, i) {
27995
28004
  function _non_iterable_rest() {
27996
28005
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
27997
28006
  }
28007
+ function _non_iterable_spread() {
28008
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
28009
+ }
27998
28010
  function _object_spread(target) {
27999
28011
  for(var i = 1; i < arguments.length; i++){
28000
28012
  var source = arguments[i] != null ? arguments[i] : {};
@@ -28068,6 +28080,9 @@ function _object_without_properties_loose(source, excluded) {
28068
28080
  function _sliced_to_array(arr, i) {
28069
28081
  return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
28070
28082
  }
28083
+ function _to_consumable_array(arr) {
28084
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
28085
+ }
28071
28086
  function _unsupported_iterable_to_array(o, minLen) {
28072
28087
  if (!o) return;
28073
28088
  if (typeof o === "string") return _array_like_to_array(o, minLen);
@@ -28191,32 +28206,6 @@ var emptyStageModel = {
28191
28206
  },
28192
28207
  primary: undefined
28193
28208
  };
28194
- function RoomPlatformPracticeModeMediaPolicy(param) {
28195
- var isPracticeMode = param.isPracticeMode;
28196
- var _useRoomPlatform = useRoomPlatform(), localMedia = _useRoomPlatform.localMedia, setLocalMediaEnabled = _useRoomPlatform.setLocalMediaEnabled;
28197
- var previousIsPracticeModeRef = useRef(isPracticeMode);
28198
- var shouldStopScreenShareRef = useRef(false);
28199
- useEffect(function() {
28200
- if (!previousIsPracticeModeRef.current && isPracticeMode) {
28201
- shouldStopScreenShareRef.current = true;
28202
- }
28203
- previousIsPracticeModeRef.current = isPracticeMode;
28204
- if (!isPracticeMode) {
28205
- shouldStopScreenShareRef.current = false;
28206
- return;
28207
- }
28208
- if (!shouldStopScreenShareRef.current || !localMedia.screenShare) return;
28209
- shouldStopScreenShareRef.current = false;
28210
- void setLocalMediaEnabled('screenShare', false).catch(function() {
28211
- return undefined;
28212
- });
28213
- }, [
28214
- isPracticeMode,
28215
- localMedia.screenShare,
28216
- setLocalMediaEnabled
28217
- ]);
28218
- return null;
28219
- }
28220
28209
  function getShareSessionKey(trackSid) {
28221
28210
  return trackSid ? "livekit:".concat(trackSid) : undefined;
28222
28211
  }
@@ -28253,8 +28242,8 @@ function RoomPlatformWhiteboardShareLifecycle(param) {
28253
28242
  return null;
28254
28243
  }
28255
28244
  var RoomPlatformWorkspaceContent = function(param) {
28256
- var cameraBackground = param.cameraBackground, completionAction = param.completionAction, extensions = param.extensions; param.isPracticeMode; var onExit = param.onExit, sizing = param.sizing, stageModel = param.stageModel;
28257
- var _resolvedStageModel_cameraOverlay, _ref, _ref1;
28245
+ var cameraBackground = param.cameraBackground, completionAction = param.completionAction, extensions = param.extensions, modeConfig = param.modeConfig, onExit = param.onExit, sizing = param.sizing, stageModel = param.stageModel;
28246
+ var _resolvedStageModel_cameraOverlay, _ref, _ref1, _ref2, _ref3, _ref4;
28258
28247
  var _resolvedStageModel_primary, _resolvedStageModel_primary1, _extensions_sidebarTabs;
28259
28248
  var _useRoomPlatform = useRoomPlatform(), access = _useRoomPlatform.access, controlState = _useRoomPlatform.controlState, error = _useRoomPlatform.error, hasCapability = _useRoomPlatform.hasCapability, isActionPending = _useRoomPlatform.isActionPending, localPreviewTrack = _useRoomPlatform.localPreviewTrack, performAction = _useRoomPlatform.performAction, status = _useRoomPlatform.status;
28260
28249
  var integrations = useRoomPlatformIntegrations().integrations;
@@ -28282,7 +28271,7 @@ var RoomPlatformWorkspaceContent = function(param) {
28282
28271
  ]);
28283
28272
  var workspace = extensions === null || extensions === void 0 ? void 0 : extensions.mainWorkspace;
28284
28273
  var MainWorkspace = workspace === null || workspace === void 0 ? void 0 : workspace.component;
28285
- var workspaceIsRendered = Boolean(workspace === null || workspace === void 0 ? void 0 : workspace.component);
28274
+ var workspaceIsRendered = Boolean((workspace === null || workspace === void 0 ? void 0 : workspace.component) && ((_ref = controlState === null || controlState === void 0 ? void 0 : controlState.mode) !== null && _ref !== void 0 ? _ref : 'live') !== 'live');
28286
28275
  var whiteboardIsRendered = Boolean(whiteboardProviderProps);
28287
28276
  var workspaceOverlayTrack = workspaceIsRendered && (workspace === null || workspace === void 0 ? void 0 : workspace.placement) === 'overlay' ? resolvedStageModel.primary : undefined;
28288
28277
  var presentation = workspaceIsRendered && workspace ? {
@@ -28297,8 +28286,9 @@ var RoomPlatformWorkspaceContent = function(param) {
28297
28286
  isPending: isActionPending,
28298
28287
  perform: performAction
28299
28288
  },
28300
- capabilities: (_ref = access === null || access === void 0 ? void 0 : access.capabilities) !== null && _ref !== void 0 ? _ref : [],
28289
+ capabilities: (_ref1 = access === null || access === void 0 ? void 0 : access.capabilities) !== null && _ref1 !== void 0 ? _ref1 : [],
28301
28290
  connectionStatus: status,
28291
+ currentMode: (_ref2 = controlState === null || controlState === void 0 ? void 0 : controlState.mode) !== null && _ref2 !== void 0 ? _ref2 : 'live',
28302
28292
  currentParticipant: access ? currentParticipantPresence !== null && currentParticipantPresence !== void 0 ? currentParticipantPresence : {
28303
28293
  canPublishAudio: false,
28304
28294
  canPublishVideo: false,
@@ -28415,10 +28405,81 @@ var RoomPlatformWorkspaceContent = function(param) {
28415
28405
  extensionProps: extensionProps
28416
28406
  }) : undefined;
28417
28407
  var shouldShowPracticeStage = workspaceIsRendered && MainWorkspace && (workspace === null || workspace === void 0 ? void 0 : workspace.placement) === 'overlay';
28418
- var topBarTrailing = TopBarTrailing ? /*#__PURE__*/ jsx(RoomPlatformExtensionZone, {
28419
- component: TopBarTrailing,
28420
- extensionProps: extensionProps
28421
- }) : undefined;
28408
+ var modes = [
28409
+ {
28410
+ key: 'live',
28411
+ label: 'Live'
28412
+ }
28413
+ ].concat(_to_consumable_array((_ref3 = modeConfig === null || modeConfig === void 0 ? void 0 : modeConfig.modes) !== null && _ref3 !== void 0 ? _ref3 : [])).reduce(function(items, mode) {
28414
+ return mode.key.trim() && !items.some(function(item) {
28415
+ return item.key === mode.key;
28416
+ }) ? _to_consumable_array(items).concat([
28417
+ mode
28418
+ ]) : items;
28419
+ }, []);
28420
+ var topBarTrailing = /*#__PURE__*/ jsxs("div", {
28421
+ className: "flex items-center gap-2",
28422
+ children: [
28423
+ modes.length > 1 ? /*#__PURE__*/ jsx("div", {
28424
+ className: "flex rounded-lg border border-white/20 p-1",
28425
+ children: modes.map(function(mode) {
28426
+ return /*#__PURE__*/ jsx(Button, {
28427
+ type: "button",
28428
+ size: "sm",
28429
+ variant: extensionProps.currentMode === mode.key ? 'secondary' : 'ghost',
28430
+ "aria-pressed": extensionProps.currentMode === mode.key,
28431
+ disabled: !hasCapability('room:set_mode') || isActionPending(RoomPlatformAction.MODE_SET, {
28432
+ mode: mode.key
28433
+ }),
28434
+ onClick: function() {
28435
+ return void (function() {
28436
+ return _async_to_generator(function() {
28437
+ var _modeConfig_beforeModeChange;
28438
+ return _ts_generator(this, function(_state) {
28439
+ switch(_state.label){
28440
+ case 0:
28441
+ if (mode.key === extensionProps.currentMode) return [
28442
+ 2
28443
+ ];
28444
+ return [
28445
+ 4,
28446
+ modeConfig === null || modeConfig === void 0 ? void 0 : (_modeConfig_beforeModeChange = modeConfig.beforeModeChange) === null || _modeConfig_beforeModeChange === void 0 ? void 0 : _modeConfig_beforeModeChange.call(modeConfig, {
28447
+ from: extensionProps.currentMode,
28448
+ to: mode.key
28449
+ })
28450
+ ];
28451
+ case 1:
28452
+ if (_state.sent() === false) return [
28453
+ 2
28454
+ ];
28455
+ return [
28456
+ 4,
28457
+ performAction(RoomPlatformAction.MODE_SET, {
28458
+ mode: mode.key
28459
+ })
28460
+ ];
28461
+ case 2:
28462
+ _state.sent();
28463
+ return [
28464
+ 2
28465
+ ];
28466
+ }
28467
+ });
28468
+ })();
28469
+ })().catch(function() {
28470
+ return undefined;
28471
+ });
28472
+ },
28473
+ children: mode.label
28474
+ }, mode.key);
28475
+ })
28476
+ }) : null,
28477
+ TopBarTrailing ? /*#__PURE__*/ jsx(RoomPlatformExtensionZone, {
28478
+ component: TopBarTrailing,
28479
+ extensionProps: extensionProps
28480
+ }) : null
28481
+ ]
28482
+ });
28422
28483
  var activeSpeakerParticipantIdentity = controlState === null || controlState === void 0 ? void 0 : controlState.activeSpeakerParticipantIdentity;
28423
28484
  var hasActiveSpeaker = Boolean(activeSpeakerParticipantIdentity);
28424
28485
  var canModerate = hasCapability('room:moderate');
@@ -28476,7 +28537,7 @@ var RoomPlatformWorkspaceContent = function(param) {
28476
28537
  onClearActiveSpeaker: clearActiveSpeaker,
28477
28538
  onRejectSpeakRequest: rejectSpeakRequest,
28478
28539
  participants: participants,
28479
- raisedHandParticipantIdentities: (_ref1 = controlState === null || controlState === void 0 ? void 0 : controlState.raisedHandParticipantIdentities) !== null && _ref1 !== void 0 ? _ref1 : []
28540
+ raisedHandParticipantIdentities: (_ref4 = controlState === null || controlState === void 0 ? void 0 : controlState.raisedHandParticipantIdentities) !== null && _ref4 !== void 0 ? _ref4 : []
28480
28541
  }) : null,
28481
28542
  activeSpeakerMediaSlot || localMediaSlot ? /*#__PURE__*/ jsxs("div", {
28482
28543
  className: "grid gap-3 border-b border-primary/10 p-2",
@@ -28827,31 +28888,26 @@ function RoomPlatformPrivateRoomRuntime(param) {
28827
28888
  });
28828
28889
  }
28829
28890
  function RoomPlatformRuntime(_0) {
28830
- var children = _0.children, completionAction = _0.completionAction, extensions = _0.extensions, isPracticeMode = _0.isPracticeMode, onExit = _0.onExit, _0_sizing = _0.sizing, sizing = _0_sizing === void 0 ? 'viewport' : _0_sizing, providerProps = _object_without_properties(_0, [
28891
+ var children = _0.children, completionAction = _0.completionAction, extensions = _0.extensions, modeConfig = _0.modeConfig, onExit = _0.onExit, _0_sizing = _0.sizing, sizing = _0_sizing === void 0 ? 'viewport' : _0_sizing, providerProps = _object_without_properties(_0, [
28831
28892
  "children",
28832
28893
  "completionAction",
28833
28894
  "extensions",
28834
- "isPracticeMode",
28895
+ "modeConfig",
28835
28896
  "onExit",
28836
28897
  "sizing"
28837
28898
  ]);
28838
- return /*#__PURE__*/ jsxs(RoomPlatformProvider, _object_spread_props(_object_spread({}, providerProps), {
28839
- children: [
28840
- /*#__PURE__*/ jsx(RoomPlatformPracticeModeMediaPolicy, {
28841
- isPracticeMode: isPracticeMode
28842
- }),
28843
- /*#__PURE__*/ jsx(RoomPlatformMediaRuntime, {
28844
- children: /*#__PURE__*/ jsx(RoomPlatformPrivateRoomRuntime, {
28845
- children: children !== null && children !== void 0 ? children : /*#__PURE__*/ jsx(RoomPlatformWorkspace, {
28846
- completionAction: completionAction,
28847
- extensions: extensions,
28848
- isPracticeMode: isPracticeMode,
28849
- onExit: onExit,
28850
- sizing: sizing
28851
- })
28899
+ return /*#__PURE__*/ jsx(RoomPlatformProvider, _object_spread_props(_object_spread({}, providerProps), {
28900
+ children: /*#__PURE__*/ jsx(RoomPlatformMediaRuntime, {
28901
+ children: /*#__PURE__*/ jsx(RoomPlatformPrivateRoomRuntime, {
28902
+ children: children !== null && children !== void 0 ? children : /*#__PURE__*/ jsx(RoomPlatformWorkspace, {
28903
+ completionAction: completionAction,
28904
+ extensions: extensions,
28905
+ modeConfig: modeConfig,
28906
+ onExit: onExit,
28907
+ sizing: sizing
28852
28908
  })
28853
28909
  })
28854
- ]
28910
+ })
28855
28911
  }));
28856
28912
  }
28857
28913
  function RoomPlatformRoom(props) {