(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[492],{9937:function(e,t,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/blog/[slug]",function(){return l(1389)}])},1389:function(e,t,l){"use strict";l.r(t),l.d(t,{default:function(){return J}});var i=l(5893),a=l(7294),r=l(9008),n=l.n(r),o=l(1163),s=l(1664),c=l.n(s),d=l(7317),h=l(9402),u=l(8773),m=l(4958),g=l(1924),p=l(8310),x=l(7438);let v="https://blogs.virtualtriage.ai",j="https://virtualtriage.ai",b="/assets/og/default.jpg",f=e=>e?new Date(e).toLocaleDateString("en-GB",{year:"numeric",month:"long",day:"numeric"}):null,y=e=>e&&/^https?:\/\//.test(e)?e:e?"".concat(j).concat(e):void 0,_=e=>e?Math.max(1,Math.round(e.replace(/```[\s\S]*?```/g,"").replace(/[#*_>\-\n]/g," ").split(/\s+/).filter(Boolean).length/200)):0,N=e=>{if(!e||"string"!=typeof e)return"";let t=e.trim();return(t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'"))&&(t=t.slice(1,-1)),t.replace(/\\r\\n/g,"\n").replace(/\\n/g,"\n").replace(/\\"/g,'"').replace(/\\'/g,"'")},w=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=[],l=/^(#{2,3})\s+(.+?)\s*$/;return e.split("\n").forEach(e=>{let i=e.match(l);if(i){let e=i[1].length,l=i[2],a=l.toLowerCase().replace(/&/g,"and").replace(/[^a-z0-9\s-]/g,"").trim().replace(/\s+/g,"-");t.push({level:e,text:l,id:a})}}),t},k=e=>{var t;let l=(null==e?void 0:e.hero_image_url)||(null==e?void 0:null===(t=e.og)||void 0===t?void 0:t.og_image);if(!l)return b;try{let e=window.location.protocol,t=new URL(l,window.location.origin);return"https:"===e&&"http:"===t.protocol&&(t.protocol="https:"),t.toString()}catch(e){return l}},S=(e,t)=>({twitter:"https://twitter.com/intent/tweet?url=".concat(encodeURIComponent(e),"&text=").concat(encodeURIComponent(t)),linkedin:"https://www.linkedin.com/shareArticle?mini=true&url=".concat(encodeURIComponent(e),"&title=").concat(encodeURIComponent(t)),facebook:"https://www.facebook.com/sharer/sharer.php?u=".concat(encodeURIComponent(e))}),T=e=>{var t;let l=y(null==e?void 0:e.canonical_url)||"".concat(j).concat((null==e?void 0:e.slug)||""),i=(null==e?void 0:e.hero_image_url)||(null==e?void 0:null===(t=e.og)||void 0===t?void 0:t.og_image);return{"@context":"https://schema.org","@type":"Article",inLanguage:"en-GB",headline:null==e?void 0:e.title,description:null==e?void 0:e.meta_description,author:{"@type":"Organization",name:"Virtual Triage"},publisher:{"@type":"Organization",name:"Virtual Triage",logo:{"@type":"ImageObject",url:"".concat(j,"/logo.png")}},image:i?[i]:void 0,mainEntityOfPage:l,isAccessibleForFree:!0,datePublished:null==e?void 0:e.publish_date_iso,dateModified:(null==e?void 0:e.last_reviewed_iso)||(null==e?void 0:e.publish_date_iso)}},C=e=>({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:"".concat(j,"/")},{"@type":"ListItem",position:2,name:"Blog",item:"".concat(j,"/blog")},{"@type":"ListItem",position:3,name:(null==e?void 0:e.title)||"Article",item:"".concat(j).concat((null==e?void 0:e.slug)||"")}]}),L=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return(null==e?void 0:e.length)?{"@context":"https://schema.org","@type":"FAQPage",mainEntity:e.map(e=>{let{q:t,a:l}=e;return{"@type":"Question",name:t,acceptedAnswer:{"@type":"Answer",text:l}}})}:null},O=e=>({"@context":"https://schema.org","@type":"MedicalWebPage",headline:null==e?void 0:e.title,url:"".concat(j).concat((null==e?void 0:e.slug)||""),datePublished:null==e?void 0:e.publish_date_iso,publisher:{"@type":"Organization",name:"Virtual Triage",url:"".concat(j)}}),P=()=>(0,i.jsx)("div",{className:"blog-page",children:(0,i.jsxs)("div",{className:"blog-loading",children:[(0,i.jsx)("div",{className:"blog-loading-spinner"}),(0,i.jsx)("p",{className:"blog-loading-text",children:"Loading article..."})]})}),B=()=>(0,i.jsx)("div",{className:"blog-page",children:(0,i.jsxs)("div",{className:"blog-not-found",children:[(0,i.jsx)("h1",{children:"Post not found"}),(0,i.jsx)("p",{children:"The blog post you're looking for doesn't exist or has been removed."}),(0,i.jsx)(c(),{href:"/blog",className:"blog-back-link",children:"← Back to Blog"})]})}),I=e=>{let{post:t}=e;return(0,i.jsxs)("nav",{className:"blog-breadcrumb","aria-label":"Breadcrumb",children:[(0,i.jsx)(c(),{href:"/",children:"Home"}),(0,i.jsx)("span",{className:"blog-breadcrumb-separator",children:"›"}),(0,i.jsx)(c(),{href:"/blog",children:"Blog"}),(0,i.jsx)("span",{className:"blog-breadcrumb-separator",children:"›"}),(0,i.jsx)("span",{className:"blog-breadcrumb-current",children:null==t?void 0:t.title})]})},E=e=>{var t,l;let{post:a,readingTime:r,publishedDate:n,modifiedDate:o}=e;return(0,i.jsxs)("header",{className:"blog-article-header",children:[(0,i.jsxs)("div",{className:"blog-article-pills",children:[(0,i.jsx)("span",{className:"blog-pill",children:"Virtual Triage"}),r&&(0,i.jsxs)("span",{className:"blog-pill",children:[r," min read"]}),null==a?void 0:null===(l=a.keywords_used)||void 0===l?void 0:null===(t=l.slice(0,3))||void 0===t?void 0:t.map((e,t)=>(0,i.jsx)("span",{className:"blog-pill",children:e},t))]}),(0,i.jsx)("h1",{className:"blog-article-title",children:null==a?void 0:a.title}),(null==a?void 0:a.hook)&&(0,i.jsx)("p",{className:"blog-article-hook",children:a.hook}),(0,i.jsxs)("div",{className:"blog-article-meta",children:[(0,i.jsxs)("span",{children:["By ",(0,i.jsx)("strong",{children:"Virtual Triage"})]}),n&&(0,i.jsxs)("span",{children:[" • Published ",n]}),o&&(0,i.jsxs)("span",{children:[" • Last reviewed ",o]})]})]})},V=e=>{let{src:t,alt:l,onError:a}=e;return(0,i.jsx)("div",{className:"blog-hero-image",children:(0,i.jsx)("img",{src:t,alt:l,onError:a,loading:"eager"})})},D=e=>{let{toc:t}=e;return t.length>0&&(0,i.jsxs)("div",{className:"blog-sidebar-section",children:[(0,i.jsx)("h3",{className:"blog-sidebar-title",children:"On this page"}),(0,i.jsx)("nav",{"aria-label":"Table of contents",children:(0,i.jsx)("ul",{className:"blog-toc",children:t.map((e,t)=>(0,i.jsx)("li",{className:3===e.level?"toc-level-3":"",children:(0,i.jsx)("a",{href:"#".concat(e.id),children:e.text})},t))})})]})},A=e=>{let{shareLinks:t}=e;return(0,i.jsxs)("div",{className:"blog-sidebar-section",children:[(0,i.jsx)("h3",{className:"blog-sidebar-title",children:"Share"}),(0,i.jsxs)("div",{className:"blog-share-buttons",children:[(0,i.jsx)("a",{href:t.twitter,target:"_blank",rel:"noreferrer noopener",className:"blog-share-btn",children:"X"}),(0,i.jsx)("a",{href:t.linkedin,target:"_blank",rel:"noreferrer noopener",className:"blog-share-btn",children:"LinkedIn"}),(0,i.jsx)("a",{href:t.facebook,target:"_blank",rel:"noreferrer noopener",className:"blog-share-btn",children:"Facebook"})]})]})},M=e=>{let{title:t,description:l,buttonText:a,href:r}=e;return(0,i.jsxs)("div",{className:"blog-cta-section",children:[(0,i.jsx)("h3",{children:t}),(0,i.jsx)("p",{children:l}),(0,i.jsx)("a",{href:r,className:"blog-cta-btn",children:a})]})},R=e=>{let{content:t}=e;return(0,i.jsx)("div",{className:"blog-markdown-content",children:(0,i.jsx)(u.UG,{remarkPlugins:[m.Z],rehypePlugins:[g.Z,[p.Z,{behavior:"wrap",properties:{className:["toc-anchor"]}}]],components:{a:e=>{let{href:t,children:l,...a}=e;return(0,i.jsx)("a",{href:t,target:"_blank",rel:"noopener noreferrer",...a,children:l})}},children:t})})},W=e=>{let{sources:t}=e;return(null==t?void 0:t.length)>0&&(0,i.jsxs)("section",{className:"blog-sources-section",children:[(0,i.jsx)("h2",{children:"Trusted sources"}),(0,i.jsx)("ul",{className:"blog-sources-list",children:t.map((e,t)=>(0,i.jsx)("li",{children:(0,i.jsx)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer nofollow",children:e.name})},t))})]})},z=e=>{let{links:t}=e;return(null==t?void 0:t.length)>0&&(0,i.jsxs)("section",{className:"blog-internal-links",children:[(0,i.jsx)("h2",{children:"Related Virtual Triage pages"}),(0,i.jsx)("ul",{className:"blog-internal-links-list",children:t.map((e,t)=>(0,i.jsx)("li",{children:(0,i.jsx)("a",{href:e.url,children:e.anchor})},t))})]})},G=e=>{let{publishedDate:t,modifiedDate:l}=e;return(0,i.jsx)("section",{className:"blog-author-section",children:(0,i.jsxs)("div",{className:"blog-author-info",children:[(0,i.jsx)("h4",{children:"Virtual Triage"}),(0,i.jsxs)("p",{children:["UK-based digital health platform for online doctor consultations and telehealth booking. Content reviewed for clarity and accuracy. Last reviewed: ",l||t||"—","."]})]})})},U=()=>(0,i.jsxs)("div",{className:"blog-disclaimer",children:[(0,i.jsx)("strong",{children:"Disclaimer:"})," This article provides general information and is not a substitute for professional medical advice. Always consult a qualified healthcare professional."]}),F=e=>{let{posts:t}=e;return(null==t?void 0:t.length)>0&&(0,i.jsxs)("section",{className:"blog-related-posts",children:[(0,i.jsx)("h2",{className:"blog-related-title",children:"Latest from the blog"}),(0,i.jsx)("div",{className:"blog-related-grid",children:t.map(e=>{let t=(e.slug||"").split("/").pop();return(0,i.jsxs)("article",{className:"blog-related-card",children:[(0,i.jsx)("h3",{children:(0,i.jsx)(c(),{href:"/blog/".concat(t),children:e.title})}),e.meta_description&&(0,i.jsx)("p",{children:e.meta_description}),(0,i.jsx)("div",{className:"blog-related-meta",children:(0,i.jsxs)("span",{children:["\uD83D\uDCC5 ",f(e.publish_date_iso)]})})]},e.slug)})}),(0,i.jsx)("div",{className:"blog-view-all",children:(0,i.jsx)(c(),{href:"/blog",className:"blog-view-all-link",children:"View all posts →"})})]})};function J(){var e,t,l,r,s;let{slug:c}=(0,o.useRouter)().query,[u,m]=(0,a.useState)(),[g,p]=(0,a.useState)([]),[J,K]=(0,a.useState)(b),Z=(0,a.useMemo)(()=>N(null==u?void 0:u.body_markdown),[null==u?void 0:u.body_markdown]),q=(0,a.useMemo)(()=>w(Z),[Z]);if((0,a.useEffect)(()=>{let e=!0,t=(c||"").split("/").pop(),l=async()=>{try{let l=await (0,x.ft)("".concat(v,"/api/blog"),{credentials:"omit"},x.ej.BLOG_LIST);if(!e||!Array.isArray(l))return;let i="/blog/".concat(t),a=l.filter(e=>e.slug!==i).slice(0,3);p(a)}catch(t){if(console.error("Failed to fetch related posts:",t),!e)return;p([])}};return(async()=>{try{let l=await (0,x.ft)("".concat(v,"/api/blog/").concat(t),{credentials:"omit"},x.ej.BLOG_POST);if(!e)return;m(l),K(k(l))}catch(t){if(console.error("Failed to fetch article:",t),!e)return;m(null),K(b)}})(),l(),()=>{e=!1}},[c]),void 0===u)return(0,i.jsx)(P,{});if(null===u)return(0,i.jsx)(B,{});let H=y(null==u?void 0:u.canonical_url)||"".concat(j).concat((null==u?void 0:u.slug)||""),X=(null==u?void 0:u.title)||"Blog Article",Q="".concat(X," | Virtual Triage"),$=(null==u?void 0:u.meta_description)||(null==u?void 0:u.hook)||((null==u?void 0:u.content)?u.content.substring(0,155):void 0),Y=(null==u?void 0:null===(e=u.og)||void 0===e?void 0:e.og_image_alt)||(null==u?void 0:null===(t=u.image_alt_text)||void 0===t?void 0:t[0])||(null==u?void 0:u.title)||"Virtual Triage article",ee=f(null==u?void 0:u.publish_date_iso),et=f(null==u?void 0:u.last_reviewed_iso),el=(null==u?void 0:u.reading_time_minutes)||_(Z),ei=(null==u?void 0:u.schema_article_jsonld)||T(u),ea=L(null==u?void 0:u.faq),er=C(u),en=O(u),eo=S(H,(null==u?void 0:u.title)||"");return(0,i.jsxs)("div",{className:"blog-page",children:[(0,i.jsx)(d.Z,{}),(0,i.jsxs)(n(),{children:[(0,i.jsx)("title",{children:Q}),$&&(0,i.jsx)("meta",{name:"description",content:$}),(0,i.jsx)("link",{rel:"canonical",href:H}),J&&(0,i.jsx)("link",{rel:"preload",as:"image",href:J}),(0,i.jsx)("meta",{name:"robots",content:"index,follow,max-snippet:-1,max-image-preview:large,max-video-preview:-1"}),(0,i.jsx)("meta",{property:"og:type",content:"article"}),(0,i.jsx)("meta",{property:"og:site_name",content:"Virtual Triage"}),(0,i.jsx)("meta",{property:"og:title",content:(null==u?void 0:null===(l=u.og)||void 0===l?void 0:l.og_title)||Q}),$&&(0,i.jsx)("meta",{property:"og:description",content:$}),(0,i.jsx)("meta",{property:"og:url",content:H}),(0,i.jsx)("meta",{property:"og:image",content:J}),(0,i.jsx)("meta",{property:"og:image:alt",content:Y}),(null==u?void 0:u.publish_date_iso)&&(0,i.jsx)("meta",{property:"article:published_time",content:u.publish_date_iso}),(null==u?void 0:u.last_reviewed_iso)&&(0,i.jsx)("meta",{property:"article:modified_time",content:u.last_reviewed_iso}),(0,i.jsx)("meta",{name:"twitter:card",content:(null==u?void 0:null===(r=u.og)||void 0===r?void 0:r.twitter_card)||"summary_large_image"}),(0,i.jsx)("meta",{name:"twitter:title",content:(null==u?void 0:null===(s=u.og)||void 0===s?void 0:s.og_title)||Q}),$&&(0,i.jsx)("meta",{name:"twitter:description",content:$}),(0,i.jsx)("meta",{name:"twitter:image",content:J}),(0,i.jsx)("script",{type:"application/ld+json",children:JSON.stringify(ei)}),ea&&(0,i.jsx)("script",{type:"application/ld+json",children:JSON.stringify(ea)}),(0,i.jsx)("script",{type:"application/ld+json",children:JSON.stringify(en)}),(0,i.jsx)("script",{type:"application/ld+json",children:JSON.stringify(er)})]}),(0,i.jsxs)("main",{className:"blog-article-main",children:[(0,i.jsx)(I,{post:u}),(0,i.jsx)(E,{post:u,readingTime:el,publishedDate:ee,modifiedDate:et}),(0,i.jsxs)("div",{className:"blog-article-layout",children:[(0,i.jsxs)("aside",{className:"blog-article-sidebar",children:[(0,i.jsx)(D,{toc:q}),(0,i.jsx)(A,{shareLinks:eo})]}),(0,i.jsxs)("article",{className:"blog-article-content",children:[(0,i.jsx)(V,{src:J,alt:Y,onError:()=>K(b)}),(0,i.jsx)(R,{content:Z}),(0,i.jsx)(M,{title:"Need fast, private care?",description:"Get professional medical advice from qualified doctors online.",buttonText:"Book an online consultation",href:"https://virtualtriage.ai/find-practitioners"}),(0,i.jsx)(W,{sources:null==u?void 0:u.external_sources}),(0,i.jsx)(z,{links:null==u?void 0:u.internal_links}),(0,i.jsx)(M,{title:"Ready when you are.",description:"Book your online appointment and get the care you need.",buttonText:"Book your online appointment now",href:"https://virtualtriage.ai/find-practitioners"}),(0,i.jsx)(G,{publishedDate:ee,modifiedDate:et}),(0,i.jsx)(U,{})]})]}),(0,i.jsx)(F,{posts:g})]}),(0,i.jsx)(h.Z,{})]})}},7438:function(e,t,l){"use strict";l.d(t,{ej:function(){return r},ft:function(){return n}});class i{generateKey(e,t){return"".concat(this.cachePrefix).concat(e,"_").concat(t)}isValid(e){if(!e)return!1;let t=Date.now();return e.timestamp+e.ttl>t}get(e,t){let l=this.generateKey(e,t);if(this.memoryCache.has(l)){let e=this.memoryCache.get(l);if(this.isValid(e))return e.data;this.memoryCache.delete(l)}try{let e=localStorage.getItem(l);if(e){let t=JSON.parse(e);if(this.isValid(t))return this.setMemoryCache(l,t),t.data;localStorage.removeItem(l)}}catch(e){}return null}set(e,t,l){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.defaultTTL,a=this.generateKey(e,t),r={data:l,timestamp:Date.now(),ttl:i};this.setMemoryCache(a,r);try{localStorage.setItem(a,JSON.stringify(r))}catch(e){}}setMemoryCache(e,t){if(this.memoryCache.size>=this.maxMemorySize){let e=this.memoryCache.keys().next().value;this.memoryCache.delete(e)}this.memoryCache.set(e,t)}invalidate(e,t){let l=this.generateKey(e,t);this.memoryCache.delete(l);try{localStorage.removeItem(l)}catch(e){}}invalidateType(e){let t="".concat(this.cachePrefix).concat(e,"_");for(let e of this.memoryCache.keys())e.startsWith(t)&&this.memoryCache.delete(e);try{let e=[];for(let l=0;l<localStorage.length;l++){let i=localStorage.key(l);i&&i.startsWith(t)&&e.push(i)}e.forEach(e=>localStorage.removeItem(e))}catch(e){}}clear(){this.memoryCache.clear();try{let e=[];for(let t=0;t<localStorage.length;t++){let l=localStorage.key(t);l&&l.startsWith(this.cachePrefix)&&e.push(l)}e.forEach(e=>localStorage.removeItem(e))}catch(e){}}getStats(){let e=this.memoryCache.size,t=0;try{for(let e=0;e<localStorage.length;e++){let l=localStorage.key(e);l&&l.startsWith(this.cachePrefix)&&t++}}catch(e){}return{memory:e,localStorage:t,total:e+t}}constructor(){this.memoryCache=new Map,this.cachePrefix="vt_blog_",this.defaultTTL=3e5,this.maxMemorySize=50}}let a=new i,r={BLOG_POST:{ttl:6e5,type:"post"},BLOG_LIST:{ttl:3e5,type:"list"},RELATED_POSTS:{ttl:9e5,type:"related"}},n=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=arguments.length>2?arguments[2]:void 0,{type:i,ttl:r}=l,n=e.split("/").pop()||"index",o=a.get(i,n);if(o)return o;try{let l=await fetch(e,{...t,headers:{"Content-Type":"application/json",...t.headers}});if(!l.ok)throw Error("HTTP error! status: ".concat(l.status));let o=await l.json();return a.set(i,n,o,r),o}catch(e){throw console.error("Fetch with cache failed:",e),e}}}},function(e){e.O(0,[365,801,675,506,900,888,774,179],function(){return e(e.s=9937)}),_N_E=e.O()}]);