` or `boolean`"),Lo(E)?E.then(N=>{N&&y()}).catch(N=>{Kt(Wu,`some error occurred: ${N}`)}):E&&y()},S=()=>{var k,E;(E=(k=f.value)==null?void 0:k.focus)==null||E.call(k)};return mt(()=>{f.value.checked=b.value}),t({focus:S,checked:b}),(k,E)=>(O(),H("div",{class:I(v.value),onClick:Je(C,["prevent"])},[K("input",{id:i(u),ref_key:"input",ref:f,class:I(i(r).e("input")),type:"checkbox",role:"switch","aria-checked":b.value,"aria-disabled":i(c),"aria-label":e.ariaLabel,name:e.name,"true-value":e.activeValue,"false-value":e.inactiveValue,disabled:i(c),tabindex:e.tabindex,onChange:y,onKeydown:an(C,["enter"])},null,42,H7),!e.inlinePrompt&&(e.inactiveIcon||e.inactiveText||k.$slots.inactive)?(O(),H("span",{key:0,class:I(g.value)},[ne(k.$slots,"inactive",{},()=>[e.inactiveIcon?(O(),oe(i(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:I(i(r).e("core")),style:je(p.value)},[e.inlinePrompt?(O(),H("div",{key:0,class:I(i(r).e("inner"))},[b.value?(O(),H("div",{key:1,class:I(i(r).e("inner-wrapper"))},[ne(k.$slots,"active",{},()=>[e.activeIcon?(O(),oe(i(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:I(i(r).e("inner-wrapper"))},[ne(k.$slots,"inactive",{},()=>[e.inactiveIcon?(O(),oe(i(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:I(i(r).e("action"))},[e.loading?(O(),oe(i(Be),{key:0,class:I(i(r).is("loading"))},{default:X(()=>[j(i(rl))]),_:1},8,["class"])):b.value?ne(k.$slots,"active-action",{key:1},()=>[e.activeActionIcon?(O(),oe(i(Be),{key:0},{default:X(()=>[(O(),oe(dt(e.activeActionIcon)))]),_:1})):te("v-if",!0)]):b.value?te("v-if",!0):ne(k.$slots,"inactive-action",{key:2},()=>[e.inactiveActionIcon?(O(),oe(i(Be),{key:0},{default:X(()=>[(O(),oe(dt(e.inactiveActionIcon)))]),_:1})):te("v-if",!0)])],2)],6),!e.inlinePrompt&&(e.activeIcon||e.activeText||k.$slots.active)?(O(),H("span",{key:1,class:I(m.value)},[ne(k.$slots,"active",{},()=>[e.activeIcon?(O(),oe(i(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;De(n)?n=n==="descending"?-1:1:n=n&&n<0?-1:1;const o=a?null:function(r,u){return l?jw(Dn(l),c=>De(c)?Sn(r,c):c(r,u,e)):(t!=="$key"&&rt(r)&&"$value"in r&&(r=r.$value),[rt(r)?t?Sn(r,t):null:r])},s=function(r,u){var c,d,f,v,g;if(a)return a(r.value,u.value);for(let m=0,p=((c=r.key)==null?void 0:c.length)??0;m((g=u.key)==null?void 0:g[m]))return 1}return 0};return e.map((r,u)=>({value:r,index:u,key:o?o(r,u):null})).sort((r,u)=>{let c=s(r,u);return c||(c=r.index-u.index),c*+n}).map(r=>r.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(De(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,r)=>{if(o[En(s,t)]={row:s,index:r},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(Dt(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:De(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 r=o??0,u=!1;const d=(()=>{if(!s)return e.indexOf(t);const p=En(t,s);return e.findIndex(h=>En(h,s)===p)})(),f=d!==-1,v=l==null?void 0:l.call(null,t,r),g=p=>{p==="add"?e.push(t):e.splice(d,1),u=!0},m=p=>{let h=0;const b=(a==null?void 0:a.children)&&p[a.children];return b&&me(b)&&(h+=b.length,b.forEach(y=>{h+=m(y)})),h};return(!l||v)&&(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(p=>{const h=Gs(e,p,n??!f,a,l,r+1,s);r+=m(p)+1,h&&(u=h)}),u}function sq(e,t,n="children",a="hasChildren",l=!1){const o=r=>!(me(r)&&r.length);function s(r,u,c){t(r,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(r=>{if(r[a]&&l){t(r,null,0);return}const u=r[n];o(u)||s(r,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),r={...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,r),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=j(Hn,{virtualTriggering:!0,virtualRef:l,appendTo:u,placement:"top",transition:"none",offset:0,hideAfter:0,...r},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 v=u==null?void 0:u.querySelector(`.${c}-scrollbar__wrap`);pn=()=>{var p,h;(h=(p=d.component)==null?void 0:p.exposed)!=null&&h.onClose&&d.component.exposed.onClose(),Bo(null,f);const m=pn;v==null||v.removeEventListener("scroll",m),m.trigger=void 0,m.vm=void 0,pn=null},pn.trigger=l??void 0,pn.vm=d,v==null||v.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 r;switch(t){case"left":o=s.length-n.states.rightFixedLeafColumnsLength.value&&(r="right");break;default:o=s.length-n.states.rightFixedLeafColumnsLength.value&&(r="right")}return r?{direction:r,start:l,after:o}:{}},hm=(e,t,n,a,l,o=0)=>{const s=[],{direction:r,start:u,after:c}=T2(t,n,a,l);if(r){const d=r==="left";s.push(`${e}-fixed-column--${r}`),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 r={},u=l==="left",c=n.states.columns.value;return u?r.left=c.slice(0,o).reduce(o0,0):r.right=c.slice(s+1).reverse().reduce(o0,0),r},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===Fe&&!$2(t.children)):!0)?e:null}function uq(e){const t=ht(),n=D(!1),a=D([]),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((v,g)=>{const m=En(v,d);return!!f[m]&&l(v,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,v=tr(d,f);a.value=c.reduce((g,m)=>{const p=v[m];return p&&l(p.row,p.index)&&g.push(p.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=D(null),a=D(null),l=c=>{t.store.assertRowKey(),n.value=c,s(c)},o=()=>{n.value=null},s=c=>{const{data:d,rowKey:f}=e,v=a.value;let g=null;f.value&&(g=(i(d)||[]).find(m=>En(m,f.value)===c)??null),a.value=g??null,t.emit("current-change",a.value,v)};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 v=En(f,c);s(v)}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=D([]),n=D({}),a=D(16),l=D(!1),o=D({}),s=D("hasChildren"),r=D("children"),u=D(!1),c=ht(),d=w(()=>{if(!e.rowKey.value)return{};const S=e.data.value||[];return v(S)}),f=w(()=>{const S=e.rowKey.value,k=Object.keys(o.value),E={};return k.length&&k.forEach(N=>{if(o.value[N].length){const x={children:[]};o.value[N].forEach($=>{const T=En($,S);x.children.push(T),$[s.value]&&!E[T]&&(E[T]={children:[]})}),E[N]=x}}),E}),v=S=>{const k=e.rowKey.value,E={};return sq(S,(N,x,$)=>{const T=En(N,k);me(x)?E[T]={children:x.map(P=>En(P,k)),level:$}:l.value&&(E[T]={children:[],lazy:!0,level:$})},r.value,s.value,l.value),E},g=(S=!1,k)=>{var T,P;k||(k=(T=c.store)==null?void 0:T.states.defaultExpandAll.value);const E=d.value,N=f.value,x=Object.keys(E),$={};if(x.length){const M=i(n),L=[],Y=(F,V)=>{if(S)return t.value?k||t.value.includes(V):!!(k||F!=null&&F.expanded);{const A=k||t.value&&t.value.includes(V);return!!(F!=null&&F.expanded||A)}};x.forEach(F=>{const V=M[F],A={...E[F]};if(A.expanded=Y(V,F),A.lazy){const{loaded:z=!1,loading:R=!1}=V||{};A.loaded=!!z,A.loading=!!R,L.push(F)}$[F]=A});const B=Object.keys(N);l.value&&B.length&&L.length&&B.forEach(F=>{var z;const V=M[F],A=N[F].children;if(L.includes(F)){if(((z=$[F].children)==null?void 0:z.length)!==0)throw new Error("[ElTable]children must be an empty array.");$[F].children=A}else{const{loaded:R=!1,loading:W=!1}=V||{};$[F]={lazy:!0,loaded:!!R,loading:!!W,expanded:Y(V,F),children:A,level:void 0}}})}n.value=$,(P=c.store)==null||P.updateTableScrollY()};fe(()=>t.value,()=>{g(!0)},{deep:!0}),fe(()=>d.value,()=>{g()}),fe(()=>f.value,()=>{g()});const m=S=>{t.value=S,g()},p=S=>l.value&&S&&"loaded"in S&&!S.loaded,h=(S,k)=>{c.store.assertRowKey();const E=e.rowKey.value,N=En(S,E),x=N&&n.value[N];if(N&&x&&"expanded"in x){const $=x.expanded;k=xt(k)?!x.expanded:k,n.value[N].expanded=k,$!==k&&c.emit("expand-change",S,k),k&&p(x)&&y(S,N,x),c.store.updateTableScrollY()}},b=S=>{c.store.assertRowKey();const k=e.rowKey.value,E=En(S,k),N=n.value[E];p(N)?y(S,E,N):h(S,void 0)},y=(S,k,E)=>{const{load:N}=c.props;N&&!n.value[k].loaded&&(n.value[k].loading=!0,N(S,E,x=>{if(!me(x))throw new TypeError("[ElTable] data must be an array");n.value[k].loading=!1,n.value[k].loaded=!0,n.value[k].expanded=!0,x.length&&(o.value={...o.value,[k]:x}),c.emit("expand-change",S,!0)}))};return{loadData:y,loadOrToggle:b,toggleTreeExpansion:h,updateTreeExpandKeys:m,updateTreeData:g,updateKeyChildren:(S,k)=>{const{lazy:E,rowKey:N}=c.props;if(E){if(!N)throw new Error("[Table] rowKey is required in updateKeyChild");o.value[S]&&(o.value={...o.value,[S]:k})}},normalize:v,states:{expandRowKeys:t,treeData:n,indent:a,lazy:l,lazyTreeNodeMap:o,lazyColumnIdentifier:s,childrenColumnName:r,checkStrictly:u}}}const fq=(e,t)=>{const n=t.sortingColumn;return!n||De(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=D(null),a=D([]),l=D([]),o=D(!1),s=D([]),r=D([]),u=D([]),c=D([]),d=D([]),f=D([]),v=D([]),g=D([]),m=[],p=D(0),h=D(0),b=D(0),y=D(!1),C=D([]),S=D({}),k=D(!1),E=D(!1),N=D(null),x=D(null),$=D({}),T=D(null),P=D(null),M=D(null),L=D(null),Y=D(null);let B=[];const F=w(()=>n.value?tr(C.value,n.value):void 0),V=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 A=()=>{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)})},R=()=>{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);r.value=Array.from(c.value).concat(Ue).concat(d.value);const at=vc(Ue),gt=vc(c.value),wt=vc(d.value);p.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&&R(),Ie?e.state.doLayout():e.state.debouncedUpdateLayout()},q=ce=>F.value?!!F.value[En(ce,n.value)]:C.value.includes(ce),J=w(()=>{const ce=new Map;if(!n.value||!N.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=V(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={},B=[];return}const Ue=n.value,at=ce.rowIndexMap??J.value,gt=N.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},Vt={},Re=[],Ye=new Set(C.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)},Ve=_e=>{let Nt=0,qt=0;return me(_e)?(_e.forEach(nn=>{const On=et(nn),Xa=V(nn);let pl=0,bo=0;if(Xa.length){const Te=Ve(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&&(Vt[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(Ve(a.value||[]),Xt){const _e=C.value.filter(Nt=>Ye.has(et(Nt)));Qe.forEach(Nt=>{Ye.has(et(Nt))&&_e.push(Nt)}),C.value=_e}S.value=Vt,B=Re,Xt&&Ie&&e.emit("selection-change",C.value?C.value.slice():[])},Q=()=>{y.value=!1;const ce=C.value;C.value=[],S.value={},B=[],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,Vt])=>{gt[et]&&Vt.forEach(Re=>{const Ye=En(Re,n.value);gt[Ye]||(gt[Ye]={row:Re,index:-1})})});for(const et in F.value)Dt(F.value,et)&&!gt[et]&&ce.push(F.value[et].row)}else ce=C.value.filter(at=>!a.value.includes(at));if(ce.length){const at=C.value.filter(gt=>!ce.includes(gt));C.value=at,Z({emitChange:!1}),e.emit("selection-change",[...at])}},ie=()=>(C.value||[]).slice(),ve=()=>B.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])??[],Vt=ce[gt.value]??[],Re={children:gt.value,checkStrictly:!1};for(const Qe of et){const Xt=Ue.get(En(Qe,n.value))??0;Gs(C.value,Qe,Ie,Re,N.value,Xt,n.value),pe(Qe,Ie,Ue)}for(const Qe of Vt)pe(Qe,Ie,Ue)},re=(ce,Ie,Ue=!0,at=!1)=>{var wt,et,Vt,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=(Vt=e==null?void 0:e.store)==null?void 0:Vt.states)==null?void 0:Re.checkStrictly.value};if(Gs(C.value,ce,Ie,gt,at?void 0:N.value,a.value.indexOf(ce),n.value)){if(_t.lazy.value&&!_t.checkStrictly.value){const Qe=Ie??q(ce);pe(ce,Qe,J.value),Z({emitChange:!1,rowIndexMap:J.value})}else Z({emitChange:!1});const Ye=(C.value||[]).slice();Ue&&e.emit("select",Ye,ce),e.emit("selection-change",Ye)}},_=()=>{var Vt,Re;const ce=E.value?!y.value:!(y.value||C.value.length);y.value=ce;let Ie=!1,Ue=0;const at=(Re=(Vt=e==null?void 0:e.store)==null?void 0:Vt.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(C.value,Ye,ce,wt,N.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(C.value,Qe,ce,wt,N.value,Xt,at)&&(Ie=!0),pe(Qe,ce,et)}Z({emitChange:!1,rowIndexMap:et}),Ie&&e.emit("selection-change",C.value?[...C.value]:[]),e.emit("select-all",(C.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 Vt=N.value&&N.value.call(null,et,ce);if(q(et))Ie++;else if(!N.value||Vt)return!1;ce++;const Re=V(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 Dn(ce).forEach(at=>{$.value[at.id]=Ie,Ue[at.columnKey||at.id]=Ie}),Ue},de=(ce,Ie,Ue)=>{P.value&&P.value!==ce&&(P.value.order=null),P.value=ce,M.value=Ie,L.value=Ue},be=()=>{let ce=i(l);Object.keys($.value).forEach(Ie=>{const Ue=$.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))))}),T.value=ce},we=()=>{a.value=fq(T.value??[],{sortingColumn:P.value,sortProp:M.value,sortOrder:L.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(De(ce)&&(ce=[ce]),me(ce)){const gt=ce.map(wt=>nq({columns:u.value},wt));at.forEach(wt=>{const et=gt.find(Vt=>Vt.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=[])}),$.value={},e.store.commit("filterChange",{column:{},values:[],silent:!0})},Pe=()=>{P.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={},B=[]):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=C.value.length;for(const gt of Object.keys(_t.lazyTreeNodeMap.value))(at=F.value)!=null&&at[gt]&&pe(F.value[gt].row,!0,ce);const Ue=C.value.length!==Ie;Z({emitChange:!Ue,rowIndexMap:ce}),U(),Ue&&e.emit("selection-change",[...C.value])}),{assertRowKey:A,updateColumns:R,scheduleLayout:W,isSelected:q,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:r,columns:u,fixedColumns:c,rightFixedColumns:d,leafColumns:f,fixedLeafColumns:v,rightFixedLeafColumns:g,updateOrderFns:m,leafColumnsLength:p,fixedLeafColumnsLength:h,rightFixedLeafColumnsLength:b,isAllSelected:y,selection:C,selectionIndeterminate:S,reserveSelection:k,selectOnIndeterminate:E,selectable:N,rowExpandable:x,filters:$,filteredData:T,sortingColumn:P,sortProp:M,sortOrder:L,hoverRow:Y,...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(r,u){const c=i(r._data)!==u;r.data.value=u,r._data.value=u,e.store.execQuery(),e.store.updateCurrentRowData(),e.store.updateExpandRows(),e.store.updateTreeData(e.store.states.defaultExpandAll.value),i(r.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(r,u,c,d){var g;const f=i(r._columns);let v=[];c?(c&&!c.children&&(c.children=[]),(g=c.children)==null||g.push(u),v=Cv(f,c)):(f.push(u),v=f),kv(v),r._columns.value=v,r.updateOrderFns.push(d),u.type==="selection"&&(r.selectable.value=u.selectable,r.reserveSelection.value=u.reserveSelection),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},updateColumnOrder(r,u){var c;((c=u.getColumnIndex)==null?void 0:c.call(u))!==u.no&&(kv(r._columns.value),e.$ready&&e.store.updateColumns())},removeColumn(r,u,c,d){var g;const f=i(r._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}),r._columns.value=Cv(f,c);else{const m=f.indexOf(u);m>-1&&(f.splice(m,1),r._columns.value=f)}const v=r.updateOrderFns.indexOf(d);v>-1&&r.updateOrderFns.splice(v,1),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},sort(r,u){const{prop:c,order:d,init:f}=u;if(c){const v=i(r.columns).find(g=>g.property===c);v&&(v.order=d,e.store.updateSort(v,c,d),e.store.commit("changeSortCondition",{init:f}))}},changeSortCondition(r,u){const{sortingColumn:c,sortProp:d,sortOrder:f}=r,v=i(c),g=i(d),m=i(f);Ad(m)&&(r.sortingColumn.value=null,r.sortProp.value=null),e.store.execQuery({filter:!0}),(!u||!(u.silent||u.init))&&e.emit("sort-change",{column:v,prop:g,order:m}),e.store.updateTableScrollY()},filterChange(r,u){const{column:c,values:d,silent:f}=u,v=e.store.updateFilters(c,d);e.store.execQuery(),f||e.emit("filter-change",v),e.store.updateTableScrollY()},toggleAllSelection(){var r,u;(u=(r=e.store).toggleAllSelection)==null||u.call(r)},rowSelectedChanged(r,u){e.store.toggleRowSelection(u),e.store.updateAllSelected()},setHoverRow(r,u){r.hoverRow.value=u},setCurrentRow(r,u){e.store.updateCurrentRow(u)}},commit:function(r,...u){const c=e.store.mutations;if(c[r])c[r].apply(e,[e.store.states,...u]);else throw new Error(`Action not found: ${r}`)},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=D(null),this.scrollX=D(!1),this.scrollY=D(!1),this.bodyWidth=D(null),this.fixedWidth=D(null),this.rightFixedWidth=D(null),this.gutterWidth=0;for(const t in e)Dt(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&&De(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 r;if(!It)return;const e=this.fit,t=(r=this.table.vnode.el)==null?void 0:r.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,v)=>f+Number(v.minWidth||80),0);let d=0;l.forEach((f,v)=>{if(v===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(r,l),s+=r.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=ze(fl),n=w(()=>P2(e.store.states.originColumns.value));return{isGroup:w(()=>{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=D(null),s=D(null),r=D(0),u=D([]),c=w(()=>e.column&&e.column.filters),d=w(()=>e.column&&e.column.filterClassName?`${a.b()} ${e.column.filterClassName}`:a.b()),f=w({get:()=>{var x;return(((x=e.column)==null?void 0:x.filteredValue)||[])[0]},set:x=>{var $;if(e.column){const T=[...e.column.filteredValue??[]];Ta(x)?T.splice(0,1):T.splice(0,1,x),($=e.upDataColumn)==null||$.call(e,"filteredValue",T)}}}),v=w(()=>e.column?e.column.filterMultiple:!0),g=x=>x.value===f.value,m=()=>{var x;(x=o.value)==null||x.onClose()},p=()=>{y(u.value),m()},h=()=>{u.value=[],y(u.value),m()},b=(x,$)=>{f.value=x,r.value=$,Ta(x)?y([]):y([x]),m()},y=x=>{var $,T,P;($=e.upDataColumn)==null||$.call(e,"filteredValue",x),(T=e.store)==null||T.commit("filterChange",{column:e.column,values:x}),(P=e.store)==null||P.updateAllSelected()},C=()=>{var x;u.value=[...((x=e.column)==null?void 0:x.filteredValue)||[]]},S=()=>{var x,$;(x=s.value)==null||x.focus(),!v.value&&E(),e.column&&(($=e.upDataColumn)==null||$.call(e,"filterOpened",!0))},k=()=>{var x;e.column&&((x=e.upDataColumn)==null||x.call(e,"filterOpened",!1))},E=()=>{if(Ta(f)){r.value=0;return}const x=(c.value||[]).findIndex($=>$.value===f.value);r.value=x>=0?x+1:0};return{multiple:v,filterClassName:d,filteredValue:u,filterValue:f,filters:c,handleConfirm:p,handleReset:h,handleSelect:b,isPropAbsent:Ta,isActive:g,t:n,ns:a,tooltipRef:o,rootRef:s,checkedIndex:r,handleBeforeShowTooltip:C,handleShowTooltip:S,handleHideTooltip:k,handleKeydown:x=>{var L,Y;const $=Gt(x),T=(c.value?c.value.length:0)+1;let P=r.value,M=!0;switch($){case ye.down:case ye.right:P=(P+1)%T;break;case ye.up:case ye.left:P=(P-1+T)%T;break;case ye.tab:m(),M=!1;break;case ye.enter:case ye.space:if(P===0)b(null,0);else{const B=(c.value||[])[P-1];B.value&&b(B.value,P)}break;default:M=!1}M&&x.preventDefault(),r.value=P,(Y=(L=s.value)==null?void 0:L.querySelector(`.${a.e("list-item")}:nth-child(${P+1})`))==null||Y.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"),r=Pt("el-checkbox-group"),u=Pt("el-scrollbar"),c=Pt("arrow-up"),d=Pt("arrow-down"),f=Pt("el-icon"),v=Pt("el-tooltip");return O(),oe(v,{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:I(e.ns.e("multiple"))},[K("div",{class:I(e.ns.e("content"))},[j(u,{"wrap-class":e.ns.e("wrap")},{default:X(()=>[j(r,{modelValue:e.filteredValue,"onUpdate:modelValue":t[0]||(t[0]=g=>e.filteredValue=g),class:I(e.ns.e("checkbox-group"))},{default:X(()=>[(O(!0),H(Fe,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:I(e.ns.e("bottom"))},[K("button",{class:I(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:I(e.ns.e("list")),onKeydown:t[4]||(t[4]=(...g)=>e.handleKeydown&&e.handleKeydown(...g))},[K("li",{role:"radio",class:I([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(Fe,null,bt(e.filters,(g,m)=>(O(),H("li",{key:g.value,role:"radio",class:I([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:p=>e.handleSelect(g.value,m+1)},Se(g.text),11,Cq))),128))],34))]),default:X(()=>{var g;return[K("button",{type:"button",class:I(`${e.ns.namespace.value}-table__column-filter-trigger`),"aria-label":e.t("el.table.filterLabel",{column:((g=e.column)==null?void 0:g.label)||""})},[j(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=w(()=>{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 r=o.getFlattenColumns(),u={};r.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{p.stopPropagation()},o=(p,h)=>{!h.filters&&h.sortable?m(p,h,!1):h.filterable&&!h.sortable&&l(p),a==null||a.emit("header-click",h,p)},s=(p,h)=>{a==null||a.emit("header-contextmenu",h,p)},r=D(null),u=D(!1),c=D(),d=(p,h)=>{var b,y,C;if(It&&!(h.children&&h.children.length>0)&&r.value&&e.border&&r.value.id===h.id){u.value=!0;const S=a;t("set-drag-visible",!0);const k=(b=S==null?void 0:S.vnode.el)==null?void 0:b.getBoundingClientRect().left,E=(C=(y=n==null?void 0:n.vnode)==null?void 0:y.el)==null?void 0:C.querySelector(`th.${h.id}`),N=E.getBoundingClientRect(),x=N.left-k+30;Va(E,"noclick"),c.value={startMouseLeft:p.clientX,startLeft:N.right-k,startColumnLeft:N.left-k,tableLeft:k};const $=S==null?void 0:S.refs.resizeProxy;$.style.left=`${c.value.startLeft}px`,document.onselectstart=function(){return!1},document.ondragstart=function(){return!1};const T=M=>{const L=M.clientX-c.value.startMouseLeft,Y=c.value.startLeft+L;$.style.left=`${Math.max(x,Y)}px`},P=()=>{if(u.value){const{startColumnLeft:M,startLeft:L}=c.value;h.width=h.realWidth=Number.parseInt($.style.left,10)-M,S==null||S.emit("header-dragend",h.width,L-M,h,p),requestAnimationFrame(()=>{e.store.scheduleLayout(!1,!0)}),document.body.style.cursor="",u.value=!1,r.value=null,c.value=void 0,t("set-drag-visible",!1)}document.removeEventListener("mousemove",T),document.removeEventListener("mouseup",P),document.onselectstart=null,document.ondragstart=null,setTimeout(()=>{sa(E,"noclick")},0)};document.addEventListener("mousemove",T),document.addEventListener("mouseup",P)}},f=(p,h)=>{var $;if(!e.border||h.children&&h.children.length>0)return;const b=p.target,y=wa(b)?b.closest("th"):null;if(!y)return;const C=Fa(y,"is-sortable");if(C){const T=u.value?"col-resize":"";y.style.cursor=T;const P=y.querySelector(".caret-wrapper");P&&(P.style.cursor=T)}if(!h.resizable||u.value){r.value=null;return}const S=y.getBoundingClientRect(),k=(($=y.parentNode)==null?void 0:$.lastElementChild)===y,E=e.allowDragLastColumn||!k,N=S.width>12&&S.right-p.clientX<8&&E,x=N?"col-resize":"";document.body.style.cursor=x,r.value=N?h:null,C&&(y.style.cursor=x)},v=()=>{!It||u.value||(document.body.style.cursor="")},g=({order:p,sortOrders:h})=>{if(p==="")return h[0];const b=h.indexOf(p||null);return h[b>h.length-2?0:b+1]},m=(p,h,b)=>{var $;p.stopPropagation();const y=h.order===b?null:b||g(h),C=($=p.target)==null?void 0:$.closest("th");if(C&&Fa(C,"noclick")){sa(C,"noclick");return}if(!h.sortable)return;const S=p.currentTarget;if(["ascending","descending"].some(T=>Fa(S,T)&&!h.sortOrders.includes(T)))return;const k=e.store.states;let E=k.sortProp.value,N;const x=k.sortingColumn.value;(x!==h||x===h&&Ad(x.order))&&(x&&(x.order=null),k.sortingColumn.value=h,E=h.property??null),y?N=h.order=y:N=h.order=null,k.sortProp.value=E,k.sortOrder.value=N,a==null||a.store.commit("changeSortCondition")};return{handleHeaderClick:o,handleHeaderContextMenu:s,handleMouseDown:d,handleMouseMove:f,handleMouseOut:v,handleSortClick:m,handleFilterClick:l}}function $q(e){const t=ze(fl),n=he("table");return{getHeaderRowStyle:r=>{const u=t==null?void 0:t.props.headerRowStyle;return We(u)?u.call(null,{rowIndex:r}):u},getHeaderRowClass:r=>{const u=[],c=t==null?void 0:t.props.headerRowClassName;return De(c)?u.push(c):We(c)&&u.push(c.call(null,{rowIndex:r})),u.join(" ")},getHeaderCellStyle:(r,u,c,d)=>{let f=(t==null?void 0:t.props.headerCellStyle)??{};We(f)&&(f=f.call(null,{rowIndex:r,columnIndex:u,row:c,column:d}));const v=mm(u,d.fixed,e.store,c);return wr(v,"left"),wr(v,"right"),Object.assign({},f,v)},getHeaderCellClass:(r,u,c,d)=>{const f=hm(n.b(),u,d.fixed,e.store,c),v=[d.id,d.order,d.headerAlign,d.className,d.labelClassName,...f];d.children||v.push("is-leaf"),d.sortable&&v.push("is-sortable");const g=t==null?void 0:t.props.headerCellClassName;return De(g)?v.push(g):We(g)&&v.push(g.call(null,{rowIndex:r,columnIndex:u,row:c,column:d})),v.push(n.e("cell")),v.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=ze(fl),l=he("table"),o=D({}),{onColumnsChange:s,onScrollableChange:r}=bm(a),u=(a==null?void 0:a.props.tableLayout)==="auto",c=Ft(new Map),d=D();let f;const v=()=>{f&&(clearTimeout(f),f=void 0),f=setTimeout(()=>{f=void 0;const M=d.value;M&&c.size>0&&(c.forEach((L,Y)=>{const B=M.querySelector(`.${Y.replace(/\s/g,".")}`);B&&(L.width=B.getBoundingClientRect().width||L.width)}),c.clear())})};fe(c,v),zt(()=>{f&&(clearTimeout(f),f=void 0)}),mt(async()=>{await Ae(),await Ae();const{prop:M,order:L}=e.defaultSort;a==null||a.store.commit("sort",{prop:M,order:L,init:!0}),v()});const{handleHeaderClick:g,handleHeaderContextMenu:m,handleMouseDown:p,handleMouseMove:h,handleMouseOut:b,handleSortClick:y,handleFilterClick:C}=Tq(e,t),{getHeaderRowStyle:S,getHeaderRowClass:k,getHeaderCellStyle:E,getHeaderCellClass:N}=$q(e),{isGroup:x,toggleAllSelection:$,columnRows:T}=bq(e),{t:P}=St();return n.state={onColumnsChange:s,onScrollableChange:r},n.filterPanels=o,{ns:l,t:P,filterPanels:o,onColumnsChange:s,onScrollableChange:r,columnRows:T,getHeaderRowClass:k,getHeaderRowStyle:S,getHeaderCellClass:N,getHeaderCellStyle:E,handleHeaderClick:g,handleHeaderContextMenu:m,handleMouseDown:p,handleMouseMove:h,handleMouseOut:b,handleSortClick:y,handleFilterClick:C,isGroup:x,toggleAllSelection:$,saveIndexSelection:c,isTableLayoutAuto:u,theadRef:d,updateFixedColumnStyle:v}},render(){const{ns:e,t,isGroup:n,columnRows:a,getHeaderCellStyle:l,getHeaderCellClass:o,getHeaderRowClass:s,getHeaderRowStyle:r,handleHeaderClick:u,handleHeaderContextMenu:c,handleMouseDown:d,handleMouseMove:f,handleSortClick:v,handleMouseOut:g,store:m,$parent:p,saveIndexSelection:h,isTableLayoutAuto:b}=this;let y=1;return Ge("thead",{ref:"theadRef",class:e.is("group",n)},a.map((C,S)=>Ge("tr",{class:s(S),key:S,style:r(S)},C.map((k,E)=>{k.rowSpan>y&&(y=k.rowSpan);const N=o(S,E,C,k);return b&&k.fixed&&h.set(N,k),Ge("th",{class:N,colspan:k.colSpan,key:`${k.id}-thead`,rowspan:k.rowSpan,scope:k.colSpan>1?"colgroup":"col",ariaSort:k.sortable?k.order:void 0,style:l(S,E,C,k),onClick:x=>{var $;($=x.currentTarget)!=null&&$.classList.contains("noclick")||u(x,k)},onContextmenu:x=>c(x,k),onMousedown:x=>d(x,k),onMousemove:x=>f(x,k),onMouseout:g},[Ge("div",{class:["cell",k.filteredValue&&k.filteredValue.length>0?"highlight":""]},[k.renderHeader?k.renderHeader({column:k,$index:E,store:m,_self:p}):k.label,k.sortable&&Ge("button",{type:"button",class:"caret-wrapper","aria-label":t("el.table.sortLabel",{column:k.label||""}),onClick:x=>v(x,k)},[Ge("i",{onClick:x=>v(x,k,"ascending"),class:"sort-caret ascending"}),Ge("i",{onClick:x=>v(x,k,"descending"),class:"sort-caret descending"})]),k.filterable&&Ge(xq,{store:m,placement:k.filterPlacement||"bottom-start",appendTo:p==null?void 0:p.appendFilterPanelTo,column:k,upDataColumn:(x,$)=>{k[x]=$}},{"filter-icon":()=>k.renderFilterIcon?k.renderFilterIcon({filterOpened:k.filterOpened}):null})])])}))))}});function Oq(e){const t=ze(fl),n=D(""),a=D(Ge("div")),l=(m,p,h)=>{var k,E;const b=t,y=op(m);let C=null;const S=(k=b==null?void 0:b.vnode.el)==null?void 0:k.dataset.prefix;y&&(C=a0({columns:((E=e.store)==null?void 0:E.states.columns.value)??[]},y,S),C&&(b==null||b.emit(`cell-${h}`,p,C,y,m))),b==null||b.emit(`row-${h}`,p,C,m)},o=(m,p)=>{l(m,p,"dblclick")},s=(m,p)=>{var h;(h=e.store)==null||h.commit("setCurrentRow",p),l(m,p,"click")},r=(m,p)=>{l(m,p,"contextmenu")},u=Al(m=>{var p;(p=e.store)==null||p.commit("setHoverRow",m)},30),c=Al(()=>{var m;(m=e.store)==null||m.commit("setHoverRow",null)},30),d=m=>{const p=window.getComputedStyle(m,null);return{left:Number.parseInt(p.paddingLeft,10)||0,right:Number.parseInt(p.paddingRight,10)||0,top:Number.parseInt(p.paddingTop,10)||0,bottom:Number.parseInt(p.paddingBottom,10)||0}},f=(m,p,h)=>{var y;let b=(y=p==null?void 0:p.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:r,handleMouseEnter:u,handleMouseLeave:c,handleCellMouseEnter:(m,p,h)=>{var V,A,z;if(!t)return;const b=t,y=op(m),C=(V=b==null?void 0:b.vnode.el)==null?void 0:V.dataset.prefix;let S=null;if(y){if(S=a0({columns:((A=e.store)==null?void 0:A.states.columns.value)??[]},y,C),!S)return;y.rowSpan>1&&f(y.rowSpan,m,Va);const R=b.hoverState={cell:y,column:S,row:p};b==null||b.emit("cell-mouse-enter",R.row,R.column,R.cell,m)}if(!h){(pn==null?void 0:pn.trigger)===y&&(pn==null||pn());return}const k=m.target.querySelector(".cell");if(!(Fa(k,`${C}-tooltip`)&&k.childNodes.length&&((z=k.textContent)!=null&&z.trim())))return;const E=document.createRange();E.setStart(k,0),E.setEnd(k,k.childNodes.length);const{width:N,height:x}=E.getBoundingClientRect(),{width:$,height:T}=k.getBoundingClientRect(),{top:P,left:M,right:L,bottom:Y}=d(k),B=M+L,F=P+Y;Ml(N+B,$)||Ml(x+F,T)||Ml(k.scrollWidth,$)?iq(h,((y==null?void 0:y.innerText)||(y==null?void 0:y.textContent))??"",p,S,y,b):(pn==null?void 0:pn.trigger)===y&&(pn==null||pn())},handleCellMouseLeave:m=>{const p=op(m);if(!p)return;p.rowSpan>1&&f(p.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=ze(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 v=[n.e("row")];t!=null&&t.props.highlightCurrentRow&&c===((m=e.store)==null?void 0:m.states.currentRow.value)&&v.push("current-row"),e.stripe&&f%2===1&&v.push(n.em("row","striped"));const g=t==null?void 0:t.props.rowClassName;return De(g)?v.push(g):We(g)&&v.push(g.call(null,{row:c,rowIndex:d})),v},getCellStyle:(c,d,f,v)=>{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:v}));const p=mm(d,e==null?void 0:e.fixed,e.store);return wr(p,"left"),wr(p,"right"),Object.assign({},m,p)},getCellClass:(c,d,f,v,g)=>{const m=hm(n.b(),d,e==null?void 0:e.fixed,e.store,void 0,g),p=[v.id,v.align,v.className,...m],h=t==null?void 0:t.props.cellClassName;return De(h)?p.push(h):We(h)&&p.push(h.call(null,{rowIndex:c,columnIndex:d,row:f,column:v})),p.push(n.e("cell")),p.filter(b=>!!b).join(" ")},getSpan:(c,d,f,v)=>{let g=1,m=1;const p=t==null?void 0:t.props.spanMethod;if(We(p)){const h=p({row:c,column:d,rowIndex:f,columnIndex:v});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 v=c.map(({realWidth:g,width:m})=>g||m).slice(f,f+d);return Number(v.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=ze(fl),n=he("table"),{handleDoubleClick:a,handleClick:l,handleContextMenu:o,handleMouseEnter:s,handleMouseLeave:r,handleCellMouseEnter:u,handleCellMouseLeave:c,tooltipContent:d,tooltipTrigger:f}=Oq(e),{getRowStyle:v,getRowClass:g,getCellStyle:m,getCellClass:p,getSpan:h,getColspanRealWidth:b}=Nq(e);let y=-1;const C=w(()=>{var x;return(x=e.store)==null?void 0:x.states.columns.value.findIndex(({type:$})=>$==="default")}),S=(x,$)=>{var P;const T=(P=t==null?void 0:t.props)==null?void 0:P.rowKey;return T?En(x,T):$},k=(x,$,T,P=!1)=>{const{tooltipEffect:M,tooltipOptions:L,store:Y}=e,{indent:B,columns:F}=Y.states,V=[];let A=!0;return T&&(V.push(n.em("row",`level-${T.level}`)),A=!!T.display),$===0&&(y=-1),e.stripe&&A&&y++,V.push(...g(x,$,y)),Ge("tr",{style:[A?null:{display:"none"},v(x,$)],class:V,key:S(x,$),onDblclick:z=>a(z,x),onClick:z=>l(z,x),onContextmenu:z=>o(z,x),onMouseenter:()=>s($),onMouseleave:r},F.value.map((z,R)=>{const{rowspan:W,colspan:q}=h(x,z,$,R);if(!W||!q)return null;const J=Object.assign({},z);J.realWidth=b(F.value,q,R);const Z={store:Y,_self:e.context||t,column:J,row:x,$index:$,cellIndex:R,expanded:P};R===C.value&&T&&(Z.treeNode={indent:T.level&&T.level*B.value,level:T.level},Wt(T.expanded)&&(Z.treeNode.expanded=T.expanded,"loading"in T&&(Z.treeNode.loading=T.loading),"noLazyChildren"in T&&(Z.treeNode.noLazyChildren=T.noLazyChildren)));const Q=`${S(x,$)},${R}`,ee=J.columnKey||J.rawColumnKey||"",ie=z.showOverflowTooltip&&Yw({effect:M},L,z.showOverflowTooltip);return Ge(Iq,{style:m($,R,x,z),class:p($,R,x,z,q-1),key:`${ee}${Q}`,rowspan:W,colspan:q,onMouseenter:ve=>u(ve,x,ie),onMouseleave:c},{default:()=>E(R,z,Z)})}))},E=(x,$,T)=>$.renderCell(T);return{wrappedRowRender:(x,$)=>{const T=e.store,{isRowExpanded:P,assertRowKey:M}=T,{treeData:L,lazyTreeNodeMap:Y,childrenColumnName:B,rowKey:F}=T.states,V=T.states.columns.value;if(V.some(({type:A})=>A==="expand")){const A=P(x),z=k(x,$,void 0,A),R=t==null?void 0:t.renderExpanded;if(!R)return console.error("[Element Error]renderExpanded is required."),z;const W=[[z]];return(t.props.preserveExpandedContent||A)&&W[0].push(Ge("tr",{key:`expanded-row__${z.key}`,style:{display:A?"":"none"}},[Ge("td",{colspan:V.length,class:`${n.e("cell")} ${n.e("expanded-cell")}`},[R({row:x,$index:$,store:T,expanded:A})])])),W}else if(Object.keys(L.value).length){M();const A=En(x,F.value);let z=L.value[A],R=null;z&&(R={expanded:z.expanded,level:z.level,display:!0,noLazyChildren:void 0,loading:void 0},Wt(z.lazy)&&(R&&Wt(z.loaded)&&z.loaded&&(R.noLazyChildren=!(z.children&&z.children.length)),R.loading=z.loading));const W=[k(x,$,R??void 0)];if(z){let q=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,F.value);if(Ta(ve))throw new Error("For nested data item, row-key is required.");if(z={...L.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)),q++,W.push(k(ee,$+q,ie)),z){const pe=Y.value[ve]||ee[B.value];J(pe,z)}})};z.display=!0,J(Y.value[A]||x[B.value],z)}return W}else return k(x,$,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=ze(fl),a=he("table"),{wrappedRowRender:l,tooltipContent:o,tooltipTrigger:s}=Rq(e),{onColumnsChange:r,onScrollableChange:u}=bm(n),c=[];return fe((d=e.store)==null?void 0:d.states.hoverRow,(f,v)=>{var b,y;const g=t==null?void 0:t.vnode.el,m=Array.from((g==null?void 0:g.children)||[]).filter(C=>C==null?void 0:C.classList.contains(`${a.e("row")}`));let p=f;const h=(b=m[p])==null?void 0:b.childNodes;if(h!=null&&h.length){let C=0;Array.from(h).reduce((S,k,E)=>{var N,x;return((N=h[E])==null?void 0:N.colSpan)>1&&(C=(x=h[E])==null?void 0:x.colSpan),k.nodeName!=="TD"&&C===0&&S.push(E),C>0&&C--,S},[]).forEach(S=>{var k;for(p=f;p>0;){const E=(k=m[p-1])==null?void 0:k.childNodes;if(E[S]&&E[S].nodeName==="TD"&&E[S].rowSpan>1){Va(E[S],"hover-cell"),c.push(E[S]);break}p--}})}else c.forEach(C=>sa(C,"hover-cell")),c.length=0;!((y=e.store)!=null&&y.states.isComplex.value)||!It||Wn(()=>{const C=m[v],S=m[f];C&&!C.classList.contains("hover-fixed-row")&&sa(C,"hover-row"),S&&Va(S,"hover-row")})}),Qi(()=>{pn==null||pn()}),{ns:a,onColumnsChange:r,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=ze(fl))==null?void 0:t.store;return{leftFixedLeafCount:w(()=>(e==null?void 0:e.states.fixedLeafColumnsLength.value)??0),rightFixedLeafCount:w(()=>(e==null?void 0:e.states.rightFixedColumns.value.length)??0),columnsCount:w(()=>(e==null?void 0:e.states.columns.value.length)??0),leftFixedCount:w(()=>(e==null?void 0:e.states.fixedColumns.value.length)??0),rightFixedCount:w(()=>(e==null?void 0:e.states.rightFixedColumns.value.length)??0),columns:w(()=>(e==null?void 0:e.states.columns.value)??[])}}function Dq(e){const{columns:t}=Lq(),n=he("table");return{getCellClasses:(o,s)=>{const r=o[s],u=[n.e("cell"),r.id,r.align,r.labelClassName,...hm(n.b(),s,r.fixed,e.store)];return r.className&&u.push(r.className),r.children||u.push(n.is("leaf")),u},getCellStyles:(o,s)=>{const r=mm(s,o.fixed,e.store);return wr(r,"left"),wr(r,"right"),r},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=ze(fl),n=he("table"),{getCellClasses:a,getCellStyles:l,columns:o}=Dq(e),{onScrollableChange:s,onColumnsChange:r}=bm(t);return{ns:n,onScrollableChange:s,onColumnsChange:r,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((r,u)=>{if(u===0){s[u]=l;return}const c=o.map(g=>Number(g[r.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 v=Math.max.apply(null,d);f?s[u]="":s[u]=c.reduce((g,m)=>{const p=Number(m);return Number.isNaN(+p)?g:Number.parseFloat((g+m).toFixed(Math.min(v,20)))},0)}),Ge(Ge("tfoot",[Ge("tr",{},[...e.map((r,u)=>Ge("td",{key:u,colspan:r.colSpan,rowspan:r.rowSpan,class:n(e,u),style:t(r,u)},[Ge("div",{class:["cell",r.labelClassName]},[s[u]])]))])]))}});function Vq(e){return{setCurrentRow:v=>{e.commit("setCurrentRow",v)},getSelectionRows:()=>e.getSelectionRows(),getHalfSelectionRows:()=>e.getHalfSelectionRows(),toggleRowSelection:(v,g,m=!0)=>{e.toggleRowSelection(v,g,!1,m),e.updateAllSelected()},clearSelection:()=>{e.clearSelection()},clearFilter:v=>{e.clearFilter(v)},toggleAllSelection:()=>{e.commit("toggleAllSelection")},toggleRowExpansion:(v,g)=>{e.toggleRowExpansionAdapter(v,g)},clearSort:()=>{e.clearSort()},sort:(v,g)=>{e.commit("sort",{prop:v,order:g})},updateKeyChildren:(v,g)=>{e.updateKeyChildren(v,g)}}}function Bq(e,t,n,a){const l=D(!1),o=D(null),s=D(!1),r=B=>{s.value=B},u=D({width:null,height:null,headerHeight:null}),c=D(!1),d={display:"inline-block",verticalAlign:"middle"},f=D(),v=D(0),g=D(0),m=D(0),p=D(0),h=D(0);fe(()=>e.height,B=>{t.setHeight(B??null)},{immediate:!0}),fe(()=>e.maxHeight,B=>{t.setMaxHeight(B??null)},{immediate:!0}),fe(()=>[e.currentRowKey,n.states.rowKey],([B,F])=>{!i(F)||!i(B)||n.setCurrentRowKey(`${B}`)},{immediate:!0}),fe(()=>e.data,B=>{a.store.commit("setData",B)},{immediate:!0,deep:!0}),ia(()=>{e.expandRowKeys&&n.setExpandRowKeysAdapter(e.expandRowKeys)});const b=()=>{a.store.commit("setHoverRow",null),a.hoverState&&(a.hoverState=null)},y=(B,F)=>{const{pixelX:V,pixelY:A}=F;Math.abs(V)>=Math.abs(A)&&(a.refs.bodyWrapper.scrollLeft+=F.pixelX/5)},C=w(()=>e.height||e.maxHeight||n.states.fixedColumns.value.length>0||n.states.rightFixedColumns.value.length>0),S=w(()=>({width:t.bodyWidth.value?`${t.bodyWidth.value}px`:""})),k=()=>{C.value&&t.updateElsHeight(),t.updateColumnsWidth(),!(typeof window>"u")&&requestAnimationFrame($)};mt(async()=>{await Ae(),n.updateColumns(),T(),requestAnimationFrame(k);const B=a.vnode.el,F=a.refs.headerWrapper;e.flexible&&B&&B.parentElement&&(B.parentElement.style.minWidth="0"),u.value={width:f.value=B.offsetWidth,height:B.offsetHeight,headerHeight:e.showHeader&&F?F.offsetHeight:null},n.states.columns.value.forEach(V=>{V.filteredValue&&V.filteredValue.length&&a.store.commit("filterChange",{column:V,values:V.filteredValue,silent:!0})}),a.$ready=!0});const E=(B,F)=>{if(!B)return;const V=Array.from(B.classList).filter(A=>!A.startsWith("is-scrolling-"));V.push(t.scrollX.value?F:"is-scrolling-none"),B.className=V.join(" ")},N=B=>{const{tableWrapper:F}=a.refs;E(F,B)},x=B=>{const{tableWrapper:F}=a.refs;return!!(F&&F.classList.contains(B))},$=function(){if(!a.refs.scrollBarRef)return;if(!t.scrollX.value){const W="is-scrolling-none";x(W)||N(W);return}const B=a.refs.scrollBarRef.wrapRef;if(!B)return;const{scrollLeft:F,offsetWidth:V,scrollWidth:A}=B,{headerWrapper:z,footerWrapper:R}=a.refs;z&&(z.scrollLeft=F),R&&(R.scrollLeft=F),F>=A-V-1?N("is-scrolling-right"):N(F===0?"is-scrolling-left":"is-scrolling-middle")},T=()=>{a.refs.scrollBarRef&&(a.refs.scrollBarRef.wrapRef&&Ht(a.refs.scrollBarRef.wrapRef,"scroll",$,{passive:!0}),e.fit?on(a.vnode.el,P):Ht(window,"resize",P),on(a.refs.tableInnerWrapper,()=>{var B,F;P(),(F=(B=a.refs)==null?void 0:B.scrollBarRef)==null||F.update()}))},P=()=>{var J,Z,Q,ee;const B=a.vnode.el;if(!a.$ready||!B)return;let F=!1;const{width:V,height:A,headerHeight:z}=u.value,R=f.value=B.offsetWidth;V!==R&&(F=!0);const W=B.offsetHeight;(e.height||C.value)&&A!==W&&(F=!0);const q=e.tableLayout==="fixed"?a.refs.headerWrapper:(J=a.refs.tableHeaderRef)==null?void 0:J.$el;e.showHeader&&(q==null?void 0:q.offsetHeight)!==z&&(F=!0),v.value=((Z=a.refs.tableWrapper)==null?void 0:Z.scrollHeight)||0,m.value=(q==null?void 0:q.scrollHeight)||0,p.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=v.value-m.value-p.value-h.value,F&&(u.value={width:R,height:W,headerHeight:e.showHeader&&(q==null?void 0:q.offsetHeight)||0},k())},M=$n(),L=w(()=>{const{bodyWidth:B,scrollY:F,gutterWidth:V}=t;return B.value?`${B.value-(F.value?V:0)}px`:""}),Y=w(()=>e.maxHeight?"fixed":e.tableLayout);return{isHidden:l,renderExpanded:o,setDragVisible:r,isGroup:c,handleMouseLeave:b,handleHeaderFooterMousewheel:y,tableSize:M,emptyBlockStyle:w(()=>{if(e.data&&e.data.length)return;let B="100%";e.height&&g.value&&(B=`${g.value}px`);const F=f.value;return{width:F?`${F}px`:"",height:B}}),resizeProxyVisible:s,bodyWidth:L,resizeState:u,doLayout:k,tableBodyStyles:S,tableLayout:Y,scrollbarViewStyle:d,scrollbarStyle:w(()=>e.height?{height:"100%"}:e.maxHeight?Number.isNaN(Number(e.maxHeight))?{maxHeight:`calc(${e.maxHeight} - ${m.value+p.value}px)`}:{maxHeight:`${+e.maxHeight-m.value-p.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=D(),t=(o,s)=>{const r=e.value;r&&r.scrollTo(o,s)},n=(o,s)=>{const r=e.value;r&&He(s)&&["Top","Left"].includes(o)&&r[`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 r=hq(s,n);s.store=r;const u=new gq({store:s.store,table:s,fit:n.fit,showHeader:n.showHeader});s.layout=u;const c=w(()=>(r.states.data.value||[]).length===0),{setCurrentRow:d,getSelectionRows:f,getHalfSelectionRows:v,toggleRowSelection:g,clearSelection:m,clearFilter:p,toggleAllSelection:h,toggleRowExpansion:b,clearSort:y,sort:C,updateKeyChildren:S}=Vq(r),{isHidden:k,renderExpanded:E,setDragVisible:N,isGroup:x,handleMouseLeave:$,handleHeaderFooterMousewheel:T,tableSize:P,emptyBlockStyle:M,resizeProxyVisible:L,bodyWidth:Y,resizeState:B,doLayout:F,tableBodyStyles:V,tableLayout:A,scrollbarViewStyle:z,scrollbarStyle:R}=Bq(n,u,r,s),{scrollBarRef:W,scrollTo:q,setScrollLeft:J,setScrollTop:Z}=zq(),Q=Al(F,50),ee=Q7(l.namespace.value),ie=s;s.tableId=ee,s.state={isGroup:x,resizeState:B,doLayout:F,debouncedUpdateLayout:Q};const ve=w(()=>n.sumText??a("el.table.sumText")),pe=w(()=>n.emptyText??a("el.table.emptyText")),re=w(()=>{var ae;return n.tooltipEffect??((ae=o.value)==null?void 0:ae.tooltipEffect)}),_=w(()=>{var ae;return n.tooltipOptions??((ae=o.value)==null?void 0:ae.tooltipOptions)}),U=w(()=>P2(r.states.originColumns.value)[0]);return Fq(s),zt(()=>{Q.cancel()}),t({ns:l,layout:u,store:r,columns:U,handleHeaderFooterMousewheel:T,handleMouseLeave:$,tableId:ee,tableSize:P,isHidden:k,isEmpty:c,renderExpanded:E,resizeProxyVisible:L,resizeState:B,isGroup:x,bodyWidth:Y,tableBodyStyles:V,emptyBlockStyle:M,debouncedUpdateLayout:Q,setCurrentRow:d,getSelectionRows:f,getHalfSelectionRows:v,toggleRowSelection:g,clearSelection:m,clearFilter:p,toggleAllSelection:h,toggleRowExpansion:b,clearSort:y,doLayout:F,sort:C,updateKeyChildren:S,t:a,setDragVisible:N,context:ie,computedSumText:ve,computedEmptyText:pe,computedTooltipEffect:re,computedTooltipOptions:_,tableLayout:A,scrollbarViewStyle:z,scrollbarStyle:R,scrollBarRef:W,scrollTo:q,setScrollLeft:J,setScrollTop:Z,allowDragLastColumn:n.allowDragLastColumn}),(ae,le)=>(O(),H("div",{ref:"tableWrapper",class:I([{[i(l).m("fit")]:e.fit,[i(l).m("striped")]:e.stripe,[i(l).m("border")]:e.border||i(x),[i(l).m("hidden")]:i(k),[i(l).m("group")]:i(x),[i(l).m("fluid-height")]:e.maxHeight,[i(l).m("scrollable-x")]:i(u).scrollX.value,[i(l).m("scrollable-y")]:i(u).scrollY.value,[i(l).m("enable-row-hover")]:!i(r).states.isComplex.value,[i(l).m("enable-row-transition")]:(i(r).states.data.value||[]).length!==0&&(i(r).states.data.value||[]).length<100,"has-footer":e.showSummary},i(l).m(i(P)),e.className,i(l).b(),i(l).m(`layout-${i(A)}`)]),style:je(e.style),"data-prefix":i(l).namespace.value,onMouseleave:le[1]||(le[1]=(...se)=>i($)&&i($)(...se))},[K("div",{ref:"tableInnerWrapper",class:I(i(l).e("inner-wrapper"))},[K("div",Kq,[ne(ae.$slots,"default")],512),e.showHeader&&i(A)==="fixed"?ft((O(),H("div",{key:0,ref:"headerWrapper",class:I(i(l).e("header-wrapper"))},[K("table",{ref:"tableHeader",class:I(i(l).e("header")),style:je(i(V)),border:"0",cellpadding:"0",cellspacing:"0"},[j(i(hc),{columns:i(r).states.columns.value,"table-layout":i(A)},null,8,["columns","table-layout"]),j(i(s0),{ref:"tableHeaderRef",border:e.border,"default-sort":e.defaultSort,store:i(r),"append-filter-panel-to":e.appendFilterPanelTo,"allow-drag-last-column":e.allowDragLastColumn,onSetDragVisible:i(N)},null,8,["border","default-sort","store","append-filter-panel-to","allow-drag-last-column","onSetDragVisible"])],6)],2)),[[i(vy),i(T)]]):te("v-if",!0),K("div",{ref:"bodyWrapper",class:I(i(l).e("body-wrapper"))},[j(i(il),{ref_key:"scrollBarRef",ref:W,"view-style":i(z),"wrap-style":i(R),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:I(i(l).e("body")),cellspacing:"0",cellpadding:"0",border:"0",style:je({width:i(Y),tableLayout:i(A)})},[j(i(hc),{columns:i(r).states.columns.value,"table-layout":i(A)},null,8,["columns","table-layout"]),e.showHeader&&i(A)==="auto"?(O(),oe(i(s0),{key:0,ref:"tableHeaderRef",class:I(i(l).e("body-header")),border:e.border,"default-sort":e.defaultSort,store:i(r),"append-filter-panel-to":e.appendFilterPanelTo,onSetDragVisible:i(N)},null,8,["class","border","default-sort","store","append-filter-panel-to","onSetDragVisible"])):te("v-if",!0),j(i(Aq),{context:i(ie),highlight:e.highlightCurrentRow,"row-class-name":e.rowClassName,"tooltip-effect":re.value,"tooltip-options":_.value,"row-style":e.rowStyle,store:i(r),stripe:e.stripe},null,8,["context","highlight","row-class-name","tooltip-effect","tooltip-options","row-style","store","stripe"]),e.showSummary&&i(A)==="auto"?(O(),oe(i(r0),{key:1,class:I(i(l).e("body-footer")),border:e.border,"default-sort":e.defaultSort,store:i(r),"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(i(M)),class:I(i(l).e("empty-block"))},[K("span",{class:I(i(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:I(i(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&&i(A)==="fixed"?ft((O(),H("div",{key:1,ref:"footerWrapper",class:I(i(l).e("footer-wrapper"))},[K("table",{class:I(i(l).e("footer")),cellspacing:"0",cellpadding:"0",border:"0",style:je(i(V))},[j(i(hc),{columns:i(r).states.columns.value,"table-layout":i(A)},null,8,["columns","table-layout"]),j(i(r0),{border:e.border,"default-sort":e.defaultSort,store:i(r),"sum-text":ve.value,"summary-method":e.summaryMethod},null,8,["border","default-sort","store","sum-text","summary-method"])],6)],2)),[[At,!c.value],[i(vy),i(T)]]):te("v-if",!0),e.border||i(x)?(O(),H("div",{key:2,class:I(i(l).e("border-left-patch"))},null,2)):te("v-if",!0)],2),ft(K("div",{ref:"resizeProxy",class:I(i(l).e("column-resize-proxy"))},null,2),[[At,i(L)]])],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 r=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:r},{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(r){r.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 r=[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:r,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"},r=i0(o,s);Object.keys(r).forEach(u=>{const c=s[u];Dt(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 v=c==="fixed";e.value.store.scheduleLayout(v)})})},registerNormalWatchers:()=>{const o=["label","filters","filterMultiple","filteredValue","sortable","index","formatter","className","labelClassName","filterClassName","showOverflowTooltip","tooltipFormatter","resizable"],s=["showOverflowTooltip"],r={property:"prop",align:"realAlign",headerAlign:"realHeaderAlign"},u=i0(o,r);Object.keys(u).forEach(d=>{const f=r[d];Dt(t,f)&&fe(()=>t[f],v=>{n.columnConfig.value[d]=v,(d==="filters"||d==="filterMethod")&&(n.columnConfig.value.filterable=!!(n.columnConfig.value.filters||n.columnConfig.value.filterMethod))})}),s.forEach(d=>{Dt(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&&Dt(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=D(""),o=D(!1),s=D(),r=D(),u=he("table");ia(()=>{s.value=e.align?`is-${e.align}`:null,s.value}),ia(()=>{r.value=e.headerAlign?`is-${e.headerAlign}`:s.value,r.value});const c=w(()=>{let S=a.vnode.vParent||a.parent;for(;S&&!S.tableId&&!S.columnId;)S=S.vnode.vParent||S.parent;return S}),d=w(()=>{const{store:S}=a.parent;if(!S)return!1;const{treeData:k}=S.states,E=k.value;return E&&Object.keys(E).length>0}),f=D(vm(e.width)),v=D(E2(e.minWidth)),g=S=>(f.value&&(S.width=f.value),v.value&&(S.minWidth=v.value),!f.value&&v.value&&(S.width=void 0),S.minWidth||(S.minWidth=80),S.realWidth=Number(xt(S.width)?S.minWidth:S.width),S),m=S=>{const k=S.type,E=Xq[k]||{};Object.keys(E).forEach(x=>{const $=E[x];x!=="className"&&!xt($)&&(S[x]=$)});const N=Gq(k);if(N){const x=`${i(u.namespace)}-${N}`;S.className=S.className?`${S.className} ${x}`:x}return S},p=S=>{me(S)?S.forEach(E=>k(E)):k(S);function k(E){var N;((N=E==null?void 0:E.type)==null?void 0:N.name)==="ElTableColumn"&&(E.vParent=a)}};return{columnId:l,realAlign:s,isSubColumn:o,realHeaderAlign:r,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=E=>{if(a.columnConfig.value.label,t.header){const N=t.header(E);if($2(N))return Ge(Fe,N)}return st(S.label)}),t["filter-icon"]&&(S.renderFilterIcon=E=>ne(t,"filter-icon",E)),t.expand&&(S.renderExpand=E=>ne(t,"expand",E));let k=S.renderCell;return S.type==="expand"?(S.renderCell=E=>Ge("div",{class:"cell"},[k(E)]),n.value.renderExpanded=E=>t.default?t.default(E):t.default):(k=k||Jq,S.renderCell=E=>{let N=null;if(t.default){const L=t.default(E);N=L.some(Y=>Y.type!==Cn)?L:k(E)}else N=k(E);const{columns:x}=n.value.store.states,$=x.value.findIndex(L=>L.type==="default"),T=d.value&&E.cellIndex===$,P=Zq(E,T),M={class:"cell",style:{}};return S.showOverflowTooltip&&(M.class=`${M.class} ${i(u.namespace)}-tooltip`,M.style={width:`${(E.column.realWidth||Number(E.column.width))-1}px`}),p(N),Ge("div",M,[P,N])}),S},getPropsData:(...S)=>S.reduce((k,E)=>(me(E)&&E.forEach(N=>{k[N]=e[N]}),k),{}),getColumnElIndex:(S,k)=>Array.prototype.indexOf.call(S,k),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=D({}),s=w(()=>{let x=a.parent;for(;x&&!x.tableId;)x=x.parent;return x}),{registerNormalWatchers:r,registerComplexWatchers:u}=Qq(s,t),{columnId:c,isSubColumn:d,realHeaderAlign:f,columnOrTableParent:v,setColumnWidth:g,setColumnForcedProps:m,setColumnRenders:p,getPropsData:h,getColumnElIndex:b,realAlign:y,updateColumnOrder:C}=eY(t,n,s),S=v.value,k="tableId"in S?S.tableId:S.columnId;c.value=eq(k),Cd(()=>{var Y,B;d.value=s.value!==S;const x=t.type||"default",$=t.sortable===""?!0:t.sortable,T=x==="selection"?!1:xt(t.showOverflowTooltip)?S.props.showOverflowTooltip??((Y=l.value)==null?void 0:Y.showOverflowTooltip):t.showOverflowTooltip,P=xt(t.tooltipFormatter)?S.props.tooltipFormatter??((B=l.value)==null?void 0:B.tooltipFormatter):t.tooltipFormatter,M={...Uq[x],id:c.value,type:x,property:t.prop||t.property,align:y,headerAlign:f,showOverflowTooltip:T,tooltipFormatter:P,filterable:t.filters||t.filterMethod,filteredValue:[],filterPlacement:"",filterClassName:"",isColumnGroup:!1,isSubColumn:!1,filterOpened:!1,sortable:$,index:t.index,rawColumnKey:a.vnode.key};let L=h(["columnKey","label","className","labelClassName","type","renderHeader","formatter","fixed","resizable"],["sortMethod","sortBy","sortOrders"],["selectable","reserveSelection"],["filterMethod","filters","filterMultiple","filterOpened","filteredValue","filterPlacement","filterClassName"]);L=aq(M,L),L=oq(p,g,m)(L),o.value=L,r(),u()}),mt(()=>{var P,M;const x=v.value,$=d.value?(P=x.vnode.el)==null?void 0:P.children:(M=x.refs.hiddenColumns)==null?void 0:M.children,T=()=>b($||[],a.vnode.el);o.value.getColumnIndex=T,T()>-1&&s.value.store.commit("insertColumn",o.value,d.value?"columnConfig"in x&&x.columnConfig.value:null,C)});let E=n.header;kd(()=>{n.header!==E&&(E=n.header,oi(o))}),zt(()=>{const x=o.value.getColumnIndex;(x?x():-1)>-1&&s.value.store.commit("removeColumn",o.value,d.value?"columnConfig"in S&&S.columnConfig.value:null,C)}),a.columnId=c.value,a.columnConfig=o;const N=()=>{var x,$;try{const T=(x=n.default)==null?void 0:x.call(n,{row:{},column:{},$index:-1}),P=[];if(me(T))for(const M of T)(($=M.type)==null?void 0:$.name)==="ElTableColumn"||M.shapeFlag&2?P.push(M):M.type===Fe&&me(M.children)&&M.children.forEach(L=>{(L==null?void 0:L.patchFlag)!==1024&&!De(L==null?void 0:L.children)&&P.push(L)});return Ge("div",P)}catch{return Ge("div",[])}};return(x,$)=>(O(),oe(N))}}),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=w(()=>i(t).map((h,b)=>({...h,key:h.key??h.dataKey??b}))),l=w(()=>i(a).filter(h=>!h.hidden)),o=w(()=>i(l).filter(h=>h.fixed==="left"||h.fixed===!0)),s=w(()=>i(l).filter(h=>h.fixed==="right")),r=w(()=>i(l).filter(h=>!h.fixed)),u=w(()=>{const h=[];return i(o).forEach(b=>{h.push({...b,placeholderSign:Yi})}),i(r).forEach(b=>{h.push(b)}),i(s).forEach(b=>{h.push({...b,placeholderSign:Yi})}),h}),c=w(()=>i(o).length||i(s).length),d=w(()=>i(a).reduce((h,b)=>(h[b.key]=iY(b,i(n),e.fixed),h),{})),f=w(()=>i(l).reduce((h,b)=>h+b.width,0)),v=h=>i(a).find(b=>b.key===h),g=h=>i(d)[h],m=(h,b)=>{h.width=b};function p(h){var k;const{key:b}=h.currentTarget.dataset;if(!b)return;const{sortState:y,sortBy:C}=e;let S="asc";rt(y)?S=Ev[y[b]]:S=Ev[C.order],(k=e.onColumnSort)==null||k.call(e,{column:v(b),key:b,order:S})}return{columns:a,columnsStyles:d,columnsTotalWidth:f,fixedColumnsOnLeft:o,fixedColumnsOnRight:s,hasFixedColumns:c,mainColumns:u,normalColumns:r,visibleColumns:l,getColumn:v,getColumnStyle:g,updateColumnWidth:m,onColumnSorted:p}}const cY=(e,{mainTableRef:t,leftTableRef:n,rightTableRef:a,onMaybeEndReached:l})=>{const o=D({scrollLeft:0,scrollTop:0});function s(g){var p,h,b;const{scrollTop:m}=g;(p=t.value)==null||p.scrollTo(g),(h=n.value)==null||h.scrollToTop(m),(b=a.value)==null||b.scrollToTop(m)}function r(g){o.value=g,s(g)}function u(g){o.value.scrollTop=g,s(i(o))}function c(g){var m,p;o.value.scrollLeft=g,(p=(m=t.value)==null?void 0:m.scrollTo)==null||p.call(m,i(o))}function d(g){var m;r(g),(m=e.onScroll)==null||m.call(e,g)}function f({scrollTop:g}){const{scrollTop:m}=i(o);g!==m&&u(g)}function v(g,m="auto"){var p;(p=t.value)==null||p.scrollToRow(g,m)}return fe(()=>i(o).scrollTop,(g,m)=>{g>m&&l()}),{scrollPos:o,scrollTo:r,scrollToLeft:c,scrollToTop:u,scrollToRow:v,onScroll:d,onVerticalScroll:f}},dY=(e,{mainTableRef:t,leftTableRef:n,rightTableRef:a,tableInstance:l,ns:o,isScrolling:s})=>{const r=ht(),{emit:u}=r,c=Et(!1),d=D(e.defaultExpandedRowKeys||[]),f=D(-1),v=Et(null),g=D({}),m=D({}),p=Et({}),h=Et({}),b=Et({}),y=w(()=>He(e.estimatedRowHeight));function C(T){var P;(P=e.onRowsRendered)==null||P.call(e,T),T.rowCacheEnd>i(f)&&(f.value=T.rowCacheEnd)}function S({hovered:T,rowKey:P}){s.value||l.vnode.el.querySelectorAll(`[rowkey="${String(P)}"]`).forEach(M=>{T?M.classList.add(o.is("hovered")):M.classList.remove(o.is("hovered"))})}function k({expanded:T,rowData:P,rowIndex:M,rowKey:L}){var F,V;const Y=[...i(d)],B=Y.indexOf(L);T?B===-1&&Y.push(L):B>-1&&Y.splice(B,1),d.value=Y,u("update:expandedRowKeys",Y),(F=e.onRowExpand)==null||F.call(e,{expanded:T,rowData:P,rowIndex:M,rowKey:L}),(V=e.onExpandedRowsChange)==null||V.call(e,Y),l.vnode.el.querySelector(`.${o.is("hovered")}[rowkey="${String(L)}"]`)&&Ae(()=>S({hovered:!0,rowKey:L}))}const E=Al(()=>{var T,P,M,L;c.value=!0,g.value={...i(g),...i(m)},N(i(v),!1),m.value={},v.value=null,(T=t.value)==null||T.forceUpdate(),(P=n.value)==null||P.forceUpdate(),(M=a.value)==null||M.forceUpdate(),(L=r.proxy)==null||L.$forceUpdate(),c.value=!1},0);function N(T,P=!1){i(y)&&[t,n,a].forEach(M=>{const L=i(M);L&&L.resetAfterRowIndex(T,P)})}function x(T,P,M){const L=i(v);(L===null||L>M)&&(v.value=M),m.value[T]=P}function $({rowKey:T,height:P,rowIndex:M},L){L?L==="right"?b.value[T]=P:p.value[T]=P:h.value[T]=P;const Y=Math.max(...[p,b,h].map(B=>B.value[T]||0));i(g)[T]!==Y&&(x(T,Y,M),E())}return{expandedRowKeys:d,lastRenderedRowIndex:f,isDynamic:y,isResetting:c,rowHeights:g,resetAfterIndex:N,onRowExpanded:k,onRowHovered:S,onRowsRendered:C,onRowHeightChange:$}},fY=(e,{expandedRowKeys:t,lastRenderedRowIndex:n,resetAfterIndex:a})=>{const l=D({}),o=w(()=>{const r={},{data:u,rowKey:c}=e,d=i(t);if(!d||!d.length)return u;const f=[],v=new Set;d.forEach(m=>v.add(m));let g=u.slice();for(g.forEach(m=>r[m[c]]=0);g.length>0;){const m=g.shift();f.push(m),v.has(m[c])&&me(m.children)&&m.children.length>0&&(g=[...m.children,...g],m.children.forEach(p=>r[p[c]]=r[m[c]]+1))}return l.value=r,f}),s=w(()=>{const{data:r,expandColumnKey:u}=e;return u?i(o):r});return fe(s,(r,u)=>{r!==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=w(()=>{const{fixed:p,width:h,vScrollbarSize:b}=e,y=h-b;return p?Math.max(Math.round(i(t)),y):y}),s=w(()=>{const{height:p=0,maxHeight:h=0,footerHeight:b,hScrollbarSize:y}=e;if(h>0){const C=i(v),S=i(n),k=i(f)+C+S+y;return Math.min(k,h-b)}return p-b}),r=w(()=>{const{maxHeight:p}=e,h=i(s);if(He(p)&&p>0)return h;const b=i(n)+i(f)+i(v);return Math.min(h,b)}),u=p=>p.width,c=w(()=>gc(i(a).map(u))),d=w(()=>gc(i(l).map(u))),f=w(()=>gc(e.headerHeight)),v=w(()=>{var p;return(((p=e.fixedData)==null?void 0:p.length)||0)*e.rowHeight}),g=w(()=>i(s)-i(f)-i(v)),m=w(()=>{const{style:p={},height:h,width:b}=e;return Mo({...p,height:h,width:b})});return{bodyWidth:o,fixedTableHeight:r,mainTableHeight:s,leftTableWidth:c,rightTableWidth:d,windowHeight:g,footerHeight:w(()=>Mo({height:e.footerHeight})),emptyStyle:w(()=>({top:fn(i(f)),bottom:fn(e.footerHeight),width:fn(e.width)})),rootStyle:m,headerHeight:f}};function hY(e){const t=D(),n=D(),a=D(),{columns:l,columnsStyles:o,columnsTotalWidth:s,fixedColumnsOnLeft:r,fixedColumnsOnRight:u,hasFixedColumns:c,mainColumns:d,onColumnSorted:f}=uY(e,Ot(e,"columns"),Ot(e,"fixed")),{scrollTo:v,scrollToLeft:g,scrollToTop:m,scrollToRow:p,onScroll:h,onVerticalScroll:b,scrollPos:y}=cY(e,{mainTableRef:t,leftTableRef:n,rightTableRef:a,onMaybeEndReached:ae}),C=he("table-v2"),S=ht(),k=Et(!1),{expandedRowKeys:E,lastRenderedRowIndex:N,isDynamic:x,isResetting:$,rowHeights:T,resetAfterIndex:P,onRowExpanded:M,onRowHeightChange:L,onRowHovered:Y,onRowsRendered:B}=dY(e,{mainTableRef:t,leftTableRef:n,rightTableRef:a,tableInstance:S,ns:C,isScrolling:k}),{data:F,depthMap:V}=fY(e,{expandedRowKeys:E,lastRenderedRowIndex:N,resetAfterIndex:P}),A=w(()=>{const{estimatedRowHeight:le,rowHeight:se}=e,de=i(F);return He(le)?Object.values(i(T)).reduce((be,we)=>be+we,0):de.length*se}),{bodyWidth:z,fixedTableHeight:R,mainTableHeight:W,leftTableWidth:q,rightTableWidth:J,windowHeight:Z,footerHeight:Q,emptyStyle:ee,rootStyle:ie,headerHeight:ve}=vY(e,{columnsTotalWidth:s,fixedColumnsOnLeft:r,fixedColumnsOnRight:u,rowsHeight:A}),pe=D(),re=w(()=>{const le=i(F).length===0;return me(e.fixedData)?e.fixedData.length===0&&le:le});function _(le){const{estimatedRowHeight:se,rowHeight:de,rowKey:be}=e;return se?i(T)[i(F)[le][be]]||se:de}const U=D(!1);function ae(){const{onEndReached:le}=e;if(!le)return;const{scrollTop:se}=i(y),de=i(A),be=de-(se+i(Z))+e.hScrollbarSize;!U.value&&i(N)>=0&&de<=se+i(W)-i(ve)?(U.value=!0,le(be)):U.value=!1}return fe(()=>i(A),()=>U.value=!1),fe(()=>e.expandedRowKeys,le=>E.value=le,{deep:!0}),{columns:l,containerRef:pe,mainTableRef:t,leftTableRef:n,rightTableRef:a,isDynamic:x,isResetting:$,isScrolling:k,hasFixedColumns:c,columnsStyles:o,columnsTotalWidth:s,data:F,expandedRowKeys:E,depthMap:V,fixedColumnsOnLeft:r,fixedColumnsOnRight:u,mainColumns:d,bodyWidth:z,emptyStyle:ee,rootStyle:ie,footerHeight:Q,mainTableHeight:W,fixedTableHeight:R,leftTableWidth:q,rightTableWidth:J,showEmpty:re,getRowHeight:_,onColumnSorted:f,onRowHovered:Y,onRowExpanded:M,onRowsRendered:B,onRowHeightChange:L,scrollTo:v,scrollToLeft:g,scrollToTop:m,scrollToRow:p,onScroll:h,onVerticalScroll:b}}const Sm=Symbol("tableV2"),D2="tableV2GridScrollLeft",mY=ue({name:"ElTableV2Header",props:wm,setup(e,{slots:t,expose:n}){const a=he("table-v2"),l=ze(D2),o=D(),s=w(()=>Mo({width:e.width,height:e.height})),r=w(()=>Mo({width:e.rowWidth,height:e.height})),u=w(()=>Dn(i(e.headerHeight))),c=v=>{const g=i(o);Ae(()=>{g!=null&&g.scroll&&g.scroll({left:v})})},d=()=>{const v=a.e("fixed-header-row"),{columns:g,fixedHeaderData:m,rowHeight:p}=e;return m==null?void 0:m.map((h,b)=>{var C;const y=Mo({height:p,width:"100%"});return(C=t.fixed)==null?void 0:C.call(t,{class:v,columns:g,rowData:h,rowIndex:-(b+1),style:y})})},f=()=>{const v=a.e("dynamic-header-row"),{columns:g}=e;return i(u).map((m,p)=>{var b;const h=Mo({width:"100%",height:m});return(b=t.dynamic)==null?void 0:b.call(t,{class:v,columns:g,headerIndex:p,style:h})})};return Kl(()=>{l!=null&&l.value&&c(l.value)}),n({scrollToLeft:c}),()=>{if(!(e.height<=0))return j("div",{ref:o,class:e.class,style:i(s),role:"rowgroup"},[j("div",{style:i(r),class:a.e("header")},[f(),d()])])}}}),gY="ElTableV2Grid",bY=e=>{const t=D(),n=D(),a=D(0),l=w(()=>{const{data:h,rowHeight:b,estimatedRowHeight:y}=e;if(!y)return h.length*b}),o=w(()=>{const{fixedData:h,rowHeight:b}=e;return((h==null?void 0:h.length)||0)*b}),s=w(()=>gc(e.headerHeight)),r=w(()=>{const{height:h}=e;return Math.max(0,h-i(s)-i(o))}),u=w(()=>i(s)+i(o)>0),c=({data:h,rowIndex:b})=>h[b][e.rowKey];function d({rowCacheStart:h,rowCacheEnd:b,rowVisibleStart:y,rowVisibleEnd:C}){var S;(S=e.onRowsRendered)==null||S.call(e,{rowCacheStart:h,rowCacheEnd:b,rowVisibleStart:y,rowVisibleEnd:C})}function f(h,b){var y;(y=n.value)==null||y.resetAfterRowIndex(h,b)}function v(h,b){const y=i(t),C=i(n);rt(h)?(y==null||y.scrollToLeft(h.scrollLeft),a.value=h.scrollLeft,C==null||C.scrollTo(h)):(y==null||y.scrollToLeft(h),a.value=h,C==null||C.scrollTo({scrollLeft:h,scrollTop:b}))}function g(h){var b;(b=i(n))==null||b.scrollTo({scrollTop:h})}function m(h,b){const y=i(n);if(!y)return;const C=a.value;y.scrollToItem(h,0,b),C&&v({scrollLeft:C})}function p(){var h,b;(h=i(n))==null||h.$forceUpdate(),(b=i(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:p,fixedRowHeight:o,gridHeight:r,hasHeader:u,headerHeight:s,headerRef:t,totalHeight:l,itemKey:c,onItemRendered:d,resetAfterRowIndex:f,scrollTo:v,scrollToTop:g,scrollToRow:m,scrollLeft:a}},Cm=ue({name:gY,props:mc,setup(e,{slots:t,expose:n}){const{ns:a}=ze(Sm),{bodyRef:l,fixedRowHeight:o,gridHeight:s,hasHeader:r,headerRef:u,headerHeight:c,totalHeight:d,forceUpdate:f,itemKey:v,onItemRendered:g,resetAfterRowIndex:m,scrollTo:p,scrollToTop:h,scrollToRow:b,scrollLeft:y}=bY(e);Tt(D2,y),Zi(async()=>{var k;await Ae();const S=(k=l.value)==null?void 0:k.states.scrollTop;S&&h(Math.round(S)+1)}),n({forceUpdate:f,totalHeight:d,scrollTo:p,scrollToTop:h,scrollToRow:b,resetAfterRowIndex:m});const C=()=>e.bodyWidth;return()=>{const{cache:S,columns:k,data:E,fixedData:N,useIsScrolling:x,scrollbarAlwaysOn:$,scrollbarEndGap:T,scrollbarStartGap:P,style:M,rowHeight:L,bodyWidth:Y,estimatedRowHeight:B,headerWidth:F,height:V,width:A,getRowHeight:z,onScroll:R}=e,W=He(B),q=W?zB:DB,J=i(c);return j("div",{role:"table",class:[a.e("table"),e.class],style:M},[j(q,{ref:l,data:E,useIsScrolling:x,itemKey:v,columnCache:0,columnWidth:W?C:Y,totalColumn:1,totalRow:E.length,rowCache:S,rowHeight:W?z:L,width:A,height:i(s),class:a.e("body"),role:"rowgroup",scrollbarStartGap:P,scrollbarEndGap:T,scrollbarAlwaysOn:$,onScroll:R,onItemRendered:g,perfMode:!1},{default:Z=>{var ee;const Q=E[Z.rowIndex];return(ee=t.row)==null?void 0:ee.call(t,{...Z,columns:k,rowData:Q})}}),i(r)&&j(mY,{ref:u,class:a.e("header-wrapper"),columns:k,headerData:E,headerHeight:e.headerHeight,fixedHeaderData:N,rowWidth:F,rowHeight:L,width:A,height:Math.min(J+i(o),V)},{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 j(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 j(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 j(Cm,pt({ref:n},a),kY(t)?t:{default:()=>[t]})},xY=e=>{const{isScrolling:t}=ze(Sm),n=D(!1),a=D(),l=w(()=>He(e.estimatedRowHeight)&&e.rowIndex>=0),o=(u=!1)=>{const c=i(a);if(!c)return;const{columns:d,onRowHeightChange:f,rowKey:v,rowIndex:g,style:m}=e,{height:p}=c.getBoundingClientRect();n.value=!0,Ae(()=>{if(u||p!==Number.parseInt(m.height)){const h=d[0],b=(h==null?void 0:h.placeholderSign)===Yi;f==null||f({rowKey:v,height:p,rowIndex:g},h&&!b&&h.fixed)}})},s=w(()=>{const{rowData:u,rowIndex:c,rowKey:d,onRowHover:f}=e,v=e.rowEventHandlers||{},g={};return Object.entries(v).forEach(([m,p])=>{We(p)&&(g[m]=h=>{p({event:h,rowData:u,rowIndex:c,rowKey:d})})}),f&&[{name:"onMouseleave",hovered:!1},{name:"onMouseenter",hovered:!0}].forEach(({name:m,hovered:p})=>{const h=g[m];g[m]=b=>{f({event:b,hovered:p,rowData:u,rowIndex:c,rowKey:d}),h==null||h(b)}}),g}),r=u=>{const{onRowExpand:c,rowData:d,rowIndex:f,rowKey:v}=e;c==null||c({expanded:u,rowData:d,rowIndex:f,rowKey:v})};return mt(()=>{i(l)&&o(!0)}),{isScrolling:t,measurable:l,measured:n,rowRef:a,eventHandlers:s,onExpand:r}},TY=ue({name:"ElTableV2TableRow",props:cs,setup(e,{expose:t,slots:n,attrs:a}){const{eventHandlers:l,isScrolling:o,measurable:s,measured:r,rowRef:u,onExpand:c}=xY(e);return t({onExpand:c}),()=>{const{columns:d,columnsStyles:f,expandColumnKey:v,depth:g,rowData:m,rowIndex:p,style:h}=e;let b=d.map((y,C)=>{const S=me(m.children)&&m.children.length>0&&y.key===v;return n.cell({column:y,columns:d,columnIndex:C,depth:g,style:f[y.key],rowData:m,rowIndex:p,isScrolling:i(o),expandIconProps:S?{rowData:m,rowIndex:p,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:p,isScrolling:i(o)})),i(s)){const{height:y,...C}=h||{},S=i(r);return j("div",pt({ref:u,class:e.class,style:S?h:C,role:"row"},a,i(l)),[b])}return j("div",pt(a,{ref:u,class:e.class,style:h,role:"row"},i(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:r,hasFixedColumns:u,rowData:c,rowIndex:d,style:f,isScrolling:v,rowProps:g,rowClass:m,rowKey:p,rowEventHandlers:h,ns:b,onRowHovered:y,onRowExpanded:C}=e,S=Os(m,{columns:n,rowData:c,rowIndex:d},""),k=Os(g,{columns:n,rowData:c,rowIndex:d}),E=c[p],N=l[E]||0,x=!!o,$=d<0,T=[b.e("row"),S,b.is("expanded",x&&s.includes(E)),b.is("fixed",!N&&$),b.is("customized",!!t.row),{[b.e(`row-depth-${N}`)]:x&&d>=0}],P=u?y:void 0,M={...k,columns:n,columnsStyles:a,class:T,depth:N,expandColumnKey:o,estimatedRowHeight:$?void 0:r,isScrolling:v,rowIndex:d,rowData:c,rowKey:E,rowEventHandlers:h,style:f};return j(TY,pt(M,{onRowExpand:C,onMouseenter:B=>{P==null||P({hovered:!0,rowKey:E,event:B,rowData:c,rowIndex:d})},onMouseleave:B=>{P==null||P({hovered:!1,rowKey:E,event:B,rowData:c,rowIndex:d})},rowkey:E}),$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 j("div",{class:e.class,title:l,style:a},[o])};km.displayName="ElTableV2Cell";km.inheritAttrs=!1;const V2=e=>{const{expanded:t,expandable:n,onExpand:a,style:l,size:o,ariaLabel:s}=e,r={onClick:n?()=>a(!t):void 0,ariaLabel:s,ariaExpanded:t,class:e.class};return j("button",pt(r,{type:"button"}),[j(Be,{size:o,style:l},{default:()=>[j(ra,null,null)]})])};V2.inheritAttrs=!1;const xv=({columns:e,column:t,columnIndex:n,depth:a,expandIconProps:l,isScrolling:o,rowData:s,rowIndex:r,style:u,expandedRowKeys:c,ns:d,t:f,cellProps:v,expandColumnKey:g,indentSize:m,iconSize:p,rowKey:h},{slots:b})=>{const y=Mo(u);if(t.placeholderSign===Yi)return j("div",{class:d.em("row-cell","placeholder"),style:y},null);const{cellRenderer:C,dataKey:S,dataGetter:k}=t,E=We(k)?k({columns:e,column:t,columnIndex:n,rowData:s,rowIndex:r}):Sn(s,S??""),N=Os(v,{cellData:E,columns:e,column:t,columnIndex:n,rowIndex:r,rowData:s}),x={class:d.e("cell-text"),columns:e,column:t,columnIndex:n,cellData:E,isScrolling:o,rowData:s,rowIndex:r},$=L2(C),T=$?$(x):ne(b,"default",x,()=>[j(km,x,null)]),P=[d.e("row-cell"),t.class,t.align==="center"&&d.is("align-center"),t.align==="right"&&d.is("align-right")],M=r>=0&&g&&t.key===g,L=r>=0&&c.includes(s[h]);let Y;const B=`margin-inline-start: ${a*m}px;`;return M&&(rt(l)?Y=j(V2,pt(l,{class:[d.e("expand-icon"),d.is("expanded",L)],size:p,expanded:L,ariaLabel:f(L?"el.table.collapseRowLabel":"el.table.expandRowLabel"),style:B,expandable:!0}),null):Y=j("div",{style:[B,`width: ${p}px; height: ${p}px;`].join(" ")},null)),j("div",pt({class:P,style:y},N,{role:"cell"}),[Y,T])};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((r,u)=>t.cell({columns:n,column:r,columnIndex:u,headerIndex:l,style:a[r.key]}));return t.header&&(s=t.header({cells:s.map(r=>me(r)&&r.length===1?r[0]:r),columns:n,headerIndex:l})),j("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:r})=>{const u={columns:e,headerIndex:n},c=[s.e("header-row"),Os(l,u,""),s.is("customized",!!r.header)],d={...Os(o,u),columnsStyles:t,class:c,columns:e,headerIndex:n,style:a};return j(MY,d,PY(r)?r:{default:()=>[r]})},Em=(e,{slots:t})=>ne(t,"default",e,()=>{var n,a;return[j("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 j("button",{type:"button","aria-label":e.ariaLabel,class:e.class},[j(Be,{size:14},{default:()=>[j(t==="asc"?L_:__,null,null)]})])},d0=(e,{slots:t})=>{const{column:n,ns:a,t:l,style:o,onColumnSorted:s}=e,r=Mo(o);if(n.placeholderSign===Yi)return j("div",{class:a.em("header-row-cell","placeholder"),style:r},null);const{headerCellRenderer:u,headerClass:c,sortable:d}=n,f={...e,class:a.e("header-cell-text")},v=L2(u),g=v?v(f):ne(t,"default",f,()=>[j(Em,f,null)]),{sortBy:m,sortState:p,headerCellProps:h}=e;let b,y,C;if(p){const E=p[n.key];b=!!Ev[E],y=b?E:"asc"}else b=n.key===m.key,y=b?m.order:"asc";y==="asc"?C="ascending":y==="desc"?C="descending":C=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")],k={...Os(h,e),onClick:n.sortable?s:void 0,ariaSort:d?C:void 0,class:S,style:r,"data-key":n.key};return j("div",pt(k,{role:"columnheader"}),[g,d&&j(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 j("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",{},()=>[j(d2,null,null)]);return j("div",{class:e.class,style:e.style},[n])};F2.displayName="ElTableV2Empty";const z2=(e,{slots:t})=>{var n;return j("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:r,mainColumns:u,mainTableHeight:c,fixedTableHeight:d,leftTableWidth:f,rightTableWidth:v,data:g,depthMap:m,expandedRowKeys:p,hasFixedColumns:h,mainTableRef:b,leftTableRef:y,rightTableRef:C,isDynamic:S,isResetting:k,isScrolling:E,bodyWidth:N,emptyStyle:x,rootStyle:$,footerHeight:T,showEmpty:P,scrollTo:M,scrollToLeft:L,scrollToTop:Y,scrollToRow:B,getRowHeight:F,onColumnSorted:V,onRowHeightChange:A,onRowHovered:z,onRowExpanded:R,onRowsRendered:W,onScroll:q,onVerticalScroll:J}=hY(e);return n({scrollTo:M,scrollToLeft:L,scrollToTop:Y,scrollToRow:B}),Tt(Sm,{ns:a,isResetting:k,isScrolling:E}),()=>{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=i(g),nt={cache:Z,class:a.e("main"),columns:i(u),data:lt,fixedData:ve,estimatedRowHeight:ee,bodyWidth:i(N),headerHeight:pe,headerWidth:i(N),height:i(c),mainTableRef:b,rowKey:we,rowHeight:se,scrollbarAlwaysOn:Ce,scrollbarStartGap:2,scrollbarEndGap:Le,useIsScrolling:ke,width:qe,getRowHeight:F,onRowsRendered:W,onScroll:q},Ze=i(f),kt=i(d),Rt={cache:Z,class:a.e("left"),columns:i(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:F,onScroll:J},Lt=i(v),_t={cache:Z,class:a.e("right"),columns:i(r),data:lt,fixedData:ve,estimatedRowHeight:ee,rightTableRef:C,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:F,onScroll:J},jt=i(o),Yt={ns:a,depthMap:i(m),columnsStyles:jt,expandColumnKey:ie,expandedRowKeys:i(p),estimatedRowHeight:ee,hasFixedColumns:i(h),rowProps:Oe,rowClass:de,rowKey:we,rowEventHandlers:be,onRowHovered:z,onRowExpanded:R,onRowHeightChange:A},xe={cellProps:Q,expandColumnKey:ie,indentSize:Pe,iconSize:ge,rowKey:we,expandedRowKeys:i(p),ns:a,t:l},Ee={ns:a,headerClass:re,headerProps:_,columnsStyles:jt},Ke={ns:a,t:l,sortBy:ae,sortState:le,headerCellProps:U,onColumnSorted:V},Xe={row:Ie=>j(OY,pt(Ie,Yt),{row:t.row,cell:Ue=>{let at;return t.cell?j(xv,pt(Ue,xe,{style:jt[Ue.column.key]}),Wr(at=t.cell(Ue))?at:{default:()=>[at]}):j(xv,pt(Ue,xe,{style:jt[Ue.column.key]}),null)}}),header:Ie=>j(IY,pt(Ie,Ee),{header:t.header,cell:Ue=>{let at;return t["header-cell"]?j(d0,pt(Ue,Ke,{style:jt[Ue.column.key]}),Wr(at=t["header-cell"](Ue))?at:{default:()=>[at]}):j(d0,pt(Ue,Ke,{style:jt[Ue.column.key]}),null)}})},Bt=[e.class,a.b(),a.e("root"),a.is("dynamic",i(S))],ce={class:a.e("footer"),style:i(T)};return j("div",{class:Bt,style:i($)},[j(wY,nt,Wr(Xe)?Xe:{default:()=>[Xe]}),j(CY,Rt,Wr(Xe)?Xe:{default:()=>[Xe]}),j(EY,_t,Wr(Xe)?Xe:{default:()=>[Xe]}),t.footer&&j(B2,ce,{default:t.footer}),i(P)&&j(F2,{class:a.e("empty"),style:i(x)},{default:t.empty}),t.overlay&&j(z2,{class:a.e("overlay")},{default:t.overlay})])}}}),AY=$e({disableWidth:Boolean,disableHeight:Boolean,onResize:{type:G(Function)}}),LY=e=>{const t=D(),n=D(0),a=D(0);let l;return mt(()=>{l=on(t,([o])=>{const{width:s,height:r}=o.contentRect,{paddingLeft:u,paddingRight:c,paddingTop:d,paddingBottom:f}=getComputedStyle(o.target),v=Number.parseInt(u)||0,g=Number.parseInt(c)||0,m=Number.parseInt(d)||0,p=Number.parseInt(f)||0;n.value=s-v-g,a.value=r-m-p}).stop}),zt(()=>{l==null||l()}),fe([n,a],([o,s])=>{var r;(r=e.onResize)==null||r.call(e,{width:o,height:s})}),{sizer:t,width:n,height:a}},DY=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 r;return j("div",{ref:o,class:n.b(),style:s},[(r=t.default)==null?void 0:r.call(t,{height:a.value,width:l.value})])}}}),VY=ut(_Y),BY=ut(DY),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=ze(pf);a||rn(f0,"");const l=he("tabs"),o=D(),s=D(),r=D(!1),u=w(()=>r.value?s.value:{...s.value,transition:"none"}),c=w(()=>{var p;return xt(a.props.defaultValue)||!!((p=s.value)!=null&&p.transform)}),d=()=>{let p=0,h=0;const b=["top","bottom"].includes(a.props.tabPosition)?"width":"height",y=b==="width"?"x":"y",C=y==="x"?"left":"top";return n.tabs.every(S=>{if(xt(S.paneName))return!1;const k=n.tabRefs[S.paneName];if(!k)return!1;if(!S.active)return!0;p=k[`offset${_f(C)}`],h=k[`client${_f(b)}`];const E=window.getComputedStyle(k);return b==="width"&&(h-=Number.parseFloat(E.paddingLeft)+Number.parseFloat(E.paddingRight),p+=Number.parseFloat(E.paddingLeft)),!1}),{[b]:`${h}px`,transform:`translate${_f(y)}(${p}px)`}},f=()=>{s.value=d(),r.value||Wn(()=>Wn(()=>{r.value=!0}))},v=[],g=()=>{v.forEach(p=>p.stop()),v.length=0,Object.values(n.tabRefs).forEach(p=>{v.push(on(p,f))})};fe(()=>n.tabs,async()=>{await Ae(),f(),g()},{immediate:!0});const m=on(o,()=>f());return zt(()=>{v.forEach(p=>p.stop()),v.length=0,m.stop()}),t({ref:o,update:f}),(p,h)=>(O(),H("div",{ref_key:"barRef",ref:o,class:I([i(l).e("active-bar"),i(l).is(i(a).props.tabPosition),i(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=D(!1),s=w(()=>Math.max(n.value-a.value,0));let r,u;const c=v=>{if(!e.value||v.touches.length!==1)return;const{clientX:g,clientY:m}=ed(v);r={startX:g,startY:m,startOffset:t.value},u=void 0},d=v=>{if(!r||!e.value)return;if(v.touches.length!==1){f();return}const{clientX:g,clientY:m}=ed(v),p=r.startX-g,h=r.startY-m,b=l.value?p:h,y=l.value?h:p,C=Math.abs(b),S=Math.abs(y);if(qw(u)){if(Math.max(C,S)<=KY)return;u=C>S}if(!u)return;const k=ya(r.startOffset+b,0,s.value);s.value<=0||k===t.value||!v.cancelable||(v.preventDefault(),o.value=!0,t.value=k)},f=()=>{r=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=ze(pf);a||rn(p0,"");const l=he("tabs"),o=oR(),s=iR(),r=D(),u=D(),c=D(),d=D({}),f=D(),v=D(!1),g=D(0),m=D(!1),p=D(!0),h=D(!1),b=Et(),y=w(()=>["top","bottom"].includes(a.props.tabPosition)),C=w(()=>y.value?"width":"height"),S=w(()=>{const ee=C.value==="width"?"X":"Y";return{transition:h.value||L.value?"none":void 0,transform:`translate${ee}(-${g.value}px)`}}),{width:k,height:E}=Ii(r),{width:N,height:x}=Ii(u,{width:0,height:0},{box:"border-box"}),$=w(()=>y.value?k.value:E.value),T=w(()=>y.value?N.value:x.value),{onWheel:P}=ok({atStartEdge:w(()=>g.value<=0),atEndEdge:w(()=>T.value-g.value<=$.value),layout:w(()=>y.value?"horizontal":"vertical")},ee=>{g.value=ya(g.value+ee,0,T.value-$.value)}),M=ee=>{h.value=!0,P(ee),Wn(()=>{h.value=!1})},{isTouchScrolling:L,handleTouchStart:Y,handleTouchMove:B,handleTouchEnd:F}=WY({scrollable:v,navOffset:g,navSize:T,navContainerSize:$,isHorizontal:y}),V=()=>{if(!r.value)return;const ee=r.value.getBoundingClientRect()[C.value],ie=g.value;if(!ie)return;const ve=ie>ee?ie-ee:0;g.value=ve},A=()=>{if(!r.value||!u.value)return;const ee=u.value.getBoundingClientRect()[C.value],ie=r.value.getBoundingClientRect()[C.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(!v.value||!c.value||!r.value||!ee)return;await Ae();const ie=d.value[e.currentName];if(!ie)return;const ve=r.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)},R=()=>{var pe;if(!u.value||!r.value)return;e.stretch&&((pe=f.value)==null||pe.update());const ee=u.value.getBoundingClientRect()[C.value],ie=r.value.getBoundingClientRect()[C.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(),q()},q=()=>{p.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"?p.value=!1:ee==="visible"&&setTimeout(()=>p.value=!0,50)}),fe(s,ee=>{ee?setTimeout(()=>p.value=!0,50):p.value=!1}),on(c,()=>{Wn(R)}),mt(()=>setTimeout(()=>z(),0)),Kl(()=>R()),t({scrollToActiveTab:z,removeFocus:J,focusActiveTab:Q,tabListRef:u,tabBarRef:f,scheduleRender:()=>oi(b)}),()=>{const ee=v.value?[j("span",{class:[l.e("nav-prev"),l.is("disabled",!v.value.prev)],onClick:V},[j(Be,null,{default:()=>[j(ro,null,null)]})]),j("span",{class:[l.e("nav-next"),l.is("disabled",!v.value.next)],onClick:A},[j(Be,null,{default:()=>[j(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?j(Be,{class:"is-icon-close",onClick:Oe=>n("tabRemove",ve,Oe)},{default:()=>[j(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 j("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:()=>q(),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,j("div",{ref:c,class:[l.e("nav-wrap"),l.is("scrollable",!!v.value),l.is(a.props.tabPosition)]},[ee,j("div",{class:l.e("nav-scroll"),ref:r},[e.panes.length>0?j("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:M,onTouchstart:Y,onTouchmove:B,onTouchend:F,onTouchcancel:F},[e.type?null:j(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=>De(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=w(()=>["left","right"].includes(e.tabPosition)),{children:s,addChild:r,removeChild:u,ChildrenSorter:c}=Jd(ht(),"ElTabPane"),d=D(),f=D((xt(e.modelValue)?e.defaultValue:e.modelValue)??"0"),v=async(y,C=!1)=>{var S,k,E,N;if(!(f.value===y||xt(y)))try{let x;if(e.beforeLeave){const $=e.beforeLeave(y,f.value);x=$ instanceof Promise?await $:$}else x=!0;if(x!==!1){const $=(S=s.value.find(T=>T.paneName===f.value))==null?void 0:S.isFocusInsidePane();f.value=y,C&&(t(it,y),t("tabChange",y)),(E=(k=d.value)==null?void 0:k.removeFocus)==null||E.call(k),$&&((N=d.value)==null||N.focusActiveTab())}}catch{}},g=(y,C,S)=>{y.props.disabled||(t("tabClick",y,S),v(C,!0))},m=(y,C)=>{y.props.disabled||xt(y.props.name)||(C.stopPropagation(),t("edit",y.props.name,"remove"),t("tabRemove",y.props.name))},p=()=>{t("edit",void 0,"add"),t("tabAdd")},h=y=>{const C=Gt(y);[ye.enter,ye.numpadEnter].includes(C)&&p()},b=y=>{const C=y.el.firstChild,S=["bottom","right"].includes(e.tabPosition)?y.children[0].el:y.children[1].el;C!==S&&C.before(S)};return fe(()=>e.modelValue,y=>v(y)),fe(f,async()=>{var y;await Ae(),(y=d.value)==null||y.scrollToActiveTab()}),Tt(pf,{props:e,currentName:f,registerPane:r,unregisterPane:u,nav$:d}),a({currentName:f,get tabNavRef(){return _s(d.value,["scheduleRender"])}}),()=>{const y=n["add-icon"],C=e.editable||e.addable?j("div",{class:[l.e("new-tab"),o.value&&l.e("new-tab-vertical")],tabindex:e.tabindex,onClick:p,onKeydown:h},[y?ne(n,"add-icon"):j(Be,{class:l.is("icon-plus")},{default:()=>[j(US,null,null)]})]):null,S=()=>j(YY,{ref:d,currentName:f.value,editable:e.editable,type:e.type,panes:s.value,stretch:e.stretch,onTabClick:g,onTabRemove:m},null),k=j("div",{class:[l.e("header"),o.value&&l.e("header-vertical"),l.is(e.tabPosition)]},[j(c,null,{default:S,$stable:!0}),C]),E=j("div",{class:l.e("content")},[ne(n,"default")]);return j("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},[E,k])}}}),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=ze(pf);l||rn(v0,"usage: ");const o=he("tab-pane"),s=D(),r=D(),u=w(()=>t.closable??l.props.closable),c=w(()=>l.currentName.value===(t.name??r.value)),d=D(c.value),f=w(()=>t.name??r.value),v=w(()=>!t.lazy||d.value||c.value),g=()=>{var p;return(p=s.value)==null?void 0:p.contains(document.activeElement)};fe(c,p=>{p&&(d.value=!0)});const m=Ft({uid:n.uid,getVnode:()=>n.vnode,slots:a,props:t,paneName:f,active:c,index:r,isClosable:u,isFocusInsidePane:g});return l.registerPane(m),zt(()=>{l.unregisterPane(m)}),kd(()=>{var p;a.label&&((p=l.nav$.value)==null||p.scheduleRender())}),(p,h)=>v.value?ft((O(),H("div",{key:0,id:`pane-${f.value}`,ref_key:"paneRef",ref:s,class:I(i(o).b()),role:"tabpanel","aria-hidden":!c.value,"aria-labelledby":`tab-${f.value}`},[ne(p.$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=D(),l=$n(),o=he("text"),s=w(()=>[o.b(),o.m(n.type),o.m(l.value),o.is("truncated",n.truncated),o.is("line-clamp",!xt(n.lineClamp))]),{width:r,height:u}=Ii(a),c=D(!1);let d;const f=()=>{d&&Ra(d),d=Wn(()=>{var v,g,m,p;if(d=void 0,c.value=!1,n.truncated){const h=(v=a.value)==null?void 0:v.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=(p=a.value)==null?void 0:p.scrollHeight;h&&b&&b>h&&(c.value=!0)}})};return fe(()=>[r.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}),(v,g)=>{var m;return O(),oe(dt(e.tag),{ref_key:"textRef",ref:a,class:I(s.value),title:v.$attrs.title??(c.value?(m=a.value)==null?void 0:m.textContent:void 0),style:je({"-webkit-line-clamp":e.lineClamp})},{default:X(()=>[ne(v.$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=D(),s=sn(),{lang:r}=St(),u=(y,C,S,k=!0)=>{const E=ys(y);return!sU(E)||!k&&E.hours===0&&E.minutes===0?(Kt("ElTimeSelect",`invalid ${C}, fallback to default ${C} (${S}).`),S):bc(E)},c=w(()=>a.modelValue),d=w(()=>u(a.start,"start",K2)),f=w(()=>u(a.end,"end",W2)),v=w(()=>{const y=ys(a.minTime||"");return y?bc(y):null}),g=w(()=>{const y=ys(a.maxTime||"");return y?bc(y):null}),m=w(()=>u(a.step,"step",j2,!1)),p=w(()=>{var k;const y=[],C=(E,N)=>{y.push({value:E,rawValue:N,disabled:ip(N,v.value||"-1:-1")<=0||ip(N,g.value||"100:100")>=0})};let S=d.value;for(;ip(S,f.value)<=0;)C(tt(S,"HH:mm").locale(r.value).format(a.format),S),S=rU(S,m.value);return a.includeEndTime&&((k=y[y.length-1])==null?void 0:k.rawValue)!==f.value&&C(tt(f.value,"HH:mm").locale(r.value).format(a.format),f.value),y});return t({blur:()=>{var y,C;(C=(y=o.value)==null?void 0:y.blur)==null||C.call(y)},focus:()=>{var y,C;(C=(y=o.value)==null?void 0:y.focus)==null||C.call(y)}}),(y,C)=>(O(),oe(i(Ko),{ref_key:"select",ref:o,name:e.name,"model-value":c.value,disabled:i(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":C[0]||(C[0]=S=>y.$emit(i("update:modelValue"),S)),onChange:C[1]||(C[1]=S=>y.$emit(i("change"),S)),onBlur:C[2]||(C[2]=S=>y.$emit("blur",S)),onFocus:C[3]||(C[3]=S=>y.$emit("focus",S)),onClear:C[4]||(C[4]=()=>y.$emit("clear"))},{prefix:X(()=>[e.prefixIcon?(O(),oe(i(Be),{key:0,class:I(i(l).e("prefix-icon"))},{default:X(()=>[(O(),oe(dt(e.prefixIcon)))]),_:1},8,["class"])):te("v-if",!0)]),default:X(()=>[(O(!0),H(Fe,null,bt(p.value,S=>(O(),oe(i(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=w(()=>[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}=ze(q2),a=he("timeline-item"),l=w(()=>[a.e("node"),a.em("node",t.size||""),a.em("node",t.type||""),a.is("hollow",t.hollow)]),o=w(()=>[a.b(),{[a.e("center")]:t.center},a.is(n.mode)]);return(s,r)=>(O(),H("li",{class:I(o.value)},[K("div",{class:I(i(a).e("tail"))},null,2),s.$slots.dot?te("v-if",!0):(O(),H("div",{key:0,class:I(l.value),style:je({backgroundColor:e.color})},[e.icon?(O(),oe(i(Be),{key:0,class:I(i(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:I(i(a).e("dot"))},[ne(s.$slots,"dot")],2)):te("v-if",!0),K("div",{class:I(i(a).e("wrapper"))},[!e.hideTimestamp&&e.placement==="top"?(O(),H("div",{key:0,class:I([i(a).e("timestamp"),i(a).is("top")])},Se(e.timestamp),3)):te("v-if",!0),K("div",{class:I(i(a).e("content"))},[ne(s.$slots,"default")],2),!e.hideTimestamp&&e.placement==="bottom"?(O(),H("div",{key:1,class:I([i(a).e("timestamp"),i(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 w(()=>({...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=w(()=>e.data.reduce((a,l)=>(a[l[t.value.key]]=l,a),{}));return{sourceData:w(()=>e.data.filter(a=>!e.modelValue.includes(a[t.value.key]))),targetData:w(()=>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=(r,u,c)=>{n(it,r),n(yt,r,u,c)};return{addToLeft:()=>{const r=e.modelValue.slice();t.rightChecked.forEach(u=>{const c=r.indexOf(u);c>-1&&r.splice(c,1)}),l(r,"left",t.rightChecked)},addToRight:()=>{let r=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]);r=e.targetOrder==="unshift"?u.concat(r):r.concat(u),e.targetOrder==="original"&&(r=e.data.filter(c=>r.includes(c[a.value.key])).map(c=>c[a.value.key])),l(r,"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=w(()=>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=w(()=>l.value.filter(g=>!g[a.value.disabled])),s=w(()=>{const g=t.checked.length,m=e.data.length,{noChecked:p,hasChecked:h}=e.format;return p&&h?g>0?h.replace(/\${checked}/g,g.toString()).replace(/\${total}/g,m.toString()):p.replace(/\${total}/g,m.toString()):`${g}/${m}`}),r=w(()=>{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=D(),{height:f}=Ii(w(()=>{var g;return(g=d.value)==null?void 0:g.$el})),v=D();return fe(()=>t.checked,(g,m)=>{if(u(),t.checkChangeByUser){const p=g.concat(m).filter(h=>!g.includes(h)||!m.includes(h));n($v,g,p)}else n($v,g),t.checkChangeByUser=!0}),fe(o,()=>{u()}),fe(()=>e.data,()=>{const g=[],m=l.value.map(p=>p[a.value.key]);t.checked.forEach(p=>{m.includes(p)&&g.push(p)}),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 p=[],h=o.value.map(b=>b[a.value.key]);g.forEach(b=>{h.includes(b)&&p.push(b)}),t.checkChangeByUser=!1,t.checked=p},{immediate:!0}),fe(()=>t.query,()=>{var g;e.virtualScroll&&((g=v.value)==null||g.scrollToItem(0))},{flush:"post"}),{filteredData:l,checkableData:o,checkedSummary:s,virtualListRef:v,isIndeterminate:r,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:N})=>N,{t:r}=St(),u=he("transfer"),c=Ft({checked:[],allChecked:!1,query:"",checkChangeByUser:!0}),d=Su(a),{filteredData:f,checkedSummary:v,virtualListRef:g,isIndeterminate:m,checkboxGroupRef:p,virtualListHeight:h,handleAllCheckedChange:b}=kU(a,c,l),y=w(()=>!pa(c.query)&&pa(f.value)),C=w(()=>!pa(o.default()[0].children)),{checked:S,allChecked:k,query:E}=Fn(c);return t({query:E}),(N,x)=>(O(),H("div",{class:I(i(u).b("panel"))},[K("p",{class:I(i(u).be("panel","header"))},[j(i(ll),{modelValue:i(k),"onUpdate:modelValue":x[0]||(x[0]=$=>Qt(k)?k.value=$:null),indeterminate:i(m),"validate-event":!1,onChange:i(b)},{default:X(()=>[K("span",{class:I(i(u).be("panel","header-title"))},Se(e.title),3),K("span",{class:I(i(u).be("panel","header-count"))},Se(i(v)),3)]),_:1},8,["modelValue","indeterminate","onChange"])],2),K("div",{class:I([i(u).be("panel","body"),i(u).is("with-footer",C.value)])},[e.filterable?(O(),oe(i(Un),{key:0,modelValue:i(E),"onUpdate:modelValue":x[1]||(x[1]=$=>Qt(E)?E.value=$:null),class:I(i(u).be("panel","filter")),size:"default",placeholder:e.placeholder,"prefix-icon":i(I_),clearable:"","validate-event":!1},null,8,["modelValue","class","placeholder","prefix-icon"])):te("v-if",!0),ft(j(i(tm),{ref_key:"checkboxGroupRef",ref:p,modelValue:i(S),"onUpdate:modelValue":x[2]||(x[2]=$=>Qt(S)?S.value=$:null),"validate-event":!1,class:I([i(u).is("filterable",e.filterable),i(u).be("panel","list")])},{default:X(()=>[e.virtualScroll?(O(),oe(i(bu),{key:1,ref_key:"virtualListRef",ref:g,data:i(f),total:i(f).length,"item-size":e.itemSize,height:i(h)},{default:X(({data:$,index:T,style:P})=>[(O(),H("div",{key:$[T][i(d).key],style:je(P)},[j(i(ll),{class:I(i(u).be("panel","item")),value:$[T][i(d).key],disabled:$[T][i(d).disabled],"validate-event":!1},{default:X(()=>{var M;return[j(s,{option:(M=e.optionRender)==null?void 0:M.call(e,$[T])},null,8,["option"])]}),_:2},1032,["class","value","disabled"])],4))]),_:1},8,["data","total","item-size","height"])):(O(!0),H(Fe,{key:0},bt(i(f),$=>(O(),oe(i(ll),{key:$[i(d).key],class:I(i(u).be("panel","item")),value:$[i(d).key],disabled:$[i(d).disabled],"validate-event":!1},{default:X(()=>{var T;return[j(s,{option:(T=e.optionRender)==null?void 0:T.call(e,$)},null,8,["option"])]}),_:2},1032,["class","value","disabled"]))),128))]),_:1},8,["modelValue","class"]),[[At,!y.value&&!i(pa)(e.data)]]),ft(K("div",{class:I(i(u).be("panel","empty"))},[ne(N.$slots,"empty",{},()=>[st(Se(y.value?i(r)("el.transfer.noMatch"):i(r)("el.transfer.noData")),1)])],2),[[At,y.value||i(pa)(e.data)]])],2),C.value?(O(),H("p",{key:0,class:I(i(u).be("panel","footer"))},[ne(N.$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(),r=he("transfer"),{formItem:u}=Kn(),c=Ft({leftChecked:[],rightChecked:[]}),d=Su(a),{sourceData:f,targetData:v}=yU(a),{onSourceCheckedChange:g,onTargetCheckedChange:m}=bU(c,l),{addToLeft:p,addToRight:h}=wU(a,c,l),b=D(),y=D(),C=$=>{switch($){case"left":b.value.query="";break;case"right":y.value.query=""}},S=w(()=>a.buttonTexts.length===2),k=w(()=>a.titles[0]||s("el.transfer.titles.0")),E=w(()=>a.titles[1]||s("el.transfer.titles.1")),N=w(()=>a.filterPlaceholder||s("el.transfer.filterPlaceholder"));fe(()=>a.modelValue,()=>{var $;a.validateEvent&&(($=u==null?void 0:u.validate)==null||$.call(u,"change").catch(vt))});const x=w(()=>$=>{var P;if(a.renderContent)return a.renderContent(Ge,$);const T=(((P=o.default)==null?void 0:P.call(o,{option:$}))||[]).filter(M=>M.type!==Cn);return T.length?T:Ge("span",$[d.value.label]||$[d.value.key])});return t({clearQuery:C,leftPanel:b,rightPanel:y}),($,T)=>(O(),H("div",{class:I(i(r).b())},[j(m0,{ref_key:"leftPanel",ref:b,data:i(f),"option-render":x.value,placeholder:N.value,title:k.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:i(g)},{empty:X(()=>[ne($.$slots,"left-empty")]),default:X(()=>[ne($.$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:I(i(r).e("buttons"))},[j(i(Bn),{type:"primary",class:I([i(r).e("button"),i(r).is("with-texts",S.value)]),disabled:i(pa)(c.rightChecked),onClick:i(p)},{default:X(()=>[j(i(Be),null,{default:X(()=>[j(i(ro))]),_:1}),i(xt)(e.buttonTexts[0])?te("v-if",!0):(O(),H("span",xU,Se(e.buttonTexts[0]),1))]),_:1},8,["class","disabled","onClick"]),j(i(Bn),{type:"primary",class:I([i(r).e("button"),i(r).is("with-texts",S.value)]),disabled:i(pa)(c.leftChecked),onClick:i(h)},{default:X(()=>[i(xt)(e.buttonTexts[1])?te("v-if",!0):(O(),H("span",TU,Se(e.buttonTexts[1]),1)),j(i(Be),null,{default:X(()=>[j(i(ra))]),_:1})]),_:1},8,["class","disabled","onClick"])],2),j(m0,{ref_key:"rightPanel",ref:y,data:i(v),"option-render":x.value,placeholder:N.value,filterable:e.filterable,format:e.format,"filter-method":e.filterMethod,title:E.value,"default-checked":e.rightDefaultChecked,props:a.props,"virtual-scroll":e.virtualScroll,"item-size":e.itemSize,onCheckedChange:i(m)},{empty:X(()=>[ne($.$slots,"right-empty")]),default:X(()=>[ne($.$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)Dt(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 r=this.childNodes;for(let f=0,v=r.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 r=o[Z2];r&&n.some(u=>(u==null?void 0:u.$treeNodeId)===r)?a[r]={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)Dt(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,r]of o.entries())r.visible=!!(t!=null&&t.call(r,e,r.data,r)),s%80===0&&s>0&&await Ae(),await a(r);if(!l.visible&&o.length){let s=!0;s=!o.some(r=>r.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)Dt(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;lr.level-u.level),l=Object.create(null),o=Object.keys(n);a.forEach(r=>r.setChecked(!1,!1));const s=r=>{r.childNodes.forEach(u=>{var c;l[u.data[e]]=!0,(c=u.childNodes)!=null&&c.length&&s(u)})};for(let r=0,u=a.length;r{g.isLeaf||g.setChecked(!1,!1,!0),f(g)}),v.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=ze(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=D({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 v=f,g=s.value.dropNode;g&&g.node.id!==v.node.id&&sa(g.$el,o.is("drop-inner"));const m=s.value.draggingNode;if(!m||!v)return;let p=!0,h=!0,b=!0,y=!0;We(e.allowDrop)&&(p=e.allowDrop(m.node,v.node,"prev"),y=h=e.allowDrop(m.node,v.node,"inner"),b=e.allowDrop(m.node,v.node,"next")),d.dataTransfer.dropEffect=h||p||b?"move":"none",(p||h||b)&&(g==null?void 0:g.node.id)!==v.node.id&&(g&&t.emit("node-drag-leave",m.node,g.node,d),t.emit("node-drag-enter",m.node,v.node,d)),p||h||b?s.value.dropNode=v:s.value.dropNode=null,v.node.nextSibling===m.node&&(b=!1),v.node.previousSibling===m.node&&(p=!1),v.node.contains(m.node,!1)&&(h=!1),(m.node===v.node||m.node.contains(v.node))&&(p=!1,h=!1,b=!1);const C=v.$el,S=C.querySelector(`.${o.be("node","content")}`).getBoundingClientRect(),k=n.value.getBoundingClientRect(),E=n.value.scrollTop;let N;const x=p?h?.25:b?.45:1:Number.NEGATIVE_INFINITY,$=b?h?.75:p?.55:0:Number.POSITIVE_INFINITY;let T=-9999;const P=d.clientY-S.top;PS.height*$?N="after":h?N="inner":N="none";const M=C.querySelector(`.${o.be("node","expand-icon")}`).getBoundingClientRect(),L=a.value;N==="before"?T=M.top-k.top+E:N==="after"&&(T=M.bottom-k.top+E),L.style.top=`${T}px`,L.style.left=`${M.right-k.left}px`,N==="inner"?Va(C,o.is("drop-inner")):sa(C,o.is("drop-inner")),s.value.showDropIndicator=N==="before"||N==="after",s.value.allowDrop=s.value.showDropIndicator||y,s.value.dropType=N,t.emit("node-drag-over",m.node,v.node,d)},treeNodeDragEnd:d=>{var m,p;const{draggingNode:f,dropType:v,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};v!=="none"&&f.node.remove(),v==="before"?(m=g.node.parent)==null||m.insertBefore(h,g.node):v==="after"?(p=g.node.parent)==null||p.insertAfter(h,g.node):v==="inner"&&g.node.insertChild(h),v!=="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,v,d),v!=="none"&&t.emit("node-drop",f.node,g.node,v,d)}f&&!g&&t.emit("node-drag-end",f.node,null,v,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=ze(X2),a=ze(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=ze(Tm),o=D(!1),s=D(!1),r=D(),u=D(),c=D(),d=ze(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 v=l.props.props.children||"children";fe(()=>{var T;const $=(T=e.node.data)==null?void 0:T[v];return $&&[...$]},()=>{e.node.updateChildren()}),fe(()=>e.node.indeterminate,$=>{p(e.node.checked,$)}),fe(()=>e.node.checked,$=>{p($,e.node.indeterminate)}),fe(()=>e.node.childNodes.length,()=>e.node.reInitChecked()),fe(()=>e.node.expanded,$=>{Ae(()=>o.value=$),$&&(s.value=!0)});const g=$=>l.props.nodeKey?$m(l.props.nodeKey,$.data):$.id,m=$=>{const T=e.props.class;if(!T)return{};let P;if(We(T)){const{data:M}=$;P=T(M,$)}else P=T;return De(P)?{[P]:!0}:P},p=($,T)=>{(r.value!==$||u.value!==T)&&l.ctx.emit("check-change",e.node.data,$,T),r.value=$,u.value=T},h=$=>{Ov(l.store,l.ctx.emit,()=>{var T;if((T=l==null?void 0:l.props)!=null&&T.nodeKey){const P=g(e.node);l.store.value.setCurrentNodeKey(P)}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&&C(!e.node.checked),l.ctx.emit("node-click",e.node.data,e.node,f,$)},b=$=>{var T;(T=l.instance.vnode.props)!=null&&T.onNodeContextmenu&&($.stopPropagation(),$.preventDefault()),l.ctx.emit("node-contextmenu",$,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)}))},C=$=>{const T=l==null?void 0:l.props.checkStrictly,P=e.node.childNodes;!T&&P.length&&($=P.some(M=>!M.isEffectivelyChecked)),e.node.setChecked($,!T),Ae(()=>{const M=l.store.value;l.ctx.emit("check",e.node.data,{checkedNodes:M.getCheckedNodes(),checkedKeys:M.getCheckedKeys(),halfCheckedNodes:M.getHalfCheckedNodes(),halfCheckedKeys:M.getHalfCheckedKeys()})})};return{ns:n,node$:c,tree:l,expanded:o,childNodeRendered:s,oldChecked:r,oldIndeterminate:u,getNodeKey:g,getNodeClass:m,handleSelectChange:p,handleClick:h,handleContextMenu:b,handleExpandIconClick:y,handleCheckChange:C,handleChildNodeExpand:($,T,P)=>{a(T),l.ctx.emit("node-expand",$,T,P)},handleDragStart:$=>{l.props.draggable&&d.treeNodeDragStart({event:$,treeNode:e})},handleDragOver:$=>{$.preventDefault(),l.props.draggable&&d.treeNodeDragOver({event:$,treeNode:{$el:c.value,node:e.node}})},handleDrop:$=>{$.preventDefault()},handleDragEnd:$=>{l.props.draggable&&d.treeNodeDragEnd($)},CaretRight:qS}}});const DU=["aria-expanded","aria-disabled","aria-checked","draggable","data-key"],VU=["aria-expanded"];function BU(e,t,n,a,l,o){const s=Pt("el-icon"),r=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:I([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((...v)=>e.handleClick&&e.handleClick(...v),["stop"])),onContextmenu:t[3]||(t[3]=(...v)=>e.handleContextMenu&&e.handleContextMenu(...v)),onDragstart:t[4]||(t[4]=Je((...v)=>e.handleDragStart&&e.handleDragStart(...v),["stop"])),onDragover:t[5]||(t[5]=Je((...v)=>e.handleDragOver&&e.handleDragOver(...v),["stop"])),onDragend:t[6]||(t[6]=Je((...v)=>e.handleDragEnd&&e.handleDragEnd(...v),["stop"])),onDrop:t[7]||(t[7]=Je((...v)=>e.handleDrop&&e.handleDrop(...v),["stop"]))},[K("div",{class:I(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:I([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(r,{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:I([e.ns.be("node","loading-icon"),e.ns.is("loading")])},{default:X(()=>[j(u)]),_:1},8,["class"])):te("v-if",!0),j(c,{node:e.node,"render-content":e.renderContent},null,8,["node","render-content"])],6),j(f,null,{default:X(()=>[!e.renderAfterExpand||e.childNodeRendered?ft((O(),H("div",{key:0,class:I(e.ns.be("node","children")),role:"group","aria-expanded":e.expanded,onClick:t[1]||(t[1]=Je(()=>{},["stop"]))},[(O(!0),H(Fe,null,bt(e.node.childNodes,v=>(O(),oe(d,{key:e.getNodeKey(v),"render-content":e.renderContent,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,node:v,accordion:e.accordion,props:e.props,onNodeExpand:e.handleChildNodeExpand},null,8,["render-content","render-after-expand","show-checkbox","node","accordion","props","onNodeExpand"]))),128))],10,VU)),[[At,e.expanded]]):te("v-if",!0)]),_:1})],42,DU)),[[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(r=>{r.setAttribute("tabindex","-1")})});function a(s,r){var c,d;const u=t.value.getNode(s[r].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 r=s.target;if(!r.className.includes(n.b("node")))return;const u=Gt(s),c=Array.from(e.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`)),d=c.indexOf(r);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(),r.click());const v=r.querySelector('[type="checkbox"]');[ye.enter,ye.numpadEnter,ye.space].includes(u)&&v&&(s.preventDefault(),v.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 r=e.value.querySelectorAll(`.${n.is("checked")}[role=treeitem]`);if(r.length){r[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=D(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=D(l.value.root),s=D(null),r=D(null),u=D(null),{broadcastExpanded:c}=eE(e),{dragState:d}=RU({props:e,ctx:t,el$:r,dropIndicator$:u,store:l});zU({el$:r},l);const f=ht(),v=w(()=>{let R=f==null?void 0:f.parent;for(;R;){if(R.type.name==="ElTreeSelect")return!0;R=R.parent}return!1}),g=w(()=>{const{childNodes:R}=o.value;return(!R||R.length===0||R.every(({visible:W})=>!W))&&!v.value});fe(()=>e.currentNodeKey,R=>{l.value.setCurrentNodeKey(R??null)}),fe(()=>e.defaultCheckedKeys,(R,W)=>{cn(R,W)||l.value.setDefaultCheckedKey(R??[])}),fe(()=>e.defaultExpandedKeys,R=>{l.value.setDefaultExpandedKeys(R??[])}),fe(()=>e.data,R=>{l.value.setData(R)},{deep:!0}),fe(()=>e.checkStrictly,R=>{l.value.checkStrictly=R});const m=R=>{if(!e.filterNodeMethod)throw new Error("[Tree] filterNodeMethod is required when filter");l.value.filter(R)},p=R=>e.nodeKey?$m(e.nodeKey,R.data):R.id,h=R=>{if(!e.nodeKey)throw new Error(`[Tree] nodeKey is required in ${R}`)},b=R=>{h("getNodePath");const W=l.value.getNode(R);if(!W)return[];const q=[W.data];let J=W.parent;for(;J&&J!==o.value;)q.push(J.data),J=J.parent;return q.reverse()},y=(R,W)=>l.value.getCheckedNodes(R,W),C=R=>l.value.getCheckedKeys(R),S=()=>{const R=l.value.getCurrentNode();return R?R.data:null},k=()=>{h("getCurrentKey");const R=S();return R?R[e.nodeKey]:null},E=(R,W)=>{h("setCheckedNodes"),l.value.setCheckedNodes(R,W)},N=(R,W)=>{h("setCheckedKeys"),l.value.setCheckedKeys(R,W)},x=(R,W,q=!1)=>{l.value.setChecked(R,W,q)},$=()=>l.value.getHalfCheckedNodes(),T=()=>l.value.getHalfCheckedKeys(),P=(R,W=!0)=>{h("setCurrentNode"),Ov(l,t.emit,()=>{c(R),l.value.setUserCurrentNode(R,W)})},M=(R=null,W=!0)=>{h("setCurrentKey"),Ov(l,t.emit,()=>{c(),l.value.setCurrentNodeKey(R,W)})},L=R=>l.value.getNode(R),Y=R=>{l.value.remove(R)},B=(R,W)=>{l.value.append(R,W)},F=(R,W)=>{l.value.insertBefore(R,W)},V=(R,W)=>{l.value.insertAfter(R,W)},A=(R,W,q)=>{c(W),t.emit("node-expand",R,W,q)},z=(R,W)=>{h("updateKeyChildren"),l.value.updateChildren(R,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$:r,dropIndicator$:u,isEmpty:g,filter:m,getNodeKey:p,getNodePath:b,getCheckedNodes:y,getCheckedKeys:C,getCurrentNode:S,getCurrentKey:k,setCheckedNodes:E,setCheckedKeys:N,setChecked:x,getHalfCheckedNodes:$,getHalfCheckedKeys:T,setCurrentNode:P,setCurrentKey:M,t:n,getNode:L,remove:Y,append:B,insertBefore:F,insertAfter:V,handleNodeExpand:A,updateKeyChildren:z}}});function KU(e,t,n,a,l,o){const s=Pt("el-tree-node");return O(),H("div",{ref:"el$",class:I([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(Fe,null,bt(e.root.childNodes,r=>(O(),oe(s,{key:e.getNodeKey(r),node:r,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:I(e.ns.e("empty-block"))},[ne(e.$slots,"empty",{},()=>[K("span",{class:I(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:I(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 r=u=>{var d,f;const c=u.at(-1);if(c.expanded&&c.childNodes.at(-1))r([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,v,g;if(ye.up===c){const m=l.value.store.root.childNodes;r(m);return}(g=(v=(f=a.value.optionsArray[a.value.states.hoveringIndex].$el)==null?void 0:f.parentNode)==null?void 0:v.parentNode)==null||g.focus({preventScroll:!0})}))},{capture:!0})}),{...Ll(Fn(e),Object.keys(Ko.props)),...t,class:w(()=>t.class),style:w(()=>t.style),"onUpdate:modelValue":u=>n(it,u),valueKey:o,popperClass:w(()=>[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 r=w(()=>({value:s.value,label:"label",children:"children",disabled:"disabled",isLeaf:"isLeaf",...e.props})),u=(m,p)=>{var b;const h=r.value[m];return We(h)?h(p,(b=o.value)==null?void 0:b.getNode(u("value",p))):p[h]},c=Ws(e.modelValue).map(m=>wc(e.data||[],p=>u("value",p)===m,p=>u("children",p),(p,h,b,y)=>y&&u("value",y))).filter(m=>Pv(m)),d=w(()=>{if(!e.renderAfterExpand&&!e.lazy)return[];const m=[];return Sc(e.data.concat(e.cacheData),p=>{const h=u("value",p);m.push({value:h,currentLabel:u("label",p),isDisabled:u("disabled",p)})},p=>u("children",p)),m}),f=()=>{var m;return(m=o.value)==null?void 0:m.getCheckedKeys().filter(p=>{var b;const h=(b=o.value)==null?void 0:b.getNode(p);return!vn(h)&&pa(h.childNodes)})},v=m=>{cn(e.modelValue,m)||a(yt,m)};function g(m){a(it,m),v(m)}return{...Ll(Fn(e),Object.keys(Om.props)),...t,nodeKey:s,expandOnClickNode:w(()=>!e.checkStrictly&&e.expandOnClickNode),defaultExpandedKeys:w(()=>e.defaultExpandedKeys?e.defaultExpandedKeys.concat(c):c),renderContent:(m,{node:p,data:h,store:b})=>m(qU,{value:u("value",h),label:u("label",h),disabled:u("disabled",h),visible:p.visible},e.renderContent?()=>e.renderContent(m,{node:p,data:h,store:b}):n.default?()=>n.default({node:p,data:h,store:b}):void 0),filterNodeMethod:(m,p,h)=>e.filterNodeMethod?e.filterNodeMethod(m,p,h):m?new RegExp(gh(m),"i").test(u("label",p)||""):!0,onNodeClick:(m,p,h)=>{var b,y,C;if((b=t.onNodeClick)==null||b.call(t,m,p,h),!(e.showCheckbox&&e.checkOnClickNode))if(!e.showCheckbox&&(e.checkStrictly||p.isLeaf)){if(!u("disabled",m)){const S=(y=l.value)==null?void 0:y.states.options.get(u("value",m));(C=l.value)==null||C.handleOptionSelect(S)}}else e.expandOnClickNode&&h.proxy.handleExpandIconClick()},onCheck:(m,p)=>{var k;if(!e.showCheckbox)return;const h=u("value",m),b={};Sc([o.value.store.root],E=>b[E.key]=E,E=>E.childNodes);const y=p.checkedKeys,C=e.multiple?Ws(e.modelValue).filter(E=>!(E in b)&&!y.includes(E)):[],S=C.concat(y);if(e.checkStrictly)g(e.multiple?S:S.includes(h)?h:void 0);else if(e.multiple){const E=f();g(C.concat(E))}else{const E=wc([m],$=>!Nm(u("children",$))&&!u("disabled",$),$=>u("children",$)),N=E?u("value",E):void 0,x=Pv(e.modelValue)&&!!wc([m],$=>u("value",$)===e.modelValue,$=>u("children",$));g(N===e.modelValue||x?void 0:N)}Ae(()=>{var N;const E=Ws(e.modelValue);o.value.setCheckedKeys(E),(N=t.onCheck)==null||N.call(t,m,{checkedKeys:o.value.getCheckedKeys(),checkedNodes:o.value.getCheckedNodes(),halfCheckedKeys:o.value.getHalfCheckedKeys(),halfCheckedNodes:o.value.getHalfCheckedNodes()})}),(k=l.value)==null||k.focus()},onNodeExpand:(m,p,h)=>{var b;(b=t.onNodeExpand)==null||b.call(t,m,p,h),Ae(()=>{if(!e.checkStrictly&&e.lazy&&e.multiple&&p.checked){const y={},C=o.value.getCheckedKeys();Sc([o.value.store.root],E=>y[E.key]=E,E=>E.childNodes);const S=Ws(e.modelValue).filter(E=>!(E in y)&&!C.includes(E)),k=f();g(S.concat(k))}})},cacheOptions:d}};var UU=ue({props:{data:{type:Array,default:()=>[]}},setup(e){const t=ze(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},r=D(),u=D(),c=w(()=>e.nodeKey||e.valueKey||"value"),d=jU(e,{attrs:o,emit:l},{select:r,tree:u,key:c}),{cacheOptions:f,...v}=YU(e,{attrs:s,slots:n,emit:l},{select:r,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(r.value,["focus","blur","selectedLabel"]),treeRef:u.value,selectRef:r.value})}),()=>Ge(Ko,Ft({...d,ref:m=>r.value=m}),{...n,default:()=>[Ge(UU,{data:f.value}),Ge(Om,Ft({...v,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=D(new Set),a=D(new Set),{emit:l}=ht();fe([()=>t.value,()=>e.defaultCheckedKeys],()=>Ae(()=>{y(e.defaultCheckedKeys)}),{immediate:!0});const o=(C=!1)=>{if(!t.value||!e.showCheckbox||e.checkStrictly&&!C)return;const{levelTreeNodeMap:S,maxLevel:k}=t.value,E=n.value,N=new Set;for(let x=k;x>=1;--x){const $=S.get(x);$&&$.forEach(T=>{const P=T.children;let M=!T.isLeaf||T.disabled||E.has(T.key);if(P){let L=!0,Y=!1;for(const B of P){const F=B.key;if(B.isEffectivelyChecked||(M=!1),E.has(F))Y=!0;else if(N.has(F)){L=!1,Y=!0;break}else L=!1}L?E.add(T.key):Y?(N.add(T.key),E.delete(T.key)):(E.delete(T.key),N.delete(T.key))}T.isEffectivelyChecked=M})}a.value=N},s=C=>n.value.has(C.key),r=C=>a.value.has(C.key),u=(C,S,k=!0,E=!0,N=!1)=>{const x=n.value,$=C.children;(!e.checkStrictly||N)&&k&&($!=null&&$.length)&&(S=$.some(P=>!P.isEffectivelyChecked));const T=(P,M)=>{x[M?"add":"delete"](P.key);const L=P.children;(!e.checkStrictly||N)&&L&&L.forEach(Y=>{(!Y.disabled||Y.children)&&T(Y,M)})};T(C,S),E&&o(),k&&c(C,S)},c=(C,S)=>{const{checkedNodes:k,checkedKeys:E}=m(),{halfCheckedNodes:N,halfCheckedKeys:x}=p();l(iE,C.data,{checkedKeys:E,checkedNodes:k,halfCheckedKeys:x,halfCheckedNodes:N}),l(uE,C.data,S)};function d(C=!1){return m(C).checkedKeys}function f(C=!1){return m(C).checkedNodes}function v(){return p().halfCheckedKeys}function g(){return p().halfCheckedNodes}function m(C=!1){const S=[],k=[];if(t!=null&&t.value&&e.showCheckbox){const{treeNodeMap:E}=t.value;n.value.forEach(N=>{const x=E.get(N);x&&(!C||C&&x.isLeaf)&&(k.push(N),S.push(x.data))})}return{checkedKeys:k,checkedNodes:S}}function p(){const C=[],S=[];if(t!=null&&t.value&&e.showCheckbox){const{treeNodeMap:k}=t.value;a.value.forEach(E=>{const N=k.get(E);N&&(S.push(E),C.push(N.data))})}return{halfCheckedNodes:C,halfCheckedKeys:S}}function h(C){n.value.clear(),a.value.clear(),Ae(()=>{y(C)})}function b(C,S,k){if(t!=null&&t.value&&e.showCheckbox){const E=t.value.treeNodeMap.get(C);E&&u(E,S,!1,void 0,k)}}function y(C){if(t!=null&&t.value){const{treeNodeMap:S}=t.value;if(e.showCheckbox&&S){for(const k of C){const E=S.get(k);E&&!s(E)&&u(E,!0,!1,!1)}o()}}}return{updateCheckedKeys:o,toggleCheckbox:u,isChecked:s,isIndeterminate:r,getCheckedKeys:d,getCheckedNodes:f,getHalfCheckedKeys:v,getHalfCheckedNodes:g,setChecked:b,setCheckedKeys:h}}function oG(e,t){const n=D(new Set([])),a=D(new Set([])),l=w(()=>We(e.filterMethod));function o(r){var p;if(!l.value)return;const u=new Set,c=a.value,d=n.value,f=[],v=((p=t.value)==null?void 0:p.treeNodes)||[],g=e.filterMethod;d.clear();function m(h){h.forEach(b=>{f.push(b),g!=null&&g(r,b.data,b)?f.forEach(C=>{u.add(C.key),C.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 C=!0;for(const S of y)if(!d.has(S.key)){C=!1;break}C?c.add(b.key):c.delete(b.key)}}f.pop()})}return m(v),u}function s(r){return a.value.has(r.key)}return{hiddenExpandIconKeySet:a,hiddenNodeKeySet:n,doFilter:o,isForceHiddenExpandIcon:s}}function sG(e,t){const n=D(new Set),a=D(),l=Et(),o=D(),{isIndeterminate:s,isChecked:r,toggleCheckbox:u,getCheckedKeys:c,getCheckedNodes:d,getHalfCheckedKeys:f,getHalfCheckedNodes:v,setChecked:g,setCheckedKeys:m}=lG(e,l),{doFilter:p,hiddenNodeKeySet:h,isForceHiddenExpandIcon:b}=oG(e,l),y=w(()=>{var _;return((_=e.props)==null?void 0:_.value)||"id"}),C=w(()=>{var _;return((_=e.props)==null?void 0:_.children)||"children"}),S=w(()=>{var _;return((_=e.props)==null?void 0:_.disabled)||"disabled"}),k=w(()=>{var _;return((_=e.props)==null?void 0:_.label)||"label"}),E=w(()=>{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}),N=w(()=>E.value.length>0);function x(_){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=P(ge),Le={level:we,key:ke,data:ge};Le.label=L(ge),Le.parent=Oe;const qe=T(ge);Le.disabled=M(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 $(_){const U=p(_);U&&(n.value=U)}function T(_){return _[C.value]}function P(_){return _?_[y.value]:""}function M(_){return _[S.value]}function L(_){return _[k.value]}function Y(_){n.value.has(_.key)?W(_):R(_)}function B(_){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 F(_,U){A(_),t(aE,_.data,_,U),e.expandOnClickNode&&Y(_),e.showCheckbox&&(e.checkOnClickNode||_.isLeaf&&e.checkOnClickLeaf)&&!_.disabled&&u(_,!r(_),!0)}function V(_,U){t(lE,_.data,_,U)}function A(_){J(_)||(a.value=_.key,t(rE,_.data,_))}function z(_,U){u(_,U)}function R(_){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 q(_){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=x(_)}function ve(_){var ae;const U=rt(_)?P(_):_;return(ae=l.value)==null?void 0:ae.treeNodeMap.get(U)}function pe(_,U="auto"){const ae=ve(_);ae&&o.value&&o.value.scrollToItem(E.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,_=>{B(_||[])}),fe(()=>e.data,_=>{ie(_),B(e.defaultExpandedKeys||[])},{immediate:!0}),{tree:l,flattenTree:E,isNotEmpty:N,listRef:o,getKey:P,getChildren:T,toggleExpand:Y,toggleCheckbox:u,isChecked:r,isIndeterminate:s,isDisabled:q,isCurrent:J,isForceHiddenExpandIcon:b,handleNodeClick:F,handleNodeDrop:V,handleNodeCheck:z,getCurrentNode:Z,getCurrentKey:Q,setCurrentKey:ee,getCheckedKeys:c,getCheckedNodes:d,getHalfCheckedKeys:f,getHalfCheckedNodes:v,setChecked:g,setCheckedKeys:m,filter:$,setData:ie,getNode:ve,expandNode:R,collapseNode:W,setExpandedKeys:B,scrollToNode:pe,scrollTo:re}}var rG=ue({name:"ElTreeNodeContent",props:tG,setup(e){const t=ze(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=ze(Mm),o=he("tree"),s=w(()=>(l==null?void 0:l.props.indent)??16),r=w(()=>(l==null?void 0:l.props.icon)??qS),u=m=>{var b;const p=(b=l==null?void 0:l.props.props)==null?void 0:b.class;if(!p)return{};let h;if(We(p)){const{data:y}=m;h=p(y,m)}else h=p;return De(h)?{[h]:!0}:h},c=m=>{a("click",n.node,m)},d=m=>{a("drop",n.node,m)},f=()=>{a("toggle",n.node)},v=m=>{a("check",n.node,m)},g=m=>{var p,h,b,y;(b=(h=(p=l==null?void 0:l.instance)==null?void 0:p.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,p)=>{var h,b,y;return O(),H("div",{ref:"node$",class:I([i(o).b("node"),i(o).is("expanded",e.expanded),i(o).is("current",e.current),i(o).is("focusable",!e.disabled),i(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:p[1]||(p[1]=Je(()=>{},["prevent"])),onDragenter:p[2]||(p[2]=Je(()=>{},["prevent"])),onDrop:Je(d,["stop"])},[K("div",{class:I(i(o).be("node","content")),style:je({paddingLeft:`${(e.node.level-1)*s.value}px`,height:e.itemSize+"px"})},[r.value?(O(),oe(i(Be),{key:0,class:I([i(o).is("leaf",!!((b=e.node)!=null&&b.isLeaf)),i(o).is("hidden",e.hiddenExpandIcon),{expanded:!((y=e.node)!=null&&y.isLeaf)&&e.expanded},i(o).be("node","expand-icon")]),onClick:Je(f,["stop"])},{default:X(()=>[(O(),oe(dt(r.value)))]),_:1},8,["class"])):te("v-if",!0),e.showCheckbox?(O(),oe(i(ll),{key:1,"model-value":e.checked,indeterminate:e.indeterminate,disabled:e.disabled,onChange:v,onClick:p[0]||(p[0]=Je(()=>{},["stop"]))},null,8,["model-value","indeterminate","disabled"])):te("v-if",!0),j(i(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=w(()=>a.itemSize);Tt(Mm,{ctx:{emit:l,slots:o},props:a,instance:ht()}),Tt(Hl,void 0);const{t:r}=St(),u=he("tree"),{flattenTree:c,isNotEmpty:d,listRef:f,toggleExpand:v,isIndeterminate:g,isChecked:m,isDisabled:p,isCurrent:h,isForceHiddenExpandIcon:b,handleNodeClick:y,handleNodeDrop:C,handleNodeCheck:S,toggleCheckbox:k,getCurrentNode:E,getCurrentKey:N,setCurrentKey:x,getCheckedKeys:$,getCheckedNodes:T,getHalfCheckedKeys:P,getHalfCheckedNodes:M,setChecked:L,setCheckedKeys:Y,filter:B,setData:F,getNode:V,expandNode:A,collapseNode:z,setExpandedKeys:R,scrollToNode:W,scrollTo:q}=sG(a,l);return t({toggleCheckbox:k,getCurrentNode:E,getCurrentKey:N,setCurrentKey:x,getCheckedKeys:$,getCheckedNodes:T,getHalfCheckedKeys:P,getHalfCheckedNodes:M,setChecked:L,setCheckedKeys:Y,filter:B,setData:F,getNode:V,expandNode:A,collapseNode:z,setExpandedKeys:R,scrollToNode:W,scrollTo:q}),(J,Z)=>(O(),H("div",{class:I([i(u).b(),{[i(u).m("highlight-current")]:e.highlightCurrent}]),role:"tree"},[i(d)?(O(),oe(i(bu),{key:0,ref_key:"listRef",ref:f,"class-name":i(u).b("virtual-list"),data:i(c),total:i(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:i(m)(Q[ee]),indeterminate:i(g)(Q[ee]),"item-size":s.value,disabled:i(p)(Q[ee]),current:i(h)(Q[ee]),"hidden-expand-icon":i(b)(Q[ee]),onClick:i(y),onToggle:i(v),onCheck:i(S),onDrop:i(C)},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:I(i(u).e("empty-block"))},[ne(J.$slots,"empty",{},()=>[K("span",{class:I(i(u).e("empty-text"))},Se(e.emptyText??i(r)("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&&De(s[1])?a.append(o,s[0],s[1]):s.forEach(r=>{a.append(o,r)}):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"),r=he("list"),u=sn(),c=D(!1),d=w(()=>[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)},v=g=>{a("remove",g)};return(g,m)=>(O(),oe(tw,{tag:"ul",class:I(d.value),name:i(r).b()},{default:X(()=>[(O(!0),H(Fe,null,bt(e.files,(p,h)=>(O(),H("li",{key:p.uid||p.name,class:I([i(o).be("list","item"),i(o).is(p.status),{focusing:c.value}]),tabindex:i(u)?void 0:0,"aria-disabled":i(u),role:"button",onKeydown:an(b=>!i(u)&&v(p),["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:p,index:h},()=>[e.listType==="picture"||p.status!=="uploading"&&e.listType==="picture-card"?(O(),H("img",{key:0,class:I(i(o).be("list","item-thumbnail")),src:p.url,crossorigin:e.crossorigin,alt:""},null,10,TG)):te("v-if",!0),p.status==="uploading"||e.listType!=="picture-card"?(O(),H("div",{key:1,class:I(i(o).be("list","item-info"))},[K("a",{class:I(i(o).be("list","item-name")),onClick:Je(b=>e.handlePreview(p),["prevent"])},[j(i(Be),{class:I(i(s).m("document"))},{default:X(()=>[j(i(i_))]),_:1},8,["class"]),K("span",{class:I(i(o).be("list","item-file-name")),title:p.name},Se(p.name),11,OG)],10,$G),p.status==="uploading"?(O(),oe(i(fm),{key:0,type:e.listType==="picture-card"?"circle":"line","stroke-width":e.listType==="picture-card"?6:2,percentage:Number(p.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:I(i(o).be("list","item-status-label"))},[e.listType==="text"?(O(),oe(i(Be),{key:0,class:I([i(s).m("upload-success"),i(s).m("circle-check")])},{default:X(()=>[j(i(Lh))]),_:1},8,["class"])):["picture-card","picture"].includes(e.listType)?(O(),oe(i(Be),{key:1,class:I([i(s).m("upload-success"),i(s).m("check")])},{default:X(()=>[j(i(gr))]),_:1},8,["class"])):te("v-if",!0)],2),i(u)?te("v-if",!0):(O(),oe(i(Be),{key:2,class:I(i(s).m("close")),"aria-label":i(l)("el.upload.delete"),role:"button",tabindex:"0",onClick:b=>v(p),onKeydown:an(Je(b=>v(p),["prevent"]),["enter","space"])},{default:X(()=>[j(i(Ya))]),_:1},8,["class","aria-label","onClick","onKeydown"])),i(u)?te("v-if",!0):(O(),H("i",{key:3,class:I(i(s).m("close-tip"))},Se(i(l)("el.upload.deleteTip")),3)),e.listType==="picture-card"?(O(),H("span",{key:4,class:I(i(o).be("list","item-actions"))},[K("span",{class:I(i(o).be("list","item-preview")),onClick:b=>e.handlePreview(p)},[j(i(Be),{class:I(i(s).m("zoom-in"))},{default:X(()=>[j(i(XS))]),_:1},8,["class"])],10,NG),i(u)?te("v-if",!0):(O(),H("span",{key:0,class:I(i(o).be("list","item-delete")),onClick:b=>v(p)},[j(i(Be),{class:I(i(s).m("delete"))},{default:X(()=>[j(i(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;ze(pE)||rn(S0,"usage: ");const l=he("upload"),o=D(!1),s=sn(),r=v=>new Promise((g,m)=>v.file(g,m)),u=async v=>{try{if(v.isFile){const g=await r(v);return v.fullPath&&!g.webkitRelativePath&&Object.defineProperty(g,"webkitRelativePath",{value:v.fullPath.replace(/^\//,"")}),g.isDirectory=!1,[g]}if(v.isDirectory){const g=v.createReader(),m=()=>new Promise((C,S)=>g.readEntries(C,S)),p=[];let h=await m();for(;h.length>0;)p.push(...h),h=await m();const b=p.map(C=>u(C).catch(()=>[])),y=await Promise.all(b);return Lc(y)}}catch{return[]}return[]},c=async v=>{if(s.value)return;o.value=!1,v.stopPropagation();const g=Array.from(v.dataTransfer.files),m=v.dataTransfer.items||[];if(n.directory){const p=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(p.map(u));a("file",Lc(h));return}g.forEach((p,h)=>{var y,C;const b=(C=(y=m[h])==null?void 0:y.webkitGetAsEntry)==null?void 0:C.call(y);b&&(p.isDirectory=b.isDirectory)}),a("file",g)},d=()=>{s.value||(o.value=!0)},f=v=>{v.currentTarget.contains(v.relatedTarget)||(o.value=!1)};return(v,g)=>(O(),H("div",{class:I([i(l).b("dragger"),i(l).is("dragover",o.value)]),onDrop:Je(c,["prevent"]),onDragover:Je(d,["prevent"]),onDragleave:Je(f,["prevent"])},[ne(v.$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(),r=p=>{if(p.length===0)return;const{autoUpload:h,limit:b,fileList:y,multiple:C,onStart:S,onExceed:k}=n;if(b&&y.length+p.length>b){k(p,y);return}C||(p=p.slice(0,1));for(const E of p){const N=E;N.uid=Iv(),S(N),h&&u(N)}},u=async p=>{if(s.value.value="",!n.beforeUpload)return d(p);let h,b={};try{const C=n.data,S=n.beforeUpload(p);b=mi(n.data)?xl(n.data):n.data,h=await S,mi(n.data)&&cn(C,b)&&(b=xl(n.data))}catch{h=!1}if(h===!1){n.onRemove(p);return}let y=p;h instanceof Blob&&(h instanceof File?y=h:y=new File([h],p.name,{type:p.type})),d(Object.assign(y,{uid:p.uid}),b)},c=async(p,h)=>We(p)?p(h):p,d=async(p,h)=>{const{headers:b,data:y,method:C,withCredentials:S,name:k,action:E,onProgress:N,onSuccess:x,onError:$,httpRequest:T}=n;try{h=await c(h??y,p)}catch{n.onRemove(p);return}const{uid:P}=p,M={headers:b||{},withCredentials:S,file:p,data:h,method:C,filename:k,action:E,onProgress:Y=>{N(Y,p)},onSuccess:Y=>{x(Y,p),delete o.value[P]},onError:Y=>{$(Y,p),delete o.value[P]}},L=T(M);o.value[P]=L,L instanceof Promise&&L.then(M.onSuccess,M.onError)},f=p=>{const h=p.target.files;h&&r(Array.from(h))},v=()=>{l.value||(s.value.value="",s.value.click())},g=()=>{v()};return t({abort:p=>{Gw(o.value).filter(p?([h])=>String(p.uid)===h:()=>!0).forEach(([h,b])=>{b instanceof XMLHttpRequest&&b.abort(),delete o.value[h]})},upload:u}),(p,h)=>(O(),H("div",{class:I([i(a).b(),i(a).m(e.listType),i(a).is("drag",e.drag),i(a).is("disabled",i(l))]),tabindex:i(l)?void 0:0,"aria-disabled":i(l),role:"button",onClick:v,onKeydown:an(Je(g,["self"]),["enter","space"])},[e.drag?(O(),oe(RG,{key:0,disabled:i(l),directory:e.directory,onFile:r},{default:X(()=>[ne(p.$slots,"default")]),_:3},8,["disabled","directory"])):ne(p.$slots,"default",{key:1}),K("input",{ref_key:"inputRef",ref:s,class:I(i(a).e("input")),name:e.name,disabled:i(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)},DG=(e,t)=>{const n=rR(e,"fileList",void 0,{passive:!0}),a=m=>n.value.find(p=>p.uid===m.uid);function l(m){var p;(p=t.value)==null||p.abort(m)}function o(m=["ready","uploading","success","fail"]){n.value=n.value.filter(p=>!m.includes(p.status))}function s(m){n.value=n.value.filter(p=>p.uid!==m.uid)}const r=m=>{Ae(()=>e.onChange(m,n.value))},u=(m,p)=>{const h=a(p);h&&(console.error(m),h.status="fail",s(h),e.onError(m,h,n.value),r(h))},c=(m,p)=>{const h=a(p);h&&(e.onProgress(m,h,n.value),h.status="uploading",h.percentage=Math.round(m.percent))},d=(m,p)=>{const h=a(p);h&&(h.status="success",h.response=m,e.onSuccess(m,h,n.value),r(h))},f=m=>{vn(m.uid)&&(m.uid=Iv());const p={name:m.name,percentage:0,status:"ready",size:m.size,raw:m,uid:m.uid};if(e.listType==="picture-card"||e.listType==="picture")try{p.url=URL.createObjectURL(m)}catch(h){Kt(k0,h.message),e.onError(h,p,n.value)}n.value=[...n.value,p],r(p)},v=async m=>{const p=m instanceof File?a(m):m;p||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(p,n.value)!==!1&&h(p):h(p)};function g(){n.value.filter(({status:m})=>m==="ready").forEach(({raw:m})=>{var p;return m&&((p=t.value)==null?void 0:p.upload(m))})}return fe(()=>e.listType,m=>{m!=="picture-card"&&m!=="picture"||(n.value=n.value.map(p=>{const{raw:h,url:b}=p;if(!b&&h)try{p.url=URL.createObjectURL(h)}catch(y){e.onError(y,p,n.value)}return p}))}),fe(n,m=>{for(const p of m)p.uid||(p.uid=Iv()),p.status||(p.status="success")},{immediate:!0,deep:!0}),{uploadFiles:n,abort:l,clearFiles:o,handleError:u,handleProgress:c,handleStart:f,handleSuccess:d,handleRemove:v,submit:g,revokeFileObjectURL:E0}};var VG=ue({name:"ElUpload",__name:"upload",props:yG,setup(e,{expose:t}){const n=e,a=sn(),l=Et(),{abort:o,submit:s,clearFiles:r,uploadFiles:u,handleStart:c,handleError:d,handleRemove:f,handleSuccess:v,handleProgress:g,revokeFileObjectURL:m}=DG(n,l),p=w(()=>n.listType==="picture-card"),h=w(()=>({...n,fileList:u.value,onStart:c,onProgress:g,onSuccess:v,onError:d,onRemove:f}));return zt(()=>{u.value.forEach(m)}),Tt(pE,{accept:Ot(n,"accept")}),t({abort:o,submit:s,clearFiles:r,handleStart:c,handleRemove:f}),(b,y)=>(O(),H("div",null,[p.value&&e.showFileList?(O(),oe(w0,{key:0,disabled:i(a),"list-type":e.listType,files:i(u),crossorigin:e.crossorigin,"handle-preview":e.onPreview,onRemove:i(f)},va({append:X(()=>[j(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:C,index:S})=>[ne(b.$slots,"file",{file:C,index:S})]),key:"0"}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):te("v-if",!0),!p.value||p.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"),!p.value&&e.showFileList?(O(),oe(w0,{key:3,disabled:i(a),"list-type":e.listType,files:i(u),crossorigin:e.crossorigin,"handle-preview":e.onPreview,onRemove:i(f)},va({_:2},[b.$slots.file?{name:"default",fn:X(({file:C,index:S})=>[ne(b.$slots,"file",{file:C,index:S})]),key:"0"}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):te("v-if",!0)]))}}),BG=VG;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,r,u,c){const[d,f,v,g]=up(l,o,a);let m=0;if(t instanceof HTMLImageElement)d.drawImage(t,0,0,v,g);else{const{color:q,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=q,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(_??"",v*ae+c*le,U*(pe+s.fontGap*a))})}const p=Math.PI/180*Number(n),h=Math.max(l,o),[b,y,C]=up(h,h,a);b.translate(C/2,C/2),b.rotate(p),v>0&&g>0&&b.drawImage(f,-v/2,-g/2);function S(q,J){return[q*Math.cos(p)-J*Math.sin(p),q*Math.sin(p)+J*Math.cos(p)]}let k=0,E=0,N=0,x=0;const $=v/2,T=g/2;[[0-$,0-T],[0+$,0-T],[0+$,0+T],[0-$,0+T]].forEach(([q,J])=>{const[Z,Q]=S(q,J);k=Math.min(k,Z),E=Math.max(E,Z),N=Math.min(N,Q),x=Math.max(x,Q)});const P=k+C/2,M=N+C/2,L=E-k,Y=x-N,B=r*a,F=u*a,V=(L+B)*2,A=Y+F,[z,R]=up(V,A);function W(q=0,J=0){z.drawImage(y,P,M,L,Y,q,J+m,L,Y)}return W(),W(L+B,-Y/2-F/2),W(L+B,+Y/2+F/2),[R.toDataURL(),V/a,A/a]}return e}var UG=ue({name:"ElWatermark",__name:"watermark",props:zG,setup(e){const t={position:"relative"},n=e,a=w(()=>{var P;return((P=n.font)==null?void 0:P.fontGap)??3}),l=w(()=>{var P;return((P=n.font)==null?void 0:P.color)??"rgba(0,0,0,.15)"}),o=w(()=>{var P;return((P=n.font)==null?void 0:P.fontSize)??16}),s=w(()=>{var P;return((P=n.font)==null?void 0:P.fontWeight)??"normal"}),r=w(()=>{var P;return((P=n.font)==null?void 0:P.fontStyle)??"normal"}),u=w(()=>{var P;return((P=n.font)==null?void 0:P.fontFamily)??"sans-serif"}),c=w(()=>{var P;return((P=n.font)==null?void 0:P.textAlign)??"center"}),d=w(()=>{var P;return((P=n.font)==null?void 0:P.textBaseline)??"hanging"}),f=w(()=>n.gap[0]),v=w(()=>n.gap[1]),g=w(()=>f.value/2),m=w(()=>v.value/2),p=w(()=>{var P;return((P=n.offset)==null?void 0:P[0])??g.value}),h=w(()=>{var P;return((P=n.offset)==null?void 0:P[1])??m.value}),b=()=>{const P={zIndex:n.zIndex,position:"absolute",left:0,top:0,width:"100%",height:"100%",pointerEvents:"none",backgroundRepeat:"repeat"};let M=p.value-g.value,L=h.value-m.value;return M>0&&(P.left=`${M}px`,P.width=`calc(100% - ${M}px)`,M=0),L>0&&(P.top=`${L}px`,P.height=`calc(100% - ${L}px)`,L=0),P.backgroundPosition=`${M}px ${L}px`,P},y=Et(null),C=Et(),S=D(!1),k=()=>{C.value&&(C.value.remove(),C.value=void 0)},E=(P,M)=>{var L;y.value&&C.value&&(S.value=!0,C.value.setAttribute("style",KG({...b(),backgroundImage:`url('${P}')`,backgroundSize:`${Math.floor(M)}px`})),(L=y.value)==null||L.append(C.value),setTimeout(()=>{S.value=!1}))},N=P=>{let M=120,L=64,Y=0;const{image:B,content:F,width:V,height:A,rotate:z}=n;if(!B&&P.measureText){P.font=`${Number(o.value)}px ${u.value}`;const R=me(F)?F:[F];let W=0,q=0;R.forEach(Z=>{const{width:Q,fontBoundingBoxAscent:ee,fontBoundingBoxDescent:ie,actualBoundingBoxAscent:ve,actualBoundingBoxDescent:pe}=P.measureText(Z),re=xt(ee)?ve+pe:ee+ie;Q>W&&(W=Math.ceil(Q)),re>q&&(q=Math.ceil(re))}),M=W,L=q*R.length+(R.length-1)*a.value;const J=Math.PI/180*Number(z);Y=Math.ceil(Math.abs(Math.sin(J)*L)/2),M+=Y}return[V??M,A??L,Y]},x=YG(),$=()=>{const P=document.createElement("canvas").getContext("2d"),M=n.image,L=n.content,Y=n.rotate;if(P){C.value||(C.value=document.createElement("div"));const B=WG(),[F,V,A]=N(P),z=R=>{const[W,q]=x(R||"",Y,B,F,V,{color:l.value,fontSize:o.value,fontStyle:r.value,fontWeight:s.value,fontFamily:u.value,fontGap:a.value,textAlign:c.value,textBaseline:d.value},f.value,v.value,A);E(W,q)};if(M){const R=new Image;R.onload=()=>{z(R)},R.onerror=()=>{z(L)},R.crossOrigin="anonymous",R.referrerPolicy="no-referrer",R.src=M}else z(L)}};return mt(()=>{$()}),fe(()=>n,()=>{$()},{deep:!0,flush:"post"}),zt(()=>{k()}),$r(y,P=>{S.value||P.forEach(M=>{jG(M,C.value)&&(k(),$())})},{attributes:!0,subtree:!0,childList:!0}),(P,M)=>(O(),H("div",{ref_key:"containerRef",ref:y,style:je([t])},[ne(P.$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=D(null),s=()=>{let d;return De(e.value)?d=document.querySelector(e.value):We(e.value)?d=e.value():d=e.value,d},r=()=>{const d=s();if(!d||!t.value){o.value=null;return}oX(d)||d.scrollIntoView(l.value);const{left:f,top:v,width:g,height:m}=d.getBoundingClientRect();o.value={left:f,top:v,width:g,height:m,radius:0}};mt(()=>{fe([t,e],()=>{r()},{immediate:!0}),window.addEventListener("resize",r)}),zt(()=>{window.removeEventListener("resize",r)});const u=d=>(me(n.value.offset)?n.value.offset[d]:n.value.offset)??6,c=w(()=>{var g;if(!o.value)return o.value;const d=u(0),f=u(1),v=((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:v}});return{mergedPosInfo:c,triggerTarget:w(()=>{const d=s();return!a.value||!d||!window.DOMRect?d||void 0:{getBoundingClientRect(){var f,v,g,m;return window.DOMRect.fromRect({width:((f=c.value)==null?void 0:f.width)||0,height:((v=c.value)==null?void 0:v.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,r)=>{const u=D(),c=D(),d=D({}),f={x:u,y:c,placement:a,strategy:l,middlewareData:d},v=w(()=>{const b=[S3(i(o)),k3(),C3(),rX()];return i(r)&&i(n)&&b.push(E3({element:i(n)})),b}),g=async()=>{if(!It)return;const b=i(e),y=i(t);if(!b||!y)return;const C=await x3(b,y,{placement:i(a),strategy:i(l),middleware:i(v)});Pi(f).forEach(S=>{f[S].value=C[S]})},m=w(()=>{if(!i(e))return{position:"fixed",top:"50%",left:"50%",transform:"translate3d(-50%, -50%, 0)",maxWidth:"100vw",zIndex:i(s)};const{overflow:b}=i(d);return{position:i(l),zIndex:i(s),top:i(c)!=null?`${i(c)}px`:"",left:i(u)!=null?`${i(u)}px`:"",maxWidth:b!=null&&b.maxWidth?`${b==null?void 0:b.maxWidth}px`:""}}),p=w(()=>{if(!i(r))return{};const{arrow:b}=i(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=i(e),y=i(t);b&&y&&(h=y3(b,y,g)),ia(()=>{g()})}),zt(()=>{h&&h()}),{update:g,contentStyle:m,arrowStyle:p}},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}=ze(vf),a=w(()=>{var d;return((d=t.pos)==null?void 0:d.radius)??2}),l=w(()=>{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(),r=w(()=>{const d=o.value,f=s.value,v=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} ${v.topRight} v${t.pos.height-m*2} ${v.bottomRight} h${-t.pos.width+m*2} ${v.bottomLeft} v${-t.pos.height+m*2} ${v.topLeft} z`:g}),u=w(()=>({position:"fixed",left:0,right:0,top:0,bottom:0,zIndex:t.zIndex,pointerEvents:t.pos&&t.targetAreaClickable?"none":"auto"})),c=w(()=>({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:i(n).e("mask"),style:u.value},d.$attrs),[(O(),H("svg",uX,[K("path",{class:I(i(n).e("hollow")),style:je(c.value),d:r.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=D(n.placement),o=D(n.strategy),s=D(null),r=D(null);fe(()=>n.placement,()=>{l.value=n.placement});const{contentStyle:u,arrowStyle:c}=sX(Ot(n,"reference"),s,r,l,o,Ot(n,"offset"),Ot(n,"zIndex"),Ot(n,"showArrow")),d=w(()=>l.value.split("-")[0]),{ns:f}=ze(vf),v=()=>{a("close")},g=m=>{m.detail.focusReason==="pointer"&&m.preventDefault()};return(m,p)=>(O(),H("div",{ref_key:"contentRef",ref:s,style:je(i(u)),class:I(i(f).e("content")),"data-side":d.value,tabindex:"-1"},[j(i(Nr),{loop:"",trapped:"","focus-start-el":"container","focus-trap-el":s.value||void 0,onReleaseRequested:v,onFocusoutPrevented:g},{default:X(()=>[ne(m.$slots,"default")]),_:3},8,["focus-trap-el"]),e.showArrow?(O(),H("span",{key:0,ref_key:"arrowRef",ref:r,style:je(i(c)),class:I(i(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 r(d){me(d)&&d.forEach(f=>{var v;((v=(f==null?void 0:f.type)||{})==null?void 0:v.name)==="ElTourStep"&&(o.push(f),s+=1)})}return l.length&&r($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=D(0),s=D(),r=w(()=>!xt(n.current)),u=D(n.current??0),c=w({get(){return xt(n.current)?u.value:n.current},set(M){(r.value?n.current:u.value)!==M&&(r.value||(u.value=M),a("update:current",M))}}),d=w(()=>{var M;return(M=s.value)==null?void 0:M.target}),f=w(()=>[l.b(),C.value==="primary"?l.m("primary"):""]),v=w(()=>{var M;return((M=s.value)==null?void 0:M.placement)||n.placement}),g=w(()=>{var M;return((M=s.value)==null?void 0:M.contentStyle)??n.contentStyle}),m=w(()=>{var M;return((M=s.value)==null?void 0:M.mask)??n.mask}),p=w(()=>!!m.value&&n.modelValue),h=w(()=>Wt(m.value)?void 0:m.value),b=w(()=>{var M;return!!d.value&&(((M=s.value)==null?void 0:M.showArrow)??n.showArrow)}),y=w(()=>{var M;return((M=s.value)==null?void 0:M.scrollIntoViewOptions)??n.scrollIntoViewOptions}),C=w(()=>{var M;return((M=s.value)==null?void 0:M.type)??n.type}),{nextZIndex:S}=cu(),k=S(),E=w(()=>n.zIndex??k),{mergedPosInfo:N,triggerTarget:x}=lX(d,Ot(n,"modelValue"),Ot(n,"gap"),m,y);fe(()=>n.current,M=>!xt(M)&&(u.value=M)),fe(c,(M,L)=>{!n.modelValue||M===L||a(yt,M)},{flush:"post"}),fe(()=>n.modelValue,M=>{!M&&c.value!==0&&(c.value=0)});const $=()=>{n.closeOnPressEscape&&(a(it,!1),a("close",c.value))},T=M=>{o.value=M},P=mn();return Tt(vf,{currentStep:s,current:c,total:o,showClose:Ot(n,"showClose"),closeIcon:Ot(n,"closeIcon"),mergedType:C,ns:l,slots:P,updateModelValue(M){a(it,M)},onClose(){a("close",c.value)},onFinish(){a("finish")}}),(M,L)=>{var Y,B;return O(),H(Fe,null,[(O(),oe(Cr,{to:e.appendTo},[K("div",pt({class:f.value},M.$attrs),[j(fX,{visible:p.value,fill:(Y=h.value)==null?void 0:Y.color,style:je((B=h.value)==null?void 0:B.style),pos:i(N),"z-index":E.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:i(x),placement:v.value,"show-arrow":b.value,"z-index":E.value,style:je(g.value),onClose:$},{default:X(()=>[j(i(mX),{current:c.value,onUpdateTotal:T},{default:X(()=>[ne(M.$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:r,total:u,showClose:c,closeIcon:d,mergedType:f,ns:v,slots:g,updateModelValue:m,onClose:p,onFinish:h}=ze(vf);fe(n,$=>{s.value=$},{immediate:!0});const b=w(()=>n.showClose??c.value),y=w(()=>n.closeIcon??d.value??l),C=$=>{if($)return _s($,["children","onClick"])},S=()=>{var $,T;r.value-=1,($=n.prevButtonProps)!=null&&$.onClick&&((T=n.prevButtonProps)==null||T.onClick())},k=()=>{var $;r.value>=u.value-1?E():r.value+=1,($=n.nextButtonProps)!=null&&$.onClick&&n.nextButtonProps.onClick()},E=()=>{N(),h()},N=()=>{m(!1),p(),a("close")},x=$=>{var T;if(!((T=$.target)!=null&&T.isContentEditable))switch(Gt($)){case ye.left:$.preventDefault(),r.value>0&&S();break;case ye.right:$.preventDefault(),k()}};return mt(()=>{window.addEventListener("keydown",x)}),zt(()=>{window.removeEventListener("keydown",x)}),($,T)=>(O(),H(Fe,null,[b.value?(O(),H("button",{key:0,"aria-label":i(o)("el.tour.close"),class:I(i(v).e("closebtn")),type:"button",onClick:N},[j(i(Be),{class:I(i(v).e("close"))},{default:X(()=>[(O(),oe(dt(y.value)))]),_:1},8,["class"])],10,yX)):te("v-if",!0),K("header",{class:I([i(v).e("header"),{"show-close":i(c)}])},[ne($.$slots,"header",{},()=>[K("span",{role:"heading",class:I(i(v).e("title"))},Se(e.title),3)])],2),K("div",{class:I(i(v).e("body"))},[ne($.$slots,"default",{},()=>[K("span",null,Se(e.description),1)])],2),K("footer",{class:I(i(v).e("footer"))},[K("div",{class:I(i(v).b("indicators"))},[i(g).indicators?(O(),oe(dt(i(g).indicators),{key:0,current:i(r),total:i(u)},null,8,["current","total"])):(O(!0),H(Fe,{key:1},bt(i(u),(P,M)=>(O(),H("span",{key:P,class:I([i(v).b("indicator"),i(v).is("active",M===i(r))])},null,2))),128))],2),K("div",{class:I(i(v).b("buttons"))},[i(r)>0?(O(),oe(i(Bn),pt({key:0,size:"small",type:i(f)},C(e.prevButtonProps),{onClick:S}),{default:X(()=>{var P;return[st(Se(((P=e.prevButtonProps)==null?void 0:P.children)??i(o)("el.tour.previous")),1)]}),_:1},16,["type"])):te("v-if",!0),i(r)<=i(u)-1?(O(),oe(i(Bn),pt({key:1,size:"small",type:i(f)==="primary"?"default":"primary"},C(e.nextButtonProps),{onClick:k}),{default:X(()=>{var P;return[st(Se(((P=e.nextButtonProps)==null?void 0:P.children)??(i(r)===i(u)-1?i(o)("el.tour.finish"):i(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=>De(e),click:(e,t)=>e instanceof MouseEvent&&(De(t)||xt(t))},qu=(e=>{if(!It||e==="")return null;if(De(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=D(""),r=D({}),u=D(null),c=D(null),d=D(),f={};let v=!1,g=0;const m=he("anchor"),p=w(()=>[m.b(),a.type==="underline"?m.m("underline"):"",m.m(a.direction)]),h=M=>{f[M.href]=M.el},b=M=>{delete f[M]},y=M=>{s.value!==M&&(s.value=M,l(yt,M))};let C=null,S="";const k=M=>{if(!d.value)return;const L=qu(M);if(!L)return;if(C){if(S===M)return;C()}S=M,v=!0;const Y=tb(L,d.value),B=mv(L,Y),F=Y.scrollHeight-Y.clientHeight,V=Math.min(B-a.offset,F);C=yR(d.value,g,V,a.duration,()=>{setTimeout(()=>{v=!1,S=""},20)})},E=M=>{M&&(y(M),k(M))},N=(M,L)=>{l("click",M,L),E(L)},x=xX(()=>{d.value&&(g=nb(d.value));const M=$();v||xt(M)||y(M)}),$=()=>{if(!d.value)return;const M=nb(d.value),L=[];for(const Y of Object.keys(f)){const B=qu(Y);if(!B)continue;const F=tb(B,d.value),V=mv(B,F);L.push({top:V-a.offset-a.bound,href:Y})}L.sort((Y,B)=>Y.top-B.top);for(let Y=0;YM))return B.href}},T=()=>{const M=qu(a.container);!M||ou(M)?d.value=window:d.value=M};Ht(d,"scroll",x);const P=()=>{Ae(()=>{if(!u.value||!c.value||!s.value){r.value={};return}const M=f[s.value];if(!M){r.value={};return}const L=u.value.getBoundingClientRect(),Y=c.value.getBoundingClientRect(),B=M.getBoundingClientRect();if(a.direction==="horizontal"){const F=B.left-L.left;r.value={left:`${F}px`,width:`${B.width}px`,opacity:1}}else{const F=B.top-L.top+(B.height-Y.height)/2;r.value={top:`${F}px`,opacity:1}}})};return fe(s,P),fe(()=>{var M;return(M=o.default)==null?void 0:M.call(o)},P),mt(()=>{T();const M=decodeURIComponent(window.location.hash);qu(M)?E(M):x()}),fe(()=>a.container,()=>{T()}),Tt(hE,{ns:m,direction:a.direction,currentAnchor:s,addLink:h,removeLink:b,handleClick:N}),t({scrollTo:E}),(M,L)=>(O(),H("div",{ref_key:"anchorRef",ref:u,class:I(p.value)},[e.marker?(O(),H("div",{key:0,ref_key:"markerRef",ref:c,class:I(i(m).e("marker")),style:je(r.value)},null,6)):te("v-if",!0),K("div",{class:I(i(m).e("list"))},[ne(M.$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=D(null),{ns:a,direction:l,currentAnchor:o,addLink:s,removeLink:r,handleClick:u}=ze(hE),c=w(()=>[a.e("link"),a.is("active",o.value===t.href)]),d=f=>{u(f,t.href)};return fe(()=>t.href,(f,v)=>{Ae(()=>{v&&r(v),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&&r(f)}),(f,v)=>(O(),H("div",{class:I(i(a).e("item"))},[K("a",{ref_key:"linkRef",ref:n,class:I(c.value),href:e.href,onClick:d},[ne(f.$slots,"default",{},()=>[st(Se(e.title),1)])],10,NX),f.$slots["sub-link"]&&i(l)==="vertical"?(O(),H("div",{key:0,class:I(i(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=>De(e)||He(e)||Wt(e),[yt]:e=>De(e)||He(e)||Wt(e)},AX=["id","aria-label","aria-labelledby"],LX=["name","disabled","checked","onChange"];var DX=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(),r=sn(),{formItem:u}=Kn(),{inputId:c,isLabeledByFormItem:d}=Ea(n,{formItemContext:u}),f=D(null),v=QI(),g=Ft({isInit:!1,width:0,height:0,translateX:0,translateY:0,focusVisible:!1}),m=(P,M)=>{const L=h(M);a(it,L),a(yt,L),P.target.checked=L===n.modelValue},p=w(()=>({...gE,...n.props})),h=P=>rt(P)?P[p.value.value]:P,b=P=>rt(P)?P[p.value.label]:P,y=P=>!!(r.value||rt(P)&&P[p.value.disabled]),C=P=>n.modelValue===h(P),S=P=>n.options.find(M=>h(M)===P),k=P=>[l.e("item"),l.is("selected",C(P)),l.is("disabled",y(P))],E=()=>{if(!f.value)return;const P=f.value.querySelector(".is-selected"),M=f.value.querySelector(".is-selected input");if(!P||!M){g.width=0,g.height=0,g.translateX=0,g.translateY=0,g.focusVisible=!1;return}g.isInit=!0,n.direction==="vertical"?(g.height=P.offsetHeight,g.translateY=P.offsetTop):(g.width=P.offsetWidth,g.translateX=P.offsetLeft);try{g.focusVisible=M.matches(":focus-visible")}catch{}},N=w(()=>[l.b(),l.m(s.value),l.is("block",n.block)]),x=w(()=>({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"})),$=w(()=>[l.e("item-selected"),l.is("disabled",y(S(n.modelValue))),l.is("focus-visible",g.focusVisible)]),T=w(()=>n.name||o.value);return on(f,E),fe(v,E),fe(()=>n.options,E,{deep:!0,flush:"post"}),fe(()=>n.modelValue,()=>{var P;E(),n.validateEvent&&((P=u==null?void 0:u.validate)==null||P.call(u,"change").catch(vt))},{flush:"post"}),(P,M)=>e.options.length?(O(),H("div",{key:0,id:i(c),ref_key:"segmentedRef",ref:f,class:I(N.value),role:"radiogroup","aria-label":i(d)?void 0:e.ariaLabel||"segmented","aria-labelledby":i(d)?i(u).labelId:void 0},[K("div",{class:I([i(l).e("group"),i(l).m(e.direction)])},[K("div",{style:je(x.value),class:I($.value)},null,6),(O(!0),H(Fe,null,bt(e.options,(L,Y)=>(O(),H("label",{key:Y,class:I(k(L))},[K("input",{class:I(i(l).e("item-input")),type:"radio",name:T.value,disabled:y(L),checked:C(L),onChange:B=>m(B,L)},null,42,LX),K("div",{class:I(i(l).e("item-label"))},[ne(P.$slots,"default",{item:L},()=>[st(Se(b(L)),1)])],2)],2))),128))],2)],10,AX)):te("v-if",!0)}}),VX=DX;const BX=ut(VX),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=Dn(t);let s=-1,r;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;r={pattern:l.slice(u+1,d),start:u+1,end:d,prefix:c,prefixIndex:u,splitIndex:s,selectionEnd:a};break}}return r},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 v=document.querySelector("#input-textarea-caret-position-mirror-div");v!=null&&v.parentNode&&v.parentNode.removeChild(v)}const s=document.createElement("div");s.id="input-textarea-caret-position-mirror-div",document.body.appendChild(s);const r=s.style,u=window.getComputedStyle(e),c=e.nodeName==="INPUT";r.whiteSpace=c?"nowrap":"pre-wrap",c||(r.wordWrap="break-word"),r.position="absolute",t.debug||(r.visibility="hidden"),o.forEach(v=>{if(c&&v==="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),p=m+Number.parseInt(u.lineHeight);g>p?r.lineHeight=`${g-m}px`:g===p?r.lineHeight=u.lineHeight:r.lineHeight="0"}else r.lineHeight=u.height;else r[v]=u[v]}),Bd()?e.scrollHeight>Number.parseInt(u.height)&&(r.overflowY="scroll"):r.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=>De(e)?e.length===1:e.every(t=>De(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=>De(e),"whole-remove":(e,t)=>De(e)&&De(t),input:e=>De(e),search:(e,t)=>De(e)&&De(t),select:(e,t)=>rt(e)&&De(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=>De(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(),r=D(-1),u=D(),c=D(),d=D(),f=(S,k)=>[o.be("dropdown","item"),o.is("hovering",r.value===k),o.is("disabled",S.disabled||a.disabled)],v=S=>{S.disabled||a.disabled||l("select",S)},g=S=>{r.value=S},m=w(()=>a.disabled||a.options.every(S=>S.disabled)),p=w(()=>a.options[r.value]),h=()=>{!p.value||p.value.disabled||a.disabled||l("select",p.value)},b=S=>{const{options:k}=a;if(k.length===0||m.value)return;S==="next"?(r.value++,r.value===k.length&&(r.value=0)):S==="prev"&&(r.value--,r.value<0&&(r.value=k.length-1));const E=k[r.value];if(E.disabled){b(S);return}Ae(()=>y(E))},y=S=>{var x,$,T,P;const{options:k}=a,E=k.findIndex(M=>M.value===S.value),N=(x=c.value)==null?void 0:x[E];if(N){const M=(T=($=d.value)==null?void 0:$.querySelector)==null?void 0:T.call($,`.${o.be("dropdown","wrap")}`);M&&wh(M,N)}(P=u.value)==null||P.handleScroll()};return fe(()=>a.options,()=>{m.value||a.options.length===0?r.value=-1:r.value=a.options.findIndex(S=>!S.disabled)},{immediate:!0}),t({hoveringIndex:r,navigateOptions:b,selectHoverOption:h,hoverOption:p}),(S,k)=>(O(),H("div",{ref_key:"dropdownRef",ref:d,class:I(i(o).b("dropdown"))},[S.$slots.header?(O(),H("div",{key:0,class:I(i(o).be("dropdown","header"))},[ne(S.$slots,"header")],2)):te("v-if",!0),ft(j(i(il),{id:e.contentId,ref_key:"scrollbarRef",ref:u,tag:"ul","wrap-class":i(o).be("dropdown","wrap"),"view-class":i(o).be("dropdown","list"),role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical"},{default:X(()=>[(O(!0),H(Fe,null,bt(e.options,(E,N)=>(O(),H("li",{id:`${e.contentId}-${N}`,ref_for:!0,ref_key:"optionRefs",ref:c,key:N,class:I(f(E,N)),role:"option","aria-disabled":E.disabled||e.disabled||void 0,"aria-selected":r.value===N,onMousemove:x=>g(N),onClick:Je(x=>v(E),["stop"])},[ne(S.$slots,"label",{item:E,index:N},()=>[K("span",null,Se(E.label??E.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:I(i(o).be("dropdown","loading"))},[ne(S.$slots,"loading",{},()=>[st(Se(i(s)("el.mention.loading")),1)])],2)):te("v-if",!0),S.$slots.footer?(O(),H("div",{key:2,class:I(i(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=w(()=>{const V=Un.props??[],A=me(V)?V:Object.keys(V);return Ll(a,A)}),s=he("mention"),r=sn(),u=Xn(),c=D(),d=D(),f=D(),v=D(!1),g=D(),m=D(),p=w(()=>a.showArrow?a.placement:`${a.placement}-start`),h=w(()=>a.showArrow?["bottom","top"]:["bottom-start","top-start"]),b=w(()=>({...bE,...a.props})),y=V=>{const A={label:V[b.value.label],value:V[b.value.value],disabled:V[b.value.disabled]};return{...V,...A}},C=w(()=>a.options.map(y)),S=w(()=>{const{filterOption:V}=a;return!m.value||!V?C.value:C.value.filter(A=>V(m.value.pattern,A))}),k=w(()=>v.value&&(!!S.value.length||a.loading)),E=w(()=>{var V;return`${u.value}-${(V=f.value)==null?void 0:V.hoveringIndex}`}),N=V=>{l(it,V),l(Tn,V),Y()},x=V=>{var z,R,W,q;if((z=c.value)!=null&&z.isComposing)return;const A=Gt(V);switch(A){case ye.left:case ye.right:Y();break;case ye.up:case ye.down:if(!v.value)return;V.preventDefault(),(R=f.value)==null||R.navigateOptions(A===ye.up?"prev":"next");break;case ye.enter:case ye.numpadEnter:if(!v.value){a.type!=="textarea"&&Y();return}V.preventDefault(),(W=f.value)!=null&&W.hoverOption?(q=f.value)==null||q.selectHoverOption():v.value=!1;break;case ye.esc:if(!v.value)return;V.preventDefault(),v.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=L();if(!ve)return;const pe=ve.value,re=C.value.find(_=>_.value===Q);if((We(a.checkIsWhole)?a.checkIsWhole(Q,ie):re)&&J!==-1&&J+1===Z){V.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,F()})}}}},{wrapperRef:$}=ho(c,{disabled:r,afterFocus(){Y()},beforeBlur(V){var A;return(A=d.value)==null?void 0:A.isFocusInsideContent(V)},afterBlur(){v.value=!1}}),T=()=>{Y()},P=V=>a.options.find(A=>V.value===A[b.value.value]),M=V=>{if(!m.value)return;const A=L();if(!A)return;const z=A.value,{split:R}=a,W=z.slice(m.value.end),q=W.startsWith(R),J=`${V.value}${q?"":R}`,Z=z.slice(0,m.value.start)+J+W;l(it,Z),l(Tn,Z),l("select",P(V),m.value.prefix);const Q=m.value.start+J.length+(q?1:0);Ae(()=>{A.selectionStart=Q,A.selectionEnd=Q,A.focus(),F()})},L=()=>{var V,A;return a.type==="textarea"?(V=c.value)==null?void 0:V.textarea:(A=c.value)==null?void 0:A.input},Y=()=>{setTimeout(()=>{B(),F(),Ae(()=>{var V;return(V=d.value)==null?void 0:V.updatePopper()})},0)},B=()=>{const V=L();if(!V)return;const A=HX(V),z=V.getBoundingClientRect(),R=$.value.getBoundingClientRect();g.value={position:"absolute",width:0,height:`${A.height}px`,left:`${A.left+z.left-R.left}px`,top:`${A.top+z.top-R.top}px`}},F=()=>{const V=L();if(document.activeElement!==V){v.value=!1;return}const{prefix:A,split:z}=a;if(m.value=zX(V,A,z),m.value&&m.value.splitIndex===-1){v.value=!0,l("search",m.value.pattern,m.value.prefix);return}v.value=!1};return t({input:c,tooltip:d,dropdownVisible:k}),(V,A)=>(O(),H("div",{ref_key:"wrapperRef",ref:$,class:I(i(s).b())},[j(i(Un),pt(pt(o.value,V.$attrs),{ref_key:"elInputRef",ref:c,"model-value":e.modelValue,disabled:i(r),role:k.value?"combobox":void 0,"aria-activedescendant":k.value?E.value||"":void 0,"aria-controls":k.value?i(u):void 0,"aria-expanded":k.value||void 0,"aria-label":e.ariaLabel,"aria-autocomplete":k.value?"none":void 0,"aria-haspopup":k.value?"listbox":void 0,onInput:N,onKeydown:x,onMousedown:T}),va({_:2},[bt(V.$slots,(z,R)=>({name:R,fn:X(W=>[ne(V.$slots,R,Cl(kl(W)))])}))]),1040,["model-value","disabled","role","aria-activedescendant","aria-controls","aria-expanded","aria-label","aria-autocomplete","aria-haspopup"]),j(i(Hn),{ref_key:"tooltipRef",ref:d,visible:k.value,"popper-class":[i(s).e("popper"),e.popperClass],"popper-style":e.popperStyle,"popper-options":e.popperOptions,placement:p.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(()=>[j(GX,{ref_key:"dropdownRef",ref:f,options:S.value,disabled:i(r),loading:e.loading,"content-id":i(u),"aria-label":e.ariaLabel,onSelect:M,onClick:A[0]||(A[0]=Je(z=>{var R;return(R=c.value)==null?void 0:R.focus()},["stop"]))},va({_:2},[bt(V.$slots,(z,R)=>({name:R,fn:X(W=>[ne(V.$slots,R,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=D(),{width:n,height:a}=Ii(t);return{containerEl:t,containerSize:w(()=>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=D(0),r=D(null);let u=[],c=vt;const d=w(()=>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,r.value={index:h,confirmed:!1},u=n.value},v=(h,b)=>{var P;let y=null;if((!r.value||!r.value.confirmed)&&b!==0){if(b>0)y=h,r.value={index:h,confirmed:!0};else for(let M=h;M>=0;M-=1)if(u[M]>0){y=M,r.value={index:M,confirmed:!0};break}}const C=y??((P=r.value)==null?void 0:P.index)??h,S=[...u],k=C+1,E=o(d.value[C][0],0),N=o(d.value[k][0],0),x=o(d.value[C][1],t.value||0),$=o(d.value[k][1],t.value||0);let T=b;S[C]+Tx&&(T=x-S[C]),S[k]-T>$&&(T=S[k]-$),S[C]+=T,S[k]-=T,s.value=T,c=()=>{e.value.forEach((M,L)=>{M.size=S[L]}),c=vt},a.value||c()},g=()=>{a.value&&c(),s.value=0,r.value=null,u=[]},m=[];return{lazyOffset:s,onMoveStart:f,onMoving:v,onMoveEnd:g,movingIndex:r,onCollapse:(h,b)=>{m.length||m.push(...n.value.map((N,x)=>{var $;return N<=0?o(($=d.value[x])==null?void 0:$[0],0):N}));const y=n.value,C=b==="start"?h:h+1,S=b==="start"?h+1:h,k=y[C],E=y[S];if(k!==0&&E!==0)y[C]=0,y[S]+=k,m[h]=k;else{const N=k+E,x=ya(m[h],0,N),$=N-x;y[S]=x,y[C]=$}e.value.forEach((N,x)=>{N.size=y[x]})}}}function oJ(e,t){const n=w(()=>e.value.map(s=>s.size)),a=w(()=>e.value.length),l=D([]);fe([n,a,t],()=>{var c;let s=[],r=0;for(let d=0;dd+(f||0),0);if(u>1||!r){const d=1/u;s=s.map(f=>f===void 0?0:f*d)}else{const d=(1-u)/r;s=s.map(f=>f===void 0?d:f)}l.value=s});const o=s=>s*t.value;return{percentSizes:l,pxSizes:w(()=>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:r,containerSize:u}=aJ(o),{removeChild:c,children:d,addChild:f,ChildrenSorter:v}=Jd(ht(),"ElSplitterPanel");fe(d,()=>{h.value=null,d.value.forEach((T,P)=>{T.setIndex(P)})});const{percentSizes:g,pxSizes:m}=oJ(d,u),{lazyOffset:p,movingIndex:h,onMoveStart:b,onMoving:y,onMoveEnd:C,onCollapse:S}=lJ(d,u,m,s),k=w(()=>({[n.cssVarBlockName("bar-offset")]:s.value?`${p.value}px`:void 0}));return Tt(yE,Ft({panels:d,percentSizes:g,pxSizes:m,layout:o,lazy:s,movingIndex:h,containerSize:u,onMoveStart:T=>{b(T),a("resizeStart",T,m.value)},onMoving:(T,P)=>{y(T,P),s.value||a("resize",T,m.value)},onMoveEnd:async T=>{C(),await Ae(),a("resizeEnd",T,m.value)},onCollapse:(T,P)=>{S(T,P),a("collapse",T,P,m.value)},registerPanel:f,unregisterPanel:c})),(T,P)=>(O(),H("div",{ref_key:"containerEl",ref:r,class:I([i(n).b(),i(n).e(o.value)]),style:je(k.value)},[ne(T.$slots,"default"),j(i(v)),te(" Prevent iframe touch events from breaking "),i(h)?(O(),H("div",{key:0,class:I([i(n).e("mask"),i(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=w(()=>a.layout==="horizontal"),s=w(()=>o.value?{width:0}:{height:0}),r=w(()=>({width:o.value?"16px":"100%",height:o.value?"100%":"16px",cursor:a.resizable?o.value?"ew-resize":"ns-resize":"auto",touchAction:"none"})),u=w(()=>{const y=n.e("dragger");return{[`${y}-horizontal`]:o.value,[`${y}-vertical`]:!o.value,[`${y}-active`]:!!c.value}}),c=D(null),d=y=>{a.resizable&&(c.value=[y.pageX,y.pageY],l("moveStart",a.index),window.addEventListener("mouseup",m),window.addEventListener("mousemove",v))},f=y=>{if(a.resizable&&y.touches.length===1){y.preventDefault();const C=y.touches[0];c.value=[C.pageX,C.pageY],l("moveStart",a.index),window.addEventListener("touchend",p),window.addEventListener("touchmove",g)}},v=y=>{const{pageX:C,pageY:S}=y,k=C-c.value[0],E=S-c.value[1],N=o.value?k:E;l("moving",a.index,N)},g=y=>{if(y.touches.length===1){y.preventDefault();const C=y.touches[0],S=C.pageX-c.value[0],k=C.pageY-c.value[1],E=o.value?S:k;l("moving",a.index,E)}},m=()=>{c.value=null,window.removeEventListener("mouseup",m),window.removeEventListener("mousemove",v),l("moveEnd",a.index)},p=()=>{c.value=null,window.removeEventListener("touchend",p),window.removeEventListener("touchmove",g),l("moveEnd",a.index)},h=w(()=>o.value?ro:Zd),b=w(()=>o.value?ra:jl);return(y,C)=>(O(),H("div",{class:I([i(n).b()]),style:je(s.value)},[e.startCollapsible?(O(),H("div",{key:0,class:I([i(n).e("collapse-icon"),i(n).e(`${e.layout}-collapse-icon-start`)]),onClick:C[0]||(C[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:I([i(n).e("dragger"),u.value,i(n).is("disabled",!e.resizable),i(n).is("lazy",e.resizable&&e.lazy)]),style:je(r.value),onMousedown:d,onTouchstart:f},null,38),e.endCollapsible?(O(),H("div",{key:1,class:I([i(n).e("collapse-icon"),i(n).e(`${e.layout}-collapse-icon-end`)]),onClick:C[1]||(C[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=ze(yE);s||rn(T0,"usage: ");const{panels:r,layout:u,lazy:c,containerSize:d,pxSizes:f}=Fn(s),{registerPanel:v,unregisterPanel:g,onCollapse:m,onMoveEnd:p,onMoveStart:h,onMoving:b}=s,y=D(),C=ht(),S=C.uid,k=D(0),E=w(()=>r.value[k.value]),N=A=>{k.value=A},x=w(()=>E.value?f.value[k.value]??0:0),$=w(()=>E.value?f.value[k.value+1]??0:0),T=w(()=>E.value?r.value[k.value+1]:null),P=w(()=>{var A;return T.value?l.resizable&&((A=T.value)==null?void 0:A.resizable)&&(x.value!==0||!l.min)&&($.value!==0||!T.value.min):!1}),M=w(()=>E.value?k.value!==r.value.length-1:!1),L=w(()=>x0(E.value,x.value,T.value,$.value)),Y=w(()=>x0(T.value,$.value,E.value,x.value));function B(A){return Hd(A)?Fd(A)*d.value||0:Kd(A)?zd(A):A??0}let F=!1;fe(()=>l.size,()=>{if(!F&&E.value){if(!d.value){E.value.size=l.size;return}const A=B(l.size),z=B(l.max),R=B(l.min),W=Math.min(Math.max(A,R||0),z||A);W!==A&&o("update:size",W),E.value.size=W}}),fe(()=>{var A;return(A=E.value)==null?void 0:A.size},A=>{A!==l.size&&(F=!0,o("update:size",A),Ae(()=>F=!1))}),fe(()=>l.resizable,A=>{E.value&&(E.value.resizable=A)});const V=Ft({uid:S,getVnode:()=>C.vnode,setIndex:N,...l,collapsible:w(()=>iJ(l.collapsible))});return v(V),zt(()=>g(V)),t({splitterPanelRef:y}),(A,z)=>(O(),H(Fe,null,[K("div",pt({ref_key:"panelEl",ref:y,class:[i(a).b()],style:{flexBasis:`${x.value}px`}},A.$attrs),[ne(A.$slots,"default")],16),M.value?(O(),oe(cJ,{key:0,index:k.value,layout:i(u),lazy:i(c),resizable:P.value,"start-collapsible":L.value,"end-collapsible":Y.value,onMoveStart:i(h),onMoving:i(b),onMoveEnd:i(p),onCollapse:i(m)},{"start-collapsible":X(()=>[ne(A.$slots,"start-collapsible")]),"end-collapsible":X(()=>[ne(A.$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,r=e.getAttribute(`infinite-scroll-${a}`);let u=t[r]??r??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:r,distance:u}=Im(e,l),{clientHeight:c,scrollHeight:d,scrollTop:f}=a,v=f-s;if(e[tl].lastScrollTop=f,o||r||v<0)return;let g=!1;if(n===e)g=d-(c+f)<=u;else{const{clientTop:m,scrollHeight:p}=e,h=mv(e,a);g=f+c>=h+m+p-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),r=s===window?document.documentElement:s,u=Oo(hJ.bind(null,e,a),l);if(s){if(e[tl]={instance:n,container:s,containerEl:r,delay:l,cb:a,onScroll:u,lastScrollTop:r.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=D(!1),o=Ft({...e,originalPosition:"",originalOverflow:"",visible:!1});function s(m){o.text=m}function r(){if(a)return;a=!0;const m=o.parent,p=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,p.bm("parent","relative")),m.removeAttribute("loading-number")),sa(m,p.bm("parent","hidden"))}u(),v.unmount();const h=g.$;h.vnode.el=null,h.subTree=null,v._container=null}function u(){var m,p;(p=(m=g.$el)==null?void 0:m.parentNode)==null||p.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,r()}const v=iw(ue({name:"ElLoading",setup(m,{expose:p}){const{ns:h,zIndex:b}=af("loading");return p({ns:h,zIndex:b}),()=>{const y=o.spinner||o.svg,C=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(j("div",{style:{backgroundColor:o.background||""},class:[h.b("mask"),o.customClass,h.is("fullscreen",o.fullscreen)]},[Ge("div",{class:h.b("spinner")},[C,S])]),[[At,o.visible]])])})}}}));Object.assign(v._context,t??{});const g=v.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 De(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")):Va(t,a.bm("parent","relative")),e.fullscreen&&e.lock?Va(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=De(c)&&(n==null?void 0:n[c])||c;return D(d)},o=c=>l(a(c)||e.getAttribute(ts(c))),s=a("fullscreen")??t.modifiers.fullscreen,r={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(r);u._context=hi._context,e[ti]={options:r,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}=Vh,l=e,o=n,s=D(!1),{ns:r,zIndex:u}=af("message"),{currentZIndex:c,nextZIndex:d}=u,f=D(),v=D(!1),g=D(0);let m;const p=w(()=>l.type?l.type==="error"?"danger":l.type:"info"),h=w(()=>{const L=l.type;return{[r.bm("icon",L)]:L&&zo[L]}}),b=w(()=>l.icon||zo[l.type]||""),y=w(()=>l.placement||"top"),C=w(()=>$J(l.id,y.value)),S=w(()=>Math.max(OJ(l.id,l.offset,y.value)+C.value,l.offset)),k=w(()=>g.value+S.value),E=w(()=>y.value.includes("left")?r.is("left"):y.value.includes("right")?r.is("right"):r.is("center")),N=w(()=>y.value.startsWith("top")?"top":"bottom"),x=w(()=>({[N.value]:`${S.value}px`,zIndex:c.value}));function $(){l.duration!==0&&({stop:m}=cr(()=>{P()},l.duration))}function T(){m==null||m()}function P(){v.value=!1,Ae(()=>{var L;s.value||((L=l.onClose)==null||L.call(l),o("destroy"))})}function M(L){Gt(L)===ye.esc&&P()}return mt(()=>{$(),d(),v.value=!0}),fe(()=>l.repeatNum,()=>{T(),$()}),Ht(document,"keydown",M),on(f,()=>{g.value=f.value.getBoundingClientRect().height}),t({visible:v,bottom:k,close:P}),(L,Y)=>(O(),oe(zn,{name:i(r).b("fade"),onBeforeEnter:Y[0]||(Y[0]=B=>s.value=!0),onBeforeLeave:e.onClose,onAfterLeave:Y[1]||(Y[1]=B=>L.$emit("destroy")),persisted:""},{default:X(()=>[ft(K("div",{id:e.id,ref_key:"messageRef",ref:f,class:I([i(r).b(),{[i(r).m(e.type)]:e.type},i(r).is("closable",e.showClose),i(r).is("plain",e.plain),i(r).is("bottom",N.value==="bottom"),E.value,e.customClass]),style:je(x.value),role:"alert",onMouseenter:T,onMouseleave:$},[e.repeatNum>1?(O(),oe(i(hC),{key:0,value:e.repeatNum,type:p.value,class:I(i(r).e("badge"))},null,8,["value","type","class"])):te("v-if",!0),b.value?(O(),oe(i(Be),{key:1,class:I([i(r).e("icon"),h.value])},{default:X(()=>[(O(),oe(dt(b.value)))]),_:1},8,["class"])):te("v-if",!0),!e.dangerouslyUseHTMLString||L.$slots.default?(O(),H("p",{key:2,class:I(i(r).e("content"))},[ne(L.$slots,"default",{},()=>[st(Se(e.message),1)])],2)):(O(),H(Fe,{key:3},[te(" Caution here, message could've been compromised, never use user's input as message "),K("p",{class:I(i(r).e("content")),innerHTML:e.message},null,10,MJ)],2112)),e.showClose?(O(),oe(i(Be),{key:4,class:I(i(r).e("closeBtn")),onClick:Je(P,["stop"])},{default:X(()=>[j(i(a))]),_:1},8,["class"])):te("v-if",!0)],46,NJ),[[At,v.value]])]),_:3},8,["name","onBeforeLeave"]))}}),IJ=PJ;let RJ=1;const _J=e=>{if(!e.appendTo)e.appendTo=document.body;else if(De(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&&De(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||De(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()},DJ=({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)}},r=j(IJ,s,We(s.message)||Jt(s.message)?{default:We(s.message)?s.message:()=>s.message}:null);r.appContext=n||Ns._context,Bo(r,o),e.appendChild(o.firstElementChild);const u=r.component,c={id:a,vnode:r,vm:u,handler:{close:()=>{u.exposed.close()}},props:r.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 r;return((r=s.props)==null?void 0:r.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=DJ(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 VJ(e){for(const t in ol)if(Dt(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=VJ;Ns.closeAllByPlacement=BJ;Ns._context=null;const An=jS(Ns,"$message");var FJ=ue({name:"ElMessageBox",directives:{TrapFocus:LD},components:{ElButton:Bn,ElFocusTrap:Nr,ElInput:Un,ElOverlay:sm,ElIcon:Be,...Vh},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",w(()=>e.buttonSize)),{t:s}=n,{nextZIndex:r}=a,u=D(!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:r()}),d=w(()=>{const V=c.type;return{[l.bm("icon",V)]:V&&zo[V]}}),f=Xn(),v=Xn(),g=w(()=>{const V=c.type;return c.icon||V&&zo[V]||""}),m=w(()=>!!c.message),p=D(),h=D(),b=D(),y=D(),C=D(),S=w(()=>c.confirmButtonClass);fe(()=>c.inputValue,async V=>{await Ae(),e.boxType==="prompt"&&V&&L()},{immediate:!0}),fe(()=>u.value,V=>{var A;V&&(e.boxType!=="prompt"&&(c.autofocus?b.value=((A=C.value)==null?void 0:A.$el)??p.value:b.value=p.value),c.zIndex=r()),e.boxType==="prompt"&&(V?Ae().then(()=>{y.value&&y.value.$el&&(c.autofocus?b.value=Y()??p.value:b.value=p.value)}):(c.editorErrorMessage="",c.validateError=!1))});const k=w(()=>e.draggable),E=w(()=>e.overflow),{isDragging:N}=rS(p,h,k,E);mt(async()=>{await Ae(),e.closeOnHashChange&&window.addEventListener("hashchange",x)}),zt(()=>{e.closeOnHashChange&&window.removeEventListener("hashchange",x)});function x(){u.value&&(u.value=!1,Ae(()=>{c.action&&t("action",c.action)}))}const $=()=>{e.closeOnClickModal&&M(c.distinguishCancelAndClose?"close":"cancel")},T=Nh($),P=V=>{var A;if(c.inputType!=="textarea"&&!((A=y.value)!=null&&A.isComposing))return V.preventDefault(),M("confirm")},M=V=>{var A;e.boxType==="prompt"&&V==="confirm"&&!L()||(c.action=V,c.beforeClose?(A=c.beforeClose)==null||A.call(c,V,c,x):x())},L=()=>{if(e.boxType==="prompt"){const V=c.inputPattern;if(V&&!V.test(c.inputValue||""))return c.editorErrorMessage=c.inputErrorMessage||s("el.messagebox.error"),c.validateError=!0,!1;const A=c.inputValidator;if(We(A)){const z=A(c.inputValue);if(z===!1)return c.editorErrorMessage=c.inputErrorMessage||s("el.messagebox.error"),c.validateError=!0,!1;if(De(z))return c.editorErrorMessage=z,c.validateError=!0,!1}}return c.editorErrorMessage="",c.validateError=!1,!0},Y=()=>{var A;const V=(A=y.value)==null?void 0:A.$refs;return(V==null?void 0:V.input)??(V==null?void 0:V.textarea)},B=()=>{M("close")},F=()=>{e.closeOnPressEscape&&B()};return e.lockScroll&&Wd(u,{ns:l}),{...Fn(c),ns:l,overlayEvent:T,visible:u,hasMessage:m,typeClass:d,contentId:f,inputId:v,btnSize:o,iconComponent:g,confirmButtonClasses:S,rootRef:p,focusStartRef:b,headerRef:h,inputRef:y,isDragging:N,confirmRef:C,doClose:x,handleClose:B,onCloseRequested:F,handleWrapperClick:$,handleInputEnter:P,handleAction:M,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"),r=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(j(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:I(`${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))},[j(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:I([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:I([e.ns.e("header"),{"show-close":e.showClose}])},[K("div",{class:I(e.ns.e("title"))},[e.iconComponent&&e.center?(O(),oe(s,{key:0,class:I([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:I(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"]))},[j(s,{class:I(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:I(e.ns.e("content"))},[K("div",{class:I(e.ns.e("container"))},[e.iconComponent&&!e.center&&e.hasMessage?(O(),oe(s,{key:0,class:I([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:I(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:I(e.ns.e("input"))},[j(r,{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:I({invalid:e.validateError}),onKeydown:an(e.handleInputEnter,["enter"])},null,8,["id","modelValue","type","placeholder","aria-invalid","class","onKeydown"]),K("div",{class:I(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:I(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:I([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(j(u,{ref:"confirmRef",type:e.confirmButtonType==="text"?"":e.confirmButtonType,text:e.confirmButtonType==="text",loading:e.confirmButtonLoading,"loading-icon":e.confirmButtonLoadingIcon,class:I([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&&(De(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=j(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 r;e.showInput?r={value:l.inputValue,action:o}:r=o,e.callback?e.callback(r,a.proxy):o==="cancel"||o==="close"?e.distinguishCancelAndClose&&o!=="cancel"?s.reject("close"):s.reject("cancel"):s.resolve(r)};const a=YJ(e,n,t),l=a.proxy;for(const o in e)Dt(e,o)&&!Dt(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 De(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,r=D(!1);let u;const c=D(100);let d=0,f=0;const v=w(()=>{const L=n.type;return L&&zo[n.type]?a.m(L):""}),g=w(()=>!!n.progress&&n.duration>0),m=w(()=>{switch(n.type){case"success":return"success";case"warning":return"warning";case"error":return"exception";default:return}}),p=w(()=>({status:m.value,strokeWidth:3,showText:!1,...typeof n.progress=="object"?n.progress:void 0})),h=w(()=>n.type&&zo[n.type]||n.icon),b=w(()=>n.position.endsWith("right")?"right":"left"),y=w(()=>n.position.startsWith("top")?"top":"bottom"),C=w(()=>({[y.value]:`${n.offset}px`,zIndex:n.zIndex??s.value})),{pause:S,resume:k}=UI(()=>{c.value=Math.max(0,100-(d+Date.now()-f)/n.duration*100)},100,{immediate:!1});function E(){if(n.duration<=0)return;u==null||u(),S(),f=Date.now();const L=Math.max(0,n.duration-d);({stop:u}=cr(()=>{r.value&&P()},L)),g.value&&(c.value=L/n.duration*100,k())}function N(){u==null||u(),S(),f>0&&(d+=Date.now()-f,f=0)}let x=!1;function $(){x=!0,n.pauseOnHover&&N()}function T(){x=!1,n.pauseOnHover&&E()}function P(){r.value=!1,N()}function M(L){switch(Gt(L)){case ye.delete:case ye.backspace:N();break;case ye.esc:r.value&&P();break;default:if(x&&n.pauseOnHover)break;N(),E()}}return mt(()=>{E(),o(),r.value=!0}),Ht(document,"keydown",M),t({visible:r,close:P}),(L,Y)=>(O(),oe(zn,{name:i(a).b("fade"),onBeforeLeave:e.onClose,onAfterLeave:Y[1]||(Y[1]=B=>L.$emit("destroy")),persisted:""},{default:X(()=>[ft(K("div",{id:e.id,class:I([i(a).b(),e.customClass,b.value]),style:je(C.value),role:"alert",onMouseenter:$,onMouseleave:T,onClick:Y[0]||(Y[0]=(...B)=>e.onClick&&e.onClick(...B))},[h.value?(O(),oe(i(Be),{key:0,class:I([i(a).e("icon"),v.value])},{default:X(()=>[(O(),oe(dt(h.value)))]),_:1},8,["class"])):te("v-if",!0),K("div",{class:I(i(a).e("group"))},[K("h2",{class:I(i(a).e("title")),textContent:Se(e.title)},null,10,nZ),ft(K("div",{class:I(i(a).e("content")),style:je(e.title?void 0:{margin:0})},[ne(L.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(O(),H(Fe,{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(i(Be),{key:0,class:I(i(a).e("closeBtn")),onClick:Je(P,["stop"])},{default:X(()=>[(O(),oe(dt(e.closeIcon)))]),_:1},8,["class"])):te("v-if",!0)],2),g.value?(O(),H("div",{key:1,class:I(i(a).e("progress")),"aria-hidden":"true"},[j(i(fm),pt(p.value,{percentage:c.value}),null,16,["percentage"])],2)):te("v-if",!0)],46,tZ),[[At,r.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:()=>{}};(De(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 r=document.body;wa(e.appendTo)?r=e.appendTo:De(e.appendTo)&&(r=document.querySelector(e.appendTo)),wa(r)||(Kt("ElNotification","the appendTo option is not an HTMLElement. Falling back to document.body."),r=document.body);const u=document.createElement("div"),c=j(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}),r.appendChild(u.firstElementChild),{close:()=>{c.component.exposed.close()}}};xE.forEach(e=>{Ms[e]=(t={},n)=>((De(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,r=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=w(()=>{const b=Hn.props,y=me(b)?b:Object.keys(b);return Ll(a,y)}),s=he("popover"),r=D(),u=w(()=>{var b;return(b=i(r))==null?void 0:b.popperRef}),c=w(()=>[{width:fn(a.width)},a.popperStyle]),d=w(()=>[s.b(),a.popperClass,{[s.m("plain")]:!!a.content}]),f=w(()=>a.transition===`${s.namespace.value}-fade-in-linear`),v=()=>{var b;(b=r.value)==null||b.hide()},g=()=>{l("before-enter")},m=()=>{l("before-leave")},p=()=>{l("after-enter")},h=()=>{l("update:visible",!1),l("after-leave")};return t({popperRef:u,hide:v}),(b,y)=>(O(),oe(i(Hn),pt({ref_key:"tooltipRef",ref:r},o.value,{"aria-label":e.title,"popper-class":d.value,"popper-style":c.value,"gpu-acceleration":f.value,onBeforeShow:g,onBeforeHide:m,onShow:p,onHide:h}),{content:X(()=>[e.title?(O(),H("div",{key:0,class:I(i(s).e("title")),role:"title"},Se(e.title),3)):te("v-if",!0),ne(b.$slots,"default",{hide:v},()=>[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=[D3,tA,g8,BY,k8,E8,M8,hC,F8,z8,Bn,xC,ZV,nB,gB,bB,I6,Ok,D6,ll,QB,tm,Y6,iF,uF,of,Bk,DF,Y8,WF,jF,qF,YF,UF,fH,Uk,SH,CH,DH,n2,XH,DK,VK,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,MV,Qj,o7,s7,T7,P7,Wk,az,V7,B7,G7,lY,oY,VY,eU,tU,oo,xm,aV,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=D(!1),s=D(!1),r=D(null),u=D(_Z()),c=D(!1),d=D(0),f=D(!1);let v=null,g="",m=null,p=null;const h=(z,R)=>{r.value=z?{type:z,text:R}:null};mt(async()=>{try{const z=await M0();pp(l,z)}catch(z){z.code===401&&(s.value=!0)}o.value=!0,N()}),fe(l,()=>{!o.value||c.value||(clearTimeout(p),p=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(R){R.code===401?s.value=!0:An.error("配置保存失败:"+R.message)}}function y(){Object.assign(l,t?t(l):{}),h(null),An.info("已恢复默认配置")}async function C(){try{const z=await TZ(),R=z.fields||{};if(!Object.keys(R).length){An.info("暂无上次执行参数");return}pp(l,R),An.success("已恢复上次执行参数"+(z.at?`(${z.at})`:""))}catch(z){z.code===401?s.value=!0:An.error("恢复上次参数失败:"+z.message)}}const S=D([]),k=D(""),E=w(()=>[{value:"",label:"当前配置(自动保存)"},...S.value.map(z=>({value:z.id,label:z.name}))]);async function N(){try{const z=await $Z();S.value=z.configs||[]}catch{}}function x(z){if(!z)return;const R=S.value.find(W=>W.id===z);R&&(pp(l,R.fields),An.success(`已应用方案「${R.name}」`))}async function $(){const z=S.value.find(q=>q.id===k.value);let R="";try{({value:R}=await Cc.prompt("方案保存到本机(同名覆盖,密码明文保存,每套方案可绑定不同账号),供「定时任务」引用:到点自动取该方案的最新参数执行。","存为配置方案",{inputValue:z?z.name:"",confirmButtonText:"保存方案",cancelButtonText:"取消",inputPattern:/\S/,inputErrorMessage:"请输入方案名称"}))}catch{return}if(R=String(R).trim(),!R)return;const W=S.value.find(q=>q.name===R);if(W)try{await Cc.confirm(`已存在同名方案「${W.name}」,保存将覆盖它的参数(多套不同配置请用不同名称)。`,"覆盖已有方案",{type:"warning",confirmButtonText:"覆盖保存",cancelButtonText:"取消"})}catch{return}try{const q=await OZ(R,fp(l));await N(),k.value=q.config?q.config.id:"",An.success(`方案「${R}」已保存`)}catch(q){q.code===401?s.value=!0:An.error("方案保存失败:"+q.message)}}async function T(){const z=S.value.find(R=>R.id===k.value);if(z){try{await Cc.confirm(`删除配置方案「${z.name}」?引用它的定时任务到点会跳过触发并提示重选。`,"删除方案",{type:"warning",confirmButtonText:"删除",cancelButtonText:"取消"})}catch{return}try{await NZ(z.id),k.value="",await N(),An.success("方案已删除")}catch(R){An.error("方案删除失败:"+R.message)}}}async function P(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 R=a?a(l):fp(l);z&&(R.action=z),g=(await MZ(R)).run_id,L(),Y()}catch(R){c.value=!1,B(),R.code===401?(s.value=!0,h("error","登录态未就绪,本次没有启动,请稍后重试")):R.code===409?h("warn","已取消加入执行队列,本次没有启动"):h("error","启动执行失败:"+R.message)}}}}async function M(){if(!(!g||f.value)){f.value=!0;try{await IZ(g),An.warning("已发出强制停止指令,正在终止执行进程…")}catch(z){An.error("停止失败:"+z.message)}finally{f.value=!1}}}function L(){v&&v.readyState<=1||(v=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?F():z.status==="cancelled"?V(z.error):A(z.error||"执行失败")))}),v.onclose=()=>{v=null})}function Y(){B(),m=setInterval(async()=>{var z;if(g)try{const R=await PZ(g);R.status==="done"?F((z=R.result)==null?void 0:z.summary):R.status==="cancelled"?V(R.error):R.status==="error"&&A(R.error||"执行失败")}catch{}},5e3)}function B(){m&&(clearInterval(m),m=null)}function F(z){B(),c.value=!1,d.value=100,z&&h("ok",z)}function V(z){B(),c.value=!1,h("warn","任务已取消:"+(z||"用户已停止"))}function A(z){B(),c.value=!1,h("error","执行失败:"+z)}return{form:l,loaded:o,needLogin:s,notice:r,lastSavedAt:u,running:c,progress:d,stopping:f,saveNow:b,resetDefaults:y,restoreLastFields:C,schemes:S,schemeSel:k,schemeOptions:E,onSchemeChange:x,saveSchemeAs:$,removeScheme:T,run:P,forceStop:M}}const DZ={class:"page"},VZ={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"},nQ={class:"grid grid-switch"},aQ={class:"actions"},lQ={key:2,class:"runline"},oQ={class:"pct"},sQ={__name:"App",setup(e){const t=[{value:"dry_run",label:"试算(不写 ERP)",desc:"只组装 + 查重 + 校验,ERP 里什么都不建"},{value:"draft",label:"只建草稿",desc:"建单为草稿(A),人工在 ERP 核对后再提交"},{value:"submit",label:"建单并提交",desc:"建单后立即提交(B),直接进入审批流"}],n=()=>({ref_month:"",ledger_dir:"D:\\资料\\人资\\预支",ledger_workbook:"D:\\资料\\人资\\预支\\1030工资预支付款申请--已付.xlsx",ledger_file:"",default_applicant_staff:"37004121",default_applicant_name:"陈莲",erp_system:"自动",erp_username:"",erp_password:"",erp_username_old:"",erp_password_old:"",run_mode:"dry_run",print_enabled:!1,printer:"人力资源部",copies:1,dingtalk_enabled:!0,debug_mode:!1}),{form:a,needLogin:l,notice:o,lastSavedAt:s,running:r,progress:u,stopping:c,saveNow:d,resetDefaults:f,restoreLastFields:v,schemeSel:g,schemeOptions:m,onSchemeChange:p,saveSchemeAs:h,removeScheme:b,run:y,forceStop:C}=LZ({defaults:n,validate(){return a.run_mode==="dry_run"?!0:!a.erp_username||!a.erp_password?(An.error("非试算模式必须填新版 ERP 账号密码"),!1):a.erp_system==="旧版"&&!(a.erp_username_old||a.erp_username)?(An.error("旧版 ERP 账号不能为空(或填写新版账号以便沿用)"),!1):((!a.erp_username_old||!a.erp_password_old)&&An.info("旧版账密留空:旧系统将沿用新版账号密码"),a.run_mode==="submit"&&An.warning("「建单并提交」会把单据送进审批流,请确认台账与口径无误"),!0)}}),S=w(()=>a.run_mode==="submit"?"建单并提交":a.run_mode==="draft"?"建草稿":"开始试算"),k=D(!1),E=D("");async function N($){E.value=$;try{const T=await fetch("/api/dialog/file",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:$==="ledger_workbook"?"选择目标工作簿":"选择台账文件",current:a[$]||"",filters:["xlsx","xlsm"]})}),P=await T.json().catch(()=>({}));if(!T.ok)throw new Error(P.detail||P.error||"HTTP "+T.status);!P.canceled&&P.path&&(a[$]=P.path)}catch(T){An.warning("打开文件选择失败:"+T.message)}finally{E.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:a.ledger_dir||""})}),T=await $.json().catch(()=>({}));if(!$.ok)throw new Error(T.detail||T.error||"HTTP "+$.status);T.path&&(a.ledger_dir=T.path)}catch($){An.warning("打开文件夹选择失败:"+$.message)}finally{k.value=!1}}return($,T)=>{const P=Pt("el-option"),M=Pt("el-select"),L=Pt("el-button"),Y=Pt("el-date-picker"),B=Pt("el-form-item"),F=Pt("el-input"),V=Pt("el-form"),A=Pt("el-input-number"),z=Pt("el-switch");return O(),H("div",DZ,[K("div",VZ,[T[24]||(T[24]=K("span",{class:"spacer"},null,-1)),K("span",{class:I(["saved",{"is-idle":!i(s)}])},[T[21]||(T[21]=K("i",null,null,-1)),st(Se(i(s)?"已保存 "+i(s):"尚未保存"),1)],2),j(M,{modelValue:i(g),"onUpdate:modelValue":T[0]||(T[0]=R=>Qt(g)?g.value=R:null),class:"scheme-sel",size:"small",disabled:i(r),placeholder:"当前配置(自动保存)",onChange:i(p)},{default:X(()=>[(O(!0),H(Fe,null,bt(i(m),R=>(O(),oe(P,{key:R.value,label:R.label,value:R.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","disabled","onChange"]),j(L,{size:"small",disabled:i(r),onClick:i(h)},{default:X(()=>[...T[22]||(T[22]=[st("存为方案",-1)])]),_:1},8,["disabled","onClick"]),j(L,{size:"small",text:"",type:"danger",disabled:i(r)||!i(g),onClick:i(b)},{default:X(()=>[...T[23]||(T[23]=[st("删除",-1)])]),_:1},8,["disabled","onClick"])]),i(l)?(O(),H("div",BZ,[...T[25]||(T[25]=[K("span",{class:"n-ico"},"!",-1),K("span",null,"未登录:请先在壳子(工作台)登录统一账户,再刷新本界面",-1)])])):i(o)?(O(),H("div",{key:1,class:I(["notice","is-"+i(o).type])},[K("span",FZ,Se(i(o).type==="ok"?"✓":i(o).type==="error"?"✕":"·"),1),K("span",null,Se(i(o).text),1)],2)):te("",!0),K("section",zZ,[T[30]||(T[30]=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,[j(V,{"label-position":"top"},{default:X(()=>[K("div",KZ,[j(B,{label:"台账月份"},{default:X(()=>[j(Y,{modelValue:i(a).ref_month,"onUpdate:modelValue":T[1]||(T[1]=R=>i(a).ref_month=R),type:"month","value-format":"YYYY-MM",format:"YYYY-MM",clearable:"",disabled:i(r),placeholder:"留空=当月"},null,8,["modelValue","disabled"])]),_:1}),j(B,{label:"台账目录"},{default:X(()=>[K("div",WZ,[j(F,{modelValue:i(a).ledger_dir,"onUpdate:modelValue":T[2]||(T[2]=R=>i(a).ledger_dir=R),class:"dir-input",disabled:i(r),clearable:"",placeholder:"留空 = D:\\资料\\人资\\预支"},null,8,["modelValue","disabled"]),j(L,{class:"dir-btn",disabled:i(r)||k.value,loading:k.value,onClick:x},{default:X(()=>[...T[26]||(T[26]=[st("选择",-1)])]),_:1},8,["disabled","loading"])])]),_:1}),j(B,{label:"目标工作簿"},{default:X(()=>[K("div",jZ,[j(F,{modelValue:i(a).ledger_workbook,"onUpdate:modelValue":T[3]||(T[3]=R=>i(a).ledger_workbook=R),class:"dir-input",disabled:i(r),clearable:"",placeholder:"留空 = 只导出独立文件"},null,8,["modelValue","disabled"]),j(L,{class:"dir-btn",disabled:i(r)||!!E.value,loading:E.value==="ledger_workbook",onClick:T[4]||(T[4]=R=>N("ledger_workbook"))},{default:X(()=>[...T[27]||(T[27]=[st("选择",-1)])]),_:1},8,["disabled","loading"])])]),_:1}),j(B,{label:"台账文件(可选)"},{default:X(()=>[K("div",qZ,[j(F,{modelValue:i(a).ledger_file,"onUpdate:modelValue":T[5]||(T[5]=R=>i(a).ledger_file=R),class:"dir-input",disabled:i(r),clearable:"",placeholder:"指定后跳过导出/追加"},null,8,["modelValue","disabled"]),j(L,{class:"dir-btn",disabled:i(r)||!!E.value,loading:E.value==="ledger_file",onClick:T[6]||(T[6]=R=>N("ledger_file"))},{default:X(()=>[...T[28]||(T[28]=[st("选择",-1)])]),_:1},8,["disabled","loading"])])]),_:1})])]),_:1}),T[29]||(T[29]=K("div",{class:"tip"},[st(" 按「预支报酬年月」调 EHR 接口导出(留空=当月),按表头名追加到目标工作簿的 "),K("b",null,"预支报酬台账"),st(":自动跳过同键行,保留序号与 AT~AW 公式列。 有效行:工号非空、金额 > 0、整行无 "),K("b",null,"#N/A"),st("。 ")],-1))])]),K("section",YZ,[T[32]||(T[32]=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,[j(V,{"label-position":"top"},{default:X(()=>[K("div",GZ,[j(B,{label:"系统分流"},{default:X(()=>[j(M,{modelValue:i(a).erp_system,"onUpdate:modelValue":T[7]||(T[7]=R=>i(a).erp_system=R),disabled:i(r)},{default:X(()=>[j(P,{label:"自动(按台账新旧系统列)",value:"自动"}),j(P,{label:"强制新版",value:"新版"}),j(P,{label:"强制旧版",value:"旧版"})]),_:1},8,["modelValue","disabled"])]),_:1}),j(B,{label:"新版 ERP 账号"},{default:X(()=>[j(F,{modelValue:i(a).erp_username,"onUpdate:modelValue":T[8]||(T[8]=R=>i(a).erp_username=R),disabled:i(r),clearable:"",placeholder:"新版账号"},null,8,["modelValue","disabled"])]),_:1}),j(B,{label:"新版 ERP 密码"},{default:X(()=>[j(F,{modelValue:i(a).erp_password,"onUpdate:modelValue":T[9]||(T[9]=R=>i(a).erp_password=R),type:"password","show-password":"",disabled:i(r),placeholder:"仅保存在本机"},null,8,["modelValue","disabled"])]),_:1}),j(B,{label:"旧版 ERP 账号"},{default:X(()=>[j(F,{modelValue:i(a).erp_username_old,"onUpdate:modelValue":T[10]||(T[10]=R=>i(a).erp_username_old=R),disabled:i(r),clearable:"",placeholder:"留空=沿用新版账号"},null,8,["modelValue","disabled"])]),_:1}),j(B,{label:"旧版 ERP 密码"},{default:X(()=>[j(F,{modelValue:i(a).erp_password_old,"onUpdate:modelValue":T[11]||(T[11]=R=>i(a).erp_password_old=R),type:"password","show-password":"",disabled:i(r),placeholder:"留空=沿用新版密码"},null,8,["modelValue","disabled"])]),_:1})])]),_:1}),T[31]||(T[31]=K("div",{class:"tip"},[K("b",null,"新旧系统是两套金蝶站点"),st(":台账「新旧系统」列为旧系统的行,用旧版账号密码登录; 其余走新版。旧版留空则沿用新版账密。分流口径:职位序列为「门店服务序列」且会馆不在 标准化门店名单 → 旧版(部门 BM000881),其余新版(BM000477)。 ")],-1))])]),K("section",XZ,[T[34]||(T[34]=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,[j(V,{"label-position":"top"},{default:X(()=>[K("div",ZZ,[j(B,{label:"默认发起人工号(E 列 / 报文申请人)"},{default:X(()=>[j(F,{modelValue:i(a).default_applicant_staff,"onUpdate:modelValue":T[12]||(T[12]=R=>i(a).default_applicant_staff=R),disabled:i(r),clearable:"",placeholder:"37004121"},null,8,["modelValue","disabled"])]),_:1}),j(B,{label:"默认发起人姓名(F 列)"},{default:X(()=>[j(F,{modelValue:i(a).default_applicant_name,"onUpdate:modelValue":T[13]||(T[13]=R=>i(a).default_applicant_name=R),disabled:i(r),clearable:"",placeholder:"陈莲"},null,8,["modelValue","disabled"])]),_:1})])]),_:1}),T[33]||(T[33]=K("div",{class:"tip"}," 发起人两列按这里回填「付款申请单#单据头(FBillHead)」E/F 列,也是建单报文的申请人(代提人); 打印完成后的钉钉提醒同样发给此人,无需再单独配置接收人。 其余口径逐行读模板:申请日期=D 列(当天)、付款用途=AH 列、期望付款日=AK 列($D+1)、 申请部门=W 列(BM000477 / BM000881)。 ",-1))])]),K("section",QZ,[T[36]||(T[36]=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,[j(V,{"label-position":"top"},{default:X(()=>[K("div",tQ,[j(B,{label:"执行方式"},{default:X(()=>[j(M,{modelValue:i(a).run_mode,"onUpdate:modelValue":T[14]||(T[14]=R=>i(a).run_mode=R),disabled:i(r)},{default:X(()=>[(O(),H(Fe,null,bt(t,R=>j(P,{key:R.value,label:R.label,value:R.value},null,8,["label","value"])),64))]),_:1},8,["modelValue","disabled"])]),_:1}),j(B,{label:"打印机"},{default:X(()=>[j(M,{modelValue:i(a).printer,"onUpdate:modelValue":T[15]||(T[15]=R=>i(a).printer=R),disabled:i(r)},{default:X(()=>[j(P,{label:"人力资源部(双面)",value:"人力资源部"}),j(P,{label:"信息技术部(单面)",value:"信息技术部"})]),_:1},8,["modelValue","disabled"])]),_:1}),j(B,{label:"打印份数"},{default:X(()=>[j(A,{modelValue:i(a).copies,"onUpdate:modelValue":T[16]||(T[16]=R=>i(a).copies=R),min:1,max:5,disabled:i(r)},null,8,["modelValue","disabled"])]),_:1})]),K("div",nQ,[j(B,{label:"建单后打印"},{default:X(()=>[j(z,{modelValue:i(a).print_enabled,"onUpdate:modelValue":T[17]||(T[17]=R=>i(a).print_enabled=R),disabled:i(r)},null,8,["modelValue","disabled"])]),_:1}),j(B,{label:"打印后钉钉提醒发起人"},{default:X(()=>[j(z,{modelValue:i(a).dingtalk_enabled,"onUpdate:modelValue":T[18]||(T[18]=R=>i(a).dingtalk_enabled=R),disabled:i(r)},null,8,["modelValue","disabled"])]),_:1}),j(B,{label:"调试日志"},{default:X(()=>[j(z,{modelValue:i(a).debug_mode,"onUpdate:modelValue":T[19]||(T[19]=R=>i(a).debug_mode=R),disabled:i(r)},null,8,["modelValue","disabled"])]),_:1})])]),_:1}),T[35]||(T[35]=K("div",{class:"tip"},[K("b",null,"试算"),st("不写 ERP,只组装+查重+校验;"),K("b",null,"只建草稿"),st("会真的建单(A 状态), 人工在 ERP 核对无误后再点提交;"),K("b",null,"建单并提交"),st("会立即提交进审批流(B)。 "),K("b",null,"发起前对账"),st("与"),K("b",null,"「预支办结流程」刷新固定开启"),st(":对账先查 ERP 已有单据 (受款人工号+金额一致才命中),查询失败会中止本批;流程刷新失败只告警、不阻断建单。 ")],-1))])]),T[44]||(T[44]=cT('口径速查▾
单据:CN_PAYAPPLY 付款申请单,单据类型 FKSQ006.0YS 个人工资付款申请。
申请人:E/F 列 = 默认发起人(代提人);往来/收款单位(H/K)才是受款员工。
收款账户:AM/AN/AO 取「预支办结流程」V/AC/AD(与模板 XLOOKUP 同源)。
明细备注:AP 按模板口径填金额。
打印:ERP 单据套打 + 「单子传递打印」本批行汇总,printkit 直连打印机。
',1)),K("div",aQ,[j(L,{type:"primary",class:"btn-run",loading:i(r),onClick:i(y)},{default:X(()=>[st(Se(i(r)?"执行中 "+i(u)+"%":S.value),1)]),_:1},8,["loading","onClick"]),i(r)?(O(),oe(L,{key:0,type:"danger",plain:"",loading:i(c),onClick:i(C)},{default:X(()=>[...T[37]||(T[37]=[st(" 强制停止 ",-1)])]),_:1},8,["loading","onClick"])):te("",!0),T[41]||(T[41]=K("span",{class:"spacer"},null,-1)),j(L,{disabled:i(r),onClick:i(v)},{default:X(()=>[...T[38]||(T[38]=[st("恢复上次参数",-1)])]),_:1},8,["disabled","onClick"]),j(L,{disabled:i(r),onClick:T[20]||(T[20]=R=>i(d)(!0))},{default:X(()=>[...T[39]||(T[39]=[st("保存配置",-1)])]),_:1},8,["disabled"]),j(L,{text:"",disabled:i(r),onClick:i(f)},{default:X(()=>[...T[40]||(T[40]=[st("恢复默认",-1)])]),_:1},8,["disabled","onClick"])]),i(r)?(O(),H("div",lQ,[T[42]||(T[42]=K("span",{class:"pulse"},null,-1)),T[43]||(T[43]=K("span",null,"正在执行,日志与进度实时显示在工作台下方「运行日志」区",-1)),K("span",oQ,Se(i(u))+"%",1)])):te("",!0)])}}};iw(sQ).use(kZ,{locale:EZ}).mount("#app")});export default rQ();
+ `}),u=w(()=>2*Math.PI*s.value),c=w(()=>n.type==="dashboard"?.75:1),d=w(()=>`${-1*u.value*(1-c.value)/2}px`),f=w(()=>({strokeDasharray:`${u.value*c.value}px, ${u.value}px`,strokeDashoffset:d.value})),v=w(()=>({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=w(()=>{let C;return n.color?C=y(n.percentage):C=t[n.status]||t.default,C}),m=w(()=>n.status==="warning"?Qd:n.type==="line"?n.status==="success"?Lh:ql:n.status==="success"?gr:Ya),p=w(()=>n.type==="line"?12+n.strokeWidth*.4:n.width*.111111+2),h=w(()=>n.format(n.percentage));function b(C){const S=100/C.length;return C.map((k,E)=>De(k)?{color:k,percentage:(E+1)*S}:k).sort((k,E)=>k.percentage-E.percentage)}const y=C=>{var k;const{color:S}=n;if(We(S))return S(C);if(De(S))return S;{const E=b(S);for(const N of E)if(N.percentage>C)return N.color;return(k=E[E.length-1])==null?void 0:k.color}};return(C,S)=>(O(),H("div",{class:I([i(a).b(),i(a).m(e.type),i(a).is(e.status),{[i(a).m("without-text")]:!e.showText,[i(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:I(i(a).b("bar"))},[K("div",{class:I(i(a).be("bar","outer")),style:je({height:`${e.strokeWidth}px`})},[K("div",{class:I([i(a).be("bar","inner"),{[i(a).bem("bar","inner","indeterminate")]:e.indeterminate},{[i(a).bem("bar","inner","striped")]:e.striped},{[i(a).bem("bar","inner","striped-flow")]:e.stripedFlow}]),style:je(l.value)},[(e.showText||C.$slots.default)&&e.textInside?(O(),H("div",{key:0,class:I(i(a).be("bar","innerText"))},[ne(C.$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:I(i(a).b("circle")),style:je({height:`${e.width}px`,width:`${e.width}px`})},[(O(),H("svg",hj,[K("path",{class:I(i(a).be("circle","track")),d:r.value,stroke:`var(${i(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:I(i(a).be("circle","path")),d:r.value,stroke:g.value,fill:"none",opacity:e.percentage?1:0,"stroke-linecap":e.strokeLinecap,"stroke-width":o.value,style:je(v.value)},null,14,gj)]))],6)),(e.showText||C.$slots.default)&&!e.textInside?(O(),H("div",{key:2,class:I(i(a).e("text")),style:je({fontSize:`${p.value}px`})},[ne(C.$slots,"default",{percentage:e.percentage},()=>[e.status?(O(),oe(i(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(A,z){const R=j=>rt(j),W=z[Object.keys(z).map(j=>+j).filter(j=>{const J=z[j];return R(J)&&J.excluded?Aj-J)[0]];return R(W)&&W.value||W}const l=e,o=n,s=ze(Hl,void 0),r=$n(),u=he("rate"),{inputId:c,isLabeledByFormItem:d}=Ea(l,{formItemContext:s}),f=D(ya(l.modelValue,0,l.max)),v=D(-1),g=D(!0),m=D([]),p=w(()=>m.value.map(A=>A.$el.clientWidth)),h=w(()=>[u.b(),u.m(r.value)]),b=sn(),y=w(()=>u.cssVarBlock({"void-color":l.voidColor,"disabled-void-color":l.disabledVoidColor,"fill-color":E.value})),C=w(()=>{let A="";return l.showScore?A=l.scoreTemplate.replace(/\{\s*value\s*\}/,b.value?`${l.modelValue}`:`${f.value}`):l.showText&&(A=l.texts[Math.ceil(f.value)-1]),A}),S=w(()=>l.modelValue*100-Math.floor(l.modelValue)*100),k=w(()=>me(l.colors)?{[l.lowThreshold]:l.colors[0],[l.highThreshold]:{value:l.colors[1],excluded:!0},[l.max]:l.colors[2]}:l.colors),E=w(()=>{const A=a(f.value,k.value);return rt(A)?"":A}),N=w(()=>{let A="";return b.value?A=`${S.value}%`:l.allowHalf&&(A="50%"),{color:E.value,width:A}}),x=w(()=>{let A=me(l.icons)?[...l.icons]:{...l.icons};return A=$l(A),me(A)?{[l.lowThreshold]:A[0],[l.highThreshold]:{value:A[1],excluded:!0},[l.max]:A[2]}:A}),$=w(()=>a(l.modelValue,x.value)),T=w(()=>b.value?De(l.disabledVoidIcon)?l.disabledVoidIcon:$l(l.disabledVoidIcon):De(l.voidIcon)?l.voidIcon:$l(l.voidIcon)),P=w(()=>a(f.value,x.value));function M(A){const z=b.value&&S.value>0&&A-1l.modelValue,R=l.allowHalf&&g.value&&A-.5<=f.value&&A>f.value;return z||R}function L(A){l.clearable&&A===l.modelValue&&(A=0),o(it,A),l.modelValue!==A&&o(yt,A)}function q(A){b.value||(l.allowHalf&&g.value?L(f.value):L(A))}function B(A){if(b.value)return;const z=Gt(A),R=l.allowHalf?.5:1;let W=f.value;switch(z){case ye.up:case ye.right:W+=R;break;case ye.left:case ye.down:W-=R}if(W=ya(W,0,l.max),W!==f.value)return A.stopPropagation(),A.preventDefault(),o(it,W),o(yt,W),W}function F(A,z){b.value||(l.allowHalf&&z?(g.value=z.offsetX*2<=p.value[A-1],f.value=g.value?A-.5:A):f.value=A,v.value=A)}function V(){b.value||(l.allowHalf&&(g.value=l.modelValue!==Math.floor(l.modelValue)),f.value=ya(l.modelValue,0,l.max),v.value=-1)}return fe(()=>l.modelValue,A=>{f.value=ya(A,0,l.max),g.value=l.modelValue!==Math.floor(l.modelValue)}),l.modelValue||o(it,0),t({setCurrentValue:F,resetCurrentValue:V}),(A,z)=>{var R;return O(),H("div",{id:i(c),class:I([h.value,i(u).is("disabled",i(b))]),role:"slider","aria-label":i(d)?void 0:e.ariaLabel||"rating","aria-labelledby":i(d)?(R=i(s))==null?void 0:R.labelId:void 0,"aria-valuenow":f.value,"aria-valuetext":C.value||void 0,"aria-valuemin":"0","aria-valuemax":e.max,style:je(y.value),tabindex:i(b)?void 0:0,"aria-disabled":i(b),onKeydown:B},[(O(!0),H(Fe,null,bt(e.max,(W,j)=>(O(),H("span",{key:j,class:I(i(u).e("item")),onMousemove:J=>F(W,J),onMouseleave:V,onClick:J=>q(W)},[U(i(Be),{ref_for:!0,ref_key:"iconRefs",ref:m,class:I([i(u).e("icon"),{hover:v.value===W},i(u).is("active",W<=f.value),i(u).is("focus-visible",W===Math.ceil(f.value||1))])},{default:X(()=>[ft((O(),oe(dt(P.value),null,null,512)),[[At,!M(W)&&W<=f.value]]),ft((O(),oe(dt(T.value),null,null,512)),[[At,!M(W)&&W>f.value]]),ft((O(),oe(dt(T.value),{class:I([i(u).em("decimal","box")])},null,8,["class"])),[[At,M(W)]]),ft(U(i(Be),{style:je(N.value),class:I([i(u).e("icon"),i(u).e("decimal")])},{default:X(()=>[(O(),oe(dt($.value)))]),_:1},8,["style","class"]),[[At,M(W)]])]),_:2},1032,["class"])],42,Ej))),128)),e.showText||e.showScore?(O(),H("span",{key:0,class:I(i(u).e("text")),style:je({color:e.textColor})},Se(C.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]:Di,[os.success]:J3,[os.warning]:Qd,[os.error]:Dh,[os.info]:Di},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=w(()=>{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:I(i(n).b())},[K("div",{class:I(i(n).e("icon"))},[ne(l.$slots,"icon",{},()=>[a.value.component?(O(),oe(dt(a.value.component),{key:0,class:I(a.value.class)},null,8,["class"])):te("v-if",!0)])],2),e.title||l.$slots.title?(O(),H("div",{key:0,class:I(i(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:I(i(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:I(i(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 Dj(e,t,n,a,l,o){return O(),H("div",{class:I(e.ns.be("group","title")),style:je({...e.style,lineHeight:`${e.height}px`})},Se(e.item.label),7)}var Vj=Rn(Lj,[["render",Dj]]);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=ze(pm),a=he("select"),l=ur?null:"mousemove",{hoverItem:o,selectOptionClick:s}=Bj(e,{emit:t}),{getLabel:r}=gu(n.props),u=n.contentId;return{ns:a,contentId:u,mouseMoveEventName:l,hoverItem:o,handleMousedown:d=>{let f=d.target;const v=d.currentTarget;for(;f&&f!==v;){if(Cs(f))return;f=f.parentElement}d.preventDefault()},selectOptionClick:s,getLabel:r}}});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=ze(pm),o=he("select"),{getLabel:s,getValue:r,getDisabled:u}=gu(l.props),c=D([]),d=D(),f=w(()=>e.data.length);fe(()=>f.value,()=>{var M,L;(L=(M=l.tooltipRef.value)==null?void 0:M.updatePopper)==null||L.call(M)});const v=w(()=>xt(l.props.estimatedOptionHeight)),g=w(()=>v.value?{itemSize:l.props.itemHeight}:{estimatedSize:l.props.estimatedOptionHeight,itemSize:M=>c.value[M]}),m=(M=[],L)=>{const{props:{valueKey:q}}=l;return rt(L)?M&&M.some(B=>Zt(Sn(B,q))===Sn(L,q)):M.includes(L)},p=(M,L)=>{if(rt(L)){const{valueKey:q}=l.props;return Sn(M,q)===Sn(L,q)}else return M===L},h=(M,L)=>l.props.multiple?m(M,r(L)):p(M,r(L)),b=(M,L)=>{const{disabled:q,multiple:B,multipleLimit:F}=l.props;return q||!L&&(B?F>0&&M.length>=F:!1)},y=M=>e.hoveringIndex===M;n({listRef:d,isSized:v,isItemDisabled:b,isItemHovering:y,isItemSelected:h,scrollToItem:M=>{const L=d.value;L&&L.scrollToItem(M)},resetScrollTop:()=>{const M=d.value;M&&M.resetScrollTop()}});const k=M=>{const{index:L,data:q,style:B}=M,F=i(v),{itemSize:V,estimatedSize:A}=i(g),{modelValue:z}=l.props,{onSelect:R,onHover:W}=l,j=q[L];if(j.type==="Group")return U(Vj,{item:j,style:B,height:F?V:A},null);const J=h(z,j),Z=b(z,J),Q=y(L);return U(Kj,pt(M,{selected:J,disabled:u(j)||Z,created:!!j.created,hovering:Q,item:j,onSelect:R,onHover:W}),{default:ee=>{var ie;return((ie=t.default)==null?void 0:ie.call(t,ee))||U("span",null,[s(j)])}})},{onKeyboardNavigate:E,onKeyboardSelect:N}=l,x=()=>{E("forward")},$=()=>{E("backward")},T=M=>{const L=Gt(M),{tab:q,esc:B,down:F,up:V,enter:A,numpadEnter:z}=ye;switch([B,F,V,A,z].includes(L)&&(M.preventDefault(),M.stopPropagation()),L){case q:case B:break;case F:x();break;case V:$();break;case A:case z:N()}},P=M=>{a("end-reached",M)};return()=>{var z,R,W,j;const{data:M,width:L}=e,{height:q,multiple:B,scrollbarAlwaysOn:F}=l.props,V=ur?!0:F,A=i(v)?bu:_B;return U("div",{class:[o.b("dropdown"),o.is("multiple",B)],style:{width:`${L}px`}},[(z=t.header)==null?void 0:z.call(t),((R=t.loading)==null?void 0:R.call(t))||((W=t.empty)==null?void 0:W.call(t))||U(A,pt({ref:d},i(g),{className:o.be("dropdown","list"),scrollbarAlwaysOn:V,data:M,height:q,width:L,total:M.length,innerElement:"ul",innerProps:{id:e.id,role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical"},onEndReached:P,onKeydown:T}),{default:J=>U(k,J,null)}),(j=t.footer)==null?void 0:j.call(t)])}}});function jj(e,t){const{aliasProps:n,getLabel:a,getValue:l}=gu(e),o=D(0),s=D(),r=w(()=>e.allowCreate&&e.filterable);fe(()=>e.options,g=>{const m=new Set(g.map(p=>a(p)));t.createdOptions=t.createdOptions.filter(p=>!m.has(a(p)))});function u(g){const m=p=>a(p)===g;return e.options&&e.options.some(m)||t.createdOptions.some(m)}function c(g){r.value&&(e.multiple&&g.created?o.value++:s.value=g)}function d(g){if(r.value)if(g&&g.length>0){if(u(g)){t.createdOptions=t.createdOptions.filter(p=>a(p)!==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(!r.value||!g||!g.created||g.created&&e.reserveKeyword&&t.inputValue===a(g))return;const m=t.createdOptions.findIndex(p=>l(p)===l(g));~m&&(t.createdOptions.splice(m,1),o.value--)}function v(){r.value&&(t.createdOptions.length=0,o.value=0)}return{createNewOption:d,removeNewOption:f,selectNewOption:c,clearAllNewOption:v}}const qj=(e,t)=>{const{t:n}=St(),a=mn(),l=he("select"),o=he("input"),{form:s,formItem:r}=Kn(),{inputId:u}=Ea(e,{formItemContext:r}),{aliasProps:c,getLabel:d,getValue:f,getDisabled:v,getOptions:g}=gu(e),{valueOnClear:m,isEmptyValue:p}=vu(e),h=Ft({inputValue:"",cachedOptions:[],createdOptions:[],hoveringIndex:-1,inputHovering:!1,collapseItemWidth:0,previousQuery:null,previousValue:void 0,selectedLabel:"",menuVisibleOnFocus:!1,isBeforeHide:!1}),b=D(-1),y=D(!1),C=D(),S=D(),k=D(),E=D(),N=D(),x=D(),$=D(),T=D(),P=D(),M=D(),{isComposing:L,handleCompositionStart:q,handleCompositionEnd:B,handleCompositionUpdate:F}=pu({afterComposition:Ne=>gn(Ne)}),V=sn(),{wrapperRef:A,isFocused:z,handleBlur:R}=ho(N,{disabled:V,afterFocus(){e.automaticDropdown&&!Z.value&&(Z.value=!0,h.menuVisibleOnFocus=!0)},beforeBlur(Ne){var ct,Ct;return((ct=k.value)==null?void 0:ct.isFocusInsideContent(Ne))||((Ct=E.value)==null?void 0:Ct.isFocusInsideContent(Ne))},afterBlur(){var Ne;Z.value=!1,h.menuVisibleOnFocus=!1,e.validateEvent&&((Ne=r==null?void 0:r.validate)==null||Ne.call(r,"blur").catch(vt))}}),W=w(()=>we("")),j=w(()=>e.loading?!1:e.options.length>0||h.createdOptions.length>0),J=D([]),Z=D(!1),Q=w(()=>(s==null?void 0:s.statusIcon)??!1),ee=w(()=>{const Ne=J.value.length*e.itemHeight;return Ne>e.height?e.height:Ne}),ie=w(()=>e.multiple?me(e.modelValue)&&e.modelValue.length>0:!p(e.modelValue)),ve=w(()=>e.clearable&&!V.value&&ie.value&&(z.value||h.inputHovering)),pe=w(()=>e.remote&&e.filterable&&!e.remoteShowSuffix?"":e.suffixIcon),re=w(()=>pe.value&&l.is("reverse",Z.value)),_=w(()=>(r==null?void 0:r.validateState)||""),Y=w(()=>{if(_.value)return ef[_.value]}),ae=w(()=>e.remote?e.debounce:0),le=w(()=>e.remote&&!h.inputValue&&!j.value),se=w(()=>e.loading?e.loadingText||n("el.select.loading"):e.filterable&&h.inputValue&&j.value&&J.value.length===0?e.noMatchText||n("el.select.noMatch"):j.value?null:e.noDataText||n("el.select.noData")),de=w(()=>e.filterable&&We(e.filterMethod)),be=w(()=>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=w(()=>{const Ne=new Map;return W.value.forEach((ct,Ct)=>{Ne.set(Re(f(ct)),{option:ct,index:Ct})}),Ne}),Pe=w(()=>{const Ne=new Map;return J.value.forEach((ct,Ct)=>{Ne.set(Re(f(ct)),{option:ct,index:Ct})}),Ne}),ge=w(()=>J.value.every(Ne=>v(Ne))),ke=$n(),Le=w(()=>ke.value==="small"?"small":"default"),qe=()=>{var ct;if(He(e.fitInputWidth)){b.value=e.fitInputWidth;return}const Ne=((ct=C.value)==null?void 0:ct.offsetWidth)||200;!e.fitInputWidth&&j.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=T.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=w(()=>{const Ne=nt();return{maxWidth:`calc(100% - ${(e.filterable&&!V.value?Ne+11:0)+(M.value&&e.maxCollapseTags===1?h.collapseItemWidth+Ne:0)}px)`}}),kt=w(()=>me(e.modelValue)?e.modelValue.length===0&&!h.inputValue:e.filterable?!h.inputValue:!0),Rt=w(()=>{const Ne=e.placeholder??n("el.select.placeholder");return e.multiple||!ie.value?Ne:h.selectedLabel}),Lt=w(()=>{var Ne,ct;return(ct=(Ne=k.value)==null?void 0:Ne.popperRef)==null?void 0:ct.contentRef}),_t=w(()=>{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(!p(e.modelValue)&&Pe.value.has(e.modelValue)){const{index:Ne}=Pe.value.get(e.modelValue);return Ne}return-1}),jt=w({get(){return Z.value&&(e.loading||!le.value||e.remote&&!!a.empty)&&(!y.value||!pa(h.previousQuery)||j.value)},set(Ne){Z.value=Ne}}),Yt=w(()=>e.multiple?e.collapseTags?h.cachedOptions.slice(0,e.maxCollapseTags):h.cachedOptions:[]),xe=w(()=>e.multiple?e.collapseTags?h.cachedOptions.slice(e.maxCollapseTags):[]:[]),{createNewOption:Ee,removeNewOption:Ke,selectNewOption:Xe,clearAllNewOption:Bt}=jj(e,h),ce=Ne=>{var ct;V.value||e.filterable&&Z.value&&Ne&&!((ct=$.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||L.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=Vt(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 Ds(!0)})},Vt=(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=M.value.getBoundingClientRect().width},Me=()=>{var Ne,ct;(ct=(Ne=k.value)==null?void 0:Ne.updatePopper)==null||ct.call(Ne)},Ve=()=>{var Ne,ct;(ct=(Ne=E.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=Vt(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=Vt(Ct,f(ct));$t>-1&&!V.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=N.value)==null||Ne.focus()},nn=()=>{var Ne;if(Z.value){Z.value=!1,Ae(()=>{var ct;return(ct=N.value)==null?void 0:ct.blur()});return}(Ne=N.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&&v(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)||V.value||Ct.length<=0||ge.value||L.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(v(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);R(ct)}},Nn=()=>(h.isBeforeHide=!1,Ae(()=>{~_t.value&&Za(_t.value)})),Za=Ne=>{T.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},Ds=(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))&&Ds(!0),!cn(Ne,ct)&&e.validateEvent&&((Ct=r==null?void 0:r.validate)==null||Ct.call(r,"change").catch(vt))},{deep:!0}),fe(()=>e.options,()=>{const Ne=N.value;(!Ne||Ne&&document.activeElement!==Ne)&&Ds()},{deep:!0,flush:"post"}),fe(()=>J.value,()=>(qe(),T.value&&Ae(T.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(()=>{Ds()}),on(C,()=>Wn(Ye)),on(A,Me),on(P,Ve),on(M,Xt);let Rr;return fe(()=>jt.value,Ne=>{Ne?Rr=on(T,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:V,selectSize:ke,needStatusIcon:Q,showClearBtn:ve,states:h,isFocused:z,nsSelect:l,nsInput:o,inputRef:N,menuRef:T,tagMenuRef:P,tooltipRef:k,tagTooltipRef:E,selectRef:C,wrapperRef:A,selectionRef:S,prefixRef:x,suffixRef:$,collapseItemRef:M,popperRef:Lt,validateState:_,validateIcon:Y,showTagList:Yt,collapseTagList:xe,debouncedOnInputChange:Ue,deleteTag:Nt,getLabel:d,getValue:f,getDisabled:v,getValueKey:Re,getIndex:Uo,handleClear:bo,handleClickOutside:ln,handleDel:pl,handleEsc:On,focus:qt,blur:nn,handleMenuEnter:Nn,handleResize:Ye,updateTooltip:Me,updateTagTooltip:Ve,updateOptions:Oe,toggleMenu:ce,scrollTo:Za,onInput:gn,onKeyboardNavigate:Ja,onKeyboardSelect:Te,onEndReached:Qe,onSelect:_e,onHover:ot,handleCompositionStart:q,handleCompositionEnd:B,handleCompositionUpdate:F}};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=w(()=>{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 r=w(()=>e.multiple?a.states.cachedOptions.map(u=>a.getLabel(u)):a.states.selectedLabel);return{...a,modelValue:n,selectedLabel:r,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"),r=Pt("el-tooltip"),u=Pt("el-icon"),c=Pt("el-select-menu"),d=C1("click-outside");return ft((O(),H("div",{ref:"selectRef",class:I([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)},[U(r,{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:I([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((...v)=>e.toggleMenu&&e.toggleMenu(...v),["prevent"]))},[e.$slots.prefix?(O(),H("div",{key:0,ref:"prefixRef",class:I(e.nsSelect.e("prefix"))},[ne(e.$slots,"prefix")],2)):te("v-if",!0),K("div",{ref:"selectionRef",class:I([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 v,g,m,p,h,b,y,C,S,k,E,N,x;return[(O(!0),H(Fe,null,bt(e.showTagList,$=>(O(),H("div",{key:e.getValueKey(e.getValue($)),class:I(e.nsSelect.e("selected-item")),style:je(e.tagStyle)},[U(s,{closable:!e.selectDisabled&&!e.getDisabled($),size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",onClose:T=>e.deleteTag(T,$)},{default:X(()=>[K("span",{class:I(e.nsSelect.e("tags-text"))},[ne(e.$slots,"label",{index:e.getIndex($),label:e.getLabel($),value:e.getValue($)},()=>[st(Se(e.getLabel($)),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],6))),128)),e.collapseTags&&e.states.cachedOptions.length>e.maxCollapseTags?(O(),oe(r,{key:0,ref:"tagTooltipRef",disabled:e.dropdownMenuVisible||!e.collapseTagsTooltip,"fallback-placements":((v=e.tagTooltip)==null?void 0:v.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":((p=e.tagTooltip)==null?void 0:p.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":((C=e.tagTooltip)==null?void 0:C.popperOptions)??e.popperOptions,transition:(S=e.tagTooltip)==null?void 0:S.transition,"show-after":(k=e.tagTooltip)==null?void 0:k.showAfter,"hide-after":(E=e.tagTooltip)==null?void 0:E.hideAfter,"auto-close":(N=e.tagTooltip)==null?void 0:N.autoClose,offset:(x=e.tagTooltip)==null?void 0:x.offset},{default:X(()=>[K("div",{ref:"collapseItemRef",class:I([e.nsSelect.e("selected-item"),e.nsSelect.e("collapse-item")])},[U(s,{closable:!1,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":""},{default:X(()=>[K("span",{class:I(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:I(e.nsSelect.e("selection"))},[(O(!0),H(Fe,null,bt(e.collapseTagList,$=>(O(),H("div",{key:e.getValueKey(e.getValue($)),class:I(e.nsSelect.e("selected-item"))},[U(s,{class:"in-tooltip",closable:!e.selectDisabled&&!e.getDisabled($),size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",onClose:T=>e.deleteTag(T,$)},{default:X(()=>[K("span",{class:I(e.nsSelect.e("tags-text"))},[ne(e.$slots,"label",{index:e.getIndex($),label:e.getLabel($),value:e.getValue($)},()=>[st(Se(e.getLabel($)),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:I([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:I([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]=(...v)=>e.onInput&&e.onInput(...v)),onChange:t[1]||(t[1]=Je(()=>{},["stop"])),onCompositionstart:t[2]||(t[2]=(...v)=>e.handleCompositionStart&&e.handleCompositionStart(...v)),onCompositionupdate:t[3]||(t[3]=(...v)=>e.handleCompositionUpdate&&e.handleCompositionUpdate(...v)),onCompositionend:t[4]||(t[4]=(...v)=>e.handleCompositionEnd&&e.handleCompositionEnd(...v)),onKeydown:[t[5]||(t[5]=an(Je(v=>e.onKeyboardNavigate("backward"),["stop","prevent"]),["up"])),t[6]||(t[6]=an(Je(v=>e.onKeyboardNavigate("forward"),["stop","prevent"]),["down"])),t[7]||(t[7]=an(Je((...v)=>e.onKeyboardSelect&&e.onKeyboardSelect(...v),["stop","prevent"]),["enter"])),t[8]||(t[8]=an(Je((...v)=>e.handleEsc&&e.handleEsc(...v),["stop","prevent"]),["esc"])),t[9]||(t[9]=an(Je((...v)=>e.handleDel&&e.handleDel(...v),["stop"]),["delete"]))],onClick:t[10]||(t[10]=Je((...v)=>e.toggleMenu&&e.toggleMenu(...v),["stop"]))},null,46,Uj),e.filterable?(O(),H("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:I(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:I([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:I(e.nsSelect.e("suffix"))},[e.iconComponent?ft((O(),oe(u,{key:0,class:I([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:I([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:I([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(()=>[U(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:I(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:I(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:I(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:I(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:I([i(t).e("item"),i(t).e(e.variant)])},[e.variant==="image"?(O(),oe(i(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)=>i(l)?(O(),H("div",pt({key:0,class:[i(a).b(),i(a).is("animated",e.animated)]},o.$attrs),[(O(!0),H(Fe,null,bt(e.count,r=>(O(),H(Fe,{key:r},[i(l)?ne(o.$slots,"template",{key:r},()=>[U(od,{class:I(i(a).is("first")),variant:"p"},null,8,["class"]),(O(!0),H(Fe,null,bt(e.rows,u=>(O(),oe(od,{key:u,class:I([i(a).e("paragraph"),i(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=D();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=w(()=>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=D(),s=D(),r={firstButton:o,secondButton:s},u=sn(),c=w(()=>Math.min(t.firstValue,t.secondValue)),d=w(()=>Math.max(t.firstValue,t.secondValue)),f=w(()=>e.range?`${100*(d.value-c.value)/(e.max-e.min)}%`:`${100*(t.firstValue-e.min)/(e.max-e.min)}%`),v=w(()=>e.range?`${100*(c.value-e.min)/(e.max-e.min)}%`:"0%"),g=w(()=>e.vertical?{height:e.height}:{}),m=w(()=>e.vertical?{height:f.value,bottom:v.value}:{width:f.value,left:v.value}),p=()=>{l.value&&(t.sliderSize=l.value.getBoundingClientRect()[e.vertical?"height":"width"])},h=P=>{const M=e.min+P*(e.max-e.min)/100;if(!e.range)return o;let L;return Math.abs(c.value-M)t.secondValue?"firstButton":"secondButton",r[L]},b=P=>{const M=h(P);return M.value.setPosition(P),M},y=P=>{t.firstValue=P??e.min,S(e.range?[c.value,d.value]:P??e.min)},C=P=>{t.secondValue=P,e.range&&S([c.value,d.value])},S=P=>{n(it,P),n(Tn,P)},k=async()=>{await Ae(),n(yt,e.range?[c.value,d.value]:e.modelValue)},E=P=>{var L,q,B,F;if(u.value||t.dragging)return;p();let M=0;if(e.vertical){const V=((q=(L=P.touches)==null?void 0:L.item(0))==null?void 0:q.clientY)??P.clientY;M=(l.value.getBoundingClientRect().bottom-V)/t.sliderSize*100}else M=((((F=(B=P.touches)==null?void 0:B.item(0))==null?void 0:F.clientX)??P.clientX)-l.value.getBoundingClientRect().left)/t.sliderSize*100;if(!(M<0||M>100))return b(M)};return{elFormItem:a,slider:l,firstButton:o,secondButton:s,sliderDisabled:u,minValue:c,maxValue:d,runwayStyle:g,barStyle:m,resetSize:p,setPosition:b,emitChange:k,onSliderWrapperPrevent:P=>{var M,L;((M=r.firstButton.value)!=null&&M.dragging||(L=r.secondButton.value)!=null&&L.dragging)&&P.preventDefault()},onSliderClick:P=>{E(P)&&k()},onSliderDown:async P=>{const M=E(P);M&&(await Ae(),M.value.onButtonDown(P))},onSliderMarkerDown:P=>{u.value||t.dragging||b(P)&&k()},setFirstValue:y,setSecondValue:C}},f7=(e,t,n,a)=>({stops:w(()=>{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),r=100*e.step/(e.max-e.min),u=Array.from({length:s-1}).map((c,d)=>(d+1)*r);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)},r=()=>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],r()&&(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)&&(c