1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2469,4850],{64850:(e,t,l)=>{l.r(t),l.d(t,{default:()=>o});var s=l(6029),a=l(69616),r=l(71108),n=l(32988),c=l.n(n),i=l(55729);let d=({handleClick:e,searchItemName:t,active:l})=>(0,s.jsx)("div",{children:(0,s.jsxs)("div",{onClick:()=>e(t),className:"px-2 cursor-pointer flex justify-between py-1",children:[(0,s.jsx)("div",{className:"flex w-7 pb-1",children:(0,s.jsx)("div",{className:c()("w-5 h-5 md:w-6 md:h-6 rounded-full border-2 border-black",{"bg-black":l})})}),(0,s.jsxs)("span",{className:"text-left w-full pl-2",children:[" ",t," "]})]})}),u=({emptyText:e})=>(0,s.jsx)("div",{className:"empty-state",children:(0,s.jsx)("div",{children:(0,s.jsx)("div",{className:"px-2 cursor-pointer flex justify-left pb-2",children:(0,s.jsxs)("span",{className:"text-center text-xs text-gray w-full",children:[" ",e," "]})})})}),o=({handleSearchOptionClick:e,searchInput:t,setSearchInput:l,searchItems:n,activeSearchItems:o,fallbackText:x,emptyText:h,displayFallback:m,inputOverride:b,closeOnClick:p,placeholder:f,size:v="sm",icon:j=(0,s.jsx)(a.A,{style:{color:"grey"},height:"18",width:"18"})})=>{let g=(0,i.useRef)(null),k=(0,i.useRef)(null),[y,w]=(0,i.useState)(!1),[N,C]=(0,i.useState)(!1),E=(0,i.useCallback)(e=>{l(e.target.value),y||w(!0)},[]),I=(0,i.useCallback)(t=>{e(t),p&&w(!1)},[o]);(0,i.useEffect)(()=>{let e=e=>{y&&k.current&&!k.current.contains(e.target)&&g.current&&!g.current.contains(e.target)&&w(!1)};return document.addEventListener("click",e),()=>{document.removeEventListener("click",e)}},[y]),(0,i.useEffect)(()=>{if(y&&k.current){let e=k.current.children;0===e.length||1===e.length&&e[0].classList.contains("empty-state")?C(!0):C(!1)}},[t]);let L=(0,r.zh)({maxHeight:150*!!y,duration:250,config:{easing:r.le.easeInOutBack}});return(0,s.jsxs)("div",{className:"",ref:g,children:[(0,s.jsxs)("div",{className:c()("flex absolute justify-between align-center text-black pr-2 bg-white border-2 border-black rounded-full w-full",`h-${"sm"===v?"auto":"10"}`,`pl-${"sm"===v?"2":"4"}`,{"text-gray-400":!t}),onClick:y?()=>{}:()=>w(e=>!e),style:{zIndex:20},children:[(0,s.jsx)("input",{type:"text",id:"brandInput",className:"z-10 py-1 w-full outline-none text-black",name:"brand",placeholder:f,onChange:e=>E(e),value:y?t:b||t,autoComplete:"off",required:!0}),(0,s.jsxs)("div",{className:c()("py-2 pr-2 absolute right-0 -top-1 text-black "),children:[j," "]})]}),(0,s.jsx)(r.CS.div,{style:{...L,overflow:"hidden",zIndex:30},className:c()("absolute border-black border-l-2 border-r-2 top-6 border-b-2 rounded-b-xl bg-transparent w-full align-center text-black transition-opacity delay-100 duration-150",{"pt-3":N},{"opacity-100":y},{"opacity-0":!y}),children:(0,s.jsx)("div",{className:c()("relative mt-2",{"mt-4":!N}),children:(0,s.jsx)("div",{style:{overflow:"auto",height:"100%"},className:c()("max-h-36",{}),children:(0,s.jsxs)("div",{className:"bg-white",ref:k,children:[[...n,...x?[x]:[]].map((e,l)=>{let a=e.toLowerCase(),r=t?.toLowerCase();return r&&a.startsWith(r)||a===x?.toLowerCase()?(0,s.jsx)(d,{searchItemName:e,handleClick:I,active:o.includes(e)},l):r?null:(0,s.jsx)(d,{searchItemName:e,handleClick:I,active:o.includes(e)},l)}),N?(0,s.jsx)(u,{emptyText:h}):null]})})})})]})}}}]);
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.