1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4532],{4532:(e,t,s)=>{s.r(t),s.d(t,{default:()=>m});var a=s(37876),n=s(21163),i=s(12540),r=s(89099),o=s(14232),d=s(48230),c=s.n(d),l=s(50600);function p(e){let{websiteData:t,scriptContent:s}=e,n=(0,r.useRouter)(),[i,d]=(0,o.useState)(()=>Date.now());return(0,o.useEffect)(()=>{d(Date.now())},[n.asPath]),(0,a.jsx)("div",{className:"min-h-[100dvh] h-full",children:(0,a.jsx)(l.A,{scriptContent:s,websiteData:t},i)})}function m(e){let{data:t,websiteData:s}=e,[d,m]=(0,o.useState)(!0),u=(0,o.useRef)(!1),h=(0,o.useRef)(!1),f=s?.bookAppointmentScript||{},g=t?.appointment?.type||"",v=t?.appointment?.link||"",w=f?.results?.scripts?.[0]?.scriptContent||"",x=(0,r.useRouter)();return(0,o.useEffect)(()=>{let e=()=>{};return window.addEventListener("popstate",e),console.log("History",window.history),()=>{window.removeEventListener("popstate",e)}},[x]),(0,o.useEffect)(()=>{u.current=!1,h.current=!1,m(!0)},[]),(0,o.useEffect)(()=>{if(!v||"cta"===g)return void m(!1);m(!0);let e="us.vetstoria.com",t=()=>{document.getElementById("oabp-widget")?.remove(),document.getElementById("vestoria-widget-script")?.remove()},s=setTimeout(()=>{try{t();let s=document.createElement("div");s.id="oabp-widget",s.dataset.mode="html5",s.dataset.domain=e,s.dataset.siteHash=v,s.dataset.mobileMessage="Touch Here to Make an Appointment",s.dataset.autoMobileRedirection="false",s.dataset.forceDesktopView="true",s.dataset.offset="0",s.dataset.themeCustomisation="807AA0,95CDC7,807AA0,ffffff,95CDC7,95CDC7,807AA0,807AA0,807AA0,95CDC7";let a=document.getElementById("vestoria-widget-container");a&&a.appendChild(s);let n=document.createElement("script");n.id="vestoria-widget-script",n.src=`https://${e}/js/oabp-widget-require.min.js`,n.async=!0,n.onload=()=>{m(!1),u.current=!0},n.onerror=()=>{console.error("Failed to load widget script"),m(!1)},document.body.appendChild(n)}catch(e){console.error("Error setting up Vestoria widget:",e),m(!1)}},100);return()=>{clearTimeout(s),h.current||(t(),u.current=!1,h.current=!0)}},[v,g]),(0,o.useEffect)(()=>()=>{document.getElementById("oabp-widget")?.remove(),document.getElementById("vestoria-widget-script")?.remove(),u.current=!1},[]),"bms"===g?(0,a.jsx)(p,{websiteData:s,scriptContent:w},x.asPath):(0,a.jsx)("section",{className:"inner-banner py-[20px] lg:py-[30px] xl:pt-14 book-appointment-page",children:(0,a.jsxs)("div",{className:"container",children:[(0,a.jsxs)("div",{className:`${"cta"!==g?"":"min-h-[25vh]"}`,children:[(t?.appointment?.heading||t?.appointment?.description)&&(0,a.jsxs)("div",{className:"inner_page-head",children:[t?.appointment?.heading&&(0,a.jsx)("h1",{className:"page-heading",children:(0,i.EJ)(t?.appointment?.heading||"",n.N8?.COMMON_PAGE_SECTION?.TITLE)}),t?.appointment?.description&&(0,a.jsx)("p",{className:"page-desc",children:(0,i.EJ)(t?.appointment?.description||"",n.N8?.COMMON_PAGE_SECTION?.DESC)})]}),"cta"===g&&(0,a.jsx)("div",{className:"flex justify-center items-center mt-3",children:(0,a.jsx)(c(),{href:v,target:"_blank",className:"btn primary-btn",children:"Book Appointment Here"})})]}),"cta"!==g&&v&&(0,a.jsxs)("div",{className:"",children:[d&&(0,a.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,a.jsxs)("div",{className:"space-y-4 w-full max-w-lg",children:[(0,a.jsx)("div",{className:"h-4 bg-gray-200 rounded-full animate-pulse"}),(0,a.jsx)("div",{className:"h-4 bg-gray-200 rounded-full animate-pulse w-3/4"}),(0,a.jsx)("div",{className:"h-4 bg-gray-200 rounded-full animate-pulse w-1/2"})]})}),(0,a.jsx)("div",{id:"vestoria-widget-container",className:d?"hidden":""})]}),"script"===g&&!v&&w&&(0,a.jsx)(l.A,{scriptContent:w,websiteData:s},x.asPath)]})})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.