PageSourceSearch

https://multi-toolkit.com/_next/static/chunks/8124-0be37ecbbe651436.js

js multi-toolkit.com collected 2026-10-02 01:38:23 UTC 20,859 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8124],{51179:e=>{e.exports={wrap:"CustomSelect_wrap__qAdeT",trigger:"CustomSelect_trigger__SmNFk",triggerOpen:"CustomSelect_triggerOpen__F_QQx",triggerPrefix:"CustomSelect_triggerPrefix__CFcEd",triggerLabel:"CustomSelect_triggerLabel__yTWbj",triggerCode:"CustomSelect_triggerCode__Fvs7q",triggerChevron:"CustomSelect_triggerChevron__SbDmu",triggerChevronOpen:"CustomSelect_triggerChevronOpen__u1KTQ",panel:"CustomSelect_panel__0Ypdn",dropIn:"CustomSelect_dropIn__vBIbN",searchWrap:"CustomSelect_searchWrap__Amhz0",searchIcon:"CustomSelect_searchIcon__rcKPX",searchInput:"CustomSelect_searchInput__zfqXc",groupHeader:"CustomSelect_groupHeader__ztGUt",list:"CustomSelect_list__4TeLT",option:"CustomSelect_option__t8goh",optionFocused:"CustomSelect_optionFocused__Jccpu",optionSelected:"CustomSelect_optionSelected__gy1dS",optionPrefix:"CustomSelect_optionPrefix__hreSg",optionCode:"CustomSelect_optionCode__D9Osp",optionLabel:"CustomSelect_optionLabel__pySWS",optionSub:"CustomSelect_optionSub__f3WZu",optionCheck:"CustomSelect_optionCheck__Yiv4S",empty:"CustomSelect_empty__dBe92"}},59511:e=>{e.exports={page:"page_page__oWtkd",nav:"page_nav__4fzpr",logo:"page_logo__64idI",logoText:"page_logoText__IZHrr",breadcrumbList:"page_breadcrumbList__HFt4G",breadcrumbLink:"page_breadcrumbLink__1WQS1",breadcrumbSep:"page_breadcrumbSep__p3oRE",breadcrumbCurrent:"page_breadcrumbCurrent__r2L_z",hero:"page_hero__XDAp4",heroBadge:"page_heroBadge__cIvaT",h1:"page_h1__d0AOb",subtitle:"page_subtitle__jeLsJ",toolSection:"page_toolSection__U6XR8",breadcrumb:"page_breadcrumb__4uBNa",bcList:"page_bcList__Ly3zD",bcActive:"page_bcActive__1adQK",sectionTitle:"page_sectionTitle__MfOEU",relatedSection:"page_relatedSection__yNSfA",corridorGrid:"page_corridorGrid__nnYRi",corridorCard:"page_corridorCard__l_pVU",corridorPair:"page_corridorPair__pS_qJ",corridorFlags:"page_corridorFlags__IZbiJ",corridorArrow:"page_corridorArrow__J8h2S",countryGrid:"page_countryGrid__0skSS",countryCard:"page_countryCard__qaHp_",countryFlag:"page_countryFlag__Fma5_",countryName:"page_countryName__RXjdP",countryCurrency:"page_countryCurrency__mKs14",crossLinkGrid:"page_crossLinkGrid__INrGc",crossLinkCard:"page_crossLinkCard__xIIOl",crossLinkLabel:"page_crossLinkLabel___HJaB",crossLinkArrow:"page_crossLinkArrow__dxbI7",amountsGrid:"page_amountsGrid__I2rNH",amountLink:"page_amountLink__cDZ97",amountLinkValue:"page_amountLinkValue__l5P69",seoContent:"page_seoContent__hTcVL",seoSection:"page_seoSection___6LAS",faqItem:"page_faqItem__4Gtko",faqSummary:"page_faqSummary__fpsZL",faqAnswer:"page_faqAnswer__aEWDx",pegNote:"page_pegNote__rtQhe",pegDot:"page_pegDot__XJbf5"}},87616:e=>{e.exports={root:"CurrencyClient_root__LGmSG",rateBanner:"CurrencyClient_rateBanner__eEkUZ",rateDisplay:"CurrencyClient_rateDisplay__ayh7L",rateLabel:"CurrencyClient_rateLabel__3xRnL",rateNumber:"CurrencyClient_rateNumber__99ROR",rateMetaRow:"CurrencyClient_rateMetaRow__cvnYa",updatedAt:"CurrencyClient_updatedAt__rKKj4",statusBadge:"CurrencyClient_statusBadge__AfZ5N",status_live:"CurrencyClient_status_live__1bh5Q",status_cache:"CurrencyClient_status_cache__JwwoM",status_fallback:"CurrencyClient_status_fallback__iEwFc",status_loading:"CurrencyClient_status_loading__pzvzF",status_idle:"CurrencyClient_status_idle__m1he3",rateSkeleton:"CurrencyClient_rateSkeleton__DQf6B",shimmer:"CurrencyClient_shimmer__ovSiI",rateSkeletonLarge:"CurrencyClient_rateSkeletonLarge__uGVE1",card:"CurrencyClient_card__NHEy1",inputRow:"CurrencyClient_inputRow__R78uK",selectWrap:"CurrencyClient_selectWrap__2NVQR",amountInput:"CurrencyClient_amountInput__y94fz",swapRow:"CurrencyClient_swapRow__rnNn7",swapBtn:"CurrencyClient_swapBtn__FTsI5",resultBox:"CurrencyClient_resultBox__WjBHg",resultNumber:"CurrencyClient_resultNumber__2f1Rz",resultPlaceholder:"CurrencyClient_resultPlaceholder__h3Rb9",quickAmounts:"CurrencyClient_quickAmounts__k4ZJl",quickBtn:"CurrencyClient_quickBtn__k0uuE",quickBtnActive:"CurrencyClient_quickBtnActive__P5qlm",actions:"CurrencyClient_actions__fkVJs",actionBtn:"CurrencyClient_actionBtn__H1Zbs",actionBtnCopied:"CurrencyClient_actionBtnCopied___HCg7",chartSection:"CurrencyClient_chartSection__YMuKx",chartHeader:"CurrencyClient_chartHeader__o_fZ8",chartTitle:"CurrencyClient_chartTitle__A8QAc",periodSelector:"CurrencyClient_periodSelector__QX1l_",periodBtn:"CurrencyClient_periodBtn__O7a_0",periodBtnActive:"CurrencyClient_periodBtnActive__WJCqt",chartSkeleton:"CurrencyClient_chartSkeleton__Hldvu",chartEmpty:"CurrencyClient_chartEmpty__HogVJ",chartSvg:"CurrencyClient_chartSvg__svpMD",chartStats:"CurrencyClient_chartStats__Ofcng",chartStat:"CurrencyClient_chartStat__G7kn4",statLabel:"CurrencyClient_statLabel__I1RRQ",statValue:"CurrencyClient_statValue__S3p4m",statUp:"CurrencyClient_statUp__o1Z_h",statDown:"CurrencyClient_statDown__8uM9m",tableSection:"CurrencyClient_tableSection__eTTcg",tableTitle:"CurrencyClient_tableTitle__3REIf",table:"CurrencyClient_table__yLSBt",th:"CurrencyClient_th__z_JV2",tr:"CurrencyClient_tr__oB_5t",td:"CurrencyClient_td__roT1P",tdResult:"CurrencyClient_tdResult__K9Y6v"}},94002:(e,t,a)=>{"use strict";a.d(t,{default:()=>m});var r=a(95155),n=a(12115),s=a(79094),l=a(95150);function i(e,t){let a=parseFloat(e);return!a||!t||isNaN(a)||isNaN(t)||a<0?null:a*t}function o(e,t){if(null==e||isNaN(e))return"—";let a=l.yR[t]?.decimals??2;return new Intl.NumberFormat("en-IN",{minimumFractionDigits:a,maximumFractionDigits:a}).format(e)}var c=a(97133),u=a(87616);let d=l.oW.map(e=>({value:e,label:l.yR[e].name,code:e,sub:l.yR[e].country})),_=[1,5,10,20,50,100,200,500,1e3,2e3,5e3,1e4],p=[["7","7D"],["30","30D"],["90","90D"],["365","1Y"],["1825","5Y"]];function m({defaultFrom:e="SAR",defaultTo:t="INR",defaultAmount:a="100"}
1){let[m,h]=(0,n.useState)(String(a)),[C,g]=(0,n.useState)(e),[x,y]=(0,n.useState)(t),[b,v]=(0,n.useState)(null),[S,f]=(0,n.useState)("idle"),[j,N]=(0,n.useState)(null),[k,L]=(0,n.useState)(null),[w,$]=(0,n.useState)("30"),[R,B]=(0,n.useState)(!1),[A,F]=(0,n.useState)(!1),[I,E]=(0,n.useState)(!1);(0,n.useEffect)(()=>{let e=new URLSearchParams(window.location.search),t=e.get("amount"),a=e.get("from")?.toUpperCase(),r=e.get("to")?.toUpperCase();t&&!isNaN(parseFloat(t))&&h(t),a&&l.yR[a]&&g(a),r&&l.yR[r]&&y(r)},[]),(0,n.useEffect)(()=>{try{let e=new URLSearchParams;m&&e.set("amount",m),e.set("from",C),e.set("to",x),window.history.replaceState(null,"",`${window.location.pathname}?${e}`)}catch{}},[m,C,x]),(0,n.useEffect)(()=>{f("loading"),v(null),(0,s.Y8)(C).then(e=>{v(e.rates??{}),f(e.source),N(e.updatedAt??null)})},[C]),(0,n.useEffect)(()=>{B(!0),L(null),(0,s.Kx)(C,x,parseInt(w,10)).then(e=>{L(e??null),B(!1)})},[C,x,w]);let T=(0,n.useMemo)(()=>b&&b[x]?b[x]:null,[b,x]),D=(0,n.useMemo)(()=>T&&m?i(parseFloat(m),T):null,[m,T]),M=(0,n.useMemo)(()=>{var e,t;if(!k||k.length<2)return null;let a=k.map(e=>e.rate),{polylinePoints:r,areaPath:n,pts:s}=function(e,t=400,a=100,r=10,n=10,s=10,l=22){let i=e.length;if(i<2)return{polylinePoints:"",areaPath:""};let o=t-r-n,c=a-s-l,u=e.map((e,t)=>({x:r+t/(i-1)*o,y:s+(1-e)*c}
1));return{polylinePoints:u.map(e=>`${e.x.toFixed(2)},${e.y.toFixed(2)}`).join(" "),areaPath:[`M ${u[0].x.toFixed(2)} ${u[0].y.toFixed(2)}`,...u.slice(1).map(e=>`L ${e.x.toFixed(2)} ${e.y.toFixed(2)}`),`L ${u[i-1].x.toFixed(2)} ${(s+c).toFixed(2)}`,`L ${u[0].x.toFixed(2)} ${(s+c).toFixed(2)}`,"Z"].join(" "),pts:u}}(function(e){if(!e||e.length<2)return e?.map(()=>.5)??[];let t=Math.min(...e),a=Math.max(...e);return a===t?e.map(()=>.5):e.map(e=>(e-t)/(a-t))}(a),400,100),l=Math.min(...a),i=Math.max(...a),o=a.reduce((e,t)=>e+t,0)/a.length,c=(e=a[0],t=a[a.length-1],!e||!t||isNaN(e)||isNaN(t)?null:(t-e)/e*100);return{polylinePoints:r,areaPath:n,pts:s,min:l,max:i,avg:o,changePct:c,isUp:(c??0)>=0,n:a.length}},[k]),P=(0,n.useMemo)(()=>_.map(e=>{let t=T?i(e,T):null;return{amount:e,from:C,to:x,formattedFrom:o(e,C),formattedResult:null!==t?o(t,x):null}}),[T,C,x]),q=(0,n.useCallback)(()=>{g(e=>(y(e),x))},[x]),W=(0,n.useCallback)(async()=>{if(null===D)return;let e=`${m} ${C} = ${o(D,x)} ${x}`;try{if("undefined"!=typeof navigator&&navigator.clipboard?.writeText)await navigator.clipboard.writeText(e);else{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select(),document.execCommand("copy"),document.body.removeChild(t)}}catch{try{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select(),document.execCommand("copy"),document.body.removeChild(t)}catch{}}F(!0),setTimeout(()=>F(!1),2e3)},[m,C,x,D]),H=(0,n.useCallback)(async()=>{if(null===D)return;let e=`${m} ${C} = ${o(D,x)} ${x}`,t=`${window.location.origin}/currency-converter/?amount=${encodeURIComponent(m)}&from=${encodeURIComponent(C)}&to=${encodeURIComponent(x)}`,a={title:`${C} to ${x} Currency Converter`,text:e,url:t};if("undefined"!=typeof navigator&&navigator.share&&navigator.canShare&&navigator.canShare(a))try{await navigator.share(a),E(!0),setTimeout(()=>E(!1),2500);return}catch{}let r=`${e}
2${t}`;try{if("undefined"!=typeof navigator&&navigator.clipboard?.writeText)await navigator.clipboard.writeText(r);else{let e=document.createElement("textarea");e.value=r,e.style.position="fixed",e.style.opacity="0",document.body.appendChild(e),e.focus(),e.select(),document.execCommand("copy"),document.body.removeChild(e)}}catch{try{let e=document.createElement("textarea");e.value=r,e.style.position="fixed",e.style.opacity="0",document.body.appendChild(e),e.focus(),e.select(),document.execCommand("copy"),document.body.removeChild(e)}catch{}}E(!0),setTimeout(()=>E(!1),2500)},[m,C,x,D]),U=l.yR[C],V=l.yR[x],G=`ccgrad-${C}-${x}`;return(0,r.jsxs)("div",{className:u.root,children:[(0,r.jsxs)("div",{className:u.rateBanner,children:[(0,r.jsxs)("div",{className:u.rateDisplay,children:[(0,r.jsxs)("span",{className:u.rateLabel,children:["1 ",C," ="]}),"loading"===S?(0,r.jsx)("span",{className:u.rateSkeletonLarge,"aria-label":"Loading rate"}):(0,r.jsx)("span",{className:u.rateNumber,children:T?o(T,x):"—"}),(0,r.jsx)("span",{className:u.rateLabel,children:x})]}),(0,r.jsxs)("div",{className:u.rateMetaRow,children:[(0,r.jsx)("span",{className:`${u.statusBadge} ${u[`status_${S}`]}`,children:"loading"===S?"Loading…":"live"===S?"● Live":"cache"===S?"◎ Cached":"fallback"===S?"◌ Offline":"—"}),j&&(0,r.jsxs)("span",{className:u.updatedAt,children:["Updated ",j]})]})]}),(0,r.jsxs)("div",{className:u.card,role:"region","aria-label":"Currency converter",children:[(0,r.jsxs)("div",{className:u.inputRow,children:[(0,r.jsx)("div",{className:u.selectWrap,children:(0,r.jsx)(c.A,{value:C,onChange:g,options:d,searchable:!0,ariaLabel:"From currency"})}),(0,r.jsx)("input",{className:u.amountInput,type:"number",inputMode:"decimal",value:m,onChange:e=>h(e.target.value),placeholder:"Amount",min:"0","aria-label":`Amount in ${C}`})]}),(0,r.jsx)("div",{className:u.swapRow,children:(0,r.jsx)("button",{className:u.swapBtn,onClick:q,"aria-label":`Swap ${C} and ${x}`,children:(0,r.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,r.jsx)("path",{d:"M7 16V4m0 0-3 3m3-3 3 3M17 8v12m0 0 3-3m-3 3-3-3"})})})}),(0,r.jsxs)("div",{className:u.inputRow,children:[(0,r.jsx)("div",{className:u.selectWrap,children:(0,r.jsx)(c.A,{value:x,onChange:y,options:d,searchable:!0,ariaLabel:"To currency"})}),(0,r.jsx)("div",{className:u.resultBox,"aria-live":"polite","aria-label":`Converted result in ${x}`,children:"loading"===S?(0,r.jsx)("span",{className:u.rateSkeleton}):null!==D?(0,r.jsx)("span",{className:u.resultNumber,children:o(D,x)}):(0,r.jsx)("span",{className:u.resultPlaceholder,children:"—"})})]}),(0,r.jsx)("div",{className:u.quickAmounts,role:"group","aria-label":"Quick amount presets",children:l.Cp.map(e=>(0,r.jsx)("button",{className:`${u.quickBtn}${m===String(e)?" "+u.quickBtnActive:""}`,onClick:()=>
2h(String(e)),"aria-label":`Set amount to ${e.toLocaleString()} ${C}`,"aria-pressed":m===String(e),children:e.toLocaleString()},e))}),(0,r.jsxs)("div",{className:u.actions,children:[(0,r.jsx)("button",{className:`${u.actionBtn}${A?" "+u.actionBtnCopied:""}`,onClick:W,"aria-label":"Copy conversion result to clipboard",disabled:null===D,children:A?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,r.jsx)("polyline",{points:"20 6 9 17 4 12"})})," Copied!"]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,r.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2"}),(0,r.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})," Copy"]})}),(0,r.jsx)("button",{className:`${u.actionBtn}${I?" "+u.actionBtnCopied:""}`,onClick:H,"aria-label":"Share conversion",disabled:null===D,children:I?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,r.jsx)("polyline",{points:"20 6 9 17 4 12"})}),"Link Copied!"]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,r.jsx)("path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8M16 6l-4-4-4 4M12 2v13"})}),"Share"]})})]})]}),(0,r.jsxs)("div",{className:u.chartSection,children:[(0,r.jsxs)("div",{className:u.chartHeader,children:[(0,r.jsxs)("h2",{className:u.chartTitle,children:[C," / ",x," Exchange Rate History"]}),(0,r.jsx)("div",{className:u.periodSelector,role:"group","aria-label":"Select chart period",children:p.map(([e,t])=>(0,r.jsx)("button",{className:`${u.periodBtn}${w===e?" "+u.periodBtnActive:""}`,onClick:()=>$(e),"aria-pressed":w===e,children:t},e))})]}),R?(0,r.jsx)("div",{className:u.chartSkeleton,role:"status","aria-label":"Loading chart"}):M?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("svg",{viewBox:"0 0 400 100",className:u.chartSvg,role:"img","aria-label":`${C} to ${x} exchange rate over ${w} days`,preserveAspectRatio:"none",children:[(0,r.jsx)("defs",{children:(0,r.jsxs)("linearGradient",{id:G,x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,r.jsx)("stop",{offset:"0%",stopColor:"#d4a843",stopOpacity:"0.28"}),(0,r.jsx)("stop",{offset:"100%",stopColor:"#d4a843",stopOpacity:"0.02"})]})}),(0,r.jsx)("path",{d:M.areaPath,fill:`url(#${G})`}),(0,r.jsx)("polyline",{points:M.polylinePoints,fill:"none",stroke:"#d4a843",strokeWidth:"1.8",strokeLinejoin:"round",strokeLinecap:"round"}),M.pts?.length>0&&(0,r.jsx)("circle",{cx:M.pts[M.pts.length-1].x,cy:M.pts[M.pts.length-1].y,r:"3.5",fill:"#d4a843",stroke:"rgba(212,168,67,0.3)",strokeWidth:"4"})]}),(0,r.jsxs)("div",{className:u.chartStats,children:[(0,r.jsxs)("div",{className:u.chartStat,children:[(0,r.jsx)("span",{className:u.statLabel,children:"High"}),(0,r.jsx)("span",{className:u.statValue,children:o(M.max,x)})]}),(0,r.jsxs)("div",{className:u.chartStat,children:[(0,r.jsx)("span",{className:u.statLabel,children:"Avg"}),(0,r.jsx)("span",{className:u.statValue,children:o(M.avg,x)})]}),(0,r.jsxs)("div",{className:u.chartStat,children:[(0,r.jsx)("span",{className:u.statLabel,children:"Low"}),(0,r.jsx)("span",{className:u.statValue,children:o(M.min,x)})]}),(0,r.jsxs)("div",{className:u.chartStat,children:[(0,r.jsx)("span",{className:u.statLabel,children:"Change"}),(0,r.jsx)("span",{className:`${u.statValue} ${M.isUp?u.statUp:u.statDown}`,children:function(e){if(null==e||isNaN(e))return null;let t=e>=0?"+":"";return`${t}${e.toFixed(2)}%`}(M.changePct)??"—"})]})]})]}):(0,r.jsxs)("div",{className:u.chartEmpty,children:["Historical data is not available for ",C,"/",x,"."]})]}),(0,r.jsxs)("div",{className:u.tableSection,children:[(0,r.jsxs)("div",{className:u.tableTitle,children:[C," to ",x," Conversion Table"]}),(0,r.jsxs)("table",{className:u.table,"aria-label":`${C} to ${x} conversion table`,children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsxs)("th",{className:u.th,children:[C," Amount"]}),(0,r.jsxs)("th",{className:u.th,children:[x," Amount"]})]})}),(0,r.jsx)("tbody",{children:P.map(e=>(0,r.jsxs)("tr",{className:u.tr,onClick:()=>h(String(e.amount)),tabIndex:0,role:"button",onKeyDown:t=>("Enter"===t.key||" "===t.key)&&h(String(e.amount)),"aria-label":`Set amount to ${e.amount} ${C}`,children:[(0,r.jsxs)("td",{className:u.td,children:[U?.symbol," ",e.formattedFrom]}),(0,r.jsx)("td",{className:`${u.td} ${u.tdResult}`,children:e.formattedResult?`${V?.symbol} ${e.formattedResult}`:(0,r.jsx)("span",{className:u.rateSkeleton})})]},e.amount))})]})]})]})}},97133:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var r=a(95155),n=a(12115),s=a(51179);
2function l({id:e,value:t,onChange:a,options:l,placeholder:o="Select…",searchable:c=!1,ariaLabel:u}){var d,_,p,m;let h,C,g,[x,y]=(0,n.useState)(!1),[b,v]=(0,n.useState)(""),[S,f]=(0,n.useState)(-1),j=(0,n.useRef)(null),N=(0,n.useRef)(null),k=(0,n.useRef)(null),L=l.find(e=>e.value===t);(0,n.useEffect)(()=>{let e=e=>{j.current&&!j.current.contains(e.target)&&(y(!1),v(""))};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,n.useEffect)(()=>{x&&c&&setTimeout(()=>N.current?.focus(),30),x||f(-1)},[x,c]);let w=b.trim()?l.filter(e=>e.label.toLowerCase().includes(b.toLowerCase())||e.code&&e.code.toLowerCase().includes(b.toLowerCase())||e.sub&&e.sub.toLowerCase().includes(b.toLowerCase())):l;(0,n.useEffect)(()=>{if(S>=0&&k.current){let e=k.current.querySelectorAll("button")[S];e?.scrollIntoView({block:"nearest"})}},[S]);let $=(0,n.useCallback)(e=>{if(!x){("Enter"===e.key||" "===e.key||"ArrowDown"===e.key)&&(e.preventDefault(),y(!0));return}if("Escape"===e.key){y(!1),v("");return}if("ArrowDown"===e.key&&(e.preventDefault(),f(e=>Math.min(e+1,w.length-1))),"ArrowUp"===e.key&&(e.preventDefault(),f(e=>Math.max(e-1,0))),"Enter"===e.key&&S>=0){let e=w[S];e&&(a(e.value),y(!1),v(""))}},[x,S,w,a]),R=(0,n.useCallback)(e=>{a(e),y(!1),v("")},[a]),B=w.some(e=>e.group);return(0,r.jsxs)("div",{className:s.wrap,ref:j,onKeyDown:$,children:[(0,r.jsxs)("button",{id:e,type:"button",className:`${s.trigger} ${x?s.triggerOpen:""}`,onClick:()=>y(e=>!e),"aria-haspopup":"listbox","aria-expanded":x,"aria-label":u??o,children:[L?.prefix&&(0,r.jsx)("span",{className:s.triggerPrefix,"aria-hidden":"true",children:L.prefix}),L?.code&&(0,r.jsx)("span",{className:s.triggerCode,children:L.code}),(0,r.jsx)("span",{className:s.triggerLabel,children:L?.label??o}),(0,r.jsx)("span",{className:`${s.triggerChevron} ${x?s.triggerChevronOpen:""}`,"aria-hidden":"true",children:"▼"})]}),x&&(0,r.jsxs)("div",{className:s.panel,role:"listbox","aria-label":u,children:[c&&(0,r.jsxs)("div",{className:s.searchWrap,children:[(0,r.jsx)("span",{className:s.searchIcon,"aria-hidden":"true",children:"\uD83D\uDD0D"}),(0,r.jsx)("input",{ref:N,type:"text",className:s.searchInput,value:b,onChange:e=>{v(e.target.value),f(-1)},placeholder:"Search…","aria-label":"Search options"})]}),(0,r.jsxs)("ul",{className:s.list,ref:k,role:"presentation",children:[0===w.length&&(0,r.jsx)("li",{className:s.empty,children:"No results"}),B?(d=w,_=t,p=S,m=R,h=[],C=new Set,g=0,d.forEach(e=>{let t=e.group??"";C.has(t)||(C.add(t),h.push({label:t,items:[]})),h[h.length-1].items.push({...e,_idx:g++})}),h.map(e=>(0,r.jsxs)("li",{children:[e.label&&(0,r.jsx)("div",{className:s.groupHeader,children:e.label}),(0,r.jsx)("ul",{role:"presentation",style:{listStyle:"none",margin:0,padding:0},children:e.items.map(e=>(0,r.jsx)(i,{opt:e,isSelected:e.value===_,isFocused:p===e._idx,onSelect:m},e.value))})]},e.label||"__none"))):w.map((e,a)=>(0,r.jsx)(i,{opt:e,isSelected:e.value===t,isFocused:S===a,onSelect:R},e.value))]})]})]})}function i({opt:e,isSelected:t,isFocused:a,onSelect:n}){return(0,r.jsx)("li",{role:"option","aria-selected":t,children:(0,r.jsxs)("button",{type:"button",className:`${s.option} ${t?s.optionSelected:""} ${a?s.optionFocused:""}`,onClick:()=>n(e.value),children:[e.prefix&&(0,r.jsx)("span",{className:s.optionPrefix,"aria-hidden":"true",children:e.prefix}),e.code&&(0,r.jsx)("span",{className:s.optionCode,children:e.code}),(0,r.jsx)("span",{className:s.optionLabel,children:e.label}),e.sub&&(0,r.jsx)("span",{className:s.optionSub,children:e.sub}),t&&(0,r.jsx)("span",{className:s.optionCheck,"aria-hidden":"true",children:"✓"})]})})}}}]);

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.