PageSourceSearch

https://3dmagic.ai/assets/browse-page-D4CLwyO6.js

js 3dmagic.ai collected 2026-10-05 15:26:52 UTC 6,034 bytes, 1 lines download raw bytes

1import{t as e}from"./link-Bo_CljXA.js";import{t}from"./jsx-runtime-Bl4gOgri.js";import{_n as n,_t as r,an as i,bt as a,hn as o,in as s,mn as c,mt as l}from"./index-DWH_nqvE.js";function u(e,t){return Array.from(new Set([1,Math.max(1,e-2),Math.max(1,e-1),e,e+1,e+2,t])).filter(e=>e>=1&&e<=t).sort((e,t)=>e-t)}function d(e,t){let n=new Set(u(e,t)),r=[];for(let i=10;i<t;i*=10){let a=Math.floor((e-1)/i)*i+1,o=[a-i,a,a+i].filter(e=>e>=1&&e<=t&&!n.has(e)).map(e=>({start:e,end:Math.min(e+i-1,t)}));for(let e of o)n.add(e.start);o.length>0&&r.push({size:i,ranges:o})}return r}var f=t(),p=[{key:`categories`,kind:`category`,title:`Categories`},{key:`styles`,kind:`style`,title:`Styles`},{key:`useCases`,kind:`use-case`,title:`Use cases`}];function m({taxonomy:e}){let t=p.map(t=>({...t,items:e[t.key].filter(e=>e.count>=24)})).filter(e=>e.items.length>0);return t.length===0?null:(0,f.jsxs)(`nav`,{className:`mt-6 rounded-2xl border border-black/10 bg-white p-6 lg:p-8`,"aria-labelledby":`browse-model-collections`,children:[(0,f.jsx)(`h2`,{id:`browse-model-collections`,className:`font-black text-2xl tracking-[-0.03em]`,children:`Browse 3D model collections`}),(0,f.jsx)(`p`,{className:`mt-2 max-w-3xl font-medium text-black/55 text-sm`,children:`Explore the public catalog by category, visual style, or intended use.`}),(0,f.jsx)(`div`,{className:`mt-6 grid gap-7 lg:grid-cols-3`,children:t.map(e=>(0,f.jsx)(h,{kind:e.kind,items:e.items,title:e.title},e.kind))})]})}function h({items:e,kind:t,title:r}){return(0,f.jsxs)(`section`,{"aria-labelledby":`browse-${t}`,children:[(0,f.jsx)(`h3`,{id:`browse-${t}`,className:`magic-eyebrow text-[0.7rem] text-black/45`,children:r}),(0,f.jsx)(`ul`,{className:`mt-3 flex flex-wrap gap-2`,children:e.map(e=>(0,f.jsx)(`li`,{children:(0,f.jsxs)(`a`,{href:o({kind:t,value:e.value}),className:`inline-flex min-h-10 items-center gap-2 rounded-full border border-black/10 bg-background px-3 font-semibold text-sm transition-colors hover:border-black/25 hover:bg-black/[0.04]`,children:[(0,f.jsx)(`span`,{children:n(e.value)}),(0,f.jsx)(`span`,{className:`text-black/40`,children:e.count.toLocaleString(`en-US`)})]})},e.value))})]})}function g({kind:e,result:t,taxonomy:n,userEmail:i,userName:o,value:s}){let u=c({kind:e,value:s,displayLabel:t.displayLabel,totalItems:t.pageInfo.totalItems});return(0,f.jsx)(`main`,{className:`min-h-dvh bg-background text-ink`,children:(0,f.jsxs)(`div`,{className:`min-h-dvh px-5 py-7 sm:px-7 xl:px-10 xl:py-8`,children:[(0,f.jsx)(r,{activeNav:`gallery`,galleryHref:`/3d-models`,userEmail:i,userName:o}),(0,f.jsxs)(`section`,{className:`mx-auto mt-9 w-full max-w-[78rem] min-w-0`,children:[(0,f.jsxs)(`header`,{className:`rounded-2xl border border-black/10 bg-white p-6 lg:p-8`,children:[(0,f.jsx)(`p`,{className:`magic-eyebrow text-[0.72rem] text-black/45`,children:`Public catalog`}),(0,f.jsx)(`h1`,{className:`mt-3 max-w-[16ch] font-black text-[clamp(2.5rem,6vw,5rem)] leading-[0.92] tracking-[-0.05em]`,children:u.h1}),(0,f.jsx)(`p`,{className:`mt-5 max-w-3xl font-medium text-black/60 text-lg leading-snug`,children:u.intro})]}),n?(0,f.jsx)(m,{taxonomy:n}):null,(0,f.jsxs)(`section`,{className:`mt-10`,"aria-label":`Browse 3D models`,children:[(0,f.jsx)(`div`,{className:`mb-6 flex flex-wrap items-end justify-between gap-4`,children:(0,f.jsxs)(`p`,{className:`font-semibold text-black/60 text-sm`,children:[t.pageInfo.totalItems.toLocaleString(`en-US`),` models · Page`,` `,t.pageInfo.page,` of `,t.pageInfo.totalPages]})}),t.items.length>0?(0,f.jsx)(`div`,{className:`grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4`,children:t.items.map((e,t)=>(0,f.jsx)(l,{imagePriority:t===0,model:e},e.slug))}):(0,f.jsx)(`div`,{className:`rounded-2xl border border-black/10 bg-white p-8 text-black/60`,children:`No public models are available yet.`}),(0,f.jsx)(_,{pageInfo:t.pageInfo})]})]}),(0,f.jsx)(a,{})]})})}function _({LinkComponent:e=v,pageInfo:t}){if(t.totalPages<=1)return null;let n=u(t.page,t.totalPages),r=d(t.page,t.totalPages);return(0,f.jsxs)(`nav`,{className:`mt-10 space-y-5`,"aria-label":`Pagination`,children:[(0,f.jsxs)(`div`,{className:`flex flex-wrap items-center justify-center gap-2`,children:[t.hasPrevious?(0,f.jsxs)(e,{page:t.page-1,label:`Previous`,children:[(0,f.jsx)(i,{className:`size-4`,"aria-hidden":`true`}),`Previous`]}):null,n.map(n=>(0,f.jsx)(e,{page:n,label:`Page ${n}`,active:n===t.page,children:n},n)),t.hasNext?(0,f.jsxs)(e,{page:t.page+1,label:`Next`,children:[`Next`,(0,f.jsx)(s,{className:`size-4`,"aria-hidden":`true`})]}):null]}),r.length>0?(0,f.jsxs)(`div`,{className:`mx-auto max-w-2xl rounded-2xl border border-border bg-card p-4 sm:p-5`,children:[(0,f.jsx)(`p`,{className:`font-semibold text-ink text-sm`,children:`Jump to a page range`}),(0,f.jsx)(`p`,{className:`mt-1 text-muted-foreground text-sm`,children:`Each range opens at its first page.`}),(0,f.jsx)(`div`,{className:`mt-4 space-y-3`,children:r.map(({size:t,ranges:n})=>(0,f.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,f.jsxs)(`span`,{className:`w-full text-muted-foreground text-xs sm:w-28`,children:[t.toLocaleStr
1ing(`en-US`),`-page blocks`]}),n.map(({start:t,end:n})=>(0,f.jsxs)(e,{page:t,label:`Go to page ${t}, pages ${t} to ${n}`,children:[t,`–`,n]},t))]},t))})]}):null]})}function v({active:t=!1,children:n,label:r,page:i}){return(0,f.jsx)(e,{to:`.`,search:e=>({...e,page:i===1?void 0:i}),activeOptions:{exact:!0,explicitUndefined:!0},"aria-current":t?`page`:void 0,"aria-label":r,className:t?`inline-flex min-h-11 min-w-11 items-center justify-center gap-1 rounded-full bg-ink px-3 py-2 font-semibold text-primary-foreground text-sm focus-visible:outline-2 focus-visible:outline-ring focus-visible:outline-offset-2`:`inline-flex min-h-11 min-w-11 items-center justify-center gap-1 rounded-full border border-border bg-card px-3 py-2 font-semibold text-ink text-sm transition-colors hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring focus-visible:outline-offset-2`,children:n})}export{g as t};

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.