xactsize-webcomponents 1.0.10 → 1.0.12

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.
@@ -21,6 +21,7 @@ export declare class BodyMeasurer extends LitElement {
21
21
  firstUpdated(): void;
22
22
  private startSpinnerAnimation;
23
23
  apiKey: string;
24
+ productSku: string;
24
25
  onMeasurementAccepted: (() => void) | undefined;
25
26
  onMeasurementCanceled: (() => void) | undefined;
26
27
  private _culture;
@@ -35,14 +35,14 @@ let Oe = class {
35
35
  return this.cssText;
36
36
  }
37
37
  };
38
- const Ze = (i) => new Oe(typeof i == "string" ? i : i + "", void 0, pe), j = (i, ...e) => {
38
+ const ke = (i) => new Oe(typeof i == "string" ? i : i + "", void 0, pe), j = (i, ...e) => {
39
39
  const t = i.length === 1 ? i[0] : e.reduce((o, s, r) => o + ((n) => {
40
40
  if (n._$cssResult$ === !0) return n.cssText;
41
41
  if (typeof n == "number") return n;
42
42
  throw Error("Value passed to 'css' function must be a 'css' function result: " + n + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
43
43
  })(s) + i[r + 1], i[0]);
44
44
  return new Oe(t, i, pe);
45
- }, ke = (i, e) => {
45
+ }, Ze = (i, e) => {
46
46
  if (de) i.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
47
47
  else for (const t of e) {
48
48
  const o = document.createElement("style"), s = Y.litNonce;
@@ -51,7 +51,7 @@ const Ze = (i) => new Oe(typeof i == "string" ? i : i + "", void 0, pe), j = (i,
51
51
  }, _e = de ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((e) => {
52
52
  let t = "";
53
53
  for (const o of e.cssRules) t += o.cssText;
54
- return Ze(t);
54
+ return ke(t);
55
55
  })(i) : i;
56
56
  /**
57
57
  * @license
@@ -172,7 +172,7 @@ let H = class extends HTMLElement {
172
172
  }
173
173
  createRenderRoot() {
174
174
  const e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
175
- return ke(e, this.constructor.elementStyles), e;
175
+ return Ze(e, this.constructor.elementStyles), e;
176
176
  }
177
177
  connectedCallback() {
178
178
  var e;
@@ -567,7 +567,7 @@ re == null || re({ LitElement: C });
567
567
  * Copyright 2017 Google LLC
568
568
  * SPDX-License-Identifier: BSD-3-Clause
569
569
  */
570
- const Z = (i) => (e, t) => {
570
+ const k = (i) => (e, t) => {
571
571
  t !== void 0 ? t.addInitializer(() => {
572
572
  customElements.define(i, e);
573
573
  }) : customElements.define(i, e);
@@ -831,7 +831,7 @@ const Lt = Rt(class extends St {
831
831
  return L;
832
832
  }
833
833
  });
834
- var Tt = Object.defineProperty, Ot = Object.getOwnPropertyDescriptor, k = (i, e, t, o) => {
834
+ var Tt = Object.defineProperty, Ot = Object.getOwnPropertyDescriptor, Z = (i, e, t, o) => {
835
835
  for (var s = o > 1 ? void 0 : o ? Ot(e, t) : e, r = i.length - 1, n; r >= 0; r--)
836
836
  (n = i[r]) && (s = (o ? n(e, t, s) : n(s)) || s);
837
837
  return o && s && Tt(e, t, s), s;
@@ -905,20 +905,20 @@ T.styles = j`
905
905
  cursor: not-allowed;
906
906
  }
907
907
  `;
908
- k([
908
+ Z([
909
909
  m({ type: String })
910
910
  ], T.prototype, "type", 2);
911
- k([
911
+ Z([
912
912
  m({ type: String })
913
913
  ], T.prototype, "label", 2);
914
- k([
914
+ Z([
915
915
  m({ type: Boolean })
916
916
  ], T.prototype, "disabled", 2);
917
- k([
917
+ Z([
918
918
  m({ type: String })
919
919
  ], T.prototype, "variant", 2);
920
- T = k([
921
- Z("xact-button")
920
+ T = Z([
921
+ k("xact-button")
922
922
  ], T);
923
923
  var Ht = Object.defineProperty, It = Object.getOwnPropertyDescriptor, me = (i, e, t, o) => {
924
924
  for (var s = o > 1 ? void 0 : o ? It(e, t) : e, r = i.length - 1, n; r >= 0; r--)
@@ -1169,7 +1169,7 @@ me([
1169
1169
  m({ type: Function })
1170
1170
  ], V.prototype, "onStartMeasurement", 2);
1171
1171
  V = me([
1172
- Z("xact-step-one"),
1172
+ k("xact-step-one"),
1173
1173
  te()
1174
1174
  ], V);
1175
1175
  var Dt = Object.getOwnPropertyDescriptor, Pt = (i, e, t, o) => {
@@ -1263,7 +1263,7 @@ ce.styles = j`
1263
1263
  }
1264
1264
  `;
1265
1265
  ce = Pt([
1266
- Z("xact-footer"),
1266
+ k("xact-footer"),
1267
1267
  te()
1268
1268
  ], ce);
1269
1269
  var Bt = Object.defineProperty, Nt = Object.getOwnPropertyDescriptor, G = (i, e, t, o) => {
@@ -1369,7 +1369,7 @@ G([
1369
1369
  m({ type: Function })
1370
1370
  ], O.prototype, "onRetry", 2);
1371
1371
  O = G([
1372
- Z("xact-step-result"),
1372
+ k("xact-step-result"),
1373
1373
  te()
1374
1374
  ], O);
1375
1375
  const Se = "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", zt = "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", Ut = "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";
@@ -1385,7 +1385,7 @@ const { getLocale: Gt, setLocale: Le } = bt({
1385
1385
  });
1386
1386
  let d = class extends C {
1387
1387
  constructor() {
1388
- super(...arguments), this.spinnerFrame = 0, this.apiKey = "", this._culture = "pt-BR", this._isLocaleLoading = !1, this.skus = [], this.productName = "", this.showModal = !1, this.step = 1, this.height = 0, this.recommendedSize = "", this.measurements = {}, this.errorMessage = "", this.instructionMessage = a("Position yourself in front of the camera"), this.shouldStartMeasurement = !1, this.isLoading = !1, this.isFetching = !1, this.videoElement = null, this.stream = null, this.poolingTimeout = null, this.instructionMessageTimeout = null, this.cameras = [], this.currentCameraId = null;
1388
+ super(...arguments), this.spinnerFrame = 0, this.apiKey = "", this.productSku = "", this._culture = "pt-BR", this._isLocaleLoading = !1, this.skus = [], this.productName = "", this.showModal = !1, this.step = 1, this.height = 0, this.recommendedSize = "", this.measurements = {}, this.errorMessage = "", this.instructionMessage = a("Position yourself in front of the camera"), this.shouldStartMeasurement = !1, this.isLoading = !1, this.isFetching = !1, this.videoElement = null, this.stream = null, this.poolingTimeout = null, this.instructionMessageTimeout = null, this.cameras = [], this.currentCameraId = null;
1389
1389
  }
1390
1390
  firstUpdated() {
1391
1391
  this.startSpinnerAnimation();
@@ -1521,7 +1521,7 @@ let d = class extends C {
1521
1521
  const t = e.getContext("2d");
1522
1522
  t == null || t.drawImage(this.videoElement, 0, 0, e.width, e.height);
1523
1523
  const o = await new Promise((n) => e.toBlob((h) => n(h), "image/jpeg")), s = new File([o], "frame.jpg", { type: "image/jpeg" }), r = new FormData();
1524
- r.append("image", s), r.append("height", this.height.toString()), r.append("type", "shirt"), r.append("skus", JSON.stringify(this.skus));
1524
+ r.append("image", s), r.append("height", this.height.toString()), r.append("product_sku", this.productSku);
1525
1525
  try {
1526
1526
  this.isFetching = !0, this.isLoading = !0, this.poolingTimeout !== null && (clearTimeout(this.poolingTimeout), this.poolingTimeout = null), this.instructionMessageTimeout !== null && (clearTimeout(this.instructionMessageTimeout), this.instructionMessageTimeout = null);
1527
1527
  const h = await (await fetch("https://xactsize-api-923169850574.southamerica-east1.run.app/api/measurer/measure/body", {
@@ -1531,7 +1531,8 @@ let d = class extends C {
1531
1531
  Accept: "application/json",
1532
1532
  // Ensure JSON response
1533
1533
  "Cache-Control": "no-store",
1534
- Pragma: "no-cache"
1534
+ Pragma: "no-cache",
1535
+ "X-Api-Key": this.apiKey
1535
1536
  }
1536
1537
  })).json();
1537
1538
  this.isFetching = !1, this.isLoading = !1, h.success ? (this.measurements = h.measurements, this.recommendedSize = h.chosenSize, this.instructionMessage = a("Measurement successful!"), this.stopPolling(), this.step = 3) : (this.instructionMessage = this.getTranslatedMessage(h.message || "UNKNOWN_ERROR"), this.instructionMessageTimeout = setTimeout(() => {
@@ -2034,6 +2035,9 @@ d.styles = j`
2034
2035
  u([
2035
2036
  m({ type: String, attribute: "api-key" })
2036
2037
  ], d.prototype, "apiKey", 2);
2038
+ u([
2039
+ m({ type: String, attribute: "product-sku" })
2040
+ ], d.prototype, "productSku", 2);
2037
2041
  u([
2038
2042
  m({ type: Function, attribute: "onmeasurementaccepted" })
2039
2043
  ], d.prototype, "onMeasurementAccepted", 2);
@@ -2092,7 +2096,7 @@ u([
2092
2096
  _()
2093
2097
  ], d.prototype, "currentCameraId", 2);
2094
2098
  d = u([
2095
- Z("body-measurer"),
2099
+ k("body-measurer"),
2096
2100
  te()
2097
2101
  ], d);
2098
2102
  export {
@@ -2,17 +2,17 @@
2
2
  * @license
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
- */const Y=globalThis,se=Y.ShadowRoot&&(Y.ShadyCSS===void 0||Y.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,oe=Symbol(),Ee=new WeakMap;let ye=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==oe)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(se&&e===void 0){const i=t!==void 0&&t.length===1;i&&(e=Ee.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&Ee.set(t,e))}return e}toString(){return this.cssText}};const Ge=o=>new ye(typeof o=="string"?o:o+"",void 0,oe),B=(o,...e)=>{const t=o.length===1?o[0]:e.reduce((i,s,r)=>i+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+o[r+1],o[0]);return new ye(t,o,oe)},Ze=(o,e)=>{if(se)o.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of e){const i=document.createElement("style"),s=Y.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=t.cssText,o.appendChild(i)}},ve=se?o=>o:o=>o instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return Ge(t)})(o):o;/**
5
+ */const Y=globalThis,se=Y.ShadowRoot&&(Y.ShadyCSS===void 0||Y.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,oe=Symbol(),Ee=new WeakMap;let ye=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==oe)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(se&&e===void 0){const i=t!==void 0&&t.length===1;i&&(e=Ee.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&Ee.set(t,e))}return e}toString(){return this.cssText}};const Ge=o=>new ye(typeof o=="string"?o:o+"",void 0,oe),B=(o,...e)=>{const t=o.length===1?o[0]:e.reduce((i,s,r)=>i+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+o[r+1],o[0]);return new ye(t,o,oe)},ke=(o,e)=>{if(se)o.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of e){const i=document.createElement("style"),s=Y.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=t.cssText,o.appendChild(i)}},ve=se?o=>o:o=>o instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return Ge(t)})(o):o;/**
6
6
  * @license
7
7
  * Copyright 2017 Google LLC
8
8
  * SPDX-License-Identifier: BSD-3-Clause
9
- */const{is:ke,defineProperty:qe,getOwnPropertyDescriptor:Ye,getOwnPropertyNames:We,getOwnPropertySymbols:Ke,getPrototypeOf:Xe}=Object,b=globalThis,Ce=b.trustedTypes,Je=Ce?Ce.emptyScript:"",re=b.reactiveElementPolyfillSupport,P=(o,e)=>o,W={toAttribute(o,e){switch(e){case Boolean:o=o?Je:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,e){let t=o;switch(e){case Boolean:t=o!==null;break;case Number:t=o===null?null:Number(o);break;case Object:case Array:try{t=JSON.parse(o)}catch{t=null}}return t}},ne=(o,e)=>!ke(o,e),be={attribute:!0,type:String,converter:W,reflect:!1,useDefault:!1,hasChanged:ne};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),b.litPropertyMetadata??(b.litPropertyMetadata=new WeakMap);let I=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=be){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&&qe(this.prototype,e,s)}}static getPropertyDescriptor(e,t,i){const{get:s,set:r}=Ye(this.prototype,e)??{get(){return this[t]},set(n){this[t]=n}};return{get:s,set(n){const d=s==null?void 0:s.call(this);r==null||r.call(this,n),this.requestUpdate(e,d,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??be}static _$Ei(){if(this.hasOwnProperty(P("elementProperties")))return;const e=Xe(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(P("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(P("properties"))){const t=this.properties,i=[...We(t),...Ke(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(ve(s))}else e!==void 0&&t.push(ve(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 Ze(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 r;const i=this.constructor.elementProperties.get(e),s=this.constructor._$Eu(e,i);if(s!==void 0&&i.reflect===!0){const n=(((r=i.converter)==null?void 0:r.toAttribute)!==void 0?i.converter:W).toAttribute(t,i.type);this._$Em=e,n==null?this.removeAttribute(s):this.setAttribute(s,n),this._$Em=null}}_$AK(e,t){var r,n;const i=this.constructor,s=i._$Eh.get(e);if(s!==void 0&&this._$Em!==s){const d=i.getPropertyOptions(s),a=typeof d.converter=="function"?{fromAttribute:d.converter}:((r=d.converter)==null?void 0:r.fromAttribute)!==void 0?d.converter:W;this._$Em=s,this[s]=a.fromAttribute(t,d.type)??((n=this._$Ej)==null?void 0:n.get(s))??null,this._$Em=null}}requestUpdate(e,t,i){var s;if(e!==void 0){const r=this.constructor,n=this[e];if(i??(i=r.getPropertyOptions(e)),!((i.hasChanged??ne)(n,t)||i.useDefault&&i.reflect&&n===((s=this._$Ej)==null?void 0:s.get(e))&&!this.hasAttribute(r._$Eu(e,i))))return;this.C(e,t,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:i,reflect:s,wrapped:r},n){i&&!(this._$Ej??(this._$Ej=new Map)).has(e)&&(this._$Ej.set(e,n??t??this[e]),r!==!0||n!==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[r,n]of this._$Ep)this[r]=n;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[r,n]of s){const{wrapped:d}=n,a=this[r];d!==!0||this._$AL.has(r)||a===void 0||this.C(r,void 0,n,a)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(i=this._$EO)==null||i.forEach(s=>{var r;return(r=s.hostUpdate)==null?void 0:r.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){}};I.elementStyles=[],I.shadowRootOptions={mode:"open"},I[P("elementProperties")]=new Map,I[P("finalized")]=new Map,re==null||re({ReactiveElement:I}),(b.reactiveElementVersions??(b.reactiveElementVersions=[])).push("2.1.0");/**
9
+ */const{is:Ze,defineProperty:qe,getOwnPropertyDescriptor:Ye,getOwnPropertyNames:We,getOwnPropertySymbols:Ke,getPrototypeOf:Xe}=Object,b=globalThis,Ce=b.trustedTypes,Je=Ce?Ce.emptyScript:"",re=b.reactiveElementPolyfillSupport,P=(o,e)=>o,W={toAttribute(o,e){switch(e){case Boolean:o=o?Je:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,e){let t=o;switch(e){case Boolean:t=o!==null;break;case Number:t=o===null?null:Number(o);break;case Object:case Array:try{t=JSON.parse(o)}catch{t=null}}return t}},ne=(o,e)=>!Ze(o,e),be={attribute:!0,type:String,converter:W,reflect:!1,useDefault:!1,hasChanged:ne};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),b.litPropertyMetadata??(b.litPropertyMetadata=new WeakMap);let I=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=be){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&&qe(this.prototype,e,s)}}static getPropertyDescriptor(e,t,i){const{get:s,set:r}=Ye(this.prototype,e)??{get(){return this[t]},set(n){this[t]=n}};return{get:s,set(n){const d=s==null?void 0:s.call(this);r==null||r.call(this,n),this.requestUpdate(e,d,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??be}static _$Ei(){if(this.hasOwnProperty(P("elementProperties")))return;const e=Xe(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(P("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(P("properties"))){const t=this.properties,i=[...We(t),...Ke(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(ve(s))}else e!==void 0&&t.push(ve(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 ke(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 r;const i=this.constructor.elementProperties.get(e),s=this.constructor._$Eu(e,i);if(s!==void 0&&i.reflect===!0){const n=(((r=i.converter)==null?void 0:r.toAttribute)!==void 0?i.converter:W).toAttribute(t,i.type);this._$Em=e,n==null?this.removeAttribute(s):this.setAttribute(s,n),this._$Em=null}}_$AK(e,t){var r,n;const i=this.constructor,s=i._$Eh.get(e);if(s!==void 0&&this._$Em!==s){const d=i.getPropertyOptions(s),a=typeof d.converter=="function"?{fromAttribute:d.converter}:((r=d.converter)==null?void 0:r.fromAttribute)!==void 0?d.converter:W;this._$Em=s,this[s]=a.fromAttribute(t,d.type)??((n=this._$Ej)==null?void 0:n.get(s))??null,this._$Em=null}}requestUpdate(e,t,i){var s;if(e!==void 0){const r=this.constructor,n=this[e];if(i??(i=r.getPropertyOptions(e)),!((i.hasChanged??ne)(n,t)||i.useDefault&&i.reflect&&n===((s=this._$Ej)==null?void 0:s.get(e))&&!this.hasAttribute(r._$Eu(e,i))))return;this.C(e,t,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:i,reflect:s,wrapped:r},n){i&&!(this._$Ej??(this._$Ej=new Map)).has(e)&&(this._$Ej.set(e,n??t??this[e]),r!==!0||n!==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[r,n]of this._$Ep)this[r]=n;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[r,n]of s){const{wrapped:d}=n,a=this[r];d!==!0||this._$AL.has(r)||a===void 0||this.C(r,void 0,n,a)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(i=this._$EO)==null||i.forEach(s=>{var r;return(r=s.hostUpdate)==null?void 0:r.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){}};I.elementStyles=[],I.shadowRootOptions={mode:"open"},I[P("elementProperties")]=new Map,I[P("finalized")]=new Map,re==null||re({ReactiveElement:I}),(b.reactiveElementVersions??(b.reactiveElementVersions=[])).push("2.1.0");/**
10
10
  * @license
11
11
  * Copyright 2017 Google LLC
12
12
  * SPDX-License-Identifier: BSD-3-Clause
13
13
  */const N=globalThis,K=N.trustedTypes,Re=K?K.createPolicy("lit-html",{createHTML:o=>o}):void 0,xe="$lit$",R=`lit$${Math.random().toFixed(9).slice(2)}$`,Ae="?"+R,Qe=`<${Ae}>`,A=document,U=()=>A.createComment(""),V=o=>o===null||typeof o!="object"&&typeof o!="function",ae=Array.isArray,et=o=>ae(o)||typeof(o==null?void 0:o[Symbol.iterator])=="function",le=`[
14
14
  \f\r]`,z=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Me=/-->/g,we=/>/g,M=RegExp(`>|${le}(?:([^\\s"'>=/]+)(${le}*=${le}*(?:[^
15
- \f\r"'\`<>=]|("|')|))|$)`,"g"),$e=/'/g,Te=/"/g,Se=/^(?:script|style|textarea|title)$/i,tt=o=>(e,...t)=>({_$litType$:o,strings:e,values:t}),E=tt(1),w=Symbol.for("lit-noChange"),f=Symbol.for("lit-nothing"),Le=new WeakMap,$=A.createTreeWalker(A,129);function Oe(o,e){if(!ae(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return Re!==void 0?Re.createHTML(e):e}const it=(o,e)=>{const t=o.length-1,i=[];let s,r=e===2?"<svg>":e===3?"<math>":"",n=z;for(let d=0;d<t;d++){const a=o[d];let p,m,h=-1,C=0;for(;C<a.length&&(n.lastIndex=C,m=n.exec(a),m!==null);)C=n.lastIndex,n===z?m[1]==="!--"?n=Me:m[1]!==void 0?n=we:m[2]!==void 0?(Se.test(m[2])&&(s=RegExp("</"+m[2],"g")),n=M):m[3]!==void 0&&(n=M):n===M?m[0]===">"?(n=s??z,h=-1):m[1]===void 0?h=-2:(h=n.lastIndex-m[2].length,p=m[1],n=m[3]===void 0?M:m[3]==='"'?Te:$e):n===Te||n===$e?n=M:n===Me||n===we?n=z:(n=M,s=void 0);const x=n===M&&o[d+1].startsWith("/>")?" ":"";r+=n===z?a+Qe:h>=0?(i.push(p),a.slice(0,h)+xe+a.slice(h)+R+x):a+R+(h===-2?d:x)}return[Oe(o,r+(o[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),i]};class j{constructor({strings:e,_$litType$:t},i){let s;this.parts=[];let r=0,n=0;const d=e.length-1,a=this.parts,[p,m]=it(e,t);if(this.el=j.createElement(p,i),$.currentNode=this.el.content,t===2||t===3){const h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(s=$.nextNode())!==null&&a.length<d;){if(s.nodeType===1){if(s.hasAttributes())for(const h of s.getAttributeNames())if(h.endsWith(xe)){const C=m[n++],x=s.getAttribute(h).split(R),ie=/([.?@])?(.*)/.exec(C);a.push({type:1,index:r,name:ie[2],strings:x,ctor:ie[1]==="."?ot:ie[1]==="?"?rt:ie[1]==="@"?nt:X}),s.removeAttribute(h)}else h.startsWith(R)&&(a.push({type:6,index:r}),s.removeAttribute(h));if(Se.test(s.tagName)){const h=s.textContent.split(R),C=h.length-1;if(C>0){s.textContent=K?K.emptyScript:"";for(let x=0;x<C;x++)s.append(h[x],U()),$.nextNode(),a.push({type:2,index:++r});s.append(h[C],U())}}}else if(s.nodeType===8)if(s.data===Ae)a.push({type:2,index:r});else{let h=-1;for(;(h=s.data.indexOf(R,h+1))!==-1;)a.push({type:7,index:r}),h+=R.length-1}r++}}static createElement(e,t){const i=A.createElement("template");return i.innerHTML=e,i}}function D(o,e,t=o,i){var n,d;if(e===w)return e;let s=i!==void 0?(n=t._$Co)==null?void 0:n[i]:t._$Cl;const r=V(e)?void 0:e._$litDirective$;return(s==null?void 0:s.constructor)!==r&&((d=s==null?void 0:s._$AO)==null||d.call(s,!1),r===void 0?s=void 0:(s=new r(o),s._$AT(o,t,i)),i!==void 0?(t._$Co??(t._$Co=[]))[i]=s:t._$Cl=s),s!==void 0&&(e=D(o,s._$AS(o,e.values),s,i)),e}class st{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)??A).importNode(t,!0);$.currentNode=s;let r=$.nextNode(),n=0,d=0,a=i[0];for(;a!==void 0;){if(n===a.index){let p;a.type===2?p=new F(r,r.nextSibling,this,e):a.type===1?p=new a.ctor(r,a.name,a.strings,this,e):a.type===6&&(p=new at(r,this,e)),this._$AV.push(p),a=i[++d]}n!==(a==null?void 0:a.index)&&(r=$.nextNode(),n++)}return $.currentNode=A,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 F{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=f,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=D(this,e,t),V(e)?e===f||e==null||e===""?(this._$AH!==f&&this._$AR(),this._$AH=f):e!==this._$AH&&e!==w&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):et(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!==f&&V(this._$AH)?this._$AA.nextSibling.data=e:this.T(A.createTextNode(e)),this._$AH=e}$(e){var r;const{values:t,_$litType$:i}=e,s=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=j.createElement(Oe(i.h,i.h[0]),this.options)),i);if(((r=this._$AH)==null?void 0:r._$AD)===s)this._$AH.p(t);else{const n=new st(s,this),d=n.u(this.options);n.p(t),this.T(d),this._$AH=n}}_$AC(e){let t=Le.get(e.strings);return t===void 0&&Le.set(e.strings,t=new j(e)),t}k(e){ae(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let i,s=0;for(const r of e)s===t.length?t.push(i=new F(this.O(U()),this.O(U()),this,this.options)):i=t[s],i._$AI(r),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 X{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,i,s,r){this.type=1,this._$AH=f,this._$AN=void 0,this.element=e,this.name=t,this._$AM=s,this.options=r,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=f}_$AI(e,t=this,i,s){const r=this.strings;let n=!1;if(r===void 0)e=D(this,e,t,0),n=!V(e)||e!==this._$AH&&e!==w,n&&(this._$AH=e);else{const d=e;let a,p;for(e=r[0],a=0;a<r.length-1;a++)p=D(this,d[i+a],t,a),p===w&&(p=this._$AH[a]),n||(n=!V(p)||p!==this._$AH[a]),p===f?e=f:e!==f&&(e+=(p??"")+r[a+1]),this._$AH[a]=p}n&&!s&&this.j(e)}j(e){e===f?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class ot extends X{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===f?void 0:e}}class rt extends X{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==f)}}class nt extends X{constructor(e,t,i,s,r){super(e,t,i,s,r),this.type=5}_$AI(e,t=this){if((e=D(this,e,t,0)??f)===w)return;const i=this._$AH,s=e===f&&i!==f||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,r=e!==f&&(i===f||s);s&&this.element.removeEventListener(this.name,this,i),r&&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 at{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){D(this,e)}}const de=N.litHtmlPolyfillSupport;de==null||de(j,F),(N.litHtmlVersions??(N.litHtmlVersions=[])).push("3.3.0");const lt=(o,e,t)=>{const i=(t==null?void 0:t.renderBefore)??e;let s=i._$litPart$;if(s===void 0){const r=(t==null?void 0:t.renderBefore)??null;i._$litPart$=s=new F(e.insertBefore(U(),r),r,void 0,t??{})}return s._$AI(o),s};/**
15
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),$e=/'/g,Te=/"/g,Se=/^(?:script|style|textarea|title)$/i,tt=o=>(e,...t)=>({_$litType$:o,strings:e,values:t}),E=tt(1),w=Symbol.for("lit-noChange"),f=Symbol.for("lit-nothing"),Le=new WeakMap,$=A.createTreeWalker(A,129);function Oe(o,e){if(!ae(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return Re!==void 0?Re.createHTML(e):e}const it=(o,e)=>{const t=o.length-1,i=[];let s,r=e===2?"<svg>":e===3?"<math>":"",n=z;for(let d=0;d<t;d++){const a=o[d];let u,m,h=-1,C=0;for(;C<a.length&&(n.lastIndex=C,m=n.exec(a),m!==null);)C=n.lastIndex,n===z?m[1]==="!--"?n=Me:m[1]!==void 0?n=we:m[2]!==void 0?(Se.test(m[2])&&(s=RegExp("</"+m[2],"g")),n=M):m[3]!==void 0&&(n=M):n===M?m[0]===">"?(n=s??z,h=-1):m[1]===void 0?h=-2:(h=n.lastIndex-m[2].length,u=m[1],n=m[3]===void 0?M:m[3]==='"'?Te:$e):n===Te||n===$e?n=M:n===Me||n===we?n=z:(n=M,s=void 0);const x=n===M&&o[d+1].startsWith("/>")?" ":"";r+=n===z?a+Qe:h>=0?(i.push(u),a.slice(0,h)+xe+a.slice(h)+R+x):a+R+(h===-2?d:x)}return[Oe(o,r+(o[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),i]};class j{constructor({strings:e,_$litType$:t},i){let s;this.parts=[];let r=0,n=0;const d=e.length-1,a=this.parts,[u,m]=it(e,t);if(this.el=j.createElement(u,i),$.currentNode=this.el.content,t===2||t===3){const h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(s=$.nextNode())!==null&&a.length<d;){if(s.nodeType===1){if(s.hasAttributes())for(const h of s.getAttributeNames())if(h.endsWith(xe)){const C=m[n++],x=s.getAttribute(h).split(R),ie=/([.?@])?(.*)/.exec(C);a.push({type:1,index:r,name:ie[2],strings:x,ctor:ie[1]==="."?ot:ie[1]==="?"?rt:ie[1]==="@"?nt:X}),s.removeAttribute(h)}else h.startsWith(R)&&(a.push({type:6,index:r}),s.removeAttribute(h));if(Se.test(s.tagName)){const h=s.textContent.split(R),C=h.length-1;if(C>0){s.textContent=K?K.emptyScript:"";for(let x=0;x<C;x++)s.append(h[x],U()),$.nextNode(),a.push({type:2,index:++r});s.append(h[C],U())}}}else if(s.nodeType===8)if(s.data===Ae)a.push({type:2,index:r});else{let h=-1;for(;(h=s.data.indexOf(R,h+1))!==-1;)a.push({type:7,index:r}),h+=R.length-1}r++}}static createElement(e,t){const i=A.createElement("template");return i.innerHTML=e,i}}function D(o,e,t=o,i){var n,d;if(e===w)return e;let s=i!==void 0?(n=t._$Co)==null?void 0:n[i]:t._$Cl;const r=V(e)?void 0:e._$litDirective$;return(s==null?void 0:s.constructor)!==r&&((d=s==null?void 0:s._$AO)==null||d.call(s,!1),r===void 0?s=void 0:(s=new r(o),s._$AT(o,t,i)),i!==void 0?(t._$Co??(t._$Co=[]))[i]=s:t._$Cl=s),s!==void 0&&(e=D(o,s._$AS(o,e.values),s,i)),e}class st{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)??A).importNode(t,!0);$.currentNode=s;let r=$.nextNode(),n=0,d=0,a=i[0];for(;a!==void 0;){if(n===a.index){let u;a.type===2?u=new F(r,r.nextSibling,this,e):a.type===1?u=new a.ctor(r,a.name,a.strings,this,e):a.type===6&&(u=new at(r,this,e)),this._$AV.push(u),a=i[++d]}n!==(a==null?void 0:a.index)&&(r=$.nextNode(),n++)}return $.currentNode=A,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 F{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=f,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=D(this,e,t),V(e)?e===f||e==null||e===""?(this._$AH!==f&&this._$AR(),this._$AH=f):e!==this._$AH&&e!==w&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):et(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!==f&&V(this._$AH)?this._$AA.nextSibling.data=e:this.T(A.createTextNode(e)),this._$AH=e}$(e){var r;const{values:t,_$litType$:i}=e,s=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=j.createElement(Oe(i.h,i.h[0]),this.options)),i);if(((r=this._$AH)==null?void 0:r._$AD)===s)this._$AH.p(t);else{const n=new st(s,this),d=n.u(this.options);n.p(t),this.T(d),this._$AH=n}}_$AC(e){let t=Le.get(e.strings);return t===void 0&&Le.set(e.strings,t=new j(e)),t}k(e){ae(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let i,s=0;for(const r of e)s===t.length?t.push(i=new F(this.O(U()),this.O(U()),this,this.options)):i=t[s],i._$AI(r),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 X{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,i,s,r){this.type=1,this._$AH=f,this._$AN=void 0,this.element=e,this.name=t,this._$AM=s,this.options=r,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=f}_$AI(e,t=this,i,s){const r=this.strings;let n=!1;if(r===void 0)e=D(this,e,t,0),n=!V(e)||e!==this._$AH&&e!==w,n&&(this._$AH=e);else{const d=e;let a,u;for(e=r[0],a=0;a<r.length-1;a++)u=D(this,d[i+a],t,a),u===w&&(u=this._$AH[a]),n||(n=!V(u)||u!==this._$AH[a]),u===f?e=f:e!==f&&(e+=(u??"")+r[a+1]),this._$AH[a]=u}n&&!s&&this.j(e)}j(e){e===f?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class ot extends X{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===f?void 0:e}}class rt extends X{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==f)}}class nt extends X{constructor(e,t,i,s,r){super(e,t,i,s,r),this.type=5}_$AI(e,t=this){if((e=D(this,e,t,0)??f)===w)return;const i=this._$AH,s=e===f&&i!==f||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,r=e!==f&&(i===f||s);s&&this.element.removeEventListener(this.name,this,i),r&&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 at{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){D(this,e)}}const de=N.litHtmlPolyfillSupport;de==null||de(j,F),(N.litHtmlVersions??(N.litHtmlVersions=[])).push("3.3.0");const lt=(o,e,t)=>{const i=(t==null?void 0:t.renderBefore)??e;let s=i._$litPart$;if(s===void 0){const r=(t==null?void 0:t.renderBefore)??null;i._$litPart$=s=new F(e.insertBefore(U(),r),r,void 0,t??{})}return s._$AI(o),s};/**
16
16
  * @license
17
17
  * Copyright 2017 Google LLC
18
18
  * SPDX-License-Identifier: BSD-3-Clause
@@ -56,7 +56,7 @@
56
56
  * @license
57
57
  * Copyright 2014 Travis Webb
58
58
  * SPDX-License-Identifier: MIT
59
- */const v=[];for(let o=0;o<256;o++)v[o]=(o>>4&15).toString(16)+(o&15).toString(16);function _t(o){let e=0,t=8997,i=0,s=33826,r=0,n=40164,d=0,a=52210;for(let p=0;p<o.length;p++)t^=o.charCodeAt(p),e=t*435,i=s*435,r=n*435,d=a*435,r+=t<<8,d+=s<<8,i+=e>>>16,t=e&65535,r+=i>>>16,s=i&65535,a=d+(r>>>16)&65535,n=r&65535;return v[a>>8]+v[a&255]+v[n>>8]+v[n&255]+v[s>>8]+v[s&255]+v[t>>8]+v[t&255]}/**
59
+ */const v=[];for(let o=0;o<256;o++)v[o]=(o>>4&15).toString(16)+(o&15).toString(16);function _t(o){let e=0,t=8997,i=0,s=33826,r=0,n=40164,d=0,a=52210;for(let u=0;u<o.length;u++)t^=o.charCodeAt(u),e=t*435,i=s*435,r=n*435,d=a*435,r+=t<<8,d+=s<<8,i+=e>>>16,t=e&65535,r+=i>>>16,s=i&65535,a=d+(r>>>16)&65535,n=r&65535;return v[a>>8]+v[a&255]+v[n>>8]+v[n&255]+v[s>>8]+v[s&255]+v[t>>8]+v[t&255]}/**
60
60
  * @license
61
61
  * Copyright 2020 Google LLC
62
62
  * SPDX-License-Identifier: BSD-3-Clause
@@ -76,7 +76,7 @@
76
76
  * @license
77
77
  * Copyright 2018 Google LLC
78
78
  * SPDX-License-Identifier: BSD-3-Clause
79
- */const Tt=wt(class extends $t{constructor(o){var e;if(super(o),o.type!==Mt.ATTRIBUTE||o.name!=="class"||((e=o.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(o){return" "+Object.keys(o).filter(e=>o[e]).join(" ")+" "}update(o,[e]){var i,s;if(this.st===void 0){this.st=new Set,o.strings!==void 0&&(this.nt=new Set(o.strings.join(" ").split(/\s/).filter(r=>r!=="")));for(const r in e)e[r]&&!((i=this.nt)!=null&&i.has(r))&&this.st.add(r);return this.render(e)}const t=o.element.classList;for(const r of this.st)r in e||(t.remove(r),this.st.delete(r));for(const r in e){const n=!!e[r];n===this.st.has(r)||(s=this.nt)!=null&&s.has(r)||(n?(t.add(r),this.st.add(r)):(t.remove(r),this.st.delete(r)))}return w}});var St=Object.defineProperty,Lt=Object.getOwnPropertyDescriptor,Z=(o,e,t,i)=>{for(var s=i>1?void 0:i?Lt(e,t):e,r=o.length-1,n;r>=0;r--)(n=o[r])&&(s=(i?n(e,t,s):n(s))||s);return i&&s&&St(e,t,s),s};let L=class extends y{constructor(){super(...arguments),this.type="button",this.label="",this.disabled=!1,this.variant="contained"}render(){return E`
79
+ */const Tt=wt(class extends $t{constructor(o){var e;if(super(o),o.type!==Mt.ATTRIBUTE||o.name!=="class"||((e=o.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(o){return" "+Object.keys(o).filter(e=>o[e]).join(" ")+" "}update(o,[e]){var i,s;if(this.st===void 0){this.st=new Set,o.strings!==void 0&&(this.nt=new Set(o.strings.join(" ").split(/\s/).filter(r=>r!=="")));for(const r in e)e[r]&&!((i=this.nt)!=null&&i.has(r))&&this.st.add(r);return this.render(e)}const t=o.element.classList;for(const r of this.st)r in e||(t.remove(r),this.st.delete(r));for(const r in e){const n=!!e[r];n===this.st.has(r)||(s=this.nt)!=null&&s.has(r)||(n?(t.add(r),this.st.add(r)):(t.remove(r),this.st.delete(r)))}return w}});var St=Object.defineProperty,Lt=Object.getOwnPropertyDescriptor,k=(o,e,t,i)=>{for(var s=i>1?void 0:i?Lt(e,t):e,r=o.length-1,n;r>=0;r--)(n=o[r])&&(s=(i?n(e,t,s):n(s))||s);return i&&s&&St(e,t,s),s};let L=class extends y{constructor(){super(...arguments),this.type="button",this.label="",this.disabled=!1,this.variant="contained"}render(){return E`
80
80
  <button
81
81
  class=${this.variant}
82
82
  tabindex="0"
@@ -136,7 +136,7 @@
136
136
  opacity: 0.6;
137
137
  cursor: not-allowed;
138
138
  }
139
- `,Z([_({type:String})],L.prototype,"type",2),Z([_({type:String})],L.prototype,"label",2),Z([_({type:Boolean})],L.prototype,"disabled",2),Z([_({type:String})],L.prototype,"variant",2),L=Z([G("xact-button")],L);var Ot=Object.defineProperty,It=Object.getOwnPropertyDescriptor,_e=(o,e,t,i)=>{for(var s=i>1?void 0:i?It(e,t):e,r=o.length-1,n;r>=0;r--)(n=o[r])&&(s=(i?n(e,t,s):n(s))||s);return i&&s&&Ot(e,t,s),s};let k=class extends y{constructor(){super(...arguments),this.height=0}render(){return E`
139
+ `,k([_({type:String})],L.prototype,"type",2),k([_({type:String})],L.prototype,"label",2),k([_({type:Boolean})],L.prototype,"disabled",2),k([_({type:String})],L.prototype,"variant",2),L=k([G("xact-button")],L);var Ot=Object.defineProperty,It=Object.getOwnPropertyDescriptor,_e=(o,e,t,i)=>{for(var s=i>1?void 0:i?It(e,t):e,r=o.length-1,n;r>=0;r--)(n=o[r])&&(s=(i?n(e,t,s):n(s))||s);return i&&s&&Ot(e,t,s),s};let Z=class extends y{constructor(){super(...arguments),this.height=0}render(){return E`
140
140
  <div class="step-1">
141
141
  <div class="step-1-container-left">
142
142
  <div class="step-1-image-container">
@@ -235,7 +235,7 @@
235
235
  label="${l("Let's go!")}"
236
236
  ></xact-button>
237
237
  </div>
238
- `}};k.styles=B`
238
+ `}};Z.styles=B`
239
239
  :host {
240
240
  display: block;
241
241
  font-family: "Lato", sans-serif;
@@ -357,7 +357,7 @@
357
357
  text-align: left;
358
358
  }
359
359
  }
360
- `,_e([_({type:Number})],k.prototype,"height",2),_e([_({type:Function})],k.prototype,"onStartMeasurement",2),k=_e([G("xact-step-one"),J()],k);var Dt=Object.getOwnPropertyDescriptor,Ht=(o,e,t,i)=>{for(var s=i>1?void 0:i?Dt(e,t):e,r=o.length-1,n;r>=0;r--)(n=o[r])&&(s=n(s)||s);return s};let me=class extends y{render(){return E`
360
+ `,_e([_({type:Number})],Z.prototype,"height",2),_e([_({type:Function})],Z.prototype,"onStartMeasurement",2),Z=_e([G("xact-step-one"),J()],Z);var Dt=Object.getOwnPropertyDescriptor,Ht=(o,e,t,i)=>{for(var s=i>1?void 0:i?Dt(e,t):e,r=o.length-1,n;r>=0;r--)(n=o[r])&&(s=n(s)||s);return s};let me=class extends y{render(){return E`
361
361
  <footer class="modal-footer">
362
362
  <span>
363
363
  <span class="powered-by">${l("Powered by")}</span>
@@ -512,7 +512,7 @@
512
512
  max-width: 50%;
513
513
  }
514
514
  }
515
- `,q([_({type:String})],O.prototype,"productName",2),q([_({type:String})],O.prototype,"recommendedSize",2),q([_({type:Function})],O.prototype,"onAccept",2),q([_({type:Function})],O.prototype,"onRetry",2),O=q([G("xact-step-result"),J()],O);const je="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",Nt="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",Ut="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";var Vt=Object.defineProperty,zt=Object.getOwnPropertyDescriptor,u=(o,e,t,i)=>{for(var s=i>1?void 0:i?zt(e,t):e,r=o.length-1,n;r>=0;r--)(n=o[r])&&(s=(i?n(e,t,s):n(s))||s);return i&&s&&Vt(e,t,s),s};const{getLocale:jt,setLocale:ge}=bt({sourceLocale:ze,targetLocales:At,loadLocale:o=>H(Object.assign({"./generated/locales/pt-BR.ts":()=>Promise.resolve().then(()=>Ft)}),`./generated/locales/${o}.ts`,4)});c.BodyMeasurer=class extends y{constructor(){super(...arguments),this.spinnerFrame=0,this.apiKey="",this._culture="pt-BR",this._isLocaleLoading=!1,this.skus=[],this.productName="",this.showModal=!1,this.step=1,this.height=0,this.recommendedSize="",this.measurements={},this.errorMessage="",this.instructionMessage=l("Position yourself in front of the camera"),this.shouldStartMeasurement=!1,this.isLoading=!1,this.isFetching=!1,this.videoElement=null,this.stream=null,this.poolingTimeout=null,this.instructionMessageTimeout=null,this.cameras=[],this.currentCameraId=null}firstUpdated(){this.startSpinnerAnimation()}startSpinnerAnimation(){const e=[Ut,Nt,je];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 ge(e)}catch(t){console.error("Failed to load locale",e,t),await ge(ze)}finally{this._isLocaleLoading=!1,this.requestUpdate()}}get errorMap(){return{ERR_RIGHT_ARM_TOO_HIGH:l("Lower your right arm",{id:"ERR_RIGHT_ARM_TOO_HIGH"}),ERR_LEFT_ARM_TOO_HIGH:l("Lower your left arm",{id:"ERR_LEFT_ARM_TOO_HIGH"}),ERR_ARMS_NOT_RAISED:l("Raise both arms to a 45-degree angle",{id:"ERR_ARMS_NOT_RAISED"}),ERR_RIGHT_ARM_NOT_RAISED:l("Raise your right arm to a 45-degree angle",{id:"ERR_RIGHT_ARM_NOT_RAISED"}),ERR_LEFT_ARM_NOT_RAISED:l("Raise your left arm to a 45-degree angle",{id:"ERR_LEFT_ARM_NOT_RAISED"}),ERR_BODY_LANDMARKS_NOT_DETECTED:l("Ensure your full body is visible in the camera",{id:"ERR_BODY_LANDMARKS_NOT_DETECTED"}),ERR_HIPS_NOT_VISIBLE:l("Adjust your position to show your hips",{id:"ERR_HIPS_NOT_VISIBLE"}),ERR_TOO_CLOSE_TO_CAMERA:l("Step back from the camera",{id:"ERR_TOO_CLOSE_TO_CAMERA"}),ERR_NOT_SIDE_VIEW:l("Turn to show your side profile",{id:"ERR_NOT_SIDE_VIEW"}),ERR_INVALID_CLOTHING_TYPE:l("This clothing type is not supported; please contact support",{id:"ERR_INVALID_CLOTHING_TYPE"}),ERR_UPPER_BODY_NOT_VISIBLE:l("Adjust your position to show your upper body",{id:"ERR_UPPER_BODY_NOT_VISIBLE"}),ERR_HEAD_TOO_CLOSE_TO_EDGE:l("Move your head away from the edge of the frame",{id:"ERR_HEAD_TOO_CLOSE_TO_EDGE"}),ERR_LOWER_BODY_NOT_VISIBLE:l("Adjust your position to show your lower body",{id:"ERR_LOWER_BODY_NOT_VISIBLE"}),ERR_FEET_TOO_CLOSE_TO_EDGE:l("Move your feet away from the edge of the frame",{id:"ERR_FEET_TOO_CLOSE_TO_EDGE"}),ERR_BODY_TOO_CLOSE_TO_EDGE:l("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:l("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:l("Move to the right to center your body",{id:"ERR_BODY_TOO_CLOSE_TO_EDGE_MOVE_RIGHT"}),ERR_SHOULDERS_NOT_VISIBLE:l("Adjust your position to show your shoulders",{id:"ERR_SHOULDERS_NOT_VISIBLE"}),ERR_HEIGHT_MEASUREMENT_FAILED:l("Stand straight and ensure your full body is visible",{id:"ERR_HEIGHT_MEASUREMENT_FAILED"}),ERR_HEAD_POINT_NOT_DETECTED:l("Ensure your head is fully visible in the frame",{id:"ERR_HEAD_POINT_NOT_DETECTED"}),ERR_INCORRECT_POSTURE:l("Stand straight with your shoulders back",{id:"ERR_INCORRECT_POSTURE"}),ERR_HEM_MEASUREMENT_FAILED:l("Ensure your clothing hem is visible and clear",{id:"ERR_HEM_MEASUREMENT_FAILED"}),ERR_SHOULDER_MEASUREMENT_FAILED:l("Keep your shoulders relaxed and visible",{id:"ERR_SHOULDER_MEASUREMENT_FAILED"}),ERR_ARM_NOT_STRETCHED:l("Stretch your arms fully",{id:"ERR_ARM_NOT_STRETCHED"}),ERR_LEGS_NOT_DETECTED:l("Ensure your legs are fully visible in the frame",{id:"ERR_LEGS_NOT_DETECTED"}),ERR_HIPS_MEASUREMENT_FAILED:l("Stand straight and ensure your hips are visible",{id:"ERR_HIPS_MEASUREMENT_FAILED"}),ERR_WAIST_MEASUREMENT_FAILED:l("Stand straight and ensure your waist is visible",{id:"ERR_WAIST_MEASUREMENT_FAILED"}),ERR_INVALID_MEASURE_SIDE_VIEW:l("Turn to show a clear side profile",{id:"ERR_INVALID_MEASURE_SIDE_VIEW"}),ERR_INVALID_BODY_HEIGHT_TYPE:l("Ensure your full body is visible for height measurement",{id:"ERR_INVALID_BODY_HEIGHT_TYPE"}),ERR_IMAGE_LOAD_FAILED:l("Try again later; the image could not be processed",{id:"ERR_IMAGE_LOAD_FAILED"}),ERR_HEIGHT_INVALID:l("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),l("An unexpected error occurred"))}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.handleEscKey.bind(this))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleEscKey.bind(this)),this.stopPolling(),clearInterval(this.spinnerInterval)}handleEscKey(e){e.key==="Escape"&&this.showModal&&this.closeModal()}openModal(){this.showModal=!0,this.step=1,this.height=0,this.instructionMessage=l("Position yourself in front of the camera")}closeModal(){this.showModal=!1,this.onMeasurementCanceled&&typeof this.onMeasurementCanceled=="function"&&this.onMeasurementCanceled(),this.stopPolling(),this.dispatchEvent(new CustomEvent("measurementCanceled",{detail:{}}))}async startMeasurement(){if(this.height<50||this.height>300){this.errorMessage=this.getTranslatedMessage("ERR_HEIGHT_INVALID");return}this.step=2,this.errorMessage="",this.shouldStartMeasurement=!0}updated(e){super.updated(e),e.has("step")&&this.step===2&&this.shouldStartMeasurement&&(this.initializeMeasurement(),this.shouldStartMeasurement=!1)}async initializeMeasurement(){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.startPolling())}catch{this.errorMessage=l("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=l("Error switching camera")}finally{this.isLoading=!1}}async startPolling(){const e=async()=>{if(!this.videoElement||!this.stream||this.isFetching)return;const t=document.createElement("canvas");t.width=this.videoElement.videoWidth,t.height=this.videoElement.videoHeight;const i=t.getContext("2d");i==null||i.drawImage(this.videoElement,0,0,t.width,t.height);const s=await new Promise(d=>t.toBlob(a=>d(a),"image/jpeg")),r=new File([s],"frame.jpg",{type:"image/jpeg"}),n=new FormData;n.append("image",r),n.append("height",this.height.toString()),n.append("type","shirt"),n.append("skus",JSON.stringify(this.skus));try{this.isFetching=!0,this.isLoading=!0,this.poolingTimeout!==null&&(clearTimeout(this.poolingTimeout),this.poolingTimeout=null),this.instructionMessageTimeout!==null&&(clearTimeout(this.instructionMessageTimeout),this.instructionMessageTimeout=null);const a=await(await fetch("https://xactsize-api-923169850574.southamerica-east1.run.app/api/measurer/measure/body",{method:"POST",body:n,headers:{Accept:"application/json","Cache-Control":"no-store",Pragma:"no-cache"}})).json();this.isFetching=!1,this.isLoading=!1,a.success?(this.measurements=a.measurements,this.recommendedSize=a.chosenSize,this.instructionMessage=l("Measurement successful!"),this.stopPolling(),this.step=3):(this.instructionMessage=this.getTranslatedMessage(a.message||"UNKNOWN_ERROR"),this.instructionMessageTimeout=setTimeout(()=>{this.recommendedSize||(this.instructionMessage=l("Position yourself in front of the camera"),this.poolingTimeout=setTimeout(e,0))},2e3))}catch{this.isFetching=!1,this.isLoading=!1,this.instructionMessage=l("Error processing measurement"),this.instructionMessageTimeout=setTimeout(()=>{this.recommendedSize||(this.instructionMessage=l("Position yourself in front of the camera"),this.poolingTimeout=setTimeout(e,0))},2e3)}};e()}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(){this.dispatchEvent(new CustomEvent("measurementAccepted",{detail:{size:this.recommendedSize}})),this.onMeasurementAccepted&&typeof this.onMeasurementAccepted=="function"&&this.onMeasurementAccepted(),this.showModal=!1,this.stopPolling()}resetMeasurement(){this.step=1,this.height=0,this.recommendedSize="",this.measurements={},this.stopPolling()}stopMeasurement(){this.resetMeasurement(),this.showModal=!1}render(){return this._isLocaleLoading?E`<div hidden></div>`:E`
515
+ `,q([_({type:String})],O.prototype,"productName",2),q([_({type:String})],O.prototype,"recommendedSize",2),q([_({type:Function})],O.prototype,"onAccept",2),q([_({type:Function})],O.prototype,"onRetry",2),O=q([G("xact-step-result"),J()],O);const je="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",Nt="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",Ut="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";var Vt=Object.defineProperty,zt=Object.getOwnPropertyDescriptor,p=(o,e,t,i)=>{for(var s=i>1?void 0:i?zt(e,t):e,r=o.length-1,n;r>=0;r--)(n=o[r])&&(s=(i?n(e,t,s):n(s))||s);return i&&s&&Vt(e,t,s),s};const{getLocale:jt,setLocale:ge}=bt({sourceLocale:ze,targetLocales:At,loadLocale:o=>H(Object.assign({"./generated/locales/pt-BR.ts":()=>Promise.resolve().then(()=>Ft)}),`./generated/locales/${o}.ts`,4)});c.BodyMeasurer=class extends y{constructor(){super(...arguments),this.spinnerFrame=0,this.apiKey="",this.productSku="",this._culture="pt-BR",this._isLocaleLoading=!1,this.skus=[],this.productName="",this.showModal=!1,this.step=1,this.height=0,this.recommendedSize="",this.measurements={},this.errorMessage="",this.instructionMessage=l("Position yourself in front of the camera"),this.shouldStartMeasurement=!1,this.isLoading=!1,this.isFetching=!1,this.videoElement=null,this.stream=null,this.poolingTimeout=null,this.instructionMessageTimeout=null,this.cameras=[],this.currentCameraId=null}firstUpdated(){this.startSpinnerAnimation()}startSpinnerAnimation(){const e=[Ut,Nt,je];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 ge(e)}catch(t){console.error("Failed to load locale",e,t),await ge(ze)}finally{this._isLocaleLoading=!1,this.requestUpdate()}}get errorMap(){return{ERR_RIGHT_ARM_TOO_HIGH:l("Lower your right arm",{id:"ERR_RIGHT_ARM_TOO_HIGH"}),ERR_LEFT_ARM_TOO_HIGH:l("Lower your left arm",{id:"ERR_LEFT_ARM_TOO_HIGH"}),ERR_ARMS_NOT_RAISED:l("Raise both arms to a 45-degree angle",{id:"ERR_ARMS_NOT_RAISED"}),ERR_RIGHT_ARM_NOT_RAISED:l("Raise your right arm to a 45-degree angle",{id:"ERR_RIGHT_ARM_NOT_RAISED"}),ERR_LEFT_ARM_NOT_RAISED:l("Raise your left arm to a 45-degree angle",{id:"ERR_LEFT_ARM_NOT_RAISED"}),ERR_BODY_LANDMARKS_NOT_DETECTED:l("Ensure your full body is visible in the camera",{id:"ERR_BODY_LANDMARKS_NOT_DETECTED"}),ERR_HIPS_NOT_VISIBLE:l("Adjust your position to show your hips",{id:"ERR_HIPS_NOT_VISIBLE"}),ERR_TOO_CLOSE_TO_CAMERA:l("Step back from the camera",{id:"ERR_TOO_CLOSE_TO_CAMERA"}),ERR_NOT_SIDE_VIEW:l("Turn to show your side profile",{id:"ERR_NOT_SIDE_VIEW"}),ERR_INVALID_CLOTHING_TYPE:l("This clothing type is not supported; please contact support",{id:"ERR_INVALID_CLOTHING_TYPE"}),ERR_UPPER_BODY_NOT_VISIBLE:l("Adjust your position to show your upper body",{id:"ERR_UPPER_BODY_NOT_VISIBLE"}),ERR_HEAD_TOO_CLOSE_TO_EDGE:l("Move your head away from the edge of the frame",{id:"ERR_HEAD_TOO_CLOSE_TO_EDGE"}),ERR_LOWER_BODY_NOT_VISIBLE:l("Adjust your position to show your lower body",{id:"ERR_LOWER_BODY_NOT_VISIBLE"}),ERR_FEET_TOO_CLOSE_TO_EDGE:l("Move your feet away from the edge of the frame",{id:"ERR_FEET_TOO_CLOSE_TO_EDGE"}),ERR_BODY_TOO_CLOSE_TO_EDGE:l("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:l("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:l("Move to the right to center your body",{id:"ERR_BODY_TOO_CLOSE_TO_EDGE_MOVE_RIGHT"}),ERR_SHOULDERS_NOT_VISIBLE:l("Adjust your position to show your shoulders",{id:"ERR_SHOULDERS_NOT_VISIBLE"}),ERR_HEIGHT_MEASUREMENT_FAILED:l("Stand straight and ensure your full body is visible",{id:"ERR_HEIGHT_MEASUREMENT_FAILED"}),ERR_HEAD_POINT_NOT_DETECTED:l("Ensure your head is fully visible in the frame",{id:"ERR_HEAD_POINT_NOT_DETECTED"}),ERR_INCORRECT_POSTURE:l("Stand straight with your shoulders back",{id:"ERR_INCORRECT_POSTURE"}),ERR_HEM_MEASUREMENT_FAILED:l("Ensure your clothing hem is visible and clear",{id:"ERR_HEM_MEASUREMENT_FAILED"}),ERR_SHOULDER_MEASUREMENT_FAILED:l("Keep your shoulders relaxed and visible",{id:"ERR_SHOULDER_MEASUREMENT_FAILED"}),ERR_ARM_NOT_STRETCHED:l("Stretch your arms fully",{id:"ERR_ARM_NOT_STRETCHED"}),ERR_LEGS_NOT_DETECTED:l("Ensure your legs are fully visible in the frame",{id:"ERR_LEGS_NOT_DETECTED"}),ERR_HIPS_MEASUREMENT_FAILED:l("Stand straight and ensure your hips are visible",{id:"ERR_HIPS_MEASUREMENT_FAILED"}),ERR_WAIST_MEASUREMENT_FAILED:l("Stand straight and ensure your waist is visible",{id:"ERR_WAIST_MEASUREMENT_FAILED"}),ERR_INVALID_MEASURE_SIDE_VIEW:l("Turn to show a clear side profile",{id:"ERR_INVALID_MEASURE_SIDE_VIEW"}),ERR_INVALID_BODY_HEIGHT_TYPE:l("Ensure your full body is visible for height measurement",{id:"ERR_INVALID_BODY_HEIGHT_TYPE"}),ERR_IMAGE_LOAD_FAILED:l("Try again later; the image could not be processed",{id:"ERR_IMAGE_LOAD_FAILED"}),ERR_HEIGHT_INVALID:l("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),l("An unexpected error occurred"))}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.handleEscKey.bind(this))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleEscKey.bind(this)),this.stopPolling(),clearInterval(this.spinnerInterval)}handleEscKey(e){e.key==="Escape"&&this.showModal&&this.closeModal()}openModal(){this.showModal=!0,this.step=1,this.height=0,this.instructionMessage=l("Position yourself in front of the camera")}closeModal(){this.showModal=!1,this.onMeasurementCanceled&&typeof this.onMeasurementCanceled=="function"&&this.onMeasurementCanceled(),this.stopPolling(),this.dispatchEvent(new CustomEvent("measurementCanceled",{detail:{}}))}async startMeasurement(){if(this.height<50||this.height>300){this.errorMessage=this.getTranslatedMessage("ERR_HEIGHT_INVALID");return}this.step=2,this.errorMessage="",this.shouldStartMeasurement=!0}updated(e){super.updated(e),e.has("step")&&this.step===2&&this.shouldStartMeasurement&&(this.initializeMeasurement(),this.shouldStartMeasurement=!1)}async initializeMeasurement(){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.startPolling())}catch{this.errorMessage=l("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=l("Error switching camera")}finally{this.isLoading=!1}}async startPolling(){const e=async()=>{if(!this.videoElement||!this.stream||this.isFetching)return;const t=document.createElement("canvas");t.width=this.videoElement.videoWidth,t.height=this.videoElement.videoHeight;const i=t.getContext("2d");i==null||i.drawImage(this.videoElement,0,0,t.width,t.height);const s=await new Promise(d=>t.toBlob(a=>d(a),"image/jpeg")),r=new File([s],"frame.jpg",{type:"image/jpeg"}),n=new FormData;n.append("image",r),n.append("height",this.height.toString()),n.append("product_sku",this.productSku);try{this.isFetching=!0,this.isLoading=!0,this.poolingTimeout!==null&&(clearTimeout(this.poolingTimeout),this.poolingTimeout=null),this.instructionMessageTimeout!==null&&(clearTimeout(this.instructionMessageTimeout),this.instructionMessageTimeout=null);const a=await(await fetch("https://xactsize-api-923169850574.southamerica-east1.run.app/api/measurer/measure/body",{method:"POST",body:n,headers:{Accept:"application/json","Cache-Control":"no-store",Pragma:"no-cache","X-Api-Key":this.apiKey}})).json();this.isFetching=!1,this.isLoading=!1,a.success?(this.measurements=a.measurements,this.recommendedSize=a.chosenSize,this.instructionMessage=l("Measurement successful!"),this.stopPolling(),this.step=3):(this.instructionMessage=this.getTranslatedMessage(a.message||"UNKNOWN_ERROR"),this.instructionMessageTimeout=setTimeout(()=>{this.recommendedSize||(this.instructionMessage=l("Position yourself in front of the camera"),this.poolingTimeout=setTimeout(e,0))},2e3))}catch{this.isFetching=!1,this.isLoading=!1,this.instructionMessage=l("Error processing measurement"),this.instructionMessageTimeout=setTimeout(()=>{this.recommendedSize||(this.instructionMessage=l("Position yourself in front of the camera"),this.poolingTimeout=setTimeout(e,0))},2e3)}};e()}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(){this.dispatchEvent(new CustomEvent("measurementAccepted",{detail:{size:this.recommendedSize}})),this.onMeasurementAccepted&&typeof this.onMeasurementAccepted=="function"&&this.onMeasurementAccepted(),this.showModal=!1,this.stopPolling()}resetMeasurement(){this.step=1,this.height=0,this.recommendedSize="",this.measurements={},this.stopPolling()}stopMeasurement(){this.resetMeasurement(),this.showModal=!1}render(){return this._isLocaleLoading?E`<div hidden></div>`:E`
516
516
  <xact-button @click=${this.openModal} label="${l("Find your Xactsize")}"></xact-button>
517
517
 
518
518
  ${this.showModal?E`
@@ -976,4 +976,4 @@
976
976
  font-family: "Lato", -apple-system, system-ui, BlinkMacSystemFont, sans-serif;
977
977
  }
978
978
 
979
- `,u([_({type:String,attribute:"api-key"})],c.BodyMeasurer.prototype,"apiKey",2),u([_({type:Function,attribute:"onmeasurementaccepted"})],c.BodyMeasurer.prototype,"onMeasurementAccepted",2),u([_({type:Function,attribute:"onmeasurementcanceled"})],c.BodyMeasurer.prototype,"onMeasurementCanceled",2),u([_({type:String})],c.BodyMeasurer.prototype,"culture",1),u([g()],c.BodyMeasurer.prototype,"errorMap",1),u([g()],c.BodyMeasurer.prototype,"_isLocaleLoading",2),u([_({type:Array})],c.BodyMeasurer.prototype,"skus",2),u([_({type:String,attribute:"product-name"})],c.BodyMeasurer.prototype,"productName",2),u([g()],c.BodyMeasurer.prototype,"showModal",2),u([g()],c.BodyMeasurer.prototype,"step",2),u([g()],c.BodyMeasurer.prototype,"height",2),u([g()],c.BodyMeasurer.prototype,"recommendedSize",2),u([g()],c.BodyMeasurer.prototype,"measurements",2),u([g()],c.BodyMeasurer.prototype,"errorMessage",2),u([g()],c.BodyMeasurer.prototype,"instructionMessage",2),u([g()],c.BodyMeasurer.prototype,"shouldStartMeasurement",2),u([g()],c.BodyMeasurer.prototype,"isLoading",2),u([g()],c.BodyMeasurer.prototype,"isFetching",2),u([g()],c.BodyMeasurer.prototype,"cameras",2),u([g()],c.BodyMeasurer.prototype,"currentCameraId",2),c.BodyMeasurer=u([G("body-measurer"),J()],c.BodyMeasurer);const Ft=Object.freeze(Object.defineProperty({__proto__:null,templates:{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",s2d726e20085011c1:"Altura (cm)",s2e6fae2f79e61556:"A recomendação acima é para um caimento ideal baseado em suas medidas. Para um caimento mais confortável ou oversized, escolha tamanhos maiores.",s2f77566c78235d88:"Erro acessando a câmera",s34c58d3d12e5f890:"Erro ao mudar a câmera",s3d324b180f982d46:"Tenha certeza de que seu corpo está totalmente visível",s3e742a73512eb1da:"Para começarmos, informe sua altura",s420e8053328b31c4:"Seu tamanho ideal",s5c91b5e06c363734:"",s676cfe9f36657792:"Medição bem-sucedida",s6b15fa3aeceb6612:"Com apenas um scan vamos descobrir o tamanho ideal para você. E não se preocupe, não armazenamos ou compartilhamos sua imagem.",s7c5b35754de07309:"Vamos lá!",s8e3fcbc208dcce56:"Esqueça a fita. Descubra o tamanho ideal com o seu dispositivo",s952ed559991cf0b4:"Desenvolvido por",s9ab2057f0a31be23:"Aceitar sugestão",sc95ab500914c6f87:"Medir novamente",sd13d4c82d57859fc:"Posicione-se em frente a câmera",sdabfef8968aeb5fa:"Um erro inesperado aconteceu",sf315699feee25406:"Descubra o tamanho ideal para você"}},Symbol.toStringTag,{value:"Module"}));c.getLocale=jt,c.setLocale=ge,Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})});
979
+ `,p([_({type:String,attribute:"api-key"})],c.BodyMeasurer.prototype,"apiKey",2),p([_({type:String,attribute:"product-sku"})],c.BodyMeasurer.prototype,"productSku",2),p([_({type:Function,attribute:"onmeasurementaccepted"})],c.BodyMeasurer.prototype,"onMeasurementAccepted",2),p([_({type:Function,attribute:"onmeasurementcanceled"})],c.BodyMeasurer.prototype,"onMeasurementCanceled",2),p([_({type:String})],c.BodyMeasurer.prototype,"culture",1),p([g()],c.BodyMeasurer.prototype,"errorMap",1),p([g()],c.BodyMeasurer.prototype,"_isLocaleLoading",2),p([_({type:Array})],c.BodyMeasurer.prototype,"skus",2),p([_({type:String,attribute:"product-name"})],c.BodyMeasurer.prototype,"productName",2),p([g()],c.BodyMeasurer.prototype,"showModal",2),p([g()],c.BodyMeasurer.prototype,"step",2),p([g()],c.BodyMeasurer.prototype,"height",2),p([g()],c.BodyMeasurer.prototype,"recommendedSize",2),p([g()],c.BodyMeasurer.prototype,"measurements",2),p([g()],c.BodyMeasurer.prototype,"errorMessage",2),p([g()],c.BodyMeasurer.prototype,"instructionMessage",2),p([g()],c.BodyMeasurer.prototype,"shouldStartMeasurement",2),p([g()],c.BodyMeasurer.prototype,"isLoading",2),p([g()],c.BodyMeasurer.prototype,"isFetching",2),p([g()],c.BodyMeasurer.prototype,"cameras",2),p([g()],c.BodyMeasurer.prototype,"currentCameraId",2),c.BodyMeasurer=p([G("body-measurer"),J()],c.BodyMeasurer);const Ft=Object.freeze(Object.defineProperty({__proto__:null,templates:{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",s2d726e20085011c1:"Altura (cm)",s2e6fae2f79e61556:"A recomendação acima é para um caimento ideal baseado em suas medidas. Para um caimento mais confortável ou oversized, escolha tamanhos maiores.",s2f77566c78235d88:"Erro acessando a câmera",s34c58d3d12e5f890:"Erro ao mudar a câmera",s3d324b180f982d46:"Tenha certeza de que seu corpo está totalmente visível",s3e742a73512eb1da:"Para começarmos, informe sua altura",s420e8053328b31c4:"Seu tamanho ideal",s5c91b5e06c363734:"",s676cfe9f36657792:"Medição bem-sucedida",s6b15fa3aeceb6612:"Com apenas um scan vamos descobrir o tamanho ideal para você. E não se preocupe, não armazenamos ou compartilhamos sua imagem.",s7c5b35754de07309:"Vamos lá!",s8e3fcbc208dcce56:"Esqueça a fita. Descubra o tamanho ideal com o seu dispositivo",s952ed559991cf0b4:"Desenvolvido por",s9ab2057f0a31be23:"Aceitar sugestão",sc95ab500914c6f87:"Medir novamente",sd13d4c82d57859fc:"Posicione-se em frente a câmera",sdabfef8968aeb5fa:"Um erro inesperado aconteceu",sf315699feee25406:"Descubra o tamanho ideal para você"}},Symbol.toStringTag,{value:"Module"}));c.getLocale=jt,c.setLocale=ge,Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xactsize-webcomponents",
3
- "version": "1.0.10",
3
+ "version": "1.0.12",
4
4
  "description": "A web component for body measurements and size recommendations",
5
5
  "main": "dist/body-measurer.umd.js",
6
6
  "module": "dist/body-measurer.es.js",