import{_ as Y,a as q}from"./Image.vue.CPCAhc4E.js";import{a as D,_ as Q}from"./Layouts.vue.d17mTwCx.js";import{g as H,r as d,y as z,S as R,o as u,c as y,a as t,L as P,m as e,Q as M,z as j,K as B,b as _,d as I,t as W,n as k,T as G,U as J,V as X,j as x,w as f,R as Z,J as ee,E as te,D as oe,P as se,W as V,X as ne,h as le,i as re,s as ae,Y as ie,M as ce,k as ue,A as de,F as pe,B as fe}from"./entry.Ddy3dMw-.js";import{_ as _e}from"./TagList.vue.D3xSu0MF.js";import{_ as ve}from"./Section.yx9Eiag9.js";import{_ as me}from"./OverwriteBlockHeaders.vue.ByugyUZP.js";import{_ as he}from"./Video.vue.CoJ9SN4r.js";import{a as ge}from"./home.DFk1FaXE.js";import"./image.Ca_qe83Z.js";const ke={class:"overflow-hidden"},ye=H({__name:"HeaderSection",setup($){const n=d(null),r=d(0),s=d(!1),i=()=>{n.value&&(r.value=n.value.offsetHeight)};return z(async()=>{r.value=window.innerHeight,n.value&&(await new Promise(a=>setTimeout(a,500)),i(),window.addEventListener("resize",i),s.value=!0)}),R(()=>{window.removeEventListener("resize",i)}),(a,o)=>(u(),y("div",null,[t("div",{style:j({height:e(r)?e(r)+"px":"100vh",transition:"height 1.5s ease-out"})},[t("div",{ref_key:"el",ref:n,style:{transition:"transform 1.5s ease-out, opacity 500ms ease-in-out"},class:P({"translate-y-[12%] opacity-0":!e(s),"translate-y-0 opacity-100":e(s)})},[M(a.$slots,"header")],2)],4),t("div",ke,[t("div",{style:{transition:"transform 1.5s ease-out"},class:P({"scale-150":!e(s),"scale-100":e(s)})},[M(a.$slots,"cover")],2)])]))}}),be={class:"relative mb-linebreak"},we=["innerHTML"],xe={key:0},$e={class:"w-3"},Le=H({__name:"Text",props:{text:{}},setup($){const n=$,r=d(!1),s=B(()=>n.text.split("</p>")[0]+"</p>");return(i,a)=>{const o=G;return u(),y("div",null,[t("div",be,[t("div",{class:"body-text",innerHTML:e(r)?i.text:e(s)},null,8,we)]),e(s)!==i.text?(u(),y("div",xe,[t("button",{class:"flex items-center gap-2 link",onClick:a[0]||(a[0]=v=>r.value=!e(r))},[t("span",$e,[_(o,{class:P({"transform rotate-45":e(r),"transform rotate-135":!e(r)})},null,8,["class"])]),I(" "+W(e(r)?"Close":"Read the full story"),1)])])):k("",!0)])}}}),Te=["src","alt"],Ee={class:"w-full h-full"},je=["src","srcset","sizes","alt"],He={key:1,class:"flex items-center justify-center w-full font-mono text-sm bg-white h-72"},Me=H({__name:"FillImage",props:{block:{}},setup($){const n=$,s=J().value.images,i=n.block.content.ratio||"auto";i!=="auto"&&i.split("/");const a=d(),{width:o}=X(a),v=B(()=>n.block.content.location==="web"?!n.block.content.src:n.block.content.location==="kirby"?n.block.content.image.length===0:!0);return(c,m)=>{var h;const g=Y;return e(v)?(u(),y("div",He," Empty Image Block ")):(u(),y("figure",{key:0,ref_key:"figure",ref:a,class:"relative w-full h-full"},[t("div",null,[c.block.content.location==="web"?(u(),y("img",{key:0,src:c.block.content.src,alt:c.block.content.alt},null,8,Te)):e(s)?(u(),x(g,{key:1,uuid:(h=n.block.content.image)==null?void 0:h[0],collection:e(s)},{default:f(({item:l})=>[t("div",Ee,[t("img",{src:l.src,srcset:l.srcset,sizes:`${e(o)}px`,class:"absolute top-0 left-0 object-cover w-full h-full",alt:l.alt},null,8,je)])]),_:1},8,["uuid","collection"])):k("",!0)])],512))}}}),Pe={class:"relative flex flex-col h-full"},ze={class:"lg:h6"},Be=["innerHTML"],Ce=["innerHTML"],Se=H({__name:"NextProject",props:{project:{},progress:{}},setup($){const n=Z();function r(l){return 1-Math.pow(1-l,3)}const s=$,i=s.project.kirbyThumb;i&&ee(i);const a=d(!1),o=d(null),v=d(0),c=d(!1),m=B(()=>{if(s.project.thumbnailVideo[0])return s.project.thumbnailVideo[0];if(s.project.thumbnail[0])return s.project.thumbnail[0];if(s.project.coverVideo[0])return s.project.coverVideo[0];if(s.project.cover[0])return s.project.cover[0]}),g=()=>{o.value&&(v.value=o.value.offsetHeight)},h=async()=>{a.value=!a.value,window.dispatchEvent(new Event("nextProjectLeave")),await new Promise(l=>setTimeout(l,1e3)),n.push({path:"/"+s.project.uri})};return z(async()=>{window.addEventListener("resize",g),g()}),R(()=>{window.removeEventListener("resize",g)}),(l,p)=>{const L=Me,T=he;return u(),y("div",Pe,[t("div",{class:"relative h-full overflow-hidden",style:j({opacity:r(l.progress)})},[e(m)?(u(),y("div",{key:0,class:"absolute top-0 left-0 w-full h-full overflow-hidden cursor-pointer",style:j({transform:`scale(${("map"in l?l.map:e(te))(r(l.progress),0,1,1.5,1)})`}),onClick:h,onMouseenter:p[0]||(p[0]=b=>c.value=!0),onMouseleave:p[1]||(p[1]=b=>c.value=!1)},[e(m).type==="image"?(u(),x(L,{key:0,block:e(m)},null,8,["block"])):k("",!0),e(m).type==="video"?(u(),x(T,{key:1,block:e(m),fill:!0},null,8,["block"])):k("",!0)],36)):k("",!0)],4),t("div",{class:"flex-shrink-0",style:j({transition:e(a)?"all 1.5s ease":"none",opacity:e(a)?0:l.progress,height:e(a)?"100%":e(v)+"px"})},[t("div",{ref_key:"footerEl",ref:o,class:"grid grid-cols-2 p-4 md:px-8 gap-gap lg:py-gap-half 2xl:py-gap py-em pb-gap"},[t("div",ze,[t("button",{class:P(["text-left transition-all",{"decoration-current underline ":e(c),"decoration-transparent":!e(c)}]),onClick:h,onMouseenter:p[2]||(p[2]=b=>c.value=!0),onMouseleave:p[3]||(p[3]=b=>c.value=!1)}," next project ",34)]),t("div",null,[t("button",{class:"text-left link",onClick:h,onMouseenter:p[4]||(p[4]=b=>c.value=!0),onMouseleave:p[5]||(p[5]=b=>c.value=!1)},[t("div",{class:"font-bold lg:h3 h5",innerHTML:l.project.heading},null,8,Be),t("div",{class:"lg:h6",innerHTML:l.project.subheading},null,8,Ce)],32)])],512)],4)])}}}),Ve={class:"relative bg-black"},Re={class:"pointer-events-auto"},Ie={class:"h-full overflow-hidden"},We=H({__name:"WorkPage",setup($){const n=d(null),r=d(null),s=d(null),i=d(null),a=d(0),o=d(0),v=d(0),c=d(!1),m=()=>{!n.value||!s.value||(a.value=n.value.offsetHeight)},g=()=>{if(!i.value||!s.value)return;const l=s.value.offsetTop+s.value.offsetHeight,p=i.value.offsetTop+i.value.offsetHeight,L=window.scrollY+window.innerHeight;if(o.value=V(L,l,p,0,1),!r.value||c.value)return;const T=r.value.offsetHeight,b=l+T;v.value=V(L,l,b,0,1)},h=()=>{c.value=!0};return z(async()=>{await oe(),window.addEventListener("resize",m),window.addEventListener("scroll",g),window.addEventListener("nextProjectLeave",h),m()}),se(()=>{window.removeEventListener("resize",m),window.removeEventListener("scroll",g),window.removeEventListener("nextProjectLeave",h)}),(l,p)=>{const L=ne;return u(),y("div",Ve,[t("div",{ref_key:"contentWrapperEl",ref:i,class:"relative pointer-events-none wrapper",style:j({zIndex:1,paddingBottom:e(a)+"px"})},[t("div",Re,[M(l.$slots,"header"),t("div",{ref_key:"contentEl",ref:s,class:"px-4 md:px-8 bg-thonik-grey"},[M(l.$slots,"default")],512)])],4),t("div",{ref_key:"revealEl",ref:n,class:"fixed bottom-0 left-0 flex flex-col w-full h-screen overflow-hidden"},[t("div",Ie,[M(l.$slots,"reveal",{progress:e(o)})]),t("div",{ref_key:"footerEl",ref:r,class:"flex-shrink-0",style:j({transition:e(c)?"transform 1s ease":void 0,transform:e(c)?"translateY(100%)":"translateY("+(1-e(v))*100+"%)"})},[_(L)],4)],512)])}}}),Fe={class:"px-4 pb-8 text-white md:p-8 md:pb-16"},Ne=["innerHTML"],Ke=["innerHTML"],Ue={class:"grid grid-cols-1 md:grid-cols-2"},Ae=t("div",{class:"mb-1 font-bold"},"Services",-1),Oe={class:"flex gap-1"},Ye=t("div",{class:"font-bold"},"Field",-1),qe={class:"flex gap-2 body-text"},De={key:0},Qe=["innerHTML"],Ge={class:"h-full text-white bg-black"},rt=H({__name:"[...id]",async setup($){var m,g,h;let n,r;const s=le(),{data:i,error:a}=([n,r]=re(()=>ue(ge(s.path))),n=await n,r(),n);if(a.value)throw a.value;const o=(m=i.value)==null?void 0:m.result;ae(o);const v=d(!1);o?((g=o.coverVideo)==null?void 0:g.length)>0?v.value="video":((h=o.cover)==null?void 0:h.length)>0&&(v.value="image"):ie("/");const c=o.related||o.randomRelated;return(l,p)=>{const L=q,T=D,b=ye,F=_e,E=ve,N=ce("RouterLink"),C=me,K=Le,S=Q,U=Se,A=fe,O=We;return e(o)?(u(),x(O,{key:0},{header:f(()=>[_(b,{class:"pt-16 bg-black"},{header:f(()=>[t("div",Fe,[t("h1",{innerHTML:e(o).heading},null,8,Ne),t("h1",{class:"font-normal",innerHTML:e(o).subheading},null,8,Ke)])]),cover:f(()=>[e(v)==="image"?(u(),x(L,{key:0,block:e(o).cover[0]},null,8,["block"])):k("",!0),e(v)==="video"?(u(),x(T,{key:1,blocks:e(o).coverVideo??[],"no-gaps":!0,rounded:!1},null,8,["blocks"])):k("",!0)]),_:1})]),reveal:f(({progress:w})=>[t("div",Ge,[_(A,null,{default:f(()=>[e(c)?(u(),x(U,{key:0,project:e(c),progress:w},null,8,["project","progress"])):k("",!0)]),_:2},1024)])]),default:f(()=>[_(E,{class:"lg:pt-gap pt-gap-half"},{default:f(()=>[t("div",Ue,[t("div",null,[_(E,null,{default:f(()=>[Ae,t("div",Oe,[_(F,{block:{id:"taglist",type:"taglist",isHidden:!1,content:{tags:e(o).categories.toString(),customtags:""}}},null,8,["block"])])]),_:1}),_(E,null,{default:f(()=>[Ye,t("div",qe,[(u(!0),y(pe,null,de(e(o).fields,w=>(u(),x(N,{key:w,to:{path:"/work",query:{field:w}}},{default:f(()=>[I(W(e(o).parentFields[w].title),1)]),_:2},1032,["to"]))),128))])]),_:1}),_(E,null,{default:f(()=>[_(C,{blocks:e(o).surplus,header:"p"},{default:f(({blocks:w})=>[_(T,{blocks:w??[],"no-gaps":!0},null,8,["blocks"])]),_:1},8,["blocks"])]),_:1})]),e(o).text?(u(),y("div",De,[_(K,{text:e(o).text},null,8,["text"])])):k("",!0)])]),_:1}),_(E,null,{default:f(()=>[_(S,{layouts:e(o).layouts??[],rounded:!0,transitions:!0},null,8,["layouts"])]),_:1}),e(o).furtherInfo.length>0?(u(),x(E,{key:0},{default:f(()=>[t("h4",{class:"mb-8",innerHTML:e(o).furtherInfoTitle||"Further Info"},null,8,Qe),_(C,{layouts:e(o).furtherInfo,header:"p"},{default:f(({layouts:w})=>[_(S,{layouts:w??[],"no-gaps":!1},null,8,["layouts"])]),_:1},8,["layouts"])]),_:1})):k("",!0)]),_:1})):k("",!0)}}});export{rt as default};