Files
gustavoo-me/wp-content/plugins/fluent-crm/assets/admin/Modules/Profile/Profile.js
T
2026-07-23 22:56:30 -03:00

2 lines
54 KiB
JavaScript

import{aQ as e,aS as s,k as t,aB as i,T as a,aH as r,aI as o,aO as n,as as c,aK as l,aL as d,E as u,P as m,at as h,ay as p,h as _,i as b,j as f,D as g,e as y,az as v,aG as w,aT as C,aE as $,b9 as k,b5 as S,aq as x,ar as V,aN as L,ap as P,Q as A,aZ as M,a_ as H,aD as I,aA as T,aC as Z}from"../../../vendor-element-plus.js?ver=3.1.8";import{aQ as U,W as D,X as E,Z as z,aa as F,J as N,az as R,Y as B,a5 as q,ab as O,a8 as j,a9 as W,a0 as G,$ as K,_ as Q,a6 as Y,ax as J,b2 as X,bV as ee,ad as se,a7 as te,ac as ie,av as ae}from"../../../vendor.js?ver=3.1.8";import{T as re,E as oe,C as ne,u as ce}from"../../../Tagger.js?ver=3.1.8";import{_ as le,I as de}from"../../../fc-bits-ui.js?ver=3.1.8";import{P as ue}from"../../../PhotoWidget.js?ver=3.1.8";import{P as me}from"../../../PaginationBar.js?ver=3.1.8";import{C as he}from"../../../Confirm.js?ver=3.1.8";import{j as pe}from"../../../data_config.js?ver=3.1.8";import{P as _e}from"../../../PromoCard.js?ver=3.1.8";import{B as be}from"../../../Badge.js?ver=3.1.8";import"../../../CompanyEditForm.js?ver=3.1.8";import"../../../fc-bits.js?ver=3.1.8";import"../../../Filterer.js?ver=3.1.8";const fe={class:"header"},ge={class:"items"},ye={class:"items_actions"},ve={class:"items_inner"},we={key:0,class:"icon"},Ce={key:1,class:"icon"},$e={class:"fc_tagger_footer fcrm_mt_10"};const ke={class:"fcrm_profile_tagger fc_profile_tagger"},Se={key:0,class:"fcrm_profile_tagger_row"},xe={key:1,class:"fcrm_profile_tagger_row"};const Ve=le({name:"ProfileListTags",props:["subscriber"],components:{Tagger:le({name:"Tagger",components:{Editor:oe,Icons:de},data:()=>({new_payload:!1,showItem:!0}),props:["type","taggables","options","matched","creatable"],emits:["addedNew"],mixins:[re],computed:{none(){return"tags"==this.type?this.$t("No tags found"):"lists"==this.type?this.$t("No lists found"):"No "+this.type+" found"}},methods:{handleClose(e){this.$confirm(this.$t("Are you sure you want to remove this?"),this.$t("Warning"),{confirmButtonText:this.$t("OK"),cancelButtonText:this.$t("Cancel"),type:"warning"}).then(()=>{this.remove(e)}).catch(()=>{})},remove(e){this.subscribe({attach:[],detach:[e]})},updatePayLoad(e){this.new_payload=e},pushPayload(){this.new_payload?(this.subscribe(this.new_payload),setTimeout(()=>{this.showItem=!1,this.$nextTick(()=>{this.showItem=!0})},500)):this.$notify.error(this.$t("No changes found"))},getDescription(e){return e.pivot?this.$t("Added @ ")+e.pivot.created_at:""}}},[["render",function(i,a,r,o,n,c){const l=U("icons"),d=e,u=s,m=t,h=U("editor");return r.taggables&&n.showItem?(D(),E("div",{key:0,class:G("fcrm_profile_tagger_"+r.type)},[z("div",fe,[z("h2",null,F(i.$t(r.type)),1)]),z("div",ge,[z("div",ye,[z("div",ve,[(D(!0),E(N,null,R(r.taggables,e=>(D(),B(d,{key:e.title,class:"el-tag--white",title:c.getDescription(e),closable:"",onClose:s=>c.handleClose(e.slug)},{default:q(()=>["tags"===r.type?(D(),E("span",we,[O(l,{iconName:"TagIcon"})])):j("",!0),"lists"===r.type?(D(),E("span",Ce,[O(l,{iconName:"ListIcon"})])):j("",!0),W(" "+F(e.title),1)],void 0),_:2},1032,["title","onClose"]))),128)),r.taggables.length?j("",!0):(D(),B(u,{key:0,title:c.none,type:"info",closable:!1},null,8,["title"])),O(h,{type:r.type,options:i.choices,noMatch:i.noMatch,matched:r.matched,selectionCount:1,placement:"bottom-start",onSearch:i.search,onAddedNew:a[1]||(a[1]=e=>{i.$emit("addedNew",e)}),creatable:r.creatable,onSubscribe:c.updatePayLoad},{footer:q(()=>[z("div",$e,[O(m,{onClick:a[0]||(a[0]=e=>c.pushPayload()),style:{width:"100%"},type:"primary",size:"small"},{default:q(()=>[W(F(i.$t("Confirm")),1)],void 0,!0),_:1})])]),_:1},8,["type","options","noMatch","matched","onSearch","creatable","onSubscribe"])])])])],2)):j("",!0)}],["__scopeId","data-v-81e7743d"]])},data:()=>({options:{tags:[],lists:[]},matches:{tags:{},lists:{}},subscribing:!1}),methods:{setup(e){this.matches.tags=[],this.matches.lists=[],this.subscriber.tags=e.tags,this.subscriber.lists=e.lists,e.tags.forEach(e=>this.match(e,this.matches.tags)),e.lists.forEach(e=>this.match(e,this.matches.lists))},getOptions(){this.options={tags:this.appVars.available_tags,lists:this.appVars.available_lists}},subscribe({type:e,payload:s}){const{attach:t,detach:i}=s,a={type:e,attach:t,detach:i,subscribers:[this.subscriber.id]};this.subscribing=!0,this.$post("subscribers/sync-segments",a).then(e=>{const s=e.subscribers[0];this.setup(s),this.$notify.success({title:this.$t("Great!"),message:e.message,offset:19})}).catch(e=>{this.handleError(e)}).finally(()=>{this.subscribing=!1})},search(e,s){this.options[e]=s},match(e,s){s[e.slug]=1}},mounted(){this.getOptions(),this.setup(this.subscriber)}},[["render",function(e,s,t,a,r,o){const n=i,c=U("tagger");return D(),E("div",ke,[r.subscribing?(D(),E("div",Se,[O(n,{rows:3})])):(D(),E("div",xe,[O(c,{type:"lists",onSearch:o.search,onSubscribe:o.subscribe,class:"info-item",creatable:!0,options:r.options.lists,onAddedNew:s[0]||(s[0]=e=>{r.options.lists.push(e)}),matched:r.matches.lists,taggables:t.subscriber.lists},null,8,["onSearch","onSubscribe","options","matched","taggables"]),O(c,{type:"tags",onSearch:o.search,class:"info-item",creatable:!0,onSubscribe:o.subscribe,onAddedNew:s[1]||(s[1]=e=>{r.options.tags.push(e)}),options:r.options.tags,matched:r.matches.tags,taggables:t.subscriber.tags},null,8,["onSearch","onSubscribe","options","matched","taggables"])]))])}]]),Le=["title"],Pe={class:"fcrm_profile_header_stat_count"},Ae={class:"fcrm_table_wrapper"},Me={class:"fcrm_table_body"},He={key:0,class:"fcrm_loader_wrap"},Ie=["href"],Te={class:"counter"};const Ze={class:"fluentcrm_profile_header"},Ue={class:"fluentcrm_profile-photo"},De={class:"fcrm_profile_photo_actions"},Ee={class:"icon"},ze={class:"profile-info"},Fe={class:"fcrm_profile_header_info_row"},Ne={class:"fcrm_profile_header_infos"},Re={class:"profile_title"},Be={class:"fcrm_profile_header_name"},qe={class:"fcrm_profile_header_date"},Oe={key:0},je={class:"fcrm_profile_header_meta fcrm_profile_header_meta_email show_on_parent"},We={class:"fcrm_profile_header_meta_user"},Ge=["title"],Ke=["href"],Qe={key:0,class:"fcrm_profile_header_meta_userrole"},Ye={class:"items"},Je={class:"fcrm_profile_header_stats_badges"},Xe=["title"],es={class:"fcrm_profile_header_stat_count"},ss=["title"],ts={class:"fcrm_profile_header_stat_count"},is={key:0,class:"fc_t_10"},as={key:1,class:"fc_t_10"},rs={key:0},os={class:"fcrm_profile_header_actions"},ns={class:"fcrm_profile_action"},cs={class:"fcrm_contact_popover_header"},ls={class:"fcrm_contact_popover_body"},ds={class:"fcrm_profile_contact_type_text"},us={class:"fcrm_profile_action"},ms={class:"fcrm_contact_popover_header"},hs={class:"fcrm_contact_popover_body"},ps={key:0,class:"fcrm_profile_action"},_s={class:"fcrm_contact_popover_header"},bs={class:"fcrm_contact_popover_body"};const fs={class:"fluentcrm_profile_header_warpper"};const gs=le({name:"ProfileHeader",components:{ProfileInfo:le({name:"ProfileInfo",emits:["fetch"],props:{subscriber:{type:Object,default:()=>null},photo_holder:{type:String,default:"fc_photo_holder_mini"}},components:{ProfileStatURL:le({name:"ProfileStatURL",props:{subscriber:{type:Object,required:!0,default:()=>null}},components:{PaginationBar:me,Location:a},data:()=>({urlMetrics:[],loadingMetrics:!1,pagination:{total:0,per_page:10,current_page:1},query_data:{sort_by:"",sort_type:""}}),computed:{stats(){var e;return(null==(e=this.subscriber)?void 0:e.stats)||{emails:0,opens:0,clicks:0,total_points:0,last_activity:null}}},methods:{handleSortable(e){"descending"===e.order?(this.query_data.sort_by=e.prop,this.query_data.sort_type="DESC"):(this.query_data.sort_by=e.prop,this.query_data.sort_type="ASC"),this.getUrlMetrics()},getUrlMetrics(){this.loadingMetrics=!0,this.$get(`subscribers/${this.subscriber.id}/url-metrics`,{sort_by:this.query_data.sort_by,sort_type:this.query_data.sort_type,per_page:this.pagination.per_page,page:this.pagination.current_page,subscriber_id:this.subscriber.id}).then(e=>{this.urlMetrics=e.urlMetrics.data,this.pagination.total=e.urlMetrics.total}).catch(e=>{this.handleError(e)}).finally(()=>{this.loadingMetrics=!1})}}},[["render",function(e,s,t,a,c,l){const d=i,u=o,m=r,h=U("pagination-bar"),p=n;return D(),B(p,{placement:"bottom",width:560,trigger:"click","popper-class":"fcrm_link_stats_popover",effect:"light"},{reference:q(()=>[z("span",{onClick:s[0]||(s[0]=(...e)=>l.getUrlMetrics&&l.getUrlMetrics(...e)),class:"fcrm_profile_header_stat stats_link",title:e.$t("Click Rate")},[s[1]||(s[1]=z("span",{class:"icon"},[z("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[z("path",{d:"M12.541 11.1234L14.455 16.3839L10.9315 17.6664L9.01675 12.4059L6.0925 14.2396L7.3075 2.22461L15.9602 10.6486L12.5417 11.1234H12.541ZM12.5327 15.4869L10.4965 9.89186L12.7165 9.58436L8.4865 5.46686L7.894 11.3394L9.7915 10.1491L11.8277 15.7441L12.5327 15.4869Z",fill:"var(--fc-text-muted)"})])],-1)),z("span",Pe,F(e.percent(l.stats.clicks,l.stats.emails)),1)],8,Le)]),default:q(()=>[z("div",Ae,[z("div",Me,[c.loadingMetrics?(D(),E("div",He,[O(d,{animated:!0,rows:5})])):(D(),B(m,{key:1,sortable:"",data:c.urlMetrics,onSortChange:l.handleSortable},{default:q(()=>[O(u,{label:e.$t("URL")},{default:q(e=>[z("a",{href:e.row.url,target:"_blank",rel:"noopener"},F(e.row.url),9,Ie)]),_:1},8,["label"]),O(u,{width:"100",sortable:"",prop:"counter",label:e.$t("Clicks")},{default:q(e=>[z("span",Te,F(e.row.count),1)]),_:1},8,["label"])],void 0,!0),_:1},8,["data","onSortChange"])),O(h,{pagination:c.pagination,onFetch:l.getUrlMetrics},null,8,["pagination","onFetch"])])]),j("",!0)],void 0),_:1})}]]),PhotoWidget:ue,ArrowDownBold:c,Icons:de},data:()=>({status_visible:!1,lead_visible:!1,subscriber_statuses:window.fcAdmin.available_contact_statuses,contact_types:window.fcAdmin.available_contact_types,sms_status_visible:!1,sms_statuses:window.fcAdmin.available_sms_statuses}),computed:{name(){return this.subscriber.first_name||this.subscriber.last_name?this.subscriber.prefix?`${this.subscriber.prefix||""} ${this.subscriber.first_name||""} ${this.subscriber.last_name||""}`:`${this.subscriber.first_name||""} ${this.subscriber.last_name||""}`:this.subscriber.email},isSmsEnabled:()=>"yes"===window.fcAdmin.sms_enabled,smsStatusMap(){return this.sms_statuses.reduce((e,s)=>(e[s.id]=s.title,e),{})},stats(){var e;return(null==(e=this.subscriber)?void 0:e.stats)||{emails:0,opens:0,clicks:0,total_points:0,last_activity:null}}},methods:{saveStatus(){this.updateProperty("status",this.subscriber.status,()=>{this.status_visible=!1})},saveLead(){this.updateProperty("contact_type",this.subscriber.contact_type,()=>{this.lead_visible=!1})},saveSmsStatus(){this.updateProperty("sms_status",this.subscriber.sms_status,()=>{this.sms_status_visible=!1})},removeAvatar(){this.subscriber.avatar="",this.updateAvatar(""),this.$emit("fetch")},updateAvatar(e){this.updateProperty("avatar",e)},updateProperty(e,s,t){this.$put("subscribers/subscribers-property",{property:e,subscribers:[this.subscriber.id],value:s}).then(e=>{this.$notify.success(e.message),t&&t(e),this.$emit("fetch")}).catch(e=>{this.handleError(e)})},sendDoubleOptinEmail(){this.$post(`subscribers/${this.subscriber.id}/send-double-optin`).then(e=>{this.$notify.success(e.message)}).catch(e=>{this.handleError(e)}).finally(()=>{})}}},[["render",function(s,i,a,r,o,c){const m=U("Icons"),h=t,p=U("photo-widget"),_=U("ProfileStatURL"),b=d,f=l,g=U("ArrowDownBold"),y=u,v=e,w=n;return D(),E("div",Ze,[z("div",Ue,[z("div",{class:G(a.photo_holder),style:K({backgroundImage:"url("+a.subscriber.photo+")"})},null,6),z("div",De,[O(p,{class:"fc_photo_changed",only_icon:!0,btn_mode:!0,btn_class:"only-icon-btn small",onChanged:c.updateAvatar,modelValue:a.subscriber.photo,"onUpdate:modelValue":i[0]||(i[0]=e=>a.subscriber.photo=e)},{after:q(()=>[a.subscriber.avatar?(D(),B(h,{key:0,size:"small",plain:"",type:"danger",class:"only-icon-btn small",onClick:c.removeAvatar},{default:q(()=>[z("span",Ee,[O(m,{"icon-name":"delete"})])],void 0,!0),_:1},8,["onClick"])):j("",!0)]),_:1},8,["onChanged","modelValue"])])]),z("div",ze,[z("div",Fe,[z("div",Ne,[z("div",Re,[Q(s.$slots,"heading"),z("h3",Be,[W(F(c.name)+" ",1),i[11]||(i[11]=z("span",{class:"dot-separator"},null,-1)),z("span",qe,[W(F(s.$t("Added"))+" "+F(s.$nsHumanDiffTime(a.subscriber.created_at))+" ",1),a.subscriber.last_activity?(D(),E("span",Oe," & "+F(s.$t("Last Activity"))+" "+F(s.$nsHumanDiffTime(a.subscriber.last_activity)),1)):j("",!0)])])]),z("p",je,[z("span",We,[W(F(a.subscriber.email)+" ",1),a.subscriber.user_id&&a.subscriber.user_edit_url?(D(),E("span",{key:0,class:"fcrm_profile_header_meta_user_id",title:s.$t("WordPress User ID")},[i[13]||(i[13]=z("span",{class:"fc_middot"},"·",-1)),z("a",{target:"_blank",rel:"noopener",href:a.subscriber.user_edit_url},[W(F(a.subscriber.user_id)+" ",1),i[12]||(i[12]=z("span",{class:"dashicons dashicons-external"},null,-1))],8,Ke)],8,Ge)):j("",!0)]),a.subscriber.user_roles&&a.subscriber.user_roles.length?(D(),E("span",Qe,[W(F(s.$t("User Roles:"))+" ",1),z("span",Ye,[(D(!0),E(N,null,R(a.subscriber.user_roles,e=>(D(),E("span",{class:"fc_tag_prof_info",key:e},F(e),1))),128))])])):j("",!0)]),z("div",Je,[z("span",{class:"fcrm_profile_header_stat",title:s.$t("Total Emails")},[i[14]||(i[14]=z("span",{class:"icon"},[z("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[z("path",{d:"M3.25 3.75H16.75C16.9489 3.75 17.1397 3.82902 17.2803 3.96967C17.421 4.11032 17.5 4.30109 17.5 4.5V15.5C17.5 15.6989 17.421 15.8897 17.2803 16.0303C17.1397 16.171 16.9489 16.25 16.75 16.25H3.25C3.05109 16.25 2.86032 16.171 2.71967 16.0303C2.57902 15.8897 2.5 15.6989 2.5 15.5V4.5C2.5 4.30109 2.57902 4.11032 2.71967 3.96967C2.86032 3.82902 3.05109 3.75 3.25 3.75ZM16 6.9285L10.054 12.2535L4 6.912V14.75H16V6.9285ZM4.38325 5.25L10.0457 10.2465L15.6265 5.25H4.38325Z",fill:"var(--fc-text-muted)"})])],-1)),z("span",es,F(c.stats.emails),1)],8,Xe),i[16]||(i[16]=z("span",{class:"fc_middot"},"·",-1)),z("span",{class:"fcrm_profile_header_stat",title:s.$t("Open Rate")},[i[15]||(i[15]=z("span",{class:"icon"},[z("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[z("path",{d:"M2.68225 6.14037L9.6175 1.98237C9.73406 1.91243 9.86744 1.87549 10.0034 1.87549C10.1393 1.87549 10.2727 1.91243 10.3892 1.98237L17.3177 6.14112C17.3733 6.17443 17.4194 6.22158 17.4513 6.27797C17.4832 6.33436 17.5 6.39806 17.5 6.46287V15.9999C17.5 16.1988 17.421 16.3895 17.2803 16.5302C17.1397 16.6709 16.9489 16.7499 16.75 16.7499H3.25C3.05109 16.7499 2.86032 16.6709 2.71967 16.5302C2.57902 16.3895 2.5 16.1988 2.5 15.9999V6.46212C2.49999 6.39731 2.51677 6.33361 2.54871 6.27722C2.58065 6.22083 2.62666 6.17368 2.68225 6.14037ZM4 7.09962V15.2499H16V7.09887L10.003 3.49887L4 7.09887V7.09962ZM10.045 11.2734L14.017 7.92612L14.983 9.07362L10.0555 13.2264L5.023 9.07887L5.977 7.92087L10.045 11.2734Z",fill:"var(--fc-text-muted)"})])],-1)),z("span",ts,F(s.percent(c.stats.opens,c.stats.emails)),1)],8,ss),i[17]||(i[17]=z("span",{class:"fc_middot"},"·",-1)),O(_,{subscriber:a.subscriber},null,8,["subscriber"])]),"pending"==a.subscriber.status?(D(),E("div",is,[O(h,{onClick:i[1]||(i[1]=e=>c.sendDoubleOptinEmail()),class:"fcrm_setup_btn",size:"small"},{default:q(()=>[O(m,{"icon-name":"send-mail",style:{width:"16px"}}),W(" "+F(s.$t("Send Double Opt-In Email")),1)],void 0),_:1})])):j("",!0),a.subscriber.unsubscribe_reason?(D(),E("div",as,[z("p",null,[W(F(s.ucFirst(a.subscriber.status))+" "+F(s.$t("Reason:"))+" "+F(a.subscriber.unsubscribe_reason)+" ",1),a.subscriber.unsubscribe_date?(D(),E("span",rs," @ "+F(a.subscriber.unsubscribe_date),1)):j("",!0)])])):j("",!0)]),z("div",os,[z("div",ns,[O(w,{placement:"bottom",width:"224",visible:o.lead_visible,"onUpdate:visible":i[4]||(i[4]=e=>o.lead_visible=e),trigger:"click","popper-class":"fcrm_contact_popover"},{reference:q(()=>[O(v,{size:"small"},{default:q(()=>[i[19]||(i[19]=z("span",{class:"icon"},[z("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[z("path",{d:"M12.2 4.9999H15.2V6.1999H12.2V4.9999ZM11 7.9999H15.2V9.1999H11V7.9999ZM12.8 10.9999H15.2V12.1999H12.8V10.9999ZM2 13.9999C2 12.7269 2.50571 11.506 3.40589 10.6058C4.30606 9.70562 5.52696 9.1999 6.8 9.1999C8.07304 9.1999 9.29394 9.70562 10.1941 10.6058C11.0943 11.506 11.6 12.7269 11.6 13.9999H10.4C10.4 13.0451 10.0207 12.1294 9.34558 11.4543C8.67045 10.7792 7.75478 10.3999 6.8 10.3999C5.84522 10.3999 4.92955 10.7792 4.25442 11.4543C3.57928 12.1294 3.2 13.0451 3.2 13.9999H2ZM6.8 8.5999C4.811 8.5999 3.2 6.9889 3.2 4.9999C3.2 3.0109 4.811 1.3999 6.8 1.3999C8.789 1.3999 10.4 3.0109 10.4 4.9999C10.4 6.9889 8.789 8.5999 6.8 8.5999ZM6.8 7.3999C8.126 7.3999 9.2 6.3259 9.2 4.9999C9.2 3.6739 8.126 2.5999 6.8 2.5999C5.474 2.5999 4.4 3.6739 4.4 4.9999C4.4 6.3259 5.474 7.3999 6.8 7.3999Z",fill:"var(--fc-secondary-text)"})])],-1)),z("span",ds,F(s.$t(a.subscriber.contact_type)),1),O(y,null,{default:q(()=>[O(g)],void 0,!0),_:1})],void 0,!0),_:1})]),default:q(()=>[z("div",cs,[i[18]||(i[18]=z("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none"},[z("path",{d:"M10.675 4.3751H13.3V5.4251H10.675V4.3751ZM9.625 7.0001H13.3V8.0501H9.625V7.0001ZM11.2 9.6251H13.3V10.6751H11.2V9.6251ZM1.75 12.2501C1.75 11.1362 2.1925 10.0679 2.98015 9.28025C3.7678 8.4926 4.83609 8.0501 5.95 8.0501C7.06391 8.0501 8.1322 8.4926 8.91985 9.28025C9.7075 10.0679 10.15 11.1362 10.15 12.2501H9.1C9.1 11.4147 8.76813 10.6135 8.17739 10.0227C7.58665 9.43197 6.78543 9.1001 5.95 9.1001C5.11457 9.1001 4.31335 9.43197 3.72261 10.0227C3.13187 10.6135 2.8 11.4147 2.8 12.2501H1.75ZM5.95 7.5251C4.20962 7.5251 2.8 6.11547 2.8 4.3751C2.8 2.63472 4.20962 1.2251 5.95 1.2251C7.69037 1.2251 9.1 2.63472 9.1 4.3751C9.1 6.11547 7.69037 7.5251 5.95 7.5251ZM5.95 6.4751C7.11025 6.4751 8.05 5.53535 8.05 4.3751C8.05 3.21485 7.11025 2.2751 5.95 2.2751C4.78975 2.2751 3.85 3.21485 3.85 4.3751C3.85 5.53535 4.78975 6.4751 5.95 6.4751Z",fill:"var(--fc-text-muted)"})],-1)),z("h3",null,F(s.$t("Contact Type")),1)]),z("div",ls,[O(f,{placeholder:s.$t("Select Status"),size:"small",modelValue:a.subscriber.contact_type,"onUpdate:modelValue":i[2]||(i[2]=e=>a.subscriber.contact_type=e),teleported:!1},{default:q(()=>[(D(!0),E(N,null,R(o.contact_types,e=>(D(),B(b,{key:e.id,value:e.id,label:e.title},null,8,["value","label"]))),128))],void 0,!0),_:1},8,["placeholder","modelValue"]),O(h,{onClick:i[3]||(i[3]=e=>c.saveLead()),type:"primary",size:"small"},{default:q(()=>[W(F(s.$t("Save")),1)],void 0,!0),_:1})])],void 0),_:1},8,["visible"])]),z("div",us,[O(w,{placement:"bottom",width:"224",visible:o.status_visible,"onUpdate:visible":i[7]||(i[7]=e=>o.status_visible=e),trigger:"click","popper-class":"fcrm_contact_popover"},{reference:q(()=>[O(v,{size:"small"},{default:q(()=>[i[21]||(i[21]=z("span",{class:"icon"},[z("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[z("path",{d:"M2.6 3H13.4C13.5591 3 13.7117 3.06321 13.8243 3.17574C13.9368 3.28826 14 3.44087 14 3.6V12.4C14 12.5591 13.9368 12.7117 13.8243 12.8243C13.7117 12.9368 13.5591 13 13.4 13H2.6C2.44087 13 2.28826 12.9368 2.17574 12.8243C2.06321 12.7117 2 12.5591 2 12.4V3.6C2 3.44087 2.06321 3.28826 2.17574 3.17574C2.28826 3.06321 2.44087 3 2.6 3ZM12.8 5.5428L8.0432 9.8028L3.2 5.5296V11.8H12.8V5.5428ZM3.5066 4.2L8.0366 8.1972L12.5012 4.2H3.5066Z",fill:"var(--fc-secondary-text)"})])],-1)),W(" "+F(s.$t(a.subscriber.status))+" ",1),O(y,null,{default:q(()=>[O(g)],void 0,!0),_:1})],void 0,!0),_:1})]),default:q(()=>[z("div",ms,[i[20]||(i[20]=z("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none"},[z("path",{d:"M2.275 2.625H11.725C11.8643 2.625 11.9977 2.68031 12.0962 2.77886C12.1948 2.87741 12.25 3.01082 12.25 3.15V10.85C12.25 10.9892 12.1948 11.1226 12.0962 11.2211C11.9977 11.3197 11.8643 11.375 11.725 11.375H2.275C2.13576 11.375 2.00235 11.3197 1.9038 11.2211C1.80525 11.1226 1.75 10.9892 1.75 10.85V3.15C1.75 3.01082 1.80525 2.87741 1.9038 2.77886C2.00235 2.68031 2.13576 2.625 2.275 2.625ZM11.2 4.8499L7.0378 8.57745L2.8 4.83765V10.325H11.2V4.8499ZM3.06827 3.675L7.0319 7.17255L10.9385 3.675H3.06827Z",fill:"var(--fc-text-muted)"})],-1)),z("h3",null,F(s.$t("Contact Status")),1)]),z("div",hs,[O(f,{placeholder:s.$t("Select Status"),size:"small",modelValue:a.subscriber.status,"onUpdate:modelValue":i[5]||(i[5]=e=>a.subscriber.status=e),teleported:!1},{default:q(()=>[(D(!0),E(N,null,R(o.subscriber_statuses,e=>(D(),B(b,{key:e.id,value:e.id,label:e.title},null,8,["value","label"]))),128))],void 0,!0),_:1},8,["placeholder","modelValue"]),s.hasPermission("fcrm_manage_contacts")?(D(),B(h,{key:0,type:"primary",onClick:i[6]||(i[6]=e=>c.saveStatus()),size:"small"},{default:q(()=>[W(F(s.$t("Save")),1)],void 0,!0),_:1})):j("",!0)])],void 0),_:1},8,["visible"])]),c.isSmsEnabled?(D(),E("div",ps,[O(w,{placement:"bottom",width:"224",visible:o.sms_status_visible,"onUpdate:visible":i[10]||(i[10]=e=>o.sms_status_visible=e),trigger:"click","popper-class":"fcrm_contact_popover"},{reference:q(()=>[O(v,{size:"small"},{default:q(()=>[i[23]||(i[23]=z("span",{class:"icon"},[z("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[z("path",{d:"M4.673 12.2001L2 14.3001V3.2001C2 3.04097 2.06321 2.88836 2.17574 2.77583C2.28826 2.66331 2.44087 2.6001 2.6 2.6001H13.4C13.5591 2.6001 13.7117 2.66331 13.8243 2.77583C13.9368 2.88836 14 3.04097 14 3.2001V11.6001C14 11.7592 13.9368 11.9118 13.8243 12.0244C13.7117 12.1369 13.5591 12.2001 13.4 12.2001H4.673ZM4.2578 11.0001H12.8V3.8001H3.2V11.8311L4.2578 11.0001ZM7.4 6.8001H8.6V8.0001H7.4V6.8001ZM5 6.8001H6.2V8.0001H5V6.8001ZM9.8 6.8001H11V8.0001H9.8V6.8001Z",fill:"var(--fc-secondary-text)"})])],-1)),W(" "+F(c.smsStatusMap[a.subscriber.sms_status]||a.subscriber.sms_status)+" ",1),O(y,null,{default:q(()=>[O(g)],void 0,!0),_:1})],void 0,!0),_:1})]),default:q(()=>[z("div",_s,[i[22]||(i[22]=z("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none"},[z("path",{d:"M4.08838 10.675L1.75 12.5126V2.8001C2.8 3.04097 2.80525 2.88836 2.9038 2.77583C3.00235 2.66331 3.13576 2.6001 3.275 2.6001H11.725C11.8643 2.6001 11.9977 2.65541 12.0962 2.75396C12.1948 2.85251 12.25 2.98592 12.25 3.1251V10.1501C12.25 10.2893 12.1948 10.4227 12.0962 10.5212C11.9977 10.6198 11.8643 10.6751 11.725 10.6751H4.08838ZM3.72558 9.6251H11.2V3.6501H2.8V10.3521L3.72558 9.6251ZM6.475 5.9501H7.525V7.0001H6.475V5.9501ZM4.375 5.9501H5.425V7.0001H4.375V5.9501ZM8.575 5.9501H9.625V7.0001H8.575V5.9501Z",fill:"var(--fc-text-muted)"})],-1)),z("h3",null,F(s.$t("SMS Status")),1)]),z("div",bs,[O(f,{placeholder:s.$t("Select SMS Status"),size:"small",modelValue:a.subscriber.sms_status,"onUpdate:modelValue":i[8]||(i[8]=e=>a.subscriber.sms_status=e),teleported:!1},{default:q(()=>[(D(!0),E(N,null,R(o.sms_statuses,e=>(D(),B(b,{key:e.id,value:e.id,label:e.title},null,8,["value","label"]))),128))],void 0,!0),_:1},8,["placeholder","modelValue"]),s.hasPermission("fcrm_manage_contacts")?(D(),B(h,{key:0,onClick:i[9]||(i[9]=e=>c.saveSmsStatus()),type:"primary",size:"small"},{default:q(()=>[W(F(s.$t("Save")),1)],void 0,!0),_:1})):j("",!0)])],void 0),_:1},8,["visible"])])):j("",!0)])])])])}]]),ProfileListTags:Ve},props:["subscriber"],emits:["fetch","updateSubscriber"],data:()=>({}),methods:{fetch(){this.$emit("fetch")},emitUpdate(e){this.$emit("updateSubscriber",e)}}},[["render",function(e,s,t,i,a,r){const o=U("profile-info"),n=U("profile-list-tags");return D(),E("div",fs,[O(o,{subscriber:t.subscriber,onFetch:r.fetch},null,8,["subscriber","onFetch"]),O(n,{onUpdateSubscriber:r.emitUpdate,subscriber:t.subscriber},null,8,["onUpdateSubscriber","subscriber"])])}]]),ys={class:"fcrm_company_card"},vs={class:"fcrm_company_card_body"},ws={key:0,class:"fcrm_company_card_actions"},Cs={class:"el-popover__reference"},$s={class:"el-popover__reference"},ks={class:"fcrm_company_card_image"},Ss=["src","alt"],xs={class:"fcrm_company_card_content"},Vs={class:"fcrm_company_card_name"},Ls={key:0,class:"fcrm_company_card_primary_badge"},Ps={key:0,class:"fcrm_company_card_domain"},As=["href"],Ms={key:1,class:"fcrm_company_card_email"};const Hs={class:"fcrm_assign_selector"},Is={class:"icon"},Ts={key:0},Zs={key:1},Us={key:2,class:"fcrm_assign_co_list"},Ds={class:"fcrm_assign_card"},Es={class:"fcrm_assign_card--image"},zs=["src"],Fs={key:1,class:"fcrm_assign_card--image-placeholder"},Ns={class:"fcrm_assign_card--content"},Rs={class:"fcrm_assign_card--name"},Bs={class:"fcrm_assign_card--website"},qs={class:"fcrm_assign_card--email-phone"};const Os={class:"fc_sidebar_card fcrm_contact_companies_widget fc_sidebar_card_customer"},js={class:"fc_card_header fcrm_card_header"},Ws={key:0},Gs={class:"fluentcrm-actions"},Ks={class:"fcrm_sidebar_card_content"},Qs={key:0,class:"fcrm_contact_companies fc_companies"},Ys={key:1,class:"fcrm_no_company"},Js={key:0,class:"fcrm_assign_drawer--body"},Xs={class:"fcrm_assign_drawer--body-header"},et={key:0,class:"fcrm_assign_co_existing"},st={key:1,class:"fcrm_assign_co_new"};const tt={class:"fc_contact_side"},it={key:0,class:"fc_card_header"},at=["innerHTML"],rt={key:1,style:{"margin-top":"10px","text-align":"right"},class:"fc_info_widget_nav"},ot={key:0,class:"fc_card_header"},nt=["innerHTML"],ct={key:1,style:{"margin-top":"10px","text-align":"right"},class:"fc_info_widget_nav"},lt={key:0},dt={key:1},ut={class:"fc_sidebar_card text-align-center"},mt={class:"fc_card_header"},ht={style:{padding:"10px 20px 20px",background:"white"},class:"fc_sidebar_card_content"};const pt=le({name:"ContactOverViewSidebar",props:["subscriber","subscriber_id"],emits:["widgetsFetched"],components:{PromoCard:_e,ContactCompanies:le({name:"ContactCompanies",props:["subscriber"],components:{CompanyCard:le({name:"CompanyCard",components:{Icons:de,ArrowDown:h,MoreFilled:m},props:["company","subscriber"],emits:["showDetails","removed"],computed:{domainName(){return pe(this.company.website)}},data:()=>({working:!1}),methods:{markAsPrimary(){this.working=!0,this.$put("subscribers/subscribers-property",{property:"company_id",value:this.company.id,subscribers:[this.subscriber.id]}).then(e=>{this.$notify.success(this.$t("Company marked as primary")),this.subscriber.company_id=this.company.id}).catch(e=>{this.handleError(e)}).finally(()=>{this.working=!1})},removeAssociation(){this.working=!0,this.$post("companies/detach-subscribers",{subscriber_ids:[this.subscriber.id],company_ids:[this.company.id]}).then(e=>{this.$notify.success(this.$t("Company association removed")),this.$emit("removed"),e.last_primary_company_id&&(this.subscriber.company_id=e.last_primary_company_id)}).catch(e=>{this.handleError(e)}).finally(()=>{this.working=!1})}}},[["render",function(e,s,t,i,a,r){const o=b,n=_,c=f,l=U("router-link"),d=p;return Y((D(),E("div",ys,[z("div",vs,[t.subscriber?(D(),E("div",ws,[O(c,{trigger:"click",placement:"bottom-end"},{dropdown:q(()=>[O(n,null,{default:q(()=>[O(o,{class:"fc_dropdown_action",onClick:s[0]||(s[0]=s=>e.$emit("showDetails",t.company))},{default:q(()=>[z("span",Cs,F(e.$t("Edit")),1)],void 0,!0),_:1}),t.subscriber.company_id!=t.company.id?(D(),B(o,{key:0,class:"fc_dropdown_action"},{default:q(()=>[z("span",{class:"el-popover__reference",onClick:s[1]||(s[1]=e=>r.markAsPrimary())},F(e.$t("Mark as Primary")),1)],void 0,!0),_:1})):j("",!0),O(o,{class:"fc_dropdown_action",onClick:s[2]||(s[2]=e=>r.removeAssociation())},{default:q(()=>[z("span",$s,F(e.$t("Remove Association")),1)],void 0,!0),_:1})],void 0,!0),_:1})]),default:q(()=>[s[4]||(s[4]=z("span",{class:"cursor_pointer"},[z("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[z("path",{d:"M9.99984 5C9.50713 5 9.104 5.40313 9.104 5.89583C9.104 6.38854 9.50713 6.79167 9.99984 6.79167C10.4925 6.79167 10.8957 6.38854 10.8957 5.89583C10.8957 5.40313 10.4925 5 9.99984 5ZM9.99984 13.9583C9.50713 13.9583 9.104 14.3615 9.104 14.8542C9.104 15.3469 9.50713 15.75 9.99984 15.75C10.4925 15.75 10.8957 15.3469 10.8957 14.8542C10.8957 14.3615 10.4925 13.9583 9.99984 13.9583ZM9.99984 9.47917C9.50713 9.47917 9.104 9.88229 9.104 10.375C9.104 10.8677 9.50713 11.2708 9.99984 11.2708C10.4925 11.2708 10.8957 10.8677 10.8957 10.375C10.8957 9.88229 10.4925 9.47917 9.99984 9.47917Z",fill:"currentColor"})])],-1))],void 0),_:1})])):j("",!0),z("div",ks,[t.company.logo?(D(),B(l,{key:0,to:{name:"view_company",params:{company_id:t.company.id}}},{default:q(()=>[z("img",{src:t.company.logo,alt:t.company.name},null,8,Ss)],void 0),_:1},8,["to"])):j("",!0)]),z("div",xs,[z("div",Vs,[z("a",{href:"#",onClick:s[3]||(s[3]=J(s=>e.$emit("showDetails",t.company),["prevent"]))},F(t.company.name),1),t.subscriber&&t.subscriber.company_id==t.company.id?(D(),E("span",Ls,F(e.$t("Primary")),1)):j("",!0)]),r.domainName?(D(),E("div",Ps,[z("a",{target:"_blank",rel:"noopener",href:t.company.website},[W(F(r.domainName)+" ",1),s[5]||(s[5]=z("span",{class:"fc_dash_external"},null,-1))],8,As)])):j("",!0),t.company.email?(D(),E("div",Ms,F(t.company.email),1)):j("",!0)])])])),[[d,a.working]])}]]),CompanyInfoSideContact:ne,CompanyAssignSelector:le({name:"CompanyAssignSelector",props:["subscriber"],components:{Icons:de,Search:g},emits:["companiesAttached"],data:()=>({company_search:"",companies:[],searched:!1,loading:!1,selectedIds:[],attaching:!1}),mounted(){this.fetchCompanies()},watch:{company_search:{handler:function(e,s){clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.fetchCompanies()},500)},immediate:!1}},methods:{fetchCompanies(){this.loading=!0,this.selectedIds=[],this.$get("companies/search",{limit:10,search:this.company_search,subscriber_id:this.subscriber.id}).then(e=>{this.companies=e.results,this.searched=!0}).catch(e=>{this.handleError(e)}).finally(()=>{this.loading=!1})},attachCompanies(){this.attaching=!0,this.$post("companies/attach-subscribers",{subscriber_ids:[this.subscriber.id],company_ids:this.selectedIds}).then(e=>{this.$notify.success(e.message),e.companies&&(this.each(e.companies,e=>{this.subscriber.companies.push(e)}),this.$emit("companiesAttached",e.companies))}).catch(e=>{this.handleError(e)}).finally(()=>{this.attaching=!1})}},beforeUnmount(){this.searchTimeout&&clearTimeout(this.searchTimeout)}},[["render",function(e,s,a,r,o,n){const c=U("Icons"),l=t,d=y,u=i,m=v,h=w,_=p;return D(),E("div",Hs,[O(d,{modelValue:o.company_search,"onUpdate:modelValue":s[0]||(s[0]=e=>o.company_search=e),class:"fcrm_assign_selector--search",onKeyup:s[1]||(s[1]=X(e=>n.fetchCompanies(),["enter"])),clearable:"",onClear:s[2]||(s[2]=e=>n.fetchCompanies()),placeholder:e.$t("Search Companies")},{prefix:q(()=>[O(l,null,{default:q(()=>[z("span",Is,[O(c,{"icon-name":"search"})])],void 0,!0),_:1})]),_:1},8,["modelValue","placeholder"]),o.loading?(D(),E("div",Ts,[O(u,{animated:!0,rows:3})])):o.searched&&!o.companies.length?(D(),E("div",Zs,[z("p",null,F(e.$t("No companies found based on your search")),1)])):(D(),E("div",Us,[O(h,{modelValue:o.selectedIds,"onUpdate:modelValue":s[3]||(s[3]=e=>o.selectedIds=e)},{default:q(()=>[(D(!0),E(N,null,R(o.companies,e=>(D(),B(m,{key:e.id,value:e.id},{default:q(()=>[z("div",Ds,[z("div",Es,[e.logo?(D(),E("img",{key:0,src:e.logo,alt:""},null,8,zs)):(D(),E("span",Fs))]),z("div",Ns,[z("div",Rs,[W(F(e.name)+" ",1),s[5]||(s[5]=z("span",{class:"fcrm_middot"},null,-1)),z("div",Bs,F(e.website),1)]),z("div",qs,[e.email?(D(),E(N,{key:0},[W(F(e.email),1)],64)):j("",!0),e.phone?(D(),E(N,{key:1},[s[6]||(s[6]=z("span",{class:"fcrm_middot"},null,-1)),W(" "+F(e.phone),1)],64)):j("",!0)])])])],void 0,!0),_:2},1032,["value"]))),128))],void 0),_:1},8,["modelValue"]),o.selectedIds.length?Y((D(),B(l,{key:0,disabled:o.attaching,onClick:s[4]||(s[4]=e=>n.attachCompanies()),size:"small",type:"primary"},{default:q(()=>[W(F(e.$t("Assign selected companies"))+" ("+F(o.selectedIds.length)+") ",1)],void 0),_:1},8,["disabled"])),[[_,o.attaching]]):j("",!0)]))])}]])},data(){return{direction:"rtl",showingCompany:null,drawerVisible:!1,new_company:{owner_id:""+this.subscriber.id},newCompanyDrawer:!1,assignState:"existing"}},mounted(){window.fcAdmin&&window.fcAdmin.is_rtl&&(this.direction="ltr")},methods:{showCompanyDetails(e){this.showingCompany=e,this.drawerVisible=!0},showAddCompanyDrawer(){this.new_company={owner_id:""+this.subscriber.id},this.assignState="existing",this.newCompanyDrawer=!0},newCompanyAssigned(e){this.newCompanyDrawer=!1,this.new_company={owner_id:""+this.subscriber.id},this.subscriber.companies.push(e)},companyRemoved(e){this.subscriber.companies.splice(e,1)}}},[["render",function(e,s,i,a,r,o){const n=t,c=U("company-card"),l=U("company-info-side-contact"),d=C,u=k,m=$,h=U("company-assign-selector");return D(),E("div",Os,[z("div",js,[z("h3",null,[W(F(e.$t("Companies"))+" ",1),i.subscriber.companies?(D(),E("span",Ws,"("+F(i.subscriber.companies.length)+")",1)):j("",!0)]),z("div",Gs,[O(n,{onClick:s[0]||(s[0]=e=>o.showAddCompanyDrawer()),size:"small",link:""},{default:q(()=>[W(F(e.$t("+ Add")),1)],void 0),_:1})])]),z("div",Ks,[i.subscriber.companies&&i.subscriber.companies.length?(D(),E("div",Qs,[(D(!0),E(N,null,R(i.subscriber.companies,(e,s)=>(D(),B(c,{onShowDetails:o.showCompanyDetails,company:e,subscriber:i.subscriber,onRemoved:e=>o.companyRemoved(s),key:e.id},null,8,["onShowDetails","company","subscriber","onRemoved"]))),128))])):(D(),E("div",Ys,[z("p",null,F(e.$t("Contact is not associated with any companies")),1),j("",!0)]))]),O(d,{direction:r.direction,class:"fcrm_company_info_drawer","with-header":!0,size:e.globalDrawerSize,title:r.showingCompany?r.showingCompany.name:"","append-to-body":!0,"modal-class":"fcrm_assign_drawer",modelValue:r.drawerVisible,"onUpdate:modelValue":s[2]||(s[2]=e=>r.drawerVisible=e)},{default:q(()=>[r.drawerVisible?(D(),B(l,{key:0,company:r.showingCompany},null,8,["company"])):j("",!0)],void 0),_:1},8,["direction","size","title","modelValue"]),O(d,{direction:r.direction,class:"fcrm_company_info_drawer",modelValue:r.newCompanyDrawer,"onUpdate:modelValue":s[5]||(s[5]=e=>r.newCompanyDrawer=e),"with-header":!0,size:e.globalDrawerSize,title:"existing"==r.assignState?e.$t("Add existing company"):e.$t("Create company & Assign"),"append-to-body":!0,"modal-class":"fcrm_assign_drawer"},{default:q(()=>[r.newCompanyDrawer?(D(),E("div",Js,[z("div",Xs,[O(m,{modelValue:r.assignState,"onUpdate:modelValue":s[3]||(s[3]=e=>r.assignState=e)},{default:q(()=>[O(u,{value:"existing"},{default:q(()=>[W(F(e.$t("Add Existing")),1)],void 0,!0),_:1}),O(u,{value:"new"},{default:q(()=>[W(F(e.$t("Create New")),1)],void 0,!0),_:1})],void 0,!0),_:1},8,["modelValue"])]),"existing"==r.assignState?(D(),E("div",et,[O(h,{onCompaniesAttached:s[4]||(s[4]=()=>{r.newCompanyDrawer=!1}),subscriber:i.subscriber},null,8,["subscriber"])])):(D(),E("div",st,[O(l,{onCompanyCreated:o.newCompanyAssigned,intended_contact_id:i.subscriber.id,company:r.new_company},null,8,["onCompanyCreated","intended_contact_id","company"])]))])):j("",!0)],void 0),_:1},8,["direction","modelValue","size","title"])])}]])},watch:{subscriber_id(){this.fetchWidgets()}},computed:{hasWidgets(){return this.has_company_module||this.widget_count>0}},data:()=>({loading:!1,top_widgets:[],other_widgets:[],widget_count:0,loading_widget:""}),methods:{fetchWidgets(){this.loading=!0,this.$get(`subscribers/${this.subscriber_id}/info-widgets`).then(e=>{this.top_widgets=e.widgets.top_widgets,this.other_widgets=e.widgets.other_widgets,this.widget_count=e.widgets.widgets_count,this.$emit("widgetsFetched",e.widgets.widgets_count)}).catch(e=>{this.handleError(e)}).finally(()=>{this.loading=!1})},fetchWidget(e,s){this.loading_widget=s,this.$get(`subscribers/${this.subscriber_id}/info-widgets`,{by_widget:s,page:e.current_page}).then(s=>{e.content=s.widget.content}).catch(e=>{this.handleError(e)}).finally(()=>{this.loading_widget=!1})}},mounted(){this.fetchWidgets()}},[["render",function(e,s,t,i,a,r){const o=S,n=U("contact-companies"),c=U("PromoCard"),l=p;return D(),E("div",tt,[(D(!0),E(N,null,R(a.top_widgets,(e,s)=>(D(),E("div",{key:"top_widget_"+s,class:"fc_sidebar_card fc_sidebar_card_customer"},[e.title?(D(),E("div",it,[z("h3",null,F(e.title),1)])):j("",!0),z("div",{class:"fc_sidebar_card_content",innerHTML:e.content},null,8,at),e.has_pagination?(D(),E("div",rt,[Y(O(o,{small:"",onCurrentChange:t=>r.fetchWidget(e,s),layout:"total, prev, next","page-size":e.per_page,"current-page":e.current_page,"onUpdate:currentPage":s=>e.current_page=s,total:e.total},null,8,["onCurrentChange","page-size","current-page","onUpdate:currentPage","total"]),[[l,a.loading_widget===s]])])):j("",!0)]))),128)),e.has_company_module&&t.subscriber?(D(),B(n,{key:0,subscriber:t.subscriber},null,8,["subscriber"])):j("",!0),(D(!0),E(N,null,R(a.other_widgets,(e,s)=>(D(),E("div",{key:"other_widget_"+s,class:"fc_sidebar_card fc_sidebar_card_customer"},[e.title?(D(),E("div",ot,[z("h3",null,F(e.title),1)])):j("",!0),z("div",{class:"fc_sidebar_card_content",innerHTML:e.content},null,8,nt),e.has_pagination?(D(),E("div",ct,[Y(O(o,{small:"",onCurrentChange:t=>r.fetchWidget(e,s),layout:"total, prev, next","page-size":e.per_page,"current-page":e.current_page,"onUpdate:currentPage":s=>e.current_page=s,total:e.total},null,8,["onCurrentChange","page-size","current-page","onUpdate:currentPage","total"]),[[l,a.loading_widget===s]])])):j("",!0)]))),128)),a.loading?j("",!0):(D(),E(N,{key:1},[e.has_campaign_pro?r.hasWidgets?j("",!0):(D(),E("div",dt,[z("div",ut,[z("div",mt,[z("h3",null,F(e.$t("Additional Info")),1)]),z("div",ht,[z("p",null,F(e.$t("No_Additional_Info_Alert")),1)])])])):(D(),E("div",lt,[O(c,{heading:e.$t("Get more related contact info with Pro"),description:e.$t("Fluent_CRM_Pro_Alert")},null,8,["heading","description"])]))],64))])}]]),_t={name:"ProfileNavigation",components:{ArrowLeft:V,ArrowRight:x},props:{subscriberId:{type:[String,Number],required:!0}},data:()=>({loading:!1}),computed:{...ee(ce,["subscribers","pagination"]),hasContacts(){return this.subscribers&&this.subscribers.length>0},currentIndex(){return this.hasContacts?this.subscribers.findIndex(e=>e.id==this.subscriberId):-1},currentPosition(){if(-1===this.currentIndex)return null;return(this.pagination.current_page-1)*this.pagination.per_page+this.currentIndex+1},totalContacts(){return this.pagination.total||0},isFirst(){return 0===this.currentIndex&&1===this.pagination.current_page},isLast(){const e=this.currentIndex===this.subscribers.length-1,s=this.pagination.current_page*this.pagination.per_page>=this.pagination.total;return e&&s},nextContact(){return this.currentIndex<this.subscribers.length-1?this.subscribers[this.currentIndex+1]:null},previousContact(){return this.currentIndex>0?this.subscribers[this.currentIndex-1]:null}},methods:{async goToNext(){if(this.loading)return;if(this.nextContact)return void this.navigateToContact(this.nextContact.id);this.pagination.current_page*this.pagination.per_page<this.pagination.total&&(await this.fetchNextPage(),this.subscribers.length>0&&this.navigateToContact(this.subscribers[0].id))},async goToPrevious(){this.loading||(this.previousContact?this.navigateToContact(this.previousContact.id):this.pagination.current_page>1&&(await this.fetchPreviousPage(),this.subscribers.length>0&&this.navigateToContact(this.subscribers[this.subscribers.length-1].id)))},async fetchNextPage(){this.loading=!0;const e=ce();try{e.updatePagination(this.pagination.current_page+1,this.pagination.per_page),await e.fetchContacts(!0,!0)}catch(s){this.$notify.error({title:this.$t("Error"),message:this.$t("Failed to load next page")}),console.error("[ProfileNavigation] Failed to fetch next page:",s)}finally{this.loading=!1}},async fetchPreviousPage(){this.loading=!0;const e=ce();try{e.updatePagination(this.pagination.current_page-1,this.pagination.per_page),await e.fetchContacts(!0,!0)}catch(s){this.$notify.error({title:this.$t("Error"),message:this.$t("Failed to load previous page")}),console.error("[ProfileNavigation] Failed to fetch previous page:",s)}finally{this.loading=!1}},navigateToContact(e){this.$router.push({name:"subscriber",params:{id:e}})}}},bt={key:0,class:"fcrm_profile_navigation"},ft={key:0,class:"fcrm_profile_nav_position"},gt={class:"icon"},yt={class:"icon"};const vt=le(_t,[["render",function(e,s,i,a,r,o){const n=U("ArrowLeft"),c=u,l=t,d=U("ArrowRight"),m=L;return o.hasContacts?(D(),E("div",bt,[o.currentPosition?(D(),E("span",ft,F(o.currentPosition)+" / "+F(o.totalContacts),1)):j("",!0),O(m,null,{default:q(()=>[O(l,{size:"small",disabled:o.isFirst||r.loading,onClick:o.goToPrevious,title:e.$t("Previous Contact"),class:"only-icon-btn small"},{default:q(()=>[z("span",gt,[O(c,null,{default:q(()=>[O(n)],void 0,!0),_:1})])],void 0,!0),_:1},8,["disabled","onClick","title"]),O(l,{size:"small",disabled:o.isLast||r.loading,onClick:o.goToNext,title:e.$t("Next Contact"),class:"only-icon-btn small"},{default:q(()=>[z("span",yt,[O(c,null,{default:q(()=>[O(d)],void 0,!0),_:1})])],void 0,!0),_:1},8,["disabled","onClick","title"])],void 0),_:1})])):j("",!0)}]]),wt={name:"ProfileAiSummary",components:{Badge:be,Icons:de},props:{subscriber:{type:[Object,Boolean],required:!0},subscriberId:{type:[String,Number],required:!0},contactName:{type:String,default:""},disabled:{type:Boolean,default:!1}},data:()=>({popoverVisible:!1,loading:!1,loadedFor:null,error:"",summary:{}}),watch:{subscriberId(){this.reset()}},computed:{summaryTitle(){return this.$t("AI Summary of %s",this.contactName||this.$t("this contact"))},renderedSummary(){return this.$sanitize(this.markdownToHtml(this.summary.content||""))}},methods:{fetchAiSummary(e=!1){if(!this.subscriber||this.loading)return;if(!e&&this.loadedFor==this.subscriberId&&this.summary.content)return;this.loading=!0,this.error="";const s=this.subscriberId;this.$post("ai/contact-summary",{subscriber_id:s,generate:"no",regenerate:e?"yes":"no"}).then(e=>{this.subscriberId==s&&(this.summary=e.summary||{},this.loadedFor=s)}).catch(e=>{this.subscriberId==s&&(this.error=this.getErrorMessage(e))}).finally(()=>{this.subscriberId==s&&(this.loading=!1)})},generateAiSummary(e=!1){if(!this.subscriber||this.loading)return;this.loading=!0,this.error="";const s=this.subscriberId;this.$post("ai/contact-summary",{subscriber_id:s,generate:"yes",regenerate:e?"yes":"no"}).then(e=>{this.subscriberId==s&&(this.summary=e.summary||{},this.loadedFor=s)}).catch(e=>{this.subscriberId==s&&(this.error=this.getErrorMessage(e))}).finally(()=>{this.subscriberId==s&&(this.loading=!1)})},reset(){this.popoverVisible=!1,this.loading=!1,this.loadedFor=null,this.error="",this.summary={}},getErrorMessage(e){return e&&e.message?e.message:e&&e.data&&e.data.message?e.data.message:this.$t("Could not generate AI summary. Please try again.")},markdownToHtml(e){const s=e=>(e=>String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;"))(e).replace(/\*\*(.+?)\*\*/g,"<strong>$1</strong>").replace(/\*(.+?)\*/g,"<em>$1</em>").replace(/`(.+?)`/g,"<code>$1</code>").replace(/\[([^\]]+)]\((https?:\/\/[^\s)]+)\)/g,'<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>'),t=String(e||"").split("\n");let i="",a=!1;return t.forEach(e=>{const t=e.trim();if(!t)return void(a&&(i+="</ul>",a=!1));const r=t.match(/^(#{1,4})\s+(.+)$/);if(r){a&&(i+="</ul>",a=!1);const e=Math.min(r[1].length+2,6);return void(i+=`<h${e}>${s(r[2])}</h${e}>`)}const o=t.match(/^[-*]\s+(.+)$/);if(o)return a||(i+="<ul>",a=!0),void(i+=`<li>${s(o[1])}</li>`);a&&(i+="</ul>",a=!1),i+=`<p>${s(t)}</p>`}),a&&(i+="</ul>"),i}}},Ct={class:"fcrm_ai_button_anim_wrapper"},$t={class:"fcrm_ai_summary_trigger_icon icon","aria-hidden":"true"},kt={class:"fcrm_ai_summary_box"},St={class:"fcrm_ai_summary_banner"},xt={class:"fcrm_ai_summary_banner_icon"},Vt={class:"fcrm_ai_summary_banner_title"},Lt={class:"fcrm_ai_summary_banner_subtitle"},Pt={class:"fcrm_ai_summary_header"},At={class:"icon"},Mt={class:"fcrm_ai_summary_box_body"},Ht={key:0,class:"fcrm_ai_summary_loading"},It=["innerHTML"],Tt={key:3,class:"fcrm_ai_summary_empty"},Zt={class:"fcrm_empty_state"},Ut={class:"fcrm_empty_state_text"},Dt={class:"icon"};const Et={class:"fcrm_profile_container"},zt={class:"fcrm_profile_main_content"},Ft={class:"fcrm_header_breadcrumb_wrapper"},Nt={class:"fcrm_header_breadcrumb_actions"},Rt={class:"icon"},Bt={class:"fcrm_profile_header"},qt={style:{"padding-left":"20px"}},Ot={class:"fcrm_profile_body"},jt={class:"fcrm_profile_body_nav"},Wt=["onClick","innerHTML"],Gt={class:"fcrm_profile_body_select_wrapper"},Kt={class:"fcrm_profile_body_select_label"},Qt=["innerHTML"],Yt={key:0,class:"fcrm_profile_body_inner"},Jt={key:1,class:"fcrm_profile_body_inner"},Xt={class:"fcrm_abs_sidebar"},ei={key:0,class:"fcrm_profile_sidebar_header_title"},si={class:"fcrm_profile_sidebar_inner"},ti={key:0};const ii=le({name:"Profile",components:{Icons:de,ProfileHeader:gs,Confirm:he,OverViewSidebar:pt,ProfileNavigation:vt,ProfileAiSummary:le(wt,[["render",function(e,a,r,o,c,l){const d=U("Icons"),u=t,m=U("Badge"),h=i,p=s,_=U("icons"),b=n;return D(),B(b,{visible:c.popoverVisible,"onUpdate:visible":a[2]||(a[2]=e=>c.popoverVisible=e),placement:"bottom-end",width:"460",trigger:"click","popper-class":"fcrm_ai_summary_popover",onShow:a[3]||(a[3]=e=>l.fetchAiSummary())},{reference:q(()=>[z("div",Ct,[a[4]||(a[4]=z("div",{class:"fcrm_ai_button_anim"},[z("div",{class:"fcrm_ai_button_anim_inner"})],-1)),O(u,{size:"small",class:"fcrm_ai_summary_trigger fcrm_ai_button",loading:c.loading,disabled:r.disabled||!r.subscriber},{default:q(()=>[z("span",$t,[O(d,{"icon-name":"ai"})]),W(" "+F(e.$t("AI Summary")),1)],void 0,!0),_:1},8,["loading","disabled"])])]),default:q(()=>[z("div",kt,[z("div",St,[z("div",xt,[O(d,{"icon-name":"ai"})]),z("div",null,[z("div",Vt,F(l.summaryTitle),1),z("div",Lt,[z("span",null,F(r.subscriber.email),1),r.subscriber.status?(D(),B(m,{key:0,type:r.subscriber.status},null,8,["type"])):j("",!0)])])]),z("div",Pt,[z("div",null,[z("h3",null,F(c.summary.content?e.$t("Saved Summary"):e.$t("No Saved Summary")),1),z("p",null,F(c.summary.generated_at?e.$t("Generated")+": "+e.smartDate(c.summary.generated_at):e.$t("Generate a decision-ready markdown summary for this contact.")),1)]),c.summary.content?(D(),B(u,{key:0,loading:c.loading,onClick:a[0]||(a[0]=e=>l.generateAiSummary(!0)),size:"small"},{default:q(()=>[z("span",At,[O(d,{"icon-name":"reload"})]),W(" "+F(e.$t("Regenerate")),1)],void 0,!0),_:1},8,["loading"])):j("",!0)]),z("div",Mt,[c.loading&&!c.summary.content?(D(),E("div",Ht,[O(h,{animated:"",rows:6})])):c.error?(D(),B(p,{key:1,type:"error",closable:!1,title:c.error,"show-icon":""},null,8,["title"])):c.summary.content?(D(),E("div",{key:2,class:"fcrm_ai_summary_markdown",innerHTML:l.renderedSummary},null,8,It)):(D(),E("div",Tt,[z("div",Zt,[O(_,{"icon-name":"common-empty-state"}),z("div",Ut,[z("span",null,F(e.$t("No AI summary generated yet")),1)]),O(u,{type:"primary",size:"small",loading:c.loading,onClick:a[1]||(a[1]=e=>l.generateAiSummary())},{default:q(()=>[z("span",Dt,[O(d,{"icon-name":"reload"})]),W(" "+F(e.$t("Generate AI Summary")),1)],void 0,!0),_:1},8,["loading"])])]))])])],void 0),_:1},8,["visible"])}]]),More:A,ArrowRight:x,ArrowRightBold:P,ArrowDown:h,ArrowLeft:V},props:["id"],data:()=>({ArrowRight:ae(x),ArrowRightBold:ae(P),ArrowDown:ae(h),subscriber:!1,loading:!1,custom_fields:[],subscriber_meta:{},show_profile:!0,doing_action:!1,sidebarOpen:"yes",widgetsCount:0,hasSidebar:!0,selectedIndex:null,isFullProfileLoaded:!1,profile_parts:{}}),watch:{id(){this.fetch()},$route(){this.syncSelectedWithRoute()}},computed:{lists(){return this.subscriber.lists.map(e=>e.title)},name(){return this.subscriber.first_name||this.subscriber.last_name?`${this.subscriber.first_name||""} ${this.subscriber.last_name||""}`:this.subscriber.email},showSidebar(){return this.hasSidebar&&"yes"==this.sidebarOpen},widgetTickerCount(){return this.has_company_module&&this.subscriber&&this.subscriber.companies&&this.subscriber.companies.length?this.widgetsCount+1:this.widgetsCount},profilePartsList(){return Array.isArray(this.profile_parts)?this.profile_parts:Object.values(this.profile_parts||{})}},methods:{setup(e){const s=null==e?void 0:e.custom_values;s&&(Object.keys(s).forEach(e=>{const t=s[e];if(t){const i=this.custom_fields.find(s=>s.slug===e);!i||"select-multi"!==i.type&&"checkbox"!==i.type||"string"!=typeof t||(s[e]=t.split(", "))}}),e.custom_values=s),this.subscriber=e,this.show_profile||(this.show_profile=!0);const t=this.applyFilters("fluentcrm_profile_sections",window.fcAdmin.profile_sections,e);Object.keys(t).length!==Object.keys(this.profile_parts).length&&(this.profile_parts=t),this.filterProfileParts(this.profile_parts),this.syncSelectedWithRoute(),this.changeTitle(e.full_name+" - Contact"),this.doAction("fluent_crm_subscriber_loaded",this)},filterProfileParts(){let e=this.profile_parts;const s={};Object.keys(e).forEach(t=>{const i=e[t].name;this.$router.hasRoute(i)&&(s[t]=e[t])}),this.profile_parts=s},fetch(){this.loading=!0;const e=ce(),s=this.id,t=e.subscribers.find(e=>e.id==this.id);t?(this.subscriber=t,this.show_profile=!0,this.loading=!1,this.isFullProfileLoaded=!1,e.fetchProfile(this.id).then(e=>{this.id===s&&(this.custom_fields=e.custom_fields,this.setup(e.subscriber),this.isFullProfileLoaded=!0)}).catch(e=>{this.id===s&&this.handleError(e)})):(this.loading=!0,this.show_profile=!1,this.isFullProfileLoaded=!1,e.fetchProfile(this.id).then(e=>{this.id===s&&(this.custom_fields=e.custom_fields,this.setup(e.subscriber),this.isFullProfileLoaded=!0)}).catch(e=>{this.id===s&&this.handleError(e)}).finally(()=>{this.id===s&&(this.loading=!1)}))},sidebarLoaded(e){this.widgetsCount=e},maybeCustomHandler(e){"fluentcrm_profile_extended"==e.name&&(this.show_profile=!1,setTimeout(()=>{this.show_profile=!0},100))},deleteContact(){this.loading=!0,this.$del(`subscribers/${this.id}`).then(e=>{this.$notify.success(e.message),this.$router.push({name:"subscribers"})}).catch(e=>{this.handleError(e)}).finally(()=>{this.loading=!1})},toggleSidebar(){this.sidebarOpen="yes"==this.sidebarOpen?"no":"yes",this.storage.set("fc_profile_sidebar",this.sidebarOpen)},syncSelectedWithRoute(){var e,s;const t=null==(s=null==(e=this.$route)?void 0:e.query)?void 0:s.handler,i=this.profilePartsList.findIndex(e=>e.name===this.$route.name&&(!e.query||void 0===e.query.handler||e.query.handler==t));this.selectedIndex=i>-1?i:null},onSelectChange(e){if(null==e)return;const s=this.profilePartsList[e];if(s){if("function"==typeof this.maybeCustomHandler)try{this.maybeCustomHandler(s)}catch(t){console.error(t)}this.$router.push({name:s.name,params:{id:this.id},query:s.query||{},hash:"#fluentcrm_sub_info_body"}).catch(()=>{})}}},mounted(){this.changeTitle(this.$t("Profile")),this.fetch(),this.sidebarOpen="no"==this.storage.get("fc_profile_sidebar","yes")?"no":"yes",this.syncSelectedWithRoute()},beforeUnmount(){this.doAction("fluent_crm_leaving_profile",this.subscriber)}},[["render",function(e,s,a,r,o,n){const c=M,u=H,m=U("profile-navigation"),h=U("profile-ai-summary"),p=U("Icons"),g=t,y=U("confirm"),v=b,w=_,C=f,$=Z,k=T,S=i,x=I,V=U("profile-header"),L=U("router-link"),P=d,A=l,K=U("router-view"),Q=U("over-view-sidebar");return U("ArrowRight"),U("ArrowLeft"),D(),E("div",{class:G(["fcrm_profile_wrapper",{fc_side_closed:o.hasSidebar&&!n.showSidebar,fc_side_opened:n.showSidebar}])},[z("div",Et,[z("div",zt,[z("div",Ft,[O(u,{class:"fcrm_header_breadcrumb","separator-icon":o.ArrowRightBold},{default:q(()=>[O(c,{to:{name:"subscribers"}},{default:q(()=>[W(F(e.$t("All Contacts")),1)],void 0,!0),_:1}),O(c,null,{default:q(()=>[W(F(n.name),1)],void 0,!0),_:1})],void 0),_:1},8,["separator-icon"]),z("div",Nt,[O(m,{"subscriber-id":a.id},null,8,["subscriber-id"]),O(h,{subscriber:o.subscriber,"subscriber-id":a.id,"contact-name":n.name,disabled:o.loading},null,8,["subscriber","subscriber-id","contact-name","disabled"]),O(C,{size:"small",trigger:"click"},{dropdown:q(()=>[O(w,null,{default:q(()=>[O(v,{class:"fc_dropdown_action"},{default:q(()=>[O(y,{placement:"top-start",message:e.$t("Contact_Delete_Alert"),onYes:s[0]||(s[0]=e=>n.deleteContact())},{reference:q(()=>[z("span",null,F(e.$t("Delete Contact")),1)]),_:1},8,["message"])],void 0,!0),_:1})],void 0,!0),_:1})]),default:q(()=>[O(g,{size:"small",class:"el-dropdown-link"},{default:q(()=>[W(F(e.$t("Actions"))+" ",1),z("span",Rt,[O(p,{"icon-name":"downIcon"})])],void 0,!0),_:1})],void 0),_:1})])]),z("div",Bt,[o.loading?(D(),B(S,{key:0,class:"",animated:""},{template:q(()=>[O(x,{gutter:30},{default:q(()=>[O(k,{span:3},{default:q(()=>[O($,{variant:"circle",style:{width:"145px",height:"145px"}})],void 0,!0),_:1}),O(k,{span:20},{default:q(()=>[z("div",qt,[O(S)])],void 0,!0),_:1})],void 0,!0),_:1})]),_:1})):o.subscriber?(D(),B(V,{key:1,onUpdateSubscriber:n.setup,onFetch:n.fetch,subscriber:o.subscriber},null,8,["onUpdateSubscriber","onFetch","subscriber"])):j("",!0)]),z("div",Ot,[z("ul",jt,[(D(!0),E(N,null,R(o.profile_parts,(s,t)=>(D(),B(L,{onClick:e=>n.maybeCustomHandler(s),key:s.name+t,custom:"",to:{name:s.name,hash:"#fluentcrm_sub_info_body",params:{id:a.id},query:s.query}},{default:q(({navigate:t})=>[z("li",{class:G({item_active:e.$route.name==s.name&&(!s.query||e.$route.query.handler==s.query.handler)}),onClick:t,innerHTML:s.title},null,10,Wt)]),_:2},1032,["onClick","to"]))),128))]),z("div",Gt,[z("div",Kt,F(e.$t("Select Section")),1),O(A,{modelValue:o.selectedIndex,"onUpdate:modelValue":s[1]||(s[1]=e=>o.selectedIndex=e),placeholder:e.$t("Select section"),onChange:n.onSelectChange,class:"fcrm_profile_body_select",clearable:""},{default:q(()=>[(D(!0),E(N,null,R(n.profilePartsList,(e,s)=>(D(),B(P,{key:e.name+s,label:e.title,value:s},{default:q(()=>[z("span",{innerHTML:e.title},null,8,Qt)],void 0,!0),_:2},1032,["label","value"]))),128))],void 0),_:1},8,["modelValue","placeholder","onChange"])]),o.subscriber&&o.show_profile?(D(),E("div",Yt,[O(K,null,{default:q(({Component:s})=>[O(se,{name:"fc-fade",mode:"out-in"},{default:q(()=>[(D(),B(te(s),{onUpdateSubscriber:n.setup,key:e.$route.fullPath,custom_fields:o.custom_fields,subscriber:o.subscriber,subscriber_id:a.id,is_full_profile_loaded:o.isFullProfileLoaded},null,40,["onUpdateSubscriber","custom_fields","subscriber","subscriber_id","is_full_profile_loaded"]))],void 0,!0),_:2},1024)]),_:1})])):(D(),E("div",Jt,[O(S,{class:"fc_skeleton_loader",animated:""},{template:q(()=>[O(x,{gutter:30},{default:q(()=>[O(k,{span:12},{default:q(()=>[O(S,{rows:10})],void 0,!0),_:1}),O(k,{span:12},{default:q(()=>[O(S,{rows:3})],void 0,!0),_:1})],void 0,!0),_:1})]),_:1})]))])]),z("div",{class:G(["fcrm_profile_sidebar",{is_active:n.showSidebar}])},[z("div",Xt,[z("div",{onClick:s[2]||(s[2]=e=>n.toggleSidebar()),class:"fcrm_profile_sidebar_header"},[n.showSidebar?(D(),E("span",ei,F(e.$t("Additional Information"))+" ("+F(n.widgetTickerCount)+") ",1)):j("",!0),O(g,{type:"info",size:"small",class:"fc_sidebar_open_btn"},{default:q(()=>[...s[5]||(s[5]=[z("span",{class:"icon"},[z("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[z("path",{d:"M10.119 9.30539L6.88505 6.07145L7.86714 5.08936L12.7776 9.99983L7.86714 14.9103L6.88505 13.9282L10.1189 10.6943L3.74965 10.6943L3.74963 9.30546L10.119 9.30539ZM14.1664 14.8609V5.13867H15.5553V14.8609H14.1664Z",fill:"var(--fc-secondary-text)"})])],-1)])],void 0),_:1})])]),Y(z("div",si,[Y(O(Q,{onWidgetsFetched:n.sidebarLoaded,subscriber:o.subscriber,subscriber_id:a.id},null,8,["onWidgetsFetched","subscriber","subscriber_id"]),[[ie,o.show_profile]]),o.loading?(D(),E("div",ti,[O(S,{class:"fc_skeleton_loader",style:{"margin-bottom":"20px"},animated:""}),O(S,{class:"fc_skeleton_loader",animated:""})])):j("",!0)],512),[[ie,n.showSidebar]])],2)]),j("",!0)],2)}]]);export{ii as default};