const currentScriptTag783126163653=document.currentScript;document.addEventListener("DOMContentLoaded",function(){setTimeout(function(){(function(){function getQueryParam(param){const scriptSrc=currentScriptTag783126163653.src;const urlParams=new URLSearchParams(scriptSrc.split('?')[1]);return urlParams.get(param)}const formId=getQueryParam('form_id');const iframeSrc=`https://leads.tgminfotech.com/get-web-form?form_id=${formId}`;const iframeDiv=document.createElement("div");const iframe=document.createElement("iframe");iframe.src=iframeSrc;iframe.width="100%";iframe.height="auto";iframe.style.border="none";window.addEventListener("message",function(event){if(event.data.type==='redirect'){window.location.href=event.data.url}if(event.data.type==='resizeIframe'){iframe.style.height=event.data.height+'px'}if(event.data.type==='modalResize'){iframe.style.height='100vh';iframe.style.width='100vw';iframe.style.position='fixed';iframe.style.top='0';iframe.style.left='0';iframe.style.zIndex='99999'}if(event.data.type==='openmodal'){iframe.src=`https://leads.tgminfotech.com/get-web-form?form_id=${formId}&openmodal=1`;document.querySelector('body').style.overflow='hidden';document.querySelector('body').style.height='100vh';document.body.appendChild(iframe)}if(event.data.type==='closemodal'){iframe.style.height='auto';iframe.style.width='100%';iframe.style.position='';iframe.style.top='';iframe.style.left='';iframe.style.zIndex='';iframe.src=`https://leads.tgminfotech.com/get-web-form?form_id=${formId}`;document.querySelector('body').style.overflow='';document.querySelector('body').style.height='';iframeDiv.appendChild(iframe)}if(event.data.type==='openfullpage'){window.location.href=new URL(window.location.href).toString().split('?')[0]+'?'+new URLSearchParams(window.location.search).toString()+'&open-full-page='+formId}});if(new URLSearchParams(window.location.search).has('open-full-page')&&new URLSearchParams(window.location.search).get('open-full-page')==formId){iframe.style.height='100vh';iframe.style.width='100vw';iframe.style.position='fixed';iframe.style.top='0';iframe.style.left='0';iframe.style.zIndex='99999';iframe.src=`https://leads.tgminfotech.com/get-web-form?form_id=${formId}&openfullpage=1`;document.querySelector('body').style.overflow='hidden';document.querySelector('body').style.height='100vh';document.body.appendChild(iframe);currentScriptTag783126163653.remove()}else{iframeDiv.appendChild(iframe);const scriptTag=currentScriptTag783126163653;scriptTag.parentNode.replaceChild(iframeDiv,scriptTag)}iframe.onload=function(){iframe.contentWindow.document.body.scrollWidth+'px'}})();},1000);});