1import{r as c,j as e}from"./index-SMcyqc50.js";import{l as C,N as T,k as L,L as m}from"./CookieConsent-BzLppgCd.js";import{a as P}from"./blogData-DsbvjCft.js";import{s as D}from"./client-C4JfU0WK.js";import{B as d}from"./button-CsqUyFxA.js";import{B as E}from"./badge-Bs4rbOtq.js";import{g as H,s as M}from"./utmTracking-GZpSmSbs.js";import{L as U}from"./loader-circle-BdhuA_c7.js";import{A as b}from"./arrow-left-DCHTo_4K.js";import{C as z}from"./calendar-DBRw4Dpe.js";import{C as A}from"./clock-BCp919e-.js";const X=()=>{const{slug:i}=C(),[t,g]=c.useState(void 0),[u,x]=c.useState(!0);if(c.useEffect(()=>{window.scrollTo(0,0),(async()=>{const n=i?P(i):void 0;if(n){g(n),x(!1);return}if(i){const{data:s}=await D.from("blog_posts").select("*").eq("slug",i).eq("status","published").single();s&&g({id:s.id,title:s.title,slug:s.slug,excerpt:s.excerpt,content:s.content,image:s.image_url||"/placeholder.svg",publishedAt:s.published_at.split("T")[0],author:{name:s.author||"SalesDraft Team",avatar:"https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=150&h=150&fit=crop&crop=face"},tags:s.tags||[],readTime:s.read_time||7})}
1x(!1)})()},[i]),c.useEffect(()=>{if(!t)return;const r=H();r.utm_source||M({...r,utm_source:"marketing",utm_medium:"blog",utm_campaign:t.title})},[t]),u)return e.jsx("div",{className:"min-h-screen bg-gray-900 flex items-center justify-center",children:e.jsx(U,{className:"h-8 w-8 animate-spin text-green-400"})});if(!t)return e.jsx(T,{to:"/blog",replace:!0});const[f,j,v]=t.publishedAt.split("-").map(Number),y=new Date(f,j-1,v).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"}),w=r=>r.replace(/\|(.+)\|\n\|[-:\s|]+\|\n((?:\|.+\|\n?)+)/gm,(s,N,$)=>{const _=N.split("|").map(a=>a.trim()).filter(a=>a),k=$.trim().split(` 2`).map(a=>a.split("|").map(o=>o.trim()).filter(o=>o));let l='<div class="my-8 overflow-x-auto rounded-lg border border-gray-700"><table class="w-full caption-bottom text-sm"><thead class="[&_tr]:border-b border-gray-700"><tr class="border-b border-gray-700 transition-colors">';return _.forEach(a=>{const o=a.replace(/\*\*/g,"");l+=`<th class="h-12 px-4 text-left align-middle font-semibold text-green-400 [&:has([role=checkbox])]:pr-0 bg-gray-800/50">${o}</th>`}),l+='</tr></thead><tbody class="[&_tr:last-child]:border-0">',k.forEach(a=>{l+='<tr class="border-b border-gray-700 transition-colors hover:bg-gray-800/30">',a.forEach((o,S)=>{const B=o.replace(/\*\*/g,"");l+=`<td class="${S===0?"p-4 align-middle font-medium text-white [&:has([role=checkbox])]:pr-0":"p-4 align-middle text-gray-300 [&:has([role=checkbox])]:pr-0"}">${B}</td>`}),l+="</tr>"}),l+="</tbody></table></div>",l}).replace(/^# (.*$)/gim,'<h1 class="text-4xl font-bold text-white mb-8 mt-12 first:mt-0">$1</h1>').replace(/^## (.*$)/gim,'<h2 class="text-3xl font-bold text-white mb-6 mt-10">$1</h2>').replace(/^### (.*$)/gim,'<h3 class="text-2xl font-bold text-white mb-4 mt-8">$1</h3>').replace(/!\[([^\]]*)\]\(([^)]+)\)/g,'<div class="my-8 rounded-lg overflow-hidden"><img src="$2" alt="$1" class="w-full h-auto object-cover rounded-lg shadow-lg" loading="lazy" /></div>').replace(/(?<!\!)(\[([^\]]+)\]\(([^)]+)\))/g,'<a href="$3" target="_blank" rel="noopener noreferrer" class="text-green-400 hover:text-green-300 underline">$2</a>').replace(/\*\*(.*?)\*\*/g,'<strong class="font-bold text-white">$1</strong>').replace(/^\* (.*$)/gim,'<li class="text-gray-300 mb-2">$1</li>').replace(/^- (.*$)/gim,'<li class="text-gray-300 mb-2">$1</li>').replace(/\n\n/g,'</p><p class="text-gray-300 leading-relaxed mb-6">').replace(/^\n/,'<p class="text-gray-300 leading-relaxed mb-6">')+"</p>",h=`?utm_source=marketing&utm_medium=blog&utm_campaign=${encodeURIComponent(t.title)}`,p=t.slug==="commission-only-sales-hiring"?"Learn how to hire commission-only salespeople effectively without wasting time or money. Discover proven strategies to build a winning sales team.":t.excerpt;return e.jsxs(e.Fragment,{children:[e.jsxs(L,{children:[e.jsxs("title",{children:[t.title," | SalesDraft Blog"]}),e.jsx("meta",{name:"description",content:p}),e.jsx("meta",{property:"og:title",content:t.title}),e.jsx("meta",{property:"og:description",content:p}),e.jsx("meta",{property:"og:image",content:t.image}),e.jsx("meta",{property:"og:type",content:"article"}),e.jsx("link",{rel:"canonical",href:`https://salesdraft.io/blog/${t.slug}`})]}),e.jsxs("div",{className:"min-h-screen bg-gray-900 text-white",children:[e.jsx("div",{className:"pt-24 pb-8 bg-gray-900",children:e.jsx("div",{className:"container mx-auto px-6",children:e.jsx(m,{to:"/blog",children:e.jsxs(d,{variant:"ghost",className:"mb-6 text-green-400 hover:text-green-300 hover:bg-green-400/10",children:[e.jsx(b,{className:"h-4 w-4 mr-2"}),"Back to Blog"]})})})}),e.jsx("section",{className:"container mx-auto px-6 pb-16",children:e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsx("div",{className:"flex flex-wrap gap-2 mb-6",children:t.tags.map((r,n)=>e.jsx(E,{variant:"secondary",className:"bg-green-400/10 text-green-400 border-green-400/20",children:r},n))}),e.jsx("h1",{className:"text-4xl md:text-5xl font-bold mb-6 leading-tight text-white",children:t.title}),e.jsxs("div",{className:"flex items-center gap-4 text-gray-400 mb-8",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(z,{className:"h-4 w-4"}),e.jsx("span",{children:y})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(A,{className:"h-4 w-4"}),e.jsxs("span",{children:[t.readTime," min read"]})]})]}),e.jsx("div",{className:"rounded-xl overflow-hidden mb-12",children:e.jsx("img",{src:t.image,alt:t.title,className:"w-full h-auto object-cover aspect-video"})})]})}),e.jsx("article",{className:"container mx-auto px-6 pb-16",children:e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsx("div",{className:"prose prose-lg prose-invert max-w-none",dangerouslySetInnerHTML:{__html:w(t.content)}}),e.jsx("div",{className:"mt-16 pt-12 border-t border-gray-700",children:e.jsxs("div",{className:"bg-gradient-to-r from-green-400/10 to-blue-400/10 rounded-lg p-8 text-center",children:[e.jsx("h3",{className:"text-2xl font-bold text-white mb-4",children:"Ready to Transform Your Sales Hiring?"}),e.jsx("p",{className:"text-gray-300 mb-8 max-w-2xl mx-auto",children:"Take the next step and discover how SalesDraft can help you build a high-performing sales team faster than ever."}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center items-center",children:[e.jsx(m,{to:"/blog",className:"sm:mr-auto",children:e.jsxs(d,{variant:"ghost",size:"lg",className:"text-gray-400 hover:text-gray-300 hover:bg-gray-800/50 font-medium px-6",children:[e.jsx(b,{className:"h-4 w-4 mr-2"}),"Back to Blog"]})}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[e.jsx(m,{to:`/get-started${h}`,children:e.jsx(d,{size:"lg",className:"bg-green-400 text-black hover:bg-green-300 font-semibold px-8",children:"Get Started"})}),e.jsx(m,{to:`/solutions${h}`,children:e.jsx(d,{variant:"ghost",size:"lg",className:"text-gray-400 hover:text-gray-300 hover:bg-gray-800/50 font-medium px-6 border border-gray-600 hover:border-gray-500",children:"View Our Solutions"})})]})]})]})})]})})]})]})};export{X 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.