{"version":3,"file":"LiveEmbed.DOm6_4Tp.mjs","names":["React.useRef","React.useState","__esmMin","init_npm_react_18_3_1","window","ce","init_jsx_runtime","c","_e","de","init_ssg_sandbox_shims","addPropertyControls","init_framer_DcxuU94H","ControlType","LiveEmbed","props","ref","height","setHeight","fallbackHeight","onMessage","d","url","init_LiveEmbed"],"sources":["https:/framerusercontent.com/modules/TSSy4tWYZjSZXAVigjVj/Jk6VMsuHCU0sgfrLU9Ml/LiveEmbed.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * IUTA Live Embed\n *\n * Zeigt eine Live-Seite des IUTA-Backends per iframe und passt die Höhe\n * automatisch an: die Embed-Seite meldet ihre Höhe per postMessage\n * (auch bei Filter, Suche, Resize).\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n * @framerIntrinsicWidth 1200\n * @framerIntrinsicHeight 800\n */export default function LiveEmbed(props){const{url,fallbackHeight}=props;const ref=React.useRef(null);const[height,setHeight]=React.useState(fallbackHeight);React.useEffect(()=>{const onMessage=e=>{const d=e.data;if(!d||d.type!==\"iuta-embed-height\"||typeof d.height!==\"number\")return;if(!ref.current||e.source!==ref.current.contentWindow)return;setHeight(Math.ceil(d.height));};window.addEventListener(\"message\",onMessage);return()=>window.removeEventListener(\"message\",onMessage);},[]);return /*#__PURE__*/_jsx(\"iframe\",{ref:ref,src:url,title:\"IUTA live data\",loading:\"lazy\",style:{width:\"100%\",height,border:0,display:\"block\",background:\"transparent\"}});}LiveEmbed.defaultProps={url:\"https://iuta-backend-alpha.vercel.app/embed/records/worldrecords\",fallbackHeight:800};addPropertyControls(LiveEmbed,{url:{type:ControlType.String,title:\"URL\"},fallbackHeight:{type:ControlType.Number,title:\"Start height\",defaultValue:800,min:100,max:6e3,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LiveEmbed\",\"slots\":[],\"annotations\":{\"framerIntrinsicHeight\":\"800\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"any\",\"framerIntrinsicWidth\":\"1200\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LiveEmbed.map"],"mappings":"A,sMAWG,SAAwBc,EAAU,EAAM,CAAC,GAAK,CAAC,MAAI,kBAAgBC,EAAYC,EAAIhB,EAAa,IAAI,EAAO,CAACiB,EAAOC,GAAWjB,EAAekB,CAAc,EAA4U,OAA1Ud,MAAoB,CAAC,IAAMe,EAAU,GAAG,CAAC,IAAMC,EAAE,EAAE,KAASA,GAAGA,EAAE,OAAO,qBAAqB,OAAOA,EAAE,QAAS,UAAoBL,EAAI,SAAS,EAAE,SAASA,EAAI,QAAQ,eAAqBE,EAAU,KAAK,KAAKG,EAAE,MAAM,CAAC,CAAE,EAA+C,OAA7CjB,EAAO,iBAAiB,UAAUgB,CAAS,MAAYhB,EAAO,oBAAoB,UAAUgB,CAAS,CAAE,EAAE,CAAC,CAAC,EAAsB,gBAAK,SAAS,CAAK,MAAI,IAAIE,EAAI,MAAM,iBAAiB,QAAQ,OAAO,MAAM,CAAC,MAAM,OAAO,SAAO,OAAO,EAAE,QAAQ,QAAQ,WAAW,aAAa,CAAC,CAAC,CAAE,C,8CAAC,EAAU,aAAa,CAAC,IAAI,mEAAmE,eAAe,GAAG,EAAEX,EAAoBG,EAAU,CAAC,IAAI,CAAC,KAAKD,EAAY,OAAO,MAAM,KAAK,EAAE,eAAe,CAAC,KAAKA,EAAY,OAAO,MAAM,eAAe,aAAa,IAAI,IAAI,IAAI,IAAI,IAAI,KAAK,IAAI,CAAC,CAAC,C"}