{"version":3,"file":"RMRPhase2Embed.DoW4HSB6.mjs","names":["useRef","useState","useMemo"],"sources":["https:/framerusercontent.com/modules/LUlZgRInZ2fcJt50yhx0/AwscUAAB9in8NrY4RqyN/RMRPhase2Embed.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useMemo,useRef,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n * @framerIntrinsicWidth 1072\n * @framerIntrinsicHeight 800\n */export default function RMRPhase2Embed({html=\"\",view=\"design\",title=\"Design development\",style}){const frame=useRef(null);const[height,setHeight]=useState(800);const source=useMemo(()=>html.replace('const VIEW = \"design\";',`const VIEW = \"${view}\";`),[html,view]);useEffect(()=>{function receive(event){if(event.source!==frame.current?.contentWindow||event.data?.type!==\"rmr-phase2-height\")return;const next=event.data.height;if(typeof next===\"number\"&&Number.isFinite(next)&&next>0&&next<3e4)setHeight(Math.ceil(next));}window.addEventListener(\"message\",receive);return()=>window.removeEventListener(\"message\",receive);},[]);return /*#__PURE__*/_jsx(\"div\",{style:{...style,position:\"relative\",width:\"100%\",height,minWidth:0},children:/*#__PURE__*/_jsx(\"iframe\",{ref:frame,srcDoc:source,title:title,sandbox:\"allow-scripts\",allowFullScreen:true,style:{display:\"block\",width:\"100%\",height,border:0}})});}addPropertyControls(RMRPhase2Embed,{html:{type:ControlType.String,title:\"HTML\",displayTextArea:true,defaultValue:\"\",preventLocalization:true},view:{type:ControlType.Enum,title:\"View\",options:[\"design\",\"video\"],optionTitles:[\"Design development\",\"Video\"],defaultValue:\"design\"},title:{type:ControlType.String,title:\"Accessible title\",defaultValue:\"Design development\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"RMRPhase2Embed\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"800\",\"framerIntrinsicWidth\":\"1072\",\"fram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