` or `boolean`"),Do(E)?E.then(O=>{O&&y()}).catch(O=>{Kt(zu,`some error occurred: ${O}`)}):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)=>(N(),F("div",{class:P(v.value),onClick:Je(C,["prevent"])},[j("input",{id:r(u),ref_key:"input",ref:f,class:P(r(i).e("input")),type:"checkbox",role:"switch","aria-checked":b.value,"aria-disabled":r(c),"aria-label":e.ariaLabel,name:e.name,"true-value":e.activeValue,"false-value":e.inactiveValue,disabled:r(c),tabindex:e.tabindex,onChange:y,onKeydown:an(C,["enter"])},null,42,K9),!e.inlinePrompt&&(e.inactiveIcon||e.inactiveText||k.$slots.inactive)?(N(),F("span",{key:0,class:P(g.value)},[ne(k.$slots,"inactive",{},()=>[e.inactiveIcon?(N(),oe(r(Be),{key:0},{default:Z(()=>[(N(),oe(ct(e.inactiveIcon)))]),_:1})):te("v-if",!0),!e.inactiveIcon&&e.inactiveText?(N(),F("span",{key:1,"aria-hidden":b.value},we(e.inactiveText),9,W9)):te("v-if",!0)])],2)):te("v-if",!0),j("span",{class:P(r(i).e("core")),style:je(p.value)},[e.inlinePrompt?(N(),F("div",{key:0,class:P(r(i).e("inner"))},[b.value?(N(),F("div",{key:1,class:P(r(i).e("inner-wrapper"))},[ne(k.$slots,"active",{},()=>[e.activeIcon?(N(),oe(r(Be),{key:0},{default:Z(()=>[(N(),oe(ct(e.activeIcon)))]),_:1})):te("v-if",!0),!e.activeIcon&&e.activeText?(N(),F("span",q9,we(e.activeText),1)):te("v-if",!0)])],2)):(N(),F("div",{key:0,class:P(r(i).e("inner-wrapper"))},[ne(k.$slots,"inactive",{},()=>[e.inactiveIcon?(N(),oe(r(Be),{key:0},{default:Z(()=>[(N(),oe(ct(e.inactiveIcon)))]),_:1})):te("v-if",!0),!e.inactiveIcon&&e.inactiveText?(N(),F("span",j9,we(e.inactiveText),1)):te("v-if",!0)])],2))],2)):te("v-if",!0),j("div",{class:P(r(i).e("action"))},[e.loading?(N(),oe(r(Be),{key:0,class:P(r(i).is("loading"))},{default:Z(()=>[U(r(rl))]),_:1},8,["class"])):b.value?ne(k.$slots,"active-action",{key:1},()=>[e.activeActionIcon?(N(),oe(r(Be),{key:0},{default:Z(()=>[(N(),oe(ct(e.activeActionIcon)))]),_:1})):te("v-if",!0)]):b.value?te("v-if",!0):ne(k.$slots,"inactive-action",{key:2},()=>[e.inactiveActionIcon?(N(),oe(r(Be),{key:0},{default:Z(()=>[(N(),oe(ct(e.inactiveActionIcon)))]),_:1})):te("v-if",!0)])],2)],6),!e.inlinePrompt&&(e.activeIcon||e.activeText||k.$slots.active)?(N(),F("span",{key:1,class:P(m.value)},[ne(k.$slots,"active",{},()=>[e.activeIcon?(N(),oe(r(Be),{key:0},{default:Z(()=>[(N(),oe(ct(e.activeIcon)))]),_:1})):te("v-if",!0),!e.activeIcon&&e.activeText?(N(),F("span",{key:1,"aria-hidden":!b.value},we(e.activeText),9,Y9)):te("v-if",!0)])],2)):te("v-if",!0)],2))}}),G9=U9;const X9=it(G9),J9={data:{type:Array,default:()=>[]},size:Pn,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 Z9=1,Q9=1;const e7=e=>`${e}-table_${Z9++}`,t7=e=>`${e}_column_${Q9++}`,Df=function(e){var t;return(t=e.target)==null?void 0:t.closest("td")},n7=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(i,u){return l?m1(An(l),c=>De(c)?Sn(i,c):c(i,u,e)):(t!=="$key"&&rt(i)&&"$value"in i&&(i=i.$value),[rt(i)?t?Sn(i,t):null:i])},s=function(i,u){var c,d,f,v,g;if(a)return a(i.value,u.value);for(let m=0,p=((c=i.key)==null?void 0:c.length)??0;m((g=u.key)==null?void 0:g[m]))return 1}return 0};return e.map((i,u)=>({value:i,index:u,key:o?o(i,u):null})).sort((i,u)=>{let c=s(i,u);return c||(c=i.index-u.index),c*+n}).map(i=>i.value)},n2=function(e,t){let n=null;return e.columns.forEach(a=>{a.id===t&&(n=a)}),n},a7=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""},ar=function(e,t,n=!1,a="children"){const l=e||[],o={};return l.forEach((s,i)=>{if(o[En(s,t)]={row:s,index:i},n){const u=s[a];me(u)&&Object.assign(o,ar(u,t,!0,a))}}),o};function l7(e,t){const n={};let a;for(a in e)n[a]=e[a];for(a in t)if(_t(t,a)){const l=t[a];xt(l)||(n[a]=l)}return n}function Gh(e){return e===""||xt(e)||(e=Number.parseInt(e,10),Number.isNaN(e)&&(e="")),e}function a2(e){return e===""||xt(e)||(e=Gh(e),Number.isNaN(e)&&(e=80)),e}function o7(e){return He(e)?e:De(e)?/^\d+(?:px)?$/.test(e)?Number.parseInt(e,10):e:null}function s7(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...a)=>t(n(...a)))}function Js(e,t,n,a,l,o,s){let i=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,i),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)&&(qt(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=Js(e,p,n??!f,a,l,i+1,s);i+=m(p)+1,h&&(u=h)}),u}function r7(e,t,n="children",a="hasChildren",l=!1){const o=i=>!(me(i)&&i.length);function s(i,u,c){t(i,u,c),u.forEach(d=>{if(d[a]&&l){t(d,null,c+1);return}const f=d[n];o(f)||s(d,f,c+1)})}e.forEach(i=>{if(i[a]&&l){t(i,null,0);return}const u=i[n];o(u)||s(i,u,0)})}const i7=(e,t,n,a)=>{const l=We(a==null?void 0:a.tooltipFormatter)?a.tooltipFormatter({row:n,column:a,cellValue:_o(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 u7(e,t,n,a,l,o){var g;const s=i7(e,t,n,a),i={...s,slotContent:void 0};if((pn==null?void 0:pn.trigger)===l){const m=(g=pn.vm)==null?void 0:g.component;b1(m==null?void 0:m.props,i),m&&s.slotContent&&(m.slots.content=()=>[s.slotContent]);return}pn==null||pn();const u=o==null?void 0:o.refs.tableWrapper,c=u==null?void 0:u.dataset.prefix,d=U(Bn,{virtualTriggering:!0,virtualRef:l,appendTo:u,placement:"top",transition:"none",offset:0,hideAfter:0,...i},s.slotContent?{content:()=>s.slotContent}:void 0);d.appContext={...o.appContext,...o};const f=document.createElement("div");zo(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(),zo(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 l2(e){return e.children?m1(e.children,l2):[e]}function My(e,t){return e+t.colSpan}const o2=(e,t,n,a)=>{let l=0,o=e;const s=n.states.columns.value;if(a){const u=l2(a[e]);l=s.slice(0,s.indexOf(u[0])).reduce(My,0),o=l+u.reduce(My,0)-1}else l=e;let i;switch(t){case"left":o=s.length-n.states.rightFixedLeafColumnsLength.value&&(i="right");break;default:o=s.length-n.states.rightFixedLeafColumnsLength.value&&(i="right")}return i?{direction:i,start:l,after:o}:{}},Xh=(e,t,n,a,l,o=0)=>{const s=[],{direction:i,start:u,after:c}=o2(t,n,a,l);if(i){const d=i==="left";s.push(`${e}-fixed-column--${i}`),d&&c+o===a.states.fixedLeafColumnsLength.value-1?s.push("is-last-column"):!d&&u-o===a.states.columns.value.length-a.states.rightFixedLeafColumnsLength.value&&s.push("is-first-column")}return s};function Py(e,t){return e+(Sd(t.realWidth)||Number.isNaN(t.realWidth)?Number(t.width):t.realWidth)}const Jh=(e,t,n,a)=>{const{direction:l,start:o=0,after:s=0}=o2(e,t,n,a);if(!l)return;const i={},u=l==="left",c=n.states.columns.value;return u?i.left=c.slice(0,o).reduce(Py,0):i.right=c.slice(s+1).reverse().reduce(Py,0),i},Cr=(e,t)=>{e&&(Number.isNaN(e[t])||(e[t]=`${e[t]}px`))};function s2(e){return e.some(t=>Jt(t)?!(t.type===Cn||t.type===ze&&!s2(t.children)):!0)?e:null}function c7(e){const t=ht(),n=V(!1),a=V([]),l=(c,d)=>{const f=t.store.states.rowExpandable.value;return(f==null?void 0:f(c,d))??!0};return{updateExpandRows:()=>{const c=e.data.value||[],d=e.rowKey.value;if(n.value)a.value=t.store.states.rowExpandable.value?c.filter(l):c.slice();else if(d){const f=ar(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)||Js(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=ar(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?!!ar(a.value,d)[En(c,d)]:a.value.includes(c)},states:{expandRows:a,defaultExpandAll:n}}}function d7(e){const t=ht(),n=V(null),a=V(null),l=c=>{t.store.assertRowKey(),n.value=c,s(c)},o=()=>{n.value=null},s=c=>{const{data:d,rowKey:f}=e,v=a.value;let g=null;f.value&&(g=(r(d)||[]).find(m=>En(m,f.value)===c)??null),a.value=g??null,t.emit("current-change",a.value,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 f7(e){const t=V([]),n=V({}),a=V(16),l=V(!1),o=V({}),s=V("hasChildren"),i=V("children"),u=V(!1),c=ht(),d=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(O=>{if(o.value[O].length){const T={children:[]};o.value[O].forEach(x=>{const $=En(x,S);T.children.push($),x[s.value]&&!E[$]&&(E[$]={children:[]})}),E[O]=T}}),E}),v=S=>{const k=e.rowKey.value,E={};return r7(S,(O,T,x)=>{const $=En(O,k);me(T)?E[$]={children:T.map(I=>En(I,k)),level:x}:l.value&&(E[$]={children:[],lazy:!0,level:x})},i.value,s.value,l.value),E},g=(S=!1,k)=>{var $,I;k||(k=($=c.store)==null?void 0:$.states.defaultExpandAll.value);const E=d.value,O=f.value,T=Object.keys(E),x={};if(T.length){const M=r(n),A=[],K=(B,_)=>{if(S)return t.value?k||t.value.includes(_):!!(k||B!=null&&B.expanded);{const L=k||t.value&&t.value.includes(_);return!!(B!=null&&B.expanded||L)}};T.forEach(B=>{const _=M[B],L={...E[B]};if(L.expanded=K(_,B),L.lazy){const{loaded:H=!1,loading:D=!1}=_||{};L.loaded=!!H,L.loading=!!D,A.push(B)}x[B]=L});const z=Object.keys(O);l.value&&z.length&&A.length&&z.forEach(B=>{var H;const _=M[B],L=O[B].children;if(A.includes(B)){if(((H=x[B].children)==null?void 0:H.length)!==0)throw new Error("[ElTable]children must be an empty array.");x[B].children=L}else{const{loaded:D=!1,loading:W=!1}=_||{};x[B]={lazy:!0,loaded:!!D,loading:!!W,expanded:K(_,B),children:L,level:void 0}}})}n.value=x,(I=c.store)==null||I.updateTableScrollY()};fe(()=>t.value,()=>{g(!0)},{deep:!0}),fe(()=>d.value,()=>{g()}),fe(()=>f.value,()=>{g()});const m=S=>{t.value=S,g()},p=S=>l.value&&S&&"loaded"in S&&!S.loaded,h=(S,k)=>{c.store.assertRowKey();const E=e.rowKey.value,O=En(S,E),T=O&&n.value[O];if(O&&T&&"expanded"in T){const x=T.expanded;k=xt(k)?!T.expanded:k,n.value[O].expanded=k,x!==k&&c.emit("expand-change",S,k),k&&p(T)&&y(S,O,T),c.store.updateTableScrollY()}},b=S=>{c.store.assertRowKey();const k=e.rowKey.value,E=En(S,k),O=n.value[E];p(O)?y(S,E,O):h(S,void 0)},y=(S,k,E)=>{const{load:O}=c.props;O&&!n.value[k].loaded&&(n.value[k].loading=!0,O(S,E,T=>{if(!me(T))throw new TypeError("[ElTable] data must be an array");n.value[k].loading=!1,n.value[k].loaded=!0,n.value[k].expanded=!0,T.length&&(o.value={...o.value,[k]:T}),c.emit("expand-change",S,!0)}))};return{loadData:y,loadOrToggle:b,toggleTreeExpansion:h,updateTreeExpandKeys:m,updateTreeData:g,updateKeyChildren:(S,k)=>{const{lazy:E,rowKey:O}=c.props;if(E){if(!O)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:i,checkStrictly:u}}}const p7=(e,t)=>{const n=t.sortingColumn;return!n||De(n.sortable)?e:n7(e,t.sortProp,t.sortOrder,n.sortMethod,n.sortBy)},nc=e=>{const t=[];return e.forEach(n=>{n.children&&n.children.length>0?t.push.apply(t,nc(n.children)):t.push(n)}),t};function v7(){var Bt;const e=ht(),{size:t}=Vn((Bt=e.proxy)==null?void 0:Bt.$props),n=V(null),a=V([]),l=V([]),o=V(!1),s=V([]),i=V([]),u=V([]),c=V([]),d=V([]),f=V([]),v=V([]),g=V([]),m=[],p=V(0),h=V(0),b=V(0),y=V(!1),C=V([]),S=V({}),k=V(!1),E=V(!1),O=V(null),T=V(null),x=V({}),$=V(null),I=V(null),M=V(null),A=V(null),K=V(null);let z=[];const B=w(()=>n.value?ar(C.value,n.value):void 0),_=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 L=()=>{if(!n.value)throw new Error("[ElTable] prop row-key is required")},H=ce=>{var Ie;(Ie=ce.children)==null||Ie.forEach(Ue=>{Ue.fixed=ce.fixed,H(Ue)})},D=()=>{s.value.forEach(et=>{H(et)}),c.value=s.value.filter(et=>[!0,"left"].includes(et.fixed));const ce=s.value.find(et=>et.type==="selection");let Ie;ce&&ce.fixed!=="right"&&!c.value.includes(ce)&&s.value.indexOf(ce)===0&&c.value.length&&(c.value.unshift(ce),Ie=!0),d.value=s.value.filter(et=>et.fixed==="right");const Ue=s.value.filter(et=>(Ie?et.type!=="selection":!0)&&!et.fixed);i.value=Array.from(c.value).concat(Ue).concat(d.value);const at=nc(Ue),gt=nc(c.value),wt=nc(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&&D(),Ie?e.state.doLayout():e.state.debouncedUpdateLayout()},q=ce=>B.value?!!B.value[En(ce,n.value)]:C.value.includes(ce),X=w(()=>{const ce=new Map;if(!n.value||!O.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=_(gt);et.length&&Ue(et)})};return Ue(a.value||[]),ce}),J=(ce={})=>{const{emitChange:Ie=!0}=ce;if(Vt.checkStrictly.value||!n.value){S.value={},z=[];return}const Ue=n.value,at=ce.rowIndexMap??X.value,gt=O.value,wt=new WeakMap,et=_e=>{const Ot=wt.get(_e);if(Ot)return Ot;const jt=En(_e,Ue);return wt.set(_e,jt),jt},Dt={},Re=[],Ye=new Set(C.value.map(_e=>et(_e))),Qe=[];let Xt=!1;const Me=(_e,Ot,jt)=>{const nn=Ye.has(Ot);jt&&!nn?(Qe.push(_e),Ye.add(Ot),Xt=!0):!jt&&nn&&(Ye.delete(Ot),Xt=!0)},Ve=_e=>{let Ot=0,jt=0;return me(_e)?(_e.forEach(nn=>{const On=et(nn),Xa=_(nn);let pl=0,go=0;if(Xa.length){const Te=Ve(Xa);pl=Te.selectedCount,go=Te.selectableCount}const Ja=gt?gt.call(null,nn,at.get(On)??0):!0;if(Ja&&go>0){const Te=pl===go;!Te&&pl!==0&&(Dt[On]=!0,Re.push(nn)),Me(nn,On,Te)}Ja&&(jt+=1,Ye.has(On)&&(Ot+=1)),Ot+=pl,jt+=go}),{selectedCount:Ot,selectableCount:jt}):{selectedCount:Ot,selectableCount:jt}};if(Ve(a.value||[]),Xt){const _e=C.value.filter(Ot=>Ye.has(et(Ot)));Qe.forEach(Ot=>{Ye.has(et(Ot))&&_e.push(Ot)}),C.value=_e}S.value=Dt,z=Re,Xt&&Ie&&e.emit("selection-change",C.value?C.value.slice():[])},Q=()=>{y.value=!1;const ce=C.value;C.value=[],S.value={},z=[],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=ar(a.value,n.value,!0,at),{lazyTreeNodeMap:wt}=e.store.states;wt.value&&Object.entries(wt.value).forEach(([et,Dt])=>{gt[et]&&Dt.forEach(Re=>{const Ye=En(Re,n.value);gt[Ye]||(gt[Ye]={row:Re,index:-1})})});for(const et in B.value)_t(B.value,et)&&!gt[et]&&ce.push(B.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,J({emitChange:!1}),e.emit("selection-change",[...at])}},ie=()=>(C.value||[]).slice(),pe=()=>z.slice(),ve=(ce,Ie,Ue)=>{var Ye;if(!n.value||Vt.checkStrictly.value||!Vt.lazy.value)return;const{lazyTreeNodeMap:at,childrenColumnName:gt}=e.store.states,wt=En(ce,n.value),et=((Ye=at.value)==null?void 0:Ye[wt])??[],Dt=ce[gt.value]??[],Re={children:gt.value,checkStrictly:!1};for(const Qe of et){const Xt=Ue.get(En(Qe,n.value))??0;Js(C.value,Qe,Ie,Re,O.value,Xt,n.value),ve(Qe,Ie,Ue)}for(const Qe of Dt)ve(Qe,Ie,Ue)},re=(ce,Ie,Ue=!0,at=!1)=>{var wt,et,Dt,Re;const gt={children:(et=(wt=e==null?void 0:e.store)==null?void 0:wt.states)==null?void 0:et.childrenColumnName.value,checkStrictly:(Re=(Dt=e==null?void 0:e.store)==null?void 0:Dt.states)==null?void 0:Re.checkStrictly.value};if(Js(C.value,ce,Ie,gt,at?void 0:O.value,a.value.indexOf(ce),n.value)){if(Vt.lazy.value&&!Vt.checkStrictly.value){const Qe=Ie??q(ce);ve(ce,Qe,X.value),J({emitChange:!1,rowIndexMap:X.value})}else J({emitChange:!1});const Ye=(C.value||[]).slice();Ue&&e.emit("select",Ye,ce),e.emit("selection-change",Ye)}},R=()=>{var Dt,Re;const ce=E.value?!y.value:!(y.value||C.value.length);y.value=ce;let Ie=!1,Ue=0;const at=(Re=(Dt=e==null?void 0:e.store)==null?void 0:Dt.states)==null?void 0:Re.rowKey.value,{childrenColumnName:gt}=e.store.states,wt={children:gt.value,checkStrictly:!1};a.value.forEach((Ye,Qe)=>{const Xt=Qe+Ue;Js(C.value,Ye,ce,wt,O.value,Xt,at)&&(Ie=!0),Ue+=le(En(Ye,at))});const et=X.value;if(Vt.lazy.value&&!Vt.checkStrictly.value&&at)for(const Ye of Object.values(Vt.lazyTreeNodeMap.value))for(const Qe of Ye){const Xt=et.get(En(Qe,at))??0;Js(C.value,Qe,ce,wt,O.value,Xt,at)&&(Ie=!0),ve(Qe,ce,et)}J({emitChange:!1,rowIndexMap:et}),Ie&&e.emit("selection-change",C.value?[...C.value]:[]),e.emit("select-all",(C.value||[]).slice())},Y=()=>{var gt;if(((gt=a.value)==null?void 0:gt.length)===0){y.value=!1;return}let ce=0,Ie=0;const Ue=wt=>{for(const et of wt){const Dt=O.value&&O.value.call(null,et,ce);if(q(et))Ie++;else if(!O.value||Dt)return!1;ce++;const Re=_(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 An(ce).forEach(at=>{x.value[at.id]=Ie,Ue[at.columnKey||at.id]=Ie}),Ue},de=(ce,Ie,Ue)=>{I.value&&I.value!==ce&&(I.value.order=null),I.value=ce,M.value=Ie,A.value=Ue},be=()=>{let ce=r(l);Object.keys(x.value).forEach(Ie=>{const Ue=x.value[Ie];if(!Ue||Ue.length===0)return;const at=n2({columns:u.value},Ie);at&&at.filterMethod&&(ce=ce.filter(gt=>Ue.some(wt=>at.filterMethod.call(null,wt,gt,at))))}),$.value=ce},Se=()=>{a.value=p7($.value??[],{sortingColumn:I.value,sortProp:M.value,sortOrder:A.value})},Ne=(ce=void 0)=>{ce!=null&&ce.filter||be(),Se()},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=>a7({columns:u.value},wt));at.forEach(wt=>{const et=gt.find(Dt=>Dt.id===wt);et&&(et.filteredValue=[])}),e.store.commit("filterChange",{column:gt,values:[],silent:!0,multi:!0})}else at.forEach(gt=>{const wt=u.value.find(et=>et.id===gt);wt&&(wt.filteredValue=[])}),x.value={},e.store.commit("filterChange",{column:{},values:[],silent:!0})},Pe=()=>{I.value&&(de(null,null,null),e.store.commit("changeSortCondition",{silent:!0}))},{setExpandRowKeys:ge,toggleRowExpansion:Ee,updateExpandRows:Le,states:qe,isRowExpanded:lt}=c7({data:a,rowKey:n}),{updateTreeExpandKeys:nt,toggleTreeExpansion:Ze,updateTreeData:kt,updateKeyChildren:It,loadOrToggle:Rt,states:Vt}=f7({data:a,rowKey:n}),{updateCurrentRowData:Wt,updateCurrentRow:Yt,setCurrentRowKey:xe,states:ke}=d7({data:a,rowKey:n}),Ke=ce=>{ge(ce),nt(ce)},Xe=(ce,Ie)=>{u.value.some(({type:Ue})=>Ue==="expand")?Ee(ce,Ie):Ze(ce,Ie)};return fe(()=>Vt.checkStrictly.value,ce=>{ce?(S.value={},z=[]):J({emitChange:!1}),Y()}),fe(()=>Vt.lazyTreeNodeMap.value,()=>{var at;if(!Vt.lazy.value||Vt.checkStrictly.value||!n.value)return;const ce=X.value,Ie=C.value.length;for(const gt of Object.keys(Vt.lazyTreeNodeMap.value))(at=B.value)!=null&&at[gt]&&ve(B.value[gt].row,!0,ce);const Ue=C.value.length!==Ie;J({emitChange:!Ue,rowIndexMap:ce}),Y(),Ue&&e.emit("selection-change",[...C.value])}),{assertRowKey:L,updateColumns:D,scheduleLayout:W,isSelected:q,clearSelection:Q,cleanSelection:ee,getSelectionRows:ie,getHalfSelectionRows:pe,toggleRowSelection:re,_toggleAllSelection:R,toggleAllSelection:null,updateAllSelected:Y,updateSelectionByChildren:J,getRowIndeterminate:ae,updateFilters:se,updateCurrentRow:Yt,updateSort:de,execFilter:be,execSort:Se,execQuery:Ne,clearFilter:Ce,clearSort:Pe,toggleRowExpansion:Ee,setExpandRowKeysAdapter:Ke,setCurrentRowKey:xe,toggleRowExpansionAdapter:Xe,isRowExpanded:lt,updateExpandRows:Le,updateCurrentRowData:Wt,loadOrToggle:Rt,updateTreeData:kt,updateKeyChildren:It,states:{tableSize:t,rowKey:n,data:a,_data:l,isComplex:o,_columns:s,originColumns:i,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:O,rowExpandable:T,filters:x,filteredData:$,sortingColumn:I,sortProp:M,sortOrder:A,hoverRow:K,...qe,...Vt,...ke}}}function ev(e,t){return e.map(n=>{var a;return n.id===t.id?t:((a=n.children)!=null&&a.length&&(n.children=ev(n.children,t)),n)})}function tv(e){e.forEach(t=>{var n,a;t.no=(n=t.getColumnIndex)==null?void 0:n.call(t),(a=t.children)!=null&&a.length&&tv(t.children)}),e.sort((t,n)=>t.no-n.no)}function h7(){const e=ht(),t=v7(),n=he("table"),{t:a}=St();return{ns:n,t:a,...t,mutations:{setData(i,u){const c=r(i._data)!==u;i.data.value=u,i._data.value=u,e.store.execQuery(),e.store.updateCurrentRowData(),e.store.updateExpandRows(),e.store.updateTreeData(e.store.states.defaultExpandAll.value),r(i.reserveSelection)?e.store.assertRowKey():c?e.store.clearSelection():e.store.cleanSelection(),e.store.updateSelectionByChildren({emitChange:!1}),e.store.updateAllSelected(),e.$ready&&e.store.scheduleLayout()},insertColumn(i,u,c,d){var g;const f=r(i._columns);let v=[];c?(c&&!c.children&&(c.children=[]),(g=c.children)==null||g.push(u),v=ev(f,c)):(f.push(u),v=f),tv(v),i._columns.value=v,i.updateOrderFns.push(d),u.type==="selection"&&(i.selectable.value=u.selectable,i.reserveSelection.value=u.reserveSelection),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},updateColumnOrder(i,u){var c;((c=u.getColumnIndex)==null?void 0:c.call(u))!==u.no&&(tv(i._columns.value),e.$ready&&e.store.updateColumns())},removeColumn(i,u,c,d){var g;const f=r(i._columns)||[];if(c)(g=c.children)==null||g.splice(c.children.findIndex(m=>m.id===u.id),1),Ae(()=>{var m;((m=c.children)==null?void 0:m.length)===0&&delete c.children}),i._columns.value=ev(f,c);else{const m=f.indexOf(u);m>-1&&(f.splice(m,1),i._columns.value=f)}const v=i.updateOrderFns.indexOf(d);v>-1&&i.updateOrderFns.splice(v,1),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},sort(i,u){const{prop:c,order:d,init:f}=u;if(c){const v=r(i.columns).find(g=>g.property===c);v&&(v.order=d,e.store.updateSort(v,c,d),e.store.commit("changeSortCondition",{init:f}))}},changeSortCondition(i,u){const{sortingColumn:c,sortProp:d,sortOrder:f}=i,v=r(c),g=r(d),m=r(f);Sd(m)&&(i.sortingColumn.value=null,i.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(i,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 i,u;(u=(i=e.store).toggleAllSelection)==null||u.call(i)},rowSelectedChanged(i,u){e.store.toggleRowSelection(u),e.store.updateAllSelected()},setHoverRow(i,u){i.hoverRow.value=u},setCurrentRow(i,u){e.store.updateCurrentRow(u)}},commit:function(i,...u){const c=e.store.mutations;if(c[i])c[i].apply(e,[e.store.states,...u]);else throw new Error(`Action not found: ${i}`)},updateTableScrollY:function(){Ae(()=>e.layout.updateScrollY.apply(e.layout))}}}const Zh={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 m7(e,t){if(!e)throw new Error("Table is required.");const n=h7();return n.toggleAllSelection=Il(n._toggleAllSelection,10),Object.keys(Zh).forEach(a=>{r2(i2(t,a),a,n)}),g7(n,t),n}function g7(e,t){Object.keys(Zh).forEach(n=>{fe(()=>i2(t,n),a=>{r2(a,n,e)})})}function r2(e,t,n){let a=e,l=Zh[t];rt(l)&&(a=a||l.default,l=l.key),n.states[l].value=a}function i2(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 b7=class{constructor(e){this.observers=[],this.table=null,this.store=null,this.columns=[],this.fit=!0,this.showHeader=!0,this.heightMap={},this.height=V(null),this.scrollX=V(!1),this.scrollY=V(!1),this.bodyWidth=V(null),this.fixedWidth=V(null),this.rightFixedWidth=V(null),this.gutterWidth=0;for(const t in e)_t(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(Sd(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(!Pt)return;const n=this.table.vnode.el;if(e=o7(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 i;if(!Pt)return;const e=this.fit,t=(i=this.table.vnode.el)==null?void 0:i.clientWidth;let n=0;const a=this.getFlattenColumns(),l=a.filter(u=>!He(u.width));if(a.forEach(u=>{He(u.width)&&u.realWidth&&(u.realWidth=null)}),l.length>0&&e){if(a.forEach(u=>{n+=Number(u.width||u.minWidth||80)}),n<=t){this.scrollX.value=!1;const u=t-n;if(l.length===1)l[0].realWidth=Number(l[0].minWidth||80)+u;else{const c=u/l.reduce((f,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"),u2=e=>{const t=[];return e.forEach(n=>{n.children?(t.push(n),t.push.apply(t,u2(n.children))):t.push(n)}),t},c2=e=>{let t=1;const n=(l,o)=>{if(o&&(l.level=o.level+1,t{n(i,l),s+=i.colSpan}),l.colSpan=s}else l.colSpan=1};e.forEach(l=>{l.level=1,n(l,void 0)});const a=[];for(let l=0;l{l.children?(l.rowSpan=1,l.children.forEach(o=>o.isSubColumn=!0)):l.rowSpan=t-l.level+1,a[l.level-1].push(l)}),a};function y7(e){const t=Fe(fl),n=w(()=>c2(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 w7=ue({name:"ElTableFilterPanel",components:{ElCheckbox:ll,ElCheckboxGroup:Lh,ElScrollbar:il,ElTooltip:Bn,ElIcon:Be,ArrowDown:Hl,ArrowUp:_d},props:{placement:{type:String,default:"bottom-start"},store:{type:Object},column:{type:Object},upDataColumn:{type:Function},appendTo:tn.appendTo},setup(e){const t=ht(),{t:n}=St(),a=he("table-filter"),l=t==null?void 0:t.parent;e.column&&!l.filterPanels.value[e.column.id]&&(l.filterPanels.value[e.column.id]=t);const o=V(null),s=V(null),i=V(0),u=V([]),c=w(()=>e.column&&e.column.filters),d=w(()=>e.column&&e.column.filterClassName?`${a.b()} ${e.column.filterClassName}`:a.b()),f=w({get:()=>{var T;return(((T=e.column)==null?void 0:T.filteredValue)||[])[0]},set:T=>{var x;if(e.column){const $=[...e.column.filteredValue??[]];Ta(T)?$.splice(0,1):$.splice(0,1,T),(x=e.upDataColumn)==null||x.call(e,"filteredValue",$)}}}),v=w(()=>e.column?e.column.filterMultiple:!0),g=T=>T.value===f.value,m=()=>{var T;(T=o.value)==null||T.onClose()},p=()=>{y(u.value),m()},h=()=>{u.value=[],y(u.value),m()},b=(T,x)=>{f.value=T,i.value=x,Ta(T)?y([]):y([T]),m()},y=T=>{var x,$,I;(x=e.upDataColumn)==null||x.call(e,"filteredValue",T),($=e.store)==null||$.commit("filterChange",{column:e.column,values:T}),(I=e.store)==null||I.updateAllSelected()},C=()=>{var T;u.value=[...((T=e.column)==null?void 0:T.filteredValue)||[]]},S=()=>{var T,x;(T=s.value)==null||T.focus(),!v.value&&E(),e.column&&((x=e.upDataColumn)==null||x.call(e,"filterOpened",!0))},k=()=>{var T;e.column&&((T=e.upDataColumn)==null||T.call(e,"filterOpened",!1))},E=()=>{if(Ta(f)){i.value=0;return}const T=(c.value||[]).findIndex(x=>x.value===f.value);i.value=T>=0?T+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:i,handleBeforeShowTooltip:C,handleShowTooltip:S,handleHideTooltip:k,handleKeydown:T=>{var A,K;const x=Gt(T),$=(c.value?c.value.length:0)+1;let I=i.value,M=!0;switch(x){case ye.down:case ye.right:I=(I+1)%$;break;case ye.up:case ye.left:I=(I-1+$)%$;break;case ye.tab:m(),M=!1;break;case ye.enter:case ye.space:if(I===0)b(null,0);else{const z=(c.value||[])[I-1];z.value&&b(z.value,I)}break;default:M=!1}M&&T.preventDefault(),i.value=I,(K=(A=s.value)==null?void 0:A.querySelector(`.${a.e("list-item")}:nth-child(${I+1})`))==null||K.focus()}}}});const S7=["disabled"],C7=["tabindex","aria-checked"],k7=["tabindex","aria-checked","onClick"],E7=["aria-label"];function x7(e,t,n,a,l,o){const s=At("el-checkbox"),i=At("el-checkbox-group"),u=At("el-scrollbar"),c=At("arrow-up"),d=At("arrow-down"),f=At("el-icon"),v=At("el-tooltip");return N(),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:Z(()=>[e.multiple?(N(),F("div",{key:0,ref:"rootRef",tabindex:"-1",class:P(e.ns.e("multiple"))},[j("div",{class:P(e.ns.e("content"))},[U(u,{"wrap-class":e.ns.e("wrap")},{default:Z(()=>[U(i,{modelValue:e.filteredValue,"onUpdate:modelValue":t[0]||(t[0]=g=>e.filteredValue=g),class:P(e.ns.e("checkbox-group"))},{default:Z(()=>[(N(!0),F(ze,null,yt(e.filters,g=>(N(),oe(s,{key:g.value,value:g.value},{default:Z(()=>[dt(we(g.text),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","class"])]),_:1},8,["wrap-class"])],2),j("div",{class:P(e.ns.e("bottom"))},[j("button",{class:P(e.ns.is("disabled",e.filteredValue.length===0)),disabled:e.filteredValue.length===0,type:"button",onClick:t[1]||(t[1]=(...g)=>e.handleConfirm&&e.handleConfirm(...g))},we(e.t("el.table.confirmFilter")),11,S7),j("button",{type:"button",onClick:t[2]||(t[2]=(...g)=>e.handleReset&&e.handleReset(...g))},we(e.t("el.table.resetFilter")),1)],2)],2)):(N(),F("ul",{key:1,ref:"rootRef",tabindex:"-1",role:"radiogroup",class:P(e.ns.e("list")),onKeydown:t[4]||(t[4]=(...g)=>e.handleKeydown&&e.handleKeydown(...g))},[j("li",{role:"radio",class:P([e.ns.e("list-item"),e.ns.is("active",e.isPropAbsent(e.filterValue))]),tabindex:e.checkedIndex===0?0:-1,"aria-checked":e.isPropAbsent(e.filterValue),onClick:t[3]||(t[3]=g=>e.handleSelect(null,0))},we(e.t("el.table.clearFilter")),11,C7),(N(!0),F(ze,null,yt(e.filters,(g,m)=>(N(),F("li",{key:g.value,role:"radio",class:P([e.ns.e("list-item"),e.ns.is("active",e.isActive(g))]),tabindex:e.checkedIndex===m+1?0:-1,"aria-checked":e.isActive(g),onClick:p=>e.handleSelect(g.value,m+1)},we(g.text),11,k7))),128))],34))]),default:Z(()=>{var g;return[j("button",{type:"button",class:P(`${e.ns.namespace.value}-table__column-filter-trigger`),"aria-label":e.t("el.table.filterLabel",{column:((g=e.column)==null?void 0:g.label)||""})},[U(f,null,{default:Z(()=>[ne(e.$slots,"filter-icon",{},()=>{var m;return[(m=e.column)!=null&&m.filterOpened?(N(),oe(c,{key:0})):(N(),oe(d,{key:1}))]})]),_:3})],10,E7)]}),_:3},8,["placement","popper-class","append-to","onBeforeShow","onShow","onHide"])}var T7=Rn(w7,[["render",x7]]);function Qh(e){const t=ht();ud(()=>{n.value.addObserver(t)}),mt(()=>{a(n.value),l(n.value)}),Fl(()=>{a(n.value),l(n.value)}),xr(()=>{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 i=o.getFlattenColumns(),u={};i.forEach(d=>{u[d.id]=d});for(let d=0,f=s.length;d{var u,c;const s=((u=e.vnode.el)==null?void 0:u.querySelectorAll("colgroup > col[name=gutter]"))||[];for(let d=0,f=s.length;d{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)},i=V(null),u=V(!1),c=V(),d=(p,h)=>{var b,y,C;if(Pt&&!(h.children&&h.children.length>0)&&i.value&&e.border&&i.value.id===h.id){u.value=!0;const S=a;t("set-drag-visible",!0);const 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}`),O=E.getBoundingClientRect(),T=O.left-k+30;Va(E,"noclick"),c.value={startMouseLeft:p.clientX,startLeft:O.right-k,startColumnLeft:O.left-k,tableLeft:k};const x=S==null?void 0:S.refs.resizeProxy;x.style.left=`${c.value.startLeft}px`,document.onselectstart=function(){return!1},document.ondragstart=function(){return!1};const $=M=>{const A=M.clientX-c.value.startMouseLeft,K=c.value.startLeft+A;x.style.left=`${Math.max(T,K)}px`},I=()=>{if(u.value){const{startColumnLeft:M,startLeft:A}=c.value;h.width=h.realWidth=Number.parseInt(x.style.left,10)-M,S==null||S.emit("header-dragend",h.width,A-M,h,p),requestAnimationFrame(()=>{e.store.scheduleLayout(!1,!0)}),document.body.style.cursor="",u.value=!1,i.value=null,c.value=void 0,t("set-drag-visible",!1)}document.removeEventListener("mousemove",$),document.removeEventListener("mouseup",I),document.onselectstart=null,document.ondragstart=null,setTimeout(()=>{la(E,"noclick")},0)};document.addEventListener("mousemove",$),document.addEventListener("mouseup",I)}},f=(p,h)=>{var x;if(!e.border||h.children&&h.children.length>0)return;const b=p.target,y=ya(b)?b.closest("th"):null;if(!y)return;const C=Fa(y,"is-sortable");if(C){const $=u.value?"col-resize":"";y.style.cursor=$;const I=y.querySelector(".caret-wrapper");I&&(I.style.cursor=$)}if(!h.resizable||u.value){i.value=null;return}const S=y.getBoundingClientRect(),k=((x=y.parentNode)==null?void 0:x.lastElementChild)===y,E=e.allowDragLastColumn||!k,O=S.width>12&&S.right-p.clientX<8&&E,T=O?"col-resize":"";document.body.style.cursor=T,i.value=O?h:null,C&&(y.style.cursor=T)},v=()=>{!Pt||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 x;p.stopPropagation();const y=h.order===b?null:b||g(h),C=(x=p.target)==null?void 0:x.closest("th");if(C&&Fa(C,"noclick")){la(C,"noclick");return}if(!h.sortable)return;const S=p.currentTarget;if(["ascending","descending"].some($=>Fa(S,$)&&!h.sortOrders.includes($)))return;const k=e.store.states;let E=k.sortProp.value,O;const T=k.sortingColumn.value;(T!==h||T===h&&Sd(T.order))&&(T&&(T.order=null),k.sortingColumn.value=h,E=h.property??null),y?O=h.order=y:O=h.order=null,k.sortProp.value=E,k.sortOrder.value=O,a==null||a.store.commit("changeSortCondition")};return{handleHeaderClick:o,handleHeaderContextMenu:s,handleMouseDown:d,handleMouseMove:f,handleMouseOut:v,handleSortClick:m,handleFilterClick:l}}function O7(e){const t=Fe(fl),n=he("table");return{getHeaderRowStyle:i=>{const u=t==null?void 0:t.props.headerRowStyle;return We(u)?u.call(null,{rowIndex:i}):u},getHeaderRowClass:i=>{const u=[],c=t==null?void 0:t.props.headerRowClassName;return De(c)?u.push(c):We(c)&&u.push(c.call(null,{rowIndex:i})),u.join(" ")},getHeaderCellStyle:(i,u,c,d)=>{let f=(t==null?void 0:t.props.headerCellStyle)??{};We(f)&&(f=f.call(null,{rowIndex:i,columnIndex:u,row:c,column:d}));const v=Jh(u,d.fixed,e.store,c);return Cr(v,"left"),Cr(v,"right"),Object.assign({},f,v)},getHeaderCellClass:(i,u,c,d)=>{const f=Xh(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:i,columnIndex:u,row:c,column:d})),v.push(n.e("cell")),v.filter(m=>!!m).join(" ")}}}var Iy=ue({name:"ElTableHeader",components:{ElCheckbox:ll},props:{fixed:{type:String,default:""},store:{required:!0,type:Object},border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})},appendFilterPanelTo:{type:String},allowDragLastColumn:{type:Boolean}},setup(e,{emit:t}){const n=ht(),a=Fe(fl),l=he("table"),o=V({}),{onColumnsChange:s,onScrollableChange:i}=Qh(a),u=(a==null?void 0:a.props.tableLayout)==="auto",c=Ft(new Map),d=V();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((A,K)=>{const z=M.querySelector(`.${K.replace(/\s/g,".")}`);z&&(A.width=z.getBoundingClientRect().width||A.width)}),c.clear())})};fe(c,v),zt(()=>{f&&(clearTimeout(f),f=void 0)}),mt(async()=>{await Ae(),await Ae();const{prop:M,order:A}=e.defaultSort;a==null||a.store.commit("sort",{prop:M,order:A,init:!0}),v()});const{handleHeaderClick:g,handleHeaderContextMenu:m,handleMouseDown:p,handleMouseMove:h,handleMouseOut:b,handleSortClick:y,handleFilterClick:C}=$7(e,t),{getHeaderRowStyle:S,getHeaderRowClass:k,getHeaderCellStyle:E,getHeaderCellClass:O}=O7(e),{isGroup:T,toggleAllSelection:x,columnRows:$}=y7(e),{t:I}=St();return n.state={onColumnsChange:s,onScrollableChange:i},n.filterPanels=o,{ns:l,t:I,filterPanels:o,onColumnsChange:s,onScrollableChange:i,columnRows:$,getHeaderRowClass:k,getHeaderRowStyle:S,getHeaderCellClass:O,getHeaderCellStyle:E,handleHeaderClick:g,handleHeaderContextMenu:m,handleMouseDown:p,handleMouseMove:h,handleMouseOut:b,handleSortClick:y,handleFilterClick:C,isGroup:T,toggleAllSelection:x,saveIndexSelection:c,isTableLayoutAuto:u,theadRef:d,updateFixedColumnStyle:v}},render(){const{ns:e,t,isGroup:n,columnRows:a,getHeaderCellStyle:l,getHeaderCellClass:o,getHeaderRowClass:s,getHeaderRowStyle:i,handleHeaderClick:u,handleHeaderContextMenu:c,handleMouseDown:d,handleMouseMove:f,handleSortClick: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:i(S)},C.map((k,E)=>{k.rowSpan>y&&(y=k.rowSpan);const O=o(S,E,C,k);return b&&k.fixed&&h.set(O,k),Ge("th",{class:O,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:T=>{var x;(x=T.currentTarget)!=null&&x.classList.contains("noclick")||u(T,k)},onContextmenu:T=>c(T,k),onMousedown:T=>d(T,k),onMousemove:T=>f(T,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:T=>v(T,k)},[Ge("i",{onClick:T=>v(T,k,"ascending"),class:"sort-caret ascending"}),Ge("i",{onClick:T=>v(T,k,"descending"),class:"sort-caret descending"})]),k.filterable&&Ge(T7,{store:m,placement:k.filterPlacement||"bottom-start",appendTo:p==null?void 0:p.appendFilterPanelTo,column:k,upDataColumn:(T,x)=>{k[T]=x}},{"filter-icon":()=>k.renderFilterIcon?k.renderFilterIcon({filterOpened:k.filterOpened}):null})])])}))))}});function N7(e){const t=Fe(fl),n=V(""),a=V(Ge("div")),l=(m,p,h)=>{var k,E;const b=t,y=Df(m);let C=null;const S=(k=b==null?void 0:b.vnode.el)==null?void 0:k.dataset.prefix;y&&(C=Ny({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")},i=(m,p)=>{l(m,p,"contextmenu")},u=Il(m=>{var p;(p=e.store)==null||p.commit("setHoverRow",m)},30),c=Il(()=>{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:i,handleMouseEnter:u,handleMouseLeave:c,handleCellMouseEnter:(m,p,h)=>{var _,L,H;if(!t)return;const b=t,y=Df(m),C=(_=b==null?void 0:b.vnode.el)==null?void 0:_.dataset.prefix;let S=null;if(y){if(S=Ny({columns:((L=e.store)==null?void 0:L.states.columns.value)??[]},y,C),!S)return;y.rowSpan>1&&f(y.rowSpan,m,Va);const D=b.hoverState={cell:y,column:S,row:p};b==null||b.emit("cell-mouse-enter",D.row,D.column,D.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&&((H=k.textContent)!=null&&H.trim())))return;const E=document.createRange();E.setStart(k,0),E.setEnd(k,k.childNodes.length);const{width:O,height:T}=E.getBoundingClientRect(),{width:x,height:$}=k.getBoundingClientRect(),{top:I,left:M,right:A,bottom:K}=d(k),z=M+A,B=I+K;$l(O+z,x)||$l(T+B,$)||$l(k.scrollWidth,x)?u7(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=Df(m);if(!p)return;p.rowSpan>1&&f(p.rowSpan,m,la);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 M7(e){const t=Fe(fl),n=he("table");return{getRowStyle:(c,d)=>{const f=t==null?void 0:t.props.rowStyle;return We(f)?f.call(null,{row:c,rowIndex:d}):f||null},getRowClass:(c,d,f)=>{var m;const 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=Jh(d,e==null?void 0:e.fixed,e.store);return Cr(p,"left"),Cr(p,"right"),Object.assign({},m,p)},getCellClass:(c,d,f,v,g)=>{const m=Xh(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 P7=["colspan","rowspan"];var I7=ue({name:"TableTdWrapper",__name:"td-wrapper",props:{colspan:{type:Number,default:1},rowspan:{type:Number,default:1}},setup(e){return(t,n)=>(N(),F("td",{colspan:e.colspan,rowspan:e.rowspan},[ne(t.$slots,"default")],8,P7))}}),R7=I7;function _7(e){const t=Fe(fl),n=he("table"),{handleDoubleClick:a,handleClick:l,handleContextMenu:o,handleMouseEnter:s,handleMouseLeave:i,handleCellMouseEnter:u,handleCellMouseLeave:c,tooltipContent:d,tooltipTrigger:f}=N7(e),{getRowStyle:v,getRowClass:g,getCellStyle:m,getCellClass:p,getSpan:h,getColspanRealWidth:b}=M7(e);let y=-1;const C=w(()=>{var T;return(T=e.store)==null?void 0:T.states.columns.value.findIndex(({type:x})=>x==="default")}),S=(T,x)=>{var I;const $=(I=t==null?void 0:t.props)==null?void 0:I.rowKey;return $?En(T,$):x},k=(T,x,$,I=!1)=>{const{tooltipEffect:M,tooltipOptions:A,store:K}=e,{indent:z,columns:B}=K.states,_=[];let L=!0;return $&&(_.push(n.em("row",`level-${$.level}`)),L=!!$.display),x===0&&(y=-1),e.stripe&&L&&y++,_.push(...g(T,x,y)),Ge("tr",{style:[L?null:{display:"none"},v(T,x)],class:_,key:S(T,x),onDblclick:H=>a(H,T),onClick:H=>l(H,T),onContextmenu:H=>o(H,T),onMouseenter:()=>s(x),onMouseleave:i},B.value.map((H,D)=>{const{rowspan:W,colspan:q}=h(T,H,x,D);if(!W||!q)return null;const X=Object.assign({},H);X.realWidth=b(B.value,q,D);const J={store:K,_self:e.context||t,column:X,row:T,$index:x,cellIndex:D,expanded:I};D===C.value&&$&&(J.treeNode={indent:$.level&&$.level*z.value,level:$.level},qt($.expanded)&&(J.treeNode.expanded=$.expanded,"loading"in $&&(J.treeNode.loading=$.loading),"noLazyChildren"in $&&(J.treeNode.noLazyChildren=$.noLazyChildren)));const Q=`${S(T,x)},${D}`,ee=X.columnKey||X.rawColumnKey||"",ie=H.showOverflowTooltip&&b1({effect:M},A,H.showOverflowTooltip);return Ge(R7,{style:m(x,D,T,H),class:p(x,D,T,H,q-1),key:`${ee}${Q}`,rowspan:W,colspan:q,onMouseenter:pe=>u(pe,T,ie),onMouseleave:c},{default:()=>E(D,H,J)})}))},E=(T,x,$)=>x.renderCell($);return{wrappedRowRender:(T,x)=>{const $=e.store,{isRowExpanded:I,assertRowKey:M}=$,{treeData:A,lazyTreeNodeMap:K,childrenColumnName:z,rowKey:B}=$.states,_=$.states.columns.value;if(_.some(({type:L})=>L==="expand")){const L=I(T),H=k(T,x,void 0,L),D=t==null?void 0:t.renderExpanded;if(!D)return console.error("[Element Error]renderExpanded is required."),H;const W=[[H]];return(t.props.preserveExpandedContent||L)&&W[0].push(Ge("tr",{key:`expanded-row__${H.key}`,style:{display:L?"":"none"}},[Ge("td",{colspan:_.length,class:`${n.e("cell")} ${n.e("expanded-cell")}`},[D({row:T,$index:x,store:$,expanded:L})])])),W}else if(Object.keys(A.value).length){M();const L=En(T,B.value);let H=A.value[L],D=null;H&&(D={expanded:H.expanded,level:H.level,display:!0,noLazyChildren:void 0,loading:void 0},qt(H.lazy)&&(D&&qt(H.loaded)&&H.loaded&&(D.noLazyChildren=!(H.children&&H.children.length)),D.loading=H.loading));const W=[k(T,x,D??void 0)];if(H){let q=0;const X=(J,Q)=>{J&&J.length&&Q&&J.forEach(ee=>{const ie={display:Q.display&&Q.expanded,level:Q.level+1,expanded:!1,noLazyChildren:!1,loading:!1},pe=En(ee,B.value);if(Ta(pe))throw new Error("For nested data item, row-key is required.");if(H={...A.value[pe]},H&&(ie.expanded=H.expanded,H.level=H.level||ie.level,H.display=!!(H.expanded&&ie.display),qt(H.lazy)&&(qt(H.loaded)&&H.loaded&&(ie.noLazyChildren=!(H.children&&H.children.length)),ie.loading=H.loading)),q++,W.push(k(ee,x+q,ie)),H){const ve=K.value[pe]||ee[z.value];X(ve,H)}})};H.display=!0,X(K.value[L]||T[z.value],H)}return W}else return k(T,x,void 0)},tooltipContent:d,tooltipTrigger:f}}const A7={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 L7=ue({name:"ElTableBody",props:A7,setup(e){var d;const t=ht(),n=Fe(fl),a=he("table"),{wrappedRowRender:l,tooltipContent:o,tooltipTrigger:s}=_7(e),{onColumnsChange:i,onScrollableChange:u}=Qh(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 O,T;return((O=h[E])==null?void 0:O.colSpan)>1&&(C=(T=h[E])==null?void 0:T.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=>la(C,"hover-cell")),c.length=0;!((y=e.store)!=null&&y.states.isComplex.value)||!Pt||Hn(()=>{const C=m[v],S=m[f];C&&!C.classList.contains("hover-fixed-row")&&la(C,"hover-row"),S&&Va(S,"hover-row")})}),xr(()=>{pn==null||pn()}),{ns:a,onColumnsChange:i,onScrollableChange:u,wrappedRowRender:l,tooltipContent:o,tooltipTrigger:s}},render(){const{wrappedRowRender:e,store:t}=this,n=(t==null?void 0:t.states.data.value)||[];return Ge("tbody",{tabIndex:-1},[n.reduce((a,l)=>a.concat(e(l,a.length)),[])])}});function D7(){var t;const e=(t=Fe(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 V7(e){const{columns:t}=D7(),n=he("table");return{getCellClasses:(o,s)=>{const i=o[s],u=[n.e("cell"),i.id,i.align,i.labelClassName,...Xh(n.b(),s,i.fixed,e.store)];return i.className&&u.push(i.className),i.children||u.push(n.is("leaf")),u},getCellStyles:(o,s)=>{const i=Jh(s,o.fixed,e.store);return Cr(i,"left"),Cr(i,"right"),i},columns:t}}var Ry=ue({name:"ElTableFooter",props:{fixed:{type:String,default:""},store:{required:!0,type:Object},summaryMethod:Function,sumText:String,border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(e){const t=Fe(fl),n=he("table"),{getCellClasses:a,getCellStyles:l,columns:o}=V7(e),{onScrollableChange:s,onColumnsChange:i}=Qh(t);return{ns:n,onScrollableChange:s,onColumnsChange:i,getCellClasses:a,getCellStyles:l,columns:o}},render(){const{columns:e,getCellStyles:t,getCellClasses:n,summaryMethod:a,sumText:l}=this,o=this.store.states.data.value;let s=[];return a?s=a({columns:e,data:o}):e.forEach((i,u)=>{if(u===0){s[u]=l;return}const c=o.map(g=>Number(g[i.property])),d=[];let f=!0;c.forEach(g=>{if(!Number.isNaN(+g)){f=!1;const m=`${g}`.split(".")[1];d.push(m?m.length:0)}});const 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((i,u)=>Ge("td",{key:u,colspan:i.colSpan,rowspan:i.rowSpan,class:n(e,u),style:t(i,u)},[Ge("div",{class:["cell",i.labelClassName]},[s[u]])]))])]))}});function B7(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 F7(e,t,n,a){const l=V(!1),o=V(null),s=V(!1),i=z=>{s.value=z},u=V({width:null,height:null,headerHeight:null}),c=V(!1),d={display:"inline-block",verticalAlign:"middle"},f=V(),v=V(0),g=V(0),m=V(0),p=V(0),h=V(0);fe(()=>e.height,z=>{t.setHeight(z??null)},{immediate:!0}),fe(()=>e.maxHeight,z=>{t.setMaxHeight(z??null)},{immediate:!0}),fe(()=>[e.currentRowKey,n.states.rowKey],([z,B])=>{!r(B)||!r(z)||n.setCurrentRowKey(`${z}`)},{immediate:!0}),fe(()=>e.data,z=>{a.store.commit("setData",z)},{immediate:!0,deep:!0}),sa(()=>{e.expandRowKeys&&n.setExpandRowKeysAdapter(e.expandRowKeys)});const b=()=>{a.store.commit("setHoverRow",null),a.hoverState&&(a.hoverState=null)},y=(z,B)=>{const{pixelX:_,pixelY:L}=B;Math.abs(_)>=Math.abs(L)&&(a.refs.bodyWrapper.scrollLeft+=B.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(x)};mt(async()=>{await Ae(),n.updateColumns(),$(),requestAnimationFrame(k);const z=a.vnode.el,B=a.refs.headerWrapper;e.flexible&&z&&z.parentElement&&(z.parentElement.style.minWidth="0"),u.value={width:f.value=z.offsetWidth,height:z.offsetHeight,headerHeight:e.showHeader&&B?B.offsetHeight:null},n.states.columns.value.forEach(_=>{_.filteredValue&&_.filteredValue.length&&a.store.commit("filterChange",{column:_,values:_.filteredValue,silent:!0})}),a.$ready=!0});const E=(z,B)=>{if(!z)return;const _=Array.from(z.classList).filter(L=>!L.startsWith("is-scrolling-"));_.push(t.scrollX.value?B:"is-scrolling-none"),z.className=_.join(" ")},O=z=>{const{tableWrapper:B}=a.refs;E(B,z)},T=z=>{const{tableWrapper:B}=a.refs;return!!(B&&B.classList.contains(z))},x=function(){if(!a.refs.scrollBarRef)return;if(!t.scrollX.value){const W="is-scrolling-none";T(W)||O(W);return}const z=a.refs.scrollBarRef.wrapRef;if(!z)return;const{scrollLeft:B,offsetWidth:_,scrollWidth:L}=z,{headerWrapper:H,footerWrapper:D}=a.refs;H&&(H.scrollLeft=B),D&&(D.scrollLeft=B),B>=L-_-1?O("is-scrolling-right"):O(B===0?"is-scrolling-left":"is-scrolling-middle")},$=()=>{a.refs.scrollBarRef&&(a.refs.scrollBarRef.wrapRef&&Ht(a.refs.scrollBarRef.wrapRef,"scroll",x,{passive:!0}),e.fit?on(a.vnode.el,I):Ht(window,"resize",I),on(a.refs.tableInnerWrapper,()=>{var z,B;I(),(B=(z=a.refs)==null?void 0:z.scrollBarRef)==null||B.update()}))},I=()=>{var X,J,Q,ee;const z=a.vnode.el;if(!a.$ready||!z)return;let B=!1;const{width:_,height:L,headerHeight:H}=u.value,D=f.value=z.offsetWidth;_!==D&&(B=!0);const W=z.offsetHeight;(e.height||C.value)&&L!==W&&(B=!0);const q=e.tableLayout==="fixed"?a.refs.headerWrapper:(X=a.refs.tableHeaderRef)==null?void 0:X.$el;e.showHeader&&(q==null?void 0:q.offsetHeight)!==H&&(B=!0),v.value=((J=a.refs.tableWrapper)==null?void 0:J.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,B&&(u.value={width:D,height:W,headerHeight:e.showHeader&&(q==null?void 0:q.offsetHeight)||0},k())},M=$n(),A=w(()=>{const{bodyWidth:z,scrollY:B,gutterWidth:_}=t;return z.value?`${z.value-(B.value?_:0)}px`:""}),K=w(()=>e.maxHeight?"fixed":e.tableLayout);return{isHidden:l,renderExpanded:o,setDragVisible:i,isGroup:c,handleMouseLeave:b,handleHeaderFooterMousewheel:y,tableSize:M,emptyBlockStyle:w(()=>{if(e.data&&e.data.length)return;let z="100%";e.height&&g.value&&(z=`${g.value}px`);const B=f.value;return{width:B?`${B}px`:"",height:z}}),resizeProxyVisible:s,bodyWidth:A,resizeState:u,doLayout:k,tableBodyStyles:S,tableLayout:K,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 z7(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()}),xr(()=>{t==null||t.disconnect()})}function ac(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))))}ac.props=["columns","tableLayout"];const H7=()=>{const e=V(),t=(o,s)=>{const i=e.value;i&&i.scrollTo(o,s)},n=(o,s)=>{const i=e.value;i&&He(s)&&["Top","Left"].includes(o)&&i[`setScroll${o}`](s)};return{scrollBarRef:e,scrollTo:t,setScrollTop:o=>n("Top",o),setScrollLeft:o=>n("Left",o)}},K7=["data-prefix"],W7={ref:"hiddenColumns",class:"hidden-columns"};var j7=ue({name:"ElTable",__name:"table",props:J9,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=ho("table"),s=ht();Tt(fl,s);const i=m7(s,n);s.store=i;const u=new b7({store:s.store,table:s,fit:n.fit,showHeader:n.showHeader});s.layout=u;const c=w(()=>(i.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}=B7(i),{isHidden:k,renderExpanded:E,setDragVisible:O,isGroup:T,handleMouseLeave:x,handleHeaderFooterMousewheel:$,tableSize:I,emptyBlockStyle:M,resizeProxyVisible:A,bodyWidth:K,resizeState:z,doLayout:B,tableBodyStyles:_,tableLayout:L,scrollbarViewStyle:H,scrollbarStyle:D}=F7(n,u,i,s),{scrollBarRef:W,scrollTo:q,setScrollLeft:X,setScrollTop:J}=H7(),Q=Il(B,50),ee=e7(l.namespace.value),ie=s;s.tableId=ee,s.state={isGroup:T,resizeState:z,doLayout:B,debouncedUpdateLayout:Q};const pe=w(()=>n.sumText??a("el.table.sumText")),ve=w(()=>n.emptyText??a("el.table.emptyText")),re=w(()=>{var ae;return n.tooltipEffect??((ae=o.value)==null?void 0:ae.tooltipEffect)}),R=w(()=>{var ae;return n.tooltipOptions??((ae=o.value)==null?void 0:ae.tooltipOptions)}),Y=w(()=>c2(i.states.originColumns.value)[0]);return z7(s),zt(()=>{Q.cancel()}),t({ns:l,layout:u,store:i,columns:Y,handleHeaderFooterMousewheel:$,handleMouseLeave:x,tableId:ee,tableSize:I,isHidden:k,isEmpty:c,renderExpanded:E,resizeProxyVisible:A,resizeState:z,isGroup:T,bodyWidth:K,tableBodyStyles:_,emptyBlockStyle:M,debouncedUpdateLayout:Q,setCurrentRow:d,getSelectionRows:f,getHalfSelectionRows:v,toggleRowSelection:g,clearSelection:m,clearFilter:p,toggleAllSelection:h,toggleRowExpansion:b,clearSort:y,doLayout:B,sort:C,updateKeyChildren:S,t:a,setDragVisible:O,context:ie,computedSumText:pe,computedEmptyText:ve,computedTooltipEffect:re,computedTooltipOptions:R,tableLayout:L,scrollbarViewStyle:H,scrollbarStyle:D,scrollBarRef:W,scrollTo:q,setScrollLeft:X,setScrollTop:J,allowDragLastColumn:n.allowDragLastColumn}),(ae,le)=>(N(),F("div",{ref:"tableWrapper",class:P([{[r(l).m("fit")]:e.fit,[r(l).m("striped")]:e.stripe,[r(l).m("border")]:e.border||r(T),[r(l).m("hidden")]:r(k),[r(l).m("group")]:r(T),[r(l).m("fluid-height")]:e.maxHeight,[r(l).m("scrollable-x")]:r(u).scrollX.value,[r(l).m("scrollable-y")]:r(u).scrollY.value,[r(l).m("enable-row-hover")]:!r(i).states.isComplex.value,[r(l).m("enable-row-transition")]:(r(i).states.data.value||[]).length!==0&&(r(i).states.data.value||[]).length<100,"has-footer":e.showSummary},r(l).m(r(I)),e.className,r(l).b(),r(l).m(`layout-${r(L)}`)]),style:je(e.style),"data-prefix":r(l).namespace.value,onMouseleave:le[1]||(le[1]=(...se)=>r(x)&&r(x)(...se))},[j("div",{ref:"tableInnerWrapper",class:P(r(l).e("inner-wrapper"))},[j("div",W7,[ne(ae.$slots,"default")],512),e.showHeader&&r(L)==="fixed"?ft((N(),F("div",{key:0,ref:"headerWrapper",class:P(r(l).e("header-wrapper"))},[j("table",{ref:"tableHeader",class:P(r(l).e("header")),style:je(r(_)),border:"0",cellpadding:"0",cellspacing:"0"},[U(r(ac),{columns:r(i).states.columns.value,"table-layout":r(L)},null,8,["columns","table-layout"]),U(r(Iy),{ref:"tableHeaderRef",border:e.border,"default-sort":e.defaultSort,store:r(i),"append-filter-panel-to":e.appendFilterPanelTo,"allow-drag-last-column":e.allowDragLastColumn,onSetDragVisible:r(O)},null,8,["border","default-sort","store","append-filter-panel-to","allow-drag-last-column","onSetDragVisible"])],6)],2)),[[r(Gb),r($)]]):te("v-if",!0),j("div",{ref:"bodyWrapper",class:P(r(l).e("body-wrapper"))},[U(r(il),{ref_key:"scrollBarRef",ref:W,"view-style":r(H),"wrap-style":r(D),always:e.scrollbarAlwaysOn,tabindex:e.scrollbarTabindex,native:e.nativeScrollbar,onScroll:le[0]||(le[0]=se=>ae.$emit("scroll",se))},{default:Z(()=>[j("table",{ref:"tableBody",class:P(r(l).e("body")),cellspacing:"0",cellpadding:"0",border:"0",style:je({width:r(K),tableLayout:r(L)})},[U(r(ac),{columns:r(i).states.columns.value,"table-layout":r(L)},null,8,["columns","table-layout"]),e.showHeader&&r(L)==="auto"?(N(),oe(r(Iy),{key:0,ref:"tableHeaderRef",class:P(r(l).e("body-header")),border:e.border,"default-sort":e.defaultSort,store:r(i),"append-filter-panel-to":e.appendFilterPanelTo,onSetDragVisible:r(O)},null,8,["class","border","default-sort","store","append-filter-panel-to","onSetDragVisible"])):te("v-if",!0),U(r(L7),{context:r(ie),highlight:e.highlightCurrentRow,"row-class-name":e.rowClassName,"tooltip-effect":re.value,"tooltip-options":R.value,"row-style":e.rowStyle,store:r(i),stripe:e.stripe},null,8,["context","highlight","row-class-name","tooltip-effect","tooltip-options","row-style","store","stripe"]),e.showSummary&&r(L)==="auto"?(N(),oe(r(Ry),{key:1,class:P(r(l).e("body-footer")),border:e.border,"default-sort":e.defaultSort,store:r(i),"sum-text":pe.value,"summary-method":e.summaryMethod},null,8,["class","border","default-sort","store","sum-text","summary-method"])):te("v-if",!0)],6),c.value?(N(),F("div",{key:0,ref:"emptyBlock",style:je(r(M)),class:P(r(l).e("empty-block"))},[j("span",{class:P(r(l).e("empty-text"))},[ne(ae.$slots,"empty",{},()=>[dt(we(ve.value),1)])],2)],6)):te("v-if",!0),ae.$slots.append?(N(),F("div",{key:1,ref:"appendWrapper",class:P(r(l).e("append-wrapper"))},[ne(ae.$slots,"append")],2)):te("v-if",!0)]),_:3},8,["view-style","wrap-style","always","tabindex","native"])],2),e.showSummary&&r(L)==="fixed"?ft((N(),F("div",{key:1,ref:"footerWrapper",class:P(r(l).e("footer-wrapper"))},[j("table",{class:P(r(l).e("footer")),cellspacing:"0",cellpadding:"0",border:"0",style:je(r(_))},[U(r(ac),{columns:r(i).states.columns.value,"table-layout":r(L)},null,8,["columns","table-layout"]),U(r(Ry),{border:e.border,"default-sort":e.defaultSort,store:r(i),"sum-text":pe.value,"summary-method":e.summaryMethod},null,8,["border","default-sort","store","sum-text","summary-method"])],6)],2)),[[Lt,!c.value],[r(Gb),r($)]]):te("v-if",!0),e.border||r(T)?(N(),F("div",{key:2,class:P(r(l).e("border-left-patch"))},null,2)):te("v-if",!0)],2),ft(j("div",{ref:"resizeProxy",class:P(r(l).e("column-resize-proxy"))},null,2),[[Lt,r(A)]])],46,K7))}}),q7=j7;const Y7={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))}},U7={selection:"table-column--selection",expand:"table__expand-column"},G7={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:""}},X7=e=>U7[e]||"",J7={selection:{renderHeader({store:e}){function t(){return e.states.data.value&&e.states.data.value.length===0}return Ge(ll,{disabled:t(),size:e.states.tableSize.value,indeterminate:e.states.selection.value.length>0&&!e.states.isAllSelected.value,"onUpdate:modelValue":e.toggleAllSelection??void 0,modelValue:e.states.isAllSelected.value,ariaLabel:e.t("el.table.selectAllLabel")})},renderCell({row:e,column:t,store:n,$index:a}){return Ge(ll,{disabled:t.selectable?!t.selectable.call(null,e,a):!1,size:n.states.tableSize.value,onChange:()=>{n.commit("rowSelectedChanged",e)},onClick:l=>l.stopPropagation(),modelValue:n.isSelected(e),indeterminate:n.getRowIndeterminate(e),ariaLabel:n.t("el.table.selectRowLabel")})},sortable:!1,resizable:!1},index:{renderHeader({column:e}){return e.label||"#"},renderCell({column:e,$index:t}){let n=t+1;const a=e.index;return He(a)?n=t+a:We(a)&&(n=a(t)),Ge("div",{},[n])},sortable:!1},expand:{renderHeader({column:e}){return e.label||""},renderCell({column:e,row:t,store:n,expanded:a,$index:l}){var c,d;const{ns:o}=n,s=[o.e("expand-icon")];!e.renderExpand&&a&&s.push(o.em("expand-icon","expanded"));const i=function(f){f.stopPropagation(),n.toggleRowExpansion(t)},u=((d=(c=n.states.rowExpandable).value)==null?void 0:d.call(c,t,l))??!0;return u||s.push(o.is("disabled")),Ge("button",{type:"button",disabled:!u,"aria-label":n.t(a?"el.table.collapseRowLabel":"el.table.expandRowLabel"),"aria-expanded":a,class:s,onClick:i},{default:()=>e.renderExpand?[e.renderExpand({expanded:a,expandable:u})]:[Ge(Be,null,{default:()=>[Ge(oa)]})]})},sortable:!1,resizable:!1}};function Z7({row:e,column:t,$index:n}){var o;const a=t.property,l=a&&_o(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 Q7({row:e,treeNode:t,store:n},a=!1){const{ns:l}=n;if(!t)return a?[Ge("span",{class:l.e("placeholder")})]:null;const o=[],s=function(i){i.stopPropagation(),!t.loading&&n.loadOrToggle(e)};if(t.indent&&o.push(Ge("span",{class:l.e("indent"),style:{"padding-left":`${t.indent}px`}})),qt(t.expanded)&&!t.noLazyChildren){const i=[l.e("expand-icon"),t.expanded?l.em("expand-icon","expanded"):""];let u=oa;t.loading&&(u=rl),o.push(Ge("button",{type:"button","aria-label":n.t(t.expanded?"el.table.collapseRowLabel":"el.table.expandRowLabel"),"aria-expanded":t.expanded,class:i,onClick:s},{default:()=>[Ge(Be,{class:l.is("loading",t.loading)},{default:()=>[Ge(u)]})]}))}else o.push(Ge("span",{class:l.e("placeholder")}));return o}function _y(e,t){return e.reduce((n,a)=>(n[a]=a,n),t)}function eq(e,t){const n=ht();return{registerComplexWatchers:()=>{const o=["fixed"],s={realWidth:"width",realMinWidth:"minWidth"},i=_y(o,s);Object.keys(i).forEach(u=>{const c=s[u];_t(t,c)&&fe(()=>t[c],d=>{let f=d;c==="width"&&u==="realWidth"&&(f=Gh(d)),c==="minWidth"&&u==="realMinWidth"&&(f=a2(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"],i={property:"prop",align:"realAlign",headerAlign:"realHeaderAlign"},u=_y(o,i);Object.keys(u).forEach(d=>{const f=i[d];_t(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=>{_t(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=ho("table");c.value&&_t(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 tq(e,t,n){const a=ht(),l=V(""),o=V(!1),s=V(),i=V(),u=he("table");sa(()=>{s.value=e.align?`is-${e.align}`:null,s.value}),sa(()=>{i.value=e.headerAlign?`is-${e.headerAlign}`:s.value,i.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=V(Gh(e.width)),v=V(a2(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=J7[k]||{};Object.keys(E).forEach(T=>{const x=E[T];T!=="className"&&!xt(x)&&(S[T]=x)});const O=X7(k);if(O){const T=`${r(u.namespace)}-${O}`;S.className=S.className?`${S.className} ${T}`:T}return S},p=S=>{me(S)?S.forEach(E=>k(E)):k(S);function k(E){var O;((O=E==null?void 0:E.type)==null?void 0:O.name)==="ElTableColumn"&&(E.vParent=a)}};return{columnId:l,realAlign:s,isSubColumn:o,realHeaderAlign:i,columnOrTableParent:c,setColumnWidth:g,setColumnForcedProps:m,setColumnRenders:S=>{e.renderHeader?Kt("TableColumn","Comparing to render-header, scoped-slot header is easier to use. We recommend users to use scoped-slot header."):S.type!=="selection"&&(S.renderHeader=E=>{if(a.columnConfig.value.label,t.header){const O=t.header(E);if(s2(O))return Ge(ze,O)}return dt(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||Z7,S.renderCell=E=>{let O=null;if(t.default){const A=t.default(E);O=A.some(K=>K.type!==Cn)?A:k(E)}else O=k(E);const{columns:T}=n.value.store.states,x=T.value.findIndex(A=>A.type==="default"),$=d.value&&E.cellIndex===x,I=Q7(E,$),M={class:"cell",style:{}};return S.showOverflowTooltip&&(M.class=`${M.class} ${r(u.namespace)}-tooltip`,M.style={width:`${(E.column.realWidth||Number(E.column.width))-1}px`}),p(O),Ge("div",M,[I,O])}),S},getPropsData:(...S)=>S.reduce((k,E)=>(me(E)&&E.forEach(O=>{k[O]=e[O]}),k),{}),getColumnElIndex:(S,k)=>Array.prototype.indexOf.call(S,k),updateColumnOrder:()=>{n.value.store.commit("updateColumnOrder",a.columnConfig.value)}}}var nq=ue({name:"ElTableColumn",__name:"index",props:Y7,setup(e){const t=e,n=mn(),a=ht(),l=ho("table"),o=V({}),s=w(()=>{let O=a.parent;for(;O&&!O.tableId;)O=O.parent;return O}),{registerNormalWatchers:i,registerComplexWatchers:u}=eq(s,t),{columnId:c,isSubColumn:d,realHeaderAlign:f,columnOrTableParent:v,setColumnWidth:g,setColumnForcedProps:m,setColumnRenders:p,getPropsData:h,getColumnElIndex:b,realAlign:y,updateColumnOrder:C}=tq(t,n,s),S=v.value,k="tableId"in S?S.tableId:S.columnId;c.value=t7(k),ud(()=>{var A,K;d.value=s.value!==S;const O=t.type||"default",T=t.sortable===""?!0:t.sortable,x=O==="selection"?!1:xt(t.showOverflowTooltip)?S.props.showOverflowTooltip??((A=l.value)==null?void 0:A.showOverflowTooltip):t.showOverflowTooltip,$=xt(t.tooltipFormatter)?S.props.tooltipFormatter??((K=l.value)==null?void 0:K.tooltipFormatter):t.tooltipFormatter,I={...G7[O],id:c.value,type:O,property:t.prop||t.property,align:y,headerAlign:f,showOverflowTooltip:x,tooltipFormatter:$,filterable:t.filters||t.filterMethod,filteredValue:[],filterPlacement:"",filterClassName:"",isColumnGroup:!1,isSubColumn:!1,filterOpened:!1,sortable:T,index:t.index,rawColumnKey:a.vnode.key};let M=h(["columnKey","label","className","labelClassName","type","renderHeader","formatter","fixed","resizable"],["sortMethod","sortBy","sortOrders"],["selectable","reserveSelection"],["filterMethod","filters","filterMultiple","filterOpened","filteredValue","filterPlacement","filterClassName"]);M=l7(I,M),M=s7(p,g,m)(M),o.value=M,i(),u()}),mt(()=>{var $,I;const O=v.value,T=d.value?($=O.vnode.el)==null?void 0:$.children:(I=O.refs.hiddenColumns)==null?void 0:I.children,x=()=>b(T||[],a.vnode.el);o.value.getColumnIndex=x,x()>-1&&s.value.store.commit("insertColumn",o.value,d.value?"columnConfig"in O&&O.columnConfig.value:null,C)}),zt(()=>{const O=o.value.getColumnIndex;(O?O():-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 E=()=>{var O,T;try{const x=(O=n.default)==null?void 0:O.call(n,{row:{},column:{},$index:-1}),$=[];if(me(x))for(const I of x)((T=I.type)==null?void 0:T.name)==="ElTableColumn"||I.shapeFlag&2?$.push(I):I.type===ze&&me(I.children)&&I.children.forEach(M=>{(M==null?void 0:M.patchFlag)!==1024&&!De(M==null?void 0:M.children)&&$.push(M)});return Ge("div",$)}catch{return Ge("div",[])}};return(O,T)=>(N(),oe(E))}}),aq=nq,lq=aq,d2=lq;const oq=it(q7,{TableColumn:d2}),sq=un(d2),nv={asc:"desc",desc:"asc"},Wi=Symbol("placeholder"),f2=String,mu={type:G(Array),required:!0},em={type:G(Array)},p2={...em,required:!0},rq=String,Ay={type:G(Array),default:()=>dn([])},is={type:Number,required:!0},v2={type:G([String,Number,Symbol]),default:"id"},Ly={type:G(Object)},fs=$e({class:String,columns:mu,columnsStyles:{type:G(Object),required:!0},depth:Number,expandColumnKey:rq,estimatedRowHeight:{...ws.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:v2,style:{type:G(Object)}}),Vf={type:Number,required:!0},tm=$e({class:String,columns:mu,fixedHeaderData:{type:G(Array)},headerData:{type:G(Array),required:!0},headerHeight:{type:G([Number,Array]),default:50},rowWidth:Vf,rowHeight:{type:Number,default:50},height:Vf,width:Vf}),lc=$e({columns:mu,data:p2,fixedData:em,estimatedRowHeight:fs.estimatedRowHeight,width:is,height:is,headerWidth:is,headerHeight:tm.headerHeight,bodyWidth:is,rowHeight:is,cache:TC.cache,useIsScrolling:Boolean,scrollbarAlwaysOn:ws.scrollbarAlwaysOn,scrollbarStartGap:ws.scrollbarStartGap,scrollbarEndGap:ws.scrollbarEndGap,class:f2,style:Ly,containerStyle:Ly,getRowHeight:{type:G(Function),required:!0},rowKey:fs.rowKey,onRowsRendered:{type:G(Function)},onScroll:{type:G(Function)}}),iq=$e({cache:lc.cache,estimatedRowHeight:fs.estimatedRowHeight,rowKey:v2,headerClass:{type:G([String,Function])},headerProps:{type:G([Object,Function])},headerCellProps:{type:G([Object,Function])},headerHeight:tm.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:mu,data:p2,dataGetter:{type:G(Function)},fixedData:em,expandColumnKey:fs.expandColumnKey,expandedRowKeys:Ay,defaultExpandedRowKeys:Ay,class:f2,fixed:Boolean,style:{type:G(Object)},width:is,height:is,maxHeight:Number,useIsScrolling:Boolean,indentSize:{type:Number,default:12},iconSize:{type:Number,default:12},hScrollbarSize:ws.hScrollbarSize,vScrollbarSize:ws.vScrollbarSize,scrollbarAlwaysOn:NC.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:fs.onRowExpand,onScroll:lc.onScroll,onRowsRendered:lc.onRowsRendered,rowEventHandlers:fs.rowEventHandlers}),uq=(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 cq(e,t,n){const a=w(()=>r(t).map((h,b)=>({...h,key:h.key??h.dataKey??b}))),l=w(()=>r(a).filter(h=>!h.hidden)),o=w(()=>r(l).filter(h=>h.fixed==="left"||h.fixed===!0)),s=w(()=>r(l).filter(h=>h.fixed==="right")),i=w(()=>r(l).filter(h=>!h.fixed)),u=w(()=>{const h=[];return r(o).forEach(b=>{h.push({...b,placeholderSign:Wi})}),r(i).forEach(b=>{h.push(b)}),r(s).forEach(b=>{h.push({...b,placeholderSign:Wi})}),h}),c=w(()=>r(o).length||r(s).length),d=w(()=>r(a).reduce((h,b)=>(h[b.key]=uq(b,r(n),e.fixed),h),{})),f=w(()=>r(l).reduce((h,b)=>h+b.width,0)),v=h=>r(a).find(b=>b.key===h),g=h=>r(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=nv[y[b]]:S=nv[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:i,visibleColumns:l,getColumn:v,getColumnStyle:g,updateColumnWidth:m,onColumnSorted:p}}const dq=(e,{mainTableRef:t,leftTableRef:n,rightTableRef:a,onMaybeEndReached:l})=>{const o=V({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 i(g){o.value=g,s(g)}function u(g){o.value.scrollTop=g,s(r(o))}function c(g){var m,p;o.value.scrollLeft=g,(p=(m=t.value)==null?void 0:m.scrollTo)==null||p.call(m,r(o))}function d(g){var m;i(g),(m=e.onScroll)==null||m.call(e,g)}function f({scrollTop:g}){const{scrollTop:m}=r(o);g!==m&&u(g)}function v(g,m="auto"){var p;(p=t.value)==null||p.scrollToRow(g,m)}return fe(()=>r(o).scrollTop,(g,m)=>{g>m&&l()}),{scrollPos:o,scrollTo:i,scrollToLeft:c,scrollToTop:u,scrollToRow:v,onScroll:d,onVerticalScroll:f}},fq=(e,{mainTableRef:t,leftTableRef:n,rightTableRef:a,tableInstance:l,ns:o,isScrolling:s})=>{const i=ht(),{emit:u}=i,c=Et(!1),d=V(e.defaultExpandedRowKeys||[]),f=V(-1),v=Et(null),g=V({}),m=V({}),p=Et({}),h=Et({}),b=Et({}),y=w(()=>He(e.estimatedRowHeight));function C($){var I;(I=e.onRowsRendered)==null||I.call(e,$),$.rowCacheEnd>r(f)&&(f.value=$.rowCacheEnd)}function S({hovered:$,rowKey:I}){s.value||l.vnode.el.querySelectorAll(`[rowkey="${String(I)}"]`).forEach(M=>{$?M.classList.add(o.is("hovered")):M.classList.remove(o.is("hovered"))})}function k({expanded:$,rowData:I,rowIndex:M,rowKey:A}){var B,_;const K=[...r(d)],z=K.indexOf(A);$?z===-1&&K.push(A):z>-1&&K.splice(z,1),d.value=K,u("update:expandedRowKeys",K),(B=e.onRowExpand)==null||B.call(e,{expanded:$,rowData:I,rowIndex:M,rowKey:A}),(_=e.onExpandedRowsChange)==null||_.call(e,K),l.vnode.el.querySelector(`.${o.is("hovered")}[rowkey="${String(A)}"]`)&&Ae(()=>S({hovered:!0,rowKey:A}))}const E=Il(()=>{var $,I,M,A;c.value=!0,g.value={...r(g),...r(m)},O(r(v),!1),m.value={},v.value=null,($=t.value)==null||$.forceUpdate(),(I=n.value)==null||I.forceUpdate(),(M=a.value)==null||M.forceUpdate(),(A=i.proxy)==null||A.$forceUpdate(),c.value=!1},0);function O($,I=!1){r(y)&&[t,n,a].forEach(M=>{const A=r(M);A&&A.resetAfterRowIndex($,I)})}function T($,I,M){const A=r(v);(A===null||A>M)&&(v.value=M),m.value[$]=I}function x({rowKey:$,height:I,rowIndex:M},A){A?A==="right"?b.value[$]=I:p.value[$]=I:h.value[$]=I;const K=Math.max(...[p,b,h].map(z=>z.value[$]||0));r(g)[$]!==K&&(T($,K,M),E())}return{expandedRowKeys:d,lastRenderedRowIndex:f,isDynamic:y,isResetting:c,rowHeights:g,resetAfterIndex:O,onRowExpanded:k,onRowHovered:S,onRowsRendered:C,onRowHeightChange:x}},pq=(e,{expandedRowKeys:t,lastRenderedRowIndex:n,resetAfterIndex:a})=>{const l=V({}),o=w(()=>{const i={},{data:u,rowKey:c}=e,d=r(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=>i[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=>i[p[c]]=i[m[c]]+1))}return l.value=i,f}),s=w(()=>{const{data:i,expandColumnKey:u}=e;return u?r(o):i});return fe(s,(i,u)=>{i!==u&&(n.value=-1,a(0,!0))}),{data:s,depthMap:l}},vq=(e,t)=>e+t,oc=e=>me(e)?e.reduce(vq,0):e,Ms=(e,t,n={})=>We(e)?e(t):e??n,Po=e=>(["width","maxWidth","minWidth","height"].forEach(t=>{e[t]=fn(e[t])}),e),h2=e=>Jt(e)?t=>Ge(e,t):e,hq=(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(r(t)),y):y}),s=w(()=>{const{height:p=0,maxHeight:h=0,footerHeight:b,hScrollbarSize:y}=e;if(h>0){const C=r(v),S=r(n),k=r(f)+C+S+y;return Math.min(k,h-b)}return p-b}),i=w(()=>{const{maxHeight:p}=e,h=r(s);if(He(p)&&p>0)return h;const b=r(n)+r(f)+r(v);return Math.min(h,b)}),u=p=>p.width,c=w(()=>oc(r(a).map(u))),d=w(()=>oc(r(l).map(u))),f=w(()=>oc(e.headerHeight)),v=w(()=>{var p;return(((p=e.fixedData)==null?void 0:p.length)||0)*e.rowHeight}),g=w(()=>r(s)-r(f)-r(v)),m=w(()=>{const{style:p={},height:h,width:b}=e;return Po({...p,height:h,width:b})});return{bodyWidth:o,fixedTableHeight:i,mainTableHeight:s,leftTableWidth:c,rightTableWidth:d,windowHeight:g,footerHeight:w(()=>Po({height:e.footerHeight})),emptyStyle:w(()=>({top:fn(r(f)),bottom:fn(e.footerHeight),width:fn(e.width)})),rootStyle:m,headerHeight:f}};function mq(e){const t=V(),n=V(),a=V(),{columns:l,columnsStyles:o,columnsTotalWidth:s,fixedColumnsOnLeft:i,fixedColumnsOnRight:u,hasFixedColumns:c,mainColumns:d,onColumnSorted:f}=cq(e,Mt(e,"columns"),Mt(e,"fixed")),{scrollTo:v,scrollToLeft:g,scrollToTop:m,scrollToRow:p,onScroll:h,onVerticalScroll:b,scrollPos:y}=dq(e,{mainTableRef:t,leftTableRef:n,rightTableRef:a,onMaybeEndReached:ae}),C=he("table-v2"),S=ht(),k=Et(!1),{expandedRowKeys:E,lastRenderedRowIndex:O,isDynamic:T,isResetting:x,rowHeights:$,resetAfterIndex:I,onRowExpanded:M,onRowHeightChange:A,onRowHovered:K,onRowsRendered:z}=fq(e,{mainTableRef:t,leftTableRef:n,rightTableRef:a,tableInstance:S,ns:C,isScrolling:k}),{data:B,depthMap:_}=pq(e,{expandedRowKeys:E,lastRenderedRowIndex:O,resetAfterIndex:I}),L=w(()=>{const{estimatedRowHeight:le,rowHeight:se}=e,de=r(B);return He(le)?Object.values(r($)).reduce((be,Se)=>be+Se,0):de.length*se}),{bodyWidth:H,fixedTableHeight:D,mainTableHeight:W,leftTableWidth:q,rightTableWidth:X,windowHeight:J,footerHeight:Q,emptyStyle:ee,rootStyle:ie,headerHeight:pe}=hq(e,{columnsTotalWidth:s,fixedColumnsOnLeft:i,fixedColumnsOnRight:u,rowsHeight:L}),ve=V(),re=w(()=>{const le=r(B).length===0;return me(e.fixedData)?e.fixedData.length===0&&le:le});function R(le){const{estimatedRowHeight:se,rowHeight:de,rowKey:be}=e;return se?r($)[r(B)[le][be]]||se:de}const Y=V(!1);function ae(){const{onEndReached:le}=e;if(!le)return;const{scrollTop:se}=r(y),de=r(L),be=de-(se+r(J))+e.hScrollbarSize;!Y.value&&r(O)>=0&&de<=se+r(W)-r(pe)?(Y.value=!0,le(be)):Y.value=!1}return fe(()=>r(L),()=>Y.value=!1),fe(()=>e.expandedRowKeys,le=>E.value=le,{deep:!0}),{columns:l,containerRef:ve,mainTableRef:t,leftTableRef:n,rightTableRef:a,isDynamic:T,isResetting:x,isScrolling:k,hasFixedColumns:c,columnsStyles:o,columnsTotalWidth:s,data:B,expandedRowKeys:E,depthMap:_,fixedColumnsOnLeft:i,fixedColumnsOnRight:u,mainColumns:d,bodyWidth:H,emptyStyle:ee,rootStyle:ie,footerHeight:Q,mainTableHeight:W,fixedTableHeight:D,leftTableWidth:q,rightTableWidth:X,showEmpty:re,getRowHeight:R,onColumnSorted:f,onRowHovered:K,onRowExpanded:M,onRowsRendered:z,onRowHeightChange:A,scrollTo:v,scrollToLeft:g,scrollToTop:m,scrollToRow:p,onScroll:h,onVerticalScroll:b}}const nm=Symbol("tableV2"),m2="tableV2GridScrollLeft",gq=ue({name:"ElTableV2Header",props:tm,setup(e,{slots:t,expose:n}){const a=he("table-v2"),l=Fe(m2),o=V(),s=w(()=>Po({width:e.width,height:e.height})),i=w(()=>Po({width:e.rowWidth,height:e.height})),u=w(()=>An(r(e.headerHeight))),c=v=>{const g=r(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=Po({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 r(u).map((m,p)=>{var b;const h=Po({width:"100%",height:m});return(b=t.dynamic)==null?void 0:b.call(t,{class:v,columns:g,headerIndex:p,style:h})})};return Fl(()=>{l!=null&&l.value&&c(l.value)}),n({scrollToLeft:c}),()=>{if(!(e.height<=0))return U("div",{ref:o,class:e.class,style:r(s),role:"rowgroup"},[U("div",{style:r(i),class:a.e("header")},[f(),d()])])}}}),bq="ElTableV2Grid",yq=e=>{const t=V(),n=V(),a=V(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(()=>oc(e.headerHeight)),i=w(()=>{const{height:h}=e;return Math.max(0,h-r(s)-r(o))}),u=w(()=>r(s)+r(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=r(t),C=r(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=r(n))==null||b.scrollTo({scrollTop:h})}function m(h,b){const y=r(n);if(!y)return;const C=a.value;y.scrollToItem(h,0,b),C&&v({scrollLeft:C})}function p(){var h,b;(h=r(n))==null||h.$forceUpdate(),(b=r(t))==null||b.$forceUpdate()}return fe(()=>e.bodyWidth,()=>{var h;He(e.estimatedRowHeight)&&((h=n.value)==null||h.resetAfter({columnIndex:0},!1))}),{bodyRef:n,forceUpdate:p,fixedRowHeight:o,gridHeight:i,hasHeader:u,headerHeight:s,headerRef:t,totalHeight:l,itemKey:c,onItemRendered:d,resetAfterRowIndex:f,scrollTo:v,scrollToTop:g,scrollToRow:m,scrollLeft:a}},am=ue({name:bq,props:lc,setup(e,{slots:t,expose:n}){const{ns:a}=Fe(nm),{bodyRef:l,fixedRowHeight:o,gridHeight:s,hasHeader:i,headerRef:u,headerHeight:c,totalHeight:d,forceUpdate:f,itemKey:v,onItemRendered:g,resetAfterRowIndex:m,scrollTo:p,scrollToTop:h,scrollToRow:b,scrollLeft:y}=yq(e);Tt(m2,y),Gi(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:O,useIsScrolling:T,scrollbarAlwaysOn:x,scrollbarEndGap:$,scrollbarStartGap:I,style:M,rowHeight:A,bodyWidth:K,estimatedRowHeight:z,headerWidth:B,height:_,width:L,getRowHeight:H,onScroll:D}=e,W=He(z),q=W?nB:ZV,X=r(c);return U("div",{role:"table",class:[a.e("table"),e.class],style:M},[U(q,{ref:l,data:E,useIsScrolling:T,itemKey:v,columnCache:0,columnWidth:W?C:K,totalColumn:1,totalRow:E.length,rowCache:S,rowHeight:W?H:A,width:L,height:r(s),class:a.e("body"),role:"rowgroup",scrollbarStartGap:I,scrollbarEndGap:$,scrollbarAlwaysOn:x,onScroll:D,onItemRendered:g,perfMode:!1},{default:J=>{var ee;const Q=E[J.rowIndex];return(ee=t.row)==null?void 0:ee.call(t,{...J,columns:k,rowData:Q})}}),r(i)&&U(gq,{ref:u,class:a.e("header-wrapper"),columns:k,headerData:E,headerHeight:e.headerHeight,fixedHeaderData:O,rowWidth:B,rowHeight:A,width:L,height:Math.min(X+r(o),_)},{dynamic:t.header,fixed:t.row})])}}});function wq(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Jt(e)}const Sq=(e,{slots:t})=>{const{mainTableRef:n,...a}=e;return U(am,pt({ref:n},a),wq(t)?t:{default:()=>[t]})};function Cq(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Jt(e)}const kq=(e,{slots:t})=>{if(!e.columns.length)return;const{leftTableRef:n,...a}=e;return U(am,pt({ref:n},a),Cq(t)?t:{default:()=>[t]})};function Eq(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Jt(e)}const xq=(e,{slots:t})=>{if(!e.columns.length)return;const{rightTableRef:n,...a}=e;return U(am,pt({ref:n},a),Eq(t)?t:{default:()=>[t]})},Tq=e=>{const{isScrolling:t}=Fe(nm),n=V(!1),a=V(),l=w(()=>He(e.estimatedRowHeight)&&e.rowIndex>=0),o=(u=!1)=>{const c=r(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)===Wi;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}),i=u=>{const{onRowExpand:c,rowData:d,rowIndex:f,rowKey:v}=e;c==null||c({expanded:u,rowData:d,rowIndex:f,rowKey:v})};return mt(()=>{r(l)&&o(!0)}),{isScrolling:t,measurable:l,measured:n,rowRef:a,eventHandlers:s,onExpand:i}},$q=ue({name:"ElTableV2TableRow",props:fs,setup(e,{expose:t,slots:n,attrs:a}){const{eventHandlers:l,isScrolling:o,measurable:s,measured:i,rowRef:u,onExpand:c}=Tq(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:r(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:r(o)})),r(s)){const{height:y,...C}=h||{},S=r(i);return U("div",pt({ref:u,class:e.class,style:S?h:C,role:"row"},a,r(l)),[b])}return U("div",pt(a,{ref:u,class:e.class,style:h,role:"row"},r(l)),[b])}}});function Oq(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Jt(e)}const Nq=(e,{slots:t})=>{const{columns:n,columnsStyles:a,depthMap:l,expandColumnKey:o,expandedRowKeys:s,estimatedRowHeight:i,hasFixedColumns:u,rowData:c,rowIndex:d,style:f,isScrolling:v,rowProps:g,rowClass:m,rowKey:p,rowEventHandlers:h,ns:b,onRowHovered:y,onRowExpanded:C}=e,S=Ms(m,{columns:n,rowData:c,rowIndex:d},""),k=Ms(g,{columns:n,rowData:c,rowIndex:d}),E=c[p],O=l[E]||0,T=!!o,x=d<0,$=[b.e("row"),S,b.is("expanded",T&&s.includes(E)),b.is("fixed",!O&&x),b.is("customized",!!t.row),{[b.e(`row-depth-${O}`)]:T&&d>=0}],I=u?y:void 0,M={...k,columns:n,columnsStyles:a,class:$,depth:O,expandColumnKey:o,estimatedRowHeight:x?void 0:i,isScrolling:v,rowIndex:d,rowData:c,rowKey:E,rowEventHandlers:h,style:f};return U($q,pt(M,{onRowExpand:C,onMouseenter:z=>{I==null||I({hovered:!0,rowKey:E,event:z,rowData:c,rowIndex:d})},onMouseleave:z=>{I==null||I({hovered:!1,rowKey:E,event:z,rowData:c,rowIndex:d})},rowkey:E}),Oq(t)?t:{default:()=>[t]})},lm=(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 U("div",{class:e.class,title:l,style:a},[o])};lm.displayName="ElTableV2Cell";lm.inheritAttrs=!1;const g2=e=>{const{expanded:t,expandable:n,onExpand:a,style:l,size:o,ariaLabel:s}=e,i={onClick:n?()=>a(!t):void 0,ariaLabel:s,ariaExpanded:t,class:e.class};return U("button",pt(i,{type:"button"}),[U(Be,{size:o,style:l},{default:()=>[U(oa,null,null)]})])};g2.inheritAttrs=!1;const av=({columns:e,column:t,columnIndex:n,depth:a,expandIconProps:l,isScrolling:o,rowData:s,rowIndex:i,style:u,expandedRowKeys:c,ns:d,t:f,cellProps:v,expandColumnKey:g,indentSize:m,iconSize:p,rowKey:h},{slots:b})=>{const y=Po(u);if(t.placeholderSign===Wi)return U("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:i}):Sn(s,S??""),O=Ms(v,{cellData:E,columns:e,column:t,columnIndex:n,rowIndex:i,rowData:s}),T={class:d.e("cell-text"),columns:e,column:t,columnIndex:n,cellData:E,isScrolling:o,rowData:s,rowIndex:i},x=h2(C),$=x?x(T):ne(b,"default",T,()=>[U(lm,T,null)]),I=[d.e("row-cell"),t.class,t.align==="center"&&d.is("align-center"),t.align==="right"&&d.is("align-right")],M=i>=0&&g&&t.key===g,A=i>=0&&c.includes(s[h]);let K;const z=`margin-inline-start: ${a*m}px;`;return M&&(rt(l)?K=U(g2,pt(l,{class:[d.e("expand-icon"),d.is("expanded",A)],size:p,expanded:A,ariaLabel:f(A?"el.table.collapseRowLabel":"el.table.expandRowLabel"),style:z,expandable:!0}),null):K=U("div",{style:[z,`width: ${p}px; height: ${p}px;`].join(" ")},null)),U("div",pt({class:I,style:y},O,{role:"cell"}),[K,$])};av.inheritAttrs=!1;const Mq=$e({class:String,columns:mu,columnsStyles:{type:G(Object),required:!0},headerIndex:Number,style:{type:G(Object)}}),Pq=ue({name:"ElTableV2HeaderRow",props:Mq,setup(e,{slots:t}){return()=>{const{columns:n,columnsStyles:a,headerIndex:l,style:o}=e;let s=n.map((i,u)=>t.cell({columns:n,column:i,columnIndex:u,headerIndex:l,style:a[i.key]}));return t.header&&(s=t.header({cells:s.map(i=>me(i)&&i.length===1?i[0]:i),columns:n,headerIndex:l})),U("div",{class:e.class,style:o,role:"row"},[s])}}});function Iq(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Jt(e)}const Rq=({columns:e,columnsStyles:t,headerIndex:n,style:a,headerClass:l,headerProps:o,ns:s},{slots:i})=>{const u={columns:e,headerIndex:n},c=[s.e("header-row"),Ms(l,u,""),s.is("customized",!!i.header)],d={...Ms(o,u),columnsStyles:t,class:c,columns:e,headerIndex:n,style:a};return U(Pq,d,Iq(i)?i:{default:()=>[i]})},om=(e,{slots:t})=>ne(t,"default",e,()=>{var n,a;return[U("div",{class:e.class,title:(n=e.column)==null?void 0:n.title},[(a=e.column)==null?void 0:a.title])]});om.displayName="ElTableV2HeaderCell";om.inheritAttrs=!1;const _q=e=>{const{sortOrder:t}=e;return U("button",{type:"button","aria-label":e.ariaLabel,class:e.class},[U(Be,{size:14},{default:()=>[U(t==="asc"?v3:f3,null,null)]})])},Dy=(e,{slots:t})=>{const{column:n,ns:a,t:l,style:o,onColumnSorted:s}=e,i=Po(o);if(n.placeholderSign===Wi)return U("div",{class:a.em("header-row-cell","placeholder"),style:i},null);const{headerCellRenderer:u,headerClass:c,sortable:d}=n,f={...e,class:a.e("header-cell-text")},v=h2(u),g=v?v(f):ne(t,"default",f,()=>[U(om,f,null)]),{sortBy:m,sortState:p,headerCellProps:h}=e;let b,y,C;if(p){const E=p[n.key];b=!!nv[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"),Ms(c,e,""),n.align==="center"&&a.is("align-center"),n.align==="right"&&a.is("align-right"),d&&a.is("sortable")],k={...Ms(h,e),onClick:n.sortable?s:void 0,ariaSort:d?C:void 0,class:S,style:i,"data-key":n.key};return U("div",pt(k,{role:"columnheader"}),[g,d&&U(_q,{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 U("div",{class:e.class,style:e.style},[(n=t.default)==null?void 0:n.call(t)])};b2.displayName="ElTableV2Footer";const y2=(e,{slots:t})=>{const n=ne(t,"default",{},()=>[U(Wk,null,null)]);return U("div",{class:e.class,style:e.style},[n])};y2.displayName="ElTableV2Empty";const w2=(e,{slots:t})=>{var n;return U("div",{class:e.class,style:e.style},[(n=t.default)==null?void 0:n.call(t)])};w2.displayName="ElTableV2Overlay";function Yr(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Jt(e)}const Aq=ue({name:"ElTableV2",props:iq,slots:Object,setup(e,{slots:t,expose:n}){const a=he("table-v2"),{t:l}=St(),{columnsStyles:o,fixedColumnsOnLeft:s,fixedColumnsOnRight:i,mainColumns:u,mainTableHeight:c,fixedTableHeight:d,leftTableWidth:f,rightTableWidth:v,data:g,depthMap:m,expandedRowKeys:p,hasFixedColumns:h,mainTableRef:b,leftTableRef:y,rightTableRef:C,isDynamic:S,isResetting:k,isScrolling:E,bodyWidth:O,emptyStyle:T,rootStyle:x,footerHeight:$,showEmpty:I,scrollTo:M,scrollToLeft:A,scrollToTop:K,scrollToRow:z,getRowHeight:B,onColumnSorted:_,onRowHeightChange:L,onRowHovered:H,onRowExpanded:D,onRowsRendered:W,onScroll:q,onVerticalScroll:X}=mq(e);return n({scrollTo:M,scrollToLeft:A,scrollToTop:K,scrollToRow:z}),Tt(nm,{ns:a,isResetting:k,isScrolling:E}),()=>{const{cache:J,cellProps:Q,estimatedRowHeight:ee,expandColumnKey:ie,fixedData:pe,headerHeight:ve,headerClass:re,headerProps:R,headerCellProps:Y,sortBy:ae,sortState:le,rowHeight:se,rowClass:de,rowEventHandlers:be,rowKey:Se,rowProps:Ne,scrollbarAlwaysOn:Ce,indentSize:Pe,iconSize:ge,useIsScrolling:Ee,vScrollbarSize:Le,width:qe}=e,lt=r(g),nt={cache:J,class:a.e("main"),columns:r(u),data:lt,fixedData:pe,estimatedRowHeight:ee,bodyWidth:r(O),headerHeight:ve,headerWidth:r(O),height:r(c),mainTableRef:b,rowKey:Se,rowHeight:se,scrollbarAlwaysOn:Ce,scrollbarStartGap:2,scrollbarEndGap:Le,useIsScrolling:Ee,width:qe,getRowHeight:B,onRowsRendered:W,onScroll:q},Ze=r(f),kt=r(d),It={cache:J,class:a.e("left"),columns:r(s),data:lt,fixedData:pe,estimatedRowHeight:ee,leftTableRef:y,rowHeight:se,bodyWidth:Ze,headerWidth:Ze,headerHeight:ve,height:kt,rowKey:Se,scrollbarAlwaysOn:Ce,scrollbarStartGap:2,scrollbarEndGap:Le,useIsScrolling:Ee,width:Ze,getRowHeight:B,onScroll:X},Rt=r(v),Vt={cache:J,class:a.e("right"),columns:r(i),data:lt,fixedData:pe,estimatedRowHeight:ee,rightTableRef:C,rowHeight:se,bodyWidth:Rt,headerWidth:Rt,headerHeight:ve,height:kt,rowKey:Se,scrollbarAlwaysOn:Ce,scrollbarStartGap:2,scrollbarEndGap:Le,width:Rt,style:`${a.cssVarName("table-scrollbar-size")}: ${Le}px`,useIsScrolling:Ee,getRowHeight:B,onScroll:X},Wt=r(o),Yt={ns:a,depthMap:r(m),columnsStyles:Wt,expandColumnKey:ie,expandedRowKeys:r(p),estimatedRowHeight:ee,hasFixedColumns:r(h),rowProps:Ne,rowClass:de,rowKey:Se,rowEventHandlers:be,onRowHovered:H,onRowExpanded:D,onRowHeightChange:L},xe={cellProps:Q,expandColumnKey:ie,indentSize:Pe,iconSize:ge,rowKey:Se,expandedRowKeys:r(p),ns:a,t:l},ke={ns:a,headerClass:re,headerProps:R,columnsStyles:Wt},Ke={ns:a,t:l,sortBy:ae,sortState:le,headerCellProps:Y,onColumnSorted:_},Xe={row:Ie=>U(Nq,pt(Ie,Yt),{row:t.row,cell:Ue=>{let at;return t.cell?U(av,pt(Ue,xe,{style:Wt[Ue.column.key]}),Yr(at=t.cell(Ue))?at:{default:()=>[at]}):U(av,pt(Ue,xe,{style:Wt[Ue.column.key]}),null)}}),header:Ie=>U(Rq,pt(Ie,ke),{header:t.header,cell:Ue=>{let at;return t["header-cell"]?U(Dy,pt(Ue,Ke,{style:Wt[Ue.column.key]}),Yr(at=t["header-cell"](Ue))?at:{default:()=>[at]}):U(Dy,pt(Ue,Ke,{style:Wt[Ue.column.key]}),null)}})},Bt=[e.class,a.b(),a.e("root"),a.is("dynamic",r(S))],ce={class:a.e("footer"),style:r($)};return U("div",{class:Bt,style:r(x)},[U(Sq,nt,Yr(Xe)?Xe:{default:()=>[Xe]}),U(kq,It,Yr(Xe)?Xe:{default:()=>[Xe]}),U(xq,Vt,Yr(Xe)?Xe:{default:()=>[Xe]}),t.footer&&U(b2,ce,{default:t.footer}),r(I)&&U(y2,{class:a.e("empty"),style:r(T)},{default:t.empty}),t.overlay&&U(w2,{class:a.e("overlay")},{default:t.overlay})])}}}),Lq=$e({disableWidth:Boolean,disableHeight:Boolean,onResize:{type:G(Function)}}),Dq=e=>{const t=V(),n=V(0),a=V(0);let l;return mt(()=>{l=on(t,([o])=>{const{width:s,height:i}=o.contentRect,{paddingLeft:u,paddingRight:c,paddingTop:d,paddingBottom:f}=getComputedStyle(o.target),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=i-m-p}).stop}),zt(()=>{l==null||l()}),fe([n,a],([o,s])=>{var i;(i=e.onResize)==null||i.call(e,{width:o,height:s})}),{sizer:t,width:n,height:a}},Vq=ue({name:"ElAutoResizer",props:Lq,setup(e,{slots:t}){const n=he("auto-resizer"),{height:a,width:l,sizer:o}=Dq(e),s={width:"100%",height:"100%"};return()=>{var i;return U("div",{ref:o,class:n.b(),style:s},[(i=t.default)==null?void 0:i.call(t,{height:a.value,width:l.value})])}}}),Bq=it(Aq),Fq=it(Vq),Yd=Symbol("tabsRootContextKey"),zq=$e({tabs:{type:G(Array),default:()=>dn([])},tabRefs:{type:G(Object),default:()=>dn({})}}),Vy="ElTabBar";var Hq=ue({name:Vy,__name:"tab-bar",props:zq,setup(e,{expose:t}){const n=e,a=Fe(Yd);a||rn(Vy," ");const l=he("tabs"),o=V(),s=V(),i=V(!1),u=w(()=>i.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${hf(C)}`],h=k[`client${hf(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${hf(y)}(${p}px)`}},f=()=>{s.value=d(),i.value||Hn(()=>Hn(()=>{i.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)=>(N(),F("div",{ref_key:"barRef",ref:o,class:P([r(l).e("active-bar"),r(l).is(r(a).props.tabPosition),r(l).is("hidden",!c.value)]),style:je(u.value)},null,6))}}),Kq=Hq;const Wq=5,jq=({scrollable:e,navOffset:t,navSize:n,navContainerSize:a,isHorizontal:l})=>{const o=V(!1),s=w(()=>Math.max(n.value-a.value,0));let i,u;const c=v=>{if(!e.value||v.touches.length!==1)return;const{clientX:g,clientY:m}=Hc(v);i={startX:g,startY:m,startOffset:t.value},u=void 0},d=v=>{if(!i||!e.value)return;if(v.touches.length!==1){f();return}const{clientX:g,clientY:m}=Hc(v),p=i.startX-g,h=i.startY-m,b=l.value?p:h,y=l.value?h:p,C=Math.abs(b),S=Math.abs(y);if(g1(u)){if(Math.max(C,S)<=Wq)return;u=C>S}if(!u)return;const k=ba(i.startOffset+b,0,s.value);s.value<=0||k===t.value||!v.cancelable||(v.preventDefault(),o.value=!0,t.value=k)},f=()=>{i=void 0,u=void 0,o.value=!1};return{isTouchScrolling:o,handleTouchStart:c,handleTouchMove:d,handleTouchEnd:f}},qq=$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}}),Yq={tabClick:(e,t,n)=>n instanceof Event,tabRemove:(e,t)=>t instanceof Event},By="ElTabNav",Uq=ue({name:By,props:qq,emits:Yq,setup(e,{expose:t,emit:n}){const a=Fe(Yd);a||rn(By," ");const l=he("tabs"),o=DI(),s=FI(),i=V(),u=V(),c=V(),d=V({}),f=V(),v=V(!1),g=V(0),m=V(!1),p=V(!0),h=V(!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||A.value?"none":void 0,transform:`translate${ee}(-${g.value}px)`}}),{width:k,height:E}=Ni(i),{width:O,height:T}=Ni(u,{width:0,height:0},{box:"border-box"}),x=w(()=>y.value?k.value:E.value),$=w(()=>y.value?O.value:T.value),{onWheel:I}=PC({atStartEdge:w(()=>g.value<=0),atEndEdge:w(()=>$.value-g.value<=x.value),layout:w(()=>y.value?"horizontal":"vertical")},ee=>{g.value=ba(g.value+ee,0,$.value-x.value)}),M=ee=>{h.value=!0,I(ee),Hn(()=>{h.value=!1})},{isTouchScrolling:A,handleTouchStart:K,handleTouchMove:z,handleTouchEnd:B}=jq({scrollable:v,navOffset:g,navSize:$,navContainerSize:x,isHorizontal:y}),_=()=>{if(!i.value)return;const ee=i.value.getBoundingClientRect()[C.value],ie=g.value;if(!ie)return;const pe=ie>ee?ie-ee:0;g.value=pe},L=()=>{if(!i.value||!u.value)return;const ee=u.value.getBoundingClientRect()[C.value],ie=i.value.getBoundingClientRect()[C.value],pe=g.value;if(!$l(ee-pe,ie))return;const ve=ee-pe>ie*2?pe+ie:ee-ie;g.value=ve},H=async()=>{const ee=u.value;if(!v.value||!c.value||!i.value||!ee)return;await Ae();const ie=d.value[e.currentName];if(!ie)return;const pe=i.value,ve=ie.getBoundingClientRect(),re=pe.getBoundingClientRect(),R=re.left+1,Y=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?(ve.leftY&&(de=se+ve.right-Y)):(ve.topre.bottom&&(de=se+(ve.bottom-re.bottom))),de=Math.max(de,0),g.value=Math.min(de,le)},D=()=>{var ve;if(!u.value||!i.value)return;e.stretch&&((ve=f.value)==null||ve.update());const ee=u.value.getBoundingClientRect()[C.value],ie=i.value.getBoundingClientRect()[C.value],pe=g.value;ie0&&(g.value=0))},W=ee=>{const ie=Gt(ee);let pe=0;switch(ie){case ye.left:case ye.up:pe=-1;break;case ye.right:case ye.down:pe=1;break;default:return}const ve=Array.from(ee.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)"));let re=ve.indexOf(ee.target)+pe;re<0?re=ve.length-1:re>=ve.length&&(re=0),ve[re].focus({preventScroll:!0}),ve[re].click(),q()},q=()=>{p.value&&(m.value=!0)},X=()=>m.value=!1,J=(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,()=>{Hn(D)}),mt(()=>setTimeout(()=>H(),0)),Fl(()=>D()),t({scrollToActiveTab:H,removeFocus:X,focusActiveTab:Q,tabListRef:u,tabBarRef:f,scheduleRender:()=>qu(b)}),()=>{const ee=v.value?[U("span",{class:[l.e("nav-prev"),l.is("disabled",!v.value.prev)],onClick:_},[U(Be,null,{default:()=>[U(so,null,null)]})]),U("span",{class:[l.e("nav-next"),l.is("disabled",!v.value.next)],onClick:L},[U(Be,null,{default:()=>[U(oa,null,null)]})])]:null,ie=e.panes.map((pe,ve)=>{var be,Se;const re=pe.uid,R=pe.props.disabled,Y=pe.props.name??pe.index??`${ve}`,ae=!R&&(pe.isClosable||pe.props.closable!==!1&&e.editable);pe.index=`${ve}`;const le=ae?U(Be,{class:"is-icon-close",onClick:Ne=>n("tabRemove",pe,Ne)},{default:()=>[U(Ya,null,null)]}):null,se=((Se=(be=pe.slots).label)==null?void 0:Se.call(be))||pe.props.label,de=!R&&pe.active?e.tabindex??a.props.tabindex:-1;return U("div",{ref:Ne=>J(Ne,Y),class:[l.e("item"),l.is(a.props.tabPosition),l.is("active",pe.active),l.is("disabled",R),l.is("closable",ae),l.is("focus",m.value)],id:`tab-${Y}`,key:`tab-${re}`,"aria-controls":`pane-${Y}`,role:"tab","aria-selected":pe.active,tabindex:de,onFocus:()=>q(),onBlur:()=>X(),onClick:Ne=>{X(),n("tabClick",pe,Y,Ne)},onKeydown:Ne=>{const Ce=Gt(Ne);ae&&(Ce===ye.delete||Ce===ye.backspace)&&n("tabRemove",pe,Ne)}},[se,le])});return b.value,U("div",{ref:c,class:[l.e("nav-wrap"),l.is("scrollable",!!v.value),l.is(a.props.tabPosition)]},[ee,U("div",{class:l.e("nav-scroll"),ref:i},[e.panes.length>0?U("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:K,onTouchmove:z,onTouchend:B,onTouchcancel:B},[e.type?null:U(Kq,{ref:f,tabs:[...e.panes],tabRefs:d.value},null),ie]):null])])}}}),Gq=$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}}),Bf=e=>De(e)||He(e),Xq={[st]:e=>Bf(e),tabClick:(e,t)=>t instanceof Event,tabChange:e=>Bf(e),edit:(e,t)=>["remove","add"].includes(t),tabRemove:e=>Bf(e),tabAdd:()=>!0},Jq=ue({name:"ElTabs",props:Gq,emits:Xq,setup(e,{emit:t,slots:n,expose:a}){const l=he("tabs"),o=w(()=>["left","right"].includes(e.tabPosition)),{children:s,addChild:i,removeChild:u,ChildrenSorter:c}=Rd(ht(),"ElTabPane"),d=V(),f=V((xt(e.modelValue)?e.defaultValue:e.modelValue)??"0"),v=async(y,C=!1)=>{var S,k,E,O;if(!(f.value===y||xt(y)))try{let T;if(e.beforeLeave){const x=e.beforeLeave(y,f.value);T=x instanceof Promise?await x:x}else T=!0;if(T!==!1){const x=(S=s.value.find($=>$.paneName===f.value))==null?void 0:S.isFocusInsidePane();f.value=y,C&&(t(st,y),t("tabChange",y)),(E=(k=d.value)==null?void 0:k.removeFocus)==null||E.call(k),x&&((O=d.value)==null||O.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(Yd,{props:e,currentName:f,registerPane:i,unregisterPane:u,nav$:d}),a({currentName:f,get tabNavRef(){return Ls(d.value,["scheduleRender"])}}),()=>{const y=n["add-icon"],C=e.editable||e.addable?U("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"):U(Be,{class:l.is("icon-plus")},{default:()=>[U(yS,null,null)]})]):null,S=()=>U(Uq,{ref:d,currentName:f.value,editable:e.editable,type:e.type,panes:s.value,stretch:e.stretch,onTabClick:g,onTabRemove:m},null),k=U("div",{class:[l.e("header"),o.value&&l.e("header-vertical"),l.is(e.tabPosition)]},[U(c,null,{default:S,$stable:!0}),C]),E=U("div",{class:l.e("content")},[ne(n,"default")]);return U("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])}}}),Zq=$e({label:{type:String,default:""},name:{type:[String,Number]},closable:{type:Boolean,default:void 0},disabled:Boolean,lazy:Boolean}),Qq=["id","aria-hidden","aria-labelledby"],Fy="ElTabPane";var eY=ue({name:Fy,__name:"tab-pane",props:Zq,setup(e){const t=e,n=ht(),a=mn(),l=Fe(Yd);l||rn(Fy,"usage: ");const o=he("tab-pane"),s=V(),i=V(),u=w(()=>t.closable??l.props.closable),c=w(()=>l.currentName.value===(t.name??i.value)),d=V(c.value),f=w(()=>t.name??i.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:i,isClosable:u,isFocusInsidePane:g});return l.registerPane(m),zt(()=>{l.unregisterPane(m)}),xv(()=>{var p;a.label&&((p=l.nav$.value)==null||p.scheduleRender())}),(p,h)=>v.value?ft((N(),F("div",{key:0,id:`pane-${f.value}`,ref_key:"paneRef",ref:s,class:P(r(o).b()),role:"tabpanel","aria-hidden":!c.value,"aria-labelledby":`tab-${f.value}`},[ne(p.$slots,"default")],10,Qq)),[[Lt,c.value]]):te("v-if",!0)}}),S2=eY;const tY=it(Jq,{TabPane:S2}),nY=un(S2),aY=$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 lY=ue({name:"ElText",__name:"text",props:aY,setup(e,{expose:t}){const n=e,a=V(),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:i,height:u}=Ni(a),c=V(!1);let d;const f=()=>{d&&Ra(d),d=Hn(()=>{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(()=>[i.value,u.value,n.truncated,n.lineClamp],f,{flush:"post"}),Mr(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 N(),oe(ct(e.tag),{ref_key:"textRef",ref:a,class:P(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:Z(()=>[ne(v.$slots,"default")]),_:3},8,["class","title","style"])}}}),oY=lY;const sm=it(oY),C2="09:00",k2="18:00",E2="00:30",sY=$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:Pn,placeholder:String,start:{type:String,default:C2},end:{type:String,default:k2},step:{type:String,default:E2},minTime:{type:G(String)},maxTime:{type:G(String)},includeEndTime:Boolean,name:String,prefixIcon:{type:G([String,Object]),default:()=>bS},clearIcon:{type:G([String,Object]),default:()=>Kl},popperClass:{type:G([String,Array,Object,Boolean]),default:""},popperStyle:{type:G([String,Array,Object,Boolean]),default:void 0},...Ds}),Ss=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},rY=e=>!!e&&e.hours>=0&&e.minutes>=0&&!Number.isNaN(e.hours)&&!Number.isNaN(e.minutes),Ff=(e,t)=>{const n=Ss(e);if(!n)return-1;const a=Ss(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},zy=e=>`${e}`.padStart(2,"0"),sc=e=>`${zy(e.hours)}:${zy(e.minutes)}`,iY=(e,t)=>{const n=Ss(e);if(!n)return"";const a=Ss(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,sc(l)};var uY=ue({name:"ElTimeSelect",__name:"time-select",props:sY,emits:[bt,"blur","focus","clear",st],setup(e,{expose:t}){tt.extend(Mh);const{Option:n}=jo,a=e,l=he("input"),o=V(),s=sn(),{lang:i}=St(),u=(y,C,S,k=!0)=>{const E=Ss(y);return!rY(E)||!k&&E.hours===0&&E.minutes===0?(Kt("ElTimeSelect",`invalid ${C}, fallback to default ${C} (${S}).`),S):sc(E)},c=w(()=>a.modelValue),d=w(()=>u(a.start,"start",C2)),f=w(()=>u(a.end,"end",k2)),v=w(()=>{const y=Ss(a.minTime||"");return y?sc(y):null}),g=w(()=>{const y=Ss(a.maxTime||"");return y?sc(y):null}),m=w(()=>u(a.step,"step",E2,!1)),p=w(()=>{var k;const y=[],C=(E,O)=>{y.push({value:E,rawValue:O,disabled:Ff(O,v.value||"-1:-1")<=0||Ff(O,g.value||"100:100")>=0})};let S=d.value;for(;Ff(S,f.value)<=0;)C(tt(S,"HH:mm").locale(i.value).format(a.format),S),S=iY(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(i.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)=>(N(),oe(r(jo),{ref_key:"select",ref:o,name:e.name,"model-value":c.value,disabled:r(s),clearable:e.clearable,"clear-icon":e.clearIcon,size:e.size,effect:e.effect,placeholder:e.placeholder,"default-first-option":"",filterable:e.editable,"empty-values":e.emptyValues,"value-on-clear":e.valueOnClear,"popper-class":e.popperClass,"popper-style":e.popperStyle,"onUpdate:modelValue":C[0]||(C[0]=S=>y.$emit(r("update:modelValue"),S)),onChange:C[1]||(C[1]=S=>y.$emit(r("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:Z(()=>[e.prefixIcon?(N(),oe(r(Be),{key:0,class:P(r(l).e("prefix-icon"))},{default:Z(()=>[(N(),oe(ct(e.prefixIcon)))]),_:1},8,["class"])):te("v-if",!0)]),default:Z(()=>[(N(!0),F(ze,null,yt(p.value,S=>(N(),oe(r(n),{key:S.value,label:S.value,value:S.value,disabled:S.disabled},null,8,["label","value","disabled"]))),128))]),_:1},8,["name","model-value","disabled","clearable","clear-icon","size","effect","placeholder","filterable","empty-values","value-on-clear","popper-class","popper-style"]))}}),cY=uY;const dY=it(cY),x2="timeline",fY=$e({mode:{type:String,values:["start","alternate","alternate-reverse","end"],default:"start"},reverse:Boolean}),pY=ue({name:"ElTimeline",props:fY,setup(e,{slots:t}){const n=he("timeline");Tt(x2,{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)}}}),vY=$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 hY=ue({name:"ElTimelineItem",__name:"timeline-item",props:vY,setup(e){const t=e,{props:n}=Fe(x2),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,i)=>(N(),F("li",{class:P(o.value)},[j("div",{class:P(r(a).e("tail"))},null,2),s.$slots.dot?te("v-if",!0):(N(),F("div",{key:0,class:P(l.value),style:je({backgroundColor:e.color})},[e.icon?(N(),oe(r(Be),{key:0,class:P(r(a).e("icon"))},{default:Z(()=>[(N(),oe(ct(e.icon)))]),_:1},8,["class"])):te("v-if",!0)],6)),s.$slots.dot?(N(),F("div",{key:1,class:P(r(a).e("dot"))},[ne(s.$slots,"dot")],2)):te("v-if",!0),j("div",{class:P(r(a).e("wrapper"))},[!e.hideTimestamp&&e.placement==="top"?(N(),F("div",{key:0,class:P([r(a).e("timestamp"),r(a).is("top")])},we(e.timestamp),3)):te("v-if",!0),j("div",{class:P(r(a).e("content"))},[ne(s.$slots,"default")],2),!e.hideTimestamp&&e.placement==="bottom"?(N(),F("div",{key:1,class:P([r(a).e("timestamp"),r(a).is("bottom")])},we(e.timestamp),3)):te("v-if",!0)],2)],2))}}),T2=hY;const mY=it(pY,{TimelineItem:T2}),gY=un(T2),$2="left-check-change",O2="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}}),lv=(e,t)=>[e,t].every(me)||me(e)&&vn(t),bY={[bt]:(e,t,n)=>[e,n].every(me)&&["left","right"].includes(t),[st]:e=>me(e),[$2]:lv,[O2]:lv},gu=e=>{const t={label:"label",key:"key",disabled:"disabled"};return w(()=>({...t,...e.props}))},yY=(e,t)=>({onSourceCheckedChange:(l,o)=>{e.leftChecked=l,o&&t($2,l,o)},onTargetCheckedChange:(l,o)=>{e.rightChecked=l,o&&t(O2,l,o)}}),wY=e=>{const t=gu(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},[]))}},SY=(e,t,n)=>{const a=gu(e),l=(i,u,c)=>{n(st,i),n(bt,i,u,c)};return{addToLeft:()=>{const i=e.modelValue.slice();t.rightChecked.forEach(u=>{const c=i.indexOf(u);c>-1&&i.splice(c,1)}),l(i,"left",t.rightChecked)},addToRight:()=>{let i=e.modelValue.slice();const u=e.data.filter(c=>{const d=c[a.value.key];return t.leftChecked.includes(d)&&!e.modelValue.includes(d)}).map(c=>c[a.value.key]);i=e.targetOrder==="unshift"?u.concat(i):i.concat(u),e.targetOrder==="original"&&(i=e.data.filter(c=>i.includes(c[a.value.key])).map(c=>c[a.value.key])),l(i,"right",t.leftChecked)}}},ov="checked-change",CY=$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}),kY={[ov]:lv},EY=(e,t,n)=>{const a=gu(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}`}),i=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=V(),{height:f}=Ni(w(()=>{var g;return(g=d.value)==null?void 0:g.$el})),v=V();return fe(()=>t.checked,(g,m)=>{if(u(),t.checkChangeByUser){const p=g.concat(m).filter(h=>!g.includes(h)||!m.includes(h));n(ov,g,p)}else n(ov,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:i,checkboxGroupRef:d,virtualListHeight:f,updateAllChecked:u,handleAllCheckedChange:c}};var xY=ue({name:"ElTransferPanel",__name:"transfer-panel",props:CY,emits:kY,setup(e,{expose:t,emit:n}){const a=e,l=n,o=mn(),s=({option:O})=>O,{t:i}=St(),u=he("transfer"),c=Ft({checked:[],allChecked:!1,query:"",checkChangeByUser:!0}),d=gu(a),{filteredData:f,checkedSummary:v,virtualListRef:g,isIndeterminate:m,checkboxGroupRef:p,virtualListHeight:h,handleAllCheckedChange:b}=EY(a,c,l),y=w(()=>!fa(c.query)&&fa(f.value)),C=w(()=>!fa(o.default()[0].children)),{checked:S,allChecked:k,query:E}=Vn(c);return t({query:E}),(O,T)=>(N(),F("div",{class:P(r(u).b("panel"))},[j("p",{class:P(r(u).be("panel","header"))},[U(r(ll),{modelValue:r(k),"onUpdate:modelValue":T[0]||(T[0]=x=>Qt(k)?k.value=x:null),indeterminate:r(m),"validate-event":!1,onChange:r(b)},{default:Z(()=>[j("span",{class:P(r(u).be("panel","header-title"))},we(e.title),3),j("span",{class:P(r(u).be("panel","header-count"))},we(r(v)),3)]),_:1},8,["modelValue","indeterminate","onChange"])],2),j("div",{class:P([r(u).be("panel","body"),r(u).is("with-footer",C.value)])},[e.filterable?(N(),oe(r(Yn),{key:0,modelValue:r(E),"onUpdate:modelValue":T[1]||(T[1]=x=>Qt(E)?E.value=x:null),class:P(r(u).be("panel","filter")),size:"default",placeholder:e.placeholder,"prefix-icon":r(c3),clearable:"","validate-event":!1},null,8,["modelValue","class","placeholder","prefix-icon"])):te("v-if",!0),ft(U(r(Lh),{ref_key:"checkboxGroupRef",ref:p,modelValue:r(S),"onUpdate:modelValue":T[2]||(T[2]=x=>Qt(S)?S.value=x:null),"validate-event":!1,class:P([r(u).is("filterable",e.filterable),r(u).be("panel","list")])},{default:Z(()=>[e.virtualScroll?(N(),oe(r(vu),{key:1,ref_key:"virtualListRef",ref:g,data:r(f),total:r(f).length,"item-size":e.itemSize,height:r(h)},{default:Z(({data:x,index:$,style:I})=>[(N(),F("div",{key:x[$][r(d).key],style:je(I)},[U(r(ll),{class:P(r(u).be("panel","item")),value:x[$][r(d).key],disabled:x[$][r(d).disabled],"validate-event":!1},{default:Z(()=>{var M;return[U(s,{option:(M=e.optionRender)==null?void 0:M.call(e,x[$])},null,8,["option"])]}),_:2},1032,["class","value","disabled"])],4))]),_:1},8,["data","total","item-size","height"])):(N(!0),F(ze,{key:0},yt(r(f),x=>(N(),oe(r(ll),{key:x[r(d).key],class:P(r(u).be("panel","item")),value:x[r(d).key],disabled:x[r(d).disabled],"validate-event":!1},{default:Z(()=>{var $;return[U(s,{option:($=e.optionRender)==null?void 0:$.call(e,x)},null,8,["option"])]}),_:2},1032,["class","value","disabled"]))),128))]),_:1},8,["modelValue","class"]),[[Lt,!y.value&&!r(fa)(e.data)]]),ft(j("div",{class:P(r(u).be("panel","empty"))},[ne(O.$slots,"empty",{},()=>[dt(we(y.value?r(i)("el.transfer.noMatch"):r(i)("el.transfer.noData")),1)])],2),[[Lt,y.value||r(fa)(e.data)]])],2),C.value?(N(),F("p",{key:0,class:P(r(u).be("panel","footer"))},[ne(O.$slots,"default")],2)):te("v-if",!0)],2))}}),Hy=xY;const TY={key:0},$Y={key:0};var OY=ue({name:"ElTransfer",__name:"transfer",props:Eo,emits:bY,setup(e,{expose:t,emit:n}){const a=e,l=n,o=mn(),{t:s}=St(),i=he("transfer"),{formItem:u}=Fn(),c=Ft({leftChecked:[],rightChecked:[]}),d=gu(a),{sourceData:f,targetData:v}=wY(a),{onSourceCheckedChange:g,onTargetCheckedChange:m}=yY(c,l),{addToLeft:p,addToRight:h}=SY(a,c,l),b=V(),y=V(),C=x=>{switch(x){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")),O=w(()=>a.filterPlaceholder||s("el.transfer.filterPlaceholder"));fe(()=>a.modelValue,()=>{var x;a.validateEvent&&((x=u==null?void 0:u.validate)==null||x.call(u,"change").catch(vt))});const T=w(()=>x=>{var I;if(a.renderContent)return a.renderContent(Ge,x);const $=(((I=o.default)==null?void 0:I.call(o,{option:x}))||[]).filter(M=>M.type!==Cn);return $.length?$:Ge("span",x[d.value.label]||x[d.value.key])});return t({clearQuery:C,leftPanel:b,rightPanel:y}),(x,$)=>(N(),F("div",{class:P(r(i).b())},[U(Hy,{ref_key:"leftPanel",ref:b,data:r(f),"option-render":T.value,placeholder:O.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:r(g)},{empty:Z(()=>[ne(x.$slots,"left-empty")]),default:Z(()=>[ne(x.$slots,"left-footer")]),_:3},8,["data","option-render","placeholder","title","filterable","format","filter-method","default-checked","props","virtual-scroll","item-size","onCheckedChange"]),j("div",{class:P(r(i).e("buttons"))},[U(r(Dn),{type:"primary",class:P([r(i).e("button"),r(i).is("with-texts",S.value)]),disabled:r(fa)(c.rightChecked),onClick:r(p)},{default:Z(()=>[U(r(Be),null,{default:Z(()=>[U(r(so))]),_:1}),r(xt)(e.buttonTexts[0])?te("v-if",!0):(N(),F("span",TY,we(e.buttonTexts[0]),1))]),_:1},8,["class","disabled","onClick"]),U(r(Dn),{type:"primary",class:P([r(i).e("button"),r(i).is("with-texts",S.value)]),disabled:r(fa)(c.leftChecked),onClick:r(h)},{default:Z(()=>[r(xt)(e.buttonTexts[1])?te("v-if",!0):(N(),F("span",$Y,we(e.buttonTexts[1]),1)),U(r(Be),null,{default:Z(()=>[U(r(oa))]),_:1})]),_:1},8,["class","disabled","onClick"])],2),U(Hy,{ref_key:"rightPanel",ref:y,data:r(v),"option-render":T.value,placeholder:O.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:r(m)},{empty:Z(()=>[ne(x.$slots,"right-empty")]),default:Z(()=>[ne(x.$slots,"right-footer")]),_:3},8,["data","option-render","placeholder","filterable","format","filter-method","title","default-checked","props","virtual-scroll","item-size","onCheckedChange"])],2))}}),NY=OY;const MY=it(NY),rm="RootTree",N2="NodeInstance",Ky="TreeNodeMap",M2=$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}}),PY={"check-change":(e,t,n)=>e&&qt(t)&&qt(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},P2="$treeNodeId",Wy=function(e,t){!t||t.$treeNodeId||Object.defineProperty(t,P2,{value:e.id,enumerable:!1,configurable:!1,writable:!1})},im=(e,t)=>t==null?void 0:t[e||"$treeNodeId"],sv=(e,t,n)=>{const a=e.value.currentNode;n();const l=e.value.currentNode;a!==l&&t("current-change",l?l.data:null,l)},I2=e=>{let t=!0,n=!0,a=!0,l=!0;for(let o=0,s=e.length;o{n.canFocus=t,rv(n.childNodes,t)})};let IY=0;var iv=class rc{constructor(t){this.isLeafByUser=void 0,this.isLeaf=void 0,this.isEffectivelyChecked=!1,this.id=IY++,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)_t(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=Hu(this,"isLeaf");qt(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)||Wy(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)||Wy(this,t),this.data=t,this.childNodes=[];let n;this.level===0&&me(this.data)?n=this.data:n=Hu(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 rc)){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 rc(t)),t instanceof rc&&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(),rv(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,rv(this.childNodes,!1)}shouldLoadData(){return!!(this.store.lazy===!0&&this.store.load&&!this.loaded)}updateLeafState(){if(this.store.lazy===!0&&this.loaded!==!0&&typeof this.isLeafByUser<"u"){this.isLeaf=this.isLeafByUser,this.isEffectivelyChecked=this.isLeaf&&this.disabled;return}const t=this.childNodes;if(!this.store.lazy||this.store.lazy===!0&&this.loaded===!0){this.isLeaf=!t||t.length===0,this.isEffectivelyChecked=this.isLeaf&&this.disabled;return}this.isLeaf=!1}setChecked(t,n,a,l){if(this.indeterminate=t==="half",this.checked=t===!0,this.isEffectivelyChecked=!this.childNodes.length&&(this.disabled||this.checked),this.store.checkStrictly&&!n)return;if(!(this.shouldLoadData()&&!this.store.checkDescendants)){const s=()=>{if(n){const i=this.childNodes;for(let f=0,v=i.length;f{s(),ei(this)},{checked:t!==!1});return}else s()}const o=this.parent;!o||o.level===0||!a&&!this.store.checkStrictly&&ei(o)}getChildren(t=!1){if(this.level===0)return this.data;const n=this.data;if(!n)return null;const a=this.store.props;let l="children";return a&&(l=a.children||"children"),xt(n[l])&&(n[l]=null),t&&!n[l]&&(n[l]=[]),n[l]}updateChildren(){const t=this.getChildren()||[],n=this.childNodes.map(o=>o.data),a={},l=[];t.forEach((o,s)=>{const i=o[P2];i&&n.some(u=>(u==null?void 0:u.$treeNodeId)===i)?a[i]={index:s,data:o}:l.push({index:s,data:o})}),this.store.lazy||n.forEach(o=>{a[o==null?void 0:o.$treeNodeId]||this.removeChildByData(o)}),l.forEach(({index:o,data:s})=>{this.insertChild({data:s},o)}),this.updateLeafState()}loadData(t,n={}){if(this.store.lazy===!0&&this.store.load&&!this.loaded&&(!this.loading||Object.keys(n).length)){this.loading=!0;const a=o=>{this.childNodes=[],this.doCreateChildren(o,n),this.loaded=!0,this.loading=!1,this.updateLeafState(),t&&t.call(this,o)},l=()=>{this.loading=!1};this.store.load(this,a,l)}else t&&t.call(this)}eachNode(t){const n=[this];for(;n.length;){const a=n.shift();n.unshift(...a.childNodes),t(a)}}reInitChecked(){this.store.checkStrictly||ei(this)}},RY=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)_t(e,t)&&(this[t]=e[t]);this.nodesMap={}}initialize(){if(this.root=new iv({data:this.data,store:this}),this.root.initialize(),this.lazy&&this.load){const e=this.load;e(this.root,t=>{this.root.doCreateChildren(t),this._initDefaultCheckedNodes()},vt)}else this._initDefaultCheckedNodes()}filter(e){const t=this.filterNodeMethod,n=this.lazy,a=async function(l){const o=l.root?l.root.childNodes:l.childNodes;for(const[s,i]of o.entries())i.visible=!!(t!=null&&t.call(i,e,i.data,i)),s%80===0&&s>0&&await Ae(),await a(i);if(!l.visible&&o.length){let s=!0;s=!o.some(i=>i.visible),l.root?l.root.visible=s===!1:l.visible=s===!1}e&&l.visible&&!l.isLeaf&&(!n||l.loaded)&&l.expand()};a(this)}setData(e){e!==this.root.data?(this.nodesMap={},this.root.setData(e),this._initDefaultCheckedNodes(),this.setCurrentNodeKey(this.currentNodeKey)):this.root.updateChildren()}getNode(e){if(e instanceof iv)return e;const t=rt(e)?im(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)_t(t,n)&&e.push(t[n]);return e}updateChildren(e,t){const n=this.nodesMap[e];if(!n)return;const a=n.childNodes;for(let l=a.length-1;l>=0;l--){const o=a[l];this.remove(o.data)}for(let l=0,o=t.length;li.level-u.level),l=Object.create(null),o=Object.keys(n);a.forEach(i=>i.setChecked(!1,!1));const s=i=>{i.childNodes.forEach(u=>{var c;l[u.data[e]]=!0,(c=u.childNodes)!=null&&c.length&&s(u)})};for(let i=0,u=a.length;i{g.isLeaf||g.setChecked(!1,!1,!0),f(g)}),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 R2(e){const t=Fe(Ky,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(Ky,n),{broadcastExpanded:a=>{if(e.accordion)for(const l of n.children)l.treeNodeExpand(a)}}}const _2=Symbol("dragEvents");function _Y({props:e,ctx:t,el$:n,dropIndicator$:a,store:l}){const o=he("tree"),s=V({showDropIndicator:!1,draggingNode:null,dropNode:null,allowDrop:!0,dropType:null});return Tt(_2,{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&&la(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 O;const T=p?h?.25:b?.45:1:Number.NEGATIVE_INFINITY,x=b?h?.75:p?.55:0:Number.POSITIVE_INFINITY;let $=-9999;const I=d.clientY-S.top;IS.height*x?O="after":h?O="inner":O="none";const M=C.querySelector(`.${o.be("node","expand-icon")}`).getBoundingClientRect(),A=a.value;O==="before"?$=M.top-k.top+E:O==="after"&&($=M.bottom-k.top+E),A.style.top=`${$}px`,A.style.left=`${M.right-k.left}px`,O==="inner"?Va(C,o.is("drop-inner")):la(C,o.is("drop-inner")),s.value.showDropIndicator=O==="before"||O==="after",s.value.allowDrop=s.value.showDropIndicator||y,s.value.dropType=O,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)})),la(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 AY=ue({name:"ElTreeNodeContent",props:{node:{type:Object,required:!0},renderContent:Function},setup(e){const t=he("tree"),n=Fe(N2),a=Fe(rm);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(sm,{tag:"span",truncated:!0,class:t.be("node","label")},()=>[l.label])])}}}),LY=AY,DY=ue({name:"ElTreeNode",components:{ElCollapseTransition:Fd,ElCheckbox:ll,NodeContent:LY,ElIcon:Be,Loading:rl},props:{node:{type:iv,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}=R2(e),l=Fe(rm),o=V(!1),s=V(!1),i=V(),u=V(),c=V(),d=Fe(_2),f=ht();Tt(N2,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 $;const x=($=e.node.data)==null?void 0:$[v];return x&&[...x]},()=>{e.node.updateChildren()}),fe(()=>e.node.indeterminate,x=>{p(e.node.checked,x)}),fe(()=>e.node.checked,x=>{p(x,e.node.indeterminate)}),fe(()=>e.node.childNodes.length,()=>e.node.reInitChecked()),fe(()=>e.node.expanded,x=>{Ae(()=>o.value=x),x&&(s.value=!0)});const g=x=>l.props.nodeKey?im(l.props.nodeKey,x.data):x.id,m=x=>{const $=e.props.class;if(!$)return{};let I;if(We($)){const{data:M}=x;I=$(M,x)}else I=$;return De(I)?{[I]:!0}:I},p=(x,$)=>{(i.value!==x||u.value!==$)&&l.ctx.emit("check-change",e.node.data,x,$),i.value=x,u.value=$},h=x=>{sv(l.store,l.ctx.emit,()=>{var $;if(($=l==null?void 0:l.props)!=null&&$.nodeKey){const I=g(e.node);l.store.value.setCurrentNodeKey(I)}else l.store.value.setCurrentNode(e.node)}),l.currentNode.value=e.node,l.props.expandOnClickNode&&y(),(l.props.checkOnClickNode||e.node.isLeaf&&l.props.checkOnClickLeaf&&e.showCheckbox)&&!e.node.disabled&&C(!e.node.checked),l.ctx.emit("node-click",e.node.data,e.node,f,x)},b=x=>{var $;($=l.instance.vnode.props)!=null&&$.onNodeContextmenu&&(x.stopPropagation(),x.preventDefault()),l.ctx.emit("node-contextmenu",x,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=x=>{const $=l==null?void 0:l.props.checkStrictly,I=e.node.childNodes;!$&&I.length&&(x=I.some(M=>!M.isEffectivelyChecked)),e.node.setChecked(x,!$),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:i,oldIndeterminate:u,getNodeKey:g,getNodeClass:m,handleSelectChange:p,handleClick:h,handleContextMenu:b,handleExpandIconClick:y,handleCheckChange:C,handleChildNodeExpand:(x,$,I)=>{a($),l.ctx.emit("node-expand",x,$,I)},handleDragStart:x=>{l.props.draggable&&d.treeNodeDragStart({event:x,treeNode:e})},handleDragOver:x=>{x.preventDefault(),l.props.draggable&&d.treeNodeDragOver({event:x,treeNode:{$el:c.value,node:e.node}})},handleDrop:x=>{x.preventDefault()},handleDragEnd:x=>{l.props.draggable&&d.treeNodeDragEnd(x)},CaretRight:gS}}});const VY=["aria-expanded","aria-disabled","aria-checked","draggable","data-key"],BY=["aria-expanded"];function FY(e,t,n,a,l,o){const s=At("el-icon"),i=At("el-checkbox"),u=At("loading"),c=At("node-content"),d=At("el-tree-node"),f=At("el-collapse-transition");return ft((N(),F("div",{ref:"node$",class:P([e.ns.b("node"),e.ns.is("expanded",e.expanded),e.ns.is("current",e.node.isCurrent),e.ns.is("hidden",!e.node.visible),e.ns.is("focusable",!e.node.disabled),e.ns.is("checked",!e.node.disabled&&e.node.checked),e.getNodeClass(e.node)]),role:"treeitem",tabindex:"-1","aria-expanded":e.expanded,"aria-disabled":e.node.disabled,"aria-checked":e.node.checked,draggable:e.tree.props.draggable,"data-key":e.getNodeKey(e.node),onClick:t[2]||(t[2]=Je((...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"]))},[j("div",{class:P(e.ns.be("node","content")),style:je({paddingLeft:(e.node.level-1)*e.tree.props.indent+"px"})},[e.tree.props.icon||e.CaretRight?(N(),oe(s,{key:0,class:P([e.ns.be("node","expand-icon"),e.ns.is("leaf",e.node.isLeaf),{expanded:!e.node.isLeaf&&e.expanded}]),onClick:Je(e.handleExpandIconClick,["stop"])},{default:Z(()=>[(N(),oe(ct(e.tree.props.icon||e.CaretRight)))]),_:1},8,["class","onClick"])):te("v-if",!0),e.showCheckbox?(N(),oe(i,{key:1,"model-value":e.node.checked,indeterminate:e.node.indeterminate,disabled:!!e.node.disabled,onClick:t[0]||(t[0]=Je(()=>{},["stop"])),onChange:e.handleCheckChange},null,8,["model-value","indeterminate","disabled","onChange"])):te("v-if",!0),e.node.loading?(N(),oe(s,{key:2,class:P([e.ns.be("node","loading-icon"),e.ns.is("loading")])},{default:Z(()=>[U(u)]),_:1},8,["class"])):te("v-if",!0),U(c,{node:e.node,"render-content":e.renderContent},null,8,["node","render-content"])],6),U(f,null,{default:Z(()=>[!e.renderAfterExpand||e.childNodeRendered?ft((N(),F("div",{key:0,class:P(e.ns.be("node","children")),role:"group","aria-expanded":e.expanded,onClick:t[1]||(t[1]=Je(()=>{},["stop"]))},[(N(!0),F(ze,null,yt(e.node.childNodes,v=>(N(),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,BY)),[[Lt,e.expanded]]):te("v-if",!0)]),_:1})],42,VY)),[[Lt,e.node.visible]])}var zY=Rn(DY,[["render",FY]]);function HY({el$:e},t){const n=he("tree");mt(()=>{o()}),Fl(()=>{var s;(s=e.value)==null||s.querySelectorAll("input[type=checkbox]").forEach(i=>{i.setAttribute("tabindex","-1")})});function a(s,i){var c,d;const u=t.value.getNode(s[i].dataset.key);return u.canFocus&&u.visible&&(((c=u.parent)==null?void 0:c.expanded)||((d=u.parent)==null?void 0:d.level)===0)}Ht(e,"keydown",s=>{const i=s.target;if(!i.className.includes(n.b("node")))return;const u=Gt(s),c=Array.from(e.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`)),d=c.indexOf(i);let f;if([ye.up,ye.down].includes(u)){if(s.preventDefault(),u===ye.up){f=d===-1?0:d!==0?d-1:c.length-1;const g=f;for(;!a(c,f);){if(f--,f===g){f=-1;break}f<0&&(f=c.length-1)}}else{f=d===-1?0:d=c.length&&(f=0)}}f!==-1&&c[f].focus()}[ye.left,ye.right].includes(u)&&(s.preventDefault(),i.click());const v=i.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 i=e.value.querySelectorAll(`.${n.is("checked")}[role=treeitem]`);if(i.length){i[0].setAttribute("tabindex","0");return}(u=s[0])==null||u.setAttribute("tabindex","0")}}var KY=ue({name:"ElTree",components:{ElTreeNode:zY},props:M2,emits:PY,setup(e,t){const{t:n}=St(),a=he("tree"),l=V(new RY({key:e.nodeKey,data:e.data,lazy:e.lazy,props:e.props,load:e.load,currentNodeKey:e.currentNodeKey,checkStrictly:e.checkStrictly,checkDescendants:e.checkDescendants,defaultCheckedKeys:e.defaultCheckedKeys,defaultExpandedKeys:e.defaultExpandedKeys,autoExpandParent:e.autoExpandParent,defaultExpandAll:e.defaultExpandAll,filterNodeMethod:e.filterNodeMethod}));l.value.initialize();const o=V(l.value.root),s=V(null),i=V(null),u=V(null),{broadcastExpanded:c}=R2(e),{dragState:d}=_Y({props:e,ctx:t,el$:i,dropIndicator$:u,store:l});HY({el$:i},l);const f=ht(),v=w(()=>{let D=f==null?void 0:f.parent;for(;D;){if(D.type.name==="ElTreeSelect")return!0;D=D.parent}return!1}),g=w(()=>{const{childNodes:D}=o.value;return(!D||D.length===0||D.every(({visible:W})=>!W))&&!v.value});fe(()=>e.currentNodeKey,D=>{l.value.setCurrentNodeKey(D??null)}),fe(()=>e.defaultCheckedKeys,(D,W)=>{cn(D,W)||l.value.setDefaultCheckedKey(D??[])}),fe(()=>e.defaultExpandedKeys,D=>{l.value.setDefaultExpandedKeys(D??[])}),fe(()=>e.data,D=>{l.value.setData(D)},{deep:!0}),fe(()=>e.checkStrictly,D=>{l.value.checkStrictly=D});const m=D=>{if(!e.filterNodeMethod)throw new Error("[Tree] filterNodeMethod is required when filter");l.value.filter(D)},p=D=>e.nodeKey?im(e.nodeKey,D.data):D.id,h=D=>{if(!e.nodeKey)throw new Error(`[Tree] nodeKey is required in ${D}`)},b=D=>{h("getNodePath");const W=l.value.getNode(D);if(!W)return[];const q=[W.data];let X=W.parent;for(;X&&X!==o.value;)q.push(X.data),X=X.parent;return q.reverse()},y=(D,W)=>l.value.getCheckedNodes(D,W),C=D=>l.value.getCheckedKeys(D),S=()=>{const D=l.value.getCurrentNode();return D?D.data:null},k=()=>{h("getCurrentKey");const D=S();return D?D[e.nodeKey]:null},E=(D,W)=>{h("setCheckedNodes"),l.value.setCheckedNodes(D,W)},O=(D,W)=>{h("setCheckedKeys"),l.value.setCheckedKeys(D,W)},T=(D,W,q=!1)=>{l.value.setChecked(D,W,q)},x=()=>l.value.getHalfCheckedNodes(),$=()=>l.value.getHalfCheckedKeys(),I=(D,W=!0)=>{h("setCurrentNode"),sv(l,t.emit,()=>{c(D),l.value.setUserCurrentNode(D,W)})},M=(D=null,W=!0)=>{h("setCurrentKey"),sv(l,t.emit,()=>{c(),l.value.setCurrentNodeKey(D,W)})},A=D=>l.value.getNode(D),K=D=>{l.value.remove(D)},z=(D,W)=>{l.value.append(D,W)},B=(D,W)=>{l.value.insertBefore(D,W)},_=(D,W)=>{l.value.insertAfter(D,W)},L=(D,W,q)=>{c(W),t.emit("node-expand",D,W,q)},H=(D,W)=>{h("updateKeyChildren"),l.value.updateChildren(D,W)};return Tt(rm,{ctx:t,props:e,store:l,root:o,currentNode:s,instance:f}),Tt(Bl,void 0),{ns:a,store:l,root:o,currentNode:s,dragState:d,el$:i,dropIndicator$:u,isEmpty:g,filter:m,getNodeKey:p,getNodePath:b,getCheckedNodes:y,getCheckedKeys:C,getCurrentNode:S,getCurrentKey:k,setCheckedNodes:E,setCheckedKeys:O,setChecked:T,getHalfCheckedNodes:x,getHalfCheckedKeys:$,setCurrentNode:I,setCurrentKey:M,t:n,getNode:A,remove:K,append:z,insertBefore:B,insertAfter:_,handleNodeExpand:L,updateKeyChildren:H}}});function WY(e,t,n,a,l,o){const s=At("el-tree-node");return N(),F("div",{ref:"el$",class:P([e.ns.b(),e.ns.is("dragging",!!e.dragState.draggingNode),e.ns.is("drop-not-allow",!e.dragState.allowDrop),e.ns.is("drop-inner",e.dragState.dropType==="inner"),{[e.ns.m("highlight-current")]:e.highlightCurrent}]),role:"tree"},[(N(!0),F(ze,null,yt(e.root.childNodes,i=>(N(),oe(s,{key:e.getNodeKey(i),node:i,props:e.props,accordion:e.accordion,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,"render-content":e.renderContent,onNodeExpand:e.handleNodeExpand},null,8,["node","props","accordion","render-after-expand","show-checkbox","render-content","onNodeExpand"]))),128)),e.isEmpty?(N(),F("div",{key:0,class:P(e.ns.e("empty-block"))},[ne(e.$slots,"empty",{},()=>[j("span",{class:P(e.ns.e("empty-text"))},we(e.emptyText??e.t("el.tree.emptyText")),3)])],2)):te("v-if",!0),ft(j("div",{ref:"dropIndicator$",class:P(e.ns.e("drop-indicator"))},null,2),[[Lt,e.dragState.showDropIndicator]])],2)}var jY=Rn(KY,[["render",WY]]);const um=it(jY),qY=(e,{attrs:t,emit:n},{select:a,tree:l,key:o})=>{const s=he("tree-select");fe(()=>e.data,()=>{e.filterable&&Ae(()=>{var u,c;(c=l.value)==null||c.filter((u=a.value)==null?void 0:u.states.inputValue)})},{flush:"post"});const i=u=>{var d,f;const c=u.at(-1);if(c.expanded&&c.childNodes.at(-1))i([c.childNodes.at(-1)]);else{(f=(d=l.value.el$)==null?void 0:d.querySelector(`[data-key="${u.at(-1).key}"]`))==null||f.focus({preventScroll:!0});return}};return mt(()=>{Ht(()=>{var u;return(u=a.value)==null?void 0:u.$el},"keydown",async u=>{const c=Gt(u),{dropdownMenuVisible:d}=a.value;[ye.down,ye.up].includes(c)&&d&&(await Ae(),setTimeout(()=>{var f,v,g;if(ye.up===c){const m=l.value.store.root.childNodes;i(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})}),{...Rl(Vn(e),Object.keys(jo.props)),...t,class:w(()=>t.class),style:w(()=>t.style),"onUpdate:modelValue":u=>n(st,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)}}},YY=ue({extends:_c,setup(e,t){const n=_c.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 uv(e){return e||e===0}function cm(e){return me(e)&&e.length}function qs(e){return me(e)?e:uv(e)?[e]:[]}function ic(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(),qs(e.modelValue))&&m.setCheckedKeys(qs(e.modelValue))})},{immediate:!0,deep:!0});const i=w(()=>({value:s.value,label:"label",children:"children",disabled:"disabled",isLeaf:"isLeaf",...e.props})),u=(m,p)=>{var b;const h=i.value[m];return We(h)?h(p,(b=o.value)==null?void 0:b.getNode(u("value",p))):p[h]},c=qs(e.modelValue).map(m=>ic(e.data||[],p=>u("value",p)===m,p=>u("children",p),(p,h,b,y)=>y&&u("value",y))).filter(m=>uv(m)),d=w(()=>{if(!e.renderAfterExpand&&!e.lazy)return[];const m=[];return uc(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)&&fa(h.childNodes)})},v=m=>{cn(e.modelValue,m)||a(bt,m)};function g(m){a(st,m),v(m)}return{...Rl(Vn(e),Object.keys(um.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(YY,{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(Zv(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={};uc([o.value.store.root],E=>b[E.key]=E,E=>E.childNodes);const y=p.checkedKeys,C=e.multiple?qs(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=ic([m],x=>!cm(u("children",x))&&!u("disabled",x),x=>u("children",x)),O=E?u("value",E):void 0,T=uv(e.modelValue)&&!!ic([m],x=>u("value",x)===e.modelValue,x=>u("children",x));g(O===e.modelValue||T?void 0:O)}Ae(()=>{var O;const E=qs(e.modelValue);o.value.setCheckedKeys(E),(O=t.onCheck)==null||O.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();uc([o.value.store.root],E=>y[E.key]=E,E=>E.childNodes);const S=qs(e.modelValue).filter(E=>!(E in y)&&!C.includes(E)),k=f();g(S.concat(k))}})},cacheOptions:d}};var GY=ue({props:{data:{type:Array,default:()=>[]}},setup(e){const t=Fe(fu);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"))||[];Pt&&!Array.from(n).includes(document.activeElement)&&t.setSelected()},{flush:"post",immediate:!0}),()=>{}}}),XY=ue({name:"ElTreeSelect",inheritAttrs:!1,props:{...gC,...M2,cacheData:{type:Array,default:()=>[]}},setup(e,t){const{slots:n,expose:a,emit:l,attrs:o}=t,s={...o,onChange:void 0},i=V(),u=V(),c=w(()=>e.nodeKey||e.valueKey||"value"),d=qY(e,{attrs:o,emit:l},{select:i,tree:u,key:c}),{cacheOptions:f,...v}=UY(e,{attrs:s,slots:n,emit:l},{select:i,tree:u,key:c}),g=Ft({});return a(g),mt(()=>{Object.assign(g,{...Rl(u.value,["filter","updateKeyChildren","getCheckedNodes","setCheckedNodes","getCheckedKeys","setCheckedKeys","setChecked","getHalfCheckedNodes","getHalfCheckedKeys","getCurrentKey","getCurrentNode","setCurrentKey","setCurrentNode","getNode","remove","append","insertBefore","insertAfter"]),...Rl(i.value,["focus","blur","selectedLabel"]),treeRef:u.value,selectRef:i.value})}),()=>Ge(jo,Ft({...d,ref:m=>i.value=m}),{...n,default:()=>[Ge(GY,{data:f.value}),Ge(um,Ft({...v,ref:m=>u.value=m}))]})}}),JY=XY;const ZY=it(JY),dm=Symbol(),QY={key:-1,level:-1,data:{}},A2={type:Number,default:26},eU=$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:A2,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}),tU=$e({node:{type:G(Object),default:()=>dn(QY)},expanded:Boolean,checked:Boolean,indeterminate:Boolean,showCheckbox:Boolean,disabled:Boolean,current:Boolean,hiddenExpandIcon:Boolean,itemSize:A2}),nU=$e({node:{type:G(Object),required:!0}}),L2="node-click",D2="node-drop",V2="node-expand",B2="node-collapse",F2="current-change",z2="check",H2="check-change",K2="node-contextmenu",aU={[L2]:(e,t,n)=>e&&t&&n,[D2]:(e,t,n)=>e&&t&&n,[V2]:(e,t)=>e&&t,[B2]:(e,t)=>e&&t,[F2]:(e,t)=>e&&t,[z2]:(e,t)=>e&&t,[H2]:(e,t)=>e&&qt(t),[K2]:(e,t,n)=>e&&t&&n},lU={click:(e,t)=>!!(e&&t),drop:(e,t)=>!!(e&&t),toggle:e=>!!e,check:(e,t)=>e&&qt(t)};function oU(e,t){const n=V(new Set),a=V(new Set),{emit:l}=ht();fe([()=>t.value,()=>e.defaultCheckedKeys],()=>Ae(()=>{y(e.defaultCheckedKeys)}),{immediate:!0});const o=(C=!1)=>{if(!t.value||!e.showCheckbox||e.checkStrictly&&!C)return;const{levelTreeNodeMap:S,maxLevel:k}=t.value,E=n.value,O=new Set;for(let T=k;T>=1;--T){const x=S.get(T);x&&x.forEach($=>{const I=$.children;let M=!$.isLeaf||$.disabled||E.has($.key);if(I){let A=!0,K=!1;for(const z of I){const B=z.key;if(z.isEffectivelyChecked||(M=!1),E.has(B))K=!0;else if(O.has(B)){A=!1,K=!0;break}else A=!1}A?E.add($.key):K?(O.add($.key),E.delete($.key)):(E.delete($.key),O.delete($.key))}$.isEffectivelyChecked=M})}a.value=O},s=C=>n.value.has(C.key),i=C=>a.value.has(C.key),u=(C,S,k=!0,E=!0,O=!1)=>{const T=n.value,x=C.children;(!e.checkStrictly||O)&&k&&(x!=null&&x.length)&&(S=x.some(I=>!I.isEffectivelyChecked));const $=(I,M)=>{T[M?"add":"delete"](I.key);const A=I.children;(!e.checkStrictly||O)&&A&&A.forEach(K=>{(!K.disabled||K.children)&&$(K,M)})};$(C,S),E&&o(),k&&c(C,S)},c=(C,S)=>{const{checkedNodes:k,checkedKeys:E}=m(),{halfCheckedNodes:O,halfCheckedKeys:T}=p();l(z2,C.data,{checkedKeys:E,checkedNodes:k,halfCheckedKeys:T,halfCheckedNodes:O}),l(H2,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(O=>{const T=E.get(O);T&&(!C||C&&T.isLeaf)&&(k.push(O),S.push(T.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 O=k.get(E);O&&(S.push(E),C.push(O.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:i,getCheckedKeys:d,getCheckedNodes:f,getHalfCheckedKeys:v,getHalfCheckedNodes:g,setChecked:b,setCheckedKeys:h}}function sU(e,t){const n=V(new Set([])),a=V(new Set([])),l=w(()=>We(e.filterMethod));function o(i){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(i,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(i){return a.value.has(i.key)}return{hiddenExpandIconKeySet:a,hiddenNodeKeySet:n,doFilter:o,isForceHiddenExpandIcon:s}}function rU(e,t){const n=V(new Set),a=V(),l=Et(),o=V(),{isIndeterminate:s,isChecked:i,toggleCheckbox:u,getCheckedKeys:c,getCheckedNodes:d,getHalfCheckedKeys:f,getHalfCheckedNodes:v,setChecked:g,setCheckedKeys:m}=oU(e,l),{doFilter:p,hiddenNodeKeySet:h,isForceHiddenExpandIcon:b}=sU(e,l),y=w(()=>{var R;return((R=e.props)==null?void 0:R.value)||"id"}),C=w(()=>{var R;return((R=e.props)==null?void 0:R.children)||"children"}),S=w(()=>{var R;return((R=e.props)==null?void 0:R.disabled)||"disabled"}),k=w(()=>{var R;return((R=e.props)==null?void 0:R.label)||"label"}),E=w(()=>{var de;const R=n.value,Y=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(!Y.has(be.key)&&(ae.push(be),be.children&&R.has(be.key)))for(let Se=be.children.length-1;Se>=0;--Se)se.push(be.children[Se])}return ae}),O=w(()=>E.value.length>0);function T(R){const Y=new Map,ae=new Map;let le=1;function se(be,Se=1,Ne=void 0){var Pe;const Ce=[];for(const ge of be){const Ee=I(ge),Le={level:Se,key:Ee,data:ge};Le.label=A(ge),Le.parent=Ne;const qe=$(ge);Le.disabled=M(ge),Le.isLeaf=!qe||qe.length===0,Le.expanded=n.value.has(Ee),qe&&qe.length&&(Le.children=se(qe,Se+1,Le)),Ce.push(Le),Y.set(Ee,Le),ae.has(Se)||ae.set(Se,[]),(Pe=ae.get(Se))==null||Pe.push(Le)}return Se>le&&(le=Se),Ce}const de=se(R);return{treeNodeMap:Y,levelTreeNodeMap:ae,maxLevel:le,treeNodes:de}}function x(R){const Y=p(R);Y&&(n.value=Y)}function $(R){return R[C.value]}function I(R){return R?R[y.value]:""}function M(R){return R[S.value]}function A(R){return R[k.value]}function K(R){n.value.has(R.key)?W(R):D(R)}function z(R){const Y=new Set,ae=l.value.treeNodeMap;n.value.forEach(le=>{const se=ae.get(le);se&&(se.expanded=!1)}),R.forEach(le=>{let se=ae.get(le);for(;se&&!Y.has(se.key);)Y.add(se.key),se.expanded=!0,se=se.parent}),n.value=Y}function B(R,Y){L(R),t(L2,R.data,R,Y),e.expandOnClickNode&&K(R),e.showCheckbox&&(e.checkOnClickNode||R.isLeaf&&e.checkOnClickLeaf)&&!R.disabled&&u(R,!i(R),!0)}function _(R,Y){t(D2,R.data,R,Y)}function L(R){X(R)||(a.value=R.key,t(F2,R.data,R))}function H(R,Y){u(R,Y)}function D(R){const Y=n.value;if(l.value&&e.accordion){const{treeNodeMap:le}=l.value;Y.forEach(se=>{const de=le.get(se);R&&R.level===(de==null?void 0:de.level)&&(Y.delete(se),de.expanded=!1)})}Y.add(R.key);const ae=pe(R.key);ae&&(ae.expanded=!0,t(V2,ae.data,ae))}function W(R){n.value.delete(R.key);const Y=pe(R.key);Y&&(Y.expanded=!1,t(B2,Y.data,Y))}function q(R){return!!R.disabled}function X(R){const Y=a.value;return Y!==void 0&&Y===R.key}function J(){var R,Y;if(a.value!==void 0)return(Y=(R=l.value)==null?void 0:R.treeNodeMap.get(a.value))==null?void 0:Y.data}function Q(){return a.value}function ee(R){a.value=R}function ie(R){l.value=T(R)}function pe(R){var ae;const Y=rt(R)?I(R):R;return(ae=l.value)==null?void 0:ae.treeNodeMap.get(Y)}function ve(R,Y="auto"){const ae=pe(R);ae&&o.value&&o.value.scrollToItem(E.value.indexOf(ae),Y)}function re(R){var Y;(Y=o.value)==null||Y.scrollTo(R)}return fe(()=>e.currentNodeKey,R=>{a.value=R},{immediate:!0}),fe(()=>e.defaultExpandedKeys,R=>{z(R||[])}),fe(()=>e.data,R=>{ie(R),z(e.defaultExpandedKeys||[])},{immediate:!0}),{tree:l,flattenTree:E,isNotEmpty:O,listRef:o,getKey:I,getChildren:$,toggleExpand:K,toggleCheckbox:u,isChecked:i,isIndeterminate:s,isDisabled:q,isCurrent:X,isForceHiddenExpandIcon:b,handleNodeClick:B,handleNodeDrop:_,handleNodeCheck:H,getCurrentNode:J,getCurrentKey:Q,setCurrentKey:ee,getCheckedKeys:c,getCheckedNodes:d,getHalfCheckedKeys:f,getHalfCheckedNodes:v,setChecked:g,setCheckedKeys:m,filter:x,setData:ie,getNode:pe,expandNode:D,collapseNode:W,setExpandedKeys:z,scrollToNode:ve,scrollTo:re}}var iU=ue({name:"ElTreeNodeContent",props:nU,setup(e){const t=Fe(dm),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(sm,{tag:"span",truncated:!0,class:n.be("node","label")},()=>[a==null?void 0:a.label])}}});const uU=["aria-expanded","aria-disabled","aria-checked","data-key"];var cU=ue({name:"ElTreeNode",__name:"tree-node",props:tU,emits:lU,setup(e,{emit:t}){const n=e,a=t,l=Fe(dm),o=he("tree"),s=w(()=>(l==null?void 0:l.props.indent)??16),i=w(()=>(l==null?void 0:l.props.icon)??gS),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(K2,m,(y=n.node)==null?void 0:y.data,n.node)};return(m,p)=>{var h,b,y;return N(),F("div",{ref:"node$",class:P([r(o).b("node"),r(o).is("expanded",e.expanded),r(o).is("current",e.current),r(o).is("focusable",!e.disabled),r(o).is("checked",!e.disabled&&e.checked),u(e.node)]),role:"treeitem",tabindex:"-1","aria-expanded":e.expanded,"aria-disabled":e.disabled,"aria-checked":e.checked,"data-key":(h=e.node)==null?void 0:h.key,onClick:Je(c,["stop"]),onContextmenu:g,onDragover:p[1]||(p[1]=Je(()=>{},["prevent"])),onDragenter:p[2]||(p[2]=Je(()=>{},["prevent"])),onDrop:Je(d,["stop"])},[j("div",{class:P(r(o).be("node","content")),style:je({paddingLeft:`${(e.node.level-1)*s.value}px`,height:e.itemSize+"px"})},[i.value?(N(),oe(r(Be),{key:0,class:P([r(o).is("leaf",!!((b=e.node)!=null&&b.isLeaf)),r(o).is("hidden",e.hiddenExpandIcon),{expanded:!((y=e.node)!=null&&y.isLeaf)&&e.expanded},r(o).be("node","expand-icon")]),onClick:Je(f,["stop"])},{default:Z(()=>[(N(),oe(ct(i.value)))]),_:1},8,["class"])):te("v-if",!0),e.showCheckbox?(N(),oe(r(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),U(r(iU),{node:{...e.node,expanded:e.expanded}},null,8,["node"])],6)],42,uU)}}}),dU=cU,fU=ue({name:"ElTreeV2",__name:"tree",props:eU,emits:aU,setup(e,{expose:t,emit:n}){const a=e,l=n,o=mn(),s=w(()=>a.itemSize);Tt(dm,{ctx:{emit:l,slots:o},props:a,instance:ht()}),Tt(Bl,void 0);const{t:i}=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:O,setCurrentKey:T,getCheckedKeys:x,getCheckedNodes:$,getHalfCheckedKeys:I,getHalfCheckedNodes:M,setChecked:A,setCheckedKeys:K,filter:z,setData:B,getNode:_,expandNode:L,collapseNode:H,setExpandedKeys:D,scrollToNode:W,scrollTo:q}=rU(a,l);return t({toggleCheckbox:k,getCurrentNode:E,getCurrentKey:O,setCurrentKey:T,getCheckedKeys:x,getCheckedNodes:$,getHalfCheckedKeys:I,getHalfCheckedNodes:M,setChecked:A,setCheckedKeys:K,filter:z,setData:B,getNode:_,expandNode:L,collapseNode:H,setExpandedKeys:D,scrollToNode:W,scrollTo:q}),(X,J)=>(N(),F("div",{class:P([r(u).b(),{[r(u).m("highlight-current")]:e.highlightCurrent}]),role:"tree"},[r(d)?(N(),oe(r(vu),{key:0,ref_key:"listRef",ref:f,"class-name":r(u).b("virtual-list"),data:r(c),total:r(c).length,height:e.height,"item-size":s.value,"perf-mode":e.perfMode,"scrollbar-always-on":e.scrollbarAlwaysOn},{default:Z(({data:Q,index:ee,style:ie})=>[(N(),oe(dU,{key:Q[ee].key,style:je(ie),node:Q[ee],expanded:Q[ee].expanded,"show-checkbox":e.showCheckbox,checked:r(m)(Q[ee]),indeterminate:r(g)(Q[ee]),"item-size":s.value,disabled:r(p)(Q[ee]),current:r(h)(Q[ee]),"hidden-expand-icon":r(b)(Q[ee]),onClick:r(y),onToggle:r(v),onCheck:r(S),onDrop:r(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"])):(N(),F("div",{key:1,class:P(r(u).e("empty-block"))},[ne(X.$slots,"empty",{},()=>[j("span",{class:P(r(u).e("empty-text"))},we(e.emptyText??r(i)("el.tree.emptyText")),3)])],2))],2))}}),pU=fU;const vU=it(pU),hU="ElUpload";var mU=class extends Error{constructor(e,t,n,a){super(e),this.name="UploadAjaxError",this.status=t,this.method=n,this.url=a}};function jy(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 mU(a,n.status,t.method,e)}function gU(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}const bU=e=>{typeof XMLHttpRequest>"u"&&rn(hU,"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(i=>{a.append(o,i)}):a.append(o,s);a.append(e.filename,e.file,e.file.name),t.addEventListener("error",()=>{e.onError(jy(n,e,t))}),t.addEventListener("load",()=>{if(t.status<200||t.status>=300)return e.onError(jy(n,e,t));e.onSuccess(gU(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},W2=["text","picture","picture-card"];let yU=1;const cv=()=>Date.now()+yU++,j2=$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:W2,default:"text"},httpRequest:{type:G(Function),default:bU},disabled:{type:Boolean,default:void 0},limit:Number,directory:Boolean}),wU=$e({...j2,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)}}),q2=Symbol("uploadContextKey"),SU=$e({files:{type:G(Array),default:()=>dn([])},disabled:{type:Boolean,default:void 0},handlePreview:{type:G(Function),default:vt},listType:{type:String,values:W2,default:"text"},crossorigin:{type:G(String)}}),CU={remove:e=>!!e},kU=$e({...j2,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}}),EU=$e({disabled:{type:Boolean,default:void 0},directory:Boolean}),xU={file:e=>me(e)},TU=["tabindex","aria-disabled","onKeydown"],$U=["src","crossorigin"],OU=["onClick"],NU=["title"],MU=["onClick"],PU=["onClick"];var IU=ue({name:"ElUploadList",__name:"upload-list",props:SU,emits:CU,setup(e,{emit:t}){const n=e,a=t,{t:l}=St(),o=he("upload"),s=he("icon"),i=he("list"),u=sn(),c=V(!1),d=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)=>(N(),oe(Tw,{tag:"ul",class:P(d.value),name:r(i).b()},{default:Z(()=>[(N(!0),F(ze,null,yt(e.files,(p,h)=>(N(),F("li",{key:p.uid||p.name,class:P([r(o).be("list","item"),r(o).is(p.status),{focusing:c.value}]),tabindex:r(u)?void 0:0,"aria-disabled":r(u),role:"button",onKeydown:an(b=>!r(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"?(N(),F("img",{key:0,class:P(r(o).be("list","item-thumbnail")),src:p.url,crossorigin:e.crossorigin,alt:""},null,10,$U)):te("v-if",!0),p.status==="uploading"||e.listType!=="picture-card"?(N(),F("div",{key:1,class:P(r(o).be("list","item-info"))},[j("a",{class:P(r(o).be("list","item-name")),onClick:Je(b=>e.handlePreview(p),["prevent"])},[U(r(Be),{class:P(r(s).m("document"))},{default:Z(()=>[U(r(F4))]),_:1},8,["class"]),j("span",{class:P(r(o).be("list","item-file-name")),title:p.name},we(p.name),11,NU)],10,OU),p.status==="uploading"?(N(),oe(r(Yh),{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),j("label",{class:P(r(o).be("list","item-status-label"))},[e.listType==="text"?(N(),oe(r(Be),{key:0,class:P([r(s).m("upload-success"),r(s).m("circle-check")])},{default:Z(()=>[U(r(gh))]),_:1},8,["class"])):["picture-card","picture"].includes(e.listType)?(N(),oe(r(Be),{key:1,class:P([r(s).m("upload-success"),r(s).m("check")])},{default:Z(()=>[U(r(yr))]),_:1},8,["class"])):te("v-if",!0)],2),r(u)?te("v-if",!0):(N(),oe(r(Be),{key:2,class:P(r(s).m("close")),"aria-label":r(l)("el.upload.delete"),role:"button",tabindex:"0",onClick:b=>v(p),onKeydown:an(Je(b=>v(p),["prevent"]),["enter","space"])},{default:Z(()=>[U(r(Ya))]),_:1},8,["class","aria-label","onClick","onKeydown"])),r(u)?te("v-if",!0):(N(),F("i",{key:3,class:P(r(s).m("close-tip"))},we(r(l)("el.upload.deleteTip")),3)),e.listType==="picture-card"?(N(),F("span",{key:4,class:P(r(o).be("list","item-actions"))},[j("span",{class:P(r(o).be("list","item-preview")),onClick:b=>e.handlePreview(p)},[U(r(Be),{class:P(r(s).m("zoom-in"))},{default:Z(()=>[U(r(SS))]),_:1},8,["class"])],10,MU),r(u)?te("v-if",!0):(N(),F("span",{key:0,class:P(r(o).be("list","item-delete")),onClick:b=>v(p)},[U(r(Be),{class:P(r(s).m("delete"))},{default:Z(()=>[U(r(V4))]),_:1},8,["class"])],10,PU))],2)):te("v-if",!0)])],42,TU))),128)),ne(g.$slots,"append")]),_:3},8,["class","name"]))}}),qy=IU;const Yy="ElUploadDrag";var RU=ue({name:Yy,__name:"upload-dragger",props:EU,emits:xU,setup(e,{emit:t}){const n=e,a=t;Fe(q2)||rn(Yy,"usage: ");const l=he("upload"),o=V(!1),s=sn(),i=v=>new Promise((g,m)=>v.file(g,m)),u=async v=>{try{if(v.isFile){const g=await i(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 Ec(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",Ec(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)=>(N(),F("div",{class:P([r(l).b("dragger"),r(l).is("dragover",o.value)]),onDrop:Je(c,["prevent"]),onDragover:Je(d,["prevent"]),onDragleave:Je(f,["prevent"])},[ne(v.$slots,"default")],34))}}),_U=RU;const AU=["tabindex","aria-disabled","onKeydown"],LU=["name","disabled","multiple","accept","webkitdirectory"];var DU=ue({name:"ElUploadContent",inheritAttrs:!1,__name:"upload-content",props:kU,setup(e,{expose:t}){const n=e,a=he("upload"),l=sn(),o=Et({}),s=Et(),i=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 O=E;O.uid=cv(),S(O),h&&u(O)}},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=vi(n.data)?Cl(n.data):n.data,h=await S,vi(n.data)&&cn(C,b)&&(b=Cl(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:O,onSuccess:T,onError:x,httpRequest:$}=n;try{h=await c(h??y,p)}catch{n.onRemove(p);return}const{uid:I}=p,M={headers:b||{},withCredentials:S,file:p,data:h,method:C,filename:k,action:E,onProgress:K=>{O(K,p)},onSuccess:K=>{T(K,p),delete o.value[I]},onError:K=>{x(K,p),delete o.value[I]}},A=$(M);o.value[I]=A,A instanceof Promise&&A.then(M.onSuccess,M.onError)},f=p=>{const h=p.target.files;h&&i(Array.from(h))},v=()=>{l.value||(s.value.value="",s.value.click())},g=()=>{v()};return t({abort:p=>{w1(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)=>(N(),F("div",{class:P([r(a).b(),r(a).m(e.listType),r(a).is("drag",e.drag),r(a).is("disabled",r(l))]),tabindex:r(l)?void 0:0,"aria-disabled":r(l),role:"button",onClick:v,onKeydown:an(Je(g,["self"]),["enter","space"])},[e.drag?(N(),oe(_U,{key:0,disabled:r(l),directory:e.directory,onFile:i},{default:Z(()=>[ne(p.$slots,"default")]),_:3},8,["disabled","directory"])):ne(p.$slots,"default",{key:1}),j("input",{ref_key:"inputRef",ref:s,class:P(r(a).e("input")),name:e.name,disabled:r(l),multiple:e.multiple,accept:e.accept,webkitdirectory:e.directory||void 0,type:"file",onChange:f,onClick:h[0]||(h[0]=Je(()=>{},["stop"]))},null,42,LU)],42,AU))}}),Uy=DU;const Gy="ElUpload",Xy=e=>{var t;(t=e.url)!=null&&t.startsWith("blob:")&&URL.revokeObjectURL(e.url)},VU=(e,t)=>{const n=BI(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 i=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),i(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),i(h))},f=m=>{vn(m.uid)&&(m.uid=cv());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(Gy,h.message),e.onError(h,p,n.value)}n.value=[...n.value,p],i(p)},v=async m=>{const p=m instanceof File?a(m):m;p||rn(Gy,"file to be removed not found");const h=b=>{l(b),s(b),e.onRemove(b,n.value),Xy(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=cv()),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:Xy}};var BU=ue({name:"ElUpload",__name:"upload",props:wU,setup(e,{expose:t}){const n=e,a=sn(),l=Et(),{abort:o,submit:s,clearFiles:i,uploadFiles:u,handleStart:c,handleError:d,handleRemove:f,handleSuccess:v,handleProgress:g,revokeFileObjectURL:m}=VU(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(q2,{accept:Mt(n,"accept")}),t({abort:o,submit:s,clearFiles:i,handleStart:c,handleRemove:f}),(b,y)=>(N(),F("div",null,[p.value&&e.showFileList?(N(),oe(qy,{key:0,disabled:r(a),"list-type":e.listType,files:r(u),crossorigin:e.crossorigin,"handle-preview":e.onPreview,onRemove:r(f)},pa({append:Z(()=>[U(Uy,pt({ref_key:"uploadRef",ref:l},h.value),{default:Z(()=>[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:Z(({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?(N(),oe(Uy,pt({key:1,ref_key:"uploadRef",ref:l},h.value),{default:Z(()=>[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?(N(),oe(qy,{key:3,disabled:r(a),"list-type":e.listType,files:r(u),crossorigin:e.crossorigin,"handle-preview":e.onPreview,onRemove:r(f)},pa({_:2},[b.$slots.file?{name:"default",fn:Z(({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)]))}}),FU=BU;const zU=it(FU),HU=$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 KU(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function WU(e){return Object.keys(e).map(t=>`${KU(t)}: ${e[t]};`).join(" ")}function jU(){return window.devicePixelRatio||1}const qU=(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},YU={left:[0,.5],start:[0,.5],center:[.5,0],right:[1,-.5],end:[1,-.5]};function zf(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 UU(){function e(t,n,a,l,o,s,i,u,c){const[d,f,v,g]=zf(l,o,a);let m=0;if(t instanceof HTMLImageElement)d.drawImage(t,0,0,v,g);else{const{color:q,fontSize:X,fontStyle:J,fontWeight:Q,fontFamily:ee,textAlign:ie,textBaseline:pe}=s,ve=Number(X)*a;d.font=`${J} normal ${Q} ${ve}px/${o}px ${ee}`,d.fillStyle=q,d.textAlign=ie,d.textBaseline=pe;const re=me(t)?t:[t];if(pe!=="top"&&re[0]){const R=d.measureText(re[0]);d.textBaseline="top";const Y=d.measureText(re[0]);m=R.actualBoundingBoxAscent-Y.actualBoundingBoxAscent}re==null||re.forEach((R,Y)=>{const[ae,le]=YU[ie];d.fillText(R??"",v*ae+c*le,Y*(ve+s.fontGap*a))})}const p=Math.PI/180*Number(n),h=Math.max(l,o),[b,y,C]=zf(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,X){return[q*Math.cos(p)-X*Math.sin(p),q*Math.sin(p)+X*Math.cos(p)]}let k=0,E=0,O=0,T=0;const x=v/2,$=g/2;[[0-x,0-$],[0+x,0-$],[0+x,0+$],[0-x,0+$]].forEach(([q,X])=>{const[J,Q]=S(q,X);k=Math.min(k,J),E=Math.max(E,J),O=Math.min(O,Q),T=Math.max(T,Q)});const I=k+C/2,M=O+C/2,A=E-k,K=T-O,z=i*a,B=u*a,_=(A+z)*2,L=K+B,[H,D]=zf(_,L);function W(q=0,X=0){H.drawImage(y,I,M,A,K,q,X+m,A,K)}return W(),W(A+z,-K/2-B/2),W(A+z,+K/2+B/2),[D.toDataURL(),_/a,L/a]}return e}var GU=ue({name:"ElWatermark",__name:"watermark",props:HU,setup(e){const t={position:"relative"},n=e,a=w(()=>{var I;return((I=n.font)==null?void 0:I.fontGap)??3}),l=w(()=>{var I;return((I=n.font)==null?void 0:I.color)??"rgba(0,0,0,.15)"}),o=w(()=>{var I;return((I=n.font)==null?void 0:I.fontSize)??16}),s=w(()=>{var I;return((I=n.font)==null?void 0:I.fontWeight)??"normal"}),i=w(()=>{var I;return((I=n.font)==null?void 0:I.fontStyle)??"normal"}),u=w(()=>{var I;return((I=n.font)==null?void 0:I.fontFamily)??"sans-serif"}),c=w(()=>{var I;return((I=n.font)==null?void 0:I.textAlign)??"center"}),d=w(()=>{var I;return((I=n.font)==null?void 0:I.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 I;return((I=n.offset)==null?void 0:I[0])??g.value}),h=w(()=>{var I;return((I=n.offset)==null?void 0:I[1])??m.value}),b=()=>{const I={zIndex:n.zIndex,position:"absolute",left:0,top:0,width:"100%",height:"100%",pointerEvents:"none",backgroundRepeat:"repeat"};let M=p.value-g.value,A=h.value-m.value;return M>0&&(I.left=`${M}px`,I.width=`calc(100% - ${M}px)`,M=0),A>0&&(I.top=`${A}px`,I.height=`calc(100% - ${A}px)`,A=0),I.backgroundPosition=`${M}px ${A}px`,I},y=Et(null),C=Et(),S=V(!1),k=()=>{C.value&&(C.value.remove(),C.value=void 0)},E=(I,M)=>{var A;y.value&&C.value&&(S.value=!0,C.value.setAttribute("style",WU({...b(),backgroundImage:`url('${I}')`,backgroundSize:`${Math.floor(M)}px`})),(A=y.value)==null||A.append(C.value),setTimeout(()=>{S.value=!1}))},O=I=>{let M=120,A=64,K=0;const{image:z,content:B,width:_,height:L,rotate:H}=n;if(!z&&I.measureText){I.font=`${Number(o.value)}px ${u.value}`;const D=me(B)?B:[B];let W=0,q=0;D.forEach(J=>{const{width:Q,fontBoundingBoxAscent:ee,fontBoundingBoxDescent:ie,actualBoundingBoxAscent:pe,actualBoundingBoxDescent:ve}=I.measureText(J),re=xt(ee)?pe+ve:ee+ie;Q>W&&(W=Math.ceil(Q)),re>q&&(q=Math.ceil(re))}),M=W,A=q*D.length+(D.length-1)*a.value;const X=Math.PI/180*Number(H);K=Math.ceil(Math.abs(Math.sin(X)*A)/2),M+=K}return[_??M,L??A,K]},T=UU(),x=()=>{const I=document.createElement("canvas").getContext("2d"),M=n.image,A=n.content,K=n.rotate;if(I){C.value||(C.value=document.createElement("div"));const z=jU(),[B,_,L]=O(I),H=D=>{const[W,q]=T(D||"",K,z,B,_,{color:l.value,fontSize:o.value,fontStyle:i.value,fontWeight:s.value,fontFamily:u.value,fontGap:a.value,textAlign:c.value,textBaseline:d.value},f.value,v.value,L);E(W,q)};if(M){const D=new Image;D.onload=()=>{H(D)},D.onerror=()=>{H(A)},D.crossOrigin="anonymous",D.referrerPolicy="no-referrer",D.src=M}else H(A)}};return mt(()=>{x()}),fe(()=>n,()=>{x()},{deep:!0,flush:"post"}),zt(()=>{k()}),Mr(y,I=>{S.value||I.forEach(M=>{qU(M,C.value)&&(k(),x())})},{attributes:!0,subtree:!0,childList:!0}),(I,M)=>(N(),F("div",{ref_key:"containerRef",ref:y,style:je([t])},[ne(I.$slots,"default")],4))}}),XU=GU;const JU=it(XU),ZU=["absolute","fixed"],QU=["top-start","top-end","top","bottom-start","bottom-end","bottom","left-start","left-end","left","right-start","right-end","right"],fm=$e({placement:{type:G(String),values:QU,default:"bottom"},reference:{type:G(Object),default:null},strategy:{type:G(String),values:ZU,default:"absolute"},offset:{type:Number,default:10},showArrow:Boolean,zIndex:{type:Number,default:2001}}),eG={close:()=>!0},tG=$e({modelValue:Boolean,current:{type:Number},showArrow:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeIcon:{type:Ut},placement:fm.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}}),nG={[st]:e=>qt(e),"update:current":e=>He(e),close:e=>He(e),finish:()=>!0,change:e=>He(e)},aG=$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:fm.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)}}),lG={close:()=>!0},oG=(e,t,n,a,l)=>{const o=V(null),s=()=>{let d;return De(e.value)?d=document.querySelector(e.value):We(e.value)?d=e.value():d=e.value,d},i=()=>{const d=s();if(!d||!t.value){o.value=null;return}sG(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],()=>{i()},{immediate:!0}),window.addEventListener("resize",i)}),zt(()=>{window.removeEventListener("resize",i)});const u=d=>(me(n.value.offset)?n.value.offset[d]:n.value.offset)??6,c=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})}}})}},Ud=Symbol("ElTour");function sG(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 rG=(e,t,n,a,l,o,s,i)=>{const u=V(),c=V(),d=V({}),f={x:u,y:c,placement:a,strategy:l,middlewareData:d},v=w(()=>{const b=[Q_(r(o)),t4(),e4(),iG()];return r(i)&&r(n)&&b.push(n4({element:r(n)})),b}),g=async()=>{if(!Pt)return;const b=r(e),y=r(t);if(!b||!y)return;const C=await a4(b,y,{placement:r(a),strategy:r(l),middleware:r(v)});Oi(f).forEach(S=>{f[S].value=C[S]})},m=w(()=>{if(!r(e))return{position:"fixed",top:"50%",left:"50%",transform:"translate3d(-50%, -50%, 0)",maxWidth:"100vw",zIndex:r(s)};const{overflow:b}=r(d);return{position:r(l),zIndex:r(s),top:r(c)!=null?`${r(c)}px`:"",left:r(u)!=null?`${r(u)}px`:"",maxWidth:b!=null&&b.maxWidth?`${b==null?void 0:b.maxWidth}px`:""}}),p=w(()=>{if(!r(i))return{};const{arrow:b}=r(d);return{left:(b==null?void 0:b.x)!=null?`${b==null?void 0:b.x}px`:"",top:(b==null?void 0:b.y)!=null?`${b==null?void 0:b.y}px`:""}});let h;return mt(()=>{const b=r(e),y=r(t);b&&y&&(h=J_(b,y,g)),sa(()=>{g()})}),zt(()=>{h&&h()}),{update:g,contentStyle:m,arrowStyle:p}},iG=()=>({name:"overflow",async fn(e){const t=await Z_(e);let n=0;return t.left>0&&(n=t.left),t.right>0&&(n=t.right),{data:{maxWidth:e.rects.floating.width-n}}}}),uG=$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}}),cG={style:{width:"100%",height:"100%"}},dG=["d"];var fG=ue({name:"ElTourMask",inheritAttrs:!1,__name:"mask",props:uG,setup(e){const t=e,{ns:n}=Fe(Ud),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}=Xv(),i=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 Td(Mt(t,"visible"),{ns:n}),(d,f)=>e.visible?(N(),F("div",pt({key:0,class:r(n).e("mask"),style:u.value},d.$attrs),[(N(),F("svg",cG,[j("path",{class:P(r(n).e("hollow")),style:je(c.value),d:i.value},null,14,dG)]))],16)):te("v-if",!0)}}),pG=fG;const vG=["data-side"];var hG=ue({name:"ElTourContent",__name:"content",props:fm,emits:eG,setup(e,{emit:t}){const n=e,a=t,l=V(n.placement),o=V(n.strategy),s=V(null),i=V(null);fe(()=>n.placement,()=>{l.value=n.placement});const{contentStyle:u,arrowStyle:c}=rG(Mt(n,"reference"),s,i,l,o,Mt(n,"offset"),Mt(n,"zIndex"),Mt(n,"showArrow")),d=w(()=>l.value.split("-")[0]),{ns:f}=Fe(Ud),v=()=>{a("close")},g=m=>{m.detail.focusReason==="pointer"&&m.preventDefault()};return(m,p)=>(N(),F("div",{ref_key:"contentRef",ref:s,style:je(r(u)),class:P(r(f).e("content")),"data-side":d.value,tabindex:"-1"},[U(r(Ir),{loop:"",trapped:"","focus-start-el":"container","focus-trap-el":s.value||void 0,onReleaseRequested:v,onFocusoutPrevented:g},{default:Z(()=>[ne(m.$slots,"default")]),_:3},8,["focus-trap-el"]),e.showArrow?(N(),F("span",{key:0,ref_key:"arrowRef",ref:i,style:je(r(c)),class:P(r(f).e("arrow"))},null,6)):te("v-if",!0)],14,vG))}}),mG=hG,gG=ue({name:"ElTourSteps",props:{current:{type:Number,default:0}},emits:["update-total"],setup(e,{slots:t,emit:n}){let a=0;return()=>{var u,c;const l=(u=t.default)==null?void 0:u.call(t),o=[];let s=0;function i(d){me(d)&&d.forEach(f=>{var v;((v=(f==null?void 0:f.type)||{})==null?void 0:v.name)==="ElTourStep"&&(o.push(f),s+=1)})}return l.length&&i($a((c=l[0])==null?void 0:c.children)),a!==s&&(a=s,n("update-total",s)),o.length?o[e.current]:null}}}),bG=ue({name:"ElTour",inheritAttrs:!1,__name:"tour",props:tG,emits:nG,setup(e,{emit:t}){const n=e,a=t,l=he("tour"),o=V(0),s=V(),i=w(()=>!xt(n.current)),u=V(n.current??0),c=w({get(){return xt(n.current)?u.value:n.current},set(M){(i.value?n.current:u.value)!==M&&(i.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(()=>qt(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}=su(),k=S(),E=w(()=>n.zIndex??k),{mergedPosInfo:O,triggerTarget:T}=oG(d,Mt(n,"modelValue"),Mt(n,"gap"),m,y);fe(()=>n.current,M=>!xt(M)&&(u.value=M)),fe(c,(M,A)=>{!n.modelValue||M===A||a(bt,M)},{flush:"post"}),fe(()=>n.modelValue,M=>{!M&&c.value!==0&&(c.value=0)});const x=()=>{n.closeOnPressEscape&&(a(st,!1),a("close",c.value))},$=M=>{o.value=M},I=mn();return Tt(Ud,{currentStep:s,current:c,total:o,showClose:Mt(n,"showClose"),closeIcon:Mt(n,"closeIcon"),mergedType:C,ns:l,slots:I,updateModelValue(M){a(st,M)},onClose(){a("close",c.value)},onFinish(){a("finish")}}),(M,A)=>{var K,z;return N(),F(ze,null,[(N(),oe(Er,{to:e.appendTo},[j("div",pt({class:f.value},M.$attrs),[U(pG,{visible:p.value,fill:(K=h.value)==null?void 0:K.color,style:je((z=h.value)==null?void 0:z.style),pos:r(O),"z-index":E.value,"target-area-clickable":e.targetAreaClickable},null,8,["visible","fill","style","pos","z-index","target-area-clickable"]),e.modelValue?(N(),oe(mG,{key:c.value,reference:r(T),placement:v.value,"show-arrow":b.value,"z-index":E.value,style:je(g.value),onClose:x},{default:Z(()=>[U(r(gG),{current:c.value,onUpdateTotal:$},{default:Z(()=>[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)}}}),yG=bG;const wG=["aria-label"];var SG=ue({name:"ElTourStep",__name:"step",props:aG,emits:lG,setup(e,{emit:t}){const n=e,a=t,{Close:l}=CS,{t:o}=St(),{currentStep:s,current:i,total:u,showClose:c,closeIcon:d,mergedType:f,ns:v,slots:g,updateModelValue:m,onClose:p,onFinish:h}=Fe(Ud);fe(n,x=>{s.value=x},{immediate:!0});const b=w(()=>n.showClose??c.value),y=w(()=>n.closeIcon??d.value??l),C=x=>{if(x)return Ls(x,["children","onClick"])},S=()=>{var x,$;i.value-=1,(x=n.prevButtonProps)!=null&&x.onClick&&(($=n.prevButtonProps)==null||$.onClick())},k=()=>{var x;i.value>=u.value-1?E():i.value+=1,(x=n.nextButtonProps)!=null&&x.onClick&&n.nextButtonProps.onClick()},E=()=>{O(),h()},O=()=>{m(!1),p(),a("close")},T=x=>{var $;if(!(($=x.target)!=null&&$.isContentEditable))switch(Gt(x)){case ye.left:x.preventDefault(),i.value>0&&S();break;case ye.right:x.preventDefault(),k()}};return mt(()=>{window.addEventListener("keydown",T)}),zt(()=>{window.removeEventListener("keydown",T)}),(x,$)=>(N(),F(ze,null,[b.value?(N(),F("button",{key:0,"aria-label":r(o)("el.tour.close"),class:P(r(v).e("closebtn")),type:"button",onClick:O},[U(r(Be),{class:P(r(v).e("close"))},{default:Z(()=>[(N(),oe(ct(y.value)))]),_:1},8,["class"])],10,wG)):te("v-if",!0),j("header",{class:P([r(v).e("header"),{"show-close":r(c)}])},[ne(x.$slots,"header",{},()=>[j("span",{role:"heading",class:P(r(v).e("title"))},we(e.title),3)])],2),j("div",{class:P(r(v).e("body"))},[ne(x.$slots,"default",{},()=>[j("span",null,we(e.description),1)])],2),j("footer",{class:P(r(v).e("footer"))},[j("div",{class:P(r(v).b("indicators"))},[r(g).indicators?(N(),oe(ct(r(g).indicators),{key:0,current:r(i),total:r(u)},null,8,["current","total"])):(N(!0),F(ze,{key:1},yt(r(u),(I,M)=>(N(),F("span",{key:I,class:P([r(v).b("indicator"),r(v).is("active",M===r(i))])},null,2))),128))],2),j("div",{class:P(r(v).b("buttons"))},[r(i)>0?(N(),oe(r(Dn),pt({key:0,size:"small",type:r(f)},C(e.prevButtonProps),{onClick:S}),{default:Z(()=>{var I;return[dt(we(((I=e.prevButtonProps)==null?void 0:I.children)??r(o)("el.tour.previous")),1)]}),_:1},16,["type"])):te("v-if",!0),r(i)<=r(u)-1?(N(),oe(r(Dn),pt({key:1,size:"small",type:r(f)==="primary"?"default":"primary"},C(e.nextButtonProps),{onClick:k}),{default:Z(()=>{var I;return[dt(we(((I=e.nextButtonProps)==null?void 0:I.children)??(r(i)===r(u)-1?r(o)("el.tour.finish"):r(o)("el.tour.next"))),1)]}),_:1},16,["type"])):te("v-if",!0)],2)],2)],64))}}),Y2=SG;const CG=it(yG,{TourStep:Y2}),kG=un(Y2),EG=$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}),xG={change:e=>De(e),click:(e,t)=>e instanceof MouseEvent&&(De(t)||xt(t))},Ku=e=>{if(!Pt||e==="")return null;if(De(e))try{return document.querySelector(e)}catch{return null}return e};function TG(e){let t=0;const n=(...a)=>{t&&Ra(t),t=Hn(()=>{e(...a),t=0})};return n.cancel=()=>{Ra(t),t=0},n}const U2=Symbol("anchor");var $G=ue({name:"ElAnchor",__name:"anchor",props:EG,emits:xG,setup(e,{expose:t,emit:n}){const a=e,l=n,o=mn(),s=V(""),i=V({}),u=V(null),c=V(null),d=V(),f={};let 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(bt,M))};let C=null,S="";const k=M=>{if(!d.value)return;const A=Ku(M);if(!A)return;if(C){if(S===M)return;C()}S=M,v=!0;const K=Fg(A,d.value),z=Up(A,K),B=K.scrollHeight-K.clientHeight,_=Math.min(z-a.offset,B);C=JI(d.value,g,_,a.duration,()=>{setTimeout(()=>{v=!1,S=""},20)})},E=M=>{M&&(y(M),k(M))},O=(M,A)=>{l("click",M,A),E(A)},T=TG(()=>{d.value&&(g=zg(d.value));const M=x();v||xt(M)||y(M)}),x=()=>{if(!d.value)return;const M=zg(d.value),A=[];for(const K of Object.keys(f)){const z=Ku(K);if(!z)continue;const B=Fg(z,d.value),_=Up(z,B);A.push({top:_-a.offset-a.bound,href:K})}A.sort((K,z)=>K.top-z.top);for(let K=0;KM))return z.href}},$=()=>{const M=Ku(a.container);!M||tu(M)?d.value=window:d.value=M};Ht(d,"scroll",T);const I=()=>{Ae(()=>{if(!u.value||!c.value||!s.value){i.value={};return}const M=f[s.value];if(!M){i.value={};return}const A=u.value.getBoundingClientRect(),K=c.value.getBoundingClientRect(),z=M.getBoundingClientRect();if(a.direction==="horizontal"){const B=z.left-A.left;i.value={left:`${B}px`,width:`${z.width}px`,opacity:1}}else{const B=z.top-A.top+(z.height-K.height)/2;i.value={top:`${B}px`,opacity:1}}})};return fe(s,I),fe(()=>{var M;return(M=o.default)==null?void 0:M.call(o)},I),mt(()=>{$();const M=decodeURIComponent(window.location.hash);Ku(M)?E(M):T()}),fe(()=>a.container,()=>{$()}),Tt(U2,{ns:m,direction:a.direction,currentAnchor:s,addLink:h,removeLink:b,handleClick:O}),t({scrollTo:E}),(M,A)=>(N(),F("div",{ref_key:"anchorRef",ref:u,class:P(p.value)},[e.marker?(N(),F("div",{key:0,ref_key:"markerRef",ref:c,class:P(r(m).e("marker")),style:je(i.value)},null,6)):te("v-if",!0),j("div",{class:P(r(m).e("list"))},[ne(M.$slots,"default")],2)],2))}}),OG=$G;const NG=$e({title:String,href:String}),MG=["href"];var PG=ue({name:"ElAnchorLink",__name:"anchor-link",props:NG,setup(e){const t=e,n=V(null),{ns:a,direction:l,currentAnchor:o,addLink:s,removeLink:i,handleClick:u}=Fe(U2),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&&i(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&&i(f)}),(f,v)=>(N(),F("div",{class:P(r(a).e("item"))},[j("a",{ref_key:"linkRef",ref:n,class:P(c.value),href:e.href,onClick:d},[ne(f.$slots,"default",{},()=>[dt(we(e.title),1)])],10,MG),f.$slots["sub-link"]&&r(l)==="vertical"?(N(),F("div",{key:0,class:P(r(a).e("list"))},[ne(f.$slots,"sub-link")],2)):te("v-if",!0)],2))}}),G2=PG;const IG=it(OG,{AnchorLink:G2}),RG=un(G2),X2={label:"label",value:"value",disabled:"disabled"},_G=$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:()=>X2},block:Boolean,size:Pn,disabled:{type:Boolean,default:void 0},validateEvent:{type:Boolean,default:!0},id:String,name:String,...ra(["ariaLabel"])}),AG={[st]:e=>De(e)||He(e)||qt(e),[bt]:e=>De(e)||He(e)||qt(e)},LG=["id","aria-label","aria-labelledby"],DG=["name","disabled","checked","onChange"];var VG=ue({name:"ElSegmented",__name:"segmented",props:_G,emits:AG,setup(e,{emit:t}){const n=e,a=t,l=he("segmented"),o=Xn(),s=$n(),i=sn(),{formItem:u}=Fn(),{inputId:c,isLabeledByFormItem:d}=ka(n,{formItemContext:u}),f=V(null),v=PI(),g=Ft({isInit:!1,width:0,height:0,translateX:0,translateY:0,focusVisible:!1}),m=(I,M)=>{const A=h(M);a(st,A),a(bt,A),I.target.checked=A===n.modelValue},p=w(()=>({...X2,...n.props})),h=I=>rt(I)?I[p.value.value]:I,b=I=>rt(I)?I[p.value.label]:I,y=I=>!!(i.value||rt(I)&&I[p.value.disabled]),C=I=>n.modelValue===h(I),S=I=>n.options.find(M=>h(M)===I),k=I=>[l.e("item"),l.is("selected",C(I)),l.is("disabled",y(I))],E=()=>{if(!f.value)return;const I=f.value.querySelector(".is-selected"),M=f.value.querySelector(".is-selected input");if(!I||!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=I.offsetHeight,g.translateY=I.offsetTop):(g.width=I.offsetWidth,g.translateX=I.offsetLeft);try{g.focusVisible=M.matches(":focus-visible")}catch{}},O=w(()=>[l.b(),l.m(s.value),l.is("block",n.block)]),T=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"})),x=w(()=>[l.e("item-selected"),l.is("disabled",y(S(n.modelValue))),l.is("focus-visible",g.focusVisible)]),$=w(()=>n.name||o.value);return on(f,E),fe(v,E),fe(()=>n.options,E,{deep:!0,flush:"post"}),fe(()=>n.modelValue,()=>{var I;E(),n.validateEvent&&((I=u==null?void 0:u.validate)==null||I.call(u,"change").catch(vt))},{flush:"post"}),(I,M)=>e.options.length?(N(),F("div",{key:0,id:r(c),ref_key:"segmentedRef",ref:f,class:P(O.value),role:"radiogroup","aria-label":r(d)?void 0:e.ariaLabel||"segmented","aria-labelledby":r(d)?r(u).labelId:void 0},[j("div",{class:P([r(l).e("group"),r(l).m(e.direction)])},[j("div",{style:je(T.value),class:P(x.value)},null,6),(N(!0),F(ze,null,yt(e.options,(A,K)=>(N(),F("label",{key:K,class:P(k(A))},[j("input",{class:P(r(l).e("item-input")),type:"radio",name:$.value,disabled:y(A),checked:C(A),onChange:z=>m(z,A)},null,42,DG),j("div",{class:P(r(l).e("item-label"))},[ne(I.$slots,"default",{item:A},()=>[dt(we(b(A)),1)])],2)],2))),128))],2)],10,LG)):te("v-if",!0)}}),BG=VG;const FG=it(BG),zG=(e,t)=>{const n=e.toLowerCase();return(t.label||t.value||"").toLowerCase().includes(n)},HG=(e,t,n)=>{const{selectionEnd:a}=e;if(a===null)return;const l=e.value,o=An(t);let s=-1,i;for(let u=a-1;u>=0;--u){const c=l[u];if(s===-1&&(c===n||c===`
+`||c==="\r")){s=u;continue}if(o.includes(c)){const d=s===-1?a:s;i={pattern:l.slice(u+1,d),start:u+1,end:d,prefix:c,prefixIndex:u,splitIndex:s,selectionEnd:a};break}}return i},KG=(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 i=s.style,u=window.getComputedStyle(e),c=e.nodeName==="INPUT";i.whiteSpace=c?"nowrap":"pre-wrap",c||(i.wordWrap="break-word"),i.position="absolute",t.debug||(i.visibility="hidden"),o.forEach(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?i.lineHeight=`${g-m}px`:g===p?i.lineHeight=u.lineHeight:i.lineHeight="0"}else i.lineHeight=u.height;else i[v]=u[v]}),xd()?e.scrollHeight>Number.parseInt(u.height)&&(i.overflowY="scroll"):i.overflow="hidden",s.textContent=e.value.slice(0,Math.max(0,l)),c&&s.textContent&&(s.textContent=s.textContent.replace(/\s/g," "));const d=document.createElement("span");d.textContent=e.value.slice(Math.max(0,l))||".",d.style.position="relative",d.style.left=`${-e.scrollLeft}px`,d.style.top=`${-e.scrollTop}px`,s.appendChild(d);const f={top:d.offsetTop+Number.parseInt(u.borderTopWidth),left:d.offsetLeft+Number.parseInt(u.borderLeftWidth),height:Number.parseInt(u.fontSize)*1.5};return t.debug?d.style.backgroundColor="#aaa":document.body.removeChild(s),f.left>=e.clientWidth&&(f.left=e.clientWidth),f},WG=$e({...Eh,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:()=>zG,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:()=>J2}}),jG={[st]: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},J2={value:"value",label:"label",disabled:"disabled"},qG=$e({options:{type:G(Array),default:()=>[]},loading:Boolean,disabled:Boolean,contentId:String,ariaLabel:String}),YG={select:e=>De(e.value)},UG=["id","aria-disabled","aria-selected","onMousemove","onClick"];var GG=ue({name:"ElMentionDropdown",__name:"mention-dropdown",props:qG,emits:YG,setup(e,{expose:t,emit:n}){const a=e,l=n,o=he("mention"),{t:s}=St(),i=V(-1),u=V(),c=V(),d=V(),f=(S,k)=>[o.be("dropdown","item"),o.is("hovering",i.value===k),o.is("disabled",S.disabled||a.disabled)],v=S=>{S.disabled||a.disabled||l("select",S)},g=S=>{i.value=S},m=w(()=>a.disabled||a.options.every(S=>S.disabled)),p=w(()=>a.options[i.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"?(i.value++,i.value===k.length&&(i.value=0)):S==="prev"&&(i.value--,i.value<0&&(i.value=k.length-1));const E=k[i.value];if(E.disabled){b(S);return}Ae(()=>y(E))},y=S=>{var T,x,$,I;const{options:k}=a,E=k.findIndex(M=>M.value===S.value),O=(T=c.value)==null?void 0:T[E];if(O){const M=($=(x=d.value)==null?void 0:x.querySelector)==null?void 0:$.call(x,`.${o.be("dropdown","wrap")}`);M&&th(M,O)}(I=u.value)==null||I.handleScroll()};return fe(()=>a.options,()=>{m.value||a.options.length===0?i.value=-1:i.value=a.options.findIndex(S=>!S.disabled)},{immediate:!0}),t({hoveringIndex:i,navigateOptions:b,selectHoverOption:h,hoverOption:p}),(S,k)=>(N(),F("div",{ref_key:"dropdownRef",ref:d,class:P(r(o).b("dropdown"))},[S.$slots.header?(N(),F("div",{key:0,class:P(r(o).be("dropdown","header"))},[ne(S.$slots,"header")],2)):te("v-if",!0),ft(U(r(il),{id:e.contentId,ref_key:"scrollbarRef",ref:u,tag:"ul","wrap-class":r(o).be("dropdown","wrap"),"view-class":r(o).be("dropdown","list"),role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical"},{default:Z(()=>[(N(!0),F(ze,null,yt(e.options,(E,O)=>(N(),F("li",{id:`${e.contentId}-${O}`,ref_for:!0,ref_key:"optionRefs",ref:c,key:O,class:P(f(E,O)),role:"option","aria-disabled":E.disabled||e.disabled||void 0,"aria-selected":i.value===O,onMousemove:T=>g(O),onClick:Je(T=>v(E),["stop"])},[ne(S.$slots,"label",{item:E,index:O},()=>[j("span",null,we(E.label??E.value),1)])],42,UG))),128))]),_:3},8,["id","wrap-class","view-class","aria-label"]),[[Lt,e.options.length>0&&!e.loading]]),e.loading?(N(),F("div",{key:1,class:P(r(o).be("dropdown","loading"))},[ne(S.$slots,"loading",{},()=>[dt(we(r(s)("el.mention.loading")),1)])],2)):te("v-if",!0),S.$slots.footer?(N(),F("div",{key:2,class:P(r(o).be("dropdown","footer"))},[ne(S.$slots,"footer")],2)):te("v-if",!0)],2))}}),XG=GG,JG=ue({name:"ElMention",inheritAttrs:!1,__name:"mention",props:WG,emits:jG,setup(e,{expose:t,emit:n}){const a=e,l=n,o=w(()=>{const _=Yn.props??[],L=me(_)?_:Object.keys(_);return Rl(a,L)}),s=he("mention"),i=sn(),u=Xn(),c=V(),d=V(),f=V(),v=V(!1),g=V(),m=V(),p=w(()=>a.showArrow?a.placement:`${a.placement}-start`),h=w(()=>a.showArrow?["bottom","top"]:["bottom-start","top-start"]),b=w(()=>({...J2,...a.props})),y=_=>{const L={label:_[b.value.label],value:_[b.value.value],disabled:_[b.value.disabled]};return{..._,...L}},C=w(()=>a.options.map(y)),S=w(()=>{const{filterOption:_}=a;return!m.value||!_?C.value:C.value.filter(L=>_(m.value.pattern,L))}),k=w(()=>v.value&&(!!S.value.length||a.loading)),E=w(()=>{var _;return`${u.value}-${(_=f.value)==null?void 0:_.hoveringIndex}`}),O=_=>{l(st,_),l(Tn,_),K()},T=_=>{var H,D,W,q;if((H=c.value)!=null&&H.isComposing)return;const L=Gt(_);switch(L){case ye.left:case ye.right:K();break;case ye.up:case ye.down:if(!v.value)return;_.preventDefault(),(D=f.value)==null||D.navigateOptions(L===ye.up?"prev":"next");break;case ye.enter:case ye.numpadEnter:if(!v.value){a.type!=="textarea"&&K();return}_.preventDefault(),(W=f.value)!=null&&W.hoverOption?(q=f.value)==null||q.selectHoverOption():v.value=!1;break;case ye.esc:if(!v.value)return;_.preventDefault(),v.value=!1;break;case ye.backspace:if(a.whole&&m.value){const{splitIndex:X,selectionEnd:J,pattern:Q,prefixIndex:ee,prefix:ie}=m.value,pe=A();if(!pe)return;const ve=pe.value,re=C.value.find(R=>R.value===Q);if((We(a.checkIsWhole)?a.checkIsWhole(Q,ie):re)&&X!==-1&&X+1===J){_.preventDefault();const R=ve.slice(0,ee)+ve.slice(X+1);l(st,R),l(Tn,R),l("whole-remove",Q,ie);const Y=ee;Ae(()=>{pe.selectionStart=Y,pe.selectionEnd=Y,B()})}}}},{wrapperRef:x}=vo(c,{disabled:i,afterFocus(){K()},beforeBlur(_){var L;return(L=d.value)==null?void 0:L.isFocusInsideContent(_)},afterBlur(){v.value=!1}}),$=()=>{K()},I=_=>a.options.find(L=>_.value===L[b.value.value]),M=_=>{if(!m.value)return;const L=A();if(!L)return;const H=L.value,{split:D}=a,W=H.slice(m.value.end),q=W.startsWith(D),X=`${_.value}${q?"":D}`,J=H.slice(0,m.value.start)+X+W;l(st,J),l(Tn,J),l("select",I(_),m.value.prefix);const Q=m.value.start+X.length+(q?1:0);Ae(()=>{L.selectionStart=Q,L.selectionEnd=Q,L.focus(),B()})},A=()=>{var _,L;return a.type==="textarea"?(_=c.value)==null?void 0:_.textarea:(L=c.value)==null?void 0:L.input},K=()=>{setTimeout(()=>{z(),B(),Ae(()=>{var _;return(_=d.value)==null?void 0:_.updatePopper()})},0)},z=()=>{const _=A();if(!_)return;const L=KG(_),H=_.getBoundingClientRect(),D=x.value.getBoundingClientRect();g.value={position:"absolute",width:0,height:`${L.height}px`,left:`${L.left+H.left-D.left}px`,top:`${L.top+H.top-D.top}px`}},B=()=>{const _=A();if(document.activeElement!==_){v.value=!1;return}const{prefix:L,split:H}=a;if(m.value=HG(_,L,H),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}),(_,L)=>(N(),F("div",{ref_key:"wrapperRef",ref:x,class:P(r(s).b())},[U(r(Yn),pt(pt(o.value,_.$attrs),{ref_key:"elInputRef",ref:c,"model-value":e.modelValue,disabled:r(i),role:k.value?"combobox":void 0,"aria-activedescendant":k.value?E.value||"":void 0,"aria-controls":k.value?r(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:O,onKeydown:T,onMousedown:$}),pa({_:2},[yt(_.$slots,(H,D)=>({name:D,fn:Z(W=>[ne(_.$slots,D,eo(no(W)))])}))]),1040,["model-value","disabled","role","aria-activedescendant","aria-controls","aria-expanded","aria-label","aria-autocomplete","aria-haspopup"]),U(r(Bn),{ref_key:"tooltipRef",ref:d,visible:k.value,"popper-class":[r(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:Z(()=>[j("div",{style:je(g.value)},null,4)]),content:Z(()=>[U(XG,{ref_key:"dropdownRef",ref:f,options:S.value,disabled:r(i),loading:e.loading,"content-id":r(u),"aria-label":e.ariaLabel,onSelect:M,onClick:L[0]||(L[0]=Je(H=>{var D;return(D=c.value)==null?void 0:D.focus()},["stop"]))},pa({_:2},[yt(_.$slots,(H,D)=>({name:D,fn:Z(W=>[ne(_.$slots,D,eo(no(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))}}),ZG=JG;const QG=it(ZG),eX=$e({layout:{type:String,default:"horizontal",values:["horizontal","vertical"]},lazy:Boolean}),tX={resizeStart:(e,t)=>!0,resize:(e,t)=>!0,resizeEnd:(e,t)=>!0,collapse:(e,t,n)=>!0},nX=$e({min:{type:[String,Number]},max:{type:[String,Number]},size:{type:[String,Number]},resizable:{type:Boolean,default:!0},collapsible:Boolean}),aX={"update:size":e=>typeof e=="number"||typeof e=="string"};function lX(e){const t=V(),{width:n,height:a}=Ni(t);return{containerEl:t,containerSize:w(()=>e.value==="horizontal"?n.value:a.value)}}function pm(e){return Number(e.slice(0,-1))/100}function vm(e){return Number(e.slice(0,-2))}function hm(e){return De(e)&&e.endsWith("%")}function mm(e){return De(e)&&e.endsWith("px")}function oX(e,t){const n=w(()=>e.value.map(s=>s.size)),a=w(()=>e.value.length),l=V([]);fe([n,a,t],()=>{var c;let s=[],i=0;for(let d=0;dd+(f||0),0);if(u>1||!i){const d=1/u;s=s.map(f=>f===void 0?0:f*d)}else{const d=(1-u)/i;s=s.map(f=>f===void 0?d:f)}l.value=s});const o=s=>s*t.value;return{percentSizes:l,pxSizes:w(()=>l.value.map(o))}}function sX(e,t,n,a){const l=h=>h*t.value||0;function o(h,b){return hm(h)?l(pm(h)):mm(h)?vm(h):h??b}const s=V(0),i=V(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,i.value={index:h,confirmed:!1},u=n.value},v=(h,b)=>{var I;let y=null;if((!i.value||!i.value.confirmed)&&b!==0){if(b>0)y=h,i.value={index:h,confirmed:!0};else for(let M=h;M>=0;M-=1)if(u[M]>0){y=M,i.value={index:M,confirmed:!0};break}}const C=y??((I=i.value)==null?void 0:I.index)??h,S=[...u],k=C+1,E=o(d.value[C][0],0),O=o(d.value[k][0],0),T=o(d.value[C][1],t.value||0),x=o(d.value[k][1],t.value||0);let $=b;S[C]+$T&&($=T-S[C]),S[k]-$>x&&($=S[k]-x),S[C]+=$,S[k]-=$,s.value=$,c=()=>{e.value.forEach((M,A)=>{M.size=S[A]}),c=vt},a.value||c()},g=()=>{a.value&&c(),s.value=0,i.value=null,u=[]},m=[];return{lazyOffset:s,onMoveStart:f,onMoving:v,onMoveEnd:g,movingIndex:i,onCollapse:(h,b)=>{m.length||m.push(...n.value.map((O,T)=>{var x;return O<=0?o((x=d.value[T])==null?void 0:x[0],0):O}));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 O=k+E,T=ba(m[h],0,O),x=O-T;y[S]=T,y[C]=x}e.value.forEach((O,T)=>{O.size=y[T]})}}}const Z2=Symbol("splitterRootContextKey");var rX=ue({name:"ElSplitter",__name:"splitter",props:eX,emits:tX,setup(e,{emit:t}){const n=he("splitter"),a=t,l=e,o=Mt(l,"layout"),s=Mt(l,"lazy"),{containerEl:i,containerSize:u}=lX(o),{removeChild:c,children:d,addChild:f,ChildrenSorter:v}=Rd(ht(),"ElSplitterPanel");fe(d,()=>{h.value=null,d.value.forEach(($,I)=>{$.setIndex(I)})});const{percentSizes:g,pxSizes:m}=oX(d,u),{lazyOffset:p,movingIndex:h,onMoveStart:b,onMoving:y,onMoveEnd:C,onCollapse:S}=sX(d,u,m,s),k=w(()=>({[n.cssVarBlockName("bar-offset")]:s.value?`${p.value}px`:void 0}));return Tt(Z2,Ft({panels:d,percentSizes:g,pxSizes:m,layout:o,lazy:s,movingIndex:h,containerSize:u,onMoveStart:$=>{b($),a("resizeStart",$,m.value)},onMoving:($,I)=>{y($,I),s.value||a("resize",$,m.value)},onMoveEnd:async $=>{C(),await Ae(),a("resizeEnd",$,m.value)},onCollapse:($,I)=>{S($,I),a("collapse",$,I,m.value)},registerPanel:f,unregisterPanel:c})),($,I)=>(N(),F("div",{ref_key:"containerEl",ref:i,class:P([r(n).b(),r(n).e(o.value)]),style:je(k.value)},[ne($.$slots,"default"),U(r(v)),te(" Prevent iframe touch events from breaking "),r(h)?(N(),F("div",{key:0,class:P([r(n).e("mask"),r(n).e(`mask-${o.value}`)])},null,2)):te("v-if",!0)],6))}}),iX=rX;function uX(e){return e&&rt(e)?e:{start:!!e,end:!!e}}function Jy(e,t,n,a){return!!(e!=null&&e.collapsible.end&&t>0||n!=null&&n.collapsible.start&&a===0&&t>0)}var cX=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}),i=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=V(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],O=o.value?k:E;l("moving",a.index,O)},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?so:_d),b=w(()=>o.value?oa:Hl);return(y,C)=>(N(),F("div",{class:P([r(n).b()]),style:je(s.value)},[e.startCollapsible?(N(),F("div",{key:0,class:P([r(n).e("collapse-icon"),r(n).e(`${e.layout}-collapse-icon-start`)]),onClick:C[0]||(C[0]=S=>l("collapse",e.index,"start"))},[ne(y.$slots,"start-collapsible",{},()=>[(N(),oe(ct(h.value),{style:{width:"12px",height:"12px"}}))])],2)):te("v-if",!0),j("div",{class:P([r(n).e("dragger"),u.value,r(n).is("disabled",!e.resizable),r(n).is("lazy",e.resizable&&e.lazy)]),style:je(i.value),onMousedown:d,onTouchstart:f},null,38),e.endCollapsible?(N(),F("div",{key:1,class:P([r(n).e("collapse-icon"),r(n).e(`${e.layout}-collapse-icon-end`)]),onClick:C[1]||(C[1]=S=>l("collapse",e.index,"end"))},[ne(y.$slots,"end-collapsible",{},()=>[(N(),oe(ct(b.value),{style:{width:"12px",height:"12px"}}))])],2)):te("v-if",!0)],6))}}),dX=cX;const Zy="ElSplitterPanel";var fX=ue({name:Zy,__name:"split-panel",props:nX,emits:aX,setup(e,{expose:t,emit:n}){const a=he("splitter-panel"),l=e,o=n,s=Fe(Z2);s||rn(Zy,"usage: ");const{panels:i,layout:u,lazy:c,containerSize:d,pxSizes:f}=Vn(s),{registerPanel:v,unregisterPanel:g,onCollapse:m,onMoveEnd:p,onMoveStart:h,onMoving:b}=s,y=V(),C=ht(),S=C.uid,k=V(0),E=w(()=>i.value[k.value]),O=L=>{k.value=L},T=w(()=>E.value?f.value[k.value]??0:0),x=w(()=>E.value?f.value[k.value+1]??0:0),$=w(()=>E.value?i.value[k.value+1]:null),I=w(()=>{var L;return $.value?l.resizable&&((L=$.value)==null?void 0:L.resizable)&&(T.value!==0||!l.min)&&(x.value!==0||!$.value.min):!1}),M=w(()=>E.value?k.value!==i.value.length-1:!1),A=w(()=>Jy(E.value,T.value,$.value,x.value)),K=w(()=>Jy($.value,x.value,E.value,T.value));function z(L){return hm(L)?pm(L)*d.value||0:mm(L)?vm(L):L??0}let B=!1;fe(()=>l.size,()=>{if(!B&&E.value){if(!d.value){E.value.size=l.size;return}const L=z(l.size),H=z(l.max),D=z(l.min),W=Math.min(Math.max(L,D||0),H||L);W!==L&&o("update:size",W),E.value.size=W}}),fe(()=>{var L;return(L=E.value)==null?void 0:L.size},L=>{L!==l.size&&(B=!0,o("update:size",L),Ae(()=>B=!1))}),fe(()=>l.resizable,L=>{E.value&&(E.value.resizable=L)});const _=Ft({uid:S,getVnode:()=>C.vnode,setIndex:O,...l,collapsible:w(()=>uX(l.collapsible))});return v(_),zt(()=>g(_)),t({splitterPanelRef:y}),(L,H)=>(N(),F(ze,null,[j("div",pt({ref_key:"panelEl",ref:y,class:[r(a).b()],style:{flexBasis:`${T.value}px`}},L.$attrs),[ne(L.$slots,"default")],16),M.value?(N(),oe(dX,{key:0,index:k.value,layout:r(u),lazy:r(c),resizable:I.value,"start-collapsible":A.value,"end-collapsible":K.value,onMoveStart:r(h),onMoving:r(b),onMoveEnd:r(p),onCollapse:r(m)},{"start-collapsible":Z(()=>[ne(L.$slots,"start-collapsible")]),"end-collapsible":Z(()=>[ne(L.$slots,"end-collapsible")]),_:3},8,["index","layout","lazy","resizable","start-collapsible","end-collapsible","onMoveStart","onMoving","onMoveEnd","onCollapse"])):te("v-if",!0)],64))}}),Q2=fX;const pX=it(iX,{SplitPanel:Q2}),vX=un(Q2),tl="ElInfiniteScroll",hX={delay:{type:Number,default:200},distance:{type:Number,default:0},disabled:{type:Boolean,default:!1},immediate:{type:Boolean,default:!0}},gm=(e,t)=>Object.entries(hX).reduce((n,[a,l])=>{const{type:o,default:s}=l,i=e.getAttribute(`infinite-scroll-${a}`);let u=t[i]??i??s;return u=u==="false"?!1:u,u=o(u),n[a]=Number.isNaN(u)?s:u,n},{}),eE=e=>{const{observer:t}=e[tl];t&&(t.disconnect(),delete e[tl].observer)},mX=(e,t)=>{const{container:n,containerEl:a,instance:l,observer:o,lastScrollTop:s}=e[tl],{disabled:i,distance:u}=gm(e,l),{clientHeight:c,scrollHeight:d,scrollTop:f}=a,v=f-s;if(e[tl].lastScrollTop=f,o||i||v<0)return;let g=!1;if(n===e)g=d-(c+f)<=u;else{const{clientTop:m,scrollHeight:p}=e,h=Up(e,a);g=f+c>=h+m+p-u}g&&t.call(l)};function Hf(e,t){const{containerEl:n,instance:a}=e[tl],{disabled:l}=gm(e,a);l||n.clientHeight===0||(n.scrollHeight<=n.clientHeight?t.call(a):eE(e))}const gX={async mounted(e,t){const{instance:n,value:a}=t;xl({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}=gm(e,n),s=eh(e,!0),i=s===window?document.documentElement:s,u=Oo(mX.bind(null,e,a),l);if(s){if(e[tl]={instance:n,container:s,containerEl:i,delay:l,cb:a,onScroll:u,lastScrollTop:i.scrollTop},o){const c=new MutationObserver(Oo(Hf.bind(null,e,a),50));e[tl].observer=c,c.observe(e,{childList:!0,subtree:!0}),Hf(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),eE(e)},async updated(e){if(!e.ElInfiniteScroll)await Ae();else{const{containerEl:t,cb:n,observer:a}=e[tl];t.clientHeight&&a&&Hf(e,n)}}},dv=gX;dv.install=e=>{e.directive("InfiniteScroll",dv)};const bX=dv;function yX(e,t){let n,a=!1;const l=V(!1),o=Ft({...e,originalPosition:"",originalOverflow:"",visible:!1});function s(m){o.text=m}function i(){if(a)return;a=!0;const m=o.parent,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()):(la(m,p.bm("parent","relative")),m.removeAttribute("loading-number")),la(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,i()}const v=Rw(ue({name:"ElLoading",setup(m,{expose:p}){const{ns:h,zIndex:b}=Vd("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(Gn,{name:h.b("fade"),onAfterLeave:d},{default:Z(()=>[ft(U("div",{style:{backgroundColor:o.background||""},class:[h.b("mask"),o.customClass,h.is("fullscreen",o.fullscreen)]},[Ge("div",{class:h.b("spinner")},[C,S])]),[[Lt,o.visible]])])})}}}));Object.assign(v._context,t??{});const g=v.mount(document.createElement("div"));return{...Vn(o),setText:s,removeElLoadingChild:u,close:c,handleAfterLeave:d,vm:g,get $el(){return a?null:g.$el}}}let Wu;const lr=function(e={},t){if(!Pt)return;const n=wX(e);if(n.fullscreen&&Wu)return Wu;const a=yX({...n,closed:()=>{var o;(o=n.closed)==null||o.call(n),n.fullscreen&&(Wu=void 0)}},t??lr._context);SX(n,n.parent,a),Qy(n,n.parent,a),n.parent.vLoadingAddClassList=()=>Qy(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&&(Wu=a),a},wX=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}},SX=async(e,t,n)=>{const{nextZIndex:a}=n.vm.zIndex||n.vm._.exposed.zIndex,l={};if(e.fullscreen)n.originalPosition.value=Ql(document.body,"position"),n.originalOverflow.value=Ql(document.body,"overflow"),l.zIndex=a();else if(e.parent===document.body){n.originalPosition.value=Ql(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(Ql(document.body,`margin-${o}`),10)}px`}for(const o of["height","width"])l[o]=`${e.target.getBoundingClientRect()[o]}px`}else n.originalPosition.value=Ql(t,"position");for(const[o,s]of Object.entries(l))n.$el.style[o]=s},Qy=(e,t,n)=>{const a=n.vm.ns||n.vm._.exposed.ns;["absolute","fixed","sticky"].includes(n.originalPosition.value)?la(t,a.bm("parent","relative")):Va(t,a.bm("parent","relative")),e.fullscreen&&e.lock?Va(t,a.bm("parent","hidden")):la(t,a.bm("parent","hidden"))};lr._context=null;const ti=Symbol("ElLoading"),as=e=>`element-loading-${io(e)}`,e0=(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 V(d)},o=c=>l(a(c)||e.getAttribute(as(c))),s=a("fullscreen")??t.modifiers.fullscreen,i={text:o("text"),svg:o("svg"),svgViewBox:o("svgViewBox"),spinner:o("spinner"),background:o("background"),customClass:o("customClass"),fullscreen:s,target:a("target")??(s?void 0:e),body:a("body")??t.modifiers.body,lock:a("lock")??t.modifiers.lock},u=lr(i);u._context=pi._context,e[ti]={options:i,instance:u}},CX=(e,t)=>{for(const n of Object.keys(e))Qt(e[n])&&(e[n].value=t[n])},pi={mounted(e,t){t.value&&e0(e,t)},updated(e,t){const n=e[ti];if(!t.value){n==null||n.instance.close(),e[ti]=null;return}n?CX(n.options,rt(t.value)?t.value:{text:e.getAttribute(as("text")),svg:e.getAttribute(as("svg")),svgViewBox:e.getAttribute(as("svgViewBox")),spinner:e.getAttribute(as("spinner")),background:e.getAttribute(as("background")),customClass:e.getAttribute(as("customClass"))}):e0(e,t)},unmounted(e){var t;(t=e[ti])==null||t.instance.close(),e[ti]=null}};pi._context=null;const kX={install(e){lr._context=e._context,pi._context=e._context,e.directive("loading",pi),e.config.globalProperties.$loading=lr},directive:pi,service:lr},tE=["primary","success","info","warning","error"],nE=["top","top-left","top-right","bottom","bottom-left","bottom-right"],ea=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:Pt?document.body:void 0}),EX=$e({customClass:{type:G([String,Array,Object,Boolean]),default:ea.customClass},dangerouslyUseHTMLString:{type:Boolean,default:ea.dangerouslyUseHTMLString},duration:{type:Number,default:ea.duration},icon:{type:Ut,default:ea.icon},id:{type:String,default:ea.id},message:{type:G([String,Object,Function]),default:ea.message},onClose:{type:G(Function),default:ea.onClose},showClose:{type:Boolean,default:ea.showClose},type:{type:String,values:tE,default:ea.type},plain:{type:Boolean,default:ea.plain},offset:{type:Number,default:ea.offset},placement:{type:String,values:nE,default:ea.placement},zIndex:{type:Number,default:ea.zIndex},grouping:{type:Boolean,default:ea.grouping},repeatNum:{type:Number,default:ea.repeatNum}}),xX={destroy:()=>!0},ol=wv({}),TX=e=>(ol[e]||(ol[e]=wv([])),ol[e]),$X=(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}},OX=(e,t)=>{const{prev:n}=$X(e,t);return n?n.vm.exposed.bottom.value:0},NX=(e,t,n)=>(ol[n]||[]).findIndex(a=>a.id===e)>0?16:t,MX=["id"],PX=["innerHTML"];var IX=ue({name:"ElMessage",__name:"message",props:EX,emits:xX,setup(e,{expose:t,emit:n}){const{Close:a}=yh,l=e,o=n,s=V(!1),{ns:i,zIndex:u}=Vd("message"),{currentZIndex:c,nextZIndex:d}=u,f=V(),v=V(!1),g=V(0);let m;const p=w(()=>l.type?l.type==="error"?"danger":l.type:"info"),h=w(()=>{const A=l.type;return{[i.bm("icon",A)]:A&&Ko[A]}}),b=w(()=>l.icon||Ko[l.type]||""),y=w(()=>l.placement||"top"),C=w(()=>OX(l.id,y.value)),S=w(()=>Math.max(NX(l.id,l.offset,y.value)+C.value,l.offset)),k=w(()=>g.value+S.value),E=w(()=>y.value.includes("left")?i.is("left"):y.value.includes("right")?i.is("right"):i.is("center")),O=w(()=>y.value.startsWith("top")?"top":"bottom"),T=w(()=>({[O.value]:`${S.value}px`,zIndex:c.value}));function x(){l.duration!==0&&({stop:m}=fr(()=>{I()},l.duration))}function $(){m==null||m()}function I(){v.value=!1,Ae(()=>{var A;s.value||((A=l.onClose)==null||A.call(l),o("destroy"))})}function M(A){Gt(A)===ye.esc&&I()}return mt(()=>{x(),d(),v.value=!0}),fe(()=>l.repeatNum,()=>{$(),x()}),Ht(document,"keydown",M),on(f,()=>{g.value=f.value.getBoundingClientRect().height}),t({visible:v,bottom:k,close:I}),(A,K)=>(N(),oe(Gn,{name:r(i).b("fade"),onBeforeEnter:K[0]||(K[0]=z=>s.value=!0),onBeforeLeave:e.onClose,onAfterLeave:K[1]||(K[1]=z=>A.$emit("destroy")),persisted:""},{default:Z(()=>[ft(j("div",{id:e.id,ref_key:"messageRef",ref:f,class:P([r(i).b(),{[r(i).m(e.type)]:e.type},r(i).is("closable",e.showClose),r(i).is("plain",e.plain),r(i).is("bottom",O.value==="bottom"),E.value,e.customClass]),style:je(T.value),role:"alert",onMouseenter:$,onMouseleave:x},[e.repeatNum>1?(N(),oe(r(FS),{key:0,value:e.repeatNum,type:p.value,class:P(r(i).e("badge"))},null,8,["value","type","class"])):te("v-if",!0),b.value?(N(),oe(r(Be),{key:1,class:P([r(i).e("icon"),h.value])},{default:Z(()=>[(N(),oe(ct(b.value)))]),_:1},8,["class"])):te("v-if",!0),!e.dangerouslyUseHTMLString||A.$slots.default?(N(),F("p",{key:2,class:P(r(i).e("content"))},[ne(A.$slots,"default",{},()=>[dt(we(e.message),1)])],2)):(N(),F(ze,{key:3},[te(" Caution here, message could've been compromised, never use user's input as message "),j("p",{class:P(r(i).e("content")),innerHTML:e.message},null,10,PX)],2112)),e.showClose?(N(),oe(r(Be),{key:4,class:P(r(i).e("closeBtn")),onClick:Je(I,["stop"])},{default:Z(()=>[U(r(a))]),_:1},8,["class"])):te("v-if",!0)],46,MX),[[Lt,v.value]])]),_:3},8,["name","onBeforeLeave"]))}}),RX=IX;let _X=1;const AX=e=>{if(!e.appendTo)e.appendTo=document.body;else if(De(e.appendTo)){let t=document.querySelector(e.appendTo);ya(t)||(Kt("ElMessage","the appendTo option is not an HTMLElement. Falling back to document.body."),t=document.body),e.appendTo=t}},LX=e=>{!e.placement&&De(ta.placement)&&ta.placement&&(e.placement=ta.placement),e.placement||(e.placement="top"),nE.includes(e.placement)||(Kt("ElMessage",`Invalid placement: ${e.placement}. Falling back to 'top'.`),e.placement="top")},aE=e=>{const t=!e||De(e)||Jt(e)||We(e)?{message:e}:e,n={...ea,...t};return AX(n),LX(n),qt(ta.grouping)&&!n.grouping&&(n.grouping=ta.grouping),He(ta.duration)&&n.duration===3e3&&(n.duration=ta.duration),He(ta.offset)&&n.offset===16&&(n.offset=ta.offset),qt(ta.showClose)&&!n.showClose&&(n.showClose=ta.showClose),qt(ta.plain)&&!n.plain&&(n.plain=ta.plain),n},DX=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()},VX=({appendTo:e,...t},n)=>{const a=`message_${_X++}`,l=t.onClose,o=document.createElement("div"),s={...t,id:a,onClose:()=>{l==null||l(),DX(c)},onDestroy:()=>{zo(null,o)}},i=U(RX,s,We(s.message)||Jt(s.message)?{default:We(s.message)?s.message:()=>s.message}:null);i.appContext=n||Ps._context,zo(i,o),e.appendChild(o.firstElementChild);const u=i.component,c={id:a,vnode:i,vm:u,handler:{close:()=>{u.exposed.close()}},props:i.component.props};return c},Ps=(e={},t)=>{if(!Pt)return{close:()=>{}};const n=aE(e),a=TX(n.placement||"top");if(n.grouping&&a.length){const o=a.find(({vnode:s})=>{var i;return((i=s.props)==null?void 0:i.message)===n.message});if(o)return o.props.repeatNum+=1,o.props.type=n.type,o.handler}if(He(ta.max)&&a.length>=ta.max)return{close:()=>{}};const l=VX(n,t);return a.push(l),l.handler};tE.forEach(e=>{Ps[e]=(t={},n)=>{const a=aE(t);return Ps({...a,type:e},n)}});function BX(e){for(const t in ol)if(_t(ol,t)){const n=[...ol[t]];for(const a of n)(!e||e===a.props.type)&&a.handler.close()}}function FX(e){ol[e]&&[...ol[e]].forEach(t=>t.handler.close())}Ps.closeAll=BX;Ps.closeAllByPlacement=FX;Ps._context=null;const jn=mS(Ps,"$message");var zX=ue({name:"ElMessageBox",directives:{TrapFocus:t8},components:{ElButton:Dn,ElFocusTrap:Ir,ElInput:Yn,ElOverlay:zh,ElIcon:Be,...yh},inheritAttrs:!1,props:{buttonSize:{type:String,validator:t2},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}=Vd("message-box",w(()=>e.buttonSize)),{t:s}=n,{nextZIndex:i}=a,u=V(!1),c=Ft({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",cancelButtonType:"",confirmButtonType:"primary",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",closeIcon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:"",inputValidator:void 0,inputErrorMessage:"",message:"",modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonLoadingIcon:El(rl),cancelButtonLoadingIcon:El(rl),confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:i()}),d=w(()=>{const _=c.type;return{[l.bm("icon",_)]:_&&Ko[_]}}),f=Xn(),v=Xn(),g=w(()=>{const _=c.type;return c.icon||_&&Ko[_]||""}),m=w(()=>!!c.message),p=V(),h=V(),b=V(),y=V(),C=V(),S=w(()=>c.confirmButtonClass);fe(()=>c.inputValue,async _=>{await Ae(),e.boxType==="prompt"&&_&&A()},{immediate:!0}),fe(()=>u.value,_=>{var L;_&&(e.boxType!=="prompt"&&(c.autofocus?b.value=((L=C.value)==null?void 0:L.$el)??p.value:b.value=p.value),c.zIndex=i()),e.boxType==="prompt"&&(_?Ae().then(()=>{y.value&&y.value.$el&&(c.autofocus?b.value=K()??p.value:b.value=p.value)}):(c.editorErrorMessage="",c.validateError=!1))});const k=w(()=>e.draggable),E=w(()=>e.overflow),{isDragging:O}=I1(p,h,k,E);mt(async()=>{await Ae(),e.closeOnHashChange&&window.addEventListener("hashchange",T)}),zt(()=>{e.closeOnHashChange&&window.removeEventListener("hashchange",T)});function T(){u.value&&(u.value=!1,Ae(()=>{c.action&&t("action",c.action)}))}const x=()=>{e.closeOnClickModal&&M(c.distinguishCancelAndClose?"close":"cancel")},$=ch(x),I=_=>{var L;if(c.inputType!=="textarea"&&!((L=y.value)!=null&&L.isComposing))return _.preventDefault(),M("confirm")},M=_=>{var L;e.boxType==="prompt"&&_==="confirm"&&!A()||(c.action=_,c.beforeClose?(L=c.beforeClose)==null||L.call(c,_,c,T):T())},A=()=>{if(e.boxType==="prompt"){const _=c.inputPattern;if(_&&!_.test(c.inputValue||""))return c.editorErrorMessage=c.inputErrorMessage||s("el.messagebox.error"),c.validateError=!0,!1;const L=c.inputValidator;if(We(L)){const H=L(c.inputValue);if(H===!1)return c.editorErrorMessage=c.inputErrorMessage||s("el.messagebox.error"),c.validateError=!0,!1;if(De(H))return c.editorErrorMessage=H,c.validateError=!0,!1}}return c.editorErrorMessage="",c.validateError=!1,!0},K=()=>{var L;const _=(L=y.value)==null?void 0:L.$refs;return(_==null?void 0:_.input)??(_==null?void 0:_.textarea)},z=()=>{M("close")},B=()=>{e.closeOnPressEscape&&z()};return e.lockScroll&&Td(u,{ns:l}),{...Vn(c),ns:l,overlayEvent:$,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:O,confirmRef:C,doClose:T,handleClose:z,onCloseRequested:B,handleWrapperClick:x,handleInputEnter:I,handleAction:M,t:s}}});const HX=["aria-label","aria-describedby"],KX=["aria-label"],WX=["id"];function jX(e,t,n,a,l,o){const s=At("el-icon"),i=At("el-input"),u=At("el-button"),c=At("el-focus-trap"),d=At("el-overlay");return N(),oe(Gn,{name:"fade-in-linear",onAfterLeave:t[11]||(t[11]=f=>e.$emit("vanish")),persisted:""},{default:Z(()=>[ft(U(d,{"z-index":e.zIndex,"overlay-class":[e.ns.is("message-box"),e.modalClass],mask:e.modal},{default:Z(()=>[j("div",{role:"dialog","aria-label":e.title,"aria-modal":"true","aria-describedby":e.showInput?void 0:e.contentId,class:P(`${e.ns.namespace.value}-overlay-message-box`),onClick:t[8]||(t[8]=(...f)=>e.overlayEvent.onClick&&e.overlayEvent.onClick(...f)),onMousedown:t[9]||(t[9]=(...f)=>e.overlayEvent.onMousedown&&e.overlayEvent.onMousedown(...f)),onMouseup:t[10]||(t[10]=(...f)=>e.overlayEvent.onMouseup&&e.overlayEvent.onMouseup(...f))},[U(c,{loop:"",trapped:e.visible,"focus-trap-el":e.rootRef,"focus-start-el":e.focusStartRef,onReleaseRequested:e.onCloseRequested},{default:Z(()=>[j("div",{ref:"rootRef",class:P([e.ns.b(),e.customClass,e.ns.is("draggable",e.draggable),e.ns.is("dragging",e.isDragging),{[e.ns.m("center")]:e.center}]),style:je(e.customStyle),tabindex:"-1",onClick:t[7]||(t[7]=Je(()=>{},["stop"]))},[e.title!==null&&e.title!==void 0?(N(),F("div",{key:0,ref:"headerRef",class:P([e.ns.e("header"),{"show-close":e.showClose}])},[j("div",{class:P(e.ns.e("title"))},[e.iconComponent&&e.center?(N(),oe(s,{key:0,class:P([e.ns.e("status"),e.typeClass])},{default:Z(()=>[(N(),oe(ct(e.iconComponent)))]),_:1},8,["class"])):te("v-if",!0),j("span",null,we(e.title),1)],2),e.showClose?(N(),F("button",{key:0,type:"button",class:P(e.ns.e("headerbtn")),"aria-label":e.t("el.messagebox.close"),onClick:t[0]||(t[0]=f=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel")),onKeydown:t[1]||(t[1]=an(Je(f=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"]))},[U(s,{class:P(e.ns.e("close"))},{default:Z(()=>[(N(),oe(ct(e.closeIcon||"close")))]),_:1},8,["class"])],42,KX)):te("v-if",!0)],2)):te("v-if",!0),j("div",{id:e.contentId,class:P(e.ns.e("content"))},[j("div",{class:P(e.ns.e("container"))},[e.iconComponent&&!e.center&&e.hasMessage?(N(),oe(s,{key:0,class:P([e.ns.e("status"),e.typeClass])},{default:Z(()=>[(N(),oe(ct(e.iconComponent)))]),_:1},8,["class"])):te("v-if",!0),e.hasMessage?(N(),F("div",{key:1,class:P(e.ns.e("message"))},[ne(e.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(N(),oe(ct(e.showInput?"label":"p"),{key:1,for:e.showInput?e.inputId:void 0,innerHTML:e.message},null,8,["for","innerHTML"])):(N(),oe(ct(e.showInput?"label":"p"),{key:0,for:e.showInput?e.inputId:void 0,textContent:we(e.message)},null,8,["for","textContent"]))])],2)):te("v-if",!0)],2),ft(j("div",{class:P(e.ns.e("input"))},[U(i,{id:e.inputId,ref:"inputRef",modelValue:e.inputValue,"onUpdate:modelValue":t[2]||(t[2]=f=>e.inputValue=f),type:e.inputType,placeholder:e.inputPlaceholder,"aria-invalid":e.validateError,class:P({invalid:e.validateError}),onKeydown:an(e.handleInputEnter,["enter"])},null,8,["id","modelValue","type","placeholder","aria-invalid","class","onKeydown"]),j("div",{class:P(e.ns.e("errormsg")),style:je({visibility:e.editorErrorMessage?"visible":"hidden"})},we(e.editorErrorMessage),7)],2),[[Lt,e.showInput]])],10,WX),e.showCancelButton||e.showConfirmButton?(N(),F("div",{key:1,class:P(e.ns.e("btns"))},[e.showCancelButton?(N(),oe(u,{key:0,type:e.cancelButtonType==="text"?"":e.cancelButtonType,text:e.cancelButtonType==="text",loading:e.cancelButtonLoading,"loading-icon":e.cancelButtonLoadingIcon,class:P([e.cancelButtonClass]),round:e.roundButton,size:e.btnSize,onClick:t[3]||(t[3]=f=>e.handleAction("cancel")),onKeydown:t[4]||(t[4]=an(Je(f=>e.handleAction("cancel"),["prevent"]),["enter"]))},{default:Z(()=>[dt(we(e.cancelButtonText||e.t("el.messagebox.cancel")),1)]),_:1},8,["type","text","loading","loading-icon","class","round","size"])):te("v-if",!0),ft(U(u,{ref:"confirmRef",type:e.confirmButtonType==="text"?"":e.confirmButtonType,text:e.confirmButtonType==="text",loading:e.confirmButtonLoading,"loading-icon":e.confirmButtonLoadingIcon,class:P([e.confirmButtonClasses]),round:e.roundButton,disabled:e.confirmButtonDisabled,size:e.btnSize,onClick:t[5]||(t[5]=f=>e.handleAction("confirm")),onKeydown:t[6]||(t[6]=an(Je(f=>e.handleAction("confirm"),["prevent"]),["enter"]))},{default:Z(()=>[dt(we(e.confirmButtonText||e.t("el.messagebox.confirm")),1)]),_:1},8,["type","text","loading","loading-icon","class","round","disabled","size"]),[[Lt,e.showConfirmButton]])],2)):te("v-if",!0)],6)]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,HX)]),_:3},8,["z-index","overlay-class","mask"]),[[Lt,e.visible]])]),_:3})}var qX=Rn(zX,[["render",jX]]);const ji=new Map,YX=e=>{let t=document.body;return e.appendTo&&(De(e.appendTo)&&(t=document.querySelector(e.appendTo)),ya(e.appendTo)&&(t=e.appendTo),ya(t)||(Kt("ElMessageBox","the appendTo option is not an HTMLElement. Falling back to document.body."),t=document.body)),t},Kf=(e,t)=>{var a;const n=(a=e.component)==null?void 0:a.proxy;return()=>n.handleAction(t)},UX=(e,t,n=null)=>{const a=U(qX,e,We(e.message)||Jt(e.message)?{default:We(e.message)?()=>e.message({confirm:Kf(a,"confirm"),cancel:Kf(a,"cancel"),close:Kf(a,"close")}):()=>e.message}:null);return a.appContext=n,zo(a,t),YX(e).appendChild(t.firstElementChild),a.component},GX=()=>document.createElement("div"),XX=(e,t)=>{const n=GX();e.onVanish=()=>{zo(null,n),ji.delete(l)},e.onAction=o=>{const s=ji.get(l);let i;e.showInput?i={value:l.inputValue,action:o}:i=o,e.callback?e.callback(i,a.proxy):o==="cancel"||o==="close"?e.distinguishCancelAndClose&&o!=="cancel"?s.reject("close"):s.reject("cancel"):s.resolve(i)};const a=UX(e,n,t),l=a.proxy;for(const o in e)_t(e,o)&&!_t(l.$props,o)&&(o==="closeIcon"&&rt(e[o])?l[o]=El(e[o]):l[o]=e[o]);return l.visible=!0,l};function _r(e,t=null){if(!Pt)return Promise.reject();let n;return De(e)||Jt(e)?e={message:e}:n=e.callback,new Promise((a,l)=>{const o=XX(e,t??_r._context);ji.set(o,{options:e,callback:n,resolve:a,reject:l})})}const JX=["alert","confirm","prompt"],ZX={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};JX.forEach(e=>{_r[e]=QX(e)});function QX(e){return(t,n,a,l)=>{let o="";return rt(n)?(a=n,o=""):xt(n)?o="":o=n,_r(Object.assign({title:o,message:t,type:"",...ZX[e]},a,{boxType:e}),l)}}_r.close=()=>{ji.forEach((e,t)=>{t.doClose()}),ji.clear()};_r._context=null;const xo=_r;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,lE=["primary","success","info","warning","error"],eJ=$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:[...lE,""],default:""},zIndex:Number,closeIcon:{type:Ut,default:Ya},progress:{type:G([Boolean,Object]),default:!1},pauseOnHover:{type:Boolean,default:!0}}),tJ={destroy:()=>!0},nJ=["id"],aJ=["textContent"],lJ={key:0},oJ=["innerHTML"];var sJ=ue({name:"ElNotification",__name:"notification",props:eJ,emits:tJ,setup(e,{expose:t}){const n=e,{ns:a,zIndex:l}=Vd("notification"),{nextZIndex:o,currentZIndex:s}=l,i=V(!1);let u;const c=V(100);let d=0,f=0;const v=w(()=>{const A=n.type;return A&&Ko[n.type]?a.m(A):""}),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&&Ko[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}=TI(()=>{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 A=Math.max(0,n.duration-d);({stop:u}=fr(()=>{i.value&&I()},A)),g.value&&(c.value=A/n.duration*100,k())}function O(){u==null||u(),S(),f>0&&(d+=Date.now()-f,f=0)}let T=!1;function x(){T=!0,n.pauseOnHover&&O()}function $(){T=!1,n.pauseOnHover&&E()}function I(){i.value=!1,O()}function M(A){switch(Gt(A)){case ye.delete:case ye.backspace:O();break;case ye.esc:i.value&&I();break;default:if(T&&n.pauseOnHover)break;O(),E()}}return mt(()=>{E(),o(),i.value=!0}),Ht(document,"keydown",M),t({visible:i,close:I}),(A,K)=>(N(),oe(Gn,{name:r(a).b("fade"),onBeforeLeave:e.onClose,onAfterLeave:K[1]||(K[1]=z=>A.$emit("destroy")),persisted:""},{default:Z(()=>[ft(j("div",{id:e.id,class:P([r(a).b(),e.customClass,b.value]),style:je(C.value),role:"alert",onMouseenter:x,onMouseleave:$,onClick:K[0]||(K[0]=(...z)=>e.onClick&&e.onClick(...z))},[h.value?(N(),oe(r(Be),{key:0,class:P([r(a).e("icon"),v.value])},{default:Z(()=>[(N(),oe(ct(h.value)))]),_:1},8,["class"])):te("v-if",!0),j("div",{class:P(r(a).e("group"))},[j("h2",{class:P(r(a).e("title")),textContent:we(e.title)},null,10,aJ),ft(j("div",{class:P(r(a).e("content")),style:je(e.title?void 0:{margin:0})},[ne(A.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(N(),F(ze,{key:1},[te(" Caution here, message could've been compromised, never use user's input as message "),j("p",{innerHTML:e.message},null,8,oJ)],2112)):(N(),F("p",lJ,we(e.message),1))])],6),[[Lt,e.message]]),e.showClose?(N(),oe(r(Be),{key:0,class:P(r(a).e("closeBtn")),onClick:Je(I,["stop"])},{default:Z(()=>[(N(),oe(ct(e.closeIcon)))]),_:1},8,["class"])):te("v-if",!0)],2),g.value?(N(),F("div",{key:1,class:P(r(a).e("progress")),"aria-hidden":"true"},[U(r(Yh),pt(p.value,{percentage:c.value}),null,16,["percentage"])],2)):te("v-if",!0)],46,nJ),[[Lt,i.value]])]),_:3},8,["name","onBeforeLeave"]))}}),rJ=sJ;const kr={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},Uc=16;let iJ=1;const Is=function(e={},t){if(!Pt)return{close:()=>{}};(De(e)||Jt(e))&&(e={message:e});const n=e.position||"top-right";let a=e.offset||0;kr[n].forEach(({vm:d})=>{var f;a+=(((f=d.el)==null?void 0:f.offsetHeight)||0)+Uc}),a+=Uc;const l=`notification_${iJ++}`,o=e.onClose,s={...e,offset:a,id:l,onClose:()=>{uJ(l,n,o)}};let i=document.body;ya(e.appendTo)?i=e.appendTo:De(e.appendTo)&&(i=document.querySelector(e.appendTo)),ya(i)||(Kt("ElNotification","the appendTo option is not an HTMLElement. Falling back to document.body."),i=document.body);const u=document.createElement("div"),c=U(rJ,s,We(s.message)?s.message:Jt(s.message)?()=>s.message:null);return c.appContext=xt(t)?Is._context:t,c.props.onDestroy=()=>{zo(null,u)},zo(c,u),kr[n].push({vm:c}),i.appendChild(u.firstElementChild),{close:()=>{c.component.exposed.close()}}};lE.forEach(e=>{Is[e]=(t={},n)=>((De(t)||Jt(t))&&(t={message:t}),Is({...t,type:e},n))});function uJ(e,t,n){const a=kr[t],l=a.findIndex(({vm:c})=>{var d;return((d=c.component)==null?void 0:d.props.id)===e});if(l===-1)return;const{vm:o}=a[l];if(!o)return;n==null||n(o);const s=o.el.offsetHeight,i=t.split("-")[0];a.splice(l,1);const u=a.length;if(!(u<1))for(let c=l;c{t.component.exposed.close()})}function dJ(e="top-right"){var n,a,l,o;let t=((l=(a=(n=kr[e][0])==null?void 0:n.vm.component)==null?void 0:a.props)==null?void 0:l.offset)||0;for(const{vm:s}of kr[e])s.component.props.offset=t,t+=(((o=s.el)==null?void 0:o.offsetHeight)||0)+Uc}Is.closeAll=cJ;Is.updateOffsets=dJ;Is._context=null;const fJ=mS(Is,"$notify"),pJ=$e({...Ls(Zr,["ariaLabel","gpuAcceleration","rawContent"]),placement:Qp.placement,tabindex:Qp.tabindex,effect:{...Zr.effect,default:"light"},title:String,width:{type:[String,Number],default:150},offset:{...Zr.offset,default:void 0},persistent:{...Zr.persistent,default:!0}}),vJ={"update:visible":e=>qt(e),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0};({...Ls(oL,["gpuAcceleration"])});var hJ=ue({name:"ElPopover",__name:"popover",props:pJ,emits:vJ,setup(e,{expose:t,emit:n}){const a=e,l=n,o=w(()=>{const b=Bn.props,y=me(b)?b:Object.keys(b);return Rl(a,y)}),s=he("popover"),i=V(),u=w(()=>{var b;return(b=r(i))==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=i.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)=>(N(),oe(r(Bn),pt({ref_key:"tooltipRef",ref:i},o.value,{"aria-label":e.title,"popper-class":d.value,"popper-style":c.value,"gpu-acceleration":f.value,onBeforeShow:g,onBeforeHide:m,onShow:p,onHide:h}),{content:Z(()=>[e.title?(N(),F("div",{key:0,class:P(r(s).e("title")),role:"title"},we(e.title),3)):te("v-if",!0),ne(b.$slots,"default",{hide:v},()=>[dt(we(e.content),1)])]),default:Z(()=>[b.$slots.reference?ne(b.$slots,"reference",{key:0}):te("v-if",!0)]),_:3},16,["aria-label","popper-class","popper-style","gpu-acceleration"]))}}),mJ=hJ;const t0=(e,t)=>{var a;const n=(a=t.arg||t.value)==null?void 0:a.popperRef;n&&(n.triggerRef=e)};var gJ={mounted(e,t){t0(e,t)},updated(e,t){t0(e,t)}};const bJ="popover",oE=f4(gJ,bJ),yJ=it(mJ,{directive:oE}),wJ="2.14.7",SJ=(e=[])=>({version:wJ,install:(n,a)=>{n[lg]||(n[lg]=!0,e.forEach(l=>n.use(l)),a&&Th(a,n,!0))}});var CJ=[h4,R3,qL,Fq,ZL,QL,oD,FS,hD,mD,Dn,US,pV,gV,IV,RV,YB,ek,ZB,ll,vB,Lh,i6,k6,E6,Fd,dk,Z6,CD,oF,sF,rF,iF,uF,p5,$k,C5,k5,V5,Ak,J5,VH,BH,FH,Wk,RA,_A,Be,OK,jk,Yn,qk,jK,JK,aW,yW,wW,SW,CW,OW,ij,pj,yJ,AS,Yh,QC,TB,xB,Oj,Ij,o6,il,jo,_c,Y8,e9,s9,r9,$9,I9,mk,bF,B9,F9,X9,oq,sq,Bq,tY,nY,lo,sm,w8,dY,mY,gY,Bn,MY,um,ZY,vU,zU,JU,CG,kG,IG,RG,FG,QG,pX,vX],kJ=[bX,kX,jn,cc,fJ,oE],bm=SJ([...CJ,...kJ]);bm.install;bm.version;var EJ=bm,xJ={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 Go="xq0078";async function mo(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 n0=()=>mo(`/api/plugin-config/${Go}`),TJ=e=>mo(`/api/plugin-config/${Go}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),$J=()=>mo(`/api/plugins/${Go}/last-fields`),OJ=()=>mo(`/api/plugin-configs?plugin_id=${encodeURIComponent(Go)}`),NJ=(e,t)=>mo("/api/plugin-configs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({plugin_id:Go,name:e,fields:t})}),MJ=e=>mo(`/api/plugin-configs/${encodeURIComponent(Go)}/${encodeURIComponent(e)}`,{method:"DELETE"}),PJ=e=>mo("/api/runs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({plugin_id:Go,fields:e})}),IJ=e=>mo(`/api/runs/${e}`),RJ=e=>mo(`/api/runs/${e}/stop`,{method:"POST"});function _J(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 Wf=e=>JSON.parse(JSON.stringify(e)),sE=`plugin:${Go}:lastSavedAt`;function AJ(){try{return localStorage.getItem(sE)||""}catch{return""}}function LJ(e){try{localStorage.setItem(sE,e)}catch{}}function jf(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 DJ(e={}){const{defaults:t,validate:n,buildPayload:a}=e,l=Ft(t?t():{}),o=V(!1),s=V(!1),i=V(null),u=V(AJ()),c=V(!1),d=V(0),f=V(!1);let v=null,g="",m=null,p=null;const h=(H,D)=>{i.value=H?{type:H,text:D}:null};mt(async()=>{try{const H=await n0();jf(l,H)}catch(H){H.code===401&&(s.value=!0)}o.value=!0,O()}),fe(l,()=>{!o.value||c.value||(clearTimeout(p),p=setTimeout(()=>b(!1),800))},{deep:!0});async function b(H){try{await TJ(Wf(l)),u.value=new Date().toLocaleTimeString("zh-CN",{hour12:!1}),LJ(u.value),H&&jn.success("配置已保存到本机")}catch(D){D.code===401?s.value=!0:jn.error("配置保存失败:"+D.message)}}function y(){Object.assign(l,t?t(l):{}),h(null),jn.info("已恢复默认配置")}async function C(){try{const H=await $J(),D=H.fields||{};if(!Object.keys(D).length){jn.info("暂无上次执行参数");return}jf(l,D),jn.success("已恢复上次执行参数"+(H.at?`(${H.at})`:""))}catch(H){H.code===401?s.value=!0:jn.error("恢复上次参数失败:"+H.message)}}const S=V([]),k=V(""),E=w(()=>[{value:"",label:"当前配置(自动保存)"},...S.value.map(H=>({value:H.id,label:H.name}))]);async function O(){try{const H=await OJ();S.value=H.configs||[]}catch{}}function T(H){if(!H)return;const D=S.value.find(W=>W.id===H);D&&(jf(l,D.fields),jn.success(`已应用方案「${D.name}」`))}async function x(){const H=S.value.find(q=>q.id===k.value);let D="";try{({value:D}=await cc.prompt("方案保存到本机(同名覆盖,密码明文保存,每套方案可绑定不同账号),供「定时任务」引用:到点自动取该方案的最新参数执行。","存为配置方案",{inputValue:H?H.name:"",confirmButtonText:"保存方案",cancelButtonText:"取消",inputPattern:/\S/,inputErrorMessage:"请输入方案名称"}))}catch{return}if(D=String(D).trim(),!D)return;const W=S.value.find(q=>q.name===D);if(W)try{await cc.confirm(`已存在同名方案「${W.name}」,保存将覆盖它的参数(多套不同配置请用不同名称)。`,"覆盖已有方案",{type:"warning",confirmButtonText:"覆盖保存",cancelButtonText:"取消"})}catch{return}try{const q=await NJ(D,Wf(l));await O(),k.value=q.config?q.config.id:"",jn.success(`方案「${D}」已保存`)}catch(q){q.code===401?s.value=!0:jn.error("方案保存失败:"+q.message)}}async function $(){const H=S.value.find(D=>D.id===k.value);if(H){try{await cc.confirm(`删除配置方案「${H.name}」?引用它的定时任务到点会跳过触发并提示重选。`,"删除方案",{type:"warning",confirmButtonText:"删除",cancelButtonText:"取消"})}catch{return}try{await MJ(H.id),k.value="",await O(),jn.success("方案已删除")}catch(D){jn.error("方案删除失败:"+D.message)}}}async function I(H){if(!c.value){if(s.value)try{await n0(),s.value=!1}catch{h("error","登录态未就绪,请稍后重试");return}if(!(n&&!n(H))){await b(!1),h(null),c.value=!0,d.value=0;try{const D=a?a(l):Wf(l);H&&(D.action=H),g=(await PJ(D)).run_id,A(),K()}catch(D){c.value=!1,z(),D.code===401?(s.value=!0,h("error","登录态未就绪,本次没有启动,请稍后重试")):D.code===409?h("warn","已取消加入执行队列,本次没有启动"):h("error","启动执行失败:"+D.message)}}}}async function M(){if(!(!g||f.value)){f.value=!0;try{await RJ(g),jn.warning("已发出强制停止指令,正在终止执行进程…")}catch(H){jn.error("停止失败:"+H.message)}finally{f.value=!1}}}function A(){v&&v.readyState<=1||(v=_J(H=>{H.run_id&&H.run_id!==g||(H.t==="progress"?d.value=Math.max(d.value,H.pct||0):H.t==="run_done"&&(H.ok?B():H.status==="cancelled"?_(H.error):L(H.error||"执行失败")))}),v.onclose=()=>{v=null})}function K(){z(),m=setInterval(async()=>{var H;if(g)try{const D=await IJ(g);D.status==="done"?B((H=D.result)==null?void 0:H.summary):D.status==="cancelled"?_(D.error):D.status==="error"&&L(D.error||"执行失败")}catch{}},5e3)}function z(){m&&(clearInterval(m),m=null)}function B(H){z(),c.value=!1,d.value=100,H&&h("ok",H)}function _(H){z(),c.value=!1,h("warn","任务已取消:"+(H||"用户已停止"))}function L(H){z(),c.value=!1,h("error","执行失败:"+H)}return{form:l,loaded:o,needLogin:s,notice:i,lastSavedAt:u,running:c,progress:d,stopping:f,saveNow:b,resetDefaults:y,restoreLastFields:C,schemes:S,schemeSel:k,schemeOptions:E,onSchemeChange:T,saveSchemeAs:x,removeScheme:$,run:I,forceStop:M}}const VJ=(e,t)=>{const n=e.__vccOpts||e;for(const[a,l]of t)n[a]=l;return n},BJ={class:"page"},FJ={class:"toolbar"},zJ={key:0,class:"notice is-warn"},HJ={class:"n-ico"},KJ={class:"sec"},WJ={class:"sec-body"},jJ={class:"grid"},qJ={class:"sec"},YJ={class:"sec-body"},UJ={class:"grid range-grid"},GJ={class:"dir-ctrl"},XJ={class:"tip"},JJ={class:"actions"},ZJ={key:2,class:"runline"},QJ={class:"pct"},eZ="金色湖畔石桥铺会馆",tZ={__name:"App",setup(e){const t=x=>`${x.getFullYear()}-${String(x.getMonth()+1).padStart(2,"0")}-${String(x.getDate()).padStart(2,"0")}`,n=x=>{const $=new Date;return $.setDate($.getDate()+x),t($)},a=()=>({date_from:n(-1),date_to:n(0),vpn_name:eZ,jshp_username:"",jshp_password:"",save_dir:""}),{form:l,needLogin:o,notice:s,lastSavedAt:i,running:u,progress:c,stopping:d,saveNow:f,resetDefaults:v,restoreLastFields:g,schemeSel:m,schemeOptions:p,onSchemeChange:h,saveSchemeAs:b,removeScheme:y,run:C,forceStop:S}=DJ({defaults:a,validate(){return l.date_from&&l.date_to&&l.date_tol.date_from?[l.date_from,l.date_to||l.date_from]:[],set:x=>{l.date_from=x&&x[0]?x[0]:"",l.date_to=x&&x[1]?x[1]:""}}),E=w(()=>{if(!l.date_from)return`查询区间:默认昨天 ~ 今天(${n(-1)} 00:00:00 ~ ${n(0)} 23:59:59)`;const x=l.date_from,$=l.date_to||l.date_from,I=Math.round((new Date($)-new Date(x))/864e5)+1;return`查询区间:${x} 00:00:00 ~ ${$} 23:59:59(${I>0?I:1} 天)`}),O=V(!1);async function T(){O.value=!0;try{const x=await fetch("/api/dialog/directory",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:"选择保存目录",current:l.save_dir||""})}),$=await x.json().catch(()=>({}));if(!x.ok)throw new Error($.detail||$.error||"HTTP "+x.status);$.path&&(l.save_dir=$.path)}catch(x){jn.warning("打开文件夹选择失败:"+x.message)}finally{O.value=!1}}return(x,$)=>{const I=At("el-option"),M=At("el-select"),A=At("el-button"),K=At("el-input"),z=At("el-form-item"),B=At("el-form"),_=At("el-date-picker");return N(),F("div",BJ,[j("div",FJ,[$[11]||($[11]=j("span",{class:"spacer"},null,-1)),j("span",{class:P(["saved",{"is-idle":!r(i)}])},[$[8]||($[8]=j("i",null,null,-1)),dt(we(r(i)?"已保存 "+r(i):"尚未保存"),1)],2),U(M,{modelValue:r(m),"onUpdate:modelValue":$[0]||($[0]=L=>Qt(m)?m.value=L:null),class:"scheme-sel",size:"small",disabled:r(u),placeholder:"当前配置(自动保存)",onChange:r(h)},{default:Z(()=>[(N(!0),F(ze,null,yt(r(p),L=>(N(),oe(I,{key:L.value,label:L.label,value:L.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","disabled","onChange"]),U(A,{size:"small",disabled:r(u),onClick:r(b)},{default:Z(()=>[...$[9]||($[9]=[dt("存为方案",-1)])]),_:1},8,["disabled","onClick"]),U(A,{size:"small",text:"",type:"danger",disabled:r(u)||!r(m),onClick:r(y)},{default:Z(()=>[...$[10]||($[10]=[dt("删除",-1)])]),_:1},8,["disabled","onClick"])]),r(o)?(N(),F("div",zJ,[...$[12]||($[12]=[j("span",{class:"n-ico"},"!",-1),j("span",null,"未登录:请先在壳子登录统一账户,再刷新本界面",-1)])])):r(s)?(N(),F("div",{key:1,class:P(["notice","is-"+r(s).type])},[j("span",HJ,we(r(s).type==="ok"?"✓":r(s).type==="error"?"✕":"!"),1),j("span",null,we(r(s).text),1)],2)):te("",!0),j("section",KJ,[$[14]||($[14]=j("div",{class:"sec-head"},[j("span",{class:"sec-badge"},"01"),j("span",{class:"sec-name"},"登录账号"),j("span",{class:"sec-line"})],-1)),j("div",WJ,[U(B,{"label-position":"top"},{default:Z(()=>[j("div",jJ,[U(z,{label:"门店"},{default:Z(()=>[U(K,{modelValue:r(l).vpn_name,"onUpdate:modelValue":$[1]||($[1]=L=>r(l).vpn_name=L),placeholder:"留空 = 登录页第一个门店",disabled:r(u),clearable:""},null,8,["modelValue","disabled"])]),_:1}),U(z,{label:"登录账号"},{default:Z(()=>[U(K,{modelValue:r(l).jshp_username,"onUpdate:modelValue":$[2]||($[2]=L=>r(l).jshp_username=L),placeholder:"金贵微信端管理平台账号",disabled:r(u),clearable:""},null,8,["modelValue","disabled"])]),_:1}),U(z,{label:"登录密码"},{default:Z(()=>[U(K,{modelValue:r(l).jshp_password,"onUpdate:modelValue":$[3]||($[3]=L=>r(l).jshp_password=L),type:"password","show-password":"",placeholder:"仅保存在本机,下次免填",disabled:r(u)},null,8,["modelValue","disabled"])]),_:1})]),$[13]||($[13]=j("div",{class:"tip"},"平台为门店 + 账号密码登录,无验证码;密码明文保存在本机配置(%LOCALAPPDATA%\\37duAutomation\\plugin_configs),下次免填。",-1))]),_:1})])]),j("section",qJ,[$[18]||($[18]=j("div",{class:"sec-head"},[j("span",{class:"sec-badge"},"02"),j("span",{class:"sec-name"},"查询范围"),j("span",{class:"sec-line"})],-1)),j("div",YJ,[U(B,{"label-position":"top"},{default:Z(()=>[j("div",UJ,[U(z,{label:"核销日期段"},{default:Z(()=>[U(_,{modelValue:k.value,"onUpdate:modelValue":$[4]||($[4]=L=>k.value=L),type:"daterange","unlink-panels":"","value-format":"YYYY-MM-DD","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期",disabled:r(u),style:{width:"100%"}},null,8,["modelValue","disabled"])]),_:1}),U(z,{label:"保存目录"},{default:Z(()=>[j("div",GJ,[U(K,{modelValue:r(l).save_dir,"onUpdate:modelValue":$[5]||($[5]=L=>r(l).save_dir=L),class:"dir-input",disabled:r(u),clearable:"",placeholder:"留空 = 桌面/金色湖畔小程序数据_今天日期"},null,8,["modelValue","disabled"]),U(A,{class:"dir-btn",disabled:r(u)||O.value,loading:O.value,onClick:T},{default:Z(()=>[...$[15]||($[15]=[dt("选择",-1)])]),_:1},8,["disabled","loading"])])]),_:1})]),j("div",XJ,[j("b",null,we(E.value),1),$[16]||($[16]=j("br",null,null,-1)),$[17]||($[17]=dt(" 文件名:门票使用统计_起止日期.xlsx,列序与平台导出完全一致(票种/消费码/票号/面值/核销时间/核销账单号/核销人/核销门店)。 ",-1))])]),_:1})])]),$[26]||($[26]=Hx('导出说明 ▾ ① 登录 :门店 + 账号密码接口登录,无验证码;账号密码错误时不会自动重试,避免平台累计失败次数锁号。
② 核销时间 :默认昨天 ~ 今天(昨天 00:00:00 ~ 今天 23:59:59),按执行日推算,定时任务无需固定日期;也可直接选日期段补导历史数据。
③ 取数方式 :平台搜索接口返回的是 JSON 明细 (不是页面 HTML),插件直接调接口拿全量数据,不打开浏览器。
④ 导出方式 :平台导出接口只接受「文件名 + 表格 HTML」,故插件先取 JSON 再拼表格提交;若导出接口异常,自动用同一份数据本地生成同列序 xlsx,产物不丢。
',1)),j("div",JJ,[U(A,{type:"primary",class:"btn-run",loading:r(u),onClick:$[6]||($[6]=L=>r(C)())},{default:Z(()=>[dt(we(r(u)?"执行中 "+r(c)+"%":"一键执行"),1)]),_:1},8,["loading"]),r(u)?(N(),oe(A,{key:0,type:"danger",plain:"",loading:r(d),onClick:r(S)},{default:Z(()=>[...$[19]||($[19]=[dt("强制停止",-1)])]),_:1},8,["loading","onClick"])):te("",!0),$[23]||($[23]=j("span",{class:"spacer"},null,-1)),U(A,{disabled:r(u),onClick:r(g)},{default:Z(()=>[...$[20]||($[20]=[dt("恢复上次参数",-1)])]),_:1},8,["disabled","onClick"]),U(A,{disabled:r(u),onClick:$[7]||($[7]=L=>r(f)(!0))},{default:Z(()=>[...$[21]||($[21]=[dt("保存配置",-1)])]),_:1},8,["disabled"]),U(A,{text:"",disabled:r(u),onClick:r(v)},{default:Z(()=>[...$[22]||($[22]=[dt("恢复默认",-1)])]),_:1},8,["disabled","onClick"])]),r(u)?(N(),F("div",ZJ,[$[24]||($[24]=j("span",{class:"pulse"},null,-1)),$[25]||($[25]=j("span",null,"正在执行,日志与进度实时显示在工作台下方「运行日志」区",-1)),j("span",QJ,we(r(c))+"%",1)])):te("",!0)])}}},nZ=VJ(tZ,[["__scopeId","data-v-0c29bedb"]]);Rw(nZ).use(EJ,{locale:xJ}).mount("#app")});export default aZ();
diff --git a/plugins/XQ0001-0100/XQ0078 金色湖畔小程序数据导出/ui/index.html b/plugins/XQ0001-0100/XQ0078 金色湖畔小程序数据导出/ui/index.html
new file mode 100644
index 0000000..4d6fe4a
--- /dev/null
+++ b/plugins/XQ0001-0100/XQ0078 金色湖畔小程序数据导出/ui/index.html
@@ -0,0 +1,13 @@
+
+
+
+
+
+ 金色湖畔小程序数据导出
+
+
+
+
+
+
+