PageSourceSearch

https://truficient.com/assets/ServiceAreasHub-CYk8zESQ.js

js truficient.com collected 2026-10-06 22:36:01 UTC 7,435 bytes, 8 lines download raw bytes

1import{j as s}from"./vendor-query-DZatIitU.js";import{r as c,L as m}from"./vendor-react-BfJOJ4QY.js";import{u as N,H as x,l as _,F as p,M as f,c as w,s as j}from"./index-Tgf2Ue1J.js";import{M as A}from"./index-DiiDyxup.js";import"./vendor-radix-BFiE5IAy.js";import"./vendor-supabase-CXidNrjy.js";import"./vendor-recharts-CzKpJGSY.js";import"./vendor-motion-CuMybLxs.js";const k=["Oak Cliff","East Dallas","North Dallas","Downtown Dallas","South Dallas","Uptown/Oak Lawn","West Dallas","Design District","Lakewood","Lake Highlands","Brand - Mitsubishi","Dallas UHI Research","Outer Ring"],S="tel:2142384349",C=e=>{if(!e||/^(tel:|mailto:)/i.test(e))return e;const a=e.indexOf(":"),o=e.indexOf("/"),l=e.indexOf("?"),d=e.indexOf("#");return a===-1||o!==-1&&a>o||l!==-1&&a>l||d!==-1&&a>d||/^(https?|ircs?|mailto|xmpp|tel)$/i.test(e.slice(0,a))?e:""},E={a:({href:e,children:a,...o})=>e==="#contact"?s.jsx(m,{to:"/hvac-estimate",className:"text-primary hover:underline font-medium",...o,children:a}):e!=null&&e.startsWith("tel:")?s.jsx("a",{href:S,className:"text-primary hover:underline font-medium",...o,children:a}):e!=null&&e.startsWith("#")?s.jsx("a",{href:e,className:"text-primary hover:underline",...o,children:a}):e!=null&&e.startsWith("/")?s.jsx(m,{to:e,className:"text-primary hover:underline",...o,children:a}):s.jsx("a",{href:e,className:"text-primary hover:underline",target:"_blank",rel:"noopener noreferrer",...o,children:a}),h1:({children:e,...a})=>s.jsx("h1",{id:h(e),...a,children:e}),h2:({children:e,...a})=>s.jsx("h2",{id:h(e),...a,children:e}),h3:({children:e,...a})=>s.jsx("h3",{id:h(e),...a,children:e})},h=e=>(Array.isArray(e)?e:[e]).map(o=>{var l;return typeof o=="string"?o:((l=o==null?void 0:o.props)==null?void 0:l.children)??""}).join(" ").toString().toLowerCase().trim().replace(/&/g,"and").replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-"),D=e=>e.replace(/<a\s+name=["'][^"']*["']\s*>\s*<\/a>/gi,""),V=()=>{N("/service-areas");const[e,a]=c.useState(null),[o,l]=c.useState([]),[d,b]=c.useState(!0);c.useEffect(()=>{(async()=>{const i=["/service-areas/","/service-areas"];for(const n of i){const{data:g}=await j.from("seo_location_pages").select("content, meta_title, meta_description, schema_enabled, schema_json, url_slug").eq("url_slug",n).eq("published",!0).maybeSingle();if(g){a(g);break}}const{data:t}=await j.from("seo_location_pages").select("id, neighborhood, city, url_slug, primary_service, cluster, published").eq("published",!0).eq("add_to_service_areas_hub",!0).order("neighborhood",{ascending:!0});l(t||[]),b(!1)})()},[]),c.useEffect(()=>{var i;if(!e)return;if(e.meta_title&&(document.title=e.meta_title),e.meta_description){let t=document.querySelector('meta[name="description"]');t||(t=document.createElement("meta"),t.setAttribute("name","description"),document.head.appendChild(t)),t.setAttribute("content",e.meta_description)}let r=document.querySelector('link[rel="canonical"]');if(r||(r=document.createElement("link"),r.setAttribute("rel","canonical"),document.head.appendChild(r)),r.setAttribute("href","https://truficient.com/service-areas/"),(i=document.getElementById("page-seo-jsonld"))==null||i.remove(),e.schema_enabled&&e.schema_json){let t=document.getElementById("service-areas-hub-jsonld");t&&t.remove();const n=document.createElement("script");n.id="service-areas-hub-jsonld",n.type="application/ld+json",n.textContent=JSON.stringify(e.schema_json),document.head.appendChild(n)}return()=>{var t;(t=document.getElementById("service-areas-hub-jsonld"))==null||t.remove()}},[e]);const u=k.reduce((r,i)=>{const t=o.filter(n=>n.cluster===i);return t.length>0&&(r[i]=t),r},{}),v=r=>r.toLowerCase().replace(/\s+/g,"-"),y=`prose prose-lg max-w-none
2    prose-headings:text-foreground prose-p:text-muted-foreground
3    prose-a:text-primary prose-strong:text-foreground
4    prose-h1:text-3xl prose-h1:md:text-4xl prose-h1:font-bold prose-h1:mb-6
5    prose-h2:text-2xl prose-h2:mt-10 prose-h2:mb-4
6    prose-h3:text-xl prose-h3:mt-8 prose-h3:mb-3
7    prose-li:text-muted-foreground prose-ul:my-4
8    prose-hr:border-border prose-hr:my-8`;return d?s.jsxs("div",{className:"min-h-screen flex flex-col",children:[s.jsx(x,{}),s.jsx("main",{className:"flex-grow flex items-center justify-center",children:s.jsx(_,{className:"h-8 w-8 animate-spin text-primary"})}),s.jsx(p,{})]}):e!=null&&e.content?s.jsxs("div",{className:"min-h-screen flex flex-col",children:[s.jsx(x,{}),s.jsx("main",{className:"flex-grow",children:s.jsx("article",{className:"container mx-auto px-4 py-10",children:s.jsx("div",{className:"max-w-4xl mx-auto",children:s.jsx("div",{className:y,children:s.jsx(A,{components:E,urlTransform:C,children:D(e.content)})})})})}),s.jsx(p,{})]}):s.jsxs("div",{className:"min-h-screen flex flex-col",children:[s.jsx(x,{}),s.jsxs("main",{className:"flex-grow",children:[s.jsx("section",{className:"bg-primary text-primary-foreground py-16",children:s.jsxs("div",{className:"container mx-auto px-4 text-center",children:[s.jsx("h1",{className:"text-4xl font-bold mb-4",children:"Service Areas"}),s.jsx("p",{className:"text-lg opacity-90 max-w-2xl mx-auto",children:"Truficient Energy Solutions proudly serves neighborhoods across the Dallas-Fort Worth metroplex with expert HVAC installation, repair, and energy solutions."})]})}),s.jsx("section",{className:"py-12",children:s.jsxs("div",{className:"container mx-auto px-4",children:[Object.keys(u).length===0?s.jsx("div",{className:"text-center py-12 text-muted-foreground",children:s.jsx("p",{children:"Location pages coming soon. Check back for neighborhood-specific HVAC services."})}):s.jsx("div",{className:"space-y-10",children:Object.entries(u).map(([r,i])=>s.jsxs("div",{className:"bg-card rounded-lg border p-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsxs("h2",{className:"text-2xl font-bold flex items-center gap-2",children:[s.jsx(f,{className:"h-6 w-6 text-primary"}),r]}),s.jsxs(m,{to:`/service-areas/${v(r)}`,className:"text-sm text-primary hover:underline flex items-center gap-1",children:["View all ",s.jsx(w,{className:"h-3 w-3"})]})]}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-3",children:i.map(t=>s.jsxs(m,{to:t.url_slug,className:"block p-3 rounded-md border hover:border-primary hover:bg-accent transition-colors",children:[s.jsx("div",{className:"font-medium text-sm",children:t.neighborhood}),s.jsx("div",{className:"text-xs text-muted-foreground",children:t.primary_service||"HVAC Services"})]},t.id))})]},r))}),s.jsxs("div",{className:"mt-12 bg-card rounded-lg border p-6",children:[s.jsx("h2",{className:"text-2xl font-bold mb-4",children:"Major Service Regions"}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-3",children:[{name:"Dallas Area",path:"/service-areas/dallas-area"},{name:"North Dallas Area",path:"/service-areas/north-dallas-area"},{name:"Frisco-McKinney Area",path:"/service-areas/frisco-mckinney-area"},{name:"Mid-Cities Area",path:"/service-areas/mid-cities-area"},{name:"South Dallas Area",path:"/service-areas/south-dallas-area"}].map(r=>s.jsx(m,{to:r.path,className:"block p-4 rounded-md border hover:border-primary hover:bg-accent transition-colors",children:s.jsxs("div",{className:"font-medium flex items-center gap-2",children:[s.jsx(f,{className:"h-4 w-4 text-primary"}),r.name]})},r.path))})]})]})})]}),s.jsx(p,{})]})};export{V as default};

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.