@igamingcareer/igaming-components 1.0.24 → 1.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -7752,7 +7752,7 @@ React keys must be passed directly to JSX without using spread:
7752
7752
  p-2 rounded-lg transition-colors
7753
7753
  ${i?"text-blue-600 bg-blue-50 hover:bg-blue-100":"text-gray-400 hover:text-gray-600 hover:bg-gray-100"}
7754
7754
  `,"aria-label":i?"Unsave job":"Save job",children:a.jsx(Pt,{size:20,className:`transition-colors ${i?"fill-blue-600 text-blue-600":""}`})}),a.jsx("a",{href:o.link||"#job-details",target:"_blank",rel:"noopener noreferrer",className:`flex-1 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700
7755
- transition-colors text-sm font-medium text-center`,onClick:c,children:"Apply Now"})]})]})},EI=({jobs:o,onSaveJob:e,onViewJob:r,isJobSaved:i})=>o.length===0?a.jsxs("div",{className:"no-results",children:[a.jsx("h3",{children:"No jobs found matching your criteria"}),a.jsx("p",{children:"Try adjusting your filters or search term"})]}):a.jsx("div",{className:"jobs-grid",children:o.map(n=>a.jsx(vC,{job:n,onSaveJob:e,onViewJob:r,isSaved:i(n)},n.link))}),UI=({currentPage:o,totalPages:e,setCurrentPage:r})=>{if(e<=1)return null;const i=[];if(e<=5)for(let c=1;c<=e;c++)i.push(c);else if(o<=3)for(let c=1;c<=5;c++)i.push(c);else if(o>=e-2)for(let c=e-4;c<=e;c++)i.push(c);else for(let c=o-2;c<=o+2;c++)i.push(c);return a.jsxs("div",{className:"pagination",children:[a.jsx("button",{className:"pagination-button prev-button",disabled:o===1,onClick:()=>r(o-1),children:"Previous"}),i.map(c=>a.jsx("button",{className:`pagination-button ${o===c?"active":""}`,onClick:()=>r(c),children:c},c)),a.jsx("button",{className:"pagination-button next-button",disabled:o===e,onClick:()=>r(o+1),children:"Next"})]})},GI=({isOpen:o,onClose:e,filterKeys:r,filtersData:i,activeFilters:n,handleFilterChange:c,handleSearchChange:s,searchTerm:l,clearAllFilters:d,searchFilters:h,removeSearchFilter:y})=>a.jsx("div",{className:`fixed inset-0 bg-gray-600 bg-opacity-50 overflow-y-auto h-full w-full transition-opacity ${o?"opacity-100":"opacity-0 pointer-events-none"}`,children:a.jsx("div",{className:`fixed right-0 top-0 w-4/5 max-w-sm bg-white h-full shadow-xl transition-transform duration-300 ease-in-out ${o?"transform translate-x-0":"transform translate-x-full"}`,children:a.jsxs("div",{className:"p-4",children:[a.jsxs("div",{className:"flex justify-between items-center mb-4",children:[a.jsx("h2",{className:"text-lg font-semibold",children:"Filters"}),a.jsx("button",{onClick:e,className:"text-gray-500 hover:text-gray-700",children:a.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),a.jsx("div",{className:"mb-4",children:a.jsx("input",{type:"text",className:"w-full p-2 border border-gray-300 rounded-md",placeholder:"Search jobs...",value:l,onChange:p=>s(p.target.value)})}),r.map(p=>{var u;return a.jsxs("div",{className:"mb-4",children:[a.jsx("label",{htmlFor:`mobile-${p}`,className:"block text-sm font-medium text-gray-700 mb-1",children:p.replace(/_/g," ")}),a.jsxs("select",{id:`mobile-${p}`,className:"w-full p-2 border border-gray-300 rounded-md",onChange:k=>c(p,k.target.value),value:n[p]||"",children:[a.jsxs("option",{value:"",children:["Select ",p.replace(/_/g," ")]}),(u=i[p])==null?void 0:u.map(k=>a.jsx("option",{value:k,children:k},k))]})]},p)}),Object.keys(n).length>0&&a.jsxs("div",{className:"mt-4",children:[a.jsx("h3",{className:"text-sm font-semibold mb-2",children:"Active Filters:"}),Object.entries(n).map(([p,u])=>a.jsxs("div",{className:"inline-flex items-center bg-blue-100 text-blue-800 rounded-full px-3 py-1 text-sm mr-2 mb-2",children:[a.jsxs("span",{children:[p.replace(/_/g," "),": ",u]}),a.jsx("button",{className:"ml-2 text-blue-600 hover:text-blue-800",onClick:()=>c(p,""),children:"×"})]},p)),a.jsx("button",{className:"mt-2 w-full bg-red-100 text-red-800 rounded-md px-3 py-2 text-sm font-medium",onClick:d,children:"Clear All Filters"})]})]})})}),ZI=({apiUrl:o,itemsPerPage:e,filterKeys:r,enableSearch:i,enablePagination:n,enableMobileFilter:c,banners:s})=>{const[l,d]=b.useState([]),[h,y]=b.useState([]),[p,u]=b.useState(1),[k,x]=b.useState({}),[m,g]=b.useState([]),[v,M]=b.useState({}),[S,w]=b.useState(""),[j,_]=b.useState([]),[z,N]=b.useState(!1);b.useEffect(()=>{fetch(`${o}/items`).then(I=>I.json()).then(I=>{d(I),y(I);const L=C(I);M(L)}).catch(I=>console.error("Error fetching items:",I))},[o]);const C=I=>{const L={};I.forEach(O=>{r.forEach(re=>{L[re]||(L[re]=new Set);const pe=O[re];pe!=null&&L[re].add(String(pe))})});const q={};return Object.keys(L).forEach(O=>{q[O]=Array.from(L[O])}),q},R=I=>{const L=C(I);M(L)},E=(I,L)=>{x(q=>{const O=L?{...q,[I]:L}:{...q};L||delete O[I];const re=$(l,O,m);return y(re),u(1),R(re),O})},F=I=>{if(w(I),I){const L=l.map(q=>q.title).filter((q,O,re)=>q&&q.toLowerCase().includes(I.toLowerCase())&&re.indexOf(q)===O).slice(0,5);_(L)}else _([])},B=I=>{if(I.key==="Enter"&&S.trim()){I.preventDefault();const L=[...m,S.trim()];g(L);const q=$(l,k,L);y(q),u(1),R(q),w("")}},U=I=>{const L=m.filter(O=>O!==I);g(L);const q=$(l,k,L);y(q),u(1),R(q)},$=(I,L,q)=>{let O=I.filter(re=>Object.entries(L).every(([pe,Ze])=>{const ge=re[pe];return typeof ge=="string"&&ge.toLowerCase()===Ze.toLowerCase()}));return q.length>0&&(O=O.filter(re=>q.every(pe=>re.title.toLowerCase().includes(pe.toLowerCase())))),O},G=()=>{x({}),g([]),y(l),u(1),R(l)},te=()=>{N(!z)},Y=I=>{},se=I=>{},ye=I=>!1,ne=Math.ceil(h.length/e),Me=h.slice((p-1)*e,p*e);return a.jsxs("div",{className:"flex flex-col min-h-screen",children:[a.jsx("div",{className:"flex-grow",children:a.jsxs("div",{className:"job-listings-container",children:[a.jsx("div",{className:"header-container",children:a.jsxs("div",{className:"header-content",children:[a.jsx("h1",{className:"main-title",children:"Job Listings"}),a.jsxs("p",{className:"items-count",children:["Total: ",a.jsx("span",{className:"count-value",children:h.length})]})]})}),a.jsx("button",{className:"md:hidden w-full mb-4 px-4 py-2 bg-blue-600 text-white rounded-md",onClick:te,children:z?"Close Filters":"Open Filters"}),a.jsxs("div",{className:"hidden md:block filters-container",children:[a.jsx(OI,{searchTerm:S,handleSearchChange:F,handleSearchKeyDown:B,suggestions:j}),a.jsx(BI,{filterKeys:r,filtersData:v,activeFilters:k,handleFilterChange:E,searchFilters:m,removeSearchFilter:U,clearAllFilters:G,searchableFilters:["company"]})]}),a.jsx(GI,{isOpen:z,onClose:te,filterKeys:r,filtersData:v,activeFilters:k,handleFilterChange:E,handleSearchChange:F,searchTerm:S,clearAllFilters:G,handleSearchKeyDown:B,searchFilters:m,removeSearchFilter:U}),a.jsxs("div",{className:"flex flex-col md:flex-row",children:[a.jsxs("div",{className:"w-full md:w-3/4 md:pr-4",children:[a.jsx("h2",{className:"section-title",children:"Open Positions"}),a.jsx(EI,{jobs:Me,onSaveJob:Y,onViewJob:se,isJobSaved:ye}),a.jsx(UI,{currentPage:p,totalPages:ne,setCurrentPage:u})]}),a.jsx("div",{className:"w-full md:w-1/4 mt-4 md:mt-0",children:a.jsx("div",{className:"sticky top-4",children:s.sidebar.enabled&&s.sidebar.url&&a.jsx(gM,{position:"sidebar",url:s.sidebar.url,link:s.sidebar.link,alt:s.sidebar.alt})})})]})]})}),s.bottom.enabled&&s.bottom.url&&a.jsx(gM,{position:"top",url:s.bottom.url,link:s.bottom.link,alt:s.bottom.alt})]})},WI=({title:o="Subscribe to our newsletter",description:e="The latest job opportunities and career tips, weekly in your inbox.",links:r=[]})=>a.jsx("footer",{className:"bg-gray-800 text-white",children:a.jsxs("div",{className:"max-w-7xl mx-auto py-12 px-4 sm:px-6 lg:py-16 lg:px-8",children:[a.jsxs("div",{className:"xl:grid xl:grid-cols-3 xl:gap-8",children:[a.jsx("div",{className:"grid grid-cols-2 gap-8 xl:col-span-2",children:a.jsx("div",{className:"md:grid md:grid-cols-2 md:gap-8",children:Array.isArray(r)&&r.map((i,n)=>{var c;return Array.isArray(i)&&i.length>0?a.jsxs("div",{className:"mt-12 md:mt-0",children:[a.jsx("h3",{className:"text-sm font-semibold text-gray-400 tracking-wider uppercase",children:((c=i[0])==null?void 0:c.text)||"Section"}),a.jsx("ul",{className:"mt-4 space-y-4",children:i.map((s,l)=>a.jsx("li",{children:a.jsx("a",{href:s.url,className:"hover:text-gray-300",children:s.text})},l))})]},n):null})})}),a.jsxs("div",{className:"mt-8 xl:mt-0",children:[a.jsx("h3",{className:"text-sm font-semibold text-gray-400 tracking-wider uppercase",children:o}),a.jsx("p",{className:"mt-4 text-base text-gray-300",children:e}),a.jsxs("form",{className:"mt-4 sm:flex sm:max-w-md",children:[a.jsx("label",{htmlFor:"email-address",className:"sr-only",children:"Email address"}),a.jsx("input",{type:"email",name:"email-address",id:"email-address",autoComplete:"email",required:!0,className:"appearance-none min-w-0 w-full bg-white border border-transparent rounded-md py-2 px-4 text-base text-gray-900 placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-800 focus:ring-white focus:border-white focus:placeholder-gray-400",placeholder:"Enter your email"}),a.jsx("div",{className:"mt-3 rounded-md sm:mt-0 sm:ml-3 sm:flex-shrink-0",children:a.jsx("button",{type:"submit",className:"w-full bg-blue-600 border border-transparent rounded-md py-2 px-4 flex items-center justify-center text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-800 focus:ring-blue-500",children:"Subscribe"})})]})]})]}),a.jsx("div",{className:"mt-8 border-t border-gray-700 pt-8",children:a.jsxs("p",{className:"text-base text-gray-400 xl:text-center",children:["© ",new Date().getFullYear()," JobBoard, Inc. All rights reserved."]})})]})}),$I=({logo:o="",links:e=[],buttonText:r="Post a Job",buttonUrl:i="/post-job"})=>a.jsx("nav",{className:"bg-white shadow-md",children:a.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:a.jsxs("div",{className:"flex justify-between h-16",children:[a.jsxs("div",{className:"flex",children:[a.jsx("div",{className:"flex-shrink-0 flex items-center",children:a.jsx("a",{href:"/",className:"text-xl font-bold text-blue-600",children:o?a.jsx("img",{src:o,alt:"Logo",className:"h-6 w-6"}):a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:"mercado-match h-6 w-6",focusable:"false",children:a.jsx("path",{d:"M20.5 2h-17A1.5 1.5 0 002 3.5v17A1.5 1.5 0 003.5 22h17a1.5 1.5 0 001.5-1.5v-17A1.5 1.5 0 0020.5 2zM8 19H5v-9h3zM6.5 8.25A1.75 1.75 0 118.3 6.5a1.78 1.78 0 01-1.8 1.75zM19 19h-3v-4.74c0-1.42-.6-1.93-1.38-1.93A1.74 1.74 0 0013 14.19a.66.66 0 000 .14V19h-3v-9h2.9v1.3a3.11 3.11 0 012.7-1.4c1.55 0 3.36.86 3.36 3.66z"})})})}),a.jsx("div",{className:"hidden sm:ml-6 sm:flex sm:space-x-8",children:e.map((n,c)=>a.jsx("a",{href:n.url,className:"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium",children:n.text},c))})]}),a.jsx("div",{className:"hidden sm:ml-6 sm:flex sm:items-center",children:a.jsx("a",{href:i,className:"inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500",children:r})})]})})}),MC=({savedJobsCount:o})=>{const[e,r]=b.useState("");b.useEffect(()=>{typeof window<"u"&&r(window.location.pathname)},[]);const i=n=>e===n;return a.jsx("nav",{className:"fixed bottom-0 left-0 right-0 bg-white dark:bg-gray-800 border-t border-gray-200 dark:border-gray-700 md:hidden z-50",children:a.jsxs("div",{className:"grid grid-cols-5 h-16",children:[a.jsxs("a",{href:"/","aria-label":"Home",className:`flex flex-col items-center justify-center ${i("/")?"text-gray-900 font-semibold dark:text-white":"text-gray-500 dark:text-gray-500"} hover:text-primary-500`,children:[a.jsx(At,{className:"w-6 h-6"}),a.jsx("span",{className:"text-xs mt-1",children:"Home"})]}),a.jsxs("a",{href:"/jobs","aria-label":"Jobs",className:`flex flex-col items-center justify-center ${i("/jobs")?"text-gray-900 font-semibold dark:text-white":"text-gray-500 dark:text-gray-500"} hover:text-primary-500`,children:[a.jsx(g2,{className:"w-6 h-6"}),a.jsx("span",{className:"text-xs mt-1",children:"Jobs"})]}),a.jsxs("a",{href:"/saved","aria-label":"Saved Jobs",className:`flex flex-col items-center justify-center relative ${i("/saved")?"text-gray-900 font-semibold dark:text-white":"text-gray-500 dark:text-gray-500"} hover:text-primary-500`,children:[a.jsx(pi,{className:"w-6 h-6"}),a.jsx("span",{className:"text-xs mt-1",children:"Saved"}),o>0&&a.jsx("span",{className:"absolute -top-1 -right-1 bg-primary-500 text-white rounded-full w-5 h-5 flex items-center justify-center text-xs",children:o})]}),a.jsxs("a",{href:"/courses","aria-label":"Courses",className:`flex flex-col items-center justify-center ${i("/courses")?"text-gray-900 font-semibold dark:text-white":"text-gray-500 dark:text-gray-500"} hover:text-primary-500`,children:[a.jsx(x2,{className:"w-6 h-6"}),a.jsx("span",{className:"text-xs mt-1",children:"Courses"})]}),a.jsxs("a",{href:"/news","aria-label":"News",className:`flex flex-col items-center justify-center ${i("/news")?"text-gray-900 font-semibold dark:text-white":"text-gray-500 dark:text-gray-500"} hover:text-primary-500`,children:[a.jsx(O2,{className:"w-6 h-6"}),a.jsx("span",{className:"text-xs mt-1",children:"News"})]})]})})},XI=o=>{const e=["Acme Inc","TechCorp","Global Solutions","Innovate Labs","Future Tech"],r=["Engineering","Marketing","Sales","Design","Product","HR"],i=["New York, NY","San Francisco, CA","Austin, TX","Seattle, WA","Remote"],n=["New York","San Francisco","Austin","Seattle","Chicago"],c=["USA","Canada","UK","Germany","Australia"],s=["Startup","Enterprise","Agency","Nonprofit","Government"],l=d=>{const h=new Date;return h.setDate(h.getDate()-Math.floor(Math.random()*d)),h.toISOString()};return Array.from({length:o},(d,h)=>{const y=l(120);return{id:`job-${h}`,title:`${r[h%r.length]} ${h%3===0?"Senior":h%3===1?"Mid-level":"Junior"} Position`,company:e[h%e.length],department:r[h%r.length],location:i[h%i.length],city:n[h%n.length],country:c[h%c.length],company_type:s[h%s.length],link:"#job-link",logo:`/placeholder.svg?height=50&width=50&text=${e[h%e.length].charAt(0)}`,overview:"This is a mock job description for preview purposes. The actual job details would appear here with information about responsibilities, requirements, and company culture.",slug:`job-${h}`,scraped_at:new Date().toISOString(),published_at:y,created_at:y,sponsored:h%7===0}})},JI=({title:o,description:e,ctaText:r,ctaLink:i,bgColor:n="bg-blue-50",textColor:c="text-blue-800"})=>a.jsx("div",{className:`promo-card ${n} p-4 rounded-lg shadow-sm hidden md:block`,children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("h3",{className:`font-bold text-lg ${c}`,children:o}),a.jsx("p",{className:`text-sm mt-1 ${c} opacity-90`,children:e})]}),a.jsx("a",{href:i,className:"bg-white text-blue-600 hover:bg-blue-50 px-4 py-2 rounded-md text-sm font-medium shadow-sm transition-colors",children:r})]})}),YI=({items:o,cardType:e,viewMode:r,savedJobs:i,onSaveJob:n,onViewJob:c})=>{const[s,l]=b.useState([]),[d,h]=b.useState(null);b.useEffect(()=>{try{if(!Array.isArray(o)){console.error("❌ Items is not an array:",o),h("Invalid data format received"),l([]);return}const p=[...o];o.length>5&&p.splice(5,0,{id:"promo-1",title:"Promo",isPromo:!0}),l(p),h(null)}catch(p){console.error("Error processing items:",p),h(`Error processing items: ${p instanceof Error?p.message:String(p)}`),l([])}},[o]);const y=(p,u)=>{try{if(p.isPromo)return a.jsx("div",{className:"col-span-full my-4",children:a.jsx(JI,{title:"Upgrade Your Job Search",description:"Get personalized job recommendations and stand out to employers.",ctaText:"Learn More",ctaLink:"#premium-features",bgColor:"bg-blue-50",textColor:"text-blue-800"})},`promo-${u}`);if(!p||typeof p!="object")return console.error("❌ Invalid item detected:",p),a.jsxs("div",{className:"error-card bg-red-50 p-4 rounded-md border border-red-200",children:[a.jsx("p",{className:"text-red-800 font-medium",children:"Invalid Job Data"}),a.jsx("p",{className:"text-red-600 text-sm",children:"The job data is in an unexpected format."})]});const k=p.id?`${p._id}-${u}`:p.slug?`${p.slug}-${u}`:`item-${u}`;switch(e){case"job":return a.jsx(vC,{job:p,onSaveJob:n,onViewJob:c,isSaved:i.includes(p.id||p.slug||p.link)},k);default:return console.warn(`⚠️ Unknown cardType: ${e}`),a.jsxs("div",{className:"error-card bg-yellow-50 p-4 rounded-md border border-yellow-200",children:[a.jsx("p",{className:"text-yellow-800 font-medium",children:"Unknown Card Type"}),a.jsx("p",{className:"text-yellow-700 text-sm",children:"The specified card type is not supported."})]})}}catch(k){return console.error("Error rendering card:",k),a.jsxs("div",{className:"error-card bg-red-50 p-4 rounded-md border border-red-200",children:[a.jsx("p",{className:"text-red-800 font-medium",children:"Error Rendering Card"}),a.jsx("p",{className:"text-red-600 text-sm",children:k instanceof Error?k.message:String(k)})]})}};return d?a.jsxs("div",{className:"bg-red-50 border border-red-200 text-red-800 rounded-lg p-6",children:[a.jsx("h3",{className:"font-semibold mb-2",children:"Error Loading Items"}),a.jsx("p",{children:d})]}):s.length===0?a.jsxs("div",{className:"no-results",children:[a.jsx("h3",{children:"No items found matching your criteria"}),a.jsx("p",{children:"Try adjusting your filters or search term"})]}):a.jsx("div",{className:r==="grid"?"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4":"flex flex-col gap-4","data-view-mode":r,children:s.map((p,u)=>y(p,u))})},KI=({jobs:o,onViewJob:e})=>!o||o.length===0?null:a.jsxs("div",{className:"last-visited-jobs mt-8 bg-white rounded-lg shadow p-4",children:[a.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Recently Viewed Jobs"}),a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:o.map(r=>a.jsxs("div",{className:"p-3 border rounded-md hover:shadow-md transition-shadow cursor-pointer",onClick:()=>e(r),children:[a.jsxs("div",{className:"flex items-center mb-2",children:[a.jsx("img",{src:r.logo||"/placeholder.svg?height=30&width=30",alt:`${r.company} logo`,className:"w-6 h-6 mr-2"}),a.jsx("h3",{className:"font-medium text-sm truncate",children:r.title})]}),a.jsx("p",{className:"text-xs text-gray-600 truncate",children:r.company}),a.jsx("p",{className:"text-xs text-gray-500 truncate",children:r.location})]},r._id||r.slug||r.link))})]}),wC=({activeDateFilter:o,onDateFilterChange:e,dateFieldLabel:r="Published",options:i=[{value:"all",label:"All Time"},{value:"today",label:"Today"},{value:"this_week",label:"This Week"},{value:"this_month",label:"This Month"},{value:"last_30_days",label:"Last 30 Days"},{value:"last_90_days",label:"Last 90 Days"}]})=>a.jsxs("div",{className:"date-filter",children:[r&&a.jsxs("label",{htmlFor:"date-filter",className:"text-sm font-medium text-gray-700 mr-2",children:[r,":"]}),a.jsx("select",{id:"date-filter",value:o,onChange:n=>e(n.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-indigo-500 focus:border-indigo-500 bg-white",children:i.map(n=>a.jsx("option",{value:n.value,children:n.label},n.value))})]}),QI=({activeDateFilter:o,handleDateFilterChange:e,filterKeys:r,searchableFilters:i,dateFieldLabel:n,activeFilters:c,handleFilterChange:s,toggleSavedJobsFilter:l,filtersData:d,savedJobs:h,showOnlySaved:y,isMobileFilterOpen:p,toggleMobileFilter:u,dateOptions:k=[{value:"all",label:"All Time"},{value:"today",label:"Today"},{value:"this_week",label:"This Week"},{value:"this_month",label:"This Month"},{value:"last_30_days",label:"Last 30 Days"},{value:"last_90_days",label:"Last 90 Days"}]})=>a.jsx("div",{children:a.jsxs("div",{className:p?"block":"hidden",children:[a.jsx("div",{className:"fixed inset-0 bg-gray-600 bg-opacity-75 z-40",onClick:()=>u(!p)}),a.jsxs("div",{className:"fixed inset-y-0 right-0 max-w-xs w-full bg-white shadow-xl z-50 overflow-y-auto",children:[a.jsxs("div",{className:"p-4 border-b border-gray-200 flex items-center justify-between",children:[a.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:"Filters"}),a.jsx("button",{onClick:()=>u(!p),className:"p-2 rounded-full hover:bg-gray-100","aria-label":"Close filters",children:a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6 text-gray-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),a.jsxs("div",{className:"p-4",children:[a.jsxs("div",{className:"mb-6",children:[a.jsx("h3",{className:"text-sm font-medium text-gray-900 mb-2",children:n}),a.jsx(wC,{activeDateFilter:o,onDateFilterChange:e,dateFieldLabel:"",options:k})]}),r.map(x=>{var m;return a.jsxs("div",{className:"mb-6",children:[a.jsx("h3",{className:"text-sm font-medium text-gray-900 mb-2",children:x.replace(/_/g," ")}),i.includes(x)?a.jsx(bM,{options:d[x]||[],value:c[x]||"",onChange:g=>s(x,g),placeholder:`Select ${x.replace(/_/g," ")}`,className:"w-full"}):a.jsxs("select",{className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-indigo-500 focus:border-indigo-500 bg-white",value:c[x]||"",onChange:g=>s(x,g.target.value),children:[a.jsxs("option",{value:"",children:["Select ",x.replace(/_/g," ")]}),(m=d[x])==null?void 0:m.map(g=>a.jsx("option",{value:g,children:g},g))]})]},x)}),a.jsx("div",{className:"mt-6",children:a.jsxs("button",{onClick:l,className:`w-full px-4 py-2 rounded-lg flex items-center justify-center ${y?"bg-indigo-100 text-indigo-800":"bg-gray-100 text-gray-800 hover:bg-gray-200"}`,children:[a.jsx(Pt,{size:16,className:"mr-2"}),a.jsxs("span",{children:["Saved Jobs (",h.length,")"]})]})}),a.jsx("div",{className:"mt-6 pt-6 border-t border-gray-200",children:a.jsx("button",{onClick:()=>u(!p),className:"w-full py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition-colors",children:"Apply Filters"})})]})]})]})}),bC=({totalColumns:o=2})=>a.jsx("div",{className:"flex-grow p-8",children:a.jsx("div",{className:"max-w-7xl mx-auto",children:a.jsxs("div",{className:"animate-pulse",children:[a.jsx("div",{className:"h-8 bg-gray-200 rounded w-1/4 mb-6"}),a.jsx("div",{className:`grid grid-cols-1 md:grid-cols-${o} gap-6`,children:[...Array(4)].map((e,r)=>a.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-6",children:[a.jsx("div",{className:"h-6 bg-gray-200 rounded w-3/4 mb-4"}),a.jsx("div",{className:"h-4 bg-gray-200 rounded w-1/2 mb-2"}),a.jsx("div",{className:"h-4 bg-gray-200 rounded w-1/3 mb-4"}),a.jsx("div",{className:"h-20 bg-gray-200 rounded mb-4"}),a.jsx("div",{className:"h-8 bg-gray-200 rounded w-full"})]},r))})]})})}),Aw=({data:o,onSelect:e,placeholder:r="Search...",debounceMs:i=250,onTyping:n,className:c="",showSubmitButton:s=!1})=>{const[l,d]=b.useState(""),[h,y]=b.useState([]),[p,u]=b.useState(!1),k=b.useRef(null),x=v=>{d(v),u(!0),n&&n(v)},m=()=>{d(""),y([]),u(!1),n==null||n("")},g=v=>{e(v),d(""),y([]),u(!1)};return b.useEffect(()=>{k.current&&clearTimeout(k.current),k.current=setTimeout(()=>{if(!l){y([]);return}const v=o.filter(M=>M.toLowerCase().includes(l.toLowerCase())).filter((M,S,w)=>w.indexOf(M)===S).slice(0,5);y(v)},i)},[l,o]),a.jsxs("div",{className:`relative w-full ${c}`,children:[a.jsxs("div",{className:"relative",children:[a.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:a.jsx(rt,{className:"h-4 w-4 text-gray-400"})}),a.jsx("input",{type:"text",className:"w-full py-2 pl-9 pr-12 border border-gray-300 rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500",placeholder:r,value:l,onChange:v=>x(v.target.value),onFocus:()=>u(h.length>0),onBlur:()=>setTimeout(()=>u(!1),200),onKeyDown:v=>{v.key==="Enter"&&l.trim()&&(v.preventDefault(),g(l.trim()))}}),l&&!s&&a.jsx("button",{onClick:m,className:"absolute inset-y-0 right-2 flex items-center",children:a.jsx(Ke,{className:"h-4 w-4 text-gray-400 hover:text-gray-600"})}),s&&a.jsx("button",{onClick:()=>l.trim()&&g(l.trim()),className:"absolute right-2 top-1/2 -translate-y-1/2 bg-indigo-500 text-white py-1.5 px-2 rounded-md hover:bg-indigo-600",children:a.jsx(rt,{className:"h-4 w-4"})})]}),p&&h.length>0&&a.jsx("ul",{className:"absolute z-10 mt-1 w-full bg-white border border-gray-200 rounded-lg shadow-md",children:h.map((v,M)=>a.jsx("li",{children:a.jsx("button",{className:"w-full px-4 py-2 text-left text-sm text-gray-700 hover:bg-gray-100",onClick:()=>g(v),children:a.jsxs("div",{className:"flex items-center",children:[a.jsx(rt,{className:"h-4 w-4 mr-2 text-gray-400"}),v]})})},M))})]})},qw=({currentPage:o,totalPages:e,onPageChange:r})=>{if(e<=1)return null;const i=5,n=Math.max(1,o-Math.floor(i/2)),c=Math.min(e,n+i-1),s=[];for(let l=n;l<=c;l++)s.push(l);return a.jsx("div",{className:"mt-6 flex justify-center",children:a.jsxs("nav",{className:"flex items-center space-x-2",children:[a.jsx("button",{onClick:()=>r(Math.max(1,o-1)),disabled:o===1,className:"px-3 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),s.map(l=>a.jsx("button",{onClick:()=>r(l),className:`px-3 py-2 text-sm font-medium rounded-md ${o===l?"bg-indigo-600 text-white":"text-gray-700 bg-white border border-gray-300 hover:bg-gray-50"}`,children:l},l)),a.jsx("button",{onClick:()=>r(Math.min(e,o+1)),disabled:o===e,className:"px-3 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})})},LC=({onSearchChange:o,title:e="Gaming News",description:r="Latest news and insights from the gaming industry",popularTags:i=["AI Gaming","Esports","VR/AR","Mobile Gaming","Regulation","Market Analysis"],generateHref:n=c=>`?q=${encodeURIComponent(c)}`})=>(b.useState(""),a.jsxs(a.Fragment,{children:[a.jsx("header",{className:"bg-white shadow-sm border-b border-gray-200",children:a.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4",children:a.jsx("div",{className:"flex items-center justify-between",children:a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:e}),a.jsx("p",{className:"hidden lg:block text-gray-600",children:r})]})})})}),a.jsx("div",{className:"bg-gray-50 border-t border-gray-200",children:a.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:a.jsxs("div",{className:"flex items-center space-x-6 py-2 text-sm overflow-x-auto",children:[a.jsx("span",{className:"text-gray-600 font-medium flex-shrink-0",children:"Popular:"}),i.map(c=>a.jsxs("a",{href:n(c),className:"text-blue-600 hover:text-blue-800 transition-colors flex-shrink-0",children:["#",c]},c))]})})})]})),eA=6,tA=({apiUrl:o,itemsPerPage:e=12,filterKeys:r,banner:i,enableMobileFilter:n=!0,cardType:c,dateField:s="created_at",dateFieldLabel:l="Published",searchableFilters:d=["companies"],notification_url:h="http://localhost:5147"})=>{var Qi;const[y,p]=b.useState([]),[u,k]=b.useState([]),[x,m]=b.useState(1),[g,v]=b.useState({}),[M,S]=b.useState([]),[w,j]=b.useState({}),[_,z]=b.useState(""),[N,C]=b.useState([]),[R,E]=b.useState(!1),[F,B]=b.useState(e),[U,$]=b.useState("grid"),[G,te]=b.useState([]),[Y,se]=b.useState(!1),[ye,ne]=b.useState([]),[Me,I]=b.useState(!0),[L,q]=b.useState(null),[O,re]=b.useState("all"),[pe,Ze]=b.useState({jobTypes:[],experienceLevels:[],country:"",minSalary:"",maxSalary:"",city:""}),[ge,it]=b.useState({open:!1,type:"info",message:""}),Mt=(A,H)=>{it({open:!0,type:A,message:H})};b.useEffect(()=>{try{const A=localStorage.getItem("savedJobs");A&&te(JSON.parse(A));const H=localStorage.getItem("lastVisitedJobs");H&&ne(JSON.parse(H))}catch(A){console.error("Error loading data from localStorage:",A)}},[]),b.useEffect(()=>{const H=new URLSearchParams(window.location.search).get("date_filter");if(H&&H!=="all"){re(H);const V=pt(y,g,M,H);k(V),m(1),Re(V)}},[y]),b.useEffect(()=>{if(!o){q("❌ Missing API URL for Listing component!"),I(!1);return}I(!0),q(null),(async()=>{try{const H=await fetch(o);if(!H.ok)throw new Error(`API responded with status: ${H.status}`);const V=await H.json();if(!Array.isArray(V))throw new Error("Expected an array but received: "+typeof V);const J=V.map((K,Le)=>({...K,sponsored:Le%7===0}));p(J),k(J);const Z=wt(J);j(Z)}catch(H){console.error("Error fetching data:",H),q(`Failed to load data: ${H instanceof Error?H.message:String(H)}`);const V=XI(20);p(V),k(V);const J=wt(V);j(J)}finally{I(!1)}})()},[o]),b.useEffect(()=>{const A=new URLSearchParams(window.location.search),H={};r.forEach(Z=>{const K=A.get(Z);K&&(H[Z]=K)}),v(H);const V=A.get("q")||A.get("searchTerm")||"";V&&(z(V),q2(V));const J={};r.forEach(Z=>{const K=A.get(Z);K&&(J[Z]=K)}),v(J)},[]);const LM=(A,H)=>{if(console.log("Applying date filter from URL:",A,H),H==="all")return A;const V=new Date,J=new Date(V.getFullYear(),V.getMonth(),V.getDate());return A.filter(Z=>{const K=Z[s]||Z.created_at||Z.published_at||Z.scraped_at;if(!K)return!1;const Le=new Date(K);switch(H){case"today":return Le>=J;case"this_week":{const me=new Date(V);return me.setDate(V.getDate()-V.getDay()),me.setHours(0,0,0,0),Le>=me}case"this_month":{const me=new Date(V.getFullYear(),V.getMonth(),1);return Le>=me}case"last_30_days":{const me=new Date(V);return me.setDate(V.getDate()-30),Le>=me}case"last_90_days":{const me=new Date(V);return me.setDate(V.getDate()-90),Le>=me}default:return!0}})},CM=(A,H)=>A.filter(V=>{var J,Z,K,Le,me;if(H.jobTypes.length>0){const Se=((J=V.department)==null?void 0:J.toLowerCase())||"";if(!H.jobTypes.some(bt=>Se.includes(bt)))return!1}if(H.experienceLevels.length>0){const Se=((Z=V.title)==null?void 0:Z.toLowerCase())||"";if(!H.experienceLevels.some(bt=>!!(bt==="senior"&&Se.includes("senior")||bt==="mid"&&(Se.includes("mid")||Se.includes("mid-level"))||bt==="entry"&&(Se.includes("junior")||Se.includes("entry")))))return!1}return!(H.country&&!(((K=V.location)==null?void 0:K.toLowerCase())||((Le=V.city)==null?void 0:Le.toLowerCase())||"").includes(H.country.toLowerCase())||H.city&&!(((me=V.company_type)==null?void 0:me.toLowerCase())||"").includes(H.city.toLowerCase()))});b.useEffect(()=>{if(Y){const A=y.filter(H=>G.includes(H.id||H.slug||H.link));k(A),m(1)}else{let A=y;A=pt(A,g,M,O),A=CM(A,pe),k(A)}},[Y,G,y,g,M,O,pe]);const wt=A=>{const H={};A.forEach(J=>{r.forEach(Z=>{H[Z]||(H[Z]=new Set);const K=J[Z];typeof K=="string"&&K.trim()!==""&&H[Z].add(K)})});const V={};return Object.keys(H).forEach(J=>{V[J]=Array.from(H[J])}),V},Re=A=>{const H=wt(A);j(H)},Bt=(A,H)=>{console.log("Filter changed:",A,H),v(V=>{const J={...V};H?J[A]=H:delete J[A],Y&&se(!1);const Z=pt(y,J,M,O);return k(Z),m(1),Re(Z),J})},Zi=b.useRef(null),A2=A=>{m(A),setTimeout(()=>{var H;(H=Zi.current)==null||H.scrollIntoView({behavior:"smooth",block:"start"})},100)},ai=A=>{re(A),Y&&se(!1);const H=pt(y,g,M,A);k(H),m(1),Re(H);const V=new URLSearchParams(window.location.search);A==="all"?V.delete("date_filter"):V.set("date_filter",A);const J=`${window.location.pathname}?${V.toString()}`;window.history.replaceState({},"",J)},Wi=A=>{if(z(A),A){const H=y.map(V=>V.title).filter((V,J,Z)=>V&&V.toLowerCase().includes(A.toLowerCase())&&Z.indexOf(V)===J).slice(0,5);C(H)}else C([])},q2=A=>{if(!A.trim())return;Y&&se(!1);const H=[...M,A.trim()];S(H);const V=pt(y,g,H,O);k(V),m(1),Re(V),z("")},jM=A=>{const H=M.filter(J=>J!==A);S(H);const V=pt(y,g,H,O);k(V),m(1),Re(V)},pt=(A,H,V,J)=>{let Z=A.filter(K=>Object.entries(H).every(([Le,me])=>{const Se=K[Le];return typeof Se=="string"&&Se.toLowerCase()===me.toLowerCase()}));return V.length>0&&(Z=Z.filter(K=>V.every(Le=>{var me,Se;return((me=K.title)==null?void 0:me.toLowerCase().includes(Le.toLowerCase()))||((Se=K.overview)==null?void 0:Se.toLowerCase().includes(Le.toLowerCase()))}))),Z=LM(Z,J),Z},$i=()=>{Ze({jobTypes:[],experienceLevels:[],country:"",minSalary:"",maxSalary:"",city:""});const A=pt(y,g,M,O);k(A),m(1),Re(A)},Xi=()=>{v({}),S([]),se(!1),re("all"),$i(),k(y),m(1),Re(y)},Ot=async()=>{const A=localStorage.getItem("email"),H=localStorage.getItem("leadId");if(!A||!H){Mt("info","Please subscribe first to create alerts.");return}const V={jobTitle:g.title||"",location:g.city||"",techStack:g.company||""};try{await fetch(`http://localhost:5147/api/leads/${H}/preferences`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(V)}),Mt("success","Alert created! We'll notify you about new matching jobs.")}catch(J){console.error(J),Mt("error","Failed to create alert.")}},N2=()=>{E(!R)},Ji=A=>{B(A),m(1)},ri=()=>{$(U==="grid"?"list":"grid")},ii=A=>{const H=A.id??A._id??A.slug??A.link;te(V=>{const J=V.includes(H);let Z;J?Z=V.filter(K=>K!==H):Z=[...V,H];try{localStorage.setItem("savedJobs",JSON.stringify(Z))}catch(K){console.error("Error saving to localStorage:",K)}return Z})},Yi=A=>{const H=A.id||A.slug||A.link;ne(V=>{const J=V.filter(K=>(K.id||K.slug||K.link)!==H),Z=[A,...J].slice(0,eA);try{localStorage.setItem("lastVisitedJobs",JSON.stringify(Z))}catch(K){console.error("Error saving to localStorage:",K)}return Z})},Ki=()=>{se(!Y)},SM=Math.ceil(u.length/F),IM=u.slice((x-1)*F,x*F);return L&&!y.length?a.jsx("div",{className:"flex-grow p-8",children:a.jsx("div",{className:"max-w-7xl mx-auto",children:a.jsxs("div",{className:"bg-red-50 border border-red-200 text-red-800 rounded-lg p-6",children:[a.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Error Loading Jobs"}),a.jsx("p",{className:"mb-4",children:L}),a.jsx("button",{onClick:()=>window.location.reload(),className:"bg-red-100 hover:bg-red-200 text-red-800 font-medium py-2 px-4 rounded",children:"Retry"})]})})}):a.jsxs("div",{className:"flex flex-col min-h-screen pb-16 md:pb-0",children:[a.jsxs("div",{className:"flex-grow",children:[a.jsx(LC,{onSearchChange:Wi,title:"Job Listings",description:"",popularTags:["React","Node.js","Remote"],generateHref:A=>`/jobs?q=${A.toLowerCase().replace(/\s+/g,"+")}`}),a.jsxs("div",{className:"container mx-auto py-8 pb-20 md:pb-8",children:[a.jsxs("div",{className:"relative",children:[a.jsxs("div",{className:"relative flex items-center gap-2 sm:my-6 my-2",children:[a.jsx(Aw,{data:y.map(A=>A.title).filter(Boolean),onSelect:A=>{q2(A)},onTyping:A=>{z(A),Wi(A)},placeholder:"Search for jobs, companies, or keywords...",className:"w-full",showSubmitButton:!0}),a.jsx("button",{className:"block md:hidden flex items-center justify-center p-3 bg-white border-2 border-gray-200 text-gray-700 rounded-xl hover:border-gray-300 hover:bg-gray-50 transition-all duration-200 focus:ring-4 focus:ring-gray-200 focus:outline-none hover:scale-105",onClick:N2,children:a.jsx(gt,{size:16,className:"mr-1.5"})})]}),(M.length>0||Object.keys(g).length>0||O!=="all")&&a.jsxs("div",{className:"m-4 flex flex-wrap gap-2",children:[O!=="all"&&a.jsxs("div",{className:"inline-flex items-center bg-indigo-100 text-indigo-800 rounded-full px-3 py-1 text-sm",children:[a.jsxs("span",{className:"font-medium mr-1",children:[l,":"]}),a.jsx("span",{children:O.replace(/_/g," ")}),a.jsx("button",{className:"ml-2 text-indigo-600 hover:text-indigo-800",onClick:()=>ai("all"),"aria-label":`Remove ${l} filter`,children:a.jsx(Xe,{size:14})})]}),M.map(A=>a.jsxs("div",{className:"inline-flex items-center bg-indigo-100 text-indigo-800 rounded-full px-3 py-1 text-sm",children:[a.jsx("span",{children:A}),a.jsx("button",{className:"ml-2 text-indigo-600 hover:text-indigo-800",onClick:()=>jM(A),"aria-label":`Remove search filter ${A}`,children:a.jsx(Xe,{size:14})})]},`search-${A}`)),Object.entries(g).map(([A,H])=>a.jsxs("div",{className:"inline-flex items-center bg-indigo-100 text-indigo-800 rounded-full px-3 py-1 text-sm",children:[a.jsxs("span",{className:"font-medium mr-1",children:[A.replace(/_/g," "),":"]}),a.jsx("span",{children:H}),a.jsx("button",{className:"ml-2 text-indigo-600 hover:text-indigo-800",onClick:()=>Bt(A,""),"aria-label":`Remove ${A} filter`,children:a.jsx(Xe,{size:14})})]},A)),a.jsx("button",{className:"inline-flex items-center bg-gray-100 text-gray-800 hover:bg-gray-200 rounded-full px-3 py-1 text-sm",onClick:Xi,children:"Clear All"}),a.jsx("button",{onClick:Ot,className:"inline-flex items-center bg-indigo-100 text-indigo-800 hover:bg-indigo-200 rounded-full px-3 py-1 text-sm font-medium",children:"🔔 Create Alert"})]})]}),n&&a.jsxs("button",{className:"md:hidden w-full mb-6 px-4 py-3 bg-indigo-600 text-white rounded-lg flex items-center justify-center",onClick:N2,"aria-expanded":R,children:[a.jsx(gt,{className:"w-4 h-4 mr-2"}),R?"Close Filters":"Filters"]}),a.jsxs("div",{className:"flex flex-col lg:flex-row lg:gap-6",children:[a.jsx("div",{className:"hidden lg:block lg:w-1/4 space-y-6",children:a.jsxs("div",{className:"bg-white rounded-lg shadow-sm border border-gray-200 p-5",children:[a.jsx("h2",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Filters"}),a.jsxs("div",{className:"mb-6",children:[a.jsx("h3",{className:"text-sm font-medium text-gray-900 mb-2",children:l}),a.jsx(wC,{activeDateFilter:O,onDateFilterChange:ai,dateFieldLabel:""})]}),r.map(A=>{var H;return a.jsxs("div",{className:"mb-6",children:[a.jsx("h3",{className:"text-sm font-medium text-gray-900 mb-2",children:A.replace(/_/g," ")}),d.includes(A)?a.jsx(bM,{options:w[A]||[],value:g[A]||"",onChange:V=>Bt(A,V),placeholder:`Select ${A.replace(/_/g," ")}`,className:"w-full"}):a.jsxs("select",{className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-indigo-500 focus:border-indigo-500 bg-white",value:g[A]||"",onChange:V=>Bt(A,V.target.value),children:[a.jsxs("option",{value:"",children:["Select ",A.replace(/_/g," ")]}),(H=w[A])==null?void 0:H.map(V=>a.jsx("option",{value:V,children:V},V))]})]},A)}),a.jsx("div",{className:"mt-6",children:a.jsxs("button",{onClick:Ki,className:`w-full px-4 py-2 rounded-lg flex items-center justify-center ${Y?"bg-indigo-100 text-indigo-800":"bg-gray-100 text-gray-800 hover:bg-gray-200"}`,children:[a.jsx(Pt,{size:16,className:"mr-2"}),a.jsxs("span",{children:["Saved Jobs (",G.length,")"]})]})})]})}),Me?a.jsx(bC,{}):a.jsxs("div",{className:"lg:w-2/4 space-y-6",children:[a.jsx("div",{className:"lg:block hidden bg-white rounded-lg shadow-sm border border-gray-200 p-4",children:a.jsxs("div",{className:"flex flex-col sm:flex-row sm:justify-between sm:items-center gap-3",children:[a.jsx("div",{className:"flex justify-between items-center",children:a.jsxs("div",{className:"view-mode-toggle flex bg-gray-100 p-1 rounded-lg",children:[a.jsxs("button",{onClick:ri,className:`px-3 py-1.5 rounded-md flex items-center justify-center transition-colors ${U==="grid"?"bg-indigo-600 text-white shadow-sm":"text-gray-700 hover:bg-gray-200"}`,"aria-label":"Grid view","aria-pressed":U==="grid",children:[a.jsx(tt,{size:16,className:"mr-1.5"}),a.jsx("span",{className:"text-sm font-medium",children:"Grid"})]}),a.jsxs("button",{onClick:ri,className:`px-3 py-1.5 rounded-md flex items-center justify-center transition-colors ${U==="list"?"bg-indigo-600 text-white shadow-sm":"text-gray-700 hover:bg-gray-200"}`,"aria-label":"List view","aria-pressed":U==="list",children:[a.jsx(bi,{size:16,className:"mr-1.5"}),a.jsx("span",{className:"text-sm font-medium",children:"List"})]})]})}),a.jsxs("div",{className:"flex justify-between items-center",children:[a.jsxs("div",{className:"items-per-page flex items-center",children:[a.jsx("label",{htmlFor:"items-per-page",className:"mr-2 text-sm font-medium text-gray-700",children:"Show:"}),a.jsxs("select",{id:"items-per-page",value:F,onChange:A=>Ji(Number(A.target.value)),className:"px-2 py-1.5 border border-gray-300 rounded-md text-sm bg-white",children:[a.jsx("option",{value:5,children:"5"}),a.jsx("option",{value:10,children:"10"}),a.jsx("option",{value:20,children:"20"}),a.jsx("option",{value:50,children:"50"})]})]}),a.jsxs("button",{className:"md:hidden flex items-center px-3 py-1.5 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition-colors",onClick:N2,children:[a.jsx(gt,{size:16,className:"mr-1.5"}),a.jsx("span",{className:"text-sm font-medium",children:"Filters"})]})]})]})}),a.jsxs("div",{className:"",children:[a.jsx("div",{className:"mb-6",children:a.jsxs("div",{className:"flex flex-row items-center justify-between",children:[a.jsxs("h3",{className:"text-xl font-semibold text-gray-900 flex items-center",children:[Y?"Saved Jobs":"Open Positions",O!=="all"&&!Y&&a.jsxs("span",{className:"text-sm font-normal text-gray-500 ml-2",children:["(",O.replace(/_/g," "),")"]})]}),a.jsxs("p",{className:"text-sm text-gray-600",children:[a.jsx("span",{className:"font-semibold text-gray-900",children:u.length})," found"]})]})}),a.jsx(YI,{items:IM,cardType:c,viewMode:U,savedJobs:G,onSaveJob:ii,onViewJob:Yi}),u.length>0&&a.jsx("div",{className:"mt-6",children:a.jsx(qw,{currentPage:x,totalPages:SM,onPageChange:A2})})]}),ye.length>0&&a.jsx("div",{className:"bg-white rounded-lg shadow-sm border border-gray-200 p-5",children:a.jsx(KI,{jobs:ye,onViewJob:Yi})})]}),a.jsx("div",{className:"hidden lg:block lg:w-1/4 space-y-6",children:((Qi=i==null?void 0:i.sidebar)==null?void 0:Qi.enabled)&&a.jsxs("div",{className:"sticky top-4",children:[a.jsx(gM,{position:"sidebar",url:i.sidebar.url,link:i.sidebar.link,alt:i.sidebar.alt}),a.jsx(gC,{api_url:h}),a.jsxs("div",{className:"mt-6 bg-white rounded-lg shadow-sm border border-gray-200 p-5",children:[a.jsx("h3",{className:"font-semibold text-lg mb-3",children:"Featured Employers"}),a.jsx("div",{className:"grid grid-cols-3 gap-2",children:[...Array(6)].map((A,H)=>a.jsx("div",{className:"flex items-center justify-center p-2 bg-gray-50 rounded-md",children:a.jsx("img",{src:`/placeholder.svg?height=40&width=40&text=${String.fromCharCode(65+H)}`,alt:`Featured employer ${H+1}`,className:"w-10 h-10 object-contain"})},H))})]})]})})]})]})]}),a.jsx(QI,{activeDateFilter:O,handleDateFilterChange:ai,filterKeys:r,searchableFilters:d,dateFieldLabel:l,activeFilters:g,handleFilterChange:Bt,toggleSavedJobsFilter:Ki,filtersData:w,savedJobs:G,showOnlySaved:Y,isMobileFilterOpen:R,toggleMobileFilter:N2}),a.jsx(MC,{savedJobsCount:G.length}),a.jsx(fC,{open:ge.open,type:ge.type,message:ge.message,onClose:()=>it(A=>({...A,open:!1}))})]})},aA=()=>a.jsx("div",{children:a.jsx("h2",{children:"Welcome to the Header!"})}),rA=({articles:o})=>{const[e,r]=b.useState(0),[i,n]=b.useState(!0),c=o.filter(l=>l.isBreaking);if(b.useEffect(()=>{if(c.length>1){const l=setInterval(()=>{r(d=>(d+1)%c.length)},5e3);return()=>clearInterval(l)}},[c.length]),!i||c.length===0)return null;const s=c[e];return a.jsx("div",{className:"breaking-news bg-red-600 text-white py-2 px-4 relative",children:a.jsxs("div",{className:"max-w-7xl mx-auto flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center space-x-3 flex-1 min-w-0",children:[a.jsxs("div",{className:"flex items-center space-x-2 flex-shrink-0",children:[a.jsx(St,{className:"w-5 h-5 animate-pulse"}),a.jsx("span",{className:"font-bold text-sm uppercase tracking-wide",children:"Breaking News"})]}),a.jsx("div",{className:"flex-1 min-w-0",children:a.jsx("a",{href:s.link,target:"_blank",rel:"noopener noreferrer",className:"text-sm hover:underline truncate block",children:s.title})})]}),a.jsxs("div",{className:"flex items-center space-x-2 flex-shrink-0",children:[c.length>1&&a.jsx("div",{className:"flex space-x-1",children:c.map((l,d)=>a.jsx("button",{onClick:()=>r(d),className:`w-2 h-2 rounded-full transition-colors ${d===e?"bg-white":"bg-white/50"}`,"aria-label":`Go to breaking news ${d+1}`},d))}),a.jsx("button",{onClick:()=>n(!1),className:"p-1 hover:bg-red-700 rounded transition-colors","aria-label":"Close breaking news",children:a.jsx(Ke,{className:"w-4 h-4"})})]})]})})},iA=({articles:o,onArticleClick:e})=>{const[r,i]=b.useState(0),n=4,c=y=>{const p=new Date(y),k=Math.floor((new Date().getTime()-p.getTime())/(1e3*60*60));return k<1?"Just now":k<24?`${k}h ago`:p.toLocaleDateString("en-US",{month:"short",day:"numeric"})},s=y=>y>=1e3?`${(y/1e3).toFixed(1)}k`:y.toString(),l=()=>{i(y=>y+n>=o.length?0:y+n)},d=()=>{i(y=>y===0?Math.max(0,o.length-n):Math.max(0,y-n))};if(o.length===0)return null;const h=o.slice(r,r+n);return a.jsx("section",{className:"trending-news bg-white border-b border-gray-200 py-4",children:a.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[a.jsxs("div",{className:"flex items-center justify-between mb-4",children:[a.jsxs("div",{className:"flex items-center",children:[a.jsx(G2,{className:"w-5 h-5 text-orange-500 mr-2"}),a.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:"Trending Now"})]}),o.length>n&&a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("button",{onClick:d,className:"p-1 rounded-full hover:bg-gray-100 transition-colors","aria-label":"Previous trending articles",children:a.jsx(v2,{className:"w-4 h-4 text-gray-600"})}),a.jsx("button",{onClick:l,className:"p-1 rounded-full hover:bg-gray-100 transition-colors","aria-label":"Next trending articles",children:a.jsx(zt,{className:"w-4 h-4 text-gray-600"})})]})]}),a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-3",children:h.map((y,p)=>a.jsx("div",{onClick:()=>e(y),className:"group bg-gray-50 rounded-lg p-3 cursor-pointer hover:bg-orange-50 hover:border-orange-200 border border-transparent transition-all duration-200",children:a.jsxs("div",{className:"flex items-start space-x-2",children:[a.jsx("div",{className:"flex-shrink-0",children:a.jsx("span",{className:"inline-flex items-center justify-center w-6 h-6 bg-orange-100 text-orange-600 rounded-full text-xs font-bold group-hover:bg-orange-200",children:r+p+1})}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("h3",{className:"text-sm font-medium text-gray-900 line-clamp-2 mb-1 group-hover:text-orange-700",children:y.title}),a.jsxs("div",{className:"flex items-center text-xs text-gray-500 space-x-2",children:[a.jsxs("div",{className:"flex items-center",children:[a.jsx(dt,{className:"w-3 h-3 mr-1"}),a.jsx("span",{children:c(y.date)})]}),a.jsx("span",{children:"•"}),a.jsxs("div",{className:"flex items-center",children:[a.jsx(F2,{className:"w-3 h-3 mr-1"}),a.jsx("span",{children:s(y.viewCount||0)})]})]})]})]})},y._id))}),o.length>n&&a.jsx("div",{className:"flex justify-center mt-3 md:hidden",children:a.jsx("div",{className:"flex space-x-1",children:Array.from({length:Math.ceil(o.length/n)}).map((y,p)=>a.jsx("button",{onClick:()=>i(p*n),className:`w-2 h-2 rounded-full transition-colors ${Math.floor(r/n)===p?"bg-orange-500":"bg-gray-300"}`,"aria-label":`Go to trending articles page ${p+1}`},p))})})]})})},nA=({article:o,isBookmarked:e,onToggleBookmark:r,onShare:i,layout:n="card"})=>{const[c,s]=b.useState(!1),l=u=>{const k=new Date(u),m=Math.floor((new Date().getTime()-k.getTime())/(1e3*60*60));return m<1?"Just now":m<24?`${m}h ago`:m<48?"Yesterday":k.toLocaleDateString("en-US",{month:"short",day:"numeric"})},d=u=>u>=1e3?`${(u/1e3).toFixed(1)}k`:u.toString(),h=u=>u.length>1?u[1]:u[0],y=(u,k)=>u.length<=k?u:u.substring(0,k).trim()+"...",p=n==="card"?"flex flex-col":"flex flex-col md:flex-row md:items-center";return a.jsxs("article",{className:`
7755
+ transition-colors text-sm font-medium text-center`,onClick:c,children:"Apply Now"})]})]})},EI=({jobs:o,onSaveJob:e,onViewJob:r,isJobSaved:i})=>o.length===0?a.jsxs("div",{className:"no-results",children:[a.jsx("h3",{children:"No jobs found matching your criteria"}),a.jsx("p",{children:"Try adjusting your filters or search term"})]}):a.jsx("div",{className:"jobs-grid",children:o.map(n=>a.jsx(vC,{job:n,onSaveJob:e,onViewJob:r,isSaved:i(n)},n.link))}),UI=({currentPage:o,totalPages:e,setCurrentPage:r})=>{if(e<=1)return null;const i=[];if(e<=5)for(let c=1;c<=e;c++)i.push(c);else if(o<=3)for(let c=1;c<=5;c++)i.push(c);else if(o>=e-2)for(let c=e-4;c<=e;c++)i.push(c);else for(let c=o-2;c<=o+2;c++)i.push(c);return a.jsxs("div",{className:"pagination",children:[a.jsx("button",{className:"pagination-button prev-button",disabled:o===1,onClick:()=>r(o-1),children:"Previous"}),i.map(c=>a.jsx("button",{className:`pagination-button ${o===c?"active":""}`,onClick:()=>r(c),children:c},c)),a.jsx("button",{className:"pagination-button next-button",disabled:o===e,onClick:()=>r(o+1),children:"Next"})]})},GI=({isOpen:o,onClose:e,filterKeys:r,filtersData:i,activeFilters:n,handleFilterChange:c,handleSearchChange:s,searchTerm:l,clearAllFilters:d,searchFilters:h,removeSearchFilter:y})=>a.jsx("div",{className:`fixed inset-0 bg-gray-600 bg-opacity-50 overflow-y-auto h-full w-full transition-opacity ${o?"opacity-100":"opacity-0 pointer-events-none"}`,children:a.jsx("div",{className:`fixed right-0 top-0 w-4/5 max-w-sm bg-white h-full shadow-xl transition-transform duration-300 ease-in-out ${o?"transform translate-x-0":"transform translate-x-full"}`,children:a.jsxs("div",{className:"p-4",children:[a.jsxs("div",{className:"flex justify-between items-center mb-4",children:[a.jsx("h2",{className:"text-lg font-semibold",children:"Filters"}),a.jsx("button",{onClick:e,className:"text-gray-500 hover:text-gray-700",children:a.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),a.jsx("div",{className:"mb-4",children:a.jsx("input",{type:"text",className:"w-full p-2 border border-gray-300 rounded-md",placeholder:"Search jobs...",value:l,onChange:p=>s(p.target.value)})}),r.map(p=>{var u;return a.jsxs("div",{className:"mb-4",children:[a.jsx("label",{htmlFor:`mobile-${p}`,className:"block text-sm font-medium text-gray-700 mb-1",children:p.replace(/_/g," ")}),a.jsxs("select",{id:`mobile-${p}`,className:"w-full p-2 border border-gray-300 rounded-md",onChange:k=>c(p,k.target.value),value:n[p]||"",children:[a.jsxs("option",{value:"",children:["Select ",p.replace(/_/g," ")]}),(u=i[p])==null?void 0:u.map(k=>a.jsx("option",{value:k,children:k},k))]})]},p)}),Object.keys(n).length>0&&a.jsxs("div",{className:"mt-4",children:[a.jsx("h3",{className:"text-sm font-semibold mb-2",children:"Active Filters:"}),Object.entries(n).map(([p,u])=>a.jsxs("div",{className:"inline-flex items-center bg-blue-100 text-blue-800 rounded-full px-3 py-1 text-sm mr-2 mb-2",children:[a.jsxs("span",{children:[p.replace(/_/g," "),": ",u]}),a.jsx("button",{className:"ml-2 text-blue-600 hover:text-blue-800",onClick:()=>c(p,""),children:"×"})]},p)),a.jsx("button",{className:"mt-2 w-full bg-red-100 text-red-800 rounded-md px-3 py-2 text-sm font-medium",onClick:d,children:"Clear All Filters"})]})]})})}),ZI=({apiUrl:o,itemsPerPage:e,filterKeys:r,enableSearch:i,enablePagination:n,enableMobileFilter:c,banners:s})=>{const[l,d]=b.useState([]),[h,y]=b.useState([]),[p,u]=b.useState(1),[k,x]=b.useState({}),[m,g]=b.useState([]),[v,M]=b.useState({}),[S,w]=b.useState(""),[j,_]=b.useState([]),[z,N]=b.useState(!1);b.useEffect(()=>{fetch(`${o}/items`).then(I=>I.json()).then(I=>{d(I),y(I);const L=C(I);M(L)}).catch(I=>console.error("Error fetching items:",I))},[o]);const C=I=>{const L={};I.forEach(O=>{r.forEach(re=>{L[re]||(L[re]=new Set);const pe=O[re];pe!=null&&L[re].add(String(pe))})});const q={};return Object.keys(L).forEach(O=>{q[O]=Array.from(L[O])}),q},R=I=>{const L=C(I);M(L)},E=(I,L)=>{x(q=>{const O=L?{...q,[I]:L}:{...q};L||delete O[I];const re=$(l,O,m);return y(re),u(1),R(re),O})},F=I=>{if(w(I),I){const L=l.map(q=>q.title).filter((q,O,re)=>q&&q.toLowerCase().includes(I.toLowerCase())&&re.indexOf(q)===O).slice(0,5);_(L)}else _([])},B=I=>{if(I.key==="Enter"&&S.trim()){I.preventDefault();const L=[...m,S.trim()];g(L);const q=$(l,k,L);y(q),u(1),R(q),w("")}},U=I=>{const L=m.filter(O=>O!==I);g(L);const q=$(l,k,L);y(q),u(1),R(q)},$=(I,L,q)=>{let O=I.filter(re=>Object.entries(L).every(([pe,Ze])=>{const ge=re[pe];return typeof ge=="string"&&ge.toLowerCase()===Ze.toLowerCase()}));return q.length>0&&(O=O.filter(re=>q.every(pe=>re.title.toLowerCase().includes(pe.toLowerCase())))),O},G=()=>{x({}),g([]),y(l),u(1),R(l)},te=()=>{N(!z)},Y=I=>{},se=I=>{},ye=I=>!1,ne=Math.ceil(h.length/e),Me=h.slice((p-1)*e,p*e);return a.jsxs("div",{className:"flex flex-col min-h-screen",children:[a.jsx("div",{className:"flex-grow",children:a.jsxs("div",{className:"job-listings-container",children:[a.jsx("div",{className:"header-container",children:a.jsxs("div",{className:"header-content",children:[a.jsx("h1",{className:"main-title",children:"Job Listings"}),a.jsxs("p",{className:"items-count",children:["Total: ",a.jsx("span",{className:"count-value",children:h.length})]})]})}),a.jsx("button",{className:"md:hidden w-full mb-4 px-4 py-2 bg-blue-600 text-white rounded-md",onClick:te,children:z?"Close Filters":"Open Filters"}),a.jsxs("div",{className:"hidden md:block filters-container",children:[a.jsx(OI,{searchTerm:S,handleSearchChange:F,handleSearchKeyDown:B,suggestions:j}),a.jsx(BI,{filterKeys:r,filtersData:v,activeFilters:k,handleFilterChange:E,searchFilters:m,removeSearchFilter:U,clearAllFilters:G,searchableFilters:["company"]})]}),a.jsx(GI,{isOpen:z,onClose:te,filterKeys:r,filtersData:v,activeFilters:k,handleFilterChange:E,handleSearchChange:F,searchTerm:S,clearAllFilters:G,handleSearchKeyDown:B,searchFilters:m,removeSearchFilter:U}),a.jsxs("div",{className:"flex flex-col md:flex-row",children:[a.jsxs("div",{className:"w-full md:w-3/4 md:pr-4",children:[a.jsx("h2",{className:"section-title",children:"Open Positions"}),a.jsx(EI,{jobs:Me,onSaveJob:Y,onViewJob:se,isJobSaved:ye}),a.jsx(UI,{currentPage:p,totalPages:ne,setCurrentPage:u})]}),a.jsx("div",{className:"w-full md:w-1/4 mt-4 md:mt-0",children:a.jsx("div",{className:"sticky top-4",children:s.sidebar.enabled&&s.sidebar.url&&a.jsx(gM,{position:"sidebar",url:s.sidebar.url,link:s.sidebar.link,alt:s.sidebar.alt})})})]})]})}),s.bottom.enabled&&s.bottom.url&&a.jsx(gM,{position:"top",url:s.bottom.url,link:s.bottom.link,alt:s.bottom.alt})]})},WI=({title:o="Subscribe to our newsletter",description:e="The latest job opportunities and career tips, weekly in your inbox.",links:r=[]})=>a.jsx("footer",{className:"bg-gray-800 text-white",children:a.jsxs("div",{className:"max-w-7xl mx-auto py-12 px-4 sm:px-6 lg:py-16 lg:px-8",children:[a.jsxs("div",{className:"xl:grid xl:grid-cols-3 xl:gap-8",children:[a.jsx("div",{className:"grid grid-cols-2 gap-8 xl:col-span-2",children:a.jsx("div",{className:"md:grid md:grid-cols-2 md:gap-8",children:Array.isArray(r)&&r.map((i,n)=>{var c;return Array.isArray(i)&&i.length>0?a.jsxs("div",{className:"mt-12 md:mt-0",children:[a.jsx("h3",{className:"text-sm font-semibold text-gray-400 tracking-wider uppercase",children:((c=i[0])==null?void 0:c.text)||"Section"}),a.jsx("ul",{className:"mt-4 space-y-4",children:i.map((s,l)=>a.jsx("li",{children:a.jsx("a",{href:s.url,className:"hover:text-gray-300",children:s.text})},l))})]},n):null})})}),a.jsxs("div",{className:"mt-8 xl:mt-0",children:[a.jsx("h3",{className:"text-sm font-semibold text-gray-400 tracking-wider uppercase",children:o}),a.jsx("p",{className:"mt-4 text-base text-gray-300",children:e}),a.jsxs("form",{className:"mt-4 sm:flex sm:max-w-md",children:[a.jsx("label",{htmlFor:"email-address",className:"sr-only",children:"Email address"}),a.jsx("input",{type:"email",name:"email-address",id:"email-address",autoComplete:"email",required:!0,className:"appearance-none min-w-0 w-full bg-white border border-transparent rounded-md py-2 px-4 text-base text-gray-900 placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-800 focus:ring-white focus:border-white focus:placeholder-gray-400",placeholder:"Enter your email"}),a.jsx("div",{className:"mt-3 rounded-md sm:mt-0 sm:ml-3 sm:flex-shrink-0",children:a.jsx("button",{type:"submit",className:"w-full bg-blue-600 border border-transparent rounded-md py-2 px-4 flex items-center justify-center text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-800 focus:ring-blue-500",children:"Subscribe"})})]})]})]}),a.jsx("div",{className:"mt-8 border-t border-gray-700 pt-8",children:a.jsxs("p",{className:"text-base text-gray-400 xl:text-center",children:["© ",new Date().getFullYear()," JobBoard, Inc. All rights reserved."]})})]})}),$I=({logo:o="",links:e=[],buttonText:r="Post a Job",buttonUrl:i="/post-job"})=>a.jsx("nav",{className:"bg-white shadow-md",children:a.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:a.jsxs("div",{className:"flex justify-between h-16",children:[a.jsxs("div",{className:"flex",children:[a.jsx("div",{className:"flex-shrink-0 flex items-center",children:a.jsx("a",{href:"/",className:"text-xl font-bold text-blue-600",children:o?a.jsx("img",{src:o,alt:"Logo",className:"h-6 w-6"}):a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:"mercado-match h-6 w-6",focusable:"false",children:a.jsx("path",{d:"M20.5 2h-17A1.5 1.5 0 002 3.5v17A1.5 1.5 0 003.5 22h17a1.5 1.5 0 001.5-1.5v-17A1.5 1.5 0 0020.5 2zM8 19H5v-9h3zM6.5 8.25A1.75 1.75 0 118.3 6.5a1.78 1.78 0 01-1.8 1.75zM19 19h-3v-4.74c0-1.42-.6-1.93-1.38-1.93A1.74 1.74 0 0013 14.19a.66.66 0 000 .14V19h-3v-9h2.9v1.3a3.11 3.11 0 012.7-1.4c1.55 0 3.36.86 3.36 3.66z"})})})}),a.jsx("div",{className:"hidden sm:ml-6 sm:flex sm:space-x-8",children:e.map((n,c)=>a.jsx("a",{href:n.url,className:"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium",children:n.text},c))})]}),a.jsx("div",{className:"hidden sm:ml-6 sm:flex sm:items-center",children:a.jsx("a",{href:i,className:"inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500",children:r})})]})})}),MC=({savedJobsCount:o})=>{const[e,r]=b.useState("");b.useEffect(()=>{typeof window<"u"&&r(window.location.pathname)},[]);const i=n=>e===n;return a.jsx("nav",{className:"fixed bottom-0 left-0 right-0 bg-white dark:bg-gray-800 border-t border-gray-200 dark:border-gray-700 md:hidden z-50",children:a.jsxs("div",{className:"grid grid-cols-5 h-16",children:[a.jsxs("a",{href:"/","aria-label":"Home",className:`flex flex-col items-center justify-center ${i("/")?"text-gray-900 font-semibold dark:text-white":"text-gray-500 dark:text-gray-500"} hover:text-primary-500`,children:[a.jsx(At,{className:"w-6 h-6"}),a.jsx("span",{className:"text-xs mt-1",children:"Home"})]}),a.jsxs("a",{href:"/jobs","aria-label":"Jobs",className:`flex flex-col items-center justify-center ${i("/jobs")?"text-gray-900 font-semibold dark:text-white":"text-gray-500 dark:text-gray-500"} hover:text-primary-500`,children:[a.jsx(g2,{className:"w-6 h-6"}),a.jsx("span",{className:"text-xs mt-1",children:"Jobs"})]}),a.jsxs("a",{href:"/saved","aria-label":"Saved Jobs",className:`flex flex-col items-center justify-center relative ${i("/saved")?"text-gray-900 font-semibold dark:text-white":"text-gray-500 dark:text-gray-500"} hover:text-primary-500`,children:[a.jsx(pi,{className:"w-6 h-6"}),a.jsx("span",{className:"text-xs mt-1",children:"Saved"}),o>0&&a.jsx("span",{className:"absolute -top-1 -right-1 bg-primary-500 text-white rounded-full w-5 h-5 flex items-center justify-center text-xs",children:o})]}),a.jsxs("a",{href:"/courses","aria-label":"Courses",className:`flex flex-col items-center justify-center ${i("/courses")?"text-gray-900 font-semibold dark:text-white":"text-gray-500 dark:text-gray-500"} hover:text-primary-500`,children:[a.jsx(x2,{className:"w-6 h-6"}),a.jsx("span",{className:"text-xs mt-1",children:"Courses"})]}),a.jsxs("a",{href:"/news","aria-label":"News",className:`flex flex-col items-center justify-center ${i("/news")?"text-gray-900 font-semibold dark:text-white":"text-gray-500 dark:text-gray-500"} hover:text-primary-500`,children:[a.jsx(O2,{className:"w-6 h-6"}),a.jsx("span",{className:"text-xs mt-1",children:"News"})]})]})})},XI=o=>{const e=["Acme Inc","TechCorp","Global Solutions","Innovate Labs","Future Tech"],r=["Engineering","Marketing","Sales","Design","Product","HR"],i=["New York, NY","San Francisco, CA","Austin, TX","Seattle, WA","Remote"],n=["New York","San Francisco","Austin","Seattle","Chicago"],c=["USA","Canada","UK","Germany","Australia"],s=["Startup","Enterprise","Agency","Nonprofit","Government"],l=d=>{const h=new Date;return h.setDate(h.getDate()-Math.floor(Math.random()*d)),h.toISOString()};return Array.from({length:o},(d,h)=>{const y=l(120);return{id:`job-${h}`,title:`${r[h%r.length]} ${h%3===0?"Senior":h%3===1?"Mid-level":"Junior"} Position`,company:e[h%e.length],department:r[h%r.length],location:i[h%i.length],city:n[h%n.length],country:c[h%c.length],company_type:s[h%s.length],link:"#job-link",logo:`/placeholder.svg?height=50&width=50&text=${e[h%e.length].charAt(0)}`,overview:"This is a mock job description for preview purposes. The actual job details would appear here with information about responsibilities, requirements, and company culture.",slug:`job-${h}`,scraped_at:new Date().toISOString(),published_at:y,created_at:y,sponsored:h%7===0}})},JI=({title:o,description:e,ctaText:r,ctaLink:i,bgColor:n="bg-blue-50",textColor:c="text-blue-800"})=>a.jsx("div",{className:`promo-card ${n} p-4 rounded-lg shadow-sm hidden md:block`,children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("h3",{className:`font-bold text-lg ${c}`,children:o}),a.jsx("p",{className:`text-sm mt-1 ${c} opacity-90`,children:e})]}),a.jsx("a",{href:i,className:"bg-white text-blue-600 hover:bg-blue-50 px-4 py-2 rounded-md text-sm font-medium shadow-sm transition-colors",children:r})]})}),YI=({items:o,cardType:e,viewMode:r,savedJobs:i,onSaveJob:n,onViewJob:c})=>{const[s,l]=b.useState([]),[d,h]=b.useState(null);b.useEffect(()=>{try{if(!Array.isArray(o)){console.error("❌ Items is not an array:",o),h("Invalid data format received"),l([]);return}const p=[...o];o.length>5&&p.splice(5,0,{id:"promo-1",title:"Promo",isPromo:!0}),l(p),h(null)}catch(p){console.error("Error processing items:",p),h(`Error processing items: ${p instanceof Error?p.message:String(p)}`),l([])}},[o]);const y=(p,u)=>{try{if(p.isPromo)return a.jsx("div",{className:"col-span-full my-4",children:a.jsx(JI,{title:"Upgrade Your Job Search",description:"Get personalized job recommendations and stand out to employers.",ctaText:"Learn More",ctaLink:"#premium-features",bgColor:"bg-blue-50",textColor:"text-blue-800"})},`promo-${u}`);if(!p||typeof p!="object")return console.error("❌ Invalid item detected:",p),a.jsxs("div",{className:"error-card bg-red-50 p-4 rounded-md border border-red-200",children:[a.jsx("p",{className:"text-red-800 font-medium",children:"Invalid Job Data"}),a.jsx("p",{className:"text-red-600 text-sm",children:"The job data is in an unexpected format."})]});const k=p.id?`${p._id}-${u}`:p.slug?`${p.slug}-${u}`:`item-${u}`;switch(e){case"job":return a.jsx(vC,{job:p,onSaveJob:n,onViewJob:c,isSaved:i.includes(p.id||p.slug||p.link)},k);default:return console.warn(`⚠️ Unknown cardType: ${e}`),a.jsxs("div",{className:"error-card bg-yellow-50 p-4 rounded-md border border-yellow-200",children:[a.jsx("p",{className:"text-yellow-800 font-medium",children:"Unknown Card Type"}),a.jsx("p",{className:"text-yellow-700 text-sm",children:"The specified card type is not supported."})]})}}catch(k){return console.error("Error rendering card:",k),a.jsxs("div",{className:"error-card bg-red-50 p-4 rounded-md border border-red-200",children:[a.jsx("p",{className:"text-red-800 font-medium",children:"Error Rendering Card"}),a.jsx("p",{className:"text-red-600 text-sm",children:k instanceof Error?k.message:String(k)})]})}};return d?a.jsxs("div",{className:"bg-red-50 border border-red-200 text-red-800 rounded-lg p-6",children:[a.jsx("h3",{className:"font-semibold mb-2",children:"Error Loading Items"}),a.jsx("p",{children:d})]}):s.length===0?a.jsxs("div",{className:"no-results",children:[a.jsx("h3",{children:"No items found matching your criteria"}),a.jsx("p",{children:"Try adjusting your filters or search term"})]}):a.jsx("div",{className:r==="grid"?"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4":"flex flex-col gap-4","data-view-mode":r,children:s.map((p,u)=>y(p,u))})},KI=({jobs:o,onViewJob:e})=>!o||o.length===0?null:a.jsxs("div",{className:"last-visited-jobs mt-8 bg-white rounded-lg shadow p-4",children:[a.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Recently Viewed Jobs"}),a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:o.map(r=>a.jsxs("div",{className:"p-3 border rounded-md hover:shadow-md transition-shadow cursor-pointer",onClick:()=>e(r),children:[a.jsxs("div",{className:"flex items-center mb-2",children:[a.jsx("img",{src:r.logo||"/placeholder.svg?height=30&width=30",alt:`${r.company} logo`,className:"w-6 h-6 mr-2"}),a.jsx("h3",{className:"font-medium text-sm truncate",children:r.title})]}),a.jsx("p",{className:"text-xs text-gray-600 truncate",children:r.company}),a.jsx("p",{className:"text-xs text-gray-500 truncate",children:r.location})]},r._id||r.slug||r.link))})]}),wC=({activeDateFilter:o,onDateFilterChange:e,dateFieldLabel:r="Published",options:i=[{value:"all",label:"All Time"},{value:"today",label:"Today"},{value:"this_week",label:"This Week"},{value:"this_month",label:"This Month"},{value:"last_30_days",label:"Last 30 Days"},{value:"last_90_days",label:"Last 90 Days"}]})=>a.jsxs("div",{className:"date-filter",children:[r&&a.jsxs("label",{htmlFor:"date-filter",className:"text-sm font-medium text-gray-700 mr-2",children:[r,":"]}),a.jsx("select",{id:"date-filter",value:o,onChange:n=>e(n.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-indigo-500 focus:border-indigo-500 bg-white",children:i.map(n=>a.jsx("option",{value:n.value,children:n.label},n.value))})]}),QI=({activeDateFilter:o,handleDateFilterChange:e,filterKeys:r,searchableFilters:i,dateFieldLabel:n,activeFilters:c,handleFilterChange:s,toggleSavedJobsFilter:l,filtersData:d,savedJobs:h,showOnlySaved:y,isMobileFilterOpen:p,toggleMobileFilter:u,dateOptions:k=[{value:"all",label:"All Time"},{value:"today",label:"Today"},{value:"this_week",label:"This Week"},{value:"this_month",label:"This Month"},{value:"last_30_days",label:"Last 30 Days"},{value:"last_90_days",label:"Last 90 Days"}]})=>a.jsx("div",{children:a.jsxs("div",{className:p?"block":"hidden",children:[a.jsx("div",{className:"fixed inset-0 bg-gray-600 bg-opacity-75 z-40",onClick:()=>u(!p)}),a.jsxs("div",{className:"fixed inset-y-0 right-0 max-w-xs w-full bg-white shadow-xl z-50 overflow-y-auto",children:[a.jsxs("div",{className:"p-4 border-b border-gray-200 flex items-center justify-between",children:[a.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:"Filters"}),a.jsx("button",{onClick:()=>u(!p),className:"p-2 rounded-full hover:bg-gray-100","aria-label":"Close filters",children:a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6 text-gray-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),a.jsxs("div",{className:"p-4",children:[a.jsxs("div",{className:"mb-6",children:[a.jsx("h3",{className:"text-sm font-medium text-gray-900 mb-2",children:n}),a.jsx(wC,{activeDateFilter:o,onDateFilterChange:e,dateFieldLabel:"",options:k})]}),r.map(x=>{var m;return a.jsxs("div",{className:"mb-6",children:[a.jsx("h3",{className:"text-sm font-medium text-gray-900 mb-2",children:x.replace(/_/g," ")}),i.includes(x)?a.jsx(bM,{options:d[x]||[],value:c[x]||"",onChange:g=>s(x,g),placeholder:`Select ${x.replace(/_/g," ")}`,className:"w-full"}):a.jsxs("select",{className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-indigo-500 focus:border-indigo-500 bg-white",value:c[x]||"",onChange:g=>s(x,g.target.value),children:[a.jsxs("option",{value:"",children:["Select ",x.replace(/_/g," ")]}),(m=d[x])==null?void 0:m.map(g=>a.jsx("option",{value:g,children:g},g))]})]},x)}),a.jsx("div",{className:"mt-6",children:a.jsxs("button",{onClick:l,className:`w-full px-4 py-2 rounded-lg flex items-center justify-center ${y?"bg-indigo-100 text-indigo-800":"bg-gray-100 text-gray-800 hover:bg-gray-200"}`,children:[a.jsx(Pt,{size:16,className:"mr-2"}),a.jsxs("span",{children:["Saved Jobs (",h.length,")"]})]})}),a.jsx("div",{className:"mt-6 pt-6 border-t border-gray-200",children:a.jsx("button",{onClick:()=>u(!p),className:"w-full py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition-colors",children:"Apply Filters"})})]})]})]})}),bC=({totalColumns:o=2})=>a.jsx("div",{className:"flex-grow p-8",children:a.jsx("div",{className:"max-w-7xl mx-auto",children:a.jsxs("div",{className:"animate-pulse",children:[a.jsx("div",{className:"h-8 bg-gray-200 rounded w-1/4 mb-6"}),a.jsx("div",{className:`grid grid-cols-1 md:grid-cols-${o} gap-6`,children:[...Array(4)].map((e,r)=>a.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-6",children:[a.jsx("div",{className:"h-6 bg-gray-200 rounded w-3/4 mb-4"}),a.jsx("div",{className:"h-4 bg-gray-200 rounded w-1/2 mb-2"}),a.jsx("div",{className:"h-4 bg-gray-200 rounded w-1/3 mb-4"}),a.jsx("div",{className:"h-20 bg-gray-200 rounded mb-4"}),a.jsx("div",{className:"h-8 bg-gray-200 rounded w-full"})]},r))})]})})}),Aw=({data:o,onSelect:e,placeholder:r="Search...",debounceMs:i=250,onTyping:n,className:c="",showSubmitButton:s=!1})=>{const[l,d]=b.useState(""),[h,y]=b.useState([]),[p,u]=b.useState(!1),k=b.useRef(null),x=v=>{d(v),u(!0),n&&n(v)},m=()=>{d(""),y([]),u(!1),n==null||n("")},g=v=>{e(v),d(""),y([]),u(!1)};return b.useEffect(()=>{k.current&&clearTimeout(k.current),k.current=setTimeout(()=>{if(!l){y([]);return}const v=o.filter(M=>M.toLowerCase().includes(l.toLowerCase())).filter((M,S,w)=>w.indexOf(M)===S).slice(0,5);y(v)},i)},[l,o]),a.jsxs("div",{className:`relative w-full ${c}`,children:[a.jsxs("div",{className:"relative",children:[a.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:a.jsx(rt,{className:"h-4 w-4 text-gray-400"})}),a.jsx("input",{type:"text",className:"w-full py-2 pl-9 pr-12 border border-gray-300 rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500",placeholder:r,value:l,onChange:v=>x(v.target.value),onFocus:()=>u(h.length>0),onBlur:()=>setTimeout(()=>u(!1),200),onKeyDown:v=>{v.key==="Enter"&&l.trim()&&(v.preventDefault(),g(l.trim()))}}),l&&!s&&a.jsx("button",{onClick:m,className:"absolute inset-y-0 right-2 flex items-center",children:a.jsx(Ke,{className:"h-4 w-4 text-gray-400 hover:text-gray-600"})}),s&&a.jsx("button",{onClick:()=>l.trim()&&g(l.trim()),className:"absolute right-2 top-1/2 -translate-y-1/2 bg-indigo-500 text-white py-1.5 px-2 rounded-md hover:bg-indigo-600",children:a.jsx(rt,{className:"h-4 w-4"})})]}),p&&h.length>0&&a.jsx("ul",{className:"absolute z-10 mt-1 w-full bg-white border border-gray-200 rounded-lg shadow-md",children:h.map((v,M)=>a.jsx("li",{children:a.jsx("button",{className:"w-full px-4 py-2 text-left text-sm text-gray-700 hover:bg-gray-100",onClick:()=>g(v),children:a.jsxs("div",{className:"flex items-center",children:[a.jsx(rt,{className:"h-4 w-4 mr-2 text-gray-400"}),v]})})},M))})]})},qw=({currentPage:o,totalPages:e,onPageChange:r})=>{if(e<=1)return null;const i=5,n=Math.max(1,o-Math.floor(i/2)),c=Math.min(e,n+i-1),s=[];for(let l=n;l<=c;l++)s.push(l);return a.jsx("div",{className:"mt-6 flex justify-center",children:a.jsxs("nav",{className:"flex items-center space-x-2",children:[a.jsx("button",{onClick:()=>r(Math.max(1,o-1)),disabled:o===1,className:"px-3 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),s.map(l=>a.jsx("button",{onClick:()=>r(l),className:`px-3 py-2 text-sm font-medium rounded-md ${o===l?"bg-indigo-600 text-white":"text-gray-700 bg-white border border-gray-300 hover:bg-gray-50"}`,children:l},l)),a.jsx("button",{onClick:()=>r(Math.min(e,o+1)),disabled:o===e,className:"px-3 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})})},LC=({onSearchChange:o,title:e="Gaming News",description:r="Latest news and insights from the gaming industry",popularTags:i=["AI Gaming","Esports","VR/AR","Mobile Gaming","Regulation","Market Analysis"],generateHref:n=c=>`?q=${encodeURIComponent(c)}`})=>(b.useState(""),a.jsxs(a.Fragment,{children:[a.jsx("header",{className:"bg-white shadow-sm border-b border-gray-200",children:a.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4",children:a.jsx("div",{className:"flex items-center justify-between",children:a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:e}),a.jsx("p",{className:"hidden lg:block text-gray-600",children:r})]})})})}),a.jsx("div",{className:"bg-gray-50 border-t border-gray-200",children:a.jsx("div",{className:"overflow-x-auto",children:a.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:a.jsxs("div",{className:"flex items-center space-x-6 py-2 text-sm",children:[a.jsx("span",{className:"text-gray-600 font-medium flex-shrink-0",children:"Popular:"}),i.map(c=>a.jsxs("a",{href:n(c),className:"text-blue-600 hover:text-blue-800 transition-colors flex-shrink-0 whitespace-nowrap",children:["#",c]},c))]})})})})]})),eA=6,tA=({apiUrl:o,itemsPerPage:e=12,filterKeys:r,banner:i,enableMobileFilter:n=!0,cardType:c,dateField:s="created_at",dateFieldLabel:l="Published",searchableFilters:d=["companies"],notification_url:h="http://localhost:5147"})=>{var Qi;const[y,p]=b.useState([]),[u,k]=b.useState([]),[x,m]=b.useState(1),[g,v]=b.useState({}),[M,S]=b.useState([]),[w,j]=b.useState({}),[_,z]=b.useState(""),[N,C]=b.useState([]),[R,E]=b.useState(!1),[F,B]=b.useState(e),[U,$]=b.useState("grid"),[G,te]=b.useState([]),[Y,se]=b.useState(!1),[ye,ne]=b.useState([]),[Me,I]=b.useState(!0),[L,q]=b.useState(null),[O,re]=b.useState("all"),[pe,Ze]=b.useState({jobTypes:[],experienceLevels:[],country:"",minSalary:"",maxSalary:"",city:""}),[ge,it]=b.useState({open:!1,type:"info",message:""}),Mt=(A,H)=>{it({open:!0,type:A,message:H})};b.useEffect(()=>{try{const A=localStorage.getItem("savedJobs");A&&te(JSON.parse(A));const H=localStorage.getItem("lastVisitedJobs");H&&ne(JSON.parse(H))}catch(A){console.error("Error loading data from localStorage:",A)}},[]),b.useEffect(()=>{const H=new URLSearchParams(window.location.search).get("date_filter");if(H&&H!=="all"){re(H);const V=pt(y,g,M,H);k(V),m(1),Re(V)}},[y]),b.useEffect(()=>{if(!o){q("❌ Missing API URL for Listing component!"),I(!1);return}I(!0),q(null),(async()=>{try{const H=await fetch(o);if(!H.ok)throw new Error(`API responded with status: ${H.status}`);const V=await H.json();if(!Array.isArray(V))throw new Error("Expected an array but received: "+typeof V);const J=V.map((K,Le)=>({...K,sponsored:Le%7===0}));p(J),k(J);const Z=wt(J);j(Z)}catch(H){console.error("Error fetching data:",H),q(`Failed to load data: ${H instanceof Error?H.message:String(H)}`);const V=XI(20);p(V),k(V);const J=wt(V);j(J)}finally{I(!1)}})()},[o]),b.useEffect(()=>{const A=new URLSearchParams(window.location.search),H={};r.forEach(Z=>{const K=A.get(Z);K&&(H[Z]=K)}),v(H);const V=A.get("q")||A.get("searchTerm")||"";V&&(z(V),q2(V));const J={};r.forEach(Z=>{const K=A.get(Z);K&&(J[Z]=K)}),v(J)},[]);const LM=(A,H)=>{if(console.log("Applying date filter from URL:",A,H),H==="all")return A;const V=new Date,J=new Date(V.getFullYear(),V.getMonth(),V.getDate());return A.filter(Z=>{const K=Z[s]||Z.created_at||Z.published_at||Z.scraped_at;if(!K)return!1;const Le=new Date(K);switch(H){case"today":return Le>=J;case"this_week":{const me=new Date(V);return me.setDate(V.getDate()-V.getDay()),me.setHours(0,0,0,0),Le>=me}case"this_month":{const me=new Date(V.getFullYear(),V.getMonth(),1);return Le>=me}case"last_30_days":{const me=new Date(V);return me.setDate(V.getDate()-30),Le>=me}case"last_90_days":{const me=new Date(V);return me.setDate(V.getDate()-90),Le>=me}default:return!0}})},CM=(A,H)=>A.filter(V=>{var J,Z,K,Le,me;if(H.jobTypes.length>0){const Se=((J=V.department)==null?void 0:J.toLowerCase())||"";if(!H.jobTypes.some(bt=>Se.includes(bt)))return!1}if(H.experienceLevels.length>0){const Se=((Z=V.title)==null?void 0:Z.toLowerCase())||"";if(!H.experienceLevels.some(bt=>!!(bt==="senior"&&Se.includes("senior")||bt==="mid"&&(Se.includes("mid")||Se.includes("mid-level"))||bt==="entry"&&(Se.includes("junior")||Se.includes("entry")))))return!1}return!(H.country&&!(((K=V.location)==null?void 0:K.toLowerCase())||((Le=V.city)==null?void 0:Le.toLowerCase())||"").includes(H.country.toLowerCase())||H.city&&!(((me=V.company_type)==null?void 0:me.toLowerCase())||"").includes(H.city.toLowerCase()))});b.useEffect(()=>{if(Y){const A=y.filter(H=>G.includes(H.id||H.slug||H.link));k(A),m(1)}else{let A=y;A=pt(A,g,M,O),A=CM(A,pe),k(A)}},[Y,G,y,g,M,O,pe]);const wt=A=>{const H={};A.forEach(J=>{r.forEach(Z=>{H[Z]||(H[Z]=new Set);const K=J[Z];typeof K=="string"&&K.trim()!==""&&H[Z].add(K)})});const V={};return Object.keys(H).forEach(J=>{V[J]=Array.from(H[J])}),V},Re=A=>{const H=wt(A);j(H)},Bt=(A,H)=>{console.log("Filter changed:",A,H),v(V=>{const J={...V};H?J[A]=H:delete J[A],Y&&se(!1);const Z=pt(y,J,M,O);return k(Z),m(1),Re(Z),J})},Zi=b.useRef(null),A2=A=>{m(A),setTimeout(()=>{var H;(H=Zi.current)==null||H.scrollIntoView({behavior:"smooth",block:"start"})},100)},ai=A=>{re(A),Y&&se(!1);const H=pt(y,g,M,A);k(H),m(1),Re(H);const V=new URLSearchParams(window.location.search);A==="all"?V.delete("date_filter"):V.set("date_filter",A);const J=`${window.location.pathname}?${V.toString()}`;window.history.replaceState({},"",J)},Wi=A=>{if(z(A),A){const H=y.map(V=>V.title).filter((V,J,Z)=>V&&V.toLowerCase().includes(A.toLowerCase())&&Z.indexOf(V)===J).slice(0,5);C(H)}else C([])},q2=A=>{if(!A.trim())return;Y&&se(!1);const H=[...M,A.trim()];S(H);const V=pt(y,g,H,O);k(V),m(1),Re(V),z("")},jM=A=>{const H=M.filter(J=>J!==A);S(H);const V=pt(y,g,H,O);k(V),m(1),Re(V)},pt=(A,H,V,J)=>{let Z=A.filter(K=>Object.entries(H).every(([Le,me])=>{const Se=K[Le];return typeof Se=="string"&&Se.toLowerCase()===me.toLowerCase()}));return V.length>0&&(Z=Z.filter(K=>V.every(Le=>{var me,Se;return((me=K.title)==null?void 0:me.toLowerCase().includes(Le.toLowerCase()))||((Se=K.overview)==null?void 0:Se.toLowerCase().includes(Le.toLowerCase()))}))),Z=LM(Z,J),Z},$i=()=>{Ze({jobTypes:[],experienceLevels:[],country:"",minSalary:"",maxSalary:"",city:""});const A=pt(y,g,M,O);k(A),m(1),Re(A)},Xi=()=>{v({}),S([]),se(!1),re("all"),$i(),k(y),m(1),Re(y)},Ot=async()=>{const A=localStorage.getItem("email"),H=localStorage.getItem("leadId");if(!A||!H){Mt("info","Please subscribe first to create alerts.");return}const V={jobTitle:g.title||"",location:g.city||"",techStack:g.company||""};try{await fetch(`http://localhost:5147/api/leads/${H}/preferences`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(V)}),Mt("success","Alert created! We'll notify you about new matching jobs.")}catch(J){console.error(J),Mt("error","Failed to create alert.")}},N2=()=>{E(!R)},Ji=A=>{B(A),m(1)},ri=()=>{$(U==="grid"?"list":"grid")},ii=A=>{const H=A.id??A._id??A.slug??A.link;te(V=>{const J=V.includes(H);let Z;J?Z=V.filter(K=>K!==H):Z=[...V,H];try{localStorage.setItem("savedJobs",JSON.stringify(Z))}catch(K){console.error("Error saving to localStorage:",K)}return Z})},Yi=A=>{const H=A.id||A.slug||A.link;ne(V=>{const J=V.filter(K=>(K.id||K.slug||K.link)!==H),Z=[A,...J].slice(0,eA);try{localStorage.setItem("lastVisitedJobs",JSON.stringify(Z))}catch(K){console.error("Error saving to localStorage:",K)}return Z})},Ki=()=>{se(!Y)},SM=Math.ceil(u.length/F),IM=u.slice((x-1)*F,x*F);return L&&!y.length?a.jsx("div",{className:"flex-grow p-8",children:a.jsx("div",{className:"max-w-7xl mx-auto",children:a.jsxs("div",{className:"bg-red-50 border border-red-200 text-red-800 rounded-lg p-6",children:[a.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Error Loading Jobs"}),a.jsx("p",{className:"mb-4",children:L}),a.jsx("button",{onClick:()=>window.location.reload(),className:"bg-red-100 hover:bg-red-200 text-red-800 font-medium py-2 px-4 rounded",children:"Retry"})]})})}):a.jsxs("div",{className:"flex flex-col min-h-screen pb-16 md:pb-0",children:[a.jsxs("div",{className:"flex-grow",children:[a.jsx(LC,{onSearchChange:Wi,title:"Job Listings",description:"",popularTags:["React","Node.js","Remote"],generateHref:A=>`/jobs?q=${A.toLowerCase().replace(/\s+/g,"+")}`}),a.jsxs("div",{className:"container mx-auto py-8 pb-20 md:pb-8",children:[a.jsxs("div",{className:"relative",children:[a.jsxs("div",{className:"relative flex items-center gap-2 sm:my-6 my-2",children:[a.jsx(Aw,{data:y.map(A=>A.title).filter(Boolean),onSelect:A=>{q2(A)},onTyping:A=>{z(A),Wi(A)},placeholder:"Search for jobs, companies, or keywords...",className:"w-full",showSubmitButton:!0}),a.jsx("button",{className:"block md:hidden flex items-center justify-center p-3 bg-white border-2 border-gray-200 text-gray-700 rounded-xl hover:border-gray-300 hover:bg-gray-50 transition-all duration-200 focus:ring-4 focus:ring-gray-200 focus:outline-none hover:scale-105",onClick:N2,children:a.jsx(gt,{size:16,className:"mr-1.5"})})]}),(M.length>0||Object.keys(g).length>0||O!=="all")&&a.jsxs("div",{className:"m-4 flex flex-wrap gap-2",children:[O!=="all"&&a.jsxs("div",{className:"inline-flex items-center bg-indigo-100 text-indigo-800 rounded-full px-3 py-1 text-sm",children:[a.jsxs("span",{className:"font-medium mr-1",children:[l,":"]}),a.jsx("span",{children:O.replace(/_/g," ")}),a.jsx("button",{className:"ml-2 text-indigo-600 hover:text-indigo-800",onClick:()=>ai("all"),"aria-label":`Remove ${l} filter`,children:a.jsx(Xe,{size:14})})]}),M.map(A=>a.jsxs("div",{className:"inline-flex items-center bg-indigo-100 text-indigo-800 rounded-full px-3 py-1 text-sm",children:[a.jsx("span",{children:A}),a.jsx("button",{className:"ml-2 text-indigo-600 hover:text-indigo-800",onClick:()=>jM(A),"aria-label":`Remove search filter ${A}`,children:a.jsx(Xe,{size:14})})]},`search-${A}`)),Object.entries(g).map(([A,H])=>a.jsxs("div",{className:"inline-flex items-center bg-indigo-100 text-indigo-800 rounded-full px-3 py-1 text-sm",children:[a.jsxs("span",{className:"font-medium mr-1",children:[A.replace(/_/g," "),":"]}),a.jsx("span",{children:H}),a.jsx("button",{className:"ml-2 text-indigo-600 hover:text-indigo-800",onClick:()=>Bt(A,""),"aria-label":`Remove ${A} filter`,children:a.jsx(Xe,{size:14})})]},A)),a.jsx("button",{className:"inline-flex items-center bg-gray-100 text-gray-800 hover:bg-gray-200 rounded-full px-3 py-1 text-sm",onClick:Xi,children:"Clear All"}),a.jsx("button",{onClick:Ot,className:"inline-flex items-center bg-indigo-100 text-indigo-800 hover:bg-indigo-200 rounded-full px-3 py-1 text-sm font-medium",children:"🔔 Create Alert"})]})]}),n&&a.jsxs("button",{className:"md:hidden w-full mb-6 px-4 py-3 bg-indigo-600 text-white rounded-lg flex items-center justify-center",onClick:N2,"aria-expanded":R,children:[a.jsx(gt,{className:"w-4 h-4 mr-2"}),R?"Close Filters":"Filters"]}),a.jsxs("div",{className:"flex flex-col lg:flex-row lg:gap-6",children:[a.jsx("div",{className:"hidden lg:block lg:w-1/4 space-y-6",children:a.jsxs("div",{className:"bg-white rounded-lg shadow-sm border border-gray-200 p-5",children:[a.jsx("h2",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Filters"}),a.jsxs("div",{className:"mb-6",children:[a.jsx("h3",{className:"text-sm font-medium text-gray-900 mb-2",children:l}),a.jsx(wC,{activeDateFilter:O,onDateFilterChange:ai,dateFieldLabel:""})]}),r.map(A=>{var H;return a.jsxs("div",{className:"mb-6",children:[a.jsx("h3",{className:"text-sm font-medium text-gray-900 mb-2",children:A.replace(/_/g," ")}),d.includes(A)?a.jsx(bM,{options:w[A]||[],value:g[A]||"",onChange:V=>Bt(A,V),placeholder:`Select ${A.replace(/_/g," ")}`,className:"w-full"}):a.jsxs("select",{className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-indigo-500 focus:border-indigo-500 bg-white",value:g[A]||"",onChange:V=>Bt(A,V.target.value),children:[a.jsxs("option",{value:"",children:["Select ",A.replace(/_/g," ")]}),(H=w[A])==null?void 0:H.map(V=>a.jsx("option",{value:V,children:V},V))]})]},A)}),a.jsx("div",{className:"mt-6",children:a.jsxs("button",{onClick:Ki,className:`w-full px-4 py-2 rounded-lg flex items-center justify-center ${Y?"bg-indigo-100 text-indigo-800":"bg-gray-100 text-gray-800 hover:bg-gray-200"}`,children:[a.jsx(Pt,{size:16,className:"mr-2"}),a.jsxs("span",{children:["Saved Jobs (",G.length,")"]})]})})]})}),Me?a.jsx(bC,{}):a.jsxs("div",{className:"lg:w-2/4 space-y-6",children:[a.jsx("div",{className:"lg:block hidden bg-white rounded-lg shadow-sm border border-gray-200 p-4",children:a.jsxs("div",{className:"flex flex-col sm:flex-row sm:justify-between sm:items-center gap-3",children:[a.jsx("div",{className:"flex justify-between items-center",children:a.jsxs("div",{className:"view-mode-toggle flex bg-gray-100 p-1 rounded-lg",children:[a.jsxs("button",{onClick:ri,className:`px-3 py-1.5 rounded-md flex items-center justify-center transition-colors ${U==="grid"?"bg-indigo-600 text-white shadow-sm":"text-gray-700 hover:bg-gray-200"}`,"aria-label":"Grid view","aria-pressed":U==="grid",children:[a.jsx(tt,{size:16,className:"mr-1.5"}),a.jsx("span",{className:"text-sm font-medium",children:"Grid"})]}),a.jsxs("button",{onClick:ri,className:`px-3 py-1.5 rounded-md flex items-center justify-center transition-colors ${U==="list"?"bg-indigo-600 text-white shadow-sm":"text-gray-700 hover:bg-gray-200"}`,"aria-label":"List view","aria-pressed":U==="list",children:[a.jsx(bi,{size:16,className:"mr-1.5"}),a.jsx("span",{className:"text-sm font-medium",children:"List"})]})]})}),a.jsxs("div",{className:"flex justify-between items-center",children:[a.jsxs("div",{className:"items-per-page flex items-center",children:[a.jsx("label",{htmlFor:"items-per-page",className:"mr-2 text-sm font-medium text-gray-700",children:"Show:"}),a.jsxs("select",{id:"items-per-page",value:F,onChange:A=>Ji(Number(A.target.value)),className:"px-2 py-1.5 border border-gray-300 rounded-md text-sm bg-white",children:[a.jsx("option",{value:5,children:"5"}),a.jsx("option",{value:10,children:"10"}),a.jsx("option",{value:20,children:"20"}),a.jsx("option",{value:50,children:"50"})]})]}),a.jsxs("button",{className:"md:hidden flex items-center px-3 py-1.5 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition-colors",onClick:N2,children:[a.jsx(gt,{size:16,className:"mr-1.5"}),a.jsx("span",{className:"text-sm font-medium",children:"Filters"})]})]})]})}),a.jsxs("div",{className:"",children:[a.jsx("div",{className:"mb-6",children:a.jsxs("div",{className:"flex flex-row items-center justify-between",children:[a.jsxs("h3",{className:"text-xl font-semibold text-gray-900 flex items-center",children:[Y?"Saved Jobs":"Open Positions",O!=="all"&&!Y&&a.jsxs("span",{className:"text-sm font-normal text-gray-500 ml-2",children:["(",O.replace(/_/g," "),")"]})]}),a.jsxs("p",{className:"text-sm text-gray-600",children:[a.jsx("span",{className:"font-semibold text-gray-900",children:u.length})," found"]})]})}),a.jsx(YI,{items:IM,cardType:c,viewMode:U,savedJobs:G,onSaveJob:ii,onViewJob:Yi}),u.length>0&&a.jsx("div",{className:"mt-6",children:a.jsx(qw,{currentPage:x,totalPages:SM,onPageChange:A2})})]}),ye.length>0&&a.jsx("div",{className:"bg-white rounded-lg shadow-sm border border-gray-200 p-5",children:a.jsx(KI,{jobs:ye,onViewJob:Yi})})]}),a.jsx("div",{className:"hidden lg:block lg:w-1/4 space-y-6",children:((Qi=i==null?void 0:i.sidebar)==null?void 0:Qi.enabled)&&a.jsxs("div",{className:"sticky top-4",children:[a.jsx(gM,{position:"sidebar",url:i.sidebar.url,link:i.sidebar.link,alt:i.sidebar.alt}),a.jsx(gC,{api_url:h}),a.jsxs("div",{className:"mt-6 bg-white rounded-lg shadow-sm border border-gray-200 p-5",children:[a.jsx("h3",{className:"font-semibold text-lg mb-3",children:"Featured Employers"}),a.jsx("div",{className:"grid grid-cols-3 gap-2",children:[...Array(6)].map((A,H)=>a.jsx("div",{className:"flex items-center justify-center p-2 bg-gray-50 rounded-md",children:a.jsx("img",{src:`/placeholder.svg?height=40&width=40&text=${String.fromCharCode(65+H)}`,alt:`Featured employer ${H+1}`,className:"w-10 h-10 object-contain"})},H))})]})]})})]})]})]}),a.jsx(QI,{activeDateFilter:O,handleDateFilterChange:ai,filterKeys:r,searchableFilters:d,dateFieldLabel:l,activeFilters:g,handleFilterChange:Bt,toggleSavedJobsFilter:Ki,filtersData:w,savedJobs:G,showOnlySaved:Y,isMobileFilterOpen:R,toggleMobileFilter:N2}),a.jsx(MC,{savedJobsCount:G.length}),a.jsx(fC,{open:ge.open,type:ge.type,message:ge.message,onClose:()=>it(A=>({...A,open:!1}))})]})},aA=()=>a.jsx("div",{children:a.jsx("h2",{children:"Welcome to the Header!"})}),rA=({articles:o})=>{const[e,r]=b.useState(0),[i,n]=b.useState(!0),c=o.filter(l=>l.isBreaking);if(b.useEffect(()=>{if(c.length>1){const l=setInterval(()=>{r(d=>(d+1)%c.length)},5e3);return()=>clearInterval(l)}},[c.length]),!i||c.length===0)return null;const s=c[e];return a.jsx("div",{className:"breaking-news bg-red-600 text-white py-2 px-4 relative",children:a.jsxs("div",{className:"max-w-7xl mx-auto flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center space-x-3 flex-1 min-w-0",children:[a.jsxs("div",{className:"flex items-center space-x-2 flex-shrink-0",children:[a.jsx(St,{className:"w-5 h-5 animate-pulse"}),a.jsx("span",{className:"font-bold text-sm uppercase tracking-wide",children:"Breaking News"})]}),a.jsx("div",{className:"flex-1 min-w-0",children:a.jsx("a",{href:s.link,target:"_blank",rel:"noopener noreferrer",className:"text-sm hover:underline truncate block",children:s.title})})]}),a.jsxs("div",{className:"flex items-center space-x-2 flex-shrink-0",children:[c.length>1&&a.jsx("div",{className:"flex space-x-1",children:c.map((l,d)=>a.jsx("button",{onClick:()=>r(d),className:`w-2 h-2 rounded-full transition-colors ${d===e?"bg-white":"bg-white/50"}`,"aria-label":`Go to breaking news ${d+1}`},d))}),a.jsx("button",{onClick:()=>n(!1),className:"p-1 hover:bg-red-700 rounded transition-colors","aria-label":"Close breaking news",children:a.jsx(Ke,{className:"w-4 h-4"})})]})]})})},iA=({articles:o,onArticleClick:e})=>{const[r,i]=b.useState(0),n=4,c=y=>{const p=new Date(y),k=Math.floor((new Date().getTime()-p.getTime())/(1e3*60*60));return k<1?"Just now":k<24?`${k}h ago`:p.toLocaleDateString("en-US",{month:"short",day:"numeric"})},s=y=>y>=1e3?`${(y/1e3).toFixed(1)}k`:y.toString(),l=()=>{i(y=>y+n>=o.length?0:y+n)},d=()=>{i(y=>y===0?Math.max(0,o.length-n):Math.max(0,y-n))};if(o.length===0)return null;const h=o.slice(r,r+n);return a.jsx("section",{className:"trending-news bg-white border-b border-gray-200 py-4",children:a.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[a.jsxs("div",{className:"flex items-center justify-between mb-4",children:[a.jsxs("div",{className:"flex items-center",children:[a.jsx(G2,{className:"w-5 h-5 text-orange-500 mr-2"}),a.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:"Trending Now"})]}),o.length>n&&a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("button",{onClick:d,className:"p-1 rounded-full hover:bg-gray-100 transition-colors","aria-label":"Previous trending articles",children:a.jsx(v2,{className:"w-4 h-4 text-gray-600"})}),a.jsx("button",{onClick:l,className:"p-1 rounded-full hover:bg-gray-100 transition-colors","aria-label":"Next trending articles",children:a.jsx(zt,{className:"w-4 h-4 text-gray-600"})})]})]}),a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-3",children:h.map((y,p)=>a.jsx("div",{onClick:()=>e(y),className:"group bg-gray-50 rounded-lg p-3 cursor-pointer hover:bg-orange-50 hover:border-orange-200 border border-transparent transition-all duration-200",children:a.jsxs("div",{className:"flex items-start space-x-2",children:[a.jsx("div",{className:"flex-shrink-0",children:a.jsx("span",{className:"inline-flex items-center justify-center w-6 h-6 bg-orange-100 text-orange-600 rounded-full text-xs font-bold group-hover:bg-orange-200",children:r+p+1})}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("h3",{className:"text-sm font-medium text-gray-900 line-clamp-2 mb-1 group-hover:text-orange-700",children:y.title}),a.jsxs("div",{className:"flex items-center text-xs text-gray-500 space-x-2",children:[a.jsxs("div",{className:"flex items-center",children:[a.jsx(dt,{className:"w-3 h-3 mr-1"}),a.jsx("span",{children:c(y.date)})]}),a.jsx("span",{children:"•"}),a.jsxs("div",{className:"flex items-center",children:[a.jsx(F2,{className:"w-3 h-3 mr-1"}),a.jsx("span",{children:s(y.viewCount||0)})]})]})]})]})},y._id))}),o.length>n&&a.jsx("div",{className:"flex justify-center mt-3 md:hidden",children:a.jsx("div",{className:"flex space-x-1",children:Array.from({length:Math.ceil(o.length/n)}).map((y,p)=>a.jsx("button",{onClick:()=>i(p*n),className:`w-2 h-2 rounded-full transition-colors ${Math.floor(r/n)===p?"bg-orange-500":"bg-gray-300"}`,"aria-label":`Go to trending articles page ${p+1}`},p))})})]})})},nA=({article:o,isBookmarked:e,onToggleBookmark:r,onShare:i,layout:n="card"})=>{const[c,s]=b.useState(!1),l=u=>{const k=new Date(u),m=Math.floor((new Date().getTime()-k.getTime())/(1e3*60*60));return m<1?"Just now":m<24?`${m}h ago`:m<48?"Yesterday":k.toLocaleDateString("en-US",{month:"short",day:"numeric"})},d=u=>u>=1e3?`${(u/1e3).toFixed(1)}k`:u.toString(),h=u=>u.length>1?u[1]:u[0],y=(u,k)=>u.length<=k?u:u.substring(0,k).trim()+"...",p=n==="card"?"flex flex-col":"flex flex-col md:flex-row md:items-center";return a.jsxs("article",{className:`
7756
7756
  news-card bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden
7757
7757
  hover:shadow-md transition-shadow duration-300 ${p}
7758
7758
  `,children:[a.jsxs("div",{className:`relative ${n==="list"?"md:w-1/3 md:flex-shrink-0":""}`,children:[a.jsx("img",{src:o.image||"/placeholder.svg?height=200&width=400&text=News",alt:o.title,className:`w-full h-48 object-cover transition-opacity duration-300 ${c?"opacity-100":"opacity-0"} ${n==="list"?"md:h-32":""}`,onLoad:()=>s(!0)}),!c&&a.jsx("div",{className:"absolute inset-0 bg-gray-200 animate-pulse flex items-center justify-center",children:a.jsx("div",{className:"w-12 h-12 text-gray-400",children:"📰"})}),a.jsxs("div",{className:"absolute top-3 left-3 flex flex-wrap gap-1",children:[o.isBreaking&&a.jsx("span",{className:"px-2 py-1 bg-red-500 text-white text-xs font-semibold rounded animate-pulse",children:"BREAKING"}),o.isTrending&&a.jsxs("span",{className:"px-2 py-1 bg-orange-500 text-white text-xs font-semibold rounded flex items-center",children:[a.jsx(G2,{className:"w-3 h-3 mr-1"}),"TRENDING"]})]}),a.jsx("button",{onClick:()=>r(o._id),className:`absolute top-3 right-3 p-2 rounded-full transition-colors ${e?"bg-blue-500 text-white":"bg-white text-gray-600 hover:bg-gray-100"}`,"aria-label":e?"Remove bookmark":"Add bookmark",children:a.jsx(Pt,{className:`w-4 h-4 ${e?"fill-current":""}`})})]}),a.jsxs("div",{className:`p-4 ${n==="list"?"md:w-2/3":""}`,children:[a.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:o.categories.slice(0,2).map((u,k)=>a.jsx("span",{className:"px-2 py-1 bg-blue-100 text-blue-800 text-xs font-medium rounded-full",children:u},k))}),a.jsx("h2",{className:"text-lg font-semibold text-gray-900 mb-2 line-clamp-2 hover:text-blue-600 transition-colors",children:a.jsx("a",{href:o.link,target:"_blank",rel:"noopener noreferrer",children:o.title})}),a.jsx("p",{className:"text-sm text-gray-700 mb-3 line-clamp-3",children:y(o.content,n==="list"?150:200)}),a.jsxs("div",{className:"flex items-center justify-between text-sm text-gray-500 mb-3",children:[a.jsxs("div",{className:"flex items-center space-x-4",children:[a.jsxs("span",{children:["By ",h(o.author)]}),a.jsx("span",{children:"•"}),a.jsx("span",{children:o.company})]}),a.jsxs("div",{className:"flex items-center space-x-3",children:[a.jsxs("div",{className:"flex items-center",children:[a.jsx(dt,{className:"w-4 h-4 mr-1"}),a.jsxs("span",{children:[o.readTime,"m read"]})]}),a.jsxs("div",{className:"flex items-center",children:[a.jsx(F2,{className:"w-4 h-4 mr-1"}),a.jsx("span",{children:d(o.viewCount||0)})]})]})]}),a.jsx("div",{className:"flex flex-wrap gap-1 mb-3",children:o.tags.slice(0,3).map((u,k)=>a.jsxs("span",{className:"px-2 py-1 bg-gray-100 text-gray-600 text-xs rounded",children:["#",u]},k))}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("span",{className:"text-sm text-gray-500",children:l(o.date)}),a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("button",{onClick:()=>i(o),className:"p-2 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-full transition-colors","aria-label":"Share article",children:a.jsx(Ai,{className:"w-4 h-4"})}),a.jsxs("a",{href:o.link,target:"_blank",rel:"noopener noreferrer",className:"flex items-center px-3 py-1.5 bg-blue-600 text-white text-sm font-medium rounded-lg hover:bg-blue-700 transition-colors",children:["Read More",a.jsx(gi,{className:"w-3 h-3 ml-1"})]})]})]})]})]})},CC=({isOpen:o,onClose:e,title:r="Filters",children:i})=>o?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"fixed inset-0 bg-gray-600 bg-opacity-75 z-40",onClick:e}),a.jsxs("div",{className:"fixed inset-y-0 right-0 max-w-xs w-full bg-white shadow-xl z-50 overflow-y-auto",children:[a.jsxs("div",{className:"px-4 py-2 border-b border-gray-200 flex items-center justify-between",children:[a.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:r}),a.jsx("button",{onClick:e,className:"p-2 rounded-full hover:bg-gray-100","aria-label":"Close filters",children:a.jsx("svg",{className:"h-6 w-6 text-gray-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),a.jsx("div",{className:"p-4",children:i})]})]}):null,rb=({filters:o,sortBy:e,categories:r,onFiltersChange:i,onSortChange:n,onClearFilters:c,totalArticles:s,filteredArticles:l})=>{const d=[{value:"latest",label:"Latest"},{value:"trending",label:"Trending"},{value:"most-read",label:"Most Read"},{value:"oldest",label:"Oldest"},{value:"relevance",label:"Most Relevant"}],h=[{value:[0,2],label:"Quick read (0-2 min)"},{value:[2,5],label:"Medium read (2-5 min)"},{value:[5,10],label:"Long read (5-10 min)"},{value:[10,999],label:"In-depth (10+ min)"}],y=[{value:["",""],label:"All time"},{value:[new Date(Date.now()-24*60*60*1e3).toISOString(),""],label:"Last 24 hours"},{value:[new Date(Date.now()-7*24*60*60*1e3).toISOString(),""],label:"Last week"},{value:[new Date(Date.now()-30*24*60*60*1e3).toISOString(),""],label:"Last month"}],p=x=>{const m=o.categories.includes(x)?o.categories.filter(g=>g!==x):[...o.categories,x];i({...o,categories:m})},u=x=>{i({...o,readTime:x})},k=x=>{i({...o,dateRange:x})};return o.categories.length>0||o.tags.length>0||o.authors.length>0||o.companies.length>0||o.dateRange[0]!==""||o.readTime[0]!==0||o.readTime[1],a.jsxs("div",{className:"",children:[a.jsxs("div",{className:"p-2 border-b border-gray-200",children:[a.jsx("label",{htmlFor:"sort-select",className:"block text-sm font-medium text-gray-700 mb-2",children:"Sort by"}),a.jsx("select",{id:"sort-select",value:e,onChange:x=>n(x.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-blue-500 focus:border-blue-500",children:d.map(x=>a.jsx("option",{value:x.value,children:x.label},x.value))})]}),a.jsxs("div",{className:"block",children:[a.jsxs("div",{className:"p-4 border-b border-gray-200",children:[a.jsxs("h4",{className:"text-sm font-medium text-gray-900 mb-3 flex items-center",children:[a.jsx(ki,{className:"w-4 h-4 mr-2"}),"Date Range"]}),a.jsx("div",{className:"space-y-2",children:y.map((x,m)=>a.jsxs("label",{className:"flex items-center",children:[a.jsx("input",{type:"radio",name:"dateRange",checked:o.dateRange[0]===x.value[0]&&o.dateRange[1]===x.value[1],onChange:()=>k(x.value),className:"mr-2 text-blue-600 focus:ring-blue-500"}),a.jsx("span",{className:"text-sm text-gray-700",children:x.label})]},m))})]}),a.jsxs("div",{className:"p-4 border-b border-gray-200",children:[a.jsxs("h4",{className:"text-sm font-medium text-gray-900 mb-3 flex items-center",children:[a.jsx(dt,{className:"w-4 h-4 mr-2"}),"Read Time"]}),a.jsx("div",{className:"space-y-2",children:h.map((x,m)=>a.jsxs("label",{className:"flex items-center",children:[a.jsx("input",{type:"radio",name:"readTime",checked:o.readTime[0]===x.value[0]&&o.readTime[1]===x.value[1],onChange:()=>u(x.value),className:"mr-2 text-blue-600 focus:ring-blue-500"}),a.jsx("span",{className:"text-sm text-gray-700",children:x.label})]},m))})]}),a.jsxs("div",{className:"p-4",children:[a.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-3",children:"Categories"}),a.jsx("div",{className:"space-y-2 max-h-64 overflow-y-auto",children:r.map(x=>a.jsxs("label",{className:"flex items-center",children:[a.jsx("input",{type:"checkbox",checked:o.categories.includes(x.id),onChange:()=>p(x.id),className:"mr-2 text-blue-600 focus:ring-blue-500 rounded"}),a.jsxs("div",{className:"flex items-center justify-between w-full",children:[a.jsxs("div",{className:"flex items-center",children:[a.jsx("span",{className:"mr-2",children:x.icon}),a.jsx("span",{className:"text-sm text-gray-700",children:x.name})]}),a.jsxs("span",{className:"text-xs text-gray-500",children:["(",x.count,")"]})]})]},x.id))})]})]})]})},oA=({filters:o,sortBy:e,onFiltersChange:r,onSortChange:i,onClearFilters:n,totalArticles:c,filteredArticles:s,categories:l,isMobileFilterOpen:d,toggleMobileFilter:h,enableMobileFilter:y,showFilterName:p=!0,isMobile:u=!1})=>a.jsxs("aside",{className:u?"lg:w-1/4 space-y-6":"w-full space-y-6",children:[y&&a.jsx("button",{className:"flex items-center justify-center p-3 bg-white border-2 border-gray-200 text-gray-700 rounded-xl hover:border-gray-300 hover:bg-gray-50 transition-all duration-200 focus:ring-4 focus:ring-gray-200 focus:outline-none hover:scale-105",onClick:h,"aria-expanded":d,children:a.jsx(gt,{className:"w-4 h-4 flex justify-center items-center"})}),a.jsx("div",{className:"hidden md:block",children:a.jsx(rb,{filters:o,sortBy:e,onFiltersChange:r,onSortChange:i,onClearFilters:n,totalArticles:c,filteredArticles:s,categories:l})}),a.jsx(CC,{isOpen:d,onClose:h,title:"Filters",children:a.jsx(rb,{filters:o,sortBy:e,onFiltersChange:r,onSortChange:i,onClearFilters:n,totalArticles:c,filteredArticles:s,categories:l})})]}),cA=({apiUrl:o="http://localhost:5000/api/news",defaultFilters:e={categories:[],tags:[],authors:[],companies:[],dateRange:["",""],readTime:[0,999]},defaultSort:r="latest",bookmarkStorageKey:i="news-bookmarks"})=>{const[n,c]=b.useState([]),[s,l]=b.useState([]),[d,h]=b.useState(""),[y,p]=b.useState(!1),[u,k]=b.useState(new Set),[x,m]=b.useState(r),[g,v]=b.useState("card"),[M,S]=b.useState(1),[w,j]=b.useState([]),[_,z]=b.useState(!1),N=12,C=L=>L.trim().toLowerCase().replace(/\s+/g,"-"),[R,E]=b.useState(e);b.useEffect(()=>{const L=localStorage.getItem(i);L&&k(new Set(JSON.parse(L)))},[i]),b.useEffect(()=>{localStorage.setItem(i,JSON.stringify(Array.from(u)))},[u,i]),b.useEffect(()=>{(async()=>{try{const re=(await(await fetch(o)).json()).map(ge=>({...ge,categories:Array.isArray(ge.categories)?ge.categories:[]})),pe=new Set;re.forEach(ge=>{ge.categories.forEach(it=>{pe.add(C(it))})});const Ze=Array.from(pe).map(ge=>({id:ge,name:ge.replace(/-/g," ").replace(/\b\w/g,it=>it.toUpperCase()),icon:"📰",count:re.filter(it=>it.categories.some(Mt=>C(Mt)===ge)).length,color:"bg-gray-100 text-gray-800"}));c(re),l(re),j(Ze)}catch(q){console.error("Failed to fetch articles",q)}})()},[o]);const F=b.useMemo(()=>{let L=s;if(R.categories.length>0&&(L=L.filter(q=>q.categories.some(O=>R.categories.includes(C(O))))),R.dateRange[0]){const q=new Date(R.dateRange[0]);L=L.filter(O=>new Date(O.date)>=q)}switch((R.readTime[0]>0||R.readTime[1]<999)&&(L=L.filter(q=>{const O=q.readTime||0;return O>=R.readTime[0]&&O<=R.readTime[1]})),x){case"trending":L.sort((q,O)=>q.isTrending&&!O.isTrending?-1:!q.isTrending&&O.isTrending?1:(O.viewCount||0)-(q.viewCount||0));break;case"most-read":L.sort((q,O)=>(O.viewCount||0)-(q.viewCount||0));break;case"oldest":L.sort((q,O)=>new Date(q.date).getTime()-new Date(O.date).getTime());break;case"latest":default:L.sort((q,O)=>new Date(O.date).getTime()-new Date(q.date).getTime())}return L},[s,R,x,C]),B=b.useMemo(()=>n.filter(L=>L.isTrending).slice(0,6),[n]),U=b.useMemo(()=>n.filter(L=>L.isBreaking),[n]),$=Math.ceil(F.length/N),G=F.slice((M-1)*N,M*N),te=L=>{k(q=>{const O=new Set(q);return O.has(L)?O.delete(L):O.add(L),O})},Y=L=>{navigator.share?navigator.share({title:L.title,text:L.title,url:L.link}):(navigator.clipboard.writeText(L.link),alert("Article link copied to clipboard!"))},se=()=>{z(!_)},ye=L=>{window.open(L.link,"_blank","noopener,noreferrer")},ne=()=>{E({categories:[],tags:[],authors:[],companies:[],dateRange:["",""],readTime:[0,999]}),S(1)},Me=b.useRef(null),I=L=>{S(L),setTimeout(()=>{var q;(q=Me.current)==null||q.scrollIntoView({behavior:"smooth",block:"start"})},100)};return a.jsxs("div",{className:"min-h-screen bg-gray-50",children:[a.jsx(rA,{articles:U}),a.jsx(LC,{onSearchChange:()=>console.log("here")}),a.jsx(iA,{articles:B,onArticleClick:ye}),a.jsx("div",{className:"container mx-auto py-8 md:pb-8",children:a.jsx("div",{className:"block lg:hidden w-full",children:a.jsxs("div",{className:"relative flex items-center gap-2 sm:my-6 my-2",children:[a.jsx(Aw,{data:n.map(L=>L.title),onSelect:L=>{const q=n.filter(O=>O.title.toLowerCase().includes(L.toLowerCase()));l(q),h(L)},onTyping:L=>{p(!!L),L||(l(n),h(""))}}),a.jsx(oA,{filters:R,sortBy:x,onFiltersChange:L=>{E(L),S(1)},onSortChange:L=>m(L),onClearFilters:ne,totalArticles:n.length,filteredArticles:F.length,categories:w,isMobileFilterOpen:_,toggleMobileFilter:se,enableMobileFilter:!0,isMobile:!0})]})})}),a.jsx("main",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:a.jsx("div",{className:"flex flex-col lg:flex-row gap-8",children:a.jsxs("div",{className:"lg:w-3/4",children:[a.jsxs("div",{className:"mb-6",children:[a.jsx("h3",{className:"text-xl font-semibold text-gray-900",children:"Latest News"}),a.jsxs("p",{className:"text-gray-600 mt-1",children:[F.length," article",F.length!==1?"s":""," found"]})]}),F.length>0?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:g==="card"?"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-6":"space-y-6",children:G.map((L,q)=>a.jsx("div",{ref:q===0?Me:null,children:a.jsx(nA,{article:L,isBookmarked:u.has(L._id),onToggleBookmark:te,onShare:Y,layout:g})},L._id))}),$>1&&a.jsx("div",{className:"mt-8 flex justify-center",children:a.jsx(qw,{currentPage:M,totalPages:$,onPageChange:I})})]}):a.jsxs("div",{className:"text-center py-12",children:[a.jsx(O2,{className:"w-16 h-16 text-gray-400 mx-auto mb-4"}),a.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No articles found"}),a.jsx("p",{className:"text-gray-600 mb-4",children:"Try adjusting your search criteria or filters to find more articles."}),a.jsx("button",{onClick:ne,className:"px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors",children:"Clear All Filters"})]})]})})})]})},an=[{id:"1",title:"Introduction to iGaming",description:"Gain a comprehensive and practical overview of the iGaming industry with this all-encompassing course. Perfect for beginners looking to understand the fundamentals.",instructor:"Sarah Johnson",price:299,originalPrice:399,currency:"EUR",duration:"8 hours",level:"Beginner",category:"fundamentals",subcategory:"intro-igaming",rating:4.8,reviewCount:1247,enrollmentCount:5420,thumbnail:"/placeholder.svg?height=200&width=300&text=iGaming+Intro",tags:["iGaming","Fundamentals","Industry Overview"],features:["Lifetime Access","Certificate","Mobile Access"],lastUpdated:"2024-01-15",language:"English",certificate:!0,accessType:"Lifetime",isFeatured:!0,isNew:!1,isBestseller:!0},{id:"2",title:"Payments & Banking in Gaming Masterclass",description:"Master the complex world of payment processing, banking regulations, and financial compliance in the iGaming industry.",instructor:"Michael Chen",price:699,currency:"EUR",duration:"12 hours",level:"Advanced",category:"business",subcategory:"payments-banking",rating:4.9,reviewCount:892,enrollmentCount:2156,thumbnail:"/placeholder.svg?height=200&width=300&text=Payments+Banking",tags:["Payments","Banking","Compliance","FinTech"],features:["Lifetime Access","Certificate","Expert Support"],lastUpdated:"2024-02-20",language:"English",certificate:!0,accessType:"Lifetime",isFeatured:!0,isNew:!0,isBestseller:!1},{id:"3",title:"The Psychology of Gambling Addiction",description:"Gain insight into the psychological reasons behind gambling, the nature of addiction, and the scientific aspects of the challenges players encounter.",instructor:"Dr. Emma Rodriguez",price:449,currency:"EUR",duration:"6 hours",level:"Intermediate",category:"responsible-gaming",subcategory:"addiction-psychology",rating:4.7,reviewCount:634,enrollmentCount:1890,thumbnail:"/placeholder.svg?height=200&width=300&text=Psychology+Addiction",tags:["Psychology","Addiction","Player Behavior","Mental Health"],features:["Lifetime Access","Certificate","Case Studies"],lastUpdated:"2024-01-30",language:"English",certificate:!0,accessType:"Lifetime",isFeatured:!1,isNew:!1,isBestseller:!0},{id:"4",title:"AI in Gaming & Betting",description:"Explore the cutting-edge applications of artificial intelligence in gaming platforms, player analytics, and betting algorithms.",instructor:"Alex Thompson",price:599,currency:"EUR",duration:"10 hours",level:"Advanced",category:"technology",subcategory:"game-development",rating:4.6,reviewCount:445,enrollmentCount:1234,thumbnail:"/placeholder.svg?height=200&width=300&text=AI+Gaming",tags:["AI","Machine Learning","Analytics","Technology"],features:["Lifetime Access","Certificate","Code Examples"],lastUpdated:"2024-03-01",language:"English",certificate:!0,accessType:"Lifetime",isFeatured:!0,isNew:!0,isBestseller:!1},{id:"5",title:"Slot Academy LIVE!",description:"Interactive live sessions covering slot game mechanics, RTP calculations, and game design principles with industry experts.",instructor:"Gaming Academy Team",price:1500,currency:"EUR",duration:"20 hours",level:"Advanced",category:"specialized",subcategory:"slot-mechanics",rating:4.9,reviewCount:156,enrollmentCount:423,thumbnail:"/placeholder.svg?height=200&width=300&text=Slot+Academy",tags:["Slots","Game Mechanics","Live Training","RTP"],features:["Live Sessions","Certificate","Expert Mentoring"],lastUpdated:"2024-02-15",language:"English",certificate:!0,accessType:"Limited",isFeatured:!0,isNew:!1,isBestseller:!1},{id:"6",title:"English Language for IGaming & Betting",description:"Specialized English language course designed for non-native speakers working in the iGaming and betting industry.",instructor:"Linda Parker",price:300,currency:"EUR",duration:"15 hours",level:"Beginner",category:"specialized",subcategory:"industry-overview",rating:4.5,reviewCount:789,enrollmentCount:2890,thumbnail:"/placeholder.svg?height=200&width=300&text=English+iGaming",tags:["English","Language","Communication","Industry Terms"],features:["Lifetime Access","Certificate","Audio Lessons"],lastUpdated:"2024-01-10",language:"Multiple",certificate:!0,accessType:"Lifetime",isFeatured:!1,isNew:!1,isBestseller:!0},{id:"7",title:"VIP and Premium Service Masterclass",description:"Learn how to deliver exceptional VIP experiences and premium customer service in the competitive iGaming landscape.",instructor:"Robert Williams",price:499,currency:"EUR",duration:"8 hours",level:"Intermediate",category:"business",subcategory:"vip-management",rating:4.8,reviewCount:567,enrollmentCount:1456,thumbnail:"/placeholder.svg?height=200&width=300&text=VIP+Service",tags:["VIP","Customer Service","Premium","Hospitality"],features:["Lifetime Access","Certificate","Templates"],lastUpdated:"2024-02-05",language:"English",certificate:!0,accessType:"Lifetime",isFeatured:!0,isNew:!1,isBestseller:!1},{id:"8",title:"Fundamentals of CRM for Online Gaming",description:"Master customer relationship management strategies specifically tailored for online gaming and betting platforms.",instructor:"Maria Garcia",price:425,currency:"EUR",duration:"9 hours",level:"Intermediate",category:"business",subcategory:"crm-customer-service",rating:4.7,reviewCount:423,enrollmentCount:1123,thumbnail:"/placeholder.svg?height=200&width=300&text=CRM+Gaming",tags:["CRM","Customer Management","Gaming","Analytics"],features:["Lifetime Access","Certificate","CRM Tools"],lastUpdated:"2024-01-25",language:"English",certificate:!0,accessType:"Lifetime",isFeatured:!1,isNew:!1,isBestseller:!0}],sA=({courses:o,onSearchResults:e,onTyping:r,placeholder:i="Search courses, instructors, or topics..."})=>{const[n,c]=b.useState(""),[s,l]=b.useState([]),[d,h]=b.useState(!1);b.useEffect(()=>{if(n.length>0){const k=o.filter(v=>{const M=n.toLowerCase();return v.title.toLowerCase().includes(M)||v.description.toLowerCase().includes(M)||v.instructor.toLowerCase().includes(M)||v.tags.some(S=>S.toLowerCase().includes(M))||v.category.toLowerCase().includes(M)||v.subcategory.toLowerCase().includes(M)});e(k);const x=o.filter(v=>v.title.toLowerCase().includes(n.toLowerCase())).map(v=>v.title).slice(0,3),m=o.flatMap(v=>v.tags).filter(v=>v.toLowerCase().includes(n.toLowerCase())).filter((v,M,S)=>S.indexOf(v)===M).slice(0,3),g=o.filter(v=>v.instructor.toLowerCase().includes(n.toLowerCase())).map(v=>v.instructor).filter((v,M,S)=>S.indexOf(v)===M).slice(0,2);l([...x,...m,...g]),h(!0)}else e(o),l([]),h(!1)},[n,o,e]);const y=k=>{c(k),r==null||r(k.length>0,k)},p=k=>{c(k),h(!1)},u=()=>{c(""),h(!1),r==null||r(!1,"")};return a.jsxs("div",{className:"course-search relative",children:[a.jsxs("div",{className:"relative",children:[a.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:a.jsx(rt,{className:"h-5 w-5 text-gray-400"})}),a.jsx("input",{type:"text",value:n,onChange:k=>y(k.target.value),onFocus:()=>h(s.length>0),onBlur:()=>setTimeout(()=>h(!1),200),className:"block w-full pl-10 pr-10 py-3 border border-gray-300 rounded-lg bg-white shadow-sm focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 text-gray-900 placeholder-gray-500",placeholder:i}),n&&a.jsx("button",{onClick:u,className:"absolute inset-y-0 right-0 pr-3 flex items-center",children:a.jsx(Ke,{className:"h-5 w-5 text-gray-400 hover:text-gray-600"})})]}),d&&s.length>0&&a.jsx("div",{className:"absolute z-10 w-full mt-1 bg-white border border-gray-200 rounded-lg shadow-lg",children:a.jsx("ul",{className:"py-1",children:s.map((k,x)=>a.jsx("li",{children:a.jsx("button",{onClick:()=>p(k),className:"w-full px-4 py-2 text-left text-sm text-gray-700 hover:bg-gray-100 focus:bg-gray-100 focus:outline-none",children:a.jsxs("div",{className:"flex items-center",children:[a.jsx(rt,{className:"h-4 w-4 text-gray-400 mr-2"}),k]})})},x))})}),n&&a.jsxs("div",{className:"mt-2 text-sm text-gray-600",children:['Search results for "',n,'"']})]})},lA=({title:o,subtitle:e,placeholder:r,courses:i=[],onSearchResults:n})=>a.jsx("section",{className:"bg-gradient-to-r from-purple-600 to-indigo-600 py-12",children:a.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[a.jsxs("div",{className:"text-center mb-8",children:[a.jsx("h2",{className:"text-4xl font-bold text-white mb-4",children:o||"Master the IGaming Industry"}),a.jsx("p",{className:"text-xl text-indigo-100 max-w-2xl mx-auto",children:e||"Learn from industry experts and advance your career with our comprehensive course catalog"})]}),a.jsx("div",{className:"hidden lg:block max-w-2xl mx-auto",children:i&&n&&a.jsx(sA,{courses:i,onSearchResults:n,placeholder:r||"Search IGaming courses, instructors, or topics..."})})]})}),dA=({categories:o,selectedCategory:e,selectedSubcategory:r,onCategorySelect:i,onSubcategorySelect:n})=>{const[c,s]=b.useState(new Set),l=h=>{const y=new Set(c);y.has(h)?y.delete(h):y.add(h),s(y)},d=h=>{l(h),i(h)};return a.jsxs("nav",{className:"course-navigation bg-white rounded-lg shadow-sm border border-gray-200 p-4",children:[a.jsx("h2",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Course Categories"}),a.jsx("div",{className:"space-y-2",children:o.map(h=>{const y=c.has(h.id),p=e===h.id;return a.jsxs("div",{className:"category-group",children:[a.jsxs("button",{onClick:()=>d(h.id),className:`
package/dist/index.mjs CHANGED
@@ -37895,13 +37895,13 @@ const hw = ({ position: o, url: e, alt: r, link: i }) => {
37895
37895
  /* @__PURE__ */ a.jsx("h1", { className: "text-2xl font-bold text-gray-900", children: e }),
37896
37896
  /* @__PURE__ */ a.jsx("p", { className: "hidden lg:block text-gray-600", children: r })
37897
37897
  ] }) }) }) }),
37898
- /* @__PURE__ */ a.jsx("div", { className: "bg-gray-50 border-t border-gray-200", children: /* @__PURE__ */ a.jsx("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8", children: /* @__PURE__ */ a.jsxs("div", { className: "flex items-center space-x-6 py-2 text-sm overflow-x-auto", children: [
37898
+ /* @__PURE__ */ a.jsx("div", { className: "bg-gray-50 border-t border-gray-200", children: /* @__PURE__ */ a.jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ a.jsx("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8", children: /* @__PURE__ */ a.jsxs("div", { className: "flex items-center space-x-6 py-2 text-sm", children: [
37899
37899
  /* @__PURE__ */ a.jsx("span", { className: "text-gray-600 font-medium flex-shrink-0", children: "Popular:" }),
37900
37900
  i.map((c) => /* @__PURE__ */ a.jsxs(
37901
37901
  "a",
37902
37902
  {
37903
37903
  href: n(c),
37904
- className: "text-blue-600 hover:text-blue-800 transition-colors flex-shrink-0",
37904
+ className: "text-blue-600 hover:text-blue-800 transition-colors flex-shrink-0 whitespace-nowrap",
37905
37905
  children: [
37906
37906
  "#",
37907
37907
  c
@@ -37909,7 +37909,7 @@ const hw = ({ position: o, url: e, alt: r, link: i }) => {
37909
37909
  },
37910
37910
  c
37911
37911
  ))
37912
- ] }) }) })
37912
+ ] }) }) }) })
37913
37913
  ] })), tA = 6, MA = ({
37914
37914
  apiUrl: o,
37915
37915
  itemsPerPage: e = 12,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@igamingcareer/igaming-components",
3
- "version": "1.0.24",
3
+ "version": "1.0.25",
4
4
  "description": "Reusable React component library for the iGamingCareer platform",
5
5
  "author": "iGamingCareer <info@igamingcareer.com>",
6
6
  "license": "MIT",