lunchboxjs 2.1.2 → 2.1.3

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.
@@ -1,4 +1,4 @@
1
- import * as b from "three";
1
+ import * as _ from "three";
2
2
  const Gu = [
3
3
  // ORDER MATTERS HERE!
4
4
  // Place the objects most likely to wrap other objects at the beginning of the list.
@@ -91,17 +91,17 @@ const Gu = [
91
91
  * Copyright 2019 Google LLC
92
92
  * SPDX-License-Identifier: BSD-3-Clause
93
93
  */
94
- const eu = globalThis, yu = eu.ShadowRoot && (eu.ShadyCSS === void 0 || eu.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, gu = Symbol(), wu = /* @__PURE__ */ new WeakMap();
94
+ const eu = globalThis, gu = eu.ShadowRoot && (eu.ShadyCSS === void 0 || eu.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, yu = Symbol(), wu = /* @__PURE__ */ new WeakMap();
95
95
  let zu = class {
96
96
  constructor(u, e, r) {
97
- if (this._$cssResult$ = !0, r !== gu)
97
+ if (this._$cssResult$ = !0, r !== yu)
98
98
  throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
99
99
  this.cssText = u, this.t = e;
100
100
  }
101
101
  get styleSheet() {
102
102
  let u = this.o;
103
103
  const e = this.t;
104
- if (yu && u === void 0) {
104
+ if (gu && u === void 0) {
105
105
  const r = e !== void 0 && e.length === 1;
106
106
  r && (u = wu.get(e)), u === void 0 && ((this.o = u = new CSSStyleSheet()).replaceSync(this.cssText), r && wu.set(e, u));
107
107
  }
@@ -111,7 +111,7 @@ let zu = class {
111
111
  return this.cssText;
112
112
  }
113
113
  };
114
- const se = (t) => new zu(typeof t == "string" ? t : t + "", void 0, gu), ie = (t, ...u) => {
114
+ const se = (t) => new zu(typeof t == "string" ? t : t + "", void 0, yu), ie = (t, ...u) => {
115
115
  const e = t.length === 1 ? t[0] : u.reduce((r, s, n) => r + ((i) => {
116
116
  if (i._$cssResult$ === !0)
117
117
  return i.cssText;
@@ -119,16 +119,16 @@ const se = (t) => new zu(typeof t == "string" ? t : t + "", void 0, gu), ie = (t
119
119
  return i;
120
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.");
121
121
  })(s) + t[n + 1], t[0]);
122
- return new zu(e, t, gu);
122
+ return new zu(e, t, yu);
123
123
  }, De = (t, u) => {
124
- if (yu)
124
+ if (gu)
125
125
  t.adoptedStyleSheets = u.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
126
126
  else
127
127
  for (const e of u) {
128
128
  const r = document.createElement("style"), s = eu.litNonce;
129
129
  s !== void 0 && r.setAttribute("nonce", s), r.textContent = e.cssText, t.appendChild(r);
130
130
  }
131
- }, Su = yu ? (t) => t : (t) => t instanceof CSSStyleSheet ? ((u) => {
131
+ }, Su = gu ? (t) => t : (t) => t instanceof CSSStyleSheet ? ((u) => {
132
132
  let e = "";
133
133
  for (const r of u.cssRules)
134
134
  e += r.cssText;
@@ -169,7 +169,7 @@ const { is: ne, defineProperty: oe, getOwnPropertyDescriptor: ae, getOwnProperty
169
169
  return e;
170
170
  } }, $u = (t, u) => !ne(t, u), xu = { attribute: !0, type: String, converter: ru, reflect: !1, hasChanged: $u };
171
171
  Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), N.litPropertyMetadata ?? (N.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
172
- class k extends HTMLElement {
172
+ class I extends HTMLElement {
173
173
  static addInitializer(u) {
174
174
  this._$Ei(), (this.l ?? (this.l = [])).push(u);
175
175
  }
@@ -380,15 +380,15 @@ class k extends HTMLElement {
380
380
  firstUpdated(u) {
381
381
  }
382
382
  }
383
- k.elementStyles = [], k.shadowRootOptions = { mode: "open" }, k[q("elementProperties")] = /* @__PURE__ */ new Map(), k[q("finalized")] = /* @__PURE__ */ new Map(), cu == null || cu({ ReactiveElement: k }), (N.reactiveElementVersions ?? (N.reactiveElementVersions = [])).push("2.0.4");
383
+ I.elementStyles = [], I.shadowRootOptions = { mode: "open" }, I[q("elementProperties")] = /* @__PURE__ */ new Map(), I[q("finalized")] = /* @__PURE__ */ new Map(), cu == null || cu({ ReactiveElement: I }), (N.reactiveElementVersions ?? (N.reactiveElementVersions = [])).push("2.0.4");
384
384
  /**
385
385
  * @license
386
386
  * Copyright 2017 Google LLC
387
387
  * SPDX-License-Identifier: BSD-3-Clause
388
388
  */
389
- const J = globalThis, su = J.trustedTypes, Nu = su ? su.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, Wu = "$lit$", x = `lit$${Math.random().toFixed(9).slice(2)}$`, Vu = "?" + x, Ee = `<${Vu}>`, U = document, K = () => U.createComment(""), X = (t) => t === null || typeof t != "object" && typeof t != "function", qu = Array.isArray, Fe = (t) => qu(t) || typeof (t == null ? void 0 : t[Symbol.iterator]) == "function", hu = `[
390
- \f\r]`, W = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Tu = /-->/g, Mu = />/g, M = RegExp(`>|${hu}(?:([^\\s"'>=/]+)(${hu}*=${hu}*(?:[^
391
- \f\r"'\`<>=]|("|')|))|$)`, "g"), Ou = /'/g, Ru = /"/g, Ju = /^(?:script|style|textarea|title)$/i, le = (t) => (u, ...e) => ({ _$litType$: t, strings: u, values: e }), Zu = le(1), I = Symbol.for("lit-noChange"), B = Symbol.for("lit-nothing"), Lu = /* @__PURE__ */ new WeakMap(), L = U.createTreeWalker(U, 129);
389
+ const J = globalThis, su = J.trustedTypes, Nu = su ? su.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, Wu = "$lit$", x = `lit$${Math.random().toFixed(9).slice(2)}$`, Vu = "?" + x, Ee = `<${Vu}>`, H = document, K = () => H.createComment(""), X = (t) => t === null || typeof t != "object" && typeof t != "function", qu = Array.isArray, Fe = (t) => qu(t) || typeof (t == null ? void 0 : t[Symbol.iterator]) == "function", hu = `[
390
+ \f\r]`, W = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Tu = /-->/g, Mu = />/g, R = RegExp(`>|${hu}(?:([^\\s"'>=/]+)(${hu}*=${hu}*(?:[^
391
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), Ou = /'/g, Ru = /"/g, Ju = /^(?:script|style|textarea|title)$/i, le = (t) => (u, ...e) => ({ _$litType$: t, strings: u, values: e }), Zu = le(1), G = Symbol.for("lit-noChange"), B = Symbol.for("lit-nothing"), Lu = /* @__PURE__ */ new WeakMap(), k = H.createTreeWalker(H, 129);
392
392
  function Ku(t, u) {
393
393
  if (!Array.isArray(t) || !t.hasOwnProperty("raw"))
394
394
  throw Error("invalid template strings array");
@@ -401,9 +401,9 @@ const de = (t, u) => {
401
401
  const a = t[o];
402
402
  let A, F, E = -1, m = 0;
403
403
  for (; m < a.length && (i.lastIndex = m, F = i.exec(a), F !== null); )
404
- m = i.lastIndex, i === W ? F[1] === "!--" ? i = Tu : F[1] !== void 0 ? i = Mu : F[2] !== void 0 ? (Ju.test(F[2]) && (s = RegExp("</" + F[2], "g")), i = M) : F[3] !== void 0 && (i = M) : i === M ? F[0] === ">" ? (i = s ?? W, E = -1) : F[1] === void 0 ? E = -2 : (E = i.lastIndex - F[2].length, A = F[1], i = F[3] === void 0 ? M : F[3] === '"' ? Ru : Ou) : i === Ru || i === Ou ? i = M : i === Tu || i === Mu ? i = W : (i = M, s = void 0);
405
- const g = i === M && t[o + 1].startsWith("/>") ? " " : "";
406
- n += i === W ? a + Ee : E >= 0 ? (r.push(A), a.slice(0, E) + Wu + a.slice(E) + x + g) : a + x + (E === -2 ? o : g);
404
+ m = i.lastIndex, i === W ? F[1] === "!--" ? i = Tu : F[1] !== void 0 ? i = Mu : F[2] !== void 0 ? (Ju.test(F[2]) && (s = RegExp("</" + F[2], "g")), i = R) : F[3] !== void 0 && (i = R) : i === R ? F[0] === ">" ? (i = s ?? W, E = -1) : F[1] === void 0 ? E = -2 : (E = i.lastIndex - F[2].length, A = F[1], i = F[3] === void 0 ? R : F[3] === '"' ? Ru : Ou) : i === Ru || i === Ou ? i = R : i === Tu || i === Mu ? i = W : (i = R, s = void 0);
405
+ const y = i === R && t[o + 1].startsWith("/>") ? " " : "";
406
+ n += i === W ? a + Ee : E >= 0 ? (r.push(A), a.slice(0, E) + Wu + a.slice(E) + x + y) : a + x + (E === -2 ? o : y);
407
407
  }
408
408
  return [Ku(t, n + (t[e] || "<?>") + (u === 2 ? "</svg>" : "")), r];
409
409
  };
@@ -413,25 +413,25 @@ class Y {
413
413
  this.parts = [];
414
414
  let n = 0, i = 0;
415
415
  const o = u.length - 1, a = this.parts, [A, F] = de(u, e);
416
- if (this.el = Y.createElement(A, r), L.currentNode = this.el.content, e === 2) {
416
+ if (this.el = Y.createElement(A, r), k.currentNode = this.el.content, e === 2) {
417
417
  const E = this.el.content.firstChild;
418
418
  E.replaceWith(...E.childNodes);
419
419
  }
420
- for (; (s = L.nextNode()) !== null && a.length < o; ) {
420
+ for (; (s = k.nextNode()) !== null && a.length < o; ) {
421
421
  if (s.nodeType === 1) {
422
422
  if (s.hasAttributes())
423
423
  for (const E of s.getAttributeNames())
424
424
  if (E.endsWith(Wu)) {
425
- const m = F[i++], g = s.getAttribute(E).split(x), _ = /([.?@])?(.*)/.exec(m);
426
- a.push({ type: 1, index: n, name: _[2], strings: g, ctor: _[1] === "." ? fe : _[1] === "?" ? Be : _[1] === "@" ? me : nu }), s.removeAttribute(E);
425
+ const m = F[i++], y = s.getAttribute(E).split(x), v = /([.?@])?(.*)/.exec(m);
426
+ a.push({ type: 1, index: n, name: v[2], strings: y, ctor: v[1] === "." ? fe : v[1] === "?" ? Be : v[1] === "@" ? me : nu }), s.removeAttribute(E);
427
427
  } else
428
428
  E.startsWith(x) && (a.push({ type: 6, index: n }), s.removeAttribute(E));
429
429
  if (Ju.test(s.tagName)) {
430
430
  const E = s.textContent.split(x), m = E.length - 1;
431
431
  if (m > 0) {
432
432
  s.textContent = su ? su.emptyScript : "";
433
- for (let g = 0; g < m; g++)
434
- s.append(E[g], K()), L.nextNode(), a.push({ type: 2, index: ++n });
433
+ for (let y = 0; y < m; y++)
434
+ s.append(E[y], K()), k.nextNode(), a.push({ type: 2, index: ++n });
435
435
  s.append(E[m], K());
436
436
  }
437
437
  }
@@ -447,17 +447,17 @@ class Y {
447
447
  }
448
448
  }
449
449
  static createElement(u, e) {
450
- const r = U.createElement("template");
450
+ const r = H.createElement("template");
451
451
  return r.innerHTML = u, r;
452
452
  }
453
453
  }
454
- function j(t, u, e = t, r) {
454
+ function z(t, u, e = t, r) {
455
455
  var i, o;
456
- if (u === I)
456
+ if (u === G)
457
457
  return u;
458
458
  let s = r !== void 0 ? (i = e._$Co) == null ? void 0 : i[r] : e._$Cl;
459
459
  const n = X(u) ? void 0 : u._$litDirective$;
460
- return (s == null ? void 0 : s.constructor) !== n && ((o = s == null ? void 0 : s._$AO) == null || o.call(s, !1), n === void 0 ? s = void 0 : (s = new n(t), s._$AT(t, e, r)), r !== void 0 ? (e._$Co ?? (e._$Co = []))[r] = s : e._$Cl = s), s !== void 0 && (u = j(t, s._$AS(t, u.values), s, r)), u;
460
+ return (s == null ? void 0 : s.constructor) !== n && ((o = s == null ? void 0 : s._$AO) == null || o.call(s, !1), n === void 0 ? s = void 0 : (s = new n(t), s._$AT(t, e, r)), r !== void 0 ? (e._$Co ?? (e._$Co = []))[r] = s : e._$Cl = s), s !== void 0 && (u = z(t, s._$AS(t, u.values), s, r)), u;
461
461
  }
462
462
  class pe {
463
463
  constructor(u, e) {
@@ -470,17 +470,17 @@ class pe {
470
470
  return this._$AM._$AU;
471
471
  }
472
472
  u(u) {
473
- const { el: { content: e }, parts: r } = this._$AD, s = ((u == null ? void 0 : u.creationScope) ?? U).importNode(e, !0);
474
- L.currentNode = s;
475
- let n = L.nextNode(), i = 0, o = 0, a = r[0];
473
+ const { el: { content: e }, parts: r } = this._$AD, s = ((u == null ? void 0 : u.creationScope) ?? H).importNode(e, !0);
474
+ k.currentNode = s;
475
+ let n = k.nextNode(), i = 0, o = 0, a = r[0];
476
476
  for (; a !== void 0; ) {
477
477
  if (i === a.index) {
478
478
  let A;
479
- a.type === 2 ? A = new Q(n, n.nextSibling, this, u) : a.type === 1 ? A = new a.ctor(n, a.name, a.strings, this, u) : a.type === 6 && (A = new ye(n, this, u)), this._$AV.push(A), a = r[++o];
479
+ a.type === 2 ? A = new Q(n, n.nextSibling, this, u) : a.type === 1 ? A = new a.ctor(n, a.name, a.strings, this, u) : a.type === 6 && (A = new ge(n, this, u)), this._$AV.push(A), a = r[++o];
480
480
  }
481
- i !== (a == null ? void 0 : a.index) && (n = L.nextNode(), i++);
481
+ i !== (a == null ? void 0 : a.index) && (n = k.nextNode(), i++);
482
482
  }
483
- return L.currentNode = U, s;
483
+ return k.currentNode = H, s;
484
484
  }
485
485
  p(u) {
486
486
  let e = 0;
@@ -508,7 +508,7 @@ class Q {
508
508
  return this._$AB;
509
509
  }
510
510
  _$AI(u, e = this) {
511
- u = j(this, u, e), X(u) ? u === B || u == null || u === "" ? (this._$AH !== B && this._$AR(), this._$AH = B) : u !== this._$AH && u !== I && this._(u) : u._$litType$ !== void 0 ? this.$(u) : u.nodeType !== void 0 ? this.T(u) : Fe(u) ? this.k(u) : this._(u);
511
+ u = z(this, u, e), X(u) ? u === B || u == null || u === "" ? (this._$AH !== B && this._$AR(), this._$AH = B) : u !== this._$AH && u !== G && this._(u) : u._$litType$ !== void 0 ? this.$(u) : u.nodeType !== void 0 ? this.T(u) : Fe(u) ? this.k(u) : this._(u);
512
512
  }
513
513
  S(u) {
514
514
  return this._$AA.parentNode.insertBefore(u, this._$AB);
@@ -517,7 +517,7 @@ class Q {
517
517
  this._$AH !== u && (this._$AR(), this._$AH = this.S(u));
518
518
  }
519
519
  _(u) {
520
- this._$AH !== B && X(this._$AH) ? this._$AA.nextSibling.data = u : this.T(U.createTextNode(u)), this._$AH = u;
520
+ this._$AH !== B && X(this._$AH) ? this._$AA.nextSibling.data = u : this.T(H.createTextNode(u)), this._$AH = u;
521
521
  }
522
522
  $(u) {
523
523
  var n;
@@ -567,12 +567,12 @@ class nu {
567
567
  const n = this.strings;
568
568
  let i = !1;
569
569
  if (n === void 0)
570
- u = j(this, u, e, 0), i = !X(u) || u !== this._$AH && u !== I, i && (this._$AH = u);
570
+ u = z(this, u, e, 0), i = !X(u) || u !== this._$AH && u !== G, i && (this._$AH = u);
571
571
  else {
572
572
  const o = u;
573
573
  let a, A;
574
574
  for (u = n[0], a = 0; a < n.length - 1; a++)
575
- A = j(this, o[r + a], e, a), A === I && (A = this._$AH[a]), i || (i = !X(A) || A !== this._$AH[a]), A === B ? u = B : u !== B && (u += (A ?? "") + n[a + 1]), this._$AH[a] = A;
575
+ A = z(this, o[r + a], e, a), A === G && (A = this._$AH[a]), i || (i = !X(A) || A !== this._$AH[a]), A === B ? u = B : u !== B && (u += (A ?? "") + n[a + 1]), this._$AH[a] = A;
576
576
  }
577
577
  i && !s && this.j(u);
578
578
  }
@@ -601,7 +601,7 @@ class me extends nu {
601
601
  super(u, e, r, s, n), this.type = 5;
602
602
  }
603
603
  _$AI(u, e = this) {
604
- if ((u = j(this, u, e, 0) ?? B) === I)
604
+ if ((u = z(this, u, e, 0) ?? B) === G)
605
605
  return;
606
606
  const r = this._$AH, s = u === B && r !== B || u.capture !== r.capture || u.once !== r.once || u.passive !== r.passive, n = u !== B && (r === B || s);
607
607
  s && this.element.removeEventListener(this.name, this, r), n && this.element.addEventListener(this.name, this, u), this._$AH = u;
@@ -611,7 +611,7 @@ class me extends nu {
611
611
  typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, u) : this._$AH.handleEvent(u);
612
612
  }
613
613
  }
614
- class ye {
614
+ class ge {
615
615
  constructor(u, e, r) {
616
616
  this.element = u, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = r;
617
617
  }
@@ -619,12 +619,12 @@ class ye {
619
619
  return this._$AM._$AU;
620
620
  }
621
621
  _$AI(u) {
622
- j(this, u);
622
+ z(this, u);
623
623
  }
624
624
  }
625
625
  const Au = J.litHtmlPolyfillSupport;
626
626
  Au == null || Au(Y, Q), (J.litHtmlVersions ?? (J.litHtmlVersions = [])).push("3.1.3");
627
- const ge = (t, u, e) => {
627
+ const ye = (t, u, e) => {
628
628
  const r = (e == null ? void 0 : e.renderBefore) ?? u;
629
629
  let s = r._$litPart$;
630
630
  if (s === void 0) {
@@ -638,7 +638,7 @@ const ge = (t, u, e) => {
638
638
  * Copyright 2017 Google LLC
639
639
  * SPDX-License-Identifier: BSD-3-Clause
640
640
  */
641
- class H extends k {
641
+ class j extends I {
642
642
  constructor() {
643
643
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
644
644
  }
@@ -649,7 +649,7 @@ class H extends k {
649
649
  }
650
650
  update(u) {
651
651
  const e = this.render();
652
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(u), this._$Do = ge(e, this.renderRoot, this.renderOptions);
652
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(u), this._$Do = ye(e, this.renderRoot, this.renderOptions);
653
653
  }
654
654
  connectedCallback() {
655
655
  var u;
@@ -660,13 +660,13 @@ class H extends k {
660
660
  super.disconnectedCallback(), (u = this._$Do) == null || u.setConnected(!1);
661
661
  }
662
662
  render() {
663
- return I;
663
+ return G;
664
664
  }
665
665
  }
666
666
  var ju;
667
- H._$litElement$ = !0, H.finalized = !0, (ju = globalThis.litElementHydrateSupport) == null || ju.call(globalThis, { LitElement: H });
667
+ j._$litElement$ = !0, j.finalized = !0, (ju = globalThis.litElementHydrateSupport) == null || ju.call(globalThis, { LitElement: j });
668
668
  const Cu = globalThis.litElementPolyfillSupport;
669
- Cu == null || Cu({ LitElement: H });
669
+ Cu == null || Cu({ LitElement: j });
670
670
  (globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.5");
671
671
  const $e = (t, u, e) => {
672
672
  if (!u)
@@ -746,7 +746,7 @@ const _e = () => {
746
746
  if (t === "")
747
747
  return !0;
748
748
  const e = (r = Eu[t]) == null ? void 0 : r.call(Eu, u);
749
- return CSS.supports("color", t) ? new b.Color(t) : e ?? t;
749
+ return CSS.supports("color", t) ? new _.Color(t) : e ?? t;
750
750
  };
751
751
  function Se(t) {
752
752
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
@@ -774,11 +774,11 @@ var Pe = {
774
774
  }
775
775
  };
776
776
  const p = Pe;
777
- let pu, y, w, iu, T, $, f, bu, Z;
777
+ let pu, g, S, iu, T, $, f, bu, Z;
778
778
  var xe = function(u, e) {
779
- pu = String(u), y = "start", w = [], iu = 0, T = 1, $ = 0, f = void 0, bu = void 0, Z = void 0;
779
+ pu = String(u), g = "start", S = [], iu = 0, T = 1, $ = 0, f = void 0, bu = void 0, Z = void 0;
780
780
  do
781
- f = Ne(), Oe[y]();
781
+ f = Ne(), Oe[g]();
782
782
  while (f.type !== "eof");
783
783
  return typeof e == "function" ? fu({ "": Z }, "", e) : Z;
784
784
  };
@@ -807,21 +807,21 @@ function fu(t, u, e) {
807
807
  }
808
808
  return e.call(t, u, r);
809
809
  }
810
- let h, c, V, v, C;
810
+ let h, c, V, w, C;
811
811
  function Ne() {
812
- for (h = "default", c = "", V = !1, v = 1; ; ) {
813
- C = S();
812
+ for (h = "default", c = "", V = !1, w = 1; ; ) {
813
+ C = P();
814
814
  const t = Yu[h]();
815
815
  if (t)
816
816
  return t;
817
817
  }
818
818
  }
819
- function S() {
819
+ function P() {
820
820
  if (pu[iu])
821
821
  return String.fromCodePoint(pu.codePointAt(iu));
822
822
  }
823
823
  function D() {
824
- const t = S();
824
+ const t = P();
825
825
  return t === `
826
826
  ` ? (T++, $ = 0) : t ? $ += t.length : $++, t && (iu += t.length), t;
827
827
  }
@@ -851,7 +851,7 @@ const Yu = {
851
851
  D();
852
852
  return;
853
853
  }
854
- return Yu[y]();
854
+ return Yu[g]();
855
855
  },
856
856
  comment() {
857
857
  switch (C) {
@@ -907,14 +907,14 @@ const Yu = {
907
907
  case "[":
908
908
  return l("punctuator", D());
909
909
  case "n":
910
- return D(), O("ull"), l("null", null);
910
+ return D(), L("ull"), l("null", null);
911
911
  case "t":
912
- return D(), O("rue"), l("boolean", !0);
912
+ return D(), L("rue"), l("boolean", !0);
913
913
  case "f":
914
- return D(), O("alse"), l("boolean", !1);
914
+ return D(), L("alse"), l("boolean", !1);
915
915
  case "-":
916
916
  case "+":
917
- D() === "-" && (v = -1), h = "sign";
917
+ D() === "-" && (w = -1), h = "sign";
918
918
  return;
919
919
  case ".":
920
920
  c = D(), h = "decimalPointLeading";
@@ -934,9 +934,9 @@ const Yu = {
934
934
  c = D(), h = "decimalInteger";
935
935
  return;
936
936
  case "I":
937
- return D(), O("nfinity"), l("numeric", 1 / 0);
937
+ return D(), L("nfinity"), l("numeric", 1 / 0);
938
938
  case "N":
939
- return D(), O("aN"), l("numeric", NaN);
939
+ return D(), L("aN"), l("numeric", NaN);
940
940
  case '"':
941
941
  case "'":
942
942
  V = D() === '"', c = "", h = "string";
@@ -1016,9 +1016,9 @@ const Yu = {
1016
1016
  c = D(), h = "decimalInteger";
1017
1017
  return;
1018
1018
  case "I":
1019
- return D(), O("nfinity"), l("numeric", v * (1 / 0));
1019
+ return D(), L("nfinity"), l("numeric", w * (1 / 0));
1020
1020
  case "N":
1021
- return D(), O("aN"), l("numeric", NaN);
1021
+ return D(), L("aN"), l("numeric", NaN);
1022
1022
  }
1023
1023
  throw d(D());
1024
1024
  },
@@ -1036,7 +1036,7 @@ const Yu = {
1036
1036
  c += D(), h = "hexadecimal";
1037
1037
  return;
1038
1038
  }
1039
- return l("numeric", v * 0);
1039
+ return l("numeric", w * 0);
1040
1040
  },
1041
1041
  decimalInteger() {
1042
1042
  switch (C) {
@@ -1052,7 +1052,7 @@ const Yu = {
1052
1052
  c += D();
1053
1053
  return;
1054
1054
  }
1055
- return l("numeric", v * Number(c));
1055
+ return l("numeric", w * Number(c));
1056
1056
  },
1057
1057
  decimalPointLeading() {
1058
1058
  if (p.isDigit(C)) {
@@ -1072,7 +1072,7 @@ const Yu = {
1072
1072
  c += D(), h = "decimalFraction";
1073
1073
  return;
1074
1074
  }
1075
- return l("numeric", v * Number(c));
1075
+ return l("numeric", w * Number(c));
1076
1076
  },
1077
1077
  decimalFraction() {
1078
1078
  switch (C) {
@@ -1085,7 +1085,7 @@ const Yu = {
1085
1085
  c += D();
1086
1086
  return;
1087
1087
  }
1088
- return l("numeric", v * Number(c));
1088
+ return l("numeric", w * Number(c));
1089
1089
  },
1090
1090
  decimalExponent() {
1091
1091
  switch (C) {
@@ -1112,7 +1112,7 @@ const Yu = {
1112
1112
  c += D();
1113
1113
  return;
1114
1114
  }
1115
- return l("numeric", v * Number(c));
1115
+ return l("numeric", w * Number(c));
1116
1116
  },
1117
1117
  hexadecimal() {
1118
1118
  if (p.isHexDigit(C)) {
@@ -1126,7 +1126,7 @@ const Yu = {
1126
1126
  c += D();
1127
1127
  return;
1128
1128
  }
1129
- return l("numeric", v * Number(c));
1129
+ return l("numeric", w * Number(c));
1130
1130
  },
1131
1131
  string() {
1132
1132
  switch (C) {
@@ -1227,15 +1227,15 @@ function l(t, u) {
1227
1227
  column: $
1228
1228
  };
1229
1229
  }
1230
- function O(t) {
1230
+ function L(t) {
1231
1231
  for (const u of t) {
1232
- if (S() !== u)
1232
+ if (P() !== u)
1233
1233
  throw d(D());
1234
1234
  D();
1235
1235
  }
1236
1236
  }
1237
1237
  function Te() {
1238
- switch (S()) {
1238
+ switch (P()) {
1239
1239
  case "b":
1240
1240
  return D(), "\b";
1241
1241
  case "f":
@@ -1250,7 +1250,7 @@ function Te() {
1250
1250
  case "v":
1251
1251
  return D(), "\v";
1252
1252
  case "0":
1253
- if (D(), p.isDigit(S()))
1253
+ if (D(), p.isDigit(P()))
1254
1254
  throw d(D());
1255
1255
  return "\0";
1256
1256
  case "x":
@@ -1263,7 +1263,7 @@ function Te() {
1263
1263
  case "\u2029":
1264
1264
  return D(), "";
1265
1265
  case "\r":
1266
- return D(), S() === `
1266
+ return D(), P() === `
1267
1267
  ` && D(), "";
1268
1268
  case "1":
1269
1269
  case "2":
@@ -1281,15 +1281,15 @@ function Te() {
1281
1281
  return D();
1282
1282
  }
1283
1283
  function Me() {
1284
- let t = "", u = S();
1285
- if (!p.isHexDigit(u) || (t += D(), u = S(), !p.isHexDigit(u)))
1284
+ let t = "", u = P();
1285
+ if (!p.isHexDigit(u) || (t += D(), u = P(), !p.isHexDigit(u)))
1286
1286
  throw d(D());
1287
1287
  return t += D(), String.fromCodePoint(parseInt(t, 16));
1288
1288
  }
1289
1289
  function Bu() {
1290
1290
  let t = "", u = 4;
1291
1291
  for (; u-- > 0; ) {
1292
- const e = S();
1292
+ const e = P();
1293
1293
  if (!p.isHexDigit(e))
1294
1294
  throw d(D());
1295
1295
  t += D();
@@ -1299,35 +1299,35 @@ function Bu() {
1299
1299
  const Oe = {
1300
1300
  start() {
1301
1301
  if (f.type === "eof")
1302
- throw R();
1302
+ throw U();
1303
1303
  lu();
1304
1304
  },
1305
1305
  beforePropertyName() {
1306
1306
  switch (f.type) {
1307
1307
  case "identifier":
1308
1308
  case "string":
1309
- bu = f.value, y = "afterPropertyName";
1309
+ bu = f.value, g = "afterPropertyName";
1310
1310
  return;
1311
1311
  case "punctuator":
1312
1312
  uu();
1313
1313
  return;
1314
1314
  case "eof":
1315
- throw R();
1315
+ throw U();
1316
1316
  }
1317
1317
  },
1318
1318
  afterPropertyName() {
1319
1319
  if (f.type === "eof")
1320
- throw R();
1321
- y = "beforePropertyValue";
1320
+ throw U();
1321
+ g = "beforePropertyValue";
1322
1322
  },
1323
1323
  beforePropertyValue() {
1324
1324
  if (f.type === "eof")
1325
- throw R();
1325
+ throw U();
1326
1326
  lu();
1327
1327
  },
1328
1328
  beforeArrayValue() {
1329
1329
  if (f.type === "eof")
1330
- throw R();
1330
+ throw U();
1331
1331
  if (f.type === "punctuator" && f.value === "]") {
1332
1332
  uu();
1333
1333
  return;
@@ -1336,10 +1336,10 @@ const Oe = {
1336
1336
  },
1337
1337
  afterPropertyValue() {
1338
1338
  if (f.type === "eof")
1339
- throw R();
1339
+ throw U();
1340
1340
  switch (f.value) {
1341
1341
  case ",":
1342
- y = "beforePropertyName";
1342
+ g = "beforePropertyName";
1343
1343
  return;
1344
1344
  case "}":
1345
1345
  uu();
@@ -1347,10 +1347,10 @@ const Oe = {
1347
1347
  },
1348
1348
  afterArrayValue() {
1349
1349
  if (f.type === "eof")
1350
- throw R();
1350
+ throw U();
1351
1351
  switch (f.value) {
1352
1352
  case ",":
1353
- y = "beforeArrayValue";
1353
+ g = "beforeArrayValue";
1354
1354
  return;
1355
1355
  case "]":
1356
1356
  uu();
@@ -1382,7 +1382,7 @@ function lu() {
1382
1382
  if (Z === void 0)
1383
1383
  Z = t;
1384
1384
  else {
1385
- const u = w[w.length - 1];
1385
+ const u = S[S.length - 1];
1386
1386
  Array.isArray(u) ? u.push(t) : Object.defineProperty(u, bu, {
1387
1387
  value: t,
1388
1388
  writable: !0,
@@ -1391,21 +1391,21 @@ function lu() {
1391
1391
  });
1392
1392
  }
1393
1393
  if (t !== null && typeof t == "object")
1394
- w.push(t), Array.isArray(t) ? y = "beforeArrayValue" : y = "beforePropertyName";
1394
+ S.push(t), Array.isArray(t) ? g = "beforeArrayValue" : g = "beforePropertyName";
1395
1395
  else {
1396
- const u = w[w.length - 1];
1397
- u == null ? y = "end" : Array.isArray(u) ? y = "afterArrayValue" : y = "afterPropertyValue";
1396
+ const u = S[S.length - 1];
1397
+ u == null ? g = "end" : Array.isArray(u) ? g = "afterArrayValue" : g = "afterPropertyValue";
1398
1398
  }
1399
1399
  }
1400
1400
  function uu() {
1401
- w.pop();
1402
- const t = w[w.length - 1];
1403
- t == null ? y = "end" : Array.isArray(t) ? y = "afterArrayValue" : y = "afterPropertyValue";
1401
+ S.pop();
1402
+ const t = S[S.length - 1];
1403
+ t == null ? g = "end" : Array.isArray(t) ? g = "afterArrayValue" : g = "afterPropertyValue";
1404
1404
  }
1405
1405
  function d(t) {
1406
1406
  return Du(t === void 0 ? `JSON5: invalid end of input at ${T}:${$}` : `JSON5: invalid character '${Qu(t)}' at ${T}:${$}`);
1407
1407
  }
1408
- function R() {
1408
+ function U() {
1409
1409
  return Du(`JSON5: invalid end of input at ${T}:${$}`);
1410
1410
  }
1411
1411
  function Uu() {
@@ -1446,11 +1446,11 @@ const ue = /* @__PURE__ */ Se(xe), mu = "raycast", ku = [
1446
1446
  "args",
1447
1447
  "data"
1448
1448
  ], Hu = (t) => t.split("-"), ee = (t) => {
1449
- const u = typeof t == "string" ? b[t] : t;
1449
+ const u = typeof t == "string" ? _[t] : t;
1450
1450
  if (!be(u))
1451
1451
  return null;
1452
1452
  const e = t.toString().toLowerCase().endsWith("loader");
1453
- class r extends H {
1453
+ class r extends j {
1454
1454
  constructor() {
1455
1455
  super(...arguments), this.instance = null, this.dispose = [], this.mutationObserver = null;
1456
1456
  }
@@ -1485,11 +1485,11 @@ const ue = /* @__PURE__ */ Se(xe), mu = "raycast", ku = [
1485
1485
  i.uuid && this.setAttribute(Xu, i.uuid);
1486
1486
  const o = this.parentNode;
1487
1487
  if (o.instance || (a = o.three) != null && a.scene) {
1488
- const m = this.instance, g = this.instance, _ = o.instance, au = o.instance ?? ((A = o.three) == null ? void 0 : A.scene), re = this.instance;
1489
- if ((F = m.type) != null && F.toLowerCase().includes("geometry") && _.geometry)
1490
- _.geometry = m;
1491
- else if ((E = g.type) != null && E.toLowerCase().includes("material") && _.material)
1492
- _.material = g;
1488
+ const m = this.instance, y = this.instance, v = o.instance, au = o.instance ?? ((A = o.three) == null ? void 0 : A.scene), re = this.instance;
1489
+ if ((F = m.type) != null && F.toLowerCase().includes("geometry") && v.geometry)
1490
+ v.geometry = m;
1491
+ else if ((E = y.type) != null && E.toLowerCase().includes("material") && v.material)
1492
+ v.material = y;
1493
1493
  else if (au.add)
1494
1494
  try {
1495
1495
  au.add(re);
@@ -1604,24 +1604,24 @@ const Le = { attribute: !0, type: String, converter: ru, reflect: !1, hasChanged
1604
1604
  }
1605
1605
  throw Error("Unsupported decorator location: " + r);
1606
1606
  };
1607
- function G(t) {
1607
+ function M(t) {
1608
1608
  return (u, e) => typeof e == "object" ? Ue(t, u, e) : ((r, s, n) => {
1609
1609
  const i = s.hasOwnProperty(n);
1610
1610
  return s.constructor.createProperty(n, i ? { ...r, wrapped: !0 } : r), i ? Object.getOwnPropertyDescriptor(s, n) : void 0;
1611
1611
  })(t, u, e);
1612
1612
  }
1613
- var ke = Object.defineProperty, z = (t, u, e, r) => {
1613
+ var ke = Object.defineProperty, O = (t, u, e, r) => {
1614
1614
  for (var s = void 0, n = t.length - 1, i; n >= 0; n--)
1615
1615
  (i = t[n]) && (s = i(u, e, s) || s);
1616
1616
  return s && ke(u, e, s), s;
1617
1617
  };
1618
- const He = "orthographic", Iu = 1 / 0, _u = class _u extends H {
1618
+ const He = "orthographic", Iu = 1 / 0, _u = class _u extends j {
1619
1619
  constructor() {
1620
- super(), this.scratchV2 = new b.Vector2(), this.three = {
1621
- scene: new b.Scene(),
1620
+ super(), this.scratchV2 = new _.Vector2(), this.three = {
1621
+ scene: new _.Scene(),
1622
1622
  camera: null,
1623
1623
  renderer: null
1624
- }, this.background = null, this.dpr = Iu, this.headless = !1, this.manualRender = !1, this.dispatchBeforeRender = !1, this.dispatchAfterRender = !1, this.raycaster = new b.Raycaster(), this.raycastPool = [], this.frame = 1 / 0, this.resizeObserver = new ResizeObserver((u) => {
1624
+ }, this.background = null, this.dpr = Iu, this.headless = !1, this.manualRender = !1, this.dispatchBeforeRender = !1, this.dispatchAfterRender = !1, this.rendererArgs = [], this.cameraArgs = [], this.raycaster = new _.Raycaster(), this.raycastPool = [], this.frame = 1 / 0, this.resizeObserver = new ResizeObserver((u) => {
1625
1625
  u.forEach(({ target: e, contentRect: r }) => {
1626
1626
  var s;
1627
1627
  if (e === this && ((s = this.three.renderer) == null || s.setSize(r.width * this.dpr, r.height * this.dpr), this.three.camera)) {
@@ -1639,13 +1639,13 @@ const He = "orthographic", Iu = 1 / 0, _u = class _u extends H {
1639
1639
  }
1640
1640
  /** To run on start. */
1641
1641
  connectedCallback() {
1642
- if (super.connectedCallback(), this.dpr === Iu && (this.dpr = window.devicePixelRatio), this.getAttribute(He) !== null ? this.three.camera = new b.OrthographicCamera() : this.three.camera = new b.PerspectiveCamera(75), ["scene", "camera", "renderer"].forEach((u) => {
1642
+ if (super.connectedCallback(), this.dpr === Iu && (this.dpr = window.devicePixelRatio), this.getAttribute(He) !== null ? this.three.camera = new _.OrthographicCamera(...this.cameraArgs) : this.three.camera = new _.PerspectiveCamera(...this.cameraArgs.length ? this.cameraArgs : [75]), ["scene", "camera", "renderer"].forEach((u) => {
1643
1643
  const e = this[u] ?? this.getAttribute(u) ?? {}, r = typeof e == "string" ? ue(e) : e;
1644
1644
  Object.entries(r).forEach(([s, n]) => {
1645
1645
  this.three[u] && du(this.three[u], s.split("-"), tu(n, this));
1646
1646
  });
1647
- }), this.resizeObserver.observe(this), this.background !== null && (this.three.scene.background = new b.Color(this.background)), !this.headless) {
1648
- const u = new b.WebGLRenderer();
1647
+ }), this.resizeObserver.observe(this), this.background !== null && (this.three.scene.background = new _.Color(this.background)), !this.headless) {
1648
+ const u = new _.WebGLRenderer(...this.rendererArgs);
1649
1649
  u.domElement.addEventListener("pointermove", this.onPointerMove.bind(this)), u.domElement.addEventListener("mousemove", this.onPointerMove.bind(this)), u.domElement.addEventListener("click", this.onClick.bind(this)), this.three.renderer = u;
1650
1650
  }
1651
1651
  this.manualRender || this.updateLoop();
@@ -1657,7 +1657,7 @@ const He = "orthographic", Iu = 1 / 0, _u = class _u extends H {
1657
1657
  handleDefaultSlotChange(u) {
1658
1658
  u.target.assignedElements().forEach((e) => {
1659
1659
  const r = e;
1660
- r.instance instanceof b.Object3D && e.getAttributeNames().includes(mu) && e.getAttributeNames().includes(mu) && this.raycastPool.push(r.instance);
1660
+ r.instance instanceof _.Object3D && e.getAttributeNames().includes(mu) && e.getAttributeNames().includes(mu) && this.raycastPool.push(r.instance);
1661
1661
  }), this.renderThree();
1662
1662
  }
1663
1663
  runRaycast(u) {
@@ -1735,38 +1735,50 @@ _u.styles = ie`
1735
1735
  max-height: 100%;
1736
1736
  }
1737
1737
  `;
1738
- let P = _u;
1739
- z([
1740
- G()
1741
- ], P.prototype, "background");
1742
- z([
1743
- G()
1744
- ], P.prototype, "dpr");
1745
- z([
1746
- G()
1747
- ], P.prototype, "headless");
1748
- z([
1749
- G({
1738
+ let b = _u;
1739
+ O([
1740
+ M()
1741
+ ], b.prototype, "background");
1742
+ O([
1743
+ M()
1744
+ ], b.prototype, "dpr");
1745
+ O([
1746
+ M()
1747
+ ], b.prototype, "headless");
1748
+ O([
1749
+ M({
1750
1750
  attribute: "manual-render",
1751
1751
  type: Boolean
1752
1752
  })
1753
- ], P.prototype, "manualRender");
1754
- z([
1755
- G({
1753
+ ], b.prototype, "manualRender");
1754
+ O([
1755
+ M({
1756
1756
  attribute: "dispatch-before-render",
1757
1757
  type: Boolean
1758
1758
  })
1759
- ], P.prototype, "dispatchBeforeRender");
1760
- z([
1761
- G({
1759
+ ], b.prototype, "dispatchBeforeRender");
1760
+ O([
1761
+ M({
1762
1762
  attribute: "dispatch-after-render",
1763
1763
  type: Boolean
1764
1764
  })
1765
- ], P.prototype, "dispatchAfterRender");
1765
+ ], b.prototype, "dispatchAfterRender");
1766
+ O([
1767
+ M({
1768
+ attribute: "renderer-args",
1769
+ type: Object
1770
+ })
1771
+ ], b.prototype, "rendererArgs");
1772
+ O([
1773
+ M({
1774
+ attribute: "camera-args",
1775
+ type: Object
1776
+ })
1777
+ ], b.prototype, "cameraArgs");
1766
1778
  const Je = ({
1767
1779
  prependList: t = []
1768
1780
  } = {}) => {
1769
- customElements.get("three-lunchbox") || customElements.define("three-lunchbox", P), [...t, ...Gu].forEach((u) => {
1781
+ customElements.get("three-lunchbox") || customElements.define("three-lunchbox", b), [...t, ...Gu].forEach((u) => {
1770
1782
  const e = te(u);
1771
1783
  if (customElements.get(e))
1772
1784
  return;
@@ -1793,7 +1805,7 @@ export {
1793
1805
  Ge as THREE_CLICK_EVENT_NAME,
1794
1806
  je as THREE_MOUSE_MOVE_EVENT_NAME,
1795
1807
  Ie as THREE_POINTER_MOVE_EVENT_NAME,
1796
- P as ThreeLunchbox,
1808
+ b as ThreeLunchbox,
1797
1809
  Gu as autoComponents,
1798
1810
  Ze as extend,
1799
1811
  Je as initLunchbox,