@swan-admin/swan-web-component 1.0.79 → 1.0.80

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.
Files changed (70) hide show
  1. package/dist/Header-BN3RqavS.js +2 -0
  2. package/dist/Header-BN3RqavS.js.map +1 -0
  3. package/dist/Header-BWD-iDc_.js +2 -0
  4. package/dist/Header-BWD-iDc_.js.map +1 -0
  5. package/dist/Header-C7g9y-3a.js +2 -0
  6. package/dist/Header-C7g9y-3a.js.map +1 -0
  7. package/dist/Header-Cq-yREky.js +2 -0
  8. package/dist/Header-Cq-yREky.js.map +1 -0
  9. package/dist/Header-CvHiY9J5.js +2 -0
  10. package/dist/Header-CvHiY9J5.js.map +1 -0
  11. package/dist/Header-D3TZLqdL.js +2 -0
  12. package/dist/Header-D3TZLqdL.js.map +1 -0
  13. package/dist/Header-DGXTNcua.js +2 -0
  14. package/dist/Header-DGXTNcua.js.map +1 -0
  15. package/dist/Header-ivyQHWhg.js +2 -0
  16. package/dist/Header-ivyQHWhg.js.map +1 -0
  17. package/dist/LoadingScreen-BY7P5qKu.js +2 -0
  18. package/dist/LoadingScreen-BY7P5qKu.js.map +1 -0
  19. package/dist/LoadingScreen-B_adCE1u.js +2 -0
  20. package/dist/LoadingScreen-B_adCE1u.js.map +1 -0
  21. package/dist/LoadingScreen-BwUpdDu-.js +2 -0
  22. package/dist/LoadingScreen-BwUpdDu-.js.map +1 -0
  23. package/dist/LoadingScreen-CIG9Mhat.js +2 -0
  24. package/dist/LoadingScreen-CIG9Mhat.js.map +1 -0
  25. package/dist/LoadingScreen-CTMMPzB7.js +2 -0
  26. package/dist/LoadingScreen-CTMMPzB7.js.map +1 -0
  27. package/dist/LoadingScreen-Cy9Vy7kX.js +2 -0
  28. package/dist/LoadingScreen-Cy9Vy7kX.js.map +1 -0
  29. package/dist/LoadingScreen-DEV-HMUN.js +2 -0
  30. package/dist/LoadingScreen-DEV-HMUN.js.map +1 -0
  31. package/dist/LoadingScreen-DfPQoZ4M.js +2 -0
  32. package/dist/LoadingScreen-DfPQoZ4M.js.map +1 -0
  33. package/dist/arrow-right-BehK5wY6.js +27 -0
  34. package/dist/arrow-right-BehK5wY6.js.map +1 -0
  35. package/dist/arrow-right-Dp5jFyu1.js +27 -0
  36. package/dist/arrow-right-Dp5jFyu1.js.map +1 -0
  37. package/dist/bodyScan.d.ts +2 -2
  38. package/dist/bodyScan.js +1 -19
  39. package/dist/bodyScan.js.map +1 -1
  40. package/dist/bodyScan.mjs +1 -19
  41. package/dist/bodyScan.mjs.map +1 -1
  42. package/dist/enums-Dc2vWGVM.js +32 -0
  43. package/dist/enums-Dc2vWGVM.js.map +1 -0
  44. package/dist/enums-DlS0sXbg.js +2 -0
  45. package/dist/enums-DlS0sXbg.js.map +1 -0
  46. package/dist/enums-VMt0tBVG.js +32 -0
  47. package/dist/enums-VMt0tBVG.js.map +1 -0
  48. package/dist/enums-scH6Mgqf.js +2 -0
  49. package/dist/enums-scH6Mgqf.js.map +1 -0
  50. package/dist/faceScan.d.ts +2 -2
  51. package/dist/faceScan.js +1 -1
  52. package/dist/faceScan.js.map +1 -1
  53. package/dist/faceScan.mjs +1 -1
  54. package/dist/faceScan.mjs.map +1 -1
  55. package/dist/index.css +1 -1
  56. package/dist/index.d.ts +2 -2
  57. package/dist/index.js +1 -89
  58. package/dist/index.js.map +1 -1
  59. package/dist/index.mjs +1 -89
  60. package/dist/index.mjs.map +1 -1
  61. package/dist/interfaces-DN0Cmtpk.d.ts +148 -0
  62. package/dist/pose-detection.esm-BehJiApJ.js +18 -0
  63. package/dist/pose-detection.esm-BehJiApJ.js.map +1 -0
  64. package/dist/pose-detection.esm-BqQhOaLq.js +18 -0
  65. package/dist/pose-detection.esm-BqQhOaLq.js.map +1 -0
  66. package/dist/pose-detection.esm-DGv0E7iH.js +18 -0
  67. package/dist/pose-detection.esm-DGv0E7iH.js.map +1 -0
  68. package/dist/pose-detection.esm-DouwBFG2.js +18 -0
  69. package/dist/pose-detection.esm-DouwBFG2.js.map +1 -0
  70. package/package.json +7 -13
package/dist/bodyScan.mjs CHANGED
@@ -1,20 +1,2 @@
1
- import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import*as r from"react";import o,{useCallback as i,useMemo as s,createContext as a,useState as l,useEffect as c,useLayoutEffect as u,useContext as d,useRef as h}from"react";import{H as p,v as _,S as f,p as m,L as g,q as y,r as v,t as w,V as b,G as S,C as E,w as k,x as P,y as T,z as O,u as C,A as x,B as R}from"./Header-CDkpLwYo.js";import{ad as A,ae as N,af as F,ag as j,d as I,n as M,o as U,ah as L,f as z,ai as B,P as D,r as $,p as W,N as q,Y as H,aj as V,a4 as Y,Z as K,q as G,H as J,x as X,a0 as Q,ak as Z,G as ee,M as te,t as ne,O as re,B as oe,D as ie,Q as se,R as ae,m as le,S as ce,a2 as ue,a3 as de,$ as he,L as pe,a1 as _e,al as fe,J as me,ac as ge,am as ye,an as ve,ao as we,ap as be,aq as Se,ar as Ee,as as ke,at as Pe,h as Te,a7 as Oe,au as Ce,av as xe}from"./enums-BV1_VQpZ.js";import{L as Re}from"./LoadingScreen-Czxa8Is0.js";import Ae from"video.js";import"react-dom";function Ne(e){const{sx:t,...n}=e,{systemProps:r,otherProps:o}=(e=>{const t={systemProps:{},otherProps:{}},n=e?.theme?.unstable_sxConfig??N;return Object.keys(e).forEach(r=>{n[r]?t.systemProps[r]=e[r]:t.otherProps[r]=e[r]}),t})(n);let i;return i=Array.isArray(t)?[r,...t]:"function"==typeof t?(...e)=>{const n=t(...e);return A(n)?{...r,...n}:r}:{...r,...t},{...o,sx:i}}const Fe=U("MuiBox",["root"]),je=function(t={}){const{themeId:n,defaultTheme:o,defaultClassName:i="MuiBox-root",generateClassName:s}=t,a=F("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(j);return r.forwardRef(function(t,r){const l=I(o),{className:c,component:u="div",...d}=Ne(t);return e(a,{as:u,ref:r,className:M(c,s?s(i):i),theme:n&&l[n]||l,...d})})}({themeId:z,defaultTheme:B(),defaultClassName:Fe.root,generateClassName:L.generate});function Ie(e){return $("MuiDialog",e)}"production"!==process.env.NODE_ENV&&(je.propTypes={children:D.node,component:D.elementType,sx:D.oneOfType([D.arrayOf(D.oneOfType([D.func,D.object,D.bool])),D.func,D.object])});const Me=U("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),Ue=r.createContext({});"production"!==process.env.NODE_ENV&&(Ue.displayName="DialogContext");const Le=G(Z,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),ze=G(Q,{name:"MuiDialog",slot:"Root"})({"@media print":{position:"absolute !important"}}),Be=G("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${J(n.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),De=G(H,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${J(n.scroll)}`],t[`paperWidth${J(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(ee(({theme:e})=>({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:({ownerState:e})=>!e.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:"px"===e.breakpoints.unit?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${Me.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(e.breakpoints.values).filter(e=>"xs"!==e).map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`,[`&.${Me.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t]+64)]:{maxWidth:"calc(100% - 64px)"}}}})),{props:({ownerState:e})=>e.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:e})=>e.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${Me.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),$e=r.forwardRef(function(t,n){const o=W({props:t,name:"MuiDialog"}),i=q(),s={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{"aria-describedby":a,"aria-labelledby":l,"aria-modal":c=!0,BackdropComponent:u,BackdropProps:d,children:h,className:p,disableEscapeKeyDown:_=!1,fullScreen:f=!1,fullWidth:m=!1,maxWidth:g="sm",onClick:y,onClose:v,open:w,PaperComponent:b=H,PaperProps:S={},scroll:E="paper",slots:k={},slotProps:P={},TransitionComponent:T=V,transitionDuration:O=s,TransitionProps:C,...x}=o,R={...o,disableEscapeKeyDown:_,fullScreen:f,fullWidth:m,maxWidth:g,scroll:E},A=(e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:o,fullScreen:i}=e,s={root:["root"],container:["container",`scroll${J(n)}`],paper:["paper",`paperScroll${J(n)}`,`paperWidth${J(String(r))}`,o&&"paperFullWidth",i&&"paperFullScreen"]};return X(s,Ie,t)})(R),N=r.useRef(),F=Y(l),j=r.useMemo(()=>({titleId:F}),[F]),I={slots:{transition:T,...k},slotProps:{transition:C,paper:S,backdrop:d,...P}},[U,L]=K("root",{elementType:ze,shouldForwardComponentProp:!0,externalForwardedProps:I,ownerState:R,className:M(A.root,p),ref:n}),[z,B]=K("backdrop",{elementType:Le,shouldForwardComponentProp:!0,externalForwardedProps:I,ownerState:R}),[D,$]=K("paper",{elementType:De,shouldForwardComponentProp:!0,externalForwardedProps:I,ownerState:R,className:M(A.paper,S.className)}),[G,Q]=K("container",{elementType:Be,externalForwardedProps:I,ownerState:R,className:A.container}),[Z,ee]=K("transition",{elementType:V,externalForwardedProps:I,ownerState:R,additionalProps:{appear:!0,in:w,timeout:O,role:"presentation"}});return e(U,{closeAfterTransition:!0,slots:{backdrop:z},slotProps:{backdrop:{transitionDuration:O,as:u,...B}},disableEscapeKeyDown:_,onClose:v,open:w,onClick:e=>{y&&y(e),N.current&&(N.current=null,v&&v(e,"backdropClick"))},...L,...x,children:e(Z,{...ee,children:e(G,{onMouseDown:e=>{N.current=e.target===e.currentTarget},...Q,children:e(D,{as:b,elevation:24,role:"dialog","aria-describedby":a,"aria-labelledby":F,"aria-modal":c,...$,children:e(Ue.Provider,{value:j,children:h})})})})})});function We(e){return"function"==typeof e?e():e}function qe(e,t,n){const r=function(e,t,n){const r=t.getBoundingClientRect(),o=n&&n.getBoundingClientRect(),i=oe(t);let s;if(t.fakeTransform)s=t.fakeTransform;else{const e=i.getComputedStyle(t);s=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("transform")}let a=0,l=0;if(s&&"none"!==s&&"string"==typeof s){const e=s.split("(")[1].split(")")[0].split(",");a=parseInt(e[4],10),l=parseInt(e[5],10)}return"left"===e?o?`translateX(${o.right+a-r.left}px)`:`translateX(${i.innerWidth+a-r.left}px)`:"right"===e?o?`translateX(-${r.right-o.left-a}px)`:`translateX(-${r.left+r.width-a}px)`:"up"===e?o?`translateY(${o.bottom+l-r.top}px)`:`translateY(${i.innerHeight+l-r.top}px)`:o?`translateY(-${r.top-o.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}(e,t,We(n));r&&(t.style.webkitTransform=r,t.style.transform=r)}"production"!==process.env.NODE_ENV&&($e.propTypes={"aria-describedby":D.string,"aria-labelledby":D.string,"aria-modal":D.oneOfType([D.oneOf(["false","true"]),D.bool]),BackdropComponent:D.elementType,BackdropProps:D.object,children:D.node,classes:D.object,className:D.string,disableEscapeKeyDown:D.bool,fullScreen:D.bool,fullWidth:D.bool,maxWidth:D.oneOfType([D.oneOf(["xs","sm","md","lg","xl",!1]),D.string]),onClick:D.func,onClose:D.func,open:D.bool.isRequired,PaperComponent:D.elementType,PaperProps:D.object,scroll:D.oneOf(["body","paper"]),slotProps:D.shape({backdrop:D.oneOfType([D.func,D.object]),container:D.oneOfType([D.func,D.object]),paper:D.oneOfType([D.func,D.object]),root:D.oneOfType([D.func,D.object]),transition:D.oneOfType([D.func,D.object])}),slots:D.shape({backdrop:D.elementType,container:D.elementType,paper:D.elementType,root:D.elementType,transition:D.elementType}),sx:D.oneOfType([D.arrayOf(D.oneOfType([D.func,D.object,D.bool])),D.func,D.object]),TransitionComponent:D.elementType,transitionDuration:D.oneOfType([D.number,D.shape({appear:D.number,enter:D.number,exit:D.number})]),TransitionProps:D.object});const He=r.forwardRef(function(t,n){const o=q(),i={enter:o.transitions.easing.easeOut,exit:o.transitions.easing.sharp},s={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{addEndListener:a,appear:l=!0,children:c,container:u,direction:d="down",easing:h=i,in:p,onEnter:_,onEntered:f,onEntering:m,onExit:g,onExited:y,onExiting:v,style:w,timeout:b=s,TransitionComponent:S=te,...E}=t,k=r.useRef(null),P=ne(re(c),k,n),T=e=>t=>{e&&(void 0===t?e(k.current):e(k.current,t))},O=T((e,t)=>{qe(d,e,u),ae(e),_&&_(e,t)}),C=T((e,t)=>{const n=se({timeout:b,style:w,easing:h},{mode:"enter"});e.style.webkitTransition=o.transitions.create("-webkit-transform",{...n}),e.style.transition=o.transitions.create("transform",{...n}),e.style.webkitTransform="none",e.style.transform="none",m&&m(e,t)}),x=T(f),R=T(v),A=T(e=>{const t=se({timeout:b,style:w,easing:h},{mode:"exit"});e.style.webkitTransition=o.transitions.create("-webkit-transform",t),e.style.transition=o.transitions.create("transform",t),qe(d,e,u),g&&g(e)}),N=T(e=>{e.style.webkitTransition="",e.style.transition="",y&&y(e)}),F=r.useCallback(()=>{k.current&&qe(d,k.current,u)},[d,u]);return r.useEffect(()=>{if(p||"down"===d||"right"===d)return;const e=ie(()=>{k.current&&qe(d,k.current,u)}),t=oe(k.current);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[d,p,u]),r.useEffect(()=>{p||F()},[p,F]),e(S,{nodeRef:k,onEnter:O,onEntered:x,onEntering:C,onExit:A,onExited:N,onExiting:R,addEndListener:e=>{a&&a(k.current,e)},appear:l,in:p,timeout:b,...E,children:(e,{ownerState:t,...n})=>r.cloneElement(c,{ref:P,style:{visibility:"exited"!==e||p?void 0:"hidden",...w,...c.props.style},...n})})});function Ve(e){return $("MuiDrawer",e)}"production"!==process.env.NODE_ENV&&(He.propTypes={addEndListener:D.func,appear:D.bool,children:ce.isRequired,container:le(D.oneOfType([ue,D.func]),e=>{if(e.open){const t=We(e.container);if(t&&1===t.nodeType){const e=t.getBoundingClientRect();if("test"!==process.env.NODE_ENV&&0===e.top&&0===e.left&&0===e.right&&0===e.bottom)return new Error(["MUI: The `container` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join("\n"))}else if(!t||"function"!=typeof t.getBoundingClientRect||null!=t.contextElement&&1!==t.contextElement.nodeType)return new Error(["MUI: The `container` prop provided to the component is invalid.","It should be an HTML element instance."].join("\n"))}return null}),direction:D.oneOf(["down","left","right","up"]),easing:D.oneOfType([D.shape({enter:D.string,exit:D.string}),D.string]),in:D.bool,onEnter:D.func,onEntered:D.func,onEntering:D.func,onExit:D.func,onExited:D.func,onExiting:D.func,style:D.object,timeout:D.oneOfType([D.number,D.shape({appear:D.number,enter:D.number,exit:D.number})])}),U("MuiDrawer",["root","docked","paper","anchorLeft","anchorRight","anchorTop","anchorBottom","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const Ye=(e,t)=>{const{ownerState:n}=e;return[t.root,("permanent"===n.variant||"persistent"===n.variant)&&t.docked,t.modal]},Ke=G(Q,{name:"MuiDrawer",slot:"Root",overridesResolver:Ye})(ee(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),Ge=G("div",{shouldForwardProp:pe,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:Ye})({flex:"0 0 auto"}),Je=G(H,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`paperAnchor${J(n.anchor)}`],"temporary"!==n.variant&&t[`paperAnchorDocked${J(n.anchor)}`]]}})(ee(({theme:e})=>({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0,variants:[{props:{anchor:"left"},style:{left:0}},{props:{anchor:"top"},style:{top:0,left:0,right:0,height:"auto",maxHeight:"100%"}},{props:{anchor:"right"},style:{right:0}},{props:{anchor:"bottom"},style:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"}},{props:({ownerState:e})=>"left"===e.anchor&&"temporary"!==e.variant,style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>"top"===e.anchor&&"temporary"!==e.variant,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>"right"===e.anchor&&"temporary"!==e.variant,style:{borderLeft:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>"bottom"===e.anchor&&"temporary"!==e.variant,style:{borderTop:`1px solid ${(e.vars||e).palette.divider}`}}]}))),Xe={left:"right",right:"left",top:"down",bottom:"up"};const Qe=r.forwardRef(function(t,n){const o=W({props:t,name:"MuiDrawer"}),i=q(),s=de(),a={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{anchor:l="left",BackdropProps:c,children:u,className:d,elevation:h=16,hideBackdrop:p=!1,ModalProps:{BackdropProps:_,...f}={},onClose:m,open:g=!1,PaperProps:y={},SlideProps:v,TransitionComponent:w,transitionDuration:b=a,variant:S="temporary",slots:E={},slotProps:k={},...P}=o,T=r.useRef(!1);r.useEffect(()=>{T.current=!0},[]);const O=function({direction:e},t){return"rtl"===e&&function(e){return["left","right"].includes(e)}(t)?Xe[t]:t}({direction:s?"rtl":"ltr"},l),C=l,x={...o,anchor:C,elevation:h,open:g,variant:S,...P},R=(e=>{const{classes:t,anchor:n,variant:r}=e,o={root:["root",`anchor${J(n)}`],docked:[("permanent"===r||"persistent"===r)&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${J(n)}`,"temporary"!==r&&`paperAnchorDocked${J(n)}`]};return X(o,Ve,t)})(x),A={slots:{transition:w,...E},slotProps:{paper:y,transition:v,...k,backdrop:he(k.backdrop||{...c,..._},{transitionDuration:b})}},[N,F]=K("root",{ref:n,elementType:Ke,className:M(R.root,R.modal,d),shouldForwardComponentProp:!0,ownerState:x,externalForwardedProps:{...A,...P,...f},additionalProps:{open:g,onClose:m,hideBackdrop:p,slots:{backdrop:A.slots.backdrop},slotProps:{backdrop:A.slotProps.backdrop}}}),[j,I]=K("paper",{elementType:Je,shouldForwardComponentProp:!0,className:M(R.paper,y.className),ownerState:x,externalForwardedProps:A,additionalProps:{elevation:"temporary"===S?h:0,square:!0,..."temporary"===S&&{role:"dialog","aria-modal":"true"}}}),[U,L]=K("docked",{elementType:Ge,ref:n,className:M(R.root,R.docked,d),ownerState:x,externalForwardedProps:A,additionalProps:P}),[z,B]=K("transition",{elementType:He,ownerState:x,externalForwardedProps:A,additionalProps:{in:g,direction:Xe[O],timeout:b,appear:T.current}}),D=e(j,{...I,children:u});if("permanent"===S)return e(U,{...L,children:D});const $=e(z,{...B,children:D});return"persistent"===S?e(U,{...L,children:$}):e(N,{...F,children:$})});"production"!==process.env.NODE_ENV&&(Qe.propTypes={anchor:D.oneOf(["bottom","left","right","top"]),BackdropProps:D.object,children:D.node,classes:D.object,className:D.string,elevation:_e,hideBackdrop:D.bool,ModalProps:D.object,onClose:D.func,open:D.bool,PaperProps:D.object,SlideProps:D.object,slotProps:D.shape({backdrop:D.oneOfType([D.func,D.object]),docked:D.oneOfType([D.func,D.object]),paper:D.oneOfType([D.func,D.object]),root:D.oneOfType([D.func,D.object]),transition:D.oneOfType([D.func,D.object])}),slots:D.shape({backdrop:D.elementType,docked:D.elementType,paper:D.elementType,root:D.elementType,transition:D.elementType}),sx:D.oneOfType([D.arrayOf(D.oneOfType([D.func,D.object,D.bool])),D.func,D.object]),transitionDuration:D.oneOfType([D.number,D.shape({appear:D.number,enter:D.number,exit:D.number})]),variant:D.oneOf(["permanent","persistent","temporary"])});var Ze=o.memo(function({size:n=16}){return t("svg",{width:n,height:n,viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("path",{d:"M22.6968 14.6968C22.6968 16.8185 21.8539 18.8533 20.3536 20.3536C18.8533 21.8539 16.8185 22.6968 14.6968 22.6968",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e("path",{d:"M18.6968 11.6968V10.6968C18.6968 10.1663 18.4861 9.65764 18.111 9.28256C17.7359 8.90749 17.2272 8.69678 16.6968 8.69678C16.1663 8.69678 15.6576 8.90749 15.2826 9.28256C14.9075 9.65764 14.6968 10.1663 14.6968 10.6968",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e("path",{d:"M14.6968 10.6968V9.69678C14.6968 9.16634 14.4861 8.65764 14.111 8.28256C13.7359 7.90749 13.2272 7.69678 12.6968 7.69678C12.1663 7.69678 11.6576 7.90749 11.2826 8.28256C10.9075 8.65764 10.6968 9.16634 10.6968 9.69678V10.6968",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e("path",{d:"M10.6968 10.1968V4.69678C10.6968 4.16634 10.4861 3.65764 10.111 3.28256C9.73592 2.90749 9.22721 2.69678 8.69678 2.69678C8.16634 2.69678 7.65764 2.90749 7.28256 3.28256C6.90749 3.65764 6.69678 4.16634 6.69678 4.69678V14.6968",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e("path",{d:"M18.6969 11.6968C18.6969 11.1663 18.9076 10.6576 19.2827 10.2826C19.6577 9.90749 20.1664 9.69678 20.6969 9.69678C21.2273 9.69678 21.736 9.90749 22.1111 10.2826C22.4862 10.6576 22.6969 11.1663 22.6969 11.6968V14.6968C22.6969 16.8185 21.854 18.8533 20.3537 20.3536C18.8534 21.8539 16.8186 22.6968 14.6969 22.6968H12.6969C9.89688 22.6968 8.19688 21.8368 6.70688 20.3568L3.10688 16.7568C2.76282 16.3757 2.57847 15.8769 2.592 15.3637C2.60554 14.8505 2.81593 14.3621 3.1796 13.9997C3.54327 13.6373 4.03238 13.4287 4.54565 13.417C5.05892 13.4053 5.55704 13.5914 5.93688 13.9368L7.69688 15.6968",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})});var et,tt=o.memo(function({angle:n,countdown:r,isScanning:o,isInTargetRange:a,stabilityScore:l,children:c,config:u}){const d=i(()=>n<80?Math.max(0,Math.min(100,10*(n-60))):n>95?Math.max(0,Math.min(100,10*(105-n))):100,[n]),h=s(()=>{if(o)return u?.style?.base?.brandColor||"#4f46e5";const e=d();if(0===e)return"#ffffff";if(100===e)return u?.style?.base?.brandColor||"#8b5cf6";return`rgb(${Math.round(255-e/100*116)}, ${Math.round(255-e/100*163)}, ${Math.round(255-e/100*9)})`},[o,d]),_=i((e,t)=>t>70?e?"text-[#fff]/70":"text-[#fff]":e?"text-[#fff]/40":"text-[#000]/70",[]),f=i((e=!1)=>{const t=d();return o?"text-[#fff]":_(e,t)},[o,d]),m=r;function g(){document.documentElement.style.setProperty("--real-vh",window.innerHeight+"px")}return g(),window.addEventListener("resize",g),t("div",{className:"flex w-screen flex-col items-center h-[var(--real-vh)] overflow-hidden touch-none justify-center transition-all duration-300 max-w-[28rem] mx-auto",style:{backgroundColor:h},children:[e("div",{className:"flex justify-start fixed top-[.5rem] max-w-[28rem] mx-auto w-full px-[1rem]",children:e("div",{className:"flex justify-start ",children:e(p,{noTitle:!0,resolvedConfig:u})})}),null!==m?e("div",{className:"relative flex h-[6rem] w-[6rem] items-center justify-center rounded-[9999px] border-2 border-[#fff] bg-[#fff]/20 transition-all duration-300",children:e("div",{className:"text-[3rem] font-bold text-[#fff]",style:{fontFamily:u?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:m})}):t("div",o?{className:"relative flex flex-col items-center justify-center",children:[e("div",{className:"relative flex h-16 w-16 items-center justify-center rounded-[9999px] border-2 bg-[#fff]/30 border-[#fff]",children:e("div",{className:"h-4 w-4 rounded-[9999px] animate-pulse bg-[#fff]/80"})}),c]}:{className:M("relative flex h-[4rem] w-[4rem] items-center justify-center rounded-[9999px] border-2 ",a?"bg-[#fff]/20 border-[#fff]":"bg-[#fff]/10 border-[#fff]"),style:{transform:`translateY(${3*(90-n)}px)`,transition:"transform 0.2s ease-out"},children:[e("div",{className:"h-[1rem] w-[1rem] rounded-[9999px] bg-[#fff]/80"}),t("div",{className:"mt-[.5rem] w-[180px] flex-col flex items-center absolute top-[60px] text-[#fff]",children:[e(Ze,{size:30}),t("p",{style:{fontFamily:u?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:[" ","Tap to start level check"]})]})]}),null!==m&&e("div",{className:"absolute bottom-[8rem] text-center",children:e("div",{className:"text-[#fff] text-sm font-medium px-4 py-1.5 bg-black/20 rounded-[9999px] mt-8",style:{fontFamily:u?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:"Leave your phone as is"})}),a&&null===m&&!o&&e("div",{className:"absolute bottom-[8rem] w-[12rem]",children:e("div",{className:"h-[.375rem] w-full bg-[#fff]/20 rounded-[9999px] overflow-hidden",children:e("div",{className:"h-full bg-[#fff]/70 transition-all duration-300 rounded-[9999px]",style:{width:`${l}%`}})})}),null===m&&!o&&e("div",{className:"absolute bottom-[5rem] text-center",children:t("div",{className:M("text-[1.5rem] font-light",f()),children:[Math.round(n),"°"]})}),null===m&&!o&&e("div",{className:"absolute bottom-[2rem] text-center max-w-[20rem] mx-auto",children:e("div",{className:M("text-[.75rem] opacity-50",f(!0)),style:{fontFamily:u?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:"Place your phone upright against an object. Once stable and within the 80-95° range a countdown will start to move to the scan."})})]})}),nt={exports:{}};var rt,ot=(et||(et=1,rt=nt,function(e,t){rt.exports=t(o)}(0,function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="./src/react-webcam.tsx")}({"./src/react-webcam.tsx":
2
- /*!******************************!*\
3
- !*** ./src/react-webcam.tsx ***!
4
- \******************************/
5
- /*! exports provided: default */function(e,t,n){n.r(t);var r,o=n(/*! react */"react"),i=(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},s.apply(this,arguments)};function a(){return!(!navigator.mediaDevices||!navigator.mediaDevices.getUserMedia)}"undefined"!=typeof window&&(void 0===navigator.mediaDevices&&(navigator.mediaDevices={}),void 0===navigator.mediaDevices.getUserMedia&&(navigator.mediaDevices.getUserMedia=function(e){var t=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;return t?new Promise(function(n,r){t.call(navigator,e,n,r)}):Promise.reject(new Error("getUserMedia is not implemented in this browser"))}));var l=function(e){function t(t){var n=e.call(this,t)||this;return n.canvas=null,n.ctx=null,n.requestUserMediaId=0,n.unmounted=!1,n.state={hasUserMedia:!1},n}return i(t,e),t.prototype.componentDidMount=function(){var e=this.state,t=this.props;this.unmounted=!1,a()?(e.hasUserMedia||this.requestUserMedia(),t.children&&"function"!=typeof t.children&&console.warn("children must be a function")):t.onUserMediaError("getUserMedia not supported")},t.prototype.componentDidUpdate=function(e){var t=this.props;if(a()){var n=JSON.stringify(e.audioConstraints)!==JSON.stringify(t.audioConstraints),r=JSON.stringify(e.videoConstraints)!==JSON.stringify(t.videoConstraints),o=e.minScreenshotWidth!==t.minScreenshotWidth,i=e.minScreenshotHeight!==t.minScreenshotHeight;(r||o||i)&&(this.canvas=null,this.ctx=null),(n||r)&&(this.stopAndCleanup(),this.requestUserMedia())}else t.onUserMediaError("getUserMedia not supported")},t.prototype.componentWillUnmount=function(){this.unmounted=!0,this.stopAndCleanup()},t.stopMediaStream=function(e){e&&(e.getVideoTracks&&e.getAudioTracks?(e.getVideoTracks().map(function(t){e.removeTrack(t),t.stop()}),e.getAudioTracks().map(function(t){e.removeTrack(t),t.stop()})):e.stop())},t.prototype.stopAndCleanup=function(){var e=this.state;e.hasUserMedia&&(t.stopMediaStream(this.stream),e.src&&window.URL.revokeObjectURL(e.src))},t.prototype.getScreenshot=function(e){var t=this.state,n=this.props;if(!t.hasUserMedia)return null;var r=this.getCanvas(e);return r&&r.toDataURL(n.screenshotFormat,n.screenshotQuality)},t.prototype.getCanvas=function(e){var t=this.state,n=this.props;if(!this.video)return null;if(!t.hasUserMedia||!this.video.videoHeight)return null;if(!this.ctx){var r=this.video.videoWidth,o=this.video.videoHeight;if(!this.props.forceScreenshotSourceSize){var i=r/o;o=(r=n.minScreenshotWidth||this.video.clientWidth)/i,n.minScreenshotHeight&&o<n.minScreenshotHeight&&(r=(o=n.minScreenshotHeight)*i)}this.canvas=document.createElement("canvas"),this.canvas.width=(null==e?void 0:e.width)||r,this.canvas.height=(null==e?void 0:e.height)||o,this.ctx=this.canvas.getContext("2d")}var s=this.ctx,a=this.canvas;return s&&a&&(a.width=(null==e?void 0:e.width)||a.width,a.height=(null==e?void 0:e.height)||a.height,n.mirrored&&(s.translate(a.width,0),s.scale(-1,1)),s.imageSmoothingEnabled=n.imageSmoothing,s.drawImage(this.video,0,0,(null==e?void 0:e.width)||a.width,(null==e?void 0:e.height)||a.height),n.mirrored&&(s.scale(-1,1),s.translate(-a.width,0))),a},t.prototype.requestUserMedia=function(){var e=this,n=this.props,r=function(r,o){var i={video:void 0===o||o};n.audio&&(i.audio=void 0===r||r),e.requestUserMediaId++;var s=e.requestUserMediaId;navigator.mediaDevices.getUserMedia(i).then(function(n){e.unmounted||s!==e.requestUserMediaId?t.stopMediaStream(n):e.handleUserMedia(null,n)}).catch(function(t){e.handleUserMedia(t)})};if("mediaDevices"in navigator)r(n.audioConstraints,n.videoConstraints);else{var o=function(e){return{optional:[{sourceId:e}]}},i=function(e){var t=e.deviceId;return"string"==typeof t?t:Array.isArray(t)&&t.length>0?t[0]:"object"==typeof t&&t.ideal?t.ideal:null};MediaStreamTrack.getSources(function(e){var t=null,s=null;e.forEach(function(e){"audio"===e.kind?t=e.id:"video"===e.kind&&(s=e.id)});var a=i(n.audioConstraints);a&&(t=a);var l=i(n.videoConstraints);l&&(s=l),r(o(t),o(s))})}},t.prototype.handleUserMedia=function(e,t){var n=this.props;if(e||!t)return this.setState({hasUserMedia:!1}),void n.onUserMediaError(e);this.stream=t;try{this.video&&(this.video.srcObject=t),this.setState({hasUserMedia:!0})}catch(e){this.setState({hasUserMedia:!0,src:window.URL.createObjectURL(t)})}n.onUserMedia(t)},t.prototype.render=function(){var e=this,t=this.state,n=this.props,r=n.audio;n.forceScreenshotSourceSize;var i=n.disablePictureInPicture;n.onUserMedia,n.onUserMediaError,n.screenshotFormat,n.screenshotQuality,n.minScreenshotWidth,n.minScreenshotHeight,n.audioConstraints,n.videoConstraints,n.imageSmoothing;var a=n.mirrored,l=n.style,c=void 0===l?{}:l,u=n.children,d=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(n,["audio","forceScreenshotSourceSize","disablePictureInPicture","onUserMedia","onUserMediaError","screenshotFormat","screenshotQuality","minScreenshotWidth","minScreenshotHeight","audioConstraints","videoConstraints","imageSmoothing","mirrored","style","children"]),h=a?s(s({},c),{transform:(c.transform||"")+" scaleX(-1)"}):c,p={getScreenshot:this.getScreenshot.bind(this)};return o.createElement(o.Fragment,null,o.createElement("video",s({autoPlay:!0,disablePictureInPicture:i,src:t.src,muted:!r,playsInline:!0,ref:function(t){e.video=t},style:h},d)),u&&u(p))},t.defaultProps={audio:!1,disablePictureInPicture:!1,forceScreenshotSourceSize:!1,imageSmoothing:!0,mirrored:!1,onUserMedia:function(){},onUserMediaError:function(){},screenshotFormat:"image/webp",screenshotQuality:.92},t}(o.Component);t.default=l},react:
6
- /*!**************************************************************************************!*\
7
- !*** external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"} ***!
8
- \**************************************************************************************/
9
- /*! no static exports found */function(t,n){t.exports=e}}).default})),nt.exports),it=fe(ot),st=me(e("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");const at="DESKTOP",lt="TAB",ct="MOBILE",ut=a(void 0);function dt({children:t}){const[n,r]=l([window?.innerWidth,window?.innerHeight]),[o,i]=l(!1),a=()=>{r([window?.innerWidth,window?.innerHeight])};c(()=>{a()},[]),u(()=>(window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)),[a]);let d=at;n[0]>768&&n[0]<1024&&(d=lt),n[0]<768&&(d=ct);const h=s(()=>({size:n,setSize:r,clearInputs:o,setClearInputs:i,media:d}),[n,o,d]);return e(ut.Provider,{value:h,children:t})}var ht={Custom_Scan:"Custom Scan",Find_your_perfect_fit:"Find your perfect fit",One_time_setup_in_2_min_or_less:"One time setup in 2 min or less.",PRIVACY:"PRIVACY",Swan_encrypts_your_data_with_Ever_vault_and_ensures_your_video_is_not_seen_by_anyone:"Swan encrypts your data with Ever vault & ensures your video is not seen by anyone.",By_ticking_this_box_you_are_agreeing_to_our:"By ticking this box, you're agreeing to our",privacy_policy:"privacy policy",Get_Measured:"Get Measured",Login:"Login",Where_do_you_shop:"Where do you shop?",Men_s:"Men's",Women_s:"Women's",Next:"Next",Preferred_language:"Preferred language",Hindi:"Hindi",English:"English",French:"French",Spanish:"Spanish",German:"German",Italian:"Italian",Arabic:"Arabic",Phone_Model:"Phone Model",Select_phone_brand:"Select phone brand...",Select_phone_model:"Select phone model...",Measurement_tips:"Measurement tips",Tips_for_your_scan:"Tips for your scan",Watch_this_video_to_know_how_to_scan:"Watch this video to know how to scan",How_to_use_Swan:"How to use Swan",Watch_this_short_video_to_know_how_to_use:" Watch this short video to know how to use",Shop:"Shop",Skip:"Skip",Form_fitting_clothing:"Form fitting clothing",How_form_is_fitting_your_outfit:"How form fitting is your outfit?",For_accurate_scan_please_wear_tight_clothing_Here_s_an_example:"For accurate scan, please wear tight clothing, Here's an example",Scan_with_form_fitting:"Scan with form fitting",Scan_with_form_loose_fit:"Scan with form loose fit",Turn_up_your_volume:"Turn up your volume",For_smart_voice_guide:"For smart voice guide",Place_your_phone_on_a_table_at:" Place your phone on a table at",a_hip_height:"a hip height",Scan:"Scan",Height:"Height",Height_in_ft:"Height in ft",Height_in_inch:"Height in inch",How_tall_are_you:"How tall are you?",We_are_sorry_we_currently_do_not_support_this_heights_outside_of_5_ft_and_7_ft_We_are_working_on_new_models_that_do:"We're sorry, we currently don't support this heights outside of 5 ft & 7 ft. We're working on new models that do.",Confirm:"Confirm",To_start_your_measurement:"To start your measurement",Scan_this_QR_code_with_your_phone:"Scan this QR code with your phone",You_can_continue_from_here_after_your_scan:"You can continue from here after your scan",Failed_to_get_measurements:"Failed to get measurements",No_data_found_Go_back_to:"No data found Go back to",back:"back",Profile:"Profile",shopify:"shopify",fit_view_result:"fit view result",Nest:"Nest",Scan_again:"Scan again",Provide_feedback:"Provide feedback",Add_to_cart:"Add to cart",Back_to_product:"Back to product",Fit_Notes:"Fit Notes",Fitted:"Fitted",Ideal_fit:"Ideal fit",Relaxed:"Relaxed",Wrong_email_format:"Wrong email format",Something_went_wrong:"Something went wrong",Email_is_required:"Email is required",Scan_status:"Scan status",Uploading:"Uploading...",Processing:"Processing...",Finishing:"Finishing...",Complete:"Complete!",You_re_logged_in:"You're logged in",Swan_will_load_on_every_supported_page:"Swan will load on every supported page.",Happy_Shopping:"Happy Shopping!",Email_verification_failed:"Email verification failed.",Email_Confirmed:"Email Confirmed.",Measurements_saved:"Measurements saved",Login_anywhere_you_see_the_Swan_logo_to_load_your_measurements:"Login anywhere you see the Swan logo to load your measurements.",Check_your_email:"Check your email",Tap_on_the_verification_link_sent_to:"Tap on the verification link sent to",Email_Confirmation:"Email Confirmation.",Save_your_scan:"Save your scan",Confirm_with_a_single_tap_from_your_email_inbox:"Confirm with a single tap from your email inbox.",Saving_your_scan_means_you_can_load_your_measurements_anywhere_you_see_the_Swan_logo:"Saving your scan means you can load your measurements anywhere you see the Swan logo.",Passwordless_Just_one_tap_via_email:"Passwordless. Just one tap via email.",Join_2000_shoppers:"Join 2,000+ shoppers",Your_measurements_will_be_shared_only_once_your_email_is_confirmed:"Your measurements will be shared only once your email is confirmed.",Enter_your_email:"Enter your email",Send_confirmation_email:"Send confirmation email",No_thanks:"No thanks",We_are_sorry:"We're sorry!",Video_tips_for_scanning:"Video tips for scanning",Please_make_sure_to:"Please make sure to:",one_Complete_a_full_spin_Starting_and_finishing_with_your_feet_facing_your_phone:"1. Complete a full spin. Starting & finishing with your feet facing your phone.",two_Rotate_slowly_throughout_your_spin:"2. Rotate slowly throughout your spin.",three_Make_sure_your_full_body_including_feet_and_hands_are_visible_in_frame:"3. Make sure your full body (including feet & hands) are visible in frame.",Scan_s:"Scan's",vision_model:"vision model",is_at_capacity:"is at capacity.",We_are_sorry_about_this_We_are_working_hard_to_add_capacity_Please_try_again_soon:"We're sorry about this. We're working hard to add capacity. Please try again soon.",Oops:"Oops..",Looks_like_this_QR_code_is_not_valid:"Looks like this QR code is not valid.",Reload_your_desktop_tab_to_generate_a_new_code:"Reload your desktop tab to generate a new code",Magic_link:"Magic link",We_have_sent_you_a_magic_link_via_email:"We've sent you a magic link via email.",Please_confirm_your_email_load_your_measurements_on_any_partner_brand:"Please confirm your email load your measurements on any partner brand..",Welcome_back:"Welcome back!",Load_my_account:"Load my account",Back_to_home:"Back to home",Enter_a_valid_email:"Enter a valid email!",No_measurement_found_for_this_email:"No measurement found for this email",Reset:"Reset",Resume:"Resume",Start_Scan:"Start Scan",Scanning:"Scanning",Detecting_Body:"Detecting Body...",Stop:"Stop",Generating_Measurements:"Generating Measurements",Help:"Help",Scan_tips:"Scan tips",Watch_instructions_video:"Watch instructions video",Wear_form_fitting_clothing_for_the_most_accurate_results:"Wear form fitting clothing for the most accurate results",Position_yourself_in_a_brightly_lit_room:"Position yourself in a brightly lit room",Tie_up_long_hair_and_slip_off_your_shoes:"Tie up long hair & slip off your shoes",Back:"Back",Swan:"Swan",Please_check_your_setting_for_camera_permission:"Please check your setting for camera permission",Settings:"Settings",Enable_the_camera_permissions:"Enable the camera permissions",Go_Back:"Go Back",For_helping_in_getting:"For helping in getting",Measurements_have_been_shared:"Measurements have been shared!",Thank_You:"Thank You!",live:"live.",Your:"Your",Check_back_soon_to_use_Swan:"Check back soon to use Swan",custom_for_your_next_order:"custom for your next order",sevenTillEight:"7till8",Rhodes_and_Beckett:"Rhodes & Beckett",Send_invite:"Send invite",Your_Nest:"Your Nest",Share_your_measurements_to_shop_and_gift_for_those_close_to_you:"Share your measurements to shop & gift for those close to you",Invite_to_Swan:"Invite to Swan",Name:"Name",Enter_their_name:"Enter their name",Enter_their_email:"Enter their email",Message:"Message",Join_Swan:"Join Swan!",Email:"Email",Invite:"Invite",Your_Login:"Your Login",Your_Scans:"Your Scans",Talk_with_the_CEO:"Talk with the CEO",Send_me_an_email:"Send me an email",At_Swan_we_are_here_to_make_shopping_about_you_I_would_love_to_hear_what_you_think_of_Swan_and_what_you_want_to_see_next_I_am_excited_to_hear_your_feedback:"At Swan we're here to make shopping about you. I'd love to hear what you think of Swan and what you want to see next. I'm excited to hear your feedback -",Eoin:"Eoin",You_can_close_this_tab_and_return_to_the_original_to_get_your_sizing_suggestion:"You can close this tab and return to the original to get your sizing suggestion.",Try_On:"Try-On",Invite_friends:"Invite friends",Pending:"Pending",Decline:"Decline",gifting_simple:"gifting simple",Invite_friends_and_make:"Invite friends & make",Nest_will_be_able_to_see_and_size_clothes_on_you:"Nest will be able to see & size clothes on you",By_sharing_your_Swan_profile_those_in_your:"By sharing your Swan profile, those in your",Enter_your_name:"Enter your name",Failed_to_get_tryon:"Failed to get tryon",In_Progress:"In Progress",Go_back_to:"Go back to"},pt={Custom_Scan:"कस्टम स्कैन",Find_your_perfect_fit:"अपना संपूर्ण फिट ढूंढें",One_time_setup_in_2_min_or_less:"2 मिनट या उससे कम में एक बार सेटअप करें।",PRIVACY:"गोपनीयता",Swan_encrypts_your_data_with_Ever_vault_and_ensures_your_video_is_not_seen_by_anyone:"स्वान आपके डेटा को एवर वॉल्ट से एन्क्रिप्ट करता है और सुनिश्चित करता है कि आपका वीडियो किसी को भी नहीं दिखाई जाता है।",By_ticking_this_box_you_are_agreeing_to_our:"इस बॉक्स को टिक करके, आप हमारे",privacy_policy:"गोपनीयता नीति",Get_Measured:"माप लो",Login:"लॉग इन करें",Where_do_you_shop:"आप कहाँ खरीदारी करते हैं?",Men_s:"पुरुषों का",Women_s:"महिलाओं का",Next:"आगे",Preferred_language:"पसंदीदा भाषा",Hindi:"हिन्दी",English:"अंग्रेज़ी",French:"फ्रेंच",Spanish:"स्पैनिश",German:"जर्मन",Italian:"इतालवी",Arabic:"अरबी",Phone_Model:"फ़ोन मॉडल",Select_phone_brand:"फ़ोन ब्रांड चुनें...",Select_phone_model:"फ़ोन मॉडल चुनें...",Measurement_tips:"मापन सुझाव",Tips_for_your_scan:"आपके स्कैन के लिए सुझाव",Watch_this_video_to_know_how_to_scan:"स्कैन कैसे करें इसे जानने के लिए इस वीडियो को देखें",How_to_use_Swan:"स्वान का उपयोग कैसे करें",Watch_this_short_video_to_know_how_to_use:"इसे कैसे उपयोग करने के लिए इस छोटे वीडियो को देखें",Shop:"खरीदारी करें",Skip:"छोड़ें",Form_fitting_clothing:"फॉर्म फिटिंग कपड़े",How_form_is_fitting_your_outfit:"आपके आउटफिट को कैसे फॉर्म फिट है?",For_accurate_scan_please_wear_tight_clothing_Here_s_an_example:"सटीक स्कैन के लिए, कृपया टाइट कपड़े पहनें, यहां एक उदाहरण है",Scan_with_form_fitting:"फॉर्म फिटिंग के साथ स्कैन करें",Scan_with_form_loose_fit:"फॉर्म लूज़ फिट के साथ स्कैन करें",Turn_up_your_volume:"अपनी आवाज बढ़ाएं",For_smart_voice_guide:"स्मार्ट वॉयस गाइड के लिए",Place_your_phone_on_a_table_at:"अपने फ़ोन को एक टेबल पर रखें",a_hip_height:"एक कूल्हे की ऊचाई पर",Scan:"स्कैन करें",Height:"ऊचाई",Height_in_ft:"ऊचाई फुट में",Height_in_inch:"ऊचाई इंच में",How_tall_are_you:"आपकी कितनी ऊचाई है?",We_are_sorry_we_currently_do_not_support_this_heights_outside_of_5_ft_and_7_ft_We_are_working_on_new_models_that_do:"माफ़ करें, हम वर्तमान में 5 फीट और 7 फीट के बाहर की इस ऊचाई का समर्थन नहीं करते हैं। हम उन नए मॉडल्स पर काम कर रहे हैं जो करते हैं।",Confirm:"पुष्टि करें",To_start_your_measurement:"अपना मापन शुरू करने के लिए",Scan_this_QR_code_with_your_phone:"इस क्यूआर कोड को अपने फ़ोन से स्कैन करें",You_can_continue_from_here_after_your_scan:"आप अपने स्कैन के बाद यहां से जारी रख सकते हैं",Failed_to_get_measurements:"माप नहीं मिला",No_data_found_Go_back_to:"कोई डेटा नहीं मिला वापस जाएं",back:"वापस",Profile:"प्रोफ़ाइल",shopify:"शॉपिफाई",fit_view_result:"फिट दृश्य परिणाम",Nest:"नेस्ट",Scan_again:"फिर से स्कैन करें",Provide_feedback:"प्रतिपुर्ण प्रतिक्रिया",Add_to_cart:"कार्ट में डालें",Back_to_product:"उत्पाद पर वापस जाएं",Fit_Notes:"फिट नोट्स",Fitted:"फिटेड",Ideal_fit:"आदर्श फिट",Relaxed:"रिलैक्स्ड",Wrong_email_format:"गलत ईमेल प्रारूप",Something_went_wrong:"कुछ गलत हो गया",Email_is_required:"ईमेल आवश्यक है",Scan_status:"स्कैन स्थिति",Uploading:"अपलोड हो रहा है...",Processing:"प्रोसेसिंग...",Finishing:"समापन...",Complete:"पूर्ण!",You_re_logged_in:"आप लॉग इन हैं",Swan_will_load_on_every_supported_page:"स्वॉन हर समर्थित पृष्ठ पर लोड होगा।",Happy_Shopping:"खुश खरीदारी!",Email_verification_failed:"ईमेल सत्यापन असफल हुआ।",Email_Confirmed:"ईमेल सत्यापित हुआ।",Measurements_saved:"माप सहेजे गए",Login_anywhere_you_see_the_Swan_logo_to_load_your_measurements:"जहाँ भी आपको स्वॉन का लोगो दिखे, वहाँ लॉगिन करें और अपनी मापें लोड करें।",Check_your_email:"अपने ईमेल की जाँच करें",Tap_on_the_verification_link_sent_to:"भेजे गए सत्यापन लिंक पर टैप करें",Email_Confirmation:"ईमेल सत्यापन।",Save_your_scan:"अपना स्कैन सहेजें",Confirm_with_a_single_tap_from_your_email_inbox:"एक ही टैप से अपने ईमेल इनबॉक्स से सत्यापित करें।",Saving_your_scan_means_you_can_load_your_measurements_anywhere_you_see_the_Swan_logo:"अपने स्कैन को सहेजना यह मतलब है कि आप स्वॉन लोगो देख सकते हैं हर जगह अपने माप।",Passwordless_Just_one_tap_via_email:"पासवर्ड रहित। बस एक ईमेल के माध्यम से एक टैप।",Join_2000_shoppers:"2,000+ शॉपर्स से जुड़ें",Your_measurements_will_be_shared_only_once_your_email_is_confirmed:"आपके माप साझा किए जाएंगे केवल जब आपका ईमेल सत्यापित होगा।",Enter_your_email:"अपना ईमेल दर्ज करें",Send_confirmation_email:"सत्यापन ईमेल भेजें",No_thanks:"नहीं धन्यवाद",We_are_sorry:"हमें खेद है!",Video_tips_for_scanning:"स्कैनिंग के लिए वीडियो टिप्स",Please_make_sure_to:"कृपया सुनिश्चित करें:",one_Complete_a_full_spin_Starting_and_finishing_with_your_feet_facing_your_phone:"1. पूरी चक्कर मारें। अपने पैर अपने फ़ोन की ओर मुख करके आरंभ और समाप्त करके।",two_Rotate_slowly_throughout_your_spin:"2. अपने चक्कर के दौरान धीरे से घूमें।",three_Make_sure_your_full_body_including_feet_and_hands_are_visible_in_frame:"3. सुनिश्चित करें कि आपका पूरा शरीर (पैर और हाथ भी) फ्रेम में दिखाई दे।",Scan_s:"स्कैन की",vision_model:"दृष्टि मॉडल",is_at_capacity:"क्षमता में है।",We_are_sorry_about_this_We_are_working_hard_to_add_capacity_Please_try_again_soon:"हमें इसके बारे में खेद है। हम क्षमता जोड़ने के लिए कड़ी मेहनत कर रहे हैं। कृपया शीघ्र पुन: प्रयास करें।",Oops:"ओह...",Looks_like_this_QR_code_is_not_valid:"ऐसा दिखता है कि यह QR कोड वैध नहीं है।",Reload_your_desktop_tab_to_generate_a_new_code:"एक नए कोड उत्पन्न करने के लिए अपने डेस्कटॉप टैब को पुनः लोड करें",Magic_link:"जादुई लिंक",We_have_sent_you_a_magic_link_via_email:"हमने आपको एक जादुई लिंक ईमेल के माध्यम से भेजा है।",Please_confirm_your_email_load_your_measurements_on_any_partner_brand:"कृपया अपने ईमेल को सत्यापित करें ताकि आपके माप किसी भी साथी ब्रांड पर लोड किए जा सकें।",Welcome_back:"वापसी पर स्वागत है!",Load_my_account:"मेरे खाते को लोड करें",Back_to_home:"घर वापस",Enter_a_valid_email:"एक वैध ईमेल दर्ज करें!",No_measurement_found_for_this_email:"इस ईमेल के लिए कोई माप नहीं मिला",Reset:"रीसेट",Resume:"पुनः आरंभ करें",Start_Scan:"स्कैन शुरू करें",Scanning:"स्कैनिंग",Detecting_Body:"शरीर का पता लगा जा रहा है...",Stop:"रोकें",Generating_Measurements:"माप उत्पन्न हो रहे हैं",Help:"सहायता",Scan_tips:"स्कैन टिप्स",Watch_instructions_video:"विनिर्देश वीडियो देखें",Wear_form_fitting_clothing_for_the_most_accurate_results:"सबसे सटीक परिणामों के लिए फॉर्म फिटिंग कपड़े पहनें",Position_yourself_in_a_brightly_lit_room:"खुद को एक चमकीले कमरे में स्थित करें",Tie_up_long_hair_and_slip_off_your_shoes:"लंबे बालों को बाँधें और अपने जूते निकालें",Back:"वापस",Swan:"स्वान",Please_check_your_setting_for_camera_permission:"कृपया कैमरा अनुमति के लिए अपनी सेटिंग जाँचें",Settings:"सेटिंग्स",Enable_the_camera_permissions:"कैमरा अनुमतियों को सक्षम करें",Go_Back:"पीछे जाएं",For_helping_in_getting:"प्राप्त करने में मदद के लिए",Measurements_have_been_shared:"मापें साझा की गई हैं!",Thank_You:"धन्यवाद!",live:"लाइव.",Your:"आपकी",Check_back_soon_to_use_Swan:"स्वान का उपयोग करने के लिए जल्दी जांच करें",custom_for_your_next_order:"अपने अगले आदेश के लिए कस्टम",sevenTillEight:"7से8",Rhodes_and_Beckett:"रोड्स और बेकेट",Send_invite:"आमंत्रण भेजें",Your_Nest:"आपका नेस्ट",Share_your_measurements_to_shop_and_gift_for_those_close_to_you:"अपने मापों को साझा करें और उनके लिए खरीददारी और उपहार करें जो आपके करीब हैं",Invite_to_Swan:"स्वान में आमंत्रित करें",Name:"नाम",Enter_their_name:"उनका नाम डालें",Enter_their_email:"उनका ईमेल डालें",Message:"संदेश",Join_Swan:"स्वान में शामिल हों!",Email:"ईमेल",Invite:"आमंत्रण",Your_Login:"आपका लॉगिन",Your_Scans:"आपके स्कैन",Talk_with_the_CEO:"CEO से बात करें",Send_me_an_email:"मुझे एक ईमेल भेजें",At_Swan_we_are_here_to_make_shopping_about_you_I_would_love_to_hear_what_you_think_of_Swan_and_what_you_want_to_see_next_I_am_excited_to_hear_your_feedback:"स्वान में हम यहां हैं कि खरीददारी को आपके बारे में बनाए रखें। मैं यह जानने के लिए उत्सुक हूं कि आप स्वान के बारे में क्या सोचते हैं और आप आगे क्या देखना चाहते हैं। मुझे आपकी प्रतिक्रिया सुनने में बहुत उत्सुकता है -",Eoin:"ईओइन",You_can_close_this_tab_and_return_to_the_original_to_get_your_sizing_suggestion:"आप इस टैब को बंद करके मौलिक पर लौट सकते हैं और अपने साइज़िंग सुझाव प्राप्त कर सकते हैं।",Try_On:"प्रयास करें",Invite_friends:"मित्रों को आमंत्रित करें",Pending:"विचाराधीन",Decline:"अस्वीकार",gifting_simple:"सरल उपहार",Invite_friends_and_make:"मित्रों को आमंत्रित करें और बनाएँ",Nest_will_be_able_to_see_and_size_clothes_on_you:"Nest आप पर कपड़े देखने और आकार निर्धारित करने में सक्षम होगा",By_sharing_your_Swan_profile_those_in_your:"अपने स्वान प्रोफ़ाइल को साझा करके, आपके",Enter_your_name:"अपना नाम दर्ज करें",Failed_to_get_tryon:"प्रयास नहीं मिला",In_Progress:"कार्रवाई में",Go_back_to:"वापस जाएं"},_t={Custom_Scan:"Numérisation personnalisée",Find_your_perfect_fit:"Trouvez votre ajustement parfait",One_time_setup_in_2_min_or_less:"Configuration unique en 2 minutes ou moins.",PRIVACY:"CONFIDENTIALITÉ",Swan_encrypts_your_data_with_Ever_vault_and_ensures_your_video_is_not_seen_by_anyone:"Swan chiffre vos données avec Ever vault et veille à ce que votre vidéo ne soit vue par personne.",By_ticking_this_box_you_are_agreeing_to_our:"En cochant cette case, vous acceptez notre",privacy_policy:" politique de confidentialité",Get_Measured:"Obtenez vos mesures",Login:"Connexion",Where_do_you_shop:"Où faites-vous vos achats?",Men_s:"Pour hommes",Women_s:"Pour femmes",Next:"Suivant",Preferred_language:"Langue préférée",Hindi:"Hindi",English:"Anglais",French:"Français",Spanish:"Espagnol",German:"Allemand",Italian:"Italien",Arabic:"Arabe",Phone_Model:"Modèle de téléphone",Select_phone_brand:"Sélectionnez la marque de votre téléphone...",Select_phone_model:"Sélectionnez le modèle de votre téléphone...",Measurement_tips:"Conseils de mesure",Tips_for_your_scan:"Conseils pour votre numérisation",Watch_this_video_to_know_how_to_scan:"Regardez cette vidéo pour savoir comment numériser",How_to_use_Swan:"Comment utiliser Swan",Watch_this_short_video_to_know_how_to_use:"Regardez cette courte vidéo pour savoir comment utiliser",Shop:"Boutique",Skip:"Passer",Form_fitting_clothing:"Vêtements ajustés",How_form_is_fitting_your_outfit:"Comment votre tenue est-elle ajustée?",For_accurate_scan_please_wear_tight_clothing_Here_s_an_example:"Pour une numérisation précise, veuillez porter des vêtements serrés. Voici un exemple",Scan_with_form_fitting:"Numérisation avec ajustement",Scan_with_form_loose_fit:"Numérisation avec ajustement ample",Turn_up_your_volume:"Augmentez le volume",For_smart_voice_guide:"Pour un guide vocal intelligent",Place_your_phone_on_a_table_at:"Placez votre téléphone sur une table à",a_hip_height:"hauteur des hanches",Scan:"Numériser",Height:"Taille",Height_in_ft:"Taille en pieds",Height_in_inch:"Taille en pouces",How_tall_are_you:"Quelle est votre taille?",We_are_sorry_we_currently_do_not_support_this_heights_outside_of_5_ft_and_7_ft_We_are_working_on_new_models_that_do:"Nous sommes désolés, nous ne prenons actuellement pas en charge les tailles en dehors de 5 pieds et 7 pieds. Nous travaillons sur de nouveaux modèles qui le font.",Confirm:"Confirmer",To_start_your_measurement:"Pour commencer votre mesure",Scan_this_QR_code_with_your_phone:"Numérisez ce code QR avec votre téléphone",You_can_continue_from_here_after_your_scan:"Vous pouvez continuer d'ici après votre numérisation",Failed_to_get_measurements:"Échec de l'obtention des mesures",No_data_found_Go_back_to:"Aucune donnée trouvée. Retournez à",back:"arrière",Profile:"Profil",shopify:"shopify",fit_view_result:"résultat de la vue ajustée",Nest:"Nid",Scan_again:"Numériser à nouveau",Provide_feedback:"Fournir des commentaires",Add_to_cart:"Ajouter au panier",Back_to_product:"Retour au produit",Fit_Notes:"Notes d'ajustement",Fitted:"Ajusté",Ideal_fit:"Ajustement idéal",Relaxed:"Détendu",Wrong_email_format:"Format d'e-mail incorrect",Something_went_wrong:"Quelque chose s'est mal passé",Email_is_required:"L'e-mail est requis",Scan_status:"État de la numérisation",Uploading:"Téléchargement...",Processing:"Traitement...",Finishing:"Terminé...",Complete:"Terminé!",You_re_logged_in:"Vous êtes connecté",Swan_will_load_on_every_supported_page:"Swan se chargera sur chaque page prise en charge.",Happy_Shopping:"Joyeux shopping!",Email_verification_failed:"Échec de la vérification de l'e-mail",Email_Confirmed:"E-mail confirmé",Measurements_saved:"Mesures enregistrées",Login_anywhere_you_see_the_Swan_logo_to_load_your_measurements:"Connectez-vous partout où vous voyez le logo Swan pour charger vos mesures.",Check_your_email:"Vérifiez votre e-mail",Tap_on_the_verification_link_sent_to:"Appuyez sur le lien de vérification envoyé à",Email_Confirmation:"Confirmation de l'e-mail",Save_your_scan:"Enregistrez votre numérisation",Confirm_with_a_single_tap_from_your_email_inbox:"Confirmez d'une simple pression depuis votre boîte de réception e-mail.",Saving_your_scan_means_you_can_load_your_measurements_anywhere_you_see_the_Swan_logo:"Enregistrer votre numérisation signifie que vous pouvez charger vos mesures partout où vous voyez le logo Swan.",Passwordless_Just_one_tap_via_email:"Sans mot de passe. Juste une pression via e-mail.",Join_2000_shoppers:"Rejoignez plus de 2 000 acheteurs",Your_measurements_will_be_shared_only_once_your_email_is_confirmed:"Vos mesures seront partagées uniquement une fois votre e-mail confirmé.",Enter_your_email:"Entrez votre adresse e-mail",Send_confirmation_email:"Envoyer un e-mail de confirmation",No_thanks:"Non merci",We_are_sorry:"Nous sommes désolés!",Video_tips_for_scanning:"Conseils vidéo pour la numérisation",Please_make_sure_to:"Veuillez vous assurer de:",one_Complete_a_full_spin_Starting_and_finishing_with_your_feet_facing_your_phone:"1. Effectuez une rotation complète. Démarrez et terminez avec vos pieds tournés vers votre téléphone.",two_Rotate_slowly_throughout_your_spin:"2. Faites pivoter lentement tout au long de votre rotation.",three_Make_sure_your_full_body_including_feet_and_hands_are_visible_in_frame:"3. Assurez-vous que l'ensemble de votre corps (y compris les pieds et les mains) est visible dans le cadre.",Scan_s:"Visionneuse de la numérisation",vision_model:"modèle de vision",is_at_capacity:"est à pleine capacité.",We_are_sorry_about_this_We_are_working_hard_to_add_capacity_Please_try_again_soon:"Nous sommes désolés pour cela. Nous travaillons dur pour ajouter de la capacité. Veuillez réessayer bientôt.",Oops:"Oups..",Looks_like_this_QR_code_is_not_valid:"On dirait que ce code QR n'est pas valide.",Reload_your_desktop_tab_to_generate_a_new_code:"Rechargez votre onglet de bureau pour générer un nouveau code",Magic_link:"Lien magique",We_have_sent_you_a_magic_link_via_email:"Nous vous avons envoyé un lien magique par e-mail.",Please_confirm_your_email_load_your_measurements_on_any_partner_brand:"Veuillez confirmer votre e-mail pour charger vos mesures sur n'importe quelle marque partenaire.",Welcome_back:"Bienvenue de retour!",Load_my_account:"Charger mon compte",Back_to_home:"Retour à l'accueil",Enter_a_valid_email:"Entrez une adresse e-mail valide!",No_measurement_found_for_this_email:"Aucune mesure trouvée pour cet e-mail",Reset:"Réinitialiser",Resume:"Reprendre",Start_Scan:"Démarrer la numérisation",Scanning:"Numérisation",Detecting_Body:"Détection du corps...",Stop:"Arrêter",Generating_Measurements:"Génération des mesures",Help:"Aide",Scan_tips:"Conseils de numérisation",Watch_instructions_video:"Regardez la vidéo d'instructions",Wear_form_fitting_clothing_for_the_most_accurate_results:"Portez des vêtements ajustés pour des résultats plus précis",Position_yourself_in_a_brightly_lit_room:"Placez-vous dans une pièce bien éclairée",Tie_up_long_hair_and_slip_off_your_shoes:"Attachez les cheveux longs et enlevez vos chaussures",Back:"Arrière",Swan:"Swan",Please_check_your_setting_for_camera_permission:"Veuillez vérifier vos paramètres pour l'autorisation de la caméra",Settings:"Paramètres",Enable_the_camera_permissions:"Activer les autorisations de la caméra",Go_Back:"Retourner",For_helping_in_getting:"Pour aider à obtenir",Measurements_have_been_shared:"Les mesures ont été partagées !",Thank_You:"Merci !",live:"en direct.",Your:"Votre",Check_back_soon_to_use_Swan:"Revenez bientôt pour utiliser Swan",custom_for_your_next_order:"personnalisé pour votre prochaine commande",sevenTillEight:"de sept à huit",Rhodes_and_Beckett:"Rhodes et Beckett",Send_invite:"Envoyer une invitation",Your_Nest:"Votre nid",Share_your_measurements_to_shop_and_gift_for_those_close_to_you:"Partagez vos mesures pour acheter et offrir à ceux qui vous sont proches",Invite_to_Swan:"Inviter à Swan",Name:"Nom",Enter_their_name:"Entrez leur nom",Enter_their_email:"Entrez leur adresse e-mail",Message:"Message",Join_Swan:"Rejoignez Swan !",Email:"E-mail",Invite:"Inviter",Your_Login:"Votre connexion",Your_Scans:"Vos scans",Talk_with_the_CEO:"Parlez avec le PDG",Send_me_an_email:"Envoyez-moi un e-mail",At_Swan_we_are_here_to_make_shopping_about_you_I_would_love_to_hear_what_you_think_of_Swan_and_what_you_want_to_see_next_I_am_excited_to_hear_your_feedback:"Chez Swan, nous sommes là pour faire du shopping une expérience à votre image. J'aimerais savoir ce que vous pensez de Swan et ce que vous aimeriez voir ensuite. Je suis impatient de recueillir vos commentaires -",Eoin:"Eoin",You_can_close_this_tab_and_return_to_the_original_to_get_your_sizing_suggestion:"Vous pouvez fermer cet onglet et revenir à l'original pour obtenir votre suggestion de taille.",Try_On:"Essayer",Invite_friends:"Inviter des amis",Pending:"En attente",Decline:"Refuser",gifting_simple:"cadeau simple",Invite_friends_and_make:"Invitez des amis et faites",Nest_will_be_able_to_see_and_size_clothes_on_you:"Nest pourra voir et ajuster les vêtements sur vous",By_sharing_your_Swan_profile_those_in_your:"En partageant votre profil Swan, ceux de votre",Enter_your_name:"Entrez votre nom",Failed_to_get_tryon:"Échec de la récupération de l'essayage",In_Progress:"En cours",Go_back_to:"Retourner à"},ft={Custom_Scan:"Benutzerdefiniertes Scannen",Find_your_perfect_fit:"Finde deine perfekte Passform",One_time_setup_in_2_min_or_less:"Einrichtung in 2 Minuten oder weniger.",PRIVACY:"DATENSCHUTZ",Swan_encrypts_your_data_with_Ever_vault_and_ensures_your_video_is_not_seen_by_anyone:"Swan verschlüsselt deine Daten mit dem Ever-Vault und stellt sicher, dass dein Video von niemandem gesehen wird.",By_ticking_this_box_you_are_agreeing_to_our:"Durch Ankreuzen dieses Feldes stimmst du unseren",privacy_policy:" Datenschutzbestimmungen zu",Get_Measured:"Messungen erhalten",Login:"Anmelden",Where_do_you_shop:"Wo kaufst du ein?",Men_s:"Herren",Women_s:"Damen",Next:"Weiter",Preferred_language:"Bevorzugte Sprache",Hindi:"Hindi",English:"Englisch",French:"Französisch",Spanish:"Spanisch",German:"Deutsch",Italian:"Italienisch",Arabic:"Arabisch",Phone_Model:"Telefonmodell",Select_phone_brand:"Wähle die Telefonmarke...",Select_phone_model:"Wähle das Telefonmodell...",Measurement_tips:"Tipps zur Messung",Tips_for_your_scan:"Tipps für deinen Scan",Watch_this_video_to_know_how_to_scan:"Schau dir dieses Video an, um zu erfahren, wie gescannt wird",How_to_use_Swan:"So verwendest du Swan",Watch_this_short_video_to_know_how_to_use:"Schau dir dieses kurze Video an, um zu erfahren, wie du es verwendest",Shop:"Einkaufen",Skip:"Überspringen",Form_fitting_clothing:"Figurbetonte Kleidung",How_form_is_fitting_your_outfit:"Wie passt sich deine Kleidung an?",For_accurate_scan_please_wear_tight_clothing_Here_s_an_example:"Für genaue Scans bitte enge Kleidung tragen. Hier ist ein Beispiel",Scan_with_form_fitting:"Scan mit enger Passform",Scan_with_form_loose_fit:"Scan mit lockerer Passform",Turn_up_your_volume:"Erhöhe deine Lautstärke",For_smart_voice_guide:"Für intelligente Sprachführung",Place_your_phone_on_a_table_at:"Lege dein Telefon auf einen Tisch bei",a_hip_height:"Hüfthöhe",Scan:"Scannen",Height:"Höhe",Height_in_ft:"Höhe in Fuß",Height_in_inch:"Höhe in Zoll",How_tall_are_you:"Wie groß bist du?",We_are_sorry_we_currently_do_not_support_this_heights_outside_of_5_ft_and_7_ft_We_are_working_on_new_models_that_do:"Es tut uns leid, wir unterstützen derzeit keine Höhen außerhalb von 5 ft & 7 ft. Wir arbeiten an neuen Modellen, die es tun.",Confirm:"Bestätigen",To_start_your_measurement:"Um deine Messung zu starten",Scan_this_QR_code_with_your_phone:"Scanne diesen QR-Code mit deinem Telefon",You_can_continue_from_here_after_your_scan:"Du kannst nach deinem Scan hier fortsetzen",Failed_to_get_measurements:"Messungen konnten nicht abgerufen werden",No_data_found_Go_back_to:"Keine Daten gefunden. Gehe zurück zu",back:"zurück",Profile:"Profil",shopify:"Shopify",fit_view_result:"Ergebnis anzeigen",Nest:"Nest",Scan_again:"Erneut scannen",Provide_feedback:"Feedback geben",Add_to_cart:"In den Warenkorb legen",Back_to_product:"Zurück zum Produkt",Fit_Notes:"Passform-Notizen",Fitted:"Anliegend",Ideal_fit:"Ideale Passform",Relaxed:"Locker",Wrong_email_format:"Falsches E-Mail-Format",Something_went_wrong:"Etwas ist schiefgelaufen",Email_is_required:"E-Mail ist erforderlich",Scan_status:"Scan-Status",Uploading:"Hochladen...",Processing:"Verarbeitung...",Finishing:"Fertigstellung...",Complete:"Fertig!",You_re_logged_in:"Du bist angemeldet",Swan_will_load_on_every_supported_page:"Swan wird auf jeder unterstützten Seite geladen.",Happy_Shopping:"Viel Spaß beim Einkaufen!",Email_verification_failed:"E-Mail-Verifizierung fehlgeschlagen",Email_Confirmed:"E-Mail bestätigt",Measurements_saved:"Messungen gespeichert",Login_anywhere_you_see_the_Swan_logo_to_load_your_measurements:"Melden Sie sich überall dort an, wo Sie das Swan-Logo sehen, um Ihre Messungen zu laden.",Check_your_email:"Überprüfe deine E-Mail",Tap_on_the_verification_link_sent_to:"Tippe auf den Verifizierungslink, der gesendet wurde an",Email_Confirmation:"E-Mail-Bestätigung",Save_your_scan:"Speichere deinen Scan",Confirm_with_a_single_tap_from_your_email_inbox:"Bestätige mit einem einzigen Tippen aus deinem E-Mail-Postfach.",Saving_your_scan_means_you_can_load_your_measurements_anywhere_you_see_the_Swan_logo:"Das Speichern deines Scans bedeutet, dass du deine Messungen überall laden kannst, wo du das Swan-Logo siehst.",Passwordless_Just_one_tap_via_email:"Ohne Passwort. Nur ein Fingertipp über E-Mail.",Join_2000_shoppers:"Schließe dich über 2.000 Käufern an",Your_measurements_will_be_shared_only_once_your_email_is_confirmed:"Deine Messungen werden nur geteilt, wenn deine E-Mail bestätigt ist.",Enter_your_email:"Gib deine E-Mail ein",Send_confirmation_email:"Bestätigungs-E-Mail senden",No_thanks:"Nein, danke",We_are_sorry:"Es tut uns leid!",Video_tips_for_scanning:"Videotipps zum Scannen",Please_make_sure_to:"Bitte vergewissere dich:",one_Complete_a_full_spin_Starting_and_finishing_with_your_feet_facing_your_phone:"1. Mach eine vollständige Drehung. Beginnend und endend mit deinen Füßen vor deinem Telefon.",two_Rotate_slowly_throughout_your_spin:"2. Drehe dich langsam während deiner Drehung.",three_Make_sure_your_full_body_including_feet_and_hands_are_visible_in_frame:"3. Stelle sicher, dass dein ganzer Körper (einschließlich Füße und Hände) im Bild sichtbar ist.",Scan_s:"Scan's",vision_model:"Vision-Modell",is_at_capacity:"ist ausgelastet.",We_are_sorry_about_this_We_are_working_hard_to_add_capacity_Please_try_again_soon:"Es tut uns leid dafür. Wir arbeiten hart daran, Kapazitäten hinzuzufügen. Bitte versuche es bald erneut.",Oops:"Hoppla..",Looks_like_this_QR_code_is_not_valid:"Sieht so aus, als wäre dieser QR-Code ungültig.",Reload_your_desktop_tab_to_generate_a_new_code:"Aktualisiere deinen Desktop-Tab, um einen neuen Code zu generieren",Magic_link:"Magischer Link",We_have_sent_you_a_magic_link_via_email:"Wir haben dir einen magischen Link per E-Mail geschickt.",Please_confirm_your_email_load_your_measurements_on_any_partner_brand:"Bitte bestätige deine E-Mail, um deine Messungen auf jeder Partnermarke zu laden.",Welcome_back:"Willkommen zurück!",Load_my_account:"Meinen Account laden",Back_to_home:"Zurück zur Startseite",Enter_a_valid_email:"Gib eine gültige E-Mail ein!",No_measurement_found_for_this_email:"Keine Messungen für diese E-Mail gefunden",Reset:"Zurücksetzen",Resume:"Fortsetzen",Start_Scan:"Scan starten",Scanning:"Scannen",Detecting_Body:"Körpererkennung...",Stop:"Stopp",Generating_Measurements:"Messungen generieren",Help:"Hilfe",Scan_tips:"Conseils de numérisation",Watch_instructions_video:"Regardez la vidéo d'instructions",Wear_form_fitting_clothing_for_the_most_accurate_results:"Portez des vêtements ajustés pour des résultats plus précis",Position_yourself_in_a_brightly_lit_room:"Placez-vous dans une pièce bien éclairée",Tie_up_long_hair_and_slip_off_your_shoes:"Attachez les cheveux longs et enlevez vos chaussures",Back:"Zurück",Swan:"Swan",Please_check_your_setting_for_camera_permission:"Bitte überprüfen Sie Ihre Einstellungen für die Kameraberechtigung",Settings:"Einstellungen",Enable_the_camera_permissions:"Aktivieren Sie die Kameraberechtigungen",Go_Back:"Zurück gehen",For_helping_in_getting:"Um bei der Beschaffung zu helfen",Measurements_have_been_shared:"Maße wurden geteilt!",Thank_You:"Danke!",live:"live.",Your:"Dein",Check_back_soon_to_use_Swan:"Schau bald wieder vorbei, um Swan zu verwenden",custom_for_your_next_order:"individuell für deine nächste Bestellung",sevenTillEight:"sieben bis acht",Rhodes_and_Beckett:"Rhodes und Beckett",Send_invite:"Einladung senden",Your_Nest:"Dein Nest",Share_your_measurements_to_shop_and_gift_for_those_close_to_you:"Teile deine Maße, um für diejenigen in deiner Nähe einzukaufen und zu schenken",Invite_to_Swan:"Zu Swan einladen",Name:"Name",Enter_their_name:"Gib ihren Namen ein",Enter_their_email:"Gib ihre E-Mail-Adresse ein",Message:"Nachricht",Join_Swan:"Trete Swan bei!",Email:"E-Mail",Invite:"Einladen",Your_Login:"Dein Login",Your_Scans:"Deine Scans",Talk_with_the_CEO:"Sprich mit dem CEO",Send_me_an_email:"Schick mir eine E-Mail",At_Swan_we_are_here_to_make_shopping_about_you_I_would_love_to_hear_what_you_think_of_Swan_and_what_you_want_to_see_next_I_am_excited_to_hear_your_feedback:"Bei Swan geht es darum, das Einkaufen für dich zu gestalten. Ich würde gerne hören, was du von Swan hältst und was du als nächstes sehen möchtest. Ich freue mich auf dein Feedback -",Eoin:"Eoin",You_can_close_this_tab_and_return_to_the_original_to_get_your_sizing_suggestion:"Sie können diesen Tab schließen und zum Original zurückkehren, um Ihre Größenempfehlung zu erhalten.",Try_On:"Anprobieren",Invite_friends:"Freunde einladen",Pending:"Ausstehend",Decline:"Ablehnen",gifting_simple:"einfaches Verschenken",Invite_friends_and_make:"Freunde einladen & machen",Nest_will_be_able_to_see_and_size_clothes_on_you:"Nest wird in der Lage sein, Kleidung an dir zu sehen und zu vermessen",By_sharing_your_Swan_profile_those_in_your:"Indem du dein Swan-Profil teilst, können diejenigen in deinem",Enter_your_name:"Geben Sie Ihren Namen ein",Failed_to_get_tryon:"Fehler beim Abrufen des Anprobens",In_Progress:"In Bearbeitung",Go_back_to:"Zurück gehen zu"},mt={Custom_Scan:"Escanéo personalizado",Find_your_perfect_fit:"Encuentra tu ajuste perfecto",One_time_setup_in_2_min_or_less:"Configuración única en 2 minutos o menos.",PRIVACY:"PRIVACIDAD",Swan_encrypts_your_data_with_Ever_vault_and_ensures_your_video_is_not_seen_by_anyone:"Swan cifra tus datos con Ever vault y asegura que tu video no sea visto por nadie.",By_ticking_this_box_you_are_agreeing_to_our:"Al marcar esta casilla, aceptas nuestro",privacy_policy:" política de privacidad",Get_Measured:"Obtén tus medidas",Login:"Iniciar sesión",Where_do_you_shop:"¿Dónde compras?",Men_s:"Hombre",Women_s:"Mujer",Next:"Siguiente",Preferred_language:"Idioma preferido",Hindi:"Hindi",English:"Inglés",French:"Francés",Spanish:"Español",German:"Alemán",Italian:"Italiano",Arabic:"Árabe",Phone_Model:"Modelo de teléfono",Select_phone_brand:"Selecciona la marca de tu teléfono...",Select_phone_model:"Selecciona el modelo de tu teléfono...",Measurement_tips:"Consejos de medición",Tips_for_your_scan:"Consejos para tu escaneo",Watch_this_video_to_know_how_to_scan:"Mira este video para saber cómo escanear",How_to_use_Swan:"Cómo usar Swan",Watch_this_short_video_to_know_how_to_use:" Mira este video corto para saber cómo usar",Shop:"Comprar",Skip:"Saltar",Form_fitting_clothing:"Ropa ajustada",How_form_is_fitting_your_outfit:"¿Cómo se ajusta tu ropa?",For_accurate_scan_please_wear_tight_clothing_Here_s_an_example:"Para un escaneo preciso, por favor usa ropa ajustada. Aquí tienes un ejemplo",Scan_with_form_fitting:"Escanear con ajuste",Scan_with_form_loose_fit:"Escanear con ajuste holgado",Turn_up_your_volume:"Sube el volumen",For_smart_voice_guide:"Para una guía de voz inteligente",Place_your_phone_on_a_table_at:"Coloca tu teléfono en una mesa a",a_hip_height:"la altura de la cadera",Scan:"Escanear",Height:"Altura",Height_in_ft:"Altura en pies",Height_in_inch:"Altura en pulgadas",How_tall_are_you:"¿Cuánto mides?",We_are_sorry_we_currently_do_not_support_this_heights_outside_of_5_ft_and_7_ft_We_are_working_on_new_models_that_do:"Lo sentimos, actualmente no admitimos alturas fuera de 5 pies y 7 pies. Estamos trabajando en nuevos modelos que lo harán.",Confirm:"Confirmar",To_start_your_measurement:"Para comenzar tu medición",Scan_this_QR_code_with_your_phone:"Escanea este código QR con tu teléfono",You_can_continue_from_here_after_your_scan:"Puedes continuar desde aquí después de tu escaneo",Failed_to_get_measurements:"No se pudieron obtener las medidas",No_data_found_Go_back_to:"No se encontraron datos. Vuelve a",back:"atrás",Profile:"Perfil",shopify:"shopify",fit_view_result:"ver resultados de ajuste",Nest:"Nido",Scan_again:"Escanear de nuevo",Provide_feedback:"Proporcionar retroalimentación",Add_to_cart:"Agregar al carrito",Back_to_product:"Volver al producto",Fit_Notes:"Notas de ajuste",Fitted:"Ajustado",Ideal_fit:"Ajuste ideal",Relaxed:"Relajado",Wrong_email_format:"Formato de correo electrónico incorrecto",Something_went_wrong:"Algo salió mal",Email_is_required:"Se requiere correo electrónico",Scan_status:"Estado del escaneo",Uploading:"Cargando...",Processing:"Procesando...",Finishing:"Terminando...",Complete:"¡Completo!",You_re_logged_in:"Has iniciado sesión",Swan_will_load_on_every_supported_page:"Swan se cargará en cada página admitida.",Happy_Shopping:"¡Felices compras!",Email_verification_failed:"Fallo en la verificación del correo electrónico",Email_Confirmed:"Correo electrónico confirmado",Measurements_saved:"Medidas guardadas",Login_anywhere_you_see_the_Swan_logo_to_load_your_measurements:"Inicie sesión en cualquier lugar donde vea el logotipo de Swan para cargar sus medidas.",Check_your_email:"Revisa tu correo electrónico",Tap_on_the_verification_link_sent_to:"Toca el enlace de verificación enviado a",Email_Confirmation:"Confirmación de correo electrónico",Save_your_scan:"Guarda tu escaneo",Confirm_with_a_single_tap_from_your_email_inbox:"Confirma con un toque desde tu bandeja de entrada de correo electrónico.",Saving_your_scan_means_you_can_load_your_measurements_anywhere_you_see_the_Swan_logo:"Guardar tu escaneo significa que puedes cargar tus medidas en cualquier lugar donde veas el logo de Swan.",Passwordless_Just_one_tap_via_email:"Sin contraseña. Solo un toque a través del correo electrónico.",Join_2000_shoppers:"Únete a más de 2,000 compradores",Your_measurements_will_be_shared_only_once_your_email_is_confirmed:"Tus medidas se compartirán solo después de que se confirme tu correo electrónico.",Enter_your_email:"Ingresa tu correo electrónico",Send_confirmation_email:"Enviar correo de confirmación",No_thanks:"No, gracias",We_are_sorry:"¡Lo sentimos!",Video_tips_for_scanning:"Consejos en video para el escaneo",Please_make_sure_to:"Asegúrate de:",one_Complete_a_full_spin_Starting_and_finishing_with_your_feet_facing_your_phone:"1. Da una vuelta completa. Comenzando y terminando con los pies mirando hacia tu teléfono.",two_Rotate_slowly_throughout_your_spin:"2. Gira lentamente durante todo tu giro.",three_Make_sure_your_full_body_including_feet_and_hands_are_visible_in_frame:"3. Asegúrate de que todo tu cuerpo (incluyendo pies y manos) sea visible en el encuadre.",Scan_s:"La visión de la numérisation",vision_model:"modelo de visión",is_at_capacity:"está a plena capacidad.",We_are_sorry_about_this_We_are_working_hard_to_add_capacity_Please_try_again_soon:"Lo sentimos por esto. Estamos trabajando duro para agregar capacidad. Por favor, inténtalo de nuevo pronto.",Oops:"¡Vaya!",Looks_like_this_QR_code_is_not_valid:"Parece que este código QR no es válido.",Reload_your_desktop_tab_to_generate_a_new_code:"Recarga tu pestaña de escritorio para generar un nuevo código",Magic_link:"Enlace mágico",We_have_sent_you_a_magic_link_via_email:"Te hemos enviado un enlace mágico por correo electrónico.",Please_confirm_your_email_load_your_measurements_on_any_partner_brand:"Confirma tu correo electrónico para cargar tus medidas en cualquier marca asociada.",Welcome_back:"¡Bienvenido de nuevo!",Load_my_account:"Cargar mi cuenta",Back_to_home:"Volver a inicio",Enter_a_valid_email:"Ingresa un correo electrónico válido.",No_measurement_found_for_this_email:"No se encontraron medidas para este correo electrónico",Reset:"Restablecer",Resume:"Reanudar",Start_Scan:"Iniciar escaneo",Scanning:"Escaneando",Detecting_Body:"Detectando el cuerpo...",Stop:"Detener",Generating_Measurements:"Generando medidas",Help:"Ayuda",Scan_tips:"Consejos para el escaneo",Watch_instructions_video:"Ver video de instrucciones",Wear_form_fitting_clothing_for_the_most_accurate_results:"Use ropa ajustada para obtener resultados más precisos",Position_yourself_in_a_brightly_lit_room:"Colóquese en una habitación bien iluminada",Tie_up_long_hair_and_slip_off_your_shoes:"Recoge el pelo largo y quítate los zapatos",Back:"Atrás",Swan:"Swan",Please_check_your_setting_for_camera_permission:"Por favor, verifique su configuración para el permiso de la cámara",Settings:"Configuración",Enable_the_camera_permissions:"Habilitar los permisos de la cámara",Go_Back:"Volver",For_helping_in_getting:"Para ayudar en la obtención",Measurements_have_been_shared:"¡Las medidas se han compartido!",Thank_You:"¡Gracias!",live:"en vivo.",Your:"Tu",Check_back_soon_to_use_Swan:"Vuelve pronto para usar Swan",custom_for_your_next_order:"personalizado para tu próximo pedido",sevenTillEight:"de siete a ocho",Rhodes_and_Beckett:"Rhodes y Beckett",Send_invite:"Enviar invitación",Your_Nest:"Tu Nido",Share_your_measurements_to_shop_and_gift_for_those_close_to_you:"Comparte tus medidas para comprar y regalar a quienes están cerca de ti",Invite_to_Swan:"Invitar a Swan",Name:"Nombre",Enter_their_name:"Ingresa su nombre",Enter_their_email:"Ingresa su correo electrónico",Message:"Mensaje",Join_Swan:"¡Únete a Swan!",Email:"Correo electrónico",Invite:"Invitar",Your_Login:"Tu inicio de sesión",Your_Scans:"Tus escaneos",Talk_with_the_CEO:"Habla con el CEO",Send_me_an_email:"Envíame un correo electrónico",At_Swan_we_are_here_to_make_shopping_about_you_I_would_love_to_hear_what_you_think_of_Swan_and_what_you_want_to_see_next_I_am_excited_to_hear_your_feedback:"En Swan estamos aquí para que las compras sean para ti. Me encantaría saber qué piensas de Swan y qué te gustaría ver a continuación. Estoy emocionado de conocer tus comentarios -",Eoin:"Eoin",You_can_close_this_tab_and_return_to_the_original_to_get_your_sizing_suggestion:"Puedes cerrar esta pestaña y volver al original para obtener tu sugerencia de talla.",Try_On:"Probar",Invite_friends:"Invitar amigos",Pending:"Pendiente",Decline:"Declinar",gifting_simple:"regalando simple",Invite_friends_and_make:"Invita a amigos y haz",Nest_will_be_able_to_see_and_size_clothes_on_you:"Nest will be able to see & size clothes on you",By_sharing_your_Swan_profile_those_in_your:"Al compartir tu perfil de Swan, aquellos en tu",Enter_your_name:"Ingrese su nombre",Failed_to_get_tryon:"Error al obtener la prueba",In_Progress:"En progreso",Go_back_to:"Volver a"},gt={Custom_Scan:"مسح مخصص",Find_your_perfect_fit:"ابحث عن مقاسك المثالي",One_time_setup_in_2_min_or_less:"إعداد مرة واحدة في 2 دقيقة أو أقل",PRIVACY:"الخصوصية",Swan_encrypts_your_data_with_Ever_vault_and_ensures_your_video_is_not_seen_by_anyone:"تقوم سوان بتشفير بياناتك باستخدام فولت إيفر وتضمن عدم رؤية فيديوك من قبل أي شخص.",By_ticking_this_box_you_are_agreeing_to_our:"من خلال وضع علامة في هذا المربع، أنت توافق على",privacy_policy:"سياسة الخصوصية",Get_Measured:"احصل على قياسك",Login:"تسجيل الدخول",Where_do_you_shop:"أين تتسوق؟",Men_s:"رجالي",Women_s:"نسائي",Next:"التالي",Preferred_language:"اللغة المفضلة",Hindi:"هندي",English:"إنجليزي",French:"فرنسي",Spanish:"إسباني",German:"ألماني",Italian:"إيطالي",Arabic:"عربي",Phone_Model:"نموذج الهاتف",Select_phone_brand:"اختر ماركة الهاتف...",Select_phone_model:"اختر نموذج الهاتف...",Measurement_tips:"نصائح القياس",Tips_for_your_scan:"نصائح لفحصك",Watch_this_video_to_know_how_to_scan:"شاهد هذا الفيديو لمعرفة كيفية الفحص",How_to_use_Swan:"كيفية استخدام سوان",Watch_this_short_video_to_know_how_to_use:" شاهد هذا الفيديو القصير لمعرفة كيفية الاستخدام",Shop:"تسوق",Skip:"تخطى",Form_fitting_clothing:"ملابس ملتصقة",How_form_is_fitting_your_outfit:"كيف يتناسب الزي الخاص بك؟",For_accurate_scan_please_wear_tight_clothing_Here_s_an_example:"للحصول على فحص دقيق، يرجى ارتداء ملابس ضيقة، إليك مثال",Scan_with_form_fitting:"مسح بملابس ملتصقة",Scan_with_form_loose_fit:"مسح بملابس فضفاضة",Turn_up_your_volume:"قم برفع مستوى الصوت الخاص بك",For_smart_voice_guide:"للدليل الصوتي الذكي",Place_your_phone_on_a_table_at:"ضع هاتفك على طاولة في",a_hip_height:"ارتفاع الورك",Scan:"مسح",Height:"الطول",Height_in_ft:"الطول في القدم",Height_in_inch:"الطول بالإنش",How_tall_are_you:"كم هو طولك؟",We_are_sorry_we_currently_do_not_support_this_heights_outside_of_5_ft_and_7_ft_We_are_working_on_new_models_that_do:"نعتذر، نحن لا ندعم حاليًا هذه الأطوال خارج 5 قدم و 7 قدم. نحن نعمل على نماذج جديدة تدعم ذلك.",Confirm:"تأكيد",To_start_your_measurement:"لبدء القياس الخاص بك",Scan_this_QR_code_with_your_phone:"امسح هذا الرمز QR باستخدام هاتفك",You_can_continue_from_here_after_your_scan:"يمكنك الاستمرار من هنا بعد الفحص",Failed_to_get_measurements:"فشل في الحصول على القياسات",No_data_found_Go_back_to:"لم يتم العثور على بيانات، ارجع إلى",back:"الخلف",Profile:"الملف الشخصي",shopify:"شوبيفاي",fit_view_result:"نتيجة عرض الملاءمة",Nest:"عش",Scan_again:"إعادة المسح",Provide_feedback:"تقديم ملاحظات",Add_to_cart:"أضف إلى السلة",Back_to_product:"العودة إلى المنتج",Fit_Notes:"ملاحظات الملاءمة",Fitted:"ملتصق",Ideal_fit:"ملاءمة مثالية",Relaxed:"فضفاض",Wrong_email_format:"تنسيق البريد الإلكتروني خاطئ",Something_went_wrong:"حدث خطأ ما",Email_is_required:"البريد الإلكتروني مطلوب",Scan_status:"حالة المسح",Uploading:"جاري التحميل...",Processing:"جاري المعالجة...",Finishing:"جاري الانتهاء...",Complete:"اكتمل!",You_re_logged_in:"لقد سجلت الدخول",Swan_will_load_on_every_supported_page:"سوان سيتم تحميله على كل صفحة مدعومة.",Happy_Shopping:"تسوق سعيد!",Email_verification_failed:"فشل التحقق من البريد الإلكتروني",Email_Confirmed:"تم تأكيد البريد الإلكتروني",Measurements_saved:"تم حفظ القياسات",Login_anywhere_you_see_the_Swan_logo_to_load_your_measurements:"قم بتسجيل الدخول في أي مكان ترى فيه شعار سوان لتحميل قياساتك.",Check_your_email:"تحقق من بريدك الإلكتروني",Tap_on_the_verification_link_sent_to:"اضغط على رابط التحقق المرسل إلى",Email_Confirmation:"تأكيد البريد الإلكتروني",Save_your_scan:"احفظ مسحتك",Confirm_with_a_single_tap_from_your_email_inbox:"قم بتأكيد بنقرة واحدة من صندوق الوارد الخاص ببريدك الإلكتروني.",Saving_your_scan_means_you_can_load_your_measurements_anywhere_you_see_the_Swan_logo:"حفظ مسحتك يعني أنه يمكنك تحميل قياساتك في أي مكان ترى فيه شعار سوان.",Passwordless_Just_one_tap_via_email:"بدون كلمة مرور. فقط نقرة واحدة عبر البريد الإلكتروني.",Join_2000_shoppers:"انضم إلى أكثر من 2,000 متسوق",Your_measurements_will_be_shared_only_once_your_email_is_confirmed:"سيتم مشاركة قياساتك فقط بمجرد تأكيد بريدك الإلكتروني.",Enter_your_email:"أدخل بريدك الإلكتروني",Send_confirmation_email:"إرسال بريد تأكيد",No_thanks:"لا، شكرًا",We_are_sorry:"نحن آسفون!",Video_tips_for_scanning:"نصائح الفيديو لعملية المسح",Please_make_sure_to:"يرجى التأكد من:",one_Complete_a_full_spin_Starting_and_finishing_with_your_feet_facing_your_phone:"1. إكمال دورة كاملة. ابدأ وانهي بقدميك متجهة نحو هاتفك.",two_Rotate_slowly_throughout_your_spin:"2. قم بالدوران ببطء طوال فترة الدوران.",three_Make_sure_your_full_body_including_feet_and_hands_are_visible_in_frame:"3. تأكد من أن جسمك بأكمله (بما في ذلك قدميك ويديك) ظاهر في الإطار.",Scan_s:"فحص",vision_model:"نموذج الرؤية",is_at_capacity:"في طاقته القصوى.",We_are_sorry_about_this_We_are_working_hard_to_add_capacity_Please_try_again_soon:"نعتذر عن ذلك. نعمل بجد لزيادة الطاقة. يرجى المحاولة مرة أخرى قريبًا.",Oops:"عذرًا..",Looks_like_this_QR_code_is_not_valid:"يبدو أن رمز الاستجابة السريعة هذا غير صالح.",Reload_your_desktop_tab_to_generate_a_new_code:"أعد تحميل علامة التبويب على سطح المكتب الخاص بك لإنشاء رمز جديد",Magic_link:"رابط سحري",We_have_sent_you_a_magic_link_via_email:"لقد أرسلنا لك رابطًا سحريًا عبر البريد الإلكتروني.",Please_confirm_your_email_load_your_measurements_on_any_partner_brand:"يرجى تأكيد بريدك الإلكتروني لتحميل قياساتك على أي علامة تجارية شريكة.",Welcome_back:"مرحبًا مرة أخرى!",Load_my_account:"تحميل حسابي",Back_to_home:"العودة إلى الصفحة الرئيسية",Enter_a_valid_email:"أدخل بريدًا إلكترونيًا صالحًا!",No_measurement_found_for_this_email:"لم يتم العثور على قياسات لهذا البريد الإلكتروني",Reset:"إعادة تعيين",Resume:"استئناف",Start_Scan:"بدء المسح",Scanning:"جاري المسح",Detecting_Body:"الكشف عن الجسم...",Stop:"إيقاف",Generating_Measurements:"إنشاء القياسات",Help:"مساعدة",Scan_tips:"نصائح المسح",Watch_instructions_video:"شاهد فيديو التعليمات",Wear_form_fitting_clothing_for_the_most_accurate_results:"ارتدِ ملابس مصممة لتناسب الجسم للحصول على أكثر النتائج دقةً",Position_yourself_in_a_brightly_lit_room:"وضع نفسك في غرفة مضاءة بشكل جيد",Tie_up_long_hair_and_slip_off_your_shoes:"ربط الشعر الطويل وخلع الأحذية",Back:"الخلف",Swan:"سوان",Please_check_your_setting_for_camera_permission:"يرجى التحقق من إعداداتك لأذونات الكاميرا",Settings:"الإعدادات",Enable_the_camera_permissions:"تمكين أذونات الكاميرا",Go_Back:"عد",For_helping_in_getting:"للمساعدة في الحصول على",Measurements_have_been_shared:"تم مشاركة القياسات!",Thank_You:"شكرا لك!",live:"مباشر.",Your:"لك",Check_back_soon_to_use_Swan:"تحقق قريبًا لاستخدام سوان",custom_for_your_next_order:"مخصص لطلبك التالي",sevenTillEight:"من السابعة حتى الثامنة",Rhodes_and_Beckett:"روڈز اینڈ بیکٹ",Send_invite:"إرسال دعوة",Your_Nest:"عشك",Share_your_measurements_to_shop_and_gift_for_those_close_to_you:"شارك قياساتك للتسوق والهدايا لأولئك القريبين منك",Invite_to_Swan:"دعوة لسوان",Name:"الاسم",Enter_their_name:"أدخل اسمهم",Enter_their_email:"أدخل بريدهم الإلكتروني",Message:"رسالة",Join_Swan:"انضم إلى سوان!",Email:"البريد الإلكتروني",Invite:"دعوة",Your_Login:"تسجيل الدخول الخاص بك",Your_Scans:"مسحاتك",Talk_with_the_CEO:"التحدث مع الرئيس التنفيذي",Send_me_an_email:"أرسل لي بريدًا إلكترونيًا",At_Swan_we_are_here_to_make_shopping_about_you_I_would_love_to_hear_what_you_think_of_Swan_and_what_you_want_to_see_next_I_am_excited_to_hear_your_feedback:"نحن هنا في سوان لجعل التسوق حولك. أحب أن أسمع رأيك في سوان وما الذي ترغب في رؤيته بعد. أنا متحمس لسماع ملاحظاتك -",Eoin:"إيوين",You_can_close_this_tab_and_return_to_the_original_to_get_your_sizing_suggestion:"يمكنك إغلاق هذه العلامة التبويب والعودة إلى الأصل للحصول على اقتراح حجمك.",Try_On:"جرب",Invite_friends:"ادعو أصدقاء",Pending:"قيد الانتظار",Decline:"رفض",gifting_simple:"الهدايا بسيطة",Invite_friends_and_make:"ادعو الأصدقاء وقم",Nest_will_be_able_to_see_and_size_clothes_on_you:"ستتمكن Nest من رؤية الملابس عليك وتحديد المقاس",By_sharing_your_Swan_profile_those_in_your:"من خلال مشاركة ملفك الشخصي في Swan، سيتمكن الأشخاص في",Enter_your_name:"أدخل اسمك",Failed_to_get_tryon:"فشل في الحصول على تجربة الملابس",In_Progress:"قيد التنفيذ",Go_back_to:"العودة إلى"},yt={Custom_Scan:"Scansione personalizzata",Find_your_perfect_fit:"Trova la tua vestibilità perfetta",One_time_setup_in_2_min_or_less:"Configurazione in un'unica occasione in 2 minuti o meno.",PRIVACY:"PRIVACY",Swan_encrypts_your_data_with_Ever_vault_and_ensures_your_video_is_not_seen_by_anyone:"Swan cripta i tuoi dati con Ever vault e garantisce che il tuo video non sia visto da nessuno.",By_ticking_this_box_you_are_agreeing_to_our:"Spuntando questa casella, accetti la nostra",privacy_policy:" politica sulla privacy",Get_Measured:"Ottieni le misurazioni",Login:"Accedi",Where_do_you_shop:"Dove fai acquisti?",Men_s:"Uomo",Women_s:"Donna",Next:"Avanti",Preferred_language:"Lingua preferita",Hindi:"Hindi",English:"Inglese",French:"Francese",Spanish:"Spagnolo",German:"Tedesco",Italian:"Italiano",Arabic:"Arabo",Phone_Model:"Modello di telefono",Select_phone_brand:"Seleziona la marca del telefono...",Select_phone_model:"Seleziona il modello del telefono...",Measurement_tips:"Consigli per le misurazioni",Tips_for_your_scan:"Suggerimenti per la scansione",Watch_this_video_to_know_how_to_scan:"Guarda questo video per sapere come fare la scansione",How_to_use_Swan:"Come utilizzare Swan",Watch_this_short_video_to_know_how_to_use:"Guarda questo breve video per sapere come usarlo",Shop:"Acquista",Skip:"Salta",Form_fitting_clothing:"Abbigliamento aderente",How_form_is_fitting_your_outfit:"Come si adatta la tua forma all'abbigliamento?",For_accurate_scan_please_wear_tight_clothing_Here_s_an_example:"Per una scansione accurata, indossa abiti aderenti. Ecco un esempio",Scan_with_form_fitting:"Scansione con vestibilità aderente",Scan_with_form_loose_fit:"Scansione con vestibilità morbida",Turn_up_your_volume:"Alza il volume",For_smart_voice_guide:"Per una guida vocale intelligente",Place_your_phone_on_a_table_at:"Posiziona il tuo telefono su un tavolo a",a_hip_height:"altezza dell'anca",Scan:"Scansione",Height:"Altezza",Height_in_ft:"Altezza in piedi",Height_in_inch:"Altezza in pollici",How_tall_are_you:"Quanto sei alto?",We_are_sorry_we_currently_do_not_support_this_heights_outside_of_5_ft_and_7_ft_We_are_working_on_new_models_that_do:"Ci dispiace, attualmente non supportiamo queste altezze al di fuori di 5 ft e 7 ft. Stiamo lavorando su nuovi modelli che lo faranno.",Confirm:"Conferma",To_start_your_measurement:"Per iniziare la tua misurazione",Scan_this_QR_code_with_your_phone:"Scansiona questo codice QR con il tuo telefono",You_can_continue_from_here_after_your_scan:"Puoi continuare da qui dopo la scansione",Failed_to_get_measurements:"Impossibile ottenere le misurazioni",No_data_found_Go_back_to:"Nessun dato trovato. Torna a",back:"indietro",Profile:"Profilo",shopify:"shopify",fit_view_result:"Visualizza risultato aderente",Nest:"Nido",Scan_again:"Scansiona di nuovo",Provide_feedback:"Fornisci un feedback",Add_to_cart:"Aggiungi al carrello",Back_to_product:"Torna al prodotto",Fit_Notes:"Note sulla vestibilità",Fitted:"Aderente",Ideal_fit:"Vestibilità ideale",Relaxed:"Rilassato",Wrong_email_format:"Formato email errato",Something_went_wrong:"Qualcosa è andato storto",Email_is_required:"L'indirizzo email è obbligatorio",Scan_status:"Stato della scansione",Uploading:"Caricamento...",Processing:"Elaborazione...",Finishing:"Completamento...",Complete:"Completo!",You_re_logged_in:"Sei connesso",Swan_will_load_on_every_supported_page:"Swan si caricherà su ogni pagina supportata.",Happy_Shopping:"Buono shopping!",Email_verification_failed:"Verifica dell'email non riuscita",Email_Confirmed:"Email confermata",Measurements_saved:"Misure salvate",Login_anywhere_you_see_the_Swan_logo_to_load_your_measurements:"Accedi ovunque vedi il logo del Cigno per caricare le tue misurazioni.",Check_your_email:"Controlla la tua email",Tap_on_the_verification_link_sent_to:"Tocca il link di verifica inviato a",Email_Confirmation:"Conferma dell'email",Save_your_scan:"Salva la tua scansione",Confirm_with_a_single_tap_from_your_email_inbox:"Conferma con un singolo tocco dalla tua casella di posta elettronica.",Saving_your_scan_means_you_can_load_your_measurements_anywhere_you_see_the_Swan_logo:"Salvare la tua scansione significa che puoi caricare le tue misurazioni ovunque tu veda il logo di Swan.",Passwordless_Just_one_tap_via_email:"Senza password. Basta un tocco tramite email.",Join_2000_shoppers:"Unisciti a oltre 2.000 acquirenti",Your_measurements_will_be_shared_only_once_your_email_is_confirmed:"Le tue misurazioni saranno condivise solo dopo la conferma della tua email.",Enter_your_email:"Inserisci la tua email",Send_confirmation_email:"Invia email di conferma",No_thanks:"No, grazie",We_are_sorry:"Ci dispiace!",Video_tips_for_scanning:"Consigli video per la scansione",Please_make_sure_to:"Assicurati di:",one_Complete_a_full_spin_Starting_and_finishing_with_your_feet_facing_your_phone:"1. Completa una rotazione completa. Inizia e finisci con i piedi rivolti verso il tuo telefono.",two_Rotate_slowly_throughout_your_spin:"2. Ruota lentamente durante la tua rotazione.",three_Make_sure_your_full_body_including_feet_and_hands_are_visible_in_frame:"3. Assicurati che tutto il tuo corpo (compresi piedi e mani) sia visibile nel fotogramma.",Scan_s:"Scansione",vision_model:"modello di visione",is_at_capacity:"è a capacità massima.",We_are_sorry_about_this_We_are_working_hard_to_add_capacity_Please_try_again_soon:"Ci dispiace per questo. Stiamo lavorando duramente per aumentare la capacità. Riprova presto.",Oops:"Ops...",Looks_like_this_QR_code_is_not_valid:"Sembra che questo codice QR non sia valido.",Reload_your_desktop_tab_to_generate_a_new_code:"Ricarica la scheda del desktop per generare un nuovo codice",Magic_link:"Collegamento magico",We_have_sent_you_a_magic_link_via_email:"Ti abbiamo inviato un collegamento magico via email.",Please_confirm_your_email_load_your_measurements_on_any_partner_brand:"Conferma la tua email per caricare le tue misurazioni su qualsiasi marchio partner.",Welcome_back:"Bentornato!",Load_my_account:"Carica il mio account",Back_to_home:"Torna alla homepage",Enter_a_valid_email:"Inserisci un indirizzo email valido!",No_measurement_found_for_this_email:"Nessuna misurazione trovata per questa email",Reset:"Reset",Resume:"Riprendi",Start_Scan:"Avvia scansione",Scanning:"Scansione",Detecting_Body:"Rilevamento corpo...",Stop:"Stop",Generating_Measurements:"Generazione misurazioni",Help:"Aiuto",Scan_tips:"Suggerimenti per la scansione",Watch_instructions_video:"Guarda il video di istruzioni",Wear_form_fitting_clothing_for_the_most_accurate_results:"Indossa abiti aderenti per risultati più accurati",Position_yourself_in_a_brightly_lit_room:"Posizionati in una stanza ben illuminata",Tie_up_long_hair_and_slip_off_your_shoes:"Raccogli i capelli lunghi e togli le scarpe",Back:"Indietro",Swan:"Swan",Please_check_your_setting_for_camera_permission:"Si prega di verificare le impostazioni dell'autorizzazione della fotocamera",Settings:"Impostazioni",Enable_the_camera_permissions:"Abilita le autorizzazioni della fotocamera",Go_Back:"Torna indietro",For_helping_in_getting:"Per aiutare a ottenere",Measurements_have_been_shared:"Le misurazioni sono state condivise!",Thank_You:"Grazie!",live:"dal vivo.",Your:"Il tuo",Check_back_soon_to_use_Swan:"Torna presto per utilizzare Swan",custom_for_your_next_order:"personalizzato per il tuo prossimo ordine",sevenTillEight:"sette fino alle otto",Rhodes_and_Beckett:"Rhodes e Beckett",Send_invite:"Invia invito",Your_Nest:"Il tuo Nido",Share_your_measurements_to_shop_and_gift_for_those_close_to_you:"Condividi le tue misurazioni per fare acquisti e regalare a chi ti è vicino",Invite_to_Swan:"Invita a Swan",Name:"Nome",Enter_their_name:"Inserisci il loro nome",Enter_their_email:"Inserisci la loro email",Message:"Messaggio",Join_Swan:"Unisciti a Swan!",Email:"Email",Invite:"Invito",Your_Login:"Il tuo Login",Your_Scans:"I tuoi Scans",Talk_with_the_CEO:"Parla con il CEO",Send_me_an_email:"Inviami una email",At_Swan_we_are_here_to_make_shopping_about_you_I_would_love_to_hear_what_you_think_of_Swan_and_what_you_want_to_see_next_I_am_excited_to_hear_your_feedback:"Da Swan siamo qui per rendere lo shopping su misura per te. Mi piacerebbe sapere cosa pensi di Swan e cosa vorresti vedere dopo. Sono entusiasta di sentire il tuo feedback -",Eoin:"Eoin",You_can_close_this_tab_and_return_to_the_original_to_get_your_sizing_suggestion:"Puoi chiudere questa scheda e tornare all'originale per ottenere il suggerimento sulla taglia.",Try_On:"Prova",Invite_friends:"Invita amici",Pending:"In attesa",Decline:"Declina",gifting_simple:"regali semplici",Invite_friends_and_make:"Invita amici e fai",Nest_will_be_able_to_see_and_size_clothes_on_you:"Nest sarà in grado di vedere e dimensionare i vestiti su di te",By_sharing_your_Swan_profile_those_in_your:"Condividendo il tuo profilo Swan, coloro nel tuo",Enter_your_name:"Inserisci il tuo nome",Failed_to_get_tryon:"Impossibile ottenere la prova",In_Progress:"In corso",Go_back_to:"Torna a"};const vt={[ge.English]:ht,[ge.Hindi]:pt,[ge.French]:_t,[ge.German]:ft,[ge.Spanish]:mt,[ge.Arabic]:gt,[ge.Italian]:yt},wt=a(void 0);function bt({children:t}){const[n,r]=l(ge.English),o=e=>vt[n][e]??e,i=s(()=>({preferredLanguage:n,setPreferredLanguage:r,translate:o}),[n]);return e(wt.Provider,{value:i,children:t})}function St({handleShowStreamCamera:n,loadingCam:r,handleUserMedia:o,handlePause:i,pause:s,recordingStarted:a,startSendingVideoFrames:l,showPause:c,webcamRef:u,resetDetector:h,config:p}){const{media:v}=d(ut)||{},{translate:w}=d(wt)||{};return t("div",{className:"App w-screen h-[100vh] relative ",children:[e("span",{onClick:()=>{n(),h()},className:"fixed right-[20px] top-[20px] z-[999]",children:e(st,{className:"text-[#fff]"})}),e("div",{className:"w-full h-full overflow-hidden ",children:v===ct&&e(it,{audio:!1,ref:u,screenshotQuality:1,videoConstraints:_,mirrored:!0,screenshotFormat:"image/jpeg",onUserMedia:o,style:{position:"fixed",top:0,bottom:0,zIndex:0,width:"100%",height:"100%",objectFit:"cover"}})}),t("div",{className:"fixed bottom-[30px] w-full z-[999] flex flex-col gap-4 items-center justify-center",children:[c&&e(f,{className:"!w-[180px] !h-[40px] !py-[0] mx-auto ",prefix:m,buttonText:"Pause",buttonFunc:i,resolvedConfig:p,btnSecondary:!0}),s?e("div",{children:e(f,{className:"!w-[180px] !h-[40px] !py-[0] mx-auto",buttonText:"Restart",buttonFunc:n,resolvedConfig:p,btnSecondary:!0})}):a?null:e(f,{className:"!w-[180px] !h-[40px] !py-[0] mx-auto !bg-[#ffffff] !text-[#000000] "+(r?"!opacity-50":""),buttonText:w?.(g.Start_Scan),buttonFunc:l,disabled:r,resolvedConfig:p})]}),e("audio",{id:"audioElement",crossOrigin:"anonymous",preload:"auto",style:{position:"absolute",zIndex:-99999},src:`${y}scanAudioInstructions/silence.mp3`})]})}const Et=a(null),kt={playAudio:e=>new Promise(t=>{const n=document.querySelector("#audioElement");if(!n)return void t();n.src=e;const r=()=>{n.removeEventListener("ended",r),t()};n.addEventListener("ended",r),n.play().catch(e=>{n.removeEventListener("ended",r),t(),console.error(e)})}),stopAudio:async()=>{const e=document.querySelector("#audioElement");try{e&&(e.pause(),e.src="",e.currentTime=0)}catch(e){console.error(e)}}};function Pt(e,t){return function(){return e.apply(t,arguments)}}const{toString:Tt}=Object.prototype,{getPrototypeOf:Ot}=Object,{iterator:Ct,toStringTag:xt}=Symbol,Rt=(e=>t=>{const n=Tt.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),At=e=>(e=e.toLowerCase(),t=>Rt(t)===e),Nt=e=>t=>typeof t===e,{isArray:Ft}=Array,jt=Nt("undefined");function It(e){return null!==e&&!jt(e)&&null!==e.constructor&&!jt(e.constructor)&&Lt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Mt=At("ArrayBuffer");const Ut=Nt("string"),Lt=Nt("function"),zt=Nt("number"),Bt=e=>null!==e&&"object"==typeof e,Dt=e=>{if("object"!==Rt(e))return!1;const t=Ot(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||xt in e||Ct in e)},$t=At("Date"),Wt=At("File"),qt=At("Blob"),Ht=At("FileList"),Vt=At("URLSearchParams"),[Yt,Kt,Gt,Jt]=["ReadableStream","Request","Response","Headers"].map(At);function Xt(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),Ft(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(It(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(r=0;r<i;r++)s=o[r],t.call(null,e[s],s,e)}}function Qt(e,t){if(It(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const Zt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,en=e=>!jt(e)&&e!==Zt;const tn=(nn="undefined"!=typeof Uint8Array&&Ot(Uint8Array),e=>nn&&e instanceof nn);var nn;const rn=At("HTMLFormElement"),on=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),sn=At("RegExp"),an=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Xt(n,(n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)}),Object.defineProperties(e,r)};const ln=At("AsyncFunction"),cn=(un="function"==typeof setImmediate,dn=Lt(Zt.postMessage),un?setImmediate:dn?(hn=`axios@${Math.random()}`,pn=[],Zt.addEventListener("message",({source:e,data:t})=>{e===Zt&&t===hn&&pn.length&&pn.shift()()},!1),e=>{pn.push(e),Zt.postMessage(hn,"*")}):e=>setTimeout(e));var un,dn,hn,pn;const _n="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Zt):"undefined"!=typeof process&&process.nextTick||cn;var fn={isArray:Ft,isArrayBuffer:Mt,isBuffer:It,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||Lt(e.append)&&("formdata"===(t=Rt(e))||"object"===t&&Lt(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Mt(e.buffer),t},isString:Ut,isNumber:zt,isBoolean:e=>!0===e||!1===e,isObject:Bt,isPlainObject:Dt,isEmptyObject:e=>{if(!Bt(e)||It(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:Yt,isRequest:Kt,isResponse:Gt,isHeaders:Jt,isUndefined:jt,isDate:$t,isFile:Wt,isBlob:qt,isRegExp:sn,isFunction:Lt,isStream:e=>Bt(e)&&Lt(e.pipe),isURLSearchParams:Vt,isTypedArray:tn,isFileList:Ht,forEach:Xt,merge:function e(){const{caseless:t,skipUndefined:n}=en(this)&&this||{},r={},o=(o,i)=>{const s=t&&Qt(r,i)||i;Dt(r[s])&&Dt(o)?r[s]=e(r[s],o):Dt(o)?r[s]=e({},o):Ft(o)?r[s]=o.slice():n&&jt(o)||(r[s]=o)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&Xt(arguments[e],o);return r},extend:(e,t,n,{allOwnKeys:r}={})=>(Xt(t,(t,r)=>{n&&Lt(t)?e[r]=Pt(t,n):e[r]=t},{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,s;const a={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],r&&!r(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==n&&Ot(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:Rt,kindOfTest:At,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(Ft(e))return e;let t=e.length;if(!zt(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Ct]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:rn,hasOwnProperty:on,hasOwnProp:on,reduceDescriptors:an,freezeMethods:e=>{an(e,(t,n)=>{if(Lt(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];Lt(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return Ft(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:Qt,global:Zt,isContextDefined:en,isSpecCompliantForm:function(e){return!!(e&&Lt(e.append)&&"FormData"===e[xt]&&e[Ct])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(Bt(e)){if(t.indexOf(e)>=0)return;if(It(e))return e;if(!("toJSON"in e)){t[r]=e;const o=Ft(e)?[]:{};return Xt(e,(e,t)=>{const i=n(e,r+1);!jt(i)&&(o[t]=i)}),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:ln,isThenable:e=>e&&(Bt(e)||Lt(e))&&Lt(e.then)&&Lt(e.catch),setImmediate:cn,asap:_n,isIterable:e=>null!=e&&Lt(e[Ct])};function mn(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}fn.inherits(mn,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:fn.toJSONObject(this.config),code:this.code,status:this.status}}});const gn=mn.prototype,yn={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{yn[e]={value:e}}),Object.defineProperties(mn,yn),Object.defineProperty(gn,"isAxiosError",{value:!0}),mn.from=(e,t,n,r,o,i)=>{const s=Object.create(gn);fn.toFlatObject(e,s,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e);const a=e&&e.message?e.message:"Error",l=null==t&&e?e.code:t;return mn.call(s,a,l,n,r,o),e&&null==s.cause&&Object.defineProperty(s,"cause",{value:e,configurable:!0}),s.name=e&&e.name||"Error",i&&Object.assign(s,i),s};function vn(e){return fn.isPlainObject(e)||fn.isArray(e)}function wn(e){return fn.endsWith(e,"[]")?e.slice(0,-2):e}function bn(e,t,n){return e?e.concat(t).map(function(e,t){return e=wn(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const Sn=fn.toFlatObject(fn,{},null,function(e){return/^is[A-Z]/.test(e)});function En(e,t,n){if(!fn.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=fn.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!fn.isUndefined(t[e])})).metaTokens,o=n.visitor||c,i=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&fn.isSpecCompliantForm(t);if(!fn.isFunction(o))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(fn.isDate(e))return e.toISOString();if(fn.isBoolean(e))return e.toString();if(!a&&fn.isBlob(e))throw new mn("Blob is not supported. Use a Buffer instead.");return fn.isArrayBuffer(e)||fn.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,o){let a=e;if(e&&!o&&"object"==typeof e)if(fn.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(fn.isArray(e)&&function(e){return fn.isArray(e)&&!e.some(vn)}(e)||(fn.isFileList(e)||fn.endsWith(n,"[]"))&&(a=fn.toArray(e)))return n=wn(n),a.forEach(function(e,r){!fn.isUndefined(e)&&null!==e&&t.append(!0===s?bn([n],r,i):null===s?n:n+"[]",l(e))}),!1;return!!vn(e)||(t.append(bn(o,n,i),l(e)),!1)}const u=[],d=Object.assign(Sn,{defaultVisitor:c,convertValue:l,isVisitable:vn});if(!fn.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!fn.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),fn.forEach(n,function(n,i){!0===(!(fn.isUndefined(n)||null===n)&&o.call(t,n,fn.isString(i)?i.trim():i,r,d))&&e(n,r?r.concat(i):[i])}),u.pop()}}(e),t}function kn(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Pn(e,t){this._pairs=[],e&&En(e,this,t)}const Tn=Pn.prototype;function On(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Cn(e,t,n){if(!t)return e;const r=n&&n.encode||On;fn.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(i=o?o(t,n):fn.isURLSearchParams(t)?t.toString():new Pn(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}Tn.append=function(e,t){this._pairs.push([e,t])},Tn.toString=function(e){const t=e?function(t){return e.call(this,t,kn)}:kn;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};class xn{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){fn.forEach(this.handlers,function(t){null!==t&&e(t)})}}var Rn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},An={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Pn,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const Nn="undefined"!=typeof window&&"undefined"!=typeof document,Fn="object"==typeof navigator&&navigator||void 0,jn=Nn&&(!Fn||["ReactNative","NativeScript","NS"].indexOf(Fn.product)<0),In="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Mn=Nn&&window.location.href||"http://localhost";var Un={...Object.freeze({__proto__:null,hasBrowserEnv:Nn,hasStandardBrowserEnv:jn,hasStandardBrowserWebWorkerEnv:In,navigator:Fn,origin:Mn}),...An};function Ln(e){function t(e,n,r,o){let i=e[o++];if("__proto__"===i)return!0;const s=Number.isFinite(+i),a=o>=e.length;if(i=!i&&fn.isArray(r)?r.length:i,a)return fn.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!s;r[i]&&fn.isObject(r[i])||(r[i]=[]);return t(e,n,r[i],o)&&fn.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!s}if(fn.isFormData(e)&&fn.isFunction(e.entries)){const n={};return fn.forEachEntry(e,(e,r)=>{t(function(e){return fn.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,n,0)}),n}return null}const zn={transitional:Rn,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=fn.isObject(e);o&&fn.isHTMLForm(e)&&(e=new FormData(e));if(fn.isFormData(e))return r?JSON.stringify(Ln(e)):e;if(fn.isArrayBuffer(e)||fn.isBuffer(e)||fn.isStream(e)||fn.isFile(e)||fn.isBlob(e)||fn.isReadableStream(e))return e;if(fn.isArrayBufferView(e))return e.buffer;if(fn.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return En(e,new Un.classes.URLSearchParams,{visitor:function(e,t,n,r){return Un.isNode&&fn.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((i=fn.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return En(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(fn.isString(e))try{return(t||JSON.parse)(e),fn.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||zn.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(fn.isResponse(e)||fn.isReadableStream(e))return e;if(e&&fn.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n){if("SyntaxError"===e.name)throw mn.from(e,mn.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Un.classes.FormData,Blob:Un.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};fn.forEach(["delete","get","head","post","put","patch"],e=>{zn.headers[e]={}});const Bn=fn.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const Dn=Symbol("internals");function $n(e){return e&&String(e).trim().toLowerCase()}function Wn(e){return!1===e||null==e?e:fn.isArray(e)?e.map(Wn):String(e)}function qn(e,t,n,r,o){return fn.isFunction(r)?r.call(this,t,n):(o&&(t=n),fn.isString(t)?fn.isString(r)?-1!==t.indexOf(r):fn.isRegExp(r)?r.test(t):void 0:void 0)}let Hn=class{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=$n(t);if(!o)throw new Error("header name must be a non-empty string");const i=fn.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=Wn(e))}const i=(e,t)=>fn.forEach(e,(e,n)=>o(e,n,t));if(fn.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(fn.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&Bn[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t})(e),t);else if(fn.isObject(e)&&fn.isIterable(e)){let n,r,o={};for(const t of e){if(!fn.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[r=t[0]]=(n=o[r])?fn.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}i(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=$n(e)){const n=fn.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(fn.isFunction(t))return t.call(this,e,n);if(fn.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=$n(e)){const n=fn.findKey(this,e);return!(!n||void 0===this[n]||t&&!qn(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=$n(e)){const o=fn.findKey(n,e);!o||t&&!qn(0,n[o],o,t)||(delete n[o],r=!0)}}return fn.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!qn(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return fn.forEach(this,(r,o)=>{const i=fn.findKey(n,o);if(i)return t[i]=Wn(r),void delete t[o];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(o):String(o).trim();s!==o&&delete t[o],t[s]=Wn(r),n[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return fn.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&fn.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[Dn]=this[Dn]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=$n(e);t[r]||(!function(e,t){const n=fn.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})})}(n,e),t[r]=!0)}return fn.isArray(e)?e.forEach(r):r(e),this}};function Vn(e,t){const n=this||zn,r=t||n,o=Hn.from(r.headers);let i=r.data;return fn.forEach(e,function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function Yn(e){return!(!e||!e.__CANCEL__)}function Kn(e,t,n){mn.call(this,null==e?"canceled":e,mn.ERR_CANCELED,t,n),this.name="CanceledError"}function Gn(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new mn("Request failed with status code "+n.status,[mn.ERR_BAD_REQUEST,mn.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}Hn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),fn.reduceDescriptors(Hn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),fn.freezeMethods(Hn),fn.inherits(Kn,mn,{__CANCEL__:!0});const Jn=(e,t,n=3)=>{let r=0;const o=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,s=0;return t=void 0!==t?t:1e3,function(a){const l=Date.now(),c=r[s];o||(o=l),n[i]=a,r[i]=l;let u=s,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),l-o<t)return;const h=c&&l-c;return h?Math.round(1e3*d/h):void 0}}(50,250);return function(e,t){let n,r,o=0,i=1e3/t;const s=(t,i=Date.now())=>{o=i,n=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),a=t-o;a>=i?s(e,t):(n=e,r||(r=setTimeout(()=>{r=null,s(n)},i-a)))},()=>n&&s(n)]}(n=>{const i=n.loaded,s=n.lengthComputable?n.total:void 0,a=i-r,l=o(a);r=i;e({loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&i<=s?(s-i)/l:void 0,event:n,lengthComputable:null!=s,[t?"download":"upload"]:!0})},n)},Xn=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Qn=e=>(...t)=>fn.asap(()=>e(...t));var Zn=Un.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Un.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Un.origin),Un.navigator&&/(msie|trident)/i.test(Un.navigator.userAgent)):()=>!0,er=Un.hasStandardBrowserEnv?{write(e,t,n,r,o,i,s){if("undefined"==typeof document)return;const a=[`${e}=${encodeURIComponent(t)}`];fn.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),fn.isString(r)&&a.push(`path=${r}`),fn.isString(o)&&a.push(`domain=${o}`),!0===i&&a.push("secure"),fn.isString(s)&&a.push(`SameSite=${s}`),document.cookie=a.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function tr(e,t,n){let r=!function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const nr=e=>e instanceof Hn?{...e}:e;function rr(e,t){t=t||{};const n={};function r(e,t,n,r){return fn.isPlainObject(e)&&fn.isPlainObject(t)?fn.merge.call({caseless:r},e,t):fn.isPlainObject(t)?fn.merge({},t):fn.isArray(t)?t.slice():t}function o(e,t,n,o){return fn.isUndefined(t)?fn.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function i(e,t){if(!fn.isUndefined(t))return r(void 0,t)}function s(e,t){return fn.isUndefined(t)?fn.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const l={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t,n)=>o(nr(e),nr(t),0,!0)};return fn.forEach(Object.keys({...e,...t}),function(r){const i=l[r]||o,s=i(e[r],t[r],r);fn.isUndefined(s)&&i!==a||(n[r]=s)}),n}var or=e=>{const t=rr({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:a}=t;if(t.headers=s=Hn.from(s),t.url=Cn(tr(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),fn.isFormData(n))if(Un.hasStandardBrowserEnv||Un.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(fn.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&s.set(e,n)})}if(Un.hasStandardBrowserEnv&&(r&&fn.isFunction(r)&&(r=r(t)),r||!1!==r&&Zn(t.url))){const e=o&&i&&er.read(i);e&&s.set(o,e)}return t};var ir="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=or(e);let o=r.data;const i=Hn.from(r.headers).normalize();let s,a,l,c,u,{responseType:d,onUploadProgress:h,onDownloadProgress:p}=r;function _(){c&&c(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(s),r.signal&&r.signal.removeEventListener("abort",s)}let f=new XMLHttpRequest;function m(){if(!f)return;const r=Hn.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders());Gn(function(e){t(e),_()},function(e){n(e),_()},{data:d&&"text"!==d&&"json"!==d?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:r,config:e,request:f}),f=null}f.open(r.method.toUpperCase(),r.url,!0),f.timeout=r.timeout,"onloadend"in f?f.onloadend=m:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(m)},f.onabort=function(){f&&(n(new mn("Request aborted",mn.ECONNABORTED,e,f)),f=null)},f.onerror=function(t){const r=new mn(t&&t.message?t.message:"Network Error",mn.ERR_NETWORK,e,f);r.event=t||null,n(r),f=null},f.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||Rn;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new mn(t,o.clarifyTimeoutError?mn.ETIMEDOUT:mn.ECONNABORTED,e,f)),f=null},void 0===o&&i.setContentType(null),"setRequestHeader"in f&&fn.forEach(i.toJSON(),function(e,t){f.setRequestHeader(t,e)}),fn.isUndefined(r.withCredentials)||(f.withCredentials=!!r.withCredentials),d&&"json"!==d&&(f.responseType=r.responseType),p&&([l,u]=Jn(p,!0),f.addEventListener("progress",l)),h&&f.upload&&([a,c]=Jn(h),f.upload.addEventListener("progress",a),f.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(s=t=>{f&&(n(!t||t.type?new Kn(null,e,f):t),f.abort(),f=null)},r.cancelToken&&r.cancelToken.subscribe(s),r.signal&&(r.signal.aborted?s():r.signal.addEventListener("abort",s)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);g&&-1===Un.protocols.indexOf(g)?n(new mn("Unsupported protocol "+g+":",mn.ERR_BAD_REQUEST,e)):f.send(o||null)})};const sr=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const o=function(e){if(!n){n=!0,s();const t=e instanceof Error?e:this.reason;r.abort(t instanceof mn?t:new Kn(t instanceof Error?t.message:t))}};let i=t&&setTimeout(()=>{i=null,o(new mn(`timeout ${t} of ms exceeded`,mn.ETIMEDOUT))},t);const s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));const{signal:a}=r;return a.unsubscribe=()=>fn.asap(s),a}},ar=function*(e,t){let n=e.byteLength;if(n<t)return void(yield e);let r,o=0;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},lr=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},cr=(e,t,n,r)=>{const o=async function*(e,t){for await(const n of lr(e))yield*ar(n,t)}(e,t);let i,s=0,a=e=>{i||(i=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return a(),void e.close();let i=r.byteLength;if(n){let e=s+=i;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw a(e),e}},cancel:e=>(a(e),o.return())},{highWaterMark:2})},{isFunction:ur}=fn,dr=(({Request:e,Response:t})=>({Request:e,Response:t}))(fn.global),{ReadableStream:hr,TextEncoder:pr}=fn.global,_r=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},fr=e=>{e=fn.merge.call({skipUndefined:!0},dr,e);const{fetch:t,Request:n,Response:r}=e,o=t?ur(t):"function"==typeof fetch,i=ur(n),s=ur(r);if(!o)return!1;const a=o&&ur(hr),l=o&&("function"==typeof pr?(c=new pr,e=>c.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer()));var c;const u=i&&a&&_r(()=>{let e=!1;const t=new n(Un.origin,{body:new hr,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),d=s&&a&&_r(()=>fn.isReadableStream(new r("").body)),h={stream:d&&(e=>e.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!h[e]&&(h[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new mn(`Response type '${e}' is not supported`,mn.ERR_NOT_SUPPORT,n)})});const p=async(e,t)=>{const r=fn.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(fn.isBlob(e))return e.size;if(fn.isSpecCompliantForm(e)){const t=new n(Un.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return fn.isArrayBufferView(e)||fn.isArrayBuffer(e)?e.byteLength:(fn.isURLSearchParams(e)&&(e+=""),fn.isString(e)?(await l(e)).byteLength:void 0)})(t):r};return async e=>{let{url:o,method:s,data:a,signal:l,cancelToken:c,timeout:_,onDownloadProgress:f,onUploadProgress:m,responseType:g,headers:y,withCredentials:v="same-origin",fetchOptions:w}=or(e),b=t||fetch;g=g?(g+"").toLowerCase():"text";let S=sr([l,c&&c.toAbortSignal()],_),E=null;const k=S&&S.unsubscribe&&(()=>{S.unsubscribe()});let P;try{if(m&&u&&"get"!==s&&"head"!==s&&0!==(P=await p(y,a))){let e,t=new n(o,{method:"POST",body:a,duplex:"half"});if(fn.isFormData(a)&&(e=t.headers.get("content-type"))&&y.setContentType(e),t.body){const[e,n]=Xn(P,Jn(Qn(m)));a=cr(t.body,65536,e,n)}}fn.isString(v)||(v=v?"include":"omit");const t=i&&"credentials"in n.prototype,l={...w,signal:S,method:s.toUpperCase(),headers:y.normalize().toJSON(),body:a,duplex:"half",credentials:t?v:void 0};E=i&&new n(o,l);let c=await(i?b(E,w):b(o,l));const _=d&&("stream"===g||"response"===g);if(d&&(f||_&&k)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=c[t]});const t=fn.toFiniteNumber(c.headers.get("content-length")),[n,o]=f&&Xn(t,Jn(Qn(f),!0))||[];c=new r(cr(c.body,65536,n,()=>{o&&o(),k&&k()}),e)}g=g||"text";let T=await h[fn.findKey(h,g)||"text"](c,e);return!_&&k&&k(),await new Promise((t,n)=>{Gn(t,n,{data:T,headers:Hn.from(c.headers),status:c.status,statusText:c.statusText,config:e,request:E})})}catch(t){if(k&&k(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new mn("Network Error",mn.ERR_NETWORK,e,E),{cause:t.cause||t});throw mn.from(t,t&&t.code,e,E)}}},mr=new Map,gr=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,i=[r,o,n];let s,a,l=i.length,c=mr;for(;l--;)s=i[l],a=c.get(s),void 0===a&&c.set(s,a=l?new Map:fr(t)),c=a;return a};gr();const yr={http:null,xhr:ir,fetch:{get:gr}};fn.forEach(yr,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const vr=e=>`- ${e}`,wr=e=>fn.isFunction(e)||null===e||!1===e;var br={getAdapter:function(e,t){e=fn.isArray(e)?e:[e];const{length:n}=e;let r,o;const i={};for(let s=0;s<n;s++){let n;if(r=e[s],o=r,!wr(r)&&(o=yr[(n=String(r)).toLowerCase()],void 0===o))throw new mn(`Unknown adapter '${n}'`);if(o&&(fn.isFunction(o)||(o=o.get(t))))break;i[n||"#"+s]=o}if(!o){const e=Object.entries(i).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new mn("There is no suitable adapter to dispatch the request "+(n?e.length>1?"since :\n"+e.map(vr).join("\n"):" "+vr(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return o},adapters:yr};function Sr(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Kn(null,e)}function Er(e){Sr(e),e.headers=Hn.from(e.headers),e.data=Vn.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return br.getAdapter(e.adapter||zn.adapter,e)(e).then(function(t){return Sr(e),t.data=Vn.call(e,e.transformResponse,t),t.headers=Hn.from(t.headers),t},function(t){return Yn(t)||(Sr(e),t&&t.response&&(t.response.data=Vn.call(e,e.transformResponse,t.response),t.response.headers=Hn.from(t.response.headers))),Promise.reject(t)})}const kr="1.13.2",Pr={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Pr[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Tr={};Pr.transitional=function(e,t,n){function r(e,t){return"[Axios v"+kr+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new mn(r(o," has been removed"+(t?" in "+t:"")),mn.ERR_DEPRECATED);return t&&!Tr[o]&&(Tr[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}},Pr.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};var Or={assertOptions:function(e,t,n){if("object"!=typeof e)throw new mn("options must be an object",mn.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],s=t[i];if(s){const t=e[i],n=void 0===t||s(t,i,e);if(!0!==n)throw new mn("option "+i+" must be "+n,mn.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new mn("Unknown option "+i,mn.ERR_BAD_OPTION)}},validators:Pr};const Cr=Or.validators;let xr=class{constructor(e){this.defaults=e||{},this.interceptors={request:new xn,response:new xn}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=rr(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&Or.assertOptions(n,{silentJSONParsing:Cr.transitional(Cr.boolean),forcedJSONParsing:Cr.transitional(Cr.boolean),clarifyTimeoutError:Cr.transitional(Cr.boolean)},!1),null!=r&&(fn.isFunction(r)?t.paramsSerializer={serialize:r}:Or.assertOptions(r,{encode:Cr.function,serialize:Cr.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Or.assertOptions(t,{baseUrl:Cr.spelling("baseURL"),withXsrfToken:Cr.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&fn.merge(o.common,o[t.method]);o&&fn.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=Hn.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))});const l=[];let c;this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let u,d=0;if(!a){const e=[Er.bind(this),void 0];for(e.unshift(...s),e.push(...l),u=e.length,c=Promise.resolve(t);d<u;)c=c.then(e[d++],e[d++]);return c}u=s.length;let h=t;for(;d<u;){const e=s[d++],t=s[d++];try{h=e(h)}catch(e){t.call(this,e);break}}try{c=Er.call(this,h)}catch(e){return Promise.reject(e)}for(d=0,u=l.length;d<u;)c=c.then(l[d++],l[d++]);return c}getUri(e){return Cn(tr((e=rr(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};fn.forEach(["delete","get","head","options"],function(e){xr.prototype[e]=function(t,n){return this.request(rr(n||{},{method:e,url:t,data:(n||{}).data}))}}),fn.forEach(["post","put","patch"],function(e){function t(t){return function(n,r,o){return this.request(rr(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}xr.prototype[e]=t(),xr.prototype[e+"Form"]=t(!0)});const Rr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Rr).forEach(([e,t])=>{Rr[t]=e});const Ar=function e(t){const n=new xr(t),r=Pt(xr.prototype.request,n);return fn.extend(r,xr.prototype,n,{allOwnKeys:!0}),fn.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(rr(t,n))},r}(zn);Ar.Axios=xr,Ar.CanceledError=Kn,Ar.CancelToken=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,o){n.reason||(n.reason=new Kn(e,r,o),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}},Ar.isCancel=Yn,Ar.VERSION=kr,Ar.toFormData=En,Ar.AxiosError=mn,Ar.Cancel=Ar.CanceledError,Ar.all=function(e){return Promise.all(e)},Ar.spread=function(e){return function(t){return e.apply(null,t)}},Ar.isAxiosError=function(e){return fn.isObject(e)&&!0===e.isAxiosError},Ar.mergeConfig=rr,Ar.AxiosHeaders=Hn,Ar.formToJSON=e=>Ln(fn.isHTMLForm(e)?new FormData(e):e),Ar.getAdapter=br.getAdapter,Ar.HttpStatusCode=Rr,Ar.default=Ar;const{Axios:Nr,AxiosError:Fr,CanceledError:jr,isCancel:Ir,CancelToken:Mr,VERSION:Ur,all:Lr,Cancel:zr,isAxiosError:Br,spread:Dr,toFormData:$r,AxiosHeaders:Wr,HttpStatusCode:qr,formToJSON:Hr,getAdapter:Vr,mergeConfig:Yr}=Ar,Kr={dev:{APP_AUTH_BASE_URL:"https://develop.api.swanvision.ai",APP_BASE_WEBSOCKET_URL:"wss://develop.wsnotify.api.swanvision.ai",APP_POSE_DETECTION_WEBSOCKET_URL:"https://posedetect-service-staging.ft2a64raup4pg.us-east-1.cs.amazonlightsail.com"},staging:{APP_AUTH_BASE_URL:"https://staging.api.swanvision.ai",APP_BASE_WEBSOCKET_URL:"wss://staging.wsnotify.api.swanvision.ai",APP_POSE_DETECTION_WEBSOCKET_URL:"https://posedetect-service-staging.ft2a64raup4pg.us-east-1.cs.amazonlightsail.com"},prod:{APP_AUTH_BASE_URL:"https://api.swanvision.ai",APP_BASE_WEBSOCKET_URL:"wss://wsnotify.api.swanvision.ai",APP_POSE_DETECTION_WEBSOCKET_URL:"https://posedetect-service.uvcn97hn133d6.eu-west-1.cs.amazonlightsail.com"}},Gr="/upload/start",Jr="/upload/complete",Xr="/upload/signpart",Qr="APP_AUTH_BASE_URL",Zr="APP_BASE_WEBSOCKET_URL",eo="/user",to="/auth/register",no="/auth/verify",ro="/user",oo="/customers/custom",io="/customers",so="/model",ao="/tryon/user-image-urls/upload",lo="/tryon/user-image-urls/download",co="/tryon/user-image-urls",uo="/tryon/result-image-urls/download",ho="/tryon",po="/auth",_o="/scanning",fo="/recommendation",mo="/tryon/share",go="/deviceinfo",yo="/tryon/product-image-eligibility",vo=["gender","focal_length","height","customer_store_url","callback_url","clothes_fit"],wo=["gender","focal_length","customer_store_url","scan_type","callback_url","face_scan_id"],bo="Please verify required parameters",So="Please verify required parameters in meta data",Eo="Invalid Email",ko=5242880;var Po;!function(e){e.DEV="dev",e.STAGING="staging",e.PROD="prod"}(Po||(Po={}));var To=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?o(e.value):function(e){return e instanceof n?e:new n(function(t){t(e)})}(e.value).then(s,a)}l((r=r.apply(e,t||[])).next())})};function Oo(e){return To(this,void 0,void 0,function*(){const{path:t,body:n,queryParams:r,baseUrl:o=Qr,apiKey:i="",throwError:s=!1,headers:a={"X-Api-Key":i,"Content-Type":"application/json"},urlType:l=Po.PROD}=e,c=`${No({urlName:o,urlType:l})}${t}${r?`?${new URLSearchParams(r)}`:""}`;try{const e=yield Ar.post(c,n,{headers:a});if(e.status>=200&&e.status<300)return e.data;if(console.error(`Error: Unexpected response status ${e.status}`),s)throw new Error("Failed to upload");return{}}catch(e){if(console.error(e,"while uploading"),s)throw new Error(`Failed to upload: ${(null==e?void 0:e.message)||"something went wrong"}`);return{}}})}function Co(...e){for(const t of e)if(!t)return!1;return!0}function xo(e){if(!Ro(e,vo))return!1;let t=!1;for(const n of e)n.callback_url&&n.callback_url.startsWith("https")&&(t=!0);return!!t}const Ro=(e,t)=>{for(const n of t){let t=!1;for(const r of e)if(Object.prototype.hasOwnProperty.call(r,n)&&void 0!==r[n]&&null!==r[n]&&""!==r[n]&&"number"!=typeof r[n]){t=!0;break}if(!t)return!1}return!0},Ao=(e,t,n)=>(e.find(e=>e.scan_type)||e.push({scan_type:"clothing_scan"}),e.push({scan_id:t}),e.push({email:n}),e);const No=({urlName:e,urlType:t=Po.PROD})=>Kr[t][e],Fo=e=>/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e);var jo,Io,Mo,Uo=function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},Lo=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};class zo{constructor(e,t=Po.PROD){jo.set(this,void 0),Io.set(this,void 0),Mo.set(this,void 0),Uo(this,Io,e,"f"),Uo(this,Mo,t,"f")}registerUser({email:e,appVerifyUrl:t,gender:n,height:r,username:o}){if(!Co(e,t))throw new Error(bo);let i={username:o,email:e,appVerifyUrl:t};return n&&r&&(i=Object.assign(Object.assign({},i),{attributes:{gender:n,height:r}})),Ar.post(`${No({urlName:Qr,urlType:Lo(this,Mo,"f")})}${to}`,i,{headers:{"X-Api-Key":Lo(this,Io,"f")}})}verifyToken(e){if(!Co(e))throw new Error(bo);return Ar.post(`${No({urlName:Qr,urlType:Lo(this,Mo,"f")})}${no}`,null,{params:{token:e},headers:{"X-Api-Key":Lo(this,Io,"f")}})}addUser({scanId:e,email:t,name:n,height:r,gender:o,offsetMarketingConsent:i}){if(!Co(e,t,r,o))throw new Error(bo);return Ar.post(`${No({urlName:Qr,urlType:Lo(this,Mo,"f")})}${ro}`,{scan_id:e,email:t,name:n,offsetMarketingConsent:i,attributes:JSON.stringify({height:r,gender:o})},{headers:{"X-Api-Key":Lo(this,Io,"f")}})}getUserDetail(e){if(!Co(e))throw new Error(bo);return Ar.get(`${No({urlName:Qr,urlType:Lo(this,Mo,"f")})}${eo}/${e}`,{headers:{"X-Api-Key":Lo(this,Io,"f")}})}handleAuthSocket({email:e,scanId:t,onError:n,onSuccess:r,onClose:o,onOpen:i}){if(!Co(e,t))throw new Error(bo);Lo(this,jo,"f")&&Lo(this,jo,"f").close(),Uo(this,jo,new WebSocket(`${No({urlName:Zr,urlType:Lo(this,Mo,"f")})}${po}`),"f");const s={email:e,scanId:t};Lo(this,jo,"f")&&(Lo(this,jo,"f").onopen=()=>{var e;null===(e=Lo(this,jo,"f"))||void 0===e||e.send(JSON.stringify(s)),null==i||i()},Lo(this,jo,"f").onmessage=e=>{let t;try{t=JSON.parse(e.data)}catch(e){return void console.log(t,e,"noy correct format for data")}t=JSON.parse(e.data),null==r||r(t)},Lo(this,jo,"f").onclose=()=>{null==o||o()},Lo(this,jo,"f").onerror=e=>{null==n||n(e)})}}jo=new WeakMap,Io=new WeakMap,Mo=new WeakMap;var Bo,Do,$o=function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},Wo=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};class qo{constructor(e,t=Po.PROD){Bo.set(this,void 0),Do.set(this,void 0),this.getCustomCustomerConfig=e=>{if(!1===Co(e))throw new Error(bo);return Ar.get(`${No({urlName:Qr,urlType:Wo(this,Do,"f")})}${oo}`,{params:{store_url:e},headers:{"X-Api-Key":Wo(this,Bo,"f")}})},this.getModelUrl=e=>{if(!1===Co(e))throw new Error(bo);return Ar.get(`${No({urlName:Qr,urlType:Wo(this,Do,"f")})}${so}/${e}`,{headers:{"X-Api-Key":Wo(this,Bo,"f")}})},$o(this,Bo,e,"f"),$o(this,Do,t,"f")}createCustomer(e){if(!1===Co(e.name,e.storeUrl,e.email,e.location))throw new Error(bo);return Ar.post(`${No({urlName:Qr,urlType:Wo(this,Do,"f")})}${io}`,Object.assign(Object.assign({},e),{headers:{"X-Api-Key":Wo(this,Bo,"f")}}))}}function Ho(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}Bo=new WeakMap,Do=new WeakMap;var Vo=0;function Yo(e){return"__private_"+Vo+++"_"+e}function Ko(e,t,n){const r=[];return e.forEach(e=>"string"!=typeof e?r.push(e):t[Symbol.split](e).forEach((e,t,o)=>{""!==e&&r.push(e),t<o.length-1&&r.push(n)})),r}
10
- /**
11
- * Takes a string with placeholder variables like `%{smart_count} file selected`
12
- * and replaces it with values from options `{smart_count: 5}`
13
- *
14
- * @license https://github.com/airbnb/polyglot.js/blob/master/LICENSE
15
- * taken from https://github.com/airbnb/polyglot.js/blob/master/lib/polyglot.js#L299
16
- *
17
- * @param phrase that needs interpolation, with placeholders
18
- * @param options with values that will be used to replace placeholders
19
- */function Go(e,t){const n=/\$/g;let r=[e];if(null==t)return r;for(const e of Object.keys(t))if("_"!==e){let o=t[e];"string"==typeof o&&(o=n[Symbol.replace](o,"$$$$")),r=Ko(r,new RegExp(`%\\{${e}\\}`,"g"),o)}return r}const Jo=e=>{throw new Error(`missing string: ${e}`)};var Xo,Qo,Zo=Yo("onMissingKey"),ei=Yo("apply");class ti{constructor(e,t){let{onMissingKey:n=Jo}=void 0===t?{}:t;Object.defineProperty(this,ei,{value:ni}),Object.defineProperty(this,Zo,{writable:!0,value:void 0}),this.locale={strings:{},pluralize:e=>1===e?0:1},Array.isArray(e)?e.forEach(Ho(this,ei)[ei],this):Ho(this,ei)[ei](e),Ho(this,Zo)[Zo]=n}translate(e,t){return this.translateArray(e,t).join("")}translateArray(e,t){let n=this.locale.strings[e];null==n&&(Ho(this,Zo)[Zo](e),n=e);if("object"==typeof n){if(t&&void 0!==t.smart_count){return Go(n[this.locale.pluralize(t.smart_count)],t)}throw new Error("Attempted to use a string with plural forms, but no value was given for %{smart_count}")}if("string"!=typeof n)throw new Error("string was not a string");return Go(n,t)}}function ni(e){if(null==e||!e.strings)return;const t=this.locale;Object.assign(this.locale,{strings:{...t.strings,...e.strings},pluralize:e.pluralize||t.pluralize})}var ri=fe((Qo||(Qo=1,Xo=function(){var e={},t=e._fns={};return e.emit=function(e,n,r,o,i,s,a){var l=function(e){for(var n=t[e]?t[e]:[],r=e.indexOf(":"),o=-1===r?[e]:[e.substring(0,r),e.substring(r+1)],i=Object.keys(t),s=0,a=i.length;s<a;s++){var l=i[s];if("*"===l&&(n=n.concat(t[l])),2===o.length&&o[0]===l){n=n.concat(t[l]);break}}return n}(e);l.length&&function(e,t,n){for(var r=0,o=t.length;r<o&&t[r];r++)t[r].event=e,t[r].apply(t[r],n)}(e,l,[n,r,o,i,s,a])},e.on=function(e,n){t[e]||(t[e]=[]),t[e].push(n)},e.once=function(t,n){this.on(t,function r(){n.apply(this,arguments),e.off(t,r)})},e.off=function(e,t){var n=[];if(e&&t)for(var r=this._fns[e],o=0,i=r?r.length:0;o<i;o++)r[o]!==t&&n.push(r[o]);n.length?this._fns[e]=n:delete this._fns[e]},e}),Xo));var oi,ii,si,ai,li,ci,ui,di,hi,pi,_i,fi,mi,gi,yi,vi,wi,bi,Si,Ei,ki,Pi,Ti,Oi,Ci,xi,Ri,Ai,Ni,Fi;function ji(){if(ii)return oi;return ii=1,oi=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},oi}function Ii(){if(ci)return li;ci=1;var e=function(){if(ai)return si;ai=1;var e="object"==typeof ye&&ye&&ye.Object===Object&&ye;return si=e}(),t="object"==typeof self&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return li=n}function Mi(){if(fi)return _i;fi=1;var e=function(){if(pi)return hi;pi=1;var e=/\s/;return hi=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}}(),t=/^\s+/;return _i=function(n){return n?n.slice(0,e(n)+1).replace(t,""):n}}function Ui(){if(gi)return mi;gi=1;var e=Ii().Symbol;return mi=e}function Li(){if(Ei)return Si;Ei=1;var e=Ui(),t=function(){if(vi)return yi;vi=1;var e=Ui(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,o=e?e.toStringTag:void 0;return yi=function(e){var t=n.call(e,o),i=e[o];try{e[o]=void 0;var s=!0}catch(e){}var a=r.call(e);return s&&(t?e[o]=i:delete e[o]),a},yi}(),n=function(){if(bi)return wi;bi=1;var e=Object.prototype.toString;return wi=function(t){return e.call(t)},wi}(),r=e?e.toStringTag:void 0;return Si=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":r&&r in Object(e)?t(e):n(e)},Si}function zi(){if(Oi)return Ti;Oi=1;var e=Li(),t=(Pi||(Pi=1,ki=function(e){return null!=e&&"object"==typeof e}),ki);return Ti=function(n){return"symbol"==typeof n||t(n)&&"[object Symbol]"==e(n)},Ti}function Bi(){if(Ai)return Ri;Ai=1;var e=ji(),t=function(){if(di)return ui;di=1;var e=Ii();return ui=function(){return e.Date.now()}}(),n=function(){if(xi)return Ci;xi=1;var e=Mi(),t=ji(),n=zi(),r=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,i=/^0o[0-7]+$/i,s=parseInt;return Ci=function(a){if("number"==typeof a)return a;if(n(a))return NaN;if(t(a)){var l="function"==typeof a.valueOf?a.valueOf():a;a=t(l)?l+"":l}if("string"!=typeof a)return 0===a?a:+a;a=e(a);var c=o.test(a);return c||i.test(a)?s(a.slice(2),c?2:8):r.test(a)?NaN:+a},Ci}(),r=Math.max,o=Math.min;return Ri=function(i,s,a){var l,c,u,d,h,p,_=0,f=!1,m=!1,g=!0;if("function"!=typeof i)throw new TypeError("Expected a function");function y(e){var t=l,n=c;return l=c=void 0,_=e,d=i.apply(n,t)}function v(e){var t=e-p;return void 0===p||t>=s||t<0||m&&e-_>=u}function w(){var e=t();if(v(e))return b(e);h=setTimeout(w,function(e){var t=s-(e-p);return m?o(t,u-(e-_)):t}(e))}function b(e){return h=void 0,g&&l?y(e):(l=c=void 0,d)}function S(){var e=t(),n=v(e);if(l=arguments,c=this,p=e,n){if(void 0===h)return function(e){return _=e,h=setTimeout(w,s),f?y(e):d}(p);if(m)return clearTimeout(h),h=setTimeout(w,s),y(p)}return void 0===h&&(h=setTimeout(w,s)),d}return s=n(s)||0,e(a)&&(f=!!a.leading,u=(m="maxWait"in a)?r(n(a.maxWait)||0,s):u,g="trailing"in a?!!a.trailing:g),S.cancel=function(){void 0!==h&&clearTimeout(h),_=0,l=p=c=h=void 0},S.flush=function(){return void 0===h?d:b(t())},S},Ri}var Di=function(){if(Fi)return Ni;Fi=1;var e=Bi(),t=ji();return Ni=function(n,r,o){var i=!0,s=!0;if("function"!=typeof n)throw new TypeError("Expected a function");return t(o)&&(i="leading"in o?!!o.leading:i,s="trailing"in o?!!o.trailing:s),e(n,r,{leading:i,maxWait:r,trailing:s})}}(),$i=fe(Di);function Wi(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var qi=0;function Hi(e){return"__private_"+qi+++"_"+e}var Vi=Hi("callbacks"),Yi=Hi("publish");class Ki{constructor(){Object.defineProperty(this,Yi,{value:Gi}),this.state={},Object.defineProperty(this,Vi,{writable:!0,value:new Set})}getState(){return this.state}setState(e){const t={...this.state},n={...this.state,...e};this.state=n,Wi(this,Yi)[Yi](t,n,e)}subscribe(e){return Wi(this,Vi)[Vi].add(e),()=>{Wi(this,Vi)[Vi].delete(e)}}}function Gi(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Wi(this,Vi)[Vi].forEach(e=>{e(...t)})}function Ji(e){const t=e.lastIndexOf(".");return-1===t||t===e.length-1?{name:e,extension:void 0}:{name:e.slice(0,t),extension:e.slice(t+1)}}Ki.VERSION="3.2.2";var Xi={__proto__:null,md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",webp:"image/webp",gif:"image/gif",heic:"image/heic",heif:"image/heif",yaml:"text/yaml",yml:"text/yaml",csv:"text/csv",tsv:"text/tab-separated-values",tab:"text/tab-separated-values",avi:"video/x-msvideo",mks:"video/x-matroska",mkv:"video/x-matroska",mov:"video/quicktime",dicom:"application/dicom",doc:"application/msword",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlf:"application/x-xliff+xml",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",txt:"text/plain",text:"text/plain",conf:"text/plain",log:"text/plain",pdf:"application/pdf",zip:"application/zip","7z":"application/x-7z-compressed",rar:"application/x-rar-compressed",tar:"application/x-tar",gz:"application/gzip",dmg:"application/x-apple-diskimage"};function Qi(e){var t;if(e.type)return e.type;const n=e.name?null==(t=Ji(e.name).extension)?void 0:t.toLowerCase():null;return n&&n in Xi?Xi[n]:"application/octet-stream"}function Zi(e){let t="";return e.replace(/[^A-Z0-9]/gi,e=>(t+=`-${function(e){return e.charCodeAt(0).toString(32)}(e)}`,"/"))+t}function es(e,t){if(function(e){return!(!e.isRemote||!e.remote)&&new Set(["box","dropbox","drive","facebook","unsplash"]).has(e.remote.provider)}(e))return e.id;const n=Qi(e);return function(e,t){let n=t||"uppy";return"string"==typeof e.name&&(n+=`-${Zi(e.name.toLowerCase())}`),void 0!==e.type&&(n+=`-${e.type}`),e.meta&&"string"==typeof e.meta.relativePath&&(n+=`-${Zi(e.meta.relativePath.toLowerCase())}`),void 0!==e.data.size&&(n+=`-${e.data.size}`),void 0!==e.data.lastModified&&(n+=`-${e.data.lastModified}`),n}({...e,type:n},t)}function ts(e){if(null==e&&"undefined"!=typeof navigator&&(e=navigator.userAgent),!e)return!0;const t=/Edge\/(\d+\.\d+)/.exec(e);if(!t)return!0;const n=t[1].split(".",2),r=parseInt(n[0],10),o=parseInt(n[1],10);return r<15||15===r&&o<15063||(r>18||18===r&&o>=18218)}function ns(e){return e<10?`0${e}`:e.toString()}function rs(){const e=new Date;return`${ns(e.getHours())}:${ns(e.getMinutes())}:${ns(e.getSeconds())}`}const os={debug:()=>{},warn:()=>{},error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return console.error(`[Uppy] [${rs()}]`,...t)}},is={debug:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return console.debug(`[Uppy] [${rs()}]`,...t)},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return console.warn(`[Uppy] [${rs()}]`,...t)},error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return console.error(`[Uppy] [${rs()}]`,...t)}};var ss,as;var ls,cs,us,ds,hs=(as||(as=1,ss=function(e){if("number"!=typeof e||Number.isNaN(e))throw new TypeError("Expected a number, got "+typeof e);const t=e<0;let n=Math.abs(e);if(t&&(n=-n),0===n)return"0 B";const r=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],o=Math.min(Math.floor(Math.log(n)/Math.log(1024)),r.length-1),i=Number(n/1024**o),s=r[o];return`${i>=10||i%1==0?Math.round(i):i.toFixed(1)} ${s}`}),ss),ps=fe(hs);function _s(){if(cs)return ls;function e(e,t){this.text=e=e||"",this.hasWild=~e.indexOf("*"),this.separator=t,this.parts=e.split(t)}return cs=1,e.prototype.match=function(e){var t,n,r=!0,o=this.parts,i=o.length;if("string"==typeof e||e instanceof String)if(this.hasWild||this.text==e){for(n=(e||"").split(this.separator),t=0;r&&t<i;t++)"*"!==o[t]&&(r=t<n.length&&o[t]===n[t]);r=r&&n}else r=!1;else if("function"==typeof e.splice)for(r=[],t=e.length;t--;)this.match(e[t])&&(r[r.length]=e[t]);else if("object"==typeof e)for(var s in r={},e)this.match(s)&&(r[s]=e[s]);return r},ls=function(t,n,r){var o=new e(t,r||/[\/\.]/);return void 0!==n?o.match(n):o},ls}var fs=function(){if(ds)return us;ds=1;var e=_s(),t=/[\/\+\.]/;return us=function(n,r){function o(r){var o=e(r,n,t);return o&&o.length>=2}return r?o(r.split(";")[0]):o},us}(),ms=fe(fs);const gs={maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]};class ys extends Error{constructor(e,t){var n;super(e),this.isRestriction=!0,this.isUserFacing=null==(n=null==t?void 0:t.isUserFacing)||n,null!=t&&t.file&&(this.file=t.file)}}class vs{constructor(e,t){this.getI18n=t,this.getOpts=()=>{var t;const n=e();if(null!=(null==(t=n.restrictions)?void 0:t.allowedFileTypes)&&!Array.isArray(n.restrictions.allowedFileTypes))throw new TypeError("`restrictions.allowedFileTypes` must be an array");return n}}validateAggregateRestrictions(e,t){const{maxTotalFileSize:n,maxNumberOfFiles:r}=this.getOpts().restrictions;if(r){if(e.filter(e=>!e.isGhost).length+t.length>r)throw new ys(`${this.getI18n()("youCanOnlyUploadX",{smart_count:r})}`)}if(n){const r=[...e,...t].reduce((e,t)=>{var n;return e+(null!=(n=t.size)?n:0)},0);if(r>n)throw new ys(this.getI18n()("aggregateExceedsSize",{sizeAllowed:ps(n),size:ps(r)}))}}validateSingleFile(e){const{maxFileSize:t,minFileSize:n,allowedFileTypes:r}=this.getOpts().restrictions;if(r){if(!r.some(t=>t.includes("/")?!!e.type&&ms(e.type.replace(/;.*?$/,""),t):!("."!==t[0]||!e.extension)&&e.extension.toLowerCase()===t.slice(1).toLowerCase())){const t=r.join(", ");throw new ys(this.getI18n()("youCanOnlyUploadFileTypes",{types:t}),{file:e})}}if(t&&null!=e.size&&e.size>t)throw new ys(this.getI18n()("exceedsSize",{size:ps(t),file:e.name}),{file:e});if(n&&null!=e.size&&e.size<n)throw new ys(this.getI18n()("inferiorSize",{size:ps(n)}),{file:e})}validate(e,t){t.forEach(e=>{this.validateSingleFile(e)}),this.validateAggregateRestrictions(e,t)}validateMinNumberOfFiles(e){const{minNumberOfFiles:t}=this.getOpts().restrictions;if(t&&Object.keys(e).length<t)throw new ys(this.getI18n()("youHaveToAtLeastSelectX",{smart_count:t}))}getMissingRequiredMetaFields(e){const t=new ys(this.getI18n()("missingRequiredMetaFieldOnFile",{fileName:e.name})),{requiredMetaFields:n}=this.getOpts().restrictions,r=[];for(const t of n)Object.hasOwn(e.meta,t)&&""!==e.meta[t]||r.push(t);return{missingFields:r,error:t}}}var ws={strings:{addBulkFilesFailed:{0:"Failed to add %{smart_count} file due to an internal error",1:"Failed to add %{smart_count} files due to internal errors"},youCanOnlyUploadX:{0:"You can only upload %{smart_count} file",1:"You can only upload %{smart_count} files"},youHaveToAtLeastSelectX:{0:"You have to select at least %{smart_count} file",1:"You have to select at least %{smart_count} files"},aggregateExceedsSize:"You selected %{size} of files, but maximum allowed size is %{sizeAllowed}",exceedsSize:"%{file} exceeds maximum allowed size of %{size}",missingRequiredMetaField:"Missing required meta fields",missingRequiredMetaFieldOnFile:"Missing required meta fields in %{fileName}",inferiorSize:"This file is smaller than the allowed size of %{size}",youCanOnlyUploadFileTypes:"You can only upload: %{types}",noMoreFilesAllowed:"Cannot add more files",noDuplicates:"Cannot add the duplicate file '%{fileName}', it already exists",companionError:"Connection with Companion failed",authAborted:"Authentication aborted",companionUnauthorizeHint:"To unauthorize to your %{provider} account, please go to %{url}",failedToUpload:"Failed to upload %{file}",noInternetConnection:"No Internet connection",connectedToInternet:"Connected to the Internet",noFilesFound:"You have no files or folders here",noSearchResults:"Unfortunately, there are no results for this search",selectX:{0:"Select %{smart_count}",1:"Select %{smart_count}"},allFilesFromFolderNamed:"All files from folder %{name}",openFolderNamed:"Open folder %{name}",cancel:"Cancel",logOut:"Log out",filter:"Filter",resetFilter:"Reset filter",loading:"Loading...",loadedXFiles:"Loaded %{numFiles} files",authenticateWithTitle:"Please authenticate with %{pluginName} to select files",authenticateWith:"Connect to %{pluginName}",signInWithGoogle:"Sign in with Google",searchImages:"Search for images",enterTextToSearch:"Enter text to search for images",search:"Search",resetSearch:"Reset search",emptyFolderAdded:"No files were added from empty folder",addedNumFiles:"Added %{numFiles} file(s)",folderAlreadyAdded:'The folder "%{folder}" was already added',folderAdded:{0:"Added %{smart_count} file from %{folder}",1:"Added %{smart_count} files from %{folder}"},additionalRestrictionsFailed:"%{count} additional restrictions were not fulfilled",unnamed:"Unnamed"}};let bs,Ss;function Es(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var ks=0;function Ps(e){return"__private_"+ks+++"_"+e}const Ts={totalProgress:0,allowNewUpload:!0,error:null,recoveredState:null};var Os=Ps("plugins"),Cs=Ps("restricter"),xs=Ps("storeUnsubscribe"),Rs=Ps("emitter"),As=Ps("preProcessors"),Ns=Ps("uploaders"),Fs=Ps("postProcessors"),js=Ps("informAndEmit"),Is=Ps("checkRequiredMetaFieldsOnFile"),Ms=Ps("checkRequiredMetaFields"),Us=Ps("assertNewUploadAllowed"),Ls=Ps("transformFile"),zs=Ps("startIfAutoProceed"),Bs=Ps("checkAndUpdateFileState"),Ds=Ps("addListeners"),$s=Ps("updateOnlineStatus"),Ws=Ps("requestClientById"),qs=Ps("createUpload"),Hs=Ps("getUpload"),Vs=Ps("removeUpload"),Ys=Ps("runUpload");bs=Symbol.for("uppy test: getPlugins"),Ss=Symbol.for("uppy test: createUpload");class Ks{constructor(e){Object.defineProperty(this,Ys,{value:sa}),Object.defineProperty(this,Vs,{value:ia}),Object.defineProperty(this,Hs,{value:oa}),Object.defineProperty(this,qs,{value:ra}),Object.defineProperty(this,Ds,{value:na}),Object.defineProperty(this,Bs,{value:ta}),Object.defineProperty(this,zs,{value:ea}),Object.defineProperty(this,Ls,{value:Zs}),Object.defineProperty(this,Us,{value:Qs}),Object.defineProperty(this,Ms,{value:Xs}),Object.defineProperty(this,Is,{value:Js}),Object.defineProperty(this,js,{value:Gs}),Object.defineProperty(this,Os,{writable:!0,value:Object.create(null)}),Object.defineProperty(this,Cs,{writable:!0,value:void 0}),Object.defineProperty(this,xs,{writable:!0,value:void 0}),Object.defineProperty(this,Rs,{writable:!0,value:ri()}),Object.defineProperty(this,As,{writable:!0,value:new Set}),Object.defineProperty(this,Ns,{writable:!0,value:new Set}),Object.defineProperty(this,Fs,{writable:!0,value:new Set}),this.scheduledAutoProceed=null,this.wasOffline=!1,this.calculateProgress=$i((e,t)=>{const n=this.getFile(null==e?void 0:e.id);if(null==e||!n)return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);if(100===n.progress.percentage)return void this.log(`Not setting progress for a file that has been already uploaded: ${e.id}`);const r=Number.isFinite(t.bytesTotal)&&t.bytesTotal>0;this.setFileState(e.id,{progress:{...n.progress,bytesUploaded:t.bytesUploaded,bytesTotal:t.bytesTotal,percentage:r?Math.round(t.bytesUploaded/t.bytesTotal*100):0}}),this.calculateTotalProgress()},500,{leading:!0,trailing:!0}),Object.defineProperty(this,$s,{writable:!0,value:this.updateOnlineStatus.bind(this)}),Object.defineProperty(this,Ws,{writable:!0,value:new Map}),this.defaultLocale=ws;const t={id:"uppy",autoProceed:!1,allowMultipleUploadBatches:!0,debug:!1,restrictions:gs,meta:{},onBeforeFileAdded:(e,t)=>!Object.hasOwn(t,e.id),onBeforeUpload:e=>e,store:new Ki,logger:os,infoTimeout:5e3},n={...t,...e};this.opts={...n,restrictions:{...t.restrictions,...e&&e.restrictions}},e&&e.logger&&e.debug?this.log("You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.","warning"):e&&e.debug&&(this.opts.logger=is),this.log(`Using Core v${Ks.VERSION}`),this.i18nInit(),this.store=this.opts.store,this.setState({...Ts,plugins:{},files:{},currentUploads:{},capabilities:{uploadProgress:ts(),individualCancellation:!0,resumableUploads:!1},meta:{...this.opts.meta},info:[]}),Es(this,Cs)[Cs]=new vs(()=>this.opts,()=>this.i18n),Es(this,xs)[xs]=this.store.subscribe((e,t,n)=>{this.emit("state-update",e,t,n),this.updateAll(t)}),this.opts.debug&&"undefined"!=typeof window&&(window[this.opts.id]=this),Es(this,Ds)[Ds]()}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];Es(this,Rs)[Rs].emit(e,...n)}on(e,t){return Es(this,Rs)[Rs].on(e,t),this}once(e,t){return Es(this,Rs)[Rs].once(e,t),this}off(e,t){return Es(this,Rs)[Rs].off(e,t),this}updateAll(e){this.iteratePlugins(t=>{t.update(e)})}setState(e){this.store.setState(e)}getState(){return this.store.getState()}patchFilesState(e){const t=this.getState().files;this.setState({files:{...t,...Object.fromEntries(Object.entries(e).map(e=>{let[n,r]=e;return[n,{...t[n],...r}]}))}})}setFileState(e,t){if(!this.getState().files[e])throw new Error(`Can’t set state for ${e} (the file could have been removed)`);this.patchFilesState({[e]:t})}i18nInit(){const e=new ti([this.defaultLocale,this.opts.locale],{onMissingKey:e=>this.log(`Missing i18n string: ${e}`,"error")});this.i18n=e.translate.bind(e),this.i18nArray=e.translateArray.bind(e),this.locale=e.locale}setOptions(e){this.opts={...this.opts,...e,restrictions:{...this.opts.restrictions,...null==e?void 0:e.restrictions}},e.meta&&this.setMeta(e.meta),this.i18nInit(),e.locale&&this.iteratePlugins(t=>{t.setOptions(e)}),this.setState(void 0)}resetProgress(){const e={percentage:0,bytesUploaded:0,uploadComplete:!1,uploadStarted:null},t={...this.getState().files},n={};Object.keys(t).forEach(r=>{n[r]={...t[r],progress:{...t[r].progress,...e}}}),this.setState({files:n,...Ts}),this.emit("reset-progress")}clearUploadedFiles(){const{capabilities:e,currentUploads:t}=this.getState();if(Object.keys(t).length>0&&!e.individualCancellation)throw new Error("The installed uploader plugin does not allow removing files during an upload.");this.setState({...Ts,files:{}})}addPreProcessor(e){Es(this,As)[As].add(e)}removePreProcessor(e){return Es(this,As)[As].delete(e)}addPostProcessor(e){Es(this,Fs)[Fs].add(e)}removePostProcessor(e){return Es(this,Fs)[Fs].delete(e)}addUploader(e){Es(this,Ns)[Ns].add(e)}removeUploader(e){return Es(this,Ns)[Ns].delete(e)}setMeta(e){const t={...this.getState().meta,...e},n={...this.getState().files};Object.keys(n).forEach(t=>{n[t]={...n[t],meta:{...n[t].meta,...e}}}),this.log("Adding metadata:"),this.log(e),this.setState({meta:t,files:n})}setFileMeta(e,t){const n={...this.getState().files};if(!n[e])return void this.log("Was trying to set metadata for a file that has been removed: ",e);const r={...n[e].meta,...t};n[e]={...n[e],meta:r},this.setState({files:n})}getFile(e){return this.getState().files[e]}getFiles(){const{files:e}=this.getState();return Object.values(e)}getFilesByIds(e){return e.map(e=>this.getFile(e))}getObjectOfFilesPerState(){const{files:e,totalProgress:t,error:n}=this.getState(),r=Object.values(e),o=[],i=[],s=[],a=[],l=[],c=[],u=[],d=[],h=[];for(const e of r){const{progress:t}=e;!t.uploadComplete&&t.uploadStarted&&(o.push(e),e.isPaused||d.push(e)),t.uploadStarted||i.push(e),(t.uploadStarted||t.preprocess||t.postprocess)&&s.push(e),t.uploadStarted&&a.push(e),e.isPaused&&l.push(e),t.uploadComplete&&c.push(e),e.error&&u.push(e),(t.preprocess||t.postprocess)&&h.push(e)}return{newFiles:i,startedFiles:s,uploadStartedFiles:a,pausedFiles:l,completeFiles:c,erroredFiles:u,inProgressFiles:o,inProgressNotPausedFiles:d,processingFiles:h,isUploadStarted:a.length>0,isAllComplete:100===t&&c.length===r.length&&0===h.length,isAllErrored:!!n&&u.length===r.length,isAllPaused:0!==o.length&&l.length===o.length,isUploadInProgress:o.length>0,isSomeGhost:r.some(e=>e.isGhost)}}validateRestrictions(e,t){void 0===t&&(t=this.getFiles());try{Es(this,Cs)[Cs].validate(t,[e])}catch(e){return e}return null}checkIfFileAlreadyExists(e){const{files:t}=this.getState();return!(!t[e]||t[e].isGhost)}addFile(e){Es(this,Us)[Us](e);const{nextFilesState:t,validFilesToAdd:n,errors:r}=Es(this,Bs)[Bs]([e]),o=r.filter(e=>e.isRestriction);if(Es(this,js)[js](o),r.length>0)throw r[0];this.setState({files:t});const[i]=n;return this.emit("file-added",i),this.emit("files-added",n),this.log(`Added file: ${i.name}, ${i.id}, mime type: ${i.type}`),Es(this,zs)[zs](),i.id}addFiles(e){Es(this,Us)[Us]();const{nextFilesState:t,validFilesToAdd:n,errors:r}=Es(this,Bs)[Bs](e),o=r.filter(e=>e.isRestriction);Es(this,js)[js](o);const i=r.filter(e=>!e.isRestriction);if(i.length>0){let e="Multiple errors occurred while adding files:\n";if(i.forEach(t=>{e+=`\n * ${t.message}`}),this.info({message:this.i18n("addBulkFilesFailed",{smart_count:i.length}),details:e},"error",this.opts.infoTimeout),"function"==typeof AggregateError)throw new AggregateError(i,e);{const t=new Error(e);throw t.errors=i,t}}this.setState({files:t}),n.forEach(e=>{this.emit("file-added",e)}),this.emit("files-added",n),n.length>5?this.log(`Added batch of ${n.length} files`):Object.values(n).forEach(e=>{this.log(`Added file: ${e.name}\n id: ${e.id}\n type: ${e.type}`)}),n.length>0&&Es(this,zs)[zs]()}removeFiles(e,t){const{files:n,currentUploads:r}=this.getState(),o={...n},i={...r},s=Object.create(null);function a(e){return void 0===s[e]}e.forEach(e=>{n[e]&&(s[e]=n[e],delete o[e])}),Object.keys(i).forEach(e=>{const t=r[e].fileIDs.filter(a);if(0===t.length)return void delete i[e];const{capabilities:n}=this.getState();if(t.length!==r[e].fileIDs.length&&!n.individualCancellation)throw new Error("The installed uploader plugin does not allow removing files during an upload.");i[e]={...r[e],fileIDs:t}});const l={currentUploads:i,files:o};0===Object.keys(o).length&&(l.allowNewUpload=!0,l.error=null,l.recoveredState=null),this.setState(l),this.calculateTotalProgress();const c=Object.keys(s);c.forEach(e=>{this.emit("file-removed",s[e],t)}),c.length>5?this.log(`Removed ${c.length} files`):this.log(`Removed files: ${c.join(", ")}`)}removeFile(e,t){this.removeFiles([e],t)}pauseResume(e){if(!this.getState().capabilities.resumableUploads||this.getFile(e).progress.uploadComplete)return;const t=!(this.getFile(e).isPaused||!1);return this.setFileState(e,{isPaused:t}),this.emit("upload-pause",e,t),t}pauseAll(){const e={...this.getState().files};Object.keys(e).filter(t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted).forEach(t=>{const n={...e[t],isPaused:!0};e[t]=n}),this.setState({files:e}),this.emit("pause-all")}resumeAll(){const e={...this.getState().files};Object.keys(e).filter(t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted).forEach(t=>{const n={...e[t],isPaused:!1,error:null};e[t]=n}),this.setState({files:e}),this.emit("resume-all")}retryAll(){const e={...this.getState().files},t=Object.keys(e).filter(t=>e[t].error);if(t.forEach(t=>{const n={...e[t],isPaused:!1,error:null};e[t]=n}),this.setState({files:e,error:null}),this.emit("retry-all",t),0===t.length)return Promise.resolve({successful:[],failed:[]});const n=Es(this,qs)[qs](t,{forceAllowNewUpload:!0});return Es(this,Ys)[Ys](n)}cancelAll(e){let{reason:t="user"}=void 0===e?{}:e;if(this.emit("cancel-all",{reason:t}),"user"===t){const{files:e}=this.getState(),t=Object.keys(e);t.length&&this.removeFiles(t,"cancel-all"),this.setState(Ts)}}retryUpload(e){this.setFileState(e,{error:null,isPaused:!1}),this.emit("upload-retry",e);const t=Es(this,qs)[qs]([e],{forceAllowNewUpload:!0});return Es(this,Ys)[Ys](t)}logout(){this.iteratePlugins(e=>{var t;null==(t=e.provider)||null==t.logout||t.logout()})}calculateTotalProgress(){const e=this.getFiles().filter(e=>e.progress.uploadStarted||e.progress.preprocess||e.progress.postprocess);if(0===e.length)return this.emit("progress",0),void this.setState({totalProgress:0});const t=e.filter(e=>null!=e.progress.bytesTotal),n=e.filter(e=>null==e.progress.bytesTotal);if(0===t.length){const t=100*e.length,r=n.reduce((e,t)=>e+t.progress.percentage,0),o=Math.round(r/t*100);return void this.setState({totalProgress:o})}let r=t.reduce((e,t)=>{var n;return e+(null!=(n=t.progress.bytesTotal)?n:0)},0);const o=r/t.length;r+=o*n.length;let i=0;t.forEach(e=>{i+=e.progress.bytesUploaded}),n.forEach(e=>{i+=o*(e.progress.percentage||0)/100});let s=0===r?0:Math.round(i/r*100);s>100&&(s=100),this.setState({totalProgress:s}),this.emit("progress",s)}updateOnlineStatus(){var e;null==(e=window.navigator.onLine)||e?(this.emit("is-online"),this.wasOffline&&(this.emit("back-online"),this.info(this.i18n("connectedToInternet"),"success",3e3),this.wasOffline=!1)):(this.emit("is-offline"),this.info(this.i18n("noInternetConnection"),"error",0),this.wasOffline=!0)}getID(){return this.opts.id}use(e,t){if("function"!=typeof e){throw new TypeError(`Expected a plugin class, but got ${null===e?"null":typeof e}. Please verify that the plugin was imported and spelled correctly.`)}const n=new e(this,t),r=n.id;if(!r)throw new Error("Your plugin must have an id");if(!n.type)throw new Error("Your plugin must have a type");const o=this.getPlugin(r);if(o){const e=`Already found a plugin named '${o.id}'. Tried to use: '${r}'.\nUppy plugins must have unique \`id\` options. See https://uppy.io/docs/plugins/#id.`;throw new Error(e)}return e.VERSION&&this.log(`Using ${r} v${e.VERSION}`),n.type in Es(this,Os)[Os]?Es(this,Os)[Os][n.type].push(n):Es(this,Os)[Os][n.type]=[n],n.install(),this.emit("plugin-added",n),this}getPlugin(e){for(const t of Object.values(Es(this,Os)[Os])){const n=t.find(t=>t.id===e);if(null!=n)return n}}[bs](e){return Es(this,Os)[Os][e]}iteratePlugins(e){Object.values(Es(this,Os)[Os]).flat(1).forEach(e)}removePlugin(e){this.log(`Removing plugin ${e.id}`),this.emit("plugin-remove",e),e.uninstall&&e.uninstall();const t=Es(this,Os)[Os][e.type],n=t.findIndex(t=>t.id===e.id);-1!==n&&t.splice(n,1);const r={plugins:{...this.getState().plugins,[e.id]:void 0}};this.setState(r)}close(e){let{reason:t}=void 0===e?{}:e;this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`),this.cancelAll({reason:t}),Es(this,xs)[xs](),this.iteratePlugins(e=>{this.removePlugin(e)}),"undefined"!=typeof window&&window.removeEventListener&&(window.removeEventListener("online",Es(this,$s)[$s]),window.removeEventListener("offline",Es(this,$s)[$s]))}hideInfo(){const{info:e}=this.getState();this.setState({info:e.slice(1)}),this.emit("info-hidden")}info(e,t,n){void 0===t&&(t="info"),void 0===n&&(n=3e3);const r="object"==typeof e;this.setState({info:[...this.getState().info,{type:t,message:r?e.message:e,details:r?e.details:null}]}),setTimeout(()=>this.hideInfo(),n),this.emit("info-visible")}log(e,t){const{logger:n}=this.opts;switch(t){case"error":n.error(e);break;case"warning":n.warn(e);break;default:n.debug(e)}}registerRequestClient(e,t){Es(this,Ws)[Ws].set(e,t)}getRequestClientForFile(e){if(!e.remote)throw new Error(`Tried to get RequestClient for a non-remote file ${e.id}`);const t=Es(this,Ws)[Ws].get(e.remote.requestClientId);if(null==t)throw new Error(`requestClientId "${e.remote.requestClientId}" not registered for file "${e.id}"`);return t}restore(e){return this.log(`Core: attempting to restore upload "${e}"`),this.getState().currentUploads[e]?Es(this,Ys)[Ys](e):(Es(this,Vs)[Vs](e),Promise.reject(new Error("Nonexistent upload")))}[Ss](){return Es(this,qs)[qs](...arguments)}addResultData(e,t){if(!Es(this,Hs)[Hs](e))return void this.log(`Not setting result for an upload that has been removed: ${e}`);const{currentUploads:n}=this.getState(),r={...n[e],result:{...n[e].result,...t}};this.setState({currentUploads:{...n,[e]:r}})}upload(){var e;null!=(e=Es(this,Os)[Os].uploader)&&e.length||this.log("No uploader type plugins are used","warning");let{files:t}=this.getState();const n=this.opts.onBeforeUpload(t);return!1===n?Promise.reject(new Error("Not starting the upload because onBeforeUpload returned false")):(n&&"object"==typeof n&&(t=n,this.setState({files:t})),Promise.resolve().then(()=>Es(this,Cs)[Cs].validateMinNumberOfFiles(t)).catch(e=>{throw Es(this,js)[js]([e]),e}).then(()=>{if(!Es(this,Ms)[Ms](t))throw new ys(this.i18n("missingRequiredMetaField"))}).catch(e=>{throw e}).then(()=>{const{currentUploads:e}=this.getState(),n=Object.values(e).flatMap(e=>e.fileIDs),r=[];Object.keys(t).forEach(e=>{const t=this.getFile(e);t.progress.uploadStarted||-1!==n.indexOf(e)||r.push(t.id)});const o=Es(this,qs)[qs](r);return Es(this,Ys)[Ys](o)}).catch(e=>{throw this.emit("error",e),this.log(e,"error"),e}))}}function Gs(e){for(const t of e)t.isRestriction?this.emit("restriction-failed",t.file,t):this.emit("error",t,t.file),this.log(t,"warning");const t=e.filter(e=>e.isUserFacing),n=t.slice(0,4),r=t.slice(4);n.forEach(e=>{let{message:t,details:n=""}=e;this.info({message:t,details:n},"error",this.opts.infoTimeout)}),r.length>0&&this.info({message:this.i18n("additionalRestrictionsFailed",{count:r.length})})}function Js(e){const{missingFields:t,error:n}=Es(this,Cs)[Cs].getMissingRequiredMetaFields(e);return!(t.length>0)||(this.setFileState(e.id,{missingRequiredMetaFields:t}),this.log(n.message),this.emit("restriction-failed",e,n),!1)}function Xs(e){let t=!0;for(const n of Object.values(e))Es(this,Is)[Is](n)||(t=!1);return t}function Qs(e){const{allowNewUpload:t}=this.getState();if(!1===t){const t=new ys(this.i18n("noMoreFilesAllowed"),{file:e});throw Es(this,js)[js]([t]),t}}function Zs(e){const t=e instanceof File?{name:e.name,type:e.type,size:e.size,data:e}:e,n=Qi(t),r=function(e,t){return t.name?t.name:"image"===e.split("/")[0]?`${e.split("/")[0]}.${e.split("/")[1]}`:"noname"}(n,t),o=Ji(r).extension,i=es(t,this.getID()),s=t.meta||{};s.name=r,s.type=n;const a=Number.isFinite(t.data.size)?t.data.size:null;return{source:t.source||"",id:i,name:r,extension:o||"",meta:{...this.getState().meta,...s},type:n,data:t.data,progress:{percentage:0,bytesUploaded:0,bytesTotal:a,uploadComplete:!1,uploadStarted:null},size:a,isGhost:!1,isRemote:t.isRemote||!1,remote:t.remote||"",preview:t.preview}}function ea(){this.opts.autoProceed&&!this.scheduledAutoProceed&&(this.scheduledAutoProceed=setTimeout(()=>{this.scheduledAutoProceed=null,this.upload().catch(e=>{e.isRestriction||this.log(e.stack||e.message||e)})},4))}function ta(e){const{files:t}=this.getState(),n={...t},r=[],o=[];for(const s of e)try{var i;let e=Es(this,Ls)[Ls](s);const o=null==(i=t[e.id])?void 0:i.isGhost;if(o){e={...t[e.id],isGhost:!1,data:s.data},this.log(`Replaced the blob in the restored ghost file: ${e.name}, ${e.id}`)}const a=this.opts.onBeforeFileAdded(e,n);if(!a&&this.checkIfFileAlreadyExists(e.id))throw new ys(this.i18n("noDuplicates",{fileName:e.name}),{file:s});if(!1===a&&!o)throw new ys("Cannot add the file because onBeforeFileAdded returned false.",{isUserFacing:!1,file:s});"object"==typeof a&&null!==a&&(e=a),Es(this,Cs)[Cs].validateSingleFile(e),n[e.id]=e,r.push(e)}catch(e){o.push(e)}try{Es(this,Cs)[Cs].validateAggregateRestrictions(Object.values(t),r)}catch(e){return o.push(e),{nextFilesState:t,validFilesToAdd:[],errors:o}}return{nextFilesState:n,validFilesToAdd:r,errors:o}}function na(){const e=(e,t,n)=>{let r=e.message||"Unknown error";e.details&&(r+=` ${e.details}`),this.setState({error:r}),null!=t&&t.id in this.getState().files&&this.setFileState(t.id,{error:r,response:n})};this.on("error",e),this.on("upload-error",(t,n,r)=>{if(e(n,t,r),"object"==typeof n&&n.message){var o;this.log(n.message,"error");const e=new Error(this.i18n("failedToUpload",{file:null!=(o=null==t?void 0:t.name)?o:""}));e.isUserFacing=!0,e.details=n.message,n.details&&(e.details+=` ${n.details}`),Es(this,js)[js]([e])}else Es(this,js)[js]([n])});let t=null;this.on("upload-stalled",(e,n)=>{const{message:r}=e,o=n.map(e=>e.meta.name).join(", ");t||(this.info({message:r,details:o},"warning",this.opts.infoTimeout),t=setTimeout(()=>{t=null},this.opts.infoTimeout)),this.log(`${r} ${o}`.trim(),"warning")}),this.on("upload",()=>{this.setState({error:null})});const n=e=>{const t=e.filter(e=>{const t=null!=e&&this.getFile(e.id);return t||this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`),t}),n=Object.fromEntries(t.map(e=>[e.id,{progress:{uploadStarted:Date.now(),uploadComplete:!1,percentage:0,bytesUploaded:0,bytesTotal:e.size}}]));this.patchFilesState(n)};this.on("upload-start",e=>{e.forEach(e=>{this.emit("upload-started",e)}),n(e)}),this.on("upload-progress",this.calculateProgress),this.on("upload-success",(e,t)=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const n=this.getFile(e.id).progress;this.setFileState(e.id,{progress:{...n,postprocess:Es(this,Fs)[Fs].size>0?{mode:"indeterminate"}:void 0,uploadComplete:!0,percentage:100,bytesUploaded:n.bytesTotal},response:t,uploadURL:t.uploadURL,isPaused:!1}),null==e.size&&this.setFileState(e.id,{size:t.bytesUploaded||n.bytesTotal}),this.calculateTotalProgress()}),this.on("preprocess-progress",(e,t)=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{...this.getFile(e.id).progress,preprocess:t}}):this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`)}),this.on("preprocess-complete",e=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const t={...this.getState().files};t[e.id]={...t[e.id],progress:{...t[e.id].progress}},delete t[e.id].progress.preprocess,this.setState({files:t})}),this.on("postprocess-progress",(e,t)=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{...this.getState().files[e.id].progress,postprocess:t}}):this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`)}),this.on("postprocess-complete",e=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const t={...this.getState().files};t[e.id]={...t[e.id],progress:{...t[e.id].progress}},delete t[e.id].progress.postprocess,this.setState({files:t})}),this.on("restored",()=>{this.calculateTotalProgress()}),this.on("dashboard:file-edit-complete",e=>{e&&Es(this,Is)[Is](e)}),"undefined"!=typeof window&&window.addEventListener&&(window.addEventListener("online",Es(this,$s)[$s]),window.addEventListener("offline",Es(this,$s)[$s]),setTimeout(Es(this,$s)[$s],3e3))}function ra(e,t){void 0===t&&(t={});const{forceAllowNewUpload:n=!1}=t,{allowNewUpload:r,currentUploads:o}=this.getState();if(!r&&!n)throw new Error("Cannot create a new upload: already uploading.");const i=((e=21)=>{let t="",n=e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t})();return this.emit("upload",{id:i,fileIDs:e}),this.setState({allowNewUpload:!1!==this.opts.allowMultipleUploadBatches&&!1!==this.opts.allowMultipleUploads,currentUploads:{...o,[i]:{fileIDs:e,step:0,result:{}}}}),i}function oa(e){const{currentUploads:t}=this.getState();return t[e]}function ia(e){const t={...this.getState().currentUploads};delete t[e],this.setState({currentUploads:t})}async function sa(e){const t=()=>{const{currentUploads:t}=this.getState();return t[e]};let n=t();const r=[...Es(this,As)[As],...Es(this,Ns)[Ns],...Es(this,Fs)[Fs]];try{for(let o=n.step||0;o<r.length&&n;o++){const i=r[o];this.setState({currentUploads:{...this.getState().currentUploads,[e]:{...n,step:o}}});const{fileIDs:s}=n;await i(s,e),n=t()}}catch(t){throw Es(this,Vs)[Vs](e),t}if(n){n.fileIDs.forEach(e=>{const t=this.getFile(e);t&&t.progress.postprocess&&this.emit("postprocess-complete",t)});const r=n.fileIDs.map(e=>this.getFile(e)),o=r.filter(e=>!e.error),i=r.filter(e=>e.error);this.addResultData(e,{successful:o,failed:i,uploadID:e}),n=t()}let o;return n&&(o=n.result,this.emit("complete",o),Es(this,Vs)[Vs](e)),null==o&&this.log(`Not setting result for an upload that has been removed: ${e}`),o}Ks.VERSION="3.13.1";class aa{constructor(e,t){this.uppy=e,this.opts=null!=t?t:{}}getPluginState(){const{plugins:e}=this.uppy.getState();return(null==e?void 0:e[this.id])||{}}setPluginState(e){const{plugins:t}=this.uppy.getState();this.uppy.setState({plugins:{...t,[this.id]:{...t[this.id],...e}}})}setOptions(e){this.opts={...this.opts,...e},this.setPluginState(void 0),this.i18nInit()}i18nInit(){const e=new ti([this.defaultLocale,this.uppy.locale,this.opts.locale]);this.i18n=e.translate.bind(e),this.i18nArray=e.translateArray.bind(e),this.setPluginState(void 0)}addTarget(e){throw new Error("Extend the addTarget method to add your plugin to another plugin's target")}install(){}uninstall(){}update(e){}afterUpdate(){}}class la extends Error{constructor(){super(...arguments),this.name="UserFacingApiError"}}var ca,ua,da,ha,pa,_a={};function fa(){return da||(da=1,e=_a,t=function(){if(ua)return ca;function e(e,t){"boolean"==typeof t&&(t={forever:t}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=t||{},this._maxRetryTime=t&&t.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}return ua=1,ca=e,e.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},e.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},e.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var t=(new Date).getTime();if(e&&t-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var n=this._timeouts.shift();if(void 0===n){if(!this._cachedTimeouts)return!1;this._errors.splice(0,this._errors.length-1),n=this._cachedTimeouts.slice(-1)}var r=this;return this._timer=setTimeout(function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout(function(){r._operationTimeoutCb(r._attempts)},r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)},n),this._options.unref&&this._timer.unref(),!0},e.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var n=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){n._operationTimeoutCb()},n._operationTimeout)),this._operationStart=(new Date).getTime(),this._fn(this._attempts)},e.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)},e.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)},e.prototype.start=e.prototype.try,e.prototype.errors=function(){return this._errors},e.prototype.attempts=function(){return this._attempts},e.prototype.mainError=function(){if(0===this._errors.length)return null;for(var e={},t=null,n=0,r=0;r<this._errors.length;r++){var o=this._errors[r],i=o.message,s=(e[i]||0)+1;e[i]=s,s>=n&&(t=o,n=s)}return t},ca}(),e.operation=function(n){var r=e.timeouts(n);return new t(r,{forever:n&&(n.forever||n.retries===1/0),unref:n&&n.unref,maxRetryTime:n&&n.maxRetryTime})},e.timeouts=function(e){if(e instanceof Array)return[].concat(e);var t={retries:10,factor:2,minTimeout:1e3,maxTimeout:1/0,randomize:!1};for(var n in e)t[n]=e[n];if(t.minTimeout>t.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var r=[],o=0;o<t.retries;o++)r.push(this.createTimeout(o,t));return e&&e.forever&&!r.length&&r.push(this.createTimeout(o,t)),r.sort(function(e,t){return e-t}),r},e.createTimeout=function(e,t){var n=t.randomize?Math.random()+1:1,r=Math.round(n*Math.max(t.minTimeout,1)*Math.pow(t.factor,e));return r=Math.min(r,t.maxTimeout)},e.wrap=function(t,n,r){if(n instanceof Array&&(r=n,n=null),!r)for(var o in r=[],t)"function"==typeof t[o]&&r.push(o);for(var i=0;i<r.length;i++){var s=r[i],a=t[s];t[s]=function(r){var o=e.operation(n),i=Array.prototype.slice.call(arguments,1),s=i.pop();i.push(function(e){o.retry(e)||(e&&(arguments[0]=o.mainError()),s.apply(this,arguments))}),o.attempt(function(){r.apply(t,i)})}.bind(t,a),t[s].options=n}}),_a;var e,t}var ma=fe(pa?ha:(pa=1,ha=fa()));const ga=Object.prototype.toString,ya=new Set(["network error","Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed","fetch failed","terminated"," A network error occurred.","Network connection lost"]);function va(e){const t=e&&(e=>"[object Error]"===ga.call(e))(e)&&"TypeError"===e.name&&"string"==typeof e.message;if(!t)return!1;const{message:n,stack:r}=e;return"Load failed"===n?void 0===r||"__sentry_captured__"in e:!!n.startsWith("error sending request for url")||ya.has(n)}class wa extends Error{constructor(e){super(),e instanceof Error?(this.originalError=e,({message:e}=e)):(this.originalError=new Error(e),this.originalError.stack=this.stack),this.name="AbortError",this.message=e}}const ba=(e,t,n)=>{const r=n.retries-(t-1);return e.attemptNumber=t,e.retriesLeft=r,e};async function Sa(e,t){return new Promise((n,r)=>{t={...t},t.onFailedAttempt??=()=>{},t.shouldRetry??=()=>!0,t.retries??=10;const o=ma.operation(t),i=()=>{o.stop(),r(t.signal?.reason)};t.signal&&!t.signal.aborted&&t.signal.addEventListener("abort",i,{once:!0});const s=()=>{t.signal?.removeEventListener("abort",i),o.stop()};o.attempt(async i=>{try{const t=await e(i);s(),n(t)}catch(e){try{if(!(e instanceof Error))throw new TypeError(`Non-error was thrown: "${e}". You should only throw errors.`);if(e instanceof wa)throw e.originalError;if(e instanceof TypeError&&!va(e))throw e;if(ba(e,i,t),await t.shouldRetry(e)||(o.stop(),r(e)),await t.onFailedAttempt(e),!o.retry(e))throw o.mainError()}catch(e){ba(e,i,t),s(),r(e)}}})})}class Ea extends Error{constructor(e,t){void 0===t&&(t=null),super("This looks like a network error, the endpoint might be blocked by an internet provider or a firewall."),this.cause=e,this.isNetworkError=!0,this.request=t}}function ka(e,t){return Object.prototype.hasOwnProperty.call(e,t)}class Pa extends Error{constructor(e,t){super(e),this.cause=null==t?void 0:t.cause,this.cause&&ka(this.cause,"isNetworkError")?this.isNetworkError=this.cause.isNetworkError:this.isNetworkError=!1}}var Ta=$i(function(e,t,n){const{progress:r,bytesUploaded:o,bytesTotal:i}=t;r&&(e.uppy.log(`Upload progress: ${r}`),e.uppy.emit("upload-progress",n,{uploader:e,bytesUploaded:o,bytesTotal:i}))},300,{leading:!0,trailing:!0});class Oa extends Error{constructor(){super("Authorization required"),this.name="AuthError",this.isAuthError=!0}}let Ca;function xa(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var Ra=0;function Aa(e){return"__private_"+Ra+++"_"+e}class Na extends Error{constructor(e){let{statusCode:t,message:n}=e;super(n),this.name="HttpError",this.statusCode=t}}var Fa=Aa("companionHeaders"),ja=Aa("getUrl"),Ia=Aa("requestSocketToken"),Ma=Aa("awaitRemoteFileUpload");Ca=Symbol.for("uppy test: getCompanionHeaders");class Ua{constructor(e,t){Object.defineProperty(this,Ma,{value:za}),Object.defineProperty(this,ja,{value:La}),Object.defineProperty(this,Fa,{writable:!0,value:void 0}),Object.defineProperty(this,Ia,{writable:!0,value:async e=>{var t;let{file:n,postBody:r,signal:o}=e;if(null==(null==(t=n.remote)?void 0:t.url))throw new Error("Cannot connect to an undefined URL");return(await this.post(n.remote.url,{...n.remote.body,...r},{signal:o})).token}}),this.uppy=e,this.opts=t,this.onReceiveResponse=this.onReceiveResponse.bind(this),xa(this,Fa)[Fa]=null==t?void 0:t.companionHeaders}setCompanionHeaders(e){xa(this,Fa)[Fa]=e}[Ca](){return xa(this,Fa)[Fa]}get hostname(){const{companion:e}=this.uppy.getState(),t=this.opts.companionUrl;return function(e){return e.replace(/\/$/,"")}(e&&e[t]?e[t]:t)}async headers(e){void 0===e&&(e=!1);return{...{Accept:"application/json",...e?void 0:{"Content-Type":"application/json"}},...xa(this,Fa)[Fa]}}onReceiveResponse(e){const{headers:t}=e,n=this.uppy.getState().companion||{},r=this.opts.companionUrl;t.has("i-am")&&t.get("i-am")!==n[r]&&this.uppy.setState({companion:{...n,[r]:t.get("i-am")}})}async request(e){let{path:t,method:n="GET",data:r,skipPostResponse:o,signal:i}=e;try{const e=await this.headers(!r),s=await function(){return fetch(...arguments).catch(e=>{throw"AbortError"===e.name?e:new Ea(e)})}(xa(this,ja)[ja](t),{method:n,signal:i,headers:e,credentials:this.opts.companionCookiesRule||"same-origin",body:r?JSON.stringify(r):null});return o||this.onReceiveResponse(s),await async function(e){if(401===e.status)throw new Oa;if(e.ok)return e.json();let t,n=`Failed request with status: ${e.status}. ${e.statusText}`;try{t=await e.json(),t.message&&(n=`${n} message: ${t.message}`),t.requestId&&(n=`${n} request-Id: ${t.requestId}`)}catch(e){throw new Error(n,{cause:e})}if(e.status>=400&&e.status<=499&&t.message)throw new la(t.message);throw new Na({statusCode:e.status,message:n})}(s)}catch(e){if(e.isAuthError||"UserFacingApiError"===e.name||"AbortError"===e.name)throw e;throw new Pa(`Could not ${n} ${xa(this,ja)[ja](t)}`,{cause:e})}}async get(e,t){return"boolean"==typeof t&&(t={skipPostResponse:t}),this.request({...t,path:e})}async post(e,t,n){return"boolean"==typeof n&&(n={skipPostResponse:n}),this.request({...n,path:e,method:"POST",data:t})}async delete(e,t,n){return"boolean"==typeof n&&(n={skipPostResponse:n}),this.request({...n,path:e,method:"DELETE",data:t})}async uploadRemoteFile(e,t,n){var r=this;try{const{signal:o,getQueue:i}=n||{};return await Sa(async()=>{var n;const s=null==(n=this.uppy.getFile(e.id))?void 0:n.serverToken;if(null!=s)return this.uppy.log(`Connecting to exiting websocket ${s}`),xa(this,Ma)[Ma]({file:e,queue:i(),signal:o});const a=i().wrapPromiseFunction(async function(){try{return await xa(r,Ia)[Ia](...arguments)}catch(e){if(e.isAuthError)throw new wa(e);if(null==e.cause)throw e;const t=e.cause,n=()=>[408,409,429,418,423].includes(t.statusCode)||t.statusCode>=500&&t.statusCode<=599&&![501,505].includes(t.statusCode);if("HttpError"===t.name&&!n())throw new wa(t);throw t}},{priority:-1}),l=await a({file:e,postBody:t,signal:o}).abortOn(o);return this.uppy.getFile(e.id)?(this.uppy.setFileState(e.id,{serverToken:l}),xa(this,Ma)[Ma]({file:this.uppy.getFile(e.id),queue:i(),signal:o})):void 0},{retries:10,signal:o,onFailedAttempt:e=>this.uppy.log(`Retrying upload due to: ${e.message}`,"warning")})}catch(t){if("AbortError"===t.name)return;throw this.uppy.emit("upload-error",e,t),t}}}function La(e){return/^(https?:|)\/\//.test(e)?e:`${this.hostname}/${e}`}async function za(e){let t,{file:n,queue:r,signal:o}=e;const{capabilities:i}=this.uppy.getState();try{return await new Promise((e,s)=>{const a=n.serverToken,l=function(e){var t;const n=null==(t=/^(?:https?:\/\/|\/\/)?(?:[^@\n]+@)?(?:www\.)?([^\n]+)/i.exec(e))?void 0:t[1];return`${/^http:\/\//i.test(e)?"ws":"wss"}://${n}`}(n.remote.companionUrl);let c,u,d,{isPaused:h}=n;const p=(e,t)=>{var r;null!=c&&c.readyState===c.OPEN?c.send(JSON.stringify({action:e,payload:null!=t?t:{}})):this.uppy.log(`Cannot send "${e}" to socket ${n.id} because the socket state was ${String(null==(r=c)?void 0:r.readyState)}`,"warning")};function _(){i.resumableUploads&&p(h?"pause":"resume")}const f=async()=>{u&&u.abort(),u=new AbortController;const t=e=>{var t;this.uppy.setFileState(n.id,{serverToken:null}),null==(t=u)||null==t.abort||t.abort(),s(e)};function o(){clearTimeout(d),h||(d=setTimeout(()=>t(new Error("Timeout waiting for message from Companion socket")),3e5))}try{await r.wrapPromiseFunction(async()=>{await Sa(async()=>new Promise((r,i)=>{c=new WebSocket(`${l}/api/${a}`),o(),c.addEventListener("close",()=>{c=void 0,i(new Error("Socket closed unexpectedly"))}),c.addEventListener("error",e=>{var t;this.uppy.log(`Companion socket error ${JSON.stringify(e)}, closing socket`,"warning"),null==(t=c)||t.close()}),c.addEventListener("open",()=>{_()}),c.addEventListener("message",r=>{o();try{const{action:t,payload:o}=JSON.parse(r.data);switch(t){case"progress":Ta(this,o,this.uppy.getFile(n.id));break;case"success":{var i,s,a,l;const t=null==(i=o.response)?void 0:i.responseText;this.uppy.emit("upload-success",this.uppy.getFile(n.id),{uploadURL:o.url,status:null!=(s=null==(a=o.response)?void 0:a.status)?s:200,body:t?JSON.parse(t):void 0}),null==(l=u)||null==l.abort||l.abort(),e();break}case"error":{const{message:e}=o.error;throw Object.assign(new Error(e),{cause:o.error})}default:this.uppy.log(`Companion socket unknown action ${t}`,"warning")}}catch(e){t(e)}});const s=()=>{this.uppy.log(`Closing socket ${n.id}`,"info"),clearTimeout(d),c&&c.close(),c=void 0};u.signal.addEventListener("abort",()=>{s()})}),{retries:10,signal:u.signal,onFailedAttempt:()=>{u.signal.aborted||this.uppy.log(`Retrying websocket ${n.id}`,"info")}})})().abortOn(u.signal)}catch(e){if(u.signal.aborted)return;t(e)}},m=e=>{var t;i.resumableUploads&&(h=e,c&&_(),e?null==(t=u)||null==t.abort||t.abort():f())},g=t=>{var r;i.individualCancellation&&t.id===n.id&&(p("cancel"),null==(r=u)||null==r.abort||r.abort(),this.uppy.log(`upload ${n.id} was removed`,"info"),e())},y=t=>{var r;let{reason:o}=t;"user"===o&&p("cancel"),null==(r=u)||null==r.abort||r.abort(),this.uppy.log(`upload ${n.id} was canceled`,"info"),e()},v=(e,t)=>{e===n.id&&m(t)},w=()=>m(!0),b=()=>m(!1);this.uppy.on("file-removed",g),this.uppy.on("cancel-all",y),this.uppy.on("upload-pause",v),this.uppy.on("pause-all",w),this.uppy.on("resume-all",b),t=()=>{this.uppy.off("file-removed",g),this.uppy.off("cancel-all",y),this.uppy.off("upload-pause",v),this.uppy.off("pause-all",w),this.uppy.off("resume-all",b)},o.addEventListener("abort",()=>{var e;null==(e=u)||e.abort()}),f()})}finally{null==t||t()}}function Ba(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}Ua.VERSION="3.8.2";var Da=0;function $a(e){return"__private_"+Da+++"_"+e}var Wa=$a("uppy"),qa=$a("events");class Ha{constructor(e){Object.defineProperty(this,Wa,{writable:!0,value:void 0}),Object.defineProperty(this,qa,{writable:!0,value:[]}),Ba(this,Wa)[Wa]=e}on(e,t){return Ba(this,qa)[qa].push([e,t]),Ba(this,Wa)[Wa].on(e,t)}remove(){for(const[e,t]of Ba(this,qa)[qa].splice(0))Ba(this,Wa)[Wa].off(e,t)}onFilePause(e,t){this.on("upload-pause",(n,r)=>{e===n&&t(r)})}onFileRemove(e,t){this.on("file-removed",n=>{e===n.id&&t(n.id)})}onPause(e,t){this.on("upload-pause",(n,r)=>{e===n&&t(r)})}onRetry(e,t){this.on("upload-retry",n=>{e===n&&t()})}onRetryAll(e,t){this.on("retry-all",()=>{Ba(this,Wa)[Wa].getFile(e)&&t()})}onPauseAll(e,t){this.on("pause-all",()=>{Ba(this,Wa)[Wa].getFile(e)&&t()})}onCancelAll(e,t){var n=this;this.on("cancel-all",function(){Ba(n,Wa)[Wa].getFile(e)&&t(...arguments)})}onResumeAll(e,t){this.on("resume-all",()=>{Ba(this,Wa)[Wa].getFile(e)&&t()})}}function Va(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var Ya=0;function Ka(e){return"__private_"+Ya+++"_"+e}function Ga(e){if(null!=e){var t;const n=()=>this.abort(e.reason);e.addEventListener("abort",n,{once:!0});const r=()=>{e.removeEventListener("abort",n)};null==(t=this.then)||t.call(this,r,r)}return this}var Ja=Ka("activeRequests"),Xa=Ka("queuedHandlers"),Qa=Ka("paused"),Za=Ka("pauseTimer"),el=Ka("downLimit"),tl=Ka("upperLimit"),nl=Ka("rateLimitingTimer"),rl=Ka("call"),ol=Ka("queueNext"),il=Ka("next"),sl=Ka("queue"),al=Ka("dequeue"),ll=Ka("resume"),cl=Ka("increaseLimit");class ul{constructor(e){Object.defineProperty(this,al,{value:fl}),Object.defineProperty(this,sl,{value:_l}),Object.defineProperty(this,il,{value:pl}),Object.defineProperty(this,ol,{value:hl}),Object.defineProperty(this,rl,{value:dl}),Object.defineProperty(this,Ja,{writable:!0,value:0}),Object.defineProperty(this,Xa,{writable:!0,value:[]}),Object.defineProperty(this,Qa,{writable:!0,value:!1}),Object.defineProperty(this,Za,{writable:!0,value:void 0}),Object.defineProperty(this,el,{writable:!0,value:1}),Object.defineProperty(this,tl,{writable:!0,value:void 0}),Object.defineProperty(this,nl,{writable:!0,value:void 0}),Object.defineProperty(this,ll,{writable:!0,value:()=>this.resume()}),Object.defineProperty(this,cl,{writable:!0,value:()=>{if(Va(this,Qa)[Qa])Va(this,nl)[nl]=setTimeout(Va(this,cl)[cl],0);else{Va(this,el)[el]=this.limit,this.limit=Math.ceil((Va(this,tl)[tl]+Va(this,el)[el])/2);for(let e=Va(this,el)[el];e<=this.limit;e++)Va(this,ol)[ol]();Va(this,tl)[tl]-Va(this,el)[el]>3?Va(this,nl)[nl]=setTimeout(Va(this,cl)[cl],2e3):Va(this,el)[el]=Math.floor(Va(this,el)[el]/2)}}}),this.limit="number"!=typeof e||0===e?1/0:e}run(e,t){return!Va(this,Qa)[Qa]&&Va(this,Ja)[Ja]<this.limit?Va(this,rl)[rl](e):Va(this,sl)[sl](e,t)}wrapSyncFunction(e,t){var n=this;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];const s=n.run(()=>(e(...o),queueMicrotask(()=>s.done()),()=>{}),t);return{abortOn:Ga,abort(){s.abort()}}}}wrapPromiseFunction(e,t){var n=this;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];let s;const a=new Promise((r,i)=>{s=n.run(()=>{let t,n;try{n=Promise.resolve(e(...o))}catch(e){n=Promise.reject(e)}return n.then(e=>{t?i(t):(s.done(),r(e))},e=>{t?i(t):(s.done(),i(e))}),e=>{t=function(e){return new Error("Cancelled",{cause:e})}(e)}},t)});return a.abort=e=>{s.abort(e)},a.abortOn=Ga,a}}resume(){Va(this,Qa)[Qa]=!1,clearTimeout(Va(this,Za)[Za]);for(let e=0;e<this.limit;e++)Va(this,ol)[ol]()}pause(e){void 0===e&&(e=null),Va(this,Qa)[Qa]=!0,clearTimeout(Va(this,Za)[Za]),null!=e&&(Va(this,Za)[Za]=setTimeout(Va(this,ll)[ll],e))}rateLimit(e){clearTimeout(Va(this,nl)[nl]),this.pause(e),this.limit>1&&Number.isFinite(this.limit)&&(Va(this,tl)[tl]=this.limit-1,this.limit=Va(this,el)[el],Va(this,nl)[nl]=setTimeout(Va(this,cl)[cl],e))}get isPaused(){return Va(this,Qa)[Qa]}}function dl(e){Va(this,Ja)[Ja]+=1;let t,n=!1;try{t=e()}catch(e){throw Va(this,Ja)[Ja]-=1,e}return{abort:e=>{n||(n=!0,Va(this,Ja)[Ja]-=1,null==t||t(e),Va(this,ol)[ol]())},done:()=>{n||(n=!0,Va(this,Ja)[Ja]-=1,Va(this,ol)[ol]())}}}function hl(){queueMicrotask(()=>Va(this,il)[il]())}function pl(){if(Va(this,Qa)[Qa]||Va(this,Ja)[Ja]>=this.limit)return;if(0===Va(this,Xa)[Xa].length)return;const e=Va(this,Xa)[Xa].shift();if(null==e)throw new Error("Invariant violation: next is null");const t=Va(this,rl)[rl](e.fn);e.abort=t.abort,e.done=t.done}function _l(e,t){const n={fn:e,priority:(null==t?void 0:t.priority)||0,abort:()=>{Va(this,al)[al](n)},done:()=>{throw new Error("Cannot mark a queued request as done: this indicates a bug")}},r=Va(this,Xa)[Xa].findIndex(e=>n.priority>e.priority);return-1===r?Va(this,Xa)[Xa].push(n):Va(this,Xa)[Xa].splice(r,0,n),n}function fl(e){const t=Va(this,Xa)[Xa].indexOf(e);-1!==t&&Va(this,Xa)[Xa].splice(t,1)}const{AbortController:ml}=globalThis,gl=function(e,t){void 0===e&&(e="Aborted");const n=new DOMException(e,"AbortError");return null!=t&&ka(t,"cause")&&Object.defineProperty(n,"cause",{__proto__:null,configurable:!0,writable:!0,value:t.cause}),n};function yl(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var vl=0;function wl(e){return"__private_"+vl+++"_"+e}const bl={getChunkSize:e=>Math.ceil(e.size/1e4),onProgress(){},onPartComplete(){},onSuccess(){},onError(e){throw e}};const Sl=Symbol("pausing upload, not an actual error");var El=wl("abortController"),kl=wl("chunks"),Pl=wl("chunkState"),Tl=wl("data"),Ol=wl("file"),Cl=wl("uploadHasStarted"),xl=wl("onError"),Rl=wl("onSuccess"),Al=wl("shouldUseMultipart"),Nl=wl("isRestoring"),Fl=wl("onReject"),jl=wl("maxMultipartParts"),Il=wl("minPartSize"),Ml=wl("initChunks"),Ul=wl("createUpload"),Ll=wl("resumeUpload"),zl=wl("onPartProgress"),Bl=wl("onPartComplete"),Dl=wl("abortUpload");class $l{constructor(e,t){var n;Object.defineProperty(this,Dl,{value:Vl}),Object.defineProperty(this,Ll,{value:Hl}),Object.defineProperty(this,Ul,{value:ql}),Object.defineProperty(this,Ml,{value:Wl}),Object.defineProperty(this,El,{writable:!0,value:new ml}),Object.defineProperty(this,kl,{writable:!0,value:void 0}),Object.defineProperty(this,Pl,{writable:!0,value:void 0}),Object.defineProperty(this,Tl,{writable:!0,value:void 0}),Object.defineProperty(this,Ol,{writable:!0,value:void 0}),Object.defineProperty(this,Cl,{writable:!0,value:!1}),Object.defineProperty(this,xl,{writable:!0,value:void 0}),Object.defineProperty(this,Rl,{writable:!0,value:void 0}),Object.defineProperty(this,Al,{writable:!0,value:void 0}),Object.defineProperty(this,Nl,{writable:!0,value:void 0}),Object.defineProperty(this,Fl,{writable:!0,value:e=>(null==e?void 0:e.cause)===Sl?null:yl(this,xl)[xl](e)}),Object.defineProperty(this,jl,{writable:!0,value:1e4}),Object.defineProperty(this,Il,{writable:!0,value:5242880}),Object.defineProperty(this,zl,{writable:!0,value:e=>t=>{if(!t.lengthComputable)return;yl(this,Pl)[Pl][e].uploaded=function(e){if("string"==typeof e)return parseInt(e,10);if("number"==typeof e)return e;throw new TypeError("Expected a number")}(t.loaded);const n=yl(this,Pl)[Pl].reduce((e,t)=>e+t.uploaded,0);this.options.onProgress(n,yl(this,Tl)[Tl].size)}}),Object.defineProperty(this,Bl,{writable:!0,value:e=>t=>{yl(this,kl)[kl][e]=null,yl(this,Pl)[Pl][e].etag=t,yl(this,Pl)[Pl][e].done=!0;const n={PartNumber:e+1,ETag:t};this.options.onPartComplete(n)}}),this.options={...bl,...t},null!=(n=this.options).getChunkSize||(n.getChunkSize=bl.getChunkSize),yl(this,Tl)[Tl]=e,yl(this,Ol)[Ol]=t.file,yl(this,Rl)[Rl]=this.options.onSuccess,yl(this,xl)[xl]=this.options.onError,yl(this,Al)[Al]=this.options.shouldUseMultipart,yl(this,Nl)[Nl]=t.uploadId&&t.key,yl(this,Ml)[Ml]()}start(){yl(this,Cl)[Cl]?(yl(this,El)[El].signal.aborted||yl(this,El)[El].abort(Sl),yl(this,El)[El]=new ml,yl(this,Ll)[Ll]()):yl(this,Nl)[Nl]?(this.options.companionComm.restoreUploadFile(yl(this,Ol)[Ol],{uploadId:this.options.uploadId,key:this.options.key}),yl(this,Ll)[Ll]()):yl(this,Ul)[Ul]()}pause(){yl(this,El)[El].abort(Sl),yl(this,El)[El]=new ml}abort(e){null!=e&&e.really?yl(this,Dl)[Dl]():this.pause()}get chunkState(){return yl(this,Pl)[Pl]}}function Wl(){const e=yl(this,Tl)[Tl].size,t="function"==typeof yl(this,Al)[Al]?yl(this,Al)[Al](yl(this,Ol)[Ol]):Boolean(yl(this,Al)[Al]);if(t&&e>yl(this,Il)[Il]){let n=Math.max(this.options.getChunkSize(yl(this,Tl)[Tl]),yl(this,Il)[Il]),r=Math.floor(e/n);r>yl(this,jl)[jl]&&(r=yl(this,jl)[jl],n=e/yl(this,jl)[jl]),yl(this,kl)[kl]=Array(r);for(let r=0,o=0;r<e;r+=n,o++){const i=Math.min(e,r+n),s=()=>{const e=r;return yl(this,Tl)[Tl].slice(e,i)};if(yl(this,kl)[kl][o]={getData:s,onProgress:yl(this,zl)[zl](o),onComplete:yl(this,Bl)[Bl](o),shouldUseMultipart:t},yl(this,Nl)[Nl]){const t=r+n>e?e-r:n;yl(this,kl)[kl][o].setAsUploaded=()=>{yl(this,kl)[kl][o]=null,yl(this,Pl)[Pl][o].uploaded=t}}}}else yl(this,kl)[kl]=[{getData:()=>yl(this,Tl)[Tl],onProgress:yl(this,zl)[zl](0),onComplete:yl(this,Bl)[Bl](0),shouldUseMultipart:t}];yl(this,Pl)[Pl]=yl(this,kl)[kl].map(()=>({uploaded:0}))}function ql(){this.options.companionComm.uploadFile(yl(this,Ol)[Ol],yl(this,kl)[kl],yl(this,El)[El].signal).then(yl(this,Rl)[Rl],yl(this,Fl)[Fl]),yl(this,Cl)[Cl]=!0}function Hl(){this.options.companionComm.resumeUploadFile(yl(this,Ol)[Ol],yl(this,kl)[kl],yl(this,El)[El].signal).then(yl(this,Rl)[Rl],yl(this,Fl)[Fl])}function Vl(){yl(this,El)[El].abort(),this.options.companionComm.abortFileUpload(yl(this,Ol)[Ol]).catch(e=>this.options.log(e))}function Yl(e){if(null!=e&&e.aborted)throw gl("The operation was aborted",{cause:e.reason})}const Kl=new TextEncoder,Gl={name:"HMAC",hash:"SHA-256"};function Jl(e){const t=new Uint8Array(e);let n="";for(let e=0;e<t.length;e++)n+=t[e].toString(16).padStart(2,"0");return n}async function Xl(e,t){const{subtle:n}=globalThis.crypto;return n.sign(Gl,await async function(e){const{subtle:t}=globalThis.crypto;return t.importKey("raw","string"==typeof e?Kl.encode(e):e,Gl,!1,["sign"])}(e),Kl.encode(t))}async function Ql(e){let{accountKey:t,accountSecret:n,sessionToken:r,bucketName:o,Key:i,Region:s,expires:a,uploadId:l,partNumber:c}=e;const u="s3",d=`${o}.${u}.${s}.amazonaws.com`,h=`/${encodeURI(i).replace(/[;?:@&=+$,#!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)}`,p="UNSIGNED-PAYLOAD",_=(new Date).toISOString().replace(/[-:]|\.\d+/g,""),f=_.slice(0,8),m=`${f}/${s}/${u}/aws4_request`,g=new URL(`https://${d}${h}`);g.searchParams.set("X-Amz-Algorithm","AWS4-HMAC-SHA256"),g.searchParams.set("X-Amz-Content-Sha256",p),g.searchParams.set("X-Amz-Credential",`${t}/${m}`),g.searchParams.set("X-Amz-Date",_),g.searchParams.set("X-Amz-Expires",a),g.searchParams.set("X-Amz-Security-Token",r),g.searchParams.set("X-Amz-SignedHeaders","host"),c&&g.searchParams.set("partNumber",c),l&&g.searchParams.set("uploadId",l),g.searchParams.set("x-id",c&&l?"UploadPart":"PutObject");const y=function(e){let{method:t="PUT",CanonicalUri:n="/",CanonicalQueryString:r="",SignedHeaders:o,HashedPayload:i}=e;const s=Object.keys(o).map(e=>e.toLowerCase()).sort();return[t,n,r,...s.map(e=>`${e}:${o[e]}`),"",s.join(";"),i].join("\n")}({CanonicalUri:h,CanonicalQueryString:g.search.slice(1),SignedHeaders:{host:d},HashedPayload:p}),v=["AWS4-HMAC-SHA256",_,m,Jl(await async function(e){const{subtle:t}=globalThis.crypto;return t.digest(Gl.hash,Kl.encode(e))}(y))].join("\n"),w=await Xl(`AWS4${n}`,f),b=await Xl(w,s),S=await Xl(b,u),E=await Xl(S,"aws4_request"),k=Jl(await Xl(E,v));return g.searchParams.set("X-Amz-Signature",k),g}function Zl(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var ec=0;function tc(e){return"__private_"+ec+++"_"+e}function nc(e){const t=new URL(e);return t.search="",t.hash="",t.href}var rc=tc("abortMultipartUpload"),oc=tc("cache"),ic=tc("createMultipartUpload"),sc=tc("fetchSignature"),ac=tc("getUploadParameters"),lc=tc("listParts"),cc=tc("previousRetryDelay"),uc=tc("requests"),dc=tc("retryDelays"),hc=tc("sendCompletionRequest"),pc=tc("setS3MultipartState"),_c=tc("uploadPartBytes"),fc=tc("getFile"),mc=tc("shouldRetry"),gc=tc("nonMultipartUpload");class yc{constructor(e,t,n,r){Object.defineProperty(this,gc,{value:wc}),Object.defineProperty(this,mc,{value:vc}),Object.defineProperty(this,rc,{writable:!0,value:void 0}),Object.defineProperty(this,oc,{writable:!0,value:new WeakMap}),Object.defineProperty(this,ic,{writable:!0,value:void 0}),Object.defineProperty(this,sc,{writable:!0,value:void 0}),Object.defineProperty(this,ac,{writable:!0,value:void 0}),Object.defineProperty(this,lc,{writable:!0,value:void 0}),Object.defineProperty(this,cc,{writable:!0,value:void 0}),Object.defineProperty(this,uc,{writable:!0,value:void 0}),Object.defineProperty(this,dc,{writable:!0,value:void 0}),Object.defineProperty(this,hc,{writable:!0,value:void 0}),Object.defineProperty(this,pc,{writable:!0,value:void 0}),Object.defineProperty(this,_c,{writable:!0,value:void 0}),Object.defineProperty(this,fc,{writable:!0,value:void 0}),Zl(this,uc)[uc]=e,Zl(this,pc)[pc]=n,Zl(this,fc)[fc]=r,this.setOptions(t)}setOptions(e){const t=Zl(this,uc)[uc];var n;("abortMultipartUpload"in e&&(Zl(this,rc)[rc]=t.wrapPromiseFunction(e.abortMultipartUpload,{priority:1})),"createMultipartUpload"in e&&(Zl(this,ic)[ic]=t.wrapPromiseFunction(e.createMultipartUpload,{priority:-1})),"signPart"in e&&(Zl(this,sc)[sc]=t.wrapPromiseFunction(e.signPart)),"listParts"in e&&(Zl(this,lc)[lc]=t.wrapPromiseFunction(e.listParts)),"completeMultipartUpload"in e&&(Zl(this,hc)[hc]=t.wrapPromiseFunction(e.completeMultipartUpload,{priority:1})),"retryDelays"in e)&&(Zl(this,dc)[dc]=null!=(n=e.retryDelays)?n:[]);"uploadPartBytes"in e&&(Zl(this,_c)[_c]=t.wrapPromiseFunction(e.uploadPartBytes,{priority:1/0})),"getUploadParameters"in e&&(Zl(this,ac)[ac]=t.wrapPromiseFunction(e.getUploadParameters))}async getUploadId(e,t){let n;for(;null!=(n=Zl(this,oc)[oc].get(e.data));)try{return await n}catch{}const r=Zl(this,ic)[ic](Zl(this,fc)[fc](e),t),o=()=>{r.abort(t.reason),Zl(this,oc)[oc].delete(e.data)};return t.addEventListener("abort",o,{once:!0}),Zl(this,oc)[oc].set(e.data,r),r.then(async n=>{t.removeEventListener("abort",o),Zl(this,pc)[pc](e,n),Zl(this,oc)[oc].set(e.data,n)},()=>{t.removeEventListener("abort",o),Zl(this,oc)[oc].delete(e.data)}),r}async abortFileUpload(e){const t=Zl(this,oc)[oc].get(e.data);if(null==t)return;let n;Zl(this,oc)[oc].delete(e.data),Zl(this,pc)[pc](e,Object.create(null));try{n=await t}catch{return}await Zl(this,rc)[rc](Zl(this,fc)[fc](e),n)}async uploadFile(e,t,n){if(Yl(n),1===t.length&&!t[0].shouldUseMultipart)return Zl(this,gc)[gc](e,t[0],n);const{uploadId:r,key:o}=await this.getUploadId(e,n);Yl(n);try{const i=await Promise.all(t.map((t,r)=>this.uploadChunk(e,r+1,t,n)));return Yl(n),await Zl(this,hc)[hc](Zl(this,fc)[fc](e),{key:o,uploadId:r,parts:i,signal:n},n).abortOn(n)}catch(t){throw(null==t?void 0:t.cause)!==Sl&&"AbortError"!==(null==t?void 0:t.name)&&this.abortFileUpload(e),t}}restoreUploadFile(e,t){Zl(this,oc)[oc].set(e.data,t)}async resumeUploadFile(e,t,n){if(Yl(n),1===t.length&&null!=t[0]&&!t[0].shouldUseMultipart)return Zl(this,gc)[gc](e,t[0],n);const{uploadId:r,key:o}=await this.getUploadId(e,n);Yl(n);const i=await Zl(this,lc)[lc](Zl(this,fc)[fc](e),{uploadId:r,key:o,signal:n},n).abortOn(n);Yl(n);const s=await Promise.all(t.map((t,r)=>{const o=r+1,s=i.find(e=>{let{PartNumber:t}=e;return t===o});return null==s?this.uploadChunk(e,o,t,n):(null==t||null==t.setAsUploaded||t.setAsUploaded(),{PartNumber:o,ETag:s.ETag})}));return Yl(n),Zl(this,hc)[hc](Zl(this,fc)[fc](e),{key:o,uploadId:r,parts:s,signal:n},n).abortOn(n)}async uploadChunk(e,t,n,r){Yl(r);const{uploadId:o,key:i}=await this.getUploadId(e,r),s=Zl(this,dc)[dc].values(),a=Zl(this,dc)[dc].values(),l=()=>{const e=s.next();return null==e||e.done?null:e.value};for(;;){Yl(r);const s=n.getData(),{onProgress:c,onComplete:u}=n;let d;try{d=await Zl(this,sc)[sc](Zl(this,fc)[fc](e),{uploadId:o,key:i,partNumber:t,body:s,signal:r}).abortOn(r)}catch(e){const t=l();if(null==t||r.aborted)throw e;await new Promise(e=>setTimeout(e,t));continue}Yl(r);try{return{PartNumber:t,...await Zl(this,_c)[_c]({signature:d,body:s,size:s.size,onProgress:c,onComplete:u,signal:r}).abortOn(r)}}catch(e){if(!await Zl(this,mc)[mc](e,a))throw e}}}}async function vc(e,t){var n;const r=Zl(this,uc)[uc],o=null==e||null==(n=e.source)?void 0:n.status;if(null==o)return!1;if(403===o&&"Request has expired"===e.message){if(!r.isPaused){if(1===r.limit||null==Zl(this,cc)[cc]){const e=t.next();if(null==e||e.done)return!1;Zl(this,cc)[cc]=e.value}r.rateLimit(0),await new Promise(e=>setTimeout(e,Zl(this,cc)[cc]))}}else if(429===o){if(!r.isPaused){const e=t.next();if(null==e||e.done)return!1;r.rateLimit(e.value)}}else{if(o>400&&o<500&&409!==o)return!1;if("undefined"!=typeof navigator&&!1===navigator.onLine)r.isPaused||(r.pause(),window.addEventListener("online",()=>{r.resume()},{once:!0}));else{const e=t.next();if(null==e||e.done)return!1;await new Promise(t=>setTimeout(t,e.value))}}return!0}async function wc(e,t,n){const{method:r="POST",url:o,fields:i,headers:s}=await Zl(this,ac)[ac](Zl(this,fc)[fc](e),{signal:n}).abortOn(n);let a;const l=t.getData();if("POST"===r.toUpperCase()){const e=new FormData;Object.entries(i).forEach(t=>{let[n,r]=t;return e.set(n,r)}),e.set("file",l),a=e}else a=l;const{onProgress:c,onComplete:u}=t,d=await Zl(this,_c)[_c]({signature:{url:o,headers:s,method:r},body:a,size:l.size,onProgress:c,onComplete:u,signal:n}).abortOn(n);return"location"in d?d:{location:nc(o),...d}}let bc;function Sc(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var Ec=0;function kc(e){return"__private_"+Ec+++"_"+e}function Pc(e){if(null!=e&&e.error){const t=new Error(e.message);throw Object.assign(t,e.error),t}return e}function Tc(e){const t=e.Expiration;if(t){const e=Math.floor((new Date(t)-Date.now())/1e3);if(e>9)return e}}function Oc(e){let{meta:t,allowedMetaFields:n,querify:r=!1}=e;const o=null!=n?n:Object.keys(t);return t?Object.fromEntries(o.filter(e=>null!=t[e]).map(e=>[r?`metadata[${e}]`:e,String(t[e])])):{}}const Cc={allowedMetaFields:null,limit:6,getTemporarySecurityCredentials:!1,shouldUseMultipart:e=>0!==e.size,retryDelays:[0,1e3,3e3,5e3],companionHeaders:{}};var xc=kc("companionCommunicationQueue"),Rc=kc("client"),Ac=kc("cachedTemporaryCredentials"),Nc=kc("getTemporarySecurityCredentials"),Fc=kc("setS3MultipartState"),jc=kc("getFile"),Ic=kc("uploadLocalFile"),Mc=kc("getCompanionClientArgs"),Uc=kc("upload"),Lc=kc("setCompanionHeaders"),zc=kc("setResumableUploadsCapability"),Bc=kc("resetResumableCapability");bc=Symbol.for("uppy test: getClient");class Dc extends aa{constructor(e,t){var n;super(e,{...Cc,uploadPartBytes:Dc.uploadPartBytes,createMultipartUpload:null,listParts:null,abortMultipartUpload:null,completeMultipartUpload:null,signPart:null,getUploadParameters:null,...t}),Object.defineProperty(this,Mc,{value:qc}),Object.defineProperty(this,Ic,{value:Wc}),Object.defineProperty(this,Nc,{value:$c}),Object.defineProperty(this,xc,{writable:!0,value:void 0}),Object.defineProperty(this,Rc,{writable:!0,value:void 0}),Object.defineProperty(this,Ac,{writable:!0,value:void 0}),Object.defineProperty(this,Fc,{writable:!0,value:(e,t)=>{let{key:n,uploadId:r}=t;const o=this.uppy.getFile(e.id);null!=o&&this.uppy.setFileState(e.id,{s3Multipart:{...o.s3Multipart,key:n,uploadId:r}})}}),Object.defineProperty(this,jc,{writable:!0,value:e=>this.uppy.getFile(e.id)||e}),Object.defineProperty(this,Uc,{writable:!0,value:async e=>{if(0===e.length)return;const t=function(e){return e.filter(e=>!(e=>"error"in e&&!!e.error)(e))}(this.uppy.getFilesByIds(e)),n=function(e){return e.filter(e=>{var t;return!(null!=(t=e.progress)&&t.uploadStarted&&e.isRestored)})}(t);this.uppy.emit("upload-start",n);const r=t.map(e=>{if(e.isRemote){const t=()=>this.requests;Sc(this,zc)[zc](!1);const n=new AbortController,r=t=>{t.id===e.id&&n.abort()};this.uppy.on("file-removed",r);const o=this.uppy.getRequestClientForFile(e).uploadRemoteFile(e,Sc(this,Mc)[Mc](e),{signal:n.signal,getQueue:t});return this.requests.wrapSyncFunction(()=>{this.uppy.off("file-removed",r)},{priority:-1})(),o}return Sc(this,Ic)[Ic](e)}),o=await Promise.all(r);return Sc(this,zc)[zc](!0),o}}),Object.defineProperty(this,Lc,{writable:!0,value:()=>{Sc(this,Rc)[Rc].setCompanionHeaders(this.opts.companionHeaders)}}),Object.defineProperty(this,zc,{writable:!0,value:e=>{const{capabilities:t}=this.uppy.getState();this.uppy.setState({capabilities:{...t,resumableUploads:e}})}}),Object.defineProperty(this,Bc,{writable:!0,value:()=>{Sc(this,zc)[zc](!0)}}),this.type="uploader",this.id=this.opts.id||"AwsS3Multipart",this.title="AWS S3 Multipart",Sc(this,Rc)[Rc]=new Ua(e,t);const r={createMultipartUpload:this.createMultipartUpload,listParts:this.listParts,abortMultipartUpload:this.abortMultipartUpload,completeMultipartUpload:this.completeMultipartUpload,signPart:null!=t&&t.getTemporarySecurityCredentials?this.createSignedURL:this.signPart,getUploadParameters:null!=t&&t.getTemporarySecurityCredentials?this.createSignedURL:this.getUploadParameters};for(const e of Object.keys(r))null==this.opts[e]&&(this.opts[e]=r[e].bind(this));null!=(null==t?void 0:t.prepareUploadParts)&&null==t.signPart&&(this.opts.signPart=async(e,n)=>{let{uploadId:r,key:o,partNumber:i,body:s,signal:a}=n;const{presignedUrls:l,headers:c}=await t.prepareUploadParts(e,{uploadId:r,key:o,parts:[{number:i,chunk:s}],signal:a});return{url:null==l?void 0:l[i],headers:null==c?void 0:c[i]}}),this.requests=null!=(n=this.opts.rateLimitedQueue)?n:new ul(this.opts.limit),Sc(this,xc)[xc]=new yc(this.requests,this.opts,Sc(this,Fc)[Fc],Sc(this,jc)[jc]),this.uploaders=Object.create(null),this.uploaderEvents=Object.create(null),this.uploaderSockets=Object.create(null)}[bc](){return Sc(this,Rc)[Rc]}setOptions(e){Sc(this,xc)[xc].setOptions(e),super.setOptions(e),Sc(this,Lc)[Lc]()}resetUploaderReferences(e,t){this.uploaders[e]&&(this.uploaders[e].abort({really:(null==t?void 0:t.abort)||!1}),this.uploaders[e]=null),this.uploaderEvents[e]&&(this.uploaderEvents[e].remove(),this.uploaderEvents[e]=null),this.uploaderSockets[e]&&(this.uploaderSockets[e].close(),this.uploaderSockets[e]=null)}assertHost(e){if(!this.opts.companionUrl)throw new Error(`Expected a \`companionUrl\` option containing a Companion address, or if you are not using Companion, a custom \`${e}\` implementation.`)}createMultipartUpload(e,t){this.assertHost("createMultipartUpload"),Yl(t);const n=Oc({meta:e.meta,allowedMetaFields:this.opts.allowedMetaFields});return Sc(this,Rc)[Rc].post("s3/multipart",{filename:e.name,type:e.type,metadata:n},{signal:t}).then(Pc)}listParts(e,t,n){let{key:r,uploadId:o,signal:i}=t;null!=i||(i=n),this.assertHost("listParts"),Yl(i);const s=encodeURIComponent(r);return Sc(this,Rc)[Rc].get(`s3/multipart/${o}?key=${s}`,{signal:i}).then(Pc)}completeMultipartUpload(e,t,n){let{key:r,uploadId:o,parts:i,signal:s}=t;null!=s||(s=n),this.assertHost("completeMultipartUpload"),Yl(s);const a=encodeURIComponent(r),l=encodeURIComponent(o);return Sc(this,Rc)[Rc].post(`s3/multipart/${l}/complete?key=${a}`,{parts:i},{signal:s}).then(Pc)}async createSignedURL(e,t){const n=await Sc(this,Nc)[Nc](t),r=Tc(n.credentials)||604800,{uploadId:o,key:i,partNumber:s}=t;return{method:"PUT",expires:r,fields:{},url:`${await Ql({accountKey:n.credentials.AccessKeyId,accountSecret:n.credentials.SecretAccessKey,sessionToken:n.credentials.SessionToken,expires:r,bucketName:n.bucket,Region:n.region,Key:null!=i?i:`${crypto.randomUUID()}-${e.name}`,uploadId:o,partNumber:s})}`,headers:{"Content-Type":e.type}}}signPart(e,t){let{uploadId:n,key:r,partNumber:o,signal:i}=t;if(this.assertHost("signPart"),Yl(i),null==n||null==r||null==o)throw new Error("Cannot sign without a key, an uploadId, and a partNumber");const s=encodeURIComponent(r);return Sc(this,Rc)[Rc].get(`s3/multipart/${n}/${o}?key=${s}`,{signal:i}).then(Pc)}abortMultipartUpload(e,t,n){let{key:r,uploadId:o,signal:i}=t;null!=i||(i=n),this.assertHost("abortMultipartUpload");const s=encodeURIComponent(r),a=encodeURIComponent(o);return Sc(this,Rc)[Rc].delete(`s3/multipart/${a}?key=${s}`,void 0,{signal:i}).then(Pc)}getUploadParameters(e,t){const{meta:n}=e,{type:r,name:o}=n,i=Oc({meta:n,allowedMetaFields:this.opts.allowedMetaFields,querify:!0}),s=new URLSearchParams({filename:o,type:r,...i});return Sc(this,Rc)[Rc].get(`s3/params?${s}`,t)}static async uploadPartBytes(e){let{signature:{url:t,expires:n,headers:r,method:o="PUT"},body:i,size:s=i.size,onProgress:a,onComplete:l,signal:c}=e;if(Yl(c),null==t)throw new Error("Cannot upload to an undefined URL");return new Promise((e,u)=>{const d=new XMLHttpRequest;function h(){d.abort()}function p(){null==c||c.removeEventListener("abort",h)}d.open(o,t,!0),r&&Object.keys(r).forEach(e=>{d.setRequestHeader(e,r[e])}),d.responseType="text","number"==typeof n&&(d.timeout=1e3*n),null==c||c.addEventListener("abort",h),d.upload.addEventListener("progress",e=>{a(e)}),d.addEventListener("abort",()=>{p(),u(gl())}),d.addEventListener("timeout",()=>{p();const e=new Error("Request has expired");e.source={status:403},u(e)}),d.addEventListener("load",()=>{if(p(),403===d.status&&d.responseText.includes("<Message>Request has expired</Message>")){const e=new Error("Request has expired");return e.source=d,void u(e)}if(d.status<200||d.status>=300){const e=new Error("Non 2xx");return e.source=d,void u(e)}null==a||a({loaded:s,lengthComputable:!0});const t=d.getAllResponseHeaders().trim().split(/[\r\n]+/),n={__proto__:null};for(const e of t){const t=e.split(": "),r=t.shift(),o=t.join(": ");n[r]=o}const{etag:r,location:i}=n;"POST"===o.toUpperCase()&&null===i&&console.warn("AwsS3/Multipart: Could not read the Location header. This likely means CORS is not configured correctly on the S3 Bucket. See https://uppy.io/docs/aws-s3-multipart#S3-Bucket-Configuration for instructions."),null!==r?(null==l||l(r),e({...n,ETag:r})):u(new Error("AwsS3/Multipart: Could not read the ETag header. This likely means CORS is not configured correctly on the S3 Bucket. See https://uppy.io/docs/aws-s3-multipart#S3-Bucket-Configuration for instructions."))}),d.addEventListener("error",e=>{p();const t=new Error("Unknown error");t.source=e.target,u(t)}),d.send(i)})}install(){Sc(this,zc)[zc](!0),this.uppy.addPreProcessor(Sc(this,Lc)[Lc]),this.uppy.addUploader(Sc(this,Uc)[Uc]),this.uppy.on("cancel-all",Sc(this,Bc)[Bc])}uninstall(){this.uppy.removePreProcessor(Sc(this,Lc)[Lc]),this.uppy.removeUploader(Sc(this,Uc)[Uc]),this.uppy.off("cancel-all",Sc(this,Bc)[Bc])}}async function $c(e){return Yl(null==e?void 0:e.signal),null==Sc(this,Ac)[Ac]&&(!0===this.opts.getTemporarySecurityCredentials?(this.assertHost("getTemporarySecurityCredentials"),Sc(this,Ac)[Ac]=Sc(this,Rc)[Rc].get("s3/sts",e).then(Pc)):Sc(this,Ac)[Ac]=this.opts.getTemporarySecurityCredentials(e),Sc(this,Ac)[Ac]=await Sc(this,Ac)[Ac],setTimeout(()=>{Sc(this,Ac)[Ac]=null},500*(Tc(Sc(this,Ac)[Ac].credentials)||0))),Sc(this,Ac)[Ac]}function Wc(e){var t=this;return new Promise((n,r)=>{const o=new $l(e.data,{companionComm:Sc(this,xc)[xc],log:function(){return t.uppy.log(...arguments)},getChunkSize:this.opts.getChunkSize?this.opts.getChunkSize.bind(this):null,onProgress:(t,n)=>{this.uppy.emit("upload-progress",this.uppy.getFile(e.id),{uploader:this,bytesUploaded:t,bytesTotal:n})},onError:t=>{this.uppy.log(t),this.uppy.emit("upload-error",e,t),this.resetUploaderReferences(e.id),r(t)},onSuccess:t=>{const r={body:{...t},status:200,uploadURL:t.location};this.resetUploaderReferences(e.id),this.uppy.emit("upload-success",Sc(this,jc)[jc](e),r),t.location&&this.uppy.log(`Download ${e.name} from ${t.location}`),n()},onPartComplete:t=>{this.uppy.emit("s3-multipart:part-uploaded",Sc(this,jc)[jc](e),t)},file:e,shouldUseMultipart:this.opts.shouldUseMultipart,...e.s3Multipart});this.uploaders[e.id]=o;const i=new Ha(this.uppy);this.uploaderEvents[e.id]=i,i.onFileRemove(e.id,t=>{o.abort(),this.resetUploaderReferences(e.id,{abort:!0}),n(`upload ${t} was removed`)}),i.onCancelAll(e.id,t=>{"user"===(null==t?void 0:t.reason)&&(o.abort(),this.resetUploaderReferences(e.id,{abort:!0})),n(`upload ${e.id} was canceled`)}),i.onFilePause(e.id,e=>{e?o.pause():o.start()}),i.onPauseAll(e.id,()=>{o.pause()}),i.onResumeAll(e.id,()=>{o.start()}),o.start()})}function qc(e){var t;return{...null==(t=e.remote)?void 0:t.body,protocol:"s3-multipart",size:e.data.size,metadata:e.meta}}Dc.VERSION="3.12.0";var Hc,Vc,Yc,Kc,Gc,Jc=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?o(e.value):function(e){return e instanceof n?e:new n(function(t){t(e)})}(e.value).then(s,a)}l((r=r.apply(e,t||[])).next())})},Xc=function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},Qc=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},Zc=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};class eu{constructor(e,t=Po.PROD){Hc.add(this),Vc.set(this,void 0),Yc.set(this,void 0),Kc.set(this,void 0),Xc(this,Yc,e,"f"),Xc(this,Kc,t,"f")}uploadFileFrontend(e){return Jc(this,arguments,void 0,function*({file:e,arrayMetaData:t,scanId:n,email:r,callBack:o}){if(!Co(e,t,n,r))throw new Error(bo);if(!Fo(r.trim()))throw new Error(Eo);if(!xo(t))throw new Error(So);return t=Ao(t,n,r),Qc(this,Hc,"m",Gc).call(this,{callBack:o,arrayMetaData:t,scanId:n,email:r,file:e})})}faceScanFileUploader(e){return Jc(this,arguments,void 0,function*({file:e,arrayMetaData:t,objectKey:n,email:r,callBack:o}){if(!Co(e,t,n,r))throw new Error(bo);if(!Fo(r.trim()))throw new Error(Eo);if(!Ro(t,wo))throw new Error(So);return t.push({email:r}),Qc(this,Hc,"m",Gc).call(this,{callBack:o,arrayMetaData:t,objectKey:n,email:r,file:e})})}uploadFile(e){return Jc(this,arguments,void 0,function*({file:e,arrayMetaData:t,scanId:n,email:r}){if(!Co(e,t,n,r))throw new Error(bo);if(!Fo(r.trim()))throw new Error(Eo);if(!xo(t))throw new Error(So);return t=Ao(t,n,r),new Promise((n,r)=>Jc(this,void 0,void 0,function*(){var o;try{const r=yield Oo({path:Gr,apiKey:Qc(this,Yc,"f"),urlType:Qc(this,Kc,"f"),body:{objectKey:e.name,contentType:e.type,objectMetadata:t},throwError:!0}),i=function(e,t=5242880){const n=e.size,r=[];let o=0;for(;o<n;)r.push(e.slice(o,o+t)),o+=t;return r}(e),s=[];for(let t=0;t<i.length;t++){const n=yield Oo({path:Xr,apiKey:Qc(this,Yc,"f"),urlType:Qc(this,Kc,"f"),body:{objectKey:null==r?void 0:r.key,uploadId:null==r?void 0:r.uploadId,partNumber:t+1},throwError:!0}),a=yield Ar.put(null==n?void 0:n.url,i[t],{headers:{"Content-Type":e.type,"X-Api-Key":Qc(this,Yc,"f")}});s.push({PartNumber:t+1,ETag:null===(o=null==a?void 0:a.headers)||void 0===o?void 0:o.etag})}const a=yield Oo({path:Jr,apiKey:Qc(this,Yc,"f"),urlType:Qc(this,Kc,"f"),body:{uploadId:null==r?void 0:r.uploadId,objectKey:null==r?void 0:r.key,parts:s,originalFileName:e.name},throwError:!0});n({message:"successfully uploaded",data:a})}catch(e){r(e)}}))})}setDeviceInfo(e){return Jc(this,void 0,void 0,function*(){const{scanId:t}=e,n=Zc(e,["scanId"]);if(!1===Co(t))throw new Error(bo);return Ar.post(`${No({urlName:Qr,urlType:Qc(this,Kc,"f")})}${go}/${t}`,{device_info:Object.assign({},n)},{headers:{"X-Api-Key":Qc(this,Yc,"f")}})})}}Vc=new WeakMap,Yc=new WeakMap,Kc=new WeakMap,Hc=new WeakSet,Gc=function({callBack:e,arrayMetaData:t,scanId:n,email:r,file:o,objectKey:i}){return new Promise((s,a)=>{Qc(this,Vc,"f")&&Qc(this,Vc,"f").close(),Xc(this,Vc,new Ks({autoProceed:!0}),"f"),Qc(this,Vc,"f").use(Dc,{limit:10,retryDelays:[0,1e3,3e3,5e3],companionUrl:No({urlName:Qr,urlType:Qc(this,Kc,"f")}),getChunkSize:()=>ko,createMultipartUpload:o=>{const s=Math.ceil(o.size/ko);null==e||e({eventName:"uploading_start",message:`File ${o.name} will be divided into ${s} chunks`,scanId:n,email:r,objectKey:i});const a=`${n||i}.${o.extension}`;return Oo({path:Gr,apiKey:Qc(this,Yc,"f"),urlType:Qc(this,Kc,"f"),body:{objectKey:a,contentType:o.type,objectMetadata:t}})},completeMultipartUpload:(t,{uploadId:o,key:s,parts:a})=>(null==e||e({eventName:"uploading_complete_start",message:`${a.length} chunks of file, uploaded`,scanId:n,email:r,objectKey:i}),Oo({path:Jr,apiKey:Qc(this,Yc,"f"),urlType:Qc(this,Kc,"f"),body:{uploadId:o,objectKey:s,parts:a,originalFileName:t.name}}).then(t=>(null==e||e({eventName:"uploading_complete_end",message:"Multipart upload completed successfully",scanId:n,email:r,objectKey:i}),t))),signPart:(e,t)=>Oo({path:Xr,urlType:Qc(this,Kc,"f"),apiKey:Qc(this,Yc,"f"),body:{objectKey:t.key,uploadId:t.uploadId,partNumber:t.partNumber}})}),Qc(this,Vc,"f").addFile({source:"manual",name:o.name,type:o.type,data:o}),Qc(this,Vc,"f").on("upload-error",(e,t,n)=>{t.isNetworkError?Qc(this,Vc,"f").retryUpload(e.id):a(t)}),Qc(this,Vc,"f").on("upload-success",()=>{s({message:"file uploaded successfully"})}),Qc(this,Vc,"f").on("complete",e=>{Qc(this,Vc,"f")&&Qc(this,Vc,"f").close()})})};var tu,nu,ru,ou,iu,su,au,lu,cu,uu,du,hu,pu=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?o(e.value):function(e){return e instanceof n?e:new n(function(t){t(e)})}(e.value).then(s,a)}l((r=r.apply(e,t||[])).next())})},_u=function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},fu=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};class mu{constructor(e,t=Po.PROD){tu.add(this),nu.set(this,{}),ru.set(this,{}),ou.set(this,{}),iu.set(this,{}),su.set(this,void 0),au.set(this,void 0),_u(this,su,e,"f"),_u(this,au,t,"f")}getMeasurementResult(e){if(!Co(e))throw new Error(bo);const t=`${No({urlName:Qr,urlType:fu(this,au,"f")})}/measurements?scanId=${e}`;return Ar.get(t,{headers:{"X-Api-Key":fu(this,su,"f")}})}getMeasurementRecommendation({scanId:e,shopDomain:t,productName:n}){if(!Co(e,t,n))throw new Error(bo);return Ar.get(`${No({urlName:Qr,urlType:fu(this,au,"f")})}${fo}/scan/${e}/shop/${t}/product/${n}`,{headers:{"X-Api-Key":fu(this,su,"f")}})}handleMeasurementSocket(e){const{scanId:t,onError:n,onSuccess:r,onClose:o,onOpen:i}=e;if(!Co(t))throw new Error(bo);fu(this,tu,"m",hu).call(this,{onOpen:i,scanId:t,onSuccess:r,onError:n,onClose:o,paramsKey:"scanId",isFallback:!0,delay:5e3})}handlFaceScaneSocket(e){const{faceScanId:t,onError:n,onSuccess:r,onClose:o,onOpen:i}=e;if(!Co(t))throw new Error(bo);fu(this,tu,"m",hu).call(this,{onOpen:i,faceScanId:t,onSuccess:r,onError:n,onClose:o,paramsKey:"faceScanId",isFallback:!1,delay:1e3})}}nu=new WeakMap,ru=new WeakMap,ou=new WeakMap,iu=new WeakMap,su=new WeakMap,au=new WeakMap,tu=new WeakSet,lu=function(e){var t;null===(t=fu(this,nu,"f")[e])||void 0===t||t.close(),fu(this,nu,"f")[e]=null,fu(this,ru,"f")[e]&&(clearTimeout(fu(this,ru,"f")[e]),fu(this,ru,"f")[e]=null)},cu=function(e,t){const{scanId:n,onSuccess:r,onError:o}=e;fu(this,iu,"f")[t]=1,fu(this,ru,"f")[t]=setTimeout(()=>{fu(this,tu,"m",uu).call(this,{scanId:n,onSuccess:r,onError:o},t),fu(this,tu,"m",lu).call(this,t)},9e4)},uu=function(e,t){const{scanId:n,onSuccess:r,onError:o}=e;fu(this,ou,"f")[t]&&clearTimeout(fu(this,ou,"f")[t]),fu(this,ou,"f")[t]=setTimeout(()=>{fu(this,tu,"m",du).call(this,{scanId:n,onSuccess:r,onError:o},t)},5e3*(fu(this,iu,"f")[t]||1))},du=function(e,t){return pu(this,void 0,void 0,function*(){var n;const{scanId:r,onSuccess:o,onError:i}=e;try{const e=yield this.getMeasurementResult(r);(null==e?void 0:e.data)&&!0===(null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.isMeasured)?(null==o||o(e.data),clearInterval(fu(this,ou,"f")[t])):(fu(this,iu,"f")[t]||1)<8?(fu(this,iu,"f")[t]=(fu(this,iu,"f")[t]||1)+1,fu(this,tu,"m",uu).call(this,{scanId:r,onSuccess:o,onError:i},t)):(fu(this,iu,"f")[t]=1,clearInterval(fu(this,ou,"f")[t]),null==i||i({scanStatus:"failed",message:"Scan not found",isMeasured:!1}))}catch(e){clearInterval(fu(this,ou,"f")[t]),null==i||i(e)}})},hu=function({onOpen:e,isFallback:t,scanId:n,onSuccess:r,onError:o,onClose:i,paramsKey:s,faceScanId:a,delay:l}){const c=t?`measurement-${n}`:`faceScan-${a}`;setTimeout(()=>{fu(this,tu,"m",lu).call(this,c);const l=`${No({urlName:Zr,urlType:fu(this,au,"f")})}${_o}?${s}=${n||a}`,u=new WebSocket(l);fu(this,nu,"f")[c]=u,u.onopen=()=>{null==e||e(),t&&n&&fu(this,tu,"m",cu).call(this,{scanId:n,onSuccess:r,onError:o},c)},u.onmessage=e=>{const t=JSON.parse(e.data);200===(null==t?void 0:t.code)&&"success"===(null==t?void 0:t.scanStatus)?null==r||r(t):(clearTimeout(fu(this,ru,"f")[c]),null==o||o(t)),200===(null==t?void 0:t.code)&&"success"===(null==t?void 0:t.scanStatus)&&"final"===(null==t?void 0:t.resultType)&&clearTimeout(fu(this,ru,"f")[c])},u.onclose=()=>null==i?void 0:i(),u.onerror=()=>{t||null==o||o(new Error("An error occurred in the WebSocket connection."))}},l)};const gu=Object.create(null);gu.open="0",gu.close="1",gu.ping="2",gu.pong="3",gu.message="4",gu.upgrade="5",gu.noop="6";const yu=Object.create(null);Object.keys(gu).forEach(e=>{yu[gu[e]]=e});const vu={type:"error",data:"parser error"},wu="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),bu="function"==typeof ArrayBuffer,Su=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Eu=({type:e,data:t},n,r)=>wu&&t instanceof Blob?n?r(t):ku(t,r):bu&&(t instanceof ArrayBuffer||Su(t))?n?r(t):ku(new Blob([t]),r):r(gu[e]+(t||"")),ku=(e,t)=>{const n=new FileReader;return n.onload=function(){const e=n.result.split(",")[1];t("b"+(e||""))},n.readAsDataURL(e)};function Pu(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Tu;const Ou="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Cu="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let e=0;e<64;e++)Cu[Ou.charCodeAt(e)]=e;const xu="function"==typeof ArrayBuffer,Ru=(e,t)=>{if("string"!=typeof e)return{type:"message",data:Nu(e,t)};const n=e.charAt(0);if("b"===n)return{type:"message",data:Au(e.substring(1),t)};return yu[n]?e.length>1?{type:yu[n],data:e.substring(1)}:{type:yu[n]}:vu},Au=(e,t)=>{if(xu){const n=(e=>{let t,n,r,o,i,s=.75*e.length,a=e.length,l=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);const c=new ArrayBuffer(s),u=new Uint8Array(c);for(t=0;t<a;t+=4)n=Cu[e.charCodeAt(t)],r=Cu[e.charCodeAt(t+1)],o=Cu[e.charCodeAt(t+2)],i=Cu[e.charCodeAt(t+3)],u[l++]=n<<2|r>>4,u[l++]=(15&r)<<4|o>>2,u[l++]=(3&o)<<6|63&i;return c})(e);return Nu(n,t)}return{base64:!0,data:e}},Nu=(e,t)=>"blob"===t?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,Fu=String.fromCharCode(30);function ju(){return new TransformStream({transform(e,t){!function(e,t){wu&&e.data instanceof Blob?e.data.arrayBuffer().then(Pu).then(t):bu&&(e.data instanceof ArrayBuffer||Su(e.data))?t(Pu(e.data)):Eu(e,!1,e=>{Tu||(Tu=new TextEncoder),t(Tu.encode(e))})}(e,n=>{const r=n.length;let o;if(r<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,r);else if(r<65536){o=new Uint8Array(3);const e=new DataView(o.buffer);e.setUint8(0,126),e.setUint16(1,r)}else{o=new Uint8Array(9);const e=new DataView(o.buffer);e.setUint8(0,127),e.setBigUint64(1,BigInt(r))}e.data&&"string"!=typeof e.data&&(o[0]|=128),t.enqueue(o),t.enqueue(n)})}})}let Iu;function Mu(e){return e.reduce((e,t)=>e+t.length,0)}function Uu(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let o=0;o<t;o++)n[o]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function Lu(e){if(e)return function(e){for(var t in Lu.prototype)e[t]=Lu.prototype[t];return e}(e)}Lu.prototype.on=Lu.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Lu.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Lu.prototype.off=Lu.prototype.removeListener=Lu.prototype.removeAllListeners=Lu.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var o=0;o<r.length;o++)if((n=r[o])===t||n.fn===t){r.splice(o,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},Lu.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,t)}return this},Lu.prototype.emitReserved=Lu.prototype.emit,Lu.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Lu.prototype.hasListeners=function(e){return!!this.listeners(e).length};const zu="function"==typeof Promise&&"function"==typeof Promise.resolve?e=>Promise.resolve().then(e):(e,t)=>t(e,0),Bu="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function Du(e,...t){return t.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{})}const $u=Bu.setTimeout,Wu=Bu.clearTimeout;function qu(e,t){t.useNativeTimers?(e.setTimeoutFn=$u.bind(Bu),e.clearTimeoutFn=Wu.bind(Bu)):(e.setTimeoutFn=Bu.setTimeout.bind(Bu),e.clearTimeoutFn=Bu.clearTimeout.bind(Bu))}function Hu(e){return"string"==typeof e?function(e){let t=0,n=0;for(let r=0,o=e.length;r<o;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}(e):Math.ceil(1.33*(e.byteLength||e.size))}function Vu(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}class Yu extends Error{constructor(e,t,n){super(e),this.description=t,this.context=n,this.type="TransportError"}}class Ku extends Lu{constructor(e){super(),this.writable=!1,qu(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,n){return super.emitReserved("error",new Yu(e,t,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(e){"open"===this.readyState&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=Ru(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return-1===e.indexOf(":")?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(e){const t=function(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}(e);return t.length?"?"+t:""}}class Gu extends Ku{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let e=0;this._polling&&(e++,this.once("pollComplete",function(){--e||t()})),this.writable||(e++,this.once("drain",function(){--e||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){((e,t)=>{const n=e.split(Fu),r=[];for(let e=0;e<n.length;e++){const o=Ru(n[e],t);if(r.push(o),"error"===o.type)break}return r})(e,this.socket.binaryType).forEach(e=>{if("opening"===this.readyState&&"open"===e.type&&this.onOpen(),"close"===e.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(e)}),"closed"!==this.readyState&&(this._polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};"open"===this.readyState?e():this.once("open",e)}write(e){this.writable=!1,((e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((e,i)=>{Eu(e,!1,e=>{r[i]=e,++o===n&&t(r.join(Fu))})})})(e,e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=Vu()),this.supportsBinary||t.sid||(t.b64=1),this.createUri(e,t)}}let Ju=!1;try{Ju="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(e){}const Xu=Ju;function Qu(){}class Zu extends Gu{constructor(e){if(super(e),"undefined"!=typeof location){const t="https:"===location.protocol;let n=location.port;n||(n=t?"443":"80"),this.xd="undefined"!=typeof location&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,t){const n=this.request({method:"POST",data:e});n.on("success",t),n.on("error",(e,t)=>{this.onError("xhr post error",e,t)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(e,t)=>{this.onError("xhr poll error",e,t)}),this.pollXhr=e}}class ed extends Lu{constructor(e,t,n){super(),this.createRequest=e,qu(this,n),this._opts=n,this._method=n.method||"GET",this._uri=t,this._data=void 0!==n.data?n.data:null,this._create()}_create(){var e;const t=Du(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this._opts.xd;const n=this._xhr=this.createRequest(t);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let e in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(e)&&n.setRequestHeader(e,this._opts.extraHeaders[e])}}catch(e){}if("POST"===this._method)try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{n.setRequestHeader("Accept","*/*")}catch(e){}null===(e=this._opts.cookieJar)||void 0===e||e.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var e;3===n.readyState&&(null===(e=this._opts.cookieJar)||void 0===e||e.parseCookies(n.getResponseHeader("set-cookie"))),4===n.readyState&&(200===n.status||1223===n.status?this._onLoad():this.setTimeoutFn(()=>{this._onError("number"==typeof n.status?n.status:0)},0))},n.send(this._data)}catch(e){return void this.setTimeoutFn(()=>{this._onError(e)},0)}"undefined"!=typeof document&&(this._index=ed.requestsCount++,ed.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(void 0!==this._xhr&&null!==this._xhr){if(this._xhr.onreadystatechange=Qu,e)try{this._xhr.abort()}catch(e){}"undefined"!=typeof document&&delete ed.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;null!==e&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(ed.requestsCount=0,ed.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",td);else if("function"==typeof addEventListener){addEventListener("onpagehide"in Bu?"pagehide":"unload",td,!1)}function td(){for(let e in ed.requests)ed.requests.hasOwnProperty(e)&&ed.requests[e].abort()}const nd=function(){const e=rd({xdomain:!1});return e&&null!==e.responseType}();function rd(e){const t=e.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!t||Xu))return new XMLHttpRequest}catch(e){}if(!t)try{return new(Bu[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(e){}}const od="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class id extends Ku{get name(){return"websocket"}doOpen(){const e=this.uri(),t=this.opts.protocols,n=od?{}:Du(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,n)}catch(e){return this.emitReserved("error",e)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const n=e[t],r=t===e.length-1;Eu(n,this.supportsBinary,e=>{try{this.doWrite(n,e)}catch(e){}r&&zu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){void 0!==this.ws&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=Vu()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}}const sd=Bu.WebSocket||Bu.MozWebSocket;const ad={websocket:class extends id{createSocket(e,t,n){return od?new sd(e,t,n):t?new sd(e,t):new sd(e)}doWrite(e,t){this.ws.send(t)}},webtransport:class extends Ku{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const t=function(e,t){Iu||(Iu=new TextDecoder);const n=[];let r=0,o=-1,i=!1;return new TransformStream({transform(s,a){for(n.push(s);;){if(0===r){if(Mu(n)<1)break;const e=Uu(n,1);i=!(128&~e[0]),o=127&e[0],r=o<126?3:126===o?1:2}else if(1===r){if(Mu(n)<2)break;const e=Uu(n,2);o=new DataView(e.buffer,e.byteOffset,e.length).getUint16(0),r=3}else if(2===r){if(Mu(n)<8)break;const e=Uu(n,8),t=new DataView(e.buffer,e.byteOffset,e.length),i=t.getUint32(0);if(i>Math.pow(2,21)-1){a.enqueue(vu);break}o=i*Math.pow(2,32)+t.getUint32(4),r=3}else{if(Mu(n)<o)break;const e=Uu(n,o);a.enqueue(Ru(i?e:Iu.decode(e),t)),r=0}if(0===o||o>e){a.enqueue(vu);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(t).getReader(),r=ju();r.readable.pipeTo(e.writable),this._writer=r.writable.getWriter();const o=()=>{n.read().then(({done:e,value:t})=>{e||(this.onPacket(t),o())}).catch(e=>{})};o();const i={type:"open"};this.query.sid&&(i.data=`{"sid":"${this.query.sid}"}`),this._writer.write(i).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const n=e[t],r=t===e.length-1;this._writer.write(n).then(()=>{r&&zu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;null===(e=this._transport)||void 0===e||e.close()}},polling:class extends Zu{constructor(e){super(e);const t=e&&e.forceBase64;this.supportsBinary=nd&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new ed(rd,this.uri(),e)}}},ld=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,cd=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function ud(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");-1!=n&&-1!=r&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let o=ld.exec(e||""),i={},s=14;for(;s--;)i[cd[s]]=o[s]||"";return-1!=n&&-1!=r&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=function(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");"/"!=t.slice(0,1)&&0!==t.length||r.splice(0,1);"/"==t.slice(-1)&&r.splice(r.length-1,1);return r}(0,i.path),i.queryKey=function(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(e,t,r){t&&(n[t]=r)}),n}(0,i.query),i}const dd="function"==typeof addEventListener&&"function"==typeof removeEventListener,hd=[];dd&&addEventListener("offline",()=>{hd.forEach(e=>e())},!1);class pd extends Lu{constructor(e,t){if(super(),this.binaryType="arraybuffer",this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&"object"==typeof e&&(t=e,e=null),e){const n=ud(e);t.hostname=n.host,t.secure="https"===n.protocol||"wss"===n.protocol,t.port=n.port,n.query&&(t.query=n.query)}else t.host&&(t.hostname=ud(t.host).host);qu(this,t),this.secure=null!=t.secure?t.secure:"undefined"!=typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},t.transports.forEach(e=>{const t=e.prototype.name;this.transports.push(t),this._transportsByName[t]=e}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(e){let t={},n=e.split("&");for(let e=0,r=n.length;e<r;e++){let r=n[e].split("=");t[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return t}(this.opts.query)),dd&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},hd.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);const n=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](n)}_open(){if(0===this.transports.length)return void this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);const e=this.opts.rememberUpgrade&&pd.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";const t=this.createTransport(e);t.open(),this.setTransport(t)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",e=>this._onClose("transport close",e))}onOpen(){this.readyState="open",pd.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush()}_onPacket(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const t=new Error("server error");t.code=e.data,this._onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data)}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),"closed"!==this.readyState&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let t=0;t<this.writeBuffer.length;t++){const n=this.writeBuffer[t].data;if(n&&(e+=Hu(n)),t>0&&e>this._maxPayload)return this.writeBuffer.slice(0,t);e+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,zu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,t,n){return this._sendPacket("message",e,t,n),this}send(e,t,n){return this._sendPacket("message",e,t,n),this}_sendPacket(e,t,n,r){if("function"==typeof t&&(r=t,t=void 0),"function"==typeof n&&(r=n,n=null),"closing"===this.readyState||"closed"===this.readyState)return;(n=n||{}).compress=!1!==n.compress;const o={type:e,data:t,options:n};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),r&&this.once("flush",r),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},n=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}_onError(e){if(pd.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),dd&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const e=hd.indexOf(this._offlineEventListener);-1!==e&&hd.splice(e,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this._prevBufferLen=0}}}pd.protocol=4;class _d extends pd{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),"open"===this.readyState&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),n=!1;pd.priorWebsocketSuccess=!1;const r=()=>{n||(t.send([{type:"ping",data:"probe"}]),t.once("packet",e=>{if(!n)if("pong"===e.type&&"probe"===e.data){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;pd.priorWebsocketSuccess="websocket"===t.name,this.transport.pause(()=>{n||"closed"!==this.readyState&&(c(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{const e=new Error("probe error");e.transport=t.name,this.emitReserved("upgradeError",e)}}))};function o(){n||(n=!0,c(),t.close(),t=null)}const i=e=>{const n=new Error("probe error: "+e);n.transport=t.name,o(),this.emitReserved("upgradeError",n)};function s(){i("transport closed")}function a(){i("socket closed")}function l(e){t&&e.name!==t.name&&o()}const c=()=>{t.removeListener("open",r),t.removeListener("error",i),t.removeListener("close",s),this.off("close",a),this.off("upgrading",l)};t.once("open",r),t.once("error",i),t.once("close",s),this.once("close",a),this.once("upgrading",l),-1!==this._upgrades.indexOf("webtransport")&&"webtransport"!==e?this.setTimeoutFn(()=>{n||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const t=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}}let fd=class extends _d{constructor(e,t={}){const n="object"==typeof e?e:t;(!n.transports||n.transports&&"string"==typeof n.transports[0])&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map(e=>ad[e]).filter(e=>!!e)),super(e,n)}};const md="function"==typeof ArrayBuffer,gd=Object.prototype.toString,yd="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===gd.call(Blob),vd="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===gd.call(File);function wd(e){return md&&(e instanceof ArrayBuffer||(e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer)(e))||yd&&e instanceof Blob||vd&&e instanceof File}function bd(e,t){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let t=0,n=e.length;t<n;t++)if(bd(e[t]))return!0;return!1}if(wd(e))return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1===arguments.length)return bd(e.toJSON(),!0);for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&bd(e[t]))return!0;return!1}function Sd(e){const t=[],n=e.data,r=e;return r.data=Ed(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Ed(e,t){if(!e)return e;if(wd(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=Ed(e[r],t);return n}if("object"==typeof e&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=Ed(e[r],t));return n}return e}function kd(e,t){return e.data=Pd(e.data,t),delete e.attachments,e}function Pd(e,t){if(!e)return e;if(e&&!0===e._placeholder){if("number"==typeof e.num&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Pd(e[n],t);else if("object"==typeof e)for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Pd(e[n],t));return e}const Td=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Od;!function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"}(Od||(Od={}));function Cd(e){return"[object Object]"===Object.prototype.toString.call(e)}class xd extends Lu{constructor(e){super(),this.reviver=e}add(e){let t;if("string"==typeof e){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const n=t.type===Od.BINARY_EVENT;n||t.type===Od.BINARY_ACK?(t.type=n?Od.EVENT:Od.ACK,this.reconstructor=new Rd(t),0===t.attachments&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else{if(!wd(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t))}}decodeString(e){let t=0;const n={type:Number(e.charAt(0))};if(void 0===Od[n.type])throw new Error("unknown packet type "+n.type);if(n.type===Od.BINARY_EVENT||n.type===Od.BINARY_ACK){const r=t+1;for(;"-"!==e.charAt(++t)&&t!=e.length;);const o=e.substring(r,t);if(o!=Number(o)||"-"!==e.charAt(t))throw new Error("Illegal attachments");n.attachments=Number(o)}if("/"===e.charAt(t+1)){const r=t+1;for(;++t;){if(","===e.charAt(t))break;if(t===e.length)break}n.nsp=e.substring(r,t)}else n.nsp="/";const r=e.charAt(t+1);if(""!==r&&Number(r)==r){const r=t+1;for(;++t;){const n=e.charAt(t);if(null==n||Number(n)!=n){--t;break}if(t===e.length)break}n.id=Number(e.substring(r,t+1))}if(e.charAt(++t)){const r=this.tryParse(e.substr(t));if(!xd.isPayloadValid(n.type,r))throw new Error("invalid payload");n.data=r}return n}tryParse(e){try{return JSON.parse(e,this.reviver)}catch(e){return!1}}static isPayloadValid(e,t){switch(e){case Od.CONNECT:return Cd(t);case Od.DISCONNECT:return void 0===t;case Od.CONNECT_ERROR:return"string"==typeof t||Cd(t);case Od.EVENT:case Od.BINARY_EVENT:return Array.isArray(t)&&("number"==typeof t[0]||"string"==typeof t[0]&&-1===Td.indexOf(t[0]));case Od.ACK:case Od.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Rd{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const e=kd(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}var Ad=Object.freeze({__proto__:null,Decoder:xd,Encoder:class{constructor(e){this.replacer=e}encode(e){return e.type!==Od.EVENT&&e.type!==Od.ACK||!bd(e)?[this.encodeAsString(e)]:this.encodeAsBinary({type:e.type===Od.EVENT?Od.BINARY_EVENT:Od.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id})}encodeAsString(e){let t=""+e.type;return e.type!==Od.BINARY_EVENT&&e.type!==Od.BINARY_ACK||(t+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(t+=e.nsp+","),null!=e.id&&(t+=e.id),null!=e.data&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=Sd(e),n=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(n),r}},get PacketType(){return Od},protocol:5});function Nd(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Fd=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class jd extends Lu{constructor(e,t,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[Nd(e,"open",this.onopen.bind(this)),Nd(e,"packet",this.onpacket.bind(this)),Nd(e,"error",this.onerror.bind(this)),Nd(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){var n,r,o;if(Fd.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;const i={type:Od.EVENT,data:t,options:{}};if(i.options.compress=!1!==this.flags.compress,"function"==typeof t[t.length-1]){const e=this.ids++,n=t.pop();this._registerAckCallback(e,n),i.id=e}const s=null===(r=null===(n=this.io.engine)||void 0===n?void 0:n.transport)||void 0===r?void 0:r.writable,a=this.connected&&!(null===(o=this.io.engine)||void 0===o?void 0:o._hasPingExpired());return this.flags.volatile&&!s||(a?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(e,t){var n;const r=null!==(n=this.flags.timeout)&&void 0!==n?n:this._opts.ackTimeout;if(void 0===r)return void(this.acks[e]=t);const o=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&this.sendBuffer.splice(t,1);t.call(this,new Error("operation has timed out"))},r),i=(...e)=>{this.io.clearTimeoutFn(o),t.apply(this,e)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...t){return new Promise((n,r)=>{const o=(e,t)=>e?r(e):n(t);o.withError=!0,t.push(o),this.emit(e,...t)})}_addToQueue(e){let t;"function"==typeof e[e.length-1]&&(t=e.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((e,...r)=>{if(n!==this._queue[0])return;return null!==e?n.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(e)):(this._queue.shift(),t&&t(null,...r)),n.pending=!1,this._drainQueue()}),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||0===this._queue.length)return;const t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){"function"==typeof this.auth?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:Od.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(t=>String(t.id)===e)){const t=this.acks[e];delete this.acks[e],t.withError&&t.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case Od.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Od.EVENT:case Od.BINARY_EVENT:this.onevent(e);break;case Od.ACK:case Od.BINARY_ACK:this.onack(e);break;case Od.DISCONNECT:this.ondisconnect();break;case Od.CONNECT_ERROR:this.destroy();const t=new Error(e.data.message);t.data=e.data.data,this.emitReserved("connect_error",t)}}onevent(e){const t=e.data||[];null!=e.id&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const n of t)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&"string"==typeof e[e.length-1]&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let n=!1;return function(...r){n||(n=!0,t.packet({type:Od.ACK,id:e,data:r}))}}onack(e){const t=this.acks[e.id];"function"==typeof t&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Od.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const n of t)n.apply(this,e.data)}}}function Id(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Id.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=1&Math.floor(10*t)?e+n:e-n}return 0|Math.min(e,this.max)},Id.prototype.reset=function(){this.attempts=0},Id.prototype.setMin=function(e){this.ms=e},Id.prototype.setMax=function(e){this.max=e},Id.prototype.setJitter=function(e){this.jitter=e};class Md extends Lu{constructor(e,t){var n;super(),this.nsps={},this.subs=[],e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.opts=t,qu(this,t),this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(n=t.randomizationFactor)&&void 0!==n?n:.5),this.backoff=new Id({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this._readyState="closed",this.uri=e;const r=t.parser||Ad;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=!1!==t.autoConnect,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return void 0===e?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return void 0===e?this._reconnectionDelay:(this._reconnectionDelay=e,null===(t=this.backoff)||void 0===t||t.setMin(e),this)}randomizationFactor(e){var t;return void 0===e?this._randomizationFactor:(this._randomizationFactor=e,null===(t=this.backoff)||void 0===t||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return void 0===e?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,null===(t=this.backoff)||void 0===t||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new fd(this.uri,this.opts);const t=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const r=Nd(t,"open",function(){n.onopen(),e&&e()}),o=t=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",t),e?e(t):this.maybeReconnectOnOpen()},i=Nd(t,"error",o);if(!1!==this._timeout){const e=this._timeout,n=this.setTimeoutFn(()=>{r(),o(new Error("timeout")),t.close()},e);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}return this.subs.push(r),this.subs.push(i),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(Nd(e,"ping",this.onping.bind(this)),Nd(e,"data",this.ondata.bind(this)),Nd(e,"error",this.onerror.bind(this)),Nd(e,"close",this.onclose.bind(this)),Nd(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(e){this.onclose("parse error",e)}}ondecoded(e){zu(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new jd(this,e,t),this.nsps[e]=n),n}_destroy(e){const t=Object.keys(this.nsps);for(const e of t){if(this.nsps[e].active)return}this._close()}_packet(e){const t=this.encoder.encode(e);for(let n=0;n<t.length;n++)this.engine.write(t[n],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,t){var n;this.cleanup(),null===(n=this.engine)||void 0===n||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),e.skipReconnect||e.open(t=>{t?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",t)):e.onreconnect()}))},t);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const Ud={};function Ld(e,t){"object"==typeof e&&(t=e,e=void 0);const n=function(e,t="",n){let r=e;n=n||"undefined"!=typeof location&&location,null==e&&(e=n.protocol+"//"+n.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(e=void 0!==n?n.protocol+"//"+e:"https://"+e),r=ud(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const o=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port+t,r.href=r.protocol+"://"+o+(n&&n.port===r.port?"":":"+r.port),r}(e,(t=t||{}).path||"/socket.io"),r=n.source,o=n.id,i=n.path,s=Ud[o]&&i in Ud[o].nsps;let a;return t.forceNew||t["force new connection"]||!1===t.multiplex||s?a=new Md(r,t):(Ud[o]||(Ud[o]=new Md(r,t)),a=Ud[o]),n.query&&!t.query&&(t.query=n.queryKey),a.socket(n.path,t)}Object.assign(Ld,{Manager:Md,Socket:jd,io:Ld,connect:Ld});var zd,Bd,Dd,$d=function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},Wd=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};class qd{constructor(e,t=Po.PROD){zd.set(this,null),Bd.set(this,void 0),Dd.set(this,void 0),$d(this,Bd,e,"f"),$d(this,Dd,t,"f")}connect(){return new Promise((e,t)=>{$d(this,zd,Ld(No({urlName:"APP_POSE_DETECTION_WEBSOCKET_URL",urlType:Wd(this,Dd,"f")})),"f"),Wd(this,zd,"f").on("connect",()=>{var n;const r=null===(n=Wd(this,zd,"f"))||void 0===n?void 0:n.id;r?e(r):t("Failed to obtain socket ID.")}),Wd(this,zd,"f").on("connect_error",e=>{t(e)})})}videoEmit({image:e,scanId:t}){if(!Wd(this,zd,"f"))throw new Error("Socket is not connected");Wd(this,zd,"f").emit("video",{image:e,user_unique_key:t})}disconnect(){var e;null===(e=Wd(this,zd,"f"))||void 0===e||e.disconnect()}poseStatus(e){if(!Wd(this,zd,"f"))throw new Error("Socket is not connected");Wd(this,zd,"f").on("pose_status",t=>{null==e||e(t)})}connected(){var e;return!!(null===(e=Wd(this,zd,"f"))||void 0===e?void 0:e.connected)}}zd=new WeakMap,Bd=new WeakMap,Dd=new WeakMap;var Hd,Vd,Yd,Kd,Gd,Jd,Xd,Qd,Zd,eh,th=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?o(e.value):function(e){return e instanceof n?e:new n(function(t){t(e)})}(e.value).then(s,a)}l((r=r.apply(e,t||[])).next())})},nh=function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},rh=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};class oh{constructor(e,t=Po.PROD){Hd.add(this),Vd.set(this,new Map),Yd.set(this,new Map),Kd.set(this,void 0),Gd.set(this,void 0),Qd.set(this,e=>{if(e){const t=rh(this,Vd,"f").get(e),n=rh(this,Yd,"f").get(e);null==t||t.close(),n&&clearTimeout(n),rh(this,Vd,"f").delete(e),rh(this,Yd,"f").delete(e)}else rh(this,Vd,"f").forEach(e=>e.close()),rh(this,Yd,"f").forEach(e=>clearTimeout(e)),rh(this,Vd,"f").clear(),rh(this,Yd,"f").clear()}),Zd.set(this,({onSuccess:e,onError:t,tryonId:n})=>{const r=setTimeout(()=>{rh(this,eh,"f").call(this,{onSuccess:e,onError:t,tryonId:n}),rh(this,Qd,"f").call(this,n)},3e5);rh(this,Yd,"f").set(n,r)}),this.handleTryOnWebSocket=({tryonId:e,onError:t,onSuccess:n,onClose:r,onOpen:o})=>{if(!1===Co(e))throw new Error(bo);rh(this,Qd,"f").call(this,e);const i=`${No({urlName:Zr,urlType:rh(this,Gd,"f")})}${ho}?tryonId=${e}`,s=new WebSocket(i);rh(this,Vd,"f").set(e,s),s.onopen=()=>{null==o||o(),rh(this,Zd,"f").call(this,{onSuccess:n,onError:t,tryonId:e})},s.onmessage=r=>{let o;try{o=JSON.parse(r.data)}catch(e){return void console.log("Invalid JSON:",r.data)}"success"===(null==o?void 0:o.status)?null==n||n(o):null==t||t(o);const i=rh(this,Yd,"f").get(e);i&&clearTimeout(i),rh(this,Yd,"f").delete(e)},s.onclose=()=>{null==r||r()},s.onerror=e=>{null==t||t(e)}},eh.set(this,e=>th(this,[e],void 0,function*({onSuccess:e,onError:t,tryonId:n}){try{const t=yield this.getTryOnResult({tryonId:n});null==e||e(t.data)}catch(e){null==t||t(e)}})),this.getTryOnResult=({tryonId:e})=>{if(!1===Co(e))throw new Error(bo);const t=`${No({urlName:Qr,urlType:rh(this,Gd,"f")})}${uo}/${e}`;return Ar.post(t,null,{headers:{"X-Api-Key":rh(this,Kd,"f")}})},nh(this,Kd,e,"f"),nh(this,Gd,t,"f")}uploadFile(e){return th(this,arguments,void 0,function*({files:e,userEmail:t,fileNoLimit:n=2}){if(!1===Co(e,t))throw new Error(bo);if(!Fo(t.trim()))throw new Error(Eo);if(n<=0)throw new Error(`Provide valid file number limit ${n}.`);if((null==e?void 0:e.length)>n)throw new Error(`Cannot allow more than ${n} files.`);try{const n={userEmail:t,userImages:[]};null==e||e.forEach(e=>{n.userImages.push(e.name)});const r=yield rh(this,Hd,"m",Jd).call(this,n);for(const t of e)yield rh(this,Hd,"m",Xd).call(this,r.data.uploadUrls[t.name].url,t);return"uploaded successfully!"}catch(e){throw e}})}getUploadedFiles(e){if(!1===Co(e))throw new Error(bo);if(!Fo(e.trim()))throw new Error(Eo);const t={userEmail:e};return Ar.post(`${No({urlName:Qr,urlType:rh(this,Gd,"f")})}${lo}`,t,{headers:{"X-Api-Key":rh(this,Kd,"f")}})}deleteImage({userEmail:e,fileName:t}){if(!1===Co(e,t))throw new Error(bo);if(!Fo(e.trim()))throw new Error(Eo);const n={userEmail:e,file:t};return Ar.delete(`${No({urlName:Qr,urlType:rh(this,Gd,"f")})}${co}`,{headers:{"X-Api-Key":rh(this,Kd,"f")},data:n})}handleTryOnSubmit({shopDomain:e,products:t,selectedUserImages:n,requestSource:r,callbackUrl:o,openTryonId:i,selectedProductImageUrl:s,token:a}){if(!1===Co(e,t,a))throw new Error(bo);const l=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({products:t,customerStoreUrl:e},null!=n&&{selectedUserImages:n}),null!=r&&{requestSource:r}),null!=o&&{callbackUrl:o}),null!=i&&{openTryonId:i}),null!=s&&{selectedProductImageUrl:s}),c=`${No({urlName:Qr,urlType:rh(this,Gd,"f")})}${ho}`,u={"X-Api-Key":rh(this,Kd,"f")};return a&&(u.Authorization=`Bearer ${a}`),Ar.post(c,l,{headers:u})}getShareLink(e){return Ar.post(`${No({urlName:Qr,urlType:rh(this,Gd,"f")})}${mo}`,{tryonId:e},{headers:{"X-Api-Key":rh(this,Kd,"f")}})}getProductImageEligibility({storeUrl:e,productHandle:t,imageURL:n,productDescription:r}){if(!1===Co(e,t,n))throw new Error(bo);const o={storeUrl:e,productHandle:t,imageURL:n,productDescription:null!=r?r:null},i=`${No({urlName:Qr,urlType:rh(this,Gd,"f")})}${yo}`;return Ar.post(i,o,{headers:{"X-Api-Key":rh(this,Kd,"f")}})}}Vd=new WeakMap,Yd=new WeakMap,Kd=new WeakMap,Gd=new WeakMap,Qd=new WeakMap,Zd=new WeakMap,eh=new WeakMap,Hd=new WeakSet,Jd=function(e){if(!1===Co(e))throw new Error(bo);return Ar.post(`${No({urlName:Qr,urlType:rh(this,Gd,"f")})}${ao}`,e,{headers:{"Content-Type":"application/json","X-Api-Key":rh(this,Kd,"f")}})},Xd=function(e,t){if(!1===Co(e,t))throw new Error(bo);return Ar.put(e,t,{headers:{"Content-Type":t.type}})};var ih,sh,ah,lh=function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},ch=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};ih=new WeakMap,sh=new WeakMap,function(e){e.DEV="dev",e.STAGING="staging",e.PROD="prod"}(ah||(ah={}));const uh=new class{constructor(e,t=Po.PROD){ih.set(this,void 0),sh.set(this,void 0),lh(this,ih,e,"f"),lh(this,sh,t,"f"),this.auth=new zo(ch(this,ih,"f"),ch(this,sh,"f")),this.custom=new qo(ch(this,ih,"f"),ch(this,sh,"f")),this.fileUpload=new eu(ch(this,ih,"f"),ch(this,sh,"f")),this.measurement=new mu(ch(this,ih,"f"),ch(this,sh,"f")),this.poseDetection=new qd(ch(this,ih,"f"),ch(this,sh,"f")),this.tryOn=new oh(ch(this,ih,"f"),ch(this,sh,"f"))}}("8e35dfd4-010c-40ca-ad79-fc72dc307efb",ah.STAGING);let dh,hh=null,ph=null;var _h=o.memo(function({setIsScanLocked:t,resetDetector:n,scanID:r,setIsVideoUploaded:o,setScanFailsError:s,setScanStartTime:a,setScanUniqueKey:u,userDetails:p,config:_}){const{gender:f,heightInCm:m,email:g,shopDomain:w}=p,b=h(null),S=h(null),[E,k]=l([]),[P,T]=l(!0),[O,C]=l(!1),[x,R]=l(!1),[A,N]=l(!0),[F,j]=l(!1),I=h(null),[M,U]=l(""),[L,z]=l([]),[B,D]=l(""),[$,W]=l(!1),[q,H]=l(!1),[V,Y]=l(!1),[K,G]=l([]),[J,X]=l(!1),Q=h(!0),Z=h(!0),ee=h(!1);let te=0;const{setStartGyro:ne,handleFileUpload:re,setUploadLoading:oe}=d(Et),ie=()=>{ee.current=!1,clearTimeout(dh),I.current&&clearTimeout(I.current),u(Ee()),s(""),oe?.(!1),k([]),T(!0),C(!1),R(!1),N(!0),j(!1),I.current=null,U(""),z([]),D(""),W(!$),ne(!1),kt.stopAudio(),H(!1),Y(!1),te=0,null!==S.current&&S.current.stop(),K.forEach(e=>{S.current&&S.current.removeEventListener("dataavailable",e)}),G([]),Q.current=!0,X(!1),o(!1)},se=i(()=>{setTimeout(()=>{T(!1)},1e3)},[]),ae=i(()=>{ve({eventName:`${w}/rescan`,email:g,scanID:r,height:m,gender:f,status:!1}),Q.current=!1,ie(),ge()},[ie,r,g]),le=i(()=>{Q.current=!1,Y(!0),X(!1),I.current&&clearTimeout(I.current),S.current&&S.current.pause(),kt.stopAudio(),uh.poseDetection.disconnect(),te=0,S.current&&S.current.stop(),K.forEach(e=>{S.current&&S.current.removeEventListener("dataavailable",e)}),G([]),clearTimeout(dh)},[S,K,kt,Q]),ce=v.filter(e=>MediaRecorder.isTypeSupported(e)),ue=i(async()=>{Q.current=!0,await kt.playAudio(`${y}SpotOn.mp3`),Y(!1),X(!1),I.current&&clearTimeout(I.current),C(!1)},[I,kt]),de=i(async()=>{try{hh=await uh.poseDetection.connect(),we.capture(`${w}/pose_detection_connected`,{scanID:r,email:g,id:hh})}catch(e){console.log(e,"while connecting websocket")}},[r,w,g]),he=i(({data:e})=>{e&&e.size>0&&Q.current&&(k(t=>t.concat(e)),!ee.current&&b.current&&(ee.current=!0))},[ue,be,w,r,g,b]),pe=i(async()=>{L.length>0&&Q.current&&(await kt.playAudio(y+L[L.length-1]),Q.current&&(dh=setTimeout(pe,2e3)))},[L,Q]),_e=i(()=>{S&&S.current&&S.current.stop(),C(!0);try{if(b&&b.current&&b.current.stream){const e={mimeType:ce[0]};S.current=new MediaRecorder(b.current.stream,e),S.current.addEventListener("dataavailable",he),G([...K,he]),S.current.start(1e3),N(!1)}}catch(e){console.log("error while using media recorder",e)}},[b,ce,he,K]),fe=i(async()=>{I.current&&clearTimeout(I.current),_e(),Q.current&&(I.current=setTimeout(async()=>{Q.current&&(await kt.playAudio(`${y}SpotOn.mp3`),C(!1))},15e3)),R(!0),Q.current&&await kt.playAudio(`${y}Spin.mp3`)},[_e,Q,kt]),me=i(({data:e})=>{e.size>0&&uh.poseDetection.connected()&&(uh.poseDetection.poseStatus(async e=>{if(e&&e.audio&&e.audio.length>0){const t=document.querySelector("#audioElement");!0===e.status&&e.sid===hh?te<2?(0===te&&t?.paused&&await kt.playAudio(y+e.audio),te+=1):(D(e.audio),clearTimeout(dh),uh.poseDetection.disconnect(),setTimeout(fe,1e3)):(te=0,!t?.paused||ph&&ph?.audioName===e.audio?ph?.audioName===e.audio&&t?.paused&&(ph&&ph.no_of_times_skipped>=ph.skipCount?(ph.no_of_times_skipped=0,kt.playAudio(y+e.audio)):ph&&(ph.no_of_times_skipped+=1)):(ph={skipCount:2,no_of_times_skipped:0,audioName:e.audio},kt.playAudio(y+e.audio)))}}),b?.current&&null!==b.current.getScreenshot()&&uh.poseDetection.videoEmit({image:b.current.getScreenshot()||"",scanId:r}))},[b,r,uh,hh,te,fe,kt]),ge=i(async()=>{j(!0),ne(!0),Z.current&&(Z.current=!1,be({eventName:"scan started",scanID:r,status:"success",email:g})),a(Se()),T(!0),Q.current&&await kt.playAudio(`${y}StartScan.mp3`),Q.current&&await kt.playAudio(`${y}LiftArmsAndHoldAtHip.mp3`),Q.current&&(j(!1),C(!0),H(!0),X(!0),se());try{if(b&&b.current&&b.current.stream&&Q.current){const e={mimeType:ce[0]};Q.current&&(S.current=new MediaRecorder(b.current.stream,e)),Q.current&&S.current&&S.current.addEventListener("dataavailable",me),G([...K,me]),S.current&&S.current.start(1e3),N(!1),Q.current&&(dh=setTimeout(pe,2e3))}}catch(e){console.log("error ----------",e)}},[b,ce,me,K,pe,Q]);return c(()=>(w&&(t(!0),de()),()=>{hh&&(uh.poseDetection.disconnect(),we.capture(`${w}/pose_detection_disconnected`,{scanID:r,email:g,id:hh})),K.forEach(e=>{S?.current?.removeEventListener("dataavailable",e)})}),[$,w]),c(()=>{L.push(M)},[M]),c(()=>{z([])},[B]),c(()=>{const e=E.length&&E.length>0;A||!e||O||!Q.current||V||S&&S.current&&(O||(S.current.stop(),N(!0)))},[A,O,E,V]),c(()=>{const e=E.length&&E.length>0;if(A||!e||O)console.log("No video found to upload");else if(S&&S.current&&Q.current&&!V&&!O){const e=new File(E,`${r}.webm`,{type:"video/webm"});oe?.(!0),s(""),re?.(e)}},[A,O,E,V,S,Q]),c(()=>{ie()},[]),e(St,{resetDetector:n,handleShowStreamCamera:ie,loadingCam:P,handlePause:le,showRestart:q,pause:V,handleReScan:ae,recordingStarted:O,isScanning:F,startSendingVideoFrames:ge,faceDone:x,stopRecording:ue,showPause:J,webcamRef:b,handleUserMedia:se,config:_})});function fh({scanID:t,userDetails:n,setIsVideoUploaded:r,setScanFailsError:o,setScanStartTime:i,setScanUniqueKey:s,config:a}){const[u,d]=l(90),[p,_]=l(0),[f,m]=l(null),[g,y]=l(!1),[v,w]=l(0),b=h([]),[S,E]=l(!1),k=u-p,P=k>=80&&k<=95;c(()=>{if("undefined"!=typeof window&&window.DeviceOrientationEvent){const e=e=>{if(null!==e.beta){let t=Math.abs(e.beta);null!==e.gamma&&(t*=Math.cos(e.gamma*Math.PI/180)),t=Math.max(0,Math.min(180,t)),d(t)}},t=async()=>{const t=DeviceOrientationEvent;if(t&&"function"==typeof t.requestPermission)try{"granted"===await t.requestPermission()&&window.addEventListener("deviceorientation",e)}catch(e){console.error("Permission error",e)}else window.addEventListener("deviceorientation",e);return()=>{e&&window.removeEventListener("deviceorientation",e)}};document.addEventListener("click",t,{once:!0})}},[]),c(()=>{if(b.current=[...b.current.slice(-4),k],b.current.length>=5){const e=Math.max(...b.current)-Math.min(...b.current);w(P&&e<2?e=>Math.min(100,e+10):e=>Math.max(0,e-20))}P||null===f&&!g||O()},[k,P,f,g]),c(()=>{v>=100&&null===f&&!g&&T(),v<50&&null!==f&&O()},[v,f,g]);const T=()=>{m(3);const e=setInterval(()=>{m(t=>null===t||t<=1?(clearInterval(e),y(!0),null):t-1)},1e3)},O=()=>{m(null),S||y(!1)};return e(tt,{angle:k,countdown:f,isScanning:g,isInTargetRange:P,stabilityScore:v,config:a,children:g&&e(_h,{setIsScanLocked:E,resetDetector:()=>{d(90),_(0),m(null),y(!1),w(0),E(!1),b.current=[]},scanID:t,userDetails:n,setIsVideoUploaded:r,setScanFailsError:o,setScanStartTime:i,setScanUniqueKey:s,config:a})})}function mh({message:r,config:i}){const[s]=o.useState(!0),{translate:a}=d(wt)||{};return e($e,{open:s,className:"confirm-modal",children:e("div",{className:"modal-main",children:e("div",{className:"text-center",children:t(n,r?{children:[e("h2",{style:{fontFamily:i?.style?.heading?.headingFontFamily||"SeriouslyNostalgic Fn",fontSize:i?.style?.heading?.headingFontSize||"32px",color:i?.style?.heading?.headingColor||"#000",fontWeight:i?.style?.heading?.headingFontWeight||"normal"},children:"Seems camera already in use"}),t("p",{className:"mt-[0.5rem] text-sm",style:{fontFamily:i?.style?.base?.baseFontFamily||"Inter, sans-serif",fontSize:i?.style?.base?.baseFontSize||"16px",color:i?.style?.base?.baseTextColor||"#000"},children:["Can you try closing the browser/app that is using the camera and try again here."," "]})]}:{children:[e("h2",{style:{fontFamily:i?.style?.heading?.headingFontFamily||"SeriouslyNostalgic Fn",fontSize:i?.style?.heading?.headingFontSize||"32px",color:i?.style?.heading?.headingColor||"#000",fontWeight:i?.style?.heading?.headingFontWeight||"normal"},children:a?.(g.Please_check_your_setting_for_camera_permission)}),e("p",{className:"mt-[0.5rem] text-sm",style:{fontFamily:i?.style?.base?.baseFontFamily||"Inter, sans-serif",fontSize:i?.style?.base?.baseFontSize||"16px",color:i?.style?.base?.baseTextColor||"#000"},children:`${a?.(g.Settings)} > ${ke()} > ${a?.(g.Enable_the_camera_permissions)}`})]})})})})}function gh({setShowDrawer:t,config:n,loader:r}){const[o,s]=l({disabled:!1,message:""}),[a,u]=l(!0),d=h(null),p=i(async()=>{const e=await Pe();s(e),u(!1)},[]);return c(()=>{p()},[]),a?e(Re,{url:r}):o?.disabled?e(mh,{config:n,message:o?.message}):e(it,{audio:!1,ref:d,screenshotQuality:1,videoConstraints:_,mirrored:!0,onUserMedia:()=>t?.(!0),screenshotFormat:"image/jpeg",style:{position:"relative",top:0,bottom:0,zIndex:0,width:"100%",height:"100%",objectFit:"cover"}})}function yh({link:t,onReady:n,wrapperClassName:r="[&_video]:rounded-t-[20px] w-full h-full"}){const o=h(null),i=h(null);let s={autoplay:!0,controls:!1,responsive:!0,fluid:!0,muted:!0,navigationUI:"hide",preload:"metadata",poster:w};return c(()=>{if(!i.current&&t&&o?.current){const e=Ae(o.current,{...s});e.ready(()=>{i.current=e;const r={...s,sources:[{src:t,type:"application/x-mpegURL"}]};e.autoplay(r.autoplay),e.src(r.sources),n?.(e)})}},[t,o]),c(()=>{const e=i.current;return()=>{e&&!e.isDisposed()&&(e.dispose(),i.current=null)}},[i]),e("div",{className:r,children:e("video",{ref:o,muted:!0,className:"video-js",playsInline:!0,onDrag:e=>e.preventDefault()})})}function vh({scanFailsError:r,serverAtCapacity:o=!1,onNext:i,gender:s,setScanUniqueKey:a,resolvedConfig:c,setIsVideoUploaded:u}){const{translate:h}=d(wt)||{},[_,m]=l(!1),y=()=>{m(!_)};return t(n,{children:[t("div",{className:"flex flex-col h-full max-w-[28rem] mx-auto w-full rounded-t-[20px] overflow-y-auto",style:{background:c?.style?.base?.backgroundColor},children:[e("div",{className:"w-full max-w-[28rem] mx-auto pt-[1rem] px-[1rem]",children:e(p,{noTitle:!0,resolvedConfig:c})}),t("div",{className:"flex-1",children:[r&&t("div",{className:"px-[1rem]",children:[e("h2",{className:"text-center",style:{fontFamily:c?.style?.heading?.headingFontFamily||"SeriouslyNostalgic Fn",fontSize:c?.style?.heading?.headingFontSize||"32px",color:c?.style?.heading?.headingColor||"#000",fontWeight:c?.style?.heading?.headingFontWeight||"normal"},children:"There was an issue with your scan"}),e("p",{style:{fontFamily:c?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:"Reason:"}),e("p",{style:{fontFamily:c?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:Te(r)}),e("img",{className:"my-[0.5rem] aspect-[2/1.4] w-full object-cover",onClick:y,src:b[s],alt:"icon"})]}),o&&t("div",{className:"p-[1rem] text-center",children:[t("h3",{style:{fontFamily:c?.style?.heading?.headingFontFamily||"SeriouslyNostalgic Fn",fontSize:c?.style?.heading?.headingFontSize||"32px",color:c?.style?.heading?.headingColor||"#000",fontWeight:c?.style?.heading?.headingFontWeight||"normal"},children:[h?.(g.Scan_s)," ",e("span",{children:h?.(g.vision_model)})," ",h?.(g.is_at_capacity)]}),e("p",{className:"text-base mt-[0.5rem]",style:{fontFamily:c?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:h?.(g.We_are_sorry_about_this_We_are_working_hard_to_add_capacity_Please_try_again_soon)})]})]}),r&&e("div",{className:"p-[1rem] flex gap-[0.5rem]",children:e(f,{disabled:!1,buttonText:"Scan again",className:"!shadow-none",buttonFunc:()=>{i?i?.():a(Ee()),u(!1)},resolvedConfig:c})})]}),_&&t($e,{className:"w-screen h-screen video-modal",onClose:y,open:_,children:[e("div",{className:"flex justifyEnd ",children:e("span",{className:"closeBtn",onClick:y,children:e(st,{className:"absolute right-[8px] top-[8px] text-white z-[9]"})})}),e("div",{className:"aspect-video object-cover rounded-[20px] ",children:e(yh,{link:s?S[s].PRE_LINK:S.male.PRE_LINK,wrapperClassName:"w-screen h-screen fixed top-[0] left-[0]"})})]})]})}function wh({scanId:n,userDetails:r,config:o,isFaceScan:s,isVideoUploadedCorrect:a,isMeasurementAvailable:u,onComplete:d,isSuccess:h}){const{gender:_,shopDomain:m,heightInCm:g,deviceFocalLength:y,userName:v,email:w,scanType:b}=r,S=[E,k,P].includes(b),[C,x]=l(!0),R=i(async()=>{try{S&&await uh.auth.addUser({scanId:n,email:w,name:v,gender:_,height:g}),we.capture(m,{scanID:n,email:w,height:g,focalLength:y,clothesFit:"0",gender:_})}catch(e){console.log(e)}},[S]);c(()=>{a&&R()},[a]);const A=h||(s?u&&a:a||u);return e(je,{className:"flex h-full w-full flex-col ",children:t("div",{className:"h-full w-full flex-col items-center justify-center flex",children:[e(gh,{loader:o?.loader,setShowDrawer:x}),e(Qe,{open:C,onClose:(e,t)=>{},className:"camera-drawer",anchor:"bottom",children:e("div",{className:"max-w-[28rem] mx-auto w-full h-full flex text-center flex-col justify-between items-center bg-primary rounded-t-[30px] p-[1rem]",style:{background:o?.style?.base?.backgroundColor},children:t("div",{className:"w-full h-full flex flex-col",children:[e(p,{title:"Your measurements are being taken",resolvedConfig:o}),e("div",{className:"flex items-center justify-center flex-1",children:e("video",{preload:"auto",className:"max-h-[calc(100vh-450px)] mx-auto w-full object-contain border-none",muted:!0,loop:!0,autoPlay:!0,playsInline:!0,children:e("source",{src:_===Oe.Male?T:O,type:"video/mp4"})})}),A&&e(f,{resolvedConfig:o,className:"!w-[180px] mx-auto",buttonText:"Next",buttonFunc:d&&d})]})})})]})})}const bh=({userDetails:n,language:r=ge.English,config:o,onRetry:s,onScanSuccess:a,onComplete:u,onScanError:h,isError:p,isSuccess:_})=>{const{gender:f,scanType:m,shopDomain:g,heightInCm:y,email:v,deviceFocalLength:w,deviceModelName:b,callbackUrl:S}=n,[E,k]=l(!1),[P,T]=l(!1),[O,A]=l(!1),[N,F]=l({disabled:!1,message:""}),[j,I]=l(""),[M,U]=l(!1),[L,z]=l(!0),[B,D]=l(!1),[$,W]=l(""),[q,H]=l(Se()),{gyroData:V}=function(e){const[t,n]=l([]),[r,o]=l(!1),s=i(e=>{try{const{alpha:t,beta:r,gamma:o}=e;n(e=>[...e,{alpha:t?.toString()||void 0,beta:r?.toString()||void 0,gamma:o?.toString()||void 0,timestamp:(new Date).toISOString()}])}catch(e){console.log(e)}},[]),a=i(async()=>{const e=DeviceOrientationEvent;if(void 0!==e&&"function"==typeof e.requestPermission)try{"granted"===await e.requestPermission()?o(!0):console.warn("Device orientation permission denied.")}catch(e){console.error("Error requesting device orientation permission:",e)}else o(!0)},[]);return c(()=>(e&&r?window.addEventListener("deviceorientation",s):n([]),()=>{window.removeEventListener("deviceorientation",s)}),[e,r,s]),c(()=>{e&&a()},[e,a]),{gyroData:t}}(B),{setPreferredLanguage:Y}=d(wt)||{},K=C(o),G=i(()=>{W(Ee()),I(""),k(!1),U(!1)},[]),J=e=>{h({...e,message:Te(e)}),X(),A(!1),I(e),T(!1),be({eventName:`${g}/measurement_failed/fit-view`,scanID:$,status:"failed",email:v,message:Te(e)}),q&&be({eventName:`${g}/scan_completion_time`,scanID:$,status:"failed",completionTime:Se()-q,email:v})},X=()=>{H(null),W("")},Q=i(async e=>{if(e&&"success"===e?.scanStatus&&"intermediate"===e?.resultType&&200===e?.code)return be({eventName:`${g}/measurement_success/intermediate`,scanID:$,status:"success",email:v}),void a?.(e);X();const t=$;A(!0),be({eventName:`${g}/measurement_success/fit-view`,scanID:t,status:"success",email:v}),q&&be({eventName:`${g}/scan_completion_time`,scanID:t,status:"success",completionTime:Se()-q,email:v})},[m,g,$]),Z=e=>{A(!1),I(""),T(!1),uh.measurement.handleMeasurementSocket({scanId:e||$,onOpen:()=>{xe({eventName:`${g}/webSocket`,scanID:$,connection:"open",type:"measurement_recommendation",email:v})},onClose:()=>xe({eventName:`${g}/webSocket`,scanID:$,connection:"close",type:"measurement_recommendation",email:v}),onError:e=>{J(e),xe({eventName:`${g}/webSocket`,scanID:$,connection:"error",type:"measurement_recommendation",email:v})},onSuccess:e=>{xe({eventName:`${g}/webSocket`,scanID:$,connection:"success",type:"measurement_recommendation",email:v}),Q(e)}})},ee=i(async e=>{const t=Ce({gender:f,focal_length:`${w}`,height:`${y}`,customer_store_url:g,clothes_fit:"0",scan_type:m,callback_url:S||"https://example.com/webhook"});be({eventName:`${g}/body_scan_meta_data`,scanID:$,email:v,data:JSON.stringify(t)});try{await uh.fileUpload.uploadFileFrontend({file:e,arrayMetaData:t,scanId:$,email:v}),await uh.fileUpload.setDeviceInfo({model:b,detection:"manual",gyro:V,scanId:$}),console.log("video successfully uploaded"),U(!1),be({eventName:`${g}/scan_success`,scanID:$,status:"success",email:v,data:JSON.stringify(t)}),be({eventName:"scan finished",scanID:$,status:"success",email:v}),H(Se()),setTimeout(()=>{U(!0)},3e3)}catch(e){be({eventName:"scan finished",scanID:$,status:"failed",email:v,message:Te(e)}),be({eventName:`${g}/scan_failed`,scanID:$,status:"failed",email:v,message:Te(e),data:JSON.stringify(t)}),I(Te(e)),U(!1),console.log(e,"video upload failed")}finally{D(!1)}},[$,V]),te=i(async e=>{try{const t=await uh.measurement.getMeasurementResult(e),n=t?.data?.isMeasured,r=q||Se(),o=Se(),i=300;if(z(!1),!1===n)return X(),void W(Ee());k(!0),!0===n?await Q(null):null===n&&r>o+i?J(t?.data?.error):Z(e)}catch(e){console.log(e),X(),W(Ee()),k(!1)}},[J,Q,W]),ne=i(async()=>{if(+y<152.4||+y>213.36)return void h({message:"Height must be between 152.4cm (5ft) and 213.36cm (7ft)"});const e=await Pe();if(e.disabled)be({eventName:`${g}/camera_activation`,scanID:$,status:"failed",email:v}),z(!1);else{$?te($):z(!1),be({eventName:`${g}/camera_activation`,scanID:$,status:"success",email:v})}F(e),I(""),U(!1)},[te,v,$,W,g]);return c(()=>{Y?.(r),we.init(x,{api_host:R}),we.capture("$pageview")},[]),c(()=>{p||_||g&&ne()},[g,y,p,_]),c(()=>{p||_||M&&g&&$&&Z()},[M,g,$,p,_]),p?t(bt,{children:[e(gh,{}),e(Qe,{anchor:"bottom",open:!0,className:"camera-drawer",onClose:(e,t)=>{},children:e(vh,{scanFailsError:j||p,onNext:()=>{},setScanUniqueKey:W,gender:f,resolvedConfig:K,setIsVideoUploaded:U})})]}):_?e(wh,{isFaceScan:!1,scanId:$,isMeasurementAvailable:O,userDetails:n,isVideoUploadedCorrect:P,config:K,isSuccess:_}):L?e("div",{className:"flex top-0 !mt-0 left-0 z-[999] bg-opacity-80 bg-[#1b1b1b] absolute justify-center items-center w-full h-full",children:e(Re,{url:K?.loader})}):N.disabled?e(bt,{children:e(mh,{})}):E||j?!E&&!O||j?t(bt,{children:[e(gh,{}),e(Qe,{anchor:"bottom",open:!0,className:"camera-drawer",onClose:(e,t)=>{},children:e(vh,{scanFailsError:j,onNext:()=>{s?.(),G()},setScanUniqueKey:W,gender:f,resolvedConfig:K,setIsVideoUploaded:U})})]}):e(wh,{isFaceScan:!1,scanId:$,isMeasurementAvailable:O,userDetails:n,onComplete:u,isVideoUploadedCorrect:P,config:K}):e(Et.Provider,{value:{setStartGyro:D,handleFileUpload:ee,setUploadLoading:k},children:e(dt,{children:e(bt,{children:e(fh,{config:K,scanID:$,userDetails:n,setIsVideoUploaded:U,setScanFailsError:I,setScanStartTime:H,setScanUniqueKey:W})})})})};export{bh as BodyScan};
1
+ import{jsxs as e,jsx as a,Fragment as n}from"react/jsx-runtime";import o,{useCallback as t,useMemo as i,createContext as _,useState as r,useEffect as s,useLayoutEffect as l,useContext as c,useRef as u}from"react";import{H as d,P as m,B as h,S as g,L as p,N as f,A as y,Q as v,J as w,R as S,D as b,C as k,T as E,U as C,V as x,h as z,W as N,X as I,Y as F,Z as P,_ as M,$ as T,a0 as W,G as R,u as D,a1 as A,E as L,I as H,K as B}from"./Header-D3TZLqdL.js";import Y from"clsx";import q from"react-webcam";import j from"@mui/icons-material/Close";import V,{posthog as G}from"posthog-js";import{s as O,a as $,L as U}from"./LoadingScreen-DfPQoZ4M.js";import J from"@mui/material/Dialog";import{Drawer as Q}from"@mui/material";import K from"video.js";import Z from"@mui/material/Box";import"tailwind-merge";import"mic-check";import"uuid";import"@swan-admin/swan-ai-measurements";var X=o.memo(function({size:n=16}){return e("svg",{width:n,height:n,viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a("path",{d:"M22.6968 14.6968C22.6968 16.8185 21.8539 18.8533 20.3536 20.3536C18.8533 21.8539 16.8185 22.6968 14.6968 22.6968",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),a("path",{d:"M18.6968 11.6968V10.6968C18.6968 10.1663 18.4861 9.65764 18.111 9.28256C17.7359 8.90749 17.2272 8.69678 16.6968 8.69678C16.1663 8.69678 15.6576 8.90749 15.2826 9.28256C14.9075 9.65764 14.6968 10.1663 14.6968 10.6968",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),a("path",{d:"M14.6968 10.6968V9.69678C14.6968 9.16634 14.4861 8.65764 14.111 8.28256C13.7359 7.90749 13.2272 7.69678 12.6968 7.69678C12.1663 7.69678 11.6576 7.90749 11.2826 8.28256C10.9075 8.65764 10.6968 9.16634 10.6968 9.69678V10.6968",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),a("path",{d:"M10.6968 10.1968V4.69678C10.6968 4.16634 10.4861 3.65764 10.111 3.28256C9.73592 2.90749 9.22721 2.69678 8.69678 2.69678C8.16634 2.69678 7.65764 2.90749 7.28256 3.28256C6.90749 3.65764 6.69678 4.16634 6.69678 4.69678V14.6968",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),a("path",{d:"M18.6969 11.6968C18.6969 11.1663 18.9076 10.6576 19.2827 10.2826C19.6577 9.90749 20.1664 9.69678 20.6969 9.69678C21.2273 9.69678 21.736 9.90749 22.1111 10.2826C22.4862 10.6576 22.6969 11.1663 22.6969 11.6968V14.6968C22.6969 16.8185 21.854 18.8533 20.3537 20.3536C18.8534 21.8539 16.8186 22.6968 14.6969 22.6968H12.6969C9.89688 22.6968 8.19688 21.8368 6.70688 20.3568L3.10688 16.7568C2.76282 16.3757 2.57847 15.8769 2.592 15.3637C2.60554 14.8505 2.81593 14.3621 3.1796 13.9997C3.54327 13.6373 4.03238 13.4287 4.54565 13.417C5.05892 13.4053 5.55704 13.5914 5.93688 13.9368L7.69688 15.6968",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})});var ee=o.memo(function({angle:n,countdown:o,isScanning:_,isInTargetRange:r,stabilityScore:s,children:l,config:c}){const u=t(()=>n<80?Math.max(0,Math.min(100,10*(n-60))):n>95?Math.max(0,Math.min(100,10*(105-n))):100,[n]),m=i(()=>{if(_)return c?.style?.angleDetector?.successAngleBackground||"#4f46e5";const e=u();if(0===e)return c?.style?.angleDetector?.successAngleLowBackground||"#ffffff";if(100===e)return c?.style?.angleDetector?.successAngleBackground||"#4f46e5";return`rgb(${Math.round(255-e/100*116)}, ${Math.round(255-e/100*163)}, ${Math.round(255-e/100*9)})`},[_,u]),h=t((e,a)=>a>70?e?`text-[${c?.style?.angleDetector?.successAngleTextLightColor}]/70`:`text-[${c?.style?.angleDetector?.successAngleTextLightColor}]`:e?`text-[${c?.style?.angleDetector?.successAngleTextLightColor}]/40`:`text-[${c?.style?.angleDetector?.successAngleTextDarkColor}]/70`,[]),g=t((e=!1)=>{const a=u();return _?`text-[${c?.style?.angleDetector?.successAngleTextLightColor}]`:h(e,a)},[_,u]),p=t((e,a)=>a>70||e?c?.style?.angleDetector?.successAngleTextLightColor:c?.style?.angleDetector?.successAngleTextDarkColor,[]),f=t((e=!1)=>{const a=u();return _?c?.style?.angleDetector?.successAngleTextLightColor:p(e,a)},[_,u]),y=o;function v(){document.documentElement.style.setProperty("--real-vh",window.innerHeight+"px")}return v(),window.addEventListener("resize",v),e("div",{className:"flex w-screen flex-col items-center h-[var(--real-vh)] overflow-hidden touch-none justify-center transition-all duration-300 max-w-[28rem] mx-auto",style:{backgroundColor:m},children:[a("div",{className:"flex justify-start fixed top-[.5rem] max-w-[28rem] mx-auto w-full px-[1rem]",children:a("div",{className:"flex justify-start ",children:a(d,{noTitle:!0,resolvedConfig:c})})}),null!==y?a("div",{className:"relative flex h-[6rem] w-[6rem] items-center justify-center rounded-[9999px] bg-[#fff]/20 transition-all duration-300",style:{border:`2px solid ${f()}`},children:a("div",{className:`text-[3rem] font-bold text-[${f()}]`,style:{fontFamily:c?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:y})}):e("div",_?{className:"relative flex flex-col items-center justify-center",children:[a("div",{className:"relative flex h-16 w-16 items-center justify-center rounded-[9999px] border-2 bg-[#fff]/30 border-[#fff]",children:a("div",{className:"h-4 w-4 rounded-[9999px] animate-pulse bg-[#fff]/80"})}),l]}:{className:Y("relative flex h-[4rem] w-[4rem] items-center justify-center rounded-[9999px] ",r?"bg-[#fff]/20 border-[#fff]":"bg-[#fff]/10 border-[#fff]"),style:{transform:`translateY(${3*(90-n)}px)`,transition:"transform 0.2s ease-out",border:`2px solid ${f()}`},children:[a("div",{className:`h-[1rem] w-[1rem] rounded-[9999px] bg-[${f()}]/80`}),e("div",{className:Y("mt-[.5rem] w-[180px] flex-col flex items-center absolute top-[60px]",g()),children:[a(X,{size:30}),e("p",{style:{fontFamily:c?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:[" ","Tap to start level check",a("br",{})]})]})]}),null!==y&&a("div",{className:"absolute bottom-[8rem] text-center",children:a("div",{className:Y("text-sm font-medium px-4 py-1.5 bg-black/20 rounded-[9999px] mt-8",g()),style:{fontFamily:c?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:"Leave your phone as is"})}),r&&null===y&&!_&&a("div",{className:"absolute bottom-[8rem] w-[12rem]",children:a("div",{className:`h-[.375rem] w-full bg-[${f()}]/20 rounded-[9999px] overflow-hidden`,style:{backgroundColor:`${f()}33`},children:a("div",{className:`h-full bg-[${f()}]/70 transition-all duration-300 rounded-[9999px]`,style:{width:`${n}%`,backgroundColor:`${f()}B3`}})})}),null===y&&!_&&a("div",{className:"absolute bottom-[5rem] text-center",children:e("div",{className:Y("text-[1.5rem] font-light",g()),children:[Math.round(n),"°"]})}),null===y&&!_&&a("div",{className:"absolute bottom-[2rem] text-center max-w-[20rem] mx-auto",children:a("div",{className:Y("text-[.75rem] opacity-50",g()),style:{fontFamily:c?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:"Place your phone upright against an object. Once stable and within the 80-95° range a countdown will start to move to the scan."})})]})});const ae="DESKTOP",ne="TAB",oe="MOBILE",te=_(void 0);function ie({children:e}){const[n,o]=r([window?.innerWidth,window?.innerHeight]),[t,_]=r(!1),c=()=>{o([window?.innerWidth,window?.innerHeight])};s(()=>{c()},[]),l(()=>(window.addEventListener("resize",c),()=>window.removeEventListener("resize",c)),[c]);let u=ae;n[0]>768&&n[0]<1024&&(u=ne),n[0]<768&&(u=oe);const d=i(()=>({size:n,setSize:o,clearInputs:t,setClearInputs:_,media:u}),[n,t,u]);return a(te.Provider,{value:d,children:e})}var _e={Custom_Scan:"Custom Scan",Find_your_perfect_fit:"Find your perfect fit",One_time_setup_in_2_min_or_less:"One time setup in 2 min or less.",PRIVACY:"PRIVACY",Swan_encrypts_your_data_with_Ever_vault_and_ensures_your_video_is_not_seen_by_anyone:"Swan encrypts your data with Ever vault & ensures your video is not seen by anyone.",By_ticking_this_box_you_are_agreeing_to_our:"By ticking this box, you're agreeing to our",privacy_policy:"privacy policy",Get_Measured:"Get Measured",Login:"Login",Where_do_you_shop:"Where do you shop?",Men_s:"Men's",Women_s:"Women's",Next:"Next",Preferred_language:"Preferred language",Hindi:"Hindi",English:"English",French:"French",Spanish:"Spanish",German:"German",Italian:"Italian",Arabic:"Arabic",Phone_Model:"Phone Model",Select_phone_brand:"Select phone brand...",Select_phone_model:"Select phone model...",Measurement_tips:"Measurement tips",Tips_for_your_scan:"Tips for your scan",Watch_this_video_to_know_how_to_scan:"Watch this video to know how to scan",How_to_use_Swan:"How to use Swan",Watch_this_short_video_to_know_how_to_use:" Watch this short video to know how to use",Shop:"Shop",Skip:"Skip",Form_fitting_clothing:"Form fitting clothing",How_form_is_fitting_your_outfit:"How form fitting is your outfit?",For_accurate_scan_please_wear_tight_clothing_Here_s_an_example:"For accurate scan, please wear tight clothing, Here's an example",Scan_with_form_fitting:"Scan with form fitting",Scan_with_form_loose_fit:"Scan with form loose fit",Turn_up_your_volume:"Turn up your volume",For_smart_voice_guide:"For smart voice guide",Place_your_phone_on_a_table_at:" Place your phone on a table at",a_hip_height:"a hip height",Scan:"Scan",Height:"Height",Height_in_ft:"Height in ft",Height_in_inch:"Height in inch",How_tall_are_you:"How tall are you?",We_are_sorry_we_currently_do_not_support_this_heights_outside_of_5_ft_and_7_ft_We_are_working_on_new_models_that_do:"We're sorry, we currently don't support this heights outside of 5 ft & 7 ft. We're working on new models that do.",Confirm:"Confirm",To_start_your_measurement:"To start your measurement",Scan_this_QR_code_with_your_phone:"Scan this QR code with your phone",You_can_continue_from_here_after_your_scan:"You can continue from here after your scan",Failed_to_get_measurements:"Failed to get measurements",No_data_found_Go_back_to:"No data found Go back to",back:"back",Profile:"Profile",shopify:"shopify",fit_view_result:"fit view result",Nest:"Nest",Scan_again:"Scan again",Provide_feedback:"Provide feedback",Add_to_cart:"Add to cart",Back_to_product:"Back to product",Fit_Notes:"Fit Notes",Fitted:"Fitted",Ideal_fit:"Ideal fit",Relaxed:"Relaxed",Wrong_email_format:"Wrong email format",Something_went_wrong:"Something went wrong",Email_is_required:"Email is required",Scan_status:"Scan status",Uploading:"Uploading...",Processing:"Processing...",Finishing:"Finishing...",Complete:"Complete!",You_re_logged_in:"You're logged in",Swan_will_load_on_every_supported_page:"Swan will load on every supported page.",Happy_Shopping:"Happy Shopping!",Email_verification_failed:"Email verification failed.",Email_Confirmed:"Email Confirmed.",Measurements_saved:"Measurements saved",Login_anywhere_you_see_the_Swan_logo_to_load_your_measurements:"Login anywhere you see the Swan logo to load your measurements.",Check_your_email:"Check your email",Tap_on_the_verification_link_sent_to:"Tap on the verification link sent to",Email_Confirmation:"Email Confirmation.",Save_your_scan:"Save your scan",Confirm_with_a_single_tap_from_your_email_inbox:"Confirm with a single tap from your email inbox.",Saving_your_scan_means_you_can_load_your_measurements_anywhere_you_see_the_Swan_logo:"Saving your scan means you can load your measurements anywhere you see the Swan logo.",Passwordless_Just_one_tap_via_email:"Passwordless. Just one tap via email.",Join_2000_shoppers:"Join 2,000+ shoppers",Your_measurements_will_be_shared_only_once_your_email_is_confirmed:"Your measurements will be shared only once your email is confirmed.",Enter_your_email:"Enter your email",Send_confirmation_email:"Send confirmation email",No_thanks:"No thanks",We_are_sorry:"We're sorry!",Video_tips_for_scanning:"Video tips for scanning",Please_make_sure_to:"Please make sure to:",one_Complete_a_full_spin_Starting_and_finishing_with_your_feet_facing_your_phone:"1. Complete a full spin. Starting & finishing with your feet facing your phone.",two_Rotate_slowly_throughout_your_spin:"2. Rotate slowly throughout your spin.",three_Make_sure_your_full_body_including_feet_and_hands_are_visible_in_frame:"3. Make sure your full body (including feet & hands) are visible in frame.",Scan_s:"Scan's",vision_model:"vision model",is_at_capacity:"is at capacity.",We_are_sorry_about_this_We_are_working_hard_to_add_capacity_Please_try_again_soon:"We're sorry about this. We're working hard to add capacity. Please try again soon.",Oops:"Oops..",Looks_like_this_QR_code_is_not_valid:"Looks like this QR code is not valid.",Reload_your_desktop_tab_to_generate_a_new_code:"Reload your desktop tab to generate a new code",Magic_link:"Magic link",We_have_sent_you_a_magic_link_via_email:"We've sent you a magic link via email.",Please_confirm_your_email_load_your_measurements_on_any_partner_brand:"Please confirm your email load your measurements on any partner brand..",Welcome_back:"Welcome back!",Load_my_account:"Load my account",Back_to_home:"Back to home",Enter_a_valid_email:"Enter a valid email!",No_measurement_found_for_this_email:"No measurement found for this email",Reset:"Reset",Resume:"Resume",Start_Scan:"Start Scan",Scanning:"Scanning",Detecting_Body:"Detecting Body...",Stop:"Stop",Generating_Measurements:"Generating Measurements",Help:"Help",Scan_tips:"Scan tips",Watch_instructions_video:"Watch instructions video",Wear_form_fitting_clothing_for_the_most_accurate_results:"Wear form fitting clothing for the most accurate results",Position_yourself_in_a_brightly_lit_room:"Position yourself in a brightly lit room",Tie_up_long_hair_and_slip_off_your_shoes:"Tie up long hair & slip off your shoes",Back:"Back",Swan:"Swan",Please_check_your_setting_for_camera_permission:"Please check your setting for camera permission",Settings:"Settings",Enable_the_camera_permissions:"Enable the camera permissions",Go_Back:"Go Back",For_helping_in_getting:"For helping in getting",Measurements_have_been_shared:"Measurements have been shared!",Thank_You:"Thank You!",live:"live.",Your:"Your",Check_back_soon_to_use_Swan:"Check back soon to use Swan",custom_for_your_next_order:"custom for your next order",sevenTillEight:"7till8",Rhodes_and_Beckett:"Rhodes & Beckett",Send_invite:"Send invite",Your_Nest:"Your Nest",Share_your_measurements_to_shop_and_gift_for_those_close_to_you:"Share your measurements to shop & gift for those close to you",Invite_to_Swan:"Invite to Swan",Name:"Name",Enter_their_name:"Enter their name",Enter_their_email:"Enter their email",Message:"Message",Join_Swan:"Join Swan!",Email:"Email",Invite:"Invite",Your_Login:"Your Login",Your_Scans:"Your Scans",Talk_with_the_CEO:"Talk with the CEO",Send_me_an_email:"Send me an email",At_Swan_we_are_here_to_make_shopping_about_you_I_would_love_to_hear_what_you_think_of_Swan_and_what_you_want_to_see_next_I_am_excited_to_hear_your_feedback:"At Swan we're here to make shopping about you. I'd love to hear what you think of Swan and what you want to see next. I'm excited to hear your feedback -",Eoin:"Eoin",You_can_close_this_tab_and_return_to_the_original_to_get_your_sizing_suggestion:"You can close this tab and return to the original to get your sizing suggestion.",Try_On:"Try-On",Invite_friends:"Invite friends",Pending:"Pending",Decline:"Decline",gifting_simple:"gifting simple",Invite_friends_and_make:"Invite friends & make",Nest_will_be_able_to_see_and_size_clothes_on_you:"Nest will be able to see & size clothes on you",By_sharing_your_Swan_profile_those_in_your:"By sharing your Swan profile, those in your",Enter_your_name:"Enter your name",Failed_to_get_tryon:"Failed to get tryon",In_Progress:"In Progress",Go_back_to:"Go back to"},re={Custom_Scan:"कस्टम स्कैन",Find_your_perfect_fit:"अपना संपूर्ण फिट ढूंढें",One_time_setup_in_2_min_or_less:"2 मिनट या उससे कम में एक बार सेटअप करें।",PRIVACY:"गोपनीयता",Swan_encrypts_your_data_with_Ever_vault_and_ensures_your_video_is_not_seen_by_anyone:"स्वान आपके डेटा को एवर वॉल्ट से एन्क्रिप्ट करता है और सुनिश्चित करता है कि आपका वीडियो किसी को भी नहीं दिखाई जाता है।",By_ticking_this_box_you_are_agreeing_to_our:"इस बॉक्स को टिक करके, आप हमारे",privacy_policy:"गोपनीयता नीति",Get_Measured:"माप लो",Login:"लॉग इन करें",Where_do_you_shop:"आप कहाँ खरीदारी करते हैं?",Men_s:"पुरुषों का",Women_s:"महिलाओं का",Next:"आगे",Preferred_language:"पसंदीदा भाषा",Hindi:"हिन्दी",English:"अंग्रेज़ी",French:"फ्रेंच",Spanish:"स्पैनिश",German:"जर्मन",Italian:"इतालवी",Arabic:"अरबी",Phone_Model:"फ़ोन मॉडल",Select_phone_brand:"फ़ोन ब्रांड चुनें...",Select_phone_model:"फ़ोन मॉडल चुनें...",Measurement_tips:"मापन सुझाव",Tips_for_your_scan:"आपके स्कैन के लिए सुझाव",Watch_this_video_to_know_how_to_scan:"स्कैन कैसे करें इसे जानने के लिए इस वीडियो को देखें",How_to_use_Swan:"स्वान का उपयोग कैसे करें",Watch_this_short_video_to_know_how_to_use:"इसे कैसे उपयोग करने के लिए इस छोटे वीडियो को देखें",Shop:"खरीदारी करें",Skip:"छोड़ें",Form_fitting_clothing:"फॉर्म फिटिंग कपड़े",How_form_is_fitting_your_outfit:"आपके आउटफिट को कैसे फॉर्म फिट है?",For_accurate_scan_please_wear_tight_clothing_Here_s_an_example:"सटीक स्कैन के लिए, कृपया टाइट कपड़े पहनें, यहां एक उदाहरण है",Scan_with_form_fitting:"फॉर्म फिटिंग के साथ स्कैन करें",Scan_with_form_loose_fit:"फॉर्म लूज़ फिट के साथ स्कैन करें",Turn_up_your_volume:"अपनी आवाज बढ़ाएं",For_smart_voice_guide:"स्मार्ट वॉयस गाइड के लिए",Place_your_phone_on_a_table_at:"अपने फ़ोन को एक टेबल पर रखें",a_hip_height:"एक कूल्हे की ऊचाई पर",Scan:"स्कैन करें",Height:"ऊचाई",Height_in_ft:"ऊचाई फुट में",Height_in_inch:"ऊचाई इंच में",How_tall_are_you:"आपकी कितनी ऊचाई है?",We_are_sorry_we_currently_do_not_support_this_heights_outside_of_5_ft_and_7_ft_We_are_working_on_new_models_that_do:"माफ़ करें, हम वर्तमान में 5 फीट और 7 फीट के बाहर की इस ऊचाई का समर्थन नहीं करते हैं। हम उन नए मॉडल्स पर काम कर रहे हैं जो करते हैं।",Confirm:"पुष्टि करें",To_start_your_measurement:"अपना मापन शुरू करने के लिए",Scan_this_QR_code_with_your_phone:"इस क्यूआर कोड को अपने फ़ोन से स्कैन करें",You_can_continue_from_here_after_your_scan:"आप अपने स्कैन के बाद यहां से जारी रख सकते हैं",Failed_to_get_measurements:"माप नहीं मिला",No_data_found_Go_back_to:"कोई डेटा नहीं मिला वापस जाएं",back:"वापस",Profile:"प्रोफ़ाइल",shopify:"शॉपिफाई",fit_view_result:"फिट दृश्य परिणाम",Nest:"नेस्ट",Scan_again:"फिर से स्कैन करें",Provide_feedback:"प्रतिपुर्ण प्रतिक्रिया",Add_to_cart:"कार्ट में डालें",Back_to_product:"उत्पाद पर वापस जाएं",Fit_Notes:"फिट नोट्स",Fitted:"फिटेड",Ideal_fit:"आदर्श फिट",Relaxed:"रिलैक्स्ड",Wrong_email_format:"गलत ईमेल प्रारूप",Something_went_wrong:"कुछ गलत हो गया",Email_is_required:"ईमेल आवश्यक है",Scan_status:"स्कैन स्थिति",Uploading:"अपलोड हो रहा है...",Processing:"प्रोसेसिंग...",Finishing:"समापन...",Complete:"पूर्ण!",You_re_logged_in:"आप लॉग इन हैं",Swan_will_load_on_every_supported_page:"स्वॉन हर समर्थित पृष्ठ पर लोड होगा।",Happy_Shopping:"खुश खरीदारी!",Email_verification_failed:"ईमेल सत्यापन असफल हुआ।",Email_Confirmed:"ईमेल सत्यापित हुआ।",Measurements_saved:"माप सहेजे गए",Login_anywhere_you_see_the_Swan_logo_to_load_your_measurements:"जहाँ भी आपको स्वॉन का लोगो दिखे, वहाँ लॉगिन करें और अपनी मापें लोड करें।",Check_your_email:"अपने ईमेल की जाँच करें",Tap_on_the_verification_link_sent_to:"भेजे गए सत्यापन लिंक पर टैप करें",Email_Confirmation:"ईमेल सत्यापन।",Save_your_scan:"अपना स्कैन सहेजें",Confirm_with_a_single_tap_from_your_email_inbox:"एक ही टैप से अपने ईमेल इनबॉक्स से सत्यापित करें।",Saving_your_scan_means_you_can_load_your_measurements_anywhere_you_see_the_Swan_logo:"अपने स्कैन को सहेजना यह मतलब है कि आप स्वॉन लोगो देख सकते हैं हर जगह अपने माप।",Passwordless_Just_one_tap_via_email:"पासवर्ड रहित। बस एक ईमेल के माध्यम से एक टैप।",Join_2000_shoppers:"2,000+ शॉपर्स से जुड़ें",Your_measurements_will_be_shared_only_once_your_email_is_confirmed:"आपके माप साझा किए जाएंगे केवल जब आपका ईमेल सत्यापित होगा।",Enter_your_email:"अपना ईमेल दर्ज करें",Send_confirmation_email:"सत्यापन ईमेल भेजें",No_thanks:"नहीं धन्यवाद",We_are_sorry:"हमें खेद है!",Video_tips_for_scanning:"स्कैनिंग के लिए वीडियो टिप्स",Please_make_sure_to:"कृपया सुनिश्चित करें:",one_Complete_a_full_spin_Starting_and_finishing_with_your_feet_facing_your_phone:"1. पूरी चक्कर मारें। अपने पैर अपने फ़ोन की ओर मुख करके आरंभ और समाप्त करके।",two_Rotate_slowly_throughout_your_spin:"2. अपने चक्कर के दौरान धीरे से घूमें।",three_Make_sure_your_full_body_including_feet_and_hands_are_visible_in_frame:"3. सुनिश्चित करें कि आपका पूरा शरीर (पैर और हाथ भी) फ्रेम में दिखाई दे।",Scan_s:"स्कैन की",vision_model:"दृष्टि मॉडल",is_at_capacity:"क्षमता में है।",We_are_sorry_about_this_We_are_working_hard_to_add_capacity_Please_try_again_soon:"हमें इसके बारे में खेद है। हम क्षमता जोड़ने के लिए कड़ी मेहनत कर रहे हैं। कृपया शीघ्र पुन: प्रयास करें।",Oops:"ओह...",Looks_like_this_QR_code_is_not_valid:"ऐसा दिखता है कि यह QR कोड वैध नहीं है।",Reload_your_desktop_tab_to_generate_a_new_code:"एक नए कोड उत्पन्न करने के लिए अपने डेस्कटॉप टैब को पुनः लोड करें",Magic_link:"जादुई लिंक",We_have_sent_you_a_magic_link_via_email:"हमने आपको एक जादुई लिंक ईमेल के माध्यम से भेजा है।",Please_confirm_your_email_load_your_measurements_on_any_partner_brand:"कृपया अपने ईमेल को सत्यापित करें ताकि आपके माप किसी भी साथी ब्रांड पर लोड किए जा सकें।",Welcome_back:"वापसी पर स्वागत है!",Load_my_account:"मेरे खाते को लोड करें",Back_to_home:"घर वापस",Enter_a_valid_email:"एक वैध ईमेल दर्ज करें!",No_measurement_found_for_this_email:"इस ईमेल के लिए कोई माप नहीं मिला",Reset:"रीसेट",Resume:"पुनः आरंभ करें",Start_Scan:"स्कैन शुरू करें",Scanning:"स्कैनिंग",Detecting_Body:"शरीर का पता लगा जा रहा है...",Stop:"रोकें",Generating_Measurements:"माप उत्पन्न हो रहे हैं",Help:"सहायता",Scan_tips:"स्कैन टिप्स",Watch_instructions_video:"विनिर्देश वीडियो देखें",Wear_form_fitting_clothing_for_the_most_accurate_results:"सबसे सटीक परिणामों के लिए फॉर्म फिटिंग कपड़े पहनें",Position_yourself_in_a_brightly_lit_room:"खुद को एक चमकीले कमरे में स्थित करें",Tie_up_long_hair_and_slip_off_your_shoes:"लंबे बालों को बाँधें और अपने जूते निकालें",Back:"वापस",Swan:"स्वान",Please_check_your_setting_for_camera_permission:"कृपया कैमरा अनुमति के लिए अपनी सेटिंग जाँचें",Settings:"सेटिंग्स",Enable_the_camera_permissions:"कैमरा अनुमतियों को सक्षम करें",Go_Back:"पीछे जाएं",For_helping_in_getting:"प्राप्त करने में मदद के लिए",Measurements_have_been_shared:"मापें साझा की गई हैं!",Thank_You:"धन्यवाद!",live:"लाइव.",Your:"आपकी",Check_back_soon_to_use_Swan:"स्वान का उपयोग करने के लिए जल्दी जांच करें",custom_for_your_next_order:"अपने अगले आदेश के लिए कस्टम",sevenTillEight:"7से8",Rhodes_and_Beckett:"रोड्स और बेकेट",Send_invite:"आमंत्रण भेजें",Your_Nest:"आपका नेस्ट",Share_your_measurements_to_shop_and_gift_for_those_close_to_you:"अपने मापों को साझा करें और उनके लिए खरीददारी और उपहार करें जो आपके करीब हैं",Invite_to_Swan:"स्वान में आमंत्रित करें",Name:"नाम",Enter_their_name:"उनका नाम डालें",Enter_their_email:"उनका ईमेल डालें",Message:"संदेश",Join_Swan:"स्वान में शामिल हों!",Email:"ईमेल",Invite:"आमंत्रण",Your_Login:"आपका लॉगिन",Your_Scans:"आपके स्कैन",Talk_with_the_CEO:"CEO से बात करें",Send_me_an_email:"मुझे एक ईमेल भेजें",At_Swan_we_are_here_to_make_shopping_about_you_I_would_love_to_hear_what_you_think_of_Swan_and_what_you_want_to_see_next_I_am_excited_to_hear_your_feedback:"स्वान में हम यहां हैं कि खरीददारी को आपके बारे में बनाए रखें। मैं यह जानने के लिए उत्सुक हूं कि आप स्वान के बारे में क्या सोचते हैं और आप आगे क्या देखना चाहते हैं। मुझे आपकी प्रतिक्रिया सुनने में बहुत उत्सुकता है -",Eoin:"ईओइन",You_can_close_this_tab_and_return_to_the_original_to_get_your_sizing_suggestion:"आप इस टैब को बंद करके मौलिक पर लौट सकते हैं और अपने साइज़िंग सुझाव प्राप्त कर सकते हैं।",Try_On:"प्रयास करें",Invite_friends:"मित्रों को आमंत्रित करें",Pending:"विचाराधीन",Decline:"अस्वीकार",gifting_simple:"सरल उपहार",Invite_friends_and_make:"मित्रों को आमंत्रित करें और बनाएँ",Nest_will_be_able_to_see_and_size_clothes_on_you:"Nest आप पर कपड़े देखने और आकार निर्धारित करने में सक्षम होगा",By_sharing_your_Swan_profile_those_in_your:"अपने स्वान प्रोफ़ाइल को साझा करके, आपके",Enter_your_name:"अपना नाम दर्ज करें",Failed_to_get_tryon:"प्रयास नहीं मिला",In_Progress:"कार्रवाई में",Go_back_to:"वापस जाएं"},se={Custom_Scan:"Numérisation personnalisée",Find_your_perfect_fit:"Trouvez votre ajustement parfait",One_time_setup_in_2_min_or_less:"Configuration unique en 2 minutes ou moins.",PRIVACY:"CONFIDENTIALITÉ",Swan_encrypts_your_data_with_Ever_vault_and_ensures_your_video_is_not_seen_by_anyone:"Swan chiffre vos données avec Ever vault et veille à ce que votre vidéo ne soit vue par personne.",By_ticking_this_box_you_are_agreeing_to_our:"En cochant cette case, vous acceptez notre",privacy_policy:" politique de confidentialité",Get_Measured:"Obtenez vos mesures",Login:"Connexion",Where_do_you_shop:"Où faites-vous vos achats?",Men_s:"Pour hommes",Women_s:"Pour femmes",Next:"Suivant",Preferred_language:"Langue préférée",Hindi:"Hindi",English:"Anglais",French:"Français",Spanish:"Espagnol",German:"Allemand",Italian:"Italien",Arabic:"Arabe",Phone_Model:"Modèle de téléphone",Select_phone_brand:"Sélectionnez la marque de votre téléphone...",Select_phone_model:"Sélectionnez le modèle de votre téléphone...",Measurement_tips:"Conseils de mesure",Tips_for_your_scan:"Conseils pour votre numérisation",Watch_this_video_to_know_how_to_scan:"Regardez cette vidéo pour savoir comment numériser",How_to_use_Swan:"Comment utiliser Swan",Watch_this_short_video_to_know_how_to_use:"Regardez cette courte vidéo pour savoir comment utiliser",Shop:"Boutique",Skip:"Passer",Form_fitting_clothing:"Vêtements ajustés",How_form_is_fitting_your_outfit:"Comment votre tenue est-elle ajustée?",For_accurate_scan_please_wear_tight_clothing_Here_s_an_example:"Pour une numérisation précise, veuillez porter des vêtements serrés. Voici un exemple",Scan_with_form_fitting:"Numérisation avec ajustement",Scan_with_form_loose_fit:"Numérisation avec ajustement ample",Turn_up_your_volume:"Augmentez le volume",For_smart_voice_guide:"Pour un guide vocal intelligent",Place_your_phone_on_a_table_at:"Placez votre téléphone sur une table à",a_hip_height:"hauteur des hanches",Scan:"Numériser",Height:"Taille",Height_in_ft:"Taille en pieds",Height_in_inch:"Taille en pouces",How_tall_are_you:"Quelle est votre taille?",We_are_sorry_we_currently_do_not_support_this_heights_outside_of_5_ft_and_7_ft_We_are_working_on_new_models_that_do:"Nous sommes désolés, nous ne prenons actuellement pas en charge les tailles en dehors de 5 pieds et 7 pieds. Nous travaillons sur de nouveaux modèles qui le font.",Confirm:"Confirmer",To_start_your_measurement:"Pour commencer votre mesure",Scan_this_QR_code_with_your_phone:"Numérisez ce code QR avec votre téléphone",You_can_continue_from_here_after_your_scan:"Vous pouvez continuer d'ici après votre numérisation",Failed_to_get_measurements:"Échec de l'obtention des mesures",No_data_found_Go_back_to:"Aucune donnée trouvée. Retournez à",back:"arrière",Profile:"Profil",shopify:"shopify",fit_view_result:"résultat de la vue ajustée",Nest:"Nid",Scan_again:"Numériser à nouveau",Provide_feedback:"Fournir des commentaires",Add_to_cart:"Ajouter au panier",Back_to_product:"Retour au produit",Fit_Notes:"Notes d'ajustement",Fitted:"Ajusté",Ideal_fit:"Ajustement idéal",Relaxed:"Détendu",Wrong_email_format:"Format d'e-mail incorrect",Something_went_wrong:"Quelque chose s'est mal passé",Email_is_required:"L'e-mail est requis",Scan_status:"État de la numérisation",Uploading:"Téléchargement...",Processing:"Traitement...",Finishing:"Terminé...",Complete:"Terminé!",You_re_logged_in:"Vous êtes connecté",Swan_will_load_on_every_supported_page:"Swan se chargera sur chaque page prise en charge.",Happy_Shopping:"Joyeux shopping!",Email_verification_failed:"Échec de la vérification de l'e-mail",Email_Confirmed:"E-mail confirmé",Measurements_saved:"Mesures enregistrées",Login_anywhere_you_see_the_Swan_logo_to_load_your_measurements:"Connectez-vous partout où vous voyez le logo Swan pour charger vos mesures.",Check_your_email:"Vérifiez votre e-mail",Tap_on_the_verification_link_sent_to:"Appuyez sur le lien de vérification envoyé à",Email_Confirmation:"Confirmation de l'e-mail",Save_your_scan:"Enregistrez votre numérisation",Confirm_with_a_single_tap_from_your_email_inbox:"Confirmez d'une simple pression depuis votre boîte de réception e-mail.",Saving_your_scan_means_you_can_load_your_measurements_anywhere_you_see_the_Swan_logo:"Enregistrer votre numérisation signifie que vous pouvez charger vos mesures partout où vous voyez le logo Swan.",Passwordless_Just_one_tap_via_email:"Sans mot de passe. Juste une pression via e-mail.",Join_2000_shoppers:"Rejoignez plus de 2 000 acheteurs",Your_measurements_will_be_shared_only_once_your_email_is_confirmed:"Vos mesures seront partagées uniquement une fois votre e-mail confirmé.",Enter_your_email:"Entrez votre adresse e-mail",Send_confirmation_email:"Envoyer un e-mail de confirmation",No_thanks:"Non merci",We_are_sorry:"Nous sommes désolés!",Video_tips_for_scanning:"Conseils vidéo pour la numérisation",Please_make_sure_to:"Veuillez vous assurer de:",one_Complete_a_full_spin_Starting_and_finishing_with_your_feet_facing_your_phone:"1. Effectuez une rotation complète. Démarrez et terminez avec vos pieds tournés vers votre téléphone.",two_Rotate_slowly_throughout_your_spin:"2. Faites pivoter lentement tout au long de votre rotation.",three_Make_sure_your_full_body_including_feet_and_hands_are_visible_in_frame:"3. Assurez-vous que l'ensemble de votre corps (y compris les pieds et les mains) est visible dans le cadre.",Scan_s:"Visionneuse de la numérisation",vision_model:"modèle de vision",is_at_capacity:"est à pleine capacité.",We_are_sorry_about_this_We_are_working_hard_to_add_capacity_Please_try_again_soon:"Nous sommes désolés pour cela. Nous travaillons dur pour ajouter de la capacité. Veuillez réessayer bientôt.",Oops:"Oups..",Looks_like_this_QR_code_is_not_valid:"On dirait que ce code QR n'est pas valide.",Reload_your_desktop_tab_to_generate_a_new_code:"Rechargez votre onglet de bureau pour générer un nouveau code",Magic_link:"Lien magique",We_have_sent_you_a_magic_link_via_email:"Nous vous avons envoyé un lien magique par e-mail.",Please_confirm_your_email_load_your_measurements_on_any_partner_brand:"Veuillez confirmer votre e-mail pour charger vos mesures sur n'importe quelle marque partenaire.",Welcome_back:"Bienvenue de retour!",Load_my_account:"Charger mon compte",Back_to_home:"Retour à l'accueil",Enter_a_valid_email:"Entrez une adresse e-mail valide!",No_measurement_found_for_this_email:"Aucune mesure trouvée pour cet e-mail",Reset:"Réinitialiser",Resume:"Reprendre",Start_Scan:"Démarrer la numérisation",Scanning:"Numérisation",Detecting_Body:"Détection du corps...",Stop:"Arrêter",Generating_Measurements:"Génération des mesures",Help:"Aide",Scan_tips:"Conseils de numérisation",Watch_instructions_video:"Regardez la vidéo d'instructions",Wear_form_fitting_clothing_for_the_most_accurate_results:"Portez des vêtements ajustés pour des résultats plus précis",Position_yourself_in_a_brightly_lit_room:"Placez-vous dans une pièce bien éclairée",Tie_up_long_hair_and_slip_off_your_shoes:"Attachez les cheveux longs et enlevez vos chaussures",Back:"Arrière",Swan:"Swan",Please_check_your_setting_for_camera_permission:"Veuillez vérifier vos paramètres pour l'autorisation de la caméra",Settings:"Paramètres",Enable_the_camera_permissions:"Activer les autorisations de la caméra",Go_Back:"Retourner",For_helping_in_getting:"Pour aider à obtenir",Measurements_have_been_shared:"Les mesures ont été partagées !",Thank_You:"Merci !",live:"en direct.",Your:"Votre",Check_back_soon_to_use_Swan:"Revenez bientôt pour utiliser Swan",custom_for_your_next_order:"personnalisé pour votre prochaine commande",sevenTillEight:"de sept à huit",Rhodes_and_Beckett:"Rhodes et Beckett",Send_invite:"Envoyer une invitation",Your_Nest:"Votre nid",Share_your_measurements_to_shop_and_gift_for_those_close_to_you:"Partagez vos mesures pour acheter et offrir à ceux qui vous sont proches",Invite_to_Swan:"Inviter à Swan",Name:"Nom",Enter_their_name:"Entrez leur nom",Enter_their_email:"Entrez leur adresse e-mail",Message:"Message",Join_Swan:"Rejoignez Swan !",Email:"E-mail",Invite:"Inviter",Your_Login:"Votre connexion",Your_Scans:"Vos scans",Talk_with_the_CEO:"Parlez avec le PDG",Send_me_an_email:"Envoyez-moi un e-mail",At_Swan_we_are_here_to_make_shopping_about_you_I_would_love_to_hear_what_you_think_of_Swan_and_what_you_want_to_see_next_I_am_excited_to_hear_your_feedback:"Chez Swan, nous sommes là pour faire du shopping une expérience à votre image. J'aimerais savoir ce que vous pensez de Swan et ce que vous aimeriez voir ensuite. Je suis impatient de recueillir vos commentaires -",Eoin:"Eoin",You_can_close_this_tab_and_return_to_the_original_to_get_your_sizing_suggestion:"Vous pouvez fermer cet onglet et revenir à l'original pour obtenir votre suggestion de taille.",Try_On:"Essayer",Invite_friends:"Inviter des amis",Pending:"En attente",Decline:"Refuser",gifting_simple:"cadeau simple",Invite_friends_and_make:"Invitez des amis et faites",Nest_will_be_able_to_see_and_size_clothes_on_you:"Nest pourra voir et ajuster les vêtements sur vous",By_sharing_your_Swan_profile_those_in_your:"En partageant votre profil Swan, ceux de votre",Enter_your_name:"Entrez votre nom",Failed_to_get_tryon:"Échec de la récupération de l'essayage",In_Progress:"En cours",Go_back_to:"Retourner à"},le={Custom_Scan:"Benutzerdefiniertes Scannen",Find_your_perfect_fit:"Finde deine perfekte Passform",One_time_setup_in_2_min_or_less:"Einrichtung in 2 Minuten oder weniger.",PRIVACY:"DATENSCHUTZ",Swan_encrypts_your_data_with_Ever_vault_and_ensures_your_video_is_not_seen_by_anyone:"Swan verschlüsselt deine Daten mit dem Ever-Vault und stellt sicher, dass dein Video von niemandem gesehen wird.",By_ticking_this_box_you_are_agreeing_to_our:"Durch Ankreuzen dieses Feldes stimmst du unseren",privacy_policy:" Datenschutzbestimmungen zu",Get_Measured:"Messungen erhalten",Login:"Anmelden",Where_do_you_shop:"Wo kaufst du ein?",Men_s:"Herren",Women_s:"Damen",Next:"Weiter",Preferred_language:"Bevorzugte Sprache",Hindi:"Hindi",English:"Englisch",French:"Französisch",Spanish:"Spanisch",German:"Deutsch",Italian:"Italienisch",Arabic:"Arabisch",Phone_Model:"Telefonmodell",Select_phone_brand:"Wähle die Telefonmarke...",Select_phone_model:"Wähle das Telefonmodell...",Measurement_tips:"Tipps zur Messung",Tips_for_your_scan:"Tipps für deinen Scan",Watch_this_video_to_know_how_to_scan:"Schau dir dieses Video an, um zu erfahren, wie gescannt wird",How_to_use_Swan:"So verwendest du Swan",Watch_this_short_video_to_know_how_to_use:"Schau dir dieses kurze Video an, um zu erfahren, wie du es verwendest",Shop:"Einkaufen",Skip:"Überspringen",Form_fitting_clothing:"Figurbetonte Kleidung",How_form_is_fitting_your_outfit:"Wie passt sich deine Kleidung an?",For_accurate_scan_please_wear_tight_clothing_Here_s_an_example:"Für genaue Scans bitte enge Kleidung tragen. Hier ist ein Beispiel",Scan_with_form_fitting:"Scan mit enger Passform",Scan_with_form_loose_fit:"Scan mit lockerer Passform",Turn_up_your_volume:"Erhöhe deine Lautstärke",For_smart_voice_guide:"Für intelligente Sprachführung",Place_your_phone_on_a_table_at:"Lege dein Telefon auf einen Tisch bei",a_hip_height:"Hüfthöhe",Scan:"Scannen",Height:"Höhe",Height_in_ft:"Höhe in Fuß",Height_in_inch:"Höhe in Zoll",How_tall_are_you:"Wie groß bist du?",We_are_sorry_we_currently_do_not_support_this_heights_outside_of_5_ft_and_7_ft_We_are_working_on_new_models_that_do:"Es tut uns leid, wir unterstützen derzeit keine Höhen außerhalb von 5 ft & 7 ft. Wir arbeiten an neuen Modellen, die es tun.",Confirm:"Bestätigen",To_start_your_measurement:"Um deine Messung zu starten",Scan_this_QR_code_with_your_phone:"Scanne diesen QR-Code mit deinem Telefon",You_can_continue_from_here_after_your_scan:"Du kannst nach deinem Scan hier fortsetzen",Failed_to_get_measurements:"Messungen konnten nicht abgerufen werden",No_data_found_Go_back_to:"Keine Daten gefunden. Gehe zurück zu",back:"zurück",Profile:"Profil",shopify:"Shopify",fit_view_result:"Ergebnis anzeigen",Nest:"Nest",Scan_again:"Erneut scannen",Provide_feedback:"Feedback geben",Add_to_cart:"In den Warenkorb legen",Back_to_product:"Zurück zum Produkt",Fit_Notes:"Passform-Notizen",Fitted:"Anliegend",Ideal_fit:"Ideale Passform",Relaxed:"Locker",Wrong_email_format:"Falsches E-Mail-Format",Something_went_wrong:"Etwas ist schiefgelaufen",Email_is_required:"E-Mail ist erforderlich",Scan_status:"Scan-Status",Uploading:"Hochladen...",Processing:"Verarbeitung...",Finishing:"Fertigstellung...",Complete:"Fertig!",You_re_logged_in:"Du bist angemeldet",Swan_will_load_on_every_supported_page:"Swan wird auf jeder unterstützten Seite geladen.",Happy_Shopping:"Viel Spaß beim Einkaufen!",Email_verification_failed:"E-Mail-Verifizierung fehlgeschlagen",Email_Confirmed:"E-Mail bestätigt",Measurements_saved:"Messungen gespeichert",Login_anywhere_you_see_the_Swan_logo_to_load_your_measurements:"Melden Sie sich überall dort an, wo Sie das Swan-Logo sehen, um Ihre Messungen zu laden.",Check_your_email:"Überprüfe deine E-Mail",Tap_on_the_verification_link_sent_to:"Tippe auf den Verifizierungslink, der gesendet wurde an",Email_Confirmation:"E-Mail-Bestätigung",Save_your_scan:"Speichere deinen Scan",Confirm_with_a_single_tap_from_your_email_inbox:"Bestätige mit einem einzigen Tippen aus deinem E-Mail-Postfach.",Saving_your_scan_means_you_can_load_your_measurements_anywhere_you_see_the_Swan_logo:"Das Speichern deines Scans bedeutet, dass du deine Messungen überall laden kannst, wo du das Swan-Logo siehst.",Passwordless_Just_one_tap_via_email:"Ohne Passwort. Nur ein Fingertipp über E-Mail.",Join_2000_shoppers:"Schließe dich über 2.000 Käufern an",Your_measurements_will_be_shared_only_once_your_email_is_confirmed:"Deine Messungen werden nur geteilt, wenn deine E-Mail bestätigt ist.",Enter_your_email:"Gib deine E-Mail ein",Send_confirmation_email:"Bestätigungs-E-Mail senden",No_thanks:"Nein, danke",We_are_sorry:"Es tut uns leid!",Video_tips_for_scanning:"Videotipps zum Scannen",Please_make_sure_to:"Bitte vergewissere dich:",one_Complete_a_full_spin_Starting_and_finishing_with_your_feet_facing_your_phone:"1. Mach eine vollständige Drehung. Beginnend und endend mit deinen Füßen vor deinem Telefon.",two_Rotate_slowly_throughout_your_spin:"2. Drehe dich langsam während deiner Drehung.",three_Make_sure_your_full_body_including_feet_and_hands_are_visible_in_frame:"3. Stelle sicher, dass dein ganzer Körper (einschließlich Füße und Hände) im Bild sichtbar ist.",Scan_s:"Scan's",vision_model:"Vision-Modell",is_at_capacity:"ist ausgelastet.",We_are_sorry_about_this_We_are_working_hard_to_add_capacity_Please_try_again_soon:"Es tut uns leid dafür. Wir arbeiten hart daran, Kapazitäten hinzuzufügen. Bitte versuche es bald erneut.",Oops:"Hoppla..",Looks_like_this_QR_code_is_not_valid:"Sieht so aus, als wäre dieser QR-Code ungültig.",Reload_your_desktop_tab_to_generate_a_new_code:"Aktualisiere deinen Desktop-Tab, um einen neuen Code zu generieren",Magic_link:"Magischer Link",We_have_sent_you_a_magic_link_via_email:"Wir haben dir einen magischen Link per E-Mail geschickt.",Please_confirm_your_email_load_your_measurements_on_any_partner_brand:"Bitte bestätige deine E-Mail, um deine Messungen auf jeder Partnermarke zu laden.",Welcome_back:"Willkommen zurück!",Load_my_account:"Meinen Account laden",Back_to_home:"Zurück zur Startseite",Enter_a_valid_email:"Gib eine gültige E-Mail ein!",No_measurement_found_for_this_email:"Keine Messungen für diese E-Mail gefunden",Reset:"Zurücksetzen",Resume:"Fortsetzen",Start_Scan:"Scan starten",Scanning:"Scannen",Detecting_Body:"Körpererkennung...",Stop:"Stopp",Generating_Measurements:"Messungen generieren",Help:"Hilfe",Scan_tips:"Conseils de numérisation",Watch_instructions_video:"Regardez la vidéo d'instructions",Wear_form_fitting_clothing_for_the_most_accurate_results:"Portez des vêtements ajustés pour des résultats plus précis",Position_yourself_in_a_brightly_lit_room:"Placez-vous dans une pièce bien éclairée",Tie_up_long_hair_and_slip_off_your_shoes:"Attachez les cheveux longs et enlevez vos chaussures",Back:"Zurück",Swan:"Swan",Please_check_your_setting_for_camera_permission:"Bitte überprüfen Sie Ihre Einstellungen für die Kameraberechtigung",Settings:"Einstellungen",Enable_the_camera_permissions:"Aktivieren Sie die Kameraberechtigungen",Go_Back:"Zurück gehen",For_helping_in_getting:"Um bei der Beschaffung zu helfen",Measurements_have_been_shared:"Maße wurden geteilt!",Thank_You:"Danke!",live:"live.",Your:"Dein",Check_back_soon_to_use_Swan:"Schau bald wieder vorbei, um Swan zu verwenden",custom_for_your_next_order:"individuell für deine nächste Bestellung",sevenTillEight:"sieben bis acht",Rhodes_and_Beckett:"Rhodes und Beckett",Send_invite:"Einladung senden",Your_Nest:"Dein Nest",Share_your_measurements_to_shop_and_gift_for_those_close_to_you:"Teile deine Maße, um für diejenigen in deiner Nähe einzukaufen und zu schenken",Invite_to_Swan:"Zu Swan einladen",Name:"Name",Enter_their_name:"Gib ihren Namen ein",Enter_their_email:"Gib ihre E-Mail-Adresse ein",Message:"Nachricht",Join_Swan:"Trete Swan bei!",Email:"E-Mail",Invite:"Einladen",Your_Login:"Dein Login",Your_Scans:"Deine Scans",Talk_with_the_CEO:"Sprich mit dem CEO",Send_me_an_email:"Schick mir eine E-Mail",At_Swan_we_are_here_to_make_shopping_about_you_I_would_love_to_hear_what_you_think_of_Swan_and_what_you_want_to_see_next_I_am_excited_to_hear_your_feedback:"Bei Swan geht es darum, das Einkaufen für dich zu gestalten. Ich würde gerne hören, was du von Swan hältst und was du als nächstes sehen möchtest. Ich freue mich auf dein Feedback -",Eoin:"Eoin",You_can_close_this_tab_and_return_to_the_original_to_get_your_sizing_suggestion:"Sie können diesen Tab schließen und zum Original zurückkehren, um Ihre Größenempfehlung zu erhalten.",Try_On:"Anprobieren",Invite_friends:"Freunde einladen",Pending:"Ausstehend",Decline:"Ablehnen",gifting_simple:"einfaches Verschenken",Invite_friends_and_make:"Freunde einladen & machen",Nest_will_be_able_to_see_and_size_clothes_on_you:"Nest wird in der Lage sein, Kleidung an dir zu sehen und zu vermessen",By_sharing_your_Swan_profile_those_in_your:"Indem du dein Swan-Profil teilst, können diejenigen in deinem",Enter_your_name:"Geben Sie Ihren Namen ein",Failed_to_get_tryon:"Fehler beim Abrufen des Anprobens",In_Progress:"In Bearbeitung",Go_back_to:"Zurück gehen zu"},ce={Custom_Scan:"Escanéo personalizado",Find_your_perfect_fit:"Encuentra tu ajuste perfecto",One_time_setup_in_2_min_or_less:"Configuración única en 2 minutos o menos.",PRIVACY:"PRIVACIDAD",Swan_encrypts_your_data_with_Ever_vault_and_ensures_your_video_is_not_seen_by_anyone:"Swan cifra tus datos con Ever vault y asegura que tu video no sea visto por nadie.",By_ticking_this_box_you_are_agreeing_to_our:"Al marcar esta casilla, aceptas nuestro",privacy_policy:" política de privacidad",Get_Measured:"Obtén tus medidas",Login:"Iniciar sesión",Where_do_you_shop:"¿Dónde compras?",Men_s:"Hombre",Women_s:"Mujer",Next:"Siguiente",Preferred_language:"Idioma preferido",Hindi:"Hindi",English:"Inglés",French:"Francés",Spanish:"Español",German:"Alemán",Italian:"Italiano",Arabic:"Árabe",Phone_Model:"Modelo de teléfono",Select_phone_brand:"Selecciona la marca de tu teléfono...",Select_phone_model:"Selecciona el modelo de tu teléfono...",Measurement_tips:"Consejos de medición",Tips_for_your_scan:"Consejos para tu escaneo",Watch_this_video_to_know_how_to_scan:"Mira este video para saber cómo escanear",How_to_use_Swan:"Cómo usar Swan",Watch_this_short_video_to_know_how_to_use:" Mira este video corto para saber cómo usar",Shop:"Comprar",Skip:"Saltar",Form_fitting_clothing:"Ropa ajustada",How_form_is_fitting_your_outfit:"¿Cómo se ajusta tu ropa?",For_accurate_scan_please_wear_tight_clothing_Here_s_an_example:"Para un escaneo preciso, por favor usa ropa ajustada. Aquí tienes un ejemplo",Scan_with_form_fitting:"Escanear con ajuste",Scan_with_form_loose_fit:"Escanear con ajuste holgado",Turn_up_your_volume:"Sube el volumen",For_smart_voice_guide:"Para una guía de voz inteligente",Place_your_phone_on_a_table_at:"Coloca tu teléfono en una mesa a",a_hip_height:"la altura de la cadera",Scan:"Escanear",Height:"Altura",Height_in_ft:"Altura en pies",Height_in_inch:"Altura en pulgadas",How_tall_are_you:"¿Cuánto mides?",We_are_sorry_we_currently_do_not_support_this_heights_outside_of_5_ft_and_7_ft_We_are_working_on_new_models_that_do:"Lo sentimos, actualmente no admitimos alturas fuera de 5 pies y 7 pies. Estamos trabajando en nuevos modelos que lo harán.",Confirm:"Confirmar",To_start_your_measurement:"Para comenzar tu medición",Scan_this_QR_code_with_your_phone:"Escanea este código QR con tu teléfono",You_can_continue_from_here_after_your_scan:"Puedes continuar desde aquí después de tu escaneo",Failed_to_get_measurements:"No se pudieron obtener las medidas",No_data_found_Go_back_to:"No se encontraron datos. Vuelve a",back:"atrás",Profile:"Perfil",shopify:"shopify",fit_view_result:"ver resultados de ajuste",Nest:"Nido",Scan_again:"Escanear de nuevo",Provide_feedback:"Proporcionar retroalimentación",Add_to_cart:"Agregar al carrito",Back_to_product:"Volver al producto",Fit_Notes:"Notas de ajuste",Fitted:"Ajustado",Ideal_fit:"Ajuste ideal",Relaxed:"Relajado",Wrong_email_format:"Formato de correo electrónico incorrecto",Something_went_wrong:"Algo salió mal",Email_is_required:"Se requiere correo electrónico",Scan_status:"Estado del escaneo",Uploading:"Cargando...",Processing:"Procesando...",Finishing:"Terminando...",Complete:"¡Completo!",You_re_logged_in:"Has iniciado sesión",Swan_will_load_on_every_supported_page:"Swan se cargará en cada página admitida.",Happy_Shopping:"¡Felices compras!",Email_verification_failed:"Fallo en la verificación del correo electrónico",Email_Confirmed:"Correo electrónico confirmado",Measurements_saved:"Medidas guardadas",Login_anywhere_you_see_the_Swan_logo_to_load_your_measurements:"Inicie sesión en cualquier lugar donde vea el logotipo de Swan para cargar sus medidas.",Check_your_email:"Revisa tu correo electrónico",Tap_on_the_verification_link_sent_to:"Toca el enlace de verificación enviado a",Email_Confirmation:"Confirmación de correo electrónico",Save_your_scan:"Guarda tu escaneo",Confirm_with_a_single_tap_from_your_email_inbox:"Confirma con un toque desde tu bandeja de entrada de correo electrónico.",Saving_your_scan_means_you_can_load_your_measurements_anywhere_you_see_the_Swan_logo:"Guardar tu escaneo significa que puedes cargar tus medidas en cualquier lugar donde veas el logo de Swan.",Passwordless_Just_one_tap_via_email:"Sin contraseña. Solo un toque a través del correo electrónico.",Join_2000_shoppers:"Únete a más de 2,000 compradores",Your_measurements_will_be_shared_only_once_your_email_is_confirmed:"Tus medidas se compartirán solo después de que se confirme tu correo electrónico.",Enter_your_email:"Ingresa tu correo electrónico",Send_confirmation_email:"Enviar correo de confirmación",No_thanks:"No, gracias",We_are_sorry:"¡Lo sentimos!",Video_tips_for_scanning:"Consejos en video para el escaneo",Please_make_sure_to:"Asegúrate de:",one_Complete_a_full_spin_Starting_and_finishing_with_your_feet_facing_your_phone:"1. Da una vuelta completa. Comenzando y terminando con los pies mirando hacia tu teléfono.",two_Rotate_slowly_throughout_your_spin:"2. Gira lentamente durante todo tu giro.",three_Make_sure_your_full_body_including_feet_and_hands_are_visible_in_frame:"3. Asegúrate de que todo tu cuerpo (incluyendo pies y manos) sea visible en el encuadre.",Scan_s:"La visión de la numérisation",vision_model:"modelo de visión",is_at_capacity:"está a plena capacidad.",We_are_sorry_about_this_We_are_working_hard_to_add_capacity_Please_try_again_soon:"Lo sentimos por esto. Estamos trabajando duro para agregar capacidad. Por favor, inténtalo de nuevo pronto.",Oops:"¡Vaya!",Looks_like_this_QR_code_is_not_valid:"Parece que este código QR no es válido.",Reload_your_desktop_tab_to_generate_a_new_code:"Recarga tu pestaña de escritorio para generar un nuevo código",Magic_link:"Enlace mágico",We_have_sent_you_a_magic_link_via_email:"Te hemos enviado un enlace mágico por correo electrónico.",Please_confirm_your_email_load_your_measurements_on_any_partner_brand:"Confirma tu correo electrónico para cargar tus medidas en cualquier marca asociada.",Welcome_back:"¡Bienvenido de nuevo!",Load_my_account:"Cargar mi cuenta",Back_to_home:"Volver a inicio",Enter_a_valid_email:"Ingresa un correo electrónico válido.",No_measurement_found_for_this_email:"No se encontraron medidas para este correo electrónico",Reset:"Restablecer",Resume:"Reanudar",Start_Scan:"Iniciar escaneo",Scanning:"Escaneando",Detecting_Body:"Detectando el cuerpo...",Stop:"Detener",Generating_Measurements:"Generando medidas",Help:"Ayuda",Scan_tips:"Consejos para el escaneo",Watch_instructions_video:"Ver video de instrucciones",Wear_form_fitting_clothing_for_the_most_accurate_results:"Use ropa ajustada para obtener resultados más precisos",Position_yourself_in_a_brightly_lit_room:"Colóquese en una habitación bien iluminada",Tie_up_long_hair_and_slip_off_your_shoes:"Recoge el pelo largo y quítate los zapatos",Back:"Atrás",Swan:"Swan",Please_check_your_setting_for_camera_permission:"Por favor, verifique su configuración para el permiso de la cámara",Settings:"Configuración",Enable_the_camera_permissions:"Habilitar los permisos de la cámara",Go_Back:"Volver",For_helping_in_getting:"Para ayudar en la obtención",Measurements_have_been_shared:"¡Las medidas se han compartido!",Thank_You:"¡Gracias!",live:"en vivo.",Your:"Tu",Check_back_soon_to_use_Swan:"Vuelve pronto para usar Swan",custom_for_your_next_order:"personalizado para tu próximo pedido",sevenTillEight:"de siete a ocho",Rhodes_and_Beckett:"Rhodes y Beckett",Send_invite:"Enviar invitación",Your_Nest:"Tu Nido",Share_your_measurements_to_shop_and_gift_for_those_close_to_you:"Comparte tus medidas para comprar y regalar a quienes están cerca de ti",Invite_to_Swan:"Invitar a Swan",Name:"Nombre",Enter_their_name:"Ingresa su nombre",Enter_their_email:"Ingresa su correo electrónico",Message:"Mensaje",Join_Swan:"¡Únete a Swan!",Email:"Correo electrónico",Invite:"Invitar",Your_Login:"Tu inicio de sesión",Your_Scans:"Tus escaneos",Talk_with_the_CEO:"Habla con el CEO",Send_me_an_email:"Envíame un correo electrónico",At_Swan_we_are_here_to_make_shopping_about_you_I_would_love_to_hear_what_you_think_of_Swan_and_what_you_want_to_see_next_I_am_excited_to_hear_your_feedback:"En Swan estamos aquí para que las compras sean para ti. Me encantaría saber qué piensas de Swan y qué te gustaría ver a continuación. Estoy emocionado de conocer tus comentarios -",Eoin:"Eoin",You_can_close_this_tab_and_return_to_the_original_to_get_your_sizing_suggestion:"Puedes cerrar esta pestaña y volver al original para obtener tu sugerencia de talla.",Try_On:"Probar",Invite_friends:"Invitar amigos",Pending:"Pendiente",Decline:"Declinar",gifting_simple:"regalando simple",Invite_friends_and_make:"Invita a amigos y haz",Nest_will_be_able_to_see_and_size_clothes_on_you:"Nest will be able to see & size clothes on you",By_sharing_your_Swan_profile_those_in_your:"Al compartir tu perfil de Swan, aquellos en tu",Enter_your_name:"Ingrese su nombre",Failed_to_get_tryon:"Error al obtener la prueba",In_Progress:"En progreso",Go_back_to:"Volver a"},ue={Custom_Scan:"مسح مخصص",Find_your_perfect_fit:"ابحث عن مقاسك المثالي",One_time_setup_in_2_min_or_less:"إعداد مرة واحدة في 2 دقيقة أو أقل",PRIVACY:"الخصوصية",Swan_encrypts_your_data_with_Ever_vault_and_ensures_your_video_is_not_seen_by_anyone:"تقوم سوان بتشفير بياناتك باستخدام فولت إيفر وتضمن عدم رؤية فيديوك من قبل أي شخص.",By_ticking_this_box_you_are_agreeing_to_our:"من خلال وضع علامة في هذا المربع، أنت توافق على",privacy_policy:"سياسة الخصوصية",Get_Measured:"احصل على قياسك",Login:"تسجيل الدخول",Where_do_you_shop:"أين تتسوق؟",Men_s:"رجالي",Women_s:"نسائي",Next:"التالي",Preferred_language:"اللغة المفضلة",Hindi:"هندي",English:"إنجليزي",French:"فرنسي",Spanish:"إسباني",German:"ألماني",Italian:"إيطالي",Arabic:"عربي",Phone_Model:"نموذج الهاتف",Select_phone_brand:"اختر ماركة الهاتف...",Select_phone_model:"اختر نموذج الهاتف...",Measurement_tips:"نصائح القياس",Tips_for_your_scan:"نصائح لفحصك",Watch_this_video_to_know_how_to_scan:"شاهد هذا الفيديو لمعرفة كيفية الفحص",How_to_use_Swan:"كيفية استخدام سوان",Watch_this_short_video_to_know_how_to_use:" شاهد هذا الفيديو القصير لمعرفة كيفية الاستخدام",Shop:"تسوق",Skip:"تخطى",Form_fitting_clothing:"ملابس ملتصقة",How_form_is_fitting_your_outfit:"كيف يتناسب الزي الخاص بك؟",For_accurate_scan_please_wear_tight_clothing_Here_s_an_example:"للحصول على فحص دقيق، يرجى ارتداء ملابس ضيقة، إليك مثال",Scan_with_form_fitting:"مسح بملابس ملتصقة",Scan_with_form_loose_fit:"مسح بملابس فضفاضة",Turn_up_your_volume:"قم برفع مستوى الصوت الخاص بك",For_smart_voice_guide:"للدليل الصوتي الذكي",Place_your_phone_on_a_table_at:"ضع هاتفك على طاولة في",a_hip_height:"ارتفاع الورك",Scan:"مسح",Height:"الطول",Height_in_ft:"الطول في القدم",Height_in_inch:"الطول بالإنش",How_tall_are_you:"كم هو طولك؟",We_are_sorry_we_currently_do_not_support_this_heights_outside_of_5_ft_and_7_ft_We_are_working_on_new_models_that_do:"نعتذر، نحن لا ندعم حاليًا هذه الأطوال خارج 5 قدم و 7 قدم. نحن نعمل على نماذج جديدة تدعم ذلك.",Confirm:"تأكيد",To_start_your_measurement:"لبدء القياس الخاص بك",Scan_this_QR_code_with_your_phone:"امسح هذا الرمز QR باستخدام هاتفك",You_can_continue_from_here_after_your_scan:"يمكنك الاستمرار من هنا بعد الفحص",Failed_to_get_measurements:"فشل في الحصول على القياسات",No_data_found_Go_back_to:"لم يتم العثور على بيانات، ارجع إلى",back:"الخلف",Profile:"الملف الشخصي",shopify:"شوبيفاي",fit_view_result:"نتيجة عرض الملاءمة",Nest:"عش",Scan_again:"إعادة المسح",Provide_feedback:"تقديم ملاحظات",Add_to_cart:"أضف إلى السلة",Back_to_product:"العودة إلى المنتج",Fit_Notes:"ملاحظات الملاءمة",Fitted:"ملتصق",Ideal_fit:"ملاءمة مثالية",Relaxed:"فضفاض",Wrong_email_format:"تنسيق البريد الإلكتروني خاطئ",Something_went_wrong:"حدث خطأ ما",Email_is_required:"البريد الإلكتروني مطلوب",Scan_status:"حالة المسح",Uploading:"جاري التحميل...",Processing:"جاري المعالجة...",Finishing:"جاري الانتهاء...",Complete:"اكتمل!",You_re_logged_in:"لقد سجلت الدخول",Swan_will_load_on_every_supported_page:"سوان سيتم تحميله على كل صفحة مدعومة.",Happy_Shopping:"تسوق سعيد!",Email_verification_failed:"فشل التحقق من البريد الإلكتروني",Email_Confirmed:"تم تأكيد البريد الإلكتروني",Measurements_saved:"تم حفظ القياسات",Login_anywhere_you_see_the_Swan_logo_to_load_your_measurements:"قم بتسجيل الدخول في أي مكان ترى فيه شعار سوان لتحميل قياساتك.",Check_your_email:"تحقق من بريدك الإلكتروني",Tap_on_the_verification_link_sent_to:"اضغط على رابط التحقق المرسل إلى",Email_Confirmation:"تأكيد البريد الإلكتروني",Save_your_scan:"احفظ مسحتك",Confirm_with_a_single_tap_from_your_email_inbox:"قم بتأكيد بنقرة واحدة من صندوق الوارد الخاص ببريدك الإلكتروني.",Saving_your_scan_means_you_can_load_your_measurements_anywhere_you_see_the_Swan_logo:"حفظ مسحتك يعني أنه يمكنك تحميل قياساتك في أي مكان ترى فيه شعار سوان.",Passwordless_Just_one_tap_via_email:"بدون كلمة مرور. فقط نقرة واحدة عبر البريد الإلكتروني.",Join_2000_shoppers:"انضم إلى أكثر من 2,000 متسوق",Your_measurements_will_be_shared_only_once_your_email_is_confirmed:"سيتم مشاركة قياساتك فقط بمجرد تأكيد بريدك الإلكتروني.",Enter_your_email:"أدخل بريدك الإلكتروني",Send_confirmation_email:"إرسال بريد تأكيد",No_thanks:"لا، شكرًا",We_are_sorry:"نحن آسفون!",Video_tips_for_scanning:"نصائح الفيديو لعملية المسح",Please_make_sure_to:"يرجى التأكد من:",one_Complete_a_full_spin_Starting_and_finishing_with_your_feet_facing_your_phone:"1. إكمال دورة كاملة. ابدأ وانهي بقدميك متجهة نحو هاتفك.",two_Rotate_slowly_throughout_your_spin:"2. قم بالدوران ببطء طوال فترة الدوران.",three_Make_sure_your_full_body_including_feet_and_hands_are_visible_in_frame:"3. تأكد من أن جسمك بأكمله (بما في ذلك قدميك ويديك) ظاهر في الإطار.",Scan_s:"فحص",vision_model:"نموذج الرؤية",is_at_capacity:"في طاقته القصوى.",We_are_sorry_about_this_We_are_working_hard_to_add_capacity_Please_try_again_soon:"نعتذر عن ذلك. نعمل بجد لزيادة الطاقة. يرجى المحاولة مرة أخرى قريبًا.",Oops:"عذرًا..",Looks_like_this_QR_code_is_not_valid:"يبدو أن رمز الاستجابة السريعة هذا غير صالح.",Reload_your_desktop_tab_to_generate_a_new_code:"أعد تحميل علامة التبويب على سطح المكتب الخاص بك لإنشاء رمز جديد",Magic_link:"رابط سحري",We_have_sent_you_a_magic_link_via_email:"لقد أرسلنا لك رابطًا سحريًا عبر البريد الإلكتروني.",Please_confirm_your_email_load_your_measurements_on_any_partner_brand:"يرجى تأكيد بريدك الإلكتروني لتحميل قياساتك على أي علامة تجارية شريكة.",Welcome_back:"مرحبًا مرة أخرى!",Load_my_account:"تحميل حسابي",Back_to_home:"العودة إلى الصفحة الرئيسية",Enter_a_valid_email:"أدخل بريدًا إلكترونيًا صالحًا!",No_measurement_found_for_this_email:"لم يتم العثور على قياسات لهذا البريد الإلكتروني",Reset:"إعادة تعيين",Resume:"استئناف",Start_Scan:"بدء المسح",Scanning:"جاري المسح",Detecting_Body:"الكشف عن الجسم...",Stop:"إيقاف",Generating_Measurements:"إنشاء القياسات",Help:"مساعدة",Scan_tips:"نصائح المسح",Watch_instructions_video:"شاهد فيديو التعليمات",Wear_form_fitting_clothing_for_the_most_accurate_results:"ارتدِ ملابس مصممة لتناسب الجسم للحصول على أكثر النتائج دقةً",Position_yourself_in_a_brightly_lit_room:"وضع نفسك في غرفة مضاءة بشكل جيد",Tie_up_long_hair_and_slip_off_your_shoes:"ربط الشعر الطويل وخلع الأحذية",Back:"الخلف",Swan:"سوان",Please_check_your_setting_for_camera_permission:"يرجى التحقق من إعداداتك لأذونات الكاميرا",Settings:"الإعدادات",Enable_the_camera_permissions:"تمكين أذونات الكاميرا",Go_Back:"عد",For_helping_in_getting:"للمساعدة في الحصول على",Measurements_have_been_shared:"تم مشاركة القياسات!",Thank_You:"شكرا لك!",live:"مباشر.",Your:"لك",Check_back_soon_to_use_Swan:"تحقق قريبًا لاستخدام سوان",custom_for_your_next_order:"مخصص لطلبك التالي",sevenTillEight:"من السابعة حتى الثامنة",Rhodes_and_Beckett:"روڈز اینڈ بیکٹ",Send_invite:"إرسال دعوة",Your_Nest:"عشك",Share_your_measurements_to_shop_and_gift_for_those_close_to_you:"شارك قياساتك للتسوق والهدايا لأولئك القريبين منك",Invite_to_Swan:"دعوة لسوان",Name:"الاسم",Enter_their_name:"أدخل اسمهم",Enter_their_email:"أدخل بريدهم الإلكتروني",Message:"رسالة",Join_Swan:"انضم إلى سوان!",Email:"البريد الإلكتروني",Invite:"دعوة",Your_Login:"تسجيل الدخول الخاص بك",Your_Scans:"مسحاتك",Talk_with_the_CEO:"التحدث مع الرئيس التنفيذي",Send_me_an_email:"أرسل لي بريدًا إلكترونيًا",At_Swan_we_are_here_to_make_shopping_about_you_I_would_love_to_hear_what_you_think_of_Swan_and_what_you_want_to_see_next_I_am_excited_to_hear_your_feedback:"نحن هنا في سوان لجعل التسوق حولك. أحب أن أسمع رأيك في سوان وما الذي ترغب في رؤيته بعد. أنا متحمس لسماع ملاحظاتك -",Eoin:"إيوين",You_can_close_this_tab_and_return_to_the_original_to_get_your_sizing_suggestion:"يمكنك إغلاق هذه العلامة التبويب والعودة إلى الأصل للحصول على اقتراح حجمك.",Try_On:"جرب",Invite_friends:"ادعو أصدقاء",Pending:"قيد الانتظار",Decline:"رفض",gifting_simple:"الهدايا بسيطة",Invite_friends_and_make:"ادعو الأصدقاء وقم",Nest_will_be_able_to_see_and_size_clothes_on_you:"ستتمكن Nest من رؤية الملابس عليك وتحديد المقاس",By_sharing_your_Swan_profile_those_in_your:"من خلال مشاركة ملفك الشخصي في Swan، سيتمكن الأشخاص في",Enter_your_name:"أدخل اسمك",Failed_to_get_tryon:"فشل في الحصول على تجربة الملابس",In_Progress:"قيد التنفيذ",Go_back_to:"العودة إلى"},de={Custom_Scan:"Scansione personalizzata",Find_your_perfect_fit:"Trova la tua vestibilità perfetta",One_time_setup_in_2_min_or_less:"Configurazione in un'unica occasione in 2 minuti o meno.",PRIVACY:"PRIVACY",Swan_encrypts_your_data_with_Ever_vault_and_ensures_your_video_is_not_seen_by_anyone:"Swan cripta i tuoi dati con Ever vault e garantisce che il tuo video non sia visto da nessuno.",By_ticking_this_box_you_are_agreeing_to_our:"Spuntando questa casella, accetti la nostra",privacy_policy:" politica sulla privacy",Get_Measured:"Ottieni le misurazioni",Login:"Accedi",Where_do_you_shop:"Dove fai acquisti?",Men_s:"Uomo",Women_s:"Donna",Next:"Avanti",Preferred_language:"Lingua preferita",Hindi:"Hindi",English:"Inglese",French:"Francese",Spanish:"Spagnolo",German:"Tedesco",Italian:"Italiano",Arabic:"Arabo",Phone_Model:"Modello di telefono",Select_phone_brand:"Seleziona la marca del telefono...",Select_phone_model:"Seleziona il modello del telefono...",Measurement_tips:"Consigli per le misurazioni",Tips_for_your_scan:"Suggerimenti per la scansione",Watch_this_video_to_know_how_to_scan:"Guarda questo video per sapere come fare la scansione",How_to_use_Swan:"Come utilizzare Swan",Watch_this_short_video_to_know_how_to_use:"Guarda questo breve video per sapere come usarlo",Shop:"Acquista",Skip:"Salta",Form_fitting_clothing:"Abbigliamento aderente",How_form_is_fitting_your_outfit:"Come si adatta la tua forma all'abbigliamento?",For_accurate_scan_please_wear_tight_clothing_Here_s_an_example:"Per una scansione accurata, indossa abiti aderenti. Ecco un esempio",Scan_with_form_fitting:"Scansione con vestibilità aderente",Scan_with_form_loose_fit:"Scansione con vestibilità morbida",Turn_up_your_volume:"Alza il volume",For_smart_voice_guide:"Per una guida vocale intelligente",Place_your_phone_on_a_table_at:"Posiziona il tuo telefono su un tavolo a",a_hip_height:"altezza dell'anca",Scan:"Scansione",Height:"Altezza",Height_in_ft:"Altezza in piedi",Height_in_inch:"Altezza in pollici",How_tall_are_you:"Quanto sei alto?",We_are_sorry_we_currently_do_not_support_this_heights_outside_of_5_ft_and_7_ft_We_are_working_on_new_models_that_do:"Ci dispiace, attualmente non supportiamo queste altezze al di fuori di 5 ft e 7 ft. Stiamo lavorando su nuovi modelli che lo faranno.",Confirm:"Conferma",To_start_your_measurement:"Per iniziare la tua misurazione",Scan_this_QR_code_with_your_phone:"Scansiona questo codice QR con il tuo telefono",You_can_continue_from_here_after_your_scan:"Puoi continuare da qui dopo la scansione",Failed_to_get_measurements:"Impossibile ottenere le misurazioni",No_data_found_Go_back_to:"Nessun dato trovato. Torna a",back:"indietro",Profile:"Profilo",shopify:"shopify",fit_view_result:"Visualizza risultato aderente",Nest:"Nido",Scan_again:"Scansiona di nuovo",Provide_feedback:"Fornisci un feedback",Add_to_cart:"Aggiungi al carrello",Back_to_product:"Torna al prodotto",Fit_Notes:"Note sulla vestibilità",Fitted:"Aderente",Ideal_fit:"Vestibilità ideale",Relaxed:"Rilassato",Wrong_email_format:"Formato email errato",Something_went_wrong:"Qualcosa è andato storto",Email_is_required:"L'indirizzo email è obbligatorio",Scan_status:"Stato della scansione",Uploading:"Caricamento...",Processing:"Elaborazione...",Finishing:"Completamento...",Complete:"Completo!",You_re_logged_in:"Sei connesso",Swan_will_load_on_every_supported_page:"Swan si caricherà su ogni pagina supportata.",Happy_Shopping:"Buono shopping!",Email_verification_failed:"Verifica dell'email non riuscita",Email_Confirmed:"Email confermata",Measurements_saved:"Misure salvate",Login_anywhere_you_see_the_Swan_logo_to_load_your_measurements:"Accedi ovunque vedi il logo del Cigno per caricare le tue misurazioni.",Check_your_email:"Controlla la tua email",Tap_on_the_verification_link_sent_to:"Tocca il link di verifica inviato a",Email_Confirmation:"Conferma dell'email",Save_your_scan:"Salva la tua scansione",Confirm_with_a_single_tap_from_your_email_inbox:"Conferma con un singolo tocco dalla tua casella di posta elettronica.",Saving_your_scan_means_you_can_load_your_measurements_anywhere_you_see_the_Swan_logo:"Salvare la tua scansione significa che puoi caricare le tue misurazioni ovunque tu veda il logo di Swan.",Passwordless_Just_one_tap_via_email:"Senza password. Basta un tocco tramite email.",Join_2000_shoppers:"Unisciti a oltre 2.000 acquirenti",Your_measurements_will_be_shared_only_once_your_email_is_confirmed:"Le tue misurazioni saranno condivise solo dopo la conferma della tua email.",Enter_your_email:"Inserisci la tua email",Send_confirmation_email:"Invia email di conferma",No_thanks:"No, grazie",We_are_sorry:"Ci dispiace!",Video_tips_for_scanning:"Consigli video per la scansione",Please_make_sure_to:"Assicurati di:",one_Complete_a_full_spin_Starting_and_finishing_with_your_feet_facing_your_phone:"1. Completa una rotazione completa. Inizia e finisci con i piedi rivolti verso il tuo telefono.",two_Rotate_slowly_throughout_your_spin:"2. Ruota lentamente durante la tua rotazione.",three_Make_sure_your_full_body_including_feet_and_hands_are_visible_in_frame:"3. Assicurati che tutto il tuo corpo (compresi piedi e mani) sia visibile nel fotogramma.",Scan_s:"Scansione",vision_model:"modello di visione",is_at_capacity:"è a capacità massima.",We_are_sorry_about_this_We_are_working_hard_to_add_capacity_Please_try_again_soon:"Ci dispiace per questo. Stiamo lavorando duramente per aumentare la capacità. Riprova presto.",Oops:"Ops...",Looks_like_this_QR_code_is_not_valid:"Sembra che questo codice QR non sia valido.",Reload_your_desktop_tab_to_generate_a_new_code:"Ricarica la scheda del desktop per generare un nuovo codice",Magic_link:"Collegamento magico",We_have_sent_you_a_magic_link_via_email:"Ti abbiamo inviato un collegamento magico via email.",Please_confirm_your_email_load_your_measurements_on_any_partner_brand:"Conferma la tua email per caricare le tue misurazioni su qualsiasi marchio partner.",Welcome_back:"Bentornato!",Load_my_account:"Carica il mio account",Back_to_home:"Torna alla homepage",Enter_a_valid_email:"Inserisci un indirizzo email valido!",No_measurement_found_for_this_email:"Nessuna misurazione trovata per questa email",Reset:"Reset",Resume:"Riprendi",Start_Scan:"Avvia scansione",Scanning:"Scansione",Detecting_Body:"Rilevamento corpo...",Stop:"Stop",Generating_Measurements:"Generazione misurazioni",Help:"Aiuto",Scan_tips:"Suggerimenti per la scansione",Watch_instructions_video:"Guarda il video di istruzioni",Wear_form_fitting_clothing_for_the_most_accurate_results:"Indossa abiti aderenti per risultati più accurati",Position_yourself_in_a_brightly_lit_room:"Posizionati in una stanza ben illuminata",Tie_up_long_hair_and_slip_off_your_shoes:"Raccogli i capelli lunghi e togli le scarpe",Back:"Indietro",Swan:"Swan",Please_check_your_setting_for_camera_permission:"Si prega di verificare le impostazioni dell'autorizzazione della fotocamera",Settings:"Impostazioni",Enable_the_camera_permissions:"Abilita le autorizzazioni della fotocamera",Go_Back:"Torna indietro",For_helping_in_getting:"Per aiutare a ottenere",Measurements_have_been_shared:"Le misurazioni sono state condivise!",Thank_You:"Grazie!",live:"dal vivo.",Your:"Il tuo",Check_back_soon_to_use_Swan:"Torna presto per utilizzare Swan",custom_for_your_next_order:"personalizzato per il tuo prossimo ordine",sevenTillEight:"sette fino alle otto",Rhodes_and_Beckett:"Rhodes e Beckett",Send_invite:"Invia invito",Your_Nest:"Il tuo Nido",Share_your_measurements_to_shop_and_gift_for_those_close_to_you:"Condividi le tue misurazioni per fare acquisti e regalare a chi ti è vicino",Invite_to_Swan:"Invita a Swan",Name:"Nome",Enter_their_name:"Inserisci il loro nome",Enter_their_email:"Inserisci la loro email",Message:"Messaggio",Join_Swan:"Unisciti a Swan!",Email:"Email",Invite:"Invito",Your_Login:"Il tuo Login",Your_Scans:"I tuoi Scans",Talk_with_the_CEO:"Parla con il CEO",Send_me_an_email:"Inviami una email",At_Swan_we_are_here_to_make_shopping_about_you_I_would_love_to_hear_what_you_think_of_Swan_and_what_you_want_to_see_next_I_am_excited_to_hear_your_feedback:"Da Swan siamo qui per rendere lo shopping su misura per te. Mi piacerebbe sapere cosa pensi di Swan e cosa vorresti vedere dopo. Sono entusiasta di sentire il tuo feedback -",Eoin:"Eoin",You_can_close_this_tab_and_return_to_the_original_to_get_your_sizing_suggestion:"Puoi chiudere questa scheda e tornare all'originale per ottenere il suggerimento sulla taglia.",Try_On:"Prova",Invite_friends:"Invita amici",Pending:"In attesa",Decline:"Declina",gifting_simple:"regali semplici",Invite_friends_and_make:"Invita amici e fai",Nest_will_be_able_to_see_and_size_clothes_on_you:"Nest sarà in grado di vedere e dimensionare i vestiti su di te",By_sharing_your_Swan_profile_those_in_your:"Condividendo il tuo profilo Swan, coloro nel tuo",Enter_your_name:"Inserisci il tuo nome",Failed_to_get_tryon:"Impossibile ottenere la prova",In_Progress:"In corso",Go_back_to:"Torna a"};const me={[m.English]:_e,[m.Hindi]:re,[m.French]:se,[m.German]:le,[m.Spanish]:ce,[m.Arabic]:ue,[m.Italian]:de},he=_(void 0);function ge({children:e}){const[n,o]=r(m.English),t=e=>me[n][e]??e,_=i(()=>({preferredLanguage:n,setPreferredLanguage:o,translate:t}),[n]);return a(he.Provider,{value:_,children:e})}function pe({handleShowStreamCamera:n,loadingCam:o,handleUserMedia:t,handlePause:i,pause:_,recordingStarted:r,startSendingVideoFrames:s,showPause:l,webcamRef:u,resetDetector:d,config:m}){const{media:v}=c(te)||{},{translate:w}=c(he)||{};return e("div",{className:"App w-screen h-[100vh] relative ",children:[a("span",{onClick:()=>{n(),d()},className:"fixed right-[20px] top-[20px] z-[999]",children:a(j,{className:"text-[#fff]"})}),a("div",{className:"w-full h-full overflow-hidden ",children:v===oe&&a(q,{audio:!1,ref:u,screenshotQuality:1,videoConstraints:h,mirrored:!0,screenshotFormat:"image/jpeg",onUserMedia:t,style:{position:"fixed",top:0,bottom:0,zIndex:0,width:"100%",height:"100%",objectFit:"cover"}})}),e("div",{className:"fixed bottom-[30px] w-full z-[999] flex flex-col gap-4 items-center justify-center",children:[l&&a(g,{className:"!w-[180px] !h-[40px] !py-[0] mx-auto ",prefix:p,buttonText:"Pause",buttonFunc:i,resolvedConfig:m,btnSecondary:!0}),_?a("div",{children:a(g,{className:"!w-[180px] !h-[40px] !py-[0] mx-auto",buttonText:"Restart",buttonFunc:n,resolvedConfig:m,btnSecondary:!0})}):r?null:a(g,{className:"!w-[180px] !h-[40px] !py-[0] mx-auto !bg-[#ffffff] !text-[#000000] "+(o?"!opacity-50":""),buttonText:w?.(f.Start_Scan),buttonFunc:s,disabled:o,resolvedConfig:m})]}),a("audio",{id:"audioElement",crossOrigin:"anonymous",preload:"auto",style:{position:"absolute",zIndex:-99999},src:`${y}scanAudioInstructions/silence.mp3`})]})}let fe=null,ye=null,ve=null;const we=_(null);let Se,be=null,ke=null;var Ee=o.memo(function({setIsScanLocked:e,resetDetector:n,scanID:o,setIsVideoUploaded:i,setScanFailsError:_,setScanStartTime:l,setScanUniqueKey:d,userDetails:m,config:h}){const{gender:g,heightInCm:p,email:f,shopDomain:E}=m,C=u(null),x=u(null),[z,N]=r([]),[I,F]=r(!0),[P,M]=r(!1),[T,W]=r(!1),[R,D]=r(!0),[A,L]=r(!1),H=u(null),[B,Y]=r(""),[q,j]=r([]),[G,U]=r(""),[J,Q]=r(!1),[K,Z]=r(!1),[X,ee]=r(!1),[ae,ne]=r([]),[oe,te]=r(!1),ie=u(!0),{poseDetector:_e}=function(){const[e,a]=r(0),[n,o]=r(0),[t,i]=r(!1),_=u(0),l=u(0),c=u(!0);async function d(){if("undefined"==typeof window||"undefined"==typeof navigator)return!1;try{console.log("Starting TensorFlow preload...");const[e,a,n]=await Promise.all([import("./pose-detection.esm-BehJiApJ.js"),import("@tensorflow/tfjs-core"),import("@tensorflow/tfjs-backend-webgl")]);ve=e,await a.setBackend("webgl"),await a.ready(),console.log("TensorFlow backend ready (WebGL)");const o={runtime:"mediapipe",modelType:"full",solutionPath:"https://cdn.jsdelivr.net/npm/@mediapipe/pose"};try{ye=await ve.createDetector(ve.SupportedModels.BlazePose,o),console.log("MediaPipe detector created successfully")}catch(e){console.warn("MediaPipe failed, falling back to TFJS runtime:",e),ye=await ve.createDetector(ve.SupportedModels.BlazePose,{runtime:"tfjs",modelType:"full"}),console.log("TFJS detector created successfully")}return!0}catch(e){return console.error("Failed to load TensorFlow dependencies:",e),fe=null,!1}}function m(e){return!(!e||0===e.length)&&22===e.filter(e=>e[2]>.7).length}return s(()=>{if(c.current=!0,!ye)return fe||(fe=d()),fe.then(e=>{e&&c.current&&i(!0)}),()=>{c.current=!1};i(!0)},[]),s(()=>{l.current=e,e>6&&_.current<2&&(o(e=>e+1),a(0))},[e]),s(()=>{_.current=n},[n]),{poseDetector:async(e,n)=>{if(!ye||!c.current||!n?.current?.video)return;const o=n.current.video;if(!(o.readyState<2))try{const n=await ye.estimatePoses(o,{flipHorizontal:!1});if(!n||!n.length)return;const t=n[0].keypoints.slice(11).map(e=>[e.x>0&&e.x<720?e.x:-1,e.y>0&&e.y<1280?e.y:-1,e.score??0]);0!==_.current||m(t)||a(e=>e+1),1===_.current&&m(t)&&a(e=>e+1),2===_.current&&e()}catch(e){console.error("Pose detection error:",e)}},isLoaded:t,spinPhase:n,resetDetector:()=>{_.current=0,l.current=0,a(0),o(0)},retryLoading:async()=>{ye||fe||(fe=d(),await fe&&c.current&&i(!0))}}}(),re=u(!0),se=u(!1),[le,ce]=r([]);let ue=0;const{setStartGyro:de,handleFileUpload:me,setUploadLoading:he}=c(we),ge=()=>{se.current=!1,clearTimeout(Se),H.current&&clearTimeout(H.current),d(k()),_(""),he?.(!1),N([]),F(!0),M(!1),W(!1),D(!0),L(!1),H.current=null,Y(""),j([]),U(""),Q(!J),de(!1),O.stopAudio(),Z(!1),ee(!1),ue=0,null!==x.current&&x.current.stop(),ae.forEach(e=>{x.current&&x.current.removeEventListener("dataavailable",e)}),ne([]),ie.current=!0,te(!1),i(!1)},Ee=t(()=>{setTimeout(()=>{F(!1)},1e3)},[]),Ce=t(()=>{v({eventName:`${E}/rescan`,email:f,scanID:o,height:p,gender:g,status:!1}),ie.current=!1,ge(),We()},[ge,o,f]),xe=t(()=>{ie.current=!1,ee(!0),te(!1),H.current&&clearTimeout(H.current),x.current&&x.current.pause(),O.stopAudio(),$.poseDetection.disconnect(),ue=0,x.current&&x.current.stop(),ae.forEach(e=>{x.current&&x.current.removeEventListener("dataavailable",e)}),ne([]),clearTimeout(Se)},[x,ae,O,ie]),ze=t(async()=>{ie.current=!0,await O.playAudio(`${y}SpotOn.mp3`),ee(!1),te(!1),H.current&&clearTimeout(H.current),M(!1)},[H,O]),Ne=t(async()=>{try{be=await $.poseDetection.connect(),V.capture(`${E}/pose_detection_connected`,{scanID:o,email:f,id:be})}catch(e){console.log(e,"while connecting websocket")}},[o,E,f]),Ie=t(({data:e})=>{e&&e.size>0&&ie.current&&(N(a=>a.concat(e)),!se.current&&C.current&&(se.current=!0,_e(()=>{ze(),w({eventName:`${E}/tensorFlow`,scanID:o,email:f,message:"recording stopped by tensorflow "})},C)))},[ze,w,E,o,f,C]),Fe=t(async()=>{q.length>0&&ie.current&&(await O.playAudio(y+q[q.length-1]),ie.current&&(Se=setTimeout(Fe,2e3)))},[q,ie]),Pe=t(()=>{x&&x.current&&x.current.stop(),M(!0);try{if(C&&C.current&&C.current.stream){const e={mimeType:le[0]};x.current=new MediaRecorder(C.current.stream,e),x.current.addEventListener("dataavailable",Ie),ne([...ae,Ie]),x.current.start(1e3),D(!1)}}catch(e){console.log("error while using media recorder",e)}},[C,le,Ie,ae]),Me=t(async()=>{H.current&&clearTimeout(H.current),Pe(),ie.current&&(H.current=setTimeout(async()=>{ie.current&&(await O.playAudio(`${y}SpotOn.mp3`),M(!1))},15e3)),W(!0),ie.current&&await O.playAudio(`${y}Spin.mp3`)},[Pe,ie,O]),Te=t(({data:e})=>{e.size>0&&$.poseDetection.connected()&&($.poseDetection.poseStatus(async e=>{if(e&&e.audio&&e.audio.length>0){const a=document.querySelector("#audioElement");!0===e.status&&e.sid===be?ue<2?(0===ue&&a?.paused&&await O.playAudio(y+e.audio),ue+=1):(U(e.audio),clearTimeout(Se),$.poseDetection.disconnect(),setTimeout(Me,1e3)):(ue=0,!a?.paused||ke&&ke?.audioName===e.audio?ke?.audioName===e.audio&&a?.paused&&(ke&&ke.no_of_times_skipped>=ke.skipCount?(ke.no_of_times_skipped=0,O.playAudio(y+e.audio)):ke&&(ke.no_of_times_skipped+=1)):(ke={skipCount:2,no_of_times_skipped:0,audioName:e.audio},O.playAudio(y+e.audio)))}}),C?.current&&null!==C.current.getScreenshot()&&$.poseDetection.videoEmit({image:C.current.getScreenshot()||"",scanId:o}))},[C,o,$,be,ue,Me,O]),We=t(async()=>{L(!0),de(!0),re.current&&(re.current=!1,w({eventName:"scan started",scanID:o,status:"success",email:f})),l(S()),F(!0),ie.current&&await O.playAudio(`${y}StartScan.mp3`),ie.current&&await O.playAudio(`${y}LiftArmsAndHoldAtHip.mp3`),ie.current&&(L(!1),M(!0),Z(!0),te(!0),Ee());try{if(C&&C.current&&C.current.stream&&ie.current){const e={mimeType:le[0]};ie.current&&(x.current=new MediaRecorder(C.current.stream,e)),ie.current&&x.current&&x.current.addEventListener("dataavailable",Te),ne([...ae,Te]),x.current&&x.current.start(1e3),D(!1),ie.current&&(Se=setTimeout(Fe,2e3))}}catch(e){console.log("error ----------",e)}},[C,le,Te,ae,Fe,ie]);return s(()=>(E&&(e(!0),Ne()),()=>{be&&($.poseDetection.disconnect(),V.capture(`${E}/pose_detection_disconnected`,{scanID:o,email:f,id:be})),ae.forEach(e=>{x?.current?.removeEventListener("dataavailable",e)})}),[J,E]),s(()=>{q.push(B)},[B]),s(()=>{j([])},[G]),s(()=>{const e=z.length&&z.length>0;R||!e||P||!ie.current||X||x&&x.current&&(P||(x.current.stop(),D(!0)))},[R,P,z,X]),s(()=>{const e=z.length&&z.length>0;if(R||!e||P)console.log("No video found to upload");else if(x&&x.current&&ie.current&&!X&&!P){const e=new File(z,`${o}.webm`,{type:"video/webm"});he?.(!0),_(""),me?.(e)}},[R,P,z,X,x,ie]),s(()=>{if("undefined"!=typeof MediaRecorder){const e=b.filter(e=>MediaRecorder.isTypeSupported(e));ce(e)}},[]),s(()=>{ge()},[]),a(pe,{resetDetector:n,handleShowStreamCamera:ge,loadingCam:I,handlePause:xe,showRestart:K,pause:X,handleReScan:Ce,recordingStarted:P,isScanning:A,startSendingVideoFrames:We,faceDone:T,stopRecording:ze,showPause:oe,webcamRef:C,handleUserMedia:Ee,config:h})});function Ce({scanID:e,userDetails:n,setIsVideoUploaded:o,setScanFailsError:t,setScanStartTime:i,setScanUniqueKey:_,config:l}){const[c,d]=r(90),[m,h]=r(0),[g,p]=r(null),[f,y]=r(!1),[v,w]=r(0),S=u([]),[b,k]=r(!1),E=c-m,C=E>=80&&E<=95;s(()=>{if("undefined"!=typeof window&&window.DeviceOrientationEvent){const e=e=>{if(null!==e.beta){let a=Math.abs(e.beta);null!==e.gamma&&(a*=Math.cos(e.gamma*Math.PI/180)),a=Math.max(0,Math.min(180,a)),d(a)}},a=async()=>{const a=DeviceOrientationEvent;if(a&&"function"==typeof a.requestPermission)try{"granted"===await a.requestPermission()&&window.addEventListener("deviceorientation",e)}catch(e){console.error("Permission error",e)}else window.addEventListener("deviceorientation",e);return()=>{e&&window.removeEventListener("deviceorientation",e)}};document.addEventListener("click",a,{once:!0})}},[]),s(()=>{if(S.current=[...S.current.slice(-4),E],S.current.length>=5){const e=Math.max(...S.current)-Math.min(...S.current);w(C&&e<2?e=>Math.min(100,e+10):e=>Math.max(0,e-20))}C||null===g&&!f||z()},[E,C,g,f]),s(()=>{v>=100&&null===g&&!f&&x(),v<50&&null!==g&&z()},[v,g,f]);const x=()=>{p(3);const e=setInterval(()=>{p(a=>null===a||a<=1?(clearInterval(e),y(!0),null):a-1)},1e3)},z=()=>{p(null),b||y(!1)};return a(ee,{angle:E,countdown:g,isScanning:f,isInTargetRange:C,stabilityScore:v,config:l,children:f&&a(Ee,{setIsScanLocked:k,resetDetector:()=>{d(90),h(0),p(null),y(!1),w(0),k(!1),S.current=[]},scanID:e,userDetails:n,setIsVideoUploaded:o,setScanFailsError:t,setScanStartTime:i,setScanUniqueKey:_,config:l})})}function xe({message:t,config:i}){const[_]=o.useState(!0),{translate:r}=c(he)||{};return a(J,{open:_,className:"confirm-modal",children:a("div",{className:"modal-main",children:a("div",{className:"text-center",children:e(n,t?{children:[a("h2",{style:{fontFamily:i?.style?.heading?.headingFontFamily||"SeriouslyNostalgic Fn",fontSize:i?.style?.heading?.headingFontSize||"32px",color:i?.style?.heading?.headingColor||"#000",fontWeight:i?.style?.heading?.headingFontWeight||"normal"},children:"Seems camera already in use"}),e("p",{className:"mt-[0.5rem] text-sm",style:{fontFamily:i?.style?.base?.baseFontFamily||"Inter, sans-serif",fontSize:i?.style?.base?.baseFontSize||"16px",color:i?.style?.base?.baseTextColor||"#000"},children:["Can you try closing the browser/app that is using the camera and try again here."," "]})]}:{children:[a("h2",{style:{fontFamily:i?.style?.heading?.headingFontFamily||"SeriouslyNostalgic Fn",fontSize:i?.style?.heading?.headingFontSize||"32px",color:i?.style?.heading?.headingColor||"#000",fontWeight:i?.style?.heading?.headingFontWeight||"normal"},children:r?.(f.Please_check_your_setting_for_camera_permission)}),a("p",{className:"mt-[0.5rem] text-sm",style:{fontFamily:i?.style?.base?.baseFontFamily||"Inter, sans-serif",fontSize:i?.style?.base?.baseFontSize||"16px",color:i?.style?.base?.baseTextColor||"#000"},children:`${r?.(f.Settings)} > ${E()} > ${r?.(f.Enable_the_camera_permissions)}`})]})})})})}function ze({setShowDrawer:e,config:n,loader:o}){const[i,_]=r({disabled:!1,message:""}),[l,c]=r(!0),d=u(null),m=t(async()=>{const e=await C();_(e),c(!1)},[]);return s(()=>{m()},[]),l?a(U,{url:o}):i?.disabled?a(xe,{config:n,message:i?.message}):a(q,{audio:!1,ref:d,screenshotQuality:1,videoConstraints:h,mirrored:!0,onUserMedia:()=>e?.(!0),screenshotFormat:"image/jpeg",style:{position:"relative",top:0,bottom:0,zIndex:0,width:"100%",height:"100%",objectFit:"cover"}})}function Ne({link:e,onReady:n,wrapperClassName:o="[&_video]:rounded-t-[20px] w-full h-full"}){const t=u(null),i=u(null);let _={autoplay:!0,controls:!1,responsive:!0,fluid:!0,muted:!0,navigationUI:"hide",preload:"metadata",poster:x};return s(()=>{if(!i.current&&e&&t?.current){const a=K(t.current,{..._});a.ready(()=>{i.current=a;const o={..._,sources:[{src:e,type:"application/x-mpegURL"}]};a.autoplay(o.autoplay),a.src(o.sources),n?.(a)})}},[e,t]),s(()=>{const e=i.current;return()=>{e&&!e.isDisposed()&&(e.dispose(),i.current=null)}},[i]),a("div",{className:o,children:a("video",{ref:t,muted:!0,className:"video-js",playsInline:!0,onDrag:e=>e.preventDefault()})})}function Ie({scanFailsError:o,serverAtCapacity:t=!1,onNext:i,gender:_,setScanUniqueKey:s,resolvedConfig:l,setIsVideoUploaded:u}){const{translate:m}=c(he)||{},[h,p]=r(!1),y=()=>{p(!h)};return e(n,{children:[e("div",{className:"flex flex-col h-full max-w-[28rem] mx-auto w-full rounded-t-[20px] overflow-y-auto",style:{background:l?.style?.base?.backgroundColor},children:[a("div",{className:"w-full max-w-[28rem] mx-auto pt-[1rem] px-[1rem]",children:a(d,{noTitle:!0,resolvedConfig:l})}),e("div",{className:"flex-1",children:[o&&e("div",{className:"px-[1rem]",children:[a("h2",{className:"text-center",style:{fontFamily:l?.style?.heading?.headingFontFamily||"SeriouslyNostalgic Fn",fontSize:l?.style?.heading?.headingFontSize||"32px",color:l?.style?.heading?.headingColor||"#000",fontWeight:l?.style?.heading?.headingFontWeight||"normal"},children:"There was an issue with your scan"}),a("p",{style:{fontFamily:l?.style?.base?.baseFontFamily||"Inter, sans-serif",fontSize:l?.style?.base?.baseFontSize||"16px",color:l?.style?.base?.baseTextColor||"#1E1E1E"},children:"Reason:"}),a("p",{style:{fontFamily:l?.style?.base?.baseFontFamily||"Inter, sans-serif",fontSize:l?.style?.base?.baseFontSize||"16px",color:l?.style?.base?.baseTextColor||"#1E1E1E"},children:z(o)}),a("img",{className:"my-[0.5rem] aspect-[2/1.4] w-full object-cover",onClick:y,src:N[_],alt:"icon"})]}),t&&e("div",{className:"p-[1rem] text-center",children:[e("h3",{style:{fontFamily:l?.style?.heading?.headingFontFamily||"SeriouslyNostalgic Fn",fontSize:l?.style?.heading?.headingFontSize||"32px",color:l?.style?.heading?.headingColor||"#000",fontWeight:l?.style?.heading?.headingFontWeight||"normal"},children:[m?.(f.Scan_s)," ",a("span",{children:m?.(f.vision_model)})," ",m?.(f.is_at_capacity)]}),a("p",{className:"text-base mt-[0.5rem]",style:{fontFamily:l?.style?.base?.baseFontFamily||"Inter, sans-serif",fontSize:l?.style?.base?.baseFontSize||"16px",color:l?.style?.base?.baseTextColor||"#1E1E1E"},children:m?.(f.We_are_sorry_about_this_We_are_working_hard_to_add_capacity_Please_try_again_soon)})]})]}),o&&a("div",{className:"p-[1rem] flex gap-[0.5rem]",children:a(g,{disabled:!1,buttonText:"Scan again",className:"!shadow-none",buttonFunc:()=>{i?i?.():s(k()),u(!1)},resolvedConfig:l})})]}),h&&e(J,{className:"w-screen h-screen video-modal",onClose:y,open:h,children:[a("div",{className:"flex justifyEnd ",children:a("span",{className:"closeBtn",onClick:y,children:a(j,{className:"absolute right-[8px] top-[8px] text-white z-[9]"})})}),a("div",{className:"aspect-video object-cover rounded-[20px] ",children:a(Ne,{link:_?I[_].PRE_LINK:I.male.PRE_LINK,wrapperClassName:"w-screen h-screen fixed top-[0] left-[0]"})})]})]})}function Fe({scanId:n,userDetails:o,config:i,isFaceScan:_,isVideoUploadedCorrect:l,isMeasurementAvailable:c,onComplete:u,isSuccess:m}){const{gender:h,shopDomain:p,heightInCm:f,deviceFocalLength:y,userName:v,email:w,scanType:S}=o,b=[F,P,M].includes(S),[k,E]=r(!0),C=t(async()=>{try{b&&await $.auth.addUser({scanId:n,email:w,name:v,gender:h,height:f}),G.capture(p,{scanID:n,email:w,height:f,focalLength:y,clothesFit:"0",gender:h})}catch(e){console.log(e)}},[b]);s(()=>{l&&C()},[l]);const x=m||(_?c&&l:l||c);return a(Z,{className:"flex h-full w-full flex-col ",children:e("div",{className:"h-full w-full flex-col items-center justify-center flex",children:[a(ze,{loader:i?.loader,setShowDrawer:E}),a(Q,{open:k,onClose:(e,a)=>{},className:"camera-drawer",anchor:"bottom",children:a("div",{className:"max-w-[28rem] mx-auto w-full h-full flex text-center flex-col justify-between items-center bg-primary rounded-t-[30px] p-[1rem]",style:{background:i?.style?.base?.backgroundColor},children:e("div",{className:"w-full h-full flex flex-col",children:[a(d,{title:"Your measurements are being taken",resolvedConfig:i}),a("div",{className:"flex items-center justify-center flex-1",children:a("video",{preload:"auto",className:"max-h-[calc(100vh-450px)] mx-auto w-full object-contain border-none",muted:!0,loop:!0,autoPlay:!0,playsInline:!0,children:a("source",{src:h===R.Male?T:W,type:"video/mp4"})})}),x&&a(g,{resolvedConfig:i,className:"!w-[180px] mx-auto",buttonText:"Next",buttonFunc:u&&u})]})})})]})})}const Pe=({userDetails:n,language:o=m.English,config:i,onRetry:_,onScanSuccess:l,onComplete:u,onScanError:d,isError:h,isSuccess:g})=>{const{gender:p,scanType:f,shopDomain:y,heightInCm:v,email:b,deviceFocalLength:E,deviceModelName:x,callbackUrl:N}=n,[I,F]=r(!1),[P,M]=r(!1),[T,W]=r(!1),[R,Y]=r({disabled:!1,message:""}),[q,j]=r(""),[G,O]=r(!1),[J,K]=r(!0),[Z,X]=r(!1),[ee,ae]=r(""),[ne,oe]=r(S()),{gyroData:te}=function(e){const[a,n]=r([]),[o,i]=r(!1),_=t(e=>{try{const{alpha:a,beta:o,gamma:t}=e;n(e=>[...e,{alpha:a?.toString()||void 0,beta:o?.toString()||void 0,gamma:t?.toString()||void 0,timestamp:(new Date).toISOString()}])}catch(e){console.log(e)}},[]),l=t(async()=>{const e=DeviceOrientationEvent;if(void 0!==e&&"function"==typeof e.requestPermission)try{"granted"===await e.requestPermission()?i(!0):console.warn("Device orientation permission denied.")}catch(e){console.error("Error requesting device orientation permission:",e)}else i(!0)},[]);return s(()=>(e&&o?window.addEventListener("deviceorientation",_):n([]),()=>{window.removeEventListener("deviceorientation",_)}),[e,o,_]),s(()=>{e&&l()},[e,l]),{gyroData:a}}(Z),{setPreferredLanguage:_e}=c(he)||{},re=D(i),se=t(()=>{ae(k()),j(""),F(!1),O(!1)},[]),le=e=>{d({...e,message:z(e)}),ce(),W(!1),j(e),M(!1),w({eventName:`${y}/measurement_failed/fit-view`,scanID:ee,status:"failed",email:b,message:z(e)}),ne&&w({eventName:`${y}/scan_completion_time`,scanID:ee,status:"failed",completionTime:S()-ne,email:b})},ce=()=>{oe(null),ae("")},ue=t(async e=>{if(e&&"success"===e?.scanStatus&&"intermediate"===e?.resultType&&200===e?.code)return w({eventName:`${y}/measurement_success/intermediate`,scanID:ee,status:"success",email:b}),void l?.(e);ce();const a=ee;W(!0),w({eventName:`${y}/measurement_success/fit-view`,scanID:a,status:"success",email:b}),ne&&w({eventName:`${y}/scan_completion_time`,scanID:a,status:"success",completionTime:S()-ne,email:b})},[f,y,ee]),de=e=>{W(!1),j(""),M(!1),$.measurement.handleMeasurementSocket({scanId:e||ee,onOpen:()=>{B({eventName:`${y}/webSocket`,scanID:ee,connection:"open",type:"measurement_recommendation",email:b})},onClose:()=>B({eventName:`${y}/webSocket`,scanID:ee,connection:"close",type:"measurement_recommendation",email:b}),onError:e=>{le(e),B({eventName:`${y}/webSocket`,scanID:ee,connection:"error",type:"measurement_recommendation",email:b})},onSuccess:e=>{B({eventName:`${y}/webSocket`,scanID:ee,connection:"success",type:"measurement_recommendation",email:b}),ue(e)}})},me=t(async e=>{const a=A({gender:p,focal_length:`${E}`,height:`${v}`,customer_store_url:y,clothes_fit:"0",scan_type:f,callback_url:N||"https://example.com/webhook"});w({eventName:`${y}/body_scan_meta_data`,scanID:ee,email:b,data:JSON.stringify(a)});try{await $.fileUpload.uploadFileFrontend({file:e,arrayMetaData:a,scanId:ee,email:b}),await $.fileUpload.setDeviceInfo({model:x,detection:"manual",gyro:te,scanId:ee}),console.log("video successfully uploaded"),O(!1),w({eventName:`${y}/scan_success`,scanID:ee,status:"success",email:b,data:JSON.stringify(a)}),w({eventName:"scan finished",scanID:ee,status:"success",email:b}),oe(S()),setTimeout(()=>{O(!0)},3e3)}catch(e){w({eventName:"scan finished",scanID:ee,status:"failed",email:b,message:z(e)}),w({eventName:`${y}/scan_failed`,scanID:ee,status:"failed",email:b,message:z(e),data:JSON.stringify(a)}),j(z(e)),O(!1),console.log(e,"video upload failed")}finally{X(!1)}},[ee,te]),pe=t(async e=>{try{const a=await $.measurement.getMeasurementResult(e),n=a?.data?.isMeasured,o=ne||S(),t=S(),i=300;if(K(!1),!1===n)return ce(),void ae(k());F(!0),!0===n?await ue(null):null===n&&o>t+i?le(a?.data?.error):de(e)}catch(e){console.log(e),ce(),ae(k()),F(!1)}},[le,ue,ae]),fe=t(async()=>{if(+v<152.4||+v>213.36)return void d({message:"Height must be between 152.4cm (5ft) and 213.36cm (7ft)"});const e=await C();if(e.disabled)w({eventName:`${y}/camera_activation`,scanID:ee,status:"failed",email:b}),K(!1);else{ee?pe(ee):K(!1),w({eventName:`${y}/camera_activation`,scanID:ee,status:"success",email:b})}Y(e),j(""),O(!1)},[pe,b,ee,ae,y]);return s(()=>{_e?.(o),V.init(L,{api_host:H}),V.capture("$pageview")},[]),s(()=>{h||g||y&&fe()},[y,v,h,g]),s(()=>{h||g||G&&y&&ee&&de()},[G,y,ee,h,g]),h?e(ge,{children:[a(ze,{}),a(Q,{anchor:"bottom",open:!0,className:"camera-drawer",onClose:(e,a)=>{},children:a(Ie,{scanFailsError:q||h,onNext:()=>{},setScanUniqueKey:ae,gender:p,resolvedConfig:re,setIsVideoUploaded:O})})]}):g?a(Fe,{isFaceScan:!1,scanId:ee,isMeasurementAvailable:T,userDetails:n,isVideoUploadedCorrect:P,config:re,isSuccess:g}):J?a("div",{className:"flex top-0 !mt-0 left-0 z-[999] bg-opacity-80 bg-[#1b1b1b] absolute justify-center items-center w-full h-full",children:a(U,{url:re?.loader})}):R.disabled?a(ge,{children:a(xe,{})}):I||q?!I&&!T||q?e(ge,{children:[a(ze,{}),a(Q,{anchor:"bottom",open:!0,className:"camera-drawer",onClose:(e,a)=>{},children:a(Ie,{scanFailsError:q,onNext:()=>{_?.(),se()},setScanUniqueKey:ae,gender:p,resolvedConfig:re,setIsVideoUploaded:O})})]}):a(Fe,{isFaceScan:!1,scanId:ee,isMeasurementAvailable:T,userDetails:n,onComplete:u,isVideoUploadedCorrect:P,config:re}):a(we.Provider,{value:{setStartGyro:X,handleFileUpload:me,setUploadLoading:F},children:a(ie,{children:a(ge,{children:a(Ce,{config:re,scanID:ee,userDetails:n,setIsVideoUploaded:O,setScanFailsError:j,setScanStartTime:oe,setScanUniqueKey:ae})})})})};export{Pe as BodyScan};
20
2
  //# sourceMappingURL=bodyScan.mjs.map