lunchboxjs 2.0.0-beta.3 → 2.0.0-beta.5
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/cypress/e2e/loader.cy.d.ts +1 -0
- package/dist/lunchboxjs.cjs +17 -17
- package/dist/lunchboxjs.js +511 -482
- package/dist/lunchboxjs.umd.cjs +17 -17
- package/dist/src/index.d.ts +3 -0
- package/dist/types.d.ts +2 -1
- package/package.json +2 -2
package/dist/lunchboxjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
const
|
|
1
|
+
import * as b from "three";
|
|
2
|
+
const ju = [
|
|
3
3
|
// ORDER MATTERS HERE!
|
|
4
4
|
// Place the objects most likely to wrap other objects at the beginning of the list.
|
|
5
5
|
// Main wrappers
|
|
@@ -82,26 +82,28 @@ const ku = [
|
|
|
82
82
|
"Points",
|
|
83
83
|
"Raycaster",
|
|
84
84
|
"CameraHelper",
|
|
85
|
-
"Color"
|
|
85
|
+
"Color",
|
|
86
|
+
// Loaders
|
|
87
|
+
"TextureLoader"
|
|
86
88
|
];
|
|
87
89
|
/**
|
|
88
90
|
* @license
|
|
89
91
|
* Copyright 2019 Google LLC
|
|
90
92
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
91
93
|
*/
|
|
92
|
-
const
|
|
93
|
-
let
|
|
94
|
+
const eu = globalThis, Bu = eu.ShadowRoot && (eu.ShadyCSS === void 0 || eu.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, mu = Symbol(), vu = /* @__PURE__ */ new WeakMap();
|
|
95
|
+
let Gu = class {
|
|
94
96
|
constructor(u, e, r) {
|
|
95
|
-
if (this._$cssResult$ = !0, r !==
|
|
97
|
+
if (this._$cssResult$ = !0, r !== mu)
|
|
96
98
|
throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
97
99
|
this.cssText = u, this.t = e;
|
|
98
100
|
}
|
|
99
101
|
get styleSheet() {
|
|
100
102
|
let u = this.o;
|
|
101
103
|
const e = this.t;
|
|
102
|
-
if (
|
|
104
|
+
if (Bu && u === void 0) {
|
|
103
105
|
const r = e !== void 0 && e.length === 1;
|
|
104
|
-
r && (u =
|
|
106
|
+
r && (u = vu.get(e)), u === void 0 && ((this.o = u = new CSSStyleSheet()).replaceSync(this.cssText), r && vu.set(e, u));
|
|
105
107
|
}
|
|
106
108
|
return u;
|
|
107
109
|
}
|
|
@@ -109,38 +111,38 @@ let Hu = class {
|
|
|
109
111
|
return this.cssText;
|
|
110
112
|
}
|
|
111
113
|
};
|
|
112
|
-
const
|
|
113
|
-
const e = t.length === 1 ? t[0] : u.reduce((r,
|
|
114
|
+
const re = (t) => new Gu(typeof t == "string" ? t : t + "", void 0, mu), se = (t, ...u) => {
|
|
115
|
+
const e = t.length === 1 ? t[0] : u.reduce((r, s, D) => r + ((i) => {
|
|
114
116
|
if (i._$cssResult$ === !0)
|
|
115
117
|
return i.cssText;
|
|
116
118
|
if (typeof i == "number")
|
|
117
119
|
return i;
|
|
118
120
|
throw Error("Value passed to 'css' function must be a 'css' function result: " + i + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
119
|
-
})(
|
|
120
|
-
return new
|
|
121
|
-
},
|
|
122
|
-
if (
|
|
121
|
+
})(s) + t[D + 1], t[0]);
|
|
122
|
+
return new Gu(e, t, mu);
|
|
123
|
+
}, De = (t, u) => {
|
|
124
|
+
if (Bu)
|
|
123
125
|
t.adoptedStyleSheets = u.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
124
126
|
else
|
|
125
127
|
for (const e of u) {
|
|
126
|
-
const r = document.createElement("style"),
|
|
127
|
-
|
|
128
|
+
const r = document.createElement("style"), s = eu.litNonce;
|
|
129
|
+
s !== void 0 && r.setAttribute("nonce", s), r.textContent = e.cssText, t.appendChild(r);
|
|
128
130
|
}
|
|
129
|
-
},
|
|
131
|
+
}, wu = Bu ? (t) => t : (t) => t instanceof CSSStyleSheet ? ((u) => {
|
|
130
132
|
let e = "";
|
|
131
133
|
for (const r of u.cssRules)
|
|
132
134
|
e += r.cssText;
|
|
133
|
-
return
|
|
135
|
+
return re(e);
|
|
134
136
|
})(t) : t;
|
|
135
137
|
/**
|
|
136
138
|
* @license
|
|
137
139
|
* Copyright 2017 Google LLC
|
|
138
140
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
139
141
|
*/
|
|
140
|
-
const { is:
|
|
142
|
+
const { is: ie, defineProperty: ne, getOwnPropertyDescriptor: oe, getOwnPropertyNames: ae, getOwnPropertySymbols: ce, getPrototypeOf: Ae } = Object, P = globalThis, Su = P.trustedTypes, he = Su ? Su.emptyScript : "", ou = P.reactiveElementPolyfillSupport, W = (t, u) => t, tu = { toAttribute(t, u) {
|
|
141
143
|
switch (u) {
|
|
142
144
|
case Boolean:
|
|
143
|
-
t = t ?
|
|
145
|
+
t = t ? he : null;
|
|
144
146
|
break;
|
|
145
147
|
case Object:
|
|
146
148
|
case Array:
|
|
@@ -165,62 +167,62 @@ const { is: te, defineProperty: re, getOwnPropertyDescriptor: De, getOwnProperty
|
|
|
165
167
|
}
|
|
166
168
|
}
|
|
167
169
|
return e;
|
|
168
|
-
} },
|
|
170
|
+
} }, yu = (t, u) => !ie(t, u), Pu = { attribute: !0, type: String, converter: tu, reflect: !1, hasChanged: yu };
|
|
169
171
|
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), P.litPropertyMetadata ?? (P.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
170
|
-
class
|
|
172
|
+
class H extends HTMLElement {
|
|
171
173
|
static addInitializer(u) {
|
|
172
174
|
this._$Ei(), (this.l ?? (this.l = [])).push(u);
|
|
173
175
|
}
|
|
174
176
|
static get observedAttributes() {
|
|
175
177
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
176
178
|
}
|
|
177
|
-
static createProperty(u, e =
|
|
179
|
+
static createProperty(u, e = Pu) {
|
|
178
180
|
if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(u, e), !e.noAccessor) {
|
|
179
|
-
const r = Symbol(),
|
|
180
|
-
|
|
181
|
+
const r = Symbol(), s = this.getPropertyDescriptor(u, r, e);
|
|
182
|
+
s !== void 0 && ne(this.prototype, u, s);
|
|
181
183
|
}
|
|
182
184
|
}
|
|
183
185
|
static getPropertyDescriptor(u, e, r) {
|
|
184
|
-
const { get:
|
|
186
|
+
const { get: s, set: D } = oe(this.prototype, u) ?? { get() {
|
|
185
187
|
return this[e];
|
|
186
188
|
}, set(i) {
|
|
187
189
|
this[e] = i;
|
|
188
190
|
} };
|
|
189
191
|
return { get() {
|
|
190
|
-
return
|
|
192
|
+
return s == null ? void 0 : s.call(this);
|
|
191
193
|
}, set(i) {
|
|
192
|
-
const
|
|
193
|
-
|
|
194
|
+
const a = s == null ? void 0 : s.call(this);
|
|
195
|
+
D.call(this, i), this.requestUpdate(u, a, r);
|
|
194
196
|
}, configurable: !0, enumerable: !0 };
|
|
195
197
|
}
|
|
196
198
|
static getPropertyOptions(u) {
|
|
197
|
-
return this.elementProperties.get(u) ??
|
|
199
|
+
return this.elementProperties.get(u) ?? Pu;
|
|
198
200
|
}
|
|
199
201
|
static _$Ei() {
|
|
200
|
-
if (this.hasOwnProperty(
|
|
202
|
+
if (this.hasOwnProperty(W("elementProperties")))
|
|
201
203
|
return;
|
|
202
|
-
const u =
|
|
204
|
+
const u = Ae(this);
|
|
203
205
|
u.finalize(), u.l !== void 0 && (this.l = [...u.l]), this.elementProperties = new Map(u.elementProperties);
|
|
204
206
|
}
|
|
205
207
|
static finalize() {
|
|
206
|
-
if (this.hasOwnProperty(
|
|
208
|
+
if (this.hasOwnProperty(W("finalized")))
|
|
207
209
|
return;
|
|
208
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
|
209
|
-
const e = this.properties, r = [...
|
|
210
|
-
for (const
|
|
211
|
-
this.createProperty(
|
|
210
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(W("properties"))) {
|
|
211
|
+
const e = this.properties, r = [...ae(e), ...ce(e)];
|
|
212
|
+
for (const s of r)
|
|
213
|
+
this.createProperty(s, e[s]);
|
|
212
214
|
}
|
|
213
215
|
const u = this[Symbol.metadata];
|
|
214
216
|
if (u !== null) {
|
|
215
217
|
const e = litPropertyMetadata.get(u);
|
|
216
218
|
if (e !== void 0)
|
|
217
|
-
for (const [r,
|
|
218
|
-
this.elementProperties.set(r,
|
|
219
|
+
for (const [r, s] of e)
|
|
220
|
+
this.elementProperties.set(r, s);
|
|
219
221
|
}
|
|
220
222
|
this._$Eh = /* @__PURE__ */ new Map();
|
|
221
223
|
for (const [e, r] of this.elementProperties) {
|
|
222
|
-
const
|
|
223
|
-
|
|
224
|
+
const s = this._$Eu(e, r);
|
|
225
|
+
s !== void 0 && this._$Eh.set(s, e);
|
|
224
226
|
}
|
|
225
227
|
this.elementStyles = this.finalizeStyles(this.styles);
|
|
226
228
|
}
|
|
@@ -228,10 +230,10 @@ class k extends HTMLElement {
|
|
|
228
230
|
const e = [];
|
|
229
231
|
if (Array.isArray(u)) {
|
|
230
232
|
const r = new Set(u.flat(1 / 0).reverse());
|
|
231
|
-
for (const
|
|
232
|
-
e.unshift(
|
|
233
|
+
for (const s of r)
|
|
234
|
+
e.unshift(wu(s));
|
|
233
235
|
} else
|
|
234
|
-
u !== void 0 && e.push(
|
|
236
|
+
u !== void 0 && e.push(wu(u));
|
|
235
237
|
return e;
|
|
236
238
|
}
|
|
237
239
|
static _$Eu(u, e) {
|
|
@@ -261,7 +263,7 @@ class k extends HTMLElement {
|
|
|
261
263
|
}
|
|
262
264
|
createRenderRoot() {
|
|
263
265
|
const u = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
264
|
-
return
|
|
266
|
+
return De(u, this.constructor.elementStyles), u;
|
|
265
267
|
}
|
|
266
268
|
connectedCallback() {
|
|
267
269
|
var u;
|
|
@@ -283,24 +285,24 @@ class k extends HTMLElement {
|
|
|
283
285
|
this._$AK(u, r);
|
|
284
286
|
}
|
|
285
287
|
_$EC(u, e) {
|
|
286
|
-
var
|
|
287
|
-
const r = this.constructor.elementProperties.get(u),
|
|
288
|
-
if (
|
|
289
|
-
const i = (((
|
|
290
|
-
this._$Em = u, i == null ? this.removeAttribute(
|
|
288
|
+
var D;
|
|
289
|
+
const r = this.constructor.elementProperties.get(u), s = this.constructor._$Eu(u, r);
|
|
290
|
+
if (s !== void 0 && r.reflect === !0) {
|
|
291
|
+
const i = (((D = r.converter) == null ? void 0 : D.toAttribute) !== void 0 ? r.converter : tu).toAttribute(e, r.type);
|
|
292
|
+
this._$Em = u, i == null ? this.removeAttribute(s) : this.setAttribute(s, i), this._$Em = null;
|
|
291
293
|
}
|
|
292
294
|
}
|
|
293
295
|
_$AK(u, e) {
|
|
294
|
-
var
|
|
295
|
-
const r = this.constructor,
|
|
296
|
-
if (
|
|
297
|
-
const i = r.getPropertyOptions(
|
|
298
|
-
this._$Em =
|
|
296
|
+
var D;
|
|
297
|
+
const r = this.constructor, s = r._$Eh.get(u);
|
|
298
|
+
if (s !== void 0 && this._$Em !== s) {
|
|
299
|
+
const i = r.getPropertyOptions(s), a = typeof i.converter == "function" ? { fromAttribute: i.converter } : ((D = i.converter) == null ? void 0 : D.fromAttribute) !== void 0 ? i.converter : tu;
|
|
300
|
+
this._$Em = s, this[s] = a.fromAttribute(e, i.type), this._$Em = null;
|
|
299
301
|
}
|
|
300
302
|
}
|
|
301
303
|
requestUpdate(u, e, r) {
|
|
302
304
|
if (u !== void 0) {
|
|
303
|
-
if (r ?? (r = this.constructor.getPropertyOptions(u)), !(r.hasChanged ??
|
|
305
|
+
if (r ?? (r = this.constructor.getPropertyOptions(u)), !(r.hasChanged ?? yu)(this[u], e))
|
|
304
306
|
return;
|
|
305
307
|
this.P(u, e, r);
|
|
306
308
|
}
|
|
@@ -328,24 +330,24 @@ class k extends HTMLElement {
|
|
|
328
330
|
return;
|
|
329
331
|
if (!this.hasUpdated) {
|
|
330
332
|
if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
|
|
331
|
-
for (const [
|
|
332
|
-
this[
|
|
333
|
+
for (const [D, i] of this._$Ep)
|
|
334
|
+
this[D] = i;
|
|
333
335
|
this._$Ep = void 0;
|
|
334
336
|
}
|
|
335
|
-
const
|
|
336
|
-
if (
|
|
337
|
-
for (const [
|
|
338
|
-
i.wrapped !== !0 || this._$AL.has(
|
|
337
|
+
const s = this.constructor.elementProperties;
|
|
338
|
+
if (s.size > 0)
|
|
339
|
+
for (const [D, i] of s)
|
|
340
|
+
i.wrapped !== !0 || this._$AL.has(D) || this[D] === void 0 || this.P(D, this[D], i);
|
|
339
341
|
}
|
|
340
342
|
let u = !1;
|
|
341
343
|
const e = this._$AL;
|
|
342
344
|
try {
|
|
343
|
-
u = this.shouldUpdate(e), u ? (this.willUpdate(e), (r = this._$EO) == null || r.forEach((
|
|
344
|
-
var
|
|
345
|
-
return (
|
|
345
|
+
u = this.shouldUpdate(e), u ? (this.willUpdate(e), (r = this._$EO) == null || r.forEach((s) => {
|
|
346
|
+
var D;
|
|
347
|
+
return (D = s.hostUpdate) == null ? void 0 : D.call(s);
|
|
346
348
|
}), this.update(e)) : this._$EU();
|
|
347
|
-
} catch (
|
|
348
|
-
throw u = !1, this._$EU(),
|
|
349
|
+
} catch (s) {
|
|
350
|
+
throw u = !1, this._$EU(), s;
|
|
349
351
|
}
|
|
350
352
|
u && this._$AE(e);
|
|
351
353
|
}
|
|
@@ -354,8 +356,8 @@ class k extends HTMLElement {
|
|
|
354
356
|
_$AE(u) {
|
|
355
357
|
var e;
|
|
356
358
|
(e = this._$EO) == null || e.forEach((r) => {
|
|
357
|
-
var
|
|
358
|
-
return (
|
|
359
|
+
var s;
|
|
360
|
+
return (s = r.hostUpdated) == null ? void 0 : s.call(r);
|
|
359
361
|
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(u)), this.updated(u);
|
|
360
362
|
}
|
|
361
363
|
_$EU() {
|
|
@@ -378,86 +380,86 @@ class k extends HTMLElement {
|
|
|
378
380
|
firstUpdated(u) {
|
|
379
381
|
}
|
|
380
382
|
}
|
|
381
|
-
|
|
383
|
+
H.elementStyles = [], H.shadowRootOptions = { mode: "open" }, H[W("elementProperties")] = /* @__PURE__ */ new Map(), H[W("finalized")] = /* @__PURE__ */ new Map(), ou == null || ou({ ReactiveElement: H }), (P.reactiveElementVersions ?? (P.reactiveElementVersions = [])).push("2.0.4");
|
|
382
384
|
/**
|
|
383
385
|
* @license
|
|
384
386
|
* Copyright 2017 Google LLC
|
|
385
387
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
386
388
|
*/
|
|
387
|
-
const
|
|
388
|
-
\f\r]`,
|
|
389
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
390
|
-
function
|
|
389
|
+
const V = globalThis, ru = V.trustedTypes, xu = ru ? ru.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, zu = "$lit$", S = `lit$${Math.random().toFixed(9).slice(2)}$`, Wu = "?" + S, Ce = `<${Wu}>`, k = document, J = () => k.createComment(""), Z = (t) => t === null || typeof t != "object" && typeof t != "function", Vu = Array.isArray, Ee = (t) => Vu(t) || typeof (t == null ? void 0 : t[Symbol.iterator]) == "function", au = `[
|
|
390
|
+
\f\r]`, G = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Nu = /-->/g, Tu = />/g, T = RegExp(`>|${au}(?:([^\\s"'>=/]+)(${au}*=${au}*(?:[^
|
|
391
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Mu = /'/g, Ou = /"/g, qu = /^(?:script|style|textarea|title)$/i, Fe = (t) => (u, ...e) => ({ _$litType$: t, strings: u, values: e }), Ju = Fe(1), U = Symbol.for("lit-noChange"), B = Symbol.for("lit-nothing"), Lu = /* @__PURE__ */ new WeakMap(), L = k.createTreeWalker(k, 129);
|
|
392
|
+
function Zu(t, u) {
|
|
391
393
|
if (!Array.isArray(t) || !t.hasOwnProperty("raw"))
|
|
392
394
|
throw Error("invalid template strings array");
|
|
393
|
-
return
|
|
395
|
+
return xu !== void 0 ? xu.createHTML(u) : u;
|
|
394
396
|
}
|
|
395
|
-
const
|
|
397
|
+
const le = (t, u) => {
|
|
396
398
|
const e = t.length - 1, r = [];
|
|
397
|
-
let
|
|
398
|
-
for (let
|
|
399
|
-
const
|
|
400
|
-
let h,
|
|
401
|
-
for (;
|
|
402
|
-
|
|
403
|
-
const
|
|
404
|
-
|
|
405
|
-
}
|
|
406
|
-
return [
|
|
399
|
+
let s, D = u === 2 ? "<svg>" : "", i = G;
|
|
400
|
+
for (let a = 0; a < e; a++) {
|
|
401
|
+
const o = t[a];
|
|
402
|
+
let h, E, F = -1, y = 0;
|
|
403
|
+
for (; y < o.length && (i.lastIndex = y, E = i.exec(o), E !== null); )
|
|
404
|
+
y = i.lastIndex, i === G ? E[1] === "!--" ? i = Nu : E[1] !== void 0 ? i = Tu : E[2] !== void 0 ? (qu.test(E[2]) && (s = RegExp("</" + E[2], "g")), i = T) : E[3] !== void 0 && (i = T) : i === T ? E[0] === ">" ? (i = s ?? G, F = -1) : E[1] === void 0 ? F = -2 : (F = i.lastIndex - E[2].length, h = E[1], i = E[3] === void 0 ? T : E[3] === '"' ? Ou : Mu) : i === Ou || i === Mu ? i = T : i === Nu || i === Tu ? i = G : (i = T, s = void 0);
|
|
405
|
+
const g = i === T && t[a + 1].startsWith("/>") ? " " : "";
|
|
406
|
+
D += i === G ? o + Ce : F >= 0 ? (r.push(h), o.slice(0, F) + zu + o.slice(F) + S + g) : o + S + (F === -2 ? a : g);
|
|
407
|
+
}
|
|
408
|
+
return [Zu(t, D + (t[e] || "<?>") + (u === 2 ? "</svg>" : "")), r];
|
|
407
409
|
};
|
|
408
|
-
class
|
|
410
|
+
class K {
|
|
409
411
|
constructor({ strings: u, _$litType$: e }, r) {
|
|
410
|
-
let
|
|
412
|
+
let s;
|
|
411
413
|
this.parts = [];
|
|
412
|
-
let
|
|
413
|
-
const
|
|
414
|
-
if (this.el =
|
|
415
|
-
const
|
|
416
|
-
|
|
414
|
+
let D = 0, i = 0;
|
|
415
|
+
const a = u.length - 1, o = this.parts, [h, E] = le(u, e);
|
|
416
|
+
if (this.el = K.createElement(h, r), L.currentNode = this.el.content, e === 2) {
|
|
417
|
+
const F = this.el.content.firstChild;
|
|
418
|
+
F.replaceWith(...F.childNodes);
|
|
417
419
|
}
|
|
418
|
-
for (; (
|
|
419
|
-
if (
|
|
420
|
-
if (
|
|
421
|
-
for (const
|
|
422
|
-
if (
|
|
423
|
-
const
|
|
424
|
-
|
|
420
|
+
for (; (s = L.nextNode()) !== null && o.length < a; ) {
|
|
421
|
+
if (s.nodeType === 1) {
|
|
422
|
+
if (s.hasAttributes())
|
|
423
|
+
for (const F of s.getAttributeNames())
|
|
424
|
+
if (F.endsWith(zu)) {
|
|
425
|
+
const y = E[i++], g = s.getAttribute(F).split(S), N = /([.?@])?(.*)/.exec(y);
|
|
426
|
+
o.push({ type: 1, index: D, name: N[2], strings: g, ctor: N[1] === "." ? pe : N[1] === "?" ? fe : N[1] === "@" ? Be : iu }), s.removeAttribute(F);
|
|
425
427
|
} else
|
|
426
|
-
|
|
427
|
-
if (
|
|
428
|
-
const
|
|
429
|
-
if (
|
|
430
|
-
|
|
431
|
-
for (let
|
|
432
|
-
|
|
433
|
-
|
|
428
|
+
F.startsWith(S) && (o.push({ type: 6, index: D }), s.removeAttribute(F));
|
|
429
|
+
if (qu.test(s.tagName)) {
|
|
430
|
+
const F = s.textContent.split(S), y = F.length - 1;
|
|
431
|
+
if (y > 0) {
|
|
432
|
+
s.textContent = ru ? ru.emptyScript : "";
|
|
433
|
+
for (let g = 0; g < y; g++)
|
|
434
|
+
s.append(F[g], J()), L.nextNode(), o.push({ type: 2, index: ++D });
|
|
435
|
+
s.append(F[y], J());
|
|
434
436
|
}
|
|
435
437
|
}
|
|
436
|
-
} else if (
|
|
437
|
-
if (
|
|
438
|
-
|
|
438
|
+
} else if (s.nodeType === 8)
|
|
439
|
+
if (s.data === Wu)
|
|
440
|
+
o.push({ type: 2, index: D });
|
|
439
441
|
else {
|
|
440
|
-
let
|
|
441
|
-
for (; (
|
|
442
|
-
|
|
442
|
+
let F = -1;
|
|
443
|
+
for (; (F = s.data.indexOf(S, F + 1)) !== -1; )
|
|
444
|
+
o.push({ type: 7, index: D }), F += S.length - 1;
|
|
443
445
|
}
|
|
444
|
-
|
|
446
|
+
D++;
|
|
445
447
|
}
|
|
446
448
|
}
|
|
447
449
|
static createElement(u, e) {
|
|
448
|
-
const r =
|
|
450
|
+
const r = k.createElement("template");
|
|
449
451
|
return r.innerHTML = u, r;
|
|
450
452
|
}
|
|
451
453
|
}
|
|
452
454
|
function R(t, u, e = t, r) {
|
|
453
|
-
var i,
|
|
454
|
-
if (u ===
|
|
455
|
+
var i, a;
|
|
456
|
+
if (u === U)
|
|
455
457
|
return u;
|
|
456
|
-
let
|
|
457
|
-
const
|
|
458
|
-
return (
|
|
458
|
+
let s = r !== void 0 ? (i = e._$Co) == null ? void 0 : i[r] : e._$Cl;
|
|
459
|
+
const D = Z(u) ? void 0 : u._$litDirective$;
|
|
460
|
+
return (s == null ? void 0 : s.constructor) !== D && ((a = s == null ? void 0 : s._$AO) == null || a.call(s, !1), D === void 0 ? s = void 0 : (s = new D(t), s._$AT(t, e, r)), r !== void 0 ? (e._$Co ?? (e._$Co = []))[r] = s : e._$Cl = s), s !== void 0 && (u = R(t, s._$AS(t, u.values), s, r)), u;
|
|
459
461
|
}
|
|
460
|
-
class
|
|
462
|
+
class de {
|
|
461
463
|
constructor(u, e) {
|
|
462
464
|
this._$AV = [], this._$AN = void 0, this._$AD = u, this._$AM = e;
|
|
463
465
|
}
|
|
@@ -468,17 +470,17 @@ class he {
|
|
|
468
470
|
return this._$AM._$AU;
|
|
469
471
|
}
|
|
470
472
|
u(u) {
|
|
471
|
-
const { el: { content: e }, parts: r } = this._$AD,
|
|
472
|
-
|
|
473
|
-
let
|
|
474
|
-
for (;
|
|
475
|
-
if (i ===
|
|
473
|
+
const { el: { content: e }, parts: r } = this._$AD, s = ((u == null ? void 0 : u.creationScope) ?? k).importNode(e, !0);
|
|
474
|
+
L.currentNode = s;
|
|
475
|
+
let D = L.nextNode(), i = 0, a = 0, o = r[0];
|
|
476
|
+
for (; o !== void 0; ) {
|
|
477
|
+
if (i === o.index) {
|
|
476
478
|
let h;
|
|
477
|
-
|
|
479
|
+
o.type === 2 ? h = new Y(D, D.nextSibling, this, u) : o.type === 1 ? h = new o.ctor(D, o.name, o.strings, this, u) : o.type === 6 && (h = new me(D, this, u)), this._$AV.push(h), o = r[++a];
|
|
478
480
|
}
|
|
479
|
-
i !== (
|
|
481
|
+
i !== (o == null ? void 0 : o.index) && (D = L.nextNode(), i++);
|
|
480
482
|
}
|
|
481
|
-
return
|
|
483
|
+
return L.currentNode = k, s;
|
|
482
484
|
}
|
|
483
485
|
p(u) {
|
|
484
486
|
let e = 0;
|
|
@@ -486,13 +488,13 @@ class he {
|
|
|
486
488
|
r !== void 0 && (r.strings !== void 0 ? (r._$AI(u, r, e), e += r.strings.length - 2) : r._$AI(u[e])), e++;
|
|
487
489
|
}
|
|
488
490
|
}
|
|
489
|
-
class
|
|
491
|
+
class Y {
|
|
490
492
|
get _$AU() {
|
|
491
493
|
var u;
|
|
492
494
|
return ((u = this._$AM) == null ? void 0 : u._$AU) ?? this._$Cv;
|
|
493
495
|
}
|
|
494
|
-
constructor(u, e, r,
|
|
495
|
-
this.type = 2, this._$AH = B, this._$AN = void 0, this._$AA = u, this._$AB = e, this._$AM = r, this.options =
|
|
496
|
+
constructor(u, e, r, s) {
|
|
497
|
+
this.type = 2, this._$AH = B, this._$AN = void 0, this._$AA = u, this._$AB = e, this._$AM = r, this.options = s, this._$Cv = (s == null ? void 0 : s.isConnected) ?? !0;
|
|
496
498
|
}
|
|
497
499
|
get parentNode() {
|
|
498
500
|
let u = this._$AA.parentNode;
|
|
@@ -506,7 +508,7 @@ class K {
|
|
|
506
508
|
return this._$AB;
|
|
507
509
|
}
|
|
508
510
|
_$AI(u, e = this) {
|
|
509
|
-
u = R(this, u, e),
|
|
511
|
+
u = R(this, u, e), Z(u) ? u === B || u == null || u === "" ? (this._$AH !== B && this._$AR(), this._$AH = B) : u !== this._$AH && u !== U && this._(u) : u._$litType$ !== void 0 ? this.$(u) : u.nodeType !== void 0 ? this.T(u) : Ee(u) ? this.k(u) : this._(u);
|
|
510
512
|
}
|
|
511
513
|
S(u) {
|
|
512
514
|
return this._$AA.parentNode.insertBefore(u, this._$AB);
|
|
@@ -515,35 +517,35 @@ class K {
|
|
|
515
517
|
this._$AH !== u && (this._$AR(), this._$AH = this.S(u));
|
|
516
518
|
}
|
|
517
519
|
_(u) {
|
|
518
|
-
this._$AH !== B &&
|
|
520
|
+
this._$AH !== B && Z(this._$AH) ? this._$AA.nextSibling.data = u : this.T(k.createTextNode(u)), this._$AH = u;
|
|
519
521
|
}
|
|
520
522
|
$(u) {
|
|
521
|
-
var
|
|
522
|
-
const { values: e, _$litType$: r } = u,
|
|
523
|
-
if (((
|
|
523
|
+
var D;
|
|
524
|
+
const { values: e, _$litType$: r } = u, s = typeof r == "number" ? this._$AC(u) : (r.el === void 0 && (r.el = K.createElement(Zu(r.h, r.h[0]), this.options)), r);
|
|
525
|
+
if (((D = this._$AH) == null ? void 0 : D._$AD) === s)
|
|
524
526
|
this._$AH.p(e);
|
|
525
527
|
else {
|
|
526
|
-
const i = new
|
|
527
|
-
i.p(e), this.T(
|
|
528
|
+
const i = new de(s, this), a = i.u(this.options);
|
|
529
|
+
i.p(e), this.T(a), this._$AH = i;
|
|
528
530
|
}
|
|
529
531
|
}
|
|
530
532
|
_$AC(u) {
|
|
531
|
-
let e =
|
|
532
|
-
return e === void 0 &&
|
|
533
|
+
let e = Lu.get(u.strings);
|
|
534
|
+
return e === void 0 && Lu.set(u.strings, e = new K(u)), e;
|
|
533
535
|
}
|
|
534
536
|
k(u) {
|
|
535
|
-
|
|
537
|
+
Vu(this._$AH) || (this._$AH = [], this._$AR());
|
|
536
538
|
const e = this._$AH;
|
|
537
|
-
let r,
|
|
538
|
-
for (const
|
|
539
|
-
|
|
540
|
-
|
|
539
|
+
let r, s = 0;
|
|
540
|
+
for (const D of u)
|
|
541
|
+
s === e.length ? e.push(r = new Y(this.S(J()), this.S(J()), this, this.options)) : r = e[s], r._$AI(D), s++;
|
|
542
|
+
s < e.length && (this._$AR(r && r._$AB.nextSibling, s), e.length = s);
|
|
541
543
|
}
|
|
542
544
|
_$AR(u = this._$AA.nextSibling, e) {
|
|
543
545
|
var r;
|
|
544
546
|
for ((r = this._$AP) == null ? void 0 : r.call(this, !1, !0, e); u && u !== this._$AB; ) {
|
|
545
|
-
const
|
|
546
|
-
u.remove(), u =
|
|
547
|
+
const s = u.nextSibling;
|
|
548
|
+
u.remove(), u = s;
|
|
547
549
|
}
|
|
548
550
|
}
|
|
549
551
|
setConnected(u) {
|
|
@@ -551,34 +553,34 @@ class K {
|
|
|
551
553
|
this._$AM === void 0 && (this._$Cv = u, (e = this._$AP) == null || e.call(this, u));
|
|
552
554
|
}
|
|
553
555
|
}
|
|
554
|
-
class
|
|
556
|
+
class iu {
|
|
555
557
|
get tagName() {
|
|
556
558
|
return this.element.tagName;
|
|
557
559
|
}
|
|
558
560
|
get _$AU() {
|
|
559
561
|
return this._$AM._$AU;
|
|
560
562
|
}
|
|
561
|
-
constructor(u, e, r,
|
|
562
|
-
this.type = 1, this._$AH = B, this._$AN = void 0, this.element = u, this.name = e, this._$AM =
|
|
563
|
+
constructor(u, e, r, s, D) {
|
|
564
|
+
this.type = 1, this._$AH = B, this._$AN = void 0, this.element = u, this.name = e, this._$AM = s, this.options = D, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = B;
|
|
563
565
|
}
|
|
564
|
-
_$AI(u, e = this, r,
|
|
565
|
-
const
|
|
566
|
+
_$AI(u, e = this, r, s) {
|
|
567
|
+
const D = this.strings;
|
|
566
568
|
let i = !1;
|
|
567
|
-
if (
|
|
568
|
-
u = R(this, u, e, 0), i = !
|
|
569
|
+
if (D === void 0)
|
|
570
|
+
u = R(this, u, e, 0), i = !Z(u) || u !== this._$AH && u !== U, i && (this._$AH = u);
|
|
569
571
|
else {
|
|
570
|
-
const
|
|
571
|
-
let
|
|
572
|
-
for (u =
|
|
573
|
-
h = R(this,
|
|
572
|
+
const a = u;
|
|
573
|
+
let o, h;
|
|
574
|
+
for (u = D[0], o = 0; o < D.length - 1; o++)
|
|
575
|
+
h = R(this, a[r + o], e, o), h === U && (h = this._$AH[o]), i || (i = !Z(h) || h !== this._$AH[o]), h === B ? u = B : u !== B && (u += (h ?? "") + D[o + 1]), this._$AH[o] = h;
|
|
574
576
|
}
|
|
575
|
-
i && !
|
|
577
|
+
i && !s && this.j(u);
|
|
576
578
|
}
|
|
577
579
|
j(u) {
|
|
578
580
|
u === B ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, u ?? "");
|
|
579
581
|
}
|
|
580
582
|
}
|
|
581
|
-
class
|
|
583
|
+
class pe extends iu {
|
|
582
584
|
constructor() {
|
|
583
585
|
super(...arguments), this.type = 3;
|
|
584
586
|
}
|
|
@@ -586,7 +588,7 @@ class Ee extends Du {
|
|
|
586
588
|
this.element[this.name] = u === B ? void 0 : u;
|
|
587
589
|
}
|
|
588
590
|
}
|
|
589
|
-
class
|
|
591
|
+
class fe extends iu {
|
|
590
592
|
constructor() {
|
|
591
593
|
super(...arguments), this.type = 4;
|
|
592
594
|
}
|
|
@@ -594,22 +596,22 @@ class Fe extends Du {
|
|
|
594
596
|
this.element.toggleAttribute(this.name, !!u && u !== B);
|
|
595
597
|
}
|
|
596
598
|
}
|
|
597
|
-
class
|
|
598
|
-
constructor(u, e, r,
|
|
599
|
-
super(u, e, r,
|
|
599
|
+
class Be extends iu {
|
|
600
|
+
constructor(u, e, r, s, D) {
|
|
601
|
+
super(u, e, r, s, D), this.type = 5;
|
|
600
602
|
}
|
|
601
603
|
_$AI(u, e = this) {
|
|
602
|
-
if ((u = R(this, u, e, 0) ?? B) ===
|
|
604
|
+
if ((u = R(this, u, e, 0) ?? B) === U)
|
|
603
605
|
return;
|
|
604
|
-
const r = this._$AH,
|
|
605
|
-
|
|
606
|
+
const r = this._$AH, s = u === B && r !== B || u.capture !== r.capture || u.once !== r.once || u.passive !== r.passive, D = u !== B && (r === B || s);
|
|
607
|
+
s && this.element.removeEventListener(this.name, this, r), D && this.element.addEventListener(this.name, this, u), this._$AH = u;
|
|
606
608
|
}
|
|
607
609
|
handleEvent(u) {
|
|
608
610
|
var e;
|
|
609
611
|
typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, u) : this._$AH.handleEvent(u);
|
|
610
612
|
}
|
|
611
613
|
}
|
|
612
|
-
class
|
|
614
|
+
class me {
|
|
613
615
|
constructor(u, e, r) {
|
|
614
616
|
this.element = u, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = r;
|
|
615
617
|
}
|
|
@@ -620,23 +622,23 @@ class de {
|
|
|
620
622
|
R(this, u);
|
|
621
623
|
}
|
|
622
624
|
}
|
|
623
|
-
const
|
|
624
|
-
|
|
625
|
-
const
|
|
625
|
+
const cu = V.litHtmlPolyfillSupport;
|
|
626
|
+
cu == null || cu(K, Y), (V.litHtmlVersions ?? (V.litHtmlVersions = [])).push("3.1.3");
|
|
627
|
+
const ye = (t, u, e) => {
|
|
626
628
|
const r = (e == null ? void 0 : e.renderBefore) ?? u;
|
|
627
|
-
let
|
|
628
|
-
if (
|
|
629
|
-
const
|
|
630
|
-
r._$litPart$ =
|
|
629
|
+
let s = r._$litPart$;
|
|
630
|
+
if (s === void 0) {
|
|
631
|
+
const D = (e == null ? void 0 : e.renderBefore) ?? null;
|
|
632
|
+
r._$litPart$ = s = new Y(u.insertBefore(J(), D), D, void 0, e ?? {});
|
|
631
633
|
}
|
|
632
|
-
return
|
|
634
|
+
return s._$AI(t), s;
|
|
633
635
|
};
|
|
634
636
|
/**
|
|
635
637
|
* @license
|
|
636
638
|
* Copyright 2017 Google LLC
|
|
637
639
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
638
640
|
*/
|
|
639
|
-
class
|
|
641
|
+
class I extends H {
|
|
640
642
|
constructor() {
|
|
641
643
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
642
644
|
}
|
|
@@ -647,7 +649,7 @@ class H extends k {
|
|
|
647
649
|
}
|
|
648
650
|
update(u) {
|
|
649
651
|
const e = this.render();
|
|
650
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(u), this._$Do =
|
|
652
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(u), this._$Do = ye(e, this.renderRoot, this.renderOptions);
|
|
651
653
|
}
|
|
652
654
|
connectedCallback() {
|
|
653
655
|
var u;
|
|
@@ -658,56 +660,56 @@ class H extends k {
|
|
|
658
660
|
super.disconnectedCallback(), (u = this._$Do) == null || u.setConnected(!1);
|
|
659
661
|
}
|
|
660
662
|
render() {
|
|
661
|
-
return
|
|
663
|
+
return U;
|
|
662
664
|
}
|
|
663
665
|
}
|
|
664
|
-
var
|
|
665
|
-
|
|
666
|
-
const
|
|
667
|
-
|
|
666
|
+
var Ru;
|
|
667
|
+
I._$litElement$ = !0, I.finalized = !0, (Ru = globalThis.litElementHydrateSupport) == null || Ru.call(globalThis, { LitElement: I });
|
|
668
|
+
const Au = globalThis.litElementPolyfillSupport;
|
|
669
|
+
Au == null || Au({ LitElement: I });
|
|
668
670
|
(globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.5");
|
|
669
671
|
/**
|
|
670
672
|
* @license
|
|
671
673
|
* Copyright 2017 Google LLC
|
|
672
674
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
673
675
|
*/
|
|
674
|
-
const
|
|
675
|
-
const { kind: r, metadata:
|
|
676
|
-
let
|
|
677
|
-
if (
|
|
676
|
+
const ge = { attribute: !0, type: String, converter: tu, reflect: !1, hasChanged: yu }, $e = (t = ge, u, e) => {
|
|
677
|
+
const { kind: r, metadata: s } = e;
|
|
678
|
+
let D = globalThis.litPropertyMetadata.get(s);
|
|
679
|
+
if (D === void 0 && globalThis.litPropertyMetadata.set(s, D = /* @__PURE__ */ new Map()), D.set(e.name, t), r === "accessor") {
|
|
678
680
|
const { name: i } = e;
|
|
679
|
-
return { set(
|
|
680
|
-
const
|
|
681
|
-
u.set.call(this,
|
|
682
|
-
}, init(
|
|
683
|
-
return
|
|
681
|
+
return { set(a) {
|
|
682
|
+
const o = u.get.call(this);
|
|
683
|
+
u.set.call(this, a), this.requestUpdate(i, o, t);
|
|
684
|
+
}, init(a) {
|
|
685
|
+
return a !== void 0 && this.P(i, void 0, t), a;
|
|
684
686
|
} };
|
|
685
687
|
}
|
|
686
688
|
if (r === "setter") {
|
|
687
689
|
const { name: i } = e;
|
|
688
|
-
return function(
|
|
689
|
-
const
|
|
690
|
-
u.call(this,
|
|
690
|
+
return function(a) {
|
|
691
|
+
const o = this[i];
|
|
692
|
+
u.call(this, a), this.requestUpdate(i, o, t);
|
|
691
693
|
};
|
|
692
694
|
}
|
|
693
695
|
throw Error("Unsupported decorator location: " + r);
|
|
694
696
|
};
|
|
695
|
-
function
|
|
696
|
-
return (u, e) => typeof e == "object" ?
|
|
697
|
-
const i =
|
|
698
|
-
return
|
|
697
|
+
function gu(t) {
|
|
698
|
+
return (u, e) => typeof e == "object" ? $e(t, u, e) : ((r, s, D) => {
|
|
699
|
+
const i = s.hasOwnProperty(D);
|
|
700
|
+
return s.constructor.createProperty(D, i ? { ...r, wrapped: !0 } : r), i ? Object.getOwnPropertyDescriptor(s, D) : void 0;
|
|
699
701
|
})(t, u, e);
|
|
700
702
|
}
|
|
701
|
-
const
|
|
703
|
+
const be = (t, u, e) => {
|
|
702
704
|
if (!u)
|
|
703
705
|
return;
|
|
704
|
-
const r = Array.isArray(u) ? u : u.match(/([^[.\]])+/g),
|
|
705
|
-
(
|
|
706
|
+
const r = Array.isArray(u) ? u : u.match(/([^[.\]])+/g), s = r == null ? void 0 : r.reduce(
|
|
707
|
+
(D, i) => D && D[i],
|
|
706
708
|
t
|
|
707
709
|
);
|
|
708
|
-
return
|
|
710
|
+
return s === void 0 ? e : s;
|
|
709
711
|
};
|
|
710
|
-
function
|
|
712
|
+
function _e(t) {
|
|
711
713
|
if (!t)
|
|
712
714
|
return !1;
|
|
713
715
|
const u = t.constructor && t.constructor.toString().substring(0, 5) === "class";
|
|
@@ -716,40 +718,42 @@ function ye(t) {
|
|
|
716
718
|
const e = t.prototype.constructor && t.prototype.constructor.toString && t.prototype.constructor.toString().substring(0, 5) === "class";
|
|
717
719
|
return u || e;
|
|
718
720
|
}
|
|
719
|
-
const
|
|
721
|
+
const ve = () => {
|
|
720
722
|
const t = "[object Number]", e = Object.prototype.toString;
|
|
721
|
-
function r(
|
|
722
|
-
return !!
|
|
723
|
+
function r(D) {
|
|
724
|
+
return !!D && typeof D == "object";
|
|
723
725
|
}
|
|
724
726
|
return function(i) {
|
|
725
727
|
return typeof i == "number" || r(i) && e.call(i) == t;
|
|
726
728
|
};
|
|
727
|
-
},
|
|
729
|
+
}, we = ve(), Se = (t, u, e) => {
|
|
728
730
|
const r = Array.isArray(u) ? u : u.match(/([^[.\]])+/g);
|
|
729
|
-
r == null || r.reduce((
|
|
730
|
-
},
|
|
731
|
-
var D;
|
|
732
|
-
const r =
|
|
733
|
-
if (
|
|
731
|
+
r == null || r.reduce((s, D, i) => (s[D] === void 0 && (s[D] = {}), i === r.length - 1 && (s[D] = e), s[D]), t);
|
|
732
|
+
}, Ku = "data-three-uuid", Fu = (t, u, e) => {
|
|
733
|
+
var D, i;
|
|
734
|
+
const r = be(t, u);
|
|
735
|
+
if (we(e) && (r != null && r.setScalar))
|
|
734
736
|
r.setScalar(+e);
|
|
735
737
|
else if (r != null && r.set)
|
|
736
738
|
if (typeof e == "string") {
|
|
737
|
-
const
|
|
739
|
+
const a = e.split(","), o = a.every((h) => !h.match(/^[^\d,]+$/));
|
|
738
740
|
if ((D = e.toLowerCase().trim().match(/^#[\dabcdef]{3,6}$/)) != null && D.length)
|
|
739
741
|
if (e.length === 4) {
|
|
740
|
-
const
|
|
741
|
-
r.set(+`0x${
|
|
742
|
+
const h = [e[1], e[1], e[2], e[2], e[3], e[3]].join("");
|
|
743
|
+
r.set(+`0x${h}`);
|
|
742
744
|
} else
|
|
743
745
|
r.set(+`0x${e.slice(1)}`);
|
|
744
746
|
else
|
|
745
|
-
|
|
747
|
+
a != null && a.length && o ? r.set(...a.map((h) => +h)) : r.set(e);
|
|
746
748
|
} else {
|
|
747
|
-
const
|
|
748
|
-
r.set(...
|
|
749
|
+
const a = Array.isArray(e) ? e : [e];
|
|
750
|
+
r.set(...a);
|
|
749
751
|
}
|
|
750
752
|
else
|
|
751
|
-
|
|
752
|
-
|
|
753
|
+
Se(t, u, e);
|
|
754
|
+
const s = t;
|
|
755
|
+
(i = s.type) != null && i.toLowerCase().endsWith("material") && (s.needsUpdate = !0);
|
|
756
|
+
}, hu = {
|
|
753
757
|
$scene: (t) => {
|
|
754
758
|
const u = t.closest("three-lunchbox");
|
|
755
759
|
return u == null ? void 0 : u.three.scene;
|
|
@@ -766,111 +770,136 @@ const ge = () => {
|
|
|
766
770
|
const u = t.closest("three-lunchbox");
|
|
767
771
|
return u == null ? void 0 : u.three.renderer.domElement;
|
|
768
772
|
}
|
|
769
|
-
},
|
|
773
|
+
}, lu = (t, u) => {
|
|
770
774
|
var r;
|
|
771
|
-
return typeof t != "string" ? t : t === "" ? !0 : ((r =
|
|
775
|
+
return typeof t != "string" ? t : t === "" ? !0 : ((r = hu[t]) == null ? void 0 : r.call(hu, u)) ?? t;
|
|
772
776
|
};
|
|
773
|
-
var
|
|
774
|
-
for (var
|
|
775
|
-
(i = t[
|
|
776
|
-
return
|
|
777
|
+
var Pe = Object.defineProperty, xe = (t, u, e, r) => {
|
|
778
|
+
for (var s = void 0, D = t.length - 1, i; D >= 0; D--)
|
|
779
|
+
(i = t[D]) && (s = i(u, e, s) || s);
|
|
780
|
+
return s && Pe(u, e, s), s;
|
|
777
781
|
};
|
|
778
|
-
const
|
|
779
|
-
|
|
782
|
+
const Xu = "raycast", ku = [
|
|
783
|
+
Xu,
|
|
780
784
|
"args",
|
|
781
785
|
"data"
|
|
782
|
-
],
|
|
783
|
-
const u = typeof t == "string" ?
|
|
784
|
-
if (!
|
|
786
|
+
], Hu = (t) => t.split("-"), Yu = (t) => {
|
|
787
|
+
const u = typeof t == "string" ? b[t] : t;
|
|
788
|
+
if (!_e(u))
|
|
785
789
|
return null;
|
|
786
|
-
class e extends
|
|
790
|
+
class e extends I {
|
|
787
791
|
constructor() {
|
|
788
|
-
super(...arguments), this.args = [], this.instance = null, this.dispose = [], this.mutationObserver = null;
|
|
792
|
+
super(...arguments), this.args = [], this.instance = null, this.loaded = null, this.dispose = [], this.mutationObserver = null;
|
|
789
793
|
}
|
|
790
794
|
connectedCallback() {
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
795
|
+
var i, a;
|
|
796
|
+
super.connectedCallback(), this.mutationObserver = new MutationObserver((o) => {
|
|
797
|
+
o.forEach((h) => {
|
|
798
|
+
if (!h.attributeName)
|
|
794
799
|
return;
|
|
795
|
-
const
|
|
796
|
-
|
|
800
|
+
const E = this.attributes.getNamedItem(h.attributeName);
|
|
801
|
+
E && this.updateProperty(E);
|
|
797
802
|
});
|
|
798
803
|
}), this.mutationObserver.observe(this, {
|
|
799
804
|
attributes: !0
|
|
800
|
-
}), this.instance = new u(...this.args.map((
|
|
801
|
-
const
|
|
802
|
-
|
|
805
|
+
}), this.instance = new u(...this.args.map((o) => lu(o, this))), this.getAttributeNames().forEach((o) => {
|
|
806
|
+
const h = this.attributes.getNamedItem(o);
|
|
807
|
+
h && this.updateProperty(h);
|
|
803
808
|
}), Array.from(this.attributes).forEach(this.updateProperty.bind(this));
|
|
804
|
-
const
|
|
805
|
-
|
|
809
|
+
const s = this.instance;
|
|
810
|
+
s.uuid && this.setAttribute(Ku, s.uuid), this.dispatchEvent(new CustomEvent("instancecreated", {
|
|
806
811
|
detail: {
|
|
807
812
|
instance: this.instance
|
|
808
813
|
}
|
|
809
814
|
}));
|
|
810
|
-
const
|
|
811
|
-
if (
|
|
812
|
-
const
|
|
813
|
-
if (i.type.toLowerCase().includes("geometry") &&
|
|
814
|
-
|
|
815
|
-
else if (
|
|
816
|
-
|
|
817
|
-
else if (
|
|
815
|
+
const D = this.parentElement;
|
|
816
|
+
if (D.instance) {
|
|
817
|
+
const o = this.instance, h = this.instance, E = D.instance, F = this.instance, y = D.instance, g = this.tagName.toString().toLowerCase().endsWith("-loader");
|
|
818
|
+
if ((i = o.type) != null && i.toLowerCase().includes("geometry") && E.geometry)
|
|
819
|
+
E.geometry = o;
|
|
820
|
+
else if ((a = h.type) != null && a.toLowerCase().includes("material") && E.material)
|
|
821
|
+
E.material = h;
|
|
822
|
+
else if (g) {
|
|
823
|
+
const Q = this.getAttribute("src");
|
|
824
|
+
if (!Q)
|
|
825
|
+
throw new Error("Loader requires a source.");
|
|
826
|
+
F.load(Q, (j) => {
|
|
827
|
+
this.loaded = j;
|
|
828
|
+
const _u = this.getAttribute("attach");
|
|
829
|
+
_u && this.executeAttach(_u, j), this.dispatchEvent(new CustomEvent("loaded", {
|
|
830
|
+
detail: {
|
|
831
|
+
loaded: j
|
|
832
|
+
}
|
|
833
|
+
}));
|
|
834
|
+
}, void 0, (j) => {
|
|
835
|
+
throw new Error(`error loading: ${Q}` + j);
|
|
836
|
+
});
|
|
837
|
+
} else if (y.add)
|
|
818
838
|
try {
|
|
819
|
-
|
|
839
|
+
y.add(s);
|
|
820
840
|
} catch {
|
|
821
|
-
throw new Error(`Error adding ${this.tagName} to ${
|
|
841
|
+
throw new Error(`Error adding ${this.tagName} to ${y}`);
|
|
822
842
|
}
|
|
843
|
+
const N = this.getAttribute("attach");
|
|
844
|
+
!g && N && this.executeAttach(N, this.instance);
|
|
823
845
|
}
|
|
824
846
|
}
|
|
825
847
|
/** Update an instance's property. When creating a `<mesh position-y="0.5">`, for example, this sets `mesh.position.y = 0.5`. */
|
|
826
|
-
updateProperty(
|
|
827
|
-
const { name:
|
|
828
|
-
let
|
|
829
|
-
Object.keys(this.instance ?? {}).forEach((
|
|
830
|
-
|
|
848
|
+
updateProperty(s) {
|
|
849
|
+
const { name: D, value: i } = s;
|
|
850
|
+
let a = D;
|
|
851
|
+
Object.keys(this.instance ?? {}).forEach((E) => {
|
|
852
|
+
E.toLowerCase() === a && (a = E);
|
|
831
853
|
});
|
|
832
|
-
const
|
|
833
|
-
if (
|
|
854
|
+
const o = Hu(a);
|
|
855
|
+
if (ku.includes(a) || ku.includes(o[0]))
|
|
834
856
|
return;
|
|
835
|
-
let h =
|
|
857
|
+
let h = lu(i, this);
|
|
836
858
|
try {
|
|
837
859
|
h = JSON.parse(i === "" ? "true" : i);
|
|
838
860
|
} catch {
|
|
839
861
|
}
|
|
840
|
-
this.instance &&
|
|
862
|
+
this.instance && Fu(this.instance, o, h);
|
|
863
|
+
}
|
|
864
|
+
executeAttach(s, D) {
|
|
865
|
+
const i = this.parentElement;
|
|
866
|
+
i.instance && Fu(i.instance, Hu(s), D);
|
|
841
867
|
}
|
|
842
868
|
disconnectedCallback() {
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
869
|
+
super.disconnectedCallback(), [this.instance, this.loaded].forEach((D) => {
|
|
870
|
+
var o, h;
|
|
871
|
+
if (!D)
|
|
872
|
+
return;
|
|
873
|
+
const i = D, a = D;
|
|
874
|
+
(o = i.dispose) == null || o.call(i), (h = a.removeFromParent) == null || h.call(a);
|
|
875
|
+
});
|
|
847
876
|
}
|
|
848
877
|
/** Render */
|
|
849
878
|
render() {
|
|
850
|
-
return
|
|
879
|
+
return Ju`<slot></slot>`;
|
|
851
880
|
}
|
|
852
881
|
}
|
|
853
|
-
return
|
|
854
|
-
|
|
882
|
+
return xe([
|
|
883
|
+
gu({ type: Array })
|
|
855
884
|
], e.prototype, "args"), e;
|
|
856
885
|
};
|
|
857
|
-
function
|
|
886
|
+
function Ne(t) {
|
|
858
887
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
859
888
|
}
|
|
860
|
-
var
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
const
|
|
865
|
-
var
|
|
889
|
+
var nu = {};
|
|
890
|
+
nu.Space_Separator = /[\u1680\u2000-\u200A\u202F\u205F\u3000]/;
|
|
891
|
+
nu.ID_Start = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/;
|
|
892
|
+
nu.ID_Continue = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/;
|
|
893
|
+
const Cu = nu;
|
|
894
|
+
var Te = {
|
|
866
895
|
isSpaceSeparator(t) {
|
|
867
|
-
return typeof t == "string" &&
|
|
896
|
+
return typeof t == "string" && Cu.Space_Separator.test(t);
|
|
868
897
|
},
|
|
869
898
|
isIdStartChar(t) {
|
|
870
|
-
return typeof t == "string" && (t >= "a" && t <= "z" || t >= "A" && t <= "Z" || t === "$" || t === "_" ||
|
|
899
|
+
return typeof t == "string" && (t >= "a" && t <= "z" || t >= "A" && t <= "Z" || t === "$" || t === "_" || Cu.ID_Start.test(t));
|
|
871
900
|
},
|
|
872
901
|
isIdContinueChar(t) {
|
|
873
|
-
return typeof t == "string" && (t >= "a" && t <= "z" || t >= "A" && t <= "Z" || t >= "0" && t <= "9" || t === "$" || t === "_" || t === "" || t === "" ||
|
|
902
|
+
return typeof t == "string" && (t >= "a" && t <= "z" || t >= "A" && t <= "Z" || t >= "0" && t <= "9" || t === "$" || t === "_" || t === "" || t === "" || Cu.ID_Continue.test(t));
|
|
874
903
|
},
|
|
875
904
|
isDigit(t) {
|
|
876
905
|
return typeof t == "string" && /[0-9]/.test(t);
|
|
@@ -879,22 +908,22 @@ var Se = {
|
|
|
879
908
|
return typeof t == "string" && /[0-9A-Fa-f]/.test(t);
|
|
880
909
|
}
|
|
881
910
|
};
|
|
882
|
-
const p =
|
|
883
|
-
let
|
|
884
|
-
var
|
|
885
|
-
|
|
911
|
+
const p = Te;
|
|
912
|
+
let du, m, v, su, x, $, f, $u, q;
|
|
913
|
+
var Me = function(u, e) {
|
|
914
|
+
du = String(u), m = "start", v = [], su = 0, x = 1, $ = 0, f = void 0, $u = void 0, q = void 0;
|
|
886
915
|
do
|
|
887
|
-
f =
|
|
916
|
+
f = Oe(), He[m]();
|
|
888
917
|
while (f.type !== "eof");
|
|
889
|
-
return typeof e == "function" ?
|
|
918
|
+
return typeof e == "function" ? pu({ "": q }, "", e) : q;
|
|
890
919
|
};
|
|
891
|
-
function
|
|
920
|
+
function pu(t, u, e) {
|
|
892
921
|
const r = t[u];
|
|
893
922
|
if (r != null && typeof r == "object")
|
|
894
923
|
if (Array.isArray(r))
|
|
895
|
-
for (let
|
|
896
|
-
const
|
|
897
|
-
i === void 0 ? delete r[
|
|
924
|
+
for (let s = 0; s < r.length; s++) {
|
|
925
|
+
const D = String(s), i = pu(r, D, e);
|
|
926
|
+
i === void 0 ? delete r[D] : Object.defineProperty(r, D, {
|
|
898
927
|
value: i,
|
|
899
928
|
writable: !0,
|
|
900
929
|
enumerable: !0,
|
|
@@ -902,10 +931,10 @@ function Fu(t, u, e) {
|
|
|
902
931
|
});
|
|
903
932
|
}
|
|
904
933
|
else
|
|
905
|
-
for (const
|
|
906
|
-
const
|
|
907
|
-
|
|
908
|
-
value:
|
|
934
|
+
for (const s in r) {
|
|
935
|
+
const D = pu(r, s, e);
|
|
936
|
+
D === void 0 ? delete r[s] : Object.defineProperty(r, s, {
|
|
937
|
+
value: D,
|
|
909
938
|
writable: !0,
|
|
910
939
|
enumerable: !0,
|
|
911
940
|
configurable: !0
|
|
@@ -913,25 +942,25 @@ function Fu(t, u, e) {
|
|
|
913
942
|
}
|
|
914
943
|
return e.call(t, u, r);
|
|
915
944
|
}
|
|
916
|
-
let A, c,
|
|
917
|
-
function
|
|
918
|
-
for (A = "default", c = "",
|
|
919
|
-
C =
|
|
920
|
-
const t =
|
|
945
|
+
let A, c, z, _, C;
|
|
946
|
+
function Oe() {
|
|
947
|
+
for (A = "default", c = "", z = !1, _ = 1; ; ) {
|
|
948
|
+
C = w();
|
|
949
|
+
const t = Qu[A]();
|
|
921
950
|
if (t)
|
|
922
951
|
return t;
|
|
923
952
|
}
|
|
924
953
|
}
|
|
925
|
-
function
|
|
926
|
-
if (
|
|
927
|
-
return String.fromCodePoint(
|
|
954
|
+
function w() {
|
|
955
|
+
if (du[su])
|
|
956
|
+
return String.fromCodePoint(du.codePointAt(su));
|
|
928
957
|
}
|
|
929
958
|
function n() {
|
|
930
|
-
const t =
|
|
959
|
+
const t = w();
|
|
931
960
|
return t === `
|
|
932
|
-
` ? (x++,
|
|
961
|
+
` ? (x++, $ = 0) : t ? $ += t.length : $++, t && (su += t.length), t;
|
|
933
962
|
}
|
|
934
|
-
const
|
|
963
|
+
const Qu = {
|
|
935
964
|
default() {
|
|
936
965
|
switch (C) {
|
|
937
966
|
case " ":
|
|
@@ -951,13 +980,13 @@ const Zu = {
|
|
|
951
980
|
n(), A = "comment";
|
|
952
981
|
return;
|
|
953
982
|
case void 0:
|
|
954
|
-
return n(),
|
|
983
|
+
return n(), l("eof");
|
|
955
984
|
}
|
|
956
985
|
if (p.isSpaceSeparator(C)) {
|
|
957
986
|
n();
|
|
958
987
|
return;
|
|
959
988
|
}
|
|
960
|
-
return
|
|
989
|
+
return Qu[m]();
|
|
961
990
|
},
|
|
962
991
|
comment() {
|
|
963
992
|
switch (C) {
|
|
@@ -968,7 +997,7 @@ const Zu = {
|
|
|
968
997
|
n(), A = "singleLineComment";
|
|
969
998
|
return;
|
|
970
999
|
}
|
|
971
|
-
throw
|
|
1000
|
+
throw d(n());
|
|
972
1001
|
},
|
|
973
1002
|
multiLineComment() {
|
|
974
1003
|
switch (C) {
|
|
@@ -976,7 +1005,7 @@ const Zu = {
|
|
|
976
1005
|
n(), A = "multiLineCommentAsterisk";
|
|
977
1006
|
return;
|
|
978
1007
|
case void 0:
|
|
979
|
-
throw
|
|
1008
|
+
throw d(n());
|
|
980
1009
|
}
|
|
981
1010
|
n();
|
|
982
1011
|
},
|
|
@@ -989,7 +1018,7 @@ const Zu = {
|
|
|
989
1018
|
n(), A = "default";
|
|
990
1019
|
return;
|
|
991
1020
|
case void 0:
|
|
992
|
-
throw
|
|
1021
|
+
throw d(n());
|
|
993
1022
|
}
|
|
994
1023
|
n(), A = "multiLineComment";
|
|
995
1024
|
},
|
|
@@ -1003,7 +1032,7 @@ const Zu = {
|
|
|
1003
1032
|
n(), A = "default";
|
|
1004
1033
|
return;
|
|
1005
1034
|
case void 0:
|
|
1006
|
-
return n(),
|
|
1035
|
+
return n(), l("eof");
|
|
1007
1036
|
}
|
|
1008
1037
|
n();
|
|
1009
1038
|
},
|
|
@@ -1011,13 +1040,13 @@ const Zu = {
|
|
|
1011
1040
|
switch (C) {
|
|
1012
1041
|
case "{":
|
|
1013
1042
|
case "[":
|
|
1014
|
-
return
|
|
1043
|
+
return l("punctuator", n());
|
|
1015
1044
|
case "n":
|
|
1016
|
-
return n(),
|
|
1045
|
+
return n(), M("ull"), l("null", null);
|
|
1017
1046
|
case "t":
|
|
1018
|
-
return n(),
|
|
1047
|
+
return n(), M("rue"), l("boolean", !0);
|
|
1019
1048
|
case "f":
|
|
1020
|
-
return n(),
|
|
1049
|
+
return n(), M("alse"), l("boolean", !1);
|
|
1021
1050
|
case "-":
|
|
1022
1051
|
case "+":
|
|
1023
1052
|
n() === "-" && (_ = -1), A = "sign";
|
|
@@ -1040,28 +1069,28 @@ const Zu = {
|
|
|
1040
1069
|
c = n(), A = "decimalInteger";
|
|
1041
1070
|
return;
|
|
1042
1071
|
case "I":
|
|
1043
|
-
return n(),
|
|
1072
|
+
return n(), M("nfinity"), l("numeric", 1 / 0);
|
|
1044
1073
|
case "N":
|
|
1045
|
-
return n(),
|
|
1074
|
+
return n(), M("aN"), l("numeric", NaN);
|
|
1046
1075
|
case '"':
|
|
1047
1076
|
case "'":
|
|
1048
|
-
|
|
1077
|
+
z = n() === '"', c = "", A = "string";
|
|
1049
1078
|
return;
|
|
1050
1079
|
}
|
|
1051
|
-
throw
|
|
1080
|
+
throw d(n());
|
|
1052
1081
|
},
|
|
1053
1082
|
identifierNameStartEscape() {
|
|
1054
1083
|
if (C !== "u")
|
|
1055
|
-
throw
|
|
1084
|
+
throw d(n());
|
|
1056
1085
|
n();
|
|
1057
|
-
const t =
|
|
1086
|
+
const t = fu();
|
|
1058
1087
|
switch (t) {
|
|
1059
1088
|
case "$":
|
|
1060
1089
|
case "_":
|
|
1061
1090
|
break;
|
|
1062
1091
|
default:
|
|
1063
1092
|
if (!p.isIdStartChar(t))
|
|
1064
|
-
throw
|
|
1093
|
+
throw Iu();
|
|
1065
1094
|
break;
|
|
1066
1095
|
}
|
|
1067
1096
|
c += t, A = "identifierName";
|
|
@@ -1082,13 +1111,13 @@ const Zu = {
|
|
|
1082
1111
|
c += n();
|
|
1083
1112
|
return;
|
|
1084
1113
|
}
|
|
1085
|
-
return
|
|
1114
|
+
return l("identifier", c);
|
|
1086
1115
|
},
|
|
1087
1116
|
identifierNameEscape() {
|
|
1088
1117
|
if (C !== "u")
|
|
1089
|
-
throw
|
|
1118
|
+
throw d(n());
|
|
1090
1119
|
n();
|
|
1091
|
-
const t =
|
|
1120
|
+
const t = fu();
|
|
1092
1121
|
switch (t) {
|
|
1093
1122
|
case "$":
|
|
1094
1123
|
case "_":
|
|
@@ -1097,7 +1126,7 @@ const Zu = {
|
|
|
1097
1126
|
break;
|
|
1098
1127
|
default:
|
|
1099
1128
|
if (!p.isIdContinueChar(t))
|
|
1100
|
-
throw
|
|
1129
|
+
throw Iu();
|
|
1101
1130
|
break;
|
|
1102
1131
|
}
|
|
1103
1132
|
c += t, A = "identifierName";
|
|
@@ -1122,11 +1151,11 @@ const Zu = {
|
|
|
1122
1151
|
c = n(), A = "decimalInteger";
|
|
1123
1152
|
return;
|
|
1124
1153
|
case "I":
|
|
1125
|
-
return n(),
|
|
1154
|
+
return n(), M("nfinity"), l("numeric", _ * (1 / 0));
|
|
1126
1155
|
case "N":
|
|
1127
|
-
return n(),
|
|
1156
|
+
return n(), M("aN"), l("numeric", NaN);
|
|
1128
1157
|
}
|
|
1129
|
-
throw
|
|
1158
|
+
throw d(n());
|
|
1130
1159
|
},
|
|
1131
1160
|
zero() {
|
|
1132
1161
|
switch (C) {
|
|
@@ -1142,7 +1171,7 @@ const Zu = {
|
|
|
1142
1171
|
c += n(), A = "hexadecimal";
|
|
1143
1172
|
return;
|
|
1144
1173
|
}
|
|
1145
|
-
return
|
|
1174
|
+
return l("numeric", _ * 0);
|
|
1146
1175
|
},
|
|
1147
1176
|
decimalInteger() {
|
|
1148
1177
|
switch (C) {
|
|
@@ -1158,14 +1187,14 @@ const Zu = {
|
|
|
1158
1187
|
c += n();
|
|
1159
1188
|
return;
|
|
1160
1189
|
}
|
|
1161
|
-
return
|
|
1190
|
+
return l("numeric", _ * Number(c));
|
|
1162
1191
|
},
|
|
1163
1192
|
decimalPointLeading() {
|
|
1164
1193
|
if (p.isDigit(C)) {
|
|
1165
1194
|
c += n(), A = "decimalFraction";
|
|
1166
1195
|
return;
|
|
1167
1196
|
}
|
|
1168
|
-
throw
|
|
1197
|
+
throw d(n());
|
|
1169
1198
|
},
|
|
1170
1199
|
decimalPoint() {
|
|
1171
1200
|
switch (C) {
|
|
@@ -1178,7 +1207,7 @@ const Zu = {
|
|
|
1178
1207
|
c += n(), A = "decimalFraction";
|
|
1179
1208
|
return;
|
|
1180
1209
|
}
|
|
1181
|
-
return
|
|
1210
|
+
return l("numeric", _ * Number(c));
|
|
1182
1211
|
},
|
|
1183
1212
|
decimalFraction() {
|
|
1184
1213
|
switch (C) {
|
|
@@ -1191,7 +1220,7 @@ const Zu = {
|
|
|
1191
1220
|
c += n();
|
|
1192
1221
|
return;
|
|
1193
1222
|
}
|
|
1194
|
-
return
|
|
1223
|
+
return l("numeric", _ * Number(c));
|
|
1195
1224
|
},
|
|
1196
1225
|
decimalExponent() {
|
|
1197
1226
|
switch (C) {
|
|
@@ -1204,61 +1233,61 @@ const Zu = {
|
|
|
1204
1233
|
c += n(), A = "decimalExponentInteger";
|
|
1205
1234
|
return;
|
|
1206
1235
|
}
|
|
1207
|
-
throw
|
|
1236
|
+
throw d(n());
|
|
1208
1237
|
},
|
|
1209
1238
|
decimalExponentSign() {
|
|
1210
1239
|
if (p.isDigit(C)) {
|
|
1211
1240
|
c += n(), A = "decimalExponentInteger";
|
|
1212
1241
|
return;
|
|
1213
1242
|
}
|
|
1214
|
-
throw
|
|
1243
|
+
throw d(n());
|
|
1215
1244
|
},
|
|
1216
1245
|
decimalExponentInteger() {
|
|
1217
1246
|
if (p.isDigit(C)) {
|
|
1218
1247
|
c += n();
|
|
1219
1248
|
return;
|
|
1220
1249
|
}
|
|
1221
|
-
return
|
|
1250
|
+
return l("numeric", _ * Number(c));
|
|
1222
1251
|
},
|
|
1223
1252
|
hexadecimal() {
|
|
1224
1253
|
if (p.isHexDigit(C)) {
|
|
1225
1254
|
c += n(), A = "hexadecimalInteger";
|
|
1226
1255
|
return;
|
|
1227
1256
|
}
|
|
1228
|
-
throw
|
|
1257
|
+
throw d(n());
|
|
1229
1258
|
},
|
|
1230
1259
|
hexadecimalInteger() {
|
|
1231
1260
|
if (p.isHexDigit(C)) {
|
|
1232
1261
|
c += n();
|
|
1233
1262
|
return;
|
|
1234
1263
|
}
|
|
1235
|
-
return
|
|
1264
|
+
return l("numeric", _ * Number(c));
|
|
1236
1265
|
},
|
|
1237
1266
|
string() {
|
|
1238
1267
|
switch (C) {
|
|
1239
1268
|
case "\\":
|
|
1240
|
-
n(), c +=
|
|
1269
|
+
n(), c += Le();
|
|
1241
1270
|
return;
|
|
1242
1271
|
case '"':
|
|
1243
|
-
if (
|
|
1244
|
-
return n(),
|
|
1272
|
+
if (z)
|
|
1273
|
+
return n(), l("string", c);
|
|
1245
1274
|
c += n();
|
|
1246
1275
|
return;
|
|
1247
1276
|
case "'":
|
|
1248
|
-
if (!
|
|
1249
|
-
return n(),
|
|
1277
|
+
if (!z)
|
|
1278
|
+
return n(), l("string", c);
|
|
1250
1279
|
c += n();
|
|
1251
1280
|
return;
|
|
1252
1281
|
case `
|
|
1253
1282
|
`:
|
|
1254
1283
|
case "\r":
|
|
1255
|
-
throw
|
|
1284
|
+
throw d(n());
|
|
1256
1285
|
case "\u2028":
|
|
1257
1286
|
case "\u2029":
|
|
1258
|
-
|
|
1287
|
+
Ie(C);
|
|
1259
1288
|
break;
|
|
1260
1289
|
case void 0:
|
|
1261
|
-
throw
|
|
1290
|
+
throw d(n());
|
|
1262
1291
|
}
|
|
1263
1292
|
c += n();
|
|
1264
1293
|
},
|
|
@@ -1266,7 +1295,7 @@ const Zu = {
|
|
|
1266
1295
|
switch (C) {
|
|
1267
1296
|
case "{":
|
|
1268
1297
|
case "[":
|
|
1269
|
-
return
|
|
1298
|
+
return l("punctuator", n());
|
|
1270
1299
|
}
|
|
1271
1300
|
A = "value";
|
|
1272
1301
|
},
|
|
@@ -1280,22 +1309,22 @@ const Zu = {
|
|
|
1280
1309
|
n(), A = "identifierNameStartEscape";
|
|
1281
1310
|
return;
|
|
1282
1311
|
case "}":
|
|
1283
|
-
return
|
|
1312
|
+
return l("punctuator", n());
|
|
1284
1313
|
case '"':
|
|
1285
1314
|
case "'":
|
|
1286
|
-
|
|
1315
|
+
z = n() === '"', A = "string";
|
|
1287
1316
|
return;
|
|
1288
1317
|
}
|
|
1289
1318
|
if (p.isIdStartChar(C)) {
|
|
1290
1319
|
c += n(), A = "identifierName";
|
|
1291
1320
|
return;
|
|
1292
1321
|
}
|
|
1293
|
-
throw
|
|
1322
|
+
throw d(n());
|
|
1294
1323
|
},
|
|
1295
1324
|
afterPropertyName() {
|
|
1296
1325
|
if (C === ":")
|
|
1297
|
-
return
|
|
1298
|
-
throw
|
|
1326
|
+
return l("punctuator", n());
|
|
1327
|
+
throw d(n());
|
|
1299
1328
|
},
|
|
1300
1329
|
beforePropertyValue() {
|
|
1301
1330
|
A = "value";
|
|
@@ -1304,44 +1333,44 @@ const Zu = {
|
|
|
1304
1333
|
switch (C) {
|
|
1305
1334
|
case ",":
|
|
1306
1335
|
case "}":
|
|
1307
|
-
return
|
|
1336
|
+
return l("punctuator", n());
|
|
1308
1337
|
}
|
|
1309
|
-
throw
|
|
1338
|
+
throw d(n());
|
|
1310
1339
|
},
|
|
1311
1340
|
beforeArrayValue() {
|
|
1312
1341
|
if (C === "]")
|
|
1313
|
-
return
|
|
1342
|
+
return l("punctuator", n());
|
|
1314
1343
|
A = "value";
|
|
1315
1344
|
},
|
|
1316
1345
|
afterArrayValue() {
|
|
1317
1346
|
switch (C) {
|
|
1318
1347
|
case ",":
|
|
1319
1348
|
case "]":
|
|
1320
|
-
return
|
|
1349
|
+
return l("punctuator", n());
|
|
1321
1350
|
}
|
|
1322
|
-
throw
|
|
1351
|
+
throw d(n());
|
|
1323
1352
|
},
|
|
1324
1353
|
end() {
|
|
1325
|
-
throw
|
|
1354
|
+
throw d(n());
|
|
1326
1355
|
}
|
|
1327
1356
|
};
|
|
1328
|
-
function
|
|
1357
|
+
function l(t, u) {
|
|
1329
1358
|
return {
|
|
1330
1359
|
type: t,
|
|
1331
1360
|
value: u,
|
|
1332
1361
|
line: x,
|
|
1333
|
-
column:
|
|
1362
|
+
column: $
|
|
1334
1363
|
};
|
|
1335
1364
|
}
|
|
1336
|
-
function
|
|
1365
|
+
function M(t) {
|
|
1337
1366
|
for (const u of t) {
|
|
1338
|
-
if (
|
|
1339
|
-
throw
|
|
1367
|
+
if (w() !== u)
|
|
1368
|
+
throw d(n());
|
|
1340
1369
|
n();
|
|
1341
1370
|
}
|
|
1342
1371
|
}
|
|
1343
|
-
function
|
|
1344
|
-
switch (
|
|
1372
|
+
function Le() {
|
|
1373
|
+
switch (w()) {
|
|
1345
1374
|
case "b":
|
|
1346
1375
|
return n(), "\b";
|
|
1347
1376
|
case "f":
|
|
@@ -1356,20 +1385,20 @@ function Ne() {
|
|
|
1356
1385
|
case "v":
|
|
1357
1386
|
return n(), "\v";
|
|
1358
1387
|
case "0":
|
|
1359
|
-
if (n(), p.isDigit(
|
|
1360
|
-
throw
|
|
1388
|
+
if (n(), p.isDigit(w()))
|
|
1389
|
+
throw d(n());
|
|
1361
1390
|
return "\0";
|
|
1362
1391
|
case "x":
|
|
1363
|
-
return n(),
|
|
1392
|
+
return n(), ke();
|
|
1364
1393
|
case "u":
|
|
1365
|
-
return n(),
|
|
1394
|
+
return n(), fu();
|
|
1366
1395
|
case `
|
|
1367
1396
|
`:
|
|
1368
1397
|
case "\u2028":
|
|
1369
1398
|
case "\u2029":
|
|
1370
1399
|
return n(), "";
|
|
1371
1400
|
case "\r":
|
|
1372
|
-
return n(),
|
|
1401
|
+
return n(), w() === `
|
|
1373
1402
|
` && n(), "";
|
|
1374
1403
|
case "1":
|
|
1375
1404
|
case "2":
|
|
@@ -1380,92 +1409,92 @@ function Ne() {
|
|
|
1380
1409
|
case "7":
|
|
1381
1410
|
case "8":
|
|
1382
1411
|
case "9":
|
|
1383
|
-
throw
|
|
1412
|
+
throw d(n());
|
|
1384
1413
|
case void 0:
|
|
1385
|
-
throw
|
|
1414
|
+
throw d(n());
|
|
1386
1415
|
}
|
|
1387
1416
|
return n();
|
|
1388
1417
|
}
|
|
1389
|
-
function
|
|
1390
|
-
let t = "", u =
|
|
1391
|
-
if (!p.isHexDigit(u) || (t += n(), u =
|
|
1392
|
-
throw
|
|
1418
|
+
function ke() {
|
|
1419
|
+
let t = "", u = w();
|
|
1420
|
+
if (!p.isHexDigit(u) || (t += n(), u = w(), !p.isHexDigit(u)))
|
|
1421
|
+
throw d(n());
|
|
1393
1422
|
return t += n(), String.fromCodePoint(parseInt(t, 16));
|
|
1394
1423
|
}
|
|
1395
|
-
function
|
|
1424
|
+
function fu() {
|
|
1396
1425
|
let t = "", u = 4;
|
|
1397
1426
|
for (; u-- > 0; ) {
|
|
1398
|
-
const e =
|
|
1427
|
+
const e = w();
|
|
1399
1428
|
if (!p.isHexDigit(e))
|
|
1400
|
-
throw
|
|
1429
|
+
throw d(n());
|
|
1401
1430
|
t += n();
|
|
1402
1431
|
}
|
|
1403
1432
|
return String.fromCodePoint(parseInt(t, 16));
|
|
1404
1433
|
}
|
|
1405
|
-
const
|
|
1434
|
+
const He = {
|
|
1406
1435
|
start() {
|
|
1407
1436
|
if (f.type === "eof")
|
|
1408
|
-
throw
|
|
1409
|
-
|
|
1437
|
+
throw O();
|
|
1438
|
+
Eu();
|
|
1410
1439
|
},
|
|
1411
1440
|
beforePropertyName() {
|
|
1412
1441
|
switch (f.type) {
|
|
1413
1442
|
case "identifier":
|
|
1414
1443
|
case "string":
|
|
1415
|
-
|
|
1444
|
+
$u = f.value, m = "afterPropertyName";
|
|
1416
1445
|
return;
|
|
1417
1446
|
case "punctuator":
|
|
1418
|
-
|
|
1447
|
+
uu();
|
|
1419
1448
|
return;
|
|
1420
1449
|
case "eof":
|
|
1421
|
-
throw
|
|
1450
|
+
throw O();
|
|
1422
1451
|
}
|
|
1423
1452
|
},
|
|
1424
1453
|
afterPropertyName() {
|
|
1425
1454
|
if (f.type === "eof")
|
|
1426
|
-
throw
|
|
1455
|
+
throw O();
|
|
1427
1456
|
m = "beforePropertyValue";
|
|
1428
1457
|
},
|
|
1429
1458
|
beforePropertyValue() {
|
|
1430
1459
|
if (f.type === "eof")
|
|
1431
|
-
throw
|
|
1432
|
-
|
|
1460
|
+
throw O();
|
|
1461
|
+
Eu();
|
|
1433
1462
|
},
|
|
1434
1463
|
beforeArrayValue() {
|
|
1435
1464
|
if (f.type === "eof")
|
|
1436
|
-
throw
|
|
1465
|
+
throw O();
|
|
1437
1466
|
if (f.type === "punctuator" && f.value === "]") {
|
|
1438
|
-
|
|
1467
|
+
uu();
|
|
1439
1468
|
return;
|
|
1440
1469
|
}
|
|
1441
|
-
|
|
1470
|
+
Eu();
|
|
1442
1471
|
},
|
|
1443
1472
|
afterPropertyValue() {
|
|
1444
1473
|
if (f.type === "eof")
|
|
1445
|
-
throw
|
|
1474
|
+
throw O();
|
|
1446
1475
|
switch (f.value) {
|
|
1447
1476
|
case ",":
|
|
1448
1477
|
m = "beforePropertyName";
|
|
1449
1478
|
return;
|
|
1450
1479
|
case "}":
|
|
1451
|
-
|
|
1480
|
+
uu();
|
|
1452
1481
|
}
|
|
1453
1482
|
},
|
|
1454
1483
|
afterArrayValue() {
|
|
1455
1484
|
if (f.type === "eof")
|
|
1456
|
-
throw
|
|
1485
|
+
throw O();
|
|
1457
1486
|
switch (f.value) {
|
|
1458
1487
|
case ",":
|
|
1459
1488
|
m = "beforeArrayValue";
|
|
1460
1489
|
return;
|
|
1461
1490
|
case "]":
|
|
1462
|
-
|
|
1491
|
+
uu();
|
|
1463
1492
|
}
|
|
1464
1493
|
},
|
|
1465
1494
|
end() {
|
|
1466
1495
|
}
|
|
1467
1496
|
};
|
|
1468
|
-
function
|
|
1497
|
+
function Eu() {
|
|
1469
1498
|
let t;
|
|
1470
1499
|
switch (f.type) {
|
|
1471
1500
|
case "punctuator":
|
|
@@ -1485,11 +1514,11 @@ function Cu() {
|
|
|
1485
1514
|
t = f.value;
|
|
1486
1515
|
break;
|
|
1487
1516
|
}
|
|
1488
|
-
if (
|
|
1489
|
-
|
|
1517
|
+
if (q === void 0)
|
|
1518
|
+
q = t;
|
|
1490
1519
|
else {
|
|
1491
|
-
const u =
|
|
1492
|
-
Array.isArray(u) ? u.push(t) : Object.defineProperty(u,
|
|
1520
|
+
const u = v[v.length - 1];
|
|
1521
|
+
Array.isArray(u) ? u.push(t) : Object.defineProperty(u, $u, {
|
|
1493
1522
|
value: t,
|
|
1494
1523
|
writable: !0,
|
|
1495
1524
|
enumerable: !0,
|
|
@@ -1497,30 +1526,30 @@ function Cu() {
|
|
|
1497
1526
|
});
|
|
1498
1527
|
}
|
|
1499
1528
|
if (t !== null && typeof t == "object")
|
|
1500
|
-
|
|
1529
|
+
v.push(t), Array.isArray(t) ? m = "beforeArrayValue" : m = "beforePropertyName";
|
|
1501
1530
|
else {
|
|
1502
|
-
const u =
|
|
1531
|
+
const u = v[v.length - 1];
|
|
1503
1532
|
u == null ? m = "end" : Array.isArray(u) ? m = "afterArrayValue" : m = "afterPropertyValue";
|
|
1504
1533
|
}
|
|
1505
1534
|
}
|
|
1506
|
-
function
|
|
1507
|
-
|
|
1508
|
-
const t =
|
|
1535
|
+
function uu() {
|
|
1536
|
+
v.pop();
|
|
1537
|
+
const t = v[v.length - 1];
|
|
1509
1538
|
t == null ? m = "end" : Array.isArray(t) ? m = "afterArrayValue" : m = "afterPropertyValue";
|
|
1510
1539
|
}
|
|
1511
|
-
function
|
|
1512
|
-
return
|
|
1540
|
+
function d(t) {
|
|
1541
|
+
return Du(t === void 0 ? `JSON5: invalid end of input at ${x}:${$}` : `JSON5: invalid character '${ue(t)}' at ${x}:${$}`);
|
|
1513
1542
|
}
|
|
1514
|
-
function
|
|
1515
|
-
return
|
|
1543
|
+
function O() {
|
|
1544
|
+
return Du(`JSON5: invalid end of input at ${x}:${$}`);
|
|
1516
1545
|
}
|
|
1517
|
-
function
|
|
1518
|
-
return
|
|
1546
|
+
function Iu() {
|
|
1547
|
+
return $ -= 5, Du(`JSON5: invalid identifier character at ${x}:${$}`);
|
|
1519
1548
|
}
|
|
1520
|
-
function
|
|
1521
|
-
console.warn(`JSON5: '${
|
|
1549
|
+
function Ie(t) {
|
|
1550
|
+
console.warn(`JSON5: '${ue(t)}' in strings is not valid ECMAScript; consider escaping`);
|
|
1522
1551
|
}
|
|
1523
|
-
function
|
|
1552
|
+
function ue(t) {
|
|
1524
1553
|
const u = {
|
|
1525
1554
|
"'": "\\'",
|
|
1526
1555
|
'"': '\\"',
|
|
@@ -1543,34 +1572,34 @@ function Ku(t) {
|
|
|
1543
1572
|
}
|
|
1544
1573
|
return t;
|
|
1545
1574
|
}
|
|
1546
|
-
function
|
|
1575
|
+
function Du(t) {
|
|
1547
1576
|
const u = new SyntaxError(t);
|
|
1548
|
-
return u.lineNumber = x, u.columnNumber =
|
|
1577
|
+
return u.lineNumber = x, u.columnNumber = $, u;
|
|
1549
1578
|
}
|
|
1550
|
-
const
|
|
1551
|
-
var
|
|
1552
|
-
for (var
|
|
1553
|
-
(i = t[
|
|
1554
|
-
return
|
|
1579
|
+
const Ue = /* @__PURE__ */ Ne(Me);
|
|
1580
|
+
var Re = Object.defineProperty, ee = (t, u, e, r) => {
|
|
1581
|
+
for (var s = void 0, D = t.length - 1, i; D >= 0; D--)
|
|
1582
|
+
(i = t[D]) && (s = i(u, e, s) || s);
|
|
1583
|
+
return s && Re(u, e, s), s;
|
|
1555
1584
|
};
|
|
1556
|
-
const
|
|
1585
|
+
const je = "orthographic", Uu = 1 / 0, bu = class bu extends I {
|
|
1557
1586
|
constructor() {
|
|
1558
|
-
super(), this.scratchV2 = new
|
|
1559
|
-
scene: new
|
|
1587
|
+
super(), this.scratchV2 = new b.Vector2(), this.three = {
|
|
1588
|
+
scene: new b.Scene(),
|
|
1560
1589
|
camera: null,
|
|
1561
|
-
renderer: new
|
|
1590
|
+
renderer: new b.WebGLRenderer({
|
|
1562
1591
|
antialias: !0,
|
|
1563
1592
|
alpha: !0
|
|
1564
1593
|
})
|
|
1565
|
-
}, this.background = null, this.dpr =
|
|
1594
|
+
}, this.background = null, this.dpr = Uu, this.raycaster = new b.Raycaster(), this.raycastPool = [], this.frame = 1 / 0, this.resizeObserver = new ResizeObserver((u) => {
|
|
1566
1595
|
u.forEach(({ target: e, contentRect: r }) => {
|
|
1567
1596
|
if (e === this && (this.three.renderer.setSize(r.width * this.dpr, r.height * this.dpr), this.three.camera)) {
|
|
1568
|
-
const
|
|
1597
|
+
const s = r.width / r.height;
|
|
1569
1598
|
if (this.three.camera.type.toLowerCase() === "perspectivecamera")
|
|
1570
|
-
this.three.camera.aspect =
|
|
1599
|
+
this.three.camera.aspect = s, this.three.camera.updateProjectionMatrix();
|
|
1571
1600
|
else if (this.three.camera.type.toLowerCase() === "orthographiccamera") {
|
|
1572
|
-
const
|
|
1573
|
-
this.three.camera.top =
|
|
1601
|
+
const D = r.height / r.width, i = 10;
|
|
1602
|
+
this.three.camera.top = D * i, this.three.camera.bottom = -D * i, this.three.camera.right = i, this.three.camera.left = -i, this.three.camera.updateProjectionMatrix();
|
|
1574
1603
|
}
|
|
1575
1604
|
this.renderThree();
|
|
1576
1605
|
}
|
|
@@ -1579,26 +1608,26 @@ const He = "orthographic", Ou = 1 / 0, yu = class yu extends H {
|
|
|
1579
1608
|
}
|
|
1580
1609
|
/** To run on start. */
|
|
1581
1610
|
connectedCallback() {
|
|
1582
|
-
super.connectedCallback(), this.dpr ===
|
|
1583
|
-
const e =
|
|
1584
|
-
Object.entries(e).forEach(([r,
|
|
1585
|
-
this.three[u] &&
|
|
1611
|
+
super.connectedCallback(), this.dpr === Uu && (this.dpr = window.devicePixelRatio), this.getAttribute(je) !== null ? this.three.camera = new b.OrthographicCamera() : this.three.camera = new b.PerspectiveCamera(75), ["scene", "camera", "renderer"].forEach((u) => {
|
|
1612
|
+
const e = Ue(this.getAttribute(u) ?? "{}");
|
|
1613
|
+
Object.entries(e).forEach(([r, s]) => {
|
|
1614
|
+
this.three[u] && Fu(this.three[u], r.split("-"), lu(s, this));
|
|
1586
1615
|
});
|
|
1587
|
-
}), this.resizeObserver.observe(this), this.background !== null && (this.three.scene.background = new
|
|
1616
|
+
}), this.resizeObserver.observe(this), this.background !== null && (this.three.scene.background = new b.Color(this.background)), this.three.renderer.domElement.addEventListener("pointermove", this.onPointerMove.bind(this)), this.three.renderer.domElement.addEventListener("mousemove", this.onPointerMove.bind(this)), this.three.renderer.domElement.addEventListener("click", this.onClick.bind(this)), this.updateLoop();
|
|
1588
1617
|
}
|
|
1589
1618
|
disconnectedCallback() {
|
|
1590
|
-
this.three.renderer.domElement.removeEventListener("pointermove", this.onPointerMove.bind(this)), this.three.renderer.domElement.removeEventListener("click", this.onClick.bind(this)), this.three.renderer.dispose(), this.resizeObserver.unobserve(this), cancelAnimationFrame(this.frame);
|
|
1619
|
+
this.three.renderer.domElement.removeEventListener("pointermove", this.onPointerMove.bind(this)), this.three.renderer.domElement.removeEventListener("mousemove", this.onPointerMove.bind(this)), this.three.renderer.domElement.removeEventListener("click", this.onClick.bind(this)), this.three.renderer.dispose(), this.resizeObserver.unobserve(this), cancelAnimationFrame(this.frame);
|
|
1591
1620
|
}
|
|
1592
1621
|
handleDefaultSlotChange(u) {
|
|
1593
1622
|
u.target.assignedElements().forEach((e) => {
|
|
1594
1623
|
const r = e;
|
|
1595
|
-
if (r.instance instanceof
|
|
1596
|
-
let
|
|
1597
|
-
if (this.three.scene.traverse((
|
|
1598
|
-
|
|
1599
|
-
}),
|
|
1624
|
+
if (r.instance instanceof b.Object3D) {
|
|
1625
|
+
let s = !1;
|
|
1626
|
+
if (this.three.scene.traverse((D) => {
|
|
1627
|
+
s || D.uuid === r.instance.uuid && (s = !0);
|
|
1628
|
+
}), s)
|
|
1600
1629
|
return;
|
|
1601
|
-
this.three.scene.add(r.instance), e.getAttributeNames().includes(
|
|
1630
|
+
this.three.scene.add(r.instance), e.getAttributeNames().includes(Xu) && this.raycastPool.push(r.instance);
|
|
1602
1631
|
}
|
|
1603
1632
|
}), this.renderThree();
|
|
1604
1633
|
}
|
|
@@ -1609,18 +1638,18 @@ const He = "orthographic", Ou = 1 / 0, yu = class yu extends H {
|
|
|
1609
1638
|
u.clientX / (this.three.renderer.domElement.width / this.dpr) * 2 - 1,
|
|
1610
1639
|
-(u.clientY / (this.three.renderer.domElement.height / this.dpr)) * 2 + 1
|
|
1611
1640
|
);
|
|
1612
|
-
return this.raycaster.setFromCamera(e, this.three.camera), this.raycaster.intersectObjects(this.raycastPool).map((
|
|
1613
|
-
intersect:
|
|
1641
|
+
return this.raycaster.setFromCamera(e, this.three.camera), this.raycaster.intersectObjects(this.raycastPool).map((D) => ({
|
|
1642
|
+
intersect: D,
|
|
1614
1643
|
// TODO: cache result of this query selector somewhere?
|
|
1615
|
-
element: this.querySelector(`[${
|
|
1644
|
+
element: this.querySelector(`[${Ku}="${D.object.uuid}"]`)
|
|
1616
1645
|
}));
|
|
1617
1646
|
}
|
|
1618
1647
|
// Pointer movement
|
|
1619
1648
|
// ==================
|
|
1620
1649
|
onPointerMove(u) {
|
|
1621
1650
|
this.runRaycast.bind(this)(u).forEach((r) => {
|
|
1622
|
-
var
|
|
1623
|
-
u.type === "pointermove" ? ((
|
|
1651
|
+
var s, D, i, a;
|
|
1652
|
+
u.type === "pointermove" ? ((s = r.element) == null || s.dispatchEvent(new PointerEvent("pointermove")), (D = r.element) == null || D.dispatchEvent(new CustomEvent(Ge, { detail: r }))) : u.type === "mousemove" && ((i = r.element) == null || i.dispatchEvent(new MouseEvent("mousemove")), (a = r.element) == null || a.dispatchEvent(new CustomEvent(ze, { detail: r })));
|
|
1624
1653
|
});
|
|
1625
1654
|
}
|
|
1626
1655
|
// Click handling
|
|
@@ -1629,18 +1658,18 @@ const He = "orthographic", Ou = 1 / 0, yu = class yu extends H {
|
|
|
1629
1658
|
let e = [];
|
|
1630
1659
|
if (u instanceof TouchEvent) {
|
|
1631
1660
|
const r = u.touches[0];
|
|
1632
|
-
e = this.runRaycast.bind(this)(r), e.forEach((
|
|
1633
|
-
var
|
|
1634
|
-
(
|
|
1661
|
+
e = this.runRaycast.bind(this)(r), e.forEach((s) => {
|
|
1662
|
+
var D;
|
|
1663
|
+
(D = s.element) == null || D.dispatchEvent(new TouchEvent("touchstart"));
|
|
1635
1664
|
});
|
|
1636
1665
|
} else
|
|
1637
1666
|
e = this.runRaycast.bind(this)(u), e.forEach((r) => {
|
|
1638
|
-
var
|
|
1639
|
-
(
|
|
1667
|
+
var s;
|
|
1668
|
+
(s = r.element) == null || s.dispatchEvent(new MouseEvent("click"));
|
|
1640
1669
|
});
|
|
1641
1670
|
e.forEach((r) => {
|
|
1642
|
-
var
|
|
1643
|
-
(
|
|
1671
|
+
var s;
|
|
1672
|
+
(s = r.element) == null || s.dispatchEvent(new CustomEvent(We, { detail: r }));
|
|
1644
1673
|
});
|
|
1645
1674
|
}
|
|
1646
1675
|
// TODO: Only kick if required
|
|
@@ -1652,13 +1681,13 @@ const He = "orthographic", Ou = 1 / 0, yu = class yu extends H {
|
|
|
1652
1681
|
this.three.camera && this.three.renderer.render(this.three.scene, this.three.camera);
|
|
1653
1682
|
}
|
|
1654
1683
|
render() {
|
|
1655
|
-
return
|
|
1684
|
+
return Ju`
|
|
1656
1685
|
<slot @slotchange=${this.handleDefaultSlotChange}></slot>
|
|
1657
1686
|
${this.three.renderer.domElement}
|
|
1658
1687
|
`;
|
|
1659
1688
|
}
|
|
1660
1689
|
};
|
|
1661
|
-
|
|
1690
|
+
bu.styles = se`
|
|
1662
1691
|
:host {
|
|
1663
1692
|
width: 100%;
|
|
1664
1693
|
height: 100%;
|
|
@@ -1672,44 +1701,44 @@ yu.styles = ue`
|
|
|
1672
1701
|
max-height: 100%;
|
|
1673
1702
|
}
|
|
1674
1703
|
`;
|
|
1675
|
-
let
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
],
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
],
|
|
1682
|
-
const
|
|
1704
|
+
let X = bu;
|
|
1705
|
+
ee([
|
|
1706
|
+
gu()
|
|
1707
|
+
], X.prototype, "background");
|
|
1708
|
+
ee([
|
|
1709
|
+
gu()
|
|
1710
|
+
], X.prototype, "dpr");
|
|
1711
|
+
const qe = ({
|
|
1683
1712
|
prependList: t = []
|
|
1684
1713
|
} = {}) => {
|
|
1685
|
-
customElements.get("three-lunchbox") || customElements.define("three-lunchbox",
|
|
1686
|
-
const e =
|
|
1714
|
+
customElements.get("three-lunchbox") || customElements.define("three-lunchbox", X), [...t, ...ju].forEach((u) => {
|
|
1715
|
+
const e = te(u);
|
|
1687
1716
|
if (customElements.get(e))
|
|
1688
1717
|
return;
|
|
1689
|
-
const r =
|
|
1718
|
+
const r = Yu(u);
|
|
1690
1719
|
r && customElements.define(e, r);
|
|
1691
1720
|
});
|
|
1692
|
-
},
|
|
1721
|
+
}, Je = (t, u, e = window) => {
|
|
1693
1722
|
if (e.customElements.get(t)) {
|
|
1694
1723
|
console.log(`${t} already registered as a custom element. Try a different name if registering is still required.`);
|
|
1695
1724
|
return;
|
|
1696
1725
|
}
|
|
1697
|
-
const r =
|
|
1726
|
+
const r = Yu(u);
|
|
1698
1727
|
if (r)
|
|
1699
1728
|
e.customElements.define(t, r);
|
|
1700
1729
|
else
|
|
1701
1730
|
throw new Error(`Could not extend ${t}. The second paramater must be a class.`);
|
|
1702
|
-
},
|
|
1731
|
+
}, Ge = "threepointermove", ze = "threemousemove", We = "threeclick", te = (t) => {
|
|
1703
1732
|
let u = t.split(/\.?(?=[A-Z])/).join("-").toLowerCase().replace(/-g-l-/, "-gl-");
|
|
1704
1733
|
return u.includes("-") || (u = `three-${u}`), u;
|
|
1705
|
-
},
|
|
1734
|
+
}, Ze = ju.map(te);
|
|
1706
1735
|
export {
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1736
|
+
We as THREE_CLICK_EVENT_NAME,
|
|
1737
|
+
ze as THREE_MOUSE_MOVE_EVENT_NAME,
|
|
1738
|
+
Ge as THREE_POINTER_MOVE_EVENT_NAME,
|
|
1739
|
+
X as ThreeLunchbox,
|
|
1740
|
+
ju as autoComponents,
|
|
1741
|
+
Je as extend,
|
|
1742
|
+
qe as initLunchbox,
|
|
1743
|
+
Ze as webComponentNames
|
|
1715
1744
|
};
|