PageSourceSearch

https://sallinggroup.com/_nuxt/useJobPostMapping.o9vuT_QS.js

js sallinggroup.com collected 2026-09-24 09:47:47 UTC 1,675 bytes, 1 lines download raw bytes

1import{u as A}from"./useLangAndNav.CU61VmoS.js";import{C as y,D as E}from"./entry.SA0OsS3s.js";const N=async i=>{const u=y();return(await $fetch.raw(i,{retry:2,headers:{Authorization:`Bearer ${u.public.NUXT_ENV_SALLING_API_CMS_BEARER_TOKEN}`}}))._data},{lang:h,possibleLangs:v}=A(),R=()=>{const i=y(),p=`${i.public.NUXT_ENV_CMS_API_URL}/job-post-mappings`,c=e=>{if(!(!e||typeof e!="object")){if(Array.isArray(e)){e.forEach(t=>c(t));return}Object.keys(e).forEach(t=>{if(t==="creator"){delete e[t];return}e[t]&&typeof e[t]=="object"&&c(e[t])})}},f=()=>E("jobPostMapping",()=>{}),_=async()=>{const e=f();if(e.value&&i.public.NUXT_ENV_SITE==="sallinggroup")return;const t=await N(p),o=t==null?void 0:t.results.map(r=>(c(r),r)),s={...t,results:o};return e.value=M(s.results||[]),s},M=e=>{var o,s;const t={};try{for(const r of e){const n=(s=(o=r.Brand)==null?void 0:o.toLowerCase())==null?void 0:s.trim(),a=r["@name"].toLowerCase().trim();if(!n||!a){console.warn("Missing brand or item key");continue}t[n]?t[n][a]=r:t[n]={[a]:r}}}catch(r){console.error(r)}return t},l=(e,t,o)=>{var d,L,C,b;const s=t==null?void 0:t.toLowerCase().trim(),r=e.toLowerCase().trim(),n=(o==null?void 0:o.trim())||"",a=f().value||{},g=((L=(d=a[s])==null?void 0:d[r])==null?void 0:L[n])||void 0;if(n&&g)return g;const m=((C=a[s])==null?void 0:C[r])||void 0;if(m)return m;if(t!=="default")return((b=a.default)==null?void 0:b[r])||void 0};return{fetchJobPostMappings:_,lookUpCategoryMapping:l,getJobCategoryLabel:(e,t="default")=>{const o=l(e,t);return h&&(o!=null&&o.danishLabel||o!=null&&o.englishLabel)?v.EN===h().value?o.englishLabel:o.danishLabel:e.charAt(0).toUpperCase()+e.slice(1)}}};export{R as u};

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.