PageSourceSearch

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

js asthma.net collected 2026-10-03 21:32:38 UTC 5,492 bytes, 1 lines download raw bytes

1import{aF as V,a6 as w,_ as b,o as l,a as f,w as u,b as s,K as T,L as F,d as i,e as a,n as $,q as L,t as S,W as U,i as M,y,J as h,M as N,V as B,p as A,aG as E,az as D,c as g,g as P}from"./Bv6rD22K.js";import{_ as W}from"./DUYGzM1o.js";import{_ as j,a as q,u as z}from"./OZtbS5NT.js";import{_ as H}from"./CFpRtxR4.js";import{a as O}from"./Bcd6_2Ce.js";import{_ as R}from"./D9n9N6J4.js";const Y={name:"CreateStoryForm",setup(){const{appendImages:e,images:t,hasImage:c,handleImageUploadClick:o}=z();return{appendImages:e,images:t,hasImage:c,handleImageUploadClick:o,v$:N()}},data(){return{submitting:!1,postTitle:"",postContent:"",notifyMe:!0}},validations(){return{postTitle:{required:h},postContent:{required:h}}},computed:{userIsLoggedIn(){return y().userIsLoggedIn},userIsUnverified(){return y().userIsUnverified}},methods:{...V(w,["openVerificationPrompt"]),handleFocusInput(){this.userIsLoggedIn&&this.userIsUnverified&&this.openVerificationPrompt({dialogHeading:"Verify your account"})},updateNotifyMe({checked:e}){this.notifyMe=e},transformContent(){return this.appendImages(this.postContent)},handleSubmit(){if(this.submitting=!0,this.v$.$touch(),this.$refs.postTitleValidation.checkErrors(),this.$refs.postContentValidation.checkErrors(),this.v$.$invalid){this.submitting=!1;return}this.createStory()},createStory(){this.$apollo.mutate({mutation:O,variables:{postTitle:this.postTitle,postContent:this.transformContent(),notifyMe:this.notifyMe}}).then(({data:e})=>{e.createStory&&this.$emit("submitted")}).catch(()=>{})}}},G={class:"disclaimer-text"};function J(e,t,c,o,n,r){const m=T,p=F,_=W,v=j,x=q,C=H,I=U,k=B;return l(),f(k,{onSubmit:M(r.handleSubmit,["prevent"])},{default:u(()=>[s(m,{ref:"postTitleValidation",model:n.postTitle,validator:o.v$.postTitle},null,8,["model","validator"]),s(p,{id:"createStoryTitleInput",modelValue:n.postTitle,"onUpdate:modelValue":t[0]||(t[0]=d=>n.postTitle=d),class:"text-input--full-width",onFocus:r.handleFocusInput},{default:u(()=>[...t[3]||(t[3]=[i("Title",-1)])]),_:1},8,["modelValue","onFocus"]),a("div",{class:$(["validation-group",{"validation-group--invalid":o.v$.postContent?.$error}])},[s(m,{ref:"postContentValidation",class:"validation-error--label",model:n.postContent,validator:o.v$.postContent},null,8,["model","validator"]),s(_,{id:"body",modelValue:n.postContent,"onUpdate:modelValue":t[1]||(t[1]=d=>n.postContent=d),class:"textarea--large",onFocus:r.handleFocusInput},{default:u(()=>[...t[4]||(t[4]=[i("Your Story",-1)])]),_:1},8,["modelValue","onFocus"])],2),o.hasImage?(l(),f(v,{key:0,modelValue:o.images,"onUpdate:modelValue":t[2]||(t[2]=d=>o.images=d)},null,8,["modelValue"])):L("",!0),s(x,{onClick:o.handleImageUploadClick},null,8,["onClick"]),a("p",G,[t[5]||(t[5]=i(" By clicking the submit button below, you acknowledge that your entry is subject to our ",-1)),t[6]||(t[6]=a("a",{target:"_blank",href:"https://health-union.com/terms-of-use/",rel:"noopener"},"terms of use",-1)),i(". All stories will be held for review prior to publication. Story submissions may be published in forums if content is most appropriate to be shared in that venue. "+S(e.$site.name)+" reserves the right to not publish submitted stories, or to edit stories that do not meet these guidelines. ",1)]),s(C,{id:"createStoryNotifyInput",value:"notify",checked:n.notifyMe,class:"checkbox--opt-in",onInput:r.updateNotifyMe},{default:u(()=>[...t[7]||(t[7]=[i(" Notify me of replies ",-1)])]),_:1},8,["checked","onInput"]),s(I,{class:"button--center"},{default:u(()=>[...t[8]||(t[8]=[i("Submit",-1)])]),_:1})]),_:1},8,["onSubmit"])}const K=Object.assign(b(Y,[["render",J]]),{__name:"CreateStoryForm"}),Q={name:"CreateStory",setup(){A({title:"Submit your story",meta:[{name:"robots",content:"noindex"}]});const e=E(),{$site:t}=D();return{dataLayerStore:e,site:t}},data(){return{storySubmitted:!1}},computed:{condition(){return this.site?.settings?.condition_name}},mounted(){this.onLoad()},methods:{handleStorySubmitted(){window.scrollTo(0,0),this.storySubmitted=!0},onLoad(){this.dataLayerStore.setDataLayer({post_categories:["stories"],has_user_generated_content:!0})}}},X={class:"ugc-create ugc-create--story"},Z={key:0,class:"ugc-create__submission"},tt={class:"ugc-create__disclaimer","data-test-id":"ugc-create-disclaimer"},et={key:1,class:"ugc-create__confirmation","data-test-id":"ugc-create-confirmation"};function ot(e,t,c,o,n,r){const m=K,p=P,_=R;return l(),f(_,{name:"default","show-leaderboard-ad":""},{default:u(()=>[a("div",X,[n.storySubmitted?(l(),g("div",et,[t[2]||(t[2]=a("h2",{class:"ugc-create__confirmation-heading heading--3","data-test-id":"ugc-create-confirmation-heading"}," We've received your story! ",-1)),t[3]||(t[3]=a("p",{class:"ugc-create__confirmation-text"}," We'll send you an email when your story has been approved and published. ",-1)),s(p,{to:"/stories"},{default:u(()=>[...t[1]||(t[1]=[i("Back to stories",-1)])]),_:1})])):(l(),g("div",Z,[t[0]||(t[0]=a("h1",{class:"ugc-create__heading","data-test-id":"ugc-create-heading"}," Submit your story ",-1)),a("p",tt," Stories must be original and focus on how "+S(r.condition)+" has impacted you or a loved one. Please do not submit a link to or a copy of a story posted elsewhere. For your safety, do not include any personal contact info. ",1),s(m,{class:"ugc-create__form","data-test-id":"
1create-story-form",onSubmitted:r.handleStorySubmitted},null,8,["onSubmitted"])]))])]),_:1})}const dt=b(Q,[["render",ot],["__scopeId","data-v-50992d24"]]);export{dt 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.