import{j as e}from"./ui-vendor-Dyu0xMC9.js";import{L as s,r}from"./react-vendor-BiKEbLqf.js";import{B as t,H as a}from"./button-iayXQ_q_.js";import{M as l,s as i,H as n,F as c}from"./Footer-BVmbiSy-.js";import{B as o}from"./badge-OglEk2jc.js";import{C as d}from"./clock-DDpKYD4C.js";import{a as m}from"./chevron-right-LutMVzxT.js";import{f as u,r as x}from"./resources-BXr7odul.js";import{I as p,L as h}from"./label-Cl_UshjE.js";import{S as g}from"./search-C2uDgHsd.js";import{X as j,u as f}from"./index-CxSR60Bh.js";import{C as y}from"./checkbox-CKBMGxmB.js";import{B as b}from"./BreadcrumbNav-ND7dWyvO.js";import"./chart-vendor-V3pFlbOw.js";import"./breadcrumb-DwBpwiMd.js";const N=({resource:r,onClick:t})=>e.jsx(s,{to:`/resources/${r.slug}`,onClick:()=>t(r.slug),className:"group block h-full",children:e.jsxs("article",{className:"flex flex-col h-full bg-card rounded-lg border shadow-sm hover:shadow-md transition-shadow",children:[e.jsx("div",{className:"aspect-[16/9] overflow-hidden rounded-t-lg",children:e.jsx("img",{src:r.heroImg,alt:r.heroAlt,loading:"lazy",decoding:"async",width:"640",height:"360",className:"w-full h-full object-cover transition-transform group-hover:scale-105",style:{aspectRatio:"16/9"}})}),e.jsxs("div",{className:"flex flex-col flex-1 p-lg space-y-lg",children:[e.jsxs("div",{className:"space-y-xs",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(o,{variant:"secondary",className:"text-xs",children:"guide"===r.type?"Guide":"Blog"}),r.tags.slice(0,2).map(s=>e.jsx(o,{variant:"outline",className:"text-xs",children:s},s))]}),e.jsx("h3",{className:"text-xl font-semibold leading-tight group-hover:text-primary transition-colors line-clamp-2",children:r.title}),e.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:r.dek})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-4 text-xs text-muted-foreground mt-auto pt-4 border-t",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(d,{className:"w-3 h-3"}),r.readMinutes," min"]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(m,{className:"w-3 h-3"}),u(new Date(r.publishedAt),"MMM d, yyyy")]})]}),(r.products||r.services)&&e.jsxs("div",{className:"flex flex-wrap gap-2 pt-2",children:[r.products?.map(s=>e.jsx(o,{variant:"outline",className:"text-xs",children:s},s)),r.services?.slice(0,1).map(s=>e.jsx(o,{variant:"outline",className:"text-xs",children:s},s))]})]})]})}),v=["Guides","Blog"],w=["CV","Agentic","GenAI","Analytics","Platform","Security"],C=["Manufacturing","Warehousing","Retail","Insurance/Gov","Transportation/Rail","Energy/Utilities","Public/Education","Enterprise"],k=({searchQuery:s,onSearchChange:r,selectedType:a,onTypeChange:l,selectedCapability:i,onCapabilityChange:n,selectedIndustry:c,onIndustryChange:d,onFilterChange:m})=>{const u=a||i||c||s;return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"relative",children:[e.jsx(g,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(p,{type:"search",placeholder:"Search resources...",value:s,onChange:e=>r(e.target.value),className:"pl-9"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h3",{className:"text-sm font-medium",children:"Filters"}),u&&e.jsxs(t,{variant:"ghost",size:"sm",onClick:()=>{r(""),l(null),n(null),d(null)},className:"h-auto p-0 text-xs hover:bg-transparent",children:[e.jsx(j,{className:"w-3 h-3 mr-1"}),"Clear all"]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-2",children:"Type"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:v.map(s=>e.jsx(o,{variant:a===s.toLowerCase()?"default":"outline",className:"cursor-pointer",onClick:()=>{const e=a===s.toLowerCase()?null:s.toLowerCase();l(e),m("type",e)},children:s},s))})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-2",children:"Capability"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:w.map(s=>e.jsx(o,{variant:i===s?"default":"outline",className:"cursor-pointer",onClick:()=>{const e=i===s?null:s;n(e),m("capability",e)},children:s},s))})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-2",children:"Industry"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:C.map(s=>e.jsx(o,{variant:c===s?"default":"outline",className:"cursor-pointer",onClick:()=>{const e=c===s?null:s;d(e),m("industry",e)},children:s},s))})]})]})]})]})},S=({source:s="resources"})=>{const[a,n]=r.useState(""),[c,o]=r.useState(!1),[d,m]=r.useState(!1);return e.jsxs("div",{className:"bg-muted/50 rounded-lg p-6 border",children:[e.jsxs("div",{className:"flex items-start gap-3 mb-4",children:[e.jsx(l,{className:"w-5 h-5 text-primary mt-1"}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold mb-1",children:"Stay updated"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Get new guides and case studies in your inbox"})]})]}),e.jsxs("form",{onSubmit:async e=>{if(e.preventDefault(),c){m(!0);try{const{data:e,error:r}=await i.functions.invoke("newsletter-subscribe",{body:{email:a,source:s}});if(r)throw r;f.success(e.message||"Thanks for subscribing!"),n(""),o(!1)}catch(r){f.error("Failed to subscribe. Please try again.")}finally{m(!1)}}else f.error("Please agree to receive updates")},className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx(h,{htmlFor:"subscribe-email",className:"sr-only",children:"Email address"}),e.jsx(p,{id:"subscribe-email",type:"email",placeholder:"you@company.com",value:a,onChange:e=>n(e.target.value),required:!0,disabled:d})]}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(y,{id:"subscribe-consent",checked:c,onCheckedChange:e=>o(e),disabled:d}),e.jsx(h,{htmlFor:"subscribe-consent",className:"text-xs text-muted-foreground leading-relaxed cursor-pointer",children:"I agree to receive occasional updates about new resources and products"})]}),e.jsx(t,{type:"submit",className:"w-full",disabled:d||!a||!c,children:d?"Subscribing...":"Subscribe"})]})]})};function A(){const[s,t]=r.useState(""),[l,i]=r.useState(null),[d,m]=r.useState(null),[u,p]=r.useState(null),h=e=>{},g=r.useMemo(()=>x.filter(e=>{if(s){const r=s.toLowerCase();if(!(e.title.toLowerCase().includes(r)||e.dek.toLowerCase().includes(r)||e.tags.some(e=>e.toLowerCase().includes(r))))return!1}if(l&&e.type!==l)return!1;if(d&&!e.tags.includes(d))return!1;if(u){const s=u.replace("/",""),r=e.industries?.some(e=>e.toLowerCase().includes(s.toLowerCase()));if(!r)return!1}return!0}),[s,l,d,u]),j=x.find(e=>"guide"===e.type);return e.jsxs(e.Fragment,{children:[e.jsxs(a,{children:[e.jsx("title",{children:"AI Engineering Resources and Field Guides | Allerin"}),e.jsx("meta",{name:"description",content:"Production AI deployment guides, blueprints, and policy documentation. Covers agentic AI guardrails, edge computer vision, ALPR redaction, and MLOps."}),e.jsx("link",{rel:"canonical",href:"https://www.allerin.com/resources"}),e.jsx("meta",{property:"og:title",content:"Resources: Guides & Case Studies | Allerin"}),e.jsx("meta",{property:"og:description",content:"Practical guides from production CV, Agentic AI, and Platform deployments."}),e.jsx("meta",{property:"og:url",content:"https://www.allerin.com/resources"}),e.jsx("meta",{property:"og:type",content:"website"}),e.jsx("meta",{property:"og:image",content:"https://www.allerin.com/og/resources.webp"}),e.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),e.jsx("meta",{name:"twitter:title",content:"Resources: Guides & Case Studies | Allerin"}),e.jsx("meta",{name:"twitter:image",content:"https://www.allerin.com/og/resources.webp"}),e.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"CollectionPage",name:"Resources",description:"Guides, case write-ups, and practical notes from production deployments.",url:"https://www.allerin.com/resources",publisher:{"@type":"Organization",name:"Allerin",url:"https://www.allerin.com"}})})]}),e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(n,{}),e.jsxs("main",{className:"min-h-screen",children:[e.jsx("section",{className:"py-4 border-b border-outline/20",children:e.jsx("div",{className:"container max-w-6xl",children:e.jsx(b,{items:[{name:"Home",url:"/"},{name:"Resources"}]})})}),e.jsx("section",{className:"bg-gradient-to-br from-background via-background to-muted/30 py-16 md:py-24",children:e.jsx("div",{className:"container max-w-6xl",children:e.jsxs("div",{className:"max-w-3xl",children:[e.jsx("h1",{className:"text-4xl md:text-5xl font-bold tracking-tight text-foreground mb-4",children:"Production AI Resources, Blueprints, and Field Guides"}),e.jsx("p",{className:"text-lg md:text-xl text-muted-foreground max-w-3xl mb-8",children:"Operational playbooks from 84 engineers who deploy AI systems for a living. Guardrails, compliance, edge deployment, and everything between proof of concept and production."})]})})}),e.jsx("section",{className:"py-12",children:e.jsx("div",{className:"container max-w-6xl",children:e.jsxs("div",{className:"grid lg:grid-cols-[250px_1fr] gap-8",children:[e.jsxs("aside",{className:"lg:sticky lg:top-24 lg:self-start",children:[e.jsx(k,{searchQuery:s,onSearchChange:e=>{t(e)},selectedType:l,onTypeChange:i,selectedCapability:d,onCapabilityChange:m,selectedIndustry:u,onIndustryChange:p,onFilterChange:(e,s)=>{}}),e.jsx("div",{className:"hidden lg:block mt-8",children:e.jsx(S,{})}),j&&e.jsxs("div",{className:"hidden lg:block mt-8 p-4 bg-primary/5 rounded-lg border border-primary/20",children:[e.jsx(o,{variant:"default",className:"mb-2",children:"Featured"}),e.jsx("h3",{className:"font-semibold mb-2 line-clamp-2 text-sm",children:j.title}),e.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2 mb-3",children:j.dek}),e.jsx("a",{href:`/resources/${j.slug}`,className:"text-xs font-medium text-primary hover:underline",children:"Read guide →"})]})]}),e.jsxs("div",{children:[0===g.length?e.jsx("div",{className:"text-center py-12",children:e.jsx("p",{className:"text-muted-foreground",children:"No resources match your filters. Try adjusting your search."})}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex items-center justify-between mb-6",children:e.jsxs("p",{className:"text-sm text-muted-foreground",children:[g.length," ",1===g.length?"resource":"resources"]})}),e.jsx("div",{className:"grid md:grid-cols-2 gap-6",children:g.map(s=>e.jsx(N,{resource:s,onClick:h},s.slug))})]}),e.jsx("div",{className:"lg:hidden mt-12",children:e.jsx(S,{})})]})]})})})]}),e.jsx(c,{})]})]})}export{A as default};