@londondynamics/pericles-webcomponent
Advanced tools
Comparing version 2.0.0 to 2.1.0
@@ -28,6 +28,8 @@ import { LitElement } from 'lit'; | ||
backgroundColor?: string; | ||
disableRetries?: 'yes' | 'no'; | ||
disableScrollWheel?: 'yes' | 'no'; | ||
enableDarkMode?: 'yes' | 'no'; | ||
disableScrollWheel?: 'yes' | 'no'; | ||
interactionPromptStyle?: 'basic' | 'wiggle'; | ||
lights?: 'yes' | 'no'; | ||
qrUrlPattern?: string; | ||
rotation?: [x: number, y: number, z: number]; | ||
@@ -50,2 +52,3 @@ rulerUnit?: 'mm' | 'cm' | 'm' | 'in' | 'ft' | 'yd'; | ||
zoomType?: 'full' | 'loupe' | 'none'; | ||
defaultSelection: Selection; | ||
static styles: import('lit').CSSResult; | ||
@@ -136,7 +139,7 @@ /** | ||
/** | ||
* Selects preset by id | ||
* @param {string} presetId | ||
* Selects context by id | ||
* @param {string} contextId | ||
* @returns {void} | ||
*/ | ||
setPreset(presetId: string): void; | ||
setContext(contextId: string): void; | ||
/** | ||
@@ -143,0 +146,0 @@ * Resets the camera to its initial position. |
@@ -6,6 +6,6 @@ /** | ||
*/ | ||
const H = globalThis, W = H.ShadowRoot && (H.ShadyCSS === void 0 || H.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, F = Symbol(), q = /* @__PURE__ */ new WeakMap(); | ||
const H = globalThis, J = H.ShadowRoot && (H.ShadyCSS === void 0 || H.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, W = Symbol(), V = /* @__PURE__ */ new WeakMap(); | ||
let ot = class { | ||
constructor(t, e, s) { | ||
if (this._$cssResult$ = !0, s !== F) | ||
constructor(t, e, i) { | ||
if (this._$cssResult$ = !0, i !== W) | ||
throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead."); | ||
@@ -17,5 +17,5 @@ this.cssText = t, this.t = e; | ||
const e = this.t; | ||
if (W && t === void 0) { | ||
const s = e !== void 0 && e.length === 1; | ||
s && (t = q.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && q.set(e, t)); | ||
if (J && t === void 0) { | ||
const i = e !== void 0 && e.length === 1; | ||
i && (t = V.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && V.set(e, t)); | ||
} | ||
@@ -28,4 +28,4 @@ return t; | ||
}; | ||
const ct = (i) => new ot(typeof i == "string" ? i : i + "", void 0, F), dt = (i, ...t) => { | ||
const e = i.length === 1 ? i[0] : t.reduce((s, r, n) => s + ((o) => { | ||
const ct = (s) => new ot(typeof s == "string" ? s : s + "", void 0, W), dt = (s, ...t) => { | ||
const e = s.length === 1 ? s[0] : t.reduce((i, r, n) => i + ((o) => { | ||
if (o._$cssResult$ === !0) | ||
@@ -36,18 +36,18 @@ return o.cssText; | ||
throw Error("Value passed to 'css' function must be a 'css' function result: " + o + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security."); | ||
})(r) + i[n + 1], i[0]); | ||
return new ot(e, i, F); | ||
}, ut = (i, t) => { | ||
if (W) | ||
i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet); | ||
})(r) + s[n + 1], s[0]); | ||
return new ot(e, s, W); | ||
}, ut = (s, t) => { | ||
if (J) | ||
s.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet); | ||
else | ||
for (const e of t) { | ||
const s = document.createElement("style"), r = H.litNonce; | ||
r !== void 0 && s.setAttribute("nonce", r), s.textContent = e.cssText, i.appendChild(s); | ||
const i = document.createElement("style"), r = H.litNonce; | ||
r !== void 0 && i.setAttribute("nonce", r), i.textContent = e.cssText, s.appendChild(i); | ||
} | ||
}, G = W ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => { | ||
}, G = J ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((t) => { | ||
let e = ""; | ||
for (const s of t.cssRules) | ||
e += s.cssText; | ||
for (const i of t.cssRules) | ||
e += i.cssText; | ||
return ct(e); | ||
})(i) : i; | ||
})(s) : s; | ||
/** | ||
@@ -58,20 +58,20 @@ * @license | ||
*/ | ||
const { is: gt, defineProperty: yt, getOwnPropertyDescriptor: _t, getOwnPropertyNames: $t, getOwnPropertySymbols: mt, getPrototypeOf: ft } = Object, f = globalThis, K = f.trustedTypes, wt = K ? K.emptyScript : "", z = f.reactiveElementPolyfillSupport, C = (i, t) => i, I = { toAttribute(i, t) { | ||
const { is: gt, defineProperty: yt, getOwnPropertyDescriptor: _t, getOwnPropertyNames: ft, getOwnPropertySymbols: mt, getPrototypeOf: $t } = Object, $ = globalThis, K = $.trustedTypes, wt = K ? K.emptyScript : "", j = $.reactiveElementPolyfillSupport, C = (s, t) => s, I = { toAttribute(s, t) { | ||
switch (t) { | ||
case Boolean: | ||
i = i ? wt : null; | ||
s = s ? wt : null; | ||
break; | ||
case Object: | ||
case Array: | ||
i = i == null ? i : JSON.stringify(i); | ||
s = s == null ? s : JSON.stringify(s); | ||
} | ||
return i; | ||
}, fromAttribute(i, t) { | ||
let e = i; | ||
return s; | ||
}, fromAttribute(s, t) { | ||
let e = s; | ||
switch (t) { | ||
case Boolean: | ||
e = i !== null; | ||
e = s !== null; | ||
break; | ||
case Number: | ||
e = i === null ? null : Number(i); | ||
e = s === null ? null : Number(s); | ||
break; | ||
@@ -81,3 +81,3 @@ case Object: | ||
try { | ||
e = JSON.parse(i); | ||
e = JSON.parse(s); | ||
} catch { | ||
@@ -88,5 +88,5 @@ e = null; | ||
return e; | ||
} }, V = (i, t) => !gt(i, t), Q = { attribute: !0, type: String, converter: I, reflect: !1, hasChanged: V }; | ||
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), f.litPropertyMetadata ?? (f.litPropertyMetadata = /* @__PURE__ */ new WeakMap()); | ||
class S extends HTMLElement { | ||
} }, F = (s, t) => !gt(s, t), Q = { attribute: !0, type: String, converter: I, reflect: !1, hasChanged: F }; | ||
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), $.litPropertyMetadata ?? ($.litPropertyMetadata = /* @__PURE__ */ new WeakMap()); | ||
class A extends HTMLElement { | ||
static addInitializer(t) { | ||
@@ -100,7 +100,7 @@ this._$Ei(), (this.l ?? (this.l = [])).push(t); | ||
if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) { | ||
const s = Symbol(), r = this.getPropertyDescriptor(t, s, e); | ||
const i = Symbol(), r = this.getPropertyDescriptor(t, i, e); | ||
r !== void 0 && yt(this.prototype, t, r); | ||
} | ||
} | ||
static getPropertyDescriptor(t, e, s) { | ||
static getPropertyDescriptor(t, e, i) { | ||
const { get: r, set: n } = _t(this.prototype, t) ?? { get() { | ||
@@ -115,3 +115,3 @@ return this[e]; | ||
const c = r == null ? void 0 : r.call(this); | ||
n.call(this, o), this.requestUpdate(t, c, s); | ||
n.call(this, o), this.requestUpdate(t, c, i); | ||
}, configurable: !0, enumerable: !0 }; | ||
@@ -125,3 +125,3 @@ } | ||
return; | ||
const t = ft(this); | ||
const t = $t(this); | ||
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties); | ||
@@ -133,4 +133,4 @@ } | ||
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(C("properties"))) { | ||
const e = this.properties, s = [...$t(e), ...mt(e)]; | ||
for (const r of s) | ||
const e = this.properties, i = [...ft(e), ...mt(e)]; | ||
for (const r of i) | ||
this.createProperty(r, e[r]); | ||
@@ -142,8 +142,8 @@ } | ||
if (e !== void 0) | ||
for (const [s, r] of e) | ||
this.elementProperties.set(s, r); | ||
for (const [i, r] of e) | ||
this.elementProperties.set(i, r); | ||
} | ||
this._$Eh = /* @__PURE__ */ new Map(); | ||
for (const [e, s] of this.elementProperties) { | ||
const r = this._$Eu(e, s); | ||
for (const [e, i] of this.elementProperties) { | ||
const r = this._$Eu(e, i); | ||
r !== void 0 && this._$Eh.set(r, e); | ||
@@ -156,4 +156,4 @@ } | ||
if (Array.isArray(t)) { | ||
const s = new Set(t.flat(1 / 0).reverse()); | ||
for (const r of s) | ||
const i = new Set(t.flat(1 / 0).reverse()); | ||
for (const r of i) | ||
e.unshift(G(r)); | ||
@@ -165,4 +165,4 @@ } else | ||
static _$Eu(t, e) { | ||
const s = e.attribute; | ||
return s === !1 ? void 0 : typeof s == "string" ? s : typeof t == "string" ? t.toLowerCase() : void 0; | ||
const i = e.attribute; | ||
return i === !1 ? void 0 : typeof i == "string" ? i : typeof t == "string" ? t.toLowerCase() : void 0; | ||
} | ||
@@ -186,4 +186,4 @@ constructor() { | ||
const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties; | ||
for (const s of e.keys()) | ||
this.hasOwnProperty(s) && (t.set(s, this[s]), delete this[s]); | ||
for (const i of e.keys()) | ||
this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]); | ||
t.size > 0 && (this._$Ep = t); | ||
@@ -198,4 +198,4 @@ } | ||
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$EO) == null || t.forEach((e) => { | ||
var s; | ||
return (s = e.hostConnected) == null ? void 0 : s.call(e); | ||
var i; | ||
return (i = e.hostConnected) == null ? void 0 : i.call(e); | ||
}); | ||
@@ -208,14 +208,14 @@ } | ||
(t = this._$EO) == null || t.forEach((e) => { | ||
var s; | ||
return (s = e.hostDisconnected) == null ? void 0 : s.call(e); | ||
var i; | ||
return (i = e.hostDisconnected) == null ? void 0 : i.call(e); | ||
}); | ||
} | ||
attributeChangedCallback(t, e, s) { | ||
this._$AK(t, s); | ||
attributeChangedCallback(t, e, i) { | ||
this._$AK(t, i); | ||
} | ||
_$EC(t, e) { | ||
var n; | ||
const s = this.constructor.elementProperties.get(t), r = this.constructor._$Eu(t, s); | ||
if (r !== void 0 && s.reflect === !0) { | ||
const o = (((n = s.converter) == null ? void 0 : n.toAttribute) !== void 0 ? s.converter : I).toAttribute(e, s.type); | ||
const i = this.constructor.elementProperties.get(t), r = this.constructor._$Eu(t, i); | ||
if (r !== void 0 && i.reflect === !0) { | ||
const o = (((n = i.converter) == null ? void 0 : n.toAttribute) !== void 0 ? i.converter : I).toAttribute(e, i.type); | ||
this._$Em = t, o == null ? this.removeAttribute(r) : this.setAttribute(r, o), this._$Em = null; | ||
@@ -226,18 +226,18 @@ } | ||
var n; | ||
const s = this.constructor, r = s._$Eh.get(t); | ||
const i = this.constructor, r = i._$Eh.get(t); | ||
if (r !== void 0 && this._$Em !== r) { | ||
const o = s.getPropertyOptions(r), c = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((n = o.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? o.converter : I; | ||
const o = i.getPropertyOptions(r), c = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((n = o.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? o.converter : I; | ||
this._$Em = r, this[r] = c.fromAttribute(e, o.type), this._$Em = null; | ||
} | ||
} | ||
requestUpdate(t, e, s) { | ||
requestUpdate(t, e, i) { | ||
if (t !== void 0) { | ||
if (s ?? (s = this.constructor.getPropertyOptions(t)), !(s.hasChanged ?? V)(this[t], e)) | ||
if (i ?? (i = this.constructor.getPropertyOptions(t)), !(i.hasChanged ?? F)(this[t], e)) | ||
return; | ||
this.P(t, e, s); | ||
this.P(t, e, i); | ||
} | ||
this.isUpdatePending === !1 && (this._$ES = this._$ET()); | ||
} | ||
P(t, e, s) { | ||
this._$AL.has(t) || this._$AL.set(t, e), s.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t); | ||
P(t, e, i) { | ||
this._$AL.has(t) || this._$AL.set(t, e), i.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t); | ||
} | ||
@@ -258,3 +258,3 @@ async _$ET() { | ||
performUpdate() { | ||
var s; | ||
var i; | ||
if (!this.isUpdatePending) | ||
@@ -276,3 +276,3 @@ return; | ||
try { | ||
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (s = this._$EO) == null || s.forEach((r) => { | ||
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (i = this._$EO) == null || i.forEach((r) => { | ||
var n; | ||
@@ -290,5 +290,5 @@ return (n = r.hostUpdate) == null ? void 0 : n.call(r); | ||
var e; | ||
(e = this._$EO) == null || e.forEach((s) => { | ||
(e = this._$EO) == null || e.forEach((i) => { | ||
var r; | ||
return (r = s.hostUpdated) == null ? void 0 : r.call(s); | ||
return (r = i.hostUpdated) == null ? void 0 : r.call(i); | ||
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t); | ||
@@ -316,3 +316,3 @@ } | ||
} | ||
S.elementStyles = [], S.shadowRootOptions = { mode: "open" }, S[C("elementProperties")] = /* @__PURE__ */ new Map(), S[C("finalized")] = /* @__PURE__ */ new Map(), z == null || z({ ReactiveElement: S }), (f.reactiveElementVersions ?? (f.reactiveElementVersions = [])).push("2.0.4"); | ||
A.elementStyles = [], A.shadowRootOptions = { mode: "open" }, A[C("elementProperties")] = /* @__PURE__ */ new Map(), A[C("finalized")] = /* @__PURE__ */ new Map(), j == null || j({ ReactiveElement: A }), ($.reactiveElementVersions ?? ($.reactiveElementVersions = [])).push("2.0.4"); | ||
/** | ||
@@ -323,25 +323,25 @@ * @license | ||
*/ | ||
const M = globalThis, L = M.trustedTypes, Z = L ? L.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, nt = "$lit$", m = `lit$${Math.random().toFixed(9).slice(2)}$`, at = "?" + m, bt = `<${at}>`, A = document, x = () => A.createComment(""), O = (i) => i === null || typeof i != "object" && typeof i != "function", ht = Array.isArray, At = (i) => ht(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", j = `[ | ||
\f\r]`, P = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, X = /-->/g, Y = />/g, w = RegExp(`>|${j}(?:([^\\s"'>=/]+)(${j}*=${j}*(?:[^ | ||
\f\r"'\`<>=]|("|')|))|$)`, "g"), tt = /'/g, et = /"/g, lt = /^(?:script|style|textarea|title)$/i, St = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), st = St(1), v = Symbol.for("lit-noChange"), y = Symbol.for("lit-nothing"), it = /* @__PURE__ */ new WeakMap(), b = A.createTreeWalker(A, 129); | ||
function pt(i, t) { | ||
if (!Array.isArray(i) || !i.hasOwnProperty("raw")) | ||
const M = globalThis, L = M.trustedTypes, Z = L ? L.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, nt = "$lit$", m = `lit$${Math.random().toFixed(9).slice(2)}$`, at = "?" + m, bt = `<${at}>`, S = document, x = () => S.createComment(""), O = (s) => s === null || typeof s != "object" && typeof s != "function", ht = Array.isArray, St = (s) => ht(s) || typeof (s == null ? void 0 : s[Symbol.iterator]) == "function", z = `[ | ||
\f\r]`, P = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, X = /-->/g, Y = />/g, w = RegExp(`>|${z}(?:([^\\s"'>=/]+)(${z}*=${z}*(?:[^ | ||
\f\r"'\`<>=]|("|')|))|$)`, "g"), tt = /'/g, et = /"/g, lt = /^(?:script|style|textarea|title)$/i, At = (s) => (t, ...e) => ({ _$litType$: s, strings: t, values: e }), st = At(1), v = Symbol.for("lit-noChange"), y = Symbol.for("lit-nothing"), it = /* @__PURE__ */ new WeakMap(), b = S.createTreeWalker(S, 129); | ||
function pt(s, t) { | ||
if (!Array.isArray(s) || !s.hasOwnProperty("raw")) | ||
throw Error("invalid template strings array"); | ||
return Z !== void 0 ? Z.createHTML(t) : t; | ||
} | ||
const vt = (i, t) => { | ||
const e = i.length - 1, s = []; | ||
const vt = (s, t) => { | ||
const e = s.length - 1, i = []; | ||
let r, n = t === 2 ? "<svg>" : "", o = P; | ||
for (let c = 0; c < e; c++) { | ||
const a = i[c]; | ||
const a = s[c]; | ||
let d, g, u = -1, _ = 0; | ||
for (; _ < a.length && (o.lastIndex = _, g = o.exec(a), g !== null); ) | ||
_ = o.lastIndex, o === P ? g[1] === "!--" ? o = X : g[1] !== void 0 ? o = Y : g[2] !== void 0 ? (lt.test(g[2]) && (r = RegExp("</" + g[2], "g")), o = w) : g[3] !== void 0 && (o = w) : o === w ? g[0] === ">" ? (o = r ?? P, u = -1) : g[1] === void 0 ? u = -2 : (u = o.lastIndex - g[2].length, d = g[1], o = g[3] === void 0 ? w : g[3] === '"' ? et : tt) : o === et || o === tt ? o = w : o === X || o === Y ? o = P : (o = w, r = void 0); | ||
const $ = o === w && i[c + 1].startsWith("/>") ? " " : ""; | ||
n += o === P ? a + bt : u >= 0 ? (s.push(d), a.slice(0, u) + nt + a.slice(u) + m + $) : a + m + (u === -2 ? c : $); | ||
const f = o === w && s[c + 1].startsWith("/>") ? " " : ""; | ||
n += o === P ? a + bt : u >= 0 ? (i.push(d), a.slice(0, u) + nt + a.slice(u) + m + f) : a + m + (u === -2 ? c : f); | ||
} | ||
return [pt(i, n + (i[e] || "<?>") + (t === 2 ? "</svg>" : "")), s]; | ||
return [pt(s, n + (s[e] || "<?>") + (t === 2 ? "</svg>" : "")), i]; | ||
}; | ||
class R { | ||
constructor({ strings: t, _$litType$: e }, s) { | ||
constructor({ strings: t, _$litType$: e }, i) { | ||
let r; | ||
@@ -351,3 +351,3 @@ this.parts = []; | ||
const c = t.length - 1, a = this.parts, [d, g] = vt(t, e); | ||
if (this.el = R.createElement(d, s), b.currentNode = this.el.content, e === 2) { | ||
if (this.el = R.createElement(d, i), b.currentNode = this.el.content, e === 2) { | ||
const u = this.el.content.firstChild; | ||
@@ -361,4 +361,4 @@ u.replaceWith(...u.childNodes); | ||
if (u.endsWith(nt)) { | ||
const _ = g[o++], $ = r.getAttribute(u).split(m), T = /([.?@])?(.*)/.exec(_); | ||
a.push({ type: 1, index: n, name: T[2], strings: $, ctor: T[1] === "." ? Pt : T[1] === "?" ? Ct : T[1] === "@" ? Mt : D }), r.removeAttribute(u); | ||
const _ = g[o++], f = r.getAttribute(u).split(m), k = /([.?@])?(.*)/.exec(_); | ||
a.push({ type: 1, index: n, name: k[2], strings: f, ctor: k[1] === "." ? Pt : k[1] === "?" ? Ct : k[1] === "@" ? Mt : D }), r.removeAttribute(u); | ||
} else | ||
@@ -370,4 +370,4 @@ u.startsWith(m) && (a.push({ type: 6, index: n }), r.removeAttribute(u)); | ||
r.textContent = L ? L.emptyScript : ""; | ||
for (let $ = 0; $ < _; $++) | ||
r.append(u[$], x()), b.nextNode(), a.push({ type: 2, index: ++n }); | ||
for (let f = 0; f < _; f++) | ||
r.append(u[f], x()), b.nextNode(), a.push({ type: 2, index: ++n }); | ||
r.append(u[_], x()); | ||
@@ -388,13 +388,13 @@ } | ||
static createElement(t, e) { | ||
const s = A.createElement("template"); | ||
return s.innerHTML = t, s; | ||
const i = S.createElement("template"); | ||
return i.innerHTML = t, i; | ||
} | ||
} | ||
function E(i, t, e = i, s) { | ||
function E(s, t, e = s, i) { | ||
var o, c; | ||
if (t === v) | ||
return t; | ||
let r = s !== void 0 ? (o = e._$Co) == null ? void 0 : o[s] : e._$Cl; | ||
let r = i !== void 0 ? (o = e._$Co) == null ? void 0 : o[i] : e._$Cl; | ||
const n = O(t) ? void 0 : t._$litDirective$; | ||
return (r == null ? void 0 : r.constructor) !== n && ((c = r == null ? void 0 : r._$AO) == null || c.call(r, !1), n === void 0 ? r = void 0 : (r = new n(i), r._$AT(i, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = r : e._$Cl = r), r !== void 0 && (t = E(i, r._$AS(i, t.values), r, s)), t; | ||
return (r == null ? void 0 : r.constructor) !== n && ((c = r == null ? void 0 : r._$AO) == null || c.call(r, !1), n === void 0 ? r = void 0 : (r = new n(s), r._$AT(s, e, i)), i !== void 0 ? (e._$Co ?? (e._$Co = []))[i] = r : e._$Cl = r), r !== void 0 && (t = E(s, r._$AS(s, t.values), r, i)), t; | ||
} | ||
@@ -412,18 +412,18 @@ class Et { | ||
u(t) { | ||
const { el: { content: e }, parts: s } = this._$AD, r = ((t == null ? void 0 : t.creationScope) ?? A).importNode(e, !0); | ||
const { el: { content: e }, parts: i } = this._$AD, r = ((t == null ? void 0 : t.creationScope) ?? S).importNode(e, !0); | ||
b.currentNode = r; | ||
let n = b.nextNode(), o = 0, c = 0, a = s[0]; | ||
let n = b.nextNode(), o = 0, c = 0, a = i[0]; | ||
for (; a !== void 0; ) { | ||
if (o === a.index) { | ||
let d; | ||
a.type === 2 ? d = new N(n, n.nextSibling, this, t) : a.type === 1 ? d = new a.ctor(n, a.name, a.strings, this, t) : a.type === 6 && (d = new Ut(n, this, t)), this._$AV.push(d), a = s[++c]; | ||
a.type === 2 ? d = new N(n, n.nextSibling, this, t) : a.type === 1 ? d = new a.ctor(n, a.name, a.strings, this, t) : a.type === 6 && (d = new Ut(n, this, t)), this._$AV.push(d), a = i[++c]; | ||
} | ||
o !== (a == null ? void 0 : a.index) && (n = b.nextNode(), o++); | ||
} | ||
return b.currentNode = A, r; | ||
return b.currentNode = S, r; | ||
} | ||
p(t) { | ||
let e = 0; | ||
for (const s of this._$AV) | ||
s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, e), e += s.strings.length - 2) : s._$AI(t[e])), e++; | ||
for (const i of this._$AV) | ||
i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++; | ||
} | ||
@@ -436,4 +436,4 @@ } | ||
} | ||
constructor(t, e, s, r) { | ||
this.type = 2, this._$AH = y, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = r, this._$Cv = (r == null ? void 0 : r.isConnected) ?? !0; | ||
constructor(t, e, i, r) { | ||
this.type = 2, this._$AH = y, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = r, this._$Cv = (r == null ? void 0 : r.isConnected) ?? !0; | ||
} | ||
@@ -452,3 +452,3 @@ get parentNode() { | ||
_$AI(t, e = this) { | ||
t = E(this, t, e), O(t) ? t === y || t == null || t === "" ? (this._$AH !== y && this._$AR(), this._$AH = y) : t !== this._$AH && t !== v && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : At(t) ? this.k(t) : this._(t); | ||
t = E(this, t, e), O(t) ? t === y || t == null || t === "" ? (this._$AH !== y && this._$AR(), this._$AH = y) : t !== this._$AH && t !== v && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : St(t) ? this.k(t) : this._(t); | ||
} | ||
@@ -462,7 +462,7 @@ S(t) { | ||
_(t) { | ||
this._$AH !== y && O(this._$AH) ? this._$AA.nextSibling.data = t : this.T(A.createTextNode(t)), this._$AH = t; | ||
this._$AH !== y && O(this._$AH) ? this._$AA.nextSibling.data = t : this.T(S.createTextNode(t)), this._$AH = t; | ||
} | ||
$(t) { | ||
var n; | ||
const { values: e, _$litType$: s } = t, r = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = R.createElement(pt(s.h, s.h[0]), this.options)), s); | ||
const { values: e, _$litType$: i } = t, r = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = R.createElement(pt(i.h, i.h[0]), this.options)), i); | ||
if (((n = this._$AH) == null ? void 0 : n._$AD) === r) | ||
@@ -482,10 +482,10 @@ this._$AH.p(e); | ||
const e = this._$AH; | ||
let s, r = 0; | ||
let i, r = 0; | ||
for (const n of t) | ||
r === e.length ? e.push(s = new N(this.S(x()), this.S(x()), this, this.options)) : s = e[r], s._$AI(n), r++; | ||
r < e.length && (this._$AR(s && s._$AB.nextSibling, r), e.length = r); | ||
r === e.length ? e.push(i = new N(this.S(x()), this.S(x()), this, this.options)) : i = e[r], i._$AI(n), r++; | ||
r < e.length && (this._$AR(i && i._$AB.nextSibling, r), e.length = r); | ||
} | ||
_$AR(t = this._$AA.nextSibling, e) { | ||
var s; | ||
for ((s = this._$AP) == null ? void 0 : s.call(this, !1, !0, e); t && t !== this._$AB; ) { | ||
var i; | ||
for ((i = this._$AP) == null ? void 0 : i.call(this, !1, !0, e); t && t !== this._$AB; ) { | ||
const r = t.nextSibling; | ||
@@ -507,6 +507,6 @@ t.remove(), t = r; | ||
} | ||
constructor(t, e, s, r, n) { | ||
this.type = 1, this._$AH = y, this._$AN = void 0, this.element = t, this.name = e, this._$AM = r, this.options = n, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = y; | ||
constructor(t, e, i, r, n) { | ||
this.type = 1, this._$AH = y, this._$AN = void 0, this.element = t, this.name = e, this._$AM = r, this.options = n, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = y; | ||
} | ||
_$AI(t, e = this, s, r) { | ||
_$AI(t, e = this, i, r) { | ||
const n = this.strings; | ||
@@ -520,3 +520,3 @@ let o = !1; | ||
for (t = n[0], a = 0; a < n.length - 1; a++) | ||
d = E(this, c[s + a], e, a), d === v && (d = this._$AH[a]), o || (o = !O(d) || d !== this._$AH[a]), d === y ? t = y : t !== y && (t += (d ?? "") + n[a + 1]), this._$AH[a] = d; | ||
d = E(this, c[i + a], e, a), d === v && (d = this._$AH[a]), o || (o = !O(d) || d !== this._$AH[a]), d === y ? t = y : t !== y && (t += (d ?? "") + n[a + 1]), this._$AH[a] = d; | ||
} | ||
@@ -546,4 +546,4 @@ o && !r && this.j(t); | ||
class Mt extends D { | ||
constructor(t, e, s, r, n) { | ||
super(t, e, s, r, n), this.type = 5; | ||
constructor(t, e, i, r, n) { | ||
super(t, e, i, r, n), this.type = 5; | ||
} | ||
@@ -553,4 +553,4 @@ _$AI(t, e = this) { | ||
return; | ||
const s = this._$AH, r = t === y && s !== y || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, n = t !== y && (s === y || r); | ||
r && this.element.removeEventListener(this.name, this, s), n && this.element.addEventListener(this.name, this, t), this._$AH = t; | ||
const i = this._$AH, r = t === y && i !== y || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, n = t !== y && (i === y || r); | ||
r && this.element.removeEventListener(this.name, this, i), n && this.element.addEventListener(this.name, this, t), this._$AH = t; | ||
} | ||
@@ -563,4 +563,4 @@ handleEvent(t) { | ||
class Ut { | ||
constructor(t, e, s) { | ||
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s; | ||
constructor(t, e, i) { | ||
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i; | ||
} | ||
@@ -576,10 +576,10 @@ get _$AU() { | ||
B == null || B(R, N), (M.litHtmlVersions ?? (M.litHtmlVersions = [])).push("3.1.3"); | ||
const xt = (i, t, e) => { | ||
const s = (e == null ? void 0 : e.renderBefore) ?? t; | ||
let r = s._$litPart$; | ||
const xt = (s, t, e) => { | ||
const i = (e == null ? void 0 : e.renderBefore) ?? t; | ||
let r = i._$litPart$; | ||
if (r === void 0) { | ||
const n = (e == null ? void 0 : e.renderBefore) ?? null; | ||
s._$litPart$ = r = new N(t.insertBefore(x(), n), n, void 0, e ?? {}); | ||
i._$litPart$ = r = new N(t.insertBefore(x(), n), n, void 0, e ?? {}); | ||
} | ||
return r._$AI(i), r; | ||
return r._$AI(s), r; | ||
}; | ||
@@ -591,3 +591,3 @@ /** | ||
*/ | ||
class U extends S { | ||
class U extends A { | ||
constructor() { | ||
@@ -619,4 +619,4 @@ super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0; | ||
U._$litElement$ = !0, U.finalized = !0, (rt = globalThis.litElementHydrateSupport) == null || rt.call(globalThis, { LitElement: U }); | ||
const J = globalThis.litElementPolyfillSupport; | ||
J == null || J({ LitElement: U }); | ||
const q = globalThis.litElementPolyfillSupport; | ||
q == null || q({ LitElement: U }); | ||
(globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.5"); | ||
@@ -628,6 +628,6 @@ /** | ||
*/ | ||
const Ot = (i) => (t, e) => { | ||
const Ot = (s) => (t, e) => { | ||
e !== void 0 ? e.addInitializer(() => { | ||
customElements.define(i, t); | ||
}) : customElements.define(i, t); | ||
customElements.define(s, t); | ||
}) : customElements.define(s, t); | ||
}; | ||
@@ -639,30 +639,30 @@ /** | ||
*/ | ||
const Rt = { attribute: !0, type: String, converter: I, reflect: !1, hasChanged: V }, Nt = (i = Rt, t, e) => { | ||
const { kind: s, metadata: r } = e; | ||
const Rt = { attribute: !0, type: String, converter: I, reflect: !1, hasChanged: F }, Nt = (s = Rt, t, e) => { | ||
const { kind: i, metadata: r } = e; | ||
let n = globalThis.litPropertyMetadata.get(r); | ||
if (n === void 0 && globalThis.litPropertyMetadata.set(r, n = /* @__PURE__ */ new Map()), n.set(e.name, i), s === "accessor") { | ||
if (n === void 0 && globalThis.litPropertyMetadata.set(r, n = /* @__PURE__ */ new Map()), n.set(e.name, s), i === "accessor") { | ||
const { name: o } = e; | ||
return { set(c) { | ||
const a = t.get.call(this); | ||
t.set.call(this, c), this.requestUpdate(o, a, i); | ||
t.set.call(this, c), this.requestUpdate(o, a, s); | ||
}, init(c) { | ||
return c !== void 0 && this.P(o, void 0, i), c; | ||
return c !== void 0 && this.P(o, void 0, s), c; | ||
} }; | ||
} | ||
if (s === "setter") { | ||
if (i === "setter") { | ||
const { name: o } = e; | ||
return function(c) { | ||
const a = this[o]; | ||
t.call(this, c), this.requestUpdate(o, a, i); | ||
t.call(this, c), this.requestUpdate(o, a, s); | ||
}; | ||
} | ||
throw Error("Unsupported decorator location: " + s); | ||
throw Error("Unsupported decorator location: " + i); | ||
}; | ||
function p(i) { | ||
return (t, e) => typeof e == "object" ? Nt(i, t, e) : ((s, r, n) => { | ||
function p(s) { | ||
return (t, e) => typeof e == "object" ? Nt(s, t, e) : ((i, r, n) => { | ||
const o = r.hasOwnProperty(n); | ||
return r.constructor.createProperty(n, o ? { ...s, wrapped: !0 } : s), o ? Object.getOwnPropertyDescriptor(r, n) : void 0; | ||
})(i, t, e); | ||
return r.constructor.createProperty(n, o ? { ...i, wrapped: !0 } : i), o ? Object.getOwnPropertyDescriptor(r, n) : void 0; | ||
})(s, t, e); | ||
} | ||
const Tt = [ | ||
const kt = [ | ||
"allow-partial-match", | ||
@@ -673,2 +673,3 @@ "ar-placement", | ||
"camera-transition-duration", | ||
"disable-retries", | ||
"disable-scroll-wheel", | ||
@@ -682,2 +683,3 @@ "enable-dark-mode", | ||
"list-bullet-style", | ||
"qr-url-pattern", | ||
"rotation", | ||
@@ -701,23 +703,23 @@ "ruler-unit", | ||
"zoom-type" | ||
], kt = (i) => i.replace(/([-_]\w)/g, (t) => t[1].toUpperCase()), Ht = (i) => { | ||
], Tt = (s) => s.replace(/([-_]\w)/g, (t) => t[1].toUpperCase()), Ht = (s) => { | ||
let t = new URLSearchParams(); | ||
return Tt.forEach((e) => { | ||
if (i.hasAttribute(e)) { | ||
let s = i.getAttribute(e); | ||
if (!s) | ||
return kt.forEach((e) => { | ||
if (s.hasAttribute(e)) { | ||
let i = s.getAttribute(e); | ||
if (!i) | ||
return; | ||
s === "yes" && (s = "true"), s === "no" && (s = "false"), t.append(kt(e), s); | ||
i === "yes" && (i = "true"), i === "no" && (i = "false"), t.append(Tt(e), i); | ||
} | ||
}), t; | ||
}; | ||
var It = Object.defineProperty, Lt = Object.getOwnPropertyDescriptor, l = (i, t, e, s) => { | ||
for (var r = s > 1 ? void 0 : s ? Lt(t, e) : t, n = i.length - 1, o; n >= 0; n--) | ||
(o = i[n]) && (r = (s ? o(t, e, r) : o(r)) || r); | ||
return s && r && It(t, e, r), r; | ||
var It = Object.defineProperty, Lt = Object.getOwnPropertyDescriptor, l = (s, t, e, i) => { | ||
for (var r = i > 1 ? void 0 : i ? Lt(t, e) : t, n = s.length - 1, o; n >= 0; n--) | ||
(o = s[n]) && (r = (i ? o(t, e, r) : o(r)) || r); | ||
return i && r && It(t, e, r), r; | ||
}; | ||
const Dt = "{host}{viewer}/by_scene_id/{scene_id}", zt = "{host}{viewer}/by_product_id/{customer_id}/{product_id}", jt = "{host}{viewer}/by_product_id/{customer_id}/{sku}", Bt = "{host}{viewer}/by_hash/{customer_id}/{hash}"; | ||
function k(i, t) { | ||
const Dt = "{host}{viewer}/by_scene_id/{scene_id}", jt = "{host}{viewer}/by_product_id/{customer_id}/{product_id}", zt = "{host}{viewer}/by_product_id/{customer_id}/{sku}", Bt = "{host}{viewer}/by_hash/{customer_id}/{hash}"; | ||
function T(s, t) { | ||
var e = new RegExp(Object.keys(t).join("|"), "gi"); | ||
return i.replace(e, function(s) { | ||
return t[s.toLowerCase()]; | ||
return s.replace(e, function(i) { | ||
return t[i.toLowerCase()]; | ||
}); | ||
@@ -727,10 +729,10 @@ } | ||
constructor() { | ||
super(...arguments), this.customerId = void 0, this.viewer = "realtime", this.host = "https://configurator.v2.londondynamics.com", this.getCurrentSelection = (i) => this._pingpongPostMessage( | ||
super(...arguments), this.customerId = void 0, this.viewer = "realtime", this.host = "https://configurator.v2.londondynamics.com", this.defaultSelection = {}, this.getCurrentSelection = (s) => this._pingpongPostMessage( | ||
{ | ||
type: "currentValues" | ||
}, | ||
i | ||
), this._emit = (i, t) => { | ||
s | ||
), this._emit = (s, t) => { | ||
this.dispatchEvent( | ||
new CustomEvent(i, { | ||
new CustomEvent(s, { | ||
detail: t, | ||
@@ -741,5 +743,5 @@ bubbles: !0, | ||
); | ||
}, this._pingpongPostMessage = (i, t) => new Promise((e, s) => { | ||
}, this._pingpongPostMessage = (s, t) => new Promise((e, i) => { | ||
var c, a; | ||
const r = { ...i, messageId: Date.now() }, n = (d) => { | ||
const r = { ...s, messageId: Date.now() }, n = (d) => { | ||
if (d.origin === this.host && d.data.messageId === r.messageId && d.data.type === r.type) { | ||
@@ -749,3 +751,3 @@ try { | ||
} catch (g) { | ||
g instanceof Error ? t ? t({}, g.message) : s(g.message) : t ? t({}, "Unknown error") : s("Unknown error"); | ||
g instanceof Error ? t ? t({}, g.message) : i(g.message) : t ? t({}, "Unknown error") : i("Unknown error"); | ||
} | ||
@@ -756,28 +758,28 @@ window.removeEventListener("message", n); | ||
o && (window.addEventListener("message", n), (a = o.contentWindow) == null || a.postMessage(r, "*")); | ||
}), this._handleMessage = (i) => { | ||
}), this._handleMessage = (s) => { | ||
var t; | ||
if (i.origin === this.host && (t = i == null ? void 0 : i.data) != null && t.type) | ||
switch (i.data.type) { | ||
if (s.origin === this.host && (t = s == null ? void 0 : s.data) != null && t.type) | ||
switch (s.data.type) { | ||
case "ready": | ||
this._emit("ready", { | ||
options: JSON.parse(i.data.options), | ||
presets: JSON.parse(i.data.presets), | ||
scene: JSON.parse(i.data.scene) | ||
options: JSON.parse(s.data.options), | ||
presets: JSON.parse(s.data.presets), | ||
scene: JSON.parse(s.data.scene) | ||
}); | ||
break; | ||
case "load": | ||
this._emit("load", JSON.parse(i.data.values)); | ||
this._emit("load", JSON.parse(s.data.values)); | ||
break; | ||
case "error": | ||
this._emit("error", JSON.parse(i.data.values)); | ||
this._emit("error", JSON.parse(s.data.values)); | ||
break; | ||
case "change": | ||
this._emit("change", JSON.parse(i.data.values)); | ||
this._emit("change", JSON.parse(s.data.values)); | ||
break; | ||
case "cameraChange": | ||
this._emit("camerachange", JSON.parse(i.data.values)); | ||
this._emit("camerachange", JSON.parse(s.data.values)); | ||
break; | ||
case "log": | ||
const { logType: e, logData: s } = i.data; | ||
this._emit(e, JSON.parse(s)); | ||
const { logType: e, logData: i } = s.data; | ||
this._emit(e, JSON.parse(i)); | ||
break; | ||
@@ -794,3 +796,3 @@ } | ||
*/ | ||
getCurrentConfiguration(i) { | ||
getCurrentConfiguration(s) { | ||
return this._pingpongPostMessage( | ||
@@ -800,3 +802,3 @@ { | ||
}, | ||
i | ||
s | ||
); | ||
@@ -811,3 +813,3 @@ } | ||
*/ | ||
getCurrentScene(i) { | ||
getCurrentScene(s) { | ||
return this._pingpongPostMessage( | ||
@@ -817,3 +819,3 @@ { | ||
}, | ||
i | ||
s | ||
); | ||
@@ -828,3 +830,3 @@ } | ||
*/ | ||
getCurrentHash(i) { | ||
getCurrentHash(s) { | ||
return this._pingpongPostMessage( | ||
@@ -834,3 +836,3 @@ { | ||
}, | ||
i | ||
s | ||
); | ||
@@ -845,3 +847,3 @@ } | ||
*/ | ||
getCurrentSource(i) { | ||
getCurrentSource(s) { | ||
return this._pingpongPostMessage( | ||
@@ -851,3 +853,3 @@ { | ||
}, | ||
i | ||
s | ||
); | ||
@@ -862,3 +864,3 @@ } | ||
*/ | ||
getCurrentARSource(i) { | ||
getCurrentARSource(s) { | ||
return this._pingpongPostMessage( | ||
@@ -868,3 +870,3 @@ { | ||
}, | ||
i | ||
s | ||
); | ||
@@ -879,3 +881,3 @@ } | ||
*/ | ||
getDataURL(i) { | ||
getDataURL(s) { | ||
return this._pingpongPostMessage( | ||
@@ -885,3 +887,3 @@ { | ||
}, | ||
i | ||
s | ||
); | ||
@@ -899,7 +901,7 @@ } | ||
*/ | ||
getFrame(i, t, e) { | ||
getFrame(s, t, e) { | ||
return this._pingpongPostMessage( | ||
{ | ||
type: "getFrame", | ||
index: i, | ||
index: s, | ||
options: t | ||
@@ -917,6 +919,6 @@ }, | ||
*/ | ||
setFeature(i, t) { | ||
setFeature(s, t) { | ||
this._postMessage({ | ||
type: "setFeature", | ||
featureId: i, | ||
featureId: s, | ||
variantId: t, | ||
@@ -933,6 +935,6 @@ allowPartialMatch: this.allowPartialMatch | ||
*/ | ||
setSelection(i, t) { | ||
setSelection(s, t) { | ||
this._postMessage({ | ||
type: "setSelection", | ||
selection: i, | ||
selection: s, | ||
resetBeforeUpdate: t, | ||
@@ -943,10 +945,10 @@ allowPartialMatch: this.allowPartialMatch | ||
/** | ||
* Selects preset by id | ||
* @param {string} presetId | ||
* Selects context by id | ||
* @param {string} contextId | ||
* @returns {void} | ||
*/ | ||
setPreset(i) { | ||
setContext(s) { | ||
this._postMessage({ | ||
type: "setPreset", | ||
presetId: i | ||
presetId: s | ||
}); | ||
@@ -972,6 +974,6 @@ } | ||
*/ | ||
toggleLights(i) { | ||
toggleLights(s) { | ||
this._postMessage({ | ||
type: "toggleLights", | ||
value: i | ||
value: s | ||
}); | ||
@@ -986,6 +988,6 @@ } | ||
*/ | ||
toggleGroup(i) { | ||
toggleGroup(s) { | ||
this._postMessage({ | ||
type: "toggleGroup", | ||
value: i | ||
value: s | ||
}); | ||
@@ -1000,6 +1002,6 @@ } | ||
*/ | ||
toggleHotspot(i) { | ||
toggleHotspot(s) { | ||
this._postMessage({ | ||
type: "toggleGroup", | ||
groupId: i | ||
groupId: s | ||
}); | ||
@@ -1015,6 +1017,6 @@ } | ||
*/ | ||
setRotation(i = [0, 0, 0], t = "deg") { | ||
setRotation(s = [0, 0, 0], t = "deg") { | ||
this._postMessage({ | ||
type: "setRotation", | ||
rotation: i, | ||
rotation: s, | ||
angularUnit: t | ||
@@ -1030,16 +1032,28 @@ }); | ||
*/ | ||
setCamera(i = {}, t = {}) { | ||
setCamera(s = {}, t = {}) { | ||
this._postMessage({ | ||
type: "setCamera", | ||
...i, | ||
...s, | ||
...t | ||
}); | ||
} | ||
_postMessage(i) { | ||
var e, s; | ||
_postMessage(s) { | ||
var e, i; | ||
const t = (e = this.shadowRoot) == null ? void 0 : e.querySelector("iframe"); | ||
t && ((s = t.contentWindow) == null || s.postMessage(i, "*")); | ||
t && ((i = t.contentWindow) == null || i.postMessage(s, "*")); | ||
} | ||
connectedCallback() { | ||
super.connectedCallback(), window.addEventListener("message", this._handleMessage); | ||
super.connectedCallback(); | ||
const s = this.querySelector('script[type="application/json"]'); | ||
if (s && s.textContent) | ||
try { | ||
this.defaultSelection = JSON.parse(s.textContent); | ||
} catch (t) { | ||
typeof t == "object" && t instanceof Error ? console.warn( | ||
`Error parsing selection: ${t.message}. Using default selection instead.` | ||
) : console.warn( | ||
"Error parsing selection. Using default selection instead." | ||
); | ||
} | ||
window.addEventListener("message", this._handleMessage); | ||
} | ||
@@ -1050,4 +1064,4 @@ disconnectedCallback() { | ||
render() { | ||
let i = null, t = null; | ||
return this.host ? this.customerId ? this.hash ? t = k(Bt, { | ||
let s = null, t = null; | ||
if (console.log("this.defaultSelection?", this.defaultSelection), this.host ? this.customerId ? this.hash ? t = T(Bt, { | ||
"{viewer}": "", | ||
@@ -1057,3 +1071,3 @@ "{host}": this.host, | ||
"{hash}": this.hash | ||
}) : this.sceneId ? t = k(Dt, { | ||
}) : this.sceneId ? t = T(Dt, { | ||
"{viewer}": this.viewer === "360" ? "/360" : "", | ||
@@ -1063,3 +1077,3 @@ "{host}": this.host, | ||
"{scene_id}": this.sceneId | ||
}) : this.sku ? t = k(jt, { | ||
}) : this.sku ? t = T(zt, { | ||
"{viewer}": this.viewer === "360" ? "/360" : "", | ||
@@ -1069,3 +1083,3 @@ "{host}": this.host, | ||
"{sku}": this.sku | ||
}) : this.productId ? t = k(zt, { | ||
}) : this.productId ? t = T(jt, { | ||
"{viewer}": this.viewer === "360" ? "/360" : "", | ||
@@ -1075,3 +1089,6 @@ "{host}": this.host, | ||
"{product_id}": this.productId | ||
}) : i = "Missing property: sku, scene-id, or hash" : i = "Missing property: customer-id" : i = "Missing property: host", i ? st`<div>${i}</div>` : (this.hasAttributes() && (t += "?" + Ht(this)), st`<iframe | ||
}) : s = "Missing property: sku, scene-id, or hash" : s = "Missing property: customer-id" : s = "Missing property: host", s) | ||
return st`<div>${s}</div>`; | ||
let e = ""; | ||
return this.hasAttributes() && (e += Ht(this)), Object.keys(this.defaultSelection).length > 0 && (e += new URLSearchParams(this.defaultSelection).toString()), e.length && (t += "?" + e), st`<iframe | ||
src="${t}" | ||
@@ -1090,3 +1107,3 @@ width="100%" | ||
Unfortunately, your browser does not support iFrames. | ||
</iframe>`); | ||
</iframe>`; | ||
} | ||
@@ -1132,4 +1149,4 @@ }; | ||
l([ | ||
p({ type: String, attribute: "enable-darkmode" }) | ||
], h.prototype, "enableDarkMode", 2); | ||
p({ type: String, attribute: "disable-retries" }) | ||
], h.prototype, "disableRetries", 2); | ||
l([ | ||
@@ -1139,2 +1156,5 @@ p({ type: String, attribute: "disable-scroll-wheel" }) | ||
l([ | ||
p({ type: String, attribute: "enable-darkmode" }) | ||
], h.prototype, "enableDarkMode", 2); | ||
l([ | ||
p({ type: String, attribute: "interaction-prompt-style" }) | ||
@@ -1146,2 +1166,5 @@ ], h.prototype, "interactionPromptStyle", 2); | ||
l([ | ||
p({ type: String, attribute: "qr-url-pattern" }) | ||
], h.prototype, "qrUrlPattern", 2); | ||
l([ | ||
p({ type: String, attribute: "rotation" }) | ||
@@ -1148,0 +1171,0 @@ ], h.prototype, "rotation", 2); |
{ | ||
"name": "@londondynamics/pericles-webcomponent", | ||
"license": "MIT", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"type": "module", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
83870
1493