PageSourceSearch

https://asthma.net/_nuxt/DoLF3TUQ.js

js asthma.net collected 2026-10-03 21:31:44 UTC 6,380 bytes, 1 lines download raw bytes

1import{_ as ie}from"./Djn93nbf.js";import{_ as me}from"./BzeN7z0j.js";import{_ as E,o as u,a as x,w as f,e as i,a9 as B,m as de,aH as le,ay as _e,aI as pe,az as fe,k as ge,u as he,aJ as xe,aB as h,aK as ye,aL as M,aM as D,aN as ve,p as Se,aA as Te,b as l,a5 as o,d as Ce,t as U,q as O,c as R,g as $e,f as ke,s as be,A as c}from"./Bv6rD22K.js";import{u as q}from"./C7yT8Dih.js";import{_ as we}from"./BKVVQxuU.js";import{_ as Fe}from"./r081ezcI.js";import{_ as Oe}from"./D9n9N6J4.js";import{A as Re}from"./Bz23-Ns9.js";import{S as Ae}from"./QHpKS67c.js";import{u as qe}from"./BLpgbMCi.js";import{c as Ee}from"./ZNiQiSmP.js";import"./COtxoU-H.js";import"./ChFH_etC.js";import"./DJ6jjTd3.js";import"./KjFEp5XW.js";import"./NdmdrM1v.js";import"./DhxosPtj.js";import"./B7hmZjMN.js";import"./CXJsqkHJ.js";import"./DIPFThub.js";import"./B2INmLdn.js";import"./CeJCG0WW.js";import"./CCxC4gXk.js";import"./z4ZVdS0n.js";const Ne={name:"ForumSort",props:{selected:{type:String,default:"RECENT"}},data(){return{sortOptions:[{value:"RECENT",name:"Recent",selected:!0},{value:"POPULAR",name:"Popular",selected:!1},{value:"UNANSWERED",name:"Unanswered",selected:!1}]}},computed:{optionsWithSelection(){return this.sortOptions.map(t=>(t.value===this.selected?t.selected=!0:t.selected=!1,t))}}};function Ie(t,n,_,y,C,s){const r=B;return u(),x(r,{id:"forum-sort-select",options:s.optionsWithSelection,onChange:n[0]||(n[0]=$=>t.$emit("change",$))},{default:f(()=>[...n[1]||(n[1]=[i("span",{class:"visually-hidden"},"Select a forum sorting option",-1)])]),_:1},8,["options"])}const Le=Object.assign(E(Ne,[["render",Ie]]),{__name:"ForumSort"}),Me={name:"ForumTagSelect",props:{forumTags:{type:Array,required:!0}},computed:{...de(q,["selectedTags"]),selected(){return this.selectedTags[0]||""},forumTagsToOptions(){return this.forumTags.map(t=>({name:t.name,value:t.id,selected:t.id===this.selected}))},tagOptions(){return[{name:"Category",value:""}].concat(this.forumTagsToOptions)}},methods:{onChange(t){q().setSelectedTags(t?[t]:[])}}};function De(t,n,_,y,C,s){const r=B;return u(),x(r,{id:"forum-tag-select",options:s.tagOptions,onChange:s.onChange},{default:f(()=>[...n[0]||(n[0]=[i("span",{class:"visually-hidden"},"Select forum tags",-1)])]),_:1},8,["options","onChange"])}const Ue=Object.assign(E(Me,[["render",De]]),{__name:"ForumTagSelect"}),Be={class:"forums-index","data-test-id":"forums-index"},Pe={class:"forums-index__browsing-controls"},He={key:0,class:"forums-index__action"},Ve={key:1,class:"forums-index__showing-results-text"},Je={class:"forums-index__content"},Qe={key:1,class:"forums-index__threads"},We={class:"forums-index__tag-picker"},A=10,je="Sorry, we couldn’t find any topics that match.",Ge="/create-thread",Ye="Start a discussion",ze=le({__name:"index",emits:["loaded"],async setup(t,{emit:n}){let _,y;const C=n,s=_e(),r=pe(),$=fe(),k=ge(),N=q(),P=he(),{pageIsOnTwoOrMore:H}=qe(),{selectedTags:b,refetchForumIndex:V}=xe(N),g=h([]),I=h([]),L=h({}),v=h(0),w=h(s.query.sort||"RECENT"),F=c(()=>parseInt(s.query.page,10)||1),m=c(()=>s.query.term||""),J=c(()=>Math.ceil(v.value/A)),{data:Q}=([_,y]=ye(()=>M(Re)),_=await _,y(),_),S=c(()=>Q.value?.forumTags||[]),W=c(()=>({page:F.value,query:m.value,index:"FORUM",searchSort:w.value,tagIds:b.value,limit:A,includeEngagement:!0})),{data:j,pending:G,refetch:Y}=M(Ae,W),z=c(()=>m.value?S.value.filter(e=>I.value.includes(e.id)):S.value),K=()=>{P.updateGlobalContext({search:{type:"Forums Index",query:g.value.map(a=>a.id)},featuredContent:{location:"Forums Index",ids:g.value.filter(a=>a.isFeatured).map(a=>a.id)}});const e=JSON.stringify({...L.value,post_categories:["forums"],has_user_generated_content:!0});C("loaded",e)},X=e=>{m.value!==e&&r.push({query:{...s.query,term:e,page:1}})},Z=()=>{r.push({name:"createThread"})},ee=e=>{typeof e=="string"&&(w.value=e,r.push({query:{...s.query,sort:e,page:1}}))};D(j,e=>{if(!e?.search){g.value=[];return}const{searchResults:a,total:d,tagIds:p,dataLayer:T}=e.search;L.value=T?JSON.parse(T):{},v.value=d||0,I.value=p||[],g.value=a||[],K()},{immediate:!0}),D(b,()=>{s.name==="forums"&&r.replace({query:{...s.query,tagId:b.value,page:1}})},{deep:!0}),ve(()=>{V.value&&(Y(),N.setRefetchForumIndex(!1))});const te=c(()=>{const e=`page ${F.value} of ${J.value}`,d=`${k.site.defaultMeta?.["metadesc-forum"]||"Community forums."} ${e}`,p=[{name:"description",content:d},{property:"og:description",content:d},{property:"twitter:description",content:d}];return(!k.siteHasFeature("Forums")||H.value)&&p.push({name:"robots",content:"noindex"}),p});return Se({title:"Forums",meta:te}),Te([c(()=>Ee("Forum",v.value,s.path,$.$hostname,k.site.settings.condition_name))]),(e,a)=>{const d=ie,p=me,T=Le,se=Ue,oe=ke,ae=$e,ne=be,re=we,ce=Fe,ue=Oe;return u(),x(ue,{name:"default","show-leaderboard-ad":""},{default:f(()=>[i("div",Be,[l(p,{class:"ugc-index-header--forums",heading:"Forums"},{subtitle:f(()=>[Ce(" Read conversations, start a discussion, and connect with others about "+U(e.$site.settings.condition_name)+". ",1)]),cta:f(()=>[i("button",{class:"button","data-test-id":"forums-index-header-cta-button",onClick:Z},"Start a discussion "),l(d,{"data-test-id":"forums-index-header-search",placeholder:"Search discussions","aria-label":"Search discussions",term:o(m),onSearch:X},null,8,["term"])]),_:1}),i("div",Pe,[l(T,{class:"forums-index__sort","data-test-id":"forums-index-sort",selected:o(w),onChange:ee},null,8,["selected"]),o(S).length>0?(u(),x(se,{key:0,class:"forums-index__tag-select","forum-tags":o(S)},null,8,["forum-tags"])):O("",!0)]),o(m).length>0?(u(),R("div",He,[l(ae,{to:{name:"forums"},class:"forums-index__back"},{default:f(()=>[l(oe,{name:"caret",title:"caret icon",class:"forums-index__icon icon--small"}),a[0]||(a[0]=i("span",{class:"forums-index__back-text"}," Back to all discussions ",-1))]),_:1})])):O("",!0),o(m)?(u(),R("div",Ve," Showing results for '"+U(o(m))+"' ",1)):O("",!0),i("div",Je,[o(G)?(u(),x(ne,{key:0})):(u(),R("div",Qe,[l(re,{items:o(g),"current-page":o(F),"total-count":o(v),"per-page":A,class:"forums-index__thread","data-test-id":"forums-index-thread","exclude-ads":"","empty-message":je,"empty-message-link-to":Ge,"empty-message-link-text":Ye}
1,null,8,["items","current-page","total-count"])])),i("div",We,[l(ce,{"forum-tags":o(z),"within-form":!1},null,8,["forum-tags"])])])])]),_:1})}}}),St=E(ze,[["__scopeId","data-v-859372a1"]]);export{St 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.