{"version":3,"file":"WipeImage.BVohoQkk.mjs","names":["React.useRef","_Fragment"],"sources":["https:/framerusercontent.com/modules/id4bzLgoHd3hSiLXUArg/67QXVtR4fn03SNLUrAkO/WipeImage.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";/**\n * A photograph in the site's grade: desaturated, navy wash, registration ticks, wiping in on arrival.\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n * @framerIntrinsicWidth 600\n * @framerIntrinsicHeight 750\n */export default function WipeImage(props){const{image,alt,navy,wash,ticks,wipe,slotLabel}=props;const src=typeof image===\"string\"?image:image?.src;const ref=React.useRef(null);const isCanvas=RenderTarget.current()===RenderTarget.canvas;React.useEffect(()=>{const el=ref.current;if(!el||isCanvas||!wipe)return;const io=new IntersectionObserver(en=>{en.forEach(e=>{if(e.isIntersecting){el.classList.add(\"in\");io.disconnect();}});},{threshold:.08,rootMargin:\"0px 0px -10% 0px\"});io.observe(el);return()=>io.disconnect();},[isCanvas,wipe]);const css=`\n.pda-pic{position:relative;overflow:hidden;background:${navy};width:100%;height:100%}\n.pda-pic img{width:100%;height:100%;object-fit:cover;filter:saturate(.22) contrast(1.02);display:block;transform:scale(1.08);transition:transform 1400ms cubic-bezier(.16,1,.3,1)}\n.pda-pic.wipe img{clip-path:inset(0 0 100% 0);transition:clip-path 1200ms cubic-bezier(.16,1,.3,1),transform 1400ms cubic-bezier(.16,1,.3,1)}\n.pda-pic.wipe.in img{clip-path:inset(0 0 0 0);transform:scale(1)}\n.pda-pic:not(.wipe) img{transform:none}\n.pda-pic::after{content:\"\";position:absolute;inset:0;background:${navy};mix-blend-mode:multiply;opacity:${wash};pointer-events:none}\n.pda-pic .tick{position:absolute;width:14px;height:14px;pointer-events:none;opacity:.9;z-index:2}\n.pda-pic .tick::before,.pda-pic .tick::after{content:\"\";position:absolute;background:#fff}\n.pda-pic .tick::before{left:0;top:0;width:100%;height:1px}.pda-pic .tick::after{left:0;top:0;width:1px;height:100%}\n.pda-pic .tl{left:12px;top:12px}.pda-pic .tr{right:12px;top:12px;transform:rotate(90deg)}.pda-pic .bl{left:12px;bottom:12px;transform:rotate(-90deg)}.pda-pic .br{right:12px;bottom:12px;transform:rotate(180deg)}\n@media (prefers-reduced-motion:reduce){.pda-pic.wipe img{clip-path:none;transform:none;transition:none}}\n.pda-pic.empty{background:#E3E5E8}\n.pda-pic.empty::after{display:none}\n.pda-pic.empty .slot{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:10px;font-family:\"APK Protocol Regular\",\"APK Protocol\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-size:11px;letter-spacing:.18em;text-transform:uppercase;color:#8A9099;pointer-events:none}\n.pda-pic.empty .slot::before{content:\"\";width:18px;height:1px;background:#B4B9C1}\n.pda-pic.empty .tick::before,.pda-pic.empty .tick::after{background:#B4B9C1}\n`;return /*#__PURE__*/_jsxs(\"div\",{ref:ref,className:\"pda-pic\"+(wipe&&src?\" wipe\":\"\")+(src?\"\":\" empty\")+(isCanvas?\" in\":\"\"),children:[/*#__PURE__*/_jsx(\"style\",{children:css}),src?/*#__PURE__*/_jsx(\"img\",{src:src,alt:alt||\"\",loading:\"lazy\"}):null,ticks?/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"i\",{className:\"tick tl\"}),/*#__PURE__*/_jsx(\"i\",{className:\"tick tr\"}),/*#__PURE__*/_jsx(\"i\",{className:\"tick bl\"}),/*#__PURE__*/_jsx(\"i\",{className:\"tick br\"})]}):null,src?null:/*#__PURE__*/_jsx(\"span\",{className:\"slot\",children:slotLabel})]});}WipeImage.defaultProps={alt:\"\",navy:\"#17223F\",wash:.28,ticks:true,wipe:true,slotLabel:\"Image\"};addPropertyControls(WipeImage,{image:{type:ControlType.Image,title:\"Image\"},alt:{type:ControlType.String,title:\"Alt Text\"},slotLabel:{type:ControlType.String,title:\"Slot Label\",defaultValue:\"Image\",description:\"Shown in the grey placeholder until an image is added.\"},wipe:{type:ControlType.Boolean,title:\"Wipe In\",defaultValue:true},ticks:{type:ControlType.Boolean,title:\"Ticks\",defaultValue:true},wash:{type:ControlType.Number,title:\"Wash\",defaultValue:.28,min:0,max:1,step:.02},navy:{type:ControlType.Color,title:\"Wash Colour\",defaultValue:\"#17223F\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"WipeImage\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"750\",\"framerSupportedLayoutWidth\":\"any\",\"framerSupportedLayoutHeight\":\"any\",\"framerIntrinsicWidth\":\"600\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./WipeImage.map"],"mappings":"4LAOG,SAAwB,EAAU,EAAM,CAAC,GAAK,CAAC,QAAM,MAAI,OAAK,OAAK,QAAM,OAAK,aAAW,EAAY,EAAI,OAAO,GAAQ,SAAS,EAAM,GAAO,IAAU,EAAIA,EAAa,IAAI,EAAQ,EAAS,EAAa,QAAQ,IAAI,EAAa,OAAO,MAAoB,CAAC,IAAM,EAAG,EAAI,QAAQ,GAAG,CAAC,GAAI,GAAU,CAAC,EAAK,OAAO,IAAM,EAAG,IAAI,qBAAqB,GAAI,CAAC,EAAG,QAAQ,GAAG,CAAI,EAAE,iBAAgB,EAAG,UAAU,IAAI,IAAI,EAAE,EAAG,WAAW,EAAG,CAAC,CAAE,EAAE,CAAC,UAAU,IAAI,WAAW,kBAAkB,CAAC,EAAiB,OAAf,EAAG,QAAQ,CAAE,MAAY,EAAG,WAAW,CAAE,EAAE,CAAC,EAAS,CAAI,CAAC,EAAE,IAAM,EAAI;wDAC5e,EAAK;;;;;kEAKK,EAAK,mCAAmC,EAAK;;;;;;;;;;;EAW7G,OAAoB,EAAM,MAAM,CAAK,MAAI,UAAU,WAAW,GAAM,EAAI,QAAQ,KA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