{"version":3,"file":"InkWipe.DOuc_Rv3.mjs","names":["useRef","useState","c","__esmMin","init_ssg_sandbox_shims","window","_e","de","c","J","init_npm_react_18_3_1","ce","addPropertyControls","init_framer_DcGZRLrs","ControlType","useIsStaticRenderer","lighterSrcSet","src","bg","base","query","q","w","h","big","have","extra","s","patchBg","props","patch","withLazyImage","Component","withPhotoImage","init_ImageLoading","init_jsx_runtime","prefersReducedMotion","inkVars","p","InkWipe","isStatic","ref","phase","setPhase","el","io","es","t","c$1","ink","style","cover","W_CSS","HL_INK_CSS","HL_INK_CONTROLS","init_InkWipe","n"],"sources":["https:/framerusercontent.com/modules/eUDFdaO0ovuWQ7oMFOEN/M647LWG70cn4uqcvTPby/ImageLoading.js","https:/framerusercontent.com/modules/pAFXBEplB1Vb89kQ1m9M/MUXvH3LLZLH4kAHsvJpD/InkWipe.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef}from\"react\";function lighterSrcSet(bg){const src=bg.src;if(!src||src.indexOf(\"framerusercontent.com/images/\")<0)return bg.srcSet;const[base,query=\"\"]=src.split(\"?\");const q=new URLSearchParams(query);const w=Number(q.get(\"width\")),h=Number(q.get(\"height\"));if(!w||!h)return bg.srcSet;const big=Math.max(w,h);const have=bg.srcSet||\"\";const extra=[512,768].filter(s=>s<big&&have.indexOf(`scale-down-to=${s}`)<0).map(s=>`${base}?scale-down-to=${s}&width=${w}&height=${h} ${Math.round(w*s/big)}w`);if(!extra.length)return bg.srcSet;return have?`${extra.join(\",\")},${have}`:extra.join(\",\");}function patchBg(props,patch){const bg=props.background;if(!bg||typeof bg!==\"object\"||!bg.src)return props;return{...props,background:patch(bg)};}export function withLazyImage(Component){return /*#__PURE__*/forwardRef(function LazyImage(props,ref){return /*#__PURE__*/_jsx(Component,{...patchBg(props,bg=>({...bg,loading:\"lazy\",srcSet:lighterSrcSet(bg)})),ref:ref});});}export function withPhotoImage(Component){return /*#__PURE__*/forwardRef(function PhotoImage(props,ref){return /*#__PURE__*/_jsx(Component,{...patchBg(props,bg=>({...bg,srcSet:lighterSrcSet(bg)})),ref:ref});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withPhotoImage\":{\"type\":\"reactHoc\",\"name\":\"withPhotoImage\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withLazyImage\":{\"type\":\"reactHoc\",\"name\":\"withLazyImage\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ImageLoading.map","import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{useEffect,useRef,useState}from\"react\";// Shared helpers for the Highlighter components (inlined by build/04-code.js where a file has the HL marker).\n// True while the element is on screen (or near it): loops pause when nobody can see them.\nfunction useOnScreen(margin=\"120px\"){const ref=useRef(null);const[on,setOn]=useState(false);useEffect(()=>{const el=ref.current;if(!el||typeof IntersectionObserver===\"undefined\")return setOn(true);const io=new IntersectionObserver(es=>setOn(es[0].isIntersecting),{rootMargin:margin});io.observe(el);return()=>io.disconnect();},[margin]);return[ref,on];}function prefersReducedMotion(){return typeof window!==\"undefined\"&&!!window.matchMedia&&window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;}// Wide display type: the family comes from the Font control, width and weight from the variable axes.\n// Only font-variation-settings (font-stretch on top of it cancelled the width), and no synthetic bold.\nfunction wideType(font,width,weight,fallback='\"Mona Sans\", \"Arial Narrow\", Arial, sans-serif'){const family=font&&font.fontFamily||fallback;return{fontFamily:family,fontWeight:weight,fontStyle:\"normal\",fontSynthesis:\"none\",fontVariationSettings:`\"wdth\" ${width}, \"wght\" ${weight}`};}function hlImg(img){if(!img)return{src:\"\",alt:\"\"};if(typeof img===\"string\")return{src:img,alt:\"\"};return{src:img.src||\"\",srcSet:img.srcSet,alt:img.alt||\"\"};}// Framer's own srcSet only offers ~1024 px and the original; its CDN also serves 256–768, so small slots\n// (billboard chips, the hover peek, phone rows) can take a lighter file.\n// `max` caps the file for slots that never get big (Framer widens `sizes` to 100vw on phones).\nfunction hlSrcSet(img,max=4096){const src=img.src;if(!src||src.indexOf(\"framerusercontent.com/images/\")<0)return img.srcSet;const[base,query=\"\"]=src.split(\"?\");const q=new URLSearchParams(query);const w=Number(q.get(\"width\")),h=Number(q.get(\"height\"));if(!w||!h)return img.srcSet;const big=Math.max(w,h);const list=[256,384,512,768,1024,2048].filter(s=>s<big&&s<=max).map(s=>`${base}?scale-down-to=${s}&width=${w}&height=${h} ${Math.round(w*s/big)}w`);if(big<=max||!list.length)list.push(`${base}?width=${w}&height=${h} ${w}w`);return list.join(\", \");}// The six inks as classes c1..c6 reading CSS variables set on the component root.\nconst HL_INK_CSS=[1,2,3,4,5,6].map(n=>`.c${n}{--hc:var(--hl-i${n});--hi:var(--hl-o${n===3?3:\"\"})}`).join(\"\");function inkVars(p){return{[\"--hl-i1\"]:p.ink1||\"#C8FF3E\",[\"--hl-i2\"]:p.ink2||\"#FF4FD8\",[\"--hl-i3\"]:p.ink3||\"#4D6BFF\",[\"--hl-i4\"]:p.ink4||\"#3CE4F0\",[\"--hl-i5\"]:p.ink5||\"#FFE24A\",[\"--hl-i6\"]:p.ink6||\"#FF5B37\",[\"--hl-o\"]:p.onInk||\"#0A0A0B\",[\"--hl-o3\"]:p.onBlue||\"#FFFFFF\"};}const HL_INK_CONTROLS={ink1:{type:ControlType.Color,title:\"Ink 1\",defaultValue:\"#C8FF3E\"},ink2:{type:ControlType.Color,title:\"Ink 2\",defaultValue:\"#FF4FD8\"},ink3:{type:ControlType.Color,title:\"Ink 3\",defaultValue:\"#4D6BFF\"},ink4:{type:ControlType.Color,title:\"Ink 4\",defaultValue:\"#3CE4F0\"},ink5:{type:ControlType.Color,title:\"Ink 5\",defaultValue:\"#FFE24A\"},ink6:{type:ControlType.Color,title:\"Ink 6\",defaultValue:\"#FF5B37\"},onInk:{type:ControlType.Color,title:\"On Ink\",defaultValue:\"#0A0A0B\",description:\"Text on a coloured block.\"},onBlue:{type:ControlType.Color,title:\"On Ink 3\",defaultValue:\"#FFFFFF\",description:\"Text on Ink 3, which is darker at night.\"}};const W_CSS=`.hlw{position:relative;width:100%;height:100%;overflow:hidden;pointer-events:none;border-radius:inherit}\n.hlw::before,.hlw::after{content:\"\";position:absolute;inset:0;opacity:0;pointer-events:none}\n.hlw.pre::after,.hlw.go::after{opacity:1;background:var(--hlw-cv)}\n.hlw.go::after{animation:hlw-show 0s .5s forwards}\n.hlw.go::before{opacity:1;z-index:1;background:var(--hc);transform:scaleX(0);transform-origin:left;animation:hlw-wipe 1.05s cubic-bezier(.7,0,.25,1) forwards}\n@keyframes hlw-wipe{0%{transform:scaleX(0);transform-origin:left}46%{transform:scaleX(1);transform-origin:left}54%{transform:scaleX(1);transform-origin:right}100%{transform:scaleX(0);transform-origin:right}}\n@keyframes hlw-show{to{opacity:0}}\n@media (prefers-reduced-motion: reduce){.hlw::before,.hlw::after{display:none}}`;/**\n * Ink Wipe\n *\n * Put it inside a photo frame and let it fill the frame. When the photo scrolls into view, a highlighter\n * block in the chosen ink sweeps across and uncovers it. Photos already on screen when the page opens are\n * left alone. Cover is the colour that hides the photo before the sweep: use the page background.\n *\n * @framerIntrinsicWidth 400\n * @framerIntrinsicHeight 300\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function InkWipe(props){const{ink=1,cover=\"#0A0A0B\",style}=props;const isStatic=useIsStaticRenderer();const ref=useRef(null);const[phase,setPhase]=useState(\"\");useEffect(()=>{if(isStatic||prefersReducedMotion()||typeof IntersectionObserver===\"undefined\")return;const el=ref.current;if(!el||el.getBoundingClientRect().top<=window.innerHeight)return;setPhase(\"pre\");const io=new IntersectionObserver(es=>{if(es[0].isIntersecting){io.disconnect();setPhase(\"go\");}},{rootMargin:\"0px 0px -15% 0px\"});io.observe(el);return()=>io.disconnect();},[isStatic]);useEffect(()=>{if(phase!==\"go\")return;const t=window.setTimeout(()=>setPhase(\"done\"),1150);return()=>window.clearTimeout(t);},[phase]);const c=`c${Math.min(6,Math.max(1,Math.round(+ink||1)))}`;return /*#__PURE__*/_jsx(\"div\",{ref:ref,className:`hlw ${c}${phase===\"pre\"||phase===\"go\"?\" \"+phase:\"\"}`,style:{...style,...inkVars(props),[\"--hlw-cv\"]:cover},\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(\"style\",{dangerouslySetInnerHTML:{__html:W_CSS+HL_INK_CSS}})});}addPropertyControls(InkWipe,{ink:{type:ControlType.Number,title:\"Ink\",defaultValue:1,min:1,max:6,step:1,displayStepper:true},cover:{type:ControlType.Color,title:\"Cover\",defaultValue:\"#0A0A0B\",description:\"Hides the photo until the sweep. Use the page background.\"},...HL_INK_CONTROLS});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"InkWipe\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"400\",\"framerIntrinsicHeight\":\"300\",\"framerSupportedLayoutWidth\":\"any\",\"framerSupportedLayoutHeight\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./InkWipe.map"],"mappings":"A,gNAAyE,SAASgB,EAAc,EAAG,CAAC,IAAMC,EAAIC,EAAG,IAAI,GAAG,CAACD,GAAKA,EAAI,QAAQ,+BAA+B,EAAE,EAAE,OAAOC,EAAG,OAAO,GAAK,CAACC,EAAKC,EAAM,IAAIH,EAAI,MAAM,GAAG,EAAQI,EAAE,IAAI,gBAAgBD,CAAK,EAAQE,EAAE,OAAOD,EAAE,IAAI,OAAO,CAAC,EAAEE,EAAE,OAAOF,EAAE,IAAI,QAAQ,CAAC,EAAE,GAAG,CAACC,GAAG,CAACC,EAAE,OAAOL,EAAG,OAAO,IAAMM,EAAI,KAAK,IAAIF,EAAEC,CAAC,EAAQE,EAAKP,EAAG,QAAQ,GAASQ,EAAM,CAAC,IAAI,GAAG,CAAC,CAAC,OAAO,GAAGC,EAAEH,GAAKC,EAA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