var Hm=Object.defineProperty;var Pm=(e,t,a)=>t in e?Hm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a;var Ee=(e,t,a)=>Pm(e,typeof t!="symbol"?t+"":t,a);import{r as C,c as E,o as d,w as i,a as l,u as p,b as x,d as r,e as _,f as R,t as h,F as H,g as ee,h as V,i as Be,j as At,k as Qt,l as j,m as oa,n as de,p as Rt,q as Xe,s as ao,T as vs,v as ge,x as ye,y as Gd,z as Pa,A as pn,B as kn,C as Nm,D as la,E as bn,G as ia,H as Km,I as Hn,J as Kl,K as xn,L as Rr,M as Gm,N as zA,V as YA,O as Ks,P as jm,Q as jd,R as Dt,S as Ca,U as Rn,W as zm,X as Zi,Y as Ym,Z as pl,_ as qm,$ as Wm,a0 as Xm,a1 as zd,a2 as Jm}from"./chunks/vue.esm-bundler.js?ver=1.4.1";import{u as ja,a as fn,o as qA,c as Zm,b as eh}from"./chunks/vue-router.js?ver=1.4.1";import{_ as W,a as It}from"./chunks/DynamicIcon.js?ver=1.4.1";import{T as Gs,_ as na,a as js,b as Yd,F as rr,c as Na,P as co,d as WA,e as th,f as ah,m as nh}from"./chunks/RouteCell.js?ver=1.4.1";import{t as c,a as Kt,A as Ie,p as ir}from"./chunks/Translator.js?ver=1.4.1";import{_ as at,P as za}from"./chunks/Empty.js?ver=1.4.1";import{_ as St,a as qd,p as no,b as Za,c as XA,d as JA,L as Wd,e as Or,O as ZA,f as Hr,P as Xd,C as Os}from"./chunks/OrderCustomerInformation.js?ver=1.4.1";import{C as Te,f as Jt,a as sh,p as lh,b as oh,g as rh,c as ih,d as dh}from"./chunks/productService.js?ver=1.4.1";import{_ as $a}from"./chunks/ConvertedTime.js?ver=1.4.1";import{_ as He}from"./chunks/_plugin-vue_export-helper.js?ver=1.4.1";import{I as Oe,S as vt}from"./chunks/IconButton.js?ver=1.4.1";import{c as uh,h as so,a as ep,g as tp,f as ch,b as Hs,$ as en,d as Ah}from"./chunks/common.js?ver=1.4.1";import{C as Ce,a as me,b as he,B as qt}from"./chunks/Badge.js?ver=1.4.1";import{M as Ya}from"./chunks/Model.js?ver=1.4.1";import{R as re}from"./chunks/Rest.js?ver=1.4.1";import{d as Re,g as ph}from"./chunks/dayjs.min.js?ver=1.4.1";import{a as Pr,E as Ea,m as fh,b as tn,d as Is,i as Xa,c as mh,s as ap,e as dr,f as Jd,r as Zd,g as np,p as Yu,w as hh,h as Nr,l as _h,j as _l,k as gh,n as vh,o as ur,t as yh,q as bh,u as wh,v as Ch,x as Bh,y as kh,z as xh,A as Sh}from"./chunks/index.js?ver=1.4.1";import{_ as eu,a as tu,b as Fh,S as sp,c as lp,d as Eh,A as op,e as rp}from"./chunks/CancelSubscription.js?ver=1.4.1";import{n as q}from"./chunks/Notify.js?ver=1.4.1";import{_ as ra}from"./chunks/Animation.js?ver=1.4.1";import{_ as ts,T as ke,m as Ua,a as jn,i as Mt,r as Uh,L as ed,b as ip,d as dp,c as up}from"./chunks/dateShortCuts.js?ver=1.4.1";import{S as ha,_ as _a,u as ks,a as $h,b as Dh,c as Qh}from"./chunks/countries.js?ver=1.4.1";import{u as xs,L as sa,_ as Kr}from"./chunks/NotFound.js?ver=1.4.1";import{A as Ps}from"./chunks/Asset.js?ver=1.4.1";import{E as Ih}from"./chunks/index2.js?ver=1.4.1";import{S as Gt}from"./chunks/Str.js?ver=1.4.1";import{A as Ke}from"./chunks/Arr.js?ver=1.4.1";import{U as td}from"./chunks/Url.js?ver=1.4.1";import{u as Gr,t as cp}from"./chunks/timezone.js?ver=1.4.1";import{e as lo,i as au,U as nu,p as Th}from"./chunks/Utils.js?ver=1.4.1";import{_ as Bl,P as Ap}from"./chunks/ProductVariationSelector.js?ver=1.4.1";import{B as su}from"./chunks/BundleProducts.js?ver=1.4.1";import{E as qu}from"./chunks/index3.js?ver=1.4.1";import{_ as pp}from"./chunks/FileUploaderDialog.js?ver=1.4.1";import{E as Xs,v as Vh,i as Mh}from"./chunks/defaults.js?ver=1.4.1";import Lh from"./chunks/Screenshot.js?ver=1.4.1";import{u as Rh}from"./chunks/useElementPlusComponents.js?ver=1.4.1";import"./chunks/TransitionAccordion.js?ver=1.4.1";import"./chunks/AddressComponent2.js?ver=1.4.1";import"./chunks/index4.js?ver=1.4.1";class Oh extends Gs{getTabs(){return{}}getToggleableColumns(){return[{label:c("Lifetime Value (LTV)"),value:"ltv"},{label:c("Customer Since"),value:"customer_since"},{label:c("Last Purchase Date"),value:"last_purchase_date"}]}getSortableColumns(){return[{label:c("Customer ID"),value:"id"},{label:c("Name"),value:"first_name"},{label:c("Purchases"),value:"purchase_count"},{label:c("Lifetime Value (LTV)"),value:"ltv"},{label:c("Last Purchase Date"),value:"last_purchase_date"},{label:c("Customer Since"),value:"created_at"}]}getSearchHint(){return c("Search by, #ID, First Name, Last Name and Email")}getFetchUrl(){return"customers"}parseResponse(t){return t.customers}getTableName(){return"customers"}}function fp(e){return Oh.init(e)}const Hh={class:"table-cell"},Ph={class:"fct-product-info-card w-full"},Nh={class:"fct-product-info-media"},Kh={class:"fct-product-info-details grow-0 shrink-0 basis-[calc(100%-52px)]",style:{overflow:"hidden"}},Gh={class:"fct-product-info-name flex flex-col items-start gap-3"},jh={class:"table-cell"},zh={class:"table-cell"},Yh={class:"table-cell"},qh={class:"table-cell"};const Wh={__name:"CustomersLoader",props:{nextPageCount:{type:Number,default:0},customerTable:{type:Object,default:()=>({})}},setup(e){const t=e,a=Array.from({length:t.nextPageCount},(n,s)=>s+1);return(n,s)=>{const o=C("el-table-column"),u=C("el-skeleton-item"),A=C("el-table"),f=C("el-skeleton");return d(),E(f,{animated:""},{template:i(()=>[l(A,{data:p(a),class:"w-full compact-table responsive"},{empty:i(()=>s[0]||(s[0]=[])),default:i(()=>[x("",!0),l(o,{label:n.$t("Customer"),width:"300"},{default:i(()=>[r("div",Hh,[r("div",Ph,[r("div",Nh,[l(u,{varient:"image",class:"w-10 h-10.5 rounded-full flex-none"})]),r("div",Kh,[r("div",Gh,[l(u,{varient:"p",class:"max-w-[190px]"}),l(u,{varient:"p",class:"max-w-[100px]"})])])])])]),_:1},8,["label"]),l(o,{label:n.$t("Address"),width:"300"},{default:i(()=>[r("div",jh,[l(u,{varient:"p",class:"w-4/5"})])]),_:1},8,["label"]),l(o,{label:n.$t("Purchases"),width:"150"},{default:i(()=>[r("div",zh,[l(u,{varient:"p",class:"w-3/5"})])]),_:1},8,["label"]),e.customerTable.isColumnVisible("last_purchase_date")?(d(),E(o,{key:1,label:n.$t("Last Purchase Date"),width:"200"},{default:i(()=>[r("div",Yh,[l(u,{varient:"p",class:"w-4/5"})])]),_:1},8,["label"])):x("",!0),e.customerTable.isColumnVisible("customer_since")?(d(),E(o,{key:2,label:n.$t("Customer Since"),width:"150"},{default:i(()=>[r("div",qh,[l(u,{varient:"p",class:"w-4/5"})])]),_:1},8,["label"])):x("",!0),(e.customerTable.isColumnVisible("actions"),x("",!0))]),_:1},8,["data"])]),_:1})}}},Xh={key:0,class:"fct-customer-card"},Jh={class:"fct-customer-avatar"},Zh=["src"],e_={class:"fct-customer-details"},t_={class:"fct-customer-name"},a_={class:"fct-customer-id"},n_={class:"fct-customer-email"},s_=["innerHTML"],l_={key:1},o_={__name:"CustomersTable",props:{table:{type:Object,required:!0}},setup(e){return(t,a)=>{const n=C("el-table-column"),s=C("el-table");return d(),E(s,{data:e.table.getTableData(),class:"w-full compact-table"},{empty:i(()=>[l(at,{icon:"Empty/ListView","has-dark":!0,text:p(c)("No customer found!")},null,8,["text"])]),default:i(()=>[x("",!0),l(n,{label:p(c)("Customer"),width:"300"},{default:i(o=>{var u;return[l(na,{class:"hover:no-underline",to:{name:"view_customer",params:{customer_id:(u=o.row)==null?void 0:u.id}}},{default:i(()=>{var A,f,m,g,y;return[(A=o.row)!=null&&A.id?(d(),_("div",Xh,[r("div",Jh,[r("span",null,[r("img",{src:(f=o.row)==null?void 0:f.photo,alt:"avatar"},null,8,Zh)])]),r("div",e_,[r("div",t_,[R(h(((m=o.row)==null?void 0:m.full_name)||p(c)("No Name"))+" ",1),r("span",a_,"#"+h(p(Kt)((g=o.row)==null?void 0:g.id)),1)]),r("div",n_,h((y=o.row)==null?void 0:y.email),1)])])):x("",!0)]}),_:2},1032,["to"])]}),_:1},8,["label"]),l(n,{label:p(c)("Address"),width:"300"},{default:i(o=>{var u;return[l(na,{class:"hover:no-underline",to:{name:"view_customer",params:{customer_id:(u=o.row)==null?void 0:u.id}}},{default:i(()=>[R(h(t.getOrderAddress(o.row)),1)]),_:2},1032,["to"])]}),_:1},8,["label"]),l(n,{label:p(c)("Purchases"),width:90},{default:i(o=>{var u;return[l(na,{class:"hover:no-underline",to:{name:"view_customer",params:{customer_id:(u=o.row)==null?void 0:u.id}}},{default:i(()=>[R(h(p(Kt)(o.row.purchase_count)),1)]),_:2},1032,["to"])]}),_:1},8,["label"]),e.table.isColumnVisible("ltv")?(d(),E(n,{key:1,label:p(c)("LTV"),width:100},{default:i(o=>{var u;return[l(na,{class:"hover:no-underline",to:{name:"view_customer",params:{customer_id:(u=o.row)==null?void 0:u.id}}},{default:i(()=>[r("span",{innerHTML:p(Te).formatNumber(o.row.ltv,!0,!1)},null,8,s_)]),_:2},1032,["to"])]}),_:1},8,["label"])):x("",!0),e.table.isColumnVisible("last_purchase_date")?(d(),E(n,{key:2,label:p(c)("Last Purchase Date"),width:"200"},{default:i(o=>{var u;return[l(na,{class:"hover:no-underline",to:{name:"view_customer",params:{customer_id:(u=o.row)==null?void 0:u.id}}},{default:i(()=>[o.row.last_purchase_date?(d(),E($a,{key:0,"date-time":o.row.last_purchase_date},null,8,["date-time"])):(d(),_("span",l_,"---"))]),_:2},1032,["to"])]}),_:1},8,["label"])):x("",!0),e.table.isColumnVisible("customer_since")?(d(),E(n,{key:3,label:p(c)("Customer Since"),width:"150"},{default:i(o=>{var u;return[l(na,{class:"hover:no-underline",to:{name:"view_customer",params:{customer_id:(u=o.row)==null?void 0:u.id}}},{default:i(()=>[l($a,{"date-time":o.row.created_at},null,8,["date-time"])]),_:2},1032,["to"])]}),_:1},8,["label"])):x("",!0)]),_:1},8,["data"])}}},r_={class:"fct-customer-table-mobile-wrap"},i_=["onClick"],d_={class:"fct-customer-table-mobile-header"},u_={key:0,class:"fct-customer-table-customer-col fct-customer-card"},c_={class:"fct-customer-avatar"},A_=["src"],p_={class:"fct-customer-details"},f_={class:"fct-customer-name"},m_={class:"fct-customer-id"},h_={class:"fct-customer-email"},__={class:"fct-customer-table-purchases-col"},g_={class:"fct-customer-table-mobile-body"},v_={class:"fct-customer-table-mobile-body-list"},y_={key:0,class:"fct-customer-table-ltv-col"},b_={class:"label"},w_=["innerHTML"],C_={key:1,class:"fct-customer-table-last-purchase-date-col"},B_={class:"label"},k_={class:"value"},x_={key:2,class:"fct-customer-table-customer-since-col"},S_={class:"label"},F_={class:"value"},E_={class:"fct-customer-table-mobile-footer"},U_={class:"fct-customer-table-address-col"},$_={key:0,class:"py-6 text-center"},D_={__name:"CustomersTableMobile",props:{table:{type:Object,required:!0},emptyText:{type:String,default:c("No customers found.")}},setup(e){return(t,a)=>(d(),_("div",r_,[(d(!0),_(H,null,ee(e.table.getTableData(),(n,s)=>(d(),_("div",{key:n.id,class:"fct-customer-table-mobile-row",onClick:o=>t.$router.push({name:"view_customer",params:{customer_id:n.id}})},[r("div",d_,[n!=null&&n.id?(d(),_("div",u_,[r("div",c_,[r("img",{src:n==null?void 0:n.photo,alt:"avatar"},null,8,A_)]),r("div",p_,[r("div",f_,[R(h((n==null?void 0:n.full_name)||p(c)("No Name"))+" ",1),r("span",m_,"#"+h(n==null?void 0:n.id),1)]),r("div",h_,h(n==null?void 0:n.email),1)])])):x("",!0),r("div",__,h(n.purchase_count)+" "+h(n.purchase_count>1?p(c)("Purchases"):p(c)("Purchase")),1)]),r("div",g_,[r("ul",v_,[e.table.isColumnVisible("ltv")?(d(),_("li",y_,[r("div",b_,h(p(c)("LTV:")),1),r("div",{class:"value",innerHTML:p(Te).formatNumber(n.ltv,!0,!1)},null,8,w_)])):x("",!0),e.table.isColumnVisible("last_purchase_date")?(d(),_("li",C_,[r("div",B_,h(p(c)("Last Purchase Date:")),1),r("div",k_,[l($a,{"date-time":n.last_purchase_date},null,8,["date-time"])])])):x("",!0),e.table.isColumnVisible("customer_since")?(d(),_("li",x_,[r("div",S_,h(p(c)("Customer Since:")),1),r("div",F_,[l($a,{"date-time":n.created_at},null,8,["date-time"])])])):x("",!0)])]),r("div",E_,[r("div",U_,[l(W,{name:"LocationPin"}),R(" "+h(t.getOrderAddress(n)),1)])])],8,i_))),128)),e.table.getTableData().length===0?(d(),_("div",$_,[l(at,{icon:"Empty/Order","has-dark":"",text:e.emptyText},null,8,["text"])])):x("",!0)]))}},Q_={},I_={class:"px-4 py-3"},T_={class:"flex items-center justify-between mb-3"},V_={class:"flex items-center justify-between mb-3"},M_={class:"flex items-center justify-between mb-3"},L_={class:"flex items-center justify-between mb-3"};function R_(e,t){const a=C("el-skeleton-item"),n=C("el-skeleton");return d(),E(n,{animated:""},{template:i(()=>[r("div",I_,[r("div",T_,[l(a,{varient:"p",class:"w-1/2"}),l(a,{varient:"p",class:"w-[100px]"})]),r("div",V_,[l(a,{varient:"p",class:"w-[50px]"}),l(a,{varient:"p",class:"w-[80px]"})]),r("div",M_,[l(a,{varient:"p",class:"w-[120px]"}),l(a,{varient:"p",class:"w-[100px]"})]),r("div",L_,[l(a,{varient:"p",class:"w-[100px]"}),l(a,{varient:"p",class:"w-[100px]"})]),l(a,{varient:"p",class:"w-[230px]"})])]),_:1})}const O_=He(Q_,[["render",R_]]),H_={class:"fct-all-customers-page fct-layout-width"},P_={class:"fct-all-customers-wrap"},N_={key:1},K_={__name:"AllCustomers",setup(e){const t=fp(),a=V({showModal:!1,action:"create",title:c("Create New Customer"),customer:{}}),n=V(!1),s=()=>{n.value=window.innerWidth<768};return Be(()=>{s(),window.addEventListener("resize",s)}),At(()=>{window.removeEventListener("resize",s)}),(o,u)=>{const A=C("el-button");return d(),_("div",H_,[l(St,{permission:"customers/manage"},{default:i(()=>[l(za,{title:p(c)("Customers")},{action:i(()=>[l(A,{type:"primary",onClick:u[0]||(u[0]=f=>a.value.showModal=!0)},{default:i(()=>[R(h(p(c)("Add Customer")),1)]),_:1})]),_:1},8,["title"])]),_:1}),l(St,{permission:"customers/view"},{default:i(()=>[r("div",P_,[l(js,{table:p(t),"has-mobile-slot":!0},{mobile:i(()=>[p(t).isLoading()?(d(),E(O_,{key:0})):x("",!0),l(D_,{table:p(t)},null,8,["table"])]),default:i(()=>[p(t).isLoading()?(d(),E(Wh,{key:0,customerTable:p(t),"next-page-count":p(t).nextPageCount},null,8,["customerTable","next-page-count"])):(d(),_("div",N_,[l(o_,{table:p(t)},null,8,["table"])]))]),_:1},8,["table"])])]),_:1}),l(St,{permission:"customers/manage"},{default:i(()=>[l(qd,{"onUpdate:customerModal":u[1]||(u[1]=()=>{a.value.showModal=!1,a.value.customer={},p(t).fetch()}),customerModalInfos:a.value,customer_id:a.value.customer_id,customer:a.value.customer,onCloseModal:u[2]||(u[2]=f=>a.value.showModal=!1)},null,8,["customerModalInfos","customer_id","customer"])]),_:1})])}}};class G_ extends Gs{getTabs(){return{all:c("All"),completed:c("Completed"),processing:c("Processing"),"on-hold":c("On Hold"),paid:c("Paid"),subscription:c("Subscription"),renewal:c("Renewal"),refunded:c("Refunded"),partially_refunded:c("Partially Refunded"),upgraded_from:{title:c("Upgraded From"),description:c("Orders upgraded from another order")},upgraded_to:{title:c("Upgraded To"),description:c("Orders upgraded to another order")}}}getToggleableColumns(){return[{label:c("Customer"),value:"customer"},{label:c("Items"),value:"order_items"},{label:c("Order Status"),value:"status"},{label:c("Order Type"),value:"type"},{label:c("Actions"),value:"actions"}]}getSortableColumns(){return[{label:c("Order ID"),value:"id"},{label:c("Total"),value:"total_amount"},{label:c("Payment Status"),value:"payment_status"},{label:c("Order Status"),value:"status"}]}getSearchHint(){return c("Search by invoice no, customer name, or customer email.")}getFetchUrl(){return"orders"}parseResponse(t){return t.orders}getTableName(){return"order_table"}with(){return["customer.primary_billing_address","order_items"]}}function mp(e){return G_.init(e)}const j_={class:"fct-order-stats-card"},z_={class:"fct-order-stats-card-head"},Y_={class:"fct-order-stats-card-head-content"},q_={class:"text"},W_={key:0,class:"value"},X_={class:"fct-order-stats-card-body"},J_={key:0,class:"change-wrap"},Z_={key:0,class:"change-title"},eg={key:1,class:"change-title"},tg={key:1,class:"change-wrap"},ag={class:"change-title"},ng={__name:"StatCard",props:{direction:String,stat:Object,statRanges:Object,currentRange:String|Number,statKey:String|Number,loading:Boolean},setup(e){const t=Qt().ctx,a=e,n=j(()=>{switch(a.statKey){case"total_orders":return"warning";case"paid_orders":return"blue";case"total_paid_order_items":return"danger";case"total_paid_amounts":return"secondary";default:return"info"}}),s=j(()=>u.value===0?"":u.value>0?"success":"danger"),o=f=>f.is_cents?t.formatNumber(f.current_count):Kt(f.current_count),u=j(()=>{let f=uh(a.stat.current_count,a.stat.compare_count)??0;return f===""?0:f}),A=j(()=>a.statRanges[a.currentRange].label);return(f,m)=>{const g=C("el-skeleton"),y=C("el-skeleton-item");return d(),_("div",j_,[r("div",z_,[l(Oe,{size:"large",bg:n.value,soft:""},{default:i(()=>[oa(f.$slots,"icon")]),_:3},8,["bg"]),r("div",Y_,[l(g,{loading:e.loading,animated:"",rows:0},null,8,["loading"]),r("span",q_,h(e.stat.title),1),e.loading?x("",!0):(d(),_("div",W_,h(o(e.stat)),1))])]),r("div",X_,[l(g,{loading:e.loading,animated:""},{template:i(()=>[l(y,{variant:"p",class:"w-1/2 h-4"})]),_:1},8,["loading"]),!e.loading&&e.currentRange!=="all_time"?(d(),_("div",J_,[r("span",{class:de("change "+s.value)},[u.value!==0?(d(),E(W,{key:0,name:u.value>0?"CaretUp":"CaretDown"},null,8,["name"])):x("",!0),R(" "+h(u.value===0?f.$t("Same as previous"):Math.abs(u.value)+"%"),1)],2),u.value>0?(d(),_("span",Z_,h(p(c)("More than %s",A.value==="Today"?f.$t("Yesterday"):f.$t(A.value))),1)):u.value<0?(d(),_("span",eg,h(p(c)("Less than %s",A.value==="Today"?f.$t("Yesterday"):f.$t(A.value))),1)):x("",!0)])):x("",!0),!e.loading&&e.currentRange==="all_time"?(d(),_("div",tg,[r("span",ag,h(f.$t("All Time")),1)])):x("",!0)])])}}},sg={name:"CardFooter"},lg={class:"fct-card-footer"};function og(e,t,a,n,s,o){return d(),_("div",lg,[oa(e.$slots,"default")])}const lu=He(sg,[["render",og]]);class hp{constructor(){Ee(this,"_attributes",{})}attribute(t,a){return this._attributes[t]=a,this}setAttribute(t){return this._attributes=typeof t=="object"?t:this._attributes,this}}class ys{static install(t,a,n={},s=!1){const o=new a(...Object.values(n));Object.keys(o).forEach(u=>{(s||!t.hasOwnProperty(u))&&(t[u]=o[u])}),Object.getOwnPropertyNames(a.prototype).forEach(u=>{u!=="constructor"&&typeof o[u]=="function"&&(s||typeof t[u]!="function")&&(t[u]=o[u].bind(t))})}}class rg extends Ya{constructor(){super(...arguments);Ee(this,"data",{salesGrowthChart:[],countryHeatMap:[],fluctuations:[],dashBoardStats:[],recentOrders:[],recentActivities:[],topSoldProducts:[],currencySign:Ie.get("shop.currency_sign"),isBusy:{recentActivities:!1,fluctuations:!1,dashBoardStats:!1,recentOrders:!1,countryHeatMap:!1,salesGrowthChart:!0,topSoldProducts:!0}})}get controllerKey(){return"ReportingController"}beforeInit(){}makeRequest(a,n,s,o){this.data.isBusy[o]=!0,typeof n!="object"&&(n={});const u=re.get(`reports/${a}`,n);return this.resolvePromiseResponse(u,s,o),u}resolvePromiseResponse(a,n=null,s=null){a.then(o=>{s==null||n==null||(this.data[s]=o[n])}).catch(o=>{}).finally(()=>{this.data.isBusy[s]=!1})}getDashboardStats(a={}){return this.makeRequest("dashboard-stats",a,"dashBoardStats","dashBoardStats")}getSalesGrowthChart(a={}){return this.makeRequest("sales-growth-chart",a,"salesGrowthChart","salesGrowthChart")}getCountryHeatMap(a={}){return this.makeRequest("country-heat-map",a,"countryHeatMap","countryHeatMap")}getRecentOrders(a={}){return this.makeRequest("get-recent-orders",a,"recentOrders","recentOrders")}getRecentActivities(a={}){return this.makeRequest("get-recent-activities",a,"recentActivities","recentActivities")}getSummary(a={}){return this.makeRequest("get-dashboard-summary",a,"summaryData","summaryData")}getTopSoldProducts(a={}){return this.makeRequest("fetch-top-sold-products",a,"topSoldProducts","topSoldProducts")}}const Ia=rg.init(),ig={},dg={class:"fct-order-stats-row"},ug={class:"p-4 bg-gray-25 rounded dark:bg-primary-500"},cg={class:"flex items-center gap-2 mb-3"},Ag={class:"right flex flex-col flex-1 gap-2"};function pg(e,t){const a=C("el-skeleton-item"),n=C("el-skeleton");return d(),_("div",dg,[(d(),_(H,null,ee(4,s=>l(n,{animated:"",key:s},{template:i(()=>[r("div",ug,[r("div",cg,[l(a,{variant:"p",class:"rounded w-10 h-10 block"}),r("div",Ag,[l(a,{variant:"p",class:"rounded w-4/5 block"}),l(a,{variant:"p",class:"rounded w-1/2 block"})])]),r("div",null,[l(a,{variant:"p",class:"rounded w-2/3 block"})])])]),_:2},1024)),64))])}const fg=He(ig,[["render",pg]]),mg={class:"fct-order-stats-wrap"},hg={class:"fct-order-stats-actions flex items-center gap-2.5"},_g={class:"fct-order-stats-body"},gg={key:1,class:"fct-order-stats-row"},vg={class:"flex justify-end mt-2"},yg=Object.assign({name:"OrderStatBar"},{__name:"OrderStatBar",setup(e){const t=V(vt.get("order_stat_collapse",!1)),a=V(""),n=Qt().ctx,s=V(!1),o=V(!0),u=V(!1),A=V("-7 days"),f=ja(),m=V({"-0 days":{label:c("Today"),desc:c("Compared to yesterday")},"-7 days":{label:c("Last 7 days"),desc:c("Compared to the previous 7 days")},"-30 days":{label:c("Last 30 days"),desc:c("Compared to the previous 30 days")},this_month:{label:c("This Month"),desc:c("Compared to the previous Month")},all_time:{label:c("All Time"),desc:c("See All time Sales Stat")}}),g=async v=>{if(A.value!==v)try{A.value=v,a.value="collapse",t.value===!0&&(t.value=!1,vt.set("order_stat_collapse",t.value)),await Promise.all([n.Storage().set("order_quick_stat_bar_range",A.value),y()])}catch{}},y=()=>{u.value=!1,o.value=!0;const v={"-0 days":[Re().startOf("day").format("YYYY-MM-DD"),Re().endOf("day").format("YYYY-MM-DD")],"-7 days":[Re().subtract(7,"days").startOf("day").format("YYYY-MM-DD"),Re().endOf("day").format("YYYY-MM-DD")],"-30 days":[Re().subtract(30,"days").startOf("day").format("YYYY-MM-DD"),Re().endOf("day").format("YYYY-MM-DD")],this_month:[Re().startOf("month").format("YYYY-MM-DD"),Re().endOf("day").format("YYYY-MM-DD")],all_time:[null,null]},[B,b]=v[A.value]||[Re().startOf("month"),Re().endOf("day")],w={startDate:B,endDate:b,paymentStatus:"all"};Ia.getDashboardStats({params:{...w}}).then(()=>{s.value=Ia.data.dashBoardStats}).catch(k=>{}).finally(()=>{o.value=!1})};return Be(()=>{A.value=vt.get("order_quick_stat_bar_range","-0 days");let v=vt.get("order_quick_stat_bar_collapse_item");a.value=v===null?"collapse":v,y()}),(v,B)=>{const b=C("el-button");return d(),_("div",mg,[l(he,null,{default:i(()=>[l(Ce,{title:p(c)("Order Stats Overview"),border_bottom:""},{action:i(()=>[r("div",hg,[l(Yd,{class:"hide-animation-on-mobile"},{default:i(()=>[(d(!0),_(H,null,ee(m.value,(w,k)=>(d(),E(rr,{title:`${p(c)("Order Stats Overview of")} ${w.label}`,tabindex:"0",key:k,onClick:S=>g(k),class:de(k===A.value?"active":"")},{default:i(()=>[R(h(w.label),1)]),_:2},1032,["title","onClick","class"]))),128))]),_:1})])]),_:1},8,["title"]),l(me,null,{default:i(()=>[r("div",_g,[o.value?(d(),E(fg,{key:0})):(d(),_("div",gg,[(d(!0),_(H,null,ee(s.value,(w,k)=>(d(),_("div",{key:k,class:"fct-order-stats-col cursor-pointer",onClick:B[0]||(B[0]=S=>p(f).push({name:"reports_orders"}))},[(d(),E(ng,{key:k,stat:w,"current-range":A.value,"stat-ranges":m.value,loading:o.value,"stat-key":k},{icon:i(()=>[l(W,{name:w.icon},null,8,["name"])]),_:2},1032,["stat","current-range","stat-ranges","loading","stat-key"]))]))),128))])),r("div",vg,[l(b,{text:"",class:"underline-link-button",onClick:B[1]||(B[1]=w=>p(f).push({name:"reports_orders"}))},{default:i(()=>[R(h(p(c)("See Full Report")),1)]),_:1})])])]),_:1})]),_:1})])}}}),bg={class:"table-cell"},wg={class:"table-cell"},Cg={class:"table-cell"},Bg={class:"table-cell"},kg={class:"table-cell items-center gap-1"},xg={class:"table-cell"},Sg={class:"table-cell"},Fg={class:"table-cell"},Eg={__name:"OrdersLoader",props:{nextPageCount:{type:Number,default:0},orderTable:{type:Object,default:()=>({})}},setup(e){const t=e,a=s=>t.orderTable.columns.includes(s),n=Array.from({length:t.nextPageCount},(s,o)=>o+1);return(s,o)=>{const u=C("el-table-column"),A=C("el-skeleton-item"),f=C("el-table"),m=C("el-skeleton");return d(),E(m,{animated:""},{template:i(()=>[l(f,{data:p(n),class:"w-full compact-table responsive"},{empty:i(()=>o[0]||(o[0]=[])),default:i(()=>[x("",!0),l(u,{label:s.$t("# Date"),width:140},{default:i(()=>[r("div",bg,[l(A,{varient:"p",class:"w-4/5"})])]),_:1},8,["label"]),a("customer")?(d(),E(u,{key:1,width:"100",label:s.$t("Customer")},{default:i(()=>[r("div",wg,[l(A,{varient:"p",class:"w-4/5"})])]),_:1},8,["label"])):x("",!0),a("order_items")?(d(),E(u,{key:2,label:s.$t("Items"),width:"250"},{default:i(()=>[r("div",Cg,[l(A,{varient:"p",class:"w-4/5"})])]),_:1},8,["label"])):x("",!0),l(u,{width:"100",label:s.$t("Total")},{default:i(()=>[r("div",Bg,[l(A,{varient:"p",class:"w-4/5"})])]),_:1},8,["label"]),l(u,{width:"150",label:s.$t("Payment Status")},{default:i(()=>[r("div",kg,[l(A,{varient:"p",class:"w-4/5"}),l(A,{varient:"p",class:"w-3/5"})])]),_:1},8,["label"]),a("status")?(d(),E(u,{key:3,width:"150",label:s.$t("Status")},{default:i(()=>[r("div",xg,[l(A,{varient:"p",class:"w-4/5"})])]),_:1},8,["label"])):x("",!0),a("type")?(d(),E(u,{key:4,width:"110",label:s.$t("Order Type")},{default:i(()=>[r("div",Sg,[l(A,{varient:"p",class:"w-4/5"})])]),_:1},8,["label"])):x("",!0),a("actions")?(d(),E(u,{key:5,width:"60",label:""},{default:i(()=>[r("div",Fg,[l(A,{varient:"p",class:"w-3/5"})])]),_:1})):x("",!0)]),_:1},8,["data"])]),_:1})}}},Ug={},$g={class:"px-4 py-3"},Dg={class:"grid grid-cols-3 gap-5 mt-5"};function Qg(e,t){const a=C("el-skeleton-item"),n=C("el-skeleton");return d(),E(n,{animated:""},{template:i(()=>[r("div",$g,[(d(),_(H,null,ee(2,s=>r("div",{key:s,class:"flex items-center justify-between mb-3"},[l(a,{varient:"p",class:"w-1/2"}),l(a,{varient:"p",class:"w-[100px]"})])),64)),r("div",Dg,[(d(),_(H,null,ee(3,s=>r("div",{key:s},[l(a,{varient:"p",class:"w-1/2"}),l(a,{varient:"p",class:"w-[100px]"})])),64))])])]),_:1})}const Ig=He(Ug,[["render",Qg]]),Tg={class:"fct-all-orders-page fct-layout-width"},Vg={class:"fct-delete-test-orders-content"},Mg={if:"deleteTestOrdersProgressTitle",class:"fct-delete-test-orders-title"},Lg={class:"fct-delete-test-orders-meta"},Rg={class:"fct-delete-test-orders-text"},Og={key:0,class:"fct-delete-test-orders-loading"},Hg={class:"fct-test-orders-loading-content"},Pg={class:"fct-loading-bars"},Ng=["id"],Kg={class:"fct-delete-test-orders-percentage"},Gg={class:"fct-delete-test-orders-stats"},jg={class:"fct-delete-test-orders-stat-row"},zg={class:"fct-delete-test-orders-stat-label"},Yg={class:"fct-delete-test-orders-stat-value"},qg={class:"fct-delete-test-orders-stat-row"},Wg={class:"fct-delete-test-orders-stat-label"},Xg={class:"fct-delete-test-orders-stat-value is-success"},Jg={class:"fct-delete-test-orders-stat-row"},Zg={class:"fct-delete-test-orders-stat-label"},ev={class:"fct-delete-test-orders-stat-value is-danger"},tv={key:1,class:"fct-delete-test-orders-message"},av={key:0,class:"dialog-footer"},nv={class:"fct-all-orders-wrap"},sv={__name:"AllOrders",setup(e){const t=mp({instance:Qt()}),a=V(!1),n=V(!1),s=V(!1),o=V(!1),u=V({total:0,processed:0,deleted:0,failed:0}),A=V(""),f=j(()=>u.value.total?Math.min(100,Math.round(u.value.processed/u.value.total*100)):0),m=j(()=>{if(!u.value.total)return"";const S=Math.min(u.value.processed,u.value.total);return s.value?c("Deleting %1$s of %2$s Test Orders",S,u.value.total):c("Deleted %1$s of %2$s Test Orders",S,u.value.total)}),g=j(()=>u.value.total?s.value?c("Deleting... %s%",f.value):c("Completed"):""),y=()=>{n.value=window.innerWidth<768},v=()=>{u.value={total:0,processed:0,deleted:0,failed:0},A.value=""},B=S=>{S==="show_order_stats"&&(vt.set("show_order_stats",!a.value),a.value=!a.value),S==="show_delete_bulk_action"&&t.showBulkDeleteAction(!0),S==="hide_delete_bulk_action"&&t.showBulkDeleteAction(!1),S==="delete_test_orders"&&b()},b=async()=>{var S,M;if(!s.value){try{await Ea.confirm(c("Are you sure you want to delete all test orders? This action cannot be undone."),c("Confirm Delete!"),{confirmButtonText:c("Delete"),cancelButtonText:c("Cancel"),cancelButtonClass:"el-button--small",confirmButtonClass:"el-button--small",type:"warning"})}catch{return}s.value=!0,o.value=!0,v();try{let $=0,F=0,L=0;for(;;){const T=await re.post("orders/do-bulk-action",{action:"delete_test_orders",last_order_id:$}),D=T||{};if(F=F||Number(D.total_count||0),L+=Number(D.batch_count||0),u.value={total:F,processed:L,deleted:u.value.deleted+Number(D.deleted_count||0),failed:u.value.failed+Number(D.failed_count||0)},A.value=D.has_more?c("Processed %1$s of %2$s test orders...",Math.min(L,F),F):(T==null?void 0:T.message)||"",!D.has_more)break;$=Number(D.last_attempted_order_id||0),await new Promise(U=>setTimeout(U,100))}if(!u.value.total){o.value=!1,q.info(c("No test orders found to delete"));return}const Q=u.value.failed?c("Deleted %1$s test orders. %2$s test orders could not be deleted.",u.value.deleted,u.value.failed):c("Deleted %s test orders successfully",u.value.deleted);A.value=Q,q.success(Q),t.fetch()}catch($){A.value=((S=$==null?void 0:$.data)==null?void 0:S.message)||c("Failed to delete test orders"),q.error(((M=$==null?void 0:$.data)==null?void 0:M.message)||c("Failed to delete test orders"))}finally{s.value=!1}}},w=()=>{o.value=!1},k=()=>{const S=vt.get("show_order_stats");S&&(a.value=S)};return Be(()=>{k(),y(),window.addEventListener("resize",y)}),At(()=>{window.removeEventListener("resize",y)}),(S,M)=>{const $=C("el-icon"),F=C("el-button"),L=C("el-dropdown-item"),Q=C("el-dropdown-menu"),T=C("el-dropdown"),D=C("el-tag"),U=C("el-progress"),I=C("el-dialog");return d(),_("div",Tg,[l(za,{title:p(c)("Orders")},{action:i(()=>[l(St,{permission:["reports/view","orders/manage"]},{default:i(()=>[l(T,{trigger:"click","popper-class":"fct-dropdown",onCommand:B,placement:"bottom-end"},{dropdown:i(()=>[l(Q,null,{default:i(()=>[l(St,{permission:"reports/view"},{default:i(()=>[l(L,{command:"show_order_stats"},{default:i(()=>[a.value?(d(),_(H,{key:1},[l(W,{name:"EyeOff"}),R(" "+h(p(c)("Hide Order Stats")),1)],64)):(d(),_(H,{key:0},[l(W,{name:"Eye"}),R(" "+h(p(c)("Show Order Stats")),1)],64))]),_:1}),p(t).data.showDeleteBulkAction?x("",!0):(d(),E(L,{key:0,command:"show_delete_bulk_action"},{default:i(()=>[l(W,{name:"Eye"}),R(" "+h(p(c)("Show Bulk Actions")),1)]),_:1})),p(t).data.showDeleteBulkAction?(d(),E(L,{key:1,command:"hide_delete_bulk_action"},{default:i(()=>[l(W,{name:"EyeOff"}),R(" "+h(p(c)("Hide Bulk Actions")),1)]),_:1})):x("",!0)]),_:1}),l(St,{permission:"orders/manage"},{default:i(()=>[l(L,{command:"delete_test_orders",disabled:s.value,class:"item-destructive"},{default:i(()=>[l(W,{name:"Delete"}),R(" "+h(s.value?p(c)("Deleting Test Orders..."):p(c)("Delete Test Orders")),1)]),_:1},8,["disabled"])]),_:1})]),_:1})]),default:i(()=>[l(F,null,{default:i(()=>[R(h(p(c)("More actions"))+" ",1),l($,null,{default:i(()=>[l(p(Pr))]),_:1})]),_:1})]),_:1})]),_:1}),l(St,{permission:"orders/create"},{default:i(()=>[l(F,{tag:"router-link",type:"primary",to:{name:"add_order"}},{default:i(()=>[R(h(p(c)("Create Order")),1)]),_:1})]),_:1})]),_:1},8,["title"]),l(I,{modelValue:o.value,"onUpdate:modelValue":M[0]||(M[0]=O=>o.value=O),title:p(c)("Delete Test Orders"),"append-to-body":!0,"close-on-click-modal":!1,"show-close":!0,"close-on-press-escape":!0,onClose:w,class:"fct-delete-test-orders-modal"},{footer:i(()=>[s.value?x("",!0):(d(),_("div",av,[l(F,{type:"primary",onClick:w},{default:i(()=>[R(h(p(c)("Done")),1)]),_:1})]))]),default:i(()=>[r("div",Vg,[r("div",Mg,h(m.value),1),r("div",Lg,[r("div",Rg,h(s.value?p(c)("You can close this — deletion will continue in the background"):p(c)("Test order deletion completed.")),1),g.value?(d(),E(D,{key:0,type:"success",class:de(["fct-delete-test-orders-status",{"is-complete":!s.value}])},{default:i(()=>[R(h(g.value),1)]),_:1},8,["class"])):x("",!0)]),s.value?(d(),_("div",Og,[r("div",Hg,[r("div",Pg,[(d(),_(H,null,ee(8,O=>r("div",{key:O,class:"bar-block",id:`bar-block-${O+1}`},null,8,Ng)),64))]),R(" "+h(p(c)("Deleting...")),1)]),r("span",Kg,h(f.value)+"% ",1)])):x("",!0),l(ra,{visible:s.value,fade:"",duration:300},{default:i(()=>[l(U,{percentage:f.value,"stroke-width":6,striped:"","striped-flow":"","show-text":!1,status:s.value?void 0:"success",class:"fct-delete-test-orders-progress"},null,8,["percentage","status"])]),_:1},8,["visible"]),r("div",Gg,[r("div",jg,[M[1]||(M[1]=r("span",{class:"fct-delete-test-orders-stat-icon"},[r("svg",{width:"24",height:"24",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[r("path",{opacity:"0.4",d:"M13.66 1.1333C13.3741 1.09487 13.0575 1.0716 12.7083 1.05762V1.66146V1.70461C12.7083 2.25782 12.7084 2.73471 12.6567 3.11653C12.6017 3.52616 12.4775 3.91865 12.1592 4.23714C11.8409 4.55563 11.4483 4.68009 11.0383 4.73518C10.6566 4.78653 10.18 4.78649 9.62663 4.78646H9.58329H8.74996H8.70662C8.15333 4.78649 7.67666 4.78653 7.29499 4.73518C6.88499 4.68009 6.49249 4.55563 6.17416 4.23714C5.85583 3.91865 5.73166 3.52616 5.67666 3.11653C5.62333 2.72482 5.625 2.23304 5.625 1.66146V1.05762C5.27583 1.0716 4.95917 1.09487 4.67333 1.1333C3.92333 1.23414 3.2925 1.45038 2.79083 1.95198C2.28917 2.45358 2.07249 3.08503 1.97166 3.83513C1.87499 4.55588 1.875 5.47186 1.875 6.60774V13.3818C1.875 14.5178 1.87499 15.4337 1.97166 16.1544C2.07249 16.9046 2.28917 17.536 2.79083 18.0376C3.2925 18.5392 3.92333 18.7554 4.67333 18.8563C5.39417 18.9532 6.31 18.9532 7.44667 18.9531H10.8866C11.0791 18.9532 11.2641 18.9519 11.4433 18.9515C11.2358 18.5378 11.0666 18.3449 10.9875 18.2671C10.18 18.0578 9.58329 17.3269 9.58329 16.4539C9.58329 15.4184 10.4225 14.5789 11.4583 14.5789C11.6941 14.5789 11.9733 14.6359 12.1158 14.6766C12.31 14.7322 12.52 14.8165 12.7383 14.9346C13.1533 14.298 13.6958 13.5629 14.3133 12.9367C14.8741 12.3678 15.5933 11.7846 16.4583 11.432V6.60774C16.4583 5.47186 16.4583 4.55588 16.3616 3.83513C16.2608 3.08503 16.0441 2.45358 15.5425 1.95198C15.0408 1.45038 14.41 1.23414 13.66 1.1333Z",fill:"#017EF3"}),r("path",{d:"M17.012 12.3361C17.4462 12.1825 17.922 12.4094 18.0753 12.8431C18.2295 13.2768 18.002 13.753 17.5687 13.9068C17.1453 14.0568 16.6945 14.3786 16.2395 14.8393C15.7912 15.2944 15.3778 15.845 15.022 16.3897C14.6687 16.9317 14.3828 17.4519 14.1853 17.8374C14.087 18.0296 13.9387 18.3456 13.8879 18.4534C13.7587 18.7501 13.4695 18.9462 13.1453 18.9548C12.822 18.9633 12.5228 18.7836 12.3778 18.4942C12.0112 17.7597 11.6821 17.4672 11.5154 17.3564C11.4421 17.3074 11.3937 17.2895 11.3762 17.284C10.9537 17.2435 10.6237 16.8878 10.6237 16.4548C10.6237 15.9945 10.997 15.6214 11.457 15.6214C11.5645 15.6214 11.7428 15.6547 11.8287 15.6792C12.002 15.7287 12.2112 15.8173 12.4403 15.9698C12.6295 16.0958 12.8245 16.2633 13.0228 16.48C13.1945 16.1726 13.3971 15.8302 13.6271 15.4782C14.0187 14.8772 14.5003 14.2296 15.0528 13.6691C15.6003 13.1143 16.2595 12.6028 17.012 12.3361ZM9.16532 11.8714C9.51032 11.8714 9.79032 12.1513 9.79032 12.4964C9.79032 12.8416 9.51032 13.1214 9.16532 13.1214H5.83203C5.48703 13.1214 5.20703 12.8416 5.20703 12.4964C5.20703 12.1513 5.48703 11.8714 5.83203 11.8714H9.16532ZM12.4987 8.53809C12.8437 8.53809 13.1237 8.81793 13.1237 9.16309C13.1237 9.50826 12.8437 9.78809 12.4987 9.78809H5.83203C5.48703 9.78809 5.20703 9.50826 5.20703 9.16309C5.20703 8.81793 5.48703 8.53809 5.83203 8.53809H12.4987ZM11.457 1.0389V1.66309C11.457 2.26994 11.4562 2.66228 11.417 2.95134C11.3803 3.22242 11.3212 3.3074 11.2737 3.35498C11.2262 3.40256 11.1412 3.46176 10.8704 3.49821C10.5812 3.53706 10.1887 3.53809 9.58199 3.53809H8.74866C8.14203 3.53809 7.74952 3.53706 7.46036 3.49821C7.18952 3.46176 7.10453 3.40256 7.05703 3.35498C7.00953 3.3074 6.95036 3.22242 6.9137 2.95134C6.87453 2.66228 6.8737 2.26994 6.8737 1.66309V1.0389C7.05786 1.03839 7.24786 1.03808 7.44536 1.03809H10.8853C11.0828 1.03808 11.2728 1.03839 11.457 1.0389Z",fill:"#017EF3"})])],-1)),r("span",zg,h(p(c)("Processed")),1),r("span",Yg,h(u.value.processed)+" / "+h(u.value.total),1)]),r("div",qg,[M[2]||(M[2]=r("span",{class:"fct-delete-test-orders-stat-icon"},[r("svg",{width:"24",height:"24",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[r("path",{opacity:"0.4",d:"M16.9433 13.0463C16.88 14.0913 16.8292 14.9197 16.725 15.5813C16.6183 16.2605 16.4475 16.8263 16.1067 17.3205C15.7942 17.773 15.3917 18.1547 14.9258 18.4413C14.4158 18.7555 13.8467 18.8922 13.1692 18.958H8.06417C7.38667 18.8922 6.81667 18.7547 6.30667 18.4405C5.84 18.153 5.4375 17.7705 5.125 17.3172C4.78417 16.8222 4.61417 16.2563 4.50833 15.5763C4.405 14.913 4.355 14.083 4.2925 13.0372L3.75 3.95801H17.5L16.9433 13.0463Z",fill:"#189877"}),r("path",{d:"M11.7488 1.06879C12.2196 1.11046 12.6621 1.25462 13.043 1.53796C13.3238 1.74712 13.5188 2.00379 13.6855 2.28212C13.8405 2.53962 13.9963 2.86046 14.173 3.22462L14.528 3.95879H18.1263C18.5863 3.95879 18.9596 4.33129 18.9596 4.79212C18.9596 5.25212 18.5863 5.62546 18.1263 5.62546H3.1263C2.6663 5.62546 2.29297 5.25212 2.29297 4.79212C2.29297 4.33129 2.6663 3.95879 3.1263 3.95879H6.8013L7.09797 3.30796C7.26964 2.93046 7.4213 2.59796 7.5738 2.33129C7.73797 2.04296 7.93214 1.77629 8.21714 1.55796C8.6013 1.26296 9.05297 1.11379 9.53464 1.06962C9.86213 1.03962 10.193 1.04046 10.5221 1.04129C10.5571 1.04129 10.5913 1.04212 10.6263 1.04212C10.6605 1.04212 10.6955 1.04212 10.7288 1.04212C11.1138 1.04212 11.4605 1.04296 11.7488 1.06879ZM8.63297 3.95879H12.6763C12.4871 3.56879 12.3663 3.32212 12.2571 3.13962C12.0963 2.87296 11.9046 2.75546 11.6005 2.72879C11.3846 2.70962 11.103 2.70879 10.6555 2.70879C10.1963 2.70879 9.90714 2.70962 9.68547 2.72962C9.3738 2.75796 9.17964 2.87962 9.0213 3.15712C8.91714 3.33879 8.80464 3.58212 8.63297 3.95879Z",fill:"#189877"})])],-1)),r("span",Wg,h(p(c)("Deleted")),1),r("span",Xg,h(u.value.deleted),1)]),r("div",Jg,[M[3]||(M[3]=r("span",{class:"fct-delete-test-orders-stat-icon"},[r("svg",{width:"24",height:"24",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[r("path",{opacity:"0.4",d:"M10.0013 1.04004C14.9488 1.04004 18.9596 5.05082 18.9596 9.99833C18.9596 14.9459 14.9488 18.9567 10.0013 18.9567C5.0538 18.9567 1.04297 14.9459 1.04297 9.99833C1.04297 9.54867 1.40778 9.18392 1.85677 9.18375C2.30677 9.18375 2.6722 9.54858 2.6722 9.99833C2.6722 14.0463 5.95297 17.3282 10.0013 17.3282C14.0496 17.3282 17.3304 14.0463 17.3304 9.99833C17.3304 5.95037 14.0496 2.66846 10.0013 2.66846C9.55138 2.66846 9.18764 2.30434 9.18747 1.85466C9.18747 1.40488 9.5513 1.04004 10.0013 1.04004ZM2.80566 4.66634C3.08066 4.35891 3.55043 4.30436 3.89209 4.55241C4.25514 4.81714 4.33519 5.32656 4.07031 5.69011L3.90674 5.92448C3.53507 6.47876 3.23784 7.08712 3.02784 7.73356C2.88857 8.16094 2.42904 8.39483 2.00163 8.25602C1.57424 8.11701 1.33924 7.65747 1.47835 7.22982C1.77169 6.32508 2.20608 5.48362 2.75358 4.73145L2.80566 4.66634ZM7.3125 1.45345C7.71574 1.36659 8.12817 1.59791 8.25814 1.9987C8.39722 2.42644 8.16233 2.88598 7.73486 3.02491L7.46061 3.12011C6.82564 3.35476 6.23137 3.67519 5.69222 4.06738L5.62224 4.11214C5.26557 4.32003 4.80286 4.22905 4.55453 3.88835C4.29044 3.52472 4.37034 3.01452 4.73356 2.74984L5.02084 2.55046C5.69734 2.09692 6.44048 1.7332 7.23194 1.47624L7.3125 1.45345Z",fill:"#F04438"}),r("path",{d:"M11.9754 6.85201C12.3029 6.58506 12.7854 6.6039 13.0904 6.90897C13.3954 7.21407 13.4145 7.69657 13.147 8.02388L13.0904 8.08736L11.1787 9.99808L13.0895 11.9089L13.147 11.9724C13.4137 12.2997 13.3945 12.7823 13.0895 13.0873C12.7845 13.3923 12.302 13.4113 11.9745 13.1442L11.9112 13.0873L10.0012 11.1765L8.09122 13.0873C7.76538 13.4127 7.23789 13.4127 6.91289 13.0873C6.58706 12.7619 6.58706 12.2344 6.91289 11.9089L8.82288 9.99808L6.91206 8.08736L6.85456 8.02388C6.58789 7.69657 6.60706 7.21407 6.91206 6.90897C7.21706 6.6039 7.69955 6.58506 8.02705 6.85201L8.09039 6.90897L10.0012 8.81975L11.912 6.90897L11.9754 6.85201Z",fill:"#F04438"})])],-1)),r("span",Zg,h(p(c)("Failed")),1),r("span",ev,h(u.value.failed),1)])]),A.value&&!s.value?(d(),_("p",tv,h(A.value),1)):x("",!0)])]),_:1},8,["modelValue","title"]),l(St,{permission:"reports/view"},{default:i(()=>[a.value?(d(),E(yg,{key:0})):x("",!0)]),_:1}),l(St,{permission:"orders/view"},{default:i(()=>[r("div",nv,[l(js,{table:p(t),classicTabStyle:!0,hasMobileSlot:!0},{mobile:i(()=>[p(t).isLoading()?(d(),E(Ig,{key:0})):x("",!0),p(t).isLoading()?x("",!0):(d(),E(tu,{key:1,table:p(t),orders:p(t).getTableData(),columns:p(t).data.columns,"empty-text":p(t).emptyMessage},null,8,["table","orders","columns","empty-text"]))]),default:i(()=>[p(t).isLoading()?(d(),E(Eg,{key:0,orderTable:p(t),"next-page-count":p(t).nextPageCount},null,8,["orderTable","next-page-count"])):(d(),E(eu,{key:1,table:p(t),orders:p(t).getTableData(),columns:p(t).data.columns,"empty-text":p(t).emptyMessage},null,8,["table","orders","columns","empty-text"]))]),_:1},8,["table"])])]),_:1})])}}},lv={class:"setting-wrap"},ov={class:"setting-wrap-inner"},rv={class:"setting-confirmation-content"},iv={class:"custom-wp-editor-wrapper"},dv={class:"setting-save-action"},uv={__name:"InvoicePacking",setup(e){const t=V([]),a=V([]),n=V(!1),s=V(!1);xs().onSave(()=>{m()});const u=V([c("Invoice Template"),c("Packing Slip Template"),c("Delivery Slip Template"),c("Shipping Slip Template"),c("Dispatch Slip Template")]),A=()=>{n.value=!0,re.get("templates/print-templates").then(g=>{t.value=g.templates,n.value=!1}).catch(g=>{q.error(g)}).finally(()=>{n.value=!1})},f=()=>{n.value=!0,re.get("settings/confirmation/shortcode",{}).then(g=>{a.value=g.data}).catch(g=>{q.error(g)}).finally(()=>{n.value=!1})},m=()=>{s.value=!0,re.put("templates/print-templates",{templates:t.value}).then(g=>{q.success(g.message)}).catch(g=>{q.error(g)}).finally(()=>{s.value=!1})};return Be(()=>{A(),f()}),(g,y)=>{const v=C("el-skeleton");return C("el-button"),d(),_("div",lv,[l(ha,{heading:p(c)("Invoice & Packing"),"show-save-button":!1},null,8,["heading"]),r("div",ov,[l(_a),l(Na,{class:"mb-5",type:"information",content:p(c)("It will be available soon!")},null,8,["content"]),n.value?(d(!0),_(H,{key:0},ee(u.value,(B,b)=>(d(),E(he,{key:b},{default:i(()=>[l(Ce,{title:B,border_bottom:""},null,8,["title"]),l(me,null,{default:i(()=>[l(v,{animated:"",rows:6})]),_:1})]),_:2},1024))),128)):x("",!0),!n.value&&t.value.length>0?(d(),_(H,{key:1},[(d(!0),_(H,null,ee(t.value,(B,b)=>(d(),E(he,{key:b},{default:i(()=>[l(Ce,{title:B.title+" (Under Development)",border_bottom:""},null,8,["title"]),l(me,null,{default:i(()=>[r("div",rv,[r("div",iv,[l(ts,{"short-codes":a.value,modelValue:B.content,"onUpdate:modelValue":w=>B.content=w,onUpdate:w=>{B.content=w}},null,8,["short-codes","modelValue","onUpdate:modelValue","onUpdate"])])])]),_:2},1024)]),_:2},1024))),128)),r("div",dv,[x("",!0)])],64)):x("",!0)])])}}},cv={class:"fct-pdf-pro-gate"},Av={class:"fct-pdf-pro-gate-inner"},pv={class:"fct-pdf-pro-heading"},fv={class:"fct-pdf-pro-icon"},mv={class:"fct-pdf-pro-label"},hv={class:"fct-pdf-pro-badge"},_v={class:"fct-pdf-pro-desc"},gv={__name:"PdfTemplateProGate",setup(e){return(t,a)=>{const n=C("el-button");return d(),_("div",cv,[r("div",Av,[r("div",pv,[r("div",fv,[l(W,{name:"Crown"})]),r("span",mv,h(p(c)("PDF Templates")),1),r("span",hv,h(p(c)("Pro")),1)]),r("p",_v,h(p(c)("Customizable PDF receipts, invoices, and e-invoices with ZUGFeRD support.")),1),l(n,{type:"primary",size:"small",tag:"a",href:"https://fluentcart.com/pricing/",target:"_blank"},{default:i(()=>[l(W,{name:"Crown"}),R(" "+h(p(c)("Upgrade to Pro")),1)]),_:1})])])}}},vv=He(gv,[["__scopeId","data-v-83e6a503"]]),yv={__name:"PdfTemplateRoute",setup(e){const t=Ie.get("app_config.isProActive");return(a,n)=>{const s=C("router-view");return p(t)?(d(),E(s,{key:1})):(d(),E(vv,{key:0}))}}},bv={class:"setting-wrap"},wv={class:"setting-wrap-inner"},Cv={class:"flex gap-5"},Bv={class:"flex flex-col items-center justify-center py-12 text-center"},kv={class:"text-lg font-semibold mb-2 text-system-dark dark:text-gray-200"},xv={class:"text-sm text-system-mid dark:text-gray-400 mb-6 max-w-md"},Sv={class:"fct-pdf-template-desc"},Fv={class:"fct-pdf-template-grid"},Ev={class:"fct-pdf-template-preview"},Uv={class:"fct-pdf-template-preview-placeholder"},$v={class:"fct-pdf-placeholder-text"},Dv={class:"fct-pdf-template-overlay"},Qv={class:"fct-pdf-template-footer"},Iv={class:"fct-pdf-template-name-row"},Tv={class:"fct-pdf-template-title"},Vv={key:0,class:"fct-pdf-badge fct-pdf-badge--default"},Mv={__name:"PdfTemplateIndex",setup(e){const t=ja(),a=V(!0),n=V(!1),s=V({}),o=V(!1),u=V(""),A=V(!1),f=V(""),m=V(null),g=V(!1),y=V(!1),v=Ie.get("app_config.isProActive"),B=()=>{a.value=!0,re.get("settings/pdf-templates/receipt").then($=>{s.value=$.templates||{},n.value=$.has_fluent_pdf||!1,m.value=$.addon_info||null}).catch($=>{var F;q.error(((F=$.data)==null?void 0:F.message)||c("Failed to load templates"))}).finally(()=>{a.value=!1})},b=()=>{if(m.value){if(!v&&m.value.repo_link){window.open(m.value.repo_link,"_blank","noopener,noreferrer");return}g.value=!0,re.post("settings/modules/plugin-addons/install",{plugin_slug:m.value.plugin_slug,source_type:m.value.source_type||"wordpress",source_link:m.value.source_link||"",asset_path:m.value.asset_path||""}).then($=>{q.success($.message||c("Plugin installed successfully")),setTimeout(()=>{window.location.reload()},500)}).catch($=>{var F;q.error(((F=$.data)==null?void 0:F.message)||c("Failed to install plugin"))}).finally(()=>{g.value=!1})}},w=()=>{m.value&&(y.value=!0,re.post("settings/modules/plugin-addons/activate",{plugin_file:m.value.plugin_file}).then($=>{q.success($.message||c("Plugin activated successfully")),setTimeout(()=>{window.location.reload()},500)}).catch($=>{var F;q.error(((F=$.data)==null?void 0:F.message)||c("Failed to activate plugin"))}).finally(()=>{y.value=!1}))},k=()=>{u.value="",o.value=!0},S=()=>{if(!u.value.trim()){q.error(c("Please enter a template name"));return}A.value=!0,re.post("settings/pdf-templates/create",{title:u.value.trim()}).then($=>{o.value=!1,q.success($.message||c("Template created")),$.slug?t.push({name:"edit-pdf-template",params:{template:$.slug}}):B()}).catch($=>{var F;q.error(((F=$.data)==null?void 0:F.message)||c("Failed to create template"))}).finally(()=>{A.value=!1})},M=$=>{f.value=$,re.delete("settings/pdf-templates/delete/"+$).then(F=>{q.success(F.message||c("Template deleted")),B()}).catch(F=>{var L;q.error(((L=F.data)==null?void 0:L.message)||c("Failed to delete template"))}).finally(()=>{f.value=""})};return Be(()=>{B()}),($,F)=>{const L=C("el-button"),Q=C("el-skeleton-item"),T=C("el-skeleton"),D=C("el-popconfirm"),U=C("el-input"),I=C("el-form-item"),O=C("el-form"),P=C("el-dialog");return d(),_("div",bv,[l(ha,{heading:p(c)("PDF Templates"),"show-save-button":!1},Rt({_:2},[n.value?{name:"action",fn:i(()=>[l(L,{type:"primary",size:"small",onClick:k},{default:i(()=>[R(h(p(c)("Add Template")),1)]),_:1})]),key:"0"}:void 0]),1032,["heading"]),r("div",wv,[l(_a),a.value?(d(),E(he,{key:0},{default:i(()=>[l(me,null,{default:i(()=>[l(T,{animated:""},{template:i(()=>[l(Q,{variant:"text",class:"w-[300px] mb-4"}),r("div",Cv,[l(Q,{variant:"rect",style:{width:"220px",height:"280px","border-radius":"8px"}}),l(Q,{variant:"rect",style:{width:"220px",height:"280px","border-radius":"8px"}})])]),_:1})]),_:1})]),_:1})):x("",!0),!a.value&&!n.value&&m.value?(d(),E(he,{key:1},{default:i(()=>[l(me,null,{default:i(()=>[r("div",Bv,[F[3]||(F[3]=r("svg",{class:"mb-4",width:"48",height:"48",viewBox:"0 0 32 32",fill:"none",stroke:"currentColor","stroke-width":"1.5"},[r("path",{d:"M8 2C6.9 2 6 2.9 6 4v24c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V10l-8-8H8z"}),r("path",{d:"M18 2v8h8"}),r("path",{d:"M12 18h8M12 22h6"})],-1)),r("h3",kv,h(p(c)("Fluent PDF Required")),1),r("p",xv,h(p(c)("To use PDF receipt templates, you need to install and activate the Fluent PDF plugin.")),1),m.value.is_installed?m.value.is_installed&&!m.value.is_active?(d(),E(L,{key:1,type:"success",loading:y.value,onClick:w},{default:i(()=>[R(h(p(c)("Activate Plugin")),1)]),_:1},8,["loading"])):x("",!0):(d(),E(L,{key:0,type:"primary",loading:g.value,onClick:b},{default:i(()=>[R(h(p(v)?p(c)("Install & Activate"):p(c)("Download")),1)]),_:1},8,["loading"]))])]),_:1})]),_:1})):x("",!0),!a.value&&n.value?(d(),E(he,{key:2},{default:i(()=>[l(me,null,{default:i(()=>[r("p",Sv,h(p(c)("Customize PDF templates for email attachments. Select which template to attach in each email notification's settings.")),1),r("div",Fv,[(d(!0),_(H,null,ee(s.value,(K,G)=>(d(),_("div",{key:G,class:"fct-pdf-template-card"},[r("div",Ev,[r("div",Uv,[F[4]||(F[4]=r("svg",{width:"40",height:"40",viewBox:"0 0 32 32",fill:"none",stroke:"#525866","stroke-width":"1.2"},[r("path",{d:"M8 2C6.9 2 6 2.9 6 4v24c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V10l-8-8H8z"}),r("path",{d:"M18 2v8h8"}),r("path",{d:"M12 18h8M12 22h6"})],-1)),r("span",$v,h(K.title||p(c)("Receipt Template")),1)]),r("div",Dv,[l(L,{type:"primary",size:"small",tag:"router-link",to:{name:"edit-pdf-template",params:{template:G}}},{default:i(()=>[R(h(p(c)("Edit Template")),1)]),_:2},1032,["to"])])]),r("div",Qv,[r("div",Iv,[r("span",Tv,h(K.title||G),1),K.is_default?(d(),_("span",Vv,h(p(c)("Built-in")),1)):x("",!0)]),K.is_default?x("",!0):(d(),E(D,{key:0,title:p(c)("Delete this template?"),"confirm-button-text":p(c)("Delete"),"cancel-button-text":p(c)("Cancel"),"confirm-button-type":"danger",onConfirm:ne=>M(G)},{reference:i(()=>[l(L,{type:"danger",size:"small",text:"",loading:f.value===G,class:"fct-pdf-delete-btn"},{default:i(()=>F[5]||(F[5]=[r("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[r("path",{d:"M3 6h18"}),r("path",{d:"M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6m3 0V4a2 2 0 012-2h4a2 2 0 012 2v2"})],-1)])),_:2,__:[5]},1032,["loading"])]),_:2},1032,["title","confirm-button-text","cancel-button-text","onConfirm"]))])]))),128))])]),_:1})]),_:1})):x("",!0)]),l(P,{modelValue:o.value,"onUpdate:modelValue":F[2]||(F[2]=K=>o.value=K),title:p(c)("Add Custom Template"),width:"420px","close-on-click-modal":!1,"append-to-body":!0},{footer:i(()=>[l(L,{onClick:F[1]||(F[1]=K=>o.value=!1)},{default:i(()=>[R(h(p(c)("Cancel")),1)]),_:1}),l(L,{type:"primary",onClick:S,loading:A.value},{default:i(()=>[R(h(p(c)("Create")),1)]),_:1},8,["loading"])]),default:i(()=>[l(O,{onSubmit:Xe(S,["prevent"]),"label-position":"top"},{default:i(()=>[l(I,{label:p(c)("Template Name")},{default:i(()=>[l(U,{modelValue:u.value,"onUpdate:modelValue":F[0]||(F[0]=K=>u.value=K),placeholder:p(c)("e.g. Custom Invoice"),autofocus:""},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1},8,["modelValue","title"])])}}},Lv={name:"EmailBodySkeleton",props:{showLoadingBadge:{type:Boolean,default:!1}}},Rv={class:"fct-email-body-skeleton"},Ov={class:"fct-email-body-skeleton__page"},Hv={key:0,class:"fct-ebs__badge"},Pv={class:"fct-ebs__badge-text"};function Nv(e,t,a,n,s,o){return d(),_("div",Rv,[r("div",Ov,[t[3]||(t[3]=ao('
',9)),a.showLoadingBadge?(d(),_("div",Hv,[t[0]||(t[0]=r("span",{class:"fct-ebs__dot"},null,-1)),t[1]||(t[1]=r("span",{class:"fct-ebs__dot"},null,-1)),t[2]||(t[2]=r("span",{class:"fct-ebs__dot"},null,-1)),r("span",Pv,h(e.$t("Loading block editor…")),1)])):x("",!0)])])}const ad=He(Lv,[["render",Nv]]),Kv={name:"NewEditorFrame",components:{EmailBodySkeleton:ad},props:{editorPath:{type:String,default:"/editor"},modelValue:{type:String,default:""},editorParams:{type:Object,default:()=>({})},frameHeight:{type:String,default:"500px"},documentTitle:{type:String,default:""}},emits:["update:modelValue","titleUpdated","contentUpdated","editorFullscreenToggle","featuredMediaUpdated","previewRequest","autosaveState"],data(){return{editorData:{content:""},editorFrame:null,editorOrigin:null,dataSent:!1,isFailing:!1,iframeReady:!1,pendingDataSend:!1,sendRetries:0,editorReadyReceived:!1,editorContentReady:!1,isFullscreen:!1,_timers:[]}},computed:{editorFailed(){return!this.dataSent&&this.isFailing&&!this.editorReadyReceived}},mounted(){this._setTimeout(()=>{this.editorReadyReceived||(this.isFailing=!0)},3e4),this.editorData.content=this.modelValue,this.editorData.title=this.documentTitle,this.createEditorIframe(),window.addEventListener("message",this.handleEditorMessage)},beforeUnmount(){this._timers.forEach(e=>clearTimeout(e)),this._timers=[],window.removeEventListener("message",this.handleEditorMessage),this.isFullscreen&&this.toggleFullScreen(!1),this.editorFrame&&(this.editorFrame.onload=null,this.$refs.iframeContainer.removeChild(this.editorFrame),this.editorFrame=null)},methods:{_setTimeout(e,t){const a=setTimeout(e,t);return this._timers.push(a),a},createEditorIframe(){this.editorFrame=document.createElement("iframe");let e=this.appVars.fct_editor_frame;if(this.editorParams){const t=new URLSearchParams(this.editorParams);e+="&"+t.toString()}try{this.editorOrigin=new URL(e,window.location.origin).origin}catch{this.editorOrigin=window.location.origin}this.editorFrame.src=e,this.editorFrame.style.width="100%",this.editorFrame.style.height=this.frameHeight,this.editorFrame.onload=()=>{this.iframeReady=!0,this.pendingDataSend&&(this.pendingDataSend=!1,this._setTimeout(()=>{this.sendDataToEditor()},1e3)),this._setTimeout(()=>{!this.editorReadyReceived&&this.iframeReady&&this.sendDataToEditor()},1e4)},this.$refs.iframeContainer.appendChild(this.editorFrame)},sendDataToEditor(){if(!this.iframeReady||!this.editorFrame||!this.editorFrame.contentWindow){this.pendingDataSend=!0;return}try{const e=JSON.parse(JSON.stringify(this.editorData));this.editorFrame.contentWindow.postMessage({action:"UPDATE_EDITOR",data:e},this.editorOrigin),this.dataSent=!0,this.sendRetries=0,this._setTimeout(()=>{this.editorContentReady||(this.editorContentReady=!0)},5e3)}catch{this.sendRetries++,this.sendRetries<=3&&this._setTimeout(()=>{this.sendDataToEditor()},500)}},handleEditorMessage(e){if(e&&e.origin&&this.editorOrigin&&e.origin!==this.editorOrigin)return;const{action:t,content:a}=e.data;t==="EDITOR_UPDATED"?this.dataSent&&(this.editorContentReady||this._setTimeout(()=>{this.editorContentReady=!0},1500),this.editorData.content=a,this.$emit("update:modelValue",a),this.$emit("contentUpdated",a)):t==="TITLE_UPDATED"?(this.editorData.title=a,this.$emit("titleUpdated",a)):t==="FEATURED_MEDIA_UPDATED"?this.$emit("featuredMediaUpdated",a):t==="EDITOR_FULLSCREEN_TOGGLE"?this.toggleFullScreen(a):t==="EMAIL_PREVIEW_REQUEST"?this.$emit("previewRequest"):t==="AUTOSAVE_STATE"?this.$emit("autosaveState",a):t==="EDITOR_READY"&&(this.editorReadyReceived=!0,this.isFailing=!1,this.sendDataToEditor())},forceAutosave(){this.editorFrame&&this.editorFrame.contentWindow&&this.editorFrame.contentWindow.postMessage({action:"FORCE_SAVE"},this.editorOrigin)},toggleFullScreen(e){this.isFullscreen=e;const t=this.editorFrame;if(e){if(document.documentElement.classList.add("fct-editor-fullscreen"),document.body.style.overflow="hidden",t){t.classList.add("fct-fullscreen-iframe"),this._fullscreenAncestors=[];let a=t.parentElement;for(;a&&a!==document.documentElement;)a.classList.add("fct-fullscreen-ancestor"),this._fullscreenAncestors.push(a),a=a.parentElement}}else document.documentElement.classList.remove("fct-editor-fullscreen"),document.body.style.overflow="",t&&t.classList.remove("fct-fullscreen-iframe"),this._fullscreenAncestors&&(this._fullscreenAncestors.forEach(function(a){a.classList.remove("fct-fullscreen-ancestor")}),this._fullscreenAncestors=null);this.$emit("editorFullscreenToggle",e)}}},Gv={style:{width:"100%"}},jv={key:0,style:{display:"flex","justify-content":"center","align-items":"center","column-gap":"10px"}},zv={class:"editor-container",style:{position:"relative"}},Yv={key:0,class:"fct-editor-skeleton"},qv={ref:"iframeContainer",class:"iframe-container"};function Wv(e,t,a,n,s,o){const u=C("EmailBodySkeleton");return d(),_("div",Gv,[o.editorFailed?(d(),_("div",jv,[r("p",null,h(e.$t("Problem with loading the editor. Please reload the page.")),1)])):x("",!0),r("div",zv,[l(vs,{name:"fct-skeleton-fade"},{default:i(()=>[s.editorContentReady?x("",!0):(d(),_("div",Yv,[t[0]||(t[0]=r("div",{class:"fct-skel-menubar"},[r("div",{class:"fct-skel fct-skel-logo"}),r("div",{class:"fct-skel-slash"}),r("div",{class:"fct-skel fct-skel-name"}),r("div",{class:"fct-skel-spacer"}),r("div",{class:"fct-skel fct-skel-btn-wide"}),r("div",{class:"fct-skel-dot"}),r("div",{class:"fct-skel-dot"})],-1)),t[1]||(t[1]=r("div",{class:"fct-skel-toolbar"},[r("div",{class:"fct-skel fct-skel-tb-btn"}),r("div",{class:"fct-skel fct-skel-tb-btn"}),r("div",{class:"fct-skel fct-skel-tb-btn"}),r("div",{class:"fct-skel-sep"}),r("div",{class:"fct-skel fct-skel-tb-btn"}),r("div",{class:"fct-skel fct-skel-tb-btn"}),r("div",{class:"fct-skel-sep"}),r("div",{class:"fct-skel fct-skel-tb-wide"}),r("div",{class:"fct-skel fct-skel-tb-wide"}),r("div",{class:"fct-skel-sep"}),r("div",{class:"fct-skel fct-skel-tb-btn"})],-1)),l(u,{"show-loading-badge":!0})]))]),_:1}),r("div",qv,null,512)])])}const _p=He(Kv,[["render",Wv],["__scopeId","data-v-e5dae537"]]),Xv={class:"setting-wrap fct-pdf-template-edit-wrapper"},Jv={class:"capitalize"},Zv={class:"setting-wrap-inner"},e1={class:"bg-white rounded dark:bg-dark-700 p-6 mb-4"},t1={class:"setting-save-action"},a1={__name:"PdfTemplateEdit",props:{template:{type:String,required:!0}},setup(e){const t=e,a=ja(),n=V(!0),s=V(!1),o=V(!1),u=V(!1),A=V(null),f=V(null),m=V(""),g=F=>{const L=atob(F),Q=new Array(L.length);for(let T=0;T{const F=await re.post("settings/pdf-templates/download",{template_id:t.template});if(!(F!=null&&F.pdf_base64))throw new Error(c("Failed to generate PDF"));return F},v=()=>{n.value=!0,re.get("settings/pdf-templates/receipt/"+t.template).then(F=>{var Q,T,D;A.value=F.template;const L=(D=(T=(Q=F.template)==null?void 0:Q.pdf_settings)==null?void 0:T[0])==null?void 0:D.pdf_structure;L&&(m.value=L.content||"")}).catch(F=>{var L;q.error(((L=F.data)==null?void 0:L.message)||c("Failed to load template"))}).finally(()=>{n.value=!1})},B=async({showSuccess:F=!0}={})=>{var Q,T,D,U;s.value=!0,f.value&&await f.value.forceAutosave();const L=((D=(T=(Q=A.value)==null?void 0:Q.pdf_settings)==null?void 0:T[0])==null?void 0:D.pdf_structure)||{};L.content=m.value;try{const I=await re.post("settings/pdf-templates/receipt/"+t.template,{pdf_structure:L});return F&&q.success(I.message||c("Template saved")),!0}catch(I){return q.error(((U=I.data)==null?void 0:U.message)||c("Failed to save template")),!1}finally{s.value=!1}},b=()=>{o.value=!0,y().then(F=>{const L=g(F.pdf_base64),Q=URL.createObjectURL(L),T=document.createElement("a");T.href=Q,T.download=F.filename||"receipt-test.pdf",document.body.appendChild(T),T.click(),document.body.removeChild(T),URL.revokeObjectURL(Q),q.success(c("PDF downloaded"))}).catch(F=>{var L;q.error(((L=F.data)==null?void 0:L.message)||F.message||c("Failed to generate PDF"))}).finally(()=>{o.value=!1})},w=async()=>{var F;u.value=!0;try{const L=await y(),Q=g(L.pdf_base64),T=URL.createObjectURL(Q),D=document.createElement("a");D.href=T,D.target="_blank",D.rel="noopener",document.body.appendChild(D),D.click(),document.body.removeChild(D),setTimeout(()=>{URL.revokeObjectURL(T)},1e4)}catch(L){q.error(((F=L.data)==null?void 0:F.message)||L.message||c("Failed to generate PDF"))}finally{u.value=!1}},k=async()=>{s.value||o.value||u.value||!await B({showSuccess:!1})||await w()},S=()=>A.value&&!A.value.is_default,M=()=>{re.delete("settings/pdf-templates/delete/"+t.template).then(F=>{q.success(F.message||c("Template deleted")),a.push({path:"/settings/pdf-template"})}).catch(F=>{var L;q.error(((L=F.data)==null?void 0:L.message)||c("Failed to delete template"))})},$=()=>{re.get("settings/pdf-templates/factory-default").then(F=>{var T,D,U;const L=(T=F.templates)==null?void 0:T[t.template];if(!L)return;const Q=((U=(D=L.pdf_settings)==null?void 0:D[0])==null?void 0:U.pdf_structure)||{};return re.post("settings/pdf-templates/receipt/"+t.template,{pdf_structure:Q}).then(()=>{q.success(c("Reverted to default template")),v()})}).catch(F=>{var L;q.error(((L=F.data)==null?void 0:L.message)||c("Failed to revert template"))})};return Be(()=>{v()}),(F,L)=>{const Q=C("el-breadcrumb-item"),T=C("el-breadcrumb"),D=C("el-icon"),U=C("el-button"),I=C("el-dropdown-item"),O=C("el-dropdown-menu"),P=C("el-dropdown"),K=C("el-skeleton-item"),G=C("el-skeleton");return d(),_("div",Xv,[l(ha,{loading:s.value,"loading-text":p(c)("Saving"),"save-button-text":p(c)("Save Template"),onOnSave:B},{heading:i(()=>[l(T,{class:"mb-0","separator-icon":p(tn)},{default:i(()=>[l(Q,{to:{path:"/settings/pdf-template"}},{default:i(()=>[R(h(p(c)("PDF Templates")),1)]),_:1}),l(Q,null,{default:i(()=>{var ne;return[r("span",Jv,h(((ne=A.value)==null?void 0:ne.title)||p(c)("Edit Template")),1)]}),_:1})]),_:1},8,["separator-icon"])]),action:i(()=>[l(P,{trigger:"click",style:{"margin-left":"12px",display:"inline-flex","align-items":"center"},"popper-class":"fct-dropdown"},{dropdown:i(()=>[l(O,null,{default:i(()=>[l(I,{onClick:b,disabled:o.value},{default:i(()=>[R(h(o.value?p(c)("Downloading..."):p(c)("Test Download")),1)]),_:1},8,["disabled"]),l(I,{onClick:$},{default:i(()=>[R(h(p(c)("Revert to Default")),1)]),_:1}),S()?(d(),E(I,{key:0,divided:"",onClick:M,style:{color:"#F56C6C"}},{default:i(()=>[R(h(p(c)("Delete Template")),1)]),_:1})):x("",!0)]),_:1})]),default:i(()=>[l(U,{size:"small",text:"",style:{height:"auto",padding:"4px"}},{default:i(()=>[l(D,{style:{transform:"rotate(90deg)","font-size":"16px"}},{default:i(()=>[l(p(fh))]),_:1})]),_:1})]),_:1})]),_:1},8,["loading","loading-text","save-button-text"]),r("div",Zv,[l(_a),l(G,{loading:n.value,class:"bg-white rounded p-6 dark:bg-dark-700",animated:""},{template:i(()=>[l(K,{variant:"h3",class:"w-[200px] mb-5"}),l(K,{variant:"rect",style:{width:"100%",height:"500px"}})]),_:1},8,["loading"]),!n.value&&A.value?(d(),_(H,{key:0},[r("div",e1,[l(_p,{ref_key:"editorFrameRef",ref:f,editorParams:{block_type:"pdf_template",campaign_title:A.value.title,bid:t.template},frameHeight:"calc(100vh - 200px)",documentTitle:A.value.title||p(c)("Receipt Template"),onPreviewRequest:k,modelValue:m.value,"onUpdate:modelValue":L[0]||(L[0]=ne=>m.value=ne)},null,8,["editorParams","documentTitle","modelValue"])]),r("div",t1,[l(U,{onClick:B,type:"primary",disabled:s.value,loading:s.value},{default:i(()=>[R(h(p(c)("Save Template")),1)]),_:1},8,["disabled","loading"]),l(U,{onClick:b,disabled:o.value,loading:o.value},{default:i(()=>[R(h(p(c)("Test Download")),1)]),_:1},8,["disabled","loading"])])],64)):x("",!0)])])}}},n1={class:"fluent-cart-admin-validation-error-wrapper `${fieldKey}`"},un=Object.assign({name:"ValidationError"},{__name:"ValidationError",props:{validationErrors:Object,fieldKey:{type:String,default:""}},setup(e){return(t,a)=>(d(),_("div",n1,[(d(!0),_(H,null,ee(e.validationErrors,(n,s)=>(d(),_("span",{class:"fluent-cart-admin-validation-error",key:n.toLowerCase().replace(/\s/g,"")},h(n),1))),128))]))}}),Wo={__name:"Alert",props:{type:String,title:String,description:String,closable:Boolean,showIcon:Boolean},setup(e){return(t,a)=>{const n=C("el-alert");return d(),E(n,{title:e.title,type:e.type,description:e.description,"show-icon":e.showIcon,closable:e.closable,role:"alert"},{default:i(()=>[oa(t.$slots,"default")]),_:3},8,["title","type","description","show-icon","closable"])}}},s1={class:"setting-wrap"},l1={class:"setting-wrap-inner"},o1={class:"grid gap-3 mb-6"},r1={class:"grid gap-3 mb-6"},i1={class:"grid gap-3 mb-6"},d1={class:"grid gap-3"},u1={key:0,class:"mb-4 p-4 rounded-lg border border-yellow-300 bg-yellow-50 text-yellow-800 text-sm"},c1=["href"],A1={class:"form-note"},p1={class:"form-note"},f1=["href"],m1={class:"mb-4"},h1={class:"mb-4"},_1={class:"form-note"},g1={class:"form-note"},v1={class:"form-note"},y1={class:"form-note"},b1={class:"setting-save-action"},w1={__name:"PdfTemplateSettings",setup(e){const t=V(!0),a=V(!1),n=V({}),s=V(!0),o=V(""),u=V({zugferd_enabled:"0",zugferd_profile:"en16931",seller_legal_registration_scheme:"",seller_contact_name:"",seller_contact_email:"",seller_contact_phone:"",seller_bank_iban:"",seller_bank_bic:"",seller_bank_account_name:"",seller_electronic_address:""}),A=[{label:"EN 16931 (ZUGFeRD)",value:"en16931"}],f=[{value:"",label:c("None")},{value:"0002",label:"0002 — SIRENE (France)"},{value:"0009",label:"0009 — SIRET (France)"},{value:"0021",label:"0021 — SWIFT"},{value:"0060",label:"0060 — DUNS"},{value:"0088",label:"0088 — EAN / GS1 GLN"},{value:"0096",label:"0096 — Danish P number"},{value:"0130",label:"0130 — EU Directorates"},{value:"0183",label:"0183 — Swiss UID"},{value:"0184",label:"0184 — Danish CVR"},{value:"0190",label:"0190 — Dutch OIN"},{value:"0191",label:"0191 — Dutch KvK"},{value:"0192",label:"0192 — Dutch Organisation ID"},{value:"0195",label:"0195 — Singapore UEN"},{value:"0196",label:"0196 — Icelandic kennitala"},{value:"0198",label:"0198 — Danish SE"},{value:"0199",label:"0199 — LEI"},{value:"0200",label:"0200 — Lithuanian legal entity"},{value:"0204",label:"0204 — German Leitweg-ID"},{value:"0208",label:"0208 — Belgian CBE / KBO"},{value:"0210",label:"0210 — Italian Codice Fiscale"},{value:"0211",label:"0211 — Italian Partita IVA"},{value:"0213",label:"0213 — Finnish OVT"}];xs().onSave(()=>{y()});const g=()=>{t.value=!0,re.get("settings/pdf-templates/seller-details").then(v=>{v.seller_details&&Object.keys(u.value).forEach(B=>{v.seller_details[B]!==void 0&&(u.value[B]=v.seller_details[B])}),s.value=v.store_country_set!==!1,o.value=v.store_settings_url||""}).catch(v=>{var B;q.error(((B=v.data)==null?void 0:B.message)||c("Failed to load settings"))}).finally(()=>{t.value=!1})},y=()=>{a.value=!0,n.value={},re.post("settings/pdf-templates/seller-details",u.value).then(v=>{q.success(v.message||c("Settings saved"))}).catch(v=>{var B,b;v.status_code===422&&((B=v.data)!=null&&B.data)&&(n.value=v.data.data),q.error(((b=v.data)==null?void 0:b.message)||c("Failed to save settings"))}).finally(()=>{a.value=!1})};return Be(()=>{g()}),(v,B)=>{const b=C("el-skeleton-item"),w=C("el-skeleton"),k=C("el-switch"),S=C("el-option"),M=C("el-select"),$=C("el-form-item"),F=C("el-col"),L=C("el-row"),Q=C("el-input"),T=C("el-divider"),D=C("el-button");return d(),_("div",s1,[l(ha,{heading:p(c)("E-Invoice Settings"),loading:a.value,onOnSave:y},null,8,["heading","loading"]),r("div",l1,[l(_a),t.value?(d(),E(he,{key:0},{default:i(()=>[l(me,null,{default:i(()=>[l(w,{animated:""},{template:i(()=>[r("div",o1,[l(b,{variant:"p",class:"w-[20%]"}),l(b,{variant:"p"})]),r("div",r1,[l(b,{variant:"p",class:"w-[20%]"}),l(b,{variant:"p"})]),r("div",i1,[l(b,{variant:"p",class:"w-[20%]"}),l(b,{variant:"p"})]),r("div",d1,[l(b,{variant:"p",class:"w-[20%]"}),l(b,{variant:"p"})])]),_:1})]),_:1})]),_:1})):x("",!0),t.value?x("",!0):(d(),_(H,{key:1},[u.value.zugferd_enabled==="1"&&!s.value?(d(),_("div",u1,[r("strong",null,h(p(c)("Store country is not configured.")),1),R(" "+h(p(c)("ZUGFeRD XML cannot be embedded in PDFs until your store country is set."))+" ",1),o.value?(d(),_("a",{key:0,href:o.value,class:"underline ml-1"},h(p(c)("Go to Store Settings")),9,c1)):x("",!0)])):x("",!0),l(he,null,{default:i(()=>[l(Ce,{title:p(c)("E-Invoice Configuration"),text:p(c)("Configure ZUGFeRD / Factur-X e-invoice encoding and seller details for your PDFs."),border_bottom:""},{action:i(()=>[l(k,{modelValue:u.value.zugferd_enabled,"onUpdate:modelValue":B[0]||(B[0]=U=>u.value.zugferd_enabled=U),"active-value":"1","inactive-value":"0"},null,8,["modelValue"])]),_:1},8,["title","text"]),l(me,null,{default:i(()=>[l(L,{gutter:15},{default:i(()=>[l(F,{lg:12},{default:i(()=>[l($,{label:p(c)("ZUGFeRD Profile"),"label-position":"top"},{default:i(()=>[l(M,{modelValue:u.value.zugferd_profile,"onUpdate:modelValue":B[1]||(B[1]=U=>u.value.zugferd_profile=U)},{default:i(()=>[(d(),_(H,null,ee(A,U=>l(S,{key:U.value,label:U.label,value:U.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),r("div",A1,[r("p",null,h(p(c)("Select the e-invoice formatter used when generating the embedded XML.")),1)])]),_:1},8,["label"])]),_:1}),l(F,{lg:12},{default:i(()=>[l($,{label:p(c)("Legal Registration Scheme"),"label-position":"top"},{default:i(()=>[l(M,{modelValue:u.value.seller_legal_registration_scheme,"onUpdate:modelValue":B[2]||(B[2]=U=>u.value.seller_legal_registration_scheme=U),placeholder:p(c)("Select scheme"),clearable:"",filterable:""},{default:i(()=>[(d(),_(H,null,ee(f,U=>l(S,{key:U.value,label:U.label,value:U.value},null,8,["label","value"])),64))]),_:1},8,["modelValue","placeholder"]),r("div",p1,[r("p",null,h(p(c)("ISO 6523 ICD code for the legal registration identifier")),1)]),l(un,{"validation-errors":n.value.seller_legal_registration_scheme||{},"field-key":"seller_legal_registration_scheme"},null,8,["validation-errors"])]),_:1},8,["label"])]),_:1})]),_:1}),l(Wo,{type:"info",closable:!1,"show-icon":"",class:"mb-4"},{default:i(()=>[R(h(p(c)("Company Name, VAT ID, Tax ID, and Legal Registration ID are managed in"))+" ",1),o.value?(d(),_("a",{key:0,href:o.value,target:"_blank",class:""},h(p(c)("Store Settings → Business Details")),9,f1)):x("",!0)]),_:1}),r("h4",m1,h(p(c)("Seller Contact")),1),l(L,{gutter:15},{default:i(()=>[l(F,{lg:12},{default:i(()=>[l($,{label:p(c)("Contact Name"),"label-position":"top"},{default:i(()=>[l(Q,{modelValue:u.value.seller_contact_name,"onUpdate:modelValue":B[3]||(B[3]=U=>u.value.seller_contact_name=U)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),l(F,{lg:12},{default:i(()=>[l($,{label:p(c)("Contact Email"),"label-position":"top"},{default:i(()=>[l(Q,{modelValue:u.value.seller_contact_email,"onUpdate:modelValue":B[4]||(B[4]=U=>u.value.seller_contact_email=U),type:"email"},null,8,["modelValue"]),l(un,{"validation-errors":n.value.seller_contact_email||{},"field-key":"seller_contact_email"},null,8,["validation-errors"])]),_:1},8,["label"])]),_:1})]),_:1}),l(L,{gutter:15},{default:i(()=>[l(F,{lg:12},{default:i(()=>[l($,{label:p(c)("Contact Phone"),"label-position":"top"},{default:i(()=>[l(Q,{modelValue:u.value.seller_contact_phone,"onUpdate:modelValue":B[5]||(B[5]=U=>u.value.seller_contact_phone=U)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1}),l(T),r("h4",h1,h(p(c)("Seller Bank Details")),1),l(L,{gutter:15},{default:i(()=>[l(F,{lg:12},{default:i(()=>[l($,{label:p(c)("Bank IBAN"),"label-position":"top"},{default:i(()=>[l(Q,{modelValue:u.value.seller_bank_iban,"onUpdate:modelValue":B[6]||(B[6]=U=>u.value.seller_bank_iban=U)},null,8,["modelValue"]),l(un,{"validation-errors":n.value.seller_bank_iban||{},"field-key":"seller_bank_iban"},null,8,["validation-errors"]),r("div",_1,[r("p",null,h(p(c)("International Bank Account Number")),1)])]),_:1},8,["label"])]),_:1}),l(F,{lg:12},{default:i(()=>[l($,{label:p(c)("Bank BIC"),"label-position":"top"},{default:i(()=>[l(Q,{modelValue:u.value.seller_bank_bic,"onUpdate:modelValue":B[7]||(B[7]=U=>u.value.seller_bank_bic=U)},null,8,["modelValue"]),r("div",g1,[r("p",null,h(p(c)("Bank Identifier Code (SWIFT)")),1)])]),_:1},8,["label"])]),_:1})]),_:1}),l(L,{gutter:15},{default:i(()=>[l(F,{lg:12},{default:i(()=>[l($,{label:p(c)("Bank Account Name"),"label-position":"top"},{default:i(()=>[l(Q,{modelValue:u.value.seller_bank_account_name,"onUpdate:modelValue":B[8]||(B[8]=U=>u.value.seller_bank_account_name=U)},null,8,["modelValue"]),r("div",v1,[r("p",null,h(p(c)("Name of the bank account holder")),1)])]),_:1},8,["label"])]),_:1}),l(F,{lg:12},{default:i(()=>[l($,{label:p(c)("Electronic Address"),"label-position":"top"},{default:i(()=>[l(Q,{modelValue:u.value.seller_electronic_address,"onUpdate:modelValue":B[9]||(B[9]=U=>u.value.seller_electronic_address=U)},null,8,["modelValue"]),r("div",y1,[r("p",null,h(p(c)("Electronic address for receiving e-invoices (e.g. PEPPOL ID)")),1)])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1})]),_:1}),r("div",b1,[l(D,{type:"primary",onClick:B[10]||(B[10]=U=>y()),loading:a.value},{default:i(()=>[R(h(p(c)("Save Settings")),1)]),_:1},8,["loading"])])],64))])])}}},C1={name:"CustomersRoute"},B1={class:"fca_customers_route"};function k1(e,t,a,n,s,o){const u=C("router-view");return d(),_("div",B1,[l(u)])}const x1=He(C1,[["render",k1]]);/*! * html2canvas 1.4.1 * Copyright (c) 2022 Niklas von Hertzen * Released under MIT License *//*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var nd=function(e,t){return nd=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,n){a.__proto__=n}||function(a,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(a[s]=n[s])},nd(e,t)};function Qn(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");nd(e,t);function a(){this.constructor=e}e.prototype=t===null?Object.create(t):(a.prototype=t.prototype,new a)}var sd=function(){return sd=Object.assign||function(t){for(var a,n=1,s=arguments.length;n0&&o[o.length-1])&&(m[0]===6||m[0]===2)){a=0;continue}if(m[0]===3&&(!o||m[1]>o[0]&&m[1]=55296&&s<=56319&&a>10)+55296,u%1024+56320)),(s+1===a||n.length>16384)&&(o+=String.fromCharCode.apply(String,n),n.length=0)}return o},Wu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",F1=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var yo=0;yo"u"?[]:new Uint8Array(256);for(var bo=0;bo>4,g[s++]=(u&15)<<4|A>>2,g[s++]=(A&3)<<6|f&63;return m},U1=function(e){for(var t=e.length,a=[],n=0;n>Ls,Q1=1<>Ls,T1=gp+I1,V1=T1,M1=32,L1=V1+M1,R1=65536>>ou,O1=1<=0){if(t<55296||t>56319&&t<=65535)return a=this.index[t>>Ls],a=(a<>Ls)],a=(a<>ou),a=this.index[a],a+=t>>Ls&H1,a=this.index[a],a=(a<"u"?[]:new Uint8Array(256);for(var wo=0;woec?(s.push(!0),A-=ec):s.push(!1),["normal","auto","loose"].indexOf(t)!==-1&&[8208,8211,12316,12448].indexOf(o)!==-1)return n.push(u),a.push(rd);if(A===Y1||A===ld){if(u===0)return n.push(u),a.push(Ts);var f=a[u-1];return ay.indexOf(f)===-1?(n.push(n[u-1]),a.push(f)):(n.push(u),a.push(Ts))}if(n.push(u),A===Z1)return a.push(t==="strict"?id:oo);if(A===wp||A===J1)return a.push(Ts);if(A===ey)return o>=131072&&o<=196605||o>=196608&&o<=262141?a.push(oo):a.push(Ts);a.push(A)}),[n,a,s]},mi=function(e,t,a,n){var s=n[a];if(Array.isArray(e)?e.indexOf(s)!==-1:e===s)for(var o=a;o<=n.length;){o++;var u=n[o];if(u===t)return!0;if(u!==fs)break}if(s===fs)for(var o=a;o>0;){o--;var A=n[o];if(Array.isArray(e)?e.indexOf(A)!==-1:e===A)for(var f=a;f<=n.length;){f++;var u=n[f];if(u===t)return!0;if(u!==fs)break}if(A!==fs)break}return!1},rc=function(e,t){for(var a=e;a>=0;){var n=t[a];if(n===fs)a--;else return n}return 0},ly=function(e,t,a,n,s){if(a[n]===0)return wt;var o=n-1;if(Array.isArray(s)&&s[o]===!0)return wt;var u=o-1,A=o+1,f=t[o],m=u>=0?t[u]:0,g=t[A];if(f===vp&&g===yp)return wt;if(fd.indexOf(f)!==-1)return Cp;if(fd.indexOf(g)!==-1||Bp.indexOf(g)!==-1)return wt;if(rc(o,t)===bp)return xo;if(pd.get(e[o])===ld||(f===Bo||f===ko)&&pd.get(e[A])===ld||f===tc||g===tc||f===ac||[fs,od,Tl].indexOf(f)===-1&&g===ac||[Co,Ul,X1,Js,Zs].indexOf(g)!==-1||rc(o,t)===$l||mi(pi,$l,o,t)||mi([Co,Ul],id,o,t)||mi(nc,nc,o,t))return wt;if(f===fs)return xo;if(f===pi||g===pi)return wt;if(g===rd||f===rd)return xo;if([od,Tl,id].indexOf(g)!==-1||f===W1||m===cd&&ny.indexOf(f)!==-1||f===Zs&&g===cd||g===sc||Wn.indexOf(g)!==-1&&f===sn||Wn.indexOf(f)!==-1&&g===sn||f===Ml&&[oo,Bo,ko].indexOf(g)!==-1||[oo,Bo,ko].indexOf(f)!==-1&&g===Vl||Wn.indexOf(f)!==-1&&lc.indexOf(g)!==-1||lc.indexOf(f)!==-1&&Wn.indexOf(g)!==-1||[Ml,Vl].indexOf(f)!==-1&&(g===sn||[$l,Tl].indexOf(g)!==-1&&t[A+1]===sn)||[$l,Tl].indexOf(f)!==-1&&g===sn||f===sn&&[sn,Zs,Js].indexOf(g)!==-1)return wt;if([sn,Zs,Js,Co,Ul].indexOf(g)!==-1)for(var y=o;y>=0;){var v=t[y];if(v===sn)return wt;if([Zs,Js].indexOf(v)!==-1)y--;else break}if([Ml,Vl].indexOf(g)!==-1)for(var y=[Co,Ul].indexOf(f)!==-1?u:o;y>=0;){var v=t[y];if(v===sn)return wt;if([Zs,Js].indexOf(v)!==-1)y--;else break}if(Ad===f&&[Ad,Xo,dd,ud].indexOf(g)!==-1||[Xo,dd].indexOf(f)!==-1&&[Xo,Jo].indexOf(g)!==-1||[Jo,ud].indexOf(f)!==-1&&g===Jo||oc.indexOf(f)!==-1&&[sc,Vl].indexOf(g)!==-1||oc.indexOf(g)!==-1&&f===Ml||Wn.indexOf(f)!==-1&&Wn.indexOf(g)!==-1||f===Js&&Wn.indexOf(g)!==-1||Wn.concat(sn).indexOf(f)!==-1&&g===$l&&ty.indexOf(e[A])===-1||Wn.concat(sn).indexOf(g)!==-1&&f===Ul)return wt;if(f===fi&&g===fi){for(var B=a[o],b=1;B>0&&(B--,t[B]===fi);)b++;if(b%2!==0)return wt}return f===Bo&&g===ko?wt:xo},oy=function(e,t){t||(t={lineBreak:"normal",wordBreak:"normal"});var a=sy(e,t.lineBreak),n=a[0],s=a[1],o=a[2];(t.wordBreak==="break-all"||t.wordBreak==="break-word")&&(s=s.map(function(A){return[sn,Ts,wp].indexOf(A)!==-1?oo:A}));var u=t.wordBreak==="keep-all"?o.map(function(A,f){return A&&e[f]>=19968&&e[f]<=40959}):void 0;return[n,s,u]},ry=function(){function e(t,a,n,s){this.codePoints=t,this.required=a===Cp,this.start=n,this.end=s}return e.prototype.slice=function(){return ma.apply(void 0,this.codePoints.slice(this.start,this.end))},e}(),iy=function(e,t){var a=zr(e),n=oy(a,t),s=n[0],o=n[1],u=n[2],A=a.length,f=0,m=0;return{next:function(){if(m>=A)return{done:!0,value:null};for(var g=wt;m=kp&&e<=57},Py=function(e){return e>=55296&&e<=57343},el=function(e){return Ha(e)||e>=Fp&&e<=Up||e>=xp&&e<=My},Ny=function(e){return e>=xp&&e<=Ry},Ky=function(e){return e>=Fp&&e<=Hy},Gy=function(e){return Ny(e)||Ky(e)},jy=function(e){return e>=Sy},$o=function(e){return e===cr||e===cy||e===Ay},Ar=function(e){return Gy(e)||jy(e)||e===hy},Ac=function(e){return Ar(e)||Ha(e)||e===Ja},zy=function(e){return e>=$y&&e<=Dy||e===Qy||e>=Iy&&e<=Ty||e===Vy},cs=function(e,t){return e!==Gl?!1:t!==cr},Do=function(e,t,a){return e===Ja?Ar(t)||cs(t,a):Ar(e)?!0:!!(e===Gl&&cs(e,t))},_i=function(e,t,a){return e===Ms||e===Ja?Ha(t)?!0:t===ro&&Ha(a):Ha(e===ro?t:e)},Yy=function(e){var t=0,a=1;(e[t]===Ms||e[t]===Ja)&&(e[t]===Ja&&(a=-1),t++);for(var n=[];Ha(e[t]);)n.push(e[t++]);var s=n.length?parseInt(ma.apply(void 0,n),10):0;e[t]===ro&&t++;for(var o=[];Ha(e[t]);)o.push(e[t++]);var u=o.length,A=u?parseInt(ma.apply(void 0,o),10):0;(e[t]===Ep||e[t]===Sp)&&t++;var f=1;(e[t]===Ms||e[t]===Ja)&&(e[t]===Ja&&(f=-1),t++);for(var m=[];Ha(e[t]);)m.push(e[t++]);var g=m.length?parseInt(ma.apply(void 0,m),10):0;return a*(s+A*Math.pow(10,-u))*Math.pow(10,f*g)},qy={type:2},Wy={type:3},Xy={type:4},Jy={type:13},Zy={type:8},eb={type:21},tb={type:9},ab={type:10},nb={type:11},sb={type:12},lb={type:14},Qo={type:23},ob={type:1},rb={type:25},ib={type:24},db={type:26},ub={type:27},cb={type:28},Ab={type:29},pb={type:31},md={type:32},$p=function(){function e(){this._value=[]}return e.prototype.write=function(t){this._value=this._value.concat(zr(t))},e.prototype.read=function(){for(var t=[],a=this.consumeToken();a!==md;)t.push(a),a=this.consumeToken();return t},e.prototype.consumeToken=function(){var t=this.consumeCodePoint();switch(t){case So:return this.consumeStringToken(So);case py:var a=this.peekCodePoint(0),n=this.peekCodePoint(1),s=this.peekCodePoint(2);if(Ac(a)||cs(n,s)){var o=Do(a,n,s)?uy:dy,u=this.consumeName();return{type:5,value:u,flags:o}}break;case fy:if(this.peekCodePoint(0)===Dl)return this.consumeCodePoint(),Jy;break;case Fo:return this.consumeStringToken(Fo);case Eo:return qy;case Ql:return Wy;case hi:if(this.peekCodePoint(0)===Dl)return this.consumeCodePoint(),lb;break;case Ms:if(_i(t,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(t),this.consumeNumericToken();break;case Fy:return Xy;case Ja:var A=t,f=this.peekCodePoint(0),m=this.peekCodePoint(1);if(_i(A,f,m))return this.reconsumeCodePoint(t),this.consumeNumericToken();if(Do(A,f,m))return this.reconsumeCodePoint(t),this.consumeIdentLikeToken();if(f===Ja&&m===vy)return this.consumeCodePoint(),this.consumeCodePoint(),ib;break;case ro:if(_i(t,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(t),this.consumeNumericToken();break;case dc:if(this.peekCodePoint(0)===hi)for(this.consumeCodePoint();;){var g=this.consumeCodePoint();if(g===hi&&(g=this.consumeCodePoint(),g===dc))return this.consumeToken();if(g===Mn)return this.consumeToken()}break;case Ey:return db;case Uy:return ub;case gy:if(this.peekCodePoint(0)===_y&&this.peekCodePoint(1)===Ja&&this.peekCodePoint(2)===Ja)return this.consumeCodePoint(),this.consumeCodePoint(),rb;break;case yy:var y=this.peekCodePoint(0),v=this.peekCodePoint(1),B=this.peekCodePoint(2);if(Do(y,v,B)){var u=this.consumeName();return{type:7,value:u}}break;case by:return cb;case Gl:if(cs(t,this.peekCodePoint(0)))return this.reconsumeCodePoint(t),this.consumeIdentLikeToken();break;case wy:return Ab;case Cy:if(this.peekCodePoint(0)===Dl)return this.consumeCodePoint(),Zy;break;case By:return nb;case ky:return sb;case Ly:case Oy:var b=this.peekCodePoint(0),w=this.peekCodePoint(1);return b===Ms&&(el(w)||w===Uo)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(t),this.consumeIdentLikeToken();case uc:if(this.peekCodePoint(0)===Dl)return this.consumeCodePoint(),tb;if(this.peekCodePoint(0)===uc)return this.consumeCodePoint(),eb;break;case xy:if(this.peekCodePoint(0)===Dl)return this.consumeCodePoint(),ab;break;case Mn:return md}return $o(t)?(this.consumeWhiteSpace(),pb):Ha(t)?(this.reconsumeCodePoint(t),this.consumeNumericToken()):Ar(t)?(this.reconsumeCodePoint(t),this.consumeIdentLikeToken()):{type:6,value:ma(t)}},e.prototype.consumeCodePoint=function(){var t=this._value.shift();return typeof t>"u"?-1:t},e.prototype.reconsumeCodePoint=function(t){this._value.unshift(t)},e.prototype.peekCodePoint=function(t){return t>=this._value.length?-1:this._value[t]},e.prototype.consumeUnicodeRangeToken=function(){for(var t=[],a=this.consumeCodePoint();el(a)&&t.length<6;)t.push(a),a=this.consumeCodePoint();for(var n=!1;a===Uo&&t.length<6;)t.push(a),a=this.consumeCodePoint(),n=!0;if(n){var s=parseInt(ma.apply(void 0,t.map(function(f){return f===Uo?kp:f})),16),o=parseInt(ma.apply(void 0,t.map(function(f){return f===Uo?Up:f})),16);return{type:30,start:s,end:o}}var u=parseInt(ma.apply(void 0,t),16);if(this.peekCodePoint(0)===Ja&&el(this.peekCodePoint(1))){this.consumeCodePoint(),a=this.consumeCodePoint();for(var A=[];el(a)&&A.length<6;)A.push(a),a=this.consumeCodePoint();var o=parseInt(ma.apply(void 0,A),16);return{type:30,start:u,end:o}}else return{type:30,start:u,end:u}},e.prototype.consumeIdentLikeToken=function(){var t=this.consumeName();return t.toLowerCase()==="url"&&this.peekCodePoint(0)===Eo?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===Eo?(this.consumeCodePoint(),{type:19,value:t}):{type:20,value:t}},e.prototype.consumeUrlToken=function(){var t=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Mn)return{type:22,value:""};var a=this.peekCodePoint(0);if(a===Fo||a===So){var n=this.consumeStringToken(this.consumeCodePoint());return n.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Mn||this.peekCodePoint(0)===Ql)?(this.consumeCodePoint(),{type:22,value:n.value}):(this.consumeBadUrlRemnants(),Qo)}for(;;){var s=this.consumeCodePoint();if(s===Mn||s===Ql)return{type:22,value:ma.apply(void 0,t)};if($o(s))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Mn||this.peekCodePoint(0)===Ql?(this.consumeCodePoint(),{type:22,value:ma.apply(void 0,t)}):(this.consumeBadUrlRemnants(),Qo);if(s===So||s===Fo||s===Eo||zy(s))return this.consumeBadUrlRemnants(),Qo;if(s===Gl)if(cs(s,this.peekCodePoint(0)))t.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),Qo;else t.push(s)}},e.prototype.consumeWhiteSpace=function(){for(;$o(this.peekCodePoint(0));)this.consumeCodePoint()},e.prototype.consumeBadUrlRemnants=function(){for(;;){var t=this.consumeCodePoint();if(t===Ql||t===Mn)return;cs(t,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},e.prototype.consumeStringSlice=function(t){for(var a=5e4,n="";t>0;){var s=Math.min(a,t);n+=ma.apply(void 0,this._value.splice(0,s)),t-=s}return this._value.shift(),n},e.prototype.consumeStringToken=function(t){var a="",n=0;do{var s=this._value[n];if(s===Mn||s===void 0||s===t)return a+=this.consumeStringSlice(n),{type:0,value:a};if(s===cr)return this._value.splice(0,n),ob;if(s===Gl){var o=this._value[n+1];o!==Mn&&o!==void 0&&(o===cr?(a+=this.consumeStringSlice(n),n=-1,this._value.shift()):cs(s,o)&&(a+=this.consumeStringSlice(n),a+=ma(this.consumeEscapedCodePoint()),n=-1))}n++}while(!0)},e.prototype.consumeNumber=function(){var t=[],a=Ao,n=this.peekCodePoint(0);for((n===Ms||n===Ja)&&t.push(this.consumeCodePoint());Ha(this.peekCodePoint(0));)t.push(this.consumeCodePoint());n=this.peekCodePoint(0);var s=this.peekCodePoint(1);if(n===ro&&Ha(s))for(t.push(this.consumeCodePoint(),this.consumeCodePoint()),a=ic;Ha(this.peekCodePoint(0));)t.push(this.consumeCodePoint());n=this.peekCodePoint(0),s=this.peekCodePoint(1);var o=this.peekCodePoint(2);if((n===Ep||n===Sp)&&((s===Ms||s===Ja)&&Ha(o)||Ha(s)))for(t.push(this.consumeCodePoint(),this.consumeCodePoint()),a=ic;Ha(this.peekCodePoint(0));)t.push(this.consumeCodePoint());return[Yy(t),a]},e.prototype.consumeNumericToken=function(){var t=this.consumeNumber(),a=t[0],n=t[1],s=this.peekCodePoint(0),o=this.peekCodePoint(1),u=this.peekCodePoint(2);if(Do(s,o,u)){var A=this.consumeName();return{type:15,number:a,flags:n,unit:A}}return s===my?(this.consumeCodePoint(),{type:16,number:a,flags:n}):{type:17,number:a,flags:n}},e.prototype.consumeEscapedCodePoint=function(){var t=this.consumeCodePoint();if(el(t)){for(var a=ma(t);el(this.peekCodePoint(0))&&a.length<6;)a+=ma(this.consumeCodePoint());$o(this.peekCodePoint(0))&&this.consumeCodePoint();var n=parseInt(a,16);return n===0||Py(n)||n>1114111?cc:n}return t===Mn?cc:t},e.prototype.consumeName=function(){for(var t="";;){var a=this.consumeCodePoint();if(Ac(a))t+=ma(a);else if(cs(a,this.peekCodePoint(0)))t+=ma(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(a),t}},e}(),Dp=function(){function e(t){this._tokens=t}return e.create=function(t){var a=new $p;return a.write(t),new e(a.read())},e.parseValue=function(t){return e.create(t).parseComponentValue()},e.parseValues=function(t){return e.create(t).parseComponentValues()},e.prototype.parseComponentValue=function(){for(var t=this.consumeToken();t.type===31;)t=this.consumeToken();if(t.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(t);var a=this.consumeComponentValue();do t=this.consumeToken();while(t.type===31);if(t.type===32)return a;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},e.prototype.parseComponentValues=function(){for(var t=[];;){var a=this.consumeComponentValue();if(a.type===32)return t;t.push(a),t.push()}},e.prototype.consumeComponentValue=function(){var t=this.consumeToken();switch(t.type){case 11:case 28:case 2:return this.consumeSimpleBlock(t.type);case 19:return this.consumeFunction(t)}return t},e.prototype.consumeSimpleBlock=function(t){for(var a={type:t,values:[]},n=this.consumeToken();;){if(n.type===32||mb(n,t))return a;this.reconsumeToken(n),a.values.push(this.consumeComponentValue()),n=this.consumeToken()}},e.prototype.consumeFunction=function(t){for(var a={name:t.value,values:[],type:18};;){var n=this.consumeToken();if(n.type===32||n.type===3)return a;this.reconsumeToken(n),a.values.push(this.consumeComponentValue())}},e.prototype.consumeToken=function(){var t=this._tokens.shift();return typeof t>"u"?md:t},e.prototype.reconsumeToken=function(t){this._tokens.unshift(t)},e}(),po=function(e){return e.type===15},kl=function(e){return e.type===17},Nt=function(e){return e.type===20},fb=function(e){return e.type===0},hd=function(e,t){return Nt(e)&&e.value===t},Qp=function(e){return e.type!==31},bl=function(e){return e.type!==31&&e.type!==4},zn=function(e){var t=[],a=[];return e.forEach(function(n){if(n.type===4){if(a.length===0)throw new Error("Error parsing function args, zero tokens for arg");t.push(a),a=[];return}n.type!==31&&a.push(n)}),a.length&&t.push(a),t},mb=function(e,t){return t===11&&e.type===12||t===28&&e.type===29?!0:t===2&&e.type===3},Cs=function(e){return e.type===17||e.type===15},wa=function(e){return e.type===16||Cs(e)},Ip=function(e){return e.length>1?[e[0],e[1]]:[e[0]]},Va={type:17,number:0,flags:Ao},ru={type:16,number:50,flags:Ao},ms={type:16,number:100,flags:Ao},Ll=function(e,t,a){var n=e[0],s=e[1];return[Xt(n,t),Xt(typeof s<"u"?s:n,a)]},Xt=function(e,t){if(e.type===16)return e.number/100*t;if(po(e))switch(e.unit){case"rem":case"em":return 16*e.number;case"px":default:return e.number}return e.number},Tp="deg",Vp="grad",Mp="rad",Lp="turn",Yr={name:"angle",parse:function(e,t){if(t.type===15)switch(t.unit){case Tp:return Math.PI*t.number/180;case Vp:return Math.PI/200*t.number;case Mp:return t.number;case Lp:return Math.PI*2*t.number}throw new Error("Unsupported angle type")}},Rp=function(e){return e.type===15&&(e.unit===Tp||e.unit===Vp||e.unit===Mp||e.unit===Lp)},Op=function(e){var t=e.filter(Nt).map(function(a){return a.value}).join(" ");switch(t){case"to bottom right":case"to right bottom":case"left top":case"top left":return[Va,Va];case"to top":case"bottom":return wn(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[Va,ms];case"to right":case"left":return wn(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[ms,ms];case"to bottom":case"top":return wn(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[ms,Va];case"to left":case"right":return wn(270)}return 0},wn=function(e){return Math.PI*e/180},bs={name:"color",parse:function(e,t){if(t.type===18){var a=hb[t.name];if(typeof a>"u")throw new Error('Attempting to parse an unsupported color function "'+t.name+'"');return a(e,t.values)}if(t.type===5){if(t.value.length===3){var n=t.value.substring(0,1),s=t.value.substring(1,2),o=t.value.substring(2,3);return hs(parseInt(n+n,16),parseInt(s+s,16),parseInt(o+o,16),1)}if(t.value.length===4){var n=t.value.substring(0,1),s=t.value.substring(1,2),o=t.value.substring(2,3),u=t.value.substring(3,4);return hs(parseInt(n+n,16),parseInt(s+s,16),parseInt(o+o,16),parseInt(u+u,16)/255)}if(t.value.length===6){var n=t.value.substring(0,2),s=t.value.substring(2,4),o=t.value.substring(4,6);return hs(parseInt(n,16),parseInt(s,16),parseInt(o,16),1)}if(t.value.length===8){var n=t.value.substring(0,2),s=t.value.substring(2,4),o=t.value.substring(4,6),u=t.value.substring(6,8);return hs(parseInt(n,16),parseInt(s,16),parseInt(o,16),parseInt(u,16)/255)}}if(t.type===20){var A=Jn[t.value.toUpperCase()];if(typeof A<"u")return A}return Jn.TRANSPARENT}},ws=function(e){return(255&e)===0},Fa=function(e){var t=255&e,a=255&e>>8,n=255&e>>16,s=255&e>>24;return t<255?"rgba("+s+","+n+","+a+","+t/255+")":"rgb("+s+","+n+","+a+")"},hs=function(e,t,a,n){return(e<<24|t<<16|a<<8|Math.round(n*255)<<0)>>>0},pc=function(e,t){if(e.type===17)return e.number;if(e.type===16){var a=t===3?1:255;return t===3?e.number/100*a:Math.round(e.number/100*a)}return 0},fc=function(e,t){var a=t.filter(bl);if(a.length===3){var n=a.map(pc),s=n[0],o=n[1],u=n[2];return hs(s,o,u,1)}if(a.length===4){var A=a.map(pc),s=A[0],o=A[1],u=A[2],f=A[3];return hs(s,o,u,f)}return 0};function gi(e,t,a){return a<0&&(a+=1),a>=1&&(a-=1),a<1/6?(t-e)*a*6+e:a<1/2?t:a<2/3?(t-e)*6*(2/3-a)+e:e}var mc=function(e,t){var a=t.filter(bl),n=a[0],s=a[1],o=a[2],u=a[3],A=(n.type===17?wn(n.number):Yr.parse(e,n))/(Math.PI*2),f=wa(s)?s.number/100:0,m=wa(o)?o.number/100:0,g=typeof u<"u"&&wa(u)?Xt(u,1):1;if(f===0)return hs(m*255,m*255,m*255,1);var y=m<=.5?m*(f+1):m+f-m*f,v=m*2-y,B=gi(v,y,A+1/3),b=gi(v,y,A),w=gi(v,y,A-1/3);return hs(B*255,b*255,w*255,g)},hb={hsl:mc,hsla:mc,rgb:fc,rgba:fc},jl=function(e,t){return bs.parse(e,Dp.create(t).parseComponentValue())},Jn={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},_b={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map(function(a){if(Nt(a))switch(a.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},gb={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},qr=function(e,t){var a=bs.parse(e,t[0]),n=t[1];return n&&wa(n)?{color:a,stop:n}:{color:a,stop:null}},hc=function(e,t){var a=e[0],n=e[e.length-1];a.stop===null&&(a.stop=Va),n.stop===null&&(n.stop=ms);for(var s=[],o=0,u=0;uo?s.push(f):s.push(o),o=f}else s.push(null)}for(var m=null,u=0;uu.optimumDistance)?{optimumCorner:A,optimumDistance:g}:u},{optimumDistance:s?1/0:-1/0,optimumCorner:null}).optimumCorner},bb=function(e,t,a,n,s){var o=0,u=0;switch(e.size){case 0:e.shape===0?o=u=Math.min(Math.abs(t),Math.abs(t-n),Math.abs(a),Math.abs(a-s)):e.shape===1&&(o=Math.min(Math.abs(t),Math.abs(t-n)),u=Math.min(Math.abs(a),Math.abs(a-s)));break;case 2:if(e.shape===0)o=u=Math.min(Un(t,a),Un(t,a-s),Un(t-n,a),Un(t-n,a-s));else if(e.shape===1){var A=Math.min(Math.abs(a),Math.abs(a-s))/Math.min(Math.abs(t),Math.abs(t-n)),f=_c(n,s,t,a,!0),m=f[0],g=f[1];o=Un(m-t,(g-a)/A),u=A*o}break;case 1:e.shape===0?o=u=Math.max(Math.abs(t),Math.abs(t-n),Math.abs(a),Math.abs(a-s)):e.shape===1&&(o=Math.max(Math.abs(t),Math.abs(t-n)),u=Math.max(Math.abs(a),Math.abs(a-s)));break;case 3:if(e.shape===0)o=u=Math.max(Un(t,a),Un(t,a-s),Un(t-n,a),Un(t-n,a-s));else if(e.shape===1){var A=Math.max(Math.abs(a),Math.abs(a-s))/Math.max(Math.abs(t),Math.abs(t-n)),y=_c(n,s,t,a,!1),m=y[0],g=y[1];o=Un(m-t,(g-a)/A),u=A*o}break}return Array.isArray(e.size)&&(o=Xt(e.size[0],n),u=e.size.length===2?Xt(e.size[1],s):o),[o,u]},wb=function(e,t){var a=wn(180),n=[];return zn(t).forEach(function(s,o){if(o===0){var u=s[0];if(u.type===20&&u.value==="to"){a=Op(s);return}else if(Rp(u)){a=Yr.parse(e,u);return}}var A=qr(e,s);n.push(A)}),{angle:a,stops:n,type:1}},Io=function(e,t){var a=wn(180),n=[];return zn(t).forEach(function(s,o){if(o===0){var u=s[0];if(u.type===20&&["top","left","right","bottom"].indexOf(u.value)!==-1){a=Op(s);return}else if(Rp(u)){a=(Yr.parse(e,u)+wn(270))%wn(360);return}}var A=qr(e,s);n.push(A)}),{angle:a,stops:n,type:1}},Cb=function(e,t){var a=wn(180),n=[],s=1,o=0,u=3,A=[];return zn(t).forEach(function(f,m){var g=f[0];if(m===0){if(Nt(g)&&g.value==="linear"){s=1;return}else if(Nt(g)&&g.value==="radial"){s=2;return}}if(g.type===18){if(g.name==="from"){var y=bs.parse(e,g.values[0]);n.push({stop:Va,color:y})}else if(g.name==="to"){var y=bs.parse(e,g.values[0]);n.push({stop:ms,color:y})}else if(g.name==="color-stop"){var v=g.values.filter(bl);if(v.length===2){var y=bs.parse(e,v[1]),B=v[0];kl(B)&&n.push({stop:{type:16,number:B.number*100,flags:B.flags},color:y})}}}}),s===1?{angle:(a+wn(180))%wn(360),stops:n,type:s}:{size:u,shape:o,stops:n,position:A,type:s}},Hp="closest-side",Pp="farthest-side",Np="closest-corner",Kp="farthest-corner",Gp="circle",jp="ellipse",zp="cover",Yp="contain",Bb=function(e,t){var a=0,n=3,s=[],o=[];return zn(t).forEach(function(u,A){var f=!0;if(A===0){var m=!1;f=u.reduce(function(y,v){if(m)if(Nt(v))switch(v.value){case"center":return o.push(ru),y;case"top":case"left":return o.push(Va),y;case"right":case"bottom":return o.push(ms),y}else(wa(v)||Cs(v))&&o.push(v);else if(Nt(v))switch(v.value){case Gp:return a=0,!1;case jp:return a=1,!1;case"at":return m=!0,!1;case Hp:return n=0,!1;case zp:case Pp:return n=1,!1;case Yp:case Np:return n=2,!1;case Kp:return n=3,!1}else if(Cs(v)||wa(v))return Array.isArray(n)||(n=[]),n.push(v),!1;return y},f)}if(f){var g=qr(e,u);s.push(g)}}),{size:n,shape:a,stops:s,position:o,type:2}},To=function(e,t){var a=0,n=3,s=[],o=[];return zn(t).forEach(function(u,A){var f=!0;if(A===0?f=u.reduce(function(g,y){if(Nt(y))switch(y.value){case"center":return o.push(ru),!1;case"top":case"left":return o.push(Va),!1;case"right":case"bottom":return o.push(ms),!1}else if(wa(y)||Cs(y))return o.push(y),!1;return g},f):A===1&&(f=u.reduce(function(g,y){if(Nt(y))switch(y.value){case Gp:return a=0,!1;case jp:return a=1,!1;case Yp:case Hp:return n=0,!1;case Pp:return n=1,!1;case Np:return n=2,!1;case zp:case Kp:return n=3,!1}else if(Cs(y)||wa(y))return Array.isArray(n)||(n=[]),n.push(y),!1;return g},f)),f){var m=qr(e,u);s.push(m)}}),{size:n,shape:a,stops:s,position:o,type:2}},kb=function(e){return e.type===1},xb=function(e){return e.type===2},iu={name:"image",parse:function(e,t){if(t.type===22){var a={url:t.value,type:0};return e.cache.addImage(t.value),a}if(t.type===18){var n=qp[t.name];if(typeof n>"u")throw new Error('Attempting to parse an unsupported image function "'+t.name+'"');return n(e,t.values)}throw new Error("Unsupported image type "+t.type)}};function Sb(e){return!(e.type===20&&e.value==="none")&&(e.type!==18||!!qp[e.name])}var qp={"linear-gradient":wb,"-moz-linear-gradient":Io,"-ms-linear-gradient":Io,"-o-linear-gradient":Io,"-webkit-linear-gradient":Io,"radial-gradient":Bb,"-moz-radial-gradient":To,"-ms-radial-gradient":To,"-o-radial-gradient":To,"-webkit-radial-gradient":To,"-webkit-gradient":Cb},Fb={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(e,t){if(t.length===0)return[];var a=t[0];return a.type===20&&a.value==="none"?[]:t.filter(function(n){return bl(n)&&Sb(n)}).map(function(n){return iu.parse(e,n)})}},Eb={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map(function(a){if(Nt(a))switch(a.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Ub={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(e,t){return zn(t).map(function(a){return a.filter(wa)}).map(Ip)}},$b={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(e,t){return zn(t).map(function(a){return a.filter(Nt).map(function(n){return n.value}).join(" ")}).map(Db)}},Db=function(e){switch(e){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},gl;(function(e){e.AUTO="auto",e.CONTAIN="contain",e.COVER="cover"})(gl||(gl={}));var Qb={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(e,t){return zn(t).map(function(a){return a.filter(Ib)})}},Ib=function(e){return Nt(e)||wa(e)},Wr=function(e){return{name:"border-"+e+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},Tb=Wr("top"),Vb=Wr("right"),Mb=Wr("bottom"),Lb=Wr("left"),Xr=function(e){return{name:"border-radius-"+e,initialValue:"0 0",prefix:!1,type:1,parse:function(t,a){return Ip(a.filter(wa))}}},Rb=Xr("top-left"),Ob=Xr("top-right"),Hb=Xr("bottom-right"),Pb=Xr("bottom-left"),Jr=function(e){return{name:"border-"+e+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(t,a){switch(a){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},Nb=Jr("top"),Kb=Jr("right"),Gb=Jr("bottom"),jb=Jr("left"),Zr=function(e){return{name:"border-"+e+"-width",initialValue:"0",type:0,prefix:!1,parse:function(t,a){return po(a)?a.number:0}}},zb=Zr("top"),Yb=Zr("right"),qb=Zr("bottom"),Wb=Zr("left"),Xb={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Jb={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(e,t){switch(t){case"rtl":return 1;case"ltr":default:return 0}}},Zb={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(e,t){return t.filter(Nt).reduce(function(a,n){return a|e0(n.value)},0)}},e0=function(e){switch(e){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},t0={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},a0={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(e,t){return t.type===20&&t.value==="normal"?0:t.type===17||t.type===15?t.number:0}},pr;(function(e){e.NORMAL="normal",e.STRICT="strict"})(pr||(pr={}));var n0={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"strict":return pr.STRICT;case"normal":default:return pr.NORMAL}}},s0={name:"line-height",initialValue:"normal",prefix:!1,type:4},gc=function(e,t){return Nt(e)&&e.value==="normal"?1.2*t:e.type===17?t*e.number:wa(e)?Xt(e,t):t},l0={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(e,t){return t.type===20&&t.value==="none"?null:iu.parse(e,t)}},o0={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(e,t){switch(t){case"inside":return 0;case"outside":default:return 1}}},_d={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},ei=function(e){return{name:"margin-"+e,initialValue:"0",prefix:!1,type:4}},r0=ei("top"),i0=ei("right"),d0=ei("bottom"),u0=ei("left"),c0={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(e,t){return t.filter(Nt).map(function(a){switch(a.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},A0={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"break-word":return"break-word";case"normal":default:return"normal"}}},ti=function(e){return{name:"padding-"+e,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},p0=ti("top"),f0=ti("right"),m0=ti("bottom"),h0=ti("left"),_0={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(e,t){switch(t){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},g0={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(e,t){switch(t){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},v0={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return t.length===1&&hd(t[0],"none")?[]:zn(t).map(function(a){for(var n={color:Jn.TRANSPARENT,offsetX:Va,offsetY:Va,blur:Va},s=0,o=0;o"u")throw new Error('Attempting to parse an unsupported transform function "'+t.name+'"');return a(t.values)}return null}},w0=function(e){var t=e.filter(function(a){return a.type===17}).map(function(a){return a.number});return t.length===6?t:null},C0=function(e){var t=e.filter(function(f){return f.type===17}).map(function(f){return f.number}),a=t[0],n=t[1];t[2],t[3];var s=t[4],o=t[5];t[6],t[7],t[8],t[9],t[10],t[11];var u=t[12],A=t[13];return t[14],t[15],t.length===16?[a,n,s,o,u,A]:null},B0={matrix:w0,matrix3d:C0},vc={type:16,number:50,flags:Ao},k0=[vc,vc],x0={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(e,t){var a=t.filter(wa);return a.length!==2?k0:[a[0],a[1]]}},S0={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},zl;(function(e){e.NORMAL="normal",e.BREAK_ALL="break-all",e.KEEP_ALL="keep-all"})(zl||(zl={}));var F0={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"break-all":return zl.BREAK_ALL;case"keep-all":return zl.KEEP_ALL;case"normal":default:return zl.NORMAL}}},E0={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(e,t){if(t.type===20)return{auto:!0,order:0};if(kl(t))return{auto:!1,order:t.number};throw new Error("Invalid z-index number parsed")}},Wp={name:"time",parse:function(e,t){if(t.type===15)switch(t.unit.toLowerCase()){case"s":return 1e3*t.number;case"ms":return t.number}throw new Error("Unsupported time type")}},U0={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(e,t){return kl(t)?t.number:1}},$0={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},D0={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(e,t){return t.filter(Nt).map(function(a){switch(a.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(a){return a!==0})}},Q0={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(e,t){var a=[],n=[];return t.forEach(function(s){switch(s.type){case 20:case 0:a.push(s.value);break;case 17:a.push(s.number.toString());break;case 4:n.push(a.join(" ")),a.length=0;break}}),a.length&&n.push(a.join(" ")),n.map(function(s){return s.indexOf(" ")===-1?s:"'"+s+"'"})}},I0={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},T0={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(e,t){if(kl(t))return t.number;if(Nt(t))switch(t.value){case"bold":return 700;case"normal":default:return 400}return 400}},V0={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return t.filter(Nt).map(function(a){return a.value})}},M0={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},xa=function(e,t){return(e&t)!==0},L0={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(e,t){if(t.length===0)return[];var a=t[0];return a.type===20&&a.value==="none"?[]:t}},R0={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(t.length===0)return null;var a=t[0];if(a.type===20&&a.value==="none")return null;for(var n=[],s=t.filter(Qp),o=0;o1?1:0],this.overflowWrap=ze(t,A0,a.overflowWrap),this.paddingTop=ze(t,p0,a.paddingTop),this.paddingRight=ze(t,f0,a.paddingRight),this.paddingBottom=ze(t,m0,a.paddingBottom),this.paddingLeft=ze(t,h0,a.paddingLeft),this.paintOrder=ze(t,K0,a.paintOrder),this.position=ze(t,g0,a.position),this.textAlign=ze(t,_0,a.textAlign),this.textDecorationColor=ze(t,$0,(n=a.textDecorationColor)!==null&&n!==void 0?n:a.color),this.textDecorationLine=ze(t,D0,(s=a.textDecorationLine)!==null&&s!==void 0?s:a.textDecoration),this.textShadow=ze(t,v0,a.textShadow),this.textTransform=ze(t,y0,a.textTransform),this.transform=ze(t,b0,a.transform),this.transformOrigin=ze(t,x0,a.transformOrigin),this.visibility=ze(t,S0,a.visibility),this.webkitTextStrokeColor=ze(t,G0,a.webkitTextStrokeColor),this.webkitTextStrokeWidth=ze(t,j0,a.webkitTextStrokeWidth),this.wordBreak=ze(t,F0,a.wordBreak),this.zIndex=ze(t,E0,a.zIndex)}return e.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},e.prototype.isTransparent=function(){return ws(this.backgroundColor)},e.prototype.isTransformed=function(){return this.transform!==null},e.prototype.isPositioned=function(){return this.position!==0},e.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},e.prototype.isFloating=function(){return this.float!==0},e.prototype.isInlineLevel=function(){return xa(this.display,4)||xa(this.display,33554432)||xa(this.display,268435456)||xa(this.display,536870912)||xa(this.display,67108864)||xa(this.display,134217728)},e}(),Y0=function(){function e(t,a){this.content=ze(t,L0,a.content),this.quotes=ze(t,P0,a.quotes)}return e}(),bc=function(){function e(t,a){this.counterIncrement=ze(t,R0,a.counterIncrement),this.counterReset=ze(t,O0,a.counterReset)}return e}(),ze=function(e,t,a){var n=new $p,s=a!==null&&typeof a<"u"?a.toString():t.initialValue;n.write(s);var o=new Dp(n.read());switch(t.type){case 2:var u=o.parseComponentValue();return t.parse(e,Nt(u)?u.value:t.initialValue);case 0:return t.parse(e,o.parseComponentValue());case 1:return t.parse(e,o.parseComponentValues());case 4:return o.parseComponentValue();case 3:switch(t.format){case"angle":return Yr.parse(e,o.parseComponentValue());case"color":return bs.parse(e,o.parseComponentValue());case"image":return iu.parse(e,o.parseComponentValue());case"length":var A=o.parseComponentValue();return Cs(A)?A:Va;case"length-percentage":var f=o.parseComponentValue();return wa(f)?f:Va;case"time":return Wp.parse(e,o.parseComponentValue())}break}},q0="data-html2canvas-debug",W0=function(e){var t=e.getAttribute(q0);switch(t){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},gd=function(e,t){var a=W0(e);return a===1||t===a},Yn=function(){function e(t,a){if(this.context=t,this.textNodes=[],this.elements=[],this.flags=0,gd(a,3))debugger;this.styles=new z0(t,window.getComputedStyle(a,null)),bd(a)&&(this.styles.animationDuration.some(function(n){return n>0})&&(a.style.animationDuration="0s"),this.styles.transform!==null&&(a.style.transform="none")),this.bounds=jr(this.context,a),gd(a,4)&&(this.flags|=16)}return e}(),X0="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAA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IAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZ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IAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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789+/",Rl=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Vo=0;Vo>4,g[s++]=(u&15)<<4|A>>2,g[s++]=(A&3)<<6|f&63;return m},Z0=function(e){for(var t=e.length,a=[],n=0;n>Rs,aw=1<>Rs,sw=Xp+nw,lw=sw,ow=32,rw=lw+ow,iw=65536>>du,dw=1<=0){if(t<55296||t>56319&&t<=65535)return a=this.index[t>>Rs],a=(a<>Rs)],a=(a<>du),a=this.index[a],a+=t>>Rs&uw,a=this.index[a],a=(a<"u"?[]:new Uint8Array(256);for(var Mo=0;Mo=55296&&s<=56319&&a>10)+55296,u%1024+56320)),(s+1===a||n.length>16384)&&(o+=String.fromCharCode.apply(String,n),n.length=0)}return o},vw=Aw(X0),hn="×",xi="÷",yw=function(e){return vw.get(e)},bw=function(e,t,a){var n=a-2,s=t[n],o=t[a-1],u=t[a];if(o===bi&&u===wi)return hn;if(o===bi||o===wi||o===kc||u===bi||u===wi||u===kc)return xi;if(o===Sc&&[Sc,Ci,Fc,Ec].indexOf(u)!==-1||(o===Fc||o===Ci)&&(u===Ci||u===Bi)||(o===Ec||o===Bi)&&u===Bi||u===Uc||u===xc||u===hw||o===mw)return hn;if(o===Uc&&u===$c){for(;s===xc;)s=t[--n];if(s===$c)return hn}if(o===ki&&u===ki){for(var A=0;s===ki;)A++,s=t[--n];if(A%2===0)return hn}return xi},ww=function(e){var t=_w(e),a=t.length,n=0,s=0,o=t.map(yw);return{next:function(){if(n>=a)return{done:!0,value:null};for(var u=hn;nu.x||g.y>u.y;return u=g,m===0?!0:y});return e.body.removeChild(t),A},xw=function(){return typeof new Image().crossOrigin<"u"},Sw=function(){return typeof new XMLHttpRequest().responseType=="string"},Fw=function(e){var t=new Image,a=e.createElement("canvas"),n=a.getContext("2d");if(!n)return!1;t.src="data:image/svg+xml,";try{n.drawImage(t,0,0),a.toDataURL()}catch{return!1}return!0},Dc=function(e){return e[0]===0&&e[1]===255&&e[2]===0&&e[3]===255},Ew=function(e){var t=e.createElement("canvas"),a=100;t.width=a,t.height=a;var n=t.getContext("2d");if(!n)return Promise.reject(!1);n.fillStyle="rgb(0, 255, 0)",n.fillRect(0,0,a,a);var s=new Image,o=t.toDataURL();s.src=o;var u=vd(a,a,0,0,s);return n.fillStyle="red",n.fillRect(0,0,a,a),Qc(u).then(function(A){n.drawImage(A,0,0);var f=n.getImageData(0,0,a,a).data;n.fillStyle="red",n.fillRect(0,0,a,a);var m=e.createElement("div");return m.style.backgroundImage="url("+o+")",m.style.height=a+"px",Dc(f)?Qc(vd(a,a,0,0,m)):Promise.reject(!1)}).then(function(A){return n.drawImage(A,0,0),Dc(n.getImageData(0,0,a,a).data)}).catch(function(){return!1})},vd=function(e,t,a,n,s){var o="http://www.w3.org/2000/svg",u=document.createElementNS(o,"svg"),A=document.createElementNS(o,"foreignObject");return u.setAttributeNS(null,"width",e.toString()),u.setAttributeNS(null,"height",t.toString()),A.setAttributeNS(null,"width","100%"),A.setAttributeNS(null,"height","100%"),A.setAttributeNS(null,"x",a.toString()),A.setAttributeNS(null,"y",n.toString()),A.setAttributeNS(null,"externalResourcesRequired","true"),u.appendChild(A),A.appendChild(s),u},Qc=function(e){return new Promise(function(t,a){var n=new Image;n.onload=function(){return t(n)},n.onerror=a,n.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(e))})},Ta={get SUPPORT_RANGE_BOUNDS(){var e=Bw(document);return Object.defineProperty(Ta,"SUPPORT_RANGE_BOUNDS",{value:e}),e},get SUPPORT_WORD_BREAKING(){var e=Ta.SUPPORT_RANGE_BOUNDS&&kw(document);return Object.defineProperty(Ta,"SUPPORT_WORD_BREAKING",{value:e}),e},get SUPPORT_SVG_DRAWING(){var e=Fw(document);return Object.defineProperty(Ta,"SUPPORT_SVG_DRAWING",{value:e}),e},get SUPPORT_FOREIGNOBJECT_DRAWING(){var e=typeof Array.from=="function"&&typeof window.fetch=="function"?Ew(document):Promise.resolve(!1);return Object.defineProperty(Ta,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:e}),e},get SUPPORT_CORS_IMAGES(){var e=xw();return Object.defineProperty(Ta,"SUPPORT_CORS_IMAGES",{value:e}),e},get SUPPORT_RESPONSE_TYPE(){var e=Sw();return Object.defineProperty(Ta,"SUPPORT_RESPONSE_TYPE",{value:e}),e},get SUPPORT_CORS_XHR(){var e="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Ta,"SUPPORT_CORS_XHR",{value:e}),e},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var e=!!(typeof Intl<"u"&&Intl.Segmenter);return Object.defineProperty(Ta,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:e}),e}},Yl=function(){function e(t,a){this.text=t,this.bounds=a}return e}(),Uw=function(e,t,a,n){var s=Qw(t,a),o=[],u=0;return s.forEach(function(A){if(a.textDecorationLine.length||A.trim().length>0)if(Ta.SUPPORT_RANGE_BOUNDS){var f=Ic(n,u,A.length).getClientRects();if(f.length>1){var m=uu(A),g=0;m.forEach(function(v){o.push(new Yl(v,as.fromDOMRectList(e,Ic(n,g+u,v.length).getClientRects()))),g+=v.length})}else o.push(new Yl(A,as.fromDOMRectList(e,f)))}else{var y=n.splitText(A.length);o.push(new Yl(A,$w(e,n))),n=y}else Ta.SUPPORT_RANGE_BOUNDS||(n=n.splitText(A.length));u+=A.length}),o},$w=function(e,t){var a=t.ownerDocument;if(a){var n=a.createElement("html2canvaswrapper");n.appendChild(t.cloneNode(!0));var s=t.parentNode;if(s){s.replaceChild(n,t);var o=jr(e,n);return n.firstChild&&s.replaceChild(n.firstChild,n),o}}return as.EMPTY},Ic=function(e,t,a){var n=e.ownerDocument;if(!n)throw new Error("Node has no owner document");var s=n.createRange();return s.setStart(e,t),s.setEnd(e,t+a),s},uu=function(e){if(Ta.SUPPORT_NATIVE_TEXT_SEGMENTATION){var t=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(t.segment(e)).map(function(a){return a.segment})}return Cw(e)},Dw=function(e,t){if(Ta.SUPPORT_NATIVE_TEXT_SEGMENTATION){var a=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(a.segment(e)).map(function(n){return n.segment})}return Tw(e,t)},Qw=function(e,t){return t.letterSpacing!==0?uu(e):Dw(e,t)},Iw=[32,160,4961,65792,65793,4153,4241],Tw=function(e,t){for(var a=iy(e,{lineBreak:t.lineBreak,wordBreak:t.overflowWrap==="break-word"?"break-word":t.wordBreak}),n=[],s,o=function(){if(s.value){var u=s.value.slice(),A=zr(u),f="";A.forEach(function(m){Iw.indexOf(m)===-1?f+=ma(m):(f.length&&n.push(f),n.push(ma(m)),f="")}),f.length&&n.push(f)}};!(s=a.next()).done;)o();return n},Vw=function(){function e(t,a,n){this.text=Mw(a.data,n.textTransform),this.textBounds=Uw(t,this.text,n,a)}return e}(),Mw=function(e,t){switch(t){case 1:return e.toLowerCase();case 3:return e.replace(Lw,Rw);case 2:return e.toUpperCase();default:return e}},Lw=/(^|\s|:|-|\(|\))([a-z])/g,Rw=function(e,t,a){return e.length>0?t+a.toUpperCase():e},Jp=function(e){Qn(t,e);function t(a,n){var s=e.call(this,a,n)||this;return s.src=n.currentSrc||n.src,s.intrinsicWidth=n.naturalWidth,s.intrinsicHeight=n.naturalHeight,s.context.cache.addImage(s.src),s}return t}(Yn),Zp=function(e){Qn(t,e);function t(a,n){var s=e.call(this,a,n)||this;return s.canvas=n,s.intrinsicWidth=n.width,s.intrinsicHeight=n.height,s}return t}(Yn),ef=function(e){Qn(t,e);function t(a,n){var s=e.call(this,a,n)||this,o=new XMLSerializer,u=jr(a,n);return n.setAttribute("width",u.width+"px"),n.setAttribute("height",u.height+"px"),s.svg="data:image/svg+xml,"+encodeURIComponent(o.serializeToString(n)),s.intrinsicWidth=n.width.baseVal.value,s.intrinsicHeight=n.height.baseVal.value,s.context.cache.addImage(s.svg),s}return t}(Yn),tf=function(e){Qn(t,e);function t(a,n){var s=e.call(this,a,n)||this;return s.value=n.value,s}return t}(Yn),yd=function(e){Qn(t,e);function t(a,n){var s=e.call(this,a,n)||this;return s.start=n.start,s.reversed=typeof n.reversed=="boolean"&&n.reversed===!0,s}return t}(Yn),Ow=[{type:15,flags:0,unit:"px",number:3}],Hw=[{type:16,flags:0,number:50}],Pw=function(e){return e.width>e.height?new as(e.left+(e.width-e.height)/2,e.top,e.height,e.height):e.width0)a.textNodes.push(new Vw(e,s,a.styles));else if(fl(s))if(Af(s)&&s.assignedNodes)s.assignedNodes().forEach(function(A){return Zo(e,A,a,n)});else{var u=lf(e,s);u.styles.isVisible()&&(jw(s,u,n)?u.flags|=4:zw(u.styles)&&(u.flags|=2),Gw.indexOf(s.tagName)!==-1&&(u.flags|=8),a.elements.push(u),s.slot,s.shadowRoot?Zo(e,s.shadowRoot,u,n):!hr(s)&&!df(s)&&!_r(s)&&Zo(e,s,u,n))}},lf=function(e,t){return wd(t)?new Jp(e,t):uf(t)?new Zp(e,t):df(t)?new ef(e,t):Yw(t)?new tf(e,t):qw(t)?new yd(e,t):Ww(t)?new cu(e,t):_r(t)?new af(e,t):hr(t)?new nf(e,t):cf(t)?new sf(e,t):new Yn(e,t)},of=function(e,t){var a=lf(e,t);return a.flags|=4,Zo(e,t,a,a),a},jw=function(e,t,a){return t.styles.isPositionedWithZIndex()||t.styles.opacity<1||t.styles.isTransformed()||Au(e)&&a.styles.isTransparent()},zw=function(e){return e.isPositioned()||e.isFloating()},rf=function(e){return e.nodeType===Node.TEXT_NODE},fl=function(e){return e.nodeType===Node.ELEMENT_NODE},bd=function(e){return fl(e)&&typeof e.style<"u"&&!er(e)},er=function(e){return typeof e.className=="object"},Yw=function(e){return e.tagName==="LI"},qw=function(e){return e.tagName==="OL"},Ww=function(e){return e.tagName==="INPUT"},Xw=function(e){return e.tagName==="HTML"},df=function(e){return e.tagName==="svg"},Au=function(e){return e.tagName==="BODY"},uf=function(e){return e.tagName==="CANVAS"},Vc=function(e){return e.tagName==="VIDEO"},wd=function(e){return e.tagName==="IMG"},cf=function(e){return e.tagName==="IFRAME"},Mc=function(e){return e.tagName==="STYLE"},Jw=function(e){return e.tagName==="SCRIPT"},hr=function(e){return e.tagName==="TEXTAREA"},_r=function(e){return e.tagName==="SELECT"},Af=function(e){return e.tagName==="SLOT"},Lc=function(e){return e.tagName.indexOf("-")>0},Zw=function(){function e(){this.counters={}}return e.prototype.getCounterValue=function(t){var a=this.counters[t];return a&&a.length?a[a.length-1]:1},e.prototype.getCounterValues=function(t){var a=this.counters[t];return a||[]},e.prototype.pop=function(t){var a=this;t.forEach(function(n){return a.counters[n].pop()})},e.prototype.parse=function(t){var a=this,n=t.counterIncrement,s=t.counterReset,o=!0;n!==null&&n.forEach(function(A){var f=a.counters[A.counter];f&&A.increment!==0&&(o=!1,f.length||f.push(1),f[Math.max(0,f.length-1)]+=A.increment)});var u=[];return o&&s.forEach(function(A){var f=a.counters[A.counter];u.push(A.counter),f||(f=a.counters[A.counter]=[]),f.push(A.reset)}),u},e}(),Rc={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},Oc={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},eC={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},tC={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},tl=function(e,t,a,n,s,o){return ea?io(e,s,o.length>0):n.integers.reduce(function(u,A,f){for(;e>=A;)e-=A,u+=n.values[f];return u},"")+o},pf=function(e,t,a,n){var s="";do a||e--,s=n(e)+s,e/=t;while(e*t>=t);return s},fa=function(e,t,a,n,s){var o=a-t+1;return(e<0?"-":"")+(pf(Math.abs(e),o,n,function(u){return ma(Math.floor(u%o)+t)})+s)},Us=function(e,t,a){a===void 0&&(a=". ");var n=t.length;return pf(Math.abs(e),n,!1,function(s){return t[Math.floor(s%n)]})+a},il=1,ds=2,us=4,Ol=8,Xn=function(e,t,a,n,s,o){if(e<-9999||e>9999)return io(e,4,s.length>0);var u=Math.abs(e),A=s;if(u===0)return t[0]+A;for(var f=0;u>0&&f<=4;f++){var m=u%10;m===0&&xa(o,il)&&A!==""?A=t[m]+A:m>1||m===1&&f===0||m===1&&f===1&&xa(o,ds)||m===1&&f===1&&xa(o,us)&&e>100||m===1&&f>1&&xa(o,Ol)?A=t[m]+(f>0?a[f-1]:"")+A:m===1&&f>0&&(A=a[f-1]+A),u=Math.floor(u/10)}return(e<0?n:"")+A},Hc="十百千萬",Pc="拾佰仟萬",Nc="マイナス",Si="마이너스",io=function(e,t,a){var n=a?". ":"",s=a?"、":"",o=a?", ":"",u=a?" ":"";switch(t){case 0:return"•"+u;case 1:return"◦"+u;case 2:return"◾"+u;case 5:var A=fa(e,48,57,!0,n);return A.length<4?"0"+A:A;case 4:return Us(e,"〇一二三四五六七八九",s);case 6:return tl(e,1,3999,Rc,3,n).toLowerCase();case 7:return tl(e,1,3999,Rc,3,n);case 8:return fa(e,945,969,!1,n);case 9:return fa(e,97,122,!1,n);case 10:return fa(e,65,90,!1,n);case 11:return fa(e,1632,1641,!0,n);case 12:case 49:return tl(e,1,9999,Oc,3,n);case 35:return tl(e,1,9999,Oc,3,n).toLowerCase();case 13:return fa(e,2534,2543,!0,n);case 14:case 30:return fa(e,6112,6121,!0,n);case 15:return Us(e,"子丑寅卯辰巳午未申酉戌亥",s);case 16:return Us(e,"甲乙丙丁戊己庚辛壬癸",s);case 17:case 48:return Xn(e,"零一二三四五六七八九",Hc,"負",s,ds|us|Ol);case 47:return Xn(e,"零壹貳參肆伍陸柒捌玖",Pc,"負",s,il|ds|us|Ol);case 42:return Xn(e,"零一二三四五六七八九",Hc,"负",s,ds|us|Ol);case 41:return Xn(e,"零壹贰叁肆伍陆柒捌玖",Pc,"负",s,il|ds|us|Ol);case 26:return Xn(e,"〇一二三四五六七八九","十百千万",Nc,s,0);case 25:return Xn(e,"零壱弐参四伍六七八九","拾百千万",Nc,s,il|ds|us);case 31:return Xn(e,"영일이삼사오육칠팔구","십백천만",Si,o,il|ds|us);case 33:return Xn(e,"零一二三四五六七八九","十百千萬",Si,o,0);case 32:return Xn(e,"零壹貳參四五六七八九","拾百千",Si,o,il|ds|us);case 18:return fa(e,2406,2415,!0,n);case 20:return tl(e,1,19999,tC,3,n);case 21:return fa(e,2790,2799,!0,n);case 22:return fa(e,2662,2671,!0,n);case 22:return tl(e,1,10999,eC,3,n);case 23:return Us(e,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return Us(e,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return fa(e,3302,3311,!0,n);case 28:return Us(e,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",s);case 29:return Us(e,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",s);case 34:return fa(e,3792,3801,!0,n);case 37:return fa(e,6160,6169,!0,n);case 38:return fa(e,4160,4169,!0,n);case 39:return fa(e,2918,2927,!0,n);case 40:return fa(e,1776,1785,!0,n);case 43:return fa(e,3046,3055,!0,n);case 44:return fa(e,3174,3183,!0,n);case 45:return fa(e,3664,3673,!0,n);case 46:return fa(e,3872,3881,!0,n);case 3:default:return fa(e,48,57,!0,n)}},ff="data-html2canvas-ignore",Kc=function(){function e(t,a,n){if(this.context=t,this.options=n,this.scrolledElements=[],this.referenceElement=a,this.counters=new Zw,this.quoteDepth=0,!a.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(a.ownerDocument.documentElement,!1)}return e.prototype.toIFrame=function(t,a){var n=this,s=aC(t,a);if(!s.contentWindow)return Promise.reject("Unable to find iframe window");var o=t.defaultView.pageXOffset,u=t.defaultView.pageYOffset,A=s.contentWindow,f=A.document,m=lC(s).then(function(){return Ga(n,void 0,void 0,function(){var g,y;return Ra(this,function(v){switch(v.label){case 0:return this.scrolledElements.forEach(dC),A&&(A.scrollTo(a.left,a.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(A.scrollY!==a.top||A.scrollX!==a.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(A.scrollX-a.left,A.scrollY-a.top,0,0))),g=this.options.onclone,y=this.clonedReferenceElement,typeof y>"u"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:f.fonts&&f.fonts.ready?[4,f.fonts.ready]:[3,2];case 1:v.sent(),v.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,sC(f)]:[3,4];case 3:v.sent(),v.label=4;case 4:return typeof g=="function"?[2,Promise.resolve().then(function(){return g(f,y)}).then(function(){return s})]:[2,s]}})})});return f.open(),f.write(rC(document.doctype)+""),iC(this.referenceElement.ownerDocument,o,u),f.replaceChild(f.adoptNode(this.documentElement),f.documentElement),f.close(),m},e.prototype.createElementClone=function(t){if(gd(t,2))debugger;if(uf(t))return this.createCanvasClone(t);if(Vc(t))return this.createVideoClone(t);if(Mc(t))return this.createStyleClone(t);var a=t.cloneNode(!1);return wd(a)&&(wd(t)&&t.currentSrc&&t.currentSrc!==t.src&&(a.src=t.currentSrc,a.srcset=""),a.loading==="lazy"&&(a.loading="eager")),Lc(a)?this.createCustomElementClone(a):a},e.prototype.createCustomElementClone=function(t){var a=document.createElement("html2canvascustomelement");return Fi(t.style,a),a},e.prototype.createStyleClone=function(t){try{var a=t.sheet;if(a&&a.cssRules){var n=[].slice.call(a.cssRules,0).reduce(function(o,u){return u&&typeof u.cssText=="string"?o+u.cssText:o},""),s=t.cloneNode(!1);return s.textContent=n,s}}catch(o){if(this.context.logger.error("Unable to access cssRules property",o),o.name!=="SecurityError")throw o}return t.cloneNode(!1)},e.prototype.createCanvasClone=function(t){var a;if(this.options.inlineImages&&t.ownerDocument){var n=t.ownerDocument.createElement("img");try{return n.src=t.toDataURL(),n}catch{this.context.logger.info("Unable to inline canvas contents, canvas is tainted",t)}}var s=t.cloneNode(!1);try{s.width=t.width,s.height=t.height;var o=t.getContext("2d"),u=s.getContext("2d");if(u)if(!this.options.allowTaint&&o)u.putImageData(o.getImageData(0,0,t.width,t.height),0,0);else{var A=(a=t.getContext("webgl2"))!==null&&a!==void 0?a:t.getContext("webgl");if(A){var f=A.getContextAttributes();(f==null?void 0:f.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",t)}u.drawImage(t,0,0)}return s}catch{this.context.logger.info("Unable to clone canvas as it is tainted",t)}return s},e.prototype.createVideoClone=function(t){var a=t.ownerDocument.createElement("canvas");a.width=t.offsetWidth,a.height=t.offsetHeight;var n=a.getContext("2d");try{return n&&(n.drawImage(t,0,0,a.width,a.height),this.options.allowTaint||n.getImageData(0,0,a.width,a.height)),a}catch{this.context.logger.info("Unable to clone video as it is tainted",t)}var s=t.ownerDocument.createElement("canvas");return s.width=t.offsetWidth,s.height=t.offsetHeight,s},e.prototype.appendChildNode=function(t,a,n){(!fl(a)||!Jw(a)&&!a.hasAttribute(ff)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(a)))&&(!this.options.copyStyles||!fl(a)||!Mc(a))&&t.appendChild(this.cloneNode(a,n))},e.prototype.cloneChildNodes=function(t,a,n){for(var s=this,o=t.shadowRoot?t.shadowRoot.firstChild:t.firstChild;o;o=o.nextSibling)if(fl(o)&&Af(o)&&typeof o.assignedNodes=="function"){var u=o.assignedNodes();u.length&&u.forEach(function(A){return s.appendChildNode(a,A,n)})}else this.appendChildNode(a,o,n)},e.prototype.cloneNode=function(t,a){if(rf(t))return document.createTextNode(t.data);if(!t.ownerDocument)return t.cloneNode(!1);var n=t.ownerDocument.defaultView;if(n&&fl(t)&&(bd(t)||er(t))){var s=this.createElementClone(t);s.style.transitionProperty="none";var o=n.getComputedStyle(t),u=n.getComputedStyle(t,":before"),A=n.getComputedStyle(t,":after");this.referenceElement===t&&bd(s)&&(this.clonedReferenceElement=s),Au(s)&&AC(s);var f=this.counters.parse(new bc(this.context,o)),m=this.resolvePseudoContent(t,s,u,ql.BEFORE);Lc(t)&&(a=!0),Vc(t)||this.cloneChildNodes(t,s,a),m&&s.insertBefore(m,s.firstChild);var g=this.resolvePseudoContent(t,s,A,ql.AFTER);return g&&s.appendChild(g),this.counters.pop(f),(o&&(this.options.copyStyles||er(t))&&!cf(t)||a)&&Fi(o,s),(t.scrollTop!==0||t.scrollLeft!==0)&&this.scrolledElements.push([s,t.scrollLeft,t.scrollTop]),(hr(t)||_r(t))&&(hr(s)||_r(s))&&(s.value=t.value),s}return t.cloneNode(!1)},e.prototype.resolvePseudoContent=function(t,a,n,s){var o=this;if(n){var u=n.content,A=a.ownerDocument;if(!(!A||!u||u==="none"||u==="-moz-alt-content"||n.display==="none")){this.counters.parse(new bc(this.context,n));var f=new Y0(this.context,n),m=A.createElement("html2canvaspseudoelement");Fi(n,m),f.content.forEach(function(y){if(y.type===0)m.appendChild(A.createTextNode(y.value));else if(y.type===22){var v=A.createElement("img");v.src=y.value,v.style.opacity="1",m.appendChild(v)}else if(y.type===18){if(y.name==="attr"){var B=y.values.filter(Nt);B.length&&m.appendChild(A.createTextNode(t.getAttribute(B[0].value)||""))}else if(y.name==="counter"){var b=y.values.filter(bl),w=b[0],k=b[1];if(w&&Nt(w)){var S=o.counters.getCounterValue(w.value),M=k&&Nt(k)?_d.parse(o.context,k.value):3;m.appendChild(A.createTextNode(io(S,M,!1)))}}else if(y.name==="counters"){var $=y.values.filter(bl),w=$[0],F=$[1],k=$[2];if(w&&Nt(w)){var L=o.counters.getCounterValues(w.value),Q=k&&Nt(k)?_d.parse(o.context,k.value):3,T=F&&F.type===0?F.value:"",D=L.map(function(O){return io(O,Q,!1)}).join(T);m.appendChild(A.createTextNode(D))}}}else if(y.type===20)switch(y.value){case"open-quote":m.appendChild(A.createTextNode(yc(f.quotes,o.quoteDepth++,!0)));break;case"close-quote":m.appendChild(A.createTextNode(yc(f.quotes,--o.quoteDepth,!1)));break;default:m.appendChild(A.createTextNode(y.value))}}),m.className=Cd+" "+Bd;var g=s===ql.BEFORE?" "+Cd:" "+Bd;return er(a)?a.className.baseValue+=g:a.className+=g,m}}},e.destroy=function(t){return t.parentNode?(t.parentNode.removeChild(t),!0):!1},e}(),ql;(function(e){e[e.BEFORE=0]="BEFORE",e[e.AFTER=1]="AFTER"})(ql||(ql={}));var aC=function(e,t){var a=e.createElement("iframe");return a.className="html2canvas-container",a.style.visibility="hidden",a.style.position="fixed",a.style.left="-10000px",a.style.top="0px",a.style.border="0",a.width=t.width.toString(),a.height=t.height.toString(),a.scrolling="no",a.setAttribute(ff,"true"),e.body.appendChild(a),a},nC=function(e){return new Promise(function(t){if(e.complete){t();return}if(!e.src){t();return}e.onload=t,e.onerror=t})},sC=function(e){return Promise.all([].slice.call(e.images,0).map(nC))},lC=function(e){return new Promise(function(t,a){var n=e.contentWindow;if(!n)return a("No window assigned for iframe");var s=n.document;n.onload=e.onload=function(){n.onload=e.onload=null;var o=setInterval(function(){s.body.childNodes.length>0&&s.readyState==="complete"&&(clearInterval(o),t(e))},50)}})},oC=["all","d","content"],Fi=function(e,t){for(var a=e.length-1;a>=0;a--){var n=e.item(a);oC.indexOf(n)===-1&&t.style.setProperty(n,e.getPropertyValue(n))}return t},rC=function(e){var t="";return e&&(t+=""),t},iC=function(e,t,a){e&&e.defaultView&&(t!==e.defaultView.pageXOffset||a!==e.defaultView.pageYOffset)&&e.defaultView.scrollTo(t,a)},dC=function(e){var t=e[0],a=e[1],n=e[2];t.scrollLeft=a,t.scrollTop=n},uC=":before",cC=":after",Cd="___html2canvas___pseudoelement_before",Bd="___html2canvas___pseudoelement_after",Gc=`{ content: "" !important; display: none !important; }`,AC=function(e){pC(e,"."+Cd+uC+Gc+` .`+Bd+cC+Gc)},pC=function(e,t){var a=e.ownerDocument;if(a){var n=a.createElement("style");n.textContent=t,e.appendChild(n)}},mf=function(){function e(){}return e.getOrigin=function(t){var a=e._link;return a?(a.href=t,a.href=a.href,a.protocol+a.hostname+a.port):"about:blank"},e.isSameOrigin=function(t){return e.getOrigin(t)===e._origin},e.setContext=function(t){e._link=t.document.createElement("a"),e._origin=e.getOrigin(t.location.href)},e._origin="about:blank",e}(),fC=function(){function e(t,a){this.context=t,this._options=a,this._cache={}}return e.prototype.addImage=function(t){var a=Promise.resolve();return this.has(t)||(Ui(t)||gC(t))&&(this._cache[t]=this.loadImage(t)).catch(function(){}),a},e.prototype.match=function(t){return this._cache[t]},e.prototype.loadImage=function(t){return Ga(this,void 0,void 0,function(){var a,n,s,o,u=this;return Ra(this,function(A){switch(A.label){case 0:return a=mf.isSameOrigin(t),n=!Ei(t)&&this._options.useCORS===!0&&Ta.SUPPORT_CORS_IMAGES&&!a,s=!Ei(t)&&!a&&!Ui(t)&&typeof this._options.proxy=="string"&&Ta.SUPPORT_CORS_XHR&&!n,!a&&this._options.allowTaint===!1&&!Ei(t)&&!Ui(t)&&!s&&!n?[2]:(o=t,s?[4,this.proxy(o)]:[3,2]);case 1:o=A.sent(),A.label=2;case 2:return this.context.logger.debug("Added image "+t.substring(0,256)),[4,new Promise(function(f,m){var g=new Image;g.onload=function(){return f(g)},g.onerror=m,(vC(o)||n)&&(g.crossOrigin="anonymous"),g.src=o,g.complete===!0&&setTimeout(function(){return f(g)},500),u._options.imageTimeout>0&&setTimeout(function(){return m("Timed out ("+u._options.imageTimeout+"ms) loading image")},u._options.imageTimeout)})];case 3:return[2,A.sent()]}})})},e.prototype.has=function(t){return typeof this._cache[t]<"u"},e.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},e.prototype.proxy=function(t){var a=this,n=this._options.proxy;if(!n)throw new Error("No proxy defined");var s=t.substring(0,256);return new Promise(function(o,u){var A=Ta.SUPPORT_RESPONSE_TYPE?"blob":"text",f=new XMLHttpRequest;f.onload=function(){if(f.status===200)if(A==="text")o(f.response);else{var y=new FileReader;y.addEventListener("load",function(){return o(y.result)},!1),y.addEventListener("error",function(v){return u(v)},!1),y.readAsDataURL(f.response)}else u("Failed to proxy resource "+s+" with status code "+f.status)},f.onerror=u;var m=n.indexOf("?")>-1?"&":"?";if(f.open("GET",""+n+m+"url="+encodeURIComponent(t)+"&responseType="+A),A!=="text"&&f instanceof XMLHttpRequest&&(f.responseType=A),a._options.imageTimeout){var g=a._options.imageTimeout;f.timeout=g,f.ontimeout=function(){return u("Timed out ("+g+"ms) proxying "+s)}}f.send()})},e}(),mC=/^data:image\/svg\+xml/i,hC=/^data:image\/.*;base64,/i,_C=/^data:image\/.*/i,gC=function(e){return Ta.SUPPORT_SVG_DRAWING||!yC(e)},Ei=function(e){return _C.test(e)},vC=function(e){return hC.test(e)},Ui=function(e){return e.substr(0,4)==="blob"},yC=function(e){return e.substr(-3).toLowerCase()==="svg"||mC.test(e)},Ne=function(){function e(t,a){this.type=0,this.x=t,this.y=a}return e.prototype.add=function(t,a){return new e(this.x+t,this.y+a)},e}(),al=function(e,t,a){return new Ne(e.x+(t.x-e.x)*a,e.y+(t.y-e.y)*a)},Lo=function(){function e(t,a,n,s){this.type=1,this.start=t,this.startControl=a,this.endControl=n,this.end=s}return e.prototype.subdivide=function(t,a){var n=al(this.start,this.startControl,t),s=al(this.startControl,this.endControl,t),o=al(this.endControl,this.end,t),u=al(n,s,t),A=al(s,o,t),f=al(u,A,t);return a?new e(this.start,n,u,f):new e(f,A,o,this.end)},e.prototype.add=function(t,a){return new e(this.start.add(t,a),this.startControl.add(t,a),this.endControl.add(t,a),this.end.add(t,a))},e.prototype.reverse=function(){return new e(this.end,this.endControl,this.startControl,this.start)},e}(),yn=function(e){return e.type===1},bC=function(){function e(t){var a=t.styles,n=t.bounds,s=Ll(a.borderTopLeftRadius,n.width,n.height),o=s[0],u=s[1],A=Ll(a.borderTopRightRadius,n.width,n.height),f=A[0],m=A[1],g=Ll(a.borderBottomRightRadius,n.width,n.height),y=g[0],v=g[1],B=Ll(a.borderBottomLeftRadius,n.width,n.height),b=B[0],w=B[1],k=[];k.push((o+f)/n.width),k.push((b+y)/n.width),k.push((u+w)/n.height),k.push((m+v)/n.height);var S=Math.max.apply(Math,k);S>1&&(o/=S,u/=S,f/=S,m/=S,y/=S,v/=S,b/=S,w/=S);var M=n.width-f,$=n.height-v,F=n.width-y,L=n.height-w,Q=a.borderTopWidth,T=a.borderRightWidth,D=a.borderBottomWidth,U=a.borderLeftWidth,I=Xt(a.paddingTop,t.bounds.width),O=Xt(a.paddingRight,t.bounds.width),P=Xt(a.paddingBottom,t.bounds.width),K=Xt(a.paddingLeft,t.bounds.width);this.topLeftBorderDoubleOuterBox=o>0||u>0?ea(n.left+U/3,n.top+Q/3,o-U/3,u-Q/3,Vt.TOP_LEFT):new Ne(n.left+U/3,n.top+Q/3),this.topRightBorderDoubleOuterBox=o>0||u>0?ea(n.left+M,n.top+Q/3,f-T/3,m-Q/3,Vt.TOP_RIGHT):new Ne(n.left+n.width-T/3,n.top+Q/3),this.bottomRightBorderDoubleOuterBox=y>0||v>0?ea(n.left+F,n.top+$,y-T/3,v-D/3,Vt.BOTTOM_RIGHT):new Ne(n.left+n.width-T/3,n.top+n.height-D/3),this.bottomLeftBorderDoubleOuterBox=b>0||w>0?ea(n.left+U/3,n.top+L,b-U/3,w-D/3,Vt.BOTTOM_LEFT):new Ne(n.left+U/3,n.top+n.height-D/3),this.topLeftBorderDoubleInnerBox=o>0||u>0?ea(n.left+U*2/3,n.top+Q*2/3,o-U*2/3,u-Q*2/3,Vt.TOP_LEFT):new Ne(n.left+U*2/3,n.top+Q*2/3),this.topRightBorderDoubleInnerBox=o>0||u>0?ea(n.left+M,n.top+Q*2/3,f-T*2/3,m-Q*2/3,Vt.TOP_RIGHT):new Ne(n.left+n.width-T*2/3,n.top+Q*2/3),this.bottomRightBorderDoubleInnerBox=y>0||v>0?ea(n.left+F,n.top+$,y-T*2/3,v-D*2/3,Vt.BOTTOM_RIGHT):new Ne(n.left+n.width-T*2/3,n.top+n.height-D*2/3),this.bottomLeftBorderDoubleInnerBox=b>0||w>0?ea(n.left+U*2/3,n.top+L,b-U*2/3,w-D*2/3,Vt.BOTTOM_LEFT):new Ne(n.left+U*2/3,n.top+n.height-D*2/3),this.topLeftBorderStroke=o>0||u>0?ea(n.left+U/2,n.top+Q/2,o-U/2,u-Q/2,Vt.TOP_LEFT):new Ne(n.left+U/2,n.top+Q/2),this.topRightBorderStroke=o>0||u>0?ea(n.left+M,n.top+Q/2,f-T/2,m-Q/2,Vt.TOP_RIGHT):new Ne(n.left+n.width-T/2,n.top+Q/2),this.bottomRightBorderStroke=y>0||v>0?ea(n.left+F,n.top+$,y-T/2,v-D/2,Vt.BOTTOM_RIGHT):new Ne(n.left+n.width-T/2,n.top+n.height-D/2),this.bottomLeftBorderStroke=b>0||w>0?ea(n.left+U/2,n.top+L,b-U/2,w-D/2,Vt.BOTTOM_LEFT):new Ne(n.left+U/2,n.top+n.height-D/2),this.topLeftBorderBox=o>0||u>0?ea(n.left,n.top,o,u,Vt.TOP_LEFT):new Ne(n.left,n.top),this.topRightBorderBox=f>0||m>0?ea(n.left+M,n.top,f,m,Vt.TOP_RIGHT):new Ne(n.left+n.width,n.top),this.bottomRightBorderBox=y>0||v>0?ea(n.left+F,n.top+$,y,v,Vt.BOTTOM_RIGHT):new Ne(n.left+n.width,n.top+n.height),this.bottomLeftBorderBox=b>0||w>0?ea(n.left,n.top+L,b,w,Vt.BOTTOM_LEFT):new Ne(n.left,n.top+n.height),this.topLeftPaddingBox=o>0||u>0?ea(n.left+U,n.top+Q,Math.max(0,o-U),Math.max(0,u-Q),Vt.TOP_LEFT):new Ne(n.left+U,n.top+Q),this.topRightPaddingBox=f>0||m>0?ea(n.left+Math.min(M,n.width-T),n.top+Q,M>n.width+T?0:Math.max(0,f-T),Math.max(0,m-Q),Vt.TOP_RIGHT):new Ne(n.left+n.width-T,n.top+Q),this.bottomRightPaddingBox=y>0||v>0?ea(n.left+Math.min(F,n.width-U),n.top+Math.min($,n.height-D),Math.max(0,y-T),Math.max(0,v-D),Vt.BOTTOM_RIGHT):new Ne(n.left+n.width-T,n.top+n.height-D),this.bottomLeftPaddingBox=b>0||w>0?ea(n.left+U,n.top+Math.min(L,n.height-D),Math.max(0,b-U),Math.max(0,w-D),Vt.BOTTOM_LEFT):new Ne(n.left+U,n.top+n.height-D),this.topLeftContentBox=o>0||u>0?ea(n.left+U+K,n.top+Q+I,Math.max(0,o-(U+K)),Math.max(0,u-(Q+I)),Vt.TOP_LEFT):new Ne(n.left+U+K,n.top+Q+I),this.topRightContentBox=f>0||m>0?ea(n.left+Math.min(M,n.width+U+K),n.top+Q+I,M>n.width+U+K?0:f-U+K,m-(Q+I),Vt.TOP_RIGHT):new Ne(n.left+n.width-(T+O),n.top+Q+I),this.bottomRightContentBox=y>0||v>0?ea(n.left+Math.min(F,n.width-(U+K)),n.top+Math.min($,n.height+Q+I),Math.max(0,y-(T+O)),v-(D+P),Vt.BOTTOM_RIGHT):new Ne(n.left+n.width-(T+O),n.top+n.height-(D+P)),this.bottomLeftContentBox=b>0||w>0?ea(n.left+U+K,n.top+L,Math.max(0,b-(U+K)),w-(D+P),Vt.BOTTOM_LEFT):new Ne(n.left+U+K,n.top+n.height-(D+P))}return e}(),Vt;(function(e){e[e.TOP_LEFT=0]="TOP_LEFT",e[e.TOP_RIGHT=1]="TOP_RIGHT",e[e.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",e[e.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(Vt||(Vt={}));var ea=function(e,t,a,n,s){var o=4*((Math.sqrt(2)-1)/3),u=a*o,A=n*o,f=e+a,m=t+n;switch(s){case Vt.TOP_LEFT:return new Lo(new Ne(e,m),new Ne(e,m-A),new Ne(f-u,t),new Ne(f,t));case Vt.TOP_RIGHT:return new Lo(new Ne(e,t),new Ne(e+u,t),new Ne(f,m-A),new Ne(f,m));case Vt.BOTTOM_RIGHT:return new Lo(new Ne(f,t),new Ne(f,t+A),new Ne(e+u,m),new Ne(e,m));case Vt.BOTTOM_LEFT:default:return new Lo(new Ne(f,m),new Ne(f-u,m),new Ne(e,t+A),new Ne(e,t))}},gr=function(e){return[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox]},wC=function(e){return[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox]},vr=function(e){return[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox]},CC=function(){function e(t,a,n){this.offsetX=t,this.offsetY=a,this.matrix=n,this.type=0,this.target=6}return e}(),Ro=function(){function e(t,a){this.path=t,this.target=a,this.type=1}return e}(),BC=function(){function e(t){this.opacity=t,this.type=2,this.target=6}return e}(),kC=function(e){return e.type===0},hf=function(e){return e.type===1},xC=function(e){return e.type===2},jc=function(e,t){return e.length===t.length?e.some(function(a,n){return a===t[n]}):!1},SC=function(e,t,a,n,s){return e.map(function(o,u){switch(u){case 0:return o.add(t,a);case 1:return o.add(t+n,a);case 2:return o.add(t+n,a+s);case 3:return o.add(t,a+s)}return o})},_f=function(){function e(t){this.element=t,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return e}(),gf=function(){function e(t,a){if(this.container=t,this.parent=a,this.effects=[],this.curves=new bC(this.container),this.container.styles.opacity<1&&this.effects.push(new BC(this.container.styles.opacity)),this.container.styles.transform!==null){var n=this.container.bounds.left+this.container.styles.transformOrigin[0].number,s=this.container.bounds.top+this.container.styles.transformOrigin[1].number,o=this.container.styles.transform;this.effects.push(new CC(n,s,o))}if(this.container.styles.overflowX!==0){var u=gr(this.curves),A=vr(this.curves);jc(u,A)?this.effects.push(new Ro(u,6)):(this.effects.push(new Ro(u,2)),this.effects.push(new Ro(A,4)))}}return e.prototype.getEffects=function(t){for(var a=[2,3].indexOf(this.container.styles.position)===-1,n=this.parent,s=this.effects.slice(0);n;){var o=n.effects.filter(function(f){return!hf(f)});if(a||n.container.styles.position!==0||!n.parent){if(s.unshift.apply(s,o),a=[2,3].indexOf(n.container.styles.position)===-1,n.container.styles.overflowX!==0){var u=gr(n.curves),A=vr(n.curves);jc(u,A)||s.unshift(new Ro(A,6))}}else s.unshift.apply(s,o);n=n.parent}return s.filter(function(f){return xa(f.target,t)})},e}(),kd=function(e,t,a,n){e.container.elements.forEach(function(s){var o=xa(s.flags,4),u=xa(s.flags,2),A=new gf(s,e);xa(s.styles.display,2048)&&n.push(A);var f=xa(s.flags,8)?[]:n;if(o||u){var m=o||s.styles.isPositioned()?a:t,g=new _f(A);if(s.styles.isPositioned()||s.styles.opacity<1||s.styles.isTransformed()){var y=s.styles.zIndex.order;if(y<0){var v=0;m.negativeZIndex.some(function(b,w){return y>b.element.container.styles.zIndex.order?(v=w,!1):v>0}),m.negativeZIndex.splice(v,0,g)}else if(y>0){var B=0;m.positiveZIndex.some(function(b,w){return y>=b.element.container.styles.zIndex.order?(B=w+1,!1):B>0}),m.positiveZIndex.splice(B,0,g)}else m.zeroOrAutoZIndexOrTransformedOrOpacity.push(g)}else s.styles.isFloating()?m.nonPositionedFloats.push(g):m.nonPositionedInlineLevel.push(g);kd(A,g,o?g:a,f)}else s.styles.isInlineLevel()?t.inlineLevel.push(A):t.nonInlineLevel.push(A),kd(A,t,a,f);xa(s.flags,8)&&vf(s,f)})},vf=function(e,t){for(var a=e instanceof yd?e.start:1,n=e instanceof yd?e.reversed:!1,s=0;s"u"?e[0]:a},TC=function(e,t,a,n,s){var o=t[0],u=t[1],A=a[0],f=a[1];switch(e){case 2:return[new Ne(Math.round(n.left),Math.round(n.top+u)),new Ne(Math.round(n.left+n.width),Math.round(n.top+u)),new Ne(Math.round(n.left+n.width),Math.round(f+n.top+u)),new Ne(Math.round(n.left),Math.round(f+n.top+u))];case 3:return[new Ne(Math.round(n.left+o),Math.round(n.top)),new Ne(Math.round(n.left+o+A),Math.round(n.top)),new Ne(Math.round(n.left+o+A),Math.round(n.height+n.top)),new Ne(Math.round(n.left+o),Math.round(n.height+n.top))];case 1:return[new Ne(Math.round(n.left+o),Math.round(n.top+u)),new Ne(Math.round(n.left+o+A),Math.round(n.top+u)),new Ne(Math.round(n.left+o+A),Math.round(n.top+u+f)),new Ne(Math.round(n.left+o),Math.round(n.top+u+f))];default:return[new Ne(Math.round(s.left),Math.round(s.top)),new Ne(Math.round(s.left+s.width),Math.round(s.top)),new Ne(Math.round(s.left+s.width),Math.round(s.height+s.top)),new Ne(Math.round(s.left),Math.round(s.height+s.top))]}},VC="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Yc="Hidden Text",MC=function(){function e(t){this._data={},this._document=t}return e.prototype.parseMetrics=function(t,a){var n=this._document.createElement("div"),s=this._document.createElement("img"),o=this._document.createElement("span"),u=this._document.body;n.style.visibility="hidden",n.style.fontFamily=t,n.style.fontSize=a,n.style.margin="0",n.style.padding="0",n.style.whiteSpace="nowrap",u.appendChild(n),s.src=VC,s.width=1,s.height=1,s.style.margin="0",s.style.padding="0",s.style.verticalAlign="baseline",o.style.fontFamily=t,o.style.fontSize=a,o.style.margin="0",o.style.padding="0",o.appendChild(this._document.createTextNode(Yc)),n.appendChild(o),n.appendChild(s);var A=s.offsetTop-o.offsetTop+2;n.removeChild(o),n.appendChild(this._document.createTextNode(Yc)),n.style.lineHeight="normal",s.style.verticalAlign="super";var f=s.offsetTop-n.offsetTop+2;return u.removeChild(n),{baseline:A,middle:f}},e.prototype.getMetrics=function(t,a){var n=t+" "+a;return typeof this._data[n]>"u"&&(this._data[n]=this.parseMetrics(t,a)),this._data[n]},e}(),bf=function(){function e(t,a){this.context=t,this.options=a}return e}(),LC=1e4,RC=function(e){Qn(t,e);function t(a,n){var s=e.call(this,a,n)||this;return s._activeEffects=[],s.canvas=n.canvas?n.canvas:document.createElement("canvas"),s.ctx=s.canvas.getContext("2d"),n.canvas||(s.canvas.width=Math.floor(n.width*n.scale),s.canvas.height=Math.floor(n.height*n.scale),s.canvas.style.width=n.width+"px",s.canvas.style.height=n.height+"px"),s.fontMetrics=new MC(document),s.ctx.scale(s.options.scale,s.options.scale),s.ctx.translate(-n.x,-n.y),s.ctx.textBaseline="bottom",s._activeEffects=[],s.context.logger.debug("Canvas renderer initialized ("+n.width+"x"+n.height+") with scale "+n.scale),s}return t.prototype.applyEffects=function(a){for(var n=this;this._activeEffects.length;)this.popEffect();a.forEach(function(s){return n.applyEffect(s)})},t.prototype.applyEffect=function(a){this.ctx.save(),xC(a)&&(this.ctx.globalAlpha=a.opacity),kC(a)&&(this.ctx.translate(a.offsetX,a.offsetY),this.ctx.transform(a.matrix[0],a.matrix[1],a.matrix[2],a.matrix[3],a.matrix[4],a.matrix[5]),this.ctx.translate(-a.offsetX,-a.offsetY)),hf(a)&&(this.path(a.path),this.ctx.clip()),this._activeEffects.push(a)},t.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},t.prototype.renderStack=function(a){return Ga(this,void 0,void 0,function(){var n;return Ra(this,function(s){switch(s.label){case 0:return n=a.element.container.styles,n.isVisible()?[4,this.renderStackContent(a)]:[3,2];case 1:s.sent(),s.label=2;case 2:return[2]}})})},t.prototype.renderNode=function(a){return Ga(this,void 0,void 0,function(){return Ra(this,function(n){switch(n.label){case 0:if(xa(a.container.flags,16))debugger;return a.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(a)]:[3,3];case 1:return n.sent(),[4,this.renderNodeContent(a)];case 2:n.sent(),n.label=3;case 3:return[2]}})})},t.prototype.renderTextWithLetterSpacing=function(a,n,s){var o=this;if(n===0)this.ctx.fillText(a.text,a.bounds.left,a.bounds.top+s);else{var u=uu(a.text);u.reduce(function(A,f){return o.ctx.fillText(f,A,a.bounds.top+s),A+o.ctx.measureText(f).width},a.bounds.left)}},t.prototype.createFontStyle=function(a){var n=a.fontVariant.filter(function(u){return u==="normal"||u==="small-caps"}).join(""),s=KC(a.fontFamily).join(", "),o=po(a.fontSize)?""+a.fontSize.number+a.fontSize.unit:a.fontSize.number+"px";return[[a.fontStyle,n,a.fontWeight,o,s].join(" "),s,o]},t.prototype.renderTextNode=function(a,n){return Ga(this,void 0,void 0,function(){var s,o,u,A,f,m,g,y,v=this;return Ra(this,function(B){return s=this.createFontStyle(n),o=s[0],u=s[1],A=s[2],this.ctx.font=o,this.ctx.direction=n.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",f=this.fontMetrics.getMetrics(u,A),m=f.baseline,g=f.middle,y=n.paintOrder,a.textBounds.forEach(function(b){y.forEach(function(w){switch(w){case 0:v.ctx.fillStyle=Fa(n.color),v.renderTextWithLetterSpacing(b,n.letterSpacing,m);var k=n.textShadow;k.length&&b.text.trim().length&&(k.slice(0).reverse().forEach(function(S){v.ctx.shadowColor=Fa(S.color),v.ctx.shadowOffsetX=S.offsetX.number*v.options.scale,v.ctx.shadowOffsetY=S.offsetY.number*v.options.scale,v.ctx.shadowBlur=S.blur.number,v.renderTextWithLetterSpacing(b,n.letterSpacing,m)}),v.ctx.shadowColor="",v.ctx.shadowOffsetX=0,v.ctx.shadowOffsetY=0,v.ctx.shadowBlur=0),n.textDecorationLine.length&&(v.ctx.fillStyle=Fa(n.textDecorationColor||n.color),n.textDecorationLine.forEach(function(S){switch(S){case 1:v.ctx.fillRect(b.bounds.left,Math.round(b.bounds.top+m),b.bounds.width,1);break;case 2:v.ctx.fillRect(b.bounds.left,Math.round(b.bounds.top),b.bounds.width,1);break;case 3:v.ctx.fillRect(b.bounds.left,Math.ceil(b.bounds.top+g),b.bounds.width,1);break}}));break;case 1:n.webkitTextStrokeWidth&&b.text.trim().length&&(v.ctx.strokeStyle=Fa(n.webkitTextStrokeColor),v.ctx.lineWidth=n.webkitTextStrokeWidth,v.ctx.lineJoin=window.chrome?"miter":"round",v.ctx.strokeText(b.text,b.bounds.left,b.bounds.top+m)),v.ctx.strokeStyle="",v.ctx.lineWidth=0,v.ctx.lineJoin="miter";break}})}),[2]})})},t.prototype.renderReplacedElement=function(a,n,s){if(s&&a.intrinsicWidth>0&&a.intrinsicHeight>0){var o=yr(a),u=vr(n);this.path(u),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(s,0,0,a.intrinsicWidth,a.intrinsicHeight,o.left,o.top,o.width,o.height),this.ctx.restore()}},t.prototype.renderNodeContent=function(a){return Ga(this,void 0,void 0,function(){var n,s,o,u,A,f,M,M,m,g,y,v,F,B,b,L,w,k,S,M,$,F,L;return Ra(this,function(Q){switch(Q.label){case 0:this.applyEffects(a.getEffects(4)),n=a.container,s=a.curves,o=n.styles,u=0,A=n.textNodes,Q.label=1;case 1:return u0&&G>0&&(D=o.ctx.createPattern(L,"repeat"),o.renderRepeat(I,D,Y,N))):xb(g)&&(U=$i(a,n,[null,null,null]),I=U[0],O=U[1],P=U[2],K=U[3],G=U[4],ne=g.position.length===0?[ru]:g.position,Y=Xt(ne[0],K),N=Xt(ne[ne.length-1],G),oe=bb(g,Y,N,K,G),Z=oe[0],le=oe[1],Z>0&&le>0&&(te=o.ctx.createRadialGradient(O+Y,P+N,0,O+Y,P+N,Z),hc(g.stops,Z*2).forEach(function(pe){return te.addColorStop(pe.stop,Fa(pe.color))}),o.path(I),o.ctx.fillStyle=te,Z!==le?(X=a.bounds.left+.5*a.bounds.width,ie=a.bounds.top+.5*a.bounds.height,be=le/Z,se=1/be,o.ctx.save(),o.ctx.translate(X,ie),o.ctx.transform(1,0,0,be,0,0),o.ctx.translate(-X,-ie),o.ctx.fillRect(O,se*(P-ie)+ie,K,G*se),o.ctx.restore()):o.ctx.fill())),ce.label=6;case 6:return n--,[2]}})},o=this,u=0,A=a.styles.backgroundImage.slice(0).reverse(),m.label=1;case 1:return u0?g.style!==2?[3,5]:[4,this.renderDashedDottedBorder(g.color,g.width,A,a.curves,2)]:[3,11]):[3,13];case 4:return v.sent(),[3,11];case 5:return g.style!==3?[3,7]:[4,this.renderDashedDottedBorder(g.color,g.width,A,a.curves,3)];case 6:return v.sent(),[3,11];case 7:return g.style!==4?[3,9]:[4,this.renderDoubleBorder(g.color,g.width,A,a.curves)];case 8:return v.sent(),[3,11];case 9:return[4,this.renderSolidBorder(g.color,A,a.curves)];case 10:v.sent(),v.label=11;case 11:A++,v.label=12;case 12:return f++,[3,3];case 13:return[2]}})})},t.prototype.renderDashedDottedBorder=function(a,n,s,o,u){return Ga(this,void 0,void 0,function(){var A,f,m,g,y,v,B,b,w,k,S,M,$,F,L,Q,L,Q;return Ra(this,function(T){return this.ctx.save(),A=$C(o,s),f=zc(o,s),u===2&&(this.path(f),this.ctx.clip()),yn(f[0])?(m=f[0].start.x,g=f[0].start.y):(m=f[0].x,g=f[0].y),yn(f[1])?(y=f[1].end.x,v=f[1].end.y):(y=f[1].x,v=f[1].y),s===0||s===2?B=Math.abs(m-y):B=Math.abs(g-v),this.ctx.beginPath(),u===3?this.formatPath(A):this.formatPath(f.slice(0,2)),b=n<3?n*3:n*2,w=n<3?n*2:n,u===3&&(b=n,w=n),k=!0,B<=b*2?k=!1:B<=b*2+w?(S=B/(2*b+w),b*=S,w*=S):(M=Math.floor((B+w)/(b+w)),$=(B-M*b)/(M-1),F=(B-(M+1)*b)/M,w=F<=0||Math.abs(w-$){a.targetRef&&qC(a.targetRef,{useCORS:!0,scale:2,backgroundColor:null,scrollY:-window.scrollY}).then(s=>{const o=document.createElement("a");o.download="chart-screenshot.png",o.href=s.toDataURL(),o.click()})},a=e;return(n,s)=>(d(),E(Oe,{tag:"button",onClick:t,size:e.size,title:n.$t("Screenshot")},{default:i(()=>[l(W,{name:"Screenshot"})]),_:1},8,["size","title"]))}};var Di={exports:{}};/** @license * * Colour Palette Generator script. * Copyright (c) 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. You may * obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. * * Furthermore, ColorBrewer colour schemes are covered by the following: * * Copyright (c) 2002 Cynthia Brewer, Mark Harrower, and * The Pennsylvania State University. * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. You may obtain * a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions as source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. The end-user documentation included with the redistribution, if any, * must include the following acknowledgment: "This product includes color * specifications and designs developed by Cynthia Brewer * (http://colorbrewer.org/)." Alternately, this acknowledgment may appear * in the software itself, if and wherever such third-party * acknowledgments normally appear. * * 4. The name "ColorBrewer" must not be used to endorse or promote products * derived from this software without prior written permission. For written * permission, please contact Cynthia Brewer at cbrewer@psu.edu. * * 5. Products derived from this software may not be called "ColorBrewer", * nor may "ColorBrewer" appear in their name, without prior written * permission of Cynthia Brewer. * * Furthermore, Solarized colour schemes are covered by the following: * * Copyright (c) 2011 Ethan Schoonover * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */var qc;function JC(){return qc||(qc=1,function(e){var t=function(){var a=Array.prototype,n=function(m,g,y){return a.slice.apply(m,a.slice.call(arguments,1))},s="function",o=1e9,u=function(m,g,y,v){if(g|=0,g==0)return[];if(typeof m!==s){var B=u.listSchemes(m,g);if(!B.length)return null;m=B[(y||0)%B.length]}var b=n(arguments,2);return b[0]=g,m.apply(m,b)};u.Scheme=function(m,g){var y={},v=0,B=o,b=function(){if(arguments.length<=1)return w.color_func.bind(w);var k=n(arguments);return function(S){return k[0]=S,w.color_func.apply(w,k)}},w=function(k,S){if(k|=0,!k)return[];var M=k;if(k=Math.abs(k),k<=v){for(var $=Math.max(k,B);!($ in y);++$);var F=y[$];if($>k){var L="shrinking_takes_head"in F?F.shrinking_takes_head:w.shrinking_takes_head;if(L)F=F.slice(0,k),$=k;else return u.generate(function(Q){return F[Math.round(Q)]},M,0,F.length-1)}return F=F.slice(),M<0&&F.reverse(),F}else return w.color_func?u.generate(b.apply(w,arguments),M,0,1,w.color_func_cyclic):null};return w.scheme_name=m,w.groups=g?typeof g=="string"?[g]:g:[],w.max=0,w.cbf_max=o,w.addPalette=function(k,S){var M=k.length;M&&(y[M]=k,B=Math.min(B,M),v=Math.max(v,M),w.max=Math.max(w.max,M),!S&&M!=1&&(w.cbf_max=Math.min(w.cbf_max,M-1)))},w.addPalettes=function(k,S,M){S=S||k.length;for(var $=0;$=g&&y.push(k)}),y.sort(function(v,B){return v.scheme_name>=B.scheme_name?v.scheme_name>B.scheme_name?1:0:-1}),y},u.generate=function(m,g,y,v,B){if(Math.abs(g)<1)return[];if(y=y===void 0?0:y,v=v===void 0?1:v,Math.abs(g)<2)return[m(y)];for(var b=Math.abs(g),w=y,k=[],S=(v-y)/(B?b:b-1);--b>=0;w+=S)k.push(m(w));return g<0&&k.reverse(),k};var f=function(m){return m>0?m<1?m:1:0};return u.rgbColor=function(m,g,y){return[m,g,y].map(function(v){return v=Number(Math.round(f(v)*255)).toString(16),v.length==1?"0"+v:v}).join("")},u.linearRgbColor=function(m,g,y){return[m,g,y].map(function(v){return v=f(v),v<=.0031308?v=12.92*v:v=1.055*Math.pow(v,.4166666666666667)-.055,v=Number(Math.round(v*255)).toString(16),v.length==1?"0"+v:v}).join("")},u.hsvColor=function(m,g,y){m*=6;var v=g===void 0?1:f(g),B=y===void 0?1:f(y),b=B*(1-v*Math.abs(m%2-1)),w=B*(1-v);switch(Math.floor(m)%6){case 0:return u.rgbColor(B,b,w);case 1:return u.rgbColor(b,B,w);case 2:return u.rgbColor(w,B,b);case 3:return u.rgbColor(w,b,B);case 4:return u.rgbColor(b,w,B);default:return u.rgbColor(B,w,b)}},u.register(u.Scheme.withColorFunction("rainbow","qualitative",u.hsvColor,!1,!0)),u}();t.ColorFunction,t.Palette,t.PalettesList,t.SchemeType,function(){var a=t.Scheme.fromPalettes("mpn65","qualitative",[["ff0029","377eb8","66a61e","984ea3","00d2d5","ff7f00","af8d00","7f80cd","b3e900","c42e60","a65628","f781bf","8dd3c7","bebada","fb8072","80b1d3","fdb462","fccde5","bc80bd","ffed6f","c4eaff","cf8c00","1b9e77","d95f02","e7298a","e6ab02","a6761d","0097ff","00d067","000000","252525","525252","737373","969696","bdbdbd","f43600","4ba93b","5779bb","927acc","97ee3f","bf3947","9f5b00","f48758","8caed6","f2b94f","eff26e","e43872","d9b100","9d7a00","698cff","d9d9d9","00d27e","d06800","009f82","c49200","cbe8ff","fecddf","c27eb6","8cd2ce","c4b8d9","f883b0","a49100","f48800","27d0df","a04a9b"]]);a.shrinkByTakingHead(!0),t.register(a)}(),function(){var a=t.rgbColor,n=function(o,u){for(var A=arguments.length-1,f=arguments[A];A>1;)f=f*o+arguments[--A];return f},s=function(o){var u=n(Math.abs(o),1,.278393,.230389,972e-6,.078108);return u*=u,u*=u,u=1-1/u,o<0?-u:u};t.register(t.Scheme.fromPalettes("tol","qualitative",[["4477aa"],["4477aa","cc6677"],["4477aa","ddcc77","cc6677"],["4477aa","117733","ddcc77","cc6677"],["332288","88ccee","117733","ddcc77","cc6677"],["332288","88ccee","117733","ddcc77","cc6677","aa4499"],["332288","88ccee","44aa99","117733","ddcc77","cc6677","aa4499"],["332288","88ccee","44aa99","117733","999933","ddcc77","cc6677","aa4499"],["332288","88ccee","44aa99","117733","999933","ddcc77","cc6677","882255","aa4499"],["332288","88ccee","44aa99","117733","999933","ddcc77","661100","cc6677","882255","aa4499"],["332288","6699cc","88ccee","44aa99","117733","999933","ddcc77","661100","cc6677","882255","aa4499"],["332288","6699cc","88ccee","44aa99","117733","999933","ddcc77","661100","cc6677","aa4466","882255","aa4499"]],12,12)),t.tolSequentialColor=function(o){return a(1-.392*(1+s((o-.869)/.255)),1.021-.456*(1+s((o-.527)/.376)),1-.493*(1+s((o-.272)/.309)))},t.register(t.Scheme.withColorFunction("tol-sq","sequential",t.tolSequentialColor,!0)),t.tolDivergingColor=function(o){var u=n(o,.572,1.524,-1.811)/n(o,1,-.291,.1574);return a(n(o,.235,-2.13,26.92,-65.5,63.5,-22.36),u*u,1/n(o,1.579,-4.03,12.92,-31.4,48.6,-23.36))},t.register(t.Scheme.withColorFunction("tol-dv","diverging",t.tolDivergingColor,!0)),t.tolRainbowColor=function(o){return a(n(o,.472,-.567,4.05)/n(o,1,8.72,-19.17,14.1),n(o,.108932,-1.22635,27.284,-98.577,163.3,-131.395,40.634),1/n(o,1.97,3.54,-68.5,243,-297,125))},t.register(t.Scheme.withColorFunction("tol-rainbow","qualitative",t.tolRainbowColor,!0))}(),function(){t.register(t.Scheme.fromPalettes("sol-base","sequential",[["002b36","073642","586e75","657b83","839496","93a1a1","eee8d5","fdf6e3"]],1,8)),t.register(t.Scheme.fromPalettes("sol-accent","qualitative",[["b58900","cb4b16","dc322f","d33682","6c71c4","268bd2","2aa198","859900"]]))}(),function(){var a={YlGn:{type:"sequential",cbf:42,3:["f7fcb9","addd8e","31a354"],4:["ffffcc","c2e699","78c679","238443"],5:["ffffcc","c2e699","78c679","31a354","006837"],6:["ffffcc","d9f0a3","addd8e","78c679","31a354","006837"],7:["ffffcc","d9f0a3","addd8e","78c679","41ab5d","238443","005a32"],8:["ffffe5","f7fcb9","d9f0a3","addd8e","78c679","41ab5d","238443","005a32"],9:["ffffe5","f7fcb9","d9f0a3","addd8e","78c679","41ab5d","238443","006837","004529"]},YlGnBu:{type:"sequential",cbf:42,3:["edf8b1","7fcdbb","2c7fb8"],4:["ffffcc","a1dab4","41b6c4","225ea8"],5:["ffffcc","a1dab4","41b6c4","2c7fb8","253494"],6:["ffffcc","c7e9b4","7fcdbb","41b6c4","2c7fb8","253494"],7:["ffffcc","c7e9b4","7fcdbb","41b6c4","1d91c0","225ea8","0c2c84"],8:["ffffd9","edf8b1","c7e9b4","7fcdbb","41b6c4","1d91c0","225ea8","0c2c84"],9:["ffffd9","edf8b1","c7e9b4","7fcdbb","41b6c4","1d91c0","225ea8","253494","081d58"]},GnBu:{type:"sequential",cbf:42,3:["e0f3db","a8ddb5","43a2ca"],4:["f0f9e8","bae4bc","7bccc4","2b8cbe"],5:["f0f9e8","bae4bc","7bccc4","43a2ca","0868ac"],6:["f0f9e8","ccebc5","a8ddb5","7bccc4","43a2ca","0868ac"],7:["f0f9e8","ccebc5","a8ddb5","7bccc4","4eb3d3","2b8cbe","08589e"],8:["f7fcf0","e0f3db","ccebc5","a8ddb5","7bccc4","4eb3d3","2b8cbe","08589e"],9:["f7fcf0","e0f3db","ccebc5","a8ddb5","7bccc4","4eb3d3","2b8cbe","0868ac","084081"]},BuGn:{type:"sequential",cbf:42,3:["e5f5f9","99d8c9","2ca25f"],4:["edf8fb","b2e2e2","66c2a4","238b45"],5:["edf8fb","b2e2e2","66c2a4","2ca25f","006d2c"],6:["edf8fb","ccece6","99d8c9","66c2a4","2ca25f","006d2c"],7:["edf8fb","ccece6","99d8c9","66c2a4","41ae76","238b45","005824"],8:["f7fcfd","e5f5f9","ccece6","99d8c9","66c2a4","41ae76","238b45","005824"],9:["f7fcfd","e5f5f9","ccece6","99d8c9","66c2a4","41ae76","238b45","006d2c","00441b"]},PuBuGn:{type:"sequential",cbf:42,3:["ece2f0","a6bddb","1c9099"],4:["f6eff7","bdc9e1","67a9cf","02818a"],5:["f6eff7","bdc9e1","67a9cf","1c9099","016c59"],6:["f6eff7","d0d1e6","a6bddb","67a9cf","1c9099","016c59"],7:["f6eff7","d0d1e6","a6bddb","67a9cf","3690c0","02818a","016450"],8:["fff7fb","ece2f0","d0d1e6","a6bddb","67a9cf","3690c0","02818a","016450"],9:["fff7fb","ece2f0","d0d1e6","a6bddb","67a9cf","3690c0","02818a","016c59","014636"]},PuBu:{type:"sequential",cbf:42,3:["ece7f2","a6bddb","2b8cbe"],4:["f1eef6","bdc9e1","74a9cf","0570b0"],5:["f1eef6","bdc9e1","74a9cf","2b8cbe","045a8d"],6:["f1eef6","d0d1e6","a6bddb","74a9cf","2b8cbe","045a8d"],7:["f1eef6","d0d1e6","a6bddb","74a9cf","3690c0","0570b0","034e7b"],8:["fff7fb","ece7f2","d0d1e6","a6bddb","74a9cf","3690c0","0570b0","034e7b"],9:["fff7fb","ece7f2","d0d1e6","a6bddb","74a9cf","3690c0","0570b0","045a8d","023858"]},BuPu:{type:"sequential",cbf:42,3:["e0ecf4","9ebcda","8856a7"],4:["edf8fb","b3cde3","8c96c6","88419d"],5:["edf8fb","b3cde3","8c96c6","8856a7","810f7c"],6:["edf8fb","bfd3e6","9ebcda","8c96c6","8856a7","810f7c"],7:["edf8fb","bfd3e6","9ebcda","8c96c6","8c6bb1","88419d","6e016b"],8:["f7fcfd","e0ecf4","bfd3e6","9ebcda","8c96c6","8c6bb1","88419d","6e016b"],9:["f7fcfd","e0ecf4","bfd3e6","9ebcda","8c96c6","8c6bb1","88419d","810f7c","4d004b"]},RdPu:{type:"sequential",cbf:42,3:["fde0dd","fa9fb5","c51b8a"],4:["feebe2","fbb4b9","f768a1","ae017e"],5:["feebe2","fbb4b9","f768a1","c51b8a","7a0177"],6:["feebe2","fcc5c0","fa9fb5","f768a1","c51b8a","7a0177"],7:["feebe2","fcc5c0","fa9fb5","f768a1","dd3497","ae017e","7a0177"],8:["fff7f3","fde0dd","fcc5c0","fa9fb5","f768a1","dd3497","ae017e","7a0177"],9:["fff7f3","fde0dd","fcc5c0","fa9fb5","f768a1","dd3497","ae017e","7a0177","49006a"]},PuRd:{type:"sequential",cbf:42,3:["e7e1ef","c994c7","dd1c77"],4:["f1eef6","d7b5d8","df65b0","ce1256"],5:["f1eef6","d7b5d8","df65b0","dd1c77","980043"],6:["f1eef6","d4b9da","c994c7","df65b0","dd1c77","980043"],7:["f1eef6","d4b9da","c994c7","df65b0","e7298a","ce1256","91003f"],8:["f7f4f9","e7e1ef","d4b9da","c994c7","df65b0","e7298a","ce1256","91003f"],9:["f7f4f9","e7e1ef","d4b9da","c994c7","df65b0","e7298a","ce1256","980043","67001f"]},OrRd:{type:"sequential",cbf:42,3:["fee8c8","fdbb84","e34a33"],4:["fef0d9","fdcc8a","fc8d59","d7301f"],5:["fef0d9","fdcc8a","fc8d59","e34a33","b30000"],6:["fef0d9","fdd49e","fdbb84","fc8d59","e34a33","b30000"],7:["fef0d9","fdd49e","fdbb84","fc8d59","ef6548","d7301f","990000"],8:["fff7ec","fee8c8","fdd49e","fdbb84","fc8d59","ef6548","d7301f","990000"],9:["fff7ec","fee8c8","fdd49e","fdbb84","fc8d59","ef6548","d7301f","b30000","7f0000"]},YlOrRd:{type:"sequential",cbf:42,3:["ffeda0","feb24c","f03b20"],4:["ffffb2","fecc5c","fd8d3c","e31a1c"],5:["ffffb2","fecc5c","fd8d3c","f03b20","bd0026"],6:["ffffb2","fed976","feb24c","fd8d3c","f03b20","bd0026"],7:["ffffb2","fed976","feb24c","fd8d3c","fc4e2a","e31a1c","b10026"],8:["ffffcc","ffeda0","fed976","feb24c","fd8d3c","fc4e2a","e31a1c","b10026"],9:["ffffcc","ffeda0","fed976","feb24c","fd8d3c","fc4e2a","e31a1c","bd0026","800026"]},YlOrBr:{type:"sequential",cbf:42,3:["fff7bc","fec44f","d95f0e"],4:["ffffd4","fed98e","fe9929","cc4c02"],5:["ffffd4","fed98e","fe9929","d95f0e","993404"],6:["ffffd4","fee391","fec44f","fe9929","d95f0e","993404"],7:["ffffd4","fee391","fec44f","fe9929","ec7014","cc4c02","8c2d04"],8:["ffffe5","fff7bc","fee391","fec44f","fe9929","ec7014","cc4c02","8c2d04"],9:["ffffe5","fff7bc","fee391","fec44f","fe9929","ec7014","cc4c02","993404","662506"]},Purples:{type:"sequential",cbf:42,3:["efedf5","bcbddc","756bb1"],4:["f2f0f7","cbc9e2","9e9ac8","6a51a3"],5:["f2f0f7","cbc9e2","9e9ac8","756bb1","54278f"],6:["f2f0f7","dadaeb","bcbddc","9e9ac8","756bb1","54278f"],7:["f2f0f7","dadaeb","bcbddc","9e9ac8","807dba","6a51a3","4a1486"],8:["fcfbfd","efedf5","dadaeb","bcbddc","9e9ac8","807dba","6a51a3","4a1486"],9:["fcfbfd","efedf5","dadaeb","bcbddc","9e9ac8","807dba","6a51a3","54278f","3f007d"]},Blues:{type:"sequential",cbf:42,3:["deebf7","9ecae1","3182bd"],4:["eff3ff","bdd7e7","6baed6","2171b5"],5:["eff3ff","bdd7e7","6baed6","3182bd","08519c"],6:["eff3ff","c6dbef","9ecae1","6baed6","3182bd","08519c"],7:["eff3ff","c6dbef","9ecae1","6baed6","4292c6","2171b5","084594"],8:["f7fbff","deebf7","c6dbef","9ecae1","6baed6","4292c6","2171b5","084594"],9:["f7fbff","deebf7","c6dbef","9ecae1","6baed6","4292c6","2171b5","08519c","08306b"]},Greens:{type:"sequential",cbf:42,3:["e5f5e0","a1d99b","31a354"],4:["edf8e9","bae4b3","74c476","238b45"],5:["edf8e9","bae4b3","74c476","31a354","006d2c"],6:["edf8e9","c7e9c0","a1d99b","74c476","31a354","006d2c"],7:["edf8e9","c7e9c0","a1d99b","74c476","41ab5d","238b45","005a32"],8:["f7fcf5","e5f5e0","c7e9c0","a1d99b","74c476","41ab5d","238b45","005a32"],9:["f7fcf5","e5f5e0","c7e9c0","a1d99b","74c476","41ab5d","238b45","006d2c","00441b"]},Oranges:{type:"sequential",cbf:42,3:["fee6ce","fdae6b","e6550d"],4:["feedde","fdbe85","fd8d3c","d94701"],5:["feedde","fdbe85","fd8d3c","e6550d","a63603"],6:["feedde","fdd0a2","fdae6b","fd8d3c","e6550d","a63603"],7:["feedde","fdd0a2","fdae6b","fd8d3c","f16913","d94801","8c2d04"],8:["fff5eb","fee6ce","fdd0a2","fdae6b","fd8d3c","f16913","d94801","8c2d04"],9:["fff5eb","fee6ce","fdd0a2","fdae6b","fd8d3c","f16913","d94801","a63603","7f2704"]},Reds:{type:"sequential",cbf:42,3:["fee0d2","fc9272","de2d26"],4:["fee5d9","fcae91","fb6a4a","cb181d"],5:["fee5d9","fcae91","fb6a4a","de2d26","a50f15"],6:["fee5d9","fcbba1","fc9272","fb6a4a","de2d26","a50f15"],7:["fee5d9","fcbba1","fc9272","fb6a4a","ef3b2c","cb181d","99000d"],8:["fff5f0","fee0d2","fcbba1","fc9272","fb6a4a","ef3b2c","cb181d","99000d"],9:["fff5f0","fee0d2","fcbba1","fc9272","fb6a4a","ef3b2c","cb181d","a50f15","67000d"]},Greys:{type:"sequential",cbf:42,3:["f0f0f0","bdbdbd","636363"],4:["f7f7f7","cccccc","969696","525252"],5:["f7f7f7","cccccc","969696","636363","252525"],6:["f7f7f7","d9d9d9","bdbdbd","969696","636363","252525"],7:["f7f7f7","d9d9d9","bdbdbd","969696","737373","525252","252525"],8:["ffffff","f0f0f0","d9d9d9","bdbdbd","969696","737373","525252","252525"],9:["ffffff","f0f0f0","d9d9d9","bdbdbd","969696","737373","525252","252525","000000"]},PuOr:{type:"diverging",cbf:42,3:["f1a340","f7f7f7","998ec3"],4:["e66101","fdb863","b2abd2","5e3c99"],5:["e66101","fdb863","f7f7f7","b2abd2","5e3c99"],6:["b35806","f1a340","fee0b6","d8daeb","998ec3","542788"],7:["b35806","f1a340","fee0b6","f7f7f7","d8daeb","998ec3","542788"],8:["b35806","e08214","fdb863","fee0b6","d8daeb","b2abd2","8073ac","542788"],9:["b35806","e08214","fdb863","fee0b6","f7f7f7","d8daeb","b2abd2","8073ac","542788"],10:["7f3b08","b35806","e08214","fdb863","fee0b6","d8daeb","b2abd2","8073ac","542788","2d004b"],11:["7f3b08","b35806","e08214","fdb863","fee0b6","f7f7f7","d8daeb","b2abd2","8073ac","542788","2d004b"]},BrBG:{type:"diverging",cbf:42,3:["d8b365","f5f5f5","5ab4ac"],4:["a6611a","dfc27d","80cdc1","018571"],5:["a6611a","dfc27d","f5f5f5","80cdc1","018571"],6:["8c510a","d8b365","f6e8c3","c7eae5","5ab4ac","01665e"],7:["8c510a","d8b365","f6e8c3","f5f5f5","c7eae5","5ab4ac","01665e"],8:["8c510a","bf812d","dfc27d","f6e8c3","c7eae5","80cdc1","35978f","01665e"],9:["8c510a","bf812d","dfc27d","f6e8c3","f5f5f5","c7eae5","80cdc1","35978f","01665e"],10:["543005","8c510a","bf812d","dfc27d","f6e8c3","c7eae5","80cdc1","35978f","01665e","003c30"],11:["543005","8c510a","bf812d","dfc27d","f6e8c3","f5f5f5","c7eae5","80cdc1","35978f","01665e","003c30"]},PRGn:{type:"diverging",cbf:42,3:["af8dc3","f7f7f7","7fbf7b"],4:["7b3294","c2a5cf","a6dba0","008837"],5:["7b3294","c2a5cf","f7f7f7","a6dba0","008837"],6:["762a83","af8dc3","e7d4e8","d9f0d3","7fbf7b","1b7837"],7:["762a83","af8dc3","e7d4e8","f7f7f7","d9f0d3","7fbf7b","1b7837"],8:["762a83","9970ab","c2a5cf","e7d4e8","d9f0d3","a6dba0","5aae61","1b7837"],9:["762a83","9970ab","c2a5cf","e7d4e8","f7f7f7","d9f0d3","a6dba0","5aae61","1b7837"],10:["40004b","762a83","9970ab","c2a5cf","e7d4e8","d9f0d3","a6dba0","5aae61","1b7837","00441b"],11:["40004b","762a83","9970ab","c2a5cf","e7d4e8","f7f7f7","d9f0d3","a6dba0","5aae61","1b7837","00441b"]},PiYG:{type:"diverging",cbf:42,3:["e9a3c9","f7f7f7","a1d76a"],4:["d01c8b","f1b6da","b8e186","4dac26"],5:["d01c8b","f1b6da","f7f7f7","b8e186","4dac26"],6:["c51b7d","e9a3c9","fde0ef","e6f5d0","a1d76a","4d9221"],7:["c51b7d","e9a3c9","fde0ef","f7f7f7","e6f5d0","a1d76a","4d9221"],8:["c51b7d","de77ae","f1b6da","fde0ef","e6f5d0","b8e186","7fbc41","4d9221"],9:["c51b7d","de77ae","f1b6da","fde0ef","f7f7f7","e6f5d0","b8e186","7fbc41","4d9221"],10:["8e0152","c51b7d","de77ae","f1b6da","fde0ef","e6f5d0","b8e186","7fbc41","4d9221","276419"],11:["8e0152","c51b7d","de77ae","f1b6da","fde0ef","f7f7f7","e6f5d0","b8e186","7fbc41","4d9221","276419"]},RdBu:{type:"diverging",cbf:42,3:["ef8a62","f7f7f7","67a9cf"],4:["ca0020","f4a582","92c5de","0571b0"],5:["ca0020","f4a582","f7f7f7","92c5de","0571b0"],6:["b2182b","ef8a62","fddbc7","d1e5f0","67a9cf","2166ac"],7:["b2182b","ef8a62","fddbc7","f7f7f7","d1e5f0","67a9cf","2166ac"],8:["b2182b","d6604d","f4a582","fddbc7","d1e5f0","92c5de","4393c3","2166ac"],9:["b2182b","d6604d","f4a582","fddbc7","f7f7f7","d1e5f0","92c5de","4393c3","2166ac"],10:["67001f","b2182b","d6604d","f4a582","fddbc7","d1e5f0","92c5de","4393c3","2166ac","053061"],11:["67001f","b2182b","d6604d","f4a582","fddbc7","f7f7f7","d1e5f0","92c5de","4393c3","2166ac","053061"]},RdGy:{type:"diverging",cbf:42,3:["ef8a62","ffffff","999999"],4:["ca0020","f4a582","bababa","404040"],5:["ca0020","f4a582","ffffff","bababa","404040"],6:["b2182b","ef8a62","fddbc7","e0e0e0","999999","4d4d4d"],7:["b2182b","ef8a62","fddbc7","ffffff","e0e0e0","999999","4d4d4d"],8:["b2182b","d6604d","f4a582","fddbc7","e0e0e0","bababa","878787","4d4d4d"],9:["b2182b","d6604d","f4a582","fddbc7","ffffff","e0e0e0","bababa","878787","4d4d4d"],10:["67001f","b2182b","d6604d","f4a582","fddbc7","e0e0e0","bababa","878787","4d4d4d","1a1a1a"],11:["67001f","b2182b","d6604d","f4a582","fddbc7","ffffff","e0e0e0","bababa","878787","4d4d4d","1a1a1a"]},RdYlBu:{type:"diverging",cbf:42,3:["fc8d59","ffffbf","91bfdb"],4:["d7191c","fdae61","abd9e9","2c7bb6"],5:["d7191c","fdae61","ffffbf","abd9e9","2c7bb6"],6:["d73027","fc8d59","fee090","e0f3f8","91bfdb","4575b4"],7:["d73027","fc8d59","fee090","ffffbf","e0f3f8","91bfdb","4575b4"],8:["d73027","f46d43","fdae61","fee090","e0f3f8","abd9e9","74add1","4575b4"],9:["d73027","f46d43","fdae61","fee090","ffffbf","e0f3f8","abd9e9","74add1","4575b4"],10:["a50026","d73027","f46d43","fdae61","fee090","e0f3f8","abd9e9","74add1","4575b4","313695"],11:["a50026","d73027","f46d43","fdae61","fee090","ffffbf","e0f3f8","abd9e9","74add1","4575b4","313695"]},Spectral:{type:"diverging",cbf:0,3:["fc8d59","ffffbf","99d594"],4:["d7191c","fdae61","abdda4","2b83ba"],5:["d7191c","fdae61","ffffbf","abdda4","2b83ba"],6:["d53e4f","fc8d59","fee08b","e6f598","99d594","3288bd"],7:["d53e4f","fc8d59","fee08b","ffffbf","e6f598","99d594","3288bd"],8:["d53e4f","f46d43","fdae61","fee08b","e6f598","abdda4","66c2a5","3288bd"],9:["d53e4f","f46d43","fdae61","fee08b","ffffbf","e6f598","abdda4","66c2a5","3288bd"],10:["9e0142","d53e4f","f46d43","fdae61","fee08b","e6f598","abdda4","66c2a5","3288bd","5e4fa2"],11:["9e0142","d53e4f","f46d43","fdae61","fee08b","ffffbf","e6f598","abdda4","66c2a5","3288bd","5e4fa2"]},RdYlGn:{type:"diverging",cbf:0,3:["fc8d59","ffffbf","91cf60"],4:["d7191c","fdae61","a6d96a","1a9641"],5:["d7191c","fdae61","ffffbf","a6d96a","1a9641"],6:["d73027","fc8d59","fee08b","d9ef8b","91cf60","1a9850"],7:["d73027","fc8d59","fee08b","ffffbf","d9ef8b","91cf60","1a9850"],8:["d73027","f46d43","fdae61","fee08b","d9ef8b","a6d96a","66bd63","1a9850"],9:["d73027","f46d43","fdae61","fee08b","ffffbf","d9ef8b","a6d96a","66bd63","1a9850"],10:["a50026","d73027","f46d43","fdae61","fee08b","d9ef8b","a6d96a","66bd63","1a9850","006837"],11:["a50026","d73027","f46d43","fdae61","fee08b","ffffbf","d9ef8b","a6d96a","66bd63","1a9850","006837"]},Accent:{type:"qualitative",cbf:0,3:["7fc97f","beaed4","fdc086"],4:["7fc97f","beaed4","fdc086","ffff99"],5:["7fc97f","beaed4","fdc086","ffff99","386cb0"],6:["7fc97f","beaed4","fdc086","ffff99","386cb0","f0027f"],7:["7fc97f","beaed4","fdc086","ffff99","386cb0","f0027f","bf5b17"],8:["7fc97f","beaed4","fdc086","ffff99","386cb0","f0027f","bf5b17","666666"]},Dark2:{type:"qualitative",cbf:3,3:["1b9e77","d95f02","7570b3"],4:["1b9e77","d95f02","7570b3","e7298a"],5:["1b9e77","d95f02","7570b3","e7298a","66a61e"],6:["1b9e77","d95f02","7570b3","e7298a","66a61e","e6ab02"],7:["1b9e77","d95f02","7570b3","e7298a","66a61e","e6ab02","a6761d"],8:["1b9e77","d95f02","7570b3","e7298a","66a61e","e6ab02","a6761d","666666"]},Paired:{type:"qualitative",cbf:4,3:["a6cee3","1f78b4","b2df8a"],4:["a6cee3","1f78b4","b2df8a","33a02c"],5:["a6cee3","1f78b4","b2df8a","33a02c","fb9a99"],6:["a6cee3","1f78b4","b2df8a","33a02c","fb9a99","e31a1c"],7:["a6cee3","1f78b4","b2df8a","33a02c","fb9a99","e31a1c","fdbf6f"],8:["a6cee3","1f78b4","b2df8a","33a02c","fb9a99","e31a1c","fdbf6f","ff7f00"],9:["a6cee3","1f78b4","b2df8a","33a02c","fb9a99","e31a1c","fdbf6f","ff7f00","cab2d6"],10:["a6cee3","1f78b4","b2df8a","33a02c","fb9a99","e31a1c","fdbf6f","ff7f00","cab2d6","6a3d9a"],11:["a6cee3","1f78b4","b2df8a","33a02c","fb9a99","e31a1c","fdbf6f","ff7f00","cab2d6","6a3d9a","ffff99"],12:["a6cee3","1f78b4","b2df8a","33a02c","fb9a99","e31a1c","fdbf6f","ff7f00","cab2d6","6a3d9a","ffff99","b15928"]},Pastel1:{type:"qualitative",cbf:0,3:["fbb4ae","b3cde3","ccebc5"],4:["fbb4ae","b3cde3","ccebc5","decbe4"],5:["fbb4ae","b3cde3","ccebc5","decbe4","fed9a6"],6:["fbb4ae","b3cde3","ccebc5","decbe4","fed9a6","ffffcc"],7:["fbb4ae","b3cde3","ccebc5","decbe4","fed9a6","ffffcc","e5d8bd"],8:["fbb4ae","b3cde3","ccebc5","decbe4","fed9a6","ffffcc","e5d8bd","fddaec"],9:["fbb4ae","b3cde3","ccebc5","decbe4","fed9a6","ffffcc","e5d8bd","fddaec","f2f2f2"]},Pastel2:{type:"qualitative",cbf:0,3:["b3e2cd","fdcdac","cbd5e8"],4:["b3e2cd","fdcdac","cbd5e8","f4cae4"],5:["b3e2cd","fdcdac","cbd5e8","f4cae4","e6f5c9"],6:["b3e2cd","fdcdac","cbd5e8","f4cae4","e6f5c9","fff2ae"],7:["b3e2cd","fdcdac","cbd5e8","f4cae4","e6f5c9","fff2ae","f1e2cc"],8:["b3e2cd","fdcdac","cbd5e8","f4cae4","e6f5c9","fff2ae","f1e2cc","cccccc"]},Set1:{type:"qualitative",cbf:0,3:["e41a1c","377eb8","4daf4a"],4:["e41a1c","377eb8","4daf4a","984ea3"],5:["e41a1c","377eb8","4daf4a","984ea3","ff7f00"],6:["e41a1c","377eb8","4daf4a","984ea3","ff7f00","ffff33"],7:["e41a1c","377eb8","4daf4a","984ea3","ff7f00","ffff33","a65628"],8:["e41a1c","377eb8","4daf4a","984ea3","ff7f00","ffff33","a65628","f781bf"],9:["e41a1c","377eb8","4daf4a","984ea3","ff7f00","ffff33","a65628","f781bf","999999"]},Set2:{type:"qualitative",cbf:3,3:["66c2a5","fc8d62","8da0cb"],4:["66c2a5","fc8d62","8da0cb","e78ac3"],5:["66c2a5","fc8d62","8da0cb","e78ac3","a6d854"],6:["66c2a5","fc8d62","8da0cb","e78ac3","a6d854","ffd92f"],7:["66c2a5","fc8d62","8da0cb","e78ac3","a6d854","ffd92f","e5c494"],8:["66c2a5","fc8d62","8da0cb","e78ac3","a6d854","ffd92f","e5c494","b3b3b3"]},Set3:{type:"qualitative",cbf:0,3:["8dd3c7","ffffb3","bebada"],4:["8dd3c7","ffffb3","bebada","fb8072"],5:["8dd3c7","ffffb3","bebada","fb8072","80b1d3"],6:["8dd3c7","ffffb3","bebada","fb8072","80b1d3","fdb462"],7:["8dd3c7","ffffb3","bebada","fb8072","80b1d3","fdb462","b3de69"],8:["8dd3c7","ffffb3","bebada","fb8072","80b1d3","fdb462","b3de69","fccde5"],9:["8dd3c7","ffffb3","bebada","fb8072","80b1d3","fdb462","b3de69","fccde5","d9d9d9"],10:["8dd3c7","ffffb3","bebada","fb8072","80b1d3","fdb462","b3de69","fccde5","d9d9d9","bc80bd"],11:["8dd3c7","ffffb3","bebada","fb8072","80b1d3","fdb462","b3de69","fccde5","d9d9d9","bc80bd","ccebc5"],12:["8dd3c7","ffffb3","bebada","fb8072","80b1d3","fdb462","b3de69","fccde5","d9d9d9","bc80bd","ccebc5","ffed6f"]}};for(var n in a){var s=a[n];s=t.Scheme.fromPalettes("cb-"+n,[s.type,"cb-"+s.type],s,12,s.cbf),t.register(s)}}(),e.exports&&(e.exports=t)}(Di)),Di.exports}JC();class ZC extends Ya{constructor(){super(...arguments);Ee(this,"data",{dashboard:[{name:"sales_growth_chart",type:"line"}],order:[{name:"gross_sale_by_day_chart",type:""},{name:"order_completion_time_chart",type:""},{name:"item_count_distribution_chart",type:""},{name:"gross_sale_by_hour_chart",type:""},{name:"order_value_distribution_chart",type:""},{name:"avg_order_gross_chart",type:""},{name:"avg_order_items_chart",type:""},{name:"order_chart",type:""}],revenue:[{name:"revenue_chart",type:"line"}],refund:[{name:"refund_chart",type:"line"}],subscription:[{name:"subscription_chart",type:"line"},{name:"retention_chart",type:"line"},{name:"daily_signups_chart",type:"line"}],product:[{name:"product_chart",type:"bar"}]});Ee(this,"storageKey","chart-type");Ee(this,"listeners",{})}beforeInit(){this.mergeWithStorage()}mergeWithStorage(){const a=vt.get(this.storageKey);this.data.dashboard=a.dashboard??this.data.dashboard,this.data.order=a.order??this.data.order,this.data.revenue=a.revenue??this.data.revenue,this.data.refund=a.refund??this.data.refund,this.data.subscription=a.subscription??this.data.subscription}addListener(a,n){this.listeners[a]=n}async onChange(a,n,s){const u=this.data[a].findIndex(A=>A.name===n);u!==-1?this.data[a][u].type=s:this.data[a].push({name:n,type:s}),this.syncStorage();for(let A in this.listeners)this.listeners[A](this.applicableFilters)}getChartType(a,n){const o=this.data[a].find(u=>u.name===n);return o?o.type:null}syncStorage(){vt.set(this.storageKey,this.applicableFilters.chartType)}removeListener(a){delete this.listeners[a]}get applicableFilters(){return{chartType:{dashboard:this.data.dashboard,order:this.data.order,revenue:this.data.revenue,refund:this.data.refund,subscription:this.data.subscription}}}}const Zt=ZC.init();function zs(e){const t=Re(e[0]).format("MMMM D, YYYY"),a=Re(e[1]).format("MMMM D, YYYY");return t===a?`on ${t}.`:`between ${t} and ${a}.`}function Ys(e){const t=e.split("-");if(t.length===3){const[a,n,s]=t;return`${Ua[parseInt(n)-1]} ${s}`}else if(t.length===2){const[a,n]=t;return`${Ua[parseInt(n)-1]} ${a}`}else if(t.length===1){const[a]=t;return`${a}`}}function In(e){return e.map(t=>Ys(t.group))}const Sa=ke.colors.report,e2={[Sa.light_gray]:Sa.cyan_blue,[Sa.light_gray_cyan_blue]:Sa.cyan_blue_dark,[Sa.blue]:Sa.royal_blue,[Sa.royal_blue]:Sa.dark_blue,[Sa.medium_slate_blue]:Sa.dark_purple,[Sa.dark_cyan_blue_16]:Sa.dark_cyan_blue_40,[Sa.dark_cyan_blue_24]:Sa.dark_cyan_blue_40,[Sa.blue]:Sa.blue_dark_mode,[Sa.purple]:Sa.purple_dark_mode};function Ma(e){return e2[e]}function an(e){const t=e<=31?6:7,a=Math.floor(e/t);return{splitNumber:t,interval:a}}const t2={class:"fct-gross-sale-vs-net-revenue-wrap"},a2={class:"fct-btn-group sm"},n2={__name:"SalesGrowthChart",props:{chartData:{type:Array,required:!0},reportFilter:{type:Object},loading:{type:Boolean,default:!0}},emits:["fetch-chart-data"],setup(e,{emit:t}){const a=e,n=V(null),s=V(null);V("daily");const o=V(Zt.getChartType("order","sales_growth_chart")||"line"),u=ke.colors.report,A=V(ke.isDark()),f=j(()=>a.chartData.every($=>$.orders===0)),m=j(()=>A.value?u.dark_cyan_blue_16:u.light_gray),g=j(()=>A.value?u.dark_cyan_blue_36:u.light_gray_cyan_blue),y=j(()=>[{title:c("Orders"),key:"orders",color:m.value,yAxisIndex:1},{title:c("Revenue"),key:"net_revenue",color:g.value,yAxisIndex:0}].map(({title:$,key:F,color:L,yAxisIndex:Q})=>S($,o.value,a.chartData.map(T=>T[F]),L,Q)));Ua.map($=>$.slice(0,3));const v=j(()=>In(a.chartData));let B=null;const b=()=>{B&&(B.dispose(),B=null),ye(()=>{n.value&&(B=Mt(n.value),k())})},w=j(()=>an(a.chartData.length)),k=()=>{if(!B)return;A.value=ke.isDark();const $={title:{text:a.chartTitle??"",left:"center"},legend:{show:!0,top:"5%",icon:"circle",itemWidth:8,itemHeight:8,itemGap:30,textStyle:{color:A.value?"#ffffff":"#000000"}},tooltip:{trigger:"axis",backgroundColor:A.value?"#253241":"#ffffff",borderColor:A.value?"#2C3C4E":"#c0c4ca",borderWidth:1,textStyle:{color:A.value?"#ffffff":"#565865"},axisPointer:{type:"line",lineStyle:{type:"solid",width:2,color:A.value?u.dark_cyan_blue_16:u.light_gray_blue}},formatter:F=>{let L=F[0].name;return F.forEach(Q=>{const T=Q.seriesIndex===1?`${Te.scaled(Q.value)}`:Q.value,D=A.value?"#ffffff":"#565865";L+=`
${Q.marker} ${Q.seriesName} ${T}
`}),L}},xAxis:{type:"category",data:v.value,axisLabel:{color:A.value?"#ffffff":"#696778",fontSize:12,interval:w.value.interval},axisLine:{lineStyle:{type:"dashed",color:A.value?"#253241":"#D6DAE1"}}},yAxis:[{name:c("Revenue"),type:"value",position:"left",axisLabel:{color:A.value?"#ffffff":"#696778",fontSize:12,formatter:F=>`${Te.scaledChart(F)}`},splitLine:{show:!0,lineStyle:{color:A.value?"#253241":"#D6DAE1",type:"dashed"}}},{name:c("Orders"),type:"value",position:"right",axisLabel:{color:A.value?"#ffffff":"#696778",fontSize:12},splitLine:{show:!1,lineStyle:{color:A.value?"#253241":"#D6DAE1",type:"dashed"}}}],series:y.value};B.setOption($,{notMerge:!0,replaceMerge:["series"]})},S=($,F,L,Q,T)=>({name:$,type:F,barMaxWidth:30,data:L,smooth:!1,color:Q,lineStyle:{width:3},areaStyle:{opacity:.3,color:Q},symbol:"circle",showSymbol:!0,symbolSize:8,itemStyle:{color:Q,borderRadius:[4,4,0,0]},yAxisIndex:T,emphasis:{scale:2,itemStyle:{color:Ma(Q)},lineStyle:{color:Q},areaStyle:{opacity:.3,color:Q}},animation:!0,animationEasing:"cubicOut",animationDuration:800,animationDelay:0,barGap:"-100%",legendHoverLink:!1}),M=$=>{o.value!==$&&(o.value=$,Zt.onChange("order","sales_growth_chart",$),k())};return ge([()=>a.chartData,o],()=>{ye(k)},{deep:!0}),ge(f,$=>{$||b()}),ge(()=>a.loading,$=>{$||b()}),At(()=>{window.removeEventListener("onFluentCartThemeChange",k,!1),window.removeEventListener("fluentCartCurrencyChange",k,!1)}),Be(()=>{window.addEventListener("onFluentCartThemeChange",k),window.addEventListener("fluentCartCurrencyChange",k),ye(b)}),($,F)=>{const L=C("el-skeleton");return d(),_("div",t2,[l(he,{id:"chartContainer",ref_key:"cardRef",ref:s},{default:i(()=>[l(Ce,{title:$.$t("Sales Growth"),border_bottom:""},Rt({_:2},[!f.value&&!e.loading?{name:"action",fn:i(()=>[r("div",a2,[l(jn,{activeType:o.value,types:{bar:"BarChart",line:"LineChart"},onChange:M},null,8,["activeType"]),l(pa,{targetRef:n.value},null,8,["targetRef"])])]),key:"0"}:void 0]),1032,["title"]),l(me,{class:"p-0"},{default:i(()=>[e.loading?(d(),E(L,{key:0,animated:"",rows:5,class:"p-4"})):(d(),_(H,{key:1},[f.value?(d(),E(at,{key:1,icon:"Empty/ListView","has-dark":!0,text:p(c)("Currently there is no data!"),class:"fct-report-empty-state"},null,8,["text"])):(d(),_("div",{key:0,class:"fct-chart-wrap fct-gross-sale-vs-net-revenue-chart",ref_key:"chartRef",ref:n},null,512))],64))]),_:1})]),_:1},512)])}}},s2={class:"fct-gross-sale-vs-net-revenue-wrap"},l2={class:"fct-btn-group sm"},o2={key:0,class:"fct-world-map-action-btns absolute top-5 right-5 flex flex-col gap-1 z-10"},r2={key:1,class:"fct-world-map-action-btns absolute top-[10px] right-[40px] flex flex-col gap-1 z-10"},Wc=.5,Qi=6,Po=1.2,i2={__name:"HeatMap",props:{data:{type:Array,required:!0}},setup(e){const t=e,a=ke.colors,n=V(null),s=V(null),o=V(!1),u=V("world"),A=V(92),f=V(100);V(!1);let m=null,g=null,y=50;const v=V(1.2),B=V(),b=a.blue,w=j(()=>{const le=f.value-A.value,te=t.data?t.data.length:0;return le<60||te<15}),k=le=>{le=le.replace(/^#/,"");const te=parseInt(le.substring(0,2),16),X=parseInt(le.substring(2,4),16),ie=parseInt(le.substring(4,6),16);return[te,X,ie]},S=()=>ke.isDark()?a.gray[50]:a.gray[600],M=k(b[500]),$=async()=>{const le=Ps.getUrl("world.geo.json"),X=await(await fetch(le)).json();Uh("world",X)},F=le=>{if(!le||isNaN(le))return`rgba(${M.join(",")}, 0)`;const te=Math.log(le+1)/Math.log(y+1);return`rgba(${M.join(",")}, ${te})`},L=le=>{u.value=le,G(),m&&(m.clear(),m.setOption(P()),le==="bar"&&Q()),g&&o.value&&(g.clear(),g.setOption(P()),le==="bar"&&T())},Q=()=>{m&&(m.off("dataZoom"),m.on("dataZoom",function(le){le.batch&&le.batch[0]?(A.value=le.batch[0].start||0,f.value=le.batch[0].end||100):(A.value=le.start||0,f.value=le.end||100),setTimeout(()=>{G()},100)}))},T=()=>{g&&(g.off("dataZoom"),g.on("dataZoom",function(le){le.batch&&le.batch[0]?(A.value=le.batch[0].start||0,f.value=le.batch[0].end||100):(A.value=le.start||0,f.value=le.end||100),setTimeout(()=>{g&&g.setOption(P())},100)}))},D=j(()=>(t.data||[]).map(le=>({...le,value:le.value||0,itemStyle:{color:F(le.value||0)},emphasis:{itemStyle:{shadowBlur:10,shadowColor:"rgba(0, 0, 0, 0.5)"}}}))),U=()=>({backgroundColor:ke.isDark()?a.dark[700]:a.gray[25],tooltip:{trigger:"item",formatter:le=>c("%1$s%2$s Orders: %3$s",le.name,"
",le.value||0),borderRadius:8,backgroundColor:ke.isDark()?"#38485a":"#ffffff",borderColor:ke.isDark()?"#4a5a6b":"#c0c4ca",borderWidth:1,textStyle:{color:ke.isDark()?"#ffffff":"#565865"}},visualMap:{min:0,max:y,left:o.value?"5%":"center",bottom:o.value?"center":"4%",text:[c("High"),c("Low")],orient:o.value?"vertical":"horizontal",calculable:!0,inRange:{color:[b[100],b[500]]},textStyle:{color:a.gray[800]}},series:[{name:"Orders",type:"map",map:"world",roam:B.value,zoom:v.value,label:{show:!1,emphasis:{show:!0,color:a.gray[1e3],fontWeight:"bold",textShadowColor:a.gray[50],textShadowBlur:3,textShadowOffsetX:0,textShadowOffsetY:0}},emphasis:{itemStyle:{areaColor:b[300],shadowBlur:10,shadowColor:a.gray[400]}},itemStyle:{borderColor:a.gray[200],borderWidth:.5},data:D.value}]}),I=j(()=>{const le=t.data.length,te=f.value-A.value,X=Math.ceil(le*te/100);let ie=0;return X>100?ie=9:X>50?ie=4:X>30?ie=2:X>20&&(ie=1),ie}),O=()=>{const le=w.value;return{backgroundColor:ke.isDark()?a.dark[700]:a.gray[25],tooltip:{trigger:"axis",axisPointer:{type:"shadow"},formatter:function(te){const X=te[0];return`${X.name}
${c("Orders")}: ${X.value||0}`},backgroundColor:ke.isDark()?"#38485a":"#ffffff",textStyle:{color:ke.isDark()?a.gray[25]:a.system.mid},borderColor:ke.isDark()?"#4a5a6b":"#c0c4ca",borderWidth:1},dataZoom:[{type:"inside",yAxisIndex:0,start:A.value,end:f.value},{type:"slider",yAxisIndex:0,start:A.value,end:f.value,width:25,top:10,right:10,textStyle:{color:S()},brushSelect:!1,showDetail:!1,disabled:!0}],grid:{left:le?"10px":"0%",right:"15%",top:"10%",bottom:"15%",containLabel:!0},yAxis:{type:"category",axisTick:{show:le},splitLine:{show:!1},axisLine:{show:le,lineStyle:{color:S()}},axisLabel:{show:le,interval:I.value,color:S(),fontSize:11},data:t.data.map(te=>te.name)},xAxis:{type:"value",axisLabel:{show:!0,color:S(),formatter:function(te){return te.toLocaleString()}},splitLine:{show:!0,lineStyle:{color:ke.isDark()?a.gray[600]:a.gray[200]}}},series:[{type:"bar",large:!0,itemStyle:{color:new ed(0,0,1,0,[{offset:0,color:b[400]},{offset:1,color:b[600]}]),borderRadius:[0,4,4,0]},emphasis:{itemStyle:{color:new ed(0,0,1,0,[{offset:0,color:b[500]},{offset:1,color:b[700]}])}},data:t.data.map(te=>te.value),label:{show:le,formatter:"{c}",position:"right",color:S(),fontSize:10}}]}},P=()=>u.value==="bar"?O():U(),K=async()=>{await $(),n.value&&(m=Mt(n.value),m.setOption(P()),u.value==="bar"&&Q(),m.on("georoam",()=>{const te=m.getOption().series[0].zoom;if(te!==v.value)if(teQi){const X=Math.max(Po,Math.min(Qi,te));m.setOption({series:[{zoom:X}]},!1),v.value=X}else v.value=te}))},G=()=>{t.data&&t.data.length>0?y=Math.max(...t.data.map(le=>le.value||0)):y=1,m&&m.setOption(P(),{notMerge:!0})},ne=()=>{v.value=Math.min(v.value+Wc,Qi),B.value=!0,m.setOption({series:[{zoom:v.value,roam:B.value}]})},Y=()=>{v.value=Math.max(v.value-Wc,Po),B.value=!0,m.setOption({series:[{zoom:v.value,roam:B.value}]})},N=()=>{u.value==="bar"?(A.value=92,f.value=100,m&&m.dispatchAction({type:"dataZoom",start:92,end:100})):(v.value=Po,B.value="move",m&&(m.clear(),m.setOption(P())))},oe=async()=>{o.value=!0,await ye(),g?g.clear():g=Mt(s.value),g.setOption(P()),u.value==="bar"&&T()},Z=le=>{S(),m&&m.setOption(P())};return Be(()=>{window.addEventListener("onFluentCartThemeChange",Z),B.value="move",ye(K)}),At(()=>{window.removeEventListener("onFluentCartThemeChange",Z),m&&(m.dispose(),m=null),g&&(g.dispose(),g=null)}),ge(()=>t.data,()=>G(),{deep:!0}),ge(w,()=>{u.value==="bar"&&ye(()=>{G()})}),(le,te)=>(d(),_("div",s2,[l(he,{id:"chartContainer",class:"mb-0"},{default:i(()=>[l(Ce,{title:le.$t("Order Heat Map"),border_bottom:""},{action:i(()=>[r("div",l2,[l(jn,{activeType:u.value,types:{world:"Globe",bar:"BarChart"},onChange:L},null,8,["activeType"]),l(pa,{targetRef:n.value,size:"small"},null,8,["targetRef"])])]),_:1},8,["title"]),l(me,{class:"p-0 pt-0 relative"},{default:i(()=>[u.value==="world"?(d(),_("div",o2,[l(Oe,{tag:"button",size:"small",onClick:ne},{default:i(()=>[l(W,{name:"Plus"})]),_:1}),l(Oe,{tag:"button",size:"small",onClick:Y},{default:i(()=>[l(W,{name:"Minus"})]),_:1}),l(Oe,{tag:"button",size:"small",onClick:N},{default:i(()=>[l(W,{name:"Reload"})]),_:1}),l(Oe,{tag:"button",size:"small lg:hidden",onClick:oe},{default:i(()=>[l(W,{name:"Eye"})]),_:1})])):x("",!0),u.value==="bar"?(d(),_("div",r2,[l(Oe,{tag:"button",size:"small",onClick:N},{default:i(()=>[l(W,{name:"Reload"})]),_:1})])):x("",!0),r("div",{class:"fct-chart-wrap rounded-[0px] bg-transparent",ref_key:"chartRef",ref:n},null,512)]),_:1})]),_:1}),l(p(Ih),{modelValue:o.value,"onUpdate:modelValue":te[0]||(te[0]=X=>o.value=X),title:le.$t("Order Heat Map"),class:"country-heat-map-dialog"},{default:i(()=>[r("div",{class:"fct-chart-wrap",ref_key:"modalChartRef",ref:s},null,512)]),_:1},8,["modelValue","title"])]))}},d2=He(i2,[["__scopeId","data-v-36a900c8"]]),u2={class:"fct-report-card"},c2={key:0,class:"fct-report-card-header"},A2={key:0,class:"flex items-center gap-2"},p2={class:"title"},f2={class:"actions"},m2={class:"fct-report-card-body flex h-full"},h2={class:"w-full"},fo={__name:"ReportCard",props:{cardOptions:{type:Object,default:()=>({heading:"",linkButtonText:"",linkButtonUrl:"",headingIcon:{type:Boolean,default:!1}})}},setup(e){return(t,a)=>{const n=C("router-link");return d(),_("div",u2,[e.cardOptions.heading||e.cardOptions.linkButtonText?(d(),_("div",c2,[e.cardOptions.heading?(d(),_("div",A2,[e.cardOptions.headingIcon?(d(),E(Oe,{key:0,size:"x-small",bg:"danger",soft:""},{default:i(()=>[l(W,{name:"FailedCircle"})]),_:1})):x("",!0),r("h4",p2,h(e.cardOptions.heading),1)])):x("",!0),r("div",f2,[e.cardOptions.linkButtonText?(d(),E(n,{key:0,to:`/${e.cardOptions.linkButtonUrl}`,class:"link"},{default:i(()=>[R(h(t.$t(e.cardOptions.linkButtonText)),1)]),_:1},8,["to"])):x("",!0),oa(t.$slots,"action")])])):x("",!0),r("div",m2,[r("div",h2,[oa(t.$slots,"default")])])])}}},_2={key:0,class:"fct-report-sold-product-list has-scroll"},g2={class:"list-left-content"},v2={class:"list-title"},y2={class:"list-title-inner"},b2={class:"list-id"},w2={class:"list-right-content"},C2=["innerHTML"],B2={class:"list-price"},k2={__name:"RecentOrders",setup(e){const t=Ia.data;return(a,n)=>{const s=C("router-link");return d(),E(fo,{class:"top-sold-products","card-options":{heading:p(c)("Recent Orders"),linkButtonText:p(c)("View All"),linkButtonUrl:"orders"}},{default:i(()=>{var o,u;return[((u=(o=p(t))==null?void 0:o.recentOrders)==null?void 0:u.length)>0?(d(),_("ul",_2,[(d(!0),_(H,null,ee(p(t).recentOrders,A=>(d(),_("li",{key:A.id},[l(s,{class:"no-underline",to:{name:"view_order",params:{order_id:A.id}}},{default:i(()=>[r("div",g2,[r("div",v2,[r("div",y2,h(A.customer_name)+" #"+h(p(Kt)(A.id)),1),r("div",b2,[l($a,{"date-time":A.created_at},null,8,["date-time"])])])]),r("div",w2,[r("div",{class:"list-value",innerHTML:p(Te).scaled(A.total_amount)},null,8,C2),r("div",B2,h(p(Kt)(A.order_items_count))+" "+h(p(c)("Items")),1)])]),_:2},1032,["to"])]))),128))])):(d(),E(at,{key:1,icon:"Empty/ListView","has-dark":!0,text:p(c)("Currently there is no item!")},null,8,["text"]))]}),_:1},8,["card-options"])}}},x2={key:0},S2={key:1,class:"fc_dashboard_onboarding_wrap"},F2={class:"fc_dashboard_onboarding_title"},E2={class:"fc_dashboard_onboarding_lists"},U2=["href"],$2={class:"circle-shape"},D2={class:"fc_dashboard_onboarding_item__title"},Q2={__name:"Onboarding",setup(e){const t=V(0),a=V(!1);Qt().ctx;const n=V([]),s=V(!0);V(localStorage.getItem("started_content_collapse")==="true"||!1),j(()=>{const u=Object.keys(n.value).length;return u?Math.round(t.value/u*100):0});const o=Gd("dashboardTogglePageNotification");return Be(async()=>{a.value=!0,re.get("dashboard").then(u=>{var f;n.value=u.data.steps,t.value=u.data.completed,s.value=Object.keys(n.value).length!==t.value,a.value=!1;let A=((f=n.value.page_setup)==null?void 0:f.completed)||!1;o&&o(!A)}).catch(u=>{a.value=!1})}),(u,A)=>{const f=C("el-skeleton"),m=C("Check"),g=C("el-icon");return s.value?(d(),_("div",x2,[a.value?(d(),E(f,{key:0,rows:3,animated:""})):(d(),_("div",S2,[r("h3",F2,h(u.$t("Onboarding Checklist")),1),r("div",E2,[(d(!0),_(H,null,ee(n.value,(y,v)=>(d(),_("a",{key:v,href:y.url,class:de([y.completed===!0?"active":"","fc_dashboard_onboarding_item"])},[r("span",$2,[y.completed===!0?(d(),E(g,{key:0},{default:i(()=>[l(m)]),_:1})):x("",!0)]),r("div",D2,h(y.title),1)],10,U2))),128))])]))])):x("",!0)}}},I2={class:"fct-dashboard-recent-activities-wrap"},T2={class:"fct-dashboard-recent-activities__header"},V2={class:"fct-dashboard-recent-activities__header_title"},M2={class:"fct-dashboard-recent-activities__header_desc"},L2={key:0,class:"fct-dashboard-recent-activities__body"},R2={key:0,class:"fct-dashboard-recent-activities__item has-icon"},O2={class:"content"},H2={class:"title"},P2=["onClick"],N2={class:"date"},K2=["innerHTML"],G2={class:"created_by"},j2={key:1,class:"fct-dashboard-recent-activities__empty"},z2={class:"fct-dashboard-recent-activities__empty_text"},Y2={__name:"RecentActivity",props:{activities:{type:Array,default:()=>[]},showManageActivity:{type:Boolean,default:!1}},emits:["reload"],setup(e,{emit:t}){const a=ja(),n=V([{label:c("All"),value:"all"},{label:c("Today"),value:"today"},{label:c("Yesterday"),value:"yesterday"},{label:c("This Week"),value:"this_week"}]),s=V("all"),o=()=>{switch(s.value){case"all":return c("all");case"today":return c("today");case"yesterday":return c("yesterday");case"this_week":return c("this week");default:return s.value}},u=()=>{o(),Ia.getRecentActivities({groupKey:s.value})},A={Order:"orders/view",Payment:"orders/view",Product:"products/view",Customer:"customers/view",Coupon:"coupons/view"},f=g=>{var b;const y={order:{name:"view_order",param:"order_id",permission:"orders/view"},payment:{name:"view_order",param:"order_id",permission:"orders/view"},product:{name:"view_product",param:"product_id",permission:"products/view"},customer:{name:"view_customer",param:"customer_id",permission:"customers/view"},coupon:{name:"view_coupon",param:"coupon_id",permission:"coupons/view"}};let v=(b=g==null?void 0:g.module_name)==null?void 0:b.toLowerCase();const B=y[v];B&&g.module_id&&m(g)&&a.push({name:B.name,params:{[B.param]:g.module_id}})},m=g=>{if(!g.module_name)return!0;const y=Ke.get(A,Gt.capitalize(g.module_name));return y?no.has(y):!1};return Be(()=>{u()}),(g,y)=>{const v=C("el-radio-button"),B=C("el-radio-group");return d(),_("div",I2,[r("div",T2,[r("h4",V2,h(p(c)("Recent Activities")),1),r("p",M2,[s.value==="all"?(d(),_(H,{key:0},[R(h(p(c)("%s new activities",p(Kt)(p(Ia).data.recentActivities.length))),1)],64)):(d(),_(H,{key:1},[R(h(p(c)("%1$s new activities %2$s",p(Kt)(p(Ia).data.recentActivities.length),o())),1)],64))]),l(B,{class:"fct-dashboard-recent-activities__header_filter",modelValue:s.value,"onUpdate:modelValue":y[0]||(y[0]=b=>s.value=b),onChange:u,size:"large"},{default:i(()=>[(d(!0),_(H,null,ee(n.value,(b,w)=>(d(),E(v,{key:w,label:b.label,value:b.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),p(Ia).data.recentActivities.length?(d(),_("div",L2,[(d(!0),_(H,null,ee(p(Ia).data.recentActivities,(b,w)=>(d(),_(H,{key:w},[m(b)?(d(),_("div",R2,[y[1]||(y[1]=r("span",{class:"icon"},[r("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[r("path",{d:"M12.8499 9.92029L13.5711 10.3529C13.6156 10.3795 13.6524 10.4172 13.678 10.4623C13.7036 10.5075 13.717 10.5584 13.717 10.6103C13.717 10.6621 13.7036 10.7131 13.678 10.7582C13.6524 10.8033 13.6156 10.841 13.5711 10.8677L8.30911 14.0249C8.21579 14.081 8.10897 14.1106 8.00011 14.1106C7.89124 14.1106 7.78443 14.081 7.69111 14.0249L2.42911 10.8677C2.38462 10.841 2.34779 10.8033 2.32222 10.7582C2.29664 10.7131 2.2832 10.6621 2.2832 10.6103C2.2832 10.5584 2.29664 10.5075 2.32222 10.4623C2.34779 10.4172 2.38462 10.3795 2.42911 10.3529L3.15031 9.92029L8.00011 12.8303L12.8499 9.92029ZM12.8499 7.10029L13.5711 7.53289C13.6156 7.55952 13.6524 7.59723 13.678 7.64235C13.7036 7.68746 13.717 7.73843 13.717 7.79029C13.717 7.84214 13.7036 7.89311 13.678 7.93822C13.6524 7.98334 13.6156 8.02105 13.5711 8.04769L8.00011 11.3903L2.42911 8.04769C2.38462 8.02105 2.34779 7.98334 2.32222 7.93822C2.29664 7.89311 2.2832 7.84214 2.2832 7.79029C2.2832 7.73843 2.29664 7.68746 2.32222 7.64235C2.34779 7.59723 2.38462 7.55952 2.42911 7.53289L3.15031 7.10029L8.00011 10.0103L12.8499 7.10029ZM8.30851 1.58569L13.5711 4.74289C13.6156 4.76952 13.6524 4.80724 13.678 4.85235C13.7036 4.89746 13.717 4.94843 13.717 5.00029C13.717 5.05214 13.7036 5.10311 13.678 5.14822C13.6524 5.19334 13.6156 5.23105 13.5711 5.25769L8.00011 8.60029L2.42911 5.25769C2.38462 5.23105 2.34779 5.19334 2.32222 5.14822C2.29664 5.10311 2.2832 5.05214 2.2832 5.00029C2.2832 4.94843 2.29664 4.89746 2.32222 4.85235C2.34779 4.80724 2.38462 4.76952 2.42911 4.74289L7.69111 1.58569C7.78443 1.52962 7.89124 1.5 8.00011 1.5C8.10897 1.5 8.21579 1.52962 8.30911 1.58569H8.30851ZM8.00011 2.79949L4.33231 5.00029L8.00011 7.20109L11.6679 5.00029L8.00011 2.79949Z",fill:"#335CFF"})])],-1)),r("div",O2,[r("h3",H2,[b.module_name!==""?(d(),_("span",{key:0,onClick:k=>f(b),class:"cursor-pointer"},h(b.title||"--"),9,P2)):(d(),_(H,{key:1},[R(h(b.title),1)],64)),r("span",N2,[l($a,{"date-time":b.created_at},null,8,["date-time"])])]),r("p",{innerHTML:b.content,class:"description"},null,8,K2),r("span",G2,h(p(c)("By %s",b.created_by)),1)])])):x("",!0)],64))),128))])):(d(),_("div",j2,[r("div",z2,h(p(c)("No activity found.")),1)]))])}}},q2={class:"fc_dashboard_sidebar bg-white dark:bg-dark-700 p-5 rounded"},W2={__name:"SideBar",setup(e){return(t,a)=>(d(),_("div",q2,[l(St,{permission:"is_super_admin"},{default:i(()=>[l(Q2)]),_:1}),l(Y2,{onReload:a[0]||(a[0]=()=>{})})]))}},X2={class:"fct-product-create"},J2={class:"fct-product-step"},Z2={class:"fct-product-item-selector"},eB=["onClick"],tB={class:"fct-product-item-selector-content"},aB={class:"fct-bundle-product-condition"},nB={class:"condition-text"},sB={class:"dialog-footer"},ai={__name:"AddProductModal",props:{customModal:String},emits:["process_custom","update:createProductModal"],setup(e,{emit:t}){const a=e,n=t,s=ja(),o=V({post_title:"",post_content:"",post_excerpt:"",post_date:new Date,post_status:"draft",detail:{fulfillment_type:"digital",variation_type:"simple",manage_stock:"0",manage_downloadable:"0",other_info:{use_pricing_table:"yes",group_pricing_by:"repeat_interval",active_editor:"wp-editor",sold_individually:"no"}}}),u=[{type:"physical",title:c("Physical Product"),icon:"Gift"},{type:"digital",title:c("Digital Product"),icon:"Code"}],A=V(!1),f=V(null),m=v=>{o.value.detail.fulfillment_type=v},g=()=>{A.value=!0,re.post("products",{...o.value}).then(v=>{if(q.success(v.message),a.customModal==="order_modal"){const B={id:v.data.product_variants.id,object_id:v.data.product_variants.post_id,variation_id:v.data.product_variants.id,item_name:v.data.product_variants.variation_title,item_price:v.data.product_variants.item_price,quantity:1,stock:100,object_type:v.data.product_details.fulfillment_type,item_total:v.data.product_variants.item_price,line_total:v.data.product_variants.item_price,tax_amount:0,discount_total:0};n("process_custom",B),n("update:createProductModal",!1)}else s.push({name:"product_edit",params:{product_id:v.data.ID}})}).catch(v=>{var B;v.status_code=="422"?q.validationErrors(v):q.error((B=v.data)==null?void 0:B.message)}).finally(()=>{A.value=!1})},y=v=>{v.stopPropagation(),v.preventDefault(),g()};return Be(()=>{ye(()=>{setTimeout(()=>{var v;(v=f.value)==null||v.focus()},10)})}),(v,B)=>{const b=C("el-input"),w=C("el-form-item"),k=C("el-checkbox"),S=C("el-form"),M=C("el-button");return d(),_("div",X2,[r("div",J2,[l(S,{"label-position":"top",model:o.value,"require-asterisk-position":"right"},{default:i(()=>[l(w,{label:o.value.detail.other_info.is_bundle_product==="yes"?p(c)("Bundle Title"):p(c)("Product Title"),required:""},{default:i(()=>[l(b,{type:"text",modelValue:o.value.post_title,"onUpdate:modelValue":B[0]||(B[0]=$=>o.value.post_title=$),placeholder:o.value.detail.other_info.is_bundle_product==="yes"?p(c)("Bundle Title"):p(c)("Product Title"),minlength:"3",maxlength:"200","show-word-limit":"",autofocus:"",ref_key:"fcProductTitle",ref:f,onKeydown:Pa(y,["enter"])},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),l(w,null,{default:i(()=>[r("ul",Z2,[(d(),_(H,null,ee(u,$=>r("li",{key:$.type,class:de({active:$.type===o.value.detail.fulfillment_type}),onClick:F=>m($.type)},[r("div",tB,[l(W,{name:$.icon},null,8,["name"]),R(" "+h($.title),1)]),B[2]||(B[2]=r("div",{class:"fct-product-item-selector-dot-wrap"},[r("span",{class:"fct-product-item-selector-dot"})],-1))],10,eB)),64))])]),_:1}),l(w,null,{default:i(()=>[r("div",aB,[l(k,{modelValue:o.value.detail.other_info.is_bundle_product,"onUpdate:modelValue":B[1]||(B[1]=$=>o.value.detail.other_info.is_bundle_product=$),"true-value":"yes","false-value":"no"},{default:i(()=>[R(h(p(c)("Add as a Bundle")),1)]),_:1},8,["modelValue"]),r("span",nB,h(p(c)("Combine multiple items into one package")),1)])]),_:1})]),_:1},8,["model"])]),r("div",sB,[l(M,{disabled:!o.value.post_title||A.value,loading:A.value,onClick:g,type:"primary"},{default:i(()=>[R(h(A.value?p(c)("Creating"):p(c)("Add Product")),1)]),_:1},8,["disabled","loading"])])])}}};class pu{constructor(t=new Date){this.date=t}getHours(){return this.date.getHours()}static greeting(){const t=new pu().getHours();if(t>=5&&t<12)return c("Good morning");if(t>=12&&t<17)return c("Good afternoon");if(t>=17&&t<21)return c("Good evening");{const a=[c("Step into the moonlight!"),c("Evening vibes!"),c("The night's still young!")];return a[Math.floor(Math.random()*a.length)]}}}const lB={class:"fct-current-user-info-wrap"},oB={class:"fct-current-user-info-content"},rB={class:"image"},iB=["src","alt"],dB={class:"content"},uB={key:0,class:"fct-current-user-info-action"},cB={__name:"CurrentUserInfo",setup(e){const t=V(!1),a=V(Ie.get("me")),n=()=>Ie.get("shop.store_name"),s=Ie.get("total_products_count");return(o,u)=>{const A=C("el-button"),f=C("el-dialog");return d(),_("div",lB,[r("div",oB,[r("div",rB,[r("img",{src:a.value.avatar,alt:a.value.full_name},null,8,iB)]),r("div",dB,[r("h4",null,h(p(pu).greeting())+" "+h(a.value.full_name)+" 👋🏻",1),r("p",null,h(p(c)("Welcome to %1$s",n())),1)])]),l(St,{permission:"products/create"},{default:i(()=>[p(s)==0?(d(),_("div",uB,[l(A,{onClick:u[0]||(u[0]=m=>t.value=!0),type:"primary"},{default:i(()=>[R(h(p(c)("Add Product")),1)]),_:1})])):x("",!0)]),_:1}),l(f,{"append-to-body":!0,modelValue:t.value,"onUpdate:modelValue":u[1]||(u[1]=m=>t.value=m),onClose:u[2]||(u[2]=m=>t.value=!1),title:p(c)("Add New Product")},{default:i(()=>[l(ai)]),_:1},8,["modelValue","title"])])}}};class AB{constructor(){Ee(this,"operatorMap",{"!==":"matchNotEqual","!=":"matchNotEqual"});Ee(this,"defaultMatcherMethod",null)}getMatchingMethod(t){return t==="=="||t==="==="?"matchEqual":this.operatorMap.hasOwnProperty(t)?this.operatorMap[t]:this.defaultMatcherMethod}defaultMatcher(t,a,n){}matchEqual(t,a,n){return n==="==="?t===a:t==a}matchNotEqual(t,a,n){return n==="!=="?t!==a:t!=a}matchContains(t,a,n){return a instanceof String||Array.isArray(a)?a.includes(t):typeof a=="object"?a.hasOwnProperty(t):!1}matchIn(t,a,n){return this.matchContains(t,a,n)}matchNotIn(t,a,n){return!this.matchContains(t,a,n)}}class pB{constructor(){Ee(this,"modifierMap",{"+":"applyAddition","-":"applySubstruction"});Ee(this,"defaultModifierMethod",null)}getModificationMethod(t){return t==="=="||t==="==="?"matchEqual":this.modifierMap.hasOwnProperty(t)?this.modifierMap[t]:this.defaultModifierMethod}applyAddition(t,a,n,s,o){return t+a}}class fB{constructor(t,a){Ee(this,"value");Ee(this,"operator");this.value=t,this.operator=a}setOperator(t){return this.operator=t,this}setValue(t){return this.value=t,this}static make(t,a){return new this(t,a)}build(){return{operator:this.operator,value:this.value instanceof xd?this.value.setModifiers([]).build():this.value}}}class xd{constructor(t,a){Ee(this,"accessor");Ee(this,"modifiers");this.accessor=t,this.modifiers=[],this.setModifiers(a)}setAccessor(t){return this.accessor=t,this}addModifier(t){return this.modifiers.push(t),this}setModifiers(t){return this.modifiers=Array.isArray(t)?t:this.modifiers,this}static make(t,a){return new this(t,a)}build(){let t=[];return Array.isArray(this.modifiers)&&this.modifiers.length>0&&(t=this.modifiers.map(a=>a instanceof fB?a.build():a)),t.length>0?{accessor:this.accessor,modifiers:t}:{accessor:this.accessor}}}class Ns{constructor(t,a,n,s,o){Ee(this,"conditionType");Ee(this,"conditions");Ee(this,"key");Ee(this,"operator");Ee(this,"value");this.key=t,this.value=a,this.operator=n,this.conditions=[],this.conditionType=this.buildConditionType(s),this.setConditions(o)}static make(t,a,n,s){return new this(t,a,n,s)}setConditionType(t){return this.conditionType=this.buildConditionType(t),this}buildConditionType(t){return t==="or"||t==="|"?"or":"and"}setOperator(t){return this.operator=t,this}setKey(t){return this.key=t,this}setValue(t){return this.value=t,this}addCondition(t){return this.conditions.push(t),this}setConditions(t){return this.conditions=Array.isArray(t)||t instanceof Ns||typeof t=="function"?t:this.conditions,this}build(){if(Array.isArray(this.conditions)&&this.conditions.length>0){let n=[];return n=this.conditions.map(s=>s instanceof Ns?s.build.bind(s)():s),{condition_type:this.conditionType,conditions:n}}const t=this.key instanceof xd?this.key.build():this.key,a=this.value instanceof xd?this.value.build():this.value;return{key:t,operator:this.operator,value:a}}}class mB{constructor(t,a){Ee(this,"data");Ee(this,"conditions");Ee(this,"stateKey");Ee(this,"matcher");Ee(this,"modifier");this.data=a,this.stateKey=t,this.matcher=new AB,this.modifier=new pB}match(t,a,n,s=!0){let o="",u=this.matcher.getMatchingMethod(a);return u!=null?o=u:o=Gt.camel("match"+a),o in this.matcher&&typeof this.matcher[o]=="function"?this.matcher[o](t,n,a,s):s}evaluate(t,a="and"){if(t instanceof Ns){const s=t.build.bind(t)();s.hasOwnProperty("conditions")?(t=s.conditions,a=s.condition_type):t=[s]}a=a==="or"?"or":"and";let n=a==="and";if(typeof t=="function")return t(this.stateKey,this.data);if(!Array.isArray(t))return!0;for(let s of t){let o=null;if(Array.isArray(Ke.get(s,"conditions")))o=this.evaluate(s.conditions,Ke.get(s,"condition_type","and"));else{if(s.key===null||s.key===void 0){n=!0;continue}o=this.applyCondition(s)}n=a==="and"?n&&o:n||o}return n}applyCondition(t){let a="",n=null;typeof t.key=="object"?a=Ke.resolvePath(this.stateKey,Ke.get(t,"key.accessor")):a=Ke.resolvePath(this.stateKey,t.key);let s=Ke.get(this.data,a);if(typeof t.value=="object"){const o=Ke.resolvePath(this.stateKey,Ke.get(t,"value.accessor"));n=Ke.get(this.data,o)}else n=t.value;return s=this.applyModification(s,t.key.modifiers,this.stateKey),n=this.applyModification(n,t.value.modifiers,this.stateKey),this.match(s,t.operator,n)}applyModification(t,a,n){return Array.isArray(a)&&a.forEach(s=>{let o=s.operator,u="",A=this.modifier.getModificationMethod(o);if(A!=null?u=A:u=Gt.camel("apply"+o),u in this.modifier&&typeof this.modifier[u]=="function"){let f=s.value;typeof f=="object"&&f!==null&&(f=Ke.getByPath(this.data,n,Ke.get(f,"accessor"))),t=this.modifier[u](t,f,o,n,this.data)}}),t}}class wf{constructor(){Ee(this,"_conditionType","and");Ee(this,"_conditions",null)}conditionType(t){return this._conditionType=t,this}conditions(t){return this._conditions=Array.isArray(t)||t instanceof Ns||typeof t=="function"?t:this._conditions,this}visibleIf(t){return this._conditions=t,this}buildConditions(t){return Array.isArray(t)&&t.length>0?t.map(a=>a instanceof Ns?a.build.bind(a)():a):t}}class Cf{constructor(){Ee(this,"_events",{})}event(t,a){return this._events[t]=a,this}}class br{constructor(t=""){this._component="",this._affix=t}static component(t){const a=new br;return a._component="Affix/"+t,a}static make(t=""){return new this(t)}build(){return this._component.length>0?{component:this._component}:this._affix}}class Sd{constructor(t,a="input"){if(typeof t!="string"||t.length<1)throw new Error("Key is Required");this._key=t,this._type=a,this._class="",this._id="",this._name="",this._label="",this._value="",this._placeholder="",this._min="",this._max="",this._prefix="",this._hasPrefix=!1,this._hasSuffix=!1,this._suffix="",ys.install(this,hp),ys.install(this,Cf),ys.install(this,wf),this._wrapperClass=""}static make(t,a="input"){return new this(t,a)}wrapperClass(t){return this._wrapperClass=t,this}type(t){return this._type=t,this}class(t){return this._class=t,this}id(t){return this._id=t,this}name(t){return this._name=t,this}label(t){return this._label=t,this}value(t){return this._value=t,this}placeholder(t){return this._placeholder=t,this}min(t){return this._min=t,this}max(t){return this._max=t,this}prefix(t){return this._hasPrefix=!0,this._prefix=t,this}suffix(t){this._hasSuffix=!0,this._suffix=t}onChange(t){return this._onChangeCallback=t,this}onKeyPress(t){return this._onKeyPressCallback=t,this}onKeyUp(t){return this._onKeyUpCallback=t,this}onKeyDown(t){return this._onKeyDownCallback=t,this}build(){return this._conditions,Array.isArray(this._conditions)&&this._conditions.length>0&&this._conditions.map(t=>t instanceof Ns?t.build.bind(t)():t),this._attributes=typeof this._attributes=="object"?this._attributes:{},this._attributes.min=this._min,this._attributes.max=this._max,this._attributes.placeholder=this._placeholder,this._attributes.type=this._type,{key:this._key,type:this._type,class:this._class,id:this._id,name:this._name??c(Gt.headline(this._key)),label:this._label??c(Gt.headline(this._key)),value:this._value,condition_type:this._conditionType,conditions:this.buildConditions(this._conditions),hasSuffix:this._hasSuffix,hasPrefix:this._hasPrefix,suffix:this._suffix instanceof br?this._suffix.build():this._suffix,prefix:this._prefix instanceof br?this._prefix.build():this._prefix,min:this._min,max:this._max,placeholder:this._placeholder,attributes:this._attributes,events:this._events,wrapperClass:this._wrapperClass}}}class Fd{constructor(t){if(typeof t!="string"||t.length<1)throw new Error("Key is Required");this._type="section",this._key=t,this._schema=[],this._class="",this.disable_nesting=!0,ys.install(this,hp),ys.install(this,Cf),ys.install(this,wf)}static make(t){return new this(t)}enableNesting(){return this.disable_nesting=!1,this}disableNesting(){return this.disable_nesting=!0,this}class(t){return this._class=t,this}get type(){return this._type}set type(t){if(typeof t=="string")this._type=t;else throw new TypeError("Type must be a string.")}get schema(){return this._schema}setSchema(t){return this._schema=t,this}build(){const t=wl.build(this.schema);return{key:this._key,type:this._type,class:this._class,schema:t,disable_nesting:this.disable_nesting,condition_type:this._conditionType,conditions:this.buildConditions(this._conditions),attributes:this._attributes}}}class Xc{constructor(t,a){if(typeof t!="string"||t.length<1)throw new Error("Key is Required");ys.install(this,Sd,{key:t}),ys.install(this,Fd,{key:t}),this._component=a,this._key=t}static make(t,a=""){return new this(t,a)}component(t){return this._component=t,this}value(t){return this._value=t,this}build(){const t=wl.build(this.schema??{});return{type:this._type,class:this._class,id:this._id,name:this._name??c(Gt.headline(this._key)),label:this._label??c(Gt.headline(this._key)),value:this._value,condition_type:this._conditionType,conditions:this.buildConditions(this._conditions),hasSuffix:this._hasSuffix,hasPrefix:this._hasPrefix,suffix:this._suffix,prefix:this._prefix,placeholder:this._placeholder,attributes:this._attributes,onChange:this._onChangeCallback,onKeyUp:this._onKeyUpCallback,onKeyDown:this._onKeyDownCallback,type:this._type,class:this._class,schema:t,disable_nesting:this.disable_nesting,condition_type:this._conditionType,conditions:this.buildConditions(this._conditions),type:"custom",component:this._component,key:this._key}}}class wl{static build(t){return Array.isArray(t)?wl.buildFromArray(t):typeof t=="object"?wl.buildFromObject(t):t}static buildFromObject(t){let a={};return Object.keys(t).forEach((n,s)=>{const o=t[n];o instanceof Sd||o instanceof Fd||o instanceof Xc?a[n]=o.build.bind(o)():a[n]=t[n]}),a}static buildFromArray(t){let a={};return Array.isArray(t)&&t.forEach(n=>{if(n instanceof Sd||n instanceof Fd||n instanceof Xc){let s=n.build.bind(n)();a[s.key]=s}else a[n.key]=n}),a}}class hB extends Ya{constructor(){super(...arguments);Ee(this,"data",{schema:{},defaults:{},_originalDefaults:{},values:{},initialized:!1,hasChange:!1,validationErrors:{},onChangeCallback:[]});Ee(this,"nestedFormLayouts",["section","tab","tab-pane","grid"]);Ee(this,"ignorableFormLayouts",["grid"])}get hasChange(){return this.data.hasChange}setSchema(a){return this.data.schema=wl.build(a??{}),this.initForm(),this}setDefaults(a){return this.data.defaults=a||{},this.data._originalDefaults=JSON.parse(JSON.stringify(this.data.defaults)),this.initForm(),this}get schema(){return this.data.schema}get values(){return this.data.values}get isReady(){return this.data.initialized}initForm(){if(typeof this.data.schema!="object"||typeof this.data.defaults!="object")throw new Error("You need to set Schema and Defaults First");this.setValues(),this.data.initialized=!0}setValues(){this.data.values=this.ensureNestedDataProperties(this.data.schema,this.data.defaults)}getState(){return this.data.values}setValidationErrors(a){this.data.validationErrors=a||{}}hasValidationError(a){return(this.data.validationErrors??{}).hasOwnProperty(a)}getValidationError(a){return this.data.validationErrors[a]}ensureNestedDataProperties(a,n={}){return Object.keys(a).reduce((s,o)=>{const u=a[o];if(u.type==="html")return s;if(this.nestedFormLayouts.includes(u.type??""))if(u.disable_nesting===!0){const A=this.ensureNestedDataProperties(u.schema??{},n??{});s={...s,...A}}else s[o]=this.ensureNestedDataProperties(u.schema??{},n[o]??{});else s[o]=n[o]??u.value??"";return s},{})}isVisible(a,n){return a.hasOwnProperty("conditions")?new mB(n,this.values).evaluate(Ke.get(a,"conditions"),Ke.get(a,"condition_type","and")):!0}triggerChange(a){for(let n of this.data.onChangeCallback)n(a)}onDataChanged(a){this.data.onChangeCallback.push(a)}setValue(a,n){Ke.set(this.data.values,a,n),this.data.hasChange=!0,this.triggerChange(this.data.values)}reset(a=!0){if(!this.data.schema||!this.data._originalDefaults)throw new Error("Form is not initialized");const n=a?this.data._originalDefaults:this.data.defaults;return this.data.values=this.ensureNestedDataProperties(this.data.schema,JSON.parse(JSON.stringify(n))),this.data.validationErrors={},this.data.hasChange=!1,this.data.initialized=!0,this}}function fu(){return hB.init()}const _B=["innerHTML"],Ed={__name:"FieldNote",props:{note:String},setup(e){return(t,a)=>(d(),_("div",{class:"form-note",innerHTML:e.note},null,8,_B))}},gB=Object.freeze(Object.defineProperty({__proto__:null,default:Ed},Symbol.toStringTag,{value:"Module"})),Jc=Object.assign({name:"ValidationError"},{__name:"ValidationErrorNew",props:{errorKey:String,form:{type:Object,required:!0}},setup(e){return(t,a)=>e.form.hasValidationError(e.errorKey)?(d(),_("div",{key:0,class:de(`fluent-cart-admin-validation-error-wrapper ${e.errorKey}`)},[(d(!0),_(H,null,ee(e.form.getValidationError(e.errorKey),(n,s)=>(d(),_("span",{class:"fluent-cart-admin-validation-error",key:n.toLowerCase().replace(/\s/g,"")},h(n),1))),128))],2)):x("",!0)}}),Bf={__name:"Resolver",props:pn({name:{type:String,required:!0},field:{type:Object},fieldKey:{type:String},value:{required:!0},variant:{type:String},nesting:{type:Boolean,default:!1},statePath:{type:String},form:{type:Object,required:!0},label:{type:String},attribute:{type:Object},callback:{type:Function}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=kn(e,"modelValue"),a=Object.assign({"./Affix/Test.vue":()=>It(()=>import("./chunks/Test.js?ver=1.4.1"),[],import.meta.url),"./Base/Inputs/Checkbox.vue":()=>It(()=>Promise.resolve().then(()=>UB),void 0,import.meta.url),"./Base/Inputs/ColorPicker.vue":()=>It(()=>Promise.resolve().then(()=>RB),void 0,import.meta.url),"./Base/Inputs/Date.vue":()=>It(()=>Promise.resolve().then(()=>OB),void 0,import.meta.url),"./Base/Inputs/FieldNote.vue":()=>It(()=>Promise.resolve().then(()=>gB),void 0,import.meta.url),"./Base/Inputs/Input.vue":()=>It(()=>Promise.resolve().then(()=>IB),void 0,import.meta.url),"./Base/Inputs/Media.vue":()=>It(()=>Promise.resolve().then(()=>Ak),void 0,import.meta.url),"./Base/Inputs/RadioGroup.vue":()=>It(()=>Promise.resolve().then(()=>DB),void 0,import.meta.url),"./Base/Inputs/RemoteSearchableSelect.vue":()=>It(()=>Promise.resolve().then(()=>KB),void 0,import.meta.url),"./Base/Inputs/Select.vue":()=>It(()=>Promise.resolve().then(()=>NB),void 0,import.meta.url),"./Base/Inputs/Switch.vue":()=>It(()=>Promise.resolve().then(()=>EB),void 0,import.meta.url),"./Base/Inputs/Time.vue":()=>It(()=>Promise.resolve().then(()=>HB),void 0,import.meta.url),"./Base/Layouts/FormGrid.vue":()=>It(()=>Promise.resolve().then(()=>yB),void 0,import.meta.url),"./Base/Layouts/FormSection.vue":()=>It(()=>Promise.resolve().then(()=>kB),void 0,import.meta.url),"./Base/Layouts/FormTab.vue":()=>It(()=>Promise.resolve().then(()=>xB),void 0,import.meta.url),"./Base/Layouts/FormTabPane.vue":()=>It(()=>Promise.resolve().then(()=>SB),void 0,import.meta.url),"./Coupon/BuyProducts.vue":()=>It(()=>import("./chunks/BuyProducts.js?ver=1.4.1"),[],import.meta.url),"./Coupon/Categories.vue":()=>It(()=>import("./chunks/Categories.js?ver=1.4.1"),[],import.meta.url),"./Coupon/Code.vue":()=>It(()=>import("./chunks/Code.js?ver=1.4.1"),[],import.meta.url),"./Coupon/GetProducts.vue":()=>It(()=>import("./chunks/GetProducts.js?ver=1.4.1"),[],import.meta.url),"./Coupon/IncludeExclude/Categories.vue":()=>It(()=>import("./chunks/Categories2.js?ver=1.4.1"),[],import.meta.url),"./Coupon/IncludeExclude/Product.vue":()=>It(()=>import("./chunks/Product.js?ver=1.4.1"),[],import.meta.url),"./Coupon/Products.vue":()=>It(()=>import("./chunks/Products.js?ver=1.4.1"),[],import.meta.url),"./McpSettings.vue":()=>It(()=>import("./chunks/McpSettings.js?ver=1.4.1"),[],import.meta.url),"./ModuleSettings.vue":()=>It(()=>import("./chunks/ModuleSettings.js?ver=1.4.1"),[],import.meta.url),"./PaymentView.vue":()=>It(()=>import("./chunks/PaymentView.js?ver=1.4.1"),[],import.meta.url),"./StoreSettings/AddressComponent.vue":()=>It(()=>import("./chunks/AddressComponent.js?ver=1.4.1"),[],import.meta.url),"./StoreSettings/CreatePageButton.vue":()=>It(()=>import("./chunks/CreatePageButton.js?ver=1.4.1"),[],import.meta.url),"./StoreSettings/PageSelector.vue":()=>It(()=>import("./chunks/PageSelector.js?ver=1.4.1"),[],import.meta.url),"./TurnstileSettings.vue":()=>It(()=>import("./chunks/TurnstileSettings.js?ver=1.4.1"),[],import.meta.url)}),n=Nm(null);Be(()=>{s(o.name)});const s=async u=>{const A=`./${u}.vue`;a[A]&&(n.value=(await a[A]()).default)},o=e;return(u,A)=>(d(),_(H,null,[(d(),E(bn(n.value),la({name:e.name,field:e.field,fieldKey:e.fieldKey,value:e.value,variant:e.variant,nesting:e.nesting,statePath:e.statePath,form:e.form,attribute:e.attribute,label:e.label,callback:e.callback},{modelValue:t.value,"onUpdate:modelValue":A[0]||(A[0]=f=>t.value=f)}),null,16,["modelValue"])),oa(u.$slots,"fieldNote"),oa(u.$slots,"validationError")],64))}},vB=["id"],mu={__name:"FormGrid",props:{field:{type:Object},fieldKey:{type:String},value:{type:Object},statePath:{type:String},form:{type:Object,required:!0}},setup(e){return(t,a)=>{var n,s,o,u,A,f,m,g,y,v;return d(),_("div",{class:"gap-2 grid grid-cols-dynamic sm:grid-cols-sm-dynamic md:grid-cols-md-dynamic lg:grid-cols-lg--dynamic",id:e.field.id||"",style:ia({"--grid-columns":((n=e.field.columns)==null?void 0:n.default)??2,"--sm-grid-columns":((s=e.field.columns)==null?void 0:s.sm)??((o=e.field.columns)==null?void 0:o.default)??2,"--md-grid-columns":((u=e.field.columns)==null?void 0:u.sm)??((A=e.field.columns)==null?void 0:A.md)??((f=e.field.columns)==null?void 0:f.default)??2,"--lg-grid-columns":((m=e.field.columns)==null?void 0:m.lg)??((g=e.field.columns)==null?void 0:g.md)??((y=e.field.columns)==null?void 0:y.sm)??((v=e.field.columns)==null?void 0:v.default)??2})},[l(li,{form:e.form,schema:e.field.schema,value:e.value,statePath:e.statePath},null,8,["form","schema","value","statePath"])],12,vB)}}},yB=Object.freeze(Object.defineProperty({__proto__:null,default:mu},Symbol.toStringTag,{value:"Module"})),bB={key:0,class:"fct-content-card-header"},wB={key:0,class:"title"},CB={key:1,class:"fct-content-card-action"},kf={__name:"ContentCard",props:["title","show_heading"],setup(e){return(t,a)=>(d(),_("div",{class:de({"fct-content-card":e.show_heading!==!1})},[e.show_heading!==!1?(d(),_("div",bB,[e.title||t.$slots.title?(d(),_("div",wB,[oa(t.$slots,"title",{},()=>[R(h(e.title),1)])])):x("",!0),t.$slots.action?(d(),_("div",CB,[oa(t.$slots,"action")])):x("",!0)])):x("",!0),r("div",{class:de({"fct-content-card-body":e.show_heading!==!1})},[oa(t.$slots,"default")],2)],2))}},BB=["id"],xf={__name:"FormSection",props:{field:{type:Object},fieldKey:{type:String},value:{type:Object},variant:{type:String},nesting:{type:Boolean,default:!1},statePath:{type:String},form:{type:Object,required:!0}},setup(e){return(t,a)=>(d(),_("div",{class:"form-section",id:e.field.id||""},[l(he,null,{default:i(()=>[e.field.show_title!==!1?(d(),E(Ce,{key:0,title:e.field.title,border_bottom:""},null,8,["title"])):x("",!0),l(me,null,{default:i(()=>[l(mu,{form:e.form,field:e.field,statePath:e.statePath,value:e.value},null,8,["form","field","statePath","value"])]),_:1})]),_:1})],8,BB))}},kB=Object.freeze(Object.defineProperty({__proto__:null,default:xf},Symbol.toStringTag,{value:"Module"})),Sf={__name:"FormTab",props:{field:{type:Object},value:{type:Object},statePath:{type:String},form:{type:Object,required:!0}},setup(e){const t=e,a=V(""),n=V([]),s=ja(),o=m=>{const g=m.props.name;u(g)},u=m=>{const g=new URL(window.location.href);g.hash=`#/settings/${m}`,window.history.replaceState(null,"",g.toString())},A=()=>{const g=window.location.hash.split("/").pop().split("#")[0];n.value=Object.keys(t.field.schema);const y=n.value.find(v=>v===g);y?a.value=y:a.value=t.field.default_tab};let f;return Be(()=>{f=s.beforeEach((m,g,y)=>{y(),setTimeout(()=>{A()},200)}),A()}),At(()=>{f&&f()}),(m,g)=>{const y=C("el-tabs");return d(),E(y,{modelValue:a.value,"onUpdate:modelValue":g[0]||(g[0]=v=>a.value=v),class:de(["fct-tabs-button",{"hidden-switch":e.field.hide_tab_switch}]),onTabClick:o,type:"card"},{default:i(()=>[l(li,{form:e.form,schema:e.field.schema,value:e.value,"state-path":e.statePath},null,8,["form","schema","value","state-path"])]),_:1},8,["modelValue","class"])}}},xB=Object.freeze(Object.defineProperty({__proto__:null,default:Sf},Symbol.toStringTag,{value:"Module"})),Ff={__name:"FormTabPane",props:{fieldKey:{type:String},field:{type:Object},value:{type:Object},statePath:{type:String},form:{type:Object,required:!0}},setup(e){return(t,a)=>{const n=C("el-tab-pane");return d(),E(n,{label:e.field.title,name:e.fieldKey},{default:i(()=>[l(li,{form:e.form,schema:e.field.schema,value:e.value,statePath:e.statePath},null,8,["form","schema","value","statePath"])]),_:1},8,["label","name"])}}},SB=Object.freeze(Object.defineProperty({__proto__:null,default:Ff},Symbol.toStringTag,{value:"Module"}));class hu{}Ee(hu,"attributesBuilders",async(t,a,n)=>{if(t.attributes||(t.attributes={}),t.class&&(t.attributes.class=t.class),t.placeholder&&(t.attributes.placeholder=t.placeholder),typeof a!="function")return t.attributes??{};let s={};typeof t.events!="object"&&(s={}),s.hasOwnProperty("onChange")&&typeof s.onChange=="function"?s.onChange=(...o)=>{n.data.hasChange=!0,s.onChange(o)}:s.onChange=()=>{n.data.hasChange=!0};for(let o in t.events)s[o]=(...u)=>{a(t.events[o],u)};for(let o in t.attributes??{}){let u=t.attributes[o];typeof u=="function"&&await a(u,{})}return{...t.attributes??{},...s}});const FB={__name:"LayoutRenderer",props:{form:{type:Object,required:!0},field:{type:Object,required:!0},value:{type:Object,required:!0},statePath:{type:String,required:!0},fieldKey:{type:String,required:!0},fullStatePath:{type:String,required:!0}},setup(e){const t=e;Qt().ctx;const a=(o,u)=>{if(typeof o=="function")return o({data:t.value,form:t.form,statePath:t.statePath,field:t.field,event:Array.isArray(u)&&u.length===1?u[0]:u})},n=V(!1),s=V({});return Be(async()=>{s.value=await hu.attributesBuilders(t.field,a,t.form),n.value=!0}),(o,u)=>(d(),_(H,null,[e.field.type==="grid"&&typeof e.field.schema<"u"?(d(),E(mu,la({key:0,class:e.field.wrapperClass,form:e.form,field:e.field,value:e.value,fieldKey:e.fieldKey,statePath:e.fullStatePath},s.value),null,16,["class","form","field","value","fieldKey","statePath"])):x("",!0),e.field.type==="tab"&&typeof e.field.schema<"u"?(d(),E(Sf,la({key:1,form:e.form,field:e.field,value:e.value,statePath:e.fullStatePath},s.value),null,16,["form","field","value","statePath"])):x("",!0),e.field.type==="tab-pane"&&typeof e.field.schema<"u"&&typeof e.field.title<"u"?(d(),E(Ff,la({key:2,form:e.form,field:e.field,value:e.value,fieldKey:e.fieldKey,statePath:e.fullStatePath},s.value),null,16,["form","field","value","fieldKey","statePath"])):x("",!0),e.field.type==="section"?(d(),E(xf,la({key:3,form:e.form,statePath:e.field.disable_nesting===!0?e.fullStatePath:e.fieldKey+".",field:e.field,"field-key":e.fieldKey,value:e.field.disable_nesting===!0?e.value:e.value[e.fieldKey],nesting:e.field.disable_nesting===!0},s.value),null,16,["form","statePath","field","field-key","value","nesting"])):x("",!0)],64))}},Ef={__name:"Switch",props:pn({name:{type:String,required:!0},field:{type:Object},fieldKey:{type:String},value:{required:!0},variant:{type:String},nesting:{type:Boolean,default:!1},statePath:{type:String},form:{type:Object,required:!0},callback:{type:Function,required:!0},label:{type:String},attribute:{required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=kn(e,"modelValue");return(a,n)=>{const s=C("el-switch");return d(),E(s,la({modelValue:t.value,"onUpdate:modelValue":n[0]||(n[0]=o=>t.value=o),disabled:e.field.disabled},e.attribute),null,16,["modelValue","disabled"])}}},EB=Object.freeze(Object.defineProperty({__proto__:null,default:Ef},Symbol.toStringTag,{value:"Module"})),Uf={__name:"Checkbox",props:pn({name:{type:String,required:!0},field:{type:Object},fieldKey:{type:String},value:{required:!0},variant:{type:String},nesting:{type:Boolean,default:!1},statePath:{type:String},form:{type:Object,required:!0},callback:{type:Function,required:!0},label:{type:String},attribute:{required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=kn(e,"modelValue");return(a,n)=>{const s=C("el-checkbox");return d(),E(s,la({modelValue:t.value,"onUpdate:modelValue":n[0]||(n[0]=o=>t.value=o)},e.attribute,{"true-value":"yes","false-value":"no",disabled:e.field.disabled}),{default:i(()=>[R(h(e.label),1)]),_:1},16,["modelValue","disabled"])}}},UB=Object.freeze(Object.defineProperty({__proto__:null,default:Uf},Symbol.toStringTag,{value:"Module"})),$B=["innerHTML"],$f={__name:"RadioGroup",props:pn({field:{type:Object},statePath:{type:String},value:{required:!0},form:{type:Object},callback:{type:Function,required:!0},label:{type:String},attribute:{required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=kn(e,"modelValue"),a=e,n=V([]),s=async(o="")=>{if(typeof a.field.options=="function")return n.value=await a.field.options({data:a.value,form:a.form,statePath:a.statePath,search:o});if(Array.isArray(a.field.options))return n.value=[...a.field.options]};return Be(async()=>{await s()}),(o,u)=>{const A=C("el-radio"),f=C("el-radio-group");return d(),E(f,la({modelValue:t.value,"onUpdate:modelValue":u[0]||(u[0]=m=>t.value=m)},e.attribute),{default:i(()=>[(d(!0),_(H,null,ee(e.field.options,(m,g)=>(d(),E(A,{key:g,value:m.value,class:de(m.option_class)},{default:i(()=>[r("div",null,h(m.label),1),r("div",{innerHTML:m.note},null,8,$B)]),_:2},1032,["value","class"]))),128))]),_:1},16,["modelValue"])}}},DB=Object.freeze(Object.defineProperty({__proto__:null,default:$f},Symbol.toStringTag,{value:"Module"})),QB=["innerHTML"],ul={__name:"Input",props:pn({name:{type:String,required:!0},field:{type:Object},fieldKey:{type:String},value:{required:!0},variant:{type:String},nesting:{type:Boolean,default:!1},statePath:{type:String},form:{type:Object,required:!0},callback:{type:Function,required:!0},label:{type:String},attribute:{required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=Qt().ctx,a=kn(e,"modelValue"),n=e,s=V(),o=async()=>{typeof n.field.prefix=="function"?s.value=await n.callback(n.field.prefix):s.value=n.field.prefix};return Be(()=>{o()}),Km(()=>{o()}),j(()=>n.fieldKey==="amount"?n.form.data.values.type==="fixed"?Ie.shop.get("currency_sign"):"%":t.appVars.shop.currency_sign),(u,A)=>{var m;const f=C("el-input");return d(),E(f,la({modelValue:a.value,"onUpdate:modelValue":A[0]||(A[0]=g=>a.value=g)},e.attribute,{disabled:e.field.disabled}),Rt({_:2},[(m=e.field.prefix)!=null&&m.component?{name:"prefix",fn:i(()=>[l(Bf,{form:e.form,name:e.field.prefix.component,field:e.field,value:e.value},null,8,["form","name","field","value"])]),key:"0"}:e.field.prefix?{name:"prefix",fn:i(()=>[r("div",{innerHTML:s.value},null,8,QB)]),key:"1"}:void 0]),1040,["modelValue","disabled"])}}},IB=Object.freeze(Object.defineProperty({__proto__:null,default:ul},Symbol.toStringTag,{value:"Module"})),TB={class:"fct-color-picker-box"},VB={class:"fct-color-picker-trigger-wrap"},MB={key:0,class:"text-xs text-system-light"},LB={key:1,class:"fct-color-picker-action-wrap"},_u={__name:"ColorPicker",props:pn({field:{type:Object},statePath:{type:String},value:{required:!0},form:{type:Object},callback:{type:Function,required:!0},label:{type:String},attribute:{required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=kn(e,"modelValue"),a=n=>{t.value=""};return(n,s)=>{const o=C("el-color-picker");return d(),_("div",TB,[r("div",VB,[l(o,la({modelValue:t.value,"onUpdate:modelValue":s[0]||(s[0]=u=>t.value=u)},e.attribute,{disabled:e.field.disabled,"popper-class":"fct-color-picker-popover"}),null,16,["modelValue","disabled"]),t.value?x("",!0):(d(),E(W,{key:0,name:"ColorPicker",class:"fct-color-picker-icon w-4 h-4"}))]),t.value?x("",!0):(d(),_("span",MB,h(p(c)("Add...")),1)),t.value?(d(),_("div",LB,[r("span",null,h(t.value),1),l(W,{name:"Cross",class:"fct-color-picker-action w-5 h-5",onClick:s[1]||(s[1]=u=>a(n.fieldKey))})])):x("",!0)])}}},RB=Object.freeze(Object.defineProperty({__proto__:null,default:_u},Symbol.toStringTag,{value:"Module"})),Df={__name:"Date",props:pn({name:{type:String,required:!0},field:{type:Object},fieldKey:{type:String},value:{required:!0},variant:{type:String},nesting:{type:Boolean,default:!1},statePath:{type:String},form:{type:Object,required:!0},callback:{type:Function,required:!0},label:{type:String},attribute:{required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=kn(e,"modelValue");return(a,n)=>{const s=C("el-date-picker");return d(),E(s,la({modelValue:t.value,"onUpdate:modelValue":n[0]||(n[0]=o=>t.value=o)},e.attribute,{disabled:e.field.disabled}),null,16,["modelValue","disabled"])}}},OB=Object.freeze(Object.defineProperty({__proto__:null,default:Df},Symbol.toStringTag,{value:"Module"})),Qf={__name:"Time",props:pn({name:{type:String,required:!0},field:{type:Object},fieldKey:{type:String},value:{required:!0},variant:{type:String},nesting:{type:Boolean,default:!1},statePath:{type:String},form:{type:Object,required:!0},callback:{type:Function,required:!0},label:{type:String},attribute:{required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=kn(e,"modelValue");return(a,n)=>{const s=C("el-time-select");return d(),E(s,la({modelValue:t.value,"onUpdate:modelValue":n[0]||(n[0]=o=>t.value=o)},e.attribute,{disabled:e.field.disabled}),null,16,["modelValue","disabled"])}}},HB=Object.freeze(Object.defineProperty({__proto__:null,default:Qf},Symbol.toStringTag,{value:"Module"})),PB={key:0},If={__name:"Select",props:pn({name:{type:String,required:!0},field:{type:Object},fieldKey:{type:String},value:{required:!0},variant:{type:String},nesting:{type:Boolean,default:!1},statePath:{type:String},form:{type:Object,required:!0},callback:{type:Function,required:!0},label:{type:String},attribute:{required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=kn(e,"modelValue"),a=e,n=V([]),s=V(!1),o=async(A="")=>{s.value=!0,typeof a.field.options=="function"&&(n.value=await a.field.options({data:a.value,form:a.form,statePath:a.statePath,search:A})),Array.isArray(a.field.options)&&(n.value=[...a.field.options]),s.value=!1};Be(async()=>{await o()});const u=A=>typeof A.disabled=="function"?a.callback(A.disabled,{}):A.disabled;return(A,f)=>{const m=C("el-option"),g=C("el-select");return d(),E(g,la({modelValue:t.value,"onUpdate:modelValue":f[0]||(f[0]=y=>t.value=y)},e.attribute,{"remote-method":o,loading:s.value,filterable:e.field.filterable===!0,clearable:e.field.clearable===!0,disabled:e.field.disabled}),{default:i(()=>[(d(!0),_(H,null,ee(n.value,(y,v)=>(d(),E(m,{key:v,value:y.value,label:y.label,disabled:u(y)},{default:i(()=>[y.slot?(d(),_("span",PB,h(y.slot),1)):x("",!0)]),_:2},1032,["value","label","disabled"]))),128))]),_:1},16,["modelValue","loading","filterable","clearable","disabled"])}}},NB=Object.freeze(Object.defineProperty({__proto__:null,default:If},Symbol.toStringTag,{value:"Module"})),Tf={__name:"RemoteSearchableSelect",props:pn({field:{type:Object},key:{type:String}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=kn(e,"modelValue"),a=e,n=V(!1),s=V(a.field.options||[]),o=u=>{if(a.field.search_only_on_type===!0){if(u.query.length===0)return}else if(u.query.length<1&&s.value.length>0)return;n.value=!0,re.get("forms/search_options",{search_by:u.query,search_for:u.key}).then(A=>{s.value=A.options,n.value=!1})};return(u,A)=>{const f=C("el-option"),m=C("el-select");return d(),E(m,{modelValue:t.value,"onUpdate:modelValue":A[0]||(A[0]=g=>t.value=g),filterable:"",remote:"",placeholder:e.field.placeholder??p(c)("Please enter a keyword"),"remote-method":g=>{o({query:g,key:e.field.remote_key})},loading:n.value,multiple:e.field.multiple},{default:i(()=>[(d(!0),_(H,null,ee(s.value,g=>(d(),E(f,{key:g.value,label:g.label,value:g.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder","remote-method","loading","multiple"])}}},KB=Object.freeze(Object.defineProperty({__proto__:null,default:Tf},Symbol.toStringTag,{value:"Module"}));function xl(e,t){t===void 0&&(t={});var a=t.insertAt;if(e&&typeof document<"u"){var n=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css",a==="top"&&n.firstChild?n.insertBefore(s,n.firstChild):n.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}}xl(".vel-fade-enter-active,.vel-fade-leave-active{-webkit-transition:all .3s ease;transition:all .3s ease}.vel-fade-enter-from,.vel-fade-leave-to{opacity:0}.vel-img-swiper{display:block;position:relative}.vel-modal{background:rgba(0,0,0,.5);bottom:0;left:0;margin:0;position:fixed;right:0;top:0;z-index:9998}.vel-img-wrapper{left:50%;margin:0;position:absolute;top:50%;-webkit-transform:translate(-50% -50%);transform:translate(-50% -50%);-webkit-transition:.3s linear;transition:.3s linear;will-change:transform opacity}.vel-img,.vel-img-wrapper{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vel-img{background-color:rgba(0,0,0,.7);-webkit-box-shadow:0 5px 20px 2px rgba(0,0,0,.7);box-shadow:0 5px 20px 2px rgba(0,0,0,.7);display:block;max-height:80vh;max-width:80vw;position:relative;-webkit-transition:-webkit-transform .3s ease-in-out;transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;transition:transform .3s ease-in-out,-webkit-transform .3s ease-in-out}@media (max-width:750px){.vel-img{max-height:95vh;max-width:85vw}}.vel-btns-wrapper{position:static}.vel-btns-wrapper .btn__close,.vel-btns-wrapper .btn__next,.vel-btns-wrapper .btn__prev{-webkit-tap-highlight-color:transparent;color:#fff;cursor:pointer;font-size:32px;opacity:.6;outline:none;position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);-webkit-transition:.15s linear;transition:.15s linear;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vel-btns-wrapper .btn__close:hover,.vel-btns-wrapper .btn__next:hover,.vel-btns-wrapper .btn__prev:hover{opacity:1}.vel-btns-wrapper .btn__close.disable,.vel-btns-wrapper .btn__close.disable:hover,.vel-btns-wrapper .btn__next.disable,.vel-btns-wrapper .btn__next.disable:hover,.vel-btns-wrapper .btn__prev.disable,.vel-btns-wrapper .btn__prev.disable:hover{cursor:default;opacity:.2}.vel-btns-wrapper .btn__next{right:12px}.vel-btns-wrapper .btn__prev{left:12px}.vel-btns-wrapper .btn__close{right:10px;top:24px}@media (max-width:750px){.vel-btns-wrapper .btn__next,.vel-btns-wrapper .btn__prev{font-size:20px}.vel-btns-wrapper .btn__close{font-size:24px}.vel-btns-wrapper .btn__next{right:4px}.vel-btns-wrapper .btn__prev{left:4px}}.vel-modal.is-rtl .vel-btns-wrapper .btn__next{left:12px;right:auto}.vel-modal.is-rtl .vel-btns-wrapper .btn__prev{left:auto;right:12px}@media (max-width:750px){.vel-modal.is-rtl .vel-btns-wrapper .btn__next{left:4px;right:auto}.vel-modal.is-rtl .vel-btns-wrapper .btn__prev{left:auto;right:4px}}.vel-modal.is-rtl .vel-img-title{direction:rtl}");xl('.vel-loading{left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.vel-loading .ring{display:inline-block;height:64px;width:64px}.vel-loading .ring:after{-webkit-animation:ring 1.2s linear infinite;animation:ring 1.2s linear infinite;border-color:hsla(0,0%,100%,.7) transparent;border-radius:50%;border-style:solid;border-width:5px;content:" ";display:block;height:46px;margin:1px;width:46px}@-webkit-keyframes ring{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes ring{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}');xl(".vel-on-error{left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.vel-on-error .icon{color:#aaa;font-size:80px}");xl(".vel-img-title{bottom:60px;color:#ccc;cursor:default;font-size:12px;left:50%;line-height:1;max-width:80%;opacity:.8;overflow:hidden;position:absolute;text-align:center;text-overflow:ellipsis;-webkit-transform:translate(-50%);transform:translate(-50%);-webkit-transition:opacity .15s;transition:opacity .15s;white-space:nowrap}.vel-img-title:hover{opacity:1}");xl(".vel-icon{fill:currentColor;height:1em;overflow:hidden;vertical-align:-.15em;width:1em}");xl(".vel-toolbar{border-radius:4px;bottom:8px;display:-webkit-box;display:-ms-flexbox;display:flex;left:50%;opacity:.9;overflow:hidden;padding:0;position:absolute;-webkit-transform:translate(-50%);transform:translate(-50%)}.vel-toolbar,.vel-toolbar .toolbar-btn{background-color:#2d2d2d;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vel-toolbar .toolbar-btn{-ms-flex-negative:0;-webkit-tap-highlight-color:transparent;color:#fff;cursor:pointer;flex-shrink:0;font-size:20px;outline:none;padding:6px 10px}.vel-toolbar .toolbar-btn:active,.vel-toolbar .toolbar-btn:hover{background-color:#3d3d3d}");const vn="vel",Dn=Hn({name:"SvgIcon",props:{type:{type:String,default:""}},setup:e=>()=>l("svg",{class:`${vn}-icon icon`,"aria-hidden":"true"},[l("use",{"xlink:href":`#icon-${e.type}`},null)])}),ni=typeof window<"u",cl=()=>{};let Vf=!1;if(ni)try{const e={};Object.defineProperty(e,"passive",{get(){Vf=!0}}),window.addEventListener("test-passive",cl,e)}catch{}const Zc=function(e,t,a){let n=arguments.length>3&&arguments[3]!==void 0&&arguments[3];ni&&e.addEventListener(t,a,!!Vf&&{capture:!1,passive:n})},eA=(e,t,a)=>{ni&&e.removeEventListener(t,a)},GB=e=>{e.preventDefault()},jB=Object.prototype.toString,gu=e=>t=>jB.call(t).slice(8,-1)===e,zB=e=>!!e&&gu("Object")(e),tA=e=>!!e&&gu("String")(e);function YB(e){return e!=null}const qB=Hn({name:"Toolbar",props:{zoomIn:{type:Function,default:cl},zoomOut:{type:Function,default:cl},rotateLeft:{type:Function,default:cl},rotateRight:{type:Function,default:cl},resize:{type:Function,default:cl},rotateDisabled:{type:Boolean,default:!1},zoomDisabled:{type:Boolean,default:!1}},setup:e=>()=>l("div",{class:`${vn}-toolbar`},[!e.zoomDisabled&&l(H,null,[l("div",{role:"button","aria-label":"zoom in button",class:"toolbar-btn toolbar-btn__zoomin",onClick:e.zoomIn},[l(Dn,{type:"zoomin"},null)]),l("div",{role:"button","aria-label":"zoom out button",class:"toolbar-btn toolbar-btn__zoomout",onClick:e.zoomOut},[l(Dn,{type:"zoomout"},null)])]),l("div",{role:"button","aria-label":"resize image button",class:"toolbar-btn toolbar-btn__resize",onClick:e.resize},[l(Dn,{type:"resize"},null)]),!e.rotateDisabled&&l(H,null,[l("div",{role:"button","aria-label":"image rotate left button",class:"toolbar-btn toolbar-btn__rotate",onClick:e.rotateLeft},[l(Dn,{type:"rotate-left"},null)]),l("div",{role:"button","aria-label":"image rotate right button",class:"toolbar-btn toolbar-btn__rotate",onClick:e.rotateRight},[l(Dn,{type:"rotate-right"},null)])])])}),WB=()=>l("div",{class:`${vn}-loading`},[l("div",{class:"ring"},null)]),XB=()=>l("div",{class:`${vn}-on-error`},[l("div",{class:"ring"},null),l(Dn,{type:"img-broken"},null)]),JB=(e,t)=>{let{slots:a}=t;return l("div",{class:`${vn}-img-title`},[a.default?a.default():""])},ZB=Hn({name:"DefaultIcons",setup:()=>()=>l("svg",{"aria-hidden":!0,style:"position: absolute; width: 0; height: 0; overflow: hidden; visibility: hidden;"},[l("symbol",{id:"icon-rotate-right",viewBox:"0 0 1024 1024"},[l("path",{d:"M275.199914 450.496179v20.031994c0.384-38.079988 12.543996-67.423979 36.479989-87.967973 22.431993-20.351994 49.215985-30.55999 80.319975-30.55999 32.06399 0 59.295981 10.175997 81.759974 30.55999 22.815993 20.543994 34.591989 49.887984 35.359989 87.967973v123.935961c-0.768 37.887988-12.543996 67.135979-35.359989 87.679973-22.431993 20.351994-49.695984 30.75199-81.759974 31.10399a120.255962 120.255962 0 0 1-72.991978-24.895992c-21.503993-15.839995-35.359989-38.751988-41.567987-68.735979h60.831981c9.247997 23.007993 27.167992 34.495989 53.759983 34.49599 37.535988-0.384 56.863982-21.407993 57.983982-63.071981v-38.751988c-28.095991 8.863997-54.303983 13.119996-78.623975 12.735996a91.263971 91.263971 0 0 1-68.447979-27.711991c-18.847994-18.303994-28.095991-47.231985-27.711991-86.847973z m62.55998 24.863992c7.103998 24.799992 25.215992 37.343988 54.271983 37.663989 27.103992-0.288 44.703986-11.327996 52.831984-33.11999 3.135999-8.383997 2.655999-29.599991-1.28-38.559988-8.607997-19.615994-25.791992-29.695991-51.551984-30.20799-28.383991 0.576-46.303986 12.639996-53.759983 36.159988a58.719982 58.719982 0 0 0-0.512 28.063991z m390.335878 115.711964v-116.895963c-1.12-41.311987-20.447994-62.335981-57.983981-63.07198-37.727988 0.768-56.959982 21.791993-57.695982 63.07198v116.895963c0.768 41.663987 19.999994 62.68798 57.695982 63.071981 37.535988-0.384 56.863982-21.407993 57.983981-63.071981z m-174.815945 3.391999v-123.935961c0.384-38.079988 12.543996-67.423979 36.479989-87.967973 22.431993-20.351994 49.215985-30.55999 80.319975-30.55999 32.06399 0 59.295981 10.175997 81.759974 30.55999 22.815993 20.543994 34.591989 49.887984 35.359989 87.967973v123.935961c-0.768 37.887988-12.543996 67.135979-35.359989 87.679973-22.431993 20.351994-49.695984 30.75199-81.759974 31.10399-31.10399-0.384-57.887982-10.751997-80.319975-31.10399-23.935993-20.543994-36.127989-49.791984-36.479989-87.679973z m282.559912-479.07185A509.887841 509.887841 0 0 0 511.99984 0.00032C229.215928 0.00032 0 229.216248 0 512.00016s229.215928 511.99984 511.99984 511.99984 511.99984-229.215928 511.99984-511.99984c0-3.743999-0.032-7.455998-0.128-11.167997-1.631999-11.295996-8.159997-27.103992-31.87199-27.103991-27.487991 0-31.67999 21.247993-32.03199 32.06399l0.032 4.127999a30.62399 30.62399 0 0 0 0.16 2.079999H959.9997c0 247.423923-200.575937 447.99986-447.99986 447.99986S63.99998 759.424083 63.99998 512.00016 264.575917 64.0003 511.99984 64.0003a446.079861 446.079861 0 0 1 277.439913 96.22397l-94.91197 91.679971c-25.439992 24.607992-17.439995 44.991986 17.887994 45.599986l188.031942 3.295999a64.31998 64.31998 0 0 0 65.055979-62.84798l3.295999-188.127942C969.407697 15.040315 949.311703 5.792318 923.871711 30.368311l-87.999972 85.023973z",fill:""},null)]),l("symbol",{id:"icon-rotate-left",viewBox:"0 0 1024 1024"},[l("path",{d:"M275.199914 450.496179v20.031994c0.384-38.079988 12.543996-67.423979 36.479989-87.967973 22.431993-20.351994 49.215985-30.55999 80.319975-30.55999 32.06399 0 59.295981 10.175997 81.759974 30.55999 22.815993 20.543994 34.591989 49.887984 35.359989 87.967973v123.935961c-0.768 37.887988-12.543996 67.135979-35.359989 87.679973-22.431993 20.351994-49.695984 30.75199-81.759974 31.10399a120.255962 120.255962 0 0 1-72.991978-24.895992c-21.503993-15.839995-35.359989-38.751988-41.567987-68.735979h60.831981c9.247997 23.007993 27.167992 34.495989 53.759983 34.49599 37.535988-0.384 56.863982-21.407993 57.983982-63.071981v-38.751988c-28.095991 8.863997-54.303983 13.119996-78.623975 12.735996a91.263971 91.263971 0 0 1-68.447979-27.711991c-18.847994-18.303994-28.095991-47.231985-27.711991-86.847973z m62.55998 24.863992c7.103998 24.799992 25.215992 37.343988 54.271983 37.663989 27.103992-0.288 44.703986-11.327996 52.831984-33.11999 3.135999-8.383997 2.655999-29.599991-1.28-38.559988-8.607997-19.615994-25.791992-29.695991-51.551984-30.20799-28.383991 0.576-46.303986 12.639996-53.759983 36.159988a58.719982 58.719982 0 0 0-0.512 28.063991z m390.335878 115.711964v-116.895963c-1.12-41.311987-20.447994-62.335981-57.983981-63.07198-37.727988 0.768-56.959982 21.791993-57.695982 63.07198v116.895963c0.768 41.663987 19.999994 62.68798 57.695982 63.071981 37.535988-0.384 56.863982-21.407993 57.983981-63.071981z m-174.815945 3.391999v-123.935961c0.384-38.079988 12.543996-67.423979 36.479989-87.967973 22.431993-20.351994 49.215985-30.55999 80.319975-30.55999 32.06399 0 59.295981 10.175997 81.759974 30.55999 22.815993 20.543994 34.591989 49.887984 35.359989 87.967973v123.935961c-0.768 37.887988-12.543996 67.135979-35.359989 87.679973-22.431993 20.351994-49.695984 30.75199-81.759974 31.10399-31.10399-0.384-57.887982-10.751997-80.319975-31.10399-23.935993-20.543994-36.127989-49.791984-36.479989-87.679973zM188.159941 115.392284A509.887841 509.887841 0 0 1 511.99984 0.00032c282.783912 0 511.99984 229.215928 511.99984 511.99984s-229.215928 511.99984-511.99984 511.99984S0 794.784072 0 512.00016c0-3.743999 0.032-7.455998 0.128-11.167997 1.631999-11.295996 8.159997-27.103992 31.87199-27.103991 27.487991 0 31.67999 21.247993 32.03199 32.06399L63.99998 509.920161a30.62399 30.62399 0 0 1-0.16 2.079999H63.99998c0 247.423923 200.575937 447.99986 447.99986 447.99986s447.99986-200.575937 447.99986-447.99986S759.423763 64.0003 511.99984 64.0003a446.079861 446.079861 0 0 0-277.439913 96.22397l94.91197 91.679971c25.439992 24.607992 17.439995 44.991986-17.887994 45.599986L123.551961 300.800226a64.31998 64.31998 0 0 1-65.055979-62.84798l-3.295999-188.127942C54.591983 15.040315 74.687977 5.792318 100.127969 30.368311l87.999972 85.023973z",fill:""},null)]),l("symbol",{id:"icon-resize",viewBox:"0 0 1024 1024"},[l("path",{d:"M456.036919 791.8108 270.553461 791.8108 460.818829 601.572038l-39.593763-39.567157L231.314785 751.915162l0.873903-183.953615c0-15.465227-12.515035-27.981285-27.981285-27.981285s-27.981285 12.515035-27.981285 27.981285l0 251.829516c0 8.3072 3.415796 14.975063 8.826016 19.564591 5.082762 5.192256 12.132318 8.416693 19.947308 8.416693l251.036453 0c15.46625 0 27.981285-12.514012 27.981285-27.981285C484.018204 804.325835 471.504192 791.8108 456.036919 791.8108zM838.945819 184.644347c-5.082762-5.191232-12.132318-8.416693-19.947308-8.416693L567.961034 176.227654c-15.46625 0-27.981285 12.515035-27.981285 27.981285 0 15.46625 12.514012 27.981285 27.981285 27.981285l185.483458 0L563.206754 422.427962l39.567157 39.567157 189.910281-189.910281-0.873903 183.953615c0 15.46625 12.514012 27.981285 27.981285 27.981285s27.981285-12.514012 27.981285-27.981285L847.772858 204.208938C847.771835 195.902762 844.356039 189.234899 838.945819 184.644347zM847.771835 64.303538 176.227142 64.303538c-61.809741 0-111.924115 50.115398-111.924115 111.924115l0 671.544693c0 61.809741 50.114374 111.924115 111.924115 111.924115l671.544693 0c61.809741 0 111.924115-50.114374 111.924115-111.924115l0-671.544693C959.69595 114.418936 909.581576 64.303538 847.771835 64.303538zM903.733381 847.772346c0 30.878265-25.056676 55.962569-55.962569 55.962569L176.227142 903.734916c-30.90487 0-55.962569-25.084305-55.962569-55.962569l0-671.544693c0-30.9325 25.056676-55.962569 55.962569-55.962569l671.544693 0c30.90487 0 55.962569 25.03007 55.962569 55.962569L903.734404 847.772346z"},null)]),l("symbol",{id:"icon-img-broken",viewBox:"0 0 1024 1024"},[l("path",{d:"M810.666667 128H213.333333c-46.933333 0-85.333333 38.4-85.333333 85.333333v597.333334c0 46.933333 38.4 85.333333 85.333333 85.333333h597.333334c46.933333 0 85.333333-38.4 85.333333-85.333333V213.333333c0-46.933333-38.4-85.333333-85.333333-85.333333z m0 682.666667H213.333333v-195.413334l42.24 42.24 170.666667-170.666666 170.666667 170.666666 170.666666-170.24L810.666667 530.346667V810.666667z m0-401.493334l-43.093334-43.093333-170.666666 171.093333-170.666667-170.666666-170.666667 170.666666-42.24-42.666666V213.333333h597.333334v195.84z"},null)]),l("symbol",{id:"icon-prev",viewBox:"0 0 1024 1024"},[l("path",{d:"M784.652701 955.6957 346.601985 517.644983c-2.822492-2.822492-2.822492-7.902977 0-11.289967l439.179713-439.179713c6.77398-6.77398 10.725469-16.370452 10.725469-25.966924L796.507166 36.692393c0-20.32194-16.370452-36.692393-36.692393-36.692393l-4.515987 0c-9.596472 0-19.192944 3.951488-25.966924 10.725469L250.072767 489.420066c-12.418964 12.418964-12.418964 32.740904 0 45.159868l477.565601 477.565601c7.338479 7.338479 17.499449 11.854465 28.224917 11.854465l0 0c22.015436 0 40.079383-18.063947 40.079383-40.079383l0 0C796.507166 973.759647 791.99118 963.598677 784.652701 955.6957z"},null)]),l("symbol",{id:"icon-next",viewBox:"0 0 1024 1024"},[l("path",{d:"M246.121279 955.6957l438.050717-438.050717c2.822492-2.822492 2.822492-7.902977 0-11.289967L244.992282 67.175303c-6.77398-6.77398-10.725469-16.370452-10.725469-25.966924L234.266814 36.692393C234.266814 16.370452 250.637266 0 270.959206 0l4.515987 0c9.596472 0 19.192944 3.951488 25.966924 10.725469l478.694598 478.694598c12.418964 12.418964 12.418964 32.740904 0 45.159868l-477.565601 477.565601c-7.338479 7.338479-17.499449 11.854465-28.224917 11.854465l0 0c-22.015436 0-40.079383-18.063947-40.079383-40.079383l0 0C234.266814 973.759647 238.7828 963.598677 246.121279 955.6957z"},null)]),l("symbol",{id:"icon-zoomin",viewBox:"0 0 1024 1024"},[l("path",{d:"M725.504 652.864c46.4-61.44 71.744-136.448 71.744-218.752C797.248 230.464 632.768 64 430.656 64S64 230.464 64 434.112C64 639.36 228.48 805.76 430.656 805.76c86.656 0 164.48-30.144 227.52-81.088L889.984 960 960 891.264l-234.496-238.4z m-294.848 67.456c-155.776 0-282.624-128.896-282.624-286.208s126.848-286.208 282.624-286.208 282.624 128.896 282.624 286.208-126.912 286.208-282.624 286.208z"},null),l("path",{d:"M235.712 369.92h390.72v127.104H235.712z"},null),l("path",{d:"M367.488 238.144h127.104v390.72H367.488z"},null)]),l("symbol",{id:"icon-close",viewBox:"0 0 1024 1024"},[l("path",{d:"M570.24 512l259.2 259.2-58.88 58.24L512 570.24l-261.12 261.12-58.24-58.24L453.76 512 194.56 252.8l58.24-58.24L512 453.76l261.12-261.12 58.24 58.24z"},null)]),l("symbol",{id:"icon-zoomout",viewBox:"0 0 1024 1024"},[l("path",{d:"M725.504 652.864c46.4-61.44 71.744-136.448 71.744-218.752C797.248 230.464 632.768 64 430.656 64S64 230.464 64 434.112C64 639.36 228.48 805.76 430.656 805.76c86.656 0 164.48-30.144 227.52-81.088L889.984 960 960 891.264l-234.496-238.4z m-294.848 67.456c-155.776 0-282.624-128.896-282.624-286.208s126.848-286.208 282.624-286.208 282.624 128.896 282.624 286.208-126.912 286.208-282.624 286.208z"},null),l("path",{d:"M235.712 369.92h390.72v127.104H235.712z"},null)])])}),Wl=ni?window:global;let aA=Date.now();function ek(e){const t=Date.now(),a=Math.max(0,16-(t-aA)),n=setTimeout(e,a);return aA=t+a,n}function Ii(e){return(Wl.requestAnimationFrame||ek).call(Wl,e)}function nA(e){(Wl.cancelAnimationFrame||Wl.clearTimeout).call(Wl,e)}function sA(e,t){const a=e.clientX-t.clientX,n=e.clientY-t.clientY;return Math.sqrt(a*a+n*n)}function Ti(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Gm(e)}var Vi=Hn({name:"VueEasyLightbox",props:{imgs:{type:[Array,String],default:()=>""},visible:{type:Boolean,default:!1},index:{type:Number,default:0},scrollDisabled:{type:Boolean,default:!0},escDisabled:{type:Boolean,default:!1},moveDisabled:{type:Boolean,default:!1},titleDisabled:{type:Boolean,default:!1},maskClosable:{type:Boolean,default:!0},teleport:{type:[String,Object],default:null},swipeTolerance:{type:Number,default:50},loop:{type:Boolean,default:!1},rtl:{type:Boolean,default:!1},zoomScale:{type:Number,default:.12},maxZoom:{type:Number,default:3},minZoom:{type:Number,default:.1},rotateDisabled:{type:Boolean,default:!1},zoomDisabled:{type:Boolean,default:!1},pinchDisabled:{type:Boolean,default:!1},dblclickDisabled:{type:Boolean,default:!1}},emits:{hide:()=>!0,"on-error":e=>!0,"on-prev":(e,t)=>!0,"on-next":(e,t)=>!0,"on-prev-click":(e,t)=>!0,"on-next-click":(e,t)=>!0,"on-index-change":(e,t)=>!0,"on-rotate":e=>!0},setup(e,t){let{emit:a,slots:n}=t;const{imgRef:s,imgState:o,setImgSize:u}=(()=>{const _e=V(),xe=Kl({width:0,height:0,maxScale:1});return{imgRef:_e,imgState:xe,setImgSize:()=>{if(_e.value){const{width:Me,height:Fe,naturalWidth:nt}=_e.value;xe.maxScale=nt/Me,xe.width=Me,xe.height=Fe}}}})(),A=V(e.index),f=V(""),m=Kl({scale:1,lastScale:1,rotateDeg:0,top:0,left:0,initX:0,initY:0,lastX:0,lastY:0,touches:[]}),g=Kl({loadError:!1,loading:!1,dragging:!1,gesturing:!1,wheeling:!1}),y=j(()=>{return _e=e.imgs,gu("Array")(_e)?e.imgs.map(xe=>typeof xe=="string"?{src:xe}:function(Me){return zB(Me)&&tA(Me.src)}(xe)?xe:void 0).filter(YB):tA(e.imgs)?[{src:e.imgs}]:[];var _e}),v=j(()=>y.value[A.value]),B=j(()=>{var _e;return(_e=y.value[A.value])==null?void 0:_e.src}),b=j(()=>{var _e;return(_e=y.value[A.value])==null?void 0:_e.title}),w=j(()=>{var _e;return(_e=y.value[A.value])==null?void 0:_e.alt}),k=j(()=>({cursor:g.loadError?"default":e.moveDisabled?g.dragging?"grabbing":"grab":"move",top:`calc(50% + ${m.top}px)`,left:`calc(50% + ${m.left}px)`,transition:g.dragging||g.gesturing?"none":"",transform:`translate(-50%, -50%) scale(${m.scale}) rotate(${m.rotateDeg}deg)`})),S=()=>{a("hide")},M=()=>{m.scale=1,m.lastScale=1,m.rotateDeg=0,m.top=0,m.left=0,g.loadError=!1,g.dragging=!1,g.loading=!0},$=(_e,xe)=>{const Me=A.value;M(),A.value=_e,y.value[A.value]===y.value[_e]&&ye(()=>{g.loading=!1}),e.visible&&Me!==_e&&(xe&&xe(Me,_e),a("on-index-change",Me,_e))},F=()=>{const _e=A.value,xe=e.loop?(_e+1)%y.value.length:_e+1;!e.loop&&xe>y.value.length-1||$(xe,(Me,Fe)=>{a("on-next",Me,Fe),a("on-next-click",Me,Fe)})},L=()=>{const _e=A.value;let xe=_e-1;if(_e===0){if(!e.loop)return;xe=y.value.length-1}$(xe,(Me,Fe)=>{a("on-prev",Me,Fe),a("on-prev-click",Me,Fe)})},Q=_e=>{Math.abs(1-_e)<.05?_e=1:Math.abs(o.maxScale-_e)<.05&&(_e=o.maxScale),m.lastScale=m.scale,m.scale=_e},T=()=>{const _e=m.scale+e.zoomScale;_e{const _e=m.scale-e.zoomScale;_e>e.minZoom&&Q(_e)},U=()=>{const _e=m.rotateDeg%360;a("on-rotate",Math.abs(_e<0?_e+360:_e))},I=()=>{m.rotateDeg-=90,U()},O=()=>{m.rotateDeg+=90,U()},P=()=>{m.scale=1,m.top=0,m.left=0},K=function(){let _e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return!e.moveDisabled&&_e===0},{onMouseDown:G,onMouseMove:ne,onMouseUp:Y}=((_e,xe,Me)=>{let Fe,nt=!1;return{onMouseDown:st=>{_e.initX=_e.lastX=st.clientX,_e.initY=_e.lastY=st.clientY,xe.dragging=!0,nt=!1,st.stopPropagation()},onMouseUp:st=>{Me(st.button)&&nA(Fe),xe.dragging=!1,nt=!1},onMouseMove:st=>{if(xe.dragging)if(Me(st.button)){if(nt)return;nt=!0,Fe=Ii(()=>{const{top:Ot,left:Ct,lastY:yt,lastX:Ze}=_e;_e.top=Ot-yt+st.clientY,_e.left=Ct-Ze+st.clientX,_e.lastX=st.clientX,_e.lastY=st.clientY,nt=!1})}else _e.lastX=st.clientX,_e.lastY=st.clientY;st.stopPropagation()}}})(m,g,K),{onTouchStart:N,onTouchMove:oe,onTouchEnd:Z}=((_e,xe,Me,Fe,nt)=>{let st,Ot=!1;return{onTouchStart:Ct=>{const{touches:yt}=Ct;yt.length>1&&nt()?(Me.gesturing=!0,xe.touches=yt):(xe.initX=xe.lastX=yt[0].clientX,xe.initY=xe.lastY=yt[0].clientY,Me.dragging=!0),Ct.stopPropagation()},onTouchMove:Ct=>{if(Ot)return;const{touches:yt}=Ct,{lastX:Ze,lastY:Bt,left:ht,top:Ft,scale:kt}=xe;if(!Me.gesturing&&Me.dragging){if(!yt[0])return;const{clientX:xt,clientY:Ht}=yt[0];Fe()?st=Ii(()=>{xe.lastX=xt,xe.lastY=Ht,xe.top=Ft-Bt+Ht,xe.left=ht-Ze+xt,Ot=!1}):(xe.lastX=xt,xe.lastY=Ht)}else Me.gesturing&&xe.touches.length>1&&yt.length>1&&nt()&&(st=Ii(()=>{const xt=(sA(xe.touches[0],xe.touches[1])-sA(yt[0],yt[1]))/_e.width;xe.touches=yt;const Ht=kt-1.3*xt;Ht>.5&&Ht<1.5*_e.maxScale&&(xe.scale=Ht),Ot=!1}))},onTouchEnd:()=>{nA(st),Me.dragging=!1,Me.gesturing=!1,Ot=!1}}})(o,m,g,K,()=>!e.pinchDisabled),le=()=>{e.dblclickDisabled||(m.scale!==o.maxScale?(m.lastScale=m.scale,m.scale=o.maxScale):m.scale=m.lastScale)},te=_e=>{g.loadError||g.gesturing||g.loading||g.dragging||g.wheeling||!e.scrollDisabled||e.zoomDisabled||(g.wheeling=!0,setTimeout(()=>{g.wheeling=!1},80),_e.deltaY<0?T():D())},X=_e=>{const xe=_e;e.visible&&(!e.escDisabled&&xe.key==="Escape"&&e.visible&&S(),xe.key==="ArrowLeft"&&(e.rtl?F():L()),xe.key==="ArrowRight"&&(e.rtl?L():F()))},ie=()=>{e.maskClosable&&S()},be=()=>{u()},se=()=>{g.loading=!1},ce=_e=>{g.loading=!1,g.loadError=!0,a("on-error",_e)},pe=()=>{e.visible&&u()};ge(()=>e.index,_e=>{_e<0||_e>=y.value.length||$(_e)}),ge(()=>g.dragging,(_e,xe)=>{const Me=!_e&&xe;if(!K()&&Me){const Fe=m.lastX-m.initX,nt=m.lastY-m.initY,st=e.swipeTolerance;Math.abs(Fe)>Math.abs(nt)&&(Fe<-1*st?F():Fe>st&&L())}}),ge(()=>e.visible,_e=>{if(_e){M();const xe=y.value.length;if(xe===0)return A.value=0,g.loading=!1,void ye(()=>g.loadError=!0);A.value=e.index>=xe?xe-1:e.index<0?0:e.index,e.scrollDisabled&&De()}else e.scrollDisabled&&$e()});const De=()=>{document&&(f.value=document.body.style.overflowY,document.body.style.overflowY="hidden")},$e=()=>{document&&(document.body.style.overflowY=f.value)};Be(()=>{Zc(document,"keydown",X),Zc(window,"resize",pe)}),xn(()=>{eA(document,"keydown",X),eA(window,"resize",pe),e.scrollDisabled&&$e()});const Je=()=>g.loading?n.loading?n.loading({key:"loading"}):l(WB,{key:"img-loading"},null):g.loadError?n.onerror?n.onerror({key:"onerror"}):l(XB,{key:"img-on-error"},null):l("div",{class:`${vn}-img-wrapper`,style:k.value,key:"img-wrapper"},[l("img",{alt:w.value,ref:s,draggable:"false",class:`${vn}-img`,src:B.value,onMousedown:G,onMouseup:Y,onMousemove:ne,onTouchstart:N,onTouchmove:oe,onTouchend:Z,onLoad:be,onDblclick:le,onDragstart:_e=>{_e.preventDefault()}},null)]),we=()=>{if(n["prev-btn"])return n["prev-btn"]({prev:L});if(y.value.length<=1)return;const _e=!e.loop&&A.value<=0;return l("div",{role:"button","aria-label":"previous image button",class:"btn__prev "+(_e?"disable":""),onClick:L},[e.rtl?l(Dn,{type:"next"},null):l(Dn,{type:"prev"},null)])},Ye=()=>{if(n["next-btn"])return n["next-btn"]({next:F});if(y.value.length<=1)return;const _e=!e.loop&&A.value>=y.value.length-1;return l("div",{role:"button","aria-label":"next image button",class:"btn__next "+(_e?"disable":""),onClick:F},[e.rtl?l(Dn,{type:"prev"},null):l(Dn,{type:"next"},null)])},ft=()=>{if(!(e.titleDisabled||g.loading||g.loadError))return n.title?n.title({currentImg:v.value}):b.value?l(JB,null,{default:()=>[b.value]}):void 0},Ge=()=>{let _e;if(e.visible)return l("div",{onTouchmove:GB,class:[`${vn}-modal`,e.rtl?"is-rtl":""],onClick:Xe(ie,["self"]),onWheel:te},[l(ZB,null,null),l(vs,{name:`${vn}-fade`,mode:"out-in"},Ti(_e=Je())?_e:{default:()=>[_e]}),l("img",{style:"display:none;",src:B.value,onError:ce,onLoad:se},null),l("div",{class:`${vn}-btns-wrapper`},[we(),Ye(),ft(),n["close-btn"]?n["close-btn"]({close:S}):l("div",{role:"button","aria-label":"close image preview button",class:"btn__close",onClick:S},[l(Dn,{type:"close"},null)]),n.toolbar?n.toolbar({toolbarMethods:{zoomIn:T,zoomOut:D,rotate:I,rotateLeft:I,rotateRight:O,resize:P},zoomIn:T,zoomOut:D,rotate:I,rotateLeft:I,rotateRight:O,resize:P}):l(qB,{zoomIn:T,zoomOut:D,resize:P,rotateLeft:I,rotateRight:O,rotateDisabled:e.rotateDisabled,zoomDisabled:e.zoomDisabled},null)])])};return()=>{let _e;if(e.teleport){let xe;return l(Rr,{to:e.teleport},{default:()=>[l(vs,{name:`${vn}-fade`},Ti(xe=Ge())?xe:{default:()=>[xe]})]})}return l(vs,{name:`${vn}-fade`},Ti(_e=Ge())?_e:{default:()=>[_e]})}}});const tk=Object.assign(Vi,{install:e=>{e.component(Vi.name,Vi)}}),ak={name:"Attachments",components:{MediaButton:ip,VueEasyLightbox:tk,IconButton:Oe,Delete:Is},props:{multiple:Boolean,attachments:{type:[Array,Object],default:()=>[]},empty_text:String,isSingle:Boolean,title:String,type:String,icon:String,showList:{type:Boolean,default:!0},showDeleteButton:{type:Boolean,default:!0},previewImage:{type:Boolean,default:!0},mediaInputSize:{type:String},mediaInputBg:{type:String}},emits:["removeImage","mediaUploaded"],data(){return{visible:!1,imageIndex:0,lightboxData:[],images:V([])}},computed:{showMediaButtonAsIcon:function(){return!this.multiple&&this.attachments.length===1}},watch:{attachments:{handler:function(e,t){return this.lightboxData=[],Array.isArray(e)&&e.length>0&&e.map((a,n)=>{this.lightboxData.push(a.url)}),e},deep:!0}},mounted:function(){Array.isArray(this.attachments)&&this.attachments.length>0&&this.attachments.forEach(e=>{this.lightboxData.push(e.url),this.images.push({id:e.id,url:e.url,title:e.title})})},methods:{translate:c,removeImageEvent(e){this.$emit("removeImage",e)},onMediaSelected(e){this.images=e.map(t=>({id:t.id,title:t.title,url:t.url})),this.$emit("mediaUploaded",this.images)}}},nk={class:"fct-attachments-wrap",style:{position:"relative"}},sk={class:"fct-attachment-img-wrap"},lk=["src","alt","onClick"],ok={class:"fct-attachments-button"};function rk(e,t,a,n,s,o){const u=C("VueEasyLightbox"),A=C("MediaButton"),f=C("IconButton"),m=C("Delete");return d(),_(H,null,[l(u,{visible:s.visible,imgs:s.lightboxData,index:s.imageIndex,onHide:t[0]||(t[0]=()=>{s.visible=!1})},null,8,["visible","imgs","index"]),r("div",nk,[a.attachments?(d(),_("ul",{key:0,class:de(`fct-attachments-list ${a.multiple?"is-multiple":"fct-single-attachment"} ${a.attachments.length>0?"is-single":""}`)},[a.showList===!0?(d(!0),_(H,{key:0},ee(a.attachments,(g,y)=>(d(),_("li",{key:y,class:de([[a.mediaInputSize,a.mediaInputBg],"fct-attachment-item"])},[r("div",sk,[a.previewImage?(d(),_("img",{key:0,src:g.url,alt:g.title,onClick:()=>{s.imageIndex=y,s.visible=!0}},null,8,lk)):x("",!0),o.showMediaButtonAsIcon&&!a.multiple?(d(),E(f,{key:1,size:"x-small"},{default:i(()=>[l(A,{"icon-mode":!0,attachments:a.attachments,title:a.multiple?"":a.title,onOnMediaSelected:o.onMediaSelected,multiple:a.multiple,icon:a.icon},null,8,["attachments","title","onOnMediaSelected","multiple","icon"])]),_:1})):x("",!0)]),r("div",ok,[a.showDeleteButton?(d(),E(f,{key:0,tag:"button",bg:"danger",outline:"",size:"x-small",onClick:Xe(v=>o.removeImageEvent(y),["prevent"]),title:o.translate("Delete media")},{default:i(()=>[a.multiple?(d(),E(m,{key:0})):(d(),_(H,{key:1},[R(h(o.translate("Remove")),1)],64))]),_:2},1032,["onClick","title"])):x("",!0),o.showMediaButtonAsIcon&&a.multiple?(d(),E(f,{key:1,size:"x-small"},{default:i(()=>[l(A,{"icon-mode":!0,attachments:a.attachments,title:a.multiple?"":a.title,onOnMediaSelected:o.onMediaSelected,multiple:a.multiple,icon:a.icon},null,8,["attachments","title","onOnMediaSelected","multiple","icon"])]),_:1})):x("",!0)])],2))),128)):x("",!0),o.showMediaButtonAsIcon?x("",!0):(d(),_("li",{key:1,class:de([a.mediaInputSize,a.mediaInputBg])},[l(A,{"icon-mode":!1,attachments:a.attachments,title:a.multiple?"":a.title,onOnMediaSelected:o.onMediaSelected,multiple:a.multiple,icon:a.icon},null,8,["attachments","title","onOnMediaSelected","multiple","icon"])],2))],2)):x("",!0),oa(e.$slots,"default")])],64)}const ik=He(ak,[["render",rk]]),dk={key:0},uk={key:0,class:"setting-label"},si={__name:"MediaInput",props:{modelValue:{default:""},showSupported:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1},icon:{type:String},title:{type:String},mediaInputSize:{type:String},mediaInputBg:{type:String},field:{type:Object}},emits:["update:modelValue"],setup(e,{emit:t}){const a=e,n=t,s=V();let o=V([]);const u=()=>{a.multiple?s.value=[]:s.value="",o.value=[],n("update:modelValue",s.value)},A=m=>{if(m.length)if(a.multiple){s.value=[],o.value=[];for(const g of m)s.value.push(g),o.value.push(g)}else s.value=m,o.value=m;n("update:modelValue",s.value)};ge(()=>a.modelValue,m=>{Array.isArray(m)&&m.length>0?s.value=m:m&&typeof m=="string"&&m!==""?s.value=[m]:m&&typeof m=="object"?s.value=[m]:s.value=[],f()});const f=()=>{o.value=[],Object.values(s.value).forEach((m,g)=>{m!==void 0&&m!==""&&o.value.push(m)})};return Be(()=>{Array.isArray(a.modelValue)&&a.modelValue.length>0?s.value=a.modelValue:a.modelValue&&typeof a.modelValue=="string"&&a.modelValue!==""?s.value=[a.modelValue]:a.modelValue&&typeof a.modelValue=="object"?s.value=[a.modelValue]:s.value=[],f()}),(m,g)=>(d(),_(H,null,[l(ik,{attachments:p(o),onMediaUploaded:A,onRemoveImage:u,icon:e.icon,title:e.title,mediaInputSize:e.mediaInputSize,mediaInputBg:e.mediaInputBg},null,8,["attachments","icon","title","mediaInputSize","mediaInputBg"]),e.showSupported?(d(),_("div",dk,[e.field&&e.field.label?(d(),_("label",uk,h(e.field.label),1)):x("",!0),r("span",null,h(p(c)("%1$s Recommended width: %2$s pixels minimum.","HEIC, WEBP, SVG, PNG, or JPG.","512")),1)])):x("",!0)],64))}},ck={class:"setting-media-wrap"},Mf={__name:"Media",props:pn({name:{type:String,required:!0},field:{type:Object},fieldKey:{type:String},value:{required:!0},variant:{type:String},nesting:{type:Boolean,default:!1},statePath:{type:String},form:{type:Object,required:!0},callback:{type:Function,required:!0},label:{type:String},attribute:{required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=kn(e,"modelValue");return(a,n)=>(d(),_("div",ck,[l(si,la({modelValue:t.value,"onUpdate:modelValue":n[0]||(n[0]=s=>t.value=s),field:e.field,icon:"Upload"},e.attribute),null,16,["modelValue","field"])]))}},Ak=Object.freeze(Object.defineProperty({__proto__:null,default:Mf},Symbol.toStringTag,{value:"Module"})),pk={__name:"InputRenderer",props:{form:{type:Object,required:!0},field:{type:Object,required:!0},value:{type:Object,required:!0},statePath:{type:String,required:!0},fieldKey:{type:String,required:!0},fullStatePath:{type:String,required:!0}},setup(e){const t=e;V(!1),Qt().ctx;const a=m=>typeof m.label=="function"?m.label(t.value,t.statePath,t.form):m.label,n=(m,g)=>{if(typeof m=="function")return m({data:t.value,form:t.form,statePath:t.statePath,field:t.field,event:Array.isArray(g)&&g.length===1?g[0]:g})},s=V(!1);let o={};Be(async()=>{o=await hu.attributesBuilders(t.field,n,t.form),s.value=!0});const u={switch:Ef,checkbox:Uf,radio:$f,input:ul,text:ul,email:ul,number:ul,textarea:ul,color:_u,date:Df,time:Qf,select:If,media:Mf,remote_select:Tf},A=j(()=>u[t.field.type]||null),f=j(()=>({modelValue:t.value[t.fieldKey],form:t.form,statePath:t.statePath,field:t.field,fieldKey:t.fieldKey,value:t.value[t.fieldKey],nesting:!1,label:a(t.field),attribute:o,callback:n}));return(m,g)=>e.field.type==="wp-editor"?(d(),E(ts,{key:0,shortCodes:e.field.shortcodes.data,modelValue:t.value[t.fieldKey],onUpdate:g[0]||(g[0]=y=>{t.value[t.fieldKey]=y})},null,8,["shortCodes","modelValue"])):A.value&&s.value?(d(),E(bn(A.value),la({key:1,onChange:g[1]||(g[1]=y=>{e.form.triggerChange(y)}),onInput:g[2]||(g[2]=y=>{e.form.triggerChange(e.value[e.fieldKey])}),modelValue:e.value[e.fieldKey],"onUpdate:modelValue":g[3]||(g[3]=y=>e.value[e.fieldKey]=y)},f.value),null,16,["modelValue"])):x("",!0)}},fk=["innerHTML"],mk={key:0},hk={key:0},li={__name:"FormRenderer",props:{form:{type:Object,required:!0},schema:{type:Object},value:{type:Object},statePath:{type:String}},setup(e){const t=e,a=t.statePath??"",n=["grid","section","tab","tab-pane"];V(!1),Qt().ctx;const s=(u,A)=>{if(typeof u.label=="function"){let f=o(u)?a:A+".",m=o(u)?t.value:t.value[A];return u.label(m,f,t.form)}return u.label},o=u=>u.disable_nesting!==!1;return(u,A)=>(d(!0),_(H,null,ee(e.schema,(f,m)=>(d(),_(H,{key:m},[e.form.isVisible(f,e.statePath+m)?(d(),_(H,{key:0},[f.type==="html"?(d(),_("div",{key:0,class:de(`setting-html-wrapper ${f.wrapperClass??""}`),innerHTML:f.value},null,10,fk)):(d(),_(H,{key:1},[f.component?(d(),_("div",{key:0,class:de(f.wrapperClass??"")},[f.component&&f.label?(d(),E(sa,{key:0,title:s(f,m),content:f.tooltip,class:"setting-label",placement:f.tooltip_placement},{default:i(()=>[f.labelOptional?(d(),_("span",mk,"("+h(f.labelOptional)+")",1)):x("",!0)]),_:2},1032,["title","content","placement"])):x("",!0),l(Bf,{modelValue:e.value[m],"onUpdate:modelValue":g=>e.value[m]=g,name:f.component,form:e.form,statePath:o(f)?p(a):m+".",field:f,"field-key":m,value:o(f)?e.value:e.value[m],nesting:o(f)},{fieldNote:i(()=>[f.note&&f.hide_note!==!0?(d(),E(Ed,{key:0,note:f.note},null,8,["note"])):x("",!0)]),validationError:i(()=>[l(Jc,{form:e.form,"error-key":p(a)+m},null,8,["form","error-key"])]),_:2},1032,["modelValue","onUpdate:modelValue","name","form","statePath","field","field-key","value","nesting"])],2)):x("",!0),n.includes(f.type)?(d(),E(FB,{key:1,form:e.form,field:f,value:e.value,"full-state-path":p(a),statePath:o(f)?p(a):m+".","field-key":m},null,8,["form","field","value","full-state-path","statePath","field-key"])):x("",!0),typeof f.type<"u"&&!n.includes(f.type)&&!["custom","component","html","hidden"].includes(f.type)?(d(),_("div",{key:2,class:de(`setting-fields-inner ${f.wrapperClass??""}`)},[f.type!=="checkbox"&&!f.component&&f.label!==!1?(d(),E(sa,{key:0,class:"setting-label",title:s(f,m),content:f.tooltip,placement:f.tooltip_placement},{default:i(()=>[f.labelOptional?(d(),_("span",hk,"("+h(f.labelOptional)+")",1)):x("",!0)]),_:2},1032,["title","content","placement"])):x("",!0),l(pk,{form:e.form,field:f,value:e.value,"full-state-path":p(a),"state-path":e.statePath,"field-key":m},null,8,["form","field","value","full-state-path","state-path","field-key"]),f.note&&!f.component?(d(),E(Ed,{key:1,note:f.note},null,8,["note"])):x("",!0),f.component?x("",!0):(d(),E(Jc,{key:2,form:e.form,"error-key":p(a)+m},null,8,["form","error-key"]))],2)):x("",!0)],64))],64)):x("",!0)],64))),128))}},_k={key:0,class:"vue-form-wrap"},gk={key:0,class:"form-section-save-action"},vk={key:0,class:"cmd block leading-none"},oi={__name:"VueForm",props:{form:{type:Object,required:!0},schema:{type:Object},value:{type:Object},showSubmitButton:{type:Boolean,default:!1},submitButtonText:{type:String,default:"Save"},loading:{type:Boolean,default:!1}},emits:["onSubmit","onChange","onSubmitButtonClick"],setup(e,{expose:t,emit:a}){const n=()=>{const m=window.location.hash.split("#"),g=m.length>1?m[m.length-1]:"";if(!g)return;const y=document.getElementById(g);y&&(y.scrollIntoView({behavior:"smooth",block:"start"}),y.classList.add("fct-scroll-highlight"),y.addEventListener("animationend",()=>y.classList.remove("fct-scroll-highlight"),{once:!0}))},s=e,o=a;ge(()=>s.form.isReady,()=>{ye(()=>n())},{once:!0}),Be(()=>{ye(()=>{u.registerCopyAction(),s.form.isReady&&n()})}),V({});const u=Qt().ctx,A=()=>{o("onSubmitButtonClick")};return t({getState:()=>s.form.values}),(m,g)=>{const y=C("el-button");return e.form.isReady?(d(),_("div",_k,[l(li,{form:e.form,ref:"formRenderer",schema:e.form.schema,value:e.form.values},null,8,["form","schema","value"]),e.showSubmitButton?(d(),_("div",gk,[l(y,{onClick:A,type:"primary",loading:e.loading},{default:i(()=>[e.loading?x("",!0):(d(),_("span",vk,"⌘s")),R(" "+h(e.submitButtonText),1)]),_:1},8,["loading"])])):x("",!0)])):x("",!0)}}},yk={key:0},bk={__name:"DynamicFormLoader",props:["schema","values","submit_button_text","form_name","widget"],emits:["change"],setup(e,{expose:t,emit:a}){let n=fu();const s=a,o=e,u=()=>{const g=o.form_name,y={};return y[g]={...n.values},y},A=()=>{n.reset()},f=()=>{var g;return((g=o.widget)==null?void 0:g.reset_on_save)==!0},m=Gd("triggerChange");return Be(()=>{n.setSchema(o.schema).setDefaults(o.values).initForm(),n.onDataChanged(g=>{m==null||m(),s("change")})}),t({getState:u,resetForm:A,resetOnSave:f}),(g,y)=>p(n).isReady?(d(),_("div",yk,[l(oi,{showSubmitButton:!1,submitButtonText:e.submit_button_text,form:p(n),onOnSubmitButtonClick:y[0]||(y[0]=()=>{p(n).values}),onOnChange:y[1]||(y[1]=v=>{}),"validation-errors":{}},null,8,["submitButtonText","form"])])):x("",!0)}},wk={__name:"EChart",props:{option:{type:Object,required:!0},height:{type:String,default:"400px"},width:{type:String,default:"100%"}},setup(e){const t=e,a=V(null);let n=null;const s=()=>{a.value&&(n=Mt(a.value),n.setOption(t.option))};ge(()=>t.option,f=>{n&&f&&n.setOption(f,!0)},{deep:!0});const o=(f,m)=>{if(f==null||f==="")return m;const g=Number(f);return isNaN(g)?f:`${g}px`},u=j(()=>o(t.height,"400px")),A=j(()=>o(t.width,"100%"));return Be(()=>{s(),window.addEventListener("resize",()=>n==null?void 0:n.resize())}),xn(()=>{window.removeEventListener("resize",()=>n==null?void 0:n.resize()),n==null||n.dispose()}),(f,m)=>(d(),_("div",{ref_key:"chartRef",ref:a,style:ia({width:A.value,height:u.value})},null,4))}},Ck={class:"fct-step-indicator"},Bk={class:"indicator-title"},kk={class:"indicator-steps"},xk={class:"indicator-progress"},Sk={class:"indicator-steps-bar"},Fk=["onClick"],Ek={__name:"StepIndicator",props:{steps:{type:Array,required:!0},currentStep:{type:Number,default:1}},emits:["step-click"],setup(e,{emit:t}){const a=t;return(n,s)=>(d(),_("div",Ck,[r("div",Bk,h(e.steps[e.currentStep-1].label),1),r("div",kk,[r("div",xk,h(e.currentStep)+"/"+h(e.steps.length)+" "+h(n.$t("Completed")),1),r("div",Sk,[(d(!0),_(H,null,ee(e.steps,(o,u)=>(d(),_("div",{key:u,class:"indicator-step",onClick:A=>a("step-click",u+1)},[r("div",{class:de(["indicator-step-bar",ua.disabled||a.loading),o=()=>`width ${a.duration}ms ease, opacity ${a.duration}ms ease, margin-right ${a.duration}ms ease`,u=y=>{y.style.width="0",y.style.opacity="0",y.style.overflow="hidden",y.style.marginRight="6px"},A=(y,v)=>{const B=y.scrollWidth+"px";y.style.transition=o(),requestAnimationFrame(()=>{y.style.width=B,y.style.opacity="1",y.style.marginRight=""}),setTimeout(()=>v(),a.duration)},f=y=>{y.style.width="auto",y.style.overflow="",y.style.marginRight=""},m=y=>{y.style.width=y.scrollWidth+"px",y.style.opacity="1",y.style.overflow="hidden",y.style.marginRight=Dk},g=(y,v)=>{y.offsetHeight,y.style.transition=o(),y.style.width="0",y.style.opacity="0",y.style.marginRight="0";const B=b=>{b.propertyName==="width"&&(y.removeEventListener("transitionend",B),v())};y.addEventListener("transitionend",B)};return(y,v)=>(d(),_("button",{type:e.nativeType,class:de(["el-button",e.type&&`el-button--${e.type}`,e.size&&`el-button--${e.size}`,{"is-plain":e.plain,"is-loading":e.loading,"is-disabled":s.value}]),disabled:s.value,"aria-disabled":s.value,onClick:v[0]||(v[0]=B=>n("click",B))},[l(vs,{onBeforeEnter:u,onEnter:A,onAfterEnter:f,onBeforeLeave:m,onLeave:g},{default:i(()=>[e.loading?(d(),_("span",$k,v[1]||(v[1]=[r("i",{class:"el-icon is-loading"},[r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[r("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"})])],-1)]))):x("",!0)]),_:1}),r("span",null,[oa(y.$slots,"default",{},void 0,!0)])],10,Uk))}},Ik=He(Qk,[["__scopeId","data-v-fa8794a2"]]),Lf={__name:"VueTemplateLoader",props:{widget:{type:Object,required:!0},data:{required:!1}},setup(e){var m,g,y,v,B,b;const t=zA(YA),a=Object.freeze({get:(...w)=>re.get(...w),post:(...w)=>re.post(...w),put:(...w)=>re.put(...w),delete:(...w)=>re.delete(...w),patch:(...w)=>re.patch(...w),upload:(...w)=>re.upload(...w),getNonce:()=>re.getNonce()}),n=Object.freeze({success:(...w)=>q.success(...w),error:(...w)=>q.error(...w),info:(...w)=>q.info(...w),validationErrors:(...w)=>q.validationErrors(...w)}),s=Object.freeze({clipboard:(m=window==null?void 0:window.navigator)==null?void 0:m.clipboard,userAgent:(g=window==null?void 0:window.navigator)==null?void 0:g.userAgent,language:(y=window==null?void 0:window.navigator)==null?void 0:y.language,languages:(v=window==null?void 0:window.navigator)==null?void 0:v.languages,onLine:(B=window==null?void 0:window.navigator)==null?void 0:B.onLine,platform:(b=window==null?void 0:window.navigator)==null?void 0:b.platform}),o=[{pattern:/\balert\s*\(/,label:"alert()"},{pattern:/\bconfirm\s*\(/,label:"confirm()"},{pattern:/\bprompt\s*\(/,label:"prompt()"},{pattern:/\bsetTimeout\s*\(/,label:"setTimeout()"},{pattern:/\bsetInterval\s*\(/,label:"setInterval()"},{pattern:/\brequestAnimationFrame\s*\(/,label:"requestAnimationFrame()"},{pattern:/\bcancelAnimationFrame\s*\(/,label:"cancelAnimationFrame()"},{pattern:/\bqueueMicrotask\s*\(/,label:"queueMicrotask()"},{pattern:/\bfetch\s*\(/,label:"fetch()"},{pattern:/\bXMLHttpRequest\b/,label:"XMLHttpRequest"},{pattern:/\bWebSocket\b/,label:"WebSocket"},{pattern:/\bWorker\b/,label:"Worker"},{pattern:/\bSharedWorker\b/,label:"SharedWorker"},{pattern:/\bEventSource\b/,label:"EventSource"},{pattern:/\bMessageChannel\b/,label:"MessageChannel"},{pattern:/\bBroadcastChannel\b/,label:"BroadcastChannel"},{pattern:/\bwindow\b/,label:"window"},{pattern:/\bdocument\b/,label:"document"},{pattern:/\bnavigator\.(?:serviceWorker|sendBeacon|geolocation|mediaDevices|bluetooth|usb|serial|hid|credentials|locks|wakeLock)\b/,label:"navigator privileged API"},{pattern:/\bglobalThis\b/,label:"globalThis"},{pattern:/\bself\b/,label:"self"},{pattern:/\bparent\b/,label:"parent"},{pattern:/\btop\b/,label:"top"},{pattern:/\bframes\b/,label:"frames"},{pattern:/\blocalStorage\b/,label:"localStorage"},{pattern:/\bsessionStorage\b/,label:"sessionStorage"},{pattern:/\bindexedDB\b/,label:"indexedDB"},{pattern:/\bpostMessage\s*\(/,label:"postMessage()"},{pattern:/\bopen\s*\(/,label:"open()"},{pattern:/\bFileReader\b/,label:"FileReader"},{pattern:/\bBlob\b/,label:"Blob"},{pattern:/\bURL\.createObjectURL\b/,label:"URL.createObjectURL"},{pattern:/\bMutationObserver\b/,label:"MutationObserver"},{pattern:/\bResizeObserver\b/,label:"ResizeObserver"},{pattern:/\bIntersectionObserver\b/,label:"IntersectionObserver"},{pattern:/\bhistory\.(?:pushState|replaceState|go|back|forward)\s*\(/,label:"history navigation"},{pattern:/\blocation\.(?:assign|replace|reload)\s*\(/,label:"location navigation"},{pattern:/\blocation\.href\s*=/,label:"location.href assignment"},{pattern:/\bFunction\b/,label:"Function"},{pattern:/\beval\s*\(/,label:"eval()"},{pattern:/\bnew\s+Function\b/,label:"new Function"},{pattern:/\brequire\s*\(/,label:"require()"},{pattern:/\bimport\s*\(/,label:"import()"},{pattern:/\bReflect\b/,label:"Reflect"},{pattern:/\bProxy\b/,label:"Proxy"},{pattern:/\bprocess\b/,label:"process"},{pattern:/\bmodule\b/,label:"module"},{pattern:/\bexports\b/,label:"exports"},{pattern:/\b__proto__\b/,label:"__proto__"},{pattern:/\b__defineGetter__\b/,label:"__defineGetter__"},{pattern:/\b__defineSetter__\b/,label:"__defineSetter__"}],u=w=>{for(const k of o)if(k.pattern.test(w))return!1;return!0},A=w=>{var k,S;try{if(typeof w!="string")return null;const M=w.match(/]*)?>|