function o(n,r,d){const s=new Map([["redocly_category",{name:"Category",field:"redocly_category",type:"multi-select",values:[]}],["httpMethod",{name:"HTTP Method",field:"httpMethod",type:"tags",values:[]}],["httpPath",{name:"HTTP Path",field:"httpPath",type:"multi-select",values:[],queryable:!0}],["apiTitle",{name:"API Title",field:"apiTitle",type:"multi-select",values:[]}],["apiVersion",{name:"API Version",field:"apiVersion",type:"select",values:[]}]]);n.forEach((e,t)=>{const{queryable:i}=s.get(e.field)||{};s.set(e.field,{...i?{queryable:i}:{},...e,values:[],index:++t})});const a=new Map([...s.entries()].sort((e,t)=>e[1].index&&t[1].index?e[1].index-t[1].index:e[1].index&&!t[1].index?1:!e[1].index&&t[1].index?-1:0)),l=r();l.size&&a.forEach((e,t)=>{const i=l.get(t);i&&(e.values=i.values)}),d(a)}export{o as resolveSearchFacets};
