1import{n as e,t}from"./rolldown-runtime-Dd_uD5pT.js";import{l as n,p as r}from"./app-CHSaIopb.js";import{_ as i,t as a}from"./icons-Ca2IV7Qa.js";import{t as o}from"./tailwind-BNzE6D4E.js";import{i as s}from"./ExternalLink-BWe5d8rD.js";import{t as c}from"./dist-DbvL-e4a.js";import{t as l}from"./WithIcon-C4Z64VXb.js";import{f as u}from"./entities-DZW7LojU.js";import{r as d}from"./generated-DdsZcE7O.js";import{n as f,t as p}from"./filters-DnPJU6WY.js";import{t as m}from"./faXmark-DzKCh5zw.js";import{t as h}from"./TextSearchInput-FrZ6CM47.js";var g=t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=`fas`,n=`check`,r=448,i=512,a=[10003,10004],o=`f00c`,s=`M434.8 70.1c14.3 10.4 17.5 30.4 7.1 44.7l-256 352c-5.5 7.6-14 12.3-23.4 13.1s-18.5-2.7-25.1-9.3l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l101.5 101.5 234-321.7c10.4-14.3 30.4-17.5 44.7-7.1z`;e.definition={prefix:t,iconName:n,icon:[r,i,a,o,s]},e.faCheck=e.definition,e.prefix=t,e.iconName=n,e.width=r,e.height=i,e.ligatures=a,e.unicode=o,e.svgPathData=s,e.aliases=a})),_=t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=`fas`,n=`chevron-down`,r=448,i=512,a=[],o=`f078`,s=`M201.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 338.7 54.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z`;e.definition={prefix:t,iconName:n,icon:[r,i,a,o,s]},e.faChevronDown=e.definition,e.prefix=t,e.iconName=n,e.width=r,e.height=i,e.ligatures=a,e.unicode=o,e.svgPathData=s,e.aliases=a})),v=t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=`fas`,n=`chevron-up`,r=448,i=512,a=[],o=`f077`,s=`M201.4 105.4c12.5-12.5 32.8-12.5 45.3 0l192 192c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L224 173.3 54.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l192-192z`;e.definition={prefix:t,iconName:n,icon:[r,i,a,o,s]},e.faChevronUp=e.definition,e.prefix=t,e.iconName=n,e.width=r,e.height=i,e.ligatures=a,e.unicode=o,e.svgPathData=s,e.aliases=a})),y=e({PaginationSearchFilter:()=>D,SearchFilter:()=>O,SearchFilters:()=>k}),b=g(),x=_(),S=v(),C=i(),w=m(),T=n(),E={brown:`taupe`,skin:`taupe`,iridescent:`indigo`,green:`lime`,black:`gray`,orange:`amber`,grey:`gray`,white:`gray`},D=({color:e,className:t=``})=>{let{searchFilters:n}=f();return(0,T.jsx)(O,{color:e,filter:n.page,className:o(`m-4 text-white`,t)})},O=({color:e,filter:t,hideHeader:n,className:i=``})=>{let{sorting:m}=f(),g=u(),{props:{assistedTags:_}}=r(),v=e??`gray`,y=t.type===d.Text,D=`bg-${v}-200 text-${v}-800 dark:text-white hover:bg-${v}-300 dark:bg-${v}-500 dark:hover:bg-${v}-500`,O=`bg-${v}-600 hover:bg-${v}-500 dark:bg-${v}-700 dark:hover:bg-${v}-600`,k=a(t.attribute),A=t.value,j=y?!!A:t.searchFilterOptions.some(e=>e.active);return!t||!y&&t.optionsCount<=0?null:(0,T.jsxs)(`div`,{"data-testid":`search-filter`,className:o(`grow overflow-hidden rounded`,y&&`min-w-48`,t.className||``,t.attribute===`density`&&`hidden md:block`,i),children:[!n&&(0,T.jsxs)(s,{href:t.resetUrl,rel:`nofollow`,className:`group flex items-center gap-1.5 px-2 py-1 text-xs font-bold uppercase tracking-wider hover:no-underline ${j?`${O} bg-${v}-800`:`bg-${v}-700 text-white/70 hover:text-white`}`,children:[k&&(0,T.jsx)(c,{icon:k}),(0,T.jsx)(`span`,{className:`hidden group-hover:inline`,children:`Reset?`}),(0,T.jsx)(`span`,{className:`inline group-hover:hidden`,children:t.label})]}),y?(0,T.jsx)(h,{filter:t,color:v}):(0,T.jsx)(`div`,{className:`flex flex-row flex-wrap`,children:t.searchFilterOptions.map(e=>{let r=String(e.value)?.toLowerCase(),i={...E,...g},a=[`colors`,`subtype`].includes(t.attribute)?i[r]??v:v,u=e.active,f=t.isSort?m.sortDirection===p.Asc?S.faChevronUp:x.faChevronDown:b.faCheck;f=u===-1?w.faXmark:f;let h=t.disabled?`span`:s;return e.label===``||e.label===null?null:(0,T.jsxs)(h,{className:o(`flex items-center justify-center p-2 flex-auto text-center text-nowrap transition-colors [text-shadow:0_1px_2px_rgba(0,0,0,0.2)] rounded-b-none`,`hover:no-underline`,n&&`rounded-t-none`,t.disabled?[O,`hover:cursor-default hover:bg-${v}-600`]:{[D]:u,[O]:!u}).replaceAll(v,a),href:e.url,...t.disabled?{}:{rel:`nofollow`},children:[!!u&&t.type!==d.Group&&f&&(0,T.jsx)(c,{icon:f,className:`mr-1.5`}),_.includes(e.label)&&(0,T.jsx)(c,{icon:C.faRobot,className:`mr-1.5`}),(0,T.jsx)(l,{label:t.isGroup?e.label.replace(/^\d+\s*/,``).trim():t.isSort?e.value:e.label,children:e.label})]},e.value)})})]},t.label)},k=e=>{let{searchFilters:t}=f(),n=Object.values(t).filter(e=>e.attribute!==`grouping`&&(e.type===d.Sort||e.type===d.Group||e.type===d.Text)),r=Object.values(t).filter(e=>e.type===d.Filter);return(0,T.jsxs)(T.Fragment,{children:[n.map(t=>(0,T.jsx)(O,{...e,filter:t},t.attribute)),r.length>0&&(0,T.jsxs)(`div`,{className:`flex w-full items-center gap-3 text-xs text-${e.color}-800 dark:text-${e.color}-200`,children:[(0,T.jsx)(`hr`,{className:`flex-1 border-${e.color}-500`}),(0,T.jsx)(`span`,{children:`click to filter · double-click to exclude · click label to reset`}),(0,T.jsx)(`hr`,{className:`flex-1 border-${e.color}-500`})]}),r.map(t=>(0,T.jsx)(O,{...e,filter:t},t.attribute))]})};export{y as i,O as n,k as r,D 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.