@netless/window-manager 1.0.7-beta.2 → 1.0.7-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -4100,7 +4100,6 @@ class AppMenu {
4100
4100
  createMinimizedItem(appId) {
4101
4101
  const appItem = document.createElement("div");
4102
4102
  appItem.classList.add(this.c("app-menu-item"));
4103
- console.log("appId=====>", appId);
4104
4103
  appItem.setAttribute(`data-${this.c("app-id")}`, appId);
4105
4104
  const titleDiv = document.createElement("div");
4106
4105
  titleDiv.classList.add(this.c("app-menu-item-title"));
@@ -4162,7 +4161,6 @@ class TeleBoxManager {
4162
4161
  this.boxes$ = createVal([]);
4163
4162
  this.topBox$ = this.boxes$.derive((boxes) => {
4164
4163
  if (boxes.length > 0) {
4165
- console.log("topBox===>topBox$===>000");
4166
4164
  let currentTopBox = void 0;
4167
4165
  const topBox = boxes.reduce((topBox2, box) => {
4168
4166
  if (box.boxStatus && box.boxStatus === TELE_BOX_STATE.Minimized) {
@@ -4174,7 +4172,6 @@ class TeleBoxManager {
4174
4172
  }
4175
4173
  return topBox2.zIndex > box.zIndex ? topBox2 : box;
4176
4174
  }, currentTopBox);
4177
- console.log("topBox===>topBox$===>end", topBox == null ? void 0 : topBox.id);
4178
4175
  return topBox;
4179
4176
  }
4180
4177
  return;
@@ -4371,7 +4368,6 @@ class TeleBoxManager {
4371
4368
  this.makeMaximizedTopBoxFocus();
4372
4369
  }
4373
4370
  }
4374
- console.log("checkFocusBox===>", box.id);
4375
4371
  this.focusBox(box);
4376
4372
  return;
4377
4373
  }
@@ -4610,7 +4606,6 @@ class TeleBoxManager {
4610
4606
  }
4611
4607
  });
4612
4608
  this.effectBoxStatusChange();
4613
- console.log("effectBoxesStatusTimerFunc===>newTopBox", newTopBox, curTopBox);
4614
4609
  if (newTopBox && curTopBox !== newTopBox) {
4615
4610
  this.topBox$.setValue(newTopBox);
4616
4611
  }
@@ -4619,7 +4614,7 @@ class TeleBoxManager {
4619
4614
  }
4620
4615
  }
4621
4616
  async effectBoxesStatusChange(skipUpdate = false) {
4622
- var _a, _b, _c, _d, _e, _f;
4617
+ var _a, _b;
4623
4618
  if (!this.useBoxesStatus) {
4624
4619
  if (this.effectBoxesStatusTimer && this.effectBoxesStatusTimer.timer) {
4625
4620
  clearTimeout(this.effectBoxesStatusTimer.timer);
@@ -4634,11 +4629,9 @@ class TeleBoxManager {
4634
4629
  if (this.effectBoxesStatusTimer.skipUpdate !== skipUpdate) {
4635
4630
  clearTimeout(this.effectBoxesStatusTimer.timer);
4636
4631
  if (this.effectBoxesStatusTimer.resolve) {
4637
- console.log("effectBoxStatusTimerFunc===>1111", skipUpdate);
4638
4632
  this.effectBoxesStatusTimer.resolve(!!((_b = this.effectBoxesStatusTimer) == null ? void 0 : _b.skipUpdate));
4639
4633
  }
4640
4634
  this.effectBoxesStatusTimer.skipUpdate = skipUpdate;
4641
- console.log("effectBoxStatusTimerFunc===>2222", skipUpdate);
4642
4635
  } else {
4643
4636
  return;
4644
4637
  }
@@ -4654,17 +4647,13 @@ class TeleBoxManager {
4654
4647
  const _skipUpdate = await new Promise((resolve) => {
4655
4648
  this.effectBoxesStatusTimer.resolve = resolve;
4656
4649
  this.effectBoxesStatusTimer.timer = setTimeout(() => {
4657
- var _a2, _b2;
4658
4650
  if (this.effectBoxesStatusTimer && this.effectBoxesStatusTimer.resolve) {
4659
- console.log("effectBoxStatusTimerFunc===>000", skipUpdate, { id: (_a2 = this.topBox$.value) == null ? void 0 : _a2.id, zIndex: (_b2 = this.topBox$.value) == null ? void 0 : _b2.zIndex }, this.boxes$.value.map((b2) => ({ id: b2.id, focus: b2.focus, boxStatus: b2.boxStatus, zIndex: b2.zIndex })));
4660
4651
  this.effectBoxesStatusTimer.resolve(this.effectBoxesStatusTimer.skipUpdate);
4661
4652
  }
4662
4653
  }, 100);
4663
4654
  });
4664
- console.log("effectBoxStatusTimerFunc===>000==>00", skipUpdate, { id: (_c = this.topBox$.value) == null ? void 0 : _c.id, zIndex: (_d = this.topBox$.value) == null ? void 0 : _d.zIndex }, this.boxes$.value.map((b2) => ({ id: b2.id, focus: b2.focus, boxStatus: b2.boxStatus, zIndex: b2.zIndex })));
4665
4655
  this.effectBoxesStatusTimerFunc(_skipUpdate);
4666
4656
  this.effectBoxesStatusTimer = void 0;
4667
- console.log("effectBoxStatusTimerFunc===>000==>11", skipUpdate, { id: (_e = this.topBox$.value) == null ? void 0 : _e.id, zIndex: (_f = this.topBox$.value) == null ? void 0 : _f.zIndex }, this.boxes$.value.map((b2) => ({ id: b2.id, focus: b2.focus, boxStatus: b2.boxStatus, zIndex: b2.zIndex })));
4668
4657
  }
4669
4658
  }
4670
4659
  hasBoxesStatus() {
@@ -4748,11 +4737,9 @@ class TeleBoxManager {
4748
4737
  clearTimeout(this.effectLastNotMinimizedBoxStatusTimer.timer);
4749
4738
  if (this.effectLastNotMinimizedBoxStatusTimer.skipUpdate !== skipUpdate) {
4750
4739
  if (this.effectLastNotMinimizedBoxStatusTimer.resolve) {
4751
- console.log("effectLastNotMinimizedBoxStatusFunc===>1111", skipUpdate);
4752
4740
  this.effectLastNotMinimizedBoxStatusTimer.resolve(!!((_b = this.effectLastNotMinimizedBoxStatusTimer) == null ? void 0 : _b.skipUpdate));
4753
4741
  }
4754
4742
  this.effectLastNotMinimizedBoxStatusTimer.skipUpdate = skipUpdate;
4755
- console.log("effectLastNotMinimizedBoxStatusFunc===>2222", skipUpdate);
4756
4743
  } else {
4757
4744
  return;
4758
4745
  }
@@ -4769,22 +4756,18 @@ class TeleBoxManager {
4769
4756
  this.effectLastNotMinimizedBoxStatusTimer.resolve = resolve;
4770
4757
  this.effectLastNotMinimizedBoxStatusTimer.timer = setTimeout(() => {
4771
4758
  if (this.effectLastNotMinimizedBoxStatusTimer && this.effectLastNotMinimizedBoxStatusTimer.resolve) {
4772
- console.log("effectLastNotMinimizedBoxStatusTimer===>000", skipUpdate);
4773
4759
  this.effectLastNotMinimizedBoxStatusTimer.resolve(this.effectLastNotMinimizedBoxStatusTimer.skipUpdate);
4774
4760
  }
4775
4761
  }, 100);
4776
4762
  });
4777
- console.log("effectLastNotMinimizedBoxStatusFunc===>000==>00", skipUpdate, this.boxes$.value.map((b2) => ({ id: b2.id, focus: b2.focus, boxStatus: b2.boxStatus, zIndex: b2.zIndex, lastNotMinimizedBoxStatus: b2._lastNotMinimizedBoxStatus$.value })));
4778
4763
  this.effectLastNotMinimizedBoxStatusFunc(_skipUpdate);
4779
4764
  this.effectLastNotMinimizedBoxStatusTimer = void 0;
4780
- console.log("effectLastNotMinimizedBoxStatusFunc===>000==>11", skipUpdate, this.boxes$.value.map((b2) => ({ id: b2.id, focus: b2.focus, boxStatus: b2.boxStatus, zIndex: b2.zIndex, lastNotMinimizedBoxStatus: b2._lastNotMinimizedBoxStatus$.value })));
4781
4765
  }
4782
4766
  }
4783
4767
  effectLastNotMinimizedBoxStatusFunc(skipUpdate = false) {
4784
4768
  if (!this.useBoxesStatus) {
4785
4769
  return;
4786
4770
  }
4787
- console.log("effectLastNotMinimizedBoxStatusFunc===>end", skipUpdate);
4788
4771
  this.boxes.forEach((box) => {
4789
4772
  const boxStatus = this.lastNotMinimizedBoxesStatus$.get(box.id);
4790
4773
  if (boxStatus) {
@@ -4818,8 +4801,6 @@ class TeleBoxManager {
4818
4801
  }, 299);
4819
4802
  }
4820
4803
  create(config = {}, smartPosition = true) {
4821
- var _a;
4822
- console.log("create===>", config, (_a = this.topBox) == null ? void 0 : _a.zIndex);
4823
4804
  const box = new TeleBox({
4824
4805
  zIndex: this.getMaxNormalBoxZIndex() + 1,
4825
4806
  ...smartPosition ? this.smartPosition(config) : config,
@@ -4857,7 +4838,6 @@ class TeleBoxManager {
4857
4838
  } else {
4858
4839
  [...this.boxes].filter((box2) => box2.boxStatus === TELE_BOX_STATE.Normal).sort((a2, b2) => a2.zIndex - b2.zIndex).forEach((box2) => {
4859
4840
  if (box2.boxStatus === TELE_BOX_STATE.Normal) {
4860
- console.log("maximized===>", box2.id);
4861
4841
  this.setBox(box2.id, {
4862
4842
  status: TELE_BOX_STATE.Maximized,
4863
4843
  zIndex: this.getMaxMaximizedBoxZIndex() + 1
@@ -4919,7 +4899,6 @@ class TeleBoxManager {
4919
4899
  });
4920
4900
  box._zIndex$.reaction((_2, __, skipUpdate) => {
4921
4901
  if (this.boxes.length > 0) {
4922
- console.log("topBox===>_zIndex", this.boxes.map((box2) => ({ id: box2.id, zIndex: box2.zIndex, boxStatus: box2.boxStatus })));
4923
4902
  let currentTopBox = void 0;
4924
4903
  const topBox = this.boxes.reduce((topBox2, box2) => {
4925
4904
  if (box2.boxStatus && box2.boxStatus === TELE_BOX_STATE.Minimized) {
@@ -4931,7 +4910,6 @@ class TeleBoxManager {
4931
4910
  }
4932
4911
  return topBox2.zIndex > box2.zIndex ? topBox2 : box2;
4933
4912
  }, currentTopBox);
4934
- console.log("topBox===>_zIndex===>end", topBox == null ? void 0 : topBox.id);
4935
4913
  this.topBox$.setValue(topBox);
4936
4914
  }
4937
4915
  if (!skipUpdate) {
@@ -5214,9 +5192,7 @@ class TeleBoxManager {
5214
5192
  return;
5215
5193
  }
5216
5194
  const maximizedBox = this.getMaximizedTopBox();
5217
- console.log("makeMaximizedTopBoxFocus===>", maximizedBox == null ? void 0 : maximizedBox.id);
5218
5195
  this.maxTitleBar.focusBox(maximizedBox);
5219
- console.log("makeMaximizedTopBoxFocus===>end", maximizedBox == null ? void 0 : maximizedBox.id);
5220
5196
  }
5221
5197
  getBoxIndex(boxOrID) {
5222
5198
  return typeof boxOrID === "string" ? this.boxes.findIndex((box) => box.id === boxOrID) : this.boxes.findIndex((box) => box === boxOrID);
@@ -5240,7 +5216,7 @@ class TeleBoxManager {
5240
5216
  }
5241
5217
  }
5242
5218
  const createBoxManager = (manager, callbacks2, emitter, boxEmitter2, options) => {
5243
- const BoxManagerClass = getExtendClass(BoxManager, WindowManager.extendClass);
5219
+ const BoxManagerClass = getExtendClass$1(BoxManager, WindowManager.extendClass);
5244
5220
  return new BoxManagerClass(
5245
5221
  {
5246
5222
  safeSetAttributes: (attributes) => manager.safeSetAttributes(attributes),
@@ -5346,7 +5322,6 @@ class BoxManager {
5346
5322
  this.teleBoxManager.events.on("focused", (box) => {
5347
5323
  if (box) {
5348
5324
  if (this.canOperate) {
5349
- console.log("focused===>focused", box.id, box.zIndex);
5350
5325
  boxEmitter2.emit("focus", { appId: box.id });
5351
5326
  } else {
5352
5327
  this.teleBoxManager.blurBox(box.id);
@@ -5356,7 +5331,6 @@ class BoxManager {
5356
5331
  this.teleBoxManager.events.on("blurred", (box) => {
5357
5332
  if (box) {
5358
5333
  if (this.canOperate) {
5359
- console.log("focused===>blurred", box.id, box.zIndex);
5360
5334
  boxEmitter2.emit("blurred", { appId: box.id });
5361
5335
  }
5362
5336
  }
@@ -5430,7 +5404,6 @@ class BoxManager {
5430
5404
  id: params.appId,
5431
5405
  boxStatus: params.boxStatus
5432
5406
  };
5433
- console.log("createBox===>", createBoxConfig.id, params.boxStatus);
5434
5407
  this.teleBoxManager.create(createBoxConfig, params.smartPosition);
5435
5408
  this.context.emitter.emit(`${params.appId}${Events.WindowCreated}`);
5436
5409
  }
@@ -5455,7 +5428,10 @@ class BoxManager {
5455
5428
  this.teleBoxManager.update(appId, { boxStatus: status }, true);
5456
5429
  }
5457
5430
  setLastNotMinimizedBoxesStatus(status) {
5458
- this.teleBoxManager.setLastNotMinimizedBoxesStatus(new Map(Object.entries(status != null ? status : {})), true);
5431
+ this.teleBoxManager.setLastNotMinimizedBoxesStatus(
5432
+ new Map(Object.entries(status != null ? status : {})),
5433
+ true
5434
+ );
5459
5435
  }
5460
5436
  setLastNotMinimizedBoxStatus(appId, status) {
5461
5437
  this.teleBoxManager.update(appId, { lastNotMinimizedBoxStatus: status }, true);
@@ -5475,7 +5451,8 @@ class BoxManager {
5475
5451
  prefersColorScheme: createTeleBoxManagerConfig == null ? void 0 : createTeleBoxManagerConfig.prefersColorScheme,
5476
5452
  useBoxesStatus: (createTeleBoxManagerConfig == null ? void 0 : createTeleBoxManagerConfig.useBoxesStatus) || false
5477
5453
  };
5478
- const manager = new TeleBoxManager(initManagerState);
5454
+ const TeleBoxManagerClass = getExtendClass$1(TeleBoxManager, WindowManager.extendClass);
5455
+ const manager = new TeleBoxManagerClass(initManagerState);
5479
5456
  if (this.teleBoxManager) {
5480
5457
  this.teleBoxManager.destroy();
5481
5458
  }
@@ -5488,7 +5465,8 @@ class BoxManager {
5488
5465
  }
5489
5466
  setCollectorContainer(container) {
5490
5467
  var _a;
5491
- const collector = new TeleBoxCollector({
5468
+ const TeleBoxCollectorClass = getExtendClass$1(TeleBoxCollector, WindowManager.extendClass);
5469
+ const collector = new TeleBoxCollectorClass({
5492
5470
  styles: (_a = this.createTeleBoxManagerConfig) == null ? void 0 : _a.collectorStyles
5493
5471
  }).mount(container);
5494
5472
  this.teleBoxManager.setCollector(collector);
@@ -6877,8 +6855,8 @@ class CursorManager {
6877
6855
  }
6878
6856
  }
6879
6857
  }
6880
- function getExtendClass(baseClass, extendClass) {
6881
- switch (baseClass.constructor.name) {
6858
+ function getExtendClass$1(baseClass, extendClass) {
6859
+ switch (baseClass.name) {
6882
6860
  case "AppManager":
6883
6861
  return (extendClass == null ? void 0 : extendClass.AppManager) || AppManager;
6884
6862
  case "BoxManager":
@@ -6889,6 +6867,12 @@ function getExtendClass(baseClass, extendClass) {
6889
6867
  return (extendClass == null ? void 0 : extendClass.CursorManager) || CursorManager;
6890
6868
  case "AppProxy":
6891
6869
  return (extendClass == null ? void 0 : extendClass.AppProxy) || AppProxy;
6870
+ case "AppContext":
6871
+ return (extendClass == null ? void 0 : extendClass.AppContext) || AppContext;
6872
+ case "TeleBoxManager":
6873
+ return (extendClass == null ? void 0 : extendClass.TeleBoxManager) || TeleBoxManager;
6874
+ case "TeleBoxCollector":
6875
+ return (extendClass == null ? void 0 : extendClass.TeleBoxCollector) || TeleBoxCollector;
6892
6876
  default:
6893
6877
  return baseClass;
6894
6878
  }
@@ -7112,7 +7096,7 @@ const createAttributesDelegate = (extendClass, context = {
7112
7096
  throw new Error("safeUpdateAttributes not implemented");
7113
7097
  }
7114
7098
  }) => {
7115
- const AttributesDelegateClass = getExtendClass(AttributesDelegate, extendClass);
7099
+ const AttributesDelegateClass = getExtendClass$1(AttributesDelegate, extendClass);
7116
7100
  return new AttributesDelegateClass(context);
7117
7101
  };
7118
7102
  const calculateNextIndex = (index2, pageState) => {
@@ -7315,7 +7299,8 @@ class AppProxy {
7315
7299
  if (!this.boxManager) {
7316
7300
  throw new BoxManagerNotFoundError();
7317
7301
  }
7318
- const context = new AppContext(this.manager, this.boxManager, appId, this, appOptions);
7302
+ const AppContextClass = getExtendClass$1(AppContext, WindowManager.extendClass);
7303
+ const context = new AppContextClass(this.manager, this.boxManager, appId, this, appOptions);
7319
7304
  this.appContext = context;
7320
7305
  try {
7321
7306
  internalEmitter.once(`${appId}${Events.WindowCreated}`).then(async () => {
@@ -7408,7 +7393,7 @@ class AppProxy {
7408
7393
  const currentAppState = this.getAppInitState(this.id);
7409
7394
  await this.destroy(true, false, true);
7410
7395
  const params = this.params;
7411
- const AppProxyClass = getExtendClass(AppProxy, WindowManager.extendClass);
7396
+ const AppProxyClass = getExtendClass$1(AppProxy, WindowManager.extendClass);
7412
7397
  const appProxy = new AppProxyClass(params, this.manager, this.id, this.isAddApp);
7413
7398
  await appProxy.baseInsertApp(true);
7414
7399
  (_a = this.boxManager) == null ? void 0 : _a.updateBoxState(currentAppState);
@@ -8129,10 +8114,8 @@ class AppManager {
8129
8114
  return safeListenPropsUpdated(
8130
8115
  () => this.attributes.boxesStatus,
8131
8116
  () => {
8132
- var _a, _b, _c, _d;
8133
- const currentBoxesStatus = (_a = this.boxManager) == null ? void 0 : _a.teleBoxManager.boxesStatus;
8134
- console.log("boxesStatus===>autorun", isEqual(Object.entries(this.attributes.boxesStatus), [...(_b = currentBoxesStatus == null ? void 0 : currentBoxesStatus.entries()) != null ? _b : []]), Object.entries(this.attributes.boxesStatus), [...(_c = currentBoxesStatus == null ? void 0 : currentBoxesStatus.entries()) != null ? _c : []]);
8135
- (_d = this.boxManager) == null ? void 0 : _d.setBoxesStatus(this.attributes.boxesStatus);
8117
+ var _a;
8118
+ (_a = this.boxManager) == null ? void 0 : _a.setBoxesStatus(this.attributes.boxesStatus);
8136
8119
  }
8137
8120
  );
8138
8121
  });
@@ -8140,10 +8123,10 @@ class AppManager {
8140
8123
  return safeListenPropsUpdated(
8141
8124
  () => this.attributes.lastNotMinimizedBoxesStatus,
8142
8125
  () => {
8143
- var _a, _b, _c, _d;
8144
- const currentLastNotMinimizedBoxesStatus = (_a = this.boxManager) == null ? void 0 : _a.teleBoxManager.lastNotMinimizedBoxesStatus;
8145
- console.log("lastNotMinimizedBoxesStatus===>autorun", isEqual(Object.entries(this.attributes.lastNotMinimizedBoxesStatus), [...(_b = currentLastNotMinimizedBoxesStatus == null ? void 0 : currentLastNotMinimizedBoxesStatus.entries()) != null ? _b : []]), Object.entries(this.attributes.lastNotMinimizedBoxesStatus), [...(_c = currentLastNotMinimizedBoxesStatus == null ? void 0 : currentLastNotMinimizedBoxesStatus.entries()) != null ? _c : []]);
8146
- (_d = this.boxManager) == null ? void 0 : _d.setLastNotMinimizedBoxesStatus(this.attributes.lastNotMinimizedBoxesStatus);
8126
+ var _a;
8127
+ (_a = this.boxManager) == null ? void 0 : _a.setLastNotMinimizedBoxesStatus(
8128
+ this.attributes.lastNotMinimizedBoxesStatus
8129
+ );
8147
8130
  }
8148
8131
  );
8149
8132
  });
@@ -8581,7 +8564,7 @@ class AppManager {
8581
8564
  console.warn("[WindowManager]: app duplicate exists and cannot be created again");
8582
8565
  return;
8583
8566
  }
8584
- const AppProxyClass = getExtendClass(AppProxy, WindowManager.extendClass);
8567
+ const AppProxyClass = getExtendClass$1(AppProxy, WindowManager.extendClass);
8585
8568
  const appProxy = new AppProxyClass(params, this, appId, isAddApp);
8586
8569
  if (appProxy) {
8587
8570
  await appProxy.baseInsertApp(focus);
@@ -18914,38 +18897,6 @@ const BuiltinApps = {
18914
18897
  var videoJs = "";
18915
18898
  var style$1 = "";
18916
18899
  var style = "";
18917
- var IframeEvents = /* @__PURE__ */ ((IframeEvents2) => {
18918
- IframeEvents2["Init"] = "Init";
18919
- IframeEvents2["AttributesUpdate"] = "AttributesUpdate";
18920
- IframeEvents2["SetAttributes"] = "SetAttributes";
18921
- IframeEvents2["RegisterMagixEvent"] = "RegisterMagixEvent";
18922
- IframeEvents2["RemoveMagixEvent"] = "RemoveMagixEvent";
18923
- IframeEvents2["RemoveAllMagixEvent"] = "RemoveAllMagixEvent";
18924
- IframeEvents2["RoomStateChanged"] = "RoomStateChanged";
18925
- IframeEvents2["DispatchMagixEvent"] = "DispatchMagixEvent";
18926
- IframeEvents2["ReciveMagixEvent"] = "ReciveMagixEvent";
18927
- IframeEvents2["NextPage"] = "NextPage";
18928
- IframeEvents2["PrevPage"] = "PrevPage";
18929
- IframeEvents2["SDKCreate"] = "SDKCreate";
18930
- IframeEvents2["OnCreate"] = "OnCreate";
18931
- IframeEvents2["SetPage"] = "SetPage";
18932
- IframeEvents2["GetAttributes"] = "GetAttributes";
18933
- IframeEvents2["Ready"] = "Ready";
18934
- IframeEvents2["Destory"] = "Destory";
18935
- IframeEvents2["StartCreate"] = "StartCreate";
18936
- IframeEvents2["WrapperDidUpdate"] = "WrapperDidUpdate";
18937
- IframeEvents2["DispayIframe"] = "DispayIframe";
18938
- IframeEvents2["HideIframe"] = "HideIframe";
18939
- IframeEvents2["GetRootRect"] = "GetRootRect";
18940
- IframeEvents2["ReplayRootRect"] = "ReplayRootRect";
18941
- IframeEvents2["PageTo"] = "PageTo";
18942
- return IframeEvents2;
18943
- })(IframeEvents || {});
18944
- var DomEvents = /* @__PURE__ */ ((DomEvents2) => {
18945
- DomEvents2["WrapperDidMount"] = "WrapperDidMount";
18946
- DomEvents2["IframeLoad"] = "IframeLoad";
18947
- return DomEvents2;
18948
- })(DomEvents || {});
18949
18900
  const RefreshIDs = {
18950
18901
  Ready: "Ready",
18951
18902
  RootRect: "ReplayRootRect",
@@ -19499,19 +19450,41 @@ class ExtendPluginManager {
19499
19450
  });
19500
19451
  }
19501
19452
  }
19453
+ function getExtendClass(baseClass, extendClass) {
19454
+ switch (baseClass.name) {
19455
+ case "AppManager":
19456
+ return (extendClass == null ? void 0 : extendClass.AppManager) || AppManager;
19457
+ case "BoxManager":
19458
+ return (extendClass == null ? void 0 : extendClass.BoxManager) || BoxManager;
19459
+ case "AttributesDelegate":
19460
+ return (extendClass == null ? void 0 : extendClass.AttributesDelegate) || AttributesDelegate;
19461
+ case "CursorManager":
19462
+ return (extendClass == null ? void 0 : extendClass.CursorManager) || CursorManager;
19463
+ case "AppProxy":
19464
+ return (extendClass == null ? void 0 : extendClass.AppProxy) || AppProxy;
19465
+ case "AppContext":
19466
+ return (extendClass == null ? void 0 : extendClass.AppContext) || AppContext;
19467
+ case "TeleBoxManager":
19468
+ return (extendClass == null ? void 0 : extendClass.TeleBoxManager) || TeleBoxManager;
19469
+ case "TeleBoxCollector":
19470
+ return (extendClass == null ? void 0 : extendClass.TeleBoxCollector) || TeleBoxCollector;
19471
+ default:
19472
+ return baseClass;
19473
+ }
19474
+ }
19502
19475
  const reconnectRefresher = new ReconnectRefresher({ emitter: internalEmitter });
19503
19476
  const _WindowManager = class extends InvisiblePlugin {
19504
19477
  constructor(context) {
19505
19478
  super(context);
19506
- this.version = "1.0.7-beta.2";
19507
- this.dependencies = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/telebox-insider": "0.3.0-beta.9", "emittery": "^0.9.2", "lodash": "^4.17.21", "p-retry": "^4.6.1", "uuid": "^7.0.3", "video.js": ">=7" }, "peerDependencies": { "jspdf": "2.5.1", "white-web-sdk": "^2.16.52" }, "devDependencies": { "@hyrious/dts": "^0.2.2", "@netless/app-docs-viewer": "^0.2.19", "@netless/app-media-player": "0.1.4", "@rollup/plugin-commonjs": "^20.0.0", "@rollup/plugin-node-resolve": "^13.0.4", "@rollup/plugin-url": "^6.1.0", "@sveltejs/vite-plugin-svelte": "1.0.0-next.30", "@tsconfig/svelte": "^2.0.1", "@types/debug": "^4.1.7", "@types/lodash": "^4.14.182", "@types/lodash-es": "^4.17.4", "@types/uuid": "^8.3.1", "@typescript-eslint/eslint-plugin": "^4.30.0", "@typescript-eslint/parser": "^4.30.0", "@vitest/ui": "^0.14.1", "cypress": "^8.7.0", "dotenv": "^10.0.0", "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-svelte3": "^3.2.0", "jsdom": "^19.0.0", "jspdf": "^2.5.1", "less": "^4.1.1", "prettier": "^2.3.2", "prettier-plugin-svelte": "^2.4.0", "rollup-plugin-analyzer": "^4.0.0", "rollup-plugin-styles": "^3.14.1", "side-effect-manager": "0.1.5", "svelte": "^3.42.4", "typescript": "^4.5.5", "vite": "^2.9.9", "vitest": "^0.14.1", "white-web-sdk": "^2.16.52" } };
19479
+ this.version = "1.0.7-beta.4";
19480
+ this.dependencies = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/telebox-insider": "0.3.0-beta.10", "emittery": "^0.9.2", "lodash": "^4.17.21", "p-retry": "^4.6.1", "uuid": "^7.0.3", "video.js": ">=7" }, "peerDependencies": { "jspdf": "2.5.1", "white-web-sdk": "^2.16.52" }, "devDependencies": { "@hyrious/dts": "^0.2.2", "@netless/app-docs-viewer": "^0.2.19", "@netless/app-media-player": "0.1.4", "@rollup/plugin-commonjs": "^20.0.0", "@rollup/plugin-node-resolve": "^13.0.4", "@rollup/plugin-url": "^6.1.0", "@sveltejs/vite-plugin-svelte": "1.0.0-next.30", "@tsconfig/svelte": "^2.0.1", "@types/debug": "^4.1.7", "@types/lodash": "^4.14.182", "@types/lodash-es": "^4.17.4", "@types/uuid": "^8.3.1", "@typescript-eslint/eslint-plugin": "^4.30.0", "@typescript-eslint/parser": "^4.30.0", "@vitest/ui": "^0.14.1", "cypress": "^8.7.0", "dotenv": "^10.0.0", "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-svelte3": "^3.2.0", "jsdom": "^19.0.0", "jspdf": "^2.5.1", "less": "^4.1.1", "prettier": "^2.3.2", "prettier-plugin-svelte": "^2.4.0", "rollup-plugin-analyzer": "^4.0.0", "rollup-plugin-styles": "^3.14.1", "side-effect-manager": "0.1.5", "svelte": "^3.42.4", "typescript": "^4.5.5", "vite": "^2.9.9", "vitest": "^0.14.1", "white-web-sdk": "^2.16.52" } };
19508
19481
  this.emitter = callbacks$1;
19509
19482
  this.viewMode = ViewMode.Broadcaster;
19510
19483
  this.isReplay = isPlayer(this.displayer);
19511
19484
  this._cursorUIDs = [];
19512
19485
  this.containerSizeRatio = _WindowManager.containerSizeRatio;
19513
19486
  _WindowManager.displayer = context.displayer;
19514
- window.NETLESS_DEPS = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/telebox-insider": "0.3.0-beta.9", "emittery": "^0.9.2", "lodash": "^4.17.21", "p-retry": "^4.6.1", "uuid": "^7.0.3", "video.js": ">=7" }, "peerDependencies": { "jspdf": "2.5.1", "white-web-sdk": "^2.16.52" }, "devDependencies": { "@hyrious/dts": "^0.2.2", "@netless/app-docs-viewer": "^0.2.19", "@netless/app-media-player": "0.1.4", "@rollup/plugin-commonjs": "^20.0.0", "@rollup/plugin-node-resolve": "^13.0.4", "@rollup/plugin-url": "^6.1.0", "@sveltejs/vite-plugin-svelte": "1.0.0-next.30", "@tsconfig/svelte": "^2.0.1", "@types/debug": "^4.1.7", "@types/lodash": "^4.14.182", "@types/lodash-es": "^4.17.4", "@types/uuid": "^8.3.1", "@typescript-eslint/eslint-plugin": "^4.30.0", "@typescript-eslint/parser": "^4.30.0", "@vitest/ui": "^0.14.1", "cypress": "^8.7.0", "dotenv": "^10.0.0", "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-svelte3": "^3.2.0", "jsdom": "^19.0.0", "jspdf": "^2.5.1", "less": "^4.1.1", "prettier": "^2.3.2", "prettier-plugin-svelte": "^2.4.0", "rollup-plugin-analyzer": "^4.0.0", "rollup-plugin-styles": "^3.14.1", "side-effect-manager": "0.1.5", "svelte": "^3.42.4", "typescript": "^4.5.5", "vite": "^2.9.9", "vitest": "^0.14.1", "white-web-sdk": "^2.16.52" } };
19487
+ window.NETLESS_DEPS = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/telebox-insider": "0.3.0-beta.10", "emittery": "^0.9.2", "lodash": "^4.17.21", "p-retry": "^4.6.1", "uuid": "^7.0.3", "video.js": ">=7" }, "peerDependencies": { "jspdf": "2.5.1", "white-web-sdk": "^2.16.52" }, "devDependencies": { "@hyrious/dts": "^0.2.2", "@netless/app-docs-viewer": "^0.2.19", "@netless/app-media-player": "0.1.4", "@rollup/plugin-commonjs": "^20.0.0", "@rollup/plugin-node-resolve": "^13.0.4", "@rollup/plugin-url": "^6.1.0", "@sveltejs/vite-plugin-svelte": "1.0.0-next.30", "@tsconfig/svelte": "^2.0.1", "@types/debug": "^4.1.7", "@types/lodash": "^4.14.182", "@types/lodash-es": "^4.17.4", "@types/uuid": "^8.3.1", "@typescript-eslint/eslint-plugin": "^4.30.0", "@typescript-eslint/parser": "^4.30.0", "@vitest/ui": "^0.14.1", "cypress": "^8.7.0", "dotenv": "^10.0.0", "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-svelte3": "^3.2.0", "jsdom": "^19.0.0", "jspdf": "^2.5.1", "less": "^4.1.1", "prettier": "^2.3.2", "prettier-plugin-svelte": "^2.4.0", "rollup-plugin-analyzer": "^4.0.0", "rollup-plugin-styles": "^3.14.1", "side-effect-manager": "0.1.5", "svelte": "^3.42.4", "typescript": "^4.5.5", "vite": "^2.9.9", "vitest": "^0.14.1", "white-web-sdk": "^2.16.52" } };
19515
19488
  }
19516
19489
  static onCreate(manager) {
19517
19490
  _WindowManager._resolve(manager);
@@ -19568,8 +19541,8 @@ const _WindowManager = class extends InvisiblePlugin {
19568
19541
  _WindowManager.containerSizeRatio = containerSizeRatio;
19569
19542
  }
19570
19543
  await manager.ensureAttributes();
19571
- const AppManagerClass = getExtendClass(AppManager, _WindowManager.extendClass);
19572
- const CursorManagerClass = getExtendClass(CursorManager, _WindowManager.extendClass);
19544
+ const AppManagerClass = getExtendClass$1(AppManager, _WindowManager.extendClass);
19545
+ const CursorManagerClass = getExtendClass$1(CursorManager, _WindowManager.extendClass);
19573
19546
  manager._fullscreen = params.fullscreen;
19574
19547
  manager.appManager = new AppManagerClass(manager);
19575
19548
  manager.appManager.polling = params.polling || false;
@@ -20319,5 +20292,5 @@ WindowManager.containerSizeRatio = DEFAULT_CONTAINER_RATIO;
20319
20292
  WindowManager.isCreated = false;
20320
20293
  WindowManager._resolve = (_manager) => void 0;
20321
20294
  setupBuiltin();
20322
- export { AppCreateError, AppManagerNotInitError, AppNotRegisterError, BindContainerRoomPhaseInvalidError, BoxManagerNotFoundError, BoxNotCreatedError, BuiltinApps, DomEvents, ExtendPlugin, ExtendPluginManager, IframeBridge, IframeEvents, InvalidScenePath, ParamsInvalidError, WhiteWebSDKInvalidError, WindowManager, calculateNextIndex, reconnectRefresher };
20295
+ export { AppContext, AppCreateError, AppManager, AppManagerNotInitError, AppNotRegisterError, AppProxy, AttributesDelegate, BindContainerRoomPhaseInvalidError, BoxManager, BoxManagerNotFoundError, BoxNotCreatedError, BuiltinApps, CursorManager, ExtendPlugin, ExtendPluginManager, InvalidScenePath, ParamsInvalidError, TeleBoxCollector, TeleBoxManager, WhiteWebSDKInvalidError, WindowManager, calculateNextIndex, getExtendClass, reconnectRefresher };
20323
20296
  //# sourceMappingURL=index.mjs.map