1import{d as I,u as O,q as A,dF as L,p as R,a2 as z,r as C,s as P,c as W,cR as j,e as y,o as f,h as s,f as v,b as N,g as t,w as _,i as l,t as i,j as d,_ as Z,M as S,aS as w,C as G,I as J,aY as K,az as Q,v as X}from"./Ky0_wSIA.js";import{_ as ee}from"./Cz9YfvTX.js";import{_ as te}from"./BrGJ72Mg.js";import{_ as oe}from"./CSaDBwFe.js";import{I as ae}from"./1qWV70bv.js";const ne={class:"mx-auto max-w-xs"},le={class:"modal__title text-center mr-0"},se={class:"text-center mb-6"},ie={class:"overflow-hidden max-h-px opacity-10"},me={class:"text-center"},ue={key:1,class:"text-center"},re={class:"text mb-6"},de=["innerHTML"],ce={key:0,class:"ui-modal__footer text-center leading-6"},pe={class:"flex-center"},ge=I({__name:"form-signup-outfitter",emits:["submit"],setup(fe,{emit:Y}){const T={foundationYear:"",companyName:"",email:"",contactName:"",phoneNumber:"",website:"",comment:""},{$t:V}=O(),q={path:"layout"},n=(m,e)=>V(m,e,q),M=A(L),{state:c,State:p}=R(),{query:$}=z(),F=Y,U=C(null),a=P(T),b=C("email"),h=Date.now(),D=W(()=>Date.now()-h<5*j),B=async m=>{if(c.value===p.Sending)return;if(c.value=p.Sending,a.foundationYear||D.value){setTimeout(()=>{c.value=p.Empty,g()},200);return}const{referralCode:e}=Q(),u=await X(()=>M.outfitterCreate({...a,timezoneId:Intl.DateTimeFormat().resolvedOptions().timeZone,referralCode:e}),{onError:m});c.value=p.Empty,u&&g()},g=()=>{b.value="success",F("submit")},x=(m,e)=>{w(null)||K(m,e)},{email:k}=$;return k&&(a.email=String(k)),(m,e)=>{const u=Z,r=ee,E=te,H=oe;return f(),y(J,null,[s("div",ne,[t(b)==="email"?(f(),N(H,{key:0,ref_key:"refForm",ref:U,"ignore-leave":"",onSubmit:B},{default:_(()=>[s("h1",le,i(n("Sign up as Outfitter")),1),s("div",se,[d(i(n("Already a BYH member?"))+" ",1),l(u,{to:m.$lr({name:"signin"}),inline:"",color:"black",underline:"",onClickCapture:e[0]||(e[0]=o=>x(o,t(S).Signin))},{default:_(()=>[d(i(n("Log in")),1)]),_:1},8,["to"])]),s("div",ie,[l(r,{modelValue:t(a).foundationYear,"onUpdate:modelValue":e[1]||(e[1]=o=>t(a).foundationYear=o),name:"foundationYear",label:n("Foundation year")},null,8,["modelValue","label"])]),l(r,{modelValue:t(a).companyName,"onUpdate:modelValue":e[2]||(e[2]=o=>t(a).companyName=o),name:"companyName",label:n("Company name"),autofocus:"",validation:"required"},null,8,["modelValue","label"]),l(r,{modelValue:t(a).email,"onUpdate:modelValue":e[3]||(e[3]=o=>t(a).email=o),type:"email",name:"email",label:n("Your email"),validation:"required|email"},null,8,["modelValue","label"]),l(r,{modelValue:t(a).contactName,"onUpdate:modelValue":e[4]||(e[4]=o=>t(a).contactName=o),name:"contactName",label:n("Contact person name"),validation:"required"},null,8,["modelValue","label"]),l(E,{modelValue:t(a).phoneNumber,"onUpdate:modelValue":e[5]||(e[5]=o=>t(a).phoneNumber=o),name:"phoneNumber",label:t(V)("Phone (optional)"),validation:"required"},null,8,["modelValue","label"]),l(r,{modelValue:t(a).website,"onUpdate:modelValue":e[6]||(e[6]=o=>t(a).website=o),name:"website",label:n("Web site url")},null,8,["modelValue","label"]),l(r,{modelValue:t(a).comment,"onUpdate:modelValue":e[7]||(e[7]=o=>t(a).comment=o),type:"textarea",name:"comment",label:n("Comment")},null,8,["modelValue","label"]),s("div",me,[l(u,{wide:"",type:"submit",loading:t(c)===t(p).Sending,"data-test":"submit",class:"mb-6"},{default:_(()=>[d(i(n("Continue")),1)]),_:1},8,["loading"])])]),_:1},512)):v("",!0),t(b)==="success"?(f(),y("div",ue,[l(t(ae),{class:"block flex-none mx-auto mb-4 text-primary"}),s("h1",null,i(n("Thank you.")),1),s("div",re,[s("div",{innerHTML:n("Your request has been successfully sent to our support team.")},null,8,de),s("div",null,i(n("We will contact you soon.")),1)]),t(w)(null)?v("",!0):(f(),N(u,{key:0,onClick:e[8]||(e[8]=o=>t(G)(null))},{default:_(()=>[d(i(n("Close")),1)]),_:1}))])):v("",!0)]),t(b)!=="success"?(f(),y("div",ce,[s("div",pe,[d(i(n("Hunter?"))+" ",1),l(u,{to:m.$lr({name:"signup"}),inline:"",color:"black",underline:"",class:"ml-1",onClickCapture:e[9]||(e[9]=o=>x(o,t(S).Signup))},{default:_(()=>[d(i(n("Sign up as Hunter.")),1)]),_:1},8,["to"])])])):v("",!0)],64)}}});export{ge 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.