1import{r as e,j as n,L as a}from"./vendor-8e5c78e6.js";import{H as t,A as s}from"./index-e6d4e6a4.js";import{N as i}from"./NavBar-cde51773.js";import{F as r,S as o,E as p}from"./Footer-89375e5b.js";import{g as l}from"./api-service-41b7dacd.js";import{g as c}from"./general-203ce14d.js";import"./createLucideIcon-09c4999a.js";const m="'Noto Sans', system-ui, sans-serif",f=`\n .fr-sitemappage {\n background: #ffffff;\n padding: 72px 24px 96px;\n min-height: 60vh;\n }\n .fr-sitemappage-inner {\n max-width: 1080px;\n margin: 0 auto;\n }\n .fr-sitemappage h1 {\n font-family: 'Noto Serif', Georgia, serif;\n font-size: 34px;\n font-weight: 900;\n color: #2B2D42;\n margin: 0 0 8px;\n }\n .fr-sitemappage-sub {\n font-family: ${m};\n font-size: 14px;\n color: #6b7280;\n margin: 0 0 40px;\n max-width: 640px;\n line-height: 1.6;\n }\n .fr-sitemappage-sections {\n display: grid;\n grid-template-columns: 1fr;\n gap: 36px 48px;\n }\n .fr-sitemappage-section h2 {\n font-family: ${m};\n font-size: 12px;\n font-weight: 700;\n color: #2B2D42;\n text-transform: uppercase;\n letter-spacing: 1px;\n margin: 0 0 14px;\n padding-bottom: 10px;\n border-bottom: 1px solid rgba(43,45,66,0.1);\n }\n .fr-sitemappage-list {\n list-style: none;\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n gap: 10px;\n }\n .fr-sitemappage-list li { min-width: 0; }\n .fr-sitemappage-list a {\n font-family: ${m};\n font-size: 14px;\n font-weight: 500;\n color: #4b5563;\n text-decoration: none;\n transition: color .15s;\n display: block;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n .fr-sitemappage-list a:hover { color: #0d9488; }\n\n .fr-sitemappage-loading,\n .fr-sitemappage-error {\n font-family: ${m};\n font-size: 14px;\n color: #6b7280;\n padding: 24px 0;\n }\n .fr-sitemappage-error a {\n color: #0d9488;\n text-decoration: underline;\n }\n\n .fr-sitemappage-blogs .fr-sitemappage-list {\n display: grid;\n grid-template-columns: 1fr;\n gap: 10px 24px;\n }\n\n @media (min-width: 640px) {\n .fr-sitemappage { padding: 96px 48px 112px; }\n .fr-sitemappage h1 { font-size: 44px; }\n .fr-sitemappage-sections {\n grid-template-columns: repeat(2, 1fr);\n gap: 48px;\n }\n .fr-sitemappage-blogs { grid-column: 1 / -1; }\n .fr-sitemappage-blogs .fr-sitemappage-list {\n grid-template-columns: repeat(2, 1fr);\n }\n }\n @media (min-width: 960px) {\n .fr-sitemappage-sections {\n grid-template-columns: repeat(3, 1fr);\n }\n .fr-sitemappage-blogs .fr-sitemappage-list {\n grid-template-columns: repeat(3, 1fr);\n }\n }\n`,g=[{label:"Tools & Services",match:e=>["/check-pf-withdrawability","/pf-withdrawal","/pricing","/credit-cards-details","/epfo-locater"].includes(e)},{label:"Company",match:e=>["/about-us","/contact-us","/"].includes(e)},{label:"Policies",match:e=>["/terms-conditions","/privacy-policy","/refund-policy"].includes(e)},{label:"Blogs",match:e=>"/blogs"===e||e.startsWith("/blogs/"),className:"fr-sitemappage-blogs"}],d={label:"Other",match:()=>!0},h=o,x=p,u=e=>{if("/"===e)return"Home";return(e.replace(/\/$/,"").split("/").pop()||e).split("-").map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(" ")},b=()=>{const[o,p]=e.useState(null),[m,b]=e.useState(null);e.useEffect((()=>{let e=!1;return(async()=>{const n=h.map((e=>({path:e,label:u(e)}))),a=x.map((e=>({path:`/blogs/${e}`,label:u(`/blogs/${e}`)})));try{const t=await(async()=>{const e=[];let n=1;for(let a=0;a<50;a++){const a=`${s.FINRIGHT_BLOGS.LIST}?source=website&page=${n}&limit=100`,t=await l(a);if(!("success"in t)||!t.success||!Array.isArray(t.data))break;for(const n of t.data)n?.title&&e.push({path:`/blogs/${n.slug||c(n.title,n._id)}`,label:n.title});if(!t.pagination||n>=t.pagination.pages)break;n++}return e})();e||p([...n,...t,...a])}catch(t){e||(p([...n,...a]),b(t instanceof Error?t.message:"Failed to load blogs"))}})(),()=>{e=!0}}),[]);const j=o?(e=>{const n=new Map,a=new Set,t=e.filter((e=>!a.has(e.path)&&(a.add(e.path),!0)));for(const i of t){const e=g.find((e=>e.match(i.path)))||d;n.has(e.label)||n.set(e.label,[]),n.get(e.label).push(i)}for(const i of n.values())i.sort(((e,n)=>e.label.localeCompare(n.label)));const s=[];for(const i of[...g,d]){const e=n.get(i.label);e&&e.length&&s.push({section:i,entries:e})}return s})(o):[];return n.jsxs(n.Fragment,{children:[n.jsxs(t,{children:[n.jsx("title",{children:"Sitemap | FinRight"}),n.jsx("meta",{name:"description",content:"Browse all pages on FinRight â tools, services, blogs and company information."})]}),n.jsx(i,{}),n.jsxs("main",{className:"fr-sitemappage",children:[n.jsx("style",{children:f}),n.jsxs("div",{className:"fr-sitemappage-inner",children:[n.jsx("h1",{children:"Sitemap"}),!o&&!m&&n.jsx("div",{className:"fr-sitemappage-loading",children:"Loading sitemapâ¦"}),m&&o&&0===o.length&&n.jsxs("div",{className:"fr-sitemappage-error",children:["Couldn't load the sitemap (",m,"). ",n.jsx(a,{to:"/",children:"Return home"}),"."]}),o&&o.length>0&&n.jsx("div",{className:"fr-sitemappage-sections",children:j.map((({section:e,entries:t})=>n.jsxs("section",{className:`fr-sitemappage-section ${e.className||""}`,children:[n.jsx("h2",{children:e.label}),n.jsx("ul",{className:"fr-sitemappage-list",children:t.map((e=>n.jsx("li",{children:n.jsx(a,{to:e.path,children:e.label})},e.path)))})]},e.label)))})]})]}),n.jsx(r,{})]})};export{b as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.