xactsize-webcomponents 1.0.18 → 1.0.20
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.es.js +236 -231
- package/dist/body-measurer.umd.js +32 -32
- package/package.json +1 -1
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
(function(a,
|
|
1
|
+
(function(a,H){typeof exports=="object"&&typeof module<"u"?H(exports):typeof define=="function"&&define.amd?define(["exports"],H):(a=typeof globalThis<"u"?globalThis:a||self,H(a.BodyMeasurer={}))})(this,function(a){"use strict";var wA;const H=(r,A,t)=>{const l=r[A];return l?typeof l=="function"?l():Promise.resolve(l):new Promise((e,p)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(p.bind(null,new Error("Unknown variable dynamic import: "+A+(A.split("/").length!==t?". Note that variables only represent file names one level deep.":""))))})};/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const
|
|
5
|
+
*/const g=globalThis,rA=g.ShadowRoot&&(g.ShadyCSS===void 0||g.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,pA=Symbol(),sA=new WeakMap;let xA=class{constructor(A,t,l){if(this._$cssResult$=!0,l!==pA)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=A,this.t=t}get styleSheet(){let A=this.o;const t=this.t;if(rA&&A===void 0){const l=t!==void 0&&t.length===1;l&&(A=sA.get(t)),A===void 0&&((this.o=A=new CSSStyleSheet).replaceSync(this.cssText),l&&sA.set(t,A))}return A}toString(){return this.cssText}};const YA=r=>new xA(typeof r=="string"?r:r+"",void 0,pA),m=(r,...A)=>{const t=r.length===1?r[0]:A.reduce((l,e,p)=>l+(V=>{if(V._$cssResult$===!0)return V.cssText;if(typeof V=="number")return V;throw Error("Value passed to 'css' function must be a 'css' function result: "+V+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(e)+r[p+1],r[0]);return new xA(t,r,pA)},CA=(r,A)=>{if(rA)r.adoptedStyleSheets=A.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of A){const l=document.createElement("style"),e=g.litNonce;e!==void 0&&l.setAttribute("nonce",e),l.textContent=t.cssText,r.appendChild(l)}},iA=rA?r=>r:r=>r instanceof CSSStyleSheet?(A=>{let t="";for(const l of A.cssRules)t+=l.cssText;return YA(t)})(r):r;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const{is:DA,defineProperty:QA,getOwnPropertyDescriptor:gA,getOwnPropertyNames:BA,getOwnPropertySymbols:_A,getPrototypeOf:$A}=Object,i=globalThis,KA=i.trustedTypes,At=KA?KA.emptyScript:"",
|
|
9
|
+
*/const{is:DA,defineProperty:QA,getOwnPropertyDescriptor:gA,getOwnPropertyNames:BA,getOwnPropertySymbols:_A,getPrototypeOf:$A}=Object,i=globalThis,KA=i.trustedTypes,At=KA?KA.emptyScript:"",VA=i.reactiveElementPolyfillSupport,z=(r,A)=>r,B={toAttribute(r,A){switch(A){case Boolean:r=r?At:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,A){let t=r;switch(A){case Boolean:t=r!==null;break;case Number:t=r===null?null:Number(r);break;case Object:case Array:try{t=JSON.parse(r)}catch{t=null}}return t}},nA=(r,A)=>!DA(r,A),UA={attribute:!0,type:String,converter:B,reflect:!1,useDefault:!1,hasChanged:nA};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),i.litPropertyMetadata??(i.litPropertyMetadata=new WeakMap);let N=class extends HTMLElement{static addInitializer(A){this._$Ei(),(this.l??(this.l=[])).push(A)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(A,t=UA){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(A)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(A,t),!t.noAccessor){const l=Symbol(),e=this.getPropertyDescriptor(A,l,t);e!==void 0&&QA(this.prototype,A,e)}}static getPropertyDescriptor(A,t,l){const{get:e,set:p}=gA(this.prototype,A)??{get(){return this[t]},set(V){this[t]=V}};return{get:e,set(V){const S=e==null?void 0:e.call(this);p==null||p.call(this,V),this.requestUpdate(A,S,l)},configurable:!0,enumerable:!0}}static getPropertyOptions(A){return this.elementProperties.get(A)??UA}static _$Ei(){if(this.hasOwnProperty(z("elementProperties")))return;const A=$A(this);A.finalize(),A.l!==void 0&&(this.l=[...A.l]),this.elementProperties=new Map(A.elementProperties)}static finalize(){if(this.hasOwnProperty(z("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(z("properties"))){const t=this.properties,l=[...BA(t),..._A(t)];for(const e of l)this.createProperty(e,t[e])}const A=this[Symbol.metadata];if(A!==null){const t=litPropertyMetadata.get(A);if(t!==void 0)for(const[l,e]of t)this.elementProperties.set(l,e)}this._$Eh=new Map;for(const[t,l]of this.elementProperties){const e=this._$Eu(t,l);e!==void 0&&this._$Eh.set(e,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(A){const t=[];if(Array.isArray(A)){const l=new Set(A.flat(1/0).reverse());for(const e of l)t.unshift(iA(e))}else A!==void 0&&t.push(iA(A));return t}static _$Eu(A,t){const l=t.attribute;return l===!1?void 0:typeof l=="string"?l:typeof A=="string"?A.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var A;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),(A=this.constructor.l)==null||A.forEach(t=>t(this))}addController(A){var t;(this._$EO??(this._$EO=new Set)).add(A),this.renderRoot!==void 0&&this.isConnected&&((t=A.hostConnected)==null||t.call(A))}removeController(A){var t;(t=this._$EO)==null||t.delete(A)}_$E_(){const A=new Map,t=this.constructor.elementProperties;for(const l of t.keys())this.hasOwnProperty(l)&&(A.set(l,this[l]),delete this[l]);A.size>0&&(this._$Ep=A)}createRenderRoot(){const A=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return CA(A,this.constructor.elementStyles),A}connectedCallback(){var A;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(A=this._$EO)==null||A.forEach(t=>{var l;return(l=t.hostConnected)==null?void 0:l.call(t)})}enableUpdating(A){}disconnectedCallback(){var A;(A=this._$EO)==null||A.forEach(t=>{var l;return(l=t.hostDisconnected)==null?void 0:l.call(t)})}attributeChangedCallback(A,t,l){this._$AK(A,l)}_$ET(A,t){var p;const l=this.constructor.elementProperties.get(A),e=this.constructor._$Eu(A,l);if(e!==void 0&&l.reflect===!0){const V=(((p=l.converter)==null?void 0:p.toAttribute)!==void 0?l.converter:B).toAttribute(t,l.type);this._$Em=A,V==null?this.removeAttribute(e):this.setAttribute(e,V),this._$Em=null}}_$AK(A,t){var p,V;const l=this.constructor,e=l._$Eh.get(A);if(e!==void 0&&this._$Em!==e){const S=l.getPropertyOptions(e),q=typeof S.converter=="function"?{fromAttribute:S.converter}:((p=S.converter)==null?void 0:p.fromAttribute)!==void 0?S.converter:B;this._$Em=e,this[e]=q.fromAttribute(t,S.type)??((V=this._$Ej)==null?void 0:V.get(e))??null,this._$Em=null}}requestUpdate(A,t,l){var e;if(A!==void 0){const p=this.constructor,V=this[A];if(l??(l=p.getPropertyOptions(A)),!((l.hasChanged??nA)(V,t)||l.useDefault&&l.reflect&&V===((e=this._$Ej)==null?void 0:e.get(A))&&!this.hasAttribute(p._$Eu(A,l))))return;this.C(A,t,l)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(A,t,{useDefault:l,reflect:e,wrapped:p},V){l&&!(this._$Ej??(this._$Ej=new Map)).has(A)&&(this._$Ej.set(A,V??t??this[A]),p!==!0||V!==void 0)||(this._$AL.has(A)||(this.hasUpdated||l||(t=void 0),this._$AL.set(A,t)),e===!0&&this._$Em!==A&&(this._$Eq??(this._$Eq=new Set)).add(A))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const A=this.scheduleUpdate();return A!=null&&await A,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var l;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[p,V]of this._$Ep)this[p]=V;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[p,V]of e){const{wrapped:S}=V,q=this[p];S!==!0||this._$AL.has(p)||q===void 0||this.C(p,void 0,V,q)}}let A=!1;const t=this._$AL;try{A=this.shouldUpdate(t),A?(this.willUpdate(t),(l=this._$EO)==null||l.forEach(e=>{var p;return(p=e.hostUpdate)==null?void 0:p.call(e)}),this.update(t)):this._$EM()}catch(e){throw A=!1,this._$EM(),e}A&&this._$AE(t)}willUpdate(A){}_$AE(A){var t;(t=this._$EO)==null||t.forEach(l=>{var e;return(e=l.hostUpdated)==null?void 0:e.call(l)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(A)),this.updated(A)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(A){return!0}update(A){this._$Eq&&(this._$Eq=this._$Eq.forEach(t=>this._$ET(t,this[t]))),this._$EM()}updated(A){}firstUpdated(A){}};N.elementStyles=[],N.shadowRootOptions={mode:"open"},N[z("elementProperties")]=new Map,N[z("finalized")]=new Map,VA==null||VA({ReactiveElement:N}),(i.reactiveElementVersions??(i.reactiveElementVersions=[])).push("2.1.0");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/const
|
|
14
|
-
\f\r]`,
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),oA=/'/g,fA=/"/g,PA=/^(?:script|style|textarea|title)$/i,et=r=>(A,...t)=>({_$litType$:r,strings:A,values:t}),J=et(1),v=Symbol.for("lit-noChange"),
|
|
13
|
+
*/const G=globalThis,_=G.trustedTypes,OA=_?_.createPolicy("lit-html",{createHTML:r=>r}):void 0,WA="$lit$",K=`lit$${Math.random().toFixed(9).slice(2)}$`,vA="?"+K,tt=`<${vA}>`,O=document,F=()=>O.createComment(""),M=r=>r===null||typeof r!="object"&&typeof r!="function",qA=Array.isArray,lt=r=>qA(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",SA=`[
|
|
14
|
+
\f\r]`,h=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,bA=/-->/g,LA=/>/g,W=RegExp(`>|${SA}(?:([^\\s"'>=/]+)(${SA}*=${SA}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),oA=/'/g,fA=/"/g,PA=/^(?:script|style|textarea|title)$/i,et=r=>(A,...t)=>({_$litType$:r,strings:A,values:t}),J=et(1),v=Symbol.for("lit-noChange"),c=Symbol.for("lit-nothing"),mA=new WeakMap,b=O.createTreeWalker(O,129);function NA(r,A){if(!qA(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return OA!==void 0?OA.createHTML(A):A}const rt=(r,A)=>{const t=r.length-1,l=[];let e,p=A===2?"<svg>":A===3?"<math>":"",V=h;for(let S=0;S<t;S++){const q=r[S];let d,T,u=-1,x=0;for(;x<q.length&&(V.lastIndex=x,T=V.exec(q),T!==null);)x=V.lastIndex,V===h?T[1]==="!--"?V=bA:T[1]!==void 0?V=LA:T[2]!==void 0?(PA.test(T[2])&&(e=RegExp("</"+T[2],"g")),V=W):T[3]!==void 0&&(V=W):V===W?T[0]===">"?(V=e??h,u=-1):T[1]===void 0?u=-2:(u=V.lastIndex-T[2].length,d=T[1],V=T[3]===void 0?W:T[3]==='"'?fA:oA):V===fA||V===oA?V=W:V===bA||V===LA?V=h:(V=W,e=void 0);const U=V===W&&r[S+1].startsWith("/>")?" ":"";p+=V===h?q+tt:u>=0?(l.push(d),q.slice(0,u)+WA+q.slice(u)+K+U):q+K+(u===-2?S:U)}return[NA(r,p+(r[t]||"<?>")+(A===2?"</svg>":A===3?"</math>":"")),l]};class E{constructor({strings:A,_$litType$:t},l){let e;this.parts=[];let p=0,V=0;const S=A.length-1,q=this.parts,[d,T]=rt(A,t);if(this.el=E.createElement(d,l),b.currentNode=this.el.content,t===2||t===3){const u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(e=b.nextNode())!==null&&q.length<S;){if(e.nodeType===1){if(e.hasAttributes())for(const u of e.getAttributeNames())if(u.endsWith(WA)){const x=T[V++],U=e.getAttribute(u).split(K),eA=/([.?@])?(.*)/.exec(x);q.push({type:1,index:p,name:eA[2],strings:U,ctor:eA[1]==="."?Vt:eA[1]==="?"?nt:eA[1]==="@"?qt:$}),e.removeAttribute(u)}else u.startsWith(K)&&(q.push({type:6,index:p}),e.removeAttribute(u));if(PA.test(e.tagName)){const u=e.textContent.split(K),x=u.length-1;if(x>0){e.textContent=_?_.emptyScript:"";for(let U=0;U<x;U++)e.append(u[U],F()),b.nextNode(),q.push({type:2,index:++p});e.append(u[x],F())}}}else if(e.nodeType===8)if(e.data===vA)q.push({type:2,index:p});else{let u=-1;for(;(u=e.data.indexOf(K,u+1))!==-1;)q.push({type:7,index:p}),u+=K.length-1}p++}}static createElement(A,t){const l=O.createElement("template");return l.innerHTML=A,l}}function Z(r,A,t=r,l){var V,S;if(A===v)return A;let e=l!==void 0?(V=t._$Co)==null?void 0:V[l]:t._$Cl;const p=M(A)?void 0:A._$litDirective$;return(e==null?void 0:e.constructor)!==p&&((S=e==null?void 0:e._$AO)==null||S.call(e,!1),p===void 0?e=void 0:(e=new p(r),e._$AT(r,t,l)),l!==void 0?(t._$Co??(t._$Co=[]))[l]=e:t._$Cl=e),e!==void 0&&(A=Z(r,e._$AS(r,A.values),e,l)),A}class pt{constructor(A,t){this._$AV=[],this._$AN=void 0,this._$AD=A,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(A){const{el:{content:t},parts:l}=this._$AD,e=((A==null?void 0:A.creationScope)??O).importNode(t,!0);b.currentNode=e;let p=b.nextNode(),V=0,S=0,q=l[0];for(;q!==void 0;){if(V===q.index){let d;q.type===2?d=new I(p,p.nextSibling,this,A):q.type===1?d=new q.ctor(p,q.name,q.strings,this,A):q.type===6&&(d=new St(p,this,A)),this._$AV.push(d),q=l[++S]}V!==(q==null?void 0:q.index)&&(p=b.nextNode(),V++)}return b.currentNode=O,e}p(A){let t=0;for(const l of this._$AV)l!==void 0&&(l.strings!==void 0?(l._$AI(A,l,t),t+=l.strings.length-2):l._$AI(A[t])),t++}}class I{get _$AU(){var A;return((A=this._$AM)==null?void 0:A._$AU)??this._$Cv}constructor(A,t,l,e){this.type=2,this._$AH=c,this._$AN=void 0,this._$AA=A,this._$AB=t,this._$AM=l,this.options=e,this._$Cv=(e==null?void 0:e.isConnected)??!0}get parentNode(){let A=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&(A==null?void 0:A.nodeType)===11&&(A=t.parentNode),A}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(A,t=this){A=Z(this,A,t),M(A)?A===c||A==null||A===""?(this._$AH!==c&&this._$AR(),this._$AH=c):A!==this._$AH&&A!==v&&this._(A):A._$litType$!==void 0?this.$(A):A.nodeType!==void 0?this.T(A):lt(A)?this.k(A):this._(A)}O(A){return this._$AA.parentNode.insertBefore(A,this._$AB)}T(A){this._$AH!==A&&(this._$AR(),this._$AH=this.O(A))}_(A){this._$AH!==c&&M(this._$AH)?this._$AA.nextSibling.data=A:this.T(O.createTextNode(A)),this._$AH=A}$(A){var p;const{values:t,_$litType$:l}=A,e=typeof l=="number"?this._$AC(A):(l.el===void 0&&(l.el=E.createElement(NA(l.h,l.h[0]),this.options)),l);if(((p=this._$AH)==null?void 0:p._$AD)===e)this._$AH.p(t);else{const V=new pt(e,this),S=V.u(this.options);V.p(t),this.T(S),this._$AH=V}}_$AC(A){let t=mA.get(A.strings);return t===void 0&&mA.set(A.strings,t=new E(A)),t}k(A){qA(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let l,e=0;for(const p of A)e===t.length?t.push(l=new I(this.O(F()),this.O(F()),this,this.options)):l=t[e],l._$AI(p),e++;e<t.length&&(this._$AR(l&&l._$AB.nextSibling,e),t.length=e)}_$AR(A=this._$AA.nextSibling,t){var l;for((l=this._$AP)==null?void 0:l.call(this,!1,!0,t);A&&A!==this._$AB;){const e=A.nextSibling;A.remove(),A=e}}setConnected(A){var t;this._$AM===void 0&&(this._$Cv=A,(t=this._$AP)==null||t.call(this,A))}}class ${get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(A,t,l,e,p){this.type=1,this._$AH=c,this._$AN=void 0,this.element=A,this.name=t,this._$AM=e,this.options=p,l.length>2||l[0]!==""||l[1]!==""?(this._$AH=Array(l.length-1).fill(new String),this.strings=l):this._$AH=c}_$AI(A,t=this,l,e){const p=this.strings;let V=!1;if(p===void 0)A=Z(this,A,t,0),V=!M(A)||A!==this._$AH&&A!==v,V&&(this._$AH=A);else{const S=A;let q,d;for(A=p[0],q=0;q<p.length-1;q++)d=Z(this,S[l+q],t,q),d===v&&(d=this._$AH[q]),V||(V=!M(d)||d!==this._$AH[q]),d===c?A=c:A!==c&&(A+=(d??"")+p[q+1]),this._$AH[q]=d}V&&!e&&this.j(A)}j(A){A===c?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,A??"")}}class Vt extends ${constructor(){super(...arguments),this.type=3}j(A){this.element[this.name]=A===c?void 0:A}}class nt extends ${constructor(){super(...arguments),this.type=4}j(A){this.element.toggleAttribute(this.name,!!A&&A!==c)}}class qt extends ${constructor(A,t,l,e,p){super(A,t,l,e,p),this.type=5}_$AI(A,t=this){if((A=Z(this,A,t,0)??c)===v)return;const l=this._$AH,e=A===c&&l!==c||A.capture!==l.capture||A.once!==l.once||A.passive!==l.passive,p=A!==c&&(l===c||e);e&&this.element.removeEventListener(this.name,this,l),p&&this.element.addEventListener(this.name,this,A),this._$AH=A}handleEvent(A){var t;typeof this._$AH=="function"?this._$AH.call(((t=this.options)==null?void 0:t.host)??this.element,A):this._$AH.handleEvent(A)}}class St{constructor(A,t,l){this.element=A,this.type=6,this._$AN=void 0,this._$AM=t,this.options=l}get _$AU(){return this._$AM._$AU}_$AI(A){Z(this,A)}}const aA=G.litHtmlPolyfillSupport;aA==null||aA(E,I),(G.litHtmlVersions??(G.litHtmlVersions=[])).push("3.3.0");const at=(r,A,t)=>{const l=(t==null?void 0:t.renderBefore)??A;let e=l._$litPart$;if(e===void 0){const p=(t==null?void 0:t.renderBefore)??null;l._$litPart$=e=new I(A.insertBefore(F(),p),p,void 0,t??{})}return e._$AI(r),e};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/const L=globalThis;let X=class extends
|
|
19
|
+
*/const L=globalThis;let X=class extends N{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;const A=super.createRenderRoot();return(t=this.renderOptions).renderBefore??(t.renderBefore=A.firstChild),A}update(A){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(A),this._$Do=at(t,this.renderRoot,this.renderOptions)}connectedCallback(){var A;super.connectedCallback(),(A=this._$Do)==null||A.setConnected(!0)}disconnectedCallback(){var A;super.disconnectedCallback(),(A=this._$Do)==null||A.setConnected(!1)}render(){return v}};X._$litElement$=!0,X.finalized=!0,(wA=L.litElementHydrateSupport)==null||wA.call(L,{LitElement:X});const uA=L.litElementPolyfillSupport;uA==null||uA({LitElement:X}),(L.litElementVersions??(L.litElementVersions=[])).push("4.2.0");/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2017 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
-
*/const
|
|
23
|
+
*/const R=r=>(A,t)=>{t!==void 0?t.addInitializer(()=>{customElements.define(r,A)}):customElements.define(r,A)};/**
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
-
*/const ut={attribute:!0,type:String,converter:
|
|
27
|
+
*/const ut={attribute:!0,type:String,converter:B,reflect:!1,hasChanged:nA},yt=(r=ut,A,t)=>{const{kind:l,metadata:e}=t;let p=globalThis.litPropertyMetadata.get(e);if(p===void 0&&globalThis.litPropertyMetadata.set(e,p=new Map),l==="setter"&&((r=Object.create(r)).wrapped=!0),p.set(t.name,r),l==="accessor"){const{name:V}=t;return{set(S){const q=A.get.call(this);A.set.call(this,S),this.requestUpdate(V,q,r)},init(S){return S!==void 0&&this.C(V,void 0,r,S),S}}}if(l==="setter"){const{name:V}=t;return function(S){const q=this[V];A.call(this,S),this.requestUpdate(V,q,r)}}throw Error("Unsupported decorator location: "+l)};function j(r){return(A,t)=>typeof t=="object"?yt(r,A,t):((l,e,p)=>{const V=e.hasOwnProperty(p);return e.constructor.createProperty(p,l),V?Object.getOwnPropertyDescriptor(e,p):void 0})(r,A,t)}/**
|
|
28
28
|
* @license
|
|
29
29
|
* Copyright 2017 Google LLC
|
|
30
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
31
|
-
*/function k(r){return
|
|
31
|
+
*/function k(r){return j({...r,state:!0,attribute:!1})}/**
|
|
32
32
|
* @license
|
|
33
33
|
* Copyright 2021 Google LLC
|
|
34
34
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
35
|
-
*/const
|
|
35
|
+
*/const yA="lit-localize-status";/**
|
|
36
36
|
* @license
|
|
37
37
|
* Copyright 2021 Google LLC
|
|
38
38
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
39
|
-
*/const
|
|
39
|
+
*/const dt=r=>typeof r!="string"&&"strTag"in r,ZA=(r,A,t)=>{let l=r[0];for(let e=1;e<r.length;e++)l+=A[t?t[e-1]:e-1],l+=r[e];return l};/**
|
|
40
40
|
* @license
|
|
41
41
|
* Copyright 2021 Google LLC
|
|
42
42
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
43
|
-
*/const RA=r=>
|
|
43
|
+
*/const RA=r=>dt(r)?ZA(r.strings,r.values):r;let n=RA,HA=!1;function jt(r){if(HA)throw new Error("lit-localize can only be configured once");n=r,HA=!0}/**
|
|
44
44
|
* @license
|
|
45
45
|
* Copyright 2021 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
|
-
*/class ct{constructor(A){this.__litLocalizeEventHandler=t=>{t.detail.status==="ready"&&this.host.requestUpdate()},this.host=A}hostConnected(){window.addEventListener(
|
|
47
|
+
*/class ct{constructor(A){this.__litLocalizeEventHandler=t=>{t.detail.status==="ready"&&this.host.requestUpdate()},this.host=A}hostConnected(){window.addEventListener(yA,this.__litLocalizeEventHandler)}hostDisconnected(){window.removeEventListener(yA,this.__litLocalizeEventHandler)}}const Tt=r=>r.addController(new ct(r));/**
|
|
48
48
|
* @license
|
|
49
49
|
* Copyright 2021 Google LLC
|
|
50
50
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
51
|
-
*/const
|
|
51
|
+
*/const w=()=>(r,A)=>(r.addInitializer(Tt),r);/**
|
|
52
52
|
* @license
|
|
53
53
|
* Copyright 2020 Google LLC
|
|
54
54
|
* 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 s=[];for(let r=0;r<256;r++)s[r]=(r>>4&15).toString(16)+(r&15).toString(16);function kt(r){let A=0,t=8997,l=0,e=33826,p=0,V=40164,S=0,q=52210;for(let
|
|
59
|
+
*/const s=[];for(let r=0;r<256;r++)s[r]=(r>>4&15).toString(16)+(r&15).toString(16);function kt(r){let A=0,t=8997,l=0,e=33826,p=0,V=40164,S=0,q=52210;for(let d=0;d<r.length;d++)t^=r.charCodeAt(d),A=t*435,l=e*435,p=V*435,S=q*435,p+=t<<8,S+=e<<8,l+=A>>>16,t=A&65535,p+=l>>>16,e=l&65535,q=S+(p>>>16)&65535,V=p&65535;return s[q>>8]+s[q&255]+s[V>>8]+s[V&255]+s[e>>8]+s[e&255]+s[t>>8]+s[t&255]}/**
|
|
60
60
|
* @license
|
|
61
61
|
* Copyright 2020 Google LLC
|
|
62
62
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
* @license
|
|
69
69
|
* Copyright 2021 Google LLC
|
|
70
70
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
71
|
-
*/function dA(r){window.dispatchEvent(new CustomEvent(
|
|
71
|
+
*/function dA(r){window.dispatchEvent(new CustomEvent(yA,{detail:r}))}let AA="",jA,MA,tA,cA,hA,o=new zA;o.resolve();let lA=0;const Ut=r=>(jt((A,t)=>it(hA,A,t)),AA=MA=r.sourceLocale,tA=new Set(r.targetLocales),tA.add(r.sourceLocale),cA=r.loadLocale,{getLocale:Ot,setLocale:Wt}),Ot=()=>AA,Wt=r=>{if(r===(jA??AA))return o.promise;if(!tA||!cA)throw new Error("Internal error");if(!tA.has(r))throw new Error("Invalid locale code");lA++;const A=lA;return jA=r,o.settled&&(o=new zA),dA({status:"loading",loadingLocale:r}),(r===MA?Promise.resolve({templates:void 0}):cA(r)).then(l=>{lA===A&&(AA=r,jA=void 0,hA=l.templates,dA({status:"ready",readyLocale:r}),o.resolve())},l=>{lA===A&&(dA({status:"error",errorLocale:r,errorMessage:l.toString()}),o.reject(l))}),o.promise},EA="en",vt=["pt-BR"];/**
|
|
72
72
|
* @license
|
|
73
73
|
* Copyright 2017 Google LLC
|
|
74
74
|
* 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 ft=Lt(class extends ot{constructor(r){var A;if(super(r),r.type!==bt.ATTRIBUTE||r.name!=="class"||((A=r.strings)==null?void 0:A.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(r){return" "+Object.keys(r).filter(A=>r[A]).join(" ")+" "}update(r,[A]){var l,e;if(this.st===void 0){this.st=new Set,r.strings!==void 0&&(this.nt=new Set(r.strings.join(" ").split(/\s/).filter(p=>p!=="")));for(const p in A)A[p]&&!((l=this.nt)!=null&&l.has(p))&&this.st.add(p);return this.render(A)}const t=r.element.classList;for(const p of this.st)p in A||(t.remove(p),this.st.delete(p));for(const p in A){const V=!!A[p];V===this.st.has(p)||(e=this.nt)!=null&&e.has(p)||(V?(t.add(p),this.st.add(p)):(t.remove(p),this.st.delete(p)))}return v}});var Pt=Object.defineProperty,mt=Object.getOwnPropertyDescriptor,
|
|
79
|
+
*/const ft=Lt(class extends ot{constructor(r){var A;if(super(r),r.type!==bt.ATTRIBUTE||r.name!=="class"||((A=r.strings)==null?void 0:A.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(r){return" "+Object.keys(r).filter(A=>r[A]).join(" ")+" "}update(r,[A]){var l,e;if(this.st===void 0){this.st=new Set,r.strings!==void 0&&(this.nt=new Set(r.strings.join(" ").split(/\s/).filter(p=>p!=="")));for(const p in A)A[p]&&!((l=this.nt)!=null&&l.has(p))&&this.st.add(p);return this.render(A)}const t=r.element.classList;for(const p of this.st)p in A||(t.remove(p),this.st.delete(p));for(const p in A){const V=!!A[p];V===this.st.has(p)||(e=this.nt)!=null&&e.has(p)||(V?(t.add(p),this.st.add(p)):(t.remove(p),this.st.delete(p)))}return v}});var Pt=Object.defineProperty,mt=Object.getOwnPropertyDescriptor,Y=(r,A,t,l)=>{for(var e=l>1?void 0:l?mt(A,t):A,p=r.length-1,V;p>=0;p--)(V=r[p])&&(e=(l?V(A,t,e):V(e))||e);return l&&e&&Pt(A,t,e),e};let f=class extends X{constructor(){super(...arguments),this.type="button",this.label="",this.disabled=!1,this.variant="contained"}render(){return J`
|
|
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
|
-
`}};f.styles=
|
|
90
|
+
`}};f.styles=m`
|
|
91
91
|
:host {
|
|
92
92
|
display: block;
|
|
93
93
|
width: 100%;
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
cursor: not-allowed;
|
|
159
159
|
box-shadow: none;
|
|
160
160
|
}
|
|
161
|
-
`,
|
|
161
|
+
`,Y([j({type:String})],f.prototype,"type",2),Y([j({type:String})],f.prototype,"label",2),Y([j({type:Boolean})],f.prototype,"disabled",2),Y([j({type:String})],f.prototype,"variant",2),f=Y([R("xact-button")],f);var Nt=Object.defineProperty,Zt=Object.getOwnPropertyDescriptor,TA=(r,A,t,l)=>{for(var e=l>1?void 0:l?Zt(A,t):A,p=r.length-1,V;p>=0;p--)(V=r[p])&&(e=(l?V(A,t,e):V(e))||e);return l&&e&&Nt(A,t,e),e};let C=class extends X{constructor(){super(...arguments),this.height=0}render(){return J`
|
|
162
162
|
<div class="step-1">
|
|
163
163
|
<div class="step-1-container-right">
|
|
164
164
|
<p class="step-1-header">
|
|
@@ -178,7 +178,7 @@
|
|
|
178
178
|
label="${n("Let's go!")}"
|
|
179
179
|
></xact-button>
|
|
180
180
|
</div>
|
|
181
|
-
`}};
|
|
181
|
+
`}};C.styles=m`
|
|
182
182
|
:host {
|
|
183
183
|
display: block;
|
|
184
184
|
font-family: "Lato", sans-serif;
|
|
@@ -262,7 +262,7 @@
|
|
|
262
262
|
font-weight: bold;
|
|
263
263
|
color: inherit;
|
|
264
264
|
}
|
|
265
|
-
`,
|
|
265
|
+
`,TA([j({type:Number})],C.prototype,"height",2),TA([j({type:Function})],C.prototype,"onStartMeasurement",2),C=TA([R("xact-step-one"),w()],C);var Rt=Object.getOwnPropertyDescriptor,Ht=(r,A,t,l)=>{for(var e=l>1?void 0:l?Rt(A,t):A,p=r.length-1,V;p>=0;p--)(V=r[p])&&(e=V(e)||e);return e};let kA=class extends X{render(){return J`
|
|
266
266
|
<footer class="modal-footer">
|
|
267
267
|
<span>
|
|
268
268
|
<span class="powered-by">${n("Powered by")}</span>
|
|
@@ -305,7 +305,7 @@
|
|
|
305
305
|
</a>
|
|
306
306
|
</span>
|
|
307
307
|
</footer>
|
|
308
|
-
`}};
|
|
308
|
+
`}};kA.styles=m`
|
|
309
309
|
.modal-footer {
|
|
310
310
|
text-align: center;
|
|
311
311
|
font-size: 12px;
|
|
@@ -341,7 +341,7 @@
|
|
|
341
341
|
outline: 2px solid var(--brand-primary);
|
|
342
342
|
outline-offset: 2px;
|
|
343
343
|
}
|
|
344
|
-
`,
|
|
344
|
+
`,kA=Ht([R("xact-footer"),w()],kA);var zt=Object.defineProperty,Gt=Object.getOwnPropertyDescriptor,D=(r,A,t,l)=>{for(var e=l>1?void 0:l?Gt(A,t):A,p=r.length-1,V;p>=0;p--)(V=r[p])&&(e=(l?V(A,t,e):V(e))||e);return l&&e&&zt(A,t,e),e};let P=class extends X{constructor(){super(...arguments),this.productName="",this.recommendedSize=""}render(){return J`
|
|
345
345
|
<div class="image-container">
|
|
346
346
|
<!-- Imagem da roupa como SVG exportado -->
|
|
347
347
|
<svg class="product-image" width="180" height="240" viewBox="0 0 180 240" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -373,7 +373,7 @@
|
|
|
373
373
|
|
|
374
374
|
<!-- Texto centralizado -->
|
|
375
375
|
<text x="50%" y="55%" dominant-baseline="middle" text-anchor="middle" fill="white" font-size="20" font-weight="bold">
|
|
376
|
-
|
|
376
|
+
${this.recommendedSize}
|
|
377
377
|
</text>
|
|
378
378
|
</svg>
|
|
379
379
|
</div>
|
|
@@ -397,7 +397,7 @@
|
|
|
397
397
|
label=${n("Accept Suggestion")}>
|
|
398
398
|
</xact-button>
|
|
399
399
|
</div>
|
|
400
|
-
`}};
|
|
400
|
+
`}};P.styles=m`
|
|
401
401
|
:host {
|
|
402
402
|
display: flex;
|
|
403
403
|
flex-direction: column;
|
|
@@ -471,7 +471,7 @@
|
|
|
471
471
|
justify-content: center;
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
|
-
`,
|
|
474
|
+
`,D([j({type:String})],P.prototype,"productName",2),D([j({type:String})],P.prototype,"recommendedSize",2),D([j({type:Function})],P.prototype,"onAccept",2),D([j({type:Function})],P.prototype,"onRetry",2),P=D([R("xact-step-result"),w()],P);var Ft=Object.defineProperty,Mt=Object.getOwnPropertyDescriptor,JA=(r,A,t,l)=>{for(var e=l>1?void 0:l?Mt(A,t):A,p=r.length-1,V;p>=0;p--)(V=r[p])&&(e=(l?V(A,t,e):V(e))||e);return l&&e&&Ft(A,t,e),e};let Q=class extends X{constructor(){super(...arguments),this.height=0}render(){return J`
|
|
475
475
|
<div class="component-content">
|
|
476
476
|
<div class="header-section">
|
|
477
477
|
<h2 class="header-text">${n("Before you begin")}</h2>
|
|
@@ -609,7 +609,7 @@
|
|
|
609
609
|
label="${n("To start")}"
|
|
610
610
|
></xact-button>
|
|
611
611
|
</div>
|
|
612
|
-
`}};
|
|
612
|
+
`}};Q.styles=m`
|
|
613
613
|
:host {
|
|
614
614
|
display: flex;
|
|
615
615
|
justify-content: center;
|
|
@@ -749,7 +749,7 @@
|
|
|
749
749
|
}
|
|
750
750
|
}
|
|
751
751
|
|
|
752
|
-
`,JA([c({type:Number})],D.prototype,"height",2),JA([c({type:Function})],D.prototype,"onStep2advancement",2),D=JA([Z("xact-step-informs"),I()],D);const IA="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",ht="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",Et="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 It=Object.defineProperty,wt=Object.getOwnPropertyDescriptor,d=(r,A,t,l)=>{for(var e=l>1?void 0:l?wt(A,t):A,p=r.length-1,V;p>=0;p--)(V=r[p])&&(e=(l?V(A,t,e):V(e))||e);return l&&e&&It(A,t,e),e};const{getLocale:Yt,setLocale:XA}=Ut({sourceLocale:EA,targetLocales:vt,loadLocale:r=>R(Object.assign({"./generated/locales/pt-BR.ts":()=>Promise.resolve().then(()=>Ct)}),`./generated/locales/${r}.ts`,4)});a.BodyMeasurer=class extends X{constructor(){super(...arguments),this.spinnerFrame=0,this.apiKey="DB8mP9gStPfvdyeYbbuCV4Zf3SH745dI",this.tenantId="1",this.productSku="",this.apiUrl="https://xactsize-dotnet-api-923169850574.southamerica-east1.run.app/api/measurer/measure/body",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.videoElement=null,this.stream=null,this.poolingTimeout=null,this.instructionMessageTimeout=null,this.cameras=[],this.currentCameraId=null}firstUpdated(){this.startSpinnerAnimation()}startSpinnerAnimation(){const A=[Et,ht,IA];this.spinnerInterval=setInterval(()=>{var l;const t=(l=this.shadowRoot)==null?void 0:l.querySelector(".spinner");t&&(t.src=A[this.spinnerFrame],this.spinnerFrame=(this.spinnerFrame+1)%A.length)},300)}get culture(){return this._culture}set culture(A){const t=this._culture;this._culture=A,this.requestUpdate("culture",t),this._applyLocale(A).catch(console.error)}async _applyLocale(A){try{this._isLocaleLoading=!0,this.requestUpdate(),await XA(A)}catch(t){console.error("Failed to load locale",A,t),await XA(EA)}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(A){const t=this.errorMap[A];return t||(console.info("Error code is missing",A),n("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(A){A.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(){this.showModal=!1,this.onMeasurementCanceled&&typeof this.onMeasurementCanceled=="function"&&this.onMeasurementCanceled(),this.stopPolling(),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=2,this.errorMessage="",this.shouldStartMeasurement=!0}updated(A){super.updated(A),A.has("step")&&this.step===3&&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=n("Error accessing webcam")}}async loadCameras(){try{const A=await navigator.mediaDevices.enumerateDevices();this.cameras=A.filter(t=>t.kind==="videoinput"),this.cameras.length>0&&(this.currentCameraId=this.cameras[0].deviceId)}catch(A){console.error("Error enumerating devices:",A)}}async flipCamera(){if(this.cameras.length<2)return;this.isLoading=!0,this.stopPolling();const t=(this.cameras.findIndex(l=>l.deviceId===this.currentCameraId)+1)%this.cameras.length;this.currentCameraId=this.cameras[t].deviceId;try{this.stream&&this.stream.getTracks().forEach(l=>l.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 A=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 l=t.getContext("2d");l==null||l.drawImage(this.videoElement,0,0,t.width,t.height);const e=await new Promise(S=>t.toBlob(q=>S(q),"image/jpeg")),p=new File([e],"frame.jpg",{type:"image/jpeg"}),V=new FormData;V.append("image",p),V.append("height",this.height.toString()),V.append("product_sku",this.productSku),this.measurerKey&&V.append("measurerKey",this.measurerKey);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 q=await(await fetch(this.apiUrl,{method:"POST",body:V,headers:{Accept:"application/json","Cache-Control":"no-store",Pragma:"no-cache","X-Api-Key":this.apiKey,"X-Tenant-Id":this.tenantId}})).json();this.isFetching=!1,this.isLoading=!1,q.success?(this.measurements=q.measurements,this.recommendedSize=q.chosenSize,this.instructionMessage=n("Measurement successful!"),this.stopPolling(),this.step=4):(this.instructionMessage=this.getTranslatedMessage(q.message||"UNKNOWN_ERROR"),this.instructionMessageTimeout=setTimeout(()=>{this.recommendedSize||(this.instructionMessage=n("Position yourself in front of the camera"),this.poolingTimeout=setTimeout(A,0))},2e3))}catch{this.isFetching=!1,this.isLoading=!1,this.instructionMessage=n("Error processing measurement"),this.instructionMessageTimeout=setTimeout(()=>{this.recommendedSize||(this.instructionMessage=n("Position yourself in front of the camera"),this.poolingTimeout=setTimeout(A,0))},2e3)}};A()}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(A=>A.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?J`<div hidden></div>`:J`
|
|
752
|
+
`,JA([j({type:Number})],Q.prototype,"height",2),JA([j({type:Function})],Q.prototype,"onStep2advancement",2),Q=JA([R("xact-step-informs"),w()],Q);const IA="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",ht="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",Et="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 It=Object.defineProperty,wt=Object.getOwnPropertyDescriptor,y=(r,A,t,l)=>{for(var e=l>1?void 0:l?wt(A,t):A,p=r.length-1,V;p>=0;p--)(V=r[p])&&(e=(l?V(A,t,e):V(e))||e);return l&&e&&It(A,t,e),e};const{getLocale:Yt,setLocale:XA}=Ut({sourceLocale:EA,targetLocales:vt,loadLocale:r=>H(Object.assign({"./generated/locales/pt-BR.ts":()=>Promise.resolve().then(()=>Ct)}),`./generated/locales/${r}.ts`,4)});a.BodyMeasurer=class extends X{constructor(){super(...arguments),this.spinnerFrame=0,this.apiKey="DB8mP9gStPfvdyeYbbuCV4Zf3SH745dI",this.tenantId="1",this.productSku="",this.apiUrl="https://xactsize-dotnet-api-923169850574.southamerica-east1.run.app/api/measurer/measure/body",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.videoElement=null,this.stream=null,this.poolingTimeout=null,this.instructionMessageTimeout=null,this.cameras=[],this.currentCameraId=null}firstUpdated(){this.startSpinnerAnimation()}startSpinnerAnimation(){const A=[Et,ht,IA];this.spinnerInterval=setInterval(()=>{var l;const t=(l=this.shadowRoot)==null?void 0:l.querySelector(".spinner");t&&(t.src=A[this.spinnerFrame],this.spinnerFrame=(this.spinnerFrame+1)%A.length)},300)}get culture(){return this._culture}set culture(A){const t=this._culture;this._culture=A,this.requestUpdate("culture",t),this._applyLocale(A).catch(console.error)}async _applyLocale(A){try{this._isLocaleLoading=!0,this.requestUpdate(),await XA(A)}catch(t){console.error("Failed to load locale",A,t),await XA(EA)}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(A){const t=this.errorMap[A];return t||(console.info("Error code is missing",A),n("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(A){A.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(){this.showModal=!1,this.onMeasurementCanceled&&typeof this.onMeasurementCanceled=="function"&&this.onMeasurementCanceled(),this.stopPolling(),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=2,this.errorMessage="",this.shouldStartMeasurement=!0}updated(A){super.updated(A),A.has("step")&&this.step===3&&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=n("Error accessing webcam")}}async loadCameras(){try{const A=await navigator.mediaDevices.enumerateDevices();this.cameras=A.filter(t=>t.kind==="videoinput"),this.cameras.length>0&&(this.currentCameraId=this.cameras[0].deviceId)}catch(A){console.error("Error enumerating devices:",A)}}async flipCamera(){if(this.cameras.length<2)return;this.isLoading=!0,this.stopPolling();const t=(this.cameras.findIndex(l=>l.deviceId===this.currentCameraId)+1)%this.cameras.length;this.currentCameraId=this.cameras[t].deviceId;try{this.stream&&this.stream.getTracks().forEach(l=>l.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 A=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 l=t.getContext("2d");l==null||l.drawImage(this.videoElement,0,0,t.width,t.height);const e=await new Promise(S=>t.toBlob(q=>S(q),"image/jpeg")),p=new File([e],"frame.jpg",{type:"image/jpeg"}),V=new FormData;V.append("image",p),V.append("height",this.height.toString()),V.append("productSku",this.productSku),this.measurerKey&&V.append("measurerKey",this.measurerKey);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 q=await(await fetch(this.apiUrl,{method:"POST",body:V,headers:{Accept:"application/json","Cache-Control":"no-store",Pragma:"no-cache","X-Api-Key":this.apiKey}})).json();this.isFetching=!1,this.isLoading=!1,this.errorMessage=JSON.stringify(q),q.success?(this.measurements=q.measurements,this.recommendedSize=q.chosenSize,this.instructionMessage=n("Measurement successful!"),this.stopPolling(),this.step=4):(this.instructionMessage=this.getTranslatedMessage(q.message||"UNKNOWN_ERROR"),this.instructionMessageTimeout=setTimeout(()=>{this.recommendedSize||(this.instructionMessage=n("Position yourself in front of the camera"),this.poolingTimeout=setTimeout(A,0))},2e3))}catch{this.isFetching=!1,this.isLoading=!1,this.instructionMessage=n("Error processing measurement"),this.instructionMessageTimeout=setTimeout(()=>{this.recommendedSize||(this.instructionMessage=n("Position yourself in front of the camera"),this.poolingTimeout=setTimeout(A,0))},2e3)}};A()}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(A=>A.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?J`<div hidden></div>`:J`
|
|
753
753
|
<xact-button @click=${this.openModal} label="${n("Find your Xactsize")}"></xact-button>
|
|
754
754
|
|
|
755
755
|
${this.showModal?J`
|
|
@@ -798,7 +798,7 @@
|
|
|
798
798
|
.recommendedSize=${this.recommendedSize}
|
|
799
799
|
.onRetry=${()=>this.resetMeasurement()}
|
|
800
800
|
.onAccept=${()=>this.acceptMeasurement()}>
|
|
801
|
-
</xact-step-result>
|
|
801
|
+
</xact-step-result>
|
|
802
802
|
</div>
|
|
803
803
|
`:""}
|
|
804
804
|
<xact-footer></xact-footer>
|
|
@@ -806,7 +806,7 @@
|
|
|
806
806
|
|
|
807
807
|
</div>
|
|
808
808
|
`:""}
|
|
809
|
-
`}},a.BodyMeasurer.styles=
|
|
809
|
+
`}},a.BodyMeasurer.styles=m`
|
|
810
810
|
:host {
|
|
811
811
|
display: block;
|
|
812
812
|
font-family: Arial, sans-serif;
|
|
@@ -1232,4 +1232,4 @@
|
|
|
1232
1232
|
font-family: "Lato", -apple-system, system-ui, BlinkMacSystemFont, sans-serif;
|
|
1233
1233
|
}
|
|
1234
1234
|
|
|
1235
|
-
`,
|
|
1235
|
+
`,y([j({type:String,attribute:"api-key"})],a.BodyMeasurer.prototype,"apiKey",2),y([j({type:String,attribute:"tenant-id"})],a.BodyMeasurer.prototype,"tenantId",2),y([j({type:String,attribute:"product-sku"})],a.BodyMeasurer.prototype,"productSku",2),y([j({type:String,attribute:"api-url"})],a.BodyMeasurer.prototype,"apiUrl",2),y([j({type:Function,attribute:"onmeasurementaccepted"})],a.BodyMeasurer.prototype,"onMeasurementAccepted",2),y([j({type:Function,attribute:"onmeasurementcanceled"})],a.BodyMeasurer.prototype,"onMeasurementCanceled",2),y([j({type:String})],a.BodyMeasurer.prototype,"culture",1),y([k()],a.BodyMeasurer.prototype,"errorMap",1),y([k()],a.BodyMeasurer.prototype,"measurerKey",2),y([k()],a.BodyMeasurer.prototype,"_isLocaleLoading",2),y([k()],a.BodyMeasurer.prototype,"showModal",2),y([k()],a.BodyMeasurer.prototype,"step",2),y([k()],a.BodyMeasurer.prototype,"height",2),y([k()],a.BodyMeasurer.prototype,"recommendedSize",2),y([k()],a.BodyMeasurer.prototype,"measurements",2),y([k()],a.BodyMeasurer.prototype,"errorMessage",2),y([k()],a.BodyMeasurer.prototype,"instructionMessage",2),y([k()],a.BodyMeasurer.prototype,"shouldStartMeasurement",2),y([k()],a.BodyMeasurer.prototype,"isLoading",2),y([k()],a.BodyMeasurer.prototype,"isFetching",2),y([k()],a.BodyMeasurer.prototype,"cameras",2),y([k()],a.BodyMeasurer.prototype,"currentCameraId",2),a.BodyMeasurer=y([R("body-measurer"),w()],a.BodyMeasurer);const Ct=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)",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",s5c91b5e06c363734:"",s7c5b35754de07309:"Vamos lá!",s952ed559991cf0b4:"Desenvolvido por",sd13d4c82d57859fc:"Posicione-se em frente a câmera",sdabfef8968aeb5fa:"Um erro inesperado aconteceu",sf315699feee25406:"Descubra o tamanho ideal para você",s844998113d40f002:"Forget the tape.. Find the ideal size with your device",sb5977e9b7929155d:"As fast as facial recognition. And don't worry, we don't store or share your image.",s420e8053328b31c4:"Your ideal size",sf84b5644f7595ce5:"Based on your measurements and the exact dimensions of the garment, the size recommendation provided is the most accurate for an ideal fit.",sdf9f9c621b6316e7:"Measure Again",s6ad3b28b46803c43:"Accept Suggestion",se940dab2e0b7a710:"Before you begin",scf8d43c4a5cb71fa:"To ensure accurate measurements, we'll take two scans: one from the front and one from the side. Maintain an upright posture with your arms slightly away from your body and stretched out. In the side view, stand up straight with your arms straight and aligned with your body.",s48d094fb2ffff8fb:"Tips",s08b0bc2feb4e0f1c:"Good Lighting",s322c72546e939809:"Choose a well-lit area where you can see your image clearly.",sa4ad2b9cd4ea10ba:"Clean Background",s396efd2b23a16ac9:"Position yourself against a plain background.",s81d43b9b25d0775b:"Clothes",s88a3f5e6a9d9945d:"Wear clothes that you usually wear on a daily basis.",s8fb9f388e75ffe11:"Framing",s625ff027ee7b497b:"Make sure your entire body is visible. The app will guide you.",s1dd794b3870bcae0:"To start",s676cfe9f36657792:"Measurement successful!"}},Symbol.toStringTag,{value:"Module"}));a.getLocale=Yt,a.setLocale=XA,Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED