{"version":3,"file":"RecruitmentAdverts.CTsZ1eJi.mjs","names":["React.useSyncExternalStore","__esmMin","init_npm_react_18_3_1","me","p","c","init_jsx_runtime","init_ArlecchinoMotion","announce","next","listeners","fn","refreshAdverts","flight","controller","generation","epoch","r","data","snapshot","visibleAdverts","subscribeAdverts","timer","useRecruitmentAdverts","serverSnapshot","RecruitmentHomeNotices","roles","adverts","a","loaded","link","i","error","init_RecruitmentAdverts","ad"],"sources":["https:/framerusercontent.com/modules/TpTIf9LwkJffFpjCPR0t/3kgtZXsOJfFxyFHbuP60/RecruitmentAdverts.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import*as React from\"react\";import{M}from\"https://framerusercontent.com/modules/MxOdc2QJhIRDzBncHatn/1GUWZD1kqOqWmdxXuYIs/ArlecchinoMotion.js\";// The public board and live intake share production advert authority.\nexport const ADVERTS_API=\"https://api.arlecchino.uk\";const serverSnapshot={adverts:[],loaded:false,error:\"\"};let snapshot=serverSnapshot,flight=null,timer,epoch=0;const listeners=new Set;function announce(next){snapshot=next;listeners.forEach(fn=>fn());}async function refreshAdverts(){if(flight)return;const controller=new AbortController,generation=epoch;flight=controller;try{const r=await fetch(ADVERTS_API+\"/recruitment/adverts\",{credentials:\"omit\",cache:\"no-store\",signal:controller.signal});if(!r.ok)throw Error(\"unavailable\");const data=await r.json();if(generation===epoch)announce({adverts:data.adverts,loaded:true,error:\"\"});}catch{if(!controller.signal.aborted&&generation===epoch)announce({...snapshot,loaded:true,error:\"Current opportunities could not load. Please try again.\"});}finally{if(flight===controller)flight=null;}}function visibleAdverts(){if(document.visibilityState===\"visible\")void refreshAdverts();}function subscribeAdverts(fn){listeners.add(fn);if(listeners.size===1){void refreshAdverts();timer=setInterval(visibleAdverts,3e4);document.addEventListener(\"visibilitychange\",visibleAdverts);}return()=>{listeners.delete(fn);if(!listeners.size){clearInterval(timer);timer=undefined;document.removeEventListener(\"visibilitychange\",visibleAdverts);epoch++;flight?.abort();flight=null;}};}export function useRecruitmentAdverts(){return React.useSyncExternalStore(subscribeAdverts,()=>snapshot,()=>serverSnapshot);}// Adverts whose own CMS page is published (/vacancies/:slug); any other advert opens the feed-driven job page.\nconst link=ad=>[\"foh-server\",\"commis-chef\"].includes(ad.id)?\"/vacancies/\"+ad.id:\"/vacancies/job?role=\"+encodeURIComponent(ad.id);export function RecruitmentHomeNotices({data}){const{adverts,loaded,error}=data,roles=adverts.filter(a=>a.home_featured).slice(0,3);return /*#__PURE__*/_jsxs(\"div\",{className:\"am-board-in rh-notices\",\"data-count\":roles.length,\"aria-busy\":!loaded,children:[/*#__PURE__*/_jsx(\"style\",{dangerouslySetInnerHTML:{__html:`\n .am-notice-status{display:inline-flex;align-items:center;gap:6px}.am-notice-status-dot{display:inline-block;width:7px;height:7px;flex:none;border-radius:50%;background:#064F2B}.am-notice-status-dot.is-hiring{animation:am-notice-live 2.8s cubic-bezier(.2,.8,.2,1) infinite}@keyframes am-notice-live{0%,100%{box-shadow:0 0 0 2px #064F2B22;opacity:1}50%{box-shadow:0 0 0 5px #064F2B08;opacity:.72}}@media(prefers-reduced-motion:reduce){.am-notice-status-dot.is-hiring{animation:none}}.rh-notices{justify-content:center}.rh-notices[data-count=\"1\"]{grid-template-columns:minmax(0,190px)!important}.rh-notices[data-count=\"2\"]{grid-template-columns:repeat(2,minmax(0,190px))!important}.rh-empty{grid-column:1/-1;max-width:320px;justify-self:center;font:400 13px/1.5 \"JetBrains Mono\",monospace;max-width:34ch;margin:auto;padding:18px;text-align:center;color:#064F2B}.rh-notices .am-notice{min-width:0}.rh-notices .am-notice-tag{white-space:normal!important;overflow-wrap:anywhere}.rh-notices .am-notice-title{overflow-wrap:anywhere}@container board (max-width:389px){.rh-notices[data-count=\"2\"]{grid-template-columns:minmax(0,1fr)!important;max-width:320px;margin:auto;width:100%}}@media(max-width:579px){.rh-notices[data-count=\"1\"],.rh-notices[data-count=\"2\"]{grid-template-columns:minmax(0,1fr)!important;max-width:320px;margin:auto;width:100%}}\n `}}),roles.map((r,i)=>/*#__PURE__*/_jsxs(\"a\",{className:\"am-notice\",href:link(r),style:{\"--r\":[\"-2.4deg\",\"1.6deg\",\"-1.2deg\"][i]},\"aria-label\":r.title+\" — view job advert\",children:[/*#__PURE__*/_jsx(\"span\",{className:\"am-pin\"}),/*#__PURE__*/_jsxs(\"span\",{className:\"am-notice-tag am-notice-status\",children:[/*#__PURE__*/_jsx(\"span\",{className:\"am-notice-status-dot\"+(r.hiring_now?\" is-hiring\":\"\"),\"aria-hidden\":\"true\"}),r.hiring_now?\"HIRING NOW\":\"NOT RECRUITING\"]}),/*#__PURE__*/_jsx(\"span\",{className:\"am-notice-title\",children:r.title}),/*#__PURE__*/_jsx(\"span\",{className:\"am-notice-go\",\"aria-hidden\":\"true\",children:\"→\"})]},r.id)),!roles.length&&/*#__PURE__*/_jsx(\"p\",{className:\"rh-empty\",children:!loaded?\"Checking our noticeboard…\":error||\"No roles on the noticeboard just now. Speculative applications are always welcome.\"})]});}const CSS=`\n .rb{container:rb / inline-size;width:100%;color:#064F2B}.rb *{box-sizing:border-box}.rb-grid{display:flex;flex-wrap:wrap;justify-content:center;align-items:flex-start;gap:32px 26px;padding:8px 0}.rb-card{position:relative;flex:0 1 calc((100% - 52px)/3);max-width:420px;min-width:0;background:#FFF9F0;border-radius:6px;padding:34px 24px 26px;box-shadow:0 20px 30px -18px #0009;display:flex;flex-direction:column;gap:12px;rotate:var(--rb-tilt);font:400 13px/1.45 \"JetBrains Mono\",monospace;overflow-wrap:anywhere}.rb-card h3{font:400 28px/.98 \"Londrina Solid\",sans-serif;letter-spacing:-.5px;margin:0;text-transform:uppercase}.rb-card p{margin:0}.rb-label{font:700 10px/1.3 \"JetBrains Mono\",monospace;letter-spacing:1px;text-transform:uppercase;color:#E33838}.rb-pin{position:absolute;top:12px;left:calc(50% - 8px);width:16px;height:16px;border-radius:50%;background:#E33838;box-shadow:0 3px 4px -1px #0007}.rb-card:nth-child(3n+2) .rb-pin{background:#FFCC25}.rb-card:nth-child(3n) .rb-pin{background:#8F2998}.rb-rule{width:100%;height:1px;background:#064f2b24}.rb-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:4px}.rb-btn{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:13px 18px;border-radius:14px;background:#064F2B;color:#F5F0EA;text-decoration:none;font:700 13px/1.1 \"JetBrains Mono\",monospace;letter-spacing:.4px;transition:translate .28s cubic-bezier(.2,.8,.2,1),scale .28s}.rb-more{color:#064F2B;text-decoration:underline #FFCC25 3px;text-underline-offset:5px;font:700 12px/1.4 \"JetBrains Mono\",monospace;padding:12px 0}.rb a:focus-visible{outline:3px solid #FFCC25;outline-offset:4px}.rb-empty{border-radius:20px;background:#FFF9F0;padding:28px;max-width:600px;margin:auto;font:400 14px/1.6 \"JetBrains Mono\",monospace}.rb-empty h3{font:400 30px/1 \"Londrina Solid\",sans-serif;margin:0 0 12px;text-transform:uppercase}.rb-empty p{margin:0 0 18px}@container rb (max-width:899px){.rb-card{flex-basis:calc((100% - 26px)/2)}}@container rb (max-width:599px){.rb-card{flex-basis:100%;max-width:420px;rotate:0deg}.rb-grid{gap:22px}.rb-empty{padding:22px 18px}}@media(hover:hover) and (pointer:fine){.rb-btn:hover{translate:0 -2px;scale:1.03}.rb-btn:active{scale:.97}}@media(prefers-reduced-motion:reduce){.rb-btn{transition:none}}\n`;/** Isolated preview only. The published site uses NativeRecruitmentOverrides on its original frames. */export default function RecruitmentAdverts(){const{adverts,loaded,error}=useRecruitmentAdverts(),root=React.useRef(null),signature=adverts.map(a=>a.id+\":\"+a.version).join(\",\");React.useEffect(()=>{if(!root.current||!adverts.length)return;const el=root.current;const stop=M.entrance(\"careers-adverts-\"+signature,el,tl=>{el.querySelectorAll(\".rb-card\").forEach((card,i)=>M.settle(tl,card,Math.min(i,8)*100,{y:26,rot:i%2?2:-2}));},{guarded:true,batch:true});return()=>{if(typeof stop===\"function\")stop();};},[signature]);return /*#__PURE__*/_jsxs(\"div\",{className:\"rb\",ref:root,\"data-am-own\":\"\",\"aria-busy\":!loaded,children:[/*#__PURE__*/_jsx(\"style\",{dangerouslySetInnerHTML:{__html:CSS}}),/*#__PURE__*/_jsx(\"div\",{className:\"rb-grid\",children:adverts.map((ad,i)=>/*#__PURE__*/_jsxs(\"article\",{className:\"rb-card\",style:{\"--rb-tilt\":[\"-1.4deg\",\"1.2deg\",\"-1deg\"][i%3]},children:[/*#__PURE__*/_jsx(\"span\",{className:\"rb-pin\",\"aria-hidden\":\"true\"}),/*#__PURE__*/_jsx(\"p\",{className:\"rb-label\",children:ad.hiring_now?\"Hiring now\":\"Not currently recruiting\"}),/*#__PURE__*/_jsx(\"h3\",{children:ad.title}),/*#__PURE__*/_jsx(\"p\",{children:ad.summary}),/*#__PURE__*/_jsx(\"span\",{className:\"rb-rule\",\"aria-hidden\":\"true\"}),/*#__PURE__*/_jsx(\"p\",{children:/*#__PURE__*/_jsx(\"b\",{children:ad.pay})}),/*#__PURE__*/_jsx(\"p\",{children:ad.hours}),/*#__PURE__*/_jsxs(\"div\",{className:\"rb-actions\",children:[ad.hiring_now&&/*#__PURE__*/_jsx(\"a\",{className:\"rb-btn\",href:\"/vacancies?apply=\"+encodeURIComponent(ad.id),children:\"Apply Online\"}),/*#__PURE__*/_jsx(\"a\",{className:\"rb-more\",href:link(ad),children:\"Full details →\"})]})]},ad.id))}),!adverts.length&&/*#__PURE__*/_jsxs(\"div\",{className:\"rb-empty\",children:[/*#__PURE__*/_jsx(\"h3\",{children:!loaded?\"Checking our noticeboard…\":error?\"Let’s try again\":\"No open adverts just now\"}),/*#__PURE__*/_jsx(\"p\",{children:error||\"We’re always happy to hear from good people. Send us a speculative application and tell us what you’d like to do.\"}),loaded&&!error&&/*#__PURE__*/_jsx(\"a\",{className:\"rb-btn\",href:\"/vacancies?apply=speculative\",children:\"Send a speculative application →\"})]})]});}/** Isolated preview only; never substitute this for the native published job template. */export function RecruitmentJobDetail(){const{adverts,loaded,error}=useRecruitmentAdverts(),[role,setRole]=React.useState(\"\"),root=React.useRef(null);React.useEffect(()=>{setRole(new URL(location.href).searchParams.get(\"role\")||location.pathname.split(\"/\").filter(Boolean).at(-1)||\"\");},[]);const ad=adverts.find(a=>a.id===role);React.useEffect(()=>{if(!ad||!root.current)return;document.title=ad.seo_title||ad.title+\" | Careers at Arlecchino\";const meta=document.querySelector(\"meta[name=description]\");meta?.setAttribute(\"content\",ad.seo_description||ad.summary);const stop=M.entrance(\"job-detail-\"+ad.id+\"-\"+ad.version,root.current,tl=>{M.heading(tl,root.current.querySelector(\"h1\"),0);M.draw(tl,root.current.querySelector(\".rd-line\"),220);M.rise(tl,root.current.querySelector(\".rd-card\"),300,{y:20});},{guarded:true,batch:true});return()=>{if(typeof stop===\"function\")stop();};},[ad?.id,ad?.version]);return /*#__PURE__*/_jsxs(\"main\",{className:\"rd\",ref:root,\"data-am-own\":\"\",children:[/*#__PURE__*/_jsx(\"style\",{dangerouslySetInnerHTML:{__html:CSS+`\n .rd{box-sizing:border-box;width:100%;max-width:1200px;margin:auto;padding:36px 48px 64px;color:#064F2B;font:400 14px/1.65 \"JetBrains Mono\",monospace}.rd *{box-sizing:border-box}.rd h1{font:400 64px/.98 \"Londrina Solid\",sans-serif;text-transform:uppercase;letter-spacing:-1.5px;margin:20px 0 12px;overflow-wrap:anywhere}.rd-line{display:block;width:110px;height:8px;border-radius:10px;background:#FFCC25;rotate:-2deg;margin-bottom:26px}.rd-card{background:#FFF9F0;padding:30px 28px;border-radius:20px;border:1px solid #064f2b1a}.rd h2,.rd h3,.rd h4{font:400 30px/1 \"Londrina Solid\",sans-serif;text-transform:uppercase;margin:24px 0 12px}.rd section{margin:28px 0}.rd a:not(.rb-btn){color:inherit;text-decoration:underline #FFCC25 3px;text-underline-offset:5px}.rd-top{display:flex;flex-wrap:wrap;gap:14px;align-items:center;margin:20px 0}.rd p{max-width:78ch}.rd ul{padding-left:22px}.rd-bottom{padding-top:20px;border-top:1px solid #064f2b24}@media(max-width:809.98px){.rd{padding:16px 20px 44px}.rd h1{font-size:44px}.rd-card{padding:22px 18px 20px;border-radius:18px}}\n `}}),/*#__PURE__*/_jsx(\"a\",{href:\"/vacancies\",children:\"← All opportunities\"}),!loaded?/*#__PURE__*/_jsx(\"p\",{role:\"status\",children:\"Getting the advert ready…\"}):!ad?/*#__PURE__*/_jsxs(\"div\",{className:\"rd-card\",children:[/*#__PURE__*/_jsx(\"h1\",{children:\"This advert is not available\"}),/*#__PURE__*/_jsx(\"p\",{children:error||\"Please check our noticeboard for current opportunities.\"})]}):/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"p\",{className:\"rb-label\",children:ad.hiring_now?\"Hiring now\":\"Not currently recruiting\"}),/*#__PURE__*/_jsx(\"h1\",{children:ad.title}),/*#__PURE__*/_jsx(\"span\",{className:\"rd-line\",\"aria-hidden\":\"true\"}),/*#__PURE__*/_jsx(\"p\",{children:ad.summary}),/*#__PURE__*/_jsxs(\"div\",{className:\"rd-top\",children:[/*#__PURE__*/_jsx(\"b\",{children:ad.pay}),/*#__PURE__*/_jsx(\"span\",{children:ad.hours}),ad.hiring_now&&/*#__PURE__*/_jsx(\"a\",{className:\"rb-btn\",href:\"/vacancies?apply=\"+encodeURIComponent(ad.id),children:\"Apply Online →\"})]}),/*#__PURE__*/_jsxs(\"article\",{className:\"rd-card\",children:[[\"about_html\",\"responsibilities_html\",\"requirements_html\",\"benefits_html\",\"additional_html\"].map(key=>ad[key]?/*#__PURE__*/_jsx(\"section\",{dangerouslySetInnerHTML:{__html:String(ad[key])}},key):null),/*#__PURE__*/_jsx(\"div\",{className:\"rd-bottom\",children:ad.hiring_now?/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"h2\",{children:\"Fancy joining us?\"}),/*#__PURE__*/_jsx(\"p\",{children:\"Send your CV and a short note about yourself. It starts with a chat, then a paid trial shift.\"}),/*#__PURE__*/_jsx(\"a\",{className:\"rb-btn\",href:\"/vacancies?apply=\"+encodeURIComponent(ad.id),children:\"Apply Online →\"})]}):/*#__PURE__*/_jsxs(\"p\",{children:[\"This advert is visible for information. We’re not currently recruiting for this role. You’re welcome to send a \",/*#__PURE__*/_jsx(\"a\",{href:\"/vacancies?apply=speculative\",children:\"speculative application\"}),\".\"]})})]})]})]});}\nexport const __FramerMetadata__ = {\"exports\":{\"ADVERTS_API\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"RecruitmentJobDetail\":{\"type\":\"reactComponent\",\"name\":\"RecruitmentJobDetail\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"RecruitmentHomeNotices\":{\"type\":\"reactComponent\",\"name\":\"RecruitmentHomeNotices\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"useRecruitmentAdverts\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"Advert\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"reactComponent\",\"name\":\"RecruitmentAdverts\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./RecruitmentAdverts.map"],"mappings":"A,uKAC2L,SAASQ,EAAS,EAAK,CAAC,EAASC,EAAKC,EAAU,QAAQ,GAAIC,EAAG,CAAC,CAAE,CAAC,eAAeC,GAAgB,CAAC,GAAGC,EAAO,OAAO,IAAMC,EAAW,IAAI,gBAAgBC,EAAWC,EAAM,EAAOF,EAAW,GAAG,CAAC,IAAMG,EAAE,MAAM,MAAM,gDAAmC,CAAC,YAAY,OAAO,MAAM,WAAW,OAAOH,EAAW,MAAM,CAAC,EAAE,GAAG,CAACG,EAAE,GAAG,MAAM,MAAM,aAAa,EAAE,IAAMC,EAAK,MAAMD,EAAE,KAAK,EAAKF,IAAaC,GAAMR,EAAS,CAAC,QAAQU,EAAK,QAAQ,OAAO,GAAK,MAAM,EAA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