{"version":3,"file":"SiteMotion.DM5Njb9O.mjs","names":["useRef","React.useState","__esmMin","init_ssg_sandbox_shims","init_npm_react_18_3_1","ce","p","c","J","_e","de","window","addPropertyControls","RenderTarget","init_framer_BWFVvmND","ControlType","useForkRef","own","el","ref","reducedMotion","lift","pic","watch","tri","anims","io","entries","a","WIPE","SOFT","x","makeLift","Lifted","set","delay","Component","props","label","withLift","withLiftLate","ReadMark","step","setStep","body","raf","read","r","on","reduced","size","style","RM_RINGS","len","g","i","rmArc","dim","lit","rmPt","init_SiteMotion","init_jsx_runtime","t","x0","y0","a0","x1","y1","sweep"],"sources":["https:/framerusercontent.com/modules/tQfFTrDbx35o6Z92uRQJ/5GA6SrQN1rUfmbt7vlIP/SiteMotion.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{forwardRef,useEffect,useRef}from\"react\";import{RenderTarget,addPropertyControls,ControlType}from\"framer\";// Winsor site motion (round 2): small overrides shared by every page. Team Pixel's own.\n//\n// withLift: a picture opens along the brand's 45° take-off line (the gradient's bottom-left to top-right\n// direction): a clip wipe from the bottom-left corner while the image inside settles from 1.08 to 1.\n// It plays once, when the picture's top passes about 88% of the screen (watched on its unclipped parent). The server render is the finished\n// picture; a picture already on screen when the page loads is left alone, so nothing above the fold blinks.\n// Reduced motion and the canvas get the finished picture.\n//\n// withLiftLate: the same, with a 160ms delay, for the second picture of a pair.\nconst WIPE=\"cubic-bezier(0.76, 0, 0.24, 1)\";const SOFT=\"cubic-bezier(0.33, 1, 0.68, 1)\";const tri=t=>`polygon(0% 100%, 0% ${100-200*t}%, ${200*t}% 100%)`;function useForkRef(ref){const own=useRef(null);const set=el=>{own.current=el;if(typeof ref===\"function\")ref(el);else if(ref)ref.current=el;};return[own,set];}function reducedMotion(){return typeof window!==\"undefined\"&&!!window.matchMedia?.(\"(prefers-reduced-motion: reduce)\").matches;}function lift(el,delay){if(typeof window===\"undefined\"||reducedMotion()||RenderTarget.current()===RenderTarget.canvas)return()=>{};const r=el.getBoundingClientRect();if(r.top<window.innerHeight*.92)return()=>{};// the picture layer inside a Framer image frame, or an <img>\nconst pic=el.querySelector(\"[data-framer-background-image-wrapper]\")||el.querySelector(\"img\");// Watch an unclipped ancestor, never the picture itself: Chrome applies a target's OWN clip-path to\n// IntersectionObserver, so a fully clipped picture is never \"intersecting\" and would stay hidden for good.\nlet watch=el.parentElement||el;while(watch.parentElement&&watch.offsetHeight<2)watch=watch.parentElement;el.style.clipPath=tri(0);let anims=[];const io=new IntersectionObserver(entries=>{if(!entries.some(e=>e.isIntersecting))return;io.disconnect();const a=el.animate([{clipPath:tri(0)},{clipPath:tri(1)}],{duration:1100,delay,easing:WIPE,fill:\"both\"});anims.push(a);if(pic)anims.push(pic.animate([{transform:\"scale(1.08)\"},{transform:\"scale(1)\"}],{duration:1500,delay,easing:SOFT,fill:\"both\"}));a.onfinish=()=>{el.style.clipPath=\"\";anims.forEach(x=>x.cancel());anims=[];};},{rootMargin:\"0px 0px -12% 0px\",threshold:.01});io.observe(watch);return()=>{io.disconnect();anims.forEach(x=>x.cancel());el.style.clipPath=\"\";};}function makeLift(delay,label){return function(Component){const Lifted=/*#__PURE__*/forwardRef(function LiftOverride(props,ref){const[own,set]=useForkRef(ref);useEffect(()=>{const el=own.current;if(!el)return;return lift(el,delay);},[]);return /*#__PURE__*/_jsx(Component,{...props,ref:set});});Lifted.displayName=label;return Lifted;};}export function withLift(Component){return makeLift(0,\"withLift\")(Component);}export function withLiftLate(Component){return makeLift(160,\"withLiftLate\")(Component);}// ---------------------------------------------------------------------------------------------------------------\n// Read Mark: the Winsor mark as reading progress, for an article's sticky author card. Its three arcs light from the\n// inside out as the reader passes a third, two thirds and the end of the piece (the kit's own drawing order); no\n// bar, no numbers. It measures the nearest ancestor much taller than the screen (the article body).\nconst RM_RINGS=[{r:24.765,a0:205,sweep:265},{r:57.145,a0:175,sweep:270},{r:89.525,a0:145,sweep:245}];const rmPt=(r,a)=>[128+r*Math.cos(a*Math.PI/180),144.3+r*Math.sin(a*Math.PI/180)];const rmArc=(r,a0,sweep)=>{const[x0,y0]=rmPt(r,a0);const[x1,y1]=rmPt(r,a0+sweep);return`M${x0.toFixed(2)} ${y0.toFixed(2)} A${r} ${r} 0 ${sweep>180?1:0} 1 ${x1.toFixed(2)} ${y1.toFixed(2)}`;};/**\n * Read Mark\n *\n * @framerIntrinsicWidth 56\n * @framerIntrinsicHeight 56\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export function ReadMark(props){const{size=56,lit=\"#2F5BFF\",dim=\"#DCE3FF\",label=\"Reading progress\",style}=props;const ref=useRef(null);const[step,setStep]=React.useState(0);useEffect(()=>{const el=ref.current;if(!el||typeof window===\"undefined\"||RenderTarget.current()===RenderTarget.canvas)return;let body=el.parentElement;while(body&&body.offsetHeight<window.innerHeight*1.3)body=body.parentElement;if(!body)return;let raf=0;const read=()=>{raf=0;const r=body.getBoundingClientRect();const p=Math.min(1,Math.max(0,(window.innerHeight*.6-r.top)/Math.max(1,r.height)));setStep(p>=.92?3:p>=.6?2:p>=.25?1:0);};const on=()=>{if(!raf)raf=requestAnimationFrame(read);};read();window.addEventListener(\"scroll\",on,{passive:true});window.addEventListener(\"resize\",on);return()=>{window.removeEventListener(\"scroll\",on);window.removeEventListener(\"resize\",on);cancelAnimationFrame(raf);};},[]);const reduced=typeof window!==\"undefined\"&&!!window.matchMedia?.(\"(prefers-reduced-motion: reduce)\").matches;return /*#__PURE__*/_jsx(\"div\",{ref:ref,role:\"img\",\"aria-label\":label,style:{width:size,height:size,...style},children:/*#__PURE__*/_jsx(\"svg\",{viewBox:\"0 0 256 256\",width:\"100%\",height:\"100%\",style:{display:\"block\",overflow:\"visible\"},\"aria-hidden\":\"true\",focusable:\"false\",children:RM_RINGS.map((g,i)=>{const len=g.r*g.sweep*Math.PI/180;const on=step>i;return /*#__PURE__*/_jsxs(\"g\",{children:[/*#__PURE__*/_jsx(\"path\",{d:rmArc(g.r,g.a0,g.sweep),fill:\"none\",stroke:dim,strokeWidth:20.95,strokeLinecap:\"round\"}),/*#__PURE__*/_jsx(\"path\",{d:rmArc(g.r,g.a0,g.sweep),fill:\"none\",stroke:lit,strokeWidth:20.95,strokeLinecap:\"round\",style:{strokeDasharray:len,strokeDashoffset:on?0:len,opacity:on?1:0,transition:reduced?\"none\":on?\"stroke-dashoffset .7s cubic-bezier(0.16, 1, 0.3, 1), opacity 0s\":\"stroke-dashoffset .3s ease, opacity .2s ease .1s\"}})]},i);})})});}ReadMark.displayName=\"Read Mark\";addPropertyControls(ReadMark,{size:{type:ControlType.Number,title:\"Size\",defaultValue:56,min:24,max:160,unit:\"px\"},lit:{type:ControlType.Color,title:\"Lit\",defaultValue:\"#2F5BFF\"},dim:{type:ControlType.Color,title:\"Dim\",defaultValue:\"#DCE3FF\"},label:{type:ControlType.String,title:\"Label\",defaultValue:\"Reading progress\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"ReadMark\":{\"type\":\"reactComponent\",\"name\":\"ReadMark\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"fixed\",\"framerIntrinsicHeight\":\"56\",\"framerIntrinsicWidth\":\"56\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"withLift\":{\"type\":\"reactHoc\",\"name\":\"withLift\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withLiftLate\":{\"type\":\"reactHoc\",\"name\":\"withLiftLate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SiteMotion.map"],"mappings":"A,uNAS0J,SAASgB,EAAW,EAAI,CAAC,IAAMC,EAAIjB,EAAO,IAAI,EAAgG,MAAM,CAACiB,EAA3F,GAAI,CAAC,EAAI,QAAQC,EAAM,OAAOC,GAAM,WAAWA,EAAID,CAAE,EAAUC,IAAI,EAAI,QAAQD,EAAG,CAAgB,CAAE,CAAC,SAASE,GA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