1import{d as A,l as N,ai as z,m as B,aK as O,r as v,o as V,b0 as $,ab as D,c as r,f as s,g as p,G as b,t as a,e as C,i as f,F as w,y as k,q as S,aO as P,ad as F,z as T,b as o,b1 as j,D as L}from"#entry";const M={class:"size-full"},U={class:"m-10 mx-auto flex max-w-screen-xl flex-row justify-between"},E={class:"w-[70%]"},G={class:"flex flex-row items-center text-sm font-semibold"},K={key:0,class:"mt-4 border-b border-gray-200 pb-8 text-2xl font-semibold"},Q={class:"text-lg font-semibold text-charcoal"},H={class:"mb-2 flex flex-row items-center text-xs text-gray-500"},J={key:1},W={class:"mt-2 text-sm"},X={class:"mt-5 w-1/4"},Y=["onClick"],se=A({__name:"index",setup(Z){const i=v(!1),{$api:I}=N(),c=z(),q=B();O({validateOnBlur:!0,validateOnChange:!0,validateOnInput:!1,validateOnModelUpdate:!0});const l=v([]),u=v([]),d=v({}),n=v("All categories"),x=v(c.query.query);V(async()=>{i.value=!0,await g(),i.value=!1}),$(async()=>{x.value!==c.query.query?(l.value=[],u.value=[],d.value={},n.value="All categories",x.value=c.query.query,i.value=!0,await g(),i.value=!1):x.value=c.query.query});async function g(){const h=await I.post("/knowledge",{SearchPhrase:c.query.query,Persona:q.isOnFirmSide?["All users (Instead)","Tax professionals (Instead Pro)"]:["All users (Instead)"],Visibility:"helpcenter"});l.value=h.SearchResults;for(const t of l.value)d.value[t.Category]?d.value[t.Category].push(t):d.value[t.Category]=[t];u.value=l.value}function y(h){n.value=h,n.value==="All categories"?u.value=l.value:u.value=l.value.filter(t=>t.Category===n.value)}return(h,t)=>{const _=P,m=T("VIcon"),R=F("loading");return D((o(),r("div",M,[s("div",U,[s("div",E,[s("div",G,[p(_,{to:"/help"},{default:b(()=>[...t[1]||(t[1]=[s("span",{class:"cursor-pointer text-charcoal underline"},"Instead help center",-1)])]),_:1}),p(m,{icon:"ChevronRightIcon",class:"mx-2 size-3.5"}),t[2]||(t[2]=s("span",null,"Search results",-1))]),i.value===!1?(o(),r("h2",K,a(u.value.length)+' results for "'+a(C(c).query.query)+'" in '+a(n.value),1)):f("",!0),(o(!0),r(w,null,k(u.value,e=>(o(),r("div",{key:e.Identifier,class:"border-b border-gray-200 py-4"},[p(_,{to:`/help/article/${e.Identifier}/${C(j)(e.Name)}`},{default:b(()=>[s("h3",Q,a(e.Name),1)]),_:2},1032,["to"]),s("div",H,[s("span",null,a(e.Persona),1),p(m,{icon:"ChevronRightIcon",class:"mx-2 size-[12px]"}),s("span",null,a(e.Category),1),p(m,{icon:"ChevronRightIcon",class:"mx-2 size-[12px]"}),s("span",null,a(e.Topic),1),e.Subtopic?(o(),L(m,{key:0,icon:"ChevronRightIcon",class:"mx-2 size-[12px]"})):f("",!0),e.Subtopic?(o(),r("span",J,a(e.Subtopic),1)):f("",!0)]),s("p",W,a(e.Content.slice(e.Name.length).substring(0,350).concat("...")),1)]))),128))]),s("div",X,[t[3]||(t[3]=s("h2",{class:"mt-4 pb-4 text-lg font-semibold"}," By Category ",-1)),s("ul",null,[s("li",{class:S(["w-3/4 clickable px-4 py-2 text-sm font-semibold",n.value==="All categories"?"text-white bg-charcoal rounded-md":"text-charcoal"]),onClick:t[0]||(t[0]=e=>y("All categories"))}," All categories ("+a(l.value.length)+") ",3),(o(!0),r(w,null,k(Object.keys(d.value),e=>(o(),r("li",{key:e,class:S(["w-3/4 clickable px-4 py-2 text-sm font-semibold",n.value===e?"text-white bg-charcoal rounded-md":"text-charcoal"]),onClick:ee=>y(e)},a(e)+" ("+a(d.value[e].length)+") ",11,Y))),128))])])])])),[[R,i.value]])}}});export{se as default};
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.