"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[414],{8871:(M,E,n)=>{n.d(E,{Z:()=>p});var t=n(6109),$=n(8102);const D=()=>t.createElement($.q,{script:[{type:"text/javascript",innerHTML:x}]}),x=` document.addEventListener("DOMContentLoaded", (event) => { window.GeckoEngagementWidget={widgetId:"98108c8d-4ebe-43eb-b590-ecf0ff9eb4e5"}; }); (function (d) { "use strict"; var geckoScript = d.createElement("script"); geckoScript.id = "gecko-chat-script"; geckoScript.src = "https://widget.geckoengage.com/embed"; var scriptTags = d.getElementsByTagName("script")[0]; if (d.getElementById("gecko-chat-script")) { return; } scriptTags.parentNode.insertBefore(geckoScript, scriptTags); })(document) `,p=D},9017:(M,E,n)=>{n.r(E),n.d(E,{default:()=>ve});var t=n(6109),$=n(6620),D=n(958),x=n(4600),p=n(1224),Z=n(1186),P=n(4586);const R=({campus:e,deliveryMode:o,feeStatus:l,gscope:a,level:i,school:s,openForApplications:m,title:r})=>t.createElement("div",{id:"funnelback-metadata","data-campus":e,"data-deliverymode":o,"data-feestatus":l,"data-gscope":a,"data-level":i,"data-school":s,"data-open":m,"data-title":r});var v=n(5151),I=n(7074),k=n(918),L=n(6681),B=n(6442);const U={id:"",mapper:(e=[])=>e},z=()=>{const[e,o]=(0,t.useState)(U),l=(0,L.v9)(B.Fx),a=k.H+l,s="https://search.hw.ac.uk/s/recommender/similarItems.json?collection=heriot-watt~sp-scholarships&maxRecommendations=3&source="+"EXPLORE_RESULTS";if(!s||!a){console.error("funnelBackUri or pageUri is not defined");return}const m=s+"&seedItem="+a;return(0,t.useEffect)(()=>{fetch(m).then(r=>{if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);return r.json()}).then(r=>{o({id:"relatedScholarships",config:{title:"Related scholarships",customApi:{uri:m}},mapper:(S=[])=>S?.RecommendationResponse?.recommendations?.map(d=>({id:d.itemID,copy:d.metaData.c[0]||void 0,link:d.itemID,title:d.metaData.t[0]||d.title}))})}).catch(r=>console.error("Error:",r))},[s,a]),(0,I._7)(e)},W=({scholarships:e})=>t.createElement(Z.RD,null,e.map(o=>t.createElement(P.Z,{key:o.id,color:"green",...o,padded:!0})));var C=n(4666),g=n(5884),h=n(4504);const F=e=>new Date(e).toLocaleDateString("en-gb",{year:"numeric",month:"long",day:"numeric",weekday:"long"});var c=n(3519),K=n(3238),j=n(8962),H=n(3985),b=n(1183);const w=({data:e})=>e?t.createElement(H.Hg,null,e.map(o=>t.createElement(N,{...o,key:o.term}))):null,N=({term:e,detail:o})=>{const l=/\s/gi;return t.createElement(G,{"data-term":e},t.createElement(b.ZP,{as:"dt"},e),t.createElement(b.ZP,{id:"scholarship-"+e.toLowerCase().replace(l,""),as:"dd",$weight:"bold","data-value":o},o))},G=(0,c.default)(H.SL)` @media ${e=>e.theme.mq.min.mobile} { &:not(:last-child) { box-shadow: 0.0625rem 0 0 0 rgba(255, 255, 255, 0.2); } } @media ${e=>e.theme.mq.min.desktop} { max-width: calc(${e=>e.theme.grid.default.width} / 2); } &[data-term='status'] { display: none; } `,X=w,Y=({heading:e,copy:o,details:l,cta:a,share:i})=>t.createElement(J,null,t.createElement(Q,{as:"h1",$size:"1",$color:"white"},e),o&&t.createElement(V,{as:"p",$size:"4 italic",$color:"white"},o),l&&t.createElement(X,{...l}),t.createElement(K.if,null,a&&t.createElement(C.ZP,{path:a.path,$variant:a.variant},h.Mw.apply),i?t.createElement(j.Z,{variant:"whiteOutlineWhite",...i}):null)),J=c.default.div` --badge-height: 3.5rem; --badge-padding: 4rem; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; flex-shrink: 0; gap: ${e=>e.theme.spacing.s}; padding-top: ${e=>e.theme.spacing.l}; padding-right: ${e=>e.theme.spacing.xs}; padding-bottom: ${e=>e.theme.spacing.l}; padding-left: 0; @media ${e=>e.theme.mq.min.laptop} { gap: ${e=>e.theme.spacing.l}; padding-right: ${e=>e.theme.spacing.xxl}; padding-bottom: ${e=>e.theme.spacing.xl}; } @media ${e=>e.theme.mq.min.desktop} { gap: ${e=>e.theme.spacing.xl}; padding-right: ${e=>e.theme.spacing.xxxl}; padding-bottom: ${e=>e.theme.spacing.xxl}; } `,Q=(0,c.default)(g.ZP)` word-break: break-word; `,V=(0,c.default)(g.ZP)` margin-bottom: 0; `,q=Y;var _=n(4387),f=n(2361);const ee=({children:e,badge:o})=>t.createElement(te,null,t.createElement(ne,null,o?t.createElement(ae,null,t.createElement(f.H,null,t.createElement(_.Z,{...o}))):null,t.createElement(oe,null,t.createElement(f.Y,null,t.createElement(f.H,null,e))))),te=c.default.div` @media ${e=>e.theme.mq.min.laptop} { display: grid; grid-auto-columns: 1fr; grid-auto-flow: column; } `,ne=c.default.div` display: flex; flex-direction: column; background-color: ${e=>e.theme.colors.blue.dark}; `,ae=(0,c.default)(f.Y)` margin-bottom: auto; /* margin-top: ${e=>e.theme.spacing.l}; */ margin-top: 2.5rem; padding-bottom: ${e=>e.theme.spacing.m}; @media ${e=>e.theme.mq.min.tablet} { margin-top: ${e=>e.theme.spacing.xl}; } `,oe=c.default.div` color: ${e=>e.theme.colors.neutral.white}; background-color: ${e=>e.theme.colors.blue.dark}; `,le=ee;var ce=n(9453),y=n(6076),re=n(8102);const ie=({scholarship:e})=>t.createElement(re.q,null,t.createElement("script",{type:"application/ld+json"},` { "@context": "https://schema.org", "@type": "MonetaryGrant", ${e?.name?`"name": "${e.name}"`:""} ${e?.description?`,"description": "${e.description}"`:""} ${e?.amount?`,"amount": "${e.amount}"`:""} ${e?.funder?`,"funder": { "@type": "${e.funder.type}", "name": "${e.funder.name}" }`:""} } `));var se=n(512),me=n(9889),de=n(8871),pe=n(6043),he=n(6413);const ge=({mappedEntry:e})=>{const{breadcrumb:o,hero:l,keyInformation:a,content:i,relatedProgrammes:s,relatedLinks:m,relatedScholarships:r,metaData:S,funnelbackMetadata:A,scholarshipSchema:d}=e||{},fe=(0,L.v9)(pe.Kd),{results:T}=z();return t.createElement($.Z,null,t.createElement(D.Z,{pageTitle:e?.intro.content.title||"",description:S?.description,ogDescription:S?.description}),o?t.createElement(x.Z,{...o}):null,t.createElement("article",null,l?t.createElement(le,{badge:l.badge},t.createElement(q,{...l})):null,a?.overview?t.createElement(p.ZP,{...a.section,...y.W4},a.badgeStatus&&t.createElement(ce.Z,{...a.badgeStatus}),t.createElement(v.default,{text:a.overview}),a.availability&&t.createElement(O,null,t.createElement(ue,null,t.createElement(g.ZP,{as:"h3",$size:"3"},h.kw.availabilityHeading),t.createElement(v.default,{text:a.availability})),(a.isAvailable==="o"||a.isAvailable==="owc")&&a.closingDate?t.createElement(v.default,{text:h.Oz.closingInfo+""+F(a.closingDate)+"."}):null),i?.howToApply&&t.createElement(O,null,t.createElement(g.ZP,{as:"h2",$size:"2"},h.Oz.howToApply),a.isAvailable==="o"||a.isAvailable==="owc"?t.createElement(v.default,{text:i.howToApply}):null,(a.isAvailable==="o"||a.isAvailable==="owc")&&a.applyLink?.entryDescription?t.createElement(Ee,{$variant:"primary",path:a.applyLink.entryDescription},h.Mw.apply):null,a.isAvailable==="c"||a.isAvailable==="cwo"?t.createElement(b.ZP,{as:"p"},h.Oz.closedInfo):null),i?.contact?.name?t.createElement(t.Fragment,null,t.createElement(g.ZP,{as:"h2",$size:"2"},me.i.heading),t.createElement(se.Z,{...i.contact,...he.ri})):null):null,s?.content&&s?.content.length?t.createElement(p.ZP,{...s.section,...y.y$},t.createElement(Z.Ii,null,s.content.map(u=>t.createElement(P.Z,{key:u.title,...u,padded:!0})))):null,m?.content&&m?.content.length?t.createElement(p.ZP,{...m.section,...y.y$},t.createElement(Z.Ii,null,m.content.map(u=>t.createElement(P.Z,{key:u.title,...u,padded:!0})))):null,r&&T?.length?t.createElement(p.ZP,{...r.section,...y.y$},t.createElement(W,{scholarships:T})):null,A?t.createElement(R,{...A}):null,d?t.createElement(ie,{...d}):null,fe==="uk"&&t.createElement(de.Z,null)))},O=c.default.div` display: grid; gap: ${e=>e.theme.spacing.s}; `,ue=c.default.div` display: grid; gap: ${e=>e.theme.spacing.s}; `,Ee=(0,c.default)(C.ZP)` max-width: fit-content; `,ve=ge}}]);