import{a as u,b as j,c as _,d as H}from"/build/_shared/chunk-7K7YZZNH.js";import"/build/_shared/chunk-UGZ3NW4Q.js";import"/build/_shared/chunk-5QM6QWNQ.js";import{b as h,g as A,j as R,k as C,l as M,n as c,p as T,q as E,s as I,t as b}from"/build/_shared/chunk-SO77OUZC.js";import{e as s}from"/build/_shared/chunk-242LWQVT.js";var y=s(h());var l=s(h());var B=s(b());function P(d){let{theme:r}=d,o=T(),n=o.state!=="idle",m=l.useRef(null),[f,g]=l.useState(!0);l.useEffect(()=>{!m.current||(n&&g(!1),Promise.allSettled(m.current.getAnimations().map(({finished:k})=>k)).then(()=>!n&&g(!0)))},[n]);let S=(r==null?void 0:r.highlight_color)||"#60A511",a="0%";n&&f&&(a="100%"),o.state==="submitting"&&(a="33%"),n&&o.state==="loading"&&(a="93%"),o.state==="idle"&&!f&&(a="100%");let p={barBlck:{position:"fixed",insetX:0,top:0,right:0,left:0,height:3,zIndex:50},bar:{height:2,width:n?a:0,opacity:n?1:0,backgroundColor:S,transition:"width 2s ease-in-out, opacity .2s ease-out"}};return(0,B.jsx)("div",{role:"progressbar","aria-hidden":!n,"aria-valuetext":n?"Loading":void 0,style:p.barBlck,children:(0,B.jsx)("div",{ref:m,style:p.bar})})}var t=s(b()),w=s(h()),$=()=>{let[d,r]=(0,y.useState)(!1);return(0,y.useEffect)(()=>{r(!0)},[]),d?(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("script",{src:"https://use.typekit.net/ilm3oim.js",crossOrigin:"anonymous",async:!0})}):null};function z(){let d=c(),r="GTM-P75F3J8",o=!d.some(e=>{var i;return((i=e.handle)==null?void 0:i.hydrate)===!1}),n=c().map(e=>{var i;return(i=e==null?void 0:e.data)==null?void 0:i.dynamicLinks}).filter(e=>e).reduce((e,i)=>[...e,...i],[]),m=c().map(e=>{var i;return(i=e==null?void 0:e.data)==null?void 0:i.additionalScripts}).filter(e=>e).reduce((e,i)=>[...e,...i],[]),f=c().map(e=>{var i;return(i=e==null?void 0:e.data)==null?void 0:i.additionalStyles}).filter(e=>e).reduce((e,i)=>[...e,...i],[]),g=c().map(e=>{var i;return(i=e==null?void 0:e.data)==null?void 0:i.theme}).filter(e=>e),S=H(g,[0],{}),a=u("fbpixel");j(e=>e.pageView());let p=u("fbchat"),k=p?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{id:"fb-root"}),(0,t.jsx)("div",{id:"fb-customer-chat",className:"fb-customerchat"}),(0,t.jsx)("script",{dangerouslySetInnerHTML:{__html:`var chatbox = document.getElementById('fb-customer-chat');
        chatbox.setAttribute("page_id", "${p}");
        chatbox.setAttribute("attribution", "biz_inbox");`}}),(0,t.jsx)("script",{dangerouslySetInnerHTML:{__html:`window.fbAsyncInit = function() {
          FB.init({xfbml: true, version: 'v14.0'});
        };
        (function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) return;
          js = d.createElement(s); js.id  = id;
          js.src = 'https://connect.facebook.net/en_US/sdk/xfbml.customerchat.js';
          fjs.parentNode.insertBefore(js, fjs);
        }(document, 'script', 'facebook-jssdk'));`}})]}):null,v=u("googletagmanager"),F=v||r,L=u("RealAdsChat"),J=L?(0,t.jsx)("chat-widget",{"location-id":L,"agency-name":"RealAds CRM","agency-website":"https://go.bestagentsinc.com/",locale:"en-us"}):null;return(0,t.jsxs)("html",{lang:"en",children:[(0,t.jsxs)("head",{children:[(0,t.jsx)("meta",{charSet:"utf-8"}),(0,t.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0, minimum-scale=1.0, user-scalable=0"}),(0,t.jsx)("link",{rel:"apple-touch-icon",sizes:"180x180",href:"/apple-touch-icon.png"}),(0,t.jsx)("link",{rel:"icon",type:"image/png",sizes:"32x32",href:"/favicon-32x32.png"}),(0,t.jsx)("link",{rel:"icon",type:"image/png",sizes:"16x16",href:"/favicon-16x16.png"}),(0,t.jsx)("link",{rel:"manifest",href:"/site.webmanifest"}),(0,t.jsx)(C,{}),(0,t.jsx)(R,{}),(0,t.jsx)(t.Fragment,{children:n.map((e,i)=>(0,w.createElement)("link",{...e,key:`additionalLink_${i}`}))}),(0,t.jsx)(t.Fragment,{children:f.map((e,i)=>{let X={...e,body:void 0};return(0,w.createElement)("style",{...X,key:`additionalStyle_${i}`},e==null?void 0:e.body)})}),(0,t.jsx)(t.Fragment,{children:m.map((e,i)=>(0,w.createElement)("script",{...e,key:`additionalScript_${i}`}))}),_(),(0,t.jsx)("script",{src:"https://kit.fontawesome.com/b2daf39388.js",crossOrigin:"anonymous",async:!0})]}),(0,t.jsxs)("body",{children:[(0,t.jsx)("noscript",{children:(0,t.jsx)("iframe",{src:`https://www.googletagmanager.com/ns.html?id=${F}`,height:"0",width:"0",style:{display:"none",visibility:"hidden"}})}),a&&(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("noscript",{children:(0,t.jsx)("img",{height:"1",width:"1",src:`https://www.facebook.com/tr?id=${a}&ev=PageView&noscript=1`})})}),k,J,(0,t.jsxs)("div",{id:"outer-container",children:[(0,t.jsx)(P,{theme:S}),(0,t.jsx)(A,{})]}),o&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(I,{getKey:e=>e.pathname}),(0,t.jsx)(M,{})]}),(0,t.jsx)("script",{src:"https://www.google.com/recaptcha/api.js?render=explicit",async:!0,defer:!0}),(0,t.jsx)("script",{src:"https://maps.googleapis.com/maps/api/js?key=AIzaSyBwRCHDbepEQNY4k79Tu_C2yYaM5yqwnrQ&libraries=places"}),(0,t.jsx)($,{}),(0,t.jsx)(E,{})]})]})}export{z as default};
