@naviedu/room-platform-react 0.0.81 → 0.0.82

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 (2) hide show
  1. package/index.esm.js +448 -279
  2. package/package.json +1 -1
package/index.esm.js CHANGED
@@ -57,7 +57,7 @@ function _create_class$3(Constructor, protoProps, staticProps) {
57
57
  if (staticProps) _defineProperties$3(Constructor, staticProps);
58
58
  return Constructor;
59
59
  }
60
- function _define_property$I(obj, key, value) {
60
+ function _define_property$J(obj, key, value) {
61
61
  if (key in obj) {
62
62
  Object.defineProperty(obj, key, {
63
63
  value: value,
@@ -119,7 +119,7 @@ var RoomPlatformSurfaceBoundary = /*#__PURE__*/ function(Component) {
119
119
  function RoomPlatformSurfaceBoundary() {
120
120
  _class_call_check$7(this, RoomPlatformSurfaceBoundary);
121
121
  var _this;
122
- _this = _call_super$4(this, RoomPlatformSurfaceBoundary, arguments), _define_property$I(_this, "state", {
122
+ _this = _call_super$4(this, RoomPlatformSurfaceBoundary, arguments), _define_property$J(_this, "state", {
123
123
  hasError: false
124
124
  });
125
125
  return _this;
@@ -151,7 +151,7 @@ var RoomPlatformSurfaceBoundary = /*#__PURE__*/ function(Component) {
151
151
  return RoomPlatformSurfaceBoundary;
152
152
  }(Component);
153
153
 
154
- function _define_property$H(obj, key, value) {
154
+ function _define_property$I(obj, key, value) {
155
155
  if (key in obj) {
156
156
  Object.defineProperty(obj, key, {
157
157
  value: value,
@@ -164,7 +164,7 @@ function _define_property$H(obj, key, value) {
164
164
  }
165
165
  return obj;
166
166
  }
167
- function _object_spread$C(target) {
167
+ function _object_spread$D(target) {
168
168
  for(var i = 1; i < arguments.length; i++){
169
169
  var source = arguments[i] != null ? arguments[i] : {};
170
170
  var ownKeys = Object.keys(source);
@@ -174,7 +174,7 @@ function _object_spread$C(target) {
174
174
  }));
175
175
  }
176
176
  ownKeys.forEach(function(key) {
177
- _define_property$H(target, key, source[key]);
177
+ _define_property$I(target, key, source[key]);
178
178
  });
179
179
  }
180
180
  return target;
@@ -182,7 +182,7 @@ function _object_spread$C(target) {
182
182
  function RoomPlatformExtensionZone(param) {
183
183
  var Extension = param.component, extensionProps = param.extensionProps;
184
184
  return /*#__PURE__*/ jsx(RoomPlatformSurfaceBoundary, {
185
- children: /*#__PURE__*/ jsx(Extension, _object_spread$C({}, extensionProps))
185
+ children: /*#__PURE__*/ jsx(Extension, _object_spread$D({}, extensionProps))
186
186
  });
187
187
  }
188
188
  var getParticipantTabTitle = function(participantTab) {
@@ -213,7 +213,7 @@ var isRoomPlatformCapability = function(value) {
213
213
  return roomPlatformCapabilities.includes(value);
214
214
  };
215
215
 
216
- function _define_property$G(obj, key, value) {
216
+ function _define_property$H(obj, key, value) {
217
217
  if (key in obj) {
218
218
  Object.defineProperty(obj, key, {
219
219
  value: value,
@@ -248,7 +248,7 @@ var RoomPlatformAction = /*#__PURE__*/ function(RoomPlatformAction) {
248
248
  return RoomPlatformAction;
249
249
  }({});
250
250
  var _obj;
251
- var roomActionCapabilities = (_obj = {}, _define_property$G(_obj, "private_room.invite", RoomPlatformCapability.PRIVATE_ROOM_INVITE), _define_property$G(_obj, "private_room.respond", RoomPlatformCapability.PRIVATE_ROOM_RESPOND), _define_property$G(_obj, "private_room.close", RoomPlatformCapability.PRIVATE_ROOM_CLOSE), _define_property$G(_obj, "private_room.screen_share.start", RoomPlatformCapability.MEDIA_SHARE_SCREEN), _define_property$G(_obj, "private_room.screen_share.stop", RoomPlatformCapability.MEDIA_SHARE_SCREEN), _define_property$G(_obj, "monitor.start", RoomPlatformCapability.MONITOR_MANAGE), _define_property$G(_obj, "monitor.stop", RoomPlatformCapability.MONITOR_MANAGE), _define_property$G(_obj, "moderation.mute", RoomPlatformCapability.ROOM_MODERATE), _define_property$G(_obj, "moderation.remove", RoomPlatformCapability.ROOM_MODERATE), _define_property$G(_obj, "moderation.lower_hand", RoomPlatformCapability.ROOM_MODERATE), _define_property$G(_obj, "whiteboard.clear", RoomPlatformCapability.WHITEBOARD_CLEAR), _define_property$G(_obj, "speak.request", RoomPlatformCapability.ROOM_SPEAK_REQUEST), _define_property$G(_obj, "speak.cancel", RoomPlatformCapability.ROOM_SPEAK_REQUEST), _define_property$G(_obj, "speak.approve", RoomPlatformCapability.ROOM_MODERATE), _define_property$G(_obj, "speak.reject", RoomPlatformCapability.ROOM_MODERATE), _define_property$G(_obj, "speaker.set", RoomPlatformCapability.ROOM_MODERATE), _define_property$G(_obj, "speaker.clear", RoomPlatformCapability.ROOM_MODERATE), _define_property$G(_obj, "room.mode.set", RoomPlatformCapability.ROOM_SET_MODE), _obj);
251
+ var roomActionCapabilities = (_obj = {}, _define_property$H(_obj, "private_room.invite", RoomPlatformCapability.PRIVATE_ROOM_INVITE), _define_property$H(_obj, "private_room.respond", RoomPlatformCapability.PRIVATE_ROOM_RESPOND), _define_property$H(_obj, "private_room.close", RoomPlatformCapability.PRIVATE_ROOM_CLOSE), _define_property$H(_obj, "private_room.screen_share.start", RoomPlatformCapability.MEDIA_SHARE_SCREEN), _define_property$H(_obj, "private_room.screen_share.stop", RoomPlatformCapability.MEDIA_SHARE_SCREEN), _define_property$H(_obj, "monitor.start", RoomPlatformCapability.MONITOR_MANAGE), _define_property$H(_obj, "monitor.stop", RoomPlatformCapability.MONITOR_MANAGE), _define_property$H(_obj, "moderation.mute", RoomPlatformCapability.ROOM_MODERATE), _define_property$H(_obj, "moderation.remove", RoomPlatformCapability.ROOM_MODERATE), _define_property$H(_obj, "moderation.lower_hand", RoomPlatformCapability.ROOM_MODERATE), _define_property$H(_obj, "whiteboard.clear", RoomPlatformCapability.WHITEBOARD_CLEAR), _define_property$H(_obj, "speak.request", RoomPlatformCapability.ROOM_SPEAK_REQUEST), _define_property$H(_obj, "speak.cancel", RoomPlatformCapability.ROOM_SPEAK_REQUEST), _define_property$H(_obj, "speak.approve", RoomPlatformCapability.ROOM_MODERATE), _define_property$H(_obj, "speak.reject", RoomPlatformCapability.ROOM_MODERATE), _define_property$H(_obj, "speaker.set", RoomPlatformCapability.ROOM_MODERATE), _define_property$H(_obj, "speaker.clear", RoomPlatformCapability.ROOM_MODERATE), _define_property$H(_obj, "room.mode.set", RoomPlatformCapability.ROOM_SET_MODE), _obj);
252
252
 
253
253
  function _type_of$l(obj) {
254
254
  "@swc/helpers - typeof";
@@ -292,7 +292,7 @@ function _array_with_holes$C(arr) {
292
292
  function _array_without_holes$j(arr) {
293
293
  if (Array.isArray(arr)) return _array_like_to_array$H(arr);
294
294
  }
295
- function _define_property$F(obj, key, value) {
295
+ function _define_property$G(obj, key, value) {
296
296
  if (key in obj) {
297
297
  Object.defineProperty(obj, key, {
298
298
  value: value,
@@ -338,7 +338,7 @@ function _non_iterable_rest$C() {
338
338
  function _non_iterable_spread$j() {
339
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.");
340
340
  }
341
- function _object_spread$B(target) {
341
+ function _object_spread$C(target) {
342
342
  for(var i = 1; i < arguments.length; i++){
343
343
  var source = arguments[i] != null ? arguments[i] : {};
344
344
  var ownKeys = Object.keys(source);
@@ -348,7 +348,7 @@ function _object_spread$B(target) {
348
348
  }));
349
349
  }
350
350
  ownKeys.forEach(function(key) {
351
- _define_property$F(target, key, source[key]);
351
+ _define_property$G(target, key, source[key]);
352
352
  });
353
353
  }
354
354
  return target;
@@ -714,7 +714,7 @@ var createParseClassName = function(config) {
714
714
  };
715
715
  };
716
716
  var createConfigUtils = function(config) {
717
- return _object_spread$B({
717
+ return _object_spread$C({
718
718
  cache: createLruCache(config.cacheSize),
719
719
  parseClassName: createParseClassName(config),
720
720
  sortModifiers: createSortModifiers(config)
@@ -5325,7 +5325,7 @@ function _array_with_holes$B(arr) {
5325
5325
  function _array_without_holes$i(arr) {
5326
5326
  if (Array.isArray(arr)) return _array_like_to_array$G(arr);
5327
5327
  }
5328
- function _define_property$E(obj, key, value) {
5328
+ function _define_property$F(obj, key, value) {
5329
5329
  if (key in obj) {
5330
5330
  Object.defineProperty(obj, key, {
5331
5331
  value: value,
@@ -5371,7 +5371,7 @@ function _non_iterable_rest$B() {
5371
5371
  function _non_iterable_spread$i() {
5372
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.");
5373
5373
  }
5374
- function _object_spread$A(target) {
5374
+ function _object_spread$B(target) {
5375
5375
  for(var i = 1; i < arguments.length; i++){
5376
5376
  var source = arguments[i] != null ? arguments[i] : {};
5377
5377
  var ownKeys = Object.keys(source);
@@ -5381,7 +5381,7 @@ function _object_spread$A(target) {
5381
5381
  }));
5382
5382
  }
5383
5383
  ownKeys.forEach(function(key) {
5384
- _define_property$E(target, key, source[key]);
5384
+ _define_property$F(target, key, source[key]);
5385
5385
  });
5386
5386
  }
5387
5387
  return target;
@@ -5467,7 +5467,7 @@ var cva = function(base, config) {
5467
5467
  ]);
5468
5468
  return Object.entries(compoundVariantOptions).every(function(param) {
5469
5469
  var _param = _sliced_to_array$B(param, 2), key = _param[0], value = _param[1];
5470
- return Array.isArray(value) ? value.includes(_object_spread$A({}, defaultVariants, propsWithoutUndefined)[key]) : _object_spread$A({}, defaultVariants, propsWithoutUndefined)[key] === value;
5470
+ return Array.isArray(value) ? value.includes(_object_spread$B({}, defaultVariants, propsWithoutUndefined)[key]) : _object_spread$B({}, defaultVariants, propsWithoutUndefined)[key] === value;
5471
5471
  }) ? _to_consumable_array$i(acc).concat([
5472
5472
  cvClass,
5473
5473
  cvClassName
@@ -5477,7 +5477,7 @@ var cva = function(base, config) {
5477
5477
  };
5478
5478
  };
5479
5479
 
5480
- function _define_property$D(obj, key, value) {
5480
+ function _define_property$E(obj, key, value) {
5481
5481
  if (key in obj) {
5482
5482
  Object.defineProperty(obj, key, {
5483
5483
  value: value,
@@ -5490,7 +5490,7 @@ function _define_property$D(obj, key, value) {
5490
5490
  }
5491
5491
  return obj;
5492
5492
  }
5493
- function _object_spread$z(target) {
5493
+ function _object_spread$A(target) {
5494
5494
  for(var i = 1; i < arguments.length; i++){
5495
5495
  var source = arguments[i] != null ? arguments[i] : {};
5496
5496
  var ownKeys = Object.keys(source);
@@ -5500,7 +5500,7 @@ function _object_spread$z(target) {
5500
5500
  }));
5501
5501
  }
5502
5502
  ownKeys.forEach(function(key) {
5503
- _define_property$D(target, key, source[key]);
5503
+ _define_property$E(target, key, source[key]);
5504
5504
  });
5505
5505
  }
5506
5506
  return target;
@@ -5577,7 +5577,7 @@ function Button$1(_0) {
5577
5577
  "asChild"
5578
5578
  ]);
5579
5579
  var Comp = asChild ? Slot.Root : 'button';
5580
- return /*#__PURE__*/ jsx(Comp, _object_spread$z({
5580
+ return /*#__PURE__*/ jsx(Comp, _object_spread$A({
5581
5581
  "data-slot": "button",
5582
5582
  "data-variant": variant,
5583
5583
  "data-size": size,
@@ -5601,7 +5601,7 @@ function usePortalContainer() {
5601
5601
  return useContext(PortalContainerContext);
5602
5602
  }
5603
5603
 
5604
- function _define_property$C(obj, key, value) {
5604
+ function _define_property$D(obj, key, value) {
5605
5605
  if (key in obj) {
5606
5606
  Object.defineProperty(obj, key, {
5607
5607
  value: value,
@@ -5632,7 +5632,7 @@ function _object_destructuring_empty$3(o) {
5632
5632
  if (o === null || o === void 0) throw new TypeError("Cannot destructure " + o);
5633
5633
  return o;
5634
5634
  }
5635
- function _object_spread$y(target) {
5635
+ function _object_spread$z(target) {
5636
5636
  for(var i = 1; i < arguments.length; i++){
5637
5637
  var source = arguments[i] != null ? arguments[i] : {};
5638
5638
  var ownKeys = Object.keys(source);
@@ -5642,7 +5642,7 @@ function _object_spread$y(target) {
5642
5642
  }));
5643
5643
  }
5644
5644
  ownKeys.forEach(function(key) {
5645
- _define_property$C(target, key, source[key]);
5645
+ _define_property$D(target, key, source[key]);
5646
5646
  });
5647
5647
  }
5648
5648
  return target;
@@ -5704,13 +5704,13 @@ function _object_without_properties_loose$d(source, excluded) {
5704
5704
  }
5705
5705
  function AlertDialog(_0) {
5706
5706
  _object_destructuring_empty$3(_0); var props = _extends$4({}, _0);
5707
- return /*#__PURE__*/ jsx(AlertDialog$1.Root, _object_spread$y({
5707
+ return /*#__PURE__*/ jsx(AlertDialog$1.Root, _object_spread$z({
5708
5708
  "data-slot": "alert-dialog"
5709
5709
  }, props));
5710
5710
  }
5711
5711
  function AlertDialogTrigger(_0) {
5712
5712
  _object_destructuring_empty$3(_0); var props = _extends$4({}, _0);
5713
- return /*#__PURE__*/ jsx(AlertDialog$1.Trigger, _object_spread$y({
5713
+ return /*#__PURE__*/ jsx(AlertDialog$1.Trigger, _object_spread$z({
5714
5714
  "data-slot": "alert-dialog-trigger"
5715
5715
  }, props));
5716
5716
  }
@@ -5720,7 +5720,7 @@ function AlertDialogPortal(_0) {
5720
5720
  ]);
5721
5721
  var _ref;
5722
5722
  var inheritedContainer = usePortalContainer();
5723
- return /*#__PURE__*/ jsx(AlertDialog$1.Portal, _object_spread_props$r(_object_spread$y({
5723
+ return /*#__PURE__*/ jsx(AlertDialog$1.Portal, _object_spread_props$r(_object_spread$z({
5724
5724
  "data-slot": "alert-dialog-portal"
5725
5725
  }, props), {
5726
5726
  container: (_ref = container !== null && container !== void 0 ? container : inheritedContainer) !== null && _ref !== void 0 ? _ref : undefined
@@ -5730,7 +5730,7 @@ function AlertDialogOverlay(_0) {
5730
5730
  var className = _0.className, props = _object_without_properties$d(_0, [
5731
5731
  "className"
5732
5732
  ]);
5733
- return /*#__PURE__*/ jsx(AlertDialog$1.Overlay, _object_spread$y({
5733
+ return /*#__PURE__*/ jsx(AlertDialog$1.Overlay, _object_spread$z({
5734
5734
  "data-slot": "alert-dialog-overlay",
5735
5735
  className: cn('fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0', className)
5736
5736
  }, props));
@@ -5743,7 +5743,7 @@ function AlertDialogContent(_0) {
5743
5743
  return /*#__PURE__*/ jsxs(AlertDialogPortal, {
5744
5744
  children: [
5745
5745
  /*#__PURE__*/ jsx(AlertDialogOverlay, {}),
5746
- /*#__PURE__*/ jsx(AlertDialog$1.Content, _object_spread$y({
5746
+ /*#__PURE__*/ jsx(AlertDialog$1.Content, _object_spread$z({
5747
5747
  "data-slot": "alert-dialog-content",
5748
5748
  "data-size": size,
5749
5749
  className: cn('group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95', className)
@@ -5755,7 +5755,7 @@ function AlertDialogHeader(_0) {
5755
5755
  var className = _0.className, props = _object_without_properties$d(_0, [
5756
5756
  "className"
5757
5757
  ]);
5758
- return /*#__PURE__*/ jsx("div", _object_spread$y({
5758
+ return /*#__PURE__*/ jsx("div", _object_spread$z({
5759
5759
  "data-slot": "alert-dialog-header",
5760
5760
  className: cn('grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]', className)
5761
5761
  }, props));
@@ -5764,7 +5764,7 @@ function AlertDialogFooter(_0) {
5764
5764
  var className = _0.className, props = _object_without_properties$d(_0, [
5765
5765
  "className"
5766
5766
  ]);
5767
- return /*#__PURE__*/ jsx("div", _object_spread$y({
5767
+ return /*#__PURE__*/ jsx("div", _object_spread$z({
5768
5768
  "data-slot": "alert-dialog-footer",
5769
5769
  className: cn('-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end', className)
5770
5770
  }, props));
@@ -5773,7 +5773,7 @@ function AlertDialogTitle(_0) {
5773
5773
  var className = _0.className, props = _object_without_properties$d(_0, [
5774
5774
  "className"
5775
5775
  ]);
5776
- return /*#__PURE__*/ jsx(AlertDialog$1.Title, _object_spread$y({
5776
+ return /*#__PURE__*/ jsx(AlertDialog$1.Title, _object_spread$z({
5777
5777
  "data-slot": "alert-dialog-title",
5778
5778
  className: cn('text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2', className)
5779
5779
  }, props));
@@ -5782,7 +5782,7 @@ function AlertDialogDescription(_0) {
5782
5782
  var className = _0.className, props = _object_without_properties$d(_0, [
5783
5783
  "className"
5784
5784
  ]);
5785
- return /*#__PURE__*/ jsx(AlertDialog$1.Description, _object_spread$y({
5785
+ return /*#__PURE__*/ jsx(AlertDialog$1.Description, _object_spread$z({
5786
5786
  "data-slot": "alert-dialog-description",
5787
5787
  className: cn('text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground', className)
5788
5788
  }, props));
@@ -5797,7 +5797,7 @@ function AlertDialogAction(_0) {
5797
5797
  variant: variant,
5798
5798
  size: size,
5799
5799
  asChild: true,
5800
- children: /*#__PURE__*/ jsx(AlertDialog$1.Action, _object_spread$y({
5800
+ children: /*#__PURE__*/ jsx(AlertDialog$1.Action, _object_spread$z({
5801
5801
  "data-slot": "alert-dialog-action",
5802
5802
  className: cn(className)
5803
5803
  }, props))
@@ -5813,14 +5813,14 @@ function AlertDialogCancel(_0) {
5813
5813
  variant: variant,
5814
5814
  size: size,
5815
5815
  asChild: true,
5816
- children: /*#__PURE__*/ jsx(AlertDialog$1.Cancel, _object_spread$y({
5816
+ children: /*#__PURE__*/ jsx(AlertDialog$1.Cancel, _object_spread$z({
5817
5817
  "data-slot": "alert-dialog-cancel",
5818
5818
  className: cn(className)
5819
5819
  }, props))
5820
5820
  });
5821
5821
  }
5822
5822
 
5823
- function _define_property$B(obj, key, value) {
5823
+ function _define_property$C(obj, key, value) {
5824
5824
  if (key in obj) {
5825
5825
  Object.defineProperty(obj, key, {
5826
5826
  value: value,
@@ -5833,7 +5833,7 @@ function _define_property$B(obj, key, value) {
5833
5833
  }
5834
5834
  return obj;
5835
5835
  }
5836
- function _object_spread$x(target) {
5836
+ function _object_spread$y(target) {
5837
5837
  for(var i = 1; i < arguments.length; i++){
5838
5838
  var source = arguments[i] != null ? arguments[i] : {};
5839
5839
  var ownKeys = Object.keys(source);
@@ -5843,7 +5843,7 @@ function _object_spread$x(target) {
5843
5843
  }));
5844
5844
  }
5845
5845
  ownKeys.forEach(function(key) {
5846
- _define_property$B(target, key, source[key]);
5846
+ _define_property$C(target, key, source[key]);
5847
5847
  });
5848
5848
  }
5849
5849
  return target;
@@ -5906,7 +5906,7 @@ function Badge(_0) {
5906
5906
  "asChild"
5907
5907
  ]);
5908
5908
  var Comp = asChild ? Slot.Root : 'span';
5909
- return /*#__PURE__*/ jsx(Comp, _object_spread$x({
5909
+ return /*#__PURE__*/ jsx(Comp, _object_spread$y({
5910
5910
  "data-slot": "badge",
5911
5911
  "data-variant": variant,
5912
5912
  className: cn(badgeVariants({
@@ -5923,7 +5923,7 @@ function _array_like_to_array$F(arr, len) {
5923
5923
  function _array_with_holes$A(arr) {
5924
5924
  if (Array.isArray(arr)) return arr;
5925
5925
  }
5926
- function _define_property$A(obj, key, value) {
5926
+ function _define_property$B(obj, key, value) {
5927
5927
  if (key in obj) {
5928
5928
  Object.defineProperty(obj, key, {
5929
5929
  value: value,
@@ -5981,7 +5981,7 @@ function _object_destructuring_empty$2(o) {
5981
5981
  if (o === null || o === void 0) throw new TypeError("Cannot destructure " + o);
5982
5982
  return o;
5983
5983
  }
5984
- function _object_spread$w(target) {
5984
+ function _object_spread$x(target) {
5985
5985
  for(var i = 1; i < arguments.length; i++){
5986
5986
  var source = arguments[i] != null ? arguments[i] : {};
5987
5987
  var ownKeys = Object.keys(source);
@@ -5991,7 +5991,7 @@ function _object_spread$w(target) {
5991
5991
  }));
5992
5992
  }
5993
5993
  ownKeys.forEach(function(key) {
5994
- _define_property$A(target, key, source[key]);
5994
+ _define_property$B(target, key, source[key]);
5995
5995
  });
5996
5996
  }
5997
5997
  return target;
@@ -6064,7 +6064,7 @@ function _unsupported_iterable_to_array$F(o, minLen) {
6064
6064
  }
6065
6065
  function Dialog(_0) {
6066
6066
  _object_destructuring_empty$2(_0); var props = _extends$3({}, _0);
6067
- return /*#__PURE__*/ jsx(Dialog$1.Root, _object_spread$w({
6067
+ return /*#__PURE__*/ jsx(Dialog$1.Root, _object_spread$x({
6068
6068
  "data-slot": "dialog"
6069
6069
  }, props));
6070
6070
  }
@@ -6074,7 +6074,7 @@ function DialogPortal(_0) {
6074
6074
  ]);
6075
6075
  var _ref;
6076
6076
  var inheritedContainer = usePortalContainer();
6077
- return /*#__PURE__*/ jsx(Dialog$1.Portal, _object_spread_props$q(_object_spread$w({
6077
+ return /*#__PURE__*/ jsx(Dialog$1.Portal, _object_spread_props$q(_object_spread$x({
6078
6078
  "data-slot": "dialog-portal"
6079
6079
  }, props), {
6080
6080
  container: (_ref = container !== null && container !== void 0 ? container : inheritedContainer) !== null && _ref !== void 0 ? _ref : undefined
@@ -6084,7 +6084,7 @@ function DialogOverlay(_0) {
6084
6084
  var className = _0.className, props = _object_without_properties$b(_0, [
6085
6085
  "className"
6086
6086
  ]);
6087
- return /*#__PURE__*/ jsx(Dialog$1.Overlay, _object_spread$w({
6087
+ return /*#__PURE__*/ jsx(Dialog$1.Overlay, _object_spread$x({
6088
6088
  "data-slot": "dialog-overlay",
6089
6089
  className: cn('fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0', className)
6090
6090
  }, props));
@@ -6100,7 +6100,7 @@ function DialogContent(_0) {
6100
6100
  return /*#__PURE__*/ jsxs(DialogPortal, {
6101
6101
  children: [
6102
6102
  /*#__PURE__*/ jsx(DialogOverlay, {}),
6103
- /*#__PURE__*/ jsxs(Dialog$1.Content, _object_spread_props$q(_object_spread$w({
6103
+ /*#__PURE__*/ jsxs(Dialog$1.Content, _object_spread_props$q(_object_spread$x({
6104
6104
  "data-slot": "dialog-content",
6105
6105
  className: cn('fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95', className, isMaximized && 'w-screen h-screen max-w-none sm:max-w-none rounded-none')
6106
6106
  }, props), {
@@ -6152,7 +6152,7 @@ function DialogHeader(_0) {
6152
6152
  var className = _0.className, props = _object_without_properties$b(_0, [
6153
6153
  "className"
6154
6154
  ]);
6155
- return /*#__PURE__*/ jsx("div", _object_spread$w({
6155
+ return /*#__PURE__*/ jsx("div", _object_spread$x({
6156
6156
  "data-slot": "dialog-header",
6157
6157
  className: cn('flex flex-col gap-2', className)
6158
6158
  }, props));
@@ -6163,7 +6163,7 @@ function DialogFooter(_0) {
6163
6163
  "showCloseButton",
6164
6164
  "children"
6165
6165
  ]);
6166
- return /*#__PURE__*/ jsxs("div", _object_spread_props$q(_object_spread$w({
6166
+ return /*#__PURE__*/ jsxs("div", _object_spread_props$q(_object_spread$x({
6167
6167
  "data-slot": "dialog-footer",
6168
6168
  className: cn('-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end', className)
6169
6169
  }, props), {
@@ -6183,13 +6183,13 @@ function DialogTitle(_0) {
6183
6183
  var className = _0.className, props = _object_without_properties$b(_0, [
6184
6184
  "className"
6185
6185
  ]);
6186
- return /*#__PURE__*/ jsx(Dialog$1.Title, _object_spread$w({
6186
+ return /*#__PURE__*/ jsx(Dialog$1.Title, _object_spread$x({
6187
6187
  "data-slot": "dialog-title",
6188
6188
  className: cn('text-base leading-none font-medium', className)
6189
6189
  }, props));
6190
6190
  }
6191
6191
 
6192
- function _define_property$z(obj, key, value) {
6192
+ function _define_property$A(obj, key, value) {
6193
6193
  if (key in obj) {
6194
6194
  Object.defineProperty(obj, key, {
6195
6195
  value: value,
@@ -6220,7 +6220,7 @@ function _object_destructuring_empty$1(o) {
6220
6220
  if (o === null || o === void 0) throw new TypeError("Cannot destructure " + o);
6221
6221
  return o;
6222
6222
  }
6223
- function _object_spread$v(target) {
6223
+ function _object_spread$w(target) {
6224
6224
  for(var i = 1; i < arguments.length; i++){
6225
6225
  var source = arguments[i] != null ? arguments[i] : {};
6226
6226
  var ownKeys = Object.keys(source);
@@ -6230,7 +6230,7 @@ function _object_spread$v(target) {
6230
6230
  }));
6231
6231
  }
6232
6232
  ownKeys.forEach(function(key) {
6233
- _define_property$z(target, key, source[key]);
6233
+ _define_property$A(target, key, source[key]);
6234
6234
  });
6235
6235
  }
6236
6236
  return target;
@@ -6292,13 +6292,13 @@ function _object_without_properties_loose$a(source, excluded) {
6292
6292
  }
6293
6293
  function Select(_0) {
6294
6294
  _object_destructuring_empty$1(_0); var props = _extends$2({}, _0);
6295
- return /*#__PURE__*/ jsx(Select$1.Root, _object_spread$v({
6295
+ return /*#__PURE__*/ jsx(Select$1.Root, _object_spread$w({
6296
6296
  "data-slot": "select"
6297
6297
  }, props));
6298
6298
  }
6299
6299
  function SelectValue(_0) {
6300
6300
  _object_destructuring_empty$1(_0); var props = _extends$2({}, _0);
6301
- return /*#__PURE__*/ jsx(Select$1.Value, _object_spread$v({
6301
+ return /*#__PURE__*/ jsx(Select$1.Value, _object_spread$w({
6302
6302
  "data-slot": "select-value"
6303
6303
  }, props));
6304
6304
  }
@@ -6308,7 +6308,7 @@ function SelectTrigger(_0) {
6308
6308
  "size",
6309
6309
  "children"
6310
6310
  ]);
6311
- return /*#__PURE__*/ jsxs(Select$1.Trigger, _object_spread_props$p(_object_spread$v({
6311
+ return /*#__PURE__*/ jsxs(Select$1.Trigger, _object_spread_props$p(_object_spread$w({
6312
6312
  "data-slot": "select-trigger",
6313
6313
  "data-size": size,
6314
6314
  className: cn("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className)
@@ -6336,7 +6336,7 @@ function SelectContent(_0) {
6336
6336
  var inheritedContainer = usePortalContainer();
6337
6337
  return /*#__PURE__*/ jsx(Select$1.Portal, {
6338
6338
  container: (_ref = container !== null && container !== void 0 ? container : inheritedContainer) !== null && _ref !== void 0 ? _ref : undefined,
6339
- children: /*#__PURE__*/ jsxs(Select$1.Content, _object_spread_props$p(_object_spread$v({
6339
+ children: /*#__PURE__*/ jsxs(Select$1.Content, _object_spread_props$p(_object_spread$w({
6340
6340
  "data-slot": "select-content",
6341
6341
  "data-align-trigger": position === 'item-aligned',
6342
6342
  className: cn('relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95', position === 'popper' && 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1', className),
@@ -6360,7 +6360,7 @@ function SelectItem(_0) {
6360
6360
  "className",
6361
6361
  "children"
6362
6362
  ]);
6363
- return /*#__PURE__*/ jsxs(Select$1.Item, _object_spread_props$p(_object_spread$v({
6363
+ return /*#__PURE__*/ jsxs(Select$1.Item, _object_spread_props$p(_object_spread$w({
6364
6364
  "data-slot": "select-item",
6365
6365
  className: cn("relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className)
6366
6366
  }, props), {
@@ -6383,7 +6383,7 @@ function SelectScrollUpButton(_0) {
6383
6383
  var className = _0.className, props = _object_without_properties$a(_0, [
6384
6384
  "className"
6385
6385
  ]);
6386
- return /*#__PURE__*/ jsx(Select$1.ScrollUpButton, _object_spread_props$p(_object_spread$v({
6386
+ return /*#__PURE__*/ jsx(Select$1.ScrollUpButton, _object_spread_props$p(_object_spread$w({
6387
6387
  "data-slot": "select-scroll-up-button",
6388
6388
  className: cn("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", className)
6389
6389
  }, props), {
@@ -6394,7 +6394,7 @@ function SelectScrollDownButton(_0) {
6394
6394
  var className = _0.className, props = _object_without_properties$a(_0, [
6395
6395
  "className"
6396
6396
  ]);
6397
- return /*#__PURE__*/ jsx(Select$1.ScrollDownButton, _object_spread_props$p(_object_spread$v({
6397
+ return /*#__PURE__*/ jsx(Select$1.ScrollDownButton, _object_spread_props$p(_object_spread$w({
6398
6398
  "data-slot": "select-scroll-down-button",
6399
6399
  className: cn("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", className)
6400
6400
  }, props), {
@@ -6402,7 +6402,7 @@ function SelectScrollDownButton(_0) {
6402
6402
  }));
6403
6403
  }
6404
6404
 
6405
- function _define_property$y(obj, key, value) {
6405
+ function _define_property$z(obj, key, value) {
6406
6406
  if (key in obj) {
6407
6407
  Object.defineProperty(obj, key, {
6408
6408
  value: value,
@@ -6415,7 +6415,7 @@ function _define_property$y(obj, key, value) {
6415
6415
  }
6416
6416
  return obj;
6417
6417
  }
6418
- function _object_spread$u(target) {
6418
+ function _object_spread$v(target) {
6419
6419
  for(var i = 1; i < arguments.length; i++){
6420
6420
  var source = arguments[i] != null ? arguments[i] : {};
6421
6421
  var ownKeys = Object.keys(source);
@@ -6425,7 +6425,7 @@ function _object_spread$u(target) {
6425
6425
  }));
6426
6426
  }
6427
6427
  ownKeys.forEach(function(key) {
6428
- _define_property$y(target, key, source[key]);
6428
+ _define_property$z(target, key, source[key]);
6429
6429
  });
6430
6430
  }
6431
6431
  return target;
@@ -6470,14 +6470,14 @@ function Spinner(_0) {
6470
6470
  var className = _0.className, props = _object_without_properties$9(_0, [
6471
6471
  "className"
6472
6472
  ]);
6473
- return /*#__PURE__*/ jsx(Loader2Icon, _object_spread$u({
6473
+ return /*#__PURE__*/ jsx(Loader2Icon, _object_spread$v({
6474
6474
  role: "status",
6475
6475
  "aria-label": "Loading",
6476
6476
  className: cn('size-4 animate-spin', className)
6477
6477
  }, props));
6478
6478
  }
6479
6479
 
6480
- function _define_property$x(obj, key, value) {
6480
+ function _define_property$y(obj, key, value) {
6481
6481
  if (key in obj) {
6482
6482
  Object.defineProperty(obj, key, {
6483
6483
  value: value,
@@ -6490,7 +6490,7 @@ function _define_property$x(obj, key, value) {
6490
6490
  }
6491
6491
  return obj;
6492
6492
  }
6493
- function _object_spread$t(target) {
6493
+ function _object_spread$u(target) {
6494
6494
  for(var i = 1; i < arguments.length; i++){
6495
6495
  var source = arguments[i] != null ? arguments[i] : {};
6496
6496
  var ownKeys = Object.keys(source);
@@ -6500,7 +6500,7 @@ function _object_spread$t(target) {
6500
6500
  }));
6501
6501
  }
6502
6502
  ownKeys.forEach(function(key) {
6503
- _define_property$x(target, key, source[key]);
6503
+ _define_property$y(target, key, source[key]);
6504
6504
  });
6505
6505
  }
6506
6506
  return target;
@@ -6546,7 +6546,7 @@ function Tabs(_0) {
6546
6546
  "className",
6547
6547
  "orientation"
6548
6548
  ]);
6549
- return /*#__PURE__*/ jsx(Tabs$1.Root, _object_spread$t({
6549
+ return /*#__PURE__*/ jsx(Tabs$1.Root, _object_spread$u({
6550
6550
  "data-slot": "tabs",
6551
6551
  "data-orientation": orientation,
6552
6552
  className: cn('group/tabs flex gap-2 data-horizontal:flex-col', className)
@@ -6568,7 +6568,7 @@ function TabsList(_0) {
6568
6568
  "className",
6569
6569
  "variant"
6570
6570
  ]);
6571
- return /*#__PURE__*/ jsx(Tabs$1.List, _object_spread$t({
6571
+ return /*#__PURE__*/ jsx(Tabs$1.List, _object_spread$u({
6572
6572
  "data-slot": "tabs-list",
6573
6573
  "data-variant": variant,
6574
6574
  className: cn(tabsListVariants({
@@ -6580,7 +6580,7 @@ function TabsTrigger(_0) {
6580
6580
  var className = _0.className, props = _object_without_properties$8(_0, [
6581
6581
  "className"
6582
6582
  ]);
6583
- return /*#__PURE__*/ jsx(Tabs$1.Trigger, _object_spread$t({
6583
+ return /*#__PURE__*/ jsx(Tabs$1.Trigger, _object_spread$u({
6584
6584
  "data-slot": "tabs-trigger",
6585
6585
  className: cn("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", 'group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent', 'data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground', 'after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100', className)
6586
6586
  }, props));
@@ -6589,13 +6589,13 @@ function TabsContent(_0) {
6589
6589
  var className = _0.className, props = _object_without_properties$8(_0, [
6590
6590
  "className"
6591
6591
  ]);
6592
- return /*#__PURE__*/ jsx(Tabs$1.Content, _object_spread$t({
6592
+ return /*#__PURE__*/ jsx(Tabs$1.Content, _object_spread$u({
6593
6593
  "data-slot": "tabs-content",
6594
6594
  className: cn('flex-1 text-sm outline-none', className)
6595
6595
  }, props));
6596
6596
  }
6597
6597
 
6598
- function _define_property$w(obj, key, value) {
6598
+ function _define_property$x(obj, key, value) {
6599
6599
  if (key in obj) {
6600
6600
  Object.defineProperty(obj, key, {
6601
6601
  value: value,
@@ -6626,7 +6626,7 @@ function _object_destructuring_empty(o) {
6626
6626
  if (o === null || o === void 0) throw new TypeError("Cannot destructure " + o);
6627
6627
  return o;
6628
6628
  }
6629
- function _object_spread$s(target) {
6629
+ function _object_spread$t(target) {
6630
6630
  for(var i = 1; i < arguments.length; i++){
6631
6631
  var source = arguments[i] != null ? arguments[i] : {};
6632
6632
  var ownKeys = Object.keys(source);
@@ -6636,7 +6636,7 @@ function _object_spread$s(target) {
6636
6636
  }));
6637
6637
  }
6638
6638
  ownKeys.forEach(function(key) {
6639
- _define_property$w(target, key, source[key]);
6639
+ _define_property$x(target, key, source[key]);
6640
6640
  });
6641
6641
  }
6642
6642
  return target;
@@ -6700,7 +6700,7 @@ function TooltipProvider(_0) {
6700
6700
  var _0_delayDuration = _0.delayDuration, delayDuration = _0_delayDuration === void 0 ? 0 : _0_delayDuration, props = _object_without_properties$7(_0, [
6701
6701
  "delayDuration"
6702
6702
  ]);
6703
- return /*#__PURE__*/ jsx(Tooltip$1.Provider, _object_spread$s({
6703
+ return /*#__PURE__*/ jsx(Tooltip$1.Provider, _object_spread$t({
6704
6704
  "data-slot": "tooltip-provider",
6705
6705
  delayDuration: delayDuration
6706
6706
  }, props));
@@ -6708,14 +6708,14 @@ function TooltipProvider(_0) {
6708
6708
  function Tooltip(_0) {
6709
6709
  _object_destructuring_empty(_0); var props = _extends$1({}, _0);
6710
6710
  return /*#__PURE__*/ jsx(TooltipProvider, {
6711
- children: /*#__PURE__*/ jsx(Tooltip$1.Root, _object_spread$s({
6711
+ children: /*#__PURE__*/ jsx(Tooltip$1.Root, _object_spread$t({
6712
6712
  "data-slot": "tooltip"
6713
6713
  }, props))
6714
6714
  });
6715
6715
  }
6716
6716
  function TooltipTrigger(_0) {
6717
6717
  _object_destructuring_empty(_0); var props = _extends$1({}, _0);
6718
- return /*#__PURE__*/ jsx(Tooltip$1.Trigger, _object_spread$s({
6718
+ return /*#__PURE__*/ jsx(Tooltip$1.Trigger, _object_spread$t({
6719
6719
  "data-slot": "tooltip-trigger"
6720
6720
  }, props));
6721
6721
  }
@@ -6730,7 +6730,7 @@ function TooltipContent(_0) {
6730
6730
  var inheritedContainer = usePortalContainer();
6731
6731
  return /*#__PURE__*/ jsx(Tooltip$1.Portal, {
6732
6732
  container: (_ref = container !== null && container !== void 0 ? container : inheritedContainer) !== null && _ref !== void 0 ? _ref : undefined,
6733
- children: /*#__PURE__*/ jsxs(Tooltip$1.Content, _object_spread_props$o(_object_spread$s({
6733
+ children: /*#__PURE__*/ jsxs(Tooltip$1.Content, _object_spread_props$o(_object_spread$t({
6734
6734
  "data-slot": "tooltip-content",
6735
6735
  sideOffset: sideOffset,
6736
6736
  className: cn('z-50 max-w-xs overflow-hidden rounded-lg bg-primary px-3 py-2 text-xs text-primary-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2', className)
@@ -6934,7 +6934,7 @@ function _array_like_to_array$E(arr, len) {
6934
6934
  function _array_without_holes$h(arr) {
6935
6935
  if (Array.isArray(arr)) return _array_like_to_array$E(arr);
6936
6936
  }
6937
- function _define_property$v(obj, key, value) {
6937
+ function _define_property$w(obj, key, value) {
6938
6938
  if (key in obj) {
6939
6939
  Object.defineProperty(obj, key, {
6940
6940
  value: value,
@@ -6953,7 +6953,7 @@ function _iterable_to_array$h(iter) {
6953
6953
  function _non_iterable_spread$h() {
6954
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.");
6955
6955
  }
6956
- function _object_spread$r(target) {
6956
+ function _object_spread$s(target) {
6957
6957
  for(var i = 1; i < arguments.length; i++){
6958
6958
  var source = arguments[i] != null ? arguments[i] : {};
6959
6959
  var ownKeys = Object.keys(source);
@@ -6963,7 +6963,7 @@ function _object_spread$r(target) {
6963
6963
  }));
6964
6964
  }
6965
6965
  ownKeys.forEach(function(key) {
6966
- _define_property$v(target, key, source[key]);
6966
+ _define_property$w(target, key, source[key]);
6967
6967
  });
6968
6968
  }
6969
6969
  return target;
@@ -7128,7 +7128,7 @@ function createWhiteboardLocalHistory(createOperationId) {
7128
7128
  if (!entry) return undefined;
7129
7129
  var transition = commandFor(entry, direction);
7130
7130
  var _obj;
7131
- state = _object_spread_props$n(_object_spread$r({}, state), (_obj = {}, _define_property$v(_obj, from, source.slice(0, -1)), _define_property$v(_obj, to, _to_consumable_array$h(state[to]).concat([
7131
+ state = _object_spread_props$n(_object_spread$s({}, state), (_obj = {}, _define_property$w(_obj, from, source.slice(0, -1)), _define_property$w(_obj, to, _to_consumable_array$h(state[to]).concat([
7132
7132
  entry
7133
7133
  ])), _obj));
7134
7134
  return transition;
@@ -7552,7 +7552,7 @@ function _array_with_holes$z(arr) {
7552
7552
  function _array_without_holes$f(arr) {
7553
7553
  if (Array.isArray(arr)) return _array_like_to_array$C(arr);
7554
7554
  }
7555
- function _define_property$u(obj, key, value) {
7555
+ function _define_property$v(obj, key, value) {
7556
7556
  if (key in obj) {
7557
7557
  Object.defineProperty(obj, key, {
7558
7558
  value: value,
@@ -7598,7 +7598,7 @@ function _non_iterable_rest$z() {
7598
7598
  function _non_iterable_spread$f() {
7599
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.");
7600
7600
  }
7601
- function _object_spread$q(target) {
7601
+ function _object_spread$r(target) {
7602
7602
  for(var i = 1; i < arguments.length; i++){
7603
7603
  var source = arguments[i] != null ? arguments[i] : {};
7604
7604
  var ownKeys = Object.keys(source);
@@ -7608,7 +7608,7 @@ function _object_spread$q(target) {
7608
7608
  }));
7609
7609
  }
7610
7610
  ownKeys.forEach(function(key) {
7611
- _define_property$u(target, key, source[key]);
7611
+ _define_property$v(target, key, source[key]);
7612
7612
  });
7613
7613
  }
7614
7614
  return target;
@@ -7689,7 +7689,7 @@ function createSceneStateFromRecovery(recovery) {
7689
7689
  object
7690
7690
  ];
7691
7691
  }));
7692
- var nextState = _object_spread_props$m(_object_spread$q({}, initialState), {
7692
+ var nextState = _object_spread_props$m(_object_spread$r({}, initialState), {
7693
7693
  appliedOperationIds: new Set(recovery.settledOperationIds),
7694
7694
  headRevision: recovery.bootstrap.headRevision,
7695
7695
  recoveredObjects: recoveredObjects
@@ -7718,7 +7718,7 @@ function createSceneStateFromRecovery(recovery) {
7718
7718
  }
7719
7719
  }
7720
7720
  }
7721
- nextState = _object_spread_props$m(_object_spread$q({}, nextState), {
7721
+ nextState = _object_spread_props$m(_object_spread$r({}, nextState), {
7722
7722
  appliedOperationIds: new Set(nextState.appliedOperationIds),
7723
7723
  headRevision: Math.max(nextState.headRevision, delta.headRevision),
7724
7724
  recoveredObjects: new Map(nextState.recoveredObjects)
@@ -7959,7 +7959,7 @@ function getOptimisticTail(state, operationId) {
7959
7959
  });
7960
7960
  }
7961
7961
  function cloneState(state) {
7962
- return _object_spread_props$m(_object_spread$q({}, state), {
7962
+ return _object_spread_props$m(_object_spread$r({}, state), {
7963
7963
  appliedOperationIds: new Set(state.appliedOperationIds),
7964
7964
  optimisticOperationIds: _to_consumable_array$f(state.optimisticOperationIds),
7965
7965
  optimisticOperations: new Map(state.optimisticOperations),
@@ -8009,10 +8009,10 @@ function getAnnotationSceneObject(value) {
8009
8009
  return isWhiteboardAnnotationSceneObject(value) ? value : undefined;
8010
8010
  }
8011
8011
  function getSceneObject(value, revision) {
8012
- if (isWhiteboardAnnotationSceneObject(value)) return _object_spread_props$m(_object_spread$q({}, value), {
8012
+ if (isWhiteboardAnnotationSceneObject(value)) return _object_spread_props$m(_object_spread$r({}, value), {
8013
8013
  latestRevision: revision || value.latestRevision
8014
8014
  });
8015
- if (isAnnotationObjectInput(value)) return _object_spread_props$m(_object_spread$q({}, value), {
8015
+ if (isAnnotationObjectInput(value)) return _object_spread_props$m(_object_spread$r({}, value), {
8016
8016
  latestRevision: revision
8017
8017
  });
8018
8018
  return undefined;
@@ -8021,7 +8021,7 @@ function isAnnotationObjectInput(value) {
8021
8021
  return (typeof value === "undefined" ? "undefined" : _type_of$h(value)) === 'object' && value !== null && typeof value.objectId === 'string' && (value.objectType === 'annotation.stroke' || value.objectType === 'annotation.shape');
8022
8022
  }
8023
8023
 
8024
- function _define_property$t(obj, key, value) {
8024
+ function _define_property$u(obj, key, value) {
8025
8025
  if (key in obj) {
8026
8026
  Object.defineProperty(obj, key, {
8027
8027
  value: value,
@@ -8110,7 +8110,7 @@ var WhiteboardColorPopover = /*#__PURE__*/ forwardRef(function WhiteboardColorPo
8110
8110
  onClick: function() {
8111
8111
  return onColorChange === null || onColorChange === void 0 ? void 0 : onColorChange(entry.color);
8112
8112
  },
8113
- style: _define_property$t({}, '--whiteboard-color', entry.color),
8113
+ style: _define_property$u({}, '--whiteboard-color', entry.color),
8114
8114
  title: entry.tooltip,
8115
8115
  type: "button",
8116
8116
  children: /*#__PURE__*/ jsx("span", {
@@ -8708,7 +8708,7 @@ function _array_with_holes$y(arr) {
8708
8708
  function _array_without_holes$e(arr) {
8709
8709
  if (Array.isArray(arr)) return _array_like_to_array$B(arr);
8710
8710
  }
8711
- function _define_property$s(obj, key, value) {
8711
+ function _define_property$t(obj, key, value) {
8712
8712
  if (key in obj) {
8713
8713
  Object.defineProperty(obj, key, {
8714
8714
  value: value,
@@ -8754,7 +8754,7 @@ function _non_iterable_rest$y() {
8754
8754
  function _non_iterable_spread$e() {
8755
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.");
8756
8756
  }
8757
- function _object_spread$p(target) {
8757
+ function _object_spread$q(target) {
8758
8758
  for(var i = 1; i < arguments.length; i++){
8759
8759
  var source = arguments[i] != null ? arguments[i] : {};
8760
8760
  var ownKeys = Object.keys(source);
@@ -8764,7 +8764,7 @@ function _object_spread$p(target) {
8764
8764
  }));
8765
8765
  }
8766
8766
  ownKeys.forEach(function(key) {
8767
- _define_property$s(target, key, source[key]);
8767
+ _define_property$t(target, key, source[key]);
8768
8768
  });
8769
8769
  }
8770
8770
  return target;
@@ -8951,9 +8951,9 @@ function useWhiteboardToolbarLayout() {
8951
8951
  var toolbarSize = layout.orientation === 'vertical' ? WHITEBOARD_TOOLBAR_SIZE.vertical : WHITEBOARD_TOOLBAR_SIZE.horizontal;
8952
8952
  var popoverSize = WHITEBOARD_POPOVER_SIZES[popover];
8953
8953
  var side = getPopoverSide(layout.dock, layout.position, toolbarSize, popoverSize, viewport);
8954
- var fallbackAnchorPosition = popover === 'color' ? layout.orientation === 'vertical' ? _object_spread_props$l(_object_spread$p({}, layout.position), {
8954
+ var fallbackAnchorPosition = popover === 'color' ? layout.orientation === 'vertical' ? _object_spread_props$l(_object_spread$q({}, layout.position), {
8955
8955
  top: layout.position.top + WHITEBOARD_COLOR_BUTTON_OFFSET
8956
- }) : _object_spread_props$l(_object_spread$p({}, layout.position), {
8956
+ }) : _object_spread_props$l(_object_spread$q({}, layout.position), {
8957
8957
  left: layout.position.left + WHITEBOARD_COLOR_BUTTON_OFFSET
8958
8958
  }) : layout.position;
8959
8959
  return {
@@ -9022,7 +9022,7 @@ function getDroppedToolbarLayout(position, viewport, preferredDropDock, dragPosi
9022
9022
  if (!outsideDock) return getToolbarLayout(position, viewport);
9023
9023
  var dockOrientation = outsideDock === 'left' || outsideDock === 'right' ? 'vertical' : 'horizontal';
9024
9024
  var size = WHITEBOARD_TOOLBAR_SIZE[dockOrientation];
9025
- var snapPosition = outsideDock === 'top' || outsideDock === 'bottom' ? _object_spread_props$l(_object_spread$p({}, position), {
9025
+ var snapPosition = outsideDock === 'top' || outsideDock === 'bottom' ? _object_spread_props$l(_object_spread$q({}, position), {
9026
9026
  left: (_ref = dragPosition === null || dragPosition === void 0 ? void 0 : dragPosition.left) !== null && _ref !== void 0 ? _ref : position.left
9027
9027
  }) : position;
9028
9028
  return {
@@ -9078,18 +9078,18 @@ function getOutsideDock(position, orientation, viewport) {
9078
9078
  }
9079
9079
  function snapAndClampPosition(position, dock, size, viewport) {
9080
9080
  var clampedPosition = clampPosition(position, size, viewport);
9081
- if (dock === 'left') return _object_spread_props$l(_object_spread$p({}, clampedPosition), {
9081
+ if (dock === 'left') return _object_spread_props$l(_object_spread$q({}, clampedPosition), {
9082
9082
  left: viewport.left + WHITEBOARD_VIEWPORT_PADDING
9083
9083
  });
9084
9084
  if (dock === 'right') {
9085
- return _object_spread_props$l(_object_spread$p({}, clampedPosition), {
9085
+ return _object_spread_props$l(_object_spread$q({}, clampedPosition), {
9086
9086
  left: viewport.left + viewport.width - WHITEBOARD_VIEWPORT_PADDING - size.width
9087
9087
  });
9088
9088
  }
9089
- if (dock === 'top') return _object_spread_props$l(_object_spread$p({}, clampedPosition), {
9089
+ if (dock === 'top') return _object_spread_props$l(_object_spread$q({}, clampedPosition), {
9090
9090
  top: viewport.top + WHITEBOARD_VIEWPORT_PADDING
9091
9091
  });
9092
- return _object_spread_props$l(_object_spread$p({}, clampedPosition), {
9092
+ return _object_spread_props$l(_object_spread$q({}, clampedPosition), {
9093
9093
  top: viewport.top + viewport.height - WHITEBOARD_VIEWPORT_PADDING - size.height
9094
9094
  });
9095
9095
  }
@@ -9262,7 +9262,7 @@ function _array_like_to_array$A(arr, len) {
9262
9262
  function _array_with_holes$x(arr) {
9263
9263
  if (Array.isArray(arr)) return arr;
9264
9264
  }
9265
- function _define_property$r(obj, key, value) {
9265
+ function _define_property$s(obj, key, value) {
9266
9266
  if (key in obj) {
9267
9267
  Object.defineProperty(obj, key, {
9268
9268
  value: value,
@@ -9302,7 +9302,7 @@ function _iterable_to_array_limit$x(arr, i) {
9302
9302
  function _non_iterable_rest$x() {
9303
9303
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
9304
9304
  }
9305
- function _object_spread$o(target) {
9305
+ function _object_spread$p(target) {
9306
9306
  for(var i = 1; i < arguments.length; i++){
9307
9307
  var source = arguments[i] != null ? arguments[i] : {};
9308
9308
  var ownKeys = Object.keys(source);
@@ -9312,7 +9312,7 @@ function _object_spread$o(target) {
9312
9312
  }));
9313
9313
  }
9314
9314
  ownKeys.forEach(function(key) {
9315
- _define_property$r(target, key, source[key]);
9315
+ _define_property$s(target, key, source[key]);
9316
9316
  });
9317
9317
  }
9318
9318
  return target;
@@ -9368,7 +9368,7 @@ function WhiteboardToolbar(param) {
9368
9368
  var toPortalStyle = function(style) {
9369
9369
  if (!portalContainer) return style;
9370
9370
  var bounds = portalContainer.getBoundingClientRect();
9371
- return _object_spread_props$k(_object_spread$o({}, style), {
9371
+ return _object_spread_props$k(_object_spread$p({}, style), {
9372
9372
  left: typeof style.left === 'number' ? style.left - bounds.left : style.left,
9373
9373
  position: 'absolute',
9374
9374
  top: typeof style.top === 'number' ? style.top - bounds.top : style.top
@@ -9562,7 +9562,7 @@ function WhiteboardToolbar(param) {
9562
9562
  /*#__PURE__*/ jsx("span", {
9563
9563
  "aria-hidden": "true",
9564
9564
  className: "whiteboard-react-toolbar__button-swatch",
9565
- style: _define_property$r({}, '--whiteboard-color', activeColor)
9565
+ style: _define_property$s({}, '--whiteboard-color', activeColor)
9566
9566
  })
9567
9567
  ]
9568
9568
  }),
@@ -9993,7 +9993,7 @@ function _async_to_generator$p(fn) {
9993
9993
  });
9994
9994
  };
9995
9995
  }
9996
- function _define_property$q(obj, key, value) {
9996
+ function _define_property$r(obj, key, value) {
9997
9997
  if (key in obj) {
9998
9998
  Object.defineProperty(obj, key, {
9999
9999
  value: value,
@@ -10039,7 +10039,7 @@ function _non_iterable_rest$v() {
10039
10039
  function _non_iterable_spread$d() {
10040
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.");
10041
10041
  }
10042
- function _object_spread$n(target) {
10042
+ function _object_spread$o(target) {
10043
10043
  for(var i = 1; i < arguments.length; i++){
10044
10044
  var source = arguments[i] != null ? arguments[i] : {};
10045
10045
  var ownKeys = Object.keys(source);
@@ -10049,7 +10049,7 @@ function _object_spread$n(target) {
10049
10049
  }));
10050
10050
  }
10051
10051
  ownKeys.forEach(function(key) {
10052
- _define_property$q(target, key, source[key]);
10052
+ _define_property$r(target, key, source[key]);
10053
10053
  });
10054
10054
  }
10055
10055
  return target;
@@ -10795,28 +10795,28 @@ function appendPointToDraftObject(object, point) {
10795
10795
  }
10796
10796
  function freezeDraftObject(object) {
10797
10797
  if (object.objectType === 'annotation.stroke') {
10798
- return _object_spread_props$j(_object_spread$n({}, object), {
10799
- payload: _object_spread_props$j(_object_spread$n({}, object.payload), {
10798
+ return _object_spread_props$j(_object_spread$o({}, object), {
10799
+ payload: _object_spread_props$j(_object_spread$o({}, object.payload), {
10800
10800
  points: _to_consumable_array$d(object.payload.points)
10801
10801
  })
10802
10802
  });
10803
10803
  }
10804
- return _object_spread_props$j(_object_spread$n({}, object), {
10805
- payload: _object_spread$n({}, object.payload)
10804
+ return _object_spread_props$j(_object_spread$o({}, object), {
10805
+ payload: _object_spread$o({}, object.payload)
10806
10806
  });
10807
10807
  }
10808
10808
  function createLocalMarkerExpiry(object) {
10809
10809
  if (object.objectType !== 'annotation.stroke' || object.payload.kind !== 'marker') return object;
10810
- return _object_spread_props$j(_object_spread$n({}, object), {
10811
- payload: _object_spread_props$j(_object_spread$n({}, object.payload), {
10810
+ return _object_spread_props$j(_object_spread$o({}, object), {
10811
+ payload: _object_spread_props$j(_object_spread$o({}, object.payload), {
10812
10812
  vanishAt: new Date(Date.now() + 1000).toISOString()
10813
10813
  })
10814
10814
  });
10815
10815
  }
10816
10816
  function applyLocalMarkerExpiry(object, localVanishAt) {
10817
10817
  if (!localVanishAt || object.objectType !== 'annotation.stroke' || object.payload.kind !== 'marker') return object;
10818
- return _object_spread_props$j(_object_spread$n({}, object), {
10819
- payload: _object_spread_props$j(_object_spread$n({}, object.payload), {
10818
+ return _object_spread_props$j(_object_spread$o({}, object), {
10819
+ payload: _object_spread_props$j(_object_spread$o({}, object.payload), {
10820
10820
  vanishAt: localVanishAt
10821
10821
  })
10822
10822
  });
@@ -10861,7 +10861,7 @@ function withoutLocalMarkerExpiry(object) {
10861
10861
  var _object_payload = object.payload; _object_payload.vanishAt; var payload = _object_without_properties$5(_object_payload, [
10862
10862
  "vanishAt"
10863
10863
  ]);
10864
- return _object_spread_props$j(_object_spread$n({}, object), {
10864
+ return _object_spread_props$j(_object_spread$o({}, object), {
10865
10865
  payload: payload
10866
10866
  });
10867
10867
  }
@@ -11192,7 +11192,7 @@ function _async_to_generator$o(fn) {
11192
11192
  });
11193
11193
  };
11194
11194
  }
11195
- function _define_property$p(obj, key, value) {
11195
+ function _define_property$q(obj, key, value) {
11196
11196
  if (key in obj) {
11197
11197
  Object.defineProperty(obj, key, {
11198
11198
  value: value,
@@ -11238,7 +11238,7 @@ function _non_iterable_rest$t() {
11238
11238
  function _non_iterable_spread$c() {
11239
11239
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
11240
11240
  }
11241
- function _object_spread$m(target) {
11241
+ function _object_spread$n(target) {
11242
11242
  for(var i = 1; i < arguments.length; i++){
11243
11243
  var source = arguments[i] != null ? arguments[i] : {};
11244
11244
  var ownKeys = Object.keys(source);
@@ -11248,7 +11248,7 @@ function _object_spread$m(target) {
11248
11248
  }));
11249
11249
  }
11250
11250
  ownKeys.forEach(function(key) {
11251
- _define_property$p(target, key, source[key]);
11251
+ _define_property$q(target, key, source[key]);
11252
11252
  });
11253
11253
  }
11254
11254
  return target;
@@ -11434,7 +11434,7 @@ function createWhiteboardRuntime() {
11434
11434
  (_options_onBoardStateChange = options.onBoardStateChange) === null || _options_onBoardStateChange === void 0 ? void 0 : _options_onBoardStateChange.call(options, nextBoardState);
11435
11435
  };
11436
11436
  var patchBoardState = function(patch) {
11437
- publishBoardState(_object_spread$m({}, boardState, patch));
11437
+ publishBoardState(_object_spread$n({}, boardState, patch));
11438
11438
  };
11439
11439
  var confirmRevision = function(revision) {
11440
11440
  if (!Number.isFinite(revision)) return;
@@ -11448,7 +11448,7 @@ function createWhiteboardRuntime() {
11448
11448
  (_options_onSubmitStatusChange = options.onSubmitStatusChange) === null || _options_onSubmitStatusChange === void 0 ? void 0 : _options_onSubmitStatusChange.call(options, status);
11449
11449
  };
11450
11450
  var resetBoardState = function(shareSessionKey) {
11451
- publishBoardState(_object_spread_props$i(_object_spread$m({}, EMPTY_BOARD_STATE), {
11451
+ publishBoardState(_object_spread_props$i(_object_spread$n({}, EMPTY_BOARD_STATE), {
11452
11452
  activeShareSessionKey: shareSessionKey
11453
11453
  }));
11454
11454
  };
@@ -11574,7 +11574,7 @@ function createWhiteboardRuntime() {
11574
11574
  }
11575
11575
  appliedRevision = event.revision;
11576
11576
  confirmRevision(event.revision);
11577
- (_options_onCommittedEvent = options.onCommittedEvent) === null || _options_onCommittedEvent === void 0 ? void 0 : _options_onCommittedEvent.call(options, _object_spread_props$i(_object_spread$m({}, event), {
11577
+ (_options_onCommittedEvent = options.onCommittedEvent) === null || _options_onCommittedEvent === void 0 ? void 0 : _options_onCommittedEvent.call(options, _object_spread_props$i(_object_spread$n({}, event), {
11578
11578
  reconcileStrategy: 'replayable'
11579
11579
  }));
11580
11580
  };
@@ -11630,7 +11630,7 @@ function createWhiteboardRuntime() {
11630
11630
  onSubmitAck: function(diagnostic) {
11631
11631
  var _options_onDiagnostic;
11632
11632
  publishSubmitStatus(IDLE_SUBMIT_STATUS);
11633
- (_options_onDiagnostic = options.onDiagnostic) === null || _options_onDiagnostic === void 0 ? void 0 : _options_onDiagnostic.call(options, _object_spread$m({
11633
+ (_options_onDiagnostic = options.onDiagnostic) === null || _options_onDiagnostic === void 0 ? void 0 : _options_onDiagnostic.call(options, _object_spread$n({
11634
11634
  type: 'submit_ack'
11635
11635
  }, diagnostic));
11636
11636
  },
@@ -12529,7 +12529,7 @@ function foldOperationsIntoRecoverySnapshot(bootstrap, update) {
12529
12529
  var _item_operation_payload;
12530
12530
  var object = (_item_operation_payload = item.operation.payload) === null || _item_operation_payload === void 0 ? void 0 : _item_operation_payload.object;
12531
12531
  if (isWhiteboardAnnotationSceneObject(object)) {
12532
- objects.set(object.objectId, _object_spread_props$i(_object_spread$m({}, object), {
12532
+ objects.set(object.objectId, _object_spread_props$i(_object_spread$n({}, object), {
12533
12533
  latestRevision: item.revision
12534
12534
  }));
12535
12535
  }
@@ -12579,7 +12579,7 @@ function foldOperationsIntoRecoverySnapshot(bootstrap, update) {
12579
12579
  }
12580
12580
  }
12581
12581
  }
12582
- return _object_spread_props$i(_object_spread$m({}, bootstrap), {
12582
+ return _object_spread_props$i(_object_spread$n({}, bootstrap), {
12583
12583
  boardId: update.boardId,
12584
12584
  headRevision: update.toRevision,
12585
12585
  objects: sortRecoveryObjects(_to_consumable_array$c(objects.values()))
@@ -12887,7 +12887,7 @@ function _async_to_generator$n(fn) {
12887
12887
  });
12888
12888
  };
12889
12889
  }
12890
- function _define_property$o(obj, key, value) {
12890
+ function _define_property$p(obj, key, value) {
12891
12891
  if (key in obj) {
12892
12892
  Object.defineProperty(obj, key, {
12893
12893
  value: value,
@@ -12933,7 +12933,7 @@ function _non_iterable_rest$s() {
12933
12933
  function _non_iterable_spread$b() {
12934
12934
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
12935
12935
  }
12936
- function _object_spread$l(target) {
12936
+ function _object_spread$m(target) {
12937
12937
  for(var i = 1; i < arguments.length; i++){
12938
12938
  var source = arguments[i] != null ? arguments[i] : {};
12939
12939
  var ownKeys = Object.keys(source);
@@ -12943,7 +12943,7 @@ function _object_spread$l(target) {
12943
12943
  }));
12944
12944
  }
12945
12945
  ownKeys.forEach(function(key) {
12946
- _define_property$o(target, key, source[key]);
12946
+ _define_property$p(target, key, source[key]);
12947
12947
  });
12948
12948
  }
12949
12949
  return target;
@@ -13342,7 +13342,7 @@ function WhiteboardProvider(param) {
13342
13342
  setBoardState(function(currentBoardState) {
13343
13343
  var _ref;
13344
13344
  var _nextRecovery_deltas_;
13345
- return _object_spread_props$h(_object_spread$l({}, currentBoardState), {
13345
+ return _object_spread_props$h(_object_spread$m({}, currentBoardState), {
13346
13346
  activeShareSessionKey: currentShareSessionKey,
13347
13347
  boardId: nextRecovery.bootstrap.boardId,
13348
13348
  headRevision: Math.max(currentBoardState.headRevision, (_ref = (_nextRecovery_deltas_ = nextRecovery.deltas[nextRecovery.deltas.length - 1]) === null || _nextRecovery_deltas_ === void 0 ? void 0 : _nextRecovery_deltas_.headRevision) !== null && _ref !== void 0 ? _ref : nextRecovery.bootstrap.headRevision)
@@ -13486,7 +13486,7 @@ function _array_like_to_array$u(arr, len) {
13486
13486
  function _array_without_holes$a(arr) {
13487
13487
  if (Array.isArray(arr)) return _array_like_to_array$u(arr);
13488
13488
  }
13489
- function _define_property$n(obj, key, value) {
13489
+ function _define_property$o(obj, key, value) {
13490
13490
  if (key in obj) {
13491
13491
  Object.defineProperty(obj, key, {
13492
13492
  value: value,
@@ -13505,7 +13505,7 @@ function _iterable_to_array$a(iter) {
13505
13505
  function _non_iterable_spread$a() {
13506
13506
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
13507
13507
  }
13508
- function _object_spread$k(target) {
13508
+ function _object_spread$l(target) {
13509
13509
  for(var i = 1; i < arguments.length; i++){
13510
13510
  var source = arguments[i] != null ? arguments[i] : {};
13511
13511
  var ownKeys = Object.keys(source);
@@ -13515,7 +13515,7 @@ function _object_spread$k(target) {
13515
13515
  }));
13516
13516
  }
13517
13517
  ownKeys.forEach(function(key) {
13518
- _define_property$n(target, key, source[key]);
13518
+ _define_property$o(target, key, source[key]);
13519
13519
  });
13520
13520
  }
13521
13521
  return target;
@@ -13565,7 +13565,7 @@ function toChatProviderProps(integration) {
13565
13565
  refreshToken: integration.refreshToken,
13566
13566
  refreshTokenExpiresAt: integration.refreshTokenExpiresAt,
13567
13567
  rooms: integration.rooms.map(function(room) {
13568
- return _object_spread_props$g(_object_spread$k({}, room), {
13568
+ return _object_spread_props$g(_object_spread$l({}, room), {
13569
13569
  permissions: _to_consumable_array$a(room.permissions)
13570
13570
  });
13571
13571
  }),
@@ -13702,7 +13702,7 @@ function _construct$3(Parent, args, Class) {
13702
13702
  }
13703
13703
  return _construct$3.apply(null, arguments);
13704
13704
  }
13705
- function _define_property$m(obj, key, value) {
13705
+ function _define_property$n(obj, key, value) {
13706
13706
  if (key in obj) {
13707
13707
  Object.defineProperty(obj, key, {
13708
13708
  value: value,
@@ -13777,7 +13777,7 @@ function _non_iterable_rest$r() {
13777
13777
  function _non_iterable_spread$9() {
13778
13778
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
13779
13779
  }
13780
- function _object_spread$j(target) {
13780
+ function _object_spread$k(target) {
13781
13781
  for(var i = 1; i < arguments.length; i++){
13782
13782
  var source = arguments[i] != null ? arguments[i] : {};
13783
13783
  var ownKeys = Object.keys(source);
@@ -13787,7 +13787,7 @@ function _object_spread$j(target) {
13787
13787
  }));
13788
13788
  }
13789
13789
  ownKeys.forEach(function(key) {
13790
- _define_property$m(target, key, source[key]);
13790
+ _define_property$n(target, key, source[key]);
13791
13791
  });
13792
13792
  }
13793
13793
  return target;
@@ -13990,7 +13990,7 @@ var isRoomPlatformDebugEnabled = function() {
13990
13990
  };
13991
13991
  var roomPlatformDebug = function(event, details) {
13992
13992
  if (!isRoomPlatformDebugEnabled()) return;
13993
- console.log("[room-platform-debug:".concat(event, "]"), _object_spread$j({
13993
+ console.log("[room-platform-debug:".concat(event, "]"), _object_spread$k({
13994
13994
  at: new Date().toISOString()
13995
13995
  }, details));
13996
13996
  };
@@ -14016,7 +14016,7 @@ var RoomPlatformGatewayError = /*#__PURE__*/ function(Error1) {
14016
14016
  var _ref;
14017
14017
  _this = _call_super$3(this, RoomPlatformGatewayError, [
14018
14018
  (_ref = message !== null && message !== void 0 ? message : code) !== null && _ref !== void 0 ? _ref : "ROOM_PLATFORM_GATEWAY_".concat(status)
14019
- ]), _define_property$m(_this, "code", void 0), _define_property$m(_this, "status", void 0), _this.code = code, _this.status = status;
14019
+ ]), _define_property$n(_this, "code", void 0), _define_property$n(_this, "status", void 0), _this.code = code, _this.status = status;
14020
14020
  return _this;
14021
14021
  }
14022
14022
  return RoomPlatformGatewayError;
@@ -14105,7 +14105,7 @@ var localMediaStateOf = function(room) {
14105
14105
  };
14106
14106
  };
14107
14107
  var effectiveLocalMediaStateOf = function(room, current) {
14108
- return _object_spread_props$f(_object_spread$j({}, localMediaStateOf(room)), {
14108
+ return _object_spread_props$f(_object_spread$k({}, localMediaStateOf(room)), {
14109
14109
  camera: isManagedParticipantRole(roleFromMetadata(room.localParticipant.metadata)) ? current.camera : room.localParticipant.isCameraEnabled
14110
14110
  });
14111
14111
  };
@@ -14195,7 +14195,7 @@ function RoomPlatformProvider(param) {
14195
14195
  }, []);
14196
14196
  var reportError = useCallback(function(nextError, classification) {
14197
14197
  var normalizedError = toError(nextError);
14198
- var event = _object_spread$j({
14198
+ var event = _object_spread$k({
14199
14199
  error: normalizedError
14200
14200
  }, classification);
14201
14201
  if (isMountedRef.current) {
@@ -14581,7 +14581,7 @@ function RoomPlatformProvider(param) {
14581
14581
  at: at,
14582
14582
  bytes: bytes
14583
14583
  });
14584
- roomPlatformDebug("stats.".concat(direction), _object_spread$j({
14584
+ roomPlatformDebug("stats.".concat(direction), _object_spread$k({
14585
14585
  bitrateKbps: bitrateKbps,
14586
14586
  bytes: bytes
14587
14587
  }, details));
@@ -14901,7 +14901,7 @@ function RoomPlatformProvider(param) {
14901
14901
  if (isMountedRef.current) {
14902
14902
  setLocalCameraTrack(null);
14903
14903
  setLocalMedia(function(current) {
14904
- return _object_spread_props$f(_object_spread$j({}, current), {
14904
+ return _object_spread_props$f(_object_spread$k({}, current), {
14905
14905
  camera: false
14906
14906
  });
14907
14907
  });
@@ -15086,7 +15086,7 @@ function RoomPlatformProvider(param) {
15086
15086
  case 7:
15087
15087
  if (!retainForPreview) removeCanonicalCameraTrack(track, !wasPublished);
15088
15088
  else if (isMountedRef.current) setLocalMedia(function(current) {
15089
- return _object_spread_props$f(_object_spread$j({}, current), {
15089
+ return _object_spread_props$f(_object_spread$k({}, current), {
15090
15090
  camera: false
15091
15091
  });
15092
15092
  });
@@ -15139,7 +15139,7 @@ function RoomPlatformProvider(param) {
15139
15139
  managedCameraEnabled = _state.sent();
15140
15140
  if (isMountedRef.current && managedCameraEnabled !== undefined) {
15141
15141
  setLocalMedia(function(current) {
15142
- return _object_spread_props$f(_object_spread$j({}, current), {
15142
+ return _object_spread_props$f(_object_spread$k({}, current), {
15143
15143
  camera: managedCameraEnabled
15144
15144
  });
15145
15145
  });
@@ -15191,7 +15191,7 @@ function RoomPlatformProvider(param) {
15191
15191
  _state.sent();
15192
15192
  if (!canRetainForPreview) removeCanonicalCameraTrack(track, !wasPublished);
15193
15193
  else if (isMountedRef.current) setLocalMedia(function(current) {
15194
- return _object_spread_props$f(_object_spread$j({}, current), {
15194
+ return _object_spread_props$f(_object_spread$k({}, current), {
15195
15195
  camera: false
15196
15196
  });
15197
15197
  });
@@ -15207,7 +15207,7 @@ function RoomPlatformProvider(param) {
15207
15207
  managedCameraEnabled1 = _state.sent();
15208
15208
  if (isMountedRef.current) {
15209
15209
  setLocalMedia(function(current) {
15210
- return _object_spread_props$f(_object_spread$j({}, current), {
15210
+ return _object_spread_props$f(_object_spread$k({}, current), {
15211
15211
  camera: managedCameraEnabled1 !== null && managedCameraEnabled1 !== void 0 ? managedCameraEnabled1 : true
15212
15212
  });
15213
15213
  });
@@ -15219,7 +15219,7 @@ function RoomPlatformProvider(param) {
15219
15219
  case 10:
15220
15220
  publishError = _state.sent();
15221
15221
  if (isMountedRef.current) setLocalMedia(function(current) {
15222
- return _object_spread_props$f(_object_spread$j({}, current), {
15222
+ return _object_spread_props$f(_object_spread$k({}, current), {
15223
15223
  camera: false
15224
15224
  });
15225
15225
  });
@@ -15608,7 +15608,7 @@ function RoomPlatformProvider(param) {
15608
15608
  activeDeviceChanged: function(kind, deviceId) {
15609
15609
  if (isMountedRef.current && !connection.disposed) {
15610
15610
  setActiveDevices(function(current) {
15611
- return _object_spread_props$f(_object_spread$j({}, current), _define_property$m({}, kind, deviceId));
15611
+ return _object_spread_props$f(_object_spread$k({}, current), _define_property$n({}, kind, deviceId));
15612
15612
  });
15613
15613
  }
15614
15614
  },
@@ -16403,13 +16403,13 @@ function RoomPlatformProvider(param) {
16403
16403
  room: connection.room,
16404
16404
  suppressed: false
16405
16405
  };
16406
- privateMediaSnapshotRef.current = _object_spread_props$f(_object_spread$j({}, snapshot), {
16406
+ privateMediaSnapshotRef.current = _object_spread_props$f(_object_spread$k({}, snapshot), {
16407
16407
  microphoneEnabled: enabled
16408
16408
  });
16409
16409
  }
16410
16410
  clearMediaError();
16411
16411
  if (isMountedRef.current && !connection.disposed) setLocalMedia(function(current) {
16412
- return _object_spread_props$f(_object_spread$j({}, current), _define_property$m({}, kind, enabled));
16412
+ return _object_spread_props$f(_object_spread$k({}, current), _define_property$n({}, kind, enabled));
16413
16413
  });
16414
16414
  return [
16415
16415
  2
@@ -16472,7 +16472,7 @@ function RoomPlatformProvider(param) {
16472
16472
  privateRoomId: privateRoom.id,
16473
16473
  room: room,
16474
16474
  suppressed: true
16475
- } : _object_spread_props$f(_object_spread$j({}, snapshot), {
16475
+ } : _object_spread_props$f(_object_spread$k({}, snapshot), {
16476
16476
  suppressed: true
16477
16477
  });
16478
16478
  void Promise.allSettled([
@@ -16693,7 +16693,7 @@ function RoomPlatformProvider(param) {
16693
16693
  managedCameraEnabled = _state.sent();
16694
16694
  if (isMountedRef.current && managedCameraEnabled !== undefined) {
16695
16695
  setLocalMedia(function(current) {
16696
- return _object_spread_props$f(_object_spread$j({}, current), {
16696
+ return _object_spread_props$f(_object_spread$k({}, current), {
16697
16697
  camera: managedCameraEnabled
16698
16698
  });
16699
16699
  });
@@ -16711,7 +16711,7 @@ function RoomPlatformProvider(param) {
16711
16711
  clearMediaError();
16712
16712
  if (isMountedRef.current && !connection.disposed) {
16713
16713
  setActiveDevices(function(current) {
16714
- return _object_spread_props$f(_object_spread$j({}, current), _define_property$m({}, kind, deviceId));
16714
+ return _object_spread_props$f(_object_spread$k({}, current), _define_property$n({}, kind, deviceId));
16715
16715
  });
16716
16716
  }
16717
16717
  return [
@@ -17656,7 +17656,7 @@ function RoomParticipantActions(param) {
17656
17656
  });
17657
17657
  }
17658
17658
 
17659
- function _define_property$l(obj, key, value) {
17659
+ function _define_property$m(obj, key, value) {
17660
17660
  if (key in obj) {
17661
17661
  Object.defineProperty(obj, key, {
17662
17662
  value: value,
@@ -17669,7 +17669,7 @@ function _define_property$l(obj, key, value) {
17669
17669
  }
17670
17670
  return obj;
17671
17671
  }
17672
- function _object_spread$i(target) {
17672
+ function _object_spread$j(target) {
17673
17673
  for(var i = 1; i < arguments.length; i++){
17674
17674
  var source = arguments[i] != null ? arguments[i] : {};
17675
17675
  var ownKeys = Object.keys(source);
@@ -17679,7 +17679,7 @@ function _object_spread$i(target) {
17679
17679
  }));
17680
17680
  }
17681
17681
  ownKeys.forEach(function(key) {
17682
- _define_property$l(target, key, source[key]);
17682
+ _define_property$m(target, key, source[key]);
17683
17683
  });
17684
17684
  }
17685
17685
  return target;
@@ -17760,7 +17760,7 @@ function RoomParticipantList(param) {
17760
17760
  className: "room-platform-participant-row-trailing",
17761
17761
  children: [
17762
17762
  Supplement ? /*#__PURE__*/ jsx(RoomPlatformSurfaceBoundary, {
17763
- children: /*#__PURE__*/ jsx(Supplement, _object_spread_props$e(_object_spread$i({}, extensionProps), {
17763
+ children: /*#__PURE__*/ jsx(Supplement, _object_spread_props$e(_object_spread$j({}, extensionProps), {
17764
17764
  participant: participant,
17765
17765
  presence: presence
17766
17766
  }))
@@ -17811,7 +17811,7 @@ function RoomParticipantTab(param) {
17811
17811
  });
17812
17812
  }
17813
17813
 
17814
- function _define_property$k(obj, key, value) {
17814
+ function _define_property$l(obj, key, value) {
17815
17815
  if (key in obj) {
17816
17816
  Object.defineProperty(obj, key, {
17817
17817
  value: value,
@@ -17824,7 +17824,7 @@ function _define_property$k(obj, key, value) {
17824
17824
  }
17825
17825
  return obj;
17826
17826
  }
17827
- function _object_spread$h(target) {
17827
+ function _object_spread$i(target) {
17828
17828
  for(var i = 1; i < arguments.length; i++){
17829
17829
  var source = arguments[i] != null ? arguments[i] : {};
17830
17830
  var ownKeys = Object.keys(source);
@@ -17834,7 +17834,7 @@ function _object_spread$h(target) {
17834
17834
  }));
17835
17835
  }
17836
17836
  ownKeys.forEach(function(key) {
17837
- _define_property$k(target, key, source[key]);
17837
+ _define_property$l(target, key, source[key]);
17838
17838
  });
17839
17839
  }
17840
17840
  return target;
@@ -17906,7 +17906,7 @@ function RoomActionButton(_0) {
17906
17906
  "state"
17907
17907
  ]);
17908
17908
  var isPending = state.status === 'pending';
17909
- return /*#__PURE__*/ jsx(Button$1, _object_spread_props$d(_object_spread$h({}, props), {
17909
+ return /*#__PURE__*/ jsx(Button$1, _object_spread_props$d(_object_spread$i({}, props), {
17910
17910
  "aria-label": getRoomActionAccessibleLabel(state),
17911
17911
  disabled: !isRoomActionInteractive(state),
17912
17912
  children: isPending ? /*#__PURE__*/ jsx(Spinner, {
@@ -19159,7 +19159,7 @@ function _async_to_generator$j(fn) {
19159
19159
  });
19160
19160
  };
19161
19161
  }
19162
- function _define_property$j(obj, key, value) {
19162
+ function _define_property$k(obj, key, value) {
19163
19163
  if (key in obj) {
19164
19164
  Object.defineProperty(obj, key, {
19165
19165
  value: value,
@@ -19199,7 +19199,7 @@ function _iterable_to_array_limit$k(arr, i) {
19199
19199
  function _non_iterable_rest$k() {
19200
19200
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
19201
19201
  }
19202
- function _object_spread$g(target) {
19202
+ function _object_spread$h(target) {
19203
19203
  for(var i = 1; i < arguments.length; i++){
19204
19204
  var source = arguments[i] != null ? arguments[i] : {};
19205
19205
  var ownKeys = Object.keys(source);
@@ -19209,7 +19209,7 @@ function _object_spread$g(target) {
19209
19209
  }));
19210
19210
  }
19211
19211
  ownKeys.forEach(function(key) {
19212
- _define_property$j(target, key, source[key]);
19212
+ _define_property$k(target, key, source[key]);
19213
19213
  });
19214
19214
  }
19215
19215
  return target;
@@ -19410,7 +19410,7 @@ function IconTooltipButton$1(_0) {
19410
19410
  children: [
19411
19411
  /*#__PURE__*/ jsx(TooltipTrigger, {
19412
19412
  asChild: true,
19413
- children: /*#__PURE__*/ jsx(Button$1, _object_spread_props$c(_object_spread$g({
19413
+ children: /*#__PURE__*/ jsx(Button$1, _object_spread_props$c(_object_spread$h({
19414
19414
  "aria-label": label,
19415
19415
  title: label
19416
19416
  }, props), {
@@ -20050,7 +20050,7 @@ function RoomPlatformMediaRuntime(param) {
20050
20050
  });
20051
20051
  }
20052
20052
 
20053
- function _define_property$i(obj, key, value) {
20053
+ function _define_property$j(obj, key, value) {
20054
20054
  if (key in obj) {
20055
20055
  Object.defineProperty(obj, key, {
20056
20056
  value: value,
@@ -20063,7 +20063,7 @@ function _define_property$i(obj, key, value) {
20063
20063
  }
20064
20064
  return obj;
20065
20065
  }
20066
- function _object_spread$f(target) {
20066
+ function _object_spread$g(target) {
20067
20067
  for(var i = 1; i < arguments.length; i++){
20068
20068
  var source = arguments[i] != null ? arguments[i] : {};
20069
20069
  var ownKeys = Object.keys(source);
@@ -20073,7 +20073,7 @@ function _object_spread$f(target) {
20073
20073
  }));
20074
20074
  }
20075
20075
  ownKeys.forEach(function(key) {
20076
- _define_property$i(target, key, source[key]);
20076
+ _define_property$j(target, key, source[key]);
20077
20077
  });
20078
20078
  }
20079
20079
  return target;
@@ -20126,7 +20126,7 @@ function RoomPlatformMonitorVideoTile(param) {
20126
20126
  }
20127
20127
  var monitorCameraVideoClassName = 'h-full w-full object-cover -scale-x-100';
20128
20128
  function RoomPlatformMonitorSidebarVideoTile(props) {
20129
- return /*#__PURE__*/ jsx(RoomPlatformMonitorVideoTile, _object_spread$f({}, props));
20129
+ return /*#__PURE__*/ jsx(RoomPlatformMonitorVideoTile, _object_spread$g({}, props));
20130
20130
  }
20131
20131
 
20132
20132
  function _array_like_to_array$k(arr, len) {
@@ -20930,7 +20930,7 @@ function _async_to_generator$h(fn) {
20930
20930
  });
20931
20931
  };
20932
20932
  }
20933
- function _define_property$h(obj, key, value) {
20933
+ function _define_property$i(obj, key, value) {
20934
20934
  if (key in obj) {
20935
20935
  Object.defineProperty(obj, key, {
20936
20936
  value: value,
@@ -20956,7 +20956,7 @@ function _iterable_to_array$7(iter) {
20956
20956
  function _non_iterable_spread$7() {
20957
20957
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
20958
20958
  }
20959
- function _object_spread$e(target) {
20959
+ function _object_spread$f(target) {
20960
20960
  for(var i = 1; i < arguments.length; i++){
20961
20961
  var source = arguments[i] != null ? arguments[i] : {};
20962
20962
  var ownKeys = Object.keys(source);
@@ -20966,7 +20966,7 @@ function _object_spread$e(target) {
20966
20966
  }));
20967
20967
  }
20968
20968
  ownKeys.forEach(function(key) {
20969
- _define_property$h(target, key, source[key]);
20969
+ _define_property$i(target, key, source[key]);
20970
20970
  });
20971
20971
  }
20972
20972
  return target;
@@ -21308,7 +21308,7 @@ var saveUploadGallery = function(gallery) {
21308
21308
  var normalizeSettings = function(value) {
21309
21309
  var mode = value.mode;
21310
21310
  if (mode !== 'none' && mode !== 'blur' && mode !== 'preset' && mode !== 'upload') {
21311
- return _object_spread_props$b(_object_spread$e({}, DEFAULT_ROOM_PLATFORM_CAMERA_BACKGROUND_SETTINGS), {
21311
+ return _object_spread_props$b(_object_spread$f({}, DEFAULT_ROOM_PLATFORM_CAMERA_BACKGROUND_SETTINGS), {
21312
21312
  updatedAt: nowIso()
21313
21313
  });
21314
21314
  }
@@ -21317,12 +21317,12 @@ var normalizeSettings = function(value) {
21317
21317
  var presetId = typeof value.presetId === 'string' ? value.presetId : undefined;
21318
21318
  var uploadAssetId = typeof value.uploadAssetId === 'string' ? value.uploadAssetId : undefined;
21319
21319
  if (mode === 'preset' && !presetId) {
21320
- return _object_spread_props$b(_object_spread$e({}, DEFAULT_ROOM_PLATFORM_CAMERA_BACKGROUND_SETTINGS), {
21320
+ return _object_spread_props$b(_object_spread$f({}, DEFAULT_ROOM_PLATFORM_CAMERA_BACKGROUND_SETTINGS), {
21321
21321
  updatedAt: nowIso()
21322
21322
  });
21323
21323
  }
21324
21324
  if (mode === 'upload' && !uploadAssetId) {
21325
- return _object_spread_props$b(_object_spread$e({}, DEFAULT_ROOM_PLATFORM_CAMERA_BACKGROUND_SETTINGS), {
21325
+ return _object_spread_props$b(_object_spread$f({}, DEFAULT_ROOM_PLATFORM_CAMERA_BACKGROUND_SETTINGS), {
21326
21326
  updatedAt: nowIso()
21327
21327
  });
21328
21328
  }
@@ -21354,19 +21354,19 @@ var normalizeUploadAsset = function(value) {
21354
21354
  };
21355
21355
  };
21356
21356
  var loadRoomPlatformCameraBackgroundSettings = function() {
21357
- if (typeof window === 'undefined') return _object_spread$e({}, DEFAULT_ROOM_PLATFORM_CAMERA_BACKGROUND_SETTINGS);
21357
+ if (typeof window === 'undefined') return _object_spread$f({}, DEFAULT_ROOM_PLATFORM_CAMERA_BACKGROUND_SETTINGS);
21358
21358
  try {
21359
21359
  var raw = window.localStorage.getItem(SETTINGS_KEY);
21360
- if (!raw) return _object_spread$e({}, DEFAULT_ROOM_PLATFORM_CAMERA_BACKGROUND_SETTINGS);
21360
+ if (!raw) return _object_spread$f({}, DEFAULT_ROOM_PLATFORM_CAMERA_BACKGROUND_SETTINGS);
21361
21361
  var parsed = JSON.parse(raw);
21362
- if (!isObject(parsed)) return _object_spread$e({}, DEFAULT_ROOM_PLATFORM_CAMERA_BACKGROUND_SETTINGS);
21362
+ if (!isObject(parsed)) return _object_spread$f({}, DEFAULT_ROOM_PLATFORM_CAMERA_BACKGROUND_SETTINGS);
21363
21363
  return normalizeSettings(parsed);
21364
21364
  } catch (unused) {
21365
- return _object_spread$e({}, DEFAULT_ROOM_PLATFORM_CAMERA_BACKGROUND_SETTINGS);
21365
+ return _object_spread$f({}, DEFAULT_ROOM_PLATFORM_CAMERA_BACKGROUND_SETTINGS);
21366
21366
  }
21367
21367
  };
21368
21368
  var saveRoomPlatformCameraBackgroundSettings = function(input) {
21369
- var settings = normalizeSettings(_object_spread_props$b(_object_spread$e({}, input), {
21369
+ var settings = normalizeSettings(_object_spread_props$b(_object_spread$f({}, input), {
21370
21370
  updatedAt: nowIso()
21371
21371
  }));
21372
21372
  if (typeof window !== 'undefined') {
@@ -21858,7 +21858,7 @@ function _async_to_generator$g(fn) {
21858
21858
  });
21859
21859
  };
21860
21860
  }
21861
- function _define_property$g(obj, key, value) {
21861
+ function _define_property$h(obj, key, value) {
21862
21862
  if (key in obj) {
21863
21863
  Object.defineProperty(obj, key, {
21864
21864
  value: value,
@@ -21898,7 +21898,7 @@ function _iterable_to_array_limit$h(arr, i) {
21898
21898
  function _non_iterable_rest$h() {
21899
21899
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
21900
21900
  }
21901
- function _object_spread$d(target) {
21901
+ function _object_spread$e(target) {
21902
21902
  for(var i = 1; i < arguments.length; i++){
21903
21903
  var source = arguments[i] != null ? arguments[i] : {};
21904
21904
  var ownKeys = Object.keys(source);
@@ -21908,7 +21908,7 @@ function _object_spread$d(target) {
21908
21908
  }));
21909
21909
  }
21910
21910
  ownKeys.forEach(function(key) {
21911
- _define_property$g(target, key, source[key]);
21911
+ _define_property$h(target, key, source[key]);
21912
21912
  });
21913
21913
  }
21914
21914
  return target;
@@ -22266,7 +22266,7 @@ function useRoomPlatformCameraBackground(param) {
22266
22266
  return _ts_generator$g(this, function(_state) {
22267
22267
  if (!isSupported) {
22268
22268
  setState(function(current) {
22269
- return _object_spread_props$a(_object_spread$d({}, current, mapSettingsToState(settings, false)), {
22269
+ return _object_spread_props$a(_object_spread$e({}, current, mapSettingsToState(settings, false)), {
22270
22270
  isApplying: false,
22271
22271
  error: null
22272
22272
  });
@@ -22279,7 +22279,7 @@ function useRoomPlatformCameraBackground(param) {
22279
22279
  applyKey = "".concat(settings.mode, ":").concat(settings.blurLevel, ":").concat((_settings_presetId = settings.presetId) !== null && _settings_presetId !== void 0 ? _settings_presetId : '', ":").concat((_settings_uploadAssetId = settings.uploadAssetId) !== null && _settings_uploadAssetId !== void 0 ? _settings_uploadAssetId : '', ":").concat((_ref = localVideoTrack === null || localVideoTrack === void 0 ? void 0 : localVideoTrack.mediaStreamTrack.id) !== null && _ref !== void 0 ? _ref : 'no-track');
22280
22280
  if (lastAppliedKeyRef.current === applyKey) {
22281
22281
  setState(function(current) {
22282
- return _object_spread_props$a(_object_spread$d({}, current, mapSettingsToState(settings, true)), {
22282
+ return _object_spread_props$a(_object_spread$e({}, current, mapSettingsToState(settings, true)), {
22283
22283
  isApplying: false
22284
22284
  });
22285
22285
  });
@@ -22290,7 +22290,7 @@ function useRoomPlatformCameraBackground(param) {
22290
22290
  }
22291
22291
  if (!localVideoTrack) {
22292
22292
  setState(function(current) {
22293
- return _object_spread_props$a(_object_spread$d({}, current, mapSettingsToState(settings, true)), {
22293
+ return _object_spread_props$a(_object_spread$e({}, current, mapSettingsToState(settings, true)), {
22294
22294
  isApplying: false,
22295
22295
  error: null
22296
22296
  });
@@ -22304,7 +22304,7 @@ function useRoomPlatformCameraBackground(param) {
22304
22304
  requestIdRef.current = requestId;
22305
22305
  lifecycleId = lifecycleIdRef.current;
22306
22306
  setState(function(current) {
22307
- return _object_spread_props$a(_object_spread$d({}, current), {
22307
+ return _object_spread_props$a(_object_spread$e({}, current), {
22308
22308
  isApplying: true,
22309
22309
  error: null
22310
22310
  });
@@ -22422,7 +22422,7 @@ function useRoomPlatformCameraBackground(param) {
22422
22422
  ];
22423
22423
  lastAppliedKeyRef.current = applyKey;
22424
22424
  setState(function(current) {
22425
- return _object_spread_props$a(_object_spread$d({}, current, mapSettingsToState(settings, isSupported)), {
22425
+ return _object_spread_props$a(_object_spread$e({}, current, mapSettingsToState(settings, isSupported)), {
22426
22426
  isApplying: false,
22427
22427
  error: null
22428
22428
  });
@@ -22438,7 +22438,7 @@ function useRoomPlatformCameraBackground(param) {
22438
22438
  }
22439
22439
  if (requestIdRef.current === requestId && lifecycleIdRef.current === lifecycleId) {
22440
22440
  setState(function(current) {
22441
- return _object_spread_props$a(_object_spread$d({}, current), {
22441
+ return _object_spread_props$a(_object_spread$e({}, current), {
22442
22442
  isApplying: false,
22443
22443
  error: 'Không thể áp dụng hình nền. Vui lòng thử lại.'
22444
22444
  });
@@ -22489,7 +22489,7 @@ function useRoomPlatformCameraBackground(param) {
22489
22489
  case 2:
22490
22490
  _state.sent();
22491
22491
  setState(function(current) {
22492
- return _object_spread_props$a(_object_spread$d({}, current), {
22492
+ return _object_spread_props$a(_object_spread$e({}, current), {
22493
22493
  isApplying: false,
22494
22494
  error: 'Không thể lưu cài đặt hình nền. Vui lòng thử lại.'
22495
22495
  });
@@ -22644,7 +22644,7 @@ function useRoomPlatformCameraBackground(param) {
22644
22644
  switch(_state.label){
22645
22645
  case 0:
22646
22646
  setState(function(current) {
22647
- return _object_spread_props$a(_object_spread$d({}, current), {
22647
+ return _object_spread_props$a(_object_spread$e({}, current), {
22648
22648
  isApplying: true,
22649
22649
  error: null
22650
22650
  });
@@ -22697,7 +22697,7 @@ function useRoomPlatformCameraBackground(param) {
22697
22697
  case 7:
22698
22698
  _state.sent();
22699
22699
  setState(function(current) {
22700
- return _object_spread_props$a(_object_spread$d({}, current), {
22700
+ return _object_spread_props$a(_object_spread$e({}, current), {
22701
22701
  isApplying: false,
22702
22702
  error: 'Không thể lưu hình nền tải lên. Vui lòng thử lại.'
22703
22703
  });
@@ -22753,7 +22753,7 @@ function useRoomPlatformCameraBackground(param) {
22753
22753
  case 0:
22754
22754
  isActiveUpload = state.mode === 'upload' && state.uploadAssetId === uploadAssetId;
22755
22755
  setState(function(current) {
22756
- return _object_spread_props$a(_object_spread$d({}, current), {
22756
+ return _object_spread_props$a(_object_spread$e({}, current), {
22757
22757
  isApplying: true,
22758
22758
  error: null
22759
22759
  });
@@ -22802,7 +22802,7 @@ function useRoomPlatformCameraBackground(param) {
22802
22802
  ];
22803
22803
  case 6:
22804
22804
  setState(function(current) {
22805
- return _object_spread_props$a(_object_spread$d({}, current), {
22805
+ return _object_spread_props$a(_object_spread$e({}, current), {
22806
22806
  isApplying: false,
22807
22807
  error: null
22808
22808
  });
@@ -22814,7 +22814,7 @@ function useRoomPlatformCameraBackground(param) {
22814
22814
  case 7:
22815
22815
  _state.sent();
22816
22816
  setState(function(current) {
22817
- return _object_spread_props$a(_object_spread$d({}, current), {
22817
+ return _object_spread_props$a(_object_spread$e({}, current), {
22818
22818
  isApplying: false,
22819
22819
  error: 'Không thể xóa hình nền tải lên. Vui lòng thử lại.'
22820
22820
  });
@@ -22838,7 +22838,7 @@ function useRoomPlatformCameraBackground(param) {
22838
22838
  ]);
22839
22839
  var clearError = useCallback(function() {
22840
22840
  setState(function(current) {
22841
- return _object_spread_props$a(_object_spread$d({}, current), {
22841
+ return _object_spread_props$a(_object_spread$e({}, current), {
22842
22842
  error: null
22843
22843
  });
22844
22844
  });
@@ -23866,7 +23866,7 @@ function _async_to_generator$d(fn) {
23866
23866
  });
23867
23867
  };
23868
23868
  }
23869
- function _define_property$f(obj, key, value) {
23869
+ function _define_property$g(obj, key, value) {
23870
23870
  if (key in obj) {
23871
23871
  Object.defineProperty(obj, key, {
23872
23872
  value: value,
@@ -23906,7 +23906,7 @@ function _iterable_to_array_limit$e(arr, i) {
23906
23906
  function _non_iterable_rest$e() {
23907
23907
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
23908
23908
  }
23909
- function _object_spread$c(target) {
23909
+ function _object_spread$d(target) {
23910
23910
  for(var i = 1; i < arguments.length; i++){
23911
23911
  var source = arguments[i] != null ? arguments[i] : {};
23912
23912
  var ownKeys = Object.keys(source);
@@ -23916,7 +23916,7 @@ function _object_spread$c(target) {
23916
23916
  }));
23917
23917
  }
23918
23918
  ownKeys.forEach(function(key) {
23919
- _define_property$f(target, key, source[key]);
23919
+ _define_property$g(target, key, source[key]);
23920
23920
  });
23921
23921
  }
23922
23922
  return target;
@@ -24130,7 +24130,7 @@ function IconTooltipButton(_0) {
24130
24130
  children: [
24131
24131
  /*#__PURE__*/ jsx(TooltipTrigger, {
24132
24132
  asChild: true,
24133
- children: /*#__PURE__*/ jsx(Button$1, _object_spread_props$9(_object_spread$c({
24133
+ children: /*#__PURE__*/ jsx(Button$1, _object_spread_props$9(_object_spread$d({
24134
24134
  "aria-label": label,
24135
24135
  title: label
24136
24136
  }, buttonProps), {
@@ -24153,7 +24153,7 @@ function IconTooltipTrackToggle(_0) {
24153
24153
  children: [
24154
24154
  /*#__PURE__*/ jsx(TooltipTrigger, {
24155
24155
  asChild: true,
24156
- children: /*#__PURE__*/ jsx(TrackToggle, _object_spread_props$9(_object_spread$c({
24156
+ children: /*#__PURE__*/ jsx(TrackToggle, _object_spread_props$9(_object_spread$d({
24157
24157
  "aria-label": label,
24158
24158
  title: label
24159
24159
  }, toggleProps), {
@@ -24497,7 +24497,7 @@ function _create_class$2(Constructor, protoProps, staticProps) {
24497
24497
  if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
24498
24498
  return Constructor;
24499
24499
  }
24500
- function _define_property$e(obj, key, value) {
24500
+ function _define_property$f(obj, key, value) {
24501
24501
  if (key in obj) {
24502
24502
  Object.defineProperty(obj, key, {
24503
24503
  value: value,
@@ -24510,7 +24510,7 @@ function _define_property$e(obj, key, value) {
24510
24510
  }
24511
24511
  return obj;
24512
24512
  }
24513
- function _object_spread$b(target) {
24513
+ function _object_spread$c(target) {
24514
24514
  for(var i = 1; i < arguments.length; i++){
24515
24515
  var source = arguments[i] != null ? arguments[i] : {};
24516
24516
  var ownKeys = Object.keys(source);
@@ -24520,7 +24520,7 @@ function _object_spread$b(target) {
24520
24520
  }));
24521
24521
  }
24522
24522
  ownKeys.forEach(function(key) {
24523
- _define_property$e(target, key, source[key]);
24523
+ _define_property$f(target, key, source[key]);
24524
24524
  });
24525
24525
  }
24526
24526
  return target;
@@ -24647,13 +24647,13 @@ var WebSocketRealtimeTransport = /*#__PURE__*/ function() {
24647
24647
  function WebSocketRealtimeTransport() {
24648
24648
  var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
24649
24649
  _class_call_check$5(this, WebSocketRealtimeTransport);
24650
- _define_property$e(this, "options", void 0);
24651
- _define_property$e(this, "socket", void 0);
24652
- _define_property$e(this, "connectInput", void 0);
24653
- _define_property$e(this, "manuallyClosed", void 0);
24654
- _define_property$e(this, "subscribedRooms", void 0);
24655
- _define_property$e(this, "handlers", void 0);
24656
- _define_property$e(this, "hasConnected", void 0);
24650
+ _define_property$f(this, "options", void 0);
24651
+ _define_property$f(this, "socket", void 0);
24652
+ _define_property$f(this, "connectInput", void 0);
24653
+ _define_property$f(this, "manuallyClosed", void 0);
24654
+ _define_property$f(this, "subscribedRooms", void 0);
24655
+ _define_property$f(this, "handlers", void 0);
24656
+ _define_property$f(this, "hasConnected", void 0);
24657
24657
  this.options = options;
24658
24658
  this.manuallyClosed = false;
24659
24659
  this.subscribedRooms = new Set();
@@ -24689,7 +24689,7 @@ var WebSocketRealtimeTransport = /*#__PURE__*/ function() {
24689
24689
  value: function refreshToken(token) {
24690
24690
  return _async_to_generator$c(function() {
24691
24691
  return _ts_generator$c(this, function(_state) {
24692
- if (this.connectInput) this.connectInput = _object_spread_props$8(_object_spread$b({}, this.connectInput), {
24692
+ if (this.connectInput) this.connectInput = _object_spread_props$8(_object_spread$c({}, this.connectInput), {
24693
24693
  token: token
24694
24694
  });
24695
24695
  this.updateSocketAuthToken(token);
@@ -24823,7 +24823,7 @@ var WebSocketRealtimeTransport = /*#__PURE__*/ function() {
24823
24823
  key: "createSocket",
24824
24824
  value: function createSocket(endpoint, options) {
24825
24825
  if (this.options.socketFactory) return this.options.socketFactory(endpoint, options);
24826
- return io(endpoint, _object_spread_props$8(_object_spread$b({}, options), {
24826
+ return io(endpoint, _object_spread_props$8(_object_spread$c({}, options), {
24827
24827
  autoConnect: false
24828
24828
  }));
24829
24829
  }
@@ -24876,7 +24876,7 @@ function _create_class$1(Constructor, protoProps, staticProps) {
24876
24876
  if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
24877
24877
  return Constructor;
24878
24878
  }
24879
- function _define_property$d(obj, key, value) {
24879
+ function _define_property$e(obj, key, value) {
24880
24880
  if (key in obj) {
24881
24881
  Object.defineProperty(obj, key, {
24882
24882
  value: value,
@@ -24909,8 +24909,8 @@ function _unsupported_iterable_to_array$e(o, minLen) {
24909
24909
  var ChatClientState = /*#__PURE__*/ function() {
24910
24910
  function ChatClientState() {
24911
24911
  _class_call_check$4(this, ChatClientState);
24912
- _define_property$d(this, "token", void 0);
24913
- _define_property$d(this, "rooms", new Map());
24912
+ _define_property$e(this, "token", void 0);
24913
+ _define_property$e(this, "rooms", new Map());
24914
24914
  }
24915
24915
  _create_class$1(ChatClientState, [
24916
24916
  {
@@ -25002,7 +25002,7 @@ function _construct$2(Parent, args, Class) {
25002
25002
  }
25003
25003
  return _construct$2.apply(null, arguments);
25004
25004
  }
25005
- function _define_property$c(obj, key, value) {
25005
+ function _define_property$d(obj, key, value) {
25006
25006
  if (key in obj) {
25007
25007
  Object.defineProperty(obj, key, {
25008
25008
  value: value,
@@ -25095,7 +25095,7 @@ var ChatHttpError = /*#__PURE__*/ function(Error1) {
25095
25095
  var _this;
25096
25096
  _this = _call_super$2(this, ChatHttpError, [
25097
25097
  message
25098
- ]), _define_property$c(_this, "status", void 0), _define_property$c(_this, "responseBody", void 0), _this.status = status, _this.responseBody = responseBody;
25098
+ ]), _define_property$d(_this, "status", void 0), _define_property$d(_this, "responseBody", void 0), _this.status = status, _this.responseBody = responseBody;
25099
25099
  _this.name = 'ChatHttpError';
25100
25100
  return _this;
25101
25101
  }
@@ -25147,7 +25147,7 @@ function _async_to_generator$b(fn) {
25147
25147
  });
25148
25148
  };
25149
25149
  }
25150
- function _define_property$b(obj, key, value) {
25150
+ function _define_property$c(obj, key, value) {
25151
25151
  if (key in obj) {
25152
25152
  Object.defineProperty(obj, key, {
25153
25153
  value: value,
@@ -25160,7 +25160,7 @@ function _define_property$b(obj, key, value) {
25160
25160
  }
25161
25161
  return obj;
25162
25162
  }
25163
- function _object_spread$a(target) {
25163
+ function _object_spread$b(target) {
25164
25164
  for(var i = 1; i < arguments.length; i++){
25165
25165
  var source = arguments[i] != null ? arguments[i] : {};
25166
25166
  var ownKeys = Object.keys(source);
@@ -25170,7 +25170,7 @@ function _object_spread$a(target) {
25170
25170
  }));
25171
25171
  }
25172
25172
  ownKeys.forEach(function(key) {
25173
- _define_property$b(target, key, source[key]);
25173
+ _define_property$c(target, key, source[key]);
25174
25174
  });
25175
25175
  }
25176
25176
  return target;
@@ -25310,8 +25310,8 @@ var createChatHttpRequester = function(input) {
25310
25310
  return _ts_generator$b(this, function(_state) {
25311
25311
  return [
25312
25312
  2,
25313
- input.fetchFn("".concat(endpoint).concat(path), _object_spread_props$7(_object_spread$a({}, init), {
25314
- headers: _object_spread_props$7(_object_spread$a({}, init.body ? {
25313
+ input.fetchFn("".concat(endpoint).concat(path), _object_spread_props$7(_object_spread$b({}, init), {
25314
+ headers: _object_spread_props$7(_object_spread$b({}, init.body ? {
25315
25315
  'Content-Type': 'application/json'
25316
25316
  } : {}, init.headers), {
25317
25317
  Authorization: "Bearer ".concat(input.getToken())
@@ -25681,7 +25681,7 @@ function _async_to_generator$9(fn) {
25681
25681
  });
25682
25682
  };
25683
25683
  }
25684
- function _define_property$a(obj, key, value) {
25684
+ function _define_property$b(obj, key, value) {
25685
25685
  if (key in obj) {
25686
25686
  Object.defineProperty(obj, key, {
25687
25687
  value: value,
@@ -25694,7 +25694,7 @@ function _define_property$a(obj, key, value) {
25694
25694
  }
25695
25695
  return obj;
25696
25696
  }
25697
- function _object_spread$9(target) {
25697
+ function _object_spread$a(target) {
25698
25698
  for(var i = 1; i < arguments.length; i++){
25699
25699
  var source = arguments[i] != null ? arguments[i] : {};
25700
25700
  var ownKeys = Object.keys(source);
@@ -25704,7 +25704,7 @@ function _object_spread$9(target) {
25704
25704
  }));
25705
25705
  }
25706
25706
  ownKeys.forEach(function(key) {
25707
- _define_property$a(target, key, source[key]);
25707
+ _define_property$b(target, key, source[key]);
25708
25708
  });
25709
25709
  }
25710
25710
  return target;
@@ -25987,7 +25987,7 @@ function createChatClient(config) {
25987
25987
  return [
25988
25988
  2,
25989
25989
  request("/chat/rooms/".concat(encodeURIComponent(roomId), "/messages"), {
25990
- body: JSON.stringify(_object_spread$9({
25990
+ body: JSON.stringify(_object_spread$a({
25991
25991
  idempotencyKey: (_input_idempotencyKey = input.idempotencyKey) !== null && _input_idempotencyKey !== void 0 ? _input_idempotencyKey : idGenerator(),
25992
25992
  text: input.text
25993
25993
  }, input.attachmentIds === undefined ? {} : {
@@ -57675,7 +57675,7 @@ function _construct$1(Parent, args, Class) {
57675
57675
  }
57676
57676
  return _construct$1.apply(null, arguments);
57677
57677
  }
57678
- function _define_property$9(obj, key, value) {
57678
+ function _define_property$a(obj, key, value) {
57679
57679
  if (key in obj) {
57680
57680
  Object.defineProperty(obj, key, {
57681
57681
  value: value,
@@ -57806,7 +57806,7 @@ var AttachmentUploadError = /*#__PURE__*/ function(Error1) {
57806
57806
  var _this;
57807
57807
  _this = _call_super$1(this, AttachmentUploadError, [
57808
57808
  message
57809
- ]), _define_property$9(_this, "status", void 0), _this.status = status;
57809
+ ]), _define_property$a(_this, "status", void 0), _this.status = status;
57810
57810
  return _this;
57811
57811
  }
57812
57812
  return AttachmentUploadError;
@@ -57918,7 +57918,7 @@ function _construct(Parent, args, Class) {
57918
57918
  }
57919
57919
  return _construct.apply(null, arguments);
57920
57920
  }
57921
- function _define_property$8(obj, key, value) {
57921
+ function _define_property$9(obj, key, value) {
57922
57922
  if (key in obj) {
57923
57923
  Object.defineProperty(obj, key, {
57924
57924
  value: value,
@@ -57993,7 +57993,7 @@ function _non_iterable_rest$b() {
57993
57993
  function _non_iterable_spread$3() {
57994
57994
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
57995
57995
  }
57996
- function _object_spread$8(target) {
57996
+ function _object_spread$9(target) {
57997
57997
  for(var i = 1; i < arguments.length; i++){
57998
57998
  var source = arguments[i] != null ? arguments[i] : {};
57999
57999
  var ownKeys = Object.keys(source);
@@ -58003,7 +58003,7 @@ function _object_spread$8(target) {
58003
58003
  }));
58004
58004
  }
58005
58005
  ownKeys.forEach(function(key) {
58006
- _define_property$8(target, key, source[key]);
58006
+ _define_property$9(target, key, source[key]);
58007
58007
  });
58008
58008
  }
58009
58009
  return target;
@@ -58210,7 +58210,7 @@ var EmojiPicker = /*#__PURE__*/ lazy(function() {
58210
58210
  2
58211
58211
  ]), _ref_ = _ref[0], Picker = _ref_.default, EmojiStyle = _ref_.EmojiStyle, _ref_1 = _ref[1], emojiData = _ref_1.default;
58212
58212
  NativeEmojiPicker = function(props) {
58213
- return /*#__PURE__*/ jsx(Picker, _object_spread_props$6(_object_spread$8({}, props), {
58213
+ return /*#__PURE__*/ jsx(Picker, _object_spread_props$6(_object_spread$9({}, props), {
58214
58214
  categories: [
58215
58215
  {
58216
58216
  category: Categories.SUGGESTED,
@@ -58310,6 +58310,13 @@ function MessageComposer(param) {
58310
58310
  generationRef.current += 1;
58311
58311
  };
58312
58312
  }, []);
58313
+ useEffect(function() {
58314
+ return function() {
58315
+ filesRef.current.forEach(function(item) {
58316
+ return URL.revokeObjectURL(item.previewUrl);
58317
+ });
58318
+ };
58319
+ }, []);
58313
58320
  var updateFiles = function(updater) {
58314
58321
  var next = updater(filesRef.current);
58315
58322
  filesRef.current = next;
@@ -58408,6 +58415,7 @@ function MessageComposer(param) {
58408
58415
  return {
58409
58416
  clientId: createClientId(),
58410
58417
  file: file,
58418
+ previewUrl: URL.createObjectURL(file),
58411
58419
  progress: 0,
58412
58420
  status: 'pending'
58413
58421
  };
@@ -58417,6 +58425,10 @@ function MessageComposer(param) {
58417
58425
  });
58418
58426
  };
58419
58427
  var removeFile = function(clientId) {
58428
+ var item = filesRef.current.find(function(candidate) {
58429
+ return candidate.clientId === clientId;
58430
+ });
58431
+ if (item) URL.revokeObjectURL(item.previewUrl);
58420
58432
  uploadOperationByClientRef.current.delete(clientId);
58421
58433
  updateFiles(function(current) {
58422
58434
  return current.filter(function(item) {
@@ -58459,7 +58471,7 @@ function MessageComposer(param) {
58459
58471
  if (!upload) throw new Error('Máy chủ không trả về URL tải ảnh.');
58460
58472
  updateFiles(function(current) {
58461
58473
  return current.map(function(candidate) {
58462
- return candidate.clientId === item.clientId ? _object_spread_props$6(_object_spread$8({}, candidate), {
58474
+ return candidate.clientId === item.clientId ? _object_spread_props$6(_object_spread$9({}, candidate), {
58463
58475
  upload: upload
58464
58476
  }) : candidate;
58465
58477
  });
@@ -58483,7 +58495,7 @@ function MessageComposer(param) {
58483
58495
  assertCurrentGeneration(generation);
58484
58496
  updateFiles(function(current) {
58485
58497
  return current.map(function(candidate) {
58486
- return candidate.clientId === item.clientId ? _object_spread_props$6(_object_spread$8({}, candidate), {
58498
+ return candidate.clientId === item.clientId ? _object_spread_props$6(_object_spread$9({}, candidate), {
58487
58499
  error: undefined,
58488
58500
  progress: 0,
58489
58501
  status: 'uploading'
@@ -58506,7 +58518,7 @@ function MessageComposer(param) {
58506
58518
  onProgress: function(progress) {
58507
58519
  return updateFiles(function(current) {
58508
58520
  return current.map(function(candidate) {
58509
- return candidate.clientId === item.clientId ? _object_spread_props$6(_object_spread$8({}, candidate), {
58521
+ return candidate.clientId === item.clientId ? _object_spread_props$6(_object_spread$9({}, candidate), {
58510
58522
  progress: progress
58511
58523
  }) : candidate;
58512
58524
  });
@@ -58555,7 +58567,7 @@ function MessageComposer(param) {
58555
58567
  if (!hasChatErrorCode(renewError, 'CHAT_MESSAGE_ATTACHMENT_UPLOAD_EXPIRED')) throw renewError;
58556
58568
  updateFiles(function(current) {
58557
58569
  return current.map(function(candidate) {
58558
- return candidate.clientId === item.clientId ? _object_spread_props$6(_object_spread$8({}, candidate), {
58570
+ return candidate.clientId === item.clientId ? _object_spread_props$6(_object_spread$9({}, candidate), {
58559
58571
  error: undefined,
58560
58572
  progress: 0,
58561
58573
  status: 'pending',
@@ -58577,7 +58589,7 @@ function MessageComposer(param) {
58577
58589
  assertCurrentGeneration(generation);
58578
58590
  updateFiles(function(current) {
58579
58591
  return current.map(function(candidate) {
58580
- return candidate.clientId === item.clientId ? _object_spread_props$6(_object_spread$8({}, candidate), {
58592
+ return candidate.clientId === item.clientId ? _object_spread_props$6(_object_spread$9({}, candidate), {
58581
58593
  upload: upload
58582
58594
  }) : candidate;
58583
58595
  });
@@ -58589,7 +58601,7 @@ function MessageComposer(param) {
58589
58601
  onProgress: function(progress) {
58590
58602
  return updateFiles(function(current) {
58591
58603
  return current.map(function(candidate) {
58592
- return candidate.clientId === item.clientId ? _object_spread_props$6(_object_spread$8({}, candidate), {
58604
+ return candidate.clientId === item.clientId ? _object_spread_props$6(_object_spread$9({}, candidate), {
58593
58605
  progress: progress
58594
58606
  }) : candidate;
58595
58607
  });
@@ -58615,7 +58627,7 @@ function MessageComposer(param) {
58615
58627
  assertCurrentGeneration(generation);
58616
58628
  updateFiles(function(current) {
58617
58629
  return current.map(function(candidate) {
58618
- return candidate.clientId === item.clientId ? _object_spread_props$6(_object_spread$8({}, candidate), {
58630
+ return candidate.clientId === item.clientId ? _object_spread_props$6(_object_spread$9({}, candidate), {
58619
58631
  error: undefined,
58620
58632
  progress: 100,
58621
58633
  status: 'completed'
@@ -58633,7 +58645,7 @@ function MessageComposer(param) {
58633
58645
  var message = _instanceof$2(uploadError, Error) ? uploadError.message : 'Không thể tải ảnh lên.';
58634
58646
  updateFiles(function(current) {
58635
58647
  return current.map(function(candidate) {
58636
- return candidate.clientId === clientId ? _object_spread_props$6(_object_spread$8({}, candidate), {
58648
+ return candidate.clientId === clientId ? _object_spread_props$6(_object_spread$9({}, candidate), {
58637
58649
  error: message,
58638
58650
  status: 'failed'
58639
58651
  }) : candidate;
@@ -58718,7 +58730,7 @@ function MessageComposer(param) {
58718
58730
  }));
58719
58731
  updateFiles(function(current) {
58720
58732
  return current.map(function(item) {
58721
- return uploadsByClientId.has(item.clientId) ? _object_spread_props$6(_object_spread$8({}, item), {
58733
+ return uploadsByClientId.has(item.clientId) ? _object_spread_props$6(_object_spread$9({}, item), {
58722
58734
  upload: uploadsByClientId.get(item.clientId)
58723
58735
  }) : item;
58724
58736
  });
@@ -58873,7 +58885,7 @@ function MessageComposer(param) {
58873
58885
  };
58874
58886
  var uploadAndSend = function(messageText, generation) {
58875
58887
  return _async_to_generator$8(function() {
58876
- var pendingItems, newItems, pendingOperations, incompleteFile, attachmentIds, sendPayload, sendKey, uploadError;
58888
+ var pendingItems, newItems, pendingOperations, incompleteFile, attachmentIds, sendPayload, sendKey, localPreviewUrls, uploadError;
58877
58889
  return _ts_generator$8(this, function(_state) {
58878
58890
  switch(_state.label){
58879
58891
  case 0:
@@ -58925,11 +58937,21 @@ function MessageComposer(param) {
58925
58937
  text: messageText
58926
58938
  });
58927
58939
  sendKey = getOperationKey(sendOperationRef, 'send', sendPayload);
58940
+ localPreviewUrls = Object.fromEntries(filesRef.current.map(function(item) {
58941
+ var _item_upload;
58942
+ return [
58943
+ (_item_upload = item.upload) === null || _item_upload === void 0 ? void 0 : _item_upload.attachmentId,
58944
+ item.previewUrl
58945
+ ];
58946
+ }).filter(function(entry) {
58947
+ return Boolean(entry[0]);
58948
+ }));
58928
58949
  assertCurrentGeneration(generation);
58929
58950
  return [
58930
58951
  4,
58931
58952
  onSend({
58932
58953
  attachmentIds: attachmentIds,
58954
+ localPreviewUrls: localPreviewUrls,
58933
58955
  text: messageText
58934
58956
  }, sendKey)
58935
58957
  ];
@@ -59161,7 +59183,8 @@ function MessageComposer(param) {
59161
59183
  className: "navi-chat__attachment-item",
59162
59184
  children: [
59163
59185
  /*#__PURE__*/ jsx(ComposerImagePreview, {
59164
- file: item.file
59186
+ file: item.file,
59187
+ url: item.previewUrl
59165
59188
  }),
59166
59189
  /*#__PURE__*/ jsx(AttachmentUploadStatus, {
59167
59190
  item: item
@@ -59283,12 +59306,7 @@ function MessageComposer(param) {
59283
59306
  });
59284
59307
  }
59285
59308
  function ComposerImagePreview(param) {
59286
- var file = param.file;
59287
- var url = useMemo(function() {
59288
- return URL.createObjectURL(file);
59289
- }, [
59290
- file
59291
- ]);
59309
+ var file = param.file, url = param.url;
59292
59310
  var _useState = _sliced_to_array$b(useState(false), 2), isOpen = _useState[0], setIsOpen = _useState[1];
59293
59311
  var dialogRef = useRef(null);
59294
59312
  useEffect(function() {
@@ -59464,7 +59482,7 @@ function _async_to_generator$7(fn) {
59464
59482
  });
59465
59483
  };
59466
59484
  }
59467
- function _define_property$7(obj, key, value) {
59485
+ function _define_property$8(obj, key, value) {
59468
59486
  if (key in obj) {
59469
59487
  Object.defineProperty(obj, key, {
59470
59488
  value: value,
@@ -59504,7 +59522,7 @@ function _iterable_to_array_limit$a(arr, i) {
59504
59522
  function _non_iterable_rest$a() {
59505
59523
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
59506
59524
  }
59507
- function _object_spread$7(target) {
59525
+ function _object_spread$8(target) {
59508
59526
  for(var i = 1; i < arguments.length; i++){
59509
59527
  var source = arguments[i] != null ? arguments[i] : {};
59510
59528
  var ownKeys = Object.keys(source);
@@ -59514,7 +59532,7 @@ function _object_spread$7(target) {
59514
59532
  }));
59515
59533
  }
59516
59534
  ownKeys.forEach(function(key) {
59517
- _define_property$7(target, key, source[key]);
59535
+ _define_property$8(target, key, source[key]);
59518
59536
  });
59519
59537
  }
59520
59538
  return target;
@@ -59648,10 +59666,12 @@ function _ts_generator$7(thisArg, body) {
59648
59666
  };
59649
59667
  }
59650
59668
  }
59669
+ var EMPTY_LOCAL_PREVIEW_URLS = {};
59651
59670
  function MessageAttachmentGallery(param) {
59652
- var attachments = param.attachments, className = param.className, _param_now = param.now, now = _param_now === void 0 ? function() {
59671
+ var attachments = param.attachments, className = param.className, _param_localPreviewUrls = param.localPreviewUrls, localPreviewUrls = _param_localPreviewUrls === void 0 ? EMPTY_LOCAL_PREVIEW_URLS : _param_localPreviewUrls, _param_now = param.now, now = _param_now === void 0 ? function() {
59653
59672
  return new Date();
59654
59673
  } : _param_now, onRefreshPreview = param.onRefreshPreview, onRefreshView = param.onRefreshView, onRetryAttachment = param.onRetryAttachment;
59674
+ var _ref;
59655
59675
  var _orderedAttachments_selectedIndex;
59656
59676
  var _useState = _sliced_to_array$a(useState(), 2), selectedIndex = _useState[0], setSelectedIndex = _useState[1];
59657
59677
  var _useState1 = _sliced_to_array$a(useState(new Set()), 2), previewRefreshingIds = _useState1[0], setPreviewRefreshingIds = _useState1[1];
@@ -59708,7 +59728,7 @@ function MessageAttachmentGallery(param) {
59708
59728
  ];
59709
59729
  previewAttemptedRef.current.add(refreshKey);
59710
59730
  setPreviewErrors(function(current) {
59711
- var next = _object_spread$7({}, current);
59731
+ var next = _object_spread$8({}, current);
59712
59732
  delete next[attachment.id];
59713
59733
  return next;
59714
59734
  });
@@ -59732,7 +59752,7 @@ function MessageAttachmentGallery(param) {
59732
59752
  refreshed = _state.sent();
59733
59753
  if (refreshed) {
59734
59754
  setLocalPreviews(function(current) {
59735
- return _object_spread_props$5(_object_spread$7({}, current), _define_property$7({}, attachment.id, refreshed));
59755
+ return _object_spread_props$5(_object_spread$8({}, current), _define_property$8({}, attachment.id, refreshed));
59736
59756
  });
59737
59757
  if (refreshed.previewUrl !== attachment.previewUrl) {
59738
59758
  previewAttemptedRef.current.delete(refreshKey);
@@ -59745,7 +59765,7 @@ function MessageAttachmentGallery(param) {
59745
59765
  case 3:
59746
59766
  _state.sent();
59747
59767
  setPreviewErrors(function(current) {
59748
- return _object_spread_props$5(_object_spread$7({}, current), _define_property$7({}, attachment.id, 'Không thể làm mới ảnh xem trước.'));
59768
+ return _object_spread_props$5(_object_spread$8({}, current), _define_property$8({}, attachment.id, 'Không thể làm mới ảnh xem trước.'));
59749
59769
  });
59750
59770
  return [
59751
59771
  3,
@@ -59785,7 +59805,7 @@ function MessageAttachmentGallery(param) {
59785
59805
  pending
59786
59806
  ];
59787
59807
  setViewErrors(function(current) {
59788
- var next = _object_spread$7({}, current);
59808
+ var next = _object_spread$8({}, current);
59789
59809
  delete next[attachment.id];
59790
59810
  return next;
59791
59811
  });
@@ -59813,7 +59833,7 @@ function MessageAttachmentGallery(param) {
59813
59833
  case 1:
59814
59834
  refreshed = _state.sent();
59815
59835
  if (!isChatAttachmentView(refreshed)) throw new Error('Phản hồi ảnh không hợp lệ.');
59816
- viewCacheRef.current = _object_spread_props$5(_object_spread$7({}, viewCacheRef.current), _define_property$7({}, attachment.id, refreshed));
59836
+ viewCacheRef.current = _object_spread_props$5(_object_spread$8({}, viewCacheRef.current), _define_property$8({}, attachment.id, refreshed));
59817
59837
  setViewCache(viewCacheRef.current);
59818
59838
  return [
59819
59839
  2,
@@ -59822,7 +59842,7 @@ function MessageAttachmentGallery(param) {
59822
59842
  case 2:
59823
59843
  _state.sent();
59824
59844
  setViewErrors(function(current) {
59825
- return _object_spread_props$5(_object_spread$7({}, current), _define_property$7({}, attachment.id, 'Không thể tải ảnh.'));
59845
+ return _object_spread_props$5(_object_spread$8({}, current), _define_property$8({}, attachment.id, 'Không thể tải ảnh.'));
59826
59846
  });
59827
59847
  return [
59828
59848
  2,
@@ -59855,16 +59875,20 @@ function MessageAttachmentGallery(param) {
59855
59875
  })();
59856
59876
  }, []);
59857
59877
  var selectedAttachmentId = selectedIndex === undefined ? undefined : (_orderedAttachments_selectedIndex = orderedAttachments[selectedIndex]) === null || _orderedAttachments_selectedIndex === void 0 ? void 0 : _orderedAttachments_selectedIndex.id;
59878
+ var selectedAttachment = selectedIndex === undefined ? undefined : orderedAttachments[selectedIndex];
59879
+ var selectedPreviewAttachment = selectedAttachment && isChatAttachmentPreview(selectedAttachment) ? selectedAttachment : undefined;
59880
+ var selectedLocalPreviewUrl = selectedAttachment && !isChatAttachmentPreview(selectedAttachment) ? localPreviewUrls[selectedAttachment.id] : undefined;
59858
59881
  useEffect(function() {
59859
59882
  if (selectedIndex === undefined) return;
59860
59883
  var attachment = orderedAttachmentsRef.current[selectedIndex];
59861
- if (!attachment || !isChatAttachmentPreview(attachment)) {
59884
+ if (!attachment || !isChatAttachmentPreview(attachment) && localPreviewUrls[attachment.id] === undefined) {
59862
59885
  setSelectedIndex(undefined);
59863
59886
  return;
59864
59887
  }
59865
- void loadView(attachment);
59888
+ if (isChatAttachmentPreview(attachment)) void loadView(attachment);
59866
59889
  }, [
59867
59890
  loadView,
59891
+ localPreviewUrls,
59868
59892
  selectedAttachmentId,
59869
59893
  selectedIndex
59870
59894
  ]);
@@ -59877,8 +59901,6 @@ function MessageAttachmentGallery(param) {
59877
59901
  selectedIndex
59878
59902
  ]);
59879
59903
  if (!orderedAttachments.length) return null;
59880
- var selectedAttachment = selectedIndex === undefined ? undefined : orderedAttachments[selectedIndex];
59881
- var selectedPreviewAttachment = selectedAttachment && isChatAttachmentPreview(selectedAttachment) ? selectedAttachment : undefined;
59882
59904
  var selectedView = selectedPreviewAttachment ? viewCache[selectedPreviewAttachment.id] : undefined;
59883
59905
  var selectedViewIsFresh = Boolean(selectedView && hasNotExpired(selectedView.urlExpiresAt, now()));
59884
59906
  var closeDialog = function() {
@@ -59895,7 +59917,8 @@ function MessageAttachmentGallery(param) {
59895
59917
  if (selectedIndex === undefined) return;
59896
59918
  for(var offset = 1; offset <= orderedAttachments.length; offset += 1){
59897
59919
  var nextIndex = (selectedIndex + direction * offset + orderedAttachments.length) % orderedAttachments.length;
59898
- if (isChatAttachmentPreview(orderedAttachments[nextIndex])) {
59920
+ var nextAttachment = orderedAttachments[nextIndex];
59921
+ if (isChatAttachmentPreview(nextAttachment) || localPreviewUrls[nextAttachment.id] !== undefined) {
59899
59922
  setSelectedIndex(nextIndex);
59900
59923
  return;
59901
59924
  }
@@ -59911,13 +59934,13 @@ function MessageAttachmentGallery(param) {
59911
59934
  var handleViewError = function(attachment) {
59912
59935
  deleteCachedView(attachment.id, viewCacheRef, setViewCache);
59913
59936
  setViewErrors(function(current) {
59914
- return _object_spread_props$5(_object_spread$7({}, current), _define_property$7({}, attachment.id, 'Không thể tải ảnh.'));
59937
+ return _object_spread_props$5(_object_spread$8({}, current), _define_property$8({}, attachment.id, 'Không thể tải ảnh.'));
59915
59938
  });
59916
59939
  };
59917
59940
  var retryView = function(attachment) {
59918
59941
  deleteCachedView(attachment.id, viewCacheRef, setViewCache);
59919
59942
  setViewErrors(function(current) {
59920
- var next = _object_spread$7({}, current);
59943
+ var next = _object_spread$8({}, current);
59921
59944
  delete next[attachment.id];
59922
59945
  return next;
59923
59946
  });
@@ -59932,7 +59955,7 @@ function MessageAttachmentGallery(param) {
59932
59955
  2
59933
59956
  ];
59934
59957
  setRetryErrors(function(current) {
59935
- var next = _object_spread$7({}, current);
59958
+ var next = _object_spread$8({}, current);
59936
59959
  delete next[attachmentId];
59937
59960
  return next;
59938
59961
  });
@@ -59960,7 +59983,7 @@ function MessageAttachmentGallery(param) {
59960
59983
  case 3:
59961
59984
  _state.sent();
59962
59985
  setRetryErrors(function(current) {
59963
- return _object_spread_props$5(_object_spread$7({}, current), _define_property$7({}, attachmentId, 'Không thể thử lại ảnh; ảnh có thể đã hết hạn.'));
59986
+ return _object_spread_props$5(_object_spread$8({}, current), _define_property$8({}, attachmentId, 'Không thể thử lại ảnh; ảnh có thể đã hết hạn.'));
59964
59987
  });
59965
59988
  return [
59966
59989
  3,
@@ -59990,6 +60013,35 @@ function MessageAttachmentGallery(param) {
59990
60013
  className: "navi-chat__attachment-grid",
59991
60014
  children: orderedAttachments.map(function(attachment, index) {
59992
60015
  if (!isChatAttachmentPreview(attachment)) {
60016
+ var localPreviewUrl = localPreviewUrls[attachment.id];
60017
+ if (localPreviewUrl && attachment.state === 'processing') {
60018
+ return /*#__PURE__*/ jsxs("button", {
60019
+ "aria-label": "Mở ảnh ".concat(attachment.fileName),
60020
+ className: "navi-chat__attachment-thumbnail",
60021
+ onClick: function(event) {
60022
+ return openDialog(index, event);
60023
+ },
60024
+ type: "button",
60025
+ children: [
60026
+ /*#__PURE__*/ jsx("img", {
60027
+ alt: attachment.fileName,
60028
+ decoding: "async",
60029
+ height: 240,
60030
+ src: localPreviewUrl,
60031
+ width: 240
60032
+ }),
60033
+ /*#__PURE__*/ jsxs("span", {
60034
+ className: "navi-chat__attachment-loading",
60035
+ role: "status",
60036
+ children: [
60037
+ "Đang xử l\xfd ",
60038
+ attachment.fileName,
60039
+ "..."
60040
+ ]
60041
+ })
60042
+ ]
60043
+ }, attachment.id);
60044
+ }
59993
60045
  return attachment.state === 'processing' ? /*#__PURE__*/ jsxs("div", {
59994
60046
  className: "navi-chat__attachment-state",
59995
60047
  role: "status",
@@ -60074,7 +60126,7 @@ function MessageAttachmentGallery(param) {
60074
60126
  ]
60075
60127
  }, attachmentId);
60076
60128
  }),
60077
- selectedIndex !== undefined && selectedPreviewAttachment ? /*#__PURE__*/ jsxs("div", {
60129
+ selectedIndex !== undefined && (selectedPreviewAttachment || selectedLocalPreviewUrl) ? /*#__PURE__*/ jsxs("div", {
60078
60130
  "aria-label": "Xem ảnh",
60079
60131
  "aria-modal": "true",
60080
60132
  className: "navi-chat__attachment-dialog",
@@ -60109,7 +60161,11 @@ function MessageAttachmentGallery(param) {
60109
60161
  size: 24
60110
60162
  })
60111
60163
  }),
60112
- selectedViewIsFresh && selectedView ? /*#__PURE__*/ jsx("img", {
60164
+ selectedLocalPreviewUrl ? /*#__PURE__*/ jsx("img", {
60165
+ alt: (_ref = selectedAttachment === null || selectedAttachment === void 0 ? void 0 : selectedAttachment.fileName) !== null && _ref !== void 0 ? _ref : 'Ảnh',
60166
+ className: "navi-chat__attachment-dialog-image",
60167
+ src: selectedLocalPreviewUrl
60168
+ }) : selectedViewIsFresh && selectedView && selectedPreviewAttachment ? /*#__PURE__*/ jsx("img", {
60113
60169
  alt: selectedPreviewAttachment.fileName,
60114
60170
  className: "navi-chat__attachment-dialog-image",
60115
60171
  onError: function() {
@@ -60137,7 +60193,7 @@ function MessageAttachmentGallery(param) {
60137
60193
  }) : /*#__PURE__*/ jsx("div", {
60138
60194
  className: "navi-chat__attachment-dialog-loading",
60139
60195
  role: "status",
60140
- children: viewLoadingIds.has(selectedAttachment.id) ? 'Đang tải ảnh...' : 'Đang chuẩn bị ảnh...'
60196
+ children: selectedAttachment && viewLoadingIds.has(selectedAttachment.id) ? 'Đang tải ảnh...' : 'Đang chuẩn bị ảnh...'
60141
60197
  }),
60142
60198
  /*#__PURE__*/ jsx("button", {
60143
60199
  "aria-label": "Ảnh sau",
@@ -60171,7 +60227,7 @@ var isChatAttachmentView = function(value) {
60171
60227
  };
60172
60228
  var deleteCachedView = function(attachmentId, cacheRef, setCache) {
60173
60229
  if (!cacheRef.current[attachmentId]) return;
60174
- var next = _object_spread$7({}, cacheRef.current);
60230
+ var next = _object_spread$8({}, cacheRef.current);
60175
60231
  delete next[attachmentId];
60176
60232
  cacheRef.current = next;
60177
60233
  setCache(next);
@@ -60371,10 +60427,11 @@ function _ts_generator$6(thisArg, body) {
60371
60427
  }
60372
60428
  }
60373
60429
  function MessageList(param) {
60374
- var canDeleteOwn = param.canDeleteOwn, canEditOwn = param.canEditOwn, canForward = param.canForward, canModerate = param.canModerate, className = param.className, currentSubject = param.currentSubject, hasMore = param.hasMore, isLoadingOlder = param.isLoadingOlder, itemClassName = param.itemClassName, _param_messageActionWindowMs = param.messageActionWindowMs, messageActionWindowMs = _param_messageActionWindowMs === void 0 ? 15 * 60 * 1000 : _param_messageActionWindowMs, messages = param.messages, _param_now = param.now, now = _param_now === void 0 ? function() {
60430
+ var canDeleteOwn = param.canDeleteOwn, canEditOwn = param.canEditOwn, canForward = param.canForward, canModerate = param.canModerate, className = param.className, currentSubject = param.currentSubject, hasMore = param.hasMore, isLoadingOlder = param.isLoadingOlder, itemClassName = param.itemClassName, localPreviewUrls = param.localPreviewUrls, _param_messageActionWindowMs = param.messageActionWindowMs, messageActionWindowMs = _param_messageActionWindowMs === void 0 ? 15 * 60 * 1000 : _param_messageActionWindowMs, messages = param.messages, _param_now = param.now, now = _param_now === void 0 ? function() {
60375
60431
  return new Date();
60376
60432
  } : _param_now, onDeleteMessage = param.onDeleteMessage, onEditMessage = param.onEditMessage, onForwardMessage = param.onForwardMessage, onLatestStateChange = param.onLatestStateChange, onLoadOlder = param.onLoadOlder, onRetryAttachment = param.onRetryAttachment, onRefreshAttachment = param.onRefreshAttachment;
60377
60433
  var listRef = useRef(null);
60434
+ var messagesStackRef = useRef(null);
60378
60435
  var restoreScrollSnapshotRef = useRef(undefined);
60379
60436
  var previousMessageCountRef = useRef(messages.length);
60380
60437
  var previousMessagesRef = useRef(messages);
@@ -60386,6 +60443,7 @@ function MessageList(param) {
60386
60443
  return now().getTime();
60387
60444
  }), 2), currentTimeMs = _useState3[0], setCurrentTimeMs = _useState3[1];
60388
60445
  var _useState4 = _sliced_to_array$9(useState(true), 2), isAtLatest = _useState4[0], setIsAtLatest = _useState4[1];
60446
+ var isAtLatestRef = useRef(true);
60389
60447
  var _useState5 = _sliced_to_array$9(useState(false), 2), hasNewMessages = _useState5[0], setHasNewMessages = _useState5[1];
60390
60448
  var orderedMessages = useMemo(function() {
60391
60449
  return _to_consumable_array$2(messages).sort(compareMessagesByCreatedAt);
@@ -60426,6 +60484,20 @@ function MessageList(param) {
60426
60484
  messages.length,
60427
60485
  scrollToLatest
60428
60486
  ]);
60487
+ useLayoutEffect(function() {
60488
+ var messagesStack = messagesStackRef.current;
60489
+ if (!messagesStack || typeof ResizeObserver === 'undefined') return undefined;
60490
+ var observer = new ResizeObserver(function() {
60491
+ if (isAtLatestRef.current) scrollToLatest();
60492
+ });
60493
+ observer.observe(messagesStack);
60494
+ return function() {
60495
+ return observer.disconnect();
60496
+ };
60497
+ }, [
60498
+ messages.length,
60499
+ scrollToLatest
60500
+ ]);
60429
60501
  useEffect(function() {
60430
60502
  if (nextOwnActionDeadlineMs === undefined) return undefined;
60431
60503
  var timeout = window.setTimeout(function() {
@@ -60440,6 +60512,7 @@ function MessageList(param) {
60440
60512
  now
60441
60513
  ]);
60442
60514
  useLayoutEffect(function() {
60515
+ isAtLatestRef.current = isAtLatest;
60443
60516
  onLatestStateChange === null || onLatestStateChange === void 0 ? void 0 : onLatestStateChange(isAtLatest);
60444
60517
  }, [
60445
60518
  isAtLatest,
@@ -60499,11 +60572,13 @@ function MessageList(param) {
60499
60572
  void (onLoadOlder === null || onLoadOlder === void 0 ? void 0 : onLoadOlder());
60500
60573
  }
60501
60574
  var nextIsAtLatest = isScrolledToLatest(list);
60575
+ isAtLatestRef.current = nextIsAtLatest;
60502
60576
  setIsAtLatest(nextIsAtLatest);
60503
60577
  if (nextIsAtLatest) setHasNewMessages(false);
60504
60578
  };
60505
60579
  var handleScrollToLatest = function() {
60506
60580
  scrollToLatest();
60581
+ isAtLatestRef.current = true;
60507
60582
  setIsAtLatest(true);
60508
60583
  setHasNewMessages(false);
60509
60584
  };
@@ -60572,6 +60647,7 @@ function MessageList(param) {
60572
60647
  children: [
60573
60648
  /*#__PURE__*/ jsxs("div", {
60574
60649
  className: "navi-chat__messages-stack",
60650
+ ref: messagesStackRef,
60575
60651
  children: [
60576
60652
  isLoadingOlder ? /*#__PURE__*/ jsx("div", {
60577
60653
  className: "navi-chat__loading-older",
@@ -60654,6 +60730,7 @@ function MessageList(param) {
60654
60730
  }) : null,
60655
60731
  message.status === 'active' && ((_message_attachments = message.attachments) === null || _message_attachments === void 0 ? void 0 : _message_attachments.length) ? /*#__PURE__*/ jsx(MessageAttachmentGallery, {
60656
60732
  attachments: message.attachments,
60733
+ localPreviewUrls: localPreviewUrls,
60657
60734
  now: now,
60658
60735
  onRefreshPreview: onRefreshAttachment ? function(attachmentId) {
60659
60736
  return onRefreshAttachment(message.id, attachmentId, 'preview');
@@ -60864,6 +60941,19 @@ function _async_to_generator$5(fn) {
60864
60941
  });
60865
60942
  };
60866
60943
  }
60944
+ function _define_property$7(obj, key, value) {
60945
+ if (key in obj) {
60946
+ Object.defineProperty(obj, key, {
60947
+ value: value,
60948
+ enumerable: true,
60949
+ configurable: true,
60950
+ writable: true
60951
+ });
60952
+ } else {
60953
+ obj[key] = value;
60954
+ }
60955
+ return obj;
60956
+ }
60867
60957
  function _iterable_to_array_limit$8(arr, i) {
60868
60958
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
60869
60959
  if (_i == null) return;
@@ -60891,6 +60981,21 @@ function _iterable_to_array_limit$8(arr, i) {
60891
60981
  function _non_iterable_rest$8() {
60892
60982
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
60893
60983
  }
60984
+ function _object_spread$7(target) {
60985
+ for(var i = 1; i < arguments.length; i++){
60986
+ var source = arguments[i] != null ? arguments[i] : {};
60987
+ var ownKeys = Object.keys(source);
60988
+ if (typeof Object.getOwnPropertySymbols === "function") {
60989
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
60990
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
60991
+ }));
60992
+ }
60993
+ ownKeys.forEach(function(key) {
60994
+ _define_property$7(target, key, source[key]);
60995
+ });
60996
+ }
60997
+ return target;
60998
+ }
60894
60999
  function _sliced_to_array$8(arr, i) {
60895
61000
  return _array_with_holes$8(arr) || _iterable_to_array_limit$8(arr, i) || _unsupported_iterable_to_array$8(arr, i) || _non_iterable_rest$8();
60896
61001
  }
@@ -61006,6 +61111,8 @@ function ChatPanel(param) {
61006
61111
  var _messagesByRoom_activeRoom_roomId, _ref, _ref1;
61007
61112
  var _useChatContext = useChatContext(), activeRoomId = _useChatContext.activeRoomId, classNames = _useChatContext.classNames, client = _useChatContext.client, currentSubject = _useChatContext.currentSubject, hasMoreByRoom = _useChatContext.hasMoreByRoom, isLoadingOlderByRoom = _useChatContext.isLoadingOlderByRoom, loadOlderMessages = _useChatContext.loadOlderMessages, messagesByRoom = _useChatContext.messagesByRoom, messageActionWindowMs = _useChatContext.messageActionWindowMs, now = _useChatContext.now, onlineCountsByRoom = _useChatContext.onlineCountsByRoom, refreshAttachmentUrl = _useChatContext.refreshAttachmentUrl, retryAttachmentProcessing = _useChatContext.retryAttachmentProcessing, rooms = _useChatContext.rooms, sendMessage = _useChatContext.sendMessage, deleteMessage = _useChatContext.deleteMessage, editMessage = _useChatContext.editMessage, setActiveRoomId = _useChatContext.setActiveRoomId, setRoomAtLatest = _useChatContext.setRoomAtLatest, status = _useChatContext.status, unreadCountsByRoom = _useChatContext.unreadCountsByRoom;
61008
61113
  var _useState = _sliced_to_array$8(useState(), 2), forwardingMessage = _useState[0], setForwardingMessage = _useState[1];
61114
+ var _useState1 = _sliced_to_array$8(useState({}), 2), localPreviewUrls = _useState1[0], setLocalPreviewUrls = _useState1[1];
61115
+ var localPreviewUrlsRef = useRef(localPreviewUrls);
61009
61116
  var activeRoom = findActiveRoom(rooms, activeRoomId);
61010
61117
  var canRead = hasRoomPermission(activeRoom, 'read');
61011
61118
  var canSend = hasRoomPermission(activeRoom, 'send');
@@ -61021,6 +61128,70 @@ function ChatPanel(param) {
61021
61128
  var activeRoomLabel = (_ref = (_ref1 = activeRoom === null || activeRoom === void 0 ? void 0 : activeRoom.label) !== null && _ref1 !== void 0 ? _ref1 : activeRoom === null || activeRoom === void 0 ? void 0 : activeRoom.roomId) !== null && _ref !== void 0 ? _ref : 'Chat';
61022
61129
  var activeRoomOnlineCount = activeRoom ? onlineCountsByRoom[activeRoom.roomId] : undefined;
61023
61130
  var activeRoomRole = getRoomDisplayRole(activeRoom);
61131
+ useEffect(function() {
61132
+ localPreviewUrlsRef.current = localPreviewUrls;
61133
+ }, [
61134
+ localPreviewUrls
61135
+ ]);
61136
+ useEffect(function() {
61137
+ var terminalAttachmentIds = new Set();
61138
+ Object.values(messagesByRoom).flat().forEach(function(message) {
61139
+ var _message_attachments;
61140
+ return (_message_attachments = message.attachments) === null || _message_attachments === void 0 ? void 0 : _message_attachments.forEach(function(attachment) {
61141
+ if ('previewUrl' in attachment || attachment.state === 'failed' || attachment.state === 'rejected') {
61142
+ terminalAttachmentIds.add(attachment.id);
61143
+ }
61144
+ });
61145
+ });
61146
+ // eslint-disable-next-line react-hooks/set-state-in-effect -- revoke local object URLs when processing finishes.
61147
+ setLocalPreviewUrls(function(current) {
61148
+ var next = _object_spread$7({}, current);
61149
+ var changed = false;
61150
+ Object.keys(current).forEach(function(attachmentId) {
61151
+ if (!terminalAttachmentIds.has(attachmentId)) return;
61152
+ URL.revokeObjectURL(current[attachmentId]);
61153
+ delete next[attachmentId];
61154
+ changed = true;
61155
+ });
61156
+ return changed ? next : current;
61157
+ });
61158
+ }, [
61159
+ localPreviewUrls,
61160
+ messagesByRoom
61161
+ ]);
61162
+ useEffect(function() {
61163
+ return function() {
61164
+ Object.values(localPreviewUrlsRef.current).forEach(function(url) {
61165
+ return URL.revokeObjectURL(url);
61166
+ });
61167
+ };
61168
+ }, []);
61169
+ var handleSend = function(input, idempotencyKey) {
61170
+ return _async_to_generator$5(function() {
61171
+ return _ts_generator$5(this, function(_state) {
61172
+ switch(_state.label){
61173
+ case 0:
61174
+ if (!activeRoom) return [
61175
+ 2
61176
+ ];
61177
+ return [
61178
+ 4,
61179
+ sendMessage(activeRoom.roomId, input.text, input.attachmentIds, idempotencyKey)
61180
+ ];
61181
+ case 1:
61182
+ _state.sent();
61183
+ if (input.localPreviewUrls) {
61184
+ setLocalPreviewUrls(function(current) {
61185
+ return _object_spread$7({}, current, input.localPreviewUrls);
61186
+ });
61187
+ }
61188
+ return [
61189
+ 2
61190
+ ];
61191
+ }
61192
+ });
61193
+ })();
61194
+ };
61024
61195
  return /*#__PURE__*/ jsxs("section", {
61025
61196
  className: cx$1('navi-chat__panel', className, classNames === null || classNames === void 0 ? void 0 : classNames.panel),
61026
61197
  children: [
@@ -61074,6 +61245,7 @@ function ChatPanel(param) {
61074
61245
  className: classNames === null || classNames === void 0 ? void 0 : classNames.messageList,
61075
61246
  currentSubject: currentSubject,
61076
61247
  itemClassName: classNames === null || classNames === void 0 ? void 0 : classNames.messageItem,
61248
+ localPreviewUrls: localPreviewUrls,
61077
61249
  hasMore: Boolean(activeRoom && hasMoreByRoom[activeRoom.roomId]),
61078
61250
  isLoadingOlder: Boolean(activeRoom && isLoadingOlderByRoom[activeRoom.roomId]),
61079
61251
  messageActionWindowMs: messageActionWindowMs,
@@ -61098,10 +61270,7 @@ function ChatPanel(param) {
61098
61270
  activeRoom ? /*#__PURE__*/ jsx(MessageComposer, {
61099
61271
  canSend: canSend,
61100
61272
  className: classNames === null || classNames === void 0 ? void 0 : classNames.composer,
61101
- onSend: function(param, idempotencyKey) {
61102
- var attachmentIds = param.attachmentIds, text = param.text;
61103
- return sendMessage(activeRoom.roomId, text, attachmentIds, idempotencyKey);
61104
- },
61273
+ onSend: handleSend,
61105
61274
  roomClient: canSend ? client === null || client === void 0 ? void 0 : client.room(activeRoom.roomId) : undefined
61106
61275
  }) : null,
61107
61276
  /*#__PURE__*/ jsx(ForwardMessageDialog, {