{"version":3,"file":"ArchiveMedia.CZMsyMZq.mjs","names":["React.useState","__esmMin","_e","c","init_jsx_runtime","ce","init_npm_react_18_3_1","init_framer_BWFVvmND","RenderTarget","addPropertyControls","ControlType","ArchiveMedia","failed","setFailed","src","canvas","frame","style","kind","alt","__FramerMetadata__","init_ArchiveMedia","\"exports\"","\"default\"","\"type\"","\"name\"","\"slots\"","\"annotations\"","\"framerContractVersion\"","\"framerSupportedLayoutHeight\"","\"framerSupportedLayoutWidth\"","\"__FramerMetadata__\""],"sources":["https:/framerusercontent.com/modules/N8FS6YUnTYPThLXo3xha/oGzRGhdrk9fI7BLYQPnK/ArchiveMedia.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";/** @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto */export default function ArchiveMedia({src=\"\",kind=\"Video\",alt=\"\",style}){const[failed,setFailed]=React.useState(false);React.useEffect(()=>setFailed(false),[src]);const canvas=RenderTarget.current()===RenderTarget.canvas;const frame={...style,width:\"100%\",height:\"auto\",overflow:\"hidden\",background:\"#E1DEE6\"};if(!src||failed)return /*#__PURE__*/_jsx(\"div\",{style:{...frame,padding:24,boxSizing:\"border-box\",fontFamily:\"Poppins, sans-serif\",fontWeight:300,fontSize:17,color:\"#0A0045\"},children:src?/*#__PURE__*/_jsx(\"a\",{href:src,target:\"_blank\",rel:\"noopener noreferrer\",style:{color:\"inherit\"},children:\"View original media\"}):null});if(canvas&&kind!==\"Image\")return /*#__PURE__*/_jsx(\"div\",{role:\"img\",\"aria-label\":alt||\"Video\",style:{...frame,aspectRatio:\"16 / 9\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",fontFamily:\"Poppins, sans-serif\",fontWeight:300,color:\"#0A0045\"},children:\"Video\"});if(kind===\"Image\")return /*#__PURE__*/_jsx(\"div\",{style:frame,children:/*#__PURE__*/_jsx(\"img\",{src:src,alt:alt,loading:\"lazy\",onError:()=>setFailed(true),style:{display:\"block\",width:\"100%\",height:\"auto\"}})});if(kind===\"Embed\")return /*#__PURE__*/_jsx(\"div\",{style:frame,children:/*#__PURE__*/_jsx(\"iframe\",{src:src,title:alt||\"Article video\",loading:\"lazy\",allowFullScreen:true,style:{display:\"block\",width:\"100%\",aspectRatio:\"16 / 9\",border:0}})});return /*#__PURE__*/_jsx(\"div\",{style:frame,children:/*#__PURE__*/_jsx(\"video\",{src:src,\"aria-label\":alt||\"Article video\",controls:true,playsInline:true,preload:\"metadata\",onError:()=>setFailed(true),style:{display:\"block\",width:\"100%\",height:\"auto\"}})});}addPropertyControls(ArchiveMedia,{src:{type:ControlType.String,title:\"Source URL\"},kind:{type:ControlType.Enum,title:\"Media\",options:[\"Image\",\"Video\",\"Embed\"],defaultValue:\"Video\"},alt:{type:ControlType.String,title:\"Description\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ArchiveMedia\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ArchiveMedia.map"],"mappings":"A,yLACuC,SAAwBW,EAAa,CAAC,MAAI,GAAG,OAAK,QAAQ,MAAI,GAAG,SAAO,CAAC,GAAK,CAACC,EAAOC,GAAWb,EAAe,EAAK,EAAEK,MAAoBQ,EAAU,EAAK,EAAE,CAACC,CAAG,CAAC,EAAE,IAAMC,EAAOP,EAAa,QAAQ,IAAIA,EAAa,OAAaQ,EAAM,CAAC,GAAGC,EAAM,MAAM,OAAO,OAAO,OAAO,SAAS,SAAS,WAAW,SAAS,EAA8hC,MAAzhC,CAACH,GAAKF,EAA2B,gBAAK,MAAM,CAAC,MAAM,CAAC,GAAGI,EAAM,QAAQ,GAAG,UAAU,aAAa,WAAW,sBAAsB,WAAW,IAAI,SAAS,GAAG,MAAM,SAAS,EAA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