{"version":3,"file":"WorkTile.CPaWuTLk.mjs","names":["_Fragment","useState","useRef","useCallback","__esmMin","init_npm_react_18_3_1","ne","init_ssg_sandbox_shims","window","l","_e","p","init_jsx_runtime","ce","de","AnimatePresence","init_framer_motion_DhsWWWsN","motion","init_framer_BWFVvmND","ControlType","addPropertyControls","goToWorkPage","link","getRegistry","nextIndex","getShowcaseStore","notifyShowcase","store","fn","isSpotifyUrl","url","extractVimeoId","match","loadVimeoScript","vimeoScriptPromise","script","resolve","WorkTile","props","ShowcaseTile","GridTile","SHOWCASE_CSS","ShowcaseTileView","hasPreview","previewVideoUrl","myIndex","outerRef","videoRef","wasFeaturedRef","position","setPosition","featured","setFeatured","revealed","setRevealed","settled","setSettled","everInView","setEverInView","inView","setInView","wrapperLink","setWrapperLink","ownLink","pageLink","read","anchor","href","prev","title","coverImage","year","category","vimeoUrl","onChange","pos","a","b","timer","el","settleTimer","observer","entry","entries","reduced","isTouch","handleEnter","handleLeave","handleClick","row","SHOWCASE_COLUMNS","col","revealDelay","REVEAL_ROW_DELAY","REVEAL_COL_DELAY","accent","accentColor","ACCENT","maxWidthCss","maxTileWidth","DESIGN_WIDTH","radius","DIM_BRIGHTNESS","videoId","hasPage","usingNativePreview","layout","setLayout","normalizedCategory","hops","cs","REGISTRY_EVENT","recompute","parent","containerWidth","columns","NARROW_BELOW","COLUMNS_NARROW","COLUMNS","tileWidth","GAP","tileHeight","active","DEFAULT_CATEGORY","cat","ALL_CATEGORY","idx","t","CATEGORY_EVENT","containerRef","nativeVideoRef","previewIframeRef","previewPlayerRef","loopRangeRef","lastClientPos","hovering","setHovering","cursorPos","setCursorPos","cancelled","player","half","mid","duration","start","end","data","range","updateCursorFromEvent","rect","handleMouseEnter","onScroll","x","y","SANS","SHOWCASE_NORMAL","init_WorkTile"],"sources":["https:/framerusercontent.com/modules/sbBclgIW5kMDcuKzU9rM/rtEo1qnFdUYC1CZN4Wey/WorkTile.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useCallback,useEffect,useRef,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{motion,AnimatePresence}from\"framer-motion\";const CATEGORY_EVENT=\"misc:work-category-change\";// Tells WorkGridSpacer.tsx that a tile has joined or left, so it can work out the page height.\nconst REGISTRY_EVENT=\"misc:work-registry-change\";// \"All\" is not a CMS category: it shows every work (see CategoryFilterRow.tsx). It is the default.\nconst ALL_CATEGORY=\"All\";const DEFAULT_CATEGORY=ALL_CATEGORY;// Three columns; two on a narrow screen (under NARROW_BELOW px wide). WorkGridSpacer.tsx uses the same.\nconst COLUMNS=3;const COLUMNS_NARROW=2;const NARROW_BELOW=600;// The tiles stand close together (both across and down), like the work pages of other studios\n// (about 10 – 15px): the pictures are what has to be seen, not the space between them.\n// WorkGridSpacer.tsx uses the same columns and gap.\nconst GAP=10;// The site's body font; the title on a tile is its \"Small\" size (11px), the \"VIEW\" label its \"Medium\" (13px).\nconst SANS=\"'Instrument Sans', Inter, sans-serif\";// Go to the page of a work (its own page, made from the CMS). The link comes from the \"Page link\" control, which is\n// bound to the page of the current CMS item, or from a link on the frame around the tile.\nfunction goToWorkPage(link){if(typeof window===\"undefined\"||!link)return;try{window.location.assign(new URL(link,window.location.href).href);}catch(e){window.location.assign(link);}}function getRegistry(){if(typeof window===\"undefined\")return new Map;if(!window.__miscWorkRegistry)window.__miscWorkRegistry=new Map;return window.__miscWorkRegistry;}function nextIndex(){if(typeof window===\"undefined\")return 0;window.__miscWorkIndexCounter=window.__miscWorkIndexCounter??0;return window.__miscWorkIndexCounter++;}// Shared with ShowcaseHero.tsx and ServicesFeature.tsx (same shape, created by whichever mounts first): the\n// showcase tiles publish their data here, the hero reads it, and both react to\n// `hovered` / `featured` through the listener set.\nfunction getShowcaseStore(){if(typeof window===\"undefined\")return{items:new Map,featured:null,hovered:null,listeners:new Set};if(!window.__miscShowcase){window.__miscShowcase={items:new Map,featured:null,hovered:null,listeners:new Set};}return window.__miscShowcase;}function notifyShowcase(store){store.listeners.forEach(fn=>fn());}// A work whose link (\"Video URL\") is a Spotify one is a music work (its page shows the cover and Spotify's player):\n// it is left out of the landing showcase (not a tile, not in the big video's cycle).\nfunction isSpotifyUrl(url){return/(?:^|\\/\\/|\\.)spotify\\.(?:com|link)/i.test((url||\"\").trim());}function extractVimeoId(url){const match=(url||\"\").match(/vimeo\\.com\\/(?:video\\/)?(\\d+)/);return match?match[1]:null;}let vimeoScriptPromise=null;function loadVimeoScript(){if(typeof window===\"undefined\")return Promise.resolve();if(window.Vimeo)return Promise.resolve();if(vimeoScriptPromise)return vimeoScriptPromise;vimeoScriptPromise=new Promise(resolve=>{const script=document.createElement(\"script\");script.src=\"https://player.vimeo.com/api/player.js\";script.async=true;script.onload=()=>resolve();document.head.appendChild(script);});return vimeoScriptPromise;}/**\n * Two layouts share this component so one Collection List (and its CMS\n * bindings) can serve both pages:\n *  - mode \"grid\" (default): the filterable Work-page grid (GridTile below).\n *  - mode \"showcase\": a tile in the landing page's row of small previews\n *    (ShowcaseTile below), paired with ShowcaseHero.tsx, which shows the\n *    featured item large.\n *\n * Click goes to the page of the work (\"Page link\", bound to the CMS page of the current item). There is no lightbox\n * any more.\n */export default function WorkTile(props){if(props.mode===\"showcase\")return /*#__PURE__*/_jsx(ShowcaseTile,{...props});return /*#__PURE__*/_jsx(GridTile,{...props});}/* ------------------------------------------------------------------ *//* Showcase mode                                                       *//* ------------------------------------------------------------------ */const SHOWCASE_COLUMNS=10;const DIM_BRIGHTNESS=.5// brightness of the tiles that are not the featured one\n;const ACCENT=\"rgb(51, 162, 0)\";const REVEAL_ROW_DELAY=.16// seconds between rows when the wall fades in top → bottom\n;const REVEAL_COL_DELAY=.015;// The landing showcase is drawn for a screen this wide (a 16 inch MacBook Pro): on a narrower screen everything in it\n// (the big video, the tiles, the spaces) shrinks in the same proportion; on a wider one it stays this size.\nconst DESIGN_WIDTH=1728;// Layout fixes for the landing page's showcase, written as CSS because the frames around the tiles are Framer's\n// own (the Phone breakpoint is not reachable from the code):\n//  - the Showcase section keeps its content at the top (on the Phone breakpoint it was centred in a section that is\n//    several screens tall, so the hero and the tiles stood far below the screen when the page came to rest on it);\n//  - the pinned block inside it (ShowcasePin) is a screen tall at every breakpoint, with its content in the middle\n//    of the screen (on the Phone breakpoint it was only as tall as its content, so it stood at the top);\n//  - while the big video is a normal one (not the phone's row of swipeable cards, which has the class\n//    `misc-showcase-track`) the list the tiles sit in never clips them, and on a narrow screen its rows are as tall\n//    as the tiles (they were 0 high, so a second row lay on the first and the tiles were clipped). With the\n//    swipeable cards the small tiles stay out of sight, as before: the cards are the showcase there;\n//  - between 640 and 809px (the Phone breakpoint, but wide enough for the big video to stay a normal one) the\n//    showcase is the desktop one in proportion: the big video 33.45% of the screen width, with the captions at 11% from\n//    each side, the list of tiles six columns wide, 76.44% of the screen width, with 24px between the columns and\n//    108px between the rows, 7.9% of the screen width between the big video and the tiles, and 4.2% between the tiles\n//    and the \"Request our portfolio\" link (the Phone breakpoint made all of this full width, three columns, 12px,\n//    0 high, and had no space under the big video and 73px above the link).\n//    The width of the big video's own box is left alone (it decides between the normal video and the cards);\n//  - a music work (see isSpotifyUrl) leaves a marker instead of a tile, and the frame around it (the link of the\n//    list item) is taken out of the grid, so it leaves no empty cell.\nconst SHOWCASE_NORMAL=`[data-framer-name=\"Showcase\"]:not(:has(.misc-showcase-track))`;const SHOWCASE_CSS=`\n[data-framer-name=\"Showcase\"] { justify-content: flex-start !important; }\n[data-framer-name=\"ShowcasePin\"] { min-height: 100vh !important; justify-content: center !important; }\n[data-framer-name=\"Showcase\"] *:has(> * > [data-misc-hidden-tile]) { display: none !important; }\n${SHOWCASE_NORMAL} *:has(> * > * > [data-misc-showcase-tile]) { overflow: visible !important; }\n@media (max-width: 809px) {\n    ${SHOWCASE_NORMAL} *:has(> * > * > [data-misc-showcase-tile]) { grid-auto-rows: auto !important; }\n    ${SHOWCASE_NORMAL} *:has(> * > [data-misc-showcase-tile]) { height: auto !important; }\n}\n@media (min-width: 640px) and (max-width: 809px) {\n    ${SHOWCASE_NORMAL} [data-framer-name=\"ShowcaseContent\"] div[style*=\"grid-template-columns\"] {\n        grid-template-columns: 1fr calc(min(100vw, ${DESIGN_WIDTH}px) * 0.3345) 1fr !important;\n        padding-left: 11% !important;\n        padding-right: 11% !important;\n        box-sizing: border-box !important;\n    }\n    ${SHOWCASE_NORMAL} *:has(> * > * > [data-misc-showcase-tile]) {\n        width: 76.44% !important;\n        height: auto !important;\n        margin-top: min(7.9vw, 137px) !important;\n        grid-template-columns: repeat(6, minmax(0, 1fr)) !important;\n        grid-template-rows: none !important;\n        gap: 108px 24px !important;\n    }\n    ${SHOWCASE_NORMAL} [data-framer-name=\"ShowcaseContent\"] + * > div { height: min(4.2vw, 73px) !important; }\n}\n`;// The tile of the landing row: a music work leaves only a marker (and the CSS above takes its frame out of the grid).\nfunction ShowcaseTile(props){if(isSpotifyUrl(props.vimeoUrl)){return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:SHOWCASE_CSS}),/*#__PURE__*/_jsx(\"div\",{\"data-misc-hidden-tile\":\"\",style:{display:\"none\"}})]});}return /*#__PURE__*/_jsx(ShowcaseTileView,{...props});}/**\n * A small preview in the landing row. Unlike the Work-page grid tile it\n * does not position itself: the Collection List around it is a plain Framer\n * grid and the tile just fills its cell, 16:9. `maxTileWidth` (px, as it is on a screen DESIGN_WIDTH wide) caps its\n * width: the tile then stands at the left of its cell, keeps that size on a screen as wide as that or wider, and\n * shrinks in proportion to the screen's width on a narrower one (never wider than its cell).\n * It publishes its data to the\n * shared showcase store (the order of the Collection List is the order of\n * the row and of the hero's cycle). Every tile shows its cover image; only the\n * featured tile (the work shown in the big video) fades its preview clip in over\n * the cover, plays it, and is shown at full brightness, with a frame. When the\n * tile stops being featured the clip fades out and pauses, and the cover image\n * is what is seen again; all the others stand still, with the cover only, and\n * are darkened. On hover it tells the hero to show this work (the hero pauses\n * its auto-cycle meanwhile).\n *\n * The page of the work comes from the \"Page link\" control; when that is empty, from the link on the frame around\n * the tile (a link set on the Collection List's item makes Framer wrap the tile in an <a>): the tile reads it and\n * hands it on to the big video too. Click goes to that page (when the link is on the frame around the tile, Framer\n * itself does it); on touch screens the first tap features the tile and the second goes to the page. The tiles fade in\n * the first time they scroll into view.\n */function ShowcaseTileView({coverImage,vimeoUrl,previewVideoUrl,title,category,year,radius,accentColor,pageLink,maxTileWidth}){const hasPreview=(previewVideoUrl||\"\").trim().length>0;const[myIndex]=useState(()=>nextIndex());const outerRef=useRef(null);const videoRef=useRef(null);const wasFeaturedRef=useRef(false);const[position,setPosition]=useState(0);const[featured,setFeatured]=useState(false);const[revealed,setRevealed]=useState(false);const[settled,setSettled]=useState(false);const[everInView,setEverInView]=useState(false);const[inView,setInView]=useState(false);// the link of the frame around the tile, if it has one\nconst[wrapperLink,setWrapperLink]=useState(\"\");const ownLink=(pageLink||\"\").trim();const link=ownLink||wrapperLink;const hasPage=link.length>0;// Read the link of the frame around the tile (Framer renders it as an <a> around the tile).\nuseEffect(()=>{const read=()=>{const anchor=outerRef.current?outerRef.current.closest(\"a\"):null;const href=anchor?anchor.getAttribute(\"href\")||\"\":\"\";setWrapperLink(prev=>prev===href?prev:href);};read();const t=window.setTimeout(read,600);return()=>window.clearTimeout(t);},[pageLink,title]);// Publish this item's data for the hero.\nuseEffect(()=>{const store=getShowcaseStore();store.items.set(myIndex,{index:myIndex,previewVideoUrl:previewVideoUrl||\"\",coverImage:coverImage||\"\",title:title||\"\",year:year||\"\",category:category||\"\",vimeoUrl:vimeoUrl||\"\",pageLink:link});notifyShowcase(store);return()=>{store.items.delete(myIndex);if(store.hovered===myIndex)store.hovered=null;if(store.featured===myIndex)store.featured=null;notifyShowcase(store);};},[myIndex,previewVideoUrl,coverImage,title,year,category,vimeoUrl,link]);// Follow the store: my place in the row (for the reveal delay) and whether I'm featured.\nuseEffect(()=>{const store=getShowcaseStore();const onChange=()=>{const keys=Array.from(store.items.keys()).sort((a,b)=>a-b);const pos=keys.indexOf(myIndex);if(pos>=0)setPosition(prev=>prev===pos?prev:pos);setFeatured(store.featured===myIndex);};store.listeners.add(onChange);const timer=window.setTimeout(onChange,0);return()=>{window.clearTimeout(timer);store.listeners.delete(onChange);};},[myIndex]);// Fade in the first time the tile scrolls into view; only load the clip once it is near the screen.\nuseEffect(()=>{const el=outerRef.current;if(!el||typeof IntersectionObserver===\"undefined\"){setRevealed(true);setEverInView(true);setInView(true);return undefined;}let settleTimer=0;const observer=new IntersectionObserver(entries=>{const entry=entries[entries.length-1];if(!entry)return;setInView(entry.isIntersecting);if(entry.isIntersecting){setEverInView(true);setRevealed(prev=>{if(!prev)settleTimer=window.setTimeout(()=>setSettled(true),3200);return true;});}},{rootMargin:\"120px 0px 120px 0px\",threshold:.05});observer.observe(el);return()=>{window.clearTimeout(settleTimer);observer.disconnect();};},[]);// Only the featured tile plays (from the start each time it becomes featured); the others\n// stand still. Nothing plays for people who prefer reduced motion.\nuseEffect(()=>{const el=videoRef.current;if(!el)return undefined;const reduced=typeof window!==\"undefined\"&&window.matchMedia&&window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;if(!featured||!inView||reduced){el.pause();wasFeaturedRef.current=false;return undefined;}if(!wasFeaturedRef.current){wasFeaturedRef.current=true;el.currentTime=0;}el.play().catch(()=>{});return undefined;},[featured,inView,everInView]);const isTouch=()=>typeof window!==\"undefined\"&&!!window.matchMedia&&window.matchMedia(\"(hover: none)\").matches;const handleEnter=()=>{if(isTouch())return;const store=getShowcaseStore();store.hovered=myIndex;notifyShowcase(store);};const handleLeave=()=>{if(isTouch())return;const store=getShowcaseStore();if(store.hovered===myIndex)store.hovered=null;notifyShowcase(store);};const handleClick=e=>{const store=getShowcaseStore();// On touch screens the first tap features the tile (and goes nowhere), the second goes to the page.\nif(isTouch()&&store.hovered!==myIndex){e.preventDefault();e.stopPropagation();store.hovered=myIndex;notifyShowcase(store);return;}// The link is on the frame around the tile: Framer takes the click from here.\nif(!ownLink&&wrapperLink)return;e.stopPropagation();if(ownLink)goToWorkPage(ownLink);else{store.hovered=myIndex;notifyShowcase(store);}};const row=Math.floor(position/SHOWCASE_COLUMNS);const col=position%SHOWCASE_COLUMNS;const revealDelay=settled?0:row*REVEAL_ROW_DELAY+col*REVEAL_COL_DELAY;const accent=accentColor||ACCENT;const maxWidthCss=maxTileWidth&&maxTileWidth>0?`calc(min(100vw, ${DESIGN_WIDTH}px) * ${(maxTileWidth/DESIGN_WIDTH).toFixed(5)})`:undefined;return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:SHOWCASE_CSS}),/*#__PURE__*/_jsx(\"div\",{ref:outerRef,\"data-misc-showcase-tile\":\"\",style:{position:\"relative\",width:\"100%\",maxWidth:maxWidthCss,aspectRatio:\"16 / 9\",opacity:revealed?1:0,transform:revealed?\"translateY(0px)\":\"translateY(14px)\",transition:`opacity 0.8s ease ${revealDelay}s, transform 0.9s cubic-bezier(0.22,1,0.36,1) ${revealDelay}s`},children:/*#__PURE__*/_jsx(\"div\",{onMouseEnter:handleEnter,onMouseLeave:handleLeave,onClick:handleClick,style:{position:\"relative\",width:\"100%\",height:\"100%\",borderRadius:radius,overflow:\"hidden\",cursor:\"pointer\",background:\"#282828\",outline:`1.5px solid ${featured?accent:\"transparent\"}`,outlineOffset:3,transition:\"outline-color 0.4s ease\"},children:/*#__PURE__*/_jsxs(\"div\",{style:{position:\"absolute\",inset:0,filter:`brightness(${featured?1:DIM_BRIGHTNESS})`,transition:\"filter 0.5s ease\"},children:[coverImage&&/*#__PURE__*/_jsx(\"img\",{src:coverImage,alt:title||\"\",style:{position:\"absolute\",inset:0,width:\"100%\",height:\"100%\",objectFit:\"cover\",pointerEvents:\"none\"}}),everInView&&hasPreview?/*#__PURE__*/_jsx(\"video\",{ref:videoRef,src:previewVideoUrl,muted:true,loop:true,playsInline:true,preload:\"auto\",style:{position:\"absolute\",inset:0,width:\"100%\",height:\"100%\",objectFit:\"cover\",pointerEvents:\"none\",opacity:featured||!coverImage?1:0,transition:\"opacity 0.4s ease\"}}):null]})})})]});}/* ------------------------------------------------------------------ *//* Grid mode (Work page)                                               *//* ------------------------------------------------------------------ *//**\n * A single \"Work\" grid tile: 16:9, always shows `coverImage` as a static\n * poster, and on hover crossfades to a looping preview clip\n * (`previewVideoUrl`, a lightweight self-hosted file — same pattern as\n * RecentWorkVideo.tsx / ServicesInteractive.tsx's VideoTile) while the\n * cursor is replaced by a \"VIEW\" label that follows it. Leaving\n * `previewVideoUrl` empty falls back to a slower Vimeo-iframe preview\n * (parsed from `vimeoUrl`) instead. Clicking goes to the page of the work\n * (\"Page link\", bound to the CMS page of the current item).\n *\n * The title stands at the bottom left in white (the site's \"Small\" size, 11px) on a soft dark fade at the\n * foot of the picture, so it can be read on a pale picture as well; the \"VIEW\" label is the \"Medium\" size (13px).\n * The grid is three columns wide, two on a narrow screen (the list narrower than 600 px).\n *\n * `vimeoUrl` is a Link control (not a plain string) specifically so it\n * binds cleanly to a CMS Link-type field (\"Video URL\") in a Collection\n * List item template — a String control only ever offered boolean\n * \"Is Set / Isn't Set\" derivations of a Link field, not its actual URL.\n *\n * `category` mirrors the CMS \"Category 2\" field, used for filtering via\n * a shared `misc:work-category-change` window event (dispatched by\n * CategoryFilterRow.tsx). A tile is shown when its category equals the\n * active one, or when the active one is \"All\" (the default).\n *\n * IMPORTANT layout note: Framer's native Collection List \"grid\" layout\n * re-renders its own item wrappers on a schedule outside this\n * component's control, which silently reverts any attempt to reposition\n * or hide those wrapper elements via direct DOM mutation (confirmed:\n * animations would play once and then snap back). So this tile does not\n * rely on the parent grid at all — the \"Works\" collection must have no\n * Framer grid layout applied, and this component positions *itself* with\n * `position: absolute`, computed in React state and re-rendered through\n * normal React data flow (never mutated imperatively), which Framer has\n * no reason to fight. Every mounted tile registers its CMS category in\n * a small shared `window.__miscWorkRegistry` map keyed by a stable\n * mount-order index; on every filter change (or resize) each tile\n * independently recomputes its own row/column among the tiles that\n * currently match, so the visible set re-packs from the top-left with\n * no gaps, animated via a plain CSS transition on left/top/opacity.\n * (The \"Works\" list therefore can't grow with the tiles: WorkGridSpacer.tsx,\n * placed right under a \"Works\" list of height 0, takes the height they need.)\n *\n * Framer also applies an arbitrary negative `left` offset (via a\n * generated CSS class, not an inline style) to a freshly inserted\n * component instance's wrapper, which its own editing tools can't\n * override after the fact. That offset is detected via computed style\n * and cancelled with a higher-specificity inline override once on\n * mount, so this tile's own absolute positioning has a clean, zero\n * origin to compute from.\n *\n * Meant to be used as a Collection List item template: each prop is a\n * plain, CMS-bindable control (Image / File / String / Link) so it can\n * be wired directly to a collection's fields per item.\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */function GridTile(props){const{coverImage,vimeoUrl,previewVideoUrl,title,category,radius,pageLink}=props;const videoId=extractVimeoId(vimeoUrl);const hasPage=(pageLink||\"\").trim().length>0;const usingNativePreview=(previewVideoUrl||\"\").trim().length>0;const[myIndex]=useState(()=>nextIndex());const outerRef=useRef(null);const[layout,setLayout]=useState({left:0,top:0,width:0,height:0,visible:true,ready:false});const normalizedCategory=(category||\"\").trim();useEffect(()=>{let el=outerRef.current?outerRef.current.parentElement:null;let hops=0;while(el&&hops<8){const cs=window.getComputedStyle(el);if(cs.position===\"absolute\"&&(parseFloat(cs.left)!==0||parseFloat(cs.top)!==0)){el.style.setProperty(\"left\",\"0px\",\"important\");el.style.setProperty(\"top\",\"0px\",\"important\");}el=el.parentElement;hops++;}},[]);useEffect(()=>{getRegistry().set(myIndex,normalizedCategory);window.dispatchEvent(new Event(REGISTRY_EVENT));return()=>{getRegistry().delete(myIndex);window.dispatchEvent(new Event(REGISTRY_EVENT));};},[myIndex,normalizedCategory]);const recompute=useCallback(()=>{const parent=outerRef.current?.parentElement;if(!parent)return;const containerWidth=parent.clientWidth;if(!containerWidth)return;const columns=containerWidth<NARROW_BELOW?COLUMNS_NARROW:COLUMNS;const tileWidth=(containerWidth-GAP*(columns-1))/columns;const tileHeight=tileWidth*9/16;const active=((typeof window!==\"undefined\"?window.__miscCategory:\"\")||DEFAULT_CATEGORY).trim();const visible=Array.from(getRegistry().entries()).sort((a,b)=>a[0]-b[0]).filter(([,cat])=>active===ALL_CATEGORY||active===cat);const pos=visible.findIndex(([idx])=>idx===myIndex);if(pos===-1){setLayout(prev=>({...prev,visible:false,ready:true}));return;}const col=pos%columns;const row=Math.floor(pos/columns);setLayout({left:col*(tileWidth+GAP),top:row*(tileHeight+GAP),width:tileWidth,height:tileHeight,visible:true,ready:true});},[myIndex]);useEffect(()=>{// Deferred so every sibling tile has had a chance to register\n// itself in the shared registry first (all their mount effects\n// run synchronously before any timeout fires).\nconst t=setTimeout(recompute,0);window.addEventListener(CATEGORY_EVENT,recompute);window.addEventListener(\"resize\",recompute);return()=>{clearTimeout(t);window.removeEventListener(CATEGORY_EVENT,recompute);window.removeEventListener(\"resize\",recompute);};},[recompute]);const containerRef=useRef(null);const nativeVideoRef=useRef(null);const previewIframeRef=useRef(null);const previewPlayerRef=useRef(null);const loopRangeRef=useRef(null);const lastClientPos=useRef({x:0,y:0});const[hovering,setHovering]=useState(false);const[cursorPos,setCursorPos]=useState({x:0,y:0});// Don't start loading a preview until the tile is actually near the\n// viewport — mounting many previews at once on a full work grid is\n// needless upfront cost, same reasoning as ServicesInteractive.\nconst[inView,setInView]=useState(false);useEffect(()=>{const el=containerRef.current;if(!el||typeof IntersectionObserver===\"undefined\"){setInView(true);return undefined;}const observer=new IntersectionObserver(entries=>{if(entries[0]?.isIntersecting){setInView(true);observer.disconnect();}},{rootMargin:\"300px\"});observer.observe(el);return()=>observer.disconnect();},[]);useEffect(()=>{const el=nativeVideoRef.current;if(!usingNativePreview||!el)return undefined;if(hovering){el.currentTime=0;el.play().catch(()=>{});}else{el.pause();}return undefined;},[hovering,usingNativePreview]);useEffect(()=>{if(usingNativePreview||!videoId||!inView)return undefined;let cancelled=false;loadVimeoScript().then(()=>{if(cancelled||!previewIframeRef.current||!window.Vimeo)return;const player=new window.Vimeo.Player(previewIframeRef.current);previewPlayerRef.current=player;player.setMuted(true);player.getDuration().then(duration=>{if(cancelled)return;const half=2.5;const mid=duration/2;const start=Math.max(mid-half,0);const end=Math.min(mid+half,duration);loopRangeRef.current={start,end};player.on(\"timeupdate\",data=>{if(data.seconds>=end){player.setCurrentTime(start);}});});});return()=>{cancelled=true;previewPlayerRef.current?.off(\"timeupdate\");};},[usingNativePreview,videoId,inView]);useEffect(()=>{if(usingNativePreview)return undefined;const player=previewPlayerRef.current;const range=loopRangeRef.current;if(!player||!range)return undefined;if(hovering){player.setCurrentTime(range.start).then(()=>player.play());}else{player.pause();}return undefined;},[hovering,usingNativePreview]);const updateCursorFromEvent=useCallback(e=>{lastClientPos.current={x:e.clientX,y:e.clientY};const rect=containerRef.current?.getBoundingClientRect();if(!rect)return;setCursorPos({x:e.clientX-rect.left,y:e.clientY-rect.top});},[]);const handleMouseEnter=useCallback(e=>{updateCursorFromEvent(e);setHovering(true);},[updateCursorFromEvent]);useEffect(()=>{if(!hovering)return undefined;const onScroll=()=>{const rect=containerRef.current?.getBoundingClientRect();const{x,y}=lastClientPos.current;const stillInside=!!rect&&x>=rect.left&&x<=rect.right&&y>=rect.top&&y<=rect.bottom;if(stillInside&&rect){setCursorPos({x:x-rect.left,y:y-rect.top});}else{setHovering(false);}};window.addEventListener(\"scroll\",onScroll,{passive:true,capture:true});return()=>window.removeEventListener(\"scroll\",onScroll,{capture:true});},[hovering]);return /*#__PURE__*/_jsx(\"div\",{ref:outerRef,\"data-misc-work-tile\":\"\",\"data-misc-category\":normalizedCategory,style:{position:\"absolute\",left:layout.left,top:layout.top,width:layout.width||\"100%\",height:layout.height||\"auto\",opacity:layout.ready?layout.visible?1:0:0,pointerEvents:layout.visible?\"auto\":\"none\",transition:\"left 0.4s cubic-bezier(0.4,0,0.2,1), top 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.3s ease\"},children:/*#__PURE__*/_jsxs(\"div\",{ref:containerRef,onMouseEnter:handleMouseEnter,onMouseLeave:()=>setHovering(false),onMouseMove:updateCursorFromEvent,onClick:e=>{e.stopPropagation();if(hasPage)goToWorkPage(pageLink||\"\");},style:{position:\"relative\",width:\"100%\",height:\"100%\",borderRadius:radius,overflow:\"hidden\",cursor:hovering?\"none\":\"pointer\",background:\"#282828\"},children:[coverImage&&/*#__PURE__*/_jsx(\"img\",{src:coverImage,alt:title||\"\",style:{position:\"absolute\",inset:0,width:\"100%\",height:\"100%\",objectFit:\"cover\",pointerEvents:\"none\"}}),inView&&usingNativePreview?/*#__PURE__*/_jsx(\"video\",{ref:nativeVideoRef,src:previewVideoUrl,muted:true,loop:true,playsInline:true,preload:\"auto\",style:{position:\"absolute\",inset:0,width:\"100%\",height:\"100%\",objectFit:\"cover\",opacity:hovering?1:0,transition:\"opacity 0.3s ease\",pointerEvents:\"none\"}}):inView&&videoId?/*#__PURE__*/_jsx(\"iframe\",{ref:previewIframeRef,loading:\"lazy\",src:`https://player.vimeo.com/video/${videoId}?background=1&muted=1&controls=0&loop=0&autoplay=0&title=0&byline=0&portrait=0&dnt=1`,style:{position:\"absolute\",inset:0,width:\"100%\",height:\"100%\",opacity:hovering?1:0,transition:\"opacity 0.3s ease\",pointerEvents:\"none\",border:\"none\"},allow:\"autoplay; fullscreen\"}):null,title&&/*#__PURE__*/_jsx(\"div\",{\"aria-hidden\":true,style:{position:\"absolute\",left:0,right:0,bottom:0,height:\"38%\",background:\"linear-gradient(to top, rgba(0,0,0,0.32), rgba(0,0,0,0))\",pointerEvents:\"none\"}}),/*#__PURE__*/_jsx(AnimatePresence,{children:hovering&&/*#__PURE__*/_jsx(motion.div,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.2}},exit:{opacity:0,transition:{duration:0}},style:{position:\"absolute\",left:cursorPos.x,top:cursorPos.y,transform:\"translate(-50%, -50%)\",color:\"#ffffff\",fontFamily:SANS,fontSize:13,fontWeight:400,lineHeight:1.45,textDecoration:\"underline\",pointerEvents:\"none\",zIndex:9999,whiteSpace:\"nowrap\"},children:\"VIEW\"})}),title&&/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",left:16,bottom:14,color:\"#ffffff\",fontFamily:SANS,fontSize:11,fontWeight:400,lineHeight:1.4,pointerEvents:\"none\",textShadow:\"0 0 6px rgba(0,0,0,0.35), 0 1px 3px rgba(0,0,0,0.45)\"},children:title})]})});}addPropertyControls(WorkTile,{coverImage:{type:ControlType.Image},title:{type:ControlType.String,defaultValue:\"\"},vimeoUrl:{type:ControlType.Link,defaultValue:\"\"},pageLink:{type:ControlType.Link,title:\"Page link\",description:\"The page of the work. Bind it to the CMS page of the current item; a click goes to that page. In the landing row it can stay empty when the frame around the tile has the link.\"},previewVideoUrl:{type:ControlType.File,allowedFileTypes:[\"mp4\",\"webm\",\"mov\"],description:\"Short muted clip for the hover preview. Leave empty to fall back to a slower Vimeo preview.\"},category:{type:ControlType.String,defaultValue:\"\",description:'Bind to the CMS \"Category 2\" field.'},radius:{type:ControlType.Number,defaultValue:12,min:0,max:60},year:{type:ControlType.String,defaultValue:\"\",description:'Showcase mode: bind to the CMS \"Year\" field (shown next to the category in the hero caption).'},mode:{type:ControlType.Enum,options:[\"grid\",\"showcase\"],optionTitles:[\"Work grid (filterable)\",\"Landing row (only the featured plays)\"],defaultValue:\"grid\"},accentColor:{type:ControlType.Color,defaultValue:ACCENT,description:\"Showcase mode: colour of the frame around the work shown in the big video.\"},maxTileWidth:{type:ControlType.Number,defaultValue:0,min:0,max:600,step:1,unit:\"px\",title:\"Max width\",description:\"Showcase mode: the tile's width on a 1728px wide screen (it stays at the left of its cell). On a narrower screen it shrinks in proportion to the screen; on a wider one it stays this size. 0 = fills its cell.\",hidden:p=>p.mode!==\"showcase\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"WorkTile\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}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