@netless/window-manager 1.0.0-canary.75 → 1.0.0-canary.77

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.umd.js CHANGED
@@ -1,5 +1,5 @@
1
- (function(global, factory) {
2
- typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("p-retry"), require("emittery"), require("lodash"), require("white-web-sdk"), require("uuid"), require("@netless/synced-store"), require("value-enhancer"), require("side-effect-manager"), require("@juggle/resize-observer")) : typeof define === "function" && define.amd ? define(["exports", "p-retry", "emittery", "lodash", "white-web-sdk", "uuid", "@netless/synced-store", "value-enhancer", "side-effect-manager", "@juggle/resize-observer"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.WindowManager = {}, global.pRetry, global.Emittery, global.lodash, global.whiteWebSdk, global.uuid, global.syncedStore, global.valueEnhancer, global.sideEffectManager, global.resizeObserver));
1
+ (function(global2, factory) {
2
+ typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("p-retry"), require("emittery"), require("lodash"), require("white-web-sdk"), require("uuid"), require("@netless/synced-store"), require("value-enhancer"), require("side-effect-manager"), require("@juggle/resize-observer")) : typeof define === "function" && define.amd ? define(["exports", "p-retry", "emittery", "lodash", "white-web-sdk", "uuid", "@netless/synced-store", "value-enhancer", "side-effect-manager", "@juggle/resize-observer"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.WindowManager = {}, global2.pRetry, global2.Emittery, global2.lodash, global2.whiteWebSdk, global2.uuid, global2.syncedStore, global2.valueEnhancer, global2.sideEffectManager, global2.resizeObserver));
3
3
  })(this, function(exports2, pRetry, Emittery, lodash, whiteWebSdk, uuid, syncedStore, valueEnhancer, sideEffectManager, resizeObserver) {
4
4
  "use strict";
5
5
  var Events = /* @__PURE__ */ ((Events2) => {
@@ -769,11 +769,17 @@
769
769
  }
770
770
  };
771
771
  const findMemberByUid = (room, uid) => {
772
- const roomMembers = room == null ? void 0 : room.state.roomMembers;
773
- return roomMembers == null ? void 0 : roomMembers.find((member) => {
774
- var _a;
775
- return ((_a = member.payload) == null ? void 0 : _a.uid) === uid;
776
- });
772
+ var _a;
773
+ const roomMembers = (room == null ? void 0 : room.state.roomMembers) || [];
774
+ let maxMemberId = -1;
775
+ let result = void 0;
776
+ for (const member of roomMembers) {
777
+ if (((_a = member.payload) == null ? void 0 : _a.uid) === uid && maxMemberId < member.memberId) {
778
+ maxMemberId = member.memberId;
779
+ result = member;
780
+ }
781
+ }
782
+ return result;
777
783
  };
778
784
  const serializeRoomMembers = (members) => {
779
785
  return members.map((member) => {
@@ -962,9 +968,11 @@
962
968
  return this.displayer.calibrationTimestamp;
963
969
  }
964
970
  }
971
+ /** Get App writable status. */
965
972
  get isWritable() {
966
- return this.manager.canOperate && !this.destroyed;
973
+ return this.appProxy.isWritable && !this.destroyed;
967
974
  }
975
+ /** Get the App Window UI box. */
968
976
  get box() {
969
977
  const box = this.appProxy.box$.value;
970
978
  if (box) {
@@ -979,6 +987,7 @@
979
987
  get members() {
980
988
  return this.manager.members$.value;
981
989
  }
990
+ //** currentMember is undefined in read-only and replay mode. */
982
991
  get currentMember() {
983
992
  const self2 = findMemberByUid(this.room, this.manager.uid);
984
993
  if (!self2) {
@@ -1264,9 +1273,15 @@
1264
1273
  this.context = context;
1265
1274
  this.setAppFocus = (appId, focus) => {
1266
1275
  if (focus) {
1267
- this.context.safeSetAttributes({ ["focus"]: appId });
1276
+ this.context.safeSetAttributes({ [
1277
+ "focus"
1278
+ /* Focus */
1279
+ ]: appId });
1268
1280
  } else {
1269
- this.context.safeSetAttributes({ ["focus"]: void 0 });
1281
+ this.context.safeSetAttributes({ [
1282
+ "focus"
1283
+ /* Focus */
1284
+ ]: void 0 });
1270
1285
  }
1271
1286
  };
1272
1287
  }
@@ -1277,16 +1292,26 @@
1277
1292
  return this.context.getAttributes();
1278
1293
  }
1279
1294
  apps() {
1280
- return lodash.get(this.attributes, ["apps"]);
1295
+ return lodash.get(this.attributes, [
1296
+ "apps"
1297
+ /* Apps */
1298
+ ]);
1281
1299
  }
1282
1300
  get focus() {
1283
- return lodash.get(this.attributes, ["focus"]);
1301
+ return lodash.get(this.attributes, [
1302
+ "focus"
1303
+ /* Focus */
1304
+ ]);
1284
1305
  }
1285
1306
  getAppAttributes(id) {
1286
1307
  return lodash.get(this.apps(), [id]);
1287
1308
  }
1288
1309
  getAppState(id) {
1289
- return lodash.get(this.apps(), [id, "state"]);
1310
+ return lodash.get(this.apps(), [
1311
+ id,
1312
+ "state"
1313
+ /* State */
1314
+ ]);
1290
1315
  }
1291
1316
  getMaximized() {
1292
1317
  return lodash.get(this.attributes, ["maximized"]);
@@ -1310,14 +1335,24 @@
1310
1335
  }
1311
1336
  attrs.createdAt = Date.now();
1312
1337
  this.context.safeUpdateAttributes(["apps", id], attrs);
1313
- this.context.safeUpdateAttributes(["apps", id, "state"], {
1338
+ this.context.safeUpdateAttributes([
1339
+ "apps",
1340
+ id,
1341
+ "state"
1342
+ /* State */
1343
+ ], {
1314
1344
  [AppAttributes.Size]: {},
1315
1345
  [AppAttributes.Position]: {},
1316
1346
  [AppAttributes.SceneIndex]: 0
1317
1347
  });
1318
1348
  }
1319
1349
  updateAppState(appId, stateName, state) {
1320
- if (lodash.get(this.attributes, ["apps", appId, "state"])) {
1350
+ if (lodash.get(this.attributes, [
1351
+ "apps",
1352
+ appId,
1353
+ "state"
1354
+ /* State */
1355
+ ])) {
1321
1356
  this.context.safeUpdateAttributes(["apps", appId, "state", stateName], state);
1322
1357
  }
1323
1358
  }
@@ -1327,13 +1362,19 @@
1327
1362
  cleanAppAttributes(id) {
1328
1363
  this.context.safeUpdateAttributes(["apps", id], void 0);
1329
1364
  this.context.safeSetAttributes({ [id]: void 0 });
1330
- const focus = this.attributes["focus"];
1365
+ const focus = this.attributes[
1366
+ "focus"
1367
+ /* Focus */
1368
+ ];
1331
1369
  if (focus === id) {
1332
1370
  this.cleanFocus();
1333
1371
  }
1334
1372
  }
1335
1373
  cleanFocus() {
1336
- this.context.safeSetAttributes({ ["focus"]: void 0 });
1374
+ this.context.safeSetAttributes({ [
1375
+ "focus"
1376
+ /* Focus */
1377
+ ]: void 0 });
1337
1378
  }
1338
1379
  getAppSceneIndex(id) {
1339
1380
  var _a;
@@ -1350,7 +1391,10 @@
1350
1391
  return this.attributes["_mainSceneIndex"];
1351
1392
  }
1352
1393
  getBoxState() {
1353
- return this.attributes["boxState"];
1394
+ return this.attributes[
1395
+ "boxState"
1396
+ /* BoxState */
1397
+ ];
1354
1398
  }
1355
1399
  setMainViewScenePath(scenePath) {
1356
1400
  this.context.safeSetAttributes({ _mainScenePath: scenePath });
@@ -1359,44 +1403,84 @@
1359
1403
  this.context.safeSetAttributes({ _mainSceneIndex: index2 });
1360
1404
  }
1361
1405
  getMainViewCamera() {
1362
- return lodash.get(this.attributes, ["mainViewCamera"]);
1406
+ return lodash.get(this.attributes, [
1407
+ "mainViewCamera"
1408
+ /* MainViewCamera */
1409
+ ]);
1363
1410
  }
1364
1411
  getMainViewSize() {
1365
- return lodash.get(this.attributes, ["mainViewSize"]);
1412
+ return lodash.get(this.attributes, [
1413
+ "mainViewSize"
1414
+ /* MainViewSize */
1415
+ ]);
1366
1416
  }
1367
1417
  setMainViewCamera(camera) {
1368
- this.context.safeSetAttributes({ ["mainViewCamera"]: { ...camera } });
1418
+ this.context.safeSetAttributes({ [
1419
+ "mainViewCamera"
1420
+ /* MainViewCamera */
1421
+ ]: { ...camera } });
1369
1422
  }
1370
1423
  setMainViewSize(size) {
1371
- this.context.safeSetAttributes({ ["mainViewSize"]: { ...size } });
1424
+ this.context.safeSetAttributes({ [
1425
+ "mainViewSize"
1426
+ /* MainViewSize */
1427
+ ]: { ...size } });
1372
1428
  }
1373
1429
  setMainViewCameraAndSize(camera, size) {
1374
1430
  this.context.safeSetAttributes({
1375
- ["mainViewCamera"]: { ...camera },
1376
- ["mainViewSize"]: { ...size }
1431
+ [
1432
+ "mainViewCamera"
1433
+ /* MainViewCamera */
1434
+ ]: { ...camera },
1435
+ [
1436
+ "mainViewSize"
1437
+ /* MainViewSize */
1438
+ ]: { ...size }
1377
1439
  });
1378
1440
  }
1379
1441
  updateCursor(uid, position) {
1380
- if (!lodash.get(this.attributes, ["cursors"])) {
1381
- this.context.safeUpdateAttributes(["cursors"], {});
1442
+ if (!lodash.get(this.attributes, [
1443
+ "cursors"
1444
+ /* Cursors */
1445
+ ])) {
1446
+ this.context.safeUpdateAttributes([
1447
+ "cursors"
1448
+ /* Cursors */
1449
+ ], {});
1382
1450
  }
1383
1451
  if (!lodash.get(this.attributes, ["cursors", uid])) {
1384
1452
  this.context.safeUpdateAttributes(["cursors", uid], {});
1385
1453
  }
1386
- this.context.safeUpdateAttributes(["cursors", uid, "position"], position);
1454
+ this.context.safeUpdateAttributes([
1455
+ "cursors",
1456
+ uid,
1457
+ "position"
1458
+ /* Position */
1459
+ ], position);
1387
1460
  }
1388
1461
  updateCursorState(uid, cursorState) {
1389
1462
  if (!lodash.get(this.attributes, ["cursors", uid])) {
1390
1463
  this.context.safeUpdateAttributes(["cursors", uid], {});
1391
1464
  }
1392
- this.context.safeUpdateAttributes(["cursors", uid, "cursorState"], cursorState);
1465
+ this.context.safeUpdateAttributes([
1466
+ "cursors",
1467
+ uid,
1468
+ "cursorState"
1469
+ /* CursorState */
1470
+ ], cursorState);
1393
1471
  }
1394
1472
  getCursorState(uid) {
1395
- return lodash.get(this.attributes, ["cursors", uid, "cursorState"]);
1473
+ return lodash.get(this.attributes, [
1474
+ "cursors",
1475
+ uid,
1476
+ "cursorState"
1477
+ /* CursorState */
1478
+ ]);
1396
1479
  }
1397
1480
  cleanCursor(uid) {
1398
1481
  this.context.safeUpdateAttributes(["cursors", uid], void 0);
1399
1482
  }
1483
+ // TODO 状态中保存一个 SceneName 优化性能
1400
1484
  setMainViewFocusPath(mainView) {
1401
1485
  const scenePath = this.getMainViewScenePath();
1402
1486
  if (scenePath) {
@@ -1844,6 +1928,7 @@
1844
1928
  throw new Error(`[WindowManager]: app setup error: ${error.message}`);
1845
1929
  }
1846
1930
  }
1931
+ // 兼容移动端创建时会出现 PPT 不适配的问题
1847
1932
  fixMobileSize() {
1848
1933
  var _a, _b;
1849
1934
  const box = (_a = this.boxManager) == null ? void 0 : _a.getBox(this.id);
@@ -1974,6 +2059,7 @@
1974
2059
  get pageState() {
1975
2060
  return this._pageState.toObject();
1976
2061
  }
2062
+ // PageRemoveService
1977
2063
  async removeSceneByIndex(index2) {
1978
2064
  const scenePath = this._pageState.getFullPath(index2);
1979
2065
  if (scenePath && this.pageState) {
@@ -1997,6 +2083,7 @@
1997
2083
  this.view.focusSceneIndex = index2;
1998
2084
  }
1999
2085
  }
2086
+ // PageRemoveService end
2000
2087
  setSceneIndex(index2) {
2001
2088
  if (this.view) {
2002
2089
  this.view.focusSceneIndex = index2;
@@ -2508,8 +2595,8 @@
2508
2595
  defaultState: { scrollTop: 0 }
2509
2596
  });
2510
2597
  };
2511
- function clamp$2(x2, min, max) {
2512
- return x2 < min ? min : x2 > max ? max : x2;
2598
+ function clamp$2(x, min, max) {
2599
+ return x < min ? min : x > max ? max : x;
2513
2600
  }
2514
2601
  class ScrollMode {
2515
2602
  constructor(manager) {
@@ -3068,6 +3155,10 @@
3068
3155
  });
3069
3156
  });
3070
3157
  }
3158
+ /**
3159
+ * 根目录被删除时所有的 scene 都会被删除.
3160
+ * 所以需要关掉所有开启了 view 的 app
3161
+ */
3071
3162
  async onRootDirRemoved(needClose = true) {
3072
3163
  await this.setMainViewScenePath(INIT_DIR);
3073
3164
  this.createRootDirScenesCallback();
@@ -3172,6 +3263,12 @@
3172
3263
  return () => redoUndo.destroy();
3173
3264
  });
3174
3265
  }
3266
+ /**
3267
+ * 插件更新 apps 时的回调
3268
+ *
3269
+ * @param {*} apps
3270
+ * @memberof WindowManager
3271
+ */
3175
3272
  async _attributesUpdateCallback(apps) {
3176
3273
  if (apps && WindowManager.container) {
3177
3274
  const appIds = Object.keys(apps);
@@ -3438,6 +3535,20 @@
3438
3535
  (_a = this.scrollMode) == null ? void 0 : _a.dispose();
3439
3536
  }
3440
3537
  }
3538
+ /*! *****************************************************************************
3539
+ Copyright (c) Microsoft Corporation.
3540
+
3541
+ Permission to use, copy, modify, and/or distribute this software for any
3542
+ purpose with or without fee is hereby granted.
3543
+
3544
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
3545
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
3546
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
3547
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
3548
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
3549
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
3550
+ PERFORMANCE OF THIS SOFTWARE.
3551
+ ***************************************************************************** */
3441
3552
  var __assign = function() {
3442
3553
  __assign = Object.assign || function __assign2(t) {
3443
3554
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -4246,6 +4357,9 @@
4246
4357
  var node = typeof nodeOrSelector === "string" ? document.querySelector(nodeOrSelector) : nodeOrSelector;
4247
4358
  return getStyler(node, props);
4248
4359
  }
4360
+ function getDefaultExportFromCjs(x) {
4361
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
4362
+ }
4249
4363
  var shallowequal = function shallowEqual(objA, objB, compare, compareContext) {
4250
4364
  var ret = compare ? compare.call(compareContext, objA, objB) : void 0;
4251
4365
  if (ret !== void 0) {
@@ -4277,6 +4391,7 @@
4277
4391
  }
4278
4392
  return true;
4279
4393
  };
4394
+ const shallowequal$1 = /* @__PURE__ */ getDefaultExportFromCjs(shallowequal);
4280
4395
  var shadowStyles = /* @__PURE__ */ (() => '.tele-fancy-scrollbar {\n overscroll-behavior: contain;\n overflow: auto;\n overflow-y: scroll;\n overflow-y: overlay;\n -webkit-overflow-scrolling: touch;\n -ms-overflow-style: -ms-autohiding-scrollbar;\n scrollbar-width: auto;\n}\n.tele-fancy-scrollbar::-webkit-scrollbar {\n height: 8px;\n width: 8px;\n}\n.tele-fancy-scrollbar::-webkit-scrollbar-track {\n background-color: transparent;\n}\n.tele-fancy-scrollbar::-webkit-scrollbar-thumb {\n background-color: rgba(68, 78, 96, 0.1);\n background-color: transparent;\n border-radius: 4px;\n transition: background-color 0.4s;\n}\n.tele-fancy-scrollbar:hover::-webkit-scrollbar-thumb {\n background-color: rgba(68, 78, 96, 0.1);\n}\n.tele-fancy-scrollbar::-webkit-scrollbar-thumb:hover {\n background-color: rgba(68, 78, 96, 0.2);\n}\n.tele-fancy-scrollbar::-webkit-scrollbar-thumb:active {\n background-color: rgba(68, 78, 96, 0.2);\n}\n.tele-fancy-scrollbar::-webkit-scrollbar-thumb:vertical {\n min-height: 50px;\n}\n.tele-fancy-scrollbar::-webkit-scrollbar-thumb:horizontal {\n min-width: 50px;\n}\n.telebox-quarantine {\n all: initial;\n position: relative;\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n}\n.telebox-body-wrap {\n color: #191919;\n color: var(--tele-boxColor, #191919);\n flex: 1;\n width: 100%;\n overflow: hidden;\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n}\n.telebox-content {\n width: 100%;\n height: 100%;\n position: relative;\n background-color: #f9f9f9;\n background-color: var(--tele-boxContainerBackground, #f9f9f9);\n}\n.telebox-box-stage {\n position: absolute;\n z-index: 1;\n overflow: hidden;\n background-color: #fff;\n background-color: var(--tele-boxStageBackground, #fff);\n box-shadow: 0px 0px 16px rgba(0, 0, 0, 0.08);\n box-shadow: var(--tele-boxStageShadow, 0px 0px 16px rgba(0, 0, 0, 0.08));\n}\n.telebox-footer-wrap {\n flex-shrink: 0;\n display: flex;\n flex-direction: column;\n color: #191919;\n color: var(--tele-boxFooterColor, #191919);\n background-color: #fff;\n background-color: var(--tele-boxFooterBackground, #fff);\n}\n.telebox-footer-wrap::before {\n content: "";\n display: block;\n flex: 1;\n}\n.telebox-color-scheme-dark {\n color-scheme: dark;\n}\n.telebox-color-scheme-dark .telebox-body-wrap {\n color: #e9e9e9;\n color: var(--tele-boxColor, #e9e9e9);\n}\n.telebox-color-scheme-dark .telebox-content {\n background-color: #25282e;\n background-color: var(--tele-boxContainerBackground, #25282e);\n}\n.telebox-color-scheme-dark .telebox-box-stage {\n background-color: #272a30;\n background-color: var(--tele-boxStageBackground, #272a30);\n box-shadow: 0px 0px 16px rgba(0, 0, 0, 0.24);\n box-shadow: var(--tele-boxStageShadow, 0px 0px 16px rgba(0, 0, 0, 0.24));\n}\n.telebox-color-scheme-dark .telebox-footer-wrap {\n color: #e9e9e9;\n color: var(--tele-boxFooterColor, #e9e9e9);\n background-color: #383b42;\n background-color: var(--tele-boxFooterBackground, #383b42);\n}')();
4281
4396
  var TELE_BOX_COLOR_SCHEME = /* @__PURE__ */ ((TELE_BOX_COLOR_SCHEME2) => {
4282
4397
  TELE_BOX_COLOR_SCHEME2["Light"] = "light";
@@ -4516,7 +4631,7 @@
4516
4631
  height = 0.5,
4517
4632
  minWidth = 0,
4518
4633
  minHeight = 0,
4519
- x: x2 = 0.1,
4634
+ x = 0.1,
4520
4635
  y = 0.1,
4521
4636
  resizable = true,
4522
4637
  draggable = true,
@@ -4575,36 +4690,36 @@
4575
4690
  const minSize$ = new valueEnhancer.Val({
4576
4691
  width: clamp(minWidth, 0, 1),
4577
4692
  height: clamp(minHeight, 0, 1)
4578
- }, { compare: shallowequal });
4693
+ }, { compare: shallowequal$1 });
4579
4694
  const pxMinSize$ = valueEnhancer.combine([minSize$, managerStageRect$], ([minSize, managerStageRect]) => ({
4580
4695
  width: minSize.width * managerStageRect.width,
4581
4696
  height: minSize.height * managerStageRect.height
4582
- }), { compare: shallowequal });
4583
- const intrinsicSize$ = new valueEnhancer.Val({ width, height }, { compare: shallowequal });
4697
+ }), { compare: shallowequal$1 });
4698
+ const intrinsicSize$ = new valueEnhancer.Val({ width, height }, { compare: shallowequal$1 });
4584
4699
  this._sideEffect.addDisposer(minSize$.reaction((minSize, skipUpdate) => {
4585
4700
  intrinsicSize$.setValue({
4586
4701
  width: Math.max(width, minSize.width),
4587
4702
  height: Math.max(height, minSize.height)
4588
4703
  }, skipUpdate);
4589
4704
  }));
4590
- const intrinsicCoord$ = new valueEnhancer.Val({ x: x2, y }, { compare: shallowequal });
4705
+ const intrinsicCoord$ = new valueEnhancer.Val({ x, y }, { compare: shallowequal$1 });
4591
4706
  const pxIntrinsicSize$ = valueEnhancer.combine([intrinsicSize$, managerStageRect$], ([size, managerStageRect]) => ({
4592
4707
  width: managerStageRect.width * size.width,
4593
4708
  height: managerStageRect.height * size.height
4594
- }), { compare: shallowequal });
4709
+ }), { compare: shallowequal$1 });
4595
4710
  const pxIntrinsicCoord$ = valueEnhancer.combine([intrinsicCoord$, managerStageRect$], ([intrinsicCoord, managerStageRect]) => ({
4596
4711
  x: intrinsicCoord.x * managerStageRect.width,
4597
4712
  y: intrinsicCoord.y * managerStageRect.height
4598
- }), { compare: shallowequal });
4713
+ }), { compare: shallowequal$1 });
4599
4714
  const bodyStyle$ = new valueEnhancer.Val(bodyStyle);
4600
4715
  const stageStyle$ = new valueEnhancer.Val(stageStyle);
4601
4716
  const contentRoot$ = new valueEnhancer.Val(null);
4602
4717
  const bodyRect$ = new valueEnhancer.Val(managerStageRect$.value, {
4603
- compare: shallowequal
4718
+ compare: shallowequal$1
4604
4719
  });
4605
4720
  const stageRatio$ = new valueEnhancer.Val(stageRatio);
4606
4721
  const finalStageRatio$ = valueEnhancer.combine([stageRatio$, managerStageRatio$], ([stageRatio2, managerStageRatio]) => stageRatio2 != null ? stageRatio2 : managerStageRatio);
4607
- const stageRect$ = valueEnhancer.combine([bodyRect$, finalStageRatio$], calcStageRect, { compare: shallowequal });
4722
+ const stageRect$ = valueEnhancer.combine([bodyRect$, finalStageRatio$], calcStageRect, { compare: shallowequal$1 });
4608
4723
  const propsValConfig = {
4609
4724
  darkMode: darkMode$,
4610
4725
  fence: fence$,
@@ -4737,16 +4852,16 @@
4737
4852
  get intrinsicHeight() {
4738
4853
  return this._intrinsicSize$.value.height;
4739
4854
  }
4740
- move(x2, y, skipUpdate = false) {
4855
+ move(x, y, skipUpdate = false) {
4741
4856
  let safeX;
4742
4857
  let safeY;
4743
4858
  const managerStageRect = this.managerStageRect;
4744
4859
  const pxIntrinsicSize = this.pxIntrinsicSize;
4745
4860
  if (this.fence) {
4746
- safeX = clamp(x2, 0, managerStageRect.width - pxIntrinsicSize.width);
4861
+ safeX = clamp(x, 0, managerStageRect.width - pxIntrinsicSize.width);
4747
4862
  safeY = clamp(y, 0, managerStageRect.height - pxIntrinsicSize.height);
4748
4863
  } else {
4749
- safeX = clamp(x2, -(pxIntrinsicSize.width - 120), 0 + managerStageRect.width - 20);
4864
+ safeX = clamp(x, -(pxIntrinsicSize.width - 120), 0 + managerStageRect.width - 20);
4750
4865
  safeY = clamp(y, 0, 0 + managerStageRect.height - 20);
4751
4866
  }
4752
4867
  this._intrinsicCoord$.setValue({
@@ -4754,7 +4869,7 @@
4754
4869
  y: safeY / managerStageRect.height
4755
4870
  }, skipUpdate);
4756
4871
  }
4757
- transform(x2, y, width, height, skipUpdate = false) {
4872
+ transform(x, y, width, height, skipUpdate = false) {
4758
4873
  const managerStageRect = this.managerStageRect;
4759
4874
  width = Math.max(width, this.pxMinSize.width);
4760
4875
  height = Math.max(height, this.pxMinSize.height);
@@ -4769,7 +4884,7 @@
4769
4884
  y = 0;
4770
4885
  height = this.pxIntrinsicSize.height;
4771
4886
  }
4772
- this.move(x2, y, skipUpdate);
4887
+ this.move(x, y, skipUpdate);
4773
4888
  this._intrinsicSize$.setValue({
4774
4889
  width: width / managerStageRect.width,
4775
4890
  height: height / managerStageRect.height
@@ -4914,7 +5029,7 @@
4914
5029
  styles.scaleY = collectorRect.height / boxHeight;
4915
5030
  }
4916
5031
  return styles;
4917
- }, { compare: shallowequal });
5032
+ }, { compare: shallowequal$1 });
4918
5033
  const boxStyles = boxStyles$.value;
4919
5034
  this.$box.style.width = boxStyles.width + "px";
4920
5035
  this.$box.style.height = boxStyles.height + "px";
@@ -5228,10 +5343,10 @@
5228
5343
  }),
5229
5344
  minimized$.subscribe((minimized) => {
5230
5345
  if (minimized) {
5231
- const { x: x2, y, width, height } = $collector.getBoundingClientRect();
5346
+ const { x, y, width, height } = $collector.getBoundingClientRect();
5232
5347
  const rootRect = root.getBoundingClientRect();
5233
5348
  rect$.setValue({
5234
- x: x2 - rootRect.x,
5349
+ x: x - rootRect.x,
5235
5350
  y: y - rootRect.y,
5236
5351
  width,
5237
5352
  height
@@ -5398,7 +5513,7 @@
5398
5513
  y: 0,
5399
5514
  width: window.innerWidth,
5400
5515
  height: window.innerHeight
5401
- }, { compare: shallowequal });
5516
+ }, { compare: shallowequal$1 });
5402
5517
  this._sideEffect.addDisposer(root$.subscribe((root2) => {
5403
5518
  this._sideEffect.add(() => {
5404
5519
  if (!root2) {
@@ -5418,7 +5533,7 @@
5418
5533
  }, "calc-root-rect");
5419
5534
  }));
5420
5535
  const stageRect$ = valueEnhancer.combine([rootRect$, stageRatio$], calcStageRect, {
5421
- compare: shallowequal
5536
+ compare: shallowequal$1
5422
5537
  });
5423
5538
  this.boxes$ = new valueEnhancer.Val([]);
5424
5539
  this.topBox$ = new valueEnhancer.Val(void 0);
@@ -5456,7 +5571,7 @@
5456
5571
  const darkMode$ = valueEnhancer.combine([prefersDark$, prefersColorScheme$], ([prefersDark, prefersColorScheme2]) => prefersColorScheme2 === "auto" ? prefersDark : prefersColorScheme2 === "dark");
5457
5572
  const state$ = valueEnhancer.combine([minimized$, maximized$], ([minimized2, maximized2]) => minimized2 ? TELE_BOX_STATE.Minimized : maximized2 ? TELE_BOX_STATE.Maximized : TELE_BOX_STATE.Normal);
5458
5573
  const theme$ = new valueEnhancer.Val(theme, {
5459
- compare: shallowequal
5574
+ compare: shallowequal$1
5460
5575
  });
5461
5576
  const readonlyValConfig = {
5462
5577
  darkMode: darkMode$,
@@ -5875,11 +5990,11 @@
5875
5990
  }
5876
5991
  }
5877
5992
  smartPosition(rect) {
5878
- let { x: x2, y } = rect;
5993
+ let { x, y } = rect;
5879
5994
  const { width = 0.5, height = 0.5 } = rect;
5880
5995
  const stageRect = this.stageRect;
5881
5996
  const topBox = this.topBox;
5882
- if (x2 == null) {
5997
+ if (x == null) {
5883
5998
  let pxX = 20;
5884
5999
  if (topBox) {
5885
6000
  const pxPreferredX = topBox.pxIntrinsicCoord.x + 20;
@@ -5888,7 +6003,7 @@
5888
6003
  pxX = pxPreferredX;
5889
6004
  }
5890
6005
  }
5891
- x2 = pxX / stageRect.width;
6006
+ x = pxX / stageRect.width;
5892
6007
  }
5893
6008
  if (y == null) {
5894
6009
  let pxY = 20;
@@ -5901,7 +6016,7 @@
5901
6016
  }
5902
6017
  y = pxY / stageRect.height;
5903
6018
  }
5904
- return { x: x2, y, width, height };
6019
+ return { x, y, width, height };
5905
6020
  }
5906
6021
  makeBoxTop(box, skipUpdate = false) {
5907
6022
  if (this.topBox) {
@@ -5952,6 +6067,7 @@
5952
6067
  const { emitter: emitter2, callbacks: callbacks2, boxEmitter: boxEmitter2 } = context;
5953
6068
  this.teleBoxManager = this.setupBoxManager(createTeleBoxManagerConfig);
5954
6069
  this.sideEffectManager.add(() => [
6070
+ // 使用 _xxx$.reaction 订阅修改的值, 不管有没有 skipUpdate, 修改值都会触发回调
5955
6071
  this.teleBoxManager.onValChanged("state", (state) => {
5956
6072
  callbacks2.emit("boxStateChange", state);
5957
6073
  emitter2.emit("boxStateChange", state);
@@ -6168,10 +6284,10 @@
6168
6284
  this.context.callbacks.emit("boxStateChange", this.teleBoxManager.state);
6169
6285
  }
6170
6286
  }
6171
- moveBox({ appId, x: x2, y }) {
6287
+ moveBox({ appId, x, y }) {
6172
6288
  const box = this.getBox(appId);
6173
6289
  if (box) {
6174
- box._intrinsicCoord$.setValue({ x: x2, y }, true);
6290
+ box._intrinsicCoord$.setValue({ x, y }, true);
6175
6291
  }
6176
6292
  }
6177
6293
  focusBox({ appId }, skipUpdate = true) {
@@ -6270,6 +6386,9 @@
6270
6386
  function is_empty(obj) {
6271
6387
  return Object.keys(obj).length === 0;
6272
6388
  }
6389
+ /* @__PURE__ */ new Set();
6390
+ const globals = typeof window !== "undefined" ? window : typeof globalThis !== "undefined" ? globalThis : global;
6391
+ "WeakMap" in globals ? /* @__PURE__ */ new WeakMap() : void 0;
6273
6392
  function append(target, node) {
6274
6393
  target.appendChild(node);
6275
6394
  }
@@ -6301,25 +6420,27 @@
6301
6420
  }
6302
6421
  function set_data(text2, data) {
6303
6422
  data = "" + data;
6304
- if (text2.wholeText !== data)
6305
- text2.data = data;
6423
+ if (text2.data === data)
6424
+ return;
6425
+ text2.data = data;
6306
6426
  }
6307
6427
  function set_style(node, key, value, important) {
6308
- if (value === null) {
6428
+ if (value == null) {
6309
6429
  node.style.removeProperty(key);
6310
6430
  } else {
6311
6431
  node.style.setProperty(key, value, important ? "important" : "");
6312
6432
  }
6313
6433
  }
6434
+ /* @__PURE__ */ new Map();
6314
6435
  let current_component;
6315
6436
  function set_current_component(component) {
6316
6437
  current_component = component;
6317
6438
  }
6318
6439
  const dirty_components = [];
6319
6440
  const binding_callbacks = [];
6320
- const render_callbacks = [];
6441
+ let render_callbacks = [];
6321
6442
  const flush_callbacks = [];
6322
- const resolved_promise = Promise.resolve();
6443
+ const resolved_promise = /* @__PURE__ */ Promise.resolve();
6323
6444
  let update_scheduled = false;
6324
6445
  function schedule_update() {
6325
6446
  if (!update_scheduled) {
@@ -6333,13 +6454,22 @@
6333
6454
  const seen_callbacks = /* @__PURE__ */ new Set();
6334
6455
  let flushidx = 0;
6335
6456
  function flush() {
6457
+ if (flushidx !== 0) {
6458
+ return;
6459
+ }
6336
6460
  const saved_component = current_component;
6337
6461
  do {
6338
- while (flushidx < dirty_components.length) {
6339
- const component = dirty_components[flushidx];
6340
- flushidx++;
6341
- set_current_component(component);
6342
- update(component.$$);
6462
+ try {
6463
+ while (flushidx < dirty_components.length) {
6464
+ const component = dirty_components[flushidx];
6465
+ flushidx++;
6466
+ set_current_component(component);
6467
+ update(component.$$);
6468
+ }
6469
+ } catch (e) {
6470
+ dirty_components.length = 0;
6471
+ flushidx = 0;
6472
+ throw e;
6343
6473
  }
6344
6474
  set_current_component(null);
6345
6475
  dirty_components.length = 0;
@@ -6372,6 +6502,13 @@
6372
6502
  $$.after_update.forEach(add_render_callback);
6373
6503
  }
6374
6504
  }
6505
+ function flush_render_callbacks(fns) {
6506
+ const filtered = [];
6507
+ const targets = [];
6508
+ render_callbacks.forEach((c) => fns.indexOf(c) === -1 ? filtered.push(c) : targets.push(c));
6509
+ targets.forEach((c) => c());
6510
+ render_callbacks = filtered;
6511
+ }
6375
6512
  const outroing = /* @__PURE__ */ new Set();
6376
6513
  function transition_in(block, local) {
6377
6514
  if (block && block.i) {
@@ -6379,6 +6516,34 @@
6379
6516
  block.i(local);
6380
6517
  }
6381
6518
  }
6519
+ const _boolean_attributes = [
6520
+ "allowfullscreen",
6521
+ "allowpaymentrequest",
6522
+ "async",
6523
+ "autofocus",
6524
+ "autoplay",
6525
+ "checked",
6526
+ "controls",
6527
+ "default",
6528
+ "defer",
6529
+ "disabled",
6530
+ "formnovalidate",
6531
+ "hidden",
6532
+ "inert",
6533
+ "ismap",
6534
+ "loop",
6535
+ "multiple",
6536
+ "muted",
6537
+ "nomodule",
6538
+ "novalidate",
6539
+ "open",
6540
+ "playsinline",
6541
+ "readonly",
6542
+ "required",
6543
+ "reversed",
6544
+ "selected"
6545
+ ];
6546
+ /* @__PURE__ */ new Set([..._boolean_attributes]);
6382
6547
  function mount_component(component, target, anchor, customElement) {
6383
6548
  const { fragment, after_update } = component.$$;
6384
6549
  fragment && fragment.m(target, anchor);
@@ -6398,6 +6563,7 @@
6398
6563
  function destroy_component(component, detaching) {
6399
6564
  const $$ = component.$$;
6400
6565
  if ($$.fragment !== null) {
6566
+ flush_render_callbacks($$.after_update);
6401
6567
  run_all($$.on_destroy);
6402
6568
  $$.fragment && $$.fragment.d(detaching);
6403
6569
  $$.on_destroy = $$.fragment = null;
@@ -6418,16 +6584,19 @@
6418
6584
  const $$ = component.$$ = {
6419
6585
  fragment: null,
6420
6586
  ctx: [],
6587
+ // state
6421
6588
  props,
6422
6589
  update: noop,
6423
6590
  not_equal,
6424
6591
  bound: blank_object(),
6592
+ // lifecycle
6425
6593
  on_mount: [],
6426
6594
  on_destroy: [],
6427
6595
  on_disconnect: [],
6428
6596
  before_update: [],
6429
6597
  after_update: [],
6430
6598
  context: new Map(options.context || (parent_component ? parent_component.$$.context : [])),
6599
+ // everything else
6431
6600
  callbacks: blank_object(),
6432
6601
  dirty,
6433
6602
  skip_bound: false,
@@ -6497,8 +6666,14 @@
6497
6666
  let t1;
6498
6667
  let t2;
6499
6668
  let div1_class_value;
6500
- let if_block0 = ctx[16] && create_if_block_2(ctx);
6501
- let if_block1 = ctx[17] && create_if_block_1(ctx);
6669
+ let if_block0 = (
6670
+ /*hasAvatar*/
6671
+ ctx[16] && create_if_block_2(ctx)
6672
+ );
6673
+ let if_block1 = (
6674
+ /*hasTagName*/
6675
+ ctx[17] && create_if_block_1(ctx)
6676
+ );
6502
6677
  return {
6503
6678
  c() {
6504
6679
  div1 = element("div");
@@ -6507,7 +6682,10 @@
6507
6682
  if_block0.c();
6508
6683
  t0 = space();
6509
6684
  span = element("span");
6510
- t1 = text$1(ctx[0]);
6685
+ t1 = text$1(
6686
+ /*cursorName*/
6687
+ ctx[0]
6688
+ );
6511
6689
  t2 = space();
6512
6690
  if (if_block1)
6513
6691
  if_block1.c();
@@ -6515,11 +6693,33 @@
6515
6693
  set_style(span, "white-space", "nowrap");
6516
6694
  set_style(span, "text-overflow", "ellipsis");
6517
6695
  set_style(span, "max-width", "80px");
6518
- attr(div0, "class", ctx[8]);
6519
- set_style(div0, "background-color", ctx[2]);
6520
- set_style(div0, "color", ctx[9]);
6521
- set_style(div0, "opacity", ctx[11]);
6522
- attr(div1, "class", div1_class_value = "netless-window-manager-cursor-name " + ctx[14] + " " + ctx[13]);
6696
+ attr(
6697
+ div0,
6698
+ "class",
6699
+ /*theme*/
6700
+ ctx[8]
6701
+ );
6702
+ set_style(
6703
+ div0,
6704
+ "background-color",
6705
+ /*backgroundColor*/
6706
+ ctx[2]
6707
+ );
6708
+ set_style(
6709
+ div0,
6710
+ "color",
6711
+ /*color*/
6712
+ ctx[9]
6713
+ );
6714
+ set_style(
6715
+ div0,
6716
+ "opacity",
6717
+ /*opacity*/
6718
+ ctx[11]
6719
+ );
6720
+ attr(div1, "class", div1_class_value = "netless-window-manager-cursor-name " + /*offset*/
6721
+ ctx[14] + " " + /*pencilEraserSize3ImageOffset*/
6722
+ ctx[13]);
6523
6723
  },
6524
6724
  m(target, anchor) {
6525
6725
  insert(target, div1, anchor);
@@ -6534,7 +6734,10 @@
6534
6734
  if_block1.m(div0, null);
6535
6735
  },
6536
6736
  p(ctx2, dirty) {
6537
- if (ctx2[16]) {
6737
+ if (
6738
+ /*hasAvatar*/
6739
+ ctx2[16]
6740
+ ) {
6538
6741
  if (if_block0) {
6539
6742
  if_block0.p(ctx2, dirty);
6540
6743
  } else {
@@ -6546,9 +6749,17 @@
6546
6749
  if_block0.d(1);
6547
6750
  if_block0 = null;
6548
6751
  }
6549
- if (dirty & 1)
6550
- set_data(t1, ctx2[0]);
6551
- if (ctx2[17]) {
6752
+ if (dirty & /*cursorName*/
6753
+ 1)
6754
+ set_data(
6755
+ t1,
6756
+ /*cursorName*/
6757
+ ctx2[0]
6758
+ );
6759
+ if (
6760
+ /*hasTagName*/
6761
+ ctx2[17]
6762
+ ) {
6552
6763
  if (if_block1) {
6553
6764
  if_block1.p(ctx2, dirty);
6554
6765
  } else {
@@ -6560,19 +6771,46 @@
6560
6771
  if_block1.d(1);
6561
6772
  if_block1 = null;
6562
6773
  }
6563
- if (dirty & 256) {
6564
- attr(div0, "class", ctx2[8]);
6774
+ if (dirty & /*theme*/
6775
+ 256) {
6776
+ attr(
6777
+ div0,
6778
+ "class",
6779
+ /*theme*/
6780
+ ctx2[8]
6781
+ );
6565
6782
  }
6566
- if (dirty & 4) {
6567
- set_style(div0, "background-color", ctx2[2]);
6783
+ if (dirty & /*backgroundColor*/
6784
+ 4) {
6785
+ set_style(
6786
+ div0,
6787
+ "background-color",
6788
+ /*backgroundColor*/
6789
+ ctx2[2]
6790
+ );
6568
6791
  }
6569
- if (dirty & 512) {
6570
- set_style(div0, "color", ctx2[9]);
6792
+ if (dirty & /*color*/
6793
+ 512) {
6794
+ set_style(
6795
+ div0,
6796
+ "color",
6797
+ /*color*/
6798
+ ctx2[9]
6799
+ );
6571
6800
  }
6572
- if (dirty & 2048) {
6573
- set_style(div0, "opacity", ctx2[11]);
6801
+ if (dirty & /*opacity*/
6802
+ 2048) {
6803
+ set_style(
6804
+ div0,
6805
+ "opacity",
6806
+ /*opacity*/
6807
+ ctx2[11]
6808
+ );
6574
6809
  }
6575
- if (dirty & 24576 && div1_class_value !== (div1_class_value = "netless-window-manager-cursor-name " + ctx2[14] + " " + ctx2[13])) {
6810
+ if (dirty & /*offset, pencilEraserSize3ImageOffset*/
6811
+ 24576 && div1_class_value !== (div1_class_value = "netless-window-manager-cursor-name " + /*offset*/
6812
+ ctx2[14] + " " + /*pencilEraserSize3ImageOffset*/
6813
+ ctx2[13])) {
6576
6814
  attr(div1, "class", div1_class_value);
6577
6815
  }
6578
6816
  },
@@ -6593,8 +6831,14 @@
6593
6831
  c() {
6594
6832
  img = element("img");
6595
6833
  attr(img, "class", "netless-window-manager-cursor-selector-avatar");
6596
- attr(img, "style", ctx[18]());
6597
- if (!src_url_equal(img.src, img_src_value = ctx[7]))
6834
+ attr(
6835
+ img,
6836
+ "style",
6837
+ /*computedAvatarStyle*/
6838
+ ctx[18]()
6839
+ );
6840
+ if (!src_url_equal(img.src, img_src_value = /*avatar*/
6841
+ ctx[7]))
6598
6842
  attr(img, "src", img_src_value);
6599
6843
  attr(img, "alt", "avatar");
6600
6844
  },
@@ -6602,7 +6846,9 @@
6602
6846
  insert(target, img, anchor);
6603
6847
  },
6604
6848
  p(ctx2, dirty) {
6605
- if (dirty & 128 && !src_url_equal(img.src, img_src_value = ctx2[7])) {
6849
+ if (dirty & /*avatar*/
6850
+ 128 && !src_url_equal(img.src, img_src_value = /*avatar*/
6851
+ ctx2[7])) {
6606
6852
  attr(img, "src", img_src_value);
6607
6853
  }
6608
6854
  },
@@ -6618,19 +6864,38 @@
6618
6864
  return {
6619
6865
  c() {
6620
6866
  span = element("span");
6621
- t = text$1(ctx[1]);
6867
+ t = text$1(
6868
+ /*tagName*/
6869
+ ctx[1]
6870
+ );
6622
6871
  attr(span, "class", "netless-window-manager-cursor-tag-name");
6623
- set_style(span, "background-color", ctx[10]);
6872
+ set_style(
6873
+ span,
6874
+ "background-color",
6875
+ /*cursorTagBackgroundColor*/
6876
+ ctx[10]
6877
+ );
6624
6878
  },
6625
6879
  m(target, anchor) {
6626
6880
  insert(target, span, anchor);
6627
6881
  append(span, t);
6628
6882
  },
6629
6883
  p(ctx2, dirty) {
6630
- if (dirty & 2)
6631
- set_data(t, ctx2[1]);
6632
- if (dirty & 1024) {
6633
- set_style(span, "background-color", ctx2[10]);
6884
+ if (dirty & /*tagName*/
6885
+ 2)
6886
+ set_data(
6887
+ t,
6888
+ /*tagName*/
6889
+ ctx2[1]
6890
+ );
6891
+ if (dirty & /*cursorTagBackgroundColor*/
6892
+ 1024) {
6893
+ set_style(
6894
+ span,
6895
+ "background-color",
6896
+ /*cursorTagBackgroundColor*/
6897
+ ctx2[10]
6898
+ );
6634
6899
  }
6635
6900
  },
6636
6901
  d(detaching) {
@@ -6646,7 +6911,8 @@
6646
6911
  let img;
6647
6912
  let img_class_value;
6648
6913
  let img_src_value;
6649
- let if_block = !ctx[12] && create_if_block(ctx);
6914
+ let if_block = !/*isLaserPointer*/
6915
+ ctx[12] && create_if_block(ctx);
6650
6916
  return {
6651
6917
  c() {
6652
6918
  div1 = element("div");
@@ -6655,14 +6921,29 @@
6655
6921
  t = space();
6656
6922
  div0 = element("div");
6657
6923
  img = element("img");
6658
- attr(img, "class", img_class_value = "netless-window-manager-cursor-" + ctx[3] + "-image " + ctx[13]);
6659
- if (!src_url_equal(img.src, img_src_value = ctx[6]))
6924
+ attr(img, "class", img_class_value = "netless-window-manager-cursor-" + /*appliance*/
6925
+ ctx[3] + "-image " + /*pencilEraserSize3ImageOffset*/
6926
+ ctx[13]);
6927
+ if (!src_url_equal(img.src, img_src_value = /*src*/
6928
+ ctx[6]))
6660
6929
  attr(img, "src", img_src_value);
6661
- attr(img, "alt", ctx[3]);
6930
+ attr(
6931
+ img,
6932
+ "alt",
6933
+ /*appliance*/
6934
+ ctx[3]
6935
+ );
6662
6936
  attr(div0, "class", "cursor-image-wrapper");
6663
6937
  attr(div1, "class", "netless-window-manager-cursor-mid");
6664
- set_style(div1, "transform", "translateX(" + ctx[4] + "px) translateY(" + ctx[5] + "px)");
6665
- set_style(div1, "display", ctx[15]);
6938
+ set_style(div1, "transform", "translateX(" + /*x*/
6939
+ ctx[4] + "px) translateY(" + /*y*/
6940
+ ctx[5] + "px)");
6941
+ set_style(
6942
+ div1,
6943
+ "display",
6944
+ /*display*/
6945
+ ctx[15]
6946
+ );
6666
6947
  },
6667
6948
  m(target, anchor) {
6668
6949
  insert(target, div1, anchor);
@@ -6673,7 +6954,8 @@
6673
6954
  append(div0, img);
6674
6955
  },
6675
6956
  p(ctx2, [dirty]) {
6676
- if (!ctx2[12]) {
6957
+ if (!/*isLaserPointer*/
6958
+ ctx2[12]) {
6677
6959
  if (if_block) {
6678
6960
  if_block.p(ctx2, dirty);
6679
6961
  } else {
@@ -6685,20 +6967,40 @@
6685
6967
  if_block.d(1);
6686
6968
  if_block = null;
6687
6969
  }
6688
- if (dirty & 8200 && img_class_value !== (img_class_value = "netless-window-manager-cursor-" + ctx2[3] + "-image " + ctx2[13])) {
6970
+ if (dirty & /*appliance, pencilEraserSize3ImageOffset*/
6971
+ 8200 && img_class_value !== (img_class_value = "netless-window-manager-cursor-" + /*appliance*/
6972
+ ctx2[3] + "-image " + /*pencilEraserSize3ImageOffset*/
6973
+ ctx2[13])) {
6689
6974
  attr(img, "class", img_class_value);
6690
6975
  }
6691
- if (dirty & 64 && !src_url_equal(img.src, img_src_value = ctx2[6])) {
6976
+ if (dirty & /*src*/
6977
+ 64 && !src_url_equal(img.src, img_src_value = /*src*/
6978
+ ctx2[6])) {
6692
6979
  attr(img, "src", img_src_value);
6693
6980
  }
6694
- if (dirty & 8) {
6695
- attr(img, "alt", ctx2[3]);
6696
- }
6697
- if (dirty & 48) {
6698
- set_style(div1, "transform", "translateX(" + ctx2[4] + "px) translateY(" + ctx2[5] + "px)");
6981
+ if (dirty & /*appliance*/
6982
+ 8) {
6983
+ attr(
6984
+ img,
6985
+ "alt",
6986
+ /*appliance*/
6987
+ ctx2[3]
6988
+ );
6699
6989
  }
6700
- if (dirty & 32768) {
6701
- set_style(div1, "display", ctx2[15]);
6990
+ if (dirty & /*x, y*/
6991
+ 48) {
6992
+ set_style(div1, "transform", "translateX(" + /*x*/
6993
+ ctx2[4] + "px) translateY(" + /*y*/
6994
+ ctx2[5] + "px)");
6995
+ }
6996
+ if (dirty & /*display*/
6997
+ 32768) {
6998
+ set_style(
6999
+ div1,
7000
+ "display",
7001
+ /*display*/
7002
+ ctx2[15]
7003
+ );
6702
7004
  }
6703
7005
  },
6704
7006
  i: noop,
@@ -6724,7 +7026,7 @@
6724
7026
  let { tagName } = $$props;
6725
7027
  let { backgroundColor } = $$props;
6726
7028
  let { appliance } = $$props;
6727
- let { x: x2 } = $$props;
7029
+ let { x } = $$props;
6728
7030
  let { y } = $$props;
6729
7031
  let { src } = $$props;
6730
7032
  let { visible } = $$props;
@@ -6753,7 +7055,7 @@
6753
7055
  if ("appliance" in $$props2)
6754
7056
  $$invalidate(3, appliance = $$props2.appliance);
6755
7057
  if ("x" in $$props2)
6756
- $$invalidate(4, x2 = $$props2.x);
7058
+ $$invalidate(4, x = $$props2.x);
6757
7059
  if ("y" in $$props2)
6758
7060
  $$invalidate(5, y = $$props2.y);
6759
7061
  if ("src" in $$props2)
@@ -6774,28 +7076,36 @@
6774
7076
  $$invalidate(20, pencilEraserSize = $$props2.pencilEraserSize);
6775
7077
  };
6776
7078
  $$self.$$.update = () => {
6777
- if ($$self.$$.dirty & 1) {
7079
+ if ($$self.$$.dirty & /*cursorName*/
7080
+ 1) {
6778
7081
  hasName = !lodash.isEmpty(cursorName);
6779
7082
  }
6780
- if ($$self.$$.dirty & 2) {
7083
+ if ($$self.$$.dirty & /*tagName*/
7084
+ 2) {
6781
7085
  $$invalidate(17, hasTagName = !lodash.isEmpty(tagName));
6782
7086
  }
6783
- if ($$self.$$.dirty & 128) {
7087
+ if ($$self.$$.dirty & /*avatar*/
7088
+ 128) {
6784
7089
  $$invalidate(16, hasAvatar = !lodash.isEmpty(avatar));
6785
7090
  }
6786
- if ($$self.$$.dirty & 524288) {
7091
+ if ($$self.$$.dirty & /*visible*/
7092
+ 524288) {
6787
7093
  $$invalidate(15, display = visible ? "initial" : "none");
6788
7094
  }
6789
- if ($$self.$$.dirty & 8) {
7095
+ if ($$self.$$.dirty & /*appliance*/
7096
+ 8) {
6790
7097
  $$invalidate(12, isLaserPointer = appliance === whiteWebSdk.ApplianceNames.laserPointer);
6791
7098
  }
6792
- if ($$self.$$.dirty & 4104) {
7099
+ if ($$self.$$.dirty & /*isLaserPointer, appliance*/
7100
+ 4104) {
6793
7101
  $$invalidate(21, isLaserPointerPencilEraser = isLaserPointer || appliance === whiteWebSdk.ApplianceNames.pencilEraser);
6794
7102
  }
6795
- if ($$self.$$.dirty & 2097152) {
7103
+ if ($$self.$$.dirty & /*isLaserPointerPencilEraser*/
7104
+ 2097152) {
6796
7105
  $$invalidate(14, offset = isLaserPointerPencilEraser ? "netless-window-manager-laserPointer-pencilEraser-offset" : "");
6797
7106
  }
6798
- if ($$self.$$.dirty & 1048576) {
7107
+ if ($$self.$$.dirty & /*pencilEraserSize*/
7108
+ 1048576) {
6799
7109
  $$invalidate(13, pencilEraserSize3ImageOffset = pencilEraserSize === 3 ? "netless-window-manager-pencilEraser-3-offset" : "");
6800
7110
  }
6801
7111
  };
@@ -6804,7 +7114,7 @@
6804
7114
  tagName,
6805
7115
  backgroundColor,
6806
7116
  appliance,
6807
- x2,
7117
+ x,
6808
7118
  y,
6809
7119
  src,
6810
7120
  avatar,
@@ -6878,8 +7188,8 @@
6878
7188
  }
6879
7189
  moveCursor(cursor, rect, view) {
6880
7190
  var _a, _b;
6881
- const { x: x2, y, type } = cursor;
6882
- const point = view == null ? void 0 : view.screen.convertPointToScreen(x2, y);
7191
+ const { x, y, type } = cursor;
7192
+ const point = view == null ? void 0 : view.screen.convertPointToScreen(x, y);
6883
7193
  if (point) {
6884
7194
  let translateX = point.x - 2;
6885
7195
  let translateY = point.y - 18;
@@ -8203,11 +8513,11 @@
8203
8513
  sideEffect: s,
8204
8514
  readonly$: i,
8205
8515
  events: r,
8206
- wrapClassName: o2,
8516
+ wrapClassName: n,
8207
8517
  root: l,
8208
8518
  pagesIndex$: p
8209
8519
  }) {
8210
- this.showPreview$ = new valueEnhancer.Val(false), this.namespace = e, this.pages$ = t, this.sideEffect = s, this.readonly$ = i, this.events = r, this.wrapClassName = o2, this.sideEffect.addDisposer(
8520
+ this.showPreview$ = new valueEnhancer.Val(false), this.namespace = e, this.pages$ = t, this.sideEffect = s, this.readonly$ = i, this.events = r, this.wrapClassName = n, this.sideEffect.addDisposer(
8211
8521
  this.events.on("togglePreview", () => {
8212
8522
  this.showPreview$.setValue(!this.showPreview$.value);
8213
8523
  })
@@ -8217,11 +8527,11 @@
8217
8527
  const c = this.renderPreview(), u = this.renderPreviewMask();
8218
8528
  if (a) {
8219
8529
  l.appendChild(c), l.appendChild(u), c.scrollTop;
8220
- const n = c.querySelector(
8530
+ const o2 = c.querySelector(
8221
8531
  "." + this.wrapClassName(`preview-page-${p.value}`)
8222
8532
  );
8223
- return n && c.scrollTo({
8224
- top: n.offsetTop - 16
8533
+ return o2 && c.scrollTo({
8534
+ top: o2.offsetTop - 16
8225
8535
  }), c.classList.toggle(this.wrapClassName("preview-active"), true), this.previewLazyLoad = new LazyLoad({
8226
8536
  container: this.$preview,
8227
8537
  elements_selector: "." + this.wrapClassName("preview-page>img")
@@ -8255,14 +8565,14 @@
8255
8565
  this.pages$.subscribe((t) => {
8256
8566
  var s;
8257
8567
  this.sideEffect.add(() => {
8258
- const i = t.map((r, o2) => {
8568
+ const i = t.map((r, n) => {
8259
8569
  const l = r.thumbnail ?? (r.src.startsWith("ppt") ? void 0 : r.src);
8260
8570
  if (!l)
8261
8571
  return;
8262
- const p = String(o2), a = document.createElement("a");
8263
- a.className = this.wrapClassName("preview-page") + " " + this.wrapClassName(`preview-page-${o2}`), a.setAttribute("href", "#"), a.dataset.pageIndex = p;
8572
+ const p = String(n), a = document.createElement("a");
8573
+ a.className = this.wrapClassName("preview-page") + " " + this.wrapClassName(`preview-page-${n}`), a.setAttribute("href", "#"), a.dataset.pageIndex = p;
8264
8574
  const c = document.createElement("span");
8265
- c.className = this.wrapClassName("preview-page-name"), c.textContent = String(o2 + 1), c.dataset.pageIndex = p;
8575
+ c.className = this.wrapClassName("preview-page-name"), c.textContent = String(n + 1), c.dataset.pageIndex = p;
8266
8576
  const u = document.createElement("img");
8267
8577
  return u.width = r.width, u.height = r.height, u.dataset.src = l, u.dataset.pageIndex = p, a.appendChild(u), a.appendChild(c), e.appendChild(a), a;
8268
8578
  });
@@ -8331,7 +8641,7 @@
8331
8641
  "M312.491 78.261c0-6.159 4.893-11.213 11.04-11.213 6.158 0 11.211 5.054 11.211 11.213v343.478c0 6.159-5.053 11.213-11.211 11.213-6.147 0-11.04-5.054-11.04-11.213V78.261zM165.257 78.261c0-6.159 4.893-11.213 11.04-11.213 6.158 0 11.211 5.054 11.211 11.213v343.478c0 6.159-5.053 11.213-11.211 11.213-6.147 0-11.04-5.054-11.04-11.213V78.261z"
8332
8642
  ), t.appendChild(s), t;
8333
8643
  }
8334
- function J$1(h2) {
8644
+ function X$1(h2) {
8335
8645
  const e = "http://www.w3.org/2000/svg", t = document.createElementNS(e, "svg");
8336
8646
  t.setAttribute("class", `${h2}-footer-icon-save`), t.setAttribute("viewBox", "0 0 448 512");
8337
8647
  const s = document.createElementNS(e, "path");
@@ -8340,7 +8650,7 @@
8340
8650
  "M224 256c-35.2 0-64 28.8-64 64c0 35.2 28.8 64 64 64c35.2 0 64-28.8 64-64C288 284.8 259.2 256 224 256zM433.1 129.1l-83.9-83.9C341.1 37.06 328.8 32 316.1 32H64C28.65 32 0 60.65 0 96v320c0 35.35 28.65 64 64 64h320c35.35 0 64-28.65 64-64V163.9C448 151.2 442.9 138.9 433.1 129.1zM128 80h144V160H128V80zM400 416c0 8.836-7.164 16-16 16H64c-8.836 0-16-7.164-16-16V96c0-8.838 7.164-16 16-16h16v104c0 13.25 10.75 24 24 24h192C309.3 208 320 197.3 320 184V83.88l78.25 78.25C399.4 163.2 400 164.8 400 166.3V416z"
8341
8651
  ), t.appendChild(s), t;
8342
8652
  }
8343
- function X$1(h2) {
8653
+ function J$1(h2) {
8344
8654
  const e = "http://www.w3.org/2000/svg", t = document.createElementNS(e, "svg");
8345
8655
  t.setAttribute("class", `${h2}-footer-icon-spinner`), t.setAttribute("viewBox", "0 0 512 512");
8346
8656
  const s = document.createElementNS(e, "path");
@@ -8360,12 +8670,12 @@
8360
8670
  sideEffect: s,
8361
8671
  readonly$: i,
8362
8672
  events: r,
8363
- playable: o2,
8673
+ playable: n,
8364
8674
  wrapClassName: l,
8365
8675
  pagesIndex$: p,
8366
8676
  root: a
8367
8677
  }) {
8368
- this.namespace = e, this.pages$ = t, this.sideEffect = s, this.readonly$ = i, this.events = r, this.wrapClassName = l, this.pagesIndex$ = p, this.playable = o2, this.$footer = this.render(), a.appendChild(this.$footer);
8678
+ this.namespace = e, this.pages$ = t, this.sideEffect = s, this.readonly$ = i, this.events = r, this.wrapClassName = l, this.pagesIndex$ = p, this.playable = n, this.$footer = this.render(), a.appendChild(this.$footer);
8369
8679
  }
8370
8680
  destroy() {
8371
8681
  this.$footer.remove();
@@ -8374,15 +8684,15 @@
8374
8684
  const e = document.createElement("div");
8375
8685
  e.className = this.wrapClassName("footer"), this.sideEffect.addDisposer(
8376
8686
  this.readonly$.subscribe(
8377
- (n) => e.classList.toggle(this.wrapClassName("readonly"), n)
8687
+ (o2) => e.classList.toggle(this.wrapClassName("readonly"), o2)
8378
8688
  )
8379
8689
  );
8380
8690
  const t = this.renderFooterBtn("btn-sidebar", W$1(this.namespace));
8381
8691
  this.sideEffect.addEventListener(t, "click", () => {
8382
8692
  this.readonly$.value || this.events.emit("togglePreview");
8383
8693
  }), e.appendChild(t), this.sideEffect.addDisposer(
8384
- this.pages$.subscribe((n) => {
8385
- const d = n.some((g2) => g2.thumbnail || !g2.src.startsWith("ppt"));
8694
+ this.pages$.subscribe((o2) => {
8695
+ const d = o2.some((g2) => g2.thumbnail || !g2.src.startsWith("ppt"));
8386
8696
  t.style.display = d ? "" : "none";
8387
8697
  })
8388
8698
  );
@@ -8392,54 +8702,54 @@
8392
8702
  if (this.sideEffect.addEventListener(i, "click", () => {
8393
8703
  this.readonly$.value || this.events.emit("back");
8394
8704
  }), s.appendChild(i), this.playable) {
8395
- const n = this.renderFooterBtn(
8705
+ const o2 = this.renderFooterBtn(
8396
8706
  "btn-page-play",
8397
8707
  G$1(this.namespace),
8398
8708
  q$1(this.namespace)
8399
8709
  );
8400
- this.sideEffect.addEventListener(n, "click", () => {
8401
- this.readonly$.value || (n.classList.toggle(this.wrapClassName("footer-btn-playing"), true), this.events.emit("play"), this.sideEffect.setTimeout(
8402
- () => n.classList.toggle(this.wrapClassName("footer-btn-playing"), false),
8710
+ this.sideEffect.addEventListener(o2, "click", () => {
8711
+ this.readonly$.value || (o2.classList.toggle(this.wrapClassName("footer-btn-playing"), true), this.events.emit("play"), this.sideEffect.setTimeout(
8712
+ () => o2.classList.toggle(this.wrapClassName("footer-btn-playing"), false),
8403
8713
  500,
8404
8714
  "returnPlay"
8405
8715
  ));
8406
- }), s.appendChild(n);
8716
+ }), s.appendChild(o2);
8407
8717
  }
8408
8718
  const r = this.renderFooterBtn("btn-page-next", O$1(this.namespace));
8409
8719
  this.sideEffect.addEventListener(r, "click", () => {
8410
8720
  this.readonly$.value || this.events.emit("next");
8411
8721
  }), s.appendChild(r);
8412
- const o2 = document.createElement("div");
8413
- o2.className = this.wrapClassName("page-number");
8722
+ const n = document.createElement("div");
8723
+ n.className = this.wrapClassName("page-number");
8414
8724
  const l = document.createElement("input");
8415
8725
  l.className = this.wrapClassName("page-number-input"), this.sideEffect.addDisposer(
8416
- this.readonly$.subscribe((n) => l.disabled = n)
8726
+ this.readonly$.subscribe((o2) => l.disabled = o2)
8417
8727
  ), this.sideEffect.addDisposer(
8418
- this.pagesIndex$.subscribe((n) => l.value = String(n + 1))
8728
+ this.pagesIndex$.subscribe((o2) => l.value = String(o2 + 1))
8419
8729
  ), this.sideEffect.addEventListener(l, "blur", () => {
8420
8730
  l.value = String(this.pagesIndex$.value + 1);
8421
8731
  }), this.sideEffect.addEventListener(l, "change", () => {
8422
8732
  if (this.readonly$.value)
8423
8733
  return;
8424
- const n = l.value ? Number(l.value) - 1 : NaN;
8425
- n >= 0 ? this.events.emit("jumpPage", n) : l.value = String(this.pagesIndex$.value + 1);
8734
+ const o2 = l.value ? Number(l.value) - 1 : NaN;
8735
+ o2 >= 0 ? this.events.emit("jumpPage", o2) : l.value = String(this.pagesIndex$.value + 1);
8426
8736
  });
8427
8737
  const p = document.createElement("span");
8428
8738
  this.sideEffect.addDisposer(
8429
- this.pages$.subscribe((n) => {
8430
- p.textContent = " / " + n.length;
8739
+ this.pages$.subscribe((o2) => {
8740
+ p.textContent = " / " + o2.length;
8431
8741
  })
8432
- ), o2.appendChild(l), o2.appendChild(p), e.appendChild(s), e.appendChild(o2);
8433
- const a = J$1(this.namespace), c = X$1(this.namespace);
8742
+ ), n.appendChild(l), n.appendChild(p), e.appendChild(s), e.appendChild(n);
8743
+ const a = X$1(this.namespace), c = J$1(this.namespace);
8434
8744
  c.style.display = "none";
8435
8745
  const u = document.createElement("button");
8436
8746
  return u.className = this.wrapClassName("footer-btn"), u.appendChild(a), u.appendChild(c), this.sideEffect.addEventListener(u, "click", () => {
8437
8747
  this.events.emit("save");
8438
- }), this.events.on("saveProgress", (n) => {
8439
- if (n < 99) {
8748
+ }), this.events.on("saveProgress", (o2) => {
8749
+ if (o2 < 99) {
8440
8750
  c.style.display = "block", a.style.display = "none";
8441
8751
  const d = c.querySelector("[data-id]");
8442
- d && (d.textContent = n.toString().padStart(2, "0"));
8752
+ d && (d.textContent = o2.toString().padStart(2, "0"));
8443
8753
  } else
8444
8754
  c.style.display = "none", a.style.display = "block";
8445
8755
  }), e;
@@ -8456,7 +8766,7 @@
8456
8766
  previewRoot: s,
8457
8767
  footerRoot: i,
8458
8768
  pages$: r,
8459
- playable: o2
8769
+ playable: n
8460
8770
  }) {
8461
8771
  this.wrapClassName = (l) => `${this.namespace}-${l}`, this.namespace = "netless-app-docs-viewer", this.sideEffect = new sideEffectManager.SideEffectManager(), this.events = new Remitter(), this.preview = new Y$1({
8462
8772
  pages$: r,
@@ -8470,7 +8780,7 @@
8470
8780
  }), this.footer = new K$1({
8471
8781
  pages$: r,
8472
8782
  readonly$: e,
8473
- playable: o2,
8783
+ playable: n,
8474
8784
  pagesIndex$: t,
8475
8785
  root: i,
8476
8786
  namespace: this.namespace,
@@ -8483,7 +8793,7 @@
8483
8793
  this.preview.destroy(), this.footer.destroy(), this.sideEffect.flushAll(), this.events.destroy();
8484
8794
  }
8485
8795
  }
8486
- function x(h2, e, t) {
8796
+ function E$1(h2, e, t) {
8487
8797
  return Math.min(Math.max(h2, e), t);
8488
8798
  }
8489
8799
  function A$1(h2) {
@@ -8526,27 +8836,27 @@
8526
8836
  }
8527
8837
  };
8528
8838
  let Z$1 = class Z {
8529
- constructor(e, t, s, i, r, o2) {
8839
+ constructor(e, t, s, i, r, n) {
8530
8840
  this.index = e, this.lastVisit = Date.now(), this.sideEffect = new sideEffectManager.SideEffectManager();
8531
- const l = valueEnhancer.derive(t, (n) => n[e] || { width: 0, height: 0 }), p = valueEnhancer.combine(
8841
+ const l = valueEnhancer.derive(t, (o2) => o2[e] || { width: 0, height: 0 }), p = valueEnhancer.combine(
8532
8842
  [l, s],
8533
- ([n, d]) => (d.width - n.width) / 2
8843
+ ([o2, d]) => (d.width - o2.width) / 2
8534
8844
  ), a = valueEnhancer.combine(
8535
- [r, o2],
8536
- ([n, d]) => (n[e] || 0) - d
8845
+ [r, n],
8846
+ ([o2, d]) => (o2[e] || 0) - d
8537
8847
  ), c = document.createElement("div");
8538
8848
  c.className = "page-renderer-page", c.dataset.index = `${e}`;
8539
8849
  const u = document.createElement("img");
8540
8850
  u.className = "page-renderer-page-img", c.appendChild(u), this.sideEffect.addDisposer([
8541
- valueEnhancer.combine([l, i]).subscribe(([n, d]) => {
8542
- c.style.width = `${n.width * d}px`, c.style.height = `${n.height * d}px`;
8851
+ valueEnhancer.combine([l, i]).subscribe(([o2, d]) => {
8852
+ c.style.width = `${o2.width * d}px`, c.style.height = `${o2.height * d}px`;
8543
8853
  }),
8544
- l.subscribe((n) => {
8545
- n.thumbnail && (c.style.backgroundImage = `url("${n.thumbnail}")`), u.width = n.width, u.height = n.height, u.src = n.src;
8854
+ l.subscribe((o2) => {
8855
+ o2.thumbnail && (c.style.backgroundImage = `url("${o2.thumbnail}")`), u.width = o2.width, u.height = o2.height, u.src = o2.src;
8546
8856
  }),
8547
8857
  valueEnhancer.combine([p, a, i]).subscribe(
8548
- ([n, d, g2]) => {
8549
- c.style.transform = `translate(${n * g2}px, ${d * g2}px)`;
8858
+ ([o2, d, g2]) => {
8859
+ c.style.transform = `translate(${o2 * g2}px, ${d * g2}px)`;
8550
8860
  }
8551
8861
  )
8552
8862
  ]), this.$page = c;
@@ -8558,13 +8868,13 @@
8558
8868
  let ee$1 = class ee {
8559
8869
  constructor(e, t, s, i, r) {
8560
8870
  this.pages$ = e, this.pagesSize$ = t, this.scale$ = s, this.pagesYs$ = i, this.pagesScrollTop$ = r, this.els = /* @__PURE__ */ new Map(), this.maxElCount = 200, this.gcTimer = null, this.gc = () => {
8561
- var o2;
8871
+ var n;
8562
8872
  if (this.gcTimer = null, this.els.size > this.maxElCount) {
8563
8873
  const l = [...this.els.values()].sort((p, a) => a.lastVisit - p.lastVisit);
8564
8874
  for (let p = Math.floor(this.maxElCount / 4); p < l.length; p++)
8565
- (o2 = this.els.get(l[p].index)) == null || o2.destroy(), this.els.delete(l[p].index);
8875
+ (n = this.els.get(l[p].index)) == null || n.destroy(), this.els.delete(l[p].index);
8566
8876
  }
8567
- }, this.schedule = window.requestIdleCallback || ((o2) => window.setTimeout(o2, 5e3)), this.cancelSchedule = window.cancelIdleCallback || window.clearTimeout;
8877
+ }, this.schedule = window.requestIdleCallback || ((n) => window.setTimeout(n, 5e3)), this.cancelSchedule = window.cancelIdleCallback || window.clearTimeout;
8568
8878
  }
8569
8879
  getEl(e) {
8570
8880
  let t = this.els.get(e);
@@ -8601,7 +8911,7 @@
8601
8911
  for (let w2 = 0; w2 < d.length; w2++)
8602
8912
  g2[w2] = w2 > 0 ? g2[w2 - 1] + d[w2 - 1].height : 0;
8603
8913
  return g2;
8604
- }), o2 = valueEnhancer.derive(s, (d) => {
8914
+ }), n = valueEnhancer.derive(s, (d) => {
8605
8915
  let g2 = 1 / 0;
8606
8916
  for (let w2 = d.length - 1; w2 >= 0; w2--)
8607
8917
  d[w2].height <= g2 && (g2 = d[w2].height);
@@ -8620,8 +8930,8 @@
8620
8930
  [t, i],
8621
8931
  ([d, g2]) => d.width / g2.width || 1
8622
8932
  ), a = valueEnhancer.combine(
8623
- [s, t, o2, p],
8624
- ([d, g2, w2, f2]) => x(Math.ceil(g2.height / f2 / w2 / 2), 1, d.length)
8933
+ [s, t, n, p],
8934
+ ([d, g2, w2, f2]) => E$1(Math.ceil(g2.height / f2 / w2 / 2), 1, d.length)
8625
8935
  );
8626
8936
  valueEnhancer.withReadonlyValueEnhancer(this, {
8627
8937
  pagesScrollTop: e,
@@ -8630,19 +8940,19 @@
8630
8940
  pagesSize: i,
8631
8941
  pagesIndex: l,
8632
8942
  pagesYs: r,
8633
- pagesMinHeight: o2,
8943
+ pagesMinHeight: n,
8634
8944
  scale: p
8635
8945
  }), this.pageElManager = new ee$1(s, i, p, r, e), this.$pages = this.renderPages();
8636
8946
  const c = new valueEnhancer.Val(false);
8637
8947
  this.sideEffect.addDisposer(
8638
8948
  c.subscribe((d) => this.$pages.classList.toggle("is-hwa", d))
8639
8949
  );
8640
- const u = () => c.setValue(false), n = () => {
8950
+ const u = () => c.setValue(false), o2 = () => {
8641
8951
  this.sideEffect.setTimeout(u, 1e3, "turn-off-hwa"), c.setValue(true);
8642
8952
  };
8643
8953
  this.sideEffect.addDisposer(
8644
8954
  valueEnhancer.combine([l, a, s]).subscribe(([d, g2, w2]) => {
8645
- n();
8955
+ o2();
8646
8956
  const f2 = Math.max(d - g2, 0), N = Math.min(d + g2, w2.length - 1);
8647
8957
  for (let m = 0; m < this.$pages.children.length; m++) {
8648
8958
  const S2 = this.$pages.children[m], k2 = Number(S2.dataset.index);
@@ -8676,23 +8986,23 @@
8676
8986
  stageRect$: s,
8677
8987
  pagesSize$: i,
8678
8988
  readonly$: r,
8679
- scrollbarMinHeight: o2 = se,
8989
+ scrollbarMinHeight: n = se,
8680
8990
  wrapClassName: l,
8681
8991
  onDragScroll: p
8682
8992
  }) {
8683
- this.sideEffect = new sideEffectManager.SideEffectManager(), this.scrolling$ = new valueEnhancer.Val(false), this.pagesScrollTop$ = e, this.containerRect$ = t, this.stageRect$ = s, this.pagesSize$ = i, this.scrollbarMinHeight = o2, this.readonly$ = r, this.wrapClassName = l, this.onDragScroll = p, this.scrollbarHeight$ = valueEnhancer.combine(
8993
+ this.sideEffect = new sideEffectManager.SideEffectManager(), this.scrolling$ = new valueEnhancer.Val(false), this.pagesScrollTop$ = e, this.containerRect$ = t, this.stageRect$ = s, this.pagesSize$ = i, this.scrollbarMinHeight = n, this.readonly$ = r, this.wrapClassName = l, this.onDragScroll = p, this.scrollbarHeight$ = valueEnhancer.combine(
8684
8994
  [t, s, i],
8685
- ([a, c, u]) => x(
8995
+ ([a, c, u]) => E$1(
8686
8996
  c.height / (c.width / u.width * u.height) * a.height,
8687
- o2,
8997
+ n,
8688
8998
  a.height
8689
8999
  )
8690
9000
  ), this.scrollTop$ = valueEnhancer.combine(
8691
9001
  [t, s, i, this.scrollbarHeight$, this.pagesScrollTop$],
8692
- ([a, c, u, n, d]) => x(
8693
- d / (u.height - u.width / c.width * c.height) * (a.height - n),
9002
+ ([a, c, u, o2, d]) => E$1(
9003
+ d / (u.height - u.width / c.width * c.height) * (a.height - o2),
8694
9004
  0,
8695
- a.height - n
9005
+ a.height - o2
8696
9006
  )
8697
9007
  ), this.$scrollbar = this.renderScrollbar();
8698
9008
  }
@@ -8723,15 +9033,15 @@
8723
9033
  D(s);
8724
9034
  const i = this.wrapClassName("scrollbar-dragging");
8725
9035
  e.classList.toggle(i, true);
8726
- const r = this.pagesScrollTop$.value, { clientY: o2 } = A$1(s), l = (a) => {
9036
+ const r = this.pagesScrollTop$.value, { clientY: n } = A$1(s), l = (a) => {
8727
9037
  if (!a.isPrimary || this.readonly$.value)
8728
9038
  return;
8729
- const { clientY: c } = A$1(a), u = c - o2;
9039
+ const { clientY: c } = A$1(a), u = c - n;
8730
9040
  Math.abs(u) > 0 && this.onDragScroll && this.onDragScroll(
8731
9041
  r + u / this.containerRect$.value.height * this.pagesSize$.value.height
8732
9042
  );
8733
9043
  }, p = (a) => {
8734
- !a.isPrimary || (e.classList.toggle(i, false), window.removeEventListener("pointermove", l, true), window.removeEventListener("pointerup", p, true), window.removeEventListener("pointercancel", p, true));
9044
+ a.isPrimary && (e.classList.toggle(i, false), window.removeEventListener("pointermove", l, true), window.removeEventListener("pointerup", p, true), window.removeEventListener("pointercancel", p, true));
8735
9045
  };
8736
9046
  window.addEventListener("pointermove", l, true), window.addEventListener("pointerup", p, true), window.addEventListener("pointercancel", p, true);
8737
9047
  };
@@ -8745,36 +9055,36 @@
8745
9055
  box: s,
8746
9056
  pages: i,
8747
9057
  pagesScrollTop: r = 0,
8748
- onUserScroll: o2
9058
+ onUserScroll: n
8749
9059
  }) {
8750
9060
  this.sideEffect = new sideEffectManager.SideEffectManager(), this.userScrolling = false, this.toPdf = async () => {
8751
9061
  const a = document.createElement("canvas"), c = a.getContext("2d");
8752
9062
  if (!c)
8753
9063
  return null;
8754
- const u = this.whiteboard.pageState.pages[0], n = this.pages[0], { jsPDF: d } = await import("jspdf"), g2 = new d({
8755
- format: [n.width, n.height],
8756
- orientation: n.width > n.height ? "l" : "p",
9064
+ const u = this.whiteboard.pageState.pages[0], o2 = this.pages[0], { jsPDF: d } = await import("jspdf"), g2 = new d({
9065
+ format: [o2.width, o2.height],
9066
+ orientation: o2.width > o2.height ? "l" : "p",
8757
9067
  compress: true
8758
9068
  });
8759
9069
  for (const [S2, k2] of this.pages.entries()) {
8760
- const { width: y, height: v, src: M2 } = k2;
9070
+ const { width: y, height: v, src: L } = k2;
8761
9071
  a.width = y, a.height = v;
8762
- const L = y > v ? "l" : "p";
8763
- S2 > 0 && g2.addPage([y, v], L);
8764
- const V = await this.getBase64FromUrl(M2), P2 = document.createElement("img");
8765
- P2.src = V, await new Promise((_2) => P2.onload = _2), c.drawImage(P2, 0, 0);
8766
- const R2 = a.toDataURL("image/jpeg", 0.6);
9072
+ const M2 = y > v ? "l" : "p";
9073
+ S2 > 0 && g2.addPage([y, v], M2);
9074
+ const R2 = await this.getBase64FromUrl(L), P2 = document.createElement("img");
9075
+ P2.src = R2, await new Promise((_2) => P2.onload = _2), c.drawImage(P2, 0, 0);
9076
+ const V = a.toDataURL("image/jpeg", 0.6);
8767
9077
  c.clearRect(0, 0, y, v), this.whiteboard.view.screenshotToCanvas(c, u, y, v, {
8768
9078
  centerX: y / 2,
8769
9079
  centerY: v / 2 + S2 * v,
8770
9080
  scale: 1
8771
9081
  });
8772
9082
  const I2 = a.toDataURL("image/png");
8773
- g2.addImage(R2, "JPEG", 0, 0, y, v, "", "FAST"), g2.addImage(I2, "PNG", 0, 0, y, v, "", "FAST"), c.clearRect(0, 0, y, v), this.viewer.events.emit("saveProgress", Math.ceil((S2 + 1) / this.pages.length * 100));
9083
+ g2.addImage(V, "JPEG", 0, 0, y, v, "", "FAST"), g2.addImage(I2, "PNG", 0, 0, y, v, "", "FAST"), c.clearRect(0, 0, y, v), this.viewer.events.emit("saveProgress", Math.ceil((S2 + 1) / this.pages.length * 100));
8774
9084
  }
8775
9085
  const w2 = g2.output("arraybuffer"), f2 = new Blob([w2]), N = URL.createObjectURL(f2), m = document.createElement("a");
8776
9086
  m.setAttribute("href", N), m.setAttribute("download", `${this.box.title}.pdf`), m.style.display = "none", document.body.appendChild(m), m.click(), document.body.removeChild(m), window.postMessage({ type: "@app-slide/_download_pdf_", buf: w2 });
8777
- }, this.whiteboard = e, this.readonly$ = t, this.box = s, this.pages = i, this.onUserScroll = o2;
9087
+ }, this.whiteboard = e, this.readonly$ = t, this.box = s, this.pages = i, this.onUserScroll = n;
8778
9088
  const l = () => {
8779
9089
  var a;
8780
9090
  this.userScrolling = false, (a = this.onUserScroll) == null || a.call(this, this.pagesScrollTop$.value);
@@ -8787,8 +9097,8 @@
8787
9097
  p,
8788
9098
  (a) => {
8789
9099
  let c = 0, u = 0;
8790
- for (let n = a.length - 1; n >= 0; n--) {
8791
- const d = a[n];
9100
+ for (let o2 = a.length - 1; o2 >= 0; o2--) {
9101
+ const d = a[o2];
8792
9102
  d.width > c && (c = d.width), u += d.height;
8793
9103
  }
8794
9104
  return { width: Math.max(1, c), height: Math.max(1, u) };
@@ -8848,8 +9158,8 @@
8848
9158
  return new Promise((i) => {
8849
9159
  const r = new FileReader();
8850
9160
  r.readAsDataURL(s), r.onloadend = () => {
8851
- const o2 = r.result;
8852
- i(o2);
9161
+ const n = r.result;
9162
+ i(n);
8853
9163
  };
8854
9164
  });
8855
9165
  }
@@ -8859,7 +9169,7 @@
8859
9169
  pageScrollTo(e) {
8860
9170
  const t = this.whiteboard.view.size.height / 2 / this.pageRenderer.scale;
8861
9171
  this.whiteboard.view.moveCamera({
8862
- centerY: x(
9172
+ centerY: E$1(
8863
9173
  e + t,
8864
9174
  t,
8865
9175
  this.pagesSize$.value.height - t
@@ -8869,7 +9179,7 @@
8869
9179
  }
8870
9180
  userScrollToPageIndex(e) {
8871
9181
  var t;
8872
- if (e = x(e, 0, this.pages.length - 1), !this.readonly$.value && !Number.isNaN(e)) {
9182
+ if (e = E$1(e, 0, this.pages.length - 1), !this.readonly$.value && !Number.isNaN(e)) {
8873
9183
  const s = this.pageRenderer.pagesYs[e];
8874
9184
  s >= 0 && ((t = this.onUserScroll) == null || t.call(this, s + 5 / this.pageRenderer.scale));
8875
9185
  }
@@ -8878,8 +9188,8 @@
8878
9188
  var t;
8879
9189
  this.readonly$.value || (t = this.onUserScroll) == null || t.call(
8880
9190
  this,
8881
- x(
8882
- this.pageRenderer.pagesScrollTop + this.pageRenderer.containerRect.height / this.pageRenderer.scale * x(e, -1, 1),
9191
+ E$1(
9192
+ this.pageRenderer.pagesScrollTop + this.pageRenderer.containerRect.height / this.pageRenderer.scale * E$1(e, -1, 1),
8883
9193
  0,
8884
9194
  this.pageRenderer.pagesSize.height - this.pageRenderer.containerRect.height / this.pageRenderer.scale
8885
9195
  )
@@ -8889,52 +9199,59 @@
8889
9199
  this.sideEffect.addEventListener(
8890
9200
  this.box.$main,
8891
9201
  "wheel",
8892
- (e) => {
8893
- D(e), !this.readonly$.value && this.pageScrollStepper.paused && (this.pageScrollTo(this.pagesScrollTop + e.deltaY), this.debounceOnUserScroll());
9202
+ (t) => {
9203
+ D(t), !this.readonly$.value && this.pageScrollStepper.paused && (this.pageScrollTo(this.pagesScrollTop + t.deltaY), this.debounceOnUserScroll());
8894
9204
  },
8895
9205
  { passive: false }
8896
9206
  ), this.sideEffect.addEventListener(
8897
9207
  this.box.$main,
8898
9208
  "touchmove",
8899
- (e) => {
8900
- !this.readonly$.value && e.touches.length > 1 && this.debounceOnUserScroll();
9209
+ (t) => {
9210
+ !this.readonly$.value && t.touches.length > 1 && this.debounceOnUserScroll();
8901
9211
  },
8902
9212
  { passive: true, capture: true }
8903
9213
  ), this.sideEffect.add(() => {
8904
- const e = (t) => {
8905
- const { width: s, height: i } = this.whiteboard.view.size;
8906
- if (s <= 0 || i <= 0)
9214
+ const t = (s) => {
9215
+ const { width: i, height: r } = this.whiteboard.view.size;
9216
+ if (i <= 0 || r <= 0)
8907
9217
  return;
8908
- const r = t.centerY - this.pageRenderer.containerRect.height / this.pageRenderer.scale / 2;
8909
- this.pagesScrollTop$.setValue(Math.max(0, r));
9218
+ const n = s.centerY - this.pageRenderer.containerRect.height / this.pageRenderer.scale / 2;
9219
+ this.pagesScrollTop$.setValue(Math.max(0, n));
8910
9220
  };
8911
- return this.whiteboard.view.callbacks.on("onCameraUpdated", e), () => this.whiteboard.view.callbacks.off("onCameraUpdated", e);
9221
+ return this.whiteboard.view.callbacks.on("onCameraUpdated", t), () => this.whiteboard.view.callbacks.off("onCameraUpdated", t);
8912
9222
  }), this.sideEffect.addDisposer(
8913
- this.box._stageRect$.subscribe((e) => {
8914
- const { width: t, height: s } = this.pagesSize$.value;
9223
+ this.box._stageRect$.subscribe((t) => {
9224
+ const { width: s, height: i } = this.pagesSize$.value;
8915
9225
  this.whiteboard.view.moveCameraToContain({
8916
9226
  originX: 0,
8917
9227
  originY: this.pageRenderer.pagesScrollTop,
8918
- width: t,
8919
- height: e.height / this.pageRenderer.scale,
9228
+ width: s,
9229
+ height: t.height / this.pageRenderer.scale,
8920
9230
  animationMode: "immediately"
8921
9231
  }), this.whiteboard.view.setCameraBound({
8922
9232
  damping: 1,
8923
9233
  maxContentMode: () => this.pageRenderer.scale,
8924
9234
  minContentMode: () => this.pageRenderer.scale,
8925
- centerX: t / 2,
8926
- centerY: s / 2,
8927
- width: t,
8928
- height: s
9235
+ centerX: s / 2,
9236
+ centerY: i / 2,
9237
+ width: s,
9238
+ height: i
8929
9239
  });
8930
9240
  }),
8931
9241
  "whiteboard-size-update"
8932
- ), this.sideEffect.addEventListener(
9242
+ );
9243
+ const e = (t) => {
9244
+ if (!t)
9245
+ return false;
9246
+ const s = t.tagName;
9247
+ return s === "INPUT" || s === "TEXTAREA" || s === "SELECT";
9248
+ };
9249
+ this.sideEffect.addEventListener(
8933
9250
  window,
8934
9251
  "keyup",
8935
- (e) => {
8936
- if (!(this.readonly$.value || !this.box.focus || this.box.minimized))
8937
- switch (e.key) {
9252
+ (t) => {
9253
+ if (!(this.readonly$.value || !this.box.focus || this.box.minimized || e(t.target)))
9254
+ switch (t.key) {
8938
9255
  case "PageDown": {
8939
9256
  this.userScrollByPercent(0.8);
8940
9257
  break;
@@ -8971,15 +9288,15 @@
8971
9288
  let ae$1 = class ae {
8972
9289
  constructor({ readonly$: e, context: t, whiteboard: s, box: i, pages: r }) {
8973
9290
  this.sideEffect = new sideEffectManager.SideEffectManager(), this.context = t, this.whiteboard = s, this.box = i, this.pages = r;
8974
- const o2 = new valueEnhancer.Val(t.displayer.state.sceneState.index || 0);
8975
- this.pagesIndex$ = o2, this.sideEffect.add(() => {
9291
+ const n = new valueEnhancer.Val(t.displayer.state.sceneState.index || 0);
9292
+ this.pagesIndex$ = n, this.sideEffect.add(() => {
8976
9293
  const l = (p) => {
8977
9294
  this.jumpToPage(p.index);
8978
9295
  };
8979
9296
  return this.context.emitter.on("sceneStateChange", l), () => this.context.emitter.off("sceneStateChange", l);
8980
9297
  }), this.viewer = new T({
8981
9298
  readonly$: e,
8982
- pagesIndex$: o2,
9299
+ pagesIndex$: n,
8983
9300
  previewRoot: i.$body,
8984
9301
  footerRoot: i.$footer,
8985
9302
  pages$: new valueEnhancer.Val(r),
@@ -8993,11 +9310,11 @@
8993
9310
  this.viewer.events.on("back", () => this.prevPage()),
8994
9311
  this.viewer.events.on("next", () => this.nextPage())
8995
9312
  ]), this.render(), this.sideEffect.addDisposer(
8996
- o2.subscribe((l, p) => {
8997
- var u, n;
9313
+ n.subscribe((l, p) => {
9314
+ var u, o2;
8998
9315
  if (e.value)
8999
9316
  return;
9000
- const a = this.context.getInitScenePath(), c = (n = (u = this.context.getScenes()) == null ? void 0 : u[l]) == null ? void 0 : n.name;
9317
+ const a = this.context.getInitScenePath(), c = (o2 = (u = this.context.getScenes()) == null ? void 0 : u[l]) == null ? void 0 : o2.name;
9001
9318
  if (a && c && this.context.setScenePath(`${a}/${c}`), p) {
9002
9319
  const d = this.context.room;
9003
9320
  if (d) {
@@ -9024,7 +9341,7 @@
9024
9341
  this.jumpToPage(this.pagesIndex$.value - 1, true);
9025
9342
  }
9026
9343
  jumpToPage(e, t = false) {
9027
- this.pagesIndex$.setValue(x(e, 0, this.pages.length - 1), t);
9344
+ this.pagesIndex$.setValue(E$1(e, 0, this.pages.length - 1), t);
9028
9345
  }
9029
9346
  render() {
9030
9347
  var t;
@@ -9049,8 +9366,8 @@
9049
9366
  var r;
9050
9367
  const i = this.context.room;
9051
9368
  if (i && i.state.memberState.currentApplianceName === "clicker") {
9052
- for (let o2 = s.target; o2; o2 = o2.parentElement)
9053
- if ((r = o2.classList) != null && r.contains("ppt-event-source"))
9369
+ for (let n = s.target; n; n = n.parentElement)
9370
+ if ((r = n.classList) != null && r.contains("ppt-event-source"))
9054
9371
  return;
9055
9372
  i.pptNextStep();
9056
9373
  }
@@ -9067,20 +9384,20 @@
9067
9384
  if (!t)
9068
9385
  throw new Error("[Docs Viewer]: scenes not found.");
9069
9386
  const s = new sideEffectManager.SideEffectManager(), i = t.map(
9070
- ({ ppt: o2 }) => o2 ? {
9071
- width: o2.width,
9072
- height: o2.height,
9073
- src: o2.src,
9074
- thumbnail: o2.previewURL
9387
+ ({ ppt: n }) => n ? {
9388
+ width: n.width,
9389
+ height: n.height,
9390
+ src: n.src,
9391
+ thumbnail: n.previewURL
9075
9392
  } : null
9076
- ).filter((o2) => Boolean(o2));
9393
+ ).filter((n) => Boolean(n));
9077
9394
  if (i.length <= 0)
9078
9395
  throw new Error("[Docs Viewer]: empty scenes.");
9079
9396
  e.mountStyles(F);
9080
9397
  const r = new valueEnhancer.Val(!h2.isWritable);
9081
9398
  s.addDisposer(
9082
- h2.emitter.on("writableChange", (o2) => {
9083
- r.setValue(!o2);
9399
+ h2.emitter.on("writableChange", (n) => {
9400
+ r.setValue(!n);
9084
9401
  })
9085
9402
  ), i[0].src.startsWith("ppt") ? le$1(
9086
9403
  s,
@@ -9108,18 +9425,18 @@
9108
9425
  r.view.disableCameraTransform = p;
9109
9426
  })
9110
9427
  );
9111
- const o2 = e.createStorage("static-docs-viewer", { pagesScrollTop: 0 }), l = new re({
9428
+ const n = e.createStorage("static-docs-viewer", { pagesScrollTop: 0 }), l = new re({
9112
9429
  whiteboard: r,
9113
9430
  readonly$: i,
9114
9431
  box: t,
9115
9432
  pages: s,
9116
- pagesScrollTop: o2.state.pagesScrollTop,
9433
+ pagesScrollTop: n.state.pagesScrollTop,
9117
9434
  onUserScroll: (p) => {
9118
- e.isWritable && o2.setState({ pagesScrollTop: p });
9435
+ e.isWritable && n.setState({ pagesScrollTop: p });
9119
9436
  }
9120
9437
  });
9121
9438
  h2.addDisposer(() => l.destroy()), h2.addDisposer(
9122
- o2.on("stateChanged", (p) => {
9439
+ n.on("stateChanged", (p) => {
9123
9440
  p.pagesScrollTop && l.syncPageScrollTop(p.pagesScrollTop.newValue || 0);
9124
9441
  })
9125
9442
  ), h2.addDisposer(
@@ -9131,8 +9448,8 @@
9131
9448
  l.pagesSize$,
9132
9449
  l.pageRenderer._pagesMinHeight$
9133
9450
  ],
9134
- ([p, a, c, u, n]) => p ? Math.max(
9135
- n / u.width * (2 / 5),
9451
+ ([p, a, c, u, o2]) => p ? Math.max(
9452
+ o2 / u.width * (2 / 5),
9136
9453
  a.height / a.width
9137
9454
  ) : c.height / c.width * (a.height / a.width)
9138
9455
  ).subscribe((p) => {
@@ -9143,20 +9460,20 @@
9143
9460
  function le$1(h2, e, t, s, i) {
9144
9461
  const r = e.createWhiteBoardView();
9145
9462
  r.view.disableCameraTransform = true;
9146
- const o2 = new ae$1({
9463
+ const n = new ae$1({
9147
9464
  context: e,
9148
9465
  whiteboard: r,
9149
9466
  box: t,
9150
9467
  pages: s,
9151
9468
  readonly$: i
9152
9469
  });
9153
- h2.addDisposer(() => o2.destroy());
9470
+ h2.addDisposer(() => n.destroy());
9154
9471
  const l = new valueEnhancer.Val(
9155
9472
  { width: s[0].width, height: s[0].height },
9156
9473
  { compare: z$1 }
9157
9474
  );
9158
9475
  if (h2.addDisposer(
9159
- o2.pagesIndex$.subscribe((p) => {
9476
+ n.pagesIndex$.subscribe((p) => {
9160
9477
  const a = s[p];
9161
9478
  a && l.setValue({ width: a.width, height: a.height });
9162
9479
  })
@@ -9168,7 +9485,7 @@
9168
9485
  const p = h2.add(() => {
9169
9486
  const a = ({ width: c, height: u }) => {
9170
9487
  if (s.length > 0 && t.state !== "maximized") {
9171
- const { width: n, height: d } = s[0], w2 = d / n * c - u;
9488
+ const { width: o2, height: d } = s[0], w2 = d / o2 * c - u;
9172
9489
  w2 !== 0 && e.isWritable && e.emitter.emit("setBoxSize", {
9173
9490
  width: t.intrinsicWidth,
9174
9491
  height: t.intrinsicHeight + w2 / t.rootRect.height
@@ -9536,13 +9853,13 @@
9536
9853
  return Array.isArray(e) ? e[0] : e;
9537
9854
  }
9538
9855
  function Li(e) {
9539
- let i, t, r, s, n, a, l, d, c, u, m, p, v, b, T2, N, x2, y, C, L, $, D2, V, re2, F2, ce, Ve, de, qe, pe, De, ue2, Re, he, Fe, se2, Be, Ue;
9856
+ let i, t, r, s, n, a, l, d, c, u, m, p, v, b, T2, N, x, y, C, L, $, D2, V, re2, F2, ce, Ve, de, qe, pe, De, ue2, Re, he, Fe, se2, Be, Ue;
9540
9857
  return {
9541
9858
  c() {
9542
- i = S("svg"), t = S("symbol"), r = S("path"), s = S("path"), n = S("symbol"), a = S("path"), l = S("symbol"), d = S("path"), c = S("symbol"), u = S("path"), m = S("symbol"), p = S("path"), v = S("symbol"), b = S("path"), T2 = S("symbol"), N = S("path"), x2 = S("symbol"), y = S("path"), C = S("symbol"), L = S("path"), $ = S("symbol"), D2 = S("path"), V = S("symbol"), re2 = S("path"), F2 = S("symbol"), ce = S("path"), Ve = S("path"), de = S("symbol"), qe = S("path"), pe = S("symbol"), De = S("path"), ue2 = S("symbol"), Re = S("path"), he = S("symbol"), Fe = S("path"), se2 = S("symbol"), Be = S("path"), Ue = S("path"), g(r, "d", "M16 1H2a1 1 0 00-1 1v10a1 1 0 001 1h3v-2H3V3h12v8h-2v2h3a1 1 0 001-1V2a1 1 0 00-1-1z"), g(s, "d", "M4 17h10l-5-6z"), g(t, "id", "plyr-airplay"), g(t, "viewBox", "0 0 18 18"), g(a, "d", "M1 1c-.6 0-1 .4-1 1v11c0 .6.4 1 1 1h4.6l2.7 2.7c.2.2.4.3.7.3.3 0 .5-.1.7-.3l2.7-2.7H17c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1H1zm4.52 10.15c1.99 0 3.01-1.32 3.28-2.41l-1.29-.39c-.19.66-.78 1.45-1.99 1.45-1.14 0-2.2-.83-2.2-2.34 0-1.61 1.12-2.37 2.18-2.37 1.23 0 1.78.75 1.95 1.43l1.3-.41C8.47 4.96 7.46 3.76 5.5 3.76c-1.9 0-3.61 1.44-3.61 3.7 0 2.26 1.65 3.69 3.63 3.69zm7.57 0c1.99 0 3.01-1.32 3.28-2.41l-1.29-.39c-.19.66-.78 1.45-1.99 1.45-1.14 0-2.2-.83-2.2-2.34 0-1.61 1.12-2.37 2.18-2.37 1.23 0 1.78.75 1.95 1.43l1.3-.41c-.28-1.15-1.29-2.35-3.25-2.35-1.9 0-3.61 1.44-3.61 3.7 0 2.26 1.65 3.69 3.63 3.69z"), g(a, "fill-rule", "evenodd"), g(a, "fill-opacity", ".5"), g(n, "id", "plyr-captions-off"), g(n, "viewBox", "0 0 18 18"), g(d, "d", "M1 1c-.6 0-1 .4-1 1v11c0 .6.4 1 1 1h4.6l2.7 2.7c.2.2.4.3.7.3.3 0 .5-.1.7-.3l2.7-2.7H17c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1H1zm4.52 10.15c1.99 0 3.01-1.32 3.28-2.41l-1.29-.39c-.19.66-.78 1.45-1.99 1.45-1.14 0-2.2-.83-2.2-2.34 0-1.61 1.12-2.37 2.18-2.37 1.23 0 1.78.75 1.95 1.43l1.3-.41C8.47 4.96 7.46 3.76 5.5 3.76c-1.9 0-3.61 1.44-3.61 3.7 0 2.26 1.65 3.69 3.63 3.69zm7.57 0c1.99 0 3.01-1.32 3.28-2.41l-1.29-.39c-.19.66-.78 1.45-1.99 1.45-1.14 0-2.2-.83-2.2-2.34 0-1.61 1.12-2.37 2.18-2.37 1.23 0 1.78.75 1.95 1.43l1.3-.41c-.28-1.15-1.29-2.35-3.25-2.35-1.9 0-3.61 1.44-3.61 3.7 0 2.26 1.65 3.69 3.63 3.69z"), g(d, "fill-rule", "evenodd"), g(l, "id", "plyr-captions-on"), g(l, "viewBox", "0 0 18 18"), g(u, "d", "M9 13c.3 0 .5-.1.7-.3L15.4 7 14 5.6l-4 4V1H8v8.6l-4-4L2.6 7l5.7 5.7c.2.2.4.3.7.3zm-7 2h14v2H2z"), g(c, "id", "plyr-download"), g(c, "viewBox", "0 0 18 18"), g(p, "d", "M10 3h3.6l-4 4L11 8.4l4-4V8h2V1h-7zM7 9.6l-4 4V10H1v7h7v-2H4.4l4-4z"), g(m, "id", "plyr-enter-fullscreen"), g(m, "viewBox", "0 0 18 18"), g(b, "d", "M1 12h3.6l-4 4L2 17.4l4-4V17h2v-7H1zM16 .6l-4 4V1h-2v7h7V6h-3.6l4-4z"), g(v, "id", "plyr-exit-fullscreen"), g(v, "viewBox", "0 0 18 18"), g(N, "d", "M7.875 7.171L0 1v16l7.875-6.171V17L18 9 7.875 1z"), g(T2, "id", "plyr-fast-forward"), g(T2, "viewBox", "0 0 18 18"), g(y, "d", "M17 5.3c-.1 1.6-1.2 3.7-3.3 6.4-2.2 2.8-4 4.2-5.5 4.2-.9 0-1.7-.9-2.4-2.6C5 10.9 4.4 6 3 6c-.1 0-.5.3-1.2.8l-.8-1c.8-.7 3.5-3.4 4.7-3.5 1.2-.1 2 .7 2.3 2.5.3 2 .8 6.1 1.8 6.1.9 0 2.5-3.4 2.6-4 .1-.9-.3-1.9-2.3-1.1.8-2.6 2.3-3.8 4.5-3.8 1.7.1 2.5 1.2 2.4 3.3z"), g(x2, "id", "plyr-logo-vimeo"), g(x2, "viewBox", "0 0 18 18"), g(L, "d", "M16.8 5.8c-.2-1.3-.8-2.2-2.2-2.4C12.4 3 9 3 9 3s-3.4 0-5.6.4C2 3.6 1.3 4.5 1.2 5.8 1 7.1 1 9 1 9s0 1.9.2 3.2c.2 1.3.8 2.2 2.2 2.4C5.6 15 9 15 9 15s3.4 0 5.6-.4c1.4-.3 2-1.1 2.2-2.4.2-1.3.2-3.2.2-3.2s0-1.9-.2-3.2zM7 12V6l5 3-5 3z"), g(C, "id", "plyr-logo-youtube"), g(C, "viewBox", "0 0 18 18"), g(D2, "d", "M12.4 12.5l2.1-2.1 2.1 2.1 1.4-1.4L15.9 9 18 6.9l-1.4-1.4-2.1 2.1-2.1-2.1L11 6.9 13.1 9 11 11.1zM3.786 6.008H.714C.286 6.008 0 6.31 0 6.76v4.512c0 .452.286.752.714.752h3.072l4.071 3.858c.5.3 1.143 0 1.143-.602V2.752c0-.601-.643-.977-1.143-.601L3.786 6.008z"), g($, "id", "plyr-muted"), g($, "viewBox", "0 0 18 18"), g(re2, "d", "M6 1H3c-.6 0-1 .4-1 1v14c0 .6.4 1 1 1h3c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1zm6 0c-.6 0-1 .4-1 1v14c0 .6.4 1 1 1h3c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1h-3z"), g(V, "id", "plyr-pause"), g(V, "viewBox", "0 0 18 18"), g(ce, "d", "M13.293 3.293L7.022 9.564l1.414 1.414 6.271-6.271L17 7V1h-6z"), g(Ve, "d", "M13 15H3V5h5V3H2a1 1 0 00-1 1v12a1 1 0 001 1h12a1 1 0 001-1v-6h-2v5z"), g(F2, "id", "plyr-pip"), g(F2, "viewBox", "0 0 18 18"), g(qe, "d", "M15.562 8.1L3.87.225c-.818-.562-1.87 0-1.87.9v15.75c0 .9 1.052 1.462 1.87.9L15.563 9.9c.584-.45.584-1.35 0-1.8z"), g(de, "id", "plyr-play"), g(de, "viewBox", "0 0 18 18"), g(De, "d", "M9.7 1.2l.7 6.4 2.1-2.1c1.9 1.9 1.9 5.1 0 7-.9 1-2.2 1.5-3.5 1.5-1.3 0-2.6-.5-3.5-1.5-1.9-1.9-1.9-5.1 0-7 .6-.6 1.4-1.1 2.3-1.3l-.6-1.9C6 2.6 4.9 3.2 4 4.1 1.3 6.8 1.3 11.2 4 14c1.3 1.3 3.1 2 4.9 2 1.9 0 3.6-.7 4.9-2 2.7-2.7 2.7-7.1 0-9.9L16 1.9l-6.3-.7z"), g(pe, "id", "plyr-restart"), g(pe, "viewBox", "0 0 18 18"), g(Re, "d", "M10.125 1L0 9l10.125 8v-6.171L18 17V1l-7.875 6.171z"), g(ue2, "id", "plyr-rewind"), g(ue2, "viewBox", "0 0 18 18"), g(Fe, "d", "M16.135 7.784a2 2 0 01-1.23-2.969c.322-.536.225-.998-.094-1.316l-.31-.31c-.318-.318-.78-.415-1.316-.094a2 2 0 01-2.969-1.23C10.065 1.258 9.669 1 9.219 1h-.438c-.45 0-.845.258-.997.865a2 2 0 01-2.969 1.23c-.536-.322-.999-.225-1.317.093l-.31.31c-.318.318-.415.781-.093 1.317a2 2 0 01-1.23 2.969C1.26 7.935 1 8.33 1 8.781v.438c0 .45.258.845.865.997a2 2 0 011.23 2.969c-.322.536-.225.998.094 1.316l.31.31c.319.319.782.415 1.316.094a2 2 0 012.969 1.23c.151.607.547.865.997.865h.438c.45 0 .845-.258.997-.865a2 2 0 012.969-1.23c.535.321.997.225 1.316-.094l.31-.31c.318-.318.415-.781.094-1.316a2 2 0 011.23-2.969c.607-.151.865-.547.865-.997v-.438c0-.451-.26-.846-.865-.997zM9 12a3 3 0 110-6 3 3 0 010 6z"), g(he, "id", "plyr-settings"), g(he, "viewBox", "0 0 18 18"), g(Be, "d", "M15.6 3.3c-.4-.4-1-.4-1.4 0-.4.4-.4 1 0 1.4C15.4 5.9 16 7.4 16 9c0 1.6-.6 3.1-1.8 4.3-.4.4-.4 1 0 1.4.2.2.5.3.7.3.3 0 .5-.1.7-.3C17.1 13.2 18 11.2 18 9s-.9-4.2-2.4-5.7z"), g(Ue, "d", "M11.282 5.282a.909.909 0 000 1.316c.735.735.995 1.458.995 2.402 0 .936-.425 1.917-.995 2.487a.909.909 0 000 1.316c.145.145.636.262 1.018.156a.725.725 0 00.298-.156C13.773 11.733 14.13 10.16 14.13 9c0-.17-.002-.34-.011-.51-.053-.992-.319-2.005-1.522-3.208a.909.909 0 00-1.316 0zm-7.496.726H.714C.286 6.008 0 6.31 0 6.76v4.512c0 .452.286.752.714.752h3.072l4.071 3.858c.5.3 1.143 0 1.143-.602V2.752c0-.601-.643-.977-1.143-.601L3.786 6.008z"), g(se2, "id", "plyr-volume"), g(se2, "viewBox", "0 0 18 18"), g(i, "xmlns", "http://www.w3.org/2000/svg"), g(i, "xmlns:xlink", "http://www.w3.org/1999/xlink");
9859
+ i = S("svg"), t = S("symbol"), r = S("path"), s = S("path"), n = S("symbol"), a = S("path"), l = S("symbol"), d = S("path"), c = S("symbol"), u = S("path"), m = S("symbol"), p = S("path"), v = S("symbol"), b = S("path"), T2 = S("symbol"), N = S("path"), x = S("symbol"), y = S("path"), C = S("symbol"), L = S("path"), $ = S("symbol"), D2 = S("path"), V = S("symbol"), re2 = S("path"), F2 = S("symbol"), ce = S("path"), Ve = S("path"), de = S("symbol"), qe = S("path"), pe = S("symbol"), De = S("path"), ue2 = S("symbol"), Re = S("path"), he = S("symbol"), Fe = S("path"), se2 = S("symbol"), Be = S("path"), Ue = S("path"), g(r, "d", "M16 1H2a1 1 0 00-1 1v10a1 1 0 001 1h3v-2H3V3h12v8h-2v2h3a1 1 0 001-1V2a1 1 0 00-1-1z"), g(s, "d", "M4 17h10l-5-6z"), g(t, "id", "plyr-airplay"), g(t, "viewBox", "0 0 18 18"), g(a, "d", "M1 1c-.6 0-1 .4-1 1v11c0 .6.4 1 1 1h4.6l2.7 2.7c.2.2.4.3.7.3.3 0 .5-.1.7-.3l2.7-2.7H17c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1H1zm4.52 10.15c1.99 0 3.01-1.32 3.28-2.41l-1.29-.39c-.19.66-.78 1.45-1.99 1.45-1.14 0-2.2-.83-2.2-2.34 0-1.61 1.12-2.37 2.18-2.37 1.23 0 1.78.75 1.95 1.43l1.3-.41C8.47 4.96 7.46 3.76 5.5 3.76c-1.9 0-3.61 1.44-3.61 3.7 0 2.26 1.65 3.69 3.63 3.69zm7.57 0c1.99 0 3.01-1.32 3.28-2.41l-1.29-.39c-.19.66-.78 1.45-1.99 1.45-1.14 0-2.2-.83-2.2-2.34 0-1.61 1.12-2.37 2.18-2.37 1.23 0 1.78.75 1.95 1.43l1.3-.41c-.28-1.15-1.29-2.35-3.25-2.35-1.9 0-3.61 1.44-3.61 3.7 0 2.26 1.65 3.69 3.63 3.69z"), g(a, "fill-rule", "evenodd"), g(a, "fill-opacity", ".5"), g(n, "id", "plyr-captions-off"), g(n, "viewBox", "0 0 18 18"), g(d, "d", "M1 1c-.6 0-1 .4-1 1v11c0 .6.4 1 1 1h4.6l2.7 2.7c.2.2.4.3.7.3.3 0 .5-.1.7-.3l2.7-2.7H17c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1H1zm4.52 10.15c1.99 0 3.01-1.32 3.28-2.41l-1.29-.39c-.19.66-.78 1.45-1.99 1.45-1.14 0-2.2-.83-2.2-2.34 0-1.61 1.12-2.37 2.18-2.37 1.23 0 1.78.75 1.95 1.43l1.3-.41C8.47 4.96 7.46 3.76 5.5 3.76c-1.9 0-3.61 1.44-3.61 3.7 0 2.26 1.65 3.69 3.63 3.69zm7.57 0c1.99 0 3.01-1.32 3.28-2.41l-1.29-.39c-.19.66-.78 1.45-1.99 1.45-1.14 0-2.2-.83-2.2-2.34 0-1.61 1.12-2.37 2.18-2.37 1.23 0 1.78.75 1.95 1.43l1.3-.41c-.28-1.15-1.29-2.35-3.25-2.35-1.9 0-3.61 1.44-3.61 3.7 0 2.26 1.65 3.69 3.63 3.69z"), g(d, "fill-rule", "evenodd"), g(l, "id", "plyr-captions-on"), g(l, "viewBox", "0 0 18 18"), g(u, "d", "M9 13c.3 0 .5-.1.7-.3L15.4 7 14 5.6l-4 4V1H8v8.6l-4-4L2.6 7l5.7 5.7c.2.2.4.3.7.3zm-7 2h14v2H2z"), g(c, "id", "plyr-download"), g(c, "viewBox", "0 0 18 18"), g(p, "d", "M10 3h3.6l-4 4L11 8.4l4-4V8h2V1h-7zM7 9.6l-4 4V10H1v7h7v-2H4.4l4-4z"), g(m, "id", "plyr-enter-fullscreen"), g(m, "viewBox", "0 0 18 18"), g(b, "d", "M1 12h3.6l-4 4L2 17.4l4-4V17h2v-7H1zM16 .6l-4 4V1h-2v7h7V6h-3.6l4-4z"), g(v, "id", "plyr-exit-fullscreen"), g(v, "viewBox", "0 0 18 18"), g(N, "d", "M7.875 7.171L0 1v16l7.875-6.171V17L18 9 7.875 1z"), g(T2, "id", "plyr-fast-forward"), g(T2, "viewBox", "0 0 18 18"), g(y, "d", "M17 5.3c-.1 1.6-1.2 3.7-3.3 6.4-2.2 2.8-4 4.2-5.5 4.2-.9 0-1.7-.9-2.4-2.6C5 10.9 4.4 6 3 6c-.1 0-.5.3-1.2.8l-.8-1c.8-.7 3.5-3.4 4.7-3.5 1.2-.1 2 .7 2.3 2.5.3 2 .8 6.1 1.8 6.1.9 0 2.5-3.4 2.6-4 .1-.9-.3-1.9-2.3-1.1.8-2.6 2.3-3.8 4.5-3.8 1.7.1 2.5 1.2 2.4 3.3z"), g(x, "id", "plyr-logo-vimeo"), g(x, "viewBox", "0 0 18 18"), g(L, "d", "M16.8 5.8c-.2-1.3-.8-2.2-2.2-2.4C12.4 3 9 3 9 3s-3.4 0-5.6.4C2 3.6 1.3 4.5 1.2 5.8 1 7.1 1 9 1 9s0 1.9.2 3.2c.2 1.3.8 2.2 2.2 2.4C5.6 15 9 15 9 15s3.4 0 5.6-.4c1.4-.3 2-1.1 2.2-2.4.2-1.3.2-3.2.2-3.2s0-1.9-.2-3.2zM7 12V6l5 3-5 3z"), g(C, "id", "plyr-logo-youtube"), g(C, "viewBox", "0 0 18 18"), g(D2, "d", "M12.4 12.5l2.1-2.1 2.1 2.1 1.4-1.4L15.9 9 18 6.9l-1.4-1.4-2.1 2.1-2.1-2.1L11 6.9 13.1 9 11 11.1zM3.786 6.008H.714C.286 6.008 0 6.31 0 6.76v4.512c0 .452.286.752.714.752h3.072l4.071 3.858c.5.3 1.143 0 1.143-.602V2.752c0-.601-.643-.977-1.143-.601L3.786 6.008z"), g($, "id", "plyr-muted"), g($, "viewBox", "0 0 18 18"), g(re2, "d", "M6 1H3c-.6 0-1 .4-1 1v14c0 .6.4 1 1 1h3c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1zm6 0c-.6 0-1 .4-1 1v14c0 .6.4 1 1 1h3c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1h-3z"), g(V, "id", "plyr-pause"), g(V, "viewBox", "0 0 18 18"), g(ce, "d", "M13.293 3.293L7.022 9.564l1.414 1.414 6.271-6.271L17 7V1h-6z"), g(Ve, "d", "M13 15H3V5h5V3H2a1 1 0 00-1 1v12a1 1 0 001 1h12a1 1 0 001-1v-6h-2v5z"), g(F2, "id", "plyr-pip"), g(F2, "viewBox", "0 0 18 18"), g(qe, "d", "M15.562 8.1L3.87.225c-.818-.562-1.87 0-1.87.9v15.75c0 .9 1.052 1.462 1.87.9L15.563 9.9c.584-.45.584-1.35 0-1.8z"), g(de, "id", "plyr-play"), g(de, "viewBox", "0 0 18 18"), g(De, "d", "M9.7 1.2l.7 6.4 2.1-2.1c1.9 1.9 1.9 5.1 0 7-.9 1-2.2 1.5-3.5 1.5-1.3 0-2.6-.5-3.5-1.5-1.9-1.9-1.9-5.1 0-7 .6-.6 1.4-1.1 2.3-1.3l-.6-1.9C6 2.6 4.9 3.2 4 4.1 1.3 6.8 1.3 11.2 4 14c1.3 1.3 3.1 2 4.9 2 1.9 0 3.6-.7 4.9-2 2.7-2.7 2.7-7.1 0-9.9L16 1.9l-6.3-.7z"), g(pe, "id", "plyr-restart"), g(pe, "viewBox", "0 0 18 18"), g(Re, "d", "M10.125 1L0 9l10.125 8v-6.171L18 17V1l-7.875 6.171z"), g(ue2, "id", "plyr-rewind"), g(ue2, "viewBox", "0 0 18 18"), g(Fe, "d", "M16.135 7.784a2 2 0 01-1.23-2.969c.322-.536.225-.998-.094-1.316l-.31-.31c-.318-.318-.78-.415-1.316-.094a2 2 0 01-2.969-1.23C10.065 1.258 9.669 1 9.219 1h-.438c-.45 0-.845.258-.997.865a2 2 0 01-2.969 1.23c-.536-.322-.999-.225-1.317.093l-.31.31c-.318.318-.415.781-.093 1.317a2 2 0 01-1.23 2.969C1.26 7.935 1 8.33 1 8.781v.438c0 .45.258.845.865.997a2 2 0 011.23 2.969c-.322.536-.225.998.094 1.316l.31.31c.319.319.782.415 1.316.094a2 2 0 012.969 1.23c.151.607.547.865.997.865h.438c.45 0 .845-.258.997-.865a2 2 0 012.969-1.23c.535.321.997.225 1.316-.094l.31-.31c.318-.318.415-.781.094-1.316a2 2 0 011.23-2.969c.607-.151.865-.547.865-.997v-.438c0-.451-.26-.846-.865-.997zM9 12a3 3 0 110-6 3 3 0 010 6z"), g(he, "id", "plyr-settings"), g(he, "viewBox", "0 0 18 18"), g(Be, "d", "M15.6 3.3c-.4-.4-1-.4-1.4 0-.4.4-.4 1 0 1.4C15.4 5.9 16 7.4 16 9c0 1.6-.6 3.1-1.8 4.3-.4.4-.4 1 0 1.4.2.2.5.3.7.3.3 0 .5-.1.7-.3C17.1 13.2 18 11.2 18 9s-.9-4.2-2.4-5.7z"), g(Ue, "d", "M11.282 5.282a.909.909 0 000 1.316c.735.735.995 1.458.995 2.402 0 .936-.425 1.917-.995 2.487a.909.909 0 000 1.316c.145.145.636.262 1.018.156a.725.725 0 00.298-.156C13.773 11.733 14.13 10.16 14.13 9c0-.17-.002-.34-.011-.51-.053-.992-.319-2.005-1.522-3.208a.909.909 0 00-1.316 0zm-7.496.726H.714C.286 6.008 0 6.31 0 6.76v4.512c0 .452.286.752.714.752h3.072l4.071 3.858c.5.3 1.143 0 1.143-.602V2.752c0-.601-.643-.977-1.143-.601L3.786 6.008z"), g(se2, "id", "plyr-volume"), g(se2, "viewBox", "0 0 18 18"), g(i, "xmlns", "http://www.w3.org/2000/svg"), g(i, "xmlns:xlink", "http://www.w3.org/1999/xlink");
9543
9860
  },
9544
9861
  m(We, ni) {
9545
- te(We, i, ni), k(i, t), k(t, r), k(t, s), k(i, n), k(n, a), k(i, l), k(l, d), k(i, c), k(c, u), k(i, m), k(m, p), k(i, v), k(v, b), k(i, T2), k(T2, N), k(i, x2), k(x2, y), k(i, C), k(C, L), k(i, $), k($, D2), k(i, V), k(V, re2), k(i, F2), k(F2, ce), k(F2, Ve), k(i, de), k(de, qe), k(i, pe), k(pe, De), k(i, ue2), k(ue2, Re), k(i, he), k(he, Fe), k(i, se2), k(se2, Be), k(se2, Ue);
9862
+ te(We, i, ni), k(i, t), k(t, r), k(t, s), k(i, n), k(n, a), k(i, l), k(l, d), k(i, c), k(c, u), k(i, m), k(m, p), k(i, v), k(v, b), k(i, T2), k(T2, N), k(i, x), k(x, y), k(i, C), k(C, L), k(i, $), k($, D2), k(i, V), k(V, re2), k(i, F2), k(F2, ce), k(F2, Ve), k(i, de), k(de, qe), k(i, pe), k(pe, De), k(i, ue2), k(ue2, Re), k(i, he), k(he, Fe), k(i, se2), k(se2, Be), k(se2, Ue);
9546
9863
  },
9547
9864
  p: X,
9548
9865
  i: X,
@@ -10426,19 +10743,19 @@
10426
10743
  const p = _("div", z({}, u, { class: `${u.class} plyr__menu`.trim(), hidden: "" }));
10427
10744
  p.appendChild(t.call(this, "settings", { "aria-haspopup": true, "aria-controls": `plyr-settings-${e.id}`, "aria-expanded": false }));
10428
10745
  const v = _("div", { class: "plyr__menu__container", id: `plyr-settings-${e.id}`, hidden: "" }), b = _("div"), T2 = _("div", { id: `plyr-settings-${e.id}-home` }), N = _("div", { role: "menu" });
10429
- T2.appendChild(N), b.appendChild(T2), this.elements.settings.panels.home = T2, this.config.settings.forEach((x2) => {
10746
+ T2.appendChild(N), b.appendChild(T2), this.elements.settings.panels.home = T2, this.config.settings.forEach((x) => {
10430
10747
  const y = _("button", z(B(this.config.selectors.buttons.settings), { type: "button", class: `${this.config.classNames.control} ${this.config.classNames.control}--forward`, role: "menuitem", "aria-haspopup": true, hidden: "" }));
10431
- i.call(this, y, x2), E.call(this, y, "click", () => {
10432
- d.call(this, x2, false);
10748
+ i.call(this, y, x), E.call(this, y, "click", () => {
10749
+ d.call(this, x, false);
10433
10750
  });
10434
- const C = _("span", null, j.get(x2, this.config)), L = _("span", { class: this.config.classNames.menu.value });
10435
- L.innerHTML = e[x2], C.appendChild(L), y.appendChild(C), N.appendChild(y);
10436
- const $ = _("div", { id: `plyr-settings-${e.id}-${x2}`, hidden: "" }), D2 = _("button", { type: "button", class: `${this.config.classNames.control} ${this.config.classNames.control}--back` });
10437
- D2.appendChild(_("span", { "aria-hidden": true }, j.get(x2, this.config))), D2.appendChild(_("span", { class: this.config.classNames.hidden }, j.get("menuBack", this.config))), E.call(this, $, "keydown", (V) => {
10751
+ const C = _("span", null, j.get(x, this.config)), L = _("span", { class: this.config.classNames.menu.value });
10752
+ L.innerHTML = e[x], C.appendChild(L), y.appendChild(C), N.appendChild(y);
10753
+ const $ = _("div", { id: `plyr-settings-${e.id}-${x}`, hidden: "" }), D2 = _("button", { type: "button", class: `${this.config.classNames.control} ${this.config.classNames.control}--back` });
10754
+ D2.appendChild(_("span", { "aria-hidden": true }, j.get(x, this.config))), D2.appendChild(_("span", { class: this.config.classNames.hidden }, j.get("menuBack", this.config))), E.call(this, $, "keydown", (V) => {
10438
10755
  V.key === "ArrowLeft" && (V.preventDefault(), V.stopPropagation(), d.call(this, "home", true));
10439
10756
  }, false), E.call(this, D2, "click", () => {
10440
10757
  d.call(this, "home", false);
10441
- }), $.appendChild(D2), $.appendChild(_("div", { role: "menu" })), b.appendChild($), this.elements.settings.buttons[x2] = y, this.elements.settings.panels[x2] = $;
10758
+ }), $.appendChild(D2), $.appendChild(_("div", { role: "menu" })), b.appendChild($), this.elements.settings.buttons[x] = y, this.elements.settings.panels[x] = $;
10442
10759
  }), v.appendChild(b), p.appendChild(v), c.appendChild(p), this.elements.settings.popup = v, this.elements.settings.menu = p;
10443
10760
  }
10444
10761
  if (m === "pip" && I.pip && c.appendChild(t.call(this, "pip", u)), m === "airplay" && I.airplay && c.appendChild(t.call(this, "airplay", u)), m === "download") {
@@ -11022,9 +11339,9 @@
11022
11339
  }, r = {}, s = {}, n = {};
11023
11340
  function a(p, v) {
11024
11341
  p = p.push ? p : [p];
11025
- var b, T2, N, x2 = [], y = p.length, C = y;
11342
+ var b, T2, N, x = [], y = p.length, C = y;
11026
11343
  for (b = function(L, $) {
11027
- $.length && x2.push(L), --C || v(x2);
11344
+ $.length && x.push(L), --C || v(x);
11028
11345
  }; y--; )
11029
11346
  T2 = p[y], (N = s[T2]) ? b(T2, N) : (n[T2] = n[T2] || []).push(b);
11030
11347
  }
@@ -11040,32 +11357,32 @@
11040
11357
  p.call && (p = { success: p }), v.length ? (p.error || t)(v) : (p.success || t)(p);
11041
11358
  }
11042
11359
  function c(p, v, b, T2) {
11043
- var N, x2, y = document, C = b.async, L = (b.numRetries || 0) + 1, $ = b.before || t, D2 = p.replace(/[\?|#].*$/, ""), V = p.replace(/^(css|img)!/, "");
11044
- T2 = T2 || 0, /(^css!|\.css$)/.test(D2) ? ((x2 = y.createElement("link")).rel = "stylesheet", x2.href = V, (N = "hideFocus" in x2) && x2.relList && (N = 0, x2.rel = "preload", x2.as = "style")) : /(^img!|\.(png|gif|jpg|svg|webp)$)/.test(D2) ? (x2 = y.createElement("img")).src = V : ((x2 = y.createElement("script")).src = p, x2.async = C === void 0 || C), x2.onload = x2.onerror = x2.onbeforeload = function(re2) {
11360
+ var N, x, y = document, C = b.async, L = (b.numRetries || 0) + 1, $ = b.before || t, D2 = p.replace(/[\?|#].*$/, ""), V = p.replace(/^(css|img)!/, "");
11361
+ T2 = T2 || 0, /(^css!|\.css$)/.test(D2) ? ((x = y.createElement("link")).rel = "stylesheet", x.href = V, (N = "hideFocus" in x) && x.relList && (N = 0, x.rel = "preload", x.as = "style")) : /(^img!|\.(png|gif|jpg|svg|webp)$)/.test(D2) ? (x = y.createElement("img")).src = V : ((x = y.createElement("script")).src = p, x.async = C === void 0 || C), x.onload = x.onerror = x.onbeforeload = function(re2) {
11045
11362
  var F2 = re2.type[0];
11046
11363
  if (N)
11047
11364
  try {
11048
- x2.sheet.cssText.length || (F2 = "e");
11365
+ x.sheet.cssText.length || (F2 = "e");
11049
11366
  } catch (ce) {
11050
11367
  ce.code != 18 && (F2 = "e");
11051
11368
  }
11052
11369
  if (F2 == "e") {
11053
11370
  if ((T2 += 1) < L)
11054
11371
  return c(p, v, b, T2);
11055
- } else if (x2.rel == "preload" && x2.as == "style")
11056
- return x2.rel = "stylesheet";
11372
+ } else if (x.rel == "preload" && x.as == "style")
11373
+ return x.rel = "stylesheet";
11057
11374
  v(p, F2, re2.defaultPrevented);
11058
- }, $(p, x2) !== false && y.head.appendChild(x2);
11375
+ }, $(p, x) !== false && y.head.appendChild(x);
11059
11376
  }
11060
11377
  function u(p, v, b) {
11061
- var T2, N, x2 = (p = p.push ? p : [p]).length, y = x2, C = [];
11378
+ var T2, N, x = (p = p.push ? p : [p]).length, y = x, C = [];
11062
11379
  for (T2 = function(L, $, D2) {
11063
11380
  if ($ == "e" && C.push(L), $ == "b") {
11064
11381
  if (!D2)
11065
11382
  return;
11066
11383
  C.push(L);
11067
11384
  }
11068
- --x2 || v(C);
11385
+ --x || v(C);
11069
11386
  }, N = 0; N < y; N++)
11070
11387
  c(p[N], T2, b);
11071
11388
  }
@@ -11076,14 +11393,14 @@
11076
11393
  throw "LoadJS";
11077
11394
  r[T2] = true;
11078
11395
  }
11079
- function x2(y, C) {
11396
+ function x(y, C) {
11080
11397
  u(p, function(L) {
11081
11398
  d(N, L), y && d({ success: y, error: C }, L), l(T2, L);
11082
11399
  }, N);
11083
11400
  }
11084
11401
  if (N.returnPromise)
11085
- return new Promise(x2);
11086
- x2();
11402
+ return new Promise(x);
11403
+ x();
11087
11404
  }
11088
11405
  return m.ready = function(p, v) {
11089
11406
  return a(p, function(b) {
@@ -11166,11 +11483,11 @@
11166
11483
  T2 = C, w.call(e, e.media, "volumechange");
11167
11484
  });
11168
11485
  } });
11169
- let N, { loop: x2 } = e.config;
11170
- Object.defineProperty(e.media, "loop", { get: () => x2, set(y) {
11486
+ let N, { loop: x } = e.config;
11487
+ Object.defineProperty(e.media, "loop", { get: () => x, set(y) {
11171
11488
  const C = o.boolean(y) ? y : e.config.loop.active;
11172
11489
  e.embed.setLoop(C).then(() => {
11173
- x2 = C;
11490
+ x = C;
11174
11491
  });
11175
11492
  } }), e.embed.getVideoUrl().then((y) => {
11176
11493
  N = y, h.setDownloadUrl.call(e);
@@ -12297,8 +12614,8 @@
12297
12614
  const _WindowManager = class extends whiteWebSdk.InvisiblePlugin {
12298
12615
  constructor(context) {
12299
12616
  super(context);
12300
- this.version = "1.0.0-canary.75";
12301
- this.dependencies = { "dependencies": { "@juggle/resize-observer": "^3.4.0", "@netless/synced-store": "^2.0.7", "@netless/telebox-insider": "1.0.0-alpha.37", "emittery": "^0.11.0", "jspdf": "^2.5.1", "lodash": "^4.17.21", "p-retry": "^5.1.2", "side-effect-manager": "^1.2.1", "uuid": "^9.0.0", "value-enhancer": "^1.3.2" }, "peerDependencies": { "white-web-sdk": "^2.16.0" }, "devDependencies": { "@netless/app-docs-viewer": "1.0.0-canary.5", "@netless/app-plyr": "^0.2.4", "@playwright/test": "^1.28.1", "@rollup/plugin-commonjs": "^23.0.4", "@rollup/plugin-node-resolve": "^15.0.1", "@rollup/plugin-url": "^8.0.1", "@sveltejs/vite-plugin-svelte": "^2.0.2", "@tsconfig/svelte": "^3.0.0", "@types/debug": "^4.1.7", "@types/lodash": "^4.14.182", "@types/lodash-es": "^4.17.6", "@types/node": "^18.0.3", "@types/uuid": "^9.0.0", "@typescript-eslint/eslint-plugin": "^5.46.1", "@typescript-eslint/parser": "^5.46.1", "@vitest/ui": "^0.25.7", "cypress": "^8.7.0", "dotenv": "^10.0.0", "eslint": "^8.29.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-svelte3": "^4.0.0", "jsdom": "^19.0.0", "less": "^4.1.3", "prettier": "^2.8.1", "prettier-plugin-svelte": "^2.9.0", "rollup-plugin-analyzer": "^4.0.0", "rollup-plugin-styles": "^4.0.0", "svelte": "^3.54.0", "typescript": "^4.9.4", "vite": "^4.0.3", "vite-plugin-dts": "^1.7.1", "vitest": "^0.25.7", "white-web-sdk": "^2.16.40" } };
12617
+ this.version = "1.0.0-canary.77";
12618
+ this.dependencies = { "dependencies": { "@juggle/resize-observer": "^3.4.0", "@netless/synced-store": "^2.0.7", "@netless/telebox-insider": "1.0.0-alpha.37", "emittery": "^0.11.0", "jspdf": "^2.5.1", "lodash": "^4.17.21", "p-retry": "^5.1.2", "side-effect-manager": "^1.2.1", "uuid": "^9.0.0", "value-enhancer": "^1.3.2" }, "peerDependencies": { "white-web-sdk": "^2.16.0" }, "devDependencies": { "@netless/app-docs-viewer": "1.0.0-canary.6", "@netless/app-plyr": "^0.2.4", "@playwright/test": "^1.33.0", "@rollup/plugin-commonjs": "^24.1.0", "@rollup/plugin-node-resolve": "^15.0.2", "@rollup/plugin-url": "^8.0.1", "@sveltejs/vite-plugin-svelte": "^2.2.0", "@tsconfig/svelte": "^4.0.1", "@types/debug": "^4.1.7", "@types/node": "^18.0.3", "@types/lodash": "^4.14.194", "@types/lodash-es": "^4.17.7", "@types/uuid": "^9.0.1", "@typescript-eslint/eslint-plugin": "^5.59.5", "@typescript-eslint/parser": "^5.59.5", "@vitest/ui": "^0.31.0", "cypress": "^12.12.0", "dotenv": "^16.0.3", "eslint": "^8.40.0", "eslint-config-prettier": "^8.8.0", "eslint-plugin-svelte3": "^4.0.0", "jsdom": "^22.0.0", "less": "^4.1.3", "prettier": "^2.8.8", "prettier-plugin-svelte": "^2.10.0", "rollup-plugin-analyzer": "^4.0.0", "rollup-plugin-styles": "^4.0.0", "svelte": "^3.59.1", "typescript": "^5.0.4", "vite": "^4.3.5", "vite-plugin-dts": "^2.3.0", "vitest": "^0.31.0", "white-web-sdk": "^2.16.42" } };
12302
12619
  this.emitter = callbacks;
12303
12620
  this.viewMode$ = new valueEnhancer.Val(whiteWebSdk.ViewMode.Broadcaster);
12304
12621
  this.playground$ = new valueEnhancer.Val(void 0);
@@ -12314,7 +12631,7 @@
12314
12631
  (_b = this.appManager) == null ? void 0 : _b.dispatchInternalEvent(Events.MoveCamera, camera);
12315
12632
  };
12316
12633
  _WindowManager.displayer = context.displayer;
12317
- window.NETLESS_DEPS = { "dependencies": { "@juggle/resize-observer": "^3.4.0", "@netless/synced-store": "^2.0.7", "@netless/telebox-insider": "1.0.0-alpha.37", "emittery": "^0.11.0", "jspdf": "^2.5.1", "lodash": "^4.17.21", "p-retry": "^5.1.2", "side-effect-manager": "^1.2.1", "uuid": "^9.0.0", "value-enhancer": "^1.3.2" }, "peerDependencies": { "white-web-sdk": "^2.16.0" }, "devDependencies": { "@netless/app-docs-viewer": "1.0.0-canary.5", "@netless/app-plyr": "^0.2.4", "@playwright/test": "^1.28.1", "@rollup/plugin-commonjs": "^23.0.4", "@rollup/plugin-node-resolve": "^15.0.1", "@rollup/plugin-url": "^8.0.1", "@sveltejs/vite-plugin-svelte": "^2.0.2", "@tsconfig/svelte": "^3.0.0", "@types/debug": "^4.1.7", "@types/lodash": "^4.14.182", "@types/lodash-es": "^4.17.6", "@types/node": "^18.0.3", "@types/uuid": "^9.0.0", "@typescript-eslint/eslint-plugin": "^5.46.1", "@typescript-eslint/parser": "^5.46.1", "@vitest/ui": "^0.25.7", "cypress": "^8.7.0", "dotenv": "^10.0.0", "eslint": "^8.29.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-svelte3": "^4.0.0", "jsdom": "^19.0.0", "less": "^4.1.3", "prettier": "^2.8.1", "prettier-plugin-svelte": "^2.9.0", "rollup-plugin-analyzer": "^4.0.0", "rollup-plugin-styles": "^4.0.0", "svelte": "^3.54.0", "typescript": "^4.9.4", "vite": "^4.0.3", "vite-plugin-dts": "^1.7.1", "vitest": "^0.25.7", "white-web-sdk": "^2.16.40" } };
12634
+ window.NETLESS_DEPS = { "dependencies": { "@juggle/resize-observer": "^3.4.0", "@netless/synced-store": "^2.0.7", "@netless/telebox-insider": "1.0.0-alpha.37", "emittery": "^0.11.0", "jspdf": "^2.5.1", "lodash": "^4.17.21", "p-retry": "^5.1.2", "side-effect-manager": "^1.2.1", "uuid": "^9.0.0", "value-enhancer": "^1.3.2" }, "peerDependencies": { "white-web-sdk": "^2.16.0" }, "devDependencies": { "@netless/app-docs-viewer": "1.0.0-canary.6", "@netless/app-plyr": "^0.2.4", "@playwright/test": "^1.33.0", "@rollup/plugin-commonjs": "^24.1.0", "@rollup/plugin-node-resolve": "^15.0.2", "@rollup/plugin-url": "^8.0.1", "@sveltejs/vite-plugin-svelte": "^2.2.0", "@tsconfig/svelte": "^4.0.1", "@types/debug": "^4.1.7", "@types/node": "^18.0.3", "@types/lodash": "^4.14.194", "@types/lodash-es": "^4.17.7", "@types/uuid": "^9.0.1", "@typescript-eslint/eslint-plugin": "^5.59.5", "@typescript-eslint/parser": "^5.59.5", "@vitest/ui": "^0.31.0", "cypress": "^12.12.0", "dotenv": "^16.0.3", "eslint": "^8.40.0", "eslint-config-prettier": "^8.8.0", "eslint-plugin-svelte3": "^4.0.0", "jsdom": "^22.0.0", "less": "^4.1.3", "prettier": "^2.8.8", "prettier-plugin-svelte": "^2.10.0", "rollup-plugin-analyzer": "^4.0.0", "rollup-plugin-styles": "^4.0.0", "svelte": "^3.59.1", "typescript": "^5.0.4", "vite": "^4.3.5", "vite-plugin-dts": "^2.3.0", "vitest": "^0.31.0", "white-web-sdk": "^2.16.42" } };
12318
12635
  }
12319
12636
  static async mount(params) {
12320
12637
  var _a;
@@ -12479,12 +12796,21 @@
12479
12796
  }
12480
12797
  }
12481
12798
  }
12799
+ /**
12800
+ * 注册插件
12801
+ */
12482
12802
  static register(params) {
12483
12803
  return appRegister.register(params);
12484
12804
  }
12805
+ /**
12806
+ * 注销插件
12807
+ */
12485
12808
  static unregister(kind) {
12486
12809
  return appRegister.unregister(kind);
12487
12810
  }
12811
+ /**
12812
+ * 创建一个 app 至白板
12813
+ */
12488
12814
  async addApp(params) {
12489
12815
  if (this.appManager) {
12490
12816
  if (this.appManager.rootDirRemoving) {
@@ -12571,11 +12897,17 @@
12571
12897
  }
12572
12898
  return isDynamicPPT;
12573
12899
  }
12900
+ /**
12901
+ * 设置 mainView 的 ScenePath, 并且切换白板为可写状态
12902
+ */
12574
12903
  async setMainViewScenePath(scenePath) {
12575
12904
  if (this.appManager) {
12576
12905
  await this.appManager.setMainViewScenePath(scenePath);
12577
12906
  }
12578
12907
  }
12908
+ /**
12909
+ * 设置 mainView 的 SceneIndex, 并且切换白板为可写状态
12910
+ */
12579
12911
  async setMainViewSceneIndex(index2) {
12580
12912
  if (this.appManager) {
12581
12913
  await this.appManager.setMainViewSceneIndex(index2);
@@ -12631,6 +12963,11 @@
12631
12963
  }
12632
12964
  }
12633
12965
  }
12966
+ /**
12967
+ * 删除一页
12968
+ * 默认删除当前页, 可以删除指定 index 页
12969
+ * 最低保留一页
12970
+ */
12634
12971
  async removePage(index2) {
12635
12972
  if (this.appManager) {
12636
12973
  const needRemoveIndex = index2 === void 0 ? this.pageState.index : index2;
@@ -12647,27 +12984,45 @@
12647
12984
  return false;
12648
12985
  }
12649
12986
  }
12987
+ /**
12988
+ * 返回 mainView 的 ScenePath
12989
+ */
12650
12990
  getMainViewScenePath() {
12651
12991
  var _a;
12652
12992
  return (_a = this.appManager) == null ? void 0 : _a.store.getMainViewScenePath();
12653
12993
  }
12994
+ /**
12995
+ * 返回 mainView 的 SceneIndex
12996
+ */
12654
12997
  getMainViewSceneIndex() {
12655
12998
  var _a;
12656
12999
  return (_a = this.appManager) == null ? void 0 : _a.store.getMainViewSceneIndex();
12657
13000
  }
13001
+ /**
13002
+ * 设置所有 app 的 readonly 模式
13003
+ */
12658
13004
  setReadonly(readonly) {
12659
13005
  var _a;
12660
13006
  this.readonly = readonly;
12661
13007
  (_a = this.boxManager) == null ? void 0 : _a.setReadonly(readonly);
12662
13008
  emitter.emit("setReadonly", readonly);
12663
13009
  }
13010
+ /**
13011
+ * 切换 mainView 为可写
13012
+ */
12664
13013
  switchMainViewToWriter() {
12665
13014
  var _a;
12666
13015
  return (_a = this.appManager) == null ? void 0 : _a.mainViewProxy.mainViewClickHandler();
12667
13016
  }
13017
+ /**
13018
+ * app destroy 回调
13019
+ */
12668
13020
  onAppDestroy(kind, listener) {
12669
13021
  addEmitterOnceListener(`destroy-${kind}`, listener);
12670
13022
  }
13023
+ /**
13024
+ * 设置 ViewMode
13025
+ */
12671
13026
  setViewMode(mode) {
12672
13027
  var _a;
12673
13028
  log("setViewMode", mode);
@@ -12845,14 +13200,23 @@
12845
13200
  }
12846
13201
  return this.boxManager.teleBoxManager;
12847
13202
  }
13203
+ /**
13204
+ * 查询所有的 App
13205
+ */
12848
13206
  queryAll() {
12849
13207
  var _a;
12850
13208
  return Array.from(((_a = this.appManager) == null ? void 0 : _a.appProxies.values()) || []);
12851
13209
  }
13210
+ /**
13211
+ * 查询单个 App
13212
+ */
12852
13213
  queryOne(appId) {
12853
13214
  var _a;
12854
13215
  return (_a = this.appManager) == null ? void 0 : _a.appProxies.get(appId);
12855
13216
  }
13217
+ /**
13218
+ * 关闭 APP
13219
+ */
12856
13220
  async closeApp(appId) {
12857
13221
  var _a;
12858
13222
  return (_a = this.appManager) == null ? void 0 : _a.closeApp(appId);
@@ -12949,9 +13313,9 @@
12949
13313
  var _a;
12950
13314
  (_a = this.focusedView) == null ? void 0 : _a.duplicate();
12951
13315
  }
12952
- insertText(x2, y, text2) {
13316
+ insertText(x, y, text2) {
12953
13317
  var _a;
12954
- return ((_a = this.focusedView) == null ? void 0 : _a.insertText(x2, y, text2)) || "";
13318
+ return ((_a = this.focusedView) == null ? void 0 : _a.insertText(x, y, text2)) || "";
12955
13319
  }
12956
13320
  insertImage(info) {
12957
13321
  var _a;
@@ -12974,6 +13338,7 @@
12974
13338
  this._refresh();
12975
13339
  (_a = this.appManager) == null ? void 0 : _a.dispatchInternalEvent(Events.Refresh);
12976
13340
  }
13341
+ /** @inner */
12977
13342
  _refresh() {
12978
13343
  var _a, _b;
12979
13344
  (_a = this.appManager) == null ? void 0 : _a.mainViewProxy.rebind();
@@ -13011,6 +13376,9 @@
13011
13376
  });
13012
13377
  }, 500);
13013
13378
  }
13379
+ /**
13380
+ * 切换 focus 到指定的 app, 并且把这个 app 放到最前面
13381
+ */
13014
13382
  focusApp(appId) {
13015
13383
  var _a, _b, _c;
13016
13384
  const box = (_a = this.boxManager) == null ? void 0 : _a.getBox(appId);