From e83ec9e29332630d49fb944bcade2f13d5d052b5 Mon Sep 17 00:00:00 2001 From: spudding <1115683088@qq.com> Date: Mon, 16 Nov 2026 18:30:12 +0800 Subject: [PATCH] =?UTF-8?q?fix(plugin):=20XQ0012=200.3.3=20=E5=8D=95?= =?UTF-8?q?=E6=8D=AE=E5=8F=A3=E5=BE=84=EF=BC=88=E5=8F=91=E8=B5=B7=E4=BA=BA?= =?UTF-8?q?=EF=BC=89=E6=8F=90=E5=88=B0=E7=AC=AC=203=20=E6=AD=A5=EF=BC=8C?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E6=96=B9=E5=BC=8F=E9=A1=BA=E5=BB=B6=E4=B8=BA?= =?UTF-8?q?=2004?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 按操作顺序调整分区:01 台账来源 → 02 ERP 登录 → 03 单据口径·发起人 → 04 执行方式。 --- .../__init__.py | 2 +- .../plugin.json | 2 +- .../ui-src/src/App.vue | 58 +++++++++---------- .../{index-Mn3XtiAx.js => index-CiojgSoH.js} | 2 +- .../ui/index.html | 2 +- 5 files changed, 33 insertions(+), 33 deletions(-) rename plugins/XQ0001-0100/XQ0012 EHR预支及支付报酬自动发起ERP付款申请/ui/assets/{index-Mn3XtiAx.js => index-CiojgSoH.js} (99%) diff --git a/plugins/XQ0001-0100/XQ0012 EHR预支及支付报酬自动发起ERP付款申请/__init__.py b/plugins/XQ0001-0100/XQ0012 EHR预支及支付报酬自动发起ERP付款申请/__init__.py index d4c91eb..7d1232e 100644 --- a/plugins/XQ0001-0100/XQ0012 EHR预支及支付报酬自动发起ERP付款申请/__init__.py +++ b/plugins/XQ0001-0100/XQ0012 EHR预支及支付报酬自动发起ERP付款申请/__init__.py @@ -32,7 +32,7 @@ class PrepayPayApplyPlugin(ScenePlugin): id = 'xq0012' name = 'EHR预支及支付报酬自动发起ERP付款申请' - version = '0.3.2' + version = '0.3.3' description = ('按月份从 EHR 接口导出预支报酬台账(默认当月)→ 按月扫描已办结预支流程刷新' '「预支办结流程」→ Excel 重算并校验单据头必录信息(含银行卡,收款账户取自' '预支办结流程)→ 自动在 ERP 建付款申请单(默认试算不写库),可选提交、' diff --git a/plugins/XQ0001-0100/XQ0012 EHR预支及支付报酬自动发起ERP付款申请/plugin.json b/plugins/XQ0001-0100/XQ0012 EHR预支及支付报酬自动发起ERP付款申请/plugin.json index 15add47..60bc0a3 100644 --- a/plugins/XQ0001-0100/XQ0012 EHR预支及支付报酬自动发起ERP付款申请/plugin.json +++ b/plugins/XQ0001-0100/XQ0012 EHR预支及支付报酬自动发起ERP付款申请/plugin.json @@ -2,7 +2,7 @@ "schema_version": 1, "id": "xq0012", "name": "EHR预支及支付报酬自动发起ERP付款申请", - "version": "0.3.2", + "version": "0.3.3", "description": "按月份从 EHR 接口导出预支报酬台账(默认当月)→ 按月扫描「流程监控-已办结」预支流程刷新「预支办结流程」(全部流程详细数据,供建单报文与单据头 XLOOKUP 取收款人/银行/账号)→ 写入单据头申请日期/发起人 → Excel 重算并校验必录信息(含银行卡,缺失行跳过)→ 与 ERP 付款申请单对账回填「已付」→ 剩余未付行按台账「新旧系统」口径自动分流建单(默认试算不写库),可选提交,打印两份(每张 ERP 单据套打 + 「单子传递打印」本批行汇总);含幂等查重与异常清单;打印完成后钉钉提醒去领取", "category": "人资", "icon": "", diff --git a/plugins/XQ0001-0100/XQ0012 EHR预支及支付报酬自动发起ERP付款申请/ui-src/src/App.vue b/plugins/XQ0001-0100/XQ0012 EHR预支及支付报酬自动发起ERP付款申请/ui-src/src/App.vue index 3db5d97..f6ddf7f 100644 --- a/plugins/XQ0001-0100/XQ0012 EHR预支及支付报酬自动发起ERP付款申请/ui-src/src/App.vue +++ b/plugins/XQ0001-0100/XQ0012 EHR预支及支付报酬自动发起ERP付款申请/ui-src/src/App.vue @@ -117,10 +117,38 @@ - +
03 + 单据口径 · 发起人 + +
+
+ +
+ + + + + + +
+
+
+ 发起人两列按这里回填「付款申请单#单据头(FBillHead)」E/F 列,也是建单报文的申请人(代提人)。 + 其余口径逐行读模板:申请日期=D 列(当天)、付款用途=AH 列、期望付款日=AK 列($D+1)、 + 申请部门=W 列(BM000477 / BM000881)。 +
+
+
+ + +
+
+ 04 执行方式
@@ -170,34 +198,6 @@
- -
-
- 04 - 单据口径 · 发起人 - -
-
- -
- - - - - - -
-
-
- 发起人两列按这里回填「付款申请单#单据头(FBillHead)」E/F 列,也是建单报文的申请人(代提人)。 - 其余口径逐行读模板:申请日期=D 列(当天)、付款用途=AH 列、期望付款日=AK 列($D+1)、 - 申请部门=W 列(BM000477 / BM000881)。 -
-
-
-
口径速查▾
diff --git a/plugins/XQ0001-0100/XQ0012 EHR预支及支付报酬自动发起ERP付款申请/ui/assets/index-Mn3XtiAx.js b/plugins/XQ0001-0100/XQ0012 EHR预支及支付报酬自动发起ERP付款申请/ui/assets/index-CiojgSoH.js similarity index 99% rename from plugins/XQ0001-0100/XQ0012 EHR预支及支付报酬自动发起ERP付款申请/ui/assets/index-Mn3XtiAx.js rename to plugins/XQ0001-0100/XQ0012 EHR预支及支付报酬自动发起ERP付款申请/ui/assets/index-CiojgSoH.js index ac6143a..2a31c6f 100644 --- a/plugins/XQ0001-0100/XQ0012 EHR预支及支付报酬自动发起ERP付款申请/ui/assets/index-Mn3XtiAx.js +++ b/plugins/XQ0001-0100/XQ0012 EHR预支及支付报酬自动发起ERP付款申请/ui/assets/index-CiojgSoH.js @@ -77,4 +77,4 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:a,curr a ${k} ${k} 0 1 1 0 ${S?"-":""}${k*2} a ${k} ${k} 0 1 1 0 ${S?"":"-"}${k*2} `}),u=C(()=>2*Math.PI*s.value),c=C(()=>n.type==="dashboard"?.75:1),d=C(()=>`${-1*u.value*(1-c.value)/2}px`),f=C(()=>({strokeDasharray:`${u.value*c.value}px, ${u.value}px`,strokeDashoffset:d.value})),p=C(()=>({strokeDasharray:`${u.value*c.value*(n.percentage/100)}px, ${u.value}px`,strokeDashoffset:d.value,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"})),g=C(()=>{let k;return n.color?k=y(n.percentage):k=t[n.status]||t.default,k}),m=C(()=>n.status==="warning"?Qd:n.type==="line"?n.status==="success"?Lh:ql:n.status==="success"?gr:Ya),v=C(()=>n.type==="line"?12+n.strokeWidth*.4:n.width*.111111+2),h=C(()=>n.format(n.percentage));function b(k){const S=100/k.length;return k.map((E,x)=>Ve(E)?{color:E,percentage:(x+1)*S}:E).sort((E,x)=>E.percentage-x.percentage)}const y=k=>{var E;const{color:S}=n;if(We(S))return S(k);if(Ve(S))return S;{const x=b(S);for(const $ of x)if($.percentage>k)return $.color;return(E=x[x.length-1])==null?void 0:E.color}};return(k,S)=>(O(),H("div",{class:P([r(a).b(),r(a).m(e.type),r(a).is(e.status),{[r(a).m("without-text")]:!e.showText,[r(a).m("text-inside")]:e.textInside}]),role:"progressbar","aria-valuenow":e.percentage,"aria-valuemin":"0","aria-valuemax":"100"},[e.type==="line"?(O(),H("div",{key:0,class:P(r(a).b("bar"))},[K("div",{class:P(r(a).be("bar","outer")),style:je({height:`${e.strokeWidth}px`})},[K("div",{class:P([r(a).be("bar","inner"),{[r(a).bem("bar","inner","indeterminate")]:e.indeterminate},{[r(a).bem("bar","inner","striped")]:e.striped},{[r(a).bem("bar","inner","striped-flow")]:e.stripedFlow}]),style:je(l.value)},[(e.showText||k.$slots.default)&&e.textInside?(O(),H("div",{key:0,class:P(r(a).be("bar","innerText"))},[ne(k.$slots,"default",{percentage:e.percentage},()=>[K("span",null,Se(h.value),1)])],2)):te("v-if",!0)],6)],6)],2)):(O(),H("div",{key:1,class:P(r(a).b("circle")),style:je({height:`${e.width}px`,width:`${e.width}px`})},[(O(),H("svg",hj,[K("path",{class:P(r(a).be("circle","track")),d:i.value,stroke:`var(${r(a).cssVarName("fill-color-light")}, #e5e9f2)`,"stroke-linecap":e.strokeLinecap,"stroke-width":o.value,fill:"none",style:je(f.value)},null,14,mj),K("path",{class:P(r(a).be("circle","path")),d:i.value,stroke:g.value,fill:"none",opacity:e.percentage?1:0,"stroke-linecap":e.strokeLinecap,"stroke-width":o.value,style:je(p.value)},null,14,gj)]))],6)),(e.showText||k.$slots.default)&&!e.textInside?(O(),H("div",{key:2,class:P(r(a).e("text")),style:je({fontSize:`${v.value}px`})},[ne(k.$slots,"default",{percentage:e.percentage},()=>[e.status?(O(),oe(r(Be),{key:1},{default:X(()=>[(O(),oe(dt(m.value)))]),_:1})):(O(),H("span",bj,Se(h.value),1))])],6)):te("v-if",!0)],10,vj))}}),wj=yj;const fm=ut(wj),Sj=$e({modelValue:{type:Number,default:0},id:{type:String,default:void 0},lowThreshold:{type:Number,default:2},highThreshold:{type:Number,default:4},max:{type:Number,default:5},colors:{type:G([Array,Object]),default:()=>dn(["","",""])},voidColor:{type:String,default:""},disabledVoidColor:{type:String,default:""},icons:{type:G([Array,Object]),default:()=>[Iu,Iu,Iu]},voidIcon:{type:Ut,default:()=>B_},disabledVoidIcon:{type:Ut,default:()=>Iu},disabled:{type:Boolean,default:void 0},allowHalf:Boolean,showText:Boolean,showScore:Boolean,textColor:{type:String,default:""},texts:{type:G(Array),default:()=>dn(["Extremely bad","Disappointed","Fair","Satisfied","Surprise"])},scoreTemplate:{type:String,default:"{value}"},size:In,clearable:Boolean,...ua(["ariaLabel"])}),Cj={[yt]:e=>He(e),[it]:e=>He(e)},kj=["id","aria-label","aria-labelledby","aria-valuenow","aria-valuetext","aria-valuemax","tabindex","aria-disabled"],Ej=["onMousemove","onClick"];var xj=ue({name:"ElRate",__name:"rate",props:Sj,emits:Cj,setup(e,{expose:t,emit:n}){function a(R,z){const L=Y=>rt(Y),W=z[Object.keys(z).map(Y=>+Y).filter(Y=>{const J=z[Y];return L(J)&&J.excluded?RY-J)[0]];return L(W)&&W.value||W}const l=e,o=n,s=Fe(Hl,void 0),i=$n(),u=he("rate"),{inputId:c,isLabeledByFormItem:d}=Ea(l,{formItemContext:s}),f=V(ya(l.modelValue,0,l.max)),p=V(-1),g=V(!0),m=V([]),v=C(()=>m.value.map(R=>R.$el.clientWidth)),h=C(()=>[u.b(),u.m(i.value)]),b=sn(),y=C(()=>u.cssVarBlock({"void-color":l.voidColor,"disabled-void-color":l.disabledVoidColor,"fill-color":x.value})),k=C(()=>{let R="";return l.showScore?R=l.scoreTemplate.replace(/\{\s*value\s*\}/,b.value?`${l.modelValue}`:`${f.value}`):l.showText&&(R=l.texts[Math.ceil(f.value)-1]),R}),S=C(()=>l.modelValue*100-Math.floor(l.modelValue)*100),E=C(()=>me(l.colors)?{[l.lowThreshold]:l.colors[0],[l.highThreshold]:{value:l.colors[1],excluded:!0},[l.max]:l.colors[2]}:l.colors),x=C(()=>{const R=a(f.value,E.value);return rt(R)?"":R}),$=C(()=>{let R="";return b.value?R=`${S.value}%`:l.allowHalf&&(R="50%"),{color:x.value,width:R}}),w=C(()=>{let R=me(l.icons)?[...l.icons]:{...l.icons};return R=$l(R),me(R)?{[l.lowThreshold]:R[0],[l.highThreshold]:{value:R[1],excluded:!0},[l.max]:R[2]}:R}),T=C(()=>a(l.modelValue,w.value)),M=C(()=>b.value?Ve(l.disabledVoidIcon)?l.disabledVoidIcon:$l(l.disabledVoidIcon):Ve(l.voidIcon)?l.voidIcon:$l(l.voidIcon)),I=C(()=>a(f.value,w.value));function N(R){const z=b.value&&S.value>0&&R-1l.modelValue,L=l.allowHalf&&g.value&&R-.5<=f.value&&R>f.value;return z||L}function A(R){l.clearable&&R===l.modelValue&&(R=0),o(it,R),l.modelValue!==R&&o(yt,R)}function j(R){b.value||(l.allowHalf&&g.value?A(f.value):A(R))}function F(R){if(b.value)return;const z=Gt(R),L=l.allowHalf?.5:1;let W=f.value;switch(z){case ye.up:case ye.right:W+=L;break;case ye.left:case ye.down:W-=L}if(W=ya(W,0,l.max),W!==f.value)return R.stopPropagation(),R.preventDefault(),o(it,W),o(yt,W),W}function B(R,z){b.value||(l.allowHalf&&z?(g.value=z.offsetX*2<=v.value[R-1],f.value=g.value?R-.5:R):f.value=R,p.value=R)}function D(){b.value||(l.allowHalf&&(g.value=l.modelValue!==Math.floor(l.modelValue)),f.value=ya(l.modelValue,0,l.max),p.value=-1)}return fe(()=>l.modelValue,R=>{f.value=ya(R,0,l.max),g.value=l.modelValue!==Math.floor(l.modelValue)}),l.modelValue||o(it,0),t({setCurrentValue:B,resetCurrentValue:D}),(R,z)=>{var L;return O(),H("div",{id:r(c),class:P([h.value,r(u).is("disabled",r(b))]),role:"slider","aria-label":r(d)?void 0:e.ariaLabel||"rating","aria-labelledby":r(d)?(L=r(s))==null?void 0:L.labelId:void 0,"aria-valuenow":f.value,"aria-valuetext":k.value||void 0,"aria-valuemin":"0","aria-valuemax":e.max,style:je(y.value),tabindex:r(b)?void 0:0,"aria-disabled":r(b),onKeydown:F},[(O(!0),H(ze,null,bt(e.max,(W,Y)=>(O(),H("span",{key:Y,class:P(r(u).e("item")),onMousemove:J=>B(W,J),onMouseleave:D,onClick:J=>j(W)},[q(r(Be),{ref_for:!0,ref_key:"iconRefs",ref:m,class:P([r(u).e("icon"),{hover:p.value===W},r(u).is("active",W<=f.value),r(u).is("focus-visible",W===Math.ceil(f.value||1))])},{default:X(()=>[ft((O(),oe(dt(I.value),null,null,512)),[[At,!N(W)&&W<=f.value]]),ft((O(),oe(dt(M.value),null,null,512)),[[At,!N(W)&&W>f.value]]),ft((O(),oe(dt(M.value),{class:P([r(u).em("decimal","box")])},null,8,["class"])),[[At,N(W)]]),ft(q(r(Be),{style:je($.value),class:P([r(u).e("icon"),r(u).e("decimal")])},{default:X(()=>[(O(),oe(dt(T.value)))]),_:1},8,["style","class"]),[[At,N(W)]])]),_:2},1032,["class"])],42,Ej))),128)),e.showText||e.showScore?(O(),H("span",{key:0,class:P(r(u).e("text")),style:je({color:e.textColor})},Se(k.value),7)):te("v-if",!0)],46,kj)}}}),Tj=xj;const $j=ut(Tj),os={primary:"icon-primary",success:"icon-success",warning:"icon-warning",error:"icon-error",info:"icon-info"},Qy={[os.primary]:Vi,[os.success]:J3,[os.warning]:Qd,[os.error]:Vh,[os.info]:Vi},Oj=$e({title:{type:String,default:""},subTitle:{type:String,default:""},icon:{type:String,values:["primary","success","warning","info","error"],default:"info"}});var Nj=ue({name:"ElResult",__name:"result",props:Oj,setup(e){const t=e,n=he("result"),a=C(()=>{const l=t.icon,o=l&&os[l]?os[l]:"icon-info";return{class:o,component:Qy[o]||Qy["icon-info"]}});return(l,o)=>(O(),H("div",{class:P(r(n).b())},[K("div",{class:P(r(n).e("icon"))},[ne(l.$slots,"icon",{},()=>[a.value.component?(O(),oe(dt(a.value.component),{key:0,class:P(a.value.class)},null,8,["class"])):te("v-if",!0)])],2),e.title||l.$slots.title?(O(),H("div",{key:0,class:P(r(n).e("title"))},[ne(l.$slots,"title",{},()=>[K("p",null,Se(e.title),1)])],2)):te("v-if",!0),e.subTitle||l.$slots["sub-title"]?(O(),H("div",{key:1,class:P(r(n).e("subtitle"))},[ne(l.$slots,"sub-title",{},()=>[K("p",null,Se(e.subTitle),1)])],2)):te("v-if",!0),l.$slots.extra?(O(),H("div",{key:2,class:P(r(n).e("extra"))},[ne(l.$slots,"extra")],2)):te("v-if",!0)],2))}}),Mj=Nj;const Pj=ut(Mj),pm=Symbol("ElSelectV2Injection"),Ij=$e({allowCreate:Boolean,autocomplete:{type:G(String),default:"none"},automaticDropdown:Boolean,clearable:Boolean,clearIcon:{type:Ut,default:ql},effect:{type:G(String),default:"light"},collapseTags:Boolean,collapseTagsTooltip:Boolean,tagTooltip:{type:G(Object),default:()=>({})},maxCollapseTags:{type:Number,default:1},defaultFirstOption:Boolean,disabled:{type:Boolean,default:void 0},estimatedOptionHeight:{type:Number,default:void 0},filterable:Boolean,filterMethod:{type:G(Function)},height:{type:Number,default:274},itemHeight:{type:Number,default:34},id:String,loading:Boolean,loadingText:String,modelValue:{type:G([Array,String,Number,Boolean,Object]),default:void 0},multiple:Boolean,multipleLimit:{type:Number,default:0},name:String,noDataText:String,noMatchText:String,remoteMethod:{type:G(Function)},reserveKeyword:{type:Boolean,default:!0},options:{type:G(Array),required:!0},placeholder:{type:String},teleported:tn.teleported,persistent:{type:Boolean,default:!0},popperClass:tn.popperClass,popperStyle:tn.popperStyle,popperOptions:{type:G(Object),default:()=>({})},remote:Boolean,debounce:{type:Number,default:300},size:In,props:{type:G(Object),default:()=>jc},valueKey:{type:String,default:"value"},scrollbarAlwaysOn:Boolean,validateEvent:{type:Boolean,default:!0},offset:{type:Number,default:12},remoteShowSuffix:Boolean,showArrow:{type:Boolean,default:!0},placement:{type:G(String),values:Wl,default:"bottom-start"},fallbackPlacements:{type:G(Array),default:["bottom-start","top-start","right","left"]},tagType:{...io.type,default:"info"},tagEffect:{...io.effect,default:"light"},tabindex:{type:[String,Number],default:0},appendTo:tn.appendTo,fitInputWidth:{type:[Boolean,Number],default:!0,validator(e){return Wt(e)||He(e)}},suffixIcon:{type:Ut,default:jl},...As,...ua(["ariaLabel"])}),Rj=$e({data:Array,disabled:Boolean,hovering:Boolean,item:{type:G(Object),required:!0},index:Number,style:Object,selected:Boolean,created:Boolean}),_j={[it]:e=>!0,[yt]:e=>!0,"end-reached":Bi["end-reached"],"remove-tag":e=>!0,"visible-change":e=>!0,focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0},Aj={hover:e=>He(e),select:(e,t)=>!0};var Lj=ue({props:{item:{type:Object,required:!0},style:{type:Object},height:Number},setup(){return{ns:he("select")}}});function Vj(e,t,n,a,l,o){return O(),H("div",{class:P(e.ns.be("group","title")),style:je({...e.style,lineHeight:`${e.height}px`})},Se(e.item.label),7)}var Dj=Rn(Lj,[["render",Vj]]);function Bj(e,{emit:t}){return{hoverItem:()=>{e.disabled||t("hover",e.index)},selectOptionClick:()=>{e.disabled||t("select",e.item,e.index)}}}var Fj=ue({props:Rj,emits:Aj,setup(e,{emit:t}){const n=Fe(pm),a=he("select"),l=ur?null:"mousemove",{hoverItem:o,selectOptionClick:s}=Bj(e,{emit:t}),{getLabel:i}=gu(n.props),u=n.contentId;return{ns:a,contentId:u,mouseMoveEventName:l,hoverItem:o,handleMousedown:d=>{let f=d.target;const p=d.currentTarget;for(;f&&f!==p;){if(Cs(f))return;f=f.parentElement}d.preventDefault()},selectOptionClick:s,getLabel:i}}});const zj=["id","aria-selected","aria-disabled"];function Hj(e,t,n,a,l,o){return O(),H("li",pt({id:`${e.contentId}-${e.index}`,role:"option","aria-selected":e.selected,"aria-disabled":e.disabled||void 0,style:e.style,class:[e.ns.be("dropdown","item"),e.ns.is("selected",e.selected),e.ns.is("disabled",e.disabled),e.ns.is("created",e.created),e.ns.is("hovering",e.hovering)]},{[ds(e.mouseMoveEventName)]:t[0]||(t[0]=(...s)=>e.hoverItem&&e.hoverItem(...s))},{onMousedown:t[1]||(t[1]=(...s)=>e.handleMousedown&&e.handleMousedown(...s)),onClick:t[2]||(t[2]=Je((...s)=>e.selectOptionClick&&e.selectOptionClick(...s),["stop"]))}),[ne(e.$slots,"default",{item:e.item,index:e.index,disabled:e.disabled},()=>[K("span",null,Se(e.getLabel(e.item)),1)])],16,zj)}var Kj=Rn(Fj,[["render",Hj]]),Wj=ue({name:"ElSelectDropdown",props:{loading:Boolean,data:{type:Array,required:!0},hoveringIndex:Number,width:Number,id:String,ariaLabel:String},emits:{"end-reached":Bi["end-reached"]},setup(e,{slots:t,expose:n,emit:a}){const l=Fe(pm),o=he("select"),{getLabel:s,getValue:i,getDisabled:u}=gu(l.props),c=V([]),d=V(),f=C(()=>e.data.length);fe(()=>f.value,()=>{var N,A;(A=(N=l.tooltipRef.value)==null?void 0:N.updatePopper)==null||A.call(N)});const p=C(()=>xt(l.props.estimatedOptionHeight)),g=C(()=>p.value?{itemSize:l.props.itemHeight}:{estimatedSize:l.props.estimatedOptionHeight,itemSize:N=>c.value[N]}),m=(N=[],A)=>{const{props:{valueKey:j}}=l;return rt(A)?N&&N.some(F=>Zt(Sn(F,j))===Sn(A,j)):N.includes(A)},v=(N,A)=>{if(rt(A)){const{valueKey:j}=l.props;return Sn(N,j)===Sn(A,j)}else return N===A},h=(N,A)=>l.props.multiple?m(N,i(A)):v(N,i(A)),b=(N,A)=>{const{disabled:j,multiple:F,multipleLimit:B}=l.props;return j||!A&&(F?B>0&&N.length>=B:!1)},y=N=>e.hoveringIndex===N;n({listRef:d,isSized:p,isItemDisabled:b,isItemHovering:y,isItemSelected:h,scrollToItem:N=>{const A=d.value;A&&A.scrollToItem(N)},resetScrollTop:()=>{const N=d.value;N&&N.resetScrollTop()}});const E=N=>{const{index:A,data:j,style:F}=N,B=r(p),{itemSize:D,estimatedSize:R}=r(g),{modelValue:z}=l.props,{onSelect:L,onHover:W}=l,Y=j[A];if(Y.type==="Group")return q(Dj,{item:Y,style:F,height:B?D:R},null);const J=h(z,Y),Z=b(z,J),Q=y(A);return q(Kj,pt(N,{selected:J,disabled:u(Y)||Z,created:!!Y.created,hovering:Q,item:Y,onSelect:L,onHover:W}),{default:ee=>{var ie;return((ie=t.default)==null?void 0:ie.call(t,ee))||q("span",null,[s(Y)])}})},{onKeyboardNavigate:x,onKeyboardSelect:$}=l,w=()=>{x("forward")},T=()=>{x("backward")},M=N=>{const A=Gt(N),{tab:j,esc:F,down:B,up:D,enter:R,numpadEnter:z}=ye;switch([F,B,D,R,z].includes(A)&&(N.preventDefault(),N.stopPropagation()),A){case j:case F:break;case B:w();break;case D:T();break;case R:case z:$()}},I=N=>{a("end-reached",N)};return()=>{var z,L,W,Y;const{data:N,width:A}=e,{height:j,multiple:F,scrollbarAlwaysOn:B}=l.props,D=ur?!0:B,R=r(p)?bu:_B;return q("div",{class:[o.b("dropdown"),o.is("multiple",F)],style:{width:`${A}px`}},[(z=t.header)==null?void 0:z.call(t),((L=t.loading)==null?void 0:L.call(t))||((W=t.empty)==null?void 0:W.call(t))||q(R,pt({ref:d},r(g),{className:o.be("dropdown","list"),scrollbarAlwaysOn:D,data:N,height:j,width:A,total:N.length,innerElement:"ul",innerProps:{id:e.id,role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical"},onEndReached:I,onKeydown:M}),{default:J=>q(E,J,null)}),(Y=t.footer)==null?void 0:Y.call(t)])}}});function jj(e,t){const{aliasProps:n,getLabel:a,getValue:l}=gu(e),o=V(0),s=V(),i=C(()=>e.allowCreate&&e.filterable);fe(()=>e.options,g=>{const m=new Set(g.map(v=>a(v)));t.createdOptions=t.createdOptions.filter(v=>!m.has(a(v)))});function u(g){const m=v=>a(v)===g;return e.options&&e.options.some(m)||t.createdOptions.some(m)}function c(g){i.value&&(e.multiple&&g.created?o.value++:s.value=g)}function d(g){if(i.value)if(g&&g.length>0){if(u(g)){t.createdOptions=t.createdOptions.filter(v=>a(v)!==t.previousQuery);return}const m={[n.value.value]:g,[n.value.label]:g,created:!0,[n.value.disabled]:!1};t.createdOptions.length>=o.value?t.createdOptions[o.value]=m:t.createdOptions.push(m)}else if(e.multiple)t.createdOptions.length=o.value;else{const m=s.value;t.createdOptions.length=0,m&&m.created&&t.createdOptions.push(m)}}function f(g){if(!i.value||!g||!g.created||g.created&&e.reserveKeyword&&t.inputValue===a(g))return;const m=t.createdOptions.findIndex(v=>l(v)===l(g));~m&&(t.createdOptions.splice(m,1),o.value--)}function p(){i.value&&(t.createdOptions.length=0,o.value=0)}return{createNewOption:d,removeNewOption:f,selectNewOption:c,clearAllNewOption:p}}const qj=(e,t)=>{const{t:n}=St(),a=mn(),l=he("select"),o=he("input"),{form:s,formItem:i}=Kn(),{inputId:u}=Ea(e,{formItemContext:i}),{aliasProps:c,getLabel:d,getValue:f,getDisabled:p,getOptions:g}=gu(e),{valueOnClear:m,isEmptyValue:v}=vu(e),h=Ft({inputValue:"",cachedOptions:[],createdOptions:[],hoveringIndex:-1,inputHovering:!1,collapseItemWidth:0,previousQuery:null,previousValue:void 0,selectedLabel:"",menuVisibleOnFocus:!1,isBeforeHide:!1}),b=V(-1),y=V(!1),k=V(),S=V(),E=V(),x=V(),$=V(),w=V(),T=V(),M=V(),I=V(),N=V(),{isComposing:A,handleCompositionStart:j,handleCompositionEnd:F,handleCompositionUpdate:B}=pu({afterComposition:Ne=>gn(Ne)}),D=sn(),{wrapperRef:R,isFocused:z,handleBlur:L}=ho($,{disabled:D,afterFocus(){e.automaticDropdown&&!Z.value&&(Z.value=!0,h.menuVisibleOnFocus=!0)},beforeBlur(Ne){var ct,Ct;return((ct=E.value)==null?void 0:ct.isFocusInsideContent(Ne))||((Ct=x.value)==null?void 0:Ct.isFocusInsideContent(Ne))},afterBlur(){var Ne;Z.value=!1,h.menuVisibleOnFocus=!1,e.validateEvent&&((Ne=i==null?void 0:i.validate)==null||Ne.call(i,"blur").catch(vt))}}),W=C(()=>we("")),Y=C(()=>e.loading?!1:e.options.length>0||h.createdOptions.length>0),J=V([]),Z=V(!1),Q=C(()=>(s==null?void 0:s.statusIcon)??!1),ee=C(()=>{const Ne=J.value.length*e.itemHeight;return Ne>e.height?e.height:Ne}),ie=C(()=>e.multiple?me(e.modelValue)&&e.modelValue.length>0:!v(e.modelValue)),ve=C(()=>e.clearable&&!D.value&&ie.value&&(z.value||h.inputHovering)),pe=C(()=>e.remote&&e.filterable&&!e.remoteShowSuffix?"":e.suffixIcon),re=C(()=>pe.value&&l.is("reverse",Z.value)),_=C(()=>(i==null?void 0:i.validateState)||""),U=C(()=>{if(_.value)return ef[_.value]}),ae=C(()=>e.remote?e.debounce:0),le=C(()=>e.remote&&!h.inputValue&&!Y.value),se=C(()=>e.loading?e.loadingText||n("el.select.loading"):e.filterable&&h.inputValue&&Y.value&&J.value.length===0?e.noMatchText||n("el.select.noMatch"):Y.value?null:e.noDataText||n("el.select.noData")),de=C(()=>e.filterable&&We(e.filterMethod)),be=C(()=>e.filterable&&e.remote&&We(e.remoteMethod)),we=Ne=>{const ct=new RegExp(gh(Ne),"i"),Ct=$t=>de.value||be.value?!0:Ne?ct.test(d($t)||""):!0;return e.loading?[]:[...h.createdOptions,...e.options].reduce(($t,qn)=>{const ga=g(qn);if(me(ga)){const _r=ga.filter(Ct);_r.length>0&&$t.push({label:d(qn),type:"Group"},..._r)}else(e.remote||Ct(qn))&&$t.push(qn);return $t},[])},Oe=()=>{J.value=we(h.inputValue)},Ce=C(()=>{const Ne=new Map;return W.value.forEach((ct,Ct)=>{Ne.set(Re(f(ct)),{option:ct,index:Ct})}),Ne}),Pe=C(()=>{const Ne=new Map;return J.value.forEach((ct,Ct)=>{Ne.set(Re(f(ct)),{option:ct,index:Ct})}),Ne}),ge=C(()=>J.value.every(Ne=>p(Ne))),ke=$n(),Le=C(()=>ke.value==="small"?"small":"default"),qe=()=>{var ct;if(He(e.fitInputWidth)){b.value=e.fitInputWidth;return}const Ne=((ct=k.value)==null?void 0:ct.offsetWidth)||200;!e.fitInputWidth&&Y.value?Ae(()=>{b.value=Math.max(Ne,lt())}):b.value=Ne},lt=()=>{var ga,_r;const Ne=document.createElement("canvas").getContext("2d"),ct=l.be("dropdown","item"),Ct=(((_r=(ga=M.value)==null?void 0:ga.listRef)==null?void 0:_r.innerRef)||document).querySelector(`.${ct}`);if(Ct===null||Ne===null)return 0;const $t=getComputedStyle(Ct),qn=Number.parseFloat($t.paddingLeft)+Number.parseFloat($t.paddingRight);return Ne.font=`bold ${$t.font.replace(new RegExp(`\\b${$t.fontWeight}\\b`),"")}`,J.value.reduce((OE,NE)=>{const ME=Ne.measureText(d(NE));return Math.max(ME.width,OE)},0)+qn},nt=()=>{if(!S.value)return 0;const Ne=window.getComputedStyle(S.value);return Number.parseFloat(Ne.gap||"6px")},Ze=C(()=>{const Ne=nt();return{maxWidth:`calc(100% - ${(e.filterable&&!D.value?Ne+11:0)+(N.value&&e.maxCollapseTags===1?h.collapseItemWidth+Ne:0)}px)`}}),kt=C(()=>me(e.modelValue)?e.modelValue.length===0&&!h.inputValue:e.filterable?!h.inputValue:!0),Rt=C(()=>{const Ne=e.placeholder??n("el.select.placeholder");return e.multiple||!ie.value?Ne:h.selectedLabel}),Lt=C(()=>{var Ne,ct;return(ct=(Ne=E.value)==null?void 0:Ne.popperRef)==null?void 0:ct.contentRef}),_t=C(()=>{if(e.multiple){const Ne=e.modelValue.length;if(Ne>0&&Pe.value.has(e.modelValue[Ne-1])){const{index:ct}=Pe.value.get(e.modelValue[Ne-1]);return ct}}else if(!v(e.modelValue)&&Pe.value.has(e.modelValue)){const{index:Ne}=Pe.value.get(e.modelValue);return Ne}return-1}),jt=C({get(){return Z.value&&(e.loading||!le.value||e.remote&&!!a.empty)&&(!y.value||!pa(h.previousQuery)||Y.value)},set(Ne){Z.value=Ne}}),Yt=C(()=>e.multiple?e.collapseTags?h.cachedOptions.slice(0,e.maxCollapseTags):h.cachedOptions:[]),xe=C(()=>e.multiple?e.collapseTags?h.cachedOptions.slice(e.maxCollapseTags):[]:[]),{createNewOption:Ee,removeNewOption:Ke,selectNewOption:Xe,clearAllNewOption:Bt}=jj(e,h),ce=Ne=>{var ct;D.value||e.filterable&&Z.value&&Ne&&!((ct=T.value)!=null&&ct.contains(Ne.target))||(h.menuVisibleOnFocus?h.menuVisibleOnFocus=!1:Z.value=!Z.value)},Ie=()=>{h.inputValue.length>0&&!Z.value&&(Z.value=!0),Ee(h.inputValue),Ae(()=>{at(h.inputValue)})},Ue=su(()=>{Ie(),y.value=!1},ae),at=Ne=>{h.previousQuery===Ne||A.value||(h.previousQuery=Ne,e.filterable&&We(e.filterMethod)?e.filterMethod(Ne):e.filterable&&e.remote&&We(e.remoteMethod)&&e.remoteMethod(Ne),e.defaultFirstOption&&(e.filterable||e.remote)&&J.value.length?Ae(gt):Ae(Mt))},gt=()=>{const Ne=J.value.filter($t=>!$t.disabled&&$t.type!=="Group"),ct=Ne.find($t=>$t.created),Ct=Ne[0];h.hoveringIndex=Dt(J.value,ct||Ct)},wt=Ne=>{cn(e.modelValue,Ne)||t(yt,Ne)},et=Ne=>{t(it,Ne),wt(Ne),h.previousValue=e.multiple?String(Ne):Ne,Ae(()=>{if(e.multiple&&me(e.modelValue)){const ct=h.cachedOptions.slice(),Ct=e.modelValue.map($t=>Ir($t,ct));cn(h.cachedOptions,Ct)||(h.cachedOptions=Ct)}else Vs(!0)})},Dt=(Ne=[],ct)=>{if(!rt(ct))return Ne.indexOf(ct);const Ct=e.valueKey;let $t=-1;return Ne.some((qn,ga)=>Sn(qn,Ct)===Sn(ct,Ct)?($t=ga,!0):!1),$t},Re=Ne=>rt(Ne)?Sn(Ne,e.valueKey):Ne,Ye=()=>{qe()},Qe=Ne=>{t("end-reached",Ne)},Xt=()=>{h.collapseItemWidth=N.value.getBoundingClientRect().width},Me=()=>{var Ne,ct;(ct=(Ne=E.value)==null?void 0:Ne.updatePopper)==null||ct.call(Ne)},De=()=>{var Ne,ct;(ct=(Ne=x.value)==null?void 0:Ne.updatePopper)==null||ct.call(Ne)},_e=Ne=>{const ct=f(Ne);if(e.multiple){let Ct=e.modelValue.slice();const $t=Dt(Ct,ct);$t>-1?(Ct=[...Ct.slice(0,$t),...Ct.slice($t+1)],h.cachedOptions.splice($t,1),Ke(Ne)):(e.multipleLimit<=0||Ct.length{let Ct=e.modelValue.slice();const $t=Dt(Ct,f(ct));$t>-1&&!D.value&&(Ct=[...e.modelValue.slice(0,$t),...e.modelValue.slice($t+1)],h.cachedOptions.splice($t,1),et(Ct),t("remove-tag",f(ct)),Ke(ct)),Ne.stopPropagation(),qt()},qt=()=>{var Ne;(Ne=$.value)==null||Ne.focus()},nn=()=>{var Ne;if(Z.value){Z.value=!1,Ae(()=>{var ct;return(ct=$.value)==null?void 0:ct.blur()});return}(Ne=$.value)==null||Ne.blur()},On=()=>{h.inputValue.length>0?h.inputValue="":Z.value=!1},Xa=Ne=>Ww(Ne,ct=>!h.cachedOptions.some(Ct=>f(Ct)===ct&&p(Ct))),pl=Ne=>{const ct=Gt(Ne);if(e.multiple&&ct!==ye.delete&&h.inputValue.length===0){Ne.preventDefault();const Ct=e.modelValue.slice(),$t=Xa(Ct);if($t<0)return;const qn=Ct[$t];Ct.splice($t,1);const ga=h.cachedOptions[$t];h.cachedOptions.splice($t,1),Ke(ga),et(Ct),t("remove-tag",qn)}},bo=()=>{let Ne;me(e.modelValue)?Ne=[]:Ne=m.value,h.selectedLabel="",Z.value=!1,et(Ne),t("clear"),Bt(),qt()},Ja=(Ne,ct=void 0)=>{const Ct=J.value;if(!["forward","backward"].includes(Ne)||D.value||Ct.length<=0||ge.value||A.value)return;if(!Z.value)return ce();xt(ct)&&(ct=h.hoveringIndex);let $t=-1;Ne==="forward"?($t=ct+1,$t>=Ct.length&&($t=0)):Ne==="backward"&&($t=ct-1,($t<0||$t>=Ct.length)&&($t=Ct.length-1));const qn=Ct[$t];if(p(qn)||qn.type==="Group")return Ja(Ne,$t);h.hoveringIndex=$t,Za($t)},Te=()=>{if(Z.value)~h.hoveringIndex&&J.value[h.hoveringIndex]&&_e(J.value[h.hoveringIndex]);else return ce()},ot=Ne=>{h.hoveringIndex=Ne??-1},Mt=()=>{if(!e.multiple)h.hoveringIndex=J.value.findIndex(Ne=>Re(f(Ne))===Re(e.modelValue));else{const Ne=e.modelValue.length;if(Ne>0){const ct=e.modelValue[Ne-1];h.hoveringIndex=J.value.findIndex(Ct=>Re(ct)===Re(f(Ct)))}else h.hoveringIndex=-1}},gn=Ne=>{if(h.inputValue=Ne.target.value,e.remote)y.value=!0,Ue();else return Ie()},ln=Ne=>{if(Z.value=!1,z.value){const ct=new FocusEvent("blur",Ne);L(ct)}},Nn=()=>(h.isBeforeHide=!1,Ae(()=>{~_t.value&&Za(_t.value)})),Za=Ne=>{M.value.scrollToItem(Ne)},Ir=(Ne,ct)=>{const Ct=Re(Ne);if(Ce.value.has(Ct)){const{option:$t}=Ce.value.get(Ct);return $t}if(ct&&ct.length){const $t=ct.find(qn=>Re(f(qn))===Ct);if($t)return $t}return{[c.value.value]:Ne,[c.value.label]:Ne}},Uo=Ne=>{var ct;return((ct=Ce.value.get(f(Ne)))==null?void 0:ct.index)??-1},Vs=(Ne=!1)=>{if(e.multiple)if(e.modelValue.length>0){const ct=h.cachedOptions.slice();h.cachedOptions.length=0,h.previousValue=e.modelValue.toString();for(const Ct of e.modelValue){const $t=Ir(Ct,ct);h.cachedOptions.push($t)}}else h.cachedOptions=[],h.previousValue=void 0;else if(ie.value){h.previousValue=e.modelValue;const ct=J.value,Ct=ct.findIndex($t=>Re(f($t))===Re(e.modelValue));~Ct?h.selectedLabel=d(ct[Ct]):(!h.selectedLabel||Ne)&&(h.selectedLabel=Re(e.modelValue))}else h.selectedLabel="",h.previousValue=void 0;Bt(),qe()};fe(()=>e.fitInputWidth,()=>{qe()}),fe(Z,Ne=>{Ne?(e.persistent||qe(),at("")):(h.inputValue="",h.previousQuery=null,h.isBeforeHide=!0,h.menuVisibleOnFocus=!1,Ee(""))}),fe(()=>e.modelValue,(Ne,ct)=>{var Ct;(!Ne||me(Ne)&&Ne.length===0||e.multiple&&!cn(Ne.toString(),h.previousValue)||!e.multiple&&Re(Ne)!==Re(h.previousValue))&&Vs(!0),!cn(Ne,ct)&&e.validateEvent&&((Ct=i==null?void 0:i.validate)==null||Ct.call(i,"change").catch(vt))},{deep:!0}),fe(()=>e.options,()=>{const Ne=$.value;(!Ne||Ne&&document.activeElement!==Ne)&&Vs()},{deep:!0,flush:"post"}),fe(()=>J.value,()=>(qe(),M.value&&Ae(M.value.resetScrollTop))),ia(()=>{h.isBeforeHide||Oe()}),ia(()=>{const{valueKey:Ne,options:ct}=e,Ct=new Map;for(const $t of ct){const qn=f($t);let ga=qn;if(rt(ga)&&(ga=Sn(qn,Ne)),Ct.get(ga)){Kt("ElSelectV2","The option values you provided seem to be duplicated, which may cause some problems, please check.");break}else Ct.set(ga,!0)}}),mt(()=>{Vs()}),on(k,()=>Wn(Ye)),on(R,Me),on(I,De),on(N,Xt);let Rr;return fe(()=>jt.value,Ne=>{Ne?Rr=on(M,Me).stop:(Rr==null||Rr(),Rr=void 0),t("visible-change",Ne)}),{inputId:u,collapseTagSize:Le,currentPlaceholder:Rt,expanded:Z,emptyText:se,popupHeight:ee,debounce:ae,allOptions:W,allOptionsValueMap:Ce,filteredOptions:J,iconComponent:pe,iconReverse:re,tagStyle:Ze,popperSize:b,dropdownMenuVisible:jt,hasModelValue:ie,shouldShowPlaceholder:kt,selectDisabled:D,selectSize:ke,needStatusIcon:Q,showClearBtn:ve,states:h,isFocused:z,nsSelect:l,nsInput:o,inputRef:$,menuRef:M,tagMenuRef:I,tooltipRef:E,tagTooltipRef:x,selectRef:k,wrapperRef:R,selectionRef:S,prefixRef:w,suffixRef:T,collapseItemRef:N,popperRef:Lt,validateState:_,validateIcon:U,showTagList:Yt,collapseTagList:xe,debouncedOnInputChange:Ue,deleteTag:Nt,getLabel:d,getValue:f,getDisabled:p,getValueKey:Re,getIndex:Uo,handleClear:bo,handleClickOutside:ln,handleDel:pl,handleEsc:On,focus:qt,blur:nn,handleMenuEnter:Nn,handleResize:Ye,updateTooltip:Me,updateTagTooltip:De,updateOptions:Oe,toggleMenu:ce,scrollTo:Za,onInput:gn,onKeyboardNavigate:Ja,onKeyboardSelect:Te,onEndReached:Qe,onSelect:_e,onHover:ot,handleCompositionStart:j,handleCompositionEnd:F,handleCompositionUpdate:B}};var Yj=ue({name:"ElSelectV2",components:{ElSelectMenu:Wj,ElTag:oo,ElTooltip:Hn,ElIcon:Be},directives:{ClickOutside:Ho},props:Ij,emits:_j,setup(e,{emit:t}){const n=C(()=>{const{modelValue:u,multiple:c}=e,d=c?[]:void 0;return me(u)?c?u:d:c?d:u}),a=qj(Ft({...Fn(e),modelValue:n}),t),{calculatorRef:l,inputStyle:o}=mh(),s=Xn();Tt(pm,{props:Ft({...Fn(e),height:a.popupHeight,modelValue:n}),expanded:a.expanded,tooltipRef:a.tooltipRef,contentId:s,onSelect:a.onSelect,onHover:a.onHover,onKeyboardNavigate:a.onKeyboardNavigate,onKeyboardSelect:a.onKeyboardSelect});const i=C(()=>e.multiple?a.states.cachedOptions.map(u=>a.getLabel(u)):a.states.selectedLabel);return{...a,modelValue:n,selectedLabel:i,calculatorRef:l,inputStyle:o,contentId:s,BORDER_HORIZONTAL_WIDTH:2}}});const Uj=["id","value","autocomplete","tabindex","aria-expanded","aria-label","disabled","aria-controls","aria-activedescendant","readonly","name"],Gj=["textContent"],Xj={key:1};function Jj(e,t,n,a,l,o){const s=Pt("el-tag"),i=Pt("el-tooltip"),u=Pt("el-icon"),c=Pt("el-select-menu"),d=C1("click-outside");return ft((O(),H("div",{ref:"selectRef",class:P([e.nsSelect.b(),e.nsSelect.m(e.selectSize)]),onMouseenter:t[15]||(t[15]=f=>e.states.inputHovering=!0),onMouseleave:t[16]||(t[16]=f=>e.states.inputHovering=!1)},[q(i,{ref:"tooltipRef",visible:e.dropdownMenuVisible,teleported:e.teleported,"popper-class":[e.nsSelect.e("popper"),e.popperClass],"popper-style":e.popperStyle,"gpu-acceleration":!1,"stop-popper-mouse-event":!1,"popper-options":e.popperOptions,"fallback-placements":e.fallbackPlacements,effect:e.effect,placement:e.placement,pure:"",transition:`${e.nsSelect.namespace.value}-zoom-in-top`,trigger:"click",persistent:e.persistent,"append-to":e.appendTo,"show-arrow":e.showArrow,offset:e.offset,onBeforeShow:e.handleMenuEnter,onHide:t[14]||(t[14]=f=>e.states.isBeforeHide=!1)},{default:X(()=>{var f;return[K("div",{ref:"wrapperRef",class:P([e.nsSelect.e("wrapper"),e.nsSelect.is("focused",e.isFocused),e.nsSelect.is("hovering",e.states.inputHovering),e.nsSelect.is("filterable",e.filterable),e.nsSelect.is("disabled",e.selectDisabled)]),onClick:t[11]||(t[11]=Je((...p)=>e.toggleMenu&&e.toggleMenu(...p),["prevent"]))},[e.$slots.prefix?(O(),H("div",{key:0,ref:"prefixRef",class:P(e.nsSelect.e("prefix"))},[ne(e.$slots,"prefix")],2)):te("v-if",!0),K("div",{ref:"selectionRef",class:P([e.nsSelect.e("selection"),e.nsSelect.is("near",e.multiple&&!e.$slots.prefix&&!!e.modelValue.length)])},[e.multiple?ne(e.$slots,"tag",{key:0,data:e.states.cachedOptions,deleteTag:e.deleteTag,selectDisabled:e.selectDisabled},()=>{var p,g,m,v,h,b,y,k,S,E,x,$,w;return[(O(!0),H(ze,null,bt(e.showTagList,T=>(O(),H("div",{key:e.getValueKey(e.getValue(T)),class:P(e.nsSelect.e("selected-item")),style:je(e.tagStyle)},[q(s,{closable:!e.selectDisabled&&!e.getDisabled(T),size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",onClose:M=>e.deleteTag(M,T)},{default:X(()=>[K("span",{class:P(e.nsSelect.e("tags-text"))},[ne(e.$slots,"label",{index:e.getIndex(T),label:e.getLabel(T),value:e.getValue(T)},()=>[st(Se(e.getLabel(T)),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],6))),128)),e.collapseTags&&e.states.cachedOptions.length>e.maxCollapseTags?(O(),oe(i,{key:0,ref:"tagTooltipRef",disabled:e.dropdownMenuVisible||!e.collapseTagsTooltip,"fallback-placements":((p=e.tagTooltip)==null?void 0:p.fallbackPlacements)??["bottom","top","right","left"],effect:((g=e.tagTooltip)==null?void 0:g.effect)??e.effect,placement:((m=e.tagTooltip)==null?void 0:m.placement)??"bottom","popper-class":((v=e.tagTooltip)==null?void 0:v.popperClass)??e.popperClass,"popper-style":((h=e.tagTooltip)==null?void 0:h.popperStyle)??e.popperStyle,teleported:((b=e.tagTooltip)==null?void 0:b.teleported)??e.teleported,"append-to":((y=e.tagTooltip)==null?void 0:y.appendTo)??e.appendTo,"popper-options":((k=e.tagTooltip)==null?void 0:k.popperOptions)??e.popperOptions,transition:(S=e.tagTooltip)==null?void 0:S.transition,"show-after":(E=e.tagTooltip)==null?void 0:E.showAfter,"hide-after":(x=e.tagTooltip)==null?void 0:x.hideAfter,"auto-close":($=e.tagTooltip)==null?void 0:$.autoClose,offset:(w=e.tagTooltip)==null?void 0:w.offset},{default:X(()=>[K("div",{ref:"collapseItemRef",class:P([e.nsSelect.e("selected-item"),e.nsSelect.e("collapse-item")])},[q(s,{closable:!1,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":""},{default:X(()=>[K("span",{class:P(e.nsSelect.e("tags-text"))}," + "+Se(e.states.cachedOptions.length-e.maxCollapseTags),3)]),_:1},8,["size","type","effect"])],2)]),content:X(()=>[K("div",{ref:"tagMenuRef",class:P(e.nsSelect.e("selection"))},[(O(!0),H(ze,null,bt(e.collapseTagList,T=>(O(),H("div",{key:e.getValueKey(e.getValue(T)),class:P(e.nsSelect.e("selected-item"))},[q(s,{class:"in-tooltip",closable:!e.selectDisabled&&!e.getDisabled(T),size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",onClose:M=>e.deleteTag(M,T)},{default:X(()=>[K("span",{class:P(e.nsSelect.e("tags-text"))},[ne(e.$slots,"label",{index:e.getIndex(T),label:e.getLabel(T),value:e.getValue(T)},()=>[st(Se(e.getLabel(T)),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","fallback-placements","effect","placement","popper-class","popper-style","teleported","append-to","popper-options","transition","show-after","hide-after","auto-close","offset"])):te("v-if",!0)]}):te("v-if",!0),K("div",{class:P([e.nsSelect.e("selected-item"),e.nsSelect.e("input-wrapper"),e.nsSelect.is("hidden",!e.filterable||e.selectDisabled||e.multiple&&!e.states.inputValue&&!e.isFocused)])},[K("input",{id:e.inputId,ref:"inputRef",value:e.states.inputValue,style:je(e.inputStyle),autocomplete:e.autocomplete,tabindex:e.tabindex,"aria-autocomplete":"none","aria-haspopup":"listbox",autocapitalize:"off","aria-expanded":e.expanded,"aria-label":e.ariaLabel,class:P([e.nsSelect.e("input"),e.nsSelect.is(e.selectSize)]),disabled:e.selectDisabled,role:"combobox","aria-controls":e.contentId,"aria-activedescendant":e.states.hoveringIndex>=0?`${e.contentId}-${e.states.hoveringIndex}`:"",readonly:!e.filterable,spellcheck:"false",type:"text",name:e.name,onInput:t[0]||(t[0]=(...p)=>e.onInput&&e.onInput(...p)),onChange:t[1]||(t[1]=Je(()=>{},["stop"])),onCompositionstart:t[2]||(t[2]=(...p)=>e.handleCompositionStart&&e.handleCompositionStart(...p)),onCompositionupdate:t[3]||(t[3]=(...p)=>e.handleCompositionUpdate&&e.handleCompositionUpdate(...p)),onCompositionend:t[4]||(t[4]=(...p)=>e.handleCompositionEnd&&e.handleCompositionEnd(...p)),onKeydown:[t[5]||(t[5]=an(Je(p=>e.onKeyboardNavigate("backward"),["stop","prevent"]),["up"])),t[6]||(t[6]=an(Je(p=>e.onKeyboardNavigate("forward"),["stop","prevent"]),["down"])),t[7]||(t[7]=an(Je((...p)=>e.onKeyboardSelect&&e.onKeyboardSelect(...p),["stop","prevent"]),["enter"])),t[8]||(t[8]=an(Je((...p)=>e.handleEsc&&e.handleEsc(...p),["stop","prevent"]),["esc"])),t[9]||(t[9]=an(Je((...p)=>e.handleDel&&e.handleDel(...p),["stop"]),["delete"]))],onClick:t[10]||(t[10]=Je((...p)=>e.toggleMenu&&e.toggleMenu(...p),["stop"]))},null,46,Uj),e.filterable?(O(),H("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:P(e.nsSelect.e("input-calculator")),textContent:Se(e.states.inputValue)},null,10,Gj)):te("v-if",!0)],2),e.shouldShowPlaceholder?(O(),H("div",{key:1,class:P([e.nsSelect.e("selected-item"),e.nsSelect.e("placeholder"),e.nsSelect.is("transparent",!e.hasModelValue||e.expanded&&!e.states.inputValue)])},[e.hasModelValue?ne(e.$slots,"label",{key:0,index:((f=e.allOptionsValueMap.get(e.modelValue))==null?void 0:f.index)??-1,label:e.currentPlaceholder,value:e.modelValue},()=>[K("span",null,Se(e.currentPlaceholder),1)]):(O(),H("span",Xj,Se(e.currentPlaceholder),1))],2)):te("v-if",!0)],2),K("div",{ref:"suffixRef",class:P(e.nsSelect.e("suffix"))},[e.iconComponent?ft((O(),oe(u,{key:0,class:P([e.nsSelect.e("caret"),e.nsInput.e("icon"),e.iconReverse])},{default:X(()=>[(O(),oe(dt(e.iconComponent)))]),_:1},8,["class"])),[[At,!e.showClearBtn]]):te("v-if",!0),e.showClearBtn&&e.clearIcon?(O(),oe(u,{key:1,class:P([e.nsSelect.e("caret"),e.nsInput.e("icon"),e.nsSelect.e("clear")]),onClick:Je(e.handleClear,["prevent","stop"])},{default:X(()=>[(O(),oe(dt(e.clearIcon)))]),_:1},8,["class","onClick"])):te("v-if",!0),e.validateState&&e.validateIcon&&e.needStatusIcon?(O(),oe(u,{key:2,class:P([e.nsInput.e("icon"),e.nsInput.e("validateIcon"),e.nsInput.is("loading",e.validateState==="validating")])},{default:X(()=>[(O(),oe(dt(e.validateIcon)))]),_:1},8,["class"])):te("v-if",!0)],2)],2)]}),content:X(()=>[q(c,{id:e.contentId,ref:"menuRef",data:e.filteredOptions,width:e.popperSize-e.BORDER_HORIZONTAL_WIDTH,"hovering-index":e.states.hoveringIndex,"scrollbar-always-on":e.scrollbarAlwaysOn,"aria-label":e.ariaLabel,onEndReached:e.onEndReached},va({default:X(f=>[ne(e.$slots,"default",Cl(kl(f)))]),_:2},[e.$slots.header?{name:"header",fn:X(()=>[K("div",{class:P(e.nsSelect.be("dropdown","header")),onClick:t[12]||(t[12]=Je(()=>{},["stop"]))},[ne(e.$slots,"header")],2)]),key:"0"}:void 0,e.$slots.loading&&e.loading?{name:"loading",fn:X(()=>[K("div",{class:P(e.nsSelect.be("dropdown","loading"))},[ne(e.$slots,"loading")],2)]),key:"1"}:e.loading||e.filteredOptions.length===0?{name:"empty",fn:X(()=>[K("div",{class:P(e.nsSelect.be("dropdown","empty"))},[ne(e.$slots,"empty",{},()=>[K("span",null,Se(e.emptyText),1)])],2)]),key:"2"}:void 0,e.$slots.footer?{name:"footer",fn:X(()=>[K("div",{class:P(e.nsSelect.be("dropdown","footer")),onClick:t[13]||(t[13]=Je(()=>{},["stop"]))},[ne(e.$slots,"footer")],2)]),key:"3"}:void 0]),1032,["id","data","width","hovering-index","scrollbar-always-on","aria-label","onEndReached"])]),_:3},8,["visible","teleported","popper-class","popper-style","popper-options","fallback-placements","effect","placement","transition","persistent","append-to","show-arrow","offset","onBeforeShow"])],34)),[[d,e.handleClickOutside,e.popperRef]])}var Zj=Rn(Yj,[["render",Jj]]);const Qj=ut(Zj),e7=$e({animated:Boolean,count:{type:Number,default:1},rows:{type:Number,default:3},loading:{type:Boolean,default:!0},throttle:{type:G([Number,Object])}}),t7=$e({variant:{type:String,values:["circle","rect","h1","h3","text","caption","p","image","button"],default:"text"}});var n7=ue({name:"ElSkeletonItem",__name:"skeleton-item",props:t7,setup(e){const t=he("skeleton");return(n,a)=>(O(),H("div",{class:P([r(t).e("item"),r(t).e(e.variant)])},[e.variant==="image"?(O(),oe(r(S_),{key:0})):te("v-if",!0)],2))}}),od=n7,a7=ue({name:"ElSkeleton",__name:"skeleton",props:e7,setup(e,{expose:t}){const n=e,a=he("skeleton"),l=$4(Ot(n,"loading"),n.throttle);return t({uiLoading:l}),(o,s)=>r(l)?(O(),H("div",pt({key:0,class:[r(a).b(),r(a).is("animated",e.animated)]},o.$attrs),[(O(!0),H(ze,null,bt(e.count,i=>(O(),H(ze,{key:i},[r(l)?ne(o.$slots,"template",{key:i},()=>[q(od,{class:P(r(a).is("first")),variant:"p"},null,8,["class"]),(O(!0),H(ze,null,bt(e.rows,u=>(O(),oe(od,{key:u,class:P([r(a).e("paragraph"),r(a).is("last",u===e.rows&&e.rows>1)]),variant:"p"},null,8,["class"]))),128))]):te("v-if",!0)],64))),128))],16)):ne(o.$slots,"default",Cl(pt({key:1},o.$attrs)))}}),l7=a7;const o7=ut(l7,{SkeletonItem:od}),s7=un(od),y2=Symbol("sliderContextKey"),r7=$e({modelValue:{type:G([Number,Array]),default:0},id:{type:String,default:void 0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:G([Number,String]),default:1},showInput:Boolean,showInputControls:{type:Boolean,default:!0},size:In,inputSize:In,showStops:Boolean,showTooltip:{type:Boolean,default:!0},formatTooltip:{type:G(Function),default:void 0},disabled:{type:Boolean,default:void 0},range:Boolean,vertical:Boolean,height:String,rangeStartLabel:{type:String,default:void 0},rangeEndLabel:{type:String,default:void 0},formatValueText:{type:G(Function),default:void 0},tooltipClass:{type:G([String,Array,Object,Boolean]),default:void 0},placement:{type:String,values:Wl,default:"top"},marks:{type:G(Object)},validateEvent:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},...ua(["ariaLabel"])}),lp=e=>He(e)||me(e)&&e.every(He),i7={[it]:lp,[Tn]:lp,[yt]:lp},u7=(e,t,n)=>{const a=V();return mt(async()=>{e.range?(me(e.modelValue)?(t.firstValue=Math.max(e.min,e.modelValue[0]),t.secondValue=Math.min(e.max,e.modelValue[1])):(t.firstValue=e.min,t.secondValue=e.max),t.oldValue=[t.firstValue,t.secondValue]):(!He(e.modelValue)||Number.isNaN(e.modelValue)?t.firstValue=e.min:t.firstValue=Math.min(e.max,Math.max(e.min,e.modelValue)),t.oldValue=t.firstValue),Ht(window,"resize",n),await Ae(),n()}),{sliderWrapper:a}},c7=e=>{const t=C(()=>e.marks?Object.keys(e.marks).map(Number.parseFloat).sort((n,a)=>n-a).filter(n=>n<=e.max&&n>=e.min).map(n=>({point:n,position:(n-e.min)*100/(e.max-e.min),mark:e.marks[n]})):[]);return ia(()=>{if(e.step==="mark"&&!e.marks&&Kt("ElSlider","marks prop must be provided when step is mark"),e.marks){const n=Object.keys(e.marks),a=t.value.map(o=>o.point),l=n.filter(o=>{const s=Number.parseFloat(o);return Number.isNaN(s)||!a.includes(s)});l.length>0&&Kt("ElSlider",`Some marks keys are invalid (not a number or out of [min, max]): [${l.map(o=>`'${o}'`).join(", ")}] and will be ignored.`)}}),t},d7=(e,t,n)=>{const{formItem:a}=Kn(),l=Et(),o=V(),s=V(),i={firstButton:o,secondButton:s},u=sn(),c=C(()=>Math.min(t.firstValue,t.secondValue)),d=C(()=>Math.max(t.firstValue,t.secondValue)),f=C(()=>e.range?`${100*(d.value-c.value)/(e.max-e.min)}%`:`${100*(t.firstValue-e.min)/(e.max-e.min)}%`),p=C(()=>e.range?`${100*(c.value-e.min)/(e.max-e.min)}%`:"0%"),g=C(()=>e.vertical?{height:e.height}:{}),m=C(()=>e.vertical?{height:f.value,bottom:p.value}:{width:f.value,left:p.value}),v=()=>{l.value&&(t.sliderSize=l.value.getBoundingClientRect()[e.vertical?"height":"width"])},h=I=>{const N=e.min+I*(e.max-e.min)/100;if(!e.range)return o;let A;return Math.abs(c.value-N)t.secondValue?"firstButton":"secondButton",i[A]},b=I=>{const N=h(I);return N.value.setPosition(I),N},y=I=>{t.firstValue=I??e.min,S(e.range?[c.value,d.value]:I??e.min)},k=I=>{t.secondValue=I,e.range&&S([c.value,d.value])},S=I=>{n(it,I),n(Tn,I)},E=async()=>{await Ae(),n(yt,e.range?[c.value,d.value]:e.modelValue)},x=I=>{var A,j,F,B;if(u.value||t.dragging)return;v();let N=0;if(e.vertical){const D=((j=(A=I.touches)==null?void 0:A.item(0))==null?void 0:j.clientY)??I.clientY;N=(l.value.getBoundingClientRect().bottom-D)/t.sliderSize*100}else N=((((B=(F=I.touches)==null?void 0:F.item(0))==null?void 0:B.clientX)??I.clientX)-l.value.getBoundingClientRect().left)/t.sliderSize*100;if(!(N<0||N>100))return b(N)};return{elFormItem:a,slider:l,firstButton:o,secondButton:s,sliderDisabled:u,minValue:c,maxValue:d,runwayStyle:g,barStyle:m,resetSize:v,setPosition:b,emitChange:E,onSliderWrapperPrevent:I=>{var N,A;((N=i.firstButton.value)!=null&&N.dragging||(A=i.secondButton.value)!=null&&A.dragging)&&I.preventDefault()},onSliderClick:I=>{x(I)&&E()},onSliderDown:async I=>{const N=x(I);N&&(await Ae(),N.value.onButtonDown(I))},onSliderMarkerDown:I=>{u.value||t.dragging||b(I)&&E()},setFirstValue:y,setSecondValue:k}},f7=(e,t,n,a)=>({stops:C(()=>{if(!e.showStops||e.min>e.max)return[];if(e.step==="mark"||e.step===0)return e.step===0&&Kt("ElSlider","step should not be 0."),[];const s=Math.ceil((e.max-e.min)/e.step),i=100*e.step/(e.max-e.min),u=Array.from({length:s-1}).map((c,d)=>(d+1)*i);return e.range?u.filter(c=>c<100*(n.value-e.min)/(e.max-e.min)||c>100*(a.value-e.min)/(e.max-e.min)):u.filter(c=>c>100*(t.firstValue-e.min)/(e.max-e.min))}),getStopStyle:s=>e.vertical?{bottom:`${s}%`}:{left:`${s}%`}}),p7=(e,t,n,a,l,o)=>{const s=c=>{l(it,c),l(Tn,c)},i=()=>e.range?![n.value,a.value].every((c,d)=>c===t.oldValue[d]):e.modelValue!==t.oldValue,u=()=>{var d,f;e.min>e.max&&rn("Slider","min should not be greater than max.");const c=e.modelValue;e.range&&me(c)?c[1]e.max?s([e.max,e.max]):c[0]e.max?s([c[0],e.max]):(t.firstValue=c[0],t.secondValue=c[1],i()&&(e.validateEvent&&((d=o==null?void 0:o.validate)==null||d.call(o,"change").catch(vt)),t.oldValue=c.slice())):!e.range&&He(c)&&!Number.isNaN(c)&&(ce.max?s(e.max):(t.firstValue=c,i()&&(e.validateEvent&&((f=o==null?void 0:o.validate)==null||f.call(o,"change").catch(vt)),t.oldValue=c)))};u(),fe(()=>t.dragging,c=>{c||u()}),fe(()=>e.modelValue,(c,d)=>{t.dragging||me(c)&&me(d)&&c.every((f,p)=>f===d[p])&&t.firstValue===c[0]&&t.secondValue===c[1]||u()},{deep:!0}),fe(()=>[e.min,e.max],()=>{u()})},v7=(e,t,n)=>{const a=V(),l=V(!1),o=C(()=>t.value instanceof Function);return{tooltip:a,tooltipVisible:l,formatValue:C(()=>o.value&&t.value(e.modelValue)||e.modelValue),displayTooltip:Al(()=>{n.value&&(l.value=!0)},50),hideTooltip:Al(()=>{n.value&&(l.value=!1)},50)}},h7=(e,t,n)=>{const{disabled:a,min:l,max:o,step:s,showTooltip:i,persistent:u,precision:c,sliderSize:d,formatTooltip:f,emitChange:p,resetSize:g,updateDragging:m,markList:v}=Fe(y2),{tooltip:h,tooltipVisible:b,formatValue:y,displayTooltip:k,hideTooltip:S}=v7(e,f,i),E=V(),x=C(()=>`${(e.modelValue-l.value)/(o.value-l.value)*100}%`),$=C(()=>e.vertical?{bottom:x.value}:{left:x.value}),w=C(()=>s.value==="mark"&&v.value.length>0),T=()=>{t.hovering=!0,k()},M=()=>{t.hovering=!1,t.dragging||S()},I=ee=>{a.value||(ee.preventDefault(),Y(ee),window.addEventListener("mousemove",J),window.addEventListener("touchmove",J),window.addEventListener("mouseup",Z),window.addEventListener("touchend",Z),window.addEventListener("contextmenu",Z),E.value.focus())},N=ee=>{a.value||(t.newPosition=Number.parseFloat(x.value)+ee/(o.value-l.value)*100,Q(t.newPosition),p())},A=ee=>{if(a.value||!v.value.length)return;const ie=e.modelValue,ve=Number.EPSILON,pe=Math.abs(ee);let re;if(ee>0){const _=v.value.findIndex(U=>U.point>ie+ve);if(_!==-1){const U=Math.min(_+pe-1,v.value.length-1);re=v.value[U].point}}else{let _=-1;for(let U=v.value.length-1;U>=0;U--)if(v.value[U].point{w.value?A(-1):He(s.value)&&N(-s.value)},F=()=>{w.value?A(1):He(s.value)&&N(s.value)},B=()=>{w.value?A(-4):He(s.value)&&N(-s.value*4)},D=()=>{w.value?A(4):He(s.value)&&N(s.value*4)},R=()=>{a.value||(Q(0),p())},z=()=>{a.value||(Q(100),p())},L=ee=>{const ie=Gt(ee);let ve=!0;switch(ie){case ye.left:case ye.down:j();break;case ye.right:case ye.up:F();break;case ye.home:R();break;case ye.end:z();break;case ye.pageDown:B();break;case ye.pageUp:D();break;default:ve=!1}ve&&ee.preventDefault()},W=ee=>{let ie,ve;return ee.type.startsWith("touch")?(ve=ee.touches[0].clientY,ie=ee.touches[0].clientX):(ve=ee.clientY,ie=ee.clientX),{clientX:ie,clientY:ve}},Y=ee=>{t.dragging=!0,t.isClick=!0;const{clientX:ie,clientY:ve}=W(ee);e.vertical?t.startY=ve:t.startX=ie,t.startPosition=Number.parseFloat(x.value),t.newPosition=t.startPosition},J=ee=>{if(t.dragging){t.isClick=!1,k(),g();let ie;const{clientX:ve,clientY:pe}=W(ee);e.vertical?(t.currentY=pe,ie=(t.startY-t.currentY)/d.value*100):(t.currentX=ve,ie=(t.currentX-t.startX)/d.value*100),t.newPosition=t.startPosition+ie,Q(t.newPosition)}},Z=()=>{t.dragging&&(setTimeout(()=>{t.dragging=!1,t.hovering||S(),t.isClick||Q(t.newPosition),p()},0),window.removeEventListener("mousemove",J),window.removeEventListener("touchmove",J),window.removeEventListener("mouseup",Z),window.removeEventListener("touchend",Z),window.removeEventListener("contextmenu",Z))},Q=async ee=>{if(ee===null||Number.isNaN(+ee))return;ee=ya(ee,0,100);let ie;if(s.value==="mark")v.value.length===0?ie=ee<=50?l.value:o.value:ie=v.value.reduce((ve,pe)=>Math.abs(pe.position-ee)t.dragging,ee=>{m(ee)}),Ht(E,"touchstart",I,{passive:!1}),{disabled:a,button:E,tooltip:h,tooltipVisible:b,showTooltip:i,persistent:u,wrapperStyle:$,formatValue:y,handleMouseEnter:T,handleMouseLeave:M,onButtonDown:I,onKeyDown:L,setPosition:Q}},m7=$e({modelValue:{type:Number,default:0},vertical:Boolean,tooltipClass:{type:G([String,Array,Object,Boolean]),default:void 0},placement:{type:String,values:Wl,default:"top"}}),g7={[it]:e=>He(e)},b7=["tabindex"];var y7=ue({name:"ElSliderButton",__name:"button",props:m7,emits:g7,setup(e,{expose:t,emit:n}){const a=e,l=n,o=he("slider"),s=Ft({hovering:!1,dragging:!1,isClick:!1,startX:0,currentX:0,startY:0,currentY:0,startPosition:0,newPosition:0,oldValue:a.modelValue}),i=C(()=>f.value?p.value:!1),{disabled:u,button:c,tooltip:d,showTooltip:f,persistent:p,tooltipVisible:g,wrapperStyle:m,formatValue:v,handleMouseEnter:h,handleMouseLeave:b,onButtonDown:y,onKeyDown:k,setPosition:S}=h7(a,s,l),{hovering:E,dragging:x}=Fn(s);return t({onButtonDown:y,onKeyDown:k,setPosition:S,hovering:E,dragging:x}),($,w)=>(O(),H("div",{ref_key:"button",ref:c,class:P([r(o).e("button-wrapper"),{hover:r(E),dragging:r(x)}]),style:je(r(m)),tabindex:r(u)?void 0:0,onMouseenter:w[0]||(w[0]=(...T)=>r(h)&&r(h)(...T)),onMouseleave:w[1]||(w[1]=(...T)=>r(b)&&r(b)(...T)),onMousedown:w[2]||(w[2]=(...T)=>r(y)&&r(y)(...T)),onFocus:w[3]||(w[3]=(...T)=>r(h)&&r(h)(...T)),onBlur:w[4]||(w[4]=(...T)=>r(b)&&r(b)(...T)),onKeydown:w[5]||(w[5]=(...T)=>r(k)&&r(k)(...T))},[q(r(Hn),{ref_key:"tooltip",ref:d,visible:r(g),placement:$.placement,"fallback-placements":["top","bottom","right","left"],"stop-popper-mouse-event":!1,"popper-class":$.tooltipClass,disabled:!r(f),persistent:i.value},{content:X(()=>[K("span",null,Se(r(v)),1)]),default:X(()=>[K("div",{class:P([r(o).e("button"),{hover:r(E),dragging:r(x)}])},null,2)]),_:1},8,["visible","placement","popper-class","disabled","persistent"])],46,b7))}}),e0=y7;const w7=$e({mark:{type:G([String,Object]),default:void 0}});var S7=ue({name:"ElSliderMarker",props:w7,setup(e){const t=he("slider"),n=C(()=>Ve(e.mark)?e.mark:e.mark.label),a=C(()=>Ve(e.mark)?void 0:e.mark.style);return()=>Ge("div",{class:t.e("marks-text"),style:a.value},n.value)}});const C7=["id","role","aria-label","aria-labelledby"],k7={key:1};var E7=ue({name:"ElSlider",__name:"slider",props:r7,emits:i7,setup(e,{expose:t,emit:n}){const a=e,l=n,o=he("slider"),{t:s}=St(),i=Ft({firstValue:0,secondValue:0,oldValue:0,dragging:!1,sliderSize:1}),{elFormItem:u,slider:c,firstButton:d,secondButton:f,sliderDisabled:p,minValue:g,maxValue:m,runwayStyle:v,barStyle:h,resetSize:b,emitChange:y,onSliderWrapperPrevent:k,onSliderClick:S,onSliderDown:E,onSliderMarkerDown:x,setFirstValue:$,setSecondValue:w}=d7(a,i,l),{stops:T,getStopStyle:M}=f7(a,i,g,m),{inputId:I,isLabeledByFormItem:N}=Ea(a,{formItemContext:u}),A=$n(),j=C(()=>a.inputSize||A.value),F=C(()=>a.showInput&&!a.range&&a.step!=="mark"),B=C(()=>a.ariaLabel||s("el.slider.defaultLabel",{min:a.min,max:a.max})),D=C(()=>a.range?a.rangeStartLabel||s("el.slider.defaultRangeStartLabel"):B.value),R=C(()=>a.formatValueText?a.formatValueText(ee.value):`${ee.value}`),z=C(()=>a.rangeEndLabel||s("el.slider.defaultRangeEndLabel")),L=C(()=>a.formatValueText?a.formatValueText(ie.value):`${ie.value}`),W=C(()=>[o.b(),o.m(A.value),o.is("vertical",a.vertical),{[o.m("with-input")]:F.value}]),Y=c7(a);p7(a,i,g,m,l,u);const J=C(()=>He(a.step)?a.step:1),Z=C(()=>{const re=He(a.step)?a.step:1,_=[a.min,a.max,re].map(U=>{const ae=`${U}`.split(".")[1];return ae?ae.length:0});return Math.max.apply(null,_)}),{sliderWrapper:Q}=u7(a,i,b),{firstValue:ee,secondValue:ie,sliderSize:ve}=Fn(i),pe=re=>{i.dragging=re};return Ht(Q,"touchstart",k,{passive:!1}),Ht(Q,"touchmove",k,{passive:!1}),Tt(y2,{...Fn(a),sliderSize:ve,disabled:p,precision:Z,markList:Y,emitChange:y,resetSize:b,updateDragging:pe}),t({onSliderClick:S}),(re,_)=>{var U,ae;return O(),H("div",{id:re.range?r(I):void 0,ref_key:"sliderWrapper",ref:Q,class:P(W.value),role:re.range?"group":void 0,"aria-label":re.range&&!r(N)?B.value:void 0,"aria-labelledby":re.range&&r(N)?(U=r(u))==null?void 0:U.labelId:void 0},[K("div",{ref_key:"slider",ref:c,class:P([r(o).e("runway"),{"show-input":F.value},r(o).is("disabled",r(p))]),style:je(r(v)),onMousedown:_[0]||(_[0]=(...le)=>r(E)&&r(E)(...le)),onTouchstartPassive:_[1]||(_[1]=(...le)=>r(E)&&r(E)(...le))},[K("div",{class:P(r(o).e("bar")),style:je(r(h))},null,6),q(e0,{id:re.range?void 0:r(I),ref_key:"firstButton",ref:d,"model-value":r(ee),vertical:re.vertical,"tooltip-class":re.tooltipClass,placement:re.placement,role:"slider","aria-label":re.range||!r(N)?D.value:void 0,"aria-labelledby":!re.range&&r(N)?(ae=r(u))==null?void 0:ae.labelId:void 0,"aria-valuemin":re.min,"aria-valuemax":re.range?r(ie):re.max,"aria-valuenow":r(ee),"aria-valuetext":R.value,"aria-orientation":re.vertical?"vertical":"horizontal","aria-disabled":r(p),"onUpdate:modelValue":r($)},null,8,["id","model-value","vertical","tooltip-class","placement","aria-label","aria-labelledby","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"]),re.range?(O(),oe(e0,{key:0,ref_key:"secondButton",ref:f,"model-value":r(ie),vertical:re.vertical,"tooltip-class":re.tooltipClass,placement:re.placement,role:"slider","aria-label":z.value,"aria-valuemin":r(ee),"aria-valuemax":re.max,"aria-valuenow":r(ie),"aria-valuetext":L.value,"aria-orientation":re.vertical?"vertical":"horizontal","aria-disabled":r(p),"onUpdate:modelValue":r(w)},null,8,["model-value","vertical","tooltip-class","placement","aria-label","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"])):te("v-if",!0),re.showStops?(O(),H("div",k7,[(O(!0),H(ze,null,bt(r(T),(le,se)=>(O(),H("div",{key:se,class:P(r(o).e("stop")),style:je(r(M)(le))},null,6))),128))])):te("v-if",!0),r(Y).length>0?(O(),H(ze,{key:2},[K("div",null,[(O(!0),H(ze,null,bt(r(Y),(le,se)=>(O(),H("div",{key:se,style:je(r(M)(le.position)),class:P([r(o).e("stop"),r(o).e("marks-stop")])},null,6))),128))]),K("div",{class:P(r(o).e("marks"))},[(O(!0),H(ze,null,bt(r(Y),(le,se)=>(O(),oe(r(S7),{key:se,mark:le.mark,style:je(r(M)(le.position)),onMousedown:Je(de=>r(x)(le.position),["stop"])},null,8,["mark","style","onMousedown"]))),128))],2)],64)):te("v-if",!0)],38),F.value?(O(),oe(r(p2),{key:0,ref:"input","model-value":r(ee),class:P(r(o).e("input")),step:J.value,disabled:r(p),controls:re.showInputControls,min:re.min,max:re.max,precision:Z.value,size:j.value,"onUpdate:modelValue":r($),onChange:r(y)},null,8,["model-value","class","step","disabled","controls","min","max","precision","size","onUpdate:modelValue","onChange"])):te("v-if",!0)],10,C7)}}}),x7=E7;const T7=ut(x7),$7=$e({prefixCls:{type:String}}),t0=ue({name:"ElSpaceItem",props:$7,setup(e,{slots:t}){const n=he("space"),a=C(()=>`${e.prefixCls||n.b()}__item`);return()=>Ge("div",{class:a.value},ne(t,"default"))}}),n0={small:8,default:12,large:16};function O7(e){const t=he("space"),n=C(()=>[t.b(),t.m(e.direction),e.class]),a=V(0),l=V(0),o=C(()=>[e.wrap||e.fill?{flexWrap:"wrap"}:{},{alignItems:e.alignment},{rowGap:`${l.value}px`,columnGap:`${a.value}px`},e.style]),s=C(()=>e.fill?{flexGrow:1,minWidth:`${e.fillRatio}%`}:{});return ia(()=>{const{size:i="small",wrap:u,direction:c,fill:d}=e;if(me(i)){const[f=0,p=0]=i;a.value=f,l.value=p}else{let f;He(i)?f=i:f=n0[i||"small"]||n0.small,(u||d)&&c==="horizontal"?a.value=l.value=f:c==="horizontal"?(a.value=f,l.value=0):(l.value=f,a.value=0)}}),{classes:n,containerStyle:o,itemStyle:s}}const N7=$e({direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},class:{type:G([String,Object,Array,Boolean]),default:""},style:{type:G([String,Array,Object,Boolean]),default:""},alignment:{type:G(String),default:"center"},prefixCls:{type:String},spacer:{type:G([Object,String,Number,Array]),default:null,validator:e=>Jt(e)||He(e)||Ve(e)},wrap:Boolean,fill:Boolean,fillRatio:{type:Number,default:100},size:{type:[String,Array,Number],values:ul,validator:e=>He(e)||me(e)&&e.length===2&&e.every(He)}}),M7=ue({name:"ElSpace",props:N7,setup(e,{slots:t}){const{classes:n,containerStyle:a,itemStyle:l}=O7(e);function o(s,i="",u=[]){const{prefixCls:c}=e;return s.forEach((d,f)=>{Vp(d)?me(d.children)&&d.children.forEach((p,g)=>{Vp(p)&&me(p.children)?o(p.children,`${i+g}-`,u):Jt(p)&&(p==null?void 0:p.type)===Cn?u.push(p):u.push(q(t0,{style:l.value,prefixCls:c,key:`nested-${i+g}`},{default:()=>[p]},12,["style","prefixCls"]))}):O3(d)&&u.push(q(t0,{style:l.value,prefixCls:c,key:`LoopKey${i+f}`},{default:()=>[d]},12,["style","prefixCls"]))}),u}return()=>{const{spacer:s,direction:i}=e,u=ne(t,"default",{key:0},()=>[]);if((u.children??[]).length===0)return null;if(me(u.children)){let c=o(u.children);if(s){const d=c.length-1;c=c.reduce((f,p,g)=>{const m=[...f,p];return g!==d&&m.push(q("span",{style:[l.value,i==="vertical"?"width: 100%":null],key:g},[Jt(s)?sl(s):st(s,1)],4)),m},[])}return q("div",{class:n.value,style:a.value},c,6)}return u.children}}}),P7=ut(M7),I7=$e({space:{type:[Number,String],default:""},active:{type:Number,default:0},direction:{type:String,default:"horizontal",values:["horizontal","vertical"]},alignCenter:{type:Boolean},simple:{type:Boolean},finishStatus:{type:String,values:["wait","process","finish","error","success"],default:"finish"},processStatus:{type:String,values:["wait","process","finish","error","success"],default:"process"}}),R7={[yt]:(e,t)=>[e,t].every(He)},w2="ElSteps",_7=$e({title:{type:String,default:""},icon:{type:Ut},description:{type:String,default:""},status:{type:String,values:["","wait","process","finish","error","success"],default:""}});var A7=ue({name:"ElSteps",__name:"steps",props:I7,emits:R7,setup(e,{emit:t}){const n=e,a=t,l=he("steps"),{children:o,addChild:s,removeChild:i,ChildrenSorter:u}=Jd(ht(),"ElStep");return fe(o,()=>{o.value.forEach((c,d)=>{c.setIndex(d)})}),Tt(w2,{props:n,steps:o,addStep:s,removeStep:i}),fe(()=>n.active,(c,d)=>{a(yt,c,d)}),(c,d)=>(O(),H("div",{class:P([r(l).b(),r(l).m(e.simple?"simple":e.direction)])},[ne(c.$slots,"default"),q(r(u))],2))}}),L7=A7,V7=ue({name:"ElStep",__name:"item",props:_7,setup(e){const t=e,n=he("step"),a=V(-1),l=V({}),o=V(""),s=Fe(w2),i=ht();let u=0,c=0;mt(()=>{fe([()=>s.props.active,()=>s.props.processStatus,()=>s.props.finishStatus],([w],[T])=>{c=T||0,u=w-c,x(w)},{immediate:!0})});const d=C(()=>t.status||o.value),f=C(()=>{const w=s.steps.value[a.value-1];return w?w.internalStatus.value:"wait"}),p=C(()=>s.props.alignCenter),g=C(()=>s.props.direction==="vertical"),m=C(()=>s.props.simple),v=C(()=>s.steps.value.length),h=C(()=>{var w;return((w=s.steps.value[v.value-1])==null?void 0:w.uid)===i.uid}),b=C(()=>m.value?"":s.props.space),y=C(()=>[n.b(),n.is(m.value?"simple":s.props.direction),n.is("flex",h.value&&!b.value&&!p.value),n.is("center",p.value&&!g.value&&!m.value)]),k=C(()=>{const w={flexBasis:He(b.value)?`${b.value}px`:b.value?b.value:`${100/(v.value-(p.value?0:1))}%`};return g.value||h.value&&(w.maxWidth=`${100/v.value}%`),w}),S=w=>{a.value=w},E=w=>{const T=w==="wait",M={transitionDelay:`${Math.abs(u)===1?0:u>0?(a.value+1-c)*150:-(a.value+1-s.props.active)*150}ms`},I=w===s.props.processStatus||T?0:100;M.borderWidth=I&&!m.value?"1px":0,M[s.props.direction==="vertical"?"height":"width"]=`${I}%`,l.value=M},x=w=>{w>a.value?o.value=s.props.finishStatus:w===a.value&&f.value!=="error"?o.value=s.props.processStatus:o.value="wait";const T=s.steps.value[a.value-1];T&&T.calcProgress(o.value)},$={uid:i.uid,getVnode:()=>i.vnode,currentStatus:d,internalStatus:o,setIndex:S,calcProgress:E};return s.addStep($),zt(()=>{s.removeStep($)}),(w,T)=>(O(),H("div",{style:je(k.value),class:P(y.value)},[te(" icon & line "),K("div",{class:P([r(n).e("head"),r(n).is(d.value)])},[m.value?te("v-if",!0):(O(),H("div",{key:0,class:P(r(n).e("line"))},[K("i",{class:P(r(n).e("line-inner")),style:je(l.value)},null,6)],2)),K("div",{class:P([r(n).e("icon"),r(n).is(e.icon||w.$slots.icon?"icon":"text")])},[ne(w.$slots,"icon",{},()=>[e.icon?(O(),oe(r(Be),{key:0,class:P(r(n).e("icon-inner"))},{default:X(()=>[(O(),oe(dt(e.icon)))]),_:1},8,["class"])):d.value==="success"?(O(),oe(r(Be),{key:1,class:P([r(n).e("icon-inner"),r(n).is("status")])},{default:X(()=>[q(r(gr))]),_:1},8,["class"])):d.value==="error"?(O(),oe(r(Be),{key:2,class:P([r(n).e("icon-inner"),r(n).is("status")])},{default:X(()=>[q(r(Ya))]),_:1},8,["class"])):m.value?te("v-if",!0):(O(),H("div",{key:3,class:P(r(n).e("icon-inner"))},Se(a.value+1),3))])],2)],2),te(" title & description "),K("div",{class:P(r(n).e("main"))},[K("div",{class:P([r(n).e("title"),r(n).is(d.value)])},[ne(w.$slots,"title",{},()=>[st(Se(e.title),1)])],2),m.value?(O(),H("div",{key:0,class:P(r(n).e("arrow"))},null,2)):(O(),H("div",{key:1,class:P([r(n).e("description"),r(n).is(d.value)])},[ne(w.$slots,"description",{},()=>[st(Se(e.description),1)])],2))],2)],6))}}),S2=V7;const D7=ut(L7,{Step:S2}),B7=un(S2),C2=e=>["",...ul].includes(e),F7=$e({modelValue:{type:[Boolean,String,Number],default:!1},disabled:{type:Boolean,default:void 0},loading:Boolean,size:{type:String,validator:C2},width:{type:[String,Number],default:""},inlinePrompt:Boolean,inactiveActionIcon:{type:Ut},activeActionIcon:{type:Ut},activeIcon:{type:Ut},inactiveIcon:{type:Ut},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1},name:{type:String,default:""},validateEvent:{type:Boolean,default:!0},beforeChange:{type:G(Function)},id:String,tabindex:{type:[String,Number]},...ua(["ariaLabel"])}),z7={[it]:e=>Wt(e)||Ve(e)||He(e),[yt]:e=>Wt(e)||Ve(e)||He(e),[Tn]:e=>Wt(e)||Ve(e)||He(e)},H7=["id","aria-checked","aria-disabled","aria-label","name","true-value","false-value","disabled","tabindex"],K7=["aria-hidden"],W7={key:1},j7={key:1},q7=["aria-hidden"],Wu="ElSwitch";var Y7=ue({name:Wu,__name:"switch",props:F7,emits:z7,setup(e,{expose:t,emit:n}){const a=e,l=n,{formItem:o}=Kn(),s=$n(),i=he("switch"),{inputId:u}=Ea(a,{formItemContext:o}),c=sn(C(()=>{if(a.loading)return!0})),d=V(a.modelValue!==!1),f=Et(),p=C(()=>[i.b(),i.m(s.value),i.is("disabled",c.value),i.is("checked",b.value)]),g=C(()=>[i.e("label"),i.em("label","left"),i.is("active",!b.value)]),m=C(()=>[i.e("label"),i.em("label","right"),i.is("active",b.value)]),v=C(()=>({width:fn(a.width)}));fe(()=>a.modelValue,()=>{d.value=!0});const h=C(()=>d.value?a.modelValue:!1),b=C(()=>h.value===a.activeValue);[a.activeValue,a.inactiveValue].includes(h.value)||(Kt(Wu,"model-value must be active-value or inactive-value"),l(it,a.inactiveValue),l(yt,a.inactiveValue),l(Tn,a.inactiveValue)),fe(b,E=>{var x;f.value.checked=E,a.validateEvent&&((x=o==null?void 0:o.validate)==null||x.call(o,"change").catch(vt))});const y=()=>{const E=b.value?a.inactiveValue:a.activeValue;l(it,E),l(yt,E),l(Tn,E),Ae(()=>{f.value.checked=b.value})},k=()=>{if(c.value)return;const{beforeChange:E}=a;if(!E){y();return}const x=E();[Lo(x),Wt(x)].includes(!0)||rn(Wu,"beforeChange must return type `Promise` or `boolean`"),Lo(x)?x.then($=>{$&&y()}).catch($=>{Kt(Wu,`some error occurred: ${$}`)}):x&&y()},S=()=>{var E,x;(x=(E=f.value)==null?void 0:E.focus)==null||x.call(E)};return mt(()=>{f.value.checked=b.value}),t({focus:S,checked:b}),(E,x)=>(O(),H("div",{class:P(p.value),onClick:Je(k,["prevent"])},[K("input",{id:r(u),ref_key:"input",ref:f,class:P(r(i).e("input")),type:"checkbox",role:"switch","aria-checked":b.value,"aria-disabled":r(c),"aria-label":e.ariaLabel,name:e.name,"true-value":e.activeValue,"false-value":e.inactiveValue,disabled:r(c),tabindex:e.tabindex,onChange:y,onKeydown:an(k,["enter"])},null,42,H7),!e.inlinePrompt&&(e.inactiveIcon||e.inactiveText||E.$slots.inactive)?(O(),H("span",{key:0,class:P(g.value)},[ne(E.$slots,"inactive",{},()=>[e.inactiveIcon?(O(),oe(r(Be),{key:0},{default:X(()=>[(O(),oe(dt(e.inactiveIcon)))]),_:1})):te("v-if",!0),!e.inactiveIcon&&e.inactiveText?(O(),H("span",{key:1,"aria-hidden":b.value},Se(e.inactiveText),9,K7)):te("v-if",!0)])],2)):te("v-if",!0),K("span",{class:P(r(i).e("core")),style:je(v.value)},[e.inlinePrompt?(O(),H("div",{key:0,class:P(r(i).e("inner"))},[b.value?(O(),H("div",{key:1,class:P(r(i).e("inner-wrapper"))},[ne(E.$slots,"active",{},()=>[e.activeIcon?(O(),oe(r(Be),{key:0},{default:X(()=>[(O(),oe(dt(e.activeIcon)))]),_:1})):te("v-if",!0),!e.activeIcon&&e.activeText?(O(),H("span",j7,Se(e.activeText),1)):te("v-if",!0)])],2)):(O(),H("div",{key:0,class:P(r(i).e("inner-wrapper"))},[ne(E.$slots,"inactive",{},()=>[e.inactiveIcon?(O(),oe(r(Be),{key:0},{default:X(()=>[(O(),oe(dt(e.inactiveIcon)))]),_:1})):te("v-if",!0),!e.inactiveIcon&&e.inactiveText?(O(),H("span",W7,Se(e.inactiveText),1)):te("v-if",!0)])],2))],2)):te("v-if",!0),K("div",{class:P(r(i).e("action"))},[e.loading?(O(),oe(r(Be),{key:0,class:P(r(i).is("loading"))},{default:X(()=>[q(r(rl))]),_:1},8,["class"])):b.value?ne(E.$slots,"active-action",{key:1},()=>[e.activeActionIcon?(O(),oe(r(Be),{key:0},{default:X(()=>[(O(),oe(dt(e.activeActionIcon)))]),_:1})):te("v-if",!0)]):b.value?te("v-if",!0):ne(E.$slots,"inactive-action",{key:2},()=>[e.inactiveActionIcon?(O(),oe(r(Be),{key:0},{default:X(()=>[(O(),oe(dt(e.inactiveActionIcon)))]),_:1})):te("v-if",!0)])],2)],6),!e.inlinePrompt&&(e.activeIcon||e.activeText||E.$slots.active)?(O(),H("span",{key:1,class:P(m.value)},[ne(E.$slots,"active",{},()=>[e.activeIcon?(O(),oe(r(Be),{key:0},{default:X(()=>[(O(),oe(dt(e.activeIcon)))]),_:1})):te("v-if",!0),!e.activeIcon&&e.activeText?(O(),H("span",{key:1,"aria-hidden":!b.value},Se(e.activeText),9,q7)):te("v-if",!0)])],2)):te("v-if",!0)],2))}}),U7=Y7;const G7=ut(U7),X7={data:{type:Array,default:()=>[]},size:In,width:[String,Number],height:[String,Number],maxHeight:[String,Number],fit:{type:Boolean,default:!0},stripe:Boolean,border:Boolean,rowKey:[String,Function],showHeader:{type:Boolean,default:!0},showSummary:Boolean,sumText:String,summaryMethod:Function,rowClassName:[String,Function],rowStyle:[Object,Function],cellClassName:[String,Function],cellStyle:[Object,Function],headerRowClassName:[String,Function],headerRowStyle:[Object,Function],headerCellClassName:[String,Function],headerCellStyle:[Object,Function],highlightCurrentRow:Boolean,currentRowKey:[String,Number],emptyText:String,expandRowKeys:Array,defaultExpandAll:Boolean,rowExpandable:{type:Function},defaultSort:Object,tooltipEffect:String,tooltipOptions:Object,spanMethod:Function,selectOnIndeterminate:{type:Boolean,default:!0},indent:{type:Number,default:16},treeProps:{type:Object,default:()=>({hasChildren:"hasChildren",children:"children",checkStrictly:!1})},lazy:Boolean,load:Function,style:{type:[String,Object,Array,Boolean],default:()=>({})},className:{type:String,default:""},tableLayout:{type:String,default:"fixed"},scrollbarAlwaysOn:Boolean,flexible:Boolean,showOverflowTooltip:{type:[Boolean,Object],default:void 0},tooltipFormatter:Function,appendFilterPanelTo:String,scrollbarTabindex:{type:[Number,String],default:void 0},allowDragLastColumn:{type:Boolean,default:!0},preserveExpandedContent:Boolean,nativeScrollbar:Boolean};let J7=1,Z7=1;const Q7=e=>`${e}-table_${J7++}`,eq=e=>`${e}_column_${Z7++}`,op=function(e){var t;return(t=e.target)==null?void 0:t.closest("td")},tq=function(e,t,n,a,l){if(!t&&!a&&(!l||me(l)&&!l.length))return e;Ve(n)?n=n==="descending"?-1:1:n=n&&n<0?-1:1;const o=a?null:function(i,u){return l?jw(Vn(l),c=>Ve(c)?Sn(i,c):c(i,u,e)):(t!=="$key"&&rt(i)&&"$value"in i&&(i=i.$value),[rt(i)?t?Sn(i,t):null:i])},s=function(i,u){var c,d,f,p,g;if(a)return a(i.value,u.value);for(let m=0,v=((c=i.key)==null?void 0:c.length)??0;m((g=u.key)==null?void 0:g[m]))return 1}return 0};return e.map((i,u)=>({value:i,index:u,key:o?o(i,u):null})).sort((i,u)=>{let c=s(i,u);return c||(c=i.index-u.index),c*+n}).map(i=>i.value)},k2=function(e,t){let n=null;return e.columns.forEach(a=>{a.id===t&&(n=a)}),n},nq=function(e,t){let n=null;for(let a=0;a{if(!e)throw new Error("Row is required when get row identity");if(Ve(t)){if(!t.includes("."))return`${e[t]}`;const n=t.split(".");let a=e;for(const l of n)a=a[l];return`${a}`}else if(We(t))return t.call(null,e);return""},tr=function(e,t,n=!1,a="children"){const l=e||[],o={};return l.forEach((s,i)=>{if(o[En(s,t)]={row:s,index:i},n){const u=s[a];me(u)&&Object.assign(o,tr(u,t,!0,a))}}),o};function aq(e,t){const n={};let a;for(a in e)n[a]=e[a];for(a in t)if(Vt(t,a)){const l=t[a];xt(l)||(n[a]=l)}return n}function vm(e){return e===""||xt(e)||(e=Number.parseInt(e,10),Number.isNaN(e)&&(e="")),e}function E2(e){return e===""||xt(e)||(e=vm(e),Number.isNaN(e)&&(e=80)),e}function lq(e){return He(e)?e:Ve(e)?/^\d+(?:px)?$/.test(e)?Number.parseInt(e,10):e:null}function oq(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...a)=>t(n(...a)))}function Gs(e,t,n,a,l,o,s){let i=o??0,u=!1;const d=(()=>{if(!s)return e.indexOf(t);const v=En(t,s);return e.findIndex(h=>En(h,s)===v)})(),f=d!==-1,p=l==null?void 0:l.call(null,t,i),g=v=>{v==="add"?e.push(t):e.splice(d,1),u=!0},m=v=>{let h=0;const b=(a==null?void 0:a.children)&&v[a.children];return b&&me(b)&&(h+=b.length,b.forEach(y=>{h+=m(y)})),h};return(!l||p)&&(Wt(n)?n&&!f?g("add"):!n&&f&&g("remove"):g(f?"remove":"add")),!(a!=null&&a.checkStrictly)&&(a!=null&&a.children)&&me(t[a.children])&&t[a.children].forEach(v=>{const h=Gs(e,v,n??!f,a,l,i+1,s);i+=m(v)+1,h&&(u=h)}),u}function sq(e,t,n="children",a="hasChildren",l=!1){const o=i=>!(me(i)&&i.length);function s(i,u,c){t(i,u,c),u.forEach(d=>{if(d[a]&&l){t(d,null,c+1);return}const f=d[n];o(f)||s(d,f,c+1)})}e.forEach(i=>{if(i[a]&&l){t(i,null,0);return}const u=i[n];o(u)||s(i,u,0)})}const rq=(e,t,n,a)=>{const l=We(a==null?void 0:a.tooltipFormatter)?a.tooltipFormatter({row:n,column:a,cellValue:Ro(n,a.property).value}):void 0;return Jt(l)?{slotContent:l,content:null,strategy:"fixed",...e}:{slotContent:null,content:l??t,strategy:"fixed",...e}};let pn=null;function iq(e,t,n,a,l,o){var g;const s=rq(e,t,n,a),i={...s,slotContent:void 0};if((pn==null?void 0:pn.trigger)===l){const m=(g=pn.vm)==null?void 0:g.component;Yw(m==null?void 0:m.props,i),m&&s.slotContent&&(m.slots.content=()=>[s.slotContent]);return}pn==null||pn();const u=o==null?void 0:o.refs.tableWrapper,c=u==null?void 0:u.dataset.prefix,d=q(Hn,{virtualTriggering:!0,virtualRef:l,appendTo:u,placement:"top",transition:"none",offset:0,hideAfter:0,...i},s.slotContent?{content:()=>s.slotContent}:void 0);d.appContext={...o.appContext,...o};const f=document.createElement("div");Bo(d,f),d.component.exposed.onOpen();const p=u==null?void 0:u.querySelector(`.${c}-scrollbar__wrap`);pn=()=>{var v,h;(h=(v=d.component)==null?void 0:v.exposed)!=null&&h.onClose&&d.component.exposed.onClose(),Bo(null,f);const m=pn;p==null||p.removeEventListener("scroll",m),m.trigger=void 0,m.vm=void 0,pn=null},pn.trigger=l??void 0,pn.vm=d,p==null||p.addEventListener("scroll",pn)}function x2(e){return e.children?jw(e.children,x2):[e]}function l0(e,t){return e+t.colSpan}const T2=(e,t,n,a)=>{let l=0,o=e;const s=n.states.columns.value;if(a){const u=x2(a[e]);l=s.slice(0,s.indexOf(u[0])).reduce(l0,0),o=l+u.reduce(l0,0)-1}else l=e;let i;switch(t){case"left":o=s.length-n.states.rightFixedLeafColumnsLength.value&&(i="right");break;default:o=s.length-n.states.rightFixedLeafColumnsLength.value&&(i="right")}return i?{direction:i,start:l,after:o}:{}},hm=(e,t,n,a,l,o=0)=>{const s=[],{direction:i,start:u,after:c}=T2(t,n,a,l);if(i){const d=i==="left";s.push(`${e}-fixed-column--${i}`),d&&c+o===a.states.fixedLeafColumnsLength.value-1?s.push("is-last-column"):!d&&u-o===a.states.columns.value.length-a.states.rightFixedLeafColumnsLength.value&&s.push("is-first-column")}return s};function o0(e,t){return e+(Ad(t.realWidth)||Number.isNaN(t.realWidth)?Number(t.width):t.realWidth)}const mm=(e,t,n,a)=>{const{direction:l,start:o=0,after:s=0}=T2(e,t,n,a);if(!l)return;const i={},u=l==="left",c=n.states.columns.value;return u?i.left=c.slice(0,o).reduce(o0,0):i.right=c.slice(s+1).reverse().reduce(o0,0),i},wr=(e,t)=>{e&&(Number.isNaN(e[t])||(e[t]=`${e[t]}px`))};function $2(e){return e.some(t=>Jt(t)?!(t.type===Cn||t.type===ze&&!$2(t.children)):!0)?e:null}function uq(e){const t=ht(),n=V(!1),a=V([]),l=(c,d)=>{const f=t.store.states.rowExpandable.value;return(f==null?void 0:f(c,d))??!0};return{updateExpandRows:()=>{const c=e.data.value||[],d=e.rowKey.value;if(n.value)a.value=t.store.states.rowExpandable.value?c.filter(l):c.slice();else if(d){const f=tr(a.value,d);a.value=c.filter((p,g)=>{const m=En(p,d);return!!f[m]&&l(p,g)})}else a.value=[]},toggleRowExpansion:(c,d)=>{const f=(e.data.value||[]).indexOf(c);f>-1&&!l(c,f)||Gs(a.value,c,d,void 0,void 0,void 0,e.rowKey.value)&&t.emit("expand-change",c,a.value.slice())},setExpandRowKeys:c=>{t.store.assertRowKey();const d=e.data.value||[],f=e.rowKey.value,p=tr(d,f);a.value=c.reduce((g,m)=>{const v=p[m];return v&&l(v.row,v.index)&&g.push(v.row),g},[])},isRowExpanded:c=>{const d=e.rowKey.value;return d?!!tr(a.value,d)[En(c,d)]:a.value.includes(c)},states:{expandRows:a,defaultExpandAll:n}}}function cq(e){const t=ht(),n=V(null),a=V(null),l=c=>{t.store.assertRowKey(),n.value=c,s(c)},o=()=>{n.value=null},s=c=>{const{data:d,rowKey:f}=e,p=a.value;let g=null;f.value&&(g=(r(d)||[]).find(m=>En(m,f.value)===c)??null),a.value=g??null,t.emit("current-change",a.value,p)};return{setCurrentRowKey:l,restoreCurrentRowKey:o,setCurrentRowByKey:s,updateCurrentRow:c=>{const d=a.value;if(c&&c!==d){a.value=c,t.emit("current-change",a.value,d);return}!c&&d&&(a.value=null,t.emit("current-change",null,d))},updateCurrentRowData:()=>{const c=e.rowKey.value,d=e.data.value||[],f=a.value;if(f&&!d.includes(f))if(c){const p=En(f,c);s(p)}else a.value=null,t.emit("current-change",null,f);else n.value&&(s(n.value),o())},states:{_currentRowKey:n,currentRow:a}}}function dq(e){const t=V([]),n=V({}),a=V(16),l=V(!1),o=V({}),s=V("hasChildren"),i=V("children"),u=V(!1),c=ht(),d=C(()=>{if(!e.rowKey.value)return{};const S=e.data.value||[];return p(S)}),f=C(()=>{const S=e.rowKey.value,E=Object.keys(o.value),x={};return E.length&&E.forEach($=>{if(o.value[$].length){const w={children:[]};o.value[$].forEach(T=>{const M=En(T,S);w.children.push(M),T[s.value]&&!x[M]&&(x[M]={children:[]})}),x[$]=w}}),x}),p=S=>{const E=e.rowKey.value,x={};return sq(S,($,w,T)=>{const M=En($,E);me(w)?x[M]={children:w.map(I=>En(I,E)),level:T}:l.value&&(x[M]={children:[],lazy:!0,level:T})},i.value,s.value,l.value),x},g=(S=!1,E)=>{var M,I;E||(E=(M=c.store)==null?void 0:M.states.defaultExpandAll.value);const x=d.value,$=f.value,w=Object.keys(x),T={};if(w.length){const N=r(n),A=[],j=(B,D)=>{if(S)return t.value?E||t.value.includes(D):!!(E||B!=null&&B.expanded);{const R=E||t.value&&t.value.includes(D);return!!(B!=null&&B.expanded||R)}};w.forEach(B=>{const D=N[B],R={...x[B]};if(R.expanded=j(D,B),R.lazy){const{loaded:z=!1,loading:L=!1}=D||{};R.loaded=!!z,R.loading=!!L,A.push(B)}T[B]=R});const F=Object.keys($);l.value&&F.length&&A.length&&F.forEach(B=>{var z;const D=N[B],R=$[B].children;if(A.includes(B)){if(((z=T[B].children)==null?void 0:z.length)!==0)throw new Error("[ElTable]children must be an empty array.");T[B].children=R}else{const{loaded:L=!1,loading:W=!1}=D||{};T[B]={lazy:!0,loaded:!!L,loading:!!W,expanded:j(D,B),children:R,level:void 0}}})}n.value=T,(I=c.store)==null||I.updateTableScrollY()};fe(()=>t.value,()=>{g(!0)},{deep:!0}),fe(()=>d.value,()=>{g()}),fe(()=>f.value,()=>{g()});const m=S=>{t.value=S,g()},v=S=>l.value&&S&&"loaded"in S&&!S.loaded,h=(S,E)=>{c.store.assertRowKey();const x=e.rowKey.value,$=En(S,x),w=$&&n.value[$];if($&&w&&"expanded"in w){const T=w.expanded;E=xt(E)?!w.expanded:E,n.value[$].expanded=E,T!==E&&c.emit("expand-change",S,E),E&&v(w)&&y(S,$,w),c.store.updateTableScrollY()}},b=S=>{c.store.assertRowKey();const E=e.rowKey.value,x=En(S,E),$=n.value[x];v($)?y(S,x,$):h(S,void 0)},y=(S,E,x)=>{const{load:$}=c.props;$&&!n.value[E].loaded&&(n.value[E].loading=!0,$(S,x,w=>{if(!me(w))throw new TypeError("[ElTable] data must be an array");n.value[E].loading=!1,n.value[E].loaded=!0,n.value[E].expanded=!0,w.length&&(o.value={...o.value,[E]:w}),c.emit("expand-change",S,!0)}))};return{loadData:y,loadOrToggle:b,toggleTreeExpansion:h,updateTreeExpandKeys:m,updateTreeData:g,updateKeyChildren:(S,E)=>{const{lazy:x,rowKey:$}=c.props;if(x){if(!$)throw new Error("[Table] rowKey is required in updateKeyChild");o.value[S]&&(o.value={...o.value,[S]:E})}},normalize:p,states:{expandRowKeys:t,treeData:n,indent:a,lazy:l,lazyTreeNodeMap:o,lazyColumnIdentifier:s,childrenColumnName:i,checkStrictly:u}}}const fq=(e,t)=>{const n=t.sortingColumn;return!n||Ve(n.sortable)?e:tq(e,t.sortProp,t.sortOrder,n.sortMethod,n.sortBy)},vc=e=>{const t=[];return e.forEach(n=>{n.children&&n.children.length>0?t.push.apply(t,vc(n.children)):t.push(n)}),t};function pq(){var Bt;const e=ht(),{size:t}=Fn((Bt=e.proxy)==null?void 0:Bt.$props),n=V(null),a=V([]),l=V([]),o=V(!1),s=V([]),i=V([]),u=V([]),c=V([]),d=V([]),f=V([]),p=V([]),g=V([]),m=[],v=V(0),h=V(0),b=V(0),y=V(!1),k=V([]),S=V({}),E=V(!1),x=V(!1),$=V(null),w=V(null),T=V({}),M=V(null),I=V(null),N=V(null),A=V(null),j=V(null);let F=[];const B=C(()=>n.value?tr(k.value,n.value):void 0),D=ce=>{var wt;const{childrenColumnName:Ie,lazyTreeNodeMap:Ue}=e.store.states,at=ce[Ie.value]??[];if(!n.value)return at;const gt=En(ce,n.value);return[...((wt=Ue.value)==null?void 0:wt[gt])??[],...at]};fe(a,()=>{var ce;e.state&&(W(!1),e.props.tableLayout==="auto"&&((ce=e.refs.tableHeaderRef)==null||ce.updateFixedColumnStyle()))},{deep:!0});const R=()=>{if(!n.value)throw new Error("[ElTable] prop row-key is required")},z=ce=>{var Ie;(Ie=ce.children)==null||Ie.forEach(Ue=>{Ue.fixed=ce.fixed,z(Ue)})},L=()=>{s.value.forEach(et=>{z(et)}),c.value=s.value.filter(et=>[!0,"left"].includes(et.fixed));const ce=s.value.find(et=>et.type==="selection");let Ie;ce&&ce.fixed!=="right"&&!c.value.includes(ce)&&s.value.indexOf(ce)===0&&c.value.length&&(c.value.unshift(ce),Ie=!0),d.value=s.value.filter(et=>et.fixed==="right");const Ue=s.value.filter(et=>(Ie?et.type!=="selection":!0)&&!et.fixed);i.value=Array.from(c.value).concat(Ue).concat(d.value);const at=vc(Ue),gt=vc(c.value),wt=vc(d.value);v.value=at.length,h.value=gt.length,b.value=wt.length,u.value=Array.from(gt).concat(at).concat(wt),o.value=c.value.length>0||d.value.length>0},W=(ce,Ie=!1)=>{ce&&L(),Ie?e.state.doLayout():e.state.debouncedUpdateLayout()},Y=ce=>B.value?!!B.value[En(ce,n.value)]:k.value.includes(ce),J=C(()=>{const ce=new Map;if(!n.value||!$.value)return ce;let Ie=0;const Ue=at=>{me(at)&&at.forEach(gt=>{const wt=En(gt,n.value);ce.set(wt,Ie),Ie+=1;const et=D(gt);et.length&&Ue(et)})};return Ue(a.value||[]),ce}),Z=(ce={})=>{const{emitChange:Ie=!0}=ce;if(_t.checkStrictly.value||!n.value){S.value={},F=[];return}const Ue=n.value,at=ce.rowIndexMap??J.value,gt=$.value,wt=new WeakMap,et=_e=>{const Nt=wt.get(_e);if(Nt)return Nt;const qt=En(_e,Ue);return wt.set(_e,qt),qt},Dt={},Re=[],Ye=new Set(k.value.map(_e=>et(_e))),Qe=[];let Xt=!1;const Me=(_e,Nt,qt)=>{const nn=Ye.has(Nt);qt&&!nn?(Qe.push(_e),Ye.add(Nt),Xt=!0):!qt&&nn&&(Ye.delete(Nt),Xt=!0)},De=_e=>{let Nt=0,qt=0;return me(_e)?(_e.forEach(nn=>{const On=et(nn),Xa=D(nn);let pl=0,bo=0;if(Xa.length){const Te=De(Xa);pl=Te.selectedCount,bo=Te.selectableCount}const Ja=gt?gt.call(null,nn,at.get(On)??0):!0;if(Ja&&bo>0){const Te=pl===bo;!Te&&pl!==0&&(Dt[On]=!0,Re.push(nn)),Me(nn,On,Te)}Ja&&(qt+=1,Ye.has(On)&&(Nt+=1)),Nt+=pl,qt+=bo}),{selectedCount:Nt,selectableCount:qt}):{selectedCount:Nt,selectableCount:qt}};if(De(a.value||[]),Xt){const _e=k.value.filter(Nt=>Ye.has(et(Nt)));Qe.forEach(Nt=>{Ye.has(et(Nt))&&_e.push(Nt)}),k.value=_e}S.value=Dt,F=Re,Xt&&Ie&&e.emit("selection-change",k.value?k.value.slice():[])},Q=()=>{y.value=!1;const ce=k.value;k.value=[],S.value={},F=[],ce.length&&e.emit("selection-change",[])},ee=()=>{var Ie,Ue;let ce;if(n.value){ce=[];const at=(Ue=(Ie=e==null?void 0:e.store)==null?void 0:Ie.states)==null?void 0:Ue.childrenColumnName.value,gt=tr(a.value,n.value,!0,at),{lazyTreeNodeMap:wt}=e.store.states;wt.value&&Object.entries(wt.value).forEach(([et,Dt])=>{gt[et]&&Dt.forEach(Re=>{const Ye=En(Re,n.value);gt[Ye]||(gt[Ye]={row:Re,index:-1})})});for(const et in B.value)Vt(B.value,et)&&!gt[et]&&ce.push(B.value[et].row)}else ce=k.value.filter(at=>!a.value.includes(at));if(ce.length){const at=k.value.filter(gt=>!ce.includes(gt));k.value=at,Z({emitChange:!1}),e.emit("selection-change",[...at])}},ie=()=>(k.value||[]).slice(),ve=()=>F.slice(),pe=(ce,Ie,Ue)=>{var Ye;if(!n.value||_t.checkStrictly.value||!_t.lazy.value)return;const{lazyTreeNodeMap:at,childrenColumnName:gt}=e.store.states,wt=En(ce,n.value),et=((Ye=at.value)==null?void 0:Ye[wt])??[],Dt=ce[gt.value]??[],Re={children:gt.value,checkStrictly:!1};for(const Qe of et){const Xt=Ue.get(En(Qe,n.value))??0;Gs(k.value,Qe,Ie,Re,$.value,Xt,n.value),pe(Qe,Ie,Ue)}for(const Qe of Dt)pe(Qe,Ie,Ue)},re=(ce,Ie,Ue=!0,at=!1)=>{var wt,et,Dt,Re;const gt={children:(et=(wt=e==null?void 0:e.store)==null?void 0:wt.states)==null?void 0:et.childrenColumnName.value,checkStrictly:(Re=(Dt=e==null?void 0:e.store)==null?void 0:Dt.states)==null?void 0:Re.checkStrictly.value};if(Gs(k.value,ce,Ie,gt,at?void 0:$.value,a.value.indexOf(ce),n.value)){if(_t.lazy.value&&!_t.checkStrictly.value){const Qe=Ie??Y(ce);pe(ce,Qe,J.value),Z({emitChange:!1,rowIndexMap:J.value})}else Z({emitChange:!1});const Ye=(k.value||[]).slice();Ue&&e.emit("select",Ye,ce),e.emit("selection-change",Ye)}},_=()=>{var Dt,Re;const ce=x.value?!y.value:!(y.value||k.value.length);y.value=ce;let Ie=!1,Ue=0;const at=(Re=(Dt=e==null?void 0:e.store)==null?void 0:Dt.states)==null?void 0:Re.rowKey.value,{childrenColumnName:gt}=e.store.states,wt={children:gt.value,checkStrictly:!1};a.value.forEach((Ye,Qe)=>{const Xt=Qe+Ue;Gs(k.value,Ye,ce,wt,$.value,Xt,at)&&(Ie=!0),Ue+=le(En(Ye,at))});const et=J.value;if(_t.lazy.value&&!_t.checkStrictly.value&&at)for(const Ye of Object.values(_t.lazyTreeNodeMap.value))for(const Qe of Ye){const Xt=et.get(En(Qe,at))??0;Gs(k.value,Qe,ce,wt,$.value,Xt,at)&&(Ie=!0),pe(Qe,ce,et)}Z({emitChange:!1,rowIndexMap:et}),Ie&&e.emit("selection-change",k.value?[...k.value]:[]),e.emit("select-all",(k.value||[]).slice())},U=()=>{var gt;if(((gt=a.value)==null?void 0:gt.length)===0){y.value=!1;return}let ce=0,Ie=0;const Ue=wt=>{for(const et of wt){const Dt=$.value&&$.value.call(null,et,ce);if(Y(et))Ie++;else if(!$.value||Dt)return!1;ce++;const Re=D(et);if(Re.length&&!Ue(Re))return!1}return!0},at=Ue(a.value||[]);y.value=Ie===0?!1:at},ae=ce=>{if(!n.value)return!1;const Ie=En(ce,n.value);return!!S.value[Ie]},le=ce=>{var gt;if(!e||!e.store)return 0;const{treeData:Ie}=e.store.states;let Ue=0;const at=(gt=Ie.value[ce])==null?void 0:gt.children;return at&&(Ue+=at.length,at.forEach(wt=>{Ue+=le(wt)})),Ue},se=(ce,Ie)=>{const Ue={};return Vn(ce).forEach(at=>{T.value[at.id]=Ie,Ue[at.columnKey||at.id]=Ie}),Ue},de=(ce,Ie,Ue)=>{I.value&&I.value!==ce&&(I.value.order=null),I.value=ce,N.value=Ie,A.value=Ue},be=()=>{let ce=r(l);Object.keys(T.value).forEach(Ie=>{const Ue=T.value[Ie];if(!Ue||Ue.length===0)return;const at=k2({columns:u.value},Ie);at&&at.filterMethod&&(ce=ce.filter(gt=>Ue.some(wt=>at.filterMethod.call(null,wt,gt,at))))}),M.value=ce},we=()=>{a.value=fq(M.value??[],{sortingColumn:I.value,sortProp:N.value,sortOrder:A.value})},Oe=(ce=void 0)=>{ce!=null&&ce.filter||be(),we()},Ce=ce=>{const{tableHeaderRef:Ie}=e.refs;if(!Ie)return;const Ue=Object.assign({},Ie.filterPanels),at=Object.keys(Ue);if(at.length)if(Ve(ce)&&(ce=[ce]),me(ce)){const gt=ce.map(wt=>nq({columns:u.value},wt));at.forEach(wt=>{const et=gt.find(Dt=>Dt.id===wt);et&&(et.filteredValue=[])}),e.store.commit("filterChange",{column:gt,values:[],silent:!0,multi:!0})}else at.forEach(gt=>{const wt=u.value.find(et=>et.id===gt);wt&&(wt.filteredValue=[])}),T.value={},e.store.commit("filterChange",{column:{},values:[],silent:!0})},Pe=()=>{I.value&&(de(null,null,null),e.store.commit("changeSortCondition",{silent:!0}))},{setExpandRowKeys:ge,toggleRowExpansion:ke,updateExpandRows:Le,states:qe,isRowExpanded:lt}=uq({data:a,rowKey:n}),{updateTreeExpandKeys:nt,toggleTreeExpansion:Ze,updateTreeData:kt,updateKeyChildren:Rt,loadOrToggle:Lt,states:_t}=dq({data:a,rowKey:n}),{updateCurrentRowData:jt,updateCurrentRow:Yt,setCurrentRowKey:xe,states:Ee}=cq({data:a,rowKey:n}),Ke=ce=>{ge(ce),nt(ce)},Xe=(ce,Ie)=>{u.value.some(({type:Ue})=>Ue==="expand")?ke(ce,Ie):Ze(ce,Ie)};return fe(()=>_t.checkStrictly.value,ce=>{ce?(S.value={},F=[]):Z({emitChange:!1}),U()}),fe(()=>_t.lazyTreeNodeMap.value,()=>{var at;if(!_t.lazy.value||_t.checkStrictly.value||!n.value)return;const ce=J.value,Ie=k.value.length;for(const gt of Object.keys(_t.lazyTreeNodeMap.value))(at=B.value)!=null&&at[gt]&&pe(B.value[gt].row,!0,ce);const Ue=k.value.length!==Ie;Z({emitChange:!Ue,rowIndexMap:ce}),U(),Ue&&e.emit("selection-change",[...k.value])}),{assertRowKey:R,updateColumns:L,scheduleLayout:W,isSelected:Y,clearSelection:Q,cleanSelection:ee,getSelectionRows:ie,getHalfSelectionRows:ve,toggleRowSelection:re,_toggleAllSelection:_,toggleAllSelection:null,updateAllSelected:U,updateSelectionByChildren:Z,getRowIndeterminate:ae,updateFilters:se,updateCurrentRow:Yt,updateSort:de,execFilter:be,execSort:we,execQuery:Oe,clearFilter:Ce,clearSort:Pe,toggleRowExpansion:ke,setExpandRowKeysAdapter:Ke,setCurrentRowKey:xe,toggleRowExpansionAdapter:Xe,isRowExpanded:lt,updateExpandRows:Le,updateCurrentRowData:jt,loadOrToggle:Lt,updateTreeData:kt,updateKeyChildren:Rt,states:{tableSize:t,rowKey:n,data:a,_data:l,isComplex:o,_columns:s,originColumns:i,columns:u,fixedColumns:c,rightFixedColumns:d,leafColumns:f,fixedLeafColumns:p,rightFixedLeafColumns:g,updateOrderFns:m,leafColumnsLength:v,fixedLeafColumnsLength:h,rightFixedLeafColumnsLength:b,isAllSelected:y,selection:k,selectionIndeterminate:S,reserveSelection:E,selectOnIndeterminate:x,selectable:$,rowExpandable:w,filters:T,filteredData:M,sortingColumn:I,sortProp:N,sortOrder:A,hoverRow:j,...qe,..._t,...Ee}}}function Cv(e,t){return e.map(n=>{var a;return n.id===t.id?t:((a=n.children)!=null&&a.length&&(n.children=Cv(n.children,t)),n)})}function kv(e){e.forEach(t=>{var n,a;t.no=(n=t.getColumnIndex)==null?void 0:n.call(t),(a=t.children)!=null&&a.length&&kv(t.children)}),e.sort((t,n)=>t.no-n.no)}function vq(){const e=ht(),t=pq(),n=he("table"),{t:a}=St();return{ns:n,t:a,...t,mutations:{setData(i,u){const c=r(i._data)!==u;i.data.value=u,i._data.value=u,e.store.execQuery(),e.store.updateCurrentRowData(),e.store.updateExpandRows(),e.store.updateTreeData(e.store.states.defaultExpandAll.value),r(i.reserveSelection)?e.store.assertRowKey():c?e.store.clearSelection():e.store.cleanSelection(),e.store.updateSelectionByChildren({emitChange:!1}),e.store.updateAllSelected(),e.$ready&&e.store.scheduleLayout()},insertColumn(i,u,c,d){var g;const f=r(i._columns);let p=[];c?(c&&!c.children&&(c.children=[]),(g=c.children)==null||g.push(u),p=Cv(f,c)):(f.push(u),p=f),kv(p),i._columns.value=p,i.updateOrderFns.push(d),u.type==="selection"&&(i.selectable.value=u.selectable,i.reserveSelection.value=u.reserveSelection),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},updateColumnOrder(i,u){var c;((c=u.getColumnIndex)==null?void 0:c.call(u))!==u.no&&(kv(i._columns.value),e.$ready&&e.store.updateColumns())},removeColumn(i,u,c,d){var g;const f=r(i._columns)||[];if(c)(g=c.children)==null||g.splice(c.children.findIndex(m=>m.id===u.id),1),Ae(()=>{var m;((m=c.children)==null?void 0:m.length)===0&&delete c.children}),i._columns.value=Cv(f,c);else{const m=f.indexOf(u);m>-1&&(f.splice(m,1),i._columns.value=f)}const p=i.updateOrderFns.indexOf(d);p>-1&&i.updateOrderFns.splice(p,1),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},sort(i,u){const{prop:c,order:d,init:f}=u;if(c){const p=r(i.columns).find(g=>g.property===c);p&&(p.order=d,e.store.updateSort(p,c,d),e.store.commit("changeSortCondition",{init:f}))}},changeSortCondition(i,u){const{sortingColumn:c,sortProp:d,sortOrder:f}=i,p=r(c),g=r(d),m=r(f);Ad(m)&&(i.sortingColumn.value=null,i.sortProp.value=null),e.store.execQuery({filter:!0}),(!u||!(u.silent||u.init))&&e.emit("sort-change",{column:p,prop:g,order:m}),e.store.updateTableScrollY()},filterChange(i,u){const{column:c,values:d,silent:f}=u,p=e.store.updateFilters(c,d);e.store.execQuery(),f||e.emit("filter-change",p),e.store.updateTableScrollY()},toggleAllSelection(){var i,u;(u=(i=e.store).toggleAllSelection)==null||u.call(i)},rowSelectedChanged(i,u){e.store.toggleRowSelection(u),e.store.updateAllSelected()},setHoverRow(i,u){i.hoverRow.value=u},setCurrentRow(i,u){e.store.updateCurrentRow(u)}},commit:function(i,...u){const c=e.store.mutations;if(c[i])c[i].apply(e,[e.store.states,...u]);else throw new Error(`Action not found: ${i}`)},updateTableScrollY:function(){Ae(()=>e.layout.updateScrollY.apply(e.layout))}}}const gm={rowKey:"rowKey",defaultExpandAll:"defaultExpandAll",rowExpandable:"rowExpandable",selectOnIndeterminate:"selectOnIndeterminate",indent:"indent",lazy:"lazy","treeProps.hasChildren":{key:"lazyColumnIdentifier",default:"hasChildren"},"treeProps.children":{key:"childrenColumnName",default:"children"},"treeProps.checkStrictly":{key:"checkStrictly",default:!1}};function hq(e,t){if(!e)throw new Error("Table is required.");const n=vq();return n.toggleAllSelection=Al(n._toggleAllSelection,10),Object.keys(gm).forEach(a=>{O2(N2(t,a),a,n)}),mq(n,t),n}function mq(e,t){Object.keys(gm).forEach(n=>{fe(()=>N2(t,n),a=>{O2(a,n,e)})})}function O2(e,t,n){let a=e,l=gm[t];rt(l)&&(a=a||l.default,l=l.key),n.states[l].value=a}function N2(e,t){if(t.includes(".")){const n=t.split(".");let a=e;return n.forEach(l=>{a=a[l]}),a}else return e[t]}var gq=class{constructor(e){this.observers=[],this.table=null,this.store=null,this.columns=[],this.fit=!0,this.showHeader=!0,this.heightMap={},this.height=V(null),this.scrollX=V(!1),this.scrollY=V(!1),this.bodyWidth=V(null),this.fixedWidth=V(null),this.rightFixedWidth=V(null),this.gutterWidth=0;for(const t in e)Vt(e,t)&&(Qt(this[t])?this[t].value=e[t]:this[t]=e[t]);if(!this.table)throw new Error("Table is required for Table Layout");if(!this.store)throw new Error("Store is required for Table Layout")}updateScrollY(){const e=this.height.value;if(Ad(e))return!1;const t=this.table.refs.scrollBarRef;if(this.table.vnode.el&&(t!=null&&t.wrapRef)){let n=!0;const a=this.scrollY.value;return n=t.wrapRef.scrollHeight>t.wrapRef.clientHeight,this.scrollY.value=n,a!==n}return!1}setHeight(e,t="height"){if(!It)return;const n=this.table.vnode.el;if(e=lq(e),this.height.value=Number(e),this.heightMap[t]=e,!n&&(e||e===0)){Ae(()=>{this.heightMap[t]===e&&this.setHeight(e,t)});return}n&&He(e)?(n.style[t]=`${e}px`,this.updateElsHeight()):n&&Ve(e)&&(n.style[t]=e,this.updateElsHeight())}setMaxHeight(e){this.setHeight(e,"max-height")}getFlattenColumns(){const e=[];return this.table.store.states.columns.value.forEach(t=>{t.isColumnGroup?e.push.apply(e,t.columns):e.push(t)}),e}updateElsHeight(){this.updateScrollY(),this.notifyObservers("scrollable")}headerDisplayNone(e){if(!e)return!0;let t=e;for(;t.tagName!=="DIV";){if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}updateColumnsWidth(){var i;if(!It)return;const e=this.fit,t=(i=this.table.vnode.el)==null?void 0:i.clientWidth;let n=0;const a=this.getFlattenColumns(),l=a.filter(u=>!He(u.width));if(a.forEach(u=>{He(u.width)&&u.realWidth&&(u.realWidth=null)}),l.length>0&&e){if(a.forEach(u=>{n+=Number(u.width||u.minWidth||80)}),n<=t){this.scrollX.value=!1;const u=t-n;if(l.length===1)l[0].realWidth=Number(l[0].minWidth||80)+u;else{const c=u/l.reduce((f,p)=>f+Number(p.minWidth||80),0);let d=0;l.forEach((f,p)=>{if(p===0)return;const g=Math.floor(Number(f.minWidth||80)*c);d+=g,f.realWidth=Number(f.minWidth||80)+g}),l[0].realWidth=Number(l[0].minWidth||80)+u-d}}else this.scrollX.value=!0,l.forEach(u=>{u.realWidth=Number(u.minWidth)});this.bodyWidth.value=Math.max(n,t),this.table.state.resizeState.value.width=this.bodyWidth.value}else a.forEach(u=>{!u.width&&!u.minWidth?u.realWidth=80:u.realWidth=Number(u.width||u.minWidth),n+=u.realWidth}),this.scrollX.value=n>t,this.bodyWidth.value=n;const o=this.store.states.fixedColumns.value;if(o.length>0){let u=0;o.forEach(c=>{u+=Number(c.realWidth||c.width)}),this.fixedWidth.value=u}const s=this.store.states.rightFixedColumns.value;if(s.length>0){let u=0;s.forEach(c=>{u+=Number(c.realWidth||c.width)}),this.rightFixedWidth.value=u}this.notifyObservers("columns")}addObserver(e){this.observers.push(e)}removeObserver(e){const t=this.observers.indexOf(e);t!==-1&&this.observers.splice(t,1)}notifyObservers(e){this.observers.forEach(t=>{var n,a;switch(e){case"columns":(n=t.state)==null||n.onColumnsChange(this);break;case"scrollable":(a=t.state)==null||a.onScrollableChange(this);break;default:throw new Error(`Table Layout don't have event ${e}.`)}})}};const fl=Symbol("ElTable"),M2=e=>{const t=[];return e.forEach(n=>{n.children?(t.push(n),t.push.apply(t,M2(n.children))):t.push(n)}),t},P2=e=>{let t=1;const n=(l,o)=>{if(o&&(l.level=o.level+1,t{n(i,l),s+=i.colSpan}),l.colSpan=s}else l.colSpan=1};e.forEach(l=>{l.level=1,n(l,void 0)});const a=[];for(let l=0;l{l.children?(l.rowSpan=1,l.children.forEach(o=>o.isSubColumn=!0)):l.rowSpan=t-l.level+1,a[l.level-1].push(l)}),a};function bq(e){const t=Fe(fl),n=C(()=>P2(e.store.states.originColumns.value));return{isGroup:C(()=>{const o=n.value.length>1;return o&&t&&(t.state.isGroup.value=!0),o}),toggleAllSelection:o=>{o.stopPropagation(),t==null||t.store.commit("toggleAllSelection")},columnRows:n}}var yq=ue({name:"ElTableFilterPanel",components:{ElCheckbox:ll,ElCheckboxGroup:tm,ElScrollbar:il,ElTooltip:Hn,ElIcon:Be,ArrowDown:jl,ArrowUp:Zd},props:{placement:{type:String,default:"bottom-start"},store:{type:Object},column:{type:Object},upDataColumn:{type:Function},appendTo:tn.appendTo},setup(e){const t=ht(),{t:n}=St(),a=he("table-filter"),l=t==null?void 0:t.parent;e.column&&!l.filterPanels.value[e.column.id]&&(l.filterPanels.value[e.column.id]=t);const o=V(null),s=V(null),i=V(0),u=V([]),c=C(()=>e.column&&e.column.filters),d=C(()=>e.column&&e.column.filterClassName?`${a.b()} ${e.column.filterClassName}`:a.b()),f=C({get:()=>{var w;return(((w=e.column)==null?void 0:w.filteredValue)||[])[0]},set:w=>{var T;if(e.column){const M=[...e.column.filteredValue??[]];Ta(w)?M.splice(0,1):M.splice(0,1,w),(T=e.upDataColumn)==null||T.call(e,"filteredValue",M)}}}),p=C(()=>e.column?e.column.filterMultiple:!0),g=w=>w.value===f.value,m=()=>{var w;(w=o.value)==null||w.onClose()},v=()=>{y(u.value),m()},h=()=>{u.value=[],y(u.value),m()},b=(w,T)=>{f.value=w,i.value=T,Ta(w)?y([]):y([w]),m()},y=w=>{var T,M,I;(T=e.upDataColumn)==null||T.call(e,"filteredValue",w),(M=e.store)==null||M.commit("filterChange",{column:e.column,values:w}),(I=e.store)==null||I.updateAllSelected()},k=()=>{var w;u.value=[...((w=e.column)==null?void 0:w.filteredValue)||[]]},S=()=>{var w,T;(w=s.value)==null||w.focus(),!p.value&&x(),e.column&&((T=e.upDataColumn)==null||T.call(e,"filterOpened",!0))},E=()=>{var w;e.column&&((w=e.upDataColumn)==null||w.call(e,"filterOpened",!1))},x=()=>{if(Ta(f)){i.value=0;return}const w=(c.value||[]).findIndex(T=>T.value===f.value);i.value=w>=0?w+1:0};return{multiple:p,filterClassName:d,filteredValue:u,filterValue:f,filters:c,handleConfirm:v,handleReset:h,handleSelect:b,isPropAbsent:Ta,isActive:g,t:n,ns:a,tooltipRef:o,rootRef:s,checkedIndex:i,handleBeforeShowTooltip:k,handleShowTooltip:S,handleHideTooltip:E,handleKeydown:w=>{var A,j;const T=Gt(w),M=(c.value?c.value.length:0)+1;let I=i.value,N=!0;switch(T){case ye.down:case ye.right:I=(I+1)%M;break;case ye.up:case ye.left:I=(I-1+M)%M;break;case ye.tab:m(),N=!1;break;case ye.enter:case ye.space:if(I===0)b(null,0);else{const F=(c.value||[])[I-1];F.value&&b(F.value,I)}break;default:N=!1}N&&w.preventDefault(),i.value=I,(j=(A=s.value)==null?void 0:A.querySelector(`.${a.e("list-item")}:nth-child(${I+1})`))==null||j.focus()}}}});const wq=["disabled"],Sq=["tabindex","aria-checked"],Cq=["tabindex","aria-checked","onClick"],kq=["aria-label"];function Eq(e,t,n,a,l,o){const s=Pt("el-checkbox"),i=Pt("el-checkbox-group"),u=Pt("el-scrollbar"),c=Pt("arrow-up"),d=Pt("arrow-down"),f=Pt("el-icon"),p=Pt("el-tooltip");return O(),oe(p,{ref:"tooltipRef",offset:0,placement:e.placement,"show-arrow":!1,trigger:"click",role:"dialog",teleported:"",effect:"light",pure:"",loop:"","popper-class":e.filterClassName,persistent:"","append-to":e.appendTo,onBeforeShow:e.handleBeforeShowTooltip,onShow:e.handleShowTooltip,onHide:e.handleHideTooltip},{content:X(()=>[e.multiple?(O(),H("div",{key:0,ref:"rootRef",tabindex:"-1",class:P(e.ns.e("multiple"))},[K("div",{class:P(e.ns.e("content"))},[q(u,{"wrap-class":e.ns.e("wrap")},{default:X(()=>[q(i,{modelValue:e.filteredValue,"onUpdate:modelValue":t[0]||(t[0]=g=>e.filteredValue=g),class:P(e.ns.e("checkbox-group"))},{default:X(()=>[(O(!0),H(ze,null,bt(e.filters,g=>(O(),oe(s,{key:g.value,value:g.value},{default:X(()=>[st(Se(g.text),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","class"])]),_:1},8,["wrap-class"])],2),K("div",{class:P(e.ns.e("bottom"))},[K("button",{class:P(e.ns.is("disabled",e.filteredValue.length===0)),disabled:e.filteredValue.length===0,type:"button",onClick:t[1]||(t[1]=(...g)=>e.handleConfirm&&e.handleConfirm(...g))},Se(e.t("el.table.confirmFilter")),11,wq),K("button",{type:"button",onClick:t[2]||(t[2]=(...g)=>e.handleReset&&e.handleReset(...g))},Se(e.t("el.table.resetFilter")),1)],2)],2)):(O(),H("ul",{key:1,ref:"rootRef",tabindex:"-1",role:"radiogroup",class:P(e.ns.e("list")),onKeydown:t[4]||(t[4]=(...g)=>e.handleKeydown&&e.handleKeydown(...g))},[K("li",{role:"radio",class:P([e.ns.e("list-item"),e.ns.is("active",e.isPropAbsent(e.filterValue))]),tabindex:e.checkedIndex===0?0:-1,"aria-checked":e.isPropAbsent(e.filterValue),onClick:t[3]||(t[3]=g=>e.handleSelect(null,0))},Se(e.t("el.table.clearFilter")),11,Sq),(O(!0),H(ze,null,bt(e.filters,(g,m)=>(O(),H("li",{key:g.value,role:"radio",class:P([e.ns.e("list-item"),e.ns.is("active",e.isActive(g))]),tabindex:e.checkedIndex===m+1?0:-1,"aria-checked":e.isActive(g),onClick:v=>e.handleSelect(g.value,m+1)},Se(g.text),11,Cq))),128))],34))]),default:X(()=>{var g;return[K("button",{type:"button",class:P(`${e.ns.namespace.value}-table__column-filter-trigger`),"aria-label":e.t("el.table.filterLabel",{column:((g=e.column)==null?void 0:g.label)||""})},[q(f,null,{default:X(()=>[ne(e.$slots,"filter-icon",{},()=>{var m;return[(m=e.column)!=null&&m.filterOpened?(O(),oe(c,{key:0})):(O(),oe(d,{key:1}))]})]),_:3})],10,kq)]}),_:3},8,["placement","popper-class","append-to","onBeforeShow","onShow","onHide"])}var xq=Rn(yq,[["render",Eq]]);function bm(e){const t=ht();Cd(()=>{n.value.addObserver(t)}),mt(()=>{a(n.value),l(n.value)}),Kl(()=>{a(n.value),l(n.value)}),Qi(()=>{n.value.removeObserver(t)});const n=C(()=>{const o=e.layout;if(!o)throw new Error("Can not find table layout.");return o}),a=o=>{var c;const s=((c=e.vnode.el)==null?void 0:c.querySelectorAll("colgroup > col"))||[];if(!s.length)return;const i=o.getFlattenColumns(),u={};i.forEach(d=>{u[d.id]=d});for(let d=0,f=s.length;d{var u,c;const s=((u=e.vnode.el)==null?void 0:u.querySelectorAll("colgroup > col[name=gutter]"))||[];for(let d=0,f=s.length;d{v.stopPropagation()},o=(v,h)=>{!h.filters&&h.sortable?m(v,h,!1):h.filterable&&!h.sortable&&l(v),a==null||a.emit("header-click",h,v)},s=(v,h)=>{a==null||a.emit("header-contextmenu",h,v)},i=V(null),u=V(!1),c=V(),d=(v,h)=>{var b,y,k;if(It&&!(h.children&&h.children.length>0)&&i.value&&e.border&&i.value.id===h.id){u.value=!0;const S=a;t("set-drag-visible",!0);const E=(b=S==null?void 0:S.vnode.el)==null?void 0:b.getBoundingClientRect().left,x=(k=(y=n==null?void 0:n.vnode)==null?void 0:y.el)==null?void 0:k.querySelector(`th.${h.id}`),$=x.getBoundingClientRect(),w=$.left-E+30;Da(x,"noclick"),c.value={startMouseLeft:v.clientX,startLeft:$.right-E,startColumnLeft:$.left-E,tableLeft:E};const T=S==null?void 0:S.refs.resizeProxy;T.style.left=`${c.value.startLeft}px`,document.onselectstart=function(){return!1},document.ondragstart=function(){return!1};const M=N=>{const A=N.clientX-c.value.startMouseLeft,j=c.value.startLeft+A;T.style.left=`${Math.max(w,j)}px`},I=()=>{if(u.value){const{startColumnLeft:N,startLeft:A}=c.value;h.width=h.realWidth=Number.parseInt(T.style.left,10)-N,S==null||S.emit("header-dragend",h.width,A-N,h,v),requestAnimationFrame(()=>{e.store.scheduleLayout(!1,!0)}),document.body.style.cursor="",u.value=!1,i.value=null,c.value=void 0,t("set-drag-visible",!1)}document.removeEventListener("mousemove",M),document.removeEventListener("mouseup",I),document.onselectstart=null,document.ondragstart=null,setTimeout(()=>{sa(x,"noclick")},0)};document.addEventListener("mousemove",M),document.addEventListener("mouseup",I)}},f=(v,h)=>{var T;if(!e.border||h.children&&h.children.length>0)return;const b=v.target,y=wa(b)?b.closest("th"):null;if(!y)return;const k=Fa(y,"is-sortable");if(k){const M=u.value?"col-resize":"";y.style.cursor=M;const I=y.querySelector(".caret-wrapper");I&&(I.style.cursor=M)}if(!h.resizable||u.value){i.value=null;return}const S=y.getBoundingClientRect(),E=((T=y.parentNode)==null?void 0:T.lastElementChild)===y,x=e.allowDragLastColumn||!E,$=S.width>12&&S.right-v.clientX<8&&x,w=$?"col-resize":"";document.body.style.cursor=w,i.value=$?h:null,k&&(y.style.cursor=w)},p=()=>{!It||u.value||(document.body.style.cursor="")},g=({order:v,sortOrders:h})=>{if(v==="")return h[0];const b=h.indexOf(v||null);return h[b>h.length-2?0:b+1]},m=(v,h,b)=>{var T;v.stopPropagation();const y=h.order===b?null:b||g(h),k=(T=v.target)==null?void 0:T.closest("th");if(k&&Fa(k,"noclick")){sa(k,"noclick");return}if(!h.sortable)return;const S=v.currentTarget;if(["ascending","descending"].some(M=>Fa(S,M)&&!h.sortOrders.includes(M)))return;const E=e.store.states;let x=E.sortProp.value,$;const w=E.sortingColumn.value;(w!==h||w===h&&Ad(w.order))&&(w&&(w.order=null),E.sortingColumn.value=h,x=h.property??null),y?$=h.order=y:$=h.order=null,E.sortProp.value=x,E.sortOrder.value=$,a==null||a.store.commit("changeSortCondition")};return{handleHeaderClick:o,handleHeaderContextMenu:s,handleMouseDown:d,handleMouseMove:f,handleMouseOut:p,handleSortClick:m,handleFilterClick:l}}function $q(e){const t=Fe(fl),n=he("table");return{getHeaderRowStyle:i=>{const u=t==null?void 0:t.props.headerRowStyle;return We(u)?u.call(null,{rowIndex:i}):u},getHeaderRowClass:i=>{const u=[],c=t==null?void 0:t.props.headerRowClassName;return Ve(c)?u.push(c):We(c)&&u.push(c.call(null,{rowIndex:i})),u.join(" ")},getHeaderCellStyle:(i,u,c,d)=>{let f=(t==null?void 0:t.props.headerCellStyle)??{};We(f)&&(f=f.call(null,{rowIndex:i,columnIndex:u,row:c,column:d}));const p=mm(u,d.fixed,e.store,c);return wr(p,"left"),wr(p,"right"),Object.assign({},f,p)},getHeaderCellClass:(i,u,c,d)=>{const f=hm(n.b(),u,d.fixed,e.store,c),p=[d.id,d.order,d.headerAlign,d.className,d.labelClassName,...f];d.children||p.push("is-leaf"),d.sortable&&p.push("is-sortable");const g=t==null?void 0:t.props.headerCellClassName;return Ve(g)?p.push(g):We(g)&&p.push(g.call(null,{rowIndex:i,columnIndex:u,row:c,column:d})),p.push(n.e("cell")),p.filter(m=>!!m).join(" ")}}}var s0=ue({name:"ElTableHeader",components:{ElCheckbox:ll},props:{fixed:{type:String,default:""},store:{required:!0,type:Object},border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})},appendFilterPanelTo:{type:String},allowDragLastColumn:{type:Boolean}},setup(e,{emit:t}){const n=ht(),a=Fe(fl),l=he("table"),o=V({}),{onColumnsChange:s,onScrollableChange:i}=bm(a),u=(a==null?void 0:a.props.tableLayout)==="auto",c=Ft(new Map),d=V();let f;const p=()=>{f&&(clearTimeout(f),f=void 0),f=setTimeout(()=>{f=void 0;const N=d.value;N&&c.size>0&&(c.forEach((A,j)=>{const F=N.querySelector(`.${j.replace(/\s/g,".")}`);F&&(A.width=F.getBoundingClientRect().width||A.width)}),c.clear())})};fe(c,p),zt(()=>{f&&(clearTimeout(f),f=void 0)}),mt(async()=>{await Ae(),await Ae();const{prop:N,order:A}=e.defaultSort;a==null||a.store.commit("sort",{prop:N,order:A,init:!0}),p()});const{handleHeaderClick:g,handleHeaderContextMenu:m,handleMouseDown:v,handleMouseMove:h,handleMouseOut:b,handleSortClick:y,handleFilterClick:k}=Tq(e,t),{getHeaderRowStyle:S,getHeaderRowClass:E,getHeaderCellStyle:x,getHeaderCellClass:$}=$q(e),{isGroup:w,toggleAllSelection:T,columnRows:M}=bq(e),{t:I}=St();return n.state={onColumnsChange:s,onScrollableChange:i},n.filterPanels=o,{ns:l,t:I,filterPanels:o,onColumnsChange:s,onScrollableChange:i,columnRows:M,getHeaderRowClass:E,getHeaderRowStyle:S,getHeaderCellClass:$,getHeaderCellStyle:x,handleHeaderClick:g,handleHeaderContextMenu:m,handleMouseDown:v,handleMouseMove:h,handleMouseOut:b,handleSortClick:y,handleFilterClick:k,isGroup:w,toggleAllSelection:T,saveIndexSelection:c,isTableLayoutAuto:u,theadRef:d,updateFixedColumnStyle:p}},render(){const{ns:e,t,isGroup:n,columnRows:a,getHeaderCellStyle:l,getHeaderCellClass:o,getHeaderRowClass:s,getHeaderRowStyle:i,handleHeaderClick:u,handleHeaderContextMenu:c,handleMouseDown:d,handleMouseMove:f,handleSortClick:p,handleMouseOut:g,store:m,$parent:v,saveIndexSelection:h,isTableLayoutAuto:b}=this;let y=1;return Ge("thead",{ref:"theadRef",class:e.is("group",n)},a.map((k,S)=>Ge("tr",{class:s(S),key:S,style:i(S)},k.map((E,x)=>{E.rowSpan>y&&(y=E.rowSpan);const $=o(S,x,k,E);return b&&E.fixed&&h.set($,E),Ge("th",{class:$,colspan:E.colSpan,key:`${E.id}-thead`,rowspan:E.rowSpan,scope:E.colSpan>1?"colgroup":"col",ariaSort:E.sortable?E.order:void 0,style:l(S,x,k,E),onClick:w=>{var T;(T=w.currentTarget)!=null&&T.classList.contains("noclick")||u(w,E)},onContextmenu:w=>c(w,E),onMousedown:w=>d(w,E),onMousemove:w=>f(w,E),onMouseout:g},[Ge("div",{class:["cell",E.filteredValue&&E.filteredValue.length>0?"highlight":""]},[E.renderHeader?E.renderHeader({column:E,$index:x,store:m,_self:v}):E.label,E.sortable&&Ge("button",{type:"button",class:"caret-wrapper","aria-label":t("el.table.sortLabel",{column:E.label||""}),onClick:w=>p(w,E)},[Ge("i",{onClick:w=>p(w,E,"ascending"),class:"sort-caret ascending"}),Ge("i",{onClick:w=>p(w,E,"descending"),class:"sort-caret descending"})]),E.filterable&&Ge(xq,{store:m,placement:E.filterPlacement||"bottom-start",appendTo:v==null?void 0:v.appendFilterPanelTo,column:E,upDataColumn:(w,T)=>{E[w]=T}},{"filter-icon":()=>E.renderFilterIcon?E.renderFilterIcon({filterOpened:E.filterOpened}):null})])])}))))}});function Oq(e){const t=Fe(fl),n=V(""),a=V(Ge("div")),l=(m,v,h)=>{var E,x;const b=t,y=op(m);let k=null;const S=(E=b==null?void 0:b.vnode.el)==null?void 0:E.dataset.prefix;y&&(k=a0({columns:((x=e.store)==null?void 0:x.states.columns.value)??[]},y,S),k&&(b==null||b.emit(`cell-${h}`,v,k,y,m))),b==null||b.emit(`row-${h}`,v,k,m)},o=(m,v)=>{l(m,v,"dblclick")},s=(m,v)=>{var h;(h=e.store)==null||h.commit("setCurrentRow",v),l(m,v,"click")},i=(m,v)=>{l(m,v,"contextmenu")},u=Al(m=>{var v;(v=e.store)==null||v.commit("setHoverRow",m)},30),c=Al(()=>{var m;(m=e.store)==null||m.commit("setHoverRow",null)},30),d=m=>{const v=window.getComputedStyle(m,null);return{left:Number.parseInt(v.paddingLeft,10)||0,right:Number.parseInt(v.paddingRight,10)||0,top:Number.parseInt(v.paddingTop,10)||0,bottom:Number.parseInt(v.paddingBottom,10)||0}},f=(m,v,h)=>{var y;let b=(y=v==null?void 0:v.target)==null?void 0:y.parentNode;for(;m>1&&(b=b==null?void 0:b.nextSibling,!(!b||b.nodeName!=="TR"));)h(b,"hover-row hover-fixed-row"),m--};return{handleDoubleClick:o,handleClick:s,handleContextMenu:i,handleMouseEnter:u,handleMouseLeave:c,handleCellMouseEnter:(m,v,h)=>{var D,R,z;if(!t)return;const b=t,y=op(m),k=(D=b==null?void 0:b.vnode.el)==null?void 0:D.dataset.prefix;let S=null;if(y){if(S=a0({columns:((R=e.store)==null?void 0:R.states.columns.value)??[]},y,k),!S)return;y.rowSpan>1&&f(y.rowSpan,m,Da);const L=b.hoverState={cell:y,column:S,row:v};b==null||b.emit("cell-mouse-enter",L.row,L.column,L.cell,m)}if(!h){(pn==null?void 0:pn.trigger)===y&&(pn==null||pn());return}const E=m.target.querySelector(".cell");if(!(Fa(E,`${k}-tooltip`)&&E.childNodes.length&&((z=E.textContent)!=null&&z.trim())))return;const x=document.createRange();x.setStart(E,0),x.setEnd(E,E.childNodes.length);const{width:$,height:w}=x.getBoundingClientRect(),{width:T,height:M}=E.getBoundingClientRect(),{top:I,left:N,right:A,bottom:j}=d(E),F=N+A,B=I+j;Ml($+F,T)||Ml(w+B,M)||Ml(E.scrollWidth,T)?iq(h,((y==null?void 0:y.innerText)||(y==null?void 0:y.textContent))??"",v,S,y,b):(pn==null?void 0:pn.trigger)===y&&(pn==null||pn())},handleCellMouseLeave:m=>{const v=op(m);if(!v)return;v.rowSpan>1&&f(v.rowSpan,m,sa);const h=t==null?void 0:t.hoverState;t==null||t.emit("cell-mouse-leave",h==null?void 0:h.row,h==null?void 0:h.column,h==null?void 0:h.cell,m)},tooltipContent:n,tooltipTrigger:a}}function Nq(e){const t=Fe(fl),n=he("table");return{getRowStyle:(c,d)=>{const f=t==null?void 0:t.props.rowStyle;return We(f)?f.call(null,{row:c,rowIndex:d}):f||null},getRowClass:(c,d,f)=>{var m;const p=[n.e("row")];t!=null&&t.props.highlightCurrentRow&&c===((m=e.store)==null?void 0:m.states.currentRow.value)&&p.push("current-row"),e.stripe&&f%2===1&&p.push(n.em("row","striped"));const g=t==null?void 0:t.props.rowClassName;return Ve(g)?p.push(g):We(g)&&p.push(g.call(null,{row:c,rowIndex:d})),p},getCellStyle:(c,d,f,p)=>{const g=t==null?void 0:t.props.cellStyle;let m=g??{};We(g)&&(m=g.call(null,{rowIndex:c,columnIndex:d,row:f,column:p}));const v=mm(d,e==null?void 0:e.fixed,e.store);return wr(v,"left"),wr(v,"right"),Object.assign({},m,v)},getCellClass:(c,d,f,p,g)=>{const m=hm(n.b(),d,e==null?void 0:e.fixed,e.store,void 0,g),v=[p.id,p.align,p.className,...m],h=t==null?void 0:t.props.cellClassName;return Ve(h)?v.push(h):We(h)&&v.push(h.call(null,{rowIndex:c,columnIndex:d,row:f,column:p})),v.push(n.e("cell")),v.filter(b=>!!b).join(" ")},getSpan:(c,d,f,p)=>{let g=1,m=1;const v=t==null?void 0:t.props.spanMethod;if(We(v)){const h=v({row:c,column:d,rowIndex:f,columnIndex:p});me(h)?(g=h[0],m=h[1]):rt(h)&&(g=h.rowspan,m=h.colspan)}return{rowspan:g,colspan:m}},getColspanRealWidth:(c,d,f)=>{if(d<1)return c[f].realWidth;const p=c.map(({realWidth:g,width:m})=>g||m).slice(f,f+d);return Number(p.reduce((g,m)=>Number(g)+Number(m),-1))}}}const Mq=["colspan","rowspan"];var Pq=ue({name:"TableTdWrapper",__name:"td-wrapper",props:{colspan:{type:Number,default:1},rowspan:{type:Number,default:1}},setup(e){return(t,n)=>(O(),H("td",{colspan:e.colspan,rowspan:e.rowspan},[ne(t.$slots,"default")],8,Mq))}}),Iq=Pq;function Rq(e){const t=Fe(fl),n=he("table"),{handleDoubleClick:a,handleClick:l,handleContextMenu:o,handleMouseEnter:s,handleMouseLeave:i,handleCellMouseEnter:u,handleCellMouseLeave:c,tooltipContent:d,tooltipTrigger:f}=Oq(e),{getRowStyle:p,getRowClass:g,getCellStyle:m,getCellClass:v,getSpan:h,getColspanRealWidth:b}=Nq(e);let y=-1;const k=C(()=>{var w;return(w=e.store)==null?void 0:w.states.columns.value.findIndex(({type:T})=>T==="default")}),S=(w,T)=>{var I;const M=(I=t==null?void 0:t.props)==null?void 0:I.rowKey;return M?En(w,M):T},E=(w,T,M,I=!1)=>{const{tooltipEffect:N,tooltipOptions:A,store:j}=e,{indent:F,columns:B}=j.states,D=[];let R=!0;return M&&(D.push(n.em("row",`level-${M.level}`)),R=!!M.display),T===0&&(y=-1),e.stripe&&R&&y++,D.push(...g(w,T,y)),Ge("tr",{style:[R?null:{display:"none"},p(w,T)],class:D,key:S(w,T),onDblclick:z=>a(z,w),onClick:z=>l(z,w),onContextmenu:z=>o(z,w),onMouseenter:()=>s(T),onMouseleave:i},B.value.map((z,L)=>{const{rowspan:W,colspan:Y}=h(w,z,T,L);if(!W||!Y)return null;const J=Object.assign({},z);J.realWidth=b(B.value,Y,L);const Z={store:j,_self:e.context||t,column:J,row:w,$index:T,cellIndex:L,expanded:I};L===k.value&&M&&(Z.treeNode={indent:M.level&&M.level*F.value,level:M.level},Wt(M.expanded)&&(Z.treeNode.expanded=M.expanded,"loading"in M&&(Z.treeNode.loading=M.loading),"noLazyChildren"in M&&(Z.treeNode.noLazyChildren=M.noLazyChildren)));const Q=`${S(w,T)},${L}`,ee=J.columnKey||J.rawColumnKey||"",ie=z.showOverflowTooltip&&Yw({effect:N},A,z.showOverflowTooltip);return Ge(Iq,{style:m(T,L,w,z),class:v(T,L,w,z,Y-1),key:`${ee}${Q}`,rowspan:W,colspan:Y,onMouseenter:ve=>u(ve,w,ie),onMouseleave:c},{default:()=>x(L,z,Z)})}))},x=(w,T,M)=>T.renderCell(M);return{wrappedRowRender:(w,T)=>{const M=e.store,{isRowExpanded:I,assertRowKey:N}=M,{treeData:A,lazyTreeNodeMap:j,childrenColumnName:F,rowKey:B}=M.states,D=M.states.columns.value;if(D.some(({type:R})=>R==="expand")){const R=I(w),z=E(w,T,void 0,R),L=t==null?void 0:t.renderExpanded;if(!L)return console.error("[Element Error]renderExpanded is required."),z;const W=[[z]];return(t.props.preserveExpandedContent||R)&&W[0].push(Ge("tr",{key:`expanded-row__${z.key}`,style:{display:R?"":"none"}},[Ge("td",{colspan:D.length,class:`${n.e("cell")} ${n.e("expanded-cell")}`},[L({row:w,$index:T,store:M,expanded:R})])])),W}else if(Object.keys(A.value).length){N();const R=En(w,B.value);let z=A.value[R],L=null;z&&(L={expanded:z.expanded,level:z.level,display:!0,noLazyChildren:void 0,loading:void 0},Wt(z.lazy)&&(L&&Wt(z.loaded)&&z.loaded&&(L.noLazyChildren=!(z.children&&z.children.length)),L.loading=z.loading));const W=[E(w,T,L??void 0)];if(z){let Y=0;const J=(Z,Q)=>{Z&&Z.length&&Q&&Z.forEach(ee=>{const ie={display:Q.display&&Q.expanded,level:Q.level+1,expanded:!1,noLazyChildren:!1,loading:!1},ve=En(ee,B.value);if(Ta(ve))throw new Error("For nested data item, row-key is required.");if(z={...A.value[ve]},z&&(ie.expanded=z.expanded,z.level=z.level||ie.level,z.display=!!(z.expanded&&ie.display),Wt(z.lazy)&&(Wt(z.loaded)&&z.loaded&&(ie.noLazyChildren=!(z.children&&z.children.length)),ie.loading=z.loading)),Y++,W.push(E(ee,T+Y,ie)),z){const pe=j.value[ve]||ee[F.value];J(pe,z)}})};z.display=!0,J(j.value[R]||w[F.value],z)}return W}else return E(w,T,void 0)},tooltipContent:d,tooltipTrigger:f}}const _q={store:{required:!0,type:Object},stripe:Boolean,tooltipEffect:String,tooltipOptions:{type:Object},context:{default:()=>({}),type:Object},rowClassName:[String,Function],rowStyle:[Object,Function],fixed:{type:String,default:""},highlight:Boolean};var Aq=ue({name:"ElTableBody",props:_q,setup(e){var d;const t=ht(),n=Fe(fl),a=he("table"),{wrappedRowRender:l,tooltipContent:o,tooltipTrigger:s}=Rq(e),{onColumnsChange:i,onScrollableChange:u}=bm(n),c=[];return fe((d=e.store)==null?void 0:d.states.hoverRow,(f,p)=>{var b,y;const g=t==null?void 0:t.vnode.el,m=Array.from((g==null?void 0:g.children)||[]).filter(k=>k==null?void 0:k.classList.contains(`${a.e("row")}`));let v=f;const h=(b=m[v])==null?void 0:b.childNodes;if(h!=null&&h.length){let k=0;Array.from(h).reduce((S,E,x)=>{var $,w;return(($=h[x])==null?void 0:$.colSpan)>1&&(k=(w=h[x])==null?void 0:w.colSpan),E.nodeName!=="TD"&&k===0&&S.push(x),k>0&&k--,S},[]).forEach(S=>{var E;for(v=f;v>0;){const x=(E=m[v-1])==null?void 0:E.childNodes;if(x[S]&&x[S].nodeName==="TD"&&x[S].rowSpan>1){Da(x[S],"hover-cell"),c.push(x[S]);break}v--}})}else c.forEach(k=>sa(k,"hover-cell")),c.length=0;!((y=e.store)!=null&&y.states.isComplex.value)||!It||Wn(()=>{const k=m[p],S=m[f];k&&!k.classList.contains("hover-fixed-row")&&sa(k,"hover-row"),S&&Da(S,"hover-row")})}),Qi(()=>{pn==null||pn()}),{ns:a,onColumnsChange:i,onScrollableChange:u,wrappedRowRender:l,tooltipContent:o,tooltipTrigger:s}},render(){const{wrappedRowRender:e,store:t}=this,n=(t==null?void 0:t.states.data.value)||[];return Ge("tbody",{tabIndex:-1},[n.reduce((a,l)=>a.concat(e(l,a.length)),[])])}});function Lq(){var t;const e=(t=Fe(fl))==null?void 0:t.store;return{leftFixedLeafCount:C(()=>(e==null?void 0:e.states.fixedLeafColumnsLength.value)??0),rightFixedLeafCount:C(()=>(e==null?void 0:e.states.rightFixedColumns.value.length)??0),columnsCount:C(()=>(e==null?void 0:e.states.columns.value.length)??0),leftFixedCount:C(()=>(e==null?void 0:e.states.fixedColumns.value.length)??0),rightFixedCount:C(()=>(e==null?void 0:e.states.rightFixedColumns.value.length)??0),columns:C(()=>(e==null?void 0:e.states.columns.value)??[])}}function Vq(e){const{columns:t}=Lq(),n=he("table");return{getCellClasses:(o,s)=>{const i=o[s],u=[n.e("cell"),i.id,i.align,i.labelClassName,...hm(n.b(),s,i.fixed,e.store)];return i.className&&u.push(i.className),i.children||u.push(n.is("leaf")),u},getCellStyles:(o,s)=>{const i=mm(s,o.fixed,e.store);return wr(i,"left"),wr(i,"right"),i},columns:t}}var r0=ue({name:"ElTableFooter",props:{fixed:{type:String,default:""},store:{required:!0,type:Object},summaryMethod:Function,sumText:String,border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(e){const t=Fe(fl),n=he("table"),{getCellClasses:a,getCellStyles:l,columns:o}=Vq(e),{onScrollableChange:s,onColumnsChange:i}=bm(t);return{ns:n,onScrollableChange:s,onColumnsChange:i,getCellClasses:a,getCellStyles:l,columns:o}},render(){const{columns:e,getCellStyles:t,getCellClasses:n,summaryMethod:a,sumText:l}=this,o=this.store.states.data.value;let s=[];return a?s=a({columns:e,data:o}):e.forEach((i,u)=>{if(u===0){s[u]=l;return}const c=o.map(g=>Number(g[i.property])),d=[];let f=!0;c.forEach(g=>{if(!Number.isNaN(+g)){f=!1;const m=`${g}`.split(".")[1];d.push(m?m.length:0)}});const p=Math.max.apply(null,d);f?s[u]="":s[u]=c.reduce((g,m)=>{const v=Number(m);return Number.isNaN(+v)?g:Number.parseFloat((g+m).toFixed(Math.min(p,20)))},0)}),Ge(Ge("tfoot",[Ge("tr",{},[...e.map((i,u)=>Ge("td",{key:u,colspan:i.colSpan,rowspan:i.rowSpan,class:n(e,u),style:t(i,u)},[Ge("div",{class:["cell",i.labelClassName]},[s[u]])]))])]))}});function Dq(e){return{setCurrentRow:p=>{e.commit("setCurrentRow",p)},getSelectionRows:()=>e.getSelectionRows(),getHalfSelectionRows:()=>e.getHalfSelectionRows(),toggleRowSelection:(p,g,m=!0)=>{e.toggleRowSelection(p,g,!1,m),e.updateAllSelected()},clearSelection:()=>{e.clearSelection()},clearFilter:p=>{e.clearFilter(p)},toggleAllSelection:()=>{e.commit("toggleAllSelection")},toggleRowExpansion:(p,g)=>{e.toggleRowExpansionAdapter(p,g)},clearSort:()=>{e.clearSort()},sort:(p,g)=>{e.commit("sort",{prop:p,order:g})},updateKeyChildren:(p,g)=>{e.updateKeyChildren(p,g)}}}function Bq(e,t,n,a){const l=V(!1),o=V(null),s=V(!1),i=F=>{s.value=F},u=V({width:null,height:null,headerHeight:null}),c=V(!1),d={display:"inline-block",verticalAlign:"middle"},f=V(),p=V(0),g=V(0),m=V(0),v=V(0),h=V(0);fe(()=>e.height,F=>{t.setHeight(F??null)},{immediate:!0}),fe(()=>e.maxHeight,F=>{t.setMaxHeight(F??null)},{immediate:!0}),fe(()=>[e.currentRowKey,n.states.rowKey],([F,B])=>{!r(B)||!r(F)||n.setCurrentRowKey(`${F}`)},{immediate:!0}),fe(()=>e.data,F=>{a.store.commit("setData",F)},{immediate:!0,deep:!0}),ia(()=>{e.expandRowKeys&&n.setExpandRowKeysAdapter(e.expandRowKeys)});const b=()=>{a.store.commit("setHoverRow",null),a.hoverState&&(a.hoverState=null)},y=(F,B)=>{const{pixelX:D,pixelY:R}=B;Math.abs(D)>=Math.abs(R)&&(a.refs.bodyWrapper.scrollLeft+=B.pixelX/5)},k=C(()=>e.height||e.maxHeight||n.states.fixedColumns.value.length>0||n.states.rightFixedColumns.value.length>0),S=C(()=>({width:t.bodyWidth.value?`${t.bodyWidth.value}px`:""})),E=()=>{k.value&&t.updateElsHeight(),t.updateColumnsWidth(),!(typeof window>"u")&&requestAnimationFrame(T)};mt(async()=>{await Ae(),n.updateColumns(),M(),requestAnimationFrame(E);const F=a.vnode.el,B=a.refs.headerWrapper;e.flexible&&F&&F.parentElement&&(F.parentElement.style.minWidth="0"),u.value={width:f.value=F.offsetWidth,height:F.offsetHeight,headerHeight:e.showHeader&&B?B.offsetHeight:null},n.states.columns.value.forEach(D=>{D.filteredValue&&D.filteredValue.length&&a.store.commit("filterChange",{column:D,values:D.filteredValue,silent:!0})}),a.$ready=!0});const x=(F,B)=>{if(!F)return;const D=Array.from(F.classList).filter(R=>!R.startsWith("is-scrolling-"));D.push(t.scrollX.value?B:"is-scrolling-none"),F.className=D.join(" ")},$=F=>{const{tableWrapper:B}=a.refs;x(B,F)},w=F=>{const{tableWrapper:B}=a.refs;return!!(B&&B.classList.contains(F))},T=function(){if(!a.refs.scrollBarRef)return;if(!t.scrollX.value){const W="is-scrolling-none";w(W)||$(W);return}const F=a.refs.scrollBarRef.wrapRef;if(!F)return;const{scrollLeft:B,offsetWidth:D,scrollWidth:R}=F,{headerWrapper:z,footerWrapper:L}=a.refs;z&&(z.scrollLeft=B),L&&(L.scrollLeft=B),B>=R-D-1?$("is-scrolling-right"):$(B===0?"is-scrolling-left":"is-scrolling-middle")},M=()=>{a.refs.scrollBarRef&&(a.refs.scrollBarRef.wrapRef&&Ht(a.refs.scrollBarRef.wrapRef,"scroll",T,{passive:!0}),e.fit?on(a.vnode.el,I):Ht(window,"resize",I),on(a.refs.tableInnerWrapper,()=>{var F,B;I(),(B=(F=a.refs)==null?void 0:F.scrollBarRef)==null||B.update()}))},I=()=>{var J,Z,Q,ee;const F=a.vnode.el;if(!a.$ready||!F)return;let B=!1;const{width:D,height:R,headerHeight:z}=u.value,L=f.value=F.offsetWidth;D!==L&&(B=!0);const W=F.offsetHeight;(e.height||k.value)&&R!==W&&(B=!0);const Y=e.tableLayout==="fixed"?a.refs.headerWrapper:(J=a.refs.tableHeaderRef)==null?void 0:J.$el;e.showHeader&&(Y==null?void 0:Y.offsetHeight)!==z&&(B=!0),p.value=((Z=a.refs.tableWrapper)==null?void 0:Z.scrollHeight)||0,m.value=(Y==null?void 0:Y.scrollHeight)||0,v.value=((Q=a.refs.footerWrapper)==null?void 0:Q.offsetHeight)||0,h.value=((ee=a.refs.appendWrapper)==null?void 0:ee.offsetHeight)||0,g.value=p.value-m.value-v.value-h.value,B&&(u.value={width:L,height:W,headerHeight:e.showHeader&&(Y==null?void 0:Y.offsetHeight)||0},E())},N=$n(),A=C(()=>{const{bodyWidth:F,scrollY:B,gutterWidth:D}=t;return F.value?`${F.value-(B.value?D:0)}px`:""}),j=C(()=>e.maxHeight?"fixed":e.tableLayout);return{isHidden:l,renderExpanded:o,setDragVisible:i,isGroup:c,handleMouseLeave:b,handleHeaderFooterMousewheel:y,tableSize:N,emptyBlockStyle:C(()=>{if(e.data&&e.data.length)return;let F="100%";e.height&&g.value&&(F=`${g.value}px`);const B=f.value;return{width:B?`${B}px`:"",height:F}}),resizeProxyVisible:s,bodyWidth:A,resizeState:u,doLayout:E,tableBodyStyles:S,tableLayout:j,scrollbarViewStyle:d,scrollbarStyle:C(()=>e.height?{height:"100%"}:e.maxHeight?Number.isNaN(Number(e.maxHeight))?{maxHeight:`calc(${e.maxHeight} - ${m.value+v.value}px)`}:{maxHeight:`${+e.maxHeight-m.value-v.value}px`}:{})}}function Fq(e){let t;const n=()=>{const a=e.vnode.el.querySelector(".hidden-columns"),l={childList:!0,subtree:!0},o=e.store.states.updateOrderFns;t=new MutationObserver(()=>{o.forEach(s=>s())}),t.observe(a,l)};mt(()=>{n()}),Qi(()=>{t==null||t.disconnect()})}function hc(e){const t=e.tableLayout==="auto";let n=e.columns||[];t&&n.every(({width:l})=>xt(l))&&(n=[]);const a=l=>{const o={key:`${e.tableLayout}_${l.id}`,style:{},name:void 0};return t?o.style={width:`${l.width}px`}:o.name=l.id,o};return Ge("colgroup",{},n.map(l=>Ge("col",a(l))))}hc.props=["columns","tableLayout"];const zq=()=>{const e=V(),t=(o,s)=>{const i=e.value;i&&i.scrollTo(o,s)},n=(o,s)=>{const i=e.value;i&&He(s)&&["Top","Left"].includes(o)&&i[`setScroll${o}`](s)};return{scrollBarRef:e,scrollTo:t,setScrollTop:o=>n("Top",o),setScrollLeft:o=>n("Left",o)}},Hq=["data-prefix"],Kq={ref:"hiddenColumns",class:"hidden-columns"};var Wq=ue({name:"ElTable",__name:"table",props:X7,emits:["select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-dblclick","cell-contextmenu","cell-click","row-dblclick","row-click","row-contextmenu","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change","scroll"],setup(e,{expose:t}){const n=e,{t:a}=St(),l=he("table"),o=mo("table"),s=ht();Tt(fl,s);const i=hq(s,n);s.store=i;const u=new gq({store:s.store,table:s,fit:n.fit,showHeader:n.showHeader});s.layout=u;const c=C(()=>(i.states.data.value||[]).length===0),{setCurrentRow:d,getSelectionRows:f,getHalfSelectionRows:p,toggleRowSelection:g,clearSelection:m,clearFilter:v,toggleAllSelection:h,toggleRowExpansion:b,clearSort:y,sort:k,updateKeyChildren:S}=Dq(i),{isHidden:E,renderExpanded:x,setDragVisible:$,isGroup:w,handleMouseLeave:T,handleHeaderFooterMousewheel:M,tableSize:I,emptyBlockStyle:N,resizeProxyVisible:A,bodyWidth:j,resizeState:F,doLayout:B,tableBodyStyles:D,tableLayout:R,scrollbarViewStyle:z,scrollbarStyle:L}=Bq(n,u,i,s),{scrollBarRef:W,scrollTo:Y,setScrollLeft:J,setScrollTop:Z}=zq(),Q=Al(B,50),ee=Q7(l.namespace.value),ie=s;s.tableId=ee,s.state={isGroup:w,resizeState:F,doLayout:B,debouncedUpdateLayout:Q};const ve=C(()=>n.sumText??a("el.table.sumText")),pe=C(()=>n.emptyText??a("el.table.emptyText")),re=C(()=>{var ae;return n.tooltipEffect??((ae=o.value)==null?void 0:ae.tooltipEffect)}),_=C(()=>{var ae;return n.tooltipOptions??((ae=o.value)==null?void 0:ae.tooltipOptions)}),U=C(()=>P2(i.states.originColumns.value)[0]);return Fq(s),zt(()=>{Q.cancel()}),t({ns:l,layout:u,store:i,columns:U,handleHeaderFooterMousewheel:M,handleMouseLeave:T,tableId:ee,tableSize:I,isHidden:E,isEmpty:c,renderExpanded:x,resizeProxyVisible:A,resizeState:F,isGroup:w,bodyWidth:j,tableBodyStyles:D,emptyBlockStyle:N,debouncedUpdateLayout:Q,setCurrentRow:d,getSelectionRows:f,getHalfSelectionRows:p,toggleRowSelection:g,clearSelection:m,clearFilter:v,toggleAllSelection:h,toggleRowExpansion:b,clearSort:y,doLayout:B,sort:k,updateKeyChildren:S,t:a,setDragVisible:$,context:ie,computedSumText:ve,computedEmptyText:pe,computedTooltipEffect:re,computedTooltipOptions:_,tableLayout:R,scrollbarViewStyle:z,scrollbarStyle:L,scrollBarRef:W,scrollTo:Y,setScrollLeft:J,setScrollTop:Z,allowDragLastColumn:n.allowDragLastColumn}),(ae,le)=>(O(),H("div",{ref:"tableWrapper",class:P([{[r(l).m("fit")]:e.fit,[r(l).m("striped")]:e.stripe,[r(l).m("border")]:e.border||r(w),[r(l).m("hidden")]:r(E),[r(l).m("group")]:r(w),[r(l).m("fluid-height")]:e.maxHeight,[r(l).m("scrollable-x")]:r(u).scrollX.value,[r(l).m("scrollable-y")]:r(u).scrollY.value,[r(l).m("enable-row-hover")]:!r(i).states.isComplex.value,[r(l).m("enable-row-transition")]:(r(i).states.data.value||[]).length!==0&&(r(i).states.data.value||[]).length<100,"has-footer":e.showSummary},r(l).m(r(I)),e.className,r(l).b(),r(l).m(`layout-${r(R)}`)]),style:je(e.style),"data-prefix":r(l).namespace.value,onMouseleave:le[1]||(le[1]=(...se)=>r(T)&&r(T)(...se))},[K("div",{ref:"tableInnerWrapper",class:P(r(l).e("inner-wrapper"))},[K("div",Kq,[ne(ae.$slots,"default")],512),e.showHeader&&r(R)==="fixed"?ft((O(),H("div",{key:0,ref:"headerWrapper",class:P(r(l).e("header-wrapper"))},[K("table",{ref:"tableHeader",class:P(r(l).e("header")),style:je(r(D)),border:"0",cellpadding:"0",cellspacing:"0"},[q(r(hc),{columns:r(i).states.columns.value,"table-layout":r(R)},null,8,["columns","table-layout"]),q(r(s0),{ref:"tableHeaderRef",border:e.border,"default-sort":e.defaultSort,store:r(i),"append-filter-panel-to":e.appendFilterPanelTo,"allow-drag-last-column":e.allowDragLastColumn,onSetDragVisible:r($)},null,8,["border","default-sort","store","append-filter-panel-to","allow-drag-last-column","onSetDragVisible"])],6)],2)),[[r(vy),r(M)]]):te("v-if",!0),K("div",{ref:"bodyWrapper",class:P(r(l).e("body-wrapper"))},[q(r(il),{ref_key:"scrollBarRef",ref:W,"view-style":r(z),"wrap-style":r(L),always:e.scrollbarAlwaysOn,tabindex:e.scrollbarTabindex,native:e.nativeScrollbar,onScroll:le[0]||(le[0]=se=>ae.$emit("scroll",se))},{default:X(()=>[K("table",{ref:"tableBody",class:P(r(l).e("body")),cellspacing:"0",cellpadding:"0",border:"0",style:je({width:r(j),tableLayout:r(R)})},[q(r(hc),{columns:r(i).states.columns.value,"table-layout":r(R)},null,8,["columns","table-layout"]),e.showHeader&&r(R)==="auto"?(O(),oe(r(s0),{key:0,ref:"tableHeaderRef",class:P(r(l).e("body-header")),border:e.border,"default-sort":e.defaultSort,store:r(i),"append-filter-panel-to":e.appendFilterPanelTo,onSetDragVisible:r($)},null,8,["class","border","default-sort","store","append-filter-panel-to","onSetDragVisible"])):te("v-if",!0),q(r(Aq),{context:r(ie),highlight:e.highlightCurrentRow,"row-class-name":e.rowClassName,"tooltip-effect":re.value,"tooltip-options":_.value,"row-style":e.rowStyle,store:r(i),stripe:e.stripe},null,8,["context","highlight","row-class-name","tooltip-effect","tooltip-options","row-style","store","stripe"]),e.showSummary&&r(R)==="auto"?(O(),oe(r(r0),{key:1,class:P(r(l).e("body-footer")),border:e.border,"default-sort":e.defaultSort,store:r(i),"sum-text":ve.value,"summary-method":e.summaryMethod},null,8,["class","border","default-sort","store","sum-text","summary-method"])):te("v-if",!0)],6),c.value?(O(),H("div",{key:0,ref:"emptyBlock",style:je(r(N)),class:P(r(l).e("empty-block"))},[K("span",{class:P(r(l).e("empty-text"))},[ne(ae.$slots,"empty",{},()=>[st(Se(pe.value),1)])],2)],6)):te("v-if",!0),ae.$slots.append?(O(),H("div",{key:1,ref:"appendWrapper",class:P(r(l).e("append-wrapper"))},[ne(ae.$slots,"append")],2)):te("v-if",!0)]),_:3},8,["view-style","wrap-style","always","tabindex","native"])],2),e.showSummary&&r(R)==="fixed"?ft((O(),H("div",{key:1,ref:"footerWrapper",class:P(r(l).e("footer-wrapper"))},[K("table",{class:P(r(l).e("footer")),cellspacing:"0",cellpadding:"0",border:"0",style:je(r(D))},[q(r(hc),{columns:r(i).states.columns.value,"table-layout":r(R)},null,8,["columns","table-layout"]),q(r(r0),{border:e.border,"default-sort":e.defaultSort,store:r(i),"sum-text":ve.value,"summary-method":e.summaryMethod},null,8,["border","default-sort","store","sum-text","summary-method"])],6)],2)),[[At,!c.value],[r(vy),r(M)]]):te("v-if",!0),e.border||r(w)?(O(),H("div",{key:2,class:P(r(l).e("border-left-patch"))},null,2)):te("v-if",!0)],2),ft(K("div",{ref:"resizeProxy",class:P(r(l).e("column-resize-proxy"))},null,2),[[At,r(A)]])],46,Hq))}}),jq=Wq;const qq={type:{type:String,default:"default"},label:String,className:String,labelClassName:String,property:String,prop:String,width:{type:[String,Number],default:""},minWidth:{type:[String,Number],default:""},renderHeader:Function,sortable:{type:[Boolean,String],default:!1},sortMethod:Function,sortBy:[String,Function,Array],resizable:{type:Boolean,default:!0},columnKey:String,align:String,headerAlign:String,showOverflowTooltip:{type:[Boolean,Object],default:void 0},tooltipFormatter:Function,fixed:[Boolean,String],formatter:Function,selectable:Function,reserveSelection:Boolean,filterMethod:Function,filteredValue:Array,filters:Array,filterPlacement:String,filterMultiple:{type:Boolean,default:!0},filterClassName:String,index:[Number,Function],sortOrders:{type:Array,default:()=>["ascending","descending",null],validator:e=>e.every(t=>["ascending","descending",null].includes(t))}},Yq={selection:"table-column--selection",expand:"table__expand-column"},Uq={default:{order:""},selection:{width:48,minWidth:48,realWidth:48,order:""},expand:{width:48,minWidth:48,realWidth:48,order:""},index:{width:48,minWidth:48,realWidth:48,order:""}},Gq=e=>Yq[e]||"",Xq={selection:{renderHeader({store:e}){function t(){return e.states.data.value&&e.states.data.value.length===0}return Ge(ll,{disabled:t(),size:e.states.tableSize.value,indeterminate:e.states.selection.value.length>0&&!e.states.isAllSelected.value,"onUpdate:modelValue":e.toggleAllSelection??void 0,modelValue:e.states.isAllSelected.value,ariaLabel:e.t("el.table.selectAllLabel")})},renderCell({row:e,column:t,store:n,$index:a}){return Ge(ll,{disabled:t.selectable?!t.selectable.call(null,e,a):!1,size:n.states.tableSize.value,onChange:()=>{n.commit("rowSelectedChanged",e)},onClick:l=>l.stopPropagation(),modelValue:n.isSelected(e),indeterminate:n.getRowIndeterminate(e),ariaLabel:n.t("el.table.selectRowLabel")})},sortable:!1,resizable:!1},index:{renderHeader({column:e}){return e.label||"#"},renderCell({column:e,$index:t}){let n=t+1;const a=e.index;return He(a)?n=t+a:We(a)&&(n=a(t)),Ge("div",{},[n])},sortable:!1},expand:{renderHeader({column:e}){return e.label||""},renderCell({column:e,row:t,store:n,expanded:a,$index:l}){var c,d;const{ns:o}=n,s=[o.e("expand-icon")];!e.renderExpand&&a&&s.push(o.em("expand-icon","expanded"));const i=function(f){f.stopPropagation(),n.toggleRowExpansion(t)},u=((d=(c=n.states.rowExpandable).value)==null?void 0:d.call(c,t,l))??!0;return u||s.push(o.is("disabled")),Ge("button",{type:"button",disabled:!u,"aria-label":n.t(a?"el.table.collapseRowLabel":"el.table.expandRowLabel"),"aria-expanded":a,class:s,onClick:i},{default:()=>e.renderExpand?[e.renderExpand({expanded:a,expandable:u})]:[Ge(Be,null,{default:()=>[Ge(ra)]})]})},sortable:!1,resizable:!1}};function Jq({row:e,column:t,$index:n}){var o;const a=t.property,l=a&&Ro(e,a).value;return t&&t.formatter?t.formatter(e,t,l,n):((o=l==null?void 0:l.toString)==null?void 0:o.call(l))||""}function Zq({row:e,treeNode:t,store:n},a=!1){const{ns:l}=n;if(!t)return a?[Ge("span",{class:l.e("placeholder")})]:null;const o=[],s=function(i){i.stopPropagation(),!t.loading&&n.loadOrToggle(e)};if(t.indent&&o.push(Ge("span",{class:l.e("indent"),style:{"padding-left":`${t.indent}px`}})),Wt(t.expanded)&&!t.noLazyChildren){const i=[l.e("expand-icon"),t.expanded?l.em("expand-icon","expanded"):""];let u=ra;t.loading&&(u=rl),o.push(Ge("button",{type:"button","aria-label":n.t(t.expanded?"el.table.collapseRowLabel":"el.table.expandRowLabel"),"aria-expanded":t.expanded,class:i,onClick:s},{default:()=>[Ge(Be,{class:l.is("loading",t.loading)},{default:()=>[Ge(u)]})]}))}else o.push(Ge("span",{class:l.e("placeholder")}));return o}function i0(e,t){return e.reduce((n,a)=>(n[a]=a,n),t)}function Qq(e,t){const n=ht();return{registerComplexWatchers:()=>{const o=["fixed"],s={realWidth:"width",realMinWidth:"minWidth"},i=i0(o,s);Object.keys(i).forEach(u=>{const c=s[u];Vt(t,c)&&fe(()=>t[c],d=>{let f=d;c==="width"&&u==="realWidth"&&(f=vm(d)),c==="minWidth"&&u==="realMinWidth"&&(f=E2(d)),n.columnConfig.value[c]=f,n.columnConfig.value[u]=f;const p=c==="fixed";e.value.store.scheduleLayout(p)})})},registerNormalWatchers:()=>{const o=["label","filters","filterMultiple","filteredValue","sortable","index","formatter","className","labelClassName","filterClassName","showOverflowTooltip","tooltipFormatter","resizable"],s=["showOverflowTooltip"],i={property:"prop",align:"realAlign",headerAlign:"realHeaderAlign"},u=i0(o,i);Object.keys(u).forEach(d=>{const f=i[d];Vt(t,f)&&fe(()=>t[f],p=>{n.columnConfig.value[d]=p,(d==="filters"||d==="filterMethod")&&(n.columnConfig.value.filterable=!!(n.columnConfig.value.filters||n.columnConfig.value.filterMethod))})}),s.forEach(d=>{Vt(e.value.props,d)&&fe(()=>e.value.props[d],f=>{n.columnConfig.value.type!=="selection"&&xt(t[d])&&(n.columnConfig.value[d]=f)})});const c=mo("table");c.value&&Vt(c.value,"showOverflowTooltip")&&fe(()=>{var d;return(d=c.value)==null?void 0:d.showOverflowTooltip},d=>{n.columnConfig.value.type!=="selection"&&(!xt(t.showOverflowTooltip)||!xt(e.value.props.showOverflowTooltip)||(n.columnConfig.value.showOverflowTooltip=d))})}}}function eY(e,t,n){const a=ht(),l=V(""),o=V(!1),s=V(),i=V(),u=he("table");ia(()=>{s.value=e.align?`is-${e.align}`:null,s.value}),ia(()=>{i.value=e.headerAlign?`is-${e.headerAlign}`:s.value,i.value});const c=C(()=>{let S=a.vnode.vParent||a.parent;for(;S&&!S.tableId&&!S.columnId;)S=S.vnode.vParent||S.parent;return S}),d=C(()=>{const{store:S}=a.parent;if(!S)return!1;const{treeData:E}=S.states,x=E.value;return x&&Object.keys(x).length>0}),f=V(vm(e.width)),p=V(E2(e.minWidth)),g=S=>(f.value&&(S.width=f.value),p.value&&(S.minWidth=p.value),!f.value&&p.value&&(S.width=void 0),S.minWidth||(S.minWidth=80),S.realWidth=Number(xt(S.width)?S.minWidth:S.width),S),m=S=>{const E=S.type,x=Xq[E]||{};Object.keys(x).forEach(w=>{const T=x[w];w!=="className"&&!xt(T)&&(S[w]=T)});const $=Gq(E);if($){const w=`${r(u.namespace)}-${$}`;S.className=S.className?`${S.className} ${w}`:w}return S},v=S=>{me(S)?S.forEach(x=>E(x)):E(S);function E(x){var $;(($=x==null?void 0:x.type)==null?void 0:$.name)==="ElTableColumn"&&(x.vParent=a)}};return{columnId:l,realAlign:s,isSubColumn:o,realHeaderAlign:i,columnOrTableParent:c,setColumnWidth:g,setColumnForcedProps:m,setColumnRenders:S=>{e.renderHeader?Kt("TableColumn","Comparing to render-header, scoped-slot header is easier to use. We recommend users to use scoped-slot header."):S.type!=="selection"&&(S.renderHeader=x=>{if(a.columnConfig.value.label,t.header){const $=t.header(x);if($2($))return Ge(ze,$)}return st(S.label)}),t["filter-icon"]&&(S.renderFilterIcon=x=>ne(t,"filter-icon",x)),t.expand&&(S.renderExpand=x=>ne(t,"expand",x));let E=S.renderCell;return S.type==="expand"?(S.renderCell=x=>Ge("div",{class:"cell"},[E(x)]),n.value.renderExpanded=x=>t.default?t.default(x):t.default):(E=E||Jq,S.renderCell=x=>{let $=null;if(t.default){const A=t.default(x);$=A.some(j=>j.type!==Cn)?A:E(x)}else $=E(x);const{columns:w}=n.value.store.states,T=w.value.findIndex(A=>A.type==="default"),M=d.value&&x.cellIndex===T,I=Zq(x,M),N={class:"cell",style:{}};return S.showOverflowTooltip&&(N.class=`${N.class} ${r(u.namespace)}-tooltip`,N.style={width:`${(x.column.realWidth||Number(x.column.width))-1}px`}),v($),Ge("div",N,[I,$])}),S},getPropsData:(...S)=>S.reduce((E,x)=>(me(x)&&x.forEach($=>{E[$]=e[$]}),E),{}),getColumnElIndex:(S,E)=>Array.prototype.indexOf.call(S,E),updateColumnOrder:()=>{n.value.store.commit("updateColumnOrder",a.columnConfig.value)}}}var tY=ue({name:"ElTableColumn",__name:"index",props:qq,setup(e){const t=e,n=mn(),a=ht(),l=mo("table"),o=V({}),s=C(()=>{let w=a.parent;for(;w&&!w.tableId;)w=w.parent;return w}),{registerNormalWatchers:i,registerComplexWatchers:u}=Qq(s,t),{columnId:c,isSubColumn:d,realHeaderAlign:f,columnOrTableParent:p,setColumnWidth:g,setColumnForcedProps:m,setColumnRenders:v,getPropsData:h,getColumnElIndex:b,realAlign:y,updateColumnOrder:k}=eY(t,n,s),S=p.value,E="tableId"in S?S.tableId:S.columnId;c.value=eq(E),Cd(()=>{var j,F;d.value=s.value!==S;const w=t.type||"default",T=t.sortable===""?!0:t.sortable,M=w==="selection"?!1:xt(t.showOverflowTooltip)?S.props.showOverflowTooltip??((j=l.value)==null?void 0:j.showOverflowTooltip):t.showOverflowTooltip,I=xt(t.tooltipFormatter)?S.props.tooltipFormatter??((F=l.value)==null?void 0:F.tooltipFormatter):t.tooltipFormatter,N={...Uq[w],id:c.value,type:w,property:t.prop||t.property,align:y,headerAlign:f,showOverflowTooltip:M,tooltipFormatter:I,filterable:t.filters||t.filterMethod,filteredValue:[],filterPlacement:"",filterClassName:"",isColumnGroup:!1,isSubColumn:!1,filterOpened:!1,sortable:T,index:t.index,rawColumnKey:a.vnode.key};let A=h(["columnKey","label","className","labelClassName","type","renderHeader","formatter","fixed","resizable"],["sortMethod","sortBy","sortOrders"],["selectable","reserveSelection"],["filterMethod","filters","filterMultiple","filterOpened","filteredValue","filterPlacement","filterClassName"]);A=aq(N,A),A=oq(v,g,m)(A),o.value=A,i(),u()}),mt(()=>{var I,N;const w=p.value,T=d.value?(I=w.vnode.el)==null?void 0:I.children:(N=w.refs.hiddenColumns)==null?void 0:N.children,M=()=>b(T||[],a.vnode.el);o.value.getColumnIndex=M,M()>-1&&s.value.store.commit("insertColumn",o.value,d.value?"columnConfig"in w&&w.columnConfig.value:null,k)});let x=n.header;kd(()=>{n.header!==x&&(x=n.header,oi(o))}),zt(()=>{const w=o.value.getColumnIndex;(w?w():-1)>-1&&s.value.store.commit("removeColumn",o.value,d.value?"columnConfig"in S&&S.columnConfig.value:null,k)}),a.columnId=c.value,a.columnConfig=o;const $=()=>{var w,T;try{const M=(w=n.default)==null?void 0:w.call(n,{row:{},column:{},$index:-1}),I=[];if(me(M))for(const N of M)((T=N.type)==null?void 0:T.name)==="ElTableColumn"||N.shapeFlag&2?I.push(N):N.type===ze&&me(N.children)&&N.children.forEach(A=>{(A==null?void 0:A.patchFlag)!==1024&&!Ve(A==null?void 0:A.children)&&I.push(A)});return Ge("div",I)}catch{return Ge("div",[])}};return(w,T)=>(O(),oe($))}}),nY=tY,aY=nY,I2=aY;const lY=ut(jq,{TableColumn:I2}),oY=un(I2),Ev={asc:"desc",desc:"asc"},Yi=Symbol("placeholder"),R2=String,wu={type:G(Array),required:!0},ym={type:G(Array)},_2={...ym,required:!0},sY=String,u0={type:G(Array),default:()=>dn([])},ss={type:Number,required:!0},A2={type:G([String,Number,Symbol]),default:"id"},c0={type:G(Object)},cs=$e({class:String,columns:wu,columnsStyles:{type:G(Object),required:!0},depth:Number,expandColumnKey:sY,estimatedRowHeight:{...bs.estimatedRowHeight,default:void 0},isScrolling:Boolean,onRowExpand:{type:G(Function)},onRowHover:{type:G(Function)},onRowHeightChange:{type:G(Function)},rowData:{type:G(Object),required:!0},rowEventHandlers:{type:G(Object)},rowIndex:{type:Number,required:!0},rowKey:A2,style:{type:G(Object)}}),sp={type:Number,required:!0},wm=$e({class:String,columns:wu,fixedHeaderData:{type:G(Array)},headerData:{type:G(Array),required:!0},headerHeight:{type:G([Number,Array]),default:50},rowWidth:sp,rowHeight:{type:Number,default:50},height:sp,width:sp}),mc=$e({columns:wu,data:_2,fixedData:ym,estimatedRowHeight:cs.estimatedRowHeight,width:ss,height:ss,headerWidth:ss,headerHeight:wm.headerHeight,bodyWidth:ss,rowHeight:ss,cache:ek.cache,useIsScrolling:Boolean,scrollbarAlwaysOn:bs.scrollbarAlwaysOn,scrollbarStartGap:bs.scrollbarStartGap,scrollbarEndGap:bs.scrollbarEndGap,class:R2,style:c0,containerStyle:c0,getRowHeight:{type:G(Function),required:!0},rowKey:cs.rowKey,onRowsRendered:{type:G(Function)},onScroll:{type:G(Function)}}),rY=$e({cache:mc.cache,estimatedRowHeight:cs.estimatedRowHeight,rowKey:A2,headerClass:{type:G([String,Function])},headerProps:{type:G([Object,Function])},headerCellProps:{type:G([Object,Function])},headerHeight:wm.headerHeight,footerHeight:{type:Number,default:0},rowClass:{type:G([String,Function])},rowProps:{type:G([Object,Function])},rowHeight:{type:Number,default:50},cellProps:{type:G([Object,Function])},columns:wu,data:_2,dataGetter:{type:G(Function)},fixedData:ym,expandColumnKey:cs.expandColumnKey,expandedRowKeys:u0,defaultExpandedRowKeys:u0,class:R2,fixed:Boolean,style:{type:G(Object)},width:ss,height:ss,maxHeight:Number,useIsScrolling:Boolean,indentSize:{type:Number,default:12},iconSize:{type:Number,default:12},hScrollbarSize:bs.hScrollbarSize,vScrollbarSize:bs.vScrollbarSize,scrollbarAlwaysOn:ak.alwaysOn,sortBy:{type:G(Object),default:()=>({})},sortState:{type:G(Object),default:void 0},onColumnSort:{type:G(Function)},onExpandedRowsChange:{type:G(Function)},onEndReached:{type:G(Function)},onRowExpand:cs.onRowExpand,onScroll:mc.onScroll,onRowsRendered:mc.onRowsRendered,rowEventHandlers:cs.rowEventHandlers}),iY=(e,t,n)=>{const a={flexGrow:0,flexShrink:0,...n?{}:{flexGrow:e.flexGrow??0,flexShrink:e.flexShrink??1}},l={...e.style??{},...a,flexBasis:"auto",width:e.width};return t||(e.maxWidth&&(l.maxWidth=e.maxWidth),e.minWidth&&(l.minWidth=e.minWidth)),l};function uY(e,t,n){const a=C(()=>r(t).map((h,b)=>({...h,key:h.key??h.dataKey??b}))),l=C(()=>r(a).filter(h=>!h.hidden)),o=C(()=>r(l).filter(h=>h.fixed==="left"||h.fixed===!0)),s=C(()=>r(l).filter(h=>h.fixed==="right")),i=C(()=>r(l).filter(h=>!h.fixed)),u=C(()=>{const h=[];return r(o).forEach(b=>{h.push({...b,placeholderSign:Yi})}),r(i).forEach(b=>{h.push(b)}),r(s).forEach(b=>{h.push({...b,placeholderSign:Yi})}),h}),c=C(()=>r(o).length||r(s).length),d=C(()=>r(a).reduce((h,b)=>(h[b.key]=iY(b,r(n),e.fixed),h),{})),f=C(()=>r(l).reduce((h,b)=>h+b.width,0)),p=h=>r(a).find(b=>b.key===h),g=h=>r(d)[h],m=(h,b)=>{h.width=b};function v(h){var E;const{key:b}=h.currentTarget.dataset;if(!b)return;const{sortState:y,sortBy:k}=e;let S="asc";rt(y)?S=Ev[y[b]]:S=Ev[k.order],(E=e.onColumnSort)==null||E.call(e,{column:p(b),key:b,order:S})}return{columns:a,columnsStyles:d,columnsTotalWidth:f,fixedColumnsOnLeft:o,fixedColumnsOnRight:s,hasFixedColumns:c,mainColumns:u,normalColumns:i,visibleColumns:l,getColumn:p,getColumnStyle:g,updateColumnWidth:m,onColumnSorted:v}}const cY=(e,{mainTableRef:t,leftTableRef:n,rightTableRef:a,onMaybeEndReached:l})=>{const o=V({scrollLeft:0,scrollTop:0});function s(g){var v,h,b;const{scrollTop:m}=g;(v=t.value)==null||v.scrollTo(g),(h=n.value)==null||h.scrollToTop(m),(b=a.value)==null||b.scrollToTop(m)}function i(g){o.value=g,s(g)}function u(g){o.value.scrollTop=g,s(r(o))}function c(g){var m,v;o.value.scrollLeft=g,(v=(m=t.value)==null?void 0:m.scrollTo)==null||v.call(m,r(o))}function d(g){var m;i(g),(m=e.onScroll)==null||m.call(e,g)}function f({scrollTop:g}){const{scrollTop:m}=r(o);g!==m&&u(g)}function p(g,m="auto"){var v;(v=t.value)==null||v.scrollToRow(g,m)}return fe(()=>r(o).scrollTop,(g,m)=>{g>m&&l()}),{scrollPos:o,scrollTo:i,scrollToLeft:c,scrollToTop:u,scrollToRow:p,onScroll:d,onVerticalScroll:f}},dY=(e,{mainTableRef:t,leftTableRef:n,rightTableRef:a,tableInstance:l,ns:o,isScrolling:s})=>{const i=ht(),{emit:u}=i,c=Et(!1),d=V(e.defaultExpandedRowKeys||[]),f=V(-1),p=Et(null),g=V({}),m=V({}),v=Et({}),h=Et({}),b=Et({}),y=C(()=>He(e.estimatedRowHeight));function k(M){var I;(I=e.onRowsRendered)==null||I.call(e,M),M.rowCacheEnd>r(f)&&(f.value=M.rowCacheEnd)}function S({hovered:M,rowKey:I}){s.value||l.vnode.el.querySelectorAll(`[rowkey="${String(I)}"]`).forEach(N=>{M?N.classList.add(o.is("hovered")):N.classList.remove(o.is("hovered"))})}function E({expanded:M,rowData:I,rowIndex:N,rowKey:A}){var B,D;const j=[...r(d)],F=j.indexOf(A);M?F===-1&&j.push(A):F>-1&&j.splice(F,1),d.value=j,u("update:expandedRowKeys",j),(B=e.onRowExpand)==null||B.call(e,{expanded:M,rowData:I,rowIndex:N,rowKey:A}),(D=e.onExpandedRowsChange)==null||D.call(e,j),l.vnode.el.querySelector(`.${o.is("hovered")}[rowkey="${String(A)}"]`)&&Ae(()=>S({hovered:!0,rowKey:A}))}const x=Al(()=>{var M,I,N,A;c.value=!0,g.value={...r(g),...r(m)},$(r(p),!1),m.value={},p.value=null,(M=t.value)==null||M.forceUpdate(),(I=n.value)==null||I.forceUpdate(),(N=a.value)==null||N.forceUpdate(),(A=i.proxy)==null||A.$forceUpdate(),c.value=!1},0);function $(M,I=!1){r(y)&&[t,n,a].forEach(N=>{const A=r(N);A&&A.resetAfterRowIndex(M,I)})}function w(M,I,N){const A=r(p);(A===null||A>N)&&(p.value=N),m.value[M]=I}function T({rowKey:M,height:I,rowIndex:N},A){A?A==="right"?b.value[M]=I:v.value[M]=I:h.value[M]=I;const j=Math.max(...[v,b,h].map(F=>F.value[M]||0));r(g)[M]!==j&&(w(M,j,N),x())}return{expandedRowKeys:d,lastRenderedRowIndex:f,isDynamic:y,isResetting:c,rowHeights:g,resetAfterIndex:$,onRowExpanded:E,onRowHovered:S,onRowsRendered:k,onRowHeightChange:T}},fY=(e,{expandedRowKeys:t,lastRenderedRowIndex:n,resetAfterIndex:a})=>{const l=V({}),o=C(()=>{const i={},{data:u,rowKey:c}=e,d=r(t);if(!d||!d.length)return u;const f=[],p=new Set;d.forEach(m=>p.add(m));let g=u.slice();for(g.forEach(m=>i[m[c]]=0);g.length>0;){const m=g.shift();f.push(m),p.has(m[c])&&me(m.children)&&m.children.length>0&&(g=[...m.children,...g],m.children.forEach(v=>i[v[c]]=i[m[c]]+1))}return l.value=i,f}),s=C(()=>{const{data:i,expandColumnKey:u}=e;return u?r(o):i});return fe(s,(i,u)=>{i!==u&&(n.value=-1,a(0,!0))}),{data:s,depthMap:l}},pY=(e,t)=>e+t,gc=e=>me(e)?e.reduce(pY,0):e,Os=(e,t,n={})=>We(e)?e(t):e??n,Mo=e=>(["width","maxWidth","minWidth","height"].forEach(t=>{e[t]=fn(e[t])}),e),L2=e=>Jt(e)?t=>Ge(e,t):e,vY=(e,{columnsTotalWidth:t,rowsHeight:n,fixedColumnsOnLeft:a,fixedColumnsOnRight:l})=>{const o=C(()=>{const{fixed:v,width:h,vScrollbarSize:b}=e,y=h-b;return v?Math.max(Math.round(r(t)),y):y}),s=C(()=>{const{height:v=0,maxHeight:h=0,footerHeight:b,hScrollbarSize:y}=e;if(h>0){const k=r(p),S=r(n),E=r(f)+k+S+y;return Math.min(E,h-b)}return v-b}),i=C(()=>{const{maxHeight:v}=e,h=r(s);if(He(v)&&v>0)return h;const b=r(n)+r(f)+r(p);return Math.min(h,b)}),u=v=>v.width,c=C(()=>gc(r(a).map(u))),d=C(()=>gc(r(l).map(u))),f=C(()=>gc(e.headerHeight)),p=C(()=>{var v;return(((v=e.fixedData)==null?void 0:v.length)||0)*e.rowHeight}),g=C(()=>r(s)-r(f)-r(p)),m=C(()=>{const{style:v={},height:h,width:b}=e;return Mo({...v,height:h,width:b})});return{bodyWidth:o,fixedTableHeight:i,mainTableHeight:s,leftTableWidth:c,rightTableWidth:d,windowHeight:g,footerHeight:C(()=>Mo({height:e.footerHeight})),emptyStyle:C(()=>({top:fn(r(f)),bottom:fn(e.footerHeight),width:fn(e.width)})),rootStyle:m,headerHeight:f}};function hY(e){const t=V(),n=V(),a=V(),{columns:l,columnsStyles:o,columnsTotalWidth:s,fixedColumnsOnLeft:i,fixedColumnsOnRight:u,hasFixedColumns:c,mainColumns:d,onColumnSorted:f}=uY(e,Ot(e,"columns"),Ot(e,"fixed")),{scrollTo:p,scrollToLeft:g,scrollToTop:m,scrollToRow:v,onScroll:h,onVerticalScroll:b,scrollPos:y}=cY(e,{mainTableRef:t,leftTableRef:n,rightTableRef:a,onMaybeEndReached:ae}),k=he("table-v2"),S=ht(),E=Et(!1),{expandedRowKeys:x,lastRenderedRowIndex:$,isDynamic:w,isResetting:T,rowHeights:M,resetAfterIndex:I,onRowExpanded:N,onRowHeightChange:A,onRowHovered:j,onRowsRendered:F}=dY(e,{mainTableRef:t,leftTableRef:n,rightTableRef:a,tableInstance:S,ns:k,isScrolling:E}),{data:B,depthMap:D}=fY(e,{expandedRowKeys:x,lastRenderedRowIndex:$,resetAfterIndex:I}),R=C(()=>{const{estimatedRowHeight:le,rowHeight:se}=e,de=r(B);return He(le)?Object.values(r(M)).reduce((be,we)=>be+we,0):de.length*se}),{bodyWidth:z,fixedTableHeight:L,mainTableHeight:W,leftTableWidth:Y,rightTableWidth:J,windowHeight:Z,footerHeight:Q,emptyStyle:ee,rootStyle:ie,headerHeight:ve}=vY(e,{columnsTotalWidth:s,fixedColumnsOnLeft:i,fixedColumnsOnRight:u,rowsHeight:R}),pe=V(),re=C(()=>{const le=r(B).length===0;return me(e.fixedData)?e.fixedData.length===0&&le:le});function _(le){const{estimatedRowHeight:se,rowHeight:de,rowKey:be}=e;return se?r(M)[r(B)[le][be]]||se:de}const U=V(!1);function ae(){const{onEndReached:le}=e;if(!le)return;const{scrollTop:se}=r(y),de=r(R),be=de-(se+r(Z))+e.hScrollbarSize;!U.value&&r($)>=0&&de<=se+r(W)-r(ve)?(U.value=!0,le(be)):U.value=!1}return fe(()=>r(R),()=>U.value=!1),fe(()=>e.expandedRowKeys,le=>x.value=le,{deep:!0}),{columns:l,containerRef:pe,mainTableRef:t,leftTableRef:n,rightTableRef:a,isDynamic:w,isResetting:T,isScrolling:E,hasFixedColumns:c,columnsStyles:o,columnsTotalWidth:s,data:B,expandedRowKeys:x,depthMap:D,fixedColumnsOnLeft:i,fixedColumnsOnRight:u,mainColumns:d,bodyWidth:z,emptyStyle:ee,rootStyle:ie,footerHeight:Q,mainTableHeight:W,fixedTableHeight:L,leftTableWidth:Y,rightTableWidth:J,showEmpty:re,getRowHeight:_,onColumnSorted:f,onRowHovered:j,onRowExpanded:N,onRowsRendered:F,onRowHeightChange:A,scrollTo:p,scrollToLeft:g,scrollToTop:m,scrollToRow:v,onScroll:h,onVerticalScroll:b}}const Sm=Symbol("tableV2"),V2="tableV2GridScrollLeft",mY=ue({name:"ElTableV2Header",props:wm,setup(e,{slots:t,expose:n}){const a=he("table-v2"),l=Fe(V2),o=V(),s=C(()=>Mo({width:e.width,height:e.height})),i=C(()=>Mo({width:e.rowWidth,height:e.height})),u=C(()=>Vn(r(e.headerHeight))),c=p=>{const g=r(o);Ae(()=>{g!=null&&g.scroll&&g.scroll({left:p})})},d=()=>{const p=a.e("fixed-header-row"),{columns:g,fixedHeaderData:m,rowHeight:v}=e;return m==null?void 0:m.map((h,b)=>{var k;const y=Mo({height:v,width:"100%"});return(k=t.fixed)==null?void 0:k.call(t,{class:p,columns:g,rowData:h,rowIndex:-(b+1),style:y})})},f=()=>{const p=a.e("dynamic-header-row"),{columns:g}=e;return r(u).map((m,v)=>{var b;const h=Mo({width:"100%",height:m});return(b=t.dynamic)==null?void 0:b.call(t,{class:p,columns:g,headerIndex:v,style:h})})};return Kl(()=>{l!=null&&l.value&&c(l.value)}),n({scrollToLeft:c}),()=>{if(!(e.height<=0))return q("div",{ref:o,class:e.class,style:r(s),role:"rowgroup"},[q("div",{style:r(i),class:a.e("header")},[f(),d()])])}}}),gY="ElTableV2Grid",bY=e=>{const t=V(),n=V(),a=V(0),l=C(()=>{const{data:h,rowHeight:b,estimatedRowHeight:y}=e;if(!y)return h.length*b}),o=C(()=>{const{fixedData:h,rowHeight:b}=e;return((h==null?void 0:h.length)||0)*b}),s=C(()=>gc(e.headerHeight)),i=C(()=>{const{height:h}=e;return Math.max(0,h-r(s)-r(o))}),u=C(()=>r(s)+r(o)>0),c=({data:h,rowIndex:b})=>h[b][e.rowKey];function d({rowCacheStart:h,rowCacheEnd:b,rowVisibleStart:y,rowVisibleEnd:k}){var S;(S=e.onRowsRendered)==null||S.call(e,{rowCacheStart:h,rowCacheEnd:b,rowVisibleStart:y,rowVisibleEnd:k})}function f(h,b){var y;(y=n.value)==null||y.resetAfterRowIndex(h,b)}function p(h,b){const y=r(t),k=r(n);rt(h)?(y==null||y.scrollToLeft(h.scrollLeft),a.value=h.scrollLeft,k==null||k.scrollTo(h)):(y==null||y.scrollToLeft(h),a.value=h,k==null||k.scrollTo({scrollLeft:h,scrollTop:b}))}function g(h){var b;(b=r(n))==null||b.scrollTo({scrollTop:h})}function m(h,b){const y=r(n);if(!y)return;const k=a.value;y.scrollToItem(h,0,b),k&&p({scrollLeft:k})}function v(){var h,b;(h=r(n))==null||h.$forceUpdate(),(b=r(t))==null||b.$forceUpdate()}return fe(()=>e.bodyWidth,()=>{var h;He(e.estimatedRowHeight)&&((h=n.value)==null||h.resetAfter({columnIndex:0},!1))}),{bodyRef:n,forceUpdate:v,fixedRowHeight:o,gridHeight:i,hasHeader:u,headerHeight:s,headerRef:t,totalHeight:l,itemKey:c,onItemRendered:d,resetAfterRowIndex:f,scrollTo:p,scrollToTop:g,scrollToRow:m,scrollLeft:a}},Cm=ue({name:gY,props:mc,setup(e,{slots:t,expose:n}){const{ns:a}=Fe(Sm),{bodyRef:l,fixedRowHeight:o,gridHeight:s,hasHeader:i,headerRef:u,headerHeight:c,totalHeight:d,forceUpdate:f,itemKey:p,onItemRendered:g,resetAfterRowIndex:m,scrollTo:v,scrollToTop:h,scrollToRow:b,scrollLeft:y}=bY(e);Tt(V2,y),Zi(async()=>{var E;await Ae();const S=(E=l.value)==null?void 0:E.states.scrollTop;S&&h(Math.round(S)+1)}),n({forceUpdate:f,totalHeight:d,scrollTo:v,scrollToTop:h,scrollToRow:b,resetAfterRowIndex:m});const k=()=>e.bodyWidth;return()=>{const{cache:S,columns:E,data:x,fixedData:$,useIsScrolling:w,scrollbarAlwaysOn:T,scrollbarEndGap:M,scrollbarStartGap:I,style:N,rowHeight:A,bodyWidth:j,estimatedRowHeight:F,headerWidth:B,height:D,width:R,getRowHeight:z,onScroll:L}=e,W=He(F),Y=W?zB:VB,J=r(c);return q("div",{role:"table",class:[a.e("table"),e.class],style:N},[q(Y,{ref:l,data:x,useIsScrolling:w,itemKey:p,columnCache:0,columnWidth:W?k:j,totalColumn:1,totalRow:x.length,rowCache:S,rowHeight:W?z:A,width:R,height:r(s),class:a.e("body"),role:"rowgroup",scrollbarStartGap:I,scrollbarEndGap:M,scrollbarAlwaysOn:T,onScroll:L,onItemRendered:g,perfMode:!1},{default:Z=>{var ee;const Q=x[Z.rowIndex];return(ee=t.row)==null?void 0:ee.call(t,{...Z,columns:E,rowData:Q})}}),r(i)&&q(mY,{ref:u,class:a.e("header-wrapper"),columns:E,headerData:x,headerHeight:e.headerHeight,fixedHeaderData:$,rowWidth:B,rowHeight:A,width:R,height:Math.min(J+r(o),D)},{dynamic:t.header,fixed:t.row})])}}});function yY(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Jt(e)}const wY=(e,{slots:t})=>{const{mainTableRef:n,...a}=e;return q(Cm,pt({ref:n},a),yY(t)?t:{default:()=>[t]})};function SY(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Jt(e)}const CY=(e,{slots:t})=>{if(!e.columns.length)return;const{leftTableRef:n,...a}=e;return q(Cm,pt({ref:n},a),SY(t)?t:{default:()=>[t]})};function kY(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Jt(e)}const EY=(e,{slots:t})=>{if(!e.columns.length)return;const{rightTableRef:n,...a}=e;return q(Cm,pt({ref:n},a),kY(t)?t:{default:()=>[t]})},xY=e=>{const{isScrolling:t}=Fe(Sm),n=V(!1),a=V(),l=C(()=>He(e.estimatedRowHeight)&&e.rowIndex>=0),o=(u=!1)=>{const c=r(a);if(!c)return;const{columns:d,onRowHeightChange:f,rowKey:p,rowIndex:g,style:m}=e,{height:v}=c.getBoundingClientRect();n.value=!0,Ae(()=>{if(u||v!==Number.parseInt(m.height)){const h=d[0],b=(h==null?void 0:h.placeholderSign)===Yi;f==null||f({rowKey:p,height:v,rowIndex:g},h&&!b&&h.fixed)}})},s=C(()=>{const{rowData:u,rowIndex:c,rowKey:d,onRowHover:f}=e,p=e.rowEventHandlers||{},g={};return Object.entries(p).forEach(([m,v])=>{We(v)&&(g[m]=h=>{v({event:h,rowData:u,rowIndex:c,rowKey:d})})}),f&&[{name:"onMouseleave",hovered:!1},{name:"onMouseenter",hovered:!0}].forEach(({name:m,hovered:v})=>{const h=g[m];g[m]=b=>{f({event:b,hovered:v,rowData:u,rowIndex:c,rowKey:d}),h==null||h(b)}}),g}),i=u=>{const{onRowExpand:c,rowData:d,rowIndex:f,rowKey:p}=e;c==null||c({expanded:u,rowData:d,rowIndex:f,rowKey:p})};return mt(()=>{r(l)&&o(!0)}),{isScrolling:t,measurable:l,measured:n,rowRef:a,eventHandlers:s,onExpand:i}},TY=ue({name:"ElTableV2TableRow",props:cs,setup(e,{expose:t,slots:n,attrs:a}){const{eventHandlers:l,isScrolling:o,measurable:s,measured:i,rowRef:u,onExpand:c}=xY(e);return t({onExpand:c}),()=>{const{columns:d,columnsStyles:f,expandColumnKey:p,depth:g,rowData:m,rowIndex:v,style:h}=e;let b=d.map((y,k)=>{const S=me(m.children)&&m.children.length>0&&y.key===p;return n.cell({column:y,columns:d,columnIndex:k,depth:g,style:f[y.key],rowData:m,rowIndex:v,isScrolling:r(o),expandIconProps:S?{rowData:m,rowIndex:v,onExpand:c}:void 0})});if(n.row&&(b=n.row({cells:b.map(y=>me(y)&&y.length===1?y[0]:y),style:h,columns:d,depth:g,rowData:m,rowIndex:v,isScrolling:r(o)})),r(s)){const{height:y,...k}=h||{},S=r(i);return q("div",pt({ref:u,class:e.class,style:S?h:k,role:"row"},a,r(l)),[b])}return q("div",pt(a,{ref:u,class:e.class,style:h,role:"row"},r(l)),[b])}}});function $Y(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Jt(e)}const OY=(e,{slots:t})=>{const{columns:n,columnsStyles:a,depthMap:l,expandColumnKey:o,expandedRowKeys:s,estimatedRowHeight:i,hasFixedColumns:u,rowData:c,rowIndex:d,style:f,isScrolling:p,rowProps:g,rowClass:m,rowKey:v,rowEventHandlers:h,ns:b,onRowHovered:y,onRowExpanded:k}=e,S=Os(m,{columns:n,rowData:c,rowIndex:d},""),E=Os(g,{columns:n,rowData:c,rowIndex:d}),x=c[v],$=l[x]||0,w=!!o,T=d<0,M=[b.e("row"),S,b.is("expanded",w&&s.includes(x)),b.is("fixed",!$&&T),b.is("customized",!!t.row),{[b.e(`row-depth-${$}`)]:w&&d>=0}],I=u?y:void 0,N={...E,columns:n,columnsStyles:a,class:M,depth:$,expandColumnKey:o,estimatedRowHeight:T?void 0:i,isScrolling:p,rowIndex:d,rowData:c,rowKey:x,rowEventHandlers:h,style:f};return q(TY,pt(N,{onRowExpand:k,onMouseenter:F=>{I==null||I({hovered:!0,rowKey:x,event:F,rowData:c,rowIndex:d})},onMouseleave:F=>{I==null||I({hovered:!1,rowKey:x,event:F,rowData:c,rowIndex:d})},rowkey:x}),$Y(t)?t:{default:()=>[t]})},km=(e,{slots:t})=>{var s;const{cellData:n,style:a}=e,l=((s=n==null?void 0:n.toString)==null?void 0:s.call(n))||"",o=ne(t,"default",e,()=>[l]);return q("div",{class:e.class,title:l,style:a},[o])};km.displayName="ElTableV2Cell";km.inheritAttrs=!1;const D2=e=>{const{expanded:t,expandable:n,onExpand:a,style:l,size:o,ariaLabel:s}=e,i={onClick:n?()=>a(!t):void 0,ariaLabel:s,ariaExpanded:t,class:e.class};return q("button",pt(i,{type:"button"}),[q(Be,{size:o,style:l},{default:()=>[q(ra,null,null)]})])};D2.inheritAttrs=!1;const xv=({columns:e,column:t,columnIndex:n,depth:a,expandIconProps:l,isScrolling:o,rowData:s,rowIndex:i,style:u,expandedRowKeys:c,ns:d,t:f,cellProps:p,expandColumnKey:g,indentSize:m,iconSize:v,rowKey:h},{slots:b})=>{const y=Mo(u);if(t.placeholderSign===Yi)return q("div",{class:d.em("row-cell","placeholder"),style:y},null);const{cellRenderer:k,dataKey:S,dataGetter:E}=t,x=We(E)?E({columns:e,column:t,columnIndex:n,rowData:s,rowIndex:i}):Sn(s,S??""),$=Os(p,{cellData:x,columns:e,column:t,columnIndex:n,rowIndex:i,rowData:s}),w={class:d.e("cell-text"),columns:e,column:t,columnIndex:n,cellData:x,isScrolling:o,rowData:s,rowIndex:i},T=L2(k),M=T?T(w):ne(b,"default",w,()=>[q(km,w,null)]),I=[d.e("row-cell"),t.class,t.align==="center"&&d.is("align-center"),t.align==="right"&&d.is("align-right")],N=i>=0&&g&&t.key===g,A=i>=0&&c.includes(s[h]);let j;const F=`margin-inline-start: ${a*m}px;`;return N&&(rt(l)?j=q(D2,pt(l,{class:[d.e("expand-icon"),d.is("expanded",A)],size:v,expanded:A,ariaLabel:f(A?"el.table.collapseRowLabel":"el.table.expandRowLabel"),style:F,expandable:!0}),null):j=q("div",{style:[F,`width: ${v}px; height: ${v}px;`].join(" ")},null)),q("div",pt({class:I,style:y},$,{role:"cell"}),[j,M])};xv.inheritAttrs=!1;const NY=$e({class:String,columns:wu,columnsStyles:{type:G(Object),required:!0},headerIndex:Number,style:{type:G(Object)}}),MY=ue({name:"ElTableV2HeaderRow",props:NY,setup(e,{slots:t}){return()=>{const{columns:n,columnsStyles:a,headerIndex:l,style:o}=e;let s=n.map((i,u)=>t.cell({columns:n,column:i,columnIndex:u,headerIndex:l,style:a[i.key]}));return t.header&&(s=t.header({cells:s.map(i=>me(i)&&i.length===1?i[0]:i),columns:n,headerIndex:l})),q("div",{class:e.class,style:o,role:"row"},[s])}}});function PY(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Jt(e)}const IY=({columns:e,columnsStyles:t,headerIndex:n,style:a,headerClass:l,headerProps:o,ns:s},{slots:i})=>{const u={columns:e,headerIndex:n},c=[s.e("header-row"),Os(l,u,""),s.is("customized",!!i.header)],d={...Os(o,u),columnsStyles:t,class:c,columns:e,headerIndex:n,style:a};return q(MY,d,PY(i)?i:{default:()=>[i]})},Em=(e,{slots:t})=>ne(t,"default",e,()=>{var n,a;return[q("div",{class:e.class,title:(n=e.column)==null?void 0:n.title},[(a=e.column)==null?void 0:a.title])]});Em.displayName="ElTableV2HeaderCell";Em.inheritAttrs=!1;const RY=e=>{const{sortOrder:t}=e;return q("button",{type:"button","aria-label":e.ariaLabel,class:e.class},[q(Be,{size:14},{default:()=>[q(t==="asc"?L_:__,null,null)]})])},d0=(e,{slots:t})=>{const{column:n,ns:a,t:l,style:o,onColumnSorted:s}=e,i=Mo(o);if(n.placeholderSign===Yi)return q("div",{class:a.em("header-row-cell","placeholder"),style:i},null);const{headerCellRenderer:u,headerClass:c,sortable:d}=n,f={...e,class:a.e("header-cell-text")},p=L2(u),g=p?p(f):ne(t,"default",f,()=>[q(Em,f,null)]),{sortBy:m,sortState:v,headerCellProps:h}=e;let b,y,k;if(v){const x=v[n.key];b=!!Ev[x],y=b?x:"asc"}else b=n.key===m.key,y=b?m.order:"asc";y==="asc"?k="ascending":y==="desc"?k="descending":k=void 0;const S=[a.e("header-cell"),Os(c,e,""),n.align==="center"&&a.is("align-center"),n.align==="right"&&a.is("align-right"),d&&a.is("sortable")],E={...Os(h,e),onClick:n.sortable?s:void 0,ariaSort:d?k:void 0,class:S,style:i,"data-key":n.key};return q("div",pt(E,{role:"columnheader"}),[g,d&&q(RY,{class:[a.e("sort-icon"),b&&a.is("sorting")],sortOrder:y,ariaLabel:l("el.table.sortLabel",{column:n.title||""})},null)])},B2=(e,{slots:t})=>{var n;return q("div",{class:e.class,style:e.style},[(n=t.default)==null?void 0:n.call(t)])};B2.displayName="ElTableV2Footer";const F2=(e,{slots:t})=>{const n=ne(t,"default",{},()=>[q(d2,null,null)]);return q("div",{class:e.class,style:e.style},[n])};F2.displayName="ElTableV2Empty";const z2=(e,{slots:t})=>{var n;return q("div",{class:e.class,style:e.style},[(n=t.default)==null?void 0:n.call(t)])};z2.displayName="ElTableV2Overlay";function Wr(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Jt(e)}const _Y=ue({name:"ElTableV2",props:rY,slots:Object,setup(e,{slots:t,expose:n}){const a=he("table-v2"),{t:l}=St(),{columnsStyles:o,fixedColumnsOnLeft:s,fixedColumnsOnRight:i,mainColumns:u,mainTableHeight:c,fixedTableHeight:d,leftTableWidth:f,rightTableWidth:p,data:g,depthMap:m,expandedRowKeys:v,hasFixedColumns:h,mainTableRef:b,leftTableRef:y,rightTableRef:k,isDynamic:S,isResetting:E,isScrolling:x,bodyWidth:$,emptyStyle:w,rootStyle:T,footerHeight:M,showEmpty:I,scrollTo:N,scrollToLeft:A,scrollToTop:j,scrollToRow:F,getRowHeight:B,onColumnSorted:D,onRowHeightChange:R,onRowHovered:z,onRowExpanded:L,onRowsRendered:W,onScroll:Y,onVerticalScroll:J}=hY(e);return n({scrollTo:N,scrollToLeft:A,scrollToTop:j,scrollToRow:F}),Tt(Sm,{ns:a,isResetting:E,isScrolling:x}),()=>{const{cache:Z,cellProps:Q,estimatedRowHeight:ee,expandColumnKey:ie,fixedData:ve,headerHeight:pe,headerClass:re,headerProps:_,headerCellProps:U,sortBy:ae,sortState:le,rowHeight:se,rowClass:de,rowEventHandlers:be,rowKey:we,rowProps:Oe,scrollbarAlwaysOn:Ce,indentSize:Pe,iconSize:ge,useIsScrolling:ke,vScrollbarSize:Le,width:qe}=e,lt=r(g),nt={cache:Z,class:a.e("main"),columns:r(u),data:lt,fixedData:ve,estimatedRowHeight:ee,bodyWidth:r($),headerHeight:pe,headerWidth:r($),height:r(c),mainTableRef:b,rowKey:we,rowHeight:se,scrollbarAlwaysOn:Ce,scrollbarStartGap:2,scrollbarEndGap:Le,useIsScrolling:ke,width:qe,getRowHeight:B,onRowsRendered:W,onScroll:Y},Ze=r(f),kt=r(d),Rt={cache:Z,class:a.e("left"),columns:r(s),data:lt,fixedData:ve,estimatedRowHeight:ee,leftTableRef:y,rowHeight:se,bodyWidth:Ze,headerWidth:Ze,headerHeight:pe,height:kt,rowKey:we,scrollbarAlwaysOn:Ce,scrollbarStartGap:2,scrollbarEndGap:Le,useIsScrolling:ke,width:Ze,getRowHeight:B,onScroll:J},Lt=r(p),_t={cache:Z,class:a.e("right"),columns:r(i),data:lt,fixedData:ve,estimatedRowHeight:ee,rightTableRef:k,rowHeight:se,bodyWidth:Lt,headerWidth:Lt,headerHeight:pe,height:kt,rowKey:we,scrollbarAlwaysOn:Ce,scrollbarStartGap:2,scrollbarEndGap:Le,width:Lt,style:`${a.cssVarName("table-scrollbar-size")}: ${Le}px`,useIsScrolling:ke,getRowHeight:B,onScroll:J},jt=r(o),Yt={ns:a,depthMap:r(m),columnsStyles:jt,expandColumnKey:ie,expandedRowKeys:r(v),estimatedRowHeight:ee,hasFixedColumns:r(h),rowProps:Oe,rowClass:de,rowKey:we,rowEventHandlers:be,onRowHovered:z,onRowExpanded:L,onRowHeightChange:R},xe={cellProps:Q,expandColumnKey:ie,indentSize:Pe,iconSize:ge,rowKey:we,expandedRowKeys:r(v),ns:a,t:l},Ee={ns:a,headerClass:re,headerProps:_,columnsStyles:jt},Ke={ns:a,t:l,sortBy:ae,sortState:le,headerCellProps:U,onColumnSorted:D},Xe={row:Ie=>q(OY,pt(Ie,Yt),{row:t.row,cell:Ue=>{let at;return t.cell?q(xv,pt(Ue,xe,{style:jt[Ue.column.key]}),Wr(at=t.cell(Ue))?at:{default:()=>[at]}):q(xv,pt(Ue,xe,{style:jt[Ue.column.key]}),null)}}),header:Ie=>q(IY,pt(Ie,Ee),{header:t.header,cell:Ue=>{let at;return t["header-cell"]?q(d0,pt(Ue,Ke,{style:jt[Ue.column.key]}),Wr(at=t["header-cell"](Ue))?at:{default:()=>[at]}):q(d0,pt(Ue,Ke,{style:jt[Ue.column.key]}),null)}})},Bt=[e.class,a.b(),a.e("root"),a.is("dynamic",r(S))],ce={class:a.e("footer"),style:r(M)};return q("div",{class:Bt,style:r(T)},[q(wY,nt,Wr(Xe)?Xe:{default:()=>[Xe]}),q(CY,Rt,Wr(Xe)?Xe:{default:()=>[Xe]}),q(EY,_t,Wr(Xe)?Xe:{default:()=>[Xe]}),t.footer&&q(B2,ce,{default:t.footer}),r(I)&&q(F2,{class:a.e("empty"),style:r(w)},{default:t.empty}),t.overlay&&q(z2,{class:a.e("overlay")},{default:t.overlay})])}}}),AY=$e({disableWidth:Boolean,disableHeight:Boolean,onResize:{type:G(Function)}}),LY=e=>{const t=V(),n=V(0),a=V(0);let l;return mt(()=>{l=on(t,([o])=>{const{width:s,height:i}=o.contentRect,{paddingLeft:u,paddingRight:c,paddingTop:d,paddingBottom:f}=getComputedStyle(o.target),p=Number.parseInt(u)||0,g=Number.parseInt(c)||0,m=Number.parseInt(d)||0,v=Number.parseInt(f)||0;n.value=s-p-g,a.value=i-m-v}).stop}),zt(()=>{l==null||l()}),fe([n,a],([o,s])=>{var i;(i=e.onResize)==null||i.call(e,{width:o,height:s})}),{sizer:t,width:n,height:a}},VY=ue({name:"ElAutoResizer",props:AY,setup(e,{slots:t}){const n=he("auto-resizer"),{height:a,width:l,sizer:o}=LY(e),s={width:"100%",height:"100%"};return()=>{var i;return q("div",{ref:o,class:n.b(),style:s},[(i=t.default)==null?void 0:i.call(t,{height:a.value,width:l.value})])}}}),DY=ut(_Y),BY=ut(VY),pf=Symbol("tabsRootContextKey"),FY=$e({tabs:{type:G(Array),default:()=>dn([])},tabRefs:{type:G(Object),default:()=>dn({})}}),f0="ElTabBar";var zY=ue({name:f0,__name:"tab-bar",props:FY,setup(e,{expose:t}){const n=e,a=Fe(pf);a||rn(f0,"");const l=he("tabs"),o=V(),s=V(),i=V(!1),u=C(()=>i.value?s.value:{...s.value,transition:"none"}),c=C(()=>{var v;return xt(a.props.defaultValue)||!!((v=s.value)!=null&&v.transform)}),d=()=>{let v=0,h=0;const b=["top","bottom"].includes(a.props.tabPosition)?"width":"height",y=b==="width"?"x":"y",k=y==="x"?"left":"top";return n.tabs.every(S=>{if(xt(S.paneName))return!1;const E=n.tabRefs[S.paneName];if(!E)return!1;if(!S.active)return!0;v=E[`offset${_f(k)}`],h=E[`client${_f(b)}`];const x=window.getComputedStyle(E);return b==="width"&&(h-=Number.parseFloat(x.paddingLeft)+Number.parseFloat(x.paddingRight),v+=Number.parseFloat(x.paddingLeft)),!1}),{[b]:`${h}px`,transform:`translate${_f(y)}(${v}px)`}},f=()=>{s.value=d(),i.value||Wn(()=>Wn(()=>{i.value=!0}))},p=[],g=()=>{p.forEach(v=>v.stop()),p.length=0,Object.values(n.tabRefs).forEach(v=>{p.push(on(v,f))})};fe(()=>n.tabs,async()=>{await Ae(),f(),g()},{immediate:!0});const m=on(o,()=>f());return zt(()=>{p.forEach(v=>v.stop()),p.length=0,m.stop()}),t({ref:o,update:f}),(v,h)=>(O(),H("div",{ref_key:"barRef",ref:o,class:P([r(l).e("active-bar"),r(l).is(r(a).props.tabPosition),r(l).is("hidden",!c.value)]),style:je(u.value)},null,6))}}),HY=zY;const KY=5,WY=({scrollable:e,navOffset:t,navSize:n,navContainerSize:a,isHorizontal:l})=>{const o=V(!1),s=C(()=>Math.max(n.value-a.value,0));let i,u;const c=p=>{if(!e.value||p.touches.length!==1)return;const{clientX:g,clientY:m}=ed(p);i={startX:g,startY:m,startOffset:t.value},u=void 0},d=p=>{if(!i||!e.value)return;if(p.touches.length!==1){f();return}const{clientX:g,clientY:m}=ed(p),v=i.startX-g,h=i.startY-m,b=l.value?v:h,y=l.value?h:v,k=Math.abs(b),S=Math.abs(y);if(qw(u)){if(Math.max(k,S)<=KY)return;u=k>S}if(!u)return;const E=ya(i.startOffset+b,0,s.value);s.value<=0||E===t.value||!p.cancelable||(p.preventDefault(),o.value=!0,t.value=E)},f=()=>{i=void 0,u=void 0,o.value=!1};return{isTouchScrolling:o,handleTouchStart:c,handleTouchMove:d,handleTouchEnd:f}},jY=$e({panes:{type:G(Array),default:()=>dn([])},currentName:{type:[String,Number],default:""},editable:Boolean,type:{type:String,values:["card","border-card",""],default:""},stretch:Boolean,tabindex:{type:[String,Number],default:void 0}}),qY={tabClick:(e,t,n)=>n instanceof Event,tabRemove:(e,t)=>t instanceof Event},p0="ElTabNav",YY=ue({name:p0,props:jY,emits:qY,setup(e,{expose:t,emit:n}){const a=Fe(pf);a||rn(p0,"");const l=he("tabs"),o=oR(),s=iR(),i=V(),u=V(),c=V(),d=V({}),f=V(),p=V(!1),g=V(0),m=V(!1),v=V(!0),h=V(!1),b=Et(),y=C(()=>["top","bottom"].includes(a.props.tabPosition)),k=C(()=>y.value?"width":"height"),S=C(()=>{const ee=k.value==="width"?"X":"Y";return{transition:h.value||A.value?"none":void 0,transform:`translate${ee}(-${g.value}px)`}}),{width:E,height:x}=Ii(i),{width:$,height:w}=Ii(u,{width:0,height:0},{box:"border-box"}),T=C(()=>y.value?E.value:x.value),M=C(()=>y.value?$.value:w.value),{onWheel:I}=ok({atStartEdge:C(()=>g.value<=0),atEndEdge:C(()=>M.value-g.value<=T.value),layout:C(()=>y.value?"horizontal":"vertical")},ee=>{g.value=ya(g.value+ee,0,M.value-T.value)}),N=ee=>{h.value=!0,I(ee),Wn(()=>{h.value=!1})},{isTouchScrolling:A,handleTouchStart:j,handleTouchMove:F,handleTouchEnd:B}=WY({scrollable:p,navOffset:g,navSize:M,navContainerSize:T,isHorizontal:y}),D=()=>{if(!i.value)return;const ee=i.value.getBoundingClientRect()[k.value],ie=g.value;if(!ie)return;const ve=ie>ee?ie-ee:0;g.value=ve},R=()=>{if(!i.value||!u.value)return;const ee=u.value.getBoundingClientRect()[k.value],ie=i.value.getBoundingClientRect()[k.value],ve=g.value;if(!Ml(ee-ve,ie))return;const pe=ee-ve>ie*2?ve+ie:ee-ie;g.value=pe},z=async()=>{const ee=u.value;if(!p.value||!c.value||!i.value||!ee)return;await Ae();const ie=d.value[e.currentName];if(!ie)return;const ve=i.value,pe=ie.getBoundingClientRect(),re=ve.getBoundingClientRect(),_=re.left+1,U=re.right-1,ae=ee.getBoundingClientRect(),le=y.value?ae.width-re.width:ae.height-re.height,se=g.value;let de=se;y.value?(pe.left<_&&(de=se-(_-pe.left)),pe.right>U&&(de=se+pe.right-U)):(pe.topre.bottom&&(de=se+(pe.bottom-re.bottom))),de=Math.max(de,0),g.value=Math.min(de,le)},L=()=>{var pe;if(!u.value||!i.value)return;e.stretch&&((pe=f.value)==null||pe.update());const ee=u.value.getBoundingClientRect()[k.value],ie=i.value.getBoundingClientRect()[k.value],ve=g.value;ie0&&(g.value=0))},W=ee=>{const ie=Gt(ee);let ve=0;switch(ie){case ye.left:case ye.up:ve=-1;break;case ye.right:case ye.down:ve=1;break;default:return}const pe=Array.from(ee.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)"));let re=pe.indexOf(ee.target)+ve;re<0?re=pe.length-1:re>=pe.length&&(re=0),pe[re].focus({preventScroll:!0}),pe[re].click(),Y()},Y=()=>{v.value&&(m.value=!0)},J=()=>m.value=!1,Z=(ee,ie)=>{d.value[ie]=ee},Q=async()=>{var ee;await Ae(),(ee=d.value[e.currentName])==null||ee.focus({preventScroll:!0})};return fe(o,ee=>{ee==="hidden"?v.value=!1:ee==="visible"&&setTimeout(()=>v.value=!0,50)}),fe(s,ee=>{ee?setTimeout(()=>v.value=!0,50):v.value=!1}),on(c,()=>{Wn(L)}),mt(()=>setTimeout(()=>z(),0)),Kl(()=>L()),t({scrollToActiveTab:z,removeFocus:J,focusActiveTab:Q,tabListRef:u,tabBarRef:f,scheduleRender:()=>oi(b)}),()=>{const ee=p.value?[q("span",{class:[l.e("nav-prev"),l.is("disabled",!p.value.prev)],onClick:D},[q(Be,null,{default:()=>[q(ro,null,null)]})]),q("span",{class:[l.e("nav-next"),l.is("disabled",!p.value.next)],onClick:R},[q(Be,null,{default:()=>[q(ra,null,null)]})])]:null,ie=e.panes.map((ve,pe)=>{var be,we;const re=ve.uid,_=ve.props.disabled,U=ve.props.name??ve.index??`${pe}`,ae=!_&&(ve.isClosable||ve.props.closable!==!1&&e.editable);ve.index=`${pe}`;const le=ae?q(Be,{class:"is-icon-close",onClick:Oe=>n("tabRemove",ve,Oe)},{default:()=>[q(Ya,null,null)]}):null,se=((we=(be=ve.slots).label)==null?void 0:we.call(be))||ve.props.label,de=!_&&ve.active?e.tabindex??a.props.tabindex:-1;return q("div",{ref:Oe=>Z(Oe,U),class:[l.e("item"),l.is(a.props.tabPosition),l.is("active",ve.active),l.is("disabled",_),l.is("closable",ae),l.is("focus",m.value)],id:`tab-${U}`,key:`tab-${re}`,"aria-controls":`pane-${U}`,role:"tab","aria-selected":ve.active,tabindex:de,onFocus:()=>Y(),onBlur:()=>J(),onClick:Oe=>{J(),n("tabClick",ve,U,Oe)},onKeydown:Oe=>{const Ce=Gt(Oe);ae&&(Ce===ye.delete||Ce===ye.backspace)&&n("tabRemove",ve,Oe)}},[se,le])});return b.value,q("div",{ref:c,class:[l.e("nav-wrap"),l.is("scrollable",!!p.value),l.is(a.props.tabPosition)]},[ee,q("div",{class:l.e("nav-scroll"),ref:i},[e.panes.length>0?q("div",{class:[l.e("nav"),l.is(a.props.tabPosition),l.is("stretch",e.stretch&&["top","bottom"].includes(a.props.tabPosition))],ref:u,style:S.value,role:"tablist",onKeydown:W,onWheel:N,onTouchstart:j,onTouchmove:F,onTouchend:B,onTouchcancel:B},[e.type?null:q(HY,{ref:f,tabs:[...e.panes],tabRefs:d.value},null),ie]):null])])}}}),UY=$e({type:{type:String,values:["card","border-card",""],default:""},closable:Boolean,addable:Boolean,modelValue:{type:[String,Number]},defaultValue:{type:[String,Number]},editable:Boolean,tabPosition:{type:String,values:["top","right","bottom","left"],default:"top"},beforeLeave:{type:G(Function),default:()=>!0},stretch:Boolean,tabindex:{type:[String,Number],default:0}}),rp=e=>Ve(e)||He(e),GY={[it]:e=>rp(e),tabClick:(e,t)=>t instanceof Event,tabChange:e=>rp(e),edit:(e,t)=>["remove","add"].includes(t),tabRemove:e=>rp(e),tabAdd:()=>!0},XY=ue({name:"ElTabs",props:UY,emits:GY,setup(e,{emit:t,slots:n,expose:a}){const l=he("tabs"),o=C(()=>["left","right"].includes(e.tabPosition)),{children:s,addChild:i,removeChild:u,ChildrenSorter:c}=Jd(ht(),"ElTabPane"),d=V(),f=V((xt(e.modelValue)?e.defaultValue:e.modelValue)??"0"),p=async(y,k=!1)=>{var S,E,x,$;if(!(f.value===y||xt(y)))try{let w;if(e.beforeLeave){const T=e.beforeLeave(y,f.value);w=T instanceof Promise?await T:T}else w=!0;if(w!==!1){const T=(S=s.value.find(M=>M.paneName===f.value))==null?void 0:S.isFocusInsidePane();f.value=y,k&&(t(it,y),t("tabChange",y)),(x=(E=d.value)==null?void 0:E.removeFocus)==null||x.call(E),T&&(($=d.value)==null||$.focusActiveTab())}}catch{}},g=(y,k,S)=>{y.props.disabled||(t("tabClick",y,S),p(k,!0))},m=(y,k)=>{y.props.disabled||xt(y.props.name)||(k.stopPropagation(),t("edit",y.props.name,"remove"),t("tabRemove",y.props.name))},v=()=>{t("edit",void 0,"add"),t("tabAdd")},h=y=>{const k=Gt(y);[ye.enter,ye.numpadEnter].includes(k)&&v()},b=y=>{const k=y.el.firstChild,S=["bottom","right"].includes(e.tabPosition)?y.children[0].el:y.children[1].el;k!==S&&k.before(S)};return fe(()=>e.modelValue,y=>p(y)),fe(f,async()=>{var y;await Ae(),(y=d.value)==null||y.scrollToActiveTab()}),Tt(pf,{props:e,currentName:f,registerPane:i,unregisterPane:u,nav$:d}),a({currentName:f,get tabNavRef(){return _s(d.value,["scheduleRender"])}}),()=>{const y=n["add-icon"],k=e.editable||e.addable?q("div",{class:[l.e("new-tab"),o.value&&l.e("new-tab-vertical")],tabindex:e.tabindex,onClick:v,onKeydown:h},[y?ne(n,"add-icon"):q(Be,{class:l.is("icon-plus")},{default:()=>[q(US,null,null)]})]):null,S=()=>q(YY,{ref:d,currentName:f.value,editable:e.editable,type:e.type,panes:s.value,stretch:e.stretch,onTabClick:g,onTabRemove:m},null),E=q("div",{class:[l.e("header"),o.value&&l.e("header-vertical"),l.is(e.tabPosition)]},[q(c,null,{default:S,$stable:!0}),k]),x=q("div",{class:l.e("content")},[ne(n,"default")]);return q("div",{class:[l.b(),l.m(e.tabPosition),{[l.m("card")]:e.type==="card",[l.m("border-card")]:e.type==="border-card"}],onVnodeMounted:b,onVnodeUpdated:b},[x,E])}}}),JY=$e({label:{type:String,default:""},name:{type:[String,Number]},closable:{type:Boolean,default:void 0},disabled:Boolean,lazy:Boolean}),ZY=["id","aria-hidden","aria-labelledby"],v0="ElTabPane";var QY=ue({name:v0,__name:"tab-pane",props:JY,setup(e){const t=e,n=ht(),a=mn(),l=Fe(pf);l||rn(v0,"usage: ");const o=he("tab-pane"),s=V(),i=V(),u=C(()=>t.closable??l.props.closable),c=C(()=>l.currentName.value===(t.name??i.value)),d=V(c.value),f=C(()=>t.name??i.value),p=C(()=>!t.lazy||d.value||c.value),g=()=>{var v;return(v=s.value)==null?void 0:v.contains(document.activeElement)};fe(c,v=>{v&&(d.value=!0)});const m=Ft({uid:n.uid,getVnode:()=>n.vnode,slots:a,props:t,paneName:f,active:c,index:i,isClosable:u,isFocusInsidePane:g});return l.registerPane(m),zt(()=>{l.unregisterPane(m)}),kd(()=>{var v;a.label&&((v=l.nav$.value)==null||v.scheduleRender())}),(v,h)=>p.value?ft((O(),H("div",{key:0,id:`pane-${f.value}`,ref_key:"paneRef",ref:s,class:P(r(o).b()),role:"tabpanel","aria-hidden":!c.value,"aria-labelledby":`tab-${f.value}`},[ne(v.$slots,"default")],10,ZY)),[[At,c.value]]):te("v-if",!0)}}),H2=QY;const eU=ut(XY,{TabPane:H2}),tU=un(H2),nU=$e({type:{type:String,values:["primary","success","info","warning","danger",""],default:""},size:{type:String,values:ul,default:""},truncated:Boolean,lineClamp:{type:[String,Number]},tag:{type:String,default:"span"}});var aU=ue({name:"ElText",__name:"text",props:nU,setup(e,{expose:t}){const n=e,a=V(),l=$n(),o=he("text"),s=C(()=>[o.b(),o.m(n.type),o.m(l.value),o.is("truncated",n.truncated),o.is("line-clamp",!xt(n.lineClamp))]),{width:i,height:u}=Ii(a),c=V(!1);let d;const f=()=>{d&&Ra(d),d=Wn(()=>{var p,g,m,v;if(d=void 0,c.value=!1,n.truncated){const h=(p=a.value)==null?void 0:p.offsetWidth,b=(g=a.value)==null?void 0:g.scrollWidth;h&&b&&b>h&&(c.value=!0)}else if(!xt(n.lineClamp)){const h=(m=a.value)==null?void 0:m.offsetHeight,b=(v=a.value)==null?void 0:v.scrollHeight;h&&b&&b>h&&(c.value=!0)}})};return fe(()=>[i.value,u.value,n.truncated,n.lineClamp],f,{flush:"post"}),$r(a,f,{attributes:!0,attributeFilter:["class","style"],subtree:!0,childList:!0,characterData:!0}),mt(f),zt(()=>{d&&Ra(d)}),t({isTruncated:c}),(p,g)=>{var m;return O(),oe(dt(e.tag),{ref_key:"textRef",ref:a,class:P(s.value),title:p.$attrs.title??(c.value?(m=a.value)==null?void 0:m.textContent:void 0),style:je({"-webkit-line-clamp":e.lineClamp})},{default:X(()=>[ne(p.$slots,"default")]),_:3},8,["class","title","style"])}}}),lU=aU;const xm=ut(lU),K2="09:00",W2="18:00",j2="00:30",oU=$e({format:{type:String,default:"HH:mm"},modelValue:{type:G(String)},disabled:{type:Boolean,default:void 0},editable:{type:Boolean,default:!0},effect:{type:G(String),default:"light"},clearable:{type:Boolean,default:!0},size:In,placeholder:String,start:{type:String,default:K2},end:{type:String,default:W2},step:{type:String,default:j2},minTime:{type:G(String)},maxTime:{type:G(String)},includeEndTime:Boolean,name:String,prefixIcon:{type:G([String,Object]),default:()=>YS},clearIcon:{type:G([String,Object]),default:()=>ql},popperClass:{type:G([String,Array,Object,Boolean]),default:""},popperStyle:{type:G([String,Array,Object,Boolean]),default:void 0},...As}),ys=e=>{const t=(e||"").split(":");if(t.length>=2){let n=Number.parseInt(t[0],10);const a=Number.parseInt(t[1],10);if(Number.isNaN(n)||Number.isNaN(a))return null;const l=e.toUpperCase();return l.includes("AM")&&n===12?n=0:l.includes("PM")&&n!==12&&(n+=12),{hours:n,minutes:a}}return null},sU=e=>!!e&&e.hours>=0&&e.minutes>=0&&!Number.isNaN(e.hours)&&!Number.isNaN(e.minutes),ip=(e,t)=>{const n=ys(e);if(!n)return-1;const a=ys(t);if(!a)return-1;const l=n.minutes+n.hours*60,o=a.minutes+a.hours*60;return l===o?0:l>o?1:-1},h0=e=>`${e}`.padStart(2,"0"),bc=e=>`${h0(e.hours)}:${h0(e.minutes)}`,rU=(e,t)=>{const n=ys(e);if(!n)return"";const a=ys(t);if(!a)return"";const l={hours:n.hours,minutes:n.minutes};return l.minutes+=a.minutes,l.hours+=a.hours,l.hours+=Math.floor(l.minutes/60),l.minutes=l.minutes%60,bc(l)};var iU=ue({name:"ElTimeSelect",__name:"time-select",props:oU,emits:[yt,"blur","focus","clear",it],setup(e,{expose:t}){tt.extend(Gh);const{Option:n}=Ko,a=e,l=he("input"),o=V(),s=sn(),{lang:i}=St(),u=(y,k,S,E=!0)=>{const x=ys(y);return!sU(x)||!E&&x.hours===0&&x.minutes===0?(Kt("ElTimeSelect",`invalid ${k}, fallback to default ${k} (${S}).`),S):bc(x)},c=C(()=>a.modelValue),d=C(()=>u(a.start,"start",K2)),f=C(()=>u(a.end,"end",W2)),p=C(()=>{const y=ys(a.minTime||"");return y?bc(y):null}),g=C(()=>{const y=ys(a.maxTime||"");return y?bc(y):null}),m=C(()=>u(a.step,"step",j2,!1)),v=C(()=>{var E;const y=[],k=(x,$)=>{y.push({value:x,rawValue:$,disabled:ip($,p.value||"-1:-1")<=0||ip($,g.value||"100:100")>=0})};let S=d.value;for(;ip(S,f.value)<=0;)k(tt(S,"HH:mm").locale(i.value).format(a.format),S),S=rU(S,m.value);return a.includeEndTime&&((E=y[y.length-1])==null?void 0:E.rawValue)!==f.value&&k(tt(f.value,"HH:mm").locale(i.value).format(a.format),f.value),y});return t({blur:()=>{var y,k;(k=(y=o.value)==null?void 0:y.blur)==null||k.call(y)},focus:()=>{var y,k;(k=(y=o.value)==null?void 0:y.focus)==null||k.call(y)}}),(y,k)=>(O(),oe(r(Ko),{ref_key:"select",ref:o,name:e.name,"model-value":c.value,disabled:r(s),clearable:e.clearable,"clear-icon":e.clearIcon,size:e.size,effect:e.effect,placeholder:e.placeholder,"default-first-option":"",filterable:e.editable,"empty-values":e.emptyValues,"value-on-clear":e.valueOnClear,"popper-class":e.popperClass,"popper-style":e.popperStyle,"onUpdate:modelValue":k[0]||(k[0]=S=>y.$emit(r("update:modelValue"),S)),onChange:k[1]||(k[1]=S=>y.$emit(r("change"),S)),onBlur:k[2]||(k[2]=S=>y.$emit("blur",S)),onFocus:k[3]||(k[3]=S=>y.$emit("focus",S)),onClear:k[4]||(k[4]=()=>y.$emit("clear"))},{prefix:X(()=>[e.prefixIcon?(O(),oe(r(Be),{key:0,class:P(r(l).e("prefix-icon"))},{default:X(()=>[(O(),oe(dt(e.prefixIcon)))]),_:1},8,["class"])):te("v-if",!0)]),default:X(()=>[(O(!0),H(ze,null,bt(v.value,S=>(O(),oe(r(n),{key:S.value,label:S.value,value:S.value,disabled:S.disabled},null,8,["label","value","disabled"]))),128))]),_:1},8,["name","model-value","disabled","clearable","clear-icon","size","effect","placeholder","filterable","empty-values","value-on-clear","popper-class","popper-style"]))}}),uU=iU;const cU=ut(uU),q2="timeline",dU=$e({mode:{type:String,values:["start","alternate","alternate-reverse","end"],default:"start"},reverse:Boolean}),fU=ue({name:"ElTimeline",props:dU,setup(e,{slots:t}){const n=he("timeline");Tt(q2,{props:e,slots:t});const a=C(()=>[n.b(),n.is(e.mode)]);return()=>{var o;const l=$a(((o=t.default)==null?void 0:o.call(t))??[]);return Ge("ul",{class:a.value},e.reverse?l.reverse():l)}}}),pU=$e({timestamp:{type:String,default:""},hideTimestamp:Boolean,center:Boolean,placement:{type:String,values:["top","bottom"],default:"bottom"},type:{type:String,values:["primary","success","warning","danger","info"],default:""},color:{type:String,default:""},size:{type:String,values:["normal","large"],default:"normal"},icon:{type:Ut},hollow:Boolean});var vU=ue({name:"ElTimelineItem",__name:"timeline-item",props:pU,setup(e){const t=e,{props:n}=Fe(q2),a=he("timeline-item"),l=C(()=>[a.e("node"),a.em("node",t.size||""),a.em("node",t.type||""),a.is("hollow",t.hollow)]),o=C(()=>[a.b(),{[a.e("center")]:t.center},a.is(n.mode)]);return(s,i)=>(O(),H("li",{class:P(o.value)},[K("div",{class:P(r(a).e("tail"))},null,2),s.$slots.dot?te("v-if",!0):(O(),H("div",{key:0,class:P(l.value),style:je({backgroundColor:e.color})},[e.icon?(O(),oe(r(Be),{key:0,class:P(r(a).e("icon"))},{default:X(()=>[(O(),oe(dt(e.icon)))]),_:1},8,["class"])):te("v-if",!0)],6)),s.$slots.dot?(O(),H("div",{key:1,class:P(r(a).e("dot"))},[ne(s.$slots,"dot")],2)):te("v-if",!0),K("div",{class:P(r(a).e("wrapper"))},[!e.hideTimestamp&&e.placement==="top"?(O(),H("div",{key:0,class:P([r(a).e("timestamp"),r(a).is("top")])},Se(e.timestamp),3)):te("v-if",!0),K("div",{class:P(r(a).e("content"))},[ne(s.$slots,"default")],2),!e.hideTimestamp&&e.placement==="bottom"?(O(),H("div",{key:1,class:P([r(a).e("timestamp"),r(a).is("bottom")])},Se(e.timestamp),3)):te("v-if",!0)],2)],2))}}),Y2=vU;const hU=ut(fU,{TimelineItem:Y2}),mU=un(Y2),U2="left-check-change",G2="right-check-change",Eo=$e({data:{type:G(Array),default:()=>[]},titles:{type:G(Array),default:()=>[]},buttonTexts:{type:G(Array),default:()=>[]},filterPlaceholder:String,filterMethod:{type:G(Function)},leftDefaultChecked:{type:G(Array),default:()=>[]},rightDefaultChecked:{type:G(Array),default:()=>[]},renderContent:{type:G(Function)},modelValue:{type:G(Array),default:()=>[]},format:{type:G(Object),default:()=>({})},filterable:Boolean,props:{type:G(Object),default:()=>dn({label:"label",key:"key",disabled:"disabled"})},targetOrder:{type:String,values:["original","push","unshift"],default:"original"},validateEvent:{type:Boolean,default:!0},virtualScroll:Boolean,itemSize:{type:Number,default:30}}),Tv=(e,t)=>[e,t].every(me)||me(e)&&vn(t),gU={[yt]:(e,t,n)=>[e,n].every(me)&&["left","right"].includes(t),[it]:e=>me(e),[U2]:Tv,[G2]:Tv},Su=e=>{const t={label:"label",key:"key",disabled:"disabled"};return C(()=>({...t,...e.props}))},bU=(e,t)=>({onSourceCheckedChange:(l,o)=>{e.leftChecked=l,o&&t(U2,l,o)},onTargetCheckedChange:(l,o)=>{e.rightChecked=l,o&&t(G2,l,o)}}),yU=e=>{const t=Su(e),n=C(()=>e.data.reduce((a,l)=>(a[l[t.value.key]]=l,a),{}));return{sourceData:C(()=>e.data.filter(a=>!e.modelValue.includes(a[t.value.key]))),targetData:C(()=>e.targetOrder==="original"?e.data.filter(a=>e.modelValue.includes(a[t.value.key])):e.modelValue.reduce((a,l)=>{const o=n.value[l];return o&&a.push(o),a},[]))}},wU=(e,t,n)=>{const a=Su(e),l=(i,u,c)=>{n(it,i),n(yt,i,u,c)};return{addToLeft:()=>{const i=e.modelValue.slice();t.rightChecked.forEach(u=>{const c=i.indexOf(u);c>-1&&i.splice(c,1)}),l(i,"left",t.rightChecked)},addToRight:()=>{let i=e.modelValue.slice();const u=e.data.filter(c=>{const d=c[a.value.key];return t.leftChecked.includes(d)&&!e.modelValue.includes(d)}).map(c=>c[a.value.key]);i=e.targetOrder==="unshift"?u.concat(i):i.concat(u),e.targetOrder==="original"&&(i=e.data.filter(c=>i.includes(c[a.value.key])).map(c=>c[a.value.key])),l(i,"right",t.leftChecked)}}},$v="checked-change",SU=$e({data:Eo.data,optionRender:{type:G(Function)},placeholder:String,title:String,filterable:Boolean,format:Eo.format,filterMethod:Eo.filterMethod,defaultChecked:Eo.leftDefaultChecked,props:Eo.props,virtualScroll:Eo.virtualScroll,itemSize:Eo.itemSize}),CU={[$v]:Tv},kU=(e,t,n)=>{const a=Su(e),l=C(()=>e.data.filter(g=>We(e.filterMethod)?e.filterMethod(t.query,g):String(g[a.value.label]||g[a.value.key]).toLowerCase().includes(t.query.toLowerCase()))),o=C(()=>l.value.filter(g=>!g[a.value.disabled])),s=C(()=>{const g=t.checked.length,m=e.data.length,{noChecked:v,hasChecked:h}=e.format;return v&&h?g>0?h.replace(/\${checked}/g,g.toString()).replace(/\${total}/g,m.toString()):v.replace(/\${total}/g,m.toString()):`${g}/${m}`}),i=C(()=>{const g=t.checked.length;return g>0&&g{const g=o.value.map(m=>m[a.value.key]);t.allChecked=g.length>0&&g.every(m=>t.checked.includes(m))},c=g=>{t.checked=g?o.value.map(m=>m[a.value.key]):[]},d=V(),{height:f}=Ii(C(()=>{var g;return(g=d.value)==null?void 0:g.$el})),p=V();return fe(()=>t.checked,(g,m)=>{if(u(),t.checkChangeByUser){const v=g.concat(m).filter(h=>!g.includes(h)||!m.includes(h));n($v,g,v)}else n($v,g),t.checkChangeByUser=!0}),fe(o,()=>{u()}),fe(()=>e.data,()=>{const g=[],m=l.value.map(v=>v[a.value.key]);t.checked.forEach(v=>{m.includes(v)&&g.push(v)}),t.checkChangeByUser=!1,t.checked=g}),fe(()=>e.defaultChecked,(g,m)=>{if(m&&g.length===m.length&&g.every(b=>m.includes(b)))return;const v=[],h=o.value.map(b=>b[a.value.key]);g.forEach(b=>{h.includes(b)&&v.push(b)}),t.checkChangeByUser=!1,t.checked=v},{immediate:!0}),fe(()=>t.query,()=>{var g;e.virtualScroll&&((g=p.value)==null||g.scrollToItem(0))},{flush:"post"}),{filteredData:l,checkableData:o,checkedSummary:s,virtualListRef:p,isIndeterminate:i,checkboxGroupRef:d,virtualListHeight:f,updateAllChecked:u,handleAllCheckedChange:c}};var EU=ue({name:"ElTransferPanel",__name:"transfer-panel",props:SU,emits:CU,setup(e,{expose:t,emit:n}){const a=e,l=n,o=mn(),s=({option:$})=>$,{t:i}=St(),u=he("transfer"),c=Ft({checked:[],allChecked:!1,query:"",checkChangeByUser:!0}),d=Su(a),{filteredData:f,checkedSummary:p,virtualListRef:g,isIndeterminate:m,checkboxGroupRef:v,virtualListHeight:h,handleAllCheckedChange:b}=kU(a,c,l),y=C(()=>!pa(c.query)&&pa(f.value)),k=C(()=>!pa(o.default()[0].children)),{checked:S,allChecked:E,query:x}=Fn(c);return t({query:x}),($,w)=>(O(),H("div",{class:P(r(u).b("panel"))},[K("p",{class:P(r(u).be("panel","header"))},[q(r(ll),{modelValue:r(E),"onUpdate:modelValue":w[0]||(w[0]=T=>Qt(E)?E.value=T:null),indeterminate:r(m),"validate-event":!1,onChange:r(b)},{default:X(()=>[K("span",{class:P(r(u).be("panel","header-title"))},Se(e.title),3),K("span",{class:P(r(u).be("panel","header-count"))},Se(r(p)),3)]),_:1},8,["modelValue","indeterminate","onChange"])],2),K("div",{class:P([r(u).be("panel","body"),r(u).is("with-footer",k.value)])},[e.filterable?(O(),oe(r(Un),{key:0,modelValue:r(x),"onUpdate:modelValue":w[1]||(w[1]=T=>Qt(x)?x.value=T:null),class:P(r(u).be("panel","filter")),size:"default",placeholder:e.placeholder,"prefix-icon":r(I_),clearable:"","validate-event":!1},null,8,["modelValue","class","placeholder","prefix-icon"])):te("v-if",!0),ft(q(r(tm),{ref_key:"checkboxGroupRef",ref:v,modelValue:r(S),"onUpdate:modelValue":w[2]||(w[2]=T=>Qt(S)?S.value=T:null),"validate-event":!1,class:P([r(u).is("filterable",e.filterable),r(u).be("panel","list")])},{default:X(()=>[e.virtualScroll?(O(),oe(r(bu),{key:1,ref_key:"virtualListRef",ref:g,data:r(f),total:r(f).length,"item-size":e.itemSize,height:r(h)},{default:X(({data:T,index:M,style:I})=>[(O(),H("div",{key:T[M][r(d).key],style:je(I)},[q(r(ll),{class:P(r(u).be("panel","item")),value:T[M][r(d).key],disabled:T[M][r(d).disabled],"validate-event":!1},{default:X(()=>{var N;return[q(s,{option:(N=e.optionRender)==null?void 0:N.call(e,T[M])},null,8,["option"])]}),_:2},1032,["class","value","disabled"])],4))]),_:1},8,["data","total","item-size","height"])):(O(!0),H(ze,{key:0},bt(r(f),T=>(O(),oe(r(ll),{key:T[r(d).key],class:P(r(u).be("panel","item")),value:T[r(d).key],disabled:T[r(d).disabled],"validate-event":!1},{default:X(()=>{var M;return[q(s,{option:(M=e.optionRender)==null?void 0:M.call(e,T)},null,8,["option"])]}),_:2},1032,["class","value","disabled"]))),128))]),_:1},8,["modelValue","class"]),[[At,!y.value&&!r(pa)(e.data)]]),ft(K("div",{class:P(r(u).be("panel","empty"))},[ne($.$slots,"empty",{},()=>[st(Se(y.value?r(i)("el.transfer.noMatch"):r(i)("el.transfer.noData")),1)])],2),[[At,y.value||r(pa)(e.data)]])],2),k.value?(O(),H("p",{key:0,class:P(r(u).be("panel","footer"))},[ne($.$slots,"default")],2)):te("v-if",!0)],2))}}),m0=EU;const xU={key:0},TU={key:0};var $U=ue({name:"ElTransfer",__name:"transfer",props:Eo,emits:gU,setup(e,{expose:t,emit:n}){const a=e,l=n,o=mn(),{t:s}=St(),i=he("transfer"),{formItem:u}=Kn(),c=Ft({leftChecked:[],rightChecked:[]}),d=Su(a),{sourceData:f,targetData:p}=yU(a),{onSourceCheckedChange:g,onTargetCheckedChange:m}=bU(c,l),{addToLeft:v,addToRight:h}=wU(a,c,l),b=V(),y=V(),k=T=>{switch(T){case"left":b.value.query="";break;case"right":y.value.query=""}},S=C(()=>a.buttonTexts.length===2),E=C(()=>a.titles[0]||s("el.transfer.titles.0")),x=C(()=>a.titles[1]||s("el.transfer.titles.1")),$=C(()=>a.filterPlaceholder||s("el.transfer.filterPlaceholder"));fe(()=>a.modelValue,()=>{var T;a.validateEvent&&((T=u==null?void 0:u.validate)==null||T.call(u,"change").catch(vt))});const w=C(()=>T=>{var I;if(a.renderContent)return a.renderContent(Ge,T);const M=(((I=o.default)==null?void 0:I.call(o,{option:T}))||[]).filter(N=>N.type!==Cn);return M.length?M:Ge("span",T[d.value.label]||T[d.value.key])});return t({clearQuery:k,leftPanel:b,rightPanel:y}),(T,M)=>(O(),H("div",{class:P(r(i).b())},[q(m0,{ref_key:"leftPanel",ref:b,data:r(f),"option-render":w.value,placeholder:$.value,title:E.value,filterable:e.filterable,format:e.format,"filter-method":e.filterMethod,"default-checked":e.leftDefaultChecked,props:a.props,"virtual-scroll":e.virtualScroll,"item-size":e.itemSize,onCheckedChange:r(g)},{empty:X(()=>[ne(T.$slots,"left-empty")]),default:X(()=>[ne(T.$slots,"left-footer")]),_:3},8,["data","option-render","placeholder","title","filterable","format","filter-method","default-checked","props","virtual-scroll","item-size","onCheckedChange"]),K("div",{class:P(r(i).e("buttons"))},[q(r(Bn),{type:"primary",class:P([r(i).e("button"),r(i).is("with-texts",S.value)]),disabled:r(pa)(c.rightChecked),onClick:r(v)},{default:X(()=>[q(r(Be),null,{default:X(()=>[q(r(ro))]),_:1}),r(xt)(e.buttonTexts[0])?te("v-if",!0):(O(),H("span",xU,Se(e.buttonTexts[0]),1))]),_:1},8,["class","disabled","onClick"]),q(r(Bn),{type:"primary",class:P([r(i).e("button"),r(i).is("with-texts",S.value)]),disabled:r(pa)(c.leftChecked),onClick:r(h)},{default:X(()=>[r(xt)(e.buttonTexts[1])?te("v-if",!0):(O(),H("span",TU,Se(e.buttonTexts[1]),1)),q(r(Be),null,{default:X(()=>[q(r(ra))]),_:1})]),_:1},8,["class","disabled","onClick"])],2),q(m0,{ref_key:"rightPanel",ref:y,data:r(p),"option-render":w.value,placeholder:$.value,filterable:e.filterable,format:e.format,"filter-method":e.filterMethod,title:x.value,"default-checked":e.rightDefaultChecked,props:a.props,"virtual-scroll":e.virtualScroll,"item-size":e.itemSize,onCheckedChange:r(m)},{empty:X(()=>[ne(T.$slots,"right-empty")]),default:X(()=>[ne(T.$slots,"right-footer")]),_:3},8,["data","option-render","placeholder","filterable","format","filter-method","title","default-checked","props","virtual-scroll","item-size","onCheckedChange"])],2))}}),OU=$U;const NU=ut(OU),Tm="RootTree",X2="NodeInstance",g0="TreeNodeMap",J2=$e({data:{type:G(Array),default:()=>[]},emptyText:{type:String},renderAfterExpand:{type:Boolean,default:!0},nodeKey:String,checkStrictly:Boolean,defaultExpandAll:Boolean,expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:Boolean,checkOnClickLeaf:{type:Boolean,default:!0},checkDescendants:Boolean,autoExpandParent:{type:Boolean,default:!0},defaultCheckedKeys:{type:Array},defaultExpandedKeys:{type:Array},currentNodeKey:{type:[String,Number]},renderContent:{type:G(Function)},showCheckbox:Boolean,draggable:Boolean,allowDrag:{type:G(Function)},allowDrop:{type:G(Function)},props:{type:Object,default:()=>({children:"children",label:"label",disabled:"disabled"})},lazy:Boolean,highlightCurrent:Boolean,load:{type:Function},filterNodeMethod:{type:Function},accordion:Boolean,indent:{type:Number,default:18},icon:{type:Ut}}),MU={"check-change":(e,t,n)=>e&&Wt(t)&&Wt(n),"current-change":(e,t)=>!0,"node-click":(e,t,n,a)=>e&&t&&a instanceof Event,"node-contextmenu":(e,t,n,a)=>e instanceof Event&&t&&n,"node-collapse":(e,t,n)=>e&&t,"node-expand":(e,t,n)=>e&&t,check:(e,t)=>e&&t,"node-drag-start":(e,t)=>e&&t,"node-drag-end":(e,t,n,a)=>e&&a,"node-drop":(e,t,n,a)=>e&&t&&a,"node-drag-leave":(e,t,n)=>e&&t&&n,"node-drag-enter":(e,t,n)=>e&&t&&n,"node-drag-over":(e,t,n)=>e&&t&&n},Z2="$treeNodeId",b0=function(e,t){!t||t.$treeNodeId||Object.defineProperty(t,Z2,{value:e.id,enumerable:!1,configurable:!1,writable:!1})},$m=(e,t)=>t==null?void 0:t[e||"$treeNodeId"],Ov=(e,t,n)=>{const a=e.value.currentNode;n();const l=e.value.currentNode;a!==l&&t("current-change",l?l.data:null,l)},Q2=e=>{let t=!0,n=!0,a=!0,l=!0;for(let o=0,s=e.length;o{n.canFocus=t,Nv(n.childNodes,t)})};let PU=0;var Mv=class yc{constructor(t){this.isLeafByUser=void 0,this.isLeaf=void 0,this.isEffectivelyChecked=!1,this.id=PU++,this.text=null,this.checked=!1,this.indeterminate=!1,this.data=null,this.expanded=!1,this.parent=null,this.visible=!0,this.isCurrent=!1,this.canFocus=!1;for(const n in t)Vt(t,n)&&(this[n]=t[n]);this.level=0,this.loaded=!1,this.childNodes=[],this.loading=!1,this.parent&&(this.level=this.parent.level+1)}initialize(){var o;const t=this.store;if(!t)throw new Error("[Node]store is required!");t.registerNode(this);const n=t.props;if(n&&typeof n.isLeaf<"u"){const s=ju(this,"isLeaf");Wt(s)&&(this.isLeafByUser=s)}if(t.lazy!==!0&&this.data?(this.setData(this.data),t.defaultExpandAll&&(this.expanded=!0,this.canFocus=!0)):this.level>0&&t.lazy&&t.defaultExpandAll&&!this.isLeafByUser&&this.expand(),me(this.data)||b0(this,this.data),!this.data)return;const a=t.defaultExpandedKeys,l=t.key;l&&!vn(this.key)&&a&&a.includes(this.key)&&this.expand(null,t.autoExpandParent),l&&t.currentNodeKey!==void 0&&this.key===t.currentNodeKey&&(t.currentNode&&(t.currentNode.isCurrent=!1),t.currentNode=this,t.currentNode.isCurrent=!0),t.lazy&&t._initDefaultCheckedNode(this),this.updateLeafState(),(this.level===1||((o=this.parent)==null?void 0:o.expanded)===!0)&&(this.canFocus=!0)}setData(t){me(t)||b0(this,t),this.data=t,this.childNodes=[];let n;this.level===0&&me(this.data)?n=this.data:n=ju(this,"children")||[];for(let a=0,l=n.length;a-1)return t.childNodes[n+1]}return null}get previousSibling(){const t=this.parent;if(t){const n=t.childNodes.indexOf(this);if(n>-1)return n>0?t.childNodes[n-1]:null}return null}contains(t,n=!0){return(this.childNodes||[]).some(a=>a===t||n&&a.contains(t))}remove(){const t=this.parent;t&&t.removeChild(this)}insertChild(t,n,a){if(!t)throw new Error("InsertChild error: child is required.");if(!(t instanceof yc)){if(!a){const l=this.getChildren(!0);l!=null&&l.includes(t.data)||(xt(n)||n<0?l==null||l.push(t.data):l==null||l.splice(n,0,t.data))}Object.assign(t,{parent:this,store:this.store}),t=Ft(new yc(t)),t instanceof yc&&t.initialize()}t.level=this.level+1,xt(n)||n<0?this.childNodes.push(t):this.childNodes.splice(n,0,t),this.updateLeafState()}insertBefore(t,n){let a;n&&(a=this.childNodes.indexOf(n)),this.insertChild(t,a)}insertAfter(t,n){let a;n&&(a=this.childNodes.indexOf(n),a!==-1&&(a+=1)),this.insertChild(t,a)}removeChild(t){const n=this.getChildren()||[],a=n.indexOf(t.data);a>-1&&n.splice(a,1);const l=this.childNodes.indexOf(t);l>-1&&(this.store&&this.store.deregisterNode(t),t.parent=null,this.childNodes.splice(l,1)),this.updateLeafState()}removeChildByData(t){const n=this.childNodes.find(a=>a.data===t);n&&this.removeChild(n)}expand(t,n){const a=()=>{if(n){let l=this.parent;for(;l&&l.level>0;)l.expanded=!0,l=l.parent}this.expanded=!0,t&&t(),Nv(this.childNodes,!0)};this.shouldLoadData()?this.loadData(l=>{me(l)&&(this.store.checkStrictly||(this.checked?this.setChecked(!0,!0):ei(this)),a())}):a()}doCreateChildren(t,n={}){t.forEach(a=>{this.insertChild(Object.assign({data:a},n),void 0,!0)})}collapse(){this.expanded=!1,Nv(this.childNodes,!1)}shouldLoadData(){return!!(this.store.lazy===!0&&this.store.load&&!this.loaded)}updateLeafState(){if(this.store.lazy===!0&&this.loaded!==!0&&typeof this.isLeafByUser<"u"){this.isLeaf=this.isLeafByUser,this.isEffectivelyChecked=this.isLeaf&&this.disabled;return}const t=this.childNodes;if(!this.store.lazy||this.store.lazy===!0&&this.loaded===!0){this.isLeaf=!t||t.length===0,this.isEffectivelyChecked=this.isLeaf&&this.disabled;return}this.isLeaf=!1}setChecked(t,n,a,l){if(this.indeterminate=t==="half",this.checked=t===!0,this.isEffectivelyChecked=!this.childNodes.length&&(this.disabled||this.checked),this.store.checkStrictly&&!n)return;if(!(this.shouldLoadData()&&!this.store.checkDescendants)){const s=()=>{if(n){const i=this.childNodes;for(let f=0,p=i.length;f{s(),ei(this)},{checked:t!==!1});return}else s()}const o=this.parent;!o||o.level===0||!a&&!this.store.checkStrictly&&ei(o)}getChildren(t=!1){if(this.level===0)return this.data;const n=this.data;if(!n)return null;const a=this.store.props;let l="children";return a&&(l=a.children||"children"),xt(n[l])&&(n[l]=null),t&&!n[l]&&(n[l]=[]),n[l]}updateChildren(){const t=this.getChildren()||[],n=this.childNodes.map(o=>o.data),a={},l=[];t.forEach((o,s)=>{const i=o[Z2];i&&n.some(u=>(u==null?void 0:u.$treeNodeId)===i)?a[i]={index:s,data:o}:l.push({index:s,data:o})}),this.store.lazy||n.forEach(o=>{a[o==null?void 0:o.$treeNodeId]||this.removeChildByData(o)}),l.forEach(({index:o,data:s})=>{this.insertChild({data:s},o)}),this.updateLeafState()}loadData(t,n={}){if(this.store.lazy===!0&&this.store.load&&!this.loaded&&(!this.loading||Object.keys(n).length)){this.loading=!0;const a=o=>{this.childNodes=[],this.doCreateChildren(o,n),this.loaded=!0,this.loading=!1,this.updateLeafState(),t&&t.call(this,o)},l=()=>{this.loading=!1};this.store.load(this,a,l)}else t&&t.call(this)}eachNode(t){const n=[this];for(;n.length;){const a=n.shift();n.unshift(...a.childNodes),t(a)}}reInitChecked(){this.store.checkStrictly||ei(this)}},IU=class{constructor(e){this.lazy=!1,this.checkStrictly=!1,this.autoExpandParent=!1,this.defaultExpandAll=!1,this.checkDescendants=!1,this.currentNode=null,this.currentNodeKey=null;for(const t in e)Vt(e,t)&&(this[t]=e[t]);this.nodesMap={}}initialize(){if(this.root=new Mv({data:this.data,store:this}),this.root.initialize(),this.lazy&&this.load){const e=this.load;e(this.root,t=>{this.root.doCreateChildren(t),this._initDefaultCheckedNodes()},vt)}else this._initDefaultCheckedNodes()}filter(e){const t=this.filterNodeMethod,n=this.lazy,a=async function(l){const o=l.root?l.root.childNodes:l.childNodes;for(const[s,i]of o.entries())i.visible=!!(t!=null&&t.call(i,e,i.data,i)),s%80===0&&s>0&&await Ae(),await a(i);if(!l.visible&&o.length){let s=!0;s=!o.some(i=>i.visible),l.root?l.root.visible=s===!1:l.visible=s===!1}e&&l.visible&&!l.isLeaf&&(!n||l.loaded)&&l.expand()};a(this)}setData(e){e!==this.root.data?(this.nodesMap={},this.root.setData(e),this._initDefaultCheckedNodes(),this.setCurrentNodeKey(this.currentNodeKey)):this.root.updateChildren()}getNode(e){if(e instanceof Mv)return e;const t=rt(e)?$m(this.key,e):e;return this.nodesMap[t]||null}insertBefore(e,t){var a;const n=this.getNode(t);(a=n.parent)==null||a.insertBefore({data:e},n)}insertAfter(e,t){var a;const n=this.getNode(t);(a=n.parent)==null||a.insertAfter({data:e},n)}remove(e){const t=this.getNode(e);t&&t.parent&&(t===this.currentNode&&(this.currentNode=null),t.parent.removeChild(t))}append(e,t){const n=Ta(t)?this.root:this.getNode(t);n&&n.insertChild({data:e})}_initDefaultCheckedNodes(){const e=this.defaultCheckedKeys||[],t=this.nodesMap;e.forEach(n=>{const a=t[n];a&&a.setChecked(!0,!this.checkStrictly)})}_initDefaultCheckedNode(e){const t=this.defaultCheckedKeys||[];!vn(e.key)&&t.includes(e.key)&&e.setChecked(!0,!this.checkStrictly)}setDefaultCheckedKey(e){e!==this.defaultCheckedKeys&&(this.defaultCheckedKeys=e,this._initDefaultCheckedNodes())}registerNode(e){const t=this.key;if(!(!e||!e.data))if(!t)this.nodesMap[e.id]=e;else{const n=e.key;vn(n)||(this.nodesMap[n]=e)}}deregisterNode(e){!this.key||!e||!e.data||(e.childNodes.forEach(t=>{this.deregisterNode(t)}),delete this.nodesMap[e.key])}getCheckedNodes(e=!1,t=!1){const n=[],a=function(l){(l.root?l.root.childNodes:l.childNodes).forEach(o=>{(o.checked||t&&o.indeterminate)&&(!e||e&&o.isLeaf)&&n.push(o.data),a(o)})};return a(this),n}getCheckedKeys(e=!1){return this.getCheckedNodes(e).map(t=>(t||{})[this.key])}getHalfCheckedNodes(){const e=[],t=function(n){(n.root?n.root.childNodes:n.childNodes).forEach(a=>{a.indeterminate&&e.push(a.data),t(a)})};return t(this),e}getHalfCheckedKeys(){return this.getHalfCheckedNodes().map(e=>(e||{})[this.key])}_getAllNodes(){const e=[],t=this.nodesMap;for(const n in t)Vt(t,n)&&e.push(t[n]);return e}updateChildren(e,t){const n=this.nodesMap[e];if(!n)return;const a=n.childNodes;for(let l=a.length-1;l>=0;l--){const o=a[l];this.remove(o.data)}for(let l=0,o=t.length;li.level-u.level),l=Object.create(null),o=Object.keys(n);a.forEach(i=>i.setChecked(!1,!1));const s=i=>{i.childNodes.forEach(u=>{var c;l[u.data[e]]=!0,(c=u.childNodes)!=null&&c.length&&s(u)})};for(let i=0,u=a.length;i{g.isLeaf||g.setChecked(!1,!1,!0),f(g)}),p.reInitChecked()};f(c)}}}setCheckedNodes(e,t=!1){const n=this.key,a={};e.forEach(l=>{a[(l||{})[n]]=!0}),this._setCheckedKeys(n,t,a)}setCheckedKeys(e,t=!1){this.defaultCheckedKeys=e;const n=this.key,a={};e.forEach(l=>{a[l]=!0}),this._setCheckedKeys(n,t,a)}setDefaultExpandedKeys(e){e=e||[],this.defaultExpandedKeys=e,e.forEach(t=>{const n=this.getNode(t);n&&n.expand(null,this.autoExpandParent)})}setChecked(e,t,n){const a=this.getNode(e);a&&a.setChecked(!!t,n)}getCurrentNode(){return this.currentNode}setCurrentNode(e){const t=this.currentNode;t&&(t.isCurrent=!1),this.currentNode=e,this.currentNode.isCurrent=!0}setUserCurrentNode(e,t=!0){var l;const n=e[this.key],a=this.nodesMap[n];this.setCurrentNode(a),t&&this.currentNode&&this.currentNode.level>1&&((l=this.currentNode.parent)==null||l.expand(null,!0))}setCurrentNodeKey(e,t=!0){var a;if(this.currentNodeKey=e,Ta(e)){this.currentNode&&(this.currentNode.isCurrent=!1),this.currentNode=null;return}const n=this.getNode(e);n&&(this.setCurrentNode(n),t&&this.currentNode&&this.currentNode.level>1&&((a=this.currentNode.parent)==null||a.expand(null,!0)))}};function eE(e){const t=Fe(g0,null);let n={treeNodeExpand:a=>{var l;e.node!==a&&((l=e.node)==null||l.collapse())},children:new Set};return t&&t.children.add(n),zt(()=>{t&&t.children.delete(n),n=null}),Tt(g0,n),{broadcastExpanded:a=>{if(e.accordion)for(const l of n.children)l.treeNodeExpand(a)}}}const tE=Symbol("dragEvents");function RU({props:e,ctx:t,el$:n,dropIndicator$:a,store:l}){const o=he("tree"),s=V({showDropIndicator:!1,draggingNode:null,dropNode:null,allowDrop:!0,dropType:null});return Tt(tE,{treeNodeDragStart:({event:d,treeNode:f})=>{if(d.dataTransfer){if(We(e.allowDrag)&&!e.allowDrag(f.node))return d.preventDefault(),!1;d.dataTransfer.effectAllowed="move";try{d.dataTransfer.setData("text/plain","")}catch{}s.value.draggingNode=f,t.emit("node-drag-start",f.node,d)}},treeNodeDragOver:({event:d,treeNode:f})=>{if(!d.dataTransfer)return;const p=f,g=s.value.dropNode;g&&g.node.id!==p.node.id&&sa(g.$el,o.is("drop-inner"));const m=s.value.draggingNode;if(!m||!p)return;let v=!0,h=!0,b=!0,y=!0;We(e.allowDrop)&&(v=e.allowDrop(m.node,p.node,"prev"),y=h=e.allowDrop(m.node,p.node,"inner"),b=e.allowDrop(m.node,p.node,"next")),d.dataTransfer.dropEffect=h||v||b?"move":"none",(v||h||b)&&(g==null?void 0:g.node.id)!==p.node.id&&(g&&t.emit("node-drag-leave",m.node,g.node,d),t.emit("node-drag-enter",m.node,p.node,d)),v||h||b?s.value.dropNode=p:s.value.dropNode=null,p.node.nextSibling===m.node&&(b=!1),p.node.previousSibling===m.node&&(v=!1),p.node.contains(m.node,!1)&&(h=!1),(m.node===p.node||m.node.contains(p.node))&&(v=!1,h=!1,b=!1);const k=p.$el,S=k.querySelector(`.${o.be("node","content")}`).getBoundingClientRect(),E=n.value.getBoundingClientRect(),x=n.value.scrollTop;let $;const w=v?h?.25:b?.45:1:Number.NEGATIVE_INFINITY,T=b?h?.75:v?.55:0:Number.POSITIVE_INFINITY;let M=-9999;const I=d.clientY-S.top;IS.height*T?$="after":h?$="inner":$="none";const N=k.querySelector(`.${o.be("node","expand-icon")}`).getBoundingClientRect(),A=a.value;$==="before"?M=N.top-E.top+x:$==="after"&&(M=N.bottom-E.top+x),A.style.top=`${M}px`,A.style.left=`${N.right-E.left}px`,$==="inner"?Da(k,o.is("drop-inner")):sa(k,o.is("drop-inner")),s.value.showDropIndicator=$==="before"||$==="after",s.value.allowDrop=s.value.showDropIndicator||y,s.value.dropType=$,t.emit("node-drag-over",m.node,p.node,d)},treeNodeDragEnd:d=>{var m,v;const{draggingNode:f,dropType:p,dropNode:g}=s.value;if(d.preventDefault(),d.dataTransfer&&(d.dataTransfer.dropEffect="move"),f!=null&&f.node.data&&g){const h={data:f.node.data};p!=="none"&&f.node.remove(),p==="before"?(m=g.node.parent)==null||m.insertBefore(h,g.node):p==="after"?(v=g.node.parent)==null||v.insertAfter(h,g.node):p==="inner"&&g.node.insertChild(h),p!=="none"&&(l.value.registerNode(h),l.value.key&&f.node.eachNode(b=>{var y;(y=l.value.nodesMap[b.data[l.value.key]])==null||y.setChecked(b.checked,!l.value.checkStrictly)})),sa(g.$el,o.is("drop-inner")),t.emit("node-drag-end",f.node,g.node,p,d),p!=="none"&&t.emit("node-drop",f.node,g.node,p,d)}f&&!g&&t.emit("node-drag-end",f.node,null,p,d),s.value.showDropIndicator=!1,s.value.draggingNode=null,s.value.dropNode=null,s.value.allowDrop=!0}}),{dragState:s}}var _U=ue({name:"ElTreeNodeContent",props:{node:{type:Object,required:!0},renderContent:Function},setup(e){const t=he("tree"),n=Fe(X2),a=Fe(Tm);return()=>{const l=e.node,{data:o,store:s}=l;return e.renderContent?e.renderContent(Ge,{_self:n,node:l,data:o,store:s}):ne(a.ctx.slots,"default",{node:l,data:o},()=>[Ge(xm,{tag:"span",truncated:!0,class:t.be("node","label")},()=>[l.label])])}}}),AU=_U,LU=ue({name:"ElTreeNode",components:{ElCollapseTransition:of,ElCheckbox:ll,NodeContent:AU,ElIcon:Be,Loading:rl},props:{node:{type:Mv,default:()=>({})},props:{type:Object,default:()=>({})},accordion:Boolean,renderContent:Function,renderAfterExpand:Boolean,showCheckbox:Boolean},emits:["node-expand"],setup(e,t){const n=he("tree"),{broadcastExpanded:a}=eE(e),l=Fe(Tm),o=V(!1),s=V(!1),i=V(),u=V(),c=V(),d=Fe(tE),f=ht();Tt(X2,f),l||Kt("Tree","Can not find node's tree."),e.node.expanded&&(o.value=!0,s.value=!0);const p=l.props.props.children||"children";fe(()=>{var M;const T=(M=e.node.data)==null?void 0:M[p];return T&&[...T]},()=>{e.node.updateChildren()}),fe(()=>e.node.indeterminate,T=>{v(e.node.checked,T)}),fe(()=>e.node.checked,T=>{v(T,e.node.indeterminate)}),fe(()=>e.node.childNodes.length,()=>e.node.reInitChecked()),fe(()=>e.node.expanded,T=>{Ae(()=>o.value=T),T&&(s.value=!0)});const g=T=>l.props.nodeKey?$m(l.props.nodeKey,T.data):T.id,m=T=>{const M=e.props.class;if(!M)return{};let I;if(We(M)){const{data:N}=T;I=M(N,T)}else I=M;return Ve(I)?{[I]:!0}:I},v=(T,M)=>{(i.value!==T||u.value!==M)&&l.ctx.emit("check-change",e.node.data,T,M),i.value=T,u.value=M},h=T=>{Ov(l.store,l.ctx.emit,()=>{var M;if((M=l==null?void 0:l.props)!=null&&M.nodeKey){const I=g(e.node);l.store.value.setCurrentNodeKey(I)}else l.store.value.setCurrentNode(e.node)}),l.currentNode.value=e.node,l.props.expandOnClickNode&&y(),(l.props.checkOnClickNode||e.node.isLeaf&&l.props.checkOnClickLeaf&&e.showCheckbox)&&!e.node.disabled&&k(!e.node.checked),l.ctx.emit("node-click",e.node.data,e.node,f,T)},b=T=>{var M;(M=l.instance.vnode.props)!=null&&M.onNodeContextmenu&&(T.stopPropagation(),T.preventDefault()),l.ctx.emit("node-contextmenu",T,e.node.data,e.node,f)},y=()=>{e.node.isLeaf||(o.value?(l.ctx.emit("node-collapse",e.node.data,e.node,f),e.node.collapse()):e.node.expand(()=>{t.emit("node-expand",e.node.data,e.node,f)}))},k=T=>{const M=l==null?void 0:l.props.checkStrictly,I=e.node.childNodes;!M&&I.length&&(T=I.some(N=>!N.isEffectivelyChecked)),e.node.setChecked(T,!M),Ae(()=>{const N=l.store.value;l.ctx.emit("check",e.node.data,{checkedNodes:N.getCheckedNodes(),checkedKeys:N.getCheckedKeys(),halfCheckedNodes:N.getHalfCheckedNodes(),halfCheckedKeys:N.getHalfCheckedKeys()})})};return{ns:n,node$:c,tree:l,expanded:o,childNodeRendered:s,oldChecked:i,oldIndeterminate:u,getNodeKey:g,getNodeClass:m,handleSelectChange:v,handleClick:h,handleContextMenu:b,handleExpandIconClick:y,handleCheckChange:k,handleChildNodeExpand:(T,M,I)=>{a(M),l.ctx.emit("node-expand",T,M,I)},handleDragStart:T=>{l.props.draggable&&d.treeNodeDragStart({event:T,treeNode:e})},handleDragOver:T=>{T.preventDefault(),l.props.draggable&&d.treeNodeDragOver({event:T,treeNode:{$el:c.value,node:e.node}})},handleDrop:T=>{T.preventDefault()},handleDragEnd:T=>{l.props.draggable&&d.treeNodeDragEnd(T)},CaretRight:qS}}});const VU=["aria-expanded","aria-disabled","aria-checked","draggable","data-key"],DU=["aria-expanded"];function BU(e,t,n,a,l,o){const s=Pt("el-icon"),i=Pt("el-checkbox"),u=Pt("loading"),c=Pt("node-content"),d=Pt("el-tree-node"),f=Pt("el-collapse-transition");return ft((O(),H("div",{ref:"node$",class:P([e.ns.b("node"),e.ns.is("expanded",e.expanded),e.ns.is("current",e.node.isCurrent),e.ns.is("hidden",!e.node.visible),e.ns.is("focusable",!e.node.disabled),e.ns.is("checked",!e.node.disabled&&e.node.checked),e.getNodeClass(e.node)]),role:"treeitem",tabindex:"-1","aria-expanded":e.expanded,"aria-disabled":e.node.disabled,"aria-checked":e.node.checked,draggable:e.tree.props.draggable,"data-key":e.getNodeKey(e.node),onClick:t[2]||(t[2]=Je((...p)=>e.handleClick&&e.handleClick(...p),["stop"])),onContextmenu:t[3]||(t[3]=(...p)=>e.handleContextMenu&&e.handleContextMenu(...p)),onDragstart:t[4]||(t[4]=Je((...p)=>e.handleDragStart&&e.handleDragStart(...p),["stop"])),onDragover:t[5]||(t[5]=Je((...p)=>e.handleDragOver&&e.handleDragOver(...p),["stop"])),onDragend:t[6]||(t[6]=Je((...p)=>e.handleDragEnd&&e.handleDragEnd(...p),["stop"])),onDrop:t[7]||(t[7]=Je((...p)=>e.handleDrop&&e.handleDrop(...p),["stop"]))},[K("div",{class:P(e.ns.be("node","content")),style:je({paddingLeft:(e.node.level-1)*e.tree.props.indent+"px"})},[e.tree.props.icon||e.CaretRight?(O(),oe(s,{key:0,class:P([e.ns.be("node","expand-icon"),e.ns.is("leaf",e.node.isLeaf),{expanded:!e.node.isLeaf&&e.expanded}]),onClick:Je(e.handleExpandIconClick,["stop"])},{default:X(()=>[(O(),oe(dt(e.tree.props.icon||e.CaretRight)))]),_:1},8,["class","onClick"])):te("v-if",!0),e.showCheckbox?(O(),oe(i,{key:1,"model-value":e.node.checked,indeterminate:e.node.indeterminate,disabled:!!e.node.disabled,onClick:t[0]||(t[0]=Je(()=>{},["stop"])),onChange:e.handleCheckChange},null,8,["model-value","indeterminate","disabled","onChange"])):te("v-if",!0),e.node.loading?(O(),oe(s,{key:2,class:P([e.ns.be("node","loading-icon"),e.ns.is("loading")])},{default:X(()=>[q(u)]),_:1},8,["class"])):te("v-if",!0),q(c,{node:e.node,"render-content":e.renderContent},null,8,["node","render-content"])],6),q(f,null,{default:X(()=>[!e.renderAfterExpand||e.childNodeRendered?ft((O(),H("div",{key:0,class:P(e.ns.be("node","children")),role:"group","aria-expanded":e.expanded,onClick:t[1]||(t[1]=Je(()=>{},["stop"]))},[(O(!0),H(ze,null,bt(e.node.childNodes,p=>(O(),oe(d,{key:e.getNodeKey(p),"render-content":e.renderContent,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,node:p,accordion:e.accordion,props:e.props,onNodeExpand:e.handleChildNodeExpand},null,8,["render-content","render-after-expand","show-checkbox","node","accordion","props","onNodeExpand"]))),128))],10,DU)),[[At,e.expanded]]):te("v-if",!0)]),_:1})],42,VU)),[[At,e.node.visible]])}var FU=Rn(LU,[["render",BU]]);function zU({el$:e},t){const n=he("tree");mt(()=>{o()}),Kl(()=>{var s;(s=e.value)==null||s.querySelectorAll("input[type=checkbox]").forEach(i=>{i.setAttribute("tabindex","-1")})});function a(s,i){var c,d;const u=t.value.getNode(s[i].dataset.key);return u.canFocus&&u.visible&&(((c=u.parent)==null?void 0:c.expanded)||((d=u.parent)==null?void 0:d.level)===0)}Ht(e,"keydown",s=>{const i=s.target;if(!i.className.includes(n.b("node")))return;const u=Gt(s),c=Array.from(e.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`)),d=c.indexOf(i);let f;if([ye.up,ye.down].includes(u)){if(s.preventDefault(),u===ye.up){f=d===-1?0:d!==0?d-1:c.length-1;const g=f;for(;!a(c,f);){if(f--,f===g){f=-1;break}f<0&&(f=c.length-1)}}else{f=d===-1?0:d=c.length&&(f=0)}}f!==-1&&c[f].focus()}[ye.left,ye.right].includes(u)&&(s.preventDefault(),i.click());const p=i.querySelector('[type="checkbox"]');[ye.enter,ye.numpadEnter,ye.space].includes(u)&&p&&(s.preventDefault(),p.click())});const o=()=>{var u;if(!e.value)return;const s=Array.from(e.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`));Array.from(e.value.querySelectorAll("input[type=checkbox]")).forEach(c=>{c.setAttribute("tabindex","-1")});const i=e.value.querySelectorAll(`.${n.is("checked")}[role=treeitem]`);if(i.length){i[0].setAttribute("tabindex","0");return}(u=s[0])==null||u.setAttribute("tabindex","0")}}var HU=ue({name:"ElTree",components:{ElTreeNode:FU},props:J2,emits:MU,setup(e,t){const{t:n}=St(),a=he("tree"),l=V(new IU({key:e.nodeKey,data:e.data,lazy:e.lazy,props:e.props,load:e.load,currentNodeKey:e.currentNodeKey,checkStrictly:e.checkStrictly,checkDescendants:e.checkDescendants,defaultCheckedKeys:e.defaultCheckedKeys,defaultExpandedKeys:e.defaultExpandedKeys,autoExpandParent:e.autoExpandParent,defaultExpandAll:e.defaultExpandAll,filterNodeMethod:e.filterNodeMethod}));l.value.initialize();const o=V(l.value.root),s=V(null),i=V(null),u=V(null),{broadcastExpanded:c}=eE(e),{dragState:d}=RU({props:e,ctx:t,el$:i,dropIndicator$:u,store:l});zU({el$:i},l);const f=ht(),p=C(()=>{let L=f==null?void 0:f.parent;for(;L;){if(L.type.name==="ElTreeSelect")return!0;L=L.parent}return!1}),g=C(()=>{const{childNodes:L}=o.value;return(!L||L.length===0||L.every(({visible:W})=>!W))&&!p.value});fe(()=>e.currentNodeKey,L=>{l.value.setCurrentNodeKey(L??null)}),fe(()=>e.defaultCheckedKeys,(L,W)=>{cn(L,W)||l.value.setDefaultCheckedKey(L??[])}),fe(()=>e.defaultExpandedKeys,L=>{l.value.setDefaultExpandedKeys(L??[])}),fe(()=>e.data,L=>{l.value.setData(L)},{deep:!0}),fe(()=>e.checkStrictly,L=>{l.value.checkStrictly=L});const m=L=>{if(!e.filterNodeMethod)throw new Error("[Tree] filterNodeMethod is required when filter");l.value.filter(L)},v=L=>e.nodeKey?$m(e.nodeKey,L.data):L.id,h=L=>{if(!e.nodeKey)throw new Error(`[Tree] nodeKey is required in ${L}`)},b=L=>{h("getNodePath");const W=l.value.getNode(L);if(!W)return[];const Y=[W.data];let J=W.parent;for(;J&&J!==o.value;)Y.push(J.data),J=J.parent;return Y.reverse()},y=(L,W)=>l.value.getCheckedNodes(L,W),k=L=>l.value.getCheckedKeys(L),S=()=>{const L=l.value.getCurrentNode();return L?L.data:null},E=()=>{h("getCurrentKey");const L=S();return L?L[e.nodeKey]:null},x=(L,W)=>{h("setCheckedNodes"),l.value.setCheckedNodes(L,W)},$=(L,W)=>{h("setCheckedKeys"),l.value.setCheckedKeys(L,W)},w=(L,W,Y=!1)=>{l.value.setChecked(L,W,Y)},T=()=>l.value.getHalfCheckedNodes(),M=()=>l.value.getHalfCheckedKeys(),I=(L,W=!0)=>{h("setCurrentNode"),Ov(l,t.emit,()=>{c(L),l.value.setUserCurrentNode(L,W)})},N=(L=null,W=!0)=>{h("setCurrentKey"),Ov(l,t.emit,()=>{c(),l.value.setCurrentNodeKey(L,W)})},A=L=>l.value.getNode(L),j=L=>{l.value.remove(L)},F=(L,W)=>{l.value.append(L,W)},B=(L,W)=>{l.value.insertBefore(L,W)},D=(L,W)=>{l.value.insertAfter(L,W)},R=(L,W,Y)=>{c(W),t.emit("node-expand",L,W,Y)},z=(L,W)=>{h("updateKeyChildren"),l.value.updateChildren(L,W)};return Tt(Tm,{ctx:t,props:e,store:l,root:o,currentNode:s,instance:f}),Tt(Hl,void 0),{ns:a,store:l,root:o,currentNode:s,dragState:d,el$:i,dropIndicator$:u,isEmpty:g,filter:m,getNodeKey:v,getNodePath:b,getCheckedNodes:y,getCheckedKeys:k,getCurrentNode:S,getCurrentKey:E,setCheckedNodes:x,setCheckedKeys:$,setChecked:w,getHalfCheckedNodes:T,getHalfCheckedKeys:M,setCurrentNode:I,setCurrentKey:N,t:n,getNode:A,remove:j,append:F,insertBefore:B,insertAfter:D,handleNodeExpand:R,updateKeyChildren:z}}});function KU(e,t,n,a,l,o){const s=Pt("el-tree-node");return O(),H("div",{ref:"el$",class:P([e.ns.b(),e.ns.is("dragging",!!e.dragState.draggingNode),e.ns.is("drop-not-allow",!e.dragState.allowDrop),e.ns.is("drop-inner",e.dragState.dropType==="inner"),{[e.ns.m("highlight-current")]:e.highlightCurrent}]),role:"tree"},[(O(!0),H(ze,null,bt(e.root.childNodes,i=>(O(),oe(s,{key:e.getNodeKey(i),node:i,props:e.props,accordion:e.accordion,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,"render-content":e.renderContent,onNodeExpand:e.handleNodeExpand},null,8,["node","props","accordion","render-after-expand","show-checkbox","render-content","onNodeExpand"]))),128)),e.isEmpty?(O(),H("div",{key:0,class:P(e.ns.e("empty-block"))},[ne(e.$slots,"empty",{},()=>[K("span",{class:P(e.ns.e("empty-text"))},Se(e.emptyText??e.t("el.tree.emptyText")),3)])],2)):te("v-if",!0),ft(K("div",{ref:"dropIndicator$",class:P(e.ns.e("drop-indicator"))},null,2),[[At,e.dragState.showDropIndicator]])],2)}var WU=Rn(HU,[["render",KU]]);const Om=ut(WU),jU=(e,{attrs:t,emit:n},{select:a,tree:l,key:o})=>{const s=he("tree-select");fe(()=>e.data,()=>{e.filterable&&Ae(()=>{var u,c;(c=l.value)==null||c.filter((u=a.value)==null?void 0:u.states.inputValue)})},{flush:"post"});const i=u=>{var d,f;const c=u.at(-1);if(c.expanded&&c.childNodes.at(-1))i([c.childNodes.at(-1)]);else{(f=(d=l.value.el$)==null?void 0:d.querySelector(`[data-key="${u.at(-1).key}"]`))==null||f.focus({preventScroll:!0});return}};return mt(()=>{Ht(()=>{var u;return(u=a.value)==null?void 0:u.$el},"keydown",async u=>{const c=Gt(u),{dropdownMenuVisible:d}=a.value;[ye.down,ye.up].includes(c)&&d&&(await Ae(),setTimeout(()=>{var f,p,g;if(ye.up===c){const m=l.value.store.root.childNodes;i(m);return}(g=(p=(f=a.value.optionsArray[a.value.states.hoveringIndex].$el)==null?void 0:f.parentNode)==null?void 0:p.parentNode)==null||g.focus({preventScroll:!0})}))},{capture:!0})}),{...Ll(Fn(e),Object.keys(Ko.props)),...t,class:C(()=>t.class),style:C(()=>t.style),"onUpdate:modelValue":u=>n(it,u),valueKey:o,popperClass:C(()=>[s.e("popper"),e.popperClass]),filterMethod:(u="")=>{var c;e.filterMethod?e.filterMethod(u):e.remoteMethod?e.remoteMethod(u):(c=l.value)==null||c.filter(u)}}},qU=ue({extends:qc,setup(e,t){const n=qc.setup(e,t);delete n.selectOptionClick;const a=ht().proxy;return Ae(()=>{n.select.states.cachedOptions.get(a.value)||n.select.onOptionCreate(a)}),fe(()=>t.attrs.visible,l=>{Ae(()=>{n.states.visible=l})},{immediate:!0}),n},methods:{selectOptionClick(){this.$el.parentElement.click()}}});function Pv(e){return e||e===0}function Nm(e){return me(e)&&e.length}function Ws(e){return me(e)?e:Pv(e)?[e]:[]}function wc(e,t,n,a,l){for(let o=0;o{fe([()=>e.modelValue,o],()=>{e.showCheckbox&&Ae(()=>{const m=o.value;m&&!cn(m.getCheckedKeys(),Ws(e.modelValue))&&m.setCheckedKeys(Ws(e.modelValue))})},{immediate:!0,deep:!0});const i=C(()=>({value:s.value,label:"label",children:"children",disabled:"disabled",isLeaf:"isLeaf",...e.props})),u=(m,v)=>{var b;const h=i.value[m];return We(h)?h(v,(b=o.value)==null?void 0:b.getNode(u("value",v))):v[h]},c=Ws(e.modelValue).map(m=>wc(e.data||[],v=>u("value",v)===m,v=>u("children",v),(v,h,b,y)=>y&&u("value",y))).filter(m=>Pv(m)),d=C(()=>{if(!e.renderAfterExpand&&!e.lazy)return[];const m=[];return Sc(e.data.concat(e.cacheData),v=>{const h=u("value",v);m.push({value:h,currentLabel:u("label",v),isDisabled:u("disabled",v)})},v=>u("children",v)),m}),f=()=>{var m;return(m=o.value)==null?void 0:m.getCheckedKeys().filter(v=>{var b;const h=(b=o.value)==null?void 0:b.getNode(v);return!vn(h)&&pa(h.childNodes)})},p=m=>{cn(e.modelValue,m)||a(yt,m)};function g(m){a(it,m),p(m)}return{...Ll(Fn(e),Object.keys(Om.props)),...t,nodeKey:s,expandOnClickNode:C(()=>!e.checkStrictly&&e.expandOnClickNode),defaultExpandedKeys:C(()=>e.defaultExpandedKeys?e.defaultExpandedKeys.concat(c):c),renderContent:(m,{node:v,data:h,store:b})=>m(qU,{value:u("value",h),label:u("label",h),disabled:u("disabled",h),visible:v.visible},e.renderContent?()=>e.renderContent(m,{node:v,data:h,store:b}):n.default?()=>n.default({node:v,data:h,store:b}):void 0),filterNodeMethod:(m,v,h)=>e.filterNodeMethod?e.filterNodeMethod(m,v,h):m?new RegExp(gh(m),"i").test(u("label",v)||""):!0,onNodeClick:(m,v,h)=>{var b,y,k;if((b=t.onNodeClick)==null||b.call(t,m,v,h),!(e.showCheckbox&&e.checkOnClickNode))if(!e.showCheckbox&&(e.checkStrictly||v.isLeaf)){if(!u("disabled",m)){const S=(y=l.value)==null?void 0:y.states.options.get(u("value",m));(k=l.value)==null||k.handleOptionSelect(S)}}else e.expandOnClickNode&&h.proxy.handleExpandIconClick()},onCheck:(m,v)=>{var E;if(!e.showCheckbox)return;const h=u("value",m),b={};Sc([o.value.store.root],x=>b[x.key]=x,x=>x.childNodes);const y=v.checkedKeys,k=e.multiple?Ws(e.modelValue).filter(x=>!(x in b)&&!y.includes(x)):[],S=k.concat(y);if(e.checkStrictly)g(e.multiple?S:S.includes(h)?h:void 0);else if(e.multiple){const x=f();g(k.concat(x))}else{const x=wc([m],T=>!Nm(u("children",T))&&!u("disabled",T),T=>u("children",T)),$=x?u("value",x):void 0,w=Pv(e.modelValue)&&!!wc([m],T=>u("value",T)===e.modelValue,T=>u("children",T));g($===e.modelValue||w?void 0:$)}Ae(()=>{var $;const x=Ws(e.modelValue);o.value.setCheckedKeys(x),($=t.onCheck)==null||$.call(t,m,{checkedKeys:o.value.getCheckedKeys(),checkedNodes:o.value.getCheckedNodes(),halfCheckedKeys:o.value.getHalfCheckedKeys(),halfCheckedNodes:o.value.getHalfCheckedNodes()})}),(E=l.value)==null||E.focus()},onNodeExpand:(m,v,h)=>{var b;(b=t.onNodeExpand)==null||b.call(t,m,v,h),Ae(()=>{if(!e.checkStrictly&&e.lazy&&e.multiple&&v.checked){const y={},k=o.value.getCheckedKeys();Sc([o.value.store.root],x=>y[x.key]=x,x=>x.childNodes);const S=Ws(e.modelValue).filter(x=>!(x in y)&&!k.includes(x)),E=f();g(S.concat(E))}})},cacheOptions:d}};var UU=ue({props:{data:{type:Array,default:()=>[]}},setup(e){const t=Fe(mu);return fe(()=>e.data,()=>{var a;e.data.forEach(l=>{t.states.cachedOptions.has(l.value)||t.states.cachedOptions.set(l.value,l)});const n=((a=t.selectRef)==null?void 0:a.querySelectorAll("input"))||[];It&&!Array.from(n).includes(document.activeElement)&&t.setSelected()},{flush:"post",immediate:!0}),()=>{}}}),GU=ue({name:"ElTreeSelect",inheritAttrs:!1,props:{...qC,...J2,cacheData:{type:Array,default:()=>[]}},setup(e,t){const{slots:n,expose:a,emit:l,attrs:o}=t,s={...o,onChange:void 0},i=V(),u=V(),c=C(()=>e.nodeKey||e.valueKey||"value"),d=jU(e,{attrs:o,emit:l},{select:i,tree:u,key:c}),{cacheOptions:f,...p}=YU(e,{attrs:s,slots:n,emit:l},{select:i,tree:u,key:c}),g=Ft({});return a(g),mt(()=>{Object.assign(g,{...Ll(u.value,["filter","updateKeyChildren","getCheckedNodes","setCheckedNodes","getCheckedKeys","setCheckedKeys","setChecked","getHalfCheckedNodes","getHalfCheckedKeys","getCurrentKey","getCurrentNode","setCurrentKey","setCurrentNode","getNode","remove","append","insertBefore","insertAfter"]),...Ll(i.value,["focus","blur","selectedLabel"]),treeRef:u.value,selectRef:i.value})}),()=>Ge(Ko,Ft({...d,ref:m=>i.value=m}),{...n,default:()=>[Ge(UU,{data:f.value}),Ge(Om,Ft({...p,ref:m=>u.value=m}))]})}}),XU=GU;const JU=ut(XU),Mm=Symbol(),ZU={key:-1,level:-1,data:{}},nE={type:Number,default:26},QU=$e({data:{type:G(Array),default:()=>dn([])},emptyText:{type:String},height:{type:Number,default:200},props:{type:G(Object),default:()=>dn({children:"children",label:"label",disabled:"disabled",value:"id",class:""})},highlightCurrent:Boolean,showCheckbox:Boolean,defaultCheckedKeys:{type:G(Array),default:()=>dn([])},checkStrictly:Boolean,defaultExpandedKeys:{type:G(Array),default:()=>dn([])},indent:{type:Number,default:16},itemSize:nE,icon:{type:Ut},expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:Boolean,checkOnClickLeaf:{type:Boolean,default:!0},currentNodeKey:{type:G([String,Number])},accordion:Boolean,filterMethod:{type:G(Function)},perfMode:{type:Boolean,default:!0},scrollbarAlwaysOn:Boolean}),eG=$e({node:{type:G(Object),default:()=>dn(ZU)},expanded:Boolean,checked:Boolean,indeterminate:Boolean,showCheckbox:Boolean,disabled:Boolean,current:Boolean,hiddenExpandIcon:Boolean,itemSize:nE}),tG=$e({node:{type:G(Object),required:!0}}),aE="node-click",lE="node-drop",oE="node-expand",sE="node-collapse",rE="current-change",iE="check",uE="check-change",cE="node-contextmenu",nG={[aE]:(e,t,n)=>e&&t&&n,[lE]:(e,t,n)=>e&&t&&n,[oE]:(e,t)=>e&&t,[sE]:(e,t)=>e&&t,[rE]:(e,t)=>e&&t,[iE]:(e,t)=>e&&t,[uE]:(e,t)=>e&&Wt(t),[cE]:(e,t,n)=>e&&t&&n},aG={click:(e,t)=>!!(e&&t),drop:(e,t)=>!!(e&&t),toggle:e=>!!e,check:(e,t)=>e&&Wt(t)};function lG(e,t){const n=V(new Set),a=V(new Set),{emit:l}=ht();fe([()=>t.value,()=>e.defaultCheckedKeys],()=>Ae(()=>{y(e.defaultCheckedKeys)}),{immediate:!0});const o=(k=!1)=>{if(!t.value||!e.showCheckbox||e.checkStrictly&&!k)return;const{levelTreeNodeMap:S,maxLevel:E}=t.value,x=n.value,$=new Set;for(let w=E;w>=1;--w){const T=S.get(w);T&&T.forEach(M=>{const I=M.children;let N=!M.isLeaf||M.disabled||x.has(M.key);if(I){let A=!0,j=!1;for(const F of I){const B=F.key;if(F.isEffectivelyChecked||(N=!1),x.has(B))j=!0;else if($.has(B)){A=!1,j=!0;break}else A=!1}A?x.add(M.key):j?($.add(M.key),x.delete(M.key)):(x.delete(M.key),$.delete(M.key))}M.isEffectivelyChecked=N})}a.value=$},s=k=>n.value.has(k.key),i=k=>a.value.has(k.key),u=(k,S,E=!0,x=!0,$=!1)=>{const w=n.value,T=k.children;(!e.checkStrictly||$)&&E&&(T!=null&&T.length)&&(S=T.some(I=>!I.isEffectivelyChecked));const M=(I,N)=>{w[N?"add":"delete"](I.key);const A=I.children;(!e.checkStrictly||$)&&A&&A.forEach(j=>{(!j.disabled||j.children)&&M(j,N)})};M(k,S),x&&o(),E&&c(k,S)},c=(k,S)=>{const{checkedNodes:E,checkedKeys:x}=m(),{halfCheckedNodes:$,halfCheckedKeys:w}=v();l(iE,k.data,{checkedKeys:x,checkedNodes:E,halfCheckedKeys:w,halfCheckedNodes:$}),l(uE,k.data,S)};function d(k=!1){return m(k).checkedKeys}function f(k=!1){return m(k).checkedNodes}function p(){return v().halfCheckedKeys}function g(){return v().halfCheckedNodes}function m(k=!1){const S=[],E=[];if(t!=null&&t.value&&e.showCheckbox){const{treeNodeMap:x}=t.value;n.value.forEach($=>{const w=x.get($);w&&(!k||k&&w.isLeaf)&&(E.push($),S.push(w.data))})}return{checkedKeys:E,checkedNodes:S}}function v(){const k=[],S=[];if(t!=null&&t.value&&e.showCheckbox){const{treeNodeMap:E}=t.value;a.value.forEach(x=>{const $=E.get(x);$&&(S.push(x),k.push($.data))})}return{halfCheckedNodes:k,halfCheckedKeys:S}}function h(k){n.value.clear(),a.value.clear(),Ae(()=>{y(k)})}function b(k,S,E){if(t!=null&&t.value&&e.showCheckbox){const x=t.value.treeNodeMap.get(k);x&&u(x,S,!1,void 0,E)}}function y(k){if(t!=null&&t.value){const{treeNodeMap:S}=t.value;if(e.showCheckbox&&S){for(const E of k){const x=S.get(E);x&&!s(x)&&u(x,!0,!1,!1)}o()}}}return{updateCheckedKeys:o,toggleCheckbox:u,isChecked:s,isIndeterminate:i,getCheckedKeys:d,getCheckedNodes:f,getHalfCheckedKeys:p,getHalfCheckedNodes:g,setChecked:b,setCheckedKeys:h}}function oG(e,t){const n=V(new Set([])),a=V(new Set([])),l=C(()=>We(e.filterMethod));function o(i){var v;if(!l.value)return;const u=new Set,c=a.value,d=n.value,f=[],p=((v=t.value)==null?void 0:v.treeNodes)||[],g=e.filterMethod;d.clear();function m(h){h.forEach(b=>{f.push(b),g!=null&&g(i,b.data,b)?f.forEach(k=>{u.add(k.key),k.expanded=!0}):(b.expanded=!1,b.isLeaf&&d.add(b.key));const y=b.children;if(y&&m(y),!b.isLeaf){if(!u.has(b.key))d.add(b.key);else if(y){let k=!0;for(const S of y)if(!d.has(S.key)){k=!1;break}k?c.add(b.key):c.delete(b.key)}}f.pop()})}return m(p),u}function s(i){return a.value.has(i.key)}return{hiddenExpandIconKeySet:a,hiddenNodeKeySet:n,doFilter:o,isForceHiddenExpandIcon:s}}function sG(e,t){const n=V(new Set),a=V(),l=Et(),o=V(),{isIndeterminate:s,isChecked:i,toggleCheckbox:u,getCheckedKeys:c,getCheckedNodes:d,getHalfCheckedKeys:f,getHalfCheckedNodes:p,setChecked:g,setCheckedKeys:m}=lG(e,l),{doFilter:v,hiddenNodeKeySet:h,isForceHiddenExpandIcon:b}=oG(e,l),y=C(()=>{var _;return((_=e.props)==null?void 0:_.value)||"id"}),k=C(()=>{var _;return((_=e.props)==null?void 0:_.children)||"children"}),S=C(()=>{var _;return((_=e.props)==null?void 0:_.disabled)||"disabled"}),E=C(()=>{var _;return((_=e.props)==null?void 0:_.label)||"label"}),x=C(()=>{var de;const _=n.value,U=h.value,ae=[],le=((de=l.value)==null?void 0:de.treeNodes)||[],se=[];for(let be=le.length-1;be>=0;--be)se.push(le[be]);for(;se.length;){const be=se.pop();if(!U.has(be.key)&&(ae.push(be),be.children&&_.has(be.key)))for(let we=be.children.length-1;we>=0;--we)se.push(be.children[we])}return ae}),$=C(()=>x.value.length>0);function w(_){const U=new Map,ae=new Map;let le=1;function se(be,we=1,Oe=void 0){var Pe;const Ce=[];for(const ge of be){const ke=I(ge),Le={level:we,key:ke,data:ge};Le.label=A(ge),Le.parent=Oe;const qe=M(ge);Le.disabled=N(ge),Le.isLeaf=!qe||qe.length===0,Le.expanded=n.value.has(ke),qe&&qe.length&&(Le.children=se(qe,we+1,Le)),Ce.push(Le),U.set(ke,Le),ae.has(we)||ae.set(we,[]),(Pe=ae.get(we))==null||Pe.push(Le)}return we>le&&(le=we),Ce}const de=se(_);return{treeNodeMap:U,levelTreeNodeMap:ae,maxLevel:le,treeNodes:de}}function T(_){const U=v(_);U&&(n.value=U)}function M(_){return _[k.value]}function I(_){return _?_[y.value]:""}function N(_){return _[S.value]}function A(_){return _[E.value]}function j(_){n.value.has(_.key)?W(_):L(_)}function F(_){const U=new Set,ae=l.value.treeNodeMap;n.value.forEach(le=>{const se=ae.get(le);se&&(se.expanded=!1)}),_.forEach(le=>{let se=ae.get(le);for(;se&&!U.has(se.key);)U.add(se.key),se.expanded=!0,se=se.parent}),n.value=U}function B(_,U){R(_),t(aE,_.data,_,U),e.expandOnClickNode&&j(_),e.showCheckbox&&(e.checkOnClickNode||_.isLeaf&&e.checkOnClickLeaf)&&!_.disabled&&u(_,!i(_),!0)}function D(_,U){t(lE,_.data,_,U)}function R(_){J(_)||(a.value=_.key,t(rE,_.data,_))}function z(_,U){u(_,U)}function L(_){const U=n.value;if(l.value&&e.accordion){const{treeNodeMap:le}=l.value;U.forEach(se=>{const de=le.get(se);_&&_.level===(de==null?void 0:de.level)&&(U.delete(se),de.expanded=!1)})}U.add(_.key);const ae=ve(_.key);ae&&(ae.expanded=!0,t(oE,ae.data,ae))}function W(_){n.value.delete(_.key);const U=ve(_.key);U&&(U.expanded=!1,t(sE,U.data,U))}function Y(_){return!!_.disabled}function J(_){const U=a.value;return U!==void 0&&U===_.key}function Z(){var _,U;if(a.value!==void 0)return(U=(_=l.value)==null?void 0:_.treeNodeMap.get(a.value))==null?void 0:U.data}function Q(){return a.value}function ee(_){a.value=_}function ie(_){l.value=w(_)}function ve(_){var ae;const U=rt(_)?I(_):_;return(ae=l.value)==null?void 0:ae.treeNodeMap.get(U)}function pe(_,U="auto"){const ae=ve(_);ae&&o.value&&o.value.scrollToItem(x.value.indexOf(ae),U)}function re(_){var U;(U=o.value)==null||U.scrollTo(_)}return fe(()=>e.currentNodeKey,_=>{a.value=_},{immediate:!0}),fe(()=>e.defaultExpandedKeys,_=>{F(_||[])}),fe(()=>e.data,_=>{ie(_),F(e.defaultExpandedKeys||[])},{immediate:!0}),{tree:l,flattenTree:x,isNotEmpty:$,listRef:o,getKey:I,getChildren:M,toggleExpand:j,toggleCheckbox:u,isChecked:i,isIndeterminate:s,isDisabled:Y,isCurrent:J,isForceHiddenExpandIcon:b,handleNodeClick:B,handleNodeDrop:D,handleNodeCheck:z,getCurrentNode:Z,getCurrentKey:Q,setCurrentKey:ee,getCheckedKeys:c,getCheckedNodes:d,getHalfCheckedKeys:f,getHalfCheckedNodes:p,setChecked:g,setCheckedKeys:m,filter:T,setData:ie,getNode:ve,expandNode:L,collapseNode:W,setExpandedKeys:F,scrollToNode:pe,scrollTo:re}}var rG=ue({name:"ElTreeNodeContent",props:tG,setup(e){const t=Fe(Mm),n=he("tree");return()=>{const a=e.node,{data:l}=a;return t!=null&&t.ctx.slots.default?t.ctx.slots.default({node:a,data:l}):Ge(xm,{tag:"span",truncated:!0,class:n.be("node","label")},()=>[a==null?void 0:a.label])}}});const iG=["aria-expanded","aria-disabled","aria-checked","data-key"];var uG=ue({name:"ElTreeNode",__name:"tree-node",props:eG,emits:aG,setup(e,{emit:t}){const n=e,a=t,l=Fe(Mm),o=he("tree"),s=C(()=>(l==null?void 0:l.props.indent)??16),i=C(()=>(l==null?void 0:l.props.icon)??qS),u=m=>{var b;const v=(b=l==null?void 0:l.props.props)==null?void 0:b.class;if(!v)return{};let h;if(We(v)){const{data:y}=m;h=v(y,m)}else h=v;return Ve(h)?{[h]:!0}:h},c=m=>{a("click",n.node,m)},d=m=>{a("drop",n.node,m)},f=()=>{a("toggle",n.node)},p=m=>{a("check",n.node,m)},g=m=>{var v,h,b,y;(b=(h=(v=l==null?void 0:l.instance)==null?void 0:v.vnode)==null?void 0:h.props)!=null&&b.onNodeContextmenu&&(m.stopPropagation(),m.preventDefault()),l==null||l.ctx.emit(cE,m,(y=n.node)==null?void 0:y.data,n.node)};return(m,v)=>{var h,b,y;return O(),H("div",{ref:"node$",class:P([r(o).b("node"),r(o).is("expanded",e.expanded),r(o).is("current",e.current),r(o).is("focusable",!e.disabled),r(o).is("checked",!e.disabled&&e.checked),u(e.node)]),role:"treeitem",tabindex:"-1","aria-expanded":e.expanded,"aria-disabled":e.disabled,"aria-checked":e.checked,"data-key":(h=e.node)==null?void 0:h.key,onClick:Je(c,["stop"]),onContextmenu:g,onDragover:v[1]||(v[1]=Je(()=>{},["prevent"])),onDragenter:v[2]||(v[2]=Je(()=>{},["prevent"])),onDrop:Je(d,["stop"])},[K("div",{class:P(r(o).be("node","content")),style:je({paddingLeft:`${(e.node.level-1)*s.value}px`,height:e.itemSize+"px"})},[i.value?(O(),oe(r(Be),{key:0,class:P([r(o).is("leaf",!!((b=e.node)!=null&&b.isLeaf)),r(o).is("hidden",e.hiddenExpandIcon),{expanded:!((y=e.node)!=null&&y.isLeaf)&&e.expanded},r(o).be("node","expand-icon")]),onClick:Je(f,["stop"])},{default:X(()=>[(O(),oe(dt(i.value)))]),_:1},8,["class"])):te("v-if",!0),e.showCheckbox?(O(),oe(r(ll),{key:1,"model-value":e.checked,indeterminate:e.indeterminate,disabled:e.disabled,onChange:p,onClick:v[0]||(v[0]=Je(()=>{},["stop"]))},null,8,["model-value","indeterminate","disabled"])):te("v-if",!0),q(r(rG),{node:{...e.node,expanded:e.expanded}},null,8,["node"])],6)],42,iG)}}}),cG=uG,dG=ue({name:"ElTreeV2",__name:"tree",props:QU,emits:nG,setup(e,{expose:t,emit:n}){const a=e,l=n,o=mn(),s=C(()=>a.itemSize);Tt(Mm,{ctx:{emit:l,slots:o},props:a,instance:ht()}),Tt(Hl,void 0);const{t:i}=St(),u=he("tree"),{flattenTree:c,isNotEmpty:d,listRef:f,toggleExpand:p,isIndeterminate:g,isChecked:m,isDisabled:v,isCurrent:h,isForceHiddenExpandIcon:b,handleNodeClick:y,handleNodeDrop:k,handleNodeCheck:S,toggleCheckbox:E,getCurrentNode:x,getCurrentKey:$,setCurrentKey:w,getCheckedKeys:T,getCheckedNodes:M,getHalfCheckedKeys:I,getHalfCheckedNodes:N,setChecked:A,setCheckedKeys:j,filter:F,setData:B,getNode:D,expandNode:R,collapseNode:z,setExpandedKeys:L,scrollToNode:W,scrollTo:Y}=sG(a,l);return t({toggleCheckbox:E,getCurrentNode:x,getCurrentKey:$,setCurrentKey:w,getCheckedKeys:T,getCheckedNodes:M,getHalfCheckedKeys:I,getHalfCheckedNodes:N,setChecked:A,setCheckedKeys:j,filter:F,setData:B,getNode:D,expandNode:R,collapseNode:z,setExpandedKeys:L,scrollToNode:W,scrollTo:Y}),(J,Z)=>(O(),H("div",{class:P([r(u).b(),{[r(u).m("highlight-current")]:e.highlightCurrent}]),role:"tree"},[r(d)?(O(),oe(r(bu),{key:0,ref_key:"listRef",ref:f,"class-name":r(u).b("virtual-list"),data:r(c),total:r(c).length,height:e.height,"item-size":s.value,"perf-mode":e.perfMode,"scrollbar-always-on":e.scrollbarAlwaysOn},{default:X(({data:Q,index:ee,style:ie})=>[(O(),oe(cG,{key:Q[ee].key,style:je(ie),node:Q[ee],expanded:Q[ee].expanded,"show-checkbox":e.showCheckbox,checked:r(m)(Q[ee]),indeterminate:r(g)(Q[ee]),"item-size":s.value,disabled:r(v)(Q[ee]),current:r(h)(Q[ee]),"hidden-expand-icon":r(b)(Q[ee]),onClick:r(y),onToggle:r(p),onCheck:r(S),onDrop:r(k)},null,8,["style","node","expanded","show-checkbox","checked","indeterminate","item-size","disabled","current","hidden-expand-icon","onClick","onToggle","onCheck","onDrop"]))]),_:1},8,["class-name","data","total","height","item-size","perf-mode","scrollbar-always-on"])):(O(),H("div",{key:1,class:P(r(u).e("empty-block"))},[ne(J.$slots,"empty",{},()=>[K("span",{class:P(r(u).e("empty-text"))},Se(e.emptyText??r(i)("el.tree.emptyText")),3)])],2))],2))}}),fG=dG;const pG=ut(fG),vG="ElUpload";var hG=class extends Error{constructor(e,t,n,a){super(e),this.name="UploadAjaxError",this.status=t,this.method=n,this.url=a}};function y0(e,t,n){let a;return n.response?a=`${n.response.error||n.response}`:n.responseText?a=`${n.responseText}`:a=`fail to ${t.method} ${e} ${n.status}`,new hG(a,n.status,t.method,e)}function mG(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}const gG=e=>{typeof XMLHttpRequest>"u"&&rn(vG,"XMLHttpRequest is undefined");const t=new XMLHttpRequest,n=e.action;t.upload&&t.upload.addEventListener("progress",o=>{const s=o;s.percent=o.total>0?o.loaded/o.total*100:0,e.onProgress(s)});const a=new FormData;if(e.data)for(const[o,s]of Object.entries(e.data))me(s)?s.length===2&&s[0]instanceof Blob&&Ve(s[1])?a.append(o,s[0],s[1]):s.forEach(i=>{a.append(o,i)}):a.append(o,s);a.append(e.filename,e.file,e.file.name),t.addEventListener("error",()=>{e.onError(y0(n,e,t))}),t.addEventListener("load",()=>{if(t.status<200||t.status>=300)return e.onError(y0(n,e,t));e.onSuccess(mG(t))}),t.open(e.method,n,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);const l=e.headers||{};if(l instanceof Headers)l.forEach((o,s)=>t.setRequestHeader(s,o));else for(const[o,s]of Object.entries(l))vn(s)||t.setRequestHeader(o,String(s));return t.send(a),t},dE=["text","picture","picture-card"];let bG=1;const Iv=()=>Date.now()+bG++,fE=$e({action:{type:String,default:"#"},headers:{type:G(Object)},method:{type:String,default:"post"},data:{type:G([Object,Function,Promise]),default:()=>dn({})},multiple:Boolean,name:{type:String,default:"file"},drag:Boolean,withCredentials:Boolean,showFileList:{type:Boolean,default:!0},accept:{type:String,default:""},fileList:{type:G(Array),default:()=>dn([])},autoUpload:{type:Boolean,default:!0},listType:{type:String,values:dE,default:"text"},httpRequest:{type:G(Function),default:gG},disabled:{type:Boolean,default:void 0},limit:Number,directory:Boolean}),yG=$e({...fE,beforeUpload:{type:G(Function),default:vt},beforeRemove:{type:G(Function)},onRemove:{type:G(Function),default:vt},onChange:{type:G(Function),default:vt},onPreview:{type:G(Function),default:vt},onSuccess:{type:G(Function),default:vt},onProgress:{type:G(Function),default:vt},onError:{type:G(Function),default:vt},onExceed:{type:G(Function),default:vt},crossorigin:{type:G(String)}}),pE=Symbol("uploadContextKey"),wG=$e({files:{type:G(Array),default:()=>dn([])},disabled:{type:Boolean,default:void 0},handlePreview:{type:G(Function),default:vt},listType:{type:String,values:dE,default:"text"},crossorigin:{type:G(String)}}),SG={remove:e=>!!e},CG=$e({...fE,beforeUpload:{type:G(Function),default:vt},onRemove:{type:G(Function),default:vt},onStart:{type:G(Function),default:vt},onSuccess:{type:G(Function),default:vt},onProgress:{type:G(Function),default:vt},onError:{type:G(Function),default:vt},onExceed:{type:G(Function),default:vt}}),kG=$e({disabled:{type:Boolean,default:void 0},directory:Boolean}),EG={file:e=>me(e)},xG=["tabindex","aria-disabled","onKeydown"],TG=["src","crossorigin"],$G=["onClick"],OG=["title"],NG=["onClick"],MG=["onClick"];var PG=ue({name:"ElUploadList",__name:"upload-list",props:wG,emits:SG,setup(e,{emit:t}){const n=e,a=t,{t:l}=St(),o=he("upload"),s=he("icon"),i=he("list"),u=sn(),c=V(!1),d=C(()=>[o.b("list"),o.bm("list",n.listType),o.is("disabled",u.value)]),f=async g=>{const m=g.relatedTarget;await Ae(),m!=null&&m.classList.contains(o.be("list","item"))||(c.value=!1)},p=g=>{a("remove",g)};return(g,m)=>(O(),oe(tw,{tag:"ul",class:P(d.value),name:r(i).b()},{default:X(()=>[(O(!0),H(ze,null,bt(e.files,(v,h)=>(O(),H("li",{key:v.uid||v.name,class:P([r(o).be("list","item"),r(o).is(v.status),{focusing:c.value}]),tabindex:r(u)?void 0:0,"aria-disabled":r(u),role:"button",onKeydown:an(b=>!r(u)&&p(v),["delete"]),onFocus:m[0]||(m[0]=b=>c.value=!0),onBlur:f,onClick:m[1]||(m[1]=b=>c.value=!1)},[ne(g.$slots,"default",{file:v,index:h},()=>[e.listType==="picture"||v.status!=="uploading"&&e.listType==="picture-card"?(O(),H("img",{key:0,class:P(r(o).be("list","item-thumbnail")),src:v.url,crossorigin:e.crossorigin,alt:""},null,10,TG)):te("v-if",!0),v.status==="uploading"||e.listType!=="picture-card"?(O(),H("div",{key:1,class:P(r(o).be("list","item-info"))},[K("a",{class:P(r(o).be("list","item-name")),onClick:Je(b=>e.handlePreview(v),["prevent"])},[q(r(Be),{class:P(r(s).m("document"))},{default:X(()=>[q(r(i_))]),_:1},8,["class"]),K("span",{class:P(r(o).be("list","item-file-name")),title:v.name},Se(v.name),11,OG)],10,$G),v.status==="uploading"?(O(),oe(r(fm),{key:0,type:e.listType==="picture-card"?"circle":"line","stroke-width":e.listType==="picture-card"?6:2,percentage:Number(v.percentage),style:je(e.listType==="picture-card"?"":"margin-top: 0.5rem")},null,8,["type","stroke-width","percentage","style"])):te("v-if",!0)],2)):te("v-if",!0),K("label",{class:P(r(o).be("list","item-status-label"))},[e.listType==="text"?(O(),oe(r(Be),{key:0,class:P([r(s).m("upload-success"),r(s).m("circle-check")])},{default:X(()=>[q(r(Lh))]),_:1},8,["class"])):["picture-card","picture"].includes(e.listType)?(O(),oe(r(Be),{key:1,class:P([r(s).m("upload-success"),r(s).m("check")])},{default:X(()=>[q(r(gr))]),_:1},8,["class"])):te("v-if",!0)],2),r(u)?te("v-if",!0):(O(),oe(r(Be),{key:2,class:P(r(s).m("close")),"aria-label":r(l)("el.upload.delete"),role:"button",tabindex:"0",onClick:b=>p(v),onKeydown:an(Je(b=>p(v),["prevent"]),["enter","space"])},{default:X(()=>[q(r(Ya))]),_:1},8,["class","aria-label","onClick","onKeydown"])),r(u)?te("v-if",!0):(O(),H("i",{key:3,class:P(r(s).m("close-tip"))},Se(r(l)("el.upload.deleteTip")),3)),e.listType==="picture-card"?(O(),H("span",{key:4,class:P(r(o).be("list","item-actions"))},[K("span",{class:P(r(o).be("list","item-preview")),onClick:b=>e.handlePreview(v)},[q(r(Be),{class:P(r(s).m("zoom-in"))},{default:X(()=>[q(r(XS))]),_:1},8,["class"])],10,NG),r(u)?te("v-if",!0):(O(),H("span",{key:0,class:P(r(o).be("list","item-delete")),onClick:b=>p(v)},[q(r(Be),{class:P(r(s).m("delete"))},{default:X(()=>[q(r(s_))]),_:1},8,["class"])],10,MG))],2)):te("v-if",!0)])],42,xG))),128)),ne(g.$slots,"append")]),_:3},8,["class","name"]))}}),w0=PG;const S0="ElUploadDrag";var IG=ue({name:S0,__name:"upload-dragger",props:kG,emits:EG,setup(e,{emit:t}){const n=e,a=t;Fe(pE)||rn(S0,"usage: ");const l=he("upload"),o=V(!1),s=sn(),i=p=>new Promise((g,m)=>p.file(g,m)),u=async p=>{try{if(p.isFile){const g=await i(p);return p.fullPath&&!g.webkitRelativePath&&Object.defineProperty(g,"webkitRelativePath",{value:p.fullPath.replace(/^\//,"")}),g.isDirectory=!1,[g]}if(p.isDirectory){const g=p.createReader(),m=()=>new Promise((k,S)=>g.readEntries(k,S)),v=[];let h=await m();for(;h.length>0;)v.push(...h),h=await m();const b=v.map(k=>u(k).catch(()=>[])),y=await Promise.all(b);return Lc(y)}}catch{return[]}return[]},c=async p=>{if(s.value)return;o.value=!1,p.stopPropagation();const g=Array.from(p.dataTransfer.files),m=p.dataTransfer.items||[];if(n.directory){const v=Array.from(m).map(b=>{var y;return(y=b==null?void 0:b.webkitGetAsEntry)==null?void 0:y.call(b)}).filter(b=>b),h=await Promise.all(v.map(u));a("file",Lc(h));return}g.forEach((v,h)=>{var y,k;const b=(k=(y=m[h])==null?void 0:y.webkitGetAsEntry)==null?void 0:k.call(y);b&&(v.isDirectory=b.isDirectory)}),a("file",g)},d=()=>{s.value||(o.value=!0)},f=p=>{p.currentTarget.contains(p.relatedTarget)||(o.value=!1)};return(p,g)=>(O(),H("div",{class:P([r(l).b("dragger"),r(l).is("dragover",o.value)]),onDrop:Je(c,["prevent"]),onDragover:Je(d,["prevent"]),onDragleave:Je(f,["prevent"])},[ne(p.$slots,"default")],34))}}),RG=IG;const _G=["tabindex","aria-disabled","onKeydown"],AG=["name","disabled","multiple","accept","webkitdirectory"];var LG=ue({name:"ElUploadContent",inheritAttrs:!1,__name:"upload-content",props:CG,setup(e,{expose:t}){const n=e,a=he("upload"),l=sn(),o=Et({}),s=Et(),i=v=>{if(v.length===0)return;const{autoUpload:h,limit:b,fileList:y,multiple:k,onStart:S,onExceed:E}=n;if(b&&y.length+v.length>b){E(v,y);return}k||(v=v.slice(0,1));for(const x of v){const $=x;$.uid=Iv(),S($),h&&u($)}},u=async v=>{if(s.value.value="",!n.beforeUpload)return d(v);let h,b={};try{const k=n.data,S=n.beforeUpload(v);b=mi(n.data)?xl(n.data):n.data,h=await S,mi(n.data)&&cn(k,b)&&(b=xl(n.data))}catch{h=!1}if(h===!1){n.onRemove(v);return}let y=v;h instanceof Blob&&(h instanceof File?y=h:y=new File([h],v.name,{type:v.type})),d(Object.assign(y,{uid:v.uid}),b)},c=async(v,h)=>We(v)?v(h):v,d=async(v,h)=>{const{headers:b,data:y,method:k,withCredentials:S,name:E,action:x,onProgress:$,onSuccess:w,onError:T,httpRequest:M}=n;try{h=await c(h??y,v)}catch{n.onRemove(v);return}const{uid:I}=v,N={headers:b||{},withCredentials:S,file:v,data:h,method:k,filename:E,action:x,onProgress:j=>{$(j,v)},onSuccess:j=>{w(j,v),delete o.value[I]},onError:j=>{T(j,v),delete o.value[I]}},A=M(N);o.value[I]=A,A instanceof Promise&&A.then(N.onSuccess,N.onError)},f=v=>{const h=v.target.files;h&&i(Array.from(h))},p=()=>{l.value||(s.value.value="",s.value.click())},g=()=>{p()};return t({abort:v=>{Gw(o.value).filter(v?([h])=>String(v.uid)===h:()=>!0).forEach(([h,b])=>{b instanceof XMLHttpRequest&&b.abort(),delete o.value[h]})},upload:u}),(v,h)=>(O(),H("div",{class:P([r(a).b(),r(a).m(e.listType),r(a).is("drag",e.drag),r(a).is("disabled",r(l))]),tabindex:r(l)?void 0:0,"aria-disabled":r(l),role:"button",onClick:p,onKeydown:an(Je(g,["self"]),["enter","space"])},[e.drag?(O(),oe(RG,{key:0,disabled:r(l),directory:e.directory,onFile:i},{default:X(()=>[ne(v.$slots,"default")]),_:3},8,["disabled","directory"])):ne(v.$slots,"default",{key:1}),K("input",{ref_key:"inputRef",ref:s,class:P(r(a).e("input")),name:e.name,disabled:r(l),multiple:e.multiple,accept:e.accept,webkitdirectory:e.directory||void 0,type:"file",onChange:f,onClick:h[0]||(h[0]=Je(()=>{},["stop"]))},null,42,AG)],42,_G))}}),C0=LG;const k0="ElUpload",E0=e=>{var t;(t=e.url)!=null&&t.startsWith("blob:")&&URL.revokeObjectURL(e.url)},VG=(e,t)=>{const n=rR(e,"fileList",void 0,{passive:!0}),a=m=>n.value.find(v=>v.uid===m.uid);function l(m){var v;(v=t.value)==null||v.abort(m)}function o(m=["ready","uploading","success","fail"]){n.value=n.value.filter(v=>!m.includes(v.status))}function s(m){n.value=n.value.filter(v=>v.uid!==m.uid)}const i=m=>{Ae(()=>e.onChange(m,n.value))},u=(m,v)=>{const h=a(v);h&&(console.error(m),h.status="fail",s(h),e.onError(m,h,n.value),i(h))},c=(m,v)=>{const h=a(v);h&&(e.onProgress(m,h,n.value),h.status="uploading",h.percentage=Math.round(m.percent))},d=(m,v)=>{const h=a(v);h&&(h.status="success",h.response=m,e.onSuccess(m,h,n.value),i(h))},f=m=>{vn(m.uid)&&(m.uid=Iv());const v={name:m.name,percentage:0,status:"ready",size:m.size,raw:m,uid:m.uid};if(e.listType==="picture-card"||e.listType==="picture")try{v.url=URL.createObjectURL(m)}catch(h){Kt(k0,h.message),e.onError(h,v,n.value)}n.value=[...n.value,v],i(v)},p=async m=>{const v=m instanceof File?a(m):m;v||rn(k0,"file to be removed not found");const h=b=>{l(b),s(b),e.onRemove(b,n.value),E0(b)};e.beforeRemove?await e.beforeRemove(v,n.value)!==!1&&h(v):h(v)};function g(){n.value.filter(({status:m})=>m==="ready").forEach(({raw:m})=>{var v;return m&&((v=t.value)==null?void 0:v.upload(m))})}return fe(()=>e.listType,m=>{m!=="picture-card"&&m!=="picture"||(n.value=n.value.map(v=>{const{raw:h,url:b}=v;if(!b&&h)try{v.url=URL.createObjectURL(h)}catch(y){e.onError(y,v,n.value)}return v}))}),fe(n,m=>{for(const v of m)v.uid||(v.uid=Iv()),v.status||(v.status="success")},{immediate:!0,deep:!0}),{uploadFiles:n,abort:l,clearFiles:o,handleError:u,handleProgress:c,handleStart:f,handleSuccess:d,handleRemove:p,submit:g,revokeFileObjectURL:E0}};var DG=ue({name:"ElUpload",__name:"upload",props:yG,setup(e,{expose:t}){const n=e,a=sn(),l=Et(),{abort:o,submit:s,clearFiles:i,uploadFiles:u,handleStart:c,handleError:d,handleRemove:f,handleSuccess:p,handleProgress:g,revokeFileObjectURL:m}=VG(n,l),v=C(()=>n.listType==="picture-card"),h=C(()=>({...n,fileList:u.value,onStart:c,onProgress:g,onSuccess:p,onError:d,onRemove:f}));return zt(()=>{u.value.forEach(m)}),Tt(pE,{accept:Ot(n,"accept")}),t({abort:o,submit:s,clearFiles:i,handleStart:c,handleRemove:f}),(b,y)=>(O(),H("div",null,[v.value&&e.showFileList?(O(),oe(w0,{key:0,disabled:r(a),"list-type":e.listType,files:r(u),crossorigin:e.crossorigin,"handle-preview":e.onPreview,onRemove:r(f)},va({append:X(()=>[q(C0,pt({ref_key:"uploadRef",ref:l},h.value),{default:X(()=>[b.$slots.trigger?ne(b.$slots,"trigger",{key:0}):te("v-if",!0),!b.$slots.trigger&&b.$slots.default?ne(b.$slots,"default",{key:1}):te("v-if",!0)]),_:3},16)]),_:2},[b.$slots.file?{name:"default",fn:X(({file:k,index:S})=>[ne(b.$slots,"file",{file:k,index:S})]),key:"0"}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):te("v-if",!0),!v.value||v.value&&!e.showFileList?(O(),oe(C0,pt({key:1,ref_key:"uploadRef",ref:l},h.value),{default:X(()=>[b.$slots.trigger?ne(b.$slots,"trigger",{key:0}):te("v-if",!0),!b.$slots.trigger&&b.$slots.default?ne(b.$slots,"default",{key:1}):te("v-if",!0)]),_:3},16)):te("v-if",!0),b.$slots.trigger?ne(b.$slots,"default",{key:2}):te("v-if",!0),ne(b.$slots,"tip"),!v.value&&e.showFileList?(O(),oe(w0,{key:3,disabled:r(a),"list-type":e.listType,files:r(u),crossorigin:e.crossorigin,"handle-preview":e.onPreview,onRemove:r(f)},va({_:2},[b.$slots.file?{name:"default",fn:X(({file:k,index:S})=>[ne(b.$slots,"file",{file:k,index:S})]),key:"0"}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):te("v-if",!0)]))}}),BG=DG;const FG=ut(BG),zG=$e({zIndex:{type:Number,default:9},rotate:{type:Number,default:-22},width:Number,height:Number,image:String,content:{type:G([String,Array]),default:"Element Plus"},font:{type:G(Object)},gap:{type:G(Array),default:()=>[100,100]},offset:{type:G(Array)}});function HG(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function KG(e){return Object.keys(e).map(t=>`${HG(t)}: ${e[t]};`).join(" ")}function WG(){return window.devicePixelRatio||1}const jG=(e,t)=>{let n=!1;return e.removedNodes.length&&t&&(n=Array.from(e.removedNodes).includes(t)),e.type==="attributes"&&e.target===t&&(n=!0),n},qG={left:[0,.5],start:[0,.5],center:[.5,0],right:[1,-.5],end:[1,-.5]};function up(e,t,n=1){const a=document.createElement("canvas"),l=a.getContext("2d"),o=e*n,s=t*n;return a.setAttribute("width",`${o}px`),a.setAttribute("height",`${s}px`),l.save(),[l,a,o,s]}function YG(){function e(t,n,a,l,o,s,i,u,c){const[d,f,p,g]=up(l,o,a);let m=0;if(t instanceof HTMLImageElement)d.drawImage(t,0,0,p,g);else{const{color:Y,fontSize:J,fontStyle:Z,fontWeight:Q,fontFamily:ee,textAlign:ie,textBaseline:ve}=s,pe=Number(J)*a;d.font=`${Z} normal ${Q} ${pe}px/${o}px ${ee}`,d.fillStyle=Y,d.textAlign=ie,d.textBaseline=ve;const re=me(t)?t:[t];if(ve!=="top"&&re[0]){const _=d.measureText(re[0]);d.textBaseline="top";const U=d.measureText(re[0]);m=_.actualBoundingBoxAscent-U.actualBoundingBoxAscent}re==null||re.forEach((_,U)=>{const[ae,le]=qG[ie];d.fillText(_??"",p*ae+c*le,U*(pe+s.fontGap*a))})}const v=Math.PI/180*Number(n),h=Math.max(l,o),[b,y,k]=up(h,h,a);b.translate(k/2,k/2),b.rotate(v),p>0&&g>0&&b.drawImage(f,-p/2,-g/2);function S(Y,J){return[Y*Math.cos(v)-J*Math.sin(v),Y*Math.sin(v)+J*Math.cos(v)]}let E=0,x=0,$=0,w=0;const T=p/2,M=g/2;[[0-T,0-M],[0+T,0-M],[0+T,0+M],[0-T,0+M]].forEach(([Y,J])=>{const[Z,Q]=S(Y,J);E=Math.min(E,Z),x=Math.max(x,Z),$=Math.min($,Q),w=Math.max(w,Q)});const I=E+k/2,N=$+k/2,A=x-E,j=w-$,F=i*a,B=u*a,D=(A+F)*2,R=j+B,[z,L]=up(D,R);function W(Y=0,J=0){z.drawImage(y,I,N,A,j,Y,J+m,A,j)}return W(),W(A+F,-j/2-B/2),W(A+F,+j/2+B/2),[L.toDataURL(),D/a,R/a]}return e}var UG=ue({name:"ElWatermark",__name:"watermark",props:zG,setup(e){const t={position:"relative"},n=e,a=C(()=>{var I;return((I=n.font)==null?void 0:I.fontGap)??3}),l=C(()=>{var I;return((I=n.font)==null?void 0:I.color)??"rgba(0,0,0,.15)"}),o=C(()=>{var I;return((I=n.font)==null?void 0:I.fontSize)??16}),s=C(()=>{var I;return((I=n.font)==null?void 0:I.fontWeight)??"normal"}),i=C(()=>{var I;return((I=n.font)==null?void 0:I.fontStyle)??"normal"}),u=C(()=>{var I;return((I=n.font)==null?void 0:I.fontFamily)??"sans-serif"}),c=C(()=>{var I;return((I=n.font)==null?void 0:I.textAlign)??"center"}),d=C(()=>{var I;return((I=n.font)==null?void 0:I.textBaseline)??"hanging"}),f=C(()=>n.gap[0]),p=C(()=>n.gap[1]),g=C(()=>f.value/2),m=C(()=>p.value/2),v=C(()=>{var I;return((I=n.offset)==null?void 0:I[0])??g.value}),h=C(()=>{var I;return((I=n.offset)==null?void 0:I[1])??m.value}),b=()=>{const I={zIndex:n.zIndex,position:"absolute",left:0,top:0,width:"100%",height:"100%",pointerEvents:"none",backgroundRepeat:"repeat"};let N=v.value-g.value,A=h.value-m.value;return N>0&&(I.left=`${N}px`,I.width=`calc(100% - ${N}px)`,N=0),A>0&&(I.top=`${A}px`,I.height=`calc(100% - ${A}px)`,A=0),I.backgroundPosition=`${N}px ${A}px`,I},y=Et(null),k=Et(),S=V(!1),E=()=>{k.value&&(k.value.remove(),k.value=void 0)},x=(I,N)=>{var A;y.value&&k.value&&(S.value=!0,k.value.setAttribute("style",KG({...b(),backgroundImage:`url('${I}')`,backgroundSize:`${Math.floor(N)}px`})),(A=y.value)==null||A.append(k.value),setTimeout(()=>{S.value=!1}))},$=I=>{let N=120,A=64,j=0;const{image:F,content:B,width:D,height:R,rotate:z}=n;if(!F&&I.measureText){I.font=`${Number(o.value)}px ${u.value}`;const L=me(B)?B:[B];let W=0,Y=0;L.forEach(Z=>{const{width:Q,fontBoundingBoxAscent:ee,fontBoundingBoxDescent:ie,actualBoundingBoxAscent:ve,actualBoundingBoxDescent:pe}=I.measureText(Z),re=xt(ee)?ve+pe:ee+ie;Q>W&&(W=Math.ceil(Q)),re>Y&&(Y=Math.ceil(re))}),N=W,A=Y*L.length+(L.length-1)*a.value;const J=Math.PI/180*Number(z);j=Math.ceil(Math.abs(Math.sin(J)*A)/2),N+=j}return[D??N,R??A,j]},w=YG(),T=()=>{const I=document.createElement("canvas").getContext("2d"),N=n.image,A=n.content,j=n.rotate;if(I){k.value||(k.value=document.createElement("div"));const F=WG(),[B,D,R]=$(I),z=L=>{const[W,Y]=w(L||"",j,F,B,D,{color:l.value,fontSize:o.value,fontStyle:i.value,fontWeight:s.value,fontFamily:u.value,fontGap:a.value,textAlign:c.value,textBaseline:d.value},f.value,p.value,R);x(W,Y)};if(N){const L=new Image;L.onload=()=>{z(L)},L.onerror=()=>{z(A)},L.crossOrigin="anonymous",L.referrerPolicy="no-referrer",L.src=N}else z(A)}};return mt(()=>{T()}),fe(()=>n,()=>{T()},{deep:!0,flush:"post"}),zt(()=>{E()}),$r(y,I=>{S.value||I.forEach(N=>{jG(N,k.value)&&(E(),T())})},{attributes:!0,subtree:!0,childList:!0}),(I,N)=>(O(),H("div",{ref_key:"containerRef",ref:y,style:je([t])},[ne(I.$slots,"default")],4))}}),GG=UG;const XG=ut(GG),JG=["absolute","fixed"],ZG=["top-start","top-end","top","bottom-start","bottom-end","bottom","left-start","left-end","left","right-start","right-end","right"],Pm=$e({placement:{type:G(String),values:ZG,default:"bottom"},reference:{type:G(Object),default:null},strategy:{type:G(String),values:JG,default:"absolute"},offset:{type:Number,default:10},showArrow:Boolean,zIndex:{type:Number,default:2001}}),QG={close:()=>!0},eX=$e({modelValue:Boolean,current:{type:Number},showArrow:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeIcon:{type:Ut},placement:Pm.placement,contentStyle:{type:G([Object])},mask:{type:G([Boolean,Object]),default:!0},gap:{type:G(Object),default:()=>({offset:6,radius:2})},zIndex:{type:Number},scrollIntoViewOptions:{type:G([Boolean,Object]),default:()=>({block:"center"})},type:{type:G(String)},appendTo:{type:G([String,Object]),default:"body"},closeOnPressEscape:{type:Boolean,default:!0},targetAreaClickable:{type:Boolean,default:!0}}),tX={[it]:e=>Wt(e),"update:current":e=>He(e),close:e=>He(e),finish:()=>!0,change:e=>He(e)},nX=$e({target:{type:G([String,Object,Function])},title:String,description:String,showClose:{type:Boolean,default:void 0},closeIcon:{type:Ut},showArrow:{type:Boolean,default:void 0},placement:Pm.placement,mask:{type:G([Boolean,Object]),default:void 0},contentStyle:{type:G([Object])},prevButtonProps:{type:G(Object)},nextButtonProps:{type:G(Object)},scrollIntoViewOptions:{type:G([Boolean,Object]),default:void 0},type:{type:G(String)}}),aX={close:()=>!0},lX=(e,t,n,a,l)=>{const o=V(null),s=()=>{let d;return Ve(e.value)?d=document.querySelector(e.value):We(e.value)?d=e.value():d=e.value,d},i=()=>{const d=s();if(!d||!t.value){o.value=null;return}oX(d)||d.scrollIntoView(l.value);const{left:f,top:p,width:g,height:m}=d.getBoundingClientRect();o.value={left:f,top:p,width:g,height:m,radius:0}};mt(()=>{fe([t,e],()=>{i()},{immediate:!0}),window.addEventListener("resize",i)}),zt(()=>{window.removeEventListener("resize",i)});const u=d=>(me(n.value.offset)?n.value.offset[d]:n.value.offset)??6,c=C(()=>{var g;if(!o.value)return o.value;const d=u(0),f=u(1),p=((g=n.value)==null?void 0:g.radius)||2;return{left:o.value.left-d,top:o.value.top-f,width:o.value.width+d*2,height:o.value.height+f*2,radius:p}});return{mergedPosInfo:c,triggerTarget:C(()=>{const d=s();return!a.value||!d||!window.DOMRect?d||void 0:{getBoundingClientRect(){var f,p,g,m;return window.DOMRect.fromRect({width:((f=c.value)==null?void 0:f.width)||0,height:((p=c.value)==null?void 0:p.height)||0,x:((g=c.value)==null?void 0:g.left)||0,y:((m=c.value)==null?void 0:m.top)||0})}}})}},vf=Symbol("ElTour");function oX(e){const t=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,{top:a,right:l,bottom:o,left:s}=e.getBoundingClientRect();return a>=0&&s>=0&&l<=t&&o<=n}const sX=(e,t,n,a,l,o,s,i)=>{const u=V(),c=V(),d=V({}),f={x:u,y:c,placement:a,strategy:l,middlewareData:d},p=C(()=>{const b=[S3(r(o)),k3(),C3(),rX()];return r(i)&&r(n)&&b.push(E3({element:r(n)})),b}),g=async()=>{if(!It)return;const b=r(e),y=r(t);if(!b||!y)return;const k=await x3(b,y,{placement:r(a),strategy:r(l),middleware:r(p)});Pi(f).forEach(S=>{f[S].value=k[S]})},m=C(()=>{if(!r(e))return{position:"fixed",top:"50%",left:"50%",transform:"translate3d(-50%, -50%, 0)",maxWidth:"100vw",zIndex:r(s)};const{overflow:b}=r(d);return{position:r(l),zIndex:r(s),top:r(c)!=null?`${r(c)}px`:"",left:r(u)!=null?`${r(u)}px`:"",maxWidth:b!=null&&b.maxWidth?`${b==null?void 0:b.maxWidth}px`:""}}),v=C(()=>{if(!r(i))return{};const{arrow:b}=r(d);return{left:(b==null?void 0:b.x)!=null?`${b==null?void 0:b.x}px`:"",top:(b==null?void 0:b.y)!=null?`${b==null?void 0:b.y}px`:""}});let h;return mt(()=>{const b=r(e),y=r(t);b&&y&&(h=y3(b,y,g)),ia(()=>{g()})}),zt(()=>{h&&h()}),{update:g,contentStyle:m,arrowStyle:v}},rX=()=>({name:"overflow",async fn(e){const t=await w3(e);let n=0;return t.left>0&&(n=t.left),t.right>0&&(n=t.right),{data:{maxWidth:e.rects.floating.width-n}}}}),iX=$e({zIndex:{type:Number,default:1001},visible:Boolean,fill:{type:String,default:"rgba(0,0,0,0.5)"},pos:{type:G(Object)},targetAreaClickable:{type:Boolean,default:!0}}),uX={style:{width:"100%",height:"100%"}},cX=["d"];var dX=ue({name:"ElTourMask",inheritAttrs:!1,__name:"mask",props:iX,setup(e){const t=e,{ns:n}=Fe(vf),a=C(()=>{var d;return((d=t.pos)==null?void 0:d.radius)??2}),l=C(()=>{const d=a.value,f=`a${d},${d} 0 0 1`;return{topRight:`${f} ${d},${d}`,bottomRight:`${f} ${-d},${d}`,bottomLeft:`${f} ${-d},${-d}`,topLeft:`${f} ${d},${-d}`}}),{width:o,height:s}=hh(),i=C(()=>{const d=o.value,f=s.value,p=l.value,g=`M${d},0 L0,0 L0,${f} L${d},${f} L${d},0 Z`,m=a.value;return t.pos?`${g} M${t.pos.left+m},${t.pos.top} h${t.pos.width-m*2} ${p.topRight} v${t.pos.height-m*2} ${p.bottomRight} h${-t.pos.width+m*2} ${p.bottomLeft} v${-t.pos.height+m*2} ${p.topLeft} z`:g}),u=C(()=>({position:"fixed",left:0,right:0,top:0,bottom:0,zIndex:t.zIndex,pointerEvents:t.pos&&t.targetAreaClickable?"none":"auto"})),c=C(()=>({fill:t.fill,pointerEvents:"auto",cursor:"auto"}));return Wd(Ot(t,"visible"),{ns:n}),(d,f)=>e.visible?(O(),H("div",pt({key:0,class:r(n).e("mask"),style:u.value},d.$attrs),[(O(),H("svg",uX,[K("path",{class:P(r(n).e("hollow")),style:je(c.value),d:i.value},null,14,cX)]))],16)):te("v-if",!0)}}),fX=dX;const pX=["data-side"];var vX=ue({name:"ElTourContent",__name:"content",props:Pm,emits:QG,setup(e,{emit:t}){const n=e,a=t,l=V(n.placement),o=V(n.strategy),s=V(null),i=V(null);fe(()=>n.placement,()=>{l.value=n.placement});const{contentStyle:u,arrowStyle:c}=sX(Ot(n,"reference"),s,i,l,o,Ot(n,"offset"),Ot(n,"zIndex"),Ot(n,"showArrow")),d=C(()=>l.value.split("-")[0]),{ns:f}=Fe(vf),p=()=>{a("close")},g=m=>{m.detail.focusReason==="pointer"&&m.preventDefault()};return(m,v)=>(O(),H("div",{ref_key:"contentRef",ref:s,style:je(r(u)),class:P(r(f).e("content")),"data-side":d.value,tabindex:"-1"},[q(r(Nr),{loop:"",trapped:"","focus-start-el":"container","focus-trap-el":s.value||void 0,onReleaseRequested:p,onFocusoutPrevented:g},{default:X(()=>[ne(m.$slots,"default")]),_:3},8,["focus-trap-el"]),e.showArrow?(O(),H("span",{key:0,ref_key:"arrowRef",ref:i,style:je(r(c)),class:P(r(f).e("arrow"))},null,6)):te("v-if",!0)],14,pX))}}),hX=vX,mX=ue({name:"ElTourSteps",props:{current:{type:Number,default:0}},emits:["update-total"],setup(e,{slots:t,emit:n}){let a=0;return()=>{var u,c;const l=(u=t.default)==null?void 0:u.call(t),o=[];let s=0;function i(d){me(d)&&d.forEach(f=>{var p;((p=(f==null?void 0:f.type)||{})==null?void 0:p.name)==="ElTourStep"&&(o.push(f),s+=1)})}return l.length&&i($a((c=l[0])==null?void 0:c.children)),a!==s&&(a=s,n("update-total",s)),o.length?o[e.current]:null}}}),gX=ue({name:"ElTour",inheritAttrs:!1,__name:"tour",props:eX,emits:tX,setup(e,{emit:t}){const n=e,a=t,l=he("tour"),o=V(0),s=V(),i=C(()=>!xt(n.current)),u=V(n.current??0),c=C({get(){return xt(n.current)?u.value:n.current},set(N){(i.value?n.current:u.value)!==N&&(i.value||(u.value=N),a("update:current",N))}}),d=C(()=>{var N;return(N=s.value)==null?void 0:N.target}),f=C(()=>[l.b(),k.value==="primary"?l.m("primary"):""]),p=C(()=>{var N;return((N=s.value)==null?void 0:N.placement)||n.placement}),g=C(()=>{var N;return((N=s.value)==null?void 0:N.contentStyle)??n.contentStyle}),m=C(()=>{var N;return((N=s.value)==null?void 0:N.mask)??n.mask}),v=C(()=>!!m.value&&n.modelValue),h=C(()=>Wt(m.value)?void 0:m.value),b=C(()=>{var N;return!!d.value&&(((N=s.value)==null?void 0:N.showArrow)??n.showArrow)}),y=C(()=>{var N;return((N=s.value)==null?void 0:N.scrollIntoViewOptions)??n.scrollIntoViewOptions}),k=C(()=>{var N;return((N=s.value)==null?void 0:N.type)??n.type}),{nextZIndex:S}=cu(),E=S(),x=C(()=>n.zIndex??E),{mergedPosInfo:$,triggerTarget:w}=lX(d,Ot(n,"modelValue"),Ot(n,"gap"),m,y);fe(()=>n.current,N=>!xt(N)&&(u.value=N)),fe(c,(N,A)=>{!n.modelValue||N===A||a(yt,N)},{flush:"post"}),fe(()=>n.modelValue,N=>{!N&&c.value!==0&&(c.value=0)});const T=()=>{n.closeOnPressEscape&&(a(it,!1),a("close",c.value))},M=N=>{o.value=N},I=mn();return Tt(vf,{currentStep:s,current:c,total:o,showClose:Ot(n,"showClose"),closeIcon:Ot(n,"closeIcon"),mergedType:k,ns:l,slots:I,updateModelValue(N){a(it,N)},onClose(){a("close",c.value)},onFinish(){a("finish")}}),(N,A)=>{var j,F;return O(),H(ze,null,[(O(),oe(Cr,{to:e.appendTo},[K("div",pt({class:f.value},N.$attrs),[q(fX,{visible:v.value,fill:(j=h.value)==null?void 0:j.color,style:je((F=h.value)==null?void 0:F.style),pos:r($),"z-index":x.value,"target-area-clickable":e.targetAreaClickable},null,8,["visible","fill","style","pos","z-index","target-area-clickable"]),e.modelValue?(O(),oe(hX,{key:c.value,reference:r(w),placement:p.value,"show-arrow":b.value,"z-index":x.value,style:je(g.value),onClose:T},{default:X(()=>[q(r(mX),{current:c.value,onUpdateTotal:M},{default:X(()=>[ne(N.$slots,"default")]),_:3},8,["current"])]),_:3},8,["reference","placement","show-arrow","z-index","style"])):te("v-if",!0)],16)],8,["to"])),te(" just for IDE "),te("v-if",!0)],64)}}}),bX=gX;const yX=["aria-label"];var wX=ue({name:"ElTourStep",__name:"step",props:nX,emits:aX,setup(e,{emit:t}){const n=e,a=t,{Close:l}=JS,{t:o}=St(),{currentStep:s,current:i,total:u,showClose:c,closeIcon:d,mergedType:f,ns:p,slots:g,updateModelValue:m,onClose:v,onFinish:h}=Fe(vf);fe(n,T=>{s.value=T},{immediate:!0});const b=C(()=>n.showClose??c.value),y=C(()=>n.closeIcon??d.value??l),k=T=>{if(T)return _s(T,["children","onClick"])},S=()=>{var T,M;i.value-=1,(T=n.prevButtonProps)!=null&&T.onClick&&((M=n.prevButtonProps)==null||M.onClick())},E=()=>{var T;i.value>=u.value-1?x():i.value+=1,(T=n.nextButtonProps)!=null&&T.onClick&&n.nextButtonProps.onClick()},x=()=>{$(),h()},$=()=>{m(!1),v(),a("close")},w=T=>{var M;if(!((M=T.target)!=null&&M.isContentEditable))switch(Gt(T)){case ye.left:T.preventDefault(),i.value>0&&S();break;case ye.right:T.preventDefault(),E()}};return mt(()=>{window.addEventListener("keydown",w)}),zt(()=>{window.removeEventListener("keydown",w)}),(T,M)=>(O(),H(ze,null,[b.value?(O(),H("button",{key:0,"aria-label":r(o)("el.tour.close"),class:P(r(p).e("closebtn")),type:"button",onClick:$},[q(r(Be),{class:P(r(p).e("close"))},{default:X(()=>[(O(),oe(dt(y.value)))]),_:1},8,["class"])],10,yX)):te("v-if",!0),K("header",{class:P([r(p).e("header"),{"show-close":r(c)}])},[ne(T.$slots,"header",{},()=>[K("span",{role:"heading",class:P(r(p).e("title"))},Se(e.title),3)])],2),K("div",{class:P(r(p).e("body"))},[ne(T.$slots,"default",{},()=>[K("span",null,Se(e.description),1)])],2),K("footer",{class:P(r(p).e("footer"))},[K("div",{class:P(r(p).b("indicators"))},[r(g).indicators?(O(),oe(dt(r(g).indicators),{key:0,current:r(i),total:r(u)},null,8,["current","total"])):(O(!0),H(ze,{key:1},bt(r(u),(I,N)=>(O(),H("span",{key:I,class:P([r(p).b("indicator"),r(p).is("active",N===r(i))])},null,2))),128))],2),K("div",{class:P(r(p).b("buttons"))},[r(i)>0?(O(),oe(r(Bn),pt({key:0,size:"small",type:r(f)},k(e.prevButtonProps),{onClick:S}),{default:X(()=>{var I;return[st(Se(((I=e.prevButtonProps)==null?void 0:I.children)??r(o)("el.tour.previous")),1)]}),_:1},16,["type"])):te("v-if",!0),r(i)<=r(u)-1?(O(),oe(r(Bn),pt({key:1,size:"small",type:r(f)==="primary"?"default":"primary"},k(e.nextButtonProps),{onClick:E}),{default:X(()=>{var I;return[st(Se(((I=e.nextButtonProps)==null?void 0:I.children)??(r(i)===r(u)-1?r(o)("el.tour.finish"):r(o)("el.tour.next"))),1)]}),_:1},16,["type"])):te("v-if",!0)],2)],2)],64))}}),vE=wX;const SX=ut(bX,{TourStep:vE}),CX=un(vE),kX=$e({container:{type:G([String,Object])},offset:{type:Number,default:0},bound:{type:Number,default:15},duration:{type:Number,default:300},marker:{type:Boolean,default:!0},type:{type:G(String),default:"default"},direction:{type:G(String),default:"vertical"},selectScrollTop:Boolean}),EX={change:e=>Ve(e),click:(e,t)=>e instanceof MouseEvent&&(Ve(t)||xt(t))},qu=(e=>{if(!It||e==="")return null;if(Ve(e))try{return document.querySelector(e)}catch{return null}return e});function xX(e){let t=0;const n=(...a)=>{t&&Ra(t),t=Wn(()=>{e(...a),t=0})};return n.cancel=()=>{Ra(t),t=0},n}const hE=Symbol("anchor");var TX=ue({name:"ElAnchor",__name:"anchor",props:kX,emits:EX,setup(e,{expose:t,emit:n}){const a=e,l=n,o=mn(),s=V(""),i=V({}),u=V(null),c=V(null),d=V(),f={};let p=!1,g=0;const m=he("anchor"),v=C(()=>[m.b(),a.type==="underline"?m.m("underline"):"",m.m(a.direction)]),h=N=>{f[N.href]=N.el},b=N=>{delete f[N]},y=N=>{s.value!==N&&(s.value=N,l(yt,N))};let k=null,S="";const E=N=>{if(!d.value)return;const A=qu(N);if(!A)return;if(k){if(S===N)return;k()}S=N,p=!0;const j=tb(A,d.value),F=mv(A,j),B=j.scrollHeight-j.clientHeight,D=Math.min(F-a.offset,B);k=yR(d.value,g,D,a.duration,()=>{setTimeout(()=>{p=!1,S=""},20)})},x=N=>{N&&(y(N),E(N))},$=(N,A)=>{l("click",N,A),x(A)},w=xX(()=>{d.value&&(g=nb(d.value));const N=T();p||xt(N)||y(N)}),T=()=>{if(!d.value)return;const N=nb(d.value),A=[];for(const j of Object.keys(f)){const F=qu(j);if(!F)continue;const B=tb(F,d.value),D=mv(F,B);A.push({top:D-a.offset-a.bound,href:j})}A.sort((j,F)=>j.top-F.top);for(let j=0;jN))return F.href}},M=()=>{const N=qu(a.container);!N||ou(N)?d.value=window:d.value=N};Ht(d,"scroll",w);const I=()=>{Ae(()=>{if(!u.value||!c.value||!s.value){i.value={};return}const N=f[s.value];if(!N){i.value={};return}const A=u.value.getBoundingClientRect(),j=c.value.getBoundingClientRect(),F=N.getBoundingClientRect();if(a.direction==="horizontal"){const B=F.left-A.left;i.value={left:`${B}px`,width:`${F.width}px`,opacity:1}}else{const B=F.top-A.top+(F.height-j.height)/2;i.value={top:`${B}px`,opacity:1}}})};return fe(s,I),fe(()=>{var N;return(N=o.default)==null?void 0:N.call(o)},I),mt(()=>{M();const N=decodeURIComponent(window.location.hash);qu(N)?x(N):w()}),fe(()=>a.container,()=>{M()}),Tt(hE,{ns:m,direction:a.direction,currentAnchor:s,addLink:h,removeLink:b,handleClick:$}),t({scrollTo:x}),(N,A)=>(O(),H("div",{ref_key:"anchorRef",ref:u,class:P(v.value)},[e.marker?(O(),H("div",{key:0,ref_key:"markerRef",ref:c,class:P(r(m).e("marker")),style:je(i.value)},null,6)):te("v-if",!0),K("div",{class:P(r(m).e("list"))},[ne(N.$slots,"default")],2)],2))}}),$X=TX;const OX=$e({title:String,href:String}),NX=["href"];var MX=ue({name:"ElAnchorLink",__name:"anchor-link",props:OX,setup(e){const t=e,n=V(null),{ns:a,direction:l,currentAnchor:o,addLink:s,removeLink:i,handleClick:u}=Fe(hE),c=C(()=>[a.e("link"),a.is("active",o.value===t.href)]),d=f=>{u(f,t.href)};return fe(()=>t.href,(f,p)=>{Ae(()=>{p&&i(p),f&&s({href:f,el:n.value})})}),mt(()=>{const{href:f}=t;f&&s({href:f,el:n.value})}),zt(()=>{const{href:f}=t;f&&i(f)}),(f,p)=>(O(),H("div",{class:P(r(a).e("item"))},[K("a",{ref_key:"linkRef",ref:n,class:P(c.value),href:e.href,onClick:d},[ne(f.$slots,"default",{},()=>[st(Se(e.title),1)])],10,NX),f.$slots["sub-link"]&&r(l)==="vertical"?(O(),H("div",{key:0,class:P(r(a).e("list"))},[ne(f.$slots,"sub-link")],2)):te("v-if",!0)],2))}}),mE=MX;const PX=ut($X,{AnchorLink:mE}),IX=un(mE),gE={label:"label",value:"value",disabled:"disabled"},RX=$e({direction:{type:G(String),default:"horizontal"},options:{type:G(Array),default:()=>[]},modelValue:{type:[String,Number,Boolean],default:void 0},props:{type:G(Object),default:()=>gE},block:Boolean,size:In,disabled:{type:Boolean,default:void 0},validateEvent:{type:Boolean,default:!0},id:String,name:String,...ua(["ariaLabel"])}),_X={[it]:e=>Ve(e)||He(e)||Wt(e),[yt]:e=>Ve(e)||He(e)||Wt(e)},AX=["id","aria-label","aria-labelledby"],LX=["name","disabled","checked","onChange"];var VX=ue({name:"ElSegmented",__name:"segmented",props:RX,emits:_X,setup(e,{emit:t}){const n=e,a=t,l=he("segmented"),o=Xn(),s=$n(),i=sn(),{formItem:u}=Kn(),{inputId:c,isLabeledByFormItem:d}=Ea(n,{formItemContext:u}),f=V(null),p=QI(),g=Ft({isInit:!1,width:0,height:0,translateX:0,translateY:0,focusVisible:!1}),m=(I,N)=>{const A=h(N);a(it,A),a(yt,A),I.target.checked=A===n.modelValue},v=C(()=>({...gE,...n.props})),h=I=>rt(I)?I[v.value.value]:I,b=I=>rt(I)?I[v.value.label]:I,y=I=>!!(i.value||rt(I)&&I[v.value.disabled]),k=I=>n.modelValue===h(I),S=I=>n.options.find(N=>h(N)===I),E=I=>[l.e("item"),l.is("selected",k(I)),l.is("disabled",y(I))],x=()=>{if(!f.value)return;const I=f.value.querySelector(".is-selected"),N=f.value.querySelector(".is-selected input");if(!I||!N){g.width=0,g.height=0,g.translateX=0,g.translateY=0,g.focusVisible=!1;return}g.isInit=!0,n.direction==="vertical"?(g.height=I.offsetHeight,g.translateY=I.offsetTop):(g.width=I.offsetWidth,g.translateX=I.offsetLeft);try{g.focusVisible=N.matches(":focus-visible")}catch{}},$=C(()=>[l.b(),l.m(s.value),l.is("block",n.block)]),w=C(()=>({width:n.direction==="vertical"?"100%":`${g.width}px`,height:n.direction==="vertical"?`${g.height}px`:"100%",transform:n.direction==="vertical"?`translateY(${g.translateY}px)`:`translateX(${g.translateX}px)`,display:g.isInit?"block":"none"})),T=C(()=>[l.e("item-selected"),l.is("disabled",y(S(n.modelValue))),l.is("focus-visible",g.focusVisible)]),M=C(()=>n.name||o.value);return on(f,x),fe(p,x),fe(()=>n.options,x,{deep:!0,flush:"post"}),fe(()=>n.modelValue,()=>{var I;x(),n.validateEvent&&((I=u==null?void 0:u.validate)==null||I.call(u,"change").catch(vt))},{flush:"post"}),(I,N)=>e.options.length?(O(),H("div",{key:0,id:r(c),ref_key:"segmentedRef",ref:f,class:P($.value),role:"radiogroup","aria-label":r(d)?void 0:e.ariaLabel||"segmented","aria-labelledby":r(d)?r(u).labelId:void 0},[K("div",{class:P([r(l).e("group"),r(l).m(e.direction)])},[K("div",{style:je(w.value),class:P(T.value)},null,6),(O(!0),H(ze,null,bt(e.options,(A,j)=>(O(),H("label",{key:j,class:P(E(A))},[K("input",{class:P(r(l).e("item-input")),type:"radio",name:M.value,disabled:y(A),checked:k(A),onChange:F=>m(F,A)},null,42,LX),K("div",{class:P(r(l).e("item-label"))},[ne(I.$slots,"default",{item:A},()=>[st(Se(b(A)),1)])],2)],2))),128))],2)],10,AX)):te("v-if",!0)}}),DX=VX;const BX=ut(DX),FX=(e,t)=>{const n=e.toLowerCase();return(t.label||t.value||"").toLowerCase().includes(n)},zX=(e,t,n)=>{const{selectionEnd:a}=e;if(a===null)return;const l=e.value,o=Vn(t);let s=-1,i;for(let u=a-1;u>=0;--u){const c=l[u];if(s===-1&&(c===n||c===` -`||c==="\r")){s=u;continue}if(o.includes(c)){const d=s===-1?a:s;i={pattern:l.slice(u+1,d),start:u+1,end:d,prefix:c,prefixIndex:u,splitIndex:s,selectionEnd:a};break}}return i},HX=(e,t={debug:!1,useSelectionEnd:!1})=>{const n=e.selectionStart!==null?e.selectionStart:0,a=e.selectionEnd!==null?e.selectionEnd:0,l=t.useSelectionEnd?a:n,o=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"];if(t.debug){const p=document.querySelector("#input-textarea-caret-position-mirror-div");p!=null&&p.parentNode&&p.parentNode.removeChild(p)}const s=document.createElement("div");s.id="input-textarea-caret-position-mirror-div",document.body.appendChild(s);const i=s.style,u=window.getComputedStyle(e),c=e.nodeName==="INPUT";i.whiteSpace=c?"nowrap":"pre-wrap",c||(i.wordWrap="break-word"),i.position="absolute",t.debug||(i.visibility="hidden"),o.forEach(p=>{if(c&&p==="lineHeight")if(u.boxSizing==="border-box"){const g=Number.parseInt(u.height),m=Number.parseInt(u.paddingTop)+Number.parseInt(u.paddingBottom)+Number.parseInt(u.borderTopWidth)+Number.parseInt(u.borderBottomWidth),v=m+Number.parseInt(u.lineHeight);g>v?i.lineHeight=`${g-m}px`:g===v?i.lineHeight=u.lineHeight:i.lineHeight="0"}else i.lineHeight=u.height;else i[p]=u[p]}),Bd()?e.scrollHeight>Number.parseInt(u.height)&&(i.overflowY="scroll"):i.overflow="hidden",s.textContent=e.value.slice(0,Math.max(0,l)),c&&s.textContent&&(s.textContent=s.textContent.replace(/\s/g," "));const d=document.createElement("span");d.textContent=e.value.slice(Math.max(0,l))||".",d.style.position="relative",d.style.left=`${-e.scrollLeft}px`,d.style.top=`${-e.scrollTop}px`,s.appendChild(d);const f={top:d.offsetTop+Number.parseInt(u.borderTopWidth),left:d.offsetLeft+Number.parseInt(u.borderLeftWidth),height:Number.parseInt(u.fontSize)*1.5};return t.debug?d.style.backgroundColor="#aaa":document.body.removeChild(s),f.left>=e.clientWidth&&(f.left=e.clientWidth),f},KX=$e({...Kh,options:{type:G(Array),default:()=>[]},prefix:{type:G([String,Array]),default:"@",validator:e=>Ve(e)?e.length===1:e.every(t=>Ve(t)&&t.length===1)},split:{type:String,default:" ",validator:e=>e.length===1},filterOption:{type:G([Boolean,Function]),default:()=>FX,validator:e=>e===!1?!0:We(e)},placement:{type:G(String),default:"bottom"},showArrow:Boolean,offset:{type:Number,default:0},whole:Boolean,checkIsWhole:{type:G(Function)},modelValue:String,loading:Boolean,popperClass:tn.popperClass,popperStyle:tn.popperStyle,popperOptions:{type:G(Object),default:()=>({})},props:{type:G(Object),default:()=>bE}}),WX={[it]:e=>Ve(e),"whole-remove":(e,t)=>Ve(e)&&Ve(t),input:e=>Ve(e),search:(e,t)=>Ve(e)&&Ve(t),select:(e,t)=>rt(e)&&Ve(t),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent},bE={value:"value",label:"label",disabled:"disabled"},jX=$e({options:{type:G(Array),default:()=>[]},loading:Boolean,disabled:Boolean,contentId:String,ariaLabel:String}),qX={select:e=>Ve(e.value)},YX=["id","aria-disabled","aria-selected","onMousemove","onClick"];var UX=ue({name:"ElMentionDropdown",__name:"mention-dropdown",props:jX,emits:qX,setup(e,{expose:t,emit:n}){const a=e,l=n,o=he("mention"),{t:s}=St(),i=V(-1),u=V(),c=V(),d=V(),f=(S,E)=>[o.be("dropdown","item"),o.is("hovering",i.value===E),o.is("disabled",S.disabled||a.disabled)],p=S=>{S.disabled||a.disabled||l("select",S)},g=S=>{i.value=S},m=C(()=>a.disabled||a.options.every(S=>S.disabled)),v=C(()=>a.options[i.value]),h=()=>{!v.value||v.value.disabled||a.disabled||l("select",v.value)},b=S=>{const{options:E}=a;if(E.length===0||m.value)return;S==="next"?(i.value++,i.value===E.length&&(i.value=0)):S==="prev"&&(i.value--,i.value<0&&(i.value=E.length-1));const x=E[i.value];if(x.disabled){b(S);return}Ae(()=>y(x))},y=S=>{var w,T,M,I;const{options:E}=a,x=E.findIndex(N=>N.value===S.value),$=(w=c.value)==null?void 0:w[x];if($){const N=(M=(T=d.value)==null?void 0:T.querySelector)==null?void 0:M.call(T,`.${o.be("dropdown","wrap")}`);N&&wh(N,$)}(I=u.value)==null||I.handleScroll()};return fe(()=>a.options,()=>{m.value||a.options.length===0?i.value=-1:i.value=a.options.findIndex(S=>!S.disabled)},{immediate:!0}),t({hoveringIndex:i,navigateOptions:b,selectHoverOption:h,hoverOption:v}),(S,E)=>(O(),H("div",{ref_key:"dropdownRef",ref:d,class:P(r(o).b("dropdown"))},[S.$slots.header?(O(),H("div",{key:0,class:P(r(o).be("dropdown","header"))},[ne(S.$slots,"header")],2)):te("v-if",!0),ft(q(r(il),{id:e.contentId,ref_key:"scrollbarRef",ref:u,tag:"ul","wrap-class":r(o).be("dropdown","wrap"),"view-class":r(o).be("dropdown","list"),role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical"},{default:X(()=>[(O(!0),H(ze,null,bt(e.options,(x,$)=>(O(),H("li",{id:`${e.contentId}-${$}`,ref_for:!0,ref_key:"optionRefs",ref:c,key:$,class:P(f(x,$)),role:"option","aria-disabled":x.disabled||e.disabled||void 0,"aria-selected":i.value===$,onMousemove:w=>g($),onClick:Je(w=>p(x),["stop"])},[ne(S.$slots,"label",{item:x,index:$},()=>[K("span",null,Se(x.label??x.value),1)])],42,YX))),128))]),_:3},8,["id","wrap-class","view-class","aria-label"]),[[At,e.options.length>0&&!e.loading]]),e.loading?(O(),H("div",{key:1,class:P(r(o).be("dropdown","loading"))},[ne(S.$slots,"loading",{},()=>[st(Se(r(s)("el.mention.loading")),1)])],2)):te("v-if",!0),S.$slots.footer?(O(),H("div",{key:2,class:P(r(o).be("dropdown","footer"))},[ne(S.$slots,"footer")],2)):te("v-if",!0)],2))}}),GX=UX,XX=ue({name:"ElMention",inheritAttrs:!1,__name:"mention",props:KX,emits:WX,setup(e,{expose:t,emit:n}){const a=e,l=n,o=C(()=>{const D=Un.props??[],R=me(D)?D:Object.keys(D);return Ll(a,R)}),s=he("mention"),i=sn(),u=Xn(),c=V(),d=V(),f=V(),p=V(!1),g=V(),m=V(),v=C(()=>a.showArrow?a.placement:`${a.placement}-start`),h=C(()=>a.showArrow?["bottom","top"]:["bottom-start","top-start"]),b=C(()=>({...bE,...a.props})),y=D=>{const R={label:D[b.value.label],value:D[b.value.value],disabled:D[b.value.disabled]};return{...D,...R}},k=C(()=>a.options.map(y)),S=C(()=>{const{filterOption:D}=a;return!m.value||!D?k.value:k.value.filter(R=>D(m.value.pattern,R))}),E=C(()=>p.value&&(!!S.value.length||a.loading)),x=C(()=>{var D;return`${u.value}-${(D=f.value)==null?void 0:D.hoveringIndex}`}),$=D=>{l(it,D),l(Tn,D),j()},w=D=>{var z,L,W,Y;if((z=c.value)!=null&&z.isComposing)return;const R=Gt(D);switch(R){case ye.left:case ye.right:j();break;case ye.up:case ye.down:if(!p.value)return;D.preventDefault(),(L=f.value)==null||L.navigateOptions(R===ye.up?"prev":"next");break;case ye.enter:case ye.numpadEnter:if(!p.value){a.type!=="textarea"&&j();return}D.preventDefault(),(W=f.value)!=null&&W.hoverOption?(Y=f.value)==null||Y.selectHoverOption():p.value=!1;break;case ye.esc:if(!p.value)return;D.preventDefault(),p.value=!1;break;case ye.backspace:if(a.whole&&m.value){const{splitIndex:J,selectionEnd:Z,pattern:Q,prefixIndex:ee,prefix:ie}=m.value,ve=A();if(!ve)return;const pe=ve.value,re=k.value.find(_=>_.value===Q);if((We(a.checkIsWhole)?a.checkIsWhole(Q,ie):re)&&J!==-1&&J+1===Z){D.preventDefault();const _=pe.slice(0,ee)+pe.slice(J+1);l(it,_),l(Tn,_),l("whole-remove",Q,ie);const U=ee;Ae(()=>{ve.selectionStart=U,ve.selectionEnd=U,B()})}}}},{wrapperRef:T}=ho(c,{disabled:i,afterFocus(){j()},beforeBlur(D){var R;return(R=d.value)==null?void 0:R.isFocusInsideContent(D)},afterBlur(){p.value=!1}}),M=()=>{j()},I=D=>a.options.find(R=>D.value===R[b.value.value]),N=D=>{if(!m.value)return;const R=A();if(!R)return;const z=R.value,{split:L}=a,W=z.slice(m.value.end),Y=W.startsWith(L),J=`${D.value}${Y?"":L}`,Z=z.slice(0,m.value.start)+J+W;l(it,Z),l(Tn,Z),l("select",I(D),m.value.prefix);const Q=m.value.start+J.length+(Y?1:0);Ae(()=>{R.selectionStart=Q,R.selectionEnd=Q,R.focus(),B()})},A=()=>{var D,R;return a.type==="textarea"?(D=c.value)==null?void 0:D.textarea:(R=c.value)==null?void 0:R.input},j=()=>{setTimeout(()=>{F(),B(),Ae(()=>{var D;return(D=d.value)==null?void 0:D.updatePopper()})},0)},F=()=>{const D=A();if(!D)return;const R=HX(D),z=D.getBoundingClientRect(),L=T.value.getBoundingClientRect();g.value={position:"absolute",width:0,height:`${R.height}px`,left:`${R.left+z.left-L.left}px`,top:`${R.top+z.top-L.top}px`}},B=()=>{const D=A();if(document.activeElement!==D){p.value=!1;return}const{prefix:R,split:z}=a;if(m.value=zX(D,R,z),m.value&&m.value.splitIndex===-1){p.value=!0,l("search",m.value.pattern,m.value.prefix);return}p.value=!1};return t({input:c,tooltip:d,dropdownVisible:E}),(D,R)=>(O(),H("div",{ref_key:"wrapperRef",ref:T,class:P(r(s).b())},[q(r(Un),pt(pt(o.value,D.$attrs),{ref_key:"elInputRef",ref:c,"model-value":e.modelValue,disabled:r(i),role:E.value?"combobox":void 0,"aria-activedescendant":E.value?x.value||"":void 0,"aria-controls":E.value?r(u):void 0,"aria-expanded":E.value||void 0,"aria-label":e.ariaLabel,"aria-autocomplete":E.value?"none":void 0,"aria-haspopup":E.value?"listbox":void 0,onInput:$,onKeydown:w,onMousedown:M}),va({_:2},[bt(D.$slots,(z,L)=>({name:L,fn:X(W=>[ne(D.$slots,L,Cl(kl(W)))])}))]),1040,["model-value","disabled","role","aria-activedescendant","aria-controls","aria-expanded","aria-label","aria-autocomplete","aria-haspopup"]),q(r(Hn),{ref_key:"tooltipRef",ref:d,visible:E.value,"popper-class":[r(s).e("popper"),e.popperClass],"popper-style":e.popperStyle,"popper-options":e.popperOptions,placement:v.value,"fallback-placements":h.value,effect:"light",pure:"",offset:e.offset,"show-arrow":e.showArrow},{default:X(()=>[K("div",{style:je(g.value)},null,4)]),content:X(()=>[q(GX,{ref_key:"dropdownRef",ref:f,options:S.value,disabled:r(i),loading:e.loading,"content-id":r(u),"aria-label":e.ariaLabel,onSelect:N,onClick:R[0]||(R[0]=Je(z=>{var L;return(L=c.value)==null?void 0:L.focus()},["stop"]))},va({_:2},[bt(D.$slots,(z,L)=>({name:L,fn:X(W=>[ne(D.$slots,L,Cl(kl(W)))])}))]),1032,["options","disabled","loading","content-id","aria-label"])]),_:3},8,["visible","popper-class","popper-style","popper-options","placement","fallback-placements","offset","show-arrow"])],2))}}),JX=XX;const ZX=ut(JX),QX=$e({layout:{type:String,default:"horizontal",values:["horizontal","vertical"]},lazy:Boolean}),eJ={resizeStart:(e,t)=>!0,resize:(e,t)=>!0,resizeEnd:(e,t)=>!0,collapse:(e,t,n)=>!0},tJ=$e({min:{type:[String,Number]},max:{type:[String,Number]},size:{type:[String,Number]},resizable:{type:Boolean,default:!0},collapsible:Boolean}),nJ={"update:size":e=>typeof e=="number"||typeof e=="string"};function aJ(e){const t=V(),{width:n,height:a}=Ii(t);return{containerEl:t,containerSize:C(()=>e.value==="horizontal"?n.value:a.value)}}function lJ(e,t,n,a){const l=h=>h*t.value||0;function o(h,b){return Hd(h)?l(Fd(h)):Kd(h)?zd(h):h??b}const s=V(0),i=V(null);let u=[],c=vt;const d=C(()=>e.value.map(h=>[h.min,h.max]));fe(a,()=>{if(s.value){const h=new MouseEvent("mouseup",{bubbles:!0});window.dispatchEvent(h)}});const f=h=>{s.value=0,i.value={index:h,confirmed:!1},u=n.value},p=(h,b)=>{var I;let y=null;if((!i.value||!i.value.confirmed)&&b!==0){if(b>0)y=h,i.value={index:h,confirmed:!0};else for(let N=h;N>=0;N-=1)if(u[N]>0){y=N,i.value={index:N,confirmed:!0};break}}const k=y??((I=i.value)==null?void 0:I.index)??h,S=[...u],E=k+1,x=o(d.value[k][0],0),$=o(d.value[E][0],0),w=o(d.value[k][1],t.value||0),T=o(d.value[E][1],t.value||0);let M=b;S[k]+Mw&&(M=w-S[k]),S[E]-M>T&&(M=S[E]-T),S[k]+=M,S[E]-=M,s.value=M,c=()=>{e.value.forEach((N,A)=>{N.size=S[A]}),c=vt},a.value||c()},g=()=>{a.value&&c(),s.value=0,i.value=null,u=[]},m=[];return{lazyOffset:s,onMoveStart:f,onMoving:p,onMoveEnd:g,movingIndex:i,onCollapse:(h,b)=>{m.length||m.push(...n.value.map(($,w)=>{var T;return $<=0?o((T=d.value[w])==null?void 0:T[0],0):$}));const y=n.value,k=b==="start"?h:h+1,S=b==="start"?h+1:h,E=y[k],x=y[S];if(E!==0&&x!==0)y[k]=0,y[S]+=E,m[h]=E;else{const $=E+x,w=ya(m[h],0,$),T=$-w;y[S]=w,y[k]=T}e.value.forEach(($,w)=>{$.size=y[w]})}}}function oJ(e,t){const n=C(()=>e.value.map(s=>s.size)),a=C(()=>e.value.length),l=V([]);fe([n,a,t],()=>{var c;let s=[],i=0;for(let d=0;dd+(f||0),0);if(u>1||!i){const d=1/u;s=s.map(f=>f===void 0?0:f*d)}else{const d=(1-u)/i;s=s.map(f=>f===void 0?d:f)}l.value=s});const o=s=>s*t.value;return{percentSizes:l,pxSizes:C(()=>l.value.map(o))}}const yE=Symbol("splitterRootContextKey");var sJ=ue({name:"ElSplitter",__name:"splitter",props:QX,emits:eJ,setup(e,{emit:t}){const n=he("splitter"),a=t,l=e,o=Ot(l,"layout"),s=Ot(l,"lazy"),{containerEl:i,containerSize:u}=aJ(o),{removeChild:c,children:d,addChild:f,ChildrenSorter:p}=Jd(ht(),"ElSplitterPanel");fe(d,()=>{h.value=null,d.value.forEach((M,I)=>{M.setIndex(I)})});const{percentSizes:g,pxSizes:m}=oJ(d,u),{lazyOffset:v,movingIndex:h,onMoveStart:b,onMoving:y,onMoveEnd:k,onCollapse:S}=lJ(d,u,m,s),E=C(()=>({[n.cssVarBlockName("bar-offset")]:s.value?`${v.value}px`:void 0}));return Tt(yE,Ft({panels:d,percentSizes:g,pxSizes:m,layout:o,lazy:s,movingIndex:h,containerSize:u,onMoveStart:M=>{b(M),a("resizeStart",M,m.value)},onMoving:(M,I)=>{y(M,I),s.value||a("resize",M,m.value)},onMoveEnd:async M=>{k(),await Ae(),a("resizeEnd",M,m.value)},onCollapse:(M,I)=>{S(M,I),a("collapse",M,I,m.value)},registerPanel:f,unregisterPanel:c})),(M,I)=>(O(),H("div",{ref_key:"containerEl",ref:i,class:P([r(n).b(),r(n).e(o.value)]),style:je(E.value)},[ne(M.$slots,"default"),q(r(p)),te(" Prevent iframe touch events from breaking "),r(h)?(O(),H("div",{key:0,class:P([r(n).e("mask"),r(n).e(`mask-${o.value}`)])},null,2)):te("v-if",!0)],6))}}),rJ=sJ;function iJ(e){return e&&rt(e)?e:{start:!!e,end:!!e}}function x0(e,t,n,a){return!!(e!=null&&e.collapsible.end&&t>0||n!=null&&n.collapsible.start&&a===0&&t>0)}var uJ=ue({name:"ElSplitterBar",__name:"split-bar",props:{index:{type:Number,required:!0},layout:{type:String,values:["horizontal","vertical"],default:"horizontal"},resizable:{type:Boolean,default:!0},lazy:Boolean,startCollapsible:Boolean,endCollapsible:Boolean},emits:["moveStart","moving","moveEnd","collapse"],setup(e,{emit:t}){const n=he("splitter-bar"),a=e,l=t,o=C(()=>a.layout==="horizontal"),s=C(()=>o.value?{width:0}:{height:0}),i=C(()=>({width:o.value?"16px":"100%",height:o.value?"100%":"16px",cursor:a.resizable?o.value?"ew-resize":"ns-resize":"auto",touchAction:"none"})),u=C(()=>{const y=n.e("dragger");return{[`${y}-horizontal`]:o.value,[`${y}-vertical`]:!o.value,[`${y}-active`]:!!c.value}}),c=V(null),d=y=>{a.resizable&&(c.value=[y.pageX,y.pageY],l("moveStart",a.index),window.addEventListener("mouseup",m),window.addEventListener("mousemove",p))},f=y=>{if(a.resizable&&y.touches.length===1){y.preventDefault();const k=y.touches[0];c.value=[k.pageX,k.pageY],l("moveStart",a.index),window.addEventListener("touchend",v),window.addEventListener("touchmove",g)}},p=y=>{const{pageX:k,pageY:S}=y,E=k-c.value[0],x=S-c.value[1],$=o.value?E:x;l("moving",a.index,$)},g=y=>{if(y.touches.length===1){y.preventDefault();const k=y.touches[0],S=k.pageX-c.value[0],E=k.pageY-c.value[1],x=o.value?S:E;l("moving",a.index,x)}},m=()=>{c.value=null,window.removeEventListener("mouseup",m),window.removeEventListener("mousemove",p),l("moveEnd",a.index)},v=()=>{c.value=null,window.removeEventListener("touchend",v),window.removeEventListener("touchmove",g),l("moveEnd",a.index)},h=C(()=>o.value?ro:Zd),b=C(()=>o.value?ra:jl);return(y,k)=>(O(),H("div",{class:P([r(n).b()]),style:je(s.value)},[e.startCollapsible?(O(),H("div",{key:0,class:P([r(n).e("collapse-icon"),r(n).e(`${e.layout}-collapse-icon-start`)]),onClick:k[0]||(k[0]=S=>l("collapse",e.index,"start"))},[ne(y.$slots,"start-collapsible",{},()=>[(O(),oe(dt(h.value),{style:{width:"12px",height:"12px"}}))])],2)):te("v-if",!0),K("div",{class:P([r(n).e("dragger"),u.value,r(n).is("disabled",!e.resizable),r(n).is("lazy",e.resizable&&e.lazy)]),style:je(i.value),onMousedown:d,onTouchstart:f},null,38),e.endCollapsible?(O(),H("div",{key:1,class:P([r(n).e("collapse-icon"),r(n).e(`${e.layout}-collapse-icon-end`)]),onClick:k[1]||(k[1]=S=>l("collapse",e.index,"end"))},[ne(y.$slots,"end-collapsible",{},()=>[(O(),oe(dt(b.value),{style:{width:"12px",height:"12px"}}))])],2)):te("v-if",!0)],6))}}),cJ=uJ;const T0="ElSplitterPanel";var dJ=ue({name:T0,__name:"split-panel",props:tJ,emits:nJ,setup(e,{expose:t,emit:n}){const a=he("splitter-panel"),l=e,o=n,s=Fe(yE);s||rn(T0,"usage: ");const{panels:i,layout:u,lazy:c,containerSize:d,pxSizes:f}=Fn(s),{registerPanel:p,unregisterPanel:g,onCollapse:m,onMoveEnd:v,onMoveStart:h,onMoving:b}=s,y=V(),k=ht(),S=k.uid,E=V(0),x=C(()=>i.value[E.value]),$=R=>{E.value=R},w=C(()=>x.value?f.value[E.value]??0:0),T=C(()=>x.value?f.value[E.value+1]??0:0),M=C(()=>x.value?i.value[E.value+1]:null),I=C(()=>{var R;return M.value?l.resizable&&((R=M.value)==null?void 0:R.resizable)&&(w.value!==0||!l.min)&&(T.value!==0||!M.value.min):!1}),N=C(()=>x.value?E.value!==i.value.length-1:!1),A=C(()=>x0(x.value,w.value,M.value,T.value)),j=C(()=>x0(M.value,T.value,x.value,w.value));function F(R){return Hd(R)?Fd(R)*d.value||0:Kd(R)?zd(R):R??0}let B=!1;fe(()=>l.size,()=>{if(!B&&x.value){if(!d.value){x.value.size=l.size;return}const R=F(l.size),z=F(l.max),L=F(l.min),W=Math.min(Math.max(R,L||0),z||R);W!==R&&o("update:size",W),x.value.size=W}}),fe(()=>{var R;return(R=x.value)==null?void 0:R.size},R=>{R!==l.size&&(B=!0,o("update:size",R),Ae(()=>B=!1))}),fe(()=>l.resizable,R=>{x.value&&(x.value.resizable=R)});const D=Ft({uid:S,getVnode:()=>k.vnode,setIndex:$,...l,collapsible:C(()=>iJ(l.collapsible))});return p(D),zt(()=>g(D)),t({splitterPanelRef:y}),(R,z)=>(O(),H(ze,null,[K("div",pt({ref_key:"panelEl",ref:y,class:[r(a).b()],style:{flexBasis:`${w.value}px`}},R.$attrs),[ne(R.$slots,"default")],16),N.value?(O(),oe(cJ,{key:0,index:E.value,layout:r(u),lazy:r(c),resizable:I.value,"start-collapsible":A.value,"end-collapsible":j.value,onMoveStart:r(h),onMoving:r(b),onMoveEnd:r(v),onCollapse:r(m)},{"start-collapsible":X(()=>[ne(R.$slots,"start-collapsible")]),"end-collapsible":X(()=>[ne(R.$slots,"end-collapsible")]),_:3},8,["index","layout","lazy","resizable","start-collapsible","end-collapsible","onMoveStart","onMoving","onMoveEnd","onCollapse"])):te("v-if",!0)],64))}}),wE=dJ;const fJ=ut(rJ,{SplitPanel:wE}),pJ=un(wE),tl="ElInfiniteScroll",vJ={delay:{type:Number,default:200},distance:{type:Number,default:0},disabled:{type:Boolean,default:!1},immediate:{type:Boolean,default:!0}},Im=(e,t)=>Object.entries(vJ).reduce((n,[a,l])=>{const{type:o,default:s}=l,i=e.getAttribute(`infinite-scroll-${a}`);let u=t[i]??i??s;return u=u==="false"?!1:u,u=o(u),n[a]=Number.isNaN(u)?s:u,n},{}),SE=e=>{const{observer:t}=e[tl];t&&(t.disconnect(),delete e[tl].observer)},hJ=(e,t)=>{const{container:n,containerEl:a,instance:l,observer:o,lastScrollTop:s}=e[tl],{disabled:i,distance:u}=Im(e,l),{clientHeight:c,scrollHeight:d,scrollTop:f}=a,p=f-s;if(e[tl].lastScrollTop=f,o||i||p<0)return;let g=!1;if(n===e)g=d-(c+f)<=u;else{const{clientTop:m,scrollHeight:v}=e,h=mv(e,a);g=f+c>=h+m+v-u}g&&t.call(l)};function cp(e,t){const{containerEl:n,instance:a}=e[tl],{disabled:l}=Im(e,a);l||n.clientHeight===0||(n.scrollHeight<=n.clientHeight?t.call(a):SE(e))}const mJ={async mounted(e,t){const{instance:n,value:a}=t;Ol({scope:tl,from:"the directive v-infinite-scroll",replacement:"the el-scrollbar infinite scroll",version:"3.0.0",ref:"https://element-plus.org/en-US/component/scrollbar#infinite-scroll"},!0),We(a)||rn(tl,"'v-infinite-scroll' binding value must be a function"),await Ae();const{delay:l,immediate:o}=Im(e,n),s=yh(e,!0),i=s===window?document.documentElement:s,u=Oo(hJ.bind(null,e,a),l);if(s){if(e[tl]={instance:n,container:s,containerEl:i,delay:l,cb:a,onScroll:u,lastScrollTop:i.scrollTop},o){const c=new MutationObserver(Oo(cp.bind(null,e,a),50));e[tl].observer=c,c.observe(e,{childList:!0,subtree:!0}),cp(e,a)}s.addEventListener("scroll",u)}},unmounted(e){if(!e.ElInfiniteScroll)return;const{container:t,onScroll:n}=e[tl];t==null||t.removeEventListener("scroll",n),SE(e)},async updated(e){if(!e.ElInfiniteScroll)await Ae();else{const{containerEl:t,cb:n,observer:a}=e[tl];t.clientHeight&&a&&cp(e,n)}}},Rv=mJ;Rv.install=e=>{e.directive("InfiniteScroll",Rv)};const gJ=Rv;function bJ(e,t){let n,a=!1;const l=V(!1),o=Ft({...e,originalPosition:"",originalOverflow:"",visible:!1});function s(m){o.text=m}function i(){if(a)return;a=!0;const m=o.parent,v=g.ns||g._.exposed.ns;if(!m.vLoadingAddClassList){let b=m.getAttribute("loading-number");b=Number.parseInt(b)-1,b?m.setAttribute("loading-number",b.toString()):(sa(m,v.bm("parent","relative")),m.removeAttribute("loading-number")),sa(m,v.bm("parent","hidden"))}u(),p.unmount();const h=g.$;h.vnode.el=null,h.subTree=null,p._container=null}function u(){var m,v;(v=(m=g.$el)==null?void 0:m.parentNode)==null||v.removeChild(g.$el)}function c(){var m;e.beforeClose&&!e.beforeClose()||(l.value=!0,clearTimeout(n),n=setTimeout(d,400),o.visible=!1,(m=e.closed)==null||m.call(e))}function d(){if(!l.value)return;const m=o.parent;l.value=!1,m.vLoadingAddClassList=void 0,i()}const p=iw(ue({name:"ElLoading",setup(m,{expose:v}){const{ns:h,zIndex:b}=af("loading");return v({ns:h,zIndex:b}),()=>{const y=o.spinner||o.svg,k=Ge("svg",{class:"circular",viewBox:o.svgViewBox?o.svgViewBox:"0 0 50 50",...y?{innerHTML:y}:{}},y?void 0:[Ge("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),S=o.text?Ge("p",{class:h.b("text")},[o.text]):void 0;return Ge(zn,{name:h.b("fade"),onAfterLeave:d},{default:X(()=>[ft(q("div",{style:{backgroundColor:o.background||""},class:[h.b("mask"),o.customClass,h.is("fullscreen",o.fullscreen)]},[Ge("div",{class:h.b("spinner")},[k,S])]),[[At,o.visible]])])})}}}));Object.assign(p._context,t??{});const g=p.mount(document.createElement("div"));return{...Fn(o),setText:s,removeElLoadingChild:u,close:c,handleAfterLeave:d,vm:g,get $el(){return a?null:g.$el}}}let Yu;const nr=function(e={},t){if(!It)return;const n=yJ(e);if(n.fullscreen&&Yu)return Yu;const a=bJ({...n,closed:()=>{var o;(o=n.closed)==null||o.call(n),n.fullscreen&&(Yu=void 0)}},t??nr._context);wJ(n,n.parent,a),$0(n,n.parent,a),n.parent.vLoadingAddClassList=()=>$0(n,n.parent,a);let l=n.parent.getAttribute("loading-number");return l?l=`${Number.parseInt(l)+1}`:l="1",n.parent.setAttribute("loading-number",l),n.parent.appendChild(a.$el),Ae(()=>a.visible.value=n.visible),n.fullscreen&&(Yu=a),a},yJ=e=>{let t;return Ve(e.target)?t=document.querySelector(e.target)??document.body:t=e.target||document.body,{parent:t===document.body||e.body?document.body:t,background:e.background||"",svg:e.svg||"",svgViewBox:e.svgViewBox||"",spinner:e.spinner||!1,text:e.text||"",fullscreen:t===document.body&&(e.fullscreen??!0),lock:e.lock??!1,customClass:e.customClass||"",visible:e.visible??!0,beforeClose:e.beforeClose,closed:e.closed,target:t}},wJ=async(e,t,n)=>{const{nextZIndex:a}=n.vm.zIndex||n.vm._.exposed.zIndex,l={};if(e.fullscreen)n.originalPosition.value=Sl(document.body,"position"),n.originalOverflow.value=Sl(document.body,"overflow"),l.zIndex=a();else if(e.parent===document.body){n.originalPosition.value=Sl(document.body,"position"),await Ae();for(const o of["top","left"]){const s=o==="top"?"scrollTop":"scrollLeft";l[o]=`${e.target.getBoundingClientRect()[o]+document.body[s]+document.documentElement[s]-Number.parseInt(Sl(document.body,`margin-${o}`),10)}px`}for(const o of["height","width"])l[o]=`${e.target.getBoundingClientRect()[o]}px`}else n.originalPosition.value=Sl(t,"position");for(const[o,s]of Object.entries(l))n.$el.style[o]=s},$0=(e,t,n)=>{const a=n.vm.ns||n.vm._.exposed.ns;["absolute","fixed","sticky"].includes(n.originalPosition.value)?sa(t,a.bm("parent","relative")):Da(t,a.bm("parent","relative")),e.fullscreen&&e.lock?Da(t,a.bm("parent","hidden")):sa(t,a.bm("parent","hidden"))};nr._context=null;const ti=Symbol("ElLoading"),ts=e=>`element-loading-${uo(e)}`,O0=(e,t)=>{const n=t.instance,a=c=>rt(t.value)?t.value[c]:void 0,l=c=>{const d=Ve(c)&&(n==null?void 0:n[c])||c;return V(d)},o=c=>l(a(c)||e.getAttribute(ts(c))),s=a("fullscreen")??t.modifiers.fullscreen,i={text:o("text"),svg:o("svg"),svgViewBox:o("svgViewBox"),spinner:o("spinner"),background:o("background"),customClass:o("customClass"),fullscreen:s,target:a("target")??(s?void 0:e),body:a("body")??t.modifiers.body,lock:a("lock")??t.modifiers.lock},u=nr(i);u._context=hi._context,e[ti]={options:i,instance:u}},SJ=(e,t)=>{for(const n of Object.keys(e))Qt(e[n])&&(e[n].value=t[n])},hi={mounted(e,t){t.value&&O0(e,t)},updated(e,t){const n=e[ti];if(!t.value){n==null||n.instance.close(),e[ti]=null;return}n?SJ(n.options,rt(t.value)?t.value:{text:e.getAttribute(ts("text")),svg:e.getAttribute(ts("svg")),svgViewBox:e.getAttribute(ts("svgViewBox")),spinner:e.getAttribute(ts("spinner")),background:e.getAttribute(ts("background")),customClass:e.getAttribute(ts("customClass"))}):O0(e,t)},unmounted(e){var t;(t=e[ti])==null||t.instance.close(),e[ti]=null}};hi._context=null;const CJ={install(e){nr._context=e._context,hi._context=e._context,e.directive("loading",hi),e.config.globalProperties.$loading=nr},directive:hi,service:nr},CE=["primary","success","info","warning","error"],kE=["top","top-left","top-right","bottom","bottom-left","bottom-right"],ta=dn({customClass:"",dangerouslyUseHTMLString:!1,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:!1,type:"info",plain:!1,offset:16,placement:void 0,zIndex:0,grouping:!1,repeatNum:1,appendTo:It?document.body:void 0}),kJ=$e({customClass:{type:G([String,Array,Object,Boolean]),default:ta.customClass},dangerouslyUseHTMLString:{type:Boolean,default:ta.dangerouslyUseHTMLString},duration:{type:Number,default:ta.duration},icon:{type:Ut,default:ta.icon},id:{type:String,default:ta.id},message:{type:G([String,Object,Function]),default:ta.message},onClose:{type:G(Function),default:ta.onClose},showClose:{type:Boolean,default:ta.showClose},type:{type:String,values:CE,default:ta.type},plain:{type:Boolean,default:ta.plain},offset:{type:Number,default:ta.offset},placement:{type:String,values:kE,default:ta.placement},zIndex:{type:Number,default:ta.zIndex},grouping:{type:Boolean,default:ta.grouping},repeatNum:{type:Number,default:ta.repeatNum}}),EJ={destroy:()=>!0},ol=vd({}),xJ=e=>(ol[e]||(ol[e]=vd([])),ol[e]),TJ=(e,t)=>{const n=ol[t]||[],a=n.findIndex(s=>s.id===e),l=n[a];let o;return a>0&&(o=n[a-1]),{current:l,prev:o}},$J=(e,t)=>{const{prev:n}=TJ(e,t);return n?n.vm.exposed.bottom.value:0},OJ=(e,t,n)=>(ol[n]||[]).findIndex(a=>a.id===e)>0?16:t,NJ=["id"],MJ=["innerHTML"];var PJ=ue({name:"ElMessage",__name:"message",props:kJ,emits:EJ,setup(e,{expose:t,emit:n}){const{Close:a}=Dh,l=e,o=n,s=V(!1),{ns:i,zIndex:u}=af("message"),{currentZIndex:c,nextZIndex:d}=u,f=V(),p=V(!1),g=V(0);let m;const v=C(()=>l.type?l.type==="error"?"danger":l.type:"info"),h=C(()=>{const A=l.type;return{[i.bm("icon",A)]:A&&zo[A]}}),b=C(()=>l.icon||zo[l.type]||""),y=C(()=>l.placement||"top"),k=C(()=>$J(l.id,y.value)),S=C(()=>Math.max(OJ(l.id,l.offset,y.value)+k.value,l.offset)),E=C(()=>g.value+S.value),x=C(()=>y.value.includes("left")?i.is("left"):y.value.includes("right")?i.is("right"):i.is("center")),$=C(()=>y.value.startsWith("top")?"top":"bottom"),w=C(()=>({[$.value]:`${S.value}px`,zIndex:c.value}));function T(){l.duration!==0&&({stop:m}=cr(()=>{I()},l.duration))}function M(){m==null||m()}function I(){p.value=!1,Ae(()=>{var A;s.value||((A=l.onClose)==null||A.call(l),o("destroy"))})}function N(A){Gt(A)===ye.esc&&I()}return mt(()=>{T(),d(),p.value=!0}),fe(()=>l.repeatNum,()=>{M(),T()}),Ht(document,"keydown",N),on(f,()=>{g.value=f.value.getBoundingClientRect().height}),t({visible:p,bottom:E,close:I}),(A,j)=>(O(),oe(zn,{name:r(i).b("fade"),onBeforeEnter:j[0]||(j[0]=F=>s.value=!0),onBeforeLeave:e.onClose,onAfterLeave:j[1]||(j[1]=F=>A.$emit("destroy")),persisted:""},{default:X(()=>[ft(K("div",{id:e.id,ref_key:"messageRef",ref:f,class:P([r(i).b(),{[r(i).m(e.type)]:e.type},r(i).is("closable",e.showClose),r(i).is("plain",e.plain),r(i).is("bottom",$.value==="bottom"),x.value,e.customClass]),style:je(w.value),role:"alert",onMouseenter:M,onMouseleave:T},[e.repeatNum>1?(O(),oe(r(hC),{key:0,value:e.repeatNum,type:v.value,class:P(r(i).e("badge"))},null,8,["value","type","class"])):te("v-if",!0),b.value?(O(),oe(r(Be),{key:1,class:P([r(i).e("icon"),h.value])},{default:X(()=>[(O(),oe(dt(b.value)))]),_:1},8,["class"])):te("v-if",!0),!e.dangerouslyUseHTMLString||A.$slots.default?(O(),H("p",{key:2,class:P(r(i).e("content"))},[ne(A.$slots,"default",{},()=>[st(Se(e.message),1)])],2)):(O(),H(ze,{key:3},[te(" Caution here, message could've been compromised, never use user's input as message "),K("p",{class:P(r(i).e("content")),innerHTML:e.message},null,10,MJ)],2112)),e.showClose?(O(),oe(r(Be),{key:4,class:P(r(i).e("closeBtn")),onClick:Je(I,["stop"])},{default:X(()=>[q(r(a))]),_:1},8,["class"])):te("v-if",!0)],46,NJ),[[At,p.value]])]),_:3},8,["name","onBeforeLeave"]))}}),IJ=PJ;let RJ=1;const _J=e=>{if(!e.appendTo)e.appendTo=document.body;else if(Ve(e.appendTo)){let t=document.querySelector(e.appendTo);wa(t)||(Kt("ElMessage","the appendTo option is not an HTMLElement. Falling back to document.body."),t=document.body),e.appendTo=t}},AJ=e=>{!e.placement&&Ve(aa.placement)&&aa.placement&&(e.placement=aa.placement),e.placement||(e.placement="top"),kE.includes(e.placement)||(Kt("ElMessage",`Invalid placement: ${e.placement}. Falling back to 'top'.`),e.placement="top")},EE=e=>{const t=!e||Ve(e)||Jt(e)||We(e)?{message:e}:e,n={...ta,...t};return _J(n),AJ(n),Wt(aa.grouping)&&!n.grouping&&(n.grouping=aa.grouping),He(aa.duration)&&n.duration===3e3&&(n.duration=aa.duration),He(aa.offset)&&n.offset===16&&(n.offset=aa.offset),Wt(aa.showClose)&&!n.showClose&&(n.showClose=aa.showClose),Wt(aa.plain)&&!n.plain&&(n.plain=aa.plain),n},LJ=e=>{const t=e.props.placement||"top",n=ol[t],a=n.indexOf(e);if(a===-1)return;n.splice(a,1);const{handler:l}=e;l.close()},VJ=({appendTo:e,...t},n)=>{const a=`message_${RJ++}`,l=t.onClose,o=document.createElement("div"),s={...t,id:a,onClose:()=>{l==null||l(),LJ(c)},onDestroy:()=>{Bo(null,o)}},i=q(IJ,s,We(s.message)||Jt(s.message)?{default:We(s.message)?s.message:()=>s.message}:null);i.appContext=n||Ns._context,Bo(i,o),e.appendChild(o.firstElementChild);const u=i.component,c={id:a,vnode:i,vm:u,handler:{close:()=>{u.exposed.close()}},props:i.component.props};return c},Ns=(e={},t)=>{if(!It)return{close:()=>{}};const n=EE(e),a=xJ(n.placement||"top");if(n.grouping&&a.length){const o=a.find(({vnode:s})=>{var i;return((i=s.props)==null?void 0:i.message)===n.message});if(o)return o.props.repeatNum+=1,o.props.type=n.type,o.handler}if(He(aa.max)&&a.length>=aa.max)return{close:()=>{}};const l=VJ(n,t);return a.push(l),l.handler};CE.forEach(e=>{Ns[e]=(t={},n)=>{const a=EE(t);return Ns({...a,type:e},n)}});function DJ(e){for(const t in ol)if(Vt(ol,t)){const n=[...ol[t]];for(const a of n)(!e||e===a.props.type)&&a.handler.close()}}function BJ(e){ol[e]&&[...ol[e]].forEach(t=>t.handler.close())}Ns.closeAll=DJ;Ns.closeAllByPlacement=BJ;Ns._context=null;const An=jS(Ns,"$message");var FJ=ue({name:"ElMessageBox",directives:{TrapFocus:LV},components:{ElButton:Bn,ElFocusTrap:Nr,ElInput:Un,ElOverlay:sm,ElIcon:Be,...Dh},inheritAttrs:!1,props:{buttonSize:{type:String,validator:C2},modal:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},closeOnHashChange:{type:Boolean,default:!0},center:Boolean,draggable:Boolean,overflow:Boolean,roundButton:Boolean,container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(e,{emit:t}){const{locale:n,zIndex:a,ns:l,size:o}=af("message-box",C(()=>e.buttonSize)),{t:s}=n,{nextZIndex:i}=a,u=V(!1),c=Ft({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",cancelButtonType:"",confirmButtonType:"primary",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",closeIcon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:"",inputValidator:void 0,inputErrorMessage:"",message:"",modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonLoadingIcon:$l(rl),cancelButtonLoadingIcon:$l(rl),confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:i()}),d=C(()=>{const D=c.type;return{[l.bm("icon",D)]:D&&zo[D]}}),f=Xn(),p=Xn(),g=C(()=>{const D=c.type;return c.icon||D&&zo[D]||""}),m=C(()=>!!c.message),v=V(),h=V(),b=V(),y=V(),k=V(),S=C(()=>c.confirmButtonClass);fe(()=>c.inputValue,async D=>{await Ae(),e.boxType==="prompt"&&D&&A()},{immediate:!0}),fe(()=>u.value,D=>{var R;D&&(e.boxType!=="prompt"&&(c.autofocus?b.value=((R=k.value)==null?void 0:R.$el)??v.value:b.value=v.value),c.zIndex=i()),e.boxType==="prompt"&&(D?Ae().then(()=>{y.value&&y.value.$el&&(c.autofocus?b.value=j()??v.value:b.value=v.value)}):(c.editorErrorMessage="",c.validateError=!1))});const E=C(()=>e.draggable),x=C(()=>e.overflow),{isDragging:$}=rS(v,h,E,x);mt(async()=>{await Ae(),e.closeOnHashChange&&window.addEventListener("hashchange",w)}),zt(()=>{e.closeOnHashChange&&window.removeEventListener("hashchange",w)});function w(){u.value&&(u.value=!1,Ae(()=>{c.action&&t("action",c.action)}))}const T=()=>{e.closeOnClickModal&&N(c.distinguishCancelAndClose?"close":"cancel")},M=Nh(T),I=D=>{var R;if(c.inputType!=="textarea"&&!((R=y.value)!=null&&R.isComposing))return D.preventDefault(),N("confirm")},N=D=>{var R;e.boxType==="prompt"&&D==="confirm"&&!A()||(c.action=D,c.beforeClose?(R=c.beforeClose)==null||R.call(c,D,c,w):w())},A=()=>{if(e.boxType==="prompt"){const D=c.inputPattern;if(D&&!D.test(c.inputValue||""))return c.editorErrorMessage=c.inputErrorMessage||s("el.messagebox.error"),c.validateError=!0,!1;const R=c.inputValidator;if(We(R)){const z=R(c.inputValue);if(z===!1)return c.editorErrorMessage=c.inputErrorMessage||s("el.messagebox.error"),c.validateError=!0,!1;if(Ve(z))return c.editorErrorMessage=z,c.validateError=!0,!1}}return c.editorErrorMessage="",c.validateError=!1,!0},j=()=>{var R;const D=(R=y.value)==null?void 0:R.$refs;return(D==null?void 0:D.input)??(D==null?void 0:D.textarea)},F=()=>{N("close")},B=()=>{e.closeOnPressEscape&&F()};return e.lockScroll&&Wd(u,{ns:l}),{...Fn(c),ns:l,overlayEvent:M,visible:u,hasMessage:m,typeClass:d,contentId:f,inputId:p,btnSize:o,iconComponent:g,confirmButtonClasses:S,rootRef:v,focusStartRef:b,headerRef:h,inputRef:y,isDragging:$,confirmRef:k,doClose:w,handleClose:F,onCloseRequested:B,handleWrapperClick:T,handleInputEnter:I,handleAction:N,t:s}}});const zJ=["aria-label","aria-describedby"],HJ=["aria-label"],KJ=["id"];function WJ(e,t,n,a,l,o){const s=Pt("el-icon"),i=Pt("el-input"),u=Pt("el-button"),c=Pt("el-focus-trap"),d=Pt("el-overlay");return O(),oe(zn,{name:"fade-in-linear",onAfterLeave:t[11]||(t[11]=f=>e.$emit("vanish")),persisted:""},{default:X(()=>[ft(q(d,{"z-index":e.zIndex,"overlay-class":[e.ns.is("message-box"),e.modalClass],mask:e.modal},{default:X(()=>[K("div",{role:"dialog","aria-label":e.title,"aria-modal":"true","aria-describedby":e.showInput?void 0:e.contentId,class:P(`${e.ns.namespace.value}-overlay-message-box`),onClick:t[8]||(t[8]=(...f)=>e.overlayEvent.onClick&&e.overlayEvent.onClick(...f)),onMousedown:t[9]||(t[9]=(...f)=>e.overlayEvent.onMousedown&&e.overlayEvent.onMousedown(...f)),onMouseup:t[10]||(t[10]=(...f)=>e.overlayEvent.onMouseup&&e.overlayEvent.onMouseup(...f))},[q(c,{loop:"",trapped:e.visible,"focus-trap-el":e.rootRef,"focus-start-el":e.focusStartRef,onReleaseRequested:e.onCloseRequested},{default:X(()=>[K("div",{ref:"rootRef",class:P([e.ns.b(),e.customClass,e.ns.is("draggable",e.draggable),e.ns.is("dragging",e.isDragging),{[e.ns.m("center")]:e.center}]),style:je(e.customStyle),tabindex:"-1",onClick:t[7]||(t[7]=Je(()=>{},["stop"]))},[e.title!==null&&e.title!==void 0?(O(),H("div",{key:0,ref:"headerRef",class:P([e.ns.e("header"),{"show-close":e.showClose}])},[K("div",{class:P(e.ns.e("title"))},[e.iconComponent&&e.center?(O(),oe(s,{key:0,class:P([e.ns.e("status"),e.typeClass])},{default:X(()=>[(O(),oe(dt(e.iconComponent)))]),_:1},8,["class"])):te("v-if",!0),K("span",null,Se(e.title),1)],2),e.showClose?(O(),H("button",{key:0,type:"button",class:P(e.ns.e("headerbtn")),"aria-label":e.t("el.messagebox.close"),onClick:t[0]||(t[0]=f=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel")),onKeydown:t[1]||(t[1]=an(Je(f=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"]))},[q(s,{class:P(e.ns.e("close"))},{default:X(()=>[(O(),oe(dt(e.closeIcon||"close")))]),_:1},8,["class"])],42,HJ)):te("v-if",!0)],2)):te("v-if",!0),K("div",{id:e.contentId,class:P(e.ns.e("content"))},[K("div",{class:P(e.ns.e("container"))},[e.iconComponent&&!e.center&&e.hasMessage?(O(),oe(s,{key:0,class:P([e.ns.e("status"),e.typeClass])},{default:X(()=>[(O(),oe(dt(e.iconComponent)))]),_:1},8,["class"])):te("v-if",!0),e.hasMessage?(O(),H("div",{key:1,class:P(e.ns.e("message"))},[ne(e.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(O(),oe(dt(e.showInput?"label":"p"),{key:1,for:e.showInput?e.inputId:void 0,innerHTML:e.message},null,8,["for","innerHTML"])):(O(),oe(dt(e.showInput?"label":"p"),{key:0,for:e.showInput?e.inputId:void 0,textContent:Se(e.message)},null,8,["for","textContent"]))])],2)):te("v-if",!0)],2),ft(K("div",{class:P(e.ns.e("input"))},[q(i,{id:e.inputId,ref:"inputRef",modelValue:e.inputValue,"onUpdate:modelValue":t[2]||(t[2]=f=>e.inputValue=f),type:e.inputType,placeholder:e.inputPlaceholder,"aria-invalid":e.validateError,class:P({invalid:e.validateError}),onKeydown:an(e.handleInputEnter,["enter"])},null,8,["id","modelValue","type","placeholder","aria-invalid","class","onKeydown"]),K("div",{class:P(e.ns.e("errormsg")),style:je({visibility:e.editorErrorMessage?"visible":"hidden"})},Se(e.editorErrorMessage),7)],2),[[At,e.showInput]])],10,KJ),e.showCancelButton||e.showConfirmButton?(O(),H("div",{key:1,class:P(e.ns.e("btns"))},[e.showCancelButton?(O(),oe(u,{key:0,type:e.cancelButtonType==="text"?"":e.cancelButtonType,text:e.cancelButtonType==="text",loading:e.cancelButtonLoading,"loading-icon":e.cancelButtonLoadingIcon,class:P([e.cancelButtonClass]),round:e.roundButton,size:e.btnSize,onClick:t[3]||(t[3]=f=>e.handleAction("cancel")),onKeydown:t[4]||(t[4]=an(Je(f=>e.handleAction("cancel"),["prevent"]),["enter"]))},{default:X(()=>[st(Se(e.cancelButtonText||e.t("el.messagebox.cancel")),1)]),_:1},8,["type","text","loading","loading-icon","class","round","size"])):te("v-if",!0),ft(q(u,{ref:"confirmRef",type:e.confirmButtonType==="text"?"":e.confirmButtonType,text:e.confirmButtonType==="text",loading:e.confirmButtonLoading,"loading-icon":e.confirmButtonLoadingIcon,class:P([e.confirmButtonClasses]),round:e.roundButton,disabled:e.confirmButtonDisabled,size:e.btnSize,onClick:t[5]||(t[5]=f=>e.handleAction("confirm")),onKeydown:t[6]||(t[6]=an(Je(f=>e.handleAction("confirm"),["prevent"]),["enter"]))},{default:X(()=>[st(Se(e.confirmButtonText||e.t("el.messagebox.confirm")),1)]),_:1},8,["type","text","loading","loading-icon","class","round","disabled","size"]),[[At,e.showConfirmButton]])],2)):te("v-if",!0)],6)]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,zJ)]),_:3},8,["z-index","overlay-class","mask"]),[[At,e.visible]])]),_:3})}var jJ=Rn(FJ,[["render",WJ]]);const Ui=new Map,qJ=e=>{let t=document.body;return e.appendTo&&(Ve(e.appendTo)&&(t=document.querySelector(e.appendTo)),wa(e.appendTo)&&(t=e.appendTo),wa(t)||(Kt("ElMessageBox","the appendTo option is not an HTMLElement. Falling back to document.body."),t=document.body)),t},dp=(e,t)=>{var a;const n=(a=e.component)==null?void 0:a.proxy;return()=>n.handleAction(t)},YJ=(e,t,n=null)=>{const a=q(jJ,e,We(e.message)||Jt(e.message)?{default:We(e.message)?()=>e.message({confirm:dp(a,"confirm"),cancel:dp(a,"cancel"),close:dp(a,"close")}):()=>e.message}:null);return a.appContext=n,Bo(a,t),qJ(e).appendChild(t.firstElementChild),a.component},UJ=()=>document.createElement("div"),GJ=(e,t)=>{const n=UJ();e.onVanish=()=>{Bo(null,n),Ui.delete(l)},e.onAction=o=>{const s=Ui.get(l);let i;e.showInput?i={value:l.inputValue,action:o}:i=o,e.callback?e.callback(i,a.proxy):o==="cancel"||o==="close"?e.distinguishCancelAndClose&&o!=="cancel"?s.reject("close"):s.reject("cancel"):s.resolve(i)};const a=YJ(e,n,t),l=a.proxy;for(const o in e)Vt(e,o)&&!Vt(l.$props,o)&&(o==="closeIcon"&&rt(e[o])?l[o]=$l(e[o]):l[o]=e[o]);return l.visible=!0,l};function Pr(e,t=null){if(!It)return Promise.reject();let n;return Ve(e)||Jt(e)?e={message:e}:n=e.callback,new Promise((a,l)=>{const o=GJ(e,t??Pr._context);Ui.set(o,{options:e,callback:n,resolve:a,reject:l})})}const XJ=["alert","confirm","prompt"],JJ={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};XJ.forEach(e=>{Pr[e]=ZJ(e)});function ZJ(e){return(t,n,a,l)=>{let o="";return rt(n)?(a=n,o=""):xt(n)?o="":o=n,Pr(Object.assign({title:o,message:t,type:"",...JJ[e]},a,{boxType:e}),l)}}Pr.close=()=>{Ui.forEach((e,t)=>{t.doClose()}),Ui.clear()};Pr._context=null;const xo=Pr;xo.install=e=>{xo._context=e._context,e.config.globalProperties.$msgbox=xo,e.config.globalProperties.$messageBox=xo,e.config.globalProperties.$alert=xo.alert,e.config.globalProperties.$confirm=xo.confirm,e.config.globalProperties.$prompt=xo.prompt};const Cc=xo,xE=["primary","success","info","warning","error"],QJ=$e({customClass:{type:G([String,Array,Object,Boolean]),default:""},dangerouslyUseHTMLString:Boolean,duration:{type:Number,default:4500},icon:{type:Ut},id:{type:String,default:""},message:{type:G([String,Object,Function]),default:""},offset:{type:Number,default:0},onClick:{type:G(Function),default:()=>{}},onClose:{type:G(Function),required:!0},position:{type:String,values:["top-right","top-left","bottom-right","bottom-left"],default:"top-right"},showClose:{type:Boolean,default:!0},title:{type:String,default:""},type:{type:String,values:[...xE,""],default:""},zIndex:Number,closeIcon:{type:Ut,default:Ya},progress:{type:G([Boolean,Object]),default:!1},pauseOnHover:{type:Boolean,default:!0}}),eZ={destroy:()=>!0},tZ=["id"],nZ=["textContent"],aZ={key:0},lZ=["innerHTML"];var oZ=ue({name:"ElNotification",__name:"notification",props:QJ,emits:eZ,setup(e,{expose:t}){const n=e,{ns:a,zIndex:l}=af("notification"),{nextZIndex:o,currentZIndex:s}=l,i=V(!1);let u;const c=V(100);let d=0,f=0;const p=C(()=>{const A=n.type;return A&&zo[n.type]?a.m(A):""}),g=C(()=>!!n.progress&&n.duration>0),m=C(()=>{switch(n.type){case"success":return"success";case"warning":return"warning";case"error":return"exception";default:return}}),v=C(()=>({status:m.value,strokeWidth:3,showText:!1,...typeof n.progress=="object"?n.progress:void 0})),h=C(()=>n.type&&zo[n.type]||n.icon),b=C(()=>n.position.endsWith("right")?"right":"left"),y=C(()=>n.position.startsWith("top")?"top":"bottom"),k=C(()=>({[y.value]:`${n.offset}px`,zIndex:n.zIndex??s.value})),{pause:S,resume:E}=UI(()=>{c.value=Math.max(0,100-(d+Date.now()-f)/n.duration*100)},100,{immediate:!1});function x(){if(n.duration<=0)return;u==null||u(),S(),f=Date.now();const A=Math.max(0,n.duration-d);({stop:u}=cr(()=>{i.value&&I()},A)),g.value&&(c.value=A/n.duration*100,E())}function $(){u==null||u(),S(),f>0&&(d+=Date.now()-f,f=0)}let w=!1;function T(){w=!0,n.pauseOnHover&&$()}function M(){w=!1,n.pauseOnHover&&x()}function I(){i.value=!1,$()}function N(A){switch(Gt(A)){case ye.delete:case ye.backspace:$();break;case ye.esc:i.value&&I();break;default:if(w&&n.pauseOnHover)break;$(),x()}}return mt(()=>{x(),o(),i.value=!0}),Ht(document,"keydown",N),t({visible:i,close:I}),(A,j)=>(O(),oe(zn,{name:r(a).b("fade"),onBeforeLeave:e.onClose,onAfterLeave:j[1]||(j[1]=F=>A.$emit("destroy")),persisted:""},{default:X(()=>[ft(K("div",{id:e.id,class:P([r(a).b(),e.customClass,b.value]),style:je(k.value),role:"alert",onMouseenter:T,onMouseleave:M,onClick:j[0]||(j[0]=(...F)=>e.onClick&&e.onClick(...F))},[h.value?(O(),oe(r(Be),{key:0,class:P([r(a).e("icon"),p.value])},{default:X(()=>[(O(),oe(dt(h.value)))]),_:1},8,["class"])):te("v-if",!0),K("div",{class:P(r(a).e("group"))},[K("h2",{class:P(r(a).e("title")),textContent:Se(e.title)},null,10,nZ),ft(K("div",{class:P(r(a).e("content")),style:je(e.title?void 0:{margin:0})},[ne(A.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(O(),H(ze,{key:1},[te(" Caution here, message could've been compromised, never use user's input as message "),K("p",{innerHTML:e.message},null,8,lZ)],2112)):(O(),H("p",aZ,Se(e.message),1))])],6),[[At,e.message]]),e.showClose?(O(),oe(r(Be),{key:0,class:P(r(a).e("closeBtn")),onClick:Je(I,["stop"])},{default:X(()=>[(O(),oe(dt(e.closeIcon)))]),_:1},8,["class"])):te("v-if",!0)],2),g.value?(O(),H("div",{key:1,class:P(r(a).e("progress")),"aria-hidden":"true"},[q(r(fm),pt(v.value,{percentage:c.value}),null,16,["percentage"])],2)):te("v-if",!0)],46,tZ),[[At,i.value]])]),_:3},8,["name","onBeforeLeave"]))}}),sZ=oZ;const Sr={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},sd=16;let rZ=1;const Ms=function(e={},t){if(!It)return{close:()=>{}};(Ve(e)||Jt(e))&&(e={message:e});const n=e.position||"top-right";let a=e.offset||0;Sr[n].forEach(({vm:d})=>{var f;a+=(((f=d.el)==null?void 0:f.offsetHeight)||0)+sd}),a+=sd;const l=`notification_${rZ++}`,o=e.onClose,s={...e,offset:a,id:l,onClose:()=>{iZ(l,n,o)}};let i=document.body;wa(e.appendTo)?i=e.appendTo:Ve(e.appendTo)&&(i=document.querySelector(e.appendTo)),wa(i)||(Kt("ElNotification","the appendTo option is not an HTMLElement. Falling back to document.body."),i=document.body);const u=document.createElement("div"),c=q(sZ,s,We(s.message)?s.message:Jt(s.message)?()=>s.message:null);return c.appContext=xt(t)?Ms._context:t,c.props.onDestroy=()=>{Bo(null,u)},Bo(c,u),Sr[n].push({vm:c}),i.appendChild(u.firstElementChild),{close:()=>{c.component.exposed.close()}}};xE.forEach(e=>{Ms[e]=(t={},n)=>((Ve(t)||Jt(t))&&(t={message:t}),Ms({...t,type:e},n))});function iZ(e,t,n){const a=Sr[t],l=a.findIndex(({vm:c})=>{var d;return((d=c.component)==null?void 0:d.props.id)===e});if(l===-1)return;const{vm:o}=a[l];if(!o)return;n==null||n(o);const s=o.el.offsetHeight,i=t.split("-")[0];a.splice(l,1);const u=a.length;if(!(u<1))for(let c=l;c{t.component.exposed.close()})}function cZ(e="top-right"){var n,a,l,o;let t=((l=(a=(n=Sr[e][0])==null?void 0:n.vm.component)==null?void 0:a.props)==null?void 0:l.offset)||0;for(const{vm:s}of Sr[e])s.component.props.offset=t,t+=(((o=s.el)==null?void 0:o.offsetHeight)||0)+sd}Ms.closeAll=uZ;Ms.updateOffsets=cZ;Ms._context=null;const dZ=jS(Ms,"$notify"),fZ=$e({..._s(Gr,["ariaLabel","gpuAcceleration","rawContent"]),placement:Sv.placement,tabindex:Sv.tabindex,effect:{...Gr.effect,default:"light"},title:String,width:{type:[String,Number],default:150},offset:{...Gr.offset,default:void 0},persistent:{...Gr.persistent,default:!0}}),pZ={"update:visible":e=>Wt(e),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0};({..._s($L,["gpuAcceleration"])});var vZ=ue({name:"ElPopover",__name:"popover",props:fZ,emits:pZ,setup(e,{expose:t,emit:n}){const a=e,l=n,o=C(()=>{const b=Hn.props,y=me(b)?b:Object.keys(b);return Ll(a,y)}),s=he("popover"),i=V(),u=C(()=>{var b;return(b=r(i))==null?void 0:b.popperRef}),c=C(()=>[{width:fn(a.width)},a.popperStyle]),d=C(()=>[s.b(),a.popperClass,{[s.m("plain")]:!!a.content}]),f=C(()=>a.transition===`${s.namespace.value}-fade-in-linear`),p=()=>{var b;(b=i.value)==null||b.hide()},g=()=>{l("before-enter")},m=()=>{l("before-leave")},v=()=>{l("after-enter")},h=()=>{l("update:visible",!1),l("after-leave")};return t({popperRef:u,hide:p}),(b,y)=>(O(),oe(r(Hn),pt({ref_key:"tooltipRef",ref:i},o.value,{"aria-label":e.title,"popper-class":d.value,"popper-style":c.value,"gpu-acceleration":f.value,onBeforeShow:g,onBeforeHide:m,onShow:v,onHide:h}),{content:X(()=>[e.title?(O(),H("div",{key:0,class:P(r(s).e("title")),role:"title"},Se(e.title),3)):te("v-if",!0),ne(b.$slots,"default",{hide:p},()=>[st(Se(e.content),1)])]),default:X(()=>[b.$slots.reference?ne(b.$slots,"reference",{key:0}):te("v-if",!0)]),_:3},16,["aria-label","popper-class","popper-style","gpu-acceleration"]))}}),hZ=vZ;const N0=(e,t)=>{var a;const n=(a=t.arg||t.value)==null?void 0:a.popperRef;n&&(n.triggerRef=e)};var mZ={mounted(e,t){N0(e,t)},updated(e,t){N0(e,t)}};const gZ="popover",TE=_3(mZ,gZ),bZ=ut(hZ,{directive:TE}),yZ="2.14.8",wZ=(e=[])=>({version:yZ,install:(n,a)=>{n[yg]||(n[yg]=!0,e.forEach(l=>n.use(l)),a&&Wh(a,n,!0))}});var SZ=[V3,tA,g8,BY,k8,E8,M8,hC,F8,z8,Bn,xC,ZD,nB,gB,bB,I6,Ok,V6,ll,QB,tm,Y6,iF,uF,of,Bk,VF,Y8,WF,jF,qF,YF,UF,fH,Uk,SH,CH,VH,n2,XH,VK,DK,BK,d2,tL,nL,Be,$9,f2,Un,p2,W9,X9,nW,bW,yW,wW,SW,$W,rj,fj,bZ,cC,fm,$k,d6,c6,$j,Pj,W6,il,Ko,qc,MD,Qj,o7,s7,T7,P7,Wk,az,D7,B7,G7,lY,oY,DY,eU,tU,oo,xm,aD,cU,hU,mU,Hn,NU,Om,JU,pG,FG,XG,SX,CX,PX,IX,BX,ZX,fJ,pJ],CZ=[gJ,CJ,An,Cc,dZ,TE],Rm=wZ([...SZ,...CZ]);Rm.install;Rm.version;var kZ=Rm,EZ={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空",defaultLabel:"颜色选择器",description:"当前颜色 {color},按 Enter 键选择新颜色",alphaLabel:"选择透明度的值",alphaDescription:"透明度 {alpha}, 当前颜色 {color}",hueLabel:"选择色相值",hueDescription:"色相 {hue}, 当前颜色 {color}",svLabel:"选择饱和度与明度的值",svDescription:"饱和度 {saturation}, 明度 {brightness}, 当前颜色 {color}",predefineDescription:"选择 {value} 作为颜色"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",dateTablePrompt:"使用方向键与 Enter 键可选择日期",monthTablePrompt:"使用方向键与 Enter 键可选择月份",quarterTablePrompt:"使用方向键与 Enter 键可选择季度",yearTablePrompt:"使用方向键与 Enter 键可选择年份",selectedDate:"已选日期",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},weeksFull:{sun:"星期日",mon:"星期一",tue:"星期二",wed:"星期三",thu:"星期四",fri:"星期五",sat:"星期六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},input:{characters:"{count} / {max} 个字符"},inputNumber:{decrease:"减少数值",increase:"增加数值"},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},mention:{loading:"加载中"},dropdown:{toggleDropdown:"切换下拉选项"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},dialog:{close:"关闭此对话框"},drawer:{close:"关闭此对话框"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!",close:"关闭此对话框"},upload:{deleteTip:"按 Delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},slider:{defaultLabel:"滑块介于 {min} 至 {max}",defaultRangeStartLabel:"选择起始值",defaultRangeEndLabel:"选择结束值"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计",selectAllLabel:"选择所有行",selectRowLabel:"选择当前行",expandRowLabel:"展开当前行",collapseRowLabel:"收起当前行",sortLabel:"按 {column} 排序",filterLabel:"按 {column} 过滤"},tag:{close:"关闭此标签"},tour:{next:"下一步",previous:"上一步",finish:"结束导览",close:"关闭此对话框"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"},carousel:{leftArrow:"上一张幻灯片",rightArrow:"下一张幻灯片",indicator:"幻灯片切换至索引 {index}"},inputOTP:{groupLabel:"一次性密码输入框",defaultLabel:"请输入第 {index} 位 OTP 字符"}}};const Yo="xq0012";async function go(e,t){const n=await fetch(e,t);if(n.status===401)throw Object.assign(new Error("未登录:请先在壳子登录统一账户再打开本界面"),{code:401});if(!n.ok){let a=`HTTP ${n.status}`;try{a=(await n.json()).detail||a}catch{}throw Object.assign(new Error(a),{code:n.status,status:n.status})}return n.json()}const M0=()=>go(`/api/plugin-config/${Yo}`),xZ=e=>go(`/api/plugin-config/${Yo}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),TZ=()=>go(`/api/plugins/${Yo}/last-fields`),$Z=()=>go(`/api/plugin-configs?plugin_id=${encodeURIComponent(Yo)}`),OZ=(e,t)=>go("/api/plugin-configs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({plugin_id:Yo,name:e,fields:t})}),NZ=e=>go(`/api/plugin-configs/${encodeURIComponent(Yo)}/${encodeURIComponent(e)}`,{method:"DELETE"}),MZ=e=>go("/api/runs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({plugin_id:Yo,fields:e})}),PZ=e=>go(`/api/runs/${e}`),IZ=e=>go(`/api/runs/${e}/stop`,{method:"POST"});function RZ(e){const t=new WebSocket((location.protocol==="https:"?"wss://":"ws://")+location.host+"/ws");return t.onmessage=n=>{try{e(JSON.parse(n.data))}catch{}},t}const fp=e=>JSON.parse(JSON.stringify(e)),$E=`plugin:${Yo}:lastSavedAt`;function _Z(){try{return localStorage.getItem($E)||""}catch{return""}}function AZ(e){try{localStorage.setItem($E,e)}catch{}}function pp(e,t){Object.keys(e).forEach(n=>{const a=t?t[n]:void 0;a==null||a===""||(e[n]=Array.isArray(a)?[...a]:a)})}function LZ(e={}){const{defaults:t,validate:n,buildPayload:a}=e,l=Ft(t?t():{}),o=V(!1),s=V(!1),i=V(null),u=V(_Z()),c=V(!1),d=V(0),f=V(!1);let p=null,g="",m=null,v=null;const h=(z,L)=>{i.value=z?{type:z,text:L}:null};mt(async()=>{try{const z=await M0();pp(l,z)}catch(z){z.code===401&&(s.value=!0)}o.value=!0,$()}),fe(l,()=>{!o.value||c.value||(clearTimeout(v),v=setTimeout(()=>b(!1),800))},{deep:!0});async function b(z){try{await xZ(fp(l)),u.value=new Date().toLocaleTimeString("zh-CN",{hour12:!1}),AZ(u.value),z&&An.success("配置已保存到本机")}catch(L){L.code===401?s.value=!0:An.error("配置保存失败:"+L.message)}}function y(){Object.assign(l,t?t(l):{}),h(null),An.info("已恢复默认配置")}async function k(){try{const z=await TZ(),L=z.fields||{};if(!Object.keys(L).length){An.info("暂无上次执行参数");return}pp(l,L),An.success("已恢复上次执行参数"+(z.at?`(${z.at})`:""))}catch(z){z.code===401?s.value=!0:An.error("恢复上次参数失败:"+z.message)}}const S=V([]),E=V(""),x=C(()=>[{value:"",label:"当前配置(自动保存)"},...S.value.map(z=>({value:z.id,label:z.name}))]);async function $(){try{const z=await $Z();S.value=z.configs||[]}catch{}}function w(z){if(!z)return;const L=S.value.find(W=>W.id===z);L&&(pp(l,L.fields),An.success(`已应用方案「${L.name}」`))}async function T(){const z=S.value.find(Y=>Y.id===E.value);let L="";try{({value:L}=await Cc.prompt("方案保存到本机(同名覆盖,密码明文保存,每套方案可绑定不同账号),供「定时任务」引用:到点自动取该方案的最新参数执行。","存为配置方案",{inputValue:z?z.name:"",confirmButtonText:"保存方案",cancelButtonText:"取消",inputPattern:/\S/,inputErrorMessage:"请输入方案名称"}))}catch{return}if(L=String(L).trim(),!L)return;const W=S.value.find(Y=>Y.name===L);if(W)try{await Cc.confirm(`已存在同名方案「${W.name}」,保存将覆盖它的参数(多套不同配置请用不同名称)。`,"覆盖已有方案",{type:"warning",confirmButtonText:"覆盖保存",cancelButtonText:"取消"})}catch{return}try{const Y=await OZ(L,fp(l));await $(),E.value=Y.config?Y.config.id:"",An.success(`方案「${L}」已保存`)}catch(Y){Y.code===401?s.value=!0:An.error("方案保存失败:"+Y.message)}}async function M(){const z=S.value.find(L=>L.id===E.value);if(z){try{await Cc.confirm(`删除配置方案「${z.name}」?引用它的定时任务到点会跳过触发并提示重选。`,"删除方案",{type:"warning",confirmButtonText:"删除",cancelButtonText:"取消"})}catch{return}try{await NZ(z.id),E.value="",await $(),An.success("方案已删除")}catch(L){An.error("方案删除失败:"+L.message)}}}async function I(z){if(!c.value){if(s.value)try{await M0(),s.value=!1}catch{h("error","登录态未就绪,请稍后重试");return}if(!(n&&!n(z))){await b(!1),h(null),c.value=!0,d.value=0;try{const L=a?a(l):fp(l);z&&(L.action=z),g=(await MZ(L)).run_id,A(),j()}catch(L){c.value=!1,F(),L.code===401?(s.value=!0,h("error","登录态未就绪,本次没有启动,请稍后重试")):L.code===409?h("warn","已取消加入执行队列,本次没有启动"):h("error","启动执行失败:"+L.message)}}}}async function N(){if(!(!g||f.value)){f.value=!0;try{await IZ(g),An.warning("已发出强制停止指令,正在终止执行进程…")}catch(z){An.error("停止失败:"+z.message)}finally{f.value=!1}}}function A(){p&&p.readyState<=1||(p=RZ(z=>{z.run_id&&z.run_id!==g||(z.t==="progress"?d.value=Math.max(d.value,z.pct||0):z.t==="run_done"&&(z.ok?B():z.status==="cancelled"?D(z.error):R(z.error||"执行失败")))}),p.onclose=()=>{p=null})}function j(){F(),m=setInterval(async()=>{var z;if(g)try{const L=await PZ(g);L.status==="done"?B((z=L.result)==null?void 0:z.summary):L.status==="cancelled"?D(L.error):L.status==="error"&&R(L.error||"执行失败")}catch{}},5e3)}function F(){m&&(clearInterval(m),m=null)}function B(z){F(),c.value=!1,d.value=100,z&&h("ok",z)}function D(z){F(),c.value=!1,h("warn","任务已取消:"+(z||"用户已停止"))}function R(z){F(),c.value=!1,h("error","执行失败:"+z)}return{form:l,loaded:o,needLogin:s,notice:i,lastSavedAt:u,running:c,progress:d,stopping:f,saveNow:b,resetDefaults:y,restoreLastFields:k,schemes:S,schemeSel:E,schemeOptions:x,onSchemeChange:w,saveSchemeAs:T,removeScheme:M,run:I,forceStop:N}}const VZ={class:"page"},DZ={class:"toolbar"},BZ={key:0,class:"notice is-warn"},FZ={class:"n-ico"},zZ={class:"sec"},HZ={class:"sec-body"},KZ={class:"grid"},WZ={class:"dir-ctrl"},jZ={class:"dir-ctrl"},qZ={class:"dir-ctrl"},YZ={class:"sec"},UZ={class:"sec-body"},GZ={class:"grid"},XZ={class:"sec"},JZ={class:"sec-body"},ZZ={class:"grid grid-switch"},QZ={class:"grid"},eQ={class:"grid"},tQ={class:"sec"},nQ={class:"sec-body"},aQ={class:"grid"},lQ={class:"actions"},oQ={key:2,class:"runline"},sQ={class:"pct"},rQ={__name:"App",setup(e){const t=()=>({ref_month:"",ledger_dir:"D:\\资料\\人资\\预支",ledger_workbook:"D:\\资料\\人资\\预支\\1030工资预支付款申请--已付.xlsx",ledger_file:"",default_applicant_staff:"37001090",default_applicant_name:"刘纤",erp_system:"自动",erp_username:"",erp_password:"",erp_username_old:"",erp_password_old:"",dry_run:!0,submit:!1,print_enabled:!1,printer:"人力资源部",copies:1,dingtalk_enabled:!0,dingtalk_users:"陈莲/37004121",debug_mode:!1}),{form:n,needLogin:a,notice:l,lastSavedAt:o,running:s,progress:i,stopping:u,saveNow:c,resetDefaults:d,restoreLastFields:f,schemeSel:p,schemeOptions:g,onSchemeChange:m,saveSchemeAs:v,removeScheme:h,run:b,forceStop:y}=LZ({defaults:t,validate(){return n.dry_run?!0:!n.erp_username||!n.erp_password?(An.error("关闭试算模式必须填新版 ERP 账号密码"),!1):n.erp_system==="旧版"&&!(n.erp_username_old||n.erp_username)?(An.error("旧版 ERP 账号不能为空(或填写新版账号以便沿用)"),!1):((!n.erp_username_old||!n.erp_password_old)&&An.info("旧版账密留空:旧系统将沿用新版账号密码"),n.submit&&An.warning("自动提交会把单据送进审批流,请确认台账与口径无误"),!0)}}),k=V(!1),S=V("");async function E($){S.value=$;try{const w=await fetch("/api/dialog/file",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:$==="ledger_workbook"?"选择目标工作簿":"选择台账文件",current:n[$]||"",filters:["xlsx","xlsm"]})}),T=await w.json().catch(()=>({}));if(!w.ok)throw new Error(T.detail||T.error||"HTTP "+w.status);!T.canceled&&T.path&&(n[$]=T.path)}catch(w){An.warning("打开文件选择失败:"+w.message)}finally{S.value=""}}async function x(){k.value=!0;try{const $=await fetch("/api/dialog/directory",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:"选择预支台账目录",current:n.ledger_dir||""})}),w=await $.json().catch(()=>({}));if(!$.ok)throw new Error(w.detail||w.error||"HTTP "+$.status);w.path&&(n.ledger_dir=w.path)}catch($){An.warning("打开文件夹选择失败:"+$.message)}finally{k.value=!1}}return($,w)=>{const T=Pt("el-option"),M=Pt("el-select"),I=Pt("el-button"),N=Pt("el-date-picker"),A=Pt("el-form-item"),j=Pt("el-input"),F=Pt("el-form"),B=Pt("el-switch"),D=Pt("el-input-number");return O(),H("div",VZ,[K("div",DZ,[w[26]||(w[26]=K("span",{class:"spacer"},null,-1)),K("span",{class:P(["saved",{"is-idle":!r(o)}])},[w[23]||(w[23]=K("i",null,null,-1)),st(Se(r(o)?"已保存 "+r(o):"尚未保存"),1)],2),q(M,{modelValue:r(p),"onUpdate:modelValue":w[0]||(w[0]=R=>Qt(p)?p.value=R:null),class:"scheme-sel",size:"small",disabled:r(s),placeholder:"当前配置(自动保存)",onChange:r(m)},{default:X(()=>[(O(!0),H(ze,null,bt(r(g),R=>(O(),oe(T,{key:R.value,label:R.label,value:R.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","disabled","onChange"]),q(I,{size:"small",disabled:r(s),onClick:r(v)},{default:X(()=>[...w[24]||(w[24]=[st("存为方案",-1)])]),_:1},8,["disabled","onClick"]),q(I,{size:"small",text:"",type:"danger",disabled:r(s)||!r(p),onClick:r(h)},{default:X(()=>[...w[25]||(w[25]=[st("删除",-1)])]),_:1},8,["disabled","onClick"])]),r(a)?(O(),H("div",BZ,[...w[27]||(w[27]=[K("span",{class:"n-ico"},"!",-1),K("span",null,"未登录:请先在壳子(工作台)登录统一账户,再刷新本界面",-1)])])):r(l)?(O(),H("div",{key:1,class:P(["notice","is-"+r(l).type])},[K("span",FZ,Se(r(l).type==="ok"?"✓":r(l).type==="error"?"✕":"·"),1),K("span",null,Se(r(l).text),1)],2)):te("",!0),K("section",zZ,[w[32]||(w[32]=K("div",{class:"sec-head"},[K("span",{class:"sec-badge"},"01"),K("span",{class:"sec-name"},"台账来源"),K("span",{class:"sec-line"})],-1)),K("div",HZ,[q(F,{"label-position":"top"},{default:X(()=>[K("div",KZ,[q(A,{label:"台账月份"},{default:X(()=>[q(N,{modelValue:r(n).ref_month,"onUpdate:modelValue":w[1]||(w[1]=R=>r(n).ref_month=R),type:"month","value-format":"YYYY-MM",format:"YYYY-MM",clearable:"",disabled:r(s),placeholder:"留空=当月"},null,8,["modelValue","disabled"])]),_:1}),q(A,{label:"台账目录"},{default:X(()=>[K("div",WZ,[q(j,{modelValue:r(n).ledger_dir,"onUpdate:modelValue":w[2]||(w[2]=R=>r(n).ledger_dir=R),class:"dir-input",disabled:r(s),clearable:"",placeholder:"留空 = D:\\资料\\人资\\预支"},null,8,["modelValue","disabled"]),q(I,{class:"dir-btn",disabled:r(s)||k.value,loading:k.value,onClick:x},{default:X(()=>[...w[28]||(w[28]=[st("选择",-1)])]),_:1},8,["disabled","loading"])])]),_:1}),q(A,{label:"目标工作簿"},{default:X(()=>[K("div",jZ,[q(j,{modelValue:r(n).ledger_workbook,"onUpdate:modelValue":w[3]||(w[3]=R=>r(n).ledger_workbook=R),class:"dir-input",disabled:r(s),clearable:"",placeholder:"留空 = 只导出独立文件"},null,8,["modelValue","disabled"]),q(I,{class:"dir-btn",disabled:r(s)||!!S.value,loading:S.value==="ledger_workbook",onClick:w[4]||(w[4]=R=>E("ledger_workbook"))},{default:X(()=>[...w[29]||(w[29]=[st("选择",-1)])]),_:1},8,["disabled","loading"])])]),_:1}),q(A,{label:"台账文件(可选)"},{default:X(()=>[K("div",qZ,[q(j,{modelValue:r(n).ledger_file,"onUpdate:modelValue":w[5]||(w[5]=R=>r(n).ledger_file=R),class:"dir-input",disabled:r(s),clearable:"",placeholder:"指定后跳过导出/追加"},null,8,["modelValue","disabled"]),q(I,{class:"dir-btn",disabled:r(s)||!!S.value,loading:S.value==="ledger_file",onClick:w[6]||(w[6]=R=>E("ledger_file"))},{default:X(()=>[...w[30]||(w[30]=[st("选择",-1)])]),_:1},8,["disabled","loading"])])]),_:1})])]),_:1}),w[31]||(w[31]=K("div",{class:"tip"},[st(" 按「预支报酬年月」调 EHR 接口导出(留空=当月),按表头名追加到目标工作簿的 "),K("b",null,"预支报酬台账"),st(":自动跳过同键行,保留序号与 AT~AW 公式列。 有效行:工号非空、金额 > 0、整行无 "),K("b",null,"#N/A"),st("。 ")],-1))])]),K("section",YZ,[w[34]||(w[34]=K("div",{class:"sec-head"},[K("span",{class:"sec-badge"},"02"),K("span",{class:"sec-name"},"ERP 登录(新旧两套)"),K("span",{class:"sec-line"})],-1)),K("div",UZ,[q(F,{"label-position":"top"},{default:X(()=>[K("div",GZ,[q(A,{label:"系统分流"},{default:X(()=>[q(M,{modelValue:r(n).erp_system,"onUpdate:modelValue":w[7]||(w[7]=R=>r(n).erp_system=R),disabled:r(s)},{default:X(()=>[q(T,{label:"自动(按台账新旧系统列)",value:"自动"}),q(T,{label:"强制新版",value:"新版"}),q(T,{label:"强制旧版",value:"旧版"})]),_:1},8,["modelValue","disabled"])]),_:1}),q(A,{label:"新版 ERP 账号"},{default:X(()=>[q(j,{modelValue:r(n).erp_username,"onUpdate:modelValue":w[8]||(w[8]=R=>r(n).erp_username=R),disabled:r(s),clearable:"",placeholder:"新版账号"},null,8,["modelValue","disabled"])]),_:1}),q(A,{label:"新版 ERP 密码"},{default:X(()=>[q(j,{modelValue:r(n).erp_password,"onUpdate:modelValue":w[9]||(w[9]=R=>r(n).erp_password=R),type:"password","show-password":"",disabled:r(s),placeholder:"仅保存在本机"},null,8,["modelValue","disabled"])]),_:1}),q(A,{label:"旧版 ERP 账号"},{default:X(()=>[q(j,{modelValue:r(n).erp_username_old,"onUpdate:modelValue":w[10]||(w[10]=R=>r(n).erp_username_old=R),disabled:r(s),clearable:"",placeholder:"留空=沿用新版账号"},null,8,["modelValue","disabled"])]),_:1}),q(A,{label:"旧版 ERP 密码"},{default:X(()=>[q(j,{modelValue:r(n).erp_password_old,"onUpdate:modelValue":w[11]||(w[11]=R=>r(n).erp_password_old=R),type:"password","show-password":"",disabled:r(s),placeholder:"留空=沿用新版密码"},null,8,["modelValue","disabled"])]),_:1})])]),_:1}),w[33]||(w[33]=K("div",{class:"tip"},[K("b",null,"新旧系统是两套金蝶站点"),st(":台账「新旧系统」列为旧系统的行,用旧版账号密码登录; 其余走新版。旧版留空则沿用新版账密。分流口径:职位序列为「门店服务序列」且会馆不在 标准化门店名单 → 旧版(部门 BM000881),其余新版(BM000477)。 ")],-1))])]),K("section",XZ,[w[36]||(w[36]=K("div",{class:"sec-head"},[K("span",{class:"sec-badge"},"03"),K("span",{class:"sec-name"},"执行方式"),K("span",{class:"sec-line"})],-1)),K("div",JZ,[q(F,{"label-position":"top"},{default:X(()=>[K("div",ZZ,[q(A,{label:"试算模式(不写 ERP)"},{default:X(()=>[q(B,{modelValue:r(n).dry_run,"onUpdate:modelValue":w[12]||(w[12]=R=>r(n).dry_run=R),disabled:r(s)},null,8,["modelValue","disabled"])]),_:1}),q(A,{label:"建单后自动提交"},{default:X(()=>[q(B,{modelValue:r(n).submit,"onUpdate:modelValue":w[13]||(w[13]=R=>r(n).submit=R),disabled:r(s)},null,8,["modelValue","disabled"])]),_:1}),q(A,{label:"建单后打印"},{default:X(()=>[q(B,{modelValue:r(n).print_enabled,"onUpdate:modelValue":w[14]||(w[14]=R=>r(n).print_enabled=R),disabled:r(s)},null,8,["modelValue","disabled"])]),_:1}),q(A,{label:"打印后钉钉提醒"},{default:X(()=>[q(B,{modelValue:r(n).dingtalk_enabled,"onUpdate:modelValue":w[15]||(w[15]=R=>r(n).dingtalk_enabled=R),disabled:r(s)},null,8,["modelValue","disabled"])]),_:1}),q(A,{label:"调试日志"},{default:X(()=>[q(B,{modelValue:r(n).debug_mode,"onUpdate:modelValue":w[16]||(w[16]=R=>r(n).debug_mode=R),disabled:r(s)},null,8,["modelValue","disabled"])]),_:1})]),K("div",QZ,[q(A,{label:"打印机"},{default:X(()=>[q(M,{modelValue:r(n).printer,"onUpdate:modelValue":w[17]||(w[17]=R=>r(n).printer=R),disabled:r(s)},{default:X(()=>[q(T,{label:"人力资源部(双面)",value:"人力资源部"}),q(T,{label:"信息技术部(单面)",value:"信息技术部"})]),_:1},8,["modelValue","disabled"])]),_:1}),q(A,{label:"打印份数"},{default:X(()=>[q(D,{modelValue:r(n).copies,"onUpdate:modelValue":w[18]||(w[18]=R=>r(n).copies=R),min:1,max:5,disabled:r(s)},null,8,["modelValue","disabled"])]),_:1})]),K("div",eQ,[q(A,{label:"钉钉接收人(姓名/工号)"},{default:X(()=>[q(j,{modelValue:r(n).dingtalk_users,"onUpdate:modelValue":w[19]||(w[19]=R=>r(n).dingtalk_users=R),disabled:r(s)||!r(n).dingtalk_enabled,clearable:"",placeholder:"陈莲/37004121;多个用「、」分隔,重名必须带工号"},null,8,["modelValue","disabled"])]),_:1})])]),_:1}),w[35]||(w[35]=K("div",{class:"tip"},[K("b",null,"试算"),st("不建单/不提交/不打印、不回填付款状态与单据头(台账追加与流程刷新仍写工作簿)。 "),K("b",null,"发起前对账"),st("与"),K("b",null,"「预支办结流程」刷新固定开启"),st(":对账先查 ERP 已有单据 (受款人工号+金额一致才命中),查询失败会中止本批;流程刷新失败只告警、不阻断建单。 "),K("b",null,"提交"),st("关闭时只建草稿(A),由 HR 在 ERP 核对后手动提交。 ")],-1))])]),K("section",tQ,[w[38]||(w[38]=K("div",{class:"sec-head"},[K("span",{class:"sec-badge"},"04"),K("span",{class:"sec-name"},"单据口径 · 发起人"),K("span",{class:"sec-line"})],-1)),K("div",nQ,[q(F,{"label-position":"top"},{default:X(()=>[K("div",aQ,[q(A,{label:"默认发起人工号(E 列 / 报文申请人)"},{default:X(()=>[q(j,{modelValue:r(n).default_applicant_staff,"onUpdate:modelValue":w[20]||(w[20]=R=>r(n).default_applicant_staff=R),disabled:r(s),clearable:"",placeholder:"37001090"},null,8,["modelValue","disabled"])]),_:1}),q(A,{label:"默认发起人姓名(F 列)"},{default:X(()=>[q(j,{modelValue:r(n).default_applicant_name,"onUpdate:modelValue":w[21]||(w[21]=R=>r(n).default_applicant_name=R),disabled:r(s),clearable:"",placeholder:"刘纤"},null,8,["modelValue","disabled"])]),_:1})])]),_:1}),w[37]||(w[37]=K("div",{class:"tip"}," 发起人两列按这里回填「付款申请单#单据头(FBillHead)」E/F 列,也是建单报文的申请人(代提人)。 其余口径逐行读模板:申请日期=D 列(当天)、付款用途=AH 列、期望付款日=AK 列($D+1)、 申请部门=W 列(BM000477 / BM000881)。 ",-1))])]),w[46]||(w[46]=cT('
口径速查▾
单据:CN_PAYAPPLY 付款申请单,单据类型 FKSQ006.0YS 个人工资付款申请。
申请人:E/F 列 = 默认发起人(代提人);往来/收款单位(H/K)才是受款员工。
收款账户:AM/AN/AO 取「预支办结流程」V/AC/AD(与模板 XLOOKUP 同源)。
明细备注:AP 按模板口径填金额。
打印:ERP 单据套打 + 「单子传递打印」本批行汇总,printkit 直连打印机。
',1)),K("div",lQ,[q(I,{type:"primary",class:"btn-run",loading:r(s),onClick:r(b)},{default:X(()=>[st(Se(r(s)?"执行中 "+r(i)+"%":r(n).dry_run?"开始试算":"一键执行"),1)]),_:1},8,["loading","onClick"]),r(s)?(O(),oe(I,{key:0,type:"danger",plain:"",loading:r(u),onClick:r(y)},{default:X(()=>[...w[39]||(w[39]=[st(" 强制停止 ",-1)])]),_:1},8,["loading","onClick"])):te("",!0),w[43]||(w[43]=K("span",{class:"spacer"},null,-1)),q(I,{disabled:r(s),onClick:r(f)},{default:X(()=>[...w[40]||(w[40]=[st("恢复上次参数",-1)])]),_:1},8,["disabled","onClick"]),q(I,{disabled:r(s),onClick:w[22]||(w[22]=R=>r(c)(!0))},{default:X(()=>[...w[41]||(w[41]=[st("保存配置",-1)])]),_:1},8,["disabled"]),q(I,{text:"",disabled:r(s),onClick:r(d)},{default:X(()=>[...w[42]||(w[42]=[st("恢复默认",-1)])]),_:1},8,["disabled","onClick"])]),r(s)?(O(),H("div",oQ,[w[44]||(w[44]=K("span",{class:"pulse"},null,-1)),w[45]||(w[45]=K("span",null,"正在执行,日志与进度实时显示在工作台下方「运行日志」区",-1)),K("span",sQ,Se(r(i))+"%",1)])):te("",!0)])}}};iw(rQ).use(kZ,{locale:EZ}).mount("#app")});export default iQ(); +`||c==="\r")){s=u;continue}if(o.includes(c)){const d=s===-1?a:s;i={pattern:l.slice(u+1,d),start:u+1,end:d,prefix:c,prefixIndex:u,splitIndex:s,selectionEnd:a};break}}return i},HX=(e,t={debug:!1,useSelectionEnd:!1})=>{const n=e.selectionStart!==null?e.selectionStart:0,a=e.selectionEnd!==null?e.selectionEnd:0,l=t.useSelectionEnd?a:n,o=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"];if(t.debug){const p=document.querySelector("#input-textarea-caret-position-mirror-div");p!=null&&p.parentNode&&p.parentNode.removeChild(p)}const s=document.createElement("div");s.id="input-textarea-caret-position-mirror-div",document.body.appendChild(s);const i=s.style,u=window.getComputedStyle(e),c=e.nodeName==="INPUT";i.whiteSpace=c?"nowrap":"pre-wrap",c||(i.wordWrap="break-word"),i.position="absolute",t.debug||(i.visibility="hidden"),o.forEach(p=>{if(c&&p==="lineHeight")if(u.boxSizing==="border-box"){const g=Number.parseInt(u.height),m=Number.parseInt(u.paddingTop)+Number.parseInt(u.paddingBottom)+Number.parseInt(u.borderTopWidth)+Number.parseInt(u.borderBottomWidth),v=m+Number.parseInt(u.lineHeight);g>v?i.lineHeight=`${g-m}px`:g===v?i.lineHeight=u.lineHeight:i.lineHeight="0"}else i.lineHeight=u.height;else i[p]=u[p]}),Bd()?e.scrollHeight>Number.parseInt(u.height)&&(i.overflowY="scroll"):i.overflow="hidden",s.textContent=e.value.slice(0,Math.max(0,l)),c&&s.textContent&&(s.textContent=s.textContent.replace(/\s/g," "));const d=document.createElement("span");d.textContent=e.value.slice(Math.max(0,l))||".",d.style.position="relative",d.style.left=`${-e.scrollLeft}px`,d.style.top=`${-e.scrollTop}px`,s.appendChild(d);const f={top:d.offsetTop+Number.parseInt(u.borderTopWidth),left:d.offsetLeft+Number.parseInt(u.borderLeftWidth),height:Number.parseInt(u.fontSize)*1.5};return t.debug?d.style.backgroundColor="#aaa":document.body.removeChild(s),f.left>=e.clientWidth&&(f.left=e.clientWidth),f},KX=$e({...Kh,options:{type:G(Array),default:()=>[]},prefix:{type:G([String,Array]),default:"@",validator:e=>Ve(e)?e.length===1:e.every(t=>Ve(t)&&t.length===1)},split:{type:String,default:" ",validator:e=>e.length===1},filterOption:{type:G([Boolean,Function]),default:()=>FX,validator:e=>e===!1?!0:We(e)},placement:{type:G(String),default:"bottom"},showArrow:Boolean,offset:{type:Number,default:0},whole:Boolean,checkIsWhole:{type:G(Function)},modelValue:String,loading:Boolean,popperClass:tn.popperClass,popperStyle:tn.popperStyle,popperOptions:{type:G(Object),default:()=>({})},props:{type:G(Object),default:()=>bE}}),WX={[it]:e=>Ve(e),"whole-remove":(e,t)=>Ve(e)&&Ve(t),input:e=>Ve(e),search:(e,t)=>Ve(e)&&Ve(t),select:(e,t)=>rt(e)&&Ve(t),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent},bE={value:"value",label:"label",disabled:"disabled"},jX=$e({options:{type:G(Array),default:()=>[]},loading:Boolean,disabled:Boolean,contentId:String,ariaLabel:String}),qX={select:e=>Ve(e.value)},YX=["id","aria-disabled","aria-selected","onMousemove","onClick"];var UX=ue({name:"ElMentionDropdown",__name:"mention-dropdown",props:jX,emits:qX,setup(e,{expose:t,emit:n}){const a=e,l=n,o=he("mention"),{t:s}=St(),i=V(-1),u=V(),c=V(),d=V(),f=(S,E)=>[o.be("dropdown","item"),o.is("hovering",i.value===E),o.is("disabled",S.disabled||a.disabled)],p=S=>{S.disabled||a.disabled||l("select",S)},g=S=>{i.value=S},m=C(()=>a.disabled||a.options.every(S=>S.disabled)),v=C(()=>a.options[i.value]),h=()=>{!v.value||v.value.disabled||a.disabled||l("select",v.value)},b=S=>{const{options:E}=a;if(E.length===0||m.value)return;S==="next"?(i.value++,i.value===E.length&&(i.value=0)):S==="prev"&&(i.value--,i.value<0&&(i.value=E.length-1));const x=E[i.value];if(x.disabled){b(S);return}Ae(()=>y(x))},y=S=>{var w,T,M,I;const{options:E}=a,x=E.findIndex(N=>N.value===S.value),$=(w=c.value)==null?void 0:w[x];if($){const N=(M=(T=d.value)==null?void 0:T.querySelector)==null?void 0:M.call(T,`.${o.be("dropdown","wrap")}`);N&&wh(N,$)}(I=u.value)==null||I.handleScroll()};return fe(()=>a.options,()=>{m.value||a.options.length===0?i.value=-1:i.value=a.options.findIndex(S=>!S.disabled)},{immediate:!0}),t({hoveringIndex:i,navigateOptions:b,selectHoverOption:h,hoverOption:v}),(S,E)=>(O(),H("div",{ref_key:"dropdownRef",ref:d,class:P(r(o).b("dropdown"))},[S.$slots.header?(O(),H("div",{key:0,class:P(r(o).be("dropdown","header"))},[ne(S.$slots,"header")],2)):te("v-if",!0),ft(q(r(il),{id:e.contentId,ref_key:"scrollbarRef",ref:u,tag:"ul","wrap-class":r(o).be("dropdown","wrap"),"view-class":r(o).be("dropdown","list"),role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical"},{default:X(()=>[(O(!0),H(ze,null,bt(e.options,(x,$)=>(O(),H("li",{id:`${e.contentId}-${$}`,ref_for:!0,ref_key:"optionRefs",ref:c,key:$,class:P(f(x,$)),role:"option","aria-disabled":x.disabled||e.disabled||void 0,"aria-selected":i.value===$,onMousemove:w=>g($),onClick:Je(w=>p(x),["stop"])},[ne(S.$slots,"label",{item:x,index:$},()=>[K("span",null,Se(x.label??x.value),1)])],42,YX))),128))]),_:3},8,["id","wrap-class","view-class","aria-label"]),[[At,e.options.length>0&&!e.loading]]),e.loading?(O(),H("div",{key:1,class:P(r(o).be("dropdown","loading"))},[ne(S.$slots,"loading",{},()=>[st(Se(r(s)("el.mention.loading")),1)])],2)):te("v-if",!0),S.$slots.footer?(O(),H("div",{key:2,class:P(r(o).be("dropdown","footer"))},[ne(S.$slots,"footer")],2)):te("v-if",!0)],2))}}),GX=UX,XX=ue({name:"ElMention",inheritAttrs:!1,__name:"mention",props:KX,emits:WX,setup(e,{expose:t,emit:n}){const a=e,l=n,o=C(()=>{const D=Un.props??[],R=me(D)?D:Object.keys(D);return Ll(a,R)}),s=he("mention"),i=sn(),u=Xn(),c=V(),d=V(),f=V(),p=V(!1),g=V(),m=V(),v=C(()=>a.showArrow?a.placement:`${a.placement}-start`),h=C(()=>a.showArrow?["bottom","top"]:["bottom-start","top-start"]),b=C(()=>({...bE,...a.props})),y=D=>{const R={label:D[b.value.label],value:D[b.value.value],disabled:D[b.value.disabled]};return{...D,...R}},k=C(()=>a.options.map(y)),S=C(()=>{const{filterOption:D}=a;return!m.value||!D?k.value:k.value.filter(R=>D(m.value.pattern,R))}),E=C(()=>p.value&&(!!S.value.length||a.loading)),x=C(()=>{var D;return`${u.value}-${(D=f.value)==null?void 0:D.hoveringIndex}`}),$=D=>{l(it,D),l(Tn,D),j()},w=D=>{var z,L,W,Y;if((z=c.value)!=null&&z.isComposing)return;const R=Gt(D);switch(R){case ye.left:case ye.right:j();break;case ye.up:case ye.down:if(!p.value)return;D.preventDefault(),(L=f.value)==null||L.navigateOptions(R===ye.up?"prev":"next");break;case ye.enter:case ye.numpadEnter:if(!p.value){a.type!=="textarea"&&j();return}D.preventDefault(),(W=f.value)!=null&&W.hoverOption?(Y=f.value)==null||Y.selectHoverOption():p.value=!1;break;case ye.esc:if(!p.value)return;D.preventDefault(),p.value=!1;break;case ye.backspace:if(a.whole&&m.value){const{splitIndex:J,selectionEnd:Z,pattern:Q,prefixIndex:ee,prefix:ie}=m.value,ve=A();if(!ve)return;const pe=ve.value,re=k.value.find(_=>_.value===Q);if((We(a.checkIsWhole)?a.checkIsWhole(Q,ie):re)&&J!==-1&&J+1===Z){D.preventDefault();const _=pe.slice(0,ee)+pe.slice(J+1);l(it,_),l(Tn,_),l("whole-remove",Q,ie);const U=ee;Ae(()=>{ve.selectionStart=U,ve.selectionEnd=U,B()})}}}},{wrapperRef:T}=ho(c,{disabled:i,afterFocus(){j()},beforeBlur(D){var R;return(R=d.value)==null?void 0:R.isFocusInsideContent(D)},afterBlur(){p.value=!1}}),M=()=>{j()},I=D=>a.options.find(R=>D.value===R[b.value.value]),N=D=>{if(!m.value)return;const R=A();if(!R)return;const z=R.value,{split:L}=a,W=z.slice(m.value.end),Y=W.startsWith(L),J=`${D.value}${Y?"":L}`,Z=z.slice(0,m.value.start)+J+W;l(it,Z),l(Tn,Z),l("select",I(D),m.value.prefix);const Q=m.value.start+J.length+(Y?1:0);Ae(()=>{R.selectionStart=Q,R.selectionEnd=Q,R.focus(),B()})},A=()=>{var D,R;return a.type==="textarea"?(D=c.value)==null?void 0:D.textarea:(R=c.value)==null?void 0:R.input},j=()=>{setTimeout(()=>{F(),B(),Ae(()=>{var D;return(D=d.value)==null?void 0:D.updatePopper()})},0)},F=()=>{const D=A();if(!D)return;const R=HX(D),z=D.getBoundingClientRect(),L=T.value.getBoundingClientRect();g.value={position:"absolute",width:0,height:`${R.height}px`,left:`${R.left+z.left-L.left}px`,top:`${R.top+z.top-L.top}px`}},B=()=>{const D=A();if(document.activeElement!==D){p.value=!1;return}const{prefix:R,split:z}=a;if(m.value=zX(D,R,z),m.value&&m.value.splitIndex===-1){p.value=!0,l("search",m.value.pattern,m.value.prefix);return}p.value=!1};return t({input:c,tooltip:d,dropdownVisible:E}),(D,R)=>(O(),H("div",{ref_key:"wrapperRef",ref:T,class:P(r(s).b())},[q(r(Un),pt(pt(o.value,D.$attrs),{ref_key:"elInputRef",ref:c,"model-value":e.modelValue,disabled:r(i),role:E.value?"combobox":void 0,"aria-activedescendant":E.value?x.value||"":void 0,"aria-controls":E.value?r(u):void 0,"aria-expanded":E.value||void 0,"aria-label":e.ariaLabel,"aria-autocomplete":E.value?"none":void 0,"aria-haspopup":E.value?"listbox":void 0,onInput:$,onKeydown:w,onMousedown:M}),va({_:2},[bt(D.$slots,(z,L)=>({name:L,fn:X(W=>[ne(D.$slots,L,Cl(kl(W)))])}))]),1040,["model-value","disabled","role","aria-activedescendant","aria-controls","aria-expanded","aria-label","aria-autocomplete","aria-haspopup"]),q(r(Hn),{ref_key:"tooltipRef",ref:d,visible:E.value,"popper-class":[r(s).e("popper"),e.popperClass],"popper-style":e.popperStyle,"popper-options":e.popperOptions,placement:v.value,"fallback-placements":h.value,effect:"light",pure:"",offset:e.offset,"show-arrow":e.showArrow},{default:X(()=>[K("div",{style:je(g.value)},null,4)]),content:X(()=>[q(GX,{ref_key:"dropdownRef",ref:f,options:S.value,disabled:r(i),loading:e.loading,"content-id":r(u),"aria-label":e.ariaLabel,onSelect:N,onClick:R[0]||(R[0]=Je(z=>{var L;return(L=c.value)==null?void 0:L.focus()},["stop"]))},va({_:2},[bt(D.$slots,(z,L)=>({name:L,fn:X(W=>[ne(D.$slots,L,Cl(kl(W)))])}))]),1032,["options","disabled","loading","content-id","aria-label"])]),_:3},8,["visible","popper-class","popper-style","popper-options","placement","fallback-placements","offset","show-arrow"])],2))}}),JX=XX;const ZX=ut(JX),QX=$e({layout:{type:String,default:"horizontal",values:["horizontal","vertical"]},lazy:Boolean}),eJ={resizeStart:(e,t)=>!0,resize:(e,t)=>!0,resizeEnd:(e,t)=>!0,collapse:(e,t,n)=>!0},tJ=$e({min:{type:[String,Number]},max:{type:[String,Number]},size:{type:[String,Number]},resizable:{type:Boolean,default:!0},collapsible:Boolean}),nJ={"update:size":e=>typeof e=="number"||typeof e=="string"};function aJ(e){const t=V(),{width:n,height:a}=Ii(t);return{containerEl:t,containerSize:C(()=>e.value==="horizontal"?n.value:a.value)}}function lJ(e,t,n,a){const l=h=>h*t.value||0;function o(h,b){return Hd(h)?l(Fd(h)):Kd(h)?zd(h):h??b}const s=V(0),i=V(null);let u=[],c=vt;const d=C(()=>e.value.map(h=>[h.min,h.max]));fe(a,()=>{if(s.value){const h=new MouseEvent("mouseup",{bubbles:!0});window.dispatchEvent(h)}});const f=h=>{s.value=0,i.value={index:h,confirmed:!1},u=n.value},p=(h,b)=>{var I;let y=null;if((!i.value||!i.value.confirmed)&&b!==0){if(b>0)y=h,i.value={index:h,confirmed:!0};else for(let N=h;N>=0;N-=1)if(u[N]>0){y=N,i.value={index:N,confirmed:!0};break}}const k=y??((I=i.value)==null?void 0:I.index)??h,S=[...u],E=k+1,x=o(d.value[k][0],0),$=o(d.value[E][0],0),w=o(d.value[k][1],t.value||0),T=o(d.value[E][1],t.value||0);let M=b;S[k]+Mw&&(M=w-S[k]),S[E]-M>T&&(M=S[E]-T),S[k]+=M,S[E]-=M,s.value=M,c=()=>{e.value.forEach((N,A)=>{N.size=S[A]}),c=vt},a.value||c()},g=()=>{a.value&&c(),s.value=0,i.value=null,u=[]},m=[];return{lazyOffset:s,onMoveStart:f,onMoving:p,onMoveEnd:g,movingIndex:i,onCollapse:(h,b)=>{m.length||m.push(...n.value.map(($,w)=>{var T;return $<=0?o((T=d.value[w])==null?void 0:T[0],0):$}));const y=n.value,k=b==="start"?h:h+1,S=b==="start"?h+1:h,E=y[k],x=y[S];if(E!==0&&x!==0)y[k]=0,y[S]+=E,m[h]=E;else{const $=E+x,w=ya(m[h],0,$),T=$-w;y[S]=w,y[k]=T}e.value.forEach(($,w)=>{$.size=y[w]})}}}function oJ(e,t){const n=C(()=>e.value.map(s=>s.size)),a=C(()=>e.value.length),l=V([]);fe([n,a,t],()=>{var c;let s=[],i=0;for(let d=0;dd+(f||0),0);if(u>1||!i){const d=1/u;s=s.map(f=>f===void 0?0:f*d)}else{const d=(1-u)/i;s=s.map(f=>f===void 0?d:f)}l.value=s});const o=s=>s*t.value;return{percentSizes:l,pxSizes:C(()=>l.value.map(o))}}const yE=Symbol("splitterRootContextKey");var sJ=ue({name:"ElSplitter",__name:"splitter",props:QX,emits:eJ,setup(e,{emit:t}){const n=he("splitter"),a=t,l=e,o=Ot(l,"layout"),s=Ot(l,"lazy"),{containerEl:i,containerSize:u}=aJ(o),{removeChild:c,children:d,addChild:f,ChildrenSorter:p}=Jd(ht(),"ElSplitterPanel");fe(d,()=>{h.value=null,d.value.forEach((M,I)=>{M.setIndex(I)})});const{percentSizes:g,pxSizes:m}=oJ(d,u),{lazyOffset:v,movingIndex:h,onMoveStart:b,onMoving:y,onMoveEnd:k,onCollapse:S}=lJ(d,u,m,s),E=C(()=>({[n.cssVarBlockName("bar-offset")]:s.value?`${v.value}px`:void 0}));return Tt(yE,Ft({panels:d,percentSizes:g,pxSizes:m,layout:o,lazy:s,movingIndex:h,containerSize:u,onMoveStart:M=>{b(M),a("resizeStart",M,m.value)},onMoving:(M,I)=>{y(M,I),s.value||a("resize",M,m.value)},onMoveEnd:async M=>{k(),await Ae(),a("resizeEnd",M,m.value)},onCollapse:(M,I)=>{S(M,I),a("collapse",M,I,m.value)},registerPanel:f,unregisterPanel:c})),(M,I)=>(O(),H("div",{ref_key:"containerEl",ref:i,class:P([r(n).b(),r(n).e(o.value)]),style:je(E.value)},[ne(M.$slots,"default"),q(r(p)),te(" Prevent iframe touch events from breaking "),r(h)?(O(),H("div",{key:0,class:P([r(n).e("mask"),r(n).e(`mask-${o.value}`)])},null,2)):te("v-if",!0)],6))}}),rJ=sJ;function iJ(e){return e&&rt(e)?e:{start:!!e,end:!!e}}function x0(e,t,n,a){return!!(e!=null&&e.collapsible.end&&t>0||n!=null&&n.collapsible.start&&a===0&&t>0)}var uJ=ue({name:"ElSplitterBar",__name:"split-bar",props:{index:{type:Number,required:!0},layout:{type:String,values:["horizontal","vertical"],default:"horizontal"},resizable:{type:Boolean,default:!0},lazy:Boolean,startCollapsible:Boolean,endCollapsible:Boolean},emits:["moveStart","moving","moveEnd","collapse"],setup(e,{emit:t}){const n=he("splitter-bar"),a=e,l=t,o=C(()=>a.layout==="horizontal"),s=C(()=>o.value?{width:0}:{height:0}),i=C(()=>({width:o.value?"16px":"100%",height:o.value?"100%":"16px",cursor:a.resizable?o.value?"ew-resize":"ns-resize":"auto",touchAction:"none"})),u=C(()=>{const y=n.e("dragger");return{[`${y}-horizontal`]:o.value,[`${y}-vertical`]:!o.value,[`${y}-active`]:!!c.value}}),c=V(null),d=y=>{a.resizable&&(c.value=[y.pageX,y.pageY],l("moveStart",a.index),window.addEventListener("mouseup",m),window.addEventListener("mousemove",p))},f=y=>{if(a.resizable&&y.touches.length===1){y.preventDefault();const k=y.touches[0];c.value=[k.pageX,k.pageY],l("moveStart",a.index),window.addEventListener("touchend",v),window.addEventListener("touchmove",g)}},p=y=>{const{pageX:k,pageY:S}=y,E=k-c.value[0],x=S-c.value[1],$=o.value?E:x;l("moving",a.index,$)},g=y=>{if(y.touches.length===1){y.preventDefault();const k=y.touches[0],S=k.pageX-c.value[0],E=k.pageY-c.value[1],x=o.value?S:E;l("moving",a.index,x)}},m=()=>{c.value=null,window.removeEventListener("mouseup",m),window.removeEventListener("mousemove",p),l("moveEnd",a.index)},v=()=>{c.value=null,window.removeEventListener("touchend",v),window.removeEventListener("touchmove",g),l("moveEnd",a.index)},h=C(()=>o.value?ro:Zd),b=C(()=>o.value?ra:jl);return(y,k)=>(O(),H("div",{class:P([r(n).b()]),style:je(s.value)},[e.startCollapsible?(O(),H("div",{key:0,class:P([r(n).e("collapse-icon"),r(n).e(`${e.layout}-collapse-icon-start`)]),onClick:k[0]||(k[0]=S=>l("collapse",e.index,"start"))},[ne(y.$slots,"start-collapsible",{},()=>[(O(),oe(dt(h.value),{style:{width:"12px",height:"12px"}}))])],2)):te("v-if",!0),K("div",{class:P([r(n).e("dragger"),u.value,r(n).is("disabled",!e.resizable),r(n).is("lazy",e.resizable&&e.lazy)]),style:je(i.value),onMousedown:d,onTouchstart:f},null,38),e.endCollapsible?(O(),H("div",{key:1,class:P([r(n).e("collapse-icon"),r(n).e(`${e.layout}-collapse-icon-end`)]),onClick:k[1]||(k[1]=S=>l("collapse",e.index,"end"))},[ne(y.$slots,"end-collapsible",{},()=>[(O(),oe(dt(b.value),{style:{width:"12px",height:"12px"}}))])],2)):te("v-if",!0)],6))}}),cJ=uJ;const T0="ElSplitterPanel";var dJ=ue({name:T0,__name:"split-panel",props:tJ,emits:nJ,setup(e,{expose:t,emit:n}){const a=he("splitter-panel"),l=e,o=n,s=Fe(yE);s||rn(T0,"usage: ");const{panels:i,layout:u,lazy:c,containerSize:d,pxSizes:f}=Fn(s),{registerPanel:p,unregisterPanel:g,onCollapse:m,onMoveEnd:v,onMoveStart:h,onMoving:b}=s,y=V(),k=ht(),S=k.uid,E=V(0),x=C(()=>i.value[E.value]),$=R=>{E.value=R},w=C(()=>x.value?f.value[E.value]??0:0),T=C(()=>x.value?f.value[E.value+1]??0:0),M=C(()=>x.value?i.value[E.value+1]:null),I=C(()=>{var R;return M.value?l.resizable&&((R=M.value)==null?void 0:R.resizable)&&(w.value!==0||!l.min)&&(T.value!==0||!M.value.min):!1}),N=C(()=>x.value?E.value!==i.value.length-1:!1),A=C(()=>x0(x.value,w.value,M.value,T.value)),j=C(()=>x0(M.value,T.value,x.value,w.value));function F(R){return Hd(R)?Fd(R)*d.value||0:Kd(R)?zd(R):R??0}let B=!1;fe(()=>l.size,()=>{if(!B&&x.value){if(!d.value){x.value.size=l.size;return}const R=F(l.size),z=F(l.max),L=F(l.min),W=Math.min(Math.max(R,L||0),z||R);W!==R&&o("update:size",W),x.value.size=W}}),fe(()=>{var R;return(R=x.value)==null?void 0:R.size},R=>{R!==l.size&&(B=!0,o("update:size",R),Ae(()=>B=!1))}),fe(()=>l.resizable,R=>{x.value&&(x.value.resizable=R)});const D=Ft({uid:S,getVnode:()=>k.vnode,setIndex:$,...l,collapsible:C(()=>iJ(l.collapsible))});return p(D),zt(()=>g(D)),t({splitterPanelRef:y}),(R,z)=>(O(),H(ze,null,[K("div",pt({ref_key:"panelEl",ref:y,class:[r(a).b()],style:{flexBasis:`${w.value}px`}},R.$attrs),[ne(R.$slots,"default")],16),N.value?(O(),oe(cJ,{key:0,index:E.value,layout:r(u),lazy:r(c),resizable:I.value,"start-collapsible":A.value,"end-collapsible":j.value,onMoveStart:r(h),onMoving:r(b),onMoveEnd:r(v),onCollapse:r(m)},{"start-collapsible":X(()=>[ne(R.$slots,"start-collapsible")]),"end-collapsible":X(()=>[ne(R.$slots,"end-collapsible")]),_:3},8,["index","layout","lazy","resizable","start-collapsible","end-collapsible","onMoveStart","onMoving","onMoveEnd","onCollapse"])):te("v-if",!0)],64))}}),wE=dJ;const fJ=ut(rJ,{SplitPanel:wE}),pJ=un(wE),tl="ElInfiniteScroll",vJ={delay:{type:Number,default:200},distance:{type:Number,default:0},disabled:{type:Boolean,default:!1},immediate:{type:Boolean,default:!0}},Im=(e,t)=>Object.entries(vJ).reduce((n,[a,l])=>{const{type:o,default:s}=l,i=e.getAttribute(`infinite-scroll-${a}`);let u=t[i]??i??s;return u=u==="false"?!1:u,u=o(u),n[a]=Number.isNaN(u)?s:u,n},{}),SE=e=>{const{observer:t}=e[tl];t&&(t.disconnect(),delete e[tl].observer)},hJ=(e,t)=>{const{container:n,containerEl:a,instance:l,observer:o,lastScrollTop:s}=e[tl],{disabled:i,distance:u}=Im(e,l),{clientHeight:c,scrollHeight:d,scrollTop:f}=a,p=f-s;if(e[tl].lastScrollTop=f,o||i||p<0)return;let g=!1;if(n===e)g=d-(c+f)<=u;else{const{clientTop:m,scrollHeight:v}=e,h=mv(e,a);g=f+c>=h+m+v-u}g&&t.call(l)};function cp(e,t){const{containerEl:n,instance:a}=e[tl],{disabled:l}=Im(e,a);l||n.clientHeight===0||(n.scrollHeight<=n.clientHeight?t.call(a):SE(e))}const mJ={async mounted(e,t){const{instance:n,value:a}=t;Ol({scope:tl,from:"the directive v-infinite-scroll",replacement:"the el-scrollbar infinite scroll",version:"3.0.0",ref:"https://element-plus.org/en-US/component/scrollbar#infinite-scroll"},!0),We(a)||rn(tl,"'v-infinite-scroll' binding value must be a function"),await Ae();const{delay:l,immediate:o}=Im(e,n),s=yh(e,!0),i=s===window?document.documentElement:s,u=Oo(hJ.bind(null,e,a),l);if(s){if(e[tl]={instance:n,container:s,containerEl:i,delay:l,cb:a,onScroll:u,lastScrollTop:i.scrollTop},o){const c=new MutationObserver(Oo(cp.bind(null,e,a),50));e[tl].observer=c,c.observe(e,{childList:!0,subtree:!0}),cp(e,a)}s.addEventListener("scroll",u)}},unmounted(e){if(!e.ElInfiniteScroll)return;const{container:t,onScroll:n}=e[tl];t==null||t.removeEventListener("scroll",n),SE(e)},async updated(e){if(!e.ElInfiniteScroll)await Ae();else{const{containerEl:t,cb:n,observer:a}=e[tl];t.clientHeight&&a&&cp(e,n)}}},Rv=mJ;Rv.install=e=>{e.directive("InfiniteScroll",Rv)};const gJ=Rv;function bJ(e,t){let n,a=!1;const l=V(!1),o=Ft({...e,originalPosition:"",originalOverflow:"",visible:!1});function s(m){o.text=m}function i(){if(a)return;a=!0;const m=o.parent,v=g.ns||g._.exposed.ns;if(!m.vLoadingAddClassList){let b=m.getAttribute("loading-number");b=Number.parseInt(b)-1,b?m.setAttribute("loading-number",b.toString()):(sa(m,v.bm("parent","relative")),m.removeAttribute("loading-number")),sa(m,v.bm("parent","hidden"))}u(),p.unmount();const h=g.$;h.vnode.el=null,h.subTree=null,p._container=null}function u(){var m,v;(v=(m=g.$el)==null?void 0:m.parentNode)==null||v.removeChild(g.$el)}function c(){var m;e.beforeClose&&!e.beforeClose()||(l.value=!0,clearTimeout(n),n=setTimeout(d,400),o.visible=!1,(m=e.closed)==null||m.call(e))}function d(){if(!l.value)return;const m=o.parent;l.value=!1,m.vLoadingAddClassList=void 0,i()}const p=iw(ue({name:"ElLoading",setup(m,{expose:v}){const{ns:h,zIndex:b}=af("loading");return v({ns:h,zIndex:b}),()=>{const y=o.spinner||o.svg,k=Ge("svg",{class:"circular",viewBox:o.svgViewBox?o.svgViewBox:"0 0 50 50",...y?{innerHTML:y}:{}},y?void 0:[Ge("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),S=o.text?Ge("p",{class:h.b("text")},[o.text]):void 0;return Ge(zn,{name:h.b("fade"),onAfterLeave:d},{default:X(()=>[ft(q("div",{style:{backgroundColor:o.background||""},class:[h.b("mask"),o.customClass,h.is("fullscreen",o.fullscreen)]},[Ge("div",{class:h.b("spinner")},[k,S])]),[[At,o.visible]])])})}}}));Object.assign(p._context,t??{});const g=p.mount(document.createElement("div"));return{...Fn(o),setText:s,removeElLoadingChild:u,close:c,handleAfterLeave:d,vm:g,get $el(){return a?null:g.$el}}}let Yu;const nr=function(e={},t){if(!It)return;const n=yJ(e);if(n.fullscreen&&Yu)return Yu;const a=bJ({...n,closed:()=>{var o;(o=n.closed)==null||o.call(n),n.fullscreen&&(Yu=void 0)}},t??nr._context);wJ(n,n.parent,a),$0(n,n.parent,a),n.parent.vLoadingAddClassList=()=>$0(n,n.parent,a);let l=n.parent.getAttribute("loading-number");return l?l=`${Number.parseInt(l)+1}`:l="1",n.parent.setAttribute("loading-number",l),n.parent.appendChild(a.$el),Ae(()=>a.visible.value=n.visible),n.fullscreen&&(Yu=a),a},yJ=e=>{let t;return Ve(e.target)?t=document.querySelector(e.target)??document.body:t=e.target||document.body,{parent:t===document.body||e.body?document.body:t,background:e.background||"",svg:e.svg||"",svgViewBox:e.svgViewBox||"",spinner:e.spinner||!1,text:e.text||"",fullscreen:t===document.body&&(e.fullscreen??!0),lock:e.lock??!1,customClass:e.customClass||"",visible:e.visible??!0,beforeClose:e.beforeClose,closed:e.closed,target:t}},wJ=async(e,t,n)=>{const{nextZIndex:a}=n.vm.zIndex||n.vm._.exposed.zIndex,l={};if(e.fullscreen)n.originalPosition.value=Sl(document.body,"position"),n.originalOverflow.value=Sl(document.body,"overflow"),l.zIndex=a();else if(e.parent===document.body){n.originalPosition.value=Sl(document.body,"position"),await Ae();for(const o of["top","left"]){const s=o==="top"?"scrollTop":"scrollLeft";l[o]=`${e.target.getBoundingClientRect()[o]+document.body[s]+document.documentElement[s]-Number.parseInt(Sl(document.body,`margin-${o}`),10)}px`}for(const o of["height","width"])l[o]=`${e.target.getBoundingClientRect()[o]}px`}else n.originalPosition.value=Sl(t,"position");for(const[o,s]of Object.entries(l))n.$el.style[o]=s},$0=(e,t,n)=>{const a=n.vm.ns||n.vm._.exposed.ns;["absolute","fixed","sticky"].includes(n.originalPosition.value)?sa(t,a.bm("parent","relative")):Da(t,a.bm("parent","relative")),e.fullscreen&&e.lock?Da(t,a.bm("parent","hidden")):sa(t,a.bm("parent","hidden"))};nr._context=null;const ti=Symbol("ElLoading"),ts=e=>`element-loading-${uo(e)}`,O0=(e,t)=>{const n=t.instance,a=c=>rt(t.value)?t.value[c]:void 0,l=c=>{const d=Ve(c)&&(n==null?void 0:n[c])||c;return V(d)},o=c=>l(a(c)||e.getAttribute(ts(c))),s=a("fullscreen")??t.modifiers.fullscreen,i={text:o("text"),svg:o("svg"),svgViewBox:o("svgViewBox"),spinner:o("spinner"),background:o("background"),customClass:o("customClass"),fullscreen:s,target:a("target")??(s?void 0:e),body:a("body")??t.modifiers.body,lock:a("lock")??t.modifiers.lock},u=nr(i);u._context=hi._context,e[ti]={options:i,instance:u}},SJ=(e,t)=>{for(const n of Object.keys(e))Qt(e[n])&&(e[n].value=t[n])},hi={mounted(e,t){t.value&&O0(e,t)},updated(e,t){const n=e[ti];if(!t.value){n==null||n.instance.close(),e[ti]=null;return}n?SJ(n.options,rt(t.value)?t.value:{text:e.getAttribute(ts("text")),svg:e.getAttribute(ts("svg")),svgViewBox:e.getAttribute(ts("svgViewBox")),spinner:e.getAttribute(ts("spinner")),background:e.getAttribute(ts("background")),customClass:e.getAttribute(ts("customClass"))}):O0(e,t)},unmounted(e){var t;(t=e[ti])==null||t.instance.close(),e[ti]=null}};hi._context=null;const CJ={install(e){nr._context=e._context,hi._context=e._context,e.directive("loading",hi),e.config.globalProperties.$loading=nr},directive:hi,service:nr},CE=["primary","success","info","warning","error"],kE=["top","top-left","top-right","bottom","bottom-left","bottom-right"],ta=dn({customClass:"",dangerouslyUseHTMLString:!1,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:!1,type:"info",plain:!1,offset:16,placement:void 0,zIndex:0,grouping:!1,repeatNum:1,appendTo:It?document.body:void 0}),kJ=$e({customClass:{type:G([String,Array,Object,Boolean]),default:ta.customClass},dangerouslyUseHTMLString:{type:Boolean,default:ta.dangerouslyUseHTMLString},duration:{type:Number,default:ta.duration},icon:{type:Ut,default:ta.icon},id:{type:String,default:ta.id},message:{type:G([String,Object,Function]),default:ta.message},onClose:{type:G(Function),default:ta.onClose},showClose:{type:Boolean,default:ta.showClose},type:{type:String,values:CE,default:ta.type},plain:{type:Boolean,default:ta.plain},offset:{type:Number,default:ta.offset},placement:{type:String,values:kE,default:ta.placement},zIndex:{type:Number,default:ta.zIndex},grouping:{type:Boolean,default:ta.grouping},repeatNum:{type:Number,default:ta.repeatNum}}),EJ={destroy:()=>!0},ol=vd({}),xJ=e=>(ol[e]||(ol[e]=vd([])),ol[e]),TJ=(e,t)=>{const n=ol[t]||[],a=n.findIndex(s=>s.id===e),l=n[a];let o;return a>0&&(o=n[a-1]),{current:l,prev:o}},$J=(e,t)=>{const{prev:n}=TJ(e,t);return n?n.vm.exposed.bottom.value:0},OJ=(e,t,n)=>(ol[n]||[]).findIndex(a=>a.id===e)>0?16:t,NJ=["id"],MJ=["innerHTML"];var PJ=ue({name:"ElMessage",__name:"message",props:kJ,emits:EJ,setup(e,{expose:t,emit:n}){const{Close:a}=Dh,l=e,o=n,s=V(!1),{ns:i,zIndex:u}=af("message"),{currentZIndex:c,nextZIndex:d}=u,f=V(),p=V(!1),g=V(0);let m;const v=C(()=>l.type?l.type==="error"?"danger":l.type:"info"),h=C(()=>{const A=l.type;return{[i.bm("icon",A)]:A&&zo[A]}}),b=C(()=>l.icon||zo[l.type]||""),y=C(()=>l.placement||"top"),k=C(()=>$J(l.id,y.value)),S=C(()=>Math.max(OJ(l.id,l.offset,y.value)+k.value,l.offset)),E=C(()=>g.value+S.value),x=C(()=>y.value.includes("left")?i.is("left"):y.value.includes("right")?i.is("right"):i.is("center")),$=C(()=>y.value.startsWith("top")?"top":"bottom"),w=C(()=>({[$.value]:`${S.value}px`,zIndex:c.value}));function T(){l.duration!==0&&({stop:m}=cr(()=>{I()},l.duration))}function M(){m==null||m()}function I(){p.value=!1,Ae(()=>{var A;s.value||((A=l.onClose)==null||A.call(l),o("destroy"))})}function N(A){Gt(A)===ye.esc&&I()}return mt(()=>{T(),d(),p.value=!0}),fe(()=>l.repeatNum,()=>{M(),T()}),Ht(document,"keydown",N),on(f,()=>{g.value=f.value.getBoundingClientRect().height}),t({visible:p,bottom:E,close:I}),(A,j)=>(O(),oe(zn,{name:r(i).b("fade"),onBeforeEnter:j[0]||(j[0]=F=>s.value=!0),onBeforeLeave:e.onClose,onAfterLeave:j[1]||(j[1]=F=>A.$emit("destroy")),persisted:""},{default:X(()=>[ft(K("div",{id:e.id,ref_key:"messageRef",ref:f,class:P([r(i).b(),{[r(i).m(e.type)]:e.type},r(i).is("closable",e.showClose),r(i).is("plain",e.plain),r(i).is("bottom",$.value==="bottom"),x.value,e.customClass]),style:je(w.value),role:"alert",onMouseenter:M,onMouseleave:T},[e.repeatNum>1?(O(),oe(r(hC),{key:0,value:e.repeatNum,type:v.value,class:P(r(i).e("badge"))},null,8,["value","type","class"])):te("v-if",!0),b.value?(O(),oe(r(Be),{key:1,class:P([r(i).e("icon"),h.value])},{default:X(()=>[(O(),oe(dt(b.value)))]),_:1},8,["class"])):te("v-if",!0),!e.dangerouslyUseHTMLString||A.$slots.default?(O(),H("p",{key:2,class:P(r(i).e("content"))},[ne(A.$slots,"default",{},()=>[st(Se(e.message),1)])],2)):(O(),H(ze,{key:3},[te(" Caution here, message could've been compromised, never use user's input as message "),K("p",{class:P(r(i).e("content")),innerHTML:e.message},null,10,MJ)],2112)),e.showClose?(O(),oe(r(Be),{key:4,class:P(r(i).e("closeBtn")),onClick:Je(I,["stop"])},{default:X(()=>[q(r(a))]),_:1},8,["class"])):te("v-if",!0)],46,NJ),[[At,p.value]])]),_:3},8,["name","onBeforeLeave"]))}}),IJ=PJ;let RJ=1;const _J=e=>{if(!e.appendTo)e.appendTo=document.body;else if(Ve(e.appendTo)){let t=document.querySelector(e.appendTo);wa(t)||(Kt("ElMessage","the appendTo option is not an HTMLElement. Falling back to document.body."),t=document.body),e.appendTo=t}},AJ=e=>{!e.placement&&Ve(aa.placement)&&aa.placement&&(e.placement=aa.placement),e.placement||(e.placement="top"),kE.includes(e.placement)||(Kt("ElMessage",`Invalid placement: ${e.placement}. Falling back to 'top'.`),e.placement="top")},EE=e=>{const t=!e||Ve(e)||Jt(e)||We(e)?{message:e}:e,n={...ta,...t};return _J(n),AJ(n),Wt(aa.grouping)&&!n.grouping&&(n.grouping=aa.grouping),He(aa.duration)&&n.duration===3e3&&(n.duration=aa.duration),He(aa.offset)&&n.offset===16&&(n.offset=aa.offset),Wt(aa.showClose)&&!n.showClose&&(n.showClose=aa.showClose),Wt(aa.plain)&&!n.plain&&(n.plain=aa.plain),n},LJ=e=>{const t=e.props.placement||"top",n=ol[t],a=n.indexOf(e);if(a===-1)return;n.splice(a,1);const{handler:l}=e;l.close()},VJ=({appendTo:e,...t},n)=>{const a=`message_${RJ++}`,l=t.onClose,o=document.createElement("div"),s={...t,id:a,onClose:()=>{l==null||l(),LJ(c)},onDestroy:()=>{Bo(null,o)}},i=q(IJ,s,We(s.message)||Jt(s.message)?{default:We(s.message)?s.message:()=>s.message}:null);i.appContext=n||Ns._context,Bo(i,o),e.appendChild(o.firstElementChild);const u=i.component,c={id:a,vnode:i,vm:u,handler:{close:()=>{u.exposed.close()}},props:i.component.props};return c},Ns=(e={},t)=>{if(!It)return{close:()=>{}};const n=EE(e),a=xJ(n.placement||"top");if(n.grouping&&a.length){const o=a.find(({vnode:s})=>{var i;return((i=s.props)==null?void 0:i.message)===n.message});if(o)return o.props.repeatNum+=1,o.props.type=n.type,o.handler}if(He(aa.max)&&a.length>=aa.max)return{close:()=>{}};const l=VJ(n,t);return a.push(l),l.handler};CE.forEach(e=>{Ns[e]=(t={},n)=>{const a=EE(t);return Ns({...a,type:e},n)}});function DJ(e){for(const t in ol)if(Vt(ol,t)){const n=[...ol[t]];for(const a of n)(!e||e===a.props.type)&&a.handler.close()}}function BJ(e){ol[e]&&[...ol[e]].forEach(t=>t.handler.close())}Ns.closeAll=DJ;Ns.closeAllByPlacement=BJ;Ns._context=null;const An=jS(Ns,"$message");var FJ=ue({name:"ElMessageBox",directives:{TrapFocus:LV},components:{ElButton:Bn,ElFocusTrap:Nr,ElInput:Un,ElOverlay:sm,ElIcon:Be,...Dh},inheritAttrs:!1,props:{buttonSize:{type:String,validator:C2},modal:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},closeOnHashChange:{type:Boolean,default:!0},center:Boolean,draggable:Boolean,overflow:Boolean,roundButton:Boolean,container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(e,{emit:t}){const{locale:n,zIndex:a,ns:l,size:o}=af("message-box",C(()=>e.buttonSize)),{t:s}=n,{nextZIndex:i}=a,u=V(!1),c=Ft({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",cancelButtonType:"",confirmButtonType:"primary",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",closeIcon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:"",inputValidator:void 0,inputErrorMessage:"",message:"",modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonLoadingIcon:$l(rl),cancelButtonLoadingIcon:$l(rl),confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:i()}),d=C(()=>{const D=c.type;return{[l.bm("icon",D)]:D&&zo[D]}}),f=Xn(),p=Xn(),g=C(()=>{const D=c.type;return c.icon||D&&zo[D]||""}),m=C(()=>!!c.message),v=V(),h=V(),b=V(),y=V(),k=V(),S=C(()=>c.confirmButtonClass);fe(()=>c.inputValue,async D=>{await Ae(),e.boxType==="prompt"&&D&&A()},{immediate:!0}),fe(()=>u.value,D=>{var R;D&&(e.boxType!=="prompt"&&(c.autofocus?b.value=((R=k.value)==null?void 0:R.$el)??v.value:b.value=v.value),c.zIndex=i()),e.boxType==="prompt"&&(D?Ae().then(()=>{y.value&&y.value.$el&&(c.autofocus?b.value=j()??v.value:b.value=v.value)}):(c.editorErrorMessage="",c.validateError=!1))});const E=C(()=>e.draggable),x=C(()=>e.overflow),{isDragging:$}=rS(v,h,E,x);mt(async()=>{await Ae(),e.closeOnHashChange&&window.addEventListener("hashchange",w)}),zt(()=>{e.closeOnHashChange&&window.removeEventListener("hashchange",w)});function w(){u.value&&(u.value=!1,Ae(()=>{c.action&&t("action",c.action)}))}const T=()=>{e.closeOnClickModal&&N(c.distinguishCancelAndClose?"close":"cancel")},M=Nh(T),I=D=>{var R;if(c.inputType!=="textarea"&&!((R=y.value)!=null&&R.isComposing))return D.preventDefault(),N("confirm")},N=D=>{var R;e.boxType==="prompt"&&D==="confirm"&&!A()||(c.action=D,c.beforeClose?(R=c.beforeClose)==null||R.call(c,D,c,w):w())},A=()=>{if(e.boxType==="prompt"){const D=c.inputPattern;if(D&&!D.test(c.inputValue||""))return c.editorErrorMessage=c.inputErrorMessage||s("el.messagebox.error"),c.validateError=!0,!1;const R=c.inputValidator;if(We(R)){const z=R(c.inputValue);if(z===!1)return c.editorErrorMessage=c.inputErrorMessage||s("el.messagebox.error"),c.validateError=!0,!1;if(Ve(z))return c.editorErrorMessage=z,c.validateError=!0,!1}}return c.editorErrorMessage="",c.validateError=!1,!0},j=()=>{var R;const D=(R=y.value)==null?void 0:R.$refs;return(D==null?void 0:D.input)??(D==null?void 0:D.textarea)},F=()=>{N("close")},B=()=>{e.closeOnPressEscape&&F()};return e.lockScroll&&Wd(u,{ns:l}),{...Fn(c),ns:l,overlayEvent:M,visible:u,hasMessage:m,typeClass:d,contentId:f,inputId:p,btnSize:o,iconComponent:g,confirmButtonClasses:S,rootRef:v,focusStartRef:b,headerRef:h,inputRef:y,isDragging:$,confirmRef:k,doClose:w,handleClose:F,onCloseRequested:B,handleWrapperClick:T,handleInputEnter:I,handleAction:N,t:s}}});const zJ=["aria-label","aria-describedby"],HJ=["aria-label"],KJ=["id"];function WJ(e,t,n,a,l,o){const s=Pt("el-icon"),i=Pt("el-input"),u=Pt("el-button"),c=Pt("el-focus-trap"),d=Pt("el-overlay");return O(),oe(zn,{name:"fade-in-linear",onAfterLeave:t[11]||(t[11]=f=>e.$emit("vanish")),persisted:""},{default:X(()=>[ft(q(d,{"z-index":e.zIndex,"overlay-class":[e.ns.is("message-box"),e.modalClass],mask:e.modal},{default:X(()=>[K("div",{role:"dialog","aria-label":e.title,"aria-modal":"true","aria-describedby":e.showInput?void 0:e.contentId,class:P(`${e.ns.namespace.value}-overlay-message-box`),onClick:t[8]||(t[8]=(...f)=>e.overlayEvent.onClick&&e.overlayEvent.onClick(...f)),onMousedown:t[9]||(t[9]=(...f)=>e.overlayEvent.onMousedown&&e.overlayEvent.onMousedown(...f)),onMouseup:t[10]||(t[10]=(...f)=>e.overlayEvent.onMouseup&&e.overlayEvent.onMouseup(...f))},[q(c,{loop:"",trapped:e.visible,"focus-trap-el":e.rootRef,"focus-start-el":e.focusStartRef,onReleaseRequested:e.onCloseRequested},{default:X(()=>[K("div",{ref:"rootRef",class:P([e.ns.b(),e.customClass,e.ns.is("draggable",e.draggable),e.ns.is("dragging",e.isDragging),{[e.ns.m("center")]:e.center}]),style:je(e.customStyle),tabindex:"-1",onClick:t[7]||(t[7]=Je(()=>{},["stop"]))},[e.title!==null&&e.title!==void 0?(O(),H("div",{key:0,ref:"headerRef",class:P([e.ns.e("header"),{"show-close":e.showClose}])},[K("div",{class:P(e.ns.e("title"))},[e.iconComponent&&e.center?(O(),oe(s,{key:0,class:P([e.ns.e("status"),e.typeClass])},{default:X(()=>[(O(),oe(dt(e.iconComponent)))]),_:1},8,["class"])):te("v-if",!0),K("span",null,Se(e.title),1)],2),e.showClose?(O(),H("button",{key:0,type:"button",class:P(e.ns.e("headerbtn")),"aria-label":e.t("el.messagebox.close"),onClick:t[0]||(t[0]=f=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel")),onKeydown:t[1]||(t[1]=an(Je(f=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"]))},[q(s,{class:P(e.ns.e("close"))},{default:X(()=>[(O(),oe(dt(e.closeIcon||"close")))]),_:1},8,["class"])],42,HJ)):te("v-if",!0)],2)):te("v-if",!0),K("div",{id:e.contentId,class:P(e.ns.e("content"))},[K("div",{class:P(e.ns.e("container"))},[e.iconComponent&&!e.center&&e.hasMessage?(O(),oe(s,{key:0,class:P([e.ns.e("status"),e.typeClass])},{default:X(()=>[(O(),oe(dt(e.iconComponent)))]),_:1},8,["class"])):te("v-if",!0),e.hasMessage?(O(),H("div",{key:1,class:P(e.ns.e("message"))},[ne(e.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(O(),oe(dt(e.showInput?"label":"p"),{key:1,for:e.showInput?e.inputId:void 0,innerHTML:e.message},null,8,["for","innerHTML"])):(O(),oe(dt(e.showInput?"label":"p"),{key:0,for:e.showInput?e.inputId:void 0,textContent:Se(e.message)},null,8,["for","textContent"]))])],2)):te("v-if",!0)],2),ft(K("div",{class:P(e.ns.e("input"))},[q(i,{id:e.inputId,ref:"inputRef",modelValue:e.inputValue,"onUpdate:modelValue":t[2]||(t[2]=f=>e.inputValue=f),type:e.inputType,placeholder:e.inputPlaceholder,"aria-invalid":e.validateError,class:P({invalid:e.validateError}),onKeydown:an(e.handleInputEnter,["enter"])},null,8,["id","modelValue","type","placeholder","aria-invalid","class","onKeydown"]),K("div",{class:P(e.ns.e("errormsg")),style:je({visibility:e.editorErrorMessage?"visible":"hidden"})},Se(e.editorErrorMessage),7)],2),[[At,e.showInput]])],10,KJ),e.showCancelButton||e.showConfirmButton?(O(),H("div",{key:1,class:P(e.ns.e("btns"))},[e.showCancelButton?(O(),oe(u,{key:0,type:e.cancelButtonType==="text"?"":e.cancelButtonType,text:e.cancelButtonType==="text",loading:e.cancelButtonLoading,"loading-icon":e.cancelButtonLoadingIcon,class:P([e.cancelButtonClass]),round:e.roundButton,size:e.btnSize,onClick:t[3]||(t[3]=f=>e.handleAction("cancel")),onKeydown:t[4]||(t[4]=an(Je(f=>e.handleAction("cancel"),["prevent"]),["enter"]))},{default:X(()=>[st(Se(e.cancelButtonText||e.t("el.messagebox.cancel")),1)]),_:1},8,["type","text","loading","loading-icon","class","round","size"])):te("v-if",!0),ft(q(u,{ref:"confirmRef",type:e.confirmButtonType==="text"?"":e.confirmButtonType,text:e.confirmButtonType==="text",loading:e.confirmButtonLoading,"loading-icon":e.confirmButtonLoadingIcon,class:P([e.confirmButtonClasses]),round:e.roundButton,disabled:e.confirmButtonDisabled,size:e.btnSize,onClick:t[5]||(t[5]=f=>e.handleAction("confirm")),onKeydown:t[6]||(t[6]=an(Je(f=>e.handleAction("confirm"),["prevent"]),["enter"]))},{default:X(()=>[st(Se(e.confirmButtonText||e.t("el.messagebox.confirm")),1)]),_:1},8,["type","text","loading","loading-icon","class","round","disabled","size"]),[[At,e.showConfirmButton]])],2)):te("v-if",!0)],6)]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,zJ)]),_:3},8,["z-index","overlay-class","mask"]),[[At,e.visible]])]),_:3})}var jJ=Rn(FJ,[["render",WJ]]);const Ui=new Map,qJ=e=>{let t=document.body;return e.appendTo&&(Ve(e.appendTo)&&(t=document.querySelector(e.appendTo)),wa(e.appendTo)&&(t=e.appendTo),wa(t)||(Kt("ElMessageBox","the appendTo option is not an HTMLElement. Falling back to document.body."),t=document.body)),t},dp=(e,t)=>{var a;const n=(a=e.component)==null?void 0:a.proxy;return()=>n.handleAction(t)},YJ=(e,t,n=null)=>{const a=q(jJ,e,We(e.message)||Jt(e.message)?{default:We(e.message)?()=>e.message({confirm:dp(a,"confirm"),cancel:dp(a,"cancel"),close:dp(a,"close")}):()=>e.message}:null);return a.appContext=n,Bo(a,t),qJ(e).appendChild(t.firstElementChild),a.component},UJ=()=>document.createElement("div"),GJ=(e,t)=>{const n=UJ();e.onVanish=()=>{Bo(null,n),Ui.delete(l)},e.onAction=o=>{const s=Ui.get(l);let i;e.showInput?i={value:l.inputValue,action:o}:i=o,e.callback?e.callback(i,a.proxy):o==="cancel"||o==="close"?e.distinguishCancelAndClose&&o!=="cancel"?s.reject("close"):s.reject("cancel"):s.resolve(i)};const a=YJ(e,n,t),l=a.proxy;for(const o in e)Vt(e,o)&&!Vt(l.$props,o)&&(o==="closeIcon"&&rt(e[o])?l[o]=$l(e[o]):l[o]=e[o]);return l.visible=!0,l};function Pr(e,t=null){if(!It)return Promise.reject();let n;return Ve(e)||Jt(e)?e={message:e}:n=e.callback,new Promise((a,l)=>{const o=GJ(e,t??Pr._context);Ui.set(o,{options:e,callback:n,resolve:a,reject:l})})}const XJ=["alert","confirm","prompt"],JJ={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};XJ.forEach(e=>{Pr[e]=ZJ(e)});function ZJ(e){return(t,n,a,l)=>{let o="";return rt(n)?(a=n,o=""):xt(n)?o="":o=n,Pr(Object.assign({title:o,message:t,type:"",...JJ[e]},a,{boxType:e}),l)}}Pr.close=()=>{Ui.forEach((e,t)=>{t.doClose()}),Ui.clear()};Pr._context=null;const xo=Pr;xo.install=e=>{xo._context=e._context,e.config.globalProperties.$msgbox=xo,e.config.globalProperties.$messageBox=xo,e.config.globalProperties.$alert=xo.alert,e.config.globalProperties.$confirm=xo.confirm,e.config.globalProperties.$prompt=xo.prompt};const Cc=xo,xE=["primary","success","info","warning","error"],QJ=$e({customClass:{type:G([String,Array,Object,Boolean]),default:""},dangerouslyUseHTMLString:Boolean,duration:{type:Number,default:4500},icon:{type:Ut},id:{type:String,default:""},message:{type:G([String,Object,Function]),default:""},offset:{type:Number,default:0},onClick:{type:G(Function),default:()=>{}},onClose:{type:G(Function),required:!0},position:{type:String,values:["top-right","top-left","bottom-right","bottom-left"],default:"top-right"},showClose:{type:Boolean,default:!0},title:{type:String,default:""},type:{type:String,values:[...xE,""],default:""},zIndex:Number,closeIcon:{type:Ut,default:Ya},progress:{type:G([Boolean,Object]),default:!1},pauseOnHover:{type:Boolean,default:!0}}),eZ={destroy:()=>!0},tZ=["id"],nZ=["textContent"],aZ={key:0},lZ=["innerHTML"];var oZ=ue({name:"ElNotification",__name:"notification",props:QJ,emits:eZ,setup(e,{expose:t}){const n=e,{ns:a,zIndex:l}=af("notification"),{nextZIndex:o,currentZIndex:s}=l,i=V(!1);let u;const c=V(100);let d=0,f=0;const p=C(()=>{const A=n.type;return A&&zo[n.type]?a.m(A):""}),g=C(()=>!!n.progress&&n.duration>0),m=C(()=>{switch(n.type){case"success":return"success";case"warning":return"warning";case"error":return"exception";default:return}}),v=C(()=>({status:m.value,strokeWidth:3,showText:!1,...typeof n.progress=="object"?n.progress:void 0})),h=C(()=>n.type&&zo[n.type]||n.icon),b=C(()=>n.position.endsWith("right")?"right":"left"),y=C(()=>n.position.startsWith("top")?"top":"bottom"),k=C(()=>({[y.value]:`${n.offset}px`,zIndex:n.zIndex??s.value})),{pause:S,resume:E}=UI(()=>{c.value=Math.max(0,100-(d+Date.now()-f)/n.duration*100)},100,{immediate:!1});function x(){if(n.duration<=0)return;u==null||u(),S(),f=Date.now();const A=Math.max(0,n.duration-d);({stop:u}=cr(()=>{i.value&&I()},A)),g.value&&(c.value=A/n.duration*100,E())}function $(){u==null||u(),S(),f>0&&(d+=Date.now()-f,f=0)}let w=!1;function T(){w=!0,n.pauseOnHover&&$()}function M(){w=!1,n.pauseOnHover&&x()}function I(){i.value=!1,$()}function N(A){switch(Gt(A)){case ye.delete:case ye.backspace:$();break;case ye.esc:i.value&&I();break;default:if(w&&n.pauseOnHover)break;$(),x()}}return mt(()=>{x(),o(),i.value=!0}),Ht(document,"keydown",N),t({visible:i,close:I}),(A,j)=>(O(),oe(zn,{name:r(a).b("fade"),onBeforeLeave:e.onClose,onAfterLeave:j[1]||(j[1]=F=>A.$emit("destroy")),persisted:""},{default:X(()=>[ft(K("div",{id:e.id,class:P([r(a).b(),e.customClass,b.value]),style:je(k.value),role:"alert",onMouseenter:T,onMouseleave:M,onClick:j[0]||(j[0]=(...F)=>e.onClick&&e.onClick(...F))},[h.value?(O(),oe(r(Be),{key:0,class:P([r(a).e("icon"),p.value])},{default:X(()=>[(O(),oe(dt(h.value)))]),_:1},8,["class"])):te("v-if",!0),K("div",{class:P(r(a).e("group"))},[K("h2",{class:P(r(a).e("title")),textContent:Se(e.title)},null,10,nZ),ft(K("div",{class:P(r(a).e("content")),style:je(e.title?void 0:{margin:0})},[ne(A.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(O(),H(ze,{key:1},[te(" Caution here, message could've been compromised, never use user's input as message "),K("p",{innerHTML:e.message},null,8,lZ)],2112)):(O(),H("p",aZ,Se(e.message),1))])],6),[[At,e.message]]),e.showClose?(O(),oe(r(Be),{key:0,class:P(r(a).e("closeBtn")),onClick:Je(I,["stop"])},{default:X(()=>[(O(),oe(dt(e.closeIcon)))]),_:1},8,["class"])):te("v-if",!0)],2),g.value?(O(),H("div",{key:1,class:P(r(a).e("progress")),"aria-hidden":"true"},[q(r(fm),pt(v.value,{percentage:c.value}),null,16,["percentage"])],2)):te("v-if",!0)],46,tZ),[[At,i.value]])]),_:3},8,["name","onBeforeLeave"]))}}),sZ=oZ;const Sr={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},sd=16;let rZ=1;const Ms=function(e={},t){if(!It)return{close:()=>{}};(Ve(e)||Jt(e))&&(e={message:e});const n=e.position||"top-right";let a=e.offset||0;Sr[n].forEach(({vm:d})=>{var f;a+=(((f=d.el)==null?void 0:f.offsetHeight)||0)+sd}),a+=sd;const l=`notification_${rZ++}`,o=e.onClose,s={...e,offset:a,id:l,onClose:()=>{iZ(l,n,o)}};let i=document.body;wa(e.appendTo)?i=e.appendTo:Ve(e.appendTo)&&(i=document.querySelector(e.appendTo)),wa(i)||(Kt("ElNotification","the appendTo option is not an HTMLElement. Falling back to document.body."),i=document.body);const u=document.createElement("div"),c=q(sZ,s,We(s.message)?s.message:Jt(s.message)?()=>s.message:null);return c.appContext=xt(t)?Ms._context:t,c.props.onDestroy=()=>{Bo(null,u)},Bo(c,u),Sr[n].push({vm:c}),i.appendChild(u.firstElementChild),{close:()=>{c.component.exposed.close()}}};xE.forEach(e=>{Ms[e]=(t={},n)=>((Ve(t)||Jt(t))&&(t={message:t}),Ms({...t,type:e},n))});function iZ(e,t,n){const a=Sr[t],l=a.findIndex(({vm:c})=>{var d;return((d=c.component)==null?void 0:d.props.id)===e});if(l===-1)return;const{vm:o}=a[l];if(!o)return;n==null||n(o);const s=o.el.offsetHeight,i=t.split("-")[0];a.splice(l,1);const u=a.length;if(!(u<1))for(let c=l;c{t.component.exposed.close()})}function cZ(e="top-right"){var n,a,l,o;let t=((l=(a=(n=Sr[e][0])==null?void 0:n.vm.component)==null?void 0:a.props)==null?void 0:l.offset)||0;for(const{vm:s}of Sr[e])s.component.props.offset=t,t+=(((o=s.el)==null?void 0:o.offsetHeight)||0)+sd}Ms.closeAll=uZ;Ms.updateOffsets=cZ;Ms._context=null;const dZ=jS(Ms,"$notify"),fZ=$e({..._s(Gr,["ariaLabel","gpuAcceleration","rawContent"]),placement:Sv.placement,tabindex:Sv.tabindex,effect:{...Gr.effect,default:"light"},title:String,width:{type:[String,Number],default:150},offset:{...Gr.offset,default:void 0},persistent:{...Gr.persistent,default:!0}}),pZ={"update:visible":e=>Wt(e),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0};({..._s($L,["gpuAcceleration"])});var vZ=ue({name:"ElPopover",__name:"popover",props:fZ,emits:pZ,setup(e,{expose:t,emit:n}){const a=e,l=n,o=C(()=>{const b=Hn.props,y=me(b)?b:Object.keys(b);return Ll(a,y)}),s=he("popover"),i=V(),u=C(()=>{var b;return(b=r(i))==null?void 0:b.popperRef}),c=C(()=>[{width:fn(a.width)},a.popperStyle]),d=C(()=>[s.b(),a.popperClass,{[s.m("plain")]:!!a.content}]),f=C(()=>a.transition===`${s.namespace.value}-fade-in-linear`),p=()=>{var b;(b=i.value)==null||b.hide()},g=()=>{l("before-enter")},m=()=>{l("before-leave")},v=()=>{l("after-enter")},h=()=>{l("update:visible",!1),l("after-leave")};return t({popperRef:u,hide:p}),(b,y)=>(O(),oe(r(Hn),pt({ref_key:"tooltipRef",ref:i},o.value,{"aria-label":e.title,"popper-class":d.value,"popper-style":c.value,"gpu-acceleration":f.value,onBeforeShow:g,onBeforeHide:m,onShow:v,onHide:h}),{content:X(()=>[e.title?(O(),H("div",{key:0,class:P(r(s).e("title")),role:"title"},Se(e.title),3)):te("v-if",!0),ne(b.$slots,"default",{hide:p},()=>[st(Se(e.content),1)])]),default:X(()=>[b.$slots.reference?ne(b.$slots,"reference",{key:0}):te("v-if",!0)]),_:3},16,["aria-label","popper-class","popper-style","gpu-acceleration"]))}}),hZ=vZ;const N0=(e,t)=>{var a;const n=(a=t.arg||t.value)==null?void 0:a.popperRef;n&&(n.triggerRef=e)};var mZ={mounted(e,t){N0(e,t)},updated(e,t){N0(e,t)}};const gZ="popover",TE=_3(mZ,gZ),bZ=ut(hZ,{directive:TE}),yZ="2.14.8",wZ=(e=[])=>({version:yZ,install:(n,a)=>{n[yg]||(n[yg]=!0,e.forEach(l=>n.use(l)),a&&Wh(a,n,!0))}});var SZ=[V3,tA,g8,BY,k8,E8,M8,hC,F8,z8,Bn,xC,ZD,nB,gB,bB,I6,Ok,V6,ll,QB,tm,Y6,iF,uF,of,Bk,VF,Y8,WF,jF,qF,YF,UF,fH,Uk,SH,CH,VH,n2,XH,VK,DK,BK,d2,tL,nL,Be,$9,f2,Un,p2,W9,X9,nW,bW,yW,wW,SW,$W,rj,fj,bZ,cC,fm,$k,d6,c6,$j,Pj,W6,il,Ko,qc,MD,Qj,o7,s7,T7,P7,Wk,az,D7,B7,G7,lY,oY,DY,eU,tU,oo,xm,aD,cU,hU,mU,Hn,NU,Om,JU,pG,FG,XG,SX,CX,PX,IX,BX,ZX,fJ,pJ],CZ=[gJ,CJ,An,Cc,dZ,TE],Rm=wZ([...SZ,...CZ]);Rm.install;Rm.version;var kZ=Rm,EZ={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空",defaultLabel:"颜色选择器",description:"当前颜色 {color},按 Enter 键选择新颜色",alphaLabel:"选择透明度的值",alphaDescription:"透明度 {alpha}, 当前颜色 {color}",hueLabel:"选择色相值",hueDescription:"色相 {hue}, 当前颜色 {color}",svLabel:"选择饱和度与明度的值",svDescription:"饱和度 {saturation}, 明度 {brightness}, 当前颜色 {color}",predefineDescription:"选择 {value} 作为颜色"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",dateTablePrompt:"使用方向键与 Enter 键可选择日期",monthTablePrompt:"使用方向键与 Enter 键可选择月份",quarterTablePrompt:"使用方向键与 Enter 键可选择季度",yearTablePrompt:"使用方向键与 Enter 键可选择年份",selectedDate:"已选日期",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},weeksFull:{sun:"星期日",mon:"星期一",tue:"星期二",wed:"星期三",thu:"星期四",fri:"星期五",sat:"星期六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},input:{characters:"{count} / {max} 个字符"},inputNumber:{decrease:"减少数值",increase:"增加数值"},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},mention:{loading:"加载中"},dropdown:{toggleDropdown:"切换下拉选项"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},dialog:{close:"关闭此对话框"},drawer:{close:"关闭此对话框"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!",close:"关闭此对话框"},upload:{deleteTip:"按 Delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},slider:{defaultLabel:"滑块介于 {min} 至 {max}",defaultRangeStartLabel:"选择起始值",defaultRangeEndLabel:"选择结束值"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计",selectAllLabel:"选择所有行",selectRowLabel:"选择当前行",expandRowLabel:"展开当前行",collapseRowLabel:"收起当前行",sortLabel:"按 {column} 排序",filterLabel:"按 {column} 过滤"},tag:{close:"关闭此标签"},tour:{next:"下一步",previous:"上一步",finish:"结束导览",close:"关闭此对话框"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"},carousel:{leftArrow:"上一张幻灯片",rightArrow:"下一张幻灯片",indicator:"幻灯片切换至索引 {index}"},inputOTP:{groupLabel:"一次性密码输入框",defaultLabel:"请输入第 {index} 位 OTP 字符"}}};const Yo="xq0012";async function go(e,t){const n=await fetch(e,t);if(n.status===401)throw Object.assign(new Error("未登录:请先在壳子登录统一账户再打开本界面"),{code:401});if(!n.ok){let a=`HTTP ${n.status}`;try{a=(await n.json()).detail||a}catch{}throw Object.assign(new Error(a),{code:n.status,status:n.status})}return n.json()}const M0=()=>go(`/api/plugin-config/${Yo}`),xZ=e=>go(`/api/plugin-config/${Yo}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),TZ=()=>go(`/api/plugins/${Yo}/last-fields`),$Z=()=>go(`/api/plugin-configs?plugin_id=${encodeURIComponent(Yo)}`),OZ=(e,t)=>go("/api/plugin-configs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({plugin_id:Yo,name:e,fields:t})}),NZ=e=>go(`/api/plugin-configs/${encodeURIComponent(Yo)}/${encodeURIComponent(e)}`,{method:"DELETE"}),MZ=e=>go("/api/runs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({plugin_id:Yo,fields:e})}),PZ=e=>go(`/api/runs/${e}`),IZ=e=>go(`/api/runs/${e}/stop`,{method:"POST"});function RZ(e){const t=new WebSocket((location.protocol==="https:"?"wss://":"ws://")+location.host+"/ws");return t.onmessage=n=>{try{e(JSON.parse(n.data))}catch{}},t}const fp=e=>JSON.parse(JSON.stringify(e)),$E=`plugin:${Yo}:lastSavedAt`;function _Z(){try{return localStorage.getItem($E)||""}catch{return""}}function AZ(e){try{localStorage.setItem($E,e)}catch{}}function pp(e,t){Object.keys(e).forEach(n=>{const a=t?t[n]:void 0;a==null||a===""||(e[n]=Array.isArray(a)?[...a]:a)})}function LZ(e={}){const{defaults:t,validate:n,buildPayload:a}=e,l=Ft(t?t():{}),o=V(!1),s=V(!1),i=V(null),u=V(_Z()),c=V(!1),d=V(0),f=V(!1);let p=null,g="",m=null,v=null;const h=(z,L)=>{i.value=z?{type:z,text:L}:null};mt(async()=>{try{const z=await M0();pp(l,z)}catch(z){z.code===401&&(s.value=!0)}o.value=!0,$()}),fe(l,()=>{!o.value||c.value||(clearTimeout(v),v=setTimeout(()=>b(!1),800))},{deep:!0});async function b(z){try{await xZ(fp(l)),u.value=new Date().toLocaleTimeString("zh-CN",{hour12:!1}),AZ(u.value),z&&An.success("配置已保存到本机")}catch(L){L.code===401?s.value=!0:An.error("配置保存失败:"+L.message)}}function y(){Object.assign(l,t?t(l):{}),h(null),An.info("已恢复默认配置")}async function k(){try{const z=await TZ(),L=z.fields||{};if(!Object.keys(L).length){An.info("暂无上次执行参数");return}pp(l,L),An.success("已恢复上次执行参数"+(z.at?`(${z.at})`:""))}catch(z){z.code===401?s.value=!0:An.error("恢复上次参数失败:"+z.message)}}const S=V([]),E=V(""),x=C(()=>[{value:"",label:"当前配置(自动保存)"},...S.value.map(z=>({value:z.id,label:z.name}))]);async function $(){try{const z=await $Z();S.value=z.configs||[]}catch{}}function w(z){if(!z)return;const L=S.value.find(W=>W.id===z);L&&(pp(l,L.fields),An.success(`已应用方案「${L.name}」`))}async function T(){const z=S.value.find(Y=>Y.id===E.value);let L="";try{({value:L}=await Cc.prompt("方案保存到本机(同名覆盖,密码明文保存,每套方案可绑定不同账号),供「定时任务」引用:到点自动取该方案的最新参数执行。","存为配置方案",{inputValue:z?z.name:"",confirmButtonText:"保存方案",cancelButtonText:"取消",inputPattern:/\S/,inputErrorMessage:"请输入方案名称"}))}catch{return}if(L=String(L).trim(),!L)return;const W=S.value.find(Y=>Y.name===L);if(W)try{await Cc.confirm(`已存在同名方案「${W.name}」,保存将覆盖它的参数(多套不同配置请用不同名称)。`,"覆盖已有方案",{type:"warning",confirmButtonText:"覆盖保存",cancelButtonText:"取消"})}catch{return}try{const Y=await OZ(L,fp(l));await $(),E.value=Y.config?Y.config.id:"",An.success(`方案「${L}」已保存`)}catch(Y){Y.code===401?s.value=!0:An.error("方案保存失败:"+Y.message)}}async function M(){const z=S.value.find(L=>L.id===E.value);if(z){try{await Cc.confirm(`删除配置方案「${z.name}」?引用它的定时任务到点会跳过触发并提示重选。`,"删除方案",{type:"warning",confirmButtonText:"删除",cancelButtonText:"取消"})}catch{return}try{await NZ(z.id),E.value="",await $(),An.success("方案已删除")}catch(L){An.error("方案删除失败:"+L.message)}}}async function I(z){if(!c.value){if(s.value)try{await M0(),s.value=!1}catch{h("error","登录态未就绪,请稍后重试");return}if(!(n&&!n(z))){await b(!1),h(null),c.value=!0,d.value=0;try{const L=a?a(l):fp(l);z&&(L.action=z),g=(await MZ(L)).run_id,A(),j()}catch(L){c.value=!1,F(),L.code===401?(s.value=!0,h("error","登录态未就绪,本次没有启动,请稍后重试")):L.code===409?h("warn","已取消加入执行队列,本次没有启动"):h("error","启动执行失败:"+L.message)}}}}async function N(){if(!(!g||f.value)){f.value=!0;try{await IZ(g),An.warning("已发出强制停止指令,正在终止执行进程…")}catch(z){An.error("停止失败:"+z.message)}finally{f.value=!1}}}function A(){p&&p.readyState<=1||(p=RZ(z=>{z.run_id&&z.run_id!==g||(z.t==="progress"?d.value=Math.max(d.value,z.pct||0):z.t==="run_done"&&(z.ok?B():z.status==="cancelled"?D(z.error):R(z.error||"执行失败")))}),p.onclose=()=>{p=null})}function j(){F(),m=setInterval(async()=>{var z;if(g)try{const L=await PZ(g);L.status==="done"?B((z=L.result)==null?void 0:z.summary):L.status==="cancelled"?D(L.error):L.status==="error"&&R(L.error||"执行失败")}catch{}},5e3)}function F(){m&&(clearInterval(m),m=null)}function B(z){F(),c.value=!1,d.value=100,z&&h("ok",z)}function D(z){F(),c.value=!1,h("warn","任务已取消:"+(z||"用户已停止"))}function R(z){F(),c.value=!1,h("error","执行失败:"+z)}return{form:l,loaded:o,needLogin:s,notice:i,lastSavedAt:u,running:c,progress:d,stopping:f,saveNow:b,resetDefaults:y,restoreLastFields:k,schemes:S,schemeSel:E,schemeOptions:x,onSchemeChange:w,saveSchemeAs:T,removeScheme:M,run:I,forceStop:N}}const VZ={class:"page"},DZ={class:"toolbar"},BZ={key:0,class:"notice is-warn"},FZ={class:"n-ico"},zZ={class:"sec"},HZ={class:"sec-body"},KZ={class:"grid"},WZ={class:"dir-ctrl"},jZ={class:"dir-ctrl"},qZ={class:"dir-ctrl"},YZ={class:"sec"},UZ={class:"sec-body"},GZ={class:"grid"},XZ={class:"sec"},JZ={class:"sec-body"},ZZ={class:"grid"},QZ={class:"sec"},eQ={class:"sec-body"},tQ={class:"grid grid-switch"},nQ={class:"grid"},aQ={class:"grid"},lQ={class:"actions"},oQ={key:2,class:"runline"},sQ={class:"pct"},rQ={__name:"App",setup(e){const t=()=>({ref_month:"",ledger_dir:"D:\\资料\\人资\\预支",ledger_workbook:"D:\\资料\\人资\\预支\\1030工资预支付款申请--已付.xlsx",ledger_file:"",default_applicant_staff:"37001090",default_applicant_name:"刘纤",erp_system:"自动",erp_username:"",erp_password:"",erp_username_old:"",erp_password_old:"",dry_run:!0,submit:!1,print_enabled:!1,printer:"人力资源部",copies:1,dingtalk_enabled:!0,dingtalk_users:"陈莲/37004121",debug_mode:!1}),{form:n,needLogin:a,notice:l,lastSavedAt:o,running:s,progress:i,stopping:u,saveNow:c,resetDefaults:d,restoreLastFields:f,schemeSel:p,schemeOptions:g,onSchemeChange:m,saveSchemeAs:v,removeScheme:h,run:b,forceStop:y}=LZ({defaults:t,validate(){return n.dry_run?!0:!n.erp_username||!n.erp_password?(An.error("关闭试算模式必须填新版 ERP 账号密码"),!1):n.erp_system==="旧版"&&!(n.erp_username_old||n.erp_username)?(An.error("旧版 ERP 账号不能为空(或填写新版账号以便沿用)"),!1):((!n.erp_username_old||!n.erp_password_old)&&An.info("旧版账密留空:旧系统将沿用新版账号密码"),n.submit&&An.warning("自动提交会把单据送进审批流,请确认台账与口径无误"),!0)}}),k=V(!1),S=V("");async function E($){S.value=$;try{const w=await fetch("/api/dialog/file",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:$==="ledger_workbook"?"选择目标工作簿":"选择台账文件",current:n[$]||"",filters:["xlsx","xlsm"]})}),T=await w.json().catch(()=>({}));if(!w.ok)throw new Error(T.detail||T.error||"HTTP "+w.status);!T.canceled&&T.path&&(n[$]=T.path)}catch(w){An.warning("打开文件选择失败:"+w.message)}finally{S.value=""}}async function x(){k.value=!0;try{const $=await fetch("/api/dialog/directory",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:"选择预支台账目录",current:n.ledger_dir||""})}),w=await $.json().catch(()=>({}));if(!$.ok)throw new Error(w.detail||w.error||"HTTP "+$.status);w.path&&(n.ledger_dir=w.path)}catch($){An.warning("打开文件夹选择失败:"+$.message)}finally{k.value=!1}}return($,w)=>{const T=Pt("el-option"),M=Pt("el-select"),I=Pt("el-button"),N=Pt("el-date-picker"),A=Pt("el-form-item"),j=Pt("el-input"),F=Pt("el-form"),B=Pt("el-switch"),D=Pt("el-input-number");return O(),H("div",VZ,[K("div",DZ,[w[26]||(w[26]=K("span",{class:"spacer"},null,-1)),K("span",{class:P(["saved",{"is-idle":!r(o)}])},[w[23]||(w[23]=K("i",null,null,-1)),st(Se(r(o)?"已保存 "+r(o):"尚未保存"),1)],2),q(M,{modelValue:r(p),"onUpdate:modelValue":w[0]||(w[0]=R=>Qt(p)?p.value=R:null),class:"scheme-sel",size:"small",disabled:r(s),placeholder:"当前配置(自动保存)",onChange:r(m)},{default:X(()=>[(O(!0),H(ze,null,bt(r(g),R=>(O(),oe(T,{key:R.value,label:R.label,value:R.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","disabled","onChange"]),q(I,{size:"small",disabled:r(s),onClick:r(v)},{default:X(()=>[...w[24]||(w[24]=[st("存为方案",-1)])]),_:1},8,["disabled","onClick"]),q(I,{size:"small",text:"",type:"danger",disabled:r(s)||!r(p),onClick:r(h)},{default:X(()=>[...w[25]||(w[25]=[st("删除",-1)])]),_:1},8,["disabled","onClick"])]),r(a)?(O(),H("div",BZ,[...w[27]||(w[27]=[K("span",{class:"n-ico"},"!",-1),K("span",null,"未登录:请先在壳子(工作台)登录统一账户,再刷新本界面",-1)])])):r(l)?(O(),H("div",{key:1,class:P(["notice","is-"+r(l).type])},[K("span",FZ,Se(r(l).type==="ok"?"✓":r(l).type==="error"?"✕":"·"),1),K("span",null,Se(r(l).text),1)],2)):te("",!0),K("section",zZ,[w[32]||(w[32]=K("div",{class:"sec-head"},[K("span",{class:"sec-badge"},"01"),K("span",{class:"sec-name"},"台账来源"),K("span",{class:"sec-line"})],-1)),K("div",HZ,[q(F,{"label-position":"top"},{default:X(()=>[K("div",KZ,[q(A,{label:"台账月份"},{default:X(()=>[q(N,{modelValue:r(n).ref_month,"onUpdate:modelValue":w[1]||(w[1]=R=>r(n).ref_month=R),type:"month","value-format":"YYYY-MM",format:"YYYY-MM",clearable:"",disabled:r(s),placeholder:"留空=当月"},null,8,["modelValue","disabled"])]),_:1}),q(A,{label:"台账目录"},{default:X(()=>[K("div",WZ,[q(j,{modelValue:r(n).ledger_dir,"onUpdate:modelValue":w[2]||(w[2]=R=>r(n).ledger_dir=R),class:"dir-input",disabled:r(s),clearable:"",placeholder:"留空 = D:\\资料\\人资\\预支"},null,8,["modelValue","disabled"]),q(I,{class:"dir-btn",disabled:r(s)||k.value,loading:k.value,onClick:x},{default:X(()=>[...w[28]||(w[28]=[st("选择",-1)])]),_:1},8,["disabled","loading"])])]),_:1}),q(A,{label:"目标工作簿"},{default:X(()=>[K("div",jZ,[q(j,{modelValue:r(n).ledger_workbook,"onUpdate:modelValue":w[3]||(w[3]=R=>r(n).ledger_workbook=R),class:"dir-input",disabled:r(s),clearable:"",placeholder:"留空 = 只导出独立文件"},null,8,["modelValue","disabled"]),q(I,{class:"dir-btn",disabled:r(s)||!!S.value,loading:S.value==="ledger_workbook",onClick:w[4]||(w[4]=R=>E("ledger_workbook"))},{default:X(()=>[...w[29]||(w[29]=[st("选择",-1)])]),_:1},8,["disabled","loading"])])]),_:1}),q(A,{label:"台账文件(可选)"},{default:X(()=>[K("div",qZ,[q(j,{modelValue:r(n).ledger_file,"onUpdate:modelValue":w[5]||(w[5]=R=>r(n).ledger_file=R),class:"dir-input",disabled:r(s),clearable:"",placeholder:"指定后跳过导出/追加"},null,8,["modelValue","disabled"]),q(I,{class:"dir-btn",disabled:r(s)||!!S.value,loading:S.value==="ledger_file",onClick:w[6]||(w[6]=R=>E("ledger_file"))},{default:X(()=>[...w[30]||(w[30]=[st("选择",-1)])]),_:1},8,["disabled","loading"])])]),_:1})])]),_:1}),w[31]||(w[31]=K("div",{class:"tip"},[st(" 按「预支报酬年月」调 EHR 接口导出(留空=当月),按表头名追加到目标工作簿的 "),K("b",null,"预支报酬台账"),st(":自动跳过同键行,保留序号与 AT~AW 公式列。 有效行:工号非空、金额 > 0、整行无 "),K("b",null,"#N/A"),st("。 ")],-1))])]),K("section",YZ,[w[34]||(w[34]=K("div",{class:"sec-head"},[K("span",{class:"sec-badge"},"02"),K("span",{class:"sec-name"},"ERP 登录(新旧两套)"),K("span",{class:"sec-line"})],-1)),K("div",UZ,[q(F,{"label-position":"top"},{default:X(()=>[K("div",GZ,[q(A,{label:"系统分流"},{default:X(()=>[q(M,{modelValue:r(n).erp_system,"onUpdate:modelValue":w[7]||(w[7]=R=>r(n).erp_system=R),disabled:r(s)},{default:X(()=>[q(T,{label:"自动(按台账新旧系统列)",value:"自动"}),q(T,{label:"强制新版",value:"新版"}),q(T,{label:"强制旧版",value:"旧版"})]),_:1},8,["modelValue","disabled"])]),_:1}),q(A,{label:"新版 ERP 账号"},{default:X(()=>[q(j,{modelValue:r(n).erp_username,"onUpdate:modelValue":w[8]||(w[8]=R=>r(n).erp_username=R),disabled:r(s),clearable:"",placeholder:"新版账号"},null,8,["modelValue","disabled"])]),_:1}),q(A,{label:"新版 ERP 密码"},{default:X(()=>[q(j,{modelValue:r(n).erp_password,"onUpdate:modelValue":w[9]||(w[9]=R=>r(n).erp_password=R),type:"password","show-password":"",disabled:r(s),placeholder:"仅保存在本机"},null,8,["modelValue","disabled"])]),_:1}),q(A,{label:"旧版 ERP 账号"},{default:X(()=>[q(j,{modelValue:r(n).erp_username_old,"onUpdate:modelValue":w[10]||(w[10]=R=>r(n).erp_username_old=R),disabled:r(s),clearable:"",placeholder:"留空=沿用新版账号"},null,8,["modelValue","disabled"])]),_:1}),q(A,{label:"旧版 ERP 密码"},{default:X(()=>[q(j,{modelValue:r(n).erp_password_old,"onUpdate:modelValue":w[11]||(w[11]=R=>r(n).erp_password_old=R),type:"password","show-password":"",disabled:r(s),placeholder:"留空=沿用新版密码"},null,8,["modelValue","disabled"])]),_:1})])]),_:1}),w[33]||(w[33]=K("div",{class:"tip"},[K("b",null,"新旧系统是两套金蝶站点"),st(":台账「新旧系统」列为旧系统的行,用旧版账号密码登录; 其余走新版。旧版留空则沿用新版账密。分流口径:职位序列为「门店服务序列」且会馆不在 标准化门店名单 → 旧版(部门 BM000881),其余新版(BM000477)。 ")],-1))])]),K("section",XZ,[w[36]||(w[36]=K("div",{class:"sec-head"},[K("span",{class:"sec-badge"},"03"),K("span",{class:"sec-name"},"单据口径 · 发起人"),K("span",{class:"sec-line"})],-1)),K("div",JZ,[q(F,{"label-position":"top"},{default:X(()=>[K("div",ZZ,[q(A,{label:"默认发起人工号(E 列 / 报文申请人)"},{default:X(()=>[q(j,{modelValue:r(n).default_applicant_staff,"onUpdate:modelValue":w[12]||(w[12]=R=>r(n).default_applicant_staff=R),disabled:r(s),clearable:"",placeholder:"37001090"},null,8,["modelValue","disabled"])]),_:1}),q(A,{label:"默认发起人姓名(F 列)"},{default:X(()=>[q(j,{modelValue:r(n).default_applicant_name,"onUpdate:modelValue":w[13]||(w[13]=R=>r(n).default_applicant_name=R),disabled:r(s),clearable:"",placeholder:"刘纤"},null,8,["modelValue","disabled"])]),_:1})])]),_:1}),w[35]||(w[35]=K("div",{class:"tip"}," 发起人两列按这里回填「付款申请单#单据头(FBillHead)」E/F 列,也是建单报文的申请人(代提人)。 其余口径逐行读模板:申请日期=D 列(当天)、付款用途=AH 列、期望付款日=AK 列($D+1)、 申请部门=W 列(BM000477 / BM000881)。 ",-1))])]),K("section",QZ,[w[38]||(w[38]=K("div",{class:"sec-head"},[K("span",{class:"sec-badge"},"04"),K("span",{class:"sec-name"},"执行方式"),K("span",{class:"sec-line"})],-1)),K("div",eQ,[q(F,{"label-position":"top"},{default:X(()=>[K("div",tQ,[q(A,{label:"试算模式(不写 ERP)"},{default:X(()=>[q(B,{modelValue:r(n).dry_run,"onUpdate:modelValue":w[14]||(w[14]=R=>r(n).dry_run=R),disabled:r(s)},null,8,["modelValue","disabled"])]),_:1}),q(A,{label:"建单后自动提交"},{default:X(()=>[q(B,{modelValue:r(n).submit,"onUpdate:modelValue":w[15]||(w[15]=R=>r(n).submit=R),disabled:r(s)},null,8,["modelValue","disabled"])]),_:1}),q(A,{label:"建单后打印"},{default:X(()=>[q(B,{modelValue:r(n).print_enabled,"onUpdate:modelValue":w[16]||(w[16]=R=>r(n).print_enabled=R),disabled:r(s)},null,8,["modelValue","disabled"])]),_:1}),q(A,{label:"打印后钉钉提醒"},{default:X(()=>[q(B,{modelValue:r(n).dingtalk_enabled,"onUpdate:modelValue":w[17]||(w[17]=R=>r(n).dingtalk_enabled=R),disabled:r(s)},null,8,["modelValue","disabled"])]),_:1}),q(A,{label:"调试日志"},{default:X(()=>[q(B,{modelValue:r(n).debug_mode,"onUpdate:modelValue":w[18]||(w[18]=R=>r(n).debug_mode=R),disabled:r(s)},null,8,["modelValue","disabled"])]),_:1})]),K("div",nQ,[q(A,{label:"打印机"},{default:X(()=>[q(M,{modelValue:r(n).printer,"onUpdate:modelValue":w[19]||(w[19]=R=>r(n).printer=R),disabled:r(s)},{default:X(()=>[q(T,{label:"人力资源部(双面)",value:"人力资源部"}),q(T,{label:"信息技术部(单面)",value:"信息技术部"})]),_:1},8,["modelValue","disabled"])]),_:1}),q(A,{label:"打印份数"},{default:X(()=>[q(D,{modelValue:r(n).copies,"onUpdate:modelValue":w[20]||(w[20]=R=>r(n).copies=R),min:1,max:5,disabled:r(s)},null,8,["modelValue","disabled"])]),_:1})]),K("div",aQ,[q(A,{label:"钉钉接收人(姓名/工号)"},{default:X(()=>[q(j,{modelValue:r(n).dingtalk_users,"onUpdate:modelValue":w[21]||(w[21]=R=>r(n).dingtalk_users=R),disabled:r(s)||!r(n).dingtalk_enabled,clearable:"",placeholder:"陈莲/37004121;多个用「、」分隔,重名必须带工号"},null,8,["modelValue","disabled"])]),_:1})])]),_:1}),w[37]||(w[37]=K("div",{class:"tip"},[K("b",null,"试算"),st("不建单/不提交/不打印、不回填付款状态与单据头(台账追加与流程刷新仍写工作簿)。 "),K("b",null,"发起前对账"),st("与"),K("b",null,"「预支办结流程」刷新固定开启"),st(":对账先查 ERP 已有单据 (受款人工号+金额一致才命中),查询失败会中止本批;流程刷新失败只告警、不阻断建单。 "),K("b",null,"提交"),st("关闭时只建草稿(A),由 HR 在 ERP 核对后手动提交。 ")],-1))])]),w[46]||(w[46]=cT('
口径速查▾
单据:CN_PAYAPPLY 付款申请单,单据类型 FKSQ006.0YS 个人工资付款申请。
申请人:E/F 列 = 默认发起人(代提人);往来/收款单位(H/K)才是受款员工。
收款账户:AM/AN/AO 取「预支办结流程」V/AC/AD(与模板 XLOOKUP 同源)。
明细备注:AP 按模板口径填金额。
打印:ERP 单据套打 + 「单子传递打印」本批行汇总,printkit 直连打印机。
',1)),K("div",lQ,[q(I,{type:"primary",class:"btn-run",loading:r(s),onClick:r(b)},{default:X(()=>[st(Se(r(s)?"执行中 "+r(i)+"%":r(n).dry_run?"开始试算":"一键执行"),1)]),_:1},8,["loading","onClick"]),r(s)?(O(),oe(I,{key:0,type:"danger",plain:"",loading:r(u),onClick:r(y)},{default:X(()=>[...w[39]||(w[39]=[st(" 强制停止 ",-1)])]),_:1},8,["loading","onClick"])):te("",!0),w[43]||(w[43]=K("span",{class:"spacer"},null,-1)),q(I,{disabled:r(s),onClick:r(f)},{default:X(()=>[...w[40]||(w[40]=[st("恢复上次参数",-1)])]),_:1},8,["disabled","onClick"]),q(I,{disabled:r(s),onClick:w[22]||(w[22]=R=>r(c)(!0))},{default:X(()=>[...w[41]||(w[41]=[st("保存配置",-1)])]),_:1},8,["disabled"]),q(I,{text:"",disabled:r(s),onClick:r(d)},{default:X(()=>[...w[42]||(w[42]=[st("恢复默认",-1)])]),_:1},8,["disabled","onClick"])]),r(s)?(O(),H("div",oQ,[w[44]||(w[44]=K("span",{class:"pulse"},null,-1)),w[45]||(w[45]=K("span",null,"正在执行,日志与进度实时显示在工作台下方「运行日志」区",-1)),K("span",sQ,Se(r(i))+"%",1)])):te("",!0)])}}};iw(rQ).use(kZ,{locale:EZ}).mount("#app")});export default iQ(); diff --git a/plugins/XQ0001-0100/XQ0012 EHR预支及支付报酬自动发起ERP付款申请/ui/index.html b/plugins/XQ0001-0100/XQ0012 EHR预支及支付报酬自动发起ERP付款申请/ui/index.html index 8e45f1c..7f69336 100644 --- a/plugins/XQ0001-0100/XQ0012 EHR预支及支付报酬自动发起ERP付款申请/ui/index.html +++ b/plugins/XQ0001-0100/XQ0012 EHR预支及支付报酬自动发起ERP付款申请/ui/index.html @@ -4,7 +4,7 @@ 付款申请单自动发起 - +