1import{r as f,u as I,bY as m,j as a,by as D,R as b,ac as x,bZ as O,b_ as c}from"./index-DFE7upUi.js";import{S as y,c as _}from"./react-select.esm-nyk00Exb.js";import"./hoist-non-react-statics.cjs-CMwYHtPy.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new t.Error().stack;r&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[r]="f21735bf-e5d6-48da-b416-d933a3056f93",t._sentryDebugIdIdentifier="sentry-dbid-f21735bf-e5d6-48da-b416-d933a3056f93")}catch{}})();var C="GB",k=navigator.language.toLowerCase().substring(0,2);const z=({setLocationConfirmed:t,locationConfirmed:r})=>{const[n,w]=f.useState(C),[i,v]=f.useState(k),{t:o}=I(),d=async()=>{let e={},l=O[n];x[l]===void 0&&(l="USD"),e.currency=x[l];let s;c.UK.includes(n)?s="UK":c.EU.includes(n)?s="EU":c.US.includes(n)?s="US":s="other",e.customer_zone=s,e.language=i,p(e)},p=e=>{localStorage.setItem("user-prefsv2",JSON.stringify(e)),localStorage.setItem("i18nextLng",i),window.location.reload(),t(!0)},u=Object.keys(JSON.parse(o("localization.main.countries"))).map(e=>({value:JSON.parse(o("localization.main.countries"))[e],label:e})),g=Object.keys(m).map(e=>({label:m[e],value:e})),{Option:h,SingleValue:j}=_,S=e=>{console.log(e);const[l,s]=b.useState(`/assets/flags/${e.data.value}.webp`);return a.jsx(j,{...e,children:a.jsxs("div",{className:"flex flex-row gap-2 items-center",children:[a.jsx("img",{className:"w-6",onError:()=>s("/assets/flags/unknown.svg"),src:l,alt:e.data.label}),e.data.label]})})},N=e=>{const[l,s]=b.useState(`/assets/flags/${e.data.value}.webp`);return a.jsx(h,{...e,children:a.jsxs("div",{className:"flex flex-row gap-2 items-center",children:[a.jsx("img",{className:"w-6",onError:()=>s("/assets/flags/unknown.svg"),src:l,alt:e.data.label}),e.data.label]})})};return!r&&a.jsx("div",{className:"fixed top-0 left-0 w-full h-full flex items-end justify-center z-[1000] ",children:a.jsxs("div",{className:" w-3/4 md:w-1/2 rounded-md p-6 bg-[#F6F6F6] mb-8 border border-[#D1D1D1] relative",children:[a.jsx("div",{className:"flex justify-end absolute top-1 right-1",children:a.jsx(D,{onClick:()=>d(),className:"w-5 h-5 text-red-500 cursor-pointer justify-end absolute"})}),a.jsxs("div",{className:"flex flex-col lg:flex-row gap-4 items-end",children:[a.jsxs("div",{className:"flex-1 w-full lg:w-auto",children:[a.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"country",children:o("welcome.main.country")}),a.jsx(y,{onChange:e=>w(e.value),options:u,value:u.find(e=>e.value===n),components:{Option:N,SingleValue:S},styles:{indicatorSeparator:e=>({...e,display:"none"}),control:e=>({...e,border:"1px solid rgb(156 163 175)"})}})]}),a.jsxs("div",{className:"flex-1 w-full lg:w-auto",children:[a.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"language",children:o("welcome.main.language")}),a.jsx(y,{onChange:e=>v(e.value),options:g,value:g.find(e=>e.value===i),styles:{indicatorSeparator:e=>({...e,display:"none"}),control:e=>({...e,border:"1px solid rgb(156 163 175)"})}})]}),a.jsx("button",{className:"bg-pr hover:bg-sr transition-all duration-300 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline",type:"button",onClick:()=>d(),children:o("welcome.main.button")})]})]})})};export{z as default}; 2//# sourceMappingURL=welcomebox-JE4B3bLb.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.