{"version":3,"file":"PriorityImage.Btk89OV9.mjs","names":["_jsx","_jsxs","__esmMin","init_jsx_runtime","c","p","init_framer_ChujFWHC","addPropertyControls","buildSrcSet","src","w","h","longest","list","PriorityImage","props","image","altProp","fit","radius","imageWidth","offsetX","corners","responsive","sizes","naturalWidth","naturalHeight","split","cmsSrc","alt","priority","r","borderRadius","srcSet","img","side","init_PriorityImage","ControlType"],"sources":["https:/framerusercontent.com/modules/kBsJBFqE6MzBxDaP7252/r3vXMATQZhkoLUdylEhr/PriorityImage.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";/**\n * PriorityImage\n * What: a plain <img> that loads eagerly with fetchpriority=\"high\".\n * Why code: Framer image fills are lazy-loaded with no priority setting, so a large image in the\n *   first screen paints late and drags LCP. This renders server-side in place, so the browser\n *   finds and fetches it straight from the HTML.\n * Where: Home › Hero Visual › \"Dashboard / Phone Left/Right\" (phone only, slice mode);\n *   About › Hero Collage › \"Image / Hero Tall\" (all breakpoints, responsive mode).\n * Split mode: draws the same cover image as two halves (left/right), each clipped to half the frame.\n *   It looks identical, but no single image is larger than the headline, so the text stays the LCP\n *   (PageSpeed's slow-phone simulation scores an image LCP far later than real browsers paint it).\n * CMS mode: bind \"Image\" to a CMS image field (Blog Post › Cover). Its src/srcSet come from Framer, so\n *   the CMS cover loads eagerly with high priority instead of as a lazy image fill.\n * Responsive mode: builds a srcset from the Framer CDN sizes (scale-down-to caps the longest side)\n *   so each screen downloads the smallest file that stays sharp. Keep \"Sizes\" identical on every\n *   breakpoint so the hidden breakpoint copies in the HTML resolve to the same file (one download).\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */function buildSrcSet(src,w,h){if(!src||!w||!h||!/^https:\\/\\/framerusercontent\\.com\\/images\\//.test(src)||src.indexOf(\"?\")!==-1)return undefined;const longest=Math.max(w,h);const list=[];for(const n of[512,1024,2048]){if(n<longest)list.push(`${src}?scale-down-to=${n} ${Math.round(w*n/longest)}w`);}list.push(`${src} ${w}w`);return list.join(\", \");}export default function PriorityImage(props){const{image,alt:altProp,fit,radius,imageWidth,offsetX,corners,responsive,sizes,naturalWidth,naturalHeight,split}=props;const cmsSrc=image&&image.src?image.src:\"\";const src=cmsSrc||props.src;const alt=image&&image.alt||altProp;const priority={fetchpriority:\"high\"};// Corners: round all four, or only the outer side of a slice (so two halves read as one rounded card).\nconst r=radius||0;const borderRadius=corners===\"left\"?`${r}px 0 0 ${r}px`:corners===\"right\"?`0 ${r}px ${r}px 0`:`${r}px`;// Slice mode: the frame shows one window of a wider image (image drawn at imageWidth px, shifted by offsetX).\n// Two side-by-side slices rebuild one image while each stays smaller than the headline, so the text remains LCP.\nif(imageWidth>0){return /*#__PURE__*/_jsx(\"div\",{\"aria-hidden\":true,style:{position:\"relative\",width:\"100%\",height:\"100%\",overflow:\"hidden\",borderRadius,...props.style},children:/*#__PURE__*/_jsx(\"img\",{src:src,alt:\"\",loading:\"eager\",decoding:\"async\",draggable:false,...priority,style:{position:\"absolute\",top:0,left:-offsetX,width:imageWidth,height:\"100%\",maxWidth:\"none\",display:\"block\"}})});}const srcSet=cmsSrc?image.srcSet||undefined:responsive?buildSrcSet(src,naturalWidth,naturalHeight):undefined;if(split){// Both images sit at the frame's origin at full frame width, so the halves line up exactly.\n// The left half overlaps the seam by 1px (same pixels underneath), so no hairline shows.\nconst img=side=>/*#__PURE__*/_jsx(\"img\",{src:src,srcSet:srcSet,sizes:srcSet?sizes:undefined,alt:side===\"left\"?alt:\"\",\"aria-hidden\":side===\"left\"&&alt?undefined:true,loading:\"eager\",decoding:\"async\",draggable:false,...priority,style:{position:\"absolute\",top:0,[side]:0,width:side===\"left\"?\"calc(200% - 2px)\":\"200%\",height:\"100%\",maxWidth:\"none\",display:\"block\",objectFit:fit}});return /*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",width:\"100%\",height:\"100%\",overflow:\"hidden\",borderRadius,...props.style},children:[/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:0,bottom:0,left:\"50%\",right:0,overflow:\"hidden\"},children:img(\"right\")}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:0,bottom:0,left:0,width:\"calc(50% + 1px)\",overflow:\"hidden\"},children:img(\"left\")})]});}return /*#__PURE__*/_jsx(\"img\",{src:src,srcSet:srcSet,sizes:srcSet?sizes:undefined,alt:alt,loading:\"eager\",decoding:\"async\",draggable:false,\"aria-hidden\":alt?undefined:true,...priority,style:{display:\"block\",width:\"100%\",height:\"100%\",objectFit:fit,borderRadius,...props.style}});}addPropertyControls(PriorityImage,{image:{type:ControlType.ResponsiveImage,title:\"Image\"},src:{type:ControlType.String,title:\"Image URL\",defaultValue:\"https://framerusercontent.com/images/wZloaqmvJGuOtt8M3FgOURGgF58.png\"},alt:{type:ControlType.String,title:\"Alt\",defaultValue:\"\"},fit:{type:ControlType.Enum,title:\"Fit\",options:[\"cover\",\"contain\",\"fill\"],defaultValue:\"fill\"},radius:{type:ControlType.Number,title:\"Radius\",defaultValue:0,min:0,max:200},corners:{type:ControlType.Enum,title:\"Corners\",options:[\"all\",\"left\",\"right\"],optionTitles:[\"All\",\"Left side\",\"Right side\"],defaultValue:\"all\"},imageWidth:{type:ControlType.Number,title:\"Slice Image W\",defaultValue:0,min:0,max:4e3,step:1},offsetX:{type:ControlType.Number,title:\"Slice Offset\",defaultValue:0,min:0,max:4e3,step:1},responsive:{type:ControlType.Boolean,title:\"Responsive\",defaultValue:false},split:{type:ControlType.Boolean,title:\"Split Halves\",defaultValue:false,hidden:p=>p.imageWidth>0},sizes:{type:ControlType.String,title:\"Sizes\",defaultValue:\"100vw\",hidden:p=>!p.responsive&&!p.image},naturalWidth:{type:ControlType.Number,title:\"Natural W\",defaultValue:0,min:0,max:8e3,step:1,hidden:p=>!p.responsive},naturalHeight:{type:ControlType.Number,title:\"Natural H\",defaultValue:0,min:0,max:8e3,step:1,hidden:p=>!p.responsive}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"PriorityImage\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./PriorityImage.map"],"mappings":"A,8JAmBG,SAASQ,EAAYC,EAAIC,EAAEC,EAAE,CAAC,GAAG,CAACF,GAAK,CAACC,GAAG,CAACC,GAAG,CAAC,8CAA8C,KAAKF,CAAG,GAAGA,EAAI,QAAQ,GAAG,IAAI,GAAG,OAAiB,IAAMG,EAAQ,KAAK,IAAIF,EAAEC,CAAC,EAAQE,EAAK,CAAC,EAAE,IAAI,IAAM,IAAI,CAAC,IAAI,KAAK,IAAI,EAAM,EAAED,GAAQC,EAAK,KAAK,GAAGJ,EAAI,iBAAiB,EAAE,GAAG,KAAK,MAAMC,EAAE,EAAEE,CAAO,EAAE,EAAE,EAA6B,OAA1BC,EAAK,KAAK,GAAGJ,EAAI,GAAGC,EAAE,EAAE,EAASG,EAAK,KAAK,IAAI,CAAE,CAAC,SAAwBC,EAAcC,EAAM,CAAC,GAAK,CAACC,QAAM,IAAIC,EAAQC,MAAIC,SAAOC,aAAWC,UAAQC,UAAQC,aAAWC,QAAMC,eAAaC,gBAAcC,SAAOZ,EAAYa,EAAOZ,GAAOA,EAAM,IAAIA,EAAM,IAAI,GAASP,EAAImB,GAAQb,EAAM,IAAUc,EAAIb,GAAOA,EAAM,KAAKC,EAAca,EAAS,CAAC,cAAc,MAAM,EAC5oBC,EAAEZ,GAAQ,EAAQa,EAAaV,IAAU,OAAO,GAAGS,EAAE,SAASA,EAAE,IAAIT,IAAU,QAAQ,KAAKS,EAAE,KAAKA,EAAE,MAAM,GAAGA,EAAE,IAErH,GAAGX,EAAW,EAAG,MAAoBpB,gBAAK,MAAM,CAAC,cAAc,GAAK,MAAM,CAAC,SAAS,WAAW,MAAM,OAAO,OAAO,OAAO,SAAS,SAASgC,eAAa,G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