PageSourceSearch

https://www.foxy.io/_nuxt/2905ff5e74a8/CMR_pxYb.js

js foxy.io collected 2026-10-02 14:44:49 UTC 8,072 bytes, 1 lines download raw bytes

1import{d as H,y as h,J as N,o as s,f as i,s as I,h as e,i as t,v as M,C as T,G as ee,$ as te,n as _,k as j,D as V,w as F,u as se,j as x,E as P,F as b,r as R,t as D,x as Q,m as $,_ as ae,l as q,g as L,q as oe,Q as ne,a as ie,A as re,p as le,N as ce}from"./C1jBHEen.js";import{u as U}from"./KPFNJGNi.js";import{u as ue,a as de,b as pe}from"./DoZZqGBy.js";import{o as ye}from"./u89eJZtD.js";const _e={class:"input-card-form"},fe={class:"input-group input-group-merge"},me=["autofocus"],he={key:0,class:"input-group-append input-group-text d-none d-md-flex zi-1",id:"search-shortcut"},ve=H({__name:"SearchInput",props:{autofocus:{type:Boolean}},setup(k){const o=h("type"),f=h("query"),{on:l,emit:w}=U(),m=j(null);return N(()=>{l("search:open",()=>{o?.value!=="modal"&&m.value?.focus(),setTimeout(()=>{m.value?.focus()},300)}),l("search:close",()=>{m.value?.blur()})}),(d,r)=>(s(),i("div",{class:I(["input-card border",{"sticky-input":e(o)==="full"}])},[t("div",_e,[t("div",fe,[r[3]||(r[3]=t("span",{class:"input-group-prepend input-group-text zi-1"},[t("i",{class:"fal fa-search"})],-1)),M(t("input",{type:"text",class:"form-control zi-0",id:"searchForAnswers",ref_key:"input",ref:m,placeholder:"Search for answers","aria-label":"Search for answers","onUpdate:modelValue":r[0]||(r[0]=c=>ee(f)?f.value=c:null),autofocus:k.autofocus,"aria-describedby":"search-shortcut",style:T(e(o)!=="modal"?"padding-right: 5rem;":void 0),onFocus:r[1]||(r[1]=c=>e(w)("search:focus"))},null,44,me),[[te,e(f)]]),e(o)!=="modal"?(s(),i("span",he,[...r[2]||(r[2]=[t("span",{class:"avatar avatar-xs border bg-white"},[t("span",{class:"avatar-initials"},"/")],-1)])])):_("",!0)])])],2))}}),ke=Object.assign(V(ve,[["__scopeId","data-v-3dc8734f"]]),{__name:"SearchInput"}),ge={class:"card card-bordered card-sm mx-md-0 mt-1"},xe={class:"card-header"},be={class:"w-100",style:{"overflow-y":"auto"}},we={style:{"white-space":"nowrap"}},Se=["id","onClick"],Ie={class:"card-header border-top"},$e={class:"d-flex align-items-center"},Ce={key:0,class:"h5 card-header-title"},De={key:1,class:"h5 card-header-title"},qe={key:0,class:"d-flex justify-content-center py-7"},Te={key:0},je={class:"py-1 px-4 bg-light text-uppercase fw-bold"},He=["data-insights-index","data-insights-query-id"],ze={class:"flex-shrink-0"},Be={class:"svg-icon text-primary"},Re={class:"flex-grow-1 ms-3"},Le=["innerHTML"],Me=["innerHTML"],Oe={key:0,class:"px-3"},Ae={key:1,class:"px-3"},Ee=H({__name:"SearchResult",async setup(k){let o,f;const{resolver:l}=([o,f]=F(()=>se()),o=await o,f(),o),{trackEvent:w}=ue(),{trackHitsViewed:m}=de(),d=h("type"),r=h("results"),c=h("loading"),y=h("query"),C=h("indices"),S=h("totalHits")||x(()=>0),p=j("all"),z=x(()=>C?.find(a=>a.key===p.value)),G=a=>{p.value=a??"all"},O=a=>C?.find(n=>n.key===a),B=x(()=>r?.value?.find(a=>a.key===p.value)),J=a=>a.sort((n,v)=>n.importance<v.importance?1:n.importance>v.importance?-1:0),K=(a,n,v)=>{a.queryID&&w("algolia_click",{index:a.key,queryID:a.queryID,objectID:n.objectID,position:v+1})},A=new Set;P([()=>r?.value,()=>c?.value,p],async()=>{if(!c?.value){await ne();for(const a of r?.value??[]){if(!a.queryID||!a.nbHits||p.value!=="all"&&p.value!==a.key)continue;const n=`${a.key}:${a.queryID}`;A.has(n)||(A.add(n),m(a.key,a.queryID))}}},{immediate:!0});const W=x(()=>d==="full"?"":"position-absolute"),X=x(()=>c?.value?`Searching for "${y?.value}"`:`Search results for "${y?.value}"`+(z.value?.name!=="All"?` in "${z.value?.name}"`:"")),Y=x(()=>`Sorry, we found 0 results for "${y?.value}" in "${z.value?.name}"`),Z=x(()=>d!=="full"?"max-height: 42vh; overflow-y: auto;":"");return(a,n)=>{const v=ae;return e(y)&&e(y)!==""?(s(),i("div",{key:0,class:I([e(W),"w-100 zi-1"])},[t("div",ge,[t("div",xe,[t("div",be,[t("div",we,[(s(!0),i(b,null,R(e(C),u=>(s(),i("button",{class:I(["btn btn-xs rounded-pill m-1",e(p)===u.key?"btn-primary":"btn-soft-primary"]),id:u.key,onClick:g=>G(u.key)},D(u.name),11,Se))),256))])])]),t("div",Ie,[t("div",$e,[!e(c)&&(e(S)===0&&e(y)!==""||e(B)?.nbHits===0)?(s(),i("b",Ce,D(e(Y)),1)):(s(),i("b",De,D(e(X)),1))])]),e(c)?(s(),i("div",qe,[...n[0]||(n[0]=[t("div",{class:"spinner-grow text-primary",role:"status"},[t("span",{class:"visually-hidden"},"Loading...")],-1)])])):_("",!0),e(c)?_("",!0):(s(),i("div",{key:1,style:T(e(Z))},[e(S)>0||e(B)?.nbHits?(s(),i("div",Te,[(s(!0),i(b,null,R(e(r),u=>(s(),i(b,null,[u.nbHits>0&&(e(p)==="all"||e(p)===u.key)?(s(),i(b,{key:0},[M(t("div",je,[t("small",null,D(O(u.key)?.name),1)],512),[[Q,e(p)==="all"]]),t("div",{class:"list-group list-group-flush","data-insights-index":u.key,"data-insights-query-id":u.queryID},[(s(!0),i(b,null,R(e(d)==="full"?J(u.hits):u.hits.slice(0,5),(g,E)=>(s(),$(v,{to:e(l).byUuid(g.objectID,{context:g.context}),class:"list-group-item list-group-item-action d-flex","data-aos":"fade-up","data-insights-object-id":g.objectID,"data-insights-position":E+1,onClick:Qe=>K(u,g,E)},{default:q(()=>[t("div",ze,[t("span",Be,[t("i",{class:I("fs-2 fal "+O(u.key)?.icon)},null,2)])]),t("div",Re,[t("b",{innerHTML:g._highlightResult?.title?.value},null,8,Le),n[1]||(n[1]=t("br",null,null,-1)),t("small",{innerHTML:g._highlightResult?.content?.value},null,8,Me)])]),_:2},1032,["to","data-insights-object-id","data-insights-position","onClick"]))),256))],8,He)],64)):(s(),i(b,{key:1},[e(p)==u.key?(s(),i("div",Oe,[L(v,{to:"/contact"},{default:q(()=>[...n[2]||(n[2]=[t("div",{class:"alert alert-soft-primary",role:"alert"},[t("h5",{class:"alert-heading"}," Can't find the answers you're looking for? "),t("span",null,"Our team is here to help. Please click here to contact us.")],-1)])]),_:1})])):_("",!0)],64))],64))),256))])):_("",!0),e(S)===0&&e(y)!==""?(s(),i("div",Ae,[L(v,{to:"/contact"},{default:q(()=>[...n[3]||(n[3]=[t("div",{class:"alert alert-soft-primary",role:"alert"},[t("h5",{class:"alert-heading"}," Can't find the answers you're looking for? "),t("span",null,"Our team is here to help. Please click here to contact us.")],-1)])]),_:1})])):_("",!0)],4)),e(d)!=="full"&&!e(c)&&e(p)=="all"&&e(S)>0||e(p)!="all"&&e(B)?.nbHits?(s(),$(v,{key:2,to:`/search/?q=${e(y)?.toLowerCase()}`,class:"fw-bold card-footer link-primary border-top"},{default:q(()=>[...n[4]||(n[4]=[oe(" See more results ",-1),t("i",{class:"fas fa-chevron-right ms-1"},null,-1)])]),_:1},8,["to"])):_("",!0)])],2)):_("",!0)}}}),Ne=Object.assign(V(Ee,[["__scopeId","data-v-bb4ff8d8"]]),{__name:"SearchResult"}),Ve=H({__name:"SearchContent",props:{visible:{type:Boolean}},setup(k){const o=h("type"),f=h("initiated"),l=j(!1),w=ie(),m=j(),{emit:d,on:r}=U();return P(()=>w.fullPath,()=>{o==="modal"&&l.value&&d("search:close")}),ye(m,()=>{d("search:close")}),N(()=>{r("search:focus",()=>{l.value=!0}),r("search:blur",()=>{l.value=!1}),r("search:open",()=>{l.value=!0}),r("search:close",()=>{l.value=!1}),document.addEventListener("keydown",c=>{c.key==="/"&&(c.preventDefault(),d("search:open")),c.key==="Escape"&&d("search:close")})}),(c,y)=>{const C=ke,S=Ne;return M((s(),i("div",{class:I(e(o)==="modal"?"position-fixed top-0 start-0 w-100 h-100 content-space-2":"position-relative"),style:T({zIndex:e(o)==="full"?0:9})},[e(l)&&e(o)!=="full"?(s(),i("div",{key:0,class:"position-fixed w-100 h-100 to
1p-0 start-0 bg-primary opacity-75",onClick:y[0]||(y[0]=p=>e(d)("search:close"))})):_("",!0),t("form",{class:I(e(o)==="modal"?"container-sm":""),onSubmit:y[1]||(y[1]=re(()=>{},["prevent"]))},[t("div",{id:"search",ref_key:"modal",ref:m,class:"position-relative w-100 mx-auto zi-3",style:T([{"max-width":"750px"},{zIndex:e(o)==="full"?0:10}])},[L(C),(e(o)==="full"||e(l))&&e(f)?(s(),$(S,{key:0})):_("",!0)],4)],34)],6)),[[Q,e(o)!=="modal"||e(l)]])}}}),Fe=Object.assign(Ve,{__name:"SearchContent"}),Pe=H({__name:"Search",props:{type:{}},async setup(k){let o,f;const l=k;return[o,f]=F(()=>pe({initOnMount:l.type=="full",provideToChildren:!0,type:l.type})),await o,f(),le("type",l.type),(w,m)=>{const d=Fe;return s(),i(b,null,[(s(),$(ce,{to:"#search-area"},[k.type==="modal"?(s(),$(d,{key:0})):_("",!0)])),k.type!=="modal"?(s(),$(d,{key:0})):_("",!0)],64)}}}),We=Object.assign(Pe,{__name:"Search"});export{We as _};

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.