vendor: 2,178 bytes, line 1
1import{L as be,ap as ce,Q as we,bo as ke,ai as he,y as A,dQ as oe,r as i,z as W,T as Ie,bB as Ce,e as t,a0 as ee,F as ae,bq as xe,bD as Se,_ as me,l as pe,d as f,c as V,w as r,h as K,p as ze,k as n,aS as _e,f as S,n as w,m as te,i as Y,cw as Ae,an as Pe,aJ as ne,H as se,I as Re,o as Fe,cq as Ue,aF as De,aT as Ne,E as Be,J as Te,dR as Ee,K as ie,j as Me,V as C}from"./DHGTtAq-.js";import{u as je}from"./A3DB2UGK.js";import{d as Le}from"./DmS1YuBu.js";import{_ as Oe}from"./CKmPA6-I.js";import{a as $e,b as fe,V as ve}from"./CKyHcaV6.js";import{m as qe,f as Ge,a as He,b as Je,V as q}from"./SmBE1qh4.js";import{a as Qe,u as Ke,V as re}from"./C5f01t51.js";import{f as We}from"./C-GTDzx5.js";import{V as Ye}from"./CW1udp8L.js";import{V as Xe}from"./0KdUN-xV.js";import{V as Ze}from"./DsRtKimg.js";import{V as ea}from"./BTA0iyxm.js";import{V as ue}from"./DN0MYjD1.js";import{V as de}from"./CJSA91_B.js";import"./BosuxZz1.js";import"./DY7PVvcf.js";import"./BH_KmG51.js";import"./D22sBgxU.js";import"./D8-Z9hzA.js";import"./Dv0hkofe.js";import"./DdEl2J6G.js";import"./DQVyDSts.js";import"./BTQLvbAp.js";import"./CvGg_jgd.js";import"./ypdwKcqm.js";import"./DHWcSn45.js";const aa=be({chips:Boolean,counter:Boolean,counterSizeString:{type:String,default:"$vuetify.fileInput.counterSize"},counterString:{type:String,default:"$vuetify.fileInput.counter"},hideInput:Boolean,multiple:Boolean,showSize:{type:[Boolean,Number,String],default:!1,validator:a=>typeof a=="boolean"||[1e3,1024].includes(Number(a))},...Qe({prependIcon:"$file"}),modelValue:{type:[Array,Object],default:a=>a.multiple?[]:null,validator:a=>ce(a).every(k=>k!=null&&typeof k=="object")},...qe({clearable:!0})},"VFileInput"),ta=we()({name:"VFileInput",inheritAttrs:!1,props:aa(),emits:{"click:control":a=>!0,"mousedown:control":a=>!0,"update:focused":a=>!0,"update:modelValue":a=>!0},setup(a,k){let{attrs:P,emit:h,slots:y}=k;const{t:O}=ke(),d=he(a,"modelValue",a.modelValue,l=>ce(l),l=>!a.multiple&&Array.isArray(l)?l[0]:l),{isFocused:v,focus:D,blur:N}=Ke(a),B=A(()=>typeof a.showSize!="boolean"?a.showSize:void 0),T=A(()=>(d.value??[]).reduce((l,m)=>{let{size:M=0}=m;return l+M},0)),E=A(()=>oe(T.value,B.value)),c=A(()=>
1(d.value??[]).map(l=>{const{name:m="",size:M=0}=l;return a.showSize?`${m} (${oe(M,B.value)})`:m})),u=A(()=>{var m;const l=((m=d.value)==null?void 0:m.length)??0;return a.showSize?O(a.counterSizeString,l,E.value):O(a.counterString,l)}),b=i(),R=i(),g=i(),z=A(()=>v.value||a.active),_=A(()=>["plain","underlined"].includes(a.variant));function I(){var l;g.value!==document.activeElement&&((l=g.value)==null||l.focus()),v.value||D()}function x(l){var m;(m=g.value)==null||m.click()}function J(l){h("mousedown:control",l)}function G(l){var m;(m=g.value)==null||m.click(),h("click:control",l)}function H(l){l.stopPropagation(),I(),xe(()=>{d.value=[],Se(a["onClick:clear"],l)})}return W(d,l=>{(!Array.isArray(l)||!l.length)&&g.value&&(g.value.value="")}),Ie(()=>{const l=!!(y.counter||a.counter),m=!!(l||y.details),[M,Q]=Ce(P),{modelValue:j,...X}=re.filterProps(a),Z=Ge(a);return t(re,ee({ref:b,modelValue:d.value,"onUpdate:modelValue":p=>d.value=p,class:["v-file-input",{"v-file-input--chips":!!a.chips,"v-file-input--hide":a.hideInput,"v-input--plain-underlined":_.value},a.class],style:a.style,"onClick:prepend":x},M,X,{centerAffix:!_.value,focused:v.value}),{...y,default:p=>{let{id:$,isDisabled:L,isDirty:o,isReadonly:e,isValid:s}=p;return t(He,ee({ref:R,"prepend-icon":a.prependIcon,onMousedown:J,onClick:G,"onClick:clear":H,"onClick:prependInner":a["onClick:prependInner"],"onClick:appendInner":a["onClick:appendInner"]},Z,{id:$.value,active:z.value||o.value,dirty:o.value||a.dirty,disabled:L.value,focused:v.value,error:s.value===!1}),{...y,default:F=>{var le;let{props:{class:ye,...ge}}=F;return t(ae,null,[t("input",ee({ref:g,type:"file",readonly:e.value,disabled:L.value,multiple:a.multiple,name:a.name,onClick:U=>{U.stopPropagation(),e.value&&U.preventDefault(),I()},onChange:U=>{if(!U.target)return;const Ve=U.target;d.value=[...Ve.files??[]]},onFocus:I,onBlur:N},ge,Q),null),t("div",{class:ye},[!!((le=d.value)!=null&&le.length)&&!a.hideInput&&(y.selection?y.selection({fileNames:c.value,totalBytes:T.value,totalBytesReadable:E.value}):a.chips?c.value.map(U=>t(Ye,{key:U,size:"small",text:U},null)):c.value.join(", "))])])}})},details:m?p=>{var $,L;return t(ae,null,[($=y.details)==null?void 0:$.call(y,p),l&&t(ae,null,[t("span",null,null),t(Je,{active:!!((L=d.value)!=null&&L.length),value:u.value,disabled:a.disabled},y.counter)])])}:void 0})}),We({},b,R,g)}}),la={key:1,class:"pt-1 pb-2",style:{"justify-self":"center"}},oa={key:2,class:"cropped-image",style:{"justify-items":"center"}},na=["src"],sa={class:"pt-1",style:{"justify-self":"center"}},ia={__name:"avatarUpload",emits:["uploadStart","uploadEnd"],setup(a,{emit:k}){pe();const P=i(null),h=i(null),y=i(""),O=i("info");i();const d=i(null),v=i(""),D=i(),N=k;W(P,c=>{if(c)if(c instanceof File){const u=new FileReader;u.onload=b=>{h.value=b.target.result,d.value&&d.value.replace(b.target.result)},u.readAsDataURL(c)}else h.value=null;else h.value=null});const B=()=>{y.value="",O.value="info"},T=async()=>{if(d.value){const c=d.value.getCroppedCanvas().toDataURL();v.value=c,D.value=d.value.getCroppedCanvas()}},E=async()=>{D.value&&D.value.toBlob(c=>{N("uploadStart",c)})};return(c,u)=>(f(),V(ve,{class:"pa-4"},{default:r(()=>[t($e,{class:"text-h5 text-center"},{default:r(()=>u[1]||(u[1]=[K(" Upload Image ")])),_:1}),t(fe,null,{default:r(()=>[t(ta,{modelValue:P.value,"onUpdate:modelValue":u[0]||(u[0]=b=>P.value=b),label:"Choose an Image",accept:"image/*","show-size":"","prepend-icon":"",variant:"solo-filled","hide-details":"",color:"primary",density:"compact",onCh
1ange:B},{label:r(()=>[t(ze,{icon:n(_e)},null,8,["icon"]),u[2]||(u[2]=S("span",{class:"ml-2"},"Upload file",-1))]),_:1},8,["modelValue"]),h.value?(f(),V(n(Oe),{key:0,ref_key:"cropperRef",ref:d,src:h.value,"aspect-ratio":1,autoCropArea:1,zoomable:!1},null,8,["src"])):w("",!0),h.value?(f(),te("div",la,[t(Y,{color:"primary",onClick:T},{default:r(()=>u[3]||(u[3]=[K("Crop Image")])),_:1})])):w("",!0),u[6]||(u[6]=S("hr",null,null,-1)),v.value?(f(),te("div",oa,[u[4]||(u[4]=S("h3",null,"Cropped Image Preview",-1)),S("div",null,[S("img",{src:v.value,alt:"Cropped Image"},null,8,na)])])):w("",!0),S("div",sa,[v.value?(f(),V(Y,{key:0,disabled:!P.value,color:"success",onClick:E},{loader:r(()=>[t(Ae,{indeterminate:""})]),default:r(()=>[u[5]||(u[5]=K(" Upload "))]),_:1},8,["disabled"])):w("",!0)])]),_:1})]),_:1}))}},ra=me(ia,[["__scopeId","data-v-ed2507a2"]]),ua={class:"d-flex flex-column align-center mb-8"},da={class:"position-relative"},ca={key:1,class:"text-h4 font-weight-bold text-white"},ma={__name:"index",setup(a){const k=pe(),P=Pe(),{avatarUpdate:h}=ne(),{fetchV4:y,updateV4:O,companyData:d}=ne();se(Re());const{user:v}=se(P),{rules:D}=je(),N=i(!1),B=i(null),T=i(null),E=A(()=>v.value.avatar),c=i(),u=i(),b=i(),R=i(),g=i(),z=i(),_=i(),I=i(),x=i(""),J=i(null),G=i(!1),H=i(!1),l=i(!1),m=async o=>{const e=new FormData;e.append("avatar",o,"image.jpeg"),e&&(H.value=!0,l.value=!1,h(e).then(s=>{v.value.avatar=s.data.serving_url;const F={display:!0,text:"Avatar successfully updated",color:"success"};k.setAlert(F)}).catch(s=>{const F={display:!0,text:s._data.message,color:"warning"};k.setAlert(F)}).finally(()=>{H.value=!1}))},M=["Aerospace","Agriculture","Automotive","Computers & Electronics","Consumer Goods","Education","Financial Services","Gaming","Government","Healthcare","Hospitality","Life Sciences","Manufacturing","Marketing & Advertising","Media & Entertainment","Mining","Non-Profit Organization","Oil & Gas","Other","Power & Utilities","Professional Services","Real Estate & Construction","Retail","Software & Internet","Telecommunications","Transportation & Logistics","Travel","Wholesale & Distribution"],Q=o=>!!o||"This field is required.",j=[Q],X=[Q,D.value.phone];Fe(()=>{y().then(o=>B.value=o).catch(o=>{console.error("Error:",o)})});const Z=Le(function(){x&&(G.value=!0,d(x.value).then(o=>T.value=o).catch(o=>{console.error("Error:",o)}).finally(()=>{G.value=!1}))},250),p=i({answer:[{id:"1",key:"personalInformation",title:"Personal Information",ordering:1,setup:[]},{id:"2",key:"organization",title:"Organization",ordering:2,setup:[]}]});W(T,o=>{_.value={id:6,title:"Name",answer:x.value,kind:"text"},z.value={id:8,title:"Industry",answer:o.industry,kind:"text"},I.value={id:7,title:"Size",answer:o.size,kind:"select"},p.value.answer[1].setup[1]=_.value,p.value.answer[1].setup[2]=z.value,p.value.answer[1].setup[3]=I.value}),W(B,o=>{if(o&&v.value.id&&(v.value.avatar=o.profile.avatar,c.value={id:1,title:"First Name",answer:o.profile.personalInformation.firstName,kind:"text"},u.value={id:2,title:"Last Name",answer:o.profile.personalInformation.lastName,kind:"text"},b.value={id:3,title:"Email",answer:o.profile.personalInformation.email,kind:"text"},R.value={id:4,title:"Phone",answer:o.profile.personalInformation.phone,kind:"text"},g.value={id:5,title:"Designation",answer:o.profile.organization.designation,kind:"text"},_.value={id:6,title:"Name",answer:o.profile.organization.name,kind:"text"},z.value={id:8,title:"Industry",answer:o.profile.organization.industry,kind:"text"},I.value={id:7,title:"Size",answer:o.profile.organization.size,kind:"select"},p.value.answer[0].setup[0]=c.value,p.value.answer[0].setup[1]=u.value,p.value.answer[0].setup[2]=b.value,p.value.answer[0].setup[3]=R.value,p.value.answer[1].setup[0]=g.value,p.value.answer[1].setup[1]=_.value,p.value.answer[1].setup[2]=z.value,p.value.answer[1].setup[3]=I.value,x.value===""))return x.value=_.value.answer});const $=async()=>{const{valid:o}=await J.value.validate();if(!o){const e={display:!0,text:"You haven't filled all the required fields",color:"primary"};k.setAlert(e)}o&&(N.value=!0,O(p.value).then(()=>{const e={display:!0,text:"Successfully updated profile",color:"success"};k.setAlert(e)}).catch(e=>{var F;const s={display:!0,text:(F=e==null?void 0:e._data)==null?void 0:F.message,color:"error"};k.setAlert(s)}).finally(()=>N.value=!1))},L=A(()=>{var o,e;return(o=v.value)!=null&&o.id?(e=v.value)==null?void 0:e.name.split(" ").map(s=>s[0]).join(""):""});return(o,e)=>(f(),V(ve,{flat:"","max-width":"850",class:"mx-auto rounded-xl pa-2 pa-md-4"},{default:r(()=>[t(fe,null,{default:r(()=>[t(Xe,{ref_key:"form",ref:J,onSubmit:Ue($,["prevent"])},{default:r(()=>[S("div",ua,[S("div",da,[t(De,{size:"104",color:"primary",class:"elevation-3"},{default:r(()=>[n(E)?(f(),V(Ne,{key:0,src:n(E),cover:""},null,8,["src"])):(f(),te("span",ca,Be(n(L)),1)),t(Ze,{"model-value":n(H),contained:"",class:"align-center justify-center rounded-circle",scrim:"surface"},{default:r(()=>[t(Te,{indeterminate:"",color:"primary",size:"48",width:"4"})]),_:1},8,["model-value"])]),_:1}
1),t(Y,{color:"primary",icon:n(Ee),size:"small",class:"position-absolute bottom-0 end-0 elevation-2",style:{transform:"translate(20%, 20%)"},onClick:e[0]||(e[0]=s=>l.value=!0)},null,8,["icon"])]),t(ea,{modelValue:n(l),"onUpdate:modelValue":e[1]||(e[1]=s=>ie(l)?l.value=s:null),"max-width":"450",class:"rounded-lg"},{default:r(()=>[n(l)?(f(),V(ra,{key:0,onUploadStart:m})):w("",!0)]),_:1},8,["modelValue"])]),t(Me,{density:"comfortable"},{default:r(()=>[t(C,{cols:"12",class:"pb-1"},{default:r(()=>[e[10]||(e[10]=S("h3",{class:"text-subtitle-1 font-weight-bold text-medium-emphasis"}," Personal Information ",-1)),t(ue,{class:"my-2"})]),_:1}),n(c)?(f(),V(C,{key:0,cols:"12",sm:"6"},{default:r(()=>[t(q,{modelValue:n(c).answer,"onUpdate:modelValue":e[2]||(e[2]=s=>n(c).answer=s),density:"comfortable",color:"primary",variant:"outlined",rounded:"lg",label:"First Name",rules:j,"hide-details":"auto"},null,8,["modelValue"])]),_:1})):w("",!0),n(u)?(f(),V(C,{key:1,cols:"12",sm:"6"},{default:r(()=>[t(q,{modelValue:n(u).answer,"onUpdate:modelValue":e[3]||(e[3]=s=>n(u).answer=s),density:"comfortable",color:"primary",variant:"outlined",rounded:"lg",label:"Last Name",rules:j,"hide-details":"auto"},null,8,["modelValue"])]),_:1})):w("",!0),n(b)?(f(),V(C,{key:2,cols:"12",sm:"6"},{default:r(()=>[t(q,{modelValue:n(b).answer,"onUpdate:modelValue":e[4]||(e[4]=s=>n(b).answer=s),density:"comfortable",color:"primary",disabled:"",variant:"outlined",rounded:"lg",label:"Email Address","prepend-inner-icon":"mdi-email-outline","hide-details":"auto"},null,8,["modelValue"])]),_:1})):w("",!0),n(R)?(f(),V(C,{key:3,cols:"12",sm:"6"},{default:r(()=>[t(q,{modelValue:n(R).answer,"onUpdate:modelValue":e[5]||(e[5]=s=>n(R).answer=s),density:"comfortable",color:"primary",variant:"outlined",rounded:"lg",label:"Phone Number",rules:X,"prepend-inner-icon":"mdi-phone-outline","hide-details":"auto"},null,8,["modelValue"])]),_:1})):w("",!0),n(g)?(f(),V(C,{key:4,cols:"12",sm:"6"},{default:r(()=>[t(q,{modelValue:n(g).answer,"onUpdate:modelValue":e[6]||(e[6]=s=>n(g).answer=s),density:"comfortable",color:"primary",variant:"outlined",rounded:"lg",label:"Designation / Title",rules:j,"hide-details":"auto"},null,8,["modelValue"])]),_:1})):w("",!0),t(C,{cols:"12",class:"pt-6 pb-1"},{default:r(()=>[e[11]||(e[11]=S("h3",{class:"text-subtitle-1 font-weight-bold text-medium-emphasis"}," Organization & Details ",-1)),t(ue,{class:"my-2"})]),_:1}),n(_)?(f(),V(C,{key:5,cols:"12",sm:"6"},{default:r(()=>[t(q,{modelValue:n(x),"onUpdate:modelValue":e[7]||(e[7]=s=>ie(x)?x.value=s:null),density:"comfortable",color:"primary",variant:"outlined",rounded:"lg",label:"Organization Name",loading:n(G),rules:j,"hide-details":"auto",onInput:n(Z)},null,8,["modelValue","loading","onInput"])]),_:1})):w("",!0),n(z)?(f(),V(C,{key:6,cols:"12",sm:"6"},{default:r(()=>[t(de,{modelValue:n(z).answer,"onUpdate:modelValue":e[8]||(e[8]=s=>n(z).answer=s),density:"comfortable",color:"primary",variant:"outlined",rounded:"lg",label:"Industry",rules:j,items:M,"hide-details":"auto"},null,8,["modelValue"])]),_:1})):w("",!0),n(I)?(f(),V(C,{key:7,cols:"12",sm:"6"},{default:r(()=>[t(de,{modelValue:n(I).answer,"onUpdate:modelValue":e[9]||(e[9]=s=>n(I).answer=s),density:"comfortable",color:"primary",variant:"outlined",rounded:"lg",label:"Company Size",rules:j,items:["1 - 49","50 - 199","200 - 999","1000+"],"hide-details":"auto"},null,8,["modelValue"])]),_:1})):w("",!0),t(C,{cols:"12",class:"mt-6 text-end"},{default:r(()=>[t(Y,{size:"large",rounded:"lg",color:"primary",class:"px-8 font-weight-bold",type:"submit",loading:n(N),elevation:"2"},{default:r(()=>e[12]||(e[12]=[K(" Save Changes ")])),_:1},8,["loading"])]),_:1})]),_:1})]),_:1},512)]),_:1})]),_:1}))}},Ma=me(ma,[["__scopeId","data-v-0f590f9e"]]);export{Ma 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.