const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["js/unsubscribe-DVRoLsiA.js?v=1773287522785","js/index-BTglIPU2.js?v=1773287522785","js/vue-core-DJjvd5ZC.js?v=1773287522785","js/prismjs-BZPoR7_J.js?v=1773287522785","css/prismjs-D-3FhBe_.css?v=1773287522785","js/naive-ui--dJnpVcV.js?v=1773287522785","css/index-DEM1fxGq.css?v=1773287522785","js/index.vue_vue_type_script_setup_true_lang-D8O2mMsP.js?v=1773287522785","js/mail-COTHIXbY.js?v=1773287522785","js/index-CO4dbYz3.js?v=1773287522785","js/index.vue_vue_type_script_setup_true_lang-DgjjuUjT.js?v=1773287522785","js/index.vue_vue_type_script_setup_true_lang-B7YvCBmY.js?v=1773287522785","css/index-CVIzYRIt.css?v=1773287522785","js/index.vue_vue_type_script_setup_true_lang-C5hb-Th7.js?v=1773287522785","js/data-BVsViUMm.js?v=1773287522785","js/index.vue_vue_type_script_setup_true_lang-BeO8Hyma.js?v=1773287522785","js/campaign-CYIboXPk.js?v=1773287522785","js/useTableData-BmkIKQ_R.js?v=1773287522785"])))=>i.map(i=>d[i]); var GV=Object.defineProperty;var KV=(e,t,n)=>t in e?GV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var B5=(e,t,n)=>KV(e,typeof t!="symbol"?t+"":t,n);import{_ as XV}from"./index-BRQskX9P.js?v=1773287522785";import{bo as YV,i as pt,w as vo,ce as ZV,cf as JV,cg as Pb,ch as hp,ci as gp,t as Jh,Q as Zm,c as gt,n as Un,c2 as Ro,_ as Qh,aK as ZI,p as No,aq as zc,cj as bt,k as P5,P as JI,m as Hc,h as lo,ap as QI,v as Jm,x as gl,l as f1,as as d1,a3 as ZD}from"./index-BTglIPU2.js?v=1773287522785";import{r as ie,k as re,an as ft,$ as Y,Z as ae,F as Pt,a0 as C,a9 as P,_ as $,a6 as ju,X as ze,S as _,j as ye,ak as $n,e as tt,aa as ke,a8 as De,R as Hn,al as _n,ap as eg,o as Mi,w as qo,c as ve,n as yr,ao as Dr,L as Di,q as br,a4 as QV,N as An,t as p1,b as h1,K as wf,l as Go,v as Ko,H as er,a3 as ej,i as eW,p as tj,y as Xo,aj as Qm,x as JD,P as co,ad as QD,u as tW,s as nW,am as nj}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import{d as rW,s as rj,f as oj,a as oW,c as iW,h as aW,i as e4,j as ij,k as uW,l as sW,m as lW,n as cW,o as fW,p as dW,q as F5,r as pW,t as hW,u as gW,v as vW,w as mW,x as yW,y as bW,z as wW,A as _W,B as M5,C as xW,D as aj,E as CW,F as SW,G as EW,H as DW,I as kW,J as I5,K as OW,L as AW,M as j5,N as TW,O as BW,P as PW,Q as uj,R as FW,S as MW,g as IW,T as jW,U as LW}from"./campaign-CYIboXPk.js?v=1773287522785";import{_ as RW}from"./index.vue_vue_type_script_setup_true_lang-DCuz-_aa.js?v=1773287522785";import{a3 as So,ag as vl,ah as sj,B as Dn,n as Oc,a8 as ha,a9 as tg,an as lj,am as cj,a6 as Kr,a1 as dr,b as Tr,p as Rt,aO as av,a4 as ng,_ as fj,aP as Dp,aM as L5,aD as NW,aq as dj,as as pj,au as $W,av as UW,Z as hj,$ as gj,aC as Lu,ac as zW,a7 as HW,k as VW,a2 as t4,m as WW}from"./naive-ui--dJnpVcV.js?v=1773287522785";import{_ as Jo}from"./index.vue_vue_type_script_setup_true_lang-BeO8Hyma.js?v=1773287522785";import{u as Qo}from"./useTableData-BmkIKQ_R.js?v=1773287522785";import{_ as qW}from"./index-CWSeZZK7.js?v=1773287522785";import{_ as rg}from"./index.vue_vue_type_script_setup_true_lang-DeTfbeeM.js?v=1773287522785";import{_ as ga}from"./index.vue_vue_type_script_setup_true_lang-DgjjuUjT.js?v=1773287522785";import{u as Eo}from"./useLoading-CZ2gSAW7.js?v=1773287522785";import{b as GW,c as KW,a as XW,i as YW,d as ZW,e as JW,s as QW,f as eq,h as tq}from"./mail-COTHIXbY.js?v=1773287522785";import{_ as ml}from"./index.vue_vue_type_script_setup_true_lang-C5hb-Th7.js?v=1773287522785";import{u as Ru,g as nq}from"./useTableColumns-DDeyYvje.js?v=1773287522785";import{_ as Br}from"./index.vue_vue_type_script_setup_true_lang-D8O2mMsP.js?v=1773287522785";import{c as rq,g as vj}from"./data-BVsViUMm.js?v=1773287522785";import{_ as n4}from"./index-DIKmrNCq.js?v=1773287522785";import{o as g1}from"./upload-CD_WMkIS.js?v=1773287522785";import{g as Yi}from"./index-DRk77PlU.js?v=1773287522785";import{_ as mj}from"./index-lEMZglLp.js?v=1773287522785";import{g as yj}from"./file-B5PwfK2h.js?v=1773287522785";import{_ as v1}from"./index.vue_vue_type_script_setup_true_lang-HxsqzSKU.js?v=1773287522785";import{a as oq}from"./prismjs-BZPoR7_J.js?v=1773287522785";import{_ as r4}from"./index.vue_vue_type_script_setup_true_lang-D2Bk83Ev.js?v=1773287522785";import{_ as iq}from"./index-CZps0rIN.js?v=1773287522785";import{c as aq}from"./copy-D-wIKr0q.js?v=1773287522785";import"./index.vue_vue_type_script_setup_true_lang-B7YvCBmY.js?v=1773287522785";import"./index-S15tYq5l.js?v=1773287522785";import"./index-Cg6fMjw6.js?v=1773287522785";function R5(e,t,n){return Array.isArray(e)?(e.length=Math.max(e.length,t),e.splice(t,1,n),n):(e[t]=n,n)}const gm=YV("menu-mail-market","overview"),aC=ie(null),Xi=ie(!1),Va=ie(-1),kc=class kc{constructor(){}static getInstance(){return kc.instance||(kc.instance=JV()),kc.instance}};B5(kc,"instance");let uC=kc;const Js=ie(!1),kp=ie(""),Ya=ie({type:"today",data:uq()});function uq(){const{start:e,end:t}=ZV(new Date);return[e.getTime(),t.getTime()]}function va(){const e=uC.getInstance();function t(){return{...kp.value?{domain:kp.value}:{},start_time:Math.floor(Ya.value.data[0]/1e3),end_time:Math.floor(Ya.value.data[1]/1e3)}}async function n(){try{Js.value=!0;const{message:i}=await rW(t());pt(i)&&e.trigger(i)}finally{Js.value=!1}}return{getRate:i=>i>=0?"".concat(i,"%"):"--",getChartTime:(i,a)=>{let u=new Date;return i==="hourly"?(u.setMinutes(0),u.setSeconds(0),u.setHours(a)):i==="daily"&&(u=new Date(a*1e3)),vo(u)},getOverview:n,getParams:t,onResult:e.on}}const sq={class:"w-240px ml-8px"},lq=re({__name:"date",props:{type:{},typeModifiers:{},value:{default:()=>[]},valueModifiers:{}},emits:["update:type","update:value"],setup(e){const t=ft(e,"type"),n=ft(e,"value");function r(s=new Date){const l=hp(s),c=gp(s);return[l.getTime(),c.getTime()]}const o=()=>{const s=new Date,l=gp(s);return[hp(Pb(s,-6)).getTime(),l.getTime()]},i=s=>{switch(s){case"today":n.value=r();break;case"yesterday":n.value=r(Pb(new Date,-1));break;case"7day":n.value=o();break}},a=s=>{const l=new Date,c=Pb(l,-30);return hp(c).getTime()>s||gp(l).getTime(){t.value="custom",n.value=[hp(s[0]).getTime(),gp(s[1]).getTime()]};return(s,l)=>{const c=vl,f=So,p=sj;return Y(),ae(Pt,null,[C(f,{value:t.value,"onUpdate:value":[l[0]||(l[0]=d=>t.value=d),i]},{default:P(()=>[C(c,{label:s.$t("Public.Search.Today"),value:"today"},null,8,["label"]),C(c,{label:s.$t("Public.Search.Yesterday"),value:"yesterday"},null,8,["label"]),C(c,{label:s.$t("Public.Search.Last7"),value:"7day"},null,8,["label"])]),_:1},8,["value"]),$("div",sq,[C(p,{value:n.value,type:"daterange","is-date-disabled":a,"onUpdate:value":u},null,8,["value"])])],64)}}}),cq={class:"flex items-center justify-between"},fq={class:"flex items-center gap-16px"},dq={class:"w-240px"},pq={key:0},hq={class:"flex items-center"},gq=re({__name:"index",setup(e){const t=Jh(),{getOverview:n}=va(),{isFree:r}=ju(t),o=()=>{Zm({source:324})},i=()=>{n()},a=()=>{n()};return(u,s)=>{const l=Dn;return Y(),ae("div",cq,[$("div",fq,[$("div",dq,[C(RW,{value:_(kp),"onUpdate:value":[s[0]||(s[0]=c=>ze(kp)?kp.value=c:null),i]},null,8,["value"])]),_(r)?(Y(),ae("div",pq,[s[4]||(s[4]=$("span",{class:"mr-8px"},"Upgrade to Pro Edition to unlock all reports immediately",-1)),C(l,{type:"primary",size:"small",ghost:"",onClick:o},{default:P(()=>s[3]||(s[3]=[ye("Upgrade Now")])),_:1,__:[3]})])):$n("",!0)]),$("div",hq,[C(lq,{type:_(Ya).type,"onUpdate:type":s[1]||(s[1]=c=>_(Ya).type=c),value:_(Ya).data,"onUpdate:value":[s[2]||(s[2]=c=>_(Ya).data=c),a]},null,8,["type","value"])])])}}}),vq={class:"rate-box"},mq={class:"rate-list"},yq={class:"rate-text"},bq={class:"rate-list"},wq={class:"rate-text"},_q={class:"rate-list"},xq={class:"rate-text"},Cq={class:"rate-list"},Sq={class:"rate-text"},Eq=re({__name:"index",setup(e){const{onResult:t,getRate:n}=va(),r=tt({delivery:0,open:0,click:0,bounce:0});return t(o=>{r.delivery=o.dashboard.delivery_rate,r.open=o.dashboard.open_rate,r.click=o.dashboard.click_rate,r.bounce=o.dashboard.bounce_rate}),(o,i)=>(Y(),ae("div",vq,[$("div",mq,[i[0]||(i[0]=$("div",{class:"rate-title"},"Delivered",-1)),$("div",yq,ke("".concat(_(r).delivery,"%")),1)]),$("div",bq,[i[1]||(i[1]=$("div",{class:"rate-title"},"Open",-1)),$("div",wq,ke(_(n)(_(r).open)),1)]),$("div",_q,[i[2]||(i[2]=$("div",{class:"rate-title"},"Click",-1)),$("div",xq,ke(_(n)(_(r).click)),1)]),$("div",Cq,[i[3]||(i[3]=$("div",{class:"rate-title"},"Bounce",-1)),$("div",Sq,ke(_(n)(_(r).bounce)),1)])]))}}),Dq=gt(Eq,[["__scopeId","data-v-a72fecba"]]),kq=re({__name:"index",setup(e){const{getRate:t,onResult:n}=va(),{table:r,columns:o}=Qo([{key:"mail_provider",title:"Mail Provider",ellipsis:{tooltip:!0}},{key:"delivery_rate",title:"Delivered",render:i=>t(i.delivery_rate)},{key:"open_rate",title:"Open",render:i=>t(i.open_rate)},{key:"click_rate",title:"Click",render:i=>t(i.click_rate)},{key:"bounce_rate",title:"Bounce",render:i=>t(i.bounce_rate)}]);return n(i=>{r.data=i.mail_providers}),(i,a)=>{const u=Jo;return Y(),De(u,{"min-height":276,"max-height":276,bordered:!1,loading:_(Js),data:_(r).data,columns:_(o)},null,8,["loading","data","columns"])}}}),Oq=gt(kq,[["__scopeId","data-v-be528f51"]]),Aq={class:"p-20px"},Tq=re({__name:"error",setup(e){const{t}=Hn(),{getParams:n}=va(),{loading:r,setLoading:o}=Eo(),{table:i,columns:a}=Qo([{key:"recipient",title:t("Mail.Mass.index_50"),width:160,render:l=>C(Oc,{class:l.tooltip?"":"break-all!","line-clamp":l.tooltip?999:1,tooltip:!1},{default:()=>[l.recipient]})},{key:"dsn",title:"Dsn",width:60},{key:"delay",title:t("Mail.Mass.index_51"),width:70},{key:"delays",title:t("Mail.Mass.index_52"),width:150},{key:"status",title:t("Public.Table.Status"),width:100,ellipsis:{tooltip:!0},render:l=>l.status},{key:"relay",title:t("Mail.Mass.index_53"),width:200,render:l=>C(Oc,{class:l.tooltip?"":"break-all!","line-clamp":l.tooltip?9999:1,tooltip:!1},{default:()=>[l.relay]})},{key:"description",title:t("Public.Btn.Details"),render:l=>C(Oc,{class:l.tooltip?"":"break-all!","line-clamp":l.tooltip?9999:1,tooltip:!1},{default:()=>[l.description]})}]),u=l=>({onMousemove:()=>{l.tooltip=!0},onMouseleave:()=>{l.tooltip=!1}});return(async()=>{try{o(!0);const l=n(),{message:c}=await GW({...l.domain?{domain:l.domain}:{},start:l.start_time,end:l.end_time});i.data=Un(c)?c.map(f=>({...f,tooltip:!1})):[]}finally{o(!1)}})(),(l,c)=>{const f=Jo,p=ga;return Y(),ae("div",Aq,[C(p,null,{table:P(()=>[C(f,{"max-height":600,loading:_(r),data:_(i).data,columns:_(a),"row-props":u},null,8,["loading","data","columns"])]),_:1})])}}}),Bq={class:"total-list"},Pq={class:"total-item"},Fq={class:"total-value text-primary"},Mq={class:"total-item"},Iq={class:"total-value text-primary"},jq={class:"total-failed"},Lq={class:"failed-item"},Rq={class:"total-value"},Nq={class:"failed-item"},$q={class:"total-label"},Uq={class:"total-value"},zq=re({__name:"index",setup(e){const{t}=Hn(),{onResult:n,getChartTime:r,getOverview:o}=va(),i=Ro("--chart-tooltip-bg-color"),a=Ro("--color-text-2"),u=Ro("--color-border"),s=_n("chartRef"),l=ie({delivered:0,delivery_rate:0,failed:0,failure_rate:0,sends:0}),c=ie(!1),f=async y=>{await ZI({source:361}),await rj({operation:y?1:0})};(async()=>{const{message:y}=await oj();pt(y)&&(c.value=y.abnormal_mail_check_switch)})();const d=()=>{No({title:t("Mail.Overview.today_9"),width:980,component:Tq})},m=eg({tooltip:{trigger:"axis",order:"seriesDesc",backgroundColor:i.value,borderColor:"transparent",textStyle:{color:"#c7c7c7"},axisPointer:{type:"shadow"}},legend:{top:0,itemGap:16,icon:"circle",itemWidth:10,itemHeight:10,data:[t("Mail.Overview.today_2"),t("Mail.Overview.today_3")],textStyle:{color:a.value,lineHeight:12,padding:[0,0,-2,0],rich:{a:{verticalAlign:"middle"}}}},grid:{top:"16%",left:"2%",right:"2%",bottom:"4%",containLabel:!0},yAxis:{type:"value",boundaryGap:[0,"6%"],splitLine:{show:!0,lineStyle:{type:"dashed",width:1,color:u.value}}},xAxis:v(),series:[{type:"bar",name:t("Mail.Overview.today_3"),data:[]},{type:"bar",name:t("Mail.Overview.today_2"),data:[]}]});function v(y="HH:mm"){return{type:"category",axisLabel:{formatter:g=>vo(g,y)}}}const h=y=>{const g=[],b=[];y.data.forEach(w=>{g.push([r(y.column_type,w.x),w.failed,y.column_type]),b.push([r(y.column_type,w.x),w.delivered,y.column_type])}),m.series=[{type:"bar",name:t("Mail.Overview.today_3"),data:g,stack:"total",itemStyle:{color:"#1A519B"}},{type:"bar",name:t("Mail.Overview.today_2"),data:b,stack:"total",itemStyle:{color:"#91CC75"}}],m.xAxis=v(y.column_type==="hourly"?"HH:mm":"yyyy-MM-dd")};return n(y=>{y.send_mail_chart&&(l.value=y.send_mail_chart.dashboard,h(y.send_mail_chart))}),Mi(()=>{setTimeout(()=>{s.value&&s.value.getChart().on("click",g=>{if(g.componentSubType==="bar"&&Un(g.value)&&g.value[2]==="daily"){const b=new Date(g.value[0]);Ya.value.type="custom",Ya.value.data=[hp(b).getTime(),gp(b).getTime()],o()}})},1e3)}),(y,g)=>{const b=Qh,w=qW,x=ha,k=tg;return Y(),ae(Pt,null,[g[7]||(g[7]=$("div",{class:"mb-20px font-bold text-20px text-font2"},"Send today",-1)),$("div",Bq,[$("div",Pq,[g[1]||(g[1]=$("div",{class:"total-label"},"Success rate",-1)),$("div",Fq,ke(_(l).delivery_rate)+"%",1)]),$("div",Mq,[g[2]||(g[2]=$("div",{class:"total-label"},"Success",-1)),$("div",Iq,ke(_(l).delivered),1)]),$("div",jq,[$("div",Lq,[g[4]||(g[4]=$("div",{class:"total-label"},[$("span",null,"Failed")],-1)),$("div",Rq,[$("span",{class:"text-primary cursor-pointer",onClick:d},ke(_(l).failed),1),C(b,{class:"ml-6px text-12px!",onClick:d},{default:P(()=>g[3]||(g[3]=[ye("Details")])),_:1,__:[3]})])]),$("div",Nq,[$("div",$q,[g[6]||(g[6]=$("span",{class:"mr-6px"},"Auto block failed emails",-1)),C(w,null,{default:P(()=>g[5]||(g[5]=[$("p",null," When email delivery status is 'Bounced', emails will be automatically added to the blocked list. ",-1),$("p",null,"New mailing tasks will exclude these emails to maintain IP and domain reputation.",-1)])),_:1,__:[5]})]),$("div",Uq,[C(x,{value:_(c),"onUpdate:value":[g[0]||(g[0]=D=>ze(c)?c.value=D:null),f],size:"small"},null,8,["value"])])])])]),C(k,{class:"w-100% h-200px",show:_(Js)},{default:P(()=>[C(rg,{ref_key:"chartRef",ref:s,type:"bar",height:"200",option:_(m)},null,8,["option"])]),_:1},8,["show"])],64)}}}),Hq=gt(zq,[["__scopeId","data-v-1decb7ed"]]),o4=re({name:"AuthBox",setup(e,{slots:t}){const n=Jh(),{isFree:r}=ju(n);return()=>{var o;return C(Pt,null,[r.value?C("div",{class:"text-14px color-desc"},[ye("Pro Edition Exclusive Features")]):(o=t.default)==null?void 0:o.call(t)])}}}),Vq={class:"flex-center h-200px"},Wq=re({__name:"unique",setup(e){const t=Ro("--chart-tooltip-bg-color"),n=Ro("--color-border"),{onResult:r,getChartTime:o}=va(),i=eg({tooltip:{trigger:"axis",order:"seriesDesc",backgroundColor:t.value,borderColor:"transparent",textStyle:{color:"#c7c7c7"},axisPointer:{type:"shadow"}},grid:{top:"16%",left:"2%",right:"2%",bottom:"2%",containLabel:!0},yAxis:{type:"value",splitLine:{show:!0,lineStyle:{type:"dashed",width:1,color:n.value}},name:"%",max:({max:s})=>s>100?100:s},xAxis:a(),series:u()});function a(s="HH:mm"){return{type:"category",axisLabel:{formatter:l=>vo(l,s)}}}function u(s=[]){return[{name:"Unique Open Rate",type:"line",data:s,itemStyle:{color:"#1a519b"},smooth:!1,showSymbol:!1,sampling:"average"}]}return r(s=>{const{open_rate_chart:l}=s;if(l){const c=l.data.map(f=>[o(l.column_type,f.x),f.open_rate]);i.series=u(c),i.xAxis=a(l.column_type==="hourly"?"HH:mm":"yyyy-MM-dd")}}),(s,l)=>{const c=tg;return Y(),ae(Pt,null,[l[0]||(l[0]=$("div",{class:"mb-16px font-bold text-20px text-font2"},"Unique Open Rate %",-1)),$("div",Vq,[C(_(o4),null,{default:P(()=>[C(c,{class:"w-100%",show:_(Js)},{default:P(()=>[C(rg,{height:200,option:_(i)},null,8,["option"])]),_:1},8,["show"])]),_:1})])],64)}}}),qq={class:"flex-center h-200px"},Gq=re({__name:"click",setup(e){const t=Ro("--chart-tooltip-bg-color"),n=Ro("--color-border"),{onResult:r,getChartTime:o}=va(),i=eg({tooltip:{trigger:"axis",order:"seriesDesc",backgroundColor:t.value,borderColor:"transparent",textStyle:{color:"#c7c7c7"},axisPointer:{type:"shadow"}},grid:{top:"16%",left:"2%",right:"2%",bottom:"2%",containLabel:!0},yAxis:{name:"%",type:"value",boundaryGap:[0,"6%"],splitLine:{show:!0,lineStyle:{type:"dashed",width:1,color:n.value}},max:({max:s})=>s>100?100:s},xAxis:a(),series:u()});function a(s="HH:mm"){return{type:"category",axisLabel:{formatter:l=>vo(l,s)}}}function u(s=[]){return[{name:"Click Rate",type:"line",data:s,itemStyle:{color:"#1a519b"},smooth:!1,showSymbol:!1,sampling:"average"}]}return r(s=>{const{click_rate_chart:l}=s;if(l){const c=l.data.map(f=>[o(l.column_type,f.x),f.click_rate]);i.series=u(c),i.xAxis=a(l.column_type==="hourly"?"HH:mm":"yyyy-MM-dd")}}),(s,l)=>{const c=tg;return Y(),ae(Pt,null,[l[0]||(l[0]=$("div",{class:"mb-16px font-bold text-20px text-font2"},"Click Rate %",-1)),$("div",qq,[C(_(o4),null,{default:P(()=>[C(c,{class:"w-100%",show:_(Js)},{default:P(()=>[C(rg,{height:200,option:_(i)},null,8,["option"])]),_:1},8,["show"])]),_:1})])],64)}}}),Kq={class:"flex-center h-200px"},Xq=re({__name:"bounce",setup(e){const t=Ro("--chart-tooltip-bg-color"),n=Ro("--color-border"),{onResult:r,getChartTime:o}=va(),i=eg({tooltip:{trigger:"axis",order:"seriesDesc",backgroundColor:t.value,borderColor:"transparent",textStyle:{color:"#c7c7c7"},axisPointer:{type:"shadow"}},grid:{top:"16%",left:"2%",right:"2%",bottom:"2%",containLabel:!0},yAxis:{name:"%",type:"value",splitLine:{show:!0,lineStyle:{type:"dashed",width:1,color:n.value}},max:({max:s})=>s>100?100:s},xAxis:a(),series:u()});function a(s="HH:mm"){return{type:"category",axisLabel:{formatter:l=>vo(l,s)}}}function u(s=[]){return[{name:"Bounce Rate",type:"line",data:s,itemStyle:{color:"#20a53a"},smooth:!1,showSymbol:!1,sampling:"average"}]}return r(s=>{const{bounce_rate_chart:l}=s;if(l){const c=l.data.map(f=>[o(l.column_type,f.x),f.bounce_rate]);i.series=u(c),i.xAxis=a(l.column_type==="hourly"?"HH:mm":"yyyy-MM-dd")}}),(s,l)=>{const c=tg;return Y(),ae(Pt,null,[l[0]||(l[0]=$("div",{class:"mb-16px font-bold text-20px text-font2"},"Bounce Rate %",-1)),$("div",Kq,[C(_(o4),null,{default:P(()=>[C(c,{class:"w-100%",show:_(Js)},{default:P(()=>[C(rg,{height:200,option:_(i)},null,8,["option"])]),_:1},8,["show"])]),_:1})])],64)}}}),Yq={class:"overview-card"},Zq={class:"overview-card"},Jq={class:"overview-card"},Qq={class:"overview-card"},eG={class:"overview-card"},tG=re({__name:"index",setup(e){const{getOverview:t}=va();return t(),(n,r)=>{const o=lj,i=cj;return Y(),ae("div",null,[C(gq),C(Dq),C(i,{class:"mt-16px","x-gap":"16","y-gap":"16",cols:2},{default:P(()=>[C(o,null,{default:P(()=>[$("div",Yq,[C(Oq)])]),_:1}),C(o,null,{default:P(()=>[$("div",Zq,[C(Hq)])]),_:1}),C(o,null,{default:P(()=>[$("div",Jq,[C(Wq)])]),_:1}),C(o,null,{default:P(()=>[$("div",Qq,[C(Gq)])]),_:1}),C(o,null,{default:P(()=>[$("div",eG,[C(Xq)])]),_:1})]),_:1})])}}}),nG=gt(tG,[["__scopeId","data-v-430df597"]]);function rG(e){const t=ie(0),{mainHeight:n,footerHeight:r}=ju(Jh());return qo(()=>n.value,i=>{yr(()=>{if(!e.value)return;const{top:a}=e.value.getBoundingClientRect();t.value=i-a-16-16-r.value})},{immediate:!0}),{height:ve(()=>t.value===0?"auto":t.value+"px")}}const oG="/static/vite/images/unsubscribe-C7VkuZUt.png",iG=re({__name:"template",props:{value:{},valueModifiers:{}},emits:["update:value"],setup(e,{expose:t}){const n=ft(e,"value"),r=ie([]),{loading:o,setLoading:i}=Eo(),a=async()=>{try{i(!0);const{message:u}=await oW();Un(u)&&u.length>0&&(r.value=u.map(s=>({label:s.name,value:s.id})),n.value||(n.value=u[0].id))}finally{i(!1)}};return a(),t({getList:a}),(u,s)=>{const l=Kr;return Y(),De(l,{value:n.value,"onUpdate:value":s[0]||(s[0]=c=>n.value=c),loading:_(o),filterable:!0,options:_(r)},null,8,["value","loading","options"])}}}),aG={class:"w-170px mr-10px"},uG={class:"w-180px"},sG=re({__name:"sender",props:{value:{},valueModifiers:{}},emits:Dr(["change"],["update:value"]),setup(e,{emit:t}){const n=t,r=ie(null),o=ft(e,"value"),i=ie([]),a=ve(()=>u.value.filter(h=>h.domain===r.value).map(h=>({data:h,label:h.username,value:h.username}))),u=ie([]),s=(h,y)=>{const{data:g}=y;pt(g)&&n("change",g.full_name)},l=ie(!1),c=ie(!1),f=async()=>{try{l.value=!0;const{message:h}=await KW();Un(h)&&(i.value=h.map(y=>({label:y,value:y})),r.value=h[0]||null)}finally{l.value=!1}},p=async()=>{try{c.value=!0;const{message:h}=await XW();Un(h)&&h.length>0&&(u.value=h)}finally{c.value=!1}},d=()=>{if(a.value[0]){const{data:h}=a.value[0];o.value="".concat(a.value[0].value),pt(h)&&n("change",h.full_name)}else o.value=null,n("change","")},m=()=>{d()};return(async()=>{if(await Promise.all([f(),p()]),o.value){for(const h of u.value)if(h.username===o.value){r.value=h.domain;break}}else d()})(),(h,y)=>{const g=Kr;return Y(),ae(Pt,null,[$("div",aG,[C(g,{value:_(r),"onUpdate:value":[y[0]||(y[0]=b=>ze(r)?r.value=b:null),m],loading:_(l),options:_(i)},null,8,["value","loading","options"])]),$("div",uG,[C(g,{value:o.value,"onUpdate:value":[y[1]||(y[1]=b=>o.value=b),s],loading:_(c),options:_(a)},null,8,["value","loading","options"])])],64)}}}),lG={class:"flex items-center mb-8px"},cG={class:"ml-40px"},bj=re({__name:"import",props:Dr({path:{default:""},accept:{default:()=>[]}},{value:{},valueModifiers:{}}),emits:["update:value"],setup(e){const t=e,{path:n,accept:r}=t,o=ft(e,"value"),i=()=>{g1({path:n,size:5,uploadData:{accept:r.map(a=>".".concat(a)).join(","),multiple:!1},onUploadSuccess:a=>{o.value=a[0].name}})};return(a,u)=>{const s=Dn;return Y(),ae("div",null,[$("div",lG,[C(s,{onClick:i},{default:P(()=>[ye(ke(a.$t("Public.Btn.Import")),1)]),_:1}),$("div",cG,[ye(ke(a.$t("Mail.Mass.index_43"))+" ",1),$("span",{class:Di(o.value?"text-primary":"text-error")},ke(o.value||a.$t("Mail.Mass.index_44")),3)])]),br(a.$slots,"default")])}}}),fG={class:"p-20px"},dG={class:"w-250px"},pG=re({__name:"type-create",props:{refresh:{}},setup(e,{expose:t}){const n=e,{refresh:r}=n,o=ie(null),i=tt({mail_type:"",file:""}),a={mail_type:{required:!0,message:"Please enter group name",trigger:["blur","input"]},file:{required:!0,message:"Please upload file",trigger:["blur","change"]}},u=()=>{zc("/www/server/panel/plugin/mail_sys/data/example_recipients.txt")};return t({onConfirm:async()=>{var l;await((l=o.value)==null?void 0:l.validate()),await YW({...i}),r==null||r()}}),(l,c)=>{const f=Tr,p=dr,d=Br,m=Qh,v=n4;return Y(),ae("div",fG,[C(d,{ref_key:"formRef",ref:o,model:_(i),rules:a},{default:P(()=>[C(p,{label:"Group name",path:"mail_type"},{default:P(()=>[$("div",dG,[C(f,{type:"text",value:_(i).mail_type,"onUpdate:value":c[0]||(c[0]=h=>_(i).mail_type=h),placeholder:"Please enter group name"},null,8,["value"])])]),_:1}),C(p,{label:"Emails",path:"file"},{default:P(()=>[C(bj,{value:_(i).file,"onUpdate:value":c[1]||(c[1]=h=>_(i).file=h),path:"/www/server/panel/data/mail/in_bulk/recipient",accept:["txt","json"]},null,8,["value"])]),_:1})]),_:1},8,["model"]),C(v,{class:"mt-4px"},{default:P(()=>[$("li",null,[c[3]||(c[3]=ye(" File type:txt/json One mailbox per line Not more than 5 MB ")),C(m,{target:"_blank",onClick:u},{default:P(()=>c[2]||(c[2]=[ye("Download the template")])),_:1,__:[2]})])]),_:1})])}}}),hG={class:"flex-1"},gG={class:"flex items-center"},vG={class:"w-260px"},mG={class:"ml-10px"},yG={class:"mt-8px"},bG=re({__name:"type",props:{value:{},valueModifiers:{},name:{},nameModifiers:{}},emits:["update:value","update:name"],setup(e,{expose:t}){const n=ft(e,"value"),r=ft(e,"name"),o=ie([]),i=ie([]),a=ie(0),{loading:u,setLoading:s}=Eo(),l=async()=>{try{s(!0);const{message:p}=await iW();Un(p)&&(i.value=p,o.value=p.map(d=>({label:d.mail_type,value:d.id})))}finally{s(!1)}},c=async p=>{r.value=i.value.filter(m=>p.includes(m.id)).map(m=>m.mail_type);const{message:d}=await aW({etypes:p.join(",")});pt(d)&&(a.value=d.result)},f=()=>{No({title:"Create New Group",width:480,footer:!0,data:{refresh:l},component:pG})};return l(),t({getType:l}),(p,d)=>{const m=Kr,v=Qh;return Y(),ae("div",hG,[$("div",gG,[$("div",vG,[C(m,{value:n.value,"onUpdate:value":[d[0]||(d[0]=h=>n.value=h),c],options:_(o),multiple:!0,filterable:!0,loading:_(u),placeholder:"Please select recipients with groups"},null,8,["value","options","loading"])]),$("div",mG,[C(v,{onClick:f},{default:P(()=>d[1]||(d[1]=[ye("Create")])),_:1,__:[1]})])]),$("div",yG,[d[2]||(d[2]=ye("Send Emails (")),$("b",null,ke(_(a)),1),d[3]||(d[3]=ye(" Recipients)"))])])}}}),og=QV("email-editor",()=>{const e=ie("2.1"),t=ie({meta:{version:e.value,createdAt:"",updatedAt:""},style:{backgroundColor:"#ffffff",width:"500px"}}),n=ie([]),r=ie({}),o=ie({}),i=ie({}),a=ie({}),u=ie({}),s=ie({}),l=ie(""),c=ie(""),f=ie(async()=>!1);return{version:e,pageConfig:t,columnsSource:n,columnsMap:r,columnsConfigMap:o,cellMap:i,cellConfigMap:a,blockMap:u,blockConfigMap:s,selectedBlockKey:l,selectedBlockType:c,saveFn:f}}),wj={key:"",name:"Columns",type:"columns",meta:{version:"",createdAt:"",updatedAt:""},attr:{},style:{backgroundColor:"",padding:{more:!1,all:"0",top:"0",left:"0",right:"0",bottom:"0"}},containerStyle:{backgroundColor:""}},_j={key:"",name:"Cell",type:"cell",meta:{version:"",createdAt:"",updatedAt:""},attr:{},style:{backgroundColor:"",padding:{more:!1,all:"0",top:"0",left:"0",right:"0",bottom:"0"},border:{more:!1,all:{color:"",width:"0",style:"solid"},top:{color:"",width:"0",style:"solid"},right:{color:"",width:"0",style:"solid"},bottom:{color:"",width:"0",style:"solid"},left:{color:"",width:"0",style:"solid"}}},containerStyle:{}},sC={key:"",name:"Button",type:"button",meta:{version:"",createdAt:"",updatedAt:""},attr:{href:"#",target:"_blank",content:"Button Text"},style:{display:"inline-block",backgroundColor:"#20A53A",color:"#fff",width:"auto",fontWeight:"normal",fontSize:"14px",lineHeight:"120%",letterSpacing:"0px",boxSizing:"border-box",textDecoration:"none",padding:{more:!0,all:"0",top:"10px",left:"20px",right:"20px",bottom:"10px"},border:{more:!1,all:{color:"",width:"0",style:"solid"},top:{color:"",width:"0",style:"solid"},right:{color:"",width:"0",style:"solid"},bottom:{color:"",width:"0",style:"solid"},left:{color:"",width:"0",style:"solid"}},borderRadius:{more:!1,all:"4px",top:"0",left:"0",right:"0",bottom:"0"}},containerStyle:{textAlign:"center",padding:{more:!1,all:"10px",top:"0",left:"0",right:"0",bottom:"0"}}},xj={key:"",name:"Link",type:"link",meta:{version:"",createdAt:"",updatedAt:""},attr:{href:"",target:"_blank",content:"Link Text"},style:{display:"inline-block",color:"#333",fontWeight:"normal",fontSize:"14px",lineHeight:"120%",letterSpacing:"0px",textDecoration:"none"},containerStyle:{textAlign:"center",padding:{more:!1,all:"10px",top:"0",left:"0",right:"0",bottom:"0"}}},lC={key:"",name:"Divider",type:"divider",meta:{version:"",createdAt:"",updatedAt:""},attr:{},style:{display:"inline-block",width:"100%",height:"1px",lineHeight:"1px",verticalAlign:"middle",boxSizing:"border-box",borderTop:{color:"#bbbbbb",width:"1px",style:"solid"}},containerStyle:{textAlign:"center",padding:{more:!1,all:"10px",top:"0",left:"0",right:"0",bottom:"0"}}},Cj={key:"",name:"Header",type:"header",meta:{version:"",createdAt:"",updatedAt:""},attr:{content:"Header"},style:{display:"inline-block",color:"#333",fontWeight:"normal",fontSize:"22px",lineHeight:"140%",letterSpacing:"0px"},containerStyle:{textAlign:"left",padding:{more:!1,all:"10px",top:"0",left:"0",right:"0",bottom:"0"}}},Sj={key:"",name:"Text",type:"text",meta:{version:"",createdAt:"",updatedAt:""},attr:{content:"Text"},style:{display:"inline-block",color:"#333",fontWeight:"normal",fontSize:"14px",lineHeight:"120%",letterSpacing:"0px"},containerStyle:{textAlign:"left",padding:{more:!1,all:"10px",top:"0",left:"0",right:"0",bottom:"0"}}},cC={key:"",name:"Image",type:"image",meta:{version:"",createdAt:"",updatedAt:""},attr:{href:"",target:"_blank",src:"",alt:""},style:{display:"inline-block",width:"100%",boxSizing:"border-box",textDecoration:"none"},containerStyle:{textAlign:"center",padding:{more:!1,all:"10px",top:"0",left:"0",right:"0",bottom:"0"}}},fC={key:"",name:"Menu",type:"menu",meta:{version:"",createdAt:"",updatedAt:""},attr:{links:[{id:Yi(6),label:"Menu",href:""},{id:Yi(6),label:"Menu",href:""}]},style:{display:"inline-block",fontWeight:"normal",fontSize:"14px",letterSpacing:"0px",color:"#333",textDecoration:"none",padding:{more:!0,all:"",top:"5px",left:"15px",right:"15px",bottom:"5px"}},containerStyle:{textAlign:"center",padding:{more:!1,all:"10px",top:"0",left:"0",right:"0",bottom:"0"}}},wG=new Map([["button",sC],["link",xj],["divider",lC],["header",Cj],["text",Sj],["image",cC],["menu",fC]]),_G=e=>{const t=og(),{version:n}=ju(t),r=m=>{try{const v=JSON.parse(m),h=v.version;return h<2?o(v):h<2.1?d(v):v}catch(v){console.log(m,v)}},o=m=>{const v={meta:{version:n.value,createdAt:bt(new Date,"yyyy-MM-dd HH:mm:ss"),updatedAt:bt(new Date,"yyyy-MM-dd HH:mm:ss")},style:{width:"",backgroundColor:""}};m.page_style?(v.style.width=m.page_style.maxWidth,v.style.backgroundColor=m.page_style.backgroundColor):(v.style.width="500px",v.style.backgroundColor="#fff");const{columns_source:h,column_map:y,column_row_style_map:g}=m,b=[],w={},x={};h.forEach(H=>{b.push(H)}),Object.entries(y).forEach(([H,G])=>{pt(G)&&(w[H]={key:H,type:G.type,name:"Columns",children:G.children})}),Object.keys(g).forEach(H=>{const G=g[H],X=Rt(wj);X.key=H,X.meta.version=n.value,X.meta.createdAt=bt(new Date,"yyyy-MM-dd HH:mm:ss"),X.meta.updatedAt=bt(new Date,"yyyy-MM-dd HH:mm:ss"),X.style.padding=G.style.padding,X.style.backgroundColor=G.style.backgroundColor,x[H]=X});const{cell_map:k,cell_style_map:D}=m,T={},A={};Object.keys(k).forEach(H=>{const G=k[H];T[H]={key:H,type:"cell",name:"Cell",width:Number.parseFloat(G.width),children:G.children}}),Object.keys(D).forEach(H=>{const G=D[H],X=Rt(_j);X.key=H,X.meta.version=n.value,X.meta.createdAt=bt(new Date,"yyyy-MM-dd HH:mm:ss"),X.meta.updatedAt=bt(new Date,"yyyy-MM-dd HH:mm:ss"),X.style.backgroundColor=G.style.background,X.style.padding=G.style.padding,X.style.border=i(G.style.border),A[H]=X});const{comp_map:F,comp_style_map:j}=m,R={},U={};return Object.keys(F).forEach(H=>{const G=F[H];R[H]={key:H,type:G.type,name:rq(G.type)}}),Object.keys(j).forEach(H=>{const G=F[H],X=j[H];switch(G.type){case"button":U[H]=u(H,X);break;case"divider":U[H]=s(H,X);break;case"header":U[H]=l(H,X);break;case"text":U[H]=c(H,X);break;case"image":U[H]=f(H,X);break;case"menu":U[H]=p(H,X);break}}),{pageConfig:v,columnsSource:b,columnsMap:w,columnsConfigMap:x,cellMap:T,cellConfigMap:A,blockMap:R,blockConfigMap:U}},i=m=>({more:m.more,all:a(m.all),top:a(m.top),left:a(m.left),right:a(m.right),bottom:a(m.bottom)}),a=m=>{const v=m.split(" ");return{width:v[0]||"0",style:v[1]||"solid",color:v[2]||""}},u=(m,v)=>{const h=Rt(sC);return h.key=m,h.meta.version=n.value,h.meta.createdAt=bt(new Date,"yyyy-MM-dd HH:mm:ss"),h.meta.updatedAt=bt(new Date,"yyyy-MM-dd HH:mm:ss"),h.attr.content=v.content,h.attr.href=v.info.href||"#",h.attr.target=v.info.target||"_blank",h.style=v.style,h.style.border=i(v.style.border),h.style.fontWeight=v.style.FontWeight,h.style.letterSpacing=v.style.LetterSpacing,delete v.style.FontWeight,delete v.style.LetterSpacing,h.containerStyle=v.general,h},s=(m,v)=>{const h=Rt(lC);return h.key=m,h.meta.version=n.value,h.meta.createdAt=bt(new Date,"yyyy-MM-dd HH:mm:ss"),h.meta.updatedAt=bt(new Date,"yyyy-MM-dd HH:mm:ss"),h.style=v.style,h.style.borderTop=a(v.style.borderTop),h},l=(m,v)=>{const h=Rt(Cj);return h.key=m,h.meta.version=n.value,h.meta.createdAt=bt(new Date,"yyyy-MM-dd HH:mm:ss"),h.meta.updatedAt=bt(new Date,"yyyy-MM-dd HH:mm:ss"),h.attr.content=v.content||"",h.style=v.style,h.containerStyle=v.general,h},c=(m,v)=>{const h=Rt(Sj);return h.key=m,h.meta.version=n.value,h.meta.createdAt=bt(new Date,"yyyy-MM-dd HH:mm:ss"),h.meta.updatedAt=bt(new Date,"yyyy-MM-dd HH:mm:ss"),h.attr.content=v.content||"",h.style=v.style,h.containerStyle=v.general,h.containerStyle.textAlign=v.style.textAlign,delete v.style.textAlign,h},f=(m,v)=>{const h=Rt(cC);return h.key=m,h.meta.version=n.value,h.meta.createdAt=bt(new Date,"yyyy-MM-dd HH:mm:ss"),h.meta.updatedAt=bt(new Date,"yyyy-MM-dd HH:mm:ss"),h.attr=v.info,h.style=v.style,h.containerStyle.padding=v.general.padding,h.containerStyle.textAlign=v.general.textAlign||"center",h},p=(m,v)=>{const h=Rt(fC);return h.key=m,h.meta.version=n.value,h.meta.createdAt=bt(new Date,"yyyy-MM-dd HH:mm:ss"),h.meta.updatedAt=bt(new Date,"yyyy-MM-dd HH:mm:ss"),h.attr.links=v.links,h.style=v.style,h.style.display=v.info.layout==="horizontal"?"inline-block":"block",h.containerStyle.padding=v.general.padding,h.containerStyle.textAlign=v.general.textAlign||"center",h},d=m=>{const{blockMap:v,blockConfigMap:h}=m;return Object.keys(v).forEach(y=>{const g=v[y],b=h[y];switch(g.type){case"button":h[y].style=Object.assign({},Rt(sC.style),b.style);break;case"link":h[y].style=Object.assign({},Rt(xj.style),b.style);break;case"divider":h[y].style=Object.assign({},Rt(lC.style),b.style);break;case"image":h[y].style=Object.assign({},Rt(cC.style),b.style);break;case"menu":h[y].type=g.type,h[y].name=g.name,h[y].style=Object.assign({},Rt(fC.style),b.style);break}}),m};return{parsedData:r(e)}},Pr=()=>{const e=og(),{version:t,columnsSource:n,columnsMap:r,columnsConfigMap:o,cellMap:i,cellConfigMap:a,blockMap:u,blockConfigMap:s,pageConfig:l,selectedBlockKey:c,selectedBlockType:f,saveFn:p}=ju(e);return{saveFn:p,getData:()=>JSON.stringify({version:t.value,pageConfig:An(l.value),blockMap:An(u.value),blockConfigMap:An(s.value),cellMap:An(i.value),cellConfigMap:An(a.value),columnsConfigMap:An(o.value),columnsMap:An(r.value),columnsSource:An(n.value)}),setData:g=>{const{parsedData:b}=_G(g);b&&(l.value=b.pageConfig,u.value=b.blockMap,s.value=b.blockConfigMap,i.value=b.cellMap,a.value=b.cellConfigMap,o.value=b.columnsConfigMap,r.value=b.columnsMap,n.value=b.columnsSource)},resetData:()=>{u.value={},s.value={},i.value={},a.value={},o.value={},r.value={},n.value=[],c.value="",f.value=""},setSaveFn:g=>{p.value=g},autoSaveFn:()=>{let g=null;g&&clearTimeout(g),g=window.setTimeout(()=>{p.value()},300)}}};function ei(){const e=o=>{const i={};return Object.entries(o).forEach(([a,u])=>{t(a)&&pt(u)&&Object.assign(i,n(a,u)),!t(a)&&av(u)&&(i[a]=u),!t(a)&&pt(u)&&a==="borderTop"&&pt(u)&&(i.borderTop="".concat(u.width," ").concat(u.style," ").concat(u.color||"transparent"))}),i},t=o=>o==="border"||o==="padding"||o==="borderRadius",n=(o,i)=>{const a={},u={top:"TopLeft",right:"TopRight",bottom:"BottomRight",left:"BottomLeft"};if(!i.more)o==="border"&&pt(i.all)&&i.all.width!=="0"?a.border="".concat(i.all.width," ").concat(i.all.style," ").concat(i.all.color||"transparent"):(o==="padding"||o==="borderRadius")&&av(i.all)&&(a[o]=i.all);else{const s=["top","right","bottom","left"];switch(o){case"border":s.forEach(l=>{const c=i[l];pt(c)&&c.width!=="0"&&(a["border".concat(r(l))]="".concat(c.width," ").concat(c.style," ").concat(c.color||"transparent"))});break;case"padding":s.forEach(l=>{const c=i[l];av(c)&&c!=="0"&&(a["padding".concat(r(l))]=c)});break;case"borderRadius":s.forEach(l=>{const c=i[l];av(c)&&c!=="0"&&(a["border".concat(u[l],"Radius")]=c)});break}}return a},r=o=>o.charAt(0).toUpperCase()+o.slice(1);return{configToStyle:e}}const i4=()=>{const e=og(),{columnsSource:t,columnsMap:n,columnsConfigMap:r,cellMap:o,cellConfigMap:i,blockMap:a,blockConfigMap:u,pageConfig:s}=ju(e),{configToStyle:l}=ei(),c=ie(""),f=()=>{c.value=p().outerHTML},p=()=>{const A=d(),F=document.createElement("table");return F.style.backgroundColor=s.value.style.backgroundColor||"#fff",F.style.width="100%",t.value.forEach(j=>{A[j]&&F.appendChild(A[j].dom)}),F},d=()=>{const A=m(),F={};return Object.entries(n.value).forEach(([j,R])=>{const U=document.createElement("tr"),H=document.createElement("td"),G=document.createElement("div");h(G,r.value[j].style),G.style.width=s.value.style.width||"auto",G.style.margin="0 auto";const X=document.createElement("table");X.style.width="100%";const oe=document.createElement("tr");R.children.forEach(se=>{oe.appendChild(A[se].dom)}),X.appendChild(oe),G.appendChild(X),H.appendChild(G),U.appendChild(H),F[j]={dom:U}}),F},m=()=>{const A=v(),F={};return Object.entries(o.value).forEach(([j,R])=>{const U=document.createElement("td");U.style.width="".concat(R.width,"%"),h(U,i.value[j].style),R.children.forEach(H=>{A[H]&&U.appendChild(A[H].dom)}),F[j]={dom:U}}),F},v=()=>{const A={};return Object.keys(a.value).forEach(F=>{const j=a.value[F],R=u.value[F],U=document.createElement("div");switch(h(U,R.containerStyle),j.type){case"button":U.appendChild(g(R));break;case"link":U.appendChild(b(R));break;case"divider":U.appendChild(w(R));break;case"header":U.appendChild(x(R));break;case"text":U.appendChild(k(R));break;case"image":U.appendChild(D(R));break;case"menu":U.appendChild(T(R));break}A[F]={dom:U,config:R}}),A},h=(A,F)=>{const j=l(F);Object.entries(j).forEach(([R,U])=>{A.style[R]=U})},y=A=>A.replace("

",'

'),g=A=>{var j,R,U;const F=document.createElement("a");return F.href=(j=A.attr.href)!=null?j:"",F.target=(R=A.attr.target)!=null?R:"",F.innerHTML=y((U=A.attr.content)!=null?U:""),h(F,A.style),F},b=A=>{var j,R,U;const F=document.createElement("a");return F.href=(j=A.attr.href)!=null?j:"",F.target=(R=A.attr.target)!=null?R:"",F.innerHTML=y((U=A.attr.content)!=null?U:""),h(F,A.style),F},w=A=>{const F=document.createElement("div");return h(F,A.style),F},x=A=>{var j;const F=document.createElement("div");return F.innerHTML=y((j=A.attr.content)!=null?j:""),h(F,A.style),F},k=A=>{var j;const F=document.createElement("div");return F.innerHTML=y((j=A.attr.content)!=null?j:""),h(F,A.style),F},D=A=>{var j,R,U,H;const F=document.createElement("img");if(F.src=(j=A.attr.src)!=null?j:"",F.alt=(R=A.attr.alt)!=null?R:"",A.attr.href){const G=document.createElement("a");return G.href=(U=A.attr.href)!=null?U:"",G.target=(H=A.attr.target)!=null?H:"",F.style.width="100%",G.appendChild(F),h(G,A.style),G}return h(F,A.style),F},T=A=>{var j;const F=document.createElement("div");return(j=A.attr.links)==null||j.forEach(R=>{var H;const U=document.createElement("a");h(U,A.style),U.href=R.href,U.target=(H=A.attr.target)!=null?H:"",U.innerHTML=R.label,F.appendChild(U)}),F};return{html:c,generateHtml:f}},xG=re({__name:"preview",props:{id:{}},setup(e){const n=p1(e,"id"),r=ie(""),o=ie(null),{setData:i,resetData:a}=Pr(),{html:u,generateHtml:s}=i4(),l=()=>{if(o.value){const f=o.value.contentDocument||o.value.contentWindow.document;f.open(),f.write(r.value),f.close()}},c=async()=>{if(!n.value)return;const{message:f}=await e4({id:n.value});pt(f)&&(r.value=f.content,f.type===1&&(i(f.render),s(),r.value=u.value,await ij({id:n.value,type:f.type,temp_name:f.name,render:f.render,content:u.value},!1)))};return qo(()=>n.value,async()=>{await c(),await yr(),l()}),Mi(async()=>{await c(),l()}),h1(()=>{a()}),(f,p)=>(Y(),ae("iframe",{ref_key:"iframeRef",ref:o,class:"min-h-520px",width:"100%",height:"100%",style:{border:"none"}},null,512))}}),CG={class:"mb-12px font-bold text-15px text-font2 leading-28px"},SG={class:"flex flex-col w-550px"},EG={class:"form-card mb-16px pt-20px"},DG={class:"w-360px"},kG={class:"w-360px"},OG={class:"w-260px"},AG={class:"w-60px ml-24px"},TG={class:"form-card flex-1 py-20px"},BG={class:"w-360px"},PG={class:"flex w-360px"},FG={class:"flex-1 mr-10px"},MG={class:"form-card flex flex-col items-center w-640px ml-16px pt-12px p-16px overflow-hidden"},IG={class:"mb-12px"},jG={class:"min-w-260px"},LG={class:"min-w-260px"},RG={class:"min-w-260px"},NG={class:"mt-16px"},$G=re({__name:"index",props:Dr({row:{},isEdit:{type:Boolean,default:!1},refresh:{type:Function,default:()=>{}}},{show:{type:Boolean},showModifiers:{}}),emits:["update:show"],setup(e){const t=e,{t:n}=Hn(),{refresh:r}=t,o=ft(e,"show"),i=Jh(),a=_n("formRef"),u=_n("containerRef"),{height:s}=rG(u),l=tt({task_name:P5(12),addresser:null,full_name:"",subject:"",temp_id:aC.value,is_record:0,etypes:[],unsubscribe:1,threadsType:0,threads:1,start_time:null,pause:0,remark:"",mail_to:""}),c=ie([]),f={full_name:{trigger:["blur","input"],validator:()=>l.full_name===""?new Error("Please enter display name"):!0},subject:{trigger:["blur","input"],validator:()=>l.subject===""?new Error("Please enter mail subject"):!0},etypes:{trigger:"change",validator:()=>l.etypes.length===0?new Error("Please select contact person"):!0},start_time:{validator:()=>l.pause===1&&l.start_time===null?new Error("Please select send time"):!0}},p=A=>{l.full_name=A||""},d=_n("startTimeRef"),m=()=>{yr(()=>{var A;(A=d.value)==null||A.restoreValidation()})},v=()=>{var A;(A=d.value)==null||A.validate()},h=()=>{No({title:n("Mail.Mass.index_54"),width:450,minHeight:196,component:ej(()=>JI(()=>import("./unsubscribe-DVRoLsiA.js?v=1773287522785"),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))})},y=()=>{No({title:n("Mail.Mass.index_42"),width:554,minHeight:604,content:()=>C("img",{src:oG},[ye(" ")])})},g=_n("subjectRef"),b=_n("mailToRef"),w=async()=>{var A,F;if(i.isFree){Zm({source:325});return}if(l.subject===""){(A=g.value)==null||A.focus(),Hc.error("Please enter mail subject");return}if(l.mail_to===""){(F=b.value)==null||F.focus(),Hc.error("Please enter test email");return}await uW({mail_from:l.addresser||"",subject:l.subject,mail_to:l.mail_to,temp_id:l.temp_id||0})},x=()=>({task_name:l.task_name,addresser:l.addresser||"",full_name:l.full_name,subject:l.subject,temp_id:l.temp_id||0,is_record:l.is_record,unsubscribe:l.unsubscribe,threads:l.threadsType===0?0:l.threads,etypes:l.etypes.join(","),start_time:l.pause===0?Math.floor(new Date().getTime()/1e3):Math.floor((l.start_time||0)/1e3),remark:l.remark}),k=()=>{l.subject||l.etypes.length>0?lo({title:"Tips",content:"Do you want to discard your current edits?",onConfirm:()=>{o.value=!1}}):o.value=!1},D=async()=>{var R;if(i.isFree)return Zm({source:326}),!1;await((R=a.value)==null?void 0:R.validate());const A=x(),{isEdit:F,row:j}=t;F&&j?await sW({...A,id:j.id}):await lW(A),o.value=!1,r==null||r()},T=()=>{const{row:A,isEdit:F}=t;A&&(F?l.task_name=A.task_name:l.task_name="".concat(A.task_name,"_").concat(P5(4)),l.addresser=A.addresser,l.full_name=A.full_name,l.subject=A.subject,l.is_record=A.is_record,l.unsubscribe=A.unsubscribe,l.threadsType=A.threads===0?0:1,l.threads=A.threads,l.etypes=A.etypes.split(",").map(j=>vj(j)),A.start_time*1e3>new Date().getTime()&&(l.pause=1,l.start_time=A.start_time*1e3),l.temp_id=A.temp_id,l.remark=A.remark)};return wf(()=>{aC.value=null,Xi.value=!1}),T(),(A,F)=>{const j=dr,R=Tr,U=ha,H=Dn,G=Qh,X=ng,oe=So,se=fj,L=sj,B=Br;return Y(),ae("div",null,[C(B,{ref_key:"formRef",ref:a,"label-width":"150",model:_(l),rules:f},{default:P(()=>[$("div",CG,ke(A.isEdit?A.$t("Mail.Mass.index_67"):A.$t("Mail.Mass.index_1")),1),$("div",{ref_key:"containerRef",ref:u,class:"flex min-h-654px",style:er({height:_(s)})},[$("div",SG,[$("div",EG,[C(j,{label:"From",path:"addresser"},{default:P(()=>[C(sG,{value:_(l).addresser,"onUpdate:value":F[0]||(F[0]=E=>_(l).addresser=E),onChange:p},null,8,["value"])]),_:1}),C(j,{label:"Display Name",path:"full_name"},{default:P(()=>[$("div",DG,[C(R,{value:_(l).full_name,"onUpdate:value":F[1]||(F[1]=E=>_(l).full_name=E),placeholder:"Please enter display Name"},null,8,["value"])])]),_:1}),C(j,{label:"Subject",path:"subject"},{default:P(()=>[$("div",kG,[C(R,{ref_key:"subjectRef",ref:g,value:_(l).subject,"onUpdate:value":F[2]||(F[2]=E=>_(l).subject=E),placeholder:"Please enter mail subject"},null,8,["value"])])]),_:1}),C(j,{label:"Recipients",type:"etypes"},{default:P(()=>[C(bG,{value:_(l).etypes,"onUpdate:value":F[3]||(F[3]=E=>_(l).etypes=E),name:_(c),"onUpdate:name":F[4]||(F[4]=E=>ze(c)?c.value=E:null)},null,8,["value","name"])]),_:1}),C(j,{label:"Email template"},{default:P(()=>[$("div",OG,[C(iG,{value:_(l).temp_id,"onUpdate:value":F[5]||(F[5]=E=>_(l).temp_id=E)},null,8,["value"])])]),_:1}),C(j,{label:A.$t("Mail.Mass.index_30")},{default:P(()=>[C(U,{value:_(l).is_record,"onUpdate:value":F[6]||(F[6]=E=>_(l).is_record=E),"checked-value":1,"unchecked-value":0},null,8,["value"])]),_:1},8,["label"]),C(j,{label:A.$t("Mail.Mass.index_31")},{default:P(()=>[C(U,{value:_(l).unsubscribe,"onUpdate:value":F[7]||(F[7]=E=>_(l).unsubscribe=E),"checked-value":1,"unchecked-value":0},null,8,["value"]),C(H,{class:"ml-16px",size:"small",onClick:h},{default:P(()=>[ye(ke(A.$t("Public.Btn.Set")),1)]),_:1}),C(G,{class:"ml-16px",onClick:y},{default:P(()=>[ye(ke(A.$t("Mail.Mass.index_32")),1)]),_:1})]),_:1},8,["label"]),C(j,{label:A.$t("Mail.Mass.index_33"),path:"threads"},{default:P(()=>[C(oe,{value:_(l).threadsType,"onUpdate:value":F[8]||(F[8]=E=>_(l).threadsType=E)},{default:P(()=>[C(X,{value:0},{default:P(()=>[ye(ke(A.$t("Mail.Mass.index_34")),1)]),_:1}),C(X,{value:1},{default:P(()=>[ye(ke(A.$t("Mail.Mass.index_35")),1)]),_:1})]),_:1},8,["value"]),Go($("div",AG,[C(se,{value:_(l).threads,"onUpdate:value":F[9]||(F[9]=E=>_(l).threads=E),min:1,max:5,"show-button":!1,placeholder:A.$t("Mail.Mass.index_36")},null,8,["value","placeholder"])],512),[[Ko,_(l).threadsType===1]])]),_:1},8,["label"])]),$("div",TG,[C(j,{ref_key:"startTimeRef",ref:d,label:"Send time",path:"start_time"},{default:P(()=>[C(oe,{value:_(l).pause,"onUpdate:value":[F[11]||(F[11]=E=>_(l).pause=E),m],class:"flex items-center"},{default:P(()=>[C(X,{value:0},{default:P(()=>F[14]||(F[14]=[ye("Send Now")])),_:1,__:[14]}),C(X,{class:"items-center",value:1},{default:P(()=>[C(L,{value:_(l).start_time,"onUpdate:value":[F[10]||(F[10]=E=>_(l).start_time=E),v],type:"datetime",disabled:_(l).pause===0,clearable:""},null,8,["value","disabled"])]),_:1})]),_:1},8,["value"])]),_:1},512),C(j,{label:"Remark"},{default:P(()=>[$("div",BG,[C(R,{value:_(l).remark,"onUpdate:value":F[12]||(F[12]=E=>_(l).remark=E),placeholder:"Please enter remark"},null,8,["value"])])]),_:1}),C(j,{label:"Send Test email to","show-feedback":!1},{default:P(()=>[$("div",PG,[$("div",FG,[C(R,{ref_key:"mailToRef",ref:b,value:_(l).mail_to,"onUpdate:value":F[13]||(F[13]=E=>_(l).mail_to=E),placeholder:"Please enter email"},null,8,["value"])]),C(H,{onClick:w},{default:P(()=>F[15]||(F[15]=[ye("Send Test Mail")])),_:1,__:[15]})])]),_:1})])]),$("div",MG,[$("div",IG,[C(j,{label:"From: ","show-feedback":!1,style:{"--n-blank-height":"21px"},"label-style":{fontWeight:"bold"}},{default:P(()=>[$("div",jG,ke(_(l).addresser),1)]),_:1}),C(j,{label:"To: ","show-feedback":!1,style:{"--n-blank-height":"21px"},"label-style":{fontWeight:"bold"}},{default:P(()=>[$("div",LG,ke(_(c).length>0?_(c).join(", "):"--"),1)]),_:1}),C(j,{label:"Subject: ","show-feedback":!1,style:{"--n-blank-height":"21px"},"label-style":{fontWeight:"bold"}},{default:P(()=>[$("div",RG,ke(_(l).subject||"--"),1)]),_:1})]),C(xG,{id:_(l).temp_id},null,8,["id"])])],4),$("div",NG,[C(H,{class:"mr-16px",onClick:k},{default:P(()=>[ye(ke(A.$t("Public.Btn.Cancel")),1)]),_:1}),C(H,{type:"primary",onClick:D},{default:P(()=>[ye(ke(A.$t("Public.Btn.Confirm")),1)]),_:1})])]),_:1},8,["model"])])}}}),UG=gt($G,[["__scopeId","data-v-87a7687c"]]),zG={class:"p-20px"},HG=re({__name:"details",props:{id:{},type:{},row:{}},setup(e){const t=e,{t:n}=Hn(),r=tt({task_id:t.id,type:t.type,value:t.type==="domain"?t.row.domain:t.row.status,page:1,size:10}),{loading:o,setLoading:i}=Eo(),{table:a,columns:u}=Qo([{key:"recipient",title:n("Mail.Mass.index_50"),width:160,render:f=>C(Oc,{class:f.tooltip?"":"break-all!","line-clamp":f.tooltip?999:1,tooltip:!1},{default:()=>[f.recipient]})},{key:"dsn",title:"Dsn",width:60},{key:"delay",title:n("Mail.Mass.index_51"),width:70},{key:"delays",title:n("Mail.Mass.index_52"),width:150},{key:"relay",title:n("Mail.Mass.index_53"),width:200,render:f=>C(Oc,{class:f.tooltip?"":"break-all!","line-clamp":f.tooltip?9999:1,tooltip:!1},{default:()=>[f.relay]})},{key:"err_info",title:n("Public.Btn.Details"),render:f=>C(Oc,{class:f.tooltip?"":"break-all!","line-clamp":f.tooltip?9999:1,tooltip:!1},{default:()=>[f.err_info]})}]),s=()=>{r.type==="domain"&&u.value.push({key:"status",title:n("Public.Table.Status"),width:100,ellipsis:{tooltip:!0},render:f=>f.status}),r.type==="status"&&u.value.unshift({key:"domain",title:n("Mail.Mass.index_45"),width:120,ellipsis:{tooltip:!0},render:f=>f.domain})},l=f=>({onMousemove:()=>{f.tooltip=!0},onMouseleave:()=>{f.tooltip=!1}}),c=async()=>{try{i(!0);const{message:f}=await ZW(An(r));pt(f)&&(a.data=Un(f.data)?f.data.map(p=>({...p,tooltip:!1})):[],a.total=QI(f.page))}finally{i(!1)}};return s(),c(),(f,p)=>{const d=Jo,m=ml,v=ga;return Y(),ae("div",zG,[C(v,null,{table:P(()=>[C(d,{loading:_(o),data:_(a).data,columns:_(u),"row-props":l},null,8,["loading","data","columns"])]),pageRight:P(()=>[C(m,{page:_(r).page,"onUpdate:page":p[0]||(p[0]=h=>_(r).page=h),"page-size":_(r).size,"onUpdate:pageSize":p[1]||(p[1]=h=>_(r).size=h),"item-count":_(a).total,onRefresh:c},null,8,["page","page-size","item-count"])]),_:1})])}}}),VG={class:"p-20px"},WG=re({__name:"index",props:{row:{}},setup(e){const t=e,{t:n}=Hn(),r=tt({task_id:t.row.id,type:"domain"}),o=async()=>{const{message:p}=await cW({task_id:t.row.id});pt(p)&&zc(p.result)},{loading:i,setLoading:a}=Eo(),{table:u,columns:s}=Qo([{key:"domain",title:()=>C(Pt,null,[r.type==="domain"?n("Mail.Mass.index_45"):n("Public.Table.Status")]),render:p=>r.type==="domain"?p.domain:p.status},{key:"count",title:n("Mail.Mass.index_46")},Ru({width:120,options:p=>[{label:n("Public.Btn.Details"),onClick:()=>{c(p)}}]})]),l=Jm(""),c=p=>{l.data.id=t.row.id,l.data.type=r.type,l.data.row=p,l.title=n("Mail.Mass.index_49",[r.type==="domain"?p.domain:p.status]),l.show=!0},f=async()=>{try{a(!0);const{message:p}=await JW(An(r));u.data=Un(p)?p:[]}finally{a(!1)}};return f(),(p,d)=>{const m=vl,v=So,h=Dn,y=Jo,g=ga,b=gl;return Y(),ae("div",VG,[C(g,null,{toolsLeft:P(()=>[C(v,{value:_(r).type,"onUpdate:value":[d[0]||(d[0]=w=>_(r).type=w),f]},{default:P(()=>[C(m,{value:"domain"},{default:P(()=>[ye(ke(p.$t("Mail.Mass.index_45")),1)]),_:1}),C(m,{value:"status"},{default:P(()=>[ye(ke(p.$t("Public.Table.Status")),1)]),_:1})]),_:1},8,["value"]),C(h,{onClick:o},{default:P(()=>[ye(ke(p.$t("Public.Btn.Export")),1)]),_:1})]),table:P(()=>[C(y,{"max-height":340,loading:_(i),data:_(u).data,columns:_(s)},null,8,["loading","data","columns"])]),_:1}),C(b,{show:_(l).show,"onUpdate:show":d[1]||(d[1]=w=>_(l).show=w),title:_(l).title,data:_(l).data,width:980,"min-height":152,component:HG},null,8,["show","title","data"])])}}}),qG={class:"h-full"},GG=re({__name:"index",props:{row:{}},setup(e){const t=e,{t:n}=Hn(),r=ie(n("Mail.Mass.index_48")),{loading:o,setLoading:i}=Eo();return(async()=>{try{i(!0);const{message:u}=await yj({path:t.row.error_log});pt(u)&&(r.value=u.data?u.data.slice(-1e4):n("Mail.Mass.index_48"))}finally{i(!1)}})(),(u,s)=>{const l=mj;return Y(),ae("div",qG,[C(l,{log:_(r),loading:_(o)},null,8,["log","loading"])])}}}),KG=re({__name:"index",setup(e){const{t}=Hn(),n=tt({p:1,size:10}),r=tt({title:"",row:void 0,isEdit:!1}),o=v=>{r.row=v,r.isEdit=!1,Xi.value=!0},i=v=>{r.row=v,r.isEdit=!0,Xi.value=!0},{table:a,columns:u}=Qo([{key:"created",title:t("Mail.Mass.index_2"),width:"14%",minWidth:140,render:v=>vo(v.created)},{key:"subject",title:t("Mail.Mass.index_23"),width:"12%",minWidth:100,ellipsis:{tooltip:!0}},{key:"addresser",title:t("Mail.Mass.index_4"),minWidth:180,width:"15%",ellipsis:{tooltip:!0}},{key:"recipient_count",title:t("Mail.Mass.index_5"),width:"7%",minWidth:80},{key:"success_count",title:t("Mail.Mass.index_6"),width:"7%",minWidth:80,render:v=>v.delivered-v.count.error_count},{key:"error_count",title:t("Mail.Mass.index_7"),width:"7%",minWidth:80,render:v=>C("a",{class:"bt-link error",href:"javascript:;",onClick:()=>{c(v)}},[v.count.error_count])},{key:"task_process",title:t("Public.Table.Status"),width:"7%",render:v=>v.task_process===0||v.pause===1?C("span",{class:"text-#fcb040"},[ye(" "),t("Mail.Mass.index_9"),ye(" ")]):v.task_process===1?C("span",{class:"text-#fcb040"},[ye(" "),t("Mail.Mass.index_10"),ye(" ")]):t("Mail.Mass.index_11")},{key:"remark",title:t("Public.Table.Ps"),width:"10%",minWidth:80,ellipsis:{tooltip:!0}},nq({status:"success"}),Ru({width:180,options:v=>[{label:t("Public.Btn.Edit"),show:v.task_process===0&&v.pause===0,onClick:()=>{i(v)}},{label:t("Mail.Mass.index_61"),show:!(v.task_process===0&&v.pause===0),onClick:()=>{s(v)}},{label:v.pause===1?t("Mail.Mass.index_12"):t("Public.Status.Pause"),show:v.task_process!==2,onClick:()=>{p(v)}},{label:t("Public.Btn.Del"),onClick:()=>{d(v)}}]})]),s=v=>{No({title:t("Mail.Mass.index_62",[v.subject]),width:640,minHeight:320,footer:!0,confirmText:t("Mail.Mass.index_63"),data:{row:v,onAdd:o},component:ej(()=>JI(()=>import("./index-CO4dbYz3.js?v=1773287522785"),__vite__mapDeps([9,1,2,3,4,5,6,10,11,12,13,14,15,16,17])))})},l=Jm(""),c=v=>{l.data.row=v,l.title=t("Mail.Mass.index_13",[v.subject]),l.show=!0},f=Jm(""),p=v=>{lo({title:t("Mail.Mass.index_15",[v.subject]),content:v.task_process?t("Mail.Mass.index_16"):t("Mail.Mass.index_17"),onConfirm:async()=>{await QW({task_id:v.id,pause:v.pause?0:1}),m()}})},d=async v=>{lo({title:t("Mail.Mass.index_18"),content:t("Mail.Mass.index_19",[v.subject]),onConfirm:async()=>{await eq({task_id:v.id}),m()}})},m=async()=>{try{a.loading=!0;const{message:v}=await tq(An(n));pt(v)&&(a.data=Un(v.data)?v.data:[],a.total=QI(v.page))}finally{a.loading=!1}};return m(),(v,h)=>{const y=Dn,g=Jo,b=ml,w=ga,x=gl;return Y(),ae("div",null,[Go(C(w,null,{toolsLeft:P(()=>[C(y,{type:"primary",onClick:h[0]||(h[0]=k=>o())},{default:P(()=>[ye(ke(v.$t("Mail.Mass.index_1")),1)]),_:1})]),table:P(()=>[C(g,{loading:_(a).loading,data:_(a).data,columns:_(u)},null,8,["loading","data","columns"])]),pageRight:P(()=>[C(b,{page:_(n).p,"onUpdate:page":h[1]||(h[1]=k=>_(n).p=k),"page-size":_(n).size,"onUpdate:pageSize":h[2]||(h[2]=k=>_(n).size=k),"item-count":_(a).total,onRefresh:m},null,8,["page","page-size","item-count"])]),_:1},512),[[Ko,!_(Xi)]]),_(Xi)?(Y(),De(UG,{key:0,show:_(Xi),"onUpdate:show":h[3]||(h[3]=k=>ze(Xi)?Xi.value=k:null),"is-edit":_(r).isEdit,title:_(r).title,row:_(r).row,refresh:m},null,8,["show","is-edit","title","row"])):$n("",!0),C(x,{show:_(l).show,"onUpdate:show":h[4]||(h[4]=k=>_(l).show=k),title:_(l).title,data:_(l).data,width:700,"min-height":192,component:WG},null,8,["show","title","data"]),C(x,{show:_(f).show,"onUpdate:show":h[5]||(h[5]=k=>_(f).show=k),title:_(f).title,data:_(f).data,width:750,height:580,component:GG},null,8,["show","title","data"])])}}}),XG=gt(KG,[["__scopeId","data-v-9c8b6936"]]),Ej=e=>{gm.value=e},YG=e=>{Ej("task"),aC.value=e,yr(()=>{Xi.value=!0})},ZG=e=>{Va.value=e,Ej("contact")};var Dj=Symbol.for("DndContextType");function JG(e){tj(Dj,e)}function QG(){return eW(Dj)}function Qr(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var N5=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),$5=function(){return Math.random().toString(36).substring(7).split("").join(".")},U5={INIT:"@@redux/INIT"+$5(),REPLACE:"@@redux/REPLACE"+$5()};function eK(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function kj(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Qr(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Qr(1));return n(kj)(e,t)}if(typeof e!="function")throw new Error(Qr(2));var o=e,i=t,a=[],u=a,s=!1;function l(){u===a&&(u=a.slice())}function c(){if(s)throw new Error(Qr(3));return i}function f(v){if(typeof v!="function")throw new Error(Qr(4));if(s)throw new Error(Qr(5));var h=!0;return l(),u.push(v),function(){if(h){if(s)throw new Error(Qr(6));h=!1,l();var g=u.indexOf(v);u.splice(g,1),a=null}}}function p(v){if(!eK(v))throw new Error(Qr(7));if(typeof v.type>"u")throw new Error(Qr(8));if(s)throw new Error(Qr(9));try{s=!0,i=o(i,v)}finally{s=!1}for(var h=a=u,y=0;yr&&r[o]?r[o]:n||null,e)}function rK(e,t){return e.filter(n=>n!==t)}function Oj(e){return typeof e=="object"}function oK(e,t){const n=new Map,r=i=>{n.set(i,n.has(i)?n.get(i)+1:1)};e.forEach(r),t.forEach(r);const o=[];return n.forEach((i,a)=>{i===1&&o.push(a)}),o}function iK(e,t){return e.filter(n=>t.indexOf(n)>-1)}const a4="dnd-core/INIT_COORDS",m1="dnd-core/BEGIN_DRAG",u4="dnd-core/PUBLISH_DRAG_SOURCE",y1="dnd-core/HOVER",b1="dnd-core/DROP",w1="dnd-core/END_DRAG";function z5(e,t){return{type:a4,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}const aK={type:a4,payload:{clientOffset:null,sourceClientOffset:null}};function uK(e){return function(n=[],r={publishSource:!0}){const{publishSource:o=!0,clientOffset:i,getSourceClientOffset:a}=r,u=e.getMonitor(),s=e.getRegistry();e.dispatch(z5(i)),sK(n,u,s);const l=fK(n,u);if(l==null){e.dispatch(aK);return}let c=null;if(i){if(!a)throw new Error("getSourceClientOffset must be defined");lK(a),c=a(l)}e.dispatch(z5(i,c));const p=s.getSource(l).beginDrag(u,l);if(p==null)return;cK(p),s.pinSource(l);const d=s.getSourceType(l);return{type:m1,payload:{itemType:d,item:p,sourceId:l,clientOffset:i||null,sourceClientOffset:c||null,isSourcePublic:!!o}}}}function sK(e,t,n){Ge(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(r){Ge(n.getSource(r),"Expected sourceIds to be registered.")})}function lK(e){Ge(typeof e=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function cK(e){Ge(Oj(e),"Item must be an object.")}function fK(e,t){let n=null;for(let r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}function dK(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pK(e){for(var t=1;t{const s=vK(a,u,o,r),l={type:b1,payload:{dropResult:pK({},n,s)}};e.dispatch(l)})}}function gK(e){Ge(e.isDragging(),"Cannot call drop while not dragging."),Ge(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function vK(e,t,n,r){const o=n.getTarget(e);let i=o?o.drop(r,e):void 0;return mK(i),typeof i>"u"&&(i=t===0?{}:r.getDropResult()),i}function mK(e){Ge(typeof e>"u"||Oj(e),"Drop result must either be an object or undefined.")}function yK(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function bK(e){return function(){const n=e.getMonitor(),r=e.getRegistry();wK(n);const o=n.getSourceId();return o!=null&&(r.getSource(o,!0).endDrag(n,o),r.unpinSource()),{type:w1}}}function wK(e){Ge(e.isDragging(),"Cannot call endDrag while not dragging.")}function dC(e,t){return t===null?e===null:Array.isArray(e)?e.some(n=>n===t):e===t}function _K(e){return function(n,{clientOffset:r}={}){xK(n);const o=n.slice(0),i=e.getMonitor(),a=e.getRegistry(),u=i.getItemType();return SK(o,a,u),CK(o,i,a),EK(o,i,a),{type:y1,payload:{targetIds:o,clientOffset:r||null}}}}function xK(e){Ge(Array.isArray(e),"Expected targetIds to be an array.")}function CK(e,t,n){Ge(t.isDragging(),"Cannot call hover while not dragging."),Ge(!t.didDrop(),"Cannot call hover after drop.");for(let r=0;r=0;r--){const o=e[r],i=t.getTargetType(o);dC(i,n)||e.splice(r,1)}}function EK(e,t,n){e.forEach(function(r){n.getTarget(r).hover(t,r)})}function DK(e){return function(){if(e.getMonitor().isDragging())return{type:u4}}}function kK(e){return{beginDrag:uK(e),publishDragSource:DK(e),hover:_K(e),drop:hK(e),endDrag:bK(e)}}class OK{receiveBackend(t){this.backend=t}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const t=this,{dispatch:n}=this.store;function r(i){return(...a)=>{const u=i.apply(t,a);typeof u<"u"&&n(u)}}const o=kK(this);return Object.keys(o).reduce((i,a)=>{const u=o[a];return i[a]=r(u),i},{})}dispatch(t){this.store.dispatch(t)}constructor(t,n){this.isSetUp=!1,this.handleRefCountChange=()=>{const r=this.store.getState().refCount>0;this.backend&&(r&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!r&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=t,this.monitor=n,t.subscribe(this.handleRefCountChange)}}function AK(e,t){return{x:e.x+t.x,y:e.y+t.y}}function Aj(e,t){return{x:e.x-t.x,y:e.y-t.y}}function TK(e){const{clientOffset:t,initialClientOffset:n,initialSourceClientOffset:r}=e;return!t||!n||!r?null:Aj(AK(t,r),n)}function BK(e){const{clientOffset:t,initialClientOffset:n}=e;return!t||!n?null:Aj(t,n)}const Op=[],s4=[];Op.__IS_NONE__=!0;s4.__IS_ALL__=!0;function PK(e,t){return e===Op?!1:e===s4||typeof t>"u"?!0:iK(t,e).length>0}class FK{subscribeToStateChange(t,n={}){const{handlerIds:r}=n;Ge(typeof t=="function","listener must be a function."),Ge(typeof r>"u"||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let o=this.store.getState().stateId;const i=()=>{const a=this.store.getState(),u=a.stateId;try{u===o||u===o+1&&!PK(a.dirtyHandlerIds,r)||t()}finally{o=u}};return this.store.subscribe(i)}subscribeToOffsetChange(t){Ge(typeof t=="function","listener must be a function.");let n=this.store.getState().dragOffset;const r=()=>{const o=this.store.getState().dragOffset;o!==n&&(n=o,t())};return this.store.subscribe(r)}canDragSource(t){if(!t)return!1;const n=this.registry.getSource(t);return Ge(n,"Expected to find a valid source. sourceId=".concat(t)),this.isDragging()?!1:n.canDrag(this,t)}canDropOnTarget(t){if(!t)return!1;const n=this.registry.getTarget(t);if(Ge(n,"Expected to find a valid target. targetId=".concat(t)),!this.isDragging()||this.didDrop())return!1;const r=this.registry.getTargetType(t),o=this.getItemType();return dC(r,o)&&n.canDrop(this,t)}isDragging(){return!!this.getItemType()}isDraggingSource(t){if(!t)return!1;const n=this.registry.getSource(t,!0);if(Ge(n,"Expected to find a valid source. sourceId=".concat(t)),!this.isDragging()||!this.isSourcePublic())return!1;const r=this.registry.getSourceType(t),o=this.getItemType();return r!==o?!1:n.isDragging(this,t)}isOverTarget(t,n={shallow:!1}){if(!t)return!1;const{shallow:r}=n;if(!this.isDragging())return!1;const o=this.registry.getTargetType(t),i=this.getItemType();if(i&&!dC(o,i))return!1;const a=this.getTargetIds();if(!a.length)return!1;const u=a.indexOf(t);return r?u===a.length-1:u>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return TK(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return BK(this.store.getState().dragOffset)}constructor(t,n){this.store=t,this.registry=n}}const H5=typeof global<"u"?global:self,Tj=H5.MutationObserver||H5.WebKitMutationObserver;function Bj(e){return function(){const n=setTimeout(o,0),r=setInterval(o,50);function o(){clearTimeout(n),clearInterval(r),e()}}}function MK(e){let t=1;const n=new Tj(e),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}const IK=typeof Tj=="function"?MK:Bj;class jK{enqueueTask(t){const{queue:n,requestFlush:r}=this;n.length||(r(),this.flushing=!0),n[n.length]=t}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:t}=this;for(;this.indexthis.capacity){for(let r=0,o=t.length-this.index;r{this.pendingErrors.push(t),this.requestErrorThrow()},this.requestFlush=IK(this.flush),this.requestErrorThrow=Bj(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class LK{call(){try{this.task&&this.task()}catch(t){this.onError(t)}finally{this.task=null,this.release(this)}}constructor(t,n){this.onError=t,this.release=n,this.task=null}}class RK{create(t){const n=this.freeTasks,r=n.length?n.pop():new LK(this.onError,o=>n[n.length]=o);return r.task=t,r}constructor(t){this.onError=t,this.freeTasks=[]}}const Pj=new jK,NK=new RK(Pj.registerPendingError);function $K(e){Pj.enqueueTask(NK.create(e))}const l4="dnd-core/ADD_SOURCE",c4="dnd-core/ADD_TARGET",f4="dnd-core/REMOVE_SOURCE",_1="dnd-core/REMOVE_TARGET";function UK(e){return{type:l4,payload:{sourceId:e}}}function zK(e){return{type:c4,payload:{targetId:e}}}function HK(e){return{type:f4,payload:{sourceId:e}}}function VK(e){return{type:_1,payload:{targetId:e}}}function WK(e){Ge(typeof e.canDrag=="function","Expected canDrag to be a function."),Ge(typeof e.beginDrag=="function","Expected beginDrag to be a function."),Ge(typeof e.endDrag=="function","Expected endDrag to be a function.")}function qK(e){Ge(typeof e.canDrop=="function","Expected canDrop to be a function."),Ge(typeof e.hover=="function","Expected hover to be a function."),Ge(typeof e.drop=="function","Expected beginDrag to be a function.")}function pC(e,t){if(t&&Array.isArray(e)){e.forEach(n=>pC(n,!1));return}Ge(typeof e=="string"||typeof e=="symbol",t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var ro;(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(ro||(ro={}));let GK=0;function KK(){return GK++}function XK(e){const t=KK().toString();switch(e){case ro.SOURCE:return"S".concat(t);case ro.TARGET:return"T".concat(t);default:throw new Error("Unknown Handler Role: ".concat(e))}}function V5(e){switch(e[0]){case"S":return ro.SOURCE;case"T":return ro.TARGET;default:throw new Error("Cannot parse handler ID: ".concat(e))}}function W5(e,t){const n=e.entries();let r=!1;do{const{done:o,value:[,i]}=n.next();if(i===t)return!0;r=!!o}while(!r);return!1}class YK{addSource(t,n){pC(t),WK(n);const r=this.addHandler(ro.SOURCE,t,n);return this.store.dispatch(UK(r)),r}addTarget(t,n){pC(t,!0),qK(n);const r=this.addHandler(ro.TARGET,t,n);return this.store.dispatch(zK(r)),r}containsHandler(t){return W5(this.dragSources,t)||W5(this.dropTargets,t)}getSource(t,n=!1){return Ge(this.isSourceId(t),"Expected a valid source ID."),n&&t===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(t)}getTarget(t){return Ge(this.isTargetId(t),"Expected a valid target ID."),this.dropTargets.get(t)}getSourceType(t){return Ge(this.isSourceId(t),"Expected a valid source ID."),this.types.get(t)}getTargetType(t){return Ge(this.isTargetId(t),"Expected a valid target ID."),this.types.get(t)}isSourceId(t){return V5(t)===ro.SOURCE}isTargetId(t){return V5(t)===ro.TARGET}removeSource(t){Ge(this.getSource(t),"Expected an existing source."),this.store.dispatch(HK(t)),$K(()=>{this.dragSources.delete(t),this.types.delete(t)})}removeTarget(t){Ge(this.getTarget(t),"Expected an existing target."),this.store.dispatch(VK(t)),this.dropTargets.delete(t),this.types.delete(t)}pinSource(t){const n=this.getSource(t);Ge(n,"Expected an existing source."),this.pinnedSourceId=t,this.pinnedSource=n}unpinSource(){Ge(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(t,n,r){const o=XK(t);return this.types.set(o,n),t===ro.SOURCE?this.dragSources.set(o,r):t===ro.TARGET&&this.dropTargets.set(o,r),o}constructor(t){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=t}}const ZK=(e,t)=>e===t;function JK(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function QK(e,t,n=ZK){if(e.length!==t.length)return!1;for(let r=0;r0||!QK(n,r)))return Op;const a=r[r.length-1],u=n[n.length-1];return a!==u&&(a&&o.push(a),u&&o.push(u)),o}function tX(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nX(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:Fj(),n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=t;return o[vm]||(o[vm]=dX(e,t,n,r)),o[vm]}function Fj(){return typeof globalThis<"u"?globalThis:typeof global<"u"?global:window}const xX=re({name:"DndProvider",props:{manager:{type:Object},backend:{type:Function},context:{type:Object},options:{type:Object},debugMode:{type:Boolean}},setup:function(t,n){var r=n.slots,o=mX(wX(t),2),i=o[0],a=o[1];a&&++K5,wf(function(){if(a){var s=Fj();--K5===0&&(s[vm]=null)}}),JG(i);var u;return function(){var s;return(u=(s=r.default)===null||s===void 0?void 0:s.call(r))!==null&&u!==void 0?u:null}}});function CX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Fb=!1,Mb=!1,SX=(function(){function e(n){CX(this,e),this.sourceId=null,this.internalMonitor=n.getMonitor()}var t=e.prototype;return t.receiveHandlerId=function(r){this.sourceId=r},t.getHandlerId=function(){return this.sourceId},t.canDrag=function(){Ge(!Fb,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Fb=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Fb=!1}},t.isDragging=function(){if(!this.sourceId)return!1;Ge(!Mb,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Mb=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{Mb=!1}},t.subscribeToStateChange=function(r,o){return this.internalMonitor.subscribeToStateChange(r,o)},t.isDraggingSource=function(r){return this.internalMonitor.isDraggingSource(r)},t.isOverTarget=function(r,o){return this.internalMonitor.isOverTarget(r,o)},t.getTargetIds=function(){return this.internalMonitor.getTargetIds()},t.isSourcePublic=function(){return this.internalMonitor.isSourcePublic()},t.getSourceId=function(){return this.internalMonitor.getSourceId()},t.subscribeToOffsetChange=function(r){return this.internalMonitor.subscribeToOffsetChange(r)},t.canDragSource=function(r){return this.internalMonitor.canDragSource(r)},t.canDropOnTarget=function(r){return this.internalMonitor.canDropOnTarget(r)},t.getItemType=function(){return this.internalMonitor.getItemType()},t.getItem=function(){return this.internalMonitor.getItem()},t.getDropResult=function(){return this.internalMonitor.getDropResult()},t.didDrop=function(){return this.internalMonitor.didDrop()},t.getInitialClientOffset=function(){return this.internalMonitor.getInitialClientOffset()},t.getInitialSourceClientOffset=function(){return this.internalMonitor.getInitialSourceClientOffset()},t.getSourceClientOffset=function(){return this.internalMonitor.getSourceClientOffset()},t.getClientOffset=function(){return this.internalMonitor.getClientOffset()},t.getDifferenceFromInitialOffset=function(){return this.internalMonitor.getDifferenceFromInitialOffset()},e})();function EX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Ib=!1,DX=(function(){function e(n){EX(this,e),this.targetId=null,this.internalMonitor=n.getMonitor()}var t=e.prototype;return t.receiveHandlerId=function(r){this.targetId=r},t.getHandlerId=function(){return this.targetId},t.subscribeToStateChange=function(r,o){return this.internalMonitor.subscribeToStateChange(r,o)},t.canDrop=function(){if(!this.targetId)return!1;Ge(!Ib,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return Ib=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Ib=!1}},t.isOver=function(r){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,r):!1},t.getItemType=function(){return this.internalMonitor.getItemType()},t.getItem=function(){return this.internalMonitor.getItem()},t.getDropResult=function(){return this.internalMonitor.getDropResult()},t.didDrop=function(){return this.internalMonitor.didDrop()},t.getInitialClientOffset=function(){return this.internalMonitor.getInitialClientOffset()},t.getInitialSourceClientOffset=function(){return this.internalMonitor.getInitialSourceClientOffset()},t.getSourceClientOffset=function(){return this.internalMonitor.getSourceClientOffset()},t.getClientOffset=function(){return this.internalMonitor.getClientOffset()},t.getDifferenceFromInitialOffset=function(){return this.internalMonitor.getDifferenceFromInitialOffset()},e})(),kX=function(e){"@swc/helpers - typeof";return e&&typeof Symbol<"u"&&e.constructor===Symbol?"symbol":typeof e};function OX(e){return e?e.__v_isVNode===!0:!1}function AX(e){return e?e.__v_skip:!1}function TX(e){return OX(e)&&kX(e.type)!=="symbol"}function BX(){throw new Error("Only native element nodes can now be passed to Vue DnD connectors.You can either wrap Component into a

, or turn it into a drag source or a drop target itself.")}function PX(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(AX(t)&&BX(),!TX(t)){var r=t;return e(r,n),r}}}function Mj(e){var t={};return Object.keys(e).forEach(function(n){var r=e[n];if(n.endsWith("Ref"))t[n]=e[n];else{var o=PX(r);t[n]=function(){return o}}}),t}function hC(e,t,n,r){let o;if(o!==void 0)return!!o;if(e===t)return!0;if(typeof e!="object"||!e||typeof t!="object"||!t)return!1;const i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;const u=Object.prototype.hasOwnProperty.bind(t);for(let s=0;s0&&arguments[0]!==void 0?arguments[0]:!1,o=this.dragPreview,i=r||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(i&&this.disconnectDragPreview(),!!this.handlerId){if(!o){this.lastConnectedDragPreview=o;return}i&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=o,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,o,this.dragPreviewOptions))}},t.didHandlerIdChange=function(){return this.lastConnectedHandlerId!==this.handlerId},t.didConnectedDragSourceChange=function(){return this.lastConnectedDragSource!==this.dragSource},t.didConnectedDragPreviewChange=function(){return this.lastConnectedDragPreview!==this.dragPreview},t.didDragSourceOptionsChange=function(){return!hC(this.lastConnectedDragSourceOptions,this.dragSourceOptions)},t.didDragPreviewOptionsChange=function(){return!hC(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)},t.disconnectDragSource=function(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)},t.disconnectDragPreview=function(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null)},t.clearDragSource=function(){this.dragSourceNode=null},t.clearDragPreview=function(){this.dragPreviewNode=null},IX(e,[{key:"connectTarget",get:function(){return this.dragSource}},{key:"dragSourceOptions",get:function(){return this.dragSourceOptionsInternal},set:function(r){this.dragSourceOptionsInternal=r}},{key:"dragPreviewOptions",get:function(){return this.dragPreviewOptionsInternal},set:function(r){this.dragPreviewOptionsInternal=r}},{key:"dragSource",get:function(){return this.dragSourceNode}},{key:"dragPreview",get:function(){return this.dragPreviewNode}}]),e})();function LX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function RX(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n(t==null&&(t=e()),t)}function EY(e,t){return e.filter(n=>n!==t)}function DY(e,t){const n=new Set,r=i=>n.add(i);e.forEach(r),t.forEach(r);const o=[];return n.forEach(i=>o.push(i)),o}class kY{enter(t){const n=this.entered.length,r=o=>this.isNodeInDocument(o)&&(!o.contains||o.contains(t));return this.entered=DY(this.entered.filter(r),[t]),n===0&&this.entered.length>0}leave(t){const n=this.entered.length;return this.entered=EY(this.entered.filter(this.isNodeInDocument),t),n>0&&this.entered.length===0}reset(){this.entered=[]}constructor(t){this.entered=[],this.isNodeInDocument=t}}class OY{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(t=>{Object.defineProperty(this.item,t,{configurable:!0,enumerable:!0,get(){return console.warn("Browser doesn't allow reading \"".concat(t,'" until the drop event.')),null}})})}loadDataTransfer(t){if(t){const n={};Object.keys(this.config.exposeProperties).forEach(r=>{const o=this.config.exposeProperties[r];o!=null&&(n[r]={value:o(t,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,n)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(t,n){return n===t.getSourceId()}endDrag(){}constructor(t){this.config=t,this.item={},this.initializeExposedProperties()}}const Nj="__NATIVE_FILE__",$j="__NATIVE_URL__",Uj="__NATIVE_TEXT__",zj="__NATIVE_HTML__",Q5=Object.freeze(Object.defineProperty({__proto__:null,FILE:Nj,HTML:zj,TEXT:Uj,URL:$j},Symbol.toStringTag,{value:"Module"}));function Lb(e,t,n){const r=t.reduce((o,i)=>o||e.getData(i),"");return r!=null?r:n}const gC={[Nj]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[zj]:{exposeProperties:{html:(e,t)=>Lb(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[$j]:{exposeProperties:{urls:(e,t)=>Lb(e,t,"").split("\n"),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[Uj]:{exposeProperties:{text:(e,t)=>Lb(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function AY(e,t){const n=gC[e];if(!n)throw new Error("native type ".concat(e," has no configuration"));const r=new OY(n);return r.loadDataTransfer(t),r}function Rb(e){if(!e)return null;const t=Array.prototype.slice.call(e.types||[]);return Object.keys(gC).filter(n=>{const r=gC[n];return r!=null&&r.matchesTypes?r.matchesTypes.some(o=>t.indexOf(o)>-1):!1})[0]||null}const TY=Rj(()=>/firefox/i.test(navigator.userAgent)),Hj=Rj(()=>!!window.safari);class ek{interpolate(t){const{xs:n,ys:r,c1s:o,c2s:i,c3s:a}=this;let u=n.length-1;if(t===n[u])return r[u];let s=0,l=a.length-1,c;for(;s<=l;){c=Math.floor(.5*(s+l));const d=n[c];if(dt)l=c-1;else return r[c]}u=Math.max(0,l);const f=t-n[u],p=f*f;return r[u]+o[u]*f+i[u]*p+a[u]*f*p}constructor(t,n){const{length:r}=t,o=[];for(let d=0;dt[d]{let k=new ek([0,.5,1],[s.y,s.y/c*m,s.y+m-c]).interpolate(p);return Hj()&&i&&(k+=(window.devicePixelRatio-1)*m),k},h=()=>new ek([0,.5,1],[s.x,s.x/l*d,s.x+d-l]).interpolate(f),{offsetX:y,offsetY:g}=o,b=y===0||y,w=g===0||g;return{x:b?y:h(),y:w?g:v()}}class IY{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var t;return!((t=this.globalContext)===null||t===void 0)&&t.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var t;return((t=this.optionsArgs)===null||t===void 0?void 0:t.rootElement)||this.window}constructor(t,n){this.ownerDocument=null,this.globalContext=t,this.optionsArgs=n}}function jY(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tk(e){for(var t=1;t{this.sourcePreviewNodes.delete(t),this.sourcePreviewNodeOptions.delete(t)}}connectDragSource(t,n,r){this.sourceNodes.set(t,n),this.sourceNodeOptions.set(t,r);const o=a=>this.handleDragStart(a,t),i=a=>this.handleSelectStart(a);return n.setAttribute("draggable","true"),n.addEventListener("dragstart",o),n.addEventListener("selectstart",i),()=>{this.sourceNodes.delete(t),this.sourceNodeOptions.delete(t),n.removeEventListener("dragstart",o),n.removeEventListener("selectstart",i),n.setAttribute("draggable","false")}}connectDropTarget(t,n){const r=a=>this.handleDragEnter(a,t),o=a=>this.handleDragOver(a,t),i=a=>this.handleDrop(a,t);return n.addEventListener("dragenter",r),n.addEventListener("dragover",o),n.addEventListener("drop",i),()=>{n.removeEventListener("dragenter",r),n.removeEventListener("dragover",o),n.removeEventListener("drop",i)}}addEventListeners(t){t.addEventListener&&(t.addEventListener("dragstart",this.handleTopDragStart),t.addEventListener("dragstart",this.handleTopDragStartCapture,!0),t.addEventListener("dragend",this.handleTopDragEndCapture,!0),t.addEventListener("dragenter",this.handleTopDragEnter),t.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.addEventListener("dragover",this.handleTopDragOver),t.addEventListener("dragover",this.handleTopDragOverCapture,!0),t.addEventListener("drop",this.handleTopDrop),t.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(t){t.removeEventListener&&(t.removeEventListener("dragstart",this.handleTopDragStart),t.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),t.removeEventListener("dragend",this.handleTopDragEndCapture,!0),t.removeEventListener("dragenter",this.handleTopDragEnter),t.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.removeEventListener("dragover",this.handleTopDragOver),t.removeEventListener("dragover",this.handleTopDragOverCapture,!0),t.removeEventListener("drop",this.handleTopDrop),t.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const t=this.monitor.getSourceId(),n=this.sourceNodeOptions.get(t);return tk({dropEffect:this.altKeyPressed?"copy":"move"},n||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const t=this.monitor.getSourceId(),n=this.sourcePreviewNodeOptions.get(t);return tk({anchorX:.5,anchorY:.5,captureDraggingState:!1},n||{})}isDraggingNativeItem(){const t=this.monitor.getItemType();return Object.keys(Q5).some(n=>Q5[n]===t)}beginDragNativeItem(t,n){this.clearCurrentDragSourceNode(),this.currentNativeSource=AY(t,n),this.currentNativeHandle=this.registry.addSource(t,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(t){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=t;const n=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var r;return(r=this.rootElement)===null||r===void 0?void 0:r.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},n)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var t;(t=this.window)===null||t===void 0||t.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(t,n){t.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(n))}handleDragEnter(t,n){this.dragEnterTargetIds.unshift(n)}handleDragOver(t,n){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(n)}handleDrop(t,n){this.dropTargetIds.unshift(n)}constructor(t,n,r){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=o=>{const i=this.sourceNodes.get(o);return i&&Vj(i)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=o=>!!(o&&this.document&&this.document.body&&this.document.body.contains(o)),this.endDragIfSourceWasRemovedFromDOM=()=>{const o=this.currentDragSourceNode;o==null||this.isNodeInDocument(o)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=o=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(o||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=o=>{if(o.defaultPrevented)return;const{dragStartSourceIds:i}=this;this.dragStartSourceIds=null;const a=uv(o);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(i||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:a});const{dataTransfer:u}=o,s=Rb(u);if(this.monitor.isDragging()){if(u&&typeof u.setDragImage=="function"){const c=this.monitor.getSourceId(),f=this.sourceNodes.get(c),p=this.sourcePreviewNodes.get(c)||f;if(p){const{anchorX:d,anchorY:m,offsetX:v,offsetY:h}=this.getCurrentSourcePreviewNodeOptions(),b=MY(f,p,a,{anchorX:d,anchorY:m},{offsetX:v,offsetY:h});u.setDragImage(p,b.x,b.y)}}try{u==null||u.setData("application/json",{})}catch(c){}this.setCurrentDragSourceNode(o.target);const{captureDraggingState:l}=this.getCurrentSourcePreviewNodeOptions();l?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(s)this.beginDragNativeItem(s);else{if(u&&!u.types&&(o.target&&!o.target.hasAttribute||!o.target.hasAttribute("draggable")))return;o.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=o=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var i;(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(o.dataTransfer)}if(!this.enterLeaveCounter.enter(o.target)||this.monitor.isDragging())return;const{dataTransfer:u}=o,s=Rb(u);s&&this.beginDragNativeItem(s,u)},this.handleTopDragEnter=o=>{const{dragEnterTargetIds:i}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=o.altKey,i.length>0&&this.actions.hover(i,{clientOffset:uv(o)}),i.some(u=>this.monitor.canDropOnTarget(u))&&(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=o=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var i;(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(o.dataTransfer)}},this.handleTopDragOver=o=>{const{dragOverTargetIds:i}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect="none");return}this.altKeyPressed=o.altKey,this.lastClientOffset=uv(o),this.scheduleHover(i),(i||[]).some(u=>this.monitor.canDropOnTarget(u))?(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?o.preventDefault():(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=o=>{this.isDraggingNativeItem()&&o.preventDefault(),this.enterLeaveCounter.leave(o.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=o=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var i;o.preventDefault(),(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(o.dataTransfer)}else Rb(o.dataTransfer)&&o.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=o=>{const{dropTargetIds:i}=this;this.dropTargetIds=[],this.actions.hover(i,{clientOffset:uv(o)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=o=>{const i=o.target;typeof i.dragDrop=="function"&&(i.tagName==="INPUT"||i.tagName==="SELECT"||i.tagName==="TEXTAREA"||i.isContentEditable||(o.preventDefault(),i.dragDrop()))},this.options=new IY(n,r),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new kY(this.isNodeInDocument)}}const RY=function(t,n,r){return new LY(t,n,r)},NY=Symbol("EmailEditorContext");function $Y(e){tj(NY,e)}const UY=re({__name:"EditorProvider",setup(e){const t=og();return $Y({store:t}),(n,r)=>(Y(),De(_(xX),{backend:_(RY)},{default:P(()=>[br(n.$slots,"default")]),_:3},8,["backend"]))}}),$t=()=>{const e=og(),{version:t,selectedBlockKey:n,selectedBlockType:r,columnsSource:o,columnsMap:i,columnsConfigMap:a,cellMap:u,cellConfigMap:s,blockMap:l,blockConfigMap:c,pageConfig:f}=ju(e),{autoSaveFn:p}=Pr(),d=ve(()=>o.value.map(L=>i.value[L])),m=(L,B)=>{n.value=L,r.value=B},v=()=>{const B={key:Yi(),type:"columns",name:"Columns",children:[]};return h(B),B},h=L=>{const B=y(L.key);a.value[L.key]=B},y=L=>{const B=new Date,E=Rt(wj);return E.key=L,E.meta.version=t.value,E.meta.createdAt=bt(B,"yyyy-MM-dd HH:mm:ss"),E.meta.updatedAt=bt(B,"yyyy-MM-dd HH:mm:ss"),E},g=L=>{const B=v();i.value[B.key]=B,x(B.key),o.value.splice(L,0,B.key),p()},b=()=>{const L=Yi(),B={key:L,width:100,name:"Cell",type:"cell",children:[]};return u.value[L]=B,s.value[L]=w(B.key),B},w=L=>{const B=new Date,E=Rt(_j);return E.key=L,E.meta.version=t.value,E.meta.createdAt=bt(B,"yyyy-MM-dd HH:mm:ss"),E.meta.updatedAt=bt(B,"yyyy-MM-dd HH:mm:ss"),E},x=L=>{const B=i.value[L];if(B){const E=b();B.children.push(E.key)}},k=(L,B)=>{if(L<0||L>=o.value.length||B<0||B>o.value.length){console.warn("Move column: 索引超出范围");return}const E=o.value[L],O=[...o.value];O.splice(L,1);const M=L{const E=i.value[L];if(E){const O=E.children.findIndex(M=>M===B);O>-1&&(E.children.splice(O,1),delete u.value[B])}},T=(L,B)=>{const E=i.value[L];if(!E||!i.value[L])return;const M=E.children.length,V=B.length,Q=V-M;if(Q>0)for(let Z=0;Z{D(L,le)});B.forEach((Z,le)=>{E.children[le]&&(u.value[E.children[le]].width=Z)}),p()},A=L=>{const B=wG.get(L.type);if(B){const E=new Date,O=Rt(B);O.key=L.key,O.name=L.name,O.meta.version=t.value,O.meta.createdAt=bt(E,"yyyy-MM-dd HH:mm:ss"),O.meta.updatedAt=bt(E,"yyyy-MM-dd HH:mm:ss"),c.value[L.key]=O}},F=(L,B,E)=>{const O=u.value[B];if(O){const V={key:Yi(),type:E.type,name:"".concat(E.name)};A(V),l.value[V.key]=V,O.children.splice(L,0,V.key),p()}},j=(L,B,E)=>{const O=u.value[L];if(!O||!O.children)return;const M=O.children[B];if(!M||B===E)return;O.children.splice(B,1);const V=B{if(L===B)return j(L,E,O);const V=u.value[L],Q=u.value[B];if(!V||!V.children||!Q||!Q.children||V.children[E]!==M)return;const Z=V.children.splice(E,1);Q.children.splice(O,0,Z[0]),p()},U=(L,B,E=!0)=>{const O=Rt(l.value[B]),M=Rt(c.value[B]),V=u.value[L];if(V){const Q=Yi();O.key=Q,M.key=Q,M.meta={version:t.value,createdAt:bt(new Date,"yyyy-MM-dd HH:mm:ss"),updatedAt:bt(new Date,"yyyy-MM-dd HH:mm:ss")};const Z=V.children.findIndex(le=>le===B);l.value[Q]=O,c.value[Q]=M,Z?V.children.splice(Z+1,0,Q):V.children.push(Q)}E&&p()},H=(L,B)=>{const E=Rt(u.value[B]),O=Rt(s.value[B]),M=Yi();E.key=M,E.children=[],O.key=M,O.meta={version:t.value,createdAt:bt(new Date,"yyyy-MM-dd HH:mm:ss"),updatedAt:bt(new Date,"yyyy-MM-dd HH:mm:ss")},u.value[M]=E,s.value[M]=O,u.value[B].children.forEach(Q=>{U(M,Q,!1)});const V=i.value[L];V&&V.children.push(M)},G=L=>{const B=Rt(i.value[L]),E=Rt(a.value[L]),O=Yi();B.key=O,B.children=[],E.key=O,E.meta={version:t.value,createdAt:bt(new Date,"yyyy-MM-dd HH:mm:ss"),updatedAt:bt(new Date,"yyyy-MM-dd HH:mm:ss")},i.value[O]=B,a.value[O]=E;const M=o.value.findIndex(V=>V===L);o.value.splice(M+1,0,O),i.value[L].children.forEach(V=>{H(O,V)}),p()},X=(L,B,E=!0)=>{const O=u.value[L];if(O){const M=O.children.findIndex(V=>V===B);M>-1&&(m("",""),O.children.splice(M,1),delete l.value[B],delete c.value[B])}E&&p()},oe=(L,B)=>{const E=u.value[L],O=i.value[B];if(E){E.children.forEach(V=>{X(L,V,!1)});const M=O.children.findIndex(V=>V===L);M>-1&&(delete u.value[L],delete s.value[L],O.children.splice(M,1))}};return{columnsSource:o,columnsMap:i,columnsMaps:d,columnsConfigMap:a,cellMap:u,cellConfigMap:s,blockMap:l,blockConfigMap:c,selectedBlockKey:n,selectedBlockType:r,pageConfig:f,selectBlock:m,insertColumnSourceAt:g,moveColumnSource:k,generateNewCell:b,applyNewWidthColumnsInCell:T,delColumnsInCell:D,insertBlockToCell:F,moveBlockInCell:j,moveBlockBetweenCells:R,duplicateBlock:U,duplicateColumn:G,removeBlock:X,removeColumn:L=>{const B=o.value.findIndex(E=>E===L);B>-1&&(m("",""),i.value[L].children.forEach(E=>{oe(E,L)}),delete i.value[L],delete a.value[L],o.value.splice(B,1)),p()}}},zY={class:"block-toolbar"},HY=re({__name:"Toolbar",props:{cellKey:{type:String,required:!0},data:{type:Object,required:!0}},setup(e){const{duplicateBlock:t,duplicateColumn:n,removeBlock:r,removeColumn:o}=$t(),i=()=>{e.data.type!=="columns"?t(e.cellKey,e.data.key):n(e.data.key)},a=()=>{e.data.type!=="columns"?r(e.cellKey,e.data.key):o(e.data.key)};return(u,s)=>{const l=f1;return Y(),ae("div",zY,[$("button",{class:"tool-btn",onClick:Qm(i,["stop"])},[C(l,{name:"drag-copy",size:"16",color:"#fff"})]),$("button",{class:"tool-btn",onClick:Qm(a,["stop"])},[C(l,{name:"drag-remove",size:"16",color:"#fff"})])])}}}),VY=gt(HY,[["__scopeId","data-v-091fc6b8"]]),WY=["data-block-id"],qY={class:"block-section"},GY={class:"block-content"},KY=re({__name:"Section",props:{data:{type:Object,required:!0},cellKey:{type:String,default:""},blockType:{type:String,required:!0},blockIndex:{type:Number,default:-1}},emits:["select","unSelect"],setup(e,{emit:t}){const n=t,{selectedBlockKey:r,columnsConfigMap:o,blockConfigMap:i,selectBlock:a}=$t(),{configToStyle:u}=ei(),s=ve(()=>r.value===e.data.key),l=()=>{a(e.data.key,e.data.type),n("select")},c=ve(()=>{let y={};return e.data.type==="columns"?y=o.value[e.data.key].containerStyle:y=i.value[e.data.key].containerStyle,u(y)}),[f,p,d]=e0(()=>({type:"SORT_BASE_BLOCK",item:()=>({type:"SORT_BASE_BLOCK",sourceIndex:e.blockIndex,sourceCellKey:e.cellKey,blockData:Rt(e.data)}),collect:y=>({isDragging:y.isDragging()})})),[m,v]=e0(()=>({type:"SORT_COLUMNS_BLOCK",item:()=>({type:"SORT_COLUMNS_BLOCK",sourceIndex:e.blockIndex,blockData:Rt(e.data)}),collect:y=>({isDragging:y.isDragging()})})),h=ve(()=>f.value.isDragging||m.value.isDragging);return qo(()=>h.value,y=>{y===!0&&n("unSelect")}),qo(()=>s.value,(y,g)=>{y===!1&&g===!0&&n("unSelect")}),(y,g)=>(Y(),ae("div",{ref:_(d),class:Di(["block-base",["block-".concat(e.blockType),{"is-selected":_(s)},{"is-dragging":_(h)}]]),"data-block-id":e.data.key,style:er(_(c)),onClick:Qm(l,["stop"])},[$("div",qY,[Go(C(VY,{"cell-key":e.cellKey,data:e.data},null,8,["cell-key","data"]),[[Ko,_(s)&&!_(h)]]),e.data.type==="columns"?(Y(),ae("div",{key:0,ref:_(v),class:"drag-handle columns-drag-handle"},g[0]||(g[0]=[$("i",{class:"drag-icon"},"≡",-1)]),512)):$n("",!0),e.data.type!=="columns"?(Y(),ae("div",{key:1,ref:_(p),class:"drag-handle"},g[1]||(g[1]=[$("i",{class:"drag-icon"},"≡",-1)]),512)):$n("",!0)]),$("div",GY,[br(y.$slots,"default",{},void 0,!0)])],14,WY))}}),Nu=gt(KY,[["__scopeId","data-v-24248443"]]);var Et=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function XY(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function yl(e){var t={exports:{}};return e(t,t.exports),t.exports}var Da,mm,sv=function(e){return e&&e.Math==Math&&e},$e=sv(typeof globalThis=="object"&&globalThis)||sv(typeof window=="object"&&window)||sv(typeof self=="object"&&self)||sv(typeof Et=="object"&&Et)||(function(){return this})()||Function("return this")(),h4=Function.prototype,nk=h4.apply,YY=h4.bind,rk=h4.call,Wj=typeof Reflect=="object"&&Reflect.apply||(YY?rk.bind(nk):function(){return rk.apply(nk,arguments)}),qj=Function.prototype,vC=qj.bind,mC=qj.call,ZY=vC&&vC.bind(mC),Ft=vC?function(e){return e&&ZY(mC,e)}:function(e){return e&&function(){return mC.apply(e,arguments)}},zn=function(e){return typeof e=="function"},kr=function(e){try{return!!e()}catch(t){return!0}},xr=!kr((function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})),qf=Function.prototype.call,Nr=qf.bind?qf.bind(qf):function(){return qf.apply(qf,arguments)},ok={}.propertyIsEnumerable,ik=Object.getOwnPropertyDescriptor,JY=ik&&!ok.call({1:2},1)?function(e){var t=ik(this,e);return!!t&&t.enumerable}:ok,g4={f:JY},$o=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},QY=Ft({}.toString),eZ=Ft("".slice),Os=function(e){return eZ(QY(e),8,-1)},Nb=$e.Object,tZ=Ft("".split),Gj=kr((function(){return!Nb("z").propertyIsEnumerable(0)}))?function(e){return Os(e)=="String"?tZ(e,""):Nb(e)}:Nb,nZ=$e.TypeError,v4=function(e){if(e==null)throw nZ("Can't call method on "+e);return e},Ii=function(e){return Gj(v4(e))},so=function(e){return typeof e=="object"?e!==null:zn(e)},Lr={},ak=function(e){return zn(e)?e:void 0},xf=function(e,t){return arguments.length<2?ak(Lr[e])||ak($e[e]):Lr[e]&&Lr[e][t]||$e[e]&&$e[e][t]},Qp=Ft({}.isPrototypeOf),$b=xf("navigator","userAgent")||"",uk=$e.process,sk=$e.Deno,lk=uk&&uk.versions||sk&&sk.version,ck=lk&&lk.v8;ck&&(mm=(Da=ck.split("."))[0]>0&&Da[0]<4?1:+(Da[0]+Da[1])),!mm&&$b&&(!(Da=$b.match(/Edge\/(\d+)/))||Da[1]>=74)&&(Da=$b.match(/Chrome\/(\d+)/))&&(mm=+Da[1]);var lv,t0=mm,ci=!!Object.getOwnPropertySymbols&&!kr((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&t0&&t0<41})),m4=ci&&!Symbol.sham&&typeof Symbol.iterator=="symbol",rZ=$e.Object,Ac=m4?function(e){return typeof e=="symbol"}:function(e){var t=xf("Symbol");return zn(t)&&Qp(t.prototype,rZ(e))},oZ=$e.String,yC=function(e){try{return oZ(e)}catch(t){return"Object"}},iZ=$e.TypeError,y4=function(e){if(zn(e))return e;throw iZ(yC(e)+" is not a function")},n0=function(e,t){var n=e[t];return n==null?void 0:y4(n)},aZ=$e.TypeError,uZ=Object.defineProperty,ru=$e["__core-js_shared__"]||(function(e,t){try{uZ($e,e,{value:t,configurable:!0,writable:!0})}catch(n){$e[e]=t}return t})("__core-js_shared__",{}),bl=yl((function(e){(e.exports=function(t,n){return ru[t]||(ru[t]=n!==void 0?n:{})})("versions",[]).push({version:"3.19.3",mode:"pure",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),sZ=$e.Object,ig=function(e){return sZ(v4(e))},lZ=Ft({}.hasOwnProperty),ot=Object.hasOwn||function(e,t){return lZ(ig(e),t)},cZ=0,fZ=Math.random(),dZ=Ft(1 .toString),r0=function(e){return"Symbol("+(e===void 0?"":e)+")_"+dZ(++cZ+fZ,36)},Gf=bl("wks"),As=$e.Symbol,fk=As&&As.for,pZ=m4?As:As&&As.withoutSetter||r0,ir=function(e){if(!ot(Gf,e)||!ci&&typeof Gf[e]!="string"){var t="Symbol."+e;ci&&ot(As,e)?Gf[e]=As[e]:Gf[e]=m4&&fk?fk(t):pZ(t)}return Gf[e]},hZ=$e.TypeError,gZ=ir("toPrimitive"),vZ=function(e,t){if(!so(e)||Ac(e))return e;var n,r=n0(e,gZ);if(r){if(n=Nr(r,e,t),!so(n)||Ac(n))return n;throw hZ("Can't convert object to primitive value")}return(function(o,i){var a,u;if(zn(a=o.toString)&&!so(u=Nr(a,o))||zn(a=o.valueOf)&&!so(u=Nr(a,o)))return u;throw aZ("Can't convert object to primitive value")})(e)},Cf=function(e){var t=vZ(e,"string");return Ac(t)?t:t+""},bC=$e.document,mZ=so(bC)&&so(bC.createElement),Kj=function(e){return mZ?bC.createElement(e):{}},Xj=!xr&&!kr((function(){return Object.defineProperty(Kj("div"),"a",{get:function(){return 7}}).a!=7})),dk=Object.getOwnPropertyDescriptor,yZ=xr?dk:function(e,t){if(e=Ii(e),t=Cf(t),Xj)try{return dk(e,t)}catch(n){}if(ot(e,t))return $o(!Nr(g4.f,e,t),e[t])},x1={f:yZ},bZ=/#|\.prototype\./,ag=function(e,t){var n=_Z[wZ(e)];return n==CZ||n!=xZ&&(zn(t)?kr(t):!!t)},wZ=ag.normalize=function(e){return String(e).replace(bZ,".").toLowerCase()},_Z=ag.data={},xZ=ag.NATIVE="N",CZ=ag.POLYFILL="P",SZ=ag,pk=Ft(Ft.bind),b4=function(e,t){return y4(e),t===void 0?e:pk?pk(e,t):function(){return e.apply(t,arguments)}},EZ=$e.String,DZ=$e.TypeError,zr=function(e){if(so(e))return e;throw DZ(EZ(e)+" is not an object")},kZ=$e.TypeError,hk=Object.defineProperty,OZ=xr?hk:function(e,t,n){if(zr(e),t=Cf(t),zr(n),Xj)try{return hk(e,t,n)}catch(r){}if("get"in n||"set"in n)throw kZ("Accessors not supported");return"value"in n&&(e[t]=n.value),e},$u={f:OZ},sr=xr?function(e,t,n){return $u.f(e,t,$o(1,n))}:function(e,t,n){return e[t]=n,e},AZ=x1.f,TZ=function(e){var t=function(n,r,o){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,o)}return Wj(e,this,arguments)};return t.prototype=e.prototype,t},Zi=function(e,t){var n,r,o,i,a,u,s,l,c=e.target,f=e.global,p=e.stat,d=e.proto,m=f?$e:p?$e[c]:($e[c]||{}).prototype,v=f?Lr:Lr[c]||sr(Lr,c,{})[c],h=v.prototype;for(o in t)n=!SZ(f?o:c+(p?".":"#")+o,e.forced)&&m&&ot(m,o),a=v[o],n&&(u=e.noTargetGet?(l=AZ(m,o))&&l.value:m[o]),i=n&&u?u:t[o],n&&typeof a==typeof i||(s=e.bind&&n?b4(i,$e):e.wrap&&n?TZ(i):d&&zn(i)?Ft(i):i,(e.sham||i&&i.sham||a&&a.sham)&&sr(s,"sham",!0),sr(v,o,s),d&&(ot(Lr,r=c+"Prototype")||sr(Lr,r,{}),sr(Lr[r],o,i),e.real&&h&&!h[o]&&sr(h,o,i)))},gk=bl("keys"),C1=function(e){return gk[e]||(gk[e]=r0(e))},BZ=!kr((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),vk=C1("IE_PROTO"),wC=$e.Object,PZ=wC.prototype,o0=BZ?wC.getPrototypeOf:function(e){var t=ig(e);if(ot(t,vk))return t[vk];var n=t.constructor;return zn(n)&&t instanceof n?n.prototype:t instanceof wC?PZ:null},FZ=$e.String,MZ=$e.TypeError,i0=Object.setPrototypeOf||("__proto__"in{}?(function(){var e,t=!1,n={};try{(e=Ft(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch(r){}return function(r,o){return zr(r),(function(i){if(typeof i=="object"||zn(i))return i;throw MZ("Can't set "+FZ(i)+" as a prototype")})(o),t?e(r,o):r.__proto__=o,r}})():void 0),IZ=Math.ceil,jZ=Math.floor,w4=function(e){var t=+e;return t!=t||t===0?0:(t>0?jZ:IZ)(t)},LZ=Math.max,RZ=Math.min,_C=function(e,t){var n=w4(e);return n<0?LZ(n+t,0):RZ(n,t)},NZ=Math.min,ug=function(e){return(t=e.length)>0?NZ(w4(t),9007199254740991):0;var t},$Z=function(e){return function(t,n,r){var o,i=Ii(t),a=ug(i),u=_C(r,a);if(e&&n!=n){for(;a>u;)if((o=i[u++])!=o)return!0}else for(;a>u;u++)if((e||u in i)&&i[u]===n)return e||u||0;return!e&&-1}},UZ={indexOf:$Z(!1)},sg={},zZ=UZ.indexOf,mk=Ft([].push),Yj=function(e,t){var n,r=Ii(e),o=0,i=[];for(n in r)!ot(sg,n)&&ot(r,n)&&mk(i,n);for(;t.length>o;)ot(r,n=t[o++])&&(~zZ(i,n)||mk(i,n));return i},a0=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],HZ=a0.concat("length","prototype"),VZ=Object.getOwnPropertyNames||function(e){return Yj(e,HZ)},_4={f:VZ},ym={f:Object.getOwnPropertySymbols},WZ=Ft([].concat),qZ=xf("Reflect","ownKeys")||function(e){var t=_4.f(zr(e)),n=ym.f;return n?WZ(t,n(e)):t},x4=Object.keys||function(e){return Yj(e,a0)},GZ=xr?Object.defineProperties:function(e,t){zr(e);for(var n,r=Ii(t),o=x4(t),i=o.length,a=0;i>a;)$u.f(e,n=o[a++],r[n]);return e},KZ=xf("document","documentElement"),Zj=C1("IE_PROTO"),Ub=function(){},Jj=function(e){return"