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

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.
@@ -0,0 +1,2 @@
1
+ "use strict";var e,r=require("@swan-admin/swan-ai-measurements"),n=require("react/jsx-runtime"),t=require("./constants-B8ID6mz4.js");!function(e){e.DEV="dev",e.STAGING="staging",e.PROD="prod"}(e||(e={}));const s=new r("8e35dfd4-010c-40ca-ad79-fc72dc307efb",e.STAGING),c={playAudio:e=>new Promise(r=>{const n=document.querySelector("#audioElement");if(!n)return void r();n.src=e;const t=()=>{n.removeEventListener("ended",t),r()};n.addEventListener("ended",t),n.play().catch(e=>{n.removeEventListener("ended",t),r(),console.error(e)})}),stopAudio:async()=>{const e=document.querySelector("#audioElement");try{e&&(e.pause(),e.src="",e.currentTime=0)}catch(e){console.error(e)}}};exports.LoadingScreen=function({size:e=60,loaderType:r="default",url:s}){return n.jsx("div",{className:"flex items-center justify-center h-full w-full",children:n.jsx("img",{src:s||("black"===r?t.loaderBlackGif:t.loaderGif),alt:"Swan logo",className:`w-[${e}px]`,width:e})})},exports.speechService=c,exports.swan=s;
2
+ //# sourceMappingURL=LoadingScreen-B1830Y9Y.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoadingScreen-B1830Y9Y.js","sources":["../src/utils/service/swanService.ts","../src/utils/service/speechService.ts","../src/components/LoadingScreen.tsx"],"sourcesContent":["/* eslint-disable import/no-extraneous-dependencies */\nimport Swan from \"@swan-admin/swan-ai-measurements\";\n\nenum URLType {\n DEV = \"dev\",\n STAGING = \"staging\",\n PROD = \"prod\",\n}\n\nconst REACT_APP_ACCESS_KEY = \"8e35dfd4-010c-40ca-ad79-fc72dc307efb\";\n\nconst swan = new Swan(REACT_APP_ACCESS_KEY, URLType.STAGING);\n\nexport default swan;\n","const speechService = {\n playAudio: (url: string): Promise<void> =>\n new Promise((resolve) => {\n const audio = document.querySelector<HTMLAudioElement>(\"#audioElement\");\n if (!audio) {\n resolve();\n return;\n }\n audio.src = url;\n const onEnded = () => {\n audio.removeEventListener(\"ended\", onEnded);\n resolve();\n };\n audio.addEventListener(\"ended\", onEnded);\n audio.play().catch((e) => {\n audio.removeEventListener(\"ended\", onEnded);\n resolve(); // resolve anyway to avoid blocking\n console.error(e);\n });\n }),\n stopAudio: async () => {\n const audio = document.querySelector<HTMLAudioElement>(\"#audioElement\");\n try {\n if (audio) {\n audio.pause();\n audio.src = \"\";\n audio.currentTime = 0;\n }\n } catch (e) {\n console.error(e);\n }\n },\n};\n\nexport default speechService;\n","import { loaderBlackGif, loaderGif } from \"../utils/constants\";\n\nfunction LoadingScreen({ size = 60, loaderType = \"default\", url }: { size?: number; loaderType?: string; url?: string }) {\n\treturn (\n\t\t<div className=\"flex items-center justify-center h-full w-full\">\n\t\t\t<img src={url ? url: (loaderType === \"black\" ? loaderBlackGif : loaderGif)} alt=\"Swan logo\" className={`w-[${size}px]`} width={size} />\n\t\t</div>\n\t);\n}\n\nexport default LoadingScreen;\n"],"names":["URLType","swan","Swan","STAGING","speechService","playAudio","url","Promise","resolve","audio","document","querySelector","src","onEnded","removeEventListener","addEventListener","play","catch","e","console","error","stopAudio","async","pause","currentTime","size","loaderType","_jsx","className","children","loaderBlackGif","loaderGif","alt","width"],"mappings":"iBAGKA,qHAAL,SAAKA,GACHA,EAAA,IAAA,MACAA,EAAA,QAAA,UACAA,EAAA,KAAA,MACD,CAJD,CAAKA,IAAAA,EAAO,CAAA,IAMZ,MAEMC,EAAO,IAAIC,EAFY,uCAEeF,EAAQG,SCX9CC,EAAgB,CACpBC,UAAYC,GACV,IAAIC,QAASC,IACX,MAAMC,EAAQC,SAASC,cAAgC,iBACvD,IAAKF,EAEH,YADAD,IAGFC,EAAMG,IAAMN,EACZ,MAAMO,EAAU,KACdJ,EAAMK,oBAAoB,QAASD,GACnCL,KAEFC,EAAMM,iBAAiB,QAASF,GAChCJ,EAAMO,OAAOC,MAAOC,IAClBT,EAAMK,oBAAoB,QAASD,GACnCL,IACAW,QAAQC,MAAMF,OAGpBG,UAAWC,UACT,MAAMb,EAAQC,SAASC,cAAgC,iBACvD,IACMF,IACFA,EAAMc,QACNd,EAAMG,IAAM,GACZH,EAAMe,YAAc,EAExB,CAAE,MAAON,GACPC,QAAQC,MAAMF,EAChB,0BC5BJ,UAAuBO,KAAEA,EAAO,GAAEC,WAAEA,EAAa,UAASpB,IAAEA,IAC3D,OACCqB,EAAAA,WAAKC,UAAU,iDAAgDC,SAC9DF,MAAA,MAAA,CAAKf,IAAKN,IAA2B,UAAfoB,EAAyBI,EAAAA,eAAiBC,EAAAA,WAAYC,IAAI,YAAYJ,UAAW,MAAMH,OAAWQ,MAAOR,KAGlI"}
@@ -0,0 +1,2 @@
1
+ import e from"@swan-admin/swan-ai-measurements";import{jsx as r}from"react/jsx-runtime";import{$ as t,a0 as n}from"./constants-Diz_EEN6.js";var s;!function(e){e.DEV="dev",e.STAGING="staging",e.PROD="prod"}(s||(s={}));const o=new e("8e35dfd4-010c-40ca-ad79-fc72dc307efb",s.STAGING),a={playAudio:e=>new Promise(r=>{const t=document.querySelector("#audioElement");if(!t)return void r();t.src=e;const n=()=>{t.removeEventListener("ended",n),r()};t.addEventListener("ended",n),t.play().catch(e=>{t.removeEventListener("ended",n),r(),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 c({size:e=60,loaderType:s="default",url:o}){return r("div",{className:"flex items-center justify-center h-full w-full",children:r("img",{src:o||("black"===s?t:n),alt:"Swan logo",className:`w-[${e}px]`,width:e})})}export{c as L,o as a,a as s};
2
+ //# sourceMappingURL=LoadingScreen-CRa8Dvjq.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoadingScreen-CRa8Dvjq.js","sources":["../src/utils/service/swanService.ts","../src/utils/service/speechService.ts","../src/components/LoadingScreen.tsx"],"sourcesContent":["/* eslint-disable import/no-extraneous-dependencies */\nimport Swan from \"@swan-admin/swan-ai-measurements\";\n\nenum URLType {\n DEV = \"dev\",\n STAGING = \"staging\",\n PROD = \"prod\",\n}\n\nconst REACT_APP_ACCESS_KEY = \"8e35dfd4-010c-40ca-ad79-fc72dc307efb\";\n\nconst swan = new Swan(REACT_APP_ACCESS_KEY, URLType.STAGING);\n\nexport default swan;\n","const speechService = {\n playAudio: (url: string): Promise<void> =>\n new Promise((resolve) => {\n const audio = document.querySelector<HTMLAudioElement>(\"#audioElement\");\n if (!audio) {\n resolve();\n return;\n }\n audio.src = url;\n const onEnded = () => {\n audio.removeEventListener(\"ended\", onEnded);\n resolve();\n };\n audio.addEventListener(\"ended\", onEnded);\n audio.play().catch((e) => {\n audio.removeEventListener(\"ended\", onEnded);\n resolve(); // resolve anyway to avoid blocking\n console.error(e);\n });\n }),\n stopAudio: async () => {\n const audio = document.querySelector<HTMLAudioElement>(\"#audioElement\");\n try {\n if (audio) {\n audio.pause();\n audio.src = \"\";\n audio.currentTime = 0;\n }\n } catch (e) {\n console.error(e);\n }\n },\n};\n\nexport default speechService;\n","import { loaderBlackGif, loaderGif } from \"../utils/constants\";\n\nfunction LoadingScreen({ size = 60, loaderType = \"default\", url }: { size?: number; loaderType?: string; url?: string }) {\n\treturn (\n\t\t<div className=\"flex items-center justify-center h-full w-full\">\n\t\t\t<img src={url ? url: (loaderType === \"black\" ? loaderBlackGif : loaderGif)} alt=\"Swan logo\" className={`w-[${size}px]`} width={size} />\n\t\t</div>\n\t);\n}\n\nexport default LoadingScreen;\n"],"names":["URLType","swan","Swan","STAGING","speechService","playAudio","url","Promise","resolve","audio","document","querySelector","src","onEnded","removeEventListener","addEventListener","play","catch","e","console","error","stopAudio","async","pause","currentTime","LoadingScreen","size","loaderType","_jsx","className","children","loaderBlackGif","loaderGif","alt","width"],"mappings":"4IAGA,IAAKA,GAAL,SAAKA,GACHA,EAAA,IAAA,MACAA,EAAA,QAAA,UACAA,EAAA,KAAA,MACD,CAJD,CAAKA,IAAAA,EAAO,CAAA,IAMZ,MAEMC,EAAO,IAAIC,EAFY,uCAEeF,EAAQG,SCX9CC,EAAgB,CACpBC,UAAYC,GACV,IAAIC,QAASC,IACX,MAAMC,EAAQC,SAASC,cAAgC,iBACvD,IAAKF,EAEH,YADAD,IAGFC,EAAMG,IAAMN,EACZ,MAAMO,EAAU,KACdJ,EAAMK,oBAAoB,QAASD,GACnCL,KAEFC,EAAMM,iBAAiB,QAASF,GAChCJ,EAAMO,OAAOC,MAAOC,IAClBT,EAAMK,oBAAoB,QAASD,GACnCL,IACAW,QAAQC,MAAMF,OAGpBG,UAAWC,UACT,MAAMb,EAAQC,SAASC,cAAgC,iBACvD,IACMF,IACFA,EAAMc,QACNd,EAAMG,IAAM,GACZH,EAAMe,YAAc,EAExB,CAAE,MAAON,GACPC,QAAQC,MAAMF,EAChB,IC5BJ,SAASO,GAAcC,KAAEA,EAAO,GAAEC,WAAEA,EAAa,UAASrB,IAAEA,IAC3D,OACCsB,SAAKC,UAAU,iDAAgDC,SAC9DF,EAAA,MAAA,CAAKhB,IAAKN,IAA2B,UAAfqB,EAAyBI,EAAiBC,GAAYC,IAAI,YAAYJ,UAAW,MAAMH,OAAWQ,MAAOR,KAGlI"}
@@ -0,0 +1,2 @@
1
+ import e from"@swan-admin/swan-ai-measurements";import{jsx as r}from"react/jsx-runtime";import{a3 as t,a4 as n}from"./constants-CHVqX9xE.js";var s;!function(e){e.DEV="dev",e.STAGING="staging",e.PROD="prod"}(s||(s={}));const a=new e("8e35dfd4-010c-40ca-ad79-fc72dc307efb",s.STAGING),o={playAudio:e=>new Promise(r=>{const t=document.querySelector("#audioElement");if(!t)return void r();t.src=e;const n=()=>{t.removeEventListener("ended",n),r()};t.addEventListener("ended",n),t.play().catch(e=>{t.removeEventListener("ended",n),r(),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 c({size:e=60,loaderType:s="default",url:a}){return r("div",{className:"flex items-center justify-center h-full w-full",children:r("img",{src:a||("black"===s?t:n),alt:"Swan logo",className:`w-[${e}px]`,width:e})})}export{c as L,a,o as s};
2
+ //# sourceMappingURL=LoadingScreen-D1MAQtVF.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoadingScreen-D1MAQtVF.js","sources":["../src/utils/service/swanService.ts","../src/utils/service/speechService.ts","../src/components/LoadingScreen.tsx"],"sourcesContent":["/* eslint-disable import/no-extraneous-dependencies */\nimport Swan from \"@swan-admin/swan-ai-measurements\";\n\nenum URLType {\n DEV = \"dev\",\n STAGING = \"staging\",\n PROD = \"prod\",\n}\n\nconst REACT_APP_ACCESS_KEY = \"8e35dfd4-010c-40ca-ad79-fc72dc307efb\";\n\nconst swan = new Swan(REACT_APP_ACCESS_KEY, URLType.STAGING);\n\nexport default swan;\n","const speechService = {\n playAudio: (url: string): Promise<void> =>\n new Promise((resolve) => {\n const audio = document.querySelector<HTMLAudioElement>(\"#audioElement\");\n if (!audio) {\n resolve();\n return;\n }\n audio.src = url;\n const onEnded = () => {\n audio.removeEventListener(\"ended\", onEnded);\n resolve();\n };\n audio.addEventListener(\"ended\", onEnded);\n audio.play().catch((e) => {\n audio.removeEventListener(\"ended\", onEnded);\n resolve(); // resolve anyway to avoid blocking\n console.error(e);\n });\n }),\n stopAudio: async () => {\n const audio = document.querySelector<HTMLAudioElement>(\"#audioElement\");\n try {\n if (audio) {\n audio.pause();\n audio.src = \"\";\n audio.currentTime = 0;\n }\n } catch (e) {\n console.error(e);\n }\n },\n};\n\nexport default speechService;\n","import { loaderBlackGif, loaderGif } from \"../utils/constants\";\n\nfunction LoadingScreen({ size = 60, loaderType = \"default\", url }: { size?: number; loaderType?: string; url?: string }) {\n\treturn (\n\t\t<div className=\"flex items-center justify-center h-full w-full\">\n\t\t\t<img src={url ? url: (loaderType === \"black\" ? loaderBlackGif : loaderGif)} alt=\"Swan logo\" className={`w-[${size}px]`} width={size} />\n\t\t</div>\n\t);\n}\n\nexport default LoadingScreen;\n"],"names":["URLType","swan","Swan","STAGING","speechService","playAudio","url","Promise","resolve","audio","document","querySelector","src","onEnded","removeEventListener","addEventListener","play","catch","e","console","error","stopAudio","async","pause","currentTime","LoadingScreen","size","loaderType","_jsx","className","children","loaderBlackGif","loaderGif","alt","width"],"mappings":"6IAGA,IAAKA,GAAL,SAAKA,GACHA,EAAA,IAAA,MACAA,EAAA,QAAA,UACAA,EAAA,KAAA,MACD,CAJD,CAAKA,IAAAA,EAAO,CAAA,IAMZ,MAEMC,EAAO,IAAIC,EAFY,uCAEeF,EAAQG,SCX9CC,EAAgB,CACpBC,UAAYC,GACV,IAAIC,QAASC,IACX,MAAMC,EAAQC,SAASC,cAAgC,iBACvD,IAAKF,EAEH,YADAD,IAGFC,EAAMG,IAAMN,EACZ,MAAMO,EAAU,KACdJ,EAAMK,oBAAoB,QAASD,GACnCL,KAEFC,EAAMM,iBAAiB,QAASF,GAChCJ,EAAMO,OAAOC,MAAOC,IAClBT,EAAMK,oBAAoB,QAASD,GACnCL,IACAW,QAAQC,MAAMF,OAGpBG,UAAWC,UACT,MAAMb,EAAQC,SAASC,cAAgC,iBACvD,IACMF,IACFA,EAAMc,QACNd,EAAMG,IAAM,GACZH,EAAMe,YAAc,EAExB,CAAE,MAAON,GACPC,QAAQC,MAAMF,EAChB,IC5BJ,SAASO,GAAcC,KAAEA,EAAO,GAAEC,WAAEA,EAAa,UAASrB,IAAEA,IAC3D,OACCsB,SAAKC,UAAU,iDAAgDC,SAC9DF,EAAA,MAAA,CAAKhB,IAAKN,IAA2B,UAAfqB,EAAyBI,EAAiBC,GAAYC,IAAI,YAAYJ,UAAW,MAAMH,OAAWQ,MAAOR,KAGlI"}
@@ -0,0 +1,2 @@
1
+ "use strict";var e,r=require("@swan-admin/swan-ai-measurements"),n=require("react/jsx-runtime"),t=require("./constants-Df5S1CyA.js");!function(e){e.DEV="dev",e.STAGING="staging",e.PROD="prod"}(e||(e={}));const s=new r("8e35dfd4-010c-40ca-ad79-fc72dc307efb",e.STAGING),c={playAudio:e=>new Promise(r=>{const n=document.querySelector("#audioElement");if(!n)return void r();n.src=e;const t=()=>{n.removeEventListener("ended",t),r()};n.addEventListener("ended",t),n.play().catch(e=>{n.removeEventListener("ended",t),r(),console.error(e)})}),stopAudio:async()=>{const e=document.querySelector("#audioElement");try{e&&(e.pause(),e.src="",e.currentTime=0)}catch(e){console.error(e)}}};exports.LoadingScreen=function({size:e=60,loaderType:r="default",url:s}){return n.jsx("div",{className:"flex items-center justify-center h-full w-full",children:n.jsx("img",{src:s||("black"===r?t.loaderBlackGif:t.loaderGif),alt:"Swan logo",className:`w-[${e}px]`,width:e})})},exports.speechService=c,exports.swan=s;
2
+ //# sourceMappingURL=LoadingScreen-ygW5w9-T.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoadingScreen-ygW5w9-T.js","sources":["../src/utils/service/swanService.ts","../src/utils/service/speechService.ts","../src/components/LoadingScreen.tsx"],"sourcesContent":["/* eslint-disable import/no-extraneous-dependencies */\nimport Swan from \"@swan-admin/swan-ai-measurements\";\n\nenum URLType {\n DEV = \"dev\",\n STAGING = \"staging\",\n PROD = \"prod\",\n}\n\nconst REACT_APP_ACCESS_KEY = \"8e35dfd4-010c-40ca-ad79-fc72dc307efb\";\n\nconst swan = new Swan(REACT_APP_ACCESS_KEY, URLType.STAGING);\n\nexport default swan;\n","const speechService = {\n playAudio: (url: string): Promise<void> =>\n new Promise((resolve) => {\n const audio = document.querySelector<HTMLAudioElement>(\"#audioElement\");\n if (!audio) {\n resolve();\n return;\n }\n audio.src = url;\n const onEnded = () => {\n audio.removeEventListener(\"ended\", onEnded);\n resolve();\n };\n audio.addEventListener(\"ended\", onEnded);\n audio.play().catch((e) => {\n audio.removeEventListener(\"ended\", onEnded);\n resolve(); // resolve anyway to avoid blocking\n console.error(e);\n });\n }),\n stopAudio: async () => {\n const audio = document.querySelector<HTMLAudioElement>(\"#audioElement\");\n try {\n if (audio) {\n audio.pause();\n audio.src = \"\";\n audio.currentTime = 0;\n }\n } catch (e) {\n console.error(e);\n }\n },\n};\n\nexport default speechService;\n","import { loaderBlackGif, loaderGif } from \"../utils/constants\";\n\nfunction LoadingScreen({ size = 60, loaderType = \"default\", url }: { size?: number; loaderType?: string; url?: string }) {\n\treturn (\n\t\t<div className=\"flex items-center justify-center h-full w-full\">\n\t\t\t<img src={url ? url: (loaderType === \"black\" ? loaderBlackGif : loaderGif)} alt=\"Swan logo\" className={`w-[${size}px]`} width={size} />\n\t\t</div>\n\t);\n}\n\nexport default LoadingScreen;\n"],"names":["URLType","swan","Swan","STAGING","speechService","playAudio","url","Promise","resolve","audio","document","querySelector","src","onEnded","removeEventListener","addEventListener","play","catch","e","console","error","stopAudio","async","pause","currentTime","size","loaderType","_jsx","className","children","loaderBlackGif","loaderGif","alt","width"],"mappings":"iBAGKA,qHAAL,SAAKA,GACHA,EAAA,IAAA,MACAA,EAAA,QAAA,UACAA,EAAA,KAAA,MACD,CAJD,CAAKA,IAAAA,EAAO,CAAA,IAMZ,MAEMC,EAAO,IAAIC,EAFY,uCAEeF,EAAQG,SCX9CC,EAAgB,CACpBC,UAAYC,GACV,IAAIC,QAASC,IACX,MAAMC,EAAQC,SAASC,cAAgC,iBACvD,IAAKF,EAEH,YADAD,IAGFC,EAAMG,IAAMN,EACZ,MAAMO,EAAU,KACdJ,EAAMK,oBAAoB,QAASD,GACnCL,KAEFC,EAAMM,iBAAiB,QAASF,GAChCJ,EAAMO,OAAOC,MAAOC,IAClBT,EAAMK,oBAAoB,QAASD,GACnCL,IACAW,QAAQC,MAAMF,OAGpBG,UAAWC,UACT,MAAMb,EAAQC,SAASC,cAAgC,iBACvD,IACMF,IACFA,EAAMc,QACNd,EAAMG,IAAM,GACZH,EAAMe,YAAc,EAExB,CAAE,MAAON,GACPC,QAAQC,MAAMF,EAChB,0BC5BJ,UAAuBO,KAAEA,EAAO,GAAEC,WAAEA,EAAa,UAASpB,IAAEA,IAC3D,OACCqB,EAAAA,WAAKC,UAAU,iDAAgDC,SAC9DF,MAAA,MAAA,CAAKf,IAAKN,IAA2B,UAAfoB,EAAyBI,EAAAA,eAAiBC,EAAAA,WAAYC,IAAI,YAAYJ,UAAW,MAAMH,OAAWQ,MAAOR,KAGlI"}
@@ -1,5 +1,5 @@
1
- import { B as BodyScanProps } from './interfaces-DN0Cmtpk.js';
2
- export { U as UserDetails } from './interfaces-DN0Cmtpk.js';
1
+ import { B as BodyScanProps } from './interfaces-82rEVk5I.js';
2
+ export { U as UserDetails } from './interfaces-82rEVk5I.js';
3
3
 
4
4
  declare const BodyScan: React.FC<BodyScanProps>;
5
5
 
package/dist/bodyScan.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime"),a=require("react"),n=require("./Header-BWD-iDc_.js"),o=require("clsx"),t=require("react-webcam"),i=require("@mui/icons-material/Close"),r=require("posthog-js"),_=require("./LoadingScreen-Cy9Vy7kX.js"),s=require("@mui/material/Dialog"),l=require("@mui/material"),u=require("video.js"),c=require("@mui/material/Box");require("tailwind-merge"),require("mic-check"),require("uuid"),require("@swan-admin/swan-ai-measurements");var d=a.memo(function({size:a=16}){return e.jsxs("svg",{width:a,height:a,viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("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.jsx("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.jsx("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.jsx("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.jsx("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 m=a.memo(function({angle:t,countdown:i,isScanning:r,isInTargetRange:_,stabilityScore:s,children:l,config:u}){const c=a.useCallback(()=>t<80?Math.max(0,Math.min(100,10*(t-60))):t>95?Math.max(0,Math.min(100,10*(105-t))):100,[t]),m=a.useMemo(()=>{if(r)return u?.style?.angleDetector?.successAngleBackground||"#4f46e5";const e=c();if(0===e)return u?.style?.angleDetector?.successAngleLowBackground||"#ffffff";if(100===e)return u?.style?.angleDetector?.successAngleBackground||"#4f46e5";return`rgb(${Math.round(255-e/100*116)}, ${Math.round(255-e/100*163)}, ${Math.round(255-e/100*9)})`},[r,c]),h=a.useCallback((e,a)=>a>70?e?`text-[${u?.style?.angleDetector?.successAngleTextLightColor}]/70`:`text-[${u?.style?.angleDetector?.successAngleTextLightColor}]`:e?`text-[${u?.style?.angleDetector?.successAngleTextLightColor}]/40`:`text-[${u?.style?.angleDetector?.successAngleTextDarkColor}]/70`,[]),g=a.useCallback((e=!1)=>{const a=c();return r?`text-[${u?.style?.angleDetector?.successAngleTextLightColor}]`:h(e,a)},[r,c]),p=a.useCallback((e,a)=>a>70||e?u?.style?.angleDetector?.successAngleTextLightColor:u?.style?.angleDetector?.successAngleTextDarkColor,[]),f=a.useCallback((e=!1)=>{const a=c();return r?u?.style?.angleDetector?.successAngleTextLightColor:p(e,a)},[r,c]),y=i;function v(){document.documentElement.style.setProperty("--real-vh",window.innerHeight+"px")}return v(),window.addEventListener("resize",v),e.jsxs("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:[e.jsx("div",{className:"flex justify-start fixed top-[.5rem] max-w-[28rem] mx-auto w-full px-[1rem]",children:e.jsx("div",{className:"flex justify-start ",children:e.jsx(n.Header,{noTitle:!0,resolvedConfig:u})})}),null!==y?e.jsx("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:e.jsx("div",{className:`text-[3rem] font-bold text-[${f()}]`,style:{fontFamily:u?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:y})}):r?e.jsxs("div",{className:"relative flex flex-col items-center justify-center",children:[e.jsx("div",{className:"relative flex h-16 w-16 items-center justify-center rounded-[9999px] border-2 bg-[#fff]/30 border-[#fff]",children:e.jsx("div",{className:"h-4 w-4 rounded-[9999px] animate-pulse bg-[#fff]/80"})}),l]}):e.jsxs("div",{className:o("relative flex h-[4rem] w-[4rem] items-center justify-center rounded-[9999px] ",_?"bg-[#fff]/20 border-[#fff]":"bg-[#fff]/10 border-[#fff]"),style:{transform:`translateY(${3*(90-t)}px)`,transition:"transform 0.2s ease-out",border:`2px solid ${f()}`},children:[e.jsx("div",{className:`h-[1rem] w-[1rem] rounded-[9999px] bg-[${f()}]/80`}),e.jsxs("div",{className:o("mt-[.5rem] w-[180px] flex-col flex items-center absolute top-[60px]",g()),children:[e.jsx(d,{size:30}),e.jsxs("p",{style:{fontFamily:u?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:[" ","Tap to start level check",e.jsx("br",{})]})]})]}),null!==y&&e.jsx("div",{className:"absolute bottom-[8rem] text-center",children:e.jsx("div",{className:o("text-sm font-medium px-4 py-1.5 bg-black/20 rounded-[9999px] mt-8",g()),style:{fontFamily:u?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:"Leave your phone as is"})}),_&&null===y&&!r&&e.jsx("div",{className:"absolute bottom-[8rem] w-[12rem]",children:e.jsx("div",{className:`h-[.375rem] w-full bg-[${f()}]/20 rounded-[9999px] overflow-hidden`,style:{backgroundColor:`${f()}33`},children:e.jsx("div",{className:`h-full bg-[${f()}]/70 transition-all duration-300 rounded-[9999px]`,style:{width:`${t}%`,backgroundColor:`${f()}B3`}})})}),null===y&&!r&&e.jsx("div",{className:"absolute bottom-[5rem] text-center",children:e.jsxs("div",{className:o("text-[1.5rem] font-light",g()),children:[Math.round(t),"°"]})}),null===y&&!r&&e.jsx("div",{className:"absolute bottom-[2rem] text-center max-w-[20rem] mx-auto",children:e.jsx("div",{className:o("text-[.75rem] opacity-50",g()),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."})})]})});const h="DESKTOP",g="TAB",p="MOBILE",f=a.createContext(void 0);function y({children:n}){const[o,t]=a.useState([window?.innerWidth,window?.innerHeight]),[i,r]=a.useState(!1),_=()=>{t([window?.innerWidth,window?.innerHeight])};a.useEffect(()=>{_()},[]),a.useLayoutEffect(()=>(window.addEventListener("resize",_),()=>window.removeEventListener("resize",_)),[_]);let s=h;o[0]>768&&o[0]<1024&&(s=g),o[0]<768&&(s=p);const l=a.useMemo(()=>({size:o,setSize:t,clearInputs:i,setClearInputs:r,media:s}),[o,i,s]);return e.jsx(f.Provider,{value:l,children:n})}var v={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"},S={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:"वापस जाएं"},w={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 à"},b={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"},k={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"},x={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:"العودة إلى"},C={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 E={[n.PreferredLanguage.English]:v,[n.PreferredLanguage.Hindi]:S,[n.PreferredLanguage.French]:w,[n.PreferredLanguage.German]:b,[n.PreferredLanguage.Spanish]:k,[n.PreferredLanguage.Arabic]:x,[n.PreferredLanguage.Italian]:C},N=a.createContext(void 0);function P({children:o}){const[t,i]=a.useState(n.PreferredLanguage.English),r=e=>E[t][e]??e,_=a.useMemo(()=>({preferredLanguage:t,setPreferredLanguage:i,translate:r}),[t]);return e.jsx(N.Provider,{value:_,children:o})}function I({handleShowStreamCamera:o,loadingCam:r,handleUserMedia:_,handlePause:s,pause:l,recordingStarted:u,startSendingVideoFrames:c,showPause:d,webcamRef:m,resetDetector:h,config:g}){const{media:y}=a.useContext(f)||{},{translate:v}=a.useContext(N)||{};return e.jsxs("div",{className:"App w-screen h-[100vh] relative ",children:[e.jsx("span",{onClick:()=>{o(),h()},className:"fixed right-[20px] top-[20px] z-[999]",children:e.jsx(i,{className:"text-[#fff]"})}),e.jsx("div",{className:"w-full h-full overflow-hidden ",children:y===p&&e.jsx(t,{audio:!1,ref:m,screenshotQuality:1,videoConstraints:n.videoConstraints,mirrored:!0,screenshotFormat:"image/jpeg",onUserMedia:_,style:{position:"fixed",top:0,bottom:0,zIndex:0,width:"100%",height:"100%",objectFit:"cover"}})}),e.jsxs("div",{className:"fixed bottom-[30px] w-full z-[999] flex flex-col gap-4 items-center justify-center",children:[d&&e.jsx(n.SpecificButton,{className:"!w-[180px] !h-[40px] !py-[0] mx-auto ",prefix:n.pauseIcon,buttonText:"Pause",buttonFunc:s,resolvedConfig:g,btnSecondary:!0}),l?e.jsx("div",{children:e.jsx(n.SpecificButton,{className:"!w-[180px] !h-[40px] !py-[0] mx-auto",buttonText:"Restart",buttonFunc:o,resolvedConfig:g,btnSecondary:!0})}):u?null:e.jsx(n.SpecificButton,{className:"!w-[180px] !h-[40px] !py-[0] mx-auto !bg-[#ffffff] !text-[#000000] "+(r?"!opacity-50":""),buttonText:v?.(n.LanguageKeys.Start_Scan),buttonFunc:c,disabled:r,resolvedConfig:g})]}),e.jsx("audio",{id:"audioElement",crossOrigin:"anonymous",preload:"auto",style:{position:"absolute",zIndex:-99999},src:`${n.voiceOverAssetsPath}scanAudioInstructions/silence.mp3`})]})}let z=null,F=null,T=null;const j=a.createContext(null);let M,R=null,A=null;var W=a.memo(function({setIsScanLocked:o,resetDetector:t,scanID:i,setIsVideoUploaded:s,setScanFailsError:l,setScanStartTime:u,setScanUniqueKey:c,userDetails:d,config:m}){const{gender:h,heightInCm:g,email:p,shopDomain:f}=d,y=a.useRef(null),v=a.useRef(null),[S,w]=a.useState([]),[b,k]=a.useState(!0),[x,C]=a.useState(!1),[E,N]=a.useState(!1),[P,W]=a.useState(!0),[D,L]=a.useState(!1),H=a.useRef(null),[B,q]=a.useState(""),[Y,G]=a.useState([]),[O,V]=a.useState(""),[U,$]=a.useState(!1),[J,Q]=a.useState(!1),[K,Z]=a.useState(!1),[X,ee]=a.useState([]),[ae,ne]=a.useState(!1),oe=a.useRef(!0),{poseDetector:te}=function(){const[e,n]=a.useState(0),[o,t]=a.useState(0),[i,r]=a.useState(!1),_=a.useRef(0),s=a.useRef(0),l=a.useRef(!0);async function u(){if("undefined"==typeof window||"undefined"==typeof navigator)return!1;try{console.log("Starting TensorFlow preload...");const[e,a,n]=await Promise.all([Promise.resolve().then(function(){return require("./pose-detection.esm-DouwBFG2.js")}),import("@tensorflow/tfjs-core"),import("@tensorflow/tfjs-backend-webgl")]);T=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{F=await T.createDetector(T.SupportedModels.BlazePose,o),console.log("MediaPipe detector created successfully")}catch(e){console.warn("MediaPipe failed, falling back to TFJS runtime:",e),F=await T.createDetector(T.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),z=null,!1}}function c(e){return!(!e||0===e.length)&&22===e.filter(e=>e[2]>.7).length}return a.useEffect(()=>{if(l.current=!0,!F)return z||(z=u()),z.then(e=>{e&&l.current&&r(!0)}),()=>{l.current=!1};r(!0)},[]),a.useEffect(()=>{s.current=e,e>6&&_.current<2&&(t(e=>e+1),n(0))},[e]),a.useEffect(()=>{_.current=o},[o]),{poseDetector:async(e,a)=>{if(!F||!l.current||!a?.current?.video)return;const o=a.current.video;if(!(o.readyState<2))try{const a=await F.estimatePoses(o,{flipHorizontal:!1});if(!a||!a.length)return;const t=a[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||c(t)||n(e=>e+1),1===_.current&&c(t)&&n(e=>e+1),2===_.current&&e()}catch(e){console.error("Pose detection error:",e)}},isLoaded:i,spinPhase:o,resetDetector:()=>{_.current=0,s.current=0,n(0),t(0)},retryLoading:async()=>{F||z||(z=u(),await z&&l.current&&r(!0))}}}(),ie=a.useRef(!0),re=a.useRef(!1),[_e,se]=a.useState([]);let le=0;const{setStartGyro:ue,handleFileUpload:ce,setUploadLoading:de}=a.useContext(j),me=()=>{re.current=!1,clearTimeout(M),H.current&&clearTimeout(H.current),c(n.generateUuid()),l(""),de?.(!1),w([]),k(!0),C(!1),N(!1),W(!0),L(!1),H.current=null,q(""),G([]),V(""),$(!U),ue(!1),_.speechService.stopAudio(),Q(!1),Z(!1),le=0,null!==v.current&&v.current.stop(),X.forEach(e=>{v.current&&v.current.removeEventListener("dataavailable",e)}),ee([]),oe.current=!0,ne(!1),s(!1)},he=a.useCallback(()=>{setTimeout(()=>{k(!1)},1e3)},[]),ge=a.useCallback(()=>{n.rescanSupportCaptureEvent({eventName:`${f}/rescan`,email:p,scanID:i,height:g,gender:h,status:!1}),oe.current=!1,me(),xe()},[me,i,p]),pe=a.useCallback(()=>{oe.current=!1,Z(!0),ne(!1),H.current&&clearTimeout(H.current),v.current&&v.current.pause(),_.speechService.stopAudio(),_.swan.poseDetection.disconnect(),le=0,v.current&&v.current.stop(),X.forEach(e=>{v.current&&v.current.removeEventListener("dataavailable",e)}),ee([]),clearTimeout(M)},[v,X,_.speechService,oe]),fe=a.useCallback(async()=>{oe.current=!0,await _.speechService.playAudio(`${n.voiceOverAssetsPath}SpotOn.mp3`),Z(!1),ne(!1),H.current&&clearTimeout(H.current),C(!1)},[H,_.speechService]),ye=a.useCallback(async()=>{try{R=await _.swan.poseDetection.connect(),r.capture(`${f}/pose_detection_connected`,{scanID:i,email:p,id:R})}catch(e){console.log(e,"while connecting websocket")}},[i,f,p]),ve=a.useCallback(({data:e})=>{e&&e.size>0&&oe.current&&(w(a=>a.concat(e)),!re.current&&y.current&&(re.current=!0,te(()=>{fe(),n.handleScanTimeCapture({eventName:`${f}/tensorFlow`,scanID:i,email:p,message:"recording stopped by tensorflow "})},y)))},[fe,n.handleScanTimeCapture,f,i,p,y]),Se=a.useCallback(async()=>{Y.length>0&&oe.current&&(await _.speechService.playAudio(n.voiceOverAssetsPath+Y[Y.length-1]),oe.current&&(M=setTimeout(Se,2e3)))},[Y,oe]),we=a.useCallback(()=>{v&&v.current&&v.current.stop(),C(!0);try{if(y&&y.current&&y.current.stream){const e={mimeType:_e[0]};v.current=new MediaRecorder(y.current.stream,e),v.current.addEventListener("dataavailable",ve),ee([...X,ve]),v.current.start(1e3),W(!1)}}catch(e){console.log("error while using media recorder",e)}},[y,_e,ve,X]),be=a.useCallback(async()=>{H.current&&clearTimeout(H.current),we(),oe.current&&(H.current=setTimeout(async()=>{oe.current&&(await _.speechService.playAudio(`${n.voiceOverAssetsPath}SpotOn.mp3`),C(!1))},15e3)),N(!0),oe.current&&await _.speechService.playAudio(`${n.voiceOverAssetsPath}Spin.mp3`)},[we,oe,_.speechService]),ke=a.useCallback(({data:e})=>{e.size>0&&_.swan.poseDetection.connected()&&(_.swan.poseDetection.poseStatus(async e=>{if(e&&e.audio&&e.audio.length>0){const a=document.querySelector("#audioElement");!0===e.status&&e.sid===R?le<2?(0===le&&a?.paused&&await _.speechService.playAudio(n.voiceOverAssetsPath+e.audio),le+=1):(V(e.audio),clearTimeout(M),_.swan.poseDetection.disconnect(),setTimeout(be,1e3)):(le=0,!a?.paused||A&&A?.audioName===e.audio?A?.audioName===e.audio&&a?.paused&&(A&&A.no_of_times_skipped>=A.skipCount?(A.no_of_times_skipped=0,_.speechService.playAudio(n.voiceOverAssetsPath+e.audio)):A&&(A.no_of_times_skipped+=1)):(A={skipCount:2,no_of_times_skipped:0,audioName:e.audio},_.speechService.playAudio(n.voiceOverAssetsPath+e.audio)))}}),y?.current&&null!==y.current.getScreenshot()&&_.swan.poseDetection.videoEmit({image:y.current.getScreenshot()||"",scanId:i}))},[y,i,_.swan,R,le,be,_.speechService]),xe=a.useCallback(async()=>{L(!0),ue(!0),ie.current&&(ie.current=!1,n.handleScanTimeCapture({eventName:"scan started",scanID:i,status:"success",email:p})),u(n.getCurrentTimeInSeconds()),k(!0),oe.current&&await _.speechService.playAudio(`${n.voiceOverAssetsPath}StartScan.mp3`),oe.current&&await _.speechService.playAudio(`${n.voiceOverAssetsPath}LiftArmsAndHoldAtHip.mp3`),oe.current&&(L(!1),C(!0),Q(!0),ne(!0),he());try{if(y&&y.current&&y.current.stream&&oe.current){const e={mimeType:_e[0]};oe.current&&(v.current=new MediaRecorder(y.current.stream,e)),oe.current&&v.current&&v.current.addEventListener("dataavailable",ke),ee([...X,ke]),v.current&&v.current.start(1e3),W(!1),oe.current&&(M=setTimeout(Se,2e3))}}catch(e){console.log("error ----------",e)}},[y,_e,ke,X,Se,oe]);return a.useEffect(()=>(f&&(o(!0),ye()),()=>{R&&(_.swan.poseDetection.disconnect(),r.capture(`${f}/pose_detection_disconnected`,{scanID:i,email:p,id:R})),X.forEach(e=>{v?.current?.removeEventListener("dataavailable",e)})}),[U,f]),a.useEffect(()=>{Y.push(B)},[B]),a.useEffect(()=>{G([])},[O]),a.useEffect(()=>{const e=S.length&&S.length>0;P||!e||x||!oe.current||K||v&&v.current&&(x||(v.current.stop(),W(!0)))},[P,x,S,K]),a.useEffect(()=>{const e=S.length&&S.length>0;if(P||!e||x)console.log("No video found to upload");else if(v&&v.current&&oe.current&&!K&&!x){const e=new File(S,`${i}.webm`,{type:"video/webm"});de?.(!0),l(""),ce?.(e)}},[P,x,S,K,v,oe]),a.useEffect(()=>{if("undefined"!=typeof MediaRecorder){const e=n.videoTypes.filter(e=>MediaRecorder.isTypeSupported(e));se(e)}},[]),a.useEffect(()=>{me()},[]),e.jsx(I,{resetDetector:t,handleShowStreamCamera:me,loadingCam:b,handlePause:pe,showRestart:J,pause:K,handleReScan:ge,recordingStarted:x,isScanning:D,startSendingVideoFrames:xe,faceDone:E,stopRecording:fe,showPause:ae,webcamRef:y,handleUserMedia:he,config:m})});function D({scanID:n,userDetails:o,setIsVideoUploaded:t,setScanFailsError:i,setScanStartTime:r,setScanUniqueKey:_,config:s}){const[l,u]=a.useState(90),[c,d]=a.useState(0),[h,g]=a.useState(null),[p,f]=a.useState(!1),[y,v]=a.useState(0),S=a.useRef([]),[w,b]=a.useState(!1),k=l-c,x=k>=80&&k<=95;a.useEffect(()=>{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)),u(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})}},[]),a.useEffect(()=>{if(S.current=[...S.current.slice(-4),k],S.current.length>=5){const e=Math.max(...S.current)-Math.min(...S.current);v(x&&e<2?e=>Math.min(100,e+10):e=>Math.max(0,e-20))}x||null===h&&!p||E()},[k,x,h,p]),a.useEffect(()=>{y>=100&&null===h&&!p&&C(),y<50&&null!==h&&E()},[y,h,p]);const C=()=>{g(3);const e=setInterval(()=>{g(a=>null===a||a<=1?(clearInterval(e),f(!0),null):a-1)},1e3)},E=()=>{g(null),w||f(!1)};return e.jsx(m,{angle:k,countdown:h,isScanning:p,isInTargetRange:x,stabilityScore:y,config:s,children:p&&e.jsx(W,{setIsScanLocked:b,resetDetector:()=>{u(90),d(0),g(null),f(!1),v(0),b(!1),S.current=[]},scanID:n,userDetails:o,setIsVideoUploaded:t,setScanFailsError:i,setScanStartTime:r,setScanUniqueKey:_,config:s})})}function L({message:o,config:t}){const[i]=a.useState(!0),{translate:r}=a.useContext(N)||{};return e.jsx(s,{open:i,className:"confirm-modal",children:e.jsx("div",{className:"modal-main",children:e.jsx("div",{className:"text-center",children:o?e.jsxs(e.Fragment,{children:[e.jsx("h2",{style:{fontFamily:t?.style?.heading?.headingFontFamily||"SeriouslyNostalgic Fn",fontSize:t?.style?.heading?.headingFontSize||"32px",color:t?.style?.heading?.headingColor||"#000",fontWeight:t?.style?.heading?.headingFontWeight||"normal"},children:"Seems camera already in use"}),e.jsxs("p",{className:"mt-[0.5rem] text-sm",style:{fontFamily:t?.style?.base?.baseFontFamily||"Inter, sans-serif",fontSize:t?.style?.base?.baseFontSize||"16px",color:t?.style?.base?.baseTextColor||"#000"},children:["Can you try closing the browser/app that is using the camera and try again here."," "]})]}):e.jsxs(e.Fragment,{children:[e.jsx("h2",{style:{fontFamily:t?.style?.heading?.headingFontFamily||"SeriouslyNostalgic Fn",fontSize:t?.style?.heading?.headingFontSize||"32px",color:t?.style?.heading?.headingColor||"#000",fontWeight:t?.style?.heading?.headingFontWeight||"normal"},children:r?.(n.LanguageKeys.Please_check_your_setting_for_camera_permission)}),e.jsx("p",{className:"mt-[0.5rem] text-sm",style:{fontFamily:t?.style?.base?.baseFontFamily||"Inter, sans-serif",fontSize:t?.style?.base?.baseFontSize||"16px",color:t?.style?.base?.baseTextColor||"#000"},children:`${r?.(n.LanguageKeys.Settings)} > ${n.getBrowserName()} > ${r?.(n.LanguageKeys.Enable_the_camera_permissions)}`})]})})})})}function H({setShowDrawer:o,config:i,loader:r}){const[s,l]=a.useState({disabled:!1,message:""}),[u,c]=a.useState(!0),d=a.useRef(null),m=a.useCallback(async()=>{const e=await n.checkCameraPermission();l(e),c(!1)},[]);return a.useEffect(()=>{m()},[]),u?e.jsx(_.LoadingScreen,{url:r}):s?.disabled?e.jsx(L,{config:i,message:s?.message}):e.jsx(t,{audio:!1,ref:d,screenshotQuality:1,videoConstraints:n.videoConstraints,mirrored:!0,onUserMedia:()=>o?.(!0),screenshotFormat:"image/jpeg",style:{position:"relative",top:0,bottom:0,zIndex:0,width:"100%",height:"100%",objectFit:"cover"}})}function B({link:o,onReady:t,wrapperClassName:i="[&_video]:rounded-t-[20px] w-full h-full"}){const r=a.useRef(null),_=a.useRef(null);let s={autoplay:!0,controls:!1,responsive:!0,fluid:!0,muted:!0,navigationUI:"hide",preload:"metadata",poster:n.videoPoster};return a.useEffect(()=>{if(!_.current&&o&&r?.current){const e=u(r.current,{...s});e.ready(()=>{_.current=e;const a={...s,sources:[{src:o,type:"application/x-mpegURL"}]};e.autoplay(a.autoplay),e.src(a.sources),t?.(e)})}},[o,r]),a.useEffect(()=>{const e=_.current;return()=>{e&&!e.isDisposed()&&(e.dispose(),_.current=null)}},[_]),e.jsx("div",{className:i,children:e.jsx("video",{ref:r,muted:!0,className:"video-js",playsInline:!0,onDrag:e=>e.preventDefault()})})}function q({scanFailsError:o,serverAtCapacity:t=!1,onNext:r,gender:_,setScanUniqueKey:l,resolvedConfig:u,setIsVideoUploaded:c}){const{translate:d}=a.useContext(N)||{},[m,h]=a.useState(!1),g=()=>{h(!m)};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-col h-full max-w-[28rem] mx-auto w-full rounded-t-[20px] overflow-y-auto",style:{background:u?.style?.base?.backgroundColor},children:[e.jsx("div",{className:"w-full max-w-[28rem] mx-auto pt-[1rem] px-[1rem]",children:e.jsx(n.Header,{noTitle:!0,resolvedConfig:u})}),e.jsxs("div",{className:"flex-1",children:[o&&e.jsxs("div",{className:"px-[1rem]",children:[e.jsx("h2",{className:"text-center",style:{fontFamily:u?.style?.heading?.headingFontFamily||"SeriouslyNostalgic Fn",fontSize:u?.style?.heading?.headingFontSize||"32px",color:u?.style?.heading?.headingColor||"#000",fontWeight:u?.style?.heading?.headingFontWeight||"normal"},children:"There was an issue with your scan"}),e.jsx("p",{style:{fontFamily:u?.style?.base?.baseFontFamily||"Inter, sans-serif",fontSize:u?.style?.base?.baseFontSize||"16px",color:u?.style?.base?.baseTextColor||"#1E1E1E"},children:"Reason:"}),e.jsx("p",{style:{fontFamily:u?.style?.base?.baseFontFamily||"Inter, sans-serif",fontSize:u?.style?.base?.baseFontSize||"16px",color:u?.style?.base?.baseTextColor||"#1E1E1E"},children:n.handleErrorMessage(o)}),e.jsx("img",{className:"my-[0.5rem] aspect-[2/1.4] w-full object-cover",onClick:g,src:n.VIDEO_POSTER_GENDER_BASED[_],alt:"icon"})]}),t&&e.jsxs("div",{className:"p-[1rem] text-center",children:[e.jsxs("h3",{style:{fontFamily:u?.style?.heading?.headingFontFamily||"SeriouslyNostalgic Fn",fontSize:u?.style?.heading?.headingFontSize||"32px",color:u?.style?.heading?.headingColor||"#000",fontWeight:u?.style?.heading?.headingFontWeight||"normal"},children:[d?.(n.LanguageKeys.Scan_s)," ",e.jsx("span",{children:d?.(n.LanguageKeys.vision_model)})," ",d?.(n.LanguageKeys.is_at_capacity)]}),e.jsx("p",{className:"text-base mt-[0.5rem]",style:{fontFamily:u?.style?.base?.baseFontFamily||"Inter, sans-serif",fontSize:u?.style?.base?.baseFontSize||"16px",color:u?.style?.base?.baseTextColor||"#1E1E1E"},children:d?.(n.LanguageKeys.We_are_sorry_about_this_We_are_working_hard_to_add_capacity_Please_try_again_soon)})]})]}),o&&e.jsx("div",{className:"p-[1rem] flex gap-[0.5rem]",children:e.jsx(n.SpecificButton,{disabled:!1,buttonText:"Scan again",className:"!shadow-none",buttonFunc:()=>{r?r?.():l(n.generateUuid()),c(!1)},resolvedConfig:u})})]}),m&&e.jsxs(s,{className:"w-screen h-screen video-modal",onClose:g,open:m,children:[e.jsx("div",{className:"flex justifyEnd ",children:e.jsx("span",{className:"closeBtn",onClick:g,children:e.jsx(i,{className:"absolute right-[8px] top-[8px] text-white z-[9]"})})}),e.jsx("div",{className:"aspect-video object-cover rounded-[20px] ",children:e.jsx(B,{link:_?n.GENDER[_].PRE_LINK:n.GENDER.male.PRE_LINK,wrapperClassName:"w-screen h-screen fixed top-[0] left-[0]"})})]})]})}function Y({scanId:o,userDetails:t,config:i,isFaceScan:s,isVideoUploadedCorrect:u,isMeasurementAvailable:d,onComplete:m,isSuccess:h}){const{gender:g,shopDomain:p,heightInCm:f,deviceFocalLength:y,userName:v,email:S,scanType:w}=t,b=[n.CLOTHING_CUSTOM_SCAN,n.CLOTHING_BANNER_SCAN,n.CLOTHING_CUSTOM_FIT_SCAN].includes(w),[k,x]=a.useState(!0),C=a.useCallback(async()=>{try{b&&await _.swan.auth.addUser({scanId:o,email:S,name:v,gender:g,height:f}),r.posthog.capture(p,{scanID:o,email:S,height:f,focalLength:y,clothesFit:"0",gender:g})}catch(e){console.log(e)}},[b]);a.useEffect(()=>{u&&C()},[u]);const E=h||(s?d&&u:u||d);return e.jsx(c,{className:"flex h-full w-full flex-col ",children:e.jsxs("div",{className:"h-full w-full flex-col items-center justify-center flex",children:[e.jsx(H,{loader:i?.loader,setShowDrawer:x}),e.jsx(l.Drawer,{open:k,onClose:(e,a)=>{},className:"camera-drawer",anchor:"bottom",children:e.jsx("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.jsxs("div",{className:"w-full h-full flex flex-col",children:[e.jsx(n.Header,{title:"Your measurements are being taken",resolvedConfig:i}),e.jsx("div",{className:"flex items-center justify-center flex-1",children:e.jsx("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.jsx("source",{src:g===n.GenderType.Male?n.maleMeasurementProgress:n.measurementProgress,type:"video/mp4"})})}),E&&e.jsx(n.SpecificButton,{resolvedConfig:i,className:"!w-[180px] mx-auto",buttonText:"Next",buttonFunc:m&&m})]})})})]})})}exports.BodyScan=({userDetails:o,language:t=n.PreferredLanguage.English,config:i,onRetry:s,onScanSuccess:u,onComplete:c,onScanError:d,isError:m,isSuccess:h})=>{const{gender:g,scanType:p,shopDomain:f,heightInCm:v,email:S,deviceFocalLength:w,deviceModelName:b,callbackUrl:k}=o,[x,C]=a.useState(!1),[E,I]=a.useState(!1),[z,F]=a.useState(!1),[T,M]=a.useState({disabled:!1,message:""}),[R,A]=a.useState(""),[W,B]=a.useState(!1),[G,O]=a.useState(!0),[V,U]=a.useState(!1),[$,J]=a.useState(""),[Q,K]=a.useState(n.getCurrentTimeInSeconds()),{gyroData:Z}=function(e){const[n,o]=a.useState([]),[t,i]=a.useState(!1),r=a.useCallback(e=>{try{const{alpha:a,beta:n,gamma:t}=e;o(e=>[...e,{alpha:a?.toString()||void 0,beta:n?.toString()||void 0,gamma:t?.toString()||void 0,timestamp:(new Date).toISOString()}])}catch(e){console.log(e)}},[]),_=a.useCallback(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 a.useEffect(()=>(e&&t?window.addEventListener("deviceorientation",r):o([]),()=>{window.removeEventListener("deviceorientation",r)}),[e,t,r]),a.useEffect(()=>{e&&_()},[e,_]),{gyroData:n}}(V),{setPreferredLanguage:X}=a.useContext(N)||{},ee=n.useLocalConfig(i),ae=a.useCallback(()=>{J(n.generateUuid()),A(""),C(!1),B(!1)},[]),ne=e=>{d({...e,message:n.handleErrorMessage(e)}),oe(),F(!1),A(e),I(!1),n.handleScanTimeCapture({eventName:`${f}/measurement_failed/fit-view`,scanID:$,status:"failed",email:S,message:n.handleErrorMessage(e)}),Q&&n.handleScanTimeCapture({eventName:`${f}/scan_completion_time`,scanID:$,status:"failed",completionTime:n.getCurrentTimeInSeconds()-Q,email:S})},oe=()=>{K(null),J("")},te=a.useCallback(async e=>{if(e&&"success"===e?.scanStatus&&"intermediate"===e?.resultType&&200===e?.code)return n.handleScanTimeCapture({eventName:`${f}/measurement_success/intermediate`,scanID:$,status:"success",email:S}),void u?.(e);oe();const a=$;F(!0),n.handleScanTimeCapture({eventName:`${f}/measurement_success/fit-view`,scanID:a,status:"success",email:S}),Q&&n.handleScanTimeCapture({eventName:`${f}/scan_completion_time`,scanID:a,status:"success",completionTime:n.getCurrentTimeInSeconds()-Q,email:S})},[p,f,$]),ie=e=>{F(!1),A(""),I(!1),_.swan.measurement.handleMeasurementSocket({scanId:e||$,onOpen:()=>{n.handleWebSocketCapture({eventName:`${f}/webSocket`,scanID:$,connection:"open",type:"measurement_recommendation",email:S})},onClose:()=>n.handleWebSocketCapture({eventName:`${f}/webSocket`,scanID:$,connection:"close",type:"measurement_recommendation",email:S}),onError:e=>{ne(e),n.handleWebSocketCapture({eventName:`${f}/webSocket`,scanID:$,connection:"error",type:"measurement_recommendation",email:S})},onSuccess:e=>{n.handleWebSocketCapture({eventName:`${f}/webSocket`,scanID:$,connection:"success",type:"measurement_recommendation",email:S}),te(e)}})},re=a.useCallback(async e=>{const a=n.createObjectMetadataArray({gender:g,focal_length:`${w}`,height:`${v}`,customer_store_url:f,clothes_fit:"0",scan_type:p,callback_url:k||"https://example.com/webhook"});n.handleScanTimeCapture({eventName:`${f}/body_scan_meta_data`,scanID:$,email:S,data:JSON.stringify(a)});try{await _.swan.fileUpload.uploadFileFrontend({file:e,arrayMetaData:a,scanId:$,email:S}),await _.swan.fileUpload.setDeviceInfo({model:b,detection:"manual",gyro:Z,scanId:$}),console.log("video successfully uploaded"),B(!1),n.handleScanTimeCapture({eventName:`${f}/scan_success`,scanID:$,status:"success",email:S,data:JSON.stringify(a)}),n.handleScanTimeCapture({eventName:"scan finished",scanID:$,status:"success",email:S}),K(n.getCurrentTimeInSeconds()),setTimeout(()=>{B(!0)},3e3)}catch(e){n.handleScanTimeCapture({eventName:"scan finished",scanID:$,status:"failed",email:S,message:n.handleErrorMessage(e)}),n.handleScanTimeCapture({eventName:`${f}/scan_failed`,scanID:$,status:"failed",email:S,message:n.handleErrorMessage(e),data:JSON.stringify(a)}),A(n.handleErrorMessage(e)),B(!1),console.log(e,"video upload failed")}finally{U(!1)}},[$,Z]),_e=a.useCallback(async e=>{try{const a=await _.swan.measurement.getMeasurementResult(e),o=a?.data?.isMeasured,t=Q||n.getCurrentTimeInSeconds(),i=n.getCurrentTimeInSeconds(),r=300;if(O(!1),!1===o)return oe(),void J(n.generateUuid());C(!0),!0===o?await te(null):null===o&&t>i+r?ne(a?.data?.error):ie(e)}catch(e){console.log(e),oe(),J(n.generateUuid()),C(!1)}},[ne,te,J]),se=a.useCallback(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 n.checkCameraPermission();if(e.disabled)n.handleScanTimeCapture({eventName:`${f}/camera_activation`,scanID:$,status:"failed",email:S}),O(!1);else{$?_e($):O(!1),n.handleScanTimeCapture({eventName:`${f}/camera_activation`,scanID:$,status:"success",email:S})}M(e),A(""),B(!1)},[_e,S,$,J,f]);return a.useEffect(()=>{X?.(t),r.init(n.posthogPublicKey,{api_host:n.posthogPublicHost}),r.capture("$pageview")},[]),a.useEffect(()=>{m||h||f&&se()},[f,v,m,h]),a.useEffect(()=>{m||h||W&&f&&$&&ie()},[W,f,$,m,h]),m?e.jsxs(P,{children:[e.jsx(H,{}),e.jsx(l.Drawer,{anchor:"bottom",open:!0,className:"camera-drawer",onClose:(e,a)=>{},children:e.jsx(q,{scanFailsError:R||m,onNext:()=>{},setScanUniqueKey:J,gender:g,resolvedConfig:ee,setIsVideoUploaded:B})})]}):h?e.jsx(Y,{isFaceScan:!1,scanId:$,isMeasurementAvailable:z,userDetails:o,isVideoUploadedCorrect:E,config:ee,isSuccess:h}):G?e.jsx("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.jsx(_.LoadingScreen,{url:ee?.loader})}):T.disabled?e.jsx(P,{children:e.jsx(L,{})}):x||R?!x&&!z||R?e.jsxs(P,{children:[e.jsx(H,{}),e.jsx(l.Drawer,{anchor:"bottom",open:!0,className:"camera-drawer",onClose:(e,a)=>{},children:e.jsx(q,{scanFailsError:R,onNext:()=>{s?.(),ae()},setScanUniqueKey:J,gender:g,resolvedConfig:ee,setIsVideoUploaded:B})})]}):e.jsx(Y,{isFaceScan:!1,scanId:$,isMeasurementAvailable:z,userDetails:o,onComplete:c,isVideoUploadedCorrect:E,config:ee}):e.jsx(j.Provider,{value:{setStartGyro:U,handleFileUpload:re,setUploadLoading:C},children:e.jsx(y,{children:e.jsx(P,{children:e.jsx(D,{config:ee,scanID:$,userDetails:o,setIsVideoUploaded:B,setScanFailsError:A,setScanStartTime:K,setScanUniqueKey:J})})})})};
1
+ "use strict";var e=require("react/jsx-runtime"),t=require("react"),s=require("./constants-Df5S1CyA.js"),a=require("clsx"),n=require("react-webcam"),r=require("@mui/icons-material/Close"),o=require("posthog-js"),i=require("./LoadingScreen-ygW5w9-T.js"),c=require("@mui/material/Dialog"),l=require("@mui/material"),u=require("video.js"),d=require("@mui/material/Box");require("tailwind-merge"),require("mic-check"),require("uuid"),require("@swan-admin/swan-ai-measurements");var m=t.memo(function({size:t=16}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("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.jsx("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.jsx("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.jsx("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.jsx("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 f=t.memo(function({angle:n,countdown:r,isScanning:o,isInTargetRange:i,stabilityScore:c,children:l,config:u}){const{translate:d}=t.useContext(s.LanguageContext)||{},f=t.useCallback(()=>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=t.useMemo(()=>{if(o)return u?.style?.angleDetector?.successAngleBackground||"#4f46e5";const e=f();if(0===e)return u?.style?.angleDetector?.successAngleLowBackground||"#ffffff";if(100===e)return u?.style?.angleDetector?.successAngleBackground||"#4f46e5";return`rgb(${Math.round(255-e/100*116)}, ${Math.round(255-e/100*163)}, ${Math.round(255-e/100*9)})`},[o,f]),g=t.useCallback((e,t)=>t>70?e?`text-[${u?.style?.angleDetector?.successAngleTextLightColor}]/70`:`text-[${u?.style?.angleDetector?.successAngleTextLightColor}]`:e?`text-[${u?.style?.angleDetector?.successAngleTextLightColor}]/40`:`text-[${u?.style?.angleDetector?.successAngleTextDarkColor}]/70`,[]),p=t.useCallback((e=!1)=>{const t=f();return o?`text-[${u?.style?.angleDetector?.successAngleTextLightColor}]`:g(e,t)},[o,f]),x=t.useCallback((e,t)=>t>70||e?u?.style?.angleDetector?.successAngleTextLightColor:u?.style?.angleDetector?.successAngleTextDarkColor,[]),y=t.useCallback((e=!1)=>{const t=f();return o?u?.style?.angleDetector?.successAngleTextLightColor:x(e,t)},[o,f]),v=r;function S(){document.documentElement.style.setProperty("--real-vh",window.innerHeight+"px")}return S(),window.addEventListener("resize",S),e.jsxs("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.jsx("div",{className:"flex justify-start fixed top-[.5rem] max-w-[28rem] mx-auto w-full px-[1rem]",children:e.jsx("div",{className:"flex justify-start ",children:e.jsx(s.Header,{noTitle:!0,resolvedConfig:u})})}),null!==v?e.jsx("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 ${y()}`},children:e.jsx("div",{className:`text-[3rem] font-bold text-[${y()}]`,style:{fontFamily:u?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:v})}):o?e.jsxs("div",{className:"relative flex flex-col items-center justify-center",children:[e.jsx("div",{className:"relative flex h-16 w-16 items-center justify-center rounded-[9999px] border-2 bg-[#fff]/30 border-[#fff]",children:e.jsx("div",{className:"h-4 w-4 rounded-[9999px] animate-pulse bg-[#fff]/80"})}),l]}):e.jsxs("div",{className:a("relative flex h-[4rem] w-[4rem] items-center justify-center rounded-[9999px] ",i?"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 ${y()}`},children:[e.jsx("div",{className:`h-[1rem] w-[1rem] rounded-[9999px] bg-[${y()}]/80`}),e.jsxs("div",{className:a("mt-[.5rem] w-[180px] flex-col flex items-center absolute top-[60px]",p()),children:[e.jsx(m,{size:30}),e.jsxs("p",{style:{fontFamily:u?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:[" ",d?.(s.LanguageKeys.startLevelCheck),e.jsx("br",{})]})]})]}),null!==v&&e.jsx("div",{className:"absolute bottom-[8rem] text-center",children:e.jsx("div",{className:a("text-sm font-medium px-4 py-1.5 bg-black/20 rounded-[9999px] mt-8",p()),style:{fontFamily:u?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:d?.(s.LanguageKeys.leavePhone)})}),i&&null===v&&!o&&e.jsx("div",{className:"absolute bottom-[8rem] w-[12rem]",children:e.jsx("div",{className:`h-[.375rem] w-full bg-[${y()}]/20 rounded-[9999px] overflow-hidden`,style:{backgroundColor:`${y()}33`},children:e.jsx("div",{className:`h-full bg-[${y()}]/70 transition-all duration-300 rounded-[9999px]`,style:{width:`${n}%`,backgroundColor:`${y()}B3`}})})}),null===v&&!o&&e.jsx("div",{className:"absolute bottom-[5rem] text-center",children:e.jsxs("div",{className:a("text-[1.5rem] font-light",p()),children:[Math.round(n),"°"]})}),null===v&&!o&&e.jsx("div",{className:"absolute bottom-[2rem] text-center max-w-[20rem] mx-auto",children:e.jsx("div",{className:a("text-[.75rem] opacity-50",p()),style:{fontFamily:u?.style?.base?.baseFontFamily||"Inter, sans-serif"},children:d?.(s.LanguageKeys.placePhoneUpright)})})]})});const h="DESKTOP",g="TAB",p="MOBILE",x=t.createContext(void 0);function y({children:s}){const[a,n]=t.useState([window?.innerWidth,window?.innerHeight]),[r,o]=t.useState(!1),i=()=>{n([window?.innerWidth,window?.innerHeight])};t.useEffect(()=>{i()},[]),t.useLayoutEffect(()=>(window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)),[i]);let c=h;a[0]>768&&a[0]<1024&&(c=g),a[0]<768&&(c=p);const l=t.useMemo(()=>({size:a,setSize:n,clearInputs:r,setClearInputs:o,media:c}),[a,r,c]);return e.jsx(x.Provider,{value:l,children:s})}function v({handleShowStreamCamera:a,loadingCam:o,handleUserMedia:i,handlePause:c,pause:l,recordingStarted:u,startSendingVideoFrames:d,showPause:m,webcamRef:f,resetDetector:h,config:g}){const{media:y}=t.useContext(x)||{},{translate:v}=t.useContext(s.LanguageContext)||{};return e.jsxs("div",{className:"App w-screen h-[100vh] relative ",children:[e.jsx("span",{onClick:()=>{a(),h()},className:"fixed right-[20px] top-[20px] z-[999]",children:e.jsx(r,{className:"text-[#fff]"})}),e.jsx("div",{className:"w-full h-full overflow-hidden ",children:y===p&&e.jsx(n,{audio:!1,ref:f,screenshotQuality:1,videoConstraints:s.videoConstraints,mirrored:!0,screenshotFormat:"image/jpeg",onUserMedia:i,style:{position:"fixed",top:0,bottom:0,zIndex:0,width:"100%",height:"100%",objectFit:"cover"}})}),e.jsxs("div",{className:"fixed bottom-[30px] w-full z-[999] flex flex-col gap-4 items-center justify-center",children:[m&&e.jsx(s.SpecificButton,{className:"!w-[180px] !h-[40px] !py-[0] mx-auto ",prefix:s.pauseIcon,buttonText:v?.(s.LanguageKeys.pause),buttonFunc:c,resolvedConfig:g,btnSecondary:!0}),l?e.jsx("div",{children:e.jsx(s.SpecificButton,{className:"!w-[180px] !h-[40px] !py-[0] mx-auto",buttonText:v?.(s.LanguageKeys.restart),buttonFunc:a,resolvedConfig:g,btnSecondary:!0})}):u?null:e.jsx(s.SpecificButton,{className:"!w-[180px] !h-[40px] !py-[0] mx-auto !bg-[#ffffff] !text-[#000000] "+(o?"!opacity-50":""),buttonText:v?.(s.LanguageKeys.startScan),buttonFunc:d,disabled:o,resolvedConfig:g})]}),e.jsx("audio",{id:"audioElement",crossOrigin:"anonymous",preload:"auto",style:{position:"absolute",zIndex:-99999},src:`${s.voiceOverAssetsPath}scanAudioInstructions/silence.mp3`})]})}let S=null,b=null,C=null;const w=t.createContext(null);let j,N=null,k=null;var F=t.memo(function({setIsScanLocked:a,resetDetector:n,scanID:r,setIsVideoUploaded:c,setScanFailsError:l,setScanStartTime:u,setScanUniqueKey:d,userDetails:m,config:f}){const{gender:h,heightInCm:g,email:p,shopDomain:x}=m,y=t.useRef(null),F=t.useRef(null),[D,E]=t.useState([]),[I,T]=t.useState(!0),[L,M]=t.useState(!1),[P,_]=t.useState(!1),[A,$]=t.useState(!0),[U,z]=t.useState(!1),R=t.useRef(null),[O,q]=t.useState(""),[K,B]=t.useState([]),[W,V]=t.useState(""),[H,G]=t.useState(!1),[J,Q]=t.useState(!1),[Y,X]=t.useState(!1),[Z,ee]=t.useState([]),[te,se]=t.useState(!1),ae=t.useRef(!0),{poseDetector:ne}=function(){const[e,s]=t.useState(0),[a,n]=t.useState(0),[r,o]=t.useState(!1),i=t.useRef(0),c=t.useRef(0),l=t.useRef(!0);async function u(){if("undefined"==typeof window||"undefined"==typeof navigator)return!1;try{console.log("Starting TensorFlow preload...");const[e,t,s]=await Promise.all([Promise.resolve().then(function(){return require("./pose-detection.esm-DouwBFG2.js")}),import("@tensorflow/tfjs-core"),import("@tensorflow/tfjs-backend-webgl")]);C=e,await t.setBackend("webgl"),await t.ready(),console.log("TensorFlow backend ready (WebGL)");const a={runtime:"mediapipe",modelType:"full",solutionPath:"https://cdn.jsdelivr.net/npm/@mediapipe/pose"};try{b=await C.createDetector(C.SupportedModels.BlazePose,a),console.log("MediaPipe detector created successfully")}catch(e){console.warn("MediaPipe failed, falling back to TFJS runtime:",e),b=await C.createDetector(C.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),S=null,!1}}function d(e){return!(!e||0===e.length)&&22===e.filter(e=>e[2]>.7).length}return t.useEffect(()=>{if(l.current=!0,!b)return S||(S=u()),S.then(e=>{e&&l.current&&o(!0)}),()=>{l.current=!1};o(!0)},[]),t.useEffect(()=>{c.current=e,e>6&&i.current<2&&(n(e=>e+1),s(0))},[e]),t.useEffect(()=>{i.current=a},[a]),{poseDetector:async(e,t)=>{if(!b||!l.current||!t?.current?.video)return;const a=t.current.video;if(!(a.readyState<2))try{const t=await b.estimatePoses(a,{flipHorizontal:!1});if(!t||!t.length)return;const n=t[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!==i.current||d(n)||s(e=>e+1),1===i.current&&d(n)&&s(e=>e+1),2===i.current&&e()}catch(e){console.error("Pose detection error:",e)}},isLoaded:r,spinPhase:a,resetDetector:()=>{i.current=0,c.current=0,s(0),n(0)},retryLoading:async()=>{b||S||(S=u(),await S&&l.current&&o(!0))}}}(),re=t.useRef(!0),oe=t.useRef(!1),[ie,ce]=t.useState([]);let le=0;const{setStartGyro:ue,handleFileUpload:de,setUploadLoading:me}=t.useContext(w),fe=()=>{oe.current=!1,clearTimeout(j),R.current&&clearTimeout(R.current),d(s.generateUuid()),l(""),me?.(!1),E([]),T(!0),M(!1),_(!1),$(!0),z(!1),R.current=null,q(""),B([]),V(""),G(!H),ue(!1),i.speechService.stopAudio(),Q(!1),X(!1),le=0,null!==F.current&&F.current.stop(),Z.forEach(e=>{F.current&&F.current.removeEventListener("dataavailable",e)}),ee([]),ae.current=!0,se(!1),c(!1)},he=t.useCallback(()=>{setTimeout(()=>{T(!1)},1e3)},[]),ge=t.useCallback(()=>{s.rescanSupportCaptureEvent({eventName:`${x}/rescan`,email:p,scanID:r,height:g,gender:h,status:!1}),ae.current=!1,fe(),je()},[fe,r,p]),pe=t.useCallback(()=>{ae.current=!1,X(!0),se(!1),R.current&&clearTimeout(R.current),F.current&&F.current.pause(),i.speechService.stopAudio(),i.swan.poseDetection.disconnect(),le=0,F.current&&F.current.stop(),Z.forEach(e=>{F.current&&F.current.removeEventListener("dataavailable",e)}),ee([]),clearTimeout(j)},[F,Z,i.speechService,ae]),xe=t.useCallback(async()=>{ae.current=!0,await i.speechService.playAudio(`${s.voiceOverAssetsPath}SpotOn.mp3`),X(!1),se(!1),R.current&&clearTimeout(R.current),M(!1)},[R,i.speechService]),ye=t.useCallback(async()=>{try{N=await i.swan.poseDetection.connect(),o.capture(`${x}/pose_detection_connected`,{scanID:r,email:p,id:N})}catch(e){console.log(e,"while connecting websocket")}},[r,x,p]),ve=t.useCallback(({data:e})=>{e&&e.size>0&&ae.current&&(E(t=>t.concat(e)),!oe.current&&y.current&&(oe.current=!0,ne(()=>{xe(),s.handleScanTimeCapture({eventName:`${x}/tensorFlow`,scanID:r,email:p,message:"recording stopped by tensorflow "})},y)))},[xe,s.handleScanTimeCapture,x,r,p,y]),Se=t.useCallback(async()=>{K.length>0&&ae.current&&(await i.speechService.playAudio(s.voiceOverAssetsPath+K[K.length-1]),ae.current&&(j=setTimeout(Se,2e3)))},[K,ae]),be=t.useCallback(()=>{F&&F.current&&F.current.stop(),M(!0);try{if(y&&y.current&&y.current.stream){const e={mimeType:ie[0]};F.current=new MediaRecorder(y.current.stream,e),F.current.addEventListener("dataavailable",ve),ee([...Z,ve]),F.current.start(1e3),$(!1)}}catch(e){console.log("error while using media recorder",e)}},[y,ie,ve,Z]),Ce=t.useCallback(async()=>{R.current&&clearTimeout(R.current),be(),ae.current&&(R.current=setTimeout(async()=>{ae.current&&(await i.speechService.playAudio(`${s.voiceOverAssetsPath}SpotOn.mp3`),M(!1))},15e3)),_(!0),ae.current&&await i.speechService.playAudio(`${s.voiceOverAssetsPath}Spin.mp3`)},[be,ae,i.speechService]),we=t.useCallback(({data:e})=>{e.size>0&&i.swan.poseDetection.connected()&&(i.swan.poseDetection.poseStatus(async e=>{if(e&&e.audio&&e.audio.length>0){const t=document.querySelector("#audioElement");!0===e.status&&e.sid===N?le<2?(0===le&&t?.paused&&await i.speechService.playAudio(s.voiceOverAssetsPath+e.audio),le+=1):(V(e.audio),clearTimeout(j),i.swan.poseDetection.disconnect(),setTimeout(Ce,1e3)):(le=0,!t?.paused||k&&k?.audioName===e.audio?k?.audioName===e.audio&&t?.paused&&(k&&k.no_of_times_skipped>=k.skipCount?(k.no_of_times_skipped=0,i.speechService.playAudio(s.voiceOverAssetsPath+e.audio)):k&&(k.no_of_times_skipped+=1)):(k={skipCount:2,no_of_times_skipped:0,audioName:e.audio},i.speechService.playAudio(s.voiceOverAssetsPath+e.audio)))}}),y?.current&&null!==y.current.getScreenshot()&&i.swan.poseDetection.videoEmit({image:y.current.getScreenshot()||"",scanId:r}))},[y,r,i.swan,N,le,Ce,i.speechService]),je=t.useCallback(async()=>{z(!0),ue(!0),re.current&&(re.current=!1,s.handleScanTimeCapture({eventName:"scan started",scanID:r,status:"success",email:p})),u(s.getCurrentTimeInSeconds()),T(!0),ae.current&&await i.speechService.playAudio(`${s.voiceOverAssetsPath}StartScan.mp3`),ae.current&&await i.speechService.playAudio(`${s.voiceOverAssetsPath}LiftArmsAndHoldAtHip.mp3`),ae.current&&(z(!1),M(!0),Q(!0),se(!0),he());try{if(y&&y.current&&y.current.stream&&ae.current){const e={mimeType:ie[0]};ae.current&&(F.current=new MediaRecorder(y.current.stream,e)),ae.current&&F.current&&F.current.addEventListener("dataavailable",we),ee([...Z,we]),F.current&&F.current.start(1e3),$(!1),ae.current&&(j=setTimeout(Se,2e3))}}catch(e){console.log("error ----------",e)}},[y,ie,we,Z,Se,ae]);return t.useEffect(()=>(x&&(a(!0),ye()),()=>{N&&(i.swan.poseDetection.disconnect(),o.capture(`${x}/pose_detection_disconnected`,{scanID:r,email:p,id:N})),Z.forEach(e=>{F?.current?.removeEventListener("dataavailable",e)})}),[H,x]),t.useEffect(()=>{K.push(O)},[O]),t.useEffect(()=>{B([])},[W]),t.useEffect(()=>{const e=D.length&&D.length>0;A||!e||L||!ae.current||Y||F&&F.current&&(L||(F.current.stop(),$(!0)))},[A,L,D,Y]),t.useEffect(()=>{const e=D.length&&D.length>0;if(A||!e||L)console.log("No video found to upload");else if(F&&F.current&&ae.current&&!Y&&!L){const e=new File(D,`${r}.webm`,{type:"video/webm"});me?.(!0),l(""),de?.(e)}},[A,L,D,Y,F,ae]),t.useEffect(()=>{if("undefined"!=typeof MediaRecorder){const e=s.videoTypes.filter(e=>MediaRecorder.isTypeSupported(e));ce(e)}},[]),t.useEffect(()=>{fe()},[]),e.jsx(v,{resetDetector:n,handleShowStreamCamera:fe,loadingCam:I,handlePause:pe,showRestart:J,pause:Y,handleReScan:ge,recordingStarted:L,isScanning:U,startSendingVideoFrames:je,faceDone:P,stopRecording:xe,showPause:te,webcamRef:y,handleUserMedia:he,config:f})});function D({scanID:s,userDetails:a,setIsVideoUploaded:n,setScanFailsError:r,setScanStartTime:o,setScanUniqueKey:i,config:c}){const[l,u]=t.useState(90),[d,m]=t.useState(0),[h,g]=t.useState(null),[p,x]=t.useState(!1),[y,v]=t.useState(0),S=t.useRef([]),[b,C]=t.useState(!1),w=l-d,j=w>=80&&w<=95;t.useEffect(()=>{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)),u(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})}},[]),t.useEffect(()=>{if(S.current=[...S.current.slice(-4),w],S.current.length>=5){const e=Math.max(...S.current)-Math.min(...S.current);v(j&&e<2?e=>Math.min(100,e+10):e=>Math.max(0,e-20))}j||null===h&&!p||k()},[w,j,h,p]),t.useEffect(()=>{y>=100&&null===h&&!p&&N(),y<50&&null!==h&&k()},[y,h,p]);const N=()=>{g(3);const e=setInterval(()=>{g(t=>null===t||t<=1?(clearInterval(e),x(!0),null):t-1)},1e3)},k=()=>{g(null),b||x(!1)};return e.jsx(f,{angle:w,countdown:h,isScanning:p,isInTargetRange:j,stabilityScore:y,config:c,children:p&&e.jsx(F,{setIsScanLocked:C,resetDetector:()=>{u(90),m(0),g(null),x(!1),v(0),C(!1),S.current=[]},scanID:s,userDetails:a,setIsVideoUploaded:n,setScanFailsError:r,setScanStartTime:o,setScanUniqueKey:i,config:c})})}function E({message:a,config:n}){const{translate:r}=t.useContext(s.LanguageContext)||{};return e.jsx(c,{open:!0,className:"confirm-modal",children:e.jsx("div",{className:"modal-main",children:e.jsx("div",{className:"text-center",children:a?e.jsxs(e.Fragment,{children:[e.jsx("h2",{style:{fontFamily:n?.style?.heading?.headingFontFamily||"SeriouslyNostalgic Fn",fontSize:n?.style?.heading?.headingFontSize||"32px",color:n?.style?.heading?.headingColor||"#000",fontWeight:n?.style?.heading?.headingFontWeight||"normal"},children:r?.(s.LanguageKeys.cameraAlreadyInUse)}),e.jsx("p",{className:"mt-[0.5rem] text-sm",style:{fontFamily:n?.style?.base?.baseFontFamily||"Inter, sans-serif",fontSize:n?.style?.base?.baseFontSize||"16px",color:n?.style?.base?.baseTextColor||"#000"},children:r?.(s.LanguageKeys.tryClosingBrowser)})]}):e.jsxs(e.Fragment,{children:[e.jsx("h2",{style:{fontFamily:n?.style?.heading?.headingFontFamily||"SeriouslyNostalgic Fn",fontSize:n?.style?.heading?.headingFontSize||"32px",color:n?.style?.heading?.headingColor||"#000",fontWeight:n?.style?.heading?.headingFontWeight||"normal"},children:r?.(s.LanguageKeys.checkCameraSettings)}),e.jsx("p",{className:"mt-[0.5rem] text-sm",style:{fontFamily:n?.style?.base?.baseFontFamily||"Inter, sans-serif",fontSize:n?.style?.base?.baseFontSize||"16px",color:n?.style?.base?.baseTextColor||"#000"},children:`${r?.(s.LanguageKeys.setting)} > ${s.getBrowserName()} > ${r?.(s.LanguageKeys.enableCameraPermissions)}`})]})})})})}function I({setShowDrawer:a,config:r,loader:o}){const[c,l]=t.useState({disabled:!1,message:""}),[u,d]=t.useState(!0),m=t.useRef(null),f=t.useCallback(async()=>{const e=await s.checkCameraPermission();l(e),d(!1)},[]);return t.useEffect(()=>{f()},[]),u?e.jsx(i.LoadingScreen,{url:o}):c?.disabled?e.jsx(E,{config:r,message:c?.message}):e.jsx(n,{audio:!1,ref:m,screenshotQuality:1,videoConstraints:s.videoConstraints,mirrored:!0,onUserMedia:()=>a?.(!0),screenshotFormat:"image/jpeg",style:{position:"relative",top:0,bottom:0,zIndex:0,width:"100%",height:"100%",objectFit:"cover"}})}function T({link:a,onReady:n,wrapperClassName:r="[&_video]:rounded-t-[20px] w-full h-full"}){const o=t.useRef(null),i=t.useRef(null);let c={autoplay:!0,controls:!1,responsive:!0,fluid:!0,muted:!0,navigationUI:"hide",preload:"metadata",poster:s.videoPoster};return t.useEffect(()=>{if(!i.current&&a&&o?.current){const e=u(o.current,{...c});e.ready(()=>{i.current=e;const t={...c,sources:[{src:a,type:"application/x-mpegURL"}]};e.autoplay(t.autoplay),e.src(t.sources),n?.(e)})}},[a,o]),t.useEffect(()=>{const e=i.current;return()=>{e&&!e.isDisposed()&&(e.dispose(),i.current=null)}},[i]),e.jsx("div",{className:r,children:e.jsx("video",{ref:o,muted:!0,className:"video-js",playsInline:!0,onDrag:e=>e.preventDefault()})})}function L({scanFailsError:a,serverAtCapacity:n=!1,onNext:o,gender:i,setScanUniqueKey:l,resolvedConfig:u,setIsVideoUploaded:d}){const{translate:m}=t.useContext(s.LanguageContext)||{},[f,h]=t.useState(!1),g=()=>{h(!f)};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-col h-full max-w-[28rem] mx-auto w-full rounded-t-[20px] overflow-y-auto",style:{background:u?.style?.base?.backgroundColor},children:[e.jsx("div",{className:"w-full max-w-[28rem] mx-auto pt-[1rem] px-[1rem]",children:e.jsx(s.Header,{noTitle:!0,resolvedConfig:u})}),e.jsxs("div",{className:"flex-1",children:[a&&e.jsxs("div",{className:"px-[1rem]",children:[e.jsx("h2",{className:"text-center",style:{fontFamily:u?.style?.heading?.headingFontFamily||"SeriouslyNostalgic Fn",fontSize:u?.style?.heading?.headingFontSize||"32px",color:u?.style?.heading?.headingColor||"#000",fontWeight:u?.style?.heading?.headingFontWeight||"normal"},children:m?.(s.LanguageKeys.issueWithScan)}),e.jsx("p",{style:{fontFamily:u?.style?.base?.baseFontFamily||"Inter, sans-serif",fontSize:u?.style?.base?.baseFontSize||"16px",color:u?.style?.base?.baseTextColor||"#1E1E1E"},children:m?.(s.LanguageKeys.reason)}),e.jsx("p",{style:{fontFamily:u?.style?.base?.baseFontFamily||"Inter, sans-serif",fontSize:u?.style?.base?.baseFontSize||"16px",color:u?.style?.base?.baseTextColor||"#1E1E1E"},children:s.handleErrorMessage(a)}),e.jsx("img",{className:"my-[0.5rem] aspect-[2/1.4] w-full object-cover",onClick:g,src:s.VIDEO_POSTER_GENDER_BASED[i],alt:"icon"})]}),n&&e.jsxs("div",{className:"p-[1rem] text-center",children:[e.jsx("h3",{style:{fontFamily:u?.style?.heading?.headingFontFamily||"SeriouslyNostalgic Fn",fontSize:u?.style?.heading?.headingFontSize||"32px",color:u?.style?.heading?.headingColor||"#000",fontWeight:u?.style?.heading?.headingFontWeight||"normal"},children:m?.(s.LanguageKeys.serverAtCapacity)}),e.jsx("p",{className:"text-base mt-[0.5rem]",style:{fontFamily:u?.style?.base?.baseFontFamily||"Inter, sans-serif",fontSize:u?.style?.base?.baseFontSize||"16px",color:u?.style?.base?.baseTextColor||"#1E1E1E"},children:m?.(s.LanguageKeys.serverAtCapacityDescription)})]})]}),a&&e.jsx("div",{className:"p-[1rem] flex gap-[0.5rem]",children:e.jsx(s.SpecificButton,{disabled:!1,buttonText:m?.(s.LanguageKeys.scanAgain),className:"!shadow-none",buttonFunc:()=>{o?o?.():l(s.generateUuid()),d(!1)},resolvedConfig:u})})]}),f&&e.jsxs(c,{className:"w-screen h-screen video-modal",onClose:g,open:f,children:[e.jsx("div",{className:"flex justifyEnd ",children:e.jsx("span",{className:"closeBtn",onClick:g,children:e.jsx(r,{className:"absolute right-[8px] top-[8px] text-white z-[9]"})})}),e.jsx("div",{className:"aspect-video object-cover rounded-[20px] ",children:e.jsx(T,{link:i?s.GENDER[i].PRE_LINK:s.GENDER.male.PRE_LINK,wrapperClassName:"w-screen h-screen fixed top-[0] left-[0]"})})]})]})}function M({scanId:a,userDetails:n,config:r,isFaceScan:c,isVideoUploadedCorrect:u,isMeasurementAvailable:m,onScanSuccess:f,isSuccess:h}){const{gender:g,shopDomain:p,heightInCm:x,deviceFocalLength:y,userName:v,email:S,scanType:b}=n,C=[s.CLOTHING_CUSTOM_SCAN,s.CLOTHING_BANNER_SCAN,s.CLOTHING_CUSTOM_FIT_SCAN].includes(b),[w,j]=t.useState(!0),N=t.useCallback(async()=>{try{C&&await i.swan.auth.addUser({scanId:a,email:S,name:v,gender:g,height:x}),o.posthog.capture(p,{scanID:a,email:S,height:x,focalLength:y,clothesFit:"0",gender:g})}catch(e){console.log(e)}},[C]),{translate:k}=t.useContext(s.LanguageContext)||{};t.useEffect(()=>{u&&N()},[u]);const F=h||(c?m&&u:u||m);return e.jsx(d,{className:"flex h-full w-full flex-col ",children:e.jsxs("div",{className:"h-full w-full flex-col items-center justify-center flex",children:[e.jsx(I,{loader:r?.loader,setShowDrawer:j}),e.jsx(l.Drawer,{open:w,onClose:(e,t)=>{},className:"camera-drawer",anchor:"bottom",children:e.jsx("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:r?.style?.base?.backgroundColor},children:e.jsxs("div",{className:"w-full h-full flex flex-col",children:[e.jsx(s.Header,{title:k?.(s.LanguageKeys.measurementsBeingTaken),resolvedConfig:r}),e.jsx("div",{className:"flex items-center justify-center flex-1",children:e.jsx("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.jsx("source",{src:g===s.GenderType.Male?s.maleMeasurementProgress:s.measurementProgress,type:"video/mp4"})})}),F&&e.jsx(s.SpecificButton,{resolvedConfig:r,className:"!w-[180px] mx-auto",buttonText:k?.(s.LanguageKeys.next),buttonFunc:f&&f})]})})})]})})}exports.BodyScan=({userDetails:a,config:n,onRetry:r,onScanError:c,isError:u,isSuccess:d,onScanSuccess:m})=>{const{gender:f,scanType:h,shopDomain:g,heightInCm:p,email:x,deviceFocalLength:v,deviceModelName:S,callbackUrl:b}=a,[C,j]=t.useState(!1),[N,k]=t.useState(!1),[F,T]=t.useState(!1),[P,_]=t.useState({disabled:!1,message:""}),[A,$]=t.useState(""),[U,z]=t.useState(!1),[R,O]=t.useState(!0),[q,K]=t.useState(!1),[B,W]=t.useState(""),[V,H]=t.useState(s.getCurrentTimeInSeconds()),{gyroData:G}=function(e){const[s,a]=t.useState([]),[n,r]=t.useState(!1),o=t.useCallback(e=>{try{const{alpha:t,beta:s,gamma:n}=e;a(e=>[...e,{alpha:t?.toString()||void 0,beta:s?.toString()||void 0,gamma:n?.toString()||void 0,timestamp:(new Date).toISOString()}])}catch(e){console.log(e)}},[]),i=t.useCallback(async()=>{const e=DeviceOrientationEvent;if(void 0!==e&&"function"==typeof e.requestPermission)try{"granted"===await e.requestPermission()?r(!0):console.warn("Device orientation permission denied.")}catch(e){console.error("Error requesting device orientation permission:",e)}else r(!0)},[]);return t.useEffect(()=>(e&&n?window.addEventListener("deviceorientation",o):a([]),()=>{window.removeEventListener("deviceorientation",o)}),[e,n,o]),t.useEffect(()=>{e&&i()},[e,i]),{gyroData:s}}(q),{setPreferredLanguage:J}=t.useContext(s.LanguageContext)||{},Q=s.useLocalConfig(n),Y=t.useCallback(()=>{W(s.generateUuid()),$(""),j(!1),z(!1)},[]),X=e=>{c({...e,message:s.handleErrorMessage(e)}),Z(),T(!1),$(e),k(!1),s.handleScanTimeCapture({eventName:`${g}/measurement_failed/fit-view`,scanID:B,status:"failed",email:x,message:s.handleErrorMessage(e)}),V&&s.handleScanTimeCapture({eventName:`${g}/scan_completion_time`,scanID:B,status:"failed",completionTime:s.getCurrentTimeInSeconds()-V,email:x})},Z=()=>{H(null),W("")},ee=t.useCallback(async e=>{if(e&&"success"===e?.scanStatus&&"intermediate"===e?.resultType&&200===e?.code)return void s.handleScanTimeCapture({eventName:`${g}/measurement_success/intermediate`,scanID:B,status:"success",email:x});Z();const t=B;T(!0),s.handleScanTimeCapture({eventName:`${g}/measurement_success/fit-view`,scanID:t,status:"success",email:x}),V&&s.handleScanTimeCapture({eventName:`${g}/scan_completion_time`,scanID:t,status:"success",completionTime:s.getCurrentTimeInSeconds()-V,email:x})},[h,g,B]),te=e=>{T(!1),$(""),k(!1),i.swan.measurement.handleMeasurementSocket({scanId:e||B,onOpen:()=>{s.handleWebSocketCapture({eventName:`${g}/webSocket`,scanID:B,connection:"open",type:"measurement_recommendation",email:x})},onClose:()=>s.handleWebSocketCapture({eventName:`${g}/webSocket`,scanID:B,connection:"close",type:"measurement_recommendation",email:x}),onError:e=>{X(e),s.handleWebSocketCapture({eventName:`${g}/webSocket`,scanID:B,connection:"error",type:"measurement_recommendation",email:x})},onSuccess:e=>{s.handleWebSocketCapture({eventName:`${g}/webSocket`,scanID:B,connection:"success",type:"measurement_recommendation",email:x}),ee(e)}})},se=t.useCallback(async e=>{const t=s.createObjectMetadataArray({gender:f,focal_length:`${v}`,height:`${p}`,customer_store_url:g,clothes_fit:"0",scan_type:h,callback_url:b||"https://example.com/webhook"});s.handleScanTimeCapture({eventName:`${g}/body_scan_meta_data`,scanID:B,email:x,data:JSON.stringify(t)});try{await i.swan.fileUpload.uploadFileFrontend({file:e,arrayMetaData:t,scanId:B,email:x}),await i.swan.fileUpload.setDeviceInfo({model:S,detection:"manual",gyro:G,scanId:B}),console.log("video successfully uploaded"),z(!1),s.handleScanTimeCapture({eventName:`${g}/scan_success`,scanID:B,status:"success",email:x,data:JSON.stringify(t)}),s.handleScanTimeCapture({eventName:"scan finished",scanID:B,status:"success",email:x}),H(s.getCurrentTimeInSeconds()),setTimeout(()=>{z(!0)},3e3)}catch(e){s.handleScanTimeCapture({eventName:"scan finished",scanID:B,status:"failed",email:x,message:s.handleErrorMessage(e)}),s.handleScanTimeCapture({eventName:`${g}/scan_failed`,scanID:B,status:"failed",email:x,message:s.handleErrorMessage(e),data:JSON.stringify(t)}),$(s.handleErrorMessage(e)),z(!1),console.log(e,"video upload failed")}finally{K(!1)}},[B,G]),ae=t.useCallback(async e=>{try{const t=await i.swan.measurement.getMeasurementResult(e),a=t?.data?.isMeasured,n=V||s.getCurrentTimeInSeconds(),r=s.getCurrentTimeInSeconds(),o=300;if(O(!1),!1===a)return Z(),void W(s.generateUuid());j(!0),!0===a?await ee(null):null===a&&n>r+o?X(t?.data?.error):te(e)}catch(e){console.log(e),Z(),W(s.generateUuid()),j(!1)}},[X,ee,W]),ne=t.useCallback(async()=>{if(+p<152.4||+p>213.36)return void c({message:"Height must be between 152.4cm (5ft) and 213.36cm (7ft)"});const e=await s.checkCameraPermission();if(e.disabled)s.handleScanTimeCapture({eventName:`${g}/camera_activation`,scanID:B,status:"failed",email:x}),O(!1);else{B?ae(B):O(!1),s.handleScanTimeCapture({eventName:`${g}/camera_activation`,scanID:B,status:"success",email:x})}_(e),$(""),z(!1)},[ae,x,B,W,g]);return t.useEffect(()=>{o.init(s.posthogPublicKey,{api_host:s.posthogPublicHost}),o.capture("$pageview")},[]),t.useEffect(()=>{J?.(Q?.language)},[Q]),t.useEffect(()=>{u||d||g&&ne()},[g,p,u,d]),t.useEffect(()=>{u||d||U&&g&&B&&te()},[U,g,B,u,d]),u?e.jsxs(s.LanguageContextProvider,{children:[e.jsx(I,{}),e.jsx(l.Drawer,{anchor:"bottom",open:!0,className:"camera-drawer",onClose:(e,t)=>{},children:e.jsx(L,{scanFailsError:A||u,onNext:()=>{},setScanUniqueKey:W,gender:f,resolvedConfig:Q,setIsVideoUploaded:z})})]}):d?e.jsx(M,{isFaceScan:!1,scanId:B,isMeasurementAvailable:F,userDetails:a,isVideoUploadedCorrect:N,config:Q,isSuccess:d}):R?e.jsx("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.jsx(i.LoadingScreen,{url:Q?.loader})}):P.disabled?e.jsx(s.LanguageContextProvider,{children:e.jsx(E,{})}):C||A?!C&&!F||A?e.jsxs(s.LanguageContextProvider,{children:[e.jsx(I,{}),e.jsx(l.Drawer,{anchor:"bottom",open:!0,className:"camera-drawer",onClose:(e,t)=>{},children:e.jsx(L,{scanFailsError:A,onNext:()=>{r?.(),Y()},setScanUniqueKey:W,gender:f,resolvedConfig:Q,setIsVideoUploaded:z})})]}):e.jsx(s.LanguageContextProvider,{children:e.jsx(M,{isFaceScan:!1,scanId:B,isMeasurementAvailable:F,userDetails:a,onScanSuccess:m,isVideoUploadedCorrect:N,config:Q})}):e.jsx(w.Provider,{value:{setStartGyro:K,handleFileUpload:se,setUploadLoading:j},children:e.jsx(y,{children:e.jsx(s.LanguageContextProvider,{children:e.jsx(D,{config:Q,scanID:B,userDetails:a,setIsVideoUploaded:z,setScanFailsError:$,setScanStartTime:H,setScanUniqueKey:W})})})})};
2
2
  //# sourceMappingURL=bodyScan.js.map