import{_ as l}from"./preload-helper-b857222e.js";import{c as w}from"./copy-to-clipboard-eefee416.js";import{i as S}from"./pro-callout-banner-21e3ad2b.js";import{D as I}from"./drb-toast-helpers-b5930a70.js";import{g as y}from"./get-107ad081.js";import"./auto-bb96690b.js";import h from"./vue.runtime.esm-8a2a981b.js";import{p as M}from"./without-style-ec86dede.js";import{f as L,V as D}from"./index-2eb82686.js";import k from"./index-3d4ca26e.js";import{V as b,c as m,b as p}from"./vuex.esm-8d4a2e81.js";import{a as g}from"./index-ec1be37d.js";import{a as E,m as P,c as U}from"./axios_helper-aabbd1f9.js";import{g as x}from"./data_exchanger-e27028f9.js";import{p as f,a as T}from"./string-5478061d.js";import{m as C,_ as A,M as z}from"./camera-upload-199608e6.js";import{n as d}from"./_plugin-vue2_normalizer-2bbd088e.js";import{h as B}from"./contact-info-detection-helpers-88c9e017.js";import{i as c}from"./is_touch_device-677411e5.js";import{D as F}from"./drag_drop-1647d1e0.js";import{_ as N}from"./ellipsis-c4a07731.js";import q from"./actions-menu-58ba1df0.js";import{S as O}from"./schedule-meeting-dialog-2d6c0307.js";import{D as R}from"./drb-dialog-helpers-eb8a8feb.js";import{i as W}from"./feature-gates-91956f5b.js";import{A as H}from"./index-dedce5a4.js";import"./js.cookie-edb2da2a.js";import"./_commonjsHelpers-de833af9.js";import"./_MapCache-f49d0f97.js";import"./isSymbol-09cd3a26.js";import"./pluralize-e121862b.js";import"./file-upload-33be919a.js";import"./axios-8f19e258.js";import"./index-a4e39586.js";import"./form-handler-d276c37d.js";import"./form-validation-58394433.js";import"./animation-7e2d11a2.js";import"./request-a636442b.js";import"./drb-confirm-helpers-15e164fa.js";import"./v2-alert-pink-5610c78e.js";import"./v2-confirm-calendar-33acb4d5.js";import"./check-verified-654e50fe.js";import"./screen-transitions-928a9f1a.js";import"./google-sign-in-8044a0ab.js";const V={user:{},teams:null,followersCount:null,followingCount:null,likesCount:null,s3Url:"",s3FormData:{},mastheadUploadRestrictions:{},mastheadImageUrl:"",mastheadIntro:"",mastheadColor:"",menuLinks:[],canSeeMessagePrompt:!1,canSeePreviewMessageBtn:!1,mastheadImage:null,mastheadS3ImagePath:"",notification:{}},J={getUser:s=>s.user,getTeams:s=>s.teams,getFollowersCount:s=>s.followersCount,getFollowingCount:s=>s.followingCount,getLikesCount:s=>s.likesCount,getHasProBusiness:s=>s.user.hasProBusiness||s.user.isTeam,getHasProPlus:s=>s.user.proTier==="pro_plus",getMastheadIntro:s=>s.mastheadIntro,getMastheadImageUrl:s=>s.mastheadImageUrl,getMastheadImage:s=>s.mastheadImage,getMastheadColor:s=>s.mastheadColor,getMenuLinks:s=>s.menuLinks,getMastheadUploadRestrictions:s=>s.mastheadUploadRestrictions,getCanSeeMessagePrompt:s=>s.canSeeMessagePrompt,getCanSeePreviewMessageBtn:s=>s.canSeePreviewMessageBtn,getMastHeadPreview:s=>{let e=null;const{mastheadImage:t}=s,{mastheadImageUrl:i}=s;return t&&t.id?e=t.preview:e=i,e}},j={setState(s,e){s.user=e.user,s.teams=e.teams,s.followersCount=e.followersCount,s.followingCount=e.followingCount,s.likesCount=e.likesCount,s.s3Url=e.s3Url,s.s3FormData=e.s3FormData,s.mastheadUploadRestrictions=e.mastheadUploadRestrictions,s.mastheadImageUrl=e.mastheadImageUrl,s.mastheadIntro=e.mastheadIntro,s.mastheadColor=e.mastheadColor,s.menuLinks=e.menuLinks,s.canSeeMessagePrompt=e.canSeeMessagePrompt,s.canSeePreviewMessageBtn=e.canSeePreviewMessageBtn},setMastheadImage(s,e){s.mastheadImage=e},setUploadCancelToken(s,e){s.mastheadImage.cancelToken=e},setMastheadS3ImagePath(s,e){s.mastheadS3ImagePath=e},setMastheadIntro(s,e){s.mastheadIntro=e},setMastheadColor(s,e){s.mastheadColor=e},setMastheadUploadProgress(s,{progress:e}){const t={...s.mastheadImage.progress,...e};s.mastheadImage.progress=t}},G={mountState({commit:s}){const e=x(["JsConfig"]),{user:t}=e,i=e.profile;if(!t||!i){console.error("Missing server data. JsConfig should contain user and profile data.");return}if(i){const a={user:t||{},teams:i.teams||null,followersCount:i.followersCount||0,followingCount:i.followingCount||0,likesCount:i.likesCount||0,s3Url:i.s3Url,s3FormData:i.s3FormData,mastheadUploadRestrictions:i.mastheadUploadRestrictions,mastheadImageUrl:i.mastheadImageUrl,mastheadIntro:i.mastheadIntro,mastheadColor:i.mastheadColor||"#ea4c89",menuLinks:i.menuLinks,canSeeMessagePrompt:i.canSeeMessagePrompt,canSeePreviewMessageBtn:i.canSeePreviewMessageBtn};s("setState",a)}},processMastheadUpload({state:s,getters:e,commit:t,dispatch:i},{files:a}){if(a.length<=0)return;const o=a[0];i("fileUpload/processFile",{currentFile:o,restrictions:e.getMastheadUploadRestrictions,generatePreviews:!0}).then(r=>{t("setMastheadImage",r),i("fileUpload/handleDirectUpload",{files:[r],context:"masthead",s3Url:s.s3Url,formData:s.s3FormData,onInit:n=>{t("setUploadCancelToken",n)},onProgress:n=>{t("setMastheadUploadProgress",n)},onSuccess:n=>{t("setMastheadS3ImagePath",n.path),i("syncServerData","image")},onError:n=>{i("setUploadError",{file:o,errorType:n.type})}})}).catch(r=>{i("setUploadError",{file:o,errorType:r})})},setMastheadIntro({commit:s,dispatch:e},t){s("setMastheadIntro",t),e("syncServerData","intro")},setMastheadColor({commit:s,dispatch:e},t){s("setMastheadColor",t),e("syncServerData","intro")},syncServerData({state:s,commit:e},t){const i=g.CancelToken,o={mastheadImageS3Url:s.mastheadS3ImagePath?`${s.s3Url}/${s.mastheadS3ImagePath}`:"",mastheadIntro:s.mastheadIntro,mastheadColor:s.mastheadColor};g.put(`/${s.user.username}/profile`,o,E(i.source())).then(()=>{Dribbble.EventBus.$emit("siteNotifications:add",{title:"Changes Saved!",type:"success",autoCloseDuration:3e3})}).catch(r=>{t==="image"&&e("setMastheadImage",null),Dribbble.EventBus.$emit("siteNotifications:add",{title:"Save Error",message:P(r)})})},setUploadError({state:s,commit:e},{file:t,errorType:i}){const a=t.name||"",o=s.mastheadUploadRestrictions,r=U(o.maxFileSize),n={title:"Error uploading image!"};switch(i){case"INVALID_MAX_FILE_SIZE":n.message=`Your file, ${a} needs to be under ${r}`;break;case"INVALID_MIN_DIMENSIONS":const u=`${o.dimensions.minWidth}x${o.dimensions.minHeight}`;n.message=`Your file, ${a} dimensions should be at least ${u}.`;break;case"INVALID_FILE_TYPES":case"INVALID_VIDEO_FILE":n.message=`We don't support that file type, ${a}`;break;case"FILE_CORRUPT":n.message=`The file you selected, ${a} appears to be corrupt.`;break;case"UPLOAD_FAILED":n.message="Your file failed to upload. Please try again.",e("setMastheadImage",null);break;case"UNKNOWN":default:n.message=`Uh oh! Something went wrong with ${a}. Please try again.`;break}Dribbble.EventBus.$emit("siteNotifications:add",n)}};h.use(b);const Z=new b.Store({state:V,getters:J,mutations:j,actions:G,modules:{fileUpload:L}}),Y={name:"MastheadAvatar",computed:{...m(["getUser"])}};var X=function(){var e=this,t=e._self._c;return t("drb-avatar",{staticClass:"masthead-avatar",attrs:{"user-id":e.getUser.id}},[t("img",{staticClass:"profile-avatar",attrs:{src:e.getUser.avatarUrl,alt:e.getUser.username}})])},K=[],Q=d(Y,X,K,!1,null,null,null,null);const ee=Q.exports,te={name:"MastheadIntro",data(){return{editing:!1,isHover:!1,tippy:null,textareaHeight:"0",mastheadIntro:"",minlength:5,maxlength:60,warningThreshold:10,mastheadTippyOptions:C}},computed:{...m(["getMastheadIntro"]),textareaStyle(){return{"min-height":this.textareaHeight}},charactersRemainder(){return this.maxlength-this.mastheadIntro.length},invalidMinLength(){return this.mastheadIntro.lengththis.maxlength},characterMaxLimitClass(){return{"counter-limit-warning":this.charactersRemainder<=this.warningThreshold}},textContainsContactInfo(){return B(this.mastheadIntro)},invalidCharsClass(){return{invalid:this.invalidMinLength||this.textContainsContactInfo}}},watch:{editing(){this.toggleTooltip()},isHover(){this.toggleTooltip()}},mounted(){this.mastheadIntro=this.getMastheadIntro,this.$nextTick(this.resize),window.addEventListener("resize",this.resize)},methods:{...p(["setMastheadIntro","syncServerData"]),onTippyInit(s){this.tippy=s},onMouseOver(){c()||(this.isHover=!0)},onMouseLeave(){c()||(this.isHover=!1)},onTouchStart(){c()&&(this.isHover=!0)},onTouchEnd(){c()&&(this.isHover=!1)},onEnter(s){s.keyCode===13&&this.$refs.textArea.blur()},resize(){this.$nextTick(()=>{this.textareaHeight=`${this.$refs.ghostTextArea.scrollHeight}px`})},onChange(){this.resize()},onFocus(){this.editing=!0,document.body.classList.add("disable-masthead-actions"),Dribbble.EventBus.$emit("siteNotifications:clear")},onBlur(){this.validateMastheadIntro(),document.body.classList.remove("disable-masthead-actions"),this.$nextTick(()=>{this.editing=!1})},validateMastheadIntro(){let s=null;this.mastheadIntro.length===0?s="Headline must not be empty.":this.invalidMinLength?s=`Headline must be at least ${this.minlength} character`:this.invalidMaxLength?s=`Headline must not be more than ${this.maxlength} character`:this.textContainsContactInfo&&(s="Contact details or external links aren’t allowed in this field."),s?(Dribbble.EventBus.$emit("siteNotifications:add",{title:"Error saving introduction",message:s}),this.mastheadIntro=this.getMastheadIntro,this.$nextTick(this.resize)):this.mastheadIntro!==this.getMastheadIntro&&this.setMastheadIntro(this.mastheadIntro)},toggleTooltip(){this.isHover&&!this.editing?this.tippy.show():this.tippy.hide()}}};var se=function(){var e=this,t=e._self._c;return t("div",{directives:[{name:"touch",rawName:"v-touch:start",value:e.onTouchStart,expression:"onTouchStart",arg:"start"},{name:"touch",rawName:"v-touch:end",value:e.onTouchEnd,expression:"onTouchEnd",arg:"end"}],staticClass:"masthead-intro editable",class:{editing:e.editing,"is-hover":e.isHover&&!e.editing},attrs:{id:"masthead",name:"masthead"},on:{mouseover:e.onMouseOver,mouseleave:e.onMouseLeave}},[t("tippy",e._b({attrs:{to:"mastheadIntro"},on:{init:e.onTippyInit}},"tippy",e.mastheadTippyOptions,!1),[e._v(" Click to edit introduction ")]),t("textarea",{directives:[{name:"model",rawName:"v-model.trim",value:e.mastheadIntro,expression:"mastheadIntro",modifiers:{trim:!0}}],ref:"textArea",staticClass:"masthead-textarea",class:e.invalidCharsClass,style:e.textareaStyle,attrs:{name:"mastheadIntro",spellcheck:"false",maxlength:e.maxlength},domProps:{value:e.mastheadIntro},on:{input:[function(i){i.target.composing||(e.mastheadIntro=i.target.value.trim())},e.onChange],keydown:function(i){return i.stopPropagation(),e.onEnter.apply(null,arguments)},focus:e.onFocus,blur:[e.onBlur,function(i){return e.$forceUpdate()}]}}),e._v(" "),t("textarea",{directives:[{name:"model",rawName:"v-model",value:e.mastheadIntro,expression:"mastheadIntro"}],ref:"ghostTextArea",staticClass:"ghost-textarea",attrs:{tabindex:"0"},domProps:{value:e.mastheadIntro},on:{input:function(i){i.target.composing||(e.mastheadIntro=i.target.value)}}}),e._v(" "),t("div",{staticClass:"masthead-intro-restrictions"},[t("div",{staticClass:"masthead-intro-restrictions-help"},[t("p",[e._v("Min "),t("span",[e._v(e._s(e.minlength)+" Chars")])]),t("p",{staticClass:"spacer"},[e._v(" | ")]),t("p",[e._v("Max "),t("span",[e._v(e._s(e.maxlength)+" Chars")])]),t("p",{staticClass:"spacer"},[e._v(" | ")]),t("p",[e._v("No Emails/URLs")])]),t("div",{staticClass:"character-counter",class:e.characterMaxLimitClass},[e._v(" "+e._s(e.charactersRemainder)+" ")])])],1)},ie=[],ae=d(te,se,ie,!1,null,null,null,null);const oe=ae.exports,ne={name:"UploadProgress",props:{progress:{type:Object,required:!0}},computed:{percentage(){return Math.floor(this.progress.bytesUploaded*100/this.progress.bytesTotal)||0}}};var re=function(){var e=this,t=e._self._c;return e.progress.uploadStarted?t("div",{staticClass:"upload-progress"},[t("div",{staticClass:"upload-progress-bar",style:{left:`${e.percentage}%`}}),e._t("default")],2):e._e()},le=[],de=d(ne,re,le,!1,null,null,null,null);const ce=de.exports,me="/assets/vite/assets/pro-badge-plus-large-8cd48d22.svg",he="/assets/vite/assets/pro-badge-large-51c6e9b4.svg",ue="/assets/vite/assets/course-graduate-badge-4a73a9ee.svg",ge={name:"MastheadImage",components:{DragDrop:F,UploadProgress:ce},data(){return{tippy:!1,mastheadTippyOptions:C}},computed:{...m(["getMastheadImage","getMastHeadPreview","getHasProBusiness","getHasProPlus"]),isCourseGraduate(){var s,e;return(e=(s=Dribbble==null?void 0:Dribbble.JsConfig)==null?void 0:s.user)==null?void 0:e.isCourseGraduate}},methods:{...p(["processMastheadUpload"]),onFilesAdded({files:s}){this.processMastheadUpload({files:s})},onTippyInit(s){this.tippy=s},onMouseOver(){c()||this.toggleOverlay(!0)},onMouseLeave(){c()||this.toggleOverlay()},onTouchStart(){this.toggleOverlay(!0)},onTouchEnd(){this.toggleOverlay()},toggleOverlay(s){s?this.tippy.show():this.tippy.hide()},clearNotifications(){Dribbble.EventBus.$emit("siteNotifications:clear")}}};var pe=function(){var e=this,t=e._self._c;return t("div",{directives:[{name:"touch",rawName:"v-touch:start",value:e.onTouchStart,expression:"onTouchStart",arg:"start"},{name:"touch",rawName:"v-touch:end",value:e.onTouchEnd,expression:"onTouchEnd",arg:"end"}],staticClass:"masthead-banner-image",style:{backgroundImage:"url('"+e.getMastHeadPreview+"')"},on:{mouseover:e.onMouseOver,mouseleave:e.onMouseLeave}},[e.getHasProPlus?t("img",{directives:[{name:"svg-inline",rawName:"v-svg-inline"}],staticClass:"masthead-pro-badge fill-current",attrs:{src:me}}):t("img",{directives:[{name:"svg-inline",rawName:"v-svg-inline"}],staticClass:"masthead-pro-badge fill-current",attrs:{src:he}}),e.isCourseGraduate?t("img",{directives:[{name:"svg-inline",rawName:"v-svg-inline"}],staticClass:"course-graduate-badge fill-current",attrs:{src:ue}}):e._e(),t("drag-drop",{ref:"mastheadUploader",attrs:{id:"masthead-uploader",name:"masthead-uploader","target-body":!0,"max-files":1},on:{"files-added":e.onFilesAdded,"drag-enter":e.clearNotifications,"drop-area-clicked":e.clearNotifications}},[e.getMastheadImage&&e.getMastheadImage.progress&&!e.getMastheadImage.progress.uploadComplete?t("upload-progress",{attrs:{progress:e.getMastheadImage.progress}}):t("div",{staticClass:"drop-area"},[t("tippy",e._b({attrs:{to:"imageUploadHelp"},on:{init:e.onTippyInit}},"tippy",e.mastheadTippyOptions,!1),[e._v(" Upload a new cover image ")]),t("div",{staticClass:"drop-area-content drop-area-help",attrs:{name:"imageUploadHelp"}},[t("img",{directives:[{name:"svg-inline",rawName:"v-svg-inline"}],staticClass:"fill-current icon-24",attrs:{src:A}})])],1),t("div",{staticClass:"upload-restrictions"},[t("div",{staticClass:"display-flex align-center justify-space-between"},[t("div",{staticClass:"upload-restriction"},[t("h5",[e._v("Supported formats")]),t("p",[e._v("PNG, JPG")])]),t("div",{staticClass:"upload-restriction"},[t("h5",[e._v("Image dimensions")]),t("p",[e._v("Min 1600x1200")])]),t("div",{staticClass:"upload-restriction"},[t("h5",[e._v("File size")]),t("p",[e._v("Max 5mb")])])]),t("p",{staticClass:"type-body-s color-white margin-t-12"},[e._v(" Upload an image that highlights your work — no contact info or marketing claims. ")])])],1)],1)},ve=[],fe=d(ge,pe,ve,!1,null,null,null,null);const _e=fe.exports,be={name:"HirePrompt",computed:{...m(["getCanSeeMessagePrompt","getUser"]),buttonText(){return"Get in touch"}},mounted(){this.$nextTick(()=>{Dribbble.EventBus.$emit("messageTriggerAdded")})}};var Ce=function(){var e=this,t=e._self._c;return e.getCanSeeMessagePrompt?t("div",{staticClass:"hire-prompt-trigger"},[t("button",{staticClass:"btn2",attrs:{"data-message-dialog-button":"","data-message-recipient":e.getUser.id,"data-remote-url":`/messages/new?recipient_id=${e.getUser.username}`,"data-dialog-open-remote":"message-dialog"}},[e._v(" "+e._s(e.buttonText)+" ")])]):e._e()},we=[],Se=d(be,Ce,we,!1,null,null,null,null);const Ie=Se.exports,ye={name:"MastheadActionsMenu",computed:{...m(["getMenuLinks"])},methods:{onClickLink(s,e){e.eventType!=="navigate"&&s.preventDefault()}}};var Me=function(){var e=this,t=e._self._c;return t("div",{staticClass:"actions-menu-relative-container profile-actions-menu js-actions-menu"},[t("a",{staticClass:"action-menu-trigger btn2 btn2--tertiary btn2--circle",attrs:{href:"#",name:"mastheadUserMenu"}},[t("img",{directives:[{name:"svg-inline",rawName:"v-svg-inline"}],staticClass:"fill-current",attrs:{src:N}})]),t("div",{staticClass:"action-menu-container"},[t("ul",{staticClass:"action-menu-items"},e._l(e.getMenuLinks,function(i,a){return t("li",{key:`item-${a}`,class:{separate:!i.path}},[i.text?t("a",{class:i.className||null,attrs:{href:i.path||"#"},on:{click:function(o){return e.onClickLink(o,i)}}},[e._v(" "+e._s(i.text)+" ")]):e._e()])}),0)])])},Le=[],De=d(ye,Me,Le,!1,null,null,null,null);const ke=De.exports,Ee="/assets/vite/assets/v2-edit-90b40d6b.svg",Pe="/assets/vite/assets/v2-chat-bubble-237d157d.svg",Ue={name:"ProfileMastheadApp",components:{MastheadAvatar:ee,MastheadIntro:oe,MastheadImage:_e,MastheadColorBlock:z,HirePrompt:Ie,MastheadActionsMenu:ke},computed:{...m(["getCanSeeMessagePrompt","getUser","getTeams","getFollowersCount","getFollowingCount","getLikesCount","getMastheadColor","getCanSeePreviewMessageBtn"]),followers(){return f("follower",this.getFollowersCount)},following(){return`${T(this.getFollowingCount)} following`},likes(){return f("like",this.getLikesCount)}},created(){this.mountState()},methods:{...p(["mountState","setMastheadColor"]),onColorChange(s){this.setMastheadColor(s)}}};var xe=function(){var e=this,t=e._self._c;return t("section",{staticClass:"profile-pro-masthead"},[t("div",{staticClass:"container-large masthead-wrapper"},[t("div",{staticClass:"masthead-images"},[t("div",{staticClass:"masthead-main-image"},[t("masthead-color-block",{attrs:{color:e.getMastheadColor},on:{changed:e.onColorChange}}),t("masthead-image")],1)]),t("div",{staticClass:"masthead-content"},[t("masthead-avatar"),t("div",{staticClass:"masthead-profile-name"},[t("h1",[e._v(e._s(e.getUser.name))])]),t("masthead-intro"),t("div",{staticClass:"masthead-stats"},[t("div",{staticClass:"stat"},[e._v(" "+e._s(e.followers)+" ")]),t("div",{staticClass:"stat"},[e._v(" "+e._s(e.following)+" ")]),t("div",{staticClass:"stat"},[e._v(" "+e._s(e.likes)+" ")])]),t("div",{staticClass:"masthead-actions"},[t("div",{staticClass:"profile-action-buttons btn2--medium"},[t("hire-prompt",{staticClass:"profile-action-item"}),t("a",{staticClass:"btn2 btn2--tertiary profile-action-item",attrs:{href:"/account/profile"}},[t("img",{directives:[{name:"svg-inline",rawName:"v-svg-inline"}],attrs:{src:Ee}}),e._v(" Edit Profile ")]),t("span",{staticClass:"profile-action-item",class:{"action-menu-wrapper":!e.getCanSeeMessagePrompt}},[t("masthead-actions-menu")],1)],1)]),e.getCanSeePreviewMessageBtn?t("div",{staticClass:"margin-t-8 margin-b-8 display-flex align-center gap-4 type-body-s color-neutrals-grey-600"},[t("img",{directives:[{name:"svg-inline",rawName:"v-svg-inline"}],staticClass:"icon-16",attrs:{src:Pe}}),t("span",[e._v("You have messaging enabled.")]),t("a",{staticClass:"masthead-actions__preview-message-dialog-btn underline",attrs:{"data-message-dialog-button":"","data-message-recipient":e.getUser.id,"data-remote-url":`/messages/new?recipient_id=${e.getUser.username}`,"data-dialog-open-remote":"message-dialog"}},[e._v(" Preview now ")])]):e._e(),e.getTeams&&e.getTeams.length?t("div",{staticClass:"masthead-teams"},[t("span",{staticClass:"on-teams"},[e._v(" On "+e._s(e.getTeams.length===1?"team":"teams")+" ")]),e._l(e.getTeams,function(i){return t("a",{key:i.teamUrl,staticClass:"team-avatar-link",attrs:{href:i.teamUrl}},[t("img",{attrs:{src:i.teamAvatarImageUrl}})])})],2):e._e()],1)])])},Te=[],Ae=d(Ue,xe,Te,!1,null,null,null,null);const $e=Ae.exports;h.use(M);h.use(D);h.use(k);const ze={init(){new h({el:"#profile-masthead-app",name:"UploadFlowAppMain",store:Z,render:s=>s($e)})}};class Be{constructor({container:e}){this.container=e,this.navList=e.querySelector("ul"),this.backArrow=e.querySelector(".scroll-backward a"),this.forwardArrow=e.querySelector(".scroll-forward a"),this.currentActive=this.navList.querySelector("li.active")}initialize(){this.navList!==null&&(this.bindEvents(),this.checkNav(),this.ensureActiveItemInView())}bindEvents(){window.addEventListener("resize",this.checkNav.bind(this)),this.navList.addEventListener("scroll",this.checkNav.bind(this)),this.forwardArrow.addEventListener("click",this.forwardClicked.bind(this)),this.backArrow.addEventListener("click",this.backClicked.bind(this))}checkNav(){const e=this.navList.scrollLeft>0,t=this.navList.scrollLeft+this.navList.clientWidth>=this.navList.scrollWidth;e?$D.show(this.backArrow):$D.hide(this.backArrow),t?$D.hide(this.forwardArrow):$D.show(this.forwardArrow)}forwardClicked(e){this.navList.scrollLeft+=this.navList.clientWidth}backClicked(e){this.navList.scrollLeft-=this.navList.clientWidth}ensureActiveItemInView(){if(!this.currentActive)return;this.currentActive.offsetLeft+this.currentActive.clientWidth{e.addEventListener("change",this.onInputsChange.bind(this))})}onClickCustomizeButton(e){document.body.classList.add("customize-shot-order-enabled"),this.customizeInput.checked&&(Dribbble.ShotSelection.enableShotSelection(),document.body.classList.add("customize-shot-order-custom"))}onClickUndoButton(){$(window).off("beforeunload"),window.location.reload()}onClickSaveButton(){$(window).off("beforeunload")}onClickPreview(){Dribbble.ShotSelection.disableEditing(),this.previewShots.style.display="none",this.editShots.style.display=""}onClickEdit(){Dribbble.ShotSelection.enableShotSelection(),this.editShots.style.display="none",this.previewShots.style.display=""}onInputsChange(e){e.currentTarget.value==="custom"?(this.customInfo.style.display="",Dribbble.ShotSelection.enableShotSelection(),this.previewShots.style.display="",this.editShots.style.display="none",document.body.classList.add("customize-shot-order-custom")):(this.customInfo.style.display="none",Dribbble.ShotSelection.disableEditing(),document.body.classList.remove("customize-shot-order-custom"))}}class Ne{constructor(){this.filterLinks=document.querySelectorAll(".js-shots-filter-select .dropdown-item")}initialize(){this.filterLinks&&Dribbble.ButtonDropdown&&this.bindEvents()}bindEvents(){this.filterLinks.forEach(e=>{e.addEventListener("click",this.onDropdownClick)})}onDropdownClick(e){const t=e.currentTarget.dataset.selectvalue,i=e.currentTarget.dataset.selecttitle,a=`${window.location.pathname}?stream=${t}`;Dribbble.Thumbnails?(Dribbble.Thumbnails.refreshList(a),document.querySelector(".js-current-filter").innerHTML=i):window.location=a}}class qe{constructor(){this.proUpsellWidget=document.getElementById("js-pro-upsell-widget")}initialize(e){this.proUpsellWidget&&(this.hideProUpsellWidget=!!JSON.parse(localStorage.getItem("hideProUpsellWidget")),this.hideProUpsellWidget||(this.proUpsellWidget.classList.add("visible"),this.bindEvents()))}bindEvents(){this.proUpsellWidget.querySelector(".close-widget").addEventListener("click",this.onClickCloseWidget.bind(this))}onClickCloseWidget(e){this.proUpsellWidget.classList.remove("visible"),localStorage.setItem("hideProUpsellWidget",JSON.stringify(!0))}}class Oe{constructor(){this.hireWidget=document.getElementById("js-hire-widget"),this.isWidgetDismissed=!1}initialize(){this.hireWidget&&(this.shouldDisplayWidget(),this.bindEvents())}bindEvents(){this.hireWidget.querySelector(".close-widget").addEventListener("click",this.onClickCloseWidget.bind(this)),window.addEventListener("scroll",this.onScroll.bind(this))}onClickCloseWidget(){this.hireWidget.classList.add("hidden"),this.isWidgetDismissed=!0}onScroll(){this.shouldDisplayWidget()}isHireButtonOnViewport(){const e=document.querySelector(".profile-masthead .js-contact-overlay-trigger"),t=document.querySelector(".js-logged-out-hire-btn"),i=document.querySelector(".profile-masthead [data-message-dialog-button]"),a=e||t||i;if(!a)return!1;const o=a.getBoundingClientRect();return o.top>=0&&o.left>=0&&o.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&o.right<=(window.innerWidth||document.documentElement.clientWidth)}shouldDisplayWidget(){this.isHireButtonOnViewport()?this.hireWidget.classList.remove("visible"):this.isWidgetDismissed||this.hireWidget.classList.add("visible")}}const Re={init(){this.bindToggleReviewBtns()},bindToggleReviewBtns(){document.addEventListener("click",s=>{const e=s.target.closest("[data-toggle-review-btn]"),t=e==null?void 0:e.getAttribute("data-toggle-review-btn"),i=e==null?void 0:e.closest("[data-review-content]");if(!t||!i)return;const a=i.querySelector("[data-review-comment]");a&&(t==="expand"?(a.classList.remove("text-clip-10"),e.textContent="Read Less",e.setAttribute("data-toggle-review-btn","collapse")):t==="collapse"&&(a.classList.add("text-clip-10"),e.textContent="Read More",e.setAttribute("data-toggle-review-btn","expand")))})}},We=async s=>{try{const{data:e}=await g.get(`/client_app/video_intros/${s}`);return e}catch(e){throw new Error("Failed to load introduction video",e)}},Rt={label:"Get in touch",type:"message_me"},Wt={label:"Schedule a Call",type:"schedule_call"},He=` `;async function _(){const e=(await l(()=>import("./vue.runtime.esm-8a2a981b.js"),[])).default,t=await l(()=>import("./designerApplicationModal-bf0f7e0a.js"),["assets/designerApplicationModal-bf0f7e0a.js","assets/get-107ad081.js","assets/_commonjsHelpers-de833af9.js","assets/_MapCache-f49d0f97.js","assets/isSymbol-09cd3a26.js","assets/_baseFindIndex-e36f7638.js","assets/_baseUnary-56bc5bee.js","assets/index-ec1be37d.js","assets/axios-8f19e258.js","assets/axios_helper-aabbd1f9.js","assets/_plugin-vue2_normalizer-2bbd088e.js","assets/close-e3ca912d.js","assets/designerApplicationModal-3325fc90.css"]);return new e({el:"#designer-application-modal-app",render:i=>i(t.default)})}async function Ve(){if(!(y(Dribbble,"JsConfig.permissions.userPermissions",[]).indexOf("canSeeDesignerApplicationInfo")!==-1))return;let i;new URLSearchParams(window.location.search).get("apply_modal")&&(i=await _(),Dribbble.EventBus.$emit("open-designer-application-modal")),document.querySelectorAll(".js-designer-application-cta").forEach(r=>{r.addEventListener("click",async()=>{i||(i=await _()),Dribbble.EventBus.$emit("open-designer-application-modal")})})}const Je=async()=>{const s=window.location.hash==="#message",e=document.querySelector("[data-message-dialog-button]");s&&(await customElements.whenDefined("drb-dialog"),e==null||e.click())},je=()=>{document.querySelectorAll("[data-copy-to-clipboard]").forEach(e=>{e.addEventListener("click",t=>{w(t.currentTarget)})})},Ge=()=>{je()},Ze=()=>{var s,e,t,i;!((e=(s=Dribbble==null?void 0:Dribbble.JsConfig)==null?void 0:s.user)!=null&&e.isLoggedIn)||(i=(t=Dribbble==null?void 0:Dribbble.JsConfig)==null?void 0:t.user)!=null&&i.hasPro||I.open({title:"Upgrade to Pro and land more clients",id:"pro-callout-toast",messageHtml:`

Pro designers get 10X more leads than other designers, and pay no fees when they transact on Dribbble.

Learn more
`,iconHtml:He,onlyOnce:!0,cookieDuration:30,cookieName:"pro_callout_dismissed"})},Ye=async s=>{const e=parseInt(document.querySelector("body").dataset.videoIntroId,10);if(e)try{const{data:t}=await We(e);if(!t)return;const{initializeApp:i}=await l(()=>import("./main-85619c96.js"),["assets/main-85619c96.js","assets/vue.runtime.esm-8a2a981b.js","assets/index-9f828387.js","assets/_commonjsHelpers-de833af9.js","assets/params-692e8806.js","assets/index-3d4ca26e.js","assets/vVideo-62c3777a.js","assets/icon-dbdf3ffe.js","assets/close-e3ca912d.js","assets/_plugin-vue2_normalizer-2bbd088e.js","assets/vVideo-684f1fd4.css","assets/index-dedce5a4.js","assets/form-handler-d276c37d.js","assets/form-validation-58394433.js","assets/contact-info-detection-helpers-88c9e017.js","assets/animation-7e2d11a2.js","assets/request-a636442b.js","assets/axios-8f19e258.js","assets/axios_helper-aabbd1f9.js","assets/screen-transitions-928a9f1a.js","assets/google-sign-in-8044a0ab.js","assets/drb-toast-helpers-b5930a70.js","assets/drb-dialog-helpers-eb8a8feb.js","assets/preload-helper-b857222e.js","assets/copy-to-clipboard-eefee416.js","assets/pro-callout-banner-21e3ad2b.js","assets/js.cookie-edb2da2a.js","assets/get-107ad081.js","assets/_MapCache-f49d0f97.js","assets/isSymbol-09cd3a26.js","assets/auto-bb96690b.js","assets/pluralize-e121862b.js","assets/without-style-ec86dede.js","assets/index-2eb82686.js","assets/index-ec1be37d.js","assets/file-upload-33be919a.js","assets/string-5478061d.js","assets/vuex.esm-8d4a2e81.js","assets/data_exchanger-e27028f9.js","assets/camera-upload-199608e6.js","assets/is_touch_device-677411e5.js","assets/drag_drop-1647d1e0.js","assets/ellipsis-c4a07731.js","assets/actions-menu-58ba1df0.js","assets/schedule-meeting-dialog-2d6c0307.js","assets/index-a4e39586.js","assets/drb-confirm-helpers-15e164fa.js","assets/v2-alert-pink-5610c78e.js","assets/v2-confirm-calendar-33acb4d5.js","assets/check-verified-654e50fe.js","assets/feature-gates-91956f5b.js","assets/main-ca8a66f8.css"]),a=t.status==="pending"&&s===Dribbble.JsConfig.user.id,o=t.status==="approved";(a||o)&&i(t)}catch(t){console.warn(t)}},Xe=()=>{var a,o;const s=document.querySelector("body").hasAttribute("data-is-scheduling-meeting"),e=document.querySelector("body").getAttribute("data-invitee-id");if(!s||!e)return;if(!((o=(a=Dribbble==null?void 0:Dribbble.JsConfig)==null?void 0:a.user)!=null&&o.isLoggedIn)){H.openAuthDialog({intent:"schedule-meeting"});return}const t=Intl.DateTimeFormat().resolvedOptions().timeZone,i=new URL("engagement_meetings/new",window.location.origin);i.searchParams.set("timezone",t),i.searchParams.set("invitee_id",e),R.openRemote({url:i.toString(),dialogId:"schedule-meeting",shouldReload:!0})};document.addEventListener("DOMContentLoaded",async()=>{var u,v;document.querySelector(".js-profile-masthead-app")!==null&&ze.init(),new Be({container:document.querySelector(".scrolling-subnav")}).initialize(),new Fe().initialize(),new Ne().initialize(),new qe().initialize(),new Oe().initialize(),Re.init(),Ve();const t=document.querySelector(".js-actions-menu");new q(t).initialize();const i=document.getElementById("introductions-video-card"),a=parseInt(document.getElementById("main").dataset.userId,10);i&&Ye(a),Je();const{ServiceFormDialog:o}=await l(()=>import("./service-form-dialog-6f438cab.js"),["assets/service-form-dialog-6f438cab.js","assets/sortable.esm-9d44ca17.js","assets/form-validation-58394433.js","assets/contact-info-detection-helpers-88c9e017.js","assets/project-cost-breakdown-52e21255.js","assets/debounce-a3c77a8f.js","assets/_commonjsHelpers-de833af9.js","assets/isSymbol-09cd3a26.js","assets/toNumber-7a06b4ca.js","assets/request-a636442b.js","assets/axios-8f19e258.js","assets/axios_helper-aabbd1f9.js","assets/milestone-manager-cf617e38.js","assets/pricing-311df2f8.js","assets/service-select-media-dialog-96f62479.js","assets/media-3cc8b1a3.js","assets/url-06e270d3.js","assets/animation-7e2d11a2.js","assets/drb-confirm-helpers-15e164fa.js","assets/drb-dialog-helpers-eb8a8feb.js","assets/pro-callout-banner-21e3ad2b.js","assets/js.cookie-edb2da2a.js","assets/schedule-meeting-dialog-2d6c0307.js","assets/index-a4e39586.js","assets/form-handler-d276c37d.js","assets/v2-alert-pink-5610c78e.js","assets/v2-confirm-calendar-33acb4d5.js","assets/check-verified-654e50fe.js"]);o.init();const{ServiceSelectMediaDialog:r}=await l(()=>import("./service-select-media-dialog-96f62479.js"),["assets/service-select-media-dialog-96f62479.js","assets/media-3cc8b1a3.js","assets/url-06e270d3.js"]);r.init();const{ConnectPayoutDialog:n}=await l(()=>import("./connect-payout-dialog-775642a9.js"),["assets/connect-payout-dialog-775642a9.js","assets/form-validation-58394433.js","assets/contact-info-detection-helpers-88c9e017.js"]);n.init(),Ge(),(v=(u=Dribbble==null?void 0:Dribbble.JsConfig)==null?void 0:u.user)!=null&&v.hasPro||S(),document.querySelector("[data-init-pro-toast]")&&Ze(),(Dribbble.JsConfig.user.hasPro||Dribbble.JsConfig.user.hasProBusiness||Dribbble.JsConfig.user.isTeam)&&await l(()=>import("./introductions-upload-modal-autoload-62bbf0fb.js"),["assets/introductions-upload-modal-autoload-62bbf0fb.js","assets/preload-helper-b857222e.js","assets/url-06e270d3.js"]),W("designerCalendarLink")&&(O.init(),Xe())});export{Rt as m,Wt as s}; //# sourceMappingURL=profile-page-4836825b.js.map