1import{V as y,W as c,p as u,X as W}from"./DIba3E-8.js";function R(t){const r=String(t||"").trim().toLowerCase();return r==="en"||r==="es"||r==="fr"||r==="it"?r:"pt"}function U(t){return t==="en"?"en-US":t==="es"?"es-ES":t==="fr"?"fr-FR":t==="it"?"it-IT":"pt-BR"}function E(t){const r=String(t||"").trim().toLowerCase();return r?r==="brl"?"brl":r==="usd"?"usd":r==="eur"?"eur":null:null}function T(){if(typeof window>"u")return null;const t=Array.isArray(navigator.languages)?navigator.languages:[navigator.language];for(const r of t){const n=String(r||"").trim().toLowerCase();if(n){if(n==="en"||n.startsWith("en"))return"en";if(n==="es"||n.startsWith("es"))return"es";if(n==="fr"||n.startsWith("fr"))return"fr";if(n==="it"||n.startsWith("it"))return"it";if(n==="pt"||n.startsWith("pt"))return"pt"}}return null}function v(){return String(window.location.host||"").toLowerCase()}function S(t){const r=String(t||"").trim().toLowerCase();return r?r.startsWith("pt.")?"pt":r.startsWith("en.")?"en":r.startsWith("es.")?"es":r.startsWith("fr.")?"fr":r.startsWith("it.")?"it":r.includes("gvgmall.co")||r.includes("globalsoftware.store")?"en":null:null}function C(t){return t==="pt"?"brl":t==="en"?"usd":"eur"}function I(){try{const t=String(window.location?.pathname||"");return t==="/en"||t.startsWith("/en/")?"en":t==="/es"||t.startsWith("/es/")?"es":t==="/fr"||t.startsWith("/fr/")?"fr":t==="/it"||t.startsWith("/it/")?"it":null}catch{return null}}function B(){const t=W(),r=u(()=>!!t.public?.intlSubdomainMode);v();const n=u(()=>v());y("ld_server_lang",()=>null);const f=c("ld_lang",{sameSite:"lax",path:"/"}),g=c("ld_currency",{sameSite:"lax",path:"/"}),d=c("ld_country",{sameSite:"lax",path:"/"}),h=u(()=>String(d.value||"").trim().toUpperCase()),a=u(()=>{const e=n.value;return e.length>0&&!e.endsWith(".com.br")&&!e.includes(".com.br:")&&!e.includes("localhost")&&!e.includes("127.0.0.1")&&!e.includes(".vercel.app")&&!e.includes("casadosoftware.com.br")}),l=u(()=>{const e=S(n.value);if(e)return e;const i=I();if(i)return i;const s=String(f.value||"").trim();if(s)return R(s);if(String(t.public?.storeSlug||"").trim()==="casadosoftware")return"pt";if(a.value)return"en";{const p=T();if(p)return p}return"pt"}),L=u(()=>U(l.value)),o=u(()=>{const e=S(n.value);if(e)return C(e);if(a.value)return"usd";const i=E(g.value);if(i)return i;if(r.value)return C(l.value);const s=String(h.value||"").trim().toUpperCase();if(s==="BR")return"brl";const m=new Set(["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES"]);return s?m.has(s)?"eur":"usd":a.value?"usd":"brl"}),b=u(()=>o.value==="usd"?"USD":o.value==="eur"?"EUR":"BRL"),w=u(()=>o.value!=="brl");return{host:n,language:l,locale:L,currency:b,currencyLower:o,isIntl:w,countryCode:h,setLanguage:e=>{f.value=e},setCurrency:e=>{g.value=e},setCountry:e=>{const i=String(e||"").trim().toUpperCase();d.value=i||null}}}export{B as u}; 2//# sourceMappingURL=DnuLwTCV.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.