@netless/app-slide 0.0.26 → 0.0.27

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/main.es.js CHANGED
@@ -2034,7 +2034,7 @@ var Slide = function(t2) {
2034
2034
  var hs = xr(function(t5, e4, n3) {
2035
2035
  St2.call(t5, n3) ? t5[n3].push(e4) : Yn(t5, n3, [e4]);
2036
2036
  });
2037
- var cs = Ui(function(t5, e4, n3) {
2037
+ var cs2 = Ui(function(t5, e4, n3) {
2038
2038
  var r4 = -1, o3 = typeof e4 == "function", s3 = Fs(t5) ? i2(t5.length) : [];
2039
2039
  return ei(t5, function(t6) {
2040
2040
  s3[++r4] = o3 ? oe(e4, t6, n3) : yi(t6, e4, n3);
@@ -2594,7 +2594,7 @@ var Slide = function(t2) {
2594
2594
  return t5 == null ? [] : ci(t5, wa(t5));
2595
2595
  }, Cn.groupBy = hs, Cn.initial = function(t5) {
2596
2596
  return (t5 == null ? 0 : t5.length) ? Xi(t5, 0, -1) : [];
2597
- }, Cn.intersection = Bo, Cn.intersectionBy = ko, Cn.intersectionWith = Uo, Cn.invert = _a, Cn.invertBy = ya, Cn.invokeMap = cs, Cn.iteratee = Ya, Cn.keyBy = ds, Cn.keys = ba, Cn.keysIn = wa, Cn.map = ps, Cn.mapKeys = function(t5, e4) {
2597
+ }, Cn.intersection = Bo, Cn.intersectionBy = ko, Cn.intersectionWith = Uo, Cn.invert = _a, Cn.invertBy = ya, Cn.invokeMap = cs2, Cn.iteratee = Ya, Cn.keyBy = ds, Cn.keys = ba, Cn.keysIn = wa, Cn.map = ps, Cn.mapKeys = function(t5, e4) {
2598
2598
  var n3 = {};
2599
2599
  return e4 = Kr(e4, 3), li(t5, function(t6, i3, r4) {
2600
2600
  Yn(n3, e4(t6, i3, r4), t6);
@@ -8191,7 +8191,7 @@ var Slide = function(t2) {
8191
8191
  }
8192
8192
  }
8193
8193
  os.prototype.isDataTexture3D = true;
8194
- const ss = new ti(), as = new rs(), us = new os(), ls = new Co(), hs = [], cs = [], ds = new Float32Array(16), ps = new Float32Array(9), fs = new Float32Array(4);
8194
+ const ss = new ti(), as = new rs(), us = new os(), ls = new Co(), hs = [], cs2 = [], ds = new Float32Array(16), ps = new Float32Array(9), fs = new Float32Array(4);
8195
8195
  function ms(t3, e3, n2) {
8196
8196
  const i2 = t3[0];
8197
8197
  if (i2 <= 0 || i2 > 0)
@@ -8218,8 +8218,8 @@ var Slide = function(t2) {
8218
8218
  t3[n2] = e3[n2];
8219
8219
  }
8220
8220
  function _s(t3, e3) {
8221
- let n2 = cs[e3];
8222
- n2 === void 0 && (n2 = new Int32Array(e3), cs[e3] = n2);
8221
+ let n2 = cs2[e3];
8222
+ n2 === void 0 && (n2 = new Int32Array(e3), cs2[e3] = n2);
8223
8223
  for (let i2 = 0; i2 !== e3; ++i2)
8224
8224
  n2[i2] = t3.allocateTextureUnit();
8225
8225
  return n2;
@@ -27560,8 +27560,8 @@ var Slide = function(t2) {
27560
27560
  }, e3.prototype.destroy = function(e4) {
27561
27561
  this._geometry.refCount--, this._geometry.refCount === 0 && this._geometry.dispose(), this._matrix = null, this.currentPath = null, this._lineStyle.destroy(), this._lineStyle = null, this._fillStyle.destroy(), this._fillStyle = null, this._geometry = null, this.shader = null, this.vertexData = null, this.batches.length = 0, this.batches = null, t3.prototype.destroy.call(this, e4);
27562
27562
  }, e3._TEMP_POINT = new _e(), e3;
27563
- }(Fe), cs = function(t3, e3) {
27564
- return (cs = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t4, e4) {
27563
+ }(Fe), cs2 = function(t3, e3) {
27564
+ return (cs2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t4, e4) {
27565
27565
  t4.__proto__ = e4;
27566
27566
  } || function(t4, e4) {
27567
27567
  for (var n2 in e4)
@@ -27577,7 +27577,7 @@ var Slide = function(t2) {
27577
27577
  function n2() {
27578
27578
  this.constructor = t4;
27579
27579
  }
27580
- cs(t4, e4), t4.prototype = e4 === null ? Object.create(e4) : (n2.prototype = e4.prototype, new n2());
27580
+ cs2(t4, e4), t4.prototype = e4 === null ? Object.create(e4) : (n2.prototype = e4.prototype, new n2());
27581
27581
  }(e3, t3), e3.prototype._onTextureUpdate = function() {
27582
27582
  this._textureID = -1, this._textureTrimmedID = -1, this._cachedTint = 16777215, this._width && (this.scale.x = Xt(this.scale.x) * this._width / this._texture.orig.width), this._height && (this.scale.y = Xt(this.scale.y) * this._height / this._texture.orig.height);
27583
27583
  }, e3.prototype._onAnchorUpdate = function() {
@@ -35182,7 +35182,7 @@ void main(void){
35182
35182
  }, e3;
35183
35183
  }(s2.a);
35184
35184
  }]);
35185
- function clamp(value, min, max) {
35185
+ function clamp$1(value, min, max) {
35186
35186
  return Math.min(Math.max(value, min), max);
35187
35187
  }
35188
35188
  function isObj(obj) {
@@ -35191,6 +35191,385 @@ function isObj(obj) {
35191
35191
  function deepClone(obj) {
35192
35192
  return JSON.parse(JSON.stringify(obj));
35193
35193
  }
35194
+ var colorString = { exports: {} };
35195
+ var colorName = {
35196
+ "aliceblue": [240, 248, 255],
35197
+ "antiquewhite": [250, 235, 215],
35198
+ "aqua": [0, 255, 255],
35199
+ "aquamarine": [127, 255, 212],
35200
+ "azure": [240, 255, 255],
35201
+ "beige": [245, 245, 220],
35202
+ "bisque": [255, 228, 196],
35203
+ "black": [0, 0, 0],
35204
+ "blanchedalmond": [255, 235, 205],
35205
+ "blue": [0, 0, 255],
35206
+ "blueviolet": [138, 43, 226],
35207
+ "brown": [165, 42, 42],
35208
+ "burlywood": [222, 184, 135],
35209
+ "cadetblue": [95, 158, 160],
35210
+ "chartreuse": [127, 255, 0],
35211
+ "chocolate": [210, 105, 30],
35212
+ "coral": [255, 127, 80],
35213
+ "cornflowerblue": [100, 149, 237],
35214
+ "cornsilk": [255, 248, 220],
35215
+ "crimson": [220, 20, 60],
35216
+ "cyan": [0, 255, 255],
35217
+ "darkblue": [0, 0, 139],
35218
+ "darkcyan": [0, 139, 139],
35219
+ "darkgoldenrod": [184, 134, 11],
35220
+ "darkgray": [169, 169, 169],
35221
+ "darkgreen": [0, 100, 0],
35222
+ "darkgrey": [169, 169, 169],
35223
+ "darkkhaki": [189, 183, 107],
35224
+ "darkmagenta": [139, 0, 139],
35225
+ "darkolivegreen": [85, 107, 47],
35226
+ "darkorange": [255, 140, 0],
35227
+ "darkorchid": [153, 50, 204],
35228
+ "darkred": [139, 0, 0],
35229
+ "darksalmon": [233, 150, 122],
35230
+ "darkseagreen": [143, 188, 143],
35231
+ "darkslateblue": [72, 61, 139],
35232
+ "darkslategray": [47, 79, 79],
35233
+ "darkslategrey": [47, 79, 79],
35234
+ "darkturquoise": [0, 206, 209],
35235
+ "darkviolet": [148, 0, 211],
35236
+ "deeppink": [255, 20, 147],
35237
+ "deepskyblue": [0, 191, 255],
35238
+ "dimgray": [105, 105, 105],
35239
+ "dimgrey": [105, 105, 105],
35240
+ "dodgerblue": [30, 144, 255],
35241
+ "firebrick": [178, 34, 34],
35242
+ "floralwhite": [255, 250, 240],
35243
+ "forestgreen": [34, 139, 34],
35244
+ "fuchsia": [255, 0, 255],
35245
+ "gainsboro": [220, 220, 220],
35246
+ "ghostwhite": [248, 248, 255],
35247
+ "gold": [255, 215, 0],
35248
+ "goldenrod": [218, 165, 32],
35249
+ "gray": [128, 128, 128],
35250
+ "green": [0, 128, 0],
35251
+ "greenyellow": [173, 255, 47],
35252
+ "grey": [128, 128, 128],
35253
+ "honeydew": [240, 255, 240],
35254
+ "hotpink": [255, 105, 180],
35255
+ "indianred": [205, 92, 92],
35256
+ "indigo": [75, 0, 130],
35257
+ "ivory": [255, 255, 240],
35258
+ "khaki": [240, 230, 140],
35259
+ "lavender": [230, 230, 250],
35260
+ "lavenderblush": [255, 240, 245],
35261
+ "lawngreen": [124, 252, 0],
35262
+ "lemonchiffon": [255, 250, 205],
35263
+ "lightblue": [173, 216, 230],
35264
+ "lightcoral": [240, 128, 128],
35265
+ "lightcyan": [224, 255, 255],
35266
+ "lightgoldenrodyellow": [250, 250, 210],
35267
+ "lightgray": [211, 211, 211],
35268
+ "lightgreen": [144, 238, 144],
35269
+ "lightgrey": [211, 211, 211],
35270
+ "lightpink": [255, 182, 193],
35271
+ "lightsalmon": [255, 160, 122],
35272
+ "lightseagreen": [32, 178, 170],
35273
+ "lightskyblue": [135, 206, 250],
35274
+ "lightslategray": [119, 136, 153],
35275
+ "lightslategrey": [119, 136, 153],
35276
+ "lightsteelblue": [176, 196, 222],
35277
+ "lightyellow": [255, 255, 224],
35278
+ "lime": [0, 255, 0],
35279
+ "limegreen": [50, 205, 50],
35280
+ "linen": [250, 240, 230],
35281
+ "magenta": [255, 0, 255],
35282
+ "maroon": [128, 0, 0],
35283
+ "mediumaquamarine": [102, 205, 170],
35284
+ "mediumblue": [0, 0, 205],
35285
+ "mediumorchid": [186, 85, 211],
35286
+ "mediumpurple": [147, 112, 219],
35287
+ "mediumseagreen": [60, 179, 113],
35288
+ "mediumslateblue": [123, 104, 238],
35289
+ "mediumspringgreen": [0, 250, 154],
35290
+ "mediumturquoise": [72, 209, 204],
35291
+ "mediumvioletred": [199, 21, 133],
35292
+ "midnightblue": [25, 25, 112],
35293
+ "mintcream": [245, 255, 250],
35294
+ "mistyrose": [255, 228, 225],
35295
+ "moccasin": [255, 228, 181],
35296
+ "navajowhite": [255, 222, 173],
35297
+ "navy": [0, 0, 128],
35298
+ "oldlace": [253, 245, 230],
35299
+ "olive": [128, 128, 0],
35300
+ "olivedrab": [107, 142, 35],
35301
+ "orange": [255, 165, 0],
35302
+ "orangered": [255, 69, 0],
35303
+ "orchid": [218, 112, 214],
35304
+ "palegoldenrod": [238, 232, 170],
35305
+ "palegreen": [152, 251, 152],
35306
+ "paleturquoise": [175, 238, 238],
35307
+ "palevioletred": [219, 112, 147],
35308
+ "papayawhip": [255, 239, 213],
35309
+ "peachpuff": [255, 218, 185],
35310
+ "peru": [205, 133, 63],
35311
+ "pink": [255, 192, 203],
35312
+ "plum": [221, 160, 221],
35313
+ "powderblue": [176, 224, 230],
35314
+ "purple": [128, 0, 128],
35315
+ "rebeccapurple": [102, 51, 153],
35316
+ "red": [255, 0, 0],
35317
+ "rosybrown": [188, 143, 143],
35318
+ "royalblue": [65, 105, 225],
35319
+ "saddlebrown": [139, 69, 19],
35320
+ "salmon": [250, 128, 114],
35321
+ "sandybrown": [244, 164, 96],
35322
+ "seagreen": [46, 139, 87],
35323
+ "seashell": [255, 245, 238],
35324
+ "sienna": [160, 82, 45],
35325
+ "silver": [192, 192, 192],
35326
+ "skyblue": [135, 206, 235],
35327
+ "slateblue": [106, 90, 205],
35328
+ "slategray": [112, 128, 144],
35329
+ "slategrey": [112, 128, 144],
35330
+ "snow": [255, 250, 250],
35331
+ "springgreen": [0, 255, 127],
35332
+ "steelblue": [70, 130, 180],
35333
+ "tan": [210, 180, 140],
35334
+ "teal": [0, 128, 128],
35335
+ "thistle": [216, 191, 216],
35336
+ "tomato": [255, 99, 71],
35337
+ "turquoise": [64, 224, 208],
35338
+ "violet": [238, 130, 238],
35339
+ "wheat": [245, 222, 179],
35340
+ "white": [255, 255, 255],
35341
+ "whitesmoke": [245, 245, 245],
35342
+ "yellow": [255, 255, 0],
35343
+ "yellowgreen": [154, 205, 50]
35344
+ };
35345
+ var simpleSwizzle = { exports: {} };
35346
+ var isArrayish$1 = function isArrayish(obj) {
35347
+ if (!obj || typeof obj === "string") {
35348
+ return false;
35349
+ }
35350
+ return obj instanceof Array || Array.isArray(obj) || obj.length >= 0 && (obj.splice instanceof Function || Object.getOwnPropertyDescriptor(obj, obj.length - 1) && obj.constructor.name !== "String");
35351
+ };
35352
+ var isArrayish2 = isArrayish$1;
35353
+ var concat = Array.prototype.concat;
35354
+ var slice = Array.prototype.slice;
35355
+ var swizzle$1 = simpleSwizzle.exports = function swizzle(args) {
35356
+ var results = [];
35357
+ for (var i = 0, len = args.length; i < len; i++) {
35358
+ var arg = args[i];
35359
+ if (isArrayish2(arg)) {
35360
+ results = concat.call(results, slice.call(arg));
35361
+ } else {
35362
+ results.push(arg);
35363
+ }
35364
+ }
35365
+ return results;
35366
+ };
35367
+ swizzle$1.wrap = function(fn) {
35368
+ return function() {
35369
+ return fn(swizzle$1(arguments));
35370
+ };
35371
+ };
35372
+ var colorNames = colorName;
35373
+ var swizzle2 = simpleSwizzle.exports;
35374
+ var reverseNames = {};
35375
+ for (var name in colorNames) {
35376
+ if (colorNames.hasOwnProperty(name)) {
35377
+ reverseNames[colorNames[name]] = name;
35378
+ }
35379
+ }
35380
+ var cs = colorString.exports = {
35381
+ to: {},
35382
+ get: {}
35383
+ };
35384
+ cs.get = function(string) {
35385
+ var prefix = string.substring(0, 3).toLowerCase();
35386
+ var val;
35387
+ var model;
35388
+ switch (prefix) {
35389
+ case "hsl":
35390
+ val = cs.get.hsl(string);
35391
+ model = "hsl";
35392
+ break;
35393
+ case "hwb":
35394
+ val = cs.get.hwb(string);
35395
+ model = "hwb";
35396
+ break;
35397
+ default:
35398
+ val = cs.get.rgb(string);
35399
+ model = "rgb";
35400
+ break;
35401
+ }
35402
+ if (!val) {
35403
+ return null;
35404
+ }
35405
+ return { model, value: val };
35406
+ };
35407
+ cs.get.rgb = function(string) {
35408
+ if (!string) {
35409
+ return null;
35410
+ }
35411
+ var abbr = /^#([a-f0-9]{3,4})$/i;
35412
+ var hex = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i;
35413
+ var rgba = /^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/;
35414
+ var per = /^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/;
35415
+ var keyword = /(\D+)/;
35416
+ var rgb = [0, 0, 0, 1];
35417
+ var match;
35418
+ var i;
35419
+ var hexAlpha;
35420
+ if (match = string.match(hex)) {
35421
+ hexAlpha = match[2];
35422
+ match = match[1];
35423
+ for (i = 0; i < 3; i++) {
35424
+ var i2 = i * 2;
35425
+ rgb[i] = parseInt(match.slice(i2, i2 + 2), 16);
35426
+ }
35427
+ if (hexAlpha) {
35428
+ rgb[3] = parseInt(hexAlpha, 16) / 255;
35429
+ }
35430
+ } else if (match = string.match(abbr)) {
35431
+ match = match[1];
35432
+ hexAlpha = match[3];
35433
+ for (i = 0; i < 3; i++) {
35434
+ rgb[i] = parseInt(match[i] + match[i], 16);
35435
+ }
35436
+ if (hexAlpha) {
35437
+ rgb[3] = parseInt(hexAlpha + hexAlpha, 16) / 255;
35438
+ }
35439
+ } else if (match = string.match(rgba)) {
35440
+ for (i = 0; i < 3; i++) {
35441
+ rgb[i] = parseInt(match[i + 1], 0);
35442
+ }
35443
+ if (match[4]) {
35444
+ rgb[3] = parseFloat(match[4]);
35445
+ }
35446
+ } else if (match = string.match(per)) {
35447
+ for (i = 0; i < 3; i++) {
35448
+ rgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55);
35449
+ }
35450
+ if (match[4]) {
35451
+ rgb[3] = parseFloat(match[4]);
35452
+ }
35453
+ } else if (match = string.match(keyword)) {
35454
+ if (match[1] === "transparent") {
35455
+ return [0, 0, 0, 0];
35456
+ }
35457
+ rgb = colorNames[match[1]];
35458
+ if (!rgb) {
35459
+ return null;
35460
+ }
35461
+ rgb[3] = 1;
35462
+ return rgb;
35463
+ } else {
35464
+ return null;
35465
+ }
35466
+ for (i = 0; i < 3; i++) {
35467
+ rgb[i] = clamp(rgb[i], 0, 255);
35468
+ }
35469
+ rgb[3] = clamp(rgb[3], 0, 1);
35470
+ return rgb;
35471
+ };
35472
+ cs.get.hsl = function(string) {
35473
+ if (!string) {
35474
+ return null;
35475
+ }
35476
+ var hsl = /^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?[\d\.]+)\s*)?\)$/;
35477
+ var match = string.match(hsl);
35478
+ if (match) {
35479
+ var alpha = parseFloat(match[4]);
35480
+ var h = (parseFloat(match[1]) + 360) % 360;
35481
+ var s2 = clamp(parseFloat(match[2]), 0, 100);
35482
+ var l = clamp(parseFloat(match[3]), 0, 100);
35483
+ var a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);
35484
+ return [h, s2, l, a];
35485
+ }
35486
+ return null;
35487
+ };
35488
+ cs.get.hwb = function(string) {
35489
+ if (!string) {
35490
+ return null;
35491
+ }
35492
+ var hwb = /^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/;
35493
+ var match = string.match(hwb);
35494
+ if (match) {
35495
+ var alpha = parseFloat(match[4]);
35496
+ var h = (parseFloat(match[1]) % 360 + 360) % 360;
35497
+ var w = clamp(parseFloat(match[2]), 0, 100);
35498
+ var b = clamp(parseFloat(match[3]), 0, 100);
35499
+ var a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);
35500
+ return [h, w, b, a];
35501
+ }
35502
+ return null;
35503
+ };
35504
+ cs.to.hex = function() {
35505
+ var rgba = swizzle2(arguments);
35506
+ return "#" + hexDouble(rgba[0]) + hexDouble(rgba[1]) + hexDouble(rgba[2]) + (rgba[3] < 1 ? hexDouble(Math.round(rgba[3] * 255)) : "");
35507
+ };
35508
+ cs.to.rgb = function() {
35509
+ var rgba = swizzle2(arguments);
35510
+ return rgba.length < 4 || rgba[3] === 1 ? "rgb(" + Math.round(rgba[0]) + ", " + Math.round(rgba[1]) + ", " + Math.round(rgba[2]) + ")" : "rgba(" + Math.round(rgba[0]) + ", " + Math.round(rgba[1]) + ", " + Math.round(rgba[2]) + ", " + rgba[3] + ")";
35511
+ };
35512
+ cs.to.rgb.percent = function() {
35513
+ var rgba = swizzle2(arguments);
35514
+ var r2 = Math.round(rgba[0] / 255 * 100);
35515
+ var g = Math.round(rgba[1] / 255 * 100);
35516
+ var b = Math.round(rgba[2] / 255 * 100);
35517
+ return rgba.length < 4 || rgba[3] === 1 ? "rgb(" + r2 + "%, " + g + "%, " + b + "%)" : "rgba(" + r2 + "%, " + g + "%, " + b + "%, " + rgba[3] + ")";
35518
+ };
35519
+ cs.to.hsl = function() {
35520
+ var hsla = swizzle2(arguments);
35521
+ return hsla.length < 4 || hsla[3] === 1 ? "hsl(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%)" : "hsla(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%, " + hsla[3] + ")";
35522
+ };
35523
+ cs.to.hwb = function() {
35524
+ var hwba = swizzle2(arguments);
35525
+ var a = "";
35526
+ if (hwba.length >= 4 && hwba[3] !== 1) {
35527
+ a = ", " + hwba[3];
35528
+ }
35529
+ return "hwb(" + hwba[0] + ", " + hwba[1] + "%, " + hwba[2] + "%" + a + ")";
35530
+ };
35531
+ cs.to.keyword = function(rgb) {
35532
+ return reverseNames[rgb.slice(0, 3)];
35533
+ };
35534
+ function clamp(num, min, max) {
35535
+ return Math.min(Math.max(min, num), max);
35536
+ }
35537
+ function hexDouble(num) {
35538
+ var str = num.toString(16).toUpperCase();
35539
+ return str.length < 2 ? "0" + str : str;
35540
+ }
35541
+ var ColorString = colorString.exports;
35542
+ function guessBgColor(el) {
35543
+ try {
35544
+ const bg = window.getComputedStyle(el).backgroundColor;
35545
+ if (bg !== "rgba(0, 0, 0, 0)" && bg !== "transparent") {
35546
+ return bg;
35547
+ }
35548
+ if (el.parentElement) {
35549
+ return guessBgColor(el.parentElement);
35550
+ }
35551
+ } catch {
35552
+ }
35553
+ return "#ffffff";
35554
+ }
35555
+ function toHex(color) {
35556
+ const result = ColorString.get(color);
35557
+ if (result && result.model === "rgb") {
35558
+ const args = result.value;
35559
+ const integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
35560
+ const string = integer.toString(16);
35561
+ return "#" + "000000".substring(string.length) + string;
35562
+ } else {
35563
+ return color;
35564
+ }
35565
+ }
35566
+ let cachedBgColor = "";
35567
+ function cachedGetBgColor(el) {
35568
+ if (!cachedBgColor) {
35569
+ cachedBgColor = toHex(guessBgColor(el));
35570
+ }
35571
+ return cachedBgColor;
35572
+ }
35194
35573
  function createDocsViewerPages(slide) {
35195
35574
  const { width, height, slideCount, slideState } = slide;
35196
35575
  const { taskId, url } = slideState;
@@ -35316,7 +35695,7 @@ class SlideController {
35316
35695
  }
35317
35696
  jumpToPage(page) {
35318
35697
  if (this.ready) {
35319
- page = clamp(page, 1, this.pageCount);
35698
+ page = clamp$1(page, 1, this.pageCount);
35320
35699
  this.slide.renderSlide(page);
35321
35700
  }
35322
35701
  }
@@ -35402,7 +35781,7 @@ class SlideController {
35402
35781
  autoFPS: true,
35403
35782
  autoResolution: true,
35404
35783
  resolution: (_a = this.context.getAppOptions()) == null ? void 0 : _a.resolution,
35405
- transactionBgColor: ((_b = this.context.getAppOptions()) == null ? void 0 : _b.bgColor) || "#f9f9fc"
35784
+ transactionBgColor: ((_b = this.context.getAppOptions()) == null ? void 0 : _b.bgColor) || cachedGetBgColor(anchor)
35406
35785
  },
35407
35786
  timestamp: this.timestamp
35408
35787
  });
@@ -36384,6 +36763,7 @@ const ClickThroughAppliances = new Set(["clicker", "selector"]);
36384
36763
  class SlideDocsViewer {
36385
36764
  constructor({ box, view, mountSlideController, mountWhiteboard }) {
36386
36765
  this.slideController = null;
36766
+ this.isViewMounted = false;
36387
36767
  this.onError = ({ error }) => {
36388
36768
  this.viewer.setPaused();
36389
36769
  console.warn("[Slide] render error", error);
@@ -36405,6 +36785,11 @@ class SlideDocsViewer {
36405
36785
  height,
36406
36786
  animationMode: "immediately"
36407
36787
  });
36788
+ if (!this.isViewMounted && width && height) {
36789
+ this.isViewMounted = true;
36790
+ console.log("[Slide] mount whiteboard view");
36791
+ this.mountWhiteboard(this.$whiteboardView);
36792
+ }
36408
36793
  }
36409
36794
  };
36410
36795
  this.onPlay = () => {
@@ -36471,7 +36856,6 @@ class SlideDocsViewer {
36471
36856
  if (!this.$whiteboardView) {
36472
36857
  this.$whiteboardView = document.createElement("div");
36473
36858
  this.$whiteboardView.className = this.wrapClassName("wb-view");
36474
- this.mountWhiteboard(this.$whiteboardView);
36475
36859
  }
36476
36860
  return this.$whiteboardView;
36477
36861
  }