hanc-webrtc-widgets 2.1.12 → 2.2.1
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/hanc-webrtc-widgets.es.js +645 -657
- package/dist/hanc-webrtc-widgets.umd.js +33 -33
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*/
|
|
6
|
-
const
|
|
6
|
+
const Ea = globalThis, Jl = Ea.ShadowRoot && (Ea.ShadyCSS === void 0 || Ea.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Zl = Symbol(), Kd = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
let sf = class {
|
|
8
8
|
constructor(e, t, n) {
|
|
9
9
|
if (this._$cssResult$ = !0, n !== Zl) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
@@ -32,7 +32,7 @@ const zm = (i) => new sf(typeof i == "string" ? i : i + "", void 0, Zl), Ql = (i
|
|
|
32
32
|
}, Gm = (i, e) => {
|
|
33
33
|
if (Jl) i.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
|
|
34
34
|
else for (const t of e) {
|
|
35
|
-
const n = document.createElement("style"), s =
|
|
35
|
+
const n = document.createElement("style"), s = Ea.litNonce;
|
|
36
36
|
s !== void 0 && n.setAttribute("nonce", s), n.textContent = t.cssText, i.appendChild(n);
|
|
37
37
|
}
|
|
38
38
|
}, Jd = Jl ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((e) => {
|
|
@@ -45,7 +45,7 @@ const zm = (i) => new sf(typeof i == "string" ? i : i + "", void 0, Zl), Ql = (i
|
|
|
45
45
|
* Copyright 2017 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
47
|
*/
|
|
48
|
-
const { is: Hm, defineProperty: Wm, getOwnPropertyDescriptor: qm, getOwnPropertyNames: jm, getOwnPropertySymbols: Xm, getPrototypeOf: $m } = Object, qi = globalThis, Zd = qi.trustedTypes, Ym = Zd ? Zd.emptyScript : "", xo = qi.reactiveElementPolyfillSupport,
|
|
48
|
+
const { is: Hm, defineProperty: Wm, getOwnPropertyDescriptor: qm, getOwnPropertyNames: jm, getOwnPropertySymbols: Xm, getPrototypeOf: $m } = Object, qi = globalThis, Zd = qi.trustedTypes, Ym = Zd ? Zd.emptyScript : "", xo = qi.reactiveElementPolyfillSupport, Rr = (i, e) => i, Wa = { toAttribute(i, e) {
|
|
49
49
|
switch (e) {
|
|
50
50
|
case Boolean:
|
|
51
51
|
i = i ? Ym : null;
|
|
@@ -73,9 +73,9 @@ const { is: Hm, defineProperty: Wm, getOwnPropertyDescriptor: qm, getOwnProperty
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
return t;
|
|
76
|
-
} }, ed = (i, e) => !Hm(i, e), Qd = { attribute: !0, type: String, converter:
|
|
76
|
+
} }, ed = (i, e) => !Hm(i, e), Qd = { attribute: !0, type: String, converter: Wa, reflect: !1, hasChanged: ed };
|
|
77
77
|
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), qi.litPropertyMetadata ?? (qi.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
78
|
-
class
|
|
78
|
+
class zs extends HTMLElement {
|
|
79
79
|
static addInitializer(e) {
|
|
80
80
|
this._$Ei(), (this.l ?? (this.l = [])).push(e);
|
|
81
81
|
}
|
|
@@ -105,13 +105,13 @@ class Gs extends HTMLElement {
|
|
|
105
105
|
return this.elementProperties.get(e) ?? Qd;
|
|
106
106
|
}
|
|
107
107
|
static _$Ei() {
|
|
108
|
-
if (this.hasOwnProperty(
|
|
108
|
+
if (this.hasOwnProperty(Rr("elementProperties"))) return;
|
|
109
109
|
const e = $m(this);
|
|
110
110
|
e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
|
|
111
111
|
}
|
|
112
112
|
static finalize() {
|
|
113
|
-
if (this.hasOwnProperty(
|
|
114
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
|
113
|
+
if (this.hasOwnProperty(Rr("finalized"))) return;
|
|
114
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(Rr("properties"))) {
|
|
115
115
|
const t = this.properties, n = [...jm(t), ...Xm(t)];
|
|
116
116
|
for (const s of n) this.createProperty(s, t[s]);
|
|
117
117
|
}
|
|
@@ -186,7 +186,7 @@ class Gs extends HTMLElement {
|
|
|
186
186
|
var r;
|
|
187
187
|
const n = this.constructor.elementProperties.get(e), s = this.constructor._$Eu(e, n);
|
|
188
188
|
if (s !== void 0 && n.reflect === !0) {
|
|
189
|
-
const a = (((r = n.converter) == null ? void 0 : r.toAttribute) !== void 0 ? n.converter :
|
|
189
|
+
const a = (((r = n.converter) == null ? void 0 : r.toAttribute) !== void 0 ? n.converter : Wa).toAttribute(t, n.type);
|
|
190
190
|
this._$Em = e, a == null ? this.removeAttribute(s) : this.setAttribute(s, a), this._$Em = null;
|
|
191
191
|
}
|
|
192
192
|
}
|
|
@@ -194,7 +194,7 @@ class Gs extends HTMLElement {
|
|
|
194
194
|
var r;
|
|
195
195
|
const n = this.constructor, s = n._$Eh.get(e);
|
|
196
196
|
if (s !== void 0 && this._$Em !== s) {
|
|
197
|
-
const a = n.getPropertyOptions(s), o = typeof a.converter == "function" ? { fromAttribute: a.converter } : ((r = a.converter) == null ? void 0 : r.fromAttribute) !== void 0 ? a.converter :
|
|
197
|
+
const a = n.getPropertyOptions(s), o = typeof a.converter == "function" ? { fromAttribute: a.converter } : ((r = a.converter) == null ? void 0 : r.fromAttribute) !== void 0 ? a.converter : Wa;
|
|
198
198
|
this._$Em = s, this[s] = o.fromAttribute(t, a.type), this._$Em = null;
|
|
199
199
|
}
|
|
200
200
|
}
|
|
@@ -273,38 +273,38 @@ class Gs extends HTMLElement {
|
|
|
273
273
|
firstUpdated(e) {
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
|
-
|
|
276
|
+
zs.elementStyles = [], zs.shadowRootOptions = { mode: "open" }, zs[Rr("elementProperties")] = /* @__PURE__ */ new Map(), zs[Rr("finalized")] = /* @__PURE__ */ new Map(), xo == null || xo({ ReactiveElement: zs }), (qi.reactiveElementVersions ?? (qi.reactiveElementVersions = [])).push("2.0.4");
|
|
277
277
|
/**
|
|
278
278
|
* @license
|
|
279
279
|
* Copyright 2017 Google LLC
|
|
280
280
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
281
281
|
*/
|
|
282
|
-
const
|
|
283
|
-
\f\r]`,
|
|
284
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), iu = /'/g, su = /"/g, of = /^(?:script|style|textarea|title)$/i, Zm = (i) => (e, ...t) => ({ _$litType$: i, strings: e, values: t }), Zt = Zm(1),
|
|
282
|
+
const Pr = globalThis, qa = Pr.trustedTypes, eu = qa ? qa.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, rf = "$lit$", Bi = `lit$${Math.random().toFixed(9).slice(2)}$`, af = "?" + Bi, Km = `<${af}>`, gs = document, Ur = () => gs.createComment(""), Or = (i) => i === null || typeof i != "object" && typeof i != "function", td = Array.isArray, Jm = (i) => td(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", To = `[
|
|
283
|
+
\f\r]`, ur = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, tu = /-->/g, nu = />/g, Qi = RegExp(`>|${To}(?:([^\\s"'>=/]+)(${To}*=${To}*(?:[^
|
|
284
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), iu = /'/g, su = /"/g, of = /^(?:script|style|textarea|title)$/i, Zm = (i) => (e, ...t) => ({ _$litType$: i, strings: e, values: t }), Zt = Zm(1), Zs = Symbol.for("lit-noChange"), Bt = Symbol.for("lit-nothing"), ru = /* @__PURE__ */ new WeakMap(), us = gs.createTreeWalker(gs, 129);
|
|
285
285
|
function cf(i, e) {
|
|
286
286
|
if (!td(i) || !i.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
287
287
|
return eu !== void 0 ? eu.createHTML(e) : e;
|
|
288
288
|
}
|
|
289
289
|
const Qm = (i, e) => {
|
|
290
290
|
const t = i.length - 1, n = [];
|
|
291
|
-
let s, r = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", a =
|
|
291
|
+
let s, r = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", a = ur;
|
|
292
292
|
for (let o = 0; o < t; o++) {
|
|
293
293
|
const c = i[o];
|
|
294
294
|
let l, d, u = -1, h = 0;
|
|
295
|
-
for (; h < c.length && (a.lastIndex = h, d = a.exec(c), d !== null); ) h = a.lastIndex, a ===
|
|
295
|
+
for (; h < c.length && (a.lastIndex = h, d = a.exec(c), d !== null); ) h = a.lastIndex, a === ur ? d[1] === "!--" ? a = tu : d[1] !== void 0 ? a = nu : d[2] !== void 0 ? (of.test(d[2]) && (s = RegExp("</" + d[2], "g")), a = Qi) : d[3] !== void 0 && (a = Qi) : a === Qi ? d[0] === ">" ? (a = s ?? ur, u = -1) : d[1] === void 0 ? u = -2 : (u = a.lastIndex - d[2].length, l = d[1], a = d[3] === void 0 ? Qi : d[3] === '"' ? su : iu) : a === su || a === iu ? a = Qi : a === tu || a === nu ? a = ur : (a = Qi, s = void 0);
|
|
296
296
|
const p = a === Qi && i[o + 1].startsWith("/>") ? " " : "";
|
|
297
|
-
r += a ===
|
|
297
|
+
r += a === ur ? c + Km : u >= 0 ? (n.push(l), c.slice(0, u) + rf + c.slice(u) + Bi + p) : c + Bi + (u === -2 ? o : p);
|
|
298
298
|
}
|
|
299
299
|
return [cf(i, r + (i[t] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), n];
|
|
300
300
|
};
|
|
301
|
-
class
|
|
301
|
+
class Fr {
|
|
302
302
|
constructor({ strings: e, _$litType$: t }, n) {
|
|
303
303
|
let s;
|
|
304
304
|
this.parts = [];
|
|
305
305
|
let r = 0, a = 0;
|
|
306
306
|
const o = e.length - 1, c = this.parts, [l, d] = Qm(e, t);
|
|
307
|
-
if (this.el =
|
|
307
|
+
if (this.el = Fr.createElement(l, n), us.currentNode = this.el.content, t === 2 || t === 3) {
|
|
308
308
|
const u = this.el.content.firstChild;
|
|
309
309
|
u.replaceWith(...u.childNodes);
|
|
310
310
|
}
|
|
@@ -312,14 +312,14 @@ class Br {
|
|
|
312
312
|
if (s.nodeType === 1) {
|
|
313
313
|
if (s.hasAttributes()) for (const u of s.getAttributeNames()) if (u.endsWith(rf)) {
|
|
314
314
|
const h = d[a++], p = s.getAttribute(u).split(Bi), g = /([.?@])?(.*)/.exec(h);
|
|
315
|
-
c.push({ type: 1, index: r, name: g[2], strings: p, ctor: g[1] === "." ? tg : g[1] === "?" ? ng : g[1] === "@" ? ig :
|
|
315
|
+
c.push({ type: 1, index: r, name: g[2], strings: p, ctor: g[1] === "." ? tg : g[1] === "?" ? ng : g[1] === "@" ? ig : so }), s.removeAttribute(u);
|
|
316
316
|
} else u.startsWith(Bi) && (c.push({ type: 6, index: r }), s.removeAttribute(u));
|
|
317
317
|
if (of.test(s.tagName)) {
|
|
318
318
|
const u = s.textContent.split(Bi), h = u.length - 1;
|
|
319
319
|
if (h > 0) {
|
|
320
|
-
s.textContent =
|
|
321
|
-
for (let p = 0; p < h; p++) s.append(u[p],
|
|
322
|
-
s.append(u[h],
|
|
320
|
+
s.textContent = qa ? qa.emptyScript : "";
|
|
321
|
+
for (let p = 0; p < h; p++) s.append(u[p], Ur()), us.nextNode(), c.push({ type: 2, index: ++r });
|
|
322
|
+
s.append(u[h], Ur());
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
325
|
} else if (s.nodeType === 8) if (s.data === af) c.push({ type: 2, index: r });
|
|
@@ -335,12 +335,12 @@ class Br {
|
|
|
335
335
|
return n.innerHTML = e, n;
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
|
-
function
|
|
338
|
+
function Qs(i, e, t = i, n) {
|
|
339
339
|
var a, o;
|
|
340
|
-
if (e ===
|
|
340
|
+
if (e === Zs) return e;
|
|
341
341
|
let s = n !== void 0 ? (a = t._$Co) == null ? void 0 : a[n] : t._$Cl;
|
|
342
|
-
const r =
|
|
343
|
-
return (s == null ? void 0 : s.constructor) !== r && ((o = s == null ? void 0 : s._$AO) == null || o.call(s, !1), r === void 0 ? s = void 0 : (s = new r(i), s._$AT(i, t, n)), n !== void 0 ? (t._$Co ?? (t._$Co = []))[n] = s : t._$Cl = s), s !== void 0 && (e =
|
|
342
|
+
const r = Or(e) ? void 0 : e._$litDirective$;
|
|
343
|
+
return (s == null ? void 0 : s.constructor) !== r && ((o = s == null ? void 0 : s._$AO) == null || o.call(s, !1), r === void 0 ? s = void 0 : (s = new r(i), s._$AT(i, t, n)), n !== void 0 ? (t._$Co ?? (t._$Co = []))[n] = s : t._$Cl = s), s !== void 0 && (e = Qs(i, s._$AS(i, e.values), s, n)), e;
|
|
344
344
|
}
|
|
345
345
|
class eg {
|
|
346
346
|
constructor(e, t) {
|
|
@@ -359,7 +359,7 @@ class eg {
|
|
|
359
359
|
for (; c !== void 0; ) {
|
|
360
360
|
if (a === c.index) {
|
|
361
361
|
let l;
|
|
362
|
-
c.type === 2 ? l = new
|
|
362
|
+
c.type === 2 ? l = new $r(r, r.nextSibling, this, e) : c.type === 1 ? l = new c.ctor(r, c.name, c.strings, this, e) : c.type === 6 && (l = new sg(r, this, e)), this._$AV.push(l), c = n[++o];
|
|
363
363
|
}
|
|
364
364
|
a !== (c == null ? void 0 : c.index) && (r = us.nextNode(), a++);
|
|
365
365
|
}
|
|
@@ -370,7 +370,7 @@ class eg {
|
|
|
370
370
|
for (const n of this._$AV) n !== void 0 && (n.strings !== void 0 ? (n._$AI(e, n, t), t += n.strings.length - 2) : n._$AI(e[t])), t++;
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
|
-
class
|
|
373
|
+
class $r {
|
|
374
374
|
get _$AU() {
|
|
375
375
|
var e;
|
|
376
376
|
return ((e = this._$AM) == null ? void 0 : e._$AU) ?? this._$Cv;
|
|
@@ -390,7 +390,7 @@ class Yr {
|
|
|
390
390
|
return this._$AB;
|
|
391
391
|
}
|
|
392
392
|
_$AI(e, t = this) {
|
|
393
|
-
e =
|
|
393
|
+
e = Qs(this, e, t), Or(e) ? e === Bt || e == null || e === "" ? (this._$AH !== Bt && this._$AR(), this._$AH = Bt) : e !== this._$AH && e !== Zs && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Jm(e) ? this.k(e) : this._(e);
|
|
394
394
|
}
|
|
395
395
|
O(e) {
|
|
396
396
|
return this._$AA.parentNode.insertBefore(e, this._$AB);
|
|
@@ -399,11 +399,11 @@ class Yr {
|
|
|
399
399
|
this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
|
|
400
400
|
}
|
|
401
401
|
_(e) {
|
|
402
|
-
this._$AH !== Bt &&
|
|
402
|
+
this._$AH !== Bt && Or(this._$AH) ? this._$AA.nextSibling.data = e : this.T(gs.createTextNode(e)), this._$AH = e;
|
|
403
403
|
}
|
|
404
404
|
$(e) {
|
|
405
405
|
var r;
|
|
406
|
-
const { values: t, _$litType$: n } = e, s = typeof n == "number" ? this._$AC(e) : (n.el === void 0 && (n.el =
|
|
406
|
+
const { values: t, _$litType$: n } = e, s = typeof n == "number" ? this._$AC(e) : (n.el === void 0 && (n.el = Fr.createElement(cf(n.h, n.h[0]), this.options)), n);
|
|
407
407
|
if (((r = this._$AH) == null ? void 0 : r._$AD) === s) this._$AH.p(t);
|
|
408
408
|
else {
|
|
409
409
|
const a = new eg(s, this), o = a.u(this.options);
|
|
@@ -412,13 +412,13 @@ class Yr {
|
|
|
412
412
|
}
|
|
413
413
|
_$AC(e) {
|
|
414
414
|
let t = ru.get(e.strings);
|
|
415
|
-
return t === void 0 && ru.set(e.strings, t = new
|
|
415
|
+
return t === void 0 && ru.set(e.strings, t = new Fr(e)), t;
|
|
416
416
|
}
|
|
417
417
|
k(e) {
|
|
418
418
|
td(this._$AH) || (this._$AH = [], this._$AR());
|
|
419
419
|
const t = this._$AH;
|
|
420
420
|
let n, s = 0;
|
|
421
|
-
for (const r of e) s === t.length ? t.push(n = new
|
|
421
|
+
for (const r of e) s === t.length ? t.push(n = new $r(this.O(Ur()), this.O(Ur()), this, this.options)) : n = t[s], n._$AI(r), s++;
|
|
422
422
|
s < t.length && (this._$AR(n && n._$AB.nextSibling, s), t.length = s);
|
|
423
423
|
}
|
|
424
424
|
_$AR(e = this._$AA.nextSibling, t) {
|
|
@@ -433,7 +433,7 @@ class Yr {
|
|
|
433
433
|
this._$AM === void 0 && (this._$Cv = e, (t = this._$AP) == null || t.call(this, e));
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
|
-
class
|
|
436
|
+
class so {
|
|
437
437
|
get tagName() {
|
|
438
438
|
return this.element.tagName;
|
|
439
439
|
}
|
|
@@ -446,11 +446,11 @@ class ro {
|
|
|
446
446
|
_$AI(e, t = this, n, s) {
|
|
447
447
|
const r = this.strings;
|
|
448
448
|
let a = !1;
|
|
449
|
-
if (r === void 0) e =
|
|
449
|
+
if (r === void 0) e = Qs(this, e, t, 0), a = !Or(e) || e !== this._$AH && e !== Zs, a && (this._$AH = e);
|
|
450
450
|
else {
|
|
451
451
|
const o = e;
|
|
452
452
|
let c, l;
|
|
453
|
-
for (e = r[0], c = 0; c < r.length - 1; c++) l =
|
|
453
|
+
for (e = r[0], c = 0; c < r.length - 1; c++) l = Qs(this, o[n + c], t, c), l === Zs && (l = this._$AH[c]), a || (a = !Or(l) || l !== this._$AH[c]), l === Bt ? e = Bt : e !== Bt && (e += (l ?? "") + r[c + 1]), this._$AH[c] = l;
|
|
454
454
|
}
|
|
455
455
|
a && !s && this.j(e);
|
|
456
456
|
}
|
|
@@ -458,7 +458,7 @@ class ro {
|
|
|
458
458
|
e === Bt ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
class tg extends
|
|
461
|
+
class tg extends so {
|
|
462
462
|
constructor() {
|
|
463
463
|
super(...arguments), this.type = 3;
|
|
464
464
|
}
|
|
@@ -466,7 +466,7 @@ class tg extends ro {
|
|
|
466
466
|
this.element[this.name] = e === Bt ? void 0 : e;
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
|
-
class ng extends
|
|
469
|
+
class ng extends so {
|
|
470
470
|
constructor() {
|
|
471
471
|
super(...arguments), this.type = 4;
|
|
472
472
|
}
|
|
@@ -474,12 +474,12 @@ class ng extends ro {
|
|
|
474
474
|
this.element.toggleAttribute(this.name, !!e && e !== Bt);
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
class ig extends
|
|
477
|
+
class ig extends so {
|
|
478
478
|
constructor(e, t, n, s, r) {
|
|
479
479
|
super(e, t, n, s, r), this.type = 5;
|
|
480
480
|
}
|
|
481
481
|
_$AI(e, t = this) {
|
|
482
|
-
if ((e =
|
|
482
|
+
if ((e = Qs(this, e, t, 0) ?? Bt) === Zs) return;
|
|
483
483
|
const n = this._$AH, s = e === Bt && n !== Bt || e.capture !== n.capture || e.once !== n.once || e.passive !== n.passive, r = e !== Bt && (n === Bt || s);
|
|
484
484
|
s && this.element.removeEventListener(this.name, this, n), r && this.element.addEventListener(this.name, this, e), this._$AH = e;
|
|
485
485
|
}
|
|
@@ -496,17 +496,17 @@ class sg {
|
|
|
496
496
|
return this._$AM._$AU;
|
|
497
497
|
}
|
|
498
498
|
_$AI(e) {
|
|
499
|
-
|
|
499
|
+
Qs(this, e);
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
|
-
const Eo =
|
|
503
|
-
Eo == null || Eo(
|
|
502
|
+
const Eo = Pr.litHtmlPolyfillSupport;
|
|
503
|
+
Eo == null || Eo(Fr, $r), (Pr.litHtmlVersions ?? (Pr.litHtmlVersions = [])).push("3.2.1");
|
|
504
504
|
const rg = (i, e, t) => {
|
|
505
505
|
const n = (t == null ? void 0 : t.renderBefore) ?? e;
|
|
506
506
|
let s = n._$litPart$;
|
|
507
507
|
if (s === void 0) {
|
|
508
508
|
const r = (t == null ? void 0 : t.renderBefore) ?? null;
|
|
509
|
-
n._$litPart$ = s = new
|
|
509
|
+
n._$litPart$ = s = new $r(e.insertBefore(Ur(), r), r, void 0, t ?? {});
|
|
510
510
|
}
|
|
511
511
|
return s._$AI(i), s;
|
|
512
512
|
};
|
|
@@ -515,7 +515,7 @@ const rg = (i, e, t) => {
|
|
|
515
515
|
* Copyright 2017 Google LLC
|
|
516
516
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
517
517
|
*/
|
|
518
|
-
let ps = class extends
|
|
518
|
+
let ps = class extends zs {
|
|
519
519
|
constructor() {
|
|
520
520
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
521
521
|
}
|
|
@@ -537,7 +537,7 @@ let ps = class extends Gs {
|
|
|
537
537
|
super.disconnectedCallback(), (e = this._$Do) == null || e.setConnected(!1);
|
|
538
538
|
}
|
|
539
539
|
render() {
|
|
540
|
-
return
|
|
540
|
+
return Zs;
|
|
541
541
|
}
|
|
542
542
|
};
|
|
543
543
|
var nf;
|
|
@@ -560,7 +560,7 @@ const nd = (i) => (e, t) => {
|
|
|
560
560
|
* Copyright 2017 Google LLC
|
|
561
561
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
562
562
|
*/
|
|
563
|
-
const ag = { attribute: !0, type: String, converter:
|
|
563
|
+
const ag = { attribute: !0, type: String, converter: Wa, reflect: !1, hasChanged: ed }, og = (i = ag, e, t) => {
|
|
564
564
|
const { kind: n, metadata: s } = t;
|
|
565
565
|
let r = globalThis.litPropertyMetadata.get(s);
|
|
566
566
|
if (r === void 0 && globalThis.litPropertyMetadata.set(s, r = /* @__PURE__ */ new Map()), r.set(t.name, i), n === "accessor") {
|
|
@@ -592,7 +592,7 @@ function Se(i) {
|
|
|
592
592
|
* Copyright 2017 Google LLC
|
|
593
593
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
594
594
|
*/
|
|
595
|
-
function
|
|
595
|
+
function or(i) {
|
|
596
596
|
return Se({ ...i, state: !0, attribute: !1 });
|
|
597
597
|
}
|
|
598
598
|
/**
|
|
@@ -628,13 +628,13 @@ class ug {
|
|
|
628
628
|
* Copyright 2017 Google LLC
|
|
629
629
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
630
630
|
*/
|
|
631
|
-
const
|
|
631
|
+
const kr = (i, e) => {
|
|
632
632
|
var n;
|
|
633
633
|
const t = i._$AN;
|
|
634
634
|
if (t === void 0) return !1;
|
|
635
|
-
for (const s of t) (n = s._$AO) == null || n.call(s, e, !1),
|
|
635
|
+
for (const s of t) (n = s._$AO) == null || n.call(s, e, !1), kr(s, e);
|
|
636
636
|
return !0;
|
|
637
|
-
},
|
|
637
|
+
}, ja = (i) => {
|
|
638
638
|
let e, t;
|
|
639
639
|
do {
|
|
640
640
|
if ((e = i._$AM) === void 0) break;
|
|
@@ -649,13 +649,13 @@ const Ir = (i, e) => {
|
|
|
649
649
|
}
|
|
650
650
|
};
|
|
651
651
|
function hg(i) {
|
|
652
|
-
this._$AN !== void 0 ? (
|
|
652
|
+
this._$AN !== void 0 ? (ja(this), this._$AM = i, lf(this)) : this._$AM = i;
|
|
653
653
|
}
|
|
654
654
|
function fg(i, e = !1, t = 0) {
|
|
655
655
|
const n = this._$AH, s = this._$AN;
|
|
656
|
-
if (s !== void 0 && s.size !== 0) if (e) if (Array.isArray(n)) for (let r = t; r < n.length; r++)
|
|
657
|
-
else n != null && (
|
|
658
|
-
else
|
|
656
|
+
if (s !== void 0 && s.size !== 0) if (e) if (Array.isArray(n)) for (let r = t; r < n.length; r++) kr(n[r], !1), ja(n[r]);
|
|
657
|
+
else n != null && (kr(n, !1), ja(n));
|
|
658
|
+
else kr(this, i);
|
|
659
659
|
}
|
|
660
660
|
const pg = (i) => {
|
|
661
661
|
i.type == lg.CHILD && (i._$AP ?? (i._$AP = fg), i._$AQ ?? (i._$AQ = hg));
|
|
@@ -669,7 +669,7 @@ class mg extends ug {
|
|
|
669
669
|
}
|
|
670
670
|
_$AO(e, t = !0) {
|
|
671
671
|
var n, s;
|
|
672
|
-
e !== this.isConnected && (this.isConnected = e, e ? (n = this.reconnected) == null || n.call(this) : (s = this.disconnected) == null || s.call(this)), t && (
|
|
672
|
+
e !== this.isConnected && (this.isConnected = e, e ? (n = this.reconnected) == null || n.call(this) : (s = this.disconnected) == null || s.call(this)), t && (kr(this, e), ja(this));
|
|
673
673
|
}
|
|
674
674
|
setValue(e) {
|
|
675
675
|
if (cg(this._$Ct)) this._$Ct._$AI(e, this);
|
|
@@ -760,7 +760,7 @@ function kt(i, e) {
|
|
|
760
760
|
throw new Error(e);
|
|
761
761
|
}
|
|
762
762
|
const yg = 34028234663852886e22, Sg = -34028234663852886e22, xg = 4294967295, Tg = 2147483647, Eg = -2147483648;
|
|
763
|
-
function
|
|
763
|
+
function Ca(i) {
|
|
764
764
|
if (typeof i != "number") throw new Error("invalid int 32: " + typeof i);
|
|
765
765
|
if (!Number.isInteger(i) || i > Tg || i < Eg) throw new Error("invalid int 32: " + i);
|
|
766
766
|
}
|
|
@@ -973,7 +973,7 @@ function wo(i, e, t) {
|
|
|
973
973
|
t.push(e >>> 31 & 1);
|
|
974
974
|
}
|
|
975
975
|
}
|
|
976
|
-
const
|
|
976
|
+
const Ma = 4294967296;
|
|
977
977
|
function ou(i) {
|
|
978
978
|
const e = i[0] === "-";
|
|
979
979
|
e && (i = i.slice(1));
|
|
@@ -981,7 +981,7 @@ function ou(i) {
|
|
|
981
981
|
let n = 0, s = 0;
|
|
982
982
|
function r(a, o) {
|
|
983
983
|
const c = Number(i.slice(a, o));
|
|
984
|
-
s *= t, n = n * t + c, n >=
|
|
984
|
+
s *= t, n = n * t + c, n >= Ma && (s = s + (n / Ma | 0), n = n % Ma);
|
|
985
985
|
}
|
|
986
986
|
return r(-24, -18), r(-18, -12), r(-12, -6), r(-6), e ? gf(n, s) : ad(n, s);
|
|
987
987
|
}
|
|
@@ -997,7 +997,7 @@ function mf(i, e) {
|
|
|
997
997
|
lo: i,
|
|
998
998
|
hi: e
|
|
999
999
|
} = Pg(i, e), e <= 2097151)
|
|
1000
|
-
return String(
|
|
1000
|
+
return String(Ma * e + i);
|
|
1001
1001
|
const t = i & 16777215, n = (i >>> 24 | e << 8) & 16777215, s = e >> 16 & 65535;
|
|
1002
1002
|
let r = t + n * 6777216 + s * 6710656, a = n + s * 8147497, o = s * 2;
|
|
1003
1003
|
const c = 1e7;
|
|
@@ -1141,7 +1141,7 @@ function Pi(i, e, t) {
|
|
|
1141
1141
|
}
|
|
1142
1142
|
return !1;
|
|
1143
1143
|
}
|
|
1144
|
-
function
|
|
1144
|
+
function er(i, e) {
|
|
1145
1145
|
switch (i) {
|
|
1146
1146
|
case Z.BOOL:
|
|
1147
1147
|
return !1;
|
|
@@ -1243,7 +1243,7 @@ class Dg {
|
|
|
1243
1243
|
* Write a `int32` value, a signed 32 bit varint.
|
|
1244
1244
|
*/
|
|
1245
1245
|
int32(e) {
|
|
1246
|
-
return
|
|
1246
|
+
return Ca(e), lu(e, this.buf), this;
|
|
1247
1247
|
}
|
|
1248
1248
|
/**
|
|
1249
1249
|
* Write a `bool` value, a variant.
|
|
@@ -1291,7 +1291,7 @@ class Dg {
|
|
|
1291
1291
|
* Write a `sfixed32` value, a signed, fixed-length 32-bit integer.
|
|
1292
1292
|
*/
|
|
1293
1293
|
sfixed32(e) {
|
|
1294
|
-
|
|
1294
|
+
Ca(e);
|
|
1295
1295
|
let t = new Uint8Array(4);
|
|
1296
1296
|
return new DataView(t.buffer).setInt32(0, e, !0), this.raw(t);
|
|
1297
1297
|
}
|
|
@@ -1299,7 +1299,7 @@ class Dg {
|
|
|
1299
1299
|
* Write a `sint32` value, a signed, zigzag-encoded 32-bit varint.
|
|
1300
1300
|
*/
|
|
1301
1301
|
sint32(e) {
|
|
1302
|
-
return
|
|
1302
|
+
return Ca(e), e = (e << 1 ^ e >> 31) >>> 0, lu(e, this.buf), this;
|
|
1303
1303
|
}
|
|
1304
1304
|
/**
|
|
1305
1305
|
* Write a `fixed64` value, a signed, fixed-length 64-bit integer.
|
|
@@ -1515,7 +1515,7 @@ function Ug(i) {
|
|
|
1515
1515
|
case "enum":
|
|
1516
1516
|
return e.T.values[0].no;
|
|
1517
1517
|
case "scalar":
|
|
1518
|
-
return
|
|
1518
|
+
return er(e.T, e.L);
|
|
1519
1519
|
case "message":
|
|
1520
1520
|
const t = e.T, n = new t();
|
|
1521
1521
|
return t.fieldWrapper ? t.fieldWrapper.unwrapField(n) : n;
|
|
@@ -1532,10 +1532,10 @@ function Og(i, e) {
|
|
|
1532
1532
|
}
|
|
1533
1533
|
return i.filter((t) => t.no === e.no);
|
|
1534
1534
|
}
|
|
1535
|
-
let gi = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),
|
|
1536
|
-
for (let i = 0; i < gi.length; i++)
|
|
1537
|
-
|
|
1538
|
-
|
|
1535
|
+
let gi = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""), ro = [];
|
|
1536
|
+
for (let i = 0; i < gi.length; i++) ro[gi[i].charCodeAt(0)] = i;
|
|
1537
|
+
ro[45] = gi.indexOf("+");
|
|
1538
|
+
ro[95] = gi.indexOf("/");
|
|
1539
1539
|
const bf = {
|
|
1540
1540
|
/**
|
|
1541
1541
|
* Decodes a base64 string to a byte array.
|
|
@@ -1553,7 +1553,7 @@ const bf = {
|
|
|
1553
1553
|
i[i.length - 2] == "=" ? e -= 2 : i[i.length - 1] == "=" && (e -= 1);
|
|
1554
1554
|
let t = new Uint8Array(e), n = 0, s = 0, r, a = 0;
|
|
1555
1555
|
for (let o = 0; o < i.length; o++) {
|
|
1556
|
-
if (r =
|
|
1556
|
+
if (r = ro[i.charCodeAt(o)], r === void 0)
|
|
1557
1557
|
switch (i[o]) {
|
|
1558
1558
|
// @ts-ignore TS7029: Fallthrough case in switch
|
|
1559
1559
|
case "=":
|
|
@@ -1675,7 +1675,7 @@ function du(i, e) {
|
|
|
1675
1675
|
e[t] = n ? i.T.values[0].no : void 0;
|
|
1676
1676
|
break;
|
|
1677
1677
|
case "scalar":
|
|
1678
|
-
e[t] = n ?
|
|
1678
|
+
e[t] = n ? er(i.T, i.L) : void 0;
|
|
1679
1679
|
break;
|
|
1680
1680
|
case "message":
|
|
1681
1681
|
e[t] = void 0;
|
|
@@ -1706,7 +1706,7 @@ function Vg(i) {
|
|
|
1706
1706
|
function zg(i) {
|
|
1707
1707
|
return i ? Object.assign(Object.assign({}, hu), i) : hu;
|
|
1708
1708
|
}
|
|
1709
|
-
const
|
|
1709
|
+
const Xa = Symbol(), wa = Symbol();
|
|
1710
1710
|
function Gg() {
|
|
1711
1711
|
return {
|
|
1712
1712
|
makeReadOptions: Vg,
|
|
@@ -1774,11 +1774,11 @@ function Gg() {
|
|
|
1774
1774
|
return n;
|
|
1775
1775
|
},
|
|
1776
1776
|
readScalar(i, e, t) {
|
|
1777
|
-
return
|
|
1777
|
+
return Ir(i, e, t ?? $i.BIGINT, !0);
|
|
1778
1778
|
},
|
|
1779
1779
|
writeScalar(i, e, t) {
|
|
1780
1780
|
if (e !== void 0 && (t || vf(i, e)))
|
|
1781
|
-
return
|
|
1781
|
+
return Aa(i, e);
|
|
1782
1782
|
},
|
|
1783
1783
|
debug: jn
|
|
1784
1784
|
};
|
|
@@ -1812,11 +1812,11 @@ function fu(i, e, t, n, s) {
|
|
|
1812
1812
|
break;
|
|
1813
1813
|
case "enum":
|
|
1814
1814
|
const c = Ao(t.T, o, n.ignoreUnknownFields, !0);
|
|
1815
|
-
c !==
|
|
1815
|
+
c !== wa && a.push(c);
|
|
1816
1816
|
break;
|
|
1817
1817
|
case "scalar":
|
|
1818
1818
|
try {
|
|
1819
|
-
a.push(
|
|
1819
|
+
a.push(Ir(t.T, o, t.L, !0));
|
|
1820
1820
|
} catch (l) {
|
|
1821
1821
|
let d = "cannot decode field ".concat(s.typeName, ".").concat(t.name, " from JSON: ").concat(jn(o));
|
|
1822
1822
|
throw l instanceof Error && l.message.length > 0 && (d += ": ".concat(l.message)), new Error(d);
|
|
@@ -1846,11 +1846,11 @@ function fu(i, e, t, n, s) {
|
|
|
1846
1846
|
break;
|
|
1847
1847
|
case "enum":
|
|
1848
1848
|
const d = Ao(t.V.T, c, n.ignoreUnknownFields, !0);
|
|
1849
|
-
d !==
|
|
1849
|
+
d !== wa && (a[l] = d);
|
|
1850
1850
|
break;
|
|
1851
1851
|
case "scalar":
|
|
1852
1852
|
try {
|
|
1853
|
-
a[l] =
|
|
1853
|
+
a[l] = Ir(t.V.T, c, $i.BIGINT, !0);
|
|
1854
1854
|
} catch (u) {
|
|
1855
1855
|
let h = "cannot decode map value for field ".concat(s.typeName, ".").concat(t.name, " from JSON: ").concat(jn(e));
|
|
1856
1856
|
throw u instanceof Error && u.message.length > 0 && (h += ": ".concat(u.message)), new Error(h);
|
|
@@ -1872,10 +1872,10 @@ function fu(i, e, t, n, s) {
|
|
|
1872
1872
|
case "enum":
|
|
1873
1873
|
const c = Ao(t.T, e, n.ignoreUnknownFields, !1);
|
|
1874
1874
|
switch (c) {
|
|
1875
|
-
case
|
|
1875
|
+
case Xa:
|
|
1876
1876
|
du(t, i);
|
|
1877
1877
|
break;
|
|
1878
|
-
case
|
|
1878
|
+
case wa:
|
|
1879
1879
|
break;
|
|
1880
1880
|
default:
|
|
1881
1881
|
i[r] = c;
|
|
@@ -1884,9 +1884,9 @@ function fu(i, e, t, n, s) {
|
|
|
1884
1884
|
break;
|
|
1885
1885
|
case "scalar":
|
|
1886
1886
|
try {
|
|
1887
|
-
const l =
|
|
1887
|
+
const l = Ir(t.T, e, t.L, !1);
|
|
1888
1888
|
switch (l) {
|
|
1889
|
-
case
|
|
1889
|
+
case Xa:
|
|
1890
1890
|
du(t, i);
|
|
1891
1891
|
break;
|
|
1892
1892
|
default:
|
|
@@ -1910,11 +1910,11 @@ function Hg(i, e) {
|
|
|
1910
1910
|
e = !1;
|
|
1911
1911
|
break;
|
|
1912
1912
|
}
|
|
1913
|
-
return
|
|
1913
|
+
return Ir(i, e, $i.BIGINT, !0).toString();
|
|
1914
1914
|
}
|
|
1915
|
-
function
|
|
1915
|
+
function Ir(i, e, t, n) {
|
|
1916
1916
|
if (e === null)
|
|
1917
|
-
return n ?
|
|
1917
|
+
return n ? er(i, t) : Xa;
|
|
1918
1918
|
switch (i) {
|
|
1919
1919
|
// float, double: JSON value will be a number or one of the special string values "NaN", "Infinity", and "-Infinity".
|
|
1920
1920
|
// Either numbers or strings are accepted. Exponent notation is also accepted.
|
|
@@ -1937,7 +1937,7 @@ function Dr(i, e, t, n) {
|
|
|
1937
1937
|
case Z.UINT32:
|
|
1938
1938
|
let r;
|
|
1939
1939
|
if (typeof e == "number" ? r = e : typeof e == "string" && e.length > 0 && e.trim().length === e.length && (r = Number(e)), r === void 0) break;
|
|
1940
|
-
return i == Z.UINT32 || i == Z.FIXED32 ? xc(r) :
|
|
1940
|
+
return i == Z.UINT32 || i == Z.FIXED32 ? xc(r) : Ca(r), r;
|
|
1941
1941
|
// int64, fixed64, uint64: JSON value will be a decimal string. Either numbers or strings are accepted.
|
|
1942
1942
|
case Z.INT64:
|
|
1943
1943
|
case Z.SFIXED64:
|
|
@@ -1975,7 +1975,7 @@ function Dr(i, e, t, n) {
|
|
|
1975
1975
|
}
|
|
1976
1976
|
function Ao(i, e, t, n) {
|
|
1977
1977
|
if (e === null)
|
|
1978
|
-
return i.typeName == "google.protobuf.NullValue" ? 0 : n ? i.values[0].no :
|
|
1978
|
+
return i.typeName == "google.protobuf.NullValue" ? 0 : n ? i.values[0].no : Xa;
|
|
1979
1979
|
switch (typeof e) {
|
|
1980
1980
|
case "number":
|
|
1981
1981
|
if (Number.isInteger(e))
|
|
@@ -1986,7 +1986,7 @@ function Ao(i, e, t, n) {
|
|
|
1986
1986
|
if (s !== void 0)
|
|
1987
1987
|
return s.no;
|
|
1988
1988
|
if (t)
|
|
1989
|
-
return
|
|
1989
|
+
return wa;
|
|
1990
1990
|
break;
|
|
1991
1991
|
}
|
|
1992
1992
|
throw new Error("cannot decode enum ".concat(i.typeName, " from JSON: ").concat(jn(e)));
|
|
@@ -2001,7 +2001,7 @@ function pu(i, e, t) {
|
|
|
2001
2001
|
switch (i.V.kind) {
|
|
2002
2002
|
case "scalar":
|
|
2003
2003
|
for (const [a, o] of s)
|
|
2004
|
-
n[a.toString()] =
|
|
2004
|
+
n[a.toString()] = Aa(i.V.T, o);
|
|
2005
2005
|
break;
|
|
2006
2006
|
case "message":
|
|
2007
2007
|
for (const [a, o] of s)
|
|
@@ -2021,7 +2021,7 @@ function pu(i, e, t) {
|
|
|
2021
2021
|
switch (i.kind) {
|
|
2022
2022
|
case "scalar":
|
|
2023
2023
|
for (let s = 0; s < e.length; s++)
|
|
2024
|
-
n.push(
|
|
2024
|
+
n.push(Aa(i.T, e[s]));
|
|
2025
2025
|
break;
|
|
2026
2026
|
case "enum":
|
|
2027
2027
|
for (let s = 0; s < e.length; s++)
|
|
@@ -2036,7 +2036,7 @@ function pu(i, e, t) {
|
|
|
2036
2036
|
}
|
|
2037
2037
|
switch (i.kind) {
|
|
2038
2038
|
case "scalar":
|
|
2039
|
-
return
|
|
2039
|
+
return Aa(i.T, e);
|
|
2040
2040
|
case "enum":
|
|
2041
2041
|
return Ro(i.T, e, t.enumAsInteger);
|
|
2042
2042
|
case "message":
|
|
@@ -2052,7 +2052,7 @@ function Ro(i, e, t) {
|
|
|
2052
2052
|
const s = i.findNumber(e);
|
|
2053
2053
|
return (n = s == null ? void 0 : s.name) !== null && n !== void 0 ? n : e;
|
|
2054
2054
|
}
|
|
2055
|
-
function
|
|
2055
|
+
function Aa(i, e) {
|
|
2056
2056
|
switch (i) {
|
|
2057
2057
|
// int32, fixed32, uint32: JSON value will be a decimal number. Either numbers or strings are accepted.
|
|
2058
2058
|
case Z.INT32:
|
|
@@ -2086,7 +2086,7 @@ function Ra(i, e) {
|
|
|
2086
2086
|
return kt(e instanceof Uint8Array), bf.enc(e);
|
|
2087
2087
|
}
|
|
2088
2088
|
}
|
|
2089
|
-
const
|
|
2089
|
+
const Es = Symbol("@bufbuild/protobuf/unknown-fields"), mu = {
|
|
2090
2090
|
readUnknownFields: !0,
|
|
2091
2091
|
readerFactory: (i) => new Lg(i)
|
|
2092
2092
|
}, gu = {
|
|
@@ -2105,20 +2105,20 @@ function Xg() {
|
|
|
2105
2105
|
makeWriteOptions: jg,
|
|
2106
2106
|
listUnknownFields(i) {
|
|
2107
2107
|
var e;
|
|
2108
|
-
return (e = i[
|
|
2108
|
+
return (e = i[Es]) !== null && e !== void 0 ? e : [];
|
|
2109
2109
|
},
|
|
2110
2110
|
discardUnknownFields(i) {
|
|
2111
|
-
delete i[
|
|
2111
|
+
delete i[Es];
|
|
2112
2112
|
},
|
|
2113
2113
|
writeUnknownFields(i, e) {
|
|
2114
|
-
const n = i[
|
|
2114
|
+
const n = i[Es];
|
|
2115
2115
|
if (n)
|
|
2116
2116
|
for (const s of n)
|
|
2117
2117
|
e.tag(s.no, s.wireType).raw(s.data);
|
|
2118
2118
|
},
|
|
2119
2119
|
onUnknownField(i, e, t, n) {
|
|
2120
2120
|
const s = i;
|
|
2121
|
-
Array.isArray(s[
|
|
2121
|
+
Array.isArray(s[Es]) || (s[Es] = []), s[Es].push({
|
|
2122
2122
|
no: e,
|
|
2123
2123
|
wireType: t,
|
|
2124
2124
|
data: n
|
|
@@ -2168,7 +2168,7 @@ function vu(i, e, t, n, s) {
|
|
|
2168
2168
|
case "scalar":
|
|
2169
2169
|
case "enum":
|
|
2170
2170
|
const o = t.kind == "enum" ? Z.INT32 : t.T;
|
|
2171
|
-
let c =
|
|
2171
|
+
let c = $a;
|
|
2172
2172
|
if (t.kind == "scalar" && t.L > 0 && (c = Yg), r) {
|
|
2173
2173
|
let h = i[a];
|
|
2174
2174
|
if (n == Dt.LengthDelimited && o != Z.STRING && o != Z.BYTES) {
|
|
@@ -2182,7 +2182,7 @@ function vu(i, e, t, n, s) {
|
|
|
2182
2182
|
break;
|
|
2183
2183
|
case "message":
|
|
2184
2184
|
const l = t.T;
|
|
2185
|
-
r ? i[a].push(
|
|
2185
|
+
r ? i[a].push(Ra(e, new l(), s, t)) : vi(i[a]) ? Ra(e, i[a], s, t) : (i[a] = Ra(e, new l(), s, t), l.fieldWrapper && !t.oneof && !t.repeated && (i[a] = l.fieldWrapper.unwrapField(i[a])));
|
|
2186
2186
|
break;
|
|
2187
2187
|
case "map":
|
|
2188
2188
|
let [d, u] = $g(t, e, s);
|
|
@@ -2190,7 +2190,7 @@ function vu(i, e, t, n, s) {
|
|
|
2190
2190
|
break;
|
|
2191
2191
|
}
|
|
2192
2192
|
}
|
|
2193
|
-
function
|
|
2193
|
+
function Ra(i, e, t, n) {
|
|
2194
2194
|
const s = e.getType().runtime.bin, r = n == null ? void 0 : n.delimited;
|
|
2195
2195
|
return s.readMessage(
|
|
2196
2196
|
e,
|
|
@@ -2208,27 +2208,27 @@ function $g(i, e, t) {
|
|
|
2208
2208
|
const [o] = e.tag();
|
|
2209
2209
|
switch (o) {
|
|
2210
2210
|
case 1:
|
|
2211
|
-
r =
|
|
2211
|
+
r = $a(e, i.K);
|
|
2212
2212
|
break;
|
|
2213
2213
|
case 2:
|
|
2214
2214
|
switch (i.V.kind) {
|
|
2215
2215
|
case "scalar":
|
|
2216
|
-
a =
|
|
2216
|
+
a = $a(e, i.V.T);
|
|
2217
2217
|
break;
|
|
2218
2218
|
case "enum":
|
|
2219
2219
|
a = e.int32();
|
|
2220
2220
|
break;
|
|
2221
2221
|
case "message":
|
|
2222
|
-
a =
|
|
2222
|
+
a = Ra(e, new i.V.T(), t, void 0);
|
|
2223
2223
|
break;
|
|
2224
2224
|
}
|
|
2225
2225
|
break;
|
|
2226
2226
|
}
|
|
2227
2227
|
}
|
|
2228
|
-
if (r === void 0 && (r =
|
|
2228
|
+
if (r === void 0 && (r = er(i.K, $i.BIGINT)), typeof r != "string" && typeof r != "number" && (r = r.toString()), a === void 0)
|
|
2229
2229
|
switch (i.V.kind) {
|
|
2230
2230
|
case "scalar":
|
|
2231
|
-
a =
|
|
2231
|
+
a = er(i.V.T, $i.BIGINT);
|
|
2232
2232
|
break;
|
|
2233
2233
|
case "enum":
|
|
2234
2234
|
a = i.V.T.values[0].no;
|
|
@@ -2240,10 +2240,10 @@ function $g(i, e, t) {
|
|
|
2240
2240
|
return [r, a];
|
|
2241
2241
|
}
|
|
2242
2242
|
function Yg(i, e) {
|
|
2243
|
-
const t =
|
|
2243
|
+
const t = $a(i, e);
|
|
2244
2244
|
return typeof t == "bigint" ? t.toString() : t;
|
|
2245
2245
|
}
|
|
2246
|
-
function
|
|
2246
|
+
function $a(i, e) {
|
|
2247
2247
|
switch (e) {
|
|
2248
2248
|
case Z.STRING:
|
|
2249
2249
|
return i.string();
|
|
@@ -2289,9 +2289,9 @@ function _u(i, e, t, n) {
|
|
|
2289
2289
|
Jg(t, r, i.no, e);
|
|
2290
2290
|
else
|
|
2291
2291
|
for (const a of e)
|
|
2292
|
-
|
|
2292
|
+
Dr(t, r, i.no, a);
|
|
2293
2293
|
else
|
|
2294
|
-
|
|
2294
|
+
Dr(t, r, i.no, e);
|
|
2295
2295
|
break;
|
|
2296
2296
|
case "message":
|
|
2297
2297
|
if (s) {
|
|
@@ -2323,12 +2323,12 @@ function Kg(i, e, t, n, s) {
|
|
|
2323
2323
|
kt(n == "true" || n == "false"), r = n == "true";
|
|
2324
2324
|
break;
|
|
2325
2325
|
}
|
|
2326
|
-
switch (
|
|
2326
|
+
switch (Dr(i, t.K, 1, r), t.V.kind) {
|
|
2327
2327
|
case "scalar":
|
|
2328
|
-
|
|
2328
|
+
Dr(i, t.V.T, 2, s);
|
|
2329
2329
|
break;
|
|
2330
2330
|
case "enum":
|
|
2331
|
-
|
|
2331
|
+
Dr(i, Z.INT32, 2, s);
|
|
2332
2332
|
break;
|
|
2333
2333
|
case "message":
|
|
2334
2334
|
kt(s !== void 0), i.tag(2, Dt.LengthDelimited).bytes(s.toBinary(e));
|
|
@@ -2340,7 +2340,7 @@ function bu(i, e, t, n) {
|
|
|
2340
2340
|
const s = Tf(t.T, n);
|
|
2341
2341
|
t.delimited ? i.tag(t.no, Dt.StartGroup).raw(s.toBinary(e)).tag(t.no, Dt.EndGroup) : i.tag(t.no, Dt.LengthDelimited).bytes(s.toBinary(e));
|
|
2342
2342
|
}
|
|
2343
|
-
function
|
|
2343
|
+
function Dr(i, e, t, n) {
|
|
2344
2344
|
kt(n !== void 0);
|
|
2345
2345
|
let [s, r] = Ef(e);
|
|
2346
2346
|
i.tag(t, s)[r](n);
|
|
@@ -2392,7 +2392,7 @@ function Zg() {
|
|
|
2392
2392
|
continue;
|
|
2393
2393
|
const c = n.findField(o);
|
|
2394
2394
|
let l = a[s].value;
|
|
2395
|
-
c && c.kind == "message" && !vi(l, c.T) ? l = new c.T(l) : c && c.kind === "scalar" && c.T === Z.BYTES && (l =
|
|
2395
|
+
c && c.kind == "message" && !vi(l, c.T) ? l = new c.T(l) : c && c.kind === "scalar" && c.T === Z.BYTES && (l = hr(l)), r[s] = {
|
|
2396
2396
|
case: o,
|
|
2397
2397
|
value: l
|
|
2398
2398
|
};
|
|
@@ -2400,7 +2400,7 @@ function Zg() {
|
|
|
2400
2400
|
case "scalar":
|
|
2401
2401
|
case "enum":
|
|
2402
2402
|
let d = a[s];
|
|
2403
|
-
n.T === Z.BYTES && (d = n.repeated ? d.map(
|
|
2403
|
+
n.T === Z.BYTES && (d = n.repeated ? d.map(hr) : hr(d)), r[s] = d;
|
|
2404
2404
|
break;
|
|
2405
2405
|
case "map":
|
|
2406
2406
|
switch (n.V.kind) {
|
|
@@ -2408,7 +2408,7 @@ function Zg() {
|
|
|
2408
2408
|
case "enum":
|
|
2409
2409
|
if (n.V.T === Z.BYTES)
|
|
2410
2410
|
for (const [p, g] of Object.entries(a[s]))
|
|
2411
|
-
r[s][p] =
|
|
2411
|
+
r[s][p] = hr(g);
|
|
2412
2412
|
else
|
|
2413
2413
|
Object.assign(r[s], a[s]);
|
|
2414
2414
|
break;
|
|
@@ -2427,7 +2427,7 @@ function Zg() {
|
|
|
2427
2427
|
r[s] = a[s].map((h) => vi(h, u) ? h : new u(h));
|
|
2428
2428
|
else {
|
|
2429
2429
|
const h = a[s];
|
|
2430
|
-
u.fieldWrapper ? /* We can't use BytesValue.typeName as that will create a circular import */ u.typeName === "google.protobuf.BytesValue" ? r[s] =
|
|
2430
|
+
u.fieldWrapper ? /* We can't use BytesValue.typeName as that will create a circular import */ u.typeName === "google.protobuf.BytesValue" ? r[s] = hr(h) : r[s] = h : r[s] = vi(h, u) ? h : new u(h);
|
|
2431
2431
|
}
|
|
2432
2432
|
break;
|
|
2433
2433
|
}
|
|
@@ -2496,17 +2496,17 @@ function Zg() {
|
|
|
2496
2496
|
const r = i[s.localName];
|
|
2497
2497
|
let a;
|
|
2498
2498
|
if (s.repeated)
|
|
2499
|
-
a = r.map(
|
|
2499
|
+
a = r.map(ta);
|
|
2500
2500
|
else if (s.kind == "map") {
|
|
2501
2501
|
a = n[s.localName];
|
|
2502
2502
|
for (const [o, c] of Object.entries(r))
|
|
2503
|
-
a[o] =
|
|
2503
|
+
a[o] = ta(c);
|
|
2504
2504
|
} else s.kind == "oneof" ? a = s.findField(r.case) ? {
|
|
2505
2505
|
case: r.case,
|
|
2506
|
-
value:
|
|
2506
|
+
value: ta(r.value)
|
|
2507
2507
|
} : {
|
|
2508
2508
|
case: void 0
|
|
2509
|
-
} : a =
|
|
2509
|
+
} : a = ta(r);
|
|
2510
2510
|
n[s.localName] = a;
|
|
2511
2511
|
}
|
|
2512
2512
|
for (const s of e.runtime.bin.listUnknownFields(i))
|
|
@@ -2515,7 +2515,7 @@ function Zg() {
|
|
|
2515
2515
|
}
|
|
2516
2516
|
};
|
|
2517
2517
|
}
|
|
2518
|
-
function
|
|
2518
|
+
function ta(i) {
|
|
2519
2519
|
if (i === void 0)
|
|
2520
2520
|
return i;
|
|
2521
2521
|
if (vi(i))
|
|
@@ -2526,7 +2526,7 @@ function na(i) {
|
|
|
2526
2526
|
}
|
|
2527
2527
|
return i;
|
|
2528
2528
|
}
|
|
2529
|
-
function
|
|
2529
|
+
function hr(i) {
|
|
2530
2530
|
return i instanceof Uint8Array ? i : new Uint8Array(i);
|
|
2531
2531
|
}
|
|
2532
2532
|
function Qg(i, e, t) {
|
|
@@ -2700,7 +2700,7 @@ const z = Qg(
|
|
|
2700
2700
|
n[t] = {};
|
|
2701
2701
|
break;
|
|
2702
2702
|
case "scalar":
|
|
2703
|
-
n[t] =
|
|
2703
|
+
n[t] = er(e.T, e.L);
|
|
2704
2704
|
break;
|
|
2705
2705
|
}
|
|
2706
2706
|
}
|
|
@@ -2951,7 +2951,7 @@ const lv = /* @__PURE__ */ z.makeMessageType("livekit.MetricsBatch", () => [{
|
|
|
2951
2951
|
}, {
|
|
2952
2952
|
no: 3,
|
|
2953
2953
|
name: "OFF"
|
|
2954
|
-
}]),
|
|
2954
|
+
}]), Cr = /* @__PURE__ */ z.makeEnum("livekit.ConnectionQuality", [{
|
|
2955
2955
|
no: 0,
|
|
2956
2956
|
name: "POOR"
|
|
2957
2957
|
}, {
|
|
@@ -2963,7 +2963,7 @@ const lv = /* @__PURE__ */ z.makeMessageType("livekit.MetricsBatch", () => [{
|
|
|
2963
2963
|
}, {
|
|
2964
2964
|
no: 3,
|
|
2965
2965
|
name: "LOST"
|
|
2966
|
-
}]),
|
|
2966
|
+
}]), Br = /* @__PURE__ */ z.makeEnum("livekit.ClientConfigSetting", [{
|
|
2967
2967
|
no: 0,
|
|
2968
2968
|
name: "UNSET"
|
|
2969
2969
|
}, {
|
|
@@ -3020,7 +3020,7 @@ const lv = /* @__PURE__ */ z.makeMessageType("livekit.MetricsBatch", () => [{
|
|
|
3020
3020
|
}, {
|
|
3021
3021
|
no: 15,
|
|
3022
3022
|
name: "MEDIA_FAILURE"
|
|
3023
|
-
}]),
|
|
3023
|
+
}]), Cs = /* @__PURE__ */ z.makeEnum("livekit.ReconnectReason", [{
|
|
3024
3024
|
no: 0,
|
|
3025
3025
|
name: "RR_UNKNOWN"
|
|
3026
3026
|
}, {
|
|
@@ -3065,7 +3065,7 @@ const lv = /* @__PURE__ */ z.makeMessageType("livekit.MetricsBatch", () => [{
|
|
|
3065
3065
|
}, {
|
|
3066
3066
|
no: 6,
|
|
3067
3067
|
name: "TF_PRECONNECT_BUFFER"
|
|
3068
|
-
}]),
|
|
3068
|
+
}]), ao = /* @__PURE__ */ z.makeMessageType("livekit.Room", () => [{
|
|
3069
3069
|
no: 1,
|
|
3070
3070
|
name: "sid",
|
|
3071
3071
|
kind: "scalar",
|
|
@@ -3117,7 +3117,7 @@ const lv = /* @__PURE__ */ z.makeMessageType("livekit.MetricsBatch", () => [{
|
|
|
3117
3117
|
no: 7,
|
|
3118
3118
|
name: "enabled_codecs",
|
|
3119
3119
|
kind: "message",
|
|
3120
|
-
T:
|
|
3120
|
+
T: Ya,
|
|
3121
3121
|
repeated: !0
|
|
3122
3122
|
}, {
|
|
3123
3123
|
no: 8,
|
|
@@ -3148,7 +3148,7 @@ const lv = /* @__PURE__ */ z.makeMessageType("livekit.MetricsBatch", () => [{
|
|
|
3148
3148
|
name: "version",
|
|
3149
3149
|
kind: "message",
|
|
3150
3150
|
T: zf
|
|
3151
|
-
}]),
|
|
3151
|
+
}]), Ya = /* @__PURE__ */ z.makeMessageType("livekit.Codec", () => [{
|
|
3152
3152
|
no: 1,
|
|
3153
3153
|
name: "mime",
|
|
3154
3154
|
kind: "scalar",
|
|
@@ -3230,12 +3230,12 @@ const lv = /* @__PURE__ */ z.makeMessageType("livekit.MetricsBatch", () => [{
|
|
|
3230
3230
|
no: 3,
|
|
3231
3231
|
name: "state",
|
|
3232
3232
|
kind: "enum",
|
|
3233
|
-
T: z.getEnumType(
|
|
3233
|
+
T: z.getEnumType(Ws)
|
|
3234
3234
|
}, {
|
|
3235
3235
|
no: 4,
|
|
3236
3236
|
name: "tracks",
|
|
3237
3237
|
kind: "message",
|
|
3238
|
-
T:
|
|
3238
|
+
T: Gs,
|
|
3239
3239
|
repeated: !0
|
|
3240
3240
|
}, {
|
|
3241
3241
|
no: 5,
|
|
@@ -3288,7 +3288,7 @@ const lv = /* @__PURE__ */ z.makeMessageType("livekit.MetricsBatch", () => [{
|
|
|
3288
3288
|
no: 14,
|
|
3289
3289
|
name: "kind",
|
|
3290
3290
|
kind: "enum",
|
|
3291
|
-
T: z.getEnumType(
|
|
3291
|
+
T: z.getEnumType(Vr)
|
|
3292
3292
|
}, {
|
|
3293
3293
|
no: 15,
|
|
3294
3294
|
name: "attributes",
|
|
@@ -3310,7 +3310,7 @@ const lv = /* @__PURE__ */ z.makeMessageType("livekit.MetricsBatch", () => [{
|
|
|
3310
3310
|
kind: "enum",
|
|
3311
3311
|
T: z.getEnumType(mv),
|
|
3312
3312
|
repeated: !0
|
|
3313
|
-
}]),
|
|
3313
|
+
}]), Ws = /* @__PURE__ */ z.makeEnum("livekit.ParticipantInfo.State", [{
|
|
3314
3314
|
no: 0,
|
|
3315
3315
|
name: "JOINING"
|
|
3316
3316
|
}, {
|
|
@@ -3322,7 +3322,7 @@ const lv = /* @__PURE__ */ z.makeMessageType("livekit.MetricsBatch", () => [{
|
|
|
3322
3322
|
}, {
|
|
3323
3323
|
no: 3,
|
|
3324
3324
|
name: "DISCONNECTED"
|
|
3325
|
-
}]),
|
|
3325
|
+
}]), Vr = /* @__PURE__ */ z.makeEnum("livekit.ParticipantInfo.Kind", [{
|
|
3326
3326
|
no: 0,
|
|
3327
3327
|
name: "STANDARD"
|
|
3328
3328
|
}, {
|
|
@@ -3376,7 +3376,7 @@ const lv = /* @__PURE__ */ z.makeMessageType("livekit.MetricsBatch", () => [{
|
|
|
3376
3376
|
kind: "message",
|
|
3377
3377
|
T: ms,
|
|
3378
3378
|
repeated: !0
|
|
3379
|
-
}]),
|
|
3379
|
+
}]), Gs = /* @__PURE__ */ z.makeMessageType("livekit.TrackInfo", () => [{
|
|
3380
3380
|
no: 1,
|
|
3381
3381
|
name: "sid",
|
|
3382
3382
|
kind: "scalar",
|
|
@@ -4080,7 +4080,7 @@ const lv = /* @__PURE__ */ z.makeMessageType("livekit.MetricsBatch", () => [{
|
|
|
4080
4080
|
no: 3,
|
|
4081
4081
|
name: "resume_connection",
|
|
4082
4082
|
kind: "enum",
|
|
4083
|
-
T: z.getEnumType(
|
|
4083
|
+
T: z.getEnumType(Br)
|
|
4084
4084
|
}, {
|
|
4085
4085
|
no: 4,
|
|
4086
4086
|
name: "disabled_codecs",
|
|
@@ -4090,23 +4090,23 @@ const lv = /* @__PURE__ */ z.makeMessageType("livekit.MetricsBatch", () => [{
|
|
|
4090
4090
|
no: 5,
|
|
4091
4091
|
name: "force_relay",
|
|
4092
4092
|
kind: "enum",
|
|
4093
|
-
T: z.getEnumType(
|
|
4093
|
+
T: z.getEnumType(Br)
|
|
4094
4094
|
}]), yu = /* @__PURE__ */ z.makeMessageType("livekit.VideoConfiguration", () => [{
|
|
4095
4095
|
no: 1,
|
|
4096
4096
|
name: "hardware_encoder",
|
|
4097
4097
|
kind: "enum",
|
|
4098
|
-
T: z.getEnumType(
|
|
4098
|
+
T: z.getEnumType(Br)
|
|
4099
4099
|
}]), Sv = /* @__PURE__ */ z.makeMessageType("livekit.DisabledCodecs", () => [{
|
|
4100
4100
|
no: 1,
|
|
4101
4101
|
name: "codecs",
|
|
4102
4102
|
kind: "message",
|
|
4103
|
-
T:
|
|
4103
|
+
T: Ya,
|
|
4104
4104
|
repeated: !0
|
|
4105
4105
|
}, {
|
|
4106
4106
|
no: 2,
|
|
4107
4107
|
name: "publish",
|
|
4108
4108
|
kind: "message",
|
|
4109
|
-
T:
|
|
4109
|
+
T: Ya,
|
|
4110
4110
|
repeated: !0
|
|
4111
4111
|
}]), zf = /* @__PURE__ */ z.makeMessageType("livekit.TimedVersion", () => [{
|
|
4112
4112
|
no: 1,
|
|
@@ -4341,7 +4341,7 @@ const lv = /* @__PURE__ */ z.makeMessageType("livekit.MetricsBatch", () => [{
|
|
|
4341
4341
|
no: 6,
|
|
4342
4342
|
name: "subscription",
|
|
4343
4343
|
kind: "message",
|
|
4344
|
-
T:
|
|
4344
|
+
T: oo,
|
|
4345
4345
|
oneof: "message"
|
|
4346
4346
|
}, {
|
|
4347
4347
|
no: 7,
|
|
@@ -4353,7 +4353,7 @@ const lv = /* @__PURE__ */ z.makeMessageType("livekit.MetricsBatch", () => [{
|
|
|
4353
4353
|
no: 8,
|
|
4354
4354
|
name: "leave",
|
|
4355
4355
|
kind: "message",
|
|
4356
|
-
T:
|
|
4356
|
+
T: co,
|
|
4357
4357
|
oneof: "message"
|
|
4358
4358
|
}, {
|
|
4359
4359
|
no: 10,
|
|
@@ -4449,7 +4449,7 @@ const lv = /* @__PURE__ */ z.makeMessageType("livekit.MetricsBatch", () => [{
|
|
|
4449
4449
|
no: 8,
|
|
4450
4450
|
name: "leave",
|
|
4451
4451
|
kind: "message",
|
|
4452
|
-
T:
|
|
4452
|
+
T: co,
|
|
4453
4453
|
oneof: "message"
|
|
4454
4454
|
}, {
|
|
4455
4455
|
no: 9,
|
|
@@ -4690,7 +4690,7 @@ const lv = /* @__PURE__ */ z.makeMessageType("livekit.MetricsBatch", () => [{
|
|
|
4690
4690
|
no: 1,
|
|
4691
4691
|
name: "room",
|
|
4692
4692
|
kind: "message",
|
|
4693
|
-
T:
|
|
4693
|
+
T: ao
|
|
4694
4694
|
}, {
|
|
4695
4695
|
no: 2,
|
|
4696
4696
|
name: "participant",
|
|
@@ -4764,7 +4764,7 @@ const lv = /* @__PURE__ */ z.makeMessageType("livekit.MetricsBatch", () => [{
|
|
|
4764
4764
|
no: 14,
|
|
4765
4765
|
name: "enabled_publish_codecs",
|
|
4766
4766
|
kind: "message",
|
|
4767
|
-
T:
|
|
4767
|
+
T: Ya,
|
|
4768
4768
|
repeated: !0
|
|
4769
4769
|
}, {
|
|
4770
4770
|
no: 15,
|
|
@@ -4804,7 +4804,7 @@ const lv = /* @__PURE__ */ z.makeMessageType("livekit.MetricsBatch", () => [{
|
|
|
4804
4804
|
no: 2,
|
|
4805
4805
|
name: "track",
|
|
4806
4806
|
kind: "message",
|
|
4807
|
-
T:
|
|
4807
|
+
T: Gs
|
|
4808
4808
|
}]), Mv = /* @__PURE__ */ z.makeMessageType("livekit.TrackUnpublishedResponse", () => [{
|
|
4809
4809
|
no: 1,
|
|
4810
4810
|
name: "track_sid",
|
|
@@ -4835,7 +4835,7 @@ const lv = /* @__PURE__ */ z.makeMessageType("livekit.MetricsBatch", () => [{
|
|
|
4835
4835
|
kind: "message",
|
|
4836
4836
|
T: vs,
|
|
4837
4837
|
repeated: !0
|
|
4838
|
-
}]),
|
|
4838
|
+
}]), oo = /* @__PURE__ */ z.makeMessageType("livekit.UpdateSubscription", () => [{
|
|
4839
4839
|
no: 1,
|
|
4840
4840
|
name: "track_sids",
|
|
4841
4841
|
kind: "scalar",
|
|
@@ -4924,7 +4924,7 @@ const lv = /* @__PURE__ */ z.makeMessageType("livekit.MetricsBatch", () => [{
|
|
|
4924
4924
|
kind: "scalar",
|
|
4925
4925
|
T: 13
|
|
4926
4926
|
/* ScalarType.UINT32 */
|
|
4927
|
-
}]),
|
|
4927
|
+
}]), co = /* @__PURE__ */ z.makeMessageType("livekit.LeaveRequest", () => [{
|
|
4928
4928
|
no: 1,
|
|
4929
4929
|
name: "can_reconnect",
|
|
4930
4930
|
kind: "scalar",
|
|
@@ -4939,13 +4939,13 @@ const lv = /* @__PURE__ */ z.makeMessageType("livekit.MetricsBatch", () => [{
|
|
|
4939
4939
|
no: 3,
|
|
4940
4940
|
name: "action",
|
|
4941
4941
|
kind: "enum",
|
|
4942
|
-
T: z.getEnumType(
|
|
4942
|
+
T: z.getEnumType(qs)
|
|
4943
4943
|
}, {
|
|
4944
4944
|
no: 4,
|
|
4945
4945
|
name: "regions",
|
|
4946
4946
|
kind: "message",
|
|
4947
4947
|
T: Vv
|
|
4948
|
-
}]),
|
|
4948
|
+
}]), qs = /* @__PURE__ */ z.makeEnum("livekit.LeaveRequest.Action", [{
|
|
4949
4949
|
no: 0,
|
|
4950
4950
|
name: "DISCONNECT"
|
|
4951
4951
|
}, {
|
|
@@ -5022,7 +5022,7 @@ const lv = /* @__PURE__ */ z.makeMessageType("livekit.MetricsBatch", () => [{
|
|
|
5022
5022
|
no: 1,
|
|
5023
5023
|
name: "room",
|
|
5024
5024
|
kind: "message",
|
|
5025
|
-
T:
|
|
5025
|
+
T: ao
|
|
5026
5026
|
}]), kv = /* @__PURE__ */ z.makeMessageType("livekit.ConnectionQualityInfo", () => [{
|
|
5027
5027
|
no: 1,
|
|
5028
5028
|
name: "participant_sid",
|
|
@@ -5033,7 +5033,7 @@ const lv = /* @__PURE__ */ z.makeMessageType("livekit.MetricsBatch", () => [{
|
|
|
5033
5033
|
no: 2,
|
|
5034
5034
|
name: "quality",
|
|
5035
5035
|
kind: "enum",
|
|
5036
|
-
T: z.getEnumType(
|
|
5036
|
+
T: z.getEnumType(Cr)
|
|
5037
5037
|
}, {
|
|
5038
5038
|
no: 3,
|
|
5039
5039
|
name: "score",
|
|
@@ -5168,7 +5168,7 @@ const lv = /* @__PURE__ */ z.makeMessageType("livekit.MetricsBatch", () => [{
|
|
|
5168
5168
|
no: 1,
|
|
5169
5169
|
name: "room",
|
|
5170
5170
|
kind: "message",
|
|
5171
|
-
T:
|
|
5171
|
+
T: ao
|
|
5172
5172
|
}, {
|
|
5173
5173
|
no: 2,
|
|
5174
5174
|
name: "token",
|
|
@@ -5195,7 +5195,7 @@ const lv = /* @__PURE__ */ z.makeMessageType("livekit.MetricsBatch", () => [{
|
|
|
5195
5195
|
no: 2,
|
|
5196
5196
|
name: "subscription",
|
|
5197
5197
|
kind: "message",
|
|
5198
|
-
T:
|
|
5198
|
+
T: oo
|
|
5199
5199
|
}, {
|
|
5200
5200
|
no: 3,
|
|
5201
5201
|
name: "publish_tracks",
|
|
@@ -5406,7 +5406,7 @@ const lv = /* @__PURE__ */ z.makeMessageType("livekit.MetricsBatch", () => [{
|
|
|
5406
5406
|
function qv(i) {
|
|
5407
5407
|
return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
|
|
5408
5408
|
}
|
|
5409
|
-
var
|
|
5409
|
+
var Pa = { exports: {} }, jv = Pa.exports, xu;
|
|
5410
5410
|
function Xv() {
|
|
5411
5411
|
return xu || (xu = 1, function(i) {
|
|
5412
5412
|
(function(e, t) {
|
|
@@ -5539,9 +5539,9 @@ function Xv() {
|
|
|
5539
5539
|
return r;
|
|
5540
5540
|
}, a.default = a, a;
|
|
5541
5541
|
});
|
|
5542
|
-
}(
|
|
5542
|
+
}(Pa)), Pa.exports;
|
|
5543
5543
|
}
|
|
5544
|
-
var
|
|
5544
|
+
var lo = Xv(), kc;
|
|
5545
5545
|
(function(i) {
|
|
5546
5546
|
i[i.trace = 0] = "trace", i[i.debug = 1] = "debug", i[i.info = 2] = "info", i[i.warn = 3] = "warn", i[i.error = 4] = "error", i[i.silent = 5] = "silent";
|
|
5547
5547
|
})(kc || (kc = {}));
|
|
@@ -5549,14 +5549,14 @@ var Vn;
|
|
|
5549
5549
|
(function(i) {
|
|
5550
5550
|
i.Default = "livekit", i.Room = "livekit-room", i.Participant = "livekit-participant", i.Track = "livekit-track", i.Publication = "livekit-track-publication", i.Engine = "livekit-engine", i.Signal = "livekit-signal", i.PCManager = "livekit-pc-manager", i.PCTransport = "livekit-pc-transport", i.E2EE = "lk-e2ee";
|
|
5551
5551
|
})(Vn || (Vn = {}));
|
|
5552
|
-
let $e =
|
|
5553
|
-
Object.values(Vn).map((i) =>
|
|
5552
|
+
let $e = lo.getLogger("livekit");
|
|
5553
|
+
Object.values(Vn).map((i) => lo.getLogger(i));
|
|
5554
5554
|
$e.setDefaultLevel(kc.info);
|
|
5555
5555
|
function Ei(i) {
|
|
5556
|
-
const e =
|
|
5556
|
+
const e = lo.getLogger(i);
|
|
5557
5557
|
return e.setDefaultLevel($e.getLevel()), e;
|
|
5558
5558
|
}
|
|
5559
|
-
const $v =
|
|
5559
|
+
const $v = lo.getLogger("lk-e2ee"), fr = 7e3, Yv = [0, 300, 2 * 2 * 300, 3 * 3 * 300, 4 * 4 * 300, fr, fr, fr, fr, fr];
|
|
5560
5560
|
class Kv {
|
|
5561
5561
|
constructor(e) {
|
|
5562
5562
|
this._retryDelays = e !== void 0 ? [...e] : Yv;
|
|
@@ -5631,9 +5631,9 @@ function _i(i) {
|
|
|
5631
5631
|
}, a);
|
|
5632
5632
|
}
|
|
5633
5633
|
}
|
|
5634
|
-
var
|
|
5634
|
+
var na = { exports: {} }, Eu;
|
|
5635
5635
|
function Zv() {
|
|
5636
|
-
if (Eu) return
|
|
5636
|
+
if (Eu) return na.exports;
|
|
5637
5637
|
Eu = 1;
|
|
5638
5638
|
var i = typeof Reflect == "object" ? Reflect : null, e = i && typeof i.apply == "function" ? i.apply : function(S, M, A) {
|
|
5639
5639
|
return Function.prototype.apply.call(S, M, A);
|
|
@@ -5652,7 +5652,7 @@ function Zv() {
|
|
|
5652
5652
|
function r() {
|
|
5653
5653
|
r.init.call(this);
|
|
5654
5654
|
}
|
|
5655
|
-
|
|
5655
|
+
na.exports = r, na.exports.once = f, r.EventEmitter = r, r.prototype._events = void 0, r.prototype._eventsCount = 0, r.prototype._maxListeners = void 0;
|
|
5656
5656
|
var a = 10;
|
|
5657
5657
|
function o(_) {
|
|
5658
5658
|
if (typeof _ != "function")
|
|
@@ -5836,15 +5836,15 @@ function Zv() {
|
|
|
5836
5836
|
else
|
|
5837
5837
|
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof _);
|
|
5838
5838
|
}
|
|
5839
|
-
return
|
|
5839
|
+
return na.exports;
|
|
5840
5840
|
}
|
|
5841
5841
|
var ri = Zv();
|
|
5842
5842
|
let tp = !0, np = !0;
|
|
5843
|
-
function
|
|
5843
|
+
function Mr(i, e, t) {
|
|
5844
5844
|
const n = i.match(e);
|
|
5845
5845
|
return n && n.length >= t && parseFloat(n[t], 10);
|
|
5846
5846
|
}
|
|
5847
|
-
function
|
|
5847
|
+
function xs(i, e, t) {
|
|
5848
5848
|
if (!i.RTCPeerConnection)
|
|
5849
5849
|
return;
|
|
5850
5850
|
const n = i.RTCPeerConnection.prototype, s = n.addEventListener;
|
|
@@ -5911,11 +5911,11 @@ function t0(i) {
|
|
|
5911
5911
|
};
|
|
5912
5912
|
}
|
|
5913
5913
|
if (t.mozGetUserMedia)
|
|
5914
|
-
e.browser = "firefox", e.version = parseInt(
|
|
5914
|
+
e.browser = "firefox", e.version = parseInt(Mr(t.userAgent, /Firefox\/(\d+)\./, 1));
|
|
5915
5915
|
else if (t.webkitGetUserMedia || i.isSecureContext === !1 && i.webkitRTCPeerConnection)
|
|
5916
|
-
e.browser = "chrome", e.version = parseInt(
|
|
5916
|
+
e.browser = "chrome", e.version = parseInt(Mr(t.userAgent, /Chrom(e|ium)\/(\d+)\./, 2));
|
|
5917
5917
|
else if (i.RTCPeerConnection && t.userAgent.match(/AppleWebKit\/(\d+)\./))
|
|
5918
|
-
e.browser = "safari", e.version = parseInt(
|
|
5918
|
+
e.browser = "safari", e.version = parseInt(Mr(t.userAgent, /AppleWebKit\/(\d+)\./, 1)), e.supportsUnifiedPlan = i.RTCRtpTransceiver && "currentDirection" in i.RTCRtpTransceiver.prototype, e._safariVersion = Mr(t.userAgent, /Version\/(\d+(\.?\d+))/, 1);
|
|
5919
5919
|
else
|
|
5920
5920
|
return e.browser = "Not a supported browser.", e;
|
|
5921
5921
|
return e;
|
|
@@ -6092,7 +6092,7 @@ function op(i) {
|
|
|
6092
6092
|
}, this.addEventListener("addstream", this._ontrackpoly)), e.apply(this, arguments);
|
|
6093
6093
|
};
|
|
6094
6094
|
} else
|
|
6095
|
-
|
|
6095
|
+
xs(i, "track", (e) => (e.transceiver || Object.defineProperty(e, "transceiver", {
|
|
6096
6096
|
value: {
|
|
6097
6097
|
receiver: e.receiver
|
|
6098
6098
|
}
|
|
@@ -6179,7 +6179,7 @@ function lp(i) {
|
|
|
6179
6179
|
t && (i.RTCPeerConnection.prototype.getReceivers = function() {
|
|
6180
6180
|
const s = t.apply(this, []);
|
|
6181
6181
|
return s.forEach((r) => r._pc = this), s;
|
|
6182
|
-
}),
|
|
6182
|
+
}), xs(i, "track", (n) => (n.receiver._pc = n.srcElement, n)), i.RTCRtpReceiver.prototype.getStats = function() {
|
|
6183
6183
|
const s = this;
|
|
6184
6184
|
return this._pc.getStats().then((r) => Mu(r, s.track, !1));
|
|
6185
6185
|
};
|
|
@@ -6346,7 +6346,7 @@ function Dc(i, e) {
|
|
|
6346
6346
|
});
|
|
6347
6347
|
}
|
|
6348
6348
|
function hp(i, e) {
|
|
6349
|
-
|
|
6349
|
+
xs(i, "negotiationneeded", (t) => {
|
|
6350
6350
|
const n = t.target;
|
|
6351
6351
|
if (!((e.version < 72 || n.getConfiguration && n.getConfiguration().sdpSemantics === "plan-b") && n.signalingState !== "stable"))
|
|
6352
6352
|
return t;
|
|
@@ -6471,7 +6471,7 @@ function gp(i) {
|
|
|
6471
6471
|
e && (i.RTCPeerConnection.prototype.getReceivers = function() {
|
|
6472
6472
|
const n = e.apply(this, []);
|
|
6473
6473
|
return n.forEach((s) => s._pc = this), n;
|
|
6474
|
-
}),
|
|
6474
|
+
}), xs(i, "track", (t) => (t.receiver._pc = t.srcElement, t)), i.RTCRtpReceiver.prototype.getStats = function() {
|
|
6475
6475
|
return this._pc.getStats(this.track);
|
|
6476
6476
|
};
|
|
6477
6477
|
}
|
|
@@ -7095,17 +7095,17 @@ t=0 0\r
|
|
|
7095
7095
|
}, i.exports = e;
|
|
7096
7096
|
}(Po)), Po.exports;
|
|
7097
7097
|
}
|
|
7098
|
-
var Ip = i0(),
|
|
7098
|
+
var Ip = i0(), js = /* @__PURE__ */ qv(Ip), s0 = /* @__PURE__ */ vg({
|
|
7099
7099
|
__proto__: null,
|
|
7100
|
-
default:
|
|
7100
|
+
default: js
|
|
7101
7101
|
}, [Ip]);
|
|
7102
|
-
function
|
|
7102
|
+
function ka(i) {
|
|
7103
7103
|
if (!i.RTCIceCandidate || i.RTCIceCandidate && "foundation" in i.RTCIceCandidate.prototype)
|
|
7104
7104
|
return;
|
|
7105
7105
|
const e = i.RTCIceCandidate;
|
|
7106
7106
|
i.RTCIceCandidate = function(n) {
|
|
7107
7107
|
if (typeof n == "object" && n.candidate && n.candidate.indexOf("a=") === 0 && (n = JSON.parse(JSON.stringify(n)), n.candidate = n.candidate.substring(2)), n.candidate && n.candidate.length) {
|
|
7108
|
-
const s = new e(n), r =
|
|
7108
|
+
const s = new e(n), r = js.parseCandidate(n.candidate);
|
|
7109
7109
|
for (const a in r)
|
|
7110
7110
|
a in s || Object.defineProperty(s, a, {
|
|
7111
7111
|
value: r[a]
|
|
@@ -7120,15 +7120,15 @@ function Ia(i) {
|
|
|
7120
7120
|
}, s;
|
|
7121
7121
|
}
|
|
7122
7122
|
return new e(n);
|
|
7123
|
-
}, i.RTCIceCandidate.prototype = e.prototype,
|
|
7123
|
+
}, i.RTCIceCandidate.prototype = e.prototype, xs(i, "icecandidate", (t) => (t.candidate && Object.defineProperty(t, "candidate", {
|
|
7124
7124
|
value: new i.RTCIceCandidate(t.candidate),
|
|
7125
7125
|
writable: "false"
|
|
7126
7126
|
}), t));
|
|
7127
7127
|
}
|
|
7128
7128
|
function Nc(i) {
|
|
7129
|
-
!i.RTCIceCandidate || i.RTCIceCandidate && "relayProtocol" in i.RTCIceCandidate.prototype ||
|
|
7129
|
+
!i.RTCIceCandidate || i.RTCIceCandidate && "relayProtocol" in i.RTCIceCandidate.prototype || xs(i, "icecandidate", (e) => {
|
|
7130
7130
|
if (e.candidate) {
|
|
7131
|
-
const t =
|
|
7131
|
+
const t = js.parseCandidate(e.candidate.candidate);
|
|
7132
7132
|
t.type === "relay" && (e.candidate.relayProtocol = {
|
|
7133
7133
|
0: "tls",
|
|
7134
7134
|
1: "tcp",
|
|
@@ -7138,7 +7138,7 @@ function Nc(i) {
|
|
|
7138
7138
|
return e;
|
|
7139
7139
|
});
|
|
7140
7140
|
}
|
|
7141
|
-
function
|
|
7141
|
+
function Ia(i, e) {
|
|
7142
7142
|
if (!i.RTCPeerConnection)
|
|
7143
7143
|
return;
|
|
7144
7144
|
"sctp" in i.RTCPeerConnection.prototype || Object.defineProperty(i.RTCPeerConnection.prototype, "sctp", {
|
|
@@ -7149,9 +7149,9 @@ function Da(i, e) {
|
|
|
7149
7149
|
const t = function(o) {
|
|
7150
7150
|
if (!o || !o.sdp)
|
|
7151
7151
|
return !1;
|
|
7152
|
-
const c =
|
|
7152
|
+
const c = js.splitSections(o.sdp);
|
|
7153
7153
|
return c.shift(), c.some((l) => {
|
|
7154
|
-
const d =
|
|
7154
|
+
const d = js.parseMLine(l);
|
|
7155
7155
|
return d && d.kind === "application" && d.protocol.indexOf("SCTP") !== -1;
|
|
7156
7156
|
});
|
|
7157
7157
|
}, n = function(o) {
|
|
@@ -7166,7 +7166,7 @@ function Da(i, e) {
|
|
|
7166
7166
|
}, r = function(o, c) {
|
|
7167
7167
|
let l = 65536;
|
|
7168
7168
|
e.browser === "firefox" && e.version === 57 && (l = 65535);
|
|
7169
|
-
const d =
|
|
7169
|
+
const d = js.matchPrefix(o.sdp, "a=max-message-size:");
|
|
7170
7170
|
return d.length > 0 ? l = parseInt(d[0].substring(19), 10) : e.browser === "firefox" && c !== -1 && (l = 2147483637), l;
|
|
7171
7171
|
}, a = i.RTCPeerConnection.prototype.setRemoteDescription;
|
|
7172
7172
|
i.RTCPeerConnection.prototype.setRemoteDescription = function() {
|
|
@@ -7196,7 +7196,7 @@ function Da(i, e) {
|
|
|
7196
7196
|
return a.apply(this, arguments);
|
|
7197
7197
|
};
|
|
7198
7198
|
}
|
|
7199
|
-
function
|
|
7199
|
+
function Da(i) {
|
|
7200
7200
|
if (!(i.RTCPeerConnection && "createDataChannel" in i.RTCPeerConnection.prototype))
|
|
7201
7201
|
return;
|
|
7202
7202
|
function e(n, s) {
|
|
@@ -7212,7 +7212,7 @@ function La(i) {
|
|
|
7212
7212
|
i.RTCPeerConnection.prototype.createDataChannel = function() {
|
|
7213
7213
|
const s = t.apply(this, arguments);
|
|
7214
7214
|
return e(s, this), s;
|
|
7215
|
-
},
|
|
7215
|
+
}, xs(i, "datachannel", (n) => (e(n.channel, n.target), n));
|
|
7216
7216
|
}
|
|
7217
7217
|
function Uc(i) {
|
|
7218
7218
|
if (!i.RTCPeerConnection || "connectionState" in i.RTCPeerConnection.prototype)
|
|
@@ -7269,7 +7269,7 @@ a=extmap-allow-mixed`) !== -1) {
|
|
|
7269
7269
|
return t.apply(this, arguments);
|
|
7270
7270
|
};
|
|
7271
7271
|
}
|
|
7272
|
-
function
|
|
7272
|
+
function La(i, e) {
|
|
7273
7273
|
if (!(i.RTCPeerConnection && i.RTCPeerConnection.prototype))
|
|
7274
7274
|
return;
|
|
7275
7275
|
const t = i.RTCPeerConnection.prototype.addIceCandidate;
|
|
@@ -7277,7 +7277,7 @@ function Na(i, e) {
|
|
|
7277
7277
|
return arguments[0] ? (e.browser === "chrome" && e.version < 78 || e.browser === "firefox" && e.version < 68 || e.browser === "safari") && arguments[0] && arguments[0].candidate === "" ? Promise.resolve() : t.apply(this, arguments) : (arguments[1] && arguments[1].apply(null), Promise.resolve());
|
|
7278
7278
|
});
|
|
7279
7279
|
}
|
|
7280
|
-
function
|
|
7280
|
+
function Na(i, e) {
|
|
7281
7281
|
if (!(i.RTCPeerConnection && i.RTCPeerConnection.prototype))
|
|
7282
7282
|
return;
|
|
7283
7283
|
const t = i.RTCPeerConnection.prototype.setLocalDescription;
|
|
@@ -7305,13 +7305,13 @@ function Ua(i, e) {
|
|
|
7305
7305
|
var r0 = /* @__PURE__ */ Object.freeze({
|
|
7306
7306
|
__proto__: null,
|
|
7307
7307
|
removeExtmapAllowMixed: Oc,
|
|
7308
|
-
shimAddIceCandidateNullOrEmpty:
|
|
7308
|
+
shimAddIceCandidateNullOrEmpty: La,
|
|
7309
7309
|
shimConnectionState: Uc,
|
|
7310
|
-
shimMaxMessageSize:
|
|
7311
|
-
shimParameterlessSetLocalDescription:
|
|
7312
|
-
shimRTCIceCandidate:
|
|
7310
|
+
shimMaxMessageSize: Ia,
|
|
7311
|
+
shimParameterlessSetLocalDescription: Na,
|
|
7312
|
+
shimRTCIceCandidate: ka,
|
|
7313
7313
|
shimRTCIceCandidateRelayProtocol: Nc,
|
|
7314
|
-
shimSendThrowTypeError:
|
|
7314
|
+
shimSendThrowTypeError: Da
|
|
7315
7315
|
});
|
|
7316
7316
|
function a0() {
|
|
7317
7317
|
let {
|
|
@@ -7324,7 +7324,7 @@ function a0() {
|
|
|
7324
7324
|
const t = ip, n = t0(i), s = {
|
|
7325
7325
|
browserDetails: n,
|
|
7326
7326
|
commonShim: r0,
|
|
7327
|
-
extractVersion:
|
|
7327
|
+
extractVersion: Mr,
|
|
7328
7328
|
disableLog: Qv,
|
|
7329
7329
|
disableWarnings: e0,
|
|
7330
7330
|
// Expose sdp as a convenience. For production apps include directly.
|
|
@@ -7336,17 +7336,17 @@ function a0() {
|
|
|
7336
7336
|
return t("Chrome shim is not included in this adapter release."), s;
|
|
7337
7337
|
if (n.version === null)
|
|
7338
7338
|
return t("Chrome shim can not determine version, not shimming."), s;
|
|
7339
|
-
t("adapter.js shimming chrome."), s.browserShim = Au,
|
|
7339
|
+
t("adapter.js shimming chrome."), s.browserShim = Au, La(i, n), Na(i), rp(i, n), ap(i), Dc(i, n), op(i), up(i, n), cp(i), lp(i), hp(i, n), ka(i), Nc(i), Uc(i), Ia(i, n), Da(i), Oc(i, n);
|
|
7340
7340
|
break;
|
|
7341
7341
|
case "firefox":
|
|
7342
7342
|
if (!Ru || !Lc || !e.shimFirefox)
|
|
7343
7343
|
return t("Firefox shim is not included in this adapter release."), s;
|
|
7344
|
-
t("adapter.js shimming firefox."), s.browserShim = Ru,
|
|
7344
|
+
t("adapter.js shimming firefox."), s.browserShim = Ru, La(i, n), Na(i), fp(i, n), Lc(i, n), pp(i), vp(i), mp(i), gp(i), _p(i), bp(i), yp(i), Sp(i), xp(i), ka(i), Uc(i), Ia(i, n), Da(i);
|
|
7345
7345
|
break;
|
|
7346
7346
|
case "safari":
|
|
7347
7347
|
if (!Pu || !e.shimSafari)
|
|
7348
7348
|
return t("Safari shim is not included in this adapter release."), s;
|
|
7349
|
-
t("adapter.js shimming safari."), s.browserShim = Pu,
|
|
7349
|
+
t("adapter.js shimming safari."), s.browserShim = Pu, La(i, n), Na(i), Ap(i), Pp(i), Cp(i), Tp(i), Ep(i), Rp(i), Mp(i), kp(i), ka(i), Nc(i), Ia(i, n), Da(i), Oc(i, n);
|
|
7350
7350
|
break;
|
|
7351
7351
|
default:
|
|
7352
7352
|
t("Unsupported browser!");
|
|
@@ -7357,7 +7357,7 @@ function a0() {
|
|
|
7357
7357
|
a0({
|
|
7358
7358
|
window: typeof window > "u" ? void 0 : window
|
|
7359
7359
|
});
|
|
7360
|
-
const o0 = 10,
|
|
7360
|
+
const o0 = 10, pr = "lk_e2ee", c0 = "LKFrameEncryptionKey", l0 = {
|
|
7361
7361
|
sharedKey: !1,
|
|
7362
7362
|
ratchetSalt: c0,
|
|
7363
7363
|
ratchetWindowSize: 8,
|
|
@@ -7485,17 +7485,17 @@ class Vi extends Ri {
|
|
|
7485
7485
|
super(16, e), this.name = "DataStreamError", this.reason = t, this.reasonName = Un[t];
|
|
7486
7486
|
}
|
|
7487
7487
|
}
|
|
7488
|
-
var
|
|
7488
|
+
var Ka;
|
|
7489
7489
|
(function(i) {
|
|
7490
7490
|
i.PermissionDenied = "PermissionDenied", i.NotFound = "NotFound", i.DeviceInUse = "DeviceInUse", i.Other = "Other";
|
|
7491
|
-
})(
|
|
7491
|
+
})(Ka || (Ka = {}));
|
|
7492
7492
|
(function(i) {
|
|
7493
7493
|
function e(t) {
|
|
7494
7494
|
if (t && "name" in t)
|
|
7495
7495
|
return t.name === "NotFoundError" || t.name === "DevicesNotFoundError" ? i.NotFound : t.name === "NotAllowedError" || t.name === "PermissionDeniedError" ? i.PermissionDenied : t.name === "NotReadableError" || t.name === "TrackStartError" ? i.DeviceInUse : i.Other;
|
|
7496
7496
|
}
|
|
7497
7497
|
i.getFailure = e;
|
|
7498
|
-
})(
|
|
7498
|
+
})(Ka || (Ka = {}));
|
|
7499
7499
|
var Uu;
|
|
7500
7500
|
(function(i) {
|
|
7501
7501
|
i[i.InvalidKey = 0] = "InvalidKey", i[i.MissingKey = 1] = "MissingKey", i[i.InternalError = 2] = "InternalError";
|
|
@@ -7543,7 +7543,7 @@ const m0 = [
|
|
|
7543
7543
|
describe(i) {
|
|
7544
7544
|
return {
|
|
7545
7545
|
name: "Firefox",
|
|
7546
|
-
version:
|
|
7546
|
+
version: Ua(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i, i),
|
|
7547
7547
|
os: i.toLowerCase().includes("fxios") ? "iOS" : void 0,
|
|
7548
7548
|
osVersion: Io(i)
|
|
7549
7549
|
};
|
|
@@ -7554,7 +7554,7 @@ const m0 = [
|
|
|
7554
7554
|
describe(i) {
|
|
7555
7555
|
return {
|
|
7556
7556
|
name: "Chrome",
|
|
7557
|
-
version:
|
|
7557
|
+
version: Ua(/(?:chrome|chromium|crios|crmo)\/(\d+(\.?_?\d+)+)/i, i),
|
|
7558
7558
|
os: i.toLowerCase().includes("crios") ? "iOS" : void 0,
|
|
7559
7559
|
osVersion: Io(i)
|
|
7560
7560
|
};
|
|
@@ -7566,20 +7566,20 @@ const m0 = [
|
|
|
7566
7566
|
describe(i) {
|
|
7567
7567
|
return {
|
|
7568
7568
|
name: "Safari",
|
|
7569
|
-
version:
|
|
7569
|
+
version: Ua(p0, i),
|
|
7570
7570
|
os: i.includes("mobile/") ? "iOS" : "macOS",
|
|
7571
7571
|
osVersion: Io(i)
|
|
7572
7572
|
};
|
|
7573
7573
|
}
|
|
7574
7574
|
}
|
|
7575
7575
|
];
|
|
7576
|
-
function
|
|
7576
|
+
function Ua(i, e) {
|
|
7577
7577
|
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1;
|
|
7578
7578
|
const n = e.match(i);
|
|
7579
7579
|
return n && n.length >= t && n[t] || "";
|
|
7580
7580
|
}
|
|
7581
7581
|
function Io(i) {
|
|
7582
|
-
return i.includes("mac os") ?
|
|
7582
|
+
return i.includes("mac os") ? Ua(/\(.+?(\d+_\d+(:?_\d+)?)/, i, 1).replace(/_/g, ".") : void 0;
|
|
7583
7583
|
}
|
|
7584
7584
|
var g0 = "2.15.6";
|
|
7585
7585
|
const v0 = g0, _0 = 16;
|
|
@@ -7598,7 +7598,7 @@ $t.clearTimeout = function() {
|
|
|
7598
7598
|
$t.clearInterval = function() {
|
|
7599
7599
|
return clearInterval(...arguments);
|
|
7600
7600
|
};
|
|
7601
|
-
const b0 = 5e3,
|
|
7601
|
+
const b0 = 5e3, mr = [];
|
|
7602
7602
|
var bn;
|
|
7603
7603
|
(function(i) {
|
|
7604
7604
|
i[i.LOW = 0] = "LOW", i[i.MEDIUM = 1] = "MEDIUM", i[i.HIGH = 2] = "HIGH";
|
|
@@ -7643,9 +7643,9 @@ class J extends ri.EventEmitter {
|
|
|
7643
7643
|
}
|
|
7644
7644
|
attach(e) {
|
|
7645
7645
|
let t = "audio";
|
|
7646
|
-
this.kind === J.Kind.Video && (t = "video"), this.attachedElements.length === 0 && this.kind === J.Kind.Video && this.addAppVisibilityListener(), e || (t === "audio" && (
|
|
7646
|
+
this.kind === J.Kind.Video && (t = "video"), this.attachedElements.length === 0 && this.kind === J.Kind.Video && this.addAppVisibilityListener(), e || (t === "audio" && (mr.forEach((r) => {
|
|
7647
7647
|
r.parentElement === null && !e && (e = r);
|
|
7648
|
-
}), e &&
|
|
7648
|
+
}), e && mr.splice(mr.indexOf(e), 1)), e || (e = document.createElement(t))), this.attachedElements.includes(e) || this.attachedElements.push(e), Hs(this.mediaStreamTrack, e);
|
|
7649
7649
|
const n = e.srcObject.getTracks(), s = n.some((r) => r.kind === "audio");
|
|
7650
7650
|
return e.play().then(() => {
|
|
7651
7651
|
this.emit(s ? re.AudioPlaybackStarted : re.VideoPlaybackStarted);
|
|
@@ -7657,13 +7657,13 @@ class J extends ri.EventEmitter {
|
|
|
7657
7657
|
detach(e) {
|
|
7658
7658
|
try {
|
|
7659
7659
|
if (e) {
|
|
7660
|
-
|
|
7660
|
+
Xs(this.mediaStreamTrack, e);
|
|
7661
7661
|
const n = this.attachedElements.indexOf(e);
|
|
7662
7662
|
return n >= 0 && (this.attachedElements.splice(n, 1), this.recycleElement(e), this.emit(re.ElementDetached, e)), e;
|
|
7663
7663
|
}
|
|
7664
7664
|
const t = [];
|
|
7665
7665
|
return this.attachedElements.forEach((n) => {
|
|
7666
|
-
|
|
7666
|
+
Xs(this.mediaStreamTrack, n), t.push(n), this.recycleElement(n), this.emit(re.ElementDetached, n);
|
|
7667
7667
|
}), this.attachedElements = [], t;
|
|
7668
7668
|
} finally {
|
|
7669
7669
|
this.attachedElements.length === 0 && this.removeAppVisibilityListener();
|
|
@@ -7689,9 +7689,9 @@ class J extends ri.EventEmitter {
|
|
|
7689
7689
|
recycleElement(e) {
|
|
7690
7690
|
if (e instanceof HTMLAudioElement) {
|
|
7691
7691
|
let t = !0;
|
|
7692
|
-
e.pause(),
|
|
7692
|
+
e.pause(), mr.forEach((n) => {
|
|
7693
7693
|
n.parentElement || (t = !1);
|
|
7694
|
-
}), t &&
|
|
7694
|
+
}), t && mr.push(e);
|
|
7695
7695
|
}
|
|
7696
7696
|
}
|
|
7697
7697
|
handleAppVisibilityChanged() {
|
|
@@ -7707,7 +7707,7 @@ class J extends ri.EventEmitter {
|
|
|
7707
7707
|
un() && document.removeEventListener("visibilitychange", this.appVisibilityChangedListener);
|
|
7708
7708
|
}
|
|
7709
7709
|
}
|
|
7710
|
-
function
|
|
7710
|
+
function Hs(i, e) {
|
|
7711
7711
|
let t;
|
|
7712
7712
|
e.srcObject instanceof MediaStream ? t = e.srcObject : t = new MediaStream();
|
|
7713
7713
|
let n;
|
|
@@ -7718,7 +7718,7 @@ function Ws(i, e) {
|
|
|
7718
7718
|
});
|
|
7719
7719
|
}, 0));
|
|
7720
7720
|
}
|
|
7721
|
-
function
|
|
7721
|
+
function Xs(i, e) {
|
|
7722
7722
|
if (e.srcObject instanceof MediaStream) {
|
|
7723
7723
|
const t = e.srcObject;
|
|
7724
7724
|
t.removeTrack(i), t.getTracks().length > 0 ? e.srcObject = t : e.srcObject = null;
|
|
@@ -7851,7 +7851,7 @@ var Vc;
|
|
|
7851
7851
|
maxBitrate: 128e3
|
|
7852
7852
|
};
|
|
7853
7853
|
})(Vc || (Vc = {}));
|
|
7854
|
-
const
|
|
7854
|
+
const zr = {
|
|
7855
7855
|
h90: new ht(160, 90, 9e4, 20),
|
|
7856
7856
|
h180: new ht(320, 180, 16e4, 20),
|
|
7857
7857
|
h216: new ht(384, 216, 18e4, 20),
|
|
@@ -7934,7 +7934,7 @@ function $n(i) {
|
|
|
7934
7934
|
return i === "av1" || i === "vp9";
|
|
7935
7935
|
}
|
|
7936
7936
|
function Wc(i) {
|
|
7937
|
-
return !document ||
|
|
7937
|
+
return !document || Gr() ? !1 : (i || (i = document.createElement("audio")), "setSinkId" in i);
|
|
7938
7938
|
}
|
|
7939
7939
|
function w0() {
|
|
7940
7940
|
return typeof RTCPeerConnection > "u" ? !1 : Gc() || Hc();
|
|
@@ -7947,7 +7947,7 @@ function ys() {
|
|
|
7947
7947
|
var i;
|
|
7948
7948
|
return ((i = yn()) === null || i === void 0 ? void 0 : i.name) === "Safari";
|
|
7949
7949
|
}
|
|
7950
|
-
function
|
|
7950
|
+
function Gr() {
|
|
7951
7951
|
const i = yn();
|
|
7952
7952
|
return (i == null ? void 0 : i.name) === "Safari" || (i == null ? void 0 : i.os) === "iOS";
|
|
7953
7953
|
}
|
|
@@ -8045,17 +8045,17 @@ function Gu() {
|
|
|
8045
8045
|
throw Error("Could not get empty media stream video track");
|
|
8046
8046
|
return o.enabled = t, o;
|
|
8047
8047
|
}
|
|
8048
|
-
let
|
|
8048
|
+
let gr;
|
|
8049
8049
|
function No() {
|
|
8050
|
-
if (!
|
|
8050
|
+
if (!gr) {
|
|
8051
8051
|
const i = new AudioContext(), e = i.createOscillator(), t = i.createGain();
|
|
8052
8052
|
t.gain.setValueAtTime(0, 0);
|
|
8053
8053
|
const n = i.createMediaStreamDestination();
|
|
8054
|
-
if (e.connect(t), t.connect(n), e.start(), [
|
|
8054
|
+
if (e.connect(t), t.connect(n), e.start(), [gr] = n.stream.getAudioTracks(), !gr)
|
|
8055
8055
|
throw Error("Could not get empty media stream audio track");
|
|
8056
|
-
|
|
8056
|
+
gr.enabled = !1;
|
|
8057
8057
|
}
|
|
8058
|
-
return
|
|
8058
|
+
return gr.clone();
|
|
8059
8059
|
}
|
|
8060
8060
|
class Yn {
|
|
8061
8061
|
get isResolved() {
|
|
@@ -8142,13 +8142,13 @@ function Hu(i) {
|
|
|
8142
8142
|
return Fn.UNKNOWN_REASON;
|
|
8143
8143
|
}
|
|
8144
8144
|
}
|
|
8145
|
-
function
|
|
8145
|
+
function Oa(i) {
|
|
8146
8146
|
return i !== void 0 ? Number(i) : void 0;
|
|
8147
8147
|
}
|
|
8148
8148
|
function as(i) {
|
|
8149
8149
|
return i !== void 0 ? BigInt(i) : void 0;
|
|
8150
8150
|
}
|
|
8151
|
-
function
|
|
8151
|
+
function $s(i) {
|
|
8152
8152
|
return !!i && !(i instanceof MediaStreamTrack) && i.isLocal;
|
|
8153
8153
|
}
|
|
8154
8154
|
function Zn(i) {
|
|
@@ -8158,10 +8158,10 @@ function Yi(i) {
|
|
|
8158
8158
|
return !!i && i.kind == J.Kind.Video;
|
|
8159
8159
|
}
|
|
8160
8160
|
function ki(i) {
|
|
8161
|
-
return
|
|
8161
|
+
return $s(i) && Yi(i);
|
|
8162
8162
|
}
|
|
8163
8163
|
function hi(i) {
|
|
8164
|
-
return
|
|
8164
|
+
return $s(i) && Zn(i);
|
|
8165
8165
|
}
|
|
8166
8166
|
function Xc(i) {
|
|
8167
8167
|
return !!i && !i.isLocal;
|
|
@@ -8319,7 +8319,7 @@ function G0(i) {
|
|
|
8319
8319
|
preferCurrentTab: i.preferCurrentTab
|
|
8320
8320
|
};
|
|
8321
8321
|
}
|
|
8322
|
-
function
|
|
8322
|
+
function Lr(i) {
|
|
8323
8323
|
return i.split("/")[1].toLowerCase();
|
|
8324
8324
|
}
|
|
8325
8325
|
function H0(i) {
|
|
@@ -8502,13 +8502,13 @@ class $0 extends ri.EventEmitter {
|
|
|
8502
8502
|
}), e.localParticipant.on(oe.LocalSenderCreated, (n, s) => P(this, void 0, void 0, function* () {
|
|
8503
8503
|
this.setupE2EESender(s, n);
|
|
8504
8504
|
})), e.localParticipant.on(oe.LocalTrackPublished, (n) => {
|
|
8505
|
-
if (!Yi(n.track) || !
|
|
8505
|
+
if (!Yi(n.track) || !Gr())
|
|
8506
8506
|
return;
|
|
8507
8507
|
const s = {
|
|
8508
8508
|
kind: "updateCodec",
|
|
8509
8509
|
data: {
|
|
8510
8510
|
trackId: n.track.mediaStreamID,
|
|
8511
|
-
codec:
|
|
8511
|
+
codec: Lr(n.trackInfo.codecs[0].mimeType),
|
|
8512
8512
|
participantIdentity: this.room.localParticipant.identity
|
|
8513
8513
|
}
|
|
8514
8514
|
};
|
|
@@ -8590,11 +8590,11 @@ class $0 extends ri.EventEmitter {
|
|
|
8590
8590
|
if (e.receiver) {
|
|
8591
8591
|
if (!(n != null && n.mimeType) || n.mimeType === "")
|
|
8592
8592
|
throw new TypeError("MimeType missing from trackInfo, cannot set up E2EE cryptor");
|
|
8593
|
-
this.handleReceiver(e.receiver, e.mediaStreamID, t, e.kind === "video" ?
|
|
8593
|
+
this.handleReceiver(e.receiver, e.mediaStreamID, t, e.kind === "video" ? Lr(n.mimeType) : void 0);
|
|
8594
8594
|
}
|
|
8595
8595
|
}
|
|
8596
8596
|
setupE2EESender(e, t) {
|
|
8597
|
-
if (
|
|
8597
|
+
if (!$s(e) || !t) {
|
|
8598
8598
|
t || $e.warn("early return because sender is not ready");
|
|
8599
8599
|
return;
|
|
8600
8600
|
}
|
|
@@ -8617,7 +8617,7 @@ class $0 extends ri.EventEmitter {
|
|
|
8617
8617
|
};
|
|
8618
8618
|
e.transform = new RTCRtpScriptTransform(this.worker, r);
|
|
8619
8619
|
} else {
|
|
8620
|
-
if (
|
|
8620
|
+
if (pr in e && s) {
|
|
8621
8621
|
const c = {
|
|
8622
8622
|
kind: "updateCodec",
|
|
8623
8623
|
data: {
|
|
@@ -8642,12 +8642,12 @@ class $0 extends ri.EventEmitter {
|
|
|
8642
8642
|
trackId: t,
|
|
8643
8643
|
codec: s,
|
|
8644
8644
|
participantIdentity: n,
|
|
8645
|
-
isReuse:
|
|
8645
|
+
isReuse: pr in e
|
|
8646
8646
|
}
|
|
8647
8647
|
};
|
|
8648
8648
|
this.worker.postMessage(o, [a, r]);
|
|
8649
8649
|
}
|
|
8650
|
-
e[
|
|
8650
|
+
e[pr] = !0;
|
|
8651
8651
|
}
|
|
8652
8652
|
});
|
|
8653
8653
|
}
|
|
@@ -8658,7 +8658,7 @@ class $0 extends ri.EventEmitter {
|
|
|
8658
8658
|
*/
|
|
8659
8659
|
handleSender(e, t, n) {
|
|
8660
8660
|
var s;
|
|
8661
|
-
if (!(
|
|
8661
|
+
if (!(pr in e || !this.worker)) {
|
|
8662
8662
|
if (!(!((s = this.room) === null || s === void 0) && s.localParticipant.identity) || this.room.localParticipant.identity === "")
|
|
8663
8663
|
throw TypeError("local identity needs to be known in order to set up encrypted sender");
|
|
8664
8664
|
if (Fc()) {
|
|
@@ -8685,7 +8685,7 @@ class $0 extends ri.EventEmitter {
|
|
|
8685
8685
|
};
|
|
8686
8686
|
this.worker.postMessage(a, [r.readable, r.writable]);
|
|
8687
8687
|
}
|
|
8688
|
-
e[
|
|
8688
|
+
e[pr] = !0;
|
|
8689
8689
|
}
|
|
8690
8690
|
}
|
|
8691
8691
|
}
|
|
@@ -8759,10 +8759,10 @@ class Xt {
|
|
|
8759
8759
|
}
|
|
8760
8760
|
Xt.mediaDeviceKinds = ["audioinput", "audiooutput", "videoinput"];
|
|
8761
8761
|
Xt.userMediaPromiseMap = /* @__PURE__ */ new Map();
|
|
8762
|
-
var
|
|
8762
|
+
var Nr;
|
|
8763
8763
|
(function(i) {
|
|
8764
8764
|
i[i.WAITING = 0] = "WAITING", i[i.RUNNING = 1] = "RUNNING", i[i.COMPLETED = 2] = "COMPLETED";
|
|
8765
|
-
})(
|
|
8765
|
+
})(Nr || (Nr = {}));
|
|
8766
8766
|
class Y0 {
|
|
8767
8767
|
constructor() {
|
|
8768
8768
|
this.pendingTasks = /* @__PURE__ */ new Map(), this.taskMutex = new hn(), this.nextTaskIndex = 0;
|
|
@@ -8772,14 +8772,14 @@ class Y0 {
|
|
|
8772
8772
|
const t = {
|
|
8773
8773
|
id: this.nextTaskIndex++,
|
|
8774
8774
|
enqueuedAt: Date.now(),
|
|
8775
|
-
status:
|
|
8775
|
+
status: Nr.WAITING
|
|
8776
8776
|
};
|
|
8777
8777
|
this.pendingTasks.set(t.id, t);
|
|
8778
8778
|
const n = yield this.taskMutex.lock();
|
|
8779
8779
|
try {
|
|
8780
|
-
return t.executedAt = Date.now(), t.status =
|
|
8780
|
+
return t.executedAt = Date.now(), t.status = Nr.RUNNING, yield e();
|
|
8781
8781
|
} finally {
|
|
8782
|
-
t.status =
|
|
8782
|
+
t.status = Nr.COMPLETED, this.pendingTasks.delete(t.id), n();
|
|
8783
8783
|
}
|
|
8784
8784
|
});
|
|
8785
8785
|
}
|
|
@@ -8961,7 +8961,7 @@ class vd {
|
|
|
8961
8961
|
offerSdp: e.sdp
|
|
8962
8962
|
})), this.sendRequest({
|
|
8963
8963
|
case: "offer",
|
|
8964
|
-
value:
|
|
8964
|
+
value: Ja(e, t)
|
|
8965
8965
|
});
|
|
8966
8966
|
}
|
|
8967
8967
|
// answer a server-initiated offer
|
|
@@ -8970,7 +8970,7 @@ class vd {
|
|
|
8970
8970
|
answerSdp: e.sdp
|
|
8971
8971
|
})), this.sendRequest({
|
|
8972
8972
|
case: "answer",
|
|
8973
|
-
value:
|
|
8973
|
+
value: Ja(e, t)
|
|
8974
8974
|
});
|
|
8975
8975
|
}
|
|
8976
8976
|
sendIceCandidate(e, t) {
|
|
@@ -9083,10 +9083,10 @@ class vd {
|
|
|
9083
9083
|
sendLeave() {
|
|
9084
9084
|
return this.sendRequest({
|
|
9085
9085
|
case: "leave",
|
|
9086
|
-
value: new
|
|
9086
|
+
value: new co({
|
|
9087
9087
|
reason: Fn.CLIENT_INITIATED,
|
|
9088
9088
|
// server doesn't process this field, keeping it here to indicate the intent of a full disconnect
|
|
9089
|
-
action:
|
|
9089
|
+
action: qs.DISCONNECT
|
|
9090
9090
|
})
|
|
9091
9091
|
});
|
|
9092
9092
|
}
|
|
@@ -9211,7 +9211,7 @@ function qu(i) {
|
|
|
9211
9211
|
}
|
|
9212
9212
|
return e;
|
|
9213
9213
|
}
|
|
9214
|
-
function
|
|
9214
|
+
function Ja(i, e) {
|
|
9215
9215
|
return new _s({
|
|
9216
9216
|
sdp: i.sdp,
|
|
9217
9217
|
type: i.type,
|
|
@@ -9946,7 +9946,7 @@ function bd(i, e, t) {
|
|
|
9946
9946
|
}), d = [];
|
|
9947
9947
|
}, h;
|
|
9948
9948
|
}
|
|
9949
|
-
const a_ = 0.7, o_ = 20,
|
|
9949
|
+
const a_ = 0.7, o_ = 20, Ys = {
|
|
9950
9950
|
NegotiationStarted: "negotiationStarted",
|
|
9951
9951
|
NegotiationComplete: "negotiationComplete",
|
|
9952
9952
|
RTPVideoPayloadTypes: "rtpVideoPayloadTypes"
|
|
@@ -9959,7 +9959,7 @@ class Ju extends ri.EventEmitter {
|
|
|
9959
9959
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
9960
9960
|
var n;
|
|
9961
9961
|
super(), this.log = $e, this.ddExtID = 0, this.latestOfferId = 0, this.pendingCandidates = [], this.restartingIce = !1, this.renegotiate = !1, this.trackBitrates = [], this.remoteStereoMids = [], this.remoteNackMids = [], this.negotiate = bd((s) => P(this, void 0, void 0, function* () {
|
|
9962
|
-
this.emit(
|
|
9962
|
+
this.emit(Ys.NegotiationStarted);
|
|
9963
9963
|
try {
|
|
9964
9964
|
yield this.createAndSendOffer();
|
|
9965
9965
|
} catch (r) {
|
|
@@ -10050,8 +10050,8 @@ class Ju extends ri.EventEmitter {
|
|
|
10050
10050
|
}
|
|
10051
10051
|
return yield this.setMungedSDP(e, s, !0), this.pendingCandidates.forEach((r) => {
|
|
10052
10052
|
this.pc.addIceCandidate(r);
|
|
10053
|
-
}), this.pendingCandidates = [], this.restartingIce = !1, this.renegotiate ? (this.renegotiate = !1, yield this.createAndSendOffer()) : e.type === "answer" && (this.emit(
|
|
10054
|
-
a.type === "video" && this.emit(
|
|
10053
|
+
}), this.pendingCandidates = [], this.restartingIce = !1, this.renegotiate ? (this.renegotiate = !1, yield this.createAndSendOffer()) : e.type === "answer" && (this.emit(Ys.NegotiationComplete), e.sdp && Fi.parse(e.sdp).media.forEach((a) => {
|
|
10054
|
+
a.type === "video" && this.emit(Ys.RTPVideoPayloadTypes, a.rtp);
|
|
10055
10055
|
})), !0;
|
|
10056
10056
|
});
|
|
10057
10057
|
}
|
|
@@ -10301,7 +10301,7 @@ const Kc = "vp8", l_ = {
|
|
|
10301
10301
|
deviceId: {
|
|
10302
10302
|
ideal: "default"
|
|
10303
10303
|
},
|
|
10304
|
-
resolution:
|
|
10304
|
+
resolution: zr.h720.resolution
|
|
10305
10305
|
}, d_ = {
|
|
10306
10306
|
adaptiveStream: !1,
|
|
10307
10307
|
dynacast: !1,
|
|
@@ -10438,8 +10438,8 @@ class u_ {
|
|
|
10438
10438
|
}, this.peerConnectionTimeout), r = () => {
|
|
10439
10439
|
clearTimeout(s), n("negotiation aborted");
|
|
10440
10440
|
};
|
|
10441
|
-
e.signal.addEventListener("abort", r), this.publisher.once(
|
|
10442
|
-
e.signal.aborted || this.publisher.once(
|
|
10441
|
+
e.signal.addEventListener("abort", r), this.publisher.once(Ys.NegotiationStarted, () => {
|
|
10442
|
+
e.signal.aborted || this.publisher.once(Ys.NegotiationComplete, () => {
|
|
10443
10443
|
clearTimeout(s), t();
|
|
10444
10444
|
});
|
|
10445
10445
|
}), yield this.publisher.negotiate((a) => {
|
|
@@ -10572,7 +10572,7 @@ function eh(i, e) {
|
|
|
10572
10572
|
return i.slice(0, t);
|
|
10573
10573
|
}
|
|
10574
10574
|
const xd = 2e3;
|
|
10575
|
-
function
|
|
10575
|
+
function uo(i, e) {
|
|
10576
10576
|
if (!e)
|
|
10577
10577
|
return 0;
|
|
10578
10578
|
let t, n;
|
|
@@ -10700,20 +10700,20 @@ class Wp extends J {
|
|
|
10700
10700
|
if (e === this._mediaStreamTrack && !t)
|
|
10701
10701
|
return;
|
|
10702
10702
|
this._mediaStreamTrack && (this.attachedElements.forEach((r) => {
|
|
10703
|
-
|
|
10703
|
+
Xs(this._mediaStreamTrack, r);
|
|
10704
10704
|
}), this.debouncedTrackMuteHandler.cancel("new-track"), this._mediaStreamTrack.removeEventListener("ended", this.handleEnded), this._mediaStreamTrack.removeEventListener("mute", this.handleTrackMuteEvent), this._mediaStreamTrack.removeEventListener("unmute", this.handleTrackUnmuteEvent)), this.mediaStream = new MediaStream([e]), e && (e.addEventListener("ended", this.handleEnded), e.addEventListener("mute", this.handleTrackMuteEvent), e.addEventListener("unmute", this.handleTrackUnmuteEvent), this._constraints = e.getConstraints());
|
|
10705
10705
|
let s;
|
|
10706
10706
|
if (this.processor && e) {
|
|
10707
10707
|
if (this.log.debug("restarting processor", this.logContext), this.kind === "unknown")
|
|
10708
10708
|
throw TypeError("cannot set processor on track of unknown kind");
|
|
10709
|
-
this.processorElement && (
|
|
10709
|
+
this.processorElement && (Hs(e, this.processorElement), this.processorElement.muted = !0), yield this.processor.restart({
|
|
10710
10710
|
track: e,
|
|
10711
10711
|
kind: this.kind,
|
|
10712
10712
|
element: this.processorElement
|
|
10713
10713
|
}), s = this.processor.processedTrack;
|
|
10714
10714
|
}
|
|
10715
10715
|
this.sender && ((n = this.sender.transport) === null || n === void 0 ? void 0 : n.state) !== "closed" && (yield this.sender.replaceTrack(s ?? e)), !this.providedByUser && this._mediaStreamTrack !== e && this._mediaStreamTrack.stop(), this._mediaStreamTrack = e, e && (this._mediaStreamTrack.enabled = !this.isMuted, yield this.resumeUpstream(), this.attachedElements.forEach((r) => {
|
|
10716
|
-
|
|
10716
|
+
Hs(s ?? e, r);
|
|
10717
10717
|
}));
|
|
10718
10718
|
});
|
|
10719
10719
|
}
|
|
@@ -10806,7 +10806,7 @@ class Wp extends J {
|
|
|
10806
10806
|
} : !0 : a.audio = n ? Object.assign({
|
|
10807
10807
|
deviceId: n
|
|
10808
10808
|
}, r) : !0, this.attachedElements.forEach((l) => {
|
|
10809
|
-
|
|
10809
|
+
Xs(this.mediaStreamTrack, l);
|
|
10810
10810
|
}), this._mediaStreamTrack.removeEventListener("ended", this.handleEnded), this._mediaStreamTrack.stop();
|
|
10811
10811
|
const c = (yield navigator.mediaDevices.getUserMedia(a)).getTracks()[0];
|
|
10812
10812
|
return this.kind === J.Kind.Video && (yield c.applyConstraints(r)), c.addEventListener("ended", this.handleEnded), this.log.debug("re-acquired MediaStreamTrack", this.logContext), yield this.setMediaStreamTrack(c), this._constraints = e, this.emit(re.Restarted, this), this.manuallyStopped && (this.log.warn("track was stopped during a restart, stopping restarted track", this.logContext), this.stop()), this;
|
|
@@ -10918,7 +10918,7 @@ class Wp extends J {
|
|
|
10918
10918
|
};
|
|
10919
10919
|
if (yield t.init(c), n.log.debug("processor initialized", n.logContext), n.processor && (yield n.internalStopProcessor()), n.kind === "unknown")
|
|
10920
10920
|
throw TypeError("cannot set processor on track of unknown kind");
|
|
10921
|
-
if (
|
|
10921
|
+
if (Hs(n._mediaStreamTrack, o), o.muted = !0, o.play().catch((l) => {
|
|
10922
10922
|
l instanceof DOMException && l.name === "AbortError" ? (n.log.warn("failed to play processor element, retrying", Object.assign(Object.assign({}, n.logContext), {
|
|
10923
10923
|
error: l
|
|
10924
10924
|
})), setTimeout(() => {
|
|
@@ -10932,7 +10932,7 @@ class Wp extends J {
|
|
|
10932
10932
|
}));
|
|
10933
10933
|
}), n.processor = t, n.processorElement = o, n.processor.processedTrack) {
|
|
10934
10934
|
for (const l of n.attachedElements)
|
|
10935
|
-
l !== n.processorElement && s && (
|
|
10935
|
+
l !== n.processorElement && s && (Xs(n._mediaStreamTrack, l), Hs(n.processor.processedTrack, l));
|
|
10936
10936
|
yield (r = n.sender) === null || r === void 0 ? void 0 : r.replaceTrack(n.processor.processedTrack);
|
|
10937
10937
|
}
|
|
10938
10938
|
n.emit(re.TrackProcessorUpdate, n.processor);
|
|
@@ -11015,7 +11015,7 @@ class Wp extends J {
|
|
|
11015
11015
|
return (e = this.localTrackRecorder) === null || e === void 0 ? void 0 : e.mimeType;
|
|
11016
11016
|
}
|
|
11017
11017
|
}
|
|
11018
|
-
class
|
|
11018
|
+
class Za extends Wp {
|
|
11019
11019
|
/**
|
|
11020
11020
|
* boolean indicating whether enhanced noise cancellation is currently being used on this track
|
|
11021
11021
|
*/
|
|
@@ -11044,7 +11044,7 @@ class Qa extends Wp {
|
|
|
11044
11044
|
}));
|
|
11045
11045
|
return;
|
|
11046
11046
|
}
|
|
11047
|
-
a && this.prevStats && (this._currentBitrate =
|
|
11047
|
+
a && this.prevStats && (this._currentBitrate = uo(a, this.prevStats)), this.prevStats = a;
|
|
11048
11048
|
}), this.handleKrispNoiseFilterEnable = () => {
|
|
11049
11049
|
this.isKrispNoiseFilterEnabled = !0, this.log.debug("Krisp noise filter enabled", this.logContext), this.emit(re.AudioTrackFeatureUpdate, this, jt.TF_ENHANCED_NOISE_CANCELLATION, !0);
|
|
11050
11050
|
}, this.handleKrispNoiseFilterDisable = () => {
|
|
@@ -11171,14 +11171,14 @@ class Qa extends Wp {
|
|
|
11171
11171
|
function __(i, e, t) {
|
|
11172
11172
|
switch (i.kind) {
|
|
11173
11173
|
case "audio":
|
|
11174
|
-
return new
|
|
11174
|
+
return new Za(i, e, !1, void 0, t);
|
|
11175
11175
|
case "video":
|
|
11176
|
-
return new
|
|
11176
|
+
return new Qa(i, e, !1, t);
|
|
11177
11177
|
default:
|
|
11178
11178
|
throw new bi("unsupported track type: ".concat(i.kind));
|
|
11179
11179
|
}
|
|
11180
11180
|
}
|
|
11181
|
-
const b_ = Object.values(
|
|
11181
|
+
const b_ = Object.values(zr), y_ = Object.values(zc), S_ = Object.values(md), x_ = [zr.h180, zr.h360], T_ = [zc.h180, zc.h360], E_ = (i) => [{
|
|
11182
11182
|
scaleResolutionDownBy: 2,
|
|
11183
11183
|
fps: i.encoding.maxFramerate
|
|
11184
11184
|
}].map((t) => {
|
|
@@ -11199,7 +11199,7 @@ function Zc(i, e, t, n) {
|
|
|
11199
11199
|
if (g.spatial > 3)
|
|
11200
11200
|
throw new Error("unsupported scalabilityMode: ".concat(c));
|
|
11201
11201
|
const m = yn();
|
|
11202
|
-
if (
|
|
11202
|
+
if (Gr() || // Even tho RN runs M114, it does not produce SVC layers when a single encoding
|
|
11203
11203
|
// is provided. So we'll use the legacy SVC specification for now.
|
|
11204
11204
|
// TODO: when we upstream libwebrtc, this will need additional verification
|
|
11205
11205
|
ni() || (m == null ? void 0 : m.name) === "Chrome" && ii(m == null ? void 0 : m.version, "113") < 0) {
|
|
@@ -11347,7 +11347,7 @@ function A_(i) {
|
|
|
11347
11347
|
return i.source === J.Source.ScreenShare || i.constraints.height && Xi(i.constraints.height) >= 1080 ? "maintain-resolution" : "balanced";
|
|
11348
11348
|
}
|
|
11349
11349
|
const R_ = 5e3;
|
|
11350
|
-
class
|
|
11350
|
+
class Qa extends Wp {
|
|
11351
11351
|
get sender() {
|
|
11352
11352
|
return this._sender;
|
|
11353
11353
|
}
|
|
@@ -11382,7 +11382,7 @@ class eo extends Wp {
|
|
|
11382
11382
|
a.forEach((l, d) => {
|
|
11383
11383
|
var u;
|
|
11384
11384
|
const h = (u = this.prevStats) === null || u === void 0 ? void 0 : u.get(d);
|
|
11385
|
-
c +=
|
|
11385
|
+
c += uo(l, h);
|
|
11386
11386
|
}), this._currentBitrate = c;
|
|
11387
11387
|
}
|
|
11388
11388
|
this.prevStats = a;
|
|
@@ -11927,7 +11927,7 @@ class I_ extends ri.EventEmitter {
|
|
|
11927
11927
|
if (s)
|
|
11928
11928
|
return n === qe.RELIABLE && this.reliableMessageBuffer.alignBufferedAmount(s.bufferedAmount), s.bufferedAmount <= s.bufferedAmountLowThreshold;
|
|
11929
11929
|
}, this.handleBrowserOnLine = () => {
|
|
11930
|
-
this.client.currentState === Tt.RECONNECTING && (this.clearReconnectTimeout(), this.attemptReconnect(
|
|
11930
|
+
this.client.currentState === Tt.RECONNECTING && (this.clearReconnectTimeout(), this.attemptReconnect(Cs.RR_SIGNAL_DISCONNECTED));
|
|
11931
11931
|
}, this.log = Ei((t = e.loggerName) !== null && t !== void 0 ? t : Vn.Engine), this.loggerOptions = {
|
|
11932
11932
|
loggerName: e.loggerName,
|
|
11933
11933
|
loggerContextCb: () => this.logContext
|
|
@@ -12057,7 +12057,7 @@ class I_ extends ri.EventEmitter {
|
|
|
12057
12057
|
if (this.log.debug("primary PC state changed ".concat(r), this.logContext), ["closed", "disconnected", "failed"].includes(a) && (this.publisherConnectionPromise = void 0), r === Pt.CONNECTED) {
|
|
12058
12058
|
const d = this.pcState === In.New;
|
|
12059
12059
|
this.pcState = In.Connected, d && this.emit(ce.Connected, e);
|
|
12060
|
-
} else r === Pt.FAILED && this.pcState === In.Connected && (this.pcState = In.Disconnected, this.handleDisconnect("peerconnection failed", o === "failed" ?
|
|
12060
|
+
} else r === Pt.FAILED && this.pcState === In.Connected && (this.pcState = In.Disconnected, this.handleDisconnect("peerconnection failed", o === "failed" ? Cs.RR_SUBSCRIBER_FAILED : Cs.RR_PUBLISHER_FAILED));
|
|
12061
12061
|
const c = this.client.isDisconnected || this.client.currentState === Tt.RECONNECTING, l = [Pt.FAILED, Pt.CLOSING, Pt.CLOSED].includes(r);
|
|
12062
12062
|
c && l && !this._isClosed && this.emit(ce.Offline);
|
|
12063
12063
|
}), this.pcManager.onTrack = (r) => {
|
|
@@ -12109,18 +12109,18 @@ class I_ extends ri.EventEmitter {
|
|
|
12109
12109
|
var t;
|
|
12110
12110
|
this.participantSid = (t = e.participant) === null || t === void 0 ? void 0 : t.sid, this.latestJoinResponse && (this.latestJoinResponse.room = e.room), this.emit(ce.RoomMoved, e);
|
|
12111
12111
|
}, this.client.onClose = () => {
|
|
12112
|
-
this.handleDisconnect("signal",
|
|
12112
|
+
this.handleDisconnect("signal", Cs.RR_SIGNAL_DISCONNECTED);
|
|
12113
12113
|
}, this.client.onLeave = (e) => {
|
|
12114
12114
|
switch (this.log.debug("client leave request", Object.assign(Object.assign({}, this.logContext), {
|
|
12115
12115
|
reason: e == null ? void 0 : e.reason
|
|
12116
12116
|
})), e.regions && this.regionUrlProvider && (this.log.debug("updating regions", this.logContext), this.regionUrlProvider.setServerReportedRegions(e.regions)), e.action) {
|
|
12117
|
-
case
|
|
12117
|
+
case qs.DISCONNECT:
|
|
12118
12118
|
this.emit(ce.Disconnected, e == null ? void 0 : e.reason), this.close();
|
|
12119
12119
|
break;
|
|
12120
|
-
case
|
|
12120
|
+
case qs.RECONNECT:
|
|
12121
12121
|
this.fullReconnectOnNext = !0, this.handleDisconnect(Go);
|
|
12122
12122
|
break;
|
|
12123
|
-
case
|
|
12123
|
+
case qs.RESUME:
|
|
12124
12124
|
this.handleDisconnect(Go);
|
|
12125
12125
|
}
|
|
12126
12126
|
};
|
|
@@ -12137,7 +12137,7 @@ class I_ extends ri.EventEmitter {
|
|
|
12137
12137
|
r.username && (a.username = r.username), r.credential && (a.credential = r.credential), s.push(a);
|
|
12138
12138
|
}), n.iceServers = s;
|
|
12139
12139
|
}
|
|
12140
|
-
return e.clientConfiguration && e.clientConfiguration.forceRelay ===
|
|
12140
|
+
return e.clientConfiguration && e.clientConfiguration.forceRelay === Br.ENABLED && (n.iceTransportPolicy = "relay"), n.sdpSemantics = "unified-plan", n.continualGatheringPolicy = "gather_continually", n;
|
|
12141
12141
|
}
|
|
12142
12142
|
createDataChannels() {
|
|
12143
12143
|
this.pcManager && (this.lossyDC && (this.lossyDC.onmessage = null, this.lossyDC.onerror = null), this.reliableDC && (this.reliableDC.onmessage = null, this.reliableDC.onerror = null), this.lossyDC = this.pcManager.createPublisherDataChannel(rh, {
|
|
@@ -12206,7 +12206,7 @@ class I_ extends ri.EventEmitter {
|
|
|
12206
12206
|
$e.warn("already attempting reconnect, returning early", this.logContext);
|
|
12207
12207
|
return;
|
|
12208
12208
|
}
|
|
12209
|
-
(((t = this.clientConfiguration) === null || t === void 0 ? void 0 : t.resumeConnection) ===
|
|
12209
|
+
(((t = this.clientConfiguration) === null || t === void 0 ? void 0 : t.resumeConnection) === Br.DISABLED || // signaling state could change to closed due to hardware sleep
|
|
12210
12210
|
// those connections cannot be resumed
|
|
12211
12211
|
((s = (n = this.pcManager) === null || n === void 0 ? void 0 : n.currentState) !== null && s !== void 0 ? s : Pt.NEW) === Pt.NEW) && (this.fullReconnectOnNext = !0);
|
|
12212
12212
|
try {
|
|
@@ -12216,7 +12216,7 @@ class I_ extends ri.EventEmitter {
|
|
|
12216
12216
|
let a = !0;
|
|
12217
12217
|
r instanceof zt ? (this.log.debug("received unrecoverable error", Object.assign(Object.assign({}, this.logContext), {
|
|
12218
12218
|
error: r
|
|
12219
|
-
})), a = !1) : r instanceof
|
|
12219
|
+
})), a = !1) : r instanceof Ms || (this.fullReconnectOnNext = !0), a ? this.handleDisconnect("reconnect", Cs.RR_UNKNOWN) : (this.log.info("could not recover connection after ".concat(this.reconnectAttempts, " attempts, ").concat(Date.now() - this.reconnectStart, "ms. giving up"), this.logContext), this.emit(ce.Disconnected), yield this.close());
|
|
12220
12220
|
} finally {
|
|
12221
12221
|
this.attemptingReconnect = !1;
|
|
12222
12222
|
}
|
|
@@ -12243,15 +12243,15 @@ class I_ extends ri.EventEmitter {
|
|
|
12243
12243
|
let r;
|
|
12244
12244
|
try {
|
|
12245
12245
|
if (!this.signalOpts)
|
|
12246
|
-
throw this.log.warn("attempted connection restart, without signal options present", this.logContext), new
|
|
12246
|
+
throw this.log.warn("attempted connection restart, without signal options present", this.logContext), new Ms();
|
|
12247
12247
|
r = yield this.join(e ?? this.url, this.token, this.signalOpts);
|
|
12248
12248
|
} catch (a) {
|
|
12249
|
-
throw a instanceof mt && a.reason === Ke.NotAllowed ? new zt("could not reconnect, token might be expired") : new
|
|
12249
|
+
throw a instanceof mt && a.reason === Ke.NotAllowed ? new zt("could not reconnect, token might be expired") : new Ms();
|
|
12250
12250
|
}
|
|
12251
12251
|
if (this.shouldFailNext)
|
|
12252
12252
|
throw this.shouldFailNext = !1, new Error("simulated failure");
|
|
12253
12253
|
if (this.client.setReconnected(), this.emit(ce.SignalRestarted, r), yield this.waitForPCReconnected(), this.client.currentState !== Tt.CONNECTED)
|
|
12254
|
-
throw new
|
|
12254
|
+
throw new Ms("Signal connection got severed during reconnect");
|
|
12255
12255
|
(t = this.regionUrlProvider) === null || t === void 0 || t.resetAttempts(), this.emit(ce.Restarted);
|
|
12256
12256
|
} catch (r) {
|
|
12257
12257
|
const a = yield (n = this.regionUrlProvider) === null || n === void 0 ? void 0 : n.getNextBestRegionUrl();
|
|
@@ -12278,7 +12278,7 @@ class I_ extends ri.EventEmitter {
|
|
|
12278
12278
|
let r = "";
|
|
12279
12279
|
throw s instanceof Error && (r = s.message, this.log.error(s.message, Object.assign(Object.assign({}, this.logContext), {
|
|
12280
12280
|
error: s
|
|
12281
|
-
}))), s instanceof mt && s.reason === Ke.NotAllowed ? new zt("could not reconnect, token might be expired") : s instanceof mt && s.reason === Ke.LeaveRequest ? s : new
|
|
12281
|
+
}))), s instanceof mt && s.reason === Ke.NotAllowed ? new zt("could not reconnect, token might be expired") : s instanceof mt && s.reason === Ke.LeaveRequest ? s : new Ms(r);
|
|
12282
12282
|
}
|
|
12283
12283
|
if (this.emit(ce.SignalResumed), n) {
|
|
12284
12284
|
const s = this.makeRTCConfiguration(n);
|
|
@@ -12288,7 +12288,7 @@ class I_ extends ri.EventEmitter {
|
|
|
12288
12288
|
if (this.shouldFailNext)
|
|
12289
12289
|
throw this.shouldFailNext = !1, new Error("simulated failure");
|
|
12290
12290
|
if (yield this.pcManager.triggerIceRestart(), yield this.waitForPCReconnected(), this.client.currentState !== Tt.CONNECTED)
|
|
12291
|
-
throw new
|
|
12291
|
+
throw new Ms("Signal connection got severed during reconnect");
|
|
12292
12292
|
this.client.setReconnected(), ((t = this.reliableDC) === null || t === void 0 ? void 0 : t.readyState) === "open" && this.reliableDC.id === null && this.createDataChannels(), n != null && n.lastMessageSeq && this.resendReliableMessagesForResume(n.lastMessageSeq), this.emit(ce.Resumed);
|
|
12293
12293
|
});
|
|
12294
12294
|
}
|
|
@@ -12437,7 +12437,7 @@ class I_ extends ri.EventEmitter {
|
|
|
12437
12437
|
const n = new AbortController(), s = () => {
|
|
12438
12438
|
n.abort(), this.log.debug("engine disconnected while negotiation was ongoing", this.logContext), e();
|
|
12439
12439
|
};
|
|
12440
|
-
this.isClosed && t("cannot negotiate on closed engine"), this.on(ce.Closing, s), this.pcManager.publisher.once(
|
|
12440
|
+
this.isClosed && t("cannot negotiate on closed engine"), this.on(ce.Closing, s), this.pcManager.publisher.once(Ys.RTPVideoPayloadTypes, (r) => {
|
|
12441
12441
|
const a = /* @__PURE__ */ new Map();
|
|
12442
12442
|
r.forEach((o) => {
|
|
12443
12443
|
const c = o.codec.toLowerCase();
|
|
@@ -12447,7 +12447,7 @@ class I_ extends ri.EventEmitter {
|
|
|
12447
12447
|
try {
|
|
12448
12448
|
yield this.pcManager.negotiate(n), e();
|
|
12449
12449
|
} catch (r) {
|
|
12450
|
-
r instanceof Bc && (this.fullReconnectOnNext = !0), this.handleDisconnect("negotiation",
|
|
12450
|
+
r instanceof Bc && (this.fullReconnectOnNext = !0), this.handleDisconnect("negotiation", Cs.RR_UNKNOWN), t(r);
|
|
12451
12451
|
} finally {
|
|
12452
12452
|
this.off(ce.Closing, s);
|
|
12453
12453
|
}
|
|
@@ -12478,15 +12478,15 @@ class I_ extends ri.EventEmitter {
|
|
|
12478
12478
|
e.forEach((d) => {
|
|
12479
12479
|
d.isDesired !== o && c.push(d.trackSid), d.isEnabled || l.push(d.trackSid);
|
|
12480
12480
|
}), this.client.sendSyncState(new Jf({
|
|
12481
|
-
answer: r ?
|
|
12481
|
+
answer: r ? Ja({
|
|
12482
12482
|
sdp: r.sdp,
|
|
12483
12483
|
type: r.type
|
|
12484
12484
|
}) : void 0,
|
|
12485
|
-
offer: a ?
|
|
12485
|
+
offer: a ? Ja({
|
|
12486
12486
|
sdp: a.sdp,
|
|
12487
12487
|
type: a.type
|
|
12488
12488
|
}) : void 0,
|
|
12489
|
-
subscription: new
|
|
12489
|
+
subscription: new oo({
|
|
12490
12490
|
trackSids: c,
|
|
12491
12491
|
subscribe: !o,
|
|
12492
12492
|
participantTracks: []
|
|
@@ -12527,7 +12527,7 @@ class I_ extends ri.EventEmitter {
|
|
|
12527
12527
|
un() && window.removeEventListener("online", this.handleBrowserOnLine);
|
|
12528
12528
|
}
|
|
12529
12529
|
}
|
|
12530
|
-
class
|
|
12530
|
+
class Ms extends Error {
|
|
12531
12531
|
}
|
|
12532
12532
|
function D_(i) {
|
|
12533
12533
|
return i !== void 0 && i > 13;
|
|
@@ -12716,7 +12716,7 @@ class O_ extends Xp {
|
|
|
12716
12716
|
}
|
|
12717
12717
|
handleChunkReceived(e) {
|
|
12718
12718
|
var t;
|
|
12719
|
-
const n =
|
|
12719
|
+
const n = Oa(e.chunkIndex), s = this.receivedChunks.get(n);
|
|
12720
12720
|
if (s && s.version > e.version)
|
|
12721
12721
|
return;
|
|
12722
12722
|
this.receivedChunks.set(n, e), this.bytesReceived += e.content.byteLength, this.validateBytesReceived();
|
|
@@ -12893,7 +12893,7 @@ class F_ {
|
|
|
12893
12893
|
mimeType: e.mimeType,
|
|
12894
12894
|
size: e.totalLength ? Number(e.totalLength) : void 0,
|
|
12895
12895
|
topic: e.topic,
|
|
12896
|
-
timestamp:
|
|
12896
|
+
timestamp: Oa(e.timestamp),
|
|
12897
12897
|
attributes: e.attributes
|
|
12898
12898
|
}, c = new ReadableStream({
|
|
12899
12899
|
start: (l) => {
|
|
@@ -12908,7 +12908,7 @@ class F_ {
|
|
|
12908
12908
|
});
|
|
12909
12909
|
}
|
|
12910
12910
|
});
|
|
12911
|
-
s(new U_(o, c,
|
|
12911
|
+
s(new U_(o, c, Oa(e.totalLength), a), {
|
|
12912
12912
|
identity: t
|
|
12913
12913
|
});
|
|
12914
12914
|
} else if (e.contentHeader.case === "textHeader") {
|
|
@@ -12938,7 +12938,7 @@ class F_ {
|
|
|
12938
12938
|
});
|
|
12939
12939
|
}
|
|
12940
12940
|
});
|
|
12941
|
-
s(new O_(o, c,
|
|
12941
|
+
s(new O_(o, c, Oa(e.totalLength), a), {
|
|
12942
12942
|
identity: t
|
|
12943
12943
|
});
|
|
12944
12944
|
}
|
|
@@ -13298,7 +13298,7 @@ class G_ extends Yp {
|
|
|
13298
13298
|
return;
|
|
13299
13299
|
}
|
|
13300
13300
|
const o = yield this.getReceiverStats();
|
|
13301
|
-
o && this.prevStats && this.receiver && (this._currentBitrate =
|
|
13301
|
+
o && this.prevStats && this.receiver && (this._currentBitrate = uo(o, this.prevStats)), this.prevStats = o;
|
|
13302
13302
|
}), this.audioContext = s, this.webAudioPluginNodes = [], r && (this.sinkId = r.deviceId);
|
|
13303
13303
|
}
|
|
13304
13304
|
/**
|
|
@@ -13408,7 +13408,7 @@ class H_ extends Yp {
|
|
|
13408
13408
|
return;
|
|
13409
13409
|
}
|
|
13410
13410
|
const a = yield this.getReceiverStats();
|
|
13411
|
-
a && this.prevStats && this.receiver && (this._currentBitrate =
|
|
13411
|
+
a && this.prevStats && this.receiver && (this._currentBitrate = uo(a, this.prevStats)), this.prevStats = a;
|
|
13412
13412
|
}), this.debouncedHandleResize = bd(() => {
|
|
13413
13413
|
this.updateDimensions();
|
|
13414
13414
|
}, Ho), this.adaptiveStreamSettings = s;
|
|
@@ -13428,7 +13428,7 @@ class H_ extends Yp {
|
|
|
13428
13428
|
/** @internal */
|
|
13429
13429
|
setMuted(e) {
|
|
13430
13430
|
super.setMuted(e), this.attachedElements.forEach((t) => {
|
|
13431
|
-
e ?
|
|
13431
|
+
e ? Xs(this._mediaStreamTrack, t) : Hs(this._mediaStreamTrack, t);
|
|
13432
13432
|
});
|
|
13433
13433
|
}
|
|
13434
13434
|
attach(e) {
|
|
@@ -13568,14 +13568,14 @@ class W_ {
|
|
|
13568
13568
|
target: r,
|
|
13569
13569
|
isIntersecting: a
|
|
13570
13570
|
} = n;
|
|
13571
|
-
r === this.element && (this.isIntersecting = a, this.isPiP =
|
|
13571
|
+
r === this.element && (this.isIntersecting = a, this.isPiP = vr(this.element), this.visibilityChangedAt = Date.now(), (s = this.handleVisibilityChanged) === null || s === void 0 || s.call(this));
|
|
13572
13572
|
}, this.onEnterPiP = () => {
|
|
13573
13573
|
var n, s, r;
|
|
13574
|
-
(s = (n = window.documentPictureInPicture) === null || n === void 0 ? void 0 : n.window) === null || s === void 0 || s.addEventListener("pagehide", this.onLeavePiP), this.isPiP =
|
|
13574
|
+
(s = (n = window.documentPictureInPicture) === null || n === void 0 ? void 0 : n.window) === null || s === void 0 || s.addEventListener("pagehide", this.onLeavePiP), this.isPiP = vr(this.element), (r = this.handleVisibilityChanged) === null || r === void 0 || r.call(this);
|
|
13575
13575
|
}, this.onLeavePiP = () => {
|
|
13576
13576
|
var n;
|
|
13577
|
-
this.isPiP =
|
|
13578
|
-
}, this.element = e, this.isIntersecting = t ?? el(e), this.isPiP = un() &&
|
|
13577
|
+
this.isPiP = vr(this.element), (n = this.handleVisibilityChanged) === null || n === void 0 || n.call(this);
|
|
13578
|
+
}, this.element = e, this.isIntersecting = t ?? el(e), this.isPiP = un() && vr(e), this.visibilityChangedAt = 0;
|
|
13579
13579
|
}
|
|
13580
13580
|
width() {
|
|
13581
13581
|
return this.element.clientWidth;
|
|
@@ -13585,7 +13585,7 @@ class W_ {
|
|
|
13585
13585
|
}
|
|
13586
13586
|
observe() {
|
|
13587
13587
|
var e, t, n;
|
|
13588
|
-
this.isIntersecting = el(this.element), this.isPiP =
|
|
13588
|
+
this.isIntersecting = el(this.element), this.isPiP = vr(this.element), this.element.handleResize = () => {
|
|
13589
13589
|
var s;
|
|
13590
13590
|
(s = this.handleResize) === null || s === void 0 || s.call(this);
|
|
13591
13591
|
}, this.element.handleVisibilityChanged = this.onVisibilityChanged, zu().observe(this.element), Vu().observe(this.element), this.element.addEventListener("enterpictureinpicture", this.onEnterPiP), this.element.addEventListener("leavepictureinpicture", this.onLeavePiP), (e = window.documentPictureInPicture) === null || e === void 0 || e.addEventListener("enter", this.onEnterPiP), (n = (t = window.documentPictureInPicture) === null || t === void 0 ? void 0 : t.window) === null || n === void 0 || n.addEventListener("pagehide", this.onLeavePiP);
|
|
@@ -13595,7 +13595,7 @@ class W_ {
|
|
|
13595
13595
|
(e = zu()) === null || e === void 0 || e.unobserve(this.element), (t = Vu()) === null || t === void 0 || t.unobserve(this.element), this.element.removeEventListener("enterpictureinpicture", this.onEnterPiP), this.element.removeEventListener("leavepictureinpicture", this.onLeavePiP), (n = window.documentPictureInPicture) === null || n === void 0 || n.removeEventListener("enter", this.onEnterPiP), (r = (s = window.documentPictureInPicture) === null || s === void 0 ? void 0 : s.window) === null || r === void 0 || r.removeEventListener("pagehide", this.onLeavePiP);
|
|
13596
13596
|
}
|
|
13597
13597
|
}
|
|
13598
|
-
function
|
|
13598
|
+
function vr(i) {
|
|
13599
13599
|
var e, t;
|
|
13600
13600
|
return document.pictureInPictureElement === i ? !0 : !((e = window.documentPictureInPicture) === null || e === void 0) && e.window ? el(i, (t = window.documentPictureInPicture) === null || t === void 0 ? void 0 : t.window) : !1;
|
|
13601
13601
|
}
|
|
@@ -13745,7 +13745,7 @@ class tl extends mi {
|
|
|
13745
13745
|
} else return [];
|
|
13746
13746
|
}
|
|
13747
13747
|
}
|
|
13748
|
-
function
|
|
13748
|
+
function ho(i, e) {
|
|
13749
13749
|
return P(this, void 0, void 0, function* () {
|
|
13750
13750
|
i ?? (i = {});
|
|
13751
13751
|
let t = !1;
|
|
@@ -13801,7 +13801,7 @@ function fo(i, e) {
|
|
|
13801
13801
|
} catch (u) {
|
|
13802
13802
|
if (!t)
|
|
13803
13803
|
throw u;
|
|
13804
|
-
return
|
|
13804
|
+
return ho(Object.assign(Object.assign({}, i), {
|
|
13805
13805
|
audio: a,
|
|
13806
13806
|
video: o
|
|
13807
13807
|
}), e);
|
|
@@ -13810,7 +13810,7 @@ function fo(i, e) {
|
|
|
13810
13810
|
}
|
|
13811
13811
|
function q_(i) {
|
|
13812
13812
|
return P(this, void 0, void 0, function* () {
|
|
13813
|
-
return (yield
|
|
13813
|
+
return (yield ho({
|
|
13814
13814
|
audio: !1,
|
|
13815
13815
|
video: !0
|
|
13816
13816
|
}))[0];
|
|
@@ -13818,7 +13818,7 @@ function q_(i) {
|
|
|
13818
13818
|
}
|
|
13819
13819
|
function j_(i) {
|
|
13820
13820
|
return P(this, void 0, void 0, function* () {
|
|
13821
|
-
return (yield
|
|
13821
|
+
return (yield ho({
|
|
13822
13822
|
audio: !0,
|
|
13823
13823
|
video: !1
|
|
13824
13824
|
}))[0];
|
|
@@ -13830,13 +13830,13 @@ var zi;
|
|
|
13830
13830
|
})(zi || (zi = {}));
|
|
13831
13831
|
function X_(i) {
|
|
13832
13832
|
switch (i) {
|
|
13833
|
-
case
|
|
13833
|
+
case Cr.EXCELLENT:
|
|
13834
13834
|
return zi.Excellent;
|
|
13835
|
-
case
|
|
13835
|
+
case Cr.GOOD:
|
|
13836
13836
|
return zi.Good;
|
|
13837
|
-
case
|
|
13837
|
+
case Cr.POOR:
|
|
13838
13838
|
return zi.Poor;
|
|
13839
|
-
case
|
|
13839
|
+
case Cr.LOST:
|
|
13840
13840
|
return zi.Lost;
|
|
13841
13841
|
default:
|
|
13842
13842
|
return zi.Unknown;
|
|
@@ -13852,11 +13852,11 @@ class Kp extends ri.EventEmitter {
|
|
|
13852
13852
|
}
|
|
13853
13853
|
get isAgent() {
|
|
13854
13854
|
var e;
|
|
13855
|
-
return ((e = this.permissions) === null || e === void 0 ? void 0 : e.agent) || this.kind ===
|
|
13855
|
+
return ((e = this.permissions) === null || e === void 0 ? void 0 : e.agent) || this.kind === Vr.AGENT;
|
|
13856
13856
|
}
|
|
13857
13857
|
get isActive() {
|
|
13858
13858
|
var e;
|
|
13859
|
-
return ((e = this.participantInfo) === null || e === void 0 ? void 0 : e.state) ===
|
|
13859
|
+
return ((e = this.participantInfo) === null || e === void 0 ? void 0 : e.state) === Ws.ACTIVE;
|
|
13860
13860
|
}
|
|
13861
13861
|
get kind() {
|
|
13862
13862
|
return this._kind;
|
|
@@ -13867,7 +13867,7 @@ class Kp extends ri.EventEmitter {
|
|
|
13867
13867
|
}
|
|
13868
13868
|
/** @internal */
|
|
13869
13869
|
constructor(e, t, n, s, r, a) {
|
|
13870
|
-
let o = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] :
|
|
13870
|
+
let o = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : Vr.STANDARD;
|
|
13871
13871
|
var c;
|
|
13872
13872
|
super(), this.audioLevel = 0, this.isSpeaking = !1, this._connectionQuality = zi.Unknown, this.log = $e, this.log = Ei((c = a == null ? void 0 : a.loggerName) !== null && c !== void 0 ? c : Vn.Participant), this.loggerOptions = a, this.setMaxListeners(100), this.sid = e, this.identity = t, this.name = n, this.metadata = s, this.audioTrackPublications = /* @__PURE__ */ new Map(), this.videoTrackPublications = /* @__PURE__ */ new Map(), this.trackPublications = /* @__PURE__ */ new Map(), this._kind = o, this._attributes = r ?? {};
|
|
13873
13873
|
}
|
|
@@ -13927,7 +13927,7 @@ class Kp extends ri.EventEmitter {
|
|
|
13927
13927
|
/** @internal */
|
|
13928
13928
|
updateInfo(e) {
|
|
13929
13929
|
var t;
|
|
13930
|
-
return this.participantInfo && this.participantInfo.sid === e.sid && this.participantInfo.version > e.version ? !1 : (this.identity = e.identity, this.sid = e.sid, this._setName(e.name), this._setMetadata(e.metadata), this._setAttributes(e.attributes), e.state ===
|
|
13930
|
+
return this.participantInfo && this.participantInfo.sid === e.sid && this.participantInfo.version > e.version ? !1 : (this.identity = e.identity, this.sid = e.sid, this._setName(e.name), this._setMetadata(e.metadata), this._setAttributes(e.attributes), e.state === Ws.ACTIVE && ((t = this.participantInfo) === null || t === void 0 ? void 0 : t.state) !== Ws.ACTIVE && this.emit(oe.Active), e.permission && this.setPermissions(e.permission), this.participantInfo = e, !0);
|
|
13931
13931
|
}
|
|
13932
13932
|
/**
|
|
13933
13933
|
* Updates metadata from server
|
|
@@ -14384,7 +14384,7 @@ class Y_ extends Kp {
|
|
|
14384
14384
|
e ?? (e = {});
|
|
14385
14385
|
const s = Up(e, (t = this.roomOptions) === null || t === void 0 ? void 0 : t.audioCaptureDefaults, (n = this.roomOptions) === null || n === void 0 ? void 0 : n.videoCaptureDefaults);
|
|
14386
14386
|
try {
|
|
14387
|
-
return (yield
|
|
14387
|
+
return (yield ho(s, {
|
|
14388
14388
|
loggerName: this.roomOptions.loggerName,
|
|
14389
14389
|
loggerContextCb: () => this.logContext
|
|
14390
14390
|
})).map((o) => (Zn(o) && (this.microphoneError = void 0, o.setAudioContext(this.audioContext), o.source = J.Source.Microphone, this.emit(oe.AudioStreamAcquired)), Yi(o) && (this.cameraError = void 0, o.source = J.Source.Camera), o));
|
|
@@ -14406,7 +14406,7 @@ class Y_ extends Kp {
|
|
|
14406
14406
|
const t = G0(e), n = yield navigator.mediaDevices.getDisplayMedia(t), s = n.getVideoTracks();
|
|
14407
14407
|
if (s.length === 0)
|
|
14408
14408
|
throw new bi("no video track found");
|
|
14409
|
-
const r = new
|
|
14409
|
+
const r = new Qa(s[0], void 0, !1, {
|
|
14410
14410
|
loggerName: this.roomOptions.loggerName,
|
|
14411
14411
|
loggerContextCb: () => this.logContext
|
|
14412
14412
|
});
|
|
@@ -14414,7 +14414,7 @@ class Y_ extends Kp {
|
|
|
14414
14414
|
const a = [r];
|
|
14415
14415
|
if (n.getAudioTracks().length > 0) {
|
|
14416
14416
|
this.emit(oe.AudioStreamAcquired);
|
|
14417
|
-
const o = new
|
|
14417
|
+
const o = new Za(n.getAudioTracks()[0], void 0, !1, this.audioContext, {
|
|
14418
14418
|
loggerName: this.roomOptions.loggerName,
|
|
14419
14419
|
loggerContextCb: () => this.logContext
|
|
14420
14420
|
});
|
|
@@ -14439,7 +14439,7 @@ class Y_ extends Kp {
|
|
|
14439
14439
|
let a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
|
|
14440
14440
|
return function* () {
|
|
14441
14441
|
var o, c, l, d;
|
|
14442
|
-
hi(n) && n.setAudioContext(r.audioContext), yield (o = r.reconnectFuture) === null || o === void 0 ? void 0 : o.promise, r.republishPromise && !a && (yield r.republishPromise),
|
|
14442
|
+
hi(n) && n.setAudioContext(r.audioContext), yield (o = r.reconnectFuture) === null || o === void 0 ? void 0 : o.promise, r.republishPromise && !a && (yield r.republishPromise), $s(n) && r.pendingPublishPromises.has(n) && (yield r.pendingPublishPromises.get(n));
|
|
14443
14443
|
let u;
|
|
14444
14444
|
if (n instanceof MediaStreamTrack)
|
|
14445
14445
|
u = n.getConstraints();
|
|
@@ -14460,13 +14460,13 @@ class Y_ extends Kp {
|
|
|
14460
14460
|
if (n instanceof MediaStreamTrack)
|
|
14461
14461
|
switch (n.kind) {
|
|
14462
14462
|
case "audio":
|
|
14463
|
-
n = new
|
|
14463
|
+
n = new Za(n, u, !0, r.audioContext, {
|
|
14464
14464
|
loggerName: r.roomOptions.loggerName,
|
|
14465
14465
|
loggerContextCb: () => r.logContext
|
|
14466
14466
|
});
|
|
14467
14467
|
break;
|
|
14468
14468
|
case "video":
|
|
14469
|
-
n = new
|
|
14469
|
+
n = new Qa(n, u, !0, {
|
|
14470
14470
|
loggerName: r.roomOptions.loggerName,
|
|
14471
14471
|
loggerContextCb: () => r.logContext
|
|
14472
14472
|
});
|
|
@@ -14540,7 +14540,7 @@ class Y_ extends Kp {
|
|
|
14540
14540
|
var s, r, a, o, c, l, d, u, h, p;
|
|
14541
14541
|
if (!this.hasPermissionsToPublish(e))
|
|
14542
14542
|
throw new Lu("failed to publish track, insufficient permissions", 403);
|
|
14543
|
-
Array.from(this.trackPublications.values()).find((y) =>
|
|
14543
|
+
Array.from(this.trackPublications.values()).find((y) => $s(e) && y.source === e.source) && e.source !== J.Source.Unknown && this.log.info("publishing a second track with the same source: ".concat(e.source), Object.assign(Object.assign({}, this.logContext), Xe(e))), t.stopMicTrackOnMute && Zn(e) && (e.stopOnMute = !0), e.source === J.Source.ScreenShare && bs() && (t.simulcast = !1), t.videoCodec === "av1" && !C0() && (t.videoCodec = void 0), t.videoCodec === "vp9" && !M0() && (t.videoCodec = void 0), t.videoCodec === void 0 && (t.videoCodec = Kc), this.enabledPublishVideoCodecs.length > 0 && (this.enabledPublishVideoCodecs.some((y) => t.videoCodec === Lr(y.mime)) || (t.videoCodec = Lr(this.enabledPublishVideoCodecs[0].mime)));
|
|
14544
14544
|
const v = t.videoCodec;
|
|
14545
14545
|
e.on(re.Muted, this.onTrackMuted), e.on(re.Unmuted, this.onTrackUnmuted), e.on(re.Ended, this.handleTrackEnded), e.on(re.UpstreamPaused, this.onTrackUpstreamPaused), e.on(re.UpstreamResumed, this.onTrackUpstreamResumed), e.on(re.AudioTrackFeatureUpdate, this.onTrackFeatureUpdate);
|
|
14546
14546
|
const m = [], f = !(!((s = t.dtx) !== null && s !== void 0) || s), x = e.getSourceTrackSettings();
|
|
@@ -14569,7 +14569,7 @@ class Y_ extends Kp {
|
|
|
14569
14569
|
try {
|
|
14570
14570
|
y = yield e.waitForDimensions();
|
|
14571
14571
|
} catch {
|
|
14572
|
-
const R = (o = (a = this.roomOptions.videoCaptureDefaults) === null || a === void 0 ? void 0 : a.resolution) !== null && o !== void 0 ? o :
|
|
14572
|
+
const R = (o = (a = this.roomOptions.videoCaptureDefaults) === null || a === void 0 ? void 0 : a.resolution) !== null && o !== void 0 ? o : zr.h720.resolution;
|
|
14573
14573
|
y = {
|
|
14574
14574
|
width: R.width,
|
|
14575
14575
|
height: R.height
|
|
@@ -14639,7 +14639,7 @@ class Y_ extends Kp {
|
|
|
14639
14639
|
if (M.codecs.forEach((T) => {
|
|
14640
14640
|
y === void 0 && (y = T.mimeType);
|
|
14641
14641
|
}), y && e.kind === J.Kind.Video) {
|
|
14642
|
-
const T =
|
|
14642
|
+
const T = Lr(y);
|
|
14643
14643
|
T !== v && (this.log.debug("falling back to server selected codec", Object.assign(Object.assign(Object.assign({}, this.logContext), Xe(e)), {
|
|
14644
14644
|
codec: T
|
|
14645
14645
|
})), t.videoCodec = T, _ = Zc(e.source === J.Source.ScreenShare, E.width, E.height, t));
|
|
@@ -14765,7 +14765,7 @@ class Y_ extends Kp {
|
|
|
14765
14765
|
unpublishTrack(e, t) {
|
|
14766
14766
|
return P(this, void 0, void 0, function* () {
|
|
14767
14767
|
var n, s;
|
|
14768
|
-
if (
|
|
14768
|
+
if ($s(e)) {
|
|
14769
14769
|
const l = this.pendingPublishPromises.get(e);
|
|
14770
14770
|
l && (this.log.info("awaiting publish promise before attempting to unpublish", Object.assign(Object.assign({}, this.logContext), Xe(e))), yield l);
|
|
14771
14771
|
}
|
|
@@ -15152,7 +15152,7 @@ class K_ extends mi {
|
|
|
15152
15152
|
setSubscribed(e) {
|
|
15153
15153
|
const t = this.subscriptionStatus, n = this.permissionStatus;
|
|
15154
15154
|
this.subscribed = e, e && (this.allowed = !0);
|
|
15155
|
-
const s = new
|
|
15155
|
+
const s = new oo({
|
|
15156
15156
|
trackSids: [this.trackSid],
|
|
15157
15157
|
subscribe: this.subscribed,
|
|
15158
15158
|
participantTracks: [new Uf({
|
|
@@ -15282,10 +15282,10 @@ class K_ extends mi {
|
|
|
15282
15282
|
this.emit(re.UpdateSettings, e);
|
|
15283
15283
|
}
|
|
15284
15284
|
}
|
|
15285
|
-
class
|
|
15285
|
+
class eo extends Kp {
|
|
15286
15286
|
/** @internal */
|
|
15287
15287
|
static fromParticipantInfo(e, t, n) {
|
|
15288
|
-
return new
|
|
15288
|
+
return new eo(e, t.sid, t.identity, t.name, t.metadata, t.attributes, n, t.kind);
|
|
15289
15289
|
}
|
|
15290
15290
|
get logContext() {
|
|
15291
15291
|
return Object.assign(Object.assign({}, super.logContext), {
|
|
@@ -15295,7 +15295,7 @@ class to extends Kp {
|
|
|
15295
15295
|
}
|
|
15296
15296
|
/** @internal */
|
|
15297
15297
|
constructor(e, t, n, s, r, a, o) {
|
|
15298
|
-
let c = arguments.length > 7 && arguments[7] !== void 0 ? arguments[7] :
|
|
15298
|
+
let c = arguments.length > 7 && arguments[7] !== void 0 ? arguments[7] : Vr.STANDARD;
|
|
15299
15299
|
super(t, n || "", s, r, a, o, c), this.signalClient = e, this.trackPublications = /* @__PURE__ */ new Map(), this.audioTrackPublications = /* @__PURE__ */ new Map(), this.videoTrackPublications = /* @__PURE__ */ new Map(), this.volumeMap = /* @__PURE__ */ new Map();
|
|
15300
15300
|
}
|
|
15301
15301
|
addTrackPublication(e) {
|
|
@@ -15461,7 +15461,7 @@ var it;
|
|
|
15461
15461
|
i.Disconnected = "disconnected", i.Connecting = "connecting", i.Connected = "connected", i.Reconnecting = "reconnecting", i.SignalReconnecting = "signalReconnecting";
|
|
15462
15462
|
})(it || (it = {}));
|
|
15463
15463
|
const J_ = 4 * 1e3;
|
|
15464
|
-
class
|
|
15464
|
+
class tr extends ri.EventEmitter {
|
|
15465
15465
|
/**
|
|
15466
15466
|
* Creates a new Room, the primary construct for a LiveKit session.
|
|
15467
15467
|
* @param options
|
|
@@ -15669,7 +15669,7 @@ class nr extends ri.EventEmitter {
|
|
|
15669
15669
|
}
|
|
15670
15670
|
o.identity === "" && (o.identity = (c = this.sidToIdentity.get(o.sid)) !== null && c !== void 0 ? c : "");
|
|
15671
15671
|
let l = this.remoteParticipants.get(o.identity);
|
|
15672
|
-
o.state ===
|
|
15672
|
+
o.state === Ws.DISCONNECTED ? this.handleParticipantDisconnected(o.identity, l) : l = this.getOrCreateParticipant(o.identity, o);
|
|
15673
15673
|
});
|
|
15674
15674
|
}, this.handleActiveSpeakersUpdate = (a) => {
|
|
15675
15675
|
const o = [], c = {};
|
|
@@ -15810,7 +15810,7 @@ class nr extends ri.EventEmitter {
|
|
|
15810
15810
|
const a = new AbortController();
|
|
15811
15811
|
(r = navigator.mediaDevices) === null || r === void 0 || r.addEventListener("devicechange", this.handleDeviceChange, {
|
|
15812
15812
|
signal: a.signal
|
|
15813
|
-
}),
|
|
15813
|
+
}), tr.cleanupRegistry && tr.cleanupRegistry.register(this, () => {
|
|
15814
15814
|
a.abort();
|
|
15815
15815
|
});
|
|
15816
15816
|
}
|
|
@@ -16098,9 +16098,9 @@ class nr extends ri.EventEmitter {
|
|
|
16098
16098
|
}
|
|
16099
16099
|
}), n = () => P(this, void 0, void 0, function* () {
|
|
16100
16100
|
const r = this.engine.client.onLeave;
|
|
16101
|
-
r && r(new
|
|
16101
|
+
r && r(new co({
|
|
16102
16102
|
reason: Fn.CLIENT_INITIATED,
|
|
16103
|
-
action:
|
|
16103
|
+
action: qs.RECONNECT
|
|
16104
16104
|
}));
|
|
16105
16105
|
});
|
|
16106
16106
|
break;
|
|
@@ -16328,8 +16328,8 @@ class nr extends ri.EventEmitter {
|
|
|
16328
16328
|
yield this.switchActiveDevice(c, u[0].deviceId);
|
|
16329
16329
|
continue;
|
|
16330
16330
|
}
|
|
16331
|
-
c === "audioinput" && !
|
|
16332
|
-
(c !== "audiooutput" || !
|
|
16331
|
+
c === "audioinput" && !Gr() || c === "videoinput" || u.length > 0 && !u.find((p) => p.deviceId === this.getActiveDevice(c)) && // avoid switching audio output on safari without explicit user action as it leads to slowed down audio playback
|
|
16332
|
+
(c !== "audiooutput" || !Gr()) && (yield this.switchActiveDevice(c, u[0].deviceId));
|
|
16333
16333
|
}
|
|
16334
16334
|
});
|
|
16335
16335
|
}
|
|
@@ -16351,10 +16351,10 @@ class nr extends ri.EventEmitter {
|
|
|
16351
16351
|
createParticipant(e, t) {
|
|
16352
16352
|
var n;
|
|
16353
16353
|
let s;
|
|
16354
|
-
return t ? s =
|
|
16354
|
+
return t ? s = eo.fromParticipantInfo(this.engine.client, t, {
|
|
16355
16355
|
loggerContextCb: () => this.logContext,
|
|
16356
16356
|
loggerName: this.options.loggerName
|
|
16357
|
-
}) : s = new
|
|
16357
|
+
}) : s = new eo(this.engine.client, "", e, void 0, void 0, void 0, {
|
|
16358
16358
|
loggerContextCb: () => this.logContext,
|
|
16359
16359
|
loggerName: this.options.loggerName
|
|
16360
16360
|
}), this.options.webAudioMix && s.setAudioContext(this.audioContext), !((n = this.options.audioOutput) === null || n === void 0) && n.deviceId && s.setAudioOutput(this.options.audioOutput).catch((r) => this.log.warn("Could not set audio output: ".concat(r.message), this.logContext)), s;
|
|
@@ -16394,7 +16394,7 @@ class nr extends ri.EventEmitter {
|
|
|
16394
16394
|
}).on(oe.TrackSubscriptionPermissionChanged, (s, r) => {
|
|
16395
16395
|
this.emitWhenConnected(ne.TrackSubscriptionPermissionChanged, s, r, n);
|
|
16396
16396
|
}).on(oe.Active, () => {
|
|
16397
|
-
this.emitWhenConnected(ne.ParticipantActive, n), n.kind ===
|
|
16397
|
+
this.emitWhenConnected(ne.ParticipantActive, n), n.kind === Vr.AGENT && this.localParticipant.setActiveAgent(n);
|
|
16398
16398
|
}), t && n.updateInfo(t), n;
|
|
16399
16399
|
}
|
|
16400
16400
|
sendSyncState() {
|
|
@@ -16470,7 +16470,7 @@ class nr extends ri.EventEmitter {
|
|
|
16470
16470
|
video: !0,
|
|
16471
16471
|
aspectRatios: [1.66, 1.7, 1.3]
|
|
16472
16472
|
}, e.participants);
|
|
16473
|
-
if (this.handleDisconnect(), this.roomInfo = new
|
|
16473
|
+
if (this.handleDisconnect(), this.roomInfo = new ao({
|
|
16474
16474
|
sid: "RM_SIMULATED",
|
|
16475
16475
|
name: "simulated-room",
|
|
16476
16476
|
emptyTimeout: 0,
|
|
@@ -16486,12 +16486,12 @@ class nr extends ri.EventEmitter {
|
|
|
16486
16486
|
identity: "simulated-local",
|
|
16487
16487
|
name: "local-name"
|
|
16488
16488
|
})), this.setupLocalParticipantEvents(), this.emit(ne.SignalConnected), this.emit(ne.Connected), this.setAndEmitConnectionState(it.Connected), s.video) {
|
|
16489
|
-
const a = new tl(J.Kind.Video, new
|
|
16489
|
+
const a = new tl(J.Kind.Video, new Gs({
|
|
16490
16490
|
source: Ft.CAMERA,
|
|
16491
16491
|
sid: Math.floor(Math.random() * 1e4).toString(),
|
|
16492
16492
|
type: Ln.AUDIO,
|
|
16493
16493
|
name: "video-dummy"
|
|
16494
|
-
}), new
|
|
16494
|
+
}), new Qa(s.useRealTracks ? (yield window.navigator.mediaDevices.getUserMedia({
|
|
16495
16495
|
video: !0
|
|
16496
16496
|
})).getVideoTracks()[0] : Gu(160 * ((t = r.aspectRatios[0]) !== null && t !== void 0 ? t : 1), 160, !0, !0), void 0, !1, {
|
|
16497
16497
|
loggerName: this.options.loggerName,
|
|
@@ -16503,11 +16503,11 @@ class nr extends ri.EventEmitter {
|
|
|
16503
16503
|
this.localParticipant.addTrackPublication(a), this.localParticipant.emit(oe.LocalTrackPublished, a);
|
|
16504
16504
|
}
|
|
16505
16505
|
if (s.audio) {
|
|
16506
|
-
const a = new tl(J.Kind.Audio, new
|
|
16506
|
+
const a = new tl(J.Kind.Audio, new Gs({
|
|
16507
16507
|
source: Ft.MICROPHONE,
|
|
16508
16508
|
sid: Math.floor(Math.random() * 1e4).toString(),
|
|
16509
16509
|
type: Ln.AUDIO
|
|
16510
|
-
}), new
|
|
16510
|
+
}), new Za(s.useRealTracks ? (yield navigator.mediaDevices.getUserMedia({
|
|
16511
16511
|
audio: !0
|
|
16512
16512
|
})).getAudioTracks()[0] : No(), void 0, !1, this.audioContext, {
|
|
16513
16513
|
loggerName: this.options.loggerName,
|
|
@@ -16522,13 +16522,13 @@ class nr extends ri.EventEmitter {
|
|
|
16522
16522
|
let o = new vs({
|
|
16523
16523
|
sid: Math.floor(Math.random() * 1e4).toString(),
|
|
16524
16524
|
identity: "simulated-".concat(a),
|
|
16525
|
-
state:
|
|
16525
|
+
state: Ws.ACTIVE,
|
|
16526
16526
|
tracks: [],
|
|
16527
16527
|
joinedAt: wt.parse(Date.now())
|
|
16528
16528
|
});
|
|
16529
16529
|
const c = this.getOrCreateParticipant(o.identity, o);
|
|
16530
16530
|
if (r.video) {
|
|
16531
|
-
const l = Gu(160 * ((n = r.aspectRatios[a % r.aspectRatios.length]) !== null && n !== void 0 ? n : 1), 160, !1, !0), d = new
|
|
16531
|
+
const l = Gu(160 * ((n = r.aspectRatios[a % r.aspectRatios.length]) !== null && n !== void 0 ? n : 1), 160, !1, !0), d = new Gs({
|
|
16532
16532
|
source: Ft.CAMERA,
|
|
16533
16533
|
sid: Math.floor(Math.random() * 1e4).toString(),
|
|
16534
16534
|
type: Ln.AUDIO
|
|
@@ -16536,7 +16536,7 @@ class nr extends ri.EventEmitter {
|
|
|
16536
16536
|
c.addSubscribedMediaTrack(l, d.sid, new MediaStream([l]), new RTCRtpReceiver()), o.tracks = [...o.tracks, d];
|
|
16537
16537
|
}
|
|
16538
16538
|
if (r.audio) {
|
|
16539
|
-
const l = No(), d = new
|
|
16539
|
+
const l = No(), d = new Gs({
|
|
16540
16540
|
source: Ft.MICROPHONE,
|
|
16541
16541
|
sid: Math.floor(Math.random() * 1e4).toString(),
|
|
16542
16542
|
type: Ln.AUDIO
|
|
@@ -16561,7 +16561,7 @@ class nr extends ri.EventEmitter {
|
|
|
16561
16561
|
return super.emit(e, ...n);
|
|
16562
16562
|
}
|
|
16563
16563
|
}
|
|
16564
|
-
|
|
16564
|
+
tr.cleanupRegistry = typeof FinalizationRegistry < "u" && new FinalizationRegistry((i) => {
|
|
16565
16565
|
i();
|
|
16566
16566
|
});
|
|
16567
16567
|
function Jp(i) {
|
|
@@ -16577,7 +16577,7 @@ var Dn;
|
|
|
16577
16577
|
class Ki extends ri.EventEmitter {
|
|
16578
16578
|
constructor(e, t) {
|
|
16579
16579
|
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
16580
|
-
super(), this.status = Dn.IDLE, this.logs = [], this.options = {}, this.url = e, this.token = t, this.name = this.constructor.name, this.room = new
|
|
16580
|
+
super(), this.status = Dn.IDLE, this.logs = [], this.options = {}, this.url = e, this.token = t, this.name = this.constructor.name, this.room = new tr(n.roomOptions), this.connectOptions = n.connectOptions, this.options = n;
|
|
16581
16581
|
}
|
|
16582
16582
|
run(e) {
|
|
16583
16583
|
return P(this, void 0, void 0, function* () {
|
|
@@ -17084,7 +17084,7 @@ class Ed extends EventTarget {
|
|
|
17084
17084
|
}
|
|
17085
17085
|
this.updateStatus("connecting"), this.error = null, this.isReady = !1, this.room && (await this.room.disconnect(), this.room = null);
|
|
17086
17086
|
try {
|
|
17087
|
-
const n = new
|
|
17087
|
+
const n = new tr();
|
|
17088
17088
|
this.room = n, this.setupRoomEventListeners(n);
|
|
17089
17089
|
const s = await fetch(`${this.serviceUrl}/create-room-token`, {
|
|
17090
17090
|
method: "POST",
|
|
@@ -17272,17 +17272,17 @@ class Ed extends EventTarget {
|
|
|
17272
17272
|
* Copyright 2010-2025 Three.js Authors
|
|
17273
17273
|
* SPDX-License-Identifier: MIT
|
|
17274
17274
|
*/
|
|
17275
|
-
const Cd = "182", ob = 0, ch = 1, cb = 2,
|
|
17275
|
+
const Cd = "182", ob = 0, ch = 1, cb = 2, Fa = 1, lb = 2, wr = 3, Ci = 0, nn = 1, yi = 2, xi = 0, Ks = 1, nl = 2, lh = 3, dh = 4, db = 5, ls = 100, ub = 101, hb = 102, fb = 103, pb = 104, mb = 200, gb = 201, vb = 202, _b = 203, il = 204, sl = 205, bb = 206, yb = 207, Sb = 208, xb = 209, Tb = 210, Eb = 211, Cb = 212, Mb = 213, wb = 214, rl = 0, al = 1, ol = 2, nr = 3, cl = 4, ll = 5, dl = 6, ul = 7, Zp = 0, Ab = 1, Rb = 2, Qn = 0, Qp = 1, em = 2, tm = 3, nm = 4, im = 5, sm = 6, rm = 7, am = 300, Ss = 301, ir = 302, hl = 303, fl = 304, fo = 306, pl = 1e3, Si = 1001, ml = 1002, Yt = 1003, Pb = 1004, ia = 1005, Qt = 1006, qo = 1007, hs = 1008, Mn = 1009, om = 1010, cm = 1011, Hr = 1012, Md = 1013, si = 1014, Kn = 1015, Mi = 1016, wd = 1017, Ad = 1018, Wr = 1020, lm = 35902, dm = 35899, um = 1021, hm = 1022, Bn = 1023, wi = 1026, fs = 1027, fm = 1028, Rd = 1029, sr = 1030, Pd = 1031, kd = 1033, Ba = 33776, Va = 33777, za = 33778, Ga = 33779, gl = 35840, vl = 35841, _l = 35842, bl = 35843, yl = 36196, Sl = 37492, xl = 37496, Tl = 37488, El = 37489, Cl = 37490, Ml = 37491, wl = 37808, Al = 37809, Rl = 37810, Pl = 37811, kl = 37812, Il = 37813, Dl = 37814, Ll = 37815, Nl = 37816, Ul = 37817, Ol = 37818, Fl = 37819, Bl = 37820, Vl = 37821, zl = 36492, Gl = 36494, Hl = 36495, Wl = 36283, ql = 36284, jl = 36285, Xl = 36286, kb = 3200, Ib = 0, Db = 1, Gi = "", En = "srgb", rr = "srgb-linear", to = "linear", lt = "srgb", ws = 7680, uh = 519, Lb = 512, Nb = 513, Ub = 514, Id = 515, Ob = 516, Fb = 517, Dd = 518, Bb = 519, hh = 35044, fh = "300 es", Jn = 2e3, no = 2001;
|
|
17276
17276
|
function pm(i) {
|
|
17277
17277
|
for (let e = i.length - 1; e >= 0; --e)
|
|
17278
17278
|
if (i[e] >= 65535) return !0;
|
|
17279
17279
|
return !1;
|
|
17280
17280
|
}
|
|
17281
|
-
function
|
|
17281
|
+
function io(i) {
|
|
17282
17282
|
return document.createElementNS("http://www.w3.org/1999/xhtml", i);
|
|
17283
17283
|
}
|
|
17284
17284
|
function Vb() {
|
|
17285
|
-
const i =
|
|
17285
|
+
const i = io("canvas");
|
|
17286
17286
|
return i.style.display = "block", i;
|
|
17287
17287
|
}
|
|
17288
17288
|
const ph = {};
|
|
@@ -17298,7 +17298,7 @@ function nt(...i) {
|
|
|
17298
17298
|
const e = "THREE." + i.shift();
|
|
17299
17299
|
console.error(e, ...i);
|
|
17300
17300
|
}
|
|
17301
|
-
function
|
|
17301
|
+
function qr(...i) {
|
|
17302
17302
|
const e = i.join(" ");
|
|
17303
17303
|
e in ph || (ph[e] = !0, Oe(...i));
|
|
17304
17304
|
}
|
|
@@ -17319,7 +17319,7 @@ function zb(i, e, t) {
|
|
|
17319
17319
|
setTimeout(r, t);
|
|
17320
17320
|
});
|
|
17321
17321
|
}
|
|
17322
|
-
class
|
|
17322
|
+
class cr {
|
|
17323
17323
|
/**
|
|
17324
17324
|
* Adds the given event listener to the given event type.
|
|
17325
17325
|
*
|
|
@@ -17376,7 +17376,7 @@ class lr {
|
|
|
17376
17376
|
}
|
|
17377
17377
|
}
|
|
17378
17378
|
const Kt = ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "0a", "0b", "0c", "0d", "0e", "0f", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "1a", "1b", "1c", "1d", "1e", "1f", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "2a", "2b", "2c", "2d", "2e", "2f", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "3a", "3b", "3c", "3d", "3e", "3f", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "4a", "4b", "4c", "4d", "4e", "4f", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "5a", "5b", "5c", "5d", "5e", "5f", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "6a", "6b", "6c", "6d", "6e", "6f", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "7a", "7b", "7c", "7d", "7e", "7f", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "8a", "8b", "8c", "8d", "8e", "8f", "90", "91", "92", "93", "94", "95", "96", "97", "98", "99", "9a", "9b", "9c", "9d", "9e", "9f", "a0", "a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "aa", "ab", "ac", "ad", "ae", "af", "b0", "b1", "b2", "b3", "b4", "b5", "b6", "b7", "b8", "b9", "ba", "bb", "bc", "bd", "be", "bf", "c0", "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "ca", "cb", "cc", "cd", "ce", "cf", "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8", "d9", "da", "db", "dc", "dd", "de", "df", "e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7", "e8", "e9", "ea", "eb", "ec", "ed", "ee", "ef", "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9", "fa", "fb", "fc", "fd", "fe", "ff"], jo = Math.PI / 180, $l = 180 / Math.PI;
|
|
17379
|
-
function
|
|
17379
|
+
function Yr() {
|
|
17380
17380
|
const i = Math.random() * 4294967295 | 0, e = Math.random() * 4294967295 | 0, t = Math.random() * 4294967295 | 0, n = Math.random() * 4294967295 | 0;
|
|
17381
17381
|
return (Kt[i & 255] + Kt[i >> 8 & 255] + Kt[i >> 16 & 255] + Kt[i >> 24 & 255] + "-" + Kt[e & 255] + Kt[e >> 8 & 255] + "-" + Kt[e >> 16 & 15 | 64] + Kt[e >> 24 & 255] + "-" + Kt[t & 63 | 128] + Kt[t >> 8 & 255] + "-" + Kt[t >> 16 & 255] + Kt[t >> 24 & 255] + Kt[n & 255] + Kt[n >> 8 & 255] + Kt[n >> 16 & 255] + Kt[n >> 24 & 255]).toLowerCase();
|
|
17382
17382
|
}
|
|
@@ -17389,7 +17389,7 @@ function Gb(i, e) {
|
|
|
17389
17389
|
function Xo(i, e, t) {
|
|
17390
17390
|
return (1 - t) * i + t * e;
|
|
17391
17391
|
}
|
|
17392
|
-
function
|
|
17392
|
+
function _r(i, e) {
|
|
17393
17393
|
switch (e.constructor) {
|
|
17394
17394
|
case Float32Array:
|
|
17395
17395
|
return i;
|
|
@@ -17968,7 +17968,7 @@ class st {
|
|
|
17968
17968
|
yield this.x, yield this.y;
|
|
17969
17969
|
}
|
|
17970
17970
|
}
|
|
17971
|
-
class
|
|
17971
|
+
class Kr {
|
|
17972
17972
|
/**
|
|
17973
17973
|
* Constructs a new quaternion.
|
|
17974
17974
|
*
|
|
@@ -19173,7 +19173,7 @@ class B {
|
|
|
19173
19173
|
yield this.x, yield this.y, yield this.z;
|
|
19174
19174
|
}
|
|
19175
19175
|
}
|
|
19176
|
-
const $o = /* @__PURE__ */ new B(), gh = /* @__PURE__ */ new
|
|
19176
|
+
const $o = /* @__PURE__ */ new B(), gh = /* @__PURE__ */ new Kr();
|
|
19177
19177
|
class ze {
|
|
19178
19178
|
/**
|
|
19179
19179
|
* Constructs a new 3x3 matrix. The arguments are supposed to be
|
|
@@ -19568,7 +19568,7 @@ const Yo = /* @__PURE__ */ new ze(), vh = /* @__PURE__ */ new ze().set(
|
|
|
19568
19568
|
function Hb() {
|
|
19569
19569
|
const i = {
|
|
19570
19570
|
enabled: !0,
|
|
19571
|
-
workingColorSpace:
|
|
19571
|
+
workingColorSpace: rr,
|
|
19572
19572
|
/**
|
|
19573
19573
|
* Implementations of supported color spaces.
|
|
19574
19574
|
*
|
|
@@ -19589,7 +19589,7 @@ function Hb() {
|
|
|
19589
19589
|
*/
|
|
19590
19590
|
spaces: {},
|
|
19591
19591
|
convert: function(s, r, a) {
|
|
19592
|
-
return this.enabled === !1 || r === a || !r || !a || (this.spaces[r].transfer === lt && (s.r = Ti(s.r), s.g = Ti(s.g), s.b = Ti(s.b)), this.spaces[r].primaries !== this.spaces[a].primaries && (s.applyMatrix3(this.spaces[r].toXYZ), s.applyMatrix3(this.spaces[a].fromXYZ)), this.spaces[a].transfer === lt && (s.r =
|
|
19592
|
+
return this.enabled === !1 || r === a || !r || !a || (this.spaces[r].transfer === lt && (s.r = Ti(s.r), s.g = Ti(s.g), s.b = Ti(s.b)), this.spaces[r].primaries !== this.spaces[a].primaries && (s.applyMatrix3(this.spaces[r].toXYZ), s.applyMatrix3(this.spaces[a].fromXYZ)), this.spaces[a].transfer === lt && (s.r = Js(s.r), s.g = Js(s.g), s.b = Js(s.b))), s;
|
|
19593
19593
|
},
|
|
19594
19594
|
workingToColorSpace: function(s, r) {
|
|
19595
19595
|
return this.convert(s, this.workingColorSpace, r);
|
|
@@ -19601,7 +19601,7 @@ function Hb() {
|
|
|
19601
19601
|
return this.spaces[s].primaries;
|
|
19602
19602
|
},
|
|
19603
19603
|
getTransfer: function(s) {
|
|
19604
|
-
return s === Gi ?
|
|
19604
|
+
return s === Gi ? to : this.spaces[s].transfer;
|
|
19605
19605
|
},
|
|
19606
19606
|
getToneMappingMode: function(s) {
|
|
19607
19607
|
return this.spaces[s].outputColorSpaceConfig.toneMappingMode || "standard";
|
|
@@ -19624,17 +19624,17 @@ function Hb() {
|
|
|
19624
19624
|
},
|
|
19625
19625
|
// Deprecated
|
|
19626
19626
|
fromWorkingColorSpace: function(s, r) {
|
|
19627
|
-
return
|
|
19627
|
+
return qr("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."), i.workingToColorSpace(s, r);
|
|
19628
19628
|
},
|
|
19629
19629
|
toWorkingColorSpace: function(s, r) {
|
|
19630
|
-
return
|
|
19630
|
+
return qr("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."), i.colorSpaceToWorking(s, r);
|
|
19631
19631
|
}
|
|
19632
19632
|
}, e = [0.64, 0.33, 0.3, 0.6, 0.15, 0.06], t = [0.2126, 0.7152, 0.0722], n = [0.3127, 0.329];
|
|
19633
19633
|
return i.define({
|
|
19634
|
-
[
|
|
19634
|
+
[rr]: {
|
|
19635
19635
|
primaries: e,
|
|
19636
19636
|
whitePoint: n,
|
|
19637
|
-
transfer:
|
|
19637
|
+
transfer: to,
|
|
19638
19638
|
toXYZ: vh,
|
|
19639
19639
|
fromXYZ: _h,
|
|
19640
19640
|
luminanceCoefficients: t,
|
|
@@ -19656,10 +19656,10 @@ const Qe = /* @__PURE__ */ Hb();
|
|
|
19656
19656
|
function Ti(i) {
|
|
19657
19657
|
return i < 0.04045 ? i * 0.0773993808 : Math.pow(i * 0.9478672986 + 0.0521327014, 2.4);
|
|
19658
19658
|
}
|
|
19659
|
-
function
|
|
19659
|
+
function Js(i) {
|
|
19660
19660
|
return i < 31308e-7 ? i * 12.92 : 1.055 * Math.pow(i, 0.41666) - 0.055;
|
|
19661
19661
|
}
|
|
19662
|
-
let
|
|
19662
|
+
let As;
|
|
19663
19663
|
class Wb {
|
|
19664
19664
|
/**
|
|
19665
19665
|
* Returns a data URI containing a representation of the given image.
|
|
@@ -19675,9 +19675,9 @@ class Wb {
|
|
|
19675
19675
|
if (e instanceof HTMLCanvasElement)
|
|
19676
19676
|
n = e;
|
|
19677
19677
|
else {
|
|
19678
|
-
|
|
19679
|
-
const s =
|
|
19680
|
-
e instanceof ImageData ? s.putImageData(e, 0, 0) : s.drawImage(e, 0, 0, e.width, e.height), n =
|
|
19678
|
+
As === void 0 && (As = io("canvas")), As.width = e.width, As.height = e.height;
|
|
19679
|
+
const s = As.getContext("2d");
|
|
19680
|
+
e instanceof ImageData ? s.putImageData(e, 0, 0) : s.drawImage(e, 0, 0, e.width, e.height), n = As;
|
|
19681
19681
|
}
|
|
19682
19682
|
return n.toDataURL(t);
|
|
19683
19683
|
}
|
|
@@ -19689,7 +19689,7 @@ class Wb {
|
|
|
19689
19689
|
*/
|
|
19690
19690
|
static sRGBToLinear(e) {
|
|
19691
19691
|
if (typeof HTMLImageElement < "u" && e instanceof HTMLImageElement || typeof HTMLCanvasElement < "u" && e instanceof HTMLCanvasElement || typeof ImageBitmap < "u" && e instanceof ImageBitmap) {
|
|
19692
|
-
const t =
|
|
19692
|
+
const t = io("canvas");
|
|
19693
19693
|
t.width = e.width, t.height = e.height;
|
|
19694
19694
|
const n = t.getContext("2d");
|
|
19695
19695
|
n.drawImage(e, 0, 0, e.width, e.height);
|
|
@@ -19718,7 +19718,7 @@ class Ld {
|
|
|
19718
19718
|
* @param {any} [data=null] - The data definition of a texture.
|
|
19719
19719
|
*/
|
|
19720
19720
|
constructor(e = null) {
|
|
19721
|
-
this.isSource = !0, Object.defineProperty(this, "id", { value: qb++ }), this.uuid =
|
|
19721
|
+
this.isSource = !0, Object.defineProperty(this, "id", { value: qb++ }), this.uuid = Yr(), this.data = e, this.dataReady = !0, this.version = 0;
|
|
19722
19722
|
}
|
|
19723
19723
|
/**
|
|
19724
19724
|
* Returns the dimensions of the source into the given target vector.
|
|
@@ -19780,7 +19780,7 @@ function Ko(i) {
|
|
|
19780
19780
|
}
|
|
19781
19781
|
let jb = 0;
|
|
19782
19782
|
const Jo = /* @__PURE__ */ new B();
|
|
19783
|
-
class sn extends
|
|
19783
|
+
class sn extends cr {
|
|
19784
19784
|
/**
|
|
19785
19785
|
* Constructs a new texture.
|
|
19786
19786
|
*
|
|
@@ -19796,7 +19796,7 @@ class sn extends lr {
|
|
|
19796
19796
|
* @param {string} [colorSpace=NoColorSpace] - The color space.
|
|
19797
19797
|
*/
|
|
19798
19798
|
constructor(e = sn.DEFAULT_IMAGE, t = sn.DEFAULT_MAPPING, n = Si, s = Si, r = Qt, a = hs, o = Bn, c = Mn, l = sn.DEFAULT_ANISOTROPY, d = Gi) {
|
|
19799
|
-
super(), this.isTexture = !0, Object.defineProperty(this, "id", { value: jb++ }), this.uuid =
|
|
19799
|
+
super(), this.isTexture = !0, Object.defineProperty(this, "id", { value: jb++ }), this.uuid = Yr(), this.name = "", this.source = new Ld(e), this.mipmaps = [], this.mapping = t, this.channel = 0, this.wrapS = n, this.wrapT = s, this.magFilter = r, this.minFilter = a, this.anisotropy = l, this.format = o, this.internalFormat = null, this.type = c, this.offset = new st(0, 0), this.repeat = new st(1, 1), this.center = new st(0, 0), this.rotation = 0, this.matrixAutoUpdate = !0, this.matrix = new ze(), this.generateMipmaps = !0, this.premultiplyAlpha = !1, this.flipY = !0, this.unpackAlignment = 4, this.colorSpace = d, this.userData = {}, this.updateRanges = [], this.version = 0, this.onUpdate = null, this.renderTarget = null, this.isRenderTargetTexture = !1, this.isArrayTexture = !!(e && e.depth && e.depth > 1), this.pmremVersion = 0;
|
|
19800
19800
|
}
|
|
19801
19801
|
/**
|
|
19802
19802
|
* The width of the texture in pixels.
|
|
@@ -20541,7 +20541,7 @@ class Lt {
|
|
|
20541
20541
|
yield this.x, yield this.y, yield this.z, yield this.w;
|
|
20542
20542
|
}
|
|
20543
20543
|
}
|
|
20544
|
-
class Xb extends
|
|
20544
|
+
class Xb extends cr {
|
|
20545
20545
|
/**
|
|
20546
20546
|
* Render target options.
|
|
20547
20547
|
*
|
|
@@ -20738,7 +20738,7 @@ class $b extends sn {
|
|
|
20738
20738
|
super(null), this.isData3DTexture = !0, this.image = { data: e, width: t, height: n, depth: s }, this.magFilter = Yt, this.minFilter = Yt, this.wrapR = Si, this.generateMipmaps = !1, this.flipY = !1, this.unpackAlignment = 1;
|
|
20739
20739
|
}
|
|
20740
20740
|
}
|
|
20741
|
-
class
|
|
20741
|
+
class Jr {
|
|
20742
20742
|
/**
|
|
20743
20743
|
* Constructs a new bounding box.
|
|
20744
20744
|
*
|
|
@@ -20928,7 +20928,7 @@ class Zr {
|
|
|
20928
20928
|
for (let a = 0, o = r.count; a < o; a++)
|
|
20929
20929
|
e.isMesh === !0 ? e.getVertexPosition(a, Rn) : Rn.fromBufferAttribute(r, a), Rn.applyMatrix4(e.matrixWorld), this.expandByPoint(Rn);
|
|
20930
20930
|
else
|
|
20931
|
-
e.boundingBox !== void 0 ? (e.boundingBox === null && e.computeBoundingBox(),
|
|
20931
|
+
e.boundingBox !== void 0 ? (e.boundingBox === null && e.computeBoundingBox(), sa.copy(e.boundingBox)) : (n.boundingBox === null && n.computeBoundingBox(), sa.copy(n.boundingBox)), sa.applyMatrix4(e.matrixWorld), this.union(sa);
|
|
20932
20932
|
}
|
|
20933
20933
|
const s = e.children;
|
|
20934
20934
|
for (let r = 0, a = s.length; r < a; r++)
|
|
@@ -21005,7 +21005,7 @@ class Zr {
|
|
|
21005
21005
|
intersectsTriangle(e) {
|
|
21006
21006
|
if (this.isEmpty())
|
|
21007
21007
|
return !1;
|
|
21008
|
-
this.getCenter(
|
|
21008
|
+
this.getCenter(br), ra.subVectors(this.max, br), Rs.subVectors(e.a, br), Ps.subVectors(e.b, br), ks.subVectors(e.c, br), Ii.subVectors(Ps, Rs), Di.subVectors(ks, Ps), es.subVectors(Rs, ks);
|
|
21009
21009
|
let t = [
|
|
21010
21010
|
0,
|
|
21011
21011
|
-Ii.z,
|
|
@@ -21035,7 +21035,7 @@ class Zr {
|
|
|
21035
21035
|
es.x,
|
|
21036
21036
|
0
|
|
21037
21037
|
];
|
|
21038
|
-
return !Zo(t, Ps, ks,
|
|
21038
|
+
return !Zo(t, Rs, Ps, ks, ra) || (t = [1, 0, 0, 0, 1, 0, 0, 0, 1], !Zo(t, Rs, Ps, ks, ra)) ? !1 : (aa.crossVectors(Ii, Di), t = [aa.x, aa.y, aa.z], Zo(t, Rs, Ps, ks, ra));
|
|
21039
21039
|
}
|
|
21040
21040
|
/**
|
|
21041
21041
|
* Clamps the given point within the bounds of this box.
|
|
@@ -21147,7 +21147,7 @@ const oi = [
|
|
|
21147
21147
|
/* @__PURE__ */ new B(),
|
|
21148
21148
|
/* @__PURE__ */ new B(),
|
|
21149
21149
|
/* @__PURE__ */ new B()
|
|
21150
|
-
], Rn = /* @__PURE__ */ new B(),
|
|
21150
|
+
], Rn = /* @__PURE__ */ new B(), sa = /* @__PURE__ */ new Jr(), Rs = /* @__PURE__ */ new B(), Ps = /* @__PURE__ */ new B(), ks = /* @__PURE__ */ new B(), Ii = /* @__PURE__ */ new B(), Di = /* @__PURE__ */ new B(), es = /* @__PURE__ */ new B(), br = /* @__PURE__ */ new B(), ra = /* @__PURE__ */ new B(), aa = /* @__PURE__ */ new B(), ts = /* @__PURE__ */ new B();
|
|
21151
21151
|
function Zo(i, e, t, n, s) {
|
|
21152
21152
|
for (let r = 0, a = i.length - 3; r <= a; r += 3) {
|
|
21153
21153
|
ts.fromArray(i, r);
|
|
@@ -21157,7 +21157,7 @@ function Zo(i, e, t, n, s) {
|
|
|
21157
21157
|
}
|
|
21158
21158
|
return !0;
|
|
21159
21159
|
}
|
|
21160
|
-
const Yb = /* @__PURE__ */ new
|
|
21160
|
+
const Yb = /* @__PURE__ */ new Jr(), yr = /* @__PURE__ */ new B(), Qo = /* @__PURE__ */ new B();
|
|
21161
21161
|
class Nd {
|
|
21162
21162
|
/**
|
|
21163
21163
|
* Constructs a new sphere.
|
|
@@ -21322,11 +21322,11 @@ class Nd {
|
|
|
21322
21322
|
expandByPoint(e) {
|
|
21323
21323
|
if (this.isEmpty())
|
|
21324
21324
|
return this.center.copy(e), this.radius = 0, this;
|
|
21325
|
-
|
|
21326
|
-
const t =
|
|
21325
|
+
yr.subVectors(e, this.center);
|
|
21326
|
+
const t = yr.lengthSq();
|
|
21327
21327
|
if (t > this.radius * this.radius) {
|
|
21328
21328
|
const n = Math.sqrt(t), s = (n - this.radius) * 0.5;
|
|
21329
|
-
this.center.addScaledVector(
|
|
21329
|
+
this.center.addScaledVector(yr, s / n), this.radius += s;
|
|
21330
21330
|
}
|
|
21331
21331
|
return this;
|
|
21332
21332
|
}
|
|
@@ -21337,7 +21337,7 @@ class Nd {
|
|
|
21337
21337
|
* @return {Sphere} A reference to this sphere.
|
|
21338
21338
|
*/
|
|
21339
21339
|
union(e) {
|
|
21340
|
-
return e.isEmpty() ? this : this.isEmpty() ? (this.copy(e), this) : (this.center.equals(e.center) === !0 ? this.radius = Math.max(this.radius, e.radius) : (Qo.subVectors(e.center, this.center).setLength(e.radius), this.expandByPoint(
|
|
21340
|
+
return e.isEmpty() ? this : this.isEmpty() ? (this.copy(e), this) : (this.center.equals(e.center) === !0 ? this.radius = Math.max(this.radius, e.radius) : (Qo.subVectors(e.center, this.center).setLength(e.radius), this.expandByPoint(yr.copy(e.center).add(Qo)), this.expandByPoint(yr.copy(e.center).sub(Qo))), this);
|
|
21341
21341
|
}
|
|
21342
21342
|
/**
|
|
21343
21343
|
* Returns `true` if this sphere is equal with the given one.
|
|
@@ -21377,7 +21377,7 @@ class Nd {
|
|
|
21377
21377
|
return this.radius = e.radius, this.center.fromArray(e.center), this;
|
|
21378
21378
|
}
|
|
21379
21379
|
}
|
|
21380
|
-
const ci = /* @__PURE__ */ new B(), ec = /* @__PURE__ */ new B(),
|
|
21380
|
+
const ci = /* @__PURE__ */ new B(), ec = /* @__PURE__ */ new B(), oa = /* @__PURE__ */ new B(), Li = /* @__PURE__ */ new B(), tc = /* @__PURE__ */ new B(), ca = /* @__PURE__ */ new B(), nc = /* @__PURE__ */ new B();
|
|
21381
21381
|
class Kb {
|
|
21382
21382
|
/**
|
|
21383
21383
|
* Constructs a new ray.
|
|
@@ -21476,8 +21476,8 @@ class Kb {
|
|
|
21476
21476
|
* @return {number} The squared distance.
|
|
21477
21477
|
*/
|
|
21478
21478
|
distanceSqToSegment(e, t, n, s) {
|
|
21479
|
-
ec.copy(e).add(t).multiplyScalar(0.5),
|
|
21480
|
-
const r = e.distanceTo(t) * 0.5, a = -this.direction.dot(
|
|
21479
|
+
ec.copy(e).add(t).multiplyScalar(0.5), oa.copy(t).sub(e).normalize(), Li.copy(this.origin).sub(ec);
|
|
21480
|
+
const r = e.distanceTo(t) * 0.5, a = -this.direction.dot(oa), o = Li.dot(this.direction), c = -Li.dot(oa), l = Li.lengthSq(), d = Math.abs(1 - a * a);
|
|
21481
21481
|
let u, h, p, g;
|
|
21482
21482
|
if (d > 0)
|
|
21483
21483
|
if (u = a * c - o, h = a * o - c, g = r * d, u >= 0)
|
|
@@ -21493,7 +21493,7 @@ class Kb {
|
|
|
21493
21493
|
h <= -g ? (u = Math.max(0, -(-a * r + o)), h = u > 0 ? -r : Math.min(Math.max(-r, -c), r), p = -u * u + h * (h + 2 * c) + l) : h <= g ? (u = 0, h = Math.min(Math.max(-r, -c), r), p = h * (h + 2 * c) + l) : (u = Math.max(0, -(a * r + o)), h = u > 0 ? r : Math.min(Math.max(-r, -c), r), p = -u * u + h * (h + 2 * c) + l);
|
|
21494
21494
|
else
|
|
21495
21495
|
h = a > 0 ? -r : r, u = Math.max(0, -(a * h + o)), p = -u * u + h * (h + 2 * c) + l;
|
|
21496
|
-
return n && n.copy(this.origin).addScaledVector(this.direction, u), s && s.copy(ec).addScaledVector(
|
|
21496
|
+
return n && n.copy(this.origin).addScaledVector(this.direction, u), s && s.copy(ec).addScaledVector(oa, h), p;
|
|
21497
21497
|
}
|
|
21498
21498
|
/**
|
|
21499
21499
|
* Intersects this ray with the given sphere, returning the intersection
|
|
@@ -21589,7 +21589,7 @@ class Kb {
|
|
|
21589
21589
|
* @return {?Vector3} The intersection point.
|
|
21590
21590
|
*/
|
|
21591
21591
|
intersectTriangle(e, t, n, s, r) {
|
|
21592
|
-
tc.subVectors(t, e),
|
|
21592
|
+
tc.subVectors(t, e), ca.subVectors(n, e), nc.crossVectors(tc, ca);
|
|
21593
21593
|
let a = this.direction.dot(nc), o;
|
|
21594
21594
|
if (a > 0) {
|
|
21595
21595
|
if (s) return null;
|
|
@@ -21599,7 +21599,7 @@ class Kb {
|
|
|
21599
21599
|
else
|
|
21600
21600
|
return null;
|
|
21601
21601
|
Li.subVectors(this.origin, e);
|
|
21602
|
-
const c = o * this.direction.dot(
|
|
21602
|
+
const c = o * this.direction.dot(ca.crossVectors(Li, ca));
|
|
21603
21603
|
if (c < 0)
|
|
21604
21604
|
return null;
|
|
21605
21605
|
const l = o * this.direction.dot(tc.cross(Li));
|
|
@@ -21836,7 +21836,7 @@ class Vt {
|
|
|
21836
21836
|
extractRotation(e) {
|
|
21837
21837
|
if (e.determinant() === 0)
|
|
21838
21838
|
return this.identity();
|
|
21839
|
-
const t = this.elements, n = e.elements, s = 1 /
|
|
21839
|
+
const t = this.elements, n = e.elements, s = 1 / Is.setFromMatrixColumn(e, 0).length(), r = 1 / Is.setFromMatrixColumn(e, 1).length(), a = 1 / Is.setFromMatrixColumn(e, 2).length();
|
|
21840
21840
|
return t[0] = n[0] * s, t[1] = n[1] * s, t[2] = n[2] * s, t[3] = 0, t[4] = n[4] * r, t[5] = n[5] * r, t[6] = n[6] * r, t[7] = 0, t[8] = n[8] * a, t[9] = n[9] * a, t[10] = n[10] * a, t[11] = 0, t[12] = 0, t[13] = 0, t[14] = 0, t[15] = 1, this;
|
|
21841
21841
|
}
|
|
21842
21842
|
/**
|
|
@@ -21894,7 +21894,7 @@ class Vt {
|
|
|
21894
21894
|
*/
|
|
21895
21895
|
lookAt(e, t, n) {
|
|
21896
21896
|
const s = this.elements;
|
|
21897
|
-
return gn.subVectors(e, t), gn.lengthSq() === 0 && (gn.z = 1), gn.normalize(), Ni.crossVectors(n, gn), Ni.lengthSq() === 0 && (Math.abs(n.z) === 1 ? gn.x += 1e-4 : gn.z += 1e-4, gn.normalize(), Ni.crossVectors(n, gn)), Ni.normalize(),
|
|
21897
|
+
return gn.subVectors(e, t), gn.lengthSq() === 0 && (gn.z = 1), gn.normalize(), Ni.crossVectors(n, gn), Ni.lengthSq() === 0 && (Math.abs(n.z) === 1 ? gn.x += 1e-4 : gn.z += 1e-4, gn.normalize(), Ni.crossVectors(n, gn)), Ni.normalize(), la.crossVectors(gn, Ni), s[0] = Ni.x, s[4] = la.x, s[8] = gn.x, s[1] = Ni.y, s[5] = la.y, s[9] = gn.y, s[2] = Ni.z, s[6] = la.z, s[10] = gn.z, this;
|
|
21898
21898
|
}
|
|
21899
21899
|
/**
|
|
21900
21900
|
* Post-multiplies this matrix by the given 4x4 matrix.
|
|
@@ -22252,8 +22252,8 @@ class Vt {
|
|
|
22252
22252
|
const s = this.elements;
|
|
22253
22253
|
if (e.x = s[12], e.y = s[13], e.z = s[14], this.determinant() === 0)
|
|
22254
22254
|
return n.set(1, 1, 1), t.identity(), this;
|
|
22255
|
-
let r =
|
|
22256
|
-
const a =
|
|
22255
|
+
let r = Is.set(s[0], s[1], s[2]).length();
|
|
22256
|
+
const a = Is.set(s[4], s[5], s[6]).length(), o = Is.set(s[8], s[9], s[10]).length();
|
|
22257
22257
|
this.determinant() < 0 && (r = -r), Pn.copy(this);
|
|
22258
22258
|
const l = 1 / r, d = 1 / a, u = 1 / o;
|
|
22259
22259
|
return Pn.elements[0] *= l, Pn.elements[1] *= l, Pn.elements[2] *= l, Pn.elements[4] *= d, Pn.elements[5] *= d, Pn.elements[6] *= d, Pn.elements[8] *= u, Pn.elements[9] *= u, Pn.elements[10] *= u, t.setFromRotationMatrix(Pn), n.x = r, n.y = a, n.z = o, this;
|
|
@@ -22279,7 +22279,7 @@ class Vt {
|
|
|
22279
22279
|
g = r / (a - r), v = a * r / (a - r);
|
|
22280
22280
|
else if (o === Jn)
|
|
22281
22281
|
g = -(a + r) / (a - r), v = -2 * a * r / (a - r);
|
|
22282
|
-
else if (o ===
|
|
22282
|
+
else if (o === no)
|
|
22283
22283
|
g = -a / (a - r), v = -a * r / (a - r);
|
|
22284
22284
|
else
|
|
22285
22285
|
throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: " + o);
|
|
@@ -22306,7 +22306,7 @@ class Vt {
|
|
|
22306
22306
|
g = 1 / (a - r), v = a / (a - r);
|
|
22307
22307
|
else if (o === Jn)
|
|
22308
22308
|
g = -2 / (a - r), v = -(a + r) / (a - r);
|
|
22309
|
-
else if (o ===
|
|
22309
|
+
else if (o === no)
|
|
22310
22310
|
g = -1 / (a - r), v = -r / (a - r);
|
|
22311
22311
|
else
|
|
22312
22312
|
throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: " + o);
|
|
@@ -22349,7 +22349,7 @@ class Vt {
|
|
|
22349
22349
|
return e[t] = n[0], e[t + 1] = n[1], e[t + 2] = n[2], e[t + 3] = n[3], e[t + 4] = n[4], e[t + 5] = n[5], e[t + 6] = n[6], e[t + 7] = n[7], e[t + 8] = n[8], e[t + 9] = n[9], e[t + 10] = n[10], e[t + 11] = n[11], e[t + 12] = n[12], e[t + 13] = n[13], e[t + 14] = n[14], e[t + 15] = n[15], e;
|
|
22350
22350
|
}
|
|
22351
22351
|
}
|
|
22352
|
-
const
|
|
22352
|
+
const Is = /* @__PURE__ */ new B(), Pn = /* @__PURE__ */ new Vt(), Jb = /* @__PURE__ */ new B(0, 0, 0), Zb = /* @__PURE__ */ new B(1, 1, 1), Ni = /* @__PURE__ */ new B(), la = /* @__PURE__ */ new B(), gn = /* @__PURE__ */ new B(), bh = /* @__PURE__ */ new Vt(), yh = /* @__PURE__ */ new Kr();
|
|
22353
22353
|
class Ai {
|
|
22354
22354
|
/**
|
|
22355
22355
|
* Constructs a new euler instance.
|
|
@@ -22621,14 +22621,14 @@ class gm {
|
|
|
22621
22621
|
}
|
|
22622
22622
|
}
|
|
22623
22623
|
let Qb = 0;
|
|
22624
|
-
const Sh = /* @__PURE__ */ new B(),
|
|
22625
|
-
class Sn extends
|
|
22624
|
+
const Sh = /* @__PURE__ */ new B(), Ds = /* @__PURE__ */ new Kr(), li = /* @__PURE__ */ new Vt(), da = /* @__PURE__ */ new B(), Sr = /* @__PURE__ */ new B(), ey = /* @__PURE__ */ new B(), ty = /* @__PURE__ */ new Kr(), xh = /* @__PURE__ */ new B(1, 0, 0), Th = /* @__PURE__ */ new B(0, 1, 0), Eh = /* @__PURE__ */ new B(0, 0, 1), Ch = { type: "added" }, ny = { type: "removed" }, Ls = { type: "childadded", child: null }, ic = { type: "childremoved", child: null };
|
|
22625
|
+
class Sn extends cr {
|
|
22626
22626
|
/**
|
|
22627
22627
|
* Constructs a new 3D object.
|
|
22628
22628
|
*/
|
|
22629
22629
|
constructor() {
|
|
22630
|
-
super(), this.isObject3D = !0, Object.defineProperty(this, "id", { value: Qb++ }), this.uuid =
|
|
22631
|
-
const e = new B(), t = new Ai(), n = new
|
|
22630
|
+
super(), this.isObject3D = !0, Object.defineProperty(this, "id", { value: Qb++ }), this.uuid = Yr(), this.name = "", this.type = "Object3D", this.parent = null, this.children = [], this.up = Sn.DEFAULT_UP.clone();
|
|
22631
|
+
const e = new B(), t = new Ai(), n = new Kr(), s = new B(1, 1, 1);
|
|
22632
22632
|
function r() {
|
|
22633
22633
|
n.setFromEuler(t, !1);
|
|
22634
22634
|
}
|
|
@@ -22813,7 +22813,7 @@ class Sn extends lr {
|
|
|
22813
22813
|
* @return {Object3D} A reference to this instance.
|
|
22814
22814
|
*/
|
|
22815
22815
|
rotateOnAxis(e, t) {
|
|
22816
|
-
return
|
|
22816
|
+
return Ds.setFromAxisAngle(e, t), this.quaternion.multiply(Ds), this;
|
|
22817
22817
|
}
|
|
22818
22818
|
/**
|
|
22819
22819
|
* Rotates the 3D object along an axis in world space.
|
|
@@ -22823,7 +22823,7 @@ class Sn extends lr {
|
|
|
22823
22823
|
* @return {Object3D} A reference to this instance.
|
|
22824
22824
|
*/
|
|
22825
22825
|
rotateOnWorldAxis(e, t) {
|
|
22826
|
-
return
|
|
22826
|
+
return Ds.setFromAxisAngle(e, t), this.quaternion.premultiply(Ds), this;
|
|
22827
22827
|
}
|
|
22828
22828
|
/**
|
|
22829
22829
|
* Rotates the 3D object around its X axis in local space.
|
|
@@ -22917,9 +22917,9 @@ class Sn extends lr {
|
|
|
22917
22917
|
* @param {number} [z] - The z coordinate in world space.
|
|
22918
22918
|
*/
|
|
22919
22919
|
lookAt(e, t, n) {
|
|
22920
|
-
e.isVector3 ?
|
|
22920
|
+
e.isVector3 ? da.copy(e) : da.set(e, t, n);
|
|
22921
22921
|
const s = this.parent;
|
|
22922
|
-
this.updateWorldMatrix(!0, !1),
|
|
22922
|
+
this.updateWorldMatrix(!0, !1), Sr.setFromMatrixPosition(this.matrixWorld), this.isCamera || this.isLight ? li.lookAt(Sr, da, this.up) : li.lookAt(da, Sr, this.up), this.quaternion.setFromRotationMatrix(li), s && (li.extractRotation(s.matrixWorld), Ds.setFromRotationMatrix(li), this.quaternion.premultiply(Ds.invert()));
|
|
22923
22923
|
}
|
|
22924
22924
|
/**
|
|
22925
22925
|
* Adds the given 3D object as a child to this 3D object. An arbitrary number of
|
|
@@ -22937,7 +22937,7 @@ class Sn extends lr {
|
|
|
22937
22937
|
this.add(arguments[t]);
|
|
22938
22938
|
return this;
|
|
22939
22939
|
}
|
|
22940
|
-
return e === this ? (nt("Object3D.add: object can't be added as a child of itself.", e), this) : (e && e.isObject3D ? (e.removeFromParent(), e.parent = this, this.children.push(e), e.dispatchEvent(Ch),
|
|
22940
|
+
return e === this ? (nt("Object3D.add: object can't be added as a child of itself.", e), this) : (e && e.isObject3D ? (e.removeFromParent(), e.parent = this, this.children.push(e), e.dispatchEvent(Ch), Ls.child = e, this.dispatchEvent(Ls), Ls.child = null) : nt("Object3D.add: object not an instance of THREE.Object3D.", e), this);
|
|
22941
22941
|
}
|
|
22942
22942
|
/**
|
|
22943
22943
|
* Removes the given 3D object as child from this 3D object.
|
|
@@ -22988,7 +22988,7 @@ class Sn extends lr {
|
|
|
22988
22988
|
* @return {Object3D} A reference to this instance.
|
|
22989
22989
|
*/
|
|
22990
22990
|
attach(e) {
|
|
22991
|
-
return this.updateWorldMatrix(!0, !1), li.copy(this.matrixWorld).invert(), e.parent !== null && (e.parent.updateWorldMatrix(!0, !1), li.multiply(e.parent.matrixWorld)), e.applyMatrix4(li), e.removeFromParent(), e.parent = this, this.children.push(e), e.updateWorldMatrix(!1, !0), e.dispatchEvent(Ch),
|
|
22991
|
+
return this.updateWorldMatrix(!0, !1), li.copy(this.matrixWorld).invert(), e.parent !== null && (e.parent.updateWorldMatrix(!0, !1), li.multiply(e.parent.matrixWorld)), e.applyMatrix4(li), e.removeFromParent(), e.parent = this, this.children.push(e), e.updateWorldMatrix(!1, !0), e.dispatchEvent(Ch), Ls.child = e, this.dispatchEvent(Ls), Ls.child = null, this;
|
|
22992
22992
|
}
|
|
22993
22993
|
/**
|
|
22994
22994
|
* Searches through the 3D object and its children, starting with the 3D object
|
|
@@ -23058,7 +23058,7 @@ class Sn extends lr {
|
|
|
23058
23058
|
* @return {Quaternion} The 3D object's rotation in world space.
|
|
23059
23059
|
*/
|
|
23060
23060
|
getWorldQuaternion(e) {
|
|
23061
|
-
return this.updateWorldMatrix(!0, !1), this.matrixWorld.decompose(
|
|
23061
|
+
return this.updateWorldMatrix(!0, !1), this.matrixWorld.decompose(Sr, e, ey), e;
|
|
23062
23062
|
}
|
|
23063
23063
|
/**
|
|
23064
23064
|
* Returns a vector representing the scale of the 3D object in world space.
|
|
@@ -23067,7 +23067,7 @@ class Sn extends lr {
|
|
|
23067
23067
|
* @return {Vector3} The 3D object's scale in world space.
|
|
23068
23068
|
*/
|
|
23069
23069
|
getWorldScale(e) {
|
|
23070
|
-
return this.updateWorldMatrix(!0, !1), this.matrixWorld.decompose(
|
|
23070
|
+
return this.updateWorldMatrix(!0, !1), this.matrixWorld.decompose(Sr, ty, e), e;
|
|
23071
23071
|
}
|
|
23072
23072
|
/**
|
|
23073
23073
|
* Returns a vector representing the ("look") direction of the 3D object in world space.
|
|
@@ -23279,7 +23279,7 @@ class Sn extends lr {
|
|
|
23279
23279
|
Sn.DEFAULT_UP = /* @__PURE__ */ new B(0, 1, 0);
|
|
23280
23280
|
Sn.DEFAULT_MATRIX_AUTO_UPDATE = !0;
|
|
23281
23281
|
Sn.DEFAULT_MATRIX_WORLD_AUTO_UPDATE = !0;
|
|
23282
|
-
const kn = /* @__PURE__ */ new B(), di = /* @__PURE__ */ new B(), sc = /* @__PURE__ */ new B(), ui = /* @__PURE__ */ new B(),
|
|
23282
|
+
const kn = /* @__PURE__ */ new B(), di = /* @__PURE__ */ new B(), sc = /* @__PURE__ */ new B(), ui = /* @__PURE__ */ new B(), Ns = /* @__PURE__ */ new B(), Us = /* @__PURE__ */ new B(), Mh = /* @__PURE__ */ new B(), rc = /* @__PURE__ */ new B(), ac = /* @__PURE__ */ new B(), oc = /* @__PURE__ */ new B(), cc = /* @__PURE__ */ new Lt(), lc = /* @__PURE__ */ new Lt(), dc = /* @__PURE__ */ new Lt();
|
|
23283
23283
|
class On {
|
|
23284
23284
|
/**
|
|
23285
23285
|
* Constructs a new triangle.
|
|
@@ -23532,29 +23532,29 @@ class On {
|
|
|
23532
23532
|
closestPointToPoint(e, t) {
|
|
23533
23533
|
const n = this.a, s = this.b, r = this.c;
|
|
23534
23534
|
let a, o;
|
|
23535
|
-
|
|
23536
|
-
const c =
|
|
23535
|
+
Ns.subVectors(s, n), Us.subVectors(r, n), rc.subVectors(e, n);
|
|
23536
|
+
const c = Ns.dot(rc), l = Us.dot(rc);
|
|
23537
23537
|
if (c <= 0 && l <= 0)
|
|
23538
23538
|
return t.copy(n);
|
|
23539
23539
|
ac.subVectors(e, s);
|
|
23540
|
-
const d =
|
|
23540
|
+
const d = Ns.dot(ac), u = Us.dot(ac);
|
|
23541
23541
|
if (d >= 0 && u <= d)
|
|
23542
23542
|
return t.copy(s);
|
|
23543
23543
|
const h = c * u - d * l;
|
|
23544
23544
|
if (h <= 0 && c >= 0 && d <= 0)
|
|
23545
|
-
return a = c / (c - d), t.copy(n).addScaledVector(
|
|
23545
|
+
return a = c / (c - d), t.copy(n).addScaledVector(Ns, a);
|
|
23546
23546
|
oc.subVectors(e, r);
|
|
23547
|
-
const p =
|
|
23547
|
+
const p = Ns.dot(oc), g = Us.dot(oc);
|
|
23548
23548
|
if (g >= 0 && p <= g)
|
|
23549
23549
|
return t.copy(r);
|
|
23550
23550
|
const v = p * l - c * g;
|
|
23551
23551
|
if (v <= 0 && l >= 0 && g <= 0)
|
|
23552
|
-
return o = l / (l - g), t.copy(n).addScaledVector(
|
|
23552
|
+
return o = l / (l - g), t.copy(n).addScaledVector(Us, o);
|
|
23553
23553
|
const m = d * g - p * u;
|
|
23554
23554
|
if (m <= 0 && u - d >= 0 && p - g >= 0)
|
|
23555
23555
|
return Mh.subVectors(r, s), o = (u - d) / (u - d + (p - g)), t.copy(s).addScaledVector(Mh, o);
|
|
23556
23556
|
const f = 1 / (m + v + h);
|
|
23557
|
-
return a = v * f, o = h * f, t.copy(n).addScaledVector(
|
|
23557
|
+
return a = v * f, o = h * f, t.copy(n).addScaledVector(Ns, a).addScaledVector(Us, o);
|
|
23558
23558
|
}
|
|
23559
23559
|
/**
|
|
23560
23560
|
* Returns `true` if this triangle is equal with the given one.
|
|
@@ -23715,7 +23715,7 @@ const vm = {
|
|
|
23715
23715
|
whitesmoke: 16119285,
|
|
23716
23716
|
yellow: 16776960,
|
|
23717
23717
|
yellowgreen: 10145074
|
|
23718
|
-
}, Ui = { h: 0, s: 0, l: 0 },
|
|
23718
|
+
}, Ui = { h: 0, s: 0, l: 0 }, ua = { h: 0, s: 0, l: 0 };
|
|
23719
23719
|
function uc(i, e, t) {
|
|
23720
23720
|
return t < 0 && (t += 1), t > 1 && (t -= 1), t < 1 / 6 ? i + (e - i) * 6 * t : t < 1 / 2 ? e : t < 2 / 3 ? i + (e - i) * 6 * (2 / 3 - t) : i;
|
|
23721
23721
|
}
|
|
@@ -23917,7 +23917,7 @@ class Je {
|
|
|
23917
23917
|
* @return {Color} A reference to this color.
|
|
23918
23918
|
*/
|
|
23919
23919
|
copyLinearToSRGB(e) {
|
|
23920
|
-
return this.r =
|
|
23920
|
+
return this.r = Js(e.r), this.g = Js(e.g), this.b = Js(e.b), this;
|
|
23921
23921
|
}
|
|
23922
23922
|
/**
|
|
23923
23923
|
* Converts this color from `SRGBColorSpace` to `LinearSRGBColorSpace`.
|
|
@@ -24111,8 +24111,8 @@ class Je {
|
|
|
24111
24111
|
* @return {Color} A reference to this color.
|
|
24112
24112
|
*/
|
|
24113
24113
|
lerpHSL(e, t) {
|
|
24114
|
-
this.getHSL(Ui), e.getHSL(
|
|
24115
|
-
const n = Xo(Ui.h,
|
|
24114
|
+
this.getHSL(Ui), e.getHSL(ua);
|
|
24115
|
+
const n = Xo(Ui.h, ua.h, t), s = Xo(Ui.s, ua.s, t), r = Xo(Ui.l, ua.l, t);
|
|
24116
24116
|
return this.setHSL(n, s, r), this;
|
|
24117
24117
|
}
|
|
24118
24118
|
/**
|
|
@@ -24190,12 +24190,12 @@ class Je {
|
|
|
24190
24190
|
const Jt = /* @__PURE__ */ new Je();
|
|
24191
24191
|
Je.NAMES = vm;
|
|
24192
24192
|
let iy = 0;
|
|
24193
|
-
class
|
|
24193
|
+
class po extends cr {
|
|
24194
24194
|
/**
|
|
24195
24195
|
* Constructs a new material.
|
|
24196
24196
|
*/
|
|
24197
24197
|
constructor() {
|
|
24198
|
-
super(), this.isMaterial = !0, Object.defineProperty(this, "id", { value: iy++ }), this.uuid =
|
|
24198
|
+
super(), this.isMaterial = !0, Object.defineProperty(this, "id", { value: iy++ }), this.uuid = Yr(), this.name = "", this.type = "Material", this.blending = Ks, this.side = Ci, this.vertexColors = !1, this.opacity = 1, this.transparent = !1, this.alphaHash = !1, this.blendSrc = il, this.blendDst = sl, this.blendEquation = ls, this.blendSrcAlpha = null, this.blendDstAlpha = null, this.blendEquationAlpha = null, this.blendColor = new Je(0, 0, 0), this.blendAlpha = 0, this.depthFunc = nr, this.depthTest = !0, this.depthWrite = !0, this.stencilWriteMask = 255, this.stencilFunc = uh, this.stencilRef = 0, this.stencilFuncMask = 255, this.stencilFail = ws, this.stencilZFail = ws, this.stencilZPass = ws, this.stencilWrite = !1, this.clippingPlanes = null, this.clipIntersection = !1, this.clipShadows = !1, this.shadowSide = null, this.colorWrite = !0, this.precision = null, this.polygonOffset = !1, this.polygonOffsetFactor = 0, this.polygonOffsetUnits = 0, this.dithering = !1, this.alphaToCoverage = !1, this.premultipliedAlpha = !1, this.forceSinglePass = !1, this.allowOverride = !0, this.visible = !0, this.toneMapped = !0, this.userData = {}, this.version = 0, this._alphaTest = 0;
|
|
24199
24199
|
}
|
|
24200
24200
|
/**
|
|
24201
24201
|
* Sets the alpha value to be used when running an alpha test. The material
|
|
@@ -24294,7 +24294,7 @@ class mo extends lr {
|
|
|
24294
24294
|
generator: "Material.toJSON"
|
|
24295
24295
|
}
|
|
24296
24296
|
};
|
|
24297
|
-
n.uuid = this.uuid, n.type = this.type, this.name !== "" && (n.name = this.name), this.color && this.color.isColor && (n.color = this.color.getHex()), this.roughness !== void 0 && (n.roughness = this.roughness), this.metalness !== void 0 && (n.metalness = this.metalness), this.sheen !== void 0 && (n.sheen = this.sheen), this.sheenColor && this.sheenColor.isColor && (n.sheenColor = this.sheenColor.getHex()), this.sheenRoughness !== void 0 && (n.sheenRoughness = this.sheenRoughness), this.emissive && this.emissive.isColor && (n.emissive = this.emissive.getHex()), this.emissiveIntensity !== void 0 && this.emissiveIntensity !== 1 && (n.emissiveIntensity = this.emissiveIntensity), this.specular && this.specular.isColor && (n.specular = this.specular.getHex()), this.specularIntensity !== void 0 && (n.specularIntensity = this.specularIntensity), this.specularColor && this.specularColor.isColor && (n.specularColor = this.specularColor.getHex()), this.shininess !== void 0 && (n.shininess = this.shininess), this.clearcoat !== void 0 && (n.clearcoat = this.clearcoat), this.clearcoatRoughness !== void 0 && (n.clearcoatRoughness = this.clearcoatRoughness), this.clearcoatMap && this.clearcoatMap.isTexture && (n.clearcoatMap = this.clearcoatMap.toJSON(e).uuid), this.clearcoatRoughnessMap && this.clearcoatRoughnessMap.isTexture && (n.clearcoatRoughnessMap = this.clearcoatRoughnessMap.toJSON(e).uuid), this.clearcoatNormalMap && this.clearcoatNormalMap.isTexture && (n.clearcoatNormalMap = this.clearcoatNormalMap.toJSON(e).uuid, n.clearcoatNormalScale = this.clearcoatNormalScale.toArray()), this.sheenColorMap && this.sheenColorMap.isTexture && (n.sheenColorMap = this.sheenColorMap.toJSON(e).uuid), this.sheenRoughnessMap && this.sheenRoughnessMap.isTexture && (n.sheenRoughnessMap = this.sheenRoughnessMap.toJSON(e).uuid), this.dispersion !== void 0 && (n.dispersion = this.dispersion), this.iridescence !== void 0 && (n.iridescence = this.iridescence), this.iridescenceIOR !== void 0 && (n.iridescenceIOR = this.iridescenceIOR), this.iridescenceThicknessRange !== void 0 && (n.iridescenceThicknessRange = this.iridescenceThicknessRange), this.iridescenceMap && this.iridescenceMap.isTexture && (n.iridescenceMap = this.iridescenceMap.toJSON(e).uuid), this.iridescenceThicknessMap && this.iridescenceThicknessMap.isTexture && (n.iridescenceThicknessMap = this.iridescenceThicknessMap.toJSON(e).uuid), this.anisotropy !== void 0 && (n.anisotropy = this.anisotropy), this.anisotropyRotation !== void 0 && (n.anisotropyRotation = this.anisotropyRotation), this.anisotropyMap && this.anisotropyMap.isTexture && (n.anisotropyMap = this.anisotropyMap.toJSON(e).uuid), this.map && this.map.isTexture && (n.map = this.map.toJSON(e).uuid), this.matcap && this.matcap.isTexture && (n.matcap = this.matcap.toJSON(e).uuid), this.alphaMap && this.alphaMap.isTexture && (n.alphaMap = this.alphaMap.toJSON(e).uuid), this.lightMap && this.lightMap.isTexture && (n.lightMap = this.lightMap.toJSON(e).uuid, n.lightMapIntensity = this.lightMapIntensity), this.aoMap && this.aoMap.isTexture && (n.aoMap = this.aoMap.toJSON(e).uuid, n.aoMapIntensity = this.aoMapIntensity), this.bumpMap && this.bumpMap.isTexture && (n.bumpMap = this.bumpMap.toJSON(e).uuid, n.bumpScale = this.bumpScale), this.normalMap && this.normalMap.isTexture && (n.normalMap = this.normalMap.toJSON(e).uuid, n.normalMapType = this.normalMapType, n.normalScale = this.normalScale.toArray()), this.displacementMap && this.displacementMap.isTexture && (n.displacementMap = this.displacementMap.toJSON(e).uuid, n.displacementScale = this.displacementScale, n.displacementBias = this.displacementBias), this.roughnessMap && this.roughnessMap.isTexture && (n.roughnessMap = this.roughnessMap.toJSON(e).uuid), this.metalnessMap && this.metalnessMap.isTexture && (n.metalnessMap = this.metalnessMap.toJSON(e).uuid), this.emissiveMap && this.emissiveMap.isTexture && (n.emissiveMap = this.emissiveMap.toJSON(e).uuid), this.specularMap && this.specularMap.isTexture && (n.specularMap = this.specularMap.toJSON(e).uuid), this.specularIntensityMap && this.specularIntensityMap.isTexture && (n.specularIntensityMap = this.specularIntensityMap.toJSON(e).uuid), this.specularColorMap && this.specularColorMap.isTexture && (n.specularColorMap = this.specularColorMap.toJSON(e).uuid), this.envMap && this.envMap.isTexture && (n.envMap = this.envMap.toJSON(e).uuid, this.combine !== void 0 && (n.combine = this.combine)), this.envMapRotation !== void 0 && (n.envMapRotation = this.envMapRotation.toArray()), this.envMapIntensity !== void 0 && (n.envMapIntensity = this.envMapIntensity), this.reflectivity !== void 0 && (n.reflectivity = this.reflectivity), this.refractionRatio !== void 0 && (n.refractionRatio = this.refractionRatio), this.gradientMap && this.gradientMap.isTexture && (n.gradientMap = this.gradientMap.toJSON(e).uuid), this.transmission !== void 0 && (n.transmission = this.transmission), this.transmissionMap && this.transmissionMap.isTexture && (n.transmissionMap = this.transmissionMap.toJSON(e).uuid), this.thickness !== void 0 && (n.thickness = this.thickness), this.thicknessMap && this.thicknessMap.isTexture && (n.thicknessMap = this.thicknessMap.toJSON(e).uuid), this.attenuationDistance !== void 0 && this.attenuationDistance !== 1 / 0 && (n.attenuationDistance = this.attenuationDistance), this.attenuationColor !== void 0 && (n.attenuationColor = this.attenuationColor.getHex()), this.size !== void 0 && (n.size = this.size), this.shadowSide !== null && (n.shadowSide = this.shadowSide), this.sizeAttenuation !== void 0 && (n.sizeAttenuation = this.sizeAttenuation), this.blending !==
|
|
24297
|
+
n.uuid = this.uuid, n.type = this.type, this.name !== "" && (n.name = this.name), this.color && this.color.isColor && (n.color = this.color.getHex()), this.roughness !== void 0 && (n.roughness = this.roughness), this.metalness !== void 0 && (n.metalness = this.metalness), this.sheen !== void 0 && (n.sheen = this.sheen), this.sheenColor && this.sheenColor.isColor && (n.sheenColor = this.sheenColor.getHex()), this.sheenRoughness !== void 0 && (n.sheenRoughness = this.sheenRoughness), this.emissive && this.emissive.isColor && (n.emissive = this.emissive.getHex()), this.emissiveIntensity !== void 0 && this.emissiveIntensity !== 1 && (n.emissiveIntensity = this.emissiveIntensity), this.specular && this.specular.isColor && (n.specular = this.specular.getHex()), this.specularIntensity !== void 0 && (n.specularIntensity = this.specularIntensity), this.specularColor && this.specularColor.isColor && (n.specularColor = this.specularColor.getHex()), this.shininess !== void 0 && (n.shininess = this.shininess), this.clearcoat !== void 0 && (n.clearcoat = this.clearcoat), this.clearcoatRoughness !== void 0 && (n.clearcoatRoughness = this.clearcoatRoughness), this.clearcoatMap && this.clearcoatMap.isTexture && (n.clearcoatMap = this.clearcoatMap.toJSON(e).uuid), this.clearcoatRoughnessMap && this.clearcoatRoughnessMap.isTexture && (n.clearcoatRoughnessMap = this.clearcoatRoughnessMap.toJSON(e).uuid), this.clearcoatNormalMap && this.clearcoatNormalMap.isTexture && (n.clearcoatNormalMap = this.clearcoatNormalMap.toJSON(e).uuid, n.clearcoatNormalScale = this.clearcoatNormalScale.toArray()), this.sheenColorMap && this.sheenColorMap.isTexture && (n.sheenColorMap = this.sheenColorMap.toJSON(e).uuid), this.sheenRoughnessMap && this.sheenRoughnessMap.isTexture && (n.sheenRoughnessMap = this.sheenRoughnessMap.toJSON(e).uuid), this.dispersion !== void 0 && (n.dispersion = this.dispersion), this.iridescence !== void 0 && (n.iridescence = this.iridescence), this.iridescenceIOR !== void 0 && (n.iridescenceIOR = this.iridescenceIOR), this.iridescenceThicknessRange !== void 0 && (n.iridescenceThicknessRange = this.iridescenceThicknessRange), this.iridescenceMap && this.iridescenceMap.isTexture && (n.iridescenceMap = this.iridescenceMap.toJSON(e).uuid), this.iridescenceThicknessMap && this.iridescenceThicknessMap.isTexture && (n.iridescenceThicknessMap = this.iridescenceThicknessMap.toJSON(e).uuid), this.anisotropy !== void 0 && (n.anisotropy = this.anisotropy), this.anisotropyRotation !== void 0 && (n.anisotropyRotation = this.anisotropyRotation), this.anisotropyMap && this.anisotropyMap.isTexture && (n.anisotropyMap = this.anisotropyMap.toJSON(e).uuid), this.map && this.map.isTexture && (n.map = this.map.toJSON(e).uuid), this.matcap && this.matcap.isTexture && (n.matcap = this.matcap.toJSON(e).uuid), this.alphaMap && this.alphaMap.isTexture && (n.alphaMap = this.alphaMap.toJSON(e).uuid), this.lightMap && this.lightMap.isTexture && (n.lightMap = this.lightMap.toJSON(e).uuid, n.lightMapIntensity = this.lightMapIntensity), this.aoMap && this.aoMap.isTexture && (n.aoMap = this.aoMap.toJSON(e).uuid, n.aoMapIntensity = this.aoMapIntensity), this.bumpMap && this.bumpMap.isTexture && (n.bumpMap = this.bumpMap.toJSON(e).uuid, n.bumpScale = this.bumpScale), this.normalMap && this.normalMap.isTexture && (n.normalMap = this.normalMap.toJSON(e).uuid, n.normalMapType = this.normalMapType, n.normalScale = this.normalScale.toArray()), this.displacementMap && this.displacementMap.isTexture && (n.displacementMap = this.displacementMap.toJSON(e).uuid, n.displacementScale = this.displacementScale, n.displacementBias = this.displacementBias), this.roughnessMap && this.roughnessMap.isTexture && (n.roughnessMap = this.roughnessMap.toJSON(e).uuid), this.metalnessMap && this.metalnessMap.isTexture && (n.metalnessMap = this.metalnessMap.toJSON(e).uuid), this.emissiveMap && this.emissiveMap.isTexture && (n.emissiveMap = this.emissiveMap.toJSON(e).uuid), this.specularMap && this.specularMap.isTexture && (n.specularMap = this.specularMap.toJSON(e).uuid), this.specularIntensityMap && this.specularIntensityMap.isTexture && (n.specularIntensityMap = this.specularIntensityMap.toJSON(e).uuid), this.specularColorMap && this.specularColorMap.isTexture && (n.specularColorMap = this.specularColorMap.toJSON(e).uuid), this.envMap && this.envMap.isTexture && (n.envMap = this.envMap.toJSON(e).uuid, this.combine !== void 0 && (n.combine = this.combine)), this.envMapRotation !== void 0 && (n.envMapRotation = this.envMapRotation.toArray()), this.envMapIntensity !== void 0 && (n.envMapIntensity = this.envMapIntensity), this.reflectivity !== void 0 && (n.reflectivity = this.reflectivity), this.refractionRatio !== void 0 && (n.refractionRatio = this.refractionRatio), this.gradientMap && this.gradientMap.isTexture && (n.gradientMap = this.gradientMap.toJSON(e).uuid), this.transmission !== void 0 && (n.transmission = this.transmission), this.transmissionMap && this.transmissionMap.isTexture && (n.transmissionMap = this.transmissionMap.toJSON(e).uuid), this.thickness !== void 0 && (n.thickness = this.thickness), this.thicknessMap && this.thicknessMap.isTexture && (n.thicknessMap = this.thicknessMap.toJSON(e).uuid), this.attenuationDistance !== void 0 && this.attenuationDistance !== 1 / 0 && (n.attenuationDistance = this.attenuationDistance), this.attenuationColor !== void 0 && (n.attenuationColor = this.attenuationColor.getHex()), this.size !== void 0 && (n.size = this.size), this.shadowSide !== null && (n.shadowSide = this.shadowSide), this.sizeAttenuation !== void 0 && (n.sizeAttenuation = this.sizeAttenuation), this.blending !== Ks && (n.blending = this.blending), this.side !== Ci && (n.side = this.side), this.vertexColors === !0 && (n.vertexColors = !0), this.opacity < 1 && (n.opacity = this.opacity), this.transparent === !0 && (n.transparent = !0), this.blendSrc !== il && (n.blendSrc = this.blendSrc), this.blendDst !== sl && (n.blendDst = this.blendDst), this.blendEquation !== ls && (n.blendEquation = this.blendEquation), this.blendSrcAlpha !== null && (n.blendSrcAlpha = this.blendSrcAlpha), this.blendDstAlpha !== null && (n.blendDstAlpha = this.blendDstAlpha), this.blendEquationAlpha !== null && (n.blendEquationAlpha = this.blendEquationAlpha), this.blendColor && this.blendColor.isColor && (n.blendColor = this.blendColor.getHex()), this.blendAlpha !== 0 && (n.blendAlpha = this.blendAlpha), this.depthFunc !== nr && (n.depthFunc = this.depthFunc), this.depthTest === !1 && (n.depthTest = this.depthTest), this.depthWrite === !1 && (n.depthWrite = this.depthWrite), this.colorWrite === !1 && (n.colorWrite = this.colorWrite), this.stencilWriteMask !== 255 && (n.stencilWriteMask = this.stencilWriteMask), this.stencilFunc !== uh && (n.stencilFunc = this.stencilFunc), this.stencilRef !== 0 && (n.stencilRef = this.stencilRef), this.stencilFuncMask !== 255 && (n.stencilFuncMask = this.stencilFuncMask), this.stencilFail !== ws && (n.stencilFail = this.stencilFail), this.stencilZFail !== ws && (n.stencilZFail = this.stencilZFail), this.stencilZPass !== ws && (n.stencilZPass = this.stencilZPass), this.stencilWrite === !0 && (n.stencilWrite = this.stencilWrite), this.rotation !== void 0 && this.rotation !== 0 && (n.rotation = this.rotation), this.polygonOffset === !0 && (n.polygonOffset = !0), this.polygonOffsetFactor !== 0 && (n.polygonOffsetFactor = this.polygonOffsetFactor), this.polygonOffsetUnits !== 0 && (n.polygonOffsetUnits = this.polygonOffsetUnits), this.linewidth !== void 0 && this.linewidth !== 1 && (n.linewidth = this.linewidth), this.dashSize !== void 0 && (n.dashSize = this.dashSize), this.gapSize !== void 0 && (n.gapSize = this.gapSize), this.scale !== void 0 && (n.scale = this.scale), this.dithering === !0 && (n.dithering = !0), this.alphaTest > 0 && (n.alphaTest = this.alphaTest), this.alphaHash === !0 && (n.alphaHash = !0), this.alphaToCoverage === !0 && (n.alphaToCoverage = !0), this.premultipliedAlpha === !0 && (n.premultipliedAlpha = !0), this.forceSinglePass === !0 && (n.forceSinglePass = !0), this.allowOverride === !1 && (n.allowOverride = !1), this.wireframe === !0 && (n.wireframe = !0), this.wireframeLinewidth > 1 && (n.wireframeLinewidth = this.wireframeLinewidth), this.wireframeLinecap !== "round" && (n.wireframeLinecap = this.wireframeLinecap), this.wireframeLinejoin !== "round" && (n.wireframeLinejoin = this.wireframeLinejoin), this.flatShading === !0 && (n.flatShading = !0), this.visible === !1 && (n.visible = !1), this.toneMapped === !1 && (n.toneMapped = !1), this.fog === !1 && (n.fog = !1), Object.keys(this.userData).length > 0 && (n.userData = this.userData);
|
|
24298
24298
|
function s(r) {
|
|
24299
24299
|
const a = [];
|
|
24300
24300
|
for (const o in r) {
|
|
@@ -24356,7 +24356,7 @@ class mo extends lr {
|
|
|
24356
24356
|
e === !0 && this.version++;
|
|
24357
24357
|
}
|
|
24358
24358
|
}
|
|
24359
|
-
class _m extends
|
|
24359
|
+
class _m extends po {
|
|
24360
24360
|
/**
|
|
24361
24361
|
* Constructs a new mesh basic material.
|
|
24362
24362
|
*
|
|
@@ -24373,7 +24373,7 @@ class _m extends mo {
|
|
|
24373
24373
|
return super.copy(e), this.color.copy(e.color), this.map = e.map, this.lightMap = e.lightMap, this.lightMapIntensity = e.lightMapIntensity, this.aoMap = e.aoMap, this.aoMapIntensity = e.aoMapIntensity, this.specularMap = e.specularMap, this.alphaMap = e.alphaMap, this.envMap = e.envMap, this.envMapRotation.copy(e.envMapRotation), this.combine = e.combine, this.reflectivity = e.reflectivity, this.refractionRatio = e.refractionRatio, this.wireframe = e.wireframe, this.wireframeLinewidth = e.wireframeLinewidth, this.wireframeLinecap = e.wireframeLinecap, this.wireframeLinejoin = e.wireframeLinejoin, this.fog = e.fog, this;
|
|
24374
24374
|
}
|
|
24375
24375
|
}
|
|
24376
|
-
const Ot = /* @__PURE__ */ new B(),
|
|
24376
|
+
const Ot = /* @__PURE__ */ new B(), ha = /* @__PURE__ */ new st();
|
|
24377
24377
|
let sy = 0;
|
|
24378
24378
|
class ti {
|
|
24379
24379
|
/**
|
|
@@ -24473,7 +24473,7 @@ class ti {
|
|
|
24473
24473
|
applyMatrix3(e) {
|
|
24474
24474
|
if (this.itemSize === 2)
|
|
24475
24475
|
for (let t = 0, n = this.count; t < n; t++)
|
|
24476
|
-
|
|
24476
|
+
ha.fromBufferAttribute(this, t), ha.applyMatrix3(e), this.setXY(t, ha.x, ha.y);
|
|
24477
24477
|
else if (this.itemSize === 3)
|
|
24478
24478
|
for (let t = 0, n = this.count; t < n; t++)
|
|
24479
24479
|
Ot.fromBufferAttribute(this, t), Ot.applyMatrix3(e), this.setXYZ(t, Ot.x, Ot.y, Ot.z);
|
|
@@ -24534,7 +24534,7 @@ class ti {
|
|
|
24534
24534
|
*/
|
|
24535
24535
|
getComponent(e, t) {
|
|
24536
24536
|
let n = this.array[e * this.itemSize + t];
|
|
24537
|
-
return this.normalized && (n =
|
|
24537
|
+
return this.normalized && (n = _r(n, this.array)), n;
|
|
24538
24538
|
}
|
|
24539
24539
|
/**
|
|
24540
24540
|
* Sets the given value to the given component of the vector at the given index.
|
|
@@ -24555,7 +24555,7 @@ class ti {
|
|
|
24555
24555
|
*/
|
|
24556
24556
|
getX(e) {
|
|
24557
24557
|
let t = this.array[e * this.itemSize];
|
|
24558
|
-
return this.normalized && (t =
|
|
24558
|
+
return this.normalized && (t = _r(t, this.array)), t;
|
|
24559
24559
|
}
|
|
24560
24560
|
/**
|
|
24561
24561
|
* Sets the x component of the vector at the given index.
|
|
@@ -24575,7 +24575,7 @@ class ti {
|
|
|
24575
24575
|
*/
|
|
24576
24576
|
getY(e) {
|
|
24577
24577
|
let t = this.array[e * this.itemSize + 1];
|
|
24578
|
-
return this.normalized && (t =
|
|
24578
|
+
return this.normalized && (t = _r(t, this.array)), t;
|
|
24579
24579
|
}
|
|
24580
24580
|
/**
|
|
24581
24581
|
* Sets the y component of the vector at the given index.
|
|
@@ -24595,7 +24595,7 @@ class ti {
|
|
|
24595
24595
|
*/
|
|
24596
24596
|
getZ(e) {
|
|
24597
24597
|
let t = this.array[e * this.itemSize + 2];
|
|
24598
|
-
return this.normalized && (t =
|
|
24598
|
+
return this.normalized && (t = _r(t, this.array)), t;
|
|
24599
24599
|
}
|
|
24600
24600
|
/**
|
|
24601
24601
|
* Sets the z component of the vector at the given index.
|
|
@@ -24615,7 +24615,7 @@ class ti {
|
|
|
24615
24615
|
*/
|
|
24616
24616
|
getW(e) {
|
|
24617
24617
|
let t = this.array[e * this.itemSize + 3];
|
|
24618
|
-
return this.normalized && (t =
|
|
24618
|
+
return this.normalized && (t = _r(t, this.array)), t;
|
|
24619
24619
|
}
|
|
24620
24620
|
/**
|
|
24621
24621
|
* Sets the w component of the vector at the given index.
|
|
@@ -24734,13 +24734,13 @@ class rn extends ti {
|
|
|
24734
24734
|
}
|
|
24735
24735
|
}
|
|
24736
24736
|
let ry = 0;
|
|
24737
|
-
const Tn = /* @__PURE__ */ new Vt(), hc = /* @__PURE__ */ new Sn(),
|
|
24738
|
-
class Gn extends
|
|
24737
|
+
const Tn = /* @__PURE__ */ new Vt(), hc = /* @__PURE__ */ new Sn(), Os = /* @__PURE__ */ new B(), vn = /* @__PURE__ */ new Jr(), xr = /* @__PURE__ */ new Jr(), qt = /* @__PURE__ */ new B();
|
|
24738
|
+
class Gn extends cr {
|
|
24739
24739
|
/**
|
|
24740
24740
|
* Constructs a new geometry.
|
|
24741
24741
|
*/
|
|
24742
24742
|
constructor() {
|
|
24743
|
-
super(), this.isBufferGeometry = !0, Object.defineProperty(this, "id", { value: ry++ }), this.uuid =
|
|
24743
|
+
super(), this.isBufferGeometry = !0, Object.defineProperty(this, "id", { value: ry++ }), this.uuid = Yr(), this.name = "", this.type = "BufferGeometry", this.index = null, this.indirect = null, this.indirectOffset = 0, this.attributes = {}, this.morphAttributes = {}, this.morphTargetsRelative = !1, this.groups = [], this.boundingBox = null, this.boundingSphere = null, this.drawRange = { start: 0, count: 1 / 0 }, this.userData = {};
|
|
24744
24744
|
}
|
|
24745
24745
|
/**
|
|
24746
24746
|
* Returns the index of this geometry.
|
|
@@ -24948,7 +24948,7 @@ class Gn extends lr {
|
|
|
24948
24948
|
* @return {BufferGeometry} A reference to this instance.
|
|
24949
24949
|
*/
|
|
24950
24950
|
center() {
|
|
24951
|
-
return this.computeBoundingBox(), this.boundingBox.getCenter(
|
|
24951
|
+
return this.computeBoundingBox(), this.boundingBox.getCenter(Os).negate(), this.translate(Os.x, Os.y, Os.z), this;
|
|
24952
24952
|
}
|
|
24953
24953
|
/**
|
|
24954
24954
|
* Defines a geometry by creating a `position` attribute based on the given array of points. The array
|
|
@@ -24986,7 +24986,7 @@ class Gn extends lr {
|
|
|
24986
24986
|
* You may need to recompute the bounding box if the geometry vertices are modified.
|
|
24987
24987
|
*/
|
|
24988
24988
|
computeBoundingBox() {
|
|
24989
|
-
this.boundingBox === null && (this.boundingBox = new
|
|
24989
|
+
this.boundingBox === null && (this.boundingBox = new Jr());
|
|
24990
24990
|
const e = this.attributes.position, t = this.morphAttributes.position;
|
|
24991
24991
|
if (e && e.isGLBufferAttribute) {
|
|
24992
24992
|
nt("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.", this), this.boundingBox.set(
|
|
@@ -25022,7 +25022,7 @@ class Gn extends lr {
|
|
|
25022
25022
|
if (vn.setFromBufferAttribute(e), t)
|
|
25023
25023
|
for (let r = 0, a = t.length; r < a; r++) {
|
|
25024
25024
|
const o = t[r];
|
|
25025
|
-
|
|
25025
|
+
xr.setFromBufferAttribute(o), this.morphTargetsRelative ? (qt.addVectors(vn.min, xr.min), vn.expandByPoint(qt), qt.addVectors(vn.max, xr.max), vn.expandByPoint(qt)) : (vn.expandByPoint(xr.min), vn.expandByPoint(xr.max));
|
|
25026
25026
|
}
|
|
25027
25027
|
vn.getCenter(n);
|
|
25028
25028
|
let s = 0;
|
|
@@ -25032,7 +25032,7 @@ class Gn extends lr {
|
|
|
25032
25032
|
for (let r = 0, a = t.length; r < a; r++) {
|
|
25033
25033
|
const o = t[r], c = this.morphTargetsRelative;
|
|
25034
25034
|
for (let l = 0, d = o.count; l < d; l++)
|
|
25035
|
-
qt.fromBufferAttribute(o, l), c && (
|
|
25035
|
+
qt.fromBufferAttribute(o, l), c && (Os.fromBufferAttribute(e, l), qt.add(Os)), s = Math.max(s, n.distanceToSquared(qt));
|
|
25036
25036
|
}
|
|
25037
25037
|
this.boundingSphere.radius = Math.sqrt(s), isNaN(this.boundingSphere.radius) && nt('BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.', this);
|
|
25038
25038
|
}
|
|
@@ -25265,7 +25265,7 @@ class Gn extends lr {
|
|
|
25265
25265
|
this.dispatchEvent({ type: "dispose" });
|
|
25266
25266
|
}
|
|
25267
25267
|
}
|
|
25268
|
-
const wh = /* @__PURE__ */ new Vt(), ns = /* @__PURE__ */ new Kb(),
|
|
25268
|
+
const wh = /* @__PURE__ */ new Vt(), ns = /* @__PURE__ */ new Kb(), fa = /* @__PURE__ */ new Nd(), Ah = /* @__PURE__ */ new B(), pa = /* @__PURE__ */ new B(), ma = /* @__PURE__ */ new B(), ga = /* @__PURE__ */ new B(), fc = /* @__PURE__ */ new B(), va = /* @__PURE__ */ new B(), Rh = /* @__PURE__ */ new B(), _a = /* @__PURE__ */ new B();
|
|
25269
25269
|
class zn extends Sn {
|
|
25270
25270
|
/**
|
|
25271
25271
|
* Constructs a new mesh.
|
|
@@ -25309,12 +25309,12 @@ class zn extends Sn {
|
|
|
25309
25309
|
t.fromBufferAttribute(s, e);
|
|
25310
25310
|
const o = this.morphTargetInfluences;
|
|
25311
25311
|
if (r && o) {
|
|
25312
|
-
|
|
25312
|
+
va.set(0, 0, 0);
|
|
25313
25313
|
for (let c = 0, l = r.length; c < l; c++) {
|
|
25314
25314
|
const d = o[c], u = r[c];
|
|
25315
|
-
d !== 0 && (fc.fromBufferAttribute(u, e), a ?
|
|
25315
|
+
d !== 0 && (fc.fromBufferAttribute(u, e), a ? va.addScaledVector(fc, d) : va.addScaledVector(fc.sub(t), d));
|
|
25316
25316
|
}
|
|
25317
|
-
t.add(
|
|
25317
|
+
t.add(va);
|
|
25318
25318
|
}
|
|
25319
25319
|
return t;
|
|
25320
25320
|
}
|
|
@@ -25326,7 +25326,7 @@ class zn extends Sn {
|
|
|
25326
25326
|
*/
|
|
25327
25327
|
raycast(e, t) {
|
|
25328
25328
|
const n = this.geometry, s = this.material, r = this.matrixWorld;
|
|
25329
|
-
s !== void 0 && (n.boundingSphere === null && n.computeBoundingSphere(),
|
|
25329
|
+
s !== void 0 && (n.boundingSphere === null && n.computeBoundingSphere(), fa.copy(n.boundingSphere), fa.applyMatrix4(r), ns.copy(e.ray).recast(e.near), !(fa.containsPoint(ns.origin) === !1 && (ns.intersectSphere(fa, Ah) === null || ns.origin.distanceToSquared(Ah) > (e.far - e.near) ** 2)) && (wh.copy(r).invert(), ns.copy(e.ray).applyMatrix4(wh), !(n.boundingBox !== null && ns.intersectsBox(n.boundingBox) === !1) && this._computeIntersections(e, t, ns)));
|
|
25330
25330
|
}
|
|
25331
25331
|
_computeIntersections(e, t, n) {
|
|
25332
25332
|
let s;
|
|
@@ -25337,14 +25337,14 @@ class zn extends Sn {
|
|
|
25337
25337
|
const m = h[g], f = a[m.materialIndex], x = Math.max(m.start, p.start), E = Math.min(o.count, Math.min(m.start + m.count, p.start + p.count));
|
|
25338
25338
|
for (let _ = x, S = E; _ < S; _ += 3) {
|
|
25339
25339
|
const M = o.getX(_), A = o.getX(_ + 1), k = o.getX(_ + 2);
|
|
25340
|
-
s =
|
|
25340
|
+
s = ba(this, f, e, n, l, d, u, M, A, k), s && (s.faceIndex = Math.floor(_ / 3), s.face.materialIndex = m.materialIndex, t.push(s));
|
|
25341
25341
|
}
|
|
25342
25342
|
}
|
|
25343
25343
|
else {
|
|
25344
25344
|
const g = Math.max(0, p.start), v = Math.min(o.count, p.start + p.count);
|
|
25345
25345
|
for (let m = g, f = v; m < f; m += 3) {
|
|
25346
25346
|
const x = o.getX(m), E = o.getX(m + 1), _ = o.getX(m + 2);
|
|
25347
|
-
s =
|
|
25347
|
+
s = ba(this, a, e, n, l, d, u, x, E, _), s && (s.faceIndex = Math.floor(m / 3), t.push(s));
|
|
25348
25348
|
}
|
|
25349
25349
|
}
|
|
25350
25350
|
else if (c !== void 0)
|
|
@@ -25353,14 +25353,14 @@ class zn extends Sn {
|
|
|
25353
25353
|
const m = h[g], f = a[m.materialIndex], x = Math.max(m.start, p.start), E = Math.min(c.count, Math.min(m.start + m.count, p.start + p.count));
|
|
25354
25354
|
for (let _ = x, S = E; _ < S; _ += 3) {
|
|
25355
25355
|
const M = _, A = _ + 1, k = _ + 2;
|
|
25356
|
-
s =
|
|
25356
|
+
s = ba(this, f, e, n, l, d, u, M, A, k), s && (s.faceIndex = Math.floor(_ / 3), s.face.materialIndex = m.materialIndex, t.push(s));
|
|
25357
25357
|
}
|
|
25358
25358
|
}
|
|
25359
25359
|
else {
|
|
25360
25360
|
const g = Math.max(0, p.start), v = Math.min(c.count, p.start + p.count);
|
|
25361
25361
|
for (let m = g, f = v; m < f; m += 3) {
|
|
25362
25362
|
const x = m, E = m + 1, _ = m + 2;
|
|
25363
|
-
s =
|
|
25363
|
+
s = ba(this, a, e, n, l, d, u, x, E, _), s && (s.faceIndex = Math.floor(m / 3), t.push(s));
|
|
25364
25364
|
}
|
|
25365
25365
|
}
|
|
25366
25366
|
}
|
|
@@ -25368,20 +25368,20 @@ class zn extends Sn {
|
|
|
25368
25368
|
function ay(i, e, t, n, s, r, a, o) {
|
|
25369
25369
|
let c;
|
|
25370
25370
|
if (e.side === nn ? c = n.intersectTriangle(a, r, s, !0, o) : c = n.intersectTriangle(s, r, a, e.side === Ci, o), c === null) return null;
|
|
25371
|
-
|
|
25372
|
-
const l = t.ray.origin.distanceTo(
|
|
25371
|
+
_a.copy(o), _a.applyMatrix4(i.matrixWorld);
|
|
25372
|
+
const l = t.ray.origin.distanceTo(_a);
|
|
25373
25373
|
return l < t.near || l > t.far ? null : {
|
|
25374
25374
|
distance: l,
|
|
25375
|
-
point:
|
|
25375
|
+
point: _a.clone(),
|
|
25376
25376
|
object: i
|
|
25377
25377
|
};
|
|
25378
25378
|
}
|
|
25379
|
-
function
|
|
25380
|
-
i.getVertexPosition(o,
|
|
25381
|
-
const d = ay(i, e, t, n, ma, ga,
|
|
25379
|
+
function ba(i, e, t, n, s, r, a, o, c, l) {
|
|
25380
|
+
i.getVertexPosition(o, pa), i.getVertexPosition(c, ma), i.getVertexPosition(l, ga);
|
|
25381
|
+
const d = ay(i, e, t, n, pa, ma, ga, Rh);
|
|
25382
25382
|
if (d) {
|
|
25383
25383
|
const u = new B();
|
|
25384
|
-
On.getBarycoord(Rh, ma, ga,
|
|
25384
|
+
On.getBarycoord(Rh, pa, ma, ga, u), s && (d.uv = On.getInterpolatedAttribute(s, o, c, l, u, new st())), r && (d.uv1 = On.getInterpolatedAttribute(r, o, c, l, u, new st())), a && (d.normal = On.getInterpolatedAttribute(a, o, c, l, u, new B()), d.normal.dot(n.direction) > 0 && d.normal.multiplyScalar(-1));
|
|
25385
25385
|
const h = {
|
|
25386
25386
|
a: o,
|
|
25387
25387
|
b: c,
|
|
@@ -25389,11 +25389,11 @@ function ya(i, e, t, n, s, r, a, o, c, l) {
|
|
|
25389
25389
|
normal: new B(),
|
|
25390
25390
|
materialIndex: 0
|
|
25391
25391
|
};
|
|
25392
|
-
On.getNormal(ma, ga,
|
|
25392
|
+
On.getNormal(pa, ma, ga, h.normal), d.face = h, d.barycoord = u;
|
|
25393
25393
|
}
|
|
25394
25394
|
return d;
|
|
25395
25395
|
}
|
|
25396
|
-
class
|
|
25396
|
+
class Zr extends Gn {
|
|
25397
25397
|
/**
|
|
25398
25398
|
* Constructs a new box geometry.
|
|
25399
25399
|
*
|
|
@@ -25448,10 +25448,10 @@ class Qr extends Gn {
|
|
|
25448
25448
|
* @return {BoxGeometry} A new instance.
|
|
25449
25449
|
*/
|
|
25450
25450
|
static fromJSON(e) {
|
|
25451
|
-
return new
|
|
25451
|
+
return new Zr(e.width, e.height, e.depth, e.widthSegments, e.heightSegments, e.depthSegments);
|
|
25452
25452
|
}
|
|
25453
25453
|
}
|
|
25454
|
-
function
|
|
25454
|
+
function ar(i) {
|
|
25455
25455
|
const e = {};
|
|
25456
25456
|
for (const t in i) {
|
|
25457
25457
|
e[t] = {};
|
|
@@ -25465,7 +25465,7 @@ function or(i) {
|
|
|
25465
25465
|
function tn(i) {
|
|
25466
25466
|
const e = {};
|
|
25467
25467
|
for (let t = 0; t < i.length; t++) {
|
|
25468
|
-
const n =
|
|
25468
|
+
const n = ar(i[t]);
|
|
25469
25469
|
for (const s in n)
|
|
25470
25470
|
e[s] = n[s];
|
|
25471
25471
|
}
|
|
@@ -25481,13 +25481,13 @@ function Sm(i) {
|
|
|
25481
25481
|
const e = i.getRenderTarget();
|
|
25482
25482
|
return e === null ? i.outputColorSpace : e.isXRRenderTarget === !0 ? e.texture.colorSpace : Qe.workingColorSpace;
|
|
25483
25483
|
}
|
|
25484
|
-
const cy = { clone:
|
|
25484
|
+
const cy = { clone: ar, merge: tn };
|
|
25485
25485
|
var ly = `void main() {
|
|
25486
25486
|
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
|
|
25487
25487
|
}`, dy = `void main() {
|
|
25488
25488
|
gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
|
|
25489
25489
|
}`;
|
|
25490
|
-
class wn extends
|
|
25490
|
+
class wn extends po {
|
|
25491
25491
|
/**
|
|
25492
25492
|
* Constructs a new shader material.
|
|
25493
25493
|
*
|
|
@@ -25510,7 +25510,7 @@ class wn extends mo {
|
|
|
25510
25510
|
}, this.index0AttributeName = void 0, this.uniformsNeedUpdate = !1, this.glslVersion = null, e !== void 0 && this.setValues(e);
|
|
25511
25511
|
}
|
|
25512
25512
|
copy(e) {
|
|
25513
|
-
return super.copy(e), this.fragmentShader = e.fragmentShader, this.vertexShader = e.vertexShader, this.uniforms =
|
|
25513
|
+
return super.copy(e), this.fragmentShader = e.fragmentShader, this.vertexShader = e.vertexShader, this.uniforms = ar(e.uniforms), this.uniformsGroups = oy(e.uniformsGroups), this.defines = Object.assign({}, e.defines), this.wireframe = e.wireframe, this.wireframeLinewidth = e.wireframeLinewidth, this.fog = e.fog, this.lights = e.lights, this.clipping = e.clipping, this.extensions = Object.assign({}, e.extensions), this.glslVersion = e.glslVersion, this.defaultAttributeValues = Object.assign({}, e.defaultAttributeValues), this.index0AttributeName = e.index0AttributeName, this.uniformsNeedUpdate = e.uniformsNeedUpdate, this;
|
|
25514
25514
|
}
|
|
25515
25515
|
toJSON(e) {
|
|
25516
25516
|
const t = super.toJSON(e);
|
|
@@ -25757,7 +25757,7 @@ class Cn extends xm {
|
|
|
25757
25757
|
return t.object.fov = this.fov, t.object.zoom = this.zoom, t.object.near = this.near, t.object.far = this.far, t.object.focus = this.focus, t.object.aspect = this.aspect, this.view !== null && (t.object.view = Object.assign({}, this.view)), t.object.filmGauge = this.filmGauge, t.object.filmOffset = this.filmOffset, t;
|
|
25758
25758
|
}
|
|
25759
25759
|
}
|
|
25760
|
-
const
|
|
25760
|
+
const Fs = -90, Bs = 1;
|
|
25761
25761
|
class uy extends Sn {
|
|
25762
25762
|
/**
|
|
25763
25763
|
* Constructs a new cube camera.
|
|
@@ -25768,17 +25768,17 @@ class uy extends Sn {
|
|
|
25768
25768
|
*/
|
|
25769
25769
|
constructor(e, t, n) {
|
|
25770
25770
|
super(), this.type = "CubeCamera", this.renderTarget = n, this.coordinateSystem = null, this.activeMipmapLevel = 0;
|
|
25771
|
-
const s = new Cn(
|
|
25771
|
+
const s = new Cn(Fs, Bs, e, t);
|
|
25772
25772
|
s.layers = this.layers, this.add(s);
|
|
25773
|
-
const r = new Cn(
|
|
25773
|
+
const r = new Cn(Fs, Bs, e, t);
|
|
25774
25774
|
r.layers = this.layers, this.add(r);
|
|
25775
|
-
const a = new Cn(
|
|
25775
|
+
const a = new Cn(Fs, Bs, e, t);
|
|
25776
25776
|
a.layers = this.layers, this.add(a);
|
|
25777
|
-
const o = new Cn(
|
|
25777
|
+
const o = new Cn(Fs, Bs, e, t);
|
|
25778
25778
|
o.layers = this.layers, this.add(o);
|
|
25779
|
-
const c = new Cn(
|
|
25779
|
+
const c = new Cn(Fs, Bs, e, t);
|
|
25780
25780
|
c.layers = this.layers, this.add(c);
|
|
25781
|
-
const l = new Cn(
|
|
25781
|
+
const l = new Cn(Fs, Bs, e, t);
|
|
25782
25782
|
l.layers = this.layers, this.add(l);
|
|
25783
25783
|
}
|
|
25784
25784
|
/**
|
|
@@ -25789,7 +25789,7 @@ class uy extends Sn {
|
|
|
25789
25789
|
for (const l of t) this.remove(l);
|
|
25790
25790
|
if (e === Jn)
|
|
25791
25791
|
n.up.set(0, 1, 0), n.lookAt(1, 0, 0), s.up.set(0, 1, 0), s.lookAt(-1, 0, 0), r.up.set(0, 0, -1), r.lookAt(0, 1, 0), a.up.set(0, 0, 1), a.lookAt(0, -1, 0), o.up.set(0, 1, 0), o.lookAt(0, 0, 1), c.up.set(0, 1, 0), c.lookAt(0, 0, -1);
|
|
25792
|
-
else if (e ===
|
|
25792
|
+
else if (e === no)
|
|
25793
25793
|
n.up.set(0, -1, 0), n.lookAt(-1, 0, 0), s.up.set(0, -1, 0), s.lookAt(1, 0, 0), r.up.set(0, 0, 1), r.lookAt(0, 1, 0), a.up.set(0, 0, -1), a.lookAt(0, -1, 0), o.up.set(0, -1, 0), o.lookAt(0, 0, 1), c.up.set(0, -1, 0), c.lookAt(0, 0, -1);
|
|
25794
25794
|
else
|
|
25795
25795
|
throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: " + e);
|
|
@@ -25911,9 +25911,9 @@ class Em extends ei {
|
|
|
25911
25911
|
}
|
|
25912
25912
|
`
|
|
25913
25913
|
)
|
|
25914
|
-
}, s = new
|
|
25914
|
+
}, s = new Zr(5, 5, 5), r = new wn({
|
|
25915
25915
|
name: "CubemapFromEquirect",
|
|
25916
|
-
uniforms:
|
|
25916
|
+
uniforms: ar(n.uniforms),
|
|
25917
25917
|
vertexShader: n.vertexShader,
|
|
25918
25918
|
fragmentShader: n.fragmentShader,
|
|
25919
25919
|
side: nn,
|
|
@@ -25938,7 +25938,7 @@ class Em extends ei {
|
|
|
25938
25938
|
e.setRenderTarget(r);
|
|
25939
25939
|
}
|
|
25940
25940
|
}
|
|
25941
|
-
class
|
|
25941
|
+
class ya extends Sn {
|
|
25942
25942
|
constructor() {
|
|
25943
25943
|
super(), this.isGroup = !0, this.type = "Group";
|
|
25944
25944
|
}
|
|
@@ -25957,7 +25957,7 @@ class pc {
|
|
|
25957
25957
|
* @return {Group} A group representing the hand space of the XR controller.
|
|
25958
25958
|
*/
|
|
25959
25959
|
getHandSpace() {
|
|
25960
|
-
return this._hand === null && (this._hand = new
|
|
25960
|
+
return this._hand === null && (this._hand = new ya(), this._hand.matrixAutoUpdate = !1, this._hand.visible = !1, this._hand.joints = {}, this._hand.inputState = { pinching: !1 }), this._hand;
|
|
25961
25961
|
}
|
|
25962
25962
|
/**
|
|
25963
25963
|
* Returns a group representing the target ray space of the XR controller.
|
|
@@ -25965,7 +25965,7 @@ class pc {
|
|
|
25965
25965
|
* @return {Group} A group representing the target ray space of the XR controller.
|
|
25966
25966
|
*/
|
|
25967
25967
|
getTargetRaySpace() {
|
|
25968
|
-
return this._targetRay === null && (this._targetRay = new
|
|
25968
|
+
return this._targetRay === null && (this._targetRay = new ya(), this._targetRay.matrixAutoUpdate = !1, this._targetRay.visible = !1, this._targetRay.hasLinearVelocity = !1, this._targetRay.linearVelocity = new B(), this._targetRay.hasAngularVelocity = !1, this._targetRay.angularVelocity = new B()), this._targetRay;
|
|
25969
25969
|
}
|
|
25970
25970
|
/**
|
|
25971
25971
|
* Returns a group representing the grip space of the XR controller.
|
|
@@ -25973,7 +25973,7 @@ class pc {
|
|
|
25973
25973
|
* @return {Group} A group representing the grip space of the XR controller.
|
|
25974
25974
|
*/
|
|
25975
25975
|
getGripSpace() {
|
|
25976
|
-
return this._grip === null && (this._grip = new
|
|
25976
|
+
return this._grip === null && (this._grip = new ya(), this._grip.matrixAutoUpdate = !1, this._grip.visible = !1, this._grip.hasLinearVelocity = !1, this._grip.linearVelocity = new B(), this._grip.hasAngularVelocity = !1, this._grip.angularVelocity = new B()), this._grip;
|
|
25977
25977
|
}
|
|
25978
25978
|
/**
|
|
25979
25979
|
* Dispatches the given event to the groups representing
|
|
@@ -26055,7 +26055,7 @@ class pc {
|
|
|
26055
26055
|
*/
|
|
26056
26056
|
_getHandJoint(e, t) {
|
|
26057
26057
|
if (e.joints[t.jointName] === void 0) {
|
|
26058
|
-
const n = new
|
|
26058
|
+
const n = new ya();
|
|
26059
26059
|
n.matrixAutoUpdate = !1, n.visible = !1, e.joints[t.jointName] = n, e.add(n);
|
|
26060
26060
|
}
|
|
26061
26061
|
return e.joints[t.jointName];
|
|
@@ -26308,7 +26308,7 @@ class os {
|
|
|
26308
26308
|
return new this.constructor().copy(this);
|
|
26309
26309
|
}
|
|
26310
26310
|
}
|
|
26311
|
-
const is = /* @__PURE__ */ new Nd(), vy = /* @__PURE__ */ new st(0.5, 0.5),
|
|
26311
|
+
const is = /* @__PURE__ */ new Nd(), vy = /* @__PURE__ */ new st(0.5, 0.5), Sa = /* @__PURE__ */ new B();
|
|
26312
26312
|
class Cm {
|
|
26313
26313
|
/**
|
|
26314
26314
|
* Constructs a new frustum.
|
|
@@ -26364,7 +26364,7 @@ class Cm {
|
|
|
26364
26364
|
s[4].setComponents(c, h, m, _).normalize(), s[5].setComponents(l - c, p - h, f - m, S - _).normalize();
|
|
26365
26365
|
else if (s[4].setComponents(l - c, p - h, f - m, S - _).normalize(), t === Jn)
|
|
26366
26366
|
s[5].setComponents(l + c, p + h, f + m, S + _).normalize();
|
|
26367
|
-
else if (t ===
|
|
26367
|
+
else if (t === no)
|
|
26368
26368
|
s[5].setComponents(c, h, m, _).normalize();
|
|
26369
26369
|
else
|
|
26370
26370
|
throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: " + t);
|
|
@@ -26421,7 +26421,7 @@ class Cm {
|
|
|
26421
26421
|
const t = this.planes;
|
|
26422
26422
|
for (let n = 0; n < 6; n++) {
|
|
26423
26423
|
const s = t[n];
|
|
26424
|
-
if (
|
|
26424
|
+
if (Sa.x = s.normal.x > 0 ? e.max.x : e.min.x, Sa.y = s.normal.y > 0 ? e.max.y : e.min.y, Sa.z = s.normal.z > 0 ? e.max.z : e.min.z, s.distanceToPoint(Sa) < 0)
|
|
26425
26425
|
return !1;
|
|
26426
26426
|
}
|
|
26427
26427
|
return !0;
|
|
@@ -26448,7 +26448,7 @@ class Cm {
|
|
|
26448
26448
|
return new this.constructor().copy(this);
|
|
26449
26449
|
}
|
|
26450
26450
|
}
|
|
26451
|
-
class
|
|
26451
|
+
class jr extends sn {
|
|
26452
26452
|
/**
|
|
26453
26453
|
* Constructs a new depth texture.
|
|
26454
26454
|
*
|
|
@@ -26478,7 +26478,7 @@ class Xr extends sn {
|
|
|
26478
26478
|
return this.compareFunction !== null && (t.compareFunction = this.compareFunction), t;
|
|
26479
26479
|
}
|
|
26480
26480
|
}
|
|
26481
|
-
class _y extends
|
|
26481
|
+
class _y extends jr {
|
|
26482
26482
|
/**
|
|
26483
26483
|
* Constructs a new cube depth texture.
|
|
26484
26484
|
*
|
|
@@ -26740,7 +26740,7 @@ class Od extends Ud {
|
|
|
26740
26740
|
return new Od(e.radius, e.detail);
|
|
26741
26741
|
}
|
|
26742
26742
|
}
|
|
26743
|
-
class
|
|
26743
|
+
class mo extends Gn {
|
|
26744
26744
|
/**
|
|
26745
26745
|
* Constructs a new plane geometry.
|
|
26746
26746
|
*
|
|
@@ -26782,7 +26782,7 @@ class go extends Gn {
|
|
|
26782
26782
|
* @return {PlaneGeometry} A new instance.
|
|
26783
26783
|
*/
|
|
26784
26784
|
static fromJSON(e) {
|
|
26785
|
-
return new
|
|
26785
|
+
return new mo(e.width, e.height, e.widthSegments, e.heightSegments);
|
|
26786
26786
|
}
|
|
26787
26787
|
}
|
|
26788
26788
|
class Fd extends Gn {
|
|
@@ -26855,7 +26855,7 @@ class by extends wn {
|
|
|
26855
26855
|
super(e), this.isRawShaderMaterial = !0, this.type = "RawShaderMaterial";
|
|
26856
26856
|
}
|
|
26857
26857
|
}
|
|
26858
|
-
class yy extends
|
|
26858
|
+
class yy extends po {
|
|
26859
26859
|
/**
|
|
26860
26860
|
* Constructs a new mesh depth material.
|
|
26861
26861
|
*
|
|
@@ -26872,7 +26872,7 @@ class yy extends mo {
|
|
|
26872
26872
|
return super.copy(e), this.depthPacking = e.depthPacking, this.map = e.map, this.alphaMap = e.alphaMap, this.displacementMap = e.displacementMap, this.displacementScale = e.displacementScale, this.displacementBias = e.displacementBias, this.wireframe = e.wireframe, this.wireframeLinewidth = e.wireframeLinewidth, this;
|
|
26873
26873
|
}
|
|
26874
26874
|
}
|
|
26875
|
-
class Sy extends
|
|
26875
|
+
class Sy extends po {
|
|
26876
26876
|
/**
|
|
26877
26877
|
* Constructs a new mesh distance material.
|
|
26878
26878
|
*
|
|
@@ -27020,7 +27020,7 @@ function Ih(i, e, t, n) {
|
|
|
27020
27020
|
return i * e / s.components * s.byteLength;
|
|
27021
27021
|
case Rd:
|
|
27022
27022
|
return i * e / s.components * s.byteLength;
|
|
27023
|
-
case
|
|
27023
|
+
case sr:
|
|
27024
27024
|
return i * e * 2 / s.components * s.byteLength;
|
|
27025
27025
|
case Pd:
|
|
27026
27026
|
return i * e * 2 / s.components * s.byteLength;
|
|
@@ -27031,11 +27031,11 @@ function Ih(i, e, t, n) {
|
|
|
27031
27031
|
case kd:
|
|
27032
27032
|
return i * e * 4 / s.components * s.byteLength;
|
|
27033
27033
|
// https://registry.khronos.org/webgl/extensions/WEBGL_compressed_texture_s3tc_srgb/
|
|
27034
|
+
case Ba:
|
|
27034
27035
|
case Va:
|
|
27035
|
-
case za:
|
|
27036
27036
|
return Math.floor((i + 3) / 4) * Math.floor((e + 3) / 4) * 8;
|
|
27037
|
+
case za:
|
|
27037
27038
|
case Ga:
|
|
27038
|
-
case Ha:
|
|
27039
27039
|
return Math.floor((i + 3) / 4) * Math.floor((e + 3) / 4) * 16;
|
|
27040
27040
|
// https://registry.khronos.org/webgl/extensions/WEBGL_compressed_texture_pvrtc/
|
|
27041
27041
|
case vl:
|
|
@@ -27105,7 +27105,7 @@ function Ey(i) {
|
|
|
27105
27105
|
case Mn:
|
|
27106
27106
|
case om:
|
|
27107
27107
|
return { byteLength: 1, components: 1 };
|
|
27108
|
-
case
|
|
27108
|
+
case Hr:
|
|
27109
27109
|
case cm:
|
|
27110
27110
|
case Mi:
|
|
27111
27111
|
return { byteLength: 2, components: 1 };
|
|
@@ -31396,7 +31396,7 @@ Xn.physical = {
|
|
|
31396
31396
|
vertexShader: Ge.meshphysical_vert,
|
|
31397
31397
|
fragmentShader: Ge.meshphysical_frag
|
|
31398
31398
|
};
|
|
31399
|
-
const
|
|
31399
|
+
const xa = { r: 0, b: 0, g: 0 }, ss = /* @__PURE__ */ new Ai(), rT = /* @__PURE__ */ new Vt();
|
|
31400
31400
|
function aT(i, e, t, n, s, r, a) {
|
|
31401
31401
|
const o = new Je(0);
|
|
31402
31402
|
let c = r === !0 ? 0 : 1, l, d, u = null, h = 0, p = null;
|
|
@@ -31413,11 +31413,11 @@ function aT(i, e, t, n, s, r, a) {
|
|
|
31413
31413
|
}
|
|
31414
31414
|
function m(E, _) {
|
|
31415
31415
|
const S = g(_);
|
|
31416
|
-
S && (S.isCubeTexture || S.mapping ===
|
|
31417
|
-
new
|
|
31416
|
+
S && (S.isCubeTexture || S.mapping === fo) ? (d === void 0 && (d = new zn(
|
|
31417
|
+
new Zr(1, 1, 1),
|
|
31418
31418
|
new wn({
|
|
31419
31419
|
name: "BackgroundCubeMaterial",
|
|
31420
|
-
uniforms:
|
|
31420
|
+
uniforms: ar(Xn.backgroundCube.uniforms),
|
|
31421
31421
|
vertexShader: Xn.backgroundCube.vertexShader,
|
|
31422
31422
|
fragmentShader: Xn.backgroundCube.fragmentShader,
|
|
31423
31423
|
side: nn,
|
|
@@ -31433,10 +31433,10 @@ function aT(i, e, t, n, s, r, a) {
|
|
|
31433
31433
|
return this.uniforms.envMap.value;
|
|
31434
31434
|
}
|
|
31435
31435
|
}), s.update(d)), ss.copy(_.backgroundRotation), ss.x *= -1, ss.y *= -1, ss.z *= -1, S.isCubeTexture && S.isRenderTargetTexture === !1 && (ss.y *= -1, ss.z *= -1), d.material.uniforms.envMap.value = S, d.material.uniforms.flipEnvMap.value = S.isCubeTexture && S.isRenderTargetTexture === !1 ? -1 : 1, d.material.uniforms.backgroundBlurriness.value = _.backgroundBlurriness, d.material.uniforms.backgroundIntensity.value = _.backgroundIntensity, d.material.uniforms.backgroundRotation.value.setFromMatrix4(rT.makeRotationFromEuler(ss)), d.material.toneMapped = Qe.getTransfer(S.colorSpace) !== lt, (u !== S || h !== S.version || p !== i.toneMapping) && (d.material.needsUpdate = !0, u = S, h = S.version, p = i.toneMapping), d.layers.enableAll(), E.unshift(d, d.geometry, d.material, 0, 0, null)) : S && S.isTexture && (l === void 0 && (l = new zn(
|
|
31436
|
-
new
|
|
31436
|
+
new mo(2, 2),
|
|
31437
31437
|
new wn({
|
|
31438
31438
|
name: "BackgroundMaterial",
|
|
31439
|
-
uniforms:
|
|
31439
|
+
uniforms: ar(Xn.background.uniforms),
|
|
31440
31440
|
vertexShader: Xn.background.vertexShader,
|
|
31441
31441
|
fragmentShader: Xn.background.fragmentShader,
|
|
31442
31442
|
side: Ci,
|
|
@@ -31452,7 +31452,7 @@ function aT(i, e, t, n, s, r, a) {
|
|
|
31452
31452
|
}), s.update(l)), l.material.uniforms.t2D.value = S, l.material.uniforms.backgroundIntensity.value = _.backgroundIntensity, l.material.toneMapped = Qe.getTransfer(S.colorSpace) !== lt, S.matrixAutoUpdate === !0 && S.updateMatrix(), l.material.uniforms.uvTransform.value.copy(S.matrix), (u !== S || h !== S.version || p !== i.toneMapping) && (l.material.needsUpdate = !0, u = S, h = S.version, p = i.toneMapping), l.layers.enableAll(), E.unshift(l, l.geometry, l.material, 0, 0, null));
|
|
31453
31453
|
}
|
|
31454
31454
|
function f(E, _) {
|
|
31455
|
-
E.getRGB(
|
|
31455
|
+
E.getRGB(xa, Sm(i)), n.buffers.color.setClear(xa.r, xa.g, xa.b, _, a);
|
|
31456
31456
|
}
|
|
31457
31457
|
function x() {
|
|
31458
31458
|
d !== void 0 && (d.geometry.dispose(), d.material.dispose(), d = void 0), l !== void 0 && (l.geometry.dispose(), l.material.dispose(), l = void 0);
|
|
@@ -31825,7 +31825,7 @@ function dT(i) {
|
|
|
31825
31825
|
function uT(i) {
|
|
31826
31826
|
let e = /* @__PURE__ */ new WeakMap();
|
|
31827
31827
|
function t(a, o) {
|
|
31828
|
-
return o === hl ? a.mapping = Ss : o === fl && (a.mapping =
|
|
31828
|
+
return o === hl ? a.mapping = Ss : o === fl && (a.mapping = ir), a;
|
|
31829
31829
|
}
|
|
31830
31830
|
function n(a) {
|
|
31831
31831
|
if (a && a.isTexture) {
|
|
@@ -31859,7 +31859,7 @@ function uT(i) {
|
|
|
31859
31859
|
dispose: r
|
|
31860
31860
|
};
|
|
31861
31861
|
}
|
|
31862
|
-
const Wi = 4, Dh = [0.125, 0.215, 0.35, 0.446, 0.526, 0.582], ds = 20, hT = 256,
|
|
31862
|
+
const Wi = 4, Dh = [0.125, 0.215, 0.35, 0.446, 0.526, 0.582], ds = 20, hT = 256, Tr = /* @__PURE__ */ new wm(), Lh = /* @__PURE__ */ new Je();
|
|
31863
31863
|
let gc = null, vc = 0, _c = 0, bc = !1;
|
|
31864
31864
|
const fT = /* @__PURE__ */ new B();
|
|
31865
31865
|
class Nh {
|
|
@@ -31951,10 +31951,10 @@ class Nh {
|
|
|
31951
31951
|
this._lodMeshes[e].geometry.dispose();
|
|
31952
31952
|
}
|
|
31953
31953
|
_cleanup(e) {
|
|
31954
|
-
this._renderer.setRenderTarget(gc, vc, _c), this._renderer.xr.enabled = bc, e.scissorTest = !1,
|
|
31954
|
+
this._renderer.setRenderTarget(gc, vc, _c), this._renderer.xr.enabled = bc, e.scissorTest = !1, Vs(e, 0, 0, e.width, e.height);
|
|
31955
31955
|
}
|
|
31956
31956
|
_fromTexture(e, t) {
|
|
31957
|
-
e.mapping === Ss || e.mapping ===
|
|
31957
|
+
e.mapping === Ss || e.mapping === ir ? this._setSize(e.image.length === 0 ? 16 : e.image[0].width || e.image[0].image.width) : this._setSize(e.image.width / 4), gc = this._renderer.getRenderTarget(), vc = this._renderer.getActiveCubeFace(), _c = this._renderer.getActiveMipmapLevel(), bc = this._renderer.xr.enabled, this._renderer.xr.enabled = !1;
|
|
31958
31958
|
const n = t || this._allocateTargets();
|
|
31959
31959
|
return this._textureToCubeUV(e, n), this._applyPMREM(n), this._cleanup(n), n;
|
|
31960
31960
|
}
|
|
@@ -31965,7 +31965,7 @@ class Nh {
|
|
|
31965
31965
|
generateMipmaps: !1,
|
|
31966
31966
|
type: Mi,
|
|
31967
31967
|
format: Bn,
|
|
31968
|
-
colorSpace:
|
|
31968
|
+
colorSpace: rr,
|
|
31969
31969
|
depthBuffer: !1
|
|
31970
31970
|
}, s = Uh(e, t, n);
|
|
31971
31971
|
if (this._pingPongRenderTarget === null || this._pingPongRenderTarget.width !== e || this._pingPongRenderTarget.height !== t) {
|
|
@@ -31977,12 +31977,12 @@ class Nh {
|
|
|
31977
31977
|
}
|
|
31978
31978
|
_compileMaterial(e) {
|
|
31979
31979
|
const t = new zn(new Gn(), e);
|
|
31980
|
-
this._renderer.compile(t,
|
|
31980
|
+
this._renderer.compile(t, Tr);
|
|
31981
31981
|
}
|
|
31982
31982
|
_sceneToCubeUV(e, t, n, s, r) {
|
|
31983
31983
|
const c = new Cn(90, 1, t, n), l = [1, -1, 1, 1, 1, 1], d = [1, 1, 1, -1, -1, -1], u = this._renderer, h = u.autoClear, p = u.toneMapping;
|
|
31984
31984
|
u.getClearColor(Lh), u.toneMapping = Qn, u.autoClear = !1, u.state.buffers.depth.getReversed() && (u.setRenderTarget(s), u.clearDepth(), u.setRenderTarget(null)), this._backgroundBox === null && (this._backgroundBox = new zn(
|
|
31985
|
-
new
|
|
31985
|
+
new Zr(),
|
|
31986
31986
|
new _m({
|
|
31987
31987
|
name: "PMREM.Background",
|
|
31988
31988
|
side: nn,
|
|
@@ -31998,19 +31998,19 @@ class Nh {
|
|
|
31998
31998
|
const _ = E % 3;
|
|
31999
31999
|
_ === 0 ? (c.up.set(0, l[E], 0), c.position.set(r.x, r.y, r.z), c.lookAt(r.x + d[E], r.y, r.z)) : _ === 1 ? (c.up.set(0, 0, l[E]), c.position.set(r.x, r.y, r.z), c.lookAt(r.x, r.y + d[E], r.z)) : (c.up.set(0, l[E], 0), c.position.set(r.x, r.y, r.z), c.lookAt(r.x, r.y, r.z + d[E]));
|
|
32000
32000
|
const S = this._cubeSize;
|
|
32001
|
-
|
|
32001
|
+
Vs(s, _ * S, E > 2 ? S : 0, S, S), u.setRenderTarget(s), f && u.render(v, c), u.render(e, c);
|
|
32002
32002
|
}
|
|
32003
32003
|
u.toneMapping = p, u.autoClear = h, e.background = x;
|
|
32004
32004
|
}
|
|
32005
32005
|
_textureToCubeUV(e, t) {
|
|
32006
|
-
const n = this._renderer, s = e.mapping === Ss || e.mapping ===
|
|
32006
|
+
const n = this._renderer, s = e.mapping === Ss || e.mapping === ir;
|
|
32007
32007
|
s ? (this._cubemapMaterial === null && (this._cubemapMaterial = Fh()), this._cubemapMaterial.uniforms.flipEnvMap.value = e.isRenderTargetTexture === !1 ? -1 : 1) : this._equirectMaterial === null && (this._equirectMaterial = Oh());
|
|
32008
32008
|
const r = s ? this._cubemapMaterial : this._equirectMaterial, a = this._lodMeshes[0];
|
|
32009
32009
|
a.material = r;
|
|
32010
32010
|
const o = r.uniforms;
|
|
32011
32011
|
o.envMap.value = e;
|
|
32012
32012
|
const c = this._cubeSize;
|
|
32013
|
-
|
|
32013
|
+
Vs(t, 0, 0, 3 * c, 2 * c), n.setRenderTarget(t), n.render(a, Tr);
|
|
32014
32014
|
}
|
|
32015
32015
|
_applyPMREM(e) {
|
|
32016
32016
|
const t = this._renderer, n = t.autoClear;
|
|
@@ -32035,7 +32035,7 @@ class Nh {
|
|
|
32035
32035
|
const s = this._renderer, r = this._pingPongRenderTarget, a = this._ggxMaterial, o = this._lodMeshes[n];
|
|
32036
32036
|
o.material = a;
|
|
32037
32037
|
const c = a.uniforms, l = n / (this._lodMeshes.length - 1), d = t / (this._lodMeshes.length - 1), u = Math.sqrt(l * l - d * d), h = 0 + l * 1.25, p = u * h, { _lodMax: g } = this, v = this._sizeLods[n], m = 3 * v * (n > g - Wi ? n - g + Wi : 0), f = 4 * (this._cubeSize - v);
|
|
32038
|
-
c.envMap.value = e.texture, c.roughness.value = p, c.mipInt.value = g - t,
|
|
32038
|
+
c.envMap.value = e.texture, c.roughness.value = p, c.mipInt.value = g - t, Vs(r, m, f, 3 * v, 2 * v), s.setRenderTarget(r), s.render(o, Tr), c.envMap.value = r.texture, c.roughness.value = 0, c.mipInt.value = g - n, Vs(e, m, f, 3 * v, 2 * v), s.setRenderTarget(e), s.render(o, Tr);
|
|
32039
32039
|
}
|
|
32040
32040
|
/**
|
|
32041
32041
|
* This is a two-pass Gaussian blur for a cubemap. Normally this is done
|
|
@@ -32094,7 +32094,7 @@ class Nh {
|
|
|
32094
32094
|
const { _lodMax: E } = this;
|
|
32095
32095
|
h.dTheta.value = g, h.mipInt.value = E - n;
|
|
32096
32096
|
const _ = this._sizeLods[s], S = 3 * _ * (s > E - Wi ? s - E + Wi : 0), M = 4 * (this._cubeSize - _);
|
|
32097
|
-
|
|
32097
|
+
Vs(t, S, M, 3 * _, 2 * _), c.setRenderTarget(t), c.render(u, Tr);
|
|
32098
32098
|
}
|
|
32099
32099
|
}
|
|
32100
32100
|
function pT(i) {
|
|
@@ -32139,9 +32139,9 @@ function pT(i) {
|
|
|
32139
32139
|
}
|
|
32140
32140
|
function Uh(i, e, t) {
|
|
32141
32141
|
const n = new ei(i, e, t);
|
|
32142
|
-
return n.texture.mapping =
|
|
32142
|
+
return n.texture.mapping = fo, n.texture.name = "PMREM.cubeUv", n.scissorTest = !0, n;
|
|
32143
32143
|
}
|
|
32144
|
-
function
|
|
32144
|
+
function Vs(i, e, t, n, s) {
|
|
32145
32145
|
i.viewport.set(e, t, n, s), i.scissor.set(e, t, n, s);
|
|
32146
32146
|
}
|
|
32147
32147
|
function mT(i, e, t) {
|
|
@@ -32158,7 +32158,7 @@ function mT(i, e, t) {
|
|
|
32158
32158
|
roughness: { value: 0 },
|
|
32159
32159
|
mipInt: { value: 0 }
|
|
32160
32160
|
},
|
|
32161
|
-
vertexShader:
|
|
32161
|
+
vertexShader: go(),
|
|
32162
32162
|
fragmentShader: (
|
|
32163
32163
|
/* glsl */
|
|
32164
32164
|
`
|
|
@@ -32295,7 +32295,7 @@ function gT(i, e, t) {
|
|
|
32295
32295
|
mipInt: { value: 0 },
|
|
32296
32296
|
poleAxis: { value: s }
|
|
32297
32297
|
},
|
|
32298
|
-
vertexShader:
|
|
32298
|
+
vertexShader: go(),
|
|
32299
32299
|
fragmentShader: (
|
|
32300
32300
|
/* glsl */
|
|
32301
32301
|
`
|
|
@@ -32371,7 +32371,7 @@ function Oh() {
|
|
|
32371
32371
|
uniforms: {
|
|
32372
32372
|
envMap: { value: null }
|
|
32373
32373
|
},
|
|
32374
|
-
vertexShader:
|
|
32374
|
+
vertexShader: go(),
|
|
32375
32375
|
fragmentShader: (
|
|
32376
32376
|
/* glsl */
|
|
32377
32377
|
`
|
|
@@ -32407,7 +32407,7 @@ function Fh() {
|
|
|
32407
32407
|
envMap: { value: null },
|
|
32408
32408
|
flipEnvMap: { value: -1 }
|
|
32409
32409
|
},
|
|
32410
|
-
vertexShader:
|
|
32410
|
+
vertexShader: go(),
|
|
32411
32411
|
fragmentShader: (
|
|
32412
32412
|
/* glsl */
|
|
32413
32413
|
`
|
|
@@ -32433,7 +32433,7 @@ function Fh() {
|
|
|
32433
32433
|
depthWrite: !1
|
|
32434
32434
|
});
|
|
32435
32435
|
}
|
|
32436
|
-
function
|
|
32436
|
+
function go() {
|
|
32437
32437
|
return (
|
|
32438
32438
|
/* glsl */
|
|
32439
32439
|
`
|
|
@@ -32498,7 +32498,7 @@ function vT(i) {
|
|
|
32498
32498
|
let e = /* @__PURE__ */ new WeakMap(), t = null;
|
|
32499
32499
|
function n(o) {
|
|
32500
32500
|
if (o && o.isTexture) {
|
|
32501
|
-
const c = o.mapping, l = c === hl || c === fl, d = c === Ss || c ===
|
|
32501
|
+
const c = o.mapping, l = c === hl || c === fl, d = c === Ss || c === ir;
|
|
32502
32502
|
if (l || d) {
|
|
32503
32503
|
let u = e.get(o);
|
|
32504
32504
|
const h = u !== void 0 ? u.texture.pmremVersion : 0;
|
|
@@ -32552,7 +32552,7 @@ function _T(i) {
|
|
|
32552
32552
|
},
|
|
32553
32553
|
get: function(n) {
|
|
32554
32554
|
const s = t(n);
|
|
32555
|
-
return s === null &&
|
|
32555
|
+
return s === null && qr("WebGLRenderer: " + n + " extension not supported."), s;
|
|
32556
32556
|
}
|
|
32557
32557
|
};
|
|
32558
32558
|
}
|
|
@@ -32892,8 +32892,8 @@ function CT(i, e, t, n, s) {
|
|
|
32892
32892
|
r.dispose(), a.dispose(), o.dispose(), c.dispose();
|
|
32893
32893
|
};
|
|
32894
32894
|
}
|
|
32895
|
-
const Rm = /* @__PURE__ */ new sn(), Yl = /* @__PURE__ */ new
|
|
32896
|
-
function
|
|
32895
|
+
const Rm = /* @__PURE__ */ new sn(), Yl = /* @__PURE__ */ new jr(1, 1), Pm = /* @__PURE__ */ new mm(), km = /* @__PURE__ */ new $b(), Im = /* @__PURE__ */ new Tm(), Bh = [], Vh = [], zh = new Float32Array(16), Gh = new Float32Array(9), Hh = new Float32Array(4);
|
|
32896
|
+
function lr(i, e, t) {
|
|
32897
32897
|
const n = i[0];
|
|
32898
32898
|
if (n <= 0 || n > 0) return i;
|
|
32899
32899
|
const s = e * t;
|
|
@@ -32915,7 +32915,7 @@ function Ht(i, e) {
|
|
|
32915
32915
|
for (let t = 0, n = e.length; t < n; t++)
|
|
32916
32916
|
i[t] = e[t];
|
|
32917
32917
|
}
|
|
32918
|
-
function
|
|
32918
|
+
function vo(i, e) {
|
|
32919
32919
|
let t = Vh[e];
|
|
32920
32920
|
t === void 0 && (t = new Int32Array(e), Vh[e] = t);
|
|
32921
32921
|
for (let n = 0; n !== e; ++n)
|
|
@@ -33154,27 +33154,27 @@ function jT(i, e) {
|
|
|
33154
33154
|
i.uniform1fv(this.addr, e);
|
|
33155
33155
|
}
|
|
33156
33156
|
function XT(i, e) {
|
|
33157
|
-
const t =
|
|
33157
|
+
const t = lr(e, this.size, 2);
|
|
33158
33158
|
i.uniform2fv(this.addr, t);
|
|
33159
33159
|
}
|
|
33160
33160
|
function $T(i, e) {
|
|
33161
|
-
const t =
|
|
33161
|
+
const t = lr(e, this.size, 3);
|
|
33162
33162
|
i.uniform3fv(this.addr, t);
|
|
33163
33163
|
}
|
|
33164
33164
|
function YT(i, e) {
|
|
33165
|
-
const t =
|
|
33165
|
+
const t = lr(e, this.size, 4);
|
|
33166
33166
|
i.uniform4fv(this.addr, t);
|
|
33167
33167
|
}
|
|
33168
33168
|
function KT(i, e) {
|
|
33169
|
-
const t =
|
|
33169
|
+
const t = lr(e, this.size, 4);
|
|
33170
33170
|
i.uniformMatrix2fv(this.addr, !1, t);
|
|
33171
33171
|
}
|
|
33172
33172
|
function JT(i, e) {
|
|
33173
|
-
const t =
|
|
33173
|
+
const t = lr(e, this.size, 9);
|
|
33174
33174
|
i.uniformMatrix3fv(this.addr, !1, t);
|
|
33175
33175
|
}
|
|
33176
33176
|
function ZT(i, e) {
|
|
33177
|
-
const t =
|
|
33177
|
+
const t = lr(e, this.size, 16);
|
|
33178
33178
|
i.uniformMatrix4fv(this.addr, !1, t);
|
|
33179
33179
|
}
|
|
33180
33180
|
function QT(i, e) {
|
|
@@ -33202,7 +33202,7 @@ function aE(i, e) {
|
|
|
33202
33202
|
i.uniform4uiv(this.addr, e);
|
|
33203
33203
|
}
|
|
33204
33204
|
function oE(i, e, t) {
|
|
33205
|
-
const n = this.cache, s = e.length, r =
|
|
33205
|
+
const n = this.cache, s = e.length, r = vo(t, s);
|
|
33206
33206
|
Gt(n, r) || (i.uniform1iv(this.addr, r), Ht(n, r));
|
|
33207
33207
|
let a;
|
|
33208
33208
|
this.type === i.SAMPLER_2D_SHADOW ? a = Yl : a = Rm;
|
|
@@ -33210,19 +33210,19 @@ function oE(i, e, t) {
|
|
|
33210
33210
|
t.setTexture2D(e[o] || a, r[o]);
|
|
33211
33211
|
}
|
|
33212
33212
|
function cE(i, e, t) {
|
|
33213
|
-
const n = this.cache, s = e.length, r =
|
|
33213
|
+
const n = this.cache, s = e.length, r = vo(t, s);
|
|
33214
33214
|
Gt(n, r) || (i.uniform1iv(this.addr, r), Ht(n, r));
|
|
33215
33215
|
for (let a = 0; a !== s; ++a)
|
|
33216
33216
|
t.setTexture3D(e[a] || km, r[a]);
|
|
33217
33217
|
}
|
|
33218
33218
|
function lE(i, e, t) {
|
|
33219
|
-
const n = this.cache, s = e.length, r =
|
|
33219
|
+
const n = this.cache, s = e.length, r = vo(t, s);
|
|
33220
33220
|
Gt(n, r) || (i.uniform1iv(this.addr, r), Ht(n, r));
|
|
33221
33221
|
for (let a = 0; a !== s; ++a)
|
|
33222
33222
|
t.setTextureCube(e[a] || Im, r[a]);
|
|
33223
33223
|
}
|
|
33224
33224
|
function dE(i, e, t) {
|
|
33225
|
-
const n = this.cache, s = e.length, r =
|
|
33225
|
+
const n = this.cache, s = e.length, r = vo(t, s);
|
|
33226
33226
|
Gt(n, r) || (i.uniform1iv(this.addr, r), Ht(n, r));
|
|
33227
33227
|
for (let a = 0; a !== s; ++a)
|
|
33228
33228
|
t.setTexture2DArray(e[a] || Pm, r[a]);
|
|
@@ -33353,7 +33353,7 @@ function mE(i, e, t) {
|
|
|
33353
33353
|
}
|
|
33354
33354
|
}
|
|
33355
33355
|
}
|
|
33356
|
-
class
|
|
33356
|
+
class Ha {
|
|
33357
33357
|
constructor(e, t) {
|
|
33358
33358
|
this.seq = [], this.map = {};
|
|
33359
33359
|
const n = e.getProgramParameter(t, e.ACTIVE_UNIFORMS);
|
|
@@ -33410,7 +33410,7 @@ function bE(i) {
|
|
|
33410
33410
|
Qe._getMatrix(jh, Qe.workingColorSpace, i);
|
|
33411
33411
|
const e = `mat3( ${jh.elements.map((t) => t.toFixed(4))} )`;
|
|
33412
33412
|
switch (Qe.getTransfer(i)) {
|
|
33413
|
-
case
|
|
33413
|
+
case to:
|
|
33414
33414
|
return [e, "LinearTransferOETF"];
|
|
33415
33415
|
case lt:
|
|
33416
33416
|
return [e, "sRGBTransferOETF"];
|
|
@@ -33454,10 +33454,10 @@ function xE(i, e) {
|
|
|
33454
33454
|
const t = SE[e];
|
|
33455
33455
|
return t === void 0 ? (Oe("WebGLProgram: Unsupported toneMapping:", e), "vec3 " + i + "( vec3 color ) { return LinearToneMapping( color ); }") : "vec3 " + i + "( vec3 color ) { return " + t + "ToneMapping( color ); }";
|
|
33456
33456
|
}
|
|
33457
|
-
const
|
|
33457
|
+
const Ta = /* @__PURE__ */ new B();
|
|
33458
33458
|
function TE() {
|
|
33459
|
-
Qe.getLuminanceCoefficients(
|
|
33460
|
-
const i =
|
|
33459
|
+
Qe.getLuminanceCoefficients(Ta);
|
|
33460
|
+
const i = Ta.x.toFixed(4), e = Ta.y.toFixed(4), t = Ta.z.toFixed(4);
|
|
33461
33461
|
return [
|
|
33462
33462
|
"float luminance( const in vec3 rgb ) {",
|
|
33463
33463
|
` const vec3 weights = vec3( ${i}, ${e}, ${t} );`,
|
|
@@ -33470,7 +33470,7 @@ function EE(i) {
|
|
|
33470
33470
|
return [
|
|
33471
33471
|
i.extensionClipCullDistance ? "#extension GL_ANGLE_clip_cull_distance : require" : "",
|
|
33472
33472
|
i.extensionMultiDraw ? "#extension GL_ANGLE_multi_draw : require" : ""
|
|
33473
|
-
].filter(
|
|
33473
|
+
].filter(Ar).join(`
|
|
33474
33474
|
`);
|
|
33475
33475
|
}
|
|
33476
33476
|
function CE(i) {
|
|
@@ -33495,7 +33495,7 @@ function ME(i, e) {
|
|
|
33495
33495
|
}
|
|
33496
33496
|
return t;
|
|
33497
33497
|
}
|
|
33498
|
-
function
|
|
33498
|
+
function Ar(i) {
|
|
33499
33499
|
return i !== "";
|
|
33500
33500
|
}
|
|
33501
33501
|
function $h(i, e) {
|
|
@@ -33556,22 +33556,22 @@ function Jh(i) {
|
|
|
33556
33556
|
#define LOW_PRECISION`), e;
|
|
33557
33557
|
}
|
|
33558
33558
|
const IE = {
|
|
33559
|
-
[
|
|
33560
|
-
[
|
|
33559
|
+
[Fa]: "SHADOWMAP_TYPE_PCF",
|
|
33560
|
+
[wr]: "SHADOWMAP_TYPE_VSM"
|
|
33561
33561
|
};
|
|
33562
33562
|
function DE(i) {
|
|
33563
33563
|
return IE[i.shadowMapType] || "SHADOWMAP_TYPE_BASIC";
|
|
33564
33564
|
}
|
|
33565
33565
|
const LE = {
|
|
33566
33566
|
[Ss]: "ENVMAP_TYPE_CUBE",
|
|
33567
|
-
[
|
|
33568
|
-
[
|
|
33567
|
+
[ir]: "ENVMAP_TYPE_CUBE",
|
|
33568
|
+
[fo]: "ENVMAP_TYPE_CUBE_UV"
|
|
33569
33569
|
};
|
|
33570
33570
|
function NE(i) {
|
|
33571
33571
|
return i.envMap === !1 ? "ENVMAP_TYPE_CUBE" : LE[i.envMapMode] || "ENVMAP_TYPE_CUBE";
|
|
33572
33572
|
}
|
|
33573
33573
|
const UE = {
|
|
33574
|
-
[
|
|
33574
|
+
[ir]: "ENVMAP_MODE_REFRACTION"
|
|
33575
33575
|
};
|
|
33576
33576
|
function OE(i) {
|
|
33577
33577
|
return i.envMap === !1 ? "ENVMAP_MODE_REFLECTION" : UE[i.envMapMode] || "ENVMAP_MODE_REFLECTION";
|
|
@@ -33600,13 +33600,13 @@ function zE(i, e, t, n) {
|
|
|
33600
33600
|
"#define SHADER_TYPE " + t.shaderType,
|
|
33601
33601
|
"#define SHADER_NAME " + t.shaderName,
|
|
33602
33602
|
g
|
|
33603
|
-
].filter(
|
|
33603
|
+
].filter(Ar).join(`
|
|
33604
33604
|
`), m.length > 0 && (m += `
|
|
33605
33605
|
`), f = [
|
|
33606
33606
|
"#define SHADER_TYPE " + t.shaderType,
|
|
33607
33607
|
"#define SHADER_NAME " + t.shaderName,
|
|
33608
33608
|
g
|
|
33609
|
-
].filter(
|
|
33609
|
+
].filter(Ar).join(`
|
|
33610
33610
|
`), f.length > 0 && (f += `
|
|
33611
33611
|
`)) : (m = [
|
|
33612
33612
|
Jh(t),
|
|
@@ -33740,7 +33740,7 @@ function zE(i, e, t, n) {
|
|
|
33740
33740
|
"#endif",
|
|
33741
33741
|
`
|
|
33742
33742
|
`
|
|
33743
|
-
].filter(
|
|
33743
|
+
].filter(Ar).join(`
|
|
33744
33744
|
`), f = [
|
|
33745
33745
|
Jh(t),
|
|
33746
33746
|
"#define SHADER_TYPE " + t.shaderType,
|
|
@@ -33824,7 +33824,7 @@ function zE(i, e, t, n) {
|
|
|
33824
33824
|
t.useDepthPacking ? "#define DEPTH_PACKING " + t.depthPacking : "",
|
|
33825
33825
|
`
|
|
33826
33826
|
`
|
|
33827
|
-
].filter(
|
|
33827
|
+
].filter(Ar).join(`
|
|
33828
33828
|
`)), a = Kl(a), a = $h(a, t), a = Yh(a, t), o = Kl(o), o = $h(o, t), o = Yh(o, t), a = Kh(a), o = Kh(o), t.isRawShaderMaterial !== !0 && (x = `#version 300 es
|
|
33829
33829
|
`, m = [
|
|
33830
33830
|
p,
|
|
@@ -33886,7 +33886,7 @@ Program Info Log: ` + Y + `
|
|
|
33886
33886
|
}
|
|
33887
33887
|
});
|
|
33888
33888
|
}
|
|
33889
|
-
s.deleteShader(S), s.deleteShader(M), k = new
|
|
33889
|
+
s.deleteShader(S), s.deleteShader(M), k = new Ha(s, v), y = ME(s, v);
|
|
33890
33890
|
}
|
|
33891
33891
|
let k;
|
|
33892
33892
|
this.getUniforms = function() {
|
|
@@ -33967,7 +33967,7 @@ function qE(i, e, t, n, s, r, a) {
|
|
|
33967
33967
|
return l.add(y), y === 0 ? "uv" : `uv${y}`;
|
|
33968
33968
|
}
|
|
33969
33969
|
function m(y, T, R, U, F) {
|
|
33970
|
-
const q = U.fog, Y = F.geometry, H = y.isMeshStandardMaterial ? U.environment : null, W = (y.isMeshStandardMaterial ? t : e).get(y.envMap || H), ee = W && W.mapping ===
|
|
33970
|
+
const q = U.fog, Y = F.geometry, H = y.isMeshStandardMaterial ? U.environment : null, W = (y.isMeshStandardMaterial ? t : e).get(y.envMap || H), ee = W && W.mapping === fo ? W.image.height : null, ge = g[y.type];
|
|
33971
33971
|
y.precision !== null && (p = s.getMaxPrecision(y.precision), p !== y.precision && Oe("WebGLProgram.getParameters:", y.precision, "not supported, using", p, "instead."));
|
|
33972
33972
|
const le = Y.morphAttributes.position || Y.morphAttributes.normal || Y.morphAttributes.color, _e = le !== void 0 ? le.length : 0;
|
|
33973
33973
|
let Be = 0;
|
|
@@ -33998,7 +33998,7 @@ function qE(i, e, t, n, s, r, a) {
|
|
|
33998
33998
|
instancing: Ve,
|
|
33999
33999
|
instancingColor: Ve && F.instanceColor !== null,
|
|
34000
34000
|
instancingMorph: Ve && F.morphTexture !== null,
|
|
34001
|
-
outputColorSpace: te === null ? i.outputColorSpace : te.isXRRenderTarget === !0 ? te.texture.colorSpace :
|
|
34001
|
+
outputColorSpace: te === null ? i.outputColorSpace : te.isXRRenderTarget === !0 ? te.texture.colorSpace : rr,
|
|
34002
34002
|
alphaToCoverage: !!y.alphaToCoverage,
|
|
34003
34003
|
map: et,
|
|
34004
34004
|
matcap: Wt,
|
|
@@ -34035,7 +34035,7 @@ function qE(i, e, t, n, s, r, a) {
|
|
|
34035
34035
|
transmissionMap: D,
|
|
34036
34036
|
thicknessMap: be,
|
|
34037
34037
|
gradientMap: ae,
|
|
34038
|
-
opaque: y.transparent === !1 && y.blending ===
|
|
34038
|
+
opaque: y.transparent === !1 && y.blending === Ks && y.alphaToCoverage === !1,
|
|
34039
34039
|
alphaMap: ye,
|
|
34040
34040
|
alphaTest: ie,
|
|
34041
34041
|
alphaHash: K,
|
|
@@ -34407,7 +34407,7 @@ function QE(i) {
|
|
|
34407
34407
|
for (let y = 0, T = l.length; y < T; y++) {
|
|
34408
34408
|
const R = l[y], U = R.color, F = R.intensity, q = R.distance;
|
|
34409
34409
|
let Y = null;
|
|
34410
|
-
if (R.shadow && R.shadow.map && (R.shadow.map.texture.format ===
|
|
34410
|
+
if (R.shadow && R.shadow.map && (R.shadow.map.texture.format === sr ? Y = R.shadow.map.texture : Y = R.shadow.map.depthTexture || R.shadow.map.texture), R.isAmbientLight)
|
|
34411
34411
|
d += U.r * F, u += U.g * F, h += U.b * F;
|
|
34412
34412
|
else if (R.isLightProbe) {
|
|
34413
34413
|
for (let H = 0; H < 9; H++)
|
|
@@ -34566,7 +34566,7 @@ void main() {
|
|
|
34566
34566
|
/* @__PURE__ */ new B(0, 0, -1),
|
|
34567
34567
|
/* @__PURE__ */ new B(0, -1, 0),
|
|
34568
34568
|
/* @__PURE__ */ new B(0, -1, 0)
|
|
34569
|
-
], tf = /* @__PURE__ */ new Vt(),
|
|
34569
|
+
], tf = /* @__PURE__ */ new Vt(), Er = /* @__PURE__ */ new B(), Sc = /* @__PURE__ */ new B();
|
|
34570
34570
|
function rC(i, e, t) {
|
|
34571
34571
|
let n = new Cm();
|
|
34572
34572
|
const s = new st(), r = new st(), a = new Lt(), o = new yy(), c = new Sy(), l = {}, d = t.maxTextureSize, u = { [Ci]: nn, [nn]: Ci, [yi]: yi }, h = new wn({
|
|
@@ -34591,11 +34591,11 @@ function rC(i, e, t) {
|
|
|
34591
34591
|
)
|
|
34592
34592
|
);
|
|
34593
34593
|
const v = new zn(g, h), m = this;
|
|
34594
|
-
this.enabled = !1, this.autoUpdate = !0, this.needsUpdate = !1, this.type =
|
|
34594
|
+
this.enabled = !1, this.autoUpdate = !0, this.needsUpdate = !1, this.type = Fa;
|
|
34595
34595
|
let f = this.type;
|
|
34596
34596
|
this.render = function(M, A, k) {
|
|
34597
34597
|
if (m.enabled === !1 || m.autoUpdate === !1 && m.needsUpdate === !1 || M.length === 0) return;
|
|
34598
|
-
M.type === lb && (Oe("WebGLShadowMap: PCFSoftShadowMap has been deprecated. Using PCFShadowMap instead."), M.type =
|
|
34598
|
+
M.type === lb && (Oe("WebGLShadowMap: PCFSoftShadowMap has been deprecated. Using PCFShadowMap instead."), M.type = Fa);
|
|
34599
34599
|
const y = i.getRenderTarget(), T = i.getActiveCubeFace(), R = i.getActiveMipmapLevel(), U = i.state;
|
|
34600
34600
|
U.setBlending(xi), U.buffers.depth.getReversed() === !0 ? U.buffers.color.setClear(0, 0, 0, 0) : U.buffers.color.setClear(1, 1, 1, 1), U.buffers.depth.setTest(!0), U.setScissorTest(!1);
|
|
34601
34601
|
const F = f !== this.type;
|
|
@@ -34612,22 +34612,22 @@ function rC(i, e, t) {
|
|
|
34612
34612
|
s.copy(W.mapSize);
|
|
34613
34613
|
const ee = W.getFrameExtents();
|
|
34614
34614
|
if (s.multiply(ee), r.copy(W.mapSize), (s.x > d || s.y > d) && (s.x > d && (r.x = Math.floor(d / ee.x), s.x = r.x * ee.x, W.mapSize.x = r.x), s.y > d && (r.y = Math.floor(d / ee.y), s.y = r.y * ee.y, W.mapSize.y = r.y)), W.map === null || F === !0) {
|
|
34615
|
-
if (W.map !== null && (W.map.depthTexture !== null && (W.map.depthTexture.dispose(), W.map.depthTexture = null), W.map.dispose()), this.type ===
|
|
34615
|
+
if (W.map !== null && (W.map.depthTexture !== null && (W.map.depthTexture.dispose(), W.map.depthTexture = null), W.map.dispose()), this.type === wr) {
|
|
34616
34616
|
if (H.isPointLight) {
|
|
34617
34617
|
Oe("WebGLShadowMap: VSM shadow maps are not supported for PointLights. Use PCF or BasicShadowMap instead.");
|
|
34618
34618
|
continue;
|
|
34619
34619
|
}
|
|
34620
34620
|
W.map = new ei(s.x, s.y, {
|
|
34621
|
-
format:
|
|
34621
|
+
format: sr,
|
|
34622
34622
|
type: Mi,
|
|
34623
34623
|
minFilter: Qt,
|
|
34624
34624
|
magFilter: Qt,
|
|
34625
34625
|
generateMipmaps: !1
|
|
34626
|
-
}), W.map.texture.name = H.name + ".shadowMap", W.map.depthTexture = new
|
|
34626
|
+
}), W.map.texture.name = H.name + ".shadowMap", W.map.depthTexture = new jr(s.x, s.y, Kn), W.map.depthTexture.name = H.name + ".shadowMapDepth", W.map.depthTexture.format = wi, W.map.depthTexture.compareFunction = null, W.map.depthTexture.minFilter = Yt, W.map.depthTexture.magFilter = Yt;
|
|
34627
34627
|
} else {
|
|
34628
|
-
H.isPointLight ? (W.map = new Em(s.x), W.map.depthTexture = new _y(s.x, si)) : (W.map = new ei(s.x, s.y), W.map.depthTexture = new
|
|
34628
|
+
H.isPointLight ? (W.map = new Em(s.x), W.map.depthTexture = new _y(s.x, si)) : (W.map = new ei(s.x, s.y), W.map.depthTexture = new jr(s.x, s.y, si)), W.map.depthTexture.name = H.name + ".shadowMap", W.map.depthTexture.format = wi;
|
|
34629
34629
|
const le = i.state.buffers.depth.getReversed();
|
|
34630
|
-
this.type ===
|
|
34630
|
+
this.type === Fa ? (W.map.depthTexture.compareFunction = le ? Dd : Id, W.map.depthTexture.minFilter = Qt, W.map.depthTexture.magFilter = Qt) : (W.map.depthTexture.compareFunction = null, W.map.depthTexture.minFilter = Yt, W.map.depthTexture.magFilter = Yt);
|
|
34631
34631
|
}
|
|
34632
34632
|
W.camera.updateProjectionMatrix();
|
|
34633
34633
|
}
|
|
@@ -34647,19 +34647,19 @@ function rC(i, e, t) {
|
|
|
34647
34647
|
}
|
|
34648
34648
|
if (H.isPointLight) {
|
|
34649
34649
|
const _e = W.camera, Be = W.matrix, Fe = H.distance || _e.far;
|
|
34650
|
-
Fe !== _e.far && (_e.far = Fe, _e.updateProjectionMatrix()),
|
|
34650
|
+
Fe !== _e.far && (_e.far = Fe, _e.updateProjectionMatrix()), Er.setFromMatrixPosition(H.matrixWorld), _e.position.copy(Er), Sc.copy(_e.position), Sc.add(iC[le]), _e.up.copy(sC[le]), _e.lookAt(Sc), _e.updateMatrixWorld(), Be.makeTranslation(-Er.x, -Er.y, -Er.z), tf.multiplyMatrices(_e.projectionMatrix, _e.matrixWorldInverse), W._frustum.setFromProjectionMatrix(tf, _e.coordinateSystem, _e.reversedDepth);
|
|
34651
34651
|
} else
|
|
34652
34652
|
W.updateMatrices(H);
|
|
34653
34653
|
n = W.getFrustum(), _(A, k, W.camera, H, this.type);
|
|
34654
34654
|
}
|
|
34655
|
-
W.isPointLightShadow !== !0 && this.type ===
|
|
34655
|
+
W.isPointLightShadow !== !0 && this.type === wr && x(W, k), W.needsUpdate = !1;
|
|
34656
34656
|
}
|
|
34657
34657
|
f = this.type, m.needsUpdate = !1, i.setRenderTarget(y, T, R);
|
|
34658
34658
|
};
|
|
34659
34659
|
function x(M, A) {
|
|
34660
34660
|
const k = e.update(v);
|
|
34661
34661
|
h.defines.VSM_SAMPLES !== M.blurSamples && (h.defines.VSM_SAMPLES = M.blurSamples, p.defines.VSM_SAMPLES = M.blurSamples, h.needsUpdate = !0, p.needsUpdate = !0), M.mapPass === null && (M.mapPass = new ei(s.x, s.y, {
|
|
34662
|
-
format:
|
|
34662
|
+
format: sr,
|
|
34663
34663
|
type: Mi
|
|
34664
34664
|
})), h.uniforms.shadow_pass.value = M.map.depthTexture, h.uniforms.resolution.value = M.mapSize, h.uniforms.radius.value = M.radius, i.setRenderTarget(M.mapPass), i.clear(), i.renderBufferDirect(A, null, k, h, v, null), p.uniforms.shadow_pass.value = M.mapPass.texture, p.uniforms.resolution.value = M.mapSize, p.uniforms.radius.value = M.radius, i.setRenderTarget(M.map), i.clear(), i.renderBufferDirect(A, null, k, p, v, null);
|
|
34665
34665
|
}
|
|
@@ -34675,7 +34675,7 @@ function rC(i, e, t) {
|
|
|
34675
34675
|
let Y = q[F];
|
|
34676
34676
|
Y === void 0 && (Y = T.clone(), q[F] = Y, A.addEventListener("dispose", S)), T = Y;
|
|
34677
34677
|
}
|
|
34678
|
-
if (T.visible = A.visible, T.wireframe = A.wireframe, y ===
|
|
34678
|
+
if (T.visible = A.visible, T.wireframe = A.wireframe, y === wr ? T.side = A.shadowSide !== null ? A.shadowSide : A.side : T.side = A.shadowSide !== null ? A.shadowSide : u[A.side], T.alphaMap = A.alphaMap, T.alphaTest = A.alphaToCoverage === !0 ? 0.5 : A.alphaTest, T.map = A.map, T.clipShadows = A.clipShadows, T.clippingPlanes = A.clippingPlanes, T.clipIntersection = A.clipIntersection, T.displacementMap = A.displacementMap, T.displacementScale = A.displacementScale, T.displacementBias = A.displacementBias, T.wireframeLinewidth = A.wireframeLinewidth, T.linewidth = A.linewidth, k.isPointLight === !0 && T.isMeshDistanceMaterial === !0) {
|
|
34679
34679
|
const U = i.properties.get(T);
|
|
34680
34680
|
U.light = k;
|
|
34681
34681
|
}
|
|
@@ -34683,7 +34683,7 @@ function rC(i, e, t) {
|
|
|
34683
34683
|
}
|
|
34684
34684
|
function _(M, A, k, y, T) {
|
|
34685
34685
|
if (M.visible === !1) return;
|
|
34686
|
-
if (M.layers.test(A.layers) && (M.isMesh || M.isLine || M.isPoints) && (M.castShadow || M.receiveShadow && T ===
|
|
34686
|
+
if (M.layers.test(A.layers) && (M.isMesh || M.isLine || M.isPoints) && (M.castShadow || M.receiveShadow && T === wr) && (!M.frustumCulled || n.intersectsObject(M))) {
|
|
34687
34687
|
M.modelViewMatrix.multiplyMatrices(k.matrixWorldInverse, M.matrixWorld);
|
|
34688
34688
|
const F = e.update(M), q = M.material;
|
|
34689
34689
|
if (Array.isArray(q)) {
|
|
@@ -34716,11 +34716,11 @@ const aC = {
|
|
|
34716
34716
|
[rl]: al,
|
|
34717
34717
|
[ol]: dl,
|
|
34718
34718
|
[cl]: ul,
|
|
34719
|
-
[
|
|
34719
|
+
[nr]: ll,
|
|
34720
34720
|
[al]: rl,
|
|
34721
34721
|
[dl]: ol,
|
|
34722
34722
|
[ul]: cl,
|
|
34723
|
-
[ll]:
|
|
34723
|
+
[ll]: nr
|
|
34724
34724
|
};
|
|
34725
34725
|
function oC(i, e) {
|
|
34726
34726
|
function t() {
|
|
@@ -34775,7 +34775,7 @@ function oC(i, e) {
|
|
|
34775
34775
|
case ol:
|
|
34776
34776
|
i.depthFunc(i.LESS);
|
|
34777
34777
|
break;
|
|
34778
|
-
case
|
|
34778
|
+
case nr:
|
|
34779
34779
|
i.depthFunc(i.LEQUAL);
|
|
34780
34780
|
break;
|
|
34781
34781
|
case cl:
|
|
@@ -34849,7 +34849,7 @@ function oC(i, e) {
|
|
|
34849
34849
|
return K;
|
|
34850
34850
|
}
|
|
34851
34851
|
const $ = {};
|
|
34852
|
-
$[i.TEXTURE_2D] = dt(i.TEXTURE_2D, i.TEXTURE_2D, 1), $[i.TEXTURE_CUBE_MAP] = dt(i.TEXTURE_CUBE_MAP, i.TEXTURE_CUBE_MAP_POSITIVE_X, 6), $[i.TEXTURE_2D_ARRAY] = dt(i.TEXTURE_2D_ARRAY, i.TEXTURE_2D_ARRAY, 1, 1), $[i.TEXTURE_3D] = dt(i.TEXTURE_3D, i.TEXTURE_3D, 1, 1), r.setClear(0, 0, 0, 1), a.setClear(1), o.setClear(0), te(i.DEPTH_TEST), a.setFunc(
|
|
34852
|
+
$[i.TEXTURE_2D] = dt(i.TEXTURE_2D, i.TEXTURE_2D, 1), $[i.TEXTURE_CUBE_MAP] = dt(i.TEXTURE_CUBE_MAP, i.TEXTURE_CUBE_MAP_POSITIVE_X, 6), $[i.TEXTURE_2D_ARRAY] = dt(i.TEXTURE_2D_ARRAY, i.TEXTURE_2D_ARRAY, 1, 1), $[i.TEXTURE_3D] = dt(i.TEXTURE_3D, i.TEXTURE_3D, 1, 1), r.setClear(0, 0, 0, 1), a.setClear(1), o.setClear(0), te(i.DEPTH_TEST), a.setFunc(nr), He(!1), Nt(ch), te(i.CULL_FACE), at(xi);
|
|
34853
34853
|
function te(D) {
|
|
34854
34854
|
d[D] !== !0 && (i.enable(D), d[D] = !0);
|
|
34855
34855
|
}
|
|
@@ -34908,7 +34908,7 @@ function oC(i, e) {
|
|
|
34908
34908
|
if (D !== m || ot !== y) {
|
|
34909
34909
|
if ((f !== ls || _ !== ls) && (i.blendEquation(i.FUNC_ADD), f = ls, _ = ls), ot)
|
|
34910
34910
|
switch (D) {
|
|
34911
|
-
case
|
|
34911
|
+
case Ks:
|
|
34912
34912
|
i.blendFuncSeparate(i.ONE, i.ONE_MINUS_SRC_ALPHA, i.ONE, i.ONE_MINUS_SRC_ALPHA);
|
|
34913
34913
|
break;
|
|
34914
34914
|
case nl:
|
|
@@ -34926,7 +34926,7 @@ function oC(i, e) {
|
|
|
34926
34926
|
}
|
|
34927
34927
|
else
|
|
34928
34928
|
switch (D) {
|
|
34929
|
-
case
|
|
34929
|
+
case Ks:
|
|
34930
34930
|
i.blendFuncSeparate(i.SRC_ALPHA, i.ONE_MINUS_SRC_ALPHA, i.ONE, i.ONE_MINUS_SRC_ALPHA);
|
|
34931
34931
|
break;
|
|
34932
34932
|
case nl:
|
|
@@ -34951,7 +34951,7 @@ function oC(i, e) {
|
|
|
34951
34951
|
function ft(D, be) {
|
|
34952
34952
|
D.side === yi ? Te(i.CULL_FACE) : te(i.CULL_FACE);
|
|
34953
34953
|
let ae = D.side === nn;
|
|
34954
|
-
be && (ae = !ae), He(ae), D.blending ===
|
|
34954
|
+
be && (ae = !ae), He(ae), D.blending === Ks && D.transparent === !1 ? at(xi) : at(D.blending, D.blendEquation, D.blendSrc, D.blendDst, D.blendEquationAlpha, D.blendSrcAlpha, D.blendDstAlpha, D.blendColor, D.blendAlpha, D.premultipliedAlpha), a.setFunc(D.depthFunc), a.setTest(D.depthTest), a.setMask(D.depthWrite), r.setMask(D.colorWrite);
|
|
34955
34955
|
const ye = D.stencilWrite;
|
|
34956
34956
|
o.setTest(ye), ye && (o.setMask(D.stencilWriteMask), o.setFunc(D.stencilFunc, D.stencilRef, D.stencilFuncMask), o.setOp(D.stencilFail, D.stencilZFail, D.stencilZPass)), Ut(D.polygonOffset, D.polygonOffsetFactor, D.polygonOffsetUnits), D.alphaToCoverage === !0 ? te(i.SAMPLE_ALPHA_TO_COVERAGE) : Te(i.SAMPLE_ALPHA_TO_COVERAGE);
|
|
34957
34957
|
}
|
|
@@ -35119,7 +35119,7 @@ function cC(i, e, t, n, s, r, a) {
|
|
|
35119
35119
|
} catch {
|
|
35120
35120
|
}
|
|
35121
35121
|
function g(w, b) {
|
|
35122
|
-
return p ? new OffscreenCanvas(w, b) :
|
|
35122
|
+
return p ? new OffscreenCanvas(w, b) : io("canvas");
|
|
35123
35123
|
}
|
|
35124
35124
|
function v(w, b, L) {
|
|
35125
35125
|
let X = 1;
|
|
@@ -35150,14 +35150,14 @@ function cC(i, e, t, n, s, r, a) {
|
|
|
35150
35150
|
}
|
|
35151
35151
|
let j = b;
|
|
35152
35152
|
if (b === i.RED && (L === i.FLOAT && (j = i.R32F), L === i.HALF_FLOAT && (j = i.R16F), L === i.UNSIGNED_BYTE && (j = i.R8)), b === i.RED_INTEGER && (L === i.UNSIGNED_BYTE && (j = i.R8UI), L === i.UNSIGNED_SHORT && (j = i.R16UI), L === i.UNSIGNED_INT && (j = i.R32UI), L === i.BYTE && (j = i.R8I), L === i.SHORT && (j = i.R16I), L === i.INT && (j = i.R32I)), b === i.RG && (L === i.FLOAT && (j = i.RG32F), L === i.HALF_FLOAT && (j = i.RG16F), L === i.UNSIGNED_BYTE && (j = i.RG8)), b === i.RG_INTEGER && (L === i.UNSIGNED_BYTE && (j = i.RG8UI), L === i.UNSIGNED_SHORT && (j = i.RG16UI), L === i.UNSIGNED_INT && (j = i.RG32UI), L === i.BYTE && (j = i.RG8I), L === i.SHORT && (j = i.RG16I), L === i.INT && (j = i.RG32I)), b === i.RGB_INTEGER && (L === i.UNSIGNED_BYTE && (j = i.RGB8UI), L === i.UNSIGNED_SHORT && (j = i.RGB16UI), L === i.UNSIGNED_INT && (j = i.RGB32UI), L === i.BYTE && (j = i.RGB8I), L === i.SHORT && (j = i.RGB16I), L === i.INT && (j = i.RGB32I)), b === i.RGBA_INTEGER && (L === i.UNSIGNED_BYTE && (j = i.RGBA8UI), L === i.UNSIGNED_SHORT && (j = i.RGBA16UI), L === i.UNSIGNED_INT && (j = i.RGBA32UI), L === i.BYTE && (j = i.RGBA8I), L === i.SHORT && (j = i.RGBA16I), L === i.INT && (j = i.RGBA32I)), b === i.RGB && (L === i.UNSIGNED_INT_5_9_9_9_REV && (j = i.RGB9_E5), L === i.UNSIGNED_INT_10F_11F_11F_REV && (j = i.R11F_G11F_B10F)), b === i.RGBA) {
|
|
35153
|
-
const Pe = Q ?
|
|
35153
|
+
const Pe = Q ? to : Qe.getTransfer(X);
|
|
35154
35154
|
L === i.FLOAT && (j = i.RGBA32F), L === i.HALF_FLOAT && (j = i.RGBA16F), L === i.UNSIGNED_BYTE && (j = Pe === lt ? i.SRGB8_ALPHA8 : i.RGBA8), L === i.UNSIGNED_SHORT_4_4_4_4 && (j = i.RGBA4), L === i.UNSIGNED_SHORT_5_5_5_1 && (j = i.RGB5_A1);
|
|
35155
35155
|
}
|
|
35156
35156
|
return (j === i.R16F || j === i.R32F || j === i.RG16F || j === i.RG32F || j === i.RGBA16F || j === i.RGBA32F) && e.get("EXT_color_buffer_float"), j;
|
|
35157
35157
|
}
|
|
35158
35158
|
function _(w, b) {
|
|
35159
35159
|
let L;
|
|
35160
|
-
return w ? b === null || b === si || b ===
|
|
35160
|
+
return w ? b === null || b === si || b === Wr ? L = i.DEPTH24_STENCIL8 : b === Kn ? L = i.DEPTH32F_STENCIL8 : b === Hr && (L = i.DEPTH24_STENCIL8, Oe("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")) : b === null || b === si || b === Wr ? L = i.DEPTH_COMPONENT24 : b === Kn ? L = i.DEPTH_COMPONENT32F : b === Hr && (L = i.DEPTH_COMPONENT16), L;
|
|
35161
35161
|
}
|
|
35162
35162
|
function S(w, b) {
|
|
35163
35163
|
return m(w) === !0 || w.isFramebufferTexture && w.minFilter !== Yt && w.minFilter !== Qt ? Math.log2(Math.max(b.width, b.height)) + 1 : w.mipmaps !== void 0 && w.mipmaps.length > 0 ? w.mipmaps.length : w.isCompressedTexture && Array.isArray(w.image) ? b.mipmaps.length : 1;
|
|
@@ -35271,7 +35271,7 @@ function cC(i, e, t, n, s, r, a) {
|
|
|
35271
35271
|
}, le = {
|
|
35272
35272
|
[Yt]: i.NEAREST,
|
|
35273
35273
|
[Pb]: i.NEAREST_MIPMAP_NEAREST,
|
|
35274
|
-
[
|
|
35274
|
+
[ia]: i.NEAREST_MIPMAP_LINEAR,
|
|
35275
35275
|
[Qt]: i.LINEAR,
|
|
35276
35276
|
[qo]: i.LINEAR_MIPMAP_NEAREST,
|
|
35277
35277
|
[hs]: i.LINEAR_MIPMAP_LINEAR
|
|
@@ -35286,8 +35286,8 @@ function cC(i, e, t, n, s, r, a) {
|
|
|
35286
35286
|
[Fb]: i.NOTEQUAL
|
|
35287
35287
|
};
|
|
35288
35288
|
function Be(w, b) {
|
|
35289
|
-
if (b.type === Kn && e.has("OES_texture_float_linear") === !1 && (b.magFilter === Qt || b.magFilter === qo || b.magFilter ===
|
|
35290
|
-
if (b.magFilter === Yt || b.minFilter !==
|
|
35289
|
+
if (b.type === Kn && e.has("OES_texture_float_linear") === !1 && (b.magFilter === Qt || b.magFilter === qo || b.magFilter === ia || b.magFilter === hs || b.minFilter === Qt || b.minFilter === qo || b.minFilter === ia || b.minFilter === hs) && Oe("WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."), i.texParameteri(w, i.TEXTURE_WRAP_S, ge[b.wrapS]), i.texParameteri(w, i.TEXTURE_WRAP_T, ge[b.wrapT]), (w === i.TEXTURE_3D || w === i.TEXTURE_2D_ARRAY) && i.texParameteri(w, i.TEXTURE_WRAP_R, ge[b.wrapR]), i.texParameteri(w, i.TEXTURE_MAG_FILTER, le[b.magFilter]), i.texParameteri(w, i.TEXTURE_MIN_FILTER, le[b.minFilter]), b.compareFunction && (i.texParameteri(w, i.TEXTURE_COMPARE_MODE, i.COMPARE_REF_TO_TEXTURE), i.texParameteri(w, i.TEXTURE_COMPARE_FUNC, _e[b.compareFunction])), e.has("EXT_texture_filter_anisotropic") === !0) {
|
|
35290
|
+
if (b.magFilter === Yt || b.minFilter !== ia && b.minFilter !== hs || b.type === Kn && e.has("OES_texture_float_linear") === !1) return;
|
|
35291
35291
|
if (b.anisotropy > 1 || n.get(b).__currentAnisotropy) {
|
|
35292
35292
|
const L = e.get("EXT_texture_filter_anisotropic");
|
|
35293
35293
|
i.texParameterf(w, L.TEXTURE_MAX_ANISOTROPY_EXT, Math.min(b.anisotropy, s.getMaxAnisotropy())), n.get(b).__currentAnisotropy = b.anisotropy;
|
|
@@ -35703,7 +35703,7 @@ function cC(i, e, t, n, s, r, a) {
|
|
|
35703
35703
|
}
|
|
35704
35704
|
function bt(w, b) {
|
|
35705
35705
|
const L = w.colorSpace, X = w.format, Q = w.type;
|
|
35706
|
-
return w.isCompressedTexture === !0 || w.isVideoTexture === !0 || L !==
|
|
35706
|
+
return w.isCompressedTexture === !0 || w.isVideoTexture === !0 || L !== rr && L !== Gi && (Qe.getTransfer(L) === lt ? (X !== Bn || Q !== Mn) && Oe("WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.") : nt("WebGLTextures: Unsupported texture color space:", L)), b;
|
|
35707
35707
|
}
|
|
35708
35708
|
function Ae(w) {
|
|
35709
35709
|
return typeof HTMLImageElement < "u" && w instanceof HTMLImageElement ? (l.width = w.naturalWidth || w.width, l.height = w.naturalHeight || w.height) : typeof VideoFrame < "u" && w instanceof VideoFrame ? (l.width = w.displayWidth, l.height = w.displayHeight) : (l.width = w.width, l.height = w.height), l;
|
|
@@ -35723,7 +35723,7 @@ function lC(i, e) {
|
|
|
35723
35723
|
if (n === dm) return i.UNSIGNED_INT_10F_11F_11F_REV;
|
|
35724
35724
|
if (n === om) return i.BYTE;
|
|
35725
35725
|
if (n === cm) return i.SHORT;
|
|
35726
|
-
if (n ===
|
|
35726
|
+
if (n === Hr) return i.UNSIGNED_SHORT;
|
|
35727
35727
|
if (n === Md) return i.INT;
|
|
35728
35728
|
if (n === si) return i.UNSIGNED_INT;
|
|
35729
35729
|
if (n === Kn) return i.FLOAT;
|
|
@@ -35735,23 +35735,23 @@ function lC(i, e) {
|
|
|
35735
35735
|
if (n === fs) return i.DEPTH_STENCIL;
|
|
35736
35736
|
if (n === fm) return i.RED;
|
|
35737
35737
|
if (n === Rd) return i.RED_INTEGER;
|
|
35738
|
-
if (n ===
|
|
35738
|
+
if (n === sr) return i.RG;
|
|
35739
35739
|
if (n === Pd) return i.RG_INTEGER;
|
|
35740
35740
|
if (n === kd) return i.RGBA_INTEGER;
|
|
35741
|
-
if (n ===
|
|
35741
|
+
if (n === Ba || n === Va || n === za || n === Ga)
|
|
35742
35742
|
if (a === lt)
|
|
35743
35743
|
if (r = e.get("WEBGL_compressed_texture_s3tc_srgb"), r !== null) {
|
|
35744
|
-
if (n ===
|
|
35745
|
-
if (n ===
|
|
35746
|
-
if (n ===
|
|
35747
|
-
if (n ===
|
|
35744
|
+
if (n === Ba) return r.COMPRESSED_SRGB_S3TC_DXT1_EXT;
|
|
35745
|
+
if (n === Va) return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;
|
|
35746
|
+
if (n === za) return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;
|
|
35747
|
+
if (n === Ga) return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT;
|
|
35748
35748
|
} else
|
|
35749
35749
|
return null;
|
|
35750
35750
|
else if (r = e.get("WEBGL_compressed_texture_s3tc"), r !== null) {
|
|
35751
|
-
if (n ===
|
|
35752
|
-
if (n ===
|
|
35753
|
-
if (n ===
|
|
35754
|
-
if (n ===
|
|
35751
|
+
if (n === Ba) return r.COMPRESSED_RGB_S3TC_DXT1_EXT;
|
|
35752
|
+
if (n === Va) return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;
|
|
35753
|
+
if (n === za) return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;
|
|
35754
|
+
if (n === Ga) return r.COMPRESSED_RGBA_S3TC_DXT5_EXT;
|
|
35755
35755
|
} else
|
|
35756
35756
|
return null;
|
|
35757
35757
|
if (n === gl || n === vl || n === _l || n === bl)
|
|
@@ -35805,7 +35805,7 @@ function lC(i, e) {
|
|
|
35805
35805
|
if (n === Xl) return r.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT;
|
|
35806
35806
|
} else
|
|
35807
35807
|
return null;
|
|
35808
|
-
return n ===
|
|
35808
|
+
return n === Wr ? i.UNSIGNED_INT_24_8 : i[n] !== void 0 ? i[n] : null;
|
|
35809
35809
|
}
|
|
35810
35810
|
return { convert: t };
|
|
35811
35811
|
}
|
|
@@ -35870,7 +35870,7 @@ class hC {
|
|
|
35870
35870
|
depthHeight: { value: t.w }
|
|
35871
35871
|
}
|
|
35872
35872
|
});
|
|
35873
|
-
this.mesh = new zn(new
|
|
35873
|
+
this.mesh = new zn(new mo(20, 20), n);
|
|
35874
35874
|
}
|
|
35875
35875
|
return this.mesh;
|
|
35876
35876
|
}
|
|
@@ -35889,7 +35889,7 @@ class hC {
|
|
|
35889
35889
|
return this.texture;
|
|
35890
35890
|
}
|
|
35891
35891
|
}
|
|
35892
|
-
class fC extends
|
|
35892
|
+
class fC extends cr {
|
|
35893
35893
|
/**
|
|
35894
35894
|
* Constructs a new WebGL renderer.
|
|
35895
35895
|
*
|
|
@@ -35958,7 +35958,7 @@ class fC extends lr {
|
|
|
35958
35958
|
if (s = $, s !== null) {
|
|
35959
35959
|
if (E = e.getRenderTarget(), s.addEventListener("select", Y), s.addEventListener("selectstart", Y), s.addEventListener("selectend", Y), s.addEventListener("squeeze", Y), s.addEventListener("squeezestart", Y), s.addEventListener("squeezeend", Y), s.addEventListener("end", H), s.addEventListener("inputsourceschange", W), x.xrCompatible !== !0 && await t.makeXRCompatible(), k = e.getPixelRatio(), e.getSize(A), v && "createProjectionLayer" in XRWebGLBinding.prototype) {
|
|
35960
35960
|
let Te = null, Ve = null, Me = null;
|
|
35961
|
-
x.depth && (Me = x.stencil ? t.DEPTH24_STENCIL8 : t.DEPTH_COMPONENT24, Te = x.stencil ? fs : wi, Ve = x.stencil ?
|
|
35961
|
+
x.depth && (Me = x.stencil ? t.DEPTH24_STENCIL8 : t.DEPTH_COMPONENT24, Te = x.stencil ? fs : wi, Ve = x.stencil ? Wr : si);
|
|
35962
35962
|
const et = {
|
|
35963
35963
|
colorFormat: t.RGBA8,
|
|
35964
35964
|
depthFormat: Me,
|
|
@@ -35970,7 +35970,7 @@ class fC extends lr {
|
|
|
35970
35970
|
{
|
|
35971
35971
|
format: Bn,
|
|
35972
35972
|
type: Mn,
|
|
35973
|
-
depthTexture: new
|
|
35973
|
+
depthTexture: new jr(h.textureWidth, h.textureHeight, Ve, void 0, void 0, void 0, void 0, void 0, void 0, Te),
|
|
35974
35974
|
stencilBuffer: x.stencil,
|
|
35975
35975
|
colorSpace: e.outputColorSpace,
|
|
35976
35976
|
samples: x.antialias ? 4 : 0,
|
|
@@ -36801,7 +36801,7 @@ const vC = new Uint16Array([
|
|
|
36801
36801
|
]);
|
|
36802
36802
|
let Wn = null;
|
|
36803
36803
|
function _C() {
|
|
36804
|
-
return Wn === null && (Wn = new py(vC, 16, 16,
|
|
36804
|
+
return Wn === null && (Wn = new py(vC, 16, 16, sr, Mi), Wn.name = "DFG_LUT", Wn.minFilter = Qt, Wn.magFilter = Qt, Wn.wrapS = Si, Wn.wrapT = Si, Wn.generateMipmaps = !1, Wn.needsUpdate = !0), Wn;
|
|
36805
36805
|
}
|
|
36806
36806
|
class bC {
|
|
36807
36807
|
/**
|
|
@@ -36839,8 +36839,8 @@ class bC {
|
|
|
36839
36839
|
]), f = /* @__PURE__ */ new Set([
|
|
36840
36840
|
Mn,
|
|
36841
36841
|
si,
|
|
36842
|
+
Hr,
|
|
36842
36843
|
Wr,
|
|
36843
|
-
qr,
|
|
36844
36844
|
wd,
|
|
36845
36845
|
Ad
|
|
36846
36846
|
]), x = new Uint32Array(4), E = new Int32Array(4);
|
|
@@ -37042,13 +37042,13 @@ class bC {
|
|
|
37042
37042
|
} else O.isPoints ? pt.setMode(I.POINTS) : O.isSprite && pt.setMode(I.TRIANGLES);
|
|
37043
37043
|
if (O.isBatchedMesh)
|
|
37044
37044
|
if (O._multiDrawInstances !== null)
|
|
37045
|
-
|
|
37045
|
+
qr("WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."), pt.renderMultiDrawInstances(O._multiDrawStarts, O._multiDrawCounts, O._multiDrawCount, O._multiDrawInstances);
|
|
37046
37046
|
else if (rt.get("WEBGL_multi_draw"))
|
|
37047
37047
|
pt.renderMultiDraw(O._multiDrawStarts, O._multiDrawCounts, O._multiDrawCount);
|
|
37048
37048
|
else {
|
|
37049
|
-
const De = O._multiDrawStarts, ct = O._multiDrawCounts, tt = O._multiDrawCount, pn = Ee ? j.get(Ee).bytesPerElement : 1,
|
|
37049
|
+
const De = O._multiDrawStarts, ct = O._multiDrawCounts, tt = O._multiDrawCount, pn = Ee ? j.get(Ee).bytesPerElement : 1, Ts = b.get(V).currentProgram.getUniforms();
|
|
37050
37050
|
for (let mn = 0; mn < tt; mn++)
|
|
37051
|
-
|
|
37051
|
+
Ts.setValue(I, "_gl_DrawID", mn), pt.render(De[mn] / pn, ct[mn]);
|
|
37052
37052
|
}
|
|
37053
37053
|
else if (O.isInstancedMesh)
|
|
37054
37054
|
pt.renderInstances(je, At, O.count);
|
|
@@ -37059,7 +37059,7 @@ class bC {
|
|
|
37059
37059
|
pt.render(je, At);
|
|
37060
37060
|
};
|
|
37061
37061
|
function Gd(C, N, G) {
|
|
37062
|
-
C.transparent === !0 && C.side === yi && C.forceSinglePass === !1 ? (C.side = nn, C.needsUpdate = !0,
|
|
37062
|
+
C.transparent === !0 && C.side === yi && C.forceSinglePass === !1 ? (C.side = nn, C.needsUpdate = !0, ea(C, N, G), C.side = Ci, C.needsUpdate = !0, ea(C, N, G), C.side = yi) : ea(C, N, G);
|
|
37063
37063
|
}
|
|
37064
37064
|
this.compile = function(C, N, G = null) {
|
|
37065
37065
|
G === null && (G = C), S = fe.get(G), S.init(N), A.push(S), G.traverseVisible(function(O) {
|
|
@@ -37173,7 +37173,7 @@ class bC {
|
|
|
37173
37173
|
}
|
|
37174
37174
|
function qd(C, N, G, V) {
|
|
37175
37175
|
const { opaque: O, transmissive: pe, transparent: xe } = C;
|
|
37176
|
-
S.setupLightsView(G), Me === !0 && Ce.setGlobalState(y.clippingPlanes, G), V && Ae.viewport(H.copy(V)), O.length > 0 &&
|
|
37176
|
+
S.setupLightsView(G), Me === !0 && Ce.setGlobalState(y.clippingPlanes, G), V && Ae.viewport(H.copy(V)), O.length > 0 && Qr(O, N, G), pe.length > 0 && Qr(pe, N, G), xe.length > 0 && Qr(xe, N, G), Ae.buffers.depth.setTest(!0), Ae.buffers.depth.setMask(!0), Ae.buffers.color.setMask(!0), Ae.setPolygonOffset(!1);
|
|
37177
37177
|
}
|
|
37178
37178
|
function jd(C, N, G, V) {
|
|
37179
37179
|
if ((G.isScene === !0 ? G.overrideMaterial : null) !== null)
|
|
@@ -37198,7 +37198,7 @@ class bC {
|
|
|
37198
37198
|
const Le = y.toneMapping;
|
|
37199
37199
|
y.toneMapping = Qn;
|
|
37200
37200
|
const Ie = V.viewport;
|
|
37201
|
-
if (V.viewport !== void 0 && (V.viewport = void 0), S.setupLightsView(V), Me === !0 && Ce.setGlobalState(y.clippingPlanes, V),
|
|
37201
|
+
if (V.viewport !== void 0 && (V.viewport = void 0), S.setupLightsView(V), Me === !0 && Ce.setGlobalState(y.clippingPlanes, V), Qr(C, G, V), L.updateMultisampleRenderTarget(pe), L.updateRenderTargetMipmap(pe), rt.has("WEBGL_multisampled_render_to_texture") === !1) {
|
|
37202
37202
|
let je = !1;
|
|
37203
37203
|
for (let ut = 0, At = N.length; ut < At; ut++) {
|
|
37204
37204
|
const Rt = N[ut], { object: pt, geometry: De, material: ct, group: tt } = Rt;
|
|
@@ -37211,7 +37211,7 @@ class bC {
|
|
|
37211
37211
|
}
|
|
37212
37212
|
y.setRenderTarget(ve, Ee, ke), y.setClearColor(ge, le), Ie !== void 0 && (V.viewport = Ie), y.toneMapping = Le;
|
|
37213
37213
|
}
|
|
37214
|
-
function
|
|
37214
|
+
function Qr(C, N, G) {
|
|
37215
37215
|
const V = N.isScene === !0 ? N.overrideMaterial : null;
|
|
37216
37216
|
for (let O = 0, pe = C.length; O < pe; O++) {
|
|
37217
37217
|
const xe = C[O], { object: ve, geometry: Ee, group: ke } = xe;
|
|
@@ -37222,7 +37222,7 @@ class bC {
|
|
|
37222
37222
|
function Xd(C, N, G, V, O, pe) {
|
|
37223
37223
|
C.onBeforeRender(y, N, G, V, O, pe), C.modelViewMatrix.multiplyMatrices(G.matrixWorldInverse, C.matrixWorld), C.normalMatrix.getNormalMatrix(C.modelViewMatrix), O.onBeforeRender(y, N, G, V, C, pe), O.transparent === !0 && O.side === yi && O.forceSinglePass === !1 ? (O.side = nn, O.needsUpdate = !0, y.renderBufferDirect(G, N, V, O, C, pe), O.side = Ci, O.needsUpdate = !0, y.renderBufferDirect(G, N, V, O, C, pe), O.side = yi) : y.renderBufferDirect(G, N, V, O, C, pe), C.onAfterRender(y, N, G, V, O, pe);
|
|
37224
37224
|
}
|
|
37225
|
-
function
|
|
37225
|
+
function ea(C, N, G) {
|
|
37226
37226
|
N.isScene !== !0 && (N = ft);
|
|
37227
37227
|
const V = b.get(C), O = S.state.lights, pe = S.state.shadowsArray, xe = O.state.version, ve = we.getParameters(C, O.state, pe, N, G), Ee = we.getProgramCacheKey(ve);
|
|
37228
37228
|
let ke = V.programs;
|
|
@@ -37239,7 +37239,7 @@ class bC {
|
|
|
37239
37239
|
function $d(C) {
|
|
37240
37240
|
if (C.uniformsList === null) {
|
|
37241
37241
|
const N = C.currentProgram.getUniforms();
|
|
37242
|
-
C.uniformsList =
|
|
37242
|
+
C.uniformsList = Ha.seqWithValue(N.seq, C.uniforms);
|
|
37243
37243
|
}
|
|
37244
37244
|
return C.uniformsList;
|
|
37245
37245
|
}
|
|
@@ -37249,7 +37249,7 @@ class bC {
|
|
|
37249
37249
|
}
|
|
37250
37250
|
function Nm(C, N, G, V, O) {
|
|
37251
37251
|
N.isScene !== !0 && (N = ft), L.resetTextureUnits();
|
|
37252
|
-
const pe = N.fog, xe = V.isMeshStandardMaterial ? N.environment : null, ve = F === null ? y.outputColorSpace : F.isXRRenderTarget === !0 ? F.texture.colorSpace :
|
|
37252
|
+
const pe = N.fog, xe = V.isMeshStandardMaterial ? N.environment : null, ve = F === null ? y.outputColorSpace : F.isXRRenderTarget === !0 ? F.texture.colorSpace : rr, Ee = (V.isMeshStandardMaterial ? Q : X).get(V.envMap || xe), ke = V.vertexColors === !0 && !!G.attributes.color && G.attributes.color.itemSize === 4, Le = !!G.attributes.tangent && (!!V.normalMap || V.anisotropy > 0), Ie = !!G.morphAttributes.position, je = !!G.morphAttributes.normal, ut = !!G.morphAttributes.color;
|
|
37253
37253
|
let At = Qn;
|
|
37254
37254
|
V.toneMapped && (F === null || F.isXRRenderTarget === !0) && (At = y.toneMapping);
|
|
37255
37255
|
const Rt = G.morphAttributes.position || G.morphAttributes.normal || G.morphAttributes.color, pt = Rt !== void 0 ? Rt.length : 0, De = b.get(V), ct = S.state.lights;
|
|
@@ -37260,17 +37260,17 @@ class bC {
|
|
|
37260
37260
|
let tt = !1;
|
|
37261
37261
|
V.version === De.__version ? (De.needsLights && De.lightsStateVersion !== ct.state.version || De.outputColorSpace !== ve || O.isBatchedMesh && De.batching === !1 || !O.isBatchedMesh && De.batching === !0 || O.isBatchedMesh && De.batchingColor === !0 && O.colorTexture === null || O.isBatchedMesh && De.batchingColor === !1 && O.colorTexture !== null || O.isInstancedMesh && De.instancing === !1 || !O.isInstancedMesh && De.instancing === !0 || O.isSkinnedMesh && De.skinning === !1 || !O.isSkinnedMesh && De.skinning === !0 || O.isInstancedMesh && De.instancingColor === !0 && O.instanceColor === null || O.isInstancedMesh && De.instancingColor === !1 && O.instanceColor !== null || O.isInstancedMesh && De.instancingMorph === !0 && O.morphTexture === null || O.isInstancedMesh && De.instancingMorph === !1 && O.morphTexture !== null || De.envMap !== Ee || V.fog === !0 && De.fog !== pe || De.numClippingPlanes !== void 0 && (De.numClippingPlanes !== Ce.numPlanes || De.numIntersection !== Ce.numIntersection) || De.vertexAlphas !== ke || De.vertexTangents !== Le || De.morphTargets !== Ie || De.morphNormals !== je || De.morphColors !== ut || De.toneMapping !== At || De.morphTargetsCount !== pt) && (tt = !0) : (tt = !0, De.__version = V.version);
|
|
37262
37262
|
let pn = De.currentProgram;
|
|
37263
|
-
tt === !0 && (pn =
|
|
37264
|
-
let
|
|
37263
|
+
tt === !0 && (pn = ea(V, N, O));
|
|
37264
|
+
let Ts = !1, mn = !1, dr = !1;
|
|
37265
37265
|
const St = pn.getUniforms(), an = De.uniforms;
|
|
37266
|
-
if (Ae.useProgram(pn.program) && (
|
|
37266
|
+
if (Ae.useProgram(pn.program) && (Ts = !0, mn = !0, dr = !0), V.id !== q && (q = V.id, mn = !0), Ts || Y !== C) {
|
|
37267
37267
|
Ae.buffers.depth.getReversed() && C.reversedDepth !== !0 && (C._reversedDepth = !0, C.updateProjectionMatrix()), St.setValue(I, "projectionMatrix", C.projectionMatrix), St.setValue(I, "viewMatrix", C.matrixWorldInverse);
|
|
37268
37268
|
const on = St.map.cameraPosition;
|
|
37269
37269
|
on !== void 0 && on.setValue(I, Ze.setFromMatrixPosition(C.matrixWorld)), bt.logarithmicDepthBuffer && St.setValue(
|
|
37270
37270
|
I,
|
|
37271
37271
|
"logDepthBufFC",
|
|
37272
37272
|
2 / (Math.log(C.far + 1) / Math.LN2)
|
|
37273
|
-
), (V.isMeshPhongMaterial || V.isMeshToonMaterial || V.isMeshLambertMaterial || V.isMeshBasicMaterial || V.isMeshStandardMaterial || V.isShaderMaterial) && St.setValue(I, "isOrthographic", C.isOrthographicCamera === !0), Y !== C && (Y = C, mn = !0,
|
|
37273
|
+
), (V.isMeshPhongMaterial || V.isMeshToonMaterial || V.isMeshLambertMaterial || V.isMeshBasicMaterial || V.isMeshStandardMaterial || V.isShaderMaterial) && St.setValue(I, "isOrthographic", C.isOrthographicCamera === !0), Y !== C && (Y = C, mn = !0, dr = !0);
|
|
37274
37274
|
}
|
|
37275
37275
|
if (De.needsLights && (ct.state.directionalShadowMap.length > 0 && St.setValue(I, "directionalShadowMap", ct.state.directionalShadowMap, L), ct.state.spotShadowMap.length > 0 && St.setValue(I, "spotShadowMap", ct.state.spotShadowMap, L), ct.state.pointShadowMap.length > 0 && St.setValue(I, "pointShadowMap", ct.state.pointShadowMap, L)), O.isSkinnedMesh) {
|
|
37276
37276
|
St.setOptional(I, O, "bindMatrix"), St.setOptional(I, O, "bindMatrixInverse");
|
|
@@ -37279,7 +37279,7 @@ class bC {
|
|
|
37279
37279
|
}
|
|
37280
37280
|
O.isBatchedMesh && (St.setOptional(I, O, "batchingTexture"), St.setValue(I, "batchingTexture", O._matricesTexture, L), St.setOptional(I, O, "batchingIdTexture"), St.setValue(I, "batchingIdTexture", O._indirectTexture, L), St.setOptional(I, O, "batchingColorTexture"), O._colorsTexture !== null && St.setValue(I, "batchingColorTexture", O._colorsTexture, L));
|
|
37281
37281
|
const xn = G.morphAttributes;
|
|
37282
|
-
if ((xn.position !== void 0 || xn.normal !== void 0 || xn.color !== void 0) && We.update(O, G, pn), (mn || De.receiveShadow !== O.receiveShadow) && (De.receiveShadow = O.receiveShadow, St.setValue(I, "receiveShadow", O.receiveShadow)), V.isMeshGouraudMaterial && V.envMap !== null && (an.envMap.value = Ee, an.flipEnvMap.value = Ee.isCubeTexture && Ee.isRenderTargetTexture === !1 ? -1 : 1), V.isMeshStandardMaterial && V.envMap === null && N.environment !== null && (an.envMapIntensity.value = N.environmentIntensity), an.dfgLUT !== void 0 && (an.dfgLUT.value = _C()), mn && (St.setValue(I, "toneMappingExposure", y.toneMappingExposure), De.needsLights && Um(an,
|
|
37282
|
+
if ((xn.position !== void 0 || xn.normal !== void 0 || xn.color !== void 0) && We.update(O, G, pn), (mn || De.receiveShadow !== O.receiveShadow) && (De.receiveShadow = O.receiveShadow, St.setValue(I, "receiveShadow", O.receiveShadow)), V.isMeshGouraudMaterial && V.envMap !== null && (an.envMap.value = Ee, an.flipEnvMap.value = Ee.isCubeTexture && Ee.isRenderTargetTexture === !1 ? -1 : 1), V.isMeshStandardMaterial && V.envMap === null && N.environment !== null && (an.envMapIntensity.value = N.environmentIntensity), an.dfgLUT !== void 0 && (an.dfgLUT.value = _C()), mn && (St.setValue(I, "toneMappingExposure", y.toneMappingExposure), De.needsLights && Um(an, dr), pe && V.fog === !0 && Ne.refreshFogUniforms(an, pe), Ne.refreshMaterialUniforms(an, V, Fe, Be, S.state.transmissionRenderTarget[C.id]), Ha.upload(I, $d(De), an, L)), V.isShaderMaterial && V.uniformsNeedUpdate === !0 && (Ha.upload(I, $d(De), an, L), V.uniformsNeedUpdate = !1), V.isSpriteMaterial && St.setValue(I, "center", O.center), St.setValue(I, "modelViewMatrix", O.modelViewMatrix), St.setValue(I, "normalMatrix", O.normalMatrix), St.setValue(I, "modelMatrix", O.matrixWorld), V.isShaderMaterial || V.isRawShaderMaterial) {
|
|
37283
37283
|
const en = V.uniformsGroups;
|
|
37284
37284
|
for (let on = 0, So = en.length; on < So; on++) {
|
|
37285
37285
|
const Zi = en[on];
|
|
@@ -37398,7 +37398,7 @@ class bC {
|
|
|
37398
37398
|
};
|
|
37399
37399
|
const Bm = I.createFramebuffer(), Vm = I.createFramebuffer();
|
|
37400
37400
|
this.copyTextureToTexture = function(C, N, G = null, V = null, O = 0, pe = null) {
|
|
37401
|
-
pe === null && (O !== 0 ? (
|
|
37401
|
+
pe === null && (O !== 0 ? (qr("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."), pe = O, O = 0) : pe = 0);
|
|
37402
37402
|
let xe, ve, Ee, ke, Le, Ie, je, ut, At;
|
|
37403
37403
|
const Rt = C.isCompressedTexture ? C.mipmaps[pe] : C.image;
|
|
37404
37404
|
if (G !== null)
|
|
@@ -37411,7 +37411,7 @@ class bC {
|
|
|
37411
37411
|
const pt = ae.convert(N.format), De = ae.convert(N.type);
|
|
37412
37412
|
let ct;
|
|
37413
37413
|
N.isData3DTexture ? (L.setTexture3D(N, 0), ct = I.TEXTURE_3D) : N.isDataArrayTexture || N.isCompressedArrayTexture ? (L.setTexture2DArray(N, 0), ct = I.TEXTURE_2D_ARRAY) : (L.setTexture2D(N, 0), ct = I.TEXTURE_2D), I.pixelStorei(I.UNPACK_FLIP_Y_WEBGL, N.flipY), I.pixelStorei(I.UNPACK_PREMULTIPLY_ALPHA_WEBGL, N.premultiplyAlpha), I.pixelStorei(I.UNPACK_ALIGNMENT, N.unpackAlignment);
|
|
37414
|
-
const tt = I.getParameter(I.UNPACK_ROW_LENGTH), pn = I.getParameter(I.UNPACK_IMAGE_HEIGHT),
|
|
37414
|
+
const tt = I.getParameter(I.UNPACK_ROW_LENGTH), pn = I.getParameter(I.UNPACK_IMAGE_HEIGHT), Ts = I.getParameter(I.UNPACK_SKIP_PIXELS), mn = I.getParameter(I.UNPACK_SKIP_ROWS), dr = I.getParameter(I.UNPACK_SKIP_IMAGES);
|
|
37415
37415
|
I.pixelStorei(I.UNPACK_ROW_LENGTH, Rt.width), I.pixelStorei(I.UNPACK_IMAGE_HEIGHT, Rt.height), I.pixelStorei(I.UNPACK_SKIP_PIXELS, ke), I.pixelStorei(I.UNPACK_SKIP_ROWS, Le), I.pixelStorei(I.UNPACK_SKIP_IMAGES, Ie);
|
|
37416
37416
|
const St = C.isDataArrayTexture || C.isData3DTexture, an = N.isDataArrayTexture || N.isData3DTexture;
|
|
37417
37417
|
if (C.isDepthTexture) {
|
|
@@ -37428,7 +37428,7 @@ class bC {
|
|
|
37428
37428
|
Ae.bindFramebuffer(I.READ_FRAMEBUFFER, null), Ae.bindFramebuffer(I.DRAW_FRAMEBUFFER, null);
|
|
37429
37429
|
} else
|
|
37430
37430
|
an ? C.isDataTexture || C.isData3DTexture ? I.texSubImage3D(ct, pe, je, ut, At, xe, ve, Ee, pt, De, Rt.data) : N.isCompressedArrayTexture ? I.compressedTexSubImage3D(ct, pe, je, ut, At, xe, ve, Ee, pt, Rt.data) : I.texSubImage3D(ct, pe, je, ut, At, xe, ve, Ee, pt, De, Rt) : C.isDataTexture ? I.texSubImage2D(I.TEXTURE_2D, pe, je, ut, xe, ve, pt, De, Rt.data) : C.isCompressedTexture ? I.compressedTexSubImage2D(I.TEXTURE_2D, pe, je, ut, Rt.width, Rt.height, pt, Rt.data) : I.texSubImage2D(I.TEXTURE_2D, pe, je, ut, xe, ve, pt, De, Rt);
|
|
37431
|
-
I.pixelStorei(I.UNPACK_ROW_LENGTH, tt), I.pixelStorei(I.UNPACK_IMAGE_HEIGHT, pn), I.pixelStorei(I.UNPACK_SKIP_PIXELS,
|
|
37431
|
+
I.pixelStorei(I.UNPACK_ROW_LENGTH, tt), I.pixelStorei(I.UNPACK_IMAGE_HEIGHT, pn), I.pixelStorei(I.UNPACK_SKIP_PIXELS, Ts), I.pixelStorei(I.UNPACK_SKIP_ROWS, mn), I.pixelStorei(I.UNPACK_SKIP_IMAGES, dr), pe === 0 && N.generateMipmaps && I.generateMipmap(ct), Ae.unbindTexture();
|
|
37432
37432
|
}, this.initRenderTarget = function(C) {
|
|
37433
37433
|
b.get(C).__webglFramebuffer === void 0 && L.setupRenderTarget(C);
|
|
37434
37434
|
}, this.initTexture = function(C) {
|
|
@@ -38421,7 +38421,7 @@ function FC(i, e = "dark") {
|
|
|
38421
38421
|
function BC(i = "dark") {
|
|
38422
38422
|
return Object.keys(i === "dark" ? fi : pi);
|
|
38423
38423
|
}
|
|
38424
|
-
const
|
|
38424
|
+
const Xr = {
|
|
38425
38425
|
default: {
|
|
38426
38426
|
dark: {
|
|
38427
38427
|
colors: fi.default,
|
|
@@ -38507,22 +38507,22 @@ const $r = {
|
|
|
38507
38507
|
}
|
|
38508
38508
|
}
|
|
38509
38509
|
}, VC = Object.fromEntries(
|
|
38510
|
-
Object.entries(
|
|
38510
|
+
Object.entries(Xr).map(([i, e]) => [i, e.dark])
|
|
38511
38511
|
), zC = Object.fromEntries(
|
|
38512
|
-
Object.entries(
|
|
38512
|
+
Object.entries(Xr).map(([i, e]) => [i, e.light])
|
|
38513
38513
|
);
|
|
38514
38514
|
function CC() {
|
|
38515
38515
|
return typeof window > "u" || window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
38516
38516
|
}
|
|
38517
|
-
function
|
|
38518
|
-
const t =
|
|
38517
|
+
function _o(i, e = "auto") {
|
|
38518
|
+
const t = Xr[i] || Xr.default, n = e === "auto" ? CC() : e;
|
|
38519
38519
|
return t[n];
|
|
38520
38520
|
}
|
|
38521
38521
|
function GC() {
|
|
38522
|
-
return Object.keys(
|
|
38522
|
+
return Object.keys(Xr);
|
|
38523
38523
|
}
|
|
38524
38524
|
function MC(i, e, t = "auto") {
|
|
38525
|
-
const n =
|
|
38525
|
+
const n = _o(e, t);
|
|
38526
38526
|
i.orbColors = n.colors, i.glowIntensity = n.glowIntensity, i.idleGlowMultiplier = n.idleGlowMultiplier;
|
|
38527
38527
|
}
|
|
38528
38528
|
function HC(i, e) {
|
|
@@ -38602,11 +38602,7 @@ let gt = class extends ps {
|
|
|
38602
38602
|
};
|
|
38603
38603
|
}
|
|
38604
38604
|
connectedCallback() {
|
|
38605
|
-
|
|
38606
|
-
const i = xs(this.theme, this.themeMode);
|
|
38607
|
-
Object.keys(this.orbColors).length === 0 && (this.orbColors = i.colors), this.glowIntensity === 0.8 && (this.glowIntensity = i.glowIntensity), this.idleGlowMultiplier === 0.4 && (this.idleGlowMultiplier = i.idleGlowMultiplier);
|
|
38608
|
-
}
|
|
38609
|
-
this.voiceServiceUrl && (this.callManager.serviceUrl = this.voiceServiceUrl), this.soundManager = new zd({
|
|
38605
|
+
super.connectedCallback(), this.voiceServiceUrl && (this.callManager.serviceUrl = this.voiceServiceUrl), this.soundManager = new zd({
|
|
38610
38606
|
enabled: this.soundEnabled,
|
|
38611
38607
|
volume: this.soundVolume
|
|
38612
38608
|
}), this.callManager.addEventListener(
|
|
@@ -38622,7 +38618,7 @@ let gt = class extends ps {
|
|
|
38622
38618
|
), this.callManager.removeEventListener("audio-track", this.handleAudioTrack), this.callManager.removeEventListener("local-audio-track", this.handleLocalAudioTrack), this.callManager.removeEventListener("microphone-enabled", this.handleMicrophoneEnabled), this.callManager.removeEventListener("microphone-disabled", this.handleMicrophoneDisabled), this.callManager.hangUp(), this.cleanupOrb(), (i = this.soundManager) == null || i.destroy(), this.soundManager = null;
|
|
38623
38619
|
}
|
|
38624
38620
|
firstUpdated() {
|
|
38625
|
-
this.initializeOrb();
|
|
38621
|
+
this.applyTheme(), this.initializeOrb();
|
|
38626
38622
|
}
|
|
38627
38623
|
updated(i) {
|
|
38628
38624
|
var e, t;
|
|
@@ -38630,7 +38626,7 @@ let gt = class extends ps {
|
|
|
38630
38626
|
}
|
|
38631
38627
|
applyTheme() {
|
|
38632
38628
|
if (this.theme) {
|
|
38633
|
-
const i =
|
|
38629
|
+
const i = _o(this.theme, this.themeMode);
|
|
38634
38630
|
this.orbColors = i.colors, this.glowIntensity = i.glowIntensity, this.idleGlowMultiplier = i.idleGlowMultiplier, this.orbRenderer && (this.orbRenderer.setColors(this.orbColors), this.orbRenderer.setGlowSettings(this.glowIntensity, this.idleGlowMultiplier));
|
|
38635
38631
|
}
|
|
38636
38632
|
}
|
|
@@ -38987,10 +38983,10 @@ Et([
|
|
|
38987
38983
|
Se({ type: String, attribute: "voice-service-url" })
|
|
38988
38984
|
], gt.prototype, "voiceServiceUrl", 2);
|
|
38989
38985
|
Et([
|
|
38990
|
-
|
|
38986
|
+
or()
|
|
38991
38987
|
], gt.prototype, "callStatus", 2);
|
|
38992
38988
|
Et([
|
|
38993
|
-
|
|
38989
|
+
or()
|
|
38994
38990
|
], gt.prototype, "microphoneEnabled", 2);
|
|
38995
38991
|
Et([
|
|
38996
38992
|
Se({ type: String, attribute: "button-start-text" })
|
|
@@ -39005,7 +39001,7 @@ Et([
|
|
|
39005
39001
|
Se({ type: Number, attribute: "container-padding" })
|
|
39006
39002
|
], gt.prototype, "containerPadding", 2);
|
|
39007
39003
|
Et([
|
|
39008
|
-
Se({ type: String, attribute: "theme" })
|
|
39004
|
+
Se({ type: String, attribute: "theme", reflect: !0 })
|
|
39009
39005
|
], gt.prototype, "theme", 2);
|
|
39010
39006
|
Et([
|
|
39011
39007
|
Se({ type: String, attribute: "theme-mode" })
|
|
@@ -39120,11 +39116,7 @@ let vt = class extends ps {
|
|
|
39120
39116
|
};
|
|
39121
39117
|
}
|
|
39122
39118
|
connectedCallback() {
|
|
39123
|
-
|
|
39124
|
-
const i = xs(this.theme, this.themeMode);
|
|
39125
|
-
Object.keys(this.orbColors).length === 0 && (this.orbColors = i.colors), this.glowIntensity === 0.8 && (this.glowIntensity = i.glowIntensity), this.idleGlowMultiplier === 0.4 && (this.idleGlowMultiplier = i.idleGlowMultiplier);
|
|
39126
|
-
}
|
|
39127
|
-
this.voiceServiceUrl && (this.callManager.serviceUrl = this.voiceServiceUrl), this.soundManager = new zd({
|
|
39119
|
+
super.connectedCallback(), this.voiceServiceUrl && (this.callManager.serviceUrl = this.voiceServiceUrl), this.soundManager = new zd({
|
|
39128
39120
|
enabled: this.soundEnabled,
|
|
39129
39121
|
volume: this.soundVolume
|
|
39130
39122
|
}), this.callManager.addEventListener(
|
|
@@ -39140,7 +39132,7 @@ let vt = class extends ps {
|
|
|
39140
39132
|
), this.callManager.removeEventListener("audio-track", this.handleAudioTrack), this.callManager.removeEventListener("local-audio-track", this.handleLocalAudioTrack), this.callManager.removeEventListener("microphone-enabled", this.handleMicrophoneEnabled), this.callManager.removeEventListener("microphone-disabled", this.handleMicrophoneDisabled), this.callManager.hangUp(), this.cleanupOrb(), (i = this.soundManager) == null || i.destroy(), this.soundManager = null;
|
|
39141
39133
|
}
|
|
39142
39134
|
firstUpdated() {
|
|
39143
|
-
this.initializeOrb();
|
|
39135
|
+
this.applyTheme(), this.initializeOrb();
|
|
39144
39136
|
}
|
|
39145
39137
|
updated(i) {
|
|
39146
39138
|
var e, t;
|
|
@@ -39148,7 +39140,7 @@ let vt = class extends ps {
|
|
|
39148
39140
|
}
|
|
39149
39141
|
applyTheme() {
|
|
39150
39142
|
if (this.theme) {
|
|
39151
|
-
const i =
|
|
39143
|
+
const i = _o(this.theme, this.themeMode);
|
|
39152
39144
|
this.orbColors = i.colors, this.glowIntensity = i.glowIntensity, this.idleGlowMultiplier = i.idleGlowMultiplier, this.orbRenderer && (this.orbRenderer.setColors(this.orbColors), this.orbRenderer.setGlowSettings(this.glowIntensity, this.idleGlowMultiplier));
|
|
39153
39145
|
}
|
|
39154
39146
|
}
|
|
@@ -39489,10 +39481,10 @@ Ct([
|
|
|
39489
39481
|
Se({ type: String, attribute: "voice-service-url" })
|
|
39490
39482
|
], vt.prototype, "voiceServiceUrl", 2);
|
|
39491
39483
|
Ct([
|
|
39492
|
-
|
|
39484
|
+
or()
|
|
39493
39485
|
], vt.prototype, "callStatus", 2);
|
|
39494
39486
|
Ct([
|
|
39495
|
-
|
|
39487
|
+
or()
|
|
39496
39488
|
], vt.prototype, "microphoneEnabled", 2);
|
|
39497
39489
|
Ct([
|
|
39498
39490
|
Se({ type: String, attribute: "button-start-text" })
|
|
@@ -39622,11 +39614,7 @@ let _t = class extends ps {
|
|
|
39622
39614
|
};
|
|
39623
39615
|
}
|
|
39624
39616
|
connectedCallback() {
|
|
39625
|
-
|
|
39626
|
-
const i = xs(this.theme, this.themeMode);
|
|
39627
|
-
Object.keys(this.orbColors).length === 0 && (this.orbColors = i.colors), this.glowIntensity === 0.8 && (this.glowIntensity = i.glowIntensity), this.idleGlowMultiplier === 0.4 && (this.idleGlowMultiplier = i.idleGlowMultiplier);
|
|
39628
|
-
}
|
|
39629
|
-
this.voiceServiceUrl && (this.callManager.serviceUrl = this.voiceServiceUrl), this.soundManager = new zd({
|
|
39617
|
+
super.connectedCallback(), this.voiceServiceUrl && (this.callManager.serviceUrl = this.voiceServiceUrl), this.soundManager = new zd({
|
|
39630
39618
|
enabled: this.soundEnabled,
|
|
39631
39619
|
volume: this.soundVolume
|
|
39632
39620
|
}), this.callManager.addEventListener(
|
|
@@ -39642,7 +39630,7 @@ let _t = class extends ps {
|
|
|
39642
39630
|
), this.callManager.removeEventListener("audio-track", this.handleAudioTrack), this.callManager.removeEventListener("local-audio-track", this.handleLocalAudioTrack), this.callManager.removeEventListener("microphone-enabled", this.handleMicrophoneEnabled), this.callManager.removeEventListener("microphone-disabled", this.handleMicrophoneDisabled), this.callManager.hangUp(), this.cleanupOrb(), (i = this.soundManager) == null || i.destroy(), this.soundManager = null;
|
|
39643
39631
|
}
|
|
39644
39632
|
firstUpdated() {
|
|
39645
|
-
this.initializeOrb();
|
|
39633
|
+
this.applyTheme(), this.initializeOrb();
|
|
39646
39634
|
}
|
|
39647
39635
|
updated(i) {
|
|
39648
39636
|
var e, t;
|
|
@@ -39650,7 +39638,7 @@ let _t = class extends ps {
|
|
|
39650
39638
|
}
|
|
39651
39639
|
applyTheme() {
|
|
39652
39640
|
if (this.theme) {
|
|
39653
|
-
const i =
|
|
39641
|
+
const i = _o(this.theme, this.themeMode);
|
|
39654
39642
|
this.orbColors = i.colors, this.glowIntensity = i.glowIntensity, this.idleGlowMultiplier = i.idleGlowMultiplier, this.orbRenderer && (this.orbRenderer.setColors(this.orbColors), this.orbRenderer.setGlowSettings(this.glowIntensity, this.idleGlowMultiplier));
|
|
39655
39643
|
}
|
|
39656
39644
|
}
|
|
@@ -39913,10 +39901,10 @@ Mt([
|
|
|
39913
39901
|
Se({ type: String, attribute: "voice-service-url" })
|
|
39914
39902
|
], _t.prototype, "voiceServiceUrl", 2);
|
|
39915
39903
|
Mt([
|
|
39916
|
-
|
|
39904
|
+
or()
|
|
39917
39905
|
], _t.prototype, "callStatus", 2);
|
|
39918
39906
|
Mt([
|
|
39919
|
-
|
|
39907
|
+
or()
|
|
39920
39908
|
], _t.prototype, "microphoneEnabled", 2);
|
|
39921
39909
|
Mt([
|
|
39922
39910
|
Se({ type: String, attribute: "button-start-text" })
|
|
@@ -39992,10 +39980,10 @@ export {
|
|
|
39992
39980
|
CC as detectSystemTheme,
|
|
39993
39981
|
FC as getColorPreset,
|
|
39994
39982
|
BC as getPresetNames,
|
|
39995
|
-
|
|
39983
|
+
_o as getTheme,
|
|
39996
39984
|
GC as getThemeNames,
|
|
39997
39985
|
pi as lightPresets,
|
|
39998
39986
|
zC as lightThemes,
|
|
39999
|
-
|
|
39987
|
+
Xr as themes,
|
|
40000
39988
|
HC as watchSystemTheme
|
|
40001
39989
|
};
|