Initial commit

This commit is contained in:
gustavooth committed 2026-07-23 22:56:30 -03:00
commit 22a1006598
1816 files changed
+410742

No files matched your search

@@ -0,0 +1,2 @@
<?php
// Silence is golden.
@@ -0,0 +1 @@
import{W as e,ay as t,e as a,aM as l,aL as s,aK as i,aw as o,aE as n,aF as r,aJ as c,E as p,az as d,ax as m,k as _,h as u,i as h,j as f,aT as y,g,B as b,aG as w,aj as v,av as C,aI as k,aB as $,aC as x,aH as A,D as S,ar as V,aO as I}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as j,W as F,X as q,J as O,ab as P,a8 as R,Z as D,aa as T,a6 as B,az as L,a5 as U,Y as z,a9 as E,ay as N,a0 as M,_ as H,b_ as Q,b$ as G,ax as W}from"../../../../vendor.js?ver=3.1.8";import{C as Y}from"../../../../CompanyInfoSide.js?ver=3.1.8";import{C as Z}from"../../../../Csv.js?ver=3.1.8";import{G as J}from"../../../../GenericPromo2.js?ver=3.1.8";import{_ as K,I as X,a as ee,T as te}from"../../../../fc-bits-ui.js?ver=3.1.8";import{F as ae}from"../../../../Filterer2.js?ver=3.1.8";import{l as le,j as se,i as ie}from"../../../../data_config.js?ver=3.1.8";import{S as oe}from"../../../../Searcher.js?ver=3.1.8";import{P as ne}from"../../../../PaginationBar.js?ver=3.1.8";import{D as re}from"../../../../DataTable.js?ver=3.1.8";import{F as ce}from"../../../../FloatingBulkActionShell.js?ver=3.1.8";import{C as pe}from"../../../../Confirm2.js?ver=3.1.8";import{P as de}from"../../../../PageHeader.js?ver=3.1.8";import"../../../../CompanyEditForm.js?ver=3.1.8";import"../../../../fc-bits.js?ver=3.1.8";import"../../../../BaseCard.js?ver=3.1.8";import"../../../../Error.js?ver=3.1.8";import"../../../../PromoCard.js?ver=3.1.8";const me={class:"fcrm_csv_import fcrm_company_unsaved fcrm_company_info_wrapper fcrm_company_in_drawer"},_e={key:0},ue={key:1},he={class:"fcrm_company_field_mapping_title"},fe={class:"fcrm_company_field_mapping_table"},ye={class:"fcrm_company_update_section"},ge={class:"fcrm_company_update_label_row"},be={class:"fcrm_company_update_label"},we={class:"fcrm_company_save_wrap"},ve={key:0},Ce={key:1,class:"text-align-center"};const ke={class:"d-flex flex-wrap gap-8 items-center"},$e={class:"icon"},xe={class:"icon"},Ae={class:"icon"},Se={class:"icon"},Ve={key:0,class:"fcrm_company_drawer_content"},Ie={class:"fcrm_company_drawer_footer_actions"},je=["id"],Fe={class:"fcrm_company_drawer_content"},qe={class:"fcrm_company_drawer_body"};const Oe=K({name:"ActionMenu",components:{Icons:X,CompanyInfoSide:Y,CompanyCsvImporter:K({name:"CompanyCsvImporter",components:{CsvImporter:Z,GenericPromo:J,InfoFilled:e},emits:["imported"],data(){return{step:"upload",options:{delimiter:"comma",type:"company",sampleCsv:this.appVars.images_url+"/sample-companies.csv"},headers:{},fields:{},columns:[],form:{map:[],file:"",update:"yes",create_owner:"yes"},importing:!1,importing_page:1,results:{}}},methods:{handleUploadSuccess(e){this.headers=e.headers,this.form.map=e.map,this.form.file=e.file,this.columns=e.columns,this.fields=e.fields,this.step="map"},importCompanies(){this.importing=!0,this.$post("companies/csv-import",{...this.form,importing_page:this.importing_page,delimiter:this.options.delimiter}).then(e=>{if(this.results=e,e.has_more)return this.importing_page++,void this.importCompanies();this.$notify.success(this.$t("Companies imported successfully")),this.$emit("imported"),this.importing=!1}).catch(e=>{this.importing=!1,this.handleError(e)})}}},[["render",function(e,u,h,f,y,g){const b=j("csv-importer"),w=a,v=s,C=l,k=i,$=j("InfoFilled"),x=p,A=c,S=r,V=n,I=o,N=d,M=m,H=_,Q=j("generic-promo"),G=t;return F(),q("div",me,[e.has_campaign_pro?(F(),q(O,{key:0},["upload"==y.step?(F(),q("div",_e,[P(b,{onSuccess:g.handleUploadSuccess,options:y.options},null,8,["onSuccess","options"])])):R("",!0),"map"==y.step?(F(),q("div",ue,[D("h3",he,T(e.$t("Please map the fields")),1),B((F(),q("table",fe,[D("thead",null,[D("tr",null,[D("th",null,T(e.$t("CSV Headers")),1),D("th",null,T(e.$t("Company Fields")),1)])]),D("tbody",null,[(F(!0),q(O,null,L(y.headers,(t,a)=>(F(),q("tr",{key:a},[D("td",null,[P(w,{value:t,disabled:"",class:"fcrm_company_csv_header_input"},null,8,["value"])]),D("td",null,[P(k,{clearable:"",modelValue:y.form.map[a].table,"onUpdate:modelValue":e=>y.form.map[a].table=e,class:"fcrm_company_field_select"},{default:U(()=>[P(C,{label:e.$t("Main Properties")},{default:U(()=>[(F(!0),q(O,null,L(y.columns,(e,t)=>(F(),z(v,{key:t,label:y.fields[e]||e,value:e},null,8,["label","value"]))),128))],void 0,!0),_:1},8,["label"]),e.appVars.company_custom_fields&&e.appVars.company_custom_fields.length?(F(),z(C,{key:0,label:e.$t("Custom Properties")},{default:U(()=>[(F(!0),q(O,null,L(e.appVars.company_custom_fields,e=>(F(),z(v,{key:e.slug,label:e.label,value:"_custom_"+e.slug},null,8,["label","value"]))),128))],void 0,!0),_:1},8,["label"])):R("",!0)],void 0),_:1},8,["modelValue","onUpdate:modelValue"])])]))),128))])])),[[G,y.importing]]),D("div",ye,[B((F(),z(M,{modelValue:y.form,"onUpdate:modelValue":u[2]||(u[2]=e=>y.form=e),"label-position":"top",class:"fcrm_company_update_form"},{default:U(()=>[P(I,{class:"fcrm_company_update_item"},{label:U(()=>[D("div",ge,[D("span",be,T(e.$t("Update Companies")),1),P(A,{class:"item",placement:"bottom-start",effect:"light"},{conLine truncated
@@ -0,0 +1 @@
import{aQ as e,W as r,X as o,ab as s}from"../../../../vendor.js?ver=3.1.8";import{_ as t}from"../../../../fc-bits-ui.js?ver=3.1.8";import"../../../../vendor-element-plus.js?ver=3.1.8";const n=t({name:"CompaniesRoute"},[["render",function(t,n,a,i,m,u){const v=e("router-view");return r(),o("div",null,[s(v)])}]]);export{n as default};
@@ -0,0 +1 @@
import{c as e,aq as t,ar as i,L as a,a3 as s,a6 as o,a4 as n,D as l,E as d,e as r,k as c,az as h,aL as p,aK as _,aT as g}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as m,W as u,X as f,Z as v,aa as y,ab as k,a5 as w,b2 as b,a8 as N,Y as C,a0 as $,a9 as x,J as L,az as D,ax as M,a6 as A,ac as S,aE as z,bK as T}from"../../../../vendor.js?ver=3.1.8";import{C as q}from"../../../../Confirm2.js?ver=3.1.8";import{F as P}from"../../../../_FormBuilder.js?ver=3.1.8";import{F as j}from"../../../../FloatingBulkActionShell.js?ver=3.1.8";import{c as V}from"../../../../clipboard.js?ver=3.1.8";import{_ as B,I as E}from"../../../../fc-bits-ui.js?ver=3.1.8";import"../../../../_OptionSelector.js?ver=3.1.8";import"../../../../input-popover-dropdown2.js?ver=3.1.8";import"../../../../CustomIcon.js?ver=3.1.8";import"../../../../data_config.js?ver=3.1.8";z.extend(T);const I={class:"fcrm_act_wrap"},U={class:"fcrm_act_card"},F={class:"fcrm_act_head"},Y={class:"fcrm_act_head_inner"},R={class:"fcrm_act_title_wrap"},H={class:"fcrm_act_title"},K={key:0,class:"fcrm_act_actions"},Z={key:0,class:"fcrm_act_search_wrap"},O={class:"icon"},Q={class:"icon"},G={key:0,class:"fcrm_notes_list"},J=["data-note-id"],W=["onClick"],X={class:"fcrm_note_header_left"},ee={class:"fcrm_note_avatar"},te=["src","alt"],ie={key:1,class:"fcrm_note_avatar_initials"},ae={class:"fcrm_note_info"},se={class:"fcrm_note_title"},oe={class:"fcrm_note_meta"},ne={key:0},le={key:1},de=["title"],re={class:"fcrm_note_header_right"},ce={class:"icon"},he={class:"icon"},pe=["innerHTML"],_e={key:1,class:"fcrm_empty_state"},ge={class:"fcrm_empty_state_text"},me={key:2,class:"fcrm_pg"},ue={class:"fcrm_pg_left"},fe={class:"fcrm_pg_text"},ve={class:"fcrm_pg_right"},ye={class:"fcrm_pg_page"},ke={class:"fcrm_pg_page_num"},we={class:"fcrm_bulk_action_bar"},be={class:"fcrm_bulk_action_left"},Ne={class:"icon"},Ce={class:"fc_bulk_selection_count"},$e={key:0,class:"fcrm_bulk_divider"},xe={class:"icon"},Le={class:"fcrm_drawer_body"},De={class:"dialog-footer justify-end"};const Me=B({name:"CompanyActivities",props:["company_id"],emits:["added","deleted","updated"],components:{Icons:E,Confirm:q,FormBuilder:P,FloatingBulkActionShell:j,Search:l,Download:n,Delete:o,Edit:s,Plus:a,ArrowLeft:i,ArrowRight:t,DArrowLeft:{name:"DArrowLeft",template:'\n <svg viewBox="0 0 1024 1024" width="20" height="20" fill="currentColor">\n <path d="M529 747q9 8 21 8t21 -9t9 -21t-9 -21l-312 -320l312 -320q9 -9 9 -21.5t-9 -21t-21 -8.5t-21 8l-331 341q-9 10 -9 22.5t9 21.5zM785 747q9 8 21 8t21 -9t9 -21t-9 -21l-312 -320l312 -320q9 -9 9 -21.5t-9 -21t-21 -8.5t-21 8l-331 341q-9 10 -9 22.5t9 21.5z" transform="scale(1,-1) translate(0,-896)" />\n </svg>\n '},DArrowRight:{name:"DArrowRight",template:'\n <svg viewBox="0 0 1024 1024" width="20" height="20" fill="currentColor">\n <path d="M453 747q9 8 21 8t21 -8l331 -341q9 -9 9 -22t-9 -22l-331 -341q-9 -8 -21 -8t-21 9t-9 21t9 21l312 320l-312 320q-9 9 -9 21t9 22zM197 747q9 8 21 8t21 -8l331 -341q9 -9 9 -22t-9 -22l-331 -341q-9 -8 -21 -8t-21 9t-9 21t9 21l312 320l-312 320q-9 9 -9 21t9 22z" transform="scale(1,-1) translate(0,-896)" />\n </svg>\n '},Close:e},data:()=>({direction:"rtl",loading:!1,notes:[],types:window.fcAdmin.activity_types,pagination:{total:0,per_page:10,current_page:1},editing_note:{title:"",description:"",type:"note",created_at:""},is_editing_note:!1,search:"",showSearch:!1,updating:!1,is_changed:!1,note_syncing_fields:{},expandedNotes:{},targetedNoteId:null,bulkMode:!1,selectedNotes:[]}),computed:{allSelected(){return this.notes.length>0&&this.selectedNotes.length===this.notes.length},someSelected(){return this.selectedNotes.length>0&&this.selectedNotes.length<this.notes.length},page_sizes(){const e=[];this.pagination.per_page<10&&e.push(this.pagination.per_page);return[...e,10,20,50,80,100,120,150]}},watch:{"editing_note.type"(e,t){this.handleValueUpdate(e,t)},"editing_note.title"(e,t){this.handleValueUpdate(e,t)},"editing_note.description"(e,t){this.handleValueUpdate(e,t)},"editing_note.created_at"(e,t){this.handleValueUpdate(e,t)}},methods:{toggleNote(e){this.expandedNotes={...this.expandedNotes,[e]:!this.expandedNotes[e]}},toggleAllNotes(){const e=this.notes.every(e=>this.expandedNotes[e.id]),t={};this.notes.forEach(i=>{t[i.id]=!e}),this.expandedNotes=t},toggleBulkMode(){this.bulkMode=!this.bulkMode,this.bulkMode||(this.selectedNotes=[])},toggleNoteSelection(e){if(!this.bulkMode)return;const t=this.selectedNotes.indexOf(e);-1===t?this.selectedNotes.push(e):this.selectedNotes.splice(t,1)},toggleAllSelection(){this.bulkMode&&(this.allSelected?this.selectedNotes=[]:this.selectedNotes=this.notes.map(e=>e.id))},bulkDelete(){this.selectedNotes.length&&this.$confirm(this.$t("Are you sure you want to delete the selected notes? This action cannot be undone."),this.$t("Delete Notes"),{confirmButtonText:this.$t("Yes, Delete"),cancelButtonText:this.$t("Cancel"),type:"warning"}).then(()=>{this.loading=!0,this.$Line truncated
@@ -0,0 +1 @@
import{L as t,D as s,E as e,e as a,aB as i,k as n,az as o,aG as l,ay as r,c,aT as d}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as h,W as p,X as _,ab as m,a5 as f,b2 as g,Z as C,bB as u,aa as v,J as w,az as y,Y as b,a6 as x,a9 as B,a8 as F,a0 as S}from"../../../../vendor.js?ver=3.1.8";import{F as L,C as k}from"../../../../_ContactsTable.js?ver=3.1.8";import{_ as A,I as j}from"../../../../fc-bits-ui.js?ver=3.1.8";import"../../../../Tagger.js?ver=3.1.8";import"../../../../data_config.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";import"../../../../Filterer2.js?ver=3.1.8";import"../../../../Searcher.js?ver=3.1.8";import"../../../../PaginationBar.js?ver=3.1.8";import"../../../../DataTable.js?ver=3.1.8";import"../../../../FloatingBulkActionShell.js?ver=3.1.8";import"../../../../Confirm.js?ver=3.1.8";import"../../../../_OptionSelector.js?ver=3.1.8";import"../Contacts/Filter/FilterPopover.js?ver=3.1.8";import"../Contacts/Filter/ActiveFiltersBar.js?ver=3.1.8";import"../../../../_IntlTelInput.js?ver=3.1.8";import"../../../../Badge.js?ver=3.1.8";import"../../../../relations.js?ver=3.1.8";import"../../../../clipboard.js?ver=3.1.8";const M={key:0},E={key:1,class:"fcrm_assign_empty"},Z={class:"fcrm_assign_empty_body"},$={class:"fcrm_assign_empty_text"},T={key:2,class:"fcrm_assign_list"},U={class:"fcrm_assign_item_body"},I={class:"fcrm_assign_avatar"},D=["src","alt"],G={key:1,class:"fcrm_assign_avatar_ph"},V={class:"fcrm_assign_info"},O={class:"fcrm_assign_name"},z={class:"fcrm_assign_email"},N={key:0,class:"fcrm_assign_actions"};const q={class:"icon"},P={key:0,class:"fcrm_drawer_content"},H={class:"fcrm_tab_menu"},R={class:"fcrm_tab_text"},J={key:0,class:"fcrm_tab_line"},K={class:"fcrm_tab_text"},Q={key:0,class:"fcrm_tab_line"},W={class:"fcrm_adder_content"},X={key:0,class:"fcrm_assign_existing"},Y={key:1,class:"fcrm_assign_create_new"};const tt=A({name:"CompanyMembers",props:["company_id","company"],components:{ContactsTable:k,ContactAdder:A({name:"ContactAdded",props:["company"],components:{Icons:j,ContactAssignSelector:A({name:"ContactAssignSelector",props:["company"],components:{Search:s,Plus:t},emits:["attached","createNew"],data:()=>({contact_search:"",contacts:[],searched:!1,loading:!1,selectedIds:[],attaching:!1,searchTimer:null}),watch:{contact_search(){this.searchTimer&&clearTimeout(this.searchTimer),this.searchTimer=setTimeout(()=>{this.fetchContacts()},350)}},methods:{fetchContacts(){const t=(this.contact_search||"").trim(),s=!!t;this.loading=!0,this.selectedIds=[],this.$get("companies/search-unattached-contacts",{limit:s?20:10,search:t,company_id:this.company.id}).then(t=>{this.contacts=t.results,this.searched=s}).catch(t=>{this.handleError(t)}).finally(()=>{this.loading=!1})},attachContacts(){this.attaching=!0,this.$post("companies/attach-subscribers",{subscriber_ids:this.selectedIds,company_ids:[this.company.id]}).then(t=>{this.$notify.success(t.message),this.$emit("attached")}).catch(t=>{this.handleError(t)}).finally(()=>{this.attaching=!1})}},mounted(){this.fetchContacts()},beforeUnmount(){this.searchTimer&&clearTimeout(this.searchTimer)}},[["render",function(t,s,c,d,S,L){const k=h("Search"),A=e,j=a,q=i,P=h("Plus"),H=n,R=o,J=l,K=r;return p(),_("div",null,[m(j,{modelValue:S.contact_search,"onUpdate:modelValue":s[1]||(s[1]=t=>S.contact_search=t),placeholder:t.$t("Search Contact"),onKeyup:s[2]||(s[2]=g(t=>L.fetchContacts(),["enter"])),class:"fcrm_assign_search"},{prefix:f(()=>[m(A,{onClick:s[0]||(s[0]=t=>L.fetchContacts()),style:{cursor:"pointer"}},{default:f(()=>[m(k)],void 0,!0),_:1})]),_:1},8,["modelValue","placeholder"]),S.loading?(p(),_("div",M,[m(q,{animated:!0,rows:3})])):S.searched&&!S.contacts.length?(p(),_("div",E,[C("div",Z,[s[6]||(s[6]=u('<div class="fcrm_illust"><svg class="fcrm_illust_dots" xmlns="http://www.w3.org/2000/svg" width="84" height="79" viewBox="0 0 84 79" fill="none"><path d="M42.6099 77.5944C63.2868 77.5944 80.0499 60.9145 80.0499 40.2667C80.0499 19.6189 63.213 2.93896 42.6099 2.93896C21.933 2.93896 5.16992 19.6189 5.16992 40.2667C5.16992 60.9145 21.933 77.5944 42.6099 77.5944Z" fill="var(--fc-secondary-bg)"></path><path d="M77.3168 15.8715C78.9889 15.8715 80.3444 14.5227 80.3444 12.8589C80.3444 11.195 78.9889 9.84619 77.3168 9.84619C75.6446 9.84619 74.2891 11.195 74.2891 12.8589C74.2891 14.5227 75.6446 15.8715 77.3168 15.8715Z" fill="#F1F3F9"></path><path d="M81.7474 4.11486C82.8893 4.11486 83.8151 3.19372 83.8151 2.05743C83.8151 0.921144 82.8893 0 81.7474 0C80.6054 0 79.6797 0.921144 79.6797 2.05743C79.6797 3.19372 80.6054 4.11486 81.7474 4.11486Z" fill="#EAEEF9"></path><path d="M2.06769 21.0153C3.20965 21.0153 4.13538 20.0941 4.13538 18.9578C4.13538 17.8215 3.20965 16.9004 2.06769 16.9004C0.925737 16.9004 0 17.8215 0 18.9578C0 20.0941 0.925737 21.0153 2.06769 21.0153Z" fill="#EAEEF9"></path><path d="M13.4396 78.1824C15.5604 78.1824 17.2796 76.4717 17.2796 74.36Line truncated
@@ -0,0 +1 @@
import{aD as t,aA as e,aB as a}from"../../../../vendor-element-plus.js?ver=3.1.8";import{W as n,X as o,Z as i,a0 as s,Y as r,a5 as c,ab as d}from"../../../../vendor.js?ver=3.1.8";import{_ as l}from"../../../../fc-bits-ui.js?ver=3.1.8";const m={key:0,class:"fluentcrm_databox"},h=["innerHTML"];const _=l({name:"CompanyExternalView",props:["company","company_id"],data:()=>({profile_section:"",heading:"",content_html:"",loading:!0,crud:null,showForm:!1,crudConfig:{},saving:!1}),watch:{"$route.query":{handler(t){this.profile_section=t.handler,this.fetchData()},deep:!0,immediate:!0}},methods:{fetchData(){this.loading=!0,this.$get(`companies/${this.company_id}/custom_tab_view`,{section_provider:this.profile_section}).then(t=>{this.heading=t.heading,this.content_html=t.content_html,t.crud&&(this.crud=t.crud)}).catch(t=>{this.handleError(t)}).finally(()=>{this.loading=!1})}},mounted(){this.fetchData()}},[["render",function(l,_,p,f,u,v){const g=a,y=e,w=t;return u.loading?(n(),r(g,{key:1,style:{"margin-top":"20px"},class:"fcrm_skeleton_loader",animated:!0},{template:c(()=>[d(w,{gutter:30},{default:c(()=>[d(y,{span:12},{default:c(()=>[d(g,{rows:10})],void 0,!0),_:1}),d(y,{span:12},{default:c(()=>[d(g,{rows:3})],void 0,!0),_:1})],void 0,!0),_:1})]),_:1})):(n(),o("div",m,[i("div",{class:s(["fcrm_external_company_profile_data","fcrm_section_"+u.profile_section]),innerHTML:u.content_html},null,10,h)]))}]]);export{_ as default};
@@ -0,0 +1 @@
import{at as a,j as e,k as o,E as s,h as t,i as n,a_ as i,aZ as m,aA as r,aV as l,aW as d,aD as c,aB as p,ap as u}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as _,W as f,X as y,ab as h,ay as v,a5 as g,a9 as w,aa as C,Z as j,J as $,az as k,Y as b,a0 as x,av as A}from"../../../../vendor.js?ver=3.1.8";import{C as T}from"../../../../CompanyInfoSide.js?ver=3.1.8";import{P as q}from"../../../../PageHeader.js?ver=3.1.8";import{C as B}from"../../../../Confirm2.js?ver=3.1.8";import{_ as D}from"../../../../fc-bits-ui.js?ver=3.1.8";import"../../../../data_config.js?ver=3.1.8";import"../../../../CompanyEditForm.js?ver=3.1.8";import"../../../../fc-bits.js?ver=3.1.8";import"../../../../BaseCard.js?ver=3.1.8";const E={class:"fluentcrm-campaigns fluentcrm-view-wrapper fluentcrm_view"},P={key:0,class:"fcrm_view_company_wrapper"},z={key:1};const H=D({name:"ViewCompany",props:["company_id"],components:{PageHeader:q,Confirm:B,ArrowDown:a,CompanyInfoSide:T},data(){return{ArrowRightBold:A(u),company:null,loading:!1,updating:!1,show_profile:!0,menu_items:window.fcAdmin.company_profile_sections,activeTab:this.$route.name}},watch:{company_id(){this.company=null,this.fetchCompany()}},methods:{setup(a){this.company=a,this.changeTitle(a.name+" - Company")},fetchCompany(){this.loading=!0,this.show_profile=!1,this.$get("companies/"+this.company_id).then(a=>{this.setup(a.company)}).catch(a=>{this.handleError(a)}).finally(()=>{this.loading=!1})},deleteCompany(){this.loading=!0,this.$del(`companies/${this.company_id}`).then(a=>{this.$notify.success(a.message),this.$router.push({name:"companies"})}).catch(a=>{this.handleError(a)}).finally(()=>{this.loading=!1})},maybeCustomHandler(a){"fluentcrm_company_profile_extended"==a.name&&(this.show_profile=!1,setTimeout(()=>{this.show_profile=!0},100))}},mounted(){this.fetchCompany(),this.changeTitle(this.$t("View Company"))}},[["render",function(a,u,A,T,q,B){const D=m,H=i,V=_("ArrowDown"),I=s,R=o,S=_("confirm"),W=n,Y=t,Z=e,F=_("page-header"),J=d,Q=l,X=_("router-view"),G=r,K=_("company-info-side"),L=c,M=p;return f(),y("div",E,[q.company?(f(),y("div",P,[h(F,null,v({breadcrumb:g(()=>[h(H,{"separator-icon":q.ArrowRightBold},{default:g(()=>[h(D,{to:{name:"companies"}},{default:g(()=>[w(C(a.$t("Companies")),1)],void 0,!0),_:1}),h(D,null,{default:g(()=>[w(C(q.company.name),1)],void 0,!0),_:1})],void 0,!0),_:1},8,["separator-icon"])]),_:2},[a.hasPermission("fcrm_manage_contact_cats_delete")?{name:"actions",fn:g(()=>[h(Z,{size:"small",trigger:"click","popper-class":"fcrm_action_dropdown_menu"},{dropdown:g(()=>[h(Y,null,{default:g(()=>[h(W,{class:"fc_dropdown_action"},{default:g(()=>[h(S,{placement:"top-start",message:a.$t("Are you sure you want to delete this company?"),onYes:u[0]||(u[0]=a=>B.deleteCompany())},{reference:g(()=>[j("span",null,C(a.$t("Delete Company")),1)]),_:1},8,["message"])],void 0,!0),_:1})],void 0,!0),_:1})]),default:g(()=>[h(R,{size:"small",class:"el-dropdown-link"},{default:g(()=>[w(C(a.$t("Actions"))+" ",1),h(I,{class:"el-icon--right"},{default:g(()=>[h(V)],void 0,!0),_:1})],void 0,!0),_:1})],void 0,!0),_:1})]),key:"0"}:void 0]),1024),h(L,{gutter:24,class:"fcrm_view_company_content"},{default:g(()=>[h(G,{lg:18,md:16,sm:24,xs:24},{default:g(()=>[h(Q,{router:!0,"default-active":q.activeTab,class:"fcrm_segment_menu"},{default:g(()=>[(f(!0),y($,null,k(q.menu_items,(a,e)=>(f(),b(J,{class:x("fcrm_item_"+a.name+" "+(a.item_class||"")),route:{name:a.name,query:a.query},key:e,index:a.query?a.query.handler:a.name},{default:g(()=>[j("span",null,C(a.title),1)],void 0,!0),_:2},1032,["class","route","index"]))),128))],void 0,!0),_:1},8,["default-active"]),h(X,{company_id:A.company_id,company:q.company},null,8,["company_id","company"])],void 0,!0),_:1}),h(G,{lg:6,md:8,sm:24,xs:24},{default:g(()=>[j("div",null,[h(K,{company:q.company},null,8,["company"])])],void 0,!0),_:1})],void 0),_:1})])):(f(),y("div",z,[h(L,{gutter:30},{default:g(()=>[h(G,{lg:6,md:8,sm:24,xs:24},{default:g(()=>[h(M,{class:"fcrm_skeleton_loader",animated:!0,rows:25})],void 0,!0),_:1}),h(G,{lg:18,md:16,sm:24,xs:24},{default:g(()=>[h(M,{class:"fcrm_skeleton_loader",animated:!0,rows:10})],void 0,!0),_:1})],void 0),_:1})]))])}]]);export{H as default};
@@ -0,0 +1 @@
import{C as e}from"../../../../ContactHeaderPopNav.js?ver=3.1.8";import{aQ as t,W as a,X as n,ab as r,Z as o}from"../../../../vendor.js?ver=3.1.8";import{_ as s}from"../../../../fc-bits-ui.js?ver=3.1.8";import"../../../../vendor-element-plus.js?ver=3.1.8";const i={class:"fcrm_settings_wrapper"},u={class:"fcrm_setting_wrap"};const c=s({name:"ContactGroups",components:{ContactHeaderPopNav:e},data(){return{router_name:this.$route.name}},watch:{"$route.name"(){this.router_name=this.$route.name}},methods:{changeMenu(e){this.router_name=e}}},[["render",function(e,s,c,m,p,d){const h=t("contact-header-pop-nav"),v=t("router-view");return a(),n("div",i,[r(h,{head_title:e.$t("Contacts Navigation")},null,8,["head_title"]),o("div",u,[r(v,{onChangeMenu:d.changeMenu},null,8,["onChangeMenu"])])])}]]);export{c as default};
@@ -0,0 +1 @@
import{ay as e,aF as t,aE as s,W as i,aw as o,aH as a,aI as r,aD as l,aA as n,aJ as c,az as d,ax as p,av as m,E as _,aK as u,aL as h,e as f,aM as g,k as v,aN as C,g as y,as as b,L as $,h as w,i as k,j as V,aO as I,ab as S,J as x,a1 as R,O as F,u as M,aP as L}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as P,a6 as O,W as D,X as T,Z as U,aa as N,Y as j,a5 as A,J as q,az as E,a8 as H,ab as B,a9 as Z,ay as z,a0 as G,bS as J,bT as W,av as Y}from"../../../../vendor.js?ver=3.1.8";import{A as Q,f as K,C as X}from"../../../../_ContactsTable.js?ver=3.1.8";import{P as ee}from"../../../../ProBadge.js?ver=3.1.8";import{_ as te,I as se}from"../../../../fc-bits-ui.js?ver=3.1.8";import{C as ie}from"../../../../Csv.js?ver=3.1.8";import{F as oe}from"../../../../_FormBuilder.js?ver=3.1.8";import{O as ae}from"../../../../_OptionSelector.js?ver=3.1.8";import{C as re,a as le,T as ne,I as ce}from"../../../../_ImportRunner.js?ver=3.1.8";import{E as de}from"../../../../Exporter.js?ver=3.1.8";import{u as pe}from"../../../../Tagger.js?ver=3.1.8";import me from"./RichFilters/Filters.js?ver=3.1.8";import{P as _e}from"../../../../PromoCard.js?ver=3.1.8";import{C as ue}from"../../../../ContactHeaderPopNav.js?ver=3.1.8";import{P as he}from"../../../../PageHeader.js?ver=3.1.8";import"../../../../Filterer.js?ver=3.1.8";import"../../../../Filterer2.js?ver=3.1.8";import"../../../../data_config.js?ver=3.1.8";import"../../../../Searcher.js?ver=3.1.8";import"../../../../PaginationBar.js?ver=3.1.8";import"../../../../DataTable.js?ver=3.1.8";import"../../../../FloatingBulkActionShell.js?ver=3.1.8";import"../../../../Confirm.js?ver=3.1.8";import"./Filter/FilterPopover.js?ver=3.1.8";import"./Filter/ActiveFiltersBar.js?ver=3.1.8";import"../../../../fc-bits.js?ver=3.1.8";import"../../../../_IntlTelInput.js?ver=3.1.8";import"../../../../Badge.js?ver=3.1.8";import"../../../../relations.js?ver=3.1.8";import"../../../../clipboard.js?ver=3.1.8";import"../../../../Error.js?ver=3.1.8";import"../../../../input-popover-dropdown2.js?ver=3.1.8";import"../../../../CustomIcon.js?ver=3.1.8";import"../../../../_FormBuilder2.js?ver=3.1.8";import"../../../../PhotoWidget.js?ver=3.1.8";import"../../../../input-popover-dropdown.js?ver=3.1.8";import"../../../../_AjaxSelector.js?ver=3.1.8";import"../../../../_VerifiedEmailInput.js?ver=3.1.8";import"../../../../GenericPromo.js?ver=3.1.8";import"../../../../CompanyEditForm.js?ver=3.1.8";import"../../../../_TaxonomyTermsSelector.js?ver=3.1.8";const fe={class:"fcrm_sources_details"},ge={class:"fcrm_source_logo"},ve={key:0,class:"fcrm_source_logo_holder fcrm_csv_icon"},Ce={class:"fcrm_csv_export_icon_label"},ye={key:1,class:"fcrm_source_logo_holder fcrm_wordpress_icon"},be={key:2,class:"fcrm_source_logo_holder fcrm_fluent_cart_icon"},$e={key:3,class:"fcrm_source_logo_holder fcrm_woocommerce_icon"},we=["src"],ke={class:"fcrm_source_label"},Ve={class:"fcrm_text_label"},Ie={class:"fcrm_sources_details"},Se={class:"fcrm_source_logo"},xe=["src"],Re={class:"fcrm_source_label",style:{"padding-top":"0px"}},Fe={class:"fcrm_text_label"},Me={key:1,class:"fcrm_narrow_box fcrm_databox fcrm_text-align-center"},Le=["innerHTML"],Pe=["href"];const Oe=te({name:"ImportSourceSelector",components:{ProBadge:ee},props:["modelValue"],emits:["fetch","update:modelValue","next","hide"],data(){return{loading:!1,option:this.modelValue,import_sources:!1}},computed:{buttonDisabled(){const e=this.modelValue,t=this.import_sources;return!e||!t||!t[e]||t[e].disabled},disabledText(){const e=this.modelValue,t=this.import_sources;return e&&t&&t[e]&&t[e].disabled?t[e].disabled_message:""}},watch:{option(e){this.$emit("update:modelValue",e)},modelValue(e){this.option=e}},methods:{hideModal(){this.$emit("hide")},next(){this.$emit("next")},getSources(){this.loading=!0,this.$get("import/drivers").then(e=>{this.import_sources=e.drivers}).catch(e=>{this.handleError(e)}).finally(()=>{this.loading=!1})}},mounted(){this.getSources()}},[["render",function(i,o,a,r,l,n){const c=P("ProBadge"),d=t,p=s,m=e;return O((D(),T("div",null,[U("h4",null,N(i.$t("SourceSelector.title")),1),l.import_sources?(D(),j(p,{key:0,class:"fcrm_sources fcrm_inline_image_radio",modelValue:l.option,"onUpdate:modelValue":o[0]||(o[0]=e=>l.option=e)},{default:A(()=>[(D(!0),T(q,null,E(l.import_sources,(e,t)=>(D(),j(d,{key:t,value:t,class:"fcrm_option"},{default:A(()=>[U("div",fe,[U("div",ge,["csv"===t?(D(),T("div",ve,[o[1]||(o[1]=U("svg",{class:"fcrm_csv_export_icon_document",xmlns:"http://www.w3.org/2000/svg",width:"26",height:"32",viewBox:"0 0 26 32",fill:"none"},[U("path",{d:"M4.7998 0.599609H13.4707C14.5733 0.599609 15.6323 1.03401 16.418 1.80762L24.1465 9.41699C24.9483 10.2064 25.4004 11.285 25.4004 12.4102V27.2002C25.4003 29.5196 23.5196 31.4003 21.2002 31.4004H4.7998C2.48036 31.4003 0.599715 29.5196 0.599609 27.2002V4.7998C0.599715 2.48036 2.48036 0.599715 4.7998 0.599609Z",fill:"white",stroke:"var(--fc-secondary-border)","stroke-width":"1.2"})],-1)),o[2]||(o[2]=U("svg",{class:"fcrm_Line truncated
@@ -0,0 +1 @@
import{aG as e,az as t,aO as s,k as l}from"../../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as i,W as r,X as a,Z as o,aa as c,J as n,az as d,ax as u,ab as _,Y as p,a5 as m,a9 as h,a8 as f}from"../../../../../vendor.js?ver=3.1.8";import g from"./FilterPopover.js?ver=3.1.8";import{_ as v,I as b}from"../../../../../fc-bits-ui.js?ver=3.1.8";const S={name:"ActiveFiltersBar",components:{FilterPopover:g,Icons:b},emits:["filter-change","open-filter"],props:{selectedFilters:{type:Object,required:!0,default:()=>({lists:[],tags:[],labels:[],statuses:[],types:[],sms_statuses:[]})},options:{type:Object,required:!0,default:()=>({lists:[],tags:[],labels:[],statuses:[],types:[],sms_statuses:[]})},plus_filter_icon:{type:Boolean,default:!1}},computed:{activeLabels(){if(!this.selectedFilters.labels||!this.selectedFilters.labels.length)return[];if(!this.options.labels||!this.options.labels.length)return[];const e=this.selectedFilters.labels.map(e=>Number(e));return this.options.labels.filter(t=>e.includes(Number(t.id)))},activeTags(){if(!this.selectedFilters.tags||!this.selectedFilters.tags.length)return[];if(!this.options.tags||!this.options.tags.length)return[];const e=this.selectedFilters.tags.map(e=>Number(e));return this.options.tags.filter(t=>e.includes(Number(t.id)))},activeLists(){if(!this.selectedFilters.lists||!this.selectedFilters.lists.length)return[];if(!this.options.lists||!this.options.lists.length)return[];const e=this.selectedFilters.lists.map(e=>Number(e));return this.options.lists.filter(t=>e.includes(Number(t.id)))},activeStatuses(){return this.selectedFilters.statuses&&this.selectedFilters.statuses.length&&this.options.statuses&&this.options.statuses.length?this.options.statuses.filter(e=>{const t=e.id||e.slug||e.key||e;return this.selectedFilters.statuses.map(e=>String(e)).includes(String(t))}):[]},activeTypes(){return this.selectedFilters.types&&this.selectedFilters.types.length&&this.options.types&&this.options.types.length?this.options.types.filter(e=>{const t=e.id||e.slug||e.key||e.value||e;return this.selectedFilters.types.map(e=>String(e)).includes(String(t))}):[]},activeSmsStatuses(){return this.selectedFilters.sms_statuses&&this.selectedFilters.sms_statuses.length&&this.options.sms_statuses&&this.options.sms_statuses.length?this.options.sms_statuses.filter(e=>{const t=e.id||e.slug||e.key||e;return this.selectedFilters.sms_statuses.map(e=>String(e)).includes(String(t))}):[]},visibleTags(){return this.activeTags},visibleLabels(){return this.activeLabels},visibleLists(){return this.activeLists},visibleStatuses(){return this.activeStatuses},visibleTypes(){return this.activeTypes},visibleSmsStatuses(){return this.activeSmsStatuses},hasMoreTags(){return this.activeTags.length>0&&this.options.tags&&this.options.tags.length>0},hasMoreLabels(){return this.activeLabels.length>0&&this.options.labels&&this.options.labels.length>0},hasMoreLists(){return this.activeLists.length>0&&this.options.lists&&this.options.lists.length>0},hasMoreStatuses(){return this.activeStatuses.length>0&&this.options.statuses&&this.options.statuses.length>0},hasMoreTypes(){return this.activeTypes.length>0&&this.options.types&&this.options.types.length>0},hasMoreSmsStatuses(){return this.activeSmsStatuses.length>0&&this.options.sms_statuses&&this.options.sms_statuses.length>0},hasActiveFilters(){return this.activeTags.length>0||this.activeLabels.length>0||this.activeLists.length>0||this.activeStatuses.length>0||this.activeTypes.length>0||this.activeSmsStatuses.length>0},normalizedSelectedTags(){return this.selectedFilters.tags&&this.selectedFilters.tags.length?this.selectedFilters.tags.map(e=>Number(e)):[]},normalizedSelectedLabels(){return this.selectedFilters.labels&&this.selectedFilters.labels.length?this.selectedFilters.labels.map(e=>Number(e)):[]},normalizedSelectedLists(){return this.selectedFilters.lists&&this.selectedFilters.lists.length?this.selectedFilters.lists.map(e=>Number(e)):[]},normalizedSelectedStatuses(){return this.selectedFilters.statuses&&this.selectedFilters.statuses.length?this.selectedFilters.statuses.map(e=>String(e)):[]},normalizedSelectedTypes(){return this.selectedFilters.types&&this.selectedFilters.types.length?this.selectedFilters.types.map(e=>String(e)):[]},normalizedSelectedSmsStatuses(){return this.selectedFilters.sms_statuses&&this.selectedFilters.sms_statuses.length?this.selectedFilters.sms_statuses.map(e=>String(e)):[]}},methods:{getStatusId:e=>e.id||e.slug||e.key||e.value||e,getStatusTitle:e=>e.title||e.label||e,getTypeId:e=>e.id||e.slug||e.key||e.value||e,getTypeTitle:e=>e.title||e.label||e.name||e,getSmsStatusId:e=>e.id||e.slug||e.key||e.value||e,getSmsStatusTitle:e=>e.title||e.label||e,removeTag(e){const t=Number(e),s=this.selectedFilters.tags.filter(e=>Number(e)!==t);this.$emit("filter-change",{...this.selectedFilters,tags:s})},removeLabel(e){const t=Number(e),s=this.selectedFilters.labels.filter(e=>Number(e)!==t);this.$emit("filter-change",{...this.selectedFilters,labels:s})},removLine truncated
@@ -0,0 +1 @@
import{D as t,ar as e,E as s,e as i,aG as a,az as l,k as o,aO as r}from"../../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as n,W as c,X as m,ab as u,a5 as h,Z as _,aa as y,a8 as p,J as d,Y as f,az as g,a9 as v,a0 as b}from"../../../../../vendor.js?ver=3.1.8";import{_ as C,I as S}from"../../../../../fc-bits-ui.js?ver=3.1.8";const k={name:"FilterPopover",components:{ArrowLeft:e,Search:t,Icons:S},emits:["apply","subscribe"],props:{disabled:{type:Boolean,default:!1},options:{type:Object,default:()=>({lists:[],tags:[],labels:[],statuses:[],types:[],sms_types:[],sms_statuses:[]})},selectedFilters:{type:Object,default:()=>({lists:[],tags:[],labels:[],statuses:[],types:[],sms_types:[],sms_statuses:[]})},selection:{type:Boolean,default:!1},matched:{type:Object,default:()=>({})},selectionCount:{type:Number,default:0},plus_filter_icon:{type:Boolean,default:!1}},data:()=>({isPopoverVisible:!1,activeCategory:null,searchQuery:"",localSelection:{lists:[],tags:[],labels:[],statuses:[],types:[],sms_types:[],sms_statuses:[]},initialSelection:{lists:[],tags:[],labels:[],statuses:[],types:[],sms_types:[],sms_statuses:[]}}),computed:{filteredOptions(){if(!this.activeCategory)return[];const t=this.options[this.activeCategory]||[];if(!this.searchQuery)return t;const e=this.searchQuery.toLowerCase();return t.filter(t=>this.getItemTitle(t).toLowerCase().includes(e))},categoryTitle(){return{lists:this.$t("Lists"),tags:this.$t("Tags"),labels:this.$t("Labels"),statuses:this.$t("Status"),types:this.$t("Type"),sms_types:this.$t("Type"),sms_statuses:this.$t("SMS Status")}[this.activeCategory]||""},searchPlaceholder(){return{lists:this.$t("Search lists..."),tags:this.$t("Search tags..."),labels:this.$t("Search labels..."),statuses:this.$t("Search statuses..."),types:this.$t("Search types..."),sms_types:this.$t("Search types..."),sms_statuses:this.$t("Search SMS statuses...")}[this.activeCategory]||this.$t("Search...")},hasChanges(){if(!this.selection||!this.activeCategory)return!1;const t=this.localSelection[this.activeCategory]||[],e=this.initialSelection[this.activeCategory]||[];return t.length!==e.length||t.some(t=>!e.includes(t))},isSmsEnabled(){var t;return"yes"===(null==(t=window.fcAdmin)?void 0:t.sms_enabled)},hasAppliedFilters(){if(this.plus_filter_icon)return!1;const t=this.selectedFilters||{};return Object.values(t).some(t=>Array.isArray(t)&&t.length>0)}},watch:{selectedFilters:{immediate:!0,deep:!0,handler(t){this.selection||(this.localSelection={lists:[...t.lists||[]],tags:[...t.tags||[]],labels:[...t.labels||[]],statuses:[...t.statuses||[]],types:[...t.types||[]],sms_types:[...t.sms_types||[]],sms_statuses:[...t.sms_statuses||[]]})}},activeCategory(t){this.searchQuery="",t&&this.selection&&this.initializeSelection()}},methods:{openFilterCategory(t){if(this.disabled)return;const e=t&&Array.isArray(this.options[t])&&this.options[t].length>0;this.activeCategory=e?t:null,this.syncSelectionFromFilters(),this.isPopoverVisible=!0},syncSelectionFromFilters(){if(this.selection)return;const t=this.selectedFilters||{},e=this.options||{},s=(t,e)=>{if(!Array.isArray(t))return e;const s=t.find(t=>t.id==e||t.slug==e);return s?void 0!==s.id?s.id:s.slug:e},i=(t,e)=>{if(!Array.isArray(t))return e;const s=t.find(t=>{const s=(null==t?void 0:t.id)??(null==t?void 0:t.slug)??(null==t?void 0:t.key)??(null==t?void 0:t.value);return String(s)===String(e)});return s?s.id??s.slug??s.key??s.value:e};this.localSelection={lists:(t.lists||[]).map(t=>s(e.lists||[],t)).filter(t=>null!=t),tags:(t.tags||[]).map(t=>s(e.tags||[],t)).filter(t=>null!=t),labels:(t.labels||[]).map(t=>s(e.labels||[],t)).filter(t=>null!=t),statuses:(t.statuses||[]).map(t=>i(e.statuses||[],t)).filter(Boolean),types:(t.types||[]).map(t=>i(e.types||[],t)).filter(Boolean),sms_types:(t.sms_types||[]).map(t=>i(e.sms_types||[],t)).filter(Boolean),sms_statuses:(t.sms_statuses||[]).map(t=>i(e.sms_statuses||[],t)).filter(Boolean)}},getItemKey:t=>t?t.id??t.slug??t.key??t.value??t.label??t.title:"",selectCategory(t){this.activeCategory=t},goBack(){this.activeCategory=null,this.searchQuery=""},getItemTitle:t=>t&&(t.title||t.name||t.label||t.slug||t.id)||"",getItemValue(t){return t?this.selection?t.slug||t.id:"statuses"===this.activeCategory||"types"===this.activeCategory||"sms_statuses"===this.activeCategory||"sms_types"===this.activeCategory?t.id??t.slug??t.key??t.value:t.id:""},isIndeterminate(t){if(!this.selection||!this.activeCategory)return!1;const e=t.slug||t.id,s=(this.matched[this.activeCategory]||{})[e]||0;return s>0&&s!==this.selectionCount},initializeSelection(){if(!this.activeCategory)return;const t=this.matched[this.activeCategory]||{},e=Object.keys(t);this.localSelection[this.activeCategory]=[...e],this.initialSelection[this.activeCategory]=[...e]},handleChange(){if(this.selection)return;const t={lists:[...this.localSelection.lists||[]],tags:[...this.localSelection.tags||[]],labels:[...this.localSelection.labels||[]],statuses:[...this.localSelection.statuses||[]],types:[...tLine truncated
@@ -0,0 +1 @@
import{W as e,e as t,E as i,aJ as l,ay as o,aM as a,aL as n,aK as s,a6 as d,aY as m,k as r,L as u,b3 as c,aO as p}from"../../../../../vendor-element-plus.js?ver=3.1.8";import{b$ as f,aQ as _,W as h,X as v,ab as y,a5 as b,a8 as g,a6 as C,Y as V,J as $,az as k,Z as w,a9 as x,aa as O}from"../../../../../vendor.js?ver=3.1.8";import{A as S}from"../../../../../_AjaxSelector.js?ver=3.1.8";import{T as j}from"../../../../../_TaxonomyTermsSelector.js?ver=3.1.8";import{O as I}from"../../../../../_OptionSelector.js?ver=3.1.8";import{_ as U,I as T}from"../../../../../fc-bits-ui.js?ver=3.1.8";const L={class:"fcrm_item_num_selector"},q={key:0};const A={style:{width:"200px","line-height":"110%"}},F={key:0},R=["innerHTML"],D={style:{width:"200px"},class:"fcrm_filter_operator"},z={class:"fcrm_filter_value"},M=["innerHTML"],E={key:6},N={key:6,class:"fcrm_composite_filters"},Y={key:0,class:"fcrm_composite_filter"},W={class:"fcrm_composite_input"},B={class:"fcrm_composite_filter"},G={class:"fcrm_composite_input"},H={key:7,class:"fcrm_cascade_selections"},Q={key:0,style:{width:"50px","text-align":"right"}},P={class:"icon"};const J={name:"RichContactFilter",components:{Icons:T,FilterItem:U({name:"RichFilterItem",props:["item","filterLabels","view_only"],emits:["removeItem"],components:{Icons:T,OptionSelector:I,AjaxSelector:S,TaxonomyTermsSelector:j,ItemTimesSelection:U({name:"ItemTimesSelection",props:["field","modelValue","disabled"],emits:["update:modelValue"],components:{AjaxSelector:S,InfoFilled:e},data(){return{model:this.modelValue,loading:!1,options:[]}},watch:{model(e){this.$emit("update:modelValue",e)}},mounted(){f(this.model)||(this.model=["",2])}},[["render",function(e,o,a,n,s,d){const m=_("ajax-selector"),r=t,u=_("InfoFilled"),c=i,p=l;return h(),v("div",L,[y(m,{modelValue:s.model[0],"onUpdate:modelValue":o[0]||(o[0]=e=>s.model[0]=e),field:{is_multiple:a.field.is_multiple,option_key:a.field.primary_selector,extended_key:a.field.extended_key||"",size:"small",disabled:a.disabled,placeholder:a.field.primary_placeholder,cacheable:a.field.cacheable}},null,8,["modelValue","field"]),y(r,{disabled:a.disabled,placeholder:a.field.numeric_placeholder,size:"small",type:"number",min:0,modelValue:s.model[1],"onUpdate:modelValue":o[1]||(o[1]=e=>s.model[1]=e)},null,8,["disabled","placeholder","modelValue"]),a.field.input_help?(h(),v("span",q,[y(p,{class:"fcrm_item",effect:"dark",content:a.field.input_help,placement:"top-start"},{default:b(()=>[y(c,null,{default:b(()=>[y(u)],void 0,!0),_:1})],void 0),_:1},8,["content"])])):g("",!0)])}]]),CascadeOptionSelector:U({name:"CascadeOptionSelector",props:["field","modelValue"],emits:["update:modelValue"],data(){return{model:this.modelValue,loading:!1,options:[],appReady:!0}},watch:{model(e){this.$emit("update:modelValue",e)}},methods:{fetchOptions(e){this.loading=!0,this.$get("reports/cascade_selections",{search:e,values:this.model,provider:this.field.provider,is_multiple:!!this.field.is_multiple}).then(e=>{this.options=e.options}).catch(e=>{this.handleError(e)}).finally(()=>{this.loading=!1})},remoteMethod(e){if(this.loading)return!1;this.fetchOptions(e)}},mounted(){this.fetchOptions(""),this.modelValue&&f(this.modelValue)||(this.model=[])}},[["render",function(e,t,i,l,d,m){const r=n,u=a,c=s,p=o;return C((h(),V(c,{"remote-method":m.remoteMethod,filterable:"",remote:"","reserve-keyword":"","value-key":"value",modelValue:d.model,"onUpdate:modelValue":t[0]||(t[0]=e=>d.model=e),size:"small",multiple:i.field.is_multiple,placeholder:e.$t("Select")},{default:b(()=>[(h(!0),v($,null,k(d.options,e=>(h(),V(u,{key:e.label,label:e.label},{default:b(()=>[(h(!0),v($,null,k(e.children,e=>(h(),V(r,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))],void 0,!0),_:2},1032,["label"]))),128))],void 0),_:1},8,["remote-method","modelValue","multiple","placeholder"])),[[p,d.loading]])}]]),InfoFilled:e,Delete:d},data:()=>({}),computed:{operatorOptionsNative(){if(this.itemConfig.custom_operators)return this.itemConfig.custom_operators;const e=this.itemConfig.type;if("extended_text"==e)return{"=":this.$t("equal"),"!=":this.$t("does not equal"),contains:this.$t("includes"),not_contains:this.$t("does not include"),startsWith:this.$t("starts with"),endsWith:this.$t("ends with")};if(!e||"text"==e)return{"=":this.$t("equal"),"!=":this.$t("does not equal"),contains:this.$t("includes"),not_contains:this.$t("does not include")};if("numeric"==e||"times_numeric"==e)return{">":this.$t("Greater Than"),"<":this.$t("Less Than"),"=":this.$t("equal"),"!=":this.$t("does not equal")};if("selections"==e)return this.itemConfig.custom_operators?this.itemConfig.custom_operators:"countries"===this.itemConfig.option_key?{in:this.$t("includes in"),not_in:this.$t("not includes in"),is_null:this.$t("Empty"),not_null:this.$t("Not Empty")}:this.itemConfig.is_multiple&&"subscriber"!=this.itemConfig.provider&&"custom_fields"!=this.itemConfig.provider&&!this.itemConfig.is_singular_value?{in:this.$t("includes"),not_in:this.$t(Line truncated
@@ -0,0 +1 @@
import{k as e}from"../../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as r,W as i,X as a,Z as t,J as s,az as n,aa as l,ab as d,a5 as o,a9 as c,a8 as _,b$ as f}from"../../../../../vendor.js?ver=3.1.8";import v from"./Filters.js?ver=3.1.8";import{_ as m,I as u}from"../../../../../fc-bits-ui.js?ver=3.1.8";import"../../../../../_AjaxSelector.js?ver=3.1.8";import"../../../../../_TaxonomyTermsSelector.js?ver=3.1.8";import"../../../../../_OptionSelector.js?ver=3.1.8";const p={class:"fcrm_rich_container"},h={class:"fcrm_rich_wrap"},b={class:"fcrm_rich_filter"},y={class:"fcrm_filter_group_header"},j={class:"fcrm_and_label"},R={key:0,class:"fcrm_cond_or"},G={class:"icon","aria-hidden":"true"},O={class:"fcrm_cond_or"},g={class:"icon","aria-hidden":"true"};const C=m({name:"RichFilterContainer",components:{Icons:u,RichFilter:v},props:{advanced_filters:{type:Array,default:function(){return[[]]}},add_label:{type:String,default:function(){return this.$t("Filters.instruction")}},filterOptions:{type:Array,default:function(){return[]}}},methods:{maybeRemoveGroup(e){this.advanced_filters.length>1&&this.advanced_filters.splice(e,1)},addConditionGroup(){this.advanced_filters.push([])}},mounted(){this.advanced_filters&&f(this.advanced_filters)&&0!=this.advanced_filters.length||(this.advanced_filters=[[]])}},[["render",function(f,v,m,u,C,$){const k=r("rich-filter"),x=r("Icons"),A=e;return i(),a("div",p,[t("div",h,[(i(!0),a(s,null,n(m.advanced_filters,(e,r)=>(i(),a("div",{key:r},[t("div",b,[t("div",y,[t("div",j,l(f.$t("And")),1),d(k,{filterOptions:m.filterOptions,add_label:m.add_label,button_text:f.$t("Add Property"),canDeleteGroup:m.advanced_filters.length>1,onMaybeRemove:e=>$.maybeRemoveGroup(r),items:e},null,8,["filterOptions","add_label","button_text","canDeleteGroup","onMaybeRemove","items"])])]),r<m.advanced_filters.length-1?(i(),a("div",R,[v[2]||(v[2]=t("div",{class:"fcrm_or_divider_line"},null,-1)),d(A,{size:"small",onClick:v[0]||(v[0]=e=>$.addConditionGroup())},{default:o(()=>[t("span",G,[d(x,{"icon-name":"plus"})]),c(" "+l(f.$t("OR")),1)],void 0),_:1}),v[3]||(v[3]=t("div",{class:"fcrm_or_divider_line"},null,-1))])):_("",!0)]))),128))]),t("div",O,[v[4]||(v[4]=t("div",{class:"fcrm_or_divider_line"},null,-1)),d(A,{size:"small",onClick:v[1]||(v[1]=e=>$.addConditionGroup())},{default:o(()=>[t("span",g,[d(x,{"icon-name":"plus"})]),c(" "+l(f.$t("OR")),1)],void 0),_:1}),v[5]||(v[5]=t("div",{class:"fcrm_or_divider_line"},null,-1))])])}]]);export{C as default};
@@ -0,0 +1 @@
import{D as e,E as t,e as s,aI as a,aH as r,k as n,aR as i,u as o,a6 as l,ac as c,a3 as m,j as d,h as _,i as p,aB as g,g as h}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as u,W as f,X as y,ab as w,a5 as v,Z as C,a9 as b,aa as $,a8 as S,Y as k,ax as x,a0 as D}from"../../../../vendor.js?ver=3.1.8";import{C as I}from"../../../../Confirm.js?ver=3.1.8";import{_ as L,I as P}from"../../../../fc-bits-ui.js?ver=3.1.8";import{P as E}from"../../../../PageHeader.js?ver=3.1.8";import{G as j}from"../../../../GenericPromo2.js?ver=3.1.8";import{D as V}from"../../../../DataTable.js?ver=3.1.8";import"../../../../PromoCard.js?ver=3.1.8";const T={class:"fcrm_dynamic_segments fcrm_fluentcrm-lists fcrm_fluentcrm_min_bg fcrm_fluentcrm-view-wrapper fcrm_fluentcrm_view fcrm-layout-width"},A={href:"https://fluentcrm.com/docs/segment-your-audience/",target:"_blank",class:"el-button"},M={class:"icon"},U=["href"],F={class:"fcrm_table_wrapper"},N={class:"fcrm_table_header"},H={class:"fcrm_table_header_inner"},W={class:"fcrm_table_header_inner_left"},B={class:"fcrm-searcher-prefix"},J={class:"fcrm_table_body"},O={class:"fcrm_empty_state"},Z={class:"fcrm_empty_state_text"},G={class:"fcrm_segment_title_wrapper"},Q={key:0,class:"fcrm_no-margin fcrm_url"},Y={key:1,class:"fcrm_segment_title_link fcrm_segment_title_disabled"},q={class:"fcrm_no-margin fcrm_url"},z={class:"fcrm_badge"},R={class:"fcrm_list-description"};const X={key:0},K={class:"fcrm_dynamic_segments_upload_text"},ee={class:"fcrm_dynamic_segments_upload_text_title"},te={class:"fcrm_dynamic_segments_upload_text_desc"},se={class:"fcrm_dynamic_segments_upload_tip"},ae={class:"fcrm_primary_text small"},re={key:0,style:{"text-align":"left","margin-top":"15px",padding:"10px",background:"var(--fc-secondary-bg)","border-radius":"4px","white-space":"pre-wrap","word-wrap":"break-word"}},ne={key:1};const ie={class:"fcrm_dynamic_segments"},oe={key:0,class:"fcrm_dynamic_segments fcrm_fluentcrm-lists fcrm_fluentcrm_min_bg fcrm_fluentcrm-view-wrapper fcrm_fluentcrm_view fcrm-layout-width"},le={class:"icon"},ce={class:"icon"},me={class:"icon"},de={class:"fcrm_empty_state"},_e={class:"fcrm_empty_state_text"},pe={class:"fcrm_segment_title_wrapper"},ge={class:"fcrm_no-margin fcrm_url"},he={key:0,class:"fcrm_badge"},ue={class:"fcrm_list-description"},fe={key:1},ye={key:2},we=["aria-label"],ve={class:"el-popover__reference"},Ce={class:"icon"},be={class:"el-popover__reference"},$e={class:"icon"},Se={class:"el-popover__reference"},ke={class:"icon"},xe={class:"el-popover__reference"},De={class:"icon"},Ie={class:"fcrm_coming_soon_badge"},Le={class:"el-popover__reference"},Pe={class:"icon"},Ee=["id"],je=["onClick"];const Ve=L({name:"AllDynamicSegments",components:{Icons:P,PageHeader:E,Confirm:I,DataTable:V,DynamicSegmentPromo:L({name:"DynamicSegmentPromo",components:{Icons:P,PageHeader:E,Search:e},data:()=>({segments:[{title:"WordPress Users",subtitle:"All contacts who are WordPress users",is_system:!0,id:1,contact_count:10},{title:"Woocommerce Customers",subtitle:"All contacts who are Woocommerce customers",is_system:!0,id:2,contact_count:8},{title:"Custom Segment",subtitle:"All contacts who are Custom Segment",is_system:!1,id:3,contact_count:5}]})},[["render",function(e,n,i,o,l,c){const m=u("Icons"),d=u("page-header"),_=u("Search"),p=t,g=s,h=a,k=r;return f(),y("div",T,[w(d,null,{title:v(()=>[b($(e.$t("Dynamic Segments")),1)]),actions:v(()=>[C("a",A,[C("span",null,[b($(e.$t("View Demo"))+" ",1),C("span",M,[w(m,{"icon-name":"externalLink"})])])]),C("a",{href:e.appVars.crm_pro_url,target:"_blank",class:"el-button el-button--primary"},[C("span",null,$(e.$t("Upgrade to Pro")),1)],8,U)]),_:1}),C("div",F,[C("div",N,[C("div",H,[C("div",W,[w(g,{clearable:"",size:"small",placeholder:e.$t("Type to search..."),class:"fcrm_segments_search_input"},{prefix:v(()=>[C("span",B,[w(p,null,{default:v(()=>[w(_)],void 0,!0),_:1})])]),_:1},8,["placeholder"])])])]),C("div",J,[w(k,{border:"",data:l.segments},{empty:v(()=>[C("div",O,[w(m,{"icon-name":"common-empty-state"}),C("div",Z,[C("span",null,$(e.$t("No segments found")),1)])])]),default:v(()=>[w(h,{"min-width":"300px",label:e.$t("Title"),sortable:""},{default:v(t=>[C("div",G,[t.row.is_system?(f(),y("div",Y,[C("h3",q,[b($(t.row.title)+" ",1),C("span",z,$(e.$t("System Defined")),1)])])):(f(),y("h3",Q,$(t.row.title),1)),C("span",R,$(t.row.subtitle),1)])]),_:1},8,["label"]),w(h,{width:"150",label:e.$t("Contacts")},{default:v(e=>[C("span",null,$(e.row.contact_count),1)]),_:1},8,["label"])],void 0),_:1},8,["data"])])]),S("",!0)])}]]),ImportDynamicSegment:L({name:"ImportDynamicSegment",components:{GenericPromo:j},emits:["import-success","import-error"],data:()=>({importing:!1,inline_errors:!1}),computed:{url(){let e=window.ajaxurl;return e+=(e.match(/\?/)?"&":"?")+jQuery.param({action:"fluent_crm_import_dynamic_segment"}),e}},methods:{beforeUpload(){return this.importing=!0,this.inline_errors=!1,!0},success(e){this.importing=!1,this.$notify.success(e.message),thiLine truncated
@@ -0,0 +1 @@
import{ap as e,ay as t,k as s,a_ as a,aZ as i,e as n}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as r,a6 as l,W as m,X as o,ab as d,a5 as g,a9 as c,aa as u,Y as _,Z as f}from"../../../../vendor.js?ver=3.1.8";import{C as p}from"../../../../_CustomSegementSettings.js?ver=3.1.8";import{P as h}from"../../../../PageHeader.js?ver=3.1.8";import{_ as v}from"../../../../fc-bits-ui.js?ver=3.1.8";import"../Contacts/RichFilters/Filters.js?ver=3.1.8";import"../../../../_AjaxSelector.js?ver=3.1.8";import"../../../../_TaxonomyTermsSelector.js?ver=3.1.8";import"../../../../_OptionSelector.js?ver=3.1.8";const S={class:"fcrm_create_custom_segment"},y={class:"fcrm_create_segment_content"},C={class:"fcrm_segment_name_input"},$={class:"fcrm_input_label"};const j=v({name:"CreateCustomSegment",components:{PageHeader:h,CustomSegmentSettings:p,ArrowRightBold:e},data:()=>({loading:!1,saving:!1,field_loading:!0,segment:{title:"",filters:[[]]}}),created(){this.ArrowRightBold=e},methods:{createSegment(){this.segment.title?(this.saving=!0,this.$post("dynamic-segments",{segment:JSON.stringify(this.segment),with_subscribers:!1}).then(e=>{this.$notify.success(e.message),this.$router.push({name:"view_segment",params:{slug:e.segment.slug,id:e.segment.id}})}).catch(e=>{this.handleError(e)}).finally(()=>{this.saving=!1})):this.$notify.error(this.$t("Cre_Please_pNotS"))},clearFilters(){this.segment.filters=[[]]}},mounted(){this.changeTitle(this.$t("New Dynamic Segment"))}},[["render",function(e,p,h,v,j,b){const w=i,V=a,A=s,F=r("page-header"),x=n,N=r("custom-segment-settings"),P=t;return l((m(),o("div",S,[d(F,null,{breadcrumb:g(()=>[d(V,{"separator-icon":e.ArrowRightBold},{default:g(()=>[d(w,{to:{name:"dynamic_segments"}},{default:g(()=>[c(u(e.$t("Dynamic Segments")),1)],void 0,!0),_:1}),d(w,null,{default:g(()=>{var t;return[c(u((null==(t=j.segment)?void 0:t.title)?j.segment.title:e.$t("Untitled Segment")),1)]},void 0,!0),_:1})],void 0,!0),_:1},8,["separator-icon"])]),actions:g(()=>[d(A,{onClick:p[0]||(p[0]=e=>b.clearFilters())},{default:g(()=>[c(u(e.$t("Clear Filters")),1)],void 0,!0),_:1}),l((m(),_(A,{onClick:p[1]||(p[1]=e=>b.createSegment()),type:"primary"},{default:g(()=>[c(u(e.$t("Create Custom Segment")),1)],void 0,!0),_:1})),[[P,j.saving]])]),_:1}),f("div",y,[f("div",C,[f("label",$,u(e.$t("Name this Custom Segment")),1),d(x,{class:"fcrm_segment_name_field",placeholder:e.$t("eg: Active contacts"),type:"text",modelValue:j.segment.title,"onUpdate:modelValue":p[2]||(p[2]=e=>j.segment.title=e)},null,8,["placeholder","modelValue"])]),d(N,{onLoaded:p[3]||(p[3]=()=>{j.field_loading=!1}),modelValue:j.segment.filters,"onUpdate:modelValue":p[4]||(p[4]=e=>j.segment.filters=e),segment_id:!1},null,8,["modelValue"])])])),[[P,j.field_loading]])}]]);export{j as default};
@@ -0,0 +1 @@
import{ay as e,k as t,a_ as s,aZ as i,e as a,ap as r}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as n,a6 as o,W as l,X as m,Z as c,ab as p,ay as g,a5 as d,a9 as _,aa as u,a8 as h}from"../../../../vendor.js?ver=3.1.8";import{C as f}from"../../../../_CustomSegementSettings.js?ver=3.1.8";import{C as v}from"../../../../_ContactsTable.js?ver=3.1.8";import{E as b}from"../../../../Exporter.js?ver=3.1.8";import{_ as y,I as j}from"../../../../fc-bits-ui.js?ver=3.1.8";import{P as S}from"../../../../PageHeader.js?ver=3.1.8";import"../Contacts/RichFilters/Filters.js?ver=3.1.8";import"../../../../_AjaxSelector.js?ver=3.1.8";import"../../../../_TaxonomyTermsSelector.js?ver=3.1.8";import"../../../../_OptionSelector.js?ver=3.1.8";import"../../../../Tagger.js?ver=3.1.8";import"../../../../data_config.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";import"../../../../Filterer2.js?ver=3.1.8";import"../../../../Searcher.js?ver=3.1.8";import"../../../../PaginationBar.js?ver=3.1.8";import"../../../../DataTable.js?ver=3.1.8";import"../../../../FloatingBulkActionShell.js?ver=3.1.8";import"../../../../Confirm.js?ver=3.1.8";import"../Contacts/Filter/FilterPopover.js?ver=3.1.8";import"../Contacts/Filter/ActiveFiltersBar.js?ver=3.1.8";import"../../../../_IntlTelInput.js?ver=3.1.8";import"../../../../Badge.js?ver=3.1.8";import"../../../../relations.js?ver=3.1.8";import"../../../../clipboard.js?ver=3.1.8";import"../../../../GenericPromo.js?ver=3.1.8";import"../../../../PromoCard.js?ver=3.1.8";const C={class:"fcrm_segment_view_page fcrm_fluentcrm-lists fcrm_fluentcrm_min_bg fcrm_fluentcrm-view-wrapper fcrm_fluentcrm_view"},x={class:"fcrm_fluentcrm_pad_around"},w={style:{display:"flex","justify-content":"space-between","align-items":"center","background-color":"var(--fc-primary-bg)","border-radius":"8px",padding:"10px 10px","border-left":"var(--fc-text-link) solid 4px","font-size":"14px","margin-bottom":"20px"}},F={key:0,style:{display:"flex",gap:"4px","margin-top":"4px"}},$={key:0,class:"fcrm_segment_editor_wrapper"},E={class:"fcrm_segment_name_section"},V={class:"fcrm_segment_name_label"},k={class:"fcrm_lists-table fcrm_segment_contacts"};const A=y({name:"DynamicSegmentViewer",props:["slug","id"],components:{PageHeader:S,CustomSegmentSettings:f,ContactsTable:v,Exporter:b,Icons:j},created(){this.ArrowRightBold=r},data:()=>({segment:{},loading:!0,saving:!1,subscribers:[],columns:[],pagination:{current_page:1,per_page:10,total:0},is_editing:!0,field_loading:!0,query_data:{tags:[],lists:[],search:"",statuses:[],sort_by:"id",sort_type:"DESC",custom_fields:!1},ui_config:{show_list:!0,show_tag:!0,disable_filters_without_selection:!0},options:{tags:[],lists:[],statuses:[],sms_statuses:[],countries:[],sampleCsv:null,delimiter:"comma"},selected_contacts:[],all_selected:!1,exporterVisible:!1}),methods:{fetchSegment(){this.loading=!0,this.storage.set("segment_perpage",this.pagination.per_page),this.$get(`dynamic-segments/${this.slug}/subscribers/${this.id}`,{per_page:this.pagination.per_page,page:this.pagination.current_page,...this.query_data}).then(e=>{this.segment=e.segment,this.subscribers=e.subscribers.data,this.pagination.total=e.subscribers.total,this.changeTitle(this.segment.title+" - Dynamic Segments"),this.segment.filters&&Array.isArray(this.segment.filters)&&0!==this.segment.filters.length||(this.segment.filters=[[]])}).catch(e=>{this.handleError(e)}).finally(()=>{this.loading=!1})},updateSegment(e=!1){this.segment.title?(this.saving=!0,this.$put(`dynamic-segments/${this.segment.id}`,{segment:JSON.stringify({title:this.segment.title,filters:this.segment.filters}),with_subscribers:!1}).then(e=>{this.$notify.success(e.message),this.pagination.current_page=1,this.fetchSegment()}).catch(e=>{this.handleError(e)}).finally(()=>{this.saving=!1})):this.$notify.error(this.$t("Cre_Please_pNotS"))},getOptions(){const e={fields:"yes"!==window.fcAdmin.sms_enabled?"tags,lists,statuses,contact_types,sampleCsv,custom_fields":"tags,lists,statuses,sms_statuses,contact_types,sampleCsv,custom_fields"};this.$get("reports/options",e).then(e=>{this.options=e.options})},clearFilters(){this.segment.filters=[[]]},handleExportSelected(e={}){this.selected_contacts=e.subscribers||[],this.all_selected=e.allSelected||!1,this.exporterVisible=!0},clearSelectedContacts(){this.exporterVisible=!1,this.selected_contacts=[],this.all_selected=!1}},mounted(){this.pagination.per_page=parseInt(this.storage.get("segment_perpage",10))||10,this.getOptions(),this.fetchSegment()}},[["render",function(r,f,v,b,y,j){const S=i,A=s,T=t,q=n("page-header"),P=n("Icons"),B=a,I=n("custom-segment-settings"),D=n("contacts-table"),O=n("exporter"),U=e;return o((l(),m("div",C,[c("div",x,[p(q,null,g({breadcrumb:d(()=>[p(A,{"separator-icon":r.ArrowRightBold},{default:d(()=>[p(S,{to:{name:"dynamic_segments"}},{default:d(()=>[_(u(r.$t("Dynamic Segments")),1)],void 0,!0),_:1}),p(S,null,{defLine truncated
@@ -0,0 +1 @@
import{ah as e,P as l,a6 as a,a3 as t,an as s,k as i,ax as o,aw as r,e as n,aE as d,aF as c,E as b,aB as h,aH as m,aI as u,j as p,h as f,i as _,aT as g}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as L,W as F,Y as v,ay as y,a5 as w,Z as C,ab as k,a9 as $,aa as D,ax as V,b2 as E,X as S,J as I,az as j,$ as U,a8 as x}from"../../../../vendor.js?ver=3.1.8";import{C as z}from"../../../../Confirm.js?ver=3.1.8";import{_ as Q,I as T}from"../../../../fc-bits-ui.js?ver=3.1.8";import{D as B}from"../../../../DataTable.js?ver=3.1.8";const M={key:1,class:"el-drawer__title"},Y={class:"icon"},q={class:"icon"},A={class:"fcrm_label_name"},K={class:"fcrm_label_slug"},P={class:"fcrm_drawer_label_action"},G={class:"el-dropdown-link"},H={class:"el-popover__reference"},J={class:"icon"},N={class:"el-popover__reference"},W={class:"icon"},X={class:"dialog-footer justify-end"};const Z=Q({name:"GlobalLabelDrawer",props:["open"],emits:["callFetchLabels","close"],components:{Icons:T,Confirm:z,DataTable:B,Back:s,Edit:t,Delete:a,MoreFilled:l,CircleCheckFilled:e},data(){return{direction:"rtl",openDrawer:this.open,updateLabel:!1,visibleForm:!1,creatingLabel:!1,labelColors:this.appVars.available_funnel_label_colors,fetchingLabel:!1,labels:[],labelForm:{id:"",title:"",color:"#D6D8FF",slug:""},searchQuery:""}},computed:{filteredLabels(){if(!this.searchQuery)return this.labels;const e=this.searchQuery.toLowerCase().trim();return this.labels.filter(l=>l.title.toLowerCase().includes(e)||l.slug.toLowerCase().includes(e))}},methods:{handleSubmitLabel(){this.updateLabel?this.handleUpdateLabel():this.handleCreateLabel()},fetchLabels(){this.fetchingLabel=!0,this.$get("labels").then(e=>{this.labels=e.labels}).catch(e=>{this.handleError(e)}).finally(()=>{this.fetchingLabel=!1})},handleCreateLabelDialog(){this.visibleForm=!0,this.$nextTick(()=>{this.$refs.labelInput.focus()})},handleCreateLabel(){this.creatingLabel=!0,this.labelForm.title?(this.updateLabel||(this.labelForm.slug=this.generateSlug(this.labelForm.title)),this.$post("labels",{label:this.labelForm}).then(e=>{this.$notify.success(e.message),this.fetchLabels(),this.$emit("callFetchLabels")}).catch(e=>{this.handleError(e)}).finally(()=>{this.visibleForm=!1,this.creatingLabel=!1,this.labelForm={title:"",color:"#D6D8FF",slug:""}})):this.$notify.error(this.$t("Label name is required"))},handleUpdateLabel(){if(this.creatingLabel=!0,!this.labelForm.title)return this.$notify.error(this.$t("Label name is required")),void(this.creatingLabel=!1);this.$put(`labels/${this.labelForm.id}`,{label:this.labelForm}).then(e=>{this.$notify.success(e.message),this.fetchLabels(),this.$emit("callFetchLabels")}).catch(e=>{this.handleError(e)}).finally(()=>{this.visibleForm=!1,this.creatingLabel=!1,this.labelForm={title:"",color:"#D6D8FF",slug:""}})},generateSlug:e=>e.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-"),handleEditLabel(e){this.updateLabel=!0,this.labelForm={id:e.id,title:e.title,color:e.settings.color,slug:e.slug},this.visibleForm=!0,this.$nextTick(()=>{this.$refs.labelInput.focus()})},resetForm(){this.updateLabel=!1,this.labelForm={title:"",color:"#D6D8FF",slug:""},this.visibleForm=!1},handleDeleteLabel(e){this.$del("labels/"+e).then(e=>{this.$notify.success(e.message),this.fetchLabels(),this.$emit("callFetchLabels")}).catch(e=>{this.handleError(e)}).finally(()=>{})},handleCloseDrawer(){this.openDrawer=!1,this.$emit("close")},handleSearch(){}},mounted(){window.fcAdmin&&window.fcAdmin.is_rtl&&(this.direction="ltr"),this.fetchLabels()}},[["render",function(e,l,a,t,s,z){const Q=L("Back"),T=b,B=n,Z=r,O=L("CircleCheckFilled"),R=c,ee=d,le=o,ae=L("Icons"),te=i,se=h,ie=u,oe=L("MoreFilled"),re=_,ne=L("confirm"),de=f,ce=p,be=m,he=L("data-table"),me=g;return F(),v(me,{direction:s.direction,"append-to-body":!0,modelValue:s.openDrawer,"onUpdate:modelValue":l[5]||(l[5]=e=>s.openDrawer=e),onClose:z.handleCloseDrawer,"modal-class":"fcrm_manage_labels_drawer"},y({header:w(()=>[s.visibleForm?(F(),S("span",{key:0,class:"el-drawer__title",onClick:l[0]||(l[0]=(...e)=>z.resetForm&&z.resetForm(...e)),style:{cursor:"pointer"}},[k(T,null,{default:w(()=>[k(Q)],void 0,!0),_:1}),$(" "+D(e.$t("Back to Labels")),1)])):(F(),S("span",M,D(e.$t("Manage Labels")),1))]),default:w(()=>[s.visibleForm?(F(),v(le,{key:0,class:"fcrm_manage_labels_form","label-position":"top",onSubmit:l[3]||(l[3]=V(()=>{},["prevent"]))},{default:w(()=>[k(Z,{label:e.$t("Label Title")},{default:w(()=>[k(B,{ref:"labelInput",modelValue:s.labelForm.title,"onUpdate:modelValue":l[1]||(l[1]=e=>s.labelForm.title=e),autocomplete:"off",onKeydown:E(V(z.handleSubmitLabel,["prevent"]),["enter"])},null,8,["modelValue","onKeydown"])],void 0,!0),_:1},8,["label"]),k(Z,{label:e.$t("Label Color")},{default:w(()=>[k(ee,{modelValue:s.labelForm.color,"onUpdate:modelValue":l[2]||(l[2]=e=>s.labelForm.color=e),class:"fcrm_manage_labels_radio"},{default:w(()=>[(F(!0),S(I,null,j(s.labelColors,e=>(F(),v(R,{key:e,label:e,style:U("backgrounLine truncated
@@ -0,0 +1 @@
import{W as e,X as r}from"../../../../vendor.js?ver=3.1.8";import{_ as s}from"../../../../fc-bits-ui.js?ver=3.1.8";import"../../../../vendor-element-plus.js?ver=3.1.8";const t=s({name:"List",props:["listId"],created(){this.$router.replace({name:"subscribers",query:{lists:[this.listId],sort_by:"id",sort_type:"DESC",filter_type:"simple"}})}},[["render",function(s,t,i,o,p,n){return e(),r("div")}]]);export{t as default};
@@ -0,0 +1 @@
import{W as t,ay as e,E as s,aJ as i,aF as l,aE as o,k as a,aI as n,aB as r,aC as d,aH as c,c as m,q as p,s as h,a3 as f,a6 as _,D as u,j as g,h as b,i as w,e as v,aT as y,aR as C,g as $}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as L,W as x,X as S,Z as k,aa as I,a9 as T,a6 as D,J as V,ab as E,a5 as B,Y as F,a8 as P,ay as j,ax as O,b2 as U,a0 as A}from"../../../../vendor.js?ver=3.1.8";import{C as N}from"../../../../Confirm2.js?ver=3.1.8";import{A as H}from"../../../../ActionMenu.js?ver=3.1.8";import{F as M}from"../../../../_FormBuilder.js?ver=3.1.8";import{_ as R,I as z,a as K,T as Z}from"../../../../fc-bits-ui.js?ver=3.1.8";import{P as G}from"../../../../PaginationBar.js?ver=3.1.8";import{D as W}from"../../../../DataTable.js?ver=3.1.8";import{F as Y}from"../../../../FloatingBulkActionShell.js?ver=3.1.8";import{P as J}from"../../../../PageHeader.js?ver=3.1.8";import"../../../../Error.js?ver=3.1.8";import"../../../../fc-bits.js?ver=3.1.8";import"../../../../_OptionSelector.js?ver=3.1.8";import"../../../../input-popover-dropdown2.js?ver=3.1.8";import"../../../../CustomIcon.js?ver=3.1.8";import"../../../../data_config.js?ver=3.1.8";const q={class:"fcrm_double_optin_settings_wrapper"},Q={class:"fcrm_double_optin_settings_header"},X={key:0,class:"fcrm_double_optin_settings_header-title"},tt={key:1,class:"fcrm_double_optin_settings_header--title"},et={class:"fcrm_double_optin_settings_header--list-name"},st={class:"fcrm_double_optin_settings_body"},it={class:"fcrm_double_optin_settings--optin-settings-switcher"},lt={class:"fcrm_double_optin_settings--optin-settings-switcher--title"},ot={class:"fcrm_double_optin_settings_footer"};const at={name:"ListsLoader",props:{showSelection:{type:Boolean,default:!0}},data:()=>({skeletonRows:[{id:1},{id:2},{id:3},{id:4},{id:5},{id:6},{id:7},{id:8},{id:9},{id:10}]})},nt={class:"fcrm_list_cell fcrm_list_cell--skeleton"},rt={class:"fcrm_subscribers_cell fcrm_subscribers_cell--skeleton"};const dt={class:"fcrm_lists fcrm-layout-width"},ct={class:"fcrm_fluentcrm-lists fcrm_fluentcrm_min_bg fcrm_fluentcrm-view-wrapper fcrm_fluentcrm_view"},mt={class:"icon"},pt={class:"icon"},ht={class:"icon"},ft={class:"fcrm_fluentcrm_body fcrm_lists_body"},_t={class:"fcrm_lists-table"},ut={class:"icon"},gt={class:"fcrm_empty_state"},bt={class:"fcrm_empty_state_text"},wt={key:0,class:"fcrm_secondary_text small"},vt={class:"fcrm_no-margin"},yt={class:"fcrm_secondary_text small"},Ct=["title"],$t={class:"el-popover__reference"},Lt={class:"icon"},xt={class:"el-popover__reference"},St={class:"icon"},kt={class:"el-popover__reference"},It={class:"icon"},Tt={class:"fcrm_bulk_action_bar"},Dt={class:"fcrm_bulk_action_left"},Vt={class:"fc_bulk_selection_count"},Et={class:"icon"},Bt={key:0},Ft=["id"],Pt=["onClick"],jt={key:0},Ot={key:0},Ut={class:"el-upload__text"},At={class:"el-upload__tip"},Nt={class:"fcrm_primary_text small"},Ht={key:1},Mt={class:"fcrm_import_preview"},Rt={class:"fcrm_import_subtitle"},zt={class:"fcrm_import_footer"};const Kt=R({name:"Lists",components:{Icons:z,PageHeader:J,Confirm:N,ActionMenu:H,DoubleOptInSettings:R({name:"DoubleOptionIn",props:{listId:{type:Number,default:null},listName:{type:String,default:""},drawerKey:{type:Number,default:0}},components:{InfoFilled:t,FormBuilder:M},watch:{drawerKey(t){this.listId&&(this.fetchSettings(),this.changeTitle(this.$t("Double Opt-in Settings")))}},data:()=>({btnFromLoading:!1,loading:!1,settings:{},settings_loaded:!1,fields:{},global_double_optin:"yes"}),methods:{save(){const t={settings:this.settings,list_id:this.listId};this.listId&&(t.global_double_optin=this.global_double_optin),this.btnFromLoading=!0,this.$put("setting/double-optin",t).then(t=>{this.$notify.success({title:this.$t("Great!"),message:t.message,offset:19})}).catch(t=>{this.handleError(t)}).finally(()=>{this.btnFromLoading=!1,this.settings_loaded=!0})},handleError(t){this.$handleError?this.$handleError(t):t&&t.message?this.$notify.error({title:this.$t("Error"),message:t.message,offset:19}):this.$notify.error({title:this.$t("Error"),message:this.$t("Something went wrong. Please try again."),offset:19})},fetchSettings(){this.loading=!0,this.settings={},this.fields={},this.$get("setting/double-optin",{with:["settings_fields"],list_id:this.listId}).then(t=>{if(this.settings=t.settings,this.fields=t.settings_fields,this.global_double_optin=t.global_double_optin?t.global_double_optin:"yes",this.listId){const t=["tag_based_redirect"];this.fields=Object.entries(this.fields).reduce((e,[s,i])=>(t.includes(s)||(e[s]=i),e),{})}}).catch(t=>{console.log(t)}).finally(()=>{this.loading=!1,this.settings_loaded=!0})},changeTitle(t){document.title=t}},mounted(){this.fetchSettings(),this.changeTitle(this.$t("Double Opt-in Settings"))}},[["render",function(t,n,r,d,c,m){const p=L("InfoFilled"),h=s,f=i,_=l,u=o,g=L("form-builder"),b=a,w=e;return x(),S("div",q,[k("div",Q,[r.listName?(x(),S("div",tt,[T(I(t.$t("Double Opt-in Email Settings"))+" ",1),k("span",et,"("+I(r.listName)+")",1)Line truncated
@@ -0,0 +1 @@
import{aL as e,aK as l,aD as a,aA as t,aw as s,e as d,aB as o,k as r,ay as i,ax as u}from"../../../../../vendor-element-plus.js?ver=3.1.8";import{bX as n,bY as m,bZ as b,W as c,X as p,Z as h,ab as f,a5 as _,J as v,az as V,Y as y,a6 as $,ac as g,aa as w,a8 as P,aQ as x,a9 as D}from"../../../../../vendor.js?ver=3.1.8";import k from"./_CustomFields.js?ver=3.1.8";import{_ as U}from"../../../../../fc-bits-ui.js?ver=3.1.8";import{I}from"../../../../../_IntlTelInput.js?ver=3.1.8";import"../../../../../fc-bits.js?ver=3.1.8";const M={key:0,class:"fcrm_date_parts_picker"},Y={class:"fc_date_picker_month"};const j={class:"fcrm_profile_overview"},A={class:"fcrm_profile_overview_basic_info"},T={class:"fluentcrm_edit_basic"},C={key:0,class:"error"},L={key:0,class:"error"},B={class:"fcrm_profile_overview_address_info"},S={class:"fluentcrm_edit_basic"},F=["innerHTML"],J=["innerHTML"],H={class:"fcrm_custom_fields_title"},N={key:1,style:{"margin-top":"20px"}},O={class:"text-align-right w-full"};const R=U({name:"ProfileOverview",props:["subscriber","custom_fields","is_full_profile_loaded"],components:{CustomFields:k,DateDropDownPicker:U({name:"DateDropDownPicker",props:["modelValue"],emits:["update:modelValue"],data(){return{appReady:!1,dateParts:{day:"",month:"",year:""},months:[{label:this.$t("January"),value:"01"},{label:this.$t("February"),value:"02"},{label:this.$t("March"),value:"03"},{label:this.$t("April"),value:"04"},{label:this.$t("May"),value:"05"},{label:this.$t("June"),value:"06"},{label:this.$t("July"),value:"07"},{label:this.$t("August"),value:"08"},{label:this.$t("September"),value:"09"},{label:this.$t("October"),value:"10"},{label:this.$t("November"),value:"11"},{label:this.$t("December"),value:"12"}],days:[],years:[]}},watch:{dateParts:{handler(){this.appReady&&this.pushDate()},deep:!0}},methods:{initDateParts(){if(this.modelValue){const e=window.dayjs?window.dayjs(this.modelValue):this.$dayjs(this.modelValue);this.dateParts.day=e.format("DD"),this.dateParts.month=e.format("MM"),this.dateParts.year=e.format("YYYY")}this.$nextTick(()=>{this.appReady=!0})},range:n,pushDate(){const{day:e,month:l,year:a}=this.dateParts;if(e&&l&&a){const t=(window.dayjs||this.$dayjs)(`${a}-${l}-${e}`);if(!t.isValid())return void this.$emit("update:modelValue","");this.$emit("update:modelValue",t.format("YYYY-MM-DD"))}else this.$emit("update:modelValue","")}},mounted(){this.days=m(n(1,32),e=>b(e,2,"0")),this.years=n((new Date).getFullYear(),1899),this.initDateParts()}},[["render",function(a,t,s,d,o,r){const i=e,u=l;return o.appReady?(c(),p("div",M,[h("div",null,[f(u,{clearable:"",modelValue:o.dateParts.day,"onUpdate:modelValue":t[0]||(t[0]=e=>o.dateParts.day=e),placeholder:a.$t("Day")},{default:_(()=>[(c(!0),p(v,null,V(o.days,e=>(c(),y(i,{key:e,label:e,value:e},null,8,["label","value"]))),128))],void 0),_:1},8,["modelValue","placeholder"]),$(h("p",null,w(a.$t("Day")),513),[[g,o.dateParts.day]])]),h("div",Y,[f(u,{clearable:"",modelValue:o.dateParts.month,"onUpdate:modelValue":t[1]||(t[1]=e=>o.dateParts.month=e),placeholder:a.$t("Month")},{default:_(()=>[(c(!0),p(v,null,V(o.months,e=>(c(),y(i,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))],void 0),_:1},8,["modelValue","placeholder"]),$(h("p",null,w(a.$t("Month")),513),[[g,o.dateParts.month]])]),h("div",null,[f(u,{clearable:"",filterable:"",modelValue:o.dateParts.year,"onUpdate:modelValue":t[2]||(t[2]=e=>o.dateParts.year=e),placeholder:a.$t("Year")},{default:_(()=>[(c(!0),p(v,null,V(o.years,e=>(c(),y(i,{key:e,label:e,value:e},null,8,["label","value"]))),128))],void 0),_:1},8,["modelValue","placeholder"]),$(h("p",null,w(a.$t("Year")),513),[[g,o.dateParts.year]])])])):P("",!0)}]]),IntlTelInput:I},data:()=>({pickerOptions:{disabledDate:e=>e.getTime()>=Date.now()},errors:null,updating:!1,countries:window.fcAdmin.countries,name_prefixes:window.fcAdmin.contact_prefixes,phoneValue:"",phoneIsValid:!0}),watch:{"subscriber.phone":{handler(e){this.phoneValue=e||""},immediate:!0},phoneValue(e){this.subscriber.phone=e||""}},methods:{updateSubscriber(){this.errors=null,this.updating=!0,this.subscriber.phone||(this.subscriber.phone=this.phoneValue||""),this.$put(`subscribers/${this.subscriber.id}`,{subscriber:JSON.stringify(this.subscriber)}).then(e=>{this.$notify.success(e.message)}).catch(e=>{this.errors=e,this.handleError(e),e.email&&e.email.required&&this.$notify.error(e.email.required)}).finally(()=>{this.updating=!1})},onPhoneValidate(e){this.phoneIsValid=!e||!!e.valid,e&&e.number?this.subscriber.phone=e.number:this.subscriber.phone=this.phoneValue||""},onPhoneBlur(){this.subscriber.phone||(this.subscriber.phone=this.phoneValue||"")}}},[["render",function(n,m,b,g,k,U){const I=e,M=l,Y=s,R=t,q=a,Z=d,E=x("IntlTelInput"),X=x("date-drop-down-picker"),z=x("custom-fields"),K=o,Q=r,W=u,G=i;return c(),p("div",j,[f(W,{"label-position":"top",ref:"basic_form",model:b.subscriber,"label-width":"120px"},{default:_(()=>[f(q,{gutter:20},{default:_(()=>[f(R,{lg:12,md:12,sm:24,xs:24Line truncated
@@ -0,0 +1 @@
import{aH as s,aI as t,ay as e,aK as a,aL as i,k as o,n as l}from"../../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as r,W as n,X as c,ab as d,a5 as h,a6 as _,Y as m,Z as u,aa as g,a0 as p,a9 as b,J as f,a8 as y,az as v,ad as w,b3 as C}from"../../../../../vendor.js?ver=3.1.8";import{C as M}from"../../../../../Confirm.js?ver=3.1.8";import{P as S}from"../../../../../PaginationBar.js?ver=3.1.8";import{D as $}from"../../../../../DataTable.js?ver=3.1.8";import{B as T}from"../../../../../Badge.js?ver=3.1.8";import{_ as H,I as V}from"../../../../../fc-bits-ui.js?ver=3.1.8";const k={class:"fcrm_profile_sms_wrapper"},L={key:0,class:"table-view"},P={class:"fcrm_table_header_inner_left_title"},B={key:0},F={key:1},x=["title"],D={key:1,class:"fcrm_profile_sms_layout"},I={class:"fcrm_profile_sms_layout_inner"},O={class:"fcrm_profile_sms_layout_stats_panel"},Z={class:"fcrm_profile_sms_layout_stats_header"},A={class:"fcrm_profile_sms_layout_stats_header--title"},j={class:"fcrm_profile_sms_layout_stats_header--action"},z={class:"fcrm_profile_sms_layout_stats_body"},N={class:"fcrm_profile_sms_layout_stats_card"},Y={class:"fcrm_profile_sms_layout_stats_card--label"},U={class:"fcrm_profile_sms_layout_stats_card--number"},G={class:"fcrm_profile_sms_layout_stats_card"},E={class:"fcrm_profile_sms_layout_stats_card--label"},J={class:"fcrm_profile_sms_layout_stats_card--number"},K={class:"fcrm_profile_sms_layout_stats_card"},Q={class:"fcrm_profile_sms_layout_stats_card--label"},R={class:"fcrm_profile_sms_layout_stats_card--number"},W={class:"fcrm_profile_sms_layout_stats_card"},X={class:"fcrm_profile_sms_layout_stats_card--label"},q={class:"fcrm_profile_sms_layout_stats_card--number"},ss={class:"fcrm_profile_sms_layout_chat_panel"},ts={class:"fcrm_profile_sms_layout_chat_header"},es={class:"fcrm_profile_sms_layout_chat_header--contact"},as={class:"fcrm_profile_sms_layout_chat_header--contact--avatar"},is=["src","alt"],os={class:"fcrm_profile_sms_layout_chat_header--contact--meta"},ls={class:"fcrm_profile_sms_layout_chat_header--contact--meta--name"},rs={key:0,class:"fcrm_profile_sms_layout_chat_header--contact--meta--phone"},ns={key:0,class:"fcrm_profile_sms_layout_chat--load-older"},cs={key:1,class:"no-messages"},ds={class:"fcrm_profile_sms_layout_chat--message-date-separator"},hs={class:"fcrm_profile_sms_layout_chat--message-text"},_s={class:"fcrm_profile_sms_layout_chat--message-meta"},ms={class:"fcrm_profile_sms_layout_chat--message-time"},us=["title"],gs={key:2,class:"fcrm_profile_sms_layout_chat--message-row loading"},ps=["title"],bs={class:"fcrm_profile_sms_layout_chat--composer-input-wrap"},fs={key:0,class:"fcrm_profile_sms_layout_chat--phone-missing-notice"},ys=["disabled"],vs={class:"fcrm_profile_sms_layout_chat--composer-input-footer"},ws={class:"fcrm_profile_sms_layout_chat--sms-counter"},Cs={key:0},Ms={class:"fcrm_profile_sms_layout_chat--composer-input-footer-send"};const Ss=H({name:"ProfileSMS",components:{Badge:T,Confirm:M,Icons:V,PaginationBar:S,DataTable:$},props:["subscriber_id","subscriber"],data:()=>({tableView:!1,tableMessages:[],tablePagination:{total:0,per_page:10,current_page:1},tableLoading:!1,tableFilter:"all",loading:!1,loadingOlder:!1,allLoaded:!1,logs:[],stats:{},has_campaign_pro:!1,activeFilter:"all",newMessage:"",replyFocused:!1,sending:!1,showScrollToBottom:!1,chatPagination:{total:0,per_page:20,current_page:1,last_page:1},messageFilters:[{key:"all",label:"All Messages",icon:"📱",count:0},{key:"campaign",label:"Campaigns",icon:"📢",count:0},{key:"automation",label:"Automations",icon:"⚙️",count:0},{key:"custom_sms",label:"Custom SMS",icon:"💬",count:0}]}),computed:{filteredLogs(){return"all"===this.activeFilter?this.logs:this.logs.filter(s=>s.type===this.activeFilter)},hasContactPhone(){var s,t,e;return!!((null==(s=this.subscriber)?void 0:s.phone)||(null==(t=this.subscriber)?void 0:t.mobile)||(null==(e=this.subscriber)?void 0:e.phone_number))},isSmsSubscribed(){var s;return"sms_subscribed"===(null==(s=this.subscriber)?void 0:s.sms_status)},canSendToContact(){return this.hasContactPhone&&this.isSmsSubscribed},profileSmsDisabledMessage(){return this.hasContactPhone?this.isSmsSubscribed?"":this.$t("This contact is not subscribed for SMS. SMS sending is disabled."):this.$t("This contact does not have a phone number. SMS sending is disabled.")},groupedMessages(){const s={};return this.filteredLogs.forEach(t=>{const e=t._date_time||t.sent_at||t.created_at||t.date||null,a=this.prettyDate(e||"Unknown");s[a]||(s[a]={items:[],rawDate:e}),s[a].items.push(t)}),Object.keys(s).sort((t,e)=>(s[t].rawDate&&new Date(s[t].rawDate).getTime()||0)-(s[e].rawDate&&new Date(s[e].rawDate).getTime()||0)).map(t=>({dateLabel:t,items:s[t].items}))},charCount(){return this.newMessage.length},segmentCount(){return this.newMessage?Math.ceil(this.newMessage.length/160):0}},methods:{fetchChatLogs(){this.loading=!0;const s={per_page:this.chatPagination.per_page,page:1,filter:this.activeFilter||"all"};this.$get(`sms/ Line truncated
@@ -0,0 +1 @@
import{_ as e}from"../../../../../fc-bits.js?ver=3.1.8";import{ar as s,N as l,k as a,e as t,aD as o,aA as i,aw as u,aE as d,aF as r,aK as c,aL as m,aG as n,az as p,aY as _,ax as f,E as h,aT as b}from"../../../../../vendor-element-plus.js?ver=3.1.8";import{c2 as v,bW as g,aQ as y,W as C,X as V,Z as k,_ as U,Y as w,a5 as F,aa as G,a8 as N,J as x,az as $,a0 as E,a9 as Y,ab as A,b2 as D}from"../../../../../vendor.js?ver=3.1.8";import{_ as L,I as M}from"../../../../../fc-bits-ui.js?ver=3.1.8";const P=g(()=>e(()=>import("../../Settings/parts/CustomContactFields.js?ver=3.1.8"),[],import.meta.url)),H={class:"fcrm_custom_field_wrapper"},I={key:0,class:"fcrm_custom_fields"},j={class:"fcrm_custom_fields_header"},O={key:0,class:"fcrm_item_label"},T=["onClick"],z={key:1,class:"fcrm_item_label"},Z={class:"fcrm_custom_fields_layout"},B={key:1,class:"fcrm_custom_fields"},K={class:"fcrm_custom_fields_header"},S={class:"text-align-center"};const W=L({name:"ProfileCustomFields",props:["subscriber","custom_fields"],components:{Icons:M,CustomFields:P,Operation:l,ArrowLeft:s},data(){return{direction:"rtl",app_ready:!1,showingCustomFieldsConfig:!1,fieldsChanged:!1,localFields:Array.isArray(this.custom_fields)?[...this.custom_fields]:[],UpdatedGroupName:"",editingGroupName:null}},computed:{fieldGroups(){const e={};return this.each(this.localFields,s=>{v(this.subscriber.custom_values,s.slug)&&(s.is_disabled=!0),s.group||(s.group=""),e[s.group]||(e[s.group]={}),e[s.group][s.slug]=s}),e}},methods:{onFieldsUpdated(){this.fieldsChanged=!0},onDrawerClosed(){this.fieldsChanged&&(this.fieldsChanged=!1,this.$get("custom-fields/contacts",{with:["field_types"]}).then(e=>{const s=e.fields||[];this.localFields=s,this.appVars.available_custom_fields=s,this.initCustomValues()}).catch(e=>{this.handleError(e)}))},initCustomValues(){this.subscriber&&this.subscriber.custom_values&&this.each(this.localFields,e=>{let s="";-1!==["select-multi","checkbox"].indexOf(e.type)&&(s=[]),v(this.subscriber.custom_values,e.slug)||(this.subscriber.custom_values[e.slug]=s)})},clickGroupNameToEdit(e){this.UpdatedGroupName=e,this.editingGroupName=e,this.$nextTick(()=>{this.$refs.groupNameInput[0].focus()})},handleGroupNameUpdate(){const e=this.editingGroupName,s=this.UpdatedGroupName.trim();if(!s||s===e)return this.UpdatedGroupName="",void(this.editingGroupName=null);this.$put("custom-fields/contacts/update_group_name",{old_name:e,new_name:s}).then(l=>{this.$notify.success({title:this.$t("Great!"),message:l.message,offset:19}),this.localFields.forEach(l=>{l.group===e&&(l.group=s)})}).catch(e=>{this.errors=e,this.handleError(e)}).finally(()=>{this.UpdatedGroupName="",this.editingGroupName=null})}},watch:{custom_fields(e){this.localFields=Array.isArray(e)?[...e]:[],this.initCustomValues()}},mounted(){window.fcAdmin&&window.fcAdmin.is_rtl&&(this.direction="ltr"),this.each(this.custom_fields,e=>{let s="";-1!==["select-multi","checkbox"].indexOf(e.type)&&(s=[]),v(this.subscriber.custom_values,e.slug)||(this.subscriber.custom_values[e.slug]=s)}),this.initCustomValues(),this.app_ready=!0}},[["render",function(e,s,l,v,g,L){const M=a,P=y("Icons"),W=t,J=r,Q=d,R=m,X=c,q=p,ee=n,se=_,le=u,ae=i,te=o,oe=f,ie=y("Operation"),ue=h,de=y("custom-fields"),re=b;return C(),V("div",H,[g.localFields.length?(C(),V("div",I,[k("div",j,[U(e.$slots,"header-title"),e.hasPermission("fcrm_manage_settings")?(C(),w(M,{key:0,link:"",onClick:s[0]||(s[0]=e=>g.showingCustomFieldsConfig=!0)},{default:F(()=>[s[4]||(s[4]=k("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[k("path",{d:"M4.6485 10.4001L10.7337 4.31485L9.8853 3.46645L3.8001 9.55165V10.4001H4.6485ZM5.1459 11.6001H2.6001V9.05425L9.4611 2.19325C9.57361 2.08077 9.7262 2.01758 9.8853 2.01758C10.0444 2.01758 10.197 2.08077 10.3095 2.19325L12.0069 3.89065C12.1194 4.00317 12.1826 4.15575 12.1826 4.31485C12.1826 4.47395 12.1194 4.62653 12.0069 4.73905L5.1459 11.6001V11.6001ZM2.6001 12.8001H13.4001V14.0001H2.6001V12.8001Z",fill:"currentColor"})],-1)),k("span",null,G(e.$t("Configure Custom Data")),1)],void 0),_:1})):N("",!0)]),g.app_ready?(C(),w(oe,{key:0,data:l.subscriber.custom_values,"label-position":"top",class:"fcrm_custom_fields_form"},{default:F(()=>[(C(!0),V(x,null,$(L.fieldGroups,(a,t)=>(C(),V("div",{key:t,class:E(["fcrm_custom_field_box",t?"fcrm_custom_field_group_box":""])},[t&&g.editingGroupName!==t?(C(),V("div",O,[Y(G(t)+" ",1),k("span",{class:"icon cursor_pointer",onClick:e=>L.clickGroupNameToEdit(t)},[A(P,{"icon-name":"EditPen"})],8,T)])):N("",!0),t&&g.editingGroupName===t?(C(),V("div",z,[A(W,{ref_for:!0,ref:"groupNameInput",type:"text",modelValue:g.UpdatedGroupName,"onUpdate:modelValue":s[1]||(s[1]=e=>g.UpdatedGroupName=e),onBlur:L.handleGroupNameUpdate,onKeyup:D(L.handleGroupNameUpdate,["enter"])},null,8,["modelValue","onBlur","onKeyup"])])):N("",!0),k("div",Z,[A(te,{gutter:24},{default:F(()=>[(C(!0),V(x,null,$(a,(s,a)=>(C(),w(ae,{key:a,md:12,sm:24},{default:F(()=>[A(le,{class:"fcrm_customLine truncated
@@ -0,0 +1 @@
import{c as e,Y as t,o as s,G as a,a6 as i,j as l,k as n,h as r,i as o,E as c,av as d,aB as m,aH as u,aI as h,e as p,ay as g}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as _,W as f,X as b,ab as v,Z as S,a5 as y,a9 as w,aa as $,J as C,a8 as k,Y as T,b2 as F,a6 as A}from"../../../../vendor.js?ver=3.1.8";import{P as D}from"../../../../PaginationBar.js?ver=3.1.8";import{C as M}from"../../../../Confirm.js?ver=3.1.8";import{D as B}from"../../../../DataTable.js?ver=3.1.8";import{F as j}from"../../../../FloatingBulkActionShell.js?ver=3.1.8";import{S as O,a as x}from"../../../../SmsMessageCell.js?ver=3.1.8";import{B as I}from"../../../../Badge.js?ver=3.1.8";import{_ as P,I as H,a as R,T as E}from"../../../../fc-bits-ui.js?ver=3.1.8";import{P as L}from"../../../../PageHeader.js?ver=3.1.8";import V from"../Contacts/Filter/FilterPopover.js?ver=3.1.8";import z from"../Contacts/Filter/ActiveFiltersBar.js?ver=3.1.8";const N={class:"fcrm_all_sms_page"},U={class:"fcrm-layout-width"},Y={class:"icon"},W={class:"el-popover__reference"},G={class:"icon"},J={key:0,class:"fc_loading_bar"},K=["title","src","alt"],Q={class:"fcrm_contact_info"},X={class:"fcrm_contact_name"},Z={class:"fcrm_contact_email"},q={key:1},ee={key:0},te={key:1},se={class:"fcrm_sms_type_badge"},ae=["title"],ie={key:0,class:"fcrm_table_actions"},le={class:"fcrm_empty_state"},ne={class:"fcrm_empty_state_text"},re={class:"fcrm_bulk_action_bar"},oe={class:"fcrm_bulk_action_left"},ce={class:"fc_bulk_selection_count"};const de=P({name:"AllSMS",components:{Badge:I,PageHeader:L,PaginationBar:D,Confirm:M,DataTable:B,FloatingBulkActionShell:j,FilterPopover:V,ActiveFiltersBar:z,SmsTabNav:x,SmsMessageCell:O,Delete:i,RefreshRight:a,View:s,Hide:t,Close:e,Icons:H},data:()=>({messages:[],pagination:{total:0,per_page:10,current_page:1},loading:!1,resending:!1,selections:[],deleting:!1,statuses:null,filterData:{sms_types:[],sms_statuses:[]},searchBy:"",showBulkActions:!0,expandedMessageId:null,searchDebounceTimer:null,current_mode:"system"===E.getCurrentTheme()?E.getSystemTheme():E.getCurrentTheme()}),computed:{smsTypeOptions(){return[{id:"campaign",title:this.$t("Campaign")},{id:"automation",title:this.$t("Automation")},{id:"custom_sms",title:this.$t("Custom SMS")},{id:"incoming",title:this.$t("Incoming")}]},smsStatusOptions(){return this.statusOptions.map(e=>({id:e.value,title:`${e.label} (${e.count})`}))},statusOptions(){if(!this.statuses)return[];const e=["pending","sent","delivered","failed","cancelled"],t=e=>e.split("_").map(e=>this.ucFirst(e)).join(" ");return Array.isArray(this.statuses)?this.statuses.map((s,a)=>{const i=(null==s?void 0:s.value)||(null==s?void 0:s.status)||"",l=String(i).toLowerCase().trim(),n=Number((null==s?void 0:s.count)??0);return l&&e.includes(l)?{key:`${l}-${a}`,value:l,label:(null==s?void 0:s.label)||t(l),count:n}:null}).filter(Boolean):Object.entries(this.statuses).map(([s,a])=>{const i=String(s).toLowerCase().trim(),l=Number(a??0);return e.includes(i)?{value:i,label:t(i),count:l}:null}).filter(Boolean)},activeFiltersData(){return{types:this.filterData.sms_types||[],sms_statuses:this.filterData.sms_statuses||[]}}},methods:{applySearchAndFetch(){this.pagination.current_page=1,this.fetchSMS()},handleFilterApply(e){this.filterData.sms_types=e.types||e.sms_types||[],this.filterData.sms_statuses=e.sms_statuses||[],this.pagination.current_page=1,this.fetchSMS()},handleFilterBarChange(e){this.filterData.sms_types=e.types||e.sms_types||[],this.filterData.sms_statuses=e.sms_statuses||[],this.pagination.current_page=1,this.fetchSMS()},handleOpenFilter(e){this.$nextTick(()=>{var t,s;null==(s=null==(t=this.$refs.filterPopoverRef)?void 0:t.openFilterCategory)||s.call(t,e)})},debouncedSearchFetch(){this.searchDebounceTimer&&clearTimeout(this.searchDebounceTimer),this.searchDebounceTimer=setTimeout(()=>{this.applySearchAndFetch()},350)},fetchSMS(){this.loading=!0;const e={per_page:this.pagination.per_page,page:this.pagination.current_page,status:this.filterData.sms_statuses.join(","),sms_type:this.filterData.sms_types.join(","),search:this.searchBy};this.$get("sms/messages",e).then(e=>{this.messages=e.sms.data,e.statuses&&(this.statuses=e.statuses),this.pagination={total:e.sms.total,per_page:e.sms.per_page,current_page:e.sms.current_page,from:e.sms.from,to:e.sms.to,last_page:e.sms.last_page,next_page_url:e.sms.next_page_url,prev_page_url:e.sms.prev_page_url},window.scrollTo({top:0,behavior:"smooth"})}).catch(e=>{this.handleError(e)}).finally(()=>{this.loading=!1})},resendSMS(e){this.resending=!0,this.$post(`sms/messages/${e.id}/resend`).then(e=>{this.$notify.success({title:this.$t("Success"),message:this.$t("SMS resent successfully")}),this.fetchSMS()}).catch(e=>{this.handleError(e)}).finally(()=>{this.resending=!1})},deleteSelected(){this.deleting=!0;const e=this.selections.map(e=>e.id);this.$del("sms/messages",{ids:e}).then(e=>{this.$notify.success({title:this.$t("Success"),message:this.$t("Selected SMS messages deleted successfully")}),thLine truncated
@@ -0,0 +1 @@
import{c as e,aj as t,a6 as a,n as s,E as l,k as i,aL as n,aK as o,ay as r,a7 as c,ac as p,j as d,h,i as m,aB as g,aH as u,aI as _,aQ as f,e as b}from"../../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as y,W as C,X as k,Z as v,ab as $,a5 as S,J as w,a9 as A,aa as D,a8 as T,Y as B,az as L,$ as P,a6 as x,ay as F,b2 as j}from"../../../../../vendor.js?ver=3.1.8";import{C as E}from"../../../../../Confirm.js?ver=3.1.8";import{P as q}from"../../../../../PaginationBar.js?ver=3.1.8";import{D as M}from"../../../../../DataTable.js?ver=3.1.8";import{F as I}from"../../../../../FloatingBulkActionShell.js?ver=3.1.8";import z from"../../Labels/Labels.js?ver=3.1.8";import{_ as O,I as V,a as N,T as H}from"../../../../../fc-bits-ui.js?ver=3.1.8";import{S as R,a as U}from"../../../../../SmsMessageCell.js?ver=3.1.8";import{B as W}from"../../../../../Badge.js?ver=3.1.8";import Y from"../../Contacts/Filter/FilterPopover.js?ver=3.1.8";import Q from"../../Contacts/Filter/ActiveFiltersBar.js?ver=3.1.8";import{P as K}from"../../../../../PageHeader.js?ver=3.1.8";const G={name:"BulkCampaignActions",emits:["deselect-all","refetch","select-all","select-only-this-page"],props:{selectedCampaigns:{type:Array,default:()=>[]},options:{type:Object,default:()=>({})},totalCount:{type:Number,default:0},currentPageCount:{type:Number,default:0},perPage:{type:Number,default:10},filters:{type:Object,default:()=>({})},allSelected:{type:Boolean,default:!1},theme_mode:{type:String,default:""}},components:{Delete:a,Check:t,Close:e},watch:{"select_job.action_name"(e){"apply_labels"!==e&&(this.selectedLabels=[])}},computed:{allSelectedOnPage(){const e=this.selectedCampaigns.length,t=this.currentPageCount;return t>0&&e===t&&e===this.perPage},bulkSelectPopperClass(){return"dark"===this.theme_mode?"fcrm-force-light":"fcrm-dark"},bulkSelectWordbreakPopperClass(){return"dark"===this.theme_mode?"fcrm_select_options_wordbreak fcrm-force-light":"fcrm_select_options_wordbreak fcrm-dark"}},data:()=>({select_job:{action_name:""},doing_action:!1,selectedLabels:[]}),methods:{doApplyLabels(){this.selectedLabels.length&&this.doBulkAction("apply_labels")},confirmAndDeleteCampaigns(){s.confirm(this.$t("Are you sure you want to delete the selected campaigns?"),this.$t("Delete Campaigns"),{confirmButtonText:this.$t("Delete"),cancelButtonText:this.$t("Cancel"),type:"warning"}).then(()=>{this.doBulkAction("delete_campaigns")}).catch(()=>{})},doBulkAction(e){let t={action_name:e,labels:"apply_labels"===e?this.selectedLabels:[]};this.allSelected?(t.select_all=!0,t.filters=this.filters):t.campaign_ids=this.selectedCampaigns.map(e=>e.id),this.doing_action=!0,this.$post("sms/campaigns/do-bulk-action",t).then(e=>{this.$notify.success(e.message),this.$emit("refetch"),this.selectedLabels=[],this.select_job.action_name=""}).catch(e=>{this.handleError(e)}).finally(()=>{this.doing_action=!1})}}},J={class:"fcrm_bulk_action_bar"},X={class:"fcrm_bulk_action_left"},Z={class:"fc_bulk_selection_count"},ee={key:0,class:"fc_bulk_divider","aria-hidden":"true"},te={key:2,class:"fc_bulk_divider","aria-hidden":"true"},ae={class:"fcrm_bulk_action_inline"},se={class:"fcrm_bulk_wrap"},le={class:"icon"};const ie={class:"fcrm_sms_campaign_page"},ne={class:"fcrm-layout-width"},oe={class:"icon"},re={class:"el-popover__reference"},ce={class:"icon"},pe={class:"el-popover__reference"},de={class:"icon"},he={class:"icon"},me={class:"icon"},ge=["href"],ue={key:0,class:"fcrm_sms_labels"},_e=["title"],fe={key:0},be=["title"],ye={key:2},Ce={key:0},ke={key:0},ve={key:1},$e={class:"el-popover__reference"},Se={class:"icon"},we={class:"el-popover__reference"},Ae={class:"icon"},De={class:"el-popover__reference"},Te={class:"icon"},Be={class:"el-popover__reference"},Le={class:"icon"},Pe={class:"fcrm_empty_state"},xe={class:"fcrm_empty_state_text"};const Fe=O({name:"Campaigns",emits:["refresh-stats"],components:{CopyDocument:p,Icons:V,PageHeader:K,ActiveFiltersBar:Q,FilterPopover:Y,Badge:W,FloatingBulkActionShell:I,BulkCampaignActions:O(G,[["render",function(e,t,a,s,c,p){const d=y("Close"),h=l,m=i,g=n,u=o,_=y("Check"),f=y("Delete"),b=r;return C(),k("div",J,[v("div",X,[$(m,{link:"","aria-label":e.$t("Deselect"),onClick:t[0]||(t[0]=t=>e.$emit("deselect-all"))},{default:S(()=>[$(h,null,{default:S(()=>[$(d)],void 0,!0),_:1})],void 0),_:1},8,["aria-label"]),v("span",Z,[a.allSelected?(C(),k(w,{key:0},[A(D(e.$t("All"))+" ",1),v("strong",null,D(a.totalCount),1),A(" "+D(e.$t("selected")),1)],64)):(C(),k(w,{key:1},[v("strong",null,D(a.selectedCampaigns.length),1),A(" "+D(e.$t("selected")),1)],64))]),p.allSelectedOnPage&&!a.allSelected?(C(),k("span",ee)):T("",!0),p.allSelectedOnPage&&!a.allSelected?(C(),B(m,{key:1,link:"",onClick:t[1]||(t[1]=t=>e.$emit("select-all"))},{default:S(()=>[A(D(e.$t("Select All"))+" "+D(a.totalCount),1)],void 0),_:1})):T("",!0),a.allSelected?(C(),k("span",te)):T("",!0),a.allSelected?(C(),B(m,{key:3,link:"",onClick:t[2]||(t[2]=t=>e.$emit("select-only-this-page"))},{default:S(()=>[A(D(e.$t("Select oLine truncated
@@ -0,0 +1 @@
import{W as e,a2 as t,E as a,k as i,ay as s,aJ as n,aF as c,aE as o,aY as r,aZ as m,a_ as l,aw as d,e as p,ax as _,ap as g}from"../../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as h,W as u,X as v,Z as f,aa as S,ab as w,a5 as y,a9 as $,a6 as b,a8 as C,J as k,Y as M,az as T,a0 as R,av as x}from"../../../../../vendor.js?ver=3.1.8";import{R as j}from"../../../../../RecipientTaggerForm.js?ver=3.1.8";import{R as V}from"../../../../../ReadableRecipientTagger.js?ver=3.1.8";import{c as E,h as I}from"../../../../../data_config.js?ver=3.1.8";import{C as P}from"../../../../../Confirm.js?ver=3.1.8";import{_ as B}from"../../../../../fc-bits-ui.js?ver=3.1.8";import{B as F}from"../../../../../BaseCard.js?ver=3.1.8";import{I as q}from"../../../../../input-popover-dropdown2.js?ver=3.1.8";import"../../../../../fc-bits.js?ver=3.1.8";import"../../../../../CustomIcon.js?ver=3.1.8";const Y={class:"fcrm_campaign_review_wrapper fcrm_sms_campaign_review_wrapper"},N={class:"fcrm_campaign_review_row"},A={class:"fcrm_campaign_review_list"},D={class:"fcrm_campaign_review_item fcrm_campaign_review_item--recipients"},O={class:"fcrm_campaign_review_item_header"},U={class:"fcrm_campaign_review_item_header--title"},z={class:"fcrm_campaign_review_item_header--action"},H={class:"fcrm_campaign_review_item_body"},Q={class:"fcrm_campaign_review_item_body_item"},G={class:"fcrm_campaign_review_item_body--value"},L={key:0,class:"fcrm_campaign_review_item_body--recipient-selections"},W={class:"fcrm_campaign_review_item fcrm_campaign_review_item--subject"},J={class:"fcrm_campaign_review_item_header"},Z={class:"fcrm_campaign_review_item_header--title"},X={class:"fcrm_campaign_review_item_header--action"},K={class:"fcrm_campaign_review_item_body"},ee={class:"fcrm_campaign_review_item_body_item"},te={class:"fcrm_campaign_review_item_body--value"},ae={class:"fcrm_campaign_review_item fcrm_campaign_review_item--broadcast"},ie={class:"fcrm_campaign_review_item_header"},se={class:"fcrm_campaign_review_item_header--title"},ne={class:"icon"},ce={class:"fcrm_campaign_review_item_body"},oe={class:"fcrm_campaign_review_item_body_item"},re={key:0,class:"fcrm_campaign_review_item_body_broadcast--schedule fcrm_pl_24 fcrm_mt_10"},me={class:"fcrm_input_hint"},le={class:"fcrm_campaign_review_actions"},de={class:"fcrm_review_sms_preview_wrap"},pe={class:"fcrm_review_sms_preview"},_e={class:"sms_date"};const ge={class:"fcrm_sms_edit_page"},he={class:"fcrm_page_header_top_nav_wrapper"},ue={class:"fcrm_page_header_top_nav"},ve={class:"fcrm_page_header_top_actions"},fe={class:"fcrm_edit_campaign_steps"},Se={class:"fcrm_edit_campaign_progress_label"},we={class:"fcrm_edit_campaign_progress_bar"},ye=["onClick"],$e={class:"fcrm_max_w_800"},be={class:"fcrm_edit_sms_camp_form_inner"},Ce={class:"fcrm_textarea_with_count"},ke={class:"fcrm_sms_message_count"},Me={class:"count"},Te={class:"fcrm-info-alert"};const Re=B({name:"SMSCampaignCreateFlow",components:{BaseCard:F,InputPopoverDropdown:q,RecipientTaggerForm:j,CampaignReview:B({name:"CampaignReview",props:{campaign:{type:Object,required:!0}},emits:["goToStep"],components:{ReadableRecipients:V,Confirm:P,EditPen:t,InfoFilled:e},data(){return{campaignConfirmMessage:"<b>"+this.$t("Cam_Send_Now_Confirm_Header")+"</b><br />"+this.$t("Cam_Send_Now_Message_sms"),btnSending:!1,sending_type:"send_now",schedule_date_time:"",subscribers_modal:!1,showing_recipients:!1,pickerOptions:I,emailDateRangeConfig:E,show_selections:!1,count:null,showScheduleTimer:!0}},methods:{goToStep(e){this.$emit("goToStep",e)},getCount(){this.campaign.id?this.$get(`sms/campaigns/${this.campaign.id}/estimated-recipients-count`).then(e=>{this.count=e.estimated_count}):this.count=0},sendingTypeChanged(){this.showScheduleTimer=!1,"send_now"===this.sending_type||"schedule"===this.sending_type?this.schedule_date_time="":"range_schedule"===this.sending_type&&(this.schedule_date_time=["",""]),this.$nextTick(()=>{this.showScheduleTimer=!0})},sendEmails(){const e={};if("schedule"===this.sending_type){if(!this.schedule_date_time)return void this.$notify.error(this.$t("Please select a date and time"));e.scheduled_at=this.schedule_date_time,e.sending_type="schedule"}else if("range_schedule"===this.sending_type){if(!this.schedule_date_time[0]||!this.schedule_date_time[1])return void this.$notify.error(this.$t("Please select a date and time"));e.scheduled_at=this.schedule_date_time,e.sending_type="range_schedule"}this.btnSending=!0,this.$post(`sms/campaigns/${this.campaign.id}/schedule`,e).then(e=>{this.$notify.success({title:this.$t("Great!"),message:e.message,offset:19}),this.$router.push({name:"sms_campaign_view",params:{id:this.campaign.id}})}).catch(e=>{this.$notify.error(e.message)}).finally(()=>{this.btnSending=!1})}},mounted(){this.getCount()}},[["render",function(e,t,m,l,d,p){const _=h("EditPen"),g=a,T=i,R=h("readable-recipients"),x=h("InfoFilled"),j=n,V=c,E=o,I=r,P=h("confirm"),B=s;return u(),v("div",Y,[f("div",N,[f("div",A,[f("div",D,[f("div",O,[f("div",U,S(Line truncated
@@ -0,0 +1 @@
import{aR as e,k as t,aS as s,g as i}from"../../../../../vendor-element-plus.js?ver=3.1.8";import{W as o,X as a,ab as r,a5 as n,Z as l,aa as d,a9 as m,Y as p,a8 as c}from"../../../../../vendor.js?ver=3.1.8";import{_ as u}from"../../../../../fc-bits-ui.js?ver=3.1.8";const h={class:"fcrm_sms_campaign_import_route"},C={class:"fcrm_import_content"},g={class:"el-upload__text"};const _=u({name:"ImportSMSCampaign",data:()=>({importDialogVisible:!1,inlineErrors:!1,shouldRedirectOnClose:!0}),computed:{importUrl(){let e=window.ajaxurl;return e+=(e.match(/\?/)?"&":"?")+jQuery.param({action:"fluentcrm_import_sms_campaign"}),e},importUploadData(){var e,t,s,i;const o=(null==(s=null==(t=null==(e=null==window?void 0:window.FLUENTCRM)?void 0:e.appVars)?void 0:t.rest)?void 0:s.nonce)||(null==(i=null==window?void 0:window.fcAdmin)?void 0:i.nonce)||"";return o?{_wpnonce:o}:{}}},methods:{normalizeImportResponse:e=>e?e.data&&(Object.prototype.hasOwnProperty.call(e,"success")||Object.prototype.hasOwnProperty.call(e,"status"))?e.data||{}:e:{},routeImportedCampaign(e){const t="draft"===e.status?"sms_campaign_edit":"sms_campaign_view";this.$router.push({name:t,params:{id:e.id},query:{t:(new Date).getTime(),step:e.next_step&&parseInt(e.next_step)<=2?e.next_step:0}})},importSuccess(e){const t=this.normalizeImportResponse(e),s=t.campaign||null,i=t.campaign_id||t.id||s&&s.id,o=t.message||this.$t("Imported");this.shouldRedirectOnClose=!1,this.importDialogVisible=!1,this.inlineErrors=!1,this.$notify.success(o),s&&s.id?this.routeImportedCampaign(s):i?this.$router.push({name:"sms_campaign_edit",params:{id:i}}):this.$router.push({name:"sms_campaigns"})},importError(e){let t;try{t=JSON.parse(e.message)}catch(s){t={message:(null==e?void 0:e.message)||this.$t("Something went wrong")}}this.$notify.error(t.message||this.$t("Something went wrong")),t.requires&&(this.inlineErrors=t.requires)},handleDialogClosed(){this.inlineErrors=!1,this.$refs.uploader&&this.$refs.uploader.clearFiles&&this.$refs.uploader.clearFiles(),this.shouldRedirectOnClose?this.$router.push({name:"sms_campaigns"}):this.shouldRedirectOnClose=!0}},mounted(){if("yes"!==window.fcAdmin.sms_enabled)return this.$notify.warning({title:this.$t("Warning"),message:this.$t("SMS functionality is not enabled")}),void this.$router.push({name:"dashboard"});this.importDialogVisible=!0}},[["render",function(u,_,w,f,v,$){const y=t,b=e,S=s,V=i;return o(),a("div",h,[r(V,{title:u.$t("Import Campaign"),modelValue:v.importDialogVisible,"onUpdate:modelValue":_[0]||(_[0]=e=>v.importDialogVisible=e),"append-to-body":!0,"close-on-click-modal":!1,width:"640px","modal-class":"fcrm_import_dialog",onClosed:$.handleDialogClosed},{default:n(()=>[l("div",C,[l("h3",null,d(u.$t("Upload JSON File")),1),r(b,{drag:"",limit:1,action:$.importUrl,data:$.importUploadData,name:"file",accept:".json,application/json",ref:"uploader",multiple:!1,"on-error":$.importError,"on-success":$.importSuccess},{default:n(()=>[_[1]||(_[1]=l("span",{class:"upload-icon"},[l("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[l("path",{d:"M12.0001 12.5274L15.8188 16.3452L14.5452 17.6187L12.9001 15.9735V21H11.1V15.9717L9.45485 17.6187L8.18135 16.3452L12.0001 12.5274ZM12.0001 3C13.5453 3.00007 15.0367 3.568 16.1906 4.59581C17.3445 5.62361 18.0805 7.03962 18.2587 8.5746C19.3785 8.87998 20.3554 9.56919 21.0186 10.5218C21.6819 11.4744 21.9893 12.6297 21.8871 13.786C21.7849 14.9422 21.2797 16.0257 20.4597 16.8472C19.6396 17.6687 18.557 18.1759 17.401 18.2802V16.4676C17.8151 16.4085 18.2133 16.2674 18.5724 16.0527C18.9314 15.8379 19.2441 15.5539 19.4922 15.217C19.7402 14.8801 19.9187 14.4972 20.0171 14.0906C20.1156 13.6839 20.1321 13.2618 20.0656 12.8488C19.9991 12.4357 19.851 12.0401 19.63 11.6849C19.4089 11.3297 19.1194 11.0221 18.7781 10.78C18.4369 10.538 18.0509 10.3663 17.6426 10.2751C17.2343 10.1838 16.812 10.1748 16.4002 10.2486C16.5411 9.5924 16.5335 8.91297 16.3778 8.2601C16.2222 7.60722 15.9225 6.99743 15.5007 6.47538C15.0789 5.95333 14.5456 5.53225 13.94 5.24298C13.3343 4.9537 12.6717 4.80357 12.0005 4.80357C11.3293 4.80357 10.6667 4.9537 10.061 5.24298C9.45539 5.53225 8.92214 5.95333 8.50031 6.47538C8.07849 6.99743 7.77879 7.60722 7.62315 8.2601C7.46752 8.91297 7.4599 9.5924 7.60085 10.2486C6.77974 10.0944 5.93101 10.2727 5.24136 10.7443C4.55171 11.2159 4.07765 11.9421 3.92345 12.7632C3.76925 13.5843 3.94756 14.433 4.41914 15.1227C4.89072 15.8123 5.61694 16.2864 6.43805 16.4406L6.60005 16.4676V18.2802C5.44396 18.1761 4.36122 17.669 3.54107 16.8476C2.72093 16.0261 2.21555 14.9426 2.11326 13.7863C2.01097 12.6301 2.31828 11.4747 2.98148 10.522C3.64468 9.56934 4.62159 8.88005 5.74145 8.5746C5.91939 7.03954 6.65532 5.62342 7.80927 4.59558C8.96323 3.56774 10.4547 2.99988 12.0001 3Z",fill:"var(--fc-secondary-text)"})])],-1)),l("div",g,d(u.$t("Choose a file or drag & drop it here.")),1),r(y,null,{default:n(()=>[m(d(u.$t("Browse File")),1)],void 0,!0),_:1})],void 0,!0),_:1},8,["action","data","onLine truncated
@@ -0,0 +1 @@
import{ay as a,av as s,k as e,aH as i,aI as t,aJ as n,e as c,aw as l,aE as r,aF as m,aK as o,aL as p,ax as d,U as _,ap as g,H as u,aZ as h,a_ as v,E as f,a$ as w,b0 as b,aB as $}from"../../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as y,W as S,X as C,Z as k,aa as T,a6 as M,a9 as R,ab as P,a8 as A,Y as D,a5 as E,a0 as I,J as V,az as x,av as B}from"../../../../../vendor.js?ver=3.1.8";import{R as F}from"../../../../../ReadableRecipientTagger.js?ver=3.1.8";import{_ as U,I as Y}from"../../../../../fc-bits-ui.js?ver=3.1.8";import{P as j}from"../../../../../PaginationBar.js?ver=3.1.8";import{D as N}from"../../../../../DataTable.js?ver=3.1.8";import{B as H}from"../../../../../Badge.js?ver=3.1.8";import{B as z}from"../../../../../BaseCard.js?ver=3.1.8";import"../../../../../fc-bits.js?ver=3.1.8";const q={class:"fcrm_sms_campaign_view--processing-status"},L={key:0,class:"fcrm_sms_campaign_view--processing-status-progress"},W={class:"fcrm_sms_campaign_view--progress-card"},J={class:"fcrm_sms_campaign_view--progress-header"},Z={class:"fcrm_sms_campaign_view--progress-title"},K={class:"fcrm_sms_campaign_view--progress-percent"},Q={key:0,class:"fcrm_sms_campaign_view--scheduling-note"},X={class:"fcrm_sms_campaign_view--processing-status-details"},G={class:"fcrm_sms_campaign_view--details-grid"},O={class:"fcrm_sms_campaign_view--detail-row"},aa={class:"fcrm_sms_campaign_view--detail-label"},sa={class:"fcrm_sms_campaign_view--detail-value"},ea={class:"fcrm_sms_campaign_view--detail-row"},ia={class:"fcrm_sms_campaign_view--detail-label"},ta={class:"fcrm_sms_campaign_view--detail-value"},na={class:"fcrm_sms_campaign_view--detail-row"},ca={class:"fcrm_sms_campaign_view--detail-label"},la={class:"fcrm_sms_campaign_view--detail-value"},ra={key:0},ma={class:"fcrm_sms_campaign_view--section-title"},oa={class:"fcrm_sms_campaign_view--sms-preview-card"},pa={class:"fcrm_sms_campaign_view--sms-preview-date"},da={class:"fcrm_sms_campaign_view--sms-bubble"},_a={key:1,class:"fcrm_sms_campaign_view--cancel-schedule"},ga={key:0};const ua=U({name:"CampaignSMSProcessStat",props:["campaign"],emits:["refresh","unscheduled"],components:{ReadableRecipients:F},data:()=>({contact_count:null,loading:!1,loading_processing_stat:!1,completed:1,processing_counter:1,show_selections:!1,scheduling_method:"",pollTimer:null}),computed:{processing_percent(){return"processing"===this.campaign.status&&this.completed&&this.contact_count?parseInt(this.completed/this.contact_count*100):1},canCancelEmail(){const a=this.campaign.status;return"scheduled"===a||"pending-scheduled"===a||"processing"===a}},methods:{fetchCount(){this.$get(`sms/campaigns/${this.campaign.id}/estimated-recipients-count`).then(a=>{this.contact_count=a.estimated_count})},getHumanStatusName(a){return"pending-scheduled"===a?this.$t("Scheduled"):this.ucFirst(a)},cancelSchedule(){this.loading=!0,this.$post(`sms/campaigns/${this.campaign.id}/unschedule`).then(a=>{this.$notify.success(a.message),this.$emit("unscheduled")}).catch(a=>{this.handleError(a)}).finally(()=>{this.loading=!1})},fetchProcessingStat(){this.loading_processing_stat=!0,this.$get(`sms/campaigns/${this.campaign.id}/processing-stat`,{counter:this.processing_counter}).then(a=>{if(!a.campaign)return this.loading_processing_stat=!1,void this.$emit("refresh");const s=this.campaign.status;this.loading_processing_stat=!1,this.completed=a.campaign.recipients_count,this.campaign.status=a.campaign.status,this.scheduling_method=a.scheduling_method,this.campaign.scheduling_range=a.campaign.scheduling_range,s!==a.campaign.status&&this.$emit("refresh"),"processing"===a.campaign.status&&this.fetchStatAgain()}).catch(a=>{this.handleError(a),this.loading_processing_stat=!1})},fetchStatAgain(){this.pollTimer&&clearTimeout(this.pollTimer),this.pollTimer=setTimeout(()=>{this.processing_counter+=1,this.fetchProcessingStat()},3e3)}},mounted(){this.fetchCount(),this.fetchProcessingStat()},beforeUnmount(){this.pollTimer&&(clearTimeout(this.pollTimer),this.pollTimer=null)}},[["render",function(i,t,n,c,l,r){const m=s,o=y("readable-recipients"),p=e,d=a;return S(),C("div",q,["processing"==n.campaign.status?(S(),C("div",L,[k("div",W,[k("div",J,[k("span",Z,T(i.$t("SMS sending on process...")),1),M((S(),C("span",K,[R(T(r.processing_percent)+"%",1)])),[[d,l.loading_processing_stat]])]),P(m,{percentage:r.processing_percent,"stroke-width":8,"text-inside":!1,color:"#8F6ED6","show-text":!1,class:"fcrm_sms_campaign_view--progress-bar"},null,8,["percentage"]),n.campaign.scheduling_range?(S(),C("p",Q,[t[4]||(t[4]=R("The SMS will be scheduled randomly between the date-time of ",-1)),k("b",null,T(n.campaign.scheduling_range.start),1),t[5]||(t[5]=R(" and ",-1)),k("b",null,T(n.campaign.scheduling_range.end),1)])):A("",!0)])])):A("",!0),k("div",X,[k("div",G,[k("div",O,[k("span",aa,T(i.$t("Campaign Status:")),1),k("span",sa,T(r.getHumanStatusName(n.campaign.status)),1)]),k("div",ea,[k("span",ia,T(i.$t("Scheduled on:")),1),k("span",ta,T(n.campaign.scheduled_at)+" Line truncated
@@ -0,0 +1 @@
import{c as e,E as a,aw as t,aK as o,aL as l,e as i,aH as s,aI as d,ax as n,k as r,a6 as m,a2 as c,aB as h,j as u,h as p,i as b,ay as f,aT as _}from"../../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as g,W as k,X as v,Z as w,aa as y,ab as $,a5 as C,J as F,az as S,Y as W,a8 as T,ax as V,a9 as x,a6 as U,b2 as D}from"../../../../../vendor.js?ver=3.1.8";import{I as L}from"../../../../../ItemCopier2.js?ver=3.1.8";import{_ as I,I as R}from"../../../../../fc-bits-ui.js?ver=3.1.8";import{D as j}from"../../../../../DataTable.js?ver=3.1.8";import{S as E}from"../../../../../SettingsHeader.js?ver=3.1.8";import{S as P}from"../../../../../SettingsRow.js?ver=3.1.8";import{P as z}from"../../../../../PromoCard.js?ver=3.1.8";const A={class:"fcrm_create_webhook_modal"},N={class:"fcrm_modal_header"},K={class:"fcrm_modal_header_content"},H={class:"fcrm_modal_title"},B={class:"fcrm_modal_body"},q={key:2,class:"fcrm_webhook_url_section"},M={class:"el-form-item__label"},G={class:"url-display"},J={key:3,class:"field-mapping-section"},O={class:"el-form-item__label"},Q={class:"el-form-item__label"},X={class:"fcrm_modal_footer"},Y={class:"fcrm_modal_actions"};const Z=I({name:"CreateWebhook",components:{ItemCopier:L,Close:e},props:{item_mode:{type:String,default:"create"},editing_row:{type:Object,default:()=>null},lists:{type:Array,default:()=>[]},tags:{type:Array,default:()=>[]},companies:{type:Array,default:()=>[]},fields:{type:Array,default:()=>[]},customFields:{type:Array,default:()=>[]}},emits:["close","webhook-created","webhook-updated"],data(){return{form:{name:"",type:"contact_creation",lists:[],tags:[],companies:[],status:"subscribed"},rules:{name:[{required:!0,message:this.$t("Name is required"),trigger:"blur"}]},loading:!1,listsLoading:!1,tagsLoading:!1,companiesLoading:!1,availableLists:[],availableTags:[],availableCompanies:[],statuses:[{value:"pending",label:this.$t("Pending")},{value:"subscribed",label:this.$t("Subscribed")},{value:"unsubscribed",label:this.$t("Unsubscribed")}],webhookTypes:[{id:"contact_creation",title:this.$t("Contact Creation Webhook")}],editing:!1,errors:{}}},watch:{item_mode(e){"edit"===e?(this.editing=!0,this.editing_row&&this.populateForm(this.editing_row)):(this.editing=!1,this.resetForm())},editing_row(e){"edit"===this.item_mode&&e&&this.populateForm(e)},lists:{immediate:!0,handler(e){this.availableLists=(e||[]).filter(e=>e&&null!=e.id)}},tags:{immediate:!0,handler(e){this.availableTags=(e||[]).filter(e=>e&&null!=e.id)}},companies:{immediate:!0,handler(e){this.availableCompanies=(e||[]).filter(e=>e&&null!=e.id)}}},computed:{truncatedUrl(){var e;const a=(null==(e=this.form)?void 0:e.url)||"";return a.length>30?a.slice(0,30)+"...":a}},mounted(){"edit"===this.item_mode&&this.editing_row&&this.populateForm(this.editing_row)},methods:{async fetchFields(){try{await this.$get("webhooks/fields")}catch(e){console.error("Error fetching fields:",e)}},async createWebhook(){this.$refs.webhookForm.validate(async e=>{if(e){this.loading=!0,this.errors={};try{const e=await this.$post("webhooks",this.form);this.$notify.success(e.message),this.$emit("webhook-created",e.webhook),this.$emit("close"),this.resetForm()}catch(a){this.$notify.error(a.message)}finally{this.loading=!1}}})},async updateWebhook(){this.$refs.webhookForm.validate(async e=>{if(e){this.loading=!0,this.errors={};try{const e=await this.$put(`webhooks/${this.form.id}`,this.form);this.$emit("webhook-updated",e.webhook),this.$emit("close")}catch(a){this.$notify.error((null==a?void 0:a.message)||this.$t("Failed to update webhook"))}finally{this.loading=!1}}})},handleSubmit(){this.editing?this.updateWebhook():this.createWebhook()},resetForm(){this.form={type:"",name:"",lists:[],tags:[],companies:[],status:"active"},this.errors={},this.editing=!1,this.$refs.webhookForm&&this.$refs.webhookForm.resetFields()},populateForm(e){if(!e)return this.editing=!1,void this.resetForm();this.editing=!0,this.form={id:e.id??null,type:e.type,name:e.name,lists:(e.lists||[]).map(e=>String((null==e?void 0:e.id)??e)),tags:(e.tags||[]).map(e=>String((null==e?void 0:e.id)??e)),companies:(e.companies||[]).map(e=>String((null==e?void 0:e.id)??e)),status:e.status,url:e.url}}}},[["render",function(e,m,c,h,u,p){const b=g("Close"),f=a,_=l,U=o,D=t,L=i,I=g("item-copier"),R=d,j=s,E=n,P=r;return k(),v("div",A,[w("div",N,[w("div",K,[w("h3",H,y(u.editing?e.$t("Edit Webhook"):e.$t("Create New Incoming Webhook")),1),w("button",{type:"button",class:"fcrm_modal_close_btn",onClick:m[0]||(m[0]=a=>e.$emit("close"))},[$(f,null,{default:C(()=>[$(b)],void 0),_:1})])])]),w("div",B,[$(E,{ref:"webhookForm",model:u.form,rules:u.rules,"label-position":"top",onSubmit:V(p.handleSubmit,["prevent"])},{default:C(()=>[$(D,{label:e.$t("Webhook Type"),prop:"type",class:"fcrm_form_item"},{default:C(()=>[$(U,{modelValue:u.form.type,"onUpdate:modelValue":m[1]||(m[1]=e=>u.form.type=e),placeholder:e.$t("Select Webhook Type"),class:"fcrm_select",disabled:u.loading},{default:C(()=>[(k(!0),v(F,null,S(u.webhoLine truncated
@@ -0,0 +1 @@
import{aq as t,aJ as e,aW as s,E as i,bg as n,aV as a}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as o,W as l,X as r,Z as c,a0 as d,ab as p,a5 as g,aa as h,J as m,az as u,Y as _,a8 as b,a9 as f,b2 as v,ax as S}from"../../../../vendor.js?ver=3.1.8";import{S as C}from"../../../../SettingsIcons.js?ver=3.1.8";import{_ as M,I as y}from"../../../../fc-bits-ui.js?ver=3.1.8";import{A}from"../../../../Animation.js?ver=3.1.8";const w=[{title:"Business Setup",path:"/settings",icon:"business_setup"},{title:"Global Email Settings",path:"/settings/email_settings",icon:"global_email_settings"},{title:"Email Service",path:"/settings/smtp_settings",icon:"email_service_setup"},{title:"General Settings",path:"/settings/general_settings",icon:"general_settings"},{title:"Custom Fields",path:"/settings/custom_contact_fields",icon:"custom_contact_fields"},{title:"Smart Link",path:"/settings/smart_links",icon:"smart_links"},{title:"Double Opt-in Settings",path:"/settings/double_optin_settings",icon:"double_optin_settings"},{title:"SMS Setting",path:"/settings/sms_settings",icon:"sms_settings"},{title:"Integrations",path:"/settings/integrations",icon:"integrations"},{title:"Abandoned Cart Settings",path:"/settings/abandoned_cart_settings",icon:"abandoned_cart_settings"},{title:"AI Configuration",path:"/settings/ai_settings",icon:"ai_writing",children:[{title:"AI Model Setup",path:"/settings/ai_settings"},{title:"MCP for AI Agents",path:"/settings/mcp_settings"}]},{title:"Compliance Settings",path:"/settings/settings_compliance",icon:"compliance_settings"},{title:"Incoming Webhooks",path:"/settings/incoming_webhooks",icon:"incoming_webhooks"},{title:"CRM Managers",path:"/settings/managers",icon:"crm_managers"},{title:"System Admin Tools",path:"/settings/settings_tools",icon:"system_admin_tools",children:[{title:"Cron Job Monitor",path:"/settings/settings_tools"},{title:"Database Health",path:"/settings/database_health"},{title:"Data Cleanup",path:"/settings/data_cleanup"},{title:"CRM Database Reset",path:"/settings/database_reset"}]}],k={class:"fcrm_settings"},$={class:"fcrm_settings_menu_collapsable--title"},O={class:"fcrm_menu_title"},x=["onClick","onKeydown"],I={class:"fcrm_settings_content"};const D=M({name:"Settings",components:{Animation:A,Icons:y,SettingsIcons:C,ArrowRight:t},provide(){return{toggleMenu:this.toggleMenu,settingsState:this}},data:()=>({menus:[...w],isMenuOpen:!1,isMenuHovered:!1,isSidebarCollapsed:!1,tooltipPosition:"right"}),methods:{handleOpen(t,e){},handleClose(t,e){},isAnyChildActive(t){if(!t||!t.children||!this.$route)return!1;const e=this.$route.path;return t.children.some(t=>t.path===e)},redirectToFirstChild(t){if(!t||!t.children||0===t.children.length)return;const e=t.children[0];e&&e.path&&this.$route.path!==e.path&&this.$router.push(e.path),this.isMenuOpen=!1},toggleMenu(){this.isMenuOpen=!this.isMenuOpen},closeMenu(){this.isMenuOpen=!1},removeSidebarCollapsed(){this.isSidebarCollapsed=!1},toggleSidebar(){this.isSidebarCollapsed=!this.isSidebarCollapsed},isDropdownVisible(t){return!this.isSidebarCollapsed||(!(!this.isSidebarCollapsed||!this.isMenuHovered)||void 0)}},computed:{activePath(){return this.$route.path}},mounted(){this.isSidebarCollapsed=!1,window.fcAdmin.is_rtl&&(this.tooltipPosition="left");try{const t="undefined"!=typeof window&&(window.fcrmAppVars||window.fluentcrmAdminVars||this.appVars)||{};if("yes"===(t.experimentals||{}).system_logs){const t=this.menus.find(t=>"/settings/settings_tools"===t.path);if(t&&Array.isArray(t.children)&&!t.children.find(t=>"/settings/system_logs"===t.path)){const e={title:"System Logs",path:"/settings/system_logs"},s=t.children.findIndex(t=>"/settings/settings_tools"===t.path);s>=0?t.children.splice(s+1,0,e):t.children.unshift(e)}}!0!==t.has_campaign_pro&&!0!==this.has_campaign_pro||this.menus.find(t=>"/settings/license_management"===t.path)||this.menus.push({title:"License Management",path:"/settings/license_management",icon:"license_management"})}catch(t){}}},[["render",function(t,C,M,y,A,w){const D=o("Icons"),H=e,P=o("SettingsIcons"),V=o("ArrowRight"),j=i,R=s,F=o("Animation"),T=n,E=a,J=o("router-view");return l(),r("div",k,[c("div",{class:d(["fcrm_settings_inner",{"is-collapsed":A.isSidebarCollapsed}])},[c("div",{class:d(["fcrm_settings_menu_overlay",{"is-open":A.isMenuOpen}]),onClick:C[0]||(C[0]=(...t)=>w.toggleMenu&&w.toggleMenu(...t))},null,2),c("div",{class:d(["fcrm_settings_sidebar",{"is-open":A.isMenuOpen,"is-collapsed":A.isSidebarCollapsed,"is-hover-expanded":A.isMenuHovered}])},[c("div",{class:d(["fcrm_settings_menu_collapsable",{"is-collapsed":A.isSidebarCollapsed}])},[p(H,{enterable:!1,transition:"none",content:A.isSidebarCollapsed?t.$t("Open Sidebar"):t.$t("Close Sidebar"),placement:A.tooltipPosition},{default:g(()=>[c("span",{class:"fcrm_settings_menu_collapsable--btn",onClick:C[1]||(C[1]=(...t)=>w.toggleSidebar&&w.toggleSidebar(...t))},[p(D,{"icon-name":"sidebar"})])],void 0),_:1},8,["content","placement"]),c("div",$,h(t.$t(Line truncated
@@ -0,0 +1 @@
import{e as t,k as e,aB as i,aT as a,ac as s,L as n,p as l,a6 as r,a2 as o,D as c,W as d,aH as _,aI as m,j as h,h as p,i as u}from"../../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as f,W as g,X as k,Z as w,aa as v,ab as y,a5 as b,a9 as L,Y as $,c5 as x,a0 as D,a8 as C,b2 as T,ax as S}from"../../../../../vendor.js?ver=3.1.8";import{F as I}from"../../../../../_FormBuilder.js?ver=3.1.8";import{_ as A,I as V}from"../../../../../fc-bits-ui.js?ver=3.1.8";import{P as E}from"../../../../../PaginationBar.js?ver=3.1.8";import{D as R}from"../../../../../DataTable.js?ver=3.1.8";import{I as U}from"../../../../../ItemCopier2.js?ver=3.1.8";import{S as j}from"../../../../../SettingsHeader.js?ver=3.1.8";import"../../../../../_OptionSelector.js?ver=3.1.8";import"../../../../../input-popover-dropdown2.js?ver=3.1.8";import"../../../../../CustomIcon.js?ver=3.1.8";import"../../../../../data_config.js?ver=3.1.8";const F={class:"fcrm_create_link_wrapper"},P={key:0,class:"fcrm_narrow_box fcrm_white_inverse text-align-center"},M={key:1},z={class:"fcrm_form_actions"};const H=A({name:"CreateLink",components:{FormBuilder:I},props:["editing_row","item_mode"],emits:["cancel","linkCreated"],data(){return{link:{title:"",notes:"",target_url:"",actions:{tags:[],lists:[]},detach_actions:{tags:[],lists:[]}},creating:!1,fields:{title:{type:"input-text",placeholder:this.$t("Link Title"),label:this.$t("Link Title"),help:this.$t("Your link title so you do not forget it")},target_url:{type:"input-text",data_type:"url",placeholder:this.$t("Your target URL"),label:this.$t("Target Full URL"),help:this.$t("Insert a valid url that this link will direct to")},actions:{type:"input-tag-list",label:"",wrapper_class:"fcrm_group_field_half",tag_label:this.$t("Apply Tags when clicked (optional)"),tag_help:this.$t("CreateLink.Action.tag_help"),list_label:this.$t("Apply Lists when clicked (optional)"),list_help:this.$t("CreateLink.Action.list_help")},detach_actions:{type:"input-tag-list",label:"",wrapper_class:"fcrm_group_field_half",tag_label:this.$t("Remove Tags when clicked (optional)"),tag_help:this.$t("CreateLink.Detach_Action.tag_help"),list_label:this.$t("Remove Lists when clicked (optional)"),list_help:this.$t("CreateLink.Detach_Action.list_help")},auto_login:{type:"inline-checkbox",true_value:"yes",false_value:"no",wrapper_class:"fcrm_checkbox_wrapper",checkbox_label:this.$t("Enable auto login"),label:"",inline_help:this.$t("CreateLink_Auto_Login_Help")},notes:{type:"input-text",placeholder:this.$t("You smart link note"),data_type:"textarea",label:this.$t("Notes"),help:this.$t("Feel free to add a note regarding this URL")}},link_created:!1}},methods:{syncLinkFromEditingRow(){if("edit"!==this.item_mode||!this.editing_row)return;this.link=JSON.parse(JSON.stringify(this.editing_row)),this.link.actions||(this.link.actions={tags:[],lists:[]});const t=this.link.actions.auto_login;this.link.auto_login=!0===t||"true"===t||"yes"===t?"yes":"no"},prepareLinkPayload(){const t={...this.link};return t.actions||(t.actions={tags:[],lists:[]}),t.actions.auto_login="yes"===t.auto_login?"true":"false",t},createLink(){this.creating=!0,this.$post("smart-links",{link:this.prepareLinkPayload()}).then(t=>{this.$emit("linkCreated",t.link),this.$notify.success(t.message),this.link.short_url=t.link.short_url,this.link_created=!0}).catch(t=>{this.handleError(t)}).finally(()=>{this.creating=!1})},updateLink(){this.$put(`smart-links/${this.link.id}`,{link:this.prepareLinkPayload()}).then(t=>{this.$emit("linkCreated",t.link),this.$notify.success(t.message),this.link_created=!0}).catch(t=>{this.handleError(t)}).finally(()=>{this.creating=!1})}},created(){this.syncLinkFromEditingRow()},watch:{"link.auto_login"(t){this.link.actions||(this.link.actions={tags:[],lists:[]}),this.link.actions.auto_login="yes"===t?"true":"false"},editing_row:{handler(t){"edit"===this.item_mode&&t&&this.syncLinkFromEditingRow()},immediate:!0}}},[["render",function(i,a,s,n,l,r){const o=t,c=f("form-builder"),d=e;return g(),k("div",F,[l.link_created?(g(),k("div",P,[w("p",null,v(i.$t("_Cr_Please_utfsuawau")),1),y(o,{type:"textarea",readonly:!0,"model-value":l.link.short_url},null,8,["model-value"])])):(g(),k("div",M,[y(c,{fields:l.fields,formData:l.link},null,8,["fields","formData"]),w("div",z,[y(d,{onClick:a[0]||(a[0]=t=>i.$emit("cancel"))},{default:b(()=>[L(v(i.$t("Cancel")),1)],void 0),_:1}),"create"==s.item_mode?(g(),$(d,{key:0,onClick:a[1]||(a[1]=t=>r.createLink()),type:"primary"},{default:b(()=>[L(v(i.$t("Create Smart Link")),1)],void 0),_:1})):(g(),$(d,{key:1,onClick:a[2]||(a[2]=t=>r.updateLink()),type:"primary"},{default:b(()=>[L(v(i.$t("Update Smart Link")),1)],void 0),_:1}))])]))])}]]),q=["href"];const B=A({name:"UrlGoTo",props:["url"]},[["render",function(t,e,i,a,s,n){return g(),k("a",{href:i.url,target:"_blank",rel:"nofollow",class:"fcrm_target_url_link"},v(i.url),9,q)}]]),N={class:"fcrm_badge"},W={class:"icon"};const Y=A({name:"listTagItems",components:{Icons:V},props:["items","item_type"]Line truncated
@@ -0,0 +1 @@
import{ay as s,k as t}from"../../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as e,W as r,X as a,ab as l,Z as n,aa as c,a0 as i,a8 as o,a6 as u,J as _,az as h,a5 as C,a9 as f}from"../../../../../vendor.js?ver=3.1.8";import{S as v}from"../../../../../SettingsHeader.js?ver=3.1.8";import{_ as g}from"../../../../../fc-bits-ui.js?ver=3.1.8";const d={class:"fcrm_settings fcrm_min_bg fcrm_view"},m={class:"fcrm_body"},p={class:"fcrm_max_w_800"},w={class:"fcrm_report_card"},M={class:"fcrm_report_card_header"},H={class:"fcrm_report_card_title_group"},k={class:"fcrm_report_card_body"},y={class:"fcrm-status-grid"},x={class:"fcrm-status-card"},V={class:"fcrm-status-label"},Z={class:"icon"},q={key:0,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},L={key:1,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},b={key:2,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},S={class:"fcrm-status-card"},$={class:"fcrm-status-label"},R={class:"icon"},T={key:0,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},B={key:1,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},j={key:2,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},D={class:"fcrm-status-card"},E={class:"fcrm-status-label"},J={class:"icon"},O={key:0,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},P={key:1,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},z={key:2,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},N={class:"fcrm-status-card"},A={class:"fcrm-status-label"},G={class:"icon"},I={key:0,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Q={key:1,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},W={key:2,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},X={key:0,class:"fcrm-cron-alert-wrapper fcrm_mb_24"},F={class:"fcrm-cron-alert"},K={class:"fcrm-cron-alert-text"},U={target:"_blank",rel:"noopener",href:"https://fluentcrm.com/docs/fluentcrm-cron-job-basics-and-checklist/",class:"fcrm-cron-alert-link"},Y={class:"fcrm_report_card"},ss={class:"fcrm_report_card_header"},ts={class:"fcrm_report_card_title_group"},es={class:"fcrm_report_card_body"},rs={key:0,class:"fcrm-server-stats fcrm_mb_24"},as={class:"fcrm-server-stat"},ls={class:"fcrm-stat-label"},ns={class:"fcrm-stat-value"},cs={class:"fcrm-server-stat"},is={class:"fcrm-stat-label"},os={class:"fcrm-stat-value"},us={class:"fcrm-server-stat"},_s={class:"fcrm-stat-label"},hs={class:"fcrm-stat-value"},Cs={class:"fcrm-cron-jobs"},fs={class:"fcrm-cron-job-info"},vs={class:"fcrm-cron-job-name"},gs={class:"fcrm-cron-job-meta"},ds={class:"fcrm-cron-meta-item"},ms={class:"fcrm-cron-meta-label"};const ps=g({name:"CronJobMonitor",components:{SettingsHeader:v},data:()=>({rest_statuses:{get_request_status:"Checking...",post_request_status:"Checking...",put_request_status:"Checking...",delete_request_status:"Checking..."},fetching_cron:!1,cron_events:[],server_info:!1}),methods:{getStatusType(s){const t=String(s).toLowerCase();return"ok"===t||"operational"===t||"success"===t?"ok":t.includes("slow")||t.includes("warning")||t.includes("checking")?"warning":t.includes("down")||t.includes("error")||t.includes("fail")?"error":"ok"},getStatusClass(s){return`fcrm-status-${this.getStatusType(s)}`},checkRestRequest(s,t,e){const r=Date.now();this[t]("setting/test").then(t=>{const e=Date.now()-r;t.message?this.rest_statuses[s]=e>2e3?"Slow Response":"Operational":this.rest_statuses[s]="Down"}).catch(t=>{this.rest_statuses[s]="Down"}).finally(()=>{e&&e()})},fetchCronEvents(){this.fetching_cron=!0,this.$get("setting/cron_status").then(s=>{this.cron_events=s.cron_events,this.server_info=s.server}).catch(s=>{this.handleError(s)}).finally(()=>{this.fetching_cron=!1})},runCron(s){this.fetching_cron=!0,this.$post("setting/run_cron",{hook:s}).then(s=>{this.$notify.success(s.message)}).catch(s=>{this.handleError(s)}).finally(()=>{this.fetching_cron=!1})}},mounted(){this.fetchCronEvents(),this.checkRestRequest("put_request_status","$put",()=>{this.checkRestRequest("delete_request_status","$del",()=>{this.checkRestRequest("get_request_status","$get",()=>{this.checkRestRequest("post_request_status","$post")})})}),this.changeTitle(this.$t("Cron Job Monitor"))}},[["render",function(v,g,ps,ws,Ms,Hs){const ks=e("SettingsHeader"),ys=t,xs=s;return r(),a("div",d,[l(ks,{title:v.$t("Cron Job Monitor")},null,8,["title"]),n("div",m,[n("div",p,[n("div",w,[n("div",M,[n("div",H,[n("h4",null,c(v.$t("Rest API Status")),1)])]),n("div",k,[n("div",y,[n("div",x,[n("p",V,c(v.$t("Get Request Status")),1),n("div",{class:i(["fcrm-status-badge",Hs.getStatusClass(Ms.rest_statuses.get_requLine truncated
@@ -0,0 +1 @@
import{ay as e,e as l,az as s,aG as t,k as a,g as i}from"../../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as o,a6 as c,W as n,X as r,Z as d,aa as g,ab as m,a5 as p,J as u,az as _,a8 as v,Y as f,a9 as h}from"../../../../../vendor.js?ver=3.1.8";import{_ as w,I as b}from"../../../../../fc-bits-ui.js?ver=3.1.8";import{S as y}from"../../../../../SettingsHeader.js?ver=3.1.8";const D={class:"fcrm_report_card"},C={class:"fcrm_report_card_body"},L={key:0,class:"text-success text-center"},k={key:1,class:"fcrm-settings-fields items-start"},$={class:"fcrm-cleanup-field"},x={class:"fcrm-field-label"},V={class:"fcrm-time-range-input"},H={class:"fcrm-time-range-unit"},P={class:"fcrm-field-help"},O=["innerHTML"],S={key:0,class:"fcrm-cleanup-field fcrm-cleanup-logs"},E={class:"fcrm-field-label"},M={class:"fcrm_checkbox_text"},T={class:"fcrm_checkbox_text_title"},Z={class:"fcrm_checkbox_text_desc"},j={class:"fcrm-cleanup-alert"},I={class:"fcrm-cleanup-alert-text"},U={class:"icon"},Y={class:"fcrm-cleanup-preview"},z={class:"fcrm-preview-header"},B=["disabled"],G={class:"fcrm-preview-body"},J={class:"fcrm-preview-content"},Q={class:"fcrm-preview-table-wrapper"},R={class:"fcrm-preview-divtable"},W={class:"fcrm-divtable-header"},X={class:"fcrm-divcell"},q={class:"fcrm-divcell"},A={key:0,class:"fcrm-divtable-body"},F=["title"],K=["title"],N={class:"fcrm-preview-help"},ee={class:"fcrm-preview-footer"},le={class:"fcrm-preview-actions"},se={class:"icon"};const te={class:"fcrm_settings fcrm_min_bg fcrm_view"},ae={class:"fcrm_body"},ie={class:"fcrm_max_w_800"};const oe=w({name:"DataCleanupPage",components:{DataCleanup:w({name:"DataCleanup",components:{Icons:b},data(){return{loading:!1,cleanup:{selected_logs:[],days_before:30},logOptionsData:{emails:{title:this.$t("Email History Logs"),description:this.$t("DataCleanup_Email_History_Desc")},email_clicks:{title:this.$t("Email Click Logs"),description:this.$t("DataCleanup_Email_Clicks_Desc")},email_open:{title:this.$t("Email Open Logs"),description:this.$t("DataCleanup_Email_Open_Desc")},system_logs:{title:this.$t("System Logs"),description:this.$t("DataCleanup_System_Logs_Desc")}},log_counters:[],showing_log:!1,reset_message:"",previewDialogVisible:!1,logs_loading:!1,deleting_logs:!1}},methods:{openPreviewDialog(){this.previewDialogVisible=!0,this.getOldLogs()},closePreviewDialog(){this.resetData(),this.previewDialogVisible=!1},deleteOldLogs(){if(this.deleting_logs)return;const e={...this.cleanup,selected_logs:[...this.cleanup.selected_logs]},l=()=>this.$del("setting/old_logs",e).then(e=>e.has_more?l():e);return this.deleting_logs=!0,l().then(e=>{this.$notify.success(e.message),this.resetData()}).catch(e=>{this.handleError(e),this.closePreviewDialog()}).finally(()=>{this.deleting_logs=!1})},getOldLogs(){this.logs_loading=!0,this.$get("setting/old_logs",{...this.cleanup}).then(e=>{this.showing_log=!0,this.log_counters=e.log_counts}).catch(e=>{this.closePreviewDialog(),this.handleError(e)}).finally(()=>{this.logs_loading=!1})},resetData(){this.cleanup={selected_logs:[],days_before:30},this.showing_log=!1,this.previewDialogVisible=!1,this.log_counters=[]}}},[["render",function(w,b,y,te,ae,ie){const oe=l,ce=s,ne=t,re=o("Icons"),de=a,ge=i,me=e;return c((n(),r("div",D,[d("div",C,[ae.reset_message?(n(),r("h4",L,g(ae.reset_message),1)):(n(),r("div",k,[d("div",$,[d("p",x,g(w.$t("Time Range")),1),d("div",V,[m(oe,{type:"number",min:7,modelValue:ae.cleanup.days_before,"onUpdate:modelValue":b[0]||(b[0]=e=>ae.cleanup.days_before=e)},null,8,["modelValue"]),d("div",H,g(w.$t("Days")),1)]),d("p",P,[d("span",{innerHTML:w.$t("Only logs older than <strong>%d days</strong> will be deleted.",ae.cleanup.days_before)},null,8,O)])]),ae.showing_log?v("",!0):(n(),r("div",S,[d("p",E,g(w.$t("Select Logs you want to delete")),1),m(ne,{modelValue:ae.cleanup.selected_logs,"onUpdate:modelValue":b[1]||(b[1]=e=>ae.cleanup.selected_logs=e),class:"fcrm-cleanup-checkboxes"},{default:p(()=>[(n(!0),r(u,null,_(ae.logOptionsData,(e,l)=>(n(),r("div",{class:"fcrm-cleanup-checkbox-item",key:l},[m(ce,{value:l,class:"fcrm_checkbox"},{default:p(()=>[d("div",M,[d("span",T,g(e.title),1),d("span",Z,g(e.description),1)])],void 0,!0),_:2},1032,["value"])]))),128))],void 0),_:1},8,["modelValue"]),d("div",j,[b[4]||(b[4]=d("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[d("path",{d:"M8.49364 2.62152L13.9236 12.1351C13.9737 12.2227 14 12.3221 14 12.4233C14 12.5245 13.9737 12.624 13.9236 12.7116C13.8736 12.7993 13.8017 12.8721 13.715 12.9227C13.6283 12.9733 13.5301 12.9999 13.43 12.9999H2.57C2.46995 12.9999 2.37165 12.9733 2.285 12.9227C2.19835 12.8721 2.12639 12.7993 2.07636 12.7116C2.02634 12.624 2 12.5245 2 12.4233C2 12.3221 2.02634 12.2227 2.07637 12.1351L7.50636 2.62152C7.5564 2.53387 7.62835 2.46109 7.715 2.41049C7.80165 2.35989 7.89995 2.33325 8 2.33325C8.10005 2.33325 8.19835 2.35989 8.285 2.41049C8.37165 2.46109 8.4436 2.53387 8.49364 2.62152ZM7.42998 10.117V11.2702H8.57002V1Line truncated
@@ -0,0 +1 @@
import{k as e,ay as a,aQ as s}from"../../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as t,W as i,X as r,ab as n,Z as c,aa as l,a5 as d,a9 as o,Y as h,a8 as m,a6 as f,J as p,az as g}from"../../../../../vendor.js?ver=3.1.8";import{S as u}from"../../../../../SettingsHeader.js?ver=3.1.8";import{_ as v}from"../../../../../fc-bits-ui.js?ver=3.1.8";const b={class:"fcrm_settings fcrm_min_bg fcrm_view"},_={class:"fcrm_body"},y={class:"fcrm_max_w_800"},x={class:"fcrm_report_card"},$={class:"fcrm_report_card_header"},k={class:"fcrm_report_card_title_group"},w={class:"fcrm-db-health-actions"},H={class:"fcrm_report_card_body"},j={class:"fcrm-db-health-intro"},C={key:0,class:"fcrm-db-health-ok"},L={class:"fcrm-cron-jobs"},z={class:"fcrm-cron-job-info"},B={class:"fcrm-cron-job-name"},D={class:"fcrm-cron-job-meta"},I={class:"fcrm-cron-meta-item"},M={class:"fcrm-cron-meta-label"},S={class:"fcrm-cron-meta-value"},R={class:"fcrm-cron-meta-item"},T={class:"fcrm-cron-meta-label"},Z={class:"fcrm-cron-meta-value"};const q=v({name:"DatabaseHealth",components:{SettingsHeader:u},data:()=>({indexes:[],fetching:!1,repairing:!1,loaded:!1}),computed:{hasBroken(){return this.indexes.some(e=>"yes"!==e.status)}},methods:{fetchHealth(e=!0){this.fetching=!0,this.$get("setting/db-index-health",e?{fresh:1}:{}).then(e=>{this.indexes=e.indexes||[],this.loaded=!0}).catch(e=>{this.handleError(e)}).finally(()=>{this.fetching=!1})},repair(){this.repairing=!0,this.$post("setting/db-index-health/repair").then(e=>{this.$notify.success(e.message),this.indexes=e.indexes||this.indexes}).catch(e=>{this.handleError(e)}).finally(()=>{this.repairing=!1})}},mounted(){this.changeTitle(this.$t("Database Health")),this.fetchHealth(!0)}},[["render",function(u,v,q,E,Q,A){const F=t("SettingsHeader"),J=e,N=s,U=a;return i(),r("div",b,[n(F,{title:u.$t("Database Health")},null,8,["title"]),c("div",_,[c("div",y,[c("div",x,[c("div",$,[c("div",k,[c("h4",null,l(u.$t("Critical Database Indexes")),1)]),c("div",w,[n(J,{size:"small",loading:Q.fetching,onClick:v[0]||(v[0]=e=>A.fetchHealth(!0))},{default:d(()=>[o(l(u.$t("Re-check")),1)],void 0),_:1},8,["loading"]),A.hasBroken?(i(),h(J,{key:0,size:"small",type:"primary",loading:Q.repairing,onClick:A.repair},{default:d(()=>[o(l(u.$t("Repair Now")),1)],void 0),_:1},8,["loading","onClick"])):m("",!0)])]),f((i(),r("div",H,[c("p",j,l(u.$t("FluentCRM relies on these indexes for fast campaign sending, automation processing and duplicate protection. If a database upgrade was interrupted, one may be missing — repairing recreates it safely.")),1),Q.loaded&&!A.hasBroken?(i(),r("div",C,[v[1]||(v[1]=c("svg",{width:"20",height:"20",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[c("path",{d:"M8 14C4.6862 14 2 11.3138 2 8C2 4.6862 4.6862 2 8 2C11.3138 2 14 4.6862 14 8C14 11.3138 11.3138 14 8 14ZM7.4018 10.4L11.6438 6.1574L10.7954 5.309L7.4018 8.7032L5.7044 7.0058L4.856 7.8542L7.4018 10.4Z",fill:"var(--fc-success)"})],-1)),c("span",null,l(u.$t("All critical indexes are present and healthy.")),1)])):m("",!0),c("div",L,[(i(!0),r(p,null,g(Q.indexes,e=>(i(),r("div",{class:"fcrm-cron-job",key:e.name},[c("div",z,[c("p",B,l(u.$t(e.title)),1),c("div",D,[c("div",I,[c("p",M,l(u.$t("Table:")),1),c("p",S,l(e.table),1)]),c("div",R,[c("p",T,l(u.$t("Type:")),1),c("p",Z,l("unique"===e.type?u.$t("Unique key"):u.$t("Index")),1)])])]),n(N,{size:"small",type:"yes"===e.status?"success":"danger",effect:"light"},{default:d(()=>[o(l("yes"===e.status?u.$t("Healthy"):u.$t("Missing")),1)],void 0),_:2},1032,["type"])]))),128))])])),[[U,Q.fetching]])])])])])}],["__scopeId","data-v-e46b47fe"]]);export{q as default};
@@ -0,0 +1 @@
import{ay as e,az as a,k as s,g as t}from"../../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as l,W as i,X as o,ab as r,Z as c,aa as n,a6 as d,a5 as m,a9 as f}from"../../../../../vendor.js?ver=3.1.8";import{S as _}from"../../../../../SettingsHeader.js?ver=3.1.8";import{_ as u,I as g}from"../../../../../fc-bits-ui.js?ver=3.1.8";const p={class:"fcrm_settings fcrm_min_bg fcrm_view"},v={class:"fcrm_body"},b={class:"fcrm_max_w_800"},D={class:"fcrm_report_card"},h={class:"fcrm_report_card_body"},R={class:"font-semibold fcrm_mb_4"},$={class:"d-flex items-center gap-4 flex-wrap"},y={class:"fcrm_report_card fcrm_danger_border"},C={class:"fcrm_report_card_header"},w={class:"fcrm_report_card_title_group"},k={class:"fcrm_report_card_body"},x={class:"font-medium fcrm_mb_10"},V={class:"fcrm-danger-list"},E={class:"fcrm-danger-list-row"},I={class:"fcrm-danger-column"},M={class:"fcrm-danger-column"},S={class:"fcrm-danger-confirm"},A={class:"fcrm_checkbox_text"},T={class:"fcrm_checkbox_text_title"},j={class:"fcrm_checkbox_text_desc"},U={class:"icon"},W={class:"fcrm-cleanup-preview"},F={class:"fcrm-preview-header"},H={class:"fcrm-preview-body"},P={class:"fcrm-preview-content"},B={class:"fcrm_secondary_text"},q={class:"fcrm-preview-footer"},z={class:"fcrm-preview-actions"};const L=u({name:"DatabaseReset",components:{Icons:g,SettingsHeader:_},data:()=>({loading:!1,confirmDelete:!1,resetDialogVisible:!1}),methods:{openResetDialog(){this.resetDialogVisible=!0},closeResetDialog(){this.resetDialogVisible=!1},confirmResetDatabase(){this.resetDialogVisible=!1,this.resetDatabase()},resetDatabase(){this.loading=!0,this.$post("setting/reset_db").then(e=>{this.$notify.success(e.message),this.loading=!1,this.confirmDelete=!1}).catch(e=>{this.handleError(e),this.loading=!1}).finally(()=>{this.loading=!1})}},mounted(){this.changeTitle(this.$t("CRM Database Reset"))}},[["render",function(_,u,g,L,N,Q){const X=l("SettingsHeader"),Y=a,Z=l("Icons"),G=s,J=t,K=e;return i(),o("div",p,[r(X,{title:_.$t("CRM Database Reset")},null,8,["title"]),c("div",v,[c("div",b,[c("div",D,[c("div",h,[c("div",R,n(_.$t("Developer Mode Required:")),1),c("div",$,[c("span",null,n(_.$t("Add")),1),u[3]||(u[3]=c("code",null,"define('FLUENTCRM_IS_DEV_FEATURES', true);",-1)),c("span",null,n(_.$t("DBReset_WpConfig_Enable_Desc")),1)])])]),c("div",y,[c("div",C,[c("div",w,[c("h4",null,n(_.$t("Complete Data Removal")),1)])]),d((i(),o("div",k,[c("div",x,n(_.$t("The Deleted Modules will be:")),1),c("div",V,[c("div",E,[c("div",I,[c("ul",null,[c("li",null,n(_.$t("All contacts and subscriber data")),1),c("li",null,n(_.$t("Automation workflows and triggers")),1),c("li",null,n(_.$t("System logs and analytics data")),1)])]),c("div",M,[c("ul",null,[c("li",null,n(_.$t("Campaign history and email templates")),1),c("li",null,n(_.$t("Tags, lists, and custom fields")),1)])])])]),c("div",S,[r(Y,{modelValue:N.confirmDelete,"onUpdate:modelValue":u[0]||(u[0]=e=>N.confirmDelete=e),class:"fcrm_checkbox"},{default:m(()=>[c("div",A,[c("span",T,n(_.$t("Include Contact Info in Personal Data export by WP")),1),c("span",j,n(_.$t("DBReset_Erase_Data_Warn")),1)])],void 0),_:1},8,["modelValue"])]),r(G,{disabled:!N.confirmDelete,type:"danger",onClick:Q.openResetDialog},{default:m(()=>[c("span",U,[r(Z,{"icon-name":"delete"})]),f(" "+n(_.$t("Permanently Erase FluentCRM Data")),1)],void 0),_:1},8,["disabled","onClick"]),r(J,{modelValue:N.resetDialogVisible,"onUpdate:modelValue":u[2]||(u[2]=e=>N.resetDialogVisible=e),"modal-class":"fcrm_cleanup-preview_dialog","append-to-body":"","show-close":!1},{default:m(()=>[c("div",W,[c("div",F,[c("h4",null,n(_.$t("Confirm Database Reset")),1),c("button",{class:"fcrm-close-button",onClick:u[1]||(u[1]=(...e)=>Q.closeResetDialog&&Q.closeResetDialog(...e))},[r(Z,{"icon-name":"close"})])]),c("div",H,[c("div",P,[c("p",B,n(_.$t("Are you sure, you want to reset the CRM Database?")),1)])]),c("div",q,[c("div",z,[r(G,{onClick:Q.closeResetDialog},{default:m(()=>[f(n(_.$t("Cancel")),1)],void 0,!0),_:1},8,["onClick"]),r(G,{type:"danger",loading:N.loading,onClick:Q.confirmResetDatabase},{default:m(()=>[f(n(_.$t("Yes")),1)],void 0,!0),_:1},8,["loading","onClick"])])])])],void 0),_:1},8,["modelValue"])])),[[K,N.loading]])])])])])}],["__scopeId","data-v-242852de"]]);export{L as default};
@@ -0,0 +1 @@
import{aB as e,aP as t,az as s,aG as a,e as l,aK as r,aL as o}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as i,W as d,X as n,ab as _,a5 as c,Z as m,aa as p,a8 as u,J as f,az as g,a9 as b,Y as v}from"../../../../vendor.js?ver=3.1.8";import{I as h}from"../../../../_InlineCheckbox.js?ver=3.1.8";import{O as y}from"../../../../_OptionSelector.js?ver=3.1.8";import{S as $}from"../../../../SettingsHeader.js?ver=3.1.8";import{S as V}from"../../../../SaveButton.js?ver=3.1.8";import{F as C}from"../../../../_FormBuilder2.js?ver=3.1.8";import{_ as S,I as x}from"../../../../fc-bits-ui.js?ver=3.1.8";import{I as A}from"../../../../ItemCopier2.js?ver=3.1.8";import{S as w}from"../../../../SettingsRow.js?ver=3.1.8";import"../../../../PhotoWidget.js?ver=3.1.8";import"../../../../input-popover-dropdown.js?ver=3.1.8";import"../../../../data_config.js?ver=3.1.8";import"../../../../_AjaxSelector.js?ver=3.1.8";import"../../../../_VerifiedEmailInput.js?ver=3.1.8";const k={class:"fcrm_settings fcrm_abandoned_cart_settings"},L={key:0,class:"fcrm_body"},j={class:"fcrm_max_w_800"},T={class:"fcrm_report_card"},U={class:"fcrm_report_card_body"},D={key:1,class:"fcrm_body"},P={class:"fcrm_max_w_800"},O={class:"fcrm_report_card"},I={class:"fcrm_report_card_body"},R={class:"fcrm_setting_switch"},F={class:"fcrm_switch"},B={class:"fcrm_switch_label"},z={key:0,class:"fcrm_abcart_not_providers_available"},H={class:"icon"},M={class:"fcrm_report_card_header"},E={class:"fcrm_report_card_title_group"},G={class:"fcrm_report_card_body"},N={class:"fcrm_report_card"},W={class:"fcrm_report_card_header"},q={class:"fcrm_report_card_title_group"},J={class:"fcrm_report_card_body"},K={class:"fcrm-settings-fields"},Q={class:"fcrm_report_card"},X={class:"fcrm_report_card_header"},Y={class:"fcrm_report_card_title_group"},Z={class:"fcrm_report_card_body"},ee={class:"fcrm_secondary_text small fcrm_mt_4",style:{"padding-inline-start":"24px"}},te={key:0,class:"fcrm_setting_gdpr_msg fcrm_mt_20",style:{"padding-inline-start":"24px"}},se={class:"fcrm_input_label fcrm_mb_8"},ae={class:"fcrm_input_wrapper"},le={class:"fcrm_secondary_text fcrm_mt_4 small"},re={class:"fcrm_report_card"},oe={class:"fcrm_report_card_header"},ie={class:"fcrm_report_card_title_group"},de={class:"fcrm_report_card_body"},ne={class:"fcrm_report_card"},_e={class:"fcrm_report_card_header"},ce={class:"fcrm_report_card_title_group"},me={class:"fcrm_report_card_body"},pe={class:"fcrm-settings-fields"},ue={class:"fcrm_form_builder_new",role:"group"},fe={class:"fcrm_form_builder_new",role:"group"},ge={class:"fcrm_form_builder_new",role:"group"},be={class:"fcrm_form_builder_new",role:"group"};const ve=S({name:"_AbandonedCartSettings",components:{SettingsRow:w,ItemCopier:A,InlineCheckbox:h,Icons:x,OptionSelector:y,SettingsHeader:$,SaveButton:V,FormBuilder:C},data:()=>({btnFromLoading:!1,loading:!1,settings:{},settings_loaded:!1,availableProviders:[]}),methods:{save(){this.loading||(this.btnFromLoading=!0,this.$post("setting/abandon-cart",{settings:this.settings}).then(e=>{this.$notify.success(e.message),e.reload&&location.reload()}).catch(e=>{this.$handleError(e)}).finally(()=>{this.btnFromLoading=!1}))},fetchSettings(){this.loading=!0,this.$get("setting/abandon-cart").then(e=>{this.settings=e.settings,this.availableProviders=e.available_providers,this.settings_loaded=!0}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})}},mounted(){this.fetchSettings(),this.changeTitle(this.$t("Abandon Cart Settings"))}},[["render",function(h,y,$,V,C,S){const x=i("SaveButton"),A=i("SettingsHeader"),w=e,ve=t,he=i("Icons"),ye=s,$e=a,Ve=i("FormBuilder"),Ce=l,Se=i("SettingsRow"),xe=o,Ae=r,we=i("InlineCheckbox"),ke=i("option-selector");return d(),n("div",k,[_(A,{title:h.$t("Abandoned Cart Settings")},{actions:c(()=>[_(x,{loading:C.btnFromLoading,onSave:S.save},null,8,["loading","onSave"])]),_:1},8,["title"]),C.loading?(d(),n("div",L,[m("div",j,[m("div",T,[m("div",U,[_(w,{rows:5,animated:""})])])])])):(d(),n("div",D,[m("div",P,[m("div",O,[m("div",I,[m("div",R,[m("div",F,[_(ve,{modelValue:C.settings.enabled,"onUpdate:modelValue":y[0]||(y[0]=e=>C.settings.enabled=e),"active-value":"yes","inactive-value":"no"},null,8,["modelValue"])]),m("div",B,[m("p",null,p(h.$t("Enable Abandoned Cart Module")),1),m("span",null,p(h.$t("Recover Abandon Carts for your eCommerce")),1)])]),"yes"!==C.settings.enabled||C.availableProviders.length?u("",!0):(d(),n("div",z,[m("span",H,[_(he,{"icon-name":"el-icon-info"})]),m("p",null,p(h.$t("Requires WooCommerce or FluentCart to enable abandoned cart tracking")),1)]))])]),"yes"===C.settings.enabled&&C.availableProviders.length?(d(),n(f,{key:0},[(d(!0),n(f,null,g(C.availableProviders,e=>(d(),n("div",{key:e.slug,class:"fcrm_report_card fcrm_abcart_provider_settings"},[m("div",M,[m("div",E,[m("h4",null,p(e.label),1)])]),m("div",G,[_($e,{modelValue:C.settings.enabled_providers,"onUpdate:modelValue":y[1]||(y[1]=e=>C.settings.enabled_providers=e),class:"fcrm_mb_16"},{default:c(()Line truncated
@@ -0,0 +1 @@
import{ay as e,az as a,aw as t,e as l,aK as s,aL as i,ax as n}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as o,W as d,X as r,ab as c,a5 as m,Z as _,a6 as u,a9 as g,aa as p,Y as v,J as h,az as f,a0 as b,a8 as y}from"../../../../vendor.js?ver=3.1.8";import{G as $}from"../../../../GenericPromo2.js?ver=3.1.8";import{S as V}from"../../../../SettingsHeader.js?ver=3.1.8";import{S}from"../../../../SaveButton.js?ver=3.1.8";import{_ as A}from"../../../../fc-bits-ui.js?ver=3.1.8";import"../../../../PromoCard.js?ver=3.1.8";const k={class:"fcrm_settings fcrm_advanced_features_settings"},F={class:"fcrm_body"},C={class:"fcrm_content_card"},L={class:"fcrm_setting_card"},x={class:"fcrm_setting_header"},E={class:"fcrm_setting_description"},U={key:0,class:"fcrm_nested_card"},M={class:"help_text"},P={class:"fcrm_shortcode_input"},j={class:"fcrm_info_box"},B={key:1},G={class:"text-align-center"},H={class:"fcrm_setting_card"},D={class:"fcrm_setting_header"},T={class:"fcrm_setting_description"},w={key:0,class:"fcrm_nested_checkbox"},I={class:"fcrm_setting_card"},Q={class:"fcrm_setting_header"},N={class:"fcrm_setting_description"},R={class:"fcrm_setting_card"},z={class:"fcrm_setting_header"},O={class:"fcrm_setting_description"},Y={key:0,class:"fcrm_alert_box"},q={class:"fcrm_list"},J={class:"fcrm_setting_card"},K={class:"fcrm_setting_header"},W={class:"fcrm_setting_description"};const X=A({name:"AdvancedFeatures",components:{GenericPromo:$,SettingsHeader:V,SaveButton:S},data(){return{btnFromLoading:!1,loading:!1,settings:{},settings_loaded:!1,campaigns:[],campaignLoading:!1,searchQuery:"",statuses:[{key:"all",label:this.$t("All")},{key:"draft",label:this.$t("Draft")},{key:"pending",label:this.$t("Pending")},{key:"archived",label:this.$t("Archived")},{key:"incomplete",label:this.$t("Incomplete")},{key:"purged",label:this.$t("Purged")},{key:"processing",label:this.$t("Processing")},{key:"pending-scheduled",label:this.$t("Scheduled (pending)")},{key:"scheduled",label:this.$t("Scheduled")}]}},methods:{save(){this.btnFromLoading=!0,this.$post("setting/experiments",{...this.settings}).then(e=>{this.$notify.success({title:this.$t("Great!"),message:e.message,offset:19}),setTimeout(()=>{window.location.reload()},500)}).finally(()=>{this.btnFromLoading=!1})},fetchSettings(){this.loading=!0,this.$get("setting/experiments").then(e=>{this.settings=e.settings}).catch(e=>{console.log(e)}).finally(()=>{this.loading=!1,this.settings_loaded=!0})},fetchCampaign(e){this.campaignLoading=!0,this.searchQuery=e,this.$get("campaigns",{searchBy:this.searchQuery}).then(e=>{this.campaignLoading=!1,this.campaigns=e.campaigns.data}).catch(e=>{console.log(e)})}},mounted(){this.fetchSettings(),this.fetchCampaign(""),this.changeTitle(this.$t("Experimental Settings"))}},[["render",function($,V,S,A,X,Z){const ee=o("SaveButton"),ae=o("SettingsHeader"),te=a,le=l,se=t,ie=i,ne=s,oe=o("generic-promo"),de=n,re=e;return d(),r("div",k,[c(ae,{title:$.$t("Advanced Features")},{actions:m(()=>[c(ee,{loading:X.btnFromLoading||X.loading,onSave:Z.save},null,8,["loading","onSave"])]),_:1},8,["title"]),_("div",F,[u((d(),r("div",C,[c(de,{model:X.settings,"label-position":"top"},{default:m(()=>[_("div",L,[_("div",x,[c(te,{modelValue:X.settings.campaign_archive,"onUpdate:modelValue":V[0]||(V[0]=e=>X.settings.campaign_archive=e),"true-value":"yes","false-value":"no"},{default:m(()=>[g(p($.$t("Enable Campaign Archive Frontend Feature"))+" ",1),_("p",E,p($.$t("Email_Camp_Enable_Help")),1)],void 0,!0),_:1},8,["modelValue"])]),"yes"==X.settings.campaign_archive?(d(),r("div",U,[_("h5",null,p($.$t("Campaign Archive Settings")),1),c(se,{label:$.$t("List_Campaigns_Label")},{default:m(()=>[c(le,{placeholder:$.$t("Campaign search keyword"),type:"text",modelValue:X.settings.campaign_search,"onUpdate:modelValue":V[1]||(V[1]=e=>X.settings.campaign_search=e)},null,8,["placeholder","modelValue"]),_("p",null,p($.$t("List_Campaigns_Help")),1)],void 0,!0),_:1},8,["label"]),c(se,{label:$.$t("Select Campaigns")},{default:m(()=>[u((d(),v(ne,{modelValue:X.settings.campaign_ids,"onUpdate:modelValue":V[2]||(V[2]=e=>X.settings.campaign_ids=e),multiple:"",placeholder:$.$t("Select Assign List"),filterable:"","popper-class":"fcrm_select_campaigns_popover",remote:!0,clearable:!0,"remote-method":Z.fetchCampaign},{default:m(()=>[(d(!0),r(h,null,f(X.campaigns,e=>(d(),v(ie,{key:e.id,label:e.title,value:e.id},{default:m(()=>[g(p(e.title)+" ",1),_("span",{class:b(["fcrm_badge","fcrm_badge_"+e.status])},p(e.status),3)],void 0,!0),_:2},1032,["label","value"]))),128))],void 0,!0),_:1},8,["modelValue","placeholder","remote-method"])),[[re,X.campaignLoading]]),_("p",M,p($.$t("Leave it blank to display all campaigns")),1)],void 0,!0),_:1},8,["label"]),c(se,{label:$.$t("Filter by status")},{default:m(()=>[c(ne,{modelValue:X.settings.campaign_status,"onUpdate:modelValue":V[3]||(V[3]=e=>X.settings.campaign_status=e),placeholder:$.$t("All")},{default:m(()=>[(d(!0),r(h,null,f(X.statuses,e=>(d(),v(ie,{key:e.key,vaLine truncated
@@ -0,0 +1 @@
import{ay as e,aP as t,aK as s,aL as i,e as l,k as a}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as r,W as o,X as n,ab as d,a5 as c,a6 as u,Z as p,aa as v,J as g,az as m,Y as h,a9 as f,a8 as _}from"../../../../vendor.js?ver=3.1.8";import{S as b}from"../../../../SettingsHeader.js?ver=3.1.8";import{S as y}from"../../../../SaveButton.js?ver=3.1.8";import{S as w}from"../../../../SettingsRow.js?ver=3.1.8";import{_ as P}from"../../../../fc-bits-ui.js?ver=3.1.8";const $={open_ai:[{value:"auto",label:"Auto"},{value:"gpt-5.5",label:"GPT-5.5"},{value:"gpt-5.4",label:"GPT-5.4"},{value:"gpt-5.4-mini",label:"GPT-5.4 Mini"},{value:"gpt-5.4-nano",label:"GPT-5.4 Nano"},{value:"gpt-4.1",label:"GPT-4.1"},{value:"gpt-4o",label:"GPT-4o"},{value:"gpt-4o-mini",label:"GPT-4o Mini"}],claude:[{value:"auto",label:"Auto"},{value:"claude-opus-4-7",label:"Claude Opus 4.7"},{value:"claude-sonnet-4-6",label:"Claude Sonnet 4.6"},{value:"claude-haiku-4-5-20251001",label:"Claude Haiku 4.5"},{value:"claude-opus-4-6",label:"Claude Opus 4.6"}],gemini:[{value:"auto",label:"Auto"},{value:"gemini-3.5-flash",label:"Gemini 3.5 Flash"},{value:"gemini-3.1-pro-preview",label:"Gemini 3.1 Pro Preview"},{value:"gemini-3-flash-preview",label:"Gemini 3 Flash Preview"},{value:"gemini-3.1-flash-lite",label:"Gemini 3.1 Flash-Lite"},{value:"gemini-2.5-flash",label:"Gemini 2.5 Flash"},{value:"gemini-2.5-pro",label:"Gemini 2.5 Pro"},{value:"gemini-2.5-flash-lite",label:"Gemini 2.5 Flash Lite"}],wordpress:[{value:"wordpress",label:"WordPress Default Model"}]},A={class:"fcrm_settings"},I={class:"fcrm_body"},S={class:"fcrm_max_w_800"},k={class:"fcrm_report_card"},C={class:"fcrm_report_card_body"},L={class:"fcrm_setting_switch"},G={class:"fcrm_switch"},V={class:"fcrm_switch_label"},W={class:"fcrm_report_card"},T={class:"fcrm_report_card_header"},M={class:"fcrm_report_card_title_group"},x={class:"fcrm_report_card_body"},E={class:"fcrm-settings-fields"},U={key:0,class:"fcrm_report_card"},j={class:"fcrm_report_card_header"},F={class:"fcrm_report_card_title_group"},K={class:"fcrm_report_card_body"},R={class:"fcrm-settings-fields"},z={style:{"padding-bottom":"20px"}},H={class:"fcrm_text_muted"},O={style:{"margin-top":"10px"}},B=["href"],q={class:"fcrm_report_card"},D={class:"fcrm_report_card_header"},J={class:"fcrm_report_card_title_group"},N={class:"fcrm_report_card_body"};const Q=P({name:"_AiSettings",components:{SettingsHeader:b,SaveButton:y,SettingsRow:w},data:()=>({loading:!1,btnLoading:!1,testLoading:!1,initialLoaded:!1,hasWordPressAi:!1,connectorsUrl:"",settings:{is_enabled:"no",provider:"",api_key:"",model:"auto",custom_prompt:""},providers:[{value:"wordpress",label:"WordPress AI (Recommended)"},{value:"open_ai",label:"OpenAI"},{value:"claude",label:"Anthropic Claude"},{value:"gemini",label:"Google Gemini"}]}),computed:{availableModels(){return $[this.settings.provider]||[]},currentProviderLabel(){const e=this.providers.find(e=>e.value===this.settings.provider);return e?e.label:""},filteredProviders(){return this.hasWordPressAi?this.providers:this.providers.filter(e=>"wordpress"!==e.value)}},watch:{"settings.provider"(e,t){this.initialLoaded&&e!==t&&(this.settings.model="wordpress"===e?"wordpress":"auto")}},methods:{fetchSettings(){this.loading=!0,this.initialLoaded=!1,this.$get("ai/settings").then(e=>{e.settings&&(this.settings={...this.settings,...e.settings}),this.hasWordPressAi=!!e.has_wordpress_ai,this.connectorsUrl=e.connectors_url||"",this.settings.provider&&!this.settings.model&&(this.settings.model="wordpress"===this.settings.provider?"wordpress":"auto")}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1,this.$nextTick(()=>{this.initialLoaded=!0})})},saveSettings(){this.btnLoading=!0,this.$post("ai/settings",{settings:this.settings}).then(e=>{this.$notify.success(e.message)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.btnLoading=!1})},testConnection(){this.settings.provider&&this.settings.model?"wordpress"===this.settings.provider||this.settings.api_key?(this.testLoading=!0,this.$post("ai/test",{settings:this.settings}).then(e=>{this.$notify.success(e.message)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.testLoading=!1})):this.$notify.error(this.$t("Please enter an API key.")):this.$notify.error(this.$t("Please select a provider and model first."))}},mounted(){this.fetchSettings(),this.changeTitle(this.$t("AI Model Setup"))}},[["render",function(b,y,w,P,$,Q){const X=r("SaveButton"),Y=r("SettingsHeader"),Z=t,ee=i,te=s,se=r("SettingsRow"),ie=l,le=a,ae=e;return o(),n("div",A,[d(Y,{title:b.$t("AI Model Setup")},{actions:c(()=>[d(X,{loading:$.btnLoading,onSave:Q.saveSettings},null,8,["loading","onSave"])]),_:1},8,["title"]),u((o(),n("div",I,[p("div",S,[p("div",k,[p("div",C,[p("div",L,[p("div",G,[d(Z,{modelValue:$.settings.is_enabled,"onUpdate:modelValue":y[0]||(y[0]=e=>$.settings.is_enabled=e),"active-value":"yes","inactive-value":"no"},null,8,["modelValue"])]),p("div",V,[p("p",null,v(b.$t("Enable AI")),1),p("spaLine truncated
@@ -0,0 +1 @@
import{ay as s,e as t,bh as e,k as i}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as n,a6 as a,W as o,X as l,ab as d,a5 as r,Z as c,a9 as g,aa as m,a0 as u,Y as h,a8 as p}from"../../../../vendor.js?ver=3.1.8";import{S as _}from"../../../../SettingsHeader.js?ver=3.1.8";import{S as f}from"../../../../SaveButton.js?ver=3.1.8";import{_ as v,I as $}from"../../../../fc-bits-ui.js?ver=3.1.8";import{S as b}from"../../../../SettingsRow.js?ver=3.1.8";const w={class:"fcrm_settings fcrm_settings_page fcrm_business_setup"},S={key:0,class:"fcrm_body"},y={class:"fcrm_max_w_800"},E={class:"fcrm_report_card"},B={class:"fcrm_report_card_body"},k={class:"fcrm-settings-fields"},A={class:"d-flex gap-4"},F=["src","alt"],L={key:1},V={class:"fcrm_field--logo-actions"},j={class:"icon"};const x=v({name:"BusinessSetup",components:{SettingsRow:b,Icons:$,SettingsHeader:_,SaveButton:f},data:()=>({btnFromLoading:!1,loading:!1,settings:{},settings_loaded:!1,adminEmails:[]}),methods:{getInitial(){return this.settings.business_name?this.settings.business_name.charAt(0).toUpperCase():this.$t("B")},parseAdminEmails(){this.settings.admin_email?this.adminEmails=this.settings.admin_email.split(",").map(s=>s.trim()).filter(Boolean):this.adminEmails=[]},composeAdminEmails(){return(this.adminEmails||[]).map(s=>String(s).trim()).filter(Boolean).join(", ")},openLogoPicker(){var s;const t=null==(s=null==window?void 0:window.wp)?void 0:s.media,e=null==t?void 0:t.editor;if(!(e&&"function"==typeof e.open&&t&&t.model&&t.view))return void console.warn("BusinessSetup: wp.media.editor is not available. Ensure wp_enqueue_media() is called.");const i=window.wpActiveEditor;window.wpActiveEditor="business_setup_logo";const n=e.send.attachment;e.send.attachment=(s,t)=>{t&&t.url&&(this.settings.logo=t.url),e.send.attachment=n},e.open();const a=e.frame;a&&"function"==typeof a.on?a.on("close",()=>{window.wpActiveEditor=i}):window.wpActiveEditor=i},saveSettings(){this.btnFromLoading=!0,this.$put("setting",{settings:{business_settings:this.settings}}).then(s=>{this.$notify.success({title:this.$t("Great!"),message:this.$t("Settings Updated."),offset:19})}).catch(s=>{this.$notify.error({title:this.$t("Error"),message:s.message||this.$t("Failed to save settings.")})}).finally(()=>{this.btnFromLoading=!1})},fetchSettings(){this.loading=!0,this.$get("setting",{settings_keys:["business_settings"]}).then(s=>{s.business_settings?(this.settings=s.business_settings,this.$nextTick(()=>{this.$nextTick(()=>{this.loading=!1,this.settings_loaded=!0})})):(this.loading=!1,this.settings_loaded=!0)}).catch(s=>{console.error("Failed to fetch settings:",s),this.$notify.error({title:this.$t("Error"),message:this.$t("Failed to load business settings")}),this.loading=!1,this.settings_loaded=!0})},deleteLogo(){this.settings.logo=""}},mounted(){this.fetchSettings(),this.changeTitle(this.$t("Business Settings"))}},[["render",function(_,f,v,$,b,x){const C=n("SaveButton"),I=n("SettingsHeader"),z=t,H=n("SettingsRow"),U=e,P=i,G=n("Icons"),R=s;return a((o(),l("section",w,[d(I,{title:_.$t("Business Setup")},{actions:r(()=>[d(C,{loading:b.btnFromLoading||b.loading,onSave:x.saveSettings},null,8,["loading","onSave"])]),_:1},8,["title"]),b.settings_loaded?(o(),l("div",S,[c("div",y,[c("div",E,[c("div",B,[c("div",k,[d(H,null,{title:r(()=>[g(m(_.$t("Business Name")),1)]),description:r(()=>[g(m(_.$t("Official name shown on invoices and emails.")),1)]),field:r(()=>[d(z,{modelValue:b.settings.business_name,"onUpdate:modelValue":f[0]||(f[0]=s=>b.settings.business_name=s),placeholder:_.$t("e.g., MyBusiness Inc.")},null,8,["modelValue","placeholder"])]),_:1}),f[3]||(f[3]=c("div",{class:"fcrm-divider"},null,-1)),d(H,null,{title:r(()=>[g(m(_.$t("Logo")),1)]),description:r(()=>[g(m(_.$t("PNG/JPEG, min 400×400px. Shown on branded content.")),1)]),field:r(()=>[c("div",A,[d(U,{size:40,shape:"circle",class:u(["fcrm_logo_avatar",{fcrm_has_logo:b.settings.logo}])},{default:r(()=>[b.settings.logo?(o(),l("img",{key:0,src:b.settings.logo,alt:_.$t("logo")},null,8,F)):(o(),l("span",L,m(x.getInitial()),1))],void 0,!0),_:1},8,["class"]),c("div",V,[d(P,{size:"small",class:"fcrm_change_btn",onClick:x.openLogoPicker,"aria-label":_.$t("Change logo")},{default:r(()=>[g(m(_.$t("Change")),1)],void 0,!0),_:1},8,["onClick","aria-label"]),b.settings.logo?(o(),h(P,{key:0,class:"small only-icon-btn",type:"danger",onClick:x.deleteLogo,"aria-label":_.$t("Delete logo"),plain:"",title:_.$t("Delete logo")},{default:r(()=>[c("span",j,[d(G,{"icon-name":"delete"})])],void 0,!0),_:1},8,["onClick","aria-label","title"])):p("",!0)])])]),_:1}),f[4]||(f[4]=c("div",{class:"fcrm-divider"},null,-1)),d(H,null,{title:r(()=>[g(m(_.$t("Business Full Address")),1)]),description:r(()=>[g(m(_.$t("BizSetup_Full_Address_Help")),1)]),field:r(()=>[d(z,{modelValue:b.settings.business_address,"onUpdate:modelValue":f[1]||(f[1]=s=>b.settings.business_address=s),style:{width:"100%"},rows:3,type:"textarea",placeholder:_.$t("street, city, state, zip, countLine truncated
@@ -0,0 +1 @@
import{aB as e,aK as l,aL as a,aS as t}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as s,W as i,X as n,ab as o,a5 as c,Z as r,a9 as d,aa as _,a8 as m,Y as u}from"../../../../vendor.js?ver=3.1.8";import{S as g}from"../../../../SettingsHeader.js?ver=3.1.8";import{S as p}from"../../../../SaveButton.js?ver=3.1.8";import{S as b}from"../../../../SettingsRow.js?ver=3.1.8";import{_ as v}from"../../../../fc-bits-ui.js?ver=3.1.8";const f={class:"fcrm_settings fcrm_compliance_settings"},y={class:"fcrm_body"},$={class:"fcrm_max_w_800"},h={key:0,class:"fcrm_report_card"},k={key:1,class:"fcrm_report_card"},S={class:"fcrm_report_card_body"},C={class:"fcrm-settings-fields"},V={key:0,class:"fcrm-divider"},D={key:2,class:"fcrm-divider"},w={class:"fcrm-label-title"},x={class:"fcrm-label-description"},E={class:"fcrm-label-title"},U={class:"fcrm-label-description"};const z=v({name:"ComplianceSettings",components:{SaveButton:p,SettingsHeader:g,SettingsRow:b},data:()=>({loading:!1,btnFromLoading:!1,settings_loaded:!1,settings:{anonymize_ip:"no",delete_contact_on_user:"no",personal_data_export:"yes",one_click_unsubscribe:"no",enable_gravatar:"yes",gravatar_fallback:"yes",email_click_tracking:"yes",email_open_tracking:"yes"}}),methods:{saveSettings(){this.btnFromLoading=!0,this.$post("setting/compliance",{...this.settings}).then(e=>{this.$notify.success(e.message)}).catch(e=>{console.error("Error saving settings:",e),this.$notify.error({title:this.$t("Error!"),message:this.$t("Failed to save settings."),position:"bottom-right",offset:10})}).finally(()=>{this.btnFromLoading=!1})},fetchSettings(){this.loading=!0,this.$get("setting/compliance").then(e=>{this.settings=e.settings}).catch(e=>{console.error("Error fetching settings:",e)}).finally(()=>{this.loading=!1,this.settings_loaded=!0})}},mounted(){this.fetchSettings()}},[["render",function(g,p,b,v,z,L){const j=s("SaveButton"),A=s("SettingsHeader"),F=e,T=a,O=l,P=s("SettingsRow"),B=t;return i(),n("div",f,[o(A,{title:g.$t("Compliance Settings")},{actions:c(()=>[o(j,{loading:z.btnFromLoading||z.loading,loadingText:g.$t("Saving..."),onSave:L.saveSettings},null,8,["loading","loadingText","onSave"])]),_:1},8,["title"]),r("div",y,[r("div",$,[z.loading?(i(),n("div",h,[o(F,{style:{padding:"20px"},animated:!0,rows:5})])):(i(),n("div",k,[r("div",S,[r("div",C,[o(P,{"label-class":"fcrm-settings-field"},{title:c(()=>[d(_(g.$t("Anonymize IP addresses in activity logs")),1)]),description:c(()=>[d(_(g.$t("Compliance_Anonymize_IP_Desc")),1)]),default:c(()=>[o(O,{style:{width:"150px"},modelValue:z.settings.anonymize_ip,"onUpdate:modelValue":p[0]||(p[0]=e=>z.settings.anonymize_ip=e),placeholder:g.$t("Select an option"),class:"fcrm_el_select"},{default:c(()=>[o(T,{label:g.$t("Enable"),value:"yes"},null,8,["label"]),o(T,{label:g.$t("Disable"),value:"no"},null,8,["label"])],void 0,!0),_:1},8,["modelValue","placeholder"])],void 0),_:1}),p[8]||(p[8]=r("div",{class:"fcrm-divider"},null,-1)),o(P,{"label-class":"fcrm-settings-field"},{title:c(()=>[d(_(g.$t("Compliance_Delete_Contact_Label")),1)]),description:c(()=>[d(_(g.$t("Compliance_Delete_Contact_Desc")),1)]),default:c(()=>[o(O,{style:{width:"150px"},modelValue:z.settings.delete_contact_on_user,"onUpdate:modelValue":p[1]||(p[1]=e=>z.settings.delete_contact_on_user=e),placeholder:g.$t("Select an option"),class:"fcrm_el_select"},{default:c(()=>[o(T,{label:g.$t("Enable"),value:"yes"},null,8,["label"]),o(T,{label:g.$t("Disable"),value:"no"},null,8,["label"])],void 0,!0),_:1},8,["modelValue","placeholder"])],void 0),_:1}),p[9]||(p[9]=r("div",{class:"fcrm-divider"},null,-1)),o(P,{"label-class":"fcrm-settings-field"},{title:c(()=>[d(_(g.$t("Include Contact Info in Personal Data export by WP")),1)]),description:c(()=>[d(_(g.$t("Compliance_Personal_Data_Desc")),1)]),default:c(()=>[o(O,{style:{width:"150px"},modelValue:z.settings.personal_data_export,"onUpdate:modelValue":p[2]||(p[2]=e=>z.settings.personal_data_export=e),placeholder:g.$t("Select an option"),class:"fcrm_el_select"},{default:c(()=>[o(T,{label:g.$t("Enable"),value:"yes"},null,8,["label"]),o(T,{label:g.$t("Disable"),value:"no"},null,8,["label"])],void 0,!0),_:1},8,["modelValue","placeholder"])],void 0),_:1}),p[10]||(p[10]=r("div",{class:"fcrm-divider"},null,-1)),o(P,{"label-class":"fcrm-settings-field"},{title:c(()=>[d(_(g.$t("Compliance_One_Click_Unsub_Label")),1)]),description:c(()=>[d(_(g.$t("Compliance_One_Click_Unsub_Desc")),1)]),default:c(()=>[o(O,{style:{width:"150px"},modelValue:z.settings.one_click_unsubscribe,"onUpdate:modelValue":p[3]||(p[3]=e=>z.settings.one_click_unsubscribe=e),placeholder:g.$t("Select an option"),class:"fcrm_el_select"},{default:c(()=>[o(T,{label:g.$t("Enable"),value:"yes"},null,8,["label"]),o(T,{label:g.$t("Disable"),value:"no"},null,8,["label"])],void 0,!0),_:1},8,["modelValue","placeholder"])],void 0),_:1}),p[11]||(p[11]=r("div",{class:"fcrm-divider"},null,-1)),o(P,{"label-class":"fcrm-settings-field"},{title:c(()=>[d(_(g.$t("Enable Gravatar Service")),Line truncated
@@ -0,0 +1 @@
import{o as e,ay as t,aF as i,aE as s}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as l,W as a,X as r,ab as o,a5 as d,a6 as n,Z as c,J as _,a9 as f,aa as m,a8 as g}from"../../../../vendor.js?ver=3.1.8";import{F as p}from"../../../../_FormBuilder.js?ver=3.1.8";import{S as u}from"../../../../SettingsHeader.js?ver=3.1.8";import{S as h}from"../../../../SaveButton.js?ver=3.1.8";import{_ as b}from"../../../../fc-bits-ui.js?ver=3.1.8";import"../../../../_OptionSelector.js?ver=3.1.8";import"../../../../input-popover-dropdown2.js?ver=3.1.8";import"../../../../CustomIcon.js?ver=3.1.8";import"../../../../data_config.js?ver=3.1.8";const v={class:"fcrm_settings fcrm_double_optin_settings_page"},S={class:"fcrm_body"},y={class:"fcrm_max_w_800"},D={class:"fcrm-optin-info-text"},F={key:0},$={class:"fcrm-widget-section"},w={class:"fcrm-widget-header"},j={class:"fcrm-widget-body"},O={key:0,class:"fcrm-widget-section"},L={class:"fcrm-widget-header"},E={class:"fcrm-widget-body"},I={class:"fcrm-widget-section"},k={class:"fcrm-widget-header"},B={class:"fcrm-widget-body"},C={class:"fcrm-widget-section"},H={class:"fcrm-widget-header"},N={class:"fcrm-widget-body"},G={key:0},T={class:"fcrm_report_card"},V={class:"fcrm_report_card_header"},W={class:"fcrm_report_card_title_group"},x={class:"fcrm_report_card_body"},P={key:0,class:"fcrm_report_card"},U={class:"fcrm_report_card_header"},A={class:"fcrm_report_card_title_group"},K={class:"fcrm_report_card_body"},J={class:"fcrm_report_card"},Q={class:"fcrm_report_card_header"},X={class:"fcrm_report_card_title_group"},Z={class:"fcrm_report_card_body"},q={class:"fcrm_report_card"},z={class:"fcrm_report_card_header"},M={class:"fcrm_report_card_title_group"},R={class:"fcrm_report_card_body"};const Y=b({name:"DoubleOptionIn",props:{listId:{type:Number,default:null},listName:{type:String,default:""},drawerKey:{type:Number,default:0}},components:{FormBuilder:p,View:e,SettingsHeader:u,SaveButton:h},watch:{drawerKey(e){this.listId&&(this.fetchSettings(),this.changeTitle(this.$t("Double Opt-in Settings")))}},data:()=>({btnFromLoading:!1,loading:!1,settings:{},settings_loaded:!1,fields:{},global_double_optin:"yes"}),methods:{getFieldsForSection(e){const t={};return e.forEach(e=>{this.fields[e]&&(t[e]=this.fields[e])}),t},previewEmail(){this.$notify.info({title:this.$t("Preview"),message:this.$t("Email preview functionality coming soon"),offset:19})},getFieldWithoutLabel(e){return this.fields[e]?{...this.fields[e],label:"",hide_label_wrapper:!0}:null},save(){const e={settings:this.settings,list_id:this.listId};this.listId&&(e.global_double_optin=this.global_double_optin),this.btnFromLoading=!0,this.$put("setting/double-optin",e).then(e=>{this.$notify.success({title:this.$t("Great!"),message:e.message,offset:19})}).catch(e=>{this.handleError(e)}).finally(()=>{this.btnFromLoading=!1,this.settings_loaded=!0})},fetchSettings(){this.loading=!0,this.settings={},this.fields={},this.$get("setting/double-optin",{with:["settings_fields"],list_id:this.listId}).then(e=>{if(this.settings=e.settings,this.fields=e.settings_fields,this.global_double_optin=e.global_double_optin?e.global_double_optin:"yes",this.listId){const e=["tag_based_redirect"];this.fields=Object.entries(this.fields).reduce((t,[i,s])=>(e.includes(i)||(t[i]=s),t),{})}}).catch(e=>{console.log(e)}).finally(()=>{this.loading=!1,this.settings_loaded=!0})}},mounted(){this.fetchSettings(),this.changeTitle(this.$t("Double Opt-in Settings"))}},[["render",function(e,p,u,h,b,Y){const ee=l("SaveButton"),te=l("SettingsHeader"),ie=i,se=s,le=l("form-builder"),ae=t;return a(),r("div",v,[o(te,{title:u.listName?e.$t("Double Opt-in Settings")+" ("+u.listName+")":e.$t("Double Opt-in Settings")},{actions:d(()=>[o(ee,{loading:b.btnFromLoading||b.loading,onSave:Y.save},null,8,["loading","onSave"])]),_:1},8,["title"]),n((a(),r("div",S,[c("div",y,[u.listId?(a(),r(_,{key:0},[o(se,{modelValue:b.global_double_optin,"onUpdate:modelValue":p[0]||(p[0]=e=>b.global_double_optin=e),class:"fcrm-optin-radio-group"},{default:d(()=>[o(ie,{value:"yes"},{default:d(()=>[f(m(e.$t("Use Global Double Opt-in Settings")),1)],void 0,!0),_:1}),o(ie,{value:"no"},{default:d(()=>[f(m(e.$t("Use List Specific Double Opt-in Settings")),1)],void 0,!0),_:1})],void 0),_:1},8,["modelValue"]),c("div",D,[c("p",null,[c("strong",null,m(e.$t("Global Double Opt-in Settings"))+":",1),f(" "+m(e.$t("DO_Global_Optin_Desc")),1)]),c("p",null,[c("strong",null,m(e.$t("List-Specific Double Opt-in Settings"))+":",1),f(" "+m(e.$t("DO_List_Specific_Desc")),1)])]),p[1]||(p[1]=c("hr",{class:"fcrm-optin-divider"},null,-1)),"no"==b.global_double_optin?(a(),r(_,{key:0},[b.settings_loaded?(a(),r("div",F,[c("div",$,[c("div",w,[c("h3",null,m(e.$t("Email Subject & Pre Header")),1)]),c("div",j,[o(le,{fields:Y.getFieldsForSection(["email_subject","email_pre_header"]),formData:b.settings},null,8,["fields","formData"])])]),b.fields.design_template?(a(),r("div",O,[c("div",L,[c("h3",null,m(b.fields.design_template.label||Line truncated
@@ -0,0 +1 @@
import{az as e,V as t,W as s,ay as l,E as i,e as a,b8 as r,aE as o,aF as n}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as d,W as c,X as m,ab as _,a5 as p,Z as f,aa as u,a9 as h,a8 as g,a6 as v,Y as b}from"../../../../vendor.js?ver=3.1.8";import{F as $,V as S,W as y}from"../../../../_FormBuilder.js?ver=3.1.8";import{O as F}from"../../../../_OptionSelector.js?ver=3.1.8";import{I as V}from"../../../../ItemCopier2.js?ver=3.1.8";import{_ as x}from"../../../../fc-bits-ui.js?ver=3.1.8";import{S as w}from"../../../../SettingsHeader.js?ver=3.1.8";import{S as E}from"../../../../SaveButton.js?ver=3.1.8";import{S as P}from"../../../../SettingsRow.js?ver=3.1.8";import"../../../../input-popover-dropdown2.js?ver=3.1.8";import"../../../../CustomIcon.js?ver=3.1.8";import"../../../../data_config.js?ver=3.1.8";const k={class:"fcrm-pref-shortcode-wrapper"},L={class:"fcrm-checkbox-content-vertical"},C={class:"fcrm-checkbox-text"},D={class:"fcrm-checkbox-label"},U={class:"fcrm-checkbox-description"},j={key:0,class:"fcrm-pref-shortcode-section"},A={class:"fcrm-shortcode-display"},I={class:"fcrm-shortcode-header"},H={class:"fcrm-shortcode-copier"},R={class:"fcrm-helper-text"},T=["href"];const N={class:"fcrm_settings fcrm_min_bg fcrm_view"},B={class:"fcrm_body"},M={class:"fcrm_max_w_800"},W={class:"fcrm_report_card"},G={class:"fcrm_report_card_header"},O={class:"fcrm_report_card_title_group"},z={class:"fcrm_report_card_body"},J={class:"fcrm-settings-fields"},Q={class:"fcrm-info-alert"},X={class:"fcrm_report_card"},Y={class:"fcrm_report_card_header"},Z={class:"fcrm_report_card_title_group"},q={class:"fcrm_report_card_body"},K={key:0,class:"fcrm-settings-fields"},ee={class:"fcrm-settings-field-full"},te={class:"fcrm-footer-info"},se=["textContent"],le=["innerHTML"],ie=["innerHTML"],ae=["textContent"],re={class:"fcrm_report_card"},oe={class:"fcrm_report_card_header"},ne={class:"fcrm_report_card_title_group"},de={class:"fcrm_report_card_body"},ce={class:"fcrm-settings-fields"},me={class:"fcrm-radio-content"},_e={class:"fcrm-radio-label"},pe={class:"fcrm-radio-sublabel"},fe={class:"fcrm-radio-content"},ue={class:"fcrm-radio-label"},he={class:"fcrm-radio-sublabel"},ge={class:"fcrm-radio-content"},ve={class:"fcrm-radio-label"},be={class:"fcrm-radio-sublabel"};const $e=x({name:"EmailSettings",components:{SettingsRow:P,InfoFilled:s,Link:t,WpEditor:y,VerifiedEmailInput:S,OptionSelector:F,PrefShortCode:x({name:"PrefShortCodeSettings",components:{ItemCopier:V,FormBuilder:$},props:["settings"],data(){return{formFields:{pref_general:{type:"checkbox-group",label:this.$t("Primary Fields that can be editable"),help:this.$t("Select the fields that user can manage"),options:[{id:"prefix",label:this.$t("Name Prefix")},{id:"first_name",label:this.$t("First Name")},{id:"last_name",label:this.$t("Last Name")},{id:"phone",label:this.$t("Phone")},{id:"date_of_birth",label:this.$t("Date of Birth")},{id:"address_fields",label:this.$t("Address Fields")}]},pref_custom:{type:"checkbox-group",label:this.$t("Custom Fields that can be editable"),help:this.$t("Select the fields that user can manage"),options:window.fcAdmin.contact_custom_fields.map(e=>({id:e.slug,label:e.label}))},show_on_page:{label:this.$t("Show Preference form on a Page?"),type:"InlineCheckbox",true_value:"yes",false_value:"no",checkbox_label:this.$t("Use Standard Page for Email Preference Form")},pref_page_id:{placeholder:"Select Preference Page",type:"ajax-selector",option_key:"post_type",sub_option_key:"page",is_multiple:!1,clearable:!0,label:this.$t("Select Preference Page"),help:this.$t("Select for which Courses this automation will run"),inline_help:this.$t("If you want to use a standard page for preference form, select the page here. If no page is selected, preference form will be shown in a default template. Please make sure you add [fluentcrm_pref] shortcode in the page content."),dependency:{depends_on:"show_on_page",operator:"=",value:"yes"}}},isShortcodeCopied:!1}},methods:{}},[["render",function(t,s,l,i,a,r){const o=e,n=d("form-builder"),v=d("item-copier");return c(),m("div",k,[_(o,{class:"fcrm-checkbox fcrm-checkbox-with-description","true-value":"yes","false-value":"no",modelValue:l.settings.pref_form,"onUpdate:modelValue":s[0]||(s[0]=e=>l.settings.pref_form=e)},{default:p(()=>[f("div",L,[f("div",C,[f("span",D,u(t.$t("Enable Preference From Shortcode")),1)]),f("p",U,u(t.$t("Pref_Form_Auth_Desc")),1)])],void 0),_:1},8,["modelValue"]),"yes"==l.settings.pref_form?(c(),m("div",j,[_(n,{formData:l.settings,fields:a.formFields},null,8,["formData","fields"]),f("div",A,[f("h4",I,u(t.$t("Preference Form Shortcode")),1),f("div",H,[_(v,{text:"[fluentcrm_pref]",showViewButton:!1})]),f("span",R,[h(u(t.$t("Preference_Form_Shortcode_Desc"))+" ",1),l.settings.pref_page_id&&"yes"===l.settings.show_on_page?(c(),m("a",{key:0,target:"_blank",rel:"noopener",href:t.appVars.site_url+"?p="+l.settings.pref_page_id},u(t.$t("View Custom Preference Page")),9,T)):g("",!0)])])])):g("",!0)])}]]Line truncated
@@ -0,0 +1 @@
import{ay as e,e as t,ax as s,aE as i,aF as a}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as l,a6 as r,W as o,X as d,Z as _,aa as n,J as c,az as m,ab as u,a8 as f,Y as g,a5 as p,a0 as h,a7 as v,ac as y,ax as b,a9 as k}from"../../../../vendor.js?ver=3.1.8";import{I as S}from"../../../../_InlineCheckbox.js?ver=3.1.8";import{O as V}from"../../../../_OptionSelector.js?ver=3.1.8";import{_ as w}from"../../../../fc-bits-ui.js?ver=3.1.8";import{S as D}from"../../../../SettingsHeader.js?ver=3.1.8";import{S as $}from"../../../../SaveButton.js?ver=3.1.8";import{P as j}from"../../../../PromoCard.js?ver=3.1.8";import{S as T}from"../../../../SettingsRow.js?ver=3.1.8";const x={class:"fcrm_tag_mappings"},U={key:0,class:"fcrm_horizontal_table"};const R={class:"fcrm_input_row"};const I=["field"],P={key:0,class:"fcrm_input_label"};const z=w({name:"global_form_builder",components:{InlineCheckbox:S,OptionSelector:V,TagAddRemoveMapping:w({name:"TagAddRemoveElement",props:["field","modelValue"],emits:["update:modelValue"],components:{OptionSelector:V},data(){return{model:this.modelValue&&"object"==typeof this.modelValue?this.modelValue:{},tags_ready:!0}},watch:{model:{handler(e){this.$emit("update:modelValue",e)},deep:!0},modelValue(e){this.model=e&&"object"==typeof e?e:{},this.ensureRoleMappings()}},methods:{ensureRoleMappings(){(this.field.selector_options||[]).forEach(e=>{this.model[e.id]&&"object"==typeof this.model[e.id]||(this.model[e.id]={}),this.model[e.id].add_tags=this.normalizeTagIds(this.model[e.id].add_tags),this.model[e.id].remove_tags=this.normalizeTagIds(this.model[e.id].remove_tags)}),this.$emit("update:modelValue",this.model)},normalizeTagIds:e=>Array.isArray(e)?e:e?[e]:[]},created(){this.ensureRoleMappings()},mounted(){}},[["render",function(t,s,i,a,g,p){const h=l("option-selector"),v=e;return r((o(),d("div",x,[g.tags_ready?(o(),d("table",U,[_("thead",null,[_("tr",null,[_("th",null,n(i.field.selector_label),1),_("th",null,n(i.field.add_tag_label),1),_("th",null,n(i.field.remove_tag_label),1)])]),_("tbody",null,[(o(!0),d(c,null,m(i.field.selector_options,e=>(o(),d("tr",{key:e.id},[_("td",null,n(e.title),1),_("td",null,[u(h,{modelValue:g.model[e.id].add_tags,"onUpdate:modelValue":t=>g.model[e.id].add_tags=t,field:{option_key:"tags",creatable:!0,is_multiple:!0}},null,8,["modelValue","onUpdate:modelValue"])]),_("td",null,[u(h,{modelValue:g.model[e.id].remove_tags,"onUpdate:modelValue":t=>g.model[e.id].remove_tags=t,field:{option_key:"tags",creatable:!0,is_multiple:!0}},null,8,["modelValue","onUpdate:modelValue"])])]))),128))])])):f("",!0)])),[[v,!g.tags_ready]])}]]),InputText:w({name:"InputText",props:["field","modelValue"],emits:["update:modelValue"],data(){return{model:this.modelValue}},watch:{model(e){this.$emit("update:modelValue",e)}}},[["render",function(e,s,i,a,l,r){const _=t;return o(),d("div",R,[u(_,{class:"fcrm_input",type:i.field.data_type,size:"large",min:i.field.min,max:i.field.max,placeholder:i.field.placeholder,modelValue:l.model,"onUpdate:modelValue":s[0]||(s[0]=e=>l.model=e)},null,8,["type","min","max","placeholder","modelValue"])])}]]),"option-selector":V},emits:["nativeSave"],props:{formData:{type:Object,required:!1,default:()=>({})},label_position:{required:!1,type:String,default:()=>"top"},fields:{required:!0,type:Object}},methods:{nativeSave(){this.$emit("nativeSave",this.formData)},compare(e,t,s){switch(t){case"=":return e===s;case"!=":return e!==s}},dependancyPass(e){if(e.dependency){const t=e.dependency.depends_on.split("/").reduce((e,t)=>e[t],this.formData);return!!this.compare(e.dependency.value,e.dependency.operator,t)}return!0}}},[["render",function(e,t,i,a,l,u){const k=s;return o(),g(k,{onSubmit:b(u.nativeSave,["prevent"]),model:i.formData,"label-position":i.label_position,class:"fcrm_form_builder_new"},{default:p(()=>[(o(!0),d(c,null,m(i.fields,(e,t)=>r((o(),d("div",{key:t,class:h(["fcrm_form_builder_item",{fcrm_form_builder_item__dependency:!!e.dependency}])},[_("div",{field:e},[e.label?(o(),d("div",P,n(e.label),1)):f("",!0),(o(),g(v(e.type),{modelValue:i.formData[t],"onUpdate:modelValue":e=>i.formData[t]=e,field:e},null,8,["modelValue","onUpdate:modelValue","field"]))],8,I)],2)),[[y,u.dependancyPass(e)]])),128))],void 0),_:1},8,["onSubmit","model","label-position"])}]]),A=""+new URL("../../../../woo_checkout_subscription.png",import.meta.url).href,E={class:"fcrm_settings fcrm_general_settings"},O={key:0,class:"fcrm_body"},C={class:"fcrm_max_w_800"},F={class:"fcrm_report_card"},B={class:"fcrm_report_card_header"},G={class:"fcrm_report_card_title_group"},M={class:"fcrm_report_card_body"},q={class:"fcrm_report_card"},H={class:"fcrm_report_card_header"},W={class:"fcrm_report_card_title_group"},L={class:"fcrm_report_card_body"},J={class:"fcrm_report_card"},Q={class:"fcrm_report_card_header"},X={class:"fcrm_report_card_title_group"},Y={class:"fcrm_report_card_body"},Z={key:0,class:"fcrm_report_card"},K={class:"fcrm_report_card_header"},N={class:"fcrm_report_card_title_grLine truncated
@@ -0,0 +1 @@
import{aq as t,ar as e,D as n,ay as s,aw as i,ax as a,k as r,av as l,E as c,e as o}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as g,W as u,X as _,J as m,ab as d,a5 as h,Y as f,a8 as y,Z as p,aa as I,a6 as v,a9 as b,a0 as $,az as k}from"../../../../vendor.js?ver=3.1.8";import{O as S}from"../../../../_OptionSelector.js?ver=3.1.8";import{S as w}from"../../../../SettingsHeader.js?ver=3.1.8";import{S as E}from"../../../../SaveButton.js?ver=3.1.8";import{_ as L,I as C}from"../../../../fc-bits-ui.js?ver=3.1.8";const D={class:"fcrm_settings fcrm_integration_settings"},T={class:"fcrm_breadcrumb"},F={class:"fcrm_breadcrumb_item fcrm_breadcrumb_active"},O={class:"fcrm_body"},q={key:0,class:"fcrm_max_w_800"},M={class:"fcrm_integration_detail_card"},P={key:0,class:"fcrm_integration_config"},A={class:"fcrm_integration_header"},R={class:"fcrm_integration_title"},V={class:"fcrm_integration_subtitle"},j={class:"fcrm_integration_content"},x={key:0,class:"fcrm_integration_alert"},N={class:"fcrm_alert_content"},B={class:"fcrm_alert_title"},z={class:"fcrm_alert_description"},G={class:"fcrm_form_label"},Q={class:"fcrm_field_hint"},W={class:"fcrm_form_label"},H={class:"fcrm_field_hint"},U={class:"fcrm_form_label"},Z={key:0,class:"fcrm_field_hint"},J={key:2},X={class:"fcrm_cli_info"},Y={target:"_blank",href:"https://fluentcrm.com/docs/wp-cli-commands/",class:"fcrm_cli_link"},K={key:3,class:"fcrm_sync_progress"},tt={class:"fcrm_sync_error_title"},et={class:"fcrm_sync_error_subtitle"},nt={class:"fcrm_sync_error_details"},st={class:"fcrm_sync_title"},it={class:"fcrm_sync_subtitle"},at={class:"fcrm_sync_count"},rt={class:"fcrm_sync_loading"},lt={class:"fcrm_body"},ct={class:"fcrm_max_w_800"},ot={class:"fcrm_integrations_container"},gt={class:"fcrm_integrations_toolbar"},ut={class:"fcrm_integrations_filters"},_t={class:"fcrm_integrations_search"},mt={class:"fcrm_integrations_list"},dt={class:"fcrm_integration_brand"},ht={class:"fcrm_brand_icon"},ft=["src","alt"],yt={key:1},pt={class:"fcrm_integration_info"},It={class:"fcrm_integration_title"},vt={class:"fcrm_integration_desc"},bt={class:"fcrm_integrations_actions"},$t={key:1,class:"fcrm_empty_state"},kt={class:"fcrm_empty_state"},St={class:"fcrm_empty_state_text"},wt={key:1,class:"fcrm_integrations_empty"},Et={class:"fcrm_empty_intro"},Lt={rel:"noopener noffollow",href:"https://fluentcrm.com?utm_source=dashboard&utm_medium=plugin&utm_campaign=pro&utm_id=wp",target:"_blank"};const Ct=L({name:"IntegrationSettings",components:{Search:n,ArrowLeft:e,ArrowRight:t,OptionSelector:S,SettingsHeader:w,SaveButton:E,Icons:C},data(){return{loading:!1,integrations:{},activeFilter:["all","commerce","lms","others"].includes(this.$route.query.cat)?this.$route.query.cat:"all",searchQuery:"",selectedIntegration:"",syncingData:!1,syncingStatus:!1,syncingPage:1,lastSyncId:0,saving:!1,switching:!1,syncingError:!1}},computed:{currentIntegration(){return!(!this.selectedIntegration||this.isEmptyValue(this.integrations))&&this.integrations[this.selectedIntegration]},filteredIntegrations(){let t=Object.entries(this.integrations);if(t=t.filter(([t,e])=>e&&e.settings),"all"!==this.activeFilter&&(t=t.filter(([t,e])=>{const n=e.type||"others";return Array.isArray(n)?n.includes(this.activeFilter):n===this.activeFilter})),this.searchQuery){const e=this.searchQuery.toLowerCase();t=t.filter(([t,n])=>n.title.toLowerCase().includes(e)||n.sub_title&&n.sub_title.toLowerCase().includes(e)||n.description&&n.description.toLowerCase().includes(e))}return Object.fromEntries(t)}},watch:{$route(t,e){"/settings/integrations"===t.path&&!t.query.selected_integration&&this.selectedIntegration?(this.selectedIntegration="",this.syncingStatus=!1,this.syncingError=!1):t.query.selected_integration&&t.query.selected_integration!==this.selectedIntegration&&(this.selectedIntegration=t.query.selected_integration,this.syncingStatus=!1,this.syncingError=!1);t.query.cat&&["all","commerce","lms","others"].includes(t.query.cat)&&t.query.cat!==this.activeFilter&&(this.activeFilter=t.query.cat)},activeFilter(t){this.$route.query.cat!==t&&this.$router.push({name:"integrations",query:{...this.$route.query,cat:t}})}},methods:{fetchIntegrations(){this.loading=!0,this.$get("setting/integrations",{with:["fields"]}).then(t=>{this.integrations=t.integrations||{},this.$route.query.selected_integration&&this.integrations[this.$route.query.selected_integration]&&(this.selectedIntegration=this.$route.query.selected_integration)}).catch(t=>{this.handleError(t)}).finally(()=>{this.loading=!1})},manageIntegration(t){this.switching=!0,this.$nextTick(()=>{this.selectedIntegration=t,this.$router.push({name:"integrations",query:{selected_integration:t}}),this.switching=!1,this.syncingError=""})},navigateToLink(t){window.open(t,"_blank")},backToList(){this.syncingData||(this.selectedIntegration="",this.syncingStatus=!1,this.syncingError=!1,this.$router.push({name:"integrations"}))},syncData(t=!1){t&&(this.syncingPage=1);const e={tags:this.currentIntegraLine truncated
@@ -0,0 +1 @@
import{ay as e,aB as s}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as i,W as c,X as t,ab as a,Z as r,a6 as n,Y as l,a8 as d,J as o,bB as _,aa as f,a9 as h,ax as m,b3 as p,a0 as v}from"../../../../vendor.js?ver=3.1.8";import{S as y}from"../../../../SettingsHeader.js?ver=3.1.8";import{_ as g}from"../../../../fc-bits-ui.js?ver=3.1.8";const u={key:0,class:"fcrm_settings fcrm_license_management"},w={class:"fcrm_body"},C={class:"fcrm_report_card"},k={class:"fcrm_report_card_body"},x={key:0,class:"fcrm_license_card fcrm_license_expired"},b={class:"fcrm_license_card--header"},L={class:"fcrm_license_card--header-title"},$={class:"fcrm_license_card--header-subtitle"},M={key:0,class:"fcrm_license_form"},H={class:"fcrm_license_header"},V={class:"fcrm_license_main_title"},D={class:"fcrm_license_input_wrapper"},K={class:"fcrm_license_input_container"},S={class:"fcrm_license_input_field"},E=["placeholder"],N={key:1,class:"fcrm_license_card--body"},U={class:"fcrm_license_card--body-item"},Z={class:"fcrm_license_card--body-item-label"},T={class:"fcrm_license_card--body-item-value"},j={class:"fcrm_license_card--body-item"},B={class:"fcrm_license_card--body-item-label"},I={class:"fcrm_license_card--body-item-value"},O={key:1,class:"fcrm_license_card fcrm_license_valid"},A={class:"fcrm_license_card--header"},G={class:"fcrm_license_card--header-title"},z={class:"fcrm_license_card--header-subtitle"},P={class:"fcrm_license_card--body"},Y={class:"fcrm_license_card--body-item"},F={class:"fcrm_license_card--body-item-label"},R={class:"fcrm_license_card--body-item-value"},W={class:"fcrm_license_card--body-item"},J={class:"fcrm_license_card--body-item-label"},Q={class:"fcrm_license_card--body-item-value"},X={key:0,class:"fcrm_license_default"},q={class:"fcrm_license_header"},ee={class:"fcrm_license_main_title"},se={class:"fcrm_license_main_description"},ie={class:"fcrm_license_form"},ce={class:"fcrm_license_input_wrapper"},te={class:"fcrm_license_input_container"},ae={class:"fcrm_license_input_field"},re=["placeholder"],ne={class:"fcrm_license_purchase_text"},le=["href"],de={key:3,class:"fcrm_license_error"},oe=["textContent"];const _e=g({name:"LicenseManagement",components:{SettingsHeader:y},data:()=>({fetching:!0,verifying:!1,licenseData:{},licenseKey:"",showNewLicenseInput:!1,errorMessage:""}),methods:{sanitizeErrorMessage(e){if(!e)return"";const s=String(e).replace(/<br\s*\/?>/gi,"\n").replace(/<\/p>\s*<p>/gi,"\n\n").replace(/<\/li>\s*<li>/gi,"\n");if("undefined"==typeof document)return s.replace(/<[^>]*>/g,"").trim();const i=document.createElement("div");return i.innerHTML=s,(i.textContent||i.innerText||"").trim()},nsHumanDiffTime(e){try{const s="undefined"!=typeof dayjs?dayjs(e):null;if(s&&s.isValid&&s.isValid())return s.fromNow()}catch(s){}return e||""},getSettings(){this.errorMessage="",this.fetching=!0,this.$get("campaign-pro-settings/license",{verify:!0}).then(e=>{this.licenseData=e}).catch(e=>{this.handleError(e)}).finally(()=>{this.fetching=!1})},verifyLicense(){if(!this.licenseKey)return this.$notify.error(this.$t("Please provide a license key")),void(this.errorMessage=this.sanitizeErrorMessage(this.$t("Please provide a license key")));this.verifying=!0,this.errorMessage="",this.$post("campaign-pro-settings/license",{license_key:this.licenseKey}).then(e=>{this.licenseData=e.license_data,this.$notify.success(e.message)}).catch(e=>{let s="";s="string"==typeof e?e:e&&e.message?e.message:this.convertToText(e),s||(s=this.$t("Something is wrong!")),this.errorMessage=this.sanitizeErrorMessage(s),this.handleError(e)}).finally(()=>{this.verifying=!1})},deactivateLicense(){this.verifying=!0,this.$del("campaign-pro-settings/license").then(e=>{this.licenseData=e.license_data,this.$notify.success(e.message)}).catch(e=>{this.handleError(e)}).finally(()=>{this.verifying=!1})},handleError(e){console.error("License management error:",e)}},mounted(){this.has_campaign_pro&&this.getSettings(),this.changeTitle&&this.changeTitle(this.$t("License Management"))}},[["render",function(y,g,_e,fe,he,me){const pe=i("SettingsHeader"),ve=s,ye=e;return y.has_campaign_pro?(c(),t("div",u,[a(pe,{title:y.$t("License Management")},null,8,["title"]),r("div",w,[n((c(),t("div",C,[r("div",k,[he.fetching?(c(),l(ve,{key:0,rows:4,animated:""})):d("",!0),he.fetching||he.showNewLicenseInput?d("",!0):(c(),t(o,{key:1},["expired"===he.licenseData.status?(c(),t("div",x,[r("div",b,[g[6]||(g[6]=_('<div class="fcrm_license_card--header-icon"><svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg"><mask id="mask0_8709_66240" style="mask-type:alpha;" maskUnits="userSpaceOnUse" x="0" y="0" width="64" height="64"><rect width="64" height="64" fill="url(#paint0_linear_8709_66240)"></rect></mask><g mask="url(#mask0_8709_66240)"><circle cx="32" cy="32" r="31.3333" fill="var(--fc-error-bg)" stroke="var(--fc-error-bg)" stroke-width="1.33333"></circle></g><rect x="10.666" y="10.6666" width="42.6667" height="42.6667" rx="21.3333"Line truncated
@@ -0,0 +1 @@
import{a6 as e,a2 as a,aB as s,aH as i,aI as t,aO as n,j as r,k as o,h as l,i as d,E as m,e as c,ax as h,aw as g,az as p,aG as u,aT as _}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as f,W as v,X as w,ab as b,Z as y,Y as k,a5 as $,aa as C,J as S,az as U,a8 as M,a9 as R,b2 as E,a6 as P,ac as x}from"../../../../vendor.js?ver=3.1.8";import{P as D}from"../../../../PaginationBar.js?ver=3.1.8";import{D as V}from"../../../../DataTable.js?ver=3.1.8";import{_ as T,I as j}from"../../../../fc-bits-ui.js?ver=3.1.8";import{S as A}from"../../../../SettingsHeader.js?ver=3.1.8";import{S as L}from"../../../../SettingsRow.js?ver=3.1.8";import{P as B}from"../../../../PromoCard.js?ver=3.1.8";const F=""+new URL("../../../../crm_managers.png",import.meta.url).href,I={class:"fcrm_settings fcrm_managers_settings"},z={class:"fcrm_body"},N={class:"icon"},O={class:"fcrm_action_buttons"},W={class:"icon"},H={class:"fcrm_empty_state"},J={class:"fcrm_empty_state_text"},K={class:"fcrm_manager_name"},q={class:"fcrm_manager_email"},G={class:"d-flex gap-4 flex-wrap"},Q={class:"d-flex gap-4 items-start flex-wrap"},X={class:"fcrm_badge"},Y={class:"fcrm_action_dropdown_cell"},Z={key:1,class:"fcrm_max_w_800"},ee={class:"fcrm_report_card"},ae={class:"fcrm_report_card_body"},se=["alt"],ie={class:"fcrm_board_member_add"},te={key:1,class:"fcrm-user-search-list-group"},ne=["onClick"],re={key:0},oe={key:2,class:"fcrm-user-not-found"},le={class:"fcrm_select_all_wrapper"},de={class:"fcrm_permission_group_title"},me={class:"fcrm_drawer_footer_actions"};const ce=T({name:"Managers",components:{PromoCard:B,SettingsRow:L,Icons:j,DataTable:V,EditPen:a,Delete:e,PaginationBar:D,SettingsHeader:A},data:()=>({managers:[],pagination:{total:0,current_page:1,per_page:10},loading:!1,permissions:{},editing_manager:{},check_all:!1,show_modal:!1,direction:"rtl",saving:!1,showSearchResults:!1,wordpressUser:[],wpUsersLoading:!1,search:"",searchDebounceTimer:null}),computed:{filteredManagers(){if(!this.search)return this.managers;const e=this.search.toLowerCase();return this.managers.filter(a=>{const s=`${a.first_name} ${a.last_name}`.toLowerCase(),i=(a.email||"").toLowerCase();return s.includes(e)||i.includes(e)})},group_permissions(){const e={};return this.each(this.permissions,(a,s)=>{e[a.group]||(e[a.group]={title:a.group,permissions:{}}),e[a.group].permissions[s]=a}),e}},watch:{"editing_manager.email"(e,a){e.length>2?this.editing_manager.id||(this.showSearchResults=!0,this.getWordpressUser(e)):(this.wordpressUser=[],this.showSearchResults=!1,this.wpUsersLoading=!1)},"editing_manager.permissions"(e){e.length===Object.keys(this.permissions).length?this.check_all=!0:this.check_all=!1}},methods:{debouncedSearch(){this.searchDebounceTimer&&clearTimeout(this.searchDebounceTimer),this.searchDebounceTimer=setTimeout(()=>{this.pagination.current_page=1},300)},onFocusSearch(){this.editing_manager.email.length>2&&(this.showSearchResults=!0,this.getWordpressUser(this.editing_manager.email))},onBlurSearch(e){"results"!=e&&setTimeout(()=>{this.showSearchResults=!1},200)},onClickEachResults(e){this.editing_manager.email=e.user_email},getWordpressUser(e){this.editing_manager.email.length<4&&(this.wpUsersLoading=!0),this.$get("reports/ajax-options",{option_key:"users",search:e}).then(e=>{this.wordpressUser=e.options}).catch(e=>{this.handleError(e)}).finally(()=>{this.wpUsersLoading=!1})},handleAllPermission(){if(this.check_all){const e=[];this.each(this.permissions,(a,s)=>{e.push(s)}),this.editing_manager.permissions=e}else this.editing_manager.permissions=[]},handleChangePermission(e,a){if(this.editing_manager.permissions.includes(a))e.depends.forEach(e=>{this.editing_manager.permissions.includes(e)||this.editing_manager.permissions.push(e)});else{Object.keys(this.permissions).forEach(e=>{this.permissions[e].depends.includes(a)&&(this.editing_manager.permissions=this.editing_manager.permissions.filter(a=>a!=e))})}},fetch(){this.loading=!0,this.storage.set("managers_perpage",this.pagination.per_page),this.$get("campaign-pro-settings/managers",{per_page:this.pagination.per_page,page:this.pagination.current_page}).then(e=>{this.permissions=e.permissions,this.managers=e.managers.data,this.pagination.total=e.managers.total}).catch(e=>{this.handleError(e)}).finally(()=>{this.loading=!1})},readable(e){return this.permissions[e]?this.permissions[e].title:e},ucFirst:e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",handleCommand(e,a){switch(e){case"edit":this.initEdit(a);break;case"delete":this.confirmDelete(a)}},confirmDelete(e){this.$confirm(this.$t("Are you sure you want to delete this manager?"),this.$t("Warning"),{confirmButtonText:this.$t("Delete"),cancelButtonText:this.$t("Cancel"),type:"warning"}).then(()=>{this.removeManager(e)}).catch(()=>{})},addManager(){this.editing_manager={email:"",permissions:[]},this.show_modal=!0,this.check_all=!1},removeManager(e){this.$del(`campaign-pro-settings/managers/${e.id}`).then(e=>{this.$notify.success(e.message),this.fetch()}).catch(e=>Line truncated
@@ -0,0 +1 @@
import{ay as e,aP as t,k as a,e as s,b0 as l,a$ as i,az as n}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as o,W as r,X as d,ab as c,a5 as p,aa as u,a6 as h,Z as m,Y as _,J as v,a9 as b,a8 as g}from"../../../../vendor.js?ver=3.1.8";import{S as f}from"../../../../SettingsHeader.js?ver=3.1.8";import{S as y}from"../../../../SettingsRow.js?ver=3.1.8";import{I as C}from"../../../../ItemCopier.js?ver=3.1.8";import{B as k}from"../../../../BaseCard.js?ver=3.1.8";import{_ as $}from"../../../../fc-bits-ui.js?ver=3.1.8";const w={class:"fcrm_settings"},x={key:0,class:"fcrm_badge"},P={key:1,class:"fcrm_badge fcrm_badge_success"},A={key:2,class:"fcrm_badge fcrm_badge_pending"},S={key:3,class:"fcrm_badge fcrm_badge_pending"},M={class:"fcrm_body"},E={class:"fcrm_max_w_800"},F={class:"fcrm_setting_switch"},I={class:"fcrm_switch"},H={class:"fcrm_switch_label"},R={key:0,class:"fcrm-mcp-status-block"},V={class:"fcrm-mcp-links"},D=["href"],U={key:1},L={key:0},O={key:1},T=["href"],j={key:2},z={key:3},W=["href"],B={key:2},G={class:"fcrm_badge fcrm_badge_success"},q={class:"fcrm_mt_0"},J=["href"],N={class:"fcrm-mcp-creds"},Z={key:0,class:"fcrm-mcp-localdev"},Q={class:"fcrm-mcp-creds-hint"},X={key:1},Y={class:"fcrm_help_text fcrm_mt_0"},K={class:"fcrm-mcp-snippet"},ee={key:0,class:"fcrm-mcp-creds-hint"},te={class:"fcrm_secondary_text fcrm_mt_0 fcrm_mb_0"},ae={href:"https://docs.fluentcrm.com/mcp-for-ai-agents",target:"_blank",rel:"noopener noreferrer"};const se=$({name:"_McpSettings",components:{BaseCard:k,ItemCopier:C,SettingsHeader:f,SettingsRow:y},data:()=>({loading:!1,installing:!1,status:{adapter_installed:!1,adapter_active:!1,adapter_provider:"",standalone_adapter_installed:!1,toolkit_installed:!1,toolkit_active:!1,toolkit_adapter_available:!1,adapter_version:null,toolkit_version:null,abilities_api_loaded:!1,endpoint_url:"",tools_count:0,mcp_enabled:!0,pro_active:!1,app_passwords_url:"",plugins_url:"",can_auto_install_adapter:!1,toolkit_download_url:"",current_user_login:"",is_local_dev:!1},mcpEnabled:"yes",activeClient:"claude-code",snippetCache:{},username:"",appPassword:"",localDevOverride:!1,localDevInitialized:!1}),computed:{isEnabled(){return"yes"===this.mcpEnabled},proHint(){return this.status.pro_active?this.$t("Includes 4 FluentCampaign Pro tools."):this.$t("FluentCampaign Pro adds 4 more tools (sequences and dynamic segments).")},adapterSourceLabel(){return"toolkit"===this.status.adapter_provider?this.status.toolkit_version?this.$t("FluentHub %s",this.status.toolkit_version):this.$t("FluentHub"):this.status.adapter_version?this.$t("WordPress MCP Adapter %s",this.status.adapter_version):this.$t("detected")},toolkitActionLabel(){return this.status.toolkit_active&&!this.status.toolkit_adapter_available?this.$t("Update FluentHub"):this.$t("Activate FluentHub")},activeSnippet(){return this.snippetCache[this.activeClient]||null},adminPluginsUrl(){return this.status.plugins_url},appPasswordsUrl(){return this.status.app_passwords_url},credentialsReady(){return!(!this.username||!this.appPassword.trim())},basicAuthValue(){if(!this.credentialsReady)return"";try{return btoa(this.username+":"+this.appPassword)}catch(e){return""}},renderedSnippet(){if(!this.activeSnippet)return"";const e=this.activeSnippet.snippet||"";return this.credentialsReady?e.replace(/<base64\([^)]+\)>/g,this.basicAuthValue).replace(/<your-username>/g,this.username).replace(/<your-application-password>/g,this.appPassword):e}},methods:{loadStatus(){return this.loading=!0,this.$get("mcp/status").then(e=>{this.status={...this.status,...e},this.mcpEnabled=e.mcp_enabled?"yes":"no",e.current_user_login&&!this.username&&(this.username=e.current_user_login),this.localDevInitialized||(this.localDevOverride=!!e.is_local_dev,this.localDevInitialized=!0)}).catch(e=>this.$handleError(e)).finally(()=>{this.loading=!1})},installAdapter(){this.installing=!0,this.$post("mcp/install-adapter").then(e=>{this.$notify.success(e.message),this.loadStatus()}).catch(e=>this.$handleError(e)).finally(()=>{this.installing=!1})},toggleMcp(e){this.$post("mcp/toggle",{mcp_enabled:e}).then(e=>{this.$notify.success(e.message),this.status.mcp_enabled=!!e.mcp_enabled}).catch(t=>{this.mcpEnabled="yes"===e?"no":"yes",this.$handleError(t)})},loadSnippet(e){if(this.snippetCache[e])return Promise.resolve(this.snippetCache[e]);const t={client:e};return"claude-desktop"===e&&(t.local_dev=this.localDevOverride?"yes":"no"),this.$get("mcp/config-snippet",t).then(t=>(this.snippetCache[e]=t,t)).catch(e=>this.$handleError(e))},onTabChange(e){this.activeClient=e,this.loadSnippet(e)},onLocalDevToggle(){delete this.snippetCache["claude-desktop"],"claude-desktop"===this.activeClient&&this.loadSnippet("claude-desktop")},copy(e){if(!e)return;const t=()=>{const t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t),this.$notify.success(this.$t("Copied to clipboard"))};try{navigator.clipboard.writeText(e).theLine truncated
@@ -0,0 +1 @@
import{ay as e,aP as s,aK as t,aL as r,e as i,az as o}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as l,W as a,X as n,ab as d,a5 as c,Y as v,a8 as p,Z as m,a6 as _,aa as u,J as h,az as g,a9 as f}from"../../../../vendor.js?ver=3.1.8";import{_ as S,I as b}from"../../../../fc-bits-ui.js?ver=3.1.8";import{S as y}from"../../../../SettingsHeader.js?ver=3.1.8";import{S as w}from"../../../../SaveButton.js?ver=3.1.8";import{I as k}from"../../../../ItemCopier2.js?ver=3.1.8";import{P as $}from"../../../../PromoCard.js?ver=3.1.8";import{S as P}from"../../../../SettingsRow.js?ver=3.1.8";const M=""+new URL("../../../../sms_settings.png",import.meta.url).href,V={class:"fcrm_settings"},j={key:0,class:"fcrm_body"},U={class:"fcrm_max_w_800"},C={class:"fcrm_report_card"},L={class:"fcrm_report_card_body"},x={class:"fcrm_settings_row"},I={class:"fcrm_toggle_controls"},A=["alt"],F={class:"fcrm_content_label"},R={key:1,class:"fcrm_body"},T={class:"fcrm_max_w_800"},E={class:"fcrm_report_card"},z={class:"fcrm_report_card_body"},B={class:"fcrm_setting_switch"},H={class:"fcrm_switch"},q={class:"fcrm_switch_label"},O={class:"fcrm_report_card"},W={class:"fcrm_report_card_header"},D={class:"fcrm_report_card_title_group"},G={class:"fcrm_report_card_body"},J={key:0,class:"fcrm_report_card"},K={class:"fcrm_report_card_header"},Q={class:"fcrm_report_card_title_group"},X={class:"fcrm_report_card_body"},Y={class:"fcrm-settings-fields"},Z={key:1,class:"fcrm_report_card"},N={class:"fcrm_report_card_header"},ee={class:"fcrm_report_card_title_group"},se={class:"fcrm_report_card_body"},te={class:"fcrm-settings-fields"};const re=S({name:"_SMSSettings",components:{SettingsRow:P,PromoCard:$,Icons:b,SettingsHeader:y,SaveButton:w,ItemCopier:k},data:()=>({btnFromLoading:!1,loading:!1,settings:{},settings_loaded:!1,isAvailable:!1,sms_providers:{},provider_options:{},webhooksToShow:[]}),computed:{currentProvider(){var e;const s=null==(e=this.settings)?void 0:e.sms_provider;return s&&this.provider_options&&this.provider_options[s]?this.provider_options[s]:null},currentProviderLabel(){var e;return(null==(e=this.currentProvider)?void 0:e.label)||this.$t("SMS Provider")},currentProviderFields(){var e;return(null==(e=this.currentProvider)?void 0:e.fields)||{}}},methods:{validateSettings(){var e,s,t,r;if("yes"!==(null==(e=this.settings)?void 0:e.enabled))return!0;const i=null==(s=this.settings)?void 0:s.sms_provider;if(!i)return this.$notify.error(this.$t("Please select an SMS provider.")),!1;const o=null==(t=this.provider_options)?void 0:t[i],l=(null==o?void 0:o.fields)||{};if(!Object.keys(l).length)return this.$notify.error(this.$t("Provider configuration not found.")),!1;const a=(null==(r=this.settings)?void 0:r[i])||{},n=[];for(const[d,c]of Object.entries(l)){if(!(null==c?void 0:c.required))continue;const e=a[d];(null==e||"string"==typeof e&&""===e.trim()||Array.isArray(e)&&0===e.length)&&n.push(c.label||d)}return!n.length||(this.$notify.error(this.$t("Please fill the required fields: ")+n.join(", ")),!1)},save(){this.validateSettings()&&(this.btnFromLoading=!0,this.loading=!0,this.$post("campaign-pro-settings/sms",{settings:this.settings}).then(e=>{this.$notify.success(e.message),e.reload?location.reload():this.webhooksToShow=e.sms_webhook?[e.sms_webhook]:[]}).catch(e=>{this.$handleError(e)}).finally(()=>{this.btnFromLoading=!1,this.loading=!1}))},fetchSettings(){this.loading=!0,this.$get("campaign-pro-settings/sms").then(e=>{this.settings=e.settings,this.sms_providers=e.options.sms_providers,this.provider_options=e.options.providers,this.webhooksToShow=e.sms_webhook?[e.sms_webhook]:[]}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})}},mounted(){this.has_campaign_pro&&this.fetchSettings(),this.isAvailable=this.has_campaign_pro,this.changeTitle(this.$t("SMS Settings"))}},[["render",function(S,b,y,w,k,$){const P=l("SaveButton"),re=l("SettingsHeader"),ie=l("PromoCard"),oe=s,le=r,ae=t,ne=l("SettingsRow"),de=i,ce=o,ve=l("ItemCopier"),pe=e;return a(),n("div",V,[d(re,{title:S.$t("SMS Settings")},{actions:c(()=>[k.isAvailable?(a(),v(P,{key:0,loading:k.loading,onSave:$.save},null,8,["loading","onSave"])):p("",!0)]),_:1},8,["title"]),k.isAvailable?(a(),n("div",R,[m("div",T,[_((a(),n("div",E,[m("div",z,[m("div",B,[m("div",H,[d(oe,{modelValue:k.settings.enabled,"onUpdate:modelValue":b[0]||(b[0]=e=>k.settings.enabled=e),"active-value":"yes","inactive-value":"no"},null,8,["modelValue"])]),m("div",q,[m("p",null,u(S.$t("Enable SMS Module")),1),m("span",null,u(S.$t("Enable SMS Module description")),1)])])])])),[[pe,k.loading]]),"yes"==k.settings.enabled?(a(),n(h,{key:0},[_((a(),n("div",O,[m("div",W,[m("div",D,[m("h4",null,u(S.$t("SMS Provider")),1)])]),m("div",G,[d(ne,null,{title:c(()=>[f(u(S.$t("Choose your SMS provider")),1)]),description:c(()=>[f(u(S.$t("SMS_Settings_Provider_Desc")),1)]),field:c(()=>[d(ae,{modelValue:k.settings.sms_provider,"onUpdate:modelValue":b[1]||(b[1]=e=>k.settings.sms_provider=e),size:"large",placeholder:S.$t("SLine truncated
@@ -0,0 +1 @@
import{aj as t,aC as e,aB as i,k as s,E as r,aL as l,aK as a}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as n,W as c,X as o,ab as _,Z as d,a5 as f,J as m,aa as u,a9 as p,az as v,bB as h,a8 as g,Y as b}from"../../../../vendor.js?ver=3.1.8";import{I as y}from"../../../../ItemCopier2.js?ver=3.1.8";import{S}from"../../../../SettingsHeader.js?ver=3.1.8";import{_ as k}from"../../../../fc-bits-ui.js?ver=3.1.8";const P=""+new URL("../../../../smtpemail.png",import.meta.url).href,w={class:"fcrm_smtp_email_setup fcrm_settings fcrm_min_bg fcrm_view"},$={class:"fcrm_body"},x={class:"fcrm_max_w_800"},C={key:0,class:"fcrm_report_card fcrm_skeleton_card"},M={class:"fcrm_report_card_header"},T={class:"fcrm_report_card_body"},E={key:0,class:"fcrm_report_card"},j={class:"fcrm_card_content fcrm_report_card_body"},F={class:"fcrm_illustration_section"},B=["alt"],I={class:"fcrm_plugin_section"},V={class:"fcrm_badge fcrm_badge_success"},A={class:"fcrm_plugin_description"},L={class:"fcrm_text_content"},H={class:"fcrm_plugin_title"},R={class:"fcrm_plugin_subtitle"},D={href:"https://fluentsmtp.com/",class:"fcrm_learn_more_link",target:"_blank"},z={class:"fcrm_install_section"},U={key:0,class:"icon"},W={key:1,class:"icon"},G={class:"fcrm_report_card_body"},J={class:"fcrm_bottom_section"},Y={class:"fcrm_bottom_left"},q={class:"fcrm_bottom_title"},K={class:"fcrm_providers_list"},N={class:"fcrm_check_icon"},O={class:"fcrm_provider_text"},Q={class:"fcrm_bottom_right"},X={class:"fcrm_bottom_title"},Z={class:"fcrm_features_list"},tt={class:"fcrm_check_icon"},et={class:"fcrm_feature_text"},it={key:1,class:"fcrm_report_card fcrm_just_installed_card"},st={class:"fcrm_report_card_body"},rt={class:"fcrm_just_installed_title"},lt={class:"fcrm_just_installed_subtitle"},at={class:"fcrm_just_installed_actions"},nt=["href"],ct={key:2,class:"fcrm_report_card"},ot={class:"fcrm_report_card_header"},_t={class:"fcrm_report_card_title_group"},dt={class:"fcrm_report_card_body"},ft={class:"fcrm_verified_senders_section"},mt={class:"fcrm_verified_title"},ut={class:"fcrm_verified_list"},pt={class:"fcrm_verified_email"},vt={class:"fcrm_configured_actions"},ht={key:3,class:"fcrm_report_card"},gt={class:"fcrm_report_card_body fcrm_unconfigured_content"},bt={class:"fcrm_unconfigured_section"},yt={class:"fcrm_unconfigured_title"},St={class:"fcrm_unconfigured_subtitle"},kt=["href"],Pt={class:"fcrm_report_card"},wt={class:"fcrm_report_card_header"},$t={class:"fcrm_report_card_title_group"},xt={class:"fcrm_report_card_body"},Ct={class:"fcrm_bounce_form"},Mt={class:"fcrm_form_group"},Tt={class:"fcrm_form_label"},Et={class:"fcrm_dropdown_container"},jt={key:0,class:"fcrm_bounce_handler_section"},Ft={class:"fcrm_handler_info"},Bt={class:"fcrm_handler_title"},It={class:"fcrm_handler_description"},Vt=["href"],At={class:"fcrm_form_group fcrm_url_input_group"},Lt={class:"fcrm_url_input_container"},Ht=["value"],Rt={class:"fcrm_hint_text"};const Dt=k({name:"SmtpEmailSetup",components:{Check:t,ItemCopier:y,SettingsHeader:S},data:()=>({loading:!1,fetching:!0,bounce_settings:{ses:{}},active_provider_key:"ses",installing:!1,fluentsmtp_info:!1,fluentsmtp_just_installed:!1,fluentsmtp_config_url:"#",switching:!1,apiAndSmtpConnections:["Amazon SES","Mailgun","SendGrid","SendInBlue","PepiPost","SparkPost","+ Any SMTP Provider"],featuresPlugins:["Optimized API connection with Mail Service Providers","Email Logging for better visibility","Email Routing based on the sender email address","Real-Time Email Delivery","Resend Any Emails","In Details Reporting","Super fast UI powered by VueJS"]}),computed:{activeProvider(){return this.bounce_settings[this.active_provider_key]}},methods:{getBounceSettings(){this.fetching=!0,this.$get("setting/bounce_configs").then(t=>{this.bounce_settings=t.bounce_settings,t.fluentsmtp_info&&(this.fluentsmtp_info=t.fluentsmtp_info)}).catch(t=>{this.handleError(t)}).finally(()=>{this.fetching=!1})},installFluentSMTP(){this.installing=!0,this.$post("setting/install-fluentsmtp").then(t=>{t.is_installed?(this.$notify.success(t.message),this.appVars.has_fluentsmtp=!0,this.appVars.disable_fluentmail_suggest=!0,this.fluentsmtp_just_installed=!0,this.fluentsmtp_config_url=t.config_url,this.getBounceSettings()):this.$notify.error(this.$t("Plugin_Not_Installed_Alert"))}).catch(t=>{this.handleError(t)}).finally(()=>{this.installing=!1})},switchingProvider(){this.switching=!0,setTimeout(()=>{this.switching=!1},300)},copyToClipboard(){}},mounted(){this.getBounceSettings(),this.changeTitle(this.$t("SMTP Email Setup"))}},[["render",function(t,y,S,k,Dt,zt){const Ut=n("SettingsHeader"),Wt=e,Gt=i,Jt=s,Yt=n("Check"),qt=r,Kt=l,Nt=a,Ot=n("ItemCopier");return c(),o("div",w,[_(Ut,{title:t.$t("Email Service")},null,8,["title"]),d("div",$,[d("div",x,[Dt.fetching?(c(),o("div",C,[d("div",M,[_(Gt,{animated:!0},{template:f(()=>[_(Wt,{variant:"text",style:{width:"220px",height:"22px"}})]),_:1})]),d("div",T,[_(Gt,{animated:!0,style:{padding:"16px 0"}},{template:f(()=>[_(WtLine truncated
@@ -0,0 +1 @@
import{at as e,k as a,aB as t,aH as s,aI as o,j as n,E as l,h as i,i as r,e as d}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as p,W as c,X as g,ab as m,a5 as h,a9 as f,aa as u,Z as _,Y as y,a8 as b,J as v,az as w,b2 as x}from"../../../../vendor.js?ver=3.1.8";import{P as $}from"../../../../PaginationBar.js?ver=3.1.8";import{D}from"../../../../DataTable.js?ver=3.1.8";import{S as k}from"../../../../SettingsHeader.js?ver=3.1.8";import{_ as E,I as C}from"../../../../fc-bits-ui.js?ver=3.1.8";const L={class:"fcrm_system_logs fcrm_settings fcrm_view"},T={class:"fcrm_body"},S={class:"icon"},j={key:0,class:"icon"},A={class:"icon"},H={key:0,class:"d-flex flex-column gap-1"},I={class:"text-secondary"},z={class:"text-secondary"},P=["innerHTML"];const U=E({name:"SystemLogs",components:{ArrowDown:e,Icons:C,PaginationBar:$,DataTable:D,SettingsHeader:k},data:()=>({logs:[],pagination:{total:0,current_page:1,per_page:20},loading:!1,search:""}),computed:{exportOptions(){return[{range:"7",label:this.$t("Export Last 7 Days")},{range:"15",label:this.$t("Export Last 15 Days")},{range:"30",label:this.$t("Export Last 30 Days")},{range:"all",label:this.$t("Export All")}]}},methods:{fetch(){this.loading=!0,this.storage.set("system_logs_perpage",this.pagination.per_page),this.$get("setting/system-logs",{per_page:this.pagination.per_page,page:this.pagination.current_page,search:this.search}).then(e=>{this.logs=e.logs.data,this.pagination.total=e.logs.total}).catch(e=>{this.handleError(e)}).finally(()=>{this.loading=!1})},exportLogs(e){const a=document.createElement("a");a.href=this.getExportUrl(e),a.target="_blank",a.rel="noopener noreferrer",a.style.display="none",document.body.appendChild(a),a.click(),document.body.removeChild(a)},getExportUrl(e){const a=`${window.fcAdmin.rest.url}/setting/system-logs/export`,t=new URLSearchParams;return t.append("_wpnonce",window.fcAdmin.rest.nonce),t.append("range",e||"all"),t.append("query_timestamp",Date.now()),this.search&&t.append("search",this.search),a+(-1===a.indexOf("?")?"?":"&")+t.toString()},deleteAll(){this.loading=!0,this.$del("setting/system-logs/reset").then(e=>{this.$notify.success(e.message),this.logs=[],this.pagination.total=0}).catch(e=>{this.handleError(e)}).finally(()=>{this.loading=!1})},formatDate:e=>e?e.split(" ")[0]:"",formatTime:e=>e&&e.split(" ")[1]||""},mounted(){this.pagination.per_page=parseInt(this.storage.get("system_logs_perpage",20),10)||20,this.fetch()}},[["render",function(e,$,D,k,E,C){const U=a,B=p("SettingsHeader"),F=p("Icons"),O=d,R=p("ArrowDown"),V=l,K=r,M=i,q=n,J=t,N=o,Q=s,W=p("pagination-bar"),X=p("data-table");return c(),g("div",L,[m(B,{title:e.$t("System Logs")},{actions:h(()=>[m(U,{type:"danger",size:"small",onClick:C.deleteAll},{default:h(()=>[f(u(e.$t("Reset")),1)],void 0,!0),_:1},8,["onClick"])]),_:1},8,["title"]),_("div",T,[m(X,{"has-selection":!1},{"header-left":h(()=>[m(O,{modelValue:E.search,"onUpdate:modelValue":$[0]||($[0]=e=>E.search=e),onClear:C.fetch,onKeyup:x(C.fetch,["enter"]),placeholder:e.$t("Type & enter"),clearable:""},{prefix:h(()=>[_("span",S,[m(F,{"icon-name":"search"})])]),_:1},8,["modelValue","onClear","onKeyup","placeholder"])]),"header-actions":h(()=>[m(U,{size:"small",loading:E.loading,onClick:C.fetch},{default:h(()=>[E.loading?b("",!0):(c(),g("span",j,[m(F,{"icon-name":"reload"})])),f(" "+u(e.$t("Refresh")),1)],void 0,!0),_:1},8,["loading","onClick"]),m(q,{size:"small",trigger:"click",onCommand:C.exportLogs},{dropdown:h(()=>[m(M,null,{default:h(()=>[(c(!0),g(v,null,w(C.exportOptions,e=>(c(),y(K,{key:e.range,command:e.range},{default:h(()=>[f(u(e.label),1)],void 0,!0),_:2},1032,["command"]))),128))],void 0,!0),_:1})]),default:h(()=>[m(U,{size:"small"},{default:h(()=>[_("span",A,[m(F,{"icon-name":"export"})]),f(" "+u(e.$t("Export"))+" ",1),m(V,{class:"el-icon--right"},{default:h(()=>[m(R)],void 0,!0),_:1})],void 0,!0),_:1})],void 0,!0),_:1},8,["onCommand"])]),table:h(()=>[E.loading?(c(),y(J,{key:0,style:{padding:"20px"},rows:8})):(c(),y(Q,{key:1,"empty-text":e.$t("No Data Found"),data:E.logs},{default:h(()=>[m(N,{label:e.$t("ID"),prop:"id",width:"120"},null,8,["label"]),m(N,{label:e.$t("Date & Time"),"min-width":"150",property:"created_at"},{default:h(e=>[e.row.created_at?(c(),g("div",H,[_("div",I,u(C.formatDate(e.row.created_at)),1),_("small",z,u(C.formatTime(e.row.created_at)),1)])):b("",!0)]),_:1},8,["label"]),m(N,{label:e.$t("Title"),"min-width":"300"},{default:h(e=>[f(u(e.row.title),1)]),_:1},8,["label"]),m(N,{label:e.$t("Description"),"min-width":"390"},{default:h(e=>[_("div",{innerHTML:e.row.description},null,8,P)]),_:1},8,["label"])],void 0,!0),_:1},8,["empty-text","data"]))]),pagination:h(()=>[E.loading?b("",!0):(c(),y(W,{key:0,pagination:E.pagination,onFetch:C.fetch},null,8,["pagination","onFetch"]))]),_:1})])])}]]);export{U as default};
@@ -0,0 +1 @@
import{at as e,ao as t,L as i,aw as a,aK as l,aL as s,e as o,aN as d,k as r,E as n,aJ as c,aO as p,ax as u,F as m,aB as f,aH as _,aI as h,aQ as g,g as b}from"../../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as y,W as v,Y as C,a5 as F,ab as $,X as w,J as x,az as k,aa as V,a8 as I,Z as T,a6 as D,b3 as O,b2 as S,a9 as A,a0 as E}from"../../../../../vendor.js?ver=3.1.8";import{_ as q,I as G}from"../../../../../fc-bits-ui.js?ver=3.1.8";import{S as U}from"../../../../../SettingsHeader.js?ver=3.1.8";import{D as L}from"../../../../../DataTable.js?ver=3.1.8";const M={key:0,class:"fcrm_secondary_text small fcrm_mt_4"},N={class:"fcrm_custom_fields_repeater_options_wrap"},P={class:"fcrm_option_lists"},z=["onClick"],B=["onUpdate:modelValue"],j={class:"icon"},K={class:"fcrm_add_new_option_wrap"},R={class:"icon"},H={class:"fcrm_field_group_wrap d-flex items-center gap-8 w-full"},J={class:"fcrm_primary_text font-medium fcrm_mb_6"},Q={class:"d-flex gap-8 items-center"},W={class:"icon"};const X={name:"CustomContactFields",components:{SettingsHeader:U,DataTable:L,Icons:G,Right:m,CustomFieldForm:q({name:"CustomFieldForm",components:{Icons:G,Plus:i,ArrowUp:t,ArrowDown:e},props:["field_types","item","form_type","existing_fields"],data:()=>({optionInputVisible:!1,optionInputValue:"",editingOptionIndex:null,showGroupCreatePopover:!1,newGroupName:""}),computed:{groupOptions(){const e={};return this.each(this.existing_fields,t=>{t.group&&(e[t.group]=t.group)}),this.item.group&&(e[this.item.group]=this.item.group),Object.values(e)}},methods:{maybeSetSlug(){if("new"!=this.form_type)return!1;const e=this.item.label.toLowerCase().replace(/đ/gi,"d").replace(/\s*$/g,"").replace(/\s+/g,"_").substring(0,25);this.item.slug=e},changeFieldType(){const e=this.item.field_key,t=this.field_types[e];this.item.type=t.type,this.item.label="",this.hasOptions(t.type)?this.item.options||(this.item.options=["Value Option 1"]):delete this.item.options},hasOptions:e=>-1!==["select-one","select-multi","radio","checkbox"].indexOf(e),handleOptionInputConfirm(){const e=this.optionInputValue;e&&this.item.options.push(e),this.optionInputVisible=!1,this.optionInputValue=""},removeOptionItem(e){this.item.options.splice(e,1)},moveOptionsPosition(e,t){let i=e-1;if("down"===t&&(i=e+1),i<0||i>=this.item.options.length)return;const a=this.item.options.splice(e,1)[0];this.item.options.splice(i,0,a)},startEditing(e){this.editingOptionIndex=e,this.$nextTick(()=>{this.$refs.optionInput&&(Array.isArray(this.$refs.optionInput)?this.$refs.optionInput[0].focus():this.$refs.optionInput.focus())})},stopEditing(){this.editingOptionIndex=null},handleCreateGroup(){const e=(this.newGroupName||"").trim();e&&(this.item.group=e,this.newGroupName="",this.showGroupCreatePopover=!1)}}},[["render",function(e,t,i,m,f,_){const h=s,g=l,b=a,E=o,q=y("ArrowUp"),G=n,U=r,L=y("ArrowDown"),X=d,Y=c,Z=y("Icons"),ee=p,te=u;return v(),C(te,{"label-position":"top",data:i.item,class:"fcrm_custom_field_form"},{default:F(()=>[$(b,{label:e.$t("Field Type")},{default:F(()=>[$(g,{onChange:t[0]||(t[0]=e=>_.changeFieldType()),placeholder:e.$t("Select Field Type"),modelValue:i.item.field_key,"onUpdate:modelValue":t[1]||(t[1]=e=>i.item.field_key=e),style:{width:"100%"}},{default:F(()=>[(v(!0),w(x,null,k(i.field_types,(e,t)=>(v(),C(h,{key:t,label:e.label,value:t},null,8,["label","value"]))),128))],void 0,!0),_:1},8,["placeholder","modelValue"])],void 0,!0),_:1},8,["label"]),i.item.type?(v(),w(x,{key:0},[$(b,{label:e.$t("Label")},{default:F(()=>[$(E,{onKeyup:t[2]||(t[2]=e=>_.maybeSetSlug()),placeholder:e.$t("Custom Field Label"),modelValue:i.item.label,"onUpdate:modelValue":t[3]||(t[3]=e=>i.item.label=e)},null,8,["placeholder","modelValue"])],void 0,!0),_:1},8,["label"]),$(b,{label:e.$t("Slug (Optional)")},{default:F(()=>[$(E,{maxlength:"25",placeholder:e.$t("Custom Field Slug"),disabled:"update"==i.form_type,modelValue:i.item.slug,"onUpdate:modelValue":t[4]||(t[4]=e=>i.item.slug=e)},null,8,["placeholder","disabled","modelValue"]),"new"==i.form_type?(v(),w("p",M,V(e.$t("CustomFieldForm.slug.desc")),1)):I("",!0)],void 0,!0),_:1},8,["label"]),_.hasOptions(i.item.type)?(v(),C(b,{key:0,label:e.$t("Field Value Options")},{default:F(()=>[T("div",N,[T("ul",P,[(v(!0),w(x,null,k(i.item.options,(a,l)=>(v(),w("li",{key:l,class:"fcrm_option_item"},[$(X,null,{default:F(()=>[$(U,{onClick:e=>_.moveOptionsPosition(l,"up"),disabled:0==l,size:"small"},{default:F(()=>[$(G,null,{default:F(()=>[$(q)],void 0,!0),_:1})],void 0,!0),_:1},8,["onClick","disabled"]),$(U,{onClick:e=>_.moveOptionsPosition(l,"down"),disabled:l==i.item.options.length-1,size:"small"},{default:F(()=>[$(G,null,{default:F(()=>[$(L)],void 0,!0),_:1})],void 0,!0),_:1},8,["onClick","disabled"])],void 0,!0),_:2},1024),f.editingOptionIndex!==l?(v(),C(Y,{key:0,class:"item",effect:"dark",content:e.$t("Click to edit"),placement:"top",enterable:!1},{default:F(()=>[T("span",{onClick:e=>_.startEditing(l),class:"fcrm_option_text"},V(a),9,z)],void 0,!0),_:2},1032,["contLine truncated
@@ -0,0 +1 @@
import{W as e,X as r}from"../../../../vendor.js?ver=3.1.8";import{_ as t}from"../../../../fc-bits-ui.js?ver=3.1.8";import"../../../../vendor-element-plus.js?ver=3.1.8";const s=t({name:"Tag",props:["tagId"],created(){this.$router.replace({name:"subscribers",query:{tags:[this.tagId],sort_by:"id",sort_type:"DESC",filter_type:"simple"}})}},[["render",function(t,s,o,a,i,p){return e(),r("div")}]]);export{s as default};
@@ -0,0 +1 @@
import{aI as t,aB as e,aC as a,aH as s,c as o,a6 as i,j as l,k as n,h as r,i as c,e as d,E as m,aR as p,g as h}from"../../../../vendor-element-plus.js?ver=3.1.8";import{W as g,Y as f,a5 as u,ab as _,a8 as w,Z as v,aQ as C,X as b,ay as y,a9 as $,aa as x,ax as T,b2 as k,a0 as S,aE as I,bK as V}from"../../../../vendor.js?ver=3.1.8";import{C as L}from"../../../../Confirm2.js?ver=3.1.8";import{A as E}from"../../../../ActionMenu.js?ver=3.1.8";import{P}from"../../../../PaginationBar.js?ver=3.1.8";import{D}from"../../../../DataTable.js?ver=3.1.8";import{F as B}from"../../../../FloatingBulkActionShell.js?ver=3.1.8";import{_ as j,I as A,a as U,T as F}from"../../../../fc-bits-ui.js?ver=3.1.8";import{P as H}from"../../../../PageHeader.js?ver=3.1.8";import"../../../../Error.js?ver=3.1.8";import"../../../../fc-bits.js?ver=3.1.8";const M={name:"TagsLoader",props:{showSelection:{type:Boolean,default:!0}},data:()=>({skeletonRows:[{id:1},{id:2},{id:3},{id:4},{id:5},{id:6},{id:7},{id:8},{id:9},{id:10}]})},R={class:"fcrm_tag_cell fcrm_tag_cell--skeleton"},z={class:"fcrm_contacts_cell fcrm_contacts_cell--skeleton"};const Z=j(M,[["render",function(o,i,l,n,r,c){const d=a,m=e,p=t,h=s;return g(),f(h,{class:"fcrm_data_table fcrm_tags_table--skeleton",data:r.skeletonRows,style:{width:"100%"}},{default:u(()=>[l.showSelection?(g(),f(p,{key:0,width:"40"},{default:u(()=>[_(m,{animated:!0,style:{width:"16px"}},{template:u(()=>[_(d,{variant:"rect",style:{width:"16px",height:"16px","border-radius":"2px"}})]),_:1})]),_:1})):w("",!0),_(p,{label:o.$t("ID"),width:"80"},{default:u(()=>[_(m,{animated:!0},{template:u(()=>[_(d,{variant:"text",style:{width:"30px",height:"14px"}})]),_:1})]),_:1},8,["label"]),_(p,{label:o.$t("Title"),"min-width":200},{default:u(()=>[v("div",R,[_(m,{animated:!0},{template:u(()=>[_(d,{variant:"text",style:{display:"block",width:"120px",height:"16px","margin-bottom":"6px"}}),_(d,{variant:"text",style:{display:"block",width:"180px",height:"12px"}})]),_:1})])]),_:1},8,["label"]),_(p,{label:o.$t("Contacts"),width:200},{default:u(()=>[v("div",z,[_(m,{animated:!0,style:{"flex-direction":"column"}},{template:u(()=>[_(d,{variant:"text",style:{width:"40px",height:"16px","margin-bottom":"6px"}}),_(d,{variant:"text",style:{width:"70px",height:"12px"}})]),_:1})])]),_:1},8,["label"]),_(p,{label:o.$t("Created"),width:200},{default:u(()=>[_(m,{animated:!0},{template:u(()=>[_(d,{variant:"text",style:{width:"80px",height:"14px"}})]),_:1})]),_:1},8,["label"]),_(p,{width:"60",align:"center"},{default:u(()=>[_(m,{animated:!0,style:{display:"flex","justify-content":"center"}},{template:u(()=>[_(d,{variant:"circle",style:{width:"20px",height:"20px"}})]),_:1})]),_:1})],void 0),_:1},8,["data"])}]]);I.extend(V);const N={class:"fcrm_tags fcrm-layout-width"},O={class:"fcrm_fluentcrm-tags fcrm_fluentcrm_min_bg fcrm_fluentcrm-view-wrapper fcrm_fluentcrm_view"},K={class:"icon"},Y={class:"icon"},W={class:"icon"},G={class:"fcrm_fluentcrm_body fcrm_tags_body"},Q={class:"fcrm_tags-table"},X={class:"icon"},q={class:"fcrm_empty_state"},J={class:"fcrm_empty_state_text"},tt={key:0,class:"fcrm_secondary_text"},et={class:"fcrm_secondary_text small"},at=["title"],st=["aria-label"],ot={class:"el-popover__reference"},it={class:"icon"},lt={class:"el-popover__reference"},nt={class:"icon"},rt={class:"fcrm_bulk_action_bar"},ct={class:"fcrm_bulk_action_left"},dt={class:"fc_bulk_selection_count"},mt={class:"icon"},pt={key:0},ht=["id"],gt=["onClick"],ft={key:0},ut={key:0},_t={class:"el-upload__text"},wt={class:"el-upload__tip"},vt={class:"fcrm_primary_text small"},Ct={key:1},bt={class:"fcrm_import_preview"},yt={class:"fcrm_import_subtitle"},$t={class:"fcrm_import_footer"};const xt=j({name:"Tags",components:{Icons:A,PageHeader:H,Confirm:L,ActionMenu:E,PaginationBar:P,DataTable:D,FloatingBulkActionShell:B,TagsLoader:Z,Delete:i,Close:o},data:()=>({loading:!1,exportLoading:!1,api:{store:"tags"},tags:[],sortBy:"id",search:"",sortType:"DESC",pagination:{total:0,per_page:10,current_page:1},selectedTags:[],selection:!1,selectionCount:0,importStep:1,showImportDrawer:!1,processedFiles:[],tagsToImport:[],pageSizes:[10,20,50,80,100,120,150,200,250,300,400,600],localPerPage:10,current_mode:"system"===F.getCurrentTheme()?F.getSystemTheme():F.getCurrentTheme()}),computed:{totalPages(){const t=Number(this.pagination&&this.pagination.per_page)||Number(this.localPerPage)||10,e=Number(this.pagination&&this.pagination.total)||0;return Math.max(1,Math.ceil(e/t))}},methods:{handleImport(){this.showImportDrawer=!0},submitToBackend(){this.tagsToImport.length>0?this.$post("tags/bulk",{tags:this.tagsToImport}).then(t=>{this.$notify.success({title:this.$t("Success"),message:this.$t("Tags imported successfully"),offset:19}),this.fetch(),this.showImportDrawer=!1,this.tagsToImport=[]}).catch(t=>{this.$notify.error({title:this.$t("Error"),message:this.$t("Failed to import tags"),offset:19}),console.error("Error importing tags:",t)}):this.$notify.info({title:this.$t("Info"),message:this.$t("No tags Line truncated