{"version":3,"file":"BiginIframeForm.BT-LRGAP.mjs","names":["useRef","useState","useCallback","useMemo"],"sources":["https:/framerusercontent.com/modules/wJQWrizEyavJvqcPctXU/dvwGkzg6dg6XZkQNkKdP/BiginIframeForm.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{startTransition,useCallback,useEffect,useMemo,useRef,useState}from\"react\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function BiginIframeForm(props){const{background,padding}=props;const containerRef=useRef(null);const[scale,setScale]=useState(1);const intrinsicHeight=1100;const updateScale=useCallback(availableHeight=>{if(!Number.isFinite(availableHeight)||availableHeight<=0)return;const nextScale=Math.min(1,availableHeight/intrinsicHeight);startTransition(()=>setScale(nextScale));},[]);useEffect(()=>{if(typeof window===\"undefined\")return;if(typeof ResizeObserver===\"undefined\")return;const node=containerRef.current;if(!node)return;updateScale(node.clientHeight);const observer=new ResizeObserver(entries=>{const entry=entries[0];if(!entry)return;updateScale(entry.contentRect.height);});observer.observe(node);return()=>observer.disconnect();},[updateScale]);const containerStyle=useMemo(()=>({position:\"relative\",width:\"100%\",height:\"100%\",background,padding,boxSizing:\"border-box\",overflow:\"hidden\"}),[background,padding]);const viewportStyle=useMemo(()=>({position:\"relative\",width:\"100%\",height:\"100%\",overflow:\"hidden\"}),[]);const scaledFrameStyle=useMemo(()=>({position:\"absolute\",left:\"50%\",top:0,width:`${100/scale}%`,height:`${intrinsicHeight}px`,transform:`translateX(-50%) scale(${scale})`,transformOrigin:\"top center\",pointerEvents:\"auto\"}),[scale]);const iframeStyle=useMemo(()=>({width:\"100%\",height:\"100%\",border:\"0\",display:\"block\",overflow:\"hidden\",pointerEvents:\"auto\"}),[]);return /*#__PURE__*/_jsx(\"div\",{ref:containerRef,style:containerStyle,children:/*#__PURE__*/_jsx(\"div\",{style:viewportStyle,children:/*#__PURE__*/_jsx(\"div\",{style:scaledFrameStyle,children:/*#__PURE__*/_jsx(\"iframe\",{title:\"Bigin Form\",src:\"https://us.bigin.online/org916368547/forms/setup-your-business-in-uae\",style:iframeStyle,scrolling:\"no\"})})})});}addPropertyControls(BiginIframeForm,{background:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},padding:{type:ControlType.Padding,title:\"Padding\",defaultValue:\"0px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"BiginIframeForm\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./BiginIframeForm.map"],"mappings":"4NAGG,SAAwB,EAAgB,EAAM,CAAC,GAAK,CAAC,aAAW,WAAS,EAAY,EAAaA,EAAO,IAAI,EAAO,CAAC,EAAM,GAAUC,EAAS,CAAC,EAAQ,EAAgB,KAAW,EAAYC,EAAY,GAAiB,CAAC,GAAG,CAAC,OAAO,SAAS,CAAe,GAAG,GAAiB,EAAE,OAAO,IAAM,EAAU,KAAK,IAAI,EAAE,EAAgB,CAAe,EAAE,MAAoB,EAAS,CAAS,CAAC,CAAE,EAAE,CAAC,CAAC,EAAm/B,OAAj/B,MAAc,CAAuC,GAA5B,IAAS,QAAsB,OAAO,eAAiB,IAAY,OAAO,IAAM,EAAK,EAAa,QAAQ,GAAG,CAAC,EAAK,OAAO,EAAY,EAAK,YAAY,EAAE,IAAM,EAAS,IAAI,eAAe,GAAS,CAAC,IAAM,EAAM,EAAQ,GAAO,GAAa,EAAY,EAAM,YAAY,MAAM,CAAE,CAAC,EAAyB,OAAvB,EAAS,QAAQ,CAAI,MAAY,EAAS,WAAW,CAAE,EAAE,CAAC,CAAW,CAAC,EAAgpB,EAAK,MAAM,CAAC,IAAI,EAAa,MAAtpBC,OAAa,CAAC,SAAS,WAAW,MAAM,OAAO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