xactsize-webcomponents 1.0.45 → 1.0.47
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/{body-measurer-1cpY5UlE.mjs → body-measurer-Bd8qnuTn.mjs} +145 -89
- package/dist/body-measurer.d.ts +3 -0
- package/dist/body-measurer.es.js +1 -1
- package/dist/body-measurer.umd.js +49 -36
- package/dist/{es-MX-DJ2nEJ2L.mjs → es-MX-C6PnLIYM.mjs} +1 -1
- package/dist/{pt-BR-CXZ-7FaF.mjs → pt-BR-0sbJDgsT.mjs} +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const Kt = (i, t, e) => {
|
|
2
2
|
const s = i[t];
|
|
3
3
|
return s ? typeof s == "function" ? s() : Promise.resolve(s) : new Promise((o, n) => {
|
|
4
4
|
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
|
|
@@ -17,7 +17,7 @@ const Yt = (i, t, e) => {
|
|
|
17
17
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
18
18
|
*/
|
|
19
19
|
const X = globalThis, yt = X.ShadowRoot && (X.ShadyCSS === void 0 || X.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, _t = Symbol(), bt = /* @__PURE__ */ new WeakMap();
|
|
20
|
-
let
|
|
20
|
+
let Pt = class {
|
|
21
21
|
constructor(t, e, s) {
|
|
22
22
|
if (this._$cssResult$ = !0, s !== _t) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
23
23
|
this.cssText = t, this.t = e;
|
|
@@ -35,13 +35,13 @@ let Ut = class {
|
|
|
35
35
|
return this.cssText;
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
|
-
const
|
|
38
|
+
const Yt = (i) => new Pt(typeof i == "string" ? i : i + "", void 0, _t), P = (i, ...t) => {
|
|
39
39
|
const e = i.length === 1 ? i[0] : t.reduce((s, o, n) => s + ((r) => {
|
|
40
40
|
if (r._$cssResult$ === !0) return r.cssText;
|
|
41
41
|
if (typeof r == "number") return r;
|
|
42
42
|
throw Error("Value passed to 'css' function must be a 'css' function result: " + r + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
43
43
|
})(o) + i[n + 1], i[0]);
|
|
44
|
-
return new
|
|
44
|
+
return new Pt(e, i, _t);
|
|
45
45
|
}, Qt = (i, t) => {
|
|
46
46
|
if (yt) i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
47
47
|
else for (const e of t) {
|
|
@@ -51,14 +51,14 @@ const Kt = (i) => new Ut(typeof i == "string" ? i : i + "", void 0, _t), U = (i,
|
|
|
51
51
|
}, wt = yt ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => {
|
|
52
52
|
let e = "";
|
|
53
53
|
for (const s of t.cssRules) e += s.cssText;
|
|
54
|
-
return
|
|
54
|
+
return Yt(e);
|
|
55
55
|
})(i) : i;
|
|
56
56
|
/**
|
|
57
57
|
* @license
|
|
58
58
|
* Copyright 2017 Google LLC
|
|
59
59
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
60
60
|
*/
|
|
61
|
-
const { is: Xt, defineProperty: Jt, getOwnPropertyDescriptor: te, getOwnPropertyNames: ee, getOwnPropertySymbols: ie, getPrototypeOf: se } = Object, $ = globalThis, Et = $.trustedTypes, oe = Et ? Et.emptyScript : "", rt = $.reactiveElementPolyfillSupport,
|
|
61
|
+
const { is: Xt, defineProperty: Jt, getOwnPropertyDescriptor: te, getOwnPropertyNames: ee, getOwnPropertySymbols: ie, getPrototypeOf: se } = Object, $ = globalThis, Et = $.trustedTypes, oe = Et ? Et.emptyScript : "", rt = $.reactiveElementPolyfillSupport, N = (i, t) => i, J = { toAttribute(i, t) {
|
|
62
62
|
switch (t) {
|
|
63
63
|
case Boolean:
|
|
64
64
|
i = i ? oe : null;
|
|
@@ -116,13 +116,13 @@ let I = class extends HTMLElement {
|
|
|
116
116
|
return this.elementProperties.get(t) ?? At;
|
|
117
117
|
}
|
|
118
118
|
static _$Ei() {
|
|
119
|
-
if (this.hasOwnProperty(
|
|
119
|
+
if (this.hasOwnProperty(N("elementProperties"))) return;
|
|
120
120
|
const t = se(this);
|
|
121
121
|
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
122
122
|
}
|
|
123
123
|
static finalize() {
|
|
124
|
-
if (this.hasOwnProperty(
|
|
125
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
|
124
|
+
if (this.hasOwnProperty(N("finalized"))) return;
|
|
125
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(N("properties"))) {
|
|
126
126
|
const e = this.properties, s = [...ee(e), ...ie(e)];
|
|
127
127
|
for (const o of s) this.createProperty(o, e[o]);
|
|
128
128
|
}
|
|
@@ -289,16 +289,16 @@ let I = class extends HTMLElement {
|
|
|
289
289
|
firstUpdated(t) {
|
|
290
290
|
}
|
|
291
291
|
};
|
|
292
|
-
I.elementStyles = [], I.shadowRootOptions = { mode: "open" }, I[
|
|
292
|
+
I.elementStyles = [], I.shadowRootOptions = { mode: "open" }, I[N("elementProperties")] = /* @__PURE__ */ new Map(), I[N("finalized")] = /* @__PURE__ */ new Map(), rt == null || rt({ ReactiveElement: I }), ($.reactiveElementVersions ?? ($.reactiveElementVersions = [])).push("2.1.0");
|
|
293
293
|
/**
|
|
294
294
|
* @license
|
|
295
295
|
* Copyright 2017 Google LLC
|
|
296
296
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
297
297
|
*/
|
|
298
|
-
const
|
|
299
|
-
\f\r]`, F = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, St = /-->/g,
|
|
300
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
301
|
-
function
|
|
298
|
+
const z = globalThis, tt = z.trustedTypes, $t = tt ? tt.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, Vt = "$lit$", A = `lit$${Math.random().toFixed(9).slice(2)}$`, Ft = "?" + A, ne = `<${Ft}>`, R = document, B = () => R.createComment(""), Z = (i) => i === null || typeof i != "object" && typeof i != "function", Ct = Array.isArray, re = (i) => Ct(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", at = `[
|
|
299
|
+
\f\r]`, F = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, St = /-->/g, Mt = />/g, S = RegExp(`>|${at}(?:([^\\s"'>=/]+)(${at}*=${at}*(?:[^
|
|
300
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Lt = /'/g, kt = /"/g, Nt = /^(?:script|style|textarea|title)$/i, ae = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), g = ae(1), T = Symbol.for("lit-noChange"), y = Symbol.for("lit-nothing"), Rt = /* @__PURE__ */ new WeakMap(), L = R.createTreeWalker(R, 129);
|
|
301
|
+
function zt(i, t) {
|
|
302
302
|
if (!Ct(i) || !i.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
303
303
|
return $t !== void 0 ? $t.createHTML(t) : t;
|
|
304
304
|
}
|
|
@@ -308,11 +308,11 @@ const le = (i, t) => {
|
|
|
308
308
|
for (let l = 0; l < e; l++) {
|
|
309
309
|
const h = i[l];
|
|
310
310
|
let u, f, m = -1, b = 0;
|
|
311
|
-
for (; b < h.length && (r.lastIndex = b, f = r.exec(h), f !== null); ) b = r.lastIndex, r === F ? f[1] === "!--" ? r = St : f[1] !== void 0 ? r =
|
|
311
|
+
for (; b < h.length && (r.lastIndex = b, f = r.exec(h), f !== null); ) b = r.lastIndex, r === F ? f[1] === "!--" ? r = St : f[1] !== void 0 ? r = Mt : f[2] !== void 0 ? (Nt.test(f[2]) && (o = RegExp("</" + f[2], "g")), r = S) : f[3] !== void 0 && (r = S) : r === S ? f[0] === ">" ? (r = o ?? F, m = -1) : f[1] === void 0 ? m = -2 : (m = r.lastIndex - f[2].length, u = f[1], r = f[3] === void 0 ? S : f[3] === '"' ? kt : Lt) : r === kt || r === Lt ? r = S : r === St || r === Mt ? r = F : (r = S, o = void 0);
|
|
312
312
|
const E = r === S && i[l + 1].startsWith("/>") ? " " : "";
|
|
313
313
|
n += r === F ? h + ne : m >= 0 ? (s.push(u), h.slice(0, m) + Vt + h.slice(m) + A + E) : h + A + (m === -2 ? l : E);
|
|
314
314
|
}
|
|
315
|
-
return [
|
|
315
|
+
return [zt(i, n + (i[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
|
|
316
316
|
};
|
|
317
317
|
class j {
|
|
318
318
|
constructor({ strings: t, _$litType$: e }, s) {
|
|
@@ -320,21 +320,21 @@ class j {
|
|
|
320
320
|
this.parts = [];
|
|
321
321
|
let n = 0, r = 0;
|
|
322
322
|
const l = t.length - 1, h = this.parts, [u, f] = le(t, e);
|
|
323
|
-
if (this.el = j.createElement(u, s),
|
|
323
|
+
if (this.el = j.createElement(u, s), L.currentNode = this.el.content, e === 2 || e === 3) {
|
|
324
324
|
const m = this.el.content.firstChild;
|
|
325
325
|
m.replaceWith(...m.childNodes);
|
|
326
326
|
}
|
|
327
|
-
for (; (o =
|
|
327
|
+
for (; (o = L.nextNode()) !== null && h.length < l; ) {
|
|
328
328
|
if (o.nodeType === 1) {
|
|
329
329
|
if (o.hasAttributes()) for (const m of o.getAttributeNames()) if (m.endsWith(Vt)) {
|
|
330
|
-
const b = f[r++], E = o.getAttribute(m).split(A),
|
|
331
|
-
h.push({ type: 1, index: n, name:
|
|
330
|
+
const b = f[r++], E = o.getAttribute(m).split(A), Y = /([.?@])?(.*)/.exec(b);
|
|
331
|
+
h.push({ type: 1, index: n, name: Y[2], strings: E, ctor: Y[1] === "." ? ce : Y[1] === "?" ? de : Y[1] === "@" ? pe : ot }), o.removeAttribute(m);
|
|
332
332
|
} else m.startsWith(A) && (h.push({ type: 6, index: n }), o.removeAttribute(m));
|
|
333
|
-
if (
|
|
333
|
+
if (Nt.test(o.tagName)) {
|
|
334
334
|
const m = o.textContent.split(A), b = m.length - 1;
|
|
335
335
|
if (b > 0) {
|
|
336
336
|
o.textContent = tt ? tt.emptyScript : "";
|
|
337
|
-
for (let E = 0; E < b; E++) o.append(m[E], B()),
|
|
337
|
+
for (let E = 0; E < b; E++) o.append(m[E], B()), L.nextNode(), h.push({ type: 2, index: ++n });
|
|
338
338
|
o.append(m[b], B());
|
|
339
339
|
}
|
|
340
340
|
}
|
|
@@ -370,16 +370,16 @@ class he {
|
|
|
370
370
|
}
|
|
371
371
|
u(t) {
|
|
372
372
|
const { el: { content: e }, parts: s } = this._$AD, o = ((t == null ? void 0 : t.creationScope) ?? R).importNode(e, !0);
|
|
373
|
-
|
|
374
|
-
let n =
|
|
373
|
+
L.currentNode = o;
|
|
374
|
+
let n = L.nextNode(), r = 0, l = 0, h = s[0];
|
|
375
375
|
for (; h !== void 0; ) {
|
|
376
376
|
if (r === h.index) {
|
|
377
377
|
let u;
|
|
378
378
|
h.type === 2 ? u = new W(n, n.nextSibling, this, t) : h.type === 1 ? u = new h.ctor(n, h.name, h.strings, this, t) : h.type === 6 && (u = new ue(n, this, t)), this._$AV.push(u), h = s[++l];
|
|
379
379
|
}
|
|
380
|
-
r !== (h == null ? void 0 : h.index) && (n =
|
|
380
|
+
r !== (h == null ? void 0 : h.index) && (n = L.nextNode(), r++);
|
|
381
381
|
}
|
|
382
|
-
return
|
|
382
|
+
return L.currentNode = R, o;
|
|
383
383
|
}
|
|
384
384
|
p(t) {
|
|
385
385
|
let e = 0;
|
|
@@ -419,7 +419,7 @@ class W {
|
|
|
419
419
|
}
|
|
420
420
|
$(t) {
|
|
421
421
|
var n;
|
|
422
|
-
const { values: e, _$litType$: s } = t, o = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = j.createElement(
|
|
422
|
+
const { values: e, _$litType$: s } = t, o = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = j.createElement(zt(s.h, s.h[0]), this.options)), s);
|
|
423
423
|
if (((n = this._$AH) == null ? void 0 : n._$AD) === o) this._$AH.p(e);
|
|
424
424
|
else {
|
|
425
425
|
const r = new he(o, this), l = r.u(this.options);
|
|
@@ -515,8 +515,8 @@ class ue {
|
|
|
515
515
|
H(this, t);
|
|
516
516
|
}
|
|
517
517
|
}
|
|
518
|
-
const lt =
|
|
519
|
-
lt == null || lt(j, W), (
|
|
518
|
+
const lt = z.litHtmlPolyfillSupport;
|
|
519
|
+
lt == null || lt(j, W), (z.litHtmlVersions ?? (z.litHtmlVersions = [])).push("3.3.0");
|
|
520
520
|
const fe = (i, t, e) => {
|
|
521
521
|
const s = (e == null ? void 0 : e.renderBefore) ?? t;
|
|
522
522
|
let o = s._$litPart$;
|
|
@@ -557,8 +557,8 @@ let C = class extends I {
|
|
|
557
557
|
return T;
|
|
558
558
|
}
|
|
559
559
|
};
|
|
560
|
-
var
|
|
561
|
-
C._$litElement$ = !0, C.finalized = !0, (
|
|
560
|
+
var Ut;
|
|
561
|
+
C._$litElement$ = !0, C.finalized = !0, (Ut = k.litElementHydrateSupport) == null || Ut.call(k, { LitElement: C });
|
|
562
562
|
const ht = k.litElementPolyfillSupport;
|
|
563
563
|
ht == null || ht({ LitElement: C });
|
|
564
564
|
(k.litElementVersions ?? (k.litElementVersions = [])).push("4.2.0");
|
|
@@ -708,7 +708,7 @@ function Ee(i) {
|
|
|
708
708
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
709
709
|
*/
|
|
710
710
|
const Ae = "", $e = "h", Se = "s";
|
|
711
|
-
function
|
|
711
|
+
function Me(i, t) {
|
|
712
712
|
return (t ? $e : Se) + Ee(typeof i == "string" ? i : i.join(Ae));
|
|
713
713
|
}
|
|
714
714
|
/**
|
|
@@ -717,7 +717,7 @@ function Le(i, t) {
|
|
|
717
717
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
718
718
|
*/
|
|
719
719
|
const Ot = /* @__PURE__ */ new WeakMap(), It = /* @__PURE__ */ new Map();
|
|
720
|
-
function
|
|
720
|
+
function Le(i, t, e) {
|
|
721
721
|
if (i) {
|
|
722
722
|
const s = (e == null ? void 0 : e.id) ?? ke(t), o = i[s];
|
|
723
723
|
if (o) {
|
|
@@ -745,7 +745,7 @@ function Me(i, t, e) {
|
|
|
745
745
|
function ke(i) {
|
|
746
746
|
const t = typeof i == "string" ? i : i.strings;
|
|
747
747
|
let e = It.get(t);
|
|
748
|
-
return e === void 0 && (e =
|
|
748
|
+
return e === void 0 && (e = Me(t, typeof i != "string" && !("strTag" in i)), It.set(t, e)), e;
|
|
749
749
|
}
|
|
750
750
|
/**
|
|
751
751
|
* @license
|
|
@@ -755,32 +755,32 @@ function ke(i) {
|
|
|
755
755
|
function ct(i) {
|
|
756
756
|
window.dispatchEvent(new CustomEvent(pt, { detail: i }));
|
|
757
757
|
}
|
|
758
|
-
let et = "", dt, Gt, it, ut, Wt,
|
|
759
|
-
|
|
758
|
+
let et = "", dt, Gt, it, ut, Wt, M = new jt();
|
|
759
|
+
M.resolve();
|
|
760
760
|
let Q = 0;
|
|
761
|
-
const Re = (i) => (Ce((t, e) =>
|
|
761
|
+
const Re = (i) => (Ce((t, e) => Le(Wt, t, e)), et = Gt = i.sourceLocale, it = new Set(i.targetLocales), it.add(i.sourceLocale), ut = i.loadLocale, { getLocale: Te, setLocale: Oe }), Te = () => et, Oe = (i) => {
|
|
762
762
|
if (i === (dt ?? et))
|
|
763
|
-
return
|
|
763
|
+
return M.promise;
|
|
764
764
|
if (!it || !ut)
|
|
765
765
|
throw new Error("Internal error");
|
|
766
766
|
if (!it.has(i))
|
|
767
767
|
throw new Error("Invalid locale code");
|
|
768
768
|
Q++;
|
|
769
769
|
const t = Q;
|
|
770
|
-
return dt = i,
|
|
770
|
+
return dt = i, M.settled && (M = new jt()), ct({ status: "loading", loadingLocale: i }), (i === Gt ? (
|
|
771
771
|
// We could switch to the source locale synchronously, but we prefer to
|
|
772
772
|
// queue it on a microtask so that switching locales is consistently
|
|
773
773
|
// asynchronous.
|
|
774
774
|
Promise.resolve({ templates: void 0 })
|
|
775
775
|
) : ut(i)).then((s) => {
|
|
776
|
-
Q === t && (et = i, dt = void 0, Wt = s.templates, ct({ status: "ready", readyLocale: i }),
|
|
776
|
+
Q === t && (et = i, dt = void 0, Wt = s.templates, ct({ status: "ready", readyLocale: i }), M.resolve());
|
|
777
777
|
}, (s) => {
|
|
778
778
|
Q === t && (ct({
|
|
779
779
|
status: "error",
|
|
780
780
|
errorLocale: i,
|
|
781
781
|
errorMessage: s.toString()
|
|
782
|
-
}),
|
|
783
|
-
}),
|
|
782
|
+
}), M.reject(s));
|
|
783
|
+
}), M.promise;
|
|
784
784
|
}, qt = "en", Ie = [
|
|
785
785
|
"es-MX",
|
|
786
786
|
"pt-BR"
|
|
@@ -791,7 +791,7 @@ const Re = (i) => (Ce((t, e) => Me(Wt, t, e)), et = Gt = i.sourceLocale, it = ne
|
|
|
791
791
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
792
792
|
*/
|
|
793
793
|
const De = { ATTRIBUTE: 1 }, He = (i) => (...t) => ({ _$litDirective$: i, values: t });
|
|
794
|
-
class
|
|
794
|
+
class Ue {
|
|
795
795
|
constructor(t) {
|
|
796
796
|
}
|
|
797
797
|
get _$AU() {
|
|
@@ -812,7 +812,7 @@ class Pe {
|
|
|
812
812
|
* Copyright 2018 Google LLC
|
|
813
813
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
814
814
|
*/
|
|
815
|
-
const
|
|
815
|
+
const Pe = He(class extends Ue {
|
|
816
816
|
constructor(i) {
|
|
817
817
|
var t;
|
|
818
818
|
if (super(i), i.type !== De.ATTRIBUTE || i.name !== "class" || ((t = i.strings) == null ? void 0 : t.length) > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
|
|
@@ -836,7 +836,7 @@ const Ue = He(class extends Pe {
|
|
|
836
836
|
return T;
|
|
837
837
|
}
|
|
838
838
|
});
|
|
839
|
-
var Ve = Object.defineProperty, Fe = Object.getOwnPropertyDescriptor,
|
|
839
|
+
var Ve = Object.defineProperty, Fe = Object.getOwnPropertyDescriptor, K = (i, t, e, s) => {
|
|
840
840
|
for (var o = s > 1 ? void 0 : s ? Fe(t, e) : t, n = i.length - 1, r; n >= 0; n--)
|
|
841
841
|
(r = i[n]) && (o = (s ? r(t, e, o) : r(o)) || o);
|
|
842
842
|
return s && o && Ve(t, e, o), o;
|
|
@@ -860,7 +860,7 @@ let O = class extends C {
|
|
|
860
860
|
`;
|
|
861
861
|
}
|
|
862
862
|
};
|
|
863
|
-
O.styles =
|
|
863
|
+
O.styles = P`
|
|
864
864
|
:host {
|
|
865
865
|
display: block;
|
|
866
866
|
width: 100%;
|
|
@@ -941,27 +941,27 @@ O.styles = U`
|
|
|
941
941
|
}
|
|
942
942
|
}
|
|
943
943
|
`;
|
|
944
|
-
|
|
944
|
+
K([
|
|
945
945
|
d({ type: String })
|
|
946
946
|
], O.prototype, "type", 2);
|
|
947
|
-
|
|
947
|
+
K([
|
|
948
948
|
d({ type: String })
|
|
949
949
|
], O.prototype, "label", 2);
|
|
950
|
-
|
|
950
|
+
K([
|
|
951
951
|
d({ type: Boolean })
|
|
952
952
|
], O.prototype, "disabled", 2);
|
|
953
|
-
|
|
953
|
+
K([
|
|
954
954
|
d({ type: String })
|
|
955
955
|
], O.prototype, "variant", 2);
|
|
956
|
-
O =
|
|
956
|
+
O = K([
|
|
957
957
|
V("xact-button")
|
|
958
958
|
], O);
|
|
959
|
-
var
|
|
960
|
-
for (var o = s > 1 ? void 0 : s ?
|
|
959
|
+
var Ne = Object.defineProperty, ze = Object.getOwnPropertyDescriptor, nt = (i, t, e, s) => {
|
|
960
|
+
for (var o = s > 1 ? void 0 : s ? ze(t, e) : t, n = i.length - 1, r; n >= 0; n--)
|
|
961
961
|
(r = i[n]) && (o = (s ? r(t, e, o) : r(o)) || o);
|
|
962
|
-
return s && o &&
|
|
962
|
+
return s && o && Ne(t, e, o), o;
|
|
963
963
|
};
|
|
964
|
-
let
|
|
964
|
+
let U = class extends C {
|
|
965
965
|
constructor() {
|
|
966
966
|
super(...arguments), this.height = 0, this.brandName = "", this.handleStart = () => {
|
|
967
967
|
var t;
|
|
@@ -1033,7 +1033,7 @@ let P = class extends C {
|
|
|
1033
1033
|
`;
|
|
1034
1034
|
}
|
|
1035
1035
|
};
|
|
1036
|
-
|
|
1036
|
+
U.styles = P`
|
|
1037
1037
|
:host {
|
|
1038
1038
|
display: block;
|
|
1039
1039
|
font-family: 'Inter', 'Helvetica', Arial, sans-serif;
|
|
@@ -1211,17 +1211,17 @@ P.styles = U`
|
|
|
1211
1211
|
`;
|
|
1212
1212
|
nt([
|
|
1213
1213
|
d({ type: Number })
|
|
1214
|
-
],
|
|
1214
|
+
], U.prototype, "height", 2);
|
|
1215
1215
|
nt([
|
|
1216
1216
|
d({ type: String })
|
|
1217
|
-
],
|
|
1217
|
+
], U.prototype, "brandName", 2);
|
|
1218
1218
|
nt([
|
|
1219
1219
|
d({ type: Function })
|
|
1220
|
-
],
|
|
1221
|
-
|
|
1220
|
+
], U.prototype, "onStartMeasurement", 2);
|
|
1221
|
+
U = nt([
|
|
1222
1222
|
V("xact-step-one"),
|
|
1223
1223
|
q()
|
|
1224
|
-
],
|
|
1224
|
+
], U);
|
|
1225
1225
|
var Be = Object.getOwnPropertyDescriptor, Ze = (i, t, e, s) => {
|
|
1226
1226
|
for (var o = s > 1 ? void 0 : s ? Be(t, e) : t, n = i.length - 1, r; n >= 0; n--)
|
|
1227
1227
|
(r = i[n]) && (o = r(o) || o);
|
|
@@ -1275,7 +1275,7 @@ let ft = class extends C {
|
|
|
1275
1275
|
`;
|
|
1276
1276
|
}
|
|
1277
1277
|
};
|
|
1278
|
-
ft.styles =
|
|
1278
|
+
ft.styles = P`
|
|
1279
1279
|
.modal-footer {
|
|
1280
1280
|
text-align: center;
|
|
1281
1281
|
font-size: 12px;
|
|
@@ -1444,7 +1444,7 @@ let x = class extends C {
|
|
|
1444
1444
|
`;
|
|
1445
1445
|
}
|
|
1446
1446
|
};
|
|
1447
|
-
x.styles =
|
|
1447
|
+
x.styles = P`
|
|
1448
1448
|
:host {
|
|
1449
1449
|
display: flex;
|
|
1450
1450
|
flex-direction: column;
|
|
@@ -1722,7 +1722,7 @@ let G = class extends C {
|
|
|
1722
1722
|
`;
|
|
1723
1723
|
}
|
|
1724
1724
|
};
|
|
1725
|
-
G.styles =
|
|
1725
|
+
G.styles = P`
|
|
1726
1726
|
:host {
|
|
1727
1727
|
display: flex;
|
|
1728
1728
|
justify-content: center;
|
|
@@ -1924,7 +1924,7 @@ G = vt([
|
|
|
1924
1924
|
V("xact-step-informs"),
|
|
1925
1925
|
q()
|
|
1926
1926
|
], G);
|
|
1927
|
-
const Dt = "data:image/svg+xml,%3csvg%20width='22'%20height='40'%20viewBox='0%200%2022%2040'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M21.517%200L0%2013.3362V0H21.517Z'%20fill='white'/%3e%3cpath%20d='M21.517%2013.339L0%2026.6724V13.3362H21.517V13.339Z'%20fill='white'/%3e%3cpath%20d='M21.517%2026.6755L0%2040.0089V26.6726H21.517V26.6755Z'%20fill='%231C28BA'/%3e%3c/svg%3e",
|
|
1927
|
+
const Dt = "data:image/svg+xml,%3csvg%20width='22'%20height='40'%20viewBox='0%200%2022%2040'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M21.517%200L0%2013.3362V0H21.517Z'%20fill='white'/%3e%3cpath%20d='M21.517%2013.339L0%2026.6724V13.3362H21.517V13.339Z'%20fill='white'/%3e%3cpath%20d='M21.517%2026.6755L0%2040.0089V26.6726H21.517V26.6755Z'%20fill='%231C28BA'/%3e%3c/svg%3e", Ke = "data:image/svg+xml,%3csvg%20width='22'%20height='41'%20viewBox='0%200%2022%2041'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M21.517%200.00878906L0%2013.345V0.00878906H21.517Z'%20fill='white'/%3e%3cpath%20d='M21.517%2013.3478L0%2026.6812V13.345H21.517V13.3478Z'%20fill='%231C28BA'/%3e%3cpath%20d='M21.517%2026.6843L0%2040.0176V26.6814H21.517V26.6843Z'%20fill='white'/%3e%3c/svg%3e", Ye = "data:image/svg+xml,%3csvg%20width='22'%20height='41'%20viewBox='0%200%2022%2041'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M21.517%200.0204381L0%2013.3538V0.0175781H21.517V0.0204381Z'%20fill='%231C28BA'/%3e%3cpath%20d='M21.517%2013.3538L0%2026.69V13.3538H21.517Z'%20fill='white'/%3e%3cpath%20d='M21.517%2026.693L0%2040.0264V26.6902H21.517V26.693Z'%20fill='white'/%3e%3c/svg%3e", D = class D {
|
|
1928
1928
|
constructor() {
|
|
1929
1929
|
this.audioContext = null, this.playbackCtx = null, this.stream = null, this.processor = null, this.source = null, this.audioPlaybackQueue = [], this.isPlaying = !1, this.isUserSpeaking = !1, this.speechTimeout = null;
|
|
1930
1930
|
}
|
|
@@ -2111,19 +2111,19 @@ var Qe = Object.defineProperty, Xe = Object.getOwnPropertyDescriptor, p = (i, t,
|
|
|
2111
2111
|
const { getLocale: ii, setLocale: Ht } = Re({
|
|
2112
2112
|
sourceLocale: qt,
|
|
2113
2113
|
targetLocales: Ie,
|
|
2114
|
-
loadLocale: (i) =>
|
|
2114
|
+
loadLocale: (i) => Kt(/* @__PURE__ */ Object.assign({ "./generated/locales/es-MX.ts": () => import("./es-MX-C6PnLIYM.mjs"), "./generated/locales/pt-BR.ts": () => import("./pt-BR-0sbJDgsT.mjs") }), `./generated/locales/${i}.ts`, 4)
|
|
2115
2115
|
});
|
|
2116
2116
|
let c = class extends C {
|
|
2117
2117
|
constructor() {
|
|
2118
2118
|
super(...arguments), this.spinnerFrame = 0, this.apiKey = "", this.tenantId = "1", this.productSku = "123456", this.baseUrl = "https://xactsize-dotnet-api-923169850574.southamerica-east1.run.app", this.apiUrl = this.baseUrl + "/api/measurer/measure/body", this.vtonUrl = this.baseUrl + "/api/VirtualTryOn/generate", this.garmentUrl = "", this.vton = !1, this.brandName = void 0, this.buttonText = "", this._culture = "pt-BR", this.measurerKey = "", this._isLocaleLoading = !1, this.showModal = !1, this.step = 1, this.height = 0, this.recommendedSize = "", this.measurements = {}, this.errorMessage = "", this.instructionMessage = a(
|
|
2119
2119
|
"Position yourself in front of the camera"
|
|
2120
|
-
), this.shouldStartMeasurement = !1, this.isLoading = !1, this.isFetching = !1, this.generatedImageUrl = "", this.isVtonFetching = !1, this.vtonError = !1, this.videoElement = null, this.stream = null, this.poolingTimeout = null, this.instructionMessageTimeout = null, this.aiSession = null, this.cameras = [], this.currentCameraId = null, this.snowflakesCache = null;
|
|
2120
|
+
), this.shouldStartMeasurement = !1, this.isLoading = !1, this.isFetching = !1, this.generatedImageUrl = "", this.isVtonFetching = !1, this.vtonError = !1, this.videoElement = null, this.stream = null, this.poolingTimeout = null, this.instructionMessageTimeout = null, this.aiSession = null, this.sessionActive = !1, this.cameras = [], this.currentCameraId = null, this.snowflakesCache = null;
|
|
2121
2121
|
}
|
|
2122
2122
|
firstUpdated() {
|
|
2123
2123
|
this.startSpinnerAnimation();
|
|
2124
2124
|
}
|
|
2125
2125
|
startSpinnerAnimation() {
|
|
2126
|
-
const i = [
|
|
2126
|
+
const i = [Ye, Ke, Dt];
|
|
2127
2127
|
this.spinnerInterval = setInterval(() => {
|
|
2128
2128
|
var e;
|
|
2129
2129
|
const t = (e = this.shadowRoot) == null ? void 0 : e.querySelector(
|
|
@@ -2269,22 +2269,49 @@ let c = class extends C {
|
|
|
2269
2269
|
const t = this.errorMap[i];
|
|
2270
2270
|
return t || (console.info("Error code is missing", i), a("An unexpected error occurred"));
|
|
2271
2271
|
}
|
|
2272
|
+
trackAnalytics(i, t = {}) {
|
|
2273
|
+
if (!(!this.baseUrl || !this.tenantId))
|
|
2274
|
+
try {
|
|
2275
|
+
const e = {
|
|
2276
|
+
tenantId: this.tenantId,
|
|
2277
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2278
|
+
...t
|
|
2279
|
+
};
|
|
2280
|
+
fetch(`${this.baseUrl}/api/analytics${i}`, {
|
|
2281
|
+
method: "POST",
|
|
2282
|
+
headers: {
|
|
2283
|
+
"Content-Type": "application/json",
|
|
2284
|
+
...this.apiKey ? { "X-API-Key": this.apiKey } : {}
|
|
2285
|
+
},
|
|
2286
|
+
body: JSON.stringify(e),
|
|
2287
|
+
keepalive: !0
|
|
2288
|
+
}).catch((s) => console.error("Analytics fetch error:", s));
|
|
2289
|
+
} catch (e) {
|
|
2290
|
+
console.error("Analytics error:", e);
|
|
2291
|
+
}
|
|
2292
|
+
}
|
|
2272
2293
|
connectedCallback() {
|
|
2273
2294
|
super.connectedCallback(), console.log("New code loaded Jan 27 11:57am"), document.addEventListener("keydown", this.handleEscKey.bind(this)), this.snowflakesCache = this.generateSnowflakes();
|
|
2274
2295
|
}
|
|
2275
2296
|
disconnectedCallback() {
|
|
2276
2297
|
var i;
|
|
2277
|
-
super.disconnectedCallback(), document.removeEventListener("keydown", this.handleEscKey.bind(this)), this.stopPolling(), clearInterval(this.spinnerInterval), (i = this.aiSession) == null || i.disconnect();
|
|
2298
|
+
super.disconnectedCallback(), document.removeEventListener("keydown", this.handleEscKey.bind(this)), this.stopPolling(), clearInterval(this.spinnerInterval), (i = this.aiSession) == null || i.disconnect(), this.sessionActive && (this.trackAnalytics("/session-ended"), this.sessionActive = !1);
|
|
2278
2299
|
}
|
|
2279
2300
|
handleEscKey(i) {
|
|
2280
2301
|
i.key === "Escape" && this.showModal && this.closeModal();
|
|
2281
2302
|
}
|
|
2282
2303
|
openModal() {
|
|
2283
|
-
this.showModal = !0, this.step = 1, this.height = 0, this.instructionMessage = a("Position yourself in front of the camera");
|
|
2304
|
+
this.trackAnalytics("/click"), this.showModal = !0, this.step = 1, this.height = 0, this.instructionMessage = a("Position yourself in front of the camera");
|
|
2284
2305
|
}
|
|
2285
2306
|
closeModal() {
|
|
2286
2307
|
var i;
|
|
2287
|
-
this.
|
|
2308
|
+
this.step === 4 && this.trackAnalytics("/measurement-declined", {
|
|
2309
|
+
sku: this.productSku,
|
|
2310
|
+
measurementData: JSON.stringify(this.measurements)
|
|
2311
|
+
}), this.showModal = !1, this.onMeasurementCanceled && typeof this.onMeasurementCanceled == "function" && this.onMeasurementCanceled(), this.stopPolling(), (i = this.aiSession) == null || i.disconnect(), this.dispatchEvent(new CustomEvent("measurementCanceled", { detail: {} })), this.sessionActive && (this.trackAnalytics("/session-ended"), this.sessionActive = !1);
|
|
2312
|
+
}
|
|
2313
|
+
handleDialogClose() {
|
|
2314
|
+
this.showModal && this.closeModal();
|
|
2288
2315
|
}
|
|
2289
2316
|
async step2advancement() {
|
|
2290
2317
|
if (this.height < 50 || this.height > 300) {
|
|
@@ -2294,10 +2321,16 @@ let c = class extends C {
|
|
|
2294
2321
|
this.step = 3, this.errorMessage = "";
|
|
2295
2322
|
}
|
|
2296
2323
|
async startMeasurement() {
|
|
2297
|
-
this.step = 3, this.errorMessage = "", this.shouldStartMeasurement = !0;
|
|
2324
|
+
this.step = 3, this.errorMessage = "", this.shouldStartMeasurement = !0, this.sessionActive = !0, this.trackAnalytics("/session-started");
|
|
2298
2325
|
}
|
|
2299
2326
|
updated(i) {
|
|
2300
|
-
|
|
2327
|
+
var t;
|
|
2328
|
+
if (super.updated(i), i.has("step") && this.step === 3 && this.shouldStartMeasurement && (this.initializeMeasurement(), this.shouldStartMeasurement = !1), i.has("showModal")) {
|
|
2329
|
+
const e = (t = this.shadowRoot) == null ? void 0 : t.getElementById(
|
|
2330
|
+
"measurer-dialog"
|
|
2331
|
+
);
|
|
2332
|
+
e && (this.showModal && !e.open ? e.showModal() : !this.showModal && e.open && e.close());
|
|
2333
|
+
}
|
|
2301
2334
|
}
|
|
2302
2335
|
async initializeMeasurement() {
|
|
2303
2336
|
if (!this.apiKey)
|
|
@@ -2314,7 +2347,11 @@ let c = class extends C {
|
|
|
2314
2347
|
throw new Error("VTON URL is required");
|
|
2315
2348
|
this.videoElement = this.shadowRoot.querySelector("video");
|
|
2316
2349
|
try {
|
|
2317
|
-
this.stream = await navigator.mediaDevices.getUserMedia({ video: !0 }), this.videoElement && (this.videoElement.srcObject = this.stream, await this.videoElement.play(), await this.loadCameras(), this.aiSession = new gt(
|
|
2350
|
+
this.stream = await navigator.mediaDevices.getUserMedia({ video: !0 }), this.videoElement && (this.videoElement.srcObject = this.stream, await this.videoElement.play(), await this.loadCameras(), this.aiSession = new gt(
|
|
2351
|
+
this.baseUrl,
|
|
2352
|
+
this.apiKey,
|
|
2353
|
+
this.culture
|
|
2354
|
+
), await this.aiSession.connect(), this.aiSession.startMicrophone(), this.startPolling());
|
|
2318
2355
|
} catch {
|
|
2319
2356
|
this.errorMessage = a("Error accessing webcam");
|
|
2320
2357
|
}
|
|
@@ -2431,7 +2468,7 @@ let c = class extends C {
|
|
|
2431
2468
|
let o = "", n = 0;
|
|
2432
2469
|
for (const [r, l] of Object.entries(s))
|
|
2433
2470
|
l > n && (n = l, o = r);
|
|
2434
|
-
if (console.log(`🏆 WINNER: ${o}`), console.groupEnd(), this.measurements = t, this.recommendedSize = o, this.instructionMessage = a("Measurement successful!"), this.aiSession) {
|
|
2471
|
+
if (console.log(`🏆 WINNER: ${o}`), console.groupEnd(), this.measurements = t, this.recommendedSize = o, this.instructionMessage = a("Measurement successful!"), this.trackAnalytics("/session-completed"), this.sessionActive && (this.trackAnalytics("/session-ended"), this.sessionActive = !1), this.aiSession) {
|
|
2435
2472
|
this.aiSession.onTurnComplete = () => {
|
|
2436
2473
|
this.aiSession = null;
|
|
2437
2474
|
};
|
|
@@ -2444,7 +2481,10 @@ let c = class extends C {
|
|
|
2444
2481
|
}
|
|
2445
2482
|
acceptMeasurement() {
|
|
2446
2483
|
var i;
|
|
2447
|
-
this.
|
|
2484
|
+
this.trackAnalytics("/measurement-accepted", {
|
|
2485
|
+
sku: this.productSku,
|
|
2486
|
+
measurementData: JSON.stringify(this.measurements)
|
|
2487
|
+
}), this.dispatchEvent(
|
|
2448
2488
|
new CustomEvent("measurementAccepted", {
|
|
2449
2489
|
detail: { size: this.recommendedSize }
|
|
2450
2490
|
})
|
|
@@ -2452,7 +2492,10 @@ let c = class extends C {
|
|
|
2452
2492
|
}
|
|
2453
2493
|
resetMeasurement() {
|
|
2454
2494
|
var i;
|
|
2455
|
-
this.step
|
|
2495
|
+
this.step === 4 && this.trackAnalytics("/measurement-declined", {
|
|
2496
|
+
sku: this.productSku,
|
|
2497
|
+
measurementData: JSON.stringify(this.measurements)
|
|
2498
|
+
}), this.step = 1, this.height = 0, this.recommendedSize = "", this.measurements = {}, this.generatedImageUrl = "", this.isVtonFetching = !1, this.vtonError = !1, this.stopPolling(), (i = this.aiSession) == null || i.disconnect(), this.aiSession = null;
|
|
2456
2499
|
}
|
|
2457
2500
|
stopMeasurement() {
|
|
2458
2501
|
this.resetMeasurement(), this.showModal = !1;
|
|
@@ -2485,7 +2528,11 @@ let c = class extends C {
|
|
|
2485
2528
|
></xact-button>
|
|
2486
2529
|
|
|
2487
2530
|
${this.showModal ? g`
|
|
2488
|
-
<
|
|
2531
|
+
<dialog
|
|
2532
|
+
class="modal"
|
|
2533
|
+
id="measurer-dialog"
|
|
2534
|
+
@close=${this.handleDialogClose}
|
|
2535
|
+
>
|
|
2489
2536
|
<div class="modal-content">
|
|
2490
2537
|
<div
|
|
2491
2538
|
style="display: flex; justify-content: space-between"
|
|
@@ -2546,7 +2593,7 @@ let c = class extends C {
|
|
|
2546
2593
|
</div>
|
|
2547
2594
|
|
|
2548
2595
|
<video
|
|
2549
|
-
class=${
|
|
2596
|
+
class=${Pe({
|
|
2550
2597
|
error: !this.errorMessage,
|
|
2551
2598
|
success: !!this.errorMessage
|
|
2552
2599
|
})}
|
|
@@ -2594,12 +2641,12 @@ let c = class extends C {
|
|
|
2594
2641
|
` : ""}
|
|
2595
2642
|
<xact-footer></xact-footer>
|
|
2596
2643
|
</div>
|
|
2597
|
-
</
|
|
2644
|
+
</dialog>
|
|
2598
2645
|
` : ""}
|
|
2599
2646
|
`;
|
|
2600
2647
|
}
|
|
2601
2648
|
};
|
|
2602
|
-
c.styles =
|
|
2649
|
+
c.styles = P`
|
|
2603
2650
|
:host {
|
|
2604
2651
|
display: block;
|
|
2605
2652
|
font-family: Arial, sans-serif;
|
|
@@ -2636,18 +2683,27 @@ c.styles = U`
|
|
|
2636
2683
|
}
|
|
2637
2684
|
|
|
2638
2685
|
/* Modal Styles */
|
|
2639
|
-
.modal {
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2686
|
+
dialog.modal {
|
|
2687
|
+
border: none;
|
|
2688
|
+
background: transparent;
|
|
2689
|
+
padding: 0;
|
|
2690
|
+
margin: 0;
|
|
2691
|
+
width: 100vw;
|
|
2692
|
+
height: 100vh;
|
|
2693
|
+
max-width: 100vw;
|
|
2694
|
+
max-height: 100vh;
|
|
2695
|
+
overflow: hidden;
|
|
2696
|
+
}
|
|
2697
|
+
|
|
2698
|
+
dialog.modal[open] {
|
|
2646
2699
|
display: flex;
|
|
2647
2700
|
flex-direction: column;
|
|
2648
2701
|
justify-content: center;
|
|
2649
2702
|
align-items: center;
|
|
2650
|
-
|
|
2703
|
+
}
|
|
2704
|
+
|
|
2705
|
+
dialog.modal::backdrop {
|
|
2706
|
+
background: rgba(0, 0, 0, 0.5);
|
|
2651
2707
|
}
|
|
2652
2708
|
|
|
2653
2709
|
.modal-content {
|
package/dist/body-measurer.d.ts
CHANGED
|
@@ -48,6 +48,8 @@ export declare class BodyMeasurer extends LitElement {
|
|
|
48
48
|
private poolingTimeout;
|
|
49
49
|
private instructionMessageTimeout;
|
|
50
50
|
private aiSession;
|
|
51
|
+
private sessionActive;
|
|
52
|
+
private trackAnalytics;
|
|
51
53
|
private cameras;
|
|
52
54
|
private currentCameraId;
|
|
53
55
|
private snowflakesCache;
|
|
@@ -56,6 +58,7 @@ export declare class BodyMeasurer extends LitElement {
|
|
|
56
58
|
private handleEscKey;
|
|
57
59
|
private openModal;
|
|
58
60
|
private closeModal;
|
|
61
|
+
private handleDialogClose;
|
|
59
62
|
private step2advancement;
|
|
60
63
|
private startMeasurement;
|
|
61
64
|
updated(changedProperties: Map<string, any>): void;
|
package/dist/body-measurer.es.js
CHANGED
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const
|
|
5
|
+
*/const X=globalThis,ne=X.ShadowRoot&&(X.ShadyCSS===void 0||X.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,le=Symbol(),Ae=new WeakMap;let Re=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==le)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(ne&&e===void 0){const i=t!==void 0&&t.length===1;i&&(e=Ae.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&Ae.set(t,e))}return e}toString(){return this.cssText}};const Xe=a=>new Re(typeof a=="string"?a:a+"",void 0,le),I=(a,...e)=>{const t=a.length===1?a[0]:e.reduce((i,s,o)=>i+(r=>{if(r._$cssResult$===!0)return r.cssText;if(typeof r=="number")return r;throw Error("Value passed to 'css' function must be a 'css' function result: "+r+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+a[o+1],a[0]);return new Re(t,a,le)},Qe=(a,e)=>{if(ne)a.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of e){const i=document.createElement("style"),s=X.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=t.cssText,a.appendChild(i)}},Me=ne?a=>a:a=>a instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return Xe(t)})(a):a;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const{is:Je,defineProperty:et,getOwnPropertyDescriptor:tt,getOwnPropertyNames:it,getOwnPropertySymbols:st,getPrototypeOf:at}=Object,w=globalThis,Se=w.trustedTypes,ot=Se?Se.emptyScript:"",de=w.reactiveElementPolyfillSupport,B=(a,e)=>a,
|
|
9
|
+
*/const{is:Je,defineProperty:et,getOwnPropertyDescriptor:tt,getOwnPropertyNames:it,getOwnPropertySymbols:st,getPrototypeOf:at}=Object,w=globalThis,Se=w.trustedTypes,ot=Se?Se.emptyScript:"",de=w.reactiveElementPolyfillSupport,B=(a,e)=>a,Q={toAttribute(a,e){switch(e){case Boolean:a=a?ot:null;break;case Object:case Array:a=a==null?a:JSON.stringify(a)}return a},fromAttribute(a,e){let t=a;switch(e){case Boolean:t=a!==null;break;case Number:t=a===null?null:Number(a);break;case Object:case Array:try{t=JSON.parse(a)}catch{t=null}}return t}},ce=(a,e)=>!Je(a,e),Le={attribute:!0,type:String,converter:Q,reflect:!1,useDefault:!1,hasChanged:ce};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),w.litPropertyMetadata??(w.litPropertyMetadata=new WeakMap);let D=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Le){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(e,i,t);s!==void 0&&et(this.prototype,e,s)}}static getPropertyDescriptor(e,t,i){const{get:s,set:o}=tt(this.prototype,e)??{get(){return this[t]},set(r){this[t]=r}};return{get:s,set(r){const d=s==null?void 0:s.call(this);o==null||o.call(this,r),this.requestUpdate(e,d,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Le}static _$Ei(){if(this.hasOwnProperty(B("elementProperties")))return;const e=at(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(B("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(B("properties"))){const t=this.properties,i=[...it(t),...st(t)];for(const s of i)this.createProperty(s,t[s])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[i,s]of t)this.elementProperties.set(i,s)}this._$Eh=new Map;for(const[t,i]of this.elementProperties){const s=this._$Eu(t,i);s!==void 0&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const s of i)t.unshift(Me(s))}else e!==void 0&&t.push(Me(e));return t}static _$Eu(e,t){const i=t.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(t=>t(this))}addController(e){var t;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((t=e.hostConnected)==null||t.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const i of t.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Qe(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(t=>{var i;return(i=t.hostConnected)==null?void 0:i.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(t=>{var i;return(i=t.hostDisconnected)==null?void 0:i.call(t)})}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$ET(e,t){var o;const i=this.constructor.elementProperties.get(e),s=this.constructor._$Eu(e,i);if(s!==void 0&&i.reflect===!0){const r=(((o=i.converter)==null?void 0:o.toAttribute)!==void 0?i.converter:Q).toAttribute(t,i.type);this._$Em=e,r==null?this.removeAttribute(s):this.setAttribute(s,r),this._$Em=null}}_$AK(e,t){var o,r;const i=this.constructor,s=i._$Eh.get(e);if(s!==void 0&&this._$Em!==s){const d=i.getPropertyOptions(s),l=typeof d.converter=="function"?{fromAttribute:d.converter}:((o=d.converter)==null?void 0:o.fromAttribute)!==void 0?d.converter:Q;this._$Em=s,this[s]=l.fromAttribute(t,d.type)??((r=this._$Ej)==null?void 0:r.get(s))??null,this._$Em=null}}requestUpdate(e,t,i){var s;if(e!==void 0){const o=this.constructor,r=this[e];if(i??(i=o.getPropertyOptions(e)),!((i.hasChanged??ce)(r,t)||i.useDefault&&i.reflect&&r===((s=this._$Ej)==null?void 0:s.get(e))&&!this.hasAttribute(o._$Eu(e,i))))return;this.C(e,t,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:i,reflect:s,wrapped:o},r){i&&!(this._$Ej??(this._$Ej=new Map)).has(e)&&(this._$Ej.set(e,r??t??this[e]),o!==!0||r!==void 0)||(this._$AL.has(e)||(this.hasUpdated||i||(t=void 0),this._$AL.set(e,t)),s===!0&&this._$Em!==e&&(this._$Eq??(this._$Eq=new Set)).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[o,r]of this._$Ep)this[o]=r;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[o,r]of s){const{wrapped:d}=r,l=this[o];d!==!0||this._$AL.has(o)||l===void 0||this.C(o,void 0,r,l)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(i=this._$EO)==null||i.forEach(s=>{var o;return(o=s.hostUpdate)==null?void 0:o.call(s)}),this.update(t)):this._$EM()}catch(s){throw e=!1,this._$EM(),s}e&&this._$AE(t)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach(i=>{var s;return(s=i.hostUpdated)==null?void 0:s.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&(this._$Eq=this._$Eq.forEach(t=>this._$ET(t,this[t]))),this._$EM()}updated(e){}firstUpdated(e){}};D.elementStyles=[],D.shadowRootOptions={mode:"open"},D[B("elementProperties")]=new Map,D[B("finalized")]=new Map,de==null||de({ReactiveElement:D}),(w.reactiveElementVersions??(w.reactiveElementVersions=[])).push("2.1.0");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/const F=globalThis,J=F.trustedTypes,Te=J?J.createPolicy("lit-html",{createHTML:a=>a}):void 0,$e="$lit$",
|
|
14
|
-
\f\r]`,G=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),De=/'/g,He=/"/g,Pe=/^(?:script|style|textarea|title)$/i,lt=a=>(e,...t)=>({_$litType$:a,strings:e,values:t}),g=lt(1),L=Symbol.for("lit-noChange"),_=Symbol.for("lit-nothing"),Ue=new WeakMap,T=M.createTreeWalker(M,129);function Ne(a,e){if(!he(a)||!a.hasOwnProperty("raw"))throw Error("invalid template strings array");return Te!==void 0?Te.createHTML(e):e}const dt=(a,e)=>{const t=a.length-1,i=[];let s,o=e===2?"<svg>":e===3?"<math>":"",r=G;for(let d=0;d<t;d++){const l=a[d];let f,m,h=-1,b=0;for(;b<l.length&&(r.lastIndex=b,m=r.exec(l),m!==null);)b=r.lastIndex,r===G?m[1]==="!--"?r=
|
|
13
|
+
*/const F=globalThis,J=F.trustedTypes,Te=J?J.createPolicy("lit-html",{createHTML:a=>a}):void 0,$e="$lit$",A=`lit$${Math.random().toFixed(9).slice(2)}$`,Oe="?"+A,rt=`<${Oe}>`,M=document,z=()=>M.createComment(""),j=a=>a===null||typeof a!="object"&&typeof a!="function",he=Array.isArray,nt=a=>he(a)||typeof(a==null?void 0:a[Symbol.iterator])=="function",pe=`[
|
|
14
|
+
\f\r]`,G=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ke=/-->/g,Ie=/>/g,S=RegExp(`>|${pe}(?:([^\\s"'>=/]+)(${pe}*=${pe}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),De=/'/g,He=/"/g,Pe=/^(?:script|style|textarea|title)$/i,lt=a=>(e,...t)=>({_$litType$:a,strings:e,values:t}),g=lt(1),L=Symbol.for("lit-noChange"),_=Symbol.for("lit-nothing"),Ue=new WeakMap,T=M.createTreeWalker(M,129);function Ne(a,e){if(!he(a)||!a.hasOwnProperty("raw"))throw Error("invalid template strings array");return Te!==void 0?Te.createHTML(e):e}const dt=(a,e)=>{const t=a.length-1,i=[];let s,o=e===2?"<svg>":e===3?"<math>":"",r=G;for(let d=0;d<t;d++){const l=a[d];let f,m,h=-1,b=0;for(;b<l.length&&(r.lastIndex=b,m=r.exec(l),m!==null);)b=r.lastIndex,r===G?m[1]==="!--"?r=ke:m[1]!==void 0?r=Ie:m[2]!==void 0?(Pe.test(m[2])&&(s=RegExp("</"+m[2],"g")),r=S):m[3]!==void 0&&(r=S):r===S?m[0]===">"?(r=s??G,h=-1):m[1]===void 0?h=-2:(h=r.lastIndex-m[2].length,f=m[1],r=m[3]===void 0?S:m[3]==='"'?He:De):r===He||r===De?r=S:r===ke||r===Ie?r=G:(r=S,s=void 0);const R=r===S&&a[d+1].startsWith("/>")?" ":"";o+=r===G?l+rt:h>=0?(i.push(f),l.slice(0,h)+$e+l.slice(h)+A+R):l+A+(h===-2?d:R)}return[Ne(a,o+(a[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),i]};class Z{constructor({strings:e,_$litType$:t},i){let s;this.parts=[];let o=0,r=0;const d=e.length-1,l=this.parts,[f,m]=dt(e,t);if(this.el=Z.createElement(f,i),T.currentNode=this.el.content,t===2||t===3){const h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(s=T.nextNode())!==null&&l.length<d;){if(s.nodeType===1){if(s.hasAttributes())for(const h of s.getAttributeNames())if(h.endsWith($e)){const b=m[r++],R=s.getAttribute(h).split(A),re=/([.?@])?(.*)/.exec(b);l.push({type:1,index:o,name:re[2],strings:R,ctor:re[1]==="."?ht:re[1]==="?"?pt:re[1]==="@"?ut:ee}),s.removeAttribute(h)}else h.startsWith(A)&&(l.push({type:6,index:o}),s.removeAttribute(h));if(Pe.test(s.tagName)){const h=s.textContent.split(A),b=h.length-1;if(b>0){s.textContent=J?J.emptyScript:"";for(let R=0;R<b;R++)s.append(h[R],z()),T.nextNode(),l.push({type:2,index:++o});s.append(h[b],z())}}}else if(s.nodeType===8)if(s.data===Oe)l.push({type:2,index:o});else{let h=-1;for(;(h=s.data.indexOf(A,h+1))!==-1;)l.push({type:7,index:o}),h+=A.length-1}o++}}static createElement(e,t){const i=M.createElement("template");return i.innerHTML=e,i}}function H(a,e,t=a,i){var r,d;if(e===L)return e;let s=i!==void 0?(r=t._$Co)==null?void 0:r[i]:t._$Cl;const o=j(e)?void 0:e._$litDirective$;return(s==null?void 0:s.constructor)!==o&&((d=s==null?void 0:s._$AO)==null||d.call(s,!1),o===void 0?s=void 0:(s=new o(a),s._$AT(a,t,i)),i!==void 0?(t._$Co??(t._$Co=[]))[i]=s:t._$Cl=s),s!==void 0&&(e=H(a,s._$AS(a,e.values),s,i)),e}class ct{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:i}=this._$AD,s=((e==null?void 0:e.creationScope)??M).importNode(t,!0);T.currentNode=s;let o=T.nextNode(),r=0,d=0,l=i[0];for(;l!==void 0;){if(r===l.index){let f;l.type===2?f=new q(o,o.nextSibling,this,e):l.type===1?f=new l.ctor(o,l.name,l.strings,this,e):l.type===6&&(f=new ft(o,this,e)),this._$AV.push(f),l=i[++d]}r!==(l==null?void 0:l.index)&&(o=T.nextNode(),r++)}return T.currentNode=M,s}p(e){let t=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,t),t+=i.strings.length-2):i._$AI(e[t])),t++}}class q{get _$AU(){var e;return((e=this._$AM)==null?void 0:e._$AU)??this._$Cv}constructor(e,t,i,s){this.type=2,this._$AH=_,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=i,this.options=s,this._$Cv=(s==null?void 0:s.isConnected)??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=H(this,e,t),j(e)?e===_||e==null||e===""?(this._$AH!==_&&this._$AR(),this._$AH=_):e!==this._$AH&&e!==L&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):nt(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==_&&j(this._$AH)?this._$AA.nextSibling.data=e:this.T(M.createTextNode(e)),this._$AH=e}$(e){var o;const{values:t,_$litType$:i}=e,s=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=Z.createElement(Ne(i.h,i.h[0]),this.options)),i);if(((o=this._$AH)==null?void 0:o._$AD)===s)this._$AH.p(t);else{const r=new ct(s,this),d=r.u(this.options);r.p(t),this.T(d),this._$AH=r}}_$AC(e){let t=Ue.get(e.strings);return t===void 0&&Ue.set(e.strings,t=new Z(e)),t}k(e){he(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let i,s=0;for(const o of e)s===t.length?t.push(i=new q(this.O(z()),this.O(z()),this,this.options)):i=t[s],i._$AI(o),s++;s<t.length&&(this._$AR(i&&i._$AB.nextSibling,s),t.length=s)}_$AR(e=this._$AA.nextSibling,t){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,t);e&&e!==this._$AB;){const s=e.nextSibling;e.remove(),e=s}}setConnected(e){var t;this._$AM===void 0&&(this._$Cv=e,(t=this._$AP)==null||t.call(this,e))}}class ee{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,i,s,o){this.type=1,this._$AH=_,this._$AN=void 0,this.element=e,this.name=t,this._$AM=s,this.options=o,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=_}_$AI(e,t=this,i,s){const o=this.strings;let r=!1;if(o===void 0)e=H(this,e,t,0),r=!j(e)||e!==this._$AH&&e!==L,r&&(this._$AH=e);else{const d=e;let l,f;for(e=o[0],l=0;l<o.length-1;l++)f=H(this,d[i+l],t,l),f===L&&(f=this._$AH[l]),r||(r=!j(f)||f!==this._$AH[l]),f===_?e=_:e!==_&&(e+=(f??"")+o[l+1]),this._$AH[l]=f}r&&!s&&this.j(e)}j(e){e===_?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class ht extends ee{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===_?void 0:e}}class pt extends ee{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==_)}}class ut extends ee{constructor(e,t,i,s,o){super(e,t,i,s,o),this.type=5}_$AI(e,t=this){if((e=H(this,e,t,0)??_)===L)return;const i=this._$AH,s=e===_&&i!==_||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,o=e!==_&&(i===_||s);s&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t;typeof this._$AH=="function"?this._$AH.call(((t=this.options)==null?void 0:t.host)??this.element,e):this._$AH.handleEvent(e)}}class ft{constructor(e,t,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){H(this,e)}}const ue=F.litHtmlPolyfillSupport;ue==null||ue(Z,q),(F.litHtmlVersions??(F.litHtmlVersions=[])).push("3.3.0");const mt=(a,e,t)=>{const i=(t==null?void 0:t.renderBefore)??e;let s=i._$litPart$;if(s===void 0){const o=(t==null?void 0:t.renderBefore)??null;i._$litPart$=s=new q(e.insertBefore(z(),o),o,void 0,t??{})}return s._$AI(a),s};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/const $=globalThis;let
|
|
19
|
+
*/const $=globalThis;let v=class extends D{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;const e=super.createRenderRoot();return(t=this.renderOptions).renderBefore??(t.renderBefore=e.firstChild),e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=mt(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)==null||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)==null||e.setConnected(!1)}render(){return L}};v._$litElement$=!0,v.finalized=!0,(Ke=$.litElementHydrateSupport)==null||Ke.call($,{LitElement:v});const fe=$.litElementPolyfillSupport;fe==null||fe({LitElement:v}),($.litElementVersions??($.litElementVersions=[])).push("4.2.0");/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2017 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
-
*/const gt={attribute:!0,type:String,converter:
|
|
27
|
+
*/const gt={attribute:!0,type:String,converter:Q,reflect:!1,hasChanged:ce},_t=(a=gt,e,t)=>{const{kind:i,metadata:s}=t;let o=globalThis.litPropertyMetadata.get(s);if(o===void 0&&globalThis.litPropertyMetadata.set(s,o=new Map),i==="setter"&&((a=Object.create(a)).wrapped=!0),o.set(t.name,a),i==="accessor"){const{name:r}=t;return{set(d){const l=e.get.call(this);e.set.call(this,d),this.requestUpdate(r,l,a)},init(d){return d!==void 0&&this.C(r,void 0,a,d),d}}}if(i==="setter"){const{name:r}=t;return function(d){const l=this[r];e.call(this,d),this.requestUpdate(r,l,a)}}throw Error("Unsupported decorator location: "+i)};function p(a){return(e,t)=>typeof t=="object"?_t(a,e,t):((i,s,o)=>{const r=s.hasOwnProperty(o);return s.constructor.createProperty(o,i),r?Object.getOwnPropertyDescriptor(s,o):void 0})(a,e,t)}/**
|
|
28
28
|
* @license
|
|
29
29
|
* Copyright 2017 Google LLC
|
|
30
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
* @license
|
|
45
45
|
* Copyright 2021 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
|
-
*/class bt{constructor(e){this.__litLocalizeEventHandler=t=>{t.detail.status==="ready"&&this.host.requestUpdate()},this.host=e}hostConnected(){window.addEventListener(me,this.__litLocalizeEventHandler)}hostDisconnected(){window.removeEventListener(me,this.__litLocalizeEventHandler)}}const
|
|
47
|
+
*/class bt{constructor(e){this.__litLocalizeEventHandler=t=>{t.detail.status==="ready"&&this.host.requestUpdate()},this.host=e}hostConnected(){window.addEventListener(me,this.__litLocalizeEventHandler)}hostDisconnected(){window.removeEventListener(me,this.__litLocalizeEventHandler)}}const vt=a=>a.addController(new bt(a));/**
|
|
48
48
|
* @license
|
|
49
49
|
* Copyright 2021 Google LLC
|
|
50
50
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
51
|
-
*/const Y=()=>(a,e)=>(a.addInitializer(
|
|
51
|
+
*/const Y=()=>(a,e)=>(a.addInitializer(vt),a);/**
|
|
52
52
|
* @license
|
|
53
53
|
* Copyright 2020 Google LLC
|
|
54
54
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -56,15 +56,15 @@
|
|
|
56
56
|
* @license
|
|
57
57
|
* Copyright 2014 Travis Webb
|
|
58
58
|
* SPDX-License-Identifier: MIT
|
|
59
|
-
*/const x=[];for(let a=0;a<256;a++)x[a]=(a>>4&15).toString(16)+(a&15).toString(16);function
|
|
59
|
+
*/const x=[];for(let a=0;a<256;a++)x[a]=(a>>4&15).toString(16)+(a&15).toString(16);function Ct(a){let e=0,t=8997,i=0,s=33826,o=0,r=40164,d=0,l=52210;for(let f=0;f<a.length;f++)t^=a.charCodeAt(f),e=t*435,i=s*435,o=r*435,d=l*435,o+=t<<8,d+=s<<8,i+=e>>>16,t=e&65535,o+=i>>>16,s=i&65535,l=d+(o>>>16)&65535,r=o&65535;return x[l>>8]+x[l&255]+x[r>>8]+x[r&255]+x[s>>8]+x[s&255]+x[t>>8]+x[t&255]}/**
|
|
60
60
|
* @license
|
|
61
61
|
* Copyright 2020 Google LLC
|
|
62
62
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
63
|
-
*/const xt="",wt="h",
|
|
63
|
+
*/const xt="",wt="h",At="s";function Rt(a,e){return(e?wt:At)+Ct(typeof a=="string"?a:a.join(xt))}/**
|
|
64
64
|
* @license
|
|
65
65
|
* Copyright 2021 Google LLC
|
|
66
66
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
67
|
-
*/const je=new WeakMap,Ge=new Map;function Mt(a,e,t){if(a){const i=(t==null?void 0:t.id)??St(e),s=a[i];if(s){if(typeof s=="string")return s;if("strTag"in s)return Ve(s.strings,e.values,s.values);{let o=je.get(s);return o===void 0&&(o=s.values,je.set(s,o)),{...s,values:o.map(r=>e.values[r])}}}}return Be(e)}function St(a){const e=typeof a=="string"?a:a.strings;let t=Ge.get(e);return t===void 0&&(t=
|
|
67
|
+
*/const je=new WeakMap,Ge=new Map;function Mt(a,e,t){if(a){const i=(t==null?void 0:t.id)??St(e),s=a[i];if(s){if(typeof s=="string")return s;if("strTag"in s)return Ve(s.strings,e.values,s.values);{let o=je.get(s);return o===void 0&&(o=s.values,je.set(s,o)),{...s,values:o.map(r=>e.values[r])}}}}return Be(e)}function St(a){const e=typeof a=="string"?a:a.strings;let t=Ge.get(e);return t===void 0&&(t=Rt(e,typeof a!="string"&&!("strTag"in a)),Ge.set(e,t)),t}/**
|
|
68
68
|
* @license
|
|
69
69
|
* Copyright 2021 Google LLC
|
|
70
70
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -72,11 +72,11 @@
|
|
|
72
72
|
* @license
|
|
73
73
|
* Copyright 2017 Google LLC
|
|
74
74
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
75
|
-
*/const
|
|
75
|
+
*/const kt={ATTRIBUTE:1},It=a=>(...e)=>({_$litDirective$:a,values:e});class Dt{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,i){this._$Ct=e,this._$AM=t,this._$Ci=i}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}/**
|
|
76
76
|
* @license
|
|
77
77
|
* Copyright 2018 Google LLC
|
|
78
78
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
79
|
-
*/const Ht=
|
|
79
|
+
*/const Ht=It(class extends Dt{constructor(a){var e;if(super(a),a.type!==kt.ATTRIBUTE||a.name!=="class"||((e=a.strings)==null?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(a){return" "+Object.keys(a).filter(e=>a[e]).join(" ")+" "}update(a,[e]){var i,s;if(this.st===void 0){this.st=new Set,a.strings!==void 0&&(this.nt=new Set(a.strings.join(" ").split(/\s/).filter(o=>o!=="")));for(const o in e)e[o]&&!((i=this.nt)!=null&&i.has(o))&&this.st.add(o);return this.render(e)}const t=a.element.classList;for(const o of this.st)o in e||(t.remove(o),this.st.delete(o));for(const o in e){const r=!!e[o];r===this.st.has(o)||(s=this.nt)!=null&&s.has(o)||(r?(t.add(o),this.st.add(o)):(t.remove(o),this.st.delete(o)))}return L}});var Pt=Object.defineProperty,Ut=Object.getOwnPropertyDescriptor,W=(a,e,t,i)=>{for(var s=i>1?void 0:i?Ut(e,t):e,o=a.length-1,r;o>=0;o--)(r=a[o])&&(s=(i?r(e,t,s):r(s))||s);return i&&s&&Pt(e,t,s),s};let k=class extends v{constructor(){super(...arguments),this.type="button",this.label="",this.disabled=!1,this.variant="contained"}render(){return g`
|
|
80
80
|
<div class="button-wrapper">
|
|
81
81
|
<button
|
|
82
82
|
class=${this.variant}
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
${this.label}
|
|
88
88
|
</button>
|
|
89
89
|
</div>
|
|
90
|
-
`}};
|
|
90
|
+
`}};k.styles=I`
|
|
91
91
|
:host {
|
|
92
92
|
display: block;
|
|
93
93
|
width: 100%;
|
|
@@ -167,7 +167,7 @@
|
|
|
167
167
|
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
|
-
`,W([p({type:String})],
|
|
170
|
+
`,W([p({type:String})],k.prototype,"type",2),W([p({type:String})],k.prototype,"label",2),W([p({type:Boolean})],k.prototype,"disabled",2),W([p({type:String})],k.prototype,"variant",2),k=W([P("xact-button")],k);var Nt=Object.defineProperty,Vt=Object.getOwnPropertyDescriptor,ae=(a,e,t,i)=>{for(var s=i>1?void 0:i?Vt(e,t):e,o=a.length-1,r;o>=0;o--)(r=a[o])&&(s=(i?r(e,t,s):r(s))||s);return i&&s&&Nt(e,t,s),s};let U=class extends v{constructor(){super(...arguments),this.height=0,this.brandName="",this.handleStart=()=>{var e;const a=this.shadowRoot.querySelector("#height-input");if(a!=null&&a.value){const t=parseInt(a.value);this.height=t,(e=this.onStartMeasurement)==null||e.call(this,t)}}}render(){return g`
|
|
171
171
|
<div class="card">
|
|
172
172
|
<div class="pill">XactSize${this.brandName?" x "+this.brandName:""}</div>
|
|
173
173
|
<h2 class="title">${n("Let's find your perfect size")}</h2>
|
|
@@ -219,7 +219,7 @@
|
|
|
219
219
|
<span>${e}</span>
|
|
220
220
|
</div>
|
|
221
221
|
</div>
|
|
222
|
-
`}};U.styles=
|
|
222
|
+
`}};U.styles=I`
|
|
223
223
|
:host {
|
|
224
224
|
display: block;
|
|
225
225
|
font-family: 'Inter', 'Helvetica', Arial, sans-serif;
|
|
@@ -394,7 +394,7 @@
|
|
|
394
394
|
grid-template-columns: 1fr;
|
|
395
395
|
}
|
|
396
396
|
}
|
|
397
|
-
`,ae([p({type:Number})],U.prototype,"height",2),ae([p({type:String})],U.prototype,"brandName",2),ae([p({type:Function})],U.prototype,"onStartMeasurement",2),U=ae([P("xact-step-one"),Y()],U);var Bt=Object.getOwnPropertyDescriptor,Ft=(a,e,t,i)=>{for(var s=i>1?void 0:i?Bt(e,t):e,o=a.length-1,r;o>=0;o--)(r=a[o])&&(s=r(s)||s);return s};let be=class extends
|
|
397
|
+
`,ae([p({type:Number})],U.prototype,"height",2),ae([p({type:String})],U.prototype,"brandName",2),ae([p({type:Function})],U.prototype,"onStartMeasurement",2),U=ae([P("xact-step-one"),Y()],U);var Bt=Object.getOwnPropertyDescriptor,Ft=(a,e,t,i)=>{for(var s=i>1?void 0:i?Bt(e,t):e,o=a.length-1,r;o>=0;o--)(r=a[o])&&(s=r(s)||s);return s};let be=class extends v{render(){return g`
|
|
398
398
|
<footer class="modal-footer">
|
|
399
399
|
<span>
|
|
400
400
|
<span class="powered-by">${n("Powered by")}</span>
|
|
@@ -437,7 +437,7 @@
|
|
|
437
437
|
</a>
|
|
438
438
|
</span>
|
|
439
439
|
</footer>
|
|
440
|
-
`}};be.styles=
|
|
440
|
+
`}};be.styles=I`
|
|
441
441
|
.modal-footer {
|
|
442
442
|
text-align: center;
|
|
443
443
|
font-size: 12px;
|
|
@@ -473,7 +473,7 @@
|
|
|
473
473
|
outline: 2px solid var(--brand-primary);
|
|
474
474
|
outline-offset: 2px;
|
|
475
475
|
}
|
|
476
|
-
`,be=Ft([P("xact-footer"),Y()],be);var zt=Object.defineProperty,jt=Object.getOwnPropertyDescriptor,
|
|
476
|
+
`,be=Ft([P("xact-footer"),Y()],be);var zt=Object.defineProperty,jt=Object.getOwnPropertyDescriptor,C=(a,e,t,i)=>{for(var s=i>1?void 0:i?jt(e,t):e,o=a.length-1,r;o>=0;o--)(r=a[o])&&(s=(i?r(e,t,s):r(s))||s);return i&&s&&zt(e,t,s),s};let y=class extends v{constructor(){super(...arguments),this.productName="",this.recommendedSize="",this.productSku="",this.garmentUrl="",this.generatedImageUrl="",this.isVtonFetching=!1,this.vtonError=!1}render(){return g`
|
|
477
477
|
<div class="image-container">
|
|
478
478
|
<!-- Product image -->
|
|
479
479
|
<img
|
|
@@ -584,7 +584,7 @@
|
|
|
584
584
|
<xact-button @click=${this.onAccept} label=${n("Accept Suggestion")}>
|
|
585
585
|
</xact-button>
|
|
586
586
|
</div>
|
|
587
|
-
`}};y.styles=
|
|
587
|
+
`}};y.styles=I`
|
|
588
588
|
:host {
|
|
589
589
|
display: flex;
|
|
590
590
|
flex-direction: column;
|
|
@@ -666,7 +666,7 @@
|
|
|
666
666
|
background-position: 200% center;
|
|
667
667
|
}
|
|
668
668
|
}
|
|
669
|
-
`,
|
|
669
|
+
`,C([p({type:String})],y.prototype,"productName",2),C([p({type:String})],y.prototype,"recommendedSize",2),C([p({type:String})],y.prototype,"productSku",2),C([p({type:String})],y.prototype,"garmentUrl",2),C([p({type:String})],y.prototype,"generatedImageUrl",2),C([p({type:Boolean})],y.prototype,"isVtonFetching",2),C([p({type:Boolean})],y.prototype,"vtonError",2),C([p({type:Function})],y.prototype,"onAccept",2),C([p({type:Function})],y.prototype,"onRetry",2),y=C([P("xact-step-result"),Y()],y);var Gt=Object.defineProperty,Zt=Object.getOwnPropertyDescriptor,ve=(a,e,t,i)=>{for(var s=i>1?void 0:i?Zt(e,t):e,o=a.length-1,r;o>=0;o--)(r=a[o])&&(s=(i?r(e,t,s):r(s))||s);return i&&s&&Gt(e,t,s),s};let K=class extends v{constructor(){super(...arguments),this.height=0}render(){const a=Array.from({length:24},(e,t)=>t);return g`
|
|
670
670
|
<div class="component-content">
|
|
671
671
|
<div class="header-section">
|
|
672
672
|
<h2 class="header-text">${n("Before you begin")}</h2>
|
|
@@ -810,7 +810,7 @@
|
|
|
810
810
|
style="left:${t}%; animation-delay:${i}s, ${s}s;"
|
|
811
811
|
></span>`})}
|
|
812
812
|
</div>
|
|
813
|
-
`}};K.styles=
|
|
813
|
+
`}};K.styles=I`
|
|
814
814
|
:host {
|
|
815
815
|
display: flex;
|
|
816
816
|
justify-content: center;
|
|
@@ -1001,7 +1001,7 @@
|
|
|
1001
1001
|
50% { transform: translateX(22px); }
|
|
1002
1002
|
}
|
|
1003
1003
|
|
|
1004
|
-
`,Ce([p({type:Number})],K.prototype,"height",2),Ce([p({type:Function})],K.prototype,"onStep2advancement",2),K=Ce([P("xact-step-informs"),Y()],K);const We="data:image/svg+xml,%3csvg%20width='22'%20height='40'%20viewBox='0%200%2022%2040'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M21.517%200L0%2013.3362V0H21.517Z'%20fill='white'/%3e%3cpath%20d='M21.517%2013.339L0%2026.6724V13.3362H21.517V13.339Z'%20fill='white'/%3e%3cpath%20d='M21.517%2026.6755L0%2040.0089V26.6726H21.517V26.6755Z'%20fill='%231C28BA'/%3e%3c/svg%3e",qt="data:image/svg+xml,%3csvg%20width='22'%20height='41'%20viewBox='0%200%2022%2041'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M21.517%200.00878906L0%2013.345V0.00878906H21.517Z'%20fill='white'/%3e%3cpath%20d='M21.517%2013.3478L0%2026.6812V13.345H21.517V13.3478Z'%20fill='%231C28BA'/%3e%3cpath%20d='M21.517%2026.6843L0%2040.0176V26.6814H21.517V26.6843Z'%20fill='white'/%3e%3c/svg%3e",Yt="data:image/svg+xml,%3csvg%20width='22'%20height='41'%20viewBox='0%200%2022%2041'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M21.517%200.0204381L0%2013.3538V0.0175781H21.517V0.0204381Z'%20fill='%231C28BA'/%3e%3cpath%20d='M21.517%2013.3538L0%2026.69V13.3538H21.517Z'%20fill='white'/%3e%3cpath%20d='M21.517%2026.693L0%2040.0264V26.6902H21.517V26.693Z'%20fill='white'/%3e%3c/svg%3e",N=class N{constructor(){this.audioContext=null,this.playbackCtx=null,this.stream=null,this.processor=null,this.source=null,this.audioPlaybackQueue=[],this.isPlaying=!1,this.isUserSpeaking=!1,this.speechTimeout=null}get isPlaybackActive(){return this.isPlaying||this.audioPlaybackQueue.length>0}async startMicrophone(e){try{this.stream=await navigator.mediaDevices.getUserMedia({audio:{sampleRate:16e3,channelCount:1,echoCancellation:!0}}),this.audioContext=new AudioContext({sampleRate:16e3}),this.source=this.audioContext.createMediaStreamSource(this.stream),this.processor=this.audioContext.createScriptProcessor(4096,1,1),this.processor.onaudioprocess=t=>{const i=t.inputBuffer.getChannelData(0);let s=0;for(let d=0;d<i.length;d++)s+=i[d]*i[d];Math.sqrt(s/i.length)>N.SPEECH_THRESHOLD&&(this.isUserSpeaking=!0,this.speechTimeout&&clearTimeout(this.speechTimeout),this.speechTimeout=window.setTimeout(()=>{this.isUserSpeaking=!1},N.SPEECH_HOLD_TIME));const r=this.float32ToInt16(i);e(r.buffer)},this.source.connect(this.processor),this.processor.connect(this.audioContext.destination)}catch(t){console.error("Microphone access denied or error:",t)}}float32ToInt16(e){const t=new Int16Array(e.length);for(let i=0;i<e.length;i++){const s=Math.max(-1,Math.min(1,e[i]));t[i]=s<0?s*32768:s*32767}return t}initPlayback(){this.playbackCtx||(this.playbackCtx=new AudioContext({sampleRate:24e3}))}queueAudio(e){this.audioPlaybackQueue.push(e),this.playNextChunk()}playNextChunk(){if(this.isPlaying||this.audioPlaybackQueue.length===0)return;this.initPlayback();const e=this.audioPlaybackQueue.shift();this.isPlaying=!0;const t=new Int16Array(e),i=new Float32Array(t.length);for(let r=0;r<t.length;r++)i[r]=t[r]/32767;const s=this.playbackCtx.createBuffer(1,i.length,24e3);s.copyToChannel(i,0);const o=this.playbackCtx.createBufferSource();o.buffer=s,o.connect(this.playbackCtx.destination),o.onended=()=>{this.isPlaying=!1,this.audioPlaybackQueue.length===0&&this.onQueueDrained&&this.onQueueDrained(),this.playNextChunk()},o.start()}clearPlaybackQueue(){this.audioPlaybackQueue=[]}stopAll(){this.clearPlaybackQueue(),this.processor&&this.source&&(this.processor.disconnect(),this.source.disconnect()),this.stream&&(this.stream.getTracks().forEach(e=>e.stop()),this.stream=null),this.audioContext&&(this.audioContext.close(),this.audioContext=null),this.playbackCtx&&(this.playbackCtx.close(),this.playbackCtx=null)}};N.SPEECH_THRESHOLD=.02,N.SPEECH_HOLD_TIME=1500;let ve=N;const oe=class oe{constructor(e,t,i="en"){this.ws=null,this.introSent=!1,this.introComplete=!1,this.lastCvError="",this.lastCvErrorTime=0,this.measurementComplete=!1,this.isDisconnected=!1,this.apiUrl=e,this.apiKey=t,this.localeCode=i,this.audioManager=new ve}async connect(){try{const e=await fetch(`${this.apiUrl}/api/ConversationalAI/ticket`,{method:"POST",headers:{"Content-Type":"application/json","X-Api-Key":this.apiKey}});if(this.isDisconnected){console.log("AI session was disconnected before ticket response.");return}if(!e.ok){console.error("Failed to get ticket",e.statusText);return}const t=await e.json();if(!t||!t.ticket_id){console.error("Invalid ticket response");return}if(this.isDisconnected){console.log("AI session was disconnected before websocket could be opened.");return}const i="wss://conversational-ai-service-923169850574.southamerica-east1.run.app",s=crypto.randomUUID(),o=`${i}/ws/chat/${s}/${t.ticket_id}`;this.ws=new WebSocket(o),this.ws.binaryType="arraybuffer",this.ws.onopen=()=>{console.log("AI session connected."),!this.introSent&&this.ws&&this.ws.readyState===WebSocket.OPEN&&(this.introSent=!0,this.ws.send(JSON.stringify({cv_alert:`Measurement process started! The user speaks ${this.localeCode}.`})))},this.ws.onmessage=r=>{if(r.data instanceof ArrayBuffer){this.audioManager.queueAudio(r.data);return}try{const d=JSON.parse(r.data);switch(d.type){case"user":break;case"gemini":break;case"interrupted":this.audioManager.clearPlaybackQueue();break;case"error":console.error("AI session error:",d.error);break;case"turn_complete":this.handleTurnComplete();break}}catch(d){console.error("Error parsing WS message:",d)}},this.ws.onclose=r=>{r.code===4003&&console.error("Ticket was invalid or expired"),console.log("AI session disconnected.")},this.ws.onerror=r=>{console.error("AI Session WebSocket Error:",r)}}catch(e){console.error("Failed to connect to AI session:",e)}}handleTurnComplete(){if(!this.introComplete){this.audioManager.onQueueDrained=()=>{this.audioManager.onQueueDrained=void 0,this.introComplete=!0,console.log("AI introduction audio finished. CV errors now enabled.")},this.audioManager.isPlaybackActive||(this.audioManager.onQueueDrained=void 0,this.introComplete=!0,console.log("AI introduction complete (no audio). CV errors now enabled."));return}if(this.measurementComplete){this.audioManager.onQueueDrained=()=>{this.audioManager.onQueueDrained=void 0,console.log("AI goodbye audio finished. Disconnecting session."),this.onTurnComplete&&this.onTurnComplete(),this.disconnect()},this.audioManager.isPlaybackActive||(this.audioManager.onQueueDrained=void 0,console.log("AI goodbye complete (no audio). Disconnecting session."),this.onTurnComplete&&this.onTurnComplete(),this.disconnect());return}}startMicrophone(){this.measurementComplete||(this.audioManager.initPlayback(),this.audioManager.startMicrophone(e=>{this.ws&&this.ws.readyState===WebSocket.OPEN&&this.ws.send(e)}))}forwardCvError(e){if(!this.introComplete||this.measurementComplete||this.audioManager.isUserSpeaking)return;const t=Date.now(),i=e===this.lastCvError,s=t-this.lastCvErrorTime<oe.CV_ERROR_THROTTLE_MS;i&&s||(this.lastCvError=e,this.lastCvErrorTime=t,this.ws&&this.ws.readyState===WebSocket.OPEN&&this.ws.send(JSON.stringify({cv_alert:e})))}notifySuccess(e,t=""){this.measurementComplete=!0,this.audioManager.clearPlaybackQueue(),console.log("Sending success message to AI session",e,t),this.ws&&this.ws.readyState===WebSocket.OPEN&&this.ws.send(JSON.stringify({cv_alert:`SYSTEM ALERT: Measurement is complete! Recommended size: ${e}. ${t?`Extra context: ${t}. `:""}INSTRUCTION: Embody your persona! Enthusiastically reveal their size, offer a quick fashion compliment, and gracefully say goodbye.`}))}disconnect(){this.isDisconnected=!0,this.audioManager.stopAll(),this.ws&&(this.ws.close(1e3,"Measurement complete"),this.ws=null)}};oe.CV_ERROR_THROTTLE_MS=6e3;let xe=oe;var Wt=Object.defineProperty,Kt=Object.getOwnPropertyDescriptor,u=(a,e,t,i)=>{for(var s=i>1?void 0:i?Kt(e,t):e,o=a.length-1,r;o>=0;o--)(r=a[o])&&(s=(i?r(e,t,s):r(s))||s);return i&&s&&Wt(e,t,s),s};const{getLocale:Qt,setLocale:we}=Lt({sourceLocale:Ye,targetLocales:Ot,loadLocale:a=>V(Object.assign({"./generated/locales/es-MX.ts":()=>Promise.resolve().then(()=>Jt),"./generated/locales/pt-BR.ts":()=>Promise.resolve().then(()=>ti)}),`./generated/locales/${a}.ts`,4)});c.BodyMeasurer=class extends C{constructor(){super(...arguments),this.spinnerFrame=0,this.apiKey="",this.tenantId="1",this.productSku="123456",this.baseUrl="https://xactsize-dotnet-api-923169850574.southamerica-east1.run.app",this.apiUrl=this.baseUrl+"/api/measurer/measure/body",this.vtonUrl=this.baseUrl+"/api/VirtualTryOn/generate",this.garmentUrl="",this.vton=!1,this.brandName=void 0,this.buttonText="",this._culture="pt-BR",this.measurerKey="",this._isLocaleLoading=!1,this.showModal=!1,this.step=1,this.height=0,this.recommendedSize="",this.measurements={},this.errorMessage="",this.instructionMessage=n("Position yourself in front of the camera"),this.shouldStartMeasurement=!1,this.isLoading=!1,this.isFetching=!1,this.generatedImageUrl="",this.isVtonFetching=!1,this.vtonError=!1,this.videoElement=null,this.stream=null,this.poolingTimeout=null,this.instructionMessageTimeout=null,this.aiSession=null,this.cameras=[],this.currentCameraId=null,this.snowflakesCache=null}firstUpdated(){this.startSpinnerAnimation()}startSpinnerAnimation(){const e=[Yt,qt,We];this.spinnerInterval=setInterval(()=>{var i;const t=(i=this.shadowRoot)==null?void 0:i.querySelector(".spinner");t&&(t.src=e[this.spinnerFrame],this.spinnerFrame=(this.spinnerFrame+1)%e.length)},300)}get culture(){return this._culture}set culture(e){const t=this._culture;this._culture=e,this.requestUpdate("culture",t),this._applyLocale(e).catch(console.error)}async _applyLocale(e){try{this._isLocaleLoading=!0,this.requestUpdate(),await we(e)}catch(t){console.error("Failed to load locale",e,t),await we(Ye)}finally{this._isLocaleLoading=!1,this.requestUpdate()}}get errorMap(){return{ERR_RIGHT_ARM_TOO_HIGH:n("Lower your right arm",{id:"ERR_RIGHT_ARM_TOO_HIGH"}),ERR_LEFT_ARM_TOO_HIGH:n("Lower your left arm",{id:"ERR_LEFT_ARM_TOO_HIGH"}),ERR_ARMS_NOT_RAISED:n("Raise both arms to a 45-degree angle",{id:"ERR_ARMS_NOT_RAISED"}),ERR_RIGHT_ARM_NOT_RAISED:n("Raise your right arm to a 45-degree angle",{id:"ERR_RIGHT_ARM_NOT_RAISED"}),ERR_LEFT_ARM_NOT_RAISED:n("Raise your left arm to a 45-degree angle",{id:"ERR_LEFT_ARM_NOT_RAISED"}),ERR_BODY_LANDMARKS_NOT_DETECTED:n("Ensure your full body is visible in the camera",{id:"ERR_BODY_LANDMARKS_NOT_DETECTED"}),ERR_HIPS_NOT_VISIBLE:n("Adjust your position to show your hips",{id:"ERR_HIPS_NOT_VISIBLE"}),ERR_TOO_CLOSE_TO_CAMERA:n("Step back from the camera",{id:"ERR_TOO_CLOSE_TO_CAMERA"}),ERR_NOT_SIDE_VIEW:n("Turn to show your side profile",{id:"ERR_NOT_SIDE_VIEW"}),ERR_INVALID_CLOTHING_TYPE:n("This clothing type is not supported; please contact support",{id:"ERR_INVALID_CLOTHING_TYPE"}),ERR_UPPER_BODY_NOT_VISIBLE:n("Adjust your position to show your upper body",{id:"ERR_UPPER_BODY_NOT_VISIBLE"}),ERR_HEAD_TOO_CLOSE_TO_EDGE:n("Move your head away from the edge of the frame",{id:"ERR_HEAD_TOO_CLOSE_TO_EDGE"}),ERR_LOWER_BODY_NOT_VISIBLE:n("Adjust your position to show your lower body",{id:"ERR_LOWER_BODY_NOT_VISIBLE"}),ERR_FEET_TOO_CLOSE_TO_EDGE:n("Move your feet away from the edge of the frame",{id:"ERR_FEET_TOO_CLOSE_TO_EDGE"}),ERR_BODY_TOO_CLOSE_TO_EDGE:n("Move your body away from the edge of the frame",{id:"ERR_BODY_TOO_CLOSE_TO_EDGE"}),ERR_BODY_TOO_CLOSE_TO_EDGE_MOVE_LEFT:n("Move to the left to center your body",{id:"ERR_BODY_TOO_CLOSE_TO_EDGE_MOVE_LEFT"}),ERR_BODY_TOO_CLOSE_TO_EDGE_MOVE_RIGHT:n("Move to the right to center your body",{id:"ERR_BODY_TOO_CLOSE_TO_EDGE_MOVE_RIGHT"}),ERR_SHOULDERS_NOT_VISIBLE:n("Adjust your position to show your shoulders",{id:"ERR_SHOULDERS_NOT_VISIBLE"}),ERR_HEIGHT_MEASUREMENT_FAILED:n("Stand straight and ensure your full body is visible",{id:"ERR_HEIGHT_MEASUREMENT_FAILED"}),ERR_HEAD_POINT_NOT_DETECTED:n("Ensure your head is fully visible in the frame",{id:"ERR_HEAD_POINT_NOT_DETECTED"}),ERR_INCORRECT_POSTURE:n("Stand straight with your shoulders back",{id:"ERR_INCORRECT_POSTURE"}),ERR_HEM_MEASUREMENT_FAILED:n("Ensure your clothing hem is visible and clear",{id:"ERR_HEM_MEASUREMENT_FAILED"}),ERR_SHOULDER_MEASUREMENT_FAILED:n("Keep your shoulders relaxed and visible",{id:"ERR_SHOULDER_MEASUREMENT_FAILED"}),ERR_ARM_NOT_STRETCHED:n("Stretch your arms fully",{id:"ERR_ARM_NOT_STRETCHED"}),ERR_LEGS_NOT_DETECTED:n("Ensure your legs are fully visible in the frame",{id:"ERR_LEGS_NOT_DETECTED"}),ERR_HIPS_MEASUREMENT_FAILED:n("Stand straight and ensure your hips are visible",{id:"ERR_HIPS_MEASUREMENT_FAILED"}),ERR_WAIST_MEASUREMENT_FAILED:n("Stand straight and ensure your waist is visible",{id:"ERR_WAIST_MEASUREMENT_FAILED"}),ERR_INVALID_MEASURE_SIDE_VIEW:n("Turn to show a clear side profile",{id:"ERR_INVALID_MEASURE_SIDE_VIEW"}),ERR_INVALID_BODY_HEIGHT_TYPE:n("Ensure your full body is visible for height measurement",{id:"ERR_INVALID_BODY_HEIGHT_TYPE"}),ERR_IMAGE_LOAD_FAILED:n("Try again later; the image could not be processed",{id:"ERR_IMAGE_LOAD_FAILED"}),ERR_HEIGHT_INVALID:n("Height must be between 50 and 300 cm",{id:"ERR_HEIGHT_INVALID"})}}getTranslatedMessage(e){const t=this.errorMap[e];return t||(console.info("Error code is missing",e),n("An unexpected error occurred"))}connectedCallback(){super.connectedCallback(),console.log("New code loaded Jan 27 11:57am"),document.addEventListener("keydown",this.handleEscKey.bind(this)),this.snowflakesCache=this.generateSnowflakes()}disconnectedCallback(){var e;super.disconnectedCallback(),document.removeEventListener("keydown",this.handleEscKey.bind(this)),this.stopPolling(),clearInterval(this.spinnerInterval),(e=this.aiSession)==null||e.disconnect()}handleEscKey(e){e.key==="Escape"&&this.showModal&&this.closeModal()}openModal(){this.showModal=!0,this.step=1,this.height=0,this.instructionMessage=n("Position yourself in front of the camera")}closeModal(){var e;this.showModal=!1,this.onMeasurementCanceled&&typeof this.onMeasurementCanceled=="function"&&this.onMeasurementCanceled(),this.stopPolling(),(e=this.aiSession)==null||e.disconnect(),this.dispatchEvent(new CustomEvent("measurementCanceled",{detail:{}}))}async step2advancement(){if(this.height<50||this.height>300){this.errorMessage=this.getTranslatedMessage("ERR_HEIGHT_INVALID");return}this.step=3,this.errorMessage=""}async startMeasurement(){this.step=3,this.errorMessage="",this.shouldStartMeasurement=!0}updated(e){super.updated(e),e.has("step")&&this.step===3&&this.shouldStartMeasurement&&(this.initializeMeasurement(),this.shouldStartMeasurement=!1)}async initializeMeasurement(){if(!this.apiKey)throw new Error("API key is required");if(!this.tenantId)throw new Error("Tenant ID is required");if(!this.productSku)throw new Error("Product SKU is required");if(!this.baseUrl)throw new Error("Base URL is required");if(!this.apiUrl)throw new Error("API URL is required");if(!this.vtonUrl)throw new Error("VTON URL is required");this.videoElement=this.shadowRoot.querySelector("video");try{this.stream=await navigator.mediaDevices.getUserMedia({video:!0}),this.videoElement&&(this.videoElement.srcObject=this.stream,await this.videoElement.play(),await this.loadCameras(),this.aiSession=new xe(this.baseUrl,this.apiKey,this.culture),await this.aiSession.connect(),this.aiSession.startMicrophone(),this.startPolling())}catch{this.errorMessage=n("Error accessing webcam")}}async loadCameras(){try{const e=await navigator.mediaDevices.enumerateDevices();this.cameras=e.filter(t=>t.kind==="videoinput"),this.cameras.length>0&&(this.currentCameraId=this.cameras[0].deviceId)}catch(e){console.error("Error enumerating devices:",e)}}async flipCamera(){if(this.cameras.length<2)return;this.isLoading=!0,this.stopPolling();const t=(this.cameras.findIndex(i=>i.deviceId===this.currentCameraId)+1)%this.cameras.length;this.currentCameraId=this.cameras[t].deviceId;try{this.stream&&this.stream.getTracks().forEach(i=>i.stop()),this.stream=await navigator.mediaDevices.getUserMedia({video:{deviceId:{exact:this.currentCameraId}}}),this.videoElement&&(this.videoElement.srcObject=this.stream,await this.videoElement.play(),this.startPolling())}catch{this.errorMessage=n("Error switching camera")}finally{this.isLoading=!1}}async startPolling(){const t=[],i=async()=>{var f;if(!this.videoElement||!this.stream||this.isFetching)return;const s=document.createElement("canvas");s.width=this.videoElement.videoWidth,s.height=this.videoElement.videoHeight;const o=s.getContext("2d");o==null||o.drawImage(this.videoElement,0,0,s.width,s.height);const r=await new Promise(m=>s.toBlob(h=>m(h),"image/jpeg")),d=new File([r],"frame.jpg",{type:"image/jpeg"}),l=new FormData;l.append("image",d),l.append("height",this.height.toString()),l.append("productSku",this.productSku),this.measurerKey&&l.append("measurerKey",this.measurerKey);try{this.isFetching=!0,this.isLoading=!0,this.poolingTimeout&&clearTimeout(this.poolingTimeout),this.instructionMessageTimeout&&clearTimeout(this.instructionMessageTimeout);const h=await(await fetch(this.apiUrl,{method:"POST",body:l,headers:{Accept:"application/json","Cache-Control":"no-store",Pragma:"no-cache","X-Api-Key":this.apiKey}})).json();if(this.isFetching=!1,this.isLoading=!1,h.success&&h.chosenSize){this.generateVtonImage(d),t.push(h);const b=t.length;this.instructionMessage=n(ge`Scanning... ${b}/${3}`),b>=3?(this.processFinalResults(t),this.stopPolling(),this.step=4):this.poolingTimeout=setTimeout(i,500)}else this.instructionMessage=this.getTranslatedMessage(h.message||"UNKNOWN_ERROR"),h.message&&((f=this.aiSession)==null||f.forwardCvError(this.instructionMessage)),this.instructionMessageTimeout=setTimeout(()=>{t.length<3&&(this.poolingTimeout=setTimeout(i,0))},2e3)}catch{this.isFetching=!1,this.isLoading=!1,this.instructionMessage=n("Error processing measurement"),this.instructionMessageTimeout=setTimeout(()=>{this.poolingTimeout=setTimeout(i,0)},2e3)}};i()}async generateVtonImage(e){if(!this.vton||!this.garmentUrl||this.isVtonFetching||this.generatedImageUrl)return;this.isVtonFetching=!0,this.vtonError=!1;const t=new FormData;t.append("PersonImage",e),t.append("GarmentUrl",this.garmentUrl);try{const s=await(await fetch(this.vtonUrl,{method:"POST",body:t,headers:{Accept:"application/json","X-Api-Key":this.apiKey}})).json();s.result_urls&&s.result_urls.length>0?(this.generatedImageUrl=s.result_urls[0],this.isVtonFetching=!1):(this.vtonError=!0,this.isVtonFetching=!1)}catch(i){console.error("Error generating VTON image",i),this.vtonError=!0,this.isVtonFetching=!1}}processFinalResults(e){console.group("Scan Debug Report"),console.log(`✅ Collected ${e.length} successful scans.`),e.forEach((d,l)=>{console.log(`Scan #${l+1}: Size [${d.chosenSize}] | Chest: ${d.measurements.chest} | Waist: ${d.measurements.waist}`)});const t={};Object.keys(e[0].measurements||{}).forEach(d=>{let l=0,f=0;e.forEach(m=>{const h=m.measurements[d];typeof h=="number"&&(l+=h,f++)}),t[d]=f>0?Math.round(l/f*100)/100:0}),console.log("📏 Final Averaged Measurements:",t);const s={};e.forEach(d=>{const l=d.chosenSize;l&&(s[l]=(s[l]||0)+1)}),console.log("🗳️ Voting Results:",s);let o="",r=0;for(const[d,l]of Object.entries(s))l>r&&(r=l,o=d);if(console.log(`🏆 WINNER: ${o}`),console.groupEnd(),this.measurements=t,this.recommendedSize=o,this.instructionMessage=n("Measurement successful!"),this.aiSession){this.aiSession.onTurnComplete=()=>{this.aiSession=null};let d="";this.vton&&(this.isVtonFetching?d="An image of the user wearing the garment is currently being generated. TELL USER THEIR IMAGE IS GENERATING.":this.generatedImageUrl&&(d="The image has successfully generated. TELL USER: 'Here is your image in the garment'.")),this.aiSession.notifySuccess(o,d)}}stopPolling(){this.poolingTimeout!==null&&(clearTimeout(this.poolingTimeout),this.poolingTimeout=null),this.instructionMessageTimeout!==null&&(clearTimeout(this.instructionMessageTimeout),this.instructionMessageTimeout=null),this.stream&&(this.stream.getTracks().forEach(e=>e.stop()),this.stream=null)}acceptMeasurement(){var e;this.dispatchEvent(new CustomEvent("measurementAccepted",{detail:{size:this.recommendedSize}})),this.onMeasurementAccepted&&typeof this.onMeasurementAccepted=="function"&&this.onMeasurementAccepted(),this.showModal=!1,this.stopPolling(),(e=this.aiSession)==null||e.disconnect(),this.aiSession=null}resetMeasurement(){var e;this.step=1,this.height=0,this.recommendedSize="",this.measurements={},this.generatedImageUrl="",this.isVtonFetching=!1,this.vtonError=!1,this.stopPolling(),(e=this.aiSession)==null||e.disconnect(),this.aiSession=null}stopMeasurement(){this.resetMeasurement(),this.showModal=!1}generateSnowflakes(){const e=[];for(let i=0;i<80;i++){const s=Math.random()*100,o=8+Math.random()*17,r=-Math.random()*30;e.push(g`<span
|
|
1004
|
+
`,ve([p({type:Number})],K.prototype,"height",2),ve([p({type:Function})],K.prototype,"onStep2advancement",2),K=ve([P("xact-step-informs"),Y()],K);const We="data:image/svg+xml,%3csvg%20width='22'%20height='40'%20viewBox='0%200%2022%2040'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M21.517%200L0%2013.3362V0H21.517Z'%20fill='white'/%3e%3cpath%20d='M21.517%2013.339L0%2026.6724V13.3362H21.517V13.339Z'%20fill='white'/%3e%3cpath%20d='M21.517%2026.6755L0%2040.0089V26.6726H21.517V26.6755Z'%20fill='%231C28BA'/%3e%3c/svg%3e",qt="data:image/svg+xml,%3csvg%20width='22'%20height='41'%20viewBox='0%200%2022%2041'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M21.517%200.00878906L0%2013.345V0.00878906H21.517Z'%20fill='white'/%3e%3cpath%20d='M21.517%2013.3478L0%2026.6812V13.345H21.517V13.3478Z'%20fill='%231C28BA'/%3e%3cpath%20d='M21.517%2026.6843L0%2040.0176V26.6814H21.517V26.6843Z'%20fill='white'/%3e%3c/svg%3e",Yt="data:image/svg+xml,%3csvg%20width='22'%20height='41'%20viewBox='0%200%2022%2041'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M21.517%200.0204381L0%2013.3538V0.0175781H21.517V0.0204381Z'%20fill='%231C28BA'/%3e%3cpath%20d='M21.517%2013.3538L0%2026.69V13.3538H21.517Z'%20fill='white'/%3e%3cpath%20d='M21.517%2026.693L0%2040.0264V26.6902H21.517V26.693Z'%20fill='white'/%3e%3c/svg%3e",N=class N{constructor(){this.audioContext=null,this.playbackCtx=null,this.stream=null,this.processor=null,this.source=null,this.audioPlaybackQueue=[],this.isPlaying=!1,this.isUserSpeaking=!1,this.speechTimeout=null}get isPlaybackActive(){return this.isPlaying||this.audioPlaybackQueue.length>0}async startMicrophone(e){try{this.stream=await navigator.mediaDevices.getUserMedia({audio:{sampleRate:16e3,channelCount:1,echoCancellation:!0}}),this.audioContext=new AudioContext({sampleRate:16e3}),this.source=this.audioContext.createMediaStreamSource(this.stream),this.processor=this.audioContext.createScriptProcessor(4096,1,1),this.processor.onaudioprocess=t=>{const i=t.inputBuffer.getChannelData(0);let s=0;for(let d=0;d<i.length;d++)s+=i[d]*i[d];Math.sqrt(s/i.length)>N.SPEECH_THRESHOLD&&(this.isUserSpeaking=!0,this.speechTimeout&&clearTimeout(this.speechTimeout),this.speechTimeout=window.setTimeout(()=>{this.isUserSpeaking=!1},N.SPEECH_HOLD_TIME));const r=this.float32ToInt16(i);e(r.buffer)},this.source.connect(this.processor),this.processor.connect(this.audioContext.destination)}catch(t){console.error("Microphone access denied or error:",t)}}float32ToInt16(e){const t=new Int16Array(e.length);for(let i=0;i<e.length;i++){const s=Math.max(-1,Math.min(1,e[i]));t[i]=s<0?s*32768:s*32767}return t}initPlayback(){this.playbackCtx||(this.playbackCtx=new AudioContext({sampleRate:24e3}))}queueAudio(e){this.audioPlaybackQueue.push(e),this.playNextChunk()}playNextChunk(){if(this.isPlaying||this.audioPlaybackQueue.length===0)return;this.initPlayback();const e=this.audioPlaybackQueue.shift();this.isPlaying=!0;const t=new Int16Array(e),i=new Float32Array(t.length);for(let r=0;r<t.length;r++)i[r]=t[r]/32767;const s=this.playbackCtx.createBuffer(1,i.length,24e3);s.copyToChannel(i,0);const o=this.playbackCtx.createBufferSource();o.buffer=s,o.connect(this.playbackCtx.destination),o.onended=()=>{this.isPlaying=!1,this.audioPlaybackQueue.length===0&&this.onQueueDrained&&this.onQueueDrained(),this.playNextChunk()},o.start()}clearPlaybackQueue(){this.audioPlaybackQueue=[]}stopAll(){this.clearPlaybackQueue(),this.processor&&this.source&&(this.processor.disconnect(),this.source.disconnect()),this.stream&&(this.stream.getTracks().forEach(e=>e.stop()),this.stream=null),this.audioContext&&(this.audioContext.close(),this.audioContext=null),this.playbackCtx&&(this.playbackCtx.close(),this.playbackCtx=null)}};N.SPEECH_THRESHOLD=.02,N.SPEECH_HOLD_TIME=1500;let Ce=N;const oe=class oe{constructor(e,t,i="en"){this.ws=null,this.introSent=!1,this.introComplete=!1,this.lastCvError="",this.lastCvErrorTime=0,this.measurementComplete=!1,this.isDisconnected=!1,this.apiUrl=e,this.apiKey=t,this.localeCode=i,this.audioManager=new Ce}async connect(){try{const e=await fetch(`${this.apiUrl}/api/ConversationalAI/ticket`,{method:"POST",headers:{"Content-Type":"application/json","X-Api-Key":this.apiKey}});if(this.isDisconnected){console.log("AI session was disconnected before ticket response.");return}if(!e.ok){console.error("Failed to get ticket",e.statusText);return}const t=await e.json();if(!t||!t.ticket_id){console.error("Invalid ticket response");return}if(this.isDisconnected){console.log("AI session was disconnected before websocket could be opened.");return}const i="wss://conversational-ai-service-923169850574.southamerica-east1.run.app",s=crypto.randomUUID(),o=`${i}/ws/chat/${s}/${t.ticket_id}`;this.ws=new WebSocket(o),this.ws.binaryType="arraybuffer",this.ws.onopen=()=>{console.log("AI session connected."),!this.introSent&&this.ws&&this.ws.readyState===WebSocket.OPEN&&(this.introSent=!0,this.ws.send(JSON.stringify({cv_alert:`Measurement process started! The user speaks ${this.localeCode}.`})))},this.ws.onmessage=r=>{if(r.data instanceof ArrayBuffer){this.audioManager.queueAudio(r.data);return}try{const d=JSON.parse(r.data);switch(d.type){case"user":break;case"gemini":break;case"interrupted":this.audioManager.clearPlaybackQueue();break;case"error":console.error("AI session error:",d.error);break;case"turn_complete":this.handleTurnComplete();break}}catch(d){console.error("Error parsing WS message:",d)}},this.ws.onclose=r=>{r.code===4003&&console.error("Ticket was invalid or expired"),console.log("AI session disconnected.")},this.ws.onerror=r=>{console.error("AI Session WebSocket Error:",r)}}catch(e){console.error("Failed to connect to AI session:",e)}}handleTurnComplete(){if(!this.introComplete){this.audioManager.onQueueDrained=()=>{this.audioManager.onQueueDrained=void 0,this.introComplete=!0,console.log("AI introduction audio finished. CV errors now enabled.")},this.audioManager.isPlaybackActive||(this.audioManager.onQueueDrained=void 0,this.introComplete=!0,console.log("AI introduction complete (no audio). CV errors now enabled."));return}if(this.measurementComplete){this.audioManager.onQueueDrained=()=>{this.audioManager.onQueueDrained=void 0,console.log("AI goodbye audio finished. Disconnecting session."),this.onTurnComplete&&this.onTurnComplete(),this.disconnect()},this.audioManager.isPlaybackActive||(this.audioManager.onQueueDrained=void 0,console.log("AI goodbye complete (no audio). Disconnecting session."),this.onTurnComplete&&this.onTurnComplete(),this.disconnect());return}}startMicrophone(){this.measurementComplete||(this.audioManager.initPlayback(),this.audioManager.startMicrophone(e=>{this.ws&&this.ws.readyState===WebSocket.OPEN&&this.ws.send(e)}))}forwardCvError(e){if(!this.introComplete||this.measurementComplete||this.audioManager.isUserSpeaking)return;const t=Date.now(),i=e===this.lastCvError,s=t-this.lastCvErrorTime<oe.CV_ERROR_THROTTLE_MS;i&&s||(this.lastCvError=e,this.lastCvErrorTime=t,this.ws&&this.ws.readyState===WebSocket.OPEN&&this.ws.send(JSON.stringify({cv_alert:e})))}notifySuccess(e,t=""){this.measurementComplete=!0,this.audioManager.clearPlaybackQueue(),console.log("Sending success message to AI session",e,t),this.ws&&this.ws.readyState===WebSocket.OPEN&&this.ws.send(JSON.stringify({cv_alert:`SYSTEM ALERT: Measurement is complete! Recommended size: ${e}. ${t?`Extra context: ${t}. `:""}INSTRUCTION: Embody your persona! Enthusiastically reveal their size, offer a quick fashion compliment, and gracefully say goodbye.`}))}disconnect(){this.isDisconnected=!0,this.audioManager.stopAll(),this.ws&&(this.ws.close(1e3,"Measurement complete"),this.ws=null)}};oe.CV_ERROR_THROTTLE_MS=6e3;let xe=oe;var Wt=Object.defineProperty,Kt=Object.getOwnPropertyDescriptor,u=(a,e,t,i)=>{for(var s=i>1?void 0:i?Kt(e,t):e,o=a.length-1,r;o>=0;o--)(r=a[o])&&(s=(i?r(e,t,s):r(s))||s);return i&&s&&Wt(e,t,s),s};const{getLocale:Xt,setLocale:we}=Lt({sourceLocale:Ye,targetLocales:Ot,loadLocale:a=>V(Object.assign({"./generated/locales/es-MX.ts":()=>Promise.resolve().then(()=>Jt),"./generated/locales/pt-BR.ts":()=>Promise.resolve().then(()=>ti)}),`./generated/locales/${a}.ts`,4)});c.BodyMeasurer=class extends v{constructor(){super(...arguments),this.spinnerFrame=0,this.apiKey="",this.tenantId="1",this.productSku="123456",this.baseUrl="https://xactsize-dotnet-api-923169850574.southamerica-east1.run.app",this.apiUrl=this.baseUrl+"/api/measurer/measure/body",this.vtonUrl=this.baseUrl+"/api/VirtualTryOn/generate",this.garmentUrl="",this.vton=!1,this.brandName=void 0,this.buttonText="",this._culture="pt-BR",this.measurerKey="",this._isLocaleLoading=!1,this.showModal=!1,this.step=1,this.height=0,this.recommendedSize="",this.measurements={},this.errorMessage="",this.instructionMessage=n("Position yourself in front of the camera"),this.shouldStartMeasurement=!1,this.isLoading=!1,this.isFetching=!1,this.generatedImageUrl="",this.isVtonFetching=!1,this.vtonError=!1,this.videoElement=null,this.stream=null,this.poolingTimeout=null,this.instructionMessageTimeout=null,this.aiSession=null,this.sessionActive=!1,this.cameras=[],this.currentCameraId=null,this.snowflakesCache=null}firstUpdated(){this.startSpinnerAnimation()}startSpinnerAnimation(){const e=[Yt,qt,We];this.spinnerInterval=setInterval(()=>{var i;const t=(i=this.shadowRoot)==null?void 0:i.querySelector(".spinner");t&&(t.src=e[this.spinnerFrame],this.spinnerFrame=(this.spinnerFrame+1)%e.length)},300)}get culture(){return this._culture}set culture(e){const t=this._culture;this._culture=e,this.requestUpdate("culture",t),this._applyLocale(e).catch(console.error)}async _applyLocale(e){try{this._isLocaleLoading=!0,this.requestUpdate(),await we(e)}catch(t){console.error("Failed to load locale",e,t),await we(Ye)}finally{this._isLocaleLoading=!1,this.requestUpdate()}}get errorMap(){return{ERR_RIGHT_ARM_TOO_HIGH:n("Lower your right arm",{id:"ERR_RIGHT_ARM_TOO_HIGH"}),ERR_LEFT_ARM_TOO_HIGH:n("Lower your left arm",{id:"ERR_LEFT_ARM_TOO_HIGH"}),ERR_ARMS_NOT_RAISED:n("Raise both arms to a 45-degree angle",{id:"ERR_ARMS_NOT_RAISED"}),ERR_RIGHT_ARM_NOT_RAISED:n("Raise your right arm to a 45-degree angle",{id:"ERR_RIGHT_ARM_NOT_RAISED"}),ERR_LEFT_ARM_NOT_RAISED:n("Raise your left arm to a 45-degree angle",{id:"ERR_LEFT_ARM_NOT_RAISED"}),ERR_BODY_LANDMARKS_NOT_DETECTED:n("Ensure your full body is visible in the camera",{id:"ERR_BODY_LANDMARKS_NOT_DETECTED"}),ERR_HIPS_NOT_VISIBLE:n("Adjust your position to show your hips",{id:"ERR_HIPS_NOT_VISIBLE"}),ERR_TOO_CLOSE_TO_CAMERA:n("Step back from the camera",{id:"ERR_TOO_CLOSE_TO_CAMERA"}),ERR_NOT_SIDE_VIEW:n("Turn to show your side profile",{id:"ERR_NOT_SIDE_VIEW"}),ERR_INVALID_CLOTHING_TYPE:n("This clothing type is not supported; please contact support",{id:"ERR_INVALID_CLOTHING_TYPE"}),ERR_UPPER_BODY_NOT_VISIBLE:n("Adjust your position to show your upper body",{id:"ERR_UPPER_BODY_NOT_VISIBLE"}),ERR_HEAD_TOO_CLOSE_TO_EDGE:n("Move your head away from the edge of the frame",{id:"ERR_HEAD_TOO_CLOSE_TO_EDGE"}),ERR_LOWER_BODY_NOT_VISIBLE:n("Adjust your position to show your lower body",{id:"ERR_LOWER_BODY_NOT_VISIBLE"}),ERR_FEET_TOO_CLOSE_TO_EDGE:n("Move your feet away from the edge of the frame",{id:"ERR_FEET_TOO_CLOSE_TO_EDGE"}),ERR_BODY_TOO_CLOSE_TO_EDGE:n("Move your body away from the edge of the frame",{id:"ERR_BODY_TOO_CLOSE_TO_EDGE"}),ERR_BODY_TOO_CLOSE_TO_EDGE_MOVE_LEFT:n("Move to the left to center your body",{id:"ERR_BODY_TOO_CLOSE_TO_EDGE_MOVE_LEFT"}),ERR_BODY_TOO_CLOSE_TO_EDGE_MOVE_RIGHT:n("Move to the right to center your body",{id:"ERR_BODY_TOO_CLOSE_TO_EDGE_MOVE_RIGHT"}),ERR_SHOULDERS_NOT_VISIBLE:n("Adjust your position to show your shoulders",{id:"ERR_SHOULDERS_NOT_VISIBLE"}),ERR_HEIGHT_MEASUREMENT_FAILED:n("Stand straight and ensure your full body is visible",{id:"ERR_HEIGHT_MEASUREMENT_FAILED"}),ERR_HEAD_POINT_NOT_DETECTED:n("Ensure your head is fully visible in the frame",{id:"ERR_HEAD_POINT_NOT_DETECTED"}),ERR_INCORRECT_POSTURE:n("Stand straight with your shoulders back",{id:"ERR_INCORRECT_POSTURE"}),ERR_HEM_MEASUREMENT_FAILED:n("Ensure your clothing hem is visible and clear",{id:"ERR_HEM_MEASUREMENT_FAILED"}),ERR_SHOULDER_MEASUREMENT_FAILED:n("Keep your shoulders relaxed and visible",{id:"ERR_SHOULDER_MEASUREMENT_FAILED"}),ERR_ARM_NOT_STRETCHED:n("Stretch your arms fully",{id:"ERR_ARM_NOT_STRETCHED"}),ERR_LEGS_NOT_DETECTED:n("Ensure your legs are fully visible in the frame",{id:"ERR_LEGS_NOT_DETECTED"}),ERR_HIPS_MEASUREMENT_FAILED:n("Stand straight and ensure your hips are visible",{id:"ERR_HIPS_MEASUREMENT_FAILED"}),ERR_WAIST_MEASUREMENT_FAILED:n("Stand straight and ensure your waist is visible",{id:"ERR_WAIST_MEASUREMENT_FAILED"}),ERR_INVALID_MEASURE_SIDE_VIEW:n("Turn to show a clear side profile",{id:"ERR_INVALID_MEASURE_SIDE_VIEW"}),ERR_INVALID_BODY_HEIGHT_TYPE:n("Ensure your full body is visible for height measurement",{id:"ERR_INVALID_BODY_HEIGHT_TYPE"}),ERR_IMAGE_LOAD_FAILED:n("Try again later; the image could not be processed",{id:"ERR_IMAGE_LOAD_FAILED"}),ERR_HEIGHT_INVALID:n("Height must be between 50 and 300 cm",{id:"ERR_HEIGHT_INVALID"})}}getTranslatedMessage(e){const t=this.errorMap[e];return t||(console.info("Error code is missing",e),n("An unexpected error occurred"))}trackAnalytics(e,t={}){if(!(!this.baseUrl||!this.tenantId))try{const i={tenantId:this.tenantId,timestamp:new Date().toISOString(),...t};fetch(`${this.baseUrl}/api/analytics${e}`,{method:"POST",headers:{"Content-Type":"application/json",...this.apiKey?{"X-API-Key":this.apiKey}:{}},body:JSON.stringify(i),keepalive:!0}).catch(s=>console.error("Analytics fetch error:",s))}catch(i){console.error("Analytics error:",i)}}connectedCallback(){super.connectedCallback(),console.log("New code loaded Jan 27 11:57am"),document.addEventListener("keydown",this.handleEscKey.bind(this)),this.snowflakesCache=this.generateSnowflakes()}disconnectedCallback(){var e;super.disconnectedCallback(),document.removeEventListener("keydown",this.handleEscKey.bind(this)),this.stopPolling(),clearInterval(this.spinnerInterval),(e=this.aiSession)==null||e.disconnect(),this.sessionActive&&(this.trackAnalytics("/session-ended"),this.sessionActive=!1)}handleEscKey(e){e.key==="Escape"&&this.showModal&&this.closeModal()}openModal(){this.trackAnalytics("/click"),this.showModal=!0,this.step=1,this.height=0,this.instructionMessage=n("Position yourself in front of the camera")}closeModal(){var e;this.step===4&&this.trackAnalytics("/measurement-declined",{sku:this.productSku,measurementData:JSON.stringify(this.measurements)}),this.showModal=!1,this.onMeasurementCanceled&&typeof this.onMeasurementCanceled=="function"&&this.onMeasurementCanceled(),this.stopPolling(),(e=this.aiSession)==null||e.disconnect(),this.dispatchEvent(new CustomEvent("measurementCanceled",{detail:{}})),this.sessionActive&&(this.trackAnalytics("/session-ended"),this.sessionActive=!1)}handleDialogClose(){this.showModal&&this.closeModal()}async step2advancement(){if(this.height<50||this.height>300){this.errorMessage=this.getTranslatedMessage("ERR_HEIGHT_INVALID");return}this.step=3,this.errorMessage=""}async startMeasurement(){this.step=3,this.errorMessage="",this.shouldStartMeasurement=!0,this.sessionActive=!0,this.trackAnalytics("/session-started")}updated(e){var t;if(super.updated(e),e.has("step")&&this.step===3&&this.shouldStartMeasurement&&(this.initializeMeasurement(),this.shouldStartMeasurement=!1),e.has("showModal")){const i=(t=this.shadowRoot)==null?void 0:t.getElementById("measurer-dialog");i&&(this.showModal&&!i.open?i.showModal():!this.showModal&&i.open&&i.close())}}async initializeMeasurement(){if(!this.apiKey)throw new Error("API key is required");if(!this.tenantId)throw new Error("Tenant ID is required");if(!this.productSku)throw new Error("Product SKU is required");if(!this.baseUrl)throw new Error("Base URL is required");if(!this.apiUrl)throw new Error("API URL is required");if(!this.vtonUrl)throw new Error("VTON URL is required");this.videoElement=this.shadowRoot.querySelector("video");try{this.stream=await navigator.mediaDevices.getUserMedia({video:!0}),this.videoElement&&(this.videoElement.srcObject=this.stream,await this.videoElement.play(),await this.loadCameras(),this.aiSession=new xe(this.baseUrl,this.apiKey,this.culture),await this.aiSession.connect(),this.aiSession.startMicrophone(),this.startPolling())}catch{this.errorMessage=n("Error accessing webcam")}}async loadCameras(){try{const e=await navigator.mediaDevices.enumerateDevices();this.cameras=e.filter(t=>t.kind==="videoinput"),this.cameras.length>0&&(this.currentCameraId=this.cameras[0].deviceId)}catch(e){console.error("Error enumerating devices:",e)}}async flipCamera(){if(this.cameras.length<2)return;this.isLoading=!0,this.stopPolling();const t=(this.cameras.findIndex(i=>i.deviceId===this.currentCameraId)+1)%this.cameras.length;this.currentCameraId=this.cameras[t].deviceId;try{this.stream&&this.stream.getTracks().forEach(i=>i.stop()),this.stream=await navigator.mediaDevices.getUserMedia({video:{deviceId:{exact:this.currentCameraId}}}),this.videoElement&&(this.videoElement.srcObject=this.stream,await this.videoElement.play(),this.startPolling())}catch{this.errorMessage=n("Error switching camera")}finally{this.isLoading=!1}}async startPolling(){const t=[],i=async()=>{var f;if(!this.videoElement||!this.stream||this.isFetching)return;const s=document.createElement("canvas");s.width=this.videoElement.videoWidth,s.height=this.videoElement.videoHeight;const o=s.getContext("2d");o==null||o.drawImage(this.videoElement,0,0,s.width,s.height);const r=await new Promise(m=>s.toBlob(h=>m(h),"image/jpeg")),d=new File([r],"frame.jpg",{type:"image/jpeg"}),l=new FormData;l.append("image",d),l.append("height",this.height.toString()),l.append("productSku",this.productSku),this.measurerKey&&l.append("measurerKey",this.measurerKey);try{this.isFetching=!0,this.isLoading=!0,this.poolingTimeout&&clearTimeout(this.poolingTimeout),this.instructionMessageTimeout&&clearTimeout(this.instructionMessageTimeout);const h=await(await fetch(this.apiUrl,{method:"POST",body:l,headers:{Accept:"application/json","Cache-Control":"no-store",Pragma:"no-cache","X-Api-Key":this.apiKey}})).json();if(this.isFetching=!1,this.isLoading=!1,h.success&&h.chosenSize){this.generateVtonImage(d),t.push(h);const b=t.length;this.instructionMessage=n(ge`Scanning... ${b}/${3}`),b>=3?(this.processFinalResults(t),this.stopPolling(),this.step=4):this.poolingTimeout=setTimeout(i,500)}else this.instructionMessage=this.getTranslatedMessage(h.message||"UNKNOWN_ERROR"),h.message&&((f=this.aiSession)==null||f.forwardCvError(this.instructionMessage)),this.instructionMessageTimeout=setTimeout(()=>{t.length<3&&(this.poolingTimeout=setTimeout(i,0))},2e3)}catch{this.isFetching=!1,this.isLoading=!1,this.instructionMessage=n("Error processing measurement"),this.instructionMessageTimeout=setTimeout(()=>{this.poolingTimeout=setTimeout(i,0)},2e3)}};i()}async generateVtonImage(e){if(!this.vton||!this.garmentUrl||this.isVtonFetching||this.generatedImageUrl)return;this.isVtonFetching=!0,this.vtonError=!1;const t=new FormData;t.append("PersonImage",e),t.append("GarmentUrl",this.garmentUrl);try{const s=await(await fetch(this.vtonUrl,{method:"POST",body:t,headers:{Accept:"application/json","X-Api-Key":this.apiKey}})).json();s.result_urls&&s.result_urls.length>0?(this.generatedImageUrl=s.result_urls[0],this.isVtonFetching=!1):(this.vtonError=!0,this.isVtonFetching=!1)}catch(i){console.error("Error generating VTON image",i),this.vtonError=!0,this.isVtonFetching=!1}}processFinalResults(e){console.group("Scan Debug Report"),console.log(`✅ Collected ${e.length} successful scans.`),e.forEach((d,l)=>{console.log(`Scan #${l+1}: Size [${d.chosenSize}] | Chest: ${d.measurements.chest} | Waist: ${d.measurements.waist}`)});const t={};Object.keys(e[0].measurements||{}).forEach(d=>{let l=0,f=0;e.forEach(m=>{const h=m.measurements[d];typeof h=="number"&&(l+=h,f++)}),t[d]=f>0?Math.round(l/f*100)/100:0}),console.log("📏 Final Averaged Measurements:",t);const s={};e.forEach(d=>{const l=d.chosenSize;l&&(s[l]=(s[l]||0)+1)}),console.log("🗳️ Voting Results:",s);let o="",r=0;for(const[d,l]of Object.entries(s))l>r&&(r=l,o=d);if(console.log(`🏆 WINNER: ${o}`),console.groupEnd(),this.measurements=t,this.recommendedSize=o,this.instructionMessage=n("Measurement successful!"),this.trackAnalytics("/session-completed"),this.sessionActive&&(this.trackAnalytics("/session-ended"),this.sessionActive=!1),this.aiSession){this.aiSession.onTurnComplete=()=>{this.aiSession=null};let d="";this.vton&&(this.isVtonFetching?d="An image of the user wearing the garment is currently being generated. TELL USER THEIR IMAGE IS GENERATING.":this.generatedImageUrl&&(d="The image has successfully generated. TELL USER: 'Here is your image in the garment'.")),this.aiSession.notifySuccess(o,d)}}stopPolling(){this.poolingTimeout!==null&&(clearTimeout(this.poolingTimeout),this.poolingTimeout=null),this.instructionMessageTimeout!==null&&(clearTimeout(this.instructionMessageTimeout),this.instructionMessageTimeout=null),this.stream&&(this.stream.getTracks().forEach(e=>e.stop()),this.stream=null)}acceptMeasurement(){var e;this.trackAnalytics("/measurement-accepted",{sku:this.productSku,measurementData:JSON.stringify(this.measurements)}),this.dispatchEvent(new CustomEvent("measurementAccepted",{detail:{size:this.recommendedSize}})),this.onMeasurementAccepted&&typeof this.onMeasurementAccepted=="function"&&this.onMeasurementAccepted(),this.showModal=!1,this.stopPolling(),(e=this.aiSession)==null||e.disconnect(),this.aiSession=null}resetMeasurement(){var e;this.step===4&&this.trackAnalytics("/measurement-declined",{sku:this.productSku,measurementData:JSON.stringify(this.measurements)}),this.step=1,this.height=0,this.recommendedSize="",this.measurements={},this.generatedImageUrl="",this.isVtonFetching=!1,this.vtonError=!1,this.stopPolling(),(e=this.aiSession)==null||e.disconnect(),this.aiSession=null}stopMeasurement(){this.resetMeasurement(),this.showModal=!1}generateSnowflakes(){const e=[];for(let i=0;i<80;i++){const s=Math.random()*100,o=8+Math.random()*17,r=-Math.random()*30;e.push(g`<span
|
|
1005
1005
|
class="snowflake"
|
|
1006
1006
|
style="left:${s}%; animation-duration:${o.toFixed(2)}s; animation-delay:${r.toFixed(2)}s;"
|
|
1007
1007
|
></span>`)}return g`${e}`}renderSnowflakes(){return this.snowflakesCache||g``}render(){return this._isLocaleLoading?g`<div hidden></div>`:g`
|
|
@@ -1013,7 +1013,11 @@
|
|
|
1013
1013
|
></xact-button>
|
|
1014
1014
|
|
|
1015
1015
|
${this.showModal?g`
|
|
1016
|
-
<
|
|
1016
|
+
<dialog
|
|
1017
|
+
class="modal"
|
|
1018
|
+
id="measurer-dialog"
|
|
1019
|
+
@close=${this.handleDialogClose}
|
|
1020
|
+
>
|
|
1017
1021
|
<div class="modal-content">
|
|
1018
1022
|
<div
|
|
1019
1023
|
style="display: flex; justify-content: space-between"
|
|
@@ -1113,9 +1117,9 @@
|
|
|
1113
1117
|
`:""}
|
|
1114
1118
|
<xact-footer></xact-footer>
|
|
1115
1119
|
</div>
|
|
1116
|
-
</
|
|
1120
|
+
</dialog>
|
|
1117
1121
|
`:""}
|
|
1118
|
-
`}},c.BodyMeasurer.styles=
|
|
1122
|
+
`}},c.BodyMeasurer.styles=I`
|
|
1119
1123
|
:host {
|
|
1120
1124
|
display: block;
|
|
1121
1125
|
font-family: Arial, sans-serif;
|
|
@@ -1152,18 +1156,27 @@
|
|
|
1152
1156
|
}
|
|
1153
1157
|
|
|
1154
1158
|
/* Modal Styles */
|
|
1155
|
-
.modal {
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1159
|
+
dialog.modal {
|
|
1160
|
+
border: none;
|
|
1161
|
+
background: transparent;
|
|
1162
|
+
padding: 0;
|
|
1163
|
+
margin: 0;
|
|
1164
|
+
width: 100vw;
|
|
1165
|
+
height: 100vh;
|
|
1166
|
+
max-width: 100vw;
|
|
1167
|
+
max-height: 100vh;
|
|
1168
|
+
overflow: hidden;
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
dialog.modal[open] {
|
|
1162
1172
|
display: flex;
|
|
1163
1173
|
flex-direction: column;
|
|
1164
1174
|
justify-content: center;
|
|
1165
1175
|
align-items: center;
|
|
1166
|
-
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
dialog.modal::backdrop {
|
|
1179
|
+
background: rgba(0, 0, 0, 0.5);
|
|
1167
1180
|
}
|
|
1168
1181
|
|
|
1169
1182
|
.modal-content {
|
|
@@ -1664,4 +1677,4 @@
|
|
|
1664
1677
|
BlinkMacSystemFont,
|
|
1665
1678
|
sans-serif;
|
|
1666
1679
|
}
|
|
1667
|
-
`,u([p({type:String,attribute:"api-key"})],c.BodyMeasurer.prototype,"apiKey",2),u([p({type:String,attribute:"tenant-id"})],c.BodyMeasurer.prototype,"tenantId",2),u([p({type:String,attribute:"product-sku"})],c.BodyMeasurer.prototype,"productSku",2),u([p({type:String,attribute:"base-url"})],c.BodyMeasurer.prototype,"baseUrl",2),u([p({type:String,attribute:"api-url"})],c.BodyMeasurer.prototype,"apiUrl",2),u([p({type:String,attribute:"vton-url"})],c.BodyMeasurer.prototype,"vtonUrl",2),u([p({type:String,attribute:"garment-url"})],c.BodyMeasurer.prototype,"garmentUrl",2),u([p({type:Boolean,attribute:"vton"})],c.BodyMeasurer.prototype,"vton",2),u([p({type:Function,attribute:"onmeasurementaccepted"})],c.BodyMeasurer.prototype,"onMeasurementAccepted",2),u([p({type:Function,attribute:"onmeasurementcanceled"})],c.BodyMeasurer.prototype,"onMeasurementCanceled",2),u([p({type:String,attribute:"brand-name"})],c.BodyMeasurer.prototype,"brandName",2),u([p({type:String,attribute:"button-text"})],c.BodyMeasurer.prototype,"buttonText",2),u([p({type:String})],c.BodyMeasurer.prototype,"culture",1),u([E()],c.BodyMeasurer.prototype,"errorMap",1),u([E()],c.BodyMeasurer.prototype,"measurerKey",2),u([E()],c.BodyMeasurer.prototype,"_isLocaleLoading",2),u([E()],c.BodyMeasurer.prototype,"showModal",2),u([E()],c.BodyMeasurer.prototype,"step",2),u([E()],c.BodyMeasurer.prototype,"height",2),u([E()],c.BodyMeasurer.prototype,"recommendedSize",2),u([E()],c.BodyMeasurer.prototype,"measurements",2),u([E()],c.BodyMeasurer.prototype,"errorMessage",2),u([E()],c.BodyMeasurer.prototype,"instructionMessage",2),u([E()],c.BodyMeasurer.prototype,"shouldStartMeasurement",2),u([E()],c.BodyMeasurer.prototype,"isLoading",2),u([E()],c.BodyMeasurer.prototype,"isFetching",2),u([E()],c.BodyMeasurer.prototype,"generatedImageUrl",2),u([E()],c.BodyMeasurer.prototype,"isVtonFetching",2),u([E()],c.BodyMeasurer.prototype,"vtonError",2),u([E()],c.BodyMeasurer.prototype,"cameras",2),u([E()],c.BodyMeasurer.prototype,"currentCameraId",2),c.BodyMeasurer=u([P("body-measurer"),Y()],c.BodyMeasurer);const Xt={ERR_ARM_NOT_STRETCHED:"Estira tus brazos completamente",ERR_ARMS_NOT_RAISED:"Levanta ambos brazos en un ángulo de 45 grados",ERR_BODY_LANDMARKS_NOT_DETECTED:"Asegúrate de que todo tu cuerpo sea visible en la cámara",ERR_BODY_TOO_CLOSE_TO_EDGE:"Aleja tu cuerpo del borde del encuadre",ERR_BODY_TOO_CLOSE_TO_EDGE_MOVE_LEFT:"Muévete hacia la izquierda para centrar tu cuerpo",ERR_BODY_TOO_CLOSE_TO_EDGE_MOVE_RIGHT:"Muévete hacia la derecha para centrar tu cuerpo",ERR_FEET_TOO_CLOSE_TO_EDGE:"Aleja tus pies del borde del encuadre",ERR_HEAD_POINT_NOT_DETECTED:"Asegúrate de que tu cabeza sea completamente visible en el encuadre",ERR_HEAD_TOO_CLOSE_TO_EDGE:"Aleja tu cabeza del borde del encuadre",ERR_HEIGHT_INVALID:"La altura debe estar entre 50 y 300 cm",ERR_HEIGHT_MEASUREMENT_FAILED:"Párate derecho y asegúrate de que todo tu cuerpo sea visible",ERR_HEM_MEASUREMENT_FAILED:"Asegúrate de que el dobladillo de tu ropa sea visible y claro",ERR_HIPS_MEASUREMENT_FAILED:"Párate derecho y asegúrate de que tus caderas sean visibles",ERR_HIPS_NOT_VISIBLE:"Ajusta tu posición para mostrar tus caderas",ERR_IMAGE_LOAD_FAILED:"Intenta de nuevo más tarde; la imagen no se pudo procesar",ERR_INCORRECT_POSTURE:"Párate derecho con los hombros hacia atrás",ERR_INVALID_BODY_HEIGHT_TYPE:"Asegúrate de que todo tu cuerpo sea visible para medir la altura",ERR_INVALID_CLOTHING_TYPE:"Este tipo de ropa no es compatible; por favor, contacta a soporte",ERR_INVALID_MEASURE_SIDE_VIEW:"Gira para mostrar un perfil de lado claro",ERR_LEFT_ARM_NOT_RAISED:"Levante tu brazo izquierdo en un ángulo de 45 grados",ERR_LEFT_ARM_TOO_HIGH:"Baja tu brazo izquierdo",ERR_LEGS_NOT_DETECTED:"Asegúrate de que tus piernas sean completamente visibles en el encuadre",ERR_LOWER_BODY_NOT_VISIBLE:"Ajusta tu posición para mostrar la parte inferior de tu cuerpo",ERR_NOT_SIDE_VIEW:"Gira para mostrar tu perfil de lado",ERR_RIGHT_ARM_NOT_RAISED:"Levanta tu brazo derecho en un ángulo de 45 grados",ERR_RIGHT_ARM_TOO_HIGH:"Baja tu brazo derecho",ERR_SHOULDER_MEASUREMENT_FAILED:"Mantén tus hombros relajados y visibles",ERR_SHOULDERS_NOT_VISIBLE:"Ajusta tu posición para mostrar tus hombros",ERR_TOO_CLOSE_TO_CAMERA:"Aléjate de la cámara",ERR_UPPER_BODY_NOT_VISIBLE:"Ajusta tu posición para mostrar la parte superior de tu cuerpo",ERR_WAIST_MEASUREMENT_FAILED:"Párate derecho y asegúrate de que tu cintura sea visible",s08b0bc2feb4e0f1c:"Buena iluminación",s1137f6c10e0f1660:"Al usar",s1dd794b3870bcae0:"Empezar",s2f77566c78235d88:"Error al acceder a la cámara web",s322c72546e939809:"Elige un área bien iluminada donde puedas ver tu imagen claramente.",s32d5e90d7ffec075:"Usa una pared lisa",s34c58d3d12e5f890:"Error al cambiar de cámara",s396efd2b23a16ac9:"Colócate contra un fondo liso.",s3a09a6be4809cb50:"Foto de cuerpo entero",s3d324b180f982d46:"Asegúrate de que todo tu cuerpo sea visible en la cámara",s420e8053328b31c4:"Tu talla ideal",s48d094fb2ffff8fb:"Consejos",s5c91b5e06c363734:"Error al procesar la medición",s625ff027ee7b497b:"Asegúrate de que todo tu cuerpo sea visible. La aplicación te guiará.",s676cfe9f36657792:"¡Medición exitosa!",s6ad3b28b46803c43:"Aceptar sugerencia",s6cda30fe423482fd:"Generando tu imagen de probador virtual...",s76ceab13c1401897:ge`Escaneando... ${0}/${1}`,s7948656b643c5186:"Ingresa tu altura (cm)",s81d43b9b25d0775b:"Ropa",s833a6c1d27f3b409:"Haz clic aquí para voltear tu cámara",s88a3f5e6a9d9945d:"Usa la ropa que sueles ponerte a diario.",s88a7dd58c3763c51:"Encontrar Mi Talla",s8fb9f388e75ffe11:"Encuadre",s91a037763666343d:"Algo pasó mientras se generaba la imagen del probador virtual.",s952ed559991cf0b4:"Desarrollado por",sa4ad2b9cd4ea10ba:"Fondo limpio",sad8ede33ccaa8ef1:"aceptas nuestros Términos y Política de Privacidad.",sb59d68ed12d46377:"Cargando",sca9b53eeb24a5865:"Evita la luz de fondo",scf8d43c4a5cb71fa:"Para garantizar medidas precisas, tomaremos dos escaneos: uno de frente y otro de lado. Mantén una postura erguida con los brazos ligeramente separados de tu cuerpo y estirados. En la vista lateral, párate derecho con los brazos estirados y alineados con tu cuerpo.",sd13d4c82d57859fc:"Colócate frente a la cámara",sd2259f35f330b63c:"Lujo seleccionado. Ajuste perfecto.",sdabfef8968aeb5fa:"Ocurrió un error inesperado",sdde2fe5a591a828a:"¡Comencemos! →",sde0bd870399b428c:"VER IMAGEN COMPLETA",sde1f02481331134c:"Producto",sdf9f9c621b6316e7:"Medir de nuevo",se61735ca89853860:"Ropa ajustada",se940dab2e0b7a710:"Antes de comenzar",seb66e000f03f21e0:"Encontremos tu talla perfecta",sf84b5644f7595ce5:"Según tus medidas y las dimensiones exactas de la prenda, la recomendación de talla proporcionada es la más precisa para un ajuste ideal."},Jt=Object.freeze(Object.defineProperty({__proto__:null,templates:Xt},Symbol.toStringTag,{value:"Module"})),ei={ERR_ARM_NOT_STRETCHED:"Estique seus braços completamente",ERR_ARMS_NOT_RAISED:"Levante ambos os braços em um ângulo de 45 graus",ERR_BODY_LANDMARKS_NOT_DETECTED:"Certifique-se de que seu corpo inteiro esteja visível na câmera",ERR_BODY_TOO_CLOSE_TO_EDGE:"Afaste seu corpo da borda do quadro",ERR_BODY_TOO_CLOSE_TO_EDGE_MOVE_LEFT:"Mova-se para a esquerda para centralizar seu corpo",ERR_BODY_TOO_CLOSE_TO_EDGE_MOVE_RIGHT:"Mova-se para a direita para centralizar seu corpo",ERR_FEET_TOO_CLOSE_TO_EDGE:"Afaste seus pés da borda do quadro",ERR_HEAD_POINT_NOT_DETECTED:"Certifique-se de que sua cabeça esteja totalmente visível no quadro",ERR_HEAD_TOO_CLOSE_TO_EDGE:"Afaste sua cabeça da borda do quadro",ERR_HEIGHT_INVALID:"A altura deve ser entre 50 e 300cm",ERR_HEIGHT_MEASUREMENT_FAILED:"Fique ereto e certifique-se de que seu corpo inteiro esteja visível",ERR_HEM_MEASUREMENT_FAILED:"Certifique-se de que a bainha da sua roupa esteja visível e clara",ERR_HIPS_MEASUREMENT_FAILED:"Fique ereto e certifique-se de que seus quadris estejam visíveis",ERR_HIPS_NOT_VISIBLE:"Ajuste sua posição para mostrar seus quadris",ERR_IMAGE_LOAD_FAILED:"Tente novamente mais tarde; a imagem não pôde ser processada",ERR_INCORRECT_POSTURE:"Fique ereto com os ombros para trás",ERR_INVALID_BODY_HEIGHT_TYPE:"Certifique-se de que seu corpo inteiro esteja visível para a medição de altura",ERR_INVALID_CLOTHING_TYPE:"Este tipo de roupa não é suportado; entre em contato com o suporte",ERR_INVALID_MEASURE_SIDE_VIEW:"Gire para mostrar um perfil lateral claro",ERR_LEFT_ARM_NOT_RAISED:"Levante seu braço esquerdo em um ângulo de 45 graus",ERR_LEFT_ARM_TOO_HIGH:"Abaixe seu braço esquerdo",ERR_LEGS_NOT_DETECTED:"Certifique-se de que suas pernas estejam totalmente visíveis no quadro",ERR_LOWER_BODY_NOT_VISIBLE:"Ajuste sua posição para mostrar a parte inferior do corpo",ERR_NOT_SIDE_VIEW:"Gire para mostrar seu perfil lateral",ERR_RIGHT_ARM_NOT_RAISED:"Levante seu braço direito em um ângulo de 45 graus",ERR_RIGHT_ARM_TOO_HIGH:"Abaixe seu braço direito",ERR_SHOULDER_MEASUREMENT_FAILED:"Mantenha seus ombros relaxados e visíveis",ERR_SHOULDERS_NOT_VISIBLE:"Ajuste sua posição para mostrar seus ombros",ERR_TOO_CLOSE_TO_CAMERA:"Dê um passo para trás da câmera",ERR_UPPER_BODY_NOT_VISIBLE:"Ajuste sua posição para mostrar a parte superior do corpo",ERR_WAIST_MEASUREMENT_FAILED:"Fique ereto e certifique-se de que sua cintura esteja visível",s08b0bc2feb4e0f1c:"Boa iluminação",s1137f6c10e0f1660:"Ao usar a",s1dd794b3870bcae0:"Começar",s2f77566c78235d88:"Erro acessando a câmera",s322c72546e939809:"Escolha uma área bem iluminada onde você possa ver sua imagem claramente.",s32d5e90d7ffec075:"Use uma parede lisa",s34c58d3d12e5f890:"Erro ao mudar a câmera",s396efd2b23a16ac9:"Posicione-se contra um fundo simples.",s3a09a6be4809cb50:"Foto de corpo inteiro",s3d324b180f982d46:"Tenha certeza de que seu corpo está totalmente visível",s420e8053328b31c4:"Seu tamanho ideal",s48d094fb2ffff8fb:"Pontas",s5c91b5e06c363734:"Medição de processamento de erros",s625ff027ee7b497b:"Certifique-se de que todo o seu corpo esteja visível. O aplicativo guiará você.",s676cfe9f36657792:"Medição realizada com sucesso!",s6ad3b28b46803c43:"Aceitar sugestão",s6cda30fe423482fd:"Gerando sua imagem de provador virtual...",s76ceab13c1401897:ge`Escaneando... ${0}/${1}`,s7948656b643c5186:"Digite sua altura (cm)",s81d43b9b25d0775b:"Roupas",s833a6c1d27f3b409:"Clique aqui para virar sua câmera",s88a3f5e6a9d9945d:"Use roupas que você costuma usar no dia a dia.",s88a7dd58c3763c51:"Encontrar Meu Tamanho",s8fb9f388e75ffe11:"Enquadramento",s91a037763666343d:"Algo aconteceu ao gerar a imagem do provador virtual.",s952ed559991cf0b4:"Desenvolvido por",sa4ad2b9cd4ea10ba:"Fundo limpo",sad8ede33ccaa8ef1:"você concorda com nossos Termos e Política de Privacidade.",sb59d68ed12d46377:"Carregando",sca9b53eeb24a5865:"Evite luz de fundo",scf8d43c4a5cb71fa:"Mantenha uma postura ereta, com os braços ligeiramente afastados do corpo",sd13d4c82d57859fc:"Posicione-se em frente a câmera",sd2259f35f330b63c:"Luxo sob medida. Caimento perfeito.",sdabfef8968aeb5fa:"Um erro inesperado aconteceu",sdde2fe5a591a828a:"Vamos começar! →",sde0bd870399b428c:"VER IMAGEM COMPLETA",sde1f02481331134c:"Produto",sdf9f9c621b6316e7:"Medir novamente",se61735ca89853860:"Roupas justas",se940dab2e0b7a710:"Antes de começar",seb66e000f03f21e0:"Vamos encontrar o seu tamanho perfeito",sf84b5644f7595ce5:"Com base em suas medidas e nas dimensões exatas da peça, a recomendação de tamanho fornecida é a mais precisa para um ajuste ideal."},ti=Object.freeze(Object.defineProperty({__proto__:null,templates:ei},Symbol.toStringTag,{value:"Module"}));c.getLocale=Qt,c.setLocale=we,Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})});
|
|
1680
|
+
`,u([p({type:String,attribute:"api-key"})],c.BodyMeasurer.prototype,"apiKey",2),u([p({type:String,attribute:"tenant-id"})],c.BodyMeasurer.prototype,"tenantId",2),u([p({type:String,attribute:"product-sku"})],c.BodyMeasurer.prototype,"productSku",2),u([p({type:String,attribute:"base-url"})],c.BodyMeasurer.prototype,"baseUrl",2),u([p({type:String,attribute:"api-url"})],c.BodyMeasurer.prototype,"apiUrl",2),u([p({type:String,attribute:"vton-url"})],c.BodyMeasurer.prototype,"vtonUrl",2),u([p({type:String,attribute:"garment-url"})],c.BodyMeasurer.prototype,"garmentUrl",2),u([p({type:Boolean,attribute:"vton"})],c.BodyMeasurer.prototype,"vton",2),u([p({type:Function,attribute:"onmeasurementaccepted"})],c.BodyMeasurer.prototype,"onMeasurementAccepted",2),u([p({type:Function,attribute:"onmeasurementcanceled"})],c.BodyMeasurer.prototype,"onMeasurementCanceled",2),u([p({type:String,attribute:"brand-name"})],c.BodyMeasurer.prototype,"brandName",2),u([p({type:String,attribute:"button-text"})],c.BodyMeasurer.prototype,"buttonText",2),u([p({type:String})],c.BodyMeasurer.prototype,"culture",1),u([E()],c.BodyMeasurer.prototype,"errorMap",1),u([E()],c.BodyMeasurer.prototype,"measurerKey",2),u([E()],c.BodyMeasurer.prototype,"_isLocaleLoading",2),u([E()],c.BodyMeasurer.prototype,"showModal",2),u([E()],c.BodyMeasurer.prototype,"step",2),u([E()],c.BodyMeasurer.prototype,"height",2),u([E()],c.BodyMeasurer.prototype,"recommendedSize",2),u([E()],c.BodyMeasurer.prototype,"measurements",2),u([E()],c.BodyMeasurer.prototype,"errorMessage",2),u([E()],c.BodyMeasurer.prototype,"instructionMessage",2),u([E()],c.BodyMeasurer.prototype,"shouldStartMeasurement",2),u([E()],c.BodyMeasurer.prototype,"isLoading",2),u([E()],c.BodyMeasurer.prototype,"isFetching",2),u([E()],c.BodyMeasurer.prototype,"generatedImageUrl",2),u([E()],c.BodyMeasurer.prototype,"isVtonFetching",2),u([E()],c.BodyMeasurer.prototype,"vtonError",2),u([E()],c.BodyMeasurer.prototype,"cameras",2),u([E()],c.BodyMeasurer.prototype,"currentCameraId",2),c.BodyMeasurer=u([P("body-measurer"),Y()],c.BodyMeasurer);const Qt={ERR_ARM_NOT_STRETCHED:"Estira tus brazos completamente",ERR_ARMS_NOT_RAISED:"Levanta ambos brazos en un ángulo de 45 grados",ERR_BODY_LANDMARKS_NOT_DETECTED:"Asegúrate de que todo tu cuerpo sea visible en la cámara",ERR_BODY_TOO_CLOSE_TO_EDGE:"Aleja tu cuerpo del borde del encuadre",ERR_BODY_TOO_CLOSE_TO_EDGE_MOVE_LEFT:"Muévete hacia la izquierda para centrar tu cuerpo",ERR_BODY_TOO_CLOSE_TO_EDGE_MOVE_RIGHT:"Muévete hacia la derecha para centrar tu cuerpo",ERR_FEET_TOO_CLOSE_TO_EDGE:"Aleja tus pies del borde del encuadre",ERR_HEAD_POINT_NOT_DETECTED:"Asegúrate de que tu cabeza sea completamente visible en el encuadre",ERR_HEAD_TOO_CLOSE_TO_EDGE:"Aleja tu cabeza del borde del encuadre",ERR_HEIGHT_INVALID:"La altura debe estar entre 50 y 300 cm",ERR_HEIGHT_MEASUREMENT_FAILED:"Párate derecho y asegúrate de que todo tu cuerpo sea visible",ERR_HEM_MEASUREMENT_FAILED:"Asegúrate de que el dobladillo de tu ropa sea visible y claro",ERR_HIPS_MEASUREMENT_FAILED:"Párate derecho y asegúrate de que tus caderas sean visibles",ERR_HIPS_NOT_VISIBLE:"Ajusta tu posición para mostrar tus caderas",ERR_IMAGE_LOAD_FAILED:"Intenta de nuevo más tarde; la imagen no se pudo procesar",ERR_INCORRECT_POSTURE:"Párate derecho con los hombros hacia atrás",ERR_INVALID_BODY_HEIGHT_TYPE:"Asegúrate de que todo tu cuerpo sea visible para medir la altura",ERR_INVALID_CLOTHING_TYPE:"Este tipo de ropa no es compatible; por favor, contacta a soporte",ERR_INVALID_MEASURE_SIDE_VIEW:"Gira para mostrar un perfil de lado claro",ERR_LEFT_ARM_NOT_RAISED:"Levante tu brazo izquierdo en un ángulo de 45 grados",ERR_LEFT_ARM_TOO_HIGH:"Baja tu brazo izquierdo",ERR_LEGS_NOT_DETECTED:"Asegúrate de que tus piernas sean completamente visibles en el encuadre",ERR_LOWER_BODY_NOT_VISIBLE:"Ajusta tu posición para mostrar la parte inferior de tu cuerpo",ERR_NOT_SIDE_VIEW:"Gira para mostrar tu perfil de lado",ERR_RIGHT_ARM_NOT_RAISED:"Levanta tu brazo derecho en un ángulo de 45 grados",ERR_RIGHT_ARM_TOO_HIGH:"Baja tu brazo derecho",ERR_SHOULDER_MEASUREMENT_FAILED:"Mantén tus hombros relajados y visibles",ERR_SHOULDERS_NOT_VISIBLE:"Ajusta tu posición para mostrar tus hombros",ERR_TOO_CLOSE_TO_CAMERA:"Aléjate de la cámara",ERR_UPPER_BODY_NOT_VISIBLE:"Ajusta tu posición para mostrar la parte superior de tu cuerpo",ERR_WAIST_MEASUREMENT_FAILED:"Párate derecho y asegúrate de que tu cintura sea visible",s08b0bc2feb4e0f1c:"Buena iluminación",s1137f6c10e0f1660:"Al usar",s1dd794b3870bcae0:"Empezar",s2f77566c78235d88:"Error al acceder a la cámara web",s322c72546e939809:"Elige un área bien iluminada donde puedas ver tu imagen claramente.",s32d5e90d7ffec075:"Usa una pared lisa",s34c58d3d12e5f890:"Error al cambiar de cámara",s396efd2b23a16ac9:"Colócate contra un fondo liso.",s3a09a6be4809cb50:"Foto de cuerpo entero",s3d324b180f982d46:"Asegúrate de que todo tu cuerpo sea visible en la cámara",s420e8053328b31c4:"Tu talla ideal",s48d094fb2ffff8fb:"Consejos",s5c91b5e06c363734:"Error al procesar la medición",s625ff027ee7b497b:"Asegúrate de que todo tu cuerpo sea visible. La aplicación te guiará.",s676cfe9f36657792:"¡Medición exitosa!",s6ad3b28b46803c43:"Aceptar sugerencia",s6cda30fe423482fd:"Generando tu imagen de probador virtual...",s76ceab13c1401897:ge`Escaneando... ${0}/${1}`,s7948656b643c5186:"Ingresa tu altura (cm)",s81d43b9b25d0775b:"Ropa",s833a6c1d27f3b409:"Haz clic aquí para voltear tu cámara",s88a3f5e6a9d9945d:"Usa la ropa que sueles ponerte a diario.",s88a7dd58c3763c51:"Encontrar Mi Talla",s8fb9f388e75ffe11:"Encuadre",s91a037763666343d:"Algo pasó mientras se generaba la imagen del probador virtual.",s952ed559991cf0b4:"Desarrollado por",sa4ad2b9cd4ea10ba:"Fondo limpio",sad8ede33ccaa8ef1:"aceptas nuestros Términos y Política de Privacidad.",sb59d68ed12d46377:"Cargando",sca9b53eeb24a5865:"Evita la luz de fondo",scf8d43c4a5cb71fa:"Para garantizar medidas precisas, tomaremos dos escaneos: uno de frente y otro de lado. Mantén una postura erguida con los brazos ligeramente separados de tu cuerpo y estirados. En la vista lateral, párate derecho con los brazos estirados y alineados con tu cuerpo.",sd13d4c82d57859fc:"Colócate frente a la cámara",sd2259f35f330b63c:"Lujo seleccionado. Ajuste perfecto.",sdabfef8968aeb5fa:"Ocurrió un error inesperado",sdde2fe5a591a828a:"¡Comencemos! →",sde0bd870399b428c:"VER IMAGEN COMPLETA",sde1f02481331134c:"Producto",sdf9f9c621b6316e7:"Medir de nuevo",se61735ca89853860:"Ropa ajustada",se940dab2e0b7a710:"Antes de comenzar",seb66e000f03f21e0:"Encontremos tu talla perfecta",sf84b5644f7595ce5:"Según tus medidas y las dimensiones exactas de la prenda, la recomendación de talla proporcionada es la más precisa para un ajuste ideal."},Jt=Object.freeze(Object.defineProperty({__proto__:null,templates:Qt},Symbol.toStringTag,{value:"Module"})),ei={ERR_ARM_NOT_STRETCHED:"Estique seus braços completamente",ERR_ARMS_NOT_RAISED:"Levante ambos os braços em um ângulo de 45 graus",ERR_BODY_LANDMARKS_NOT_DETECTED:"Certifique-se de que seu corpo inteiro esteja visível na câmera",ERR_BODY_TOO_CLOSE_TO_EDGE:"Afaste seu corpo da borda do quadro",ERR_BODY_TOO_CLOSE_TO_EDGE_MOVE_LEFT:"Mova-se para a esquerda para centralizar seu corpo",ERR_BODY_TOO_CLOSE_TO_EDGE_MOVE_RIGHT:"Mova-se para a direita para centralizar seu corpo",ERR_FEET_TOO_CLOSE_TO_EDGE:"Afaste seus pés da borda do quadro",ERR_HEAD_POINT_NOT_DETECTED:"Certifique-se de que sua cabeça esteja totalmente visível no quadro",ERR_HEAD_TOO_CLOSE_TO_EDGE:"Afaste sua cabeça da borda do quadro",ERR_HEIGHT_INVALID:"A altura deve ser entre 50 e 300cm",ERR_HEIGHT_MEASUREMENT_FAILED:"Fique ereto e certifique-se de que seu corpo inteiro esteja visível",ERR_HEM_MEASUREMENT_FAILED:"Certifique-se de que a bainha da sua roupa esteja visível e clara",ERR_HIPS_MEASUREMENT_FAILED:"Fique ereto e certifique-se de que seus quadris estejam visíveis",ERR_HIPS_NOT_VISIBLE:"Ajuste sua posição para mostrar seus quadris",ERR_IMAGE_LOAD_FAILED:"Tente novamente mais tarde; a imagem não pôde ser processada",ERR_INCORRECT_POSTURE:"Fique ereto com os ombros para trás",ERR_INVALID_BODY_HEIGHT_TYPE:"Certifique-se de que seu corpo inteiro esteja visível para a medição de altura",ERR_INVALID_CLOTHING_TYPE:"Este tipo de roupa não é suportado; entre em contato com o suporte",ERR_INVALID_MEASURE_SIDE_VIEW:"Gire para mostrar um perfil lateral claro",ERR_LEFT_ARM_NOT_RAISED:"Levante seu braço esquerdo em um ângulo de 45 graus",ERR_LEFT_ARM_TOO_HIGH:"Abaixe seu braço esquerdo",ERR_LEGS_NOT_DETECTED:"Certifique-se de que suas pernas estejam totalmente visíveis no quadro",ERR_LOWER_BODY_NOT_VISIBLE:"Ajuste sua posição para mostrar a parte inferior do corpo",ERR_NOT_SIDE_VIEW:"Gire para mostrar seu perfil lateral",ERR_RIGHT_ARM_NOT_RAISED:"Levante seu braço direito em um ângulo de 45 graus",ERR_RIGHT_ARM_TOO_HIGH:"Abaixe seu braço direito",ERR_SHOULDER_MEASUREMENT_FAILED:"Mantenha seus ombros relaxados e visíveis",ERR_SHOULDERS_NOT_VISIBLE:"Ajuste sua posição para mostrar seus ombros",ERR_TOO_CLOSE_TO_CAMERA:"Dê um passo para trás da câmera",ERR_UPPER_BODY_NOT_VISIBLE:"Ajuste sua posição para mostrar a parte superior do corpo",ERR_WAIST_MEASUREMENT_FAILED:"Fique ereto e certifique-se de que sua cintura esteja visível",s08b0bc2feb4e0f1c:"Boa iluminação",s1137f6c10e0f1660:"Ao usar a",s1dd794b3870bcae0:"Começar",s2f77566c78235d88:"Erro acessando a câmera",s322c72546e939809:"Escolha uma área bem iluminada onde você possa ver sua imagem claramente.",s32d5e90d7ffec075:"Use uma parede lisa",s34c58d3d12e5f890:"Erro ao mudar a câmera",s396efd2b23a16ac9:"Posicione-se contra um fundo simples.",s3a09a6be4809cb50:"Foto de corpo inteiro",s3d324b180f982d46:"Tenha certeza de que seu corpo está totalmente visível",s420e8053328b31c4:"Seu tamanho ideal",s48d094fb2ffff8fb:"Pontas",s5c91b5e06c363734:"Medição de processamento de erros",s625ff027ee7b497b:"Certifique-se de que todo o seu corpo esteja visível. O aplicativo guiará você.",s676cfe9f36657792:"Medição realizada com sucesso!",s6ad3b28b46803c43:"Aceitar sugestão",s6cda30fe423482fd:"Gerando sua imagem de provador virtual...",s76ceab13c1401897:ge`Escaneando... ${0}/${1}`,s7948656b643c5186:"Digite sua altura (cm)",s81d43b9b25d0775b:"Roupas",s833a6c1d27f3b409:"Clique aqui para virar sua câmera",s88a3f5e6a9d9945d:"Use roupas que você costuma usar no dia a dia.",s88a7dd58c3763c51:"Encontrar Meu Tamanho",s8fb9f388e75ffe11:"Enquadramento",s91a037763666343d:"Algo aconteceu ao gerar a imagem do provador virtual.",s952ed559991cf0b4:"Desenvolvido por",sa4ad2b9cd4ea10ba:"Fundo limpo",sad8ede33ccaa8ef1:"você concorda com nossos Termos e Política de Privacidade.",sb59d68ed12d46377:"Carregando",sca9b53eeb24a5865:"Evite luz de fundo",scf8d43c4a5cb71fa:"Mantenha uma postura ereta, com os braços ligeiramente afastados do corpo",sd13d4c82d57859fc:"Posicione-se em frente a câmera",sd2259f35f330b63c:"Luxo sob medida. Caimento perfeito.",sdabfef8968aeb5fa:"Um erro inesperado aconteceu",sdde2fe5a591a828a:"Vamos começar! →",sde0bd870399b428c:"VER IMAGEM COMPLETA",sde1f02481331134c:"Produto",sdf9f9c621b6316e7:"Medir novamente",se61735ca89853860:"Roupas justas",se940dab2e0b7a710:"Antes de começar",seb66e000f03f21e0:"Vamos encontrar o seu tamanho perfeito",sf84b5644f7595ce5:"Com base em suas medidas e nas dimensões exatas da peça, a recomendação de tamanho fornecida é a mais precisa para um ajuste ideal."},ti=Object.freeze(Object.defineProperty({__proto__:null,templates:ei},Symbol.toStringTag,{value:"Module"}));c.getLocale=Xt,c.setLocale=we,Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED