PageSourceSearch

https://www.mykcm.com/assets/email-builder-page-Boozqhs_.js

js mykcm.com collected 2026-09-24 20:04:40 UTC 35,104 bytes, 1 lines download raw bytes

1import{k as te,w as re,Q as ge,K as s,l as v,z as e,A as i,B as b,y as _,p as me,F as G,E as K,M as a,x as d,a5 as Fe,ai as Ie,j as p,d as P,a3 as Ue,H as o,a7 as ve,D as ue,n as fe,s as V,a1 as Ee}from"./vendor-B4gcsg9q.js";import{S as Ye,_ as je}from"./main-layout.vue_vue_type_script_setup_true_lang-C8kiLnfp.js";import{_ as qe}from"./step-toolbar.vue_vue_type_script_setup_true_lang-DkvWaVvj.js";import{b as Ge,c as pe,p as Le,u as _e,o as xe,_ as S,y as Ke,r as Be,v as We,n as oe,T as de,k as Oe,w as Ce,x as Me,z as Pe,q as ae,A as Je,C as De,D as Qe,E as Ze,F as Xe,G as et,m as Ae,H as tt,I as lt,J as we,K as he,M as nt}from"./index-B9Tnya_p.js";import{g as $e,a as st,b as ot,_ as Se,e as ke,u as it}from"./EmailBuilderFullPreview.vue_vue_type_script_setup_true_lang-DpeoOqzM.js";import{_ as at}from"./share-icon.vue_vue_type_script_setup_true_lang-BclJAP1G.js";import"./user-avatar-DKE2GE5G.js";import"./canvas-CwdzvQJI.js";import"./banner-alert.vue_vue_type_style_index_0_lang-BsQdOSJu.js";import"./planCatalog-X5--2IVR.js";import"./billing-form.vue_vue_type_script_setup_true_lang-DpAp4aqz.js";import"./recurly-form-Buts6VHe.js";import"./AppOverlay-DZvJi9E-.js";import"./datetimePickerWidget-CeakefG-.js";import"./floating-ui.dom-Bko5kdKq.js";import"./kcm-tooltip.vue_vue_type_script_setup_true_lang-D0uz5fg8.js";const rt="/assets/prebuild_buyers-BKrRZLT-.svg",ut="/assets/prebuild_sellers-xes4GYBi.svg",dt="/assets/prebuild_latest-CeqVvEpy.svg",ct={key:0,icon:"fa6-solid:chevron-down",inline:""},vt={key:1,icon:"fa6-solid:chevron-up",inline:""},ft={class:"flex items-center gap-2"},mt=["value","id"],pt=["for"],gt=te({__name:"categories",props:{categories:{type:Array,default:()=>[""]},listType:{type:String,default:"checkbox"},limitedCategories:{type:Array,default:()=>[]},statusOverrides:{type:Array,default:()=>[]},typeOverrides:{type:Array,default:()=>[]},excludeCategories:{type:Array,default:()=>[]},contentType:{type:String,default:"blog"},showAlways:{type:Boolean,default:!1},showHeader:{type:Boolean,default:!0},orientation:{type:String,default:"vertical"}},emits:["filter"],setup(k,{emit:F}){const u=k,M=F,x=Ge(),h=p([]),c=p(!1),y=p(null),f=p([]),$=P(()=>x.languageSetting),T=P(()=>y.value!==null&&(c.value||u.showAlways)),w=P(()=>({blog:"/blog/",videos:"/video/",video:"/video/"})),L=P(()=>u.statusOverrides.length>0?u.statusOverrides:void 0),O=P(()=>u.typeOverrides.length>0?u.typeOverrides:void 0),I=()=>{pe.getCategories($.value,L.value,O.value).then(E=>{E.categories?(y.value=E,y.value.categories=y.value.categories?.filter(A=>!u.excludeCategories.includes(A.slug)&&(u.limitedCategories.length===0||u.limitedCategories.includes(A.slug)))||[],f.value[$.value]=y.value):E.error&&(y.value=null)})},H=()=>{c.value=!c.value},j=()=>{M("filter",h.value)},D=E=>w.value[u.contentType]+"?categories="+E.slug;return re(h,()=>{j()},{deep:!0}),re(()=>u.categories,E=>{h.value=E},{deep:!0,immediate:!0}),re($,()=>{f.value[$.value]&&(y.value=f.value[$.value]),I()}),ge(()=>{I()}),(E,A)=>(s(),v("div",null,[k.showHeader?(s(),v("h4",{key:0,class:"mb-4",onClick:A[0]||(A[0]=B=>H())},[A[2]||(A[2]=e("iconify-icon",{class:"mr-2",icon:"fa6-solid:bookmark",inline:""},null,-1)),i(" "+b(E.$t("components.content-feed.categories.header"))+" ",1),!c.value&&!k.showAlways?(s(),v("iconify-icon",ct)):_("",!0),c.value&&!k.showAlways?(s(),v("iconify-icon",vt)):_("",!0)])):_("",!0),k.listType==="link"&&T.value&&y.value?(s(),v("ul",{key:1,class:me(["list-unstyled fw-medium category-list",k.orientation])},[(s(!0),v(G,null,K(y.value.categories,B=>(s(),v("li",{key:B.id+"_category_link_wrapper"},[a(D,{to:D(B)},{default:d(()=>[i(b(B.name),1)]),_:2},1032,["to"])]))),128))],2)):_("",!0),k.listType==="checkbox"&&T.value&&y.value?(s(),v("ul",{key:2,class:me(["list-unstyled fw-medium category-list",k.orientation])},[(s(!0),v(G,null,K(y.value.categories,B=>(s(),v("li",{key:B.id+"_category_checkbox_wrapper"},[e("div",ft,[Fe(e("input",{class:"h-4 w-4 rounded border-slate-300 text-sky-600",type:"checkbox",value:B.slug,id:B.slug+"_checkbox","onUpdate:modelValue":A[1]||(A[1]=N=>h.value=N),style:{"vertical-align":"middle"}},null,8,mt),[[Ie,h.value]]),e("label",{class:"cursor-pointer select-none",for:B.slug+"_checkbox",style:{"vertical-align":"middle"}},b(B.name),9,pt)])]))),128))],2)):_("",!0)]))}}
1),yt={class:"nav bg-white rounded-2xl mb-3 nav-tabs-custom nav-tabs px-1 sticky-top",style:{top:"70px","box-shadow":"var(--shadow-panel)","z-index":"1000"}},bt={class:"current-articles-selected flex flex-col w-full items-center border-bottom"},Ct={class:"flex flex-wrap pb-2"},wt=["onClick"],ht=["src"],kt={class:"nav-item"},xt={class:"nav-item"},$t={key:0,ref:"content-selection-grid",style:{"min-height":"50vh"},class:"flex flex-wrap content-selection-grid"},St=["onClick"],_t=["src"],Tt={class:"my-2 line-clamp-2"},Et=["innerHTML"],Bt={key:0,class:"w-full"},Mt={key:1,class:"w-full text-center"},Pt={key:0,icon:"fa6-solid:circle-minus",class:"text-slate-600 xxl",inline:""},At={key:1,icon:"fa6-solid:circle-plus",class:"text-sky-700 xxl",inline:""},Ft={class:"text-center font-bold"},It={key:0},Lt=["href"],Ot={key:1},Dt=["href"],Nt={key:1},Ht={class:"text-center mt-4"},Rt={key:2,class:"flex flex-wrap m-5"},Vt={class:"w-full md:w-1/3 px-2 mb-4"},zt={class:"w-full md:w-1/3 px-2 mb-4"},Ut={class:"list-unstyled fw-medium"},Yt={class:"flex items-center gap-2"},jt=["id","value"],qt=["for"],Gt={class:"w-full md:w-1/3 px-2 mb-4"},Kt={class:"flex flex-wrap mb-5 gap-4"},Wt={class:"flex flex-wrap mb-5 gap-4"},Jt={class:"p-3"},Qt=te({__name:"EmailBuilderStepTwo",props:{selectedContent:{type:Array,required:!0},contentSlots:{type:Number,default:5},initialContent:{type:Array,required:!1,default:()=>[]},settings:{type:Object,required:!1,default:()=>null}},emits:["updateSelectedContent","toggleContent","forward"],setup(k,{emit:F}){const u=k,M=F,x=Le(),h=_e(),c=p({year:"",month:"",categories:[""],contentTypes:[""]}),y=p({year:"",month:"",categories:[""],contentTypes:[""]}),f=p(!1),$=p(0),T=p([]),w=p(!1),L=p(!0),O=p(""),I=p(null),H=()=>{I.value?.show()},j=()=>{I.value?.close()},D=()=>{j(),M("forward")},E=P(()=>h.hasFeature("video")?["blog","video"]:["blog"]),A=P(()=>u.selectedContent.length>=u.contentSlots),B=P(()=>[{text:"Blog Posts",value:"blog",available:!0},{text:"Videos",value:"video",available:h.hasFeature("video")}]),N=P(()=>!u.settings||!u.settings.language||!u.settings.language.value?"en":u.settings.language.value.toLowerCase()),Z=P(()=>!u.settings||!u.settings.bgColor||!u.settings.bgColor.value?"en":u.settings.bgColor.value.toLowerCase());async function le(){$.value=0,T.value=[],await R()}async function R(){if(w.value)return;w.value=!0;let n="";y.value.categories.length>0&&(n=y.value.categories.join()),O.value="",await pe.getContents({page:$.value,limit:20,types:y.value.contentTypes.join(),language:"all",categories:n,year:y.value.year===""?void 0:parseInt(y.value.year),month:y.value.month===""?void 0:parseInt(y.value.month)}).then(t=>{t.content?(T.value=T.value.concat(t.content),t.has_more||(L.value=!1),$.value++):t.error&&(O.value=t.error),w.value=!1})}function z(n){M("updateSelectedContent",n)}function ne(n){if(Y(n)){const t=u.selectedContent.map(U=>U.id).indexOf(n.id),r=u.selectedContent.slice(0);r.splice(t,1),z(r);return}A.value||(de.trackEvent("selectedContent",{content:JSON.parse(JSON.stringify(n)),eventTarget:"email builder"}),M("toggleContent",n),fe(()=>{A.value&&H()}))}function Y(n){return u.selectedContent.map(t=>t.id).includes(n.id)}function W(){f.value?Q():f.value=!0}async function X(n){y.value={year:n.year,month:n.month,categories:n.categories.slice(0),contentTypes:n.contentTypes.length===0?E.value.slice(0):n.contentTypes.slice(0)},y.value.contentTypes.length===0&&(n.contentTypes=E.value.slice(0)),await le(),f.value=!1}function J(){const n={year:"",month:"",categories:[],contentTypes:E.value.slice(0)};X(n),Q()}function Q(){c.value.year=y.value.year,c.value.month=y.value.month,c.value.categories=y.value.categories.slice(0),c.value.contentTypes=y.value.contentTypes.slice(0),f.value=!1}function ie(n){c.value.categories=n}function ee(n,t){return x.profileSTMBlogLink(n,t)}function g(n,t){return x.profileSTMLinkExtended(n,t)}return ge(async()=>{u.initialContent?T.value=u.initialContent:await le(),c.value.contentTypes=E.value.slice(0),X(c.value),addEventListener("scroll",()=>{const n=document.querySelector(".content-selection-grid");if(n&&n.getBoundingClientRect().bottom<=(window.innerHeight||document.documentElement.clientHeight)){if(!L.value)return;R()}})}),Ue(()=>{removeEventListener("scroll",()=>{})}),(n,t)=>(s(),v("div",null,[e("div",null,[t[13]||(t[13]=e("h3",null,"Choose Content",-1)),e("p",null," Select "+b(k.contentSlots)+' pieces of content to include in your Email by clicking on each piece of content. Your selections will appear in the box below. You can also use the "Filters" button to filter by content type. ',1)]),e("ul",yt,[e("li",bt,[t[15]||(t[15]=e("h5",{class:"p-2 m-0"},"Your Selections:",-1)),e("div",Ct,[(s(!0),v(G,null,K(k.selectedContent,r=>(s(),v("div",{key:"selected-content-"+r.id,class:"selected-content-thumbnail filled p-2",onClick:U=>ne(r)},[e("img",{src:o($e)(r,N.value)},null,8,ht)],8,wt))),128)),(s(!0),v(G,null,K(k.contentSlots-k.selectedContent.length,r=>(s(),v("div",{key:"empty-selected-content-"+r,class:"selected-content-thumbnail p-2"},[...t[14]||(t[14]=[e("div",{class:"empty"},[e("iconify-icon",{icon:"fa6-solid:question",inline:""})],-1)])]))),128))])]),e("li",kt,[e("span",{class:"nav-link email-builder
1-nav-action",role:"button",tabindex:"0",onClick:t[0]||(t[0]=r=>z([])),onKeydown:[t[1]||(t[1]=ve(r=>z([]),["enter"])),t[2]||(t[2]=ve(ue(r=>z([]),["prevent"]),["space"]))]},[...t[16]||(t[16]=[e("iconify-icon",{icon:"fa6-solid:xmark",inline:""},null,-1),i(" Clear Selections ",-1)])],32)]),e("li",xt,[e("span",{class:"nav-link email-builder-nav-action",role:"button",tabindex:"0",onClick:t[3]||(t[3]=r=>W()),onKeydown:[t[4]||(t[4]=ve(r=>W(),["enter"])),t[5]||(t[5]=ve(ue(r=>W(),["prevent"]),["space"]))]},[...t[17]||(t[17]=[e("iconify-icon",{icon:"fa6-solid:filter",inline:""},null,-1),i(" Filters ",-1)])],32)])]),T.value.length&&!f.value?(s(),v("div",$t,[(s(!0),v(G,null,K(T.value,r=>(s(),v("div",{key:r.id,class:"item"},[e("div",{class:me(["content-select-card rounded-2xl border border-slate-200 p-2 m-2 pb-0 mb-0",Y(r)?"selected":""]),style:{cursor:"pointer"},onClick:U=>ne(r)},[e("img",{src:o($e)(r,N.value)},null,8,_t),e("h5",Tt,b(o(st)(r,N.value)),1),e("p",{class:"line-clamp-3",innerHTML:o(ot)(r,N.value,Z.value)},null,8,Et),A.value&&!Y(r)?(s(),v("p",Bt,[a(o(xe),{variant:"error",class:"alert-max-content-centered"},{default:d(()=>[...t[18]||(t[18]=[i(" Max content selected! ",-1)])]),_:1})])):(s(),v("p",Mt,[Y(r)?(s(),v("iconify-icon",Pt)):(s(),v("iconify-icon",At))]))],10,St),e("div",Ft,[r.content_type.includes("blog")?(s(),v("div",It,[e("a",{href:ee(r,N.value),target:"_blank",class:"bg-transparent border-0 cursor-pointer underline text-sky-700 hover:text-sky-900"},[t[19]||(t[19]=e("iconify-icon",{icon:"fa6-solid:book-open",class:"mr-2",inline:""},null,-1)),i(" "+b(n.$t("emailbuilder.buttons.blog")),1)],8,Lt)])):_("",!0),r.content_type.includes("video")?(s(),v("div",Ot,[e("a",{href:g("videos/"+r.slug,N.value),target:"_blank",class:"bg-transparent border-0 cursor-pointer underline text-sky-700 hover:text-sky-900"},[t[20]||(t[20]=e("iconify-icon",{icon:"fa6-solid:film",class:"mr-2",inline:""},null,-1)),i(" "+b(n.$t("emailbuilder.buttons.video")),1)],8,Dt)])):_("",!0)])]))),128))],512)):!T.value.length&&!f.value?(s(),v("div",Nt,[e("div",Ht,[t[22]||(t[22]=e("h3",null,"No content found.",-1)),t[23]||(t[23]=e("p",null,"Please try again with different filters.",-1)),a(o(S),{onClick:t[6]||(t[6]=r=>J())},{default:d(()=>[...t[21]||(t[21]=[i(" Clear Filters ",-1)])]),_:1})])])):_("",!0),f.value?(s(),v("div",Rt,[e("div",Vt,[t[24]||(t[24]=e("label",{class:"filter-label"},"Categories",-1)),a(gt,{categories:c.value.categories,"show-always":"","show-header":!1,"exclude-categories":["baby-boomers","buying-myths","distressed-properties","down-payments","demographics","first-time-buyers","foreclosures","for-sale-by-owner","generation-x","holidays","infographics","mortgage-rates","luxury--vacation","millennials","move-up","new-construction","selling-myths","senior-market"],onFilter:ie},null,8,["categories"])]),e("div",zt,[t[25]||(t[25]=e("label",{class:"filter-label"},"Content Types",-1)),e("div",null,[e("ul",Ut,[(s(!0),v(G,null,K(B.value,r=>(s(),v("li",{key:r.value+"_content_type_checkbox_wrapper",class:"pb-2"},[e("div",Yt,[r.available?Fe((s(),v("input",{key:0,id:r.value+"_checkbox","onUpdate:modelValue":t[7]||(t[7]=U=>c.value.contentTypes=U),class:"h-4 w-4 rounded border-slate-300 text-sky-600",type:"checkbox",value:r.value},null,8,jt)),[[Ie,c.value.contentTypes]]):_("",!0),r.available?(s(),v("label",{key:1,class:"cursor-pointer select-none",for:r.value+"_checkbox"},b(r.text),9,qt)):_("",!0)])]))),128))])])]),e("div",Gt,[e("div",Kt,[t[26]||(t[26]=e("label",{class:"filter-label",for:"filter-year-select"},"Year Posted",-1)),a(o(Be),{id:"filter-year-select",modelValue:c.value.year,"onUpdate:modelValue":t[8]||(t[8]=r=>c.value.year=r),class:"rounded border border-slate-300 px-3 py-2 bg-white",options:o(Ke)(3)},null,8,["modelValue","options"])]),e("div",Wt,[t[27]||(t[27]=e("label",{class:"filter-label",for:"filter-month-select"},"Month Posted",-1)),a(o(Be),{id:"filter-month-select",modelValue:c.value.month,"onUpdate:modelValue":t[9]||(t[9]=r=>c.value.month=r),class:"rounded border border-slate-300 px-3 py-2 bg-white",options:o(We)()},null,8,["modelValue","options"])]),e("div",null,[a(o(S),{class:"mr-2 mb-2",onClick:t[10
1]||(t[10]=r=>X(c.value))},{default:d(()=>[...t[28]||(t[28]=[i(" Save ",-1)])]),_:1}),a(o(S),{variant:"neutral",outline:"",class:"mr-2 mb-2",onClick:t[11]||(t[11]=r=>J())},{default:d(()=>[...t[29]||(t[29]=[i(" Default Settings ",-1)])]),_:1}),a(o(S),{variant:"neutral",outline:"",class:"mr-2 mb-2",onClick:t[12]||(t[12]=r=>Q())},{default:d(()=>[...t[30]||(t[30]=[i(" Cancel ",-1)])]),_:1})])])])):_("",!0),a(o(oe),{ref_key:"maxContentModal",ref:I,"show-close-button":!1,modalBoxClasses:"max-w-[1140px]"},{default:d(()=>[e("div",Jt,[t[33]||(t[33]=e("h3",null,"You're all set!",-1)),t[34]||(t[34]=e("p",null,"You can now place your content into the email!",-1)),a(o(S),{class:"mr-2",onClick:D},{default:d(()=>[...t[31]||(t[31]=[i(" Build Email ",-1)])]),_:1}),a(o(S),{variant:"neutral",outline:"",onClick:j},{default:d(()=>[...t[32]||(t[32]=[i(" Go Back ",-1)])]),_:1})])]),_:1},512)]))}}),Zt=Oe(Qt,[["__scopeId","data-v-19fb352f"]]),Xt={class:"email-builder-step-three-toolbar nav bg-white rounded-2xl mb-3 nav-tabs px-1 sticky-top",style:{top:"70px","box-shadow":"var(--shadow-panel)","z-index":"1000"}},el={class:"nav-item"},tl={class:"nav-item"},ll={class:"nav-item"},nl={key:0,class:"nav-item"},sl={key:1,icon:"fa6-solid:paper-plane",inline:""},ol={key:1,class:"nav-item"},il={key:1,icon:"fa6-solid:paper-plane",inline:""},al={class:"text-center m-auto flex flex-wrap w-full gap-4"},rl={key:0,id:"email-builder-settings-container",class:"w-full"},ul={key:1,id:"selected-content-container",class:"w-full email-content-section py-3 border-bottom border-2"},dl={key:0},cl={key:1,class:"flex justify-evenly",style:{"flex-flow":"wrap"}},vl=["src"],fl={class:"text-center flex flex-col items-center gap-2"},ml={class:"flex flex-wrap m-2 gap-4"},pl={class:"w-full rounded-2xl py-2 overflow-hidden",style:{"box-shadow":"var(--shadow-panel)"}},gl={class:"p-3"},yl={key:0,class:"kcm-modal-more-info"},bl={class:"text-center"},Cl={class:"p-3"},wl={class:"border p-2",style:{"max-height":"30vh",overflow:"auto"}},hl={key:0,class:"kcm-modal-more-info"},kl={class:"text-center"},xl=te({__name:"EmailBuilderStepThree",props:{selectedContent:{type:Array,required:!0},prebuilt:{type:Boolean,default:!0},contentSlots:{type:Number,default:5},settings:{type:Object,required:!1,default:()=>null},loadingProfile:{type:Boolean,default:!1},lastProfileLoad:{type:String,default:""}},emits:["back","updateBuilderSettings","refreshProfileSettings"],setup(k,{emit:F}){const u=k,M=F,x=_e(),h=p(!1),c=p(!1),y=P(()=>h.value||c.value),f=p([]),$=p(tt),T=p(!0),w=p(""),L=p(!1),O=p(!1),I=p(null),H=p(null),j=P(()=>x.authUserId),D=P(()=>x.getMyServicesByType("crm")),E=P(()=>u.selectedContent.length>=u.contentSlots),A=P(()=>u.settings&&u.settings.language&&u.settings.language.value?u.settings.language.value:""),B=P(()=>u.prebuilt?"Pre-Built":"Custom");function N(m){$.value=De($.value,m)}function Z(){f.value=u.selectedContent.slice(0)}function le(){h.value=!h.value,c.value=!1}function R(){c.value=!c.value,h.value=!1}function z(){h.value=!1,c.value=!1}function ne(){T.value=!1,I.value?.show(),fe(()=>{Y()})}function Y(){const m=ce.value;if(!m)return;const l={contentType:"email",customization:B.value.toLowerCase(),eventTarget:"email template - html"};Qe(ke+"<html>"+m.$el.innerHTML+"</html>",l)}async function W(m){if(O.value)return;T.value=!1,O.value=!0,await fe();const l=ce.value;w.value=ke+"<html>"+(l?.$el.innerHTML||"")+"</html>";const C=Ze(new Date(Date.now())),q=Xe(new Date(Date.now())),se={name:`KCM Template - Email Builder - ${C} ${q}`,subject:"Check this out...",body:w.value};try{await et.sendEmailTemplateToCrm(se,m.service.slug,j.value),de.trackEvent("send",{contentType:"email",customization:B.value.toLowerCase(),eventTarget:m.service.slug}),Ae(`Email template saved in ${m.service.name}`,"success")}catch{Ae(`Error saving email template in ${m.service.name}`,"error")}finally{O.value=!1,T.value=!0}}function X(){T.value=!1,fe(()=>{const m=ce.value;m&&(w.value=ke+"<html>"+m.$el.innerHTML+"</html>",J(),H.value?.show())})}function J(){de.trackEvent("copiedContent",{contentType:"email",customization:B.value.toLowerCase(),eventTarget:"email template - code"}),navigator.clipboard.writeText(w.value)}function Q(m,l){ie(l),m.contentSlot=l,be();const C=f.value.findIndex(se=>se.id===m.id),q=[...f.value];q[C]=m,f.value=q}function ie(m){f.value.forEach(l=>{l.contentSlot===m&&ee(l)})}function ee(m){m.contentSlot=-1;const l=f.value.indexOf(m),C=[...f.value];C[l]=m,f.value=C}function g(){f.value.forEach(m=>{ee(m)})}function n(){M("back")}function t(m){return m>-1}function r(m){const l=[];return t(m.contentSlot)&&l.push("inserted"),m.selected&&l.push("selected"),l.join(" ")}function U(m){M("updateBuilderSettings",m)}function Ne(){M("refreshProfileSettings")}const{currentSelectedSlot:ye}=it;function He(m){if(ye.value!==-1)Q(m,ye.value),ye.value=-1;else if(m.contentSlot>-1)m.contentSlot=-1,ee(m),be();else{be();const l=f.value.findIndex(q=>q.id===m.id),C=[...f.value];C[l].selected=!0,f.value=C}}function be(){const m=f.value.map(l=>({...l,selected:!1}));f.value=m}function Re(m,l){if(m&&m.target){const C=m.dataTransfer;if(!C)return;C.setData("text","true;"+l+";")}}const Ve=()=>{I.value?.close()},ze=()=>{H.value?.close()},Te=()=>{T.value=!0},ce=p();return ge(()=>{u.settings&&N(u.settings),Z(),setTimeout(()=>{c.value=!0},300)}),re(()=>u.settings,m=>{m&&N(m)},{deep:!0}),(m,l)=>(s(),v("div",null,[e("ul",Xt,[e("li",el,[a(o(S),{ghost:"",class:"email-builder
1-toolbar-btn",type:"button",onClick:l[0]||(l[0]=ue(C=>le(),["prevent"]))},{default:d(()=>[...l[12]||(l[12]=[e("iconify-icon",{icon:"fa6-solid:gear",inline:""},null,-1),i(" Settings ",-1)])]),_:1})]),e("li",tl,[a(o(S),{ghost:"",class:"email-builder-toolbar-btn",type:"button",onClick:l[1]||(l[1]=ue(C=>R(),["prevent"]))},{default:d(()=>[...l[13]||(l[13]=[e("iconify-icon",{icon:"fluent:content-view-16-regular",inline:""},null,-1),i(" Content ",-1)])]),_:1})]),e("li",ll,[a(o(Me),{variant:"transparent","toggle-class":"nav-link email-builder-toolbar-btn",right:""},{"button-content":d(()=>[...l[14]||(l[14]=[e("iconify-icon",{icon:"fa6-solid:copy",inline:""},null,-1),i(" Copy ",-1)])]),default:d(()=>[a(o(Ce),{onClick:ne},{default:d(()=>[...l[15]||(l[15]=[e("iconify-icon",{icon:"fa6-solid:copy",class:"mr-2",inline:""},null,-1),i(" Copy Template ",-1)])]),_:1}),a(o(Ce),{onClick:X},{default:d(()=>[...l[16]||(l[16]=[e("iconify-icon",{icon:"fa6-solid:code",class:"mr-2",inline:""},null,-1),i(" Copy Source Code ",-1)])]),_:1})]),_:1})]),D.value.length>1?(s(),v("li",nl,[a(o(Me),{variant:"transparent","toggle-class":"nav-link email-builder-toolbar-btn",right:"",disabled:O.value},{"button-content":d(()=>[O.value?(s(),V(o(Pe),{key:0,"aria-hidden":"true"})):(s(),v("iconify-icon",sl)),l[17]||(l[17]=i(" Send to CRM ",-1))]),default:d(()=>[(s(!0),v(G,null,K(D.value,C=>(s(),V(o(Ce),{key:C.service.slug,onClick:q=>W(C)},{default:d(()=>[i(b(C.service.name),1)]),_:2},1032,["onClick"]))),128))]),_:1},8,["disabled"])])):_("",!0),D.value.length===1?(s(),v("li",ol,[a(o(S),{ghost:"",class:"email-builder-toolbar-btn",type:"button",disabled:O.value,onClick:l[2]||(l[2]=C=>W(D.value[0]))},{default:d(()=>[O.value?(s(),V(o(Pe),{key:0,"aria-hidden":"true"})):(s(),v("iconify-icon",il)),i(" Send to "+b(D.value[0].service.name),1)]),_:1},8,["disabled"])])):_("",!0)]),e("div",al,[a(o(Je),{id:"email-builder-sidebar","body-class":"p-3",shadow:"",backdrop:!1,"model-value":y.value,title:h.value?"Settings":"Content","onUpdate:modelValue":l[5]||(l[5]=C=>{C||z()}),onHidden:z},{default:d(()=>[h.value&&$.value?(s(),v("div",rl,[a(at,{"profile-settings":$.value,"loading-profile":k.loadingProfile,"total-count":k.selectedContent.length,onUpdateBuilderSettings:U,onRefreshProfileSettings:Ne},null,8,["profile-settings","loading-profile","total-count"])])):_("",!0),c.value?(s(),v("div",ul,[k.selectedContent.length<=0?(s(),v("p",dl,"No articles selected!")):(s(),v("div",cl,[(s(!0),v(G,null,K(f.value,(C,q)=>(s(),V(o(ae),{key:C.id,hoverable:!1,class:me(["m-1 mb-2 email-content-section-thumbnail",r(C)]),draggable:"true",onClick:se=>He(C),onDragstart:se=>Re(se,q)},{default:d(()=>[e("img",{src:o($e)(C,A.value)},null,8,vl)]),_:2},1032,["class","onClick","onDragstart"]))),128))])),e("div",fl,[a(o(S),{onClick:l[3]||(l[3]=C=>n())},{default:d(()=>[i(b(E.value?"Choose New Content":"Add Content"),1)]),_:1}),k.selectedContent.length>0?(s(),V(o(S),{key:0,link:"",onClick:l[4]||(l[4]=C=>g())},{default:d(()=>[...l[18]||(l[18]=[e("iconify-icon",{icon:"fa6-solid:xmark",inline:""},null,-1),i(" Clear All ",-1)])]),_:1})):_("",!0)])])):_("",!0)]),_:1},8,["model-value","title"])]),e("div",ml,[e("div",pl,[f.value&&$.value?(s(),V(Se,{key:0,ref_key:"emailBuilderFullPreviewRef",ref:ce,content:f.value,settings:$.value,"allow-edit":T.value,onAddContentToSlot:Q},null,8,["content","settings","allow-edit"])):_("",!0)])]),a(o(oe),{ref_key:"copyTemplateModal",ref:I,"show-close-button":!1,modalBoxClasses:"max-w-[1140px]",onClose:Te},{default:d(()=>[e("div",gl,[l[26]||(l[26]=e("h3",null,"Your Email has been copied!",-1)),e("p",null,[l[20]||(l[20]=i(" Go to your email platform and paste it into a new email to send your content. This option works better in email providers like Gmail and Outlook. ",-1)),a(o(S),{link:"",class:"p-0",style:{"vertical-align":"baseline"},onClick:l[6]||(l[6]=C=>L.value=!0)},{default:d(()=>[...l[19]||(l[19]=[i(" More Info ",-1)])]),_:1})]),f.value&&$.value?(s(),V(Se,{key:0,ref:"emailBuilderFullPreviewFinal",class:"no-click-parent",content:f.value,settings:$.value,style:{"max-height":"30vh",overflow:"auto"}},null,8,["content","settings"])):_("",!0),a(o(xe),{class:"my-2"},{default:d(()=>[...l[21]||(l[21]=[i(" Please test your email before sending it out to potential clients. Emails may have slight visual differences between browsers and email providers. ",-1)])]),_:1}),a(o(S),{class:"mr-2",onClick:l[7]||(l[7]=C=>Y())},{default:d(()=>[...l[22]||(l[22]=[i(" Copy Email Again ",-1)])]),_:1}),a(o(S),{variant:"neutral",outline:"",onClick:Ve},{default:d(()=>[...l[23]||(l[23]=[i(" Close ",-1)])]),_:1}),a(Ee,{name:"modal-more-info"},{default:d(()=>[L.value?(s(),v("div",yl,[l[25]||(l[25]=e("ul",{class:"mb-2"},[e("li",null,[e("strong",null,"Yahoo! Mail"),i(" shows previews for links by default. Click 'Settings' in the top right, then 'More Settings' at the bottom of the menu that appears. Select 'Writing Email' and uncheck 'Automatically generate a preview of links' for the best results. ")]),e("li",null,[e("strong",null,"Gmail"),i(" and "),e("strong",null,"Outlook in Browser"),i(" should work without making any additional changes. ")]),e("li",null,[e("strong",null,"Outlook on Desktop"),i(" works better when copying from a browser such as "),e("strong",null,"Chrome"),i(" or "),e("strong",null,"Firefox"),i(". You may notice style changes when using "),e("strong",null,"Internet Explorer"),i(" or "),e("strong",null,"Microsoft Edge"),i(" to copy and paste into an email with Outlook on Desktop. ")])],-1)),e("div",bl,[a(o(S),{variant:"neutral",outline:"",onClick:l[8]||(l[8]=C=>L.value=!1)},{default:d(()=>[...l[24]||(l[24]=[i(" Hide More Info ",-1)])]),_:1})])])):_("",!0)]),_:1})])]),_:1},512),a(o(oe),{ref_key:"copyCodeModal",ref:H,"show-close-button":!1,modalBoxClasses:"max-w-[1140px]",onClose:Te},{default:d(()=>[e("div",Cl,[l[34]||(l[34]=e("h3",null,"Your Email Builder Code has been copied!",-1)),e("p",null,[l[28]||(l[28]=i(" Go to your CRM and paste it into the HTML source section to send your email. Source code is more reliable for CRMs such as BombBomb and Wise Agent. ",-1)),a(o(S),{link:"",class:"p-0",style:{"vertical-align":"baseline"},onClick:l[9]||(l[9]=C=>L.value=!0)},{default:d(()=>[...l[27]||(l[27]=[i(" More Info ",-1)])]),_:1})]),e("div",wl,b(w.value),1),a(o(xe),{class:"my-2"},{default:d(()=>[...l[29]||(l[29]=[i(" Please test your email before sending it out to potential clients. Emails may have slight visual differences between browsers and email providers. ",-1)])]),_:1}),a(o(S),{class:"mr-2",onClick:l[10]||(l[10]=C=>J())},{default:d(()=>[...l[30]||(l[30]=[i(" Copy Code Again ",-1)])]),_:1}),a(o(S),{variant:"neutral",outline:"",onClick:ze},{default:d(()=>[...l[31]||(l[31]=[i(" Close ",-1)])]),_:1}),a(Ee,{name:"modal-more-info"},{default:d(()=>[L.value?(s(),v("div",hl,[l[33]||(l[33]=e("p",{class:"mb-2"}," CRMs typically have a button to allow pasting source code directly into your emails. It may look a little intimidating, at first, but no worries! All you have to do is remove any code that is prepopulated by your CRM and replace it with our code to the left. This will ensure that the look will stay clean and inviting. ",-1)),e("div",kl,[a(o(S),{variant:"neutral",outline:"",onClick:l[11]||(l[11]=C=>L.value=!1)},{default:d(()=>[...l[32]||(l[32]=[i(" Hide More Info ",-1)])]),_:1})])])):_("",!0)]),_:1})])]),_:1},512)]))}}),$l={class:"p-3"},Sl=te({__name:"EmailBuilderPreviewSample",props:{content:{},settings:{}},setup(k,{expose:F}){const u=p(null),M=()=>{u.value?.show()},x=()=>{u.value?.close()};return F({show:M,close:x}),(h,c)=>(s(),V(o(oe),{ref_key:"modal",ref:u,"show-close-button":!1,modalBoxClasses:"max-w-[1140px]"},{default:d(()=>[e("div",$l,[e("h3",null,b(h.$t("emailbuilder.modals.preview.header")),1),e("p",null,b(h.$t("emailbuilder.modals.preview.text")),1),a(Se,{ref:"emailBuilderFullPreviewFinal",content:k.content,settings:k.settings,style:{"max-height":"30vh",overflow:"auto"}},null,8,["content","settings"]),a(o(S),{variant:"neutral",outline:"",onClick:x},{default:d(()=>
1[i(b(h.$t("emailbuilder.modals.preview.button")),1)]),_:1})])]),_:1},512))}}),_l={class:"p-3"},Tl=te({__name:"EmailBuilderStartOver",emits:["resetEmail"],setup(k,{expose:F,emit:u}){const M=u,x=p(null),h=()=>{x.value?.show()},c=()=>{x.value?.close()},y=()=>{c(),M("resetEmail")};return F({show:h,close:c}),(f,$)=>(s(),V(o(oe),{ref_key:"modal",ref:x,"show-close-button":!1,modalBoxClasses:"max-w-[1140px]"},{default:d(()=>[e("div",_l,[e("h3",null,b(f.$t("emailbuilder.modals.startOver.header")),1),e("p",null,b(f.$t("emailbuilder.modals.startOver.text")),1),a(o(S),{variant:"success",class:"mr-2",onClick:y},{default:d(()=>[i(b(f.$t("emailbuilder.modals.startOver.reset")),1)]),_:1}),a(o(S),{variant:"neutral",outline:"",type:"button",onClick:c},{default:d(()=>[i(b(f.$t("emailbuilder.modals.startOver.cancel")),1)]),_:1})])]),_:1},512))}}),El={class:"p-3"},Bl=te({__name:"EmailBuilderContinue",emits:["buildEmail"],setup(k,{expose:F,emit:u}){const M=u,x=p(null),h=()=>{x.value?.show()},c=()=>{x.value?.close()},y=()=>{c(),M("buildEmail")};return F({show:h,close:c}),(f,$)=>(s(),V(o(oe),{ref_key:"modal",ref:x,"show-close-button":!1,modalBoxClasses:"max-w-[1140px]"},{default:d(()=>[e("div",El,[e("h3",null,b(f.$t("emailbuilder.modals.continue.header")),1),e("p",null,b(f.$t("emailbuilder.modals.continue.text")),1),a(o(S),{variant:"success",class:"mr-2",onClick:y},{default:d(()=>[i(b(f.$t("emailbuilder.modals.continue.build")),1)]),_:1}),a(o(S),{variant:"neutral",outline:"",type:"button",onClick:c},{default:d(()=>[i(b(f.$t("emailbuilder.modals.continue.back")),1)]),_:1})])]),_:1},512))}}),Ml={id:"email-builder-page",class:"flex flex-wrap p-4 gap-4"},Pl={class:"w-full md:w-full"},Al={key:0,class:"py-5"},Fl={class:"flex flex-wrap py-5"},Il={class:"w-full md:w-2/3 text-center pr-4 border-r border-3 px-2 mb-4"},Ll={class:"flex flex-wrap text-left"},Ol={class:"w-full min-[992px]:w-1/3 px-2 mb-4"},Dl={class:"w-full min-[992px]:w-1/3 px-2 mb-4"},Nl={class:"w-full min-[992px]:w-1/3 px-2 mb-4"},Hl={class:"w-full md:w-1/3 text-center pl-4 px-2 mb-4"},Rl={class:"my-4"},Vl={class:"flex flex-wrap"},zl={key:1,class:"md:px-5 pt-5"},Ul={key:2,class:"md:px-5 py-5"},Yl=te({__name:"email-builder-page",setup(k){const{t:F}=lt(),u=p("start"),M=p(6),x=p(5),h=p(0),c=p([]),y=p(!0),f=p(!1),$=p(""),T=p([]),w=p(null),L=_e(),O=Le(),I=p(!1),H=p([]),j=p(null),D=p(null),E=p(null),A=()=>{j.value?.show()};ge(async()=>{w.value=we(he.NEWSLETTER),w.value&&(w.value.pplocation.value==="1"?(w.value.show_sidebar.value=!1,w.value.show_footer.value=!0):w.value.pplocation.value==="2"&&(w.value.show_sidebar.value=!0,w.value.show_footer.value=!1),T.value=await X(""),H.value=T.value.slice(0,5),H.value.forEach((g,n)=>{g.contentSlot=n}))});const B=P(()=>L.hasFeature("video")?["blog","video"]:["blog"]),N=P(()=>({start:F("emailbuilder.menu.0"),content_selection:F("emailbuilder.menu.1"),build_email:F("emailbuilder.menu.2")})),Z=g=>u.value===g,le=()=>{c.value=[]},R=async(g,n)=>{if(g==="start"){if(!n){D.value?.show();return}le()}else if(g==="build_email"&&c.value.length<x.value&&h.value>=x.value){if(!n){E.value?.show();return}await J("")}u.value=g;const t=document.getElementById("email-step-toolbar");t&&t.scrollIntoView()},z=async g=>{de.trackEvent("engagedContent",{contentType:"Newsletter Builder - Pre-Built",customization:"pre-built"}),y.value=!0,x.value=5;let n=g;["buyers","sellers"].includes(g)||(n=""),await J(n),c.value.forEach((t,r)=>{t.contentSlot=r}),R("build_email")},ne=async g=>{de.trackEvent("engagedContent",{contentType:"Newsletter Builder - Custom",customization:"customized"}),y.value=!1,x.value=g,R("content_selection")},Y=g=>{c.value=c.value.concat(g)},W=g=>{c.value=g.slice(0)},X=async g=>await pe.getContents({page:0,limit:20,types:B.value.join(),language:"all",categories:g}).then(n=>n.content?n.content:(n.error&&($.value=n.error),f.value=!1,[])).catch(()=>[]),J=async g=>{let n=c.value.slice(0);if(f.value)return;f.value=!0,$.value="";const t=await pe.getContents({page:0,limit:20,types:B.value.join(),language:"all",categories:g});if(t.content){if(h.value=t.content.length,t.content.length===0){$.value="No content found",f.value=!1;return}const r=t.content;for(;n.length<x.value&&r.length>0;){const U=r.shift();Q(U)||(n=n.concat(U),Y(U))}}else t.error&&($.value=t.error,h.value=0);f.value=!1},Q=g=>g?c.value.map(n=>n.id).includes(g.id):!1,ie=g=>{w.value&&(w.value=De(w.value,g))},ee=async()=>
1{if(!I.value){I.value=!0;try{await nt.loadProfile(L.authUserId),w.value=we(he.NEWSLETTER)}finally{I.value=!1}}};return re(()=>O.fullProfile,()=>{w.value=we(he.NEWSLETTER)},{deep:!0}),(g,n)=>(s(),V(je,null,{default:d(()=>[e("div",Ml,[e("div",Pl,[a(qe,{steps:N.value,currentStep:u.value,onChange:R,id:"email-step-toolbar"},null,8,["steps","currentStep"]),Z("start")?(s(),v("div",Al,[e("div",null,[e("p",null,[i(b(g.$t("emailbuilder.steps.0.description"))+" ",1),e("a",{href:"#",onClick:ue(A,["prevent"])},b(g.$t("emailbuilder.steps.0.link")),1)])]),e("div",Fl,[e("div",Il,[e("h4",null,b(g.$t("emailbuilder.steps.0.sections.prebuilt.header")),1),e("div",Ll,[e("div",Ol,[a(o(ae),{class:"start-card !mb-0 !p-2 !rounded-xl",hoverable:!1,onClick:n[0]||(n[0]=t=>z("buyers"))},{default:d(()=>[e("h4",null,[n[7]||(n[7]=e("iconify-icon",{icon:"fa6-solid:cart-shopping",class:"xs",inline:""},null,-1)),i(" "+b(g.$t("emailbuilder.steps.0.sections.prebuilt.cards.buyers")),1)]),n[8]||(n[8]=e("img",{src:rt,alt:"",class:"img-thumbnail"},null,-1))]),_:1})]),e("div",Dl,[a(o(ae),{class:"start-card !mb-0 !p-2 !rounded-xl",hoverable:!1,onClick:n[1]||(n[1]=t=>z("sellers"))},{default:d(()=>[e("h4",null,[n[9]||(n[9]=e("iconify-icon",{icon:"fa6-solid:dollar-sign",class:"xs",inline:""},null,-1)),i(" "+b(g.$t("emailbuilder.steps.0.sections.prebuilt.cards.sellers")),1)]),n[10]||(n[10]=e("img",{src:ut,alt:"",class:"img-thumbnail"},null,-1))]),_:1})]),e("div",Nl,[a(o(ae),{class:"start-card !mb-0 !p-2 !rounded-xl",hoverable:!1,onClick:n[2]||(n[2]=t=>z("latest"))},{default:d(()=>[e("h4",null,[n[11]||(n[11]=e("iconify-icon",{icon:"fa6-solid:newspaper",class:"xs",inline:""},null,-1)),i(" "+b(g.$t("emailbuilder.steps.0.sections.prebuilt.cards.latest")),1)]),n[12]||(n[12]=e("img",{src:dt,alt:"",class:"img-thumbnail"},null,-1))]),_:1})])])]),e("div",Hl,[e("h4",null,b(g.$t("emailbuilder.steps.0.sections.select.header")),1),e("p",Rl,b(g.$t("emailbuilder.steps.0.sections.select.header"))+" "+b(g.$t("emailbuilder.steps.0.sections.select.description.0"))+" "+b(M.value)+" "+b(g.$t("emailbuilder.steps.0.sections.select.description.1")),1),e("div",Vl,[(s(!0),v(G,null,K(M.value,t=>(s(),v("div",{key:"select-slots"+t,class:"w-full sm:w-1/2 min-[992px]:w-1/3 px-2 mb-4"},[a(o(ae),{class:"start-card !mb-4 !p-2",hoverable:!1,onClick:r=>ne(t)},{default:d(()=>[e("h4",null,b(t),1)]),_:2},1032,["onClick"])]))),128)),a(Ye,{class:"text-left"})])])])])):_("",!0),Z("content_selection")&&w.value?(s(),v("div",zl,[a(Zt,{ref:"stepTwo",selectedContent:c.value,contentSlots:x.value,initialContent:T.value,settings:w.value,onUpdateSelectedContent:W,onToggleContent:Y,onForward:n[3]||(n[3]=t=>R("build_email"))},null,8,["selectedContent","contentSlots","initialContent","settings"])])):_("",!0),Z("build_email")&&w.value?(s(),v("div",Ul,[a(xl,{selectedContent:c.value,contentSlots:x.value,settings:w.value,loadingProfile:I.value,prebuilt:y.value,onUpdateBuilderSettings:ie,onRefreshProfileSettings:ee,onBack:n[4]||(n[4]=t=>R("content_selection"))},null,8,["selectedContent","contentSlots","settings","loadingProfile","prebuilt"])])):_("",!0)])]),H.value&&w.value?(s(),V(Sl,{key:0,ref_key:"previewSampleModal",ref:j,content:H.value,settings:w.value},null,8,["content","settings"])):_("",!0),a(Tl,{ref_key:"startOverModal",ref:D,onResetEmail:n[5]||(n[5]=t=>R("start",!0))},null,512),a(Bl,{ref_key:"continueModal",ref:E,onBuildEmail:n[6]||(n[6]=t=>R("build_email",!0))},null,512)]),_:1}))}}),rn=Oe(Yl,[["__scopeId","data-v-b21dc542"]]);export{rn as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.