{"version":3,"file":"AspectVideo.HyUCtm4F.mjs","names":["useRef","useState","_Fragment","__esmMin","init_ssg_sandbox_shims","l","_e","p","c","init_jsx_runtime","ce","init_npm_react_18_3_1","de","window","init_framer_DKgW_P28","useIsStaticRenderer","ControlType","addPropertyControls","loopRank","live","loopSlots","slot","rows","a","b","row","r","sameRow","other","score","sum","s","keep","LOOP_BUDGET","on","loopQueue","loopQueued","loopJoin","loopObserver","y","entry","entries","seen","box","screen","LOOP_SHARE","i","element","loopLeave","AspectVideo","videoFile","props","video","videoUrl","isStatic","shellRef","videoRef","reduced","setReduced","turn","setTurn","slotRef","near","setNear","pageVisible","setPageVisible","userPaused","setUserPaused","userPausedRef","active","setActive","filmAuto","controls","autoplayInView","taken","setTaken","takenRef","markTaken","ourCall","lastTime","drive","action","byViewer","isFullscreen","doc","mq","apply","shell","observer","mark","onChange","ratio","cornerCss","corner","radius","fill","poster","filmCss","title","event","el","label","loopVideo","showToggle","pillShows","toggleCss","init_AspectVideo","px"],"sources":["https:/framerusercontent.com/modules/mPjqduwtKlUXNX1Q7DWH/DtjdNrGjG3DSxIktIx1h/AspectVideo.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{useEffect,useRef,useState}from\"react\";const cornerCss=(corner,px)=>corner===\"exact\"?px:corner===\"surface\"?\"var(--nj-r-surface, 16px)\":corner===\"small\"?\"var(--nj-r-small, 8px)\":corner===\"square\"?0:px>0?`var(--nj-r-surface, ${px}px)`:0;// J186: loops share one small budget for the whole page, so a phone never decodes more than two at once. A loop may play only\n// when it is meaningfully on screen (LOOP_SHARE of it, or half the screen for a very tall one); of those, the most visible play\n// (visible area, read from one shared IntersectionObserver: no layout reads) and the rest wait on their current frame until\n// they become the most visible. Loops side by side in one row (tablet and desktop) count as one unit, so a pair never shows one\n// playing and one frozen. Loading still starts about a screen early (the separate \"near\" observer). A loop the visitor paused\n// gives up its turn; one the visitor started again goes first while it stays on screen.\nconst LOOP_BUDGET=2;const LOOP_SHARE=.4;const loopSlots=new Map;let loopObserver=null;let loopQueued=false;const sameRow=(a,b)=>Math.min(a.top+a.height,b.top+b.height)-Math.max(a.top,b.top)>.5*Math.min(a.height,b.height);function loopRank(){loopQueued=false;const live=[];loopSlots.forEach(slot=>{if(slot.ok&&slot.want)live.push(slot);});const rows=[];live.sort((a,b)=>a.top-b.top).forEach(slot=>{const row=rows.find(r=>r.some(other=>sameRow(other,slot)));if(row)row.push(slot);else rows.push([slot]);});// A unit already playing keeps its turn until another is clearly more visible (no flicker between two near-equal loops).\nconst score=row=>row.reduce((sum,s)=>sum+s.area*(s.on?1.15:1),0)+(row.some(s=>s.first)?1e12:0);rows.sort((a,b)=>score(b)-score(a));const keep=new Set;for(const row of rows){if(keep.size&&keep.size+row.length>LOOP_BUDGET)continue;row.forEach(s=>keep.add(s));if(keep.size>=LOOP_BUDGET)break;}loopSlots.forEach(slot=>{const on=keep.has(slot);if(on!==slot.on){slot.on=on;slot.set(on);}});}function loopQueue(){if(loopQueued)return;loopQueued=true;Promise.resolve().then(loopRank);}function loopJoin(element,want,set){if(!loopObserver){loopObserver=new IntersectionObserver(entries=>{const y=window.scrollY;for(const entry of entries){const slot=loopSlots.get(entry.target);if(!slot)continue;const seen=entry.intersectionRect;const box=entry.boundingClientRect;const screen=entry.rootBounds?entry.rootBounds.height:window.innerHeight;slot.area=entry.isIntersecting?seen.width*seen.height:0;slot.top=box.top+y;slot.height=box.height;slot.ok=entry.isIntersecting&&box.height>0&&(entry.intersectionRatio>=LOOP_SHARE||seen.height>=screen*.5);if(!slot.ok)slot.first=false;}loopRank();},{threshold:Array.from({length:21},(_,i)=>i/20)});}const slot={area:0,top:0,height:0,ok:false,want,first:false,on:false,set};loopSlots.set(element,slot);loopObserver.observe(element);return slot;}function loopLeave(element){loopSlots.delete(element);if(loopObserver)loopObserver.unobserve(element);loopQueue();}/**\n * Aspect-locked muted project video that pauses outside the viewport, in a\n * background tab, and when reduced motion is requested. The loop carries a\n * small Pause/Play button (WCAG 2.2.2); it is hidden under reduced motion,\n * where the loop already sits on its poster.\n *\n * With \"Controls\" on it is a film player instead: sound, native controls and\n * the poster until the viewer presses play. Nothing autoplays.\n * \"Play in view\" (with Controls) is the client-page film: it waits on its poster, then plays muted with the\n * controls showing while at least half of it is on screen and pauses when it leaves (the behaviour of the\n * built-in \"Video\" block it replaces). \"Pause button\" off hides the loop's Pause/Play pill.\n * J186: loops share a page-wide budget (at most two play at once, the most visible; see LOOP_BUDGET).\n * J173d: loop \"Pill shows: On hover or focus\" fades the pill in on hover/focus (touch: always); a loop Title becomes its\n * role=\"img\" description for screen readers.\n * J174: the native controls are always there, and the first thing the viewer does (touch, key, seek, unmute, fullscreen)\n * makes the film theirs: it never autoplays or loops by itself again, so a pause stays a pause (a muted film still stops when it\n * leaves the screen; a touch counts on pointerup, not on the start of a page scroll; the desktop control bar is read from the pause/play/seeking\n * media events, ignoring this component's own calls and a loop wrap). Fullscreen shows\n * the whole frame (contain on black); the browser's own fullscreen rule is deliberately not !important and lost to the\n * inline cover. Nothing in the film logic pauses it while it is fullscreen.\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function AspectVideo(props){const{video:videoFile=\"\",videoUrl=\"\",poster,ratio=2.6578,background=\"#000000\",radius=0,corner=\"auto\",controls=false,autoplayInView=false,showToggle=true,pillShows=\"always\",title=\"\"}=props;const video=videoUrl.trim()||videoFile;const isStatic=useIsStaticRenderer();const shellRef=useRef(null);const videoRef=useRef(null);const[reduced,setReduced]=useState(false);// J186: true while this loop holds a turn in the shared loop budget (loopJoin above).\nconst[turn,setTurn]=useState(false);const slotRef=useRef(null);// J127 (D-20261008-2): the poster and the film data load when the player is about one screen away, not at parse\n// (a 1920x1080 poster is 50 to 280 KB and used to share the link with the page's own JavaScript). False on the\n// server and on the first client render, so hydration matches; a player already on or near the first screen\n// flips on the first observer callback after mount. The box keeps its aspect ratio and backdrop meanwhile.\nconst[near,setNear]=useState(false);const[pageVisible,setPageVisible]=useState(true);const[userPaused,setUserPaused]=useState(false);const userPausedRef=useRef(false);userPausedRef.current=userPaused;// J130: film that plays while half in view (client pages). Only used when Controls and Play in view are both on.\nconst[active,setActive]=useState(false);const filmAuto=controls&&autoplayInView;// J174: once the viewer touches the film it is theirs. A ref for the effects, state for the loop attribute.\nconst[taken,setTaken]=useState(false);const takenRef=useRef(false);const markTaken=()=>{if(takenRef.current)return;takenRef.current=true;setTaken(true);};// The native control bar fires only media events (no pointer events, no click) on desktop Chrome, so the viewer's Pause, Play and\n// timeline are read from the media events, ignoring the ones this component causes itself (autoplay / pause by view) and a loop wrap.\nconst ourCall=useRef(0);const lastTime=useRef(0);const drive=action=>{ourCall.current=performance.now();action();};const byViewer=()=>performance.now()-ourCall.current>400;const isFullscreen=()=>{const element=videoRef.current;if(!element||typeof document===\"undefined\")return false;const doc=document;return document.fullscreenElement===element||doc.webkitFullscreenElement===element||!!element.webkitDisplayingFullscreen;};useEffect(()=>{if(typeof window===\"undefined\"||!window.matchMedia)return;const mq=window.matchMedia(\"(prefers-reduced-motion: reduce)\");const apply=()=>setReduced(mq.matches);apply();mq.addEventListener?.(\"change\",apply);return()=>mq.removeEventListener?.(\"change\",apply);},[]);useEffect(()=>{if(typeof document===\"undefined\")return;const apply=()=>setPageVisible(document.visibilityState===\"visible\");apply();document.addEventListener(\"visibilitychange\",apply);return()=>document.removeEventListener(\"visibilitychange\",apply);},[]);useEffect(()=>{const shell=shellRef.current;if(!shell||isStatic||controls||!video)return;if(typeof IntersectionObserver===\"undefined\"){setTurn(true);return;}slotRef.current=loopJoin(shell,!userPausedRef.current,setTurn);return()=>{slotRef.current=null;loopLeave(shell);};},[isStatic,controls,video]);useEffect(()=>{const slot=slotRef.current;if(!slot||slot.want===!userPaused)return;slot.want=!userPaused;loopQueue();},[userPaused]);useEffect(()=>{const shell=shellRef.current;if(!shell||typeof IntersectionObserver===\"undefined\"){setNear(true);return;}const observer=new IntersectionObserver(entries=>{if(entries.some(entry=>entry.isIntersecting)){setNear(true);observer.disconnect();}},{rootMargin:\"100% 0px 100% 0px\",threshold:0});observer.observe(shell);return()=>observer.disconnect();},[]);useEffect(()=>{const shell=shellRef.current;if(!filmAuto||!shell||typeof IntersectionObserver===\"undefined\")return;const observer=new IntersectionObserver(([entry])=>setActive(entry.isIntersecting&&entry.intersectionRatio>=.5),{threshold:[0,.5]});observer.observe(shell);return()=>observer.disconnect();},[filmAuto]);useEffect(()=>{const element=videoRef.current;if(!element||!filmAuto||taken||isFullscreen())return;if(active&&!reduced)drive(()=>void element.play().catch(()=>{}));else drive(()=>element.pause());},[filmAuto,active,reduced,video,taken]);// Switching tabs: Chrome pauses a hidden muted video and plays it again on return, with media events in the same millisecond as\n// visibilitychange. That is the browser, not the viewer.\nuseEffect(()=>{if(typeof document===\"undefined\")return;const mark=()=>{ourCall.current=performance.now();};document.addEventListener(\"visibilitychange\",mark);return()=>document.removeEventListener(\"visibilitychange\",mark);},[]);// A film the viewer has taken over still stops by itself when it leaves the screen while it is muted and playing (a\n// muted loop nobody is watching); it never starts by itself again.\nuseEffect(()=>{const element=videoRef.current;if(!element||!filmAuto||!taken||active||isFullscreen())return;if(element.muted&&!element.paused)drive(()=>element.pause());},[filmAuto,taken,active]);// Entering fullscreen (desktop or the iPhone player) is the viewer taking over.\nuseEffect(()=>{const element=videoRef.current;if(!element||typeof document===\"undefined\")return;const onChange=()=>{if(isFullscreen())markTaken();};document.addEventListener(\"fullscreenchange\",onChange);document.addEventListener(\"webkitfullscreenchange\",onChange);element.addEventListener(\"webkitbeginfullscreen\",markTaken);return()=>{document.removeEventListener(\"fullscreenchange\",onChange);document.removeEventListener(\"webkitfullscreenchange\",onChange);element.removeEventListener(\"webkitbeginfullscreen\",markTaken);};},[controls,video]);useEffect(()=>{const element=videoRef.current;if(!element||controls)return;if(reduced||!turn||!pageVisible||userPaused)element.pause();else element.play().catch(()=>{});},[reduced,turn,pageVisible,userPaused,video,controls]);const box={...props.style,position:\"relative\",width:\"100%\",aspectRatio:String(ratio>0?ratio:2.6578),overflow:\"hidden\",background,borderRadius:cornerCss(corner,radius)};const fill={position:\"absolute\",inset:0,width:\"100%\",height:\"100%\",objectFit:\"cover\",display:\"block\"};if(isStatic||!video){return /*#__PURE__*/_jsx(\"div\",{ref:shellRef,style:box,children:poster?.src?/*#__PURE__*/_jsx(\"img\",{src:poster.src,srcSet:poster.srcSet,alt:poster.alt||\"\",decoding:\"async\",style:fill}):null});}if(controls){return /*#__PURE__*/_jsxs(\"div\",{ref:shellRef,style:box,children:[/*#__PURE__*/_jsx(\"style\",{dangerouslySetInnerHTML:{__html:filmCss}}),/*#__PURE__*/_jsx(\"video\",{ref:videoRef,className:\"aspect-film\",src:video,poster:near?poster?.src:undefined,controls:true,muted:filmAuto?true:undefined,loop:filmAuto&&!taken?true:undefined,playsInline:true,preload:near?\"metadata\":\"none\",\"aria-label\":title||poster?.alt||undefined,onPointerDown:event=>{// A touch that only starts a page scroll must not take the film over: on a phone count the completed tap\n// (pointerup; a scroll ends in pointercancel). A mouse or pen press counts at once.\nif(event.pointerType!==\"touch\")markTaken();},onPointerUp:event=>{// Touch: a finished touch is a tap or a control press (a scroll ends in pointercancel instead). The native\n// controls swallow the click on a phone, so click is not enough. The desktop control bar fires\n// only media events, so pause, play and seeking are read below (not a loop wrap, not our own calls).\nif(event.pointerType===\"touch\")markTaken();},onClick:markTaken,onKeyDown:markTaken,onTimeUpdate:event=>{lastTime.current=event.currentTarget.currentTime;},onPause:event=>{const el=event.currentTarget;if(byViewer()&&!el.ended&&document.visibilityState===\"visible\")markTaken();},onPlay:()=>{if(byViewer())markTaken();},onSeeking:event=>{const el=event.currentTarget;// a loop wrap jumps from the end to the start; a scrub does not\nconst wrap=el.loop&&el.currentTime<.5&&lastTime.current>(el.duration||0)-1.5;if(!wrap&&Math.abs(el.currentTime-lastTime.current)>.3)markTaken();},onVolumeChange:event=>{if(!event.currentTarget.muted)markTaken();},style:fill})]});}// J173d: with a Title the clip is described to screen readers (WCAG 1.1.1): the video sits in its own role=\"img\" node and the\n// Pause button stays outside it, so it is still reachable. No Title keeps the old aria-hidden loop.\nconst label=title.trim();const loopVideo=/*#__PURE__*/_jsx(\"video\",{ref:videoRef,src:video,poster:near?poster?.src:undefined,muted:true,loop:true,playsInline:true,preload:near?\"metadata\":\"none\",\"aria-hidden\":\"true\",style:fill});return /*#__PURE__*/_jsxs(\"div\",{ref:shellRef,className:\"aspect-video-shell\",\"data-pill\":showToggle&&pillShows===\"hover\"?\"hover\":undefined,style:box,children:[label?/*#__PURE__*/_jsx(\"div\",{role:\"img\",\"aria-label\":label,style:fill,children:loopVideo}):loopVideo,reduced||!showToggle?null:/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{dangerouslySetInnerHTML:{__html:toggleCss}}),/*#__PURE__*/_jsx(\"button\",{type:\"button\",className:\"aspect-video-toggle\",onClick:()=>{// Play pressed by the visitor: this loop goes first in the budget while it stays on screen.\nif(userPaused&&slotRef.current)slotRef.current.first=true;setUserPaused(!userPaused);},children:userPaused?\"Play video\":\"Pause video\"})]})]});}// Fullscreen shows the whole frame. The browser's own rule gives object-fit: contain without !important, so the inline\n// cover of the in-page box won (cropped and zoomed). !important here beats the inline style, in-page stays cover.\nconst filmCss=`\n.aspect-film:fullscreen,\n.aspect-film:-webkit-full-screen { object-fit: contain !important; background: #000 !important; }\n.aspect-film::backdrop { background: #000; }\n`;// Same pill as the Mix A Pixel \"Pause demo\" button; the focus ring is white\n// with a dark halo so it shows on light and dark frames. The invisible\n// ::after pads the tap target to at least 44px tall without changing the pill.\nconst toggleCss=`\n.aspect-video-toggle {\n    position: absolute;\n    top: 14px;\n    left: 14px;\n    z-index: 2;\n    padding: 6px 12px;\n    border: 1.5px solid #0A0A0A;\n    border-radius: 999px;\n    background: #fff;\n    color: #0A0A0A;\n    font: 600 12px/1 Mona Sans, Inter, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n    letter-spacing: .02em;\n    cursor: pointer;\n}\n.aspect-video-toggle::after { content: \"\"; position: absolute; top: -11px; bottom: -14px; left: -6px; right: -6px; }\n.aspect-video-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 6px #0A0A0A; }\n/* J173d \"On hover or focus\": invisible and click-through at rest but still focusable (never display:none), it fades in on\n   pointer over the video or when anything inside has focus. Touch screens (no hover) always show it. */\n.aspect-video-shell[data-pill=\"hover\"] .aspect-video-toggle {\n    opacity: 0;\n    pointer-events: none;\n    transition: opacity var(--nj-hover-fast, 200ms) var(--nj-hover-ease, cubic-bezier(.22,1,.36,1));\n}\n.aspect-video-shell[data-pill=\"hover\"]:hover .aspect-video-toggle,\n.aspect-video-shell[data-pill=\"hover\"]:focus-within .aspect-video-toggle,\n.aspect-video-shell[data-pill=\"hover\"] .aspect-video-toggle:focus-visible {\n    opacity: 1;\n    pointer-events: auto;\n}\n@media (hover: none) {\n    .aspect-video-shell[data-pill=\"hover\"] .aspect-video-toggle { opacity: 1; pointer-events: auto; }\n}\n@media (prefers-reduced-motion: reduce) {\n    .aspect-video-shell[data-pill=\"hover\"] .aspect-video-toggle { transition: none; }\n}\n@media (max-width: 640px) { .aspect-video-toggle { top: 10px; left: 10px; padding: 5px 9px; font-size: 11px; } }\n@media (min-width: 2200px) {\n    .aspect-video-toggle {\n        top: calc(14px * var(--nj-wide, 1));\n        left: calc(14px * var(--nj-wide, 1));\n        padding: calc(6px * var(--nj-wide, 1)) calc(12px * var(--nj-wide, 1));\n        font-size: calc(12px * var(--nj-wide, 1));\n    }\n}\n`;addPropertyControls(AspectVideo,{video:{type:ControlType.File,allowedFileTypes:[\"mp4\",\"webm\",\"mov\"],title:\"Video\"},videoUrl:{type:ControlType.String,title:\"Video URL\",defaultValue:\"\",description:\"External video URL (e.g. media.namandoes.com). Overrides Video when set.\"},poster:{type:ControlType.ResponsiveImage,title:\"Poster\"},ratio:{type:ControlType.Number,title:\"Aspect\",min:.2,max:6,step:1e-4,defaultValue:2.6578,description:\"width \\xf7 height. The box locks to this, so the video never crops.\",displayStepper:false},background:{type:ControlType.Color,title:\"Backdrop\",defaultValue:\"#000000\"},radius:{type:ControlType.Number,title:\"Radius\",min:0,max:48,step:1,defaultValue:0,displayStepper:false},corner:{type:ControlType.Enum,title:\"Corner\",options:[\"auto\",\"surface\",\"small\",\"square\",\"exact\"],optionTitles:[\"Auto\",\"Surface\",\"Small\",\"Square\",\"Exact px\"],defaultValue:\"auto\",description:\"Auto: 0 = square, any other radius = site surface token. Exact px: the Radius value as pixels.\"},controls:{type:ControlType.Boolean,title:\"Controls\",defaultValue:false,description:\"On: a player with sound that waits for play. Off: a muted autoplay loop.\"},autoplayInView:{type:ControlType.Boolean,title:\"Play in view\",defaultValue:false,description:\"Film only: plays muted with controls while half in view, pauses when it leaves.\",hidden:props=>!props.controls},showToggle:{type:ControlType.Boolean,title:\"Pause button\",defaultValue:true,description:\"Loop only: the Pause video / Play video pill.\",hidden:props=>!!props.controls},pillShows:{type:ControlType.Enum,title:\"Pill shows\",options:[\"always\",\"hover\"],optionTitles:[\"Always\",\"On hover or focus\"],defaultValue:\"always\",description:\"Loop only. On hover or focus: the pill fades in over the video; touch screens always show it.\",hidden:props=>!!props.controls||props.showToggle===false},title:{type:ControlType.String,title:\"Title\",defaultValue:\"\",description:\"Accessible name. Film: names the player. Loop: describes the clip to screen readers; empty keeps it hidden from them.\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AspectVideo\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AspectVideo.map"],"mappings":"A,6NAM6N,SAASkB,GAAU,CAAC,EAAW,GAAM,IAAMC,EAAK,CAAC,EAAE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